Repository: cameron314/concurrentqueue Branch: master Commit: 593df78ec309 Files: 1830 Total size: 11.8 MB Directory structure: gitextract_c2x5p8gn/ ├── .gitignore ├── CMakeLists.txt ├── LICENSE.md ├── README.md ├── benchmarks/ │ ├── benchmarks.cpp │ ├── boost/ │ │ ├── LICENSE_1_0.txt │ │ ├── README.txt │ │ ├── array.hpp │ │ ├── assert.hpp │ │ ├── atomic/ │ │ │ ├── atomic.hpp │ │ │ ├── atomic_flag.hpp │ │ │ ├── capabilities.hpp │ │ │ ├── detail/ │ │ │ │ ├── atomic_flag.hpp │ │ │ │ ├── atomic_template.hpp │ │ │ │ ├── bitwise_cast.hpp │ │ │ │ ├── caps_gcc_alpha.hpp │ │ │ │ ├── caps_gcc_arm.hpp │ │ │ │ ├── caps_gcc_atomic.hpp │ │ │ │ ├── caps_gcc_ppc.hpp │ │ │ │ ├── caps_gcc_sparc.hpp │ │ │ │ ├── caps_gcc_sync.hpp │ │ │ │ ├── caps_gcc_x86.hpp │ │ │ │ ├── caps_linux_arm.hpp │ │ │ │ ├── caps_msvc_arm.hpp │ │ │ │ ├── caps_msvc_x86.hpp │ │ │ │ ├── caps_windows.hpp │ │ │ │ ├── config.hpp │ │ │ │ ├── int_sizes.hpp │ │ │ │ ├── interlocked.hpp │ │ │ │ ├── link.hpp │ │ │ │ ├── lockpool.hpp │ │ │ │ ├── operations.hpp │ │ │ │ ├── operations_fwd.hpp │ │ │ │ ├── operations_lockfree.hpp │ │ │ │ ├── ops_cas_based.hpp │ │ │ │ ├── ops_emulated.hpp │ │ │ │ ├── ops_extending_cas_based.hpp │ │ │ │ ├── ops_gcc_alpha.hpp │ │ │ │ ├── ops_gcc_arm.hpp │ │ │ │ ├── ops_gcc_atomic.hpp │ │ │ │ ├── ops_gcc_ppc.hpp │ │ │ │ ├── ops_gcc_sparc.hpp │ │ │ │ ├── ops_gcc_sync.hpp │ │ │ │ ├── ops_gcc_x86.hpp │ │ │ │ ├── ops_gcc_x86_dcas.hpp │ │ │ │ ├── ops_linux_arm.hpp │ │ │ │ ├── ops_msvc_arm.hpp │ │ │ │ ├── ops_msvc_common.hpp │ │ │ │ ├── ops_msvc_x86.hpp │ │ │ │ ├── ops_windows.hpp │ │ │ │ ├── pause.hpp │ │ │ │ ├── platform.hpp │ │ │ │ └── storage_type.hpp │ │ │ └── fences.hpp │ │ ├── atomic.hpp │ │ ├── config/ │ │ │ ├── abi/ │ │ │ │ ├── borland_prefix.hpp │ │ │ │ ├── borland_suffix.hpp │ │ │ │ ├── msvc_prefix.hpp │ │ │ │ └── msvc_suffix.hpp │ │ │ ├── abi_prefix.hpp │ │ │ ├── abi_suffix.hpp │ │ │ ├── auto_link.hpp │ │ │ ├── compiler/ │ │ │ │ ├── borland.hpp │ │ │ │ ├── clang.hpp │ │ │ │ ├── codegear.hpp │ │ │ │ ├── comeau.hpp │ │ │ │ ├── common_edg.hpp │ │ │ │ ├── compaq_cxx.hpp │ │ │ │ ├── cray.hpp │ │ │ │ ├── digitalmars.hpp │ │ │ │ ├── gcc.hpp │ │ │ │ ├── gcc_xml.hpp │ │ │ │ ├── greenhills.hpp │ │ │ │ ├── hp_acc.hpp │ │ │ │ ├── intel.hpp │ │ │ │ ├── kai.hpp │ │ │ │ ├── metrowerks.hpp │ │ │ │ ├── mpw.hpp │ │ │ │ ├── nvcc.hpp │ │ │ │ ├── pathscale.hpp │ │ │ │ ├── pgi.hpp │ │ │ │ ├── sgi_mipspro.hpp │ │ │ │ ├── sunpro_cc.hpp │ │ │ │ ├── vacpp.hpp │ │ │ │ ├── visualc.hpp │ │ │ │ └── xlcpp.hpp │ │ │ ├── no_tr1/ │ │ │ │ ├── cmath.hpp │ │ │ │ ├── complex.hpp │ │ │ │ ├── functional.hpp │ │ │ │ ├── memory.hpp │ │ │ │ └── utility.hpp │ │ │ ├── platform/ │ │ │ │ ├── aix.hpp │ │ │ │ ├── amigaos.hpp │ │ │ │ ├── beos.hpp │ │ │ │ ├── bsd.hpp │ │ │ │ ├── cloudabi.hpp │ │ │ │ ├── cray.hpp │ │ │ │ ├── cygwin.hpp │ │ │ │ ├── haiku.hpp │ │ │ │ ├── hpux.hpp │ │ │ │ ├── irix.hpp │ │ │ │ ├── linux.hpp │ │ │ │ ├── macos.hpp │ │ │ │ ├── qnxnto.hpp │ │ │ │ ├── solaris.hpp │ │ │ │ ├── symbian.hpp │ │ │ │ ├── vms.hpp │ │ │ │ ├── vxworks.hpp │ │ │ │ └── win32.hpp │ │ │ ├── posix_features.hpp │ │ │ ├── requires_threads.hpp │ │ │ ├── select_compiler_config.hpp │ │ │ ├── select_platform_config.hpp │ │ │ ├── select_stdlib_config.hpp │ │ │ ├── stdlib/ │ │ │ │ ├── dinkumware.hpp │ │ │ │ ├── libcomo.hpp │ │ │ │ ├── libcpp.hpp │ │ │ │ ├── libstdcpp3.hpp │ │ │ │ ├── modena.hpp │ │ │ │ ├── msl.hpp │ │ │ │ ├── roguewave.hpp │ │ │ │ ├── sgi.hpp │ │ │ │ ├── stlport.hpp │ │ │ │ └── vacpp.hpp │ │ │ ├── suffix.hpp │ │ │ ├── user.hpp │ │ │ └── warning_disable.hpp │ │ ├── config.hpp │ │ ├── core/ │ │ │ ├── enable_if.hpp │ │ │ ├── noncopyable.hpp │ │ │ └── swap.hpp │ │ ├── cstdint.hpp │ │ ├── current_function.hpp │ │ ├── detail/ │ │ │ ├── is_xxx.hpp │ │ │ ├── iterator.hpp │ │ │ └── workaround.hpp │ │ ├── exception/ │ │ │ └── exception.hpp │ │ ├── functional/ │ │ │ ├── hash/ │ │ │ │ └── hash_fwd.hpp │ │ │ └── hash_fwd.hpp │ │ ├── limits.hpp │ │ ├── lockfree/ │ │ │ ├── detail/ │ │ │ │ ├── atomic.hpp │ │ │ │ ├── copy_payload.hpp │ │ │ │ ├── freelist.hpp │ │ │ │ ├── parameter.hpp │ │ │ │ ├── prefix.hpp │ │ │ │ ├── tagged_ptr.hpp │ │ │ │ ├── tagged_ptr_dcas.hpp │ │ │ │ └── tagged_ptr_ptrcompression.hpp │ │ │ ├── policies.hpp │ │ │ └── queue.hpp │ │ ├── memory_order.hpp │ │ ├── mpl/ │ │ │ ├── O1_size.hpp │ │ │ ├── O1_size_fwd.hpp │ │ │ ├── always.hpp │ │ │ ├── and.hpp │ │ │ ├── apply.hpp │ │ │ ├── apply_fwd.hpp │ │ │ ├── apply_wrap.hpp │ │ │ ├── arg.hpp │ │ │ ├── arg_fwd.hpp │ │ │ ├── assert.hpp │ │ │ ├── at_fwd.hpp │ │ │ ├── aux_/ │ │ │ │ ├── O1_size_impl.hpp │ │ │ │ ├── adl_barrier.hpp │ │ │ │ ├── arg_typedef.hpp │ │ │ │ ├── arity.hpp │ │ │ │ ├── arity_spec.hpp │ │ │ │ ├── begin_end_impl.hpp │ │ │ │ ├── clear_impl.hpp │ │ │ │ ├── common_name_wknd.hpp │ │ │ │ ├── config/ │ │ │ │ │ ├── adl.hpp │ │ │ │ │ ├── arrays.hpp │ │ │ │ │ ├── bcc.hpp │ │ │ │ │ ├── bind.hpp │ │ │ │ │ ├── compiler.hpp │ │ │ │ │ ├── ctps.hpp │ │ │ │ │ ├── dmc_ambiguous_ctps.hpp │ │ │ │ │ ├── dtp.hpp │ │ │ │ │ ├── eti.hpp │ │ │ │ │ ├── forwarding.hpp │ │ │ │ │ ├── gcc.hpp │ │ │ │ │ ├── gpu.hpp │ │ │ │ │ ├── has_apply.hpp │ │ │ │ │ ├── has_xxx.hpp │ │ │ │ │ ├── integral.hpp │ │ │ │ │ ├── intel.hpp │ │ │ │ │ ├── lambda.hpp │ │ │ │ │ ├── msvc.hpp │ │ │ │ │ ├── msvc_typename.hpp │ │ │ │ │ ├── nttp.hpp │ │ │ │ │ ├── operators.hpp │ │ │ │ │ ├── overload_resolution.hpp │ │ │ │ │ ├── pp_counter.hpp │ │ │ │ │ ├── preprocessor.hpp │ │ │ │ │ ├── static_constant.hpp │ │ │ │ │ ├── ttp.hpp │ │ │ │ │ ├── use_preprocessed.hpp │ │ │ │ │ └── workaround.hpp │ │ │ │ ├── count_args.hpp │ │ │ │ ├── find_if_pred.hpp │ │ │ │ ├── fold_impl.hpp │ │ │ │ ├── fold_impl_body.hpp │ │ │ │ ├── full_lambda.hpp │ │ │ │ ├── has_apply.hpp │ │ │ │ ├── has_begin.hpp │ │ │ │ ├── has_key_impl.hpp │ │ │ │ ├── has_rebind.hpp │ │ │ │ ├── has_size.hpp │ │ │ │ ├── has_tag.hpp │ │ │ │ ├── has_type.hpp │ │ │ │ ├── include_preprocessed.hpp │ │ │ │ ├── insert_impl.hpp │ │ │ │ ├── integral_wrapper.hpp │ │ │ │ ├── is_msvc_eti_arg.hpp │ │ │ │ ├── iter_apply.hpp │ │ │ │ ├── iter_fold_if_impl.hpp │ │ │ │ ├── lambda_arity_param.hpp │ │ │ │ ├── lambda_no_ctps.hpp │ │ │ │ ├── lambda_spec.hpp │ │ │ │ ├── lambda_support.hpp │ │ │ │ ├── logical_op.hpp │ │ │ │ ├── msvc_dtw.hpp │ │ │ │ ├── msvc_eti_base.hpp │ │ │ │ ├── msvc_is_class.hpp │ │ │ │ ├── msvc_never_true.hpp │ │ │ │ ├── msvc_type.hpp │ │ │ │ ├── na.hpp │ │ │ │ ├── na_assert.hpp │ │ │ │ ├── na_fwd.hpp │ │ │ │ ├── na_spec.hpp │ │ │ │ ├── nested_type_wknd.hpp │ │ │ │ ├── nttp_decl.hpp │ │ │ │ ├── overload_names.hpp │ │ │ │ ├── preprocessed/ │ │ │ │ │ ├── bcc/ │ │ │ │ │ │ ├── advance_backward.hpp │ │ │ │ │ │ ├── advance_forward.hpp │ │ │ │ │ │ ├── and.hpp │ │ │ │ │ │ ├── apply.hpp │ │ │ │ │ │ ├── apply_fwd.hpp │ │ │ │ │ │ ├── apply_wrap.hpp │ │ │ │ │ │ ├── arg.hpp │ │ │ │ │ │ ├── basic_bind.hpp │ │ │ │ │ │ ├── bind.hpp │ │ │ │ │ │ ├── bind_fwd.hpp │ │ │ │ │ │ ├── bitand.hpp │ │ │ │ │ │ ├── bitor.hpp │ │ │ │ │ │ ├── bitxor.hpp │ │ │ │ │ │ ├── deque.hpp │ │ │ │ │ │ ├── divides.hpp │ │ │ │ │ │ ├── equal_to.hpp │ │ │ │ │ │ ├── fold_impl.hpp │ │ │ │ │ │ ├── full_lambda.hpp │ │ │ │ │ │ ├── greater.hpp │ │ │ │ │ │ ├── greater_equal.hpp │ │ │ │ │ │ ├── inherit.hpp │ │ │ │ │ │ ├── iter_fold_if_impl.hpp │ │ │ │ │ │ ├── iter_fold_impl.hpp │ │ │ │ │ │ ├── lambda_no_ctps.hpp │ │ │ │ │ │ ├── less.hpp │ │ │ │ │ │ ├── less_equal.hpp │ │ │ │ │ │ ├── list.hpp │ │ │ │ │ │ ├── list_c.hpp │ │ │ │ │ │ ├── map.hpp │ │ │ │ │ │ ├── minus.hpp │ │ │ │ │ │ ├── modulus.hpp │ │ │ │ │ │ ├── not_equal_to.hpp │ │ │ │ │ │ ├── or.hpp │ │ │ │ │ │ ├── placeholders.hpp │ │ │ │ │ │ ├── plus.hpp │ │ │ │ │ │ ├── quote.hpp │ │ │ │ │ │ ├── reverse_fold_impl.hpp │ │ │ │ │ │ ├── reverse_iter_fold_impl.hpp │ │ │ │ │ │ ├── set.hpp │ │ │ │ │ │ ├── set_c.hpp │ │ │ │ │ │ ├── shift_left.hpp │ │ │ │ │ │ ├── shift_right.hpp │ │ │ │ │ │ ├── template_arity.hpp │ │ │ │ │ │ ├── times.hpp │ │ │ │ │ │ ├── unpack_args.hpp │ │ │ │ │ │ ├── vector.hpp │ │ │ │ │ │ └── vector_c.hpp │ │ │ │ │ ├── bcc551/ │ │ │ │ │ │ ├── advance_backward.hpp │ │ │ │ │ │ ├── advance_forward.hpp │ │ │ │ │ │ ├── and.hpp │ │ │ │ │ │ ├── apply.hpp │ │ │ │ │ │ ├── apply_fwd.hpp │ │ │ │ │ │ ├── apply_wrap.hpp │ │ │ │ │ │ ├── arg.hpp │ │ │ │ │ │ ├── basic_bind.hpp │ │ │ │ │ │ ├── bind.hpp │ │ │ │ │ │ ├── bind_fwd.hpp │ │ │ │ │ │ ├── bitand.hpp │ │ │ │ │ │ ├── bitor.hpp │ │ │ │ │ │ ├── bitxor.hpp │ │ │ │ │ │ ├── deque.hpp │ │ │ │ │ │ ├── divides.hpp │ │ │ │ │ │ ├── equal_to.hpp │ │ │ │ │ │ ├── fold_impl.hpp │ │ │ │ │ │ ├── full_lambda.hpp │ │ │ │ │ │ ├── greater.hpp │ │ │ │ │ │ ├── greater_equal.hpp │ │ │ │ │ │ ├── inherit.hpp │ │ │ │ │ │ ├── iter_fold_if_impl.hpp │ │ │ │ │ │ ├── iter_fold_impl.hpp │ │ │ │ │ │ ├── lambda_no_ctps.hpp │ │ │ │ │ │ ├── less.hpp │ │ │ │ │ │ ├── less_equal.hpp │ │ │ │ │ │ ├── list.hpp │ │ │ │ │ │ ├── list_c.hpp │ │ │ │ │ │ ├── map.hpp │ │ │ │ │ │ ├── minus.hpp │ │ │ │ │ │ ├── modulus.hpp │ │ │ │ │ │ ├── not_equal_to.hpp │ │ │ │ │ │ ├── or.hpp │ │ │ │ │ │ ├── placeholders.hpp │ │ │ │ │ │ ├── plus.hpp │ │ │ │ │ │ ├── quote.hpp │ │ │ │ │ │ ├── reverse_fold_impl.hpp │ │ │ │ │ │ ├── reverse_iter_fold_impl.hpp │ │ │ │ │ │ ├── set.hpp │ │ │ │ │ │ ├── set_c.hpp │ │ │ │ │ │ ├── shift_left.hpp │ │ │ │ │ │ ├── shift_right.hpp │ │ │ │ │ │ ├── template_arity.hpp │ │ │ │ │ │ ├── times.hpp │ │ │ │ │ │ ├── unpack_args.hpp │ │ │ │ │ │ ├── vector.hpp │ │ │ │ │ │ └── vector_c.hpp │ │ │ │ │ ├── bcc_pre590/ │ │ │ │ │ │ ├── advance_backward.hpp │ │ │ │ │ │ ├── advance_forward.hpp │ │ │ │ │ │ ├── and.hpp │ │ │ │ │ │ ├── apply.hpp │ │ │ │ │ │ ├── apply_fwd.hpp │ │ │ │ │ │ ├── apply_wrap.hpp │ │ │ │ │ │ ├── arg.hpp │ │ │ │ │ │ ├── basic_bind.hpp │ │ │ │ │ │ ├── bind.hpp │ │ │ │ │ │ ├── bind_fwd.hpp │ │ │ │ │ │ ├── bitand.hpp │ │ │ │ │ │ ├── bitor.hpp │ │ │ │ │ │ ├── bitxor.hpp │ │ │ │ │ │ ├── deque.hpp │ │ │ │ │ │ ├── divides.hpp │ │ │ │ │ │ ├── equal_to.hpp │ │ │ │ │ │ ├── fold_impl.hpp │ │ │ │ │ │ ├── full_lambda.hpp │ │ │ │ │ │ ├── greater.hpp │ │ │ │ │ │ ├── greater_equal.hpp │ │ │ │ │ │ ├── inherit.hpp │ │ │ │ │ │ ├── iter_fold_if_impl.hpp │ │ │ │ │ │ ├── iter_fold_impl.hpp │ │ │ │ │ │ ├── lambda_no_ctps.hpp │ │ │ │ │ │ ├── less.hpp │ │ │ │ │ │ ├── less_equal.hpp │ │ │ │ │ │ ├── list.hpp │ │ │ │ │ │ ├── list_c.hpp │ │ │ │ │ │ ├── map.hpp │ │ │ │ │ │ ├── minus.hpp │ │ │ │ │ │ ├── modulus.hpp │ │ │ │ │ │ ├── not_equal_to.hpp │ │ │ │ │ │ ├── or.hpp │ │ │ │ │ │ ├── placeholders.hpp │ │ │ │ │ │ ├── plus.hpp │ │ │ │ │ │ ├── quote.hpp │ │ │ │ │ │ ├── reverse_fold_impl.hpp │ │ │ │ │ │ ├── reverse_iter_fold_impl.hpp │ │ │ │ │ │ ├── set.hpp │ │ │ │ │ │ ├── set_c.hpp │ │ │ │ │ │ ├── shift_left.hpp │ │ │ │ │ │ ├── shift_right.hpp │ │ │ │ │ │ ├── template_arity.hpp │ │ │ │ │ │ ├── times.hpp │ │ │ │ │ │ ├── unpack_args.hpp │ │ │ │ │ │ ├── vector.hpp │ │ │ │ │ │ └── vector_c.hpp │ │ │ │ │ ├── dmc/ │ │ │ │ │ │ ├── advance_backward.hpp │ │ │ │ │ │ ├── advance_forward.hpp │ │ │ │ │ │ ├── and.hpp │ │ │ │ │ │ ├── apply.hpp │ │ │ │ │ │ ├── apply_fwd.hpp │ │ │ │ │ │ ├── apply_wrap.hpp │ │ │ │ │ │ ├── arg.hpp │ │ │ │ │ │ ├── basic_bind.hpp │ │ │ │ │ │ ├── bind.hpp │ │ │ │ │ │ ├── bind_fwd.hpp │ │ │ │ │ │ ├── bitand.hpp │ │ │ │ │ │ ├── bitor.hpp │ │ │ │ │ │ ├── bitxor.hpp │ │ │ │ │ │ ├── deque.hpp │ │ │ │ │ │ ├── divides.hpp │ │ │ │ │ │ ├── equal_to.hpp │ │ │ │ │ │ ├── fold_impl.hpp │ │ │ │ │ │ ├── full_lambda.hpp │ │ │ │ │ │ ├── greater.hpp │ │ │ │ │ │ ├── greater_equal.hpp │ │ │ │ │ │ ├── inherit.hpp │ │ │ │ │ │ ├── iter_fold_if_impl.hpp │ │ │ │ │ │ ├── iter_fold_impl.hpp │ │ │ │ │ │ ├── lambda_no_ctps.hpp │ │ │ │ │ │ ├── less.hpp │ │ │ │ │ │ ├── less_equal.hpp │ │ │ │ │ │ ├── list.hpp │ │ │ │ │ │ ├── list_c.hpp │ │ │ │ │ │ ├── map.hpp │ │ │ │ │ │ ├── minus.hpp │ │ │ │ │ │ ├── modulus.hpp │ │ │ │ │ │ ├── not_equal_to.hpp │ │ │ │ │ │ ├── or.hpp │ │ │ │ │ │ ├── placeholders.hpp │ │ │ │ │ │ ├── plus.hpp │ │ │ │ │ │ ├── quote.hpp │ │ │ │ │ │ ├── reverse_fold_impl.hpp │ │ │ │ │ │ ├── reverse_iter_fold_impl.hpp │ │ │ │ │ │ ├── set.hpp │ │ │ │ │ │ ├── set_c.hpp │ │ │ │ │ │ ├── shift_left.hpp │ │ │ │ │ │ ├── shift_right.hpp │ │ │ │ │ │ ├── template_arity.hpp │ │ │ │ │ │ ├── times.hpp │ │ │ │ │ │ ├── unpack_args.hpp │ │ │ │ │ │ ├── vector.hpp │ │ │ │ │ │ └── vector_c.hpp │ │ │ │ │ ├── gcc/ │ │ │ │ │ │ ├── advance_backward.hpp │ │ │ │ │ │ ├── advance_forward.hpp │ │ │ │ │ │ ├── and.hpp │ │ │ │ │ │ ├── apply.hpp │ │ │ │ │ │ ├── apply_fwd.hpp │ │ │ │ │ │ ├── apply_wrap.hpp │ │ │ │ │ │ ├── arg.hpp │ │ │ │ │ │ ├── basic_bind.hpp │ │ │ │ │ │ ├── bind.hpp │ │ │ │ │ │ ├── bind_fwd.hpp │ │ │ │ │ │ ├── bitand.hpp │ │ │ │ │ │ ├── bitor.hpp │ │ │ │ │ │ ├── bitxor.hpp │ │ │ │ │ │ ├── deque.hpp │ │ │ │ │ │ ├── divides.hpp │ │ │ │ │ │ ├── equal_to.hpp │ │ │ │ │ │ ├── fold_impl.hpp │ │ │ │ │ │ ├── full_lambda.hpp │ │ │ │ │ │ ├── greater.hpp │ │ │ │ │ │ ├── greater_equal.hpp │ │ │ │ │ │ ├── inherit.hpp │ │ │ │ │ │ ├── iter_fold_if_impl.hpp │ │ │ │ │ │ ├── iter_fold_impl.hpp │ │ │ │ │ │ ├── lambda_no_ctps.hpp │ │ │ │ │ │ ├── less.hpp │ │ │ │ │ │ ├── less_equal.hpp │ │ │ │ │ │ ├── list.hpp │ │ │ │ │ │ ├── list_c.hpp │ │ │ │ │ │ ├── map.hpp │ │ │ │ │ │ ├── minus.hpp │ │ │ │ │ │ ├── modulus.hpp │ │ │ │ │ │ ├── not_equal_to.hpp │ │ │ │ │ │ ├── or.hpp │ │ │ │ │ │ ├── placeholders.hpp │ │ │ │ │ │ ├── plus.hpp │ │ │ │ │ │ ├── quote.hpp │ │ │ │ │ │ ├── reverse_fold_impl.hpp │ │ │ │ │ │ ├── reverse_iter_fold_impl.hpp │ │ │ │ │ │ ├── set.hpp │ │ │ │ │ │ ├── set_c.hpp │ │ │ │ │ │ ├── shift_left.hpp │ │ │ │ │ │ ├── shift_right.hpp │ │ │ │ │ │ ├── template_arity.hpp │ │ │ │ │ │ ├── times.hpp │ │ │ │ │ │ ├── unpack_args.hpp │ │ │ │ │ │ ├── vector.hpp │ │ │ │ │ │ └── vector_c.hpp │ │ │ │ │ ├── msvc60/ │ │ │ │ │ │ ├── advance_backward.hpp │ │ │ │ │ │ ├── advance_forward.hpp │ │ │ │ │ │ ├── and.hpp │ │ │ │ │ │ ├── apply.hpp │ │ │ │ │ │ ├── apply_fwd.hpp │ │ │ │ │ │ ├── apply_wrap.hpp │ │ │ │ │ │ ├── arg.hpp │ │ │ │ │ │ ├── basic_bind.hpp │ │ │ │ │ │ ├── bind.hpp │ │ │ │ │ │ ├── bind_fwd.hpp │ │ │ │ │ │ ├── bitand.hpp │ │ │ │ │ │ ├── bitor.hpp │ │ │ │ │ │ ├── bitxor.hpp │ │ │ │ │ │ ├── deque.hpp │ │ │ │ │ │ ├── divides.hpp │ │ │ │ │ │ ├── equal_to.hpp │ │ │ │ │ │ ├── fold_impl.hpp │ │ │ │ │ │ ├── full_lambda.hpp │ │ │ │ │ │ ├── greater.hpp │ │ │ │ │ │ ├── greater_equal.hpp │ │ │ │ │ │ ├── inherit.hpp │ │ │ │ │ │ ├── iter_fold_if_impl.hpp │ │ │ │ │ │ ├── iter_fold_impl.hpp │ │ │ │ │ │ ├── lambda_no_ctps.hpp │ │ │ │ │ │ ├── less.hpp │ │ │ │ │ │ ├── less_equal.hpp │ │ │ │ │ │ ├── list.hpp │ │ │ │ │ │ ├── list_c.hpp │ │ │ │ │ │ ├── map.hpp │ │ │ │ │ │ ├── minus.hpp │ │ │ │ │ │ ├── modulus.hpp │ │ │ │ │ │ ├── not_equal_to.hpp │ │ │ │ │ │ ├── or.hpp │ │ │ │ │ │ ├── placeholders.hpp │ │ │ │ │ │ ├── plus.hpp │ │ │ │ │ │ ├── quote.hpp │ │ │ │ │ │ ├── reverse_fold_impl.hpp │ │ │ │ │ │ ├── reverse_iter_fold_impl.hpp │ │ │ │ │ │ ├── set.hpp │ │ │ │ │ │ ├── set_c.hpp │ │ │ │ │ │ ├── shift_left.hpp │ │ │ │ │ │ ├── shift_right.hpp │ │ │ │ │ │ ├── template_arity.hpp │ │ │ │ │ │ ├── times.hpp │ │ │ │ │ │ ├── unpack_args.hpp │ │ │ │ │ │ ├── vector.hpp │ │ │ │ │ │ └── vector_c.hpp │ │ │ │ │ ├── msvc70/ │ │ │ │ │ │ ├── advance_backward.hpp │ │ │ │ │ │ ├── advance_forward.hpp │ │ │ │ │ │ ├── and.hpp │ │ │ │ │ │ ├── apply.hpp │ │ │ │ │ │ ├── apply_fwd.hpp │ │ │ │ │ │ ├── apply_wrap.hpp │ │ │ │ │ │ ├── arg.hpp │ │ │ │ │ │ ├── basic_bind.hpp │ │ │ │ │ │ ├── bind.hpp │ │ │ │ │ │ ├── bind_fwd.hpp │ │ │ │ │ │ ├── bitand.hpp │ │ │ │ │ │ ├── bitor.hpp │ │ │ │ │ │ ├── bitxor.hpp │ │ │ │ │ │ ├── deque.hpp │ │ │ │ │ │ ├── divides.hpp │ │ │ │ │ │ ├── equal_to.hpp │ │ │ │ │ │ ├── fold_impl.hpp │ │ │ │ │ │ ├── full_lambda.hpp │ │ │ │ │ │ ├── greater.hpp │ │ │ │ │ │ ├── greater_equal.hpp │ │ │ │ │ │ ├── inherit.hpp │ │ │ │ │ │ ├── iter_fold_if_impl.hpp │ │ │ │ │ │ ├── iter_fold_impl.hpp │ │ │ │ │ │ ├── lambda_no_ctps.hpp │ │ │ │ │ │ ├── less.hpp │ │ │ │ │ │ ├── less_equal.hpp │ │ │ │ │ │ ├── list.hpp │ │ │ │ │ │ ├── list_c.hpp │ │ │ │ │ │ ├── map.hpp │ │ │ │ │ │ ├── minus.hpp │ │ │ │ │ │ ├── modulus.hpp │ │ │ │ │ │ ├── not_equal_to.hpp │ │ │ │ │ │ ├── or.hpp │ │ │ │ │ │ ├── placeholders.hpp │ │ │ │ │ │ ├── plus.hpp │ │ │ │ │ │ ├── quote.hpp │ │ │ │ │ │ ├── reverse_fold_impl.hpp │ │ │ │ │ │ ├── reverse_iter_fold_impl.hpp │ │ │ │ │ │ ├── set.hpp │ │ │ │ │ │ ├── set_c.hpp │ │ │ │ │ │ ├── shift_left.hpp │ │ │ │ │ │ ├── shift_right.hpp │ │ │ │ │ │ ├── template_arity.hpp │ │ │ │ │ │ ├── times.hpp │ │ │ │ │ │ ├── unpack_args.hpp │ │ │ │ │ │ ├── vector.hpp │ │ │ │ │ │ └── vector_c.hpp │ │ │ │ │ ├── mwcw/ │ │ │ │ │ │ ├── advance_backward.hpp │ │ │ │ │ │ ├── advance_forward.hpp │ │ │ │ │ │ ├── and.hpp │ │ │ │ │ │ ├── apply.hpp │ │ │ │ │ │ ├── apply_fwd.hpp │ │ │ │ │ │ ├── apply_wrap.hpp │ │ │ │ │ │ ├── arg.hpp │ │ │ │ │ │ ├── basic_bind.hpp │ │ │ │ │ │ ├── bind.hpp │ │ │ │ │ │ ├── bind_fwd.hpp │ │ │ │ │ │ ├── bitand.hpp │ │ │ │ │ │ ├── bitor.hpp │ │ │ │ │ │ ├── bitxor.hpp │ │ │ │ │ │ ├── deque.hpp │ │ │ │ │ │ ├── divides.hpp │ │ │ │ │ │ ├── equal_to.hpp │ │ │ │ │ │ ├── fold_impl.hpp │ │ │ │ │ │ ├── full_lambda.hpp │ │ │ │ │ │ ├── greater.hpp │ │ │ │ │ │ ├── greater_equal.hpp │ │ │ │ │ │ ├── inherit.hpp │ │ │ │ │ │ ├── iter_fold_if_impl.hpp │ │ │ │ │ │ ├── iter_fold_impl.hpp │ │ │ │ │ │ ├── lambda_no_ctps.hpp │ │ │ │ │ │ ├── less.hpp │ │ │ │ │ │ ├── less_equal.hpp │ │ │ │ │ │ ├── list.hpp │ │ │ │ │ │ ├── list_c.hpp │ │ │ │ │ │ ├── map.hpp │ │ │ │ │ │ ├── minus.hpp │ │ │ │ │ │ ├── modulus.hpp │ │ │ │ │ │ ├── not_equal_to.hpp │ │ │ │ │ │ ├── or.hpp │ │ │ │ │ │ ├── placeholders.hpp │ │ │ │ │ │ ├── plus.hpp │ │ │ │ │ │ ├── quote.hpp │ │ │ │ │ │ ├── reverse_fold_impl.hpp │ │ │ │ │ │ ├── reverse_iter_fold_impl.hpp │ │ │ │ │ │ ├── set.hpp │ │ │ │ │ │ ├── set_c.hpp │ │ │ │ │ │ ├── shift_left.hpp │ │ │ │ │ │ ├── shift_right.hpp │ │ │ │ │ │ ├── template_arity.hpp │ │ │ │ │ │ ├── times.hpp │ │ │ │ │ │ ├── unpack_args.hpp │ │ │ │ │ │ ├── vector.hpp │ │ │ │ │ │ └── vector_c.hpp │ │ │ │ │ ├── no_ctps/ │ │ │ │ │ │ ├── advance_backward.hpp │ │ │ │ │ │ ├── advance_forward.hpp │ │ │ │ │ │ ├── and.hpp │ │ │ │ │ │ ├── apply.hpp │ │ │ │ │ │ ├── apply_fwd.hpp │ │ │ │ │ │ ├── apply_wrap.hpp │ │ │ │ │ │ ├── arg.hpp │ │ │ │ │ │ ├── basic_bind.hpp │ │ │ │ │ │ ├── bind.hpp │ │ │ │ │ │ ├── bind_fwd.hpp │ │ │ │ │ │ ├── bitand.hpp │ │ │ │ │ │ ├── bitor.hpp │ │ │ │ │ │ ├── bitxor.hpp │ │ │ │ │ │ ├── deque.hpp │ │ │ │ │ │ ├── divides.hpp │ │ │ │ │ │ ├── equal_to.hpp │ │ │ │ │ │ ├── fold_impl.hpp │ │ │ │ │ │ ├── full_lambda.hpp │ │ │ │ │ │ ├── greater.hpp │ │ │ │ │ │ ├── greater_equal.hpp │ │ │ │ │ │ ├── inherit.hpp │ │ │ │ │ │ ├── iter_fold_if_impl.hpp │ │ │ │ │ │ ├── iter_fold_impl.hpp │ │ │ │ │ │ ├── lambda_no_ctps.hpp │ │ │ │ │ │ ├── less.hpp │ │ │ │ │ │ ├── less_equal.hpp │ │ │ │ │ │ ├── list.hpp │ │ │ │ │ │ ├── list_c.hpp │ │ │ │ │ │ ├── map.hpp │ │ │ │ │ │ ├── minus.hpp │ │ │ │ │ │ ├── modulus.hpp │ │ │ │ │ │ ├── not_equal_to.hpp │ │ │ │ │ │ ├── or.hpp │ │ │ │ │ │ ├── placeholders.hpp │ │ │ │ │ │ ├── plus.hpp │ │ │ │ │ │ ├── quote.hpp │ │ │ │ │ │ ├── reverse_fold_impl.hpp │ │ │ │ │ │ ├── reverse_iter_fold_impl.hpp │ │ │ │ │ │ ├── set.hpp │ │ │ │ │ │ ├── set_c.hpp │ │ │ │ │ │ ├── shift_left.hpp │ │ │ │ │ │ ├── shift_right.hpp │ │ │ │ │ │ ├── template_arity.hpp │ │ │ │ │ │ ├── times.hpp │ │ │ │ │ │ ├── unpack_args.hpp │ │ │ │ │ │ ├── vector.hpp │ │ │ │ │ │ └── vector_c.hpp │ │ │ │ │ ├── no_ttp/ │ │ │ │ │ │ ├── advance_backward.hpp │ │ │ │ │ │ ├── advance_forward.hpp │ │ │ │ │ │ ├── and.hpp │ │ │ │ │ │ ├── apply.hpp │ │ │ │ │ │ ├── apply_fwd.hpp │ │ │ │ │ │ ├── apply_wrap.hpp │ │ │ │ │ │ ├── arg.hpp │ │ │ │ │ │ ├── basic_bind.hpp │ │ │ │ │ │ ├── bind.hpp │ │ │ │ │ │ ├── bind_fwd.hpp │ │ │ │ │ │ ├── bitand.hpp │ │ │ │ │ │ ├── bitor.hpp │ │ │ │ │ │ ├── bitxor.hpp │ │ │ │ │ │ ├── deque.hpp │ │ │ │ │ │ ├── divides.hpp │ │ │ │ │ │ ├── equal_to.hpp │ │ │ │ │ │ ├── fold_impl.hpp │ │ │ │ │ │ ├── full_lambda.hpp │ │ │ │ │ │ ├── greater.hpp │ │ │ │ │ │ ├── greater_equal.hpp │ │ │ │ │ │ ├── inherit.hpp │ │ │ │ │ │ ├── iter_fold_if_impl.hpp │ │ │ │ │ │ ├── iter_fold_impl.hpp │ │ │ │ │ │ ├── lambda_no_ctps.hpp │ │ │ │ │ │ ├── less.hpp │ │ │ │ │ │ ├── less_equal.hpp │ │ │ │ │ │ ├── list.hpp │ │ │ │ │ │ ├── list_c.hpp │ │ │ │ │ │ ├── map.hpp │ │ │ │ │ │ ├── minus.hpp │ │ │ │ │ │ ├── modulus.hpp │ │ │ │ │ │ ├── not_equal_to.hpp │ │ │ │ │ │ ├── or.hpp │ │ │ │ │ │ ├── placeholders.hpp │ │ │ │ │ │ ├── plus.hpp │ │ │ │ │ │ ├── quote.hpp │ │ │ │ │ │ ├── reverse_fold_impl.hpp │ │ │ │ │ │ ├── reverse_iter_fold_impl.hpp │ │ │ │ │ │ ├── set.hpp │ │ │ │ │ │ ├── set_c.hpp │ │ │ │ │ │ ├── shift_left.hpp │ │ │ │ │ │ ├── shift_right.hpp │ │ │ │ │ │ ├── template_arity.hpp │ │ │ │ │ │ ├── times.hpp │ │ │ │ │ │ ├── unpack_args.hpp │ │ │ │ │ │ ├── vector.hpp │ │ │ │ │ │ └── vector_c.hpp │ │ │ │ │ └── plain/ │ │ │ │ │ ├── advance_backward.hpp │ │ │ │ │ ├── advance_forward.hpp │ │ │ │ │ ├── and.hpp │ │ │ │ │ ├── apply.hpp │ │ │ │ │ ├── apply_fwd.hpp │ │ │ │ │ ├── apply_wrap.hpp │ │ │ │ │ ├── arg.hpp │ │ │ │ │ ├── basic_bind.hpp │ │ │ │ │ ├── bind.hpp │ │ │ │ │ ├── bind_fwd.hpp │ │ │ │ │ ├── bitand.hpp │ │ │ │ │ ├── bitor.hpp │ │ │ │ │ ├── bitxor.hpp │ │ │ │ │ ├── deque.hpp │ │ │ │ │ ├── divides.hpp │ │ │ │ │ ├── equal_to.hpp │ │ │ │ │ ├── fold_impl.hpp │ │ │ │ │ ├── full_lambda.hpp │ │ │ │ │ ├── greater.hpp │ │ │ │ │ ├── greater_equal.hpp │ │ │ │ │ ├── inherit.hpp │ │ │ │ │ ├── iter_fold_if_impl.hpp │ │ │ │ │ ├── iter_fold_impl.hpp │ │ │ │ │ ├── lambda_no_ctps.hpp │ │ │ │ │ ├── less.hpp │ │ │ │ │ ├── less_equal.hpp │ │ │ │ │ ├── list.hpp │ │ │ │ │ ├── list_c.hpp │ │ │ │ │ ├── map.hpp │ │ │ │ │ ├── minus.hpp │ │ │ │ │ ├── modulus.hpp │ │ │ │ │ ├── not_equal_to.hpp │ │ │ │ │ ├── or.hpp │ │ │ │ │ ├── placeholders.hpp │ │ │ │ │ ├── plus.hpp │ │ │ │ │ ├── quote.hpp │ │ │ │ │ ├── reverse_fold_impl.hpp │ │ │ │ │ ├── reverse_iter_fold_impl.hpp │ │ │ │ │ ├── set.hpp │ │ │ │ │ ├── set_c.hpp │ │ │ │ │ ├── shift_left.hpp │ │ │ │ │ ├── shift_right.hpp │ │ │ │ │ ├── template_arity.hpp │ │ │ │ │ ├── times.hpp │ │ │ │ │ ├── unpack_args.hpp │ │ │ │ │ ├── vector.hpp │ │ │ │ │ └── vector_c.hpp │ │ │ │ ├── preprocessor/ │ │ │ │ │ ├── add.hpp │ │ │ │ │ ├── def_params_tail.hpp │ │ │ │ │ ├── default_params.hpp │ │ │ │ │ ├── enum.hpp │ │ │ │ │ ├── ext_params.hpp │ │ │ │ │ ├── filter_params.hpp │ │ │ │ │ ├── params.hpp │ │ │ │ │ ├── partial_spec_params.hpp │ │ │ │ │ ├── range.hpp │ │ │ │ │ ├── repeat.hpp │ │ │ │ │ ├── sub.hpp │ │ │ │ │ └── tuple.hpp │ │ │ │ ├── ptr_to_ref.hpp │ │ │ │ ├── push_front_impl.hpp │ │ │ │ ├── reverse_fold_impl.hpp │ │ │ │ ├── reverse_fold_impl_body.hpp │ │ │ │ ├── sequence_wrapper.hpp │ │ │ │ ├── static_cast.hpp │ │ │ │ ├── template_arity.hpp │ │ │ │ ├── template_arity_fwd.hpp │ │ │ │ ├── traits_lambda_spec.hpp │ │ │ │ ├── type_wrapper.hpp │ │ │ │ ├── value_wknd.hpp │ │ │ │ └── yes_no.hpp │ │ │ ├── base.hpp │ │ │ ├── begin.hpp │ │ │ ├── begin_end.hpp │ │ │ ├── begin_end_fwd.hpp │ │ │ ├── bind.hpp │ │ │ ├── bind_fwd.hpp │ │ │ ├── bool.hpp │ │ │ ├── bool_fwd.hpp │ │ │ ├── clear.hpp │ │ │ ├── clear_fwd.hpp │ │ │ ├── deref.hpp │ │ │ ├── empty_fwd.hpp │ │ │ ├── end.hpp │ │ │ ├── erase_fwd.hpp │ │ │ ├── erase_key_fwd.hpp │ │ │ ├── eval_if.hpp │ │ │ ├── find.hpp │ │ │ ├── find_if.hpp │ │ │ ├── fold.hpp │ │ │ ├── front_fwd.hpp │ │ │ ├── has_key.hpp │ │ │ ├── has_key_fwd.hpp │ │ │ ├── has_xxx.hpp │ │ │ ├── identity.hpp │ │ │ ├── if.hpp │ │ │ ├── insert.hpp │ │ │ ├── insert_fwd.hpp │ │ │ ├── insert_range_fwd.hpp │ │ │ ├── int.hpp │ │ │ ├── int_fwd.hpp │ │ │ ├── integral_c.hpp │ │ │ ├── integral_c_fwd.hpp │ │ │ ├── integral_c_tag.hpp │ │ │ ├── is_placeholder.hpp │ │ │ ├── iter_fold_if.hpp │ │ │ ├── iterator_range.hpp │ │ │ ├── iterator_tags.hpp │ │ │ ├── key_type_fwd.hpp │ │ │ ├── lambda.hpp │ │ │ ├── lambda_fwd.hpp │ │ │ ├── limits/ │ │ │ │ ├── arity.hpp │ │ │ │ ├── list.hpp │ │ │ │ └── unrolling.hpp │ │ │ ├── list/ │ │ │ │ ├── aux_/ │ │ │ │ │ ├── O1_size.hpp │ │ │ │ │ ├── begin_end.hpp │ │ │ │ │ ├── clear.hpp │ │ │ │ │ ├── empty.hpp │ │ │ │ │ ├── front.hpp │ │ │ │ │ ├── include_preprocessed.hpp │ │ │ │ │ ├── item.hpp │ │ │ │ │ ├── iterator.hpp │ │ │ │ │ ├── numbered.hpp │ │ │ │ │ ├── numbered_c.hpp │ │ │ │ │ ├── pop_front.hpp │ │ │ │ │ ├── preprocessed/ │ │ │ │ │ │ └── plain/ │ │ │ │ │ │ ├── list10.hpp │ │ │ │ │ │ ├── list10_c.hpp │ │ │ │ │ │ ├── list20.hpp │ │ │ │ │ │ ├── list20_c.hpp │ │ │ │ │ │ ├── list30.hpp │ │ │ │ │ │ ├── list30_c.hpp │ │ │ │ │ │ ├── list40.hpp │ │ │ │ │ │ ├── list40_c.hpp │ │ │ │ │ │ ├── list50.hpp │ │ │ │ │ │ └── list50_c.hpp │ │ │ │ │ ├── push_back.hpp │ │ │ │ │ ├── push_front.hpp │ │ │ │ │ ├── size.hpp │ │ │ │ │ └── tag.hpp │ │ │ │ ├── list0.hpp │ │ │ │ ├── list0_c.hpp │ │ │ │ ├── list10.hpp │ │ │ │ ├── list10_c.hpp │ │ │ │ ├── list20.hpp │ │ │ │ ├── list20_c.hpp │ │ │ │ ├── list30.hpp │ │ │ │ ├── list30_c.hpp │ │ │ │ ├── list40.hpp │ │ │ │ ├── list40_c.hpp │ │ │ │ ├── list50.hpp │ │ │ │ └── list50_c.hpp │ │ │ ├── list.hpp │ │ │ ├── logical.hpp │ │ │ ├── long.hpp │ │ │ ├── long_fwd.hpp │ │ │ ├── next.hpp │ │ │ ├── next_prior.hpp │ │ │ ├── not.hpp │ │ │ ├── or.hpp │ │ │ ├── pair.hpp │ │ │ ├── placeholders.hpp │ │ │ ├── pop_front_fwd.hpp │ │ │ ├── prior.hpp │ │ │ ├── protect.hpp │ │ │ ├── push_back_fwd.hpp │ │ │ ├── push_front.hpp │ │ │ ├── push_front_fwd.hpp │ │ │ ├── quote.hpp │ │ │ ├── reverse_fold.hpp │ │ │ ├── same_as.hpp │ │ │ ├── sequence_tag.hpp │ │ │ ├── sequence_tag_fwd.hpp │ │ │ ├── set/ │ │ │ │ ├── aux_/ │ │ │ │ │ ├── at_impl.hpp │ │ │ │ │ ├── begin_end_impl.hpp │ │ │ │ │ ├── clear_impl.hpp │ │ │ │ │ ├── empty_impl.hpp │ │ │ │ │ ├── erase_impl.hpp │ │ │ │ │ ├── erase_key_impl.hpp │ │ │ │ │ ├── has_key_impl.hpp │ │ │ │ │ ├── insert_impl.hpp │ │ │ │ │ ├── insert_range_impl.hpp │ │ │ │ │ ├── item.hpp │ │ │ │ │ ├── iterator.hpp │ │ │ │ │ ├── key_type_impl.hpp │ │ │ │ │ ├── set0.hpp │ │ │ │ │ ├── size_impl.hpp │ │ │ │ │ ├── tag.hpp │ │ │ │ │ └── value_type_impl.hpp │ │ │ │ └── set0.hpp │ │ │ ├── size_fwd.hpp │ │ │ ├── size_t.hpp │ │ │ ├── size_t_fwd.hpp │ │ │ ├── value_type_fwd.hpp │ │ │ ├── void.hpp │ │ │ └── void_fwd.hpp │ │ ├── noncopyable.hpp │ │ ├── parameter/ │ │ │ ├── aux_/ │ │ │ │ ├── arg_list.hpp │ │ │ │ ├── cast.hpp │ │ │ │ ├── default.hpp │ │ │ │ ├── is_maybe.hpp │ │ │ │ ├── overloads.hpp │ │ │ │ ├── parameter_requirements.hpp │ │ │ │ ├── parenthesized_type.hpp │ │ │ │ ├── preprocessor/ │ │ │ │ │ ├── flatten.hpp │ │ │ │ │ └── for_each.hpp │ │ │ │ ├── result_of0.hpp │ │ │ │ ├── set.hpp │ │ │ │ ├── tag.hpp │ │ │ │ ├── tagged_argument.hpp │ │ │ │ ├── template_keyword.hpp │ │ │ │ ├── unwrap_cv_reference.hpp │ │ │ │ ├── void.hpp │ │ │ │ └── yesno.hpp │ │ │ ├── binding.hpp │ │ │ ├── config.hpp │ │ │ ├── keyword.hpp │ │ │ ├── macros.hpp │ │ │ ├── match.hpp │ │ │ ├── name.hpp │ │ │ ├── parameters.hpp │ │ │ ├── preprocessor.hpp │ │ │ └── value_type.hpp │ │ ├── parameter.hpp │ │ ├── preprocessor/ │ │ │ ├── arithmetic/ │ │ │ │ ├── add.hpp │ │ │ │ ├── dec.hpp │ │ │ │ ├── inc.hpp │ │ │ │ └── sub.hpp │ │ │ ├── array/ │ │ │ │ ├── data.hpp │ │ │ │ ├── elem.hpp │ │ │ │ └── size.hpp │ │ │ ├── cat.hpp │ │ │ ├── comma_if.hpp │ │ │ ├── comparison/ │ │ │ │ ├── equal.hpp │ │ │ │ ├── less_equal.hpp │ │ │ │ └── not_equal.hpp │ │ │ ├── config/ │ │ │ │ └── config.hpp │ │ │ ├── control/ │ │ │ │ ├── detail/ │ │ │ │ │ ├── dmc/ │ │ │ │ │ │ └── while.hpp │ │ │ │ │ ├── edg/ │ │ │ │ │ │ └── while.hpp │ │ │ │ │ ├── msvc/ │ │ │ │ │ │ └── while.hpp │ │ │ │ │ └── while.hpp │ │ │ │ ├── expr_if.hpp │ │ │ │ ├── expr_iif.hpp │ │ │ │ ├── if.hpp │ │ │ │ ├── iif.hpp │ │ │ │ └── while.hpp │ │ │ ├── debug/ │ │ │ │ └── error.hpp │ │ │ ├── dec.hpp │ │ │ ├── detail/ │ │ │ │ ├── auto_rec.hpp │ │ │ │ ├── check.hpp │ │ │ │ ├── dmc/ │ │ │ │ │ └── auto_rec.hpp │ │ │ │ ├── is_binary.hpp │ │ │ │ ├── is_nullary.hpp │ │ │ │ └── split.hpp │ │ │ ├── empty.hpp │ │ │ ├── enum.hpp │ │ │ ├── enum_params.hpp │ │ │ ├── enum_params_with_a_default.hpp │ │ │ ├── enum_shifted_params.hpp │ │ │ ├── expr_if.hpp │ │ │ ├── facilities/ │ │ │ │ ├── detail/ │ │ │ │ │ └── is_empty.hpp │ │ │ │ ├── empty.hpp │ │ │ │ ├── expand.hpp │ │ │ │ ├── identity.hpp │ │ │ │ ├── intercept.hpp │ │ │ │ ├── is_1.hpp │ │ │ │ ├── is_empty.hpp │ │ │ │ ├── is_empty_variadic.hpp │ │ │ │ └── overload.hpp │ │ │ ├── for.hpp │ │ │ ├── identity.hpp │ │ │ ├── inc.hpp │ │ │ ├── iterate.hpp │ │ │ ├── iteration/ │ │ │ │ ├── detail/ │ │ │ │ │ ├── bounds/ │ │ │ │ │ │ ├── lower1.hpp │ │ │ │ │ │ ├── lower2.hpp │ │ │ │ │ │ ├── lower3.hpp │ │ │ │ │ │ ├── lower4.hpp │ │ │ │ │ │ ├── lower5.hpp │ │ │ │ │ │ ├── upper1.hpp │ │ │ │ │ │ ├── upper2.hpp │ │ │ │ │ │ ├── upper3.hpp │ │ │ │ │ │ ├── upper4.hpp │ │ │ │ │ │ └── upper5.hpp │ │ │ │ │ ├── finish.hpp │ │ │ │ │ ├── iter/ │ │ │ │ │ │ ├── forward1.hpp │ │ │ │ │ │ ├── forward2.hpp │ │ │ │ │ │ ├── forward3.hpp │ │ │ │ │ │ ├── forward4.hpp │ │ │ │ │ │ ├── forward5.hpp │ │ │ │ │ │ ├── reverse1.hpp │ │ │ │ │ │ ├── reverse2.hpp │ │ │ │ │ │ ├── reverse3.hpp │ │ │ │ │ │ ├── reverse4.hpp │ │ │ │ │ │ └── reverse5.hpp │ │ │ │ │ ├── local.hpp │ │ │ │ │ ├── rlocal.hpp │ │ │ │ │ ├── self.hpp │ │ │ │ │ └── start.hpp │ │ │ │ ├── iterate.hpp │ │ │ │ ├── local.hpp │ │ │ │ └── self.hpp │ │ │ ├── list/ │ │ │ │ ├── adt.hpp │ │ │ │ ├── detail/ │ │ │ │ │ ├── dmc/ │ │ │ │ │ │ └── fold_left.hpp │ │ │ │ │ ├── edg/ │ │ │ │ │ │ ├── fold_left.hpp │ │ │ │ │ │ └── fold_right.hpp │ │ │ │ │ ├── fold_left.hpp │ │ │ │ │ └── fold_right.hpp │ │ │ │ ├── fold_left.hpp │ │ │ │ ├── fold_right.hpp │ │ │ │ ├── for_each_i.hpp │ │ │ │ └── reverse.hpp │ │ │ ├── logical/ │ │ │ │ ├── and.hpp │ │ │ │ ├── bitand.hpp │ │ │ │ ├── bool.hpp │ │ │ │ ├── compl.hpp │ │ │ │ └── not.hpp │ │ │ ├── punctuation/ │ │ │ │ ├── comma.hpp │ │ │ │ ├── comma_if.hpp │ │ │ │ ├── detail/ │ │ │ │ │ └── is_begin_parens.hpp │ │ │ │ └── is_begin_parens.hpp │ │ │ ├── repeat.hpp │ │ │ ├── repetition/ │ │ │ │ ├── deduce_r.hpp │ │ │ │ ├── detail/ │ │ │ │ │ ├── dmc/ │ │ │ │ │ │ └── for.hpp │ │ │ │ │ ├── edg/ │ │ │ │ │ │ └── for.hpp │ │ │ │ │ ├── for.hpp │ │ │ │ │ └── msvc/ │ │ │ │ │ └── for.hpp │ │ │ │ ├── enum.hpp │ │ │ │ ├── enum_binary_params.hpp │ │ │ │ ├── enum_params.hpp │ │ │ │ ├── enum_params_with_a_default.hpp │ │ │ │ ├── enum_shifted.hpp │ │ │ │ ├── enum_shifted_params.hpp │ │ │ │ ├── enum_trailing.hpp │ │ │ │ ├── enum_trailing_params.hpp │ │ │ │ ├── for.hpp │ │ │ │ ├── repeat.hpp │ │ │ │ └── repeat_from_to.hpp │ │ │ ├── selection/ │ │ │ │ └── max.hpp │ │ │ ├── seq/ │ │ │ │ ├── detail/ │ │ │ │ │ ├── is_empty.hpp │ │ │ │ │ └── split.hpp │ │ │ │ ├── elem.hpp │ │ │ │ ├── enum.hpp │ │ │ │ ├── first_n.hpp │ │ │ │ ├── fold_left.hpp │ │ │ │ ├── for_each.hpp │ │ │ │ ├── for_each_i.hpp │ │ │ │ ├── for_each_product.hpp │ │ │ │ ├── push_back.hpp │ │ │ │ ├── rest_n.hpp │ │ │ │ ├── seq.hpp │ │ │ │ ├── size.hpp │ │ │ │ └── subseq.hpp │ │ │ ├── slot/ │ │ │ │ ├── detail/ │ │ │ │ │ ├── counter.hpp │ │ │ │ │ ├── def.hpp │ │ │ │ │ ├── shared.hpp │ │ │ │ │ ├── slot1.hpp │ │ │ │ │ ├── slot2.hpp │ │ │ │ │ ├── slot3.hpp │ │ │ │ │ ├── slot4.hpp │ │ │ │ │ └── slot5.hpp │ │ │ │ └── slot.hpp │ │ │ ├── stringize.hpp │ │ │ ├── tuple/ │ │ │ │ ├── detail/ │ │ │ │ │ └── is_single_return.hpp │ │ │ │ ├── eat.hpp │ │ │ │ ├── elem.hpp │ │ │ │ ├── rem.hpp │ │ │ │ ├── size.hpp │ │ │ │ └── to_list.hpp │ │ │ └── variadic/ │ │ │ ├── elem.hpp │ │ │ └── size.hpp │ │ ├── static_assert.hpp │ │ ├── swap.hpp │ │ ├── throw_exception.hpp │ │ ├── type_traits/ │ │ │ ├── add_const.hpp │ │ │ ├── add_lvalue_reference.hpp │ │ │ ├── add_reference.hpp │ │ │ ├── add_rvalue_reference.hpp │ │ │ ├── add_volatile.hpp │ │ │ ├── conditional.hpp │ │ │ ├── declval.hpp │ │ │ ├── detail/ │ │ │ │ ├── config.hpp │ │ │ │ ├── is_function_ptr_helper.hpp │ │ │ │ ├── is_function_ptr_tester.hpp │ │ │ │ ├── is_mem_fun_pointer_impl.hpp │ │ │ │ ├── is_mem_fun_pointer_tester.hpp │ │ │ │ └── yes_no_type.hpp │ │ │ ├── has_trivial_assign.hpp │ │ │ ├── has_trivial_destructor.hpp │ │ │ ├── integral_constant.hpp │ │ │ ├── intrinsics.hpp │ │ │ ├── is_abstract.hpp │ │ │ ├── is_arithmetic.hpp │ │ │ ├── is_array.hpp │ │ │ ├── is_assignable.hpp │ │ │ ├── is_base_and_derived.hpp │ │ │ ├── is_class.hpp │ │ │ ├── is_const.hpp │ │ │ ├── is_convertible.hpp │ │ │ ├── is_destructible.hpp │ │ │ ├── is_enum.hpp │ │ │ ├── is_floating_point.hpp │ │ │ ├── is_function.hpp │ │ │ ├── is_integral.hpp │ │ │ ├── is_lvalue_reference.hpp │ │ │ ├── is_member_function_pointer.hpp │ │ │ ├── is_member_pointer.hpp │ │ │ ├── is_pod.hpp │ │ │ ├── is_pointer.hpp │ │ │ ├── is_polymorphic.hpp │ │ │ ├── is_reference.hpp │ │ │ ├── is_rvalue_reference.hpp │ │ │ ├── is_same.hpp │ │ │ ├── is_scalar.hpp │ │ │ ├── is_signed.hpp │ │ │ ├── is_union.hpp │ │ │ ├── is_unsigned.hpp │ │ │ ├── is_void.hpp │ │ │ ├── is_volatile.hpp │ │ │ ├── make_signed.hpp │ │ │ ├── remove_const.hpp │ │ │ ├── remove_cv.hpp │ │ │ └── remove_reference.hpp │ │ ├── utility/ │ │ │ ├── declval.hpp │ │ │ ├── detail/ │ │ │ │ └── result_of_iterate.hpp │ │ │ ├── enable_if.hpp │ │ │ └── result_of.hpp │ │ └── version.hpp │ ├── boostqueue.h │ ├── contrib/ │ │ ├── benchmarks.aws-32.log │ │ └── benchmarks.aws-8.log │ ├── cpuid.cpp │ ├── cpuid.h │ ├── dlib/ │ │ ├── algs.h │ │ ├── array/ │ │ │ ├── array_kernel.h │ │ │ ├── array_kernel_abstract.h │ │ │ ├── array_tools.h │ │ │ └── array_tools_abstract.h │ │ ├── array.h │ │ ├── assert.h │ │ ├── binary_search_tree/ │ │ │ ├── binary_search_tree_kernel_1.h │ │ │ ├── binary_search_tree_kernel_2.h │ │ │ ├── binary_search_tree_kernel_abstract.h │ │ │ └── binary_search_tree_kernel_c.h │ │ ├── binary_search_tree.h │ │ ├── bound_function_pointer/ │ │ │ ├── bound_function_pointer_kernel_1.h │ │ │ └── bound_function_pointer_kernel_abstract.h │ │ ├── bound_function_pointer.h │ │ ├── byte_orderer/ │ │ │ ├── byte_orderer_kernel_1.h │ │ │ └── byte_orderer_kernel_abstract.h │ │ ├── byte_orderer.h │ │ ├── cassert │ │ ├── config.h │ │ ├── console_progress_indicator.h │ │ ├── cstring │ │ ├── dlib_basic_cpp_build_tutorial.txt │ │ ├── dlib_include_path_tutorial.txt │ │ ├── enable_if.h │ │ ├── error.h │ │ ├── float_details.h │ │ ├── fstream │ │ ├── hash.h │ │ ├── interfaces/ │ │ │ ├── cmd_line_parser_option.h │ │ │ ├── enumerable.h │ │ │ ├── map_pair.h │ │ │ └── remover.h │ │ ├── iomanip │ │ ├── iosfwd │ │ ├── iostream │ │ ├── is_kind.h │ │ ├── istream │ │ ├── locale │ │ ├── logger/ │ │ │ ├── extra_logger_headers.h │ │ │ ├── logger_config_file.h │ │ │ ├── logger_kernel_1.h │ │ │ └── logger_kernel_abstract.h │ │ ├── logger.h │ │ ├── map/ │ │ │ ├── map_kernel_1.h │ │ │ ├── map_kernel_abstract.h │ │ │ └── map_kernel_c.h │ │ ├── map.h │ │ ├── member_function_pointer/ │ │ │ ├── make_mfp.h │ │ │ ├── make_mfp_abstract.h │ │ │ ├── member_function_pointer_kernel_1.h │ │ │ └── member_function_pointer_kernel_abstract.h │ │ ├── member_function_pointer.h │ │ ├── memory_manager/ │ │ │ ├── memory_manager_kernel_1.h │ │ │ ├── memory_manager_kernel_2.h │ │ │ ├── memory_manager_kernel_3.h │ │ │ └── memory_manager_kernel_abstract.h │ │ ├── memory_manager.h │ │ ├── memory_manager_global/ │ │ │ ├── memory_manager_global_kernel_1.h │ │ │ └── memory_manager_global_kernel_abstract.h │ │ ├── memory_manager_global.h │ │ ├── memory_manager_stateless/ │ │ │ ├── memory_manager_stateless_kernel_1.h │ │ │ ├── memory_manager_stateless_kernel_2.h │ │ │ └── memory_manager_stateless_kernel_abstract.h │ │ ├── memory_manager_stateless.h │ │ ├── metaprogramming.h │ │ ├── misc_api/ │ │ │ ├── misc_api_kernel_1.h │ │ │ ├── misc_api_kernel_2.h │ │ │ ├── misc_api_kernel_abstract.h │ │ │ ├── misc_api_shared.h │ │ │ ├── posix.h │ │ │ └── windows.h │ │ ├── misc_api.h │ │ ├── noncopyable.h │ │ ├── numeric_constants.h │ │ ├── numerical_integration/ │ │ │ ├── integrate_function_adapt_simpson.h │ │ │ └── integrate_function_adapt_simpson_abstract.h │ │ ├── numerical_integration.h │ │ ├── ostream │ │ ├── pipe/ │ │ │ ├── pipe_kernel_1.h │ │ │ └── pipe_kernel_abstract.h │ │ ├── pipe.h │ │ ├── platform.h │ │ ├── queue/ │ │ │ ├── queue_kernel_1.h │ │ │ ├── queue_kernel_2.h │ │ │ ├── queue_kernel_abstract.h │ │ │ ├── queue_kernel_c.h │ │ │ ├── queue_sort_1.h │ │ │ └── queue_sort_abstract.h │ │ ├── queue.h │ │ ├── ref.h │ │ ├── revision.h │ │ ├── serialize.h │ │ ├── set/ │ │ │ ├── set_compare_1.h │ │ │ ├── set_compare_abstract.h │ │ │ ├── set_kernel_1.h │ │ │ ├── set_kernel_abstract.h │ │ │ └── set_kernel_c.h │ │ ├── set.h │ │ ├── sliding_buffer/ │ │ │ ├── circular_buffer.h │ │ │ ├── circular_buffer_abstract.h │ │ │ ├── sliding_buffer_kernel_1.h │ │ │ ├── sliding_buffer_kernel_abstract.h │ │ │ └── sliding_buffer_kernel_c.h │ │ ├── sliding_buffer.h │ │ ├── sockets/ │ │ │ ├── posix.h │ │ │ ├── sockets_extensions.h │ │ │ ├── sockets_extensions_abstract.h │ │ │ ├── sockets_kernel_1.h │ │ │ ├── sockets_kernel_2.h │ │ │ ├── sockets_kernel_abstract.h │ │ │ └── windows.h │ │ ├── sockets.h │ │ ├── sort.h │ │ ├── sparse_vector.h │ │ ├── sstream │ │ ├── stack/ │ │ │ ├── stack_kernel_1.h │ │ │ ├── stack_kernel_abstract.h │ │ │ └── stack_kernel_c.h │ │ ├── stack.h │ │ ├── stack_trace.h │ │ ├── std_allocator.h │ │ ├── stl_checked/ │ │ │ ├── std_vector_c.h │ │ │ └── std_vector_c_abstract.h │ │ ├── stl_checked.h │ │ ├── string/ │ │ │ ├── cassert │ │ │ ├── iomanip │ │ │ ├── iosfwd │ │ │ ├── iostream │ │ │ ├── locale │ │ │ ├── string.h │ │ │ └── string_abstract.h │ │ ├── string.h │ │ ├── test_for_odr_violations.cpp │ │ ├── test_for_odr_violations.h │ │ ├── threads/ │ │ │ ├── async.h │ │ │ ├── async_abstract.h │ │ │ ├── auto_mutex_extension.h │ │ │ ├── auto_mutex_extension_abstract.h │ │ │ ├── auto_unlock_extension.h │ │ │ ├── auto_unlock_extension_abstract.h │ │ │ ├── create_new_thread_extension.h │ │ │ ├── create_new_thread_extension_abstract.h │ │ │ ├── multithreaded_object_extension.h │ │ │ ├── multithreaded_object_extension_abstract.h │ │ │ ├── parallel_for_extension.h │ │ │ ├── parallel_for_extension_abstract.h │ │ │ ├── posix.h │ │ │ ├── read_write_mutex_extension.h │ │ │ ├── read_write_mutex_extension_abstract.h │ │ │ ├── rmutex_extension.h │ │ │ ├── rmutex_extension_abstract.h │ │ │ ├── rsignaler_extension.h │ │ │ ├── rsignaler_extension_abstract.h │ │ │ ├── thread_function_extension.h │ │ │ ├── thread_function_extension_abstract.h │ │ │ ├── thread_pool_extension.h │ │ │ ├── thread_pool_extension_abstract.h │ │ │ ├── thread_specific_data_extension.h │ │ │ ├── thread_specific_data_extension_abstract.h │ │ │ ├── threaded_object_extension.h │ │ │ ├── threaded_object_extension_abstract.h │ │ │ ├── threads_kernel.h │ │ │ ├── threads_kernel_1.h │ │ │ ├── threads_kernel_2.h │ │ │ ├── threads_kernel_abstract.h │ │ │ ├── threads_kernel_shared.h │ │ │ └── windows.h │ │ ├── threads.h │ │ ├── time_this.h │ │ ├── timeout/ │ │ │ ├── timeout.h │ │ │ └── timeout_abstract.h │ │ ├── timeout.h │ │ ├── timer/ │ │ │ ├── timer.h │ │ │ ├── timer_abstract.h │ │ │ └── timer_heavy.h │ │ ├── timer.h │ │ ├── timing.h │ │ ├── tokenizer/ │ │ │ ├── tokenizer_kernel_1.h │ │ │ ├── tokenizer_kernel_abstract.h │ │ │ └── tokenizer_kernel_c.h │ │ ├── tokenizer.h │ │ ├── uintn.h │ │ ├── unicode/ │ │ │ ├── unicode.h │ │ │ └── unicode_abstract.h │ │ ├── unicode.h │ │ ├── unordered_pair.h │ │ ├── vectorstream/ │ │ │ ├── unserialize.h │ │ │ ├── unserialize_abstract.h │ │ │ ├── vectorstream.h │ │ │ └── vectorstream_abstract.h │ │ ├── vectorstream.h │ │ └── windows_magic.h │ ├── dlibqueue.h │ ├── extract_graph_data.py │ ├── lockbasedqueue.h │ ├── makefile │ ├── simplelockfree.h │ ├── stdqueue.h │ ├── tbb/ │ │ ├── COPYING │ │ ├── README.txt │ │ ├── aggregator.h │ │ ├── aligned_space.h │ │ ├── arena.cpp │ │ ├── arena.h │ │ ├── atomic.h │ │ ├── blocked_range.h │ │ ├── blocked_range2d.h │ │ ├── blocked_range3d.h │ │ ├── cache_aligned_allocator.cpp │ │ ├── cache_aligned_allocator.h │ │ ├── cilk-tbb-interop.h │ │ ├── combinable.h │ │ ├── compat/ │ │ │ ├── condition_variable │ │ │ ├── ppl.h │ │ │ ├── thread │ │ │ └── tuple │ │ ├── concurrent_hash_map.cpp │ │ ├── concurrent_hash_map.h │ │ ├── concurrent_lru_cache.h │ │ ├── concurrent_monitor.cpp │ │ ├── concurrent_monitor.h │ │ ├── concurrent_priority_queue.h │ │ ├── concurrent_queue.cpp │ │ ├── concurrent_queue.h │ │ ├── concurrent_unordered_map.h │ │ ├── concurrent_unordered_set.h │ │ ├── concurrent_vector.cpp │ │ ├── concurrent_vector.h │ │ ├── condition_variable.cpp │ │ ├── critical_section.cpp │ │ ├── critical_section.h │ │ ├── custom_scheduler.h │ │ ├── dynamic_link.cpp │ │ ├── dynamic_link.h │ │ ├── enumerable_thread_specific.h │ │ ├── flow_graph.h │ │ ├── governor.cpp │ │ ├── governor.h │ │ ├── ia32-masm/ │ │ │ ├── atomic_support.asm │ │ │ ├── itsx.asm │ │ │ └── lock_byte.asm │ │ ├── ia64-gas/ │ │ │ ├── atomic_support.s │ │ │ ├── ia64_misc.s │ │ │ ├── lock_byte.s │ │ │ ├── log2.s │ │ │ └── pause.s │ │ ├── ibm_aix51/ │ │ │ └── atomic_support.c │ │ ├── intel64-masm/ │ │ │ ├── atomic_support.asm │ │ │ ├── intel64_misc.asm │ │ │ └── itsx.asm │ │ ├── internal/ │ │ │ ├── _aggregator_impl.h │ │ │ ├── _concurrent_queue_impl.h │ │ │ ├── _concurrent_unordered_impl.h │ │ │ ├── _flow_graph_impl.h │ │ │ ├── _flow_graph_indexer_impl.h │ │ │ ├── _flow_graph_item_buffer_impl.h │ │ │ ├── _flow_graph_join_impl.h │ │ │ ├── _flow_graph_node_impl.h │ │ │ ├── _flow_graph_tagged_buffer_impl.h │ │ │ ├── _flow_graph_trace_impl.h │ │ │ ├── _flow_graph_types_impl.h │ │ │ ├── _mutex_padding.h │ │ │ ├── _range_iterator.h │ │ │ ├── _tbb_strings.h │ │ │ ├── _tbb_windef.h │ │ │ ├── _x86_eliding_mutex_impl.h │ │ │ └── _x86_rtm_rw_mutex_impl.h │ │ ├── intrusive_list.h │ │ ├── itt_notify.cpp │ │ ├── itt_notify.h │ │ ├── lin32-tbb-export.def │ │ ├── lin32-tbb-export.lst │ │ ├── lin64-tbb-export.def │ │ ├── lin64-tbb-export.lst │ │ ├── lin64ipf-tbb-export.def │ │ ├── lin64ipf-tbb-export.lst │ │ ├── mac32-tbb-export.def │ │ ├── mac32-tbb-export.lst │ │ ├── mac64-tbb-export.def │ │ ├── mac64-tbb-export.lst │ │ ├── machine/ │ │ │ ├── gcc_armv7.h │ │ │ ├── gcc_generic.h │ │ │ ├── gcc_ia32_common.h │ │ │ ├── gcc_itsx.h │ │ │ ├── ibm_aix51.h │ │ │ ├── icc_generic.h │ │ │ ├── linux_common.h │ │ │ ├── linux_ia32.h │ │ │ ├── linux_ia64.h │ │ │ ├── linux_intel64.h │ │ │ ├── mac_ppc.h │ │ │ ├── macos_common.h │ │ │ ├── mic_common.h │ │ │ ├── msvc_armv7.h │ │ │ ├── msvc_ia32_common.h │ │ │ ├── sunos_sparc.h │ │ │ ├── windows_api.h │ │ │ ├── windows_ia32.h │ │ │ ├── windows_intel64.h │ │ │ └── xbox360_ppc.h │ │ ├── mailbox.h │ │ ├── market.cpp │ │ ├── market.h │ │ ├── memory_pool.h │ │ ├── mutex.cpp │ │ ├── mutex.h │ │ ├── null_mutex.h │ │ ├── null_rw_mutex.h │ │ ├── observer_proxy.cpp │ │ ├── observer_proxy.h │ │ ├── parallel_do.h │ │ ├── parallel_for.h │ │ ├── parallel_for_each.h │ │ ├── parallel_invoke.h │ │ ├── parallel_reduce.h │ │ ├── parallel_scan.h │ │ ├── parallel_sort.h │ │ ├── parallel_while.h │ │ ├── partitioner.h │ │ ├── pipeline.cpp │ │ ├── pipeline.h │ │ ├── private_server.cpp │ │ ├── queuing_mutex.cpp │ │ ├── queuing_mutex.h │ │ ├── queuing_rw_mutex.cpp │ │ ├── queuing_rw_mutex.h │ │ ├── reader_writer_lock.cpp │ │ ├── reader_writer_lock.h │ │ ├── recursive_mutex.cpp │ │ ├── recursive_mutex.h │ │ ├── runtime_loader.h │ │ ├── scalable_allocator.h │ │ ├── scheduler.cpp │ │ ├── scheduler.h │ │ ├── scheduler_common.h │ │ ├── scheduler_utility.h │ │ ├── semaphore.cpp │ │ ├── semaphore.h │ │ ├── spin_mutex.cpp │ │ ├── spin_mutex.h │ │ ├── spin_rw_mutex.cpp │ │ ├── spin_rw_mutex.h │ │ ├── task.cpp │ │ ├── task.h │ │ ├── task_arena.h │ │ ├── task_group.h │ │ ├── task_group_context.cpp │ │ ├── task_scheduler_init.h │ │ ├── task_scheduler_observer.h │ │ ├── task_stream.h │ │ ├── tbb.h │ │ ├── tbb_allocator.h │ │ ├── tbb_assert_impl.h │ │ ├── tbb_config.h │ │ ├── tbb_exception.h │ │ ├── tbb_machine.h │ │ ├── tbb_main.cpp │ │ ├── tbb_main.h │ │ ├── tbb_misc.cpp │ │ ├── tbb_misc.h │ │ ├── tbb_misc_ex.cpp │ │ ├── tbb_profiling.h │ │ ├── tbb_resource.rc │ │ ├── tbb_statistics.cpp │ │ ├── tbb_statistics.h │ │ ├── tbb_stddef.h │ │ ├── tbb_thread.cpp │ │ ├── tbb_thread.h │ │ ├── tbb_version.h │ │ ├── tbbmalloc_proxy.h │ │ ├── tick_count.h │ │ ├── tls.h │ │ ├── tools_api/ │ │ │ ├── disable_warnings.h │ │ │ ├── internal/ │ │ │ │ └── ittnotify.h │ │ │ ├── ittnotify.h │ │ │ ├── ittnotify_config.h │ │ │ ├── ittnotify_static.c │ │ │ ├── ittnotify_static.h │ │ │ ├── ittnotify_types.h │ │ │ ├── legacy/ │ │ │ │ └── ittnotify.h │ │ │ └── prototype/ │ │ │ └── ittnotify.h │ │ ├── version_string.ver │ │ ├── win32-tbb-export.def │ │ ├── win32-tbb-export.lst │ │ ├── win64-gcc-tbb-export.def │ │ ├── win64-gcc-tbb-export.lst │ │ ├── win64-tbb-export.def │ │ ├── win64-tbb-export.lst │ │ ├── winrt-tbb-export.lst │ │ ├── x86_rtm_rw_mutex.cpp │ │ └── xbox360-tbb-export.def │ ├── tbbqueue.h │ └── wrappers.h ├── blockingconcurrentqueue.h ├── build/ │ ├── makefile │ ├── makefile.inc │ ├── msvc11/ │ │ ├── benchmarks.vcxproj │ │ ├── benchmarks.vcxproj.filters │ │ ├── concurrentqueue.sln │ │ ├── fuzztests.vcxproj │ │ ├── fuzztests.vcxproj.filters │ │ ├── unittests.vcxproj │ │ └── unittests.vcxproj.filters │ ├── msvc12/ │ │ ├── benchmarks.vcxproj │ │ ├── benchmarks.vcxproj.filters │ │ ├── concurrentqueue.sln │ │ ├── fuzztests.vcxproj │ │ ├── fuzztests.vcxproj.filters │ │ ├── msvc_tbb_stubs.cpp │ │ ├── unittests.vcxproj │ │ └── unittests.vcxproj.filters │ ├── msvc14/ │ │ ├── benchmarks.vcxproj │ │ ├── benchmarks.vcxproj.filters │ │ ├── concurrentqueue.sln │ │ ├── fuzztests.vcxproj │ │ ├── fuzztests.vcxproj.filters │ │ ├── msvc_tbb_stubs.cpp │ │ ├── unittests.vcxproj │ │ └── unittests.vcxproj.filters │ ├── msvc15/ │ │ ├── benchmarks.vcxproj │ │ ├── benchmarks.vcxproj.filters │ │ ├── concurrentqueue.sln │ │ ├── fuzztests.vcxproj │ │ ├── fuzztests.vcxproj.filters │ │ ├── msvc_tbb_stubs.cpp │ │ ├── unittests.vcxproj │ │ └── unittests.vcxproj.filters │ ├── msvc16/ │ │ ├── benchmarks.vcxproj │ │ ├── benchmarks.vcxproj.filters │ │ ├── concurrentqueue.sln │ │ ├── fuzztests.vcxproj │ │ ├── fuzztests.vcxproj.filters │ │ ├── msvc_tbb_stubs.cpp │ │ ├── unittests.vcxproj │ │ └── unittests.vcxproj.filters │ └── xcode/ │ ├── Info.plist │ ├── concurrentqueue.xcodeproj/ │ │ ├── project.pbxproj │ │ ├── project.xcworkspace/ │ │ │ └── contents.xcworkspacedata │ │ └── xcshareddata/ │ │ └── xcschemes/ │ │ └── concurrentqueue-unittests-ios.xcscheme │ └── main_ios.mm ├── c_api/ │ ├── blockingconcurrentqueue.cpp │ ├── concurrentqueue.cpp │ └── concurrentqueue.h ├── concurrentqueue.h ├── concurrentqueueConfig.cmake.in ├── internal/ │ └── concurrentqueue_internal_debug.h ├── lightweightsemaphore.h ├── samples.md └── tests/ ├── CDSChecker/ │ ├── README.txt │ ├── corealgo.h │ ├── enqueue_dequeue_many.cpp │ ├── enqueue_dequeue_one.cpp │ └── makefile ├── common/ │ ├── simplethread.cpp │ ├── simplethread.h │ ├── systemtime.cpp │ └── systemtime.h ├── corealgos.h ├── fuzztests/ │ ├── fuzztests.cpp │ └── makefile ├── relacy/ │ ├── freelist.cpp │ ├── integrated.cpp │ ├── makefile │ ├── relacy/ │ │ ├── CHANGES │ │ ├── LICENSE │ │ ├── VERSION │ │ ├── example/ │ │ │ ├── cli_ws_deque/ │ │ │ │ ├── cli_ws_deque.cpp │ │ │ │ ├── msvc8/ │ │ │ │ │ ├── cli_ws_deque.sln │ │ │ │ │ └── cli_ws_deque.vcproj │ │ │ │ ├── stdafx.cpp │ │ │ │ └── stdafx.h │ │ │ ├── condvar/ │ │ │ │ ├── condvar.cpp │ │ │ │ ├── msvc8/ │ │ │ │ │ ├── condvar.sln │ │ │ │ │ └── condvar.vcproj │ │ │ │ ├── msvc9/ │ │ │ │ │ ├── condvar.sln │ │ │ │ │ └── condvar.vcproj │ │ │ │ ├── stdafx.cpp │ │ │ │ └── stdafx.h │ │ │ ├── eao_blocking/ │ │ │ │ └── eao_blocking.cpp │ │ │ ├── eventcount/ │ │ │ │ ├── eventcount.cpp │ │ │ │ ├── msvc8/ │ │ │ │ │ ├── eventcount.sln │ │ │ │ │ └── eventcount.vcproj │ │ │ │ ├── msvc9/ │ │ │ │ │ ├── eventcount.sln │ │ │ │ │ └── eventcount.vcproj │ │ │ │ ├── stdafx.cpp │ │ │ │ └── stdafx.h │ │ │ ├── examples/ │ │ │ │ ├── amp_condvar.hpp │ │ │ │ ├── examples.cpp │ │ │ │ ├── msvc9/ │ │ │ │ │ ├── examples.sln │ │ │ │ │ └── examples.vcproj │ │ │ │ ├── spsc_overwrite_queue.hpp │ │ │ │ ├── stdafx.cpp │ │ │ │ └── stdafx.h │ │ │ ├── java_ws_deque/ │ │ │ │ ├── java_ws_deque.cpp │ │ │ │ ├── msvc8/ │ │ │ │ │ ├── java_ws_deque.sln │ │ │ │ │ └── java_ws_deque.vcproj │ │ │ │ ├── stdafx.cpp │ │ │ │ └── stdafx.h │ │ │ ├── mpmc/ │ │ │ │ ├── mpmc.cpp │ │ │ │ ├── msvc8/ │ │ │ │ │ ├── mpmc.sln │ │ │ │ │ └── mpmc.vcproj │ │ │ │ ├── pcx.h │ │ │ │ ├── stdafx.cpp │ │ │ │ └── stdafx.h │ │ │ ├── mutex_business_logic/ │ │ │ │ ├── msvc8/ │ │ │ │ │ ├── mutex_business_logic.sln │ │ │ │ │ └── mutex_business_logic.vcproj │ │ │ │ ├── mutex_business_logic.cpp │ │ │ │ ├── stdafx.cpp │ │ │ │ └── stdafx.h │ │ │ ├── peterson/ │ │ │ │ ├── msvc8/ │ │ │ │ │ ├── peterson.sln │ │ │ │ │ └── peterson.vcproj │ │ │ │ ├── msvc9/ │ │ │ │ │ ├── peterson.sln │ │ │ │ │ └── peterson.vcproj │ │ │ │ ├── peterson.cpp │ │ │ │ ├── stdafx.cpp │ │ │ │ └── stdafx.h │ │ │ ├── proxy_collector/ │ │ │ │ ├── msvc8/ │ │ │ │ │ ├── proxy_collector.sln │ │ │ │ │ └── proxy_collector.vcproj │ │ │ │ ├── msvc9/ │ │ │ │ │ ├── proxy_collector.sln │ │ │ │ │ └── proxy_collector.vcproj │ │ │ │ ├── proxy_collector.cpp │ │ │ │ ├── stdafx.cpp │ │ │ │ └── stdafx.h │ │ │ ├── ref_counting/ │ │ │ │ ├── msvc8/ │ │ │ │ │ ├── ref_counting.sln │ │ │ │ │ └── ref_counting.vcproj │ │ │ │ ├── msvc9/ │ │ │ │ │ ├── ref_counting.sln │ │ │ │ │ └── ref_counting.vcproj │ │ │ │ ├── ref_counting.cpp │ │ │ │ ├── stdafx.cpp │ │ │ │ └── stdafx.h │ │ │ ├── smr/ │ │ │ │ ├── g++/ │ │ │ │ │ └── Makefile │ │ │ │ ├── msvc8/ │ │ │ │ │ ├── smr.sln │ │ │ │ │ └── smr.vcproj │ │ │ │ ├── msvc9/ │ │ │ │ │ ├── smr.sln │ │ │ │ │ └── smr.vcproj │ │ │ │ ├── smr.cpp │ │ │ │ ├── stdafx.cpp │ │ │ │ └── stdafx.h │ │ │ ├── spsc_queue/ │ │ │ │ ├── msvc8/ │ │ │ │ │ ├── spsc_queue.sln │ │ │ │ │ └── spsc_queue.vcproj │ │ │ │ ├── msvc9/ │ │ │ │ │ ├── spsc_queue.sln │ │ │ │ │ └── spsc_queue.vcproj │ │ │ │ ├── spsc_queue.cpp │ │ │ │ ├── stdafx.cpp │ │ │ │ └── stdafx.h │ │ │ ├── stack/ │ │ │ │ ├── DESCRIPTION.TXT │ │ │ │ ├── msvc8/ │ │ │ │ │ ├── stack.sln │ │ │ │ │ └── stack.vcproj │ │ │ │ ├── msvc9/ │ │ │ │ │ ├── stack.sln │ │ │ │ │ └── stack.vcproj │ │ │ │ ├── stack.cpp │ │ │ │ ├── stdafx.cpp │ │ │ │ └── stdafx.h │ │ │ ├── tbb_eventcount/ │ │ │ │ ├── eventcount.cpp │ │ │ │ ├── msvc8/ │ │ │ │ │ ├── eventcount.sln │ │ │ │ │ └── eventcount.vcproj │ │ │ │ ├── msvc9/ │ │ │ │ │ ├── eventcount.sln │ │ │ │ │ └── eventcount.vcproj │ │ │ │ ├── stdafx.cpp │ │ │ │ └── stdafx.h │ │ │ ├── ws_deque/ │ │ │ │ ├── msvc8/ │ │ │ │ │ ├── ws_deque.sln │ │ │ │ │ └── ws_deque.vcproj │ │ │ │ ├── msvc9/ │ │ │ │ │ ├── ws_deque.sln │ │ │ │ │ └── ws_deque.vcproj │ │ │ │ ├── stdafx.cpp │ │ │ │ ├── stdafx.h │ │ │ │ └── ws_deque.cpp │ │ │ └── ws_deque2/ │ │ │ ├── msvc8/ │ │ │ │ ├── ws_deque.sln │ │ │ │ └── ws_deque.vcproj │ │ │ ├── stdafx.cpp │ │ │ ├── stdafx.h │ │ │ └── ws_deque.cpp │ │ ├── relacy/ │ │ │ ├── atomic.hpp │ │ │ ├── atomic_events.hpp │ │ │ ├── atomic_fence.hpp │ │ │ ├── backoff.hpp │ │ │ ├── base.hpp │ │ │ ├── cli.hpp │ │ │ ├── cli_interlocked.hpp │ │ │ ├── cli_var.hpp │ │ │ ├── cli_volatile.hpp │ │ │ ├── context.hpp │ │ │ ├── context_addr_hash.hpp │ │ │ ├── context_base.hpp │ │ │ ├── context_base_impl.hpp │ │ │ ├── context_bound_scheduler.hpp │ │ │ ├── defs.hpp │ │ │ ├── dyn_thread.hpp │ │ │ ├── dyn_thread_ctx.hpp │ │ │ ├── foreach.hpp │ │ │ ├── full_search_scheduler.hpp │ │ │ ├── history.hpp │ │ │ ├── java.hpp │ │ │ ├── java_atomic.hpp │ │ │ ├── java_var.hpp │ │ │ ├── java_volatile.hpp │ │ │ ├── memory.hpp │ │ │ ├── memory_order.hpp │ │ │ ├── pch.hpp │ │ │ ├── platform.hpp │ │ │ ├── pthread.h │ │ │ ├── random.hpp │ │ │ ├── random_scheduler.hpp │ │ │ ├── relacy.hpp │ │ │ ├── relacy_cli.hpp │ │ │ ├── relacy_java.hpp │ │ │ ├── relacy_std.hpp │ │ │ ├── rmw.hpp │ │ │ ├── scheduler.hpp │ │ │ ├── signature.hpp │ │ │ ├── slab_allocator.hpp │ │ │ ├── stdlib/ │ │ │ │ ├── condition_variable.hpp │ │ │ │ ├── event.hpp │ │ │ │ ├── mutex.hpp │ │ │ │ ├── pthread.hpp │ │ │ │ ├── semaphore.hpp │ │ │ │ └── windows.hpp │ │ │ ├── sync_var.hpp │ │ │ ├── test_params.hpp │ │ │ ├── test_result.hpp │ │ │ ├── test_suite.hpp │ │ │ ├── thread.hpp │ │ │ ├── thread_base.hpp │ │ │ ├── thread_local.hpp │ │ │ ├── thread_local_ctx.hpp │ │ │ ├── var.hpp │ │ │ ├── volatile.hpp │ │ │ ├── waitset.hpp │ │ │ └── windows.h │ │ └── test/ │ │ ├── addr_hash.hpp │ │ ├── advanced.txt │ │ ├── compare_swap.hpp │ │ ├── condvar.hpp │ │ ├── data_race.hpp │ │ ├── detection.txt │ │ ├── dyn_thread.hpp │ │ ├── event.hpp │ │ ├── features.txt │ │ ├── fence.hpp │ │ ├── foo.cpp │ │ ├── futex.hpp │ │ ├── g++/ │ │ │ ├── build_all_cygwin_debug.bat │ │ │ ├── build_all_debug.bat │ │ │ ├── build_all_release.sh │ │ │ ├── build_cygwin_release.cmd │ │ │ ├── build_debug.cmd │ │ │ ├── build_release.cmd │ │ │ └── test.cpp │ │ ├── iriw.cpp │ │ ├── jtest/ │ │ │ ├── jtest.cpp │ │ │ ├── msvc8/ │ │ │ │ ├── jtest.sln │ │ │ │ └── jtest.vcproj │ │ │ ├── msvc9/ │ │ │ │ ├── jtest.sln │ │ │ │ └── jtest.vcproj │ │ │ ├── stdafx.cpp │ │ │ └── stdafx.h │ │ ├── main.cpp │ │ ├── memory.hpp │ │ ├── memory_order.hpp │ │ ├── msvc71/ │ │ │ ├── test.sln │ │ │ └── test.vcproj │ │ ├── msvc8/ │ │ │ ├── rrd.sln │ │ │ ├── rrd.vcproj │ │ │ ├── test.sln │ │ │ └── test.vcproj │ │ ├── msvc9/ │ │ │ ├── rrd.sln │ │ │ ├── rrd.vcproj │ │ │ ├── test.sln │ │ │ └── test.vcproj │ │ ├── mutex.hpp │ │ ├── ntest/ │ │ │ ├── msvc8/ │ │ │ │ ├── ntest.sln │ │ │ │ └── ntest.vcproj │ │ │ ├── msvc9/ │ │ │ │ ├── ntest.sln │ │ │ │ └── ntest.vcproj │ │ │ ├── ntest.cpp │ │ │ ├── stdafx.cpp │ │ │ └── stdafx.h │ │ ├── pthread.hpp │ │ ├── scheduler.hpp │ │ ├── semaphore.hpp │ │ ├── stdafx.cpp │ │ ├── stdafx.h │ │ ├── thread_local.hpp │ │ ├── todo.txt │ │ ├── trash/ │ │ │ ├── original.hpp │ │ │ └── rtl.hpp │ │ ├── tutorial.txt │ │ ├── wfmo.hpp │ │ └── windows.hpp │ ├── relacy_shims.h │ └── spmchash.cpp └── unittests/ ├── makefile ├── mallocmacro.cpp ├── minitest.h └── unittests.cpp ================================================ FILE CONTENTS ================================================ ================================================ FILE: .gitignore ================================================ *.ipch *.suo *.user *.sdf *.opensdf *.exe *.pdb *.vs *.VC.db build/bin/ build/*.o build/*.log build/msvc16/*.log build/msvc16/obj/ build/msvc15/*.log build/msvc15/obj/ build/msvc14/*.log build/msvc14/obj/ build/msvc12/*.log build/msvc12/obj/ build/msvc11/*.log build/msvc11/obj/ build/xcode/build/ .idea/ cmake-build*/ tests/fuzztests/fuzztests.log benchmarks/benchmarks.log tests/CDSChecker/*.o tests/CDSChecker/*.log tests/CDSChecker/model-checker/ tests/relacy/freelist.exe tests/relacy/spmchash.exe tests/relacy/log.txt ================================================ FILE: CMakeLists.txt ================================================ cmake_minimum_required(VERSION 3.9) project(concurrentqueue VERSION 1.0.0) include(GNUInstallDirs) include(CMakePackageConfigHelpers) add_library(${PROJECT_NAME} INTERFACE) target_include_directories(${PROJECT_NAME} INTERFACE $ $ ) install(TARGETS ${PROJECT_NAME} EXPORT ${PROJECT_NAME}Targets ) write_basic_package_version_file( ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake VERSION ${PROJECT_VERSION} COMPATIBILITY AnyNewerVersion ARCH_INDEPENDENT ) configure_package_config_file(${PROJECT_NAME}Config.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}Config.cmake INSTALL_DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}/ ) install(EXPORT ${PROJECT_NAME}Targets FILE ${PROJECT_NAME}Targets.cmake NAMESPACE "${PROJECT_NAME}::" DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME} COMPONENT Devel ) install( FILES ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}Config.cmake ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME} COMPONENT Devel ) install( FILES blockingconcurrentqueue.h concurrentqueue.h lightweightsemaphore.h LICENSE.md DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${PROJECT_NAME}/moodycamel ) set(CPACK_PACKAGE_NAME ${PROJECT_NAME}) set(CPACK_PACKAGE_VENDOR "Cameron Desrochers ") set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "An industrial-strength lock-free queue for C++.") set(CPACK_PACKAGE_VERSION "${PROJECT_VERSION}") set(CPACK_PACKAGE_VERSION_MAJOR "${PROJECT_VERSION_MAJOR}") set(CPACK_PACKAGE_VERSION_MINOR "${PROJECT_VERSION_MINOR}") set(CPACK_PACKAGE_VERSION_PATCH "${PROJECT_VERSION_PATCH}") set(CPACK_DEBIAN_PACKAGE_MAINTAINER ${CPACK_PACKAGE_VENDOR}) set(CPACK_GENERATOR "RPM;DEB") include(CPack) ================================================ FILE: LICENSE.md ================================================ This license file applies to everything in this repository except that which is explicitly annotated as being written by other authors, i.e. the Boost queue (included in the benchmarks for comparison), Intel's TBB library (ditto), dlib::pipe (ditto), the CDSChecker tool (used for verification), the Relacy model checker (ditto), and Jeff Preshing's semaphore implementation (used in the blocking queue) which has a zlib license (embedded in lightweightsempahore.h). --- Simplified BSD License: Copyright (c) 2013-2016, Cameron Desrochers. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --- I have also chosen to dual-license under the Boost Software License as an alternative to the Simplified BSD license above: Boost Software License - Version 1.0 - August 17th, 2003 Permission is hereby granted, free of charge, to any person or organization obtaining a copy of the software and accompanying documentation covered by this license (the "Software") to use, reproduce, display, distribute, execute, and transmit the Software, and to prepare derivative works of the Software, and to permit third-parties to whom the Software is furnished to do so, all subject to the following: The copyright notices in the Software and this entire statement, including the above license grant, this restriction and the following disclaimer, must be included in all copies of the Software, in whole or in part, and all derivative works of the Software, unless such copies or derivative works are solely in the form of machine-executable object code generated by a source language processor. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ================================================ FILE: README.md ================================================ # moodycamel::ConcurrentQueue An industrial-strength lock-free queue for C++. Note: If all you need is a single-producer, single-consumer queue, I have [one of those too][spsc]. ## Features - Knock-your-socks-off [blazing fast performance][benchmarks]. - Single-header implementation. Just drop it in your project. - Fully thread-safe lock-free queue. Use concurrently from any number of threads. - C++11 implementation -- elements are moved (instead of copied) where possible. - Templated, obviating the need to deal exclusively with pointers -- memory is managed for you. - No artificial limitations on element types or maximum count. - Memory can be allocated once up-front, or dynamically as needed. - Fully portable (no assembly; all is done through standard C++11 primitives). - Supports super-fast bulk operations. - Includes a low-overhead blocking version (BlockingConcurrentQueue). - Exception safe. ## Reasons to use There are not that many full-fledged lock-free queues for C++. Boost has one, but it's limited to objects with trivial assignment operators and trivial destructors, for example. Intel's TBB queue isn't lock-free, and requires trivial constructors too. There're many academic papers that implement lock-free queues in C++, but usable source code is hard to find, and tests even more so. This queue not only has less limitations than others (for the most part), but [it's also faster][benchmarks]. It's been fairly well-tested, and offers advanced features like **bulk enqueueing/dequeueing** (which, with my new design, is much faster than one element at a time, approaching and even surpassing the speed of a non-concurrent queue even under heavy contention). In short, there was a lock-free queue shaped hole in the C++ open-source universe, and I set out to fill it with the fastest, most complete, and well-tested design and implementation I could. The result is `moodycamel::ConcurrentQueue` :-) ## Reasons *not* to use The fastest synchronization of all is the kind that never takes place. Fundamentally, concurrent data structures require some synchronization, and that takes time. Every effort was made, of course, to minimize the overhead, but if you can avoid sharing data between threads, do so! Why use concurrent data structures at all, then? Because they're gosh darn convenient! (And, indeed, sometimes sharing data concurrently is unavoidable.) My queue is **not linearizable** (see the next section on high-level design). The foundations of its design assume that producers are independent; if this is not the case, and your producers co-ordinate amongst themselves in some fashion, be aware that the elements won't necessarily come out of the queue in the same order they were put in *relative to the ordering formed by that co-ordination* (but they will still come out in the order they were put in by any *individual* producer). If this affects your use case, you may be better off with another implementation; either way, it's an important limitation to be aware of. My queue is also **not NUMA aware**, and does a lot of memory re-use internally, meaning it probably doesn't scale particularly well on NUMA architectures; however, I don't know of any other lock-free queue that *is* NUMA aware (except for [SALSA][salsa], which is very cool, but has no publicly available implementation that I know of). Finally, the queue is **not sequentially consistent**; there *is* a happens-before relationship between when an element is put in the queue and when it comes out, but other things (such as pumping the queue until it's empty) require more thought to get right in all eventualities, because explicit memory ordering may have to be done to get the desired effect. In other words, it can sometimes be difficult to use the queue correctly. This is why it's a good idea to follow the [samples][samples.md] where possible. On the other hand, the upside of this lack of sequential consistency is better performance. ## High-level design Elements are stored internally using contiguous blocks instead of linked lists for better performance. The queue is made up of a collection of sub-queues, one for each producer. When a consumer wants to dequeue an element, it checks all the sub-queues until it finds one that's not empty. All of this is largely transparent to the user of the queue, however -- it mostly just worksTM. One particular consequence of this design, however, (which seems to be non-intuitive) is that if two producers enqueue at the same time, there is no defined ordering between the elements when they're later dequeued. Normally this is fine, because even with a fully linearizable queue there'd be a race between the producer threads and so you couldn't rely on the ordering anyway. However, if for some reason you do extra explicit synchronization between the two producer threads yourself, thus defining a total order between enqueue operations, you might expect that the elements would come out in the same total order, which is a guarantee my queue does not offer. At that point, though, there semantically aren't really two separate producers, but rather one that happens to be spread across multiple threads. In this case, you can still establish a total ordering with my queue by creating a single producer token, and using that from both threads to enqueue (taking care to synchronize access to the token, of course, but there was already extra synchronization involved anyway). I've written a more detailed [overview of the internal design][blog], as well as [the full nitty-gritty details of the design][design], on my blog. Finally, the [source][source] itself is available for perusal for those interested in its implementation. ## Basic use The entire queue's implementation is contained in **one header**, [`concurrentqueue.h`][concurrentqueue.h]. Simply download and include that to use the queue. The blocking version is in a separate header, [`blockingconcurrentqueue.h`][blockingconcurrentqueue.h], that depends on [`concurrentqueue.h`][concurrentqueue.h] and [`lightweightsemaphore.h`][lightweightsemaphore.h]. The implementation makes use of certain key C++11 features, so it requires a relatively recent compiler (e.g. VS2012+ or g++ 4.8; note that g++ 4.6 has a known bug with `std::atomic` and is thus not supported). The algorithm implementations themselves are platform independent. Use it like you would any other templated queue, with the exception that you can use it from many threads at once :-) Simple example: ```C++ #include "concurrentqueue.h" moodycamel::ConcurrentQueue q; q.enqueue(25); int item; bool found = q.try_dequeue(item); assert(found && item == 25); ``` Description of basic methods: - `ConcurrentQueue(size_t initialSizeEstimate)` Constructor which optionally accepts an estimate of the number of elements the queue will hold - `enqueue(T&& item)` Enqueues one item, allocating extra space if necessary - `try_enqueue(T&& item)` Enqueues one item, but only if enough memory is already allocated - `try_dequeue(T& item)` Dequeues one item, returning true if an item was found or false if the queue appeared empty Note that it is up to the user to ensure that the queue object is completely constructed before being used by any other threads (this includes making the memory effects of construction visible, possibly via a memory barrier). Similarly, it's important that all threads have finished using the queue (and the memory effects have fully propagated) before it is destructed. There's usually two versions of each method, one "explicit" version that takes a user-allocated per-producer or per-consumer token, and one "implicit" version that works without tokens. Using the explicit methods is almost always faster (though not necessarily by a huge factor). Apart from performance, the primary distinction between them is their sub-queue allocation behaviour for enqueue operations: Using the implicit enqueue methods causes an automatically-allocated thread-local producer sub-queue to be allocated. Explicit producers, on the other hand, are tied directly to their tokens' lifetimes (but are recycled internally). In order to avoid the number of sub-queues growing without bound, implicit producers are marked for reuse once their thread exits. However, this is not supported on all platforms. If using the queue from short-lived threads, it is recommended to use explicit producer tokens instead. Full API (pseudocode): # Allocates more memory if necessary enqueue(item) : bool enqueue(prod_token, item) : bool enqueue_bulk(item_first, count) : bool enqueue_bulk(prod_token, item_first, count) : bool # Fails if not enough memory to enqueue try_enqueue(item) : bool try_enqueue(prod_token, item) : bool try_enqueue_bulk(item_first, count) : bool try_enqueue_bulk(prod_token, item_first, count) : bool # Attempts to dequeue from the queue (never allocates) try_dequeue(item&) : bool try_dequeue(cons_token, item&) : bool try_dequeue_bulk(item_first, max) : size_t try_dequeue_bulk(cons_token, item_first, max) : size_t # If you happen to know which producer you want to dequeue from try_dequeue_from_producer(prod_token, item&) : bool try_dequeue_bulk_from_producer(prod_token, item_first, max) : size_t # A not-necessarily-accurate count of the total number of elements size_approx() : size_t ## Blocking version As mentioned above, a full blocking wrapper of the queue is provided that adds `wait_dequeue` and `wait_dequeue_bulk` methods in addition to the regular interface. This wrapper is extremely low-overhead, but slightly less fast than the non-blocking queue (due to the necessary bookkeeping involving a lightweight semaphore). There are also timed versions that allow a timeout to be specified (either in microseconds or with a `std::chrono` object). The only major caveat with the blocking version is that you must be careful not to destroy the queue while somebody is waiting on it. This generally means you need to know for certain that another element is going to come along before you call one of the blocking methods. (To be fair, the non-blocking version cannot be destroyed while in use either, but it can be easier to coordinate the cleanup.) Blocking example: ```C++ #include "blockingconcurrentqueue.h" moodycamel::BlockingConcurrentQueue q; std::thread producer([&]() { for (int i = 0; i != 100; ++i) { std::this_thread::sleep_for(std::chrono::milliseconds(i % 10)); q.enqueue(i); } }); std::thread consumer([&]() { for (int i = 0; i != 100; ++i) { int item; q.wait_dequeue(item); assert(item == i); if (q.wait_dequeue_timed(item, std::chrono::milliseconds(5))) { ++i; assert(item == i); } } }); producer.join(); consumer.join(); assert(q.size_approx() == 0); ``` ## Advanced features #### Tokens The queue can take advantage of extra per-producer and per-consumer storage if it's available to speed up its operations. This takes the form of "tokens": You can create a consumer token and/or a producer token for each thread or task (tokens themselves are not thread-safe), and use the methods that accept a token as their first parameter: ```C++ moodycamel::ConcurrentQueue q; moodycamel::ProducerToken ptok(q); q.enqueue(ptok, 17); moodycamel::ConsumerToken ctok(q); int item; q.try_dequeue(ctok, item); assert(item == 17); ``` If you happen to know which producer you want to consume from (e.g. in a single-producer, multi-consumer scenario), you can use the `try_dequeue_from_producer` methods, which accept a producer token instead of a consumer token, and cut some overhead. Note that tokens work with the blocking version of the queue too. When producing or consuming many elements, the most efficient way is to: 1. Use the bulk methods of the queue with tokens 2. Failing that, use the bulk methods without tokens 3. Failing that, use the single-item methods with tokens 4. Failing that, use the single-item methods without tokens Having said that, don't create tokens willy-nilly -- ideally there would be one token (of each kind) per thread. The queue will work with what it is given, but it performs best when used with tokens. Note that tokens aren't actually tied to any given thread; it's not technically required that they be local to the thread, only that they be used by a single producer/consumer at a time. #### Bulk operations Thanks to the [novel design][blog] of the queue, it's just as easy to enqueue/dequeue multiple items as it is to do one at a time. This means that overhead can be cut drastically for bulk operations. Example syntax: ```C++ moodycamel::ConcurrentQueue q; int items[] = { 1, 2, 3, 4, 5 }; q.enqueue_bulk(items, 5); int results[5]; // Could also be any iterator size_t count = q.try_dequeue_bulk(results, 5); for (size_t i = 0; i != count; ++i) { assert(results[i] == items[i]); } ``` #### Preallocation (correctly using `try_enqueue`) `try_enqueue`, unlike just plain `enqueue`, will never allocate memory. If there's not enough room in the queue, it simply returns false. The key to using this method properly, then, is to ensure enough space is pre-allocated for your desired maximum element count. The constructor accepts a count of the number of elements that it should reserve space for. Because the queue works with blocks of elements, however, and not individual elements themselves, the value to pass in order to obtain an effective number of pre-allocated element slots is non-obvious. First, be aware that the count passed is rounded up to the next multiple of the block size. Note that the default block size is 32 (this can be changed via the traits). Second, once a slot in a block has been enqueued to, that slot cannot be re-used until the rest of the block has been completely filled up and then completely emptied. This affects the number of blocks you need in order to account for the overhead of partially-filled blocks. Third, each producer (whether implicit or explicit) claims and recycles blocks in a different manner, which again affects the number of blocks you need to account for a desired number of usable slots. Suppose you want the queue to be able to hold at least `N` elements at any given time. Without delving too deep into the rather arcane implementation details, here are some simple formulas for the number of elements to request for pre-allocation in such a case. Note the division is intended to be arithmetic division and not integer division (in order for `ceil()` to work). For explicit producers (using tokens to enqueue): ```C++ (ceil(N / BLOCK_SIZE) + 1) * MAX_NUM_PRODUCERS * BLOCK_SIZE ``` For implicit producers (no tokens): ```C++ (ceil(N / BLOCK_SIZE) - 1 + 2 * MAX_NUM_PRODUCERS) * BLOCK_SIZE ``` When using mixed producer types: ```C++ ((ceil(N / BLOCK_SIZE) - 1) * (MAX_EXPLICIT_PRODUCERS + 1) + 2 * (MAX_IMPLICIT_PRODUCERS + MAX_EXPLICIT_PRODUCERS)) * BLOCK_SIZE ``` If these formulas seem rather inconvenient, you can use the constructor overload that accepts the minimum number of elements (`N`) and the maximum number of explicit and implicit producers directly, and let it do the computation for you. In addition to blocks, there are other internal data structures that require allocating memory if they need to resize (grow). If using `try_enqueue` exclusively, the initial sizes may be exceeded, causing subsequent `try_enqueue` operations to fail. Specifically, the `INITIAL_IMPLICIT_PRODUCER_HASH_SIZE` trait limits the number of implicit producers that can be active at once before the internal hash needs resizing. Along the same lines, the `IMPLICIT_INITIAL_INDEX_SIZE` trait limits the number of unconsumed elements that an implicit producer can insert before its internal hash needs resizing. Similarly, the `EXPLICIT_INITIAL_INDEX_SIZE` trait limits the number of unconsumed elements that an explicit producer can insert before its internal hash needs resizing. In order to avoid hitting these limits when using `try_enqueue`, it is crucial to adjust the initial sizes in the traits appropriately, in addition to sizing the number of blocks properly as outlined above. Finally, it's important to note that because the queue is only eventually consistent and takes advantage of weak memory ordering for speed, there's always a possibility that under contention `try_enqueue` will fail even if the queue is correctly pre-sized for the desired number of elements. (e.g. A given thread may think that the queue's full even when that's no longer the case.) So no matter what, you still need to handle the failure case (perhaps looping until it succeeds), unless you don't mind dropping elements. #### Exception safety The queue is exception safe, and will never become corrupted if used with a type that may throw exceptions. The queue itself never throws any exceptions (operations fail gracefully (return false) if memory allocation fails instead of throwing `std::bad_alloc`). It is important to note that the guarantees of exception safety only hold if the element type never throws from its destructor, and that any iterators passed into the queue (for bulk operations) never throw either. Note that in particular this means `std::back_inserter` iterators must be used with care, since the vector being inserted into may need to allocate and throw a `std::bad_alloc` exception from inside the iterator; so be sure to reserve enough capacity in the target container first if you do this. The guarantees are presently as follows: - Enqueue operations are rolled back completely if an exception is thrown from an element's constructor. For bulk enqueue operations, this means that elements are copied instead of moved (in order to avoid having only some objects moved in the event of an exception). Non-bulk enqueues always use the move constructor if one is available. - If the assignment operator throws during a dequeue operation (both single and bulk), the element(s) are considered dequeued regardless. In such a case, the dequeued elements are all properly destructed before the exception is propagated, but there's no way to get the elements themselves back. - Any exception that is thrown is propagated up the call stack, at which point the queue is in a consistent state. Note: If any of your type's copy constructors/move constructors/assignment operators don't throw, be sure to annotate them with `noexcept`; this will avoid the exception-checking overhead in the queue where possible (even with zero-cost exceptions, there's still a code size impact that has to be taken into account). #### Traits The queue also supports a traits template argument which defines various types, constants, and the memory allocation and deallocation functions that are to be used by the queue. The typical pattern to providing your own traits is to create a class that inherits from the default traits and override only the values you wish to change. Example: ```C++ struct MyTraits : public moodycamel::ConcurrentQueueDefaultTraits { static const size_t BLOCK_SIZE = 256; // Use bigger blocks }; moodycamel::ConcurrentQueue q; ``` #### How to dequeue types without calling the constructor The normal way to dequeue an item is to pass in an existing object by reference, which is then assigned to internally by the queue (using the move-assignment operator if possible). This can pose a problem for types that are expensive to construct or don't have a default constructor; fortunately, there is a simple workaround: Create a wrapper class that copies the memory contents of the object when it is assigned by the queue (a poor man's move, essentially). Note that this only works if the object contains no internal pointers. Example: ```C++ struct MyObjectMover { inline void operator=(MyObject&& obj) { std::memcpy(data, &obj, sizeof(MyObject)); // TODO: Cleanup obj so that when it's destructed by the queue // it doesn't corrupt the data of the object we just moved it into } inline MyObject& obj() { return *reinterpret_cast(data); } private: align(alignof(MyObject)) char data[sizeof(MyObject)]; }; ``` A less dodgy alternative, if moves are cheap but default construction is not, is to use a wrapper that defers construction until the object is assigned, enabling use of the move constructor: ```C++ struct MyObjectMover { inline void operator=(MyObject&& x) { new (data) MyObject(std::move(x)); created = true; } inline MyObject& obj() { assert(created); return *reinterpret_cast(data); } ~MyObjectMover() { if (created) obj().~MyObject(); } private: align(alignof(MyObject)) char data[sizeof(MyObject)]; bool created = false; }; ``` ## Samples There are some more detailed samples [here][samples.md]. The source of the [unit tests][unittest-src] and [benchmarks][benchmark-src] are available for reference as well. ## Benchmarks See my blog post for some [benchmark results][benchmarks] (including versus `boost::lockfree::queue` and `tbb::concurrent_queue`), or run the benchmarks yourself (requires MinGW and certain GnuWin32 utilities to build on Windows, or a recent g++ on Linux): ```Shell cd build make benchmarks bin/benchmarks ``` The short version of the benchmarks is that it's so fast (especially the bulk methods), that if you're actually using the queue to *do* anything, the queue won't be your bottleneck. ## Tests (and bugs) I've written quite a few unit tests as well as a randomized long-running fuzz tester. I also ran the core queue algorithm through the [CDSChecker][cdschecker] C++11 memory model model checker. Some of the inner algorithms were tested separately using the [Relacy][relacy] model checker, and full integration tests were also performed with Relacy. I've tested on Linux (Fedora 19) and Windows (7), but only on x86 processors so far (Intel and AMD). The code was written to be platform-independent, however, and should work across all processors and OSes. Due to the complexity of the implementation and the difficult-to-test nature of lock-free code in general, there may still be bugs. If anyone is seeing buggy behaviour, I'd like to hear about it! (Especially if a unit test for it can be cooked up.) Just open an issue on GitHub. ## Using vcpkg You can download and install `moodycamel::ConcurrentQueue` using the [vcpkg](https://github.com/Microsoft/vcpkg) dependency manager: ```Shell git clone https://github.com/Microsoft/vcpkg.git cd vcpkg ./bootstrap-vcpkg.sh ./vcpkg integrate install vcpkg install concurrentqueue ``` The `moodycamel::ConcurrentQueue` port in vcpkg is kept up to date by Microsoft team members and community contributors. If the version is out of date, please [create an issue or pull request](https://github.com/Microsoft/vcpkg) on the vcpkg repository. ## License I'm releasing the source of this repository (with the exception of third-party code, i.e. the Boost queue (used in the benchmarks for comparison), Intel's TBB library (ditto), CDSChecker, Relacy, and Jeff Preshing's cross-platform semaphore, which all have their own licenses) under a simplified BSD license. I'm also dual-licensing under the Boost Software License. See the [LICENSE.md][license] file for more details. Note that lock-free programming is a patent minefield, and this code may very well violate a pending patent (I haven't looked), though it does not to my present knowledge. I did design and implement this queue from scratch. ## Diving into the code If you're interested in the source code itself, it helps to have a rough idea of how it's laid out. This section attempts to describe that. The queue is formed of several basic parts (listed here in roughly the order they appear in the source). There's the helper functions (e.g. for rounding to a power of 2). There's the default traits of the queue, which contain the constants and malloc/free functions used by the queue. There's the producer and consumer tokens. Then there's the queue's public API itself, starting with the constructor, destructor, and swap/assignment methods. There's the public enqueue methods, which are all wrappers around a small set of private enqueue methods found later on. There's the dequeue methods, which are defined inline and are relatively straightforward. Then there's all the main internal data structures. First, there's a lock-free free list, used for recycling spent blocks (elements are enqueued to blocks internally). Then there's the block structure itself, which has two different ways of tracking whether it's fully emptied or not (remember, given two parallel consumers, there's no way to know which one will finish first) depending on where it's used. Then there's a small base class for the two types of internal SPMC producer queues (one for explicit producers that holds onto memory but attempts to be faster, and one for implicit ones which attempt to recycle more memory back into the parent but is a little slower). The explicit producer is defined first, then the implicit one. They both contain the same general four methods: One to enqueue, one to dequeue, one to enqueue in bulk, and one to dequeue in bulk. (Obviously they have constructors and destructors too, and helper methods.) The main difference between them is how the block handling is done (they both use the same blocks, but in different ways, and map indices to them in different ways). Finally, there's the miscellaneous internal methods: There's the ones that handle the initial block pool (populated when the queue is constructed), and an abstract block pool that comprises the initial pool and any blocks on the free list. There's ones that handle the producer list (a lock-free add-only linked list of all the producers in the system). There's ones that handle the implicit producer lookup table (which is really a sort of specialized TLS lookup). And then there's some helper methods for allocating and freeing objects, and the data members of the queue itself, followed lastly by the free-standing swap functions. [blog]: http://moodycamel.com/blog/2014/a-fast-general-purpose-lock-free-queue-for-c++ [design]: http://moodycamel.com/blog/2014/detailed-design-of-a-lock-free-queue [samples.md]: https://github.com/cameron314/concurrentqueue/blob/master/samples.md [source]: https://github.com/cameron314/concurrentqueue [concurrentqueue.h]: https://github.com/cameron314/concurrentqueue/blob/master/concurrentqueue.h [blockingconcurrentqueue.h]: https://github.com/cameron314/concurrentqueue/blob/master/blockingconcurrentqueue.h [lightweightsemaphore.h]: https://github.com/cameron314/concurrentqueue/blob/master/lightweightsemaphore.h [unittest-src]: https://github.com/cameron314/concurrentqueue/tree/master/tests/unittests [benchmarks]: http://moodycamel.com/blog/2014/a-fast-general-purpose-lock-free-queue-for-c++#benchmarks [benchmark-src]: https://github.com/cameron314/concurrentqueue/tree/master/benchmarks [license]: https://github.com/cameron314/concurrentqueue/blob/master/LICENSE.md [cdschecker]: http://demsky.eecs.uci.edu/c11modelchecker.html [relacy]: http://www.1024cores.net/home/relacy-race-detector [spsc]: https://github.com/cameron314/readerwriterqueue [salsa]: https://iditkeidar.com/wp-content/uploads/files/ftp/spaa049-gidron.pdf ================================================ FILE: benchmarks/benchmarks.cpp ================================================ // ©2013-2014 Cameron Desrochers. // Distributed under the simplified BSD license (see the LICENSE file that // should have come with this file). // Benchmarks for moodycamel::ConcurrentQueue. // Provides comparative timings of various operations under // highly artificial circumstances. You've been warned :-) #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "../blockingconcurrentqueue.h" #include "lockbasedqueue.h" #include "simplelockfree.h" #include "boostqueue.h" #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wdeprecated-declarations" // this uses an old version of OS memory fences on OSX #include "tbbqueue.h" #pragma clang diagnostic pop #include "stdqueue.h" #include "dlibqueue.h" #include "../tests/common/simplethread.h" #include "../tests/common/systemtime.h" #include "cpuid.h" using namespace moodycamel; typedef std::minstd_rand RNG_t; bool precise = false; enum benchmark_type_t { bench_balanced, bench_only_enqueue, bench_only_enqueue_prealloc, bench_only_enqueue_bulk, bench_only_enqueue_bulk_prealloc, bench_only_dequeue, bench_only_dequeue_bulk, bench_mostly_enqueue, bench_mostly_enqueue_bulk, bench_mostly_dequeue, bench_mostly_dequeue_bulk, bench_spmc, bench_spmc_preproduced, bench_mpsc, bench_empty_dequeue, bench_enqueue_dequeue_pairs, bench_heavy_concurrent, BENCHMARK_TYPE_COUNT }; const char BENCHMARK_SHORT_NAMES[BENCHMARK_TYPE_COUNT][32] = { "balanced", "only_enqueue", "only_enqueue_prealloc", "only_enqueue_bulk", "only_enqueue_bulk_prealloc", "only_dequeue", "only_dequeue_bulk", "mostly_enqueue", "mostly_enqueue_bulk", "mostly_dequeue", "mostly_dequeue_bulk", "spmc", "spmc_preproduced", "mpsc", "empty_dequeue", "enqueue_dequeue_pairs", "heavy_concurrent" }; const char BENCHMARK_NAMES[BENCHMARK_TYPE_COUNT][64] = { "balanced", "only enqueue", "only enqueue (pre-allocated)", "only enqueue bulk", "only enqueue bulk (pre-allocated)", "only dequeue", "only dequeue bulk", "mostly enqueue", "mostly enqueue bulk", "mostly dequeue", "mostly dequeue bulk", "single-producer, multi-consumer", "single-producer, multi-consumer (pre-produced)", "multi-producer, single-consumer", "dequeue from empty", "enqueue-dequeue pairs", "heavy concurrent" }; const char BENCHMARK_DESCS[BENCHMARK_TYPE_COUNT][256] = { "Measures the average operation speed with multiple symmetrical threads\n under reasonable load -- small random intervals between accesses", "Measures the average operation speed when all threads are producers", "Measures the average operation speed when all threads are producers,\n and the queue has been stretched out first", "Measures the average speed of enqueueing an item in bulk when all threads are producers", "Measures the average speed of enqueueing an item in bulk when all threads are producers,\n and the queue has been stretched out first", "Measures the average operation speed when all threads are consumers", "Measures the average speed of dequeueing an item in bulk when all threads are consumers", "Measures the average operation speed when most threads are enqueueing", "Measures the average speed of enqueueing an item in bulk under light contention", "Measures the average operation speed when most threads are dequeueing", "Measures the average speed of dequeueing an item in bulk under light contention", "Measures the average speed of dequeueing with only one producer, but multiple consumers", "Measures the average speed of dequeueing from a queue pre-filled by one thread", "Measures the average speed of dequeueing with only one consumer, but multiple producers", "Measures the average speed of attempting to dequeue from an empty queue\n (that eight separate threads had at one point enqueued to)", "Measures the average operation speed with each thread doing an enqueue\n followed by a dequeue", "Measures the average operation speed with many threads under heavy load" }; const char BENCHMARK_SINGLE_THREAD_NOTES[BENCHMARK_TYPE_COUNT][256] = { "", "", "", "", "", "", "", "", "", "", "", "", "", "", "No contention -- measures raw failed dequeue speed on empty queue", "No contention -- measures speed of immediately dequeueing the item that was just enqueued", "" }; int BENCHMARK_THREADS_MEASURED[BENCHMARK_TYPE_COUNT] = { 0, // measures nthreads 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, // nthreads - 1 0, 1, // 1 0, 0, 0, }; int BENCHMARK_THREADS[BENCHMARK_TYPE_COUNT][9] = { { 2, 3, 4, 8, 12, 16, 32, 0, 0 }, { 1, 2, 4, 8, 12, 16, 32, 48, 0 }, { 1, 2, 4, 8, 32, 0, 0, 0, 0 }, { 1, 2, 4, 8, 12, 16, 32, 48, 0 }, { 1, 2, 4, 8, 32, 0, 0, 0, 0 }, { 1, 2, 4, 8, 12, 16, 32, 48, 0 }, { 1, 2, 4, 8, 12, 16, 32, 48, 0 }, { 2, 4, 8, 32, 0, 0, 0, 0, 0 }, { 2, 4, 8, 32, 0, 0, 0, 0, 0 }, { 2, 4, 8, 0, 0, 0, 0, 0, 0 }, { 2, 4, 8, 0, 0, 0, 0, 0, 0 }, { 2, 4, 8, 16, 0, 0, 0, 0, 0 }, { 1, 3, 7, 15, 0, 0, 0, 0, 0 }, { 2, 4, 8, 16, 0, 0, 0, 0, 0 }, { 1, 2, 8, 32, 0, 0, 0, 0, 0 }, { 1, 2, 4, 8, 32, 0, 0, 0, 0 }, { 2, 3, 4, 8, 12, 16, 32, 48, 0 }, }; enum queue_id_t { queue_moodycamel_ConcurrentQueue, queue_moodycamel_BlockingConcurrentQueue, queue_boost, queue_tbb, queue_simplelockfree, queue_lockbased, queue_std, queue_dlib, QUEUE_COUNT }; const char QUEUE_NAMES[QUEUE_COUNT][64] = { "moodycamel::ConcurrentQueue", "moodycamel::BlockingConcurrentQueue", "boost::lockfree::queue", "tbb::concurrent_queue", "SimpleLockFreeQueue", "LockBasedQueue", "std::queue", "dlib::pipe" }; const char QUEUE_SUMMARY_NOTES[QUEUE_COUNT][128] = { "including bulk", "including bulk", "", "", "", "", "single thread only", "" }; const bool QUEUE_TOKEN_SUPPORT[QUEUE_COUNT] = { true, true, false, false, false, false, false, false }; const int QUEUE_MAX_THREADS[QUEUE_COUNT] = { -1, // no limit -1, -1, -1, -1, -1, 1, -1 }; const bool QUEUE_BENCH_SUPPORT[QUEUE_COUNT][BENCHMARK_TYPE_COUNT] = { { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }, { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }, { 1, 1, 1, 0, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1 }, { 1, 1, 1, 0, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1 }, { 1, 1, 1, 0, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1 }, { 1, 1, 1, 0, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1 }, { 0, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0 }, { 1, 1, 1, 0, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1 } }; struct Traits : public moodycamel::ConcurrentQueueDefaultTraits { // Use a slightly larger default block size; the default offers // a good trade off between speed and memory usage, but a bigger // block size will improve throughput (which is mostly what // we're after with these benchmarks). static const size_t BLOCK_SIZE = 64; // Reuse blocks once allocated. static const bool RECYCLE_ALLOCATED_BLOCKS = true; }; typedef std::uint64_t counter_t; const counter_t BULK_BATCH_SIZE = 2300; struct BenchmarkResult { double elapsedTime; counter_t operations; inline bool operator<(BenchmarkResult const& other) const { return elapsedTime < other.elapsedTime; } }; template counter_t rampUpToMeasurableNumberOfMaxOps(TFunc const& func, counter_t startOps = 256) { counter_t ops = startOps; double time; do { time = func(ops); ops *= 2; } while (time < (precise ? 30 : 10)); #ifdef NDEBUG return ops / 2; #else return ops / 4; #endif } counter_t adjustForThreads(counter_t suggestedOps, int nthreads) { return std::max((counter_t)(suggestedOps / std::pow(2, std::sqrt((nthreads - 1) * 3))), suggestedOps / 16); } template counter_t determineMaxOpsForBenchmark(benchmark_type_t benchmark, int nthreads, bool useTokens, unsigned int randSeed) { switch (benchmark) { case bench_balanced: { return adjustForThreads(rampUpToMeasurableNumberOfMaxOps([&](counter_t ops) { TQueue q; RNG_t rng(randSeed * 1); std::uniform_int_distribution rand(0, 20); double total = 0; SystemTime start; item_t item = 1; for (counter_t i = 0; i != ops; ++i) { start = getSystemTime(); q.enqueue(item); total += getTimeDelta(start); } return total; }), nthreads); } case bench_only_enqueue: case bench_only_enqueue_prealloc: case bench_mostly_enqueue: { return adjustForThreads(rampUpToMeasurableNumberOfMaxOps([](counter_t ops) { TQueue q; item_t item = 1; auto start = getSystemTime(); for (counter_t i = 0; i != ops; ++i) { q.enqueue(item); } return getTimeDelta(start); }), nthreads); } case bench_only_dequeue: case bench_mostly_dequeue: case bench_spmc: case bench_spmc_preproduced: case bench_mpsc: { return adjustForThreads(rampUpToMeasurableNumberOfMaxOps([](counter_t ops) { TQueue q; item_t item = 1; for (counter_t i = 0; i != ops; ++i) { q.enqueue(item); } item_t item_rec; auto start = getSystemTime(); for (counter_t i = 0; i != ops; ++i) { q.try_dequeue(item_rec); } return getTimeDelta(start); }), nthreads); } case bench_only_enqueue_bulk: case bench_only_enqueue_bulk_prealloc: case bench_mostly_enqueue_bulk: { std::vector data; for (counter_t i = 0; i != BULK_BATCH_SIZE; ++i) { data.push_back(i); } return adjustForThreads(rampUpToMeasurableNumberOfMaxOps([&](counter_t ops) { TQueue q; auto start = getSystemTime(); for (counter_t i = 0; i != ops; ++i) { q.enqueue_bulk(data.cbegin(), data.size()); } return getTimeDelta(start); }), nthreads); } case bench_only_dequeue_bulk: case bench_mostly_dequeue_bulk: { return adjustForThreads(rampUpToMeasurableNumberOfMaxOps([](counter_t ops) { TQueue q; std::vector data(BULK_BATCH_SIZE); for (counter_t i = 0; i != ops; ++i) { q.enqueue_bulk(data.cbegin(), data.size()); } auto start = getSystemTime(); for (counter_t i = 0; i != ops; ++i) { q.try_dequeue_bulk(data.begin(), data.size()); } return getTimeDelta(start); }), nthreads); return 0; } case bench_empty_dequeue: { return adjustForThreads(rampUpToMeasurableNumberOfMaxOps([](counter_t ops) { TQueue q; item_t item_rec; auto start = getSystemTime(); for (counter_t i = 0; i != ops; ++i) { q.try_dequeue(item_rec); } return getTimeDelta(start); }), nthreads); } case bench_enqueue_dequeue_pairs: { return adjustForThreads(rampUpToMeasurableNumberOfMaxOps([](counter_t ops) { TQueue q; item_t item = 1; item_t item_rec; auto start = getSystemTime(); for (counter_t i = 0; i != ops; ++i) { q.enqueue(item); q.try_dequeue(item_rec); } return getTimeDelta(start); }), nthreads); } case bench_heavy_concurrent: { return adjustForThreads(rampUpToMeasurableNumberOfMaxOps([](counter_t ops) { TQueue q; item_t item=1; item_t item_rec; auto start = getSystemTime(); for (counter_t i = 0; i != ops; ++i) { q.enqueue(item); q.try_dequeue(item_rec); } return getTimeDelta(start); }), nthreads); } default: assert(false && "Every benchmark type must be handled here!"); return 0; } } // Returns time elapsed, in (fractional) milliseconds template double runBenchmark(benchmark_type_t benchmark, int nthreads, bool useTokens, unsigned int randSeed, counter_t maxOps, int maxThreads, counter_t& out_opCount) { double result = 0; volatile int forceNoOptimizeDummy; switch (benchmark) { case bench_balanced: { // Measures the average operation speed with multiple symmetrical threads under reasonable load TQueue q; std::vector threads(nthreads); std::vector ops(nthreads); std::vector times(nthreads); std::atomic ready(0); item_t item_rec; item_t item = 1; for (int tid = 0; tid != nthreads; ++tid) { threads[tid] = SimpleThread([&](int id) { ready.fetch_add(1, std::memory_order_relaxed); while (ready.load(std::memory_order_relaxed) != nthreads) continue; SystemTime start; RNG_t rng(randSeed * (id + 1)); std::uniform_int_distribution rand(0, 20); ops[id] = 0; times[id] = 0; typename TQueue::consumer_token_t consTok(q); typename TQueue::producer_token_t prodTok(q); for (counter_t i = 0; i != maxOps; ++i) { if (rand(rng) == 0) { start = getSystemTime(); if ((i & 1) == 0) { if (useTokens) { q.try_dequeue(consTok, item_rec); } else { q.try_dequeue(item_rec); } } else { if (useTokens) { q.enqueue(prodTok, item); } else { q.enqueue(item); } } times[id] += getTimeDelta(start); ++ops[id]; } } }, tid); } out_opCount = 0; result = 0; for (int tid = 0; tid != nthreads; ++tid) { threads[tid].join(); out_opCount += ops[tid]; result += times[tid]; } forceNoOptimizeDummy = q.try_dequeue(item_rec) ? 1 : 0; break; } case bench_only_enqueue_prealloc: { out_opCount = maxOps * nthreads; TQueue q; item_t item = 1; item_t item_rec; { // Enqueue opcount elements first, then dequeue them; this // will "stretch out" the queue, letting implementatations // that re-use memory internally avoid having to allocate // more later during the timed enqueue operations. std::vector threads(nthreads); for (int tid = 0; tid != nthreads; ++tid) { threads[tid] = SimpleThread([&](int id) { if (useTokens) { typename TQueue::producer_token_t tok(q); for (counter_t i = 0; i != maxOps; ++i) { q.enqueue(tok, item); } } else { for (counter_t i = 0; i != maxOps; ++i) { q.enqueue(item); } } }, tid); } for (int tid = 0; tid != nthreads; ++tid) { threads[tid].join(); } // Now empty the queue while (q.try_dequeue(item_rec)) continue; } if (nthreads == 1) { // No contention -- measures raw single-item enqueue speed auto start = getSystemTime(); if (useTokens) { typename TQueue::producer_token_t tok(q); for (counter_t i = 0; i != maxOps; ++i) { q.enqueue(tok, item); } } else { for (counter_t i = 0; i != maxOps; ++i) { q.enqueue(item); } } result = getTimeDelta(start); } else { std::vector threads(nthreads); std::vector timings(nthreads); std::atomic ready(0); for (int tid = 0; tid != nthreads; ++tid) { threads[tid] = SimpleThread([&](int id) { ready.fetch_add(1, std::memory_order_relaxed); while (ready.load(std::memory_order_relaxed) != nthreads) continue; auto start = getSystemTime(); if (useTokens) { typename TQueue::producer_token_t tok(q); for (counter_t i = 0; i != maxOps; ++i) { q.enqueue(tok, item); } } else { for (counter_t i = 0; i != maxOps; ++i) { q.enqueue(item); } } timings[id] = getTimeDelta(start); }, tid); } result = 0; for (int tid = 0; tid != nthreads; ++tid) { threads[tid].join(); result += timings[tid]; } } forceNoOptimizeDummy = q.try_dequeue(item_rec) ? 1 : 0; break; } case bench_only_enqueue: { out_opCount = maxOps * nthreads; TQueue q; item_t item = 1; item_t item_rec; if (nthreads == 1) { // No contention -- measures raw single-item enqueue speed auto start = getSystemTime(); if (useTokens) { typename TQueue::producer_token_t tok(q); for (counter_t i = 0; i != maxOps; ++i) { q.enqueue(tok, item); } } else { for (counter_t i = 0; i != maxOps; ++i) { q.enqueue(item); } } result = getTimeDelta(start); } else { std::vector threads(nthreads); std::vector timings(nthreads); std::atomic ready(0); for (int tid = 0; tid != nthreads; ++tid) { threads[tid] = SimpleThread([&](int id) { ready.fetch_add(1, std::memory_order_relaxed); while (ready.load(std::memory_order_relaxed) != nthreads) continue; auto start = getSystemTime(); if (useTokens) { typename TQueue::producer_token_t tok(q); for (counter_t i = 0; i != maxOps; ++i) { q.enqueue(tok, item); } } else { for (counter_t i = 0; i != maxOps; ++i) { q.enqueue(item); } } timings[id] = getTimeDelta(start); }, tid); } result = 0; for (int tid = 0; tid != nthreads; ++tid) { threads[tid].join(); result += timings[tid]; } } forceNoOptimizeDummy = q.try_dequeue(item_rec) ? 1 : 0; break; } case bench_spmc_preproduced: case bench_only_dequeue: { out_opCount = maxOps * nthreads; TQueue q; item_t item = 1; item_t item_rec; { // Fill up the queue first std::vector threads(benchmark == bench_spmc_preproduced ? 1 : nthreads); counter_t itemsPerThread = benchmark == bench_spmc_preproduced ? maxOps * nthreads : maxOps; for (size_t tid = 0; tid != threads.size(); ++tid) { threads[tid] = SimpleThread([&](size_t id) { if (useTokens) { typename TQueue::producer_token_t tok(q); for (counter_t i = 0; i != itemsPerThread; ++i) { q.enqueue(tok, item); } } else { for (counter_t i = 0; i != itemsPerThread; ++i) { q.enqueue(item); } } }, tid); } for (size_t tid = 0; tid != threads.size(); ++tid) { threads[tid].join(); } } if (nthreads == 1) { // No contention -- measures raw single-item dequeue speed auto start = getSystemTime(); if (useTokens) { typename TQueue::consumer_token_t tok(q); for (counter_t i = 0; i != maxOps; ++i) { q.try_dequeue(tok, item_rec); } } else { for (counter_t i = 0; i != maxOps; ++i) { q.try_dequeue(item_rec); } } result = getTimeDelta(start); } else { std::vector threads(nthreads); std::vector timings(nthreads); std::atomic ready(0); for (int tid = 0; tid != nthreads; ++tid) { threads[tid] = SimpleThread([&](int id) { ready.fetch_add(1, std::memory_order_relaxed); while (ready.load(std::memory_order_relaxed) != nthreads) continue; auto start = getSystemTime(); if (useTokens) { typename TQueue::consumer_token_t tok(q); for (counter_t i = 0; i != maxOps; ++i) { q.try_dequeue(tok, item_rec); } } else { for (counter_t i = 0; i != maxOps; ++i) { q.try_dequeue(item_rec); } } timings[id] = getTimeDelta(start); }, tid); } result = 0; for (int tid = 0; tid != nthreads; ++tid) { threads[tid].join(); result += timings[tid]; } } forceNoOptimizeDummy = q.try_dequeue(item_rec) ? 1 : 0; break; } case bench_mostly_enqueue: { // Measures the average operation speed when most threads are enqueueing TQueue q; item_t item = 1; item_t item_rec; out_opCount = maxOps * nthreads; std::vector threads(nthreads); std::vector timings(nthreads); auto dequeueThreads = std::max(1, nthreads / 4); std::atomic ready(0); for (int tid = 0; tid != nthreads - dequeueThreads; ++tid) { threads[tid] = SimpleThread([&](int id) { ready.fetch_add(1, std::memory_order_relaxed); while (ready.load(std::memory_order_relaxed) != nthreads) continue; auto start = getSystemTime(); if (useTokens) { typename TQueue::producer_token_t tok(q); for (counter_t i = 0; i != maxOps; ++i) { q.enqueue(tok, item); } } else { for (counter_t i = 0; i != maxOps; ++i) { q.enqueue(item); } } timings[id] = getTimeDelta(start); }, tid); } for (int tid = nthreads - dequeueThreads; tid != nthreads; ++tid) { threads[tid] = SimpleThread([&](int id) { ready.fetch_add(1, std::memory_order_relaxed); while (ready.load(std::memory_order_relaxed) != nthreads) continue; auto start = getSystemTime(); if (useTokens) { typename TQueue::consumer_token_t tok(q); for (counter_t i = 0; i != maxOps; ++i) { q.try_dequeue(tok, item_rec); } } else { for (counter_t i = 0; i != maxOps; ++i) { q.try_dequeue(item_rec); } } timings[id] = getTimeDelta(start); }, tid); } result = 0; for (int tid = 0; tid != nthreads; ++tid) { threads[tid].join(); result += timings[tid]; } forceNoOptimizeDummy = q.try_dequeue(item_rec) ? 1 : 0; break; } case bench_mostly_dequeue: { // Measures the average operation speed when most threads are dequeueing TQueue q; item_t item = 1; item_t item_rec; out_opCount = maxOps * nthreads; std::vector threads(nthreads); std::vector timings(nthreads); auto enqueueThreads = std::max(1, nthreads / 4); { // Fill up the queue first std::vector threads(enqueueThreads); for (int tid = 0; tid != enqueueThreads; ++tid) { threads[tid] = SimpleThread([&](int id) { if (useTokens) { typename TQueue::producer_token_t tok(q); for (counter_t i = 0; i != maxOps; ++i) { q.enqueue(tok, item); } } else { for (counter_t i = 0; i != maxOps; ++i) { q.enqueue(item); } } }, tid); } for (int tid = 0; tid != enqueueThreads; ++tid) { threads[tid].join(); } } std::atomic ready(0); for (int tid = 0; tid != nthreads - enqueueThreads; ++tid) { threads[tid] = SimpleThread([&](int id) { ready.fetch_add(1, std::memory_order_relaxed); while (ready.load(std::memory_order_relaxed) != nthreads) continue; auto start = getSystemTime(); if (useTokens) { typename TQueue::consumer_token_t tok(q); for (counter_t i = 0; i != maxOps; ++i) { q.try_dequeue(tok, item_rec); } } else { for (counter_t i = 0; i != maxOps; ++i) { q.try_dequeue(item_rec); } } timings[id] = getTimeDelta(start); }, tid); } for (int tid = nthreads - enqueueThreads; tid != nthreads; ++tid) { threads[tid] = SimpleThread([&](int id) { ready.fetch_add(1, std::memory_order_relaxed); while (ready.load(std::memory_order_relaxed) != nthreads) continue; auto start = getSystemTime(); if (useTokens) { typename TQueue::producer_token_t tok(q); for (counter_t i = 0; i != maxOps; ++i) { q.enqueue(tok, item); } } else { for (counter_t i = 0; i != maxOps; ++i) { q.enqueue(item); } } timings[id] = getTimeDelta(start); }, tid); } result = 0; for (int tid = 0; tid != nthreads; ++tid) { threads[tid].join(); result += timings[tid]; } forceNoOptimizeDummy = q.try_dequeue(item_rec) ? 1 : 0; break; } case bench_only_enqueue_bulk_prealloc: { TQueue q; item_t item = 1; item_t item_rec; { // Enqueue opcount elements first, then dequeue them; this // will "stretch out" the queue, letting implementatations // that re-use memory internally avoid having to allocate // more later during the timed enqueue operations. std::vector threads(nthreads); for (int tid = 0; tid != nthreads; ++tid) { threads[tid] = SimpleThread([&](int id) { if (useTokens) { typename TQueue::producer_token_t tok(q); for (counter_t i = 0; i != maxOps; ++i) { q.enqueue(tok, item); } } else { for (counter_t i = 0; i != maxOps; ++i) { q.enqueue(item); } } }, tid); } for (int tid = 0; tid != nthreads; ++tid) { threads[tid].join(); } // Now empty the queue while (q.try_dequeue(item_rec)) continue; } std::vector data; for (counter_t i = 0; i != BULK_BATCH_SIZE; ++i) { data.push_back(i); } out_opCount = maxOps * BULK_BATCH_SIZE * nthreads; if (nthreads == 1) { auto start = getSystemTime(); if (useTokens) { typename TQueue::producer_token_t tok(q); for (counter_t i = 0; i != maxOps; ++i) { q.enqueue_bulk(tok, data.cbegin(), data.size()); } } else { for (counter_t i = 0; i != maxOps; ++i) { q.enqueue_bulk(data.cbegin(), data.size()); } } result = getTimeDelta(start); } else { std::vector threads(nthreads); std::vector timings(nthreads); std::atomic ready(0); for (int tid = 0; tid != nthreads; ++tid) { threads[tid] = SimpleThread([&](int id) { ready.fetch_add(1, std::memory_order_relaxed); while (ready.load(std::memory_order_relaxed) != nthreads) continue; auto start = getSystemTime(); if (useTokens) { typename TQueue::producer_token_t tok(q); for (counter_t i = 0; i != maxOps; ++i) { q.enqueue_bulk(tok, data.cbegin(), data.size()); } } else { for (counter_t i = 0; i != maxOps; ++i) { q.enqueue_bulk(data.cbegin(), data.size()); } } timings[id] = getTimeDelta(start); }, tid); } result = 0; for (int tid = 0; tid != nthreads; ++tid) { threads[tid].join(); result += timings[tid]; } } forceNoOptimizeDummy = q.try_dequeue(item_rec) ? 1 : 0; break; } case bench_only_enqueue_bulk: { TQueue q; item_t item_rec; std::vector data; for (counter_t i = 0; i != BULK_BATCH_SIZE; ++i) { data.push_back(i); } out_opCount = maxOps * BULK_BATCH_SIZE * nthreads; if (nthreads == 1) { auto start = getSystemTime(); if (useTokens) { typename TQueue::producer_token_t tok(q); for (counter_t i = 0; i != maxOps; ++i) { q.enqueue_bulk(tok, data.cbegin(), data.size()); } } else { for (counter_t i = 0; i != maxOps; ++i) { q.enqueue_bulk(data.cbegin(), data.size()); } } result = getTimeDelta(start); } else { std::vector threads(nthreads); std::vector timings(nthreads); std::atomic ready(0); for (int tid = 0; tid != nthreads; ++tid) { threads[tid] = SimpleThread([&](int id) { ready.fetch_add(1, std::memory_order_relaxed); while (ready.load(std::memory_order_relaxed) != nthreads) continue; auto start = getSystemTime(); if (useTokens) { typename TQueue::producer_token_t tok(q); for (counter_t i = 0; i != maxOps; ++i) { q.enqueue_bulk(tok, data.cbegin(), data.size()); } } else { for (counter_t i = 0; i != maxOps; ++i) { q.enqueue_bulk(data.cbegin(), data.size()); } } timings[id] = getTimeDelta(start); }, tid); } result = 0; for (int tid = 0; tid != nthreads; ++tid) { threads[tid].join(); result += timings[tid]; } } forceNoOptimizeDummy = q.try_dequeue(item_rec) ? 1 : 0; break; } case bench_mostly_enqueue_bulk: { // Measures the average speed of enqueueing in bulk under light contention TQueue q; item_t item_rec; std::vector data; for (counter_t i = 0; i != BULK_BATCH_SIZE; ++i) { data.push_back(i); } std::vector threads(nthreads); std::vector timings(nthreads); auto dequeueThreads = std::max(1, nthreads / 4); std::vector ops(nthreads - dequeueThreads); out_opCount = maxOps * BULK_BATCH_SIZE * (nthreads - dequeueThreads); // dequeue ops added after std::atomic ready(0); for (int tid = 0; tid != nthreads - dequeueThreads; ++tid) { threads[tid] = SimpleThread([&](int id) { ready.fetch_add(1, std::memory_order_relaxed); while (ready.load(std::memory_order_relaxed) != nthreads) continue; auto start = getSystemTime(); if (useTokens) { typename TQueue::producer_token_t tok(q); for (counter_t i = 0; i != maxOps; ++i) { q.enqueue_bulk(tok, data.cbegin(), data.size()); } } else { for (counter_t i = 0; i != maxOps; ++i) { q.enqueue_bulk(data.cbegin(), data.size()); } } timings[id] = getTimeDelta(start); }, tid); } for (int tid = nthreads - dequeueThreads; tid != nthreads; ++tid) { threads[tid] = SimpleThread([&](int id, int idBase0) { std::vector items(BULK_BATCH_SIZE); ready.fetch_add(1, std::memory_order_relaxed); while (ready.load(std::memory_order_relaxed) != nthreads) continue; counter_t totalOps = 0; auto start = getSystemTime(); if (useTokens) { typename TQueue::consumer_token_t tok(q); for (counter_t i = 0; i != maxOps; ++i) { auto actual = q.try_dequeue_bulk(tok, items.begin(), items.size()); totalOps += actual + (actual == items.size() ? 0 : 1); } } else { for (counter_t i = 0; i != maxOps; ++i) { auto actual = q.try_dequeue_bulk(items.begin(), items.size()); totalOps += actual + (actual == items.size() ? 0 : 1); } } timings[id] = getTimeDelta(start); ops[idBase0] = totalOps; }, tid, tid - (nthreads - dequeueThreads)); } result = 0; for (int tid = 0; tid != nthreads; ++tid) { threads[tid].join(); result += timings[tid]; if (tid < dequeueThreads) { out_opCount += ops[tid]; } } forceNoOptimizeDummy = q.try_dequeue(item_rec) ? 1 : 0; break; } case bench_only_dequeue_bulk: { // Measures the average speed of dequeueing in bulk when all threads are consumers TQueue q; item_t item_rec; { // Fill up the queue first std::vector data(BULK_BATCH_SIZE); for (int i = 0; i != BULK_BATCH_SIZE; ++i) { data[i] = i; } std::vector threads(nthreads); for (int tid = 0; tid != nthreads; ++tid) { threads[tid] = SimpleThread([&](int id) { if (useTokens) { typename TQueue::producer_token_t tok(q); for (counter_t i = 0; i != maxOps; ++i) { q.enqueue_bulk(tok, data.cbegin(), data.size()); } } else { for (counter_t i = 0; i != maxOps; ++i) { q.enqueue_bulk(data.cbegin(), data.size()); } } }, tid); } for (int tid = 0; tid != nthreads; ++tid) { threads[tid].join(); } } if (nthreads == 1) { out_opCount = maxOps * BULK_BATCH_SIZE; auto start = getSystemTime(); std::vector items(BULK_BATCH_SIZE); if (useTokens) { typename TQueue::consumer_token_t tok(q); for (counter_t i = 0; i != maxOps; ++i) { q.try_dequeue_bulk(tok, items.begin(), items.size()); } } else { for (counter_t i = 0; i != maxOps; ++i) { q.try_dequeue_bulk(items.begin(), items.size()); } } result = getTimeDelta(start); } else { std::vector threads(nthreads); std::vector timings(nthreads); std::vector ops(nthreads); std::atomic ready(0); for (int tid = 0; tid != nthreads; ++tid) { threads[tid] = SimpleThread([&](int id) { std::vector items(BULK_BATCH_SIZE); ready.fetch_add(1, std::memory_order_relaxed); while (ready.load(std::memory_order_relaxed) != nthreads) continue; counter_t totalOps = 0; auto start = getSystemTime(); if (useTokens) { typename TQueue::consumer_token_t tok(q); for (counter_t i = 0; i != maxOps; ++i) { auto actual = q.try_dequeue_bulk(tok, items.begin(), items.size()); totalOps += actual + (actual == items.size() ? 0 : 1); } } else { for (counter_t i = 0; i != maxOps; ++i) { auto actual = q.try_dequeue_bulk(items.begin(), items.size()); totalOps += actual + (actual == items.size() ? 0 : 1); } } timings[id] = getTimeDelta(start); ops[id] = totalOps; }, tid); } result = 0; out_opCount = 0; for (int tid = 0; tid != nthreads; ++tid) { threads[tid].join(); result += timings[tid]; out_opCount += ops[tid]; } } forceNoOptimizeDummy = q.try_dequeue(item_rec) ? 1 : 0; break; } case bench_mostly_dequeue_bulk: { // Measures the average speed of dequeueing in bulk under light contention TQueue q; item_t item_rec; auto enqueueThreads = std::max(1, nthreads / 4); out_opCount = maxOps * BULK_BATCH_SIZE * enqueueThreads; std::vector threads(nthreads); std::vector timings(nthreads); std::vector ops(nthreads - enqueueThreads); std::vector enqueueData(BULK_BATCH_SIZE); for (int i = 0; i != BULK_BATCH_SIZE; ++i) { enqueueData[i] = i; } { // Fill up the queue first std::vector threads(enqueueThreads); for (int tid = 0; tid != enqueueThreads; ++tid) { threads[tid] = SimpleThread([&](int id) { if (useTokens) { typename TQueue::producer_token_t tok(q); for (counter_t i = 0; i != maxOps; ++i) { q.enqueue_bulk(tok, enqueueData.cbegin(), enqueueData.size()); } } else { for (counter_t i = 0; i != maxOps; ++i) { q.enqueue_bulk(enqueueData.cbegin(), enqueueData.size()); } } }, tid); } for (int tid = 0; tid != enqueueThreads; ++tid) { threads[tid].join(); } } std::atomic ready(0); for (int tid = 0; tid != nthreads - enqueueThreads; ++tid) { threads[tid] = SimpleThread([&](int id) { std::vector data(BULK_BATCH_SIZE); ready.fetch_add(1, std::memory_order_relaxed); while (ready.load(std::memory_order_relaxed) != nthreads) continue; counter_t totalOps = 0; auto start = getSystemTime(); if (useTokens) { typename TQueue::consumer_token_t tok(q); for (counter_t i = 0; i != maxOps; ++i) { auto actual = q.try_dequeue_bulk(tok, data.begin(), data.size()); totalOps += actual + (actual == data.size() ? 0 : 1); } } else { for (counter_t i = 0; i != maxOps; ++i) { auto actual = q.try_dequeue_bulk(data.begin(), data.size()); totalOps += actual + (actual == data.size() ? 0 : 1); } } timings[id] = getTimeDelta(start); ops[id] = totalOps; }, tid); } for (int tid = nthreads - enqueueThreads; tid != nthreads; ++tid) { threads[tid] = SimpleThread([&](int id) { ready.fetch_add(1, std::memory_order_relaxed); while (ready.load(std::memory_order_relaxed) != nthreads) continue; auto start = getSystemTime(); if (useTokens) { typename TQueue::producer_token_t tok(q); for (counter_t i = 0; i != maxOps; ++i) { q.enqueue_bulk(tok, enqueueData.cbegin(), enqueueData.size()); } } else { for (counter_t i = 0; i != maxOps; ++i) { q.enqueue_bulk(enqueueData.cbegin(), enqueueData.size()); } } timings[id] = getTimeDelta(start); }, tid); } result = 0; for (int tid = 0; tid != nthreads; ++tid) { threads[tid].join(); result += timings[tid]; if (tid < nthreads - enqueueThreads) { out_opCount += ops[tid]; } } forceNoOptimizeDummy = q.try_dequeue(item_rec) ? 1 : 0; break; } case bench_spmc: { counter_t elementsToDequeue = maxOps * (nthreads - 1); TQueue q; item_t item = 1; item_t item_rec; std::vector threads(nthreads - 1); std::vector timings(nthreads - 1); std::vector ops(nthreads - 1); std::atomic lynchpin(false); std::atomic totalDequeued(0); for (int tid = 0; tid != nthreads - 1; ++tid) { threads[tid] = SimpleThread([&](int id) { while (!lynchpin.load(std::memory_order_relaxed)) { continue; } int item; counter_t i = 0; auto start = getSystemTime(); if (useTokens) { typename TQueue::consumer_token_t tok(q); while (true) { if (q.try_dequeue(tok, item)) { totalDequeued.fetch_add(1, std::memory_order_relaxed); } else if (totalDequeued.load(std::memory_order_relaxed) == elementsToDequeue) { break; } ++i; } } else { while (true) { if (q.try_dequeue(item_rec)) { totalDequeued.fetch_add(1, std::memory_order_relaxed); } else if (totalDequeued.load(std::memory_order_relaxed) == elementsToDequeue) { break; } ++i; } } timings[id] = getTimeDelta(start); ops[id] = i; }, tid); } lynchpin.store(true, std::memory_order_seq_cst); for (counter_t i = 0; i != elementsToDequeue; ++i) { q.enqueue(item); } result = 0; out_opCount = 0; for (int tid = 0; tid != nthreads - 1; ++tid) { threads[tid].join(); result += timings[tid]; out_opCount += ops[tid]; } forceNoOptimizeDummy = q.try_dequeue(item_rec) ? 1 : 0; break; } case bench_mpsc: { TQueue q; item_t item = 1; item_t item_rec; counter_t elementsToDequeue = maxOps * (nthreads - 1); std::vector threads(nthreads); std::atomic ready(0); for (int tid = 0; tid != nthreads; ++tid) { if (tid == 0) { // Consumer thread threads[tid] = SimpleThread([&](int id) { ready.fetch_add(1, std::memory_order_seq_cst); while (ready.load(std::memory_order_relaxed) != nthreads) continue; int item; out_opCount = 0; auto start = getSystemTime(); if (useTokens) { typename TQueue::consumer_token_t tok(q); for (counter_t i = 0; i != elementsToDequeue;) { i += q.try_dequeue(tok, item) ? 1 : 0; ++out_opCount; } } else { for (counter_t i = 0; i != elementsToDequeue;) { i += q.try_dequeue(item_rec) ? 1 : 0; ++out_opCount; } } result = getTimeDelta(start); }, tid); } else { threads[tid] = SimpleThread([&](int id) { ready.fetch_add(1, std::memory_order_seq_cst); while (ready.load(std::memory_order_relaxed) != nthreads) continue; if (useTokens) { typename TQueue::producer_token_t tok(q); for (counter_t i = 0; i != maxOps; ++i) { q.enqueue(tok, item); } } else { for (counter_t i = 0; i != maxOps; ++i) { q.enqueue(item); } } }, tid); } } for (int tid = 0; tid != nthreads; ++tid) { threads[tid].join(); } forceNoOptimizeDummy = q.try_dequeue(item_rec) ? 1 : 0; break; } case bench_empty_dequeue: { // Measures the average speed of attempting to dequeue from an empty queue TQueue q; item_t item = 1; item_t item_rec; // Fill up then empty the queue first { std::vector threads(maxThreads > 0 ? maxThreads : 8); for (size_t tid = 0; tid != threads.size(); ++tid) { threads[tid] = SimpleThread([&](size_t id) { if (useTokens) { typename TQueue::producer_token_t tok(q); for (counter_t i = 0; i != 10000; ++i) { q.enqueue(tok, item); } } else { for (counter_t i = 0; i != 10000; ++i) { q.enqueue(item); } } }, tid); } for (size_t tid = 0; tid != threads.size(); ++tid) { threads[tid].join(); } // Empty the queue while (q.try_dequeue(item_rec)) continue; } if (nthreads == 1) { // No contention -- measures raw failed dequeue speed on empty queue int item; out_opCount = maxOps; auto start = getSystemTime(); if (useTokens) { typename TQueue::consumer_token_t tok(q); for (counter_t i = 0; i != maxOps; ++i) { q.try_dequeue(tok, item); } } else { for (counter_t i = 0; i != maxOps; ++i) { q.try_dequeue(item_rec); } } result = getTimeDelta(start); forceNoOptimizeDummy = q.try_dequeue(item_rec) ? 1 : 0; } else { out_opCount = maxOps * nthreads; std::vector threads(nthreads); std::vector timings(nthreads); std::atomic ready(0); for (int tid = 0; tid != nthreads; ++tid) { threads[tid] = SimpleThread([&](int id) { ready.fetch_add(1, std::memory_order_relaxed); while (ready.load(std::memory_order_relaxed) != nthreads) continue; int item; auto start = getSystemTime(); if (useTokens) { typename TQueue::consumer_token_t tok(q); for (counter_t i = 0; i != maxOps; ++i) { q.try_dequeue(tok, item); } } else { for (counter_t i = 0; i != maxOps; ++i) { q.try_dequeue(item_rec); } } timings[id] = getTimeDelta(start); }, tid); } result = 0; for (int tid = 0; tid != nthreads; ++tid) { threads[tid].join(); result += timings[tid]; } forceNoOptimizeDummy = q.try_dequeue(item_rec) ? 1 : 0; } break; } case bench_enqueue_dequeue_pairs: { // Measures the average speed of attempting to dequeue from an empty queue // (that eight separate threads had at one point enqueued to) out_opCount = maxOps * 2 * nthreads; TQueue q; item_t item_rec; if (nthreads == 1) { // No contention -- measures speed of immediately dequeueing the item that was just enqueued int item = 0; auto start = getSystemTime(); if (useTokens) { typename TQueue::producer_token_t prodTok(q); typename TQueue::consumer_token_t consTok(q); for (counter_t i = 0; i != maxOps; ++i) { q.enqueue(prodTok, item); q.try_dequeue(consTok, item); } } else { for (counter_t i = 0; i != maxOps; ++i) { q.enqueue(item); q.try_dequeue(item_rec); } } result = getTimeDelta(start); forceNoOptimizeDummy = q.try_dequeue(item_rec) ? 1 : 0; } else { std::vector threads(nthreads); std::vector timings(nthreads); std::atomic ready(0); for (int tid = 0; tid != nthreads; ++tid) { threads[tid] = SimpleThread([&](int id) { ready.fetch_add(1, std::memory_order_relaxed); while (ready.load(std::memory_order_relaxed) != nthreads) continue; int item = 0; auto start = getSystemTime(); if (useTokens) { typename TQueue::producer_token_t prodTok(q); typename TQueue::consumer_token_t consTok(q); for (counter_t i = 0; i != maxOps; ++i) { q.enqueue(prodTok, item); q.try_dequeue(consTok, item); } } else { for (counter_t i = 0; i != maxOps; ++i) { q.enqueue(item); q.try_dequeue(item_rec); } } timings[id] = getTimeDelta(start); }, tid); } result = 0; for (int tid = 0; tid != nthreads; ++tid) { threads[tid].join(); result += timings[tid]; } forceNoOptimizeDummy = q.try_dequeue(item_rec) ? 1 : 0; } break; } case bench_heavy_concurrent: { // Measures the average operation speed with many threads under heavy load out_opCount = maxOps * nthreads; TQueue q; item_t item = 1; item_t item_rec; std::vector threads(nthreads); std::vector timings(nthreads); std::atomic ready(0); for (int tid = 0; tid != nthreads; ++tid) { threads[tid] = SimpleThread([&](int id) { ready.fetch_add(1, std::memory_order_relaxed); while (ready.load(std::memory_order_relaxed) != nthreads) continue; auto start = getSystemTime(); if (id < 2) { // Alternate int item = 0; if (useTokens) { typename TQueue::consumer_token_t consTok(q); typename TQueue::producer_token_t prodTok(q); for (counter_t i = 0; i != maxOps / 2; ++i) { q.try_dequeue(consTok, item); q.enqueue(prodTok, item); } } else { for (counter_t i = 0; i != maxOps / 2; ++i) { q.try_dequeue(item_rec); q.enqueue(item); } } } else { if ((id & 1) == 0) { // Enqueue if (useTokens) { typename TQueue::producer_token_t prodTok(q); for (counter_t i = 0; i != maxOps; ++i) { q.enqueue(prodTok, item); } } else { for (counter_t i = 0; i != maxOps; ++i) { q.enqueue(item); } } } else { // Dequeue int item; if (useTokens) { typename TQueue::consumer_token_t consTok(q); for (counter_t i = 0; i != maxOps; ++i) { q.try_dequeue(consTok, item); } } else { for (counter_t i = 0; i != maxOps; ++i) { q.try_dequeue(item_rec); } } } } timings[id] = getTimeDelta(start); }, tid); } result = 0; for (int tid = 0; tid != nthreads; ++tid) { threads[tid].join(); result += timings[tid]; } forceNoOptimizeDummy = q.try_dequeue(item_rec) ? 1 : 0; break; } default: assert(false && "Every benchmark type must be handled here!"); result = 0; out_opCount = 0; } (void)forceNoOptimizeDummy; return result; } const char* LOG_FILE = "benchmarks.log"; std::ofstream* logOut; bool logErrorReported = false; void sayf(int indent, const char* fmt, ...) { static char indentBuffer[] = " "; static char buf[2048]; indentBuffer[indent] = '\0'; va_list arglist; va_start(arglist, fmt); vsprintf(buf, fmt, arglist); va_end(arglist); if (*logOut) { (*logOut) << indentBuffer << buf; } else if (!logErrorReported) { std::printf("Note: Error writing to log file. Future output will appear only on stdout\n"); logErrorReported = true; } std::printf("%s%s", indentBuffer, buf); indentBuffer[indent] = ' '; } // Returns a formatted timestamp. // Returned buffer is only valid until the next call. // Not thread-safe. static const char* timestamp() { static char buf[32]; time_t time = std::time(NULL); strcpy(buf, std::asctime(std::localtime(&time))); buf[strlen(buf) - 1] = '\0'; // Remove trailing newline return buf; } static inline bool isvowel(char ch) { ch = std::tolower(ch); for (const char* v = "aeiou"; *v != '\0'; ++v) { if (*v == ch) { return true; } } return false; } static inline double safe_divide(double a, double b) { return b == 0 ? 0 : a / b; } // Returns a positive number formatted in a string in a human-readable way. // The string is always 7 characters or less (excluding null byte). // Returned buffer is only valid until the sixteenth next call. // Not thread safe. static const char* pretty(double num) { assert(num >= 0); #if defined(_MSC_VER) && _MSC_VER < 1800 if (!_finite(num)) { return "inf"; } if (_isnan(num)) { return "nan"; } #else if (std::isinf(num)) { return "inf"; } if (std::isnan(num)) { return "nan"; } #endif static char bufs[16][8]; static int nextBuf = 0; char* buf = bufs[nextBuf++]; nextBuf &= 15; int suffix = 0; if (num < 1) { static const char minisufs[] = "\0munpfazy"; while (num < 0.01) { ++suffix; num *= 1000; } sprintf(buf, "%1.4f%c", num, minisufs[suffix]); } else { static const char megasufs[] = "\0kMGTPEZY"; while (num >= 1000) { ++suffix; num /= 1000; } sprintf(buf, "%.2f%c", num, megasufs[suffix]); } return buf; } void printBenchmarkNames() { std::printf(" Supported benchmarks are:\n"); for (int i = 0; i != BENCHMARK_TYPE_COUNT; ++i) { std::printf(" %s\n", BENCHMARK_SHORT_NAMES[i]); } } int main(int argc, char** argv) { // Disable buffering (so that when run in, e.g., Sublime Text, the output appears as it is written) std::setvbuf(stdout, nullptr, _IONBF, 0); // Isolate the executable name std::string progName = argv[0]; auto slash = progName.find_last_of("/\\"); if (slash != std::string::npos) { progName = progName.substr(slash + 1); } std::map benchmarkMap; for (int i = 0; i != BENCHMARK_TYPE_COUNT; ++i) { benchmarkMap.insert(std::make_pair(std::string(BENCHMARK_SHORT_NAMES[i]), (benchmark_type_t)i)); } std::vector selectedBenchmarks; bool showHelp = false; bool error = false; bool printedBenchmarks = false; for (int i = 1; i < argc; ++i) { if (std::strcmp(argv[i], "-h") == 0 || std::strcmp(argv[i], "--help") == 0) { showHelp = true; } else if (std::strcmp(argv[i], "-p") == 0 || std::strcmp(argv[i], "--precise") == 0) { precise = true; } else if (std::strcmp(argv[i], "--run") == 0) { if (i + 1 == argc || argv[i + 1][0] == '-') { std::printf("Expected benchmark name argument for --run option.\n"); if (!printedBenchmarks) { printBenchmarkNames(); printedBenchmarks = true; } error = true; continue; } auto it = benchmarkMap.find(argv[++i]); if (it == benchmarkMap.end()) { std::printf("Unrecognized benchmark name '%s'.\n", argv[i]); if (!printedBenchmarks) { printBenchmarkNames(); printedBenchmarks = true; } error = true; continue; } selectedBenchmarks.push_back(it->second); } else { std::printf("Unrecognized option '%s'\n", argv[i]); error = true; } } if (showHelp || error) { if (error) { std::printf("\n"); } std::printf("%s\n Description: Runs benchmarks for moodycamel::ConcurrentQueue\n", progName.c_str()); std::printf(" --help Prints this help blurb\n"); std::printf(" --precise Generate more precise benchmark results (slower)\n"); std::printf(" --run benchmark Runs only the selected benchmark (can be used multiple times)\n"); return error ? 1 : 0; } bool logExists = true; { std::ifstream fin(LOG_FILE); if (!fin) { logExists = false; } } std::ofstream fout(LOG_FILE, std::ios::app); logOut = &fout; if (fout) { if (logExists) { fout << "\n\n\n"; } fout << "--- New run (" << timestamp() << ") ---\n"; } else { std::printf("Note: Error opening log file '%s'. Output will appear only on stdout.\n\n", LOG_FILE); logErrorReported = true; } const char* bitStr = ""; if (sizeof(void*) == 4 || sizeof(void*) == 8) { bitStr = sizeof(void*) == 4 ? " 32-bit" : " 64-bit"; } const char* cpuStr = getCPUString(); sayf(0, "Running%s benchmarks on a%s %s\n", bitStr, isvowel(cpuStr[0]) ? "n" : "", cpuStr); if (precise) { sayf(4, "(precise mode)\n"); } if (selectedBenchmarks.size() > 0) { sayf(4, "(selected benchmarks only)\n"); } sayf(0, "Note that these are synthetic benchmarks. Take them with a grain of salt.\n\n"); sayf(0, "Legend:\n"); sayf(4, "'Avg': Average time taken per operation, normalized to be per thread\n"); sayf(4, "'Range': The minimum and maximum times taken per operation (per thread)\n"); sayf(4, "'Ops/s': Overall operations per second\n"); sayf(4, "'Ops/s/t': Operations per second per thread (inverse of 'Avg')\n"); sayf(4, "Operations include those that fail (e.g. because the queue is empty).\n"); sayf(4, "Each logical enqueue/dequeue counts as an individual operation when in bulk.\n"); sayf(0, "\n"); #ifdef NDEBUG const int ITERATIONS = precise ? 100 : 10; #else const int ITERATIONS = precise ? 20 : 2; #endif const double FASTEST_PERCENT_CONSIDERED = precise ? 8 : 50; // Only consider the top % of runs // Make sure each run of a given benchmark has the same seed (otherwise different runs are not comparable) std::srand(std::time(NULL)); unsigned int randSeeds[BENCHMARK_TYPE_COUNT]; for (unsigned int i = 0; i != BENCHMARK_TYPE_COUNT; ++i) { randSeeds[i] = std::rand() * (i + 1) + 1; } double opsst = 0; // ops/s/thread double totalWeightedOpsst[QUEUE_COUNT]; double totalWeight[QUEUE_COUNT]; for (int i = 0; i != QUEUE_COUNT; ++i) { totalWeightedOpsst[i] = 0; totalWeight[i] = 0; } auto logicalCores = std::thread::hardware_concurrency(); if (selectedBenchmarks.size() == 0) { for (int i = 0; i != BENCHMARK_TYPE_COUNT; ++i) { selectedBenchmarks.push_back((benchmark_type_t)i); } } int indent = 0; for (auto selectedIt = selectedBenchmarks.cbegin(); selectedIt != selectedBenchmarks.cend(); ++selectedIt) { int benchmark = static_cast(*selectedIt); auto seed = randSeeds[benchmark]; bool anyQueueSupportsBenchmark = false; for (int queue = 0; queue != QUEUE_COUNT; ++queue) { if (QUEUE_BENCH_SUPPORT[queue][benchmark]) { anyQueueSupportsBenchmark = true; break; } } if (!anyQueueSupportsBenchmark) { continue; } sayf(0, "%s", BENCHMARK_NAMES[benchmark]); if (BENCHMARK_THREADS_MEASURED[benchmark] != 0) { if (BENCHMARK_THREADS_MEASURED[benchmark] < 0) { sayf(0, " (measuring all but %d %s)", -BENCHMARK_THREADS_MEASURED[benchmark], BENCHMARK_THREADS_MEASURED[benchmark] == -1 ? "thread" : "threads"); } else { sayf(0, " (measuring %d %s)", BENCHMARK_THREADS_MEASURED[benchmark], BENCHMARK_THREADS_MEASURED[benchmark] == 1 ? "thread" : "threads"); } } sayf(0, ":\n"); indent += 2; sayf(indent, "(%s)\n", BENCHMARK_DESCS[benchmark]); for (int queue = 0; queue != QUEUE_COUNT; ++queue) { sayf(indent, "> %s\n", QUEUE_NAMES[queue]); if (!QUEUE_BENCH_SUPPORT[queue][benchmark]) { sayf(indent + 3, "(skipping, benchmark not supported...)\n\n"); continue; } if (QUEUE_TOKEN_SUPPORT[queue]) { indent += 4; } for (int useTokens = 0; useTokens != 2; ++useTokens) { if (QUEUE_TOKEN_SUPPORT[queue]) { sayf(indent, "%s tokens\n", useTokens == 0 ? "Without" : "With"); } if (useTokens == 1 && !QUEUE_TOKEN_SUPPORT[queue]) { continue; } indent += 3; std::vector opssts; std::vector threadCounts; for (int nthreadIndex = 0; BENCHMARK_THREADS[benchmark][nthreadIndex] != 0; ++nthreadIndex) { int nthreads = BENCHMARK_THREADS[benchmark][nthreadIndex]; int measuredThreads = nthreads; if (BENCHMARK_THREADS_MEASURED[benchmark] != 0) { measuredThreads = BENCHMARK_THREADS_MEASURED[benchmark] < 0 ? nthreads + BENCHMARK_THREADS_MEASURED[benchmark] : BENCHMARK_THREADS_MEASURED[benchmark]; } if (logicalCores > 0 && (unsigned int)nthreads > 3 * logicalCores) { continue; } if (QUEUE_MAX_THREADS[queue] >= 0 && QUEUE_MAX_THREADS[queue] < nthreads) { continue; } counter_t maxOps; switch ((queue_id_t)queue) { case queue_moodycamel_ConcurrentQueue: maxOps = determineMaxOpsForBenchmark, int>((benchmark_type_t)benchmark, nthreads, (bool)useTokens, seed); break; case queue_moodycamel_BlockingConcurrentQueue: maxOps = determineMaxOpsForBenchmark, int>((benchmark_type_t)benchmark, nthreads, (bool)useTokens, seed); break; case queue_lockbased: maxOps = determineMaxOpsForBenchmark, int>((benchmark_type_t)benchmark, nthreads, (bool)useTokens, seed); break; case queue_simplelockfree: maxOps = determineMaxOpsForBenchmark, int>((benchmark_type_t)benchmark, nthreads, (bool)useTokens, seed); break; case queue_boost: maxOps = determineMaxOpsForBenchmark, int>((benchmark_type_t)benchmark, nthreads, (bool)useTokens, seed); break; case queue_tbb: maxOps = determineMaxOpsForBenchmark, int>((benchmark_type_t)benchmark, nthreads, (bool)useTokens, seed); break; case queue_std: maxOps = determineMaxOpsForBenchmark, int>((benchmark_type_t)benchmark, nthreads, (bool)useTokens, seed); break; case queue_dlib: maxOps = determineMaxOpsForBenchmark, int>((benchmark_type_t)benchmark, nthreads, (bool)useTokens, seed); break; default: assert(false && "There should be a case here for every queue in the benchmarks!"); } //std::printf("maxOps: %llu\n", maxOps); int maxThreads = QUEUE_MAX_THREADS[queue]; std::vector results(ITERATIONS); for (int i = 0; i < ITERATIONS; ++i) { double elapsed = 0.0; counter_t ops = 0; switch ((queue_id_t)queue) { case queue_moodycamel_ConcurrentQueue: elapsed = runBenchmark, int>((benchmark_type_t)benchmark, nthreads, (bool)useTokens, seed, maxOps, maxThreads, ops); break; case queue_moodycamel_BlockingConcurrentQueue: elapsed = runBenchmark, int>((benchmark_type_t)benchmark, nthreads, (bool)useTokens, seed, maxOps, maxThreads, ops); break; case queue_lockbased: elapsed = runBenchmark, int>((benchmark_type_t)benchmark, nthreads, (bool)useTokens, seed, maxOps, maxThreads, ops); break; case queue_simplelockfree: elapsed = runBenchmark, int>((benchmark_type_t)benchmark, nthreads, (bool)useTokens, seed, maxOps, maxThreads, ops); break; case queue_boost: elapsed = runBenchmark, int>((benchmark_type_t)benchmark, nthreads, (bool)useTokens, seed, maxOps, maxThreads, ops); break; case queue_tbb: elapsed = runBenchmark, int>((benchmark_type_t)benchmark, nthreads, (bool)useTokens, seed, maxOps, maxThreads, ops); break; case queue_std: elapsed = runBenchmark, int>((benchmark_type_t)benchmark, nthreads, (bool)useTokens, seed, maxOps, maxThreads, ops); break; case queue_dlib: elapsed = runBenchmark, int>((benchmark_type_t)benchmark, nthreads, (bool)useTokens, seed, maxOps, maxThreads, ops); break; default: assert(false && "There should be a case here for every queue in the benchmarks!"); } results[i].elapsedTime = elapsed; results[i].operations = ops; } std::sort(&results[0], &results[0] + ITERATIONS); int consideredCount = std::max(2, (int)(ITERATIONS * FASTEST_PERCENT_CONSIDERED / 100)); double min = safe_divide(results[0].elapsedTime / 1000.0, (double)results[0].operations / measuredThreads); double max = safe_divide(results[0].elapsedTime / 1000.0, (double)results[0].operations / measuredThreads); double ops = 0; double time = 0; for (int i = 0; i != consideredCount; ++i) { double msPerOperation = safe_divide(results[i].elapsedTime / 1000.0, (double)results[i].operations / measuredThreads); if (msPerOperation < min) { min = msPerOperation; } else if (msPerOperation > max) { max = msPerOperation; } time += results[i].elapsedTime; ops += results[i].operations; } double avg = safe_divide(time / 1000.0, ops / measuredThreads); double opsPerSecond = safe_divide(ops, time / 1000.0); opsst = opsPerSecond / (double)measuredThreads; opssts.push_back(opsst); threadCounts.push_back(measuredThreads); sayf(indent, "%-3d %7s: Avg: %7ss Range: [%7ss, %7ss] Ops/s: %7s Ops/s/t: %7s\n", nthreads, nthreads != 1 ? "threads" : "thread", pretty(avg), pretty(min), pretty(max), pretty(opsPerSecond), pretty(opsst)); if (nthreads == 1 && BENCHMARK_SINGLE_THREAD_NOTES[benchmark][0] != '\0') { sayf(indent + 7, "^ Note: %s\n", BENCHMARK_SINGLE_THREAD_NOTES[benchmark]); } } opsst = 0; double divisor = 0; for (size_t i = 0; i != opssts.size(); ++i) { opsst += opssts[i] * std::sqrt(threadCounts[i]); totalWeightedOpsst[queue] += opssts[i] * std::sqrt(threadCounts[i]); divisor += std::sqrt(threadCounts[i]); totalWeight[queue] += std::sqrt(threadCounts[i]); } opsst /= divisor; sayf(indent, "Operations per second per thread (weighted average): %7s\n\n", opsst == 0 ? "(n/a)" : pretty(opsst)); indent -= 3; } if (QUEUE_TOKEN_SUPPORT[queue]) { indent -= 4; } } indent -= 2; } sayf(0, "Overall average operations per second per thread (where higher-concurrency runs have more weight):\n"); sayf(0, "(Take this summary with a grain of salt -- look at the individual benchmark results for a much\nbetter idea of how the queues measure up to each other):\n"); for (int queue = 0; queue != QUEUE_COUNT; ++queue) { opsst = safe_divide(totalWeightedOpsst[queue], totalWeight[queue]); if (QUEUE_SUMMARY_NOTES[queue] != nullptr && QUEUE_SUMMARY_NOTES[queue][0] != '\0') { sayf(4, "%s (%s): %7s\n", QUEUE_NAMES[queue], QUEUE_SUMMARY_NOTES[queue], opsst == 0 ? "(n/a)" : pretty(opsst)); } else { sayf(4, "%s: %7s\n", QUEUE_NAMES[queue], opsst == 0 ? "(n/a)" : pretty(opsst)); } } return 0; } ================================================ FILE: benchmarks/boost/LICENSE_1_0.txt ================================================ Boost Software License - Version 1.0 - August 17th, 2003 Permission is hereby granted, free of charge, to any person or organization obtaining a copy of the software and accompanying documentation covered by this license (the "Software") to use, reproduce, display, distribute, execute, and transmit the Software, and to prepare derivative works of the Software, and to permit third-parties to whom the Software is furnished to do so, all subject to the following: The copyright notices in the Software and this entire statement, including the above license grant, this restriction and the following disclaimer, must be included in all copies of the Software, in whole or in part, and all derivative works of the Software, unless such copies or derivative works are solely in the form of machine-executable object code generated by a source language processor. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ================================================ FILE: benchmarks/boost/README.txt ================================================ This is a partial copy of Boost 1.60, specifically only the parts that boost/lockfree/queue.hpp depends on (extracted using bcp). ================================================ FILE: benchmarks/boost/array.hpp ================================================ /* The following code declares class array, * an STL container (as wrapper) for arrays of constant size. * * See * http://www.boost.org/libs/array/ * for documentation. * * The original author site is at: http://www.josuttis.com/ * * (C) Copyright Nicolai M. Josuttis 2001. * * Distributed under the Boost Software License, Version 1.0. (See * accompanying file LICENSE_1_0.txt or copy at * http://www.boost.org/LICENSE_1_0.txt) * * 14 Apr 2012 - (mtc) Added support for boost::hash * 28 Dec 2010 - (mtc) Added cbegin and cend (and crbegin and crend) for C++Ox compatibility. * 10 Mar 2010 - (mtc) fill method added, matching resolution of the standard library working group. * See or Trac issue #3168 * Eventually, we should remove "assign" which is now a synonym for "fill" (Marshall Clow) * 10 Mar 2010 - added workaround for SUNCC and !STLPort [trac #3893] (Marshall Clow) * 29 Jan 2004 - c_array() added, BOOST_NO_PRIVATE_IN_AGGREGATE removed (Nico Josuttis) * 23 Aug 2002 - fix for Non-MSVC compilers combined with MSVC libraries. * 05 Aug 2001 - minor update (Nico Josuttis) * 20 Jan 2001 - STLport fix (Beman Dawes) * 29 Sep 2000 - Initial Revision (Nico Josuttis) * * Jan 29, 2004 */ #ifndef BOOST_ARRAY_HPP #define BOOST_ARRAY_HPP #include #if BOOST_WORKAROUND(BOOST_MSVC, >= 1400) # pragma warning(push) # pragma warning(disable:4996) // 'std::equal': Function call with parameters that may be unsafe # pragma warning(disable:4510) // boost::array' : default constructor could not be generated # pragma warning(disable:4610) // warning C4610: class 'boost::array' can never be instantiated - user defined constructor required #endif #include #include #include #include // Handles broken standard libraries better than #include #include #include #include // FIXES for broken compilers #include namespace boost { template class array { public: T elems[N]; // fixed-size array of elements of type T public: // type definitions typedef T value_type; typedef T* iterator; typedef const T* const_iterator; typedef T& reference; typedef const T& const_reference; typedef std::size_t size_type; typedef std::ptrdiff_t difference_type; // iterator support iterator begin() { return elems; } const_iterator begin() const { return elems; } const_iterator cbegin() const { return elems; } iterator end() { return elems+N; } const_iterator end() const { return elems+N; } const_iterator cend() const { return elems+N; } // reverse iterator support #if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) && !defined(BOOST_MSVC_STD_ITERATOR) && !defined(BOOST_NO_STD_ITERATOR_TRAITS) typedef std::reverse_iterator reverse_iterator; typedef std::reverse_iterator const_reverse_iterator; #elif defined(_MSC_VER) && (_MSC_VER == 1300) && defined(BOOST_DINKUMWARE_STDLIB) && (BOOST_DINKUMWARE_STDLIB == 310) // workaround for broken reverse_iterator in VC7 typedef std::reverse_iterator > reverse_iterator; typedef std::reverse_iterator > const_reverse_iterator; #elif defined(_RWSTD_NO_CLASS_PARTIAL_SPEC) typedef std::reverse_iterator reverse_iterator; typedef std::reverse_iterator const_reverse_iterator; #else // workaround for broken reverse_iterator implementations typedef std::reverse_iterator reverse_iterator; typedef std::reverse_iterator const_reverse_iterator; #endif reverse_iterator rbegin() { return reverse_iterator(end()); } const_reverse_iterator rbegin() const { return const_reverse_iterator(end()); } const_reverse_iterator crbegin() const { return const_reverse_iterator(end()); } reverse_iterator rend() { return reverse_iterator(begin()); } const_reverse_iterator rend() const { return const_reverse_iterator(begin()); } const_reverse_iterator crend() const { return const_reverse_iterator(begin()); } // operator[] reference operator[](size_type i) { BOOST_ASSERT_MSG( i < N, "out of range" ); return elems[i]; } const_reference operator[](size_type i) const { BOOST_ASSERT_MSG( i < N, "out of range" ); return elems[i]; } // at() with range check reference at(size_type i) { rangecheck(i); return elems[i]; } const_reference at(size_type i) const { rangecheck(i); return elems[i]; } // front() and back() reference front() { return elems[0]; } const_reference front() const { return elems[0]; } reference back() { return elems[N-1]; } const_reference back() const { return elems[N-1]; } // size is constant static size_type size() { return N; } static bool empty() { return false; } static size_type max_size() { return N; } enum { static_size = N }; // swap (note: linear complexity) void swap (array& y) { for (size_type i = 0; i < N; ++i) boost::swap(elems[i],y.elems[i]); } // direct access to data (read-only) const T* data() const { return elems; } T* data() { return elems; } // use array as C array (direct read/write access to data) T* c_array() { return elems; } // assignment with type conversion template array& operator= (const array& rhs) { std::copy(rhs.begin(),rhs.end(), begin()); return *this; } // assign one value to all elements void assign (const T& value) { fill ( value ); } // A synonym for fill void fill (const T& value) { std::fill_n(begin(),size(),value); } // check range (may be private because it is static) static void rangecheck (size_type i) { if (i >= size()) { std::out_of_range e("array<>: index out of range"); boost::throw_exception(e); } } }; #if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) template< class T > class array< T, 0 > { public: // type definitions typedef T value_type; typedef T* iterator; typedef const T* const_iterator; typedef T& reference; typedef const T& const_reference; typedef std::size_t size_type; typedef std::ptrdiff_t difference_type; // iterator support iterator begin() { return iterator( reinterpret_cast< T * >( this ) ); } const_iterator begin() const { return const_iterator( reinterpret_cast< const T * >( this ) ); } const_iterator cbegin() const { return const_iterator( reinterpret_cast< const T * >( this ) ); } iterator end() { return begin(); } const_iterator end() const { return begin(); } const_iterator cend() const { return cbegin(); } // reverse iterator support #if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) && !defined(BOOST_MSVC_STD_ITERATOR) && !defined(BOOST_NO_STD_ITERATOR_TRAITS) typedef std::reverse_iterator reverse_iterator; typedef std::reverse_iterator const_reverse_iterator; #elif defined(_MSC_VER) && (_MSC_VER == 1300) && defined(BOOST_DINKUMWARE_STDLIB) && (BOOST_DINKUMWARE_STDLIB == 310) // workaround for broken reverse_iterator in VC7 typedef std::reverse_iterator > reverse_iterator; typedef std::reverse_iterator > const_reverse_iterator; #elif defined(_RWSTD_NO_CLASS_PARTIAL_SPEC) typedef std::reverse_iterator reverse_iterator; typedef std::reverse_iterator const_reverse_iterator; #else // workaround for broken reverse_iterator implementations typedef std::reverse_iterator reverse_iterator; typedef std::reverse_iterator const_reverse_iterator; #endif reverse_iterator rbegin() { return reverse_iterator(end()); } const_reverse_iterator rbegin() const { return const_reverse_iterator(end()); } const_reverse_iterator crbegin() const { return const_reverse_iterator(end()); } reverse_iterator rend() { return reverse_iterator(begin()); } const_reverse_iterator rend() const { return const_reverse_iterator(begin()); } const_reverse_iterator crend() const { return const_reverse_iterator(begin()); } // operator[] reference operator[](size_type /*i*/) { return failed_rangecheck(); } const_reference operator[](size_type /*i*/) const { return failed_rangecheck(); } // at() with range check reference at(size_type /*i*/) { return failed_rangecheck(); } const_reference at(size_type /*i*/) const { return failed_rangecheck(); } // front() and back() reference front() { return failed_rangecheck(); } const_reference front() const { return failed_rangecheck(); } reference back() { return failed_rangecheck(); } const_reference back() const { return failed_rangecheck(); } // size is constant static size_type size() { return 0; } static bool empty() { return true; } static size_type max_size() { return 0; } enum { static_size = 0 }; void swap (array& /*y*/) { } // direct access to data (read-only) const T* data() const { return 0; } T* data() { return 0; } // use array as C array (direct read/write access to data) T* c_array() { return 0; } // assignment with type conversion template array& operator= (const array& ) { return *this; } // assign one value to all elements void assign (const T& value) { fill ( value ); } void fill (const T& ) {} // check range (may be private because it is static) static reference failed_rangecheck () { std::out_of_range e("attempt to access element of an empty array"); boost::throw_exception(e); #if defined(BOOST_NO_EXCEPTIONS) || (!defined(BOOST_MSVC) && !defined(__PATHSCALE__)) // // We need to return something here to keep // some compilers happy: however we will never // actually get here.... // static T placeholder; return placeholder; #endif } }; #endif // comparisons template bool operator== (const array& x, const array& y) { return std::equal(x.begin(), x.end(), y.begin()); } template bool operator< (const array& x, const array& y) { return std::lexicographical_compare(x.begin(),x.end(),y.begin(),y.end()); } template bool operator!= (const array& x, const array& y) { return !(x==y); } template bool operator> (const array& x, const array& y) { return y bool operator<= (const array& x, const array& y) { return !(y bool operator>= (const array& x, const array& y) { return !(x inline void swap (array& x, array& y) { x.swap(y); } #if defined(__SUNPRO_CC) // Trac ticket #4757; the Sun Solaris compiler can't handle // syntax like 'T(&get_c_array(boost::array& arg))[N]' // // We can't just use this for all compilers, because the // borland compilers can't handle this form. namespace detail { template struct c_array { typedef T type[N]; }; } // Specific for boost::array: simply returns its elems data member. template typename detail::c_array::type& get_c_array(boost::array& arg) { return arg.elems; } // Specific for boost::array: simply returns its elems data member. template typename const detail::c_array::type& get_c_array(const boost::array& arg) { return arg.elems; } #else // Specific for boost::array: simply returns its elems data member. template T(&get_c_array(boost::array& arg))[N] { return arg.elems; } // Const version. template const T(&get_c_array(const boost::array& arg))[N] { return arg.elems; } #endif #if 0 // Overload for std::array, assuming that std::array will have // explicit conversion functions as discussed at the WG21 meeting // in Summit, March 2009. template T(&get_c_array(std::array& arg))[N] { return static_cast(arg); } // Const version. template const T(&get_c_array(const std::array& arg))[N] { return static_cast(arg); } #endif template std::size_t hash_value(const array& arr) { return boost::hash_range(arr.begin(), arr.end()); } } /* namespace boost */ #if BOOST_WORKAROUND(BOOST_MSVC, >= 1400) # pragma warning(pop) #endif #endif /*BOOST_ARRAY_HPP*/ ================================================ FILE: benchmarks/boost/assert.hpp ================================================ // // boost/assert.hpp - BOOST_ASSERT(expr) // BOOST_ASSERT_MSG(expr, msg) // BOOST_VERIFY(expr) // BOOST_VERIFY_MSG(expr, msg) // BOOST_ASSERT_IS_VOID // // Copyright (c) 2001, 2002 Peter Dimov and Multi Media Ltd. // Copyright (c) 2007, 2014 Peter Dimov // Copyright (c) Beman Dawes 2011 // Copyright (c) 2015 Ion Gaztanaga // // Distributed under the Boost Software License, Version 1.0. // See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt // // Note: There are no include guards. This is intentional. // // See http://www.boost.org/libs/assert/assert.html for documentation. // // // Stop inspect complaining about use of 'assert': // // boostinspect:naassert_macro // // // BOOST_ASSERT, BOOST_ASSERT_MSG, BOOST_ASSERT_IS_VOID // #undef BOOST_ASSERT #undef BOOST_ASSERT_MSG #undef BOOST_ASSERT_IS_VOID #if defined(BOOST_DISABLE_ASSERTS) || ( defined(BOOST_ENABLE_ASSERT_DEBUG_HANDLER) && defined(NDEBUG) ) # define BOOST_ASSERT(expr) ((void)0) # define BOOST_ASSERT_MSG(expr, msg) ((void)0) # define BOOST_ASSERT_IS_VOID #elif defined(BOOST_ENABLE_ASSERT_HANDLER) || ( defined(BOOST_ENABLE_ASSERT_DEBUG_HANDLER) && !defined(NDEBUG) ) #include // for BOOST_LIKELY #include namespace boost { void assertion_failed(char const * expr, char const * function, char const * file, long line); // user defined void assertion_failed_msg(char const * expr, char const * msg, char const * function, char const * file, long line); // user defined } // namespace boost #define BOOST_ASSERT(expr) (BOOST_LIKELY(!!(expr))? ((void)0): ::boost::assertion_failed(#expr, BOOST_CURRENT_FUNCTION, __FILE__, __LINE__)) #define BOOST_ASSERT_MSG(expr, msg) (BOOST_LIKELY(!!(expr))? ((void)0): ::boost::assertion_failed_msg(#expr, msg, BOOST_CURRENT_FUNCTION, __FILE__, __LINE__)) #else # include // .h to support old libraries w/o - effect is the same # define BOOST_ASSERT(expr) assert(expr) # define BOOST_ASSERT_MSG(expr, msg) assert((expr)&&(msg)) #if defined(NDEBUG) # define BOOST_ASSERT_IS_VOID #endif #endif // // BOOST_VERIFY, BOOST_VERIFY_MSG // #undef BOOST_VERIFY #undef BOOST_VERIFY_MSG #if defined(BOOST_DISABLE_ASSERTS) || ( !defined(BOOST_ENABLE_ASSERT_HANDLER) && defined(NDEBUG) ) # define BOOST_VERIFY(expr) ((void)(expr)) # define BOOST_VERIFY_MSG(expr, msg) ((void)(expr)) #else # define BOOST_VERIFY(expr) BOOST_ASSERT(expr) # define BOOST_VERIFY_MSG(expr, msg) BOOST_ASSERT_MSG(expr,msg) #endif ================================================ FILE: benchmarks/boost/atomic/atomic.hpp ================================================ /* * Distributed under the Boost Software License, Version 1.0. * (See accompanying file LICENSE_1_0.txt or copy at * http://www.boost.org/LICENSE_1_0.txt) * * Copyright (c) 2011 Helge Bahmann * Copyright (c) 2013 Tim Blechmann * Copyright (c) 2014 Andrey Semashev */ /*! * \file atomic/atomic.hpp * * This header contains definition of \c atomic template and \c atomic_flag. */ #ifndef BOOST_ATOMIC_ATOMIC_HPP_INCLUDED_ #define BOOST_ATOMIC_ATOMIC_HPP_INCLUDED_ #include #include #include #include #include #ifdef BOOST_HAS_PRAGMA_ONCE #pragma once #endif namespace boost { using atomics::atomic; using atomics::atomic_char; using atomics::atomic_uchar; using atomics::atomic_schar; using atomics::atomic_uint8_t; using atomics::atomic_int8_t; using atomics::atomic_ushort; using atomics::atomic_short; using atomics::atomic_uint16_t; using atomics::atomic_int16_t; using atomics::atomic_uint; using atomics::atomic_int; using atomics::atomic_uint32_t; using atomics::atomic_int32_t; using atomics::atomic_ulong; using atomics::atomic_long; using atomics::atomic_uint64_t; using atomics::atomic_int64_t; #ifdef BOOST_HAS_LONG_LONG using atomics::atomic_ullong; using atomics::atomic_llong; #endif using atomics::atomic_address; using atomics::atomic_bool; using atomics::atomic_wchar_t; #if !defined(BOOST_NO_CXX11_CHAR16_T) using atomics::atomic_char16_t; #endif #if !defined(BOOST_NO_CXX11_CHAR32_T) using atomics::atomic_char32_t; #endif using atomics::atomic_int_least8_t; using atomics::atomic_uint_least8_t; using atomics::atomic_int_least16_t; using atomics::atomic_uint_least16_t; using atomics::atomic_int_least32_t; using atomics::atomic_uint_least32_t; using atomics::atomic_int_least64_t; using atomics::atomic_uint_least64_t; using atomics::atomic_int_fast8_t; using atomics::atomic_uint_fast8_t; using atomics::atomic_int_fast16_t; using atomics::atomic_uint_fast16_t; using atomics::atomic_int_fast32_t; using atomics::atomic_uint_fast32_t; using atomics::atomic_int_fast64_t; using atomics::atomic_uint_fast64_t; using atomics::atomic_intmax_t; using atomics::atomic_uintmax_t; using atomics::atomic_size_t; using atomics::atomic_ptrdiff_t; #if defined(BOOST_HAS_INTPTR_T) using atomics::atomic_intptr_t; using atomics::atomic_uintptr_t; #endif } // namespace boost #endif // BOOST_ATOMIC_ATOMIC_HPP_INCLUDED_ ================================================ FILE: benchmarks/boost/atomic/atomic_flag.hpp ================================================ /* * Distributed under the Boost Software License, Version 1.0. * (See accompanying file LICENSE_1_0.txt or copy at * http://www.boost.org/LICENSE_1_0.txt) * * Copyright (c) 2011 Helge Bahmann * Copyright (c) 2013 Tim Blechmann * Copyright (c) 2014 Andrey Semashev */ /*! * \file atomic/atomic_flag.hpp * * This header contains definition of \c atomic_flag. */ #ifndef BOOST_ATOMIC_ATOMIC_FLAG_HPP_INCLUDED_ #define BOOST_ATOMIC_ATOMIC_FLAG_HPP_INCLUDED_ #include #include #include #ifdef BOOST_HAS_PRAGMA_ONCE #pragma once #endif namespace boost { using atomics::atomic_flag; } // namespace boost #endif // BOOST_ATOMIC_ATOMIC_FLAG_HPP_INCLUDED_ ================================================ FILE: benchmarks/boost/atomic/capabilities.hpp ================================================ /* * Distributed under the Boost Software License, Version 1.0. * (See accompanying file LICENSE_1_0.txt or copy at * http://www.boost.org/LICENSE_1_0.txt) * * Copyright (c) 2014 Andrey Semashev */ /*! * \file atomic/capabilities.hpp * * This header defines feature capabilities macros. */ #ifndef BOOST_ATOMIC_CAPABILITIES_HPP_INCLUDED_ #define BOOST_ATOMIC_CAPABILITIES_HPP_INCLUDED_ #include #include #include #if !defined(BOOST_ATOMIC_EMULATED) #include BOOST_ATOMIC_DETAIL_HEADER(boost/atomic/detail/caps_) #endif #ifdef BOOST_HAS_PRAGMA_ONCE #pragma once #endif #ifndef BOOST_ATOMIC_INT8_LOCK_FREE #define BOOST_ATOMIC_INT8_LOCK_FREE 0 #endif #ifndef BOOST_ATOMIC_INT16_LOCK_FREE #define BOOST_ATOMIC_INT16_LOCK_FREE 0 #endif #ifndef BOOST_ATOMIC_INT32_LOCK_FREE #define BOOST_ATOMIC_INT32_LOCK_FREE 0 #endif #ifndef BOOST_ATOMIC_INT64_LOCK_FREE #define BOOST_ATOMIC_INT64_LOCK_FREE 0 #endif #ifndef BOOST_ATOMIC_INT128_LOCK_FREE #define BOOST_ATOMIC_INT128_LOCK_FREE 0 #endif #ifndef BOOST_ATOMIC_CHAR_LOCK_FREE #define BOOST_ATOMIC_CHAR_LOCK_FREE BOOST_ATOMIC_INT8_LOCK_FREE #endif #ifndef BOOST_ATOMIC_CHAR16_T_LOCK_FREE #define BOOST_ATOMIC_CHAR16_T_LOCK_FREE BOOST_ATOMIC_INT16_LOCK_FREE #endif #ifndef BOOST_ATOMIC_CHAR32_T_LOCK_FREE #define BOOST_ATOMIC_CHAR32_T_LOCK_FREE BOOST_ATOMIC_INT32_LOCK_FREE #endif #ifndef BOOST_ATOMIC_WCHAR_T_LOCK_FREE #if BOOST_ATOMIC_DETAIL_SIZEOF_WCHAR_T == 1 #define BOOST_ATOMIC_WCHAR_T_LOCK_FREE BOOST_ATOMIC_INT8_LOCK_FREE #elif BOOST_ATOMIC_DETAIL_SIZEOF_WCHAR_T == 2 #define BOOST_ATOMIC_WCHAR_T_LOCK_FREE BOOST_ATOMIC_INT16_LOCK_FREE #elif BOOST_ATOMIC_DETAIL_SIZEOF_WCHAR_T == 4 #define BOOST_ATOMIC_WCHAR_T_LOCK_FREE BOOST_ATOMIC_INT32_LOCK_FREE #elif BOOST_ATOMIC_DETAIL_SIZEOF_WCHAR_T == 8 #define BOOST_ATOMIC_WCHAR_T_LOCK_FREE BOOST_ATOMIC_INT64_LOCK_FREE #else #define BOOST_ATOMIC_WCHAR_T_LOCK_FREE 0 #endif #endif #ifndef BOOST_ATOMIC_SHORT_LOCK_FREE #if BOOST_ATOMIC_DETAIL_SIZEOF_SHORT == 1 #define BOOST_ATOMIC_SHORT_LOCK_FREE BOOST_ATOMIC_INT8_LOCK_FREE #elif BOOST_ATOMIC_DETAIL_SIZEOF_SHORT == 2 #define BOOST_ATOMIC_SHORT_LOCK_FREE BOOST_ATOMIC_INT16_LOCK_FREE #elif BOOST_ATOMIC_DETAIL_SIZEOF_SHORT == 4 #define BOOST_ATOMIC_SHORT_LOCK_FREE BOOST_ATOMIC_INT32_LOCK_FREE #elif BOOST_ATOMIC_DETAIL_SIZEOF_SHORT == 8 #define BOOST_ATOMIC_SHORT_LOCK_FREE BOOST_ATOMIC_INT64_LOCK_FREE #else #define BOOST_ATOMIC_SHORT_LOCK_FREE 0 #endif #endif #ifndef BOOST_ATOMIC_INT_LOCK_FREE #if BOOST_ATOMIC_DETAIL_SIZEOF_INT == 1 #define BOOST_ATOMIC_INT_LOCK_FREE BOOST_ATOMIC_INT8_LOCK_FREE #elif BOOST_ATOMIC_DETAIL_SIZEOF_INT == 2 #define BOOST_ATOMIC_INT_LOCK_FREE BOOST_ATOMIC_INT16_LOCK_FREE #elif BOOST_ATOMIC_DETAIL_SIZEOF_INT == 4 #define BOOST_ATOMIC_INT_LOCK_FREE BOOST_ATOMIC_INT32_LOCK_FREE #elif BOOST_ATOMIC_DETAIL_SIZEOF_INT == 8 #define BOOST_ATOMIC_INT_LOCK_FREE BOOST_ATOMIC_INT64_LOCK_FREE #else #define BOOST_ATOMIC_INT_LOCK_FREE 0 #endif #endif #ifndef BOOST_ATOMIC_LONG_LOCK_FREE #if BOOST_ATOMIC_DETAIL_SIZEOF_LONG == 1 #define BOOST_ATOMIC_LONG_LOCK_FREE BOOST_ATOMIC_INT8_LOCK_FREE #elif BOOST_ATOMIC_DETAIL_SIZEOF_LONG == 2 #define BOOST_ATOMIC_LONG_LOCK_FREE BOOST_ATOMIC_INT16_LOCK_FREE #elif BOOST_ATOMIC_DETAIL_SIZEOF_LONG == 4 #define BOOST_ATOMIC_LONG_LOCK_FREE BOOST_ATOMIC_INT32_LOCK_FREE #elif BOOST_ATOMIC_DETAIL_SIZEOF_LONG == 8 #define BOOST_ATOMIC_LONG_LOCK_FREE BOOST_ATOMIC_INT64_LOCK_FREE #else #define BOOST_ATOMIC_LONG_LOCK_FREE 0 #endif #endif #ifndef BOOST_ATOMIC_LLONG_LOCK_FREE #if BOOST_ATOMIC_DETAIL_SIZEOF_LLONG == 1 #define BOOST_ATOMIC_LLONG_LOCK_FREE BOOST_ATOMIC_INT8_LOCK_FREE #elif BOOST_ATOMIC_DETAIL_SIZEOF_LLONG == 2 #define BOOST_ATOMIC_LLONG_LOCK_FREE BOOST_ATOMIC_INT16_LOCK_FREE #elif BOOST_ATOMIC_DETAIL_SIZEOF_LLONG == 4 #define BOOST_ATOMIC_LLONG_LOCK_FREE BOOST_ATOMIC_INT32_LOCK_FREE #elif BOOST_ATOMIC_DETAIL_SIZEOF_LLONG == 8 #define BOOST_ATOMIC_LLONG_LOCK_FREE BOOST_ATOMIC_INT64_LOCK_FREE #else #define BOOST_ATOMIC_LLONG_LOCK_FREE 0 #endif #endif #ifndef BOOST_ATOMIC_POINTER_LOCK_FREE #if (BOOST_ATOMIC_DETAIL_SIZEOF_POINTER + 0) == 8 #define BOOST_ATOMIC_POINTER_LOCK_FREE BOOST_ATOMIC_INT64_LOCK_FREE #elif (BOOST_ATOMIC_DETAIL_SIZEOF_POINTER + 0) == 4 #define BOOST_ATOMIC_POINTER_LOCK_FREE BOOST_ATOMIC_INT32_LOCK_FREE #else #define BOOST_ATOMIC_POINTER_LOCK_FREE 0 #endif #endif #define BOOST_ATOMIC_ADDRESS_LOCK_FREE BOOST_ATOMIC_POINTER_LOCK_FREE #ifndef BOOST_ATOMIC_BOOL_LOCK_FREE // We store bools in 1-byte storage in all backends #define BOOST_ATOMIC_BOOL_LOCK_FREE BOOST_ATOMIC_INT8_LOCK_FREE #endif #ifndef BOOST_ATOMIC_FLAG_LOCK_FREE #define BOOST_ATOMIC_FLAG_LOCK_FREE BOOST_ATOMIC_BOOL_LOCK_FREE #endif #ifndef BOOST_ATOMIC_THREAD_FENCE #define BOOST_ATOMIC_THREAD_FENCE 0 #endif #ifndef BOOST_ATOMIC_SIGNAL_FENCE #define BOOST_ATOMIC_SIGNAL_FENCE 0 #endif #endif // BOOST_ATOMIC_CAPABILITIES_HPP_INCLUDED_ ================================================ FILE: benchmarks/boost/atomic/detail/atomic_flag.hpp ================================================ /* * Distributed under the Boost Software License, Version 1.0. * (See accompanying file LICENSE_1_0.txt or copy at * http://www.boost.org/LICENSE_1_0.txt) * * Copyright (c) 2014 Andrey Semashev */ /*! * \file atomic/detail/atomic_flag.hpp * * This header contains interface definition of \c atomic_flag. */ #ifndef BOOST_ATOMIC_DETAIL_ATOMIC_FLAG_HPP_INCLUDED_ #define BOOST_ATOMIC_DETAIL_ATOMIC_FLAG_HPP_INCLUDED_ #include #include #include #include #ifdef BOOST_HAS_PRAGMA_ONCE #pragma once #endif /* * IMPLEMENTATION NOTE: All interface functions MUST be declared with BOOST_FORCEINLINE, * see comment for convert_memory_order_to_gcc in ops_gcc_atomic.hpp. */ namespace boost { namespace atomics { #if defined(BOOST_NO_CXX11_CONSTEXPR) || defined(BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX) #define BOOST_ATOMIC_NO_ATOMIC_FLAG_INIT #else #define BOOST_ATOMIC_FLAG_INIT {} #endif struct atomic_flag { typedef atomics::detail::operations< 1u, false > operations; typedef operations::storage_type storage_type; operations::aligned_storage_type m_storage; BOOST_FORCEINLINE BOOST_CONSTEXPR atomic_flag() BOOST_NOEXCEPT : m_storage(0) { } BOOST_FORCEINLINE bool test_and_set(memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { return operations::test_and_set(m_storage.value, order); } BOOST_FORCEINLINE void clear(memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { BOOST_ASSERT(order != memory_order_acquire); BOOST_ASSERT(order != memory_order_acq_rel); operations::clear(m_storage.value, order); } BOOST_DELETED_FUNCTION(atomic_flag(atomic_flag const&)) BOOST_DELETED_FUNCTION(atomic_flag& operator= (atomic_flag const&)) }; } // namespace atomics } // namespace boost #endif // BOOST_ATOMIC_DETAIL_ATOMIC_FLAG_HPP_INCLUDED_ ================================================ FILE: benchmarks/boost/atomic/detail/atomic_template.hpp ================================================ /* * Distributed under the Boost Software License, Version 1.0. * (See accompanying file LICENSE_1_0.txt or copy at * http://www.boost.org/LICENSE_1_0.txt) * * Copyright (c) 2011 Helge Bahmann * Copyright (c) 2013 Tim Blechmann * Copyright (c) 2014 Andrey Semashev */ /*! * \file atomic/detail/atomic_template.hpp * * This header contains interface definition of \c atomic template. */ #ifndef BOOST_ATOMIC_DETAIL_ATOMIC_TEMPLATE_HPP_INCLUDED_ #define BOOST_ATOMIC_DETAIL_ATOMIC_TEMPLATE_HPP_INCLUDED_ #include #include #include #include #include #include #include #include #ifdef BOOST_HAS_PRAGMA_ONCE #pragma once #endif #if defined(BOOST_MSVC) #pragma warning(push) // 'boost::atomics::atomic' : multiple assignment operators specified #pragma warning(disable: 4522) #endif /* * IMPLEMENTATION NOTE: All interface functions MUST be declared with BOOST_FORCEINLINE, * see comment for convert_memory_order_to_gcc in ops_gcc_atomic.hpp. */ namespace boost { namespace atomics { namespace detail { BOOST_FORCEINLINE BOOST_CONSTEXPR memory_order deduce_failure_order(memory_order order) BOOST_NOEXCEPT { return order == memory_order_acq_rel ? memory_order_acquire : (order == memory_order_release ? memory_order_relaxed : order); } BOOST_FORCEINLINE BOOST_CONSTEXPR bool cas_failure_order_must_not_be_stronger_than_success_order(memory_order success_order, memory_order failure_order) BOOST_NOEXCEPT { // 15 == (memory_order_seq_cst | memory_order_consume), see memory_order.hpp // Given the enum values we can test the strength of memory order requirements with this single condition. return (failure_order & 15u) <= (success_order & 15u); } template< typename T, bool IsInt = boost::is_integral< T >::value > struct classify { typedef void type; }; template< typename T > struct classify< T, true > { typedef int type; }; template< typename T > struct classify< T*, false > { typedef void* type; }; template< typename T, typename Kind > class base_atomic; //! Implementation for integers template< typename T > class base_atomic< T, int > { private: typedef T value_type; typedef T difference_type; typedef atomics::detail::operations< storage_size_of< value_type >::value, boost::is_signed< T >::value > operations; protected: typedef value_type value_arg_type; public: typedef typename operations::storage_type storage_type; protected: typename operations::aligned_storage_type m_storage; public: BOOST_DEFAULTED_FUNCTION(base_atomic(), {}) BOOST_CONSTEXPR explicit base_atomic(value_type v) BOOST_NOEXCEPT : m_storage(v) {} BOOST_FORCEINLINE void store(value_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { BOOST_ASSERT(order != memory_order_consume); BOOST_ASSERT(order != memory_order_acquire); BOOST_ASSERT(order != memory_order_acq_rel); operations::store(m_storage.value, static_cast< storage_type >(v), order); } BOOST_FORCEINLINE value_type load(memory_order order = memory_order_seq_cst) const volatile BOOST_NOEXCEPT { BOOST_ASSERT(order != memory_order_release); BOOST_ASSERT(order != memory_order_acq_rel); return static_cast< value_type >(operations::load(m_storage.value, order)); } BOOST_FORCEINLINE value_type fetch_add(difference_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { return static_cast< value_type >(operations::fetch_add(m_storage.value, static_cast< storage_type >(v), order)); } BOOST_FORCEINLINE value_type fetch_sub(difference_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { return static_cast< value_type >(operations::fetch_sub(m_storage.value, static_cast< storage_type >(v), order)); } BOOST_FORCEINLINE value_type exchange(value_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { return static_cast< value_type >(operations::exchange(m_storage.value, static_cast< storage_type >(v), order)); } BOOST_FORCEINLINE bool compare_exchange_strong(value_type& expected, value_type desired, memory_order success_order, memory_order failure_order) volatile BOOST_NOEXCEPT { BOOST_ASSERT(failure_order != memory_order_release); BOOST_ASSERT(failure_order != memory_order_acq_rel); BOOST_ASSERT(cas_failure_order_must_not_be_stronger_than_success_order(success_order, failure_order)); storage_type old_value = static_cast< storage_type >(expected); const bool res = operations::compare_exchange_strong(m_storage.value, old_value, static_cast< storage_type >(desired), success_order, failure_order); expected = static_cast< value_type >(old_value); return res; } BOOST_FORCEINLINE bool compare_exchange_strong(value_type& expected, value_type desired, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { return compare_exchange_strong(expected, desired, order, atomics::detail::deduce_failure_order(order)); } BOOST_FORCEINLINE bool compare_exchange_weak(value_type& expected, value_type desired, memory_order success_order, memory_order failure_order) volatile BOOST_NOEXCEPT { BOOST_ASSERT(failure_order != memory_order_release); BOOST_ASSERT(failure_order != memory_order_acq_rel); BOOST_ASSERT(cas_failure_order_must_not_be_stronger_than_success_order(success_order, failure_order)); storage_type old_value = static_cast< storage_type >(expected); const bool res = operations::compare_exchange_weak(m_storage.value, old_value, static_cast< storage_type >(desired), success_order, failure_order); expected = static_cast< value_type >(old_value); return res; } BOOST_FORCEINLINE bool compare_exchange_weak(value_type& expected, value_type desired, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { return compare_exchange_weak(expected, desired, order, atomics::detail::deduce_failure_order(order)); } BOOST_FORCEINLINE value_type fetch_and(value_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { return static_cast< value_type >(operations::fetch_and(m_storage.value, static_cast< storage_type >(v), order)); } BOOST_FORCEINLINE value_type fetch_or(value_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { return static_cast< value_type >(operations::fetch_or(m_storage.value, static_cast< storage_type >(v), order)); } BOOST_FORCEINLINE value_type fetch_xor(value_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { return static_cast< value_type >(operations::fetch_xor(m_storage.value, static_cast< storage_type >(v), order)); } BOOST_FORCEINLINE bool is_lock_free() const volatile BOOST_NOEXCEPT { return operations::is_lock_free(m_storage.value); } BOOST_FORCEINLINE value_type operator++(int) volatile BOOST_NOEXCEPT { return fetch_add(1); } BOOST_FORCEINLINE value_type operator++() volatile BOOST_NOEXCEPT { return fetch_add(1) + 1; } BOOST_FORCEINLINE value_type operator--(int) volatile BOOST_NOEXCEPT { return fetch_sub(1); } BOOST_FORCEINLINE value_type operator--() volatile BOOST_NOEXCEPT { return fetch_sub(1) - 1; } BOOST_FORCEINLINE value_type operator+=(difference_type v) volatile BOOST_NOEXCEPT { return fetch_add(v) + v; } BOOST_FORCEINLINE value_type operator-=(difference_type v) volatile BOOST_NOEXCEPT { return fetch_sub(v) - v; } BOOST_FORCEINLINE value_type operator&=(value_type v) volatile BOOST_NOEXCEPT { return fetch_and(v) & v; } BOOST_FORCEINLINE value_type operator|=(value_type v) volatile BOOST_NOEXCEPT { return fetch_or(v) | v; } BOOST_FORCEINLINE value_type operator^=(value_type v) volatile BOOST_NOEXCEPT { return fetch_xor(v) ^ v; } BOOST_DELETED_FUNCTION(base_atomic(base_atomic const&)) BOOST_DELETED_FUNCTION(base_atomic& operator=(base_atomic const&)) }; //! Implementation for bool template< > class base_atomic< bool, int > { private: typedef bool value_type; typedef atomics::detail::operations< 1u, false > operations; protected: typedef value_type value_arg_type; public: typedef operations::storage_type storage_type; protected: operations::aligned_storage_type m_storage; public: BOOST_DEFAULTED_FUNCTION(base_atomic(), {}) BOOST_CONSTEXPR explicit base_atomic(value_type v) BOOST_NOEXCEPT : m_storage(v) {} BOOST_FORCEINLINE void store(value_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { BOOST_ASSERT(order != memory_order_consume); BOOST_ASSERT(order != memory_order_acquire); BOOST_ASSERT(order != memory_order_acq_rel); operations::store(m_storage.value, static_cast< storage_type >(v), order); } BOOST_FORCEINLINE value_type load(memory_order order = memory_order_seq_cst) const volatile BOOST_NOEXCEPT { BOOST_ASSERT(order != memory_order_release); BOOST_ASSERT(order != memory_order_acq_rel); return !!operations::load(m_storage.value, order); } BOOST_FORCEINLINE value_type exchange(value_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { return !!operations::exchange(m_storage.value, static_cast< storage_type >(v), order); } BOOST_FORCEINLINE bool compare_exchange_strong(value_type& expected, value_type desired, memory_order success_order, memory_order failure_order) volatile BOOST_NOEXCEPT { BOOST_ASSERT(failure_order != memory_order_release); BOOST_ASSERT(failure_order != memory_order_acq_rel); BOOST_ASSERT(cas_failure_order_must_not_be_stronger_than_success_order(success_order, failure_order)); storage_type old_value = static_cast< storage_type >(expected); const bool res = operations::compare_exchange_strong(m_storage.value, old_value, static_cast< storage_type >(desired), success_order, failure_order); expected = !!old_value; return res; } BOOST_FORCEINLINE bool compare_exchange_strong(value_type& expected, value_type desired, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { return compare_exchange_strong(expected, desired, order, atomics::detail::deduce_failure_order(order)); } BOOST_FORCEINLINE bool compare_exchange_weak(value_type& expected, value_type desired, memory_order success_order, memory_order failure_order) volatile BOOST_NOEXCEPT { BOOST_ASSERT(failure_order != memory_order_release); BOOST_ASSERT(failure_order != memory_order_acq_rel); BOOST_ASSERT(cas_failure_order_must_not_be_stronger_than_success_order(success_order, failure_order)); storage_type old_value = static_cast< storage_type >(expected); const bool res = operations::compare_exchange_weak(m_storage.value, old_value, static_cast< storage_type >(desired), success_order, failure_order); expected = !!old_value; return res; } BOOST_FORCEINLINE bool compare_exchange_weak(value_type& expected, value_type desired, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { return compare_exchange_weak(expected, desired, order, atomics::detail::deduce_failure_order(order)); } BOOST_FORCEINLINE bool is_lock_free() const volatile BOOST_NOEXCEPT { return operations::is_lock_free(m_storage.value); } BOOST_DELETED_FUNCTION(base_atomic(base_atomic const&)) BOOST_DELETED_FUNCTION(base_atomic& operator=(base_atomic const&)) }; //! Implementation for user-defined types, such as structs and enums template< typename T > class base_atomic< T, void > { private: typedef T value_type; typedef atomics::detail::operations< storage_size_of< value_type >::value, false > operations; protected: typedef value_type const& value_arg_type; public: typedef typename operations::storage_type storage_type; protected: typename operations::aligned_storage_type m_storage; public: BOOST_FORCEINLINE explicit base_atomic(value_type const& v = value_type()) BOOST_NOEXCEPT : m_storage(atomics::detail::bitwise_cast< storage_type >(v)) { } BOOST_FORCEINLINE void store(value_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { BOOST_ASSERT(order != memory_order_consume); BOOST_ASSERT(order != memory_order_acquire); BOOST_ASSERT(order != memory_order_acq_rel); operations::store(m_storage.value, atomics::detail::bitwise_cast< storage_type >(v), order); } BOOST_FORCEINLINE value_type load(memory_order order = memory_order_seq_cst) const volatile BOOST_NOEXCEPT { BOOST_ASSERT(order != memory_order_release); BOOST_ASSERT(order != memory_order_acq_rel); return atomics::detail::bitwise_cast< value_type >(operations::load(m_storage.value, order)); } BOOST_FORCEINLINE value_type exchange(value_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { return atomics::detail::bitwise_cast< value_type >(operations::exchange(m_storage.value, atomics::detail::bitwise_cast< storage_type >(v), order)); } BOOST_FORCEINLINE bool compare_exchange_strong(value_type& expected, value_type desired, memory_order success_order, memory_order failure_order) volatile BOOST_NOEXCEPT { BOOST_ASSERT(failure_order != memory_order_release); BOOST_ASSERT(failure_order != memory_order_acq_rel); BOOST_ASSERT(cas_failure_order_must_not_be_stronger_than_success_order(success_order, failure_order)); storage_type old_value = atomics::detail::bitwise_cast< storage_type >(expected); const bool res = operations::compare_exchange_strong(m_storage.value, old_value, atomics::detail::bitwise_cast< storage_type >(desired), success_order, failure_order); expected = atomics::detail::bitwise_cast< value_type >(old_value); return res; } BOOST_FORCEINLINE bool compare_exchange_strong(value_type& expected, value_type desired, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { return compare_exchange_strong(expected, desired, order, atomics::detail::deduce_failure_order(order)); } BOOST_FORCEINLINE bool compare_exchange_weak(value_type& expected, value_type desired, memory_order success_order, memory_order failure_order) volatile BOOST_NOEXCEPT { BOOST_ASSERT(failure_order != memory_order_release); BOOST_ASSERT(failure_order != memory_order_acq_rel); BOOST_ASSERT(cas_failure_order_must_not_be_stronger_than_success_order(success_order, failure_order)); storage_type old_value = atomics::detail::bitwise_cast< storage_type >(expected); const bool res = operations::compare_exchange_weak(m_storage.value, old_value, atomics::detail::bitwise_cast< storage_type >(desired), success_order, failure_order); expected = atomics::detail::bitwise_cast< value_type >(old_value); return res; } BOOST_FORCEINLINE bool compare_exchange_weak(value_type& expected, value_type desired, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { return compare_exchange_weak(expected, desired, order, atomics::detail::deduce_failure_order(order)); } BOOST_FORCEINLINE bool is_lock_free() const volatile BOOST_NOEXCEPT { return operations::is_lock_free(m_storage.value); } BOOST_DELETED_FUNCTION(base_atomic(base_atomic const&)) BOOST_DELETED_FUNCTION(base_atomic& operator=(base_atomic const&)) }; //! Implementation for pointers template< typename T > class base_atomic< T*, void* > { private: typedef T* value_type; typedef std::ptrdiff_t difference_type; typedef atomics::detail::operations< storage_size_of< value_type >::value, false > operations; protected: typedef value_type value_arg_type; public: typedef typename operations::storage_type storage_type; protected: typename operations::aligned_storage_type m_storage; public: BOOST_DEFAULTED_FUNCTION(base_atomic(), {}) BOOST_FORCEINLINE explicit base_atomic(value_type const& v) BOOST_NOEXCEPT : m_storage(atomics::detail::bitwise_cast< storage_type >(v)) { } BOOST_FORCEINLINE void store(value_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { BOOST_ASSERT(order != memory_order_consume); BOOST_ASSERT(order != memory_order_acquire); BOOST_ASSERT(order != memory_order_acq_rel); operations::store(m_storage.value, atomics::detail::bitwise_cast< storage_type >(v), order); } BOOST_FORCEINLINE value_type load(memory_order order = memory_order_seq_cst) const volatile BOOST_NOEXCEPT { BOOST_ASSERT(order != memory_order_release); BOOST_ASSERT(order != memory_order_acq_rel); return atomics::detail::bitwise_cast< value_type >(operations::load(m_storage.value, order)); } BOOST_FORCEINLINE value_type fetch_add(difference_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { return atomics::detail::bitwise_cast< value_type >(operations::fetch_add(m_storage.value, static_cast< storage_type >(v * sizeof(T)), order)); } BOOST_FORCEINLINE value_type fetch_sub(difference_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { return atomics::detail::bitwise_cast< value_type >(operations::fetch_sub(m_storage.value, static_cast< storage_type >(v * sizeof(T)), order)); } BOOST_FORCEINLINE value_type exchange(value_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { return atomics::detail::bitwise_cast< value_type >(operations::exchange(m_storage.value, atomics::detail::bitwise_cast< storage_type >(v), order)); } BOOST_FORCEINLINE bool compare_exchange_strong(value_type& expected, value_type desired, memory_order success_order, memory_order failure_order) volatile BOOST_NOEXCEPT { BOOST_ASSERT(failure_order != memory_order_release); BOOST_ASSERT(failure_order != memory_order_acq_rel); BOOST_ASSERT(cas_failure_order_must_not_be_stronger_than_success_order(success_order, failure_order)); storage_type old_value = atomics::detail::bitwise_cast< storage_type >(expected); const bool res = operations::compare_exchange_strong(m_storage.value, old_value, atomics::detail::bitwise_cast< storage_type >(desired), success_order, failure_order); expected = atomics::detail::bitwise_cast< value_type >(old_value); return res; } BOOST_FORCEINLINE bool compare_exchange_strong(value_type& expected, value_type desired, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { return compare_exchange_strong(expected, desired, order, atomics::detail::deduce_failure_order(order)); } BOOST_FORCEINLINE bool compare_exchange_weak(value_type& expected, value_type desired, memory_order success_order, memory_order failure_order) volatile BOOST_NOEXCEPT { BOOST_ASSERT(failure_order != memory_order_release); BOOST_ASSERT(failure_order != memory_order_acq_rel); BOOST_ASSERT(cas_failure_order_must_not_be_stronger_than_success_order(success_order, failure_order)); storage_type old_value = atomics::detail::bitwise_cast< storage_type >(expected); const bool res = operations::compare_exchange_weak(m_storage.value, old_value, atomics::detail::bitwise_cast< storage_type >(desired), success_order, failure_order); expected = atomics::detail::bitwise_cast< value_type >(old_value); return res; } BOOST_FORCEINLINE bool compare_exchange_weak(value_type& expected, value_type desired, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { return compare_exchange_weak(expected, desired, order, atomics::detail::deduce_failure_order(order)); } BOOST_FORCEINLINE bool is_lock_free() const volatile BOOST_NOEXCEPT { return operations::is_lock_free(m_storage.value); } BOOST_FORCEINLINE value_type operator++(int) volatile BOOST_NOEXCEPT { return fetch_add(1); } BOOST_FORCEINLINE value_type operator++() volatile BOOST_NOEXCEPT { return fetch_add(1) + 1; } BOOST_FORCEINLINE value_type operator--(int) volatile BOOST_NOEXCEPT { return fetch_sub(1); } BOOST_FORCEINLINE value_type operator--() volatile BOOST_NOEXCEPT { return fetch_sub(1) - 1; } BOOST_FORCEINLINE value_type operator+=(difference_type v) volatile BOOST_NOEXCEPT { return fetch_add(v) + v; } BOOST_FORCEINLINE value_type operator-=(difference_type v) volatile BOOST_NOEXCEPT { return fetch_sub(v) - v; } BOOST_DELETED_FUNCTION(base_atomic(base_atomic const&)) BOOST_DELETED_FUNCTION(base_atomic& operator=(base_atomic const&)) }; //! Implementation for void pointers template< > class base_atomic< void*, void* > { private: typedef void* value_type; typedef std::ptrdiff_t difference_type; typedef atomics::detail::operations< storage_size_of< value_type >::value, false > operations; protected: typedef value_type value_arg_type; public: typedef operations::storage_type storage_type; protected: operations::aligned_storage_type m_storage; public: BOOST_DEFAULTED_FUNCTION(base_atomic(), {}) BOOST_FORCEINLINE explicit base_atomic(value_type const& v) BOOST_NOEXCEPT : m_storage(atomics::detail::bitwise_cast< storage_type >(v)) { } BOOST_FORCEINLINE void store(value_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { BOOST_ASSERT(order != memory_order_consume); BOOST_ASSERT(order != memory_order_acquire); BOOST_ASSERT(order != memory_order_acq_rel); operations::store(m_storage.value, atomics::detail::bitwise_cast< storage_type >(v), order); } BOOST_FORCEINLINE value_type load(memory_order order = memory_order_seq_cst) const volatile BOOST_NOEXCEPT { BOOST_ASSERT(order != memory_order_release); BOOST_ASSERT(order != memory_order_acq_rel); return atomics::detail::bitwise_cast< value_type >(operations::load(m_storage.value, order)); } BOOST_FORCEINLINE value_type fetch_add(difference_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { return atomics::detail::bitwise_cast< value_type >(operations::fetch_add(m_storage.value, static_cast< storage_type >(v), order)); } BOOST_FORCEINLINE value_type fetch_sub(difference_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { return atomics::detail::bitwise_cast< value_type >(operations::fetch_sub(m_storage.value, static_cast< storage_type >(v), order)); } BOOST_FORCEINLINE value_type exchange(value_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { return atomics::detail::bitwise_cast< value_type >(operations::exchange(m_storage.value, atomics::detail::bitwise_cast< storage_type >(v), order)); } BOOST_FORCEINLINE bool compare_exchange_strong(value_type& expected, value_type desired, memory_order success_order, memory_order failure_order) volatile BOOST_NOEXCEPT { BOOST_ASSERT(failure_order != memory_order_release); BOOST_ASSERT(failure_order != memory_order_acq_rel); BOOST_ASSERT(cas_failure_order_must_not_be_stronger_than_success_order(success_order, failure_order)); storage_type old_value = atomics::detail::bitwise_cast< storage_type >(expected); const bool res = operations::compare_exchange_strong(m_storage.value, old_value, atomics::detail::bitwise_cast< storage_type >(desired), success_order, failure_order); expected = atomics::detail::bitwise_cast< value_type >(old_value); return res; } BOOST_FORCEINLINE bool compare_exchange_strong(value_type& expected, value_type desired, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { return compare_exchange_strong(expected, desired, order, atomics::detail::deduce_failure_order(order)); } BOOST_FORCEINLINE bool compare_exchange_weak(value_type& expected, value_type desired, memory_order success_order, memory_order failure_order) volatile BOOST_NOEXCEPT { BOOST_ASSERT(failure_order != memory_order_release); BOOST_ASSERT(failure_order != memory_order_acq_rel); BOOST_ASSERT(cas_failure_order_must_not_be_stronger_than_success_order(success_order, failure_order)); storage_type old_value = atomics::detail::bitwise_cast< storage_type >(expected); const bool res = operations::compare_exchange_weak(m_storage.value, old_value, atomics::detail::bitwise_cast< storage_type >(desired), success_order, failure_order); expected = atomics::detail::bitwise_cast< value_type >(old_value); return res; } BOOST_FORCEINLINE bool compare_exchange_weak(value_type& expected, value_type desired, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT { return compare_exchange_weak(expected, desired, order, atomics::detail::deduce_failure_order(order)); } BOOST_FORCEINLINE bool is_lock_free() const volatile BOOST_NOEXCEPT { return operations::is_lock_free(m_storage.value); } BOOST_FORCEINLINE value_type operator++(int) volatile BOOST_NOEXCEPT { return fetch_add(1); } BOOST_FORCEINLINE value_type operator++() volatile BOOST_NOEXCEPT { return (char*)fetch_add(1) + 1; } BOOST_FORCEINLINE value_type operator--(int) volatile BOOST_NOEXCEPT { return fetch_sub(1); } BOOST_FORCEINLINE value_type operator--() volatile BOOST_NOEXCEPT { return (char*)fetch_sub(1) - 1; } BOOST_FORCEINLINE value_type operator+=(difference_type v) volatile BOOST_NOEXCEPT { return (char*)fetch_add(v) + v; } BOOST_FORCEINLINE value_type operator-=(difference_type v) volatile BOOST_NOEXCEPT { return (char*)fetch_sub(v) - v; } BOOST_DELETED_FUNCTION(base_atomic(base_atomic const&)) BOOST_DELETED_FUNCTION(base_atomic& operator=(base_atomic const&)) }; } // namespace detail template< typename T > class atomic : public atomics::detail::base_atomic< T, typename atomics::detail::classify< T >::type > { private: typedef T value_type; typedef atomics::detail::base_atomic< T, typename atomics::detail::classify< T >::type > base_type; typedef typename base_type::value_arg_type value_arg_type; public: typedef typename base_type::storage_type storage_type; public: BOOST_DEFAULTED_FUNCTION(atomic(), BOOST_NOEXCEPT {}) // NOTE: The constructor is made explicit because gcc 4.7 complains that // operator=(value_arg_type) is considered ambiguous with operator=(atomic const&) // in assignment expressions, even though conversion to atomic<> is less preferred // than conversion to value_arg_type. BOOST_FORCEINLINE explicit BOOST_CONSTEXPR atomic(value_arg_type v) BOOST_NOEXCEPT : base_type(v) {} BOOST_FORCEINLINE value_type operator= (value_arg_type v) volatile BOOST_NOEXCEPT { this->store(v); return v; } BOOST_FORCEINLINE operator value_type() volatile const BOOST_NOEXCEPT { return this->load(); } BOOST_FORCEINLINE storage_type& storage() BOOST_NOEXCEPT { return this->m_storage.value; } BOOST_FORCEINLINE storage_type volatile& storage() volatile BOOST_NOEXCEPT { return this->m_storage.value; } BOOST_FORCEINLINE storage_type const& storage() const BOOST_NOEXCEPT { return this->m_storage.value; } BOOST_FORCEINLINE storage_type const volatile& storage() const volatile BOOST_NOEXCEPT { return this->m_storage.value; } BOOST_DELETED_FUNCTION(atomic(atomic const&)) BOOST_DELETED_FUNCTION(atomic& operator= (atomic const&)) BOOST_DELETED_FUNCTION(atomic& operator= (atomic const&) volatile) }; typedef atomic< char > atomic_char; typedef atomic< unsigned char > atomic_uchar; typedef atomic< signed char > atomic_schar; typedef atomic< uint8_t > atomic_uint8_t; typedef atomic< int8_t > atomic_int8_t; typedef atomic< unsigned short > atomic_ushort; typedef atomic< short > atomic_short; typedef atomic< uint16_t > atomic_uint16_t; typedef atomic< int16_t > atomic_int16_t; typedef atomic< unsigned int > atomic_uint; typedef atomic< int > atomic_int; typedef atomic< uint32_t > atomic_uint32_t; typedef atomic< int32_t > atomic_int32_t; typedef atomic< unsigned long > atomic_ulong; typedef atomic< long > atomic_long; typedef atomic< uint64_t > atomic_uint64_t; typedef atomic< int64_t > atomic_int64_t; #ifdef BOOST_HAS_LONG_LONG typedef atomic< boost::ulong_long_type > atomic_ullong; typedef atomic< boost::long_long_type > atomic_llong; #endif typedef atomic< void* > atomic_address; typedef atomic< bool > atomic_bool; typedef atomic< wchar_t > atomic_wchar_t; #if !defined(BOOST_NO_CXX11_CHAR16_T) typedef atomic< char16_t > atomic_char16_t; #endif #if !defined(BOOST_NO_CXX11_CHAR32_T) typedef atomic< char32_t > atomic_char32_t; #endif typedef atomic< int_least8_t > atomic_int_least8_t; typedef atomic< uint_least8_t > atomic_uint_least8_t; typedef atomic< int_least16_t > atomic_int_least16_t; typedef atomic< uint_least16_t > atomic_uint_least16_t; typedef atomic< int_least32_t > atomic_int_least32_t; typedef atomic< uint_least32_t > atomic_uint_least32_t; typedef atomic< int_least64_t > atomic_int_least64_t; typedef atomic< uint_least64_t > atomic_uint_least64_t; typedef atomic< int_fast8_t > atomic_int_fast8_t; typedef atomic< uint_fast8_t > atomic_uint_fast8_t; typedef atomic< int_fast16_t > atomic_int_fast16_t; typedef atomic< uint_fast16_t > atomic_uint_fast16_t; typedef atomic< int_fast32_t > atomic_int_fast32_t; typedef atomic< uint_fast32_t > atomic_uint_fast32_t; typedef atomic< int_fast64_t > atomic_int_fast64_t; typedef atomic< uint_fast64_t > atomic_uint_fast64_t; typedef atomic< intmax_t > atomic_intmax_t; typedef atomic< uintmax_t > atomic_uintmax_t; typedef atomic< std::size_t > atomic_size_t; typedef atomic< std::ptrdiff_t > atomic_ptrdiff_t; #if defined(BOOST_HAS_INTPTR_T) typedef atomic< intptr_t > atomic_intptr_t; typedef atomic< uintptr_t > atomic_uintptr_t; #endif } // namespace atomics } // namespace boost #if defined(BOOST_MSVC) #pragma warning(pop) #endif #endif // BOOST_ATOMIC_DETAIL_ATOMIC_TEMPLATE_HPP_INCLUDED_ ================================================ FILE: benchmarks/boost/atomic/detail/bitwise_cast.hpp ================================================ /* * Distributed under the Boost Software License, Version 1.0. * (See accompanying file LICENSE_1_0.txt or copy at * http://www.boost.org/LICENSE_1_0.txt) * * Copyright (c) 2009 Helge Bahmann * Copyright (c) 2012 Tim Blechmann * Copyright (c) 2013 - 2014 Andrey Semashev */ /*! * \file atomic/detail/bitwise_cast.hpp * * This header defines \c bitwise_cast used to convert between storage and value types */ #ifndef BOOST_ATOMIC_DETAIL_BITWISE_CAST_HPP_INCLUDED_ #define BOOST_ATOMIC_DETAIL_BITWISE_CAST_HPP_INCLUDED_ #include #if !defined(BOOST_ATOMIC_DETAIL_HAS_BUILTIN_MEMCPY) #include #endif #ifdef BOOST_HAS_PRAGMA_ONCE #pragma once #endif namespace boost { namespace atomics { namespace detail { template< typename To, typename From > BOOST_FORCEINLINE To bitwise_cast(From const& from) BOOST_NOEXCEPT { struct { To to; } value = {}; BOOST_ATOMIC_DETAIL_MEMCPY ( &reinterpret_cast< char& >(value.to), &reinterpret_cast< const char& >(from), (sizeof(From) < sizeof(To) ? sizeof(From) : sizeof(To)) ); return value.to; } } // namespace detail } // namespace atomics } // namespace boost #endif // BOOST_ATOMIC_DETAIL_BITWISE_CAST_HPP_INCLUDED_ ================================================ FILE: benchmarks/boost/atomic/detail/caps_gcc_alpha.hpp ================================================ /* * Distributed under the Boost Software License, Version 1.0. * (See accompanying file LICENSE_1_0.txt or copy at * http://www.boost.org/LICENSE_1_0.txt) * * Copyright (c) 2009 Helge Bahmann * Copyright (c) 2013 Tim Blechmann * Copyright (c) 2014 Andrey Semashev */ /*! * \file atomic/detail/caps_gcc_alpha.hpp * * This header defines feature capabilities macros */ #ifndef BOOST_ATOMIC_DETAIL_CAPS_GCC_ALPHA_HPP_INCLUDED_ #define BOOST_ATOMIC_DETAIL_CAPS_GCC_ALPHA_HPP_INCLUDED_ #include #ifdef BOOST_HAS_PRAGMA_ONCE #pragma once #endif #define BOOST_ATOMIC_INT8_LOCK_FREE 2 #define BOOST_ATOMIC_INT16_LOCK_FREE 2 #define BOOST_ATOMIC_INT32_LOCK_FREE 2 #define BOOST_ATOMIC_INT64_LOCK_FREE 2 #define BOOST_ATOMIC_POINTER_LOCK_FREE 2 #define BOOST_ATOMIC_THREAD_FENCE 2 #define BOOST_ATOMIC_SIGNAL_FENCE 2 #endif // BOOST_ATOMIC_DETAIL_CAPS_GCC_ALPHA_HPP_INCLUDED_ ================================================ FILE: benchmarks/boost/atomic/detail/caps_gcc_arm.hpp ================================================ /* * Distributed under the Boost Software License, Version 1.0. * (See accompanying file LICENSE_1_0.txt or copy at * http://www.boost.org/LICENSE_1_0.txt) * * Copyright (c) 2009 Helge Bahmann * Copyright (c) 2009 Phil Endecott * Copyright (c) 2013 Tim Blechmann * ARM Code by Phil Endecott, based on other architectures. * Copyright (c) 2014 Andrey Semashev */ /*! * \file atomic/detail/caps_gcc_arm.hpp * * This header defines feature capabilities macros */ #ifndef BOOST_ATOMIC_DETAIL_CAPS_GCC_ARM_HPP_INCLUDED_ #define BOOST_ATOMIC_DETAIL_CAPS_GCC_ARM_HPP_INCLUDED_ #include #ifdef BOOST_HAS_PRAGMA_ONCE #pragma once #endif #if !(defined(__ARM_ARCH_6__) || defined(__ARM_ARCH_6J__) || defined(__ARM_ARCH_6Z__) || defined(__ARM_ARCH_6K__) || defined(__ARM_ARCH_6ZK__)) // ARMv7 and later have dmb instruction #define BOOST_ATOMIC_DETAIL_ARM_HAS_DMB 1 #endif #if !(defined(__ARM_ARCH_6__) || defined(__ARM_ARCH_6J__) || defined(__ARM_ARCH_6Z__)) // ARMv6k and ARMv7 have 8 and 16 ldrex/strex variants #define BOOST_ATOMIC_DETAIL_ARM_HAS_LDREXB_STREXB 1 #define BOOST_ATOMIC_DETAIL_ARM_HAS_LDREXH_STREXH 1 #if !(((defined(__ARM_ARCH_6K__) || defined(__ARM_ARCH_6ZK__)) && defined(__thumb__)) || defined(__ARM_ARCH_7M__)) // ARMv6k and ARMv7 except ARMv7-M have 64-bit ldrex/strex variants. // Unfortunately, GCC (at least 4.7.3 on Ubuntu) does not allocate register pairs properly when targeting ARMv6k Thumb, // which is required for ldrexd/strexd instructions, so we disable 64-bit support. When targeting ARMv6k ARM // or ARMv7 (both ARM and Thumb 2) it works as expected. #define BOOST_ATOMIC_DETAIL_ARM_HAS_LDREXD_STREXD 1 #endif #endif #define BOOST_ATOMIC_INT8_LOCK_FREE 2 #define BOOST_ATOMIC_INT16_LOCK_FREE 2 #define BOOST_ATOMIC_INT32_LOCK_FREE 2 #if defined(BOOST_ATOMIC_DETAIL_ARM_HAS_LDREXD_STREXD) #define BOOST_ATOMIC_INT64_LOCK_FREE 2 #endif #define BOOST_ATOMIC_POINTER_LOCK_FREE 2 #define BOOST_ATOMIC_THREAD_FENCE 2 #define BOOST_ATOMIC_SIGNAL_FENCE 2 #endif // BOOST_ATOMIC_DETAIL_CAPS_GCC_ARM_HPP_INCLUDED_ ================================================ FILE: benchmarks/boost/atomic/detail/caps_gcc_atomic.hpp ================================================ /* * Distributed under the Boost Software License, Version 1.0. * (See accompanying file LICENSE_1_0.txt or copy at * http://www.boost.org/LICENSE_1_0.txt) * * Copyright (c) 2014 Andrey Semashev */ /*! * \file atomic/detail/caps_gcc_atomic.hpp * * This header defines feature capabilities macros */ #ifndef BOOST_ATOMIC_DETAIL_CAPS_GCC_ATOMIC_HPP_INCLUDED_ #define BOOST_ATOMIC_DETAIL_CAPS_GCC_ATOMIC_HPP_INCLUDED_ #include #include #ifdef BOOST_HAS_PRAGMA_ONCE #pragma once #endif #if defined(__i386__) && defined(__GCC_HAVE_SYNC_COMPARE_AND_SWAP_8) #define BOOST_ATOMIC_DETAIL_X86_HAS_CMPXCHG8B 1 #endif #if defined(__x86_64__) && defined(__GCC_HAVE_SYNC_COMPARE_AND_SWAP_16) #define BOOST_ATOMIC_DETAIL_X86_HAS_CMPXCHG16B 1 #endif #if defined(BOOST_ATOMIC_DETAIL_X86_HAS_CMPXCHG16B) && (defined(BOOST_HAS_INT128) || !defined(BOOST_NO_ALIGNMENT)) #define BOOST_ATOMIC_INT128_LOCK_FREE 2 #else #define BOOST_ATOMIC_INT128_LOCK_FREE 0 #endif #if __GCC_ATOMIC_LLONG_LOCK_FREE == 2 #define BOOST_ATOMIC_LLONG_LOCK_FREE 2 #else #define BOOST_ATOMIC_LLONG_LOCK_FREE BOOST_ATOMIC_INT128_LOCK_FREE #endif #if __GCC_ATOMIC_LONG_LOCK_FREE == 2 #define BOOST_ATOMIC_LONG_LOCK_FREE 2 #else #define BOOST_ATOMIC_LONG_LOCK_FREE BOOST_ATOMIC_LLONG_LOCK_FREE #endif #if __GCC_ATOMIC_INT_LOCK_FREE == 2 #define BOOST_ATOMIC_INT_LOCK_FREE 2 #else #define BOOST_ATOMIC_INT_LOCK_FREE BOOST_ATOMIC_LONG_LOCK_FREE #endif #if __GCC_ATOMIC_SHORT_LOCK_FREE == 2 #define BOOST_ATOMIC_SHORT_LOCK_FREE 2 #else #define BOOST_ATOMIC_SHORT_LOCK_FREE BOOST_ATOMIC_INT_LOCK_FREE #endif #if __GCC_ATOMIC_CHAR_LOCK_FREE == 2 #define BOOST_ATOMIC_CHAR_LOCK_FREE 2 #else #define BOOST_ATOMIC_CHAR_LOCK_FREE BOOST_ATOMIC_SHORT_LOCK_FREE #endif #if __GCC_ATOMIC_POINTER_LOCK_FREE == 2 #define BOOST_ATOMIC_POINTER_LOCK_FREE 2 #else #define BOOST_ATOMIC_POINTER_LOCK_FREE 0 #endif #define BOOST_ATOMIC_INT8_LOCK_FREE BOOST_ATOMIC_CHAR_LOCK_FREE #if BOOST_ATOMIC_DETAIL_SIZEOF_SHORT == 2 #define BOOST_ATOMIC_INT16_LOCK_FREE BOOST_ATOMIC_SHORT_LOCK_FREE #elif BOOST_ATOMIC_DETAIL_SIZEOF_INT == 2 #define BOOST_ATOMIC_INT16_LOCK_FREE BOOST_ATOMIC_INT_LOCK_FREE #elif BOOST_ATOMIC_DETAIL_SIZEOF_LONG == 2 #define BOOST_ATOMIC_INT16_LOCK_FREE BOOST_ATOMIC_LONG_LOCK_FREE #elif BOOST_ATOMIC_DETAIL_SIZEOF_LLONG == 2 #define BOOST_ATOMIC_INT16_LOCK_FREE BOOST_ATOMIC_LLONG_LOCK_FREE #else #define BOOST_ATOMIC_INT16_LOCK_FREE 0 #endif #if BOOST_ATOMIC_DETAIL_SIZEOF_SHORT == 4 #define BOOST_ATOMIC_INT32_LOCK_FREE BOOST_ATOMIC_SHORT_LOCK_FREE #elif BOOST_ATOMIC_DETAIL_SIZEOF_INT == 4 #define BOOST_ATOMIC_INT32_LOCK_FREE BOOST_ATOMIC_INT_LOCK_FREE #elif BOOST_ATOMIC_DETAIL_SIZEOF_LONG == 4 #define BOOST_ATOMIC_INT32_LOCK_FREE BOOST_ATOMIC_LONG_LOCK_FREE #elif BOOST_ATOMIC_DETAIL_SIZEOF_LLONG == 4 #define BOOST_ATOMIC_INT32_LOCK_FREE BOOST_ATOMIC_LLONG_LOCK_FREE #else #define BOOST_ATOMIC_INT32_LOCK_FREE 0 #endif #if BOOST_ATOMIC_DETAIL_SIZEOF_SHORT == 8 #define BOOST_ATOMIC_INT64_LOCK_FREE BOOST_ATOMIC_SHORT_LOCK_FREE #elif BOOST_ATOMIC_DETAIL_SIZEOF_INT == 8 #define BOOST_ATOMIC_INT64_LOCK_FREE BOOST_ATOMIC_INT_LOCK_FREE #elif BOOST_ATOMIC_DETAIL_SIZEOF_LONG == 8 #define BOOST_ATOMIC_INT64_LOCK_FREE BOOST_ATOMIC_LONG_LOCK_FREE #elif BOOST_ATOMIC_DETAIL_SIZEOF_LLONG == 8 #define BOOST_ATOMIC_INT64_LOCK_FREE BOOST_ATOMIC_LLONG_LOCK_FREE #else #define BOOST_ATOMIC_INT64_LOCK_FREE 0 #endif #if __GCC_ATOMIC_WCHAR_T_LOCK_FREE == 2 #define BOOST_ATOMIC_WCHAR_T_LOCK_FREE 2 #elif BOOST_ATOMIC_DETAIL_SIZEOF_WCHAR_T == 8 #define BOOST_ATOMIC_WCHAR_T_LOCK_FREE BOOST_ATOMIC_INT64_LOCK_FREE #elif BOOST_ATOMIC_DETAIL_SIZEOF_WCHAR_T == 4 #define BOOST_ATOMIC_WCHAR_T_LOCK_FREE BOOST_ATOMIC_INT32_LOCK_FREE #elif BOOST_ATOMIC_DETAIL_SIZEOF_WCHAR_T == 2 #define BOOST_ATOMIC_WCHAR_T_LOCK_FREE BOOST_ATOMIC_INT16_LOCK_FREE #elif BOOST_ATOMIC_DETAIL_SIZEOF_WCHAR_T == 1 #define BOOST_ATOMIC_WCHAR_T_LOCK_FREE BOOST_ATOMIC_INT8_LOCK_FREE #else #define BOOST_ATOMIC_WCHAR_T_LOCK_FREE 0 #endif #define BOOST_ATOMIC_CHAR32_T_LOCK_FREE BOOST_ATOMIC_INT32_LOCK_FREE #define BOOST_ATOMIC_CHAR16_T_LOCK_FREE BOOST_ATOMIC_INT16_LOCK_FREE #define BOOST_ATOMIC_THREAD_FENCE 2 #define BOOST_ATOMIC_SIGNAL_FENCE 2 #endif // BOOST_ATOMIC_DETAIL_CAPS_GCC_ATOMIC_HPP_INCLUDED_ ================================================ FILE: benchmarks/boost/atomic/detail/caps_gcc_ppc.hpp ================================================ /* * Distributed under the Boost Software License, Version 1.0. * (See accompanying file LICENSE_1_0.txt or copy at * http://www.boost.org/LICENSE_1_0.txt) * * Copyright (c) 2009 Helge Bahmann * Copyright (c) 2013 Tim Blechmann * Copyright (c) 2014 Andrey Semashev */ /*! * \file atomic/detail/caps_gcc_ppc.hpp * * This header defines feature capabilities macros */ #ifndef BOOST_ATOMIC_DETAIL_CAPS_GCC_PPC_HPP_INCLUDED_ #define BOOST_ATOMIC_DETAIL_CAPS_GCC_PPC_HPP_INCLUDED_ #include #ifdef BOOST_HAS_PRAGMA_ONCE #pragma once #endif #define BOOST_ATOMIC_INT8_LOCK_FREE 2 #define BOOST_ATOMIC_INT16_LOCK_FREE 2 #define BOOST_ATOMIC_INT32_LOCK_FREE 2 #if defined(__powerpc64__) || defined(__PPC64__) #define BOOST_ATOMIC_INT64_LOCK_FREE 2 #endif #define BOOST_ATOMIC_POINTER_LOCK_FREE 2 #define BOOST_ATOMIC_THREAD_FENCE 2 #define BOOST_ATOMIC_SIGNAL_FENCE 2 #endif // BOOST_ATOMIC_DETAIL_CAPS_GCC_PPC_HPP_INCLUDED_ ================================================ FILE: benchmarks/boost/atomic/detail/caps_gcc_sparc.hpp ================================================ /* * Distributed under the Boost Software License, Version 1.0. * (See accompanying file LICENSE_1_0.txt or copy at * http://www.boost.org/LICENSE_1_0.txt) * * Copyright (c) 2010 Helge Bahmann * Copyright (c) 2013 Tim Blechmann * Copyright (c) 2014 Andrey Semashev */ /*! * \file atomic/detail/caps_gcc_sparc.hpp * * This header defines feature capabilities macros */ #ifndef BOOST_ATOMIC_DETAIL_CAPS_GCC_SPARC_HPP_INCLUDED_ #define BOOST_ATOMIC_DETAIL_CAPS_GCC_SPARC_HPP_INCLUDED_ #include #ifdef BOOST_HAS_PRAGMA_ONCE #pragma once #endif #define BOOST_ATOMIC_INT8_LOCK_FREE 2 #define BOOST_ATOMIC_INT16_LOCK_FREE 2 #define BOOST_ATOMIC_INT32_LOCK_FREE 2 #define BOOST_ATOMIC_INT64_LOCK_FREE 2 #define BOOST_ATOMIC_POINTER_LOCK_FREE 2 #define BOOST_ATOMIC_THREAD_FENCE 2 #define BOOST_ATOMIC_SIGNAL_FENCE 2 #endif // BOOST_ATOMIC_DETAIL_CAPS_GCC_SPARC_HPP_INCLUDED_ ================================================ FILE: benchmarks/boost/atomic/detail/caps_gcc_sync.hpp ================================================ /* * Distributed under the Boost Software License, Version 1.0. * (See accompanying file LICENSE_1_0.txt or copy at * http://www.boost.org/LICENSE_1_0.txt) * * Copyright (c) 2011 Helge Bahmann * Copyright (c) 2013 Tim Blechmann * Copyright (c) 2014 Andrey Semashev */ /*! * \file atomic/detail/caps_gcc_sync.hpp * * This header defines feature capabilities macros */ #ifndef BOOST_ATOMIC_DETAIL_CAPS_GCC_SYNC_HPP_INCLUDED_ #define BOOST_ATOMIC_DETAIL_CAPS_GCC_SYNC_HPP_INCLUDED_ #include #ifdef BOOST_HAS_PRAGMA_ONCE #pragma once #endif #if defined(__i386__) && defined(__GCC_HAVE_SYNC_COMPARE_AND_SWAP_8) #define BOOST_ATOMIC_DETAIL_X86_HAS_CMPXCHG8B 1 #endif #if defined(__x86_64__) && defined(__GCC_HAVE_SYNC_COMPARE_AND_SWAP_16) #define BOOST_ATOMIC_DETAIL_X86_HAS_CMPXCHG16B 1 #endif #if defined(__GCC_HAVE_SYNC_COMPARE_AND_SWAP_1)\ || defined(__GCC_HAVE_SYNC_COMPARE_AND_SWAP_2)\ || defined(__GCC_HAVE_SYNC_COMPARE_AND_SWAP_4)\ || defined(__GCC_HAVE_SYNC_COMPARE_AND_SWAP_8)\ || defined(__GCC_HAVE_SYNC_COMPARE_AND_SWAP_16) #define BOOST_ATOMIC_INT8_LOCK_FREE 2 #endif #if defined(__GCC_HAVE_SYNC_COMPARE_AND_SWAP_2)\ || defined(__GCC_HAVE_SYNC_COMPARE_AND_SWAP_4)\ || defined(__GCC_HAVE_SYNC_COMPARE_AND_SWAP_8)\ || defined(__GCC_HAVE_SYNC_COMPARE_AND_SWAP_16) #define BOOST_ATOMIC_INT16_LOCK_FREE 2 #endif #if defined(__GCC_HAVE_SYNC_COMPARE_AND_SWAP_4)\ || defined(__GCC_HAVE_SYNC_COMPARE_AND_SWAP_8)\ || defined(__GCC_HAVE_SYNC_COMPARE_AND_SWAP_16) #define BOOST_ATOMIC_INT32_LOCK_FREE 2 #endif #if defined(__GCC_HAVE_SYNC_COMPARE_AND_SWAP_8)\ || defined(__GCC_HAVE_SYNC_COMPARE_AND_SWAP_16) #define BOOST_ATOMIC_INT64_LOCK_FREE 2 #endif #if defined(__GCC_HAVE_SYNC_COMPARE_AND_SWAP_16) #define BOOST_ATOMIC_INT128_LOCK_FREE 2 #endif #define BOOST_ATOMIC_THREAD_FENCE 2 #define BOOST_ATOMIC_SIGNAL_FENCE 2 #endif // BOOST_ATOMIC_DETAIL_CAPS_GCC_SYNC_HPP_INCLUDED_ ================================================ FILE: benchmarks/boost/atomic/detail/caps_gcc_x86.hpp ================================================ /* * Distributed under the Boost Software License, Version 1.0. * (See accompanying file LICENSE_1_0.txt or copy at * http://www.boost.org/LICENSE_1_0.txt) * * Copyright (c) 2009 Helge Bahmann * Copyright (c) 2012 Tim Blechmann * Copyright (c) 2013 - 2014 Andrey Semashev */ /*! * \file atomic/detail/caps_gcc_x86.hpp * * This header defines feature capabilities macros */ #ifndef BOOST_ATOMIC_DETAIL_CAPS_GCC_X86_HPP_INCLUDED_ #define BOOST_ATOMIC_DETAIL_CAPS_GCC_X86_HPP_INCLUDED_ #include #ifdef BOOST_HAS_PRAGMA_ONCE #pragma once #endif #if defined(__i386__) &&\ (\ defined(__GCC_HAVE_SYNC_COMPARE_AND_SWAP_8) ||\ defined(__i586__) || defined(__i686__) || defined(__pentium4__) || defined(__nocona__) || defined(__core2__) || defined(__corei7__) ||\ defined(__k6__) || defined(__athlon__) || defined(__k8__) || defined(__amdfam10__) || defined(__bdver1__) || defined(__bdver2__) || defined(__bdver3__) || defined(__btver1__) || defined(__btver2__)\ ) #define BOOST_ATOMIC_DETAIL_X86_HAS_CMPXCHG8B 1 #endif #if defined(__x86_64__) && defined(__GCC_HAVE_SYNC_COMPARE_AND_SWAP_16) #define BOOST_ATOMIC_DETAIL_X86_HAS_CMPXCHG16B 1 #endif #define BOOST_ATOMIC_INT8_LOCK_FREE 2 #define BOOST_ATOMIC_INT16_LOCK_FREE 2 #define BOOST_ATOMIC_INT32_LOCK_FREE 2 #if defined(__x86_64__) || defined(BOOST_ATOMIC_DETAIL_X86_HAS_CMPXCHG8B) #define BOOST_ATOMIC_INT64_LOCK_FREE 2 #endif #if defined(BOOST_ATOMIC_DETAIL_X86_HAS_CMPXCHG16B) && (defined(BOOST_HAS_INT128) || !defined(BOOST_NO_ALIGNMENT)) #define BOOST_ATOMIC_INT128_LOCK_FREE 2 #endif #define BOOST_ATOMIC_POINTER_LOCK_FREE 2 #define BOOST_ATOMIC_THREAD_FENCE 2 #define BOOST_ATOMIC_SIGNAL_FENCE 2 #endif // BOOST_ATOMIC_DETAIL_CAPS_GCC_X86_HPP_INCLUDED_ ================================================ FILE: benchmarks/boost/atomic/detail/caps_linux_arm.hpp ================================================ /* * Distributed under the Boost Software License, Version 1.0. * (See accompanying file LICENSE_1_0.txt or copy at * http://www.boost.org/LICENSE_1_0.txt) * * Copyright (c) 2009, 2011 Helge Bahmann * Copyright (c) 2009 Phil Endecott * Copyright (c) 2013 Tim Blechmann * Linux-specific code by Phil Endecott * Copyright (c) 2014 Andrey Semashev */ /*! * \file atomic/detail/caps_linux_arm.hpp * * This header defines feature capabilities macros */ #ifndef BOOST_ATOMIC_DETAIL_CAPS_LINUX_ARM_HPP_INCLUDED_ #define BOOST_ATOMIC_DETAIL_CAPS_LINUX_ARM_HPP_INCLUDED_ #include #ifdef BOOST_HAS_PRAGMA_ONCE #pragma once #endif #define BOOST_ATOMIC_INT8_LOCK_FREE 2 #define BOOST_ATOMIC_INT16_LOCK_FREE 2 #define BOOST_ATOMIC_INT32_LOCK_FREE 2 #define BOOST_ATOMIC_POINTER_LOCK_FREE 2 #define BOOST_ATOMIC_THREAD_FENCE 2 #define BOOST_ATOMIC_SIGNAL_FENCE 2 #endif // BOOST_ATOMIC_DETAIL_CAPS_LINUX_ARM_HPP_INCLUDED_ ================================================ FILE: benchmarks/boost/atomic/detail/caps_msvc_arm.hpp ================================================ /* * Distributed under the Boost Software License, Version 1.0. * (See accompanying file LICENSE_1_0.txt or copy at * http://www.boost.org/LICENSE_1_0.txt) * * Copyright (c) 2009 Helge Bahmann * Copyright (c) 2013 Tim Blechmann * Copyright (c) 2012 - 2014 Andrey Semashev */ /*! * \file atomic/detail/caps_msvc_arm.hpp * * This header defines feature capabilities macros */ #ifndef BOOST_ATOMIC_DETAIL_CAPS_MSVC_ARM_HPP_INCLUDED_ #define BOOST_ATOMIC_DETAIL_CAPS_MSVC_ARM_HPP_INCLUDED_ #include #ifdef BOOST_HAS_PRAGMA_ONCE #pragma once #endif #define BOOST_ATOMIC_INT8_LOCK_FREE 2 #define BOOST_ATOMIC_INT16_LOCK_FREE 2 #define BOOST_ATOMIC_INT32_LOCK_FREE 2 #define BOOST_ATOMIC_INT64_LOCK_FREE 2 #define BOOST_ATOMIC_POINTER_LOCK_FREE 2 #define BOOST_ATOMIC_THREAD_FENCE 2 #define BOOST_ATOMIC_SIGNAL_FENCE 2 #endif // BOOST_ATOMIC_DETAIL_CAPS_MSVC_ARM_HPP_INCLUDED_ ================================================ FILE: benchmarks/boost/atomic/detail/caps_msvc_x86.hpp ================================================ /* * Distributed under the Boost Software License, Version 1.0. * (See accompanying file LICENSE_1_0.txt or copy at * http://www.boost.org/LICENSE_1_0.txt) * * Copyright (c) 2009 Helge Bahmann * Copyright (c) 2013 Tim Blechmann * Copyright (c) 2012 - 2014 Andrey Semashev */ /*! * \file atomic/detail/caps_msvc_x86.hpp * * This header defines feature capabilities macros */ #ifndef BOOST_ATOMIC_DETAIL_CAPS_MSVC_X86_HPP_INCLUDED_ #define BOOST_ATOMIC_DETAIL_CAPS_MSVC_X86_HPP_INCLUDED_ #include #ifdef BOOST_HAS_PRAGMA_ONCE #pragma once #endif #if defined(_M_IX86) && _M_IX86 >= 500 #define BOOST_ATOMIC_DETAIL_X86_HAS_CMPXCHG8B 1 #endif #if _MSC_VER >= 1500 && defined(_M_AMD64) && !defined(BOOST_ATOMIC_NO_CMPXCHG16B) #define BOOST_ATOMIC_DETAIL_X86_HAS_CMPXCHG16B 1 #endif #define BOOST_ATOMIC_INT8_LOCK_FREE 2 #define BOOST_ATOMIC_INT16_LOCK_FREE 2 #define BOOST_ATOMIC_INT32_LOCK_FREE 2 #if defined(_M_AMD64) || defined(BOOST_ATOMIC_DETAIL_X86_HAS_CMPXCHG8B) #define BOOST_ATOMIC_INT64_LOCK_FREE 2 #endif #if defined(BOOST_ATOMIC_DETAIL_X86_HAS_CMPXCHG16B) && (defined(BOOST_HAS_INT128) || !defined(BOOST_NO_ALIGNMENT)) #define BOOST_ATOMIC_INT128_LOCK_FREE 2 #endif #define BOOST_ATOMIC_POINTER_LOCK_FREE 2 #define BOOST_ATOMIC_THREAD_FENCE 2 #define BOOST_ATOMIC_SIGNAL_FENCE 2 #endif // BOOST_ATOMIC_DETAIL_CAPS_MSVC_X86_HPP_INCLUDED_ ================================================ FILE: benchmarks/boost/atomic/detail/caps_windows.hpp ================================================ /* * Distributed under the Boost Software License, Version 1.0. * (See accompanying file LICENSE_1_0.txt or copy at * http://www.boost.org/LICENSE_1_0.txt) * * Copyright (c) 2009 Helge Bahmann * Copyright (c) 2013 Tim Blechmann * Copyright (c) 2012 - 2014 Andrey Semashev */ /*! * \file atomic/detail/caps_windows.hpp * * This header defines feature capabilities macros */ #ifndef BOOST_ATOMIC_DETAIL_CAPS_WINDOWS_HPP_INCLUDED_ #define BOOST_ATOMIC_DETAIL_CAPS_WINDOWS_HPP_INCLUDED_ #include #ifdef BOOST_HAS_PRAGMA_ONCE #pragma once #endif #define BOOST_ATOMIC_INT8_LOCK_FREE 2 #define BOOST_ATOMIC_INT16_LOCK_FREE 2 #define BOOST_ATOMIC_INT32_LOCK_FREE 2 #define BOOST_ATOMIC_POINTER_LOCK_FREE 2 #define BOOST_ATOMIC_THREAD_FENCE 2 #define BOOST_ATOMIC_SIGNAL_FENCE 2 #endif // BOOST_ATOMIC_DETAIL_CAPS_WINDOWS_HPP_INCLUDED_ ================================================ FILE: benchmarks/boost/atomic/detail/config.hpp ================================================ /* * Distributed under the Boost Software License, Version 1.0. * (See accompanying file LICENSE_1_0.txt or copy at * http://www.boost.org/LICENSE_1_0.txt) * * Copyright (c) 2012 Hartmut Kaiser * Copyright (c) 2014 Andrey Semashev */ /*! * \file atomic/detail/config.hpp * * This header defines configuraion macros for Boost.Atomic */ #ifndef BOOST_ATOMIC_DETAIL_CONFIG_HPP_INCLUDED_ #define BOOST_ATOMIC_DETAIL_CONFIG_HPP_INCLUDED_ #include #ifdef BOOST_HAS_PRAGMA_ONCE #pragma once #endif #if defined(__has_builtin) #if __has_builtin(__builtin_memcpy) #define BOOST_ATOMIC_DETAIL_HAS_BUILTIN_MEMCPY #endif #if __has_builtin(__builtin_memcmp) #define BOOST_ATOMIC_DETAIL_HAS_BUILTIN_MEMCMP #endif #elif defined(BOOST_GCC) #define BOOST_ATOMIC_DETAIL_HAS_BUILTIN_MEMCPY #define BOOST_ATOMIC_DETAIL_HAS_BUILTIN_MEMCMP #endif #if defined(BOOST_ATOMIC_DETAIL_HAS_BUILTIN_MEMCPY) #define BOOST_ATOMIC_DETAIL_MEMCPY __builtin_memcpy #else #define BOOST_ATOMIC_DETAIL_MEMCPY std::memcpy #endif #if defined(BOOST_ATOMIC_DETAIL_HAS_BUILTIN_MEMCMP) #define BOOST_ATOMIC_DETAIL_MEMCMP __builtin_memcmp #else #define BOOST_ATOMIC_DETAIL_MEMCMP std::memcmp #endif #if defined(__CUDACC__) // nvcc does not support alternatives in asm statement constraints #define BOOST_ATOMIC_DETAIL_NO_ASM_CONSTRAINT_ALTERNATIVES // nvcc does not support condition code register ("cc") clobber in asm statements #define BOOST_ATOMIC_DETAIL_NO_ASM_CLOBBER_CC #endif #if !defined(BOOST_ATOMIC_DETAIL_NO_ASM_CLOBBER_CC) #define BOOST_ATOMIC_DETAIL_ASM_CLOBBER_CC "cc" #define BOOST_ATOMIC_DETAIL_ASM_CLOBBER_CC_COMMA "cc", #else #define BOOST_ATOMIC_DETAIL_ASM_CLOBBER_CC #define BOOST_ATOMIC_DETAIL_ASM_CLOBBER_CC_COMMA #endif #if (defined(macintosh) || defined(__APPLE__) || defined(__APPLE_CC__)) && (defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__) < 403) // This macro indicates we're using older binutils that don't support implied zero displacements for memory opereands, // making code like this invalid: // movl 4+(%%edx), %%eax #define BOOST_ATOMIC_DETAIL_NO_ASM_IMPLIED_ZERO_DISPLACEMENTS #endif #if defined(__clang__) || (defined(BOOST_GCC) && (BOOST_GCC+0) < 40500) // This macro indicates that the compiler does not support allocating rax:rdx register pairs ("A") in asm blocks #define BOOST_ATOMIC_DETAIL_NO_ASM_RAX_RDX_PAIRS #endif #endif // BOOST_ATOMIC_DETAIL_CONFIG_HPP_INCLUDED_ ================================================ FILE: benchmarks/boost/atomic/detail/int_sizes.hpp ================================================ /* * Distributed under the Boost Software License, Version 1.0. * (See accompanying file LICENSE_1_0.txt or copy at * http://www.boost.org/LICENSE_1_0.txt) * * Copyright (c) 2014 Andrey Semashev */ /*! * \file atomic/detail/int_sizes.hpp * * This header defines macros for testing buitin integer type sizes */ #ifndef BOOST_ATOMIC_DETAIL_INT_SIZES_HPP_INCLUDED_ #define BOOST_ATOMIC_DETAIL_INT_SIZES_HPP_INCLUDED_ #include #ifdef BOOST_HAS_PRAGMA_ONCE #pragma once #endif // GCC and compatible compilers define internal macros with builtin type traits #if defined(__SIZEOF_SHORT__) #define BOOST_ATOMIC_DETAIL_SIZEOF_SHORT __SIZEOF_SHORT__ #endif #if defined(__SIZEOF_INT__) #define BOOST_ATOMIC_DETAIL_SIZEOF_INT __SIZEOF_INT__ #endif #if defined(__SIZEOF_LONG__) #define BOOST_ATOMIC_DETAIL_SIZEOF_LONG __SIZEOF_LONG__ #endif #if defined(__SIZEOF_LONG_LONG__) #define BOOST_ATOMIC_DETAIL_SIZEOF_LLONG __SIZEOF_LONG_LONG__ #endif #if defined(__SIZEOF_WCHAR_T__) #define BOOST_ATOMIC_DETAIL_SIZEOF_WCHAR_T __SIZEOF_WCHAR_T__ #endif #if defined(__SIZEOF_POINTER__) #define BOOST_ATOMIC_DETAIL_SIZEOF_POINTER __SIZEOF_POINTER__ #elif defined(_MSC_VER) #if defined(_M_AMD64) || defined(_M_IA64) #define BOOST_ATOMIC_DETAIL_SIZEOF_POINTER 8 #else #define BOOST_ATOMIC_DETAIL_SIZEOF_POINTER 4 #endif #endif #if !defined(BOOST_ATOMIC_DETAIL_SIZEOF_SHORT) || !defined(BOOST_ATOMIC_DETAIL_SIZEOF_INT) ||\ !defined(BOOST_ATOMIC_DETAIL_SIZEOF_LONG) || !defined(BOOST_ATOMIC_DETAIL_SIZEOF_LLONG) // Try to deduce sizes from limits #include #include #if (USHRT_MAX + 0) == 0xff #define BOOST_ATOMIC_DETAIL_SIZEOF_SHORT 1 #elif (USHRT_MAX + 0) == 0xffff #define BOOST_ATOMIC_DETAIL_SIZEOF_SHORT 2 #elif (USHRT_MAX + 0) == 0xffffffff #define BOOST_ATOMIC_DETAIL_SIZEOF_SHORT 4 #elif (USHRT_MAX + 0) == UINT64_C(0xffffffffffffffff) #define BOOST_ATOMIC_DETAIL_SIZEOF_SHORT 8 #endif #if (UINT_MAX + 0) == 0xff #define BOOST_ATOMIC_DETAIL_SIZEOF_INT 1 #elif (UINT_MAX + 0) == 0xffff #define BOOST_ATOMIC_DETAIL_SIZEOF_INT 2 #elif (UINT_MAX + 0) == 0xffffffff #define BOOST_ATOMIC_DETAIL_SIZEOF_INT 4 #elif (UINT_MAX + 0) == UINT64_C(0xffffffffffffffff) #define BOOST_ATOMIC_DETAIL_SIZEOF_INT 8 #endif #if (ULONG_MAX + 0) == 0xff #define BOOST_ATOMIC_DETAIL_SIZEOF_LONG 1 #elif (ULONG_MAX + 0) == 0xffff #define BOOST_ATOMIC_DETAIL_SIZEOF_LONG 2 #elif (ULONG_MAX + 0) == 0xffffffff #define BOOST_ATOMIC_DETAIL_SIZEOF_LONG 4 #elif (ULONG_MAX + 0) == UINT64_C(0xffffffffffffffff) #define BOOST_ATOMIC_DETAIL_SIZEOF_LONG 8 #endif #if defined(__hpux) // HP-UX's value of ULONG_LONG_MAX is unusable in preprocessor expressions #define BOOST_ATOMIC_DETAIL_SIZEOF_LLONG 8 #else // The list of the non-standard macros (the ones except ULLONG_MAX) is taken from cstdint.hpp #if defined(ULLONG_MAX) #define BOOST_ATOMIC_DETAIL_ULLONG_MAX ULLONG_MAX #elif defined(ULONG_LONG_MAX) #define BOOST_ATOMIC_DETAIL_ULLONG_MAX ULONG_LONG_MAX #elif defined(ULONGLONG_MAX) #define BOOST_ATOMIC_DETAIL_ULLONG_MAX ULONGLONG_MAX #elif defined(_LLONG_MAX) // strangely enough, this one seems to be holding the limit for the unsigned integer #define BOOST_ATOMIC_DETAIL_ULLONG_MAX _LLONG_MAX #endif #if (BOOST_ATOMIC_DETAIL_ULLONG_MAX + 0) == 0xff #define BOOST_ATOMIC_DETAIL_SIZEOF_LLONG 1 #elif (BOOST_ATOMIC_DETAIL_ULLONG_MAX + 0) == 0xffff #define BOOST_ATOMIC_DETAIL_SIZEOF_LLONG 2 #elif (BOOST_ATOMIC_DETAIL_ULLONG_MAX + 0) == 0xffffffff #define BOOST_ATOMIC_DETAIL_SIZEOF_LLONG 4 #elif (BOOST_ATOMIC_DETAIL_ULLONG_MAX + 0) == UINT64_C(0xffffffffffffffff) #define BOOST_ATOMIC_DETAIL_SIZEOF_LLONG 8 #endif #endif // defined(__hpux) #endif #if !defined(BOOST_ATOMIC_DETAIL_SIZEOF_WCHAR_T) #include #include #if defined(_MSC_VER) && ( _MSC_VER <= 1310 || defined(UNDER_CE) && _MSC_VER <= 1500 ) // MSVC 7.1 and MSVC 8 (arm) define WCHAR_MAX to a value not suitable for constant expressions #define BOOST_ATOMIC_DETAIL_SIZEOF_WCHAR_T 2 #elif (WCHAR_MAX + 0) == 0xff || (WCHAR_MAX + 0) == 0x7f #define BOOST_ATOMIC_DETAIL_SIZEOF_WCHAR_T 1 #elif (WCHAR_MAX + 0) == 0xffff || (WCHAR_MAX + 0) == 0x7fff #define BOOST_ATOMIC_DETAIL_SIZEOF_WCHAR_T 2 #elif (WCHAR_MAX + 0) == 0xffffffff || (WCHAR_MAX + 0) == 0x7fffffff #define BOOST_ATOMIC_DETAIL_SIZEOF_WCHAR_T 4 #elif (WCHAR_MAX + 0) == UINT64_C(0xffffffffffffffff) || (WCHAR_MAX + 0) == INT64_C(0x7fffffffffffffff) #define BOOST_ATOMIC_DETAIL_SIZEOF_WCHAR_T 8 #endif #endif #if !defined(BOOST_ATOMIC_DETAIL_SIZEOF_SHORT) || !defined(BOOST_ATOMIC_DETAIL_SIZEOF_INT) ||\ !defined(BOOST_ATOMIC_DETAIL_SIZEOF_LONG) || !defined(BOOST_ATOMIC_DETAIL_SIZEOF_LLONG) ||\ !defined(BOOST_ATOMIC_DETAIL_SIZEOF_WCHAR_T) #error Boost.Atomic: Failed to determine builtin integer sizes, the target platform is not supported. Please, report to the developers. #endif #endif // BOOST_ATOMIC_DETAIL_INT_SIZES_HPP_INCLUDED_ ================================================ FILE: benchmarks/boost/atomic/detail/interlocked.hpp ================================================ #ifndef BOOST_ATOMIC_DETAIL_INTERLOCKED_HPP #define BOOST_ATOMIC_DETAIL_INTERLOCKED_HPP // Copyright (c) 2009 Helge Bahmann // Copyright (c) 2012 - 2014 Andrey Semashev // // Distributed under the Boost Software License, Version 1.0. // See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) #include #ifdef BOOST_HAS_PRAGMA_ONCE #pragma once #endif #if defined(_WIN32_WCE) #if _WIN32_WCE >= 0x600 extern "C" long __cdecl _InterlockedCompareExchange( long volatile *, long, long ); extern "C" long __cdecl _InterlockedExchangeAdd( long volatile *, long ); extern "C" long __cdecl _InterlockedExchange( long volatile *, long ); #define BOOST_ATOMIC_INTERLOCKED_COMPARE_EXCHANGE(dest, exchange, compare) _InterlockedCompareExchange((long*)(dest), exchange, compare) #define BOOST_ATOMIC_INTERLOCKED_EXCHANGE_ADD(dest, addend) _InterlockedExchangeAdd((long*)(dest), (long)(addend)) #define BOOST_ATOMIC_INTERLOCKED_EXCHANGE(dest, newval) _InterlockedExchange((long*)(dest), (long)(newval)) #else // _WIN32_WCE >= 0x600 extern "C" long __cdecl InterlockedCompareExchange( long*, long, long ); extern "C" long __cdecl InterlockedExchangeAdd( long*, long ); extern "C" long __cdecl InterlockedExchange( long*, long ); #define BOOST_ATOMIC_INTERLOCKED_COMPARE_EXCHANGE(dest, exchange, compare) InterlockedCompareExchange((long*)(dest), exchange, compare) #define BOOST_ATOMIC_INTERLOCKED_EXCHANGE_ADD(dest, addend) InterlockedExchangeAdd((long*)(dest), (long)(addend)) #define BOOST_ATOMIC_INTERLOCKED_EXCHANGE(dest, newval) InterlockedExchange((long*)(dest), (long)(newval)) #endif // _WIN32_WCE >= 0x600 #define BOOST_ATOMIC_INTERLOCKED_COMPARE_EXCHANGE_POINTER(dest, exchange, compare) ((void*)BOOST_ATOMIC_INTERLOCKED_COMPARE_EXCHANGE((long*)(dest), (long)(exchange), (long)(compare))) #define BOOST_ATOMIC_INTERLOCKED_EXCHANGE_POINTER(dest, exchange) ((void*)BOOST_ATOMIC_INTERLOCKED_EXCHANGE((long*)(dest), (long)(exchange))) #elif defined(_MSC_VER) && _MSC_VER >= 1310 #if _MSC_VER < 1400 extern "C" long __cdecl _InterlockedCompareExchange( long volatile *, long, long ); extern "C" long __cdecl _InterlockedExchangeAdd( long volatile *, long ); extern "C" long __cdecl _InterlockedExchange( long volatile *, long ); #if defined(BOOST_MSVC) #pragma intrinsic(_InterlockedCompareExchange) #pragma intrinsic(_InterlockedExchangeAdd) #pragma intrinsic(_InterlockedExchange) #endif #define BOOST_ATOMIC_INTERLOCKED_COMPARE_EXCHANGE(dest, exchange, compare) _InterlockedCompareExchange((long*)(dest), exchange, compare) #define BOOST_ATOMIC_INTERLOCKED_EXCHANGE_ADD(dest, addend) _InterlockedExchangeAdd((long*)(dest), (long)(addend)) #define BOOST_ATOMIC_INTERLOCKED_EXCHANGE(dest, newval) _InterlockedExchange((long*)(dest), (long)(newval)) #define BOOST_ATOMIC_INTERLOCKED_COMPARE_EXCHANGE_POINTER(dest, exchange, compare) ((void*)BOOST_ATOMIC_INTERLOCKED_COMPARE_EXCHANGE((long*)(dest), (long)(exchange), (long)(compare))) #define BOOST_ATOMIC_INTERLOCKED_EXCHANGE_POINTER(dest, exchange) ((void*)BOOST_ATOMIC_INTERLOCKED_EXCHANGE((long*)(dest), (long)(exchange))) #else // _MSC_VER < 1400 #include #if defined(BOOST_MSVC) #pragma intrinsic(_InterlockedCompareExchange) #pragma intrinsic(_InterlockedExchangeAdd) #pragma intrinsic(_InterlockedExchange) #pragma intrinsic(_InterlockedAnd) #pragma intrinsic(_InterlockedOr) #pragma intrinsic(_InterlockedXor) #endif #define BOOST_ATOMIC_INTERLOCKED_COMPARE_EXCHANGE(dest, exchange, compare) _InterlockedCompareExchange((long*)(dest), (long)(exchange), (long)(compare)) #define BOOST_ATOMIC_INTERLOCKED_EXCHANGE_ADD(dest, addend) _InterlockedExchangeAdd((long*)(dest), (long)(addend)) #define BOOST_ATOMIC_INTERLOCKED_EXCHANGE(dest, newval) _InterlockedExchange((long*)(dest), (long)(newval)) #define BOOST_ATOMIC_INTERLOCKED_AND(dest, arg) _InterlockedAnd((long*)(dest), (long)(arg)) #define BOOST_ATOMIC_INTERLOCKED_OR(dest, arg) _InterlockedOr((long*)(dest), (long)(arg)) #define BOOST_ATOMIC_INTERLOCKED_XOR(dest, arg) _InterlockedXor((long*)(dest), (long)(arg)) #if (defined(_M_IX86) && _M_IX86 >= 500) || defined(_M_AMD64) || defined(_M_IA64) #if defined(BOOST_MSVC) #pragma intrinsic(_InterlockedCompareExchange64) #endif #define BOOST_ATOMIC_INTERLOCKED_COMPARE_EXCHANGE64(dest, exchange, compare) _InterlockedCompareExchange64((__int64*)(dest), (__int64)(exchange), (__int64)(compare)) #endif #if _MSC_VER >= 1500 && defined(_M_AMD64) #if defined(BOOST_MSVC) #pragma intrinsic(_InterlockedCompareExchange128) #endif #define BOOST_ATOMIC_INTERLOCKED_COMPARE_EXCHANGE128(dest, exchange, compare) _InterlockedCompareExchange128((__int64*)(dest), ((const __int64*)(&exchange))[1], ((const __int64*)(&exchange))[0], (__int64*)(compare)) #endif #if _MSC_VER >= 1600 // MSVC 2010 and later provide intrinsics for 8 and 16 bit integers. // Note that for each bit count these macros must be either all defined or all not defined. // Otherwise atomic<> operations will be implemented inconsistently. #if defined(BOOST_MSVC) #pragma intrinsic(_InterlockedCompareExchange8) #pragma intrinsic(_InterlockedExchangeAdd8) #pragma intrinsic(_InterlockedExchange8) #pragma intrinsic(_InterlockedAnd8) #pragma intrinsic(_InterlockedOr8) #pragma intrinsic(_InterlockedXor8) #endif #define BOOST_ATOMIC_INTERLOCKED_COMPARE_EXCHANGE8(dest, exchange, compare) _InterlockedCompareExchange8((char*)(dest), (char)(exchange), (char)(compare)) #define BOOST_ATOMIC_INTERLOCKED_EXCHANGE_ADD8(dest, addend) _InterlockedExchangeAdd8((char*)(dest), (char)(addend)) #define BOOST_ATOMIC_INTERLOCKED_EXCHANGE8(dest, newval) _InterlockedExchange8((char*)(dest), (char)(newval)) #define BOOST_ATOMIC_INTERLOCKED_AND8(dest, arg) _InterlockedAnd8((char*)(dest), (char)(arg)) #define BOOST_ATOMIC_INTERLOCKED_OR8(dest, arg) _InterlockedOr8((char*)(dest), (char)(arg)) #define BOOST_ATOMIC_INTERLOCKED_XOR8(dest, arg) _InterlockedXor8((char*)(dest), (char)(arg)) #if defined(BOOST_MSVC) #pragma intrinsic(_InterlockedCompareExchange16) #pragma intrinsic(_InterlockedExchangeAdd16) #pragma intrinsic(_InterlockedExchange16) #pragma intrinsic(_InterlockedAnd16) #pragma intrinsic(_InterlockedOr16) #pragma intrinsic(_InterlockedXor16) #endif #define BOOST_ATOMIC_INTERLOCKED_COMPARE_EXCHANGE16(dest, exchange, compare) _InterlockedCompareExchange16((short*)(dest), (short)(exchange), (short)(compare)) #define BOOST_ATOMIC_INTERLOCKED_EXCHANGE_ADD16(dest, addend) _InterlockedExchangeAdd16((short*)(dest), (short)(addend)) #define BOOST_ATOMIC_INTERLOCKED_EXCHANGE16(dest, newval) _InterlockedExchange16((short*)(dest), (short)(newval)) #define BOOST_ATOMIC_INTERLOCKED_AND16(dest, arg) _InterlockedAnd16((short*)(dest), (short)(arg)) #define BOOST_ATOMIC_INTERLOCKED_OR16(dest, arg) _InterlockedOr16((short*)(dest), (short)(arg)) #define BOOST_ATOMIC_INTERLOCKED_XOR16(dest, arg) _InterlockedXor16((short*)(dest), (short)(arg)) #endif // _MSC_VER >= 1600 #if defined(_M_AMD64) || defined(_M_IA64) #if defined(BOOST_MSVC) #pragma intrinsic(_InterlockedExchangeAdd64) #pragma intrinsic(_InterlockedExchange64) #pragma intrinsic(_InterlockedAnd64) #pragma intrinsic(_InterlockedOr64) #pragma intrinsic(_InterlockedXor64) #endif #define BOOST_ATOMIC_INTERLOCKED_EXCHANGE_ADD64(dest, addend) _InterlockedExchangeAdd64((__int64*)(dest), (__int64)(addend)) #define BOOST_ATOMIC_INTERLOCKED_EXCHANGE64(dest, newval) _InterlockedExchange64((__int64*)(dest), (__int64)(newval)) #define BOOST_ATOMIC_INTERLOCKED_AND64(dest, arg) _InterlockedAnd64((__int64*)(dest), (__int64)(arg)) #define BOOST_ATOMIC_INTERLOCKED_OR64(dest, arg) _InterlockedOr64((__int64*)(dest), (__int64)(arg)) #define BOOST_ATOMIC_INTERLOCKED_XOR64(dest, arg) _InterlockedXor64((__int64*)(dest), (__int64)(arg)) #if defined(BOOST_MSVC) #pragma intrinsic(_InterlockedCompareExchangePointer) #pragma intrinsic(_InterlockedExchangePointer) #endif #define BOOST_ATOMIC_INTERLOCKED_COMPARE_EXCHANGE_POINTER(dest, exchange, compare) _InterlockedCompareExchangePointer((void**)(dest), (void*)(exchange), (void*)(compare)) #define BOOST_ATOMIC_INTERLOCKED_EXCHANGE_POINTER(dest, newval) _InterlockedExchangePointer((void**)(dest), (void*)(newval)) #define BOOST_ATOMIC_INTERLOCKED_EXCHANGE_ADD_POINTER(dest, byte_offset) ((void*)BOOST_ATOMIC_INTERLOCKED_EXCHANGE_ADD64((long*)(dest), byte_offset)) #elif defined(_M_IX86) #define BOOST_ATOMIC_INTERLOCKED_COMPARE_EXCHANGE_POINTER(dest, exchange, compare) ((void*)_InterlockedCompareExchange((long*)(dest), (long)(exchange), (long)(compare))) #define BOOST_ATOMIC_INTERLOCKED_EXCHANGE_POINTER(dest, newval) ((void*)_InterlockedExchange((long*)(dest), (long)(newval))) #define BOOST_ATOMIC_INTERLOCKED_EXCHANGE_ADD_POINTER(dest, byte_offset) ((void*)BOOST_ATOMIC_INTERLOCKED_EXCHANGE_ADD((long*)(dest), byte_offset)) #endif #if _MSC_VER >= 1700 && defined(_M_ARM) #if defined(BOOST_MSVC) #pragma intrinsic(_InterlockedExchangeAdd64) #pragma intrinsic(_InterlockedExchange64) #pragma intrinsic(_InterlockedAnd64) #pragma intrinsic(_InterlockedOr64) #pragma intrinsic(_InterlockedXor64) #endif #define BOOST_ATOMIC_INTERLOCKED_EXCHANGE_ADD64(dest, addend) _InterlockedExchangeAdd64((__int64*)(dest), (__int64)(addend)) #define BOOST_ATOMIC_INTERLOCKED_EXCHANGE64(dest, newval) _InterlockedExchange64((__int64*)(dest), (__int64)(newval)) #define BOOST_ATOMIC_INTERLOCKED_AND64(dest, arg) _InterlockedAnd64((__int64*)(dest), (__int64)(arg)) #define BOOST_ATOMIC_INTERLOCKED_OR64(dest, arg) _InterlockedOr64((__int64*)(dest), (__int64)(arg)) #define BOOST_ATOMIC_INTERLOCKED_XOR64(dest, arg) _InterlockedXor64((__int64*)(dest), (__int64)(arg)) #if defined(BOOST_MSVC) #pragma intrinsic(_InterlockedCompareExchange8_nf) #pragma intrinsic(_InterlockedCompareExchange8_acq) #pragma intrinsic(_InterlockedCompareExchange8_rel) #pragma intrinsic(_InterlockedCompareExchange16_nf) #pragma intrinsic(_InterlockedCompareExchange16_acq) #pragma intrinsic(_InterlockedCompareExchange16_rel) #pragma intrinsic(_InterlockedCompareExchange_nf) #pragma intrinsic(_InterlockedCompareExchange_acq) #pragma intrinsic(_InterlockedCompareExchange_rel) #pragma intrinsic(_InterlockedCompareExchange64) #pragma intrinsic(_InterlockedCompareExchange64_nf) #pragma intrinsic(_InterlockedCompareExchange64_acq) #pragma intrinsic(_InterlockedCompareExchange64_rel) #pragma intrinsic(_InterlockedCompareExchangePointer) #pragma intrinsic(_InterlockedCompareExchangePointer_nf) #pragma intrinsic(_InterlockedCompareExchangePointer_acq) #pragma intrinsic(_InterlockedCompareExchangePointer_rel) #endif #define BOOST_ATOMIC_INTERLOCKED_COMPARE_EXCHANGE8_RELAXED(dest, exchange, compare) _InterlockedCompareExchange8_nf((char*)(dest), (char)(exchange), (char)(compare)) #define BOOST_ATOMIC_INTERLOCKED_COMPARE_EXCHANGE8_ACQUIRE(dest, exchange, compare) _InterlockedCompareExchange8_acq((char*)(dest), (char)(exchange), (char)(compare)) #define BOOST_ATOMIC_INTERLOCKED_COMPARE_EXCHANGE8_RELEASE(dest, exchange, compare) _InterlockedCompareExchange8_rel((char*)(dest), (char)(exchange), (char)(compare)) #define BOOST_ATOMIC_INTERLOCKED_COMPARE_EXCHANGE16_RELAXED(dest, exchange, compare) _InterlockedCompareExchange16_nf((short*)(dest), (short)(exchange), (short)(compare)) #define BOOST_ATOMIC_INTERLOCKED_COMPARE_EXCHANGE16_ACQUIRE(dest, exchange, compare) _InterlockedCompareExchange16_acq((short*)(dest), (short)(exchange), (short)(compare)) #define BOOST_ATOMIC_INTERLOCKED_COMPARE_EXCHANGE16_RELEASE(dest, exchange, compare) _InterlockedCompareExchange16_rel((short*)(dest), (short)(exchange), (short)(compare)) #define BOOST_ATOMIC_INTERLOCKED_COMPARE_EXCHANGE_RELAXED(dest, exchange, compare) _InterlockedCompareExchange_nf((long*)(dest), (long)(exchange), (long)(compare)) #define BOOST_ATOMIC_INTERLOCKED_COMPARE_EXCHANGE_ACQUIRE(dest, exchange, compare) _InterlockedCompareExchange_acq((long*)(dest), (long)(exchange), (long)(compare)) #define BOOST_ATOMIC_INTERLOCKED_COMPARE_EXCHANGE_RELEASE(dest, exchange, compare) _InterlockedCompareExchange_rel((long*)(dest), (long)(exchange), (long)(compare)) #define BOOST_ATOMIC_INTERLOCKED_COMPARE_EXCHANGE64(dest, exchange, compare) _InterlockedCompareExchange64((__int64*)(dest), (__int64)(exchange), (__int64)(compare)) #define BOOST_ATOMIC_INTERLOCKED_COMPARE_EXCHANGE64_RELAXED(dest, exchange, compare) _InterlockedCompareExchange64_nf((__int64*)(dest), (__int64)(exchange), (__int64)(compare)) #define BOOST_ATOMIC_INTERLOCKED_COMPARE_EXCHANGE64_ACQUIRE(dest, exchange, compare) _InterlockedCompareExchange64_acq((__int64*)(dest), (__int64)(exchange), (__int64)(compare)) #define BOOST_ATOMIC_INTERLOCKED_COMPARE_EXCHANGE64_RELEASE(dest, exchange, compare) _InterlockedCompareExchange64_rel((__int64*)(dest), (__int64)(exchange), (__int64)(compare)) #define BOOST_ATOMIC_INTERLOCKED_COMPARE_EXCHANGE_POINTER(dest, exchange, compare) _InterlockedCompareExchangePointer((void**)(dest), (void*)(exchange), (void*)(compare)) #define BOOST_ATOMIC_INTERLOCKED_COMPARE_EXCHANGE_POINTER_RELAXED(dest, exchange, compare) _InterlockedCompareExchangePointer_nf((void**)(dest), (void*)(exchange), (void*)(compare)) #define BOOST_ATOMIC_INTERLOCKED_COMPARE_EXCHANGE_POINTER_ACQUIRE(dest, exchange, compare) _InterlockedCompareExchangePointer_acq((void**)(dest), (void*)(exchange), (void*)(compare)) #define BOOST_ATOMIC_INTERLOCKED_COMPARE_EXCHANGE_POINTER_RELEASE(dest, exchange, compare) _InterlockedCompareExchangePointer_rel((void**)(dest), (void*)(exchange), (void*)(compare)) #if defined(BOOST_MSVC) #pragma intrinsic(_InterlockedExchangeAdd8_nf) #pragma intrinsic(_InterlockedExchangeAdd8_acq) #pragma intrinsic(_InterlockedExchangeAdd8_rel) #pragma intrinsic(_InterlockedExchangeAdd16_nf) #pragma intrinsic(_InterlockedExchangeAdd16_acq) #pragma intrinsic(_InterlockedExchangeAdd16_rel) #pragma intrinsic(_InterlockedExchangeAdd_nf) #pragma intrinsic(_InterlockedExchangeAdd_acq) #pragma intrinsic(_InterlockedExchangeAdd_rel) #pragma intrinsic(_InterlockedExchangeAdd64_nf) #pragma intrinsic(_InterlockedExchangeAdd64_acq) #pragma intrinsic(_InterlockedExchangeAdd64_rel) #endif #define BOOST_ATOMIC_INTERLOCKED_EXCHANGE_ADD8_RELAXED(dest, addend) _InterlockedExchangeAdd8_nf((char*)(dest), (char)(addend)) #define BOOST_ATOMIC_INTERLOCKED_EXCHANGE_ADD8_ACQUIRE(dest, addend) _InterlockedExchangeAdd8_acq((char*)(dest), (char)(addend)) #define BOOST_ATOMIC_INTERLOCKED_EXCHANGE_ADD8_RELEASE(dest, addend) _InterlockedExchangeAdd8_rel((char*)(dest), (char)(addend)) #define BOOST_ATOMIC_INTERLOCKED_EXCHANGE_ADD16_RELAXED(dest, addend) _InterlockedExchangeAdd16_nf((short*)(dest), (short)(addend)) #define BOOST_ATOMIC_INTERLOCKED_EXCHANGE_ADD16_ACQUIRE(dest, addend) _InterlockedExchangeAdd16_acq((short*)(dest), (short)(addend)) #define BOOST_ATOMIC_INTERLOCKED_EXCHANGE_ADD16_RELEASE(dest, addend) _InterlockedExchangeAdd16_rel((short*)(dest), (short)(addend)) #define BOOST_ATOMIC_INTERLOCKED_EXCHANGE_ADD_RELAXED(dest, addend) _InterlockedExchangeAdd_nf((long*)(dest), (long)(addend)) #define BOOST_ATOMIC_INTERLOCKED_EXCHANGE_ADD_ACQUIRE(dest, addend) _InterlockedExchangeAdd_acq((long*)(dest), (long)(addend)) #define BOOST_ATOMIC_INTERLOCKED_EXCHANGE_ADD_RELEASE(dest, addend) _InterlockedExchangeAdd_rel((long*)(dest), (long)(addend)) #define BOOST_ATOMIC_INTERLOCKED_EXCHANGE_ADD64_RELAXED(dest, addend) _InterlockedExchangeAdd64_nf((__int64*)(dest), (__int64)(addend)) #define BOOST_ATOMIC_INTERLOCKED_EXCHANGE_ADD64_ACQUIRE(dest, addend) _InterlockedExchangeAdd64_acq((__int64*)(dest), (__int64)(addend)) #define BOOST_ATOMIC_INTERLOCKED_EXCHANGE_ADD64_RELEASE(dest, addend) _InterlockedExchangeAdd64_rel((__int64*)(dest), (__int64)(addend)) #define BOOST_ATOMIC_INTERLOCKED_EXCHANGE_ADD_POINTER(dest, byte_offset) ((void*)BOOST_ATOMIC_INTERLOCKED_EXCHANGE_ADD((long*)(dest), byte_offset)) #define BOOST_ATOMIC_INTERLOCKED_EXCHANGE_ADD_POINTER_RELAXED(dest, byte_offset) ((void*)BOOST_ATOMIC_INTERLOCKED_EXCHANGE_ADD_RELAXED((long*)(dest), byte_offset)) #define BOOST_ATOMIC_INTERLOCKED_EXCHANGE_ADD_POINTER_ACQUIRE(dest, byte_offset) ((void*)BOOST_ATOMIC_INTERLOCKED_EXCHANGE_ADD_ACQUIRE((long*)(dest), byte_offset)) #define BOOST_ATOMIC_INTERLOCKED_EXCHANGE_ADD_POINTER_RELEASE(dest, byte_offset) ((void*)BOOST_ATOMIC_INTERLOCKED_EXCHANGE_ADD_RELEASE((long*)(dest), byte_offset)) #if defined(BOOST_MSVC) #pragma intrinsic(_InterlockedExchange8_nf) #pragma intrinsic(_InterlockedExchange8_acq) #pragma intrinsic(_InterlockedExchange16_nf) #pragma intrinsic(_InterlockedExchange16_acq) #pragma intrinsic(_InterlockedExchange_nf) #pragma intrinsic(_InterlockedExchange_acq) #pragma intrinsic(_InterlockedExchange64_nf) #pragma intrinsic(_InterlockedExchange64_acq) #pragma intrinsic(_InterlockedExchangePointer) #pragma intrinsic(_InterlockedExchangePointer_nf) #pragma intrinsic(_InterlockedExchangePointer_acq) #if _MSC_VER >= 1800 #pragma intrinsic(_InterlockedExchange8_rel) #pragma intrinsic(_InterlockedExchange16_rel) #pragma intrinsic(_InterlockedExchange_rel) #pragma intrinsic(_InterlockedExchange64_rel) #pragma intrinsic(_InterlockedExchangePointer_rel) #endif #endif #define BOOST_ATOMIC_INTERLOCKED_EXCHANGE8_RELAXED(dest, newval) _InterlockedExchange8_nf((char*)(dest), (char)(newval)) #define BOOST_ATOMIC_INTERLOCKED_EXCHANGE8_ACQUIRE(dest, newval) _InterlockedExchange8_acq((char*)(dest), (char)(newval)) #define BOOST_ATOMIC_INTERLOCKED_EXCHANGE16_RELAXED(dest, newval) _InterlockedExchange16_nf((short*)(dest), (short)(newval)) #define BOOST_ATOMIC_INTERLOCKED_EXCHANGE16_ACQUIRE(dest, newval) _InterlockedExchange16_acq((short*)(dest), (short)(newval)) #define BOOST_ATOMIC_INTERLOCKED_EXCHANGE_RELAXED(dest, newval) _InterlockedExchange_nf((long*)(dest), (long)(newval)) #define BOOST_ATOMIC_INTERLOCKED_EXCHANGE_ACQUIRE(dest, newval) _InterlockedExchange_acq((long*)(dest), (long)(newval)) #define BOOST_ATOMIC_INTERLOCKED_EXCHANGE64_RELAXED(dest, newval) _InterlockedExchange64_nf((__int64*)(dest), (__int64)(newval)) #define BOOST_ATOMIC_INTERLOCKED_EXCHANGE64_ACQUIRE(dest, newval) _InterlockedExchange64_acq((__int64*)(dest), (__int64)(newval)) #define BOOST_ATOMIC_INTERLOCKED_EXCHANGE_POINTER(dest, newval) _InterlockedExchangePointer((void**)(dest), (void*)(newval)) #define BOOST_ATOMIC_INTERLOCKED_EXCHANGE_POINTER_RELAXED(dest, newval) _InterlockedExchangePointer_nf((void**)(dest), (void*)(newval)) #define BOOST_ATOMIC_INTERLOCKED_EXCHANGE_POINTER_ACQUIRE(dest, newval) _InterlockedExchangePointer_acq((void**)(dest), (void*)(newval)) #if _MSC_VER >= 1800 #define BOOST_ATOMIC_INTERLOCKED_EXCHANGE8_RELEASE(dest, newval) _InterlockedExchange8_rel((char*)(dest), (char)(newval)) #define BOOST_ATOMIC_INTERLOCKED_EXCHANGE16_RELEASE(dest, newval) _InterlockedExchange16_rel((short*)(dest), (short)(newval)) #define BOOST_ATOMIC_INTERLOCKED_EXCHANGE_RELEASE(dest, newval) _InterlockedExchange_rel((long*)(dest), (long)(newval)) #define BOOST_ATOMIC_INTERLOCKED_EXCHANGE64_RELEASE(dest, newval) _InterlockedExchange64_rel((__int64*)(dest), (__int64)(newval)) #define BOOST_ATOMIC_INTERLOCKED_EXCHANGE_POINTER_RELEASE(dest, newval) _InterlockedExchangePointer_rel((void**)(dest), (void*)(newval)) #else #define BOOST_ATOMIC_INTERLOCKED_EXCHANGE8_RELEASE(dest, newval) BOOST_ATOMIC_INTERLOCKED_EXCHANGE8(dest, newval) #define BOOST_ATOMIC_INTERLOCKED_EXCHANGE16_RELEASE(dest, newval) BOOST_ATOMIC_INTERLOCKED_EXCHANGE16(dest, newval) #define BOOST_ATOMIC_INTERLOCKED_EXCHANGE_RELEASE(dest, newval) BOOST_ATOMIC_INTERLOCKED_EXCHANGE(dest, newval) #define BOOST_ATOMIC_INTERLOCKED_EXCHANGE64_RELEASE(dest, newval) BOOST_ATOMIC_INTERLOCKED_EXCHANGE64(dest, newval) #define BOOST_ATOMIC_INTERLOCKED_EXCHANGE_POINTER_RELEASE(dest, newval) BOOST_ATOMIC_INTERLOCKED_EXCHANGE_POINTER(dest, newval) #endif #if defined(BOOST_MSVC) #pragma intrinsic(_InterlockedAnd8_nf) #pragma intrinsic(_InterlockedAnd8_acq) #pragma intrinsic(_InterlockedAnd8_rel) #pragma intrinsic(_InterlockedAnd16_nf) #pragma intrinsic(_InterlockedAnd16_acq) #pragma intrinsic(_InterlockedAnd16_rel) #pragma intrinsic(_InterlockedAnd_nf) #pragma intrinsic(_InterlockedAnd_acq) #pragma intrinsic(_InterlockedAnd_rel) #pragma intrinsic(_InterlockedAnd64_nf) #pragma intrinsic(_InterlockedAnd64_acq) #pragma intrinsic(_InterlockedAnd64_rel) #endif #define BOOST_ATOMIC_INTERLOCKED_AND8_RELAXED(dest, arg) _InterlockedAnd8_nf((char*)(dest), (char)(arg)) #define BOOST_ATOMIC_INTERLOCKED_AND8_ACQUIRE(dest, arg) _InterlockedAnd8_acq((char*)(dest), (char)(arg)) #define BOOST_ATOMIC_INTERLOCKED_AND8_RELEASE(dest, arg) _InterlockedAnd8_rel((char*)(dest), (char)(arg)) #define BOOST_ATOMIC_INTERLOCKED_AND16_RELAXED(dest, arg) _InterlockedAnd16_nf((short*)(dest), (short)(arg)) #define BOOST_ATOMIC_INTERLOCKED_AND16_ACQUIRE(dest, arg) _InterlockedAnd16_acq((short*)(dest), (short)(arg)) #define BOOST_ATOMIC_INTERLOCKED_AND16_RELEASE(dest, arg) _InterlockedAnd16_rel((short*)(dest), (short)(arg)) #define BOOST_ATOMIC_INTERLOCKED_AND_RELAXED(dest, arg) _InterlockedAnd_nf((long*)(dest), (long)(arg)) #define BOOST_ATOMIC_INTERLOCKED_AND_ACQUIRE(dest, arg) _InterlockedAnd_acq((long*)(dest), (long)(arg)) #define BOOST_ATOMIC_INTERLOCKED_AND_RELEASE(dest, arg) _InterlockedAnd_rel((long*)(dest), (long)(arg)) #define BOOST_ATOMIC_INTERLOCKED_AND64_RELAXED(dest, arg) _InterlockedAnd64_nf((__int64*)(dest), (__int64)(arg)) #define BOOST_ATOMIC_INTERLOCKED_AND64_ACQUIRE(dest, arg) _InterlockedAnd64_acq((__int64*)(dest), (__int64)(arg)) #define BOOST_ATOMIC_INTERLOCKED_AND64_RELEASE(dest, arg) _InterlockedAnd64_rel((__int64*)(dest), (__int64)(arg)) #if defined(BOOST_MSVC) #pragma intrinsic(_InterlockedOr8_nf) #pragma intrinsic(_InterlockedOr8_acq) #pragma intrinsic(_InterlockedOr8_rel) #pragma intrinsic(_InterlockedOr16_nf) #pragma intrinsic(_InterlockedOr16_acq) #pragma intrinsic(_InterlockedOr16_rel) #pragma intrinsic(_InterlockedOr_nf) #pragma intrinsic(_InterlockedOr_acq) #pragma intrinsic(_InterlockedOr_rel) #pragma intrinsic(_InterlockedOr64_nf) #pragma intrinsic(_InterlockedOr64_acq) #pragma intrinsic(_InterlockedOr64_rel) #endif #define BOOST_ATOMIC_INTERLOCKED_OR8_RELAXED(dest, arg) _InterlockedOr8_nf((char*)(dest), (char)(arg)) #define BOOST_ATOMIC_INTERLOCKED_OR8_ACQUIRE(dest, arg) _InterlockedOr8_acq((char*)(dest), (char)(arg)) #define BOOST_ATOMIC_INTERLOCKED_OR8_RELEASE(dest, arg) _InterlockedOr8_rel((char*)(dest), (char)(arg)) #define BOOST_ATOMIC_INTERLOCKED_OR16_RELAXED(dest, arg) _InterlockedOr16_nf((short*)(dest), (short)(arg)) #define BOOST_ATOMIC_INTERLOCKED_OR16_ACQUIRE(dest, arg) _InterlockedOr16_acq((short*)(dest), (short)(arg)) #define BOOST_ATOMIC_INTERLOCKED_OR16_RELEASE(dest, arg) _InterlockedOr16_rel((short*)(dest), (short)(arg)) #define BOOST_ATOMIC_INTERLOCKED_OR_RELAXED(dest, arg) _InterlockedOr_nf((long*)(dest), (long)(arg)) #define BOOST_ATOMIC_INTERLOCKED_OR_ACQUIRE(dest, arg) _InterlockedOr_acq((long*)(dest), (long)(arg)) #define BOOST_ATOMIC_INTERLOCKED_OR_RELEASE(dest, arg) _InterlockedOr_rel((long*)(dest), (long)(arg)) #define BOOST_ATOMIC_INTERLOCKED_OR64_RELAXED(dest, arg) _InterlockedOr64_nf((__int64*)(dest), (__int64)(arg)) #define BOOST_ATOMIC_INTERLOCKED_OR64_ACQUIRE(dest, arg) _InterlockedOr64_acq((__int64*)(dest), (__int64)(arg)) #define BOOST_ATOMIC_INTERLOCKED_OR64_RELEASE(dest, arg) _InterlockedOr64_rel((__int64*)(dest), (__int64)(arg)) #if defined(BOOST_MSVC) #pragma intrinsic(_InterlockedXor8_nf) #pragma intrinsic(_InterlockedXor8_acq) #pragma intrinsic(_InterlockedXor8_rel) #pragma intrinsic(_InterlockedXor16_nf) #pragma intrinsic(_InterlockedXor16_acq) #pragma intrinsic(_InterlockedXor16_rel) #pragma intrinsic(_InterlockedXor_nf) #pragma intrinsic(_InterlockedXor_acq) #pragma intrinsic(_InterlockedXor_rel) #pragma intrinsic(_InterlockedXor64_nf) #pragma intrinsic(_InterlockedXor64_acq) #pragma intrinsic(_InterlockedXor64_rel) #endif #define BOOST_ATOMIC_INTERLOCKED_XOR8_RELAXED(dest, arg) _InterlockedXor8_nf((char*)(dest), (char)(arg)) #define BOOST_ATOMIC_INTERLOCKED_XOR8_ACQUIRE(dest, arg) _InterlockedXor8_acq((char*)(dest), (char)(arg)) #define BOOST_ATOMIC_INTERLOCKED_XOR8_RELEASE(dest, arg) _InterlockedXor8_rel((char*)(dest), (char)(arg)) #define BOOST_ATOMIC_INTERLOCKED_XOR16_RELAXED(dest, arg) _InterlockedXor16_nf((short*)(dest), (short)(arg)) #define BOOST_ATOMIC_INTERLOCKED_XOR16_ACQUIRE(dest, arg) _InterlockedXor16_acq((short*)(dest), (short)(arg)) #define BOOST_ATOMIC_INTERLOCKED_XOR16_RELEASE(dest, arg) _InterlockedXor16_rel((short*)(dest), (short)(arg)) #define BOOST_ATOMIC_INTERLOCKED_XOR_RELAXED(dest, arg) _InterlockedXor_nf((long*)(dest), (long)(arg)) #define BOOST_ATOMIC_INTERLOCKED_XOR_ACQUIRE(dest, arg) _InterlockedXor_acq((long*)(dest), (long)(arg)) #define BOOST_ATOMIC_INTERLOCKED_XOR_RELEASE(dest, arg) _InterlockedXor_rel((long*)(dest), (long)(arg)) #define BOOST_ATOMIC_INTERLOCKED_XOR64_RELAXED(dest, arg) _InterlockedXor64_nf((__int64*)(dest), (__int64)(arg)) #define BOOST_ATOMIC_INTERLOCKED_XOR64_ACQUIRE(dest, arg) _InterlockedXor64_acq((__int64*)(dest), (__int64)(arg)) #define BOOST_ATOMIC_INTERLOCKED_XOR64_RELEASE(dest, arg) _InterlockedXor64_rel((__int64*)(dest), (__int64)(arg)) #endif // _MSC_VER >= 1700 && defined(_M_ARM) #endif // _MSC_VER < 1400 #else // defined(_MSC_VER) && _MSC_VER >= 1310 #if defined(BOOST_USE_WINDOWS_H) #include #define BOOST_ATOMIC_INTERLOCKED_COMPARE_EXCHANGE(dest, exchange, compare) InterlockedCompareExchange((long*)(dest), (long)(exchange), (long)(compare)) #define BOOST_ATOMIC_INTERLOCKED_EXCHANGE(dest, newval) InterlockedExchange((long*)(dest), (long)(newval)) #define BOOST_ATOMIC_INTERLOCKED_EXCHANGE_ADD(dest, addend) InterlockedExchangeAdd((long*)(dest), (long)(addend)) #if defined(_WIN64) #define BOOST_ATOMIC_INTERLOCKED_COMPARE_EXCHANGE64(dest, exchange, compare) InterlockedCompareExchange64((__int64*)(dest), (__int64)(exchange), (__int64)(compare)) #define BOOST_ATOMIC_INTERLOCKED_EXCHANGE64(dest, newval) InterlockedExchange64((__int64*)(dest), (__int64)(newval)) #define BOOST_ATOMIC_INTERLOCKED_EXCHANGE_ADD64(dest, addend) InterlockedExchangeAdd64((__int64*)(dest), (__int64)(addend)) #define BOOST_ATOMIC_INTERLOCKED_COMPARE_EXCHANGE_POINTER(dest, exchange, compare) InterlockedCompareExchangePointer((void**)(dest), (void*)(exchange), (void*)(compare)) #define BOOST_ATOMIC_INTERLOCKED_EXCHANGE_POINTER(dest, newval) InterlockedExchangePointer((void**)(dest), (void*)(newval)) #define BOOST_ATOMIC_INTERLOCKED_EXCHANGE_ADD_POINTER(dest, byte_offset) ((void*)BOOST_ATOMIC_INTERLOCKED_EXCHANGE_ADD64(dest, byte_offset)) #else // defined(_WIN64) #define BOOST_ATOMIC_INTERLOCKED_COMPARE_EXCHANGE_POINTER(dest, exchange, compare) ((void*)BOOST_ATOMIC_INTERLOCKED_COMPARE_EXCHANGE(dest, exchange, compare)) #define BOOST_ATOMIC_INTERLOCKED_EXCHANGE_POINTER(dest, newval) ((void*)BOOST_ATOMIC_INTERLOCKED_EXCHANGE(dest, newval)) #define BOOST_ATOMIC_INTERLOCKED_EXCHANGE_ADD_POINTER(dest, byte_offset) ((void*)BOOST_ATOMIC_INTERLOCKED_EXCHANGE_ADD(dest, byte_offset)) #endif // defined(_WIN64) #else // defined(BOOST_USE_WINDOWS_H) #if defined(__MINGW64__) #define BOOST_ATOMIC_INTERLOCKED_IMPORT #else #define BOOST_ATOMIC_INTERLOCKED_IMPORT __declspec(dllimport) #endif namespace boost { namespace atomics { namespace detail { extern "C" { BOOST_ATOMIC_INTERLOCKED_IMPORT long __stdcall InterlockedCompareExchange(long volatile*, long, long); BOOST_ATOMIC_INTERLOCKED_IMPORT long __stdcall InterlockedExchange(long volatile*, long); BOOST_ATOMIC_INTERLOCKED_IMPORT long __stdcall InterlockedExchangeAdd(long volatile*, long); #define BOOST_ATOMIC_INTERLOCKED_COMPARE_EXCHANGE(dest, exchange, compare) boost::atomics::detail::InterlockedCompareExchange((long*)(dest), (long)(exchange), (long)(compare)) #define BOOST_ATOMIC_INTERLOCKED_EXCHANGE(dest, newval) boost::atomics::detail::InterlockedExchange((long*)(dest), (long)(newval)) #define BOOST_ATOMIC_INTERLOCKED_EXCHANGE_ADD(dest, addend) boost::atomics::detail::InterlockedExchangeAdd((long*)(dest), (long)(addend)) #if defined(_WIN64) BOOST_ATOMIC_INTERLOCKED_IMPORT __int64 __stdcall InterlockedCompareExchange64(__int64 volatile*, __int64, __int64); BOOST_ATOMIC_INTERLOCKED_IMPORT __int64 __stdcall InterlockedExchange64(__int64 volatile*, __int64); BOOST_ATOMIC_INTERLOCKED_IMPORT __int64 __stdcall InterlockedExchangeAdd64(__int64 volatile*, __int64); BOOST_ATOMIC_INTERLOCKED_IMPORT void* __stdcall InterlockedCompareExchangePointer(void* volatile *, void*, void*); BOOST_ATOMIC_INTERLOCKED_IMPORT void* __stdcall InterlockedExchangePointer(void* volatile *, void*); #define BOOST_ATOMIC_INTERLOCKED_COMPARE_EXCHANGE64(dest, exchange, compare) boost::atomics::detail::InterlockedCompareExchange64((__int64*)(dest), (__int64)(exchange), (__int64)(compare)) #define BOOST_ATOMIC_INTERLOCKED_EXCHANGE64(dest, newval) boost::atomics::detail::InterlockedExchange64((__int64*)(dest), (__int64)(newval)) #define BOOST_ATOMIC_INTERLOCKED_EXCHANGE_ADD64(dest, addend) boost::atomics::detail::InterlockedExchangeAdd64((__int64*)(dest), (__int64)(addend)) #define BOOST_ATOMIC_INTERLOCKED_COMPARE_EXCHANGE_POINTER(dest, exchange, compare) boost::atomics::detail::InterlockedCompareExchangePointer((void**)(dest), (void*)(exchange), (void*)(compare)) #define BOOST_ATOMIC_INTERLOCKED_EXCHANGE_POINTER(dest, newval) boost::atomics::detail::InterlockedExchangePointer((void**)(dest), (void*)(newval)) #define BOOST_ATOMIC_INTERLOCKED_EXCHANGE_ADD_POINTER(dest, byte_offset) ((void*)BOOST_ATOMIC_INTERLOCKED_EXCHANGE_ADD64(dest, byte_offset)) #else // defined(_WIN64) #define BOOST_ATOMIC_INTERLOCKED_COMPARE_EXCHANGE_POINTER(dest, exchange, compare) ((void*)BOOST_ATOMIC_INTERLOCKED_COMPARE_EXCHANGE(dest, exchange, compare)) #define BOOST_ATOMIC_INTERLOCKED_EXCHANGE_POINTER(dest, newval) ((void*)BOOST_ATOMIC_INTERLOCKED_EXCHANGE(dest, newval)) #define BOOST_ATOMIC_INTERLOCKED_EXCHANGE_ADD_POINTER(dest, byte_offset) ((void*)BOOST_ATOMIC_INTERLOCKED_EXCHANGE_ADD(dest, byte_offset)) #endif // defined(_WIN64) } // extern "C" } // namespace detail } // namespace atomics } // namespace boost #undef BOOST_ATOMIC_INTERLOCKED_IMPORT #endif // defined(BOOST_USE_WINDOWS_H) #endif // defined(_MSC_VER) #endif ================================================ FILE: benchmarks/boost/atomic/detail/link.hpp ================================================ /* * Distributed under the Boost Software License, Version 1.0. * (See accompanying file LICENSE_1_0.txt or copy at * http://www.boost.org/LICENSE_1_0.txt) * * Copyright (c) 2012 Hartmut Kaiser * Copyright (c) 2014 Andrey Semashev */ /*! * \file atomic/detail/config.hpp * * This header defines macros for linking with compiled library of Boost.Atomic */ #ifndef BOOST_ATOMIC_DETAIL_LINK_HPP_INCLUDED_ #define BOOST_ATOMIC_DETAIL_LINK_HPP_INCLUDED_ #include #ifdef BOOST_HAS_PRAGMA_ONCE #pragma once #endif /////////////////////////////////////////////////////////////////////////////// // Set up dll import/export options #if (defined(BOOST_ATOMIC_DYN_LINK) || defined(BOOST_ALL_DYN_LINK)) && \ !defined(BOOST_ATOMIC_STATIC_LINK) #if defined(BOOST_ATOMIC_SOURCE) #define BOOST_ATOMIC_DECL BOOST_SYMBOL_EXPORT #define BOOST_ATOMIC_BUILD_DLL #else #define BOOST_ATOMIC_DECL BOOST_SYMBOL_IMPORT #endif #endif // building a shared library #ifndef BOOST_ATOMIC_DECL #define BOOST_ATOMIC_DECL #endif /////////////////////////////////////////////////////////////////////////////// // Auto library naming #if !defined(BOOST_ATOMIC_SOURCE) && !defined(BOOST_ALL_NO_LIB) && \ !defined(BOOST_ATOMIC_NO_LIB) #define BOOST_LIB_NAME boost_atomic // tell the auto-link code to select a dll when required: #if defined(BOOST_ALL_DYN_LINK) || defined(BOOST_ATOMIC_DYN_LINK) #define BOOST_DYN_LINK #endif #include #endif // auto-linking disabled #endif ================================================ FILE: benchmarks/boost/atomic/detail/lockpool.hpp ================================================ /* * Distributed under the Boost Software License, Version 1.0. * (See accompanying file LICENSE_1_0.txt or copy at * http://www.boost.org/LICENSE_1_0.txt) * * Copyright (c) 2011 Helge Bahmann * Copyright (c) 2013-2014 Andrey Semashev */ /*! * \file atomic/detail/lockpool.hpp * * This header contains declaration of the lockpool used to emulate atomic ops. */ #ifndef BOOST_ATOMIC_DETAIL_LOCKPOOL_HPP_INCLUDED_ #define BOOST_ATOMIC_DETAIL_LOCKPOOL_HPP_INCLUDED_ #include #include #ifdef BOOST_HAS_PRAGMA_ONCE #pragma once #endif namespace boost { namespace atomics { namespace detail { struct lockpool { class scoped_lock { void* m_lock; public: explicit BOOST_ATOMIC_DECL scoped_lock(const volatile void* addr) BOOST_NOEXCEPT; BOOST_ATOMIC_DECL ~scoped_lock() BOOST_NOEXCEPT; BOOST_DELETED_FUNCTION(scoped_lock(scoped_lock const&)) BOOST_DELETED_FUNCTION(scoped_lock& operator=(scoped_lock const&)) }; static BOOST_ATOMIC_DECL void thread_fence() BOOST_NOEXCEPT; static BOOST_ATOMIC_DECL void signal_fence() BOOST_NOEXCEPT; }; } // namespace detail } // namespace atomics } // namespace boost #endif // BOOST_ATOMIC_DETAIL_LOCKPOOL_HPP_INCLUDED_ ================================================ FILE: benchmarks/boost/atomic/detail/operations.hpp ================================================ /* * Distributed under the Boost Software License, Version 1.0. * (See accompanying file LICENSE_1_0.txt or copy at * http://www.boost.org/LICENSE_1_0.txt) * * Copyright (c) 2014 Andrey Semashev */ /*! * \file atomic/detail/operations.hpp * * This header defines atomic operations, including the emulated version. */ #ifndef BOOST_ATOMIC_DETAIL_OPERATIONS_HPP_INCLUDED_ #define BOOST_ATOMIC_DETAIL_OPERATIONS_HPP_INCLUDED_ #include #include #ifdef BOOST_HAS_PRAGMA_ONCE #pragma once #endif #endif // BOOST_ATOMIC_DETAIL_OPERATIONS_HPP_INCLUDED_ ================================================ FILE: benchmarks/boost/atomic/detail/operations_fwd.hpp ================================================ /* * Distributed under the Boost Software License, Version 1.0. * (See accompanying file LICENSE_1_0.txt or copy at * http://www.boost.org/LICENSE_1_0.txt) * * Copyright (c) 2014 Andrey Semashev */ /*! * \file atomic/detail/operations_fwd.hpp * * This header contains forward declaration of the \c operations template. */ #ifndef BOOST_ATOMIC_DETAIL_OPERATIONS_FWD_HPP_INCLUDED_ #define BOOST_ATOMIC_DETAIL_OPERATIONS_FWD_HPP_INCLUDED_ #include #include #ifdef BOOST_HAS_PRAGMA_ONCE #pragma once #endif namespace boost { namespace atomics { namespace detail { template< std::size_t Size, bool Signed > struct operations; } // namespace detail } // namespace atomics } // namespace boost #endif // BOOST_ATOMIC_DETAIL_OPERATIONS_FWD_HPP_INCLUDED_ ================================================ FILE: benchmarks/boost/atomic/detail/operations_lockfree.hpp ================================================ /* * Distributed under the Boost Software License, Version 1.0. * (See accompanying file LICENSE_1_0.txt or copy at * http://www.boost.org/LICENSE_1_0.txt) * * Copyright (c) 2014 Andrey Semashev */ /*! * \file atomic/detail/operations_lockfree.hpp * * This header defines lockfree atomic operations. */ #ifndef BOOST_ATOMIC_DETAIL_OPERATIONS_LOCKFREE_HPP_INCLUDED_ #define BOOST_ATOMIC_DETAIL_OPERATIONS_LOCKFREE_HPP_INCLUDED_ #include #include #if !defined(BOOST_ATOMIC_EMULATED) #include BOOST_ATOMIC_DETAIL_HEADER(boost/atomic/detail/ops_) #else #include #endif #ifdef BOOST_HAS_PRAGMA_ONCE #pragma once #endif #endif // BOOST_ATOMIC_DETAIL_OPERATIONS_LOCKFREE_HPP_INCLUDED_ ================================================ FILE: benchmarks/boost/atomic/detail/ops_cas_based.hpp ================================================ /* * Distributed under the Boost Software License, Version 1.0. * (See accompanying file LICENSE_1_0.txt or copy at * http://www.boost.org/LICENSE_1_0.txt) * * Copyright (c) 2014 Andrey Semashev */ /*! * \file atomic/detail/ops_cas_based.hpp * * This header contains CAS-based implementation of the \c operations template. */ #ifndef BOOST_ATOMIC_DETAIL_OPS_CAS_BASED_HPP_INCLUDED_ #define BOOST_ATOMIC_DETAIL_OPS_CAS_BASED_HPP_INCLUDED_ #include #include #include #ifdef BOOST_HAS_PRAGMA_ONCE #pragma once #endif namespace boost { namespace atomics { namespace detail { template< typename Base > struct cas_based_exchange : public Base { typedef typename Base::storage_type storage_type; static BOOST_FORCEINLINE storage_type exchange(storage_type volatile& storage, storage_type v, memory_order order) BOOST_NOEXCEPT { storage_type old_val; atomics::detail::non_atomic_load(storage, old_val); while (!Base::compare_exchange_weak(storage, old_val, v, order, memory_order_relaxed)) {} return old_val; } }; template< typename Base > struct cas_based_operations : public Base { typedef typename Base::storage_type storage_type; static BOOST_FORCEINLINE storage_type fetch_add(storage_type volatile& storage, storage_type v, memory_order order) BOOST_NOEXCEPT { storage_type old_val; atomics::detail::non_atomic_load(storage, old_val); while (!Base::compare_exchange_weak(storage, old_val, old_val + v, order, memory_order_relaxed)) {} return old_val; } static BOOST_FORCEINLINE storage_type fetch_sub(storage_type volatile& storage, storage_type v, memory_order order) BOOST_NOEXCEPT { storage_type old_val; atomics::detail::non_atomic_load(storage, old_val); while (!Base::compare_exchange_weak(storage, old_val, old_val - v, order, memory_order_relaxed)) {} return old_val; } static BOOST_FORCEINLINE storage_type fetch_and(storage_type volatile& storage, storage_type v, memory_order order) BOOST_NOEXCEPT { storage_type old_val; atomics::detail::non_atomic_load(storage, old_val); while (!Base::compare_exchange_weak(storage, old_val, old_val & v, order, memory_order_relaxed)) {} return old_val; } static BOOST_FORCEINLINE storage_type fetch_or(storage_type volatile& storage, storage_type v, memory_order order) BOOST_NOEXCEPT { storage_type old_val; atomics::detail::non_atomic_load(storage, old_val); while (!Base::compare_exchange_weak(storage, old_val, old_val | v, order, memory_order_relaxed)) {} return old_val; } static BOOST_FORCEINLINE storage_type fetch_xor(storage_type volatile& storage, storage_type v, memory_order order) BOOST_NOEXCEPT { storage_type old_val; atomics::detail::non_atomic_load(storage, old_val); while (!Base::compare_exchange_weak(storage, old_val, old_val ^ v, order, memory_order_relaxed)) {} return old_val; } static BOOST_FORCEINLINE bool test_and_set(storage_type volatile& storage, memory_order order) BOOST_NOEXCEPT { return !!Base::exchange(storage, (storage_type)1, order); } static BOOST_FORCEINLINE void clear(storage_type volatile& storage, memory_order order) BOOST_NOEXCEPT { Base::store(storage, (storage_type)0, order); } }; } // namespace detail } // namespace atomics } // namespace boost #endif // BOOST_ATOMIC_DETAIL_OPS_CAS_BASED_HPP_INCLUDED_ ================================================ FILE: benchmarks/boost/atomic/detail/ops_emulated.hpp ================================================ /* * Distributed under the Boost Software License, Version 1.0. * (See accompanying file LICENSE_1_0.txt or copy at * http://www.boost.org/LICENSE_1_0.txt) * * Copyright (c) 2014 Andrey Semashev */ /*! * \file atomic/detail/ops_emulated.hpp * * This header contains lockpool-based implementation of the \c operations template. */ #ifndef BOOST_ATOMIC_DETAIL_OPS_EMULATED_HPP_INCLUDED_ #define BOOST_ATOMIC_DETAIL_OPS_EMULATED_HPP_INCLUDED_ #include #include #include #include #include #include #include #ifdef BOOST_HAS_PRAGMA_ONCE #pragma once #endif namespace boost { namespace atomics { namespace detail { template< typename T > struct emulated_operations { typedef T storage_type; static BOOST_FORCEINLINE void store(storage_type volatile& storage, storage_type v, memory_order) BOOST_NOEXCEPT { lockpool::scoped_lock lock(&storage); const_cast< storage_type& >(storage) = v; } static BOOST_FORCEINLINE storage_type load(storage_type const volatile& storage, memory_order) BOOST_NOEXCEPT { lockpool::scoped_lock lock(&storage); return const_cast< storage_type const& >(storage); } static BOOST_FORCEINLINE storage_type fetch_add(storage_type volatile& storage, storage_type v, memory_order) BOOST_NOEXCEPT { storage_type& s = const_cast< storage_type& >(storage); lockpool::scoped_lock lock(&storage); storage_type old_val = s; s += v; return old_val; } static BOOST_FORCEINLINE storage_type fetch_sub(storage_type volatile& storage, storage_type v, memory_order) BOOST_NOEXCEPT { storage_type& s = const_cast< storage_type& >(storage); lockpool::scoped_lock lock(&storage); storage_type old_val = s; s -= v; return old_val; } static BOOST_FORCEINLINE storage_type exchange(storage_type volatile& storage, storage_type v, memory_order) BOOST_NOEXCEPT { storage_type& s = const_cast< storage_type& >(storage); lockpool::scoped_lock lock(&storage); storage_type old_val = s; s = v; return old_val; } static BOOST_FORCEINLINE bool compare_exchange_strong( storage_type volatile& storage, storage_type& expected, storage_type desired, memory_order, memory_order) BOOST_NOEXCEPT { storage_type& s = const_cast< storage_type& >(storage); lockpool::scoped_lock lock(&storage); storage_type old_val = s; const bool res = old_val == expected; if (res) s = desired; expected = old_val; return res; } static BOOST_FORCEINLINE bool compare_exchange_weak( storage_type volatile& storage, storage_type& expected, storage_type desired, memory_order success_order, memory_order failure_order) BOOST_NOEXCEPT { // Note: This function is the exact copy of compare_exchange_strong. The reason we're not just forwarding the call // is that MSVC-12 ICEs in this case. storage_type& s = const_cast< storage_type& >(storage); lockpool::scoped_lock lock(&storage); storage_type old_val = s; const bool res = old_val == expected; if (res) s = desired; expected = old_val; return res; } static BOOST_FORCEINLINE storage_type fetch_and(storage_type volatile& storage, storage_type v, memory_order) BOOST_NOEXCEPT { storage_type& s = const_cast< storage_type& >(storage); lockpool::scoped_lock lock(&storage); storage_type old_val = s; s &= v; return old_val; } static BOOST_FORCEINLINE storage_type fetch_or(storage_type volatile& storage, storage_type v, memory_order) BOOST_NOEXCEPT { storage_type& s = const_cast< storage_type& >(storage); lockpool::scoped_lock lock(&storage); storage_type old_val = s; s |= v; return old_val; } static BOOST_FORCEINLINE storage_type fetch_xor(storage_type volatile& storage, storage_type v, memory_order) BOOST_NOEXCEPT { storage_type& s = const_cast< storage_type& >(storage); lockpool::scoped_lock lock(&storage); storage_type old_val = s; s ^= v; return old_val; } static BOOST_FORCEINLINE bool test_and_set(storage_type volatile& storage, memory_order order) BOOST_NOEXCEPT { return !!exchange(storage, (storage_type)1, order); } static BOOST_FORCEINLINE void clear(storage_type volatile& storage, memory_order order) BOOST_NOEXCEPT { store(storage, (storage_type)0, order); } static BOOST_FORCEINLINE bool is_lock_free(storage_type const volatile&) BOOST_NOEXCEPT { return false; } }; template< std::size_t Size, bool Signed > struct operations : public emulated_operations< typename make_storage_type< Size, Signed >::type > { typedef typename make_storage_type< Size, Signed >::aligned aligned_storage_type; }; } // namespace detail } // namespace atomics } // namespace boost #endif // BOOST_ATOMIC_DETAIL_OPS_EMULATED_HPP_INCLUDED_ ================================================ FILE: benchmarks/boost/atomic/detail/ops_extending_cas_based.hpp ================================================ /* * Distributed under the Boost Software License, Version 1.0. * (See accompanying file LICENSE_1_0.txt or copy at * http://www.boost.org/LICENSE_1_0.txt) * * Copyright (c) 2014 Andrey Semashev */ /*! * \file atomic/detail/ops_extending_cas_based.hpp * * This header contains a boilerplate of the \c operations template implementation that requires sign/zero extension in arithmetic operations. */ #ifndef BOOST_ATOMIC_DETAIL_OPS_EXTENDING_CAS_BASED_HPP_INCLUDED_ #define BOOST_ATOMIC_DETAIL_OPS_EXTENDING_CAS_BASED_HPP_INCLUDED_ #include #include #include #include #ifdef BOOST_HAS_PRAGMA_ONCE #pragma once #endif namespace boost { namespace atomics { namespace detail { template< typename Base, std::size_t Size, bool Signed > struct extending_cas_based_operations : public Base { typedef typename Base::storage_type storage_type; typedef typename make_storage_type< Size, Signed >::type emulated_storage_type; static BOOST_FORCEINLINE storage_type fetch_add(storage_type volatile& storage, storage_type v, memory_order order) BOOST_NOEXCEPT { storage_type old_val; atomics::detail::non_atomic_load(storage, old_val); emulated_storage_type new_val; do { new_val = static_cast< emulated_storage_type >(old_val) + static_cast< emulated_storage_type >(v); } while (!Base::compare_exchange_weak(storage, old_val, static_cast< storage_type >(new_val), order, memory_order_relaxed)); return old_val; } static BOOST_FORCEINLINE storage_type fetch_sub(storage_type volatile& storage, storage_type v, memory_order order) BOOST_NOEXCEPT { storage_type old_val; atomics::detail::non_atomic_load(storage, old_val); emulated_storage_type new_val; do { new_val = static_cast< emulated_storage_type >(old_val) - static_cast< emulated_storage_type >(v); } while (!Base::compare_exchange_weak(storage, old_val, static_cast< storage_type >(new_val), order, memory_order_relaxed)); return old_val; } }; } // namespace detail } // namespace atomics } // namespace boost #endif // BOOST_ATOMIC_DETAIL_OPS_EXTENDING_CAS_BASED_HPP_INCLUDED_ ================================================ FILE: benchmarks/boost/atomic/detail/ops_gcc_alpha.hpp ================================================ /* * Distributed under the Boost Software License, Version 1.0. * (See accompanying file LICENSE_1_0.txt or copy at * http://www.boost.org/LICENSE_1_0.txt) * * Copyright (c) 2009 Helge Bahmann * Copyright (c) 2013 Tim Blechmann * Copyright (c) 2014 Andrey Semashev */ /*! * \file atomic/detail/ops_gcc_alpha.hpp * * This header contains implementation of the \c operations template. */ #ifndef BOOST_ATOMIC_DETAIL_OPS_GCC_ALPHA_HPP_INCLUDED_ #define BOOST_ATOMIC_DETAIL_OPS_GCC_ALPHA_HPP_INCLUDED_ #include #include #include #include #include #ifdef BOOST_HAS_PRAGMA_ONCE #pragma once #endif namespace boost { namespace atomics { namespace detail { /* Refer to http://h71000.www7.hp.com/doc/82final/5601/5601pro_004.html (HP OpenVMS systems documentation) and the Alpha Architecture Reference Manual. */ /* NB: The most natural thing would be to write the increment/decrement operators along the following lines: __asm__ __volatile__ ( "1: ldl_l %0,%1 \n" "addl %0,1,%0 \n" "stl_c %0,%1 \n" "beq %0,1b\n" : "=&b" (tmp) : "m" (value) : "cc" ); However according to the comments on the HP website and matching comments in the Linux kernel sources this defies branch prediction, as the cpu assumes that backward branches are always taken; so instead copy the trick from the Linux kernel, introduce a forward branch and back again. I have, however, had a hard time measuring the difference between the two versions in microbenchmarks -- I am leaving it in nevertheless as it apparently does not hurt either. */ struct gcc_alpha_operations_base { static BOOST_FORCEINLINE void fence_before(memory_order order) BOOST_NOEXCEPT { if ((order & memory_order_release) != 0) __asm__ __volatile__ ("mb" ::: "memory"); } static BOOST_FORCEINLINE void fence_after(memory_order order) BOOST_NOEXCEPT { if ((order & (memory_order_consume | memory_order_acquire)) != 0) __asm__ __volatile__ ("mb" ::: "memory"); } static BOOST_FORCEINLINE void fence_after_store(memory_order order) BOOST_NOEXCEPT { if (order == memory_order_seq_cst) __asm__ __volatile__ ("mb" ::: "memory"); } }; template< bool Signed > struct operations< 4u, Signed > : public gcc_alpha_operations_base { typedef typename make_storage_type< 4u, Signed >::type storage_type; typedef typename make_storage_type< 4u, Signed >::aligned aligned_storage_type; static BOOST_FORCEINLINE void store(storage_type volatile& storage, storage_type v, memory_order order) BOOST_NOEXCEPT { fence_before(order); storage = v; fence_after_store(order); } static BOOST_FORCEINLINE storage_type load(storage_type const volatile& storage, memory_order order) BOOST_NOEXCEPT { storage_type v = storage; fence_after(order); return v; } static BOOST_FORCEINLINE storage_type exchange(storage_type volatile& storage, storage_type v, memory_order order) BOOST_NOEXCEPT { storage_type original, tmp; fence_before(order); __asm__ __volatile__ ( "1:\n" "mov %3, %1\n" "ldl_l %0, %2\n" "stl_c %1, %2\n" "beq %1, 2f\n" ".subsection 2\n" "2: br 1b\n" ".previous\n" : "=&r" (original), // %0 "=&r" (tmp) // %1 : "m" (storage), // %2 "r" (v) // %3 : BOOST_ATOMIC_DETAIL_ASM_CLOBBER_CC ); fence_after(order); return original; } static BOOST_FORCEINLINE bool compare_exchange_weak( storage_type volatile& storage, storage_type& expected, storage_type desired, memory_order success_order, memory_order failure_order) BOOST_NOEXCEPT { fence_before(success_order); int success; storage_type current; __asm__ __volatile__ ( "1:\n" "ldl_l %2, %4\n" // current = *(&storage) "cmpeq %2, %0, %3\n" // success = current == expected "mov %2, %0\n" // expected = current "beq %3, 2f\n" // if (success == 0) goto end "stl_c %1, %4\n" // storage = desired; desired = store succeeded "mov %1, %3\n" // success = desired "2:\n" : "+&r" (expected), // %0 "+&r" (desired), // %1 "=&r" (current), // %2 "=&r" (success) // %3 : "m" (storage) // %4 : BOOST_ATOMIC_DETAIL_ASM_CLOBBER_CC ); if (success) fence_after(success_order); else fence_after(failure_order); return !!success; } static BOOST_FORCEINLINE bool compare_exchange_strong( storage_type volatile& storage, storage_type& expected, storage_type desired, memory_order success_order, memory_order failure_order) BOOST_NOEXCEPT { int success; storage_type current, tmp; fence_before(success_order); __asm__ __volatile__ ( "1:\n" "mov %5, %1\n" // tmp = desired "ldl_l %2, %4\n" // current = *(&storage) "cmpeq %2, %0, %3\n" // success = current == expected "mov %2, %0\n" // expected = current "beq %3, 2f\n" // if (success == 0) goto end "stl_c %1, %4\n" // storage = tmp; tmp = store succeeded "beq %1, 3f\n" // if (tmp == 0) goto retry "mov %1, %3\n" // success = tmp "2:\n" ".subsection 2\n" "3: br 1b\n" ".previous\n" : "+&r" (expected), // %0 "=&r" (tmp), // %1 "=&r" (current), // %2 "=&r" (success) // %3 : "m" (storage), // %4 "r" (desired) // %5 : BOOST_ATOMIC_DETAIL_ASM_CLOBBER_CC ); if (success) fence_after(success_order); else fence_after(failure_order); return !!success; } static BOOST_FORCEINLINE storage_type fetch_add(storage_type volatile& storage, storage_type v, memory_order order) BOOST_NOEXCEPT { storage_type original, modified; fence_before(order); __asm__ __volatile__ ( "1:\n" "ldl_l %0, %2\n" "addl %0, %3, %1\n" "stl_c %1, %2\n" "beq %1, 2f\n" ".subsection 2\n" "2: br 1b\n" ".previous\n" : "=&r" (original), // %0 "=&r" (modified) // %1 : "m" (storage), // %2 "r" (v) // %3 : BOOST_ATOMIC_DETAIL_ASM_CLOBBER_CC ); fence_after(order); return original; } static BOOST_FORCEINLINE storage_type fetch_sub(storage_type volatile& storage, storage_type v, memory_order order) BOOST_NOEXCEPT { storage_type original, modified; fence_before(order); __asm__ __volatile__ ( "1:\n" "ldl_l %0, %2\n" "subl %0, %3, %1\n" "stl_c %1, %2\n" "beq %1, 2f\n" ".subsection 2\n" "2: br 1b\n" ".previous\n" : "=&r" (original), // %0 "=&r" (modified) // %1 : "m" (storage), // %2 "r" (v) // %3 : BOOST_ATOMIC_DETAIL_ASM_CLOBBER_CC ); fence_after(order); return original; } static BOOST_FORCEINLINE storage_type fetch_and(storage_type volatile& storage, storage_type v, memory_order order) BOOST_NOEXCEPT { storage_type original, modified; fence_before(order); __asm__ __volatile__ ( "1:\n" "ldl_l %0, %2\n" "and %0, %3, %1\n" "stl_c %1, %2\n" "beq %1, 2f\n" ".subsection 2\n" "2: br 1b\n" ".previous\n" : "=&r" (original), // %0 "=&r" (modified) // %1 : "m" (storage), // %2 "r" (v) // %3 : BOOST_ATOMIC_DETAIL_ASM_CLOBBER_CC ); fence_after(order); return original; } static BOOST_FORCEINLINE storage_type fetch_or(storage_type volatile& storage, storage_type v, memory_order order) BOOST_NOEXCEPT { storage_type original, modified; fence_before(order); __asm__ __volatile__ ( "1:\n" "ldl_l %0, %2\n" "bis %0, %3, %1\n" "stl_c %1, %2\n" "beq %1, 2f\n" ".subsection 2\n" "2: br 1b\n" ".previous\n" : "=&r" (original), // %0 "=&r" (modified) // %1 : "m" (storage), // %2 "r" (v) // %3 : BOOST_ATOMIC_DETAIL_ASM_CLOBBER_CC ); fence_after(order); return original; } static BOOST_FORCEINLINE storage_type fetch_xor(storage_type volatile& storage, storage_type v, memory_order order) BOOST_NOEXCEPT { storage_type original, modified; fence_before(order); __asm__ __volatile__ ( "1:\n" "ldl_l %0, %2\n" "xor %0, %3, %1\n" "stl_c %1, %2\n" "beq %1, 2f\n" ".subsection 2\n" "2: br 1b\n" ".previous\n" : "=&r" (original), // %0 "=&r" (modified) // %1 : "m" (storage), // %2 "r" (v) // %3 : BOOST_ATOMIC_DETAIL_ASM_CLOBBER_CC ); fence_after(order); return original; } static BOOST_FORCEINLINE bool test_and_set(storage_type volatile& storage, memory_order order) BOOST_NOEXCEPT { return !!exchange(storage, (storage_type)1, order); } static BOOST_FORCEINLINE void clear(storage_type volatile& storage, memory_order order) BOOST_NOEXCEPT { store(storage, 0, order); } static BOOST_FORCEINLINE bool is_lock_free(storage_type const volatile&) BOOST_NOEXCEPT { return true; } }; template< > struct operations< 1u, false > : public operations< 4u, false > { typedef operations< 4u, false > base_type; typedef base_type::storage_type storage_type; static BOOST_FORCEINLINE storage_type fetch_add(storage_type volatile& storage, storage_type v, memory_order order) BOOST_NOEXCEPT { storage_type original, modified; fence_before(order); __asm__ __volatile__ ( "1:\n" "ldl_l %0, %2\n" "addl %0, %3, %1\n" "zapnot %1, #1, %1\n" "stl_c %1, %2\n" "beq %1, 2f\n" ".subsection 2\n" "2: br 1b\n" ".previous\n" : "=&r" (original), // %0 "=&r" (modified) // %1 : "m" (storage), // %2 "r" (v) // %3 : BOOST_ATOMIC_DETAIL_ASM_CLOBBER_CC ); fence_after(order); return original; } static BOOST_FORCEINLINE storage_type fetch_sub(storage_type volatile& storage, storage_type v, memory_order order) BOOST_NOEXCEPT { storage_type original, modified; fence_before(order); __asm__ __volatile__ ( "1:\n" "ldl_l %0, %2\n" "subl %0, %3, %1\n" "zapnot %1, #1, %1\n" "stl_c %1, %2\n" "beq %1, 2f\n" ".subsection 2\n" "2: br 1b\n" ".previous\n" : "=&r" (original), // %0 "=&r" (modified) // %1 : "m" (storage), // %2 "r" (v) // %3 : BOOST_ATOMIC_DETAIL_ASM_CLOBBER_CC ); fence_after(order); return original; } }; template< > struct operations< 1u, true > : public operations< 4u, true > { typedef operations< 4u, true > base_type; typedef base_type::storage_type storage_type; static BOOST_FORCEINLINE storage_type fetch_add(storage_type volatile& storage, storage_type v, memory_order order) BOOST_NOEXCEPT { storage_type original, modified; fence_before(order); __asm__ __volatile__ ( "1:\n" "ldl_l %0, %2\n" "addl %0, %3, %1\n" "sextb %1, %1\n" "stl_c %1, %2\n" "beq %1, 2f\n" ".subsection 2\n" "2: br 1b\n" ".previous\n" : "=&r" (original), // %0 "=&r" (modified) // %1 : "m" (storage), // %2 "r" (v) // %3 : BOOST_ATOMIC_DETAIL_ASM_CLOBBER_CC ); fence_after(order); return original; } static BOOST_FORCEINLINE storage_type fetch_sub(storage_type volatile& storage, storage_type v, memory_order order) BOOST_NOEXCEPT { storage_type original, modified; fence_before(order); __asm__ __volatile__ ( "1:\n" "ldl_l %0, %2\n" "subl %0, %3, %1\n" "sextb %1, %1\n" "stl_c %1, %2\n" "beq %1, 2f\n" ".subsection 2\n" "2: br 1b\n" ".previous\n" : "=&r" (original), // %0 "=&r" (modified) // %1 : "m" (storage), // %2 "r" (v) // %3 : BOOST_ATOMIC_DETAIL_ASM_CLOBBER_CC ); fence_after(order); return original; } }; template< > struct operations< 2u, false > : public operations< 4u, false > { typedef operations< 4u, false > base_type; typedef base_type::storage_type storage_type; static BOOST_FORCEINLINE storage_type fetch_add(storage_type volatile& storage, storage_type v, memory_order order) BOOST_NOEXCEPT { storage_type original, modified; fence_before(order); __asm__ __volatile__ ( "1:\n" "ldl_l %0, %2\n" "addl %0, %3, %1\n" "zapnot %1, #3, %1\n" "stl_c %1, %2\n" "beq %1, 2f\n" ".subsection 2\n" "2: br 1b\n" ".previous\n" : "=&r" (original), // %0 "=&r" (modified) // %1 : "m" (storage), // %2 "r" (v) // %3 : BOOST_ATOMIC_DETAIL_ASM_CLOBBER_CC ); fence_after(order); return original; } static BOOST_FORCEINLINE storage_type fetch_sub(storage_type volatile& storage, storage_type v, memory_order order) BOOST_NOEXCEPT { storage_type original, modified; fence_before(order); __asm__ __volatile__ ( "1:\n" "ldl_l %0, %2\n" "subl %0, %3, %1\n" "zapnot %1, #3, %1\n" "stl_c %1, %2\n" "beq %1, 2f\n" ".subsection 2\n" "2: br 1b\n" ".previous\n" : "=&r" (original), // %0 "=&r" (modified) // %1 : "m" (storage), // %2 "r" (v) // %3 : BOOST_ATOMIC_DETAIL_ASM_CLOBBER_CC ); fence_after(order); return original; } }; template< > struct operations< 2u, true > : public operations< 4u, true > { typedef operations< 4u, true > base_type; typedef base_type::storage_type storage_type; static BOOST_FORCEINLINE storage_type fetch_add(storage_type volatile& storage, storage_type v, memory_order order) BOOST_NOEXCEPT { storage_type original, modified; fence_before(order); __asm__ __volatile__ ( "1:\n" "ldl_l %0, %2\n" "addl %0, %3, %1\n" "sextw %1, %1\n" "stl_c %1, %2\n" "beq %1, 2f\n" ".subsection 2\n" "2: br 1b\n" ".previous\n" : "=&r" (original), // %0 "=&r" (modified) // %1 : "m" (storage), // %2 "r" (v) // %3 : BOOST_ATOMIC_DETAIL_ASM_CLOBBER_CC ); fence_after(order); return original; } static BOOST_FORCEINLINE storage_type fetch_sub(storage_type volatile& storage, storage_type v, memory_order order) BOOST_NOEXCEPT { storage_type original, modified; fence_before(order); __asm__ __volatile__ ( "1:\n" "ldl_l %0, %2\n" "subl %0, %3, %1\n" "sextw %1, %1\n" "stl_c %1, %2\n" "beq %1, 2f\n" ".subsection 2\n" "2: br 1b\n" ".previous\n" : "=&r" (original), // %0 "=&r" (modified) // %1 : "m" (storage), // %2 "r" (v) // %3 : BOOST_ATOMIC_DETAIL_ASM_CLOBBER_CC ); fence_after(order); return original; } }; template< bool Signed > struct operations< 8u, Signed > : public gcc_alpha_operations_base { typedef typename make_storage_type< 8u, Signed >::type storage_type; typedef typename make_storage_type< 8u, Signed >::aligned aligned_storage_type; static BOOST_FORCEINLINE void store(storage_type volatile& storage, storage_type v, memory_order order) BOOST_NOEXCEPT { fence_before(order); storage = v; fence_after_store(order); } static BOOST_FORCEINLINE storage_type load(storage_type const volatile& storage, memory_order order) BOOST_NOEXCEPT { storage_type v = storage; fence_after(order); return v; } static BOOST_FORCEINLINE storage_type exchange(storage_type volatile& storage, storage_type v, memory_order order) BOOST_NOEXCEPT { storage_type original, tmp; fence_before(order); __asm__ __volatile__ ( "1:\n" "mov %3, %1\n" "ldq_l %0, %2\n" "stq_c %1, %2\n" "beq %1, 2f\n" ".subsection 2\n" "2: br 1b\n" ".previous\n" : "=&r" (original), // %0 "=&r" (tmp) // %1 : "m" (storage), // %2 "r" (v) // %3 : BOOST_ATOMIC_DETAIL_ASM_CLOBBER_CC ); fence_after(order); return original; } static BOOST_FORCEINLINE bool compare_exchange_weak( storage_type volatile& storage, storage_type& expected, storage_type desired, memory_order success_order, memory_order failure_order) BOOST_NOEXCEPT { fence_before(success_order); int success; storage_type current; __asm__ __volatile__ ( "1:\n" "ldq_l %2, %4\n" // current = *(&storage) "cmpeq %2, %0, %3\n" // success = current == expected "mov %2, %0\n" // expected = current "beq %3, 2f\n" // if (success == 0) goto end "stq_c %1, %4\n" // storage = desired; desired = store succeeded "mov %1, %3\n" // success = desired "2:\n" : "+&r" (expected), // %0 "+&r" (desired), // %1 "=&r" (current), // %2 "=&r" (success) // %3 : "m" (storage) // %4 : BOOST_ATOMIC_DETAIL_ASM_CLOBBER_CC ); if (success) fence_after(success_order); else fence_after(failure_order); return !!success; } static BOOST_FORCEINLINE bool compare_exchange_strong( storage_type volatile& storage, storage_type& expected, storage_type desired, memory_order success_order, memory_order failure_order) BOOST_NOEXCEPT { int success; storage_type current, tmp; fence_before(success_order); __asm__ __volatile__ ( "1:\n" "mov %5, %1\n" // tmp = desired "ldq_l %2, %4\n" // current = *(&storage) "cmpeq %2, %0, %3\n" // success = current == expected "mov %2, %0\n" // expected = current "beq %3, 2f\n" // if (success == 0) goto end "stq_c %1, %4\n" // storage = tmp; tmp = store succeeded "beq %1, 3f\n" // if (tmp == 0) goto retry "mov %1, %3\n" // success = tmp "2:\n" ".subsection 2\n" "3: br 1b\n" ".previous\n" : "+&r" (expected), // %0 "=&r" (tmp), // %1 "=&r" (current), // %2 "=&r" (success) // %3 : "m" (storage), // %4 "r" (desired) // %5 : BOOST_ATOMIC_DETAIL_ASM_CLOBBER_CC ); if (success) fence_after(success_order); else fence_after(failure_order); return !!success; } static BOOST_FORCEINLINE storage_type fetch_add(storage_type volatile& storage, storage_type v, memory_order order) BOOST_NOEXCEPT { storage_type original, modified; fence_before(order); __asm__ __volatile__ ( "1:\n" "ldq_l %0, %2\n" "addq %0, %3, %1\n" "stq_c %1, %2\n" "beq %1, 2f\n" ".subsection 2\n" "2: br 1b\n" ".previous\n" : "=&r" (original), // %0 "=&r" (modified) // %1 : "m" (storage), // %2 "r" (v) // %3 : BOOST_ATOMIC_DETAIL_ASM_CLOBBER_CC ); fence_after(order); return original; } static BOOST_FORCEINLINE storage_type fetch_sub(storage_type volatile& storage, storage_type v, memory_order order) BOOST_NOEXCEPT { storage_type original, modified; fence_before(order); __asm__ __volatile__ ( "1:\n" "ldq_l %0, %2\n" "subq %0, %3, %1\n" "stq_c %1, %2\n" "beq %1, 2f\n" ".subsection 2\n" "2: br 1b\n" ".previous\n" : "=&r" (original), // %0 "=&r" (modified) // %1 : "m" (storage), // %2 "r" (v) // %3 : BOOST_ATOMIC_DETAIL_ASM_CLOBBER_CC ); fence_after(order); return original; } static BOOST_FORCEINLINE storage_type fetch_and(storage_type volatile& storage, storage_type v, memory_order order) BOOST_NOEXCEPT { storage_type original, modified; fence_before(order); __asm__ __volatile__ ( "1:\n" "ldq_l %0, %2\n" "and %0, %3, %1\n" "stq_c %1, %2\n" "beq %1, 2f\n" ".subsection 2\n" "2: br 1b\n" ".previous\n" : "=&r" (original), // %0 "=&r" (modified) // %1 : "m" (storage), // %2 "r" (v) // %3 : BOOST_ATOMIC_DETAIL_ASM_CLOBBER_CC ); fence_after(order); return original; } static BOOST_FORCEINLINE storage_type fetch_or(storage_type volatile& storage, storage_type v, memory_order order) BOOST_NOEXCEPT { storage_type original, modified; fence_before(order); __asm__ __volatile__ ( "1:\n" "ldq_l %0, %2\n" "bis %0, %3, %1\n" "stq_c %1, %2\n" "beq %1, 2f\n" ".subsection 2\n" "2: br 1b\n" ".previous\n" : "=&r" (original), // %0 "=&r" (modified) // %1 : "m" (storage), // %2 "r" (v) // %3 : BOOST_ATOMIC_DETAIL_ASM_CLOBBER_CC ); fence_after(order); return original; } static BOOST_FORCEINLINE storage_type fetch_xor(storage_type volatile& storage, storage_type v, memory_order order) BOOST_NOEXCEPT { storage_type original, modified; fence_before(order); __asm__ __volatile__ ( "1:\n" "ldq_l %0, %2\n" "xor %0, %3, %1\n" "stq_c %1, %2\n" "beq %1, 2f\n" ".subsection 2\n" "2: br 1b\n" ".previous\n" : "=&r" (original), // %0 "=&r" (modified) // %1 : "m" (storage), // %2 "r" (v) // %3 : BOOST_ATOMIC_DETAIL_ASM_CLOBBER_CC ); fence_after(order); return original; } static BOOST_FORCEINLINE bool test_and_set(storage_type volatile& storage, memory_order order) BOOST_NOEXCEPT { return !!exchange(storage, (storage_type)1, order); } static BOOST_FORCEINLINE void clear(storage_type volatile& storage, memory_order order) BOOST_NOEXCEPT { store(storage, 0, order); } static BOOST_FORCEINLINE bool is_lock_free(storage_type const volatile&) BOOST_NOEXCEPT { return true; } }; BOOST_FORCEINLINE void thread_fence(memory_order order) BOOST_NOEXCEPT { if (order != memory_order_relaxed) __asm__ __volatile__ ("mb" ::: "memory"); } BOOST_FORCEINLINE void signal_fence(memory_order order) BOOST_NOEXCEPT { if (order != memory_order_relaxed) __asm__ __volatile__ ("" ::: "memory"); } } // namespace detail } // namespace atomics } // namespace boost #endif // BOOST_ATOMIC_DETAIL_OPS_GCC_ALPHA_HPP_INCLUDED_ ================================================ FILE: benchmarks/boost/atomic/detail/ops_gcc_arm.hpp ================================================ /* * Distributed under the Boost Software License, Version 1.0. * (See accompanying file LICENSE_1_0.txt or copy at * http://www.boost.org/LICENSE_1_0.txt) * * Copyright (c) 2009 Helge Bahmann * Copyright (c) 2013 Tim Blechmann * Copyright (c) 2014 Andrey Semashev */ /*! * \file atomic/detail/ops_gcc_arm.hpp * * This header contains implementation of the \c operations template. */ #ifndef BOOST_ATOMIC_DETAIL_OPS_GCC_ARM_HPP_INCLUDED_ #define BOOST_ATOMIC_DETAIL_OPS_GCC_ARM_HPP_INCLUDED_ #include #include #include #include #include #include #include #ifdef BOOST_HAS_PRAGMA_ONCE #pragma once #endif namespace boost { namespace atomics { namespace detail { // From the ARM Architecture Reference Manual for architecture v6: // // LDREX{} , [] // Specifies the destination register for the memory word addressed by // Specifies the register containing the address. // // STREX{} , , [] // Specifies the destination register for the returned status value. // 0 if the operation updates memory // 1 if the operation fails to update memory // Specifies the register containing the word to be stored to memory. // Specifies the register containing the address. // Rd must not be the same register as Rm or Rn. // // ARM v7 is like ARM v6 plus: // There are half-word and byte versions of the LDREX and STREX instructions, // LDREXH, LDREXB, STREXH and STREXB. // There are also double-word versions, LDREXD and STREXD. // (Actually it looks like these are available from version 6k onwards.) // FIXME these are not yet used; should be mostly a matter of copy-and-paste. // I think you can supply an immediate offset to the address. // // A memory barrier is effected using a "co-processor 15" instruction, // though a separate assembler mnemonic is available for it in v7. // // "Thumb 1" is a subset of the ARM instruction set that uses a 16-bit encoding. It // doesn't include all instructions and in particular it doesn't include the co-processor // instruction used for the memory barrier or the load-locked/store-conditional // instructions. So, if we're compiling in "Thumb 1" mode, we need to wrap all of our // asm blocks with code to temporarily change to ARM mode. // // You can only change between ARM and Thumb modes when branching using the bx instruction. // bx takes an address specified in a register. The least significant bit of the address // indicates the mode, so 1 is added to indicate that the destination code is Thumb. // A temporary register is needed for the address and is passed as an argument to these // macros. It must be one of the "low" registers accessible to Thumb code, specified // using the "l" attribute in the asm statement. // // Architecture v7 introduces "Thumb 2", which does include (almost?) all of the ARM // instruction set. (Actually, there was an extension of v6 called v6T2 which supported // "Thumb 2" mode, but its architecture manual is no longer available, referring to v7.) // So in v7 we don't need to change to ARM mode; we can write "universal // assembler" which will assemble to Thumb 2 or ARM code as appropriate. The only thing // we need to do to make this "universal" assembler mode work is to insert "IT" instructions // to annotate the conditional instructions. These are ignored in other modes (e.g. v6), // so they can always be present. // A note about memory_order_consume. Technically, this architecture allows to avoid // unnecessary memory barrier after consume load since it supports data dependency ordering. // However, some compiler optimizations may break a seemingly valid code relying on data // dependency tracking by injecting bogus branches to aid out of order execution. // This may happen not only in Boost.Atomic code but also in user's code, which we have no // control of. See this thread: http://lists.boost.org/Archives/boost/2014/06/213890.php. // For this reason we promote memory_order_consume to memory_order_acquire. #if defined(__thumb__) && !defined(__thumb2__) #define BOOST_ATOMIC_DETAIL_ARM_ASM_START(TMPREG) "adr " #TMPREG ", 8f\n" "bx " #TMPREG "\n" ".arm\n" ".align 4\n" "8:\n" #define BOOST_ATOMIC_DETAIL_ARM_ASM_END(TMPREG) "adr " #TMPREG ", 9f + 1\n" "bx " #TMPREG "\n" ".thumb\n" ".align 2\n" "9:\n" #define BOOST_ATOMIC_DETAIL_ARM_ASM_TMPREG_CONSTRAINT(var) "=&l" (var) #else // The tmpreg may be wasted in this case, which is non-optimal. #define BOOST_ATOMIC_DETAIL_ARM_ASM_START(TMPREG) #define BOOST_ATOMIC_DETAIL_ARM_ASM_END(TMPREG) #define BOOST_ATOMIC_DETAIL_ARM_ASM_TMPREG_CONSTRAINT(var) "=&r" (var) #endif struct gcc_arm_operations_base { static BOOST_FORCEINLINE void fence_before(memory_order order) BOOST_NOEXCEPT { if ((order & memory_order_release) != 0) hardware_full_fence(); } static BOOST_FORCEINLINE void fence_after(memory_order order) BOOST_NOEXCEPT { if ((order & (memory_order_consume | memory_order_acquire)) != 0) hardware_full_fence(); } static BOOST_FORCEINLINE void fence_after_store(memory_order order) BOOST_NOEXCEPT { if (order == memory_order_seq_cst) hardware_full_fence(); } static BOOST_FORCEINLINE void hardware_full_fence() BOOST_NOEXCEPT { #if defined(BOOST_ATOMIC_DETAIL_ARM_HAS_DMB) // Older binutils (supposedly, older than 2.21.1) didn't support symbolic or numeric arguments of the "dmb" instruction such as "ish" or "#11". // As a workaround we have to inject encoded bytes of the instruction. There are two encodings for the instruction: ARM and Thumb. See ARM Architecture Reference Manual, A8.8.43. // Since we cannot detect binutils version at compile time, we'll have to always use this hack. __asm__ __volatile__ ( #if defined(__thumb2__) ".short 0xF3BF, 0x8F5B\n" // dmb ish #else ".word 0xF57FF05B\n" // dmb ish #endif : : : "memory" ); #else int tmp; __asm__ __volatile__ ( BOOST_ATOMIC_DETAIL_ARM_ASM_START(%0) "mcr\tp15, 0, r0, c7, c10, 5\n" BOOST_ATOMIC_DETAIL_ARM_ASM_END(%0) : "=&l" (tmp) : : "memory" ); #endif } }; template< bool Signed > struct operations< 4u, Signed > : public gcc_arm_operations_base { typedef typename make_storage_type< 4u, Signed >::type storage_type; typedef typename make_storage_type< 4u, Signed >::aligned aligned_storage_type; static BOOST_FORCEINLINE void store(storage_type volatile& storage, storage_type v, memory_order order) BOOST_NOEXCEPT { fence_before(order); storage = v; fence_after_store(order); } static BOOST_FORCEINLINE storage_type load(storage_type const volatile& storage, memory_order order) BOOST_NOEXCEPT { storage_type v = storage; fence_after(order); return v; } static BOOST_FORCEINLINE storage_type exchange(storage_type volatile& storage, storage_type v, memory_order order) BOOST_NOEXCEPT { storage_type original; fence_before(order); uint32_t tmp; __asm__ __volatile__ ( BOOST_ATOMIC_DETAIL_ARM_ASM_START(%[tmp]) "1:\n" "ldrex %[original], %[storage]\n" // load the original value "strex %[tmp], %[value], %[storage]\n" // store the replacement, tmp = store failed "teq %[tmp], #0\n" // check if store succeeded "bne 1b\n" BOOST_ATOMIC_DETAIL_ARM_ASM_END(%[tmp]) : [tmp] "=&l" (tmp), [original] "=&r" (original), [storage] "+Q" (storage) : [value] "r" (v) : BOOST_ATOMIC_DETAIL_ASM_CLOBBER_CC ); fence_after(order); return original; } static BOOST_FORCEINLINE bool compare_exchange_weak( storage_type volatile& storage, storage_type& expected, storage_type desired, memory_order success_order, memory_order failure_order) BOOST_NOEXCEPT { fence_before(success_order); uint32_t success; uint32_t tmp; storage_type original; __asm__ __volatile__ ( BOOST_ATOMIC_DETAIL_ARM_ASM_START(%[tmp]) "mov %[success], #0\n" // success = 0 "ldrex %[original], %[storage]\n" // original = *(&storage) "cmp %[original], %[expected]\n" // flags = original==expected "itt eq\n" // [hint that the following 2 instructions are conditional on flags.equal] "strexeq %[success], %[desired], %[storage]\n" // if (flags.equal) *(&storage) = desired, success = store failed "eoreq %[success], %[success], #1\n" // if (flags.equal) success ^= 1 (i.e. make it 1 if store succeeded) BOOST_ATOMIC_DETAIL_ARM_ASM_END(%[tmp]) : [original] "=&r" (original), // %0 [success] "=&r" (success), // %1 [tmp] "=&l" (tmp), // %2 [storage] "+Q" (storage) // %3 : [expected] "r" (expected), // %4 [desired] "r" (desired) // %5 : BOOST_ATOMIC_DETAIL_ASM_CLOBBER_CC ); if (success) fence_after(success_order); else fence_after(failure_order); expected = original; return !!success; } static BOOST_FORCEINLINE bool compare_exchange_strong( storage_type volatile& storage, storage_type& expected, storage_type desired, memory_order success_order, memory_order failure_order) BOOST_NOEXCEPT { fence_before(success_order); uint32_t success; uint32_t tmp; storage_type original; __asm__ __volatile__ ( BOOST_ATOMIC_DETAIL_ARM_ASM_START(%[tmp]) "mov %[success], #0\n" // success = 0 "1:\n" "ldrex %[original], %[storage]\n" // original = *(&storage) "cmp %[original], %[expected]\n" // flags = original==expected "bne 2f\n" // if (!flags.equal) goto end "strex %[success], %[desired], %[storage]\n" // *(&storage) = desired, success = store failed "eors %[success], %[success], #1\n" // success ^= 1 (i.e. make it 1 if store succeeded); flags.equal = success == 0 "beq 1b\n" // if (flags.equal) goto retry "2:\n" BOOST_ATOMIC_DETAIL_ARM_ASM_END(%[tmp]) : [original] "=&r" (original), // %0 [success] "=&r" (success), // %1 [tmp] "=&l" (tmp), // %2 [storage] "+Q" (storage) // %3 : [expected] "r" (expected), // %4 [desired] "r" (desired) // %5 : BOOST_ATOMIC_DETAIL_ASM_CLOBBER_CC ); if (success) fence_after(success_order); else fence_after(failure_order); expected = original; return !!success; } static BOOST_FORCEINLINE storage_type fetch_add(storage_type volatile& storage, storage_type v, memory_order order) BOOST_NOEXCEPT { fence_before(order); uint32_t tmp; storage_type original, result; __asm__ __volatile__ ( BOOST_ATOMIC_DETAIL_ARM_ASM_START(%[tmp]) "1:\n" "ldrex %[original], %[storage]\n" // original = *(&storage) "add %[result], %[original], %[value]\n" // result = original + value "strex %[tmp], %[result], %[storage]\n" // *(&storage) = result, tmp = store failed "teq %[tmp], #0\n" // flags = tmp==0 "bne 1b\n" // if (!flags.equal) goto retry BOOST_ATOMIC_DETAIL_ARM_ASM_END(%[tmp]) : [original] "=&r" (original), // %0 [result] "=&r" (result), // %1 [tmp] "=&l" (tmp), // %2 [storage] "+Q" (storage) // %3 : [value] "r" (v) // %4 : BOOST_ATOMIC_DETAIL_ASM_CLOBBER_CC ); fence_after(order); return original; } static BOOST_FORCEINLINE storage_type fetch_sub(storage_type volatile& storage, storage_type v, memory_order order) BOOST_NOEXCEPT { fence_before(order); uint32_t tmp; storage_type original, result; __asm__ __volatile__ ( BOOST_ATOMIC_DETAIL_ARM_ASM_START(%[tmp]) "1:\n" "ldrex %[original], %[storage]\n" // original = *(&storage) "sub %[result], %[original], %[value]\n" // result = original - value "strex %[tmp], %[result], %[storage]\n" // *(&storage) = result, tmp = store failed "teq %[tmp], #0\n" // flags = tmp==0 "bne 1b\n" // if (!flags.equal) goto retry BOOST_ATOMIC_DETAIL_ARM_ASM_END(%[tmp]) : [original] "=&r" (original), // %0 [result] "=&r" (result), // %1 [tmp] "=&l" (tmp), // %2 [storage] "+Q" (storage) // %3 : [value] "r" (v) // %4 : BOOST_ATOMIC_DETAIL_ASM_CLOBBER_CC ); fence_after(order); return original; } static BOOST_FORCEINLINE storage_type fetch_and(storage_type volatile& storage, storage_type v, memory_order order) BOOST_NOEXCEPT { fence_before(order); uint32_t tmp; storage_type original, result; __asm__ __volatile__ ( BOOST_ATOMIC_DETAIL_ARM_ASM_START(%[tmp]) "1:\n" "ldrex %[original], %[storage]\n" // original = *(&storage) "and %[result], %[original], %[value]\n" // result = original & value "strex %[tmp], %[result], %[storage]\n" // *(&storage) = result, tmp = store failed "teq %[tmp], #0\n" // flags = tmp==0 "bne 1b\n" // if (!flags.equal) goto retry BOOST_ATOMIC_DETAIL_ARM_ASM_END(%[tmp]) : [original] "=&r" (original), // %0 [result] "=&r" (result), // %1 [tmp] "=&l" (tmp), // %2 [storage] "+Q" (storage) // %3 : [value] "r" (v) // %4 : BOOST_ATOMIC_DETAIL_ASM_CLOBBER_CC ); fence_after(order); return original; } static BOOST_FORCEINLINE storage_type fetch_or(storage_type volatile& storage, storage_type v, memory_order order) BOOST_NOEXCEPT { fence_before(order); uint32_t tmp; storage_type original, result; __asm__ __volatile__ ( BOOST_ATOMIC_DETAIL_ARM_ASM_START(%[tmp]) "1:\n" "ldrex %[original], %[storage]\n" // original = *(&storage) "orr %[result], %[original], %[value]\n" // result = original | value "strex %[tmp], %[result], %[storage]\n" // *(&storage) = result, tmp = store failed "teq %[tmp], #0\n" // flags = tmp==0 "bne 1b\n" // if (!flags.equal) goto retry BOOST_ATOMIC_DETAIL_ARM_ASM_END(%[tmp]) : [original] "=&r" (original), // %0 [result] "=&r" (result), // %1 [tmp] "=&l" (tmp), // %2 [storage] "+Q" (storage) // %3 : [value] "r" (v) // %4 : BOOST_ATOMIC_DETAIL_ASM_CLOBBER_CC ); fence_after(order); return original; } static BOOST_FORCEINLINE storage_type fetch_xor(storage_type volatile& storage, storage_type v, memory_order order) BOOST_NOEXCEPT { fence_before(order); uint32_t tmp; storage_type original, result; __asm__ __volatile__ ( BOOST_ATOMIC_DETAIL_ARM_ASM_START(%[tmp]) "1:\n" "ldrex %[original], %[storage]\n" // original = *(&storage) "eor %[result], %[original], %[value]\n" // result = original ^ value "strex %[tmp], %[result], %[storage]\n" // *(&storage) = result, tmp = store failed "teq %[tmp], #0\n" // flags = tmp==0 "bne 1b\n" // if (!flags.equal) goto retry BOOST_ATOMIC_DETAIL_ARM_ASM_END(%[tmp]) : [original] "=&r" (original), // %0 [result] "=&r" (result), // %1 [tmp] "=&l" (tmp), // %2 [storage] "+Q" (storage) // %3 : [value] "r" (v) // %4 : BOOST_ATOMIC_DETAIL_ASM_CLOBBER_CC ); fence_after(order); return original; } static BOOST_FORCEINLINE bool test_and_set(storage_type volatile& storage, memory_order order) BOOST_NOEXCEPT { return !!exchange(storage, (storage_type)1, order); } static BOOST_FORCEINLINE void clear(storage_type volatile& storage, memory_order order) BOOST_NOEXCEPT { store(storage, 0, order); } static BOOST_FORCEINLINE bool is_lock_free(storage_type const volatile&) BOOST_NOEXCEPT { return true; } }; template< > struct operations< 1u, false > : public operations< 4u, false > { typedef operations< 4u, false > base_type; typedef base_type::storage_type storage_type; static BOOST_FORCEINLINE storage_type fetch_add(storage_type volatile& storage, storage_type v, memory_order order) BOOST_NOEXCEPT { fence_before(order); uint32_t tmp; storage_type original, result; __asm__ __volatile__ ( BOOST_ATOMIC_DETAIL_ARM_ASM_START(%[tmp]) "1:\n" "ldrex %[original], %[storage]\n" // original = *(&storage) "add %[result], %[original], %[value]\n" // result = original + value "uxtb %[result], %[result]\n" // zero extend result from 8 to 32 bits "strex %[tmp], %[result], %[storage]\n" // *(&storage) = result, tmp = store failed "teq %[tmp], #0\n" // flags = tmp==0 "bne 1b\n" // if (!flags.equal) goto retry BOOST_ATOMIC_DETAIL_ARM_ASM_END(%[tmp]) : [original] "=&r" (original), // %0 [result] "=&r" (result), // %1 [tmp] "=&l" (tmp), // %2 [storage] "+Q" (storage) // %3 : [value] "r" (v) // %4 : BOOST_ATOMIC_DETAIL_ASM_CLOBBER_CC ); fence_after(order); return original; } static BOOST_FORCEINLINE storage_type fetch_sub(storage_type volatile& storage, storage_type v, memory_order order) BOOST_NOEXCEPT { fence_before(order); uint32_t tmp; storage_type original, result; __asm__ __volatile__ ( BOOST_ATOMIC_DETAIL_ARM_ASM_START(%[tmp]) "1:\n" "ldrex %[original], %[storage]\n" // original = *(&storage) "sub %[result], %[original], %[value]\n" // result = original - value "uxtb %[result], %[result]\n" // zero extend result from 8 to 32 bits "strex %[tmp], %[result], %[storage]\n" // *(&storage) = result, tmp = store failed "teq %[tmp], #0\n" // flags = tmp==0 "bne 1b\n" // if (!flags.equal) goto retry BOOST_ATOMIC_DETAIL_ARM_ASM_END(%[tmp]) : [original] "=&r" (original), // %0 [result] "=&r" (result), // %1 [tmp] "=&l" (tmp), // %2 [storage] "+Q" (storage) // %3 : [value] "r" (v) // %4 : BOOST_ATOMIC_DETAIL_ASM_CLOBBER_CC ); fence_after(order); return original; } }; template< > struct operations< 1u, true > : public operations< 4u, true > { typedef operations< 4u, true > base_type; typedef base_type::storage_type storage_type; static BOOST_FORCEINLINE storage_type fetch_add(storage_type volatile& storage, storage_type v, memory_order order) BOOST_NOEXCEPT { fence_before(order); uint32_t tmp; storage_type original, result; __asm__ __volatile__ ( BOOST_ATOMIC_DETAIL_ARM_ASM_START(%[tmp]) "1:\n" "ldrex %[original], %[storage]\n" // original = *(&storage) "add %[result], %[original], %[value]\n" // result = original + value "sxtb %[result], %[result]\n" // sign extend result from 8 to 32 bits "strex %[tmp], %[result], %[storage]\n" // *(&storage) = result, tmp = store failed "teq %[tmp], #0\n" // flags = tmp==0 "bne 1b\n" // if (!flags.equal) goto retry BOOST_ATOMIC_DETAIL_ARM_ASM_END(%[tmp]) : [original] "=&r" (original), // %0 [result] "=&r" (result), // %1 [tmp] "=&l" (tmp), // %2 [storage] "+Q" (storage) // %3 : [value] "r" (v) // %4 : BOOST_ATOMIC_DETAIL_ASM_CLOBBER_CC ); fence_after(order); return original; } static BOOST_FORCEINLINE storage_type fetch_sub(storage_type volatile& storage, storage_type v, memory_order order) BOOST_NOEXCEPT { fence_before(order); uint32_t tmp; storage_type original, result; __asm__ __volatile__ ( BOOST_ATOMIC_DETAIL_ARM_ASM_START(%[tmp]) "1:\n" "ldrex %[original], %[storage]\n" // original = *(&storage) "sub %[result], %[original], %[value]\n" // result = original - value "sxtb %[result], %[result]\n" // sign extend result from 8 to 32 bits "strex %[tmp], %[result], %[storage]\n" // *(&storage) = result, tmp = store failed "teq %[tmp], #0\n" // flags = tmp==0 "bne 1b\n" // if (!flags.equal) goto retry BOOST_ATOMIC_DETAIL_ARM_ASM_END(%[tmp]) : [original] "=&r" (original), // %0 [result] "=&r" (result), // %1 [tmp] "=&l" (tmp), // %2 [storage] "+Q" (storage) // %3 : [value] "r" (v) // %4 : BOOST_ATOMIC_DETAIL_ASM_CLOBBER_CC ); fence_after(order); return original; } }; template< > struct operations< 2u, false > : public operations< 4u, false > { typedef operations< 4u, false > base_type; typedef base_type::storage_type storage_type; static BOOST_FORCEINLINE storage_type fetch_add(storage_type volatile& storage, storage_type v, memory_order order) BOOST_NOEXCEPT { fence_before(order); uint32_t tmp; storage_type original, result; __asm__ __volatile__ ( BOOST_ATOMIC_DETAIL_ARM_ASM_START(%[tmp]) "1:\n" "ldrex %[original], %[storage]\n" // original = *(&storage) "add %[result], %[original], %[value]\n" // result = original + value "uxth %[result], %[result]\n" // zero extend result from 16 to 32 bits "strex %[tmp], %[result], %[storage]\n" // *(&storage) = result, tmp = store failed "teq %[tmp], #0\n" // flags = tmp==0 "bne 1b\n" // if (!flags.equal) goto retry BOOST_ATOMIC_DETAIL_ARM_ASM_END(%[tmp]) : [original] "=&r" (original), // %0 [result] "=&r" (result), // %1 [tmp] "=&l" (tmp), // %2 [storage] "+Q" (storage) // %3 : [value] "r" (v) // %4 : BOOST_ATOMIC_DETAIL_ASM_CLOBBER_CC ); fence_after(order); return original; } static BOOST_FORCEINLINE storage_type fetch_sub(storage_type volatile& storage, storage_type v, memory_order order) BOOST_NOEXCEPT { fence_before(order); uint32_t tmp; storage_type original, result; __asm__ __volatile__ ( BOOST_ATOMIC_DETAIL_ARM_ASM_START(%[tmp]) "1:\n" "ldrex %[original], %[storage]\n" // original = *(&storage) "sub %[result], %[original], %[value]\n" // result = original - value "uxth %[result], %[result]\n" // zero extend result from 16 to 32 bits "strex %[tmp], %[result], %[storage]\n" // *(&storage) = result, tmp = store failed "teq %[tmp], #0\n" // flags = tmp==0 "bne 1b\n" // if (!flags.equal) goto retry BOOST_ATOMIC_DETAIL_ARM_ASM_END(%[tmp]) : [original] "=&r" (original), // %0 [result] "=&r" (result), // %1 [tmp] "=&l" (tmp), // %2 [storage] "+Q" (storage) // %3 : [value] "r" (v) // %4 : BOOST_ATOMIC_DETAIL_ASM_CLOBBER_CC ); fence_after(order); return original; } }; template< > struct operations< 2u, true > : public operations< 4u, true > { typedef operations< 4u, true > base_type; typedef base_type::storage_type storage_type; static BOOST_FORCEINLINE storage_type fetch_add(storage_type volatile& storage, storage_type v, memory_order order) BOOST_NOEXCEPT { fence_before(order); uint32_t tmp; storage_type original, result; __asm__ __volatile__ ( BOOST_ATOMIC_DETAIL_ARM_ASM_START(%[tmp]) "1:\n" "ldrex %[original], %[storage]\n" // original = *(&storage) "add %[result], %[original], %[value]\n" // result = original + value "sxth %[result], %[result]\n" // sign extend result from 16 to 32 bits "strex %[tmp], %[result], %[storage]\n" // *(&storage) = result, tmp = store failed "teq %[tmp], #0\n" // flags = tmp==0 "bne 1b\n" // if (!flags.equal) goto retry BOOST_ATOMIC_DETAIL_ARM_ASM_END(%[tmp]) : [original] "=&r" (original), // %0 [result] "=&r" (result), // %1 [tmp] "=&l" (tmp), // %2 [storage] "+Q" (storage) // %3 : [value] "r" (v) // %4 : BOOST_ATOMIC_DETAIL_ASM_CLOBBER_CC ); fence_after(order); return original; } static BOOST_FORCEINLINE storage_type fetch_sub(storage_type volatile& storage, storage_type v, memory_order order) BOOST_NOEXCEPT { fence_before(order); uint32_t tmp; storage_type original, result; __asm__ __volatile__ ( BOOST_ATOMIC_DETAIL_ARM_ASM_START(%[tmp]) "1:\n" "ldrex %[original], %[storage]\n" // original = *(&storage) "sub %[result], %[original], %[value]\n" // result = original - value "sxth %[result], %[result]\n" // sign extend result from 16 to 32 bits "strex %[tmp], %[result], %[storage]\n" // *(&storage) = result, tmp = store failed "teq %[tmp], #0\n" // flags = tmp==0 "bne 1b\n" // if (!flags.equal) goto retry BOOST_ATOMIC_DETAIL_ARM_ASM_END(%[tmp]) : [original] "=&r" (original), // %0 [result] "=&r" (result), // %1 [tmp] "=&l" (tmp), // %2 [storage] "+Q" (storage) // %3 : [value] "r" (v) // %4 : BOOST_ATOMIC_DETAIL_ASM_CLOBBER_CC ); fence_after(order); return original; } }; #if defined(BOOST_ATOMIC_DETAIL_ARM_HAS_LDREXD_STREXD) // Unlike 32-bit operations, for 64-bit loads and stores we must use ldrexd/strexd. // Any other instructions result in a non-atomic sequence of 32-bit accesses. // See "ARM Architecture Reference Manual ARMv7-A and ARMv7-R edition", // Section A3.5.3 "Atomicity in the ARM architecture". // In the asm blocks below we have to use 32-bit register pairs to compose 64-bit values. // In order to pass the 64-bit operands to/from asm blocks, we use undocumented gcc feature: // the lower half (Rt) of the operand is accessible normally, via the numbered placeholder (e.g. %0), // and the upper half (Rt2) - via the same placeholder with an 'H' after the '%' sign (e.g. %H0). // See: http://hardwarebug.org/2010/07/06/arm-inline-asm-secrets/ template< bool Signed > struct operations< 8u, Signed > : public gcc_arm_operations_base { typedef typename make_storage_type< 8u, Signed >::type storage_type; typedef typename make_storage_type< 8u, Signed >::aligned aligned_storage_type; static BOOST_FORCEINLINE void store(storage_type volatile& storage, storage_type v, memory_order order) BOOST_NOEXCEPT { exchange(storage, v, order); } static BOOST_FORCEINLINE storage_type load(storage_type const volatile& storage, memory_order order) BOOST_NOEXCEPT { storage_type original; uint32_t tmp; __asm__ __volatile__ ( BOOST_ATOMIC_DETAIL_ARM_ASM_START(%0) "ldrexd %1, %H1, [%2]\n" BOOST_ATOMIC_DETAIL_ARM_ASM_END(%0) : BOOST_ATOMIC_DETAIL_ARM_ASM_TMPREG_CONSTRAINT(tmp), // %0 "=&r" (original) // %1 : "r" (&storage) // %2 ); fence_after(order); return original; } static BOOST_FORCEINLINE storage_type exchange(storage_type volatile& storage, storage_type v, memory_order order) BOOST_NOEXCEPT { storage_type original; fence_before(order); uint32_t tmp; __asm__ __volatile__ ( BOOST_ATOMIC_DETAIL_ARM_ASM_START(%0) "1:\n" "ldrexd %1, %H1, [%3]\n" // load the original value "strexd %0, %2, %H2, [%3]\n" // store the replacement, tmp = store failed "teq %0, #0\n" // check if store succeeded "bne 1b\n" BOOST_ATOMIC_DETAIL_ARM_ASM_END(%0) : BOOST_ATOMIC_DETAIL_ARM_ASM_TMPREG_CONSTRAINT(tmp), // %0 "=&r" (original) // %1 : "r" (v), // %2 "r" (&storage) // %3 : BOOST_ATOMIC_DETAIL_ASM_CLOBBER_CC_COMMA "memory" ); fence_after(order); return original; } static BOOST_FORCEINLINE bool compare_exchange_weak( storage_type volatile& storage, storage_type& expected, storage_type desired, memory_order success_order, memory_order failure_order) BOOST_NOEXCEPT { fence_before(success_order); uint32_t tmp; storage_type original, old_val = expected; __asm__ __volatile__ ( BOOST_ATOMIC_DETAIL_ARM_ASM_START(%0) "ldrexd %1, %H1, [%3]\n" // original = *(&storage) "cmp %1, %2\n" // flags = original.lo==old_val.lo "ittt eq\n" // [hint that the following 3 instructions are conditional on flags.equal] "cmpeq %H1, %H2\n" // if (flags.equal) flags = original.hi==old_val.hi "strexdeq %0, %4, %H4, [%3]\n" // if (flags.equal) *(&storage) = desired, tmp = store failed "teqeq %0, #0\n" // if (flags.equal) flags = tmp==0 "ite eq\n" // [hint that the following 2 instructions are conditional on flags.equal] "moveq %2, #1\n" // if (flags.equal) old_val.lo = 1 "movne %2, #0\n" // if (!flags.equal) old_val.lo = 0 BOOST_ATOMIC_DETAIL_ARM_ASM_END(%0) : BOOST_ATOMIC_DETAIL_ARM_ASM_TMPREG_CONSTRAINT(tmp), // %0 "=&r" (original), // %1 "+r" (old_val) // %2 : "r" (&storage), // %3 "r" (desired) // %4 : BOOST_ATOMIC_DETAIL_ASM_CLOBBER_CC_COMMA "memory" ); const uint32_t success = (uint32_t)old_val; if (success) fence_after(success_order); else fence_after(failure_order); expected = original; return !!success; } static BOOST_FORCEINLINE bool compare_exchange_strong( storage_type volatile& storage, storage_type& expected, storage_type desired, memory_order success_order, memory_order failure_order) BOOST_NOEXCEPT { fence_before(success_order); uint32_t tmp; storage_type original, old_val = expected; __asm__ __volatile__ ( BOOST_ATOMIC_DETAIL_ARM_ASM_START(%0) "1:\n" "ldrexd %1, %H1, [%3]\n" // original = *(&storage) "cmp %1, %2\n" // flags = original.lo==old_val.lo "it eq\n" // [hint that the following instruction is conditional on flags.equal] "cmpeq %H1, %H2\n" // if (flags.equal) flags = original.hi==old_val.hi "bne 2f\n" // if (!flags.equal) goto end "strexd %0, %4, %H4, [%3]\n" // *(&storage) = desired, tmp = store failed "teq %0, #0\n" // flags.equal = tmp == 0 "bne 1b\n" // if (flags.equal) goto retry "2:\n" "ite eq\n" // [hint that the following 2 instructions are conditional on flags.equal] "moveq %2, #1\n" // if (flags.equal) old_val.lo = 1 "movne %2, #0\n" // if (!flags.equal) old_val.lo = 0 BOOST_ATOMIC_DETAIL_ARM_ASM_END(%0) : BOOST_ATOMIC_DETAIL_ARM_ASM_TMPREG_CONSTRAINT(tmp), // %0 "=&r" (original), // %1 "+r" (old_val) // %2 : "r" (&storage), // %3 "r" (desired) // %4 : BOOST_ATOMIC_DETAIL_ASM_CLOBBER_CC_COMMA "memory" ); const uint32_t success = (uint32_t)old_val; if (success) fence_after(success_order); else fence_after(failure_order); expected = original; return !!success; } static BOOST_FORCEINLINE storage_type fetch_add(storage_type volatile& storage, storage_type v, memory_order order) BOOST_NOEXCEPT { fence_before(order); storage_type original, result; uint32_t tmp; __asm__ __volatile__ ( BOOST_ATOMIC_DETAIL_ARM_ASM_START(%0) "1:\n" "ldrexd %1, %H1, [%3]\n" // original = *(&storage) "adds %2, %1, %4\n" // result = original + value "adc %H2, %H1, %H4\n" "strexd %0, %2, %H2, [%3]\n" // *(&storage) = result, tmp = store failed "teq %0, #0\n" // flags = tmp==0 "bne 1b\n" // if (!flags.equal) goto retry BOOST_ATOMIC_DETAIL_ARM_ASM_END(%0) : BOOST_ATOMIC_DETAIL_ARM_ASM_TMPREG_CONSTRAINT(tmp), // %0 "=&r" (original), // %1 "=&r" (result) // %2 : "r" (&storage), // %3 "r" (v) // %4 : BOOST_ATOMIC_DETAIL_ASM_CLOBBER_CC_COMMA "memory" ); fence_after(order); return original; } static BOOST_FORCEINLINE storage_type fetch_sub(storage_type volatile& storage, storage_type v, memory_order order) BOOST_NOEXCEPT { fence_before(order); storage_type original, result; uint32_t tmp; __asm__ __volatile__ ( BOOST_ATOMIC_DETAIL_ARM_ASM_START(%0) "1:\n" "ldrexd %1, %H1, [%3]\n" // original = *(&storage) "subs %2, %1, %4\n" // result = original - value "sbc %H2, %H1, %H4\n" "strexd %0, %2, %H2, [%3]\n" // *(&storage) = result, tmp = store failed "teq %0, #0\n" // flags = tmp==0 "bne 1b\n" // if (!flags.equal) goto retry BOOST_ATOMIC_DETAIL_ARM_ASM_END(%0) : BOOST_ATOMIC_DETAIL_ARM_ASM_TMPREG_CONSTRAINT(tmp), // %0 "=&r" (original), // %1 "=&r" (result) // %2 : "r" (&storage), // %3 "r" (v) // %4 : BOOST_ATOMIC_DETAIL_ASM_CLOBBER_CC_COMMA "memory" ); fence_after(order); return original; } static BOOST_FORCEINLINE storage_type fetch_and(storage_type volatile& storage, storage_type v, memory_order order) BOOST_NOEXCEPT { fence_before(order); storage_type original, result; uint32_t tmp; __asm__ __volatile__ ( BOOST_ATOMIC_DETAIL_ARM_ASM_START(%0) "1:\n" "ldrexd %1, %H1, [%3]\n" // original = *(&storage) "and %2, %1, %4\n" // result = original & value "and %H2, %H1, %H4\n" "strexd %0, %2, %H2, [%3]\n" // *(&storage) = result, tmp = store failed "teq %0, #0\n" // flags = tmp==0 "bne 1b\n" // if (!flags.equal) goto retry BOOST_ATOMIC_DETAIL_ARM_ASM_END(%0) : BOOST_ATOMIC_DETAIL_ARM_ASM_TMPREG_CONSTRAINT(tmp), // %0 "=&r" (original), // %1 "=&r" (result) // %2 : "r" (&storage), // %3 "r" (v) // %4 : BOOST_ATOMIC_DETAIL_ASM_CLOBBER_CC_COMMA "memory" ); fence_after(order); return original; } static BOOST_FORCEINLINE storage_type fetch_or(storage_type volatile& storage, storage_type v, memory_order order) BOOST_NOEXCEPT { fence_before(order); storage_type original, result; uint32_t tmp; __asm__ __volatile__ ( BOOST_ATOMIC_DETAIL_ARM_ASM_START(%0) "1:\n" "ldrexd %1, %H1, [%3]\n" // original = *(&storage) "orr %2, %1, %4\n" // result = original | value "orr %H2, %H1, %H4\n" "strexd %0, %2, %H2, [%3]\n" // *(&storage) = result, tmp = store failed "teq %0, #0\n" // flags = tmp==0 "bne 1b\n" // if (!flags.equal) goto retry BOOST_ATOMIC_DETAIL_ARM_ASM_END(%0) : BOOST_ATOMIC_DETAIL_ARM_ASM_TMPREG_CONSTRAINT(tmp), // %0 "=&r" (original), // %1 "=&r" (result) // %2 : "r" (&storage), // %3 "r" (v) // %4 : BOOST_ATOMIC_DETAIL_ASM_CLOBBER_CC_COMMA "memory" ); fence_after(order); return original; } static BOOST_FORCEINLINE storage_type fetch_xor(storage_type volatile& storage, storage_type v, memory_order order) BOOST_NOEXCEPT { fence_before(order); storage_type original, result; uint32_t tmp; __asm__ __volatile__ ( BOOST_ATOMIC_DETAIL_ARM_ASM_START(%0) "1:\n" "ldrexd %1, %H1, [%3]\n" // original = *(&storage) "eor %2, %1, %4\n" // result = original ^ value "eor %H2, %H1, %H4\n" "strexd %0, %2, %H2, [%3]\n" // *(&storage) = result, tmp = store failed "teq %0, #0\n" // flags = tmp==0 "bne 1b\n" // if (!flags.equal) goto retry BOOST_ATOMIC_DETAIL_ARM_ASM_END(%0) : BOOST_ATOMIC_DETAIL_ARM_ASM_TMPREG_CONSTRAINT(tmp), // %0 "=&r" (original), // %1 "=&r" (result) // %2 : "r" (&storage), // %3 "r" (v) // %4 : BOOST_ATOMIC_DETAIL_ASM_CLOBBER_CC_COMMA "memory" ); fence_after(order); return original; } static BOOST_FORCEINLINE bool test_and_set(storage_type volatile& storage, memory_order order) BOOST_NOEXCEPT { return !!exchange(storage, (storage_type)1, order); } static BOOST_FORCEINLINE void clear(storage_type volatile& storage, memory_order order) BOOST_NOEXCEPT { store(storage, 0, order); } static BOOST_FORCEINLINE bool is_lock_free(storage_type const volatile&) BOOST_NOEXCEPT { return true; } }; #endif // defined(BOOST_ATOMIC_DETAIL_ARM_HAS_LDREXD_STREXD) BOOST_FORCEINLINE void thread_fence(memory_order order) BOOST_NOEXCEPT { if (order != memory_order_relaxed) gcc_arm_operations_base::hardware_full_fence(); } BOOST_FORCEINLINE void signal_fence(memory_order order) BOOST_NOEXCEPT { if (order != memory_order_relaxed) __asm__ __volatile__ ("" ::: "memory"); } } // namespace detail } // namespace atomics } // namespace boost #endif // BOOST_ATOMIC_DETAIL_OPS_GCC_ARM_HPP_INCLUDED_ ================================================ FILE: benchmarks/boost/atomic/detail/ops_gcc_atomic.hpp ================================================ /* * Distributed under the Boost Software License, Version 1.0. * (See accompanying file LICENSE_1_0.txt or copy at * http://www.boost.org/LICENSE_1_0.txt) * * Copyright (c) 2014 Andrey Semashev */ /*! * \file atomic/detail/ops_gcc_atomic.hpp * * This header contains implementation of the \c operations template. */ #ifndef BOOST_ATOMIC_DETAIL_OPS_GCC_ATOMIC_HPP_INCLUDED_ #define BOOST_ATOMIC_DETAIL_OPS_GCC_ATOMIC_HPP_INCLUDED_ #include #include #include #include #include #if defined(__clang__) && (defined(BOOST_ATOMIC_DETAIL_X86_HAS_CMPXCHG8B) || defined(BOOST_ATOMIC_DETAIL_X86_HAS_CMPXCHG16B)) #include #include #endif #if __GCC_ATOMIC_LLONG_LOCK_FREE != BOOST_ATOMIC_LLONG_LOCK_FREE || __GCC_ATOMIC_LONG_LOCK_FREE != BOOST_ATOMIC_LONG_LOCK_FREE ||\ __GCC_ATOMIC_INT_LOCK_FREE != BOOST_ATOMIC_INT_LOCK_FREE || __GCC_ATOMIC_SHORT_LOCK_FREE != BOOST_ATOMIC_SHORT_LOCK_FREE ||\ __GCC_ATOMIC_CHAR_LOCK_FREE != BOOST_ATOMIC_CHAR_LOCK_FREE || __GCC_ATOMIC_BOOL_LOCK_FREE != BOOST_ATOMIC_BOOL_LOCK_FREE ||\ __GCC_ATOMIC_WCHAR_T_LOCK_FREE != BOOST_ATOMIC_WCHAR_T_LOCK_FREE // There are platforms where we need to use larger storage types #include #include #endif #ifdef BOOST_HAS_PRAGMA_ONCE #pragma once #endif #if defined(__INTEL_COMPILER) // This is used to suppress warning #32013 described below for Intel Compiler. // In debug builds the compiler does not inline any functions, so basically // every atomic function call results in this warning. I don't know any other // way to selectively disable just this one warning. #pragma system_header #endif namespace boost { namespace atomics { namespace detail { /*! * The function converts \c boost::memory_order values to the compiler-specific constants. * * NOTE: The intention is that the function is optimized away by the compiler, and the * compiler-specific constants are passed to the intrinsics. I know constexpr doesn't * work in this case because the standard atomics interface require memory ordering * constants to be passed as function arguments, at which point they stop being constexpr. * However it is crucial that the compiler sees constants and not runtime values, * because otherwise it just ignores the ordering value and always uses seq_cst. * This is the case with Intel C++ Compiler 14.0.3 (Composer XE 2013 SP1, update 3) and * gcc 4.8.2. Intel Compiler issues a warning in this case: * * warning #32013: Invalid memory order specified. Defaulting to seq_cst memory order. * * while gcc acts silently. * * To mitigate the problem ALL functions, including the atomic<> members must be * declared with BOOST_FORCEINLINE. In this case the compilers are able to see that * all functions are called with constant orderings and call intrinstcts properly. * * Unfortunately, this still doesn't work in debug mode as the compiler doesn't * inline functions even when marked with BOOST_FORCEINLINE. In this case all atomic * operaions will be executed with seq_cst semantics. */ BOOST_FORCEINLINE BOOST_CONSTEXPR int convert_memory_order_to_gcc(memory_order order) BOOST_NOEXCEPT { return (order == memory_order_relaxed ? __ATOMIC_RELAXED : (order == memory_order_consume ? __ATOMIC_CONSUME : (order == memory_order_acquire ? __ATOMIC_ACQUIRE : (order == memory_order_release ? __ATOMIC_RELEASE : (order == memory_order_acq_rel ? __ATOMIC_ACQ_REL : __ATOMIC_SEQ_CST))))); } template< typename T > struct gcc_atomic_operations { typedef T storage_type; static BOOST_FORCEINLINE void store(storage_type volatile& storage, storage_type v, memory_order order) BOOST_NOEXCEPT { __atomic_store_n(&storage, v, atomics::detail::convert_memory_order_to_gcc(order)); } static BOOST_FORCEINLINE storage_type load(storage_type const volatile& storage, memory_order order) BOOST_NOEXCEPT { return __atomic_load_n(&storage, atomics::detail::convert_memory_order_to_gcc(order)); } static BOOST_FORCEINLINE storage_type fetch_add(storage_type volatile& storage, storage_type v, memory_order order) BOOST_NOEXCEPT { return __atomic_fetch_add(&storage, v, atomics::detail::convert_memory_order_to_gcc(order)); } static BOOST_FORCEINLINE storage_type fetch_sub(storage_type volatile& storage, storage_type v, memory_order order) BOOST_NOEXCEPT { return __atomic_fetch_sub(&storage, v, atomics::detail::convert_memory_order_to_gcc(order)); } static BOOST_FORCEINLINE storage_type exchange(storage_type volatile& storage, storage_type v, memory_order order) BOOST_NOEXCEPT { return __atomic_exchange_n(&storage, v, atomics::detail::convert_memory_order_to_gcc(order)); } static BOOST_FORCEINLINE bool compare_exchange_strong( storage_type volatile& storage, storage_type& expected, storage_type desired, memory_order success_order, memory_order failure_order) BOOST_NOEXCEPT { return __atomic_compare_exchange_n ( &storage, &expected, desired, false, atomics::detail::convert_memory_order_to_gcc(success_order), atomics::detail::convert_memory_order_to_gcc(failure_order) ); } static BOOST_FORCEINLINE bool compare_exchange_weak( storage_type volatile& storage, storage_type& expected, storage_type desired, memory_order success_order, memory_order failure_order) BOOST_NOEXCEPT { return __atomic_compare_exchange_n ( &storage, &expected, desired, true, atomics::detail::convert_memory_order_to_gcc(success_order), atomics::detail::convert_memory_order_to_gcc(failure_order) ); } static BOOST_FORCEINLINE storage_type fetch_and(storage_type volatile& storage, storage_type v, memory_order order) BOOST_NOEXCEPT { return __atomic_fetch_and(&storage, v, atomics::detail::convert_memory_order_to_gcc(order)); } static BOOST_FORCEINLINE storage_type fetch_or(storage_type volatile& storage, storage_type v, memory_order order) BOOST_NOEXCEPT { return __atomic_fetch_or(&storage, v, atomics::detail::convert_memory_order_to_gcc(order)); } static BOOST_FORCEINLINE storage_type fetch_xor(storage_type volatile& storage, storage_type v, memory_order order) BOOST_NOEXCEPT { return __atomic_fetch_xor(&storage, v, atomics::detail::convert_memory_order_to_gcc(order)); } static BOOST_FORCEINLINE bool test_and_set(storage_type volatile& storage, memory_order order) BOOST_NOEXCEPT { return __atomic_test_and_set(&storage, atomics::detail::convert_memory_order_to_gcc(order)); } static BOOST_FORCEINLINE void clear(storage_type volatile& storage, memory_order order) BOOST_NOEXCEPT { __atomic_clear(const_cast< storage_type* >(&storage), atomics::detail::convert_memory_order_to_gcc(order)); } static BOOST_FORCEINLINE bool is_lock_free(storage_type const volatile& storage) BOOST_NOEXCEPT { return __atomic_is_lock_free(sizeof(storage_type), &storage); } }; #if BOOST_ATOMIC_INT128_LOCK_FREE > 0 #if defined(__clang__) && defined(BOOST_ATOMIC_DETAIL_X86_HAS_CMPXCHG16B) // Workaround for clang bug: http://llvm.org/bugs/show_bug.cgi?id=19149 // Clang 3.4 does not implement 128-bit __atomic* intrinsics even though it defines __GCC_HAVE_SYNC_COMPARE_AND_SWAP_16 template< bool Signed > struct operations< 16u, Signed > : public cas_based_operations< gcc_dcas_x86_64< Signed > > { }; #else template< bool Signed > struct operations< 16u, Signed > : public gcc_atomic_operations< typename make_storage_type< 16u, Signed >::type > { typedef typename make_storage_type< 16u, Signed >::aligned aligned_storage_type; }; #endif #endif #if BOOST_ATOMIC_INT64_LOCK_FREE > 0 #if defined(__clang__) && defined(BOOST_ATOMIC_DETAIL_X86_HAS_CMPXCHG8B) // Workaround for clang bug http://llvm.org/bugs/show_bug.cgi?id=19355 template< bool Signed > struct operations< 8u, Signed > : public cas_based_operations< gcc_dcas_x86< Signed > > { }; #elif (BOOST_ATOMIC_DETAIL_SIZEOF_LLONG == 8 && __GCC_ATOMIC_LLONG_LOCK_FREE != BOOST_ATOMIC_LLONG_LOCK_FREE) ||\ (BOOST_ATOMIC_DETAIL_SIZEOF_LONG == 8 && __GCC_ATOMIC_LONG_LOCK_FREE != BOOST_ATOMIC_LONG_LOCK_FREE) ||\ (BOOST_ATOMIC_DETAIL_SIZEOF_INT == 8 && __GCC_ATOMIC_INT_LOCK_FREE != BOOST_ATOMIC_INT_LOCK_FREE) ||\ (BOOST_ATOMIC_DETAIL_SIZEOF_SHORT == 8 && __GCC_ATOMIC_SHORT_LOCK_FREE != BOOST_ATOMIC_SHORT_LOCK_FREE) ||\ (BOOST_ATOMIC_DETAIL_SIZEOF_WCHAR_T == 8 && __GCC_ATOMIC_WCHAR_T_LOCK_FREE != BOOST_ATOMIC_WCHAR_T_LOCK_FREE) #define BOOST_ATOMIC_DETAIL_INT64_EXTENDED template< bool Signed > struct operations< 8u, Signed > : public extending_cas_based_operations< gcc_atomic_operations< typename make_storage_type< 16u, Signed >::type >, 8u, Signed > { typedef typename make_storage_type< 16u, Signed >::aligned aligned_storage_type; }; #else template< bool Signed > struct operations< 8u, Signed > : public gcc_atomic_operations< typename make_storage_type< 8u, Signed >::type > { typedef typename make_storage_type< 8u, Signed >::aligned aligned_storage_type; }; #endif #endif #if BOOST_ATOMIC_INT32_LOCK_FREE > 0 #if (BOOST_ATOMIC_DETAIL_SIZEOF_LLONG == 4 && __GCC_ATOMIC_LLONG_LOCK_FREE != BOOST_ATOMIC_LLONG_LOCK_FREE) ||\ (BOOST_ATOMIC_DETAIL_SIZEOF_LONG == 4 && __GCC_ATOMIC_LONG_LOCK_FREE != BOOST_ATOMIC_LONG_LOCK_FREE) ||\ (BOOST_ATOMIC_DETAIL_SIZEOF_INT == 4 && __GCC_ATOMIC_INT_LOCK_FREE != BOOST_ATOMIC_INT_LOCK_FREE) ||\ (BOOST_ATOMIC_DETAIL_SIZEOF_SHORT == 4 && __GCC_ATOMIC_SHORT_LOCK_FREE != BOOST_ATOMIC_SHORT_LOCK_FREE) ||\ (BOOST_ATOMIC_DETAIL_SIZEOF_WCHAR_T == 4 && __GCC_ATOMIC_WCHAR_T_LOCK_FREE != BOOST_ATOMIC_WCHAR_T_LOCK_FREE) #define BOOST_ATOMIC_DETAIL_INT32_EXTENDED #if !defined(BOOST_ATOMIC_DETAIL_INT64_EXTENDED) template< bool Signed > struct operations< 4u, Signed > : public extending_cas_based_operations< gcc_atomic_operations< typename make_storage_type< 8u, Signed >::type >, 4u, Signed > { typedef typename make_storage_type< 8u, Signed >::aligned aligned_storage_type; }; #else // !defined(BOOST_ATOMIC_DETAIL_INT64_EXTENDED) template< bool Signed > struct operations< 4u, Signed > : public extending_cas_based_operations< gcc_atomic_operations< typename make_storage_type< 16u, Signed >::type >, 4u, Signed > { typedef typename make_storage_type< 16u, Signed >::aligned aligned_storage_type; }; #endif // !defined(BOOST_ATOMIC_DETAIL_INT64_EXTENDED) #else template< bool Signed > struct operations< 4u, Signed > : public gcc_atomic_operations< typename make_storage_type< 4u, Signed >::type > { typedef typename make_storage_type< 4u, Signed >::aligned aligned_storage_type; }; #endif #endif #if BOOST_ATOMIC_INT16_LOCK_FREE > 0 #if (BOOST_ATOMIC_DETAIL_SIZEOF_LLONG == 2 && __GCC_ATOMIC_LLONG_LOCK_FREE != BOOST_ATOMIC_LLONG_LOCK_FREE) ||\ (BOOST_ATOMIC_DETAIL_SIZEOF_LONG == 2 && __GCC_ATOMIC_LONG_LOCK_FREE != BOOST_ATOMIC_LONG_LOCK_FREE) ||\ (BOOST_ATOMIC_DETAIL_SIZEOF_INT == 2 && __GCC_ATOMIC_INT_LOCK_FREE != BOOST_ATOMIC_INT_LOCK_FREE) ||\ (BOOST_ATOMIC_DETAIL_SIZEOF_SHORT == 2 && __GCC_ATOMIC_SHORT_LOCK_FREE != BOOST_ATOMIC_SHORT_LOCK_FREE) ||\ (BOOST_ATOMIC_DETAIL_SIZEOF_WCHAR_T == 2 && __GCC_ATOMIC_WCHAR_T_LOCK_FREE != BOOST_ATOMIC_WCHAR_T_LOCK_FREE) #define BOOST_ATOMIC_DETAIL_INT16_EXTENDED #if !defined(BOOST_ATOMIC_DETAIL_INT32_EXTENDED) template< bool Signed > struct operations< 2u, Signed > : public extending_cas_based_operations< gcc_atomic_operations< typename make_storage_type< 4u, Signed >::type >, 2u, Signed > { typedef typename make_storage_type< 4u, Signed >::aligned aligned_storage_type; }; #elif !defined(BOOST_ATOMIC_DETAIL_INT64_EXTENDED) template< bool Signed > struct operations< 2u, Signed > : public extending_cas_based_operations< gcc_atomic_operations< typename make_storage_type< 8u, Signed >::type >, 2u, Signed > { typedef typename make_storage_type< 8u, Signed >::aligned aligned_storage_type; }; #else template< bool Signed > struct operations< 2u, Signed > : public extending_cas_based_operations< gcc_atomic_operations< typename make_storage_type< 16u, Signed >::type >, 2u, Signed > { typedef typename make_storage_type< 16u, Signed >::aligned aligned_storage_type; }; #endif #else template< bool Signed > struct operations< 2u, Signed > : public gcc_atomic_operations< typename make_storage_type< 2u, Signed >::type > { typedef typename make_storage_type< 2u, Signed >::aligned aligned_storage_type; }; #endif #endif #if BOOST_ATOMIC_INT8_LOCK_FREE > 0 #if (BOOST_ATOMIC_DETAIL_SIZEOF_LLONG == 1 && __GCC_ATOMIC_LLONG_LOCK_FREE != BOOST_ATOMIC_LLONG_LOCK_FREE) ||\ (BOOST_ATOMIC_DETAIL_SIZEOF_LONG == 1 && __GCC_ATOMIC_LONG_LOCK_FREE != BOOST_ATOMIC_LONG_LOCK_FREE) ||\ (BOOST_ATOMIC_DETAIL_SIZEOF_INT == 1 && __GCC_ATOMIC_INT_LOCK_FREE != BOOST_ATOMIC_INT_LOCK_FREE) ||\ (BOOST_ATOMIC_DETAIL_SIZEOF_SHORT == 1 && __GCC_ATOMIC_SHORT_LOCK_FREE != BOOST_ATOMIC_SHORT_LOCK_FREE) ||\ (BOOST_ATOMIC_DETAIL_SIZEOF_WCHAR_T == 1 && __GCC_ATOMIC_WCHAR_T_LOCK_FREE != BOOST_ATOMIC_WCHAR_T_LOCK_FREE) ||\ (__GCC_ATOMIC_CHAR_LOCK_FREE != BOOST_ATOMIC_CHAR_LOCK_FREE) ||\ (__GCC_ATOMIC_BOOL_LOCK_FREE != BOOST_ATOMIC_BOOL_LOCK_FREE) #if !defined(BOOST_ATOMIC_DETAIL_INT16_EXTENDED) template< bool Signed > struct operations< 1u, Signed > : public extending_cas_based_operations< gcc_atomic_operations< typename make_storage_type< 2u, Signed >::type >, 1u, Signed > { typedef typename make_storage_type< 2u, Signed >::aligned aligned_storage_type; }; #elif !defined(BOOST_ATOMIC_DETAIL_INT32_EXTENDED) template< bool Signed > struct operations< 1u, Signed > : public extending_cas_based_operations< gcc_atomic_operations< typename make_storage_type< 4u, Signed >::type >, 1u, Signed > { typedef typename make_storage_type< 4u, Signed >::aligned aligned_storage_type; }; #elif !defined(BOOST_ATOMIC_DETAIL_INT64_EXTENDED) template< bool Signed > struct operations< 1u, Signed > : public extending_cas_based_operations< gcc_atomic_operations< typename make_storage_type< 8u, Signed >::type >, 1u, Signed > { typedef typename make_storage_type< 8u, Signed >::aligned aligned_storage_type; }; #else template< bool Signed > struct operations< 1u, Signed > : public extending_cas_based_operations< gcc_atomic_operations< typename make_storage_type< 16u, Signed >::type >, 1u, Signed > { typedef typename make_storage_type< 16u, Signed >::aligned aligned_storage_type; }; #endif #else template< bool Signed > struct operations< 1u, Signed > : public gcc_atomic_operations< typename make_storage_type< 1u, Signed >::type > { typedef typename make_storage_type< 1u, Signed >::aligned aligned_storage_type; }; #endif #endif #undef BOOST_ATOMIC_DETAIL_INT16_EXTENDED #undef BOOST_ATOMIC_DETAIL_INT32_EXTENDED #undef BOOST_ATOMIC_DETAIL_INT64_EXTENDED BOOST_FORCEINLINE void thread_fence(memory_order order) BOOST_NOEXCEPT { __atomic_thread_fence(atomics::detail::convert_memory_order_to_gcc(order)); } BOOST_FORCEINLINE void signal_fence(memory_order order) BOOST_NOEXCEPT { __atomic_signal_fence(atomics::detail::convert_memory_order_to_gcc(order)); } } // namespace detail } // namespace atomics } // namespace boost #endif // BOOST_ATOMIC_DETAIL_OPS_GCC_ATOMIC_HPP_INCLUDED_ ================================================ FILE: benchmarks/boost/atomic/detail/ops_gcc_ppc.hpp ================================================ /* * Distributed under the Boost Software License, Version 1.0. * (See accompanying file LICENSE_1_0.txt or copy at * http://www.boost.org/LICENSE_1_0.txt) * * Copyright (c) 2009 Helge Bahmann * Copyright (c) 2013 Tim Blechmann * Copyright (c) 2014 Andrey Semashev */ /*! * \file atomic/detail/ops_gcc_ppc.hpp * * This header contains implementation of the \c operations template. */ #ifndef BOOST_ATOMIC_DETAIL_OPS_GCC_PPC_HPP_INCLUDED_ #define BOOST_ATOMIC_DETAIL_OPS_GCC_PPC_HPP_INCLUDED_ #include #include #include #include #include #ifdef BOOST_HAS_PRAGMA_ONCE #pragma once #endif namespace boost { namespace atomics { namespace detail { // The implementation below uses information from this document: // http://www.rdrop.com/users/paulmck/scalability/paper/N2745r.2010.02.19a.html /* Refer to: Motorola: "Programming Environments Manual for 32-Bit Implementations of the PowerPC Architecture", Appendix E: "Synchronization Programming Examples" for an explanation of what is going on here (can be found on the web at various places by the name "MPCFPE32B.pdf", Google is your friend...) Most of the atomic operations map to instructions in a relatively straight-forward fashion, but "load"s may at first glance appear a bit strange as they map to: lwz %rX, addr cmpw %rX, %rX bne- 1f 1: That is, the CPU is forced to perform a branch that "formally" depends on the value retrieved from memory. This scheme has an overhead of about 1-2 clock cycles per load, but it allows to map "acquire" to the "isync" instruction instead of "sync" uniformly and for all type of atomic operations. Since "isync" has a cost of about 15 clock cycles, while "sync" hast a cost of about 50 clock cycles, the small penalty to atomic loads more than compensates for this. Byte- and halfword-sized atomic values are realized by encoding the value to be represented into a word, performing sign/zero extension as appropriate. This means that after add/sub operations the value needs fixing up to accurately preserve the wrap-around semantic of the smaller type. (Nothing special needs to be done for the bit-wise and the "exchange type" operators as the compiler already sees to it that values carried in registers are extended appropriately and everything falls into place naturally). The register constraint "b" instructs gcc to use any register except r0; this is sometimes required because the encoding for r0 is used to signify "constant zero" in a number of instructions, making r0 unusable in this place. For simplicity this constraint is used everywhere since I am to lazy to look this up on a per-instruction basis, and ppc has enough registers for this not to pose a problem. */ // A note about memory_order_consume. Technically, this architecture allows to avoid // unnecessary memory barrier after consume load since it supports data dependency ordering. // However, some compiler optimizations may break a seemingly valid code relying on data // dependency tracking by injecting bogus branches to aid out of order execution. // This may happen not only in Boost.Atomic code but also in user's code, which we have no // control of. See this thread: http://lists.boost.org/Archives/boost/2014/06/213890.php. // For this reason we promote memory_order_consume to memory_order_acquire. struct gcc_ppc_operations_base { static BOOST_FORCEINLINE void fence_before(memory_order order) BOOST_NOEXCEPT { #if defined(__powerpc64__) || defined(__PPC64__) if (order == memory_order_seq_cst) __asm__ __volatile__ ("sync" ::: "memory"); else if ((order & memory_order_release) != 0) __asm__ __volatile__ ("lwsync" ::: "memory"); #else if ((order & memory_order_release) != 0) __asm__ __volatile__ ("sync" ::: "memory"); #endif } static BOOST_FORCEINLINE void fence_after(memory_order order) BOOST_NOEXCEPT { if ((order & (memory_order_consume | memory_order_acquire)) != 0) __asm__ __volatile__ ("isync" ::: "memory"); } }; template< bool Signed > struct operations< 4u, Signed > : public gcc_ppc_operations_base { typedef typename make_storage_type< 4u, Signed >::type storage_type; typedef typename make_storage_type< 4u, Signed >::aligned aligned_storage_type; static BOOST_FORCEINLINE void store(storage_type volatile& storage, storage_type v, memory_order order) BOOST_NOEXCEPT { fence_before(order); __asm__ __volatile__ ( "stw %1, %0\n\t" : "+m" (storage) : "r" (v) ); } static BOOST_FORCEINLINE storage_type load(storage_type const volatile& storage, memory_order order) BOOST_NOEXCEPT { storage_type v; if (order == memory_order_seq_cst) __asm__ __volatile__ ("sync" ::: "memory"); if ((order & (memory_order_consume | memory_order_acquire)) != 0) { __asm__ __volatile__ ( "lwz %0, %1\n\t" "cmpw %0, %0\n\t" "bne- 1f\n\t" "1:\n\t" "isync\n\t" : "=&r" (v) : "m" (storage) : "cr0", "memory" ); } else { __asm__ __volatile__ ( "lwz %0, %1\n\t" : "=&r" (v) : "m" (storage) ); } return v; } static BOOST_FORCEINLINE storage_type exchange(storage_type volatile& storage, storage_type v, memory_order order) BOOST_NOEXCEPT { storage_type original; fence_before(order); __asm__ __volatile__ ( "1:\n\t" "lwarx %0,%y1\n\t" "stwcx. %2,%y1\n\t" "bne- 1b\n\t" : "=&b" (original), "+Z" (storage) : "b" (v) : "cr0" ); fence_after(order); return original; } static BOOST_FORCEINLINE bool compare_exchange_weak( storage_type volatile& storage, storage_type& expected, storage_type desired, memory_order success_order, memory_order failure_order) BOOST_NOEXCEPT { int success; fence_before(success_order); __asm__ __volatile__ ( "li %1, 0\n\t" "lwarx %0,%y2\n\t" "cmpw %0, %3\n\t" "bne- 1f\n\t" "stwcx. %4,%y2\n\t" "bne- 1f\n\t" "li %1, 1\n\t" "1:\n\t" : "=&b" (expected), "=&b" (success), "+Z" (storage) : "b" (expected), "b" (desired) : "cr0" ); if (success) fence_after(success_order); else fence_after(failure_order); return !!success; } static BOOST_FORCEINLINE bool compare_exchange_strong( storage_type volatile& storage, storage_type& expected, storage_type desired, memory_order success_order, memory_order failure_order) BOOST_NOEXCEPT { int success; fence_before(success_order); __asm__ __volatile__ ( "li %1, 0\n\t" "0: lwarx %0,%y2\n\t" "cmpw %0, %3\n\t" "bne- 1f\n\t" "stwcx. %4,%y2\n\t" "bne- 0b\n\t" "li %1, 1\n\t" "1:\n\t" : "=&b" (expected), "=&b" (success), "+Z" (storage) : "b" (expected), "b" (desired) : "cr0" ); if (success) fence_after(success_order); else fence_after(failure_order); return !!success; } static BOOST_FORCEINLINE storage_type fetch_add(storage_type volatile& storage, storage_type v, memory_order order) BOOST_NOEXCEPT { storage_type original, tmp; fence_before(order); __asm__ __volatile__ ( "1:\n\t" "lwarx %0,%y2\n\t" "add %1,%0,%3\n\t" "stwcx. %1,%y2\n\t" "bne- 1b\n\t" : "=&b" (original), "=&b" (tmp), "+Z" (storage) : "b" (v) : BOOST_ATOMIC_DETAIL_ASM_CLOBBER_CC ); fence_after(order); return original; } static BOOST_FORCEINLINE storage_type fetch_sub(storage_type volatile& storage, storage_type v, memory_order order) BOOST_NOEXCEPT { storage_type original, tmp; fence_before(order); __asm__ __volatile__ ( "1:\n\t" "lwarx %0,%y2\n\t" "sub %1,%0,%3\n\t" "stwcx. %1,%y2\n\t" "bne- 1b\n\t" : "=&b" (original), "=&b" (tmp), "+Z" (storage) : "b" (v) : BOOST_ATOMIC_DETAIL_ASM_CLOBBER_CC ); fence_after(order); return original; } static BOOST_FORCEINLINE storage_type fetch_and(storage_type volatile& storage, storage_type v, memory_order order) BOOST_NOEXCEPT { storage_type original, tmp; fence_before(order); __asm__ __volatile__ ( "1:\n\t" "lwarx %0,%y2\n\t" "and %1,%0,%3\n\t" "stwcx. %1,%y2\n\t" "bne- 1b\n\t" : "=&b" (original), "=&b" (tmp), "+Z" (storage) : "b" (v) : BOOST_ATOMIC_DETAIL_ASM_CLOBBER_CC ); fence_after(order); return original; } static BOOST_FORCEINLINE storage_type fetch_or(storage_type volatile& storage, storage_type v, memory_order order) BOOST_NOEXCEPT { storage_type original, tmp; fence_before(order); __asm__ __volatile__ ( "1:\n\t" "lwarx %0,%y2\n\t" "or %1,%0,%3\n\t" "stwcx. %1,%y2\n\t" "bne- 1b\n\t" : "=&b" (original), "=&b" (tmp), "+Z" (storage) : "b" (v) : BOOST_ATOMIC_DETAIL_ASM_CLOBBER_CC ); fence_after(order); return original; } static BOOST_FORCEINLINE storage_type fetch_xor(storage_type volatile& storage, storage_type v, memory_order order) BOOST_NOEXCEPT { storage_type original, tmp; fence_before(order); __asm__ __volatile__ ( "1:\n\t" "lwarx %0,%y2\n\t" "xor %1,%0,%3\n\t" "stwcx. %1,%y2\n\t" "bne- 1b\n\t" : "=&b" (original), "=&b" (tmp), "+Z" (storage) : "b" (v) : BOOST_ATOMIC_DETAIL_ASM_CLOBBER_CC ); fence_after(order); return original; } static BOOST_FORCEINLINE bool test_and_set(storage_type volatile& storage, memory_order order) BOOST_NOEXCEPT { return !!exchange(storage, (storage_type)1, order); } static BOOST_FORCEINLINE void clear(storage_type volatile& storage, memory_order order) BOOST_NOEXCEPT { store(storage, 0, order); } static BOOST_FORCEINLINE bool is_lock_free(storage_type const volatile&) BOOST_NOEXCEPT { return true; } }; template< > struct operations< 1u, false > : public operations< 4u, false > { typedef operations< 4u, false > base_type; typedef base_type::storage_type storage_type; static BOOST_FORCEINLINE storage_type fetch_add(storage_type volatile& storage, storage_type v, memory_order order) BOOST_NOEXCEPT { storage_type original, tmp; fence_before(order); __asm__ __volatile__ ( "1:\n\t" "lwarx %0,%y2\n\t" "add %1,%0,%3\n\t" "rlwinm %1, %1, 0, 0xff\n\t" "stwcx. %1,%y2\n\t" "bne- 1b\n\t" : "=&b" (original), "=&b" (tmp), "+Z" (storage) : "b" (v) : BOOST_ATOMIC_DETAIL_ASM_CLOBBER_CC ); fence_after(order); return original; } static BOOST_FORCEINLINE storage_type fetch_sub(storage_type volatile& storage, storage_type v, memory_order order) BOOST_NOEXCEPT { storage_type original, tmp; fence_before(order); __asm__ __volatile__ ( "1:\n\t" "lwarx %0,%y2\n\t" "sub %1,%0,%3\n\t" "rlwinm %1, %1, 0, 0xff\n\t" "stwcx. %1,%y2\n\t" "bne- 1b\n\t" : "=&b" (original), "=&b" (tmp), "+Z" (storage) : "b" (v) : BOOST_ATOMIC_DETAIL_ASM_CLOBBER_CC ); fence_after(order); return original; } }; template< > struct operations< 1u, true > : public operations< 4u, true > { typedef operations< 4u, true > base_type; typedef base_type::storage_type storage_type; static BOOST_FORCEINLINE storage_type fetch_add(storage_type volatile& storage, storage_type v, memory_order order) BOOST_NOEXCEPT { storage_type original, tmp; fence_before(order); __asm__ __volatile__ ( "1:\n\t" "lwarx %0,%y2\n\t" "add %1,%0,%3\n\t" "extsb %1, %1\n\t" "stwcx. %1,%y2\n\t" "bne- 1b\n\t" : "=&b" (original), "=&b" (tmp), "+Z" (storage) : "b" (v) : BOOST_ATOMIC_DETAIL_ASM_CLOBBER_CC ); fence_after(order); return original; } static BOOST_FORCEINLINE storage_type fetch_sub(storage_type volatile& storage, storage_type v, memory_order order) BOOST_NOEXCEPT { storage_type original, tmp; fence_before(order); __asm__ __volatile__ ( "1:\n\t" "lwarx %0,%y2\n\t" "sub %1,%0,%3\n\t" "extsb %1, %1\n\t" "stwcx. %1,%y2\n\t" "bne- 1b\n\t" : "=&b" (original), "=&b" (tmp), "+Z" (storage) : "b" (v) : BOOST_ATOMIC_DETAIL_ASM_CLOBBER_CC ); fence_after(order); return original; } }; template< > struct operations< 2u, false > : public operations< 4u, false > { typedef operations< 4u, false > base_type; typedef base_type::storage_type storage_type; static BOOST_FORCEINLINE storage_type fetch_add(storage_type volatile& storage, storage_type v, memory_order order) BOOST_NOEXCEPT { storage_type original, tmp; fence_before(order); __asm__ __volatile__ ( "1:\n\t" "lwarx %0,%y2\n\t" "add %1,%0,%3\n\t" "rlwinm %1, %1, 0, 0xffff\n\t" "stwcx. %1,%y2\n\t" "bne- 1b\n\t" : "=&b" (original), "=&b" (tmp), "+Z" (storage) : "b" (v) : BOOST_ATOMIC_DETAIL_ASM_CLOBBER_CC ); fence_after(order); return original; } static BOOST_FORCEINLINE storage_type fetch_sub(storage_type volatile& storage, storage_type v, memory_order order) BOOST_NOEXCEPT { storage_type original, tmp; fence_before(order); __asm__ __volatile__ ( "1:\n\t" "lwarx %0,%y2\n\t" "sub %1,%0,%3\n\t" "rlwinm %1, %1, 0, 0xffff\n\t" "stwcx. %1,%y2\n\t" "bne- 1b\n\t" : "=&b" (original), "=&b" (tmp), "+Z" (storage) : "b" (v) : BOOST_ATOMIC_DETAIL_ASM_CLOBBER_CC ); fence_after(order); return original; } }; template< > struct operations< 2u, true > : public operations< 4u, true > { typedef operations< 4u, true > base_type; typedef base_type::storage_type storage_type; static BOOST_FORCEINLINE storage_type fetch_add(storage_type volatile& storage, storage_type v, memory_order order) BOOST_NOEXCEPT { storage_type original, tmp; fence_before(order); __asm__ __volatile__ ( "1:\n\t" "lwarx %0,%y2\n\t" "add %1,%0,%3\n\t" "extsh %1, %1\n\t" "stwcx. %1,%y2\n\t" "bne- 1b\n\t" : "=&b" (original), "=&b" (tmp), "+Z" (storage) : "b" (v) : BOOST_ATOMIC_DETAIL_ASM_CLOBBER_CC ); fence_after(order); return original; } static BOOST_FORCEINLINE storage_type fetch_sub(storage_type volatile& storage, storage_type v, memory_order order) BOOST_NOEXCEPT { storage_type original, tmp; fence_before(order); __asm__ __volatile__ ( "1:\n\t" "lwarx %0,%y2\n\t" "sub %1,%0,%3\n\t" "extsh %1, %1\n\t" "stwcx. %1,%y2\n\t" "bne- 1b\n\t" : "=&b" (original), "=&b" (tmp), "+Z" (storage) : "b" (v) : BOOST_ATOMIC_DETAIL_ASM_CLOBBER_CC ); fence_after(order); return original; } }; #if defined(__powerpc64__) || defined(__PPC64__) template< bool Signed > struct operations< 8u, Signed > : public gcc_ppc_operations_base { typedef typename make_storage_type< 8u, Signed >::type storage_type; typedef typename make_storage_type< 8u, Signed >::aligned aligned_storage_type; static BOOST_FORCEINLINE void store(storage_type volatile& storage, storage_type v, memory_order order) BOOST_NOEXCEPT { fence_before(order); __asm__ __volatile__ ( "std %1, %0\n\t" : "+m" (storage) : "r" (v) ); } static BOOST_FORCEINLINE storage_type load(storage_type const volatile& storage, memory_order order) BOOST_NOEXCEPT { storage_type v; if (order == memory_order_seq_cst) __asm__ __volatile__ ("sync" ::: "memory"); if ((order & (memory_order_consume | memory_order_acquire)) != 0) { __asm__ __volatile__ ( "ld %0, %1\n\t" "cmpd %0, %0\n\t" "bne- 1f\n\t" "1:\n\t" "isync\n\t" : "=&b" (v) : "m" (storage) : "cr0", "memory" ); } else { __asm__ __volatile__ ( "ld %0, %1\n\t" : "=&b" (v) : "m" (storage) ); } return v; } static BOOST_FORCEINLINE storage_type exchange(storage_type volatile& storage, storage_type v, memory_order order) BOOST_NOEXCEPT { storage_type original; fence_before(order); __asm__ __volatile__ ( "1:\n\t" "ldarx %0,%y1\n\t" "stdcx. %2,%y1\n\t" "bne- 1b\n\t" : "=&b" (original), "+Z" (storage) : "b" (v) : "cr0" ); fence_after(order); return original; } static BOOST_FORCEINLINE bool compare_exchange_weak( storage_type volatile& storage, storage_type& expected, storage_type desired, memory_order success_order, memory_order failure_order) BOOST_NOEXCEPT { int success; fence_before(success_order); __asm__ __volatile__ ( "li %1, 0\n\t" "ldarx %0,%y2\n\t" "cmpd %0, %3\n\t" "bne- 1f\n\t" "stdcx. %4,%y2\n\t" "bne- 1f\n\t" "li %1, 1\n\t" "1:" : "=&b" (expected), "=&b" (success), "+Z" (storage) : "b" (expected), "b" (desired) : "cr0" ); if (success) fence_after(success_order); else fence_after(failure_order); return !!success; } static BOOST_FORCEINLINE bool compare_exchange_strong( storage_type volatile& storage, storage_type& expected, storage_type desired, memory_order success_order, memory_order failure_order) BOOST_NOEXCEPT { int success; fence_before(success_order); __asm__ __volatile__ ( "li %1, 0\n\t" "0: ldarx %0,%y2\n\t" "cmpd %0, %3\n\t" "bne- 1f\n\t" "stdcx. %4,%y2\n\t" "bne- 0b\n\t" "li %1, 1\n\t" "1:\n\t" : "=&b" (expected), "=&b" (success), "+Z" (storage) : "b" (expected), "b" (desired) : "cr0" ); if (success) fence_after(success_order); else fence_after(failure_order); return !!success; } static BOOST_FORCEINLINE storage_type fetch_add(storage_type volatile& storage, storage_type v, memory_order order) BOOST_NOEXCEPT { storage_type original, tmp; fence_before(order); __asm__ __volatile__ ( "1:\n\t" "ldarx %0,%y2\n\t" "add %1,%0,%3\n\t" "stdcx. %1,%y2\n\t" "bne- 1b\n\t" : "=&b" (original), "=&b" (tmp), "+Z" (storage) : "b" (v) : BOOST_ATOMIC_DETAIL_ASM_CLOBBER_CC ); fence_after(order); return original; } static BOOST_FORCEINLINE storage_type fetch_sub(storage_type volatile& storage, storage_type v, memory_order order) BOOST_NOEXCEPT { storage_type original, tmp; fence_before(order); __asm__ __volatile__ ( "1:\n\t" "ldarx %0,%y2\n\t" "sub %1,%0,%3\n\t" "stdcx. %1,%y2\n\t" "bne- 1b\n\t" : "=&b" (original), "=&b" (tmp), "+Z" (storage) : "b" (v) : BOOST_ATOMIC_DETAIL_ASM_CLOBBER_CC ); fence_after(order); return original; } static BOOST_FORCEINLINE storage_type fetch_and(storage_type volatile& storage, storage_type v, memory_order order) BOOST_NOEXCEPT { storage_type original, tmp; fence_before(order); __asm__ __volatile__ ( "1:\n\t" "ldarx %0,%y2\n\t" "and %1,%0,%3\n\t" "stdcx. %1,%y2\n\t" "bne- 1b\n\t" : "=&b" (original), "=&b" (tmp), "+Z" (storage) : "b" (v) : BOOST_ATOMIC_DETAIL_ASM_CLOBBER_CC ); fence_after(order); return original; } static BOOST_FORCEINLINE storage_type fetch_or(storage_type volatile& storage, storage_type v, memory_order order) BOOST_NOEXCEPT { storage_type original, tmp; fence_before(order); __asm__ __volatile__ ( "1:\n\t" "ldarx %0,%y2\n\t" "or %1,%0,%3\n\t" "stdcx. %1,%y2\n\t" "bne- 1b\n\t" : "=&b" (original), "=&b" (tmp), "+Z" (storage) : "b" (v) : BOOST_ATOMIC_DETAIL_ASM_CLOBBER_CC ); fence_after(order); return original; } static BOOST_FORCEINLINE storage_type fetch_xor(storage_type volatile& storage, storage_type v, memory_order order) BOOST_NOEXCEPT { storage_type original, tmp; fence_before(order); __asm__ __volatile__ ( "1:\n\t" "ldarx %0,%y2\n\t" "xor %1,%0,%3\n\t" "stdcx. %1,%y2\n\t" "bne- 1b\n\t" : "=&b" (original), "=&b" (tmp), "+Z" (storage) : "b" (v) : BOOST_ATOMIC_DETAIL_ASM_CLOBBER_CC ); fence_after(order); return original; } static BOOST_FORCEINLINE bool test_and_set(storage_type volatile& storage, memory_order order) BOOST_NOEXCEPT { return !!exchange(storage, (storage_type)1, order); } static BOOST_FORCEINLINE void clear(storage_type volatile& storage, memory_order order) BOOST_NOEXCEPT { store(storage, 0, order); } static BOOST_FORCEINLINE bool is_lock_free(storage_type const volatile&) BOOST_NOEXCEPT { return true; } }; #endif // defined(__powerpc64__) || defined(__PPC64__) BOOST_FORCEINLINE void thread_fence(memory_order order) BOOST_NOEXCEPT { switch (order) { case memory_order_consume: case memory_order_acquire: case memory_order_release: case memory_order_acq_rel: #if defined(__powerpc64__) || defined(__PPC64__) __asm__ __volatile__ ("lwsync" ::: "memory"); break; #endif case memory_order_seq_cst: __asm__ __volatile__ ("sync" ::: "memory"); break; default:; } } BOOST_FORCEINLINE void signal_fence(memory_order order) BOOST_NOEXCEPT { if (order != memory_order_relaxed) #if defined(__ibmxl__) || defined(__IBMCPP__) __fence(); #else __asm__ __volatile__ ("" ::: "memory"); #endif } } // namespace detail } // namespace atomics } // namespace boost #endif // BOOST_ATOMIC_DETAIL_OPS_GCC_PPC_HPP_INCLUDED_ ================================================ FILE: benchmarks/boost/atomic/detail/ops_gcc_sparc.hpp ================================================ /* * Distributed under the Boost Software License, Version 1.0. * (See accompanying file LICENSE_1_0.txt or copy at * http://www.boost.org/LICENSE_1_0.txt) * * Copyright (c) 2010 Helge Bahmann * Copyright (c) 2013 Tim Blechmann * Copyright (c) 2014 Andrey Semashev */ /*! * \file atomic/detail/ops_gcc_sparc.hpp * * This header contains implementation of the \c operations template. */ #ifndef BOOST_ATOMIC_DETAIL_OPS_GCC_SPARC_HPP_INCLUDED_ #define BOOST_ATOMIC_DETAIL_OPS_GCC_SPARC_HPP_INCLUDED_ #include #include #include #include #include #include #include #ifdef BOOST_HAS_PRAGMA_ONCE #pragma once #endif namespace boost { namespace atomics { namespace detail { struct gcc_sparc_cas_base { static BOOST_FORCEINLINE void fence_before(memory_order order) BOOST_NOEXCEPT { if (order == memory_order_seq_cst) __asm__ __volatile__ ("membar #Sync" ::: "memory"); else if ((order & memory_order_release) != 0) __asm__ __volatile__ ("membar #StoreStore | #LoadStore" ::: "memory"); } static BOOST_FORCEINLINE void fence_after(memory_order order) BOOST_NOEXCEPT { if (order == memory_order_seq_cst) __asm__ __volatile__ ("membar #Sync" ::: "memory"); else if ((order & (memory_order_consume | memory_order_acquire)) != 0) __asm__ __volatile__ ("membar #StoreStore | #LoadStore" ::: "memory"); } static BOOST_FORCEINLINE void fence_after_store(memory_order order) BOOST_NOEXCEPT { if (order == memory_order_seq_cst) __asm__ __volatile__ ("membar #Sync" ::: "memory"); } }; template< bool Signed > struct gcc_sparc_cas32 : public gcc_sparc_cas_base { typedef typename make_storage_type< 4u, Signed >::type storage_type; typedef typename make_storage_type< 4u, Signed >::aligned aligned_storage_type; static BOOST_FORCEINLINE void store(storage_type volatile& storage, storage_type v, memory_order order) BOOST_NOEXCEPT { fence_before_store(order); storage = v; fence_after_store(order); } static BOOST_FORCEINLINE storage_type load(storage_type const volatile& storage, memory_order order) BOOST_NOEXCEPT { storage_type v = storage; fence_after(order); return v; } static BOOST_FORCEINLINE bool compare_exchange_strong( storage_type volatile& storage, storage_type& expected, storage_type desired, memory_order success_order, memory_order failure_order) BOOST_NOEXCEPT { fence_before(success_order); storage_type previous = expected; __asm__ __volatile__ ( "cas [%1], %2, %0" : "+r" (desired) : "r" (&storage), "r" (previous) : "memory" ); const bool success = (desired == previous); if (success) fence_after(success_order); else fence_after(failure_order); expected = desired; return success; } static BOOST_FORCEINLINE bool compare_exchange_weak( storage_type volatile& storage, storage_type& expected, storage_type desired, memory_order success_order, memory_order failure_order) BOOST_NOEXCEPT { return compare_exchange_strong(storage, expected, desired, success_order, failure_order); } static BOOST_FORCEINLINE storage_type exchange(storage_type volatile& storage, storage_type v, memory_order order) BOOST_NOEXCEPT { base_type::fence_before(order); __asm__ __volatile__ ( "swap [%1], %0" : "+r" (v) : "r" (&storage) : "memory" ); base_type::fence_after(order); return v; } static BOOST_FORCEINLINE bool is_lock_free(storage_type const volatile&) BOOST_NOEXCEPT { return true; } }; template< bool Signed > struct operations< 4u, Signed > : public cas_based_operations< gcc_sparc_cas32< Signed > > { }; template< bool Signed > struct operations< 1u, Signed > : public extending_cas_based_operations< operations< 4u, Signed >, 1u, Signed > { }; template< bool Signed > struct operations< 2u, Signed > : public extending_cas_based_operations< operations< 4u, Signed >, 2u, Signed > { }; template< bool Signed > struct gcc_sparc_cas64 : public gcc_sparc_cas_base { typedef typename make_storage_type< 8u, Signed >::type storage_type; typedef typename make_storage_type< 8u, Signed >::aligned aligned_storage_type; static BOOST_FORCEINLINE void store(storage_type volatile& storage, storage_type v, memory_order order) BOOST_NOEXCEPT { fence_before_store(order); storage = v; fence_after_store(order); } static BOOST_FORCEINLINE storage_type load(storage_type const volatile& storage, memory_order order) BOOST_NOEXCEPT { storage_type v = storage; fence_after(order); return v; } static BOOST_FORCEINLINE bool compare_exchange_strong( storage_type volatile& storage, storage_type& expected, storage_type desired, memory_order success_order, memory_order failure_order) BOOST_NOEXCEPT { fence_before(success_order); storage_type previous = expected; __asm__ __volatile__ ( "casx [%1], %2, %0" : "+r" (desired) : "r" (&storage), "r" (previous) : "memory" ); const bool success = (desired == previous); if (success) fence_after(success_order); else fence_after(failure_order); expected = desired; return success; } static BOOST_FORCEINLINE bool compare_exchange_weak( storage_type volatile& storage, storage_type& expected, storage_type desired, memory_order success_order, memory_order failure_order) BOOST_NOEXCEPT { return compare_exchange_strong(storage, expected, desired, success_order, failure_order); } static BOOST_FORCEINLINE bool is_lock_free(storage_type const volatile&) BOOST_NOEXCEPT { return true; } }; template< bool Signed > struct operations< 8u, Signed > : public cas_based_operations< cas_based_exchange< gcc_sparc_cas64< Signed > > > { }; BOOST_FORCEINLINE void thread_fence(memory_order order) BOOST_NOEXCEPT { switch (order) { case memory_order_release: __asm__ __volatile__ ("membar #StoreStore | #LoadStore" ::: "memory"); break; case memory_order_consume: case memory_order_acquire: __asm__ __volatile__ ("membar #LoadLoad | #LoadStore" ::: "memory"); break; case memory_order_acq_rel: __asm__ __volatile__ ("membar #LoadLoad | #LoadStore | #StoreStore" ::: "memory"); break; case memory_order_seq_cst: __asm__ __volatile__ ("membar #Sync" ::: "memory"); break; case memory_order_relaxed: default: break; } } BOOST_FORCEINLINE void signal_fence(memory_order order) BOOST_NOEXCEPT { if (order != memory_order_relaxed) __asm__ __volatile__ ("" ::: "memory"); } } // namespace detail } // namespace atomics } // namespace boost #endif // BOOST_ATOMIC_DETAIL_OPS_GCC_SPARC_HPP_INCLUDED_ ================================================ FILE: benchmarks/boost/atomic/detail/ops_gcc_sync.hpp ================================================ /* * Distributed under the Boost Software License, Version 1.0. * (See accompanying file LICENSE_1_0.txt or copy at * http://www.boost.org/LICENSE_1_0.txt) * * Copyright (c) 2011 Helge Bahmann * Copyright (c) 2013 Tim Blechmann * Copyright (c) 2014 Andrey Semashev */ /*! * \file atomic/detail/ops_gcc_sync.hpp * * This header contains implementation of the \c operations template. */ #ifndef BOOST_ATOMIC_DETAIL_OPS_GCC_SYNC_HPP_INCLUDED_ #define BOOST_ATOMIC_DETAIL_OPS_GCC_SYNC_HPP_INCLUDED_ #include #include #include #include #include #include #ifdef BOOST_HAS_PRAGMA_ONCE #pragma once #endif namespace boost { namespace atomics { namespace detail { struct gcc_sync_operations_base { static BOOST_FORCEINLINE void fence_before_store(memory_order order) BOOST_NOEXCEPT { if ((order & memory_order_release) != 0) __sync_synchronize(); } static BOOST_FORCEINLINE void fence_after_store(memory_order order) BOOST_NOEXCEPT { if (order == memory_order_seq_cst) __sync_synchronize(); } static BOOST_FORCEINLINE void fence_after_load(memory_order order) BOOST_NOEXCEPT { if ((order & (memory_order_acquire | memory_order_consume)) != 0) __sync_synchronize(); } }; template< typename T > struct gcc_sync_operations : public gcc_sync_operations_base { typedef T storage_type; static BOOST_FORCEINLINE void store(storage_type volatile& storage, storage_type v, memory_order order) BOOST_NOEXCEPT { fence_before_store(order); storage = v; fence_after_store(order); } static BOOST_FORCEINLINE storage_type load(storage_type const volatile& storage, memory_order order) BOOST_NOEXCEPT { storage_type v = storage; fence_after_load(order); return v; } static BOOST_FORCEINLINE storage_type fetch_add(storage_type volatile& storage, storage_type v, memory_order) BOOST_NOEXCEPT { return __sync_fetch_and_add(&storage, v); } static BOOST_FORCEINLINE storage_type fetch_sub(storage_type volatile& storage, storage_type v, memory_order) BOOST_NOEXCEPT { return __sync_fetch_and_sub(&storage, v); } static BOOST_FORCEINLINE storage_type exchange(storage_type volatile& storage, storage_type v, memory_order order) BOOST_NOEXCEPT { // GCC docs mention that not all architectures may support full exchange semantics for this intrinsic. However, GCC's implementation of // std::atomic<> uses this intrinsic unconditionally. We do so as well. In case if some architectures actually don't support this, we can always // add a check here and fall back to a CAS loop. if ((order & memory_order_release) != 0) __sync_synchronize(); return __sync_lock_test_and_set(&storage, v); } static BOOST_FORCEINLINE bool compare_exchange_strong( storage_type volatile& storage, storage_type& expected, storage_type desired, memory_order, memory_order) BOOST_NOEXCEPT { storage_type expected2 = expected; storage_type old_val = __sync_val_compare_and_swap(&storage, expected2, desired); if (old_val == expected2) { return true; } else { expected = old_val; return false; } } static BOOST_FORCEINLINE bool compare_exchange_weak( storage_type volatile& storage, storage_type& expected, storage_type desired, memory_order success_order, memory_order failure_order) BOOST_NOEXCEPT { return compare_exchange_strong(storage, expected, desired, success_order, failure_order); } static BOOST_FORCEINLINE storage_type fetch_and(storage_type volatile& storage, storage_type v, memory_order) BOOST_NOEXCEPT { return __sync_fetch_and_and(&storage, v); } static BOOST_FORCEINLINE storage_type fetch_or(storage_type volatile& storage, storage_type v, memory_order) BOOST_NOEXCEPT { return __sync_fetch_and_or(&storage, v); } static BOOST_FORCEINLINE storage_type fetch_xor(storage_type volatile& storage, storage_type v, memory_order) BOOST_NOEXCEPT { return __sync_fetch_and_xor(&storage, v); } static BOOST_FORCEINLINE bool test_and_set(storage_type volatile& storage, memory_order order) BOOST_NOEXCEPT { if ((order & memory_order_release) != 0) __sync_synchronize(); return !!__sync_lock_test_and_set(&storage, 1); } static BOOST_FORCEINLINE void clear(storage_type volatile& storage, memory_order order) BOOST_NOEXCEPT { __sync_lock_release(&storage); if (order == memory_order_seq_cst) __sync_synchronize(); } static BOOST_FORCEINLINE bool is_lock_free(storage_type const volatile&) BOOST_NOEXCEPT { return true; } }; #if BOOST_ATOMIC_INT8_LOCK_FREE > 0 template< bool Signed > struct operations< 1u, Signed > : #if defined(__GCC_HAVE_SYNC_COMPARE_AND_SWAP_1) public gcc_sync_operations< typename make_storage_type< 1u, Signed >::type > #elif defined(__GCC_HAVE_SYNC_COMPARE_AND_SWAP_2) public extending_cas_based_operations< gcc_sync_operations< typename make_storage_type< 2u, Signed >::type >, 1u, Signed > #elif defined(__GCC_HAVE_SYNC_COMPARE_AND_SWAP_4) public extending_cas_based_operations< gcc_sync_operations< typename make_storage_type< 4u, Signed >::type >, 1u, Signed > #elif defined(__GCC_HAVE_SYNC_COMPARE_AND_SWAP_8) public extending_cas_based_operations< gcc_sync_operations< typename make_storage_type< 8u, Signed >::type >, 1u, Signed > #else public extending_cas_based_operations< gcc_sync_operations< typename make_storage_type< 16u, Signed >::type >, 1u, Signed > #endif { #if defined(__GCC_HAVE_SYNC_COMPARE_AND_SWAP_1) typedef typename make_storage_type< 1u, Signed >::aligned aligned_storage_type; #elif defined(__GCC_HAVE_SYNC_COMPARE_AND_SWAP_2) typedef typename make_storage_type< 2u, Signed >::aligned aligned_storage_type; #elif defined(__GCC_HAVE_SYNC_COMPARE_AND_SWAP_4) typedef typename make_storage_type< 4u, Signed >::aligned aligned_storage_type; #elif defined(__GCC_HAVE_SYNC_COMPARE_AND_SWAP_8) typedef typename make_storage_type< 8u, Signed >::aligned aligned_storage_type; #else typedef typename make_storage_type< 16u, Signed >::aligned aligned_storage_type; #endif }; #endif #if BOOST_ATOMIC_INT16_LOCK_FREE > 0 template< bool Signed > struct operations< 2u, Signed > : #if defined(__GCC_HAVE_SYNC_COMPARE_AND_SWAP_2) public gcc_sync_operations< typename make_storage_type< 2u, Signed >::type > #elif defined(__GCC_HAVE_SYNC_COMPARE_AND_SWAP_4) public extending_cas_based_operations< gcc_sync_operations< typename make_storage_type< 4u, Signed >::type >, 2u, Signed > #elif defined(__GCC_HAVE_SYNC_COMPARE_AND_SWAP_8) public extending_cas_based_operations< gcc_sync_operations< typename make_storage_type< 8u, Signed >::type >, 2u, Signed > #else public extending_cas_based_operations< gcc_sync_operations< typename make_storage_type< 16u, Signed >::type >, 2u, Signed > #endif { #if defined(__GCC_HAVE_SYNC_COMPARE_AND_SWAP_2) typedef typename make_storage_type< 2u, Signed >::aligned aligned_storage_type; #elif defined(__GCC_HAVE_SYNC_COMPARE_AND_SWAP_4) typedef typename make_storage_type< 4u, Signed >::aligned aligned_storage_type; #elif defined(__GCC_HAVE_SYNC_COMPARE_AND_SWAP_8) typedef typename make_storage_type< 8u, Signed >::aligned aligned_storage_type; #else typedef typename make_storage_type< 16u, Signed >::aligned aligned_storage_type; #endif }; #endif #if BOOST_ATOMIC_INT32_LOCK_FREE > 0 template< bool Signed > struct operations< 4u, Signed > : #if defined(__GCC_HAVE_SYNC_COMPARE_AND_SWAP_4) public gcc_sync_operations< typename make_storage_type< 4u, Signed >::type > #elif defined(__GCC_HAVE_SYNC_COMPARE_AND_SWAP_8) public extending_cas_based_operations< gcc_sync_operations< typename make_storage_type< 8u, Signed >::type >, 4u, Signed > #else public extending_cas_based_operations< gcc_sync_operations< typename make_storage_type< 16u, Signed >::type >, 4u, Signed > #endif { #if defined(__GCC_HAVE_SYNC_COMPARE_AND_SWAP_4) typedef typename make_storage_type< 4u, Signed >::aligned aligned_storage_type; #elif defined(__GCC_HAVE_SYNC_COMPARE_AND_SWAP_8) typedef typename make_storage_type< 8u, Signed >::aligned aligned_storage_type; #else typedef typename make_storage_type< 16u, Signed >::aligned aligned_storage_type; #endif }; #endif #if BOOST_ATOMIC_INT64_LOCK_FREE > 0 template< bool Signed > struct operations< 8u, Signed > : #if defined(__GCC_HAVE_SYNC_COMPARE_AND_SWAP_8) public gcc_sync_operations< typename make_storage_type< 8u, Signed >::type > #else public extending_cas_based_operations< gcc_sync_operations< typename make_storage_type< 16u, Signed >::type >, 8u, Signed > #endif { #if defined(__GCC_HAVE_SYNC_COMPARE_AND_SWAP_8) typedef typename make_storage_type< 8u, Signed >::aligned aligned_storage_type; #else typedef typename make_storage_type< 16u, Signed >::aligned aligned_storage_type; #endif }; #endif #if BOOST_ATOMIC_INT128_LOCK_FREE > 0 template< bool Signed > struct operations< 16u, Signed > : public gcc_sync_operations< typename make_storage_type< 16u, Signed >::type > { typedef typename make_storage_type< 16u, Signed >::aligned aligned_storage_type; }; #endif BOOST_FORCEINLINE void thread_fence(memory_order order) BOOST_NOEXCEPT { if (order != memory_order_relaxed) __sync_synchronize(); } BOOST_FORCEINLINE void signal_fence(memory_order order) BOOST_NOEXCEPT { if (order != memory_order_relaxed) __asm__ __volatile__ ("" ::: "memory"); } } // namespace detail } // namespace atomics } // namespace boost #endif // BOOST_ATOMIC_DETAIL_OPS_GCC_SYNC_HPP_INCLUDED_ ================================================ FILE: benchmarks/boost/atomic/detail/ops_gcc_x86.hpp ================================================ /* * Distributed under the Boost Software License, Version 1.0. * (See accompanying file LICENSE_1_0.txt or copy at * http://www.boost.org/LICENSE_1_0.txt) * * Copyright (c) 2009 Helge Bahmann * Copyright (c) 2012 Tim Blechmann * Copyright (c) 2014 Andrey Semashev */ /*! * \file atomic/detail/ops_gcc_x86.hpp * * This header contains implementation of the \c operations template. */ #ifndef BOOST_ATOMIC_DETAIL_OPS_GCC_X86_HPP_INCLUDED_ #define BOOST_ATOMIC_DETAIL_OPS_GCC_X86_HPP_INCLUDED_ #include #include #include #include #include #if defined(BOOST_ATOMIC_DETAIL_X86_HAS_CMPXCHG8B) || defined(BOOST_ATOMIC_DETAIL_X86_HAS_CMPXCHG16B) #include #include #endif #ifdef BOOST_HAS_PRAGMA_ONCE #pragma once #endif #if defined(__x86_64__) #define BOOST_ATOMIC_DETAIL_TEMP_CAS_REGISTER "rdx" #else #define BOOST_ATOMIC_DETAIL_TEMP_CAS_REGISTER "edx" #endif namespace boost { namespace atomics { namespace detail { struct gcc_x86_operations_base { static BOOST_FORCEINLINE void fence_before(memory_order order) BOOST_NOEXCEPT { if ((order & memory_order_release) != 0) __asm__ __volatile__ ("" ::: "memory"); } static BOOST_FORCEINLINE void fence_after(memory_order order) BOOST_NOEXCEPT { if ((order & memory_order_acquire) != 0) __asm__ __volatile__ ("" ::: "memory"); } }; template< typename T, typename Derived > struct gcc_x86_operations : public gcc_x86_operations_base { typedef T storage_type; static BOOST_FORCEINLINE void store(storage_type volatile& storage, storage_type v, memory_order order) BOOST_NOEXCEPT { if (order != memory_order_seq_cst) { fence_before(order); storage = v; fence_after(order); } else { Derived::exchange(storage, v, order); } } static BOOST_FORCEINLINE storage_type load(storage_type const volatile& storage, memory_order order) BOOST_NOEXCEPT { storage_type v = storage; fence_after(order); return v; } static BOOST_FORCEINLINE storage_type fetch_sub(storage_type volatile& storage, storage_type v, memory_order order) BOOST_NOEXCEPT { return Derived::fetch_add(storage, -v, order); } static BOOST_FORCEINLINE bool compare_exchange_weak( storage_type volatile& storage, storage_type& expected, storage_type desired, memory_order success_order, memory_order failure_order) BOOST_NOEXCEPT { return Derived::compare_exchange_strong(storage, expected, desired, success_order, failure_order); } static BOOST_FORCEINLINE bool test_and_set(storage_type volatile& storage, memory_order order) BOOST_NOEXCEPT { return !!Derived::exchange(storage, (storage_type)1, order); } static BOOST_FORCEINLINE void clear(storage_type volatile& storage, memory_order order) BOOST_NOEXCEPT { store(storage, (storage_type)0, order); } static BOOST_FORCEINLINE bool is_lock_free(storage_type const volatile&) BOOST_NOEXCEPT { return true; } }; template< bool Signed > struct operations< 1u, Signed > : public gcc_x86_operations< typename make_storage_type< 1u, Signed >::type, operations< 1u, Signed > > { typedef gcc_x86_operations< typename make_storage_type< 1u, Signed >::type, operations< 1u, Signed > > base_type; typedef typename base_type::storage_type storage_type; typedef typename make_storage_type< 1u, Signed >::aligned aligned_storage_type; static BOOST_FORCEINLINE storage_type fetch_add(storage_type volatile& storage, storage_type v, memory_order) BOOST_NOEXCEPT { __asm__ __volatile__ ( "lock; xaddb %0, %1" : "+q" (v), "+m" (storage) : : BOOST_ATOMIC_DETAIL_ASM_CLOBBER_CC_COMMA "memory" ); return v; } static BOOST_FORCEINLINE storage_type exchange(storage_type volatile& storage, storage_type v, memory_order) BOOST_NOEXCEPT { __asm__ __volatile__ ( "xchgb %0, %1" : "+q" (v), "+m" (storage) : : "memory" ); return v; } static BOOST_FORCEINLINE bool compare_exchange_strong( storage_type volatile& storage, storage_type& expected, storage_type desired, memory_order, memory_order) BOOST_NOEXCEPT { storage_type previous = expected; bool success; __asm__ __volatile__ ( "lock; cmpxchgb %3, %1\n\t" "sete %2" : "+a" (previous), "+m" (storage), "=q" (success) : "q" (desired) : BOOST_ATOMIC_DETAIL_ASM_CLOBBER_CC_COMMA "memory" ); expected = previous; return success; } #define BOOST_ATOMIC_DETAIL_CAS_LOOP(op, argument, result)\ __asm__ __volatile__\ (\ "xor %%" BOOST_ATOMIC_DETAIL_TEMP_CAS_REGISTER ", %%" BOOST_ATOMIC_DETAIL_TEMP_CAS_REGISTER "\n\t"\ ".align 16\n\t"\ "1: movb %[arg], %%dl\n\t"\ op " %%al, %%dl\n\t"\ "lock; cmpxchgb %%dl, %[storage]\n\t"\ "jne 1b"\ : [res] "+a" (result), [storage] "+m" (storage)\ : [arg] "q" (argument)\ : BOOST_ATOMIC_DETAIL_ASM_CLOBBER_CC_COMMA BOOST_ATOMIC_DETAIL_TEMP_CAS_REGISTER, "memory"\ ) static BOOST_FORCEINLINE storage_type fetch_and(storage_type volatile& storage, storage_type v, memory_order) BOOST_NOEXCEPT { storage_type res = storage; BOOST_ATOMIC_DETAIL_CAS_LOOP("andb", v, res); return res; } static BOOST_FORCEINLINE storage_type fetch_or(storage_type volatile& storage, storage_type v, memory_order) BOOST_NOEXCEPT { storage_type res = storage; BOOST_ATOMIC_DETAIL_CAS_LOOP("orb", v, res); return res; } static BOOST_FORCEINLINE storage_type fetch_xor(storage_type volatile& storage, storage_type v, memory_order) BOOST_NOEXCEPT { storage_type res = storage; BOOST_ATOMIC_DETAIL_CAS_LOOP("xorb", v, res); return res; } #undef BOOST_ATOMIC_DETAIL_CAS_LOOP }; template< bool Signed > struct operations< 2u, Signed > : public gcc_x86_operations< typename make_storage_type< 2u, Signed >::type, operations< 2u, Signed > > { typedef gcc_x86_operations< typename make_storage_type< 2u, Signed >::type, operations< 2u, Signed > > base_type; typedef typename base_type::storage_type storage_type; typedef typename make_storage_type< 2u, Signed >::aligned aligned_storage_type; static BOOST_FORCEINLINE storage_type fetch_add(storage_type volatile& storage, storage_type v, memory_order) BOOST_NOEXCEPT { __asm__ __volatile__ ( "lock; xaddw %0, %1" : "+q" (v), "+m" (storage) : : BOOST_ATOMIC_DETAIL_ASM_CLOBBER_CC_COMMA "memory" ); return v; } static BOOST_FORCEINLINE storage_type exchange(storage_type volatile& storage, storage_type v, memory_order) BOOST_NOEXCEPT { __asm__ __volatile__ ( "xchgw %0, %1" : "+q" (v), "+m" (storage) : : "memory" ); return v; } static BOOST_FORCEINLINE bool compare_exchange_strong( storage_type volatile& storage, storage_type& expected, storage_type desired, memory_order, memory_order) BOOST_NOEXCEPT { storage_type previous = expected; bool success; __asm__ __volatile__ ( "lock; cmpxchgw %3, %1\n\t" "sete %2" : "+a" (previous), "+m" (storage), "=q" (success) : "q" (desired) : BOOST_ATOMIC_DETAIL_ASM_CLOBBER_CC_COMMA "memory" ); expected = previous; return success; } #define BOOST_ATOMIC_DETAIL_CAS_LOOP(op, argument, result)\ __asm__ __volatile__\ (\ "xor %%" BOOST_ATOMIC_DETAIL_TEMP_CAS_REGISTER ", %%" BOOST_ATOMIC_DETAIL_TEMP_CAS_REGISTER "\n\t"\ ".align 16\n\t"\ "1: movw %[arg], %%dx\n\t"\ op " %%ax, %%dx\n\t"\ "lock; cmpxchgw %%dx, %[storage]\n\t"\ "jne 1b"\ : [res] "+a" (result), [storage] "+m" (storage)\ : [arg] "q" (argument)\ : BOOST_ATOMIC_DETAIL_ASM_CLOBBER_CC_COMMA BOOST_ATOMIC_DETAIL_TEMP_CAS_REGISTER, "memory"\ ) static BOOST_FORCEINLINE storage_type fetch_and(storage_type volatile& storage, storage_type v, memory_order) BOOST_NOEXCEPT { storage_type res = storage; BOOST_ATOMIC_DETAIL_CAS_LOOP("andw", v, res); return res; } static BOOST_FORCEINLINE storage_type fetch_or(storage_type volatile& storage, storage_type v, memory_order) BOOST_NOEXCEPT { storage_type res = storage; BOOST_ATOMIC_DETAIL_CAS_LOOP("orw", v, res); return res; } static BOOST_FORCEINLINE storage_type fetch_xor(storage_type volatile& storage, storage_type v, memory_order) BOOST_NOEXCEPT { storage_type res = storage; BOOST_ATOMIC_DETAIL_CAS_LOOP("xorw", v, res); return res; } #undef BOOST_ATOMIC_DETAIL_CAS_LOOP }; template< bool Signed > struct operations< 4u, Signed > : public gcc_x86_operations< typename make_storage_type< 4u, Signed >::type, operations< 4u, Signed > > { typedef gcc_x86_operations< typename make_storage_type< 4u, Signed >::type, operations< 4u, Signed > > base_type; typedef typename base_type::storage_type storage_type; typedef typename make_storage_type< 4u, Signed >::aligned aligned_storage_type; static BOOST_FORCEINLINE storage_type fetch_add(storage_type volatile& storage, storage_type v, memory_order) BOOST_NOEXCEPT { __asm__ __volatile__ ( "lock; xaddl %0, %1" : "+r" (v), "+m" (storage) : : BOOST_ATOMIC_DETAIL_ASM_CLOBBER_CC_COMMA "memory" ); return v; } static BOOST_FORCEINLINE storage_type exchange(storage_type volatile& storage, storage_type v, memory_order) BOOST_NOEXCEPT { __asm__ __volatile__ ( "xchgl %0, %1" : "+r" (v), "+m" (storage) : : "memory" ); return v; } static BOOST_FORCEINLINE bool compare_exchange_strong( storage_type volatile& storage, storage_type& expected, storage_type desired, memory_order, memory_order) BOOST_NOEXCEPT { storage_type previous = expected; bool success; __asm__ __volatile__ ( "lock; cmpxchgl %3, %1\n\t" "sete %2" : "+a" (previous), "+m" (storage), "=q" (success) : "r" (desired) : BOOST_ATOMIC_DETAIL_ASM_CLOBBER_CC_COMMA "memory" ); expected = previous; return success; } #define BOOST_ATOMIC_DETAIL_CAS_LOOP(op, argument, result)\ __asm__ __volatile__\ (\ "xor %%" BOOST_ATOMIC_DETAIL_TEMP_CAS_REGISTER ", %%" BOOST_ATOMIC_DETAIL_TEMP_CAS_REGISTER "\n\t"\ ".align 16\n\t"\ "1: movl %[arg], %%edx\n\t"\ op " %%eax, %%edx\n\t"\ "lock; cmpxchgl %%edx, %[storage]\n\t"\ "jne 1b"\ : [res] "+a" (result), [storage] "+m" (storage)\ : [arg] "r" (argument)\ : BOOST_ATOMIC_DETAIL_ASM_CLOBBER_CC_COMMA BOOST_ATOMIC_DETAIL_TEMP_CAS_REGISTER, "memory"\ ) static BOOST_FORCEINLINE storage_type fetch_and(storage_type volatile& storage, storage_type v, memory_order) BOOST_NOEXCEPT { storage_type res = storage; BOOST_ATOMIC_DETAIL_CAS_LOOP("andl", v, res); return res; } static BOOST_FORCEINLINE storage_type fetch_or(storage_type volatile& storage, storage_type v, memory_order) BOOST_NOEXCEPT { storage_type res = storage; BOOST_ATOMIC_DETAIL_CAS_LOOP("orl", v, res); return res; } static BOOST_FORCEINLINE storage_type fetch_xor(storage_type volatile& storage, storage_type v, memory_order) BOOST_NOEXCEPT { storage_type res = storage; BOOST_ATOMIC_DETAIL_CAS_LOOP("xorl", v, res); return res; } #undef BOOST_ATOMIC_DETAIL_CAS_LOOP }; #if defined(BOOST_ATOMIC_DETAIL_X86_HAS_CMPXCHG8B) template< bool Signed > struct operations< 8u, Signed > : public cas_based_operations< gcc_dcas_x86< Signed > > { }; #elif defined(__x86_64__) template< bool Signed > struct operations< 8u, Signed > : public gcc_x86_operations< typename make_storage_type< 8u, Signed >::type, operations< 8u, Signed > > { typedef gcc_x86_operations< typename make_storage_type< 8u, Signed >::type, operations< 8u, Signed > > base_type; typedef typename base_type::storage_type storage_type; typedef typename make_storage_type< 8u, Signed >::aligned aligned_storage_type; static BOOST_FORCEINLINE storage_type fetch_add(storage_type volatile& storage, storage_type v, memory_order) BOOST_NOEXCEPT { __asm__ __volatile__ ( "lock; xaddq %0, %1" : "+r" (v), "+m" (storage) : : BOOST_ATOMIC_DETAIL_ASM_CLOBBER_CC_COMMA "memory" ); return v; } static BOOST_FORCEINLINE storage_type exchange(storage_type volatile& storage, storage_type v, memory_order) BOOST_NOEXCEPT { __asm__ __volatile__ ( "xchgq %0, %1" : "+r" (v), "+m" (storage) : : "memory" ); return v; } static BOOST_FORCEINLINE bool compare_exchange_strong( storage_type volatile& storage, storage_type& expected, storage_type desired, memory_order, memory_order) BOOST_NOEXCEPT { storage_type previous = expected; bool success; __asm__ __volatile__ ( "lock; cmpxchgq %3, %1\n\t" "sete %2" : "+a" (previous), "+m" (storage), "=q" (success) : "r" (desired) : BOOST_ATOMIC_DETAIL_ASM_CLOBBER_CC_COMMA "memory" ); expected = previous; return success; } #define BOOST_ATOMIC_DETAIL_CAS_LOOP(op, argument, result)\ __asm__ __volatile__\ (\ "xor %%" BOOST_ATOMIC_DETAIL_TEMP_CAS_REGISTER ", %%" BOOST_ATOMIC_DETAIL_TEMP_CAS_REGISTER "\n\t"\ ".align 16\n\t"\ "1: movq %[arg], %%rdx\n\t"\ op " %%rax, %%rdx\n\t"\ "lock; cmpxchgq %%rdx, %[storage]\n\t"\ "jne 1b"\ : [res] "+a" (result), [storage] "+m" (storage)\ : [arg] "r" (argument)\ : BOOST_ATOMIC_DETAIL_ASM_CLOBBER_CC_COMMA BOOST_ATOMIC_DETAIL_TEMP_CAS_REGISTER, "memory"\ ) static BOOST_FORCEINLINE storage_type fetch_and(storage_type volatile& storage, storage_type v, memory_order) BOOST_NOEXCEPT { storage_type res = storage; BOOST_ATOMIC_DETAIL_CAS_LOOP("andq", v, res); return res; } static BOOST_FORCEINLINE storage_type fetch_or(storage_type volatile& storage, storage_type v, memory_order) BOOST_NOEXCEPT { storage_type res = storage; BOOST_ATOMIC_DETAIL_CAS_LOOP("orq", v, res); return res; } static BOOST_FORCEINLINE storage_type fetch_xor(storage_type volatile& storage, storage_type v, memory_order) BOOST_NOEXCEPT { storage_type res = storage; BOOST_ATOMIC_DETAIL_CAS_LOOP("xorq", v, res); return res; } #undef BOOST_ATOMIC_DETAIL_CAS_LOOP }; #endif #if defined(BOOST_ATOMIC_DETAIL_X86_HAS_CMPXCHG16B) template< bool Signed > struct operations< 16u, Signed > : public cas_based_operations< gcc_dcas_x86_64< Signed > > { }; #endif // defined(BOOST_ATOMIC_DETAIL_X86_HAS_CMPXCHG16B) BOOST_FORCEINLINE void thread_fence(memory_order order) BOOST_NOEXCEPT { if (order == memory_order_seq_cst) { __asm__ __volatile__ ( #if defined(__x86_64__) || defined(__SSE2__) "mfence\n" #else "lock; addl $0, (%%esp)\n" #endif ::: "memory" ); } else if ((order & (memory_order_acquire | memory_order_release)) != 0) { __asm__ __volatile__ ("" ::: "memory"); } } BOOST_FORCEINLINE void signal_fence(memory_order order) BOOST_NOEXCEPT { if (order != memory_order_relaxed) __asm__ __volatile__ ("" ::: "memory"); } } // namespace detail } // namespace atomics } // namespace boost #undef BOOST_ATOMIC_DETAIL_TEMP_CAS_REGISTER #endif // BOOST_ATOMIC_DETAIL_OPS_GCC_X86_HPP_INCLUDED_ ================================================ FILE: benchmarks/boost/atomic/detail/ops_gcc_x86_dcas.hpp ================================================ /* * Distributed under the Boost Software License, Version 1.0. * (See accompanying file LICENSE_1_0.txt or copy at * http://www.boost.org/LICENSE_1_0.txt) * * Copyright (c) 2009 Helge Bahmann * Copyright (c) 2012 Tim Blechmann * Copyright (c) 2014 Andrey Semashev */ /*! * \file atomic/detail/ops_gcc_x86_dcas.hpp * * This header contains implementation of the double-width CAS primitive for x86. */ #ifndef BOOST_ATOMIC_DETAIL_OPS_GCC_X86_DCAS_HPP_INCLUDED_ #define BOOST_ATOMIC_DETAIL_OPS_GCC_X86_DCAS_HPP_INCLUDED_ #include #include #include #include #include #ifdef BOOST_HAS_PRAGMA_ONCE #pragma once #endif namespace boost { namespace atomics { namespace detail { #if defined(BOOST_ATOMIC_DETAIL_X86_HAS_CMPXCHG8B) template< bool Signed > struct gcc_dcas_x86 { typedef typename make_storage_type< 8u, Signed >::type storage_type; typedef typename make_storage_type< 8u, Signed >::aligned aligned_storage_type; static BOOST_FORCEINLINE void store(storage_type volatile& storage, storage_type v, memory_order) BOOST_NOEXCEPT { if ((((uint32_t)&storage) & 0x00000007) == 0) { #if defined(__SSE2__) __asm__ __volatile__ ( #if defined(__AVX__) "vmovq %1, %%xmm4\n\t" "vmovq %%xmm4, %0\n\t" #else "movq %1, %%xmm4\n\t" "movq %%xmm4, %0\n\t" #endif : "=m" (storage) : "m" (v) : "memory", "xmm4" ); #else __asm__ __volatile__ ( "fildll %1\n\t" "fistpll %0\n\t" : "=m" (storage) : "m" (v) : "memory" ); #endif } else { #if !defined(BOOST_ATOMIC_DETAIL_NO_ASM_IMPLIED_ZERO_DISPLACEMENTS) #if defined(__PIC__) uint32_t scratch; __asm__ __volatile__ ( "movl %%ebx, %[scratch]\n\t" "movl %[value_lo], %%ebx\n\t" "movl %[dest], %%eax\n\t" "movl 4+%[dest], %%edx\n\t" ".align 16\n\t" "1: lock; cmpxchg8b %[dest]\n\t" "jne 1b\n\t" "movl %[scratch], %%ebx\n\t" : [scratch] "=m" (scratch), [dest] "=o" (storage) : [value_lo] "a" ((uint32_t)v), "c" ((uint32_t)(v >> 32)) : BOOST_ATOMIC_DETAIL_ASM_CLOBBER_CC_COMMA "edx", "memory" ); #else // defined(__PIC__) __asm__ __volatile__ ( "movl %[dest], %%eax\n\t" "movl 4+%[dest], %%edx\n\t" ".align 16\n\t" "1: lock; cmpxchg8b %[dest]\n\t" "jne 1b\n\t" : [dest] "=o" (storage) : [value_lo] "b" ((uint32_t)v), "c" ((uint32_t)(v >> 32)) : BOOST_ATOMIC_DETAIL_ASM_CLOBBER_CC_COMMA "eax", "edx", "memory" ); #endif // defined(__PIC__) #else // !defined(BOOST_ATOMIC_DETAIL_NO_ASM_IMPLIED_ZERO_DISPLACEMENTS) #if defined(__PIC__) uint32_t scratch; __asm__ __volatile__ ( "movl %%ebx, %[scratch]\n\t" "movl %[value_lo], %%ebx\n\t" "movl 0(%[dest]), %%eax\n\t" "movl 4(%[dest]), %%edx\n\t" ".align 16\n\t" "1: lock; cmpxchg8b 0(%[dest])\n\t" "jne 1b\n\t" "movl %[scratch], %%ebx\n\t" #if !defined(BOOST_ATOMIC_DETAIL_NO_ASM_CONSTRAINT_ALTERNATIVES) : [scratch] "=m,m" (scratch) : [value_lo] "a,a" ((uint32_t)v), "c,c" ((uint32_t)(v >> 32)), [dest] "D,S" (&storage) #else : [scratch] "=m" (scratch) : [value_lo] "a" ((uint32_t)v), "c" ((uint32_t)(v >> 32)), [dest] "D" (&storage) #endif : BOOST_ATOMIC_DETAIL_ASM_CLOBBER_CC_COMMA "edx", "memory" ); #else // defined(__PIC__) __asm__ __volatile__ ( "movl 0(%[dest]), %%eax\n\t" "movl 4(%[dest]), %%edx\n\t" ".align 16\n\t" "1: lock; cmpxchg8b 0(%[dest])\n\t" "jne 1b\n\t" : #if !defined(BOOST_ATOMIC_DETAIL_NO_ASM_CONSTRAINT_ALTERNATIVES) : [value_lo] "b,b" ((uint32_t)v), "c,c" ((uint32_t)(v >> 32)), [dest] "D,S" (&storage) #else : [value_lo] "b" ((uint32_t)v), "c" ((uint32_t)(v >> 32)), [dest] "D" (&storage) #endif : BOOST_ATOMIC_DETAIL_ASM_CLOBBER_CC_COMMA "eax", "edx", "memory" ); #endif // defined(__PIC__) #endif // !defined(BOOST_ATOMIC_DETAIL_NO_ASM_IMPLIED_ZERO_DISPLACEMENTS) } } static BOOST_FORCEINLINE storage_type load(storage_type const volatile& storage, memory_order) BOOST_NOEXCEPT { storage_type value; if ((((uint32_t)&storage) & 0x00000007) == 0) { #if defined(__SSE2__) __asm__ __volatile__ ( #if defined(__AVX__) "vmovq %1, %%xmm4\n\t" "vmovq %%xmm4, %0\n\t" #else "movq %1, %%xmm4\n\t" "movq %%xmm4, %0\n\t" #endif : "=m" (value) : "m" (storage) : "memory", "xmm4" ); #else __asm__ __volatile__ ( "fildll %1\n\t" "fistpll %0\n\t" : "=m" (value) : "m" (storage) : "memory" ); #endif } else { #if defined(__clang__) // Clang cannot allocate eax:edx register pairs but it has sync intrinsics value = __sync_val_compare_and_swap(&storage, (storage_type)0, (storage_type)0); #else // We don't care for comparison result here; the previous value will be stored into value anyway. // Also we don't care for ebx and ecx values, they just have to be equal to eax and edx before cmpxchg8b. __asm__ __volatile__ ( "movl %%ebx, %%eax\n\t" "movl %%ecx, %%edx\n\t" "lock; cmpxchg8b %[storage]\n\t" : "=&A" (value) : [storage] "m" (storage) : BOOST_ATOMIC_DETAIL_ASM_CLOBBER_CC_COMMA "memory" ); #endif } return value; } static BOOST_FORCEINLINE bool compare_exchange_strong( storage_type volatile& storage, storage_type& expected, storage_type desired, memory_order, memory_order) BOOST_NOEXCEPT { #if defined(__clang__) // Clang cannot allocate eax:edx register pairs but it has sync intrinsics storage_type old_expected = expected; expected = __sync_val_compare_and_swap(&storage, old_expected, desired); return expected == old_expected; #elif defined(__PIC__) // Make sure ebx is saved and restored properly in case // of position independent code. To make this work // setup register constraints such that ebx can not be // used by accident e.g. as base address for the variable // to be modified. Accessing "scratch" should always be okay, // as it can only be placed on the stack (and therefore // accessed through ebp or esp only). // // In theory, could push/pop ebx onto/off the stack, but movs // to a prepared stack slot turn out to be faster. uint32_t scratch; bool success; __asm__ __volatile__ ( "movl %%ebx, %[scratch]\n\t" "movl %[desired_lo], %%ebx\n\t" "lock; cmpxchg8b %[dest]\n\t" "movl %[scratch], %%ebx\n\t" "sete %[success]\n\t" #if !defined(BOOST_ATOMIC_DETAIL_NO_ASM_CONSTRAINT_ALTERNATIVES) : "+A,A,A,A,A,A" (expected), [dest] "+m,m,m,m,m,m" (storage), [scratch] "=m,m,m,m,m,m" (scratch), [success] "=q,m,q,m,q,m" (success) : [desired_lo] "S,S,D,D,m,m" ((uint32_t)desired), "c,c,c,c,c,c" ((uint32_t)(desired >> 32)) #else : "+A" (expected), [dest] "+m" (storage), [scratch] "=m" (scratch), [success] "=q" (success) : [desired_lo] "S" ((uint32_t)desired), "c" ((uint32_t)(desired >> 32)) #endif : BOOST_ATOMIC_DETAIL_ASM_CLOBBER_CC_COMMA "memory" ); return success; #else bool success; __asm__ __volatile__ ( "lock; cmpxchg8b %[dest]\n\t" "sete %[success]\n\t" #if !defined(BOOST_ATOMIC_DETAIL_NO_ASM_CONSTRAINT_ALTERNATIVES) : "+A,A" (expected), [dest] "+m,m" (storage), [success] "=q,m" (success) : "b,b" ((uint32_t)desired), "c,c" ((uint32_t)(desired >> 32)) #else : "+A" (expected), [dest] "+m" (storage), [success] "=q" (success) : "b" ((uint32_t)desired), "c" ((uint32_t)(desired >> 32)) #endif : BOOST_ATOMIC_DETAIL_ASM_CLOBBER_CC_COMMA "memory" ); return success; #endif } static BOOST_FORCEINLINE bool compare_exchange_weak( storage_type volatile& storage, storage_type& expected, storage_type desired, memory_order success_order, memory_order failure_order) BOOST_NOEXCEPT { return compare_exchange_strong(storage, expected, desired, success_order, failure_order); } static BOOST_FORCEINLINE storage_type exchange(storage_type volatile& storage, storage_type v, memory_order order) BOOST_NOEXCEPT { #if defined(__clang__) // Clang cannot allocate eax:edx register pairs but it has sync intrinsics storage_type old_val = storage; while (true) { storage_type val = __sync_val_compare_and_swap(&storage, old_val, v); if (val == old_val) return val; old_val = val; } #elif !defined(BOOST_ATOMIC_DETAIL_NO_ASM_IMPLIED_ZERO_DISPLACEMENTS) #if defined(__PIC__) uint32_t scratch; __asm__ __volatile__ ( "movl %%ebx, %[scratch]\n\t" "movl %%eax, %%ebx\n\t" "movl %%edx, %%ecx\n\t" "movl %[dest], %%eax\n\t" "movl 4+%[dest], %%edx\n\t" ".align 16\n\t" "1: lock; cmpxchg8b %[dest]\n\t" "jne 1b\n\t" "movl %[scratch], %%ebx\n\t" : "+A" (v), [scratch] "=m" (scratch), [dest] "+o" (storage) : : BOOST_ATOMIC_DETAIL_ASM_CLOBBER_CC_COMMA "ecx", "memory" ); return v; #else // defined(__PIC__) __asm__ __volatile__ ( "movl %[dest], %%eax\n\t" "movl 4+%[dest], %%edx\n\t" ".align 16\n\t" "1: lock; cmpxchg8b %[dest]\n\t" "jne 1b\n\t" : "=A" (v), [dest] "+o" (storage) : "b" ((uint32_t)v), "c" ((uint32_t)(v >> 32)) : BOOST_ATOMIC_DETAIL_ASM_CLOBBER_CC_COMMA "memory" ); return v; #endif // defined(__PIC__) #else // !defined(BOOST_ATOMIC_DETAIL_NO_ASM_IMPLIED_ZERO_DISPLACEMENTS) #if defined(__PIC__) uint32_t scratch; __asm__ __volatile__ ( "movl %%ebx, %[scratch]\n\t" "movl %%eax, %%ebx\n\t" "movl %%edx, %%ecx\n\t" "movl 0(%[dest]), %%eax\n\t" "movl 4(%[dest]), %%edx\n\t" ".align 16\n\t" "1: lock; cmpxchg8b 0(%[dest])\n\t" "jne 1b\n\t" "movl %[scratch], %%ebx\n\t" #if !defined(BOOST_ATOMIC_DETAIL_NO_ASM_CONSTRAINT_ALTERNATIVES) : "+A,A" (v), [scratch] "=m,m" (scratch) : [dest] "D,S" (&storage) #else : "+A" (v), [scratch] "=m" (scratch) : [dest] "D" (&storage) #endif : BOOST_ATOMIC_DETAIL_ASM_CLOBBER_CC_COMMA "ecx", "memory" ); return v; #else // defined(__PIC__) __asm__ __volatile__ ( "movl 0(%[dest]), %%eax\n\t" "movl 4(%[dest]), %%edx\n\t" ".align 16\n\t" "1: lock; cmpxchg8b 0(%[dest])\n\t" "jne 1b\n\t" #if !defined(BOOST_ATOMIC_DETAIL_NO_ASM_CONSTRAINT_ALTERNATIVES) : "=A,A" (v) : "b,b" ((uint32_t)v), "c,c" ((uint32_t)(v >> 32)), [dest] "D,S" (&storage) #else : "=A" (v) : "b" ((uint32_t)v), "c" ((uint32_t)(v >> 32)), [dest] "D" (&storage) #endif : BOOST_ATOMIC_DETAIL_ASM_CLOBBER_CC_COMMA "memory" ); return v; #endif // defined(__PIC__) #endif } static BOOST_FORCEINLINE bool is_lock_free(storage_type const volatile&) BOOST_NOEXCEPT { return true; } }; #endif // defined(BOOST_ATOMIC_DETAIL_X86_HAS_CMPXCHG8B) #if defined(BOOST_ATOMIC_DETAIL_X86_HAS_CMPXCHG16B) template< bool Signed > struct gcc_dcas_x86_64 { typedef typename make_storage_type< 16u, Signed >::type storage_type; typedef typename make_storage_type< 16u, Signed >::aligned aligned_storage_type; static BOOST_FORCEINLINE void store(storage_type volatile& storage, storage_type v, memory_order) BOOST_NOEXCEPT { uint64_t const* p_value = (uint64_t const*)&v; #if !defined(BOOST_ATOMIC_DETAIL_NO_ASM_IMPLIED_ZERO_DISPLACEMENTS) __asm__ __volatile__ ( "movq %[dest], %%rax\n\t" "movq 8+%[dest], %%rdx\n\t" ".align 16\n\t" "1: lock; cmpxchg16b %[dest]\n\t" "jne 1b\n\t" : [dest] "=o" (storage) : "b" (p_value[0]), "c" (p_value[1]) : BOOST_ATOMIC_DETAIL_ASM_CLOBBER_CC_COMMA "rax", "rdx", "memory" ); #else // !defined(BOOST_ATOMIC_DETAIL_NO_ASM_IMPLIED_ZERO_DISPLACEMENTS) __asm__ __volatile__ ( "movq 0(%[dest]), %%rax\n\t" "movq 8(%[dest]), %%rdx\n\t" ".align 16\n\t" "1: lock; cmpxchg16b 0(%[dest])\n\t" "jne 1b\n\t" : : "b" (p_value[0]), "c" (p_value[1]), [dest] "r" (&storage) : BOOST_ATOMIC_DETAIL_ASM_CLOBBER_CC_COMMA "rax", "rdx", "memory" ); #endif // !defined(BOOST_ATOMIC_DETAIL_NO_ASM_IMPLIED_ZERO_DISPLACEMENTS) } static BOOST_FORCEINLINE storage_type load(storage_type const volatile& storage, memory_order) BOOST_NOEXCEPT { #if defined(__clang__) // Clang cannot allocate rax:rdx register pairs but it has sync intrinsics storage_type value = storage_type(); return __sync_val_compare_and_swap(&storage, value, value); #elif defined(BOOST_ATOMIC_DETAIL_NO_ASM_RAX_RDX_PAIRS) // GCC 4.4 can't allocate rax:rdx register pair either but it also doesn't support 128-bit __sync_val_compare_and_swap storage_type value; // We don't care for comparison result here; the previous value will be stored into value anyway. // Also we don't care for rbx and rcx values, they just have to be equal to rax and rdx before cmpxchg16b. #if !defined(BOOST_ATOMIC_DETAIL_NO_ASM_IMPLIED_ZERO_DISPLACEMENTS) __asm__ __volatile__ ( "movq %%rbx, %%rax\n\t" "movq %%rcx, %%rdx\n\t" "lock; cmpxchg16b %[storage]\n\t" "movq %%rax, %[value]\n\t" "movq %%rdx, 8+%[value]\n\t" : [value] "=o" (value) : [storage] "m" (storage) : BOOST_ATOMIC_DETAIL_ASM_CLOBBER_CC_COMMA "memory", "rax", "rdx" ); #else // !defined(BOOST_ATOMIC_DETAIL_NO_ASM_IMPLIED_ZERO_DISPLACEMENTS) __asm__ __volatile__ ( "movq %%rbx, %%rax\n\t" "movq %%rcx, %%rdx\n\t" "lock; cmpxchg16b %[storage]\n\t" "movq %%rax, 0(%[value])\n\t" "movq %%rdx, 8(%[value])\n\t" : : [storage] "m" (storage), [value] "r" (&value) : BOOST_ATOMIC_DETAIL_ASM_CLOBBER_CC_COMMA "memory", "rax", "rdx" ); #endif // !defined(BOOST_ATOMIC_DETAIL_NO_ASM_IMPLIED_ZERO_DISPLACEMENTS) return value; #else // defined(BOOST_ATOMIC_DETAIL_NO_ASM_RAX_RDX_PAIRS) storage_type value; // We don't care for comparison result here; the previous value will be stored into value anyway. // Also we don't care for rbx and rcx values, they just have to be equal to rax and rdx before cmpxchg16b. __asm__ __volatile__ ( "movq %%rbx, %%rax\n\t" "movq %%rcx, %%rdx\n\t" "lock; cmpxchg16b %[storage]\n\t" : "=&A" (value) : [storage] "m" (storage) : BOOST_ATOMIC_DETAIL_ASM_CLOBBER_CC_COMMA "memory" ); return value; #endif } static BOOST_FORCEINLINE bool compare_exchange_strong( storage_type volatile& storage, storage_type& expected, storage_type desired, memory_order, memory_order) BOOST_NOEXCEPT { #if defined(__clang__) // Clang cannot allocate rax:rdx register pairs but it has sync intrinsics storage_type old_expected = expected; expected = __sync_val_compare_and_swap(&storage, old_expected, desired); return expected == old_expected; #elif defined(BOOST_ATOMIC_DETAIL_NO_ASM_RAX_RDX_PAIRS) // GCC 4.4 can't allocate rax:rdx register pair either but it also doesn't support 128-bit __sync_val_compare_and_swap uint64_t const* p_desired = (uint64_t const*)&desired; bool success; #if !defined(BOOST_ATOMIC_DETAIL_NO_ASM_IMPLIED_ZERO_DISPLACEMENTS) __asm__ __volatile__ ( "movq %[expected], %%rax\n\t" "movq 8+%[expected], %%rdx\n\t" "lock; cmpxchg16b %[dest]\n\t" "sete %[success]\n\t" "movq %%rax, %[expected]\n\t" "movq %%rdx, 8+%[expected]\n\t" : [dest] "+m" (storage), [expected] "+o" (expected), [success] "=q" (success) : "b" (p_desired[0]), "c" (p_desired[1]) : BOOST_ATOMIC_DETAIL_ASM_CLOBBER_CC_COMMA "memory", "rax", "rdx" ); #else // !defined(BOOST_ATOMIC_DETAIL_NO_ASM_IMPLIED_ZERO_DISPLACEMENTS) __asm__ __volatile__ ( "movq 0(%[expected]), %%rax\n\t" "movq 8(%[expected]), %%rdx\n\t" "lock; cmpxchg16b %[dest]\n\t" "sete %[success]\n\t" "movq %%rax, 0(%[expected])\n\t" "movq %%rdx, 8(%[expected])\n\t" : [dest] "+m" (storage), [success] "=q" (success) : "b" (p_desired[0]), "c" (p_desired[1]), [expected] "r" (&expected) : BOOST_ATOMIC_DETAIL_ASM_CLOBBER_CC_COMMA "memory", "rax", "rdx" ); #endif // !defined(BOOST_ATOMIC_DETAIL_NO_ASM_IMPLIED_ZERO_DISPLACEMENTS) return success; #else // defined(BOOST_ATOMIC_DETAIL_NO_ASM_RAX_RDX_PAIRS) uint64_t const* p_desired = (uint64_t const*)&desired; bool success; __asm__ __volatile__ ( "lock; cmpxchg16b %[dest]\n\t" "sete %[success]\n\t" #if !defined(BOOST_ATOMIC_DETAIL_NO_ASM_CONSTRAINT_ALTERNATIVES) : "+A,A" (expected), [dest] "+m,m" (storage), [success] "=q,m" (success) : "b,b" (p_desired[0]), "c,c" (p_desired[1]) #else : "+A" (expected), [dest] "+m" (storage), [success] "=q" (success) : "b" (p_desired[0]), "c" (p_desired[1]) #endif : BOOST_ATOMIC_DETAIL_ASM_CLOBBER_CC_COMMA "memory" ); return success; #endif } static BOOST_FORCEINLINE bool compare_exchange_weak( storage_type volatile& storage, storage_type& expected, storage_type desired, memory_order success_order, memory_order failure_order) BOOST_NOEXCEPT { return compare_exchange_strong(storage, expected, desired, success_order, failure_order); } static BOOST_FORCEINLINE storage_type exchange(storage_type volatile& storage, storage_type v, memory_order order) BOOST_NOEXCEPT { #if defined(__clang__) // Clang cannot allocate eax:edx register pairs but it has sync intrinsics storage_type old_val = storage; while (true) { storage_type val = __sync_val_compare_and_swap(&storage, old_val, v); if (val == old_val) return val; old_val = val; } #elif defined(BOOST_ATOMIC_DETAIL_NO_ASM_RAX_RDX_PAIRS) // GCC 4.4 can't allocate rax:rdx register pair either but it also doesn't support 128-bit __sync_val_compare_and_swap storage_type old_value; uint64_t const* p_value = (uint64_t const*)&v; #if !defined(BOOST_ATOMIC_DETAIL_NO_ASM_IMPLIED_ZERO_DISPLACEMENTS) __asm__ __volatile__ ( "movq %[dest], %%rax\n\t" "movq 8+%[dest], %%rdx\n\t" ".align 16\n\t" "1: lock; cmpxchg16b %[dest]\n\t" "jne 1b\n\t" "movq %%rax, %[old_value]\n\t" "movq %%rdx, 8+%[old_value]\n\t" : [dest] "+o" (storage), [old_value] "=o" (old_value) : "b" (p_value[0]), "c" (p_value[1]) : BOOST_ATOMIC_DETAIL_ASM_CLOBBER_CC_COMMA "memory", "rax", "rdx" ); #else // !defined(BOOST_ATOMIC_DETAIL_NO_ASM_IMPLIED_ZERO_DISPLACEMENTS) __asm__ __volatile__ ( "movq 0(%[dest]), %%rax\n\t" "movq 8(%[dest]), %%rdx\n\t" ".align 16\n\t" "1: lock; cmpxchg16b 0(%[dest])\n\t" "jne 1b\n\t" "movq %%rax, 0(%[old_value])\n\t" "movq %%rdx, 8(%[old_value])\n\t" : : "b" (p_value[0]), "c" (p_value[1]), [dest] "r" (&storage), [old_value] "r" (&old_value) : BOOST_ATOMIC_DETAIL_ASM_CLOBBER_CC_COMMA "memory", "rax", "rdx" ); #endif // !defined(BOOST_ATOMIC_DETAIL_NO_ASM_IMPLIED_ZERO_DISPLACEMENTS) return old_value; #else // defined(BOOST_ATOMIC_DETAIL_NO_ASM_RAX_RDX_PAIRS) uint64_t const* p_value = (uint64_t const*)&v; #if !defined(BOOST_ATOMIC_DETAIL_NO_ASM_IMPLIED_ZERO_DISPLACEMENTS) __asm__ __volatile__ ( "movq %[dest], %%rax\n\t" "movq 8+%[dest], %%rdx\n\t" ".align 16\n\t" "1: lock; cmpxchg16b %[dest]\n\t" "jne 1b\n\t" : "=&A" (v), [dest] "+o" (storage) : "b" (p_value[0]), "c" (p_value[1]) : BOOST_ATOMIC_DETAIL_ASM_CLOBBER_CC_COMMA "memory" ); #else // !defined(BOOST_ATOMIC_DETAIL_NO_ASM_IMPLIED_ZERO_DISPLACEMENTS) __asm__ __volatile__ ( "movq 0(%[dest]), %%rax\n\t" "movq 8(%[dest]), %%rdx\n\t" ".align 16\n\t" "1: lock; cmpxchg16b 0(%[dest])\n\t" "jne 1b\n\t" : "=&A" (v) : "b" (p_value[0]), "c" (p_value[1]), [dest] "r" (&storage) : BOOST_ATOMIC_DETAIL_ASM_CLOBBER_CC_COMMA "memory" ); #endif // !defined(BOOST_ATOMIC_DETAIL_NO_ASM_IMPLIED_ZERO_DISPLACEMENTS) return v; #endif } static BOOST_FORCEINLINE bool is_lock_free(storage_type const volatile&) BOOST_NOEXCEPT { return true; } }; #endif // defined(BOOST_ATOMIC_DETAIL_X86_HAS_CMPXCHG16B) } // namespace detail } // namespace atomics } // namespace boost #endif // BOOST_ATOMIC_DETAIL_OPS_GCC_X86_DCAS_HPP_INCLUDED_ ================================================ FILE: benchmarks/boost/atomic/detail/ops_linux_arm.hpp ================================================ /* * Distributed under the Boost Software License, Version 1.0. * (See accompanying file LICENSE_1_0.txt or copy at * http://www.boost.org/LICENSE_1_0.txt) * * Copyright (c) 2009, 2011 Helge Bahmann * Copyright (c) 2009 Phil Endecott * Copyright (c) 2013 Tim Blechmann * Linux-specific code by Phil Endecott * Copyright (c) 2014 Andrey Semashev */ /*! * \file atomic/detail/ops_linux_arm.hpp * * This header contains implementation of the \c operations template. */ #ifndef BOOST_ATOMIC_DETAIL_OPS_LINUX_ARM_HPP_INCLUDED_ #define BOOST_ATOMIC_DETAIL_OPS_LINUX_ARM_HPP_INCLUDED_ #include #include #include #include #include #include #include #ifdef BOOST_HAS_PRAGMA_ONCE #pragma once #endif namespace boost { namespace atomics { namespace detail { // Different ARM processors have different atomic instructions. In particular, // architecture versions before v6 (which are still in widespread use, e.g. the // Intel/Marvell XScale chips like the one in the NSLU2) have only atomic swap. // On Linux the kernel provides some support that lets us abstract away from // these differences: it provides emulated CAS and barrier functions at special // addresses that are guaranteed not to be interrupted by the kernel. Using // this facility is slightly slower than inline assembler would be, but much // faster than a system call. // // While this emulated CAS is "strong" in the sense that it does not fail // "spuriously" (i.e.: it never fails to perform the exchange when the value // found equals the value expected), it does not return the found value on // failure. To satisfy the atomic API, compare_exchange_{weak|strong} must // return the found value on failure, and we have to manually load this value // after the emulated CAS reports failure. This in turn introduces a race // between the CAS failing (due to the "wrong" value being found) and subsequently // loading (which might turn up the "right" value). From an application's // point of view this looks like "spurious failure", and therefore the // emulated CAS is only good enough to provide compare_exchange_weak // semantics. struct linux_arm_cas_base { static BOOST_FORCEINLINE void fence_before_store(memory_order order) BOOST_NOEXCEPT { if ((order & memory_order_release) != 0) hardware_full_fence(); } static BOOST_FORCEINLINE void fence_after_store(memory_order order) BOOST_NOEXCEPT { if (order == memory_order_seq_cst) hardware_full_fence(); } static BOOST_FORCEINLINE void fence_after_load(memory_order order) BOOST_NOEXCEPT { if ((order & (memory_order_consume | memory_order_acquire)) != 0) hardware_full_fence(); } static BOOST_FORCEINLINE void hardware_full_fence() BOOST_NOEXCEPT { typedef void (*kernel_dmb_t)(void); ((kernel_dmb_t)0xffff0fa0)(); } }; template< bool Signed > struct linux_arm_cas : public linux_arm_cas_base { typedef typename make_storage_type< 4u, Signed >::type storage_type; typedef typename make_storage_type< 4u, Signed >::aligned aligned_storage_type; static BOOST_FORCEINLINE void store(storage_type volatile& storage, storage_type v, memory_order order) BOOST_NOEXCEPT { fence_before_store(order); storage = v; fence_after_store(order); } static BOOST_FORCEINLINE storage_type load(storage_type const volatile& storage, memory_order order) BOOST_NOEXCEPT { storage_type v = storage; fence_after_load(order); return v; } static BOOST_FORCEINLINE bool compare_exchange_strong( storage_type volatile& storage, storage_type& expected, storage_type desired, memory_order success_order, memory_order failure_order) BOOST_NOEXCEPT { while (true) { storage_type tmp = expected; if (compare_exchange_weak(storage, tmp, desired, success_order, failure_order)) return true; if (tmp != expected) { expected = tmp; return false; } } } static BOOST_FORCEINLINE bool compare_exchange_weak( storage_type volatile& storage, storage_type& expected, storage_type desired, memory_order, memory_order) BOOST_NOEXCEPT { typedef storage_type (*kernel_cmpxchg32_t)(storage_type oldval, storage_type newval, volatile storage_type* ptr); if (((kernel_cmpxchg32_t)0xffff0fc0)(expected, desired, &storage) == 0) { return true; } else { expected = storage; return false; } } static BOOST_FORCEINLINE bool is_lock_free(storage_type const volatile&) BOOST_NOEXCEPT { return true; } }; template< bool Signed > struct operations< 1u, Signed > : public extending_cas_based_operations< cas_based_operations< cas_based_exchange< linux_arm_cas< Signed > > >, 1u, Signed > { }; template< bool Signed > struct operations< 2u, Signed > : public extending_cas_based_operations< cas_based_operations< cas_based_exchange< linux_arm_cas< Signed > > >, 2u, Signed > { }; template< bool Signed > struct operations< 4u, Signed > : public cas_based_operations< cas_based_exchange< linux_arm_cas< Signed > > > { }; BOOST_FORCEINLINE void thread_fence(memory_order order) BOOST_NOEXCEPT { if (order != memory_order_relaxed) linux_arm_cas_base::hardware_full_fence(); } BOOST_FORCEINLINE void signal_fence(memory_order order) BOOST_NOEXCEPT { if (order != memory_order_relaxed) __asm__ __volatile__ ("" ::: "memory"); } } // namespace detail } // namespace atomics } // namespace boost #endif // BOOST_ATOMIC_DETAIL_OPS_LINUX_ARM_HPP_INCLUDED_ ================================================ FILE: benchmarks/boost/atomic/detail/ops_msvc_arm.hpp ================================================ /* * Distributed under the Boost Software License, Version 1.0. * (See accompanying file LICENSE_1_0.txt or copy at * http://www.boost.org/LICENSE_1_0.txt) * * Copyright (c) 2009 Helge Bahmann * Copyright (c) 2012 Tim Blechmann * Copyright (c) 2014 Andrey Semashev */ /*! * \file atomic/detail/ops_msvc_arm.hpp * * This header contains implementation of the \c operations template. */ #ifndef BOOST_ATOMIC_DETAIL_OPS_MSVC_ARM_HPP_INCLUDED_ #define BOOST_ATOMIC_DETAIL_OPS_MSVC_ARM_HPP_INCLUDED_ #include #include #include #include #include #include #include #include #include #ifdef BOOST_HAS_PRAGMA_ONCE #pragma once #endif #define BOOST_ATOMIC_DETAIL_ARM_LOAD8(p) __iso_volatile_load8((const volatile __int8*)(p)) #define BOOST_ATOMIC_DETAIL_ARM_LOAD16(p) __iso_volatile_load16((const volatile __int16*)(p)) #define BOOST_ATOMIC_DETAIL_ARM_LOAD32(p) __iso_volatile_load32((const volatile __int32*)(p)) #define BOOST_ATOMIC_DETAIL_ARM_LOAD64(p) __iso_volatile_load64((const volatile __int64*)(p)) #define BOOST_ATOMIC_DETAIL_ARM_STORE8(p, v) __iso_volatile_store8((volatile __int8*)(p), (__int8)(v)) #define BOOST_ATOMIC_DETAIL_ARM_STORE16(p, v) __iso_volatile_store16((volatile __int16*)(p), (__int16)(v)) #define BOOST_ATOMIC_DETAIL_ARM_STORE32(p, v) __iso_volatile_store32((volatile __int32*)(p), (__int32)(v)) #define BOOST_ATOMIC_DETAIL_ARM_STORE64(p, v) __iso_volatile_store64((volatile __int64*)(p), (__int64)(v)) namespace boost { namespace atomics { namespace detail { // A note about memory_order_consume. Technically, this architecture allows to avoid // unnecessary memory barrier after consume load since it supports data dependency ordering. // However, some compiler optimizations may break a seemingly valid code relying on data // dependency tracking by injecting bogus branches to aid out of order execution. // This may happen not only in Boost.Atomic code but also in user's code, which we have no // control of. See this thread: http://lists.boost.org/Archives/boost/2014/06/213890.php. // For this reason we promote memory_order_consume to memory_order_acquire. struct msvc_arm_operations_base { static BOOST_FORCEINLINE void hardware_full_fence() BOOST_NOEXCEPT { __dmb(0xB); // _ARM_BARRIER_ISH, see armintr.h from MSVC 11 and later } static BOOST_FORCEINLINE void fence_before_store(memory_order order) BOOST_NOEXCEPT { BOOST_ATOMIC_DETAIL_COMPILER_BARRIER(); if ((order & memory_order_release) != 0) hardware_full_fence(); BOOST_ATOMIC_DETAIL_COMPILER_BARRIER(); } static BOOST_FORCEINLINE void fence_after_store(memory_order order) BOOST_NOEXCEPT { BOOST_ATOMIC_DETAIL_COMPILER_BARRIER(); if (order == memory_order_seq_cst) hardware_full_fence(); BOOST_ATOMIC_DETAIL_COMPILER_BARRIER(); } static BOOST_FORCEINLINE void fence_after_load(memory_order order) BOOST_NOEXCEPT { BOOST_ATOMIC_DETAIL_COMPILER_BARRIER(); if ((order & (memory_order_consume | memory_order_acquire)) != 0) hardware_full_fence(); BOOST_ATOMIC_DETAIL_COMPILER_BARRIER(); } static BOOST_FORCEINLINE BOOST_CONSTEXPR memory_order cas_common_order(memory_order success_order, memory_order failure_order) BOOST_NOEXCEPT { // Combine order flags together and promote memory_order_consume to memory_order_acquire return static_cast< memory_order >(((failure_order | success_order) & ~memory_order_consume) | (((failure_order | success_order) & memory_order_consume) << 1u)); } }; template< typename T, typename Derived > struct msvc_arm_operations : public msvc_arm_operations_base { typedef T storage_type; static BOOST_FORCEINLINE storage_type fetch_sub(storage_type volatile& storage, storage_type v, memory_order order) BOOST_NOEXCEPT { typedef typename make_signed< storage_type >::type signed_storage_type; return Derived::fetch_add(storage, static_cast< storage_type >(-static_cast< signed_storage_type >(v)), order); } static BOOST_FORCEINLINE bool compare_exchange_weak( storage_type volatile& storage, storage_type& expected, storage_type desired, memory_order success_order, memory_order failure_order) BOOST_NOEXCEPT { return Derived::compare_exchange_strong(storage, expected, desired, success_order, failure_order); } static BOOST_FORCEINLINE bool test_and_set(storage_type volatile& storage, memory_order order) BOOST_NOEXCEPT { return !!Derived::exchange(storage, (storage_type)1, order); } static BOOST_FORCEINLINE void clear(storage_type volatile& storage, memory_order order) BOOST_NOEXCEPT { Derived::store(storage, (storage_type)0, order); } static BOOST_FORCEINLINE bool is_lock_free(storage_type const volatile&) BOOST_NOEXCEPT { return true; } }; template< bool Signed > struct operations< 1u, Signed > : public msvc_arm_operations< typename make_storage_type< 1u, Signed >::type, operations< 1u, Signed > > { typedef msvc_arm_operations< typename make_storage_type< 1u, Signed >::type, operations< 1u, Signed > > base_type; typedef typename base_type::storage_type storage_type; typedef typename make_storage_type< 1u, Signed >::aligned aligned_storage_type; static BOOST_FORCEINLINE void store(storage_type volatile& storage, storage_type v, memory_order order) BOOST_NOEXCEPT { base_type::fence_before_store(order); BOOST_ATOMIC_DETAIL_ARM_STORE8(&storage, v); base_type::fence_after_store(order); } static BOOST_FORCEINLINE storage_type load(storage_type const volatile& storage, memory_order order) BOOST_NOEXCEPT { storage_type v = BOOST_ATOMIC_DETAIL_ARM_LOAD8(&storage); base_type::fence_after_load(order); return v; } static BOOST_FORCEINLINE storage_type fetch_add(storage_type volatile& storage, storage_type v, memory_order order) BOOST_NOEXCEPT { switch (order) { case memory_order_relaxed: v = static_cast< storage_type >(BOOST_ATOMIC_INTERLOCKED_EXCHANGE_ADD8_RELAXED(&storage, v)); break; case memory_order_consume: case memory_order_acquire: v = static_cast< storage_type >(BOOST_ATOMIC_INTERLOCKED_EXCHANGE_ADD8_ACQUIRE(&storage, v)); break; case memory_order_release: v = static_cast< storage_type >(BOOST_ATOMIC_INTERLOCKED_EXCHANGE_ADD8_RELEASE(&storage, v)); break; case memory_order_acq_rel: case memory_order_seq_cst: default: v = static_cast< storage_type >(BOOST_ATOMIC_INTERLOCKED_EXCHANGE_ADD8(&storage, v)); break; } return v; } static BOOST_FORCEINLINE storage_type exchange(storage_type volatile& storage, storage_type v, memory_order order) BOOST_NOEXCEPT { switch (order) { case memory_order_relaxed: v = static_cast< storage_type >(BOOST_ATOMIC_INTERLOCKED_EXCHANGE8_RELAXED(&storage, v)); break; case memory_order_consume: case memory_order_acquire: v = static_cast< storage_type >(BOOST_ATOMIC_INTERLOCKED_EXCHANGE8_ACQUIRE(&storage, v)); break; case memory_order_release: v = static_cast< storage_type >(BOOST_ATOMIC_INTERLOCKED_EXCHANGE8_RELEASE(&storage, v)); break; case memory_order_acq_rel: case memory_order_seq_cst: default: v = static_cast< storage_type >(BOOST_ATOMIC_INTERLOCKED_EXCHANGE8(&storage, v)); break; } return v; } static BOOST_FORCEINLINE bool compare_exchange_strong( storage_type volatile& storage, storage_type& expected, storage_type desired, memory_order success_order, memory_order failure_order) BOOST_NOEXCEPT { storage_type previous = expected, old_val; switch (cas_common_order(success_order, failure_order)) { case memory_order_relaxed: old_val = static_cast< storage_type >(BOOST_ATOMIC_INTERLOCKED_COMPARE_EXCHANGE8_RELAXED(&storage, desired, previous)); break; case memory_order_consume: case memory_order_acquire: old_val = static_cast< storage_type >(BOOST_ATOMIC_INTERLOCKED_COMPARE_EXCHANGE8_ACQUIRE(&storage, desired, previous)); break; case memory_order_release: old_val = static_cast< storage_type >(BOOST_ATOMIC_INTERLOCKED_COMPARE_EXCHANGE8_RELEASE(&storage, desired, previous)); break; case memory_order_acq_rel: case memory_order_seq_cst: default: old_val = static_cast< storage_type >(BOOST_ATOMIC_INTERLOCKED_COMPARE_EXCHANGE8(&storage, desired, previous)); break; } expected = old_val; return (previous == old_val); } static BOOST_FORCEINLINE storage_type fetch_and(storage_type volatile& storage, storage_type v, memory_order order) BOOST_NOEXCEPT { switch (order) { case memory_order_relaxed: v = static_cast< storage_type >(BOOST_ATOMIC_INTERLOCKED_AND8_RELAXED(&storage, v)); break; case memory_order_consume: case memory_order_acquire: v = static_cast< storage_type >(BOOST_ATOMIC_INTERLOCKED_AND8_ACQUIRE(&storage, v)); break; case memory_order_release: v = static_cast< storage_type >(BOOST_ATOMIC_INTERLOCKED_AND8_RELEASE(&storage, v)); break; case memory_order_acq_rel: case memory_order_seq_cst: default: v = static_cast< storage_type >(BOOST_ATOMIC_INTERLOCKED_AND8(&storage, v)); break; } return v; } static BOOST_FORCEINLINE storage_type fetch_or(storage_type volatile& storage, storage_type v, memory_order order) BOOST_NOEXCEPT { switch (order) { case memory_order_relaxed: v = static_cast< storage_type >(BOOST_ATOMIC_INTERLOCKED_OR8_RELAXED(&storage, v)); break; case memory_order_consume: case memory_order_acquire: v = static_cast< storage_type >(BOOST_ATOMIC_INTERLOCKED_OR8_ACQUIRE(&storage, v)); break; case memory_order_release: v = static_cast< storage_type >(BOOST_ATOMIC_INTERLOCKED_OR8_RELEASE(&storage, v)); break; case memory_order_acq_rel: case memory_order_seq_cst: default: v = static_cast< storage_type >(BOOST_ATOMIC_INTERLOCKED_OR8(&storage, v)); break; } return v; } static BOOST_FORCEINLINE storage_type fetch_xor(storage_type volatile& storage, storage_type v, memory_order order) BOOST_NOEXCEPT { switch (order) { case memory_order_relaxed: v = static_cast< storage_type >(BOOST_ATOMIC_INTERLOCKED_XOR8_RELAXED(&storage, v)); break; case memory_order_consume: case memory_order_acquire: v = static_cast< storage_type >(BOOST_ATOMIC_INTERLOCKED_XOR8_ACQUIRE(&storage, v)); break; case memory_order_release: v = static_cast< storage_type >(BOOST_ATOMIC_INTERLOCKED_XOR8_RELEASE(&storage, v)); break; case memory_order_acq_rel: case memory_order_seq_cst: default: v = static_cast< storage_type >(BOOST_ATOMIC_INTERLOCKED_XOR8(&storage, v)); break; } return v; } }; template< bool Signed > struct operations< 2u, Signed > : public msvc_arm_operations< typename make_storage_type< 2u, Signed >::type, operations< 2u, Signed > > { typedef msvc_arm_operations< typename make_storage_type< 2u, Signed >::type, operations< 2u, Signed > > base_type; typedef typename base_type::storage_type storage_type; typedef typename make_storage_type< 2u, Signed >::aligned aligned_storage_type; static BOOST_FORCEINLINE void store(storage_type volatile& storage, storage_type v, memory_order order) BOOST_NOEXCEPT { base_type::fence_before_store(order); BOOST_ATOMIC_DETAIL_ARM_STORE16(&storage, v); base_type::fence_after_store(order); } static BOOST_FORCEINLINE storage_type load(storage_type const volatile& storage, memory_order order) BOOST_NOEXCEPT { storage_type v = BOOST_ATOMIC_DETAIL_ARM_LOAD16(&storage); base_type::fence_after_load(order); return v; } static BOOST_FORCEINLINE storage_type fetch_add(storage_type volatile& storage, storage_type v, memory_order order) BOOST_NOEXCEPT { switch (order) { case memory_order_relaxed: v = static_cast< storage_type >(BOOST_ATOMIC_INTERLOCKED_EXCHANGE_ADD16_RELAXED(&storage, v)); break; case memory_order_consume: case memory_order_acquire: v = static_cast< storage_type >(BOOST_ATOMIC_INTERLOCKED_EXCHANGE_ADD16_ACQUIRE(&storage, v)); break; case memory_order_release: v = static_cast< storage_type >(BOOST_ATOMIC_INTERLOCKED_EXCHANGE_ADD16_RELEASE(&storage, v)); break; case memory_order_acq_rel: case memory_order_seq_cst: default: v = static_cast< storage_type >(BOOST_ATOMIC_INTERLOCKED_EXCHANGE_ADD16(&storage, v)); break; } return v; } static BOOST_FORCEINLINE storage_type exchange(storage_type volatile& storage, storage_type v, memory_order order) BOOST_NOEXCEPT { switch (order) { case memory_order_relaxed: v = static_cast< storage_type >(BOOST_ATOMIC_INTERLOCKED_EXCHANGE16_RELAXED(&storage, v)); break; case memory_order_consume: case memory_order_acquire: v = static_cast< storage_type >(BOOST_ATOMIC_INTERLOCKED_EXCHANGE16_ACQUIRE(&storage, v)); break; case memory_order_release: v = static_cast< storage_type >(BOOST_ATOMIC_INTERLOCKED_EXCHANGE16_RELEASE(&storage, v)); break; case memory_order_acq_rel: case memory_order_seq_cst: default: v = static_cast< storage_type >(BOOST_ATOMIC_INTERLOCKED_EXCHANGE16(&storage, v)); break; } return v; } static BOOST_FORCEINLINE bool compare_exchange_strong( storage_type volatile& storage, storage_type& expected, storage_type desired, memory_order success_order, memory_order failure_order) BOOST_NOEXCEPT { storage_type previous = expected, old_val; switch (cas_common_order(success_order, failure_order)) { case memory_order_relaxed: old_val = static_cast< storage_type >(BOOST_ATOMIC_INTERLOCKED_COMPARE_EXCHANGE16_RELAXED(&storage, desired, previous)); break; case memory_order_consume: case memory_order_acquire: old_val = static_cast< storage_type >(BOOST_ATOMIC_INTERLOCKED_COMPARE_EXCHANGE16_ACQUIRE(&storage, desired, previous)); break; case memory_order_release: old_val = static_cast< storage_type >(BOOST_ATOMIC_INTERLOCKED_COMPARE_EXCHANGE16_RELEASE(&storage, desired, previous)); break; case memory_order_acq_rel: case memory_order_seq_cst: default: old_val = static_cast< storage_type >(BOOST_ATOMIC_INTERLOCKED_COMPARE_EXCHANGE16(&storage, desired, previous)); break; } expected = old_val; return (previous == old_val); } static BOOST_FORCEINLINE storage_type fetch_and(storage_type volatile& storage, storage_type v, memory_order order) BOOST_NOEXCEPT { switch (order) { case memory_order_relaxed: v = static_cast< storage_type >(BOOST_ATOMIC_INTERLOCKED_AND16_RELAXED(&storage, v)); break; case memory_order_consume: case memory_order_acquire: v = static_cast< storage_type >(BOOST_ATOMIC_INTERLOCKED_AND16_ACQUIRE(&storage, v)); break; case memory_order_release: v = static_cast< storage_type >(BOOST_ATOMIC_INTERLOCKED_AND16_RELEASE(&storage, v)); break; case memory_order_acq_rel: case memory_order_seq_cst: default: v = static_cast< storage_type >(BOOST_ATOMIC_INTERLOCKED_AND16(&storage, v)); break; } return v; } static BOOST_FORCEINLINE storage_type fetch_or(storage_type volatile& storage, storage_type v, memory_order order) BOOST_NOEXCEPT { switch (order) { case memory_order_relaxed: v = static_cast< storage_type >(BOOST_ATOMIC_INTERLOCKED_OR16_RELAXED(&storage, v)); break; case memory_order_consume: case memory_order_acquire: v = static_cast< storage_type >(BOOST_ATOMIC_INTERLOCKED_OR16_ACQUIRE(&storage, v)); break; case memory_order_release: v = static_cast< storage_type >(BOOST_ATOMIC_INTERLOCKED_OR16_RELEASE(&storage, v)); break; case memory_order_acq_rel: case memory_order_seq_cst: default: v = static_cast< storage_type >(BOOST_ATOMIC_INTERLOCKED_OR16(&storage, v)); break; } return v; } static BOOST_FORCEINLINE storage_type fetch_xor(storage_type volatile& storage, storage_type v, memory_order order) BOOST_NOEXCEPT { switch (order) { case memory_order_relaxed: v = static_cast< storage_type >(BOOST_ATOMIC_INTERLOCKED_XOR16_RELAXED(&storage, v)); break; case memory_order_consume: case memory_order_acquire: v = static_cast< storage_type >(BOOST_ATOMIC_INTERLOCKED_XOR16_ACQUIRE(&storage, v)); break; case memory_order_release: v = static_cast< storage_type >(BOOST_ATOMIC_INTERLOCKED_XOR16_RELEASE(&storage, v)); break; case memory_order_acq_rel: case memory_order_seq_cst: default: v = static_cast< storage_type >(BOOST_ATOMIC_INTERLOCKED_XOR16(&storage, v)); break; } return v; } }; template< bool Signed > struct operations< 4u, Signed > : public msvc_arm_operations< typename make_storage_type< 4u, Signed >::type, operations< 4u, Signed > > { typedef msvc_arm_operations< typename make_storage_type< 4u, Signed >::type, operations< 4u, Signed > > base_type; typedef typename base_type::storage_type storage_type; typedef typename make_storage_type< 4u, Signed >::aligned aligned_storage_type; static BOOST_FORCEINLINE void store(storage_type volatile& storage, storage_type v, memory_order order) BOOST_NOEXCEPT { base_type::fence_before_store(order); BOOST_ATOMIC_DETAIL_ARM_STORE32(&storage, v); base_type::fence_after_store(order); } static BOOST_FORCEINLINE storage_type load(storage_type const volatile& storage, memory_order order) BOOST_NOEXCEPT { storage_type v = BOOST_ATOMIC_DETAIL_ARM_LOAD32(&storage); base_type::fence_after_load(order); return v; } static BOOST_FORCEINLINE storage_type fetch_add(storage_type volatile& storage, storage_type v, memory_order order) BOOST_NOEXCEPT { switch (order) { case memory_order_relaxed: v = static_cast< storage_type >(BOOST_ATOMIC_INTERLOCKED_EXCHANGE_ADD_RELAXED(&storage, v)); break; case memory_order_consume: case memory_order_acquire: v = static_cast< storage_type >(BOOST_ATOMIC_INTERLOCKED_EXCHANGE_ADD_ACQUIRE(&storage, v)); break; case memory_order_release: v = static_cast< storage_type >(BOOST_ATOMIC_INTERLOCKED_EXCHANGE_ADD_RELEASE(&storage, v)); break; case memory_order_acq_rel: case memory_order_seq_cst: default: v = static_cast< storage_type >(BOOST_ATOMIC_INTERLOCKED_EXCHANGE_ADD(&storage, v)); break; } return v; } static BOOST_FORCEINLINE storage_type exchange(storage_type volatile& storage, storage_type v, memory_order order) BOOST_NOEXCEPT { switch (order) { case memory_order_relaxed: v = static_cast< storage_type >(BOOST_ATOMIC_INTERLOCKED_EXCHANGE_RELAXED(&storage, v)); break; case memory_order_consume: case memory_order_acquire: v = static_cast< storage_type >(BOOST_ATOMIC_INTERLOCKED_EXCHANGE_ACQUIRE(&storage, v)); break; case memory_order_release: v = static_cast< storage_type >(BOOST_ATOMIC_INTERLOCKED_EXCHANGE_RELEASE(&storage, v)); break; case memory_order_acq_rel: case memory_order_seq_cst: default: v = static_cast< storage_type >(BOOST_ATOMIC_INTERLOCKED_EXCHANGE(&storage, v)); break; } return v; } static BOOST_FORCEINLINE bool compare_exchange_strong( storage_type volatile& storage, storage_type& expected, storage_type desired, memory_order success_order, memory_order failure_order) BOOST_NOEXCEPT { storage_type previous = expected, old_val; switch (cas_common_order(success_order, failure_order)) { case memory_order_relaxed: old_val = static_cast< storage_type >(BOOST_ATOMIC_INTERLOCKED_COMPARE_EXCHANGE_RELAXED(&storage, desired, previous)); break; case memory_order_consume: case memory_order_acquire: old_val = static_cast< storage_type >(BOOST_ATOMIC_INTERLOCKED_COMPARE_EXCHANGE_ACQUIRE(&storage, desired, previous)); break; case memory_order_release: old_val = static_cast< storage_type >(BOOST_ATOMIC_INTERLOCKED_COMPARE_EXCHANGE_RELEASE(&storage, desired, previous)); break; case memory_order_acq_rel: case memory_order_seq_cst: default: old_val = static_cast< storage_type >(BOOST_ATOMIC_INTERLOCKED_COMPARE_EXCHANGE(&storage, desired, previous)); break; } expected = old_val; return (previous == old_val); } static BOOST_FORCEINLINE storage_type fetch_and(storage_type volatile& storage, storage_type v, memory_order order) BOOST_NOEXCEPT { switch (order) { case memory_order_relaxed: v = static_cast< storage_type >(BOOST_ATOMIC_INTERLOCKED_AND_RELAXED(&storage, v)); break; case memory_order_consume: case memory_order_acquire: v = static_cast< storage_type >(BOOST_ATOMIC_INTERLOCKED_AND_ACQUIRE(&storage, v)); break; case memory_order_release: v = static_cast< storage_type >(BOOST_ATOMIC_INTERLOCKED_AND_RELEASE(&storage, v)); break; case memory_order_acq_rel: case memory_order_seq_cst: default: v = static_cast< storage_type >(BOOST_ATOMIC_INTERLOCKED_AND(&storage, v)); break; } return v; } static BOOST_FORCEINLINE storage_type fetch_or(storage_type volatile& storage, storage_type v, memory_order order) BOOST_NOEXCEPT { switch (order) { case memory_order_relaxed: v = static_cast< storage_type >(BOOST_ATOMIC_INTERLOCKED_OR_RELAXED(&storage, v)); break; case memory_order_consume: case memory_order_acquire: v = static_cast< storage_type >(BOOST_ATOMIC_INTERLOCKED_OR_ACQUIRE(&storage, v)); break; case memory_order_release: v = static_cast< storage_type >(BOOST_ATOMIC_INTERLOCKED_OR_RELEASE(&storage, v)); break; case memory_order_acq_rel: case memory_order_seq_cst: default: v = static_cast< storage_type >(BOOST_ATOMIC_INTERLOCKED_OR(&storage, v)); break; } return v; } static BOOST_FORCEINLINE storage_type fetch_xor(storage_type volatile& storage, storage_type v, memory_order order) BOOST_NOEXCEPT { switch (order) { case memory_order_relaxed: v = static_cast< storage_type >(BOOST_ATOMIC_INTERLOCKED_XOR_RELAXED(&storage, v)); break; case memory_order_consume: case memory_order_acquire: v = static_cast< storage_type >(BOOST_ATOMIC_INTERLOCKED_XOR_ACQUIRE(&storage, v)); break; case memory_order_release: v = static_cast< storage_type >(BOOST_ATOMIC_INTERLOCKED_XOR_RELEASE(&storage, v)); break; case memory_order_acq_rel: case memory_order_seq_cst: default: v = static_cast< storage_type >(BOOST_ATOMIC_INTERLOCKED_XOR(&storage, v)); break; } return v; } }; template< bool Signed > struct operations< 8u, Signed > : public msvc_arm_operations< typename make_storage_type< 8u, Signed >::type, operations< 8u, Signed > > { typedef msvc_arm_operations< typename make_storage_type< 8u, Signed >::type, operations< 8u, Signed > > base_type; typedef typename base_type::storage_type storage_type; typedef typename make_storage_type< 8u, Signed >::aligned aligned_storage_type; static BOOST_FORCEINLINE void store(storage_type volatile& storage, storage_type v, memory_order order) BOOST_NOEXCEPT { base_type::fence_before_store(order); BOOST_ATOMIC_DETAIL_ARM_STORE64(&storage, v); base_type::fence_after_store(order); } static BOOST_FORCEINLINE storage_type load(storage_type const volatile& storage, memory_order order) BOOST_NOEXCEPT { storage_type v = BOOST_ATOMIC_DETAIL_ARM_LOAD64(&storage); base_type::fence_after_load(order); return v; } static BOOST_FORCEINLINE storage_type fetch_add(storage_type volatile& storage, storage_type v, memory_order order) BOOST_NOEXCEPT { switch (order) { case memory_order_relaxed: v = static_cast< storage_type >(BOOST_ATOMIC_INTERLOCKED_EXCHANGE_ADD64_RELAXED(&storage, v)); break; case memory_order_consume: case memory_order_acquire: v = static_cast< storage_type >(BOOST_ATOMIC_INTERLOCKED_EXCHANGE_ADD64_ACQUIRE(&storage, v)); break; case memory_order_release: v = static_cast< storage_type >(BOOST_ATOMIC_INTERLOCKED_EXCHANGE_ADD64_RELEASE(&storage, v)); break; case memory_order_acq_rel: case memory_order_seq_cst: default: v = static_cast< storage_type >(BOOST_ATOMIC_INTERLOCKED_EXCHANGE_ADD64(&storage, v)); break; } return v; } static BOOST_FORCEINLINE storage_type exchange(storage_type volatile& storage, storage_type v, memory_order order) BOOST_NOEXCEPT { switch (order) { case memory_order_relaxed: v = static_cast< storage_type >(BOOST_ATOMIC_INTERLOCKED_EXCHANGE64_RELAXED(&storage, v)); break; case memory_order_consume: case memory_order_acquire: v = static_cast< storage_type >(BOOST_ATOMIC_INTERLOCKED_EXCHANGE64_ACQUIRE(&storage, v)); break; case memory_order_release: v = static_cast< storage_type >(BOOST_ATOMIC_INTERLOCKED_EXCHANGE64_RELEASE(&storage, v)); break; case memory_order_acq_rel: case memory_order_seq_cst: default: v = static_cast< storage_type >(BOOST_ATOMIC_INTERLOCKED_EXCHANGE64(&storage, v)); break; } return v; } static BOOST_FORCEINLINE bool compare_exchange_strong( storage_type volatile& storage, storage_type& expected, storage_type desired, memory_order success_order, memory_order failure_order) BOOST_NOEXCEPT { storage_type previous = expected, old_val; switch (cas_common_order(success_order, failure_order)) { case memory_order_relaxed: old_val = static_cast< storage_type >(BOOST_ATOMIC_INTERLOCKED_COMPARE_EXCHANGE64_RELAXED(&storage, desired, previous)); break; case memory_order_consume: case memory_order_acquire: old_val = static_cast< storage_type >(BOOST_ATOMIC_INTERLOCKED_COMPARE_EXCHANGE64_ACQUIRE(&storage, desired, previous)); break; case memory_order_release: old_val = static_cast< storage_type >(BOOST_ATOMIC_INTERLOCKED_COMPARE_EXCHANGE64_RELEASE(&storage, desired, previous)); break; case memory_order_acq_rel: case memory_order_seq_cst: default: old_val = static_cast< storage_type >(BOOST_ATOMIC_INTERLOCKED_COMPARE_EXCHANGE64(&storage, desired, previous)); break; } expected = old_val; return (previous == old_val); } static BOOST_FORCEINLINE storage_type fetch_and(storage_type volatile& storage, storage_type v, memory_order order) BOOST_NOEXCEPT { switch (order) { case memory_order_relaxed: v = static_cast< storage_type >(BOOST_ATOMIC_INTERLOCKED_AND64_RELAXED(&storage, v)); break; case memory_order_consume: case memory_order_acquire: v = static_cast< storage_type >(BOOST_ATOMIC_INTERLOCKED_AND64_ACQUIRE(&storage, v)); break; case memory_order_release: v = static_cast< storage_type >(BOOST_ATOMIC_INTERLOCKED_AND64_RELEASE(&storage, v)); break; case memory_order_acq_rel: case memory_order_seq_cst: default: v = static_cast< storage_type >(BOOST_ATOMIC_INTERLOCKED_AND64(&storage, v)); break; } return v; } static BOOST_FORCEINLINE storage_type fetch_or(storage_type volatile& storage, storage_type v, memory_order order) BOOST_NOEXCEPT { switch (order) { case memory_order_relaxed: v = static_cast< storage_type >(BOOST_ATOMIC_INTERLOCKED_OR64_RELAXED(&storage, v)); break; case memory_order_consume: case memory_order_acquire: v = static_cast< storage_type >(BOOST_ATOMIC_INTERLOCKED_OR64_ACQUIRE(&storage, v)); break; case memory_order_release: v = static_cast< storage_type >(BOOST_ATOMIC_INTERLOCKED_OR64_RELEASE(&storage, v)); break; case memory_order_acq_rel: case memory_order_seq_cst: default: v = static_cast< storage_type >(BOOST_ATOMIC_INTERLOCKED_OR64(&storage, v)); break; } return v; } static BOOST_FORCEINLINE storage_type fetch_xor(storage_type volatile& storage, storage_type v, memory_order order) BOOST_NOEXCEPT { switch (order) { case memory_order_relaxed: v = static_cast< storage_type >(BOOST_ATOMIC_INTERLOCKED_XOR64_RELAXED(&storage, v)); break; case memory_order_consume: case memory_order_acquire: v = static_cast< storage_type >(BOOST_ATOMIC_INTERLOCKED_XOR64_ACQUIRE(&storage, v)); break; case memory_order_release: v = static_cast< storage_type >(BOOST_ATOMIC_INTERLOCKED_XOR64_RELEASE(&storage, v)); break; case memory_order_acq_rel: case memory_order_seq_cst: default: v = static_cast< storage_type >(BOOST_ATOMIC_INTERLOCKED_XOR64(&storage, v)); break; } return v; } }; BOOST_FORCEINLINE void thread_fence(memory_order order) BOOST_NOEXCEPT { BOOST_ATOMIC_DETAIL_COMPILER_BARRIER(); if (order != memory_order_relaxed) msvc_arm_operations_base::hardware_full_fence(); BOOST_ATOMIC_DETAIL_COMPILER_BARRIER(); } BOOST_FORCEINLINE void signal_fence(memory_order order) BOOST_NOEXCEPT { if (order != memory_order_relaxed) BOOST_ATOMIC_DETAIL_COMPILER_BARRIER(); } } // namespace detail } // namespace atomics } // namespace boost #undef BOOST_ATOMIC_DETAIL_ARM_LOAD8 #undef BOOST_ATOMIC_DETAIL_ARM_LOAD16 #undef BOOST_ATOMIC_DETAIL_ARM_LOAD32 #undef BOOST_ATOMIC_DETAIL_ARM_LOAD64 #undef BOOST_ATOMIC_DETAIL_ARM_STORE8 #undef BOOST_ATOMIC_DETAIL_ARM_STORE16 #undef BOOST_ATOMIC_DETAIL_ARM_STORE32 #undef BOOST_ATOMIC_DETAIL_ARM_STORE64 #endif // BOOST_ATOMIC_DETAIL_OPS_MSVC_ARM_HPP_INCLUDED_ ================================================ FILE: benchmarks/boost/atomic/detail/ops_msvc_common.hpp ================================================ /* * Distributed under the Boost Software License, Version 1.0. * (See accompanying file LICENSE_1_0.txt or copy at * http://www.boost.org/LICENSE_1_0.txt) * * Copyright (c) 2009 Helge Bahmann * Copyright (c) 2012 Tim Blechmann * Copyright (c) 2014 Andrey Semashev */ /*! * \file atomic/detail/ops_msvc_common.hpp * * This header contains common tools for MSVC implementation of the \c operations template. */ #ifndef BOOST_ATOMIC_DETAIL_OPS_MSVC_COMMON_HPP_INCLUDED_ #define BOOST_ATOMIC_DETAIL_OPS_MSVC_COMMON_HPP_INCLUDED_ #include #ifdef BOOST_HAS_PRAGMA_ONCE #pragma once #endif // Define compiler barriers #if defined(__INTEL_COMPILER) #define BOOST_ATOMIC_DETAIL_COMPILER_BARRIER() __memory_barrier() #elif defined(_MSC_VER) && !defined(_WIN32_WCE) extern "C" void _ReadWriteBarrier(void); #pragma intrinsic(_ReadWriteBarrier) #define BOOST_ATOMIC_DETAIL_COMPILER_BARRIER() _ReadWriteBarrier() #endif #ifndef BOOST_ATOMIC_DETAIL_COMPILER_BARRIER #define BOOST_ATOMIC_DETAIL_COMPILER_BARRIER() #endif #endif // BOOST_ATOMIC_DETAIL_OPS_MSVC_COMMON_HPP_INCLUDED_ ================================================ FILE: benchmarks/boost/atomic/detail/ops_msvc_x86.hpp ================================================ /* * Distributed under the Boost Software License, Version 1.0. * (See accompanying file LICENSE_1_0.txt or copy at * http://www.boost.org/LICENSE_1_0.txt) * * Copyright (c) 2009 Helge Bahmann * Copyright (c) 2012 Tim Blechmann * Copyright (c) 2014 Andrey Semashev */ /*! * \file atomic/detail/ops_msvc_x86.hpp * * This header contains implementation of the \c operations template. */ #ifndef BOOST_ATOMIC_DETAIL_OPS_MSVC_X86_HPP_INCLUDED_ #define BOOST_ATOMIC_DETAIL_OPS_MSVC_X86_HPP_INCLUDED_ #include #include #include #include #include #include #include #if defined(BOOST_ATOMIC_DETAIL_X86_HAS_CMPXCHG8B) || defined(BOOST_ATOMIC_DETAIL_X86_HAS_CMPXCHG16B) #include #include #endif #include #if !defined(_M_IX86) && !(defined(BOOST_ATOMIC_INTERLOCKED_COMPARE_EXCHANGE8) && defined(BOOST_ATOMIC_INTERLOCKED_COMPARE_EXCHANGE16)) #include #endif #ifdef BOOST_HAS_PRAGMA_ONCE #pragma once #endif #if defined(BOOST_MSVC) #pragma warning(push) // frame pointer register 'ebx' modified by inline assembly code. See the note below. #pragma warning(disable: 4731) #endif #if defined(_MSC_VER) && (defined(_M_AMD64) || (defined(_M_IX86) && defined(_M_IX86_FP) && _M_IX86_FP >= 2)) extern "C" void _mm_mfence(void); #if defined(BOOST_MSVC) #pragma intrinsic(_mm_mfence) #endif #endif namespace boost { namespace atomics { namespace detail { /* * Implementation note for asm blocks. * * http://msdn.microsoft.com/en-us/data/k1a8ss06%28v=vs.105%29 * * Some SSE types require eight-byte stack alignment, forcing the compiler to emit dynamic stack-alignment code. * To be able to access both the local variables and the function parameters after the alignment, the compiler * maintains two frame pointers. If the compiler performs frame pointer omission (FPO), it will use EBP and ESP. * If the compiler does not perform FPO, it will use EBX and EBP. To ensure code runs correctly, do not modify EBX * in asm code if the function requires dynamic stack alignment as it could modify the frame pointer. * Either move the eight-byte aligned types out of the function, or avoid using EBX. * * Since we have no way of knowing that the compiler uses FPO, we have to always save and restore ebx * whenever we have to clobber it. Additionally, we disable warning C4731 above so that the compiler * doesn't spam about ebx use. */ struct msvc_x86_operations_base { static BOOST_FORCEINLINE void hardware_full_fence() BOOST_NOEXCEPT { #if defined(_MSC_VER) && (defined(_M_AMD64) || (defined(_M_IX86) && defined(_M_IX86_FP) && _M_IX86_FP >= 2)) // Use mfence only if SSE2 is available _mm_mfence(); #else long tmp; BOOST_ATOMIC_INTERLOCKED_EXCHANGE(&tmp, 0); #endif } static BOOST_FORCEINLINE void fence_before(memory_order) BOOST_NOEXCEPT { BOOST_ATOMIC_DETAIL_COMPILER_BARRIER(); } static BOOST_FORCEINLINE void fence_after(memory_order) BOOST_NOEXCEPT { BOOST_ATOMIC_DETAIL_COMPILER_BARRIER(); } static BOOST_FORCEINLINE void fence_after_load(memory_order) BOOST_NOEXCEPT { BOOST_ATOMIC_DETAIL_COMPILER_BARRIER(); // On x86 and x86_64 there is no need for a hardware barrier, // even if seq_cst memory order is requested, because all // seq_cst writes are implemented with lock-prefixed operations // or xchg which has implied lock prefix. Therefore normal loads // are already ordered with seq_cst stores on these architectures. } }; template< typename T, typename Derived > struct msvc_x86_operations : public msvc_x86_operations_base { typedef T storage_type; static BOOST_FORCEINLINE void store(storage_type volatile& storage, storage_type v, memory_order order) BOOST_NOEXCEPT { if (order != memory_order_seq_cst) { fence_before(order); storage = v; fence_after(order); } else { Derived::exchange(storage, v, order); } } static BOOST_FORCEINLINE storage_type load(storage_type const volatile& storage, memory_order order) BOOST_NOEXCEPT { storage_type v = storage; fence_after_load(order); return v; } static BOOST_FORCEINLINE storage_type fetch_sub(storage_type volatile& storage, storage_type v, memory_order order) BOOST_NOEXCEPT { typedef typename make_signed< storage_type >::type signed_storage_type; return Derived::fetch_add(storage, static_cast< storage_type >(-static_cast< signed_storage_type >(v)), order); } static BOOST_FORCEINLINE bool compare_exchange_weak( storage_type volatile& storage, storage_type& expected, storage_type desired, memory_order success_order, memory_order failure_order) BOOST_NOEXCEPT { return Derived::compare_exchange_strong(storage, expected, desired, success_order, failure_order); } static BOOST_FORCEINLINE bool test_and_set(storage_type volatile& storage, memory_order order) BOOST_NOEXCEPT { return !!Derived::exchange(storage, (storage_type)1, order); } static BOOST_FORCEINLINE void clear(storage_type volatile& storage, memory_order order) BOOST_NOEXCEPT { store(storage, (storage_type)0, order); } static BOOST_FORCEINLINE bool is_lock_free(storage_type const volatile&) BOOST_NOEXCEPT { return true; } }; template< bool Signed > struct operations< 4u, Signed > : public msvc_x86_operations< typename make_storage_type< 4u, Signed >::type, operations< 4u, Signed > > { typedef msvc_x86_operations< typename make_storage_type< 4u, Signed >::type, operations< 4u, Signed > > base_type; typedef typename base_type::storage_type storage_type; typedef typename make_storage_type< 4u, Signed >::aligned aligned_storage_type; static BOOST_FORCEINLINE storage_type fetch_add(storage_type volatile& storage, storage_type v, memory_order) BOOST_NOEXCEPT { return static_cast< storage_type >(BOOST_ATOMIC_INTERLOCKED_EXCHANGE_ADD(&storage, v)); } static BOOST_FORCEINLINE storage_type exchange(storage_type volatile& storage, storage_type v, memory_order) BOOST_NOEXCEPT { return static_cast< storage_type >(BOOST_ATOMIC_INTERLOCKED_EXCHANGE(&storage, v)); } static BOOST_FORCEINLINE bool compare_exchange_strong( storage_type volatile& storage, storage_type& expected, storage_type desired, memory_order, memory_order) BOOST_NOEXCEPT { storage_type previous = expected; storage_type old_val = static_cast< storage_type >(BOOST_ATOMIC_INTERLOCKED_COMPARE_EXCHANGE(&storage, desired, previous)); expected = old_val; return (previous == old_val); } #if defined(BOOST_ATOMIC_INTERLOCKED_AND) static BOOST_FORCEINLINE storage_type fetch_and(storage_type volatile& storage, storage_type v, memory_order) BOOST_NOEXCEPT { return static_cast< storage_type >(BOOST_ATOMIC_INTERLOCKED_AND(&storage, v)); } #else static BOOST_FORCEINLINE storage_type fetch_and(storage_type volatile& storage, storage_type v, memory_order order) BOOST_NOEXCEPT { storage_type res = storage; while (!compare_exchange_strong(storage, res, res & v, order, memory_order_relaxed)) {} return res; } #endif #if defined(BOOST_ATOMIC_INTERLOCKED_OR) static BOOST_FORCEINLINE storage_type fetch_or(storage_type volatile& storage, storage_type v, memory_order) BOOST_NOEXCEPT { return static_cast< storage_type >(BOOST_ATOMIC_INTERLOCKED_OR(&storage, v)); } #else static BOOST_FORCEINLINE storage_type fetch_or(storage_type volatile& storage, storage_type v, memory_order order) BOOST_NOEXCEPT { storage_type res = storage; while (!compare_exchange_strong(storage, res, res | v, order, memory_order_relaxed)) {} return res; } #endif #if defined(BOOST_ATOMIC_INTERLOCKED_XOR) static BOOST_FORCEINLINE storage_type fetch_xor(storage_type volatile& storage, storage_type v, memory_order) BOOST_NOEXCEPT { return static_cast< storage_type >(BOOST_ATOMIC_INTERLOCKED_XOR(&storage, v)); } #else static BOOST_FORCEINLINE storage_type fetch_xor(storage_type volatile& storage, storage_type v, memory_order order) BOOST_NOEXCEPT { storage_type res = storage; while (!compare_exchange_strong(storage, res, res ^ v, order, memory_order_relaxed)) {} return res; } #endif }; #if defined(BOOST_ATOMIC_INTERLOCKED_COMPARE_EXCHANGE8) template< bool Signed > struct operations< 1u, Signed > : public msvc_x86_operations< typename make_storage_type< 1u, Signed >::type, operations< 1u, Signed > > { typedef msvc_x86_operations< typename make_storage_type< 1u, Signed >::type, operations< 1u, Signed > > base_type; typedef typename base_type::storage_type storage_type; typedef typename make_storage_type< 1u, Signed >::aligned aligned_storage_type; static BOOST_FORCEINLINE storage_type fetch_add(storage_type volatile& storage, storage_type v, memory_order) BOOST_NOEXCEPT { return static_cast< storage_type >(BOOST_ATOMIC_INTERLOCKED_EXCHANGE_ADD8(&storage, v)); } static BOOST_FORCEINLINE storage_type exchange(storage_type volatile& storage, storage_type v, memory_order) BOOST_NOEXCEPT { return static_cast< storage_type >(BOOST_ATOMIC_INTERLOCKED_EXCHANGE8(&storage, v)); } static BOOST_FORCEINLINE bool compare_exchange_strong( storage_type volatile& storage, storage_type& expected, storage_type desired, memory_order, memory_order) BOOST_NOEXCEPT { storage_type previous = expected; storage_type old_val = static_cast< storage_type >(BOOST_ATOMIC_INTERLOCKED_COMPARE_EXCHANGE8(&storage, desired, previous)); expected = old_val; return (previous == old_val); } static BOOST_FORCEINLINE storage_type fetch_and(storage_type volatile& storage, storage_type v, memory_order) BOOST_NOEXCEPT { return static_cast< storage_type >(BOOST_ATOMIC_INTERLOCKED_AND8(&storage, v)); } static BOOST_FORCEINLINE storage_type fetch_or(storage_type volatile& storage, storage_type v, memory_order) BOOST_NOEXCEPT { return static_cast< storage_type >(BOOST_ATOMIC_INTERLOCKED_OR8(&storage, v)); } static BOOST_FORCEINLINE storage_type fetch_xor(storage_type volatile& storage, storage_type v, memory_order) BOOST_NOEXCEPT { return static_cast< storage_type >(BOOST_ATOMIC_INTERLOCKED_XOR8(&storage, v)); } }; #elif defined(_M_IX86) template< bool Signed > struct operations< 1u, Signed > : public msvc_x86_operations< typename make_storage_type< 1u, Signed >::type, operations< 1u, Signed > > { typedef msvc_x86_operations< typename make_storage_type< 1u, Signed >::type, operations< 1u, Signed > > base_type; typedef typename base_type::storage_type storage_type; typedef typename make_storage_type< 1u, Signed >::aligned aligned_storage_type; static BOOST_FORCEINLINE storage_type fetch_add(storage_type volatile& storage, storage_type v, memory_order order) BOOST_NOEXCEPT { base_type::fence_before(order); __asm { mov edx, storage movzx eax, v lock xadd byte ptr [edx], al mov v, al }; base_type::fence_after(order); return v; } static BOOST_FORCEINLINE storage_type exchange(storage_type volatile& storage, storage_type v, memory_order order) BOOST_NOEXCEPT { base_type::fence_before(order); __asm { mov edx, storage movzx eax, v xchg byte ptr [edx], al mov v, al }; base_type::fence_after(order); return v; } static BOOST_FORCEINLINE bool compare_exchange_strong( storage_type volatile& storage, storage_type& expected, storage_type desired, memory_order success_order, memory_order) BOOST_NOEXCEPT { base_type::fence_before(success_order); bool success; __asm { mov esi, expected mov edi, storage movzx eax, byte ptr [esi] movzx edx, desired lock cmpxchg byte ptr [edi], dl mov byte ptr [esi], al sete success }; // The success and failure fences are equivalent anyway base_type::fence_after(success_order); return success; } static BOOST_FORCEINLINE storage_type fetch_and(storage_type volatile& storage, storage_type v, memory_order order) BOOST_NOEXCEPT { base_type::fence_before(order); int backup; __asm { mov backup, ebx xor edx, edx mov edi, storage movzx ebx, v movzx eax, byte ptr [edi] align 16 again: mov dl, al and dl, bl lock cmpxchg byte ptr [edi], dl jne again mov v, al mov ebx, backup }; base_type::fence_after(order); return v; } static BOOST_FORCEINLINE storage_type fetch_or(storage_type volatile& storage, storage_type v, memory_order order) BOOST_NOEXCEPT { base_type::fence_before(order); int backup; __asm { mov backup, ebx xor edx, edx mov edi, storage movzx ebx, v movzx eax, byte ptr [edi] align 16 again: mov dl, al or dl, bl lock cmpxchg byte ptr [edi], dl jne again mov v, al mov ebx, backup }; base_type::fence_after(order); return v; } static BOOST_FORCEINLINE storage_type fetch_xor(storage_type volatile& storage, storage_type v, memory_order order) BOOST_NOEXCEPT { base_type::fence_before(order); int backup; __asm { mov backup, ebx xor edx, edx mov edi, storage movzx ebx, v movzx eax, byte ptr [edi] align 16 again: mov dl, al xor dl, bl lock cmpxchg byte ptr [edi], dl jne again mov v, al mov ebx, backup }; base_type::fence_after(order); return v; } }; #else template< bool Signed > struct operations< 1u, Signed > : public extending_cas_based_operations< operations< 4u, Signed >, 1u, Signed > { }; #endif #if defined(BOOST_ATOMIC_INTERLOCKED_COMPARE_EXCHANGE16) template< bool Signed > struct operations< 2u, Signed > : public msvc_x86_operations< typename make_storage_type< 2u, Signed >::type, operations< 2u, Signed > > { typedef msvc_x86_operations< typename make_storage_type< 2u, Signed >::type, operations< 2u, Signed > > base_type; typedef typename base_type::storage_type storage_type; typedef typename make_storage_type< 2u, Signed >::aligned aligned_storage_type; static BOOST_FORCEINLINE storage_type fetch_add(storage_type volatile& storage, storage_type v, memory_order) BOOST_NOEXCEPT { return static_cast< storage_type >(BOOST_ATOMIC_INTERLOCKED_EXCHANGE_ADD16(&storage, v)); } static BOOST_FORCEINLINE storage_type exchange(storage_type volatile& storage, storage_type v, memory_order) BOOST_NOEXCEPT { return static_cast< storage_type >(BOOST_ATOMIC_INTERLOCKED_EXCHANGE16(&storage, v)); } static BOOST_FORCEINLINE bool compare_exchange_strong( storage_type volatile& storage, storage_type& expected, storage_type desired, memory_order, memory_order) BOOST_NOEXCEPT { storage_type previous = expected; storage_type old_val = static_cast< storage_type >(BOOST_ATOMIC_INTERLOCKED_COMPARE_EXCHANGE16(&storage, desired, previous)); expected = old_val; return (previous == old_val); } static BOOST_FORCEINLINE storage_type fetch_and(storage_type volatile& storage, storage_type v, memory_order) BOOST_NOEXCEPT { return static_cast< storage_type >(BOOST_ATOMIC_INTERLOCKED_AND16(&storage, v)); } static BOOST_FORCEINLINE storage_type fetch_or(storage_type volatile& storage, storage_type v, memory_order) BOOST_NOEXCEPT { return static_cast< storage_type >(BOOST_ATOMIC_INTERLOCKED_OR16(&storage, v)); } static BOOST_FORCEINLINE storage_type fetch_xor(storage_type volatile& storage, storage_type v, memory_order) BOOST_NOEXCEPT { return static_cast< storage_type >(BOOST_ATOMIC_INTERLOCKED_XOR16(&storage, v)); } }; #elif defined(_M_IX86) template< bool Signed > struct operations< 2u, Signed > : public msvc_x86_operations< typename make_storage_type< 2u, Signed >::type, operations< 2u, Signed > > { typedef msvc_x86_operations< typename make_storage_type< 2u, Signed >::type, operations< 2u, Signed > > base_type; typedef typename base_type::storage_type storage_type; typedef typename make_storage_type< 2u, Signed >::aligned aligned_storage_type; static BOOST_FORCEINLINE storage_type fetch_add(storage_type volatile& storage, storage_type v, memory_order order) BOOST_NOEXCEPT { base_type::fence_before(order); __asm { mov edx, storage movzx eax, v lock xadd word ptr [edx], ax mov v, ax }; base_type::fence_after(order); return v; } static BOOST_FORCEINLINE storage_type exchange(storage_type volatile& storage, storage_type v, memory_order order) BOOST_NOEXCEPT { base_type::fence_before(order); __asm { mov edx, storage movzx eax, v xchg word ptr [edx], ax mov v, ax }; base_type::fence_after(order); return v; } static BOOST_FORCEINLINE bool compare_exchange_strong( storage_type volatile& storage, storage_type& expected, storage_type desired, memory_order success_order, memory_order) BOOST_NOEXCEPT { base_type::fence_before(success_order); bool success; __asm { mov esi, expected mov edi, storage movzx eax, word ptr [esi] movzx edx, desired lock cmpxchg word ptr [edi], dx mov word ptr [esi], ax sete success }; // The success and failure fences are equivalent anyway base_type::fence_after(success_order); return success; } static BOOST_FORCEINLINE storage_type fetch_and(storage_type volatile& storage, storage_type v, memory_order order) BOOST_NOEXCEPT { base_type::fence_before(order); int backup; __asm { mov backup, ebx xor edx, edx mov edi, storage movzx ebx, v movzx eax, word ptr [edi] align 16 again: mov dx, ax and dx, bx lock cmpxchg word ptr [edi], dx jne again mov v, ax mov ebx, backup }; base_type::fence_after(order); return v; } static BOOST_FORCEINLINE storage_type fetch_or(storage_type volatile& storage, storage_type v, memory_order order) BOOST_NOEXCEPT { base_type::fence_before(order); int backup; __asm { mov backup, ebx xor edx, edx mov edi, storage movzx ebx, v movzx eax, word ptr [edi] align 16 again: mov dx, ax or dx, bx lock cmpxchg word ptr [edi], dx jne again mov v, ax mov ebx, backup }; base_type::fence_after(order); return v; } static BOOST_FORCEINLINE storage_type fetch_xor(storage_type volatile& storage, storage_type v, memory_order order) BOOST_NOEXCEPT { base_type::fence_before(order); int backup; __asm { mov backup, ebx xor edx, edx mov edi, storage movzx ebx, v movzx eax, word ptr [edi] align 16 again: mov dx, ax xor dx, bx lock cmpxchg word ptr [edi], dx jne again mov v, ax mov ebx, backup }; base_type::fence_after(order); return v; } }; #else template< bool Signed > struct operations< 2u, Signed > : public extending_cas_based_operations< operations< 4u, Signed >, 2u, Signed > { }; #endif #if defined(BOOST_ATOMIC_DETAIL_X86_HAS_CMPXCHG8B) template< bool Signed > struct msvc_dcas_x86 { typedef typename make_storage_type< 8u, Signed >::type storage_type; typedef typename make_storage_type< 8u, Signed >::aligned aligned_storage_type; // Intel 64 and IA-32 Architectures Software Developer's Manual, Volume 3A, 8.1.1. Guaranteed Atomic Operations: // // The Pentium processor (and newer processors since) guarantees that the following additional memory operations will always be carried out atomically: // * Reading or writing a quadword aligned on a 64-bit boundary // // Luckily, the memory is almost always 8-byte aligned in our case because atomic<> uses 64 bit native types for storage and dynamic memory allocations // have at least 8 byte alignment. The only unfortunate case is when atomic is placed on the stack and it is not 8-byte aligned (like on 32 bit Windows). static BOOST_FORCEINLINE void store(storage_type volatile& storage, storage_type v, memory_order) BOOST_NOEXCEPT { BOOST_ATOMIC_DETAIL_COMPILER_BARRIER(); storage_type volatile* p = &storage; if (((uint32_t)p & 0x00000007) == 0) { #if defined(_M_IX86_FP) && _M_IX86_FP >= 2 #if defined(__AVX__) __asm { mov edx, p vmovq xmm4, v vmovq qword ptr [edx], xmm4 }; #else __asm { mov edx, p movq xmm4, v movq qword ptr [edx], xmm4 }; #endif #else __asm { mov edx, p fild v fistp qword ptr [edx] }; #endif } else { int backup; __asm { mov backup, ebx mov edi, p mov ebx, dword ptr [v] mov ecx, dword ptr [v + 4] mov eax, dword ptr [edi] mov edx, dword ptr [edi + 4] align 16 again: lock cmpxchg8b qword ptr [edi] jne again mov ebx, backup }; } BOOST_ATOMIC_DETAIL_COMPILER_BARRIER(); } static BOOST_FORCEINLINE storage_type load(storage_type const volatile& storage, memory_order) BOOST_NOEXCEPT { BOOST_ATOMIC_DETAIL_COMPILER_BARRIER(); storage_type const volatile* p = &storage; storage_type value; if (((uint32_t)p & 0x00000007) == 0) { #if defined(_M_IX86_FP) && _M_IX86_FP >= 2 #if defined(__AVX__) __asm { mov edx, p vmovq xmm4, qword ptr [edx] vmovq value, xmm4 }; #else __asm { mov edx, p movq xmm4, qword ptr [edx] movq value, xmm4 }; #endif #else __asm { mov edx, p fild qword ptr [edx] fistp value }; #endif } else { // We don't care for comparison result here; the previous value will be stored into value anyway. // Also we don't care for ebx and ecx values, they just have to be equal to eax and edx before cmpxchg8b. __asm { mov edi, p mov eax, ebx mov edx, ecx lock cmpxchg8b qword ptr [edi] mov dword ptr [value], eax mov dword ptr [value + 4], edx }; } BOOST_ATOMIC_DETAIL_COMPILER_BARRIER(); return value; } static BOOST_FORCEINLINE bool compare_exchange_strong( storage_type volatile& storage, storage_type& expected, storage_type desired, memory_order, memory_order) BOOST_NOEXCEPT { // MSVC-11 in 32-bit mode sometimes generates messed up code without compiler barriers, // even though the _InterlockedCompareExchange64 intrinsic already provides one. BOOST_ATOMIC_DETAIL_COMPILER_BARRIER(); storage_type volatile* p = &storage; #if defined(BOOST_ATOMIC_INTERLOCKED_COMPARE_EXCHANGE64) const storage_type old_val = (storage_type)BOOST_ATOMIC_INTERLOCKED_COMPARE_EXCHANGE64(p, desired, expected); const bool result = (old_val == expected); expected = old_val; #else bool result; int backup; __asm { mov backup, ebx mov edi, p mov esi, expected mov ebx, dword ptr [desired] mov ecx, dword ptr [desired + 4] mov eax, dword ptr [esi] mov edx, dword ptr [esi + 4] lock cmpxchg8b qword ptr [edi] mov dword ptr [esi], eax mov dword ptr [esi + 4], edx mov ebx, backup sete result }; #endif BOOST_ATOMIC_DETAIL_COMPILER_BARRIER(); return result; } static BOOST_FORCEINLINE bool compare_exchange_weak( storage_type volatile& storage, storage_type& expected, storage_type desired, memory_order success_order, memory_order failure_order) BOOST_NOEXCEPT { return compare_exchange_strong(storage, expected, desired, success_order, failure_order); } static BOOST_FORCEINLINE storage_type exchange(storage_type volatile& storage, storage_type v, memory_order order) BOOST_NOEXCEPT { BOOST_ATOMIC_DETAIL_COMPILER_BARRIER(); storage_type volatile* p = &storage; int backup; __asm { mov backup, ebx mov edi, p mov ebx, dword ptr [v] mov ecx, dword ptr [v + 4] mov eax, dword ptr [edi] mov edx, dword ptr [edi + 4] align 16 again: lock cmpxchg8b qword ptr [edi] jne again mov ebx, backup mov dword ptr [v], eax mov dword ptr [v + 4], edx }; BOOST_ATOMIC_DETAIL_COMPILER_BARRIER(); return v; } static BOOST_FORCEINLINE bool is_lock_free(storage_type const volatile&) BOOST_NOEXCEPT { return true; } }; template< bool Signed > struct operations< 8u, Signed > : public cas_based_operations< msvc_dcas_x86< Signed > > { }; #elif defined(_M_AMD64) template< bool Signed > struct operations< 8u, Signed > : public msvc_x86_operations< typename make_storage_type< 8u, Signed >::type, operations< 8u, Signed > > { typedef msvc_x86_operations< typename make_storage_type< 8u, Signed >::type, operations< 8u, Signed > > base_type; typedef typename base_type::storage_type storage_type; typedef typename make_storage_type< 8u, Signed >::aligned aligned_storage_type; static BOOST_FORCEINLINE storage_type fetch_add(storage_type volatile& storage, storage_type v, memory_order) BOOST_NOEXCEPT { return static_cast< storage_type >(BOOST_ATOMIC_INTERLOCKED_EXCHANGE_ADD64(&storage, v)); } static BOOST_FORCEINLINE storage_type exchange(storage_type volatile& storage, storage_type v, memory_order) BOOST_NOEXCEPT { return static_cast< storage_type >(BOOST_ATOMIC_INTERLOCKED_EXCHANGE64(&storage, v)); } static BOOST_FORCEINLINE bool compare_exchange_strong( storage_type volatile& storage, storage_type& expected, storage_type desired, memory_order, memory_order) BOOST_NOEXCEPT { storage_type previous = expected; storage_type old_val = static_cast< storage_type >(BOOST_ATOMIC_INTERLOCKED_COMPARE_EXCHANGE64(&storage, desired, previous)); expected = old_val; return (previous == old_val); } static BOOST_FORCEINLINE storage_type fetch_and(storage_type volatile& storage, storage_type v, memory_order) BOOST_NOEXCEPT { return static_cast< storage_type >(BOOST_ATOMIC_INTERLOCKED_AND64(&storage, v)); } static BOOST_FORCEINLINE storage_type fetch_or(storage_type volatile& storage, storage_type v, memory_order) BOOST_NOEXCEPT { return static_cast< storage_type >(BOOST_ATOMIC_INTERLOCKED_OR64(&storage, v)); } static BOOST_FORCEINLINE storage_type fetch_xor(storage_type volatile& storage, storage_type v, memory_order) BOOST_NOEXCEPT { return static_cast< storage_type >(BOOST_ATOMIC_INTERLOCKED_XOR64(&storage, v)); } }; #endif #if defined(BOOST_ATOMIC_DETAIL_X86_HAS_CMPXCHG16B) template< bool Signed > struct msvc_dcas_x86_64 { typedef typename make_storage_type< 16u, Signed >::type storage_type; typedef typename make_storage_type< 16u, Signed >::aligned aligned_storage_type; static BOOST_FORCEINLINE void store(storage_type volatile& storage, storage_type v, memory_order) BOOST_NOEXCEPT { storage_type value = const_cast< storage_type& >(storage); while (!BOOST_ATOMIC_INTERLOCKED_COMPARE_EXCHANGE128(&storage, v, &value)) {} } static BOOST_FORCEINLINE storage_type load(storage_type const volatile& storage, memory_order) BOOST_NOEXCEPT { storage_type value = storage_type(); BOOST_ATOMIC_INTERLOCKED_COMPARE_EXCHANGE128(&storage, value, &value); return value; } static BOOST_FORCEINLINE bool compare_exchange_strong( storage_type volatile& storage, storage_type& expected, storage_type desired, memory_order, memory_order) BOOST_NOEXCEPT { return !!BOOST_ATOMIC_INTERLOCKED_COMPARE_EXCHANGE128(&storage, desired, &expected); } static BOOST_FORCEINLINE bool compare_exchange_weak( storage_type volatile& storage, storage_type& expected, storage_type desired, memory_order success_order, memory_order failure_order) BOOST_NOEXCEPT { return compare_exchange_strong(storage, expected, desired, success_order, failure_order); } static BOOST_FORCEINLINE bool is_lock_free(storage_type const volatile&) BOOST_NOEXCEPT { return true; } }; template< bool Signed > struct operations< 16u, Signed > : public cas_based_operations< cas_based_exchange< msvc_dcas_x86_64< Signed > > > { }; #endif // defined(BOOST_ATOMIC_DETAIL_X86_HAS_CMPXCHG16B) BOOST_FORCEINLINE void thread_fence(memory_order order) BOOST_NOEXCEPT { BOOST_ATOMIC_DETAIL_COMPILER_BARRIER(); if (order == memory_order_seq_cst) msvc_x86_operations_base::hardware_full_fence(); BOOST_ATOMIC_DETAIL_COMPILER_BARRIER(); } BOOST_FORCEINLINE void signal_fence(memory_order order) BOOST_NOEXCEPT { if (order != memory_order_relaxed) BOOST_ATOMIC_DETAIL_COMPILER_BARRIER(); } } // namespace detail } // namespace atomics } // namespace boost #if defined(BOOST_MSVC) #pragma warning(pop) #endif #endif // BOOST_ATOMIC_DETAIL_OPS_MSVC_X86_HPP_INCLUDED_ ================================================ FILE: benchmarks/boost/atomic/detail/ops_windows.hpp ================================================ /* * Distributed under the Boost Software License, Version 1.0. * (See accompanying file LICENSE_1_0.txt or copy at * http://www.boost.org/LICENSE_1_0.txt) * * Copyright (c) 2009 Helge Bahmann * Copyright (c) 2012 Tim Blechmann * Copyright (c) 2014 Andrey Semashev */ /*! * \file atomic/detail/ops_windows.hpp * * This header contains implementation of the \c operations template. * * This implementation is the most basic version for Windows. It should * work for any non-MSVC-like compilers as long as there are Interlocked WinAPI * functions available. This version is also used for WinCE. * * Notably, this implementation is not as efficient as other * versions based on compiler intrinsics. */ #ifndef BOOST_ATOMIC_DETAIL_OPS_WINDOWS_HPP_INCLUDED_ #define BOOST_ATOMIC_DETAIL_OPS_WINDOWS_HPP_INCLUDED_ #include #include #include #include #include #include #include #include #include #ifdef BOOST_HAS_PRAGMA_ONCE #pragma once #endif namespace boost { namespace atomics { namespace detail { struct windows_operations_base { static BOOST_FORCEINLINE void hardware_full_fence() BOOST_NOEXCEPT { long tmp; BOOST_ATOMIC_INTERLOCKED_EXCHANGE(&tmp, 0); } static BOOST_FORCEINLINE void fence_before(memory_order) BOOST_NOEXCEPT { BOOST_ATOMIC_DETAIL_COMPILER_BARRIER(); } static BOOST_FORCEINLINE void fence_after(memory_order) BOOST_NOEXCEPT { BOOST_ATOMIC_DETAIL_COMPILER_BARRIER(); } }; template< typename T, typename Derived > struct windows_operations : public windows_operations_base { typedef T storage_type; static BOOST_FORCEINLINE void store(storage_type volatile& storage, storage_type v, memory_order order) BOOST_NOEXCEPT { Derived::exchange(storage, v, order); } static BOOST_FORCEINLINE storage_type load(storage_type const volatile& storage, memory_order order) BOOST_NOEXCEPT { return Derived::fetch_add(const_cast< storage_type volatile& >(storage), (storage_type)0, order); } static BOOST_FORCEINLINE storage_type fetch_sub(storage_type volatile& storage, storage_type v, memory_order order) BOOST_NOEXCEPT { typedef typename make_signed< storage_type >::type signed_storage_type; return Derived::fetch_add(storage, static_cast< storage_type >(-static_cast< signed_storage_type >(v)), order); } static BOOST_FORCEINLINE bool compare_exchange_weak( storage_type volatile& storage, storage_type& expected, storage_type desired, memory_order success_order, memory_order failure_order) BOOST_NOEXCEPT { return Derived::compare_exchange_strong(storage, expected, desired, success_order, failure_order); } static BOOST_FORCEINLINE bool test_and_set(storage_type volatile& storage, memory_order order) BOOST_NOEXCEPT { return !!Derived::exchange(storage, (storage_type)1, order); } static BOOST_FORCEINLINE void clear(storage_type volatile& storage, memory_order order) BOOST_NOEXCEPT { store(storage, (storage_type)0, order); } static BOOST_FORCEINLINE bool is_lock_free(storage_type const volatile&) BOOST_NOEXCEPT { return true; } }; template< bool Signed > struct operations< 4u, Signed > : public windows_operations< typename make_storage_type< 4u, Signed >::type, operations< 4u, Signed > > { typedef windows_operations< typename make_storage_type< 4u, Signed >::type, operations< 4u, Signed > > base_type; typedef typename base_type::storage_type storage_type; typedef typename make_storage_type< 4u, Signed >::aligned aligned_storage_type; static BOOST_FORCEINLINE storage_type fetch_add(storage_type volatile& storage, storage_type v, memory_order order) BOOST_NOEXCEPT { base_type::fence_before(order); v = static_cast< storage_type >(BOOST_ATOMIC_INTERLOCKED_EXCHANGE_ADD(&storage, v)); base_type::fence_after(order); return v; } static BOOST_FORCEINLINE storage_type exchange(storage_type volatile& storage, storage_type v, memory_order order) BOOST_NOEXCEPT { base_type::fence_before(order); v = static_cast< storage_type >(BOOST_ATOMIC_INTERLOCKED_EXCHANGE(&storage, v)); base_type::fence_after(order); return v; } static BOOST_FORCEINLINE bool compare_exchange_strong( storage_type volatile& storage, storage_type& expected, storage_type desired, memory_order success_order, memory_order failure_order) BOOST_NOEXCEPT { storage_type previous = expected; base_type::fence_before(success_order); storage_type old_val = static_cast< storage_type >(BOOST_ATOMIC_INTERLOCKED_COMPARE_EXCHANGE(&storage, desired, previous)); expected = old_val; // The success and failure fences are the same anyway base_type::fence_after(success_order); return (previous == old_val); } static BOOST_FORCEINLINE storage_type fetch_and(storage_type volatile& storage, storage_type v, memory_order order) BOOST_NOEXCEPT { #if defined(BOOST_ATOMIC_INTERLOCKED_AND) base_type::fence_before(order); v = static_cast< storage_type >(BOOST_ATOMIC_INTERLOCKED_AND(&storage, v)); base_type::fence_after(order); return v; #else storage_type res = storage; while (!compare_exchange_strong(storage, res, res & v, order, memory_order_relaxed)) {} return res; #endif } static BOOST_FORCEINLINE storage_type fetch_or(storage_type volatile& storage, storage_type v, memory_order order) BOOST_NOEXCEPT { #if defined(BOOST_ATOMIC_INTERLOCKED_OR) base_type::fence_before(order); v = static_cast< storage_type >(BOOST_ATOMIC_INTERLOCKED_OR(&storage, v)); base_type::fence_after(order); return v; #else storage_type res = storage; while (!compare_exchange_strong(storage, res, res | v, order, memory_order_relaxed)) {} return res; #endif } static BOOST_FORCEINLINE storage_type fetch_xor(storage_type volatile& storage, storage_type v, memory_order order) BOOST_NOEXCEPT { #if defined(BOOST_ATOMIC_INTERLOCKED_XOR) base_type::fence_before(order); v = static_cast< storage_type >(BOOST_ATOMIC_INTERLOCKED_XOR(&storage, v)); base_type::fence_after(order); return v; #else storage_type res = storage; while (!compare_exchange_strong(storage, res, res ^ v, order, memory_order_relaxed)) {} return res; #endif } }; template< bool Signed > struct operations< 1u, Signed > : public extending_cas_based_operations< operations< 4u, Signed >, 1u, Signed > { }; template< bool Signed > struct operations< 2u, Signed > : public extending_cas_based_operations< operations< 4u, Signed >, 2u, Signed > { }; BOOST_FORCEINLINE void thread_fence(memory_order order) BOOST_NOEXCEPT { BOOST_ATOMIC_DETAIL_COMPILER_BARRIER(); if (order == memory_order_seq_cst) windows_operations_base::hardware_full_fence(); BOOST_ATOMIC_DETAIL_COMPILER_BARRIER(); } BOOST_FORCEINLINE void signal_fence(memory_order order) BOOST_NOEXCEPT { if (order != memory_order_relaxed) BOOST_ATOMIC_DETAIL_COMPILER_BARRIER(); } } // namespace detail } // namespace atomics } // namespace boost #endif // BOOST_ATOMIC_DETAIL_OPS_WINDOWS_HPP_INCLUDED_ ================================================ FILE: benchmarks/boost/atomic/detail/pause.hpp ================================================ /* * Distributed under the Boost Software License, Version 1.0. * (See accompanying file LICENSE_1_0.txt or copy at * http://www.boost.org/LICENSE_1_0.txt) * * (C) Copyright 2013 Tim Blechmann * (C) Copyright 2013 Andrey Semashev */ #ifndef BOOST_ATOMIC_DETAIL_PAUSE_HPP_INCLUDED_ #define BOOST_ATOMIC_DETAIL_PAUSE_HPP_INCLUDED_ #include #ifdef BOOST_HAS_PRAGMA_ONCE #pragma once #endif #if defined(_MSC_VER) && (defined(_M_AMD64) || defined(_M_IX86)) extern "C" void _mm_pause(void); #if defined(BOOST_MSVC) #pragma intrinsic(_mm_pause) #endif #endif namespace boost { namespace atomics { namespace detail { BOOST_FORCEINLINE void pause() BOOST_NOEXCEPT { #if defined(_MSC_VER) && (defined(_M_AMD64) || defined(_M_IX86)) _mm_pause(); #elif defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__)) __asm__ __volatile__("pause;"); #endif } } // namespace detail } // namespace atomics } // namespace boost #endif // BOOST_ATOMIC_DETAIL_PAUSE_HPP_INCLUDED_ ================================================ FILE: benchmarks/boost/atomic/detail/platform.hpp ================================================ /* * Distributed under the Boost Software License, Version 1.0. * (See accompanying file LICENSE_1_0.txt or copy at * http://www.boost.org/LICENSE_1_0.txt) * * Copyright (c) 2009 Helge Bahmann * Copyright (c) 2014 Andrey Semashev */ /*! * \file atomic/detail/platform.hpp * * This header defines macros for the target platform detection */ #ifndef BOOST_ATOMIC_DETAIL_PLATFORM_HPP_INCLUDED_ #define BOOST_ATOMIC_DETAIL_PLATFORM_HPP_INCLUDED_ #include #ifdef BOOST_HAS_PRAGMA_ONCE #pragma once #endif #if !defined(BOOST_ATOMIC_FORCE_FALLBACK) // Compiler-based backends #if (defined(__ibmxl__) || defined(__IBMCPP__)) && defined(__PPC__) // IBM XL C++ Compiler has to be checked before GCC/Clang as it pretends to be one but does not support __atomic* intrinsics. // It does support GCC inline assembler though. #define BOOST_ATOMIC_DETAIL_PLATFORM gcc_ppc #elif ((defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 407)) ||\ (defined(BOOST_CLANG) && ((__clang_major__ * 100 + __clang_minor__) >= 302))) &&\ (\ (__GCC_ATOMIC_BOOL_LOCK_FREE + 0) == 2 ||\ (__GCC_ATOMIC_CHAR_LOCK_FREE + 0) == 2 ||\ (__GCC_ATOMIC_SHORT_LOCK_FREE + 0) == 2 ||\ (__GCC_ATOMIC_INT_LOCK_FREE + 0) == 2 ||\ (__GCC_ATOMIC_LONG_LOCK_FREE + 0) == 2 ||\ (__GCC_ATOMIC_LLONG_LOCK_FREE + 0) == 2\ ) #define BOOST_ATOMIC_DETAIL_PLATFORM gcc_atomic #elif defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__)) #define BOOST_ATOMIC_DETAIL_PLATFORM gcc_x86 #elif defined(__GNUC__) && (defined(__POWERPC__) || defined(__PPC__)) #define BOOST_ATOMIC_DETAIL_PLATFORM gcc_ppc // This list of ARM architecture versions comes from Apple's arm/arch.h header. // I don't know how complete it is. #elif defined(__GNUC__) &&\ (\ defined(__ARM_ARCH_6__) || defined(__ARM_ARCH_6J__) ||\ defined(__ARM_ARCH_6K__) || defined(__ARM_ARCH_6Z__) ||\ defined(__ARM_ARCH_6ZK__) ||\ defined(__ARM_ARCH_7__) || defined(__ARM_ARCH_7A__) ||\ defined(__ARM_ARCH_7R__) || defined(__ARM_ARCH_7M__) ||\ defined(__ARM_ARCH_7EM__) || defined(__ARM_ARCH_7S__)\ ) #define BOOST_ATOMIC_DETAIL_PLATFORM gcc_arm #elif defined(__GNUC__) && defined(__sparc_v9__) #define BOOST_ATOMIC_DETAIL_PLATFORM gcc_sparc #elif defined(__GNUC__) && defined(__alpha__) #define BOOST_ATOMIC_DETAIL_PLATFORM gcc_alpha #elif defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 401) &&\ (\ defined(__GCC_HAVE_SYNC_COMPARE_AND_SWAP_1) ||\ defined(__GCC_HAVE_SYNC_COMPARE_AND_SWAP_2) ||\ defined(__GCC_HAVE_SYNC_COMPARE_AND_SWAP_4) ||\ defined(__GCC_HAVE_SYNC_COMPARE_AND_SWAP_8) ||\ defined(__GCC_HAVE_SYNC_COMPARE_AND_SWAP_16)\ ) #define BOOST_ATOMIC_DETAIL_PLATFORM gcc_sync #elif defined(_MSC_VER) && (defined(_M_IX86) || defined(_M_X64)) #define BOOST_ATOMIC_DETAIL_PLATFORM msvc_x86 #elif defined(_MSC_VER) && _MSC_VER >= 1700 && defined(_M_ARM) #define BOOST_ATOMIC_DETAIL_PLATFORM msvc_arm #endif // OS-based backends #if !defined(BOOST_ATOMIC_DETAIL_PLATFORM) #if defined(__linux__) && defined(__arm__) #define BOOST_ATOMIC_DETAIL_PLATFORM linux_arm #elif defined(BOOST_WINDOWS) || defined(_WIN32_CE) #define BOOST_ATOMIC_DETAIL_PLATFORM windows #endif #endif // !defined(BOOST_ATOMIC_DETAIL_PLATFORM) #endif // !defined(BOOST_ATOMIC_FORCE_FALLBACK) #if !defined(BOOST_ATOMIC_DETAIL_PLATFORM) #define BOOST_ATOMIC_DETAIL_PLATFORM emulated #define BOOST_ATOMIC_EMULATED #endif #define BOOST_ATOMIC_DETAIL_HEADER(prefix) #endif // BOOST_ATOMIC_DETAIL_PLATFORM_HPP_INCLUDED_ ================================================ FILE: benchmarks/boost/atomic/detail/storage_type.hpp ================================================ /* * Distributed under the Boost Software License, Version 1.0. * (See accompanying file LICENSE_1_0.txt or copy at * http://www.boost.org/LICENSE_1_0.txt) * * Copyright (c) 2009 Helge Bahmann * Copyright (c) 2012 Tim Blechmann * Copyright (c) 2013 - 2014 Andrey Semashev */ /*! * \file atomic/detail/storage_type.hpp * * This header defines underlying types used as storage */ #ifndef BOOST_ATOMIC_DETAIL_STORAGE_TYPE_HPP_INCLUDED_ #define BOOST_ATOMIC_DETAIL_STORAGE_TYPE_HPP_INCLUDED_ #include #include #include #if !defined(BOOST_ATOMIC_DETAIL_HAS_BUILTIN_MEMCMP) || !defined(BOOST_ATOMIC_DETAIL_HAS_BUILTIN_MEMCPY) #include #endif #ifdef BOOST_HAS_PRAGMA_ONCE #pragma once #endif namespace boost { namespace atomics { namespace detail { template< typename T > BOOST_FORCEINLINE void non_atomic_load(T const volatile& from, T& to) BOOST_NOEXCEPT { to = from; } template< std::size_t Size > struct buffer_storage { BOOST_ALIGNMENT(16) unsigned char data[Size]; BOOST_FORCEINLINE bool operator! () const BOOST_NOEXCEPT { return (data[0] == 0u && BOOST_ATOMIC_DETAIL_MEMCMP(data, data + 1, Size - 1) == 0); } BOOST_FORCEINLINE bool operator== (buffer_storage const& that) const BOOST_NOEXCEPT { return BOOST_ATOMIC_DETAIL_MEMCMP(data, that.data, Size) == 0; } BOOST_FORCEINLINE bool operator!= (buffer_storage const& that) const BOOST_NOEXCEPT { return BOOST_ATOMIC_DETAIL_MEMCMP(data, that.data, Size) != 0; } }; template< std::size_t Size > BOOST_FORCEINLINE void non_atomic_load(buffer_storage< Size > const volatile& from, buffer_storage< Size >& to) BOOST_NOEXCEPT { BOOST_ATOMIC_DETAIL_MEMCPY(to.data, const_cast< unsigned char const* >(from.data), Size); } template< std::size_t Size, bool Signed > struct make_storage_type { typedef buffer_storage< Size > type; struct aligned { type value; BOOST_DEFAULTED_FUNCTION(aligned(), {}) BOOST_FORCEINLINE BOOST_CONSTEXPR explicit aligned(type const& v) BOOST_NOEXCEPT : value(v) {} }; }; template< > struct make_storage_type< 1u, false > { typedef boost::uint8_t type; struct aligned { type value; BOOST_DEFAULTED_FUNCTION(aligned(), {}) BOOST_FORCEINLINE BOOST_CONSTEXPR explicit aligned(type v) BOOST_NOEXCEPT : value(v) {} }; }; template< > struct make_storage_type< 1u, true > { typedef boost::int8_t type; struct aligned { type value; BOOST_DEFAULTED_FUNCTION(aligned(), {}) BOOST_FORCEINLINE BOOST_CONSTEXPR explicit aligned(type v) BOOST_NOEXCEPT : value(v) {} }; }; template< > struct make_storage_type< 2u, false > { typedef boost::uint16_t type; struct aligned { BOOST_ALIGNMENT(2) type value; BOOST_DEFAULTED_FUNCTION(aligned(), {}) BOOST_FORCEINLINE BOOST_CONSTEXPR explicit aligned(type v) BOOST_NOEXCEPT : value(v) {} }; }; template< > struct make_storage_type< 2u, true > { typedef boost::int16_t type; struct aligned { BOOST_ALIGNMENT(2) type value; BOOST_DEFAULTED_FUNCTION(aligned(), {}) BOOST_FORCEINLINE BOOST_CONSTEXPR explicit aligned(type v) BOOST_NOEXCEPT : value(v) {} }; }; template< > struct make_storage_type< 4u, false > { typedef boost::uint32_t type; struct aligned { BOOST_ALIGNMENT(4) type value; BOOST_DEFAULTED_FUNCTION(aligned(), {}) BOOST_FORCEINLINE BOOST_CONSTEXPR explicit aligned(type v) BOOST_NOEXCEPT : value(v) {} }; }; template< > struct make_storage_type< 4u, true > { typedef boost::int32_t type; struct aligned { BOOST_ALIGNMENT(4) type value; BOOST_DEFAULTED_FUNCTION(aligned(), {}) BOOST_FORCEINLINE BOOST_CONSTEXPR explicit aligned(type v) BOOST_NOEXCEPT : value(v) {} }; }; template< > struct make_storage_type< 8u, false > { typedef boost::uint64_t type; struct aligned { BOOST_ALIGNMENT(8) type value; BOOST_DEFAULTED_FUNCTION(aligned(), {}) BOOST_FORCEINLINE BOOST_CONSTEXPR explicit aligned(type v) BOOST_NOEXCEPT : value(v) {} }; }; template< > struct make_storage_type< 8u, true > { typedef boost::int64_t type; struct aligned { BOOST_ALIGNMENT(8) type value; BOOST_DEFAULTED_FUNCTION(aligned(), {}) BOOST_FORCEINLINE BOOST_CONSTEXPR explicit aligned(type v) BOOST_NOEXCEPT : value(v) {} }; }; #if defined(BOOST_HAS_INT128) template< > struct make_storage_type< 16u, false > { typedef boost::uint128_type type; struct aligned { BOOST_ALIGNMENT(16) type value; BOOST_DEFAULTED_FUNCTION(aligned(), {}) BOOST_FORCEINLINE BOOST_CONSTEXPR explicit aligned(type v) BOOST_NOEXCEPT : value(v) {} }; }; template< > struct make_storage_type< 16u, true > { typedef boost::int128_type type; struct aligned { BOOST_ALIGNMENT(16) type value; BOOST_DEFAULTED_FUNCTION(aligned(), {}) BOOST_FORCEINLINE BOOST_CONSTEXPR explicit aligned(type v) BOOST_NOEXCEPT : value(v) {} }; }; #elif !defined(BOOST_NO_ALIGNMENT) struct storage128_t { boost::uint64_t data[2]; BOOST_FORCEINLINE bool operator! () const BOOST_NOEXCEPT { return data[0] == 0 && data[1] == 0; } }; BOOST_FORCEINLINE bool operator== (storage128_t const& left, storage128_t const& right) BOOST_NOEXCEPT { return left.data[0] == right.data[0] && left.data[1] == right.data[1]; } BOOST_FORCEINLINE bool operator!= (storage128_t const& left, storage128_t const& right) BOOST_NOEXCEPT { return !(left == right); } BOOST_FORCEINLINE void non_atomic_load(storage128_t const volatile& from, storage128_t& to) BOOST_NOEXCEPT { to.data[0] = from.data[0]; to.data[1] = from.data[1]; } template< bool Signed > struct make_storage_type< 16u, Signed > { typedef storage128_t type; struct aligned { BOOST_ALIGNMENT(16) type value; BOOST_DEFAULTED_FUNCTION(aligned(), {}) BOOST_FORCEINLINE BOOST_CONSTEXPR explicit aligned(type const& v) BOOST_NOEXCEPT : value(v) {} }; }; #endif template< typename T > struct storage_size_of { enum _ { size = sizeof(T), value = (size == 3 ? 4 : (size >= 5 && size <= 7 ? 8 : (size >= 9 && size <= 15 ? 16 : size))) }; }; } // namespace detail } // namespace atomics } // namespace boost #endif // BOOST_ATOMIC_DETAIL_STORAGE_TYPE_HPP_INCLUDED_ ================================================ FILE: benchmarks/boost/atomic/fences.hpp ================================================ /* * Distributed under the Boost Software License, Version 1.0. * (See accompanying file LICENSE_1_0.txt or copy at * http://www.boost.org/LICENSE_1_0.txt) * * Copyright (c) 2011 Helge Bahmann * Copyright (c) 2013 Tim Blechmann * Copyright (c) 2014 Andrey Semashev */ /*! * \file atomic/fences.hpp * * This header contains definition of \c atomic_thread_fence and \c atomic_signal_fence functions. */ #ifndef BOOST_ATOMIC_FENCES_HPP_INCLUDED_ #define BOOST_ATOMIC_FENCES_HPP_INCLUDED_ #include #include #include #ifdef BOOST_HAS_PRAGMA_ONCE #pragma once #endif /* * IMPLEMENTATION NOTE: All interface functions MUST be declared with BOOST_FORCEINLINE, * see comment for convert_memory_order_to_gcc in ops_gcc_atomic.hpp. */ namespace boost { namespace atomics { #if BOOST_ATOMIC_THREAD_FENCE > 0 BOOST_FORCEINLINE void atomic_thread_fence(memory_order order) BOOST_NOEXCEPT { detail::thread_fence(order); } #else BOOST_FORCEINLINE void atomic_thread_fence(memory_order) BOOST_NOEXCEPT { detail::lockpool::thread_fence(); } #endif #if BOOST_ATOMIC_SIGNAL_FENCE > 0 BOOST_FORCEINLINE void atomic_signal_fence(memory_order order) BOOST_NOEXCEPT { detail::signal_fence(order); } #else BOOST_FORCEINLINE void atomic_signal_fence(memory_order) BOOST_NOEXCEPT { detail::lockpool::signal_fence(); } #endif } // namespace atomics using atomics::atomic_thread_fence; using atomics::atomic_signal_fence; } // namespace boost #endif // BOOST_ATOMIC_FENCES_HPP_INCLUDED_ ================================================ FILE: benchmarks/boost/atomic.hpp ================================================ #ifndef BOOST_ATOMIC_HPP #define BOOST_ATOMIC_HPP // Copyright (c) 2011 Helge Bahmann // // Distributed under the Boost Software License, Version 1.0. // See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // This header includes all Boost.Atomic public headers #include #ifdef BOOST_HAS_PRAGMA_ONCE #pragma once #endif #endif ================================================ FILE: benchmarks/boost/config/abi/borland_prefix.hpp ================================================ // (C) Copyright John Maddock 2003. // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // for C++ Builder the following options effect the ABI: // // -b (on or off - effect emum sizes) // -Vx (on or off - empty members) // -Ve (on or off - empty base classes) // -aX (alignment - 5 options). // -pX (Calling convention - 4 options) // -VmX (member pointer size and layout - 5 options) // -VC (on or off, changes name mangling) // -Vl (on or off, changes struct layout). // In addition the following warnings are sufficiently annoying (and // unfixable) to have them turned off by default: // // 8027 - functions containing [for|while] loops are not expanded inline // 8026 - functions taking class by value arguments are not expanded inline #pragma nopushoptwarn # pragma option push -a8 -Vx- -Ve- -b- -pc -Vmv -VC- -Vl- -w-8027 -w-8026 ================================================ FILE: benchmarks/boost/config/abi/borland_suffix.hpp ================================================ // (C) Copyright John Maddock 2003. // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) # pragma option pop #pragma nopushoptwarn ================================================ FILE: benchmarks/boost/config/abi/msvc_prefix.hpp ================================================ // (C) Copyright John Maddock 2003. // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // // Boost binaries are built with the compiler's default ABI settings, // if the user changes their default alignment in the VS IDE then their // code will no longer be binary compatible with the bjam built binaries // unless this header is included to force Boost code into a consistent ABI. // // Note that inclusion of this header is only necessary for libraries with // separate source, header only libraries DO NOT need this as long as all // translation units are built with the same options. // #if defined(_M_X64) # pragma pack(push,16) #else # pragma pack(push,8) #endif ================================================ FILE: benchmarks/boost/config/abi/msvc_suffix.hpp ================================================ // (C) Copyright John Maddock 2003. // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) #pragma pack(pop) ================================================ FILE: benchmarks/boost/config/abi_prefix.hpp ================================================ // abi_prefix header -------------------------------------------------------// // (c) Copyright John Maddock 2003 // Use, modification and distribution are subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt). #ifndef BOOST_CONFIG_ABI_PREFIX_HPP # define BOOST_CONFIG_ABI_PREFIX_HPP #else # error double inclusion of header boost/config/abi_prefix.hpp is an error #endif #include // this must occur after all other includes and before any code appears: #ifdef BOOST_HAS_ABI_HEADERS # include BOOST_ABI_PREFIX #endif #if defined( __BORLANDC__ ) #pragma nopushoptwarn #endif ================================================ FILE: benchmarks/boost/config/abi_suffix.hpp ================================================ // abi_sufffix header -------------------------------------------------------// // (c) Copyright John Maddock 2003 // Use, modification and distribution are subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt). // This header should be #included AFTER code that was preceded by a #include // . #ifndef BOOST_CONFIG_ABI_PREFIX_HPP # error Header boost/config/abi_suffix.hpp must only be used after boost/config/abi_prefix.hpp #else # undef BOOST_CONFIG_ABI_PREFIX_HPP #endif // the suffix header occurs after all of our code: #ifdef BOOST_HAS_ABI_HEADERS # include BOOST_ABI_SUFFIX #endif #if defined( __BORLANDC__ ) #pragma nopushoptwarn #endif ================================================ FILE: benchmarks/boost/config/auto_link.hpp ================================================ // (C) Copyright John Maddock 2003. // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) /* * LOCATION: see http://www.boost.org for most recent version. * FILE auto_link.hpp * VERSION see * DESCRIPTION: Automatic library inclusion for Borland/Microsoft compilers. */ /************************************************************************* USAGE: ~~~~~~ Before including this header you must define one or more of define the following macros: BOOST_LIB_NAME: Required: A string containing the basename of the library, for example boost_regex. BOOST_LIB_TOOLSET: Optional: the base name of the toolset. BOOST_DYN_LINK: Optional: when set link to dll rather than static library. BOOST_LIB_DIAGNOSTIC: Optional: when set the header will print out the name of the library selected (useful for debugging). BOOST_AUTO_LINK_NOMANGLE: Specifies that we should link to BOOST_LIB_NAME.lib, rather than a mangled-name version. BOOST_AUTO_LINK_TAGGED: Specifies that we link to libraries built with the --layout=tagged option. This is essentially the same as the default name-mangled version, but without the compiler name and version, or the Boost version. Just the build options. These macros will be undef'ed at the end of the header, further this header has no include guards - so be sure to include it only once from your library! Algorithm: ~~~~~~~~~~ Libraries for Borland and Microsoft compilers are automatically selected here, the name of the lib is selected according to the following formula: BOOST_LIB_PREFIX + BOOST_LIB_NAME + "_" + BOOST_LIB_TOOLSET + BOOST_LIB_THREAD_OPT + BOOST_LIB_RT_OPT "-" + BOOST_LIB_VERSION These are defined as: BOOST_LIB_PREFIX: "lib" for static libraries otherwise "". BOOST_LIB_NAME: The base name of the lib ( for example boost_regex). BOOST_LIB_TOOLSET: The compiler toolset name (vc6, vc7, bcb5 etc). BOOST_LIB_THREAD_OPT: "-mt" for multithread builds, otherwise nothing. BOOST_LIB_RT_OPT: A suffix that indicates the runtime library used, contains one or more of the following letters after a hyphen: s static runtime (dynamic if not present). g debug/diagnostic runtime (release if not present). y Python debug/diagnostic runtime (release if not present). d debug build (release if not present). p STLport build. n STLport build without its IOStreams. BOOST_LIB_VERSION: The Boost version, in the form x_y, for Boost version x.y. ***************************************************************************/ #ifdef __cplusplus # ifndef BOOST_CONFIG_HPP # include # endif #elif defined(_MSC_VER) && !defined(__MWERKS__) && !defined(__EDG_VERSION__) // // C language compatability (no, honestly) // # define BOOST_MSVC _MSC_VER # define BOOST_STRINGIZE(X) BOOST_DO_STRINGIZE(X) # define BOOST_DO_STRINGIZE(X) #X #endif // // Only include what follows for known and supported compilers: // #if defined(BOOST_MSVC) \ || defined(__BORLANDC__) \ || (defined(__MWERKS__) && defined(_WIN32) && (__MWERKS__ >= 0x3000)) \ || (defined(__ICL) && defined(_MSC_EXTENSIONS) && (_MSC_VER >= 1200)) #ifndef BOOST_VERSION_HPP # include #endif #ifndef BOOST_LIB_NAME # error "Macro BOOST_LIB_NAME not set (internal error)" #endif // // error check: // #if defined(__MSVC_RUNTIME_CHECKS) && !defined(_DEBUG) # pragma message("Using the /RTC option without specifying a debug runtime will lead to linker errors") # pragma message("Hint: go to the code generation options and switch to one of the debugging runtimes") # error "Incompatible build options" #endif // // select toolset if not defined already: // #ifndef BOOST_LIB_TOOLSET # if defined(BOOST_MSVC) && (BOOST_MSVC < 1200) // Note: no compilers before 1200 are supported # elif defined(BOOST_MSVC) && (BOOST_MSVC < 1300) # ifdef UNDER_CE // eVC4: # define BOOST_LIB_TOOLSET "evc4" # else // vc6: # define BOOST_LIB_TOOLSET "vc6" # endif # elif defined(BOOST_MSVC) && (BOOST_MSVC < 1310) // vc7: # define BOOST_LIB_TOOLSET "vc7" # elif defined(BOOST_MSVC) && (BOOST_MSVC < 1400) // vc71: # define BOOST_LIB_TOOLSET "vc71" # elif defined(BOOST_MSVC) && (BOOST_MSVC < 1500) // vc80: # define BOOST_LIB_TOOLSET "vc80" # elif defined(BOOST_MSVC) && (BOOST_MSVC < 1600) // vc90: # define BOOST_LIB_TOOLSET "vc90" # elif defined(BOOST_MSVC) && (BOOST_MSVC < 1700) // vc10: # define BOOST_LIB_TOOLSET "vc100" # elif defined(BOOST_MSVC) && (BOOST_MSVC < 1800) // vc11: # define BOOST_LIB_TOOLSET "vc110" # elif defined(BOOST_MSVC) && (BOOST_MSVC < 1900) // vc12: # define BOOST_LIB_TOOLSET "vc120" # elif defined(BOOST_MSVC) // vc14: # define BOOST_LIB_TOOLSET "vc140" # elif defined(__BORLANDC__) // CBuilder 6: # define BOOST_LIB_TOOLSET "bcb" # elif defined(__ICL) // Intel C++, no version number: # define BOOST_LIB_TOOLSET "iw" # elif defined(__MWERKS__) && (__MWERKS__ <= 0x31FF ) // Metrowerks CodeWarrior 8.x # define BOOST_LIB_TOOLSET "cw8" # elif defined(__MWERKS__) && (__MWERKS__ <= 0x32FF ) // Metrowerks CodeWarrior 9.x # define BOOST_LIB_TOOLSET "cw9" # endif #endif // BOOST_LIB_TOOLSET // // select thread opt: // #if defined(_MT) || defined(__MT__) # define BOOST_LIB_THREAD_OPT "-mt" #else # define BOOST_LIB_THREAD_OPT #endif #if defined(_MSC_VER) || defined(__MWERKS__) # ifdef _DLL # if (defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION)) && (defined(_STLP_OWN_IOSTREAMS) || defined(__STL_OWN_IOSTREAMS)) # if defined(_DEBUG) && (defined(__STL_DEBUG) || defined(_STLP_DEBUG))\ && defined(BOOST_DEBUG_PYTHON) && defined(BOOST_LINKING_PYTHON) # define BOOST_LIB_RT_OPT "-gydp" # elif defined(_DEBUG) && (defined(__STL_DEBUG) || defined(_STLP_DEBUG)) # define BOOST_LIB_RT_OPT "-gdp" # elif defined(_DEBUG)\ && defined(BOOST_DEBUG_PYTHON) && defined(BOOST_LINKING_PYTHON) # define BOOST_LIB_RT_OPT "-gydp" # pragma message("warning: STLport debug versions are built with /D_STLP_DEBUG=1") # error "Build options aren't compatible with pre-built libraries" # elif defined(_DEBUG) # define BOOST_LIB_RT_OPT "-gdp" # pragma message("warning: STLport debug versions are built with /D_STLP_DEBUG=1") # error "Build options aren't compatible with pre-built libraries" # else # define BOOST_LIB_RT_OPT "-p" # endif # elif defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION) # if defined(_DEBUG) && (defined(__STL_DEBUG) || defined(_STLP_DEBUG))\ && defined(BOOST_DEBUG_PYTHON) && defined(BOOST_LINKING_PYTHON) # define BOOST_LIB_RT_OPT "-gydpn" # elif defined(_DEBUG) && (defined(__STL_DEBUG) || defined(_STLP_DEBUG)) # define BOOST_LIB_RT_OPT "-gdpn" # elif defined(_DEBUG)\ && defined(BOOST_DEBUG_PYTHON) && defined(BOOST_LINKING_PYTHON) # define BOOST_LIB_RT_OPT "-gydpn" # pragma message("warning: STLport debug versions are built with /D_STLP_DEBUG=1") # error "Build options aren't compatible with pre-built libraries" # elif defined(_DEBUG) # define BOOST_LIB_RT_OPT "-gdpn" # pragma message("warning: STLport debug versions are built with /D_STLP_DEBUG=1") # error "Build options aren't compatible with pre-built libraries" # else # define BOOST_LIB_RT_OPT "-pn" # endif # else # if defined(_DEBUG) && defined(BOOST_DEBUG_PYTHON) && defined(BOOST_LINKING_PYTHON) # define BOOST_LIB_RT_OPT "-gyd" # elif defined(_DEBUG) # define BOOST_LIB_RT_OPT "-gd" # else # define BOOST_LIB_RT_OPT # endif # endif # else # if (defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION)) && (defined(_STLP_OWN_IOSTREAMS) || defined(__STL_OWN_IOSTREAMS)) # if defined(_DEBUG) && (defined(__STL_DEBUG) || defined(_STLP_DEBUG))\ && defined(BOOST_DEBUG_PYTHON) && defined(BOOST_LINKING_PYTHON) # define BOOST_LIB_RT_OPT "-sgydp" # elif defined(_DEBUG) && (defined(__STL_DEBUG) || defined(_STLP_DEBUG)) # define BOOST_LIB_RT_OPT "-sgdp" # elif defined(_DEBUG)\ && defined(BOOST_DEBUG_PYTHON) && defined(BOOST_LINKING_PYTHON) # define BOOST_LIB_RT_OPT "-sgydp" # pragma message("warning: STLport debug versions are built with /D_STLP_DEBUG=1") # error "Build options aren't compatible with pre-built libraries" # elif defined(_DEBUG) # define BOOST_LIB_RT_OPT "-sgdp" # pragma message("warning: STLport debug versions are built with /D_STLP_DEBUG=1") # error "Build options aren't compatible with pre-built libraries" # else # define BOOST_LIB_RT_OPT "-sp" # endif # elif defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION) # if defined(_DEBUG) && (defined(__STL_DEBUG) || defined(_STLP_DEBUG))\ && defined(BOOST_DEBUG_PYTHON) && defined(BOOST_LINKING_PYTHON) # define BOOST_LIB_RT_OPT "-sgydpn" # elif defined(_DEBUG) && (defined(__STL_DEBUG) || defined(_STLP_DEBUG)) # define BOOST_LIB_RT_OPT "-sgdpn" # elif defined(_DEBUG)\ && defined(BOOST_DEBUG_PYTHON) && defined(BOOST_LINKING_PYTHON) # define BOOST_LIB_RT_OPT "-sgydpn" # pragma message("warning: STLport debug versions are built with /D_STLP_DEBUG=1") # error "Build options aren't compatible with pre-built libraries" # elif defined(_DEBUG) # define BOOST_LIB_RT_OPT "-sgdpn" # pragma message("warning: STLport debug versions are built with /D_STLP_DEBUG=1") # error "Build options aren't compatible with pre-built libraries" # else # define BOOST_LIB_RT_OPT "-spn" # endif # else # if defined(_DEBUG)\ && defined(BOOST_DEBUG_PYTHON) && defined(BOOST_LINKING_PYTHON) # define BOOST_LIB_RT_OPT "-sgyd" # elif defined(_DEBUG) # define BOOST_LIB_RT_OPT "-sgd" # else # define BOOST_LIB_RT_OPT "-s" # endif # endif # endif #elif defined(__BORLANDC__) // // figure out whether we want the debug builds or not: // #if __BORLANDC__ > 0x561 #pragma defineonoption BOOST_BORLAND_DEBUG -v #endif // // sanity check: // #if defined(__STL_DEBUG) || defined(_STLP_DEBUG) #error "Pre-built versions of the Boost libraries are not provided in STLport-debug form" #endif # ifdef _RTLDLL # if defined(BOOST_BORLAND_DEBUG)\ && defined(BOOST_DEBUG_PYTHON) && defined(BOOST_LINKING_PYTHON) # define BOOST_LIB_RT_OPT "-yd" # elif defined(BOOST_BORLAND_DEBUG) # define BOOST_LIB_RT_OPT "-d" # elif defined(BOOST_DEBUG_PYTHON) && defined(BOOST_LINKING_PYTHON) # define BOOST_LIB_RT_OPT -y # else # define BOOST_LIB_RT_OPT # endif # else # if defined(BOOST_BORLAND_DEBUG)\ && defined(BOOST_DEBUG_PYTHON) && defined(BOOST_LINKING_PYTHON) # define BOOST_LIB_RT_OPT "-syd" # elif defined(BOOST_BORLAND_DEBUG) # define BOOST_LIB_RT_OPT "-sd" # elif defined(BOOST_DEBUG_PYTHON) && defined(BOOST_LINKING_PYTHON) # define BOOST_LIB_RT_OPT "-sy" # else # define BOOST_LIB_RT_OPT "-s" # endif # endif #endif // // select linkage opt: // #if (defined(_DLL) || defined(_RTLDLL)) && defined(BOOST_DYN_LINK) # define BOOST_LIB_PREFIX #elif defined(BOOST_DYN_LINK) # error "Mixing a dll boost library with a static runtime is a really bad idea..." #else # define BOOST_LIB_PREFIX "lib" #endif // // now include the lib: // #if defined(BOOST_LIB_NAME) \ && defined(BOOST_LIB_PREFIX) \ && defined(BOOST_LIB_TOOLSET) \ && defined(BOOST_LIB_THREAD_OPT) \ && defined(BOOST_LIB_RT_OPT) \ && defined(BOOST_LIB_VERSION) #ifdef BOOST_AUTO_LINK_TAGGED # pragma comment(lib, BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) BOOST_LIB_THREAD_OPT BOOST_LIB_RT_OPT ".lib") # ifdef BOOST_LIB_DIAGNOSTIC # pragma message ("Linking to lib file: " BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) BOOST_LIB_THREAD_OPT BOOST_LIB_RT_OPT ".lib") # endif #elif defined(BOOST_AUTO_LINK_NOMANGLE) # pragma comment(lib, BOOST_STRINGIZE(BOOST_LIB_NAME) ".lib") # ifdef BOOST_LIB_DIAGNOSTIC # pragma message ("Linking to lib file: " BOOST_STRINGIZE(BOOST_LIB_NAME) ".lib") # endif #elif defined(BOOST_LIB_BUILDID) # pragma comment(lib, BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) "-" BOOST_LIB_TOOLSET BOOST_LIB_THREAD_OPT BOOST_LIB_RT_OPT "-" BOOST_LIB_VERSION "-" BOOST_STRINGIZE(BOOST_LIB_BUILDID) ".lib") # ifdef BOOST_LIB_DIAGNOSTIC # pragma message ("Linking to lib file: " BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) "-" BOOST_LIB_TOOLSET BOOST_LIB_THREAD_OPT BOOST_LIB_RT_OPT "-" BOOST_LIB_VERSION "-" BOOST_STRINGIZE(BOOST_LIB_BUILDID) ".lib") # endif #else # pragma comment(lib, BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) "-" BOOST_LIB_TOOLSET BOOST_LIB_THREAD_OPT BOOST_LIB_RT_OPT "-" BOOST_LIB_VERSION ".lib") # ifdef BOOST_LIB_DIAGNOSTIC # pragma message ("Linking to lib file: " BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) "-" BOOST_LIB_TOOLSET BOOST_LIB_THREAD_OPT BOOST_LIB_RT_OPT "-" BOOST_LIB_VERSION ".lib") # endif #endif #else # error "some required macros where not defined (internal logic error)." #endif #endif // _MSC_VER || __BORLANDC__ // // finally undef any macros we may have set: // #ifdef BOOST_LIB_PREFIX # undef BOOST_LIB_PREFIX #endif #if defined(BOOST_LIB_NAME) # undef BOOST_LIB_NAME #endif // Don't undef this one: it can be set by the user and should be the // same for all libraries: //#if defined(BOOST_LIB_TOOLSET) //# undef BOOST_LIB_TOOLSET //#endif #if defined(BOOST_LIB_THREAD_OPT) # undef BOOST_LIB_THREAD_OPT #endif #if defined(BOOST_LIB_RT_OPT) # undef BOOST_LIB_RT_OPT #endif #if defined(BOOST_LIB_LINK_OPT) # undef BOOST_LIB_LINK_OPT #endif #if defined(BOOST_LIB_DEBUG_OPT) # undef BOOST_LIB_DEBUG_OPT #endif #if defined(BOOST_DYN_LINK) # undef BOOST_DYN_LINK #endif ================================================ FILE: benchmarks/boost/config/compiler/borland.hpp ================================================ // (C) Copyright John Maddock 2001 - 2003. // (C) Copyright David Abrahams 2002 - 2003. // (C) Copyright Aleksey Gurtovoy 2002. // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org for most recent version. // Borland C++ compiler setup: // // versions check: // we don't support Borland prior to version 5.4: #if __BORLANDC__ < 0x540 # error "Compiler not supported or configured - please reconfigure" #endif // last known compiler version: #if (__BORLANDC__ > 0x613) //# if defined(BOOST_ASSERT_CONFIG) # error "Unknown compiler version - please run the configure tests and report the results" //# else //# pragma message( "Unknown compiler version - please run the configure tests and report the results") //# endif #elif (__BORLANDC__ == 0x600) # error "CBuilderX preview compiler is no longer supported" #endif // // Support macros to help with standard library detection #if (__BORLANDC__ < 0x560) || defined(_USE_OLD_RW_STL) # define BOOST_BCB_WITH_ROGUE_WAVE #elif __BORLANDC__ < 0x570 # define BOOST_BCB_WITH_STLPORT #else # define BOOST_BCB_WITH_DINKUMWARE #endif // // Version 5.0 and below: # if __BORLANDC__ <= 0x0550 // Borland C++Builder 4 and 5: # define BOOST_NO_MEMBER_TEMPLATE_FRIENDS # if __BORLANDC__ == 0x0550 // Borland C++Builder 5, command-line compiler 5.5: # define BOOST_NO_OPERATORS_IN_NAMESPACE # endif // Variadic macros do not exist for C++ Builder versions 5 and below #define BOOST_NO_CXX11_VARIADIC_MACROS # endif // Version 5.51 and below: #if (__BORLANDC__ <= 0x551) # define BOOST_NO_CV_SPECIALIZATIONS # define BOOST_NO_CV_VOID_SPECIALIZATIONS # define BOOST_NO_DEDUCED_TYPENAME // workaround for missing WCHAR_MAX/WCHAR_MIN: #ifdef __cplusplus #include #include #else #include #include #endif // __cplusplus #ifndef WCHAR_MAX # define WCHAR_MAX 0xffff #endif #ifndef WCHAR_MIN # define WCHAR_MIN 0 #endif #endif // Borland C++ Builder 6 and below: #if (__BORLANDC__ <= 0x564) # if defined(NDEBUG) && defined(__cplusplus) // fix broken so that Boost.test works: # include # undef strcmp # endif // fix broken errno declaration: # include # ifndef errno # define errno errno # endif #endif // // new bug in 5.61: #if (__BORLANDC__ >= 0x561) && (__BORLANDC__ <= 0x580) // this seems to be needed by the command line compiler, but not the IDE: # define BOOST_NO_MEMBER_FUNCTION_SPECIALIZATIONS #endif // Borland C++ Builder 2006 Update 2 and below: #if (__BORLANDC__ <= 0x582) # define BOOST_NO_SFINAE # define BOOST_BCB_PARTIAL_SPECIALIZATION_BUG # define BOOST_NO_TEMPLATE_TEMPLATES # define BOOST_NO_PRIVATE_IN_AGGREGATE # ifdef _WIN32 # define BOOST_NO_SWPRINTF # elif defined(linux) || defined(__linux__) || defined(__linux) // we should really be able to do without this // but the wcs* functions aren't imported into std:: # define BOOST_NO_STDC_NAMESPACE // _CPPUNWIND doesn't get automatically set for some reason: # pragma defineonoption BOOST_CPPUNWIND -x # endif #endif #if (__BORLANDC__ <= 0x613) // Beman has asked Alisdair for more info // we shouldn't really need this - but too many things choke // without it, this needs more investigation: # define BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS # define BOOST_NO_IS_ABSTRACT # define BOOST_NO_FUNCTION_TYPE_SPECIALIZATIONS # define BOOST_NO_USING_TEMPLATE # define BOOST_SP_NO_SP_CONVERTIBLE // Temporary workaround #define BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS #endif // Borland C++ Builder 2008 and below: # define BOOST_NO_INTEGRAL_INT64_T # define BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL # define BOOST_NO_DEPENDENT_NESTED_DERIVATIONS # define BOOST_NO_MEMBER_TEMPLATE_FRIENDS # define BOOST_NO_TWO_PHASE_NAME_LOOKUP # define BOOST_NO_USING_DECLARATION_OVERLOADS_FROM_TYPENAME_BASE # define BOOST_NO_NESTED_FRIENDSHIP # define BOOST_NO_TYPENAME_WITH_CTOR #if (__BORLANDC__ < 0x600) # define BOOST_ILLEGAL_CV_REFERENCES #endif // // Positive Feature detection // // Borland C++ Builder 2008 and below: #if (__BORLANDC__ >= 0x599) # pragma defineonoption BOOST_CODEGEAR_0X_SUPPORT -Ax #endif // // C++0x Macros: // #if !defined( BOOST_CODEGEAR_0X_SUPPORT ) || (__BORLANDC__ < 0x610) # define BOOST_NO_CXX11_CHAR16_T # define BOOST_NO_CXX11_CHAR32_T # define BOOST_NO_CXX11_DECLTYPE # define BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS # define BOOST_NO_CXX11_EXTERN_TEMPLATE # define BOOST_NO_CXX11_RVALUE_REFERENCES # define BOOST_NO_CXX11_SCOPED_ENUMS # define BOOST_NO_CXX11_STATIC_ASSERT #else # define BOOST_HAS_ALIGNOF # define BOOST_HAS_CHAR16_T # define BOOST_HAS_CHAR32_T # define BOOST_HAS_DECLTYPE # define BOOST_HAS_EXPLICIT_CONVERSION_OPS # define BOOST_HAS_REF_QUALIFIER # define BOOST_HAS_RVALUE_REFS # define BOOST_HAS_STATIC_ASSERT #endif #define BOOST_NO_CXX11_AUTO_DECLARATIONS #define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS #define BOOST_NO_CXX11_CONSTEXPR #define BOOST_NO_CXX11_DECLTYPE_N3276 #define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS #define BOOST_NO_CXX11_DELETED_FUNCTIONS #define BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS #define BOOST_NO_CXX11_HDR_INITIALIZER_LIST #define BOOST_NO_CXX11_LAMBDAS #define BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS #define BOOST_NO_CXX11_NULLPTR #define BOOST_NO_CXX11_RANGE_BASED_FOR #define BOOST_NO_CXX11_RAW_LITERALS #define BOOST_NO_CXX11_RVALUE_REFERENCES #define BOOST_NO_CXX11_SCOPED_ENUMS #define BOOST_NO_SFINAE_EXPR #define BOOST_NO_CXX11_TEMPLATE_ALIASES #define BOOST_NO_CXX11_UNICODE_LITERALS // UTF-8 still not supported #define BOOST_NO_CXX11_VARIADIC_TEMPLATES #define BOOST_NO_CXX11_NOEXCEPT #define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX #define BOOST_NO_CXX11_USER_DEFINED_LITERALS #define BOOST_NO_CXX11_ALIGNAS #define BOOST_NO_CXX11_TRAILING_RESULT_TYPES #define BOOST_NO_CXX11_INLINE_NAMESPACES #define BOOST_NO_CXX11_REF_QUALIFIERS #define BOOST_NO_CXX11_FINAL // C++ 14: #if !defined(__cpp_aggregate_nsdmi) || (__cpp_aggregate_nsdmi < 201304) # define BOOST_NO_CXX14_AGGREGATE_NSDMI #endif #if !defined(__cpp_binary_literals) || (__cpp_binary_literals < 201304) # define BOOST_NO_CXX14_BINARY_LITERALS #endif #if !defined(__cpp_constexpr) || (__cpp_constexpr < 201304) # define BOOST_NO_CXX14_CONSTEXPR #endif #if !defined(__cpp_decltype_auto) || (__cpp_decltype_auto < 201304) # define BOOST_NO_CXX14_DECLTYPE_AUTO #endif #if (__cplusplus < 201304) // There's no SD6 check for this.... # define BOOST_NO_CXX14_DIGIT_SEPARATORS #endif #if !defined(__cpp_generic_lambdas) || (__cpp_generic_lambdas < 201304) # define BOOST_NO_CXX14_GENERIC_LAMBDAS #endif #if !defined(__cpp_init_captures) || (__cpp_init_captures < 201304) # define BOOST_NO_CXX14_INITIALIZED_LAMBDA_CAPTURES #endif #if !defined(__cpp_return_type_deduction) || (__cpp_return_type_deduction < 201304) # define BOOST_NO_CXX14_RETURN_TYPE_DEDUCTION #endif #if !defined(__cpp_variable_templates) || (__cpp_variable_templates < 201304) # define BOOST_NO_CXX14_VARIABLE_TEMPLATES #endif #if __BORLANDC__ >= 0x590 # define BOOST_HAS_TR1_HASH # define BOOST_HAS_MACRO_USE_FACET #endif // // Post 0x561 we have long long and stdint.h: #if __BORLANDC__ >= 0x561 # ifndef __NO_LONG_LONG # define BOOST_HAS_LONG_LONG # else # define BOOST_NO_LONG_LONG # endif // On non-Win32 platforms let the platform config figure this out: # ifdef _WIN32 # define BOOST_HAS_STDINT_H # endif #endif // Borland C++Builder 6 defaults to using STLPort. If _USE_OLD_RW_STL is // defined, then we have 0x560 or greater with the Rogue Wave implementation // which presumably has the std::DBL_MAX bug. #if defined( BOOST_BCB_WITH_ROGUE_WAVE ) // is partly broken, some macros define symbols that are really in // namespace std, so you end up having to use illegal constructs like // std::DBL_MAX, as a fix we'll just include float.h and have done with: #include #endif // // __int64: // #if (__BORLANDC__ >= 0x530) && !defined(__STRICT_ANSI__) # define BOOST_HAS_MS_INT64 #endif // // check for exception handling support: // #if !defined(_CPPUNWIND) && !defined(BOOST_CPPUNWIND) && !defined(__EXCEPTIONS) && !defined(BOOST_NO_EXCEPTIONS) # define BOOST_NO_EXCEPTIONS #endif // // all versions have a : // #ifndef __STRICT_ANSI__ # define BOOST_HAS_DIRENT_H #endif // // all versions support __declspec: // #if defined(__STRICT_ANSI__) // config/platform/win32.hpp will define BOOST_SYMBOL_EXPORT, etc., unless already defined # define BOOST_SYMBOL_EXPORT #endif // // ABI fixing headers: // #if __BORLANDC__ != 0x600 // not implemented for version 6 compiler yet #ifndef BOOST_ABI_PREFIX # define BOOST_ABI_PREFIX "boost/config/abi/borland_prefix.hpp" #endif #ifndef BOOST_ABI_SUFFIX # define BOOST_ABI_SUFFIX "boost/config/abi/borland_suffix.hpp" #endif #endif // // Disable Win32 support in ANSI mode: // #if __BORLANDC__ < 0x600 # pragma defineonoption BOOST_DISABLE_WIN32 -A #elif defined(__STRICT_ANSI__) # define BOOST_DISABLE_WIN32 #endif // // MSVC compatibility mode does some nasty things: // TODO: look up if this doesn't apply to the whole 12xx range // #if defined(_MSC_VER) && (_MSC_VER <= 1200) # define BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP # define BOOST_NO_VOID_RETURNS #endif // Borland did not implement value-initialization completely, as I reported // in 2007, Borland Report 51854, "Value-initialization: POD struct should be // zero-initialized", http://qc.embarcadero.com/wc/qcmain.aspx?d=51854 // See also: http://www.boost.org/libs/utility/value_init.htm#compiler_issues // (Niels Dekker, LKEB, April 2010) #define BOOST_NO_COMPLETE_VALUE_INITIALIZATION #define BOOST_COMPILER "Borland C++ version " BOOST_STRINGIZE(__BORLANDC__) ================================================ FILE: benchmarks/boost/config/compiler/clang.hpp ================================================ // (C) Copyright Douglas Gregor 2010 // // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org for most recent version. // Clang compiler setup. #define BOOST_HAS_PRAGMA_ONCE // Detecting `-fms-extension` compiler flag assuming that _MSC_VER defined when that flag is used. #if defined (_MSC_VER) && (__clang_major__ > 3 || (__clang_major__ == 3 && __clang_minor__ >= 4)) # define BOOST_HAS_PRAGMA_DETECT_MISMATCH #endif // When compiling with clang before __has_extension was defined, // even if one writes 'defined(__has_extension) && __has_extension(xxx)', // clang reports a compiler error. So the only workaround found is: #ifndef __has_extension #define __has_extension __has_feature #endif #ifndef __has_attribute #define __has_attribute(x) 0 #endif #if !__has_feature(cxx_exceptions) && !defined(BOOST_NO_EXCEPTIONS) # define BOOST_NO_EXCEPTIONS #endif #if !__has_feature(cxx_rtti) && !defined(BOOST_NO_RTTI) # define BOOST_NO_RTTI #endif #if !__has_feature(cxx_rtti) && !defined(BOOST_NO_TYPEID) # define BOOST_NO_TYPEID #endif #if defined(__int64) && !defined(__GNUC__) # define BOOST_HAS_MS_INT64 #endif #define BOOST_HAS_NRVO // Branch prediction hints #if defined(__has_builtin) #if __has_builtin(__builtin_expect) #define BOOST_LIKELY(x) __builtin_expect(x, 1) #define BOOST_UNLIKELY(x) __builtin_expect(x, 0) #endif #endif // Clang supports "long long" in all compilation modes. #define BOOST_HAS_LONG_LONG // // We disable this if the compiler is really nvcc as it // doesn't actually support __int128 as of CUDA_VERSION=5000 // even though it defines __SIZEOF_INT128__. // See https://svn.boost.org/trac/boost/ticket/10418 // Only re-enable this for nvcc if you're absolutely sure // of the circumstances under which it's supported. // Similarly __SIZEOF_INT128__ is defined when targetting msvc // compatibility even though the required support functions are absent. // #if defined(__SIZEOF_INT128__) && !defined(__CUDACC__) && !defined(_MSC_VER) # define BOOST_HAS_INT128 #endif // // Dynamic shared object (DSO) and dynamic-link library (DLL) support // #if !defined(_WIN32) && !defined(__WIN32__) && !defined(WIN32) # define BOOST_SYMBOL_EXPORT __attribute__((__visibility__("default"))) # define BOOST_SYMBOL_IMPORT # define BOOST_SYMBOL_VISIBLE __attribute__((__visibility__("default"))) #endif // // The BOOST_FALLTHROUGH macro can be used to annotate implicit fall-through // between switch labels. // #if __cplusplus >= 201103L && defined(__has_warning) # if __has_feature(cxx_attributes) && __has_warning("-Wimplicit-fallthrough") # define BOOST_FALLTHROUGH [[clang::fallthrough]] # endif #endif #if !__has_feature(cxx_auto_type) # define BOOST_NO_CXX11_AUTO_DECLARATIONS # define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS #endif // // Currently clang on Windows using VC++ RTL does not support C++11's char16_t or char32_t // #if defined(_MSC_VER) || !(defined(__GXX_EXPERIMENTAL_CXX0X__) || __cplusplus >= 201103L) # define BOOST_NO_CXX11_CHAR16_T # define BOOST_NO_CXX11_CHAR32_T #endif #if !__has_feature(cxx_constexpr) # define BOOST_NO_CXX11_CONSTEXPR #endif #if !__has_feature(cxx_decltype) # define BOOST_NO_CXX11_DECLTYPE #endif #if !__has_feature(cxx_decltype_incomplete_return_types) # define BOOST_NO_CXX11_DECLTYPE_N3276 #endif #if !__has_feature(cxx_defaulted_functions) # define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS #endif #if !__has_feature(cxx_deleted_functions) # define BOOST_NO_CXX11_DELETED_FUNCTIONS #endif #if !__has_feature(cxx_explicit_conversions) # define BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS #endif #if !__has_feature(cxx_default_function_template_args) # define BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS #endif #if !__has_feature(cxx_generalized_initializers) # define BOOST_NO_CXX11_HDR_INITIALIZER_LIST #endif #if !__has_feature(cxx_lambdas) # define BOOST_NO_CXX11_LAMBDAS #endif #if !__has_feature(cxx_local_type_template_args) # define BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS #endif #if !__has_feature(cxx_noexcept) # define BOOST_NO_CXX11_NOEXCEPT #endif #if !__has_feature(cxx_nullptr) # define BOOST_NO_CXX11_NULLPTR #endif #if !__has_feature(cxx_range_for) # define BOOST_NO_CXX11_RANGE_BASED_FOR #endif #if !__has_feature(cxx_raw_string_literals) # define BOOST_NO_CXX11_RAW_LITERALS #endif #if !__has_feature(cxx_reference_qualified_functions) # define BOOST_NO_CXX11_REF_QUALIFIERS #endif #if !__has_feature(cxx_generalized_initializers) # define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX #endif #if !__has_feature(cxx_rvalue_references) # define BOOST_NO_CXX11_RVALUE_REFERENCES #endif #if !__has_feature(cxx_strong_enums) # define BOOST_NO_CXX11_SCOPED_ENUMS #endif #if !__has_feature(cxx_static_assert) # define BOOST_NO_CXX11_STATIC_ASSERT #endif #if !__has_feature(cxx_alias_templates) # define BOOST_NO_CXX11_TEMPLATE_ALIASES #endif #if !__has_feature(cxx_unicode_literals) # define BOOST_NO_CXX11_UNICODE_LITERALS #endif #if !__has_feature(cxx_variadic_templates) # define BOOST_NO_CXX11_VARIADIC_TEMPLATES #endif #if !__has_feature(cxx_user_literals) # define BOOST_NO_CXX11_USER_DEFINED_LITERALS #endif #if !__has_feature(cxx_alignas) # define BOOST_NO_CXX11_ALIGNAS #endif #if !__has_feature(cxx_trailing_return) # define BOOST_NO_CXX11_TRAILING_RESULT_TYPES #endif #if !__has_feature(cxx_inline_namespaces) # define BOOST_NO_CXX11_INLINE_NAMESPACES #endif #if !__has_feature(cxx_override_control) # define BOOST_NO_CXX11_FINAL #endif #if !(__has_feature(__cxx_binary_literals__) || __has_extension(__cxx_binary_literals__)) # define BOOST_NO_CXX14_BINARY_LITERALS #endif #if !__has_feature(__cxx_decltype_auto__) # define BOOST_NO_CXX14_DECLTYPE_AUTO #endif #if !__has_feature(__cxx_aggregate_nsdmi__) # define BOOST_NO_CXX14_AGGREGATE_NSDMI #endif #if !__has_feature(__cxx_init_captures__) # define BOOST_NO_CXX14_INITIALIZED_LAMBDA_CAPTURES #endif #if !__has_feature(__cxx_generic_lambdas__) # define BOOST_NO_CXX14_GENERIC_LAMBDAS #endif // clang < 3.5 has a defect with dependent type, like following. // // template // constexpr typename enable_if >::type foo(T &) // { } // error: no return statement in constexpr function // // This issue also affects C++11 mode, but C++11 constexpr requires return stmt. // Therefore we don't care such case. // // Note that we can't check Clang version directly as the numbering system changes depending who's // creating the Clang release (see https://github.com/boostorg/config/pull/39#issuecomment-59927873) // so instead verify that we have a feature that was introduced at the same time as working C++14 // constexpr (generic lambda's in this case): // #if !__has_feature(__cxx_generic_lambdas__) || !__has_feature(__cxx_relaxed_constexpr__) # define BOOST_NO_CXX14_CONSTEXPR #endif #if !__has_feature(__cxx_return_type_deduction__) # define BOOST_NO_CXX14_RETURN_TYPE_DEDUCTION #endif #if !__has_feature(__cxx_variable_templates__) # define BOOST_NO_CXX14_VARIABLE_TEMPLATES #endif #if __cplusplus < 201400 // All versions with __cplusplus above this value seem to support this: # define BOOST_NO_CXX14_DIGIT_SEPARATORS #endif // // __builtin_unreachable: #if defined(__has_builtin) && __has_builtin(__builtin_unreachable) #define BOOST_UNREACHABLE_RETURN(x) __builtin_unreachable(); #endif // Clang has supported the 'unused' attribute since the first release. #define BOOST_ATTRIBUTE_UNUSED __attribute__((__unused__)) #ifndef BOOST_COMPILER # define BOOST_COMPILER "Clang version " __clang_version__ #endif // Macro used to identify the Clang compiler. #define BOOST_CLANG 1 ================================================ FILE: benchmarks/boost/config/compiler/codegear.hpp ================================================ // (C) Copyright John Maddock 2001 - 2003. // (C) Copyright David Abrahams 2002 - 2003. // (C) Copyright Aleksey Gurtovoy 2002. // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org for most recent version. // CodeGear C++ compiler setup: #if !defined( BOOST_WITH_CODEGEAR_WARNINGS ) // these warnings occur frequently in optimized template code # pragma warn -8004 // var assigned value, but never used # pragma warn -8008 // condition always true/false # pragma warn -8066 // dead code can never execute # pragma warn -8104 // static members with ctors not threadsafe # pragma warn -8105 // reference member in class without ctors #endif // // versions check: // last known and checked version is 0x621 #if (__CODEGEARC__ > 0x621) # if defined(BOOST_ASSERT_CONFIG) # error "Unknown compiler version - please run the configure tests and report the results" # else # pragma message( "Unknown compiler version - please run the configure tests and report the results") # endif #endif // CodeGear C++ Builder 2009 #if (__CODEGEARC__ <= 0x613) # define BOOST_NO_INTEGRAL_INT64_T # define BOOST_NO_DEPENDENT_NESTED_DERIVATIONS # define BOOST_NO_PRIVATE_IN_AGGREGATE # define BOOST_NO_USING_DECLARATION_OVERLOADS_FROM_TYPENAME_BASE // we shouldn't really need this - but too many things choke // without it, this needs more investigation: # define BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS # define BOOST_SP_NO_SP_CONVERTIBLE #endif // CodeGear C++ Builder 2010 #if (__CODEGEARC__ <= 0x621) # define BOOST_NO_TYPENAME_WITH_CTOR // Cannot use typename keyword when making temporaries of a dependant type # define BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL # define BOOST_NO_MEMBER_TEMPLATE_FRIENDS # define BOOST_NO_NESTED_FRIENDSHIP // TC1 gives nested classes access rights as any other member # define BOOST_NO_USING_TEMPLATE # define BOOST_NO_TWO_PHASE_NAME_LOOKUP // Temporary hack, until specific MPL preprocessed headers are generated # define BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS // CodeGear has not yet completely implemented value-initialization, for // example for array types, as I reported in 2010: Embarcadero Report 83751, // "Value-initialization: arrays should have each element value-initialized", // http://qc.embarcadero.com/wc/qcmain.aspx?d=83751 // Last checked version: Embarcadero C++ 6.21 // See also: http://www.boost.org/libs/utility/value_init.htm#compiler_issues // (Niels Dekker, LKEB, April 2010) # define BOOST_NO_COMPLETE_VALUE_INITIALIZATION # if defined(NDEBUG) && defined(__cplusplus) // fix broken so that Boost.test works: # include # undef strcmp # endif // fix broken errno declaration: # include # ifndef errno # define errno errno # endif #endif // Reportedly, #pragma once is supported since C++ Builder 2010 #if (__CODEGEARC__ >= 0x620) # define BOOST_HAS_PRAGMA_ONCE #endif // // C++0x macros: // #if (__CODEGEARC__ <= 0x620) #define BOOST_NO_CXX11_STATIC_ASSERT #else #define BOOST_HAS_STATIC_ASSERT #endif #define BOOST_HAS_CHAR16_T #define BOOST_HAS_CHAR32_T #define BOOST_HAS_LONG_LONG // #define BOOST_HAS_ALIGNOF #define BOOST_HAS_DECLTYPE #define BOOST_HAS_EXPLICIT_CONVERSION_OPS // #define BOOST_HAS_RVALUE_REFS #define BOOST_HAS_SCOPED_ENUM // #define BOOST_HAS_STATIC_ASSERT #define BOOST_HAS_STD_TYPE_TRAITS #define BOOST_NO_CXX11_AUTO_DECLARATIONS #define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS #define BOOST_NO_CXX11_CONSTEXPR #define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS #define BOOST_NO_CXX11_DELETED_FUNCTIONS #define BOOST_NO_CXX11_EXTERN_TEMPLATE #define BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS #define BOOST_NO_CXX11_LAMBDAS #define BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS #define BOOST_NO_CXX11_NOEXCEPT #define BOOST_NO_CXX11_NULLPTR #define BOOST_NO_CXX11_RANGE_BASED_FOR #define BOOST_NO_CXX11_RAW_LITERALS #define BOOST_NO_CXX11_RVALUE_REFERENCES #define BOOST_NO_SFINAE_EXPR #define BOOST_NO_CXX11_TEMPLATE_ALIASES #define BOOST_NO_CXX11_UNICODE_LITERALS #define BOOST_NO_CXX11_VARIADIC_TEMPLATES #define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX #define BOOST_NO_CXX11_USER_DEFINED_LITERALS #define BOOST_NO_CXX11_ALIGNAS #define BOOST_NO_CXX11_TRAILING_RESULT_TYPES #define BOOST_NO_CXX11_INLINE_NAMESPACES #define BOOST_NO_CXX11_REF_QUALIFIERS #define BOOST_NO_CXX11_FINAL // C++ 14: #if !defined(__cpp_aggregate_nsdmi) || (__cpp_aggregate_nsdmi < 201304) # define BOOST_NO_CXX14_AGGREGATE_NSDMI #endif #if !defined(__cpp_binary_literals) || (__cpp_binary_literals < 201304) # define BOOST_NO_CXX14_BINARY_LITERALS #endif #if !defined(__cpp_constexpr) || (__cpp_constexpr < 201304) # define BOOST_NO_CXX14_CONSTEXPR #endif #if !defined(__cpp_decltype_auto) || (__cpp_decltype_auto < 201304) # define BOOST_NO_CXX14_DECLTYPE_AUTO #endif #if (__cplusplus < 201304) // There's no SD6 check for this.... # define BOOST_NO_CXX14_DIGIT_SEPARATORS #endif #if !defined(__cpp_generic_lambdas) || (__cpp_generic_lambdas < 201304) # define BOOST_NO_CXX14_GENERIC_LAMBDAS #endif #if !defined(__cpp_init_captures) || (__cpp_init_captures < 201304) # define BOOST_NO_CXX14_INITIALIZED_LAMBDA_CAPTURES #endif #if !defined(__cpp_return_type_deduction) || (__cpp_return_type_deduction < 201304) # define BOOST_NO_CXX14_RETURN_TYPE_DEDUCTION #endif #if !defined(__cpp_variable_templates) || (__cpp_variable_templates < 201304) # define BOOST_NO_CXX14_VARIABLE_TEMPLATES #endif // // TR1 macros: // #define BOOST_HAS_TR1_HASH #define BOOST_HAS_TR1_TYPE_TRAITS #define BOOST_HAS_TR1_UNORDERED_MAP #define BOOST_HAS_TR1_UNORDERED_SET #define BOOST_HAS_MACRO_USE_FACET #define BOOST_NO_CXX11_HDR_INITIALIZER_LIST // On non-Win32 platforms let the platform config figure this out: #ifdef _WIN32 # define BOOST_HAS_STDINT_H #endif // // __int64: // #if !defined(__STRICT_ANSI__) # define BOOST_HAS_MS_INT64 #endif // // check for exception handling support: // #if !defined(_CPPUNWIND) && !defined(BOOST_CPPUNWIND) && !defined(__EXCEPTIONS) && !defined(BOOST_NO_EXCEPTIONS) # define BOOST_NO_EXCEPTIONS #endif // // all versions have a : // #if !defined(__STRICT_ANSI__) # define BOOST_HAS_DIRENT_H #endif // // all versions support __declspec: // #if defined(__STRICT_ANSI__) // config/platform/win32.hpp will define BOOST_SYMBOL_EXPORT, etc., unless already defined # define BOOST_SYMBOL_EXPORT #endif // // ABI fixing headers: // #ifndef BOOST_ABI_PREFIX # define BOOST_ABI_PREFIX "boost/config/abi/borland_prefix.hpp" #endif #ifndef BOOST_ABI_SUFFIX # define BOOST_ABI_SUFFIX "boost/config/abi/borland_suffix.hpp" #endif // // Disable Win32 support in ANSI mode: // # pragma defineonoption BOOST_DISABLE_WIN32 -A // // MSVC compatibility mode does some nasty things: // TODO: look up if this doesn't apply to the whole 12xx range // #if defined(_MSC_VER) && (_MSC_VER <= 1200) # define BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP # define BOOST_NO_VOID_RETURNS #endif #define BOOST_COMPILER "CodeGear C++ version " BOOST_STRINGIZE(__CODEGEARC__) ================================================ FILE: benchmarks/boost/config/compiler/comeau.hpp ================================================ // (C) Copyright John Maddock 2001. // (C) Copyright Douglas Gregor 2001. // (C) Copyright Peter Dimov 2001. // (C) Copyright Aleksey Gurtovoy 2003. // (C) Copyright Beman Dawes 2003. // (C) Copyright Jens Maurer 2003. // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org for most recent version. // Comeau C++ compiler setup: #include "boost/config/compiler/common_edg.hpp" #if (__COMO_VERSION__ <= 4245) # if defined(_MSC_VER) && _MSC_VER <= 1300 # if _MSC_VER > 100 // only set this in non-strict mode: # define BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP # endif # endif // Void returns don't work when emulating VC 6 (Peter Dimov) // TODO: look up if this doesn't apply to the whole 12xx range # if defined(_MSC_VER) && (_MSC_VER < 1300) # define BOOST_NO_VOID_RETURNS # endif #endif // version 4245 // // enable __int64 support in VC emulation mode // # if defined(_MSC_VER) && (_MSC_VER >= 1200) # define BOOST_HAS_MS_INT64 # endif #define BOOST_COMPILER "Comeau compiler version " BOOST_STRINGIZE(__COMO_VERSION__) // // versions check: // we don't know Comeau prior to version 4245: #if __COMO_VERSION__ < 4245 # error "Compiler not configured - please reconfigure" #endif // // last known and checked version is 4245: #if (__COMO_VERSION__ > 4245) # if defined(BOOST_ASSERT_CONFIG) # error "Unknown compiler version - please run the configure tests and report the results" # endif #endif ================================================ FILE: benchmarks/boost/config/compiler/common_edg.hpp ================================================ // (C) Copyright John Maddock 2001 - 2002. // (C) Copyright Jens Maurer 2001. // (C) Copyright David Abrahams 2002. // (C) Copyright Aleksey Gurtovoy 2002. // (C) Copyright Markus Schoepflin 2005. // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org for most recent version. // // Options common to all edg based compilers. // // This is included from within the individual compiler mini-configs. #ifndef __EDG_VERSION__ # error This file requires that __EDG_VERSION__ be defined. #endif #if (__EDG_VERSION__ <= 238) # define BOOST_NO_INTEGRAL_INT64_T # define BOOST_NO_SFINAE #endif #if (__EDG_VERSION__ <= 240) # define BOOST_NO_VOID_RETURNS #endif #if (__EDG_VERSION__ <= 241) && !defined(BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP) # define BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP #endif #if (__EDG_VERSION__ <= 244) && !defined(BOOST_NO_TEMPLATE_TEMPLATES) # define BOOST_NO_TEMPLATE_TEMPLATES #endif #if (__EDG_VERSION__ < 300) && !defined(BOOST_NO_IS_ABSTRACT) # define BOOST_NO_IS_ABSTRACT #endif #if (__EDG_VERSION__ <= 303) && !defined(BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL) # define BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL #endif // See also kai.hpp which checks a Kai-specific symbol for EH # if !defined(__KCC) && !defined(__EXCEPTIONS) && !defined(BOOST_NO_EXCEPTIONS) # define BOOST_NO_EXCEPTIONS # endif # if !defined(__NO_LONG_LONG) # define BOOST_HAS_LONG_LONG # else # define BOOST_NO_LONG_LONG # endif // Not sure what version was the first to support #pragma once, but // different EDG-based compilers (e.g. Intel) supported it for ages. // Add a proper version check if it causes problems. #define BOOST_HAS_PRAGMA_ONCE // // C++0x features // // See above for BOOST_NO_LONG_LONG // #if (__EDG_VERSION__ < 310) # define BOOST_NO_CXX11_EXTERN_TEMPLATE #endif #if (__EDG_VERSION__ <= 310) // No support for initializer lists # define BOOST_NO_CXX11_HDR_INITIALIZER_LIST #endif #if (__EDG_VERSION__ < 400) # define BOOST_NO_CXX11_VARIADIC_MACROS #endif #define BOOST_NO_CXX11_AUTO_DECLARATIONS #define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS #define BOOST_NO_CXX11_CHAR16_T #define BOOST_NO_CXX11_CHAR32_T #define BOOST_NO_CXX11_CONSTEXPR #define BOOST_NO_CXX11_DECLTYPE #define BOOST_NO_CXX11_DECLTYPE_N3276 #define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS #define BOOST_NO_CXX11_DELETED_FUNCTIONS #define BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS #define BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS #define BOOST_NO_CXX11_LAMBDAS #define BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS #define BOOST_NO_CXX11_NOEXCEPT #define BOOST_NO_CXX11_NULLPTR #define BOOST_NO_CXX11_RANGE_BASED_FOR #define BOOST_NO_CXX11_RAW_LITERALS #define BOOST_NO_CXX11_RVALUE_REFERENCES #define BOOST_NO_CXX11_SCOPED_ENUMS #define BOOST_NO_SFINAE_EXPR #define BOOST_NO_CXX11_STATIC_ASSERT #define BOOST_NO_CXX11_TEMPLATE_ALIASES #define BOOST_NO_CXX11_UNICODE_LITERALS #define BOOST_NO_CXX11_VARIADIC_TEMPLATES #define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX #define BOOST_NO_CXX11_USER_DEFINED_LITERALS #define BOOST_NO_CXX11_ALIGNAS #define BOOST_NO_CXX11_TRAILING_RESULT_TYPES #define BOOST_NO_CXX11_INLINE_NAMESPACES #define BOOST_NO_CXX11_REF_QUALIFIERS #define BOOST_NO_CXX11_FINAL // C++ 14: #if !defined(__cpp_aggregate_nsdmi) || (__cpp_aggregate_nsdmi < 201304) # define BOOST_NO_CXX14_AGGREGATE_NSDMI #endif #if !defined(__cpp_binary_literals) || (__cpp_binary_literals < 201304) # define BOOST_NO_CXX14_BINARY_LITERALS #endif #if !defined(__cpp_constexpr) || (__cpp_constexpr < 201304) # define BOOST_NO_CXX14_CONSTEXPR #endif #if !defined(__cpp_decltype_auto) || (__cpp_decltype_auto < 201304) # define BOOST_NO_CXX14_DECLTYPE_AUTO #endif #if (__cplusplus < 201304) // There's no SD6 check for this.... # define BOOST_NO_CXX14_DIGIT_SEPARATORS #endif #if !defined(__cpp_generic_lambdas) || (__cpp_generic_lambdas < 201304) # define BOOST_NO_CXX14_GENERIC_LAMBDAS #endif #if !defined(__cpp_init_captures) || (__cpp_init_captures < 201304) # define BOOST_NO_CXX14_INITIALIZED_LAMBDA_CAPTURES #endif #if !defined(__cpp_return_type_deduction) || (__cpp_return_type_deduction < 201304) # define BOOST_NO_CXX14_RETURN_TYPE_DEDUCTION #endif #if !defined(__cpp_variable_templates) || (__cpp_variable_templates < 201304) # define BOOST_NO_CXX14_VARIABLE_TEMPLATES #endif #ifdef c_plusplus // EDG has "long long" in non-strict mode // However, some libraries have insufficient "long long" support // #define BOOST_HAS_LONG_LONG #endif ================================================ FILE: benchmarks/boost/config/compiler/compaq_cxx.hpp ================================================ // (C) Copyright John Maddock 2001 - 2003. // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org for most recent version. // Tru64 C++ compiler setup (now HP): #define BOOST_COMPILER "HP Tru64 C++ " BOOST_STRINGIZE(__DECCXX_VER) #include "boost/config/compiler/common_edg.hpp" // // versions check: // Nothing to do here? ================================================ FILE: benchmarks/boost/config/compiler/cray.hpp ================================================ // (C) Copyright John Maddock 2011. // (C) Copyright Cray, Inc. 2013 // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org for most recent version. // Greenhills C compiler setup: #define BOOST_COMPILER "Cray C version " BOOST_STRINGIZE(_RELEASE) #if _RELEASE < 8 # error "Boost is not configured for Cray compilers prior to version 8, please try the configure script." #endif // // Check this is a recent EDG based compiler, otherwise we don't support it here: // #ifndef __EDG_VERSION__ # error "Unsupported Cray compiler, please try running the configure script." #endif #include "boost/config/compiler/common_edg.hpp" // // #define BOOST_NO_CXX11_STATIC_ASSERT #define BOOST_NO_CXX11_AUTO_DECLARATIONS #define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS #define BOOST_HAS_NRVO #define BOOST_NO_CXX11_VARIADIC_MACROS #define BOOST_NO_CXX11_VARIADIC_TEMPLATES #define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX #define BOOST_NO_CXX11_UNICODE_LITERALS #define BOOST_NO_TWO_PHASE_NAME_LOOKUP #define BOOST_HAS_NRVO #define BOOST_NO_CXX11_TEMPLATE_ALIASES #define BOOST_NO_CXX11_STATIC_ASSERT #define BOOST_NO_SFINAE_EXPR #define BOOST_NO_CXX11_SCOPED_ENUMS #define BOOST_NO_CXX11_RVALUE_REFERENCES #define BOOST_NO_CXX11_RANGE_BASED_FOR #define BOOST_NO_CXX11_RAW_LITERALS #define BOOST_NO_CXX11_NULLPTR #define BOOST_NO_CXX11_NOEXCEPT #define BOOST_NO_CXX11_LAMBDAS #define BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS #define BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS #define BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS #define BOOST_NO_CXX11_DELETED_FUNCTIONS #define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS #define BOOST_NO_CXX11_DECLTYPE_N3276 #define BOOST_NO_CXX11_DECLTYPE #define BOOST_NO_CXX11_CONSTEXPR #define BOOST_NO_CXX11_USER_DEFINED_LITERALS #define BOOST_NO_COMPLETE_VALUE_INITIALIZATION #define BOOST_NO_CXX11_CHAR32_T #define BOOST_NO_CXX11_CHAR16_T #define BOOST_NO_CXX11_REF_QUALIFIERS #define BOOST_NO_CXX11_FINAL //#define BOOST_BCB_PARTIAL_SPECIALIZATION_BUG #define BOOST_MATH_DISABLE_STD_FPCLASSIFY //#define BOOST_HAS_FPCLASSIFY #define BOOST_SP_USE_PTHREADS #define BOOST_AC_USE_PTHREADS /* everything that follows is working around what are thought to be * compiler shortcomings. Revist all of these regularly. */ //#define BOOST_USE_ENUM_STATIC_ASSERT //#define BOOST_BUGGY_INTEGRAL_CONSTANT_EXPRESSIONS //(this may be implied by the previous #define // These constants should be provided by the // compiler, at least when -hgnu is asserted on the command line. #ifndef __ATOMIC_RELAXED #define __ATOMIC_RELAXED 0 #define __ATOMIC_CONSUME 1 #define __ATOMIC_ACQUIRE 2 #define __ATOMIC_RELEASE 3 #define __ATOMIC_ACQ_REL 4 #define __ATOMIC_SEQ_CST 5 #endif ================================================ FILE: benchmarks/boost/config/compiler/digitalmars.hpp ================================================ // Copyright (C) Christof Meerwald 2003 // Copyright (C) Dan Watkins 2003 // // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // Digital Mars C++ compiler setup: #define BOOST_COMPILER __DMC_VERSION_STRING__ #define BOOST_HAS_LONG_LONG #define BOOST_HAS_PRAGMA_ONCE #if !defined(BOOST_STRICT_CONFIG) #define BOOST_NO_MEMBER_TEMPLATE_FRIENDS #define BOOST_NO_OPERATORS_IN_NAMESPACE #define BOOST_NO_UNREACHABLE_RETURN_DETECTION #define BOOST_NO_SFINAE #define BOOST_NO_USING_TEMPLATE #define BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL #endif // // has macros: #define BOOST_HAS_DIRENT_H #define BOOST_HAS_STDINT_H #define BOOST_HAS_WINTHREADS #if (__DMC__ >= 0x847) #define BOOST_HAS_EXPM1 #define BOOST_HAS_LOG1P #endif // // Is this really the best way to detect whether the std lib is in namespace std? // #ifdef __cplusplus #include #endif #if !defined(__STL_IMPORT_VENDOR_CSTD) && !defined(_STLP_IMPORT_VENDOR_CSTD) # define BOOST_NO_STDC_NAMESPACE #endif // check for exception handling support: #if !defined(_CPPUNWIND) && !defined(BOOST_NO_EXCEPTIONS) # define BOOST_NO_EXCEPTIONS #endif // // C++0x features // #define BOOST_NO_CXX11_AUTO_DECLARATIONS #define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS #define BOOST_NO_CXX11_CHAR16_T #define BOOST_NO_CXX11_CHAR32_T #define BOOST_NO_CXX11_CONSTEXPR #define BOOST_NO_CXX11_DECLTYPE #define BOOST_NO_CXX11_DECLTYPE_N3276 #define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS #define BOOST_NO_CXX11_DELETED_FUNCTIONS #define BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS #define BOOST_NO_CXX11_EXTERN_TEMPLATE #define BOOST_NO_CXX11_HDR_INITIALIZER_LIST #define BOOST_NO_CXX11_LAMBDAS #define BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS #define BOOST_NO_CXX11_NOEXCEPT #define BOOST_NO_CXX11_NULLPTR #define BOOST_NO_CXX11_RANGE_BASED_FOR #define BOOST_NO_CXX11_RAW_LITERALS #define BOOST_NO_CXX11_RVALUE_REFERENCES #define BOOST_NO_CXX11_SCOPED_ENUMS #define BOOST_NO_SFINAE_EXPR #define BOOST_NO_CXX11_STATIC_ASSERT #define BOOST_NO_CXX11_TEMPLATE_ALIASES #define BOOST_NO_CXX11_UNICODE_LITERALS #define BOOST_NO_CXX11_VARIADIC_TEMPLATES #define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX #define BOOST_NO_CXX11_USER_DEFINED_LITERALS #define BOOST_NO_CXX11_ALIGNAS #define BOOST_NO_CXX11_TRAILING_RESULT_TYPES #define BOOST_NO_CXX11_INLINE_NAMESPACES #define BOOST_NO_CXX11_REF_QUALIFIERS #define BOOST_NO_CXX11_FINAL // C++ 14: #if !defined(__cpp_aggregate_nsdmi) || (__cpp_aggregate_nsdmi < 201304) # define BOOST_NO_CXX14_AGGREGATE_NSDMI #endif #if !defined(__cpp_binary_literals) || (__cpp_binary_literals < 201304) # define BOOST_NO_CXX14_BINARY_LITERALS #endif #if !defined(__cpp_constexpr) || (__cpp_constexpr < 201304) # define BOOST_NO_CXX14_CONSTEXPR #endif #if !defined(__cpp_decltype_auto) || (__cpp_decltype_auto < 201304) # define BOOST_NO_CXX14_DECLTYPE_AUTO #endif #if (__cplusplus < 201304) // There's no SD6 check for this.... # define BOOST_NO_CXX14_DIGIT_SEPARATORS #endif #if !defined(__cpp_generic_lambdas) || (__cpp_generic_lambdas < 201304) # define BOOST_NO_CXX14_GENERIC_LAMBDAS #endif #if !defined(__cpp_init_captures) || (__cpp_init_captures < 201304) # define BOOST_NO_CXX14_INITIALIZED_LAMBDA_CAPTURES #endif #if !defined(__cpp_return_type_deduction) || (__cpp_return_type_deduction < 201304) # define BOOST_NO_CXX14_RETURN_TYPE_DEDUCTION #endif #if !defined(__cpp_variable_templates) || (__cpp_variable_templates < 201304) # define BOOST_NO_CXX14_VARIABLE_TEMPLATES #endif #if (__DMC__ <= 0x840) #error "Compiler not supported or configured - please reconfigure" #endif // // last known and checked version is ...: #if (__DMC__ > 0x848) # if defined(BOOST_ASSERT_CONFIG) # error "Unknown compiler version - please run the configure tests and report the results" # endif #endif ================================================ FILE: benchmarks/boost/config/compiler/gcc.hpp ================================================ // (C) Copyright John Maddock 2001 - 2003. // (C) Copyright Darin Adler 2001 - 2002. // (C) Copyright Jens Maurer 2001 - 2002. // (C) Copyright Beman Dawes 2001 - 2003. // (C) Copyright Douglas Gregor 2002. // (C) Copyright David Abrahams 2002 - 2003. // (C) Copyright Synge Todo 2003. // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org for most recent version. // GNU C++ compiler setup. // // Define BOOST_GCC so we know this is "real" GCC and not some pretender: // #define BOOST_GCC_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) #if !defined(__CUDACC__) #define BOOST_GCC BOOST_GCC_VERSION #endif #if defined(__GXX_EXPERIMENTAL_CXX0X__) || (__cplusplus >= 201103L) # define BOOST_GCC_CXX11 #endif #if __GNUC__ == 3 # if defined (__PATHSCALE__) # define BOOST_NO_TWO_PHASE_NAME_LOOKUP # define BOOST_NO_IS_ABSTRACT # endif # if __GNUC_MINOR__ < 4 # define BOOST_NO_IS_ABSTRACT # endif # define BOOST_NO_CXX11_EXTERN_TEMPLATE #endif #if __GNUC__ < 4 // // All problems to gcc-3.x and earlier here: // #define BOOST_NO_TWO_PHASE_NAME_LOOKUP # ifdef __OPEN64__ # define BOOST_NO_IS_ABSTRACT # endif #endif // GCC prior to 3.4 had #pragma once too but it didn't work well with filesystem links #if BOOST_GCC_VERSION >= 30400 #define BOOST_HAS_PRAGMA_ONCE #endif #if BOOST_GCC_VERSION < 40400 // Previous versions of GCC did not completely implement value-initialization: // GCC Bug 30111, "Value-initialization of POD base class doesn't initialize // members", reported by Jonathan Wakely in 2006, // http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30111 (fixed for GCC 4.4) // GCC Bug 33916, "Default constructor fails to initialize array members", // reported by Michael Elizabeth Chastain in 2007, // http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33916 (fixed for GCC 4.2.4) // See also: http://www.boost.org/libs/utility/value_init.htm#compiler_issues #define BOOST_NO_COMPLETE_VALUE_INITIALIZATION #endif #if !defined(__EXCEPTIONS) && !defined(BOOST_NO_EXCEPTIONS) # define BOOST_NO_EXCEPTIONS #endif // // Threading support: Turn this on unconditionally here (except for // those platforms where we can know for sure). It will get turned off again // later if no threading API is detected. // #if !defined(__MINGW32__) && !defined(linux) && !defined(__linux) && !defined(__linux__) # define BOOST_HAS_THREADS #endif // // gcc has "long long" // Except on Darwin with standard compliance enabled (-pedantic) // Apple gcc helpfully defines this macro we can query // #if !defined(__DARWIN_NO_LONG_LONG) # define BOOST_HAS_LONG_LONG #endif // // gcc implements the named return value optimization since version 3.1 // #define BOOST_HAS_NRVO // Branch prediction hints #define BOOST_LIKELY(x) __builtin_expect(x, 1) #define BOOST_UNLIKELY(x) __builtin_expect(x, 0) // // Dynamic shared object (DSO) and dynamic-link library (DLL) support // #if __GNUC__ >= 4 # if (defined(_WIN32) || defined(__WIN32__) || defined(WIN32)) && !defined(__CYGWIN__) // All Win32 development environments, including 64-bit Windows and MinGW, define // _WIN32 or one of its variant spellings. Note that Cygwin is a POSIX environment, // so does not define _WIN32 or its variants. # define BOOST_HAS_DECLSPEC # define BOOST_SYMBOL_EXPORT __attribute__((__dllexport__)) # define BOOST_SYMBOL_IMPORT __attribute__((__dllimport__)) # else # define BOOST_SYMBOL_EXPORT __attribute__((__visibility__("default"))) # define BOOST_SYMBOL_IMPORT # endif # define BOOST_SYMBOL_VISIBLE __attribute__((__visibility__("default"))) #else // config/platform/win32.hpp will define BOOST_SYMBOL_EXPORT, etc., unless already defined # define BOOST_SYMBOL_EXPORT #endif // // RTTI and typeinfo detection is possible post gcc-4.3: // #if BOOST_GCC_VERSION > 40300 # ifndef __GXX_RTTI # ifndef BOOST_NO_TYPEID # define BOOST_NO_TYPEID # endif # ifndef BOOST_NO_RTTI # define BOOST_NO_RTTI # endif # endif #endif // // Recent GCC versions have __int128 when in 64-bit mode. // // We disable this if the compiler is really nvcc as it // doesn't actually support __int128 as of CUDA_VERSION=5000 // even though it defines __SIZEOF_INT128__. // See https://svn.boost.org/trac/boost/ticket/8048 // Only re-enable this for nvcc if you're absolutely sure // of the circumstances under which it's supported: // #if defined(__SIZEOF_INT128__) && !defined(__CUDACC__) # define BOOST_HAS_INT128 #endif // // Recent GCC versions have a __float128 native type, we need to // include a std lib header to detect this - not ideal, but we'll // be including later anyway when we select the std lib. // #ifdef __cplusplus #include #else #include #endif #if defined(_GLIBCXX_USE_FLOAT128) && !defined(__STRICT_ANSI__) # define BOOST_HAS_FLOAT128 #endif // C++0x features in 4.3.n and later // #if (BOOST_GCC_VERSION >= 40300) && defined(BOOST_GCC_CXX11) // C++0x features are only enabled when -std=c++0x or -std=gnu++0x are // passed on the command line, which in turn defines // __GXX_EXPERIMENTAL_CXX0X__. # define BOOST_HAS_DECLTYPE # define BOOST_HAS_RVALUE_REFS # define BOOST_HAS_STATIC_ASSERT # define BOOST_HAS_VARIADIC_TMPL #else # define BOOST_NO_CXX11_DECLTYPE # define BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS # define BOOST_NO_CXX11_RVALUE_REFERENCES # define BOOST_NO_CXX11_STATIC_ASSERT #endif // C++0x features in 4.4.n and later // #if (BOOST_GCC_VERSION < 40400) || !defined(BOOST_GCC_CXX11) # define BOOST_NO_CXX11_AUTO_DECLARATIONS # define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS # define BOOST_NO_CXX11_CHAR16_T # define BOOST_NO_CXX11_CHAR32_T # define BOOST_NO_CXX11_HDR_INITIALIZER_LIST # define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS # define BOOST_NO_CXX11_DELETED_FUNCTIONS # define BOOST_NO_CXX11_TRAILING_RESULT_TYPES # define BOOST_NO_CXX11_INLINE_NAMESPACES # define BOOST_NO_CXX11_VARIADIC_TEMPLATES #endif #if BOOST_GCC_VERSION < 40500 # define BOOST_NO_SFINAE_EXPR #endif // GCC 4.5 forbids declaration of defaulted functions in private or protected sections #if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ == 5) || !defined(BOOST_GCC_CXX11) # define BOOST_NO_CXX11_NON_PUBLIC_DEFAULTED_FUNCTIONS #endif // C++0x features in 4.5.0 and later // #if (BOOST_GCC_VERSION < 40500) || !defined(BOOST_GCC_CXX11) # define BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS # define BOOST_NO_CXX11_LAMBDAS # define BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS # define BOOST_NO_CXX11_RAW_LITERALS # define BOOST_NO_CXX11_UNICODE_LITERALS #endif // C++0x features in 4.5.1 and later // #if (BOOST_GCC_VERSION < 40501) || !defined(BOOST_GCC_CXX11) // scoped enums have a serious bug in 4.4.0, so define BOOST_NO_CXX11_SCOPED_ENUMS before 4.5.1 // See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38064 # define BOOST_NO_CXX11_SCOPED_ENUMS #endif // C++0x features in 4.6.n and later // #if (BOOST_GCC_VERSION < 40600) || !defined(BOOST_GCC_CXX11) #define BOOST_NO_CXX11_CONSTEXPR #define BOOST_NO_CXX11_NOEXCEPT #define BOOST_NO_CXX11_NULLPTR #define BOOST_NO_CXX11_RANGE_BASED_FOR #define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX #endif // C++0x features in 4.7.n and later // #if (BOOST_GCC_VERSION < 40700) || !defined(BOOST_GCC_CXX11) # define BOOST_NO_CXX11_FINAL # define BOOST_NO_CXX11_TEMPLATE_ALIASES # define BOOST_NO_CXX11_USER_DEFINED_LITERALS # define BOOST_NO_CXX11_FIXED_LENGTH_VARIADIC_TEMPLATE_EXPANSION_PACKS #endif // C++0x features in 4.8.n and later // #if (BOOST_GCC_VERSION < 40800) || !defined(BOOST_GCC_CXX11) # define BOOST_NO_CXX11_ALIGNAS #endif // C++0x features in 4.8.1 and later // #if (BOOST_GCC_VERSION < 40801) || !defined(BOOST_GCC_CXX11) # define BOOST_NO_CXX11_DECLTYPE_N3276 # define BOOST_NO_CXX11_REF_QUALIFIERS # define BOOST_NO_CXX14_BINARY_LITERALS #endif // C++14 features in 4.9.0 and later // #if (BOOST_GCC_VERSION < 40900) || (__cplusplus < 201300) # define BOOST_NO_CXX14_RETURN_TYPE_DEDUCTION # define BOOST_NO_CXX14_GENERIC_LAMBDAS # define BOOST_NO_CXX14_DIGIT_SEPARATORS # define BOOST_NO_CXX14_DECLTYPE_AUTO # if !((BOOST_GCC_VERSION >= 40801) && (BOOST_GCC_VERSION < 40900) && defined(BOOST_GCC_CXX11)) # define BOOST_NO_CXX14_INITIALIZED_LAMBDA_CAPTURES # endif #endif // C++ 14: #if !defined(__cpp_aggregate_nsdmi) || (__cpp_aggregate_nsdmi < 201304) # define BOOST_NO_CXX14_AGGREGATE_NSDMI #endif #if !defined(__cpp_constexpr) || (__cpp_constexpr < 201304) # define BOOST_NO_CXX14_CONSTEXPR #endif #if !defined(__cpp_variable_templates) || (__cpp_variable_templates < 201304) # define BOOST_NO_CXX14_VARIABLE_TEMPLATES #endif // // Unused attribute: #if __GNUC__ >= 4 # define BOOST_ATTRIBUTE_UNUSED __attribute__((__unused__)) #endif // // __builtin_unreachable: #if BOOST_GCC_VERSION >= 40800 #define BOOST_UNREACHABLE_RETURN(x) __builtin_unreachable(); #endif #ifndef BOOST_COMPILER # define BOOST_COMPILER "GNU C++ version " __VERSION__ #endif // ConceptGCC compiler: // http://www.generic-programming.org/software/ConceptGCC/ #ifdef __GXX_CONCEPTS__ # define BOOST_HAS_CONCEPTS # define BOOST_COMPILER "ConceptGCC version " __VERSION__ #endif // versions check: // we don't know gcc prior to version 3.30: #if (BOOST_GCC_VERSION< 30300) # error "Compiler not configured - please reconfigure" #endif // // last known and checked version is 4.9: #if (BOOST_GCC_VERSION > 40900) # if defined(BOOST_ASSERT_CONFIG) # error "Unknown compiler version - please run the configure tests and report the results" # else // we don't emit warnings here anymore since there are no defect macros defined for // gcc post 3.4, so any failures are gcc regressions... //# warning "Unknown compiler version - please run the configure tests and report the results" # endif #endif ================================================ FILE: benchmarks/boost/config/compiler/gcc_xml.hpp ================================================ // (C) Copyright John Maddock 2006. // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org for most recent version. // GCC-XML C++ compiler setup: # if !defined(__GCCXML_GNUC__) || ((__GCCXML_GNUC__ <= 3) && (__GCCXML_GNUC_MINOR__ <= 3)) # define BOOST_NO_IS_ABSTRACT # endif // // Threading support: Turn this on unconditionally here (except for // those platforms where we can know for sure). It will get turned off again // later if no threading API is detected. // #if !defined(__MINGW32__) && !defined(_MSC_VER) && !defined(linux) && !defined(__linux) && !defined(__linux__) # define BOOST_HAS_THREADS #endif // // gcc has "long long" // #define BOOST_HAS_LONG_LONG // C++0x features: // # define BOOST_NO_CXX11_CONSTEXPR # define BOOST_NO_CXX11_NULLPTR # define BOOST_NO_CXX11_TEMPLATE_ALIASES # define BOOST_NO_CXX11_DECLTYPE # define BOOST_NO_CXX11_DECLTYPE_N3276 # define BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS # define BOOST_NO_CXX11_RVALUE_REFERENCES # define BOOST_NO_CXX11_STATIC_ASSERT # define BOOST_NO_CXX11_VARIADIC_TEMPLATES # define BOOST_NO_CXX11_VARIADIC_MACROS # define BOOST_NO_CXX11_AUTO_DECLARATIONS # define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS # define BOOST_NO_CXX11_CHAR16_T # define BOOST_NO_CXX11_CHAR32_T # define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS # define BOOST_NO_CXX11_DELETED_FUNCTIONS # define BOOST_NO_CXX11_HDR_INITIALIZER_LIST # define BOOST_NO_CXX11_SCOPED_ENUMS # define BOOST_NO_SFINAE_EXPR # define BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS # define BOOST_NO_CXX11_LAMBDAS # define BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS # define BOOST_NO_CXX11_RANGE_BASED_FOR # define BOOST_NO_CXX11_RAW_LITERALS # define BOOST_NO_CXX11_UNICODE_LITERALS # define BOOST_NO_CXX11_NOEXCEPT # define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX # define BOOST_NO_CXX11_USER_DEFINED_LITERALS # define BOOST_NO_CXX11_ALIGNAS # define BOOST_NO_CXX11_TRAILING_RESULT_TYPES # define BOOST_NO_CXX11_INLINE_NAMESPACES # define BOOST_NO_CXX11_REF_QUALIFIERS #define BOOST_NO_CXX11_FINAL // C++ 14: #if !defined(__cpp_aggregate_nsdmi) || (__cpp_aggregate_nsdmi < 201304) # define BOOST_NO_CXX14_AGGREGATE_NSDMI #endif #if !defined(__cpp_binary_literals) || (__cpp_binary_literals < 201304) # define BOOST_NO_CXX14_BINARY_LITERALS #endif #if !defined(__cpp_constexpr) || (__cpp_constexpr < 201304) # define BOOST_NO_CXX14_CONSTEXPR #endif #if !defined(__cpp_decltype_auto) || (__cpp_decltype_auto < 201304) # define BOOST_NO_CXX14_DECLTYPE_AUTO #endif #if (__cplusplus < 201304) // There's no SD6 check for this.... # define BOOST_NO_CXX14_DIGIT_SEPARATORS #endif #if !defined(__cpp_generic_lambdas) || (__cpp_generic_lambdas < 201304) # define BOOST_NO_CXX14_GENERIC_LAMBDAS #endif #if !defined(__cpp_init_captures) || (__cpp_init_captures < 201304) # define BOOST_NO_CXX14_INITIALIZED_LAMBDA_CAPTURES #endif #if !defined(__cpp_return_type_deduction) || (__cpp_return_type_deduction < 201304) # define BOOST_NO_CXX14_RETURN_TYPE_DEDUCTION #endif #if !defined(__cpp_variable_templates) || (__cpp_variable_templates < 201304) # define BOOST_NO_CXX14_VARIABLE_TEMPLATES #endif #define BOOST_COMPILER "GCC-XML C++ version " __GCCXML__ ================================================ FILE: benchmarks/boost/config/compiler/greenhills.hpp ================================================ // (C) Copyright John Maddock 2001. // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org for most recent version. // Greenhills C++ compiler setup: #define BOOST_COMPILER "Greenhills C++ version " BOOST_STRINGIZE(__ghs) #include "boost/config/compiler/common_edg.hpp" // // versions check: // we don't support Greenhills prior to version 0: #if __ghs < 0 # error "Compiler not supported or configured - please reconfigure" #endif // // last known and checked version is 0: #if (__ghs > 0) # if defined(BOOST_ASSERT_CONFIG) # error "Unknown compiler version - please run the configure tests and report the results" # endif #endif ================================================ FILE: benchmarks/boost/config/compiler/hp_acc.hpp ================================================ // (C) Copyright John Maddock 2001 - 2003. // (C) Copyright Jens Maurer 2001 - 2003. // (C) Copyright Aleksey Gurtovoy 2002. // (C) Copyright David Abrahams 2002 - 2003. // (C) Copyright Toon Knapen 2003. // (C) Copyright Boris Gubenko 2006 - 2007. // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org for most recent version. // HP aCC C++ compiler setup: #if defined(__EDG__) #include "boost/config/compiler/common_edg.hpp" #endif #if (__HP_aCC <= 33100) # define BOOST_NO_INTEGRAL_INT64_T # define BOOST_NO_OPERATORS_IN_NAMESPACE # if !defined(_NAMESPACE_STD) # define BOOST_NO_STD_LOCALE # define BOOST_NO_STRINGSTREAM # endif #endif #if (__HP_aCC <= 33300) // member templates are sufficiently broken that we disable them for now # define BOOST_NO_MEMBER_TEMPLATES # define BOOST_NO_DEPENDENT_NESTED_DERIVATIONS # define BOOST_NO_USING_DECLARATION_OVERLOADS_FROM_TYPENAME_BASE #endif #if (__HP_aCC <= 38000) # define BOOST_NO_TWO_PHASE_NAME_LOOKUP #endif #if (__HP_aCC > 50000) && (__HP_aCC < 60000) # define BOOST_NO_UNREACHABLE_RETURN_DETECTION # define BOOST_NO_TEMPLATE_TEMPLATES # define BOOST_NO_SWPRINTF # define BOOST_NO_DEPENDENT_TYPES_IN_TEMPLATE_VALUE_PARAMETERS # define BOOST_NO_IS_ABSTRACT # define BOOST_NO_MEMBER_TEMPLATE_FRIENDS #endif // optional features rather than defects: #if (__HP_aCC >= 33900) # define BOOST_HAS_LONG_LONG # define BOOST_HAS_PARTIAL_STD_ALLOCATOR #endif #if (__HP_aCC >= 50000 ) && (__HP_aCC <= 53800 ) || (__HP_aCC < 31300 ) # define BOOST_NO_MEMBER_TEMPLATE_KEYWORD #endif // This macro should not be defined when compiling in strict ansi // mode, but, currently, we don't have the ability to determine // what standard mode we are compiling with. Some future version // of aCC6 compiler will provide predefined macros reflecting the // compilation options, including the standard mode. #if (__HP_aCC >= 60000) || ((__HP_aCC > 38000) && defined(__hpxstd98)) # define BOOST_NO_TWO_PHASE_NAME_LOOKUP #endif #define BOOST_COMPILER "HP aCC version " BOOST_STRINGIZE(__HP_aCC) // // versions check: // we don't support HP aCC prior to version 33000: #if __HP_aCC < 33000 # error "Compiler not supported or configured - please reconfigure" #endif // // Extended checks for supporting aCC on PA-RISC #if __HP_aCC > 30000 && __HP_aCC < 50000 # if __HP_aCC < 38000 // versions prior to version A.03.80 not supported # error "Compiler version not supported - version A.03.80 or higher is required" # elif !defined(__hpxstd98) // must compile using the option +hpxstd98 with version A.03.80 and above # error "Compiler option '+hpxstd98' is required for proper support" # endif //PA-RISC #endif // // C++0x features // // See boost\config\suffix.hpp for BOOST_NO_LONG_LONG // #if !defined(__EDG__) #define BOOST_NO_CXX11_AUTO_DECLARATIONS #define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS #define BOOST_NO_CXX11_CHAR16_T #define BOOST_NO_CXX11_CHAR32_T #define BOOST_NO_CXX11_CONSTEXPR #define BOOST_NO_CXX11_DECLTYPE #define BOOST_NO_CXX11_DECLTYPE_N3276 #define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS #define BOOST_NO_CXX11_DELETED_FUNCTIONS #define BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS #define BOOST_NO_CXX11_EXTERN_TEMPLATE #define BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS #define BOOST_NO_CXX11_HDR_INITIALIZER_LIST #define BOOST_NO_CXX11_LAMBDAS #define BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS #define BOOST_NO_CXX11_NOEXCEPT #define BOOST_NO_CXX11_NULLPTR #define BOOST_NO_CXX11_RANGE_BASED_FOR #define BOOST_NO_CXX11_RAW_LITERALS #define BOOST_NO_CXX11_RVALUE_REFERENCES #define BOOST_NO_CXX11_SCOPED_ENUMS #define BOOST_NO_SFINAE_EXPR #define BOOST_NO_CXX11_STATIC_ASSERT #define BOOST_NO_CXX11_TEMPLATE_ALIASES #define BOOST_NO_CXX11_UNICODE_LITERALS #define BOOST_NO_CXX11_VARIADIC_TEMPLATES #define BOOST_NO_CXX11_USER_DEFINED_LITERALS #define BOOST_NO_CXX11_ALIGNAS #define BOOST_NO_CXX11_TRAILING_RESULT_TYPES #define BOOST_NO_CXX11_INLINE_NAMESPACES #define BOOST_NO_CXX11_REF_QUALIFIERS /* See https://forums13.itrc.hp.com/service/forums/questionanswer.do?threadId=1443331 and https://forums13.itrc.hp.com/service/forums/questionanswer.do?threadId=1443436 */ #if (__HP_aCC < 62500) || !defined(HP_CXX0x_SOURCE) #define BOOST_NO_CXX11_VARIADIC_MACROS #endif #endif // // last known and checked version for HP-UX/ia64 is 61300 // last known and checked version for PA-RISC is 38000 #if ((__HP_aCC > 61300) || ((__HP_aCC > 38000) && defined(__hpxstd98))) # if defined(BOOST_ASSERT_CONFIG) # error "Unknown compiler version - please run the configure tests and report the results" # endif #endif ================================================ FILE: benchmarks/boost/config/compiler/intel.hpp ================================================ // (C) Copyright John Maddock 2001-8. // (C) Copyright Peter Dimov 2001. // (C) Copyright Jens Maurer 2001. // (C) Copyright David Abrahams 2002 - 2003. // (C) Copyright Aleksey Gurtovoy 2002 - 2003. // (C) Copyright Guillaume Melquiond 2002 - 2003. // (C) Copyright Beman Dawes 2003. // (C) Copyright Martin Wille 2003. // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org for most recent version. // Intel compiler setup: #if defined(__INTEL_COMPILER) && (__INTEL_COMPILER >= 1500) && (defined(_MSC_VER) || defined(__GNUC__)) #ifdef _MSC_VER #include #undef BOOST_MSVC #undef BOOST_MSVC_FULL_VER #if (__INTEL_COMPILER >= 1500) && (_MSC_VER >= 1900) // // These appear to be supported, even though VC++ may not support them: // #define BOOST_HAS_EXPM1 #define BOOST_HAS_LOG1P #undef BOOST_NO_CXX14_BINARY_LITERALS // This one may be a little risky to enable?? #undef BOOST_NO_SFINAE_EXPR #endif #else #include #undef BOOST_GCC_VERSION #undef BOOST_GCC_CXX11 #endif #undef BOOST_COMPILER #if defined(__INTEL_COMPILER) #if __INTEL_COMPILER == 9999 # define BOOST_INTEL_CXX_VERSION 1200 // Intel bug in 12.1. #else # define BOOST_INTEL_CXX_VERSION __INTEL_COMPILER #endif #elif defined(__ICL) # define BOOST_INTEL_CXX_VERSION __ICL #elif defined(__ICC) # define BOOST_INTEL_CXX_VERSION __ICC #elif defined(__ECC) # define BOOST_INTEL_CXX_VERSION __ECC #endif // Flags determined by comparing output of 'icpc -dM -E' with and without '-std=c++0x' #if (!(defined(_WIN32) || defined(_WIN64)) && defined(__STDC_HOSTED__) && (__STDC_HOSTED__ && (BOOST_INTEL_CXX_VERSION <= 1200))) || defined(__GXX_EXPERIMENTAL_CPP0X__) || defined(__GXX_EXPERIMENTAL_CXX0X__) # define BOOST_INTEL_STDCXX0X #endif #if defined(_MSC_VER) && (_MSC_VER >= 1600) # define BOOST_INTEL_STDCXX0X #endif #ifdef __GNUC__ # define BOOST_INTEL_GCC_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) #endif #if !defined(BOOST_COMPILER) # if defined(BOOST_INTEL_STDCXX0X) # define BOOST_COMPILER "Intel C++ C++0x mode version " BOOST_STRINGIZE(BOOST_INTEL_CXX_VERSION) # else # define BOOST_COMPILER "Intel C++ version " BOOST_STRINGIZE(BOOST_INTEL_CXX_VERSION) # endif #endif #define BOOST_INTEL BOOST_INTEL_CXX_VERSION #if defined(_WIN32) || defined(_WIN64) # define BOOST_INTEL_WIN BOOST_INTEL #else # define BOOST_INTEL_LINUX BOOST_INTEL #endif #else #include "boost/config/compiler/common_edg.hpp" #if defined(__INTEL_COMPILER) #if __INTEL_COMPILER == 9999 # define BOOST_INTEL_CXX_VERSION 1200 // Intel bug in 12.1. #else # define BOOST_INTEL_CXX_VERSION __INTEL_COMPILER #endif #elif defined(__ICL) # define BOOST_INTEL_CXX_VERSION __ICL #elif defined(__ICC) # define BOOST_INTEL_CXX_VERSION __ICC #elif defined(__ECC) # define BOOST_INTEL_CXX_VERSION __ECC #endif // Flags determined by comparing output of 'icpc -dM -E' with and without '-std=c++0x' #if (!(defined(_WIN32) || defined(_WIN64)) && defined(__STDC_HOSTED__) && (__STDC_HOSTED__ && (BOOST_INTEL_CXX_VERSION <= 1200))) || defined(__GXX_EXPERIMENTAL_CPP0X__) || defined(__GXX_EXPERIMENTAL_CXX0X__) # define BOOST_INTEL_STDCXX0X #endif #if defined(_MSC_VER) && (_MSC_VER >= 1600) # define BOOST_INTEL_STDCXX0X #endif #ifdef __GNUC__ # define BOOST_INTEL_GCC_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) #endif #if !defined(BOOST_COMPILER) # if defined(BOOST_INTEL_STDCXX0X) # define BOOST_COMPILER "Intel C++ C++0x mode version " BOOST_STRINGIZE(BOOST_INTEL_CXX_VERSION) # else # define BOOST_COMPILER "Intel C++ version " BOOST_STRINGIZE(BOOST_INTEL_CXX_VERSION) # endif #endif #define BOOST_INTEL BOOST_INTEL_CXX_VERSION #if defined(_WIN32) || defined(_WIN64) # define BOOST_INTEL_WIN BOOST_INTEL #else # define BOOST_INTEL_LINUX BOOST_INTEL #endif #if (BOOST_INTEL_CXX_VERSION <= 600) # if defined(_MSC_VER) && (_MSC_VER <= 1300) // added check for <= VC 7 (Peter Dimov) // Boost libraries assume strong standard conformance unless otherwise // indicated by a config macro. As configured by Intel, the EDG front-end // requires certain compiler options be set to achieve that strong conformance. // Particularly /Qoption,c,--arg_dep_lookup (reported by Kirk Klobe & Thomas Witt) // and /Zc:wchar_t,forScope. See boost-root/tools/build/intel-win32-tools.jam for // details as they apply to particular versions of the compiler. When the // compiler does not predefine a macro indicating if an option has been set, // this config file simply assumes the option has been set. // Thus BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP will not be defined, even if // the compiler option is not enabled. # define BOOST_NO_SWPRINTF # endif // Void returns, 64 bit integrals don't work when emulating VC 6 (Peter Dimov) # if defined(_MSC_VER) && (_MSC_VER <= 1200) # define BOOST_NO_VOID_RETURNS # define BOOST_NO_INTEGRAL_INT64_T # endif #endif #if (BOOST_INTEL_CXX_VERSION <= 710) && defined(_WIN32) # define BOOST_NO_POINTER_TO_MEMBER_TEMPLATE_PARAMETERS #endif // See http://aspn.activestate.com/ASPN/Mail/Message/boost/1614864 #if BOOST_INTEL_CXX_VERSION < 600 # define BOOST_NO_INTRINSIC_WCHAR_T #else // We should test the macro _WCHAR_T_DEFINED to check if the compiler // supports wchar_t natively. *BUT* there is a problem here: the standard // headers define this macro if they typedef wchar_t. Anyway, we're lucky // because they define it without a value, while Intel C++ defines it // to 1. So we can check its value to see if the macro was defined natively // or not. // Under UNIX, the situation is exactly the same, but the macro _WCHAR_T // is used instead. # if ((_WCHAR_T_DEFINED + 0) == 0) && ((_WCHAR_T + 0) == 0) # define BOOST_NO_INTRINSIC_WCHAR_T # endif #endif #if defined(__GNUC__) && !defined(BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL) // // Figure out when Intel is emulating this gcc bug // (All Intel versions prior to 9.0.26, and versions // later than that if they are set up to emulate gcc 3.2 // or earlier): // # if ((__GNUC__ == 3) && (__GNUC_MINOR__ <= 2)) || (BOOST_INTEL < 900) || (__INTEL_COMPILER_BUILD_DATE < 20050912) # define BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL # endif #endif #if (defined(__GNUC__) && (__GNUC__ < 4)) || (defined(_WIN32) && (BOOST_INTEL_CXX_VERSION <= 1200)) || (BOOST_INTEL_CXX_VERSION <= 1200) // GCC or VC emulation: #define BOOST_NO_TWO_PHASE_NAME_LOOKUP #endif // // Verify that we have actually got BOOST_NO_INTRINSIC_WCHAR_T // set correctly, if we don't do this now, we will get errors later // in type_traits code among other things, getting this correct // for the Intel compiler is actually remarkably fragile and tricky: // #ifdef __cplusplus #if defined(BOOST_NO_INTRINSIC_WCHAR_T) #include template< typename T > struct assert_no_intrinsic_wchar_t; template<> struct assert_no_intrinsic_wchar_t { typedef void type; }; // if you see an error here then you need to unset BOOST_NO_INTRINSIC_WCHAR_T // where it is defined above: typedef assert_no_intrinsic_wchar_t::type assert_no_intrinsic_wchar_t_; #else template< typename T > struct assert_intrinsic_wchar_t; template<> struct assert_intrinsic_wchar_t {}; // if you see an error here then define BOOST_NO_INTRINSIC_WCHAR_T on the command line: template<> struct assert_intrinsic_wchar_t {}; #endif #endif #if defined(_MSC_VER) && (_MSC_VER+0 >= 1000) # if _MSC_VER >= 1200 # define BOOST_HAS_MS_INT64 # endif # define BOOST_NO_SWPRINTF # define BOOST_NO_TWO_PHASE_NAME_LOOKUP #elif defined(_WIN32) # define BOOST_DISABLE_WIN32 #endif // I checked version 6.0 build 020312Z, it implements the NRVO. // Correct this as you find out which version of the compiler // implemented the NRVO first. (Daniel Frey) #if (BOOST_INTEL_CXX_VERSION >= 600) # define BOOST_HAS_NRVO #endif // Branch prediction hints // I'm not sure 8.0 was the first version to support these builtins, // update the condition if the version is not accurate. (Andrey Semashev) #if defined(__GNUC__) && BOOST_INTEL_CXX_VERSION >= 800 #define BOOST_LIKELY(x) __builtin_expect(x, 1) #define BOOST_UNLIKELY(x) __builtin_expect(x, 0) #endif // RTTI // __RTTI is the EDG macro // __INTEL_RTTI__ is the Intel macro // __GXX_RTTI is the g++ macro // _CPPRTTI is the MSVC++ macro #if !defined(__RTTI) && !defined(__INTEL_RTTI__) && !defined(__GXX_RTTI) && !defined(_CPPRTTI) #if !defined(BOOST_NO_RTTI) # define BOOST_NO_RTTI #endif // in MS mode, static typeid works even when RTTI is off #if !defined(_MSC_VER) && !defined(BOOST_NO_TYPEID) # define BOOST_NO_TYPEID #endif #endif // // versions check: // we don't support Intel prior to version 6.0: #if BOOST_INTEL_CXX_VERSION < 600 # error "Compiler not supported or configured - please reconfigure" #endif // Intel on MacOS requires #if defined(__APPLE__) && defined(__INTEL_COMPILER) # define BOOST_NO_TWO_PHASE_NAME_LOOKUP #endif // Intel on Altix Itanium #if defined(__itanium__) && defined(__INTEL_COMPILER) # define BOOST_NO_TWO_PHASE_NAME_LOOKUP #endif // // An attempt to value-initialize a pointer-to-member may trigger an // internal error on Intel <= 11.1 (last checked version), as was // reported by John Maddock, Intel support issue 589832, May 2010. // Moreover, according to test results from Huang-Vista-x86_32_intel, // intel-vc9-win-11.1 may leave a non-POD array uninitialized, in some // cases when it should be value-initialized. // (Niels Dekker, LKEB, May 2010) // Apparently Intel 12.1 (compiler version number 9999 !!) has the same issue (compiler regression). #if defined(__INTEL_COMPILER) # if (__INTEL_COMPILER <= 1110) || (__INTEL_COMPILER == 9999) || (defined(_WIN32) && (__INTEL_COMPILER < 1600)) # define BOOST_NO_COMPLETE_VALUE_INITIALIZATION # endif #endif // // Dynamic shared object (DSO) and dynamic-link library (DLL) support // #if defined(__GNUC__) && (__GNUC__ >= 4) # define BOOST_SYMBOL_EXPORT __attribute__((visibility("default"))) # define BOOST_SYMBOL_IMPORT # define BOOST_SYMBOL_VISIBLE __attribute__((visibility("default"))) #endif // // C++0x features // For each feature we need to check both the Intel compiler version, // and the version of MSVC or GCC that we are emulating. // See http://software.intel.com/en-us/articles/c0x-features-supported-by-intel-c-compiler/ // for a list of which features were implemented in which Intel releases. // #if defined(BOOST_INTEL_STDCXX0X) // BOOST_NO_CXX11_CONSTEXPR: #if (BOOST_INTEL_CXX_VERSION >= 1500) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40600)) && !defined(_MSC_VER) // Available in earlier Intel versions, but fail our tests: # undef BOOST_NO_CXX11_CONSTEXPR #endif // BOOST_NO_CXX11_NULLPTR: #if (BOOST_INTEL_CXX_VERSION >= 1210) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40600)) && (!defined(_MSC_VER) || (_MSC_VER >= 1600)) # undef BOOST_NO_CXX11_NULLPTR #endif // BOOST_NO_CXX11_TEMPLATE_ALIASES #if (BOOST_INTEL_CXX_VERSION >= 1210) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40700)) && (!defined(_MSC_VER) || (_MSC_FULL_VER >= 180020827)) # undef BOOST_NO_CXX11_TEMPLATE_ALIASES #endif // BOOST_NO_CXX11_DECLTYPE #if (BOOST_INTEL_CXX_VERSION >= 1200) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40300)) && (!defined(_MSC_VER) || (_MSC_VER >= 1600)) # undef BOOST_NO_CXX11_DECLTYPE #endif // BOOST_NO_CXX11_DECLTYPE_N3276 #if (BOOST_INTEL_CXX_VERSION >= 1500) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40800)) && (!defined(_MSC_VER) || (_MSC_FULL_VER >= 180020827)) # undef BOOST_NO_CXX11_DECLTYPE_N3276 #endif // BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS #if (BOOST_INTEL_CXX_VERSION >= 1200) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40300)) && (!defined(_MSC_VER) || (_MSC_FULL_VER >= 180020827)) # undef BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS #endif // BOOST_NO_CXX11_RVALUE_REFERENCES #if (BOOST_INTEL_CXX_VERSION >= 1300) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40300)) && (!defined(_MSC_VER) || (_MSC_VER >= 1600)) // This is available from earlier Intel versions, but breaks Filesystem and other libraries: # undef BOOST_NO_CXX11_RVALUE_REFERENCES #endif // BOOST_NO_CXX11_STATIC_ASSERT #if (BOOST_INTEL_CXX_VERSION >= 1110) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40300)) && (!defined(_MSC_VER) || (_MSC_VER >= 1600)) # undef BOOST_NO_CXX11_STATIC_ASSERT #endif // BOOST_NO_CXX11_VARIADIC_TEMPLATES #if (BOOST_INTEL_CXX_VERSION >= 1200) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40400)) && (!defined(_MSC_VER) || (_MSC_FULL_VER >= 180020827)) # undef BOOST_NO_CXX11_VARIADIC_TEMPLATES #endif // BOOST_NO_CXX11_VARIADIC_MACROS #if (BOOST_INTEL_CXX_VERSION >= 1200) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40200)) && (!defined(_MSC_VER) || (_MSC_VER >= 1400)) # undef BOOST_NO_CXX11_VARIADIC_MACROS #endif // BOOST_NO_CXX11_AUTO_DECLARATIONS #if (BOOST_INTEL_CXX_VERSION >= 1200) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40400)) && (!defined(_MSC_VER) || (_MSC_VER >= 1600)) # undef BOOST_NO_CXX11_AUTO_DECLARATIONS #endif // BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS #if (BOOST_INTEL_CXX_VERSION >= 1200) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40400)) && (!defined(_MSC_VER) || (_MSC_VER >= 1600)) # undef BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS #endif // BOOST_NO_CXX11_CHAR16_T #if (BOOST_INTEL_CXX_VERSION >= 1400) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40400)) && (!defined(_MSC_VER) || (_MSC_VER >= 9999)) # undef BOOST_NO_CXX11_CHAR16_T #endif // BOOST_NO_CXX11_CHAR32_T #if (BOOST_INTEL_CXX_VERSION >= 1400) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40400)) && (!defined(_MSC_VER) || (_MSC_VER >= 9999)) # undef BOOST_NO_CXX11_CHAR32_T #endif // BOOST_NO_CXX11_DEFAULTED_FUNCTIONS #if (BOOST_INTEL_CXX_VERSION >= 1200) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40400)) && (!defined(_MSC_VER) || (_MSC_FULL_VER >= 180020827)) # undef BOOST_NO_CXX11_DEFAULTED_FUNCTIONS #endif // BOOST_NO_CXX11_DELETED_FUNCTIONS #if (BOOST_INTEL_CXX_VERSION >= 1200) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40400)) && (!defined(_MSC_VER) || (_MSC_FULL_VER >= 180020827)) # undef BOOST_NO_CXX11_DELETED_FUNCTIONS #endif // BOOST_NO_CXX11_HDR_INITIALIZER_LIST #if (BOOST_INTEL_CXX_VERSION >= 1400) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40400)) && (!defined(_MSC_VER) || (_MSC_VER >= 1700)) # undef BOOST_NO_CXX11_HDR_INITIALIZER_LIST #endif // BOOST_NO_CXX11_SCOPED_ENUMS #if (BOOST_INTEL_CXX_VERSION >= 1400) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40501)) && (!defined(_MSC_VER) || (_MSC_VER >= 1700)) // This is available but broken in earlier Intel releases. # undef BOOST_NO_CXX11_SCOPED_ENUMS #endif // BOOST_NO_SFINAE_EXPR #if (BOOST_INTEL_CXX_VERSION >= 1200) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40500)) && (!defined(_MSC_VER) || (_MSC_VER >= 9999)) # undef BOOST_NO_SFINAE_EXPR #endif // BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS #if (BOOST_INTEL_CXX_VERSION >= 1500) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40500)) && (!defined(_MSC_VER) || (_MSC_FULL_VER >= 180020827)) // This is available in earlier Intel releases, but breaks Multiprecision: # undef BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS #endif // BOOST_NO_CXX11_LAMBDAS #if (BOOST_INTEL_CXX_VERSION >= 1200) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40500)) && (!defined(_MSC_VER) || (_MSC_VER >= 1600)) # undef BOOST_NO_CXX11_LAMBDAS #endif // BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS #if (BOOST_INTEL_CXX_VERSION >= 1200) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40500)) # undef BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS #endif // BOOST_NO_CXX11_RANGE_BASED_FOR #if (BOOST_INTEL_CXX_VERSION >= 1400) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40600)) && (!defined(_MSC_VER) || (_MSC_VER >= 1700)) # undef BOOST_NO_CXX11_RANGE_BASED_FOR #endif // BOOST_NO_CXX11_RAW_LITERALS #if (BOOST_INTEL_CXX_VERSION >= 1400) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40500)) && (!defined(_MSC_VER) || (_MSC_FULL_VER >= 180020827)) # undef BOOST_NO_CXX11_RAW_LITERALS #endif // BOOST_NO_CXX11_UNICODE_LITERALS #if (BOOST_INTEL_CXX_VERSION >= 1400) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40500)) && (!defined(_MSC_VER) || (_MSC_VER >= 9999)) # undef BOOST_NO_CXX11_UNICODE_LITERALS #endif // BOOST_NO_CXX11_NOEXCEPT #if (BOOST_INTEL_CXX_VERSION >= 1500) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40600)) && (!defined(_MSC_VER) || (_MSC_VER >= 9999)) // Available in earlier Intel release, but generates errors when used with // conditional exception specifications, for example in multiprecision: # undef BOOST_NO_CXX11_NOEXCEPT #endif // BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX #if (BOOST_INTEL_CXX_VERSION >= 1400) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40600)) && (!defined(_MSC_VER) || (_MSC_VER >= 9999)) # undef BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX #endif // BOOST_NO_CXX11_USER_DEFINED_LITERALS #if (BOOST_INTEL_CXX_VERSION >= 1500) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40700)) && (!defined(_MSC_VER) || (_MSC_FULL_VER >= 190021730)) # undef BOOST_NO_CXX11_USER_DEFINED_LITERALS #endif // BOOST_NO_CXX11_ALIGNAS #if (BOOST_INTEL_CXX_VERSION >= 1500) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40800)) && (!defined(_MSC_VER) || (_MSC_FULL_VER >= 190021730)) # undef BOOST_NO_CXX11_ALIGNAS #endif // BOOST_NO_CXX11_TRAILING_RESULT_TYPES #if (BOOST_INTEL_CXX_VERSION >= 1200) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40400)) && (!defined(_MSC_VER) || (_MSC_FULL_VER >= 180020827)) # undef BOOST_NO_CXX11_TRAILING_RESULT_TYPES #endif // BOOST_NO_CXX11_INLINE_NAMESPACES #if (BOOST_INTEL_CXX_VERSION >= 1400) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40400)) && (!defined(_MSC_VER) || (_MSC_FULL_VER >= 190021730)) # undef BOOST_NO_CXX11_INLINE_NAMESPACES #endif // BOOST_NO_CXX11_REF_QUALIFIERS #if (BOOST_INTEL_CXX_VERSION >= 1400) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40800)) && (!defined(_MSC_VER) || (_MSC_FULL_VER >= 190021730)) # undef BOOST_NO_CXX11_REF_QUALIFIERS #endif // BOOST_NO_CXX11_FINAL #if (BOOST_INTEL_CXX_VERSION >= 1400) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40700)) && (!defined(_MSC_VER) || (_MSC_VER >= 1700)) # undef BOOST_NO_CXX11_FINAL #endif #endif // // Broken in all versions up to 15: #define BOOST_NO_CXX11_FIXED_LENGTH_VARIADIC_TEMPLATE_EXPANSION_PACKS #if defined(BOOST_INTEL_STDCXX0X) && (BOOST_INTEL_CXX_VERSION <= 1310) # define BOOST_NO_CXX11_HDR_FUTURE # define BOOST_NO_CXX11_HDR_INITIALIZER_LIST #endif #if defined(BOOST_INTEL_STDCXX0X) && (BOOST_INTEL_CXX_VERSION == 1400) // A regression in Intel's compiler means that seems to be broken in this release as well as : # define BOOST_NO_CXX11_HDR_FUTURE # define BOOST_NO_CXX11_HDR_TUPLE #endif #if (BOOST_INTEL_CXX_VERSION < 1200) // // fenv.h appears not to work with Intel prior to 12.0: // # define BOOST_NO_FENV_H #endif // Intel 13.10 fails to access defaulted functions of a base class declared in private or protected sections, // producing the following errors: // error #453: protected function "..." (declared at ...") is not accessible through a "..." pointer or object #if (BOOST_INTEL_CXX_VERSION <= 1310) # define BOOST_NO_CXX11_NON_PUBLIC_DEFAULTED_FUNCTIONS #endif #if defined(_MSC_VER) && (_MSC_VER >= 1600) # define BOOST_HAS_STDINT_H #endif #if defined(__LP64__) && defined(__GNUC__) && (BOOST_INTEL_CXX_VERSION >= 1310) && !defined(__CUDACC__) # define BOOST_HAS_INT128 #endif #endif // // last known and checked version: #if (BOOST_INTEL_CXX_VERSION > 1500) # if defined(BOOST_ASSERT_CONFIG) # error "Unknown compiler version - please run the configure tests and report the results" # elif defined(_MSC_VER) // // We don't emit this warning any more, since we have so few // defect macros set anyway (just the one). // //# pragma message("Unknown compiler version - please run the configure tests and report the results") # endif #endif ================================================ FILE: benchmarks/boost/config/compiler/kai.hpp ================================================ // (C) Copyright John Maddock 2001. // (C) Copyright David Abrahams 2002. // (C) Copyright Aleksey Gurtovoy 2002. // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org for most recent version. // Kai C++ compiler setup: #include "boost/config/compiler/common_edg.hpp" # if (__KCC_VERSION <= 4001) || !defined(BOOST_STRICT_CONFIG) // at least on Sun, the contents of is not in namespace std # define BOOST_NO_STDC_NAMESPACE # endif // see also common_edg.hpp which needs a special check for __KCC # if !defined(_EXCEPTIONS) && !defined(BOOST_NO_EXCEPTIONS) # define BOOST_NO_EXCEPTIONS # endif // // last known and checked version is 4001: #if (__KCC_VERSION > 4001) # if defined(BOOST_ASSERT_CONFIG) # error "Unknown compiler version - please run the configure tests and report the results" # endif #endif ================================================ FILE: benchmarks/boost/config/compiler/metrowerks.hpp ================================================ // (C) Copyright John Maddock 2001. // (C) Copyright Darin Adler 2001. // (C) Copyright Peter Dimov 2001. // (C) Copyright David Abrahams 2001 - 2002. // (C) Copyright Beman Dawes 2001 - 2003. // (C) Copyright Stefan Slapeta 2004. // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org for most recent version. // Metrowerks C++ compiler setup: // locale support is disabled when linking with the dynamic runtime # ifdef _MSL_NO_LOCALE # define BOOST_NO_STD_LOCALE # endif # if __MWERKS__ <= 0x2301 // 5.3 # define BOOST_NO_FUNCTION_TEMPLATE_ORDERING # define BOOST_NO_POINTER_TO_MEMBER_CONST # define BOOST_NO_DEPENDENT_TYPES_IN_TEMPLATE_VALUE_PARAMETERS # define BOOST_NO_MEMBER_TEMPLATE_KEYWORD # endif # if __MWERKS__ <= 0x2401 // 6.2 //# define BOOST_NO_FUNCTION_TEMPLATE_ORDERING # endif # if(__MWERKS__ <= 0x2407) // 7.x # define BOOST_NO_MEMBER_FUNCTION_SPECIALIZATIONS # define BOOST_NO_UNREACHABLE_RETURN_DETECTION # endif # if(__MWERKS__ <= 0x3003) // 8.x # define BOOST_NO_SFINAE # endif // the "|| !defined(BOOST_STRICT_CONFIG)" part should apply to the last // tested version *only*: # if(__MWERKS__ <= 0x3207) || !defined(BOOST_STRICT_CONFIG) // 9.6 # define BOOST_NO_MEMBER_TEMPLATE_FRIENDS # define BOOST_NO_IS_ABSTRACT # endif #if !__option(wchar_type) # define BOOST_NO_INTRINSIC_WCHAR_T #endif #if !__option(exceptions) && !defined(BOOST_NO_EXCEPTIONS) # define BOOST_NO_EXCEPTIONS #endif #if (__INTEL__ && _WIN32) || (__POWERPC__ && macintosh) # if __MWERKS__ == 0x3000 # define BOOST_COMPILER_VERSION 8.0 # elif __MWERKS__ == 0x3001 # define BOOST_COMPILER_VERSION 8.1 # elif __MWERKS__ == 0x3002 # define BOOST_COMPILER_VERSION 8.2 # elif __MWERKS__ == 0x3003 # define BOOST_COMPILER_VERSION 8.3 # elif __MWERKS__ == 0x3200 # define BOOST_COMPILER_VERSION 9.0 # elif __MWERKS__ == 0x3201 # define BOOST_COMPILER_VERSION 9.1 # elif __MWERKS__ == 0x3202 # define BOOST_COMPILER_VERSION 9.2 # elif __MWERKS__ == 0x3204 # define BOOST_COMPILER_VERSION 9.3 # elif __MWERKS__ == 0x3205 # define BOOST_COMPILER_VERSION 9.4 # elif __MWERKS__ == 0x3206 # define BOOST_COMPILER_VERSION 9.5 # elif __MWERKS__ == 0x3207 # define BOOST_COMPILER_VERSION 9.6 # else # define BOOST_COMPILER_VERSION __MWERKS__ # endif #else # define BOOST_COMPILER_VERSION __MWERKS__ #endif // // C++0x features // // See boost\config\suffix.hpp for BOOST_NO_LONG_LONG // #if __MWERKS__ > 0x3206 && __option(rvalue_refs) # define BOOST_HAS_RVALUE_REFS #else # define BOOST_NO_CXX11_RVALUE_REFERENCES #endif #define BOOST_NO_CXX11_AUTO_DECLARATIONS #define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS #define BOOST_NO_CXX11_CHAR16_T #define BOOST_NO_CXX11_CHAR32_T #define BOOST_NO_CXX11_CONSTEXPR #define BOOST_NO_CXX11_DECLTYPE #define BOOST_NO_CXX11_DECLTYPE_N3276 #define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS #define BOOST_NO_CXX11_DELETED_FUNCTIONS #define BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS #define BOOST_NO_CXX11_EXTERN_TEMPLATE #define BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS #define BOOST_NO_CXX11_HDR_INITIALIZER_LIST #define BOOST_NO_CXX11_LAMBDAS #define BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS #define BOOST_NO_CXX11_NOEXCEPT #define BOOST_NO_CXX11_NULLPTR #define BOOST_NO_CXX11_RANGE_BASED_FOR #define BOOST_NO_CXX11_RAW_LITERALS #define BOOST_NO_CXX11_SCOPED_ENUMS #define BOOST_NO_SFINAE_EXPR #define BOOST_NO_CXX11_STATIC_ASSERT #define BOOST_NO_CXX11_TEMPLATE_ALIASES #define BOOST_NO_CXX11_UNICODE_LITERALS #define BOOST_NO_CXX11_VARIADIC_TEMPLATES #define BOOST_NO_CXX11_VARIADIC_MACROS #define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX #define BOOST_NO_CXX11_USER_DEFINED_LITERALS #define BOOST_NO_CXX11_ALIGNAS #define BOOST_NO_CXX11_TRAILING_RESULT_TYPES #define BOOST_NO_CXX11_INLINE_NAMESPACES #define BOOST_NO_CXX11_REF_QUALIFIERS #define BOOST_NO_CXX11_FINAL // C++ 14: #if !defined(__cpp_aggregate_nsdmi) || (__cpp_aggregate_nsdmi < 201304) # define BOOST_NO_CXX14_AGGREGATE_NSDMI #endif #if !defined(__cpp_binary_literals) || (__cpp_binary_literals < 201304) # define BOOST_NO_CXX14_BINARY_LITERALS #endif #if !defined(__cpp_constexpr) || (__cpp_constexpr < 201304) # define BOOST_NO_CXX14_CONSTEXPR #endif #if !defined(__cpp_decltype_auto) || (__cpp_decltype_auto < 201304) # define BOOST_NO_CXX14_DECLTYPE_AUTO #endif #if (__cplusplus < 201304) // There's no SD6 check for this.... # define BOOST_NO_CXX14_DIGIT_SEPARATORS #endif #if !defined(__cpp_generic_lambdas) || (__cpp_generic_lambdas < 201304) # define BOOST_NO_CXX14_GENERIC_LAMBDAS #endif #if !defined(__cpp_init_captures) || (__cpp_init_captures < 201304) # define BOOST_NO_CXX14_INITIALIZED_LAMBDA_CAPTURES #endif #if !defined(__cpp_return_type_deduction) || (__cpp_return_type_deduction < 201304) # define BOOST_NO_CXX14_RETURN_TYPE_DEDUCTION #endif #if !defined(__cpp_variable_templates) || (__cpp_variable_templates < 201304) # define BOOST_NO_CXX14_VARIABLE_TEMPLATES #endif #define BOOST_COMPILER "Metrowerks CodeWarrior C++ version " BOOST_STRINGIZE(BOOST_COMPILER_VERSION) // // versions check: // we don't support Metrowerks prior to version 5.3: #if __MWERKS__ < 0x2301 # error "Compiler not supported or configured - please reconfigure" #endif // // last known and checked version: #if (__MWERKS__ > 0x3205) # if defined(BOOST_ASSERT_CONFIG) # error "Unknown compiler version - please run the configure tests and report the results" # endif #endif ================================================ FILE: benchmarks/boost/config/compiler/mpw.hpp ================================================ // (C) Copyright John Maddock 2001 - 2002. // (C) Copyright Aleksey Gurtovoy 2002. // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org for most recent version. // MPW C++ compilers setup: # if defined(__SC__) # define BOOST_COMPILER "MPW SCpp version " BOOST_STRINGIZE(__SC__) # elif defined(__MRC__) # define BOOST_COMPILER "MPW MrCpp version " BOOST_STRINGIZE(__MRC__) # else # error "Using MPW compiler configuration by mistake. Please update." # endif // // MPW 8.90: // #if (MPW_CPLUS <= 0x890) || !defined(BOOST_STRICT_CONFIG) # define BOOST_NO_CV_SPECIALIZATIONS # define BOOST_NO_DEPENDENT_NESTED_DERIVATIONS # define BOOST_NO_DEPENDENT_TYPES_IN_TEMPLATE_VALUE_PARAMETERS # define BOOST_NO_INCLASS_MEMBER_INITIALIZATION # define BOOST_NO_INTRINSIC_WCHAR_T # define BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION # define BOOST_NO_USING_TEMPLATE # define BOOST_NO_CWCHAR # define BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS # define BOOST_NO_STD_ALLOCATOR /* actually a bug with const reference overloading */ #endif // // C++0x features // // See boost\config\suffix.hpp for BOOST_NO_LONG_LONG // #define BOOST_NO_CXX11_AUTO_DECLARATIONS #define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS #define BOOST_NO_CXX11_CHAR16_T #define BOOST_NO_CXX11_CHAR32_T #define BOOST_NO_CXX11_CONSTEXPR #define BOOST_NO_CXX11_DECLTYPE #define BOOST_NO_CXX11_DECLTYPE_N3276 #define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS #define BOOST_NO_CXX11_DELETED_FUNCTIONS #define BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS #define BOOST_NO_CXX11_EXTERN_TEMPLATE #define BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS #define BOOST_NO_CXX11_HDR_INITIALIZER_LIST #define BOOST_NO_CXX11_LAMBDAS #define BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS #define BOOST_NO_CXX11_NOEXCEPT #define BOOST_NO_CXX11_NULLPTR #define BOOST_NO_CXX11_RANGE_BASED_FOR #define BOOST_NO_CXX11_RAW_LITERALS #define BOOST_NO_CXX11_RVALUE_REFERENCES #define BOOST_NO_CXX11_SCOPED_ENUMS #define BOOST_NO_SFINAE_EXPR #define BOOST_NO_CXX11_STATIC_ASSERT #define BOOST_NO_CXX11_TEMPLATE_ALIASES #define BOOST_NO_CXX11_UNICODE_LITERALS #define BOOST_NO_CXX11_VARIADIC_TEMPLATES #define BOOST_NO_CXX11_VARIADIC_MACROS #define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX #define BOOST_NO_CXX11_USER_DEFINED_LITERALS #define BOOST_NO_CXX11_ALIGNAS #define BOOST_NO_CXX11_TRAILING_RESULT_TYPES #define BOOST_NO_CXX11_INLINE_NAMESPACES #define BOOST_NO_CXX11_REF_QUALIFIERS #define BOOST_NO_CXX11_FINAL // C++ 14: #if !defined(__cpp_aggregate_nsdmi) || (__cpp_aggregate_nsdmi < 201304) # define BOOST_NO_CXX14_AGGREGATE_NSDMI #endif #if !defined(__cpp_binary_literals) || (__cpp_binary_literals < 201304) # define BOOST_NO_CXX14_BINARY_LITERALS #endif #if !defined(__cpp_constexpr) || (__cpp_constexpr < 201304) # define BOOST_NO_CXX14_CONSTEXPR #endif #if !defined(__cpp_decltype_auto) || (__cpp_decltype_auto < 201304) # define BOOST_NO_CXX14_DECLTYPE_AUTO #endif #if (__cplusplus < 201304) // There's no SD6 check for this.... # define BOOST_NO_CXX14_DIGIT_SEPARATORS #endif #if !defined(__cpp_generic_lambdas) || (__cpp_generic_lambdas < 201304) # define BOOST_NO_CXX14_GENERIC_LAMBDAS #endif #if !defined(__cpp_init_captures) || (__cpp_init_captures < 201304) # define BOOST_NO_CXX14_INITIALIZED_LAMBDA_CAPTURES #endif #if !defined(__cpp_return_type_deduction) || (__cpp_return_type_deduction < 201304) # define BOOST_NO_CXX14_RETURN_TYPE_DEDUCTION #endif #if !defined(__cpp_variable_templates) || (__cpp_variable_templates < 201304) # define BOOST_NO_CXX14_VARIABLE_TEMPLATES #endif // // versions check: // we don't support MPW prior to version 8.9: #if MPW_CPLUS < 0x890 # error "Compiler not supported or configured - please reconfigure" #endif // // last known and checked version is 0x890: #if (MPW_CPLUS > 0x890) # if defined(BOOST_ASSERT_CONFIG) # error "Unknown compiler version - please run the configure tests and report the results" # endif #endif ================================================ FILE: benchmarks/boost/config/compiler/nvcc.hpp ================================================ // (C) Copyright Eric Jourdanneau, Joel Falcou 2010 // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org for most recent version. // NVIDIA CUDA C++ compiler setup #ifndef BOOST_COMPILER # define BOOST_COMPILER "NVIDIA CUDA C++ Compiler" #endif // NVIDIA Specific support // BOOST_GPU_ENABLED : Flag a function or a method as being enabled on the host and device #define BOOST_GPU_ENABLED __host__ __device__ ================================================ FILE: benchmarks/boost/config/compiler/pathscale.hpp ================================================ // (C) Copyright Bryce Lelbach 2011 // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org for most recent version. // PathScale EKOPath C++ Compiler #ifndef BOOST_COMPILER # define BOOST_COMPILER "PathScale EKOPath C++ Compiler version " __PATHSCALE__ #endif #if __PATHCC__ >= 4 # define BOOST_MSVC6_MEMBER_TEMPLATES # define BOOST_HAS_UNISTD_H # define BOOST_HAS_STDINT_H # define BOOST_HAS_SIGACTION # define BOOST_HAS_SCHED_YIELD # define BOOST_HAS_THREADS # define BOOST_HAS_PTHREADS # define BOOST_HAS_PTHREAD_YIELD # define BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE # define BOOST_HAS_PARTIAL_STD_ALLOCATOR # define BOOST_HAS_NRVO # define BOOST_HAS_NL_TYPES_H # define BOOST_HAS_NANOSLEEP # define BOOST_HAS_LONG_LONG # define BOOST_HAS_LOG1P # define BOOST_HAS_GETTIMEOFDAY # define BOOST_HAS_EXPM1 # define BOOST_HAS_DIRENT_H # define BOOST_HAS_CLOCK_GETTIME # define BOOST_NO_CXX11_VARIADIC_TEMPLATES # define BOOST_NO_CXX11_UNICODE_LITERALS # define BOOST_NO_CXX11_TEMPLATE_ALIASES # define BOOST_NO_CXX11_STATIC_ASSERT # define BOOST_NO_SFINAE_EXPR # define BOOST_NO_CXX11_SCOPED_ENUMS # define BOOST_NO_CXX11_RVALUE_REFERENCES # define BOOST_NO_CXX11_RANGE_BASED_FOR # define BOOST_NO_CXX11_RAW_LITERALS # define BOOST_NO_CXX11_NULLPTR # define BOOST_NO_CXX11_NUMERIC_LIMITS # define BOOST_NO_CXX11_NOEXCEPT # define BOOST_NO_CXX11_LAMBDAS # define BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS # define BOOST_NO_MS_INT64_NUMERIC_LIMITS # define BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS # define BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS # define BOOST_NO_CXX11_DELETED_FUNCTIONS # define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS # define BOOST_NO_CXX11_DECLTYPE # define BOOST_NO_CXX11_DECLTYPE_N3276 # define BOOST_NO_CXX11_CONSTEXPR # define BOOST_NO_COMPLETE_VALUE_INITIALIZATION # define BOOST_NO_CXX11_CHAR32_T # define BOOST_NO_CXX11_CHAR16_T # define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS # define BOOST_NO_CXX11_AUTO_DECLARATIONS # define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX # define BOOST_NO_CXX11_HDR_UNORDERED_SET # define BOOST_NO_CXX11_HDR_UNORDERED_MAP # define BOOST_NO_CXX11_HDR_TYPEINDEX # define BOOST_NO_CXX11_HDR_TUPLE # define BOOST_NO_CXX11_HDR_THREAD # define BOOST_NO_CXX11_HDR_SYSTEM_ERROR # define BOOST_NO_CXX11_HDR_REGEX # define BOOST_NO_CXX11_HDR_RATIO # define BOOST_NO_CXX11_HDR_RANDOM # define BOOST_NO_CXX11_HDR_MUTEX # define BOOST_NO_CXX11_HDR_INITIALIZER_LIST # define BOOST_NO_CXX11_HDR_FUTURE # define BOOST_NO_CXX11_HDR_FORWARD_LIST # define BOOST_NO_CXX11_HDR_CONDITION_VARIABLE # define BOOST_NO_CXX11_HDR_CODECVT # define BOOST_NO_CXX11_HDR_CHRONO # define BOOST_NO_CXX11_USER_DEFINED_LITERALS # define BOOST_NO_CXX11_ALIGNAS # define BOOST_NO_CXX11_TRAILING_RESULT_TYPES # define BOOST_NO_CXX11_INLINE_NAMESPACES # define BOOST_NO_CXX11_REF_QUALIFIERS # define BOOST_NO_CXX11_FINAL // C++ 14: #if !defined(__cpp_aggregate_nsdmi) || (__cpp_aggregate_nsdmi < 201304) # define BOOST_NO_CXX14_AGGREGATE_NSDMI #endif #if !defined(__cpp_binary_literals) || (__cpp_binary_literals < 201304) # define BOOST_NO_CXX14_BINARY_LITERALS #endif #if !defined(__cpp_constexpr) || (__cpp_constexpr < 201304) # define BOOST_NO_CXX14_CONSTEXPR #endif #if !defined(__cpp_decltype_auto) || (__cpp_decltype_auto < 201304) # define BOOST_NO_CXX14_DECLTYPE_AUTO #endif #if (__cplusplus < 201304) // There's no SD6 check for this.... # define BOOST_NO_CXX14_DIGIT_SEPARATORS #endif #if !defined(__cpp_generic_lambdas) || (__cpp_generic_lambdas < 201304) # define BOOST_NO_CXX14_GENERIC_LAMBDAS #endif #if !defined(__cpp_init_captures) || (__cpp_init_captures < 201304) # define BOOST_NO_CXX14_INITIALIZED_LAMBDA_CAPTURES #endif #if !defined(__cpp_return_type_deduction) || (__cpp_return_type_deduction < 201304) # define BOOST_NO_CXX14_RETURN_TYPE_DEDUCTION #endif #if !defined(__cpp_variable_templates) || (__cpp_variable_templates < 201304) # define BOOST_NO_CXX14_VARIABLE_TEMPLATES #endif #endif ================================================ FILE: benchmarks/boost/config/compiler/pgi.hpp ================================================ // (C) Copyright Noel Belcourt 2007. // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org for most recent version. // PGI C++ compiler setup: #define BOOST_COMPILER_VERSION __PGIC__##__PGIC_MINOR__ #define BOOST_COMPILER "PGI compiler version " BOOST_STRINGIZE(BOOST_COMPILER_VERSION) // // Threading support: // Turn this on unconditionally here, it will get turned off again later // if no threading API is detected. // #if __PGIC__ >= 11 // options requested by configure --enable-test #define BOOST_HAS_PTHREADS #define BOOST_HAS_THREADS #define BOOST_HAS_PTHREAD_YIELD #define BOOST_HAS_NRVO #define BOOST_HAS_LONG_LONG // options --enable-test wants undefined #undef BOOST_NO_STDC_NAMESPACE #undef BOOST_NO_EXCEPTION_STD_NAMESPACE #undef BOOST_DEDUCED_TYPENAME #define BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL #define BOOST_NO_TWO_PHASE_NAME_LOOKUP #define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS #define BOOST_NO_CXX11_AUTO_DECLARATIONS #elif __PGIC__ >= 10 // options requested by configure --enable-test #define BOOST_HAS_THREADS #define BOOST_HAS_NRVO #define BOOST_HAS_LONG_LONG #if defined(linux) || defined(__linux) || defined(__linux__) # define BOOST_HAS_STDINT_H #endif // options --enable-test wants undefined #undef BOOST_NO_STDC_NAMESPACE #undef BOOST_NO_EXCEPTION_STD_NAMESPACE #undef BOOST_DEDUCED_TYPENAME #elif __PGIC__ >= 7 #define BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL #define BOOST_NO_TWO_PHASE_NAME_LOOKUP #define BOOST_NO_SWPRINTF #define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS #define BOOST_NO_CXX11_AUTO_DECLARATIONS #else # error "Pgi compiler not configured - please reconfigure" #endif // // C++0x features // // See boost\config\suffix.hpp for BOOST_NO_LONG_LONG // #define BOOST_NO_CXX11_CHAR16_T #define BOOST_NO_CXX11_CHAR32_T #define BOOST_NO_CXX11_CONSTEXPR #define BOOST_NO_CXX11_DECLTYPE #define BOOST_NO_CXX11_DECLTYPE_N3276 #define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS #define BOOST_NO_CXX11_DELETED_FUNCTIONS #define BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS #define BOOST_NO_CXX11_EXTERN_TEMPLATE #define BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS #define BOOST_NO_CXX11_LAMBDAS #define BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS #define BOOST_NO_CXX11_NOEXCEPT #define BOOST_NO_CXX11_NULLPTR #define BOOST_NO_CXX11_NUMERIC_LIMITS #define BOOST_NO_CXX11_RANGE_BASED_FOR #define BOOST_NO_CXX11_RAW_LITERALS #define BOOST_NO_CXX11_RVALUE_REFERENCES #define BOOST_NO_CXX11_SCOPED_ENUMS #define BOOST_NO_SFINAE_EXPR #define BOOST_NO_CXX11_STATIC_ASSERT #define BOOST_NO_SWPRINTF #define BOOST_NO_CXX11_TEMPLATE_ALIASES #define BOOST_NO_CXX11_UNICODE_LITERALS #define BOOST_NO_CXX11_VARIADIC_TEMPLATES #define BOOST_NO_CXX11_VARIADIC_MACROS #define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX #define BOOST_NO_CXX11_HDR_UNORDERED_SET #define BOOST_NO_CXX11_HDR_UNORDERED_MAP #define BOOST_NO_CXX11_HDR_TYPEINDEX #define BOOST_NO_CXX11_HDR_TYPE_TRAITS #define BOOST_NO_CXX11_HDR_TUPLE #define BOOST_NO_CXX11_HDR_THREAD #define BOOST_NO_CXX11_HDR_SYSTEM_ERROR #define BOOST_NO_CXX11_HDR_REGEX #define BOOST_NO_CXX11_HDR_RATIO #define BOOST_NO_CXX11_HDR_RANDOM #define BOOST_NO_CXX11_HDR_MUTEX #define BOOST_NO_CXX11_HDR_INITIALIZER_LIST #define BOOST_NO_CXX11_HDR_FUTURE #define BOOST_NO_CXX11_HDR_FORWARD_LIST #define BOOST_NO_CXX11_HDR_CONDITION_VARIABLE #define BOOST_NO_CXX11_HDR_CODECVT #define BOOST_NO_CXX11_HDR_CHRONO #define BOOST_NO_CXX11_HDR_ARRAY #define BOOST_NO_CXX11_USER_DEFINED_LITERALS #define BOOST_NO_CXX11_ALIGNAS #define BOOST_NO_CXX11_TRAILING_RESULT_TYPES #define BOOST_NO_CXX11_INLINE_NAMESPACES #define BOOST_NO_CXX11_REF_QUALIFIERS #define BOOST_NO_CXX11_FINAL // C++ 14: #if !defined(__cpp_aggregate_nsdmi) || (__cpp_aggregate_nsdmi < 201304) # define BOOST_NO_CXX14_AGGREGATE_NSDMI #endif #if !defined(__cpp_binary_literals) || (__cpp_binary_literals < 201304) # define BOOST_NO_CXX14_BINARY_LITERALS #endif #if !defined(__cpp_constexpr) || (__cpp_constexpr < 201304) # define BOOST_NO_CXX14_CONSTEXPR #endif #if !defined(__cpp_decltype_auto) || (__cpp_decltype_auto < 201304) # define BOOST_NO_CXX14_DECLTYPE_AUTO #endif #if (__cplusplus < 201304) // There's no SD6 check for this.... # define BOOST_NO_CXX14_DIGIT_SEPARATORS #endif #if !defined(__cpp_generic_lambdas) || (__cpp_generic_lambdas < 201304) # define BOOST_NO_CXX14_GENERIC_LAMBDAS #endif #if !defined(__cpp_init_captures) || (__cpp_init_captures < 201304) # define BOOST_NO_CXX14_INITIALIZED_LAMBDA_CAPTURES #endif #if !defined(__cpp_return_type_deduction) || (__cpp_return_type_deduction < 201304) # define BOOST_NO_CXX14_RETURN_TYPE_DEDUCTION #endif #if !defined(__cpp_variable_templates) || (__cpp_variable_templates < 201304) # define BOOST_NO_CXX14_VARIABLE_TEMPLATES #endif // // version check: // probably nothing to do here? ================================================ FILE: benchmarks/boost/config/compiler/sgi_mipspro.hpp ================================================ // (C) Copyright John Maddock 2001 - 2002. // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org for most recent version. // SGI C++ compiler setup: #define BOOST_COMPILER "SGI Irix compiler version " BOOST_STRINGIZE(_COMPILER_VERSION) #include "boost/config/compiler/common_edg.hpp" // // Threading support: // Turn this on unconditionally here, it will get turned off again later // if no threading API is detected. // #define BOOST_HAS_THREADS #define BOOST_NO_TWO_PHASE_NAME_LOOKUP #undef BOOST_NO_SWPRINTF #undef BOOST_DEDUCED_TYPENAME // // version check: // probably nothing to do here? ================================================ FILE: benchmarks/boost/config/compiler/sunpro_cc.hpp ================================================ // (C) Copyright John Maddock 2001. // (C) Copyright Jens Maurer 2001 - 2003. // (C) Copyright Peter Dimov 2002. // (C) Copyright Aleksey Gurtovoy 2002 - 2003. // (C) Copyright David Abrahams 2002. // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org for most recent version. // Sun C++ compiler setup: # if __SUNPRO_CC <= 0x500 # define BOOST_NO_MEMBER_TEMPLATES # define BOOST_NO_FUNCTION_TEMPLATE_ORDERING # endif # if (__SUNPRO_CC <= 0x520) // // Sunpro 5.2 and earler: // // although sunpro 5.2 supports the syntax for // inline initialization it often gets the value // wrong, especially where the value is computed // from other constants (J Maddock 6th May 2001) # define BOOST_NO_INCLASS_MEMBER_INITIALIZATION // Although sunpro 5.2 supports the syntax for // partial specialization, it often seems to // bind to the wrong specialization. Better // to disable it until suppport becomes more stable // (J Maddock 6th May 2001). # define BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION # endif # if (__SUNPRO_CC <= 0x530) // Requesting debug info (-g) with Boost.Python results // in an internal compiler error for "static const" // initialized in-class. // >> Assertion: (../links/dbg_cstabs.cc, line 611) // while processing ../test.cpp at line 0. // (Jens Maurer according to Gottfried Ganssauge 04 Mar 2002) # define BOOST_NO_INCLASS_MEMBER_INITIALIZATION // SunPro 5.3 has better support for partial specialization, // but breaks when compiling std::less > // (Jens Maurer 4 Nov 2001). // std::less specialization fixed as reported by George // Heintzelman; partial specialization re-enabled // (Peter Dimov 17 Jan 2002) //# define BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION // integral constant expressions with 64 bit numbers fail # define BOOST_NO_INTEGRAL_INT64_T # endif # if (__SUNPRO_CC < 0x570) # define BOOST_NO_TEMPLATE_TEMPLATES // see http://lists.boost.org/MailArchives/boost/msg47184.php // and http://lists.boost.org/MailArchives/boost/msg47220.php # define BOOST_NO_INCLASS_MEMBER_INITIALIZATION # define BOOST_NO_SFINAE # define BOOST_NO_ARRAY_TYPE_SPECIALIZATIONS # endif # if (__SUNPRO_CC <= 0x580) # define BOOST_NO_IS_ABSTRACT # endif # if (__SUNPRO_CC <= 0x5100) // Sun 5.10 may not correctly value-initialize objects of // some user defined types, as was reported in April 2010 // (CR 6947016), and confirmed by Steve Clamage. // (Niels Dekker, LKEB, May 2010). # define BOOST_NO_COMPLETE_VALUE_INITIALIZATION # endif // // Dynamic shared object (DSO) and dynamic-link library (DLL) support // #if __SUNPRO_CC > 0x500 # define BOOST_SYMBOL_EXPORT __global # define BOOST_SYMBOL_IMPORT __global # define BOOST_SYMBOL_VISIBLE __global #endif #if (__SUNPRO_CC < 0x5130) // C++03 features in 12.4: #define BOOST_NO_TWO_PHASE_NAME_LOOKUP #define BOOST_NO_SFINAE_EXPR #define BOOST_NO_ADL_BARRIER #define BOOST_NO_CXX11_VARIADIC_MACROS #endif #if (__SUNPRO_CC < 0x5130) || (__cplusplus < 201100) // C++11 only featuires in 12.4: #define BOOST_NO_CXX11_AUTO_DECLARATIONS #define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS #define BOOST_NO_CXX11_CHAR16_T #define BOOST_NO_CXX11_CHAR32_T #define BOOST_NO_CXX11_CONSTEXPR #define BOOST_NO_CXX11_DECLTYPE #define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS #define BOOST_NO_CXX11_DELETED_FUNCTIONS #define BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS #define BOOST_NO_CXX11_EXTERN_TEMPLATE #define BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS #define BOOST_NO_CXX11_HDR_INITIALIZER_LIST #define BOOST_NO_CXX11_LAMBDAS #define BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS #define BOOST_NO_CXX11_NOEXCEPT #define BOOST_NO_CXX11_NULLPTR #define BOOST_NO_CXX11_RANGE_BASED_FOR #define BOOST_NO_CXX11_RAW_LITERALS #define BOOST_NO_CXX11_RVALUE_REFERENCES #define BOOST_NO_CXX11_SCOPED_ENUMS #define BOOST_NO_CXX11_STATIC_ASSERT #define BOOST_NO_CXX11_TEMPLATE_ALIASES #define BOOST_NO_CXX11_UNICODE_LITERALS #define BOOST_NO_CXX11_ALIGNAS #define BOOST_NO_CXX11_TRAILING_RESULT_TYPES #define BOOST_NO_CXX11_INLINE_NAMESPACES #define BOOST_NO_CXX11_FINAL #endif #if (__SUNPRO_CC < 0x5140) || (__cplusplus < 201103) #define BOOST_NO_CXX11_VARIADIC_TEMPLATES #define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX #define BOOST_NO_CXX11_FIXED_LENGTH_VARIADIC_TEMPLATE_EXPANSION_PACKS #define BOOST_NO_CXX11_DECLTYPE_N3276 #define BOOST_NO_CXX11_USER_DEFINED_LITERALS #define BOOST_NO_CXX11_REF_QUALIFIERS #endif #define BOOST_NO_COMPLETE_VALUE_INITIALIZATION // // C++0x features // # define BOOST_HAS_LONG_LONG // C++ 14: #if !defined(__cpp_aggregate_nsdmi) || (__cpp_aggregate_nsdmi < 201304) # define BOOST_NO_CXX14_AGGREGATE_NSDMI #endif #if !defined(__cpp_binary_literals) || (__cpp_binary_literals < 201304) # define BOOST_NO_CXX14_BINARY_LITERALS #endif #if !defined(__cpp_constexpr) || (__cpp_constexpr < 201304) # define BOOST_NO_CXX14_CONSTEXPR #endif #if !defined(__cpp_decltype_auto) || (__cpp_decltype_auto < 201304) # define BOOST_NO_CXX14_DECLTYPE_AUTO #endif #if (__cplusplus < 201304) // There's no SD6 check for this.... # define BOOST_NO_CXX14_DIGIT_SEPARATORS #endif #if !defined(__cpp_generic_lambdas) || (__cpp_generic_lambdas < 201304) # define BOOST_NO_CXX14_GENERIC_LAMBDAS #endif #if !defined(__cpp_init_captures) || (__cpp_init_captures < 201304) # define BOOST_NO_CXX14_INITIALIZED_LAMBDA_CAPTURES #endif #if !defined(__cpp_return_type_deduction) || (__cpp_return_type_deduction < 201304) # define BOOST_NO_CXX14_RETURN_TYPE_DEDUCTION #endif #if !defined(__cpp_variable_templates) || (__cpp_variable_templates < 201304) # define BOOST_NO_CXX14_VARIABLE_TEMPLATES #endif // // Version // #define BOOST_COMPILER "Sun compiler version " BOOST_STRINGIZE(__SUNPRO_CC) // // versions check: // we don't support sunpro prior to version 4: #if __SUNPRO_CC < 0x400 #error "Compiler not supported or configured - please reconfigure" #endif // // last known and checked version is 0x590: #if (__SUNPRO_CC > 0x590) # if defined(BOOST_ASSERT_CONFIG) # error "Unknown compiler version - please run the configure tests and report the results" # endif #endif ================================================ FILE: benchmarks/boost/config/compiler/vacpp.hpp ================================================ // (C) Copyright John Maddock 2001 - 2003. // (C) Copyright Toon Knapen 2001 - 2003. // (C) Copyright Lie-Quan Lee 2001. // (C) Copyright Markus Schoepflin 2002 - 2003. // (C) Copyright Beman Dawes 2002 - 2003. // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org for most recent version. // Visual Age (IBM) C++ compiler setup: #if __IBMCPP__ <= 501 # define BOOST_NO_MEMBER_TEMPLATE_FRIENDS # define BOOST_NO_MEMBER_FUNCTION_SPECIALIZATIONS #endif #if (__IBMCPP__ <= 502) // Actually the compiler supports inclass member initialization but it // requires a definition for the class member and it doesn't recognize // it as an integral constant expression when used as a template argument. # define BOOST_NO_INCLASS_MEMBER_INITIALIZATION # define BOOST_NO_INTEGRAL_INT64_T # define BOOST_NO_MEMBER_TEMPLATE_KEYWORD #endif #if (__IBMCPP__ <= 600) || !defined(BOOST_STRICT_CONFIG) # define BOOST_NO_POINTER_TO_MEMBER_TEMPLATE_PARAMETERS #endif #if (__IBMCPP__ <= 1110) // XL C++ V11.1 and earlier versions may not always value-initialize // a temporary object T(), when T is a non-POD aggregate class type. // Michael Wong (IBM Canada Ltd) has confirmed this issue and gave it // high priority. -- Niels Dekker (LKEB), May 2010. # define BOOST_NO_COMPLETE_VALUE_INITIALIZATION #endif // // On AIX thread support seems to be indicated by _THREAD_SAFE: // #ifdef _THREAD_SAFE # define BOOST_HAS_THREADS #endif #define BOOST_COMPILER "IBM Visual Age version " BOOST_STRINGIZE(__IBMCPP__) // // versions check: // we don't support Visual age prior to version 5: #if __IBMCPP__ < 500 #error "Compiler not supported or configured - please reconfigure" #endif // // last known and checked version is 1210: #if (__IBMCPP__ > 1210) # if defined(BOOST_ASSERT_CONFIG) # error "Unknown compiler version - please run the configure tests and report the results" # endif #endif // Some versions of the compiler have issues with default arguments on partial specializations #if __IBMCPP__ <= 1010 #define BOOST_NO_PARTIAL_SPECIALIZATION_IMPLICIT_DEFAULT_ARGS #endif // // C++0x features // // See boost\config\suffix.hpp for BOOST_NO_LONG_LONG // #if ! __IBMCPP_AUTO_TYPEDEDUCTION # define BOOST_NO_CXX11_AUTO_DECLARATIONS # define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS #endif #if ! __IBMCPP_UTF_LITERAL__ # define BOOST_NO_CXX11_CHAR16_T # define BOOST_NO_CXX11_CHAR32_T #endif #if ! __IBMCPP_CONSTEXPR # define BOOST_NO_CXX11_CONSTEXPR #endif #if ! __IBMCPP_DECLTYPE # define BOOST_NO_CXX11_DECLTYPE #else # define BOOST_HAS_DECLTYPE #endif #define BOOST_NO_CXX11_DECLTYPE_N3276 #define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS #define BOOST_NO_CXX11_DELETED_FUNCTIONS #if ! __IBMCPP_EXPLICIT_CONVERSION_OPERATORS # define BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS #endif #if ! __IBMCPP_EXTERN_TEMPLATE # define BOOST_NO_CXX11_EXTERN_TEMPLATE #endif #if ! __IBMCPP_VARIADIC_TEMPLATES // not enabled separately at this time # define BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS #endif #define BOOST_NO_CXX11_HDR_INITIALIZER_LIST #define BOOST_NO_CXX11_LAMBDAS #define BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS #define BOOST_NO_CXX11_NOEXCEPT #define BOOST_NO_CXX11_NULLPTR #define BOOST_NO_CXX11_RANGE_BASED_FOR #define BOOST_NO_CXX11_RAW_LITERALS #define BOOST_NO_CXX11_USER_DEFINED_LITERALS #if ! __IBMCPP_RVALUE_REFERENCES # define BOOST_NO_CXX11_RVALUE_REFERENCES #endif #if ! __IBMCPP_SCOPED_ENUM # define BOOST_NO_CXX11_SCOPED_ENUMS #endif #define BOOST_NO_SFINAE_EXPR #define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX #if ! __IBMCPP_STATIC_ASSERT # define BOOST_NO_CXX11_STATIC_ASSERT #endif #define BOOST_NO_CXX11_TEMPLATE_ALIASES #define BOOST_NO_CXX11_UNICODE_LITERALS #if ! __IBMCPP_VARIADIC_TEMPLATES # define BOOST_NO_CXX11_VARIADIC_TEMPLATES #endif #if ! __C99_MACRO_WITH_VA_ARGS # define BOOST_NO_CXX11_VARIADIC_MACROS #endif #define BOOST_NO_CXX11_ALIGNAS #define BOOST_NO_CXX11_TRAILING_RESULT_TYPES #define BOOST_NO_CXX11_INLINE_NAMESPACES #define BOOST_NO_CXX11_REF_QUALIFIERS #define BOOST_NO_CXX11_FINAL // C++ 14: #if !defined(__cpp_aggregate_nsdmi) || (__cpp_aggregate_nsdmi < 201304) # define BOOST_NO_CXX14_AGGREGATE_NSDMI #endif #if !defined(__cpp_binary_literals) || (__cpp_binary_literals < 201304) # define BOOST_NO_CXX14_BINARY_LITERALS #endif #if !defined(__cpp_constexpr) || (__cpp_constexpr < 201304) # define BOOST_NO_CXX14_CONSTEXPR #endif #if !defined(__cpp_decltype_auto) || (__cpp_decltype_auto < 201304) # define BOOST_NO_CXX14_DECLTYPE_AUTO #endif #if (__cplusplus < 201304) // There's no SD6 check for this.... # define BOOST_NO_CXX14_DIGIT_SEPARATORS #endif #if !defined(__cpp_generic_lambdas) || (__cpp_generic_lambdas < 201304) # define BOOST_NO_CXX14_GENERIC_LAMBDAS #endif #if !defined(__cpp_init_captures) || (__cpp_init_captures < 201304) # define BOOST_NO_CXX14_INITIALIZED_LAMBDA_CAPTURES #endif #if !defined(__cpp_return_type_deduction) || (__cpp_return_type_deduction < 201304) # define BOOST_NO_CXX14_RETURN_TYPE_DEDUCTION #endif #if !defined(__cpp_variable_templates) || (__cpp_variable_templates < 201304) # define BOOST_NO_CXX14_VARIABLE_TEMPLATES #endif ================================================ FILE: benchmarks/boost/config/compiler/visualc.hpp ================================================ // (C) Copyright John Maddock 2001 - 2003. // (C) Copyright Darin Adler 2001 - 2002. // (C) Copyright Peter Dimov 2001. // (C) Copyright Aleksey Gurtovoy 2002. // (C) Copyright David Abrahams 2002 - 2003. // (C) Copyright Beman Dawes 2002 - 2003. // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org for most recent version. // // Microsoft Visual C++ compiler setup: // // We need to be careful with the checks in this file, as contrary // to popular belief there are versions with _MSC_VER with the final // digit non-zero (mainly the MIPS cross compiler). // // So we either test _MSC_VER >= XXXX or else _MSC_VER < XXXX. // No other comparisons (==, >, or <=) are safe. // #define BOOST_MSVC _MSC_VER // // Helper macro BOOST_MSVC_FULL_VER for use in Boost code: // #if _MSC_FULL_VER > 100000000 # define BOOST_MSVC_FULL_VER _MSC_FULL_VER #else # define BOOST_MSVC_FULL_VER (_MSC_FULL_VER * 10) #endif // Attempt to suppress VC6 warnings about the length of decorated names (obsolete): #pragma warning( disable : 4503 ) // warning: decorated name length exceeded #define BOOST_HAS_PRAGMA_ONCE // // versions check: // we don't support Visual C++ prior to version 7.1: #if _MSC_VER < 1310 # error "Compiler not supported or configured - please reconfigure" #endif #if _MSC_FULL_VER < 180020827 # define BOOST_NO_FENV_H #endif #if _MSC_VER < 1400 // although a conforming signature for swprint exists in VC7.1 // it appears not to actually work: # define BOOST_NO_SWPRINTF // Our extern template tests also fail for this compiler: # define BOOST_NO_CXX11_EXTERN_TEMPLATE // Variadic macros do not exist for VC7.1 and lower # define BOOST_NO_CXX11_VARIADIC_MACROS # define BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS #endif #if _MSC_VER < 1500 // 140X == VC++ 8.0 # define BOOST_NO_MEMBER_TEMPLATE_FRIENDS #endif #if _MSC_VER < 1600 // 150X == VC++ 9.0 // A bug in VC9: # define BOOST_NO_ADL_BARRIER #endif #ifndef _NATIVE_WCHAR_T_DEFINED # define BOOST_NO_INTRINSIC_WCHAR_T #endif // // check for exception handling support: #if !defined(_CPPUNWIND) && !defined(BOOST_NO_EXCEPTIONS) # define BOOST_NO_EXCEPTIONS #endif // // __int64 support: // #define BOOST_HAS_MS_INT64 #if defined(_MSC_EXTENSIONS) || (_MSC_VER >= 1400) # define BOOST_HAS_LONG_LONG #else # define BOOST_NO_LONG_LONG #endif #if (_MSC_VER >= 1400) && !defined(_DEBUG) # define BOOST_HAS_NRVO #endif #if _MSC_VER >= 1600 // 160X == VC++ 10.0 # define BOOST_HAS_PRAGMA_DETECT_MISMATCH #endif // // disable Win32 API's if compiler extensions are // turned off: // #if !defined(_MSC_EXTENSIONS) && !defined(BOOST_DISABLE_WIN32) # define BOOST_DISABLE_WIN32 #endif #if !defined(_CPPRTTI) && !defined(BOOST_NO_RTTI) # define BOOST_NO_RTTI #endif // // TR1 features: // #if _MSC_VER >= 1700 // # define BOOST_HAS_TR1_HASH // don't know if this is true yet. // # define BOOST_HAS_TR1_TYPE_TRAITS // don't know if this is true yet. # define BOOST_HAS_TR1_UNORDERED_MAP # define BOOST_HAS_TR1_UNORDERED_SET #endif // // C++0x features // // See above for BOOST_NO_LONG_LONG // C++ features supported by VC++ 10 (aka 2010) // #if _MSC_VER < 1600 # define BOOST_NO_CXX11_AUTO_DECLARATIONS # define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS # define BOOST_NO_CXX11_LAMBDAS # define BOOST_NO_CXX11_RVALUE_REFERENCES # define BOOST_NO_CXX11_STATIC_ASSERT # define BOOST_NO_CXX11_NULLPTR # define BOOST_NO_CXX11_DECLTYPE #endif // _MSC_VER < 1600 #if _MSC_VER >= 1600 # define BOOST_HAS_STDINT_H #endif // C++11 features supported by VC++ 11 (aka 2012) // #if _MSC_VER < 1700 # define BOOST_NO_CXX11_FINAL # define BOOST_NO_CXX11_RANGE_BASED_FOR # define BOOST_NO_CXX11_SCOPED_ENUMS #endif // _MSC_VER < 1700 // C++11 features supported by VC++ 12 (aka 2013). // #if _MSC_FULL_VER < 180020827 # define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS # define BOOST_NO_CXX11_DELETED_FUNCTIONS # define BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS # define BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS # define BOOST_NO_CXX11_RAW_LITERALS # define BOOST_NO_CXX11_TEMPLATE_ALIASES # define BOOST_NO_CXX11_TRAILING_RESULT_TYPES # define BOOST_NO_CXX11_VARIADIC_TEMPLATES # define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX # define BOOST_NO_CXX11_DECLTYPE_N3276 #endif // C++11 features supported by VC++ 14 (aka 2015) // #if (_MSC_FULL_VER < 190023026) # define BOOST_NO_CXX11_NOEXCEPT # define BOOST_NO_CXX11_REF_QUALIFIERS # define BOOST_NO_CXX11_USER_DEFINED_LITERALS # define BOOST_NO_CXX11_ALIGNAS # define BOOST_NO_CXX11_INLINE_NAMESPACES # define BOOST_NO_CXX11_CHAR16_T # define BOOST_NO_CXX11_CHAR32_T # define BOOST_NO_CXX11_UNICODE_LITERALS # define BOOST_NO_CXX14_DECLTYPE_AUTO # define BOOST_NO_CXX14_INITIALIZED_LAMBDA_CAPTURES # define BOOST_NO_CXX14_RETURN_TYPE_DEDUCTION # define BOOST_NO_CXX14_BINARY_LITERALS # define BOOST_NO_CXX14_GENERIC_LAMBDAS # define BOOST_NO_CXX14_DIGIT_SEPARATORS #endif // MSVC including version 14 has not yet completely // implemented value-initialization, as is reported: // "VC++ does not value-initialize members of derived classes without // user-declared constructor", reported in 2009 by Sylvester Hesp: // https://connect.microsoft.com/VisualStudio/feedback/details/484295 // "Presence of copy constructor breaks member class initialization", // reported in 2009 by Alex Vakulenko: // https://connect.microsoft.com/VisualStudio/feedback/details/499606 // "Value-initialization in new-expression", reported in 2005 by // Pavel Kuznetsov (MetaCommunications Engineering): // https://connect.microsoft.com/VisualStudio/feedback/details/100744 // Reported again by John Maddock in 2015 for VC14: // https://connect.microsoft.com/VisualStudio/feedback/details/1582233/c-subobjects-still-not-value-initialized-correctly // See also: http://www.boost.org/libs/utility/value_init.htm#compiler_issues // (Niels Dekker, LKEB, May 2010) #define BOOST_NO_COMPLETE_VALUE_INITIALIZATION // C++11 features not supported by any versions #define BOOST_NO_SFINAE_EXPR #define BOOST_NO_TWO_PHASE_NAME_LOOKUP // // This is somewhat supported in VC14, but we may need to wait for // a service release before enabling: // #define BOOST_NO_CXX11_CONSTEXPR // C++ 14: #if !defined(__cpp_aggregate_nsdmi) || (__cpp_aggregate_nsdmi < 201304) # define BOOST_NO_CXX14_AGGREGATE_NSDMI #endif #if !defined(__cpp_constexpr) || (__cpp_constexpr < 201304) # define BOOST_NO_CXX14_CONSTEXPR #endif #if !defined(__cpp_variable_templates) || (__cpp_variable_templates < 201304) # define BOOST_NO_CXX14_VARIABLE_TEMPLATES #endif // // prefix and suffix headers: // #ifndef BOOST_ABI_PREFIX # define BOOST_ABI_PREFIX "boost/config/abi/msvc_prefix.hpp" #endif #ifndef BOOST_ABI_SUFFIX # define BOOST_ABI_SUFFIX "boost/config/abi/msvc_suffix.hpp" #endif #ifndef BOOST_COMPILER // TODO: // these things are mostly bogus. 1200 means version 12.0 of the compiler. The // artificial versions assigned to them only refer to the versions of some IDE // these compilers have been shipped with, and even that is not all of it. Some // were shipped with freely downloadable SDKs, others as crosscompilers in eVC. // IOW, you can't use these 'versions' in any sensible way. Sorry. # if defined(UNDER_CE) # if _MSC_VER < 1400 // Note: I'm not aware of any CE compiler with version 13xx # if defined(BOOST_ASSERT_CONFIG) # error "Unknown EVC++ compiler version - please run the configure tests and report the results" # else # pragma message("Unknown EVC++ compiler version - please run the configure tests and report the results") # endif # elif _MSC_VER < 1500 # define BOOST_COMPILER_VERSION evc8 # elif _MSC_VER < 1600 # define BOOST_COMPILER_VERSION evc9 # elif _MSC_VER < 1700 # define BOOST_COMPILER_VERSION evc10 # elif _MSC_VER < 1800 # define BOOST_COMPILER_VERSION evc11 # elif _MSC_VER < 1900 # define BOOST_COMPILER_VERSION evc12 # elif _MSC_VER < 2000 # define BOOST_COMPILER_VERSION evc14 # else # if defined(BOOST_ASSERT_CONFIG) # error "Unknown EVC++ compiler version - please run the configure tests and report the results" # else # pragma message("Unknown EVC++ compiler version - please run the configure tests and report the results") # endif # endif # else # if _MSC_VER < 1310 // Note: Versions up to 7.0 aren't supported. # define BOOST_COMPILER_VERSION 5.0 # elif _MSC_VER < 1300 # define BOOST_COMPILER_VERSION 6.0 # elif _MSC_VER < 1310 # define BOOST_COMPILER_VERSION 7.0 # elif _MSC_VER < 1400 # define BOOST_COMPILER_VERSION 7.1 # elif _MSC_VER < 1500 # define BOOST_COMPILER_VERSION 8.0 # elif _MSC_VER < 1600 # define BOOST_COMPILER_VERSION 9.0 # elif _MSC_VER < 1700 # define BOOST_COMPILER_VERSION 10.0 # elif _MSC_VER < 1800 # define BOOST_COMPILER_VERSION 11.0 # elif _MSC_VER < 1900 # define BOOST_COMPILER_VERSION 12.0 # elif _MSC_VER < 2000 # define BOOST_COMPILER_VERSION 14.0 # else # define BOOST_COMPILER_VERSION _MSC_VER # endif # endif # define BOOST_COMPILER "Microsoft Visual C++ version " BOOST_STRINGIZE(BOOST_COMPILER_VERSION) #endif // // last known and checked version is 19.00.23026 (VC++ 2015 RTM): #if (_MSC_VER > 1900) # if defined(BOOST_ASSERT_CONFIG) # error "Unknown compiler version - please run the configure tests and report the results" # else # pragma message("Unknown compiler version - please run the configure tests and report the results") # endif #endif ================================================ FILE: benchmarks/boost/config/compiler/xlcpp.hpp ================================================ // (C) Copyright Douglas Gregor 2010 // // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org for most recent version. // compiler setup for IBM XL C/C++ for Linux (Little Endian) based on clang. #define BOOST_HAS_PRAGMA_ONCE // Detecting `-fms-extension` compiler flag assuming that _MSC_VER defined when that flag is used. #if defined (_MSC_VER) && (__clang_major__ > 3 || (__clang_major__ == 3 && __clang_minor__ >= 4)) # define BOOST_HAS_PRAGMA_DETECT_MISMATCH #endif // When compiling with clang before __has_extension was defined, // even if one writes 'defined(__has_extension) && __has_extension(xxx)', // clang reports a compiler error. So the only workaround found is: #ifndef __has_extension #define __has_extension __has_feature #endif #if !__has_feature(cxx_exceptions) && !defined(BOOST_NO_EXCEPTIONS) # define BOOST_NO_EXCEPTIONS #endif #if !__has_feature(cxx_rtti) && !defined(BOOST_NO_RTTI) # define BOOST_NO_RTTI #endif #if !__has_feature(cxx_rtti) && !defined(BOOST_NO_TYPEID) # define BOOST_NO_TYPEID #endif #if defined(__int64) && !defined(__GNUC__) # define BOOST_HAS_MS_INT64 #endif #define BOOST_HAS_NRVO // Branch prediction hints #if defined(__has_builtin) #if __has_builtin(__builtin_expect) #define BOOST_LIKELY(x) __builtin_expect(x, 1) #define BOOST_UNLIKELY(x) __builtin_expect(x, 0) #endif #endif // Clang supports "long long" in all compilation modes. #define BOOST_HAS_LONG_LONG // // Dynamic shared object (DSO) and dynamic-link library (DLL) support // #if !defined(_WIN32) && !defined(__WIN32__) && !defined(WIN32) # define BOOST_SYMBOL_EXPORT __attribute__((__visibility__("default"))) # define BOOST_SYMBOL_IMPORT # define BOOST_SYMBOL_VISIBLE __attribute__((__visibility__("default"))) #endif // // The BOOST_FALLTHROUGH macro can be used to annotate implicit fall-through // between switch labels. // #if __cplusplus >= 201103L && defined(__has_warning) # if __has_feature(cxx_attributes) && __has_warning("-Wimplicit-fallthrough") # define BOOST_FALLTHROUGH [[clang::fallthrough]] # endif #endif #if !__has_feature(cxx_auto_type) # define BOOST_NO_CXX11_AUTO_DECLARATIONS # define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS #endif // // Currently clang on Windows using VC++ RTL does not support C++11's char16_t or char32_t // #if defined(_MSC_VER) || !(defined(__GXX_EXPERIMENTAL_CXX0X__) || __cplusplus >= 201103L) # define BOOST_NO_CXX11_CHAR16_T # define BOOST_NO_CXX11_CHAR32_T #endif #if !__has_feature(cxx_constexpr) # define BOOST_NO_CXX11_CONSTEXPR #endif #if !__has_feature(cxx_decltype) # define BOOST_NO_CXX11_DECLTYPE #endif #if !__has_feature(cxx_decltype_incomplete_return_types) # define BOOST_NO_CXX11_DECLTYPE_N3276 #endif #if !__has_feature(cxx_defaulted_functions) # define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS #endif #if !__has_feature(cxx_deleted_functions) # define BOOST_NO_CXX11_DELETED_FUNCTIONS #endif #if !__has_feature(cxx_explicit_conversions) # define BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS #endif #if !__has_feature(cxx_default_function_template_args) # define BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS #endif #if !__has_feature(cxx_generalized_initializers) # define BOOST_NO_CXX11_HDR_INITIALIZER_LIST #endif #if !__has_feature(cxx_lambdas) # define BOOST_NO_CXX11_LAMBDAS #endif #if !__has_feature(cxx_local_type_template_args) # define BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS #endif #if !__has_feature(cxx_noexcept) # define BOOST_NO_CXX11_NOEXCEPT #endif #if !__has_feature(cxx_nullptr) # define BOOST_NO_CXX11_NULLPTR #endif #if !__has_feature(cxx_range_for) # define BOOST_NO_CXX11_RANGE_BASED_FOR #endif #if !__has_feature(cxx_raw_string_literals) # define BOOST_NO_CXX11_RAW_LITERALS #endif #if !__has_feature(cxx_reference_qualified_functions) # define BOOST_NO_CXX11_REF_QUALIFIERS #endif #if !__has_feature(cxx_generalized_initializers) # define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX #endif #if !__has_feature(cxx_rvalue_references) # define BOOST_NO_CXX11_RVALUE_REFERENCES #endif #if !__has_feature(cxx_strong_enums) # define BOOST_NO_CXX11_SCOPED_ENUMS #endif #if !__has_feature(cxx_static_assert) # define BOOST_NO_CXX11_STATIC_ASSERT #endif #if !__has_feature(cxx_alias_templates) # define BOOST_NO_CXX11_TEMPLATE_ALIASES #endif #if !__has_feature(cxx_unicode_literals) # define BOOST_NO_CXX11_UNICODE_LITERALS #endif #if !__has_feature(cxx_variadic_templates) # define BOOST_NO_CXX11_VARIADIC_TEMPLATES #endif #if !__has_feature(cxx_user_literals) # define BOOST_NO_CXX11_USER_DEFINED_LITERALS #endif #if !__has_feature(cxx_alignas) # define BOOST_NO_CXX11_ALIGNAS #endif #if !__has_feature(cxx_trailing_return) # define BOOST_NO_CXX11_TRAILING_RESULT_TYPES #endif #if !__has_feature(cxx_inline_namespaces) # define BOOST_NO_CXX11_INLINE_NAMESPACES #endif #if !__has_feature(cxx_override_control) # define BOOST_NO_CXX11_FINAL #endif #if !(__has_feature(__cxx_binary_literals__) || __has_extension(__cxx_binary_literals__)) # define BOOST_NO_CXX14_BINARY_LITERALS #endif #if !__has_feature(__cxx_decltype_auto__) # define BOOST_NO_CXX14_DECLTYPE_AUTO #endif #if !__has_feature(__cxx_aggregate_nsdmi__) # define BOOST_NO_CXX14_AGGREGATE_NSDMI #endif #if !__has_feature(__cxx_init_captures__) # define BOOST_NO_CXX14_INITIALIZED_LAMBDA_CAPTURES #endif #if !__has_feature(__cxx_generic_lambdas__) # define BOOST_NO_CXX14_GENERIC_LAMBDAS #endif // clang < 3.5 has a defect with dependent type, like following. // // template // constexpr typename enable_if >::type foo(T &) // { } // error: no return statement in constexpr function // // This issue also affects C++11 mode, but C++11 constexpr requires return stmt. // Therefore we don't care such case. // // Note that we can't check Clang version directly as the numbering system changes depending who's // creating the Clang release (see https://github.com/boostorg/config/pull/39#issuecomment-59927873) // so instead verify that we have a feature that was introduced at the same time as working C++14 // constexpr (generic lambda's in this case): // #if !__has_feature(__cxx_generic_lambdas__) || !__has_feature(__cxx_relaxed_constexpr__) # define BOOST_NO_CXX14_CONSTEXPR #endif #if !__has_feature(__cxx_return_type_deduction__) # define BOOST_NO_CXX14_RETURN_TYPE_DEDUCTION #endif #if !__has_feature(__cxx_variable_templates__) # define BOOST_NO_CXX14_VARIABLE_TEMPLATES #endif #if __cplusplus < 201400 // All versions with __cplusplus above this value seem to support this: # define BOOST_NO_CXX14_DIGIT_SEPARATORS #endif // Unused attribute: #if defined(__GNUC__) && (__GNUC__ >= 4) # define BOOST_ATTRIBUTE_UNUSED __attribute__((unused)) #endif #ifndef BOOST_COMPILER # define BOOST_COMPILER "Clang version " __clang_version__ #endif // Macro used to identify the Clang compiler. #define BOOST_CLANG 1 ================================================ FILE: benchmarks/boost/config/no_tr1/cmath.hpp ================================================ // (C) Copyright John Maddock 2008. // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // // The aim of this header is just to include but to do // so in a way that does not result in recursive inclusion of // the Boost TR1 components if boost/tr1/tr1/cmath is in the // include search path. We have to do this to avoid circular // dependencies: // #ifndef BOOST_CONFIG_CMATH # define BOOST_CONFIG_CMATH # ifndef BOOST_TR1_NO_RECURSION # define BOOST_TR1_NO_RECURSION # define BOOST_CONFIG_NO_CMATH_RECURSION # endif # include # ifdef BOOST_CONFIG_NO_CMATH_RECURSION # undef BOOST_TR1_NO_RECURSION # undef BOOST_CONFIG_NO_CMATH_RECURSION # endif #endif ================================================ FILE: benchmarks/boost/config/no_tr1/complex.hpp ================================================ // (C) Copyright John Maddock 2005. // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // // The aim of this header is just to include but to do // so in a way that does not result in recursive inclusion of // the Boost TR1 components if boost/tr1/tr1/complex is in the // include search path. We have to do this to avoid circular // dependencies: // #ifndef BOOST_CONFIG_COMPLEX # define BOOST_CONFIG_COMPLEX # ifndef BOOST_TR1_NO_RECURSION # define BOOST_TR1_NO_RECURSION # define BOOST_CONFIG_NO_COMPLEX_RECURSION # endif # include # ifdef BOOST_CONFIG_NO_COMPLEX_RECURSION # undef BOOST_TR1_NO_RECURSION # undef BOOST_CONFIG_NO_COMPLEX_RECURSION # endif #endif ================================================ FILE: benchmarks/boost/config/no_tr1/functional.hpp ================================================ // (C) Copyright John Maddock 2005. // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // // The aim of this header is just to include but to do // so in a way that does not result in recursive inclusion of // the Boost TR1 components if boost/tr1/tr1/functional is in the // include search path. We have to do this to avoid circular // dependencies: // #ifndef BOOST_CONFIG_FUNCTIONAL # define BOOST_CONFIG_FUNCTIONAL # ifndef BOOST_TR1_NO_RECURSION # define BOOST_TR1_NO_RECURSION # define BOOST_CONFIG_NO_FUNCTIONAL_RECURSION # endif # include # ifdef BOOST_CONFIG_NO_FUNCTIONAL_RECURSION # undef BOOST_TR1_NO_RECURSION # undef BOOST_CONFIG_NO_FUNCTIONAL_RECURSION # endif #endif ================================================ FILE: benchmarks/boost/config/no_tr1/memory.hpp ================================================ // (C) Copyright John Maddock 2005. // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // // The aim of this header is just to include but to do // so in a way that does not result in recursive inclusion of // the Boost TR1 components if boost/tr1/tr1/memory is in the // include search path. We have to do this to avoid circular // dependencies: // #ifndef BOOST_CONFIG_MEMORY # define BOOST_CONFIG_MEMORY # ifndef BOOST_TR1_NO_RECURSION # define BOOST_TR1_NO_RECURSION # define BOOST_CONFIG_NO_MEMORY_RECURSION # endif # include # ifdef BOOST_CONFIG_NO_MEMORY_RECURSION # undef BOOST_TR1_NO_RECURSION # undef BOOST_CONFIG_NO_MEMORY_RECURSION # endif #endif ================================================ FILE: benchmarks/boost/config/no_tr1/utility.hpp ================================================ // (C) Copyright John Maddock 2005. // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // // The aim of this header is just to include but to do // so in a way that does not result in recursive inclusion of // the Boost TR1 components if boost/tr1/tr1/utility is in the // include search path. We have to do this to avoid circular // dependencies: // #ifndef BOOST_CONFIG_UTILITY # define BOOST_CONFIG_UTILITY # ifndef BOOST_TR1_NO_RECURSION # define BOOST_TR1_NO_RECURSION # define BOOST_CONFIG_NO_UTILITY_RECURSION # endif # include # ifdef BOOST_CONFIG_NO_UTILITY_RECURSION # undef BOOST_TR1_NO_RECURSION # undef BOOST_CONFIG_NO_UTILITY_RECURSION # endif #endif ================================================ FILE: benchmarks/boost/config/platform/aix.hpp ================================================ // (C) Copyright John Maddock 2001 - 2002. // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org for most recent version. // IBM/Aix specific config options: #define BOOST_PLATFORM "IBM Aix" #define BOOST_HAS_UNISTD_H #define BOOST_HAS_NL_TYPES_H #define BOOST_HAS_NANOSLEEP #define BOOST_HAS_CLOCK_GETTIME // This needs support in "boost/cstdint.hpp" exactly like FreeBSD. // This platform has header named which includes all // the things needed. #define BOOST_HAS_STDINT_H // Threading API's: #define BOOST_HAS_PTHREADS #define BOOST_HAS_PTHREAD_DELAY_NP #define BOOST_HAS_SCHED_YIELD //#define BOOST_HAS_PTHREAD_YIELD // boilerplate code: #include ================================================ FILE: benchmarks/boost/config/platform/amigaos.hpp ================================================ // (C) Copyright John Maddock 2002. // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org for most recent version. #define BOOST_PLATFORM "AmigaOS" #define BOOST_DISABLE_THREADS #define BOOST_NO_CWCHAR #define BOOST_NO_STD_WSTRING #define BOOST_NO_INTRINSIC_WCHAR_T ================================================ FILE: benchmarks/boost/config/platform/beos.hpp ================================================ // (C) Copyright John Maddock 2001. // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org for most recent version. // BeOS specific config options: #define BOOST_PLATFORM "BeOS" #define BOOST_NO_CWCHAR #define BOOST_NO_CWCTYPE #define BOOST_HAS_UNISTD_H #define BOOST_HAS_BETHREADS #ifndef BOOST_DISABLE_THREADS # define BOOST_HAS_THREADS #endif // boilerplate code: #include ================================================ FILE: benchmarks/boost/config/platform/bsd.hpp ================================================ // (C) Copyright John Maddock 2001 - 2003. // (C) Copyright Darin Adler 2001. // (C) Copyright Douglas Gregor 2002. // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org for most recent version. // generic BSD config options: #if !defined(__FreeBSD__) && !defined(__NetBSD__) && !defined(__OpenBSD__) && !defined(__DragonFly__) #error "This platform is not BSD" #endif #ifdef __FreeBSD__ #define BOOST_PLATFORM "FreeBSD " BOOST_STRINGIZE(__FreeBSD__) #elif defined(__NetBSD__) #define BOOST_PLATFORM "NetBSD " BOOST_STRINGIZE(__NetBSD__) #elif defined(__OpenBSD__) #define BOOST_PLATFORM "OpenBSD " BOOST_STRINGIZE(__OpenBSD__) #elif defined(__DragonFly__) #define BOOST_PLATFORM "DragonFly " BOOST_STRINGIZE(__DragonFly__) #endif // // is this the correct version check? // FreeBSD has but does not // advertise the fact in : // #if (defined(__FreeBSD__) && (__FreeBSD__ >= 3)) || defined(__DragonFly__) # define BOOST_HAS_NL_TYPES_H #endif // // FreeBSD 3.x has pthreads support, but defines _POSIX_THREADS in // and not in // #if (defined(__FreeBSD__) && (__FreeBSD__ <= 3))\ || defined(__OpenBSD__) || defined(__DragonFly__) # define BOOST_HAS_PTHREADS #endif // // No wide character support in the BSD header files: // #if defined(__NetBSD__) #define __NetBSD_GCC__ (__GNUC__ * 1000000 \ + __GNUC_MINOR__ * 1000 \ + __GNUC_PATCHLEVEL__) // XXX - the following is required until c++config.h // defines _GLIBCXX_HAVE_SWPRINTF and friends // or the preprocessor conditionals are removed // from the cwchar header. #define _GLIBCXX_HAVE_SWPRINTF 1 #endif #if !((defined(__FreeBSD__) && (__FreeBSD__ >= 5)) \ || (defined(__NetBSD_GCC__) && (__NetBSD_GCC__ >= 2095003)) || defined(__DragonFly__)) # define BOOST_NO_CWCHAR #endif // // The BSD has macros only, no functions: // #if !defined(__OpenBSD__) || defined(__DragonFly__) # define BOOST_NO_CTYPE_FUNCTIONS #endif // // thread API's not auto detected: // #define BOOST_HAS_SCHED_YIELD #define BOOST_HAS_NANOSLEEP #define BOOST_HAS_GETTIMEOFDAY #define BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE #define BOOST_HAS_SIGACTION // boilerplate code: #define BOOST_HAS_UNISTD_H #include ================================================ FILE: benchmarks/boost/config/platform/cloudabi.hpp ================================================ // Copyright Nuxi, https://nuxi.nl/ 2015. // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) #define BOOST_PLATFORM "CloudABI" #define BOOST_HAS_DIRENT_H #define BOOST_HAS_STDINT_H #define BOOST_HAS_UNISTD_H #define BOOST_HAS_CLOCK_GETTIME #define BOOST_HAS_EXPM1 #define BOOST_HAS_GETTIMEOFDAY #define BOOST_HAS_LOG1P #define BOOST_HAS_NANOSLEEP #define BOOST_HAS_PTHREADS #define BOOST_HAS_SCHED_YIELD ================================================ FILE: benchmarks/boost/config/platform/cray.hpp ================================================ // (C) Copyright John Maddock 2011. // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org for most recent version. // SGI Irix specific config options: #define BOOST_PLATFORM "Cray" // boilerplate code: #define BOOST_HAS_UNISTD_H #include ================================================ FILE: benchmarks/boost/config/platform/cygwin.hpp ================================================ // (C) Copyright John Maddock 2001 - 2003. // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org for most recent version. // cygwin specific config options: #define BOOST_PLATFORM "Cygwin" #define BOOST_HAS_DIRENT_H #define BOOST_HAS_LOG1P #define BOOST_HAS_EXPM1 // // Threading API: // See if we have POSIX threads, if we do use them, otherwise // revert to native Win threads. #define BOOST_HAS_UNISTD_H #include #if defined(_POSIX_THREADS) && (_POSIX_THREADS+0 >= 0) && !defined(BOOST_HAS_WINTHREADS) # define BOOST_HAS_PTHREADS # define BOOST_HAS_SCHED_YIELD # define BOOST_HAS_GETTIMEOFDAY # define BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE # define BOOST_HAS_SIGACTION #else # if !defined(BOOST_HAS_WINTHREADS) # define BOOST_HAS_WINTHREADS # endif # define BOOST_HAS_FTIME #endif // // find out if we have a stdint.h, there should be a better way to do this: // #include #ifdef _STDINT_H #define BOOST_HAS_STDINT_H #endif /// Cygwin has no fenv.h #define BOOST_NO_FENV_H // boilerplate code: #include // // Cygwin lies about XSI conformance, there is no nl_types.h: // #ifdef BOOST_HAS_NL_TYPES_H # undef BOOST_HAS_NL_TYPES_H #endif ================================================ FILE: benchmarks/boost/config/platform/haiku.hpp ================================================ // (C) Copyright Jessica Hamilton 2014. // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org for most recent version. // Haiku specific config options: #define BOOST_PLATFORM "Haiku" #define BOOST_HAS_UNISTD_H #define BOOST_HAS_STDINT_H #ifndef BOOST_DISABLE_THREADS # define BOOST_HAS_THREADS #endif #define BOOST_NO_CXX11_HDR_TYPE_TRAITS #define BOOST_NO_CXX11_ATOMIC_SMART_PTR #define BOOST_NO_CXX11_STATIC_ASSERT #define BOOST_NO_CXX11_VARIADIC_MACROS // // thread API's not auto detected: // #define BOOST_HAS_SCHED_YIELD #define BOOST_HAS_GETTIMEOFDAY // boilerplate code: #include ================================================ FILE: benchmarks/boost/config/platform/hpux.hpp ================================================ // (C) Copyright John Maddock 2001 - 2003. // (C) Copyright Jens Maurer 2001 - 2003. // (C) Copyright David Abrahams 2002. // (C) Copyright Toon Knapen 2003. // (C) Copyright Boris Gubenko 2006 - 2007. // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org for most recent version. // hpux specific config options: #define BOOST_PLATFORM "HP-UX" // In principle, HP-UX has a nice under the name // However, it has the following problem: // Use of UINT32_C(0) results in "0u l" for the preprocessed source // (verifyable with gcc 2.95.3) #if (defined(__GNUC__) && (__GNUC__ >= 3)) || defined(__HP_aCC) # define BOOST_HAS_STDINT_H #endif #if !(defined(__HP_aCC) || !defined(_INCLUDE__STDC_A1_SOURCE)) # define BOOST_NO_SWPRINTF #endif #if defined(__HP_aCC) && !defined(_INCLUDE__STDC_A1_SOURCE) # define BOOST_NO_CWCTYPE #endif #if defined(__GNUC__) # if (__GNUC__ < 3) || ((__GNUC__ == 3) && (__GNUC_MINOR__ < 3)) // GNU C on HP-UX does not support threads (checked up to gcc 3.3) # define BOOST_DISABLE_THREADS # elif !defined(BOOST_DISABLE_THREADS) // threads supported from gcc-3.3 onwards: # define BOOST_HAS_THREADS # define BOOST_HAS_PTHREADS # endif #elif defined(__HP_aCC) && !defined(BOOST_DISABLE_THREADS) # define BOOST_HAS_PTHREADS #endif // boilerplate code: #define BOOST_HAS_UNISTD_H #include // the following are always available: #ifndef BOOST_HAS_GETTIMEOFDAY # define BOOST_HAS_GETTIMEOFDAY #endif #ifndef BOOST_HAS_SCHED_YIELD # define BOOST_HAS_SCHED_YIELD #endif #ifndef BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE # define BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE #endif #ifndef BOOST_HAS_NL_TYPES_H # define BOOST_HAS_NL_TYPES_H #endif #ifndef BOOST_HAS_NANOSLEEP # define BOOST_HAS_NANOSLEEP #endif #ifndef BOOST_HAS_GETTIMEOFDAY # define BOOST_HAS_GETTIMEOFDAY #endif #ifndef BOOST_HAS_DIRENT_H # define BOOST_HAS_DIRENT_H #endif #ifndef BOOST_HAS_CLOCK_GETTIME # define BOOST_HAS_CLOCK_GETTIME #endif #ifndef BOOST_HAS_SIGACTION # define BOOST_HAS_SIGACTION #endif #ifndef BOOST_HAS_NRVO # ifndef __parisc # define BOOST_HAS_NRVO # endif #endif #ifndef BOOST_HAS_LOG1P # define BOOST_HAS_LOG1P #endif #ifndef BOOST_HAS_EXPM1 # define BOOST_HAS_EXPM1 #endif ================================================ FILE: benchmarks/boost/config/platform/irix.hpp ================================================ // (C) Copyright John Maddock 2001 - 2003. // (C) Copyright Jens Maurer 2003. // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org for most recent version. // SGI Irix specific config options: #define BOOST_PLATFORM "SGI Irix" #define BOOST_NO_SWPRINTF // // these are not auto detected by POSIX feature tests: // #define BOOST_HAS_GETTIMEOFDAY #define BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE #ifdef __GNUC__ // GNU C on IRIX does not support threads (checked up to gcc 3.3) # define BOOST_DISABLE_THREADS #endif // boilerplate code: #define BOOST_HAS_UNISTD_H #include ================================================ FILE: benchmarks/boost/config/platform/linux.hpp ================================================ // (C) Copyright John Maddock 2001 - 2003. // (C) Copyright Jens Maurer 2001 - 2003. // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org for most recent version. // linux specific config options: #define BOOST_PLATFORM "linux" // make sure we have __GLIBC_PREREQ if available at all #ifdef __cplusplus #include #else #include #endif // // added to glibc 2.1.1 // We can only test for 2.1 though: // #if defined(__GLIBC__) && ((__GLIBC__ > 2) || ((__GLIBC__ == 2) && (__GLIBC_MINOR__ >= 1))) // defines int64_t unconditionally, but defines // int64_t only if __GNUC__. Thus, assume a fully usable // only when using GCC. # if defined __GNUC__ # define BOOST_HAS_STDINT_H # endif #endif #if defined(__LIBCOMO__) // // como on linux doesn't have std:: c functions: // NOTE: versions of libcomo prior to beta28 have octal version numbering, // e.g. version 25 is 21 (dec) // # if __LIBCOMO_VERSION__ <= 20 # define BOOST_NO_STDC_NAMESPACE # endif # if __LIBCOMO_VERSION__ <= 21 # define BOOST_NO_SWPRINTF # endif #endif // // If glibc is past version 2 then we definitely have // gettimeofday, earlier versions may or may not have it: // #if defined(__GLIBC__) && (__GLIBC__ >= 2) # define BOOST_HAS_GETTIMEOFDAY #endif #ifdef __USE_POSIX199309 # define BOOST_HAS_NANOSLEEP #endif #if defined(__GLIBC__) && defined(__GLIBC_PREREQ) // __GLIBC_PREREQ is available since 2.1.2 // swprintf is available since glibc 2.2.0 # if !__GLIBC_PREREQ(2,2) || (!defined(__USE_ISOC99) && !defined(__USE_UNIX98)) # define BOOST_NO_SWPRINTF # endif #else # define BOOST_NO_SWPRINTF #endif // boilerplate code: #define BOOST_HAS_UNISTD_H #include #ifdef __USE_GNU #define BOOST_HAS_PTHREAD_YIELD #endif #ifndef __GNUC__ // // if the compiler is not gcc we still need to be able to parse // the GNU system headers, some of which (mainly ) // use GNU specific extensions: // # ifndef __extension__ # define __extension__ # endif # ifndef __const__ # define __const__ const # endif # ifndef __volatile__ # define __volatile__ volatile # endif # ifndef __signed__ # define __signed__ signed # endif # ifndef __typeof__ # define __typeof__ typeof # endif # ifndef __inline__ # define __inline__ inline # endif #endif ================================================ FILE: benchmarks/boost/config/platform/macos.hpp ================================================ // (C) Copyright John Maddock 2001 - 2003. // (C) Copyright Darin Adler 2001 - 2002. // (C) Copyright Bill Kempf 2002. // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org for most recent version. // Mac OS specific config options: #define BOOST_PLATFORM "Mac OS" #if __MACH__ && !defined(_MSL_USING_MSL_C) // Using the Mac OS X system BSD-style C library. # ifndef BOOST_HAS_UNISTD_H # define BOOST_HAS_UNISTD_H # endif // // Begin by including our boilerplate code for POSIX // feature detection, this is safe even when using // the MSL as Metrowerks supply their own // to replace the platform-native BSD one. G++ users // should also always be able to do this on MaxOS X. // # include # ifndef BOOST_HAS_STDINT_H # define BOOST_HAS_STDINT_H # endif // // BSD runtime has pthreads, sigaction, sched_yield and gettimeofday, // of these only pthreads are advertised in , so set the // other options explicitly: // # define BOOST_HAS_SCHED_YIELD # define BOOST_HAS_GETTIMEOFDAY # define BOOST_HAS_SIGACTION # if (__GNUC__ < 3) && !defined( __APPLE_CC__) // GCC strange "ignore std" mode works better if you pretend everything // is in the std namespace, for the most part. # define BOOST_NO_STDC_NAMESPACE # endif # if (__GNUC__ >= 4) // Both gcc and intel require these. # define BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE # define BOOST_HAS_NANOSLEEP # endif #else // Using the MSL C library. // We will eventually support threads in non-Carbon builds, but we do // not support this yet. # if ( defined(TARGET_API_MAC_CARBON) && TARGET_API_MAC_CARBON ) || ( defined(TARGET_CARBON) && TARGET_CARBON ) # if !defined(BOOST_HAS_PTHREADS) // MPTasks support is deprecated/removed from Boost: //# define BOOST_HAS_MPTASKS # elif ( __dest_os == __mac_os_x ) // We are doing a Carbon/Mach-O/MSL build which has pthreads, but only the // gettimeofday and no posix. # define BOOST_HAS_GETTIMEOFDAY # endif #ifdef BOOST_HAS_PTHREADS # define BOOST_HAS_THREADS #endif // The remote call manager depends on this. # define BOOST_BIND_ENABLE_PASCAL # endif #endif ================================================ FILE: benchmarks/boost/config/platform/qnxnto.hpp ================================================ // (C) Copyright Jim Douglas 2005. // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org for most recent version. // QNX specific config options: #define BOOST_PLATFORM "QNX" #define BOOST_HAS_UNISTD_H #include // QNX claims XOpen version 5 compatibility, but doesn't have an nl_types.h // or log1p and expm1: #undef BOOST_HAS_NL_TYPES_H #undef BOOST_HAS_LOG1P #undef BOOST_HAS_EXPM1 #define BOOST_HAS_PTHREADS #define BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE #define BOOST_HAS_GETTIMEOFDAY #define BOOST_HAS_CLOCK_GETTIME #define BOOST_HAS_NANOSLEEP ================================================ FILE: benchmarks/boost/config/platform/solaris.hpp ================================================ // (C) Copyright John Maddock 2001 - 2003. // (C) Copyright Jens Maurer 2003. // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org for most recent version. // sun specific config options: #define BOOST_PLATFORM "Sun Solaris" #define BOOST_HAS_GETTIMEOFDAY // boilerplate code: #define BOOST_HAS_UNISTD_H #include // // pthreads don't actually work with gcc unless _PTHREADS is defined: // #if defined(__GNUC__) && defined(_POSIX_THREADS) && !defined(_PTHREADS) # undef BOOST_HAS_PTHREADS #endif #define BOOST_HAS_STDINT_H #define BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE #define BOOST_HAS_LOG1P #define BOOST_HAS_EXPM1 ================================================ FILE: benchmarks/boost/config/platform/symbian.hpp ================================================ // (C) Copyright Yuriy Krasnoschek 2009. // (C) Copyright John Maddock 2001 - 2003. // (C) Copyright Jens Maurer 2001 - 2003. // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org for most recent version. // symbian specific config options: #define BOOST_PLATFORM "Symbian" #define BOOST_SYMBIAN 1 #if defined(__S60_3X__) // Open C / C++ plugin was introdused in this SDK, earlier versions don't have CRT / STL # define BOOST_S60_3rd_EDITION_FP2_OR_LATER_SDK // make sure we have __GLIBC_PREREQ if available at all #ifdef __cplusplus #include #else #include #endif// boilerplate code: # define BOOST_HAS_UNISTD_H # include // S60 SDK defines _POSIX_VERSION as POSIX.1 # ifndef BOOST_HAS_STDINT_H # define BOOST_HAS_STDINT_H # endif # ifndef BOOST_HAS_GETTIMEOFDAY # define BOOST_HAS_GETTIMEOFDAY # endif # ifndef BOOST_HAS_DIRENT_H # define BOOST_HAS_DIRENT_H # endif # ifndef BOOST_HAS_SIGACTION # define BOOST_HAS_SIGACTION # endif # ifndef BOOST_HAS_PTHREADS # define BOOST_HAS_PTHREADS # endif # ifndef BOOST_HAS_NANOSLEEP # define BOOST_HAS_NANOSLEEP # endif # ifndef BOOST_HAS_SCHED_YIELD # define BOOST_HAS_SCHED_YIELD # endif # ifndef BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE # define BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE # endif # ifndef BOOST_HAS_LOG1P # define BOOST_HAS_LOG1P # endif # ifndef BOOST_HAS_EXPM1 # define BOOST_HAS_EXPM1 # endif # ifndef BOOST_POSIX_API # define BOOST_POSIX_API # endif // endianess support # include // Symbian SDK provides _BYTE_ORDER instead of __BYTE_ORDER # ifndef __LITTLE_ENDIAN # ifdef _LITTLE_ENDIAN # define __LITTLE_ENDIAN _LITTLE_ENDIAN # else # define __LITTLE_ENDIAN 1234 # endif # endif # ifndef __BIG_ENDIAN # ifdef _BIG_ENDIAN # define __BIG_ENDIAN _BIG_ENDIAN # else # define __BIG_ENDIAN 4321 # endif # endif # ifndef __BYTE_ORDER # define __BYTE_ORDER __LITTLE_ENDIAN // Symbian is LE # endif // Known limitations # define BOOST_ASIO_DISABLE_SERIAL_PORT # define BOOST_DATE_TIME_NO_LOCALE # define BOOST_NO_STD_WSTRING # define BOOST_EXCEPTION_DISABLE # define BOOST_NO_EXCEPTIONS #else // TODO: More platform support e.g. UIQ # error "Unsuppoted Symbian SDK" #endif #if defined(__WINSCW__) && !defined(BOOST_DISABLE_WIN32) # define BOOST_DISABLE_WIN32 // winscw defines WIN32 macro #endif ================================================ FILE: benchmarks/boost/config/platform/vms.hpp ================================================ // (C) Copyright Artyom Beilis 2010. // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_CONFIG_PLATFORM_VMS_HPP #define BOOST_CONFIG_PLATFORM_VMS_HPP #define BOOST_PLATFORM "OpenVMS" #undef BOOST_HAS_STDINT_H #define BOOST_HAS_UNISTD_H #define BOOST_HAS_NL_TYPES_H #define BOOST_HAS_GETTIMEOFDAY #define BOOST_HAS_DIRENT_H #define BOOST_HAS_PTHREADS #define BOOST_HAS_NANOSLEEP #define BOOST_HAS_CLOCK_GETTIME #define BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE #define BOOST_HAS_LOG1P #define BOOST_HAS_EXPM1 #define BOOST_HAS_THREADS #undef BOOST_HAS_SCHED_YIELD #endif ================================================ FILE: benchmarks/boost/config/platform/vxworks.hpp ================================================ // (C) Copyright Dustin Spicuzza 2009. // Adapted to vxWorks 6.9 by Peter Brockamp 2012. // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org for most recent version. // Since WRS does not yet properly support boost under vxWorks // and this file was badly outdated, but I was keen on using it, // I patched boost myself to make things work. This has been tested // and adapted by me for vxWorks 6.9 *only*, as I'm lacking access // to earlier 6.X versions! The only thing I know for sure is that // very old versions of vxWorks (namely everything below 6.x) are // absolutely unable to use boost. This is mainly due to the completely // outdated libraries and ancient compiler (GCC 2.96 or worse). Do // not even think of getting this to work, a miserable failure will // be guaranteed! // Equally, this file has been tested for RTPs (Real Time Processes) // only, not for DKMs (Downloadable Kernel Modules). These two types // of executables differ largely in the available functionality of // the C-library, STL, and so on. A DKM uses a library similar to those // of vxWorks 5.X - with all its limitations and incompatibilities // with respect to ANSI C++ and STL. So probably there might be problems // with the usage of boost from DKMs. WRS or any voluteers are free to // prove the opposite! // ==================================================================== // // Some important information regarding the usage of POSIX semaphores: // ------------------------------------------------------------------- // // VxWorks as a real time operating system handles threads somewhat // different from what "normal" OSes do, regarding their scheduling! // This could lead to a scenario called "priority inversion" when using // semaphores, see http://en.wikipedia.org/wiki/Priority_inversion. // // Now, VxWorks POSIX-semaphores for DKM's default to the usage of // priority inverting semaphores, which is fine. On the other hand, // for RTP's it defaults to using non priority inverting semaphores, // which could easily pose a serious problem for a real time process, // i.e. deadlocks! To overcome this two possibilities do exist: // // a) Patch every piece of boost that uses semaphores to instanciate // the proper type of semaphores. This is non-intrusive with respect // to the OS and could relatively easy been done by giving all // semaphores attributes deviating from the default (for in-depth // information see the POSIX functions pthread_mutexattr_init() // and pthread_mutexattr_setprotocol()). However this breaks all // too easily, as with every new version some boost library could // all in a sudden start using semaphores, resurrecting the very // same, hard to locate problem over and over again! // // b) We could change the default properties for POSIX-semaphores // that VxWorks uses for RTP's and this is being suggested here, // as it will more or less seamlessly integrate with boost. I got // the following information from WRS how to do this, compare // Wind River TSR# 1209768: // // Instructions for changing the default properties of POSIX- // semaphores for RTP's in VxWorks 6.9: // - Edit the file /vxworks-6.9/target/usr/src/posix/pthreadLib.c // in the root of your Workbench-installation. // - Around line 917 there should be the definition of the default // mutex attributes: // // LOCAL pthread_mutexattr_t defaultMutexAttr = // { // PTHREAD_INITIALIZED_OBJ, PTHREAD_PRIO_NONE, 0, // PTHREAD_MUTEX_DEFAULT // }; // // Here, replace PTHREAD_PRIO_NONE by PTHREAD_PRIO_INHERIT. // - Around line 1236 there should be a definition for the function // pthread_mutexattr_init(). A couple of lines below you should // find a block of code like this: // // pAttr->mutexAttrStatus = PTHREAD_INITIALIZED_OBJ; // pAttr->mutexAttrProtocol = PTHREAD_PRIO_NONE; // pAttr->mutexAttrPrioceiling = 0; // pAttr->mutexAttrType = PTHREAD_MUTEX_DEFAULT; // // Here again, replace PTHREAD_PRIO_NONE by PTHREAD_PRIO_INHERIT. // - Finally, rebuild your VSB. This will create a new VxWorks kernel // with the changed properties. That's it! Now, using boost should // no longer cause any problems with task deadlocks! // // And here's another useful piece of information concerning VxWorks' // POSIX-functionality in general: // VxWorks is not a genuine POSIX-OS in itself, rather it is using a // kind of compatibility layer (sort of a wrapper) to emulate the // POSIX-functionality by using its own resources and functions. // At the time a task (thread) calls it's first POSIX-function during // runtime it is being transformed by the OS into a POSIX-thread. // This transformation does include a call to malloc() to allocate the // memory required for the housekeeping of POSIX-threads. In a high // priority RTP this malloc() call may be highly undesirable, as its // timing is more or less unpredictable (depending on what your actual // heap looks like). You can circumvent this problem by calling the // function thread_self() at a well defined point in the code of the // task, e.g. shortly after the task spawns up. Thereby you are able // to define the time when the task-transformation will take place and // you could shift it to an uncritical point where a malloc() call is // tolerable. So, if this could pose a problem for your code, remember // to call thread_self() from the affected task at an early stage. // // ==================================================================== // Block out all versions before vxWorks 6.x, as these don't work: // Include header with the vxWorks version information and query them #include #if !defined(_WRS_VXWORKS_MAJOR) || (_WRS_VXWORKS_MAJOR < 6) # error "The vxWorks version you're using is so badly outdated,\ it doesn't work at all with boost, sorry, no chance!" #endif // Handle versions above 5.X but below 6.9 #if (_WRS_VXWORKS_MAJOR == 6) && (_WRS_VXWORKS_MINOR < 9) // TODO: Starting from what version does vxWorks work with boost? // We can't reasonably insert a #warning "" as a user hint here, // as this will show up with every file including some boost header, // badly bugging the user... So for the time being we just leave it. #endif // vxWorks specific config options: // -------------------------------- #define BOOST_PLATFORM "vxWorks" // Special behaviour for DKMs: #ifdef _WRS_KERNEL // DKMs do not have the -header, // but apparently they do have an intrinsic wchar_t meanwhile! # define BOOST_NO_CWCHAR // Lots of wide-functions and -headers are unavailable for DKMs as well: # define BOOST_NO_CWCTYPE # define BOOST_NO_SWPRINTF # define BOOST_NO_STD_WSTRING # define BOOST_NO_STD_WSTREAMBUF #endif // Generally available headers: #define BOOST_HAS_UNISTD_H #define BOOST_HAS_STDINT_H #define BOOST_HAS_DIRENT_H #define BOOST_HAS_SLIST // vxWorks does not have installed an iconv-library by default, // so unfortunately no Unicode support from scratch is available! // Thus, instead it is suggested to switch to ICU, as this seems // to be the most complete and portable option... #define BOOST_LOCALE_WITH_ICU // Generally available functionality: #define BOOST_HAS_THREADS #define BOOST_HAS_NANOSLEEP #define BOOST_HAS_GETTIMEOFDAY #define BOOST_HAS_CLOCK_GETTIME #define BOOST_HAS_MACRO_USE_FACET // Generally unavailable functionality, delivered by boost's test function: //#define BOOST_NO_DEDUCED_TYPENAME // Commented this out, boost's test gives an errorneous result! #define BOOST_NO_CXX11_EXTERN_TEMPLATE #define BOOST_NO_CXX11_VARIADIC_MACROS // Generally available threading API's: #define BOOST_HAS_PTHREADS #define BOOST_HAS_SCHED_YIELD #define BOOST_HAS_SIGACTION // Functionality available for RTPs only: #ifdef __RTP__ # define BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE # define BOOST_HAS_LOG1P # define BOOST_HAS_EXPM1 #endif // Functionality available for DKMs only: #ifdef _WRS_KERNEL // Luckily, at the moment there seems to be none! #endif // These #defines allow posix_features to work, since vxWorks doesn't // #define them itself for DKMs (for RTPs on the contrary it does): #ifdef _WRS_KERNEL # ifndef _POSIX_TIMERS # define _POSIX_TIMERS 1 # endif # ifndef _POSIX_THREADS # define _POSIX_THREADS 1 # endif #endif // vxWorks doesn't work with asio serial ports: #define BOOST_ASIO_DISABLE_SERIAL_PORT // TODO: The problem here seems to bee that vxWorks uses its own, very specific // ways to handle serial ports, incompatible with POSIX or anything... // Maybe a specific implementation would be possible, but until the // straight need arises... This implementation would presumably consist // of some vxWorks specific ioctl-calls, etc. Any voluteers? // vxWorks-around: #defines CLOCKS_PER_SEC as sysClkRateGet() but // miserably fails to #include the required to make // sysClkRateGet() available! So we manually include it here. #ifdef __RTP__ # include # include #endif // vxWorks-around: In the macros INT32_C(), UINT32_C(), INT64_C() and // UINT64_C() are defined errorneously, yielding not a signed/ // unsigned long/long long type, but a signed/unsigned int/long // type. Eventually this leads to compile errors in ratio_fwd.hpp, // when trying to define several constants which do not fit into a // long type! We correct them here by redefining. #include // Some macro-magic to do the job #define VX_JOIN(X, Y) VX_DO_JOIN(X, Y) #define VX_DO_JOIN(X, Y) VX_DO_JOIN2(X, Y) #define VX_DO_JOIN2(X, Y) X##Y // Correctly setup the macros #undef INT32_C #undef UINT32_C #undef INT64_C #undef UINT64_C #define INT32_C(x) VX_JOIN(x, L) #define UINT32_C(x) VX_JOIN(x, UL) #define INT64_C(x) VX_JOIN(x, LL) #define UINT64_C(x) VX_JOIN(x, ULL) // #include Libraries required for the following function adaption #include #include #include // Use C-linkage for the following helper functions extern "C" { // vxWorks-around: The required functions getrlimit() and getrlimit() are missing. // But we have the similar functions getprlimit() and setprlimit(), // which may serve the purpose. // Problem: The vxWorks-documentation regarding these functions // doesn't deserve its name! It isn't documented what the first two // parameters idtype and id mean, so we must fall back to an educated // guess - null, argh... :-/ // TODO: getprlimit() and setprlimit() do exist for RTPs only, for whatever reason. // Thus for DKMs there would have to be another implementation. #ifdef __RTP__ inline int getrlimit(int resource, struct rlimit *rlp){ return getprlimit(0, 0, resource, rlp); } inline int setrlimit(int resource, const struct rlimit *rlp){ return setprlimit(0, 0, resource, const_cast(rlp)); } #endif // vxWorks has ftruncate() only, so we do simulate truncate(): inline int truncate(const char *p, off_t l){ int fd = open(p, O_WRONLY); if (fd == -1){ errno = EACCES; return -1; } if (ftruncate(fd, l) == -1){ close(fd); errno = EACCES; return -1; } return close(fd); } // Fake symlink handling by dummy functions: inline int symlink(const char*, const char*){ // vxWorks has no symlinks -> always return an error! errno = EACCES; return -1; } inline ssize_t readlink(const char*, char*, size_t){ // vxWorks has no symlinks -> always return an error! errno = EACCES; return -1; } // vxWorks claims to implement gettimeofday in sys/time.h // but nevertheless does not provide it! See // https://support.windriver.com/olsPortal/faces/maintenance/techtipDetail_noHeader.jspx?docId=16442&contentId=WR_TECHTIP_006256 // We implement a surrogate version here via clock_gettime: inline int gettimeofday(struct timeval *tv, void * /*tzv*/) { struct timespec ts; clock_gettime(CLOCK_MONOTONIC, &ts); tv->tv_sec = ts.tv_sec; tv->tv_usec = ts.tv_nsec / 1000; return 0; } // vxWorks does provide neither struct tms nor function times()! // We implement an empty dummy-function, simply setting the user // and system time to the half of thew actual system ticks-value // and the child user and system time to 0. // Rather ugly but at least it suppresses compiler errors... // Unfortunately, this of course *does* have an severe impact on // dependant libraries, actually this is chrono only! Here it will // not be possible to correctly use user and system times! But // as vxWorks is lacking the ability to calculate user and system // process times there seems to be no other possible solution. struct tms{ clock_t tms_utime; // User CPU time clock_t tms_stime; // System CPU time clock_t tms_cutime; // User CPU time of terminated child processes clock_t tms_cstime; // System CPU time of terminated child processes }; inline clock_t times(struct tms *t){ struct timespec ts; clock_gettime(CLOCK_THREAD_CPUTIME_ID, &ts); clock_t ticks(static_cast(static_cast(ts.tv_sec) * CLOCKS_PER_SEC + static_cast(ts.tv_nsec) * CLOCKS_PER_SEC / 1000000.0)); t->tms_utime = ticks/2U; t->tms_stime = ticks/2U; t->tms_cutime = 0; // vxWorks is lacking the concept of a child process! t->tms_cstime = 0; // -> Set the wait times for childs to 0 return ticks; } } // extern "C" // Put the selfmade functions into the std-namespace, just in case namespace std { # ifdef __RTP__ using ::getrlimit; using ::setrlimit; # endif using ::truncate; using ::symlink; using ::readlink; using ::times; using ::gettimeofday; } // Some more macro-magic: // vxWorks-around: Some functions are not present or broken in vxWorks // but may be patched to life via helper macros... // Include signal.h which might contain a typo to be corrected here #include #define getpagesize() sysconf(_SC_PAGESIZE) // getpagesize is deprecated anyway! #ifndef S_ISSOCK # define S_ISSOCK(mode) ((mode & S_IFMT) == S_IFSOCK) // Is file a socket? #endif #define lstat(p, b) stat(p, b) // lstat() == stat(), as vxWorks has no symlinks! #ifndef FPE_FLTINV # define FPE_FLTINV (FPE_FLTSUB+1) // vxWorks has no FPE_FLTINV, so define one as a dummy #endif #if !defined(BUS_ADRALN) && defined(BUS_ADRALNR) # define BUS_ADRALN BUS_ADRALNR // Correct a supposed typo in vxWorks' #endif //typedef int locale_t; // locale_t is a POSIX-extension, currently unpresent in vxWorks! // #include boilerplate code: #include // vxWorks lies about XSI conformance, there is no nl_types.h: #undef BOOST_HAS_NL_TYPES_H ================================================ FILE: benchmarks/boost/config/platform/win32.hpp ================================================ // (C) Copyright John Maddock 2001 - 2003. // (C) Copyright Bill Kempf 2001. // (C) Copyright Aleksey Gurtovoy 2003. // (C) Copyright Rene Rivera 2005. // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org for most recent version. // Win32 specific config options: #define BOOST_PLATFORM "Win32" // Get the information about the MinGW runtime, i.e. __MINGW32_*VERSION. #if defined(__MINGW32__) # include <_mingw.h> #endif #if defined(__GNUC__) && !defined(BOOST_NO_SWPRINTF) # define BOOST_NO_SWPRINTF #endif // Default defines for BOOST_SYMBOL_EXPORT and BOOST_SYMBOL_IMPORT // If a compiler doesn't support __declspec(dllexport)/__declspec(dllimport), // its boost/config/compiler/ file must define BOOST_SYMBOL_EXPORT and // BOOST_SYMBOL_IMPORT #ifndef BOOST_SYMBOL_EXPORT # define BOOST_HAS_DECLSPEC # define BOOST_SYMBOL_EXPORT __declspec(dllexport) # define BOOST_SYMBOL_IMPORT __declspec(dllimport) #endif #if defined(__MINGW32__) && ((__MINGW32_MAJOR_VERSION > 2) || ((__MINGW32_MAJOR_VERSION == 2) && (__MINGW32_MINOR_VERSION >= 0))) # define BOOST_HAS_STDINT_H # ifndef __STDC_LIMIT_MACROS # define __STDC_LIMIT_MACROS # endif # define BOOST_HAS_DIRENT_H # define BOOST_HAS_UNISTD_H #endif #if defined(__MINGW32__) && (__GNUC__ >= 4) // Mingw has these functions but there are persistent problems // with calls to these crashing, so disable for now: //# define BOOST_HAS_EXPM1 //# define BOOST_HAS_LOG1P # define BOOST_HAS_GETTIMEOFDAY #endif // // Win32 will normally be using native Win32 threads, // but there is a pthread library avaliable as an option, // we used to disable this when BOOST_DISABLE_WIN32 was // defined but no longer - this should allow some // files to be compiled in strict mode - while maintaining // a consistent setting of BOOST_HAS_THREADS across // all translation units (needed for shared_ptr etc). // #ifndef BOOST_HAS_PTHREADS # define BOOST_HAS_WINTHREADS #endif // // WinCE configuration: // #if defined(_WIN32_WCE) || defined(UNDER_CE) # define BOOST_NO_ANSI_APIS // Windows CE does not have a conforming signature for swprintf # define BOOST_NO_SWPRINTF #else # define BOOST_HAS_GETSYSTEMTIMEASFILETIME # define BOOST_HAS_THREADEX # define BOOST_HAS_GETSYSTEMTIMEASFILETIME #endif // // Windows Runtime // #if defined(WINAPI_FAMILY) && \ (WINAPI_FAMILY == WINAPI_FAMILY_APP || WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP) # define BOOST_NO_ANSI_APIS #endif #ifndef BOOST_DISABLE_WIN32 // WEK: Added #define BOOST_HAS_FTIME #define BOOST_WINDOWS 1 #endif ================================================ FILE: benchmarks/boost/config/posix_features.hpp ================================================ // (C) Copyright John Maddock 2001 - 2003. // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org for most recent version. // All POSIX feature tests go in this file, // Note that we test _POSIX_C_SOURCE and _XOPEN_SOURCE as well // _POSIX_VERSION and _XOPEN_VERSION: on some systems POSIX API's // may be present but none-functional unless _POSIX_C_SOURCE and // _XOPEN_SOURCE have been defined to the right value (it's up // to the user to do this *before* including any header, although // in most cases the compiler will do this for you). # if defined(BOOST_HAS_UNISTD_H) # include // XOpen has , but is this the correct version check? # if defined(_XOPEN_VERSION) && (_XOPEN_VERSION >= 3) # define BOOST_HAS_NL_TYPES_H # endif // POSIX version 6 requires # if defined(_POSIX_VERSION) && (_POSIX_VERSION >= 200100) # define BOOST_HAS_STDINT_H # endif // POSIX version 2 requires # if defined(_POSIX_VERSION) && (_POSIX_VERSION >= 199009L) # define BOOST_HAS_DIRENT_H # endif // POSIX version 3 requires to have sigaction: # if defined(_POSIX_VERSION) && (_POSIX_VERSION >= 199506L) # define BOOST_HAS_SIGACTION # endif // POSIX defines _POSIX_THREADS > 0 for pthread support, // however some platforms define _POSIX_THREADS without // a value, hence the (_POSIX_THREADS+0 >= 0) check. // Strictly speaking this may catch platforms with a // non-functioning stub , but such occurrences should // occur very rarely if at all. # if defined(_POSIX_THREADS) && (_POSIX_THREADS+0 >= 0) && !defined(BOOST_HAS_WINTHREADS) && !defined(BOOST_HAS_MPTASKS) # define BOOST_HAS_PTHREADS # endif // BOOST_HAS_NANOSLEEP: // This is predicated on _POSIX_TIMERS or _XOPEN_REALTIME: # if (defined(_POSIX_TIMERS) && (_POSIX_TIMERS+0 >= 0)) \ || (defined(_XOPEN_REALTIME) && (_XOPEN_REALTIME+0 >= 0)) # define BOOST_HAS_NANOSLEEP # endif // BOOST_HAS_CLOCK_GETTIME: // This is predicated on _POSIX_TIMERS (also on _XOPEN_REALTIME // but at least one platform - linux - defines that flag without // defining clock_gettime): # if (defined(_POSIX_TIMERS) && (_POSIX_TIMERS+0 >= 0)) # define BOOST_HAS_CLOCK_GETTIME # endif // BOOST_HAS_SCHED_YIELD: // This is predicated on _POSIX_PRIORITY_SCHEDULING or // on _POSIX_THREAD_PRIORITY_SCHEDULING or on _XOPEN_REALTIME. # if defined(_POSIX_PRIORITY_SCHEDULING) && (_POSIX_PRIORITY_SCHEDULING+0 > 0)\ || (defined(_POSIX_THREAD_PRIORITY_SCHEDULING) && (_POSIX_THREAD_PRIORITY_SCHEDULING+0 > 0))\ || (defined(_XOPEN_REALTIME) && (_XOPEN_REALTIME+0 >= 0)) # define BOOST_HAS_SCHED_YIELD # endif // BOOST_HAS_GETTIMEOFDAY: // BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE: // These are predicated on _XOPEN_VERSION, and appears to be first released // in issue 4, version 2 (_XOPEN_VERSION > 500). // Likewise for the functions log1p and expm1. # if defined(_XOPEN_VERSION) && (_XOPEN_VERSION+0 >= 500) # define BOOST_HAS_GETTIMEOFDAY # if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE+0 >= 500) # define BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE # endif # ifndef BOOST_HAS_LOG1P # define BOOST_HAS_LOG1P # endif # ifndef BOOST_HAS_EXPM1 # define BOOST_HAS_EXPM1 # endif # endif # endif ================================================ FILE: benchmarks/boost/config/requires_threads.hpp ================================================ // (C) Copyright John Maddock 2003. // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_CONFIG_REQUIRES_THREADS_HPP #define BOOST_CONFIG_REQUIRES_THREADS_HPP #ifndef BOOST_CONFIG_HPP # include #endif #if defined(BOOST_DISABLE_THREADS) // // special case to handle versions of gcc which don't currently support threads: // #if defined(__GNUC__) && ((__GNUC__ < 3) || (__GNUC_MINOR__ <= 3) || !defined(BOOST_STRICT_CONFIG)) // // this is checked up to gcc 3.3: // #if defined(__sgi) || defined(__hpux) # error "Multi-threaded programs are not supported by gcc on HPUX or Irix (last checked with gcc 3.3)" #endif #endif # error "Threading support unavaliable: it has been explicitly disabled with BOOST_DISABLE_THREADS" #elif !defined(BOOST_HAS_THREADS) # if defined __COMO__ // Comeau C++ # error "Compiler threading support is not turned on. Please set the correct command line options for threading: -D_MT (Windows) or -D_REENTRANT (Unix)" #elif defined(__INTEL_COMPILER) || defined(__ICL) || defined(__ICC) || defined(__ECC) // Intel #ifdef _WIN32 # error "Compiler threading support is not turned on. Please set the correct command line options for threading: either /MT /MTd /MD or /MDd" #else # error "Compiler threading support is not turned on. Please set the correct command line options for threading: -openmp" #endif # elif defined __GNUC__ // GNU C++: # error "Compiler threading support is not turned on. Please set the correct command line options for threading: -pthread (Linux), -pthreads (Solaris) or -mthreads (Mingw32)" #elif defined __sgi // SGI MIPSpro C++ # error "Compiler threading support is not turned on. Please set the correct command line options for threading: -D_SGI_MP_SOURCE" #elif defined __DECCXX // Compaq Tru64 Unix cxx # error "Compiler threading support is not turned on. Please set the correct command line options for threading: -pthread" #elif defined __BORLANDC__ // Borland # error "Compiler threading support is not turned on. Please set the correct command line options for threading: -tWM" #elif defined __MWERKS__ // Metrowerks CodeWarrior # error "Compiler threading support is not turned on. Please set the correct command line options for threading: either -runtime sm, -runtime smd, -runtime dm, or -runtime dmd" #elif defined __SUNPRO_CC // Sun Workshop Compiler C++ # error "Compiler threading support is not turned on. Please set the correct command line options for threading: -mt" #elif defined __HP_aCC // HP aCC # error "Compiler threading support is not turned on. Please set the correct command line options for threading: -mt" #elif defined(__IBMCPP__) // IBM Visual Age # error "Compiler threading support is not turned on. Please compile the code with the xlC_r compiler" #elif defined _MSC_VER // Microsoft Visual C++ // // Must remain the last #elif since some other vendors (Metrowerks, for // example) also #define _MSC_VER # error "Compiler threading support is not turned on. Please set the correct command line options for threading: either /MT /MTd /MD or /MDd" #else # error "Compiler threading support is not turned on. Please consult your compiler's documentation for the appropriate options to use" #endif // compilers #endif // BOOST_HAS_THREADS #endif // BOOST_CONFIG_REQUIRES_THREADS_HPP ================================================ FILE: benchmarks/boost/config/select_compiler_config.hpp ================================================ // Boost compiler configuration selection header file // (C) Copyright John Maddock 2001 - 2003. // (C) Copyright Martin Wille 2003. // (C) Copyright Guillaume Melquiond 2003. // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org/ for most recent version. // locate which compiler we are using and define // BOOST_COMPILER_CONFIG as needed: #if defined __CUDACC__ // NVIDIA CUDA C++ compiler for GPU # include "boost/config/compiler/nvcc.hpp" #endif #if defined(__GCCXML__) // GCC-XML emulates other compilers, it has to appear first here! # define BOOST_COMPILER_CONFIG "boost/config/compiler/gcc_xml.hpp" #elif defined(_CRAYC) // EDG based Cray compiler: # define BOOST_COMPILER_CONFIG "boost/config/compiler/cray.hpp" #elif defined __COMO__ // Comeau C++ # define BOOST_COMPILER_CONFIG "boost/config/compiler/comeau.hpp" #elif defined(__PATHSCALE__) && (__PATHCC__ >= 4) // PathScale EKOPath compiler (has to come before clang and gcc) # define BOOST_COMPILER_CONFIG "boost/config/compiler/pathscale.hpp" #elif defined(__INTEL_COMPILER) || defined(__ICL) || defined(__ICC) || defined(__ECC) // Intel # define BOOST_COMPILER_CONFIG "boost/config/compiler/intel.hpp" #elif defined __clang__ && !defined(__CUDACC__) && !defined(__ibmxl__) // when using clang and cuda at same time, you want to appear as gcc // Clang C++ emulates GCC, so it has to appear early. # define BOOST_COMPILER_CONFIG "boost/config/compiler/clang.hpp" #elif defined __DMC__ // Digital Mars C++ # define BOOST_COMPILER_CONFIG "boost/config/compiler/digitalmars.hpp" # elif defined(__GNUC__) && !defined(__ibmxl__) // GNU C++: # define BOOST_COMPILER_CONFIG "boost/config/compiler/gcc.hpp" #elif defined __KCC // Kai C++ # define BOOST_COMPILER_CONFIG "boost/config/compiler/kai.hpp" #elif defined __sgi // SGI MIPSpro C++ # define BOOST_COMPILER_CONFIG "boost/config/compiler/sgi_mipspro.hpp" #elif defined __DECCXX // Compaq Tru64 Unix cxx # define BOOST_COMPILER_CONFIG "boost/config/compiler/compaq_cxx.hpp" #elif defined __ghs // Greenhills C++ # define BOOST_COMPILER_CONFIG "boost/config/compiler/greenhills.hpp" #elif defined __CODEGEARC__ // CodeGear - must be checked for before Borland # define BOOST_COMPILER_CONFIG "boost/config/compiler/codegear.hpp" #elif defined __BORLANDC__ // Borland # define BOOST_COMPILER_CONFIG "boost/config/compiler/borland.hpp" #elif defined __MWERKS__ // Metrowerks CodeWarrior # define BOOST_COMPILER_CONFIG "boost/config/compiler/metrowerks.hpp" #elif defined __SUNPRO_CC // Sun Workshop Compiler C++ # define BOOST_COMPILER_CONFIG "boost/config/compiler/sunpro_cc.hpp" #elif defined __HP_aCC // HP aCC # define BOOST_COMPILER_CONFIG "boost/config/compiler/hp_acc.hpp" #elif defined(__MRC__) || defined(__SC__) // MPW MrCpp or SCpp # define BOOST_COMPILER_CONFIG "boost/config/compiler/mpw.hpp" #elif defined(__ibmxl__) // IBM XL C/C++ for Linux (Little Endian) # define BOOST_COMPILER_CONFIG "boost/config/compiler/xlcpp.hpp" #elif defined(__IBMCPP__) // IBM Visual Age or IBM XL C/C++ for Linux (Big Endian) # define BOOST_COMPILER_CONFIG "boost/config/compiler/vacpp.hpp" #elif defined(__PGI) // Portland Group Inc. # define BOOST_COMPILER_CONFIG "boost/config/compiler/pgi.hpp" #elif defined _MSC_VER // Microsoft Visual C++ // // Must remain the last #elif since some other vendors (Metrowerks, for // example) also #define _MSC_VER # define BOOST_COMPILER_CONFIG "boost/config/compiler/visualc.hpp" #elif defined (BOOST_ASSERT_CONFIG) // this must come last - generate an error if we don't // recognise the compiler: # error "Unknown compiler - please configure (http://www.boost.org/libs/config/config.htm#configuring) and report the results to the main boost mailing list (http://www.boost.org/more/mailing_lists.htm#main)" #endif #if 0 // // This section allows dependency scanners to find all the headers we *might* include: // #include "boost/config/compiler/gcc_xml.hpp" #include "boost/config/compiler/cray.hpp" #include "boost/config/compiler/comeau.hpp" #include "boost/config/compiler/pathscale.hpp" #include "boost/config/compiler/intel.hpp" #include "boost/config/compiler/clang.hpp" #include "boost/config/compiler/digitalmars.hpp" #include "boost/config/compiler/gcc.hpp" #include "boost/config/compiler/kai.hpp" #include "boost/config/compiler/sgi_mipspro.hpp" #include "boost/config/compiler/compaq_cxx.hpp" #include "boost/config/compiler/greenhills.hpp" #include "boost/config/compiler/codegear.hpp" #include "boost/config/compiler/borland.hpp" #include "boost/config/compiler/metrowerks.hpp" #include "boost/config/compiler/sunpro_cc.hpp" #include "boost/config/compiler/hp_acc.hpp" #include "boost/config/compiler/mpw.hpp" #include "boost/config/compiler/vacpp.hpp" #include "boost/config/compiler/pgi.hpp" #include "boost/config/compiler/visualc.hpp" #endif ================================================ FILE: benchmarks/boost/config/select_platform_config.hpp ================================================ // Boost compiler configuration selection header file // (C) Copyright John Maddock 2001 - 2002. // (C) Copyright Jens Maurer 2001. // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org for most recent version. // locate which platform we are on and define BOOST_PLATFORM_CONFIG as needed. // Note that we define the headers to include using "header_name" not // in order to prevent macro expansion within the header // name (for example "linux" is a macro on linux systems). #if (defined(linux) || defined(__linux) || defined(__linux__) || defined(__GNU__) || defined(__GLIBC__)) && !defined(_CRAYC) // linux, also other platforms (Hurd etc) that use GLIBC, should these really have their own config headers though? # define BOOST_PLATFORM_CONFIG "boost/config/platform/linux.hpp" #elif defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__) // BSD: # define BOOST_PLATFORM_CONFIG "boost/config/platform/bsd.hpp" #elif defined(sun) || defined(__sun) // solaris: # define BOOST_PLATFORM_CONFIG "boost/config/platform/solaris.hpp" #elif defined(__sgi) // SGI Irix: # define BOOST_PLATFORM_CONFIG "boost/config/platform/irix.hpp" #elif defined(__hpux) // hp unix: # define BOOST_PLATFORM_CONFIG "boost/config/platform/hpux.hpp" #elif defined(__CYGWIN__) // cygwin is not win32: # define BOOST_PLATFORM_CONFIG "boost/config/platform/cygwin.hpp" #elif defined(_WIN32) || defined(__WIN32__) || defined(WIN32) // win32: # define BOOST_PLATFORM_CONFIG "boost/config/platform/win32.hpp" #elif defined(__HAIKU__) // Haiku # define BOOST_PLATFORM_CONFIG "boost/config/platform/haiku.hpp" #elif defined(__BEOS__) // BeOS # define BOOST_PLATFORM_CONFIG "boost/config/platform/beos.hpp" #elif defined(macintosh) || defined(__APPLE__) || defined(__APPLE_CC__) // MacOS # define BOOST_PLATFORM_CONFIG "boost/config/platform/macos.hpp" #elif defined(__IBMCPP__) || defined(_AIX) // IBM # define BOOST_PLATFORM_CONFIG "boost/config/platform/aix.hpp" #elif defined(__amigaos__) // AmigaOS # define BOOST_PLATFORM_CONFIG "boost/config/platform/amigaos.hpp" #elif defined(__QNXNTO__) // QNX: # define BOOST_PLATFORM_CONFIG "boost/config/platform/qnxnto.hpp" #elif defined(__VXWORKS__) // vxWorks: # define BOOST_PLATFORM_CONFIG "boost/config/platform/vxworks.hpp" #elif defined(__SYMBIAN32__) // Symbian: # define BOOST_PLATFORM_CONFIG "boost/config/platform/symbian.hpp" #elif defined(_CRAYC) // Cray: # define BOOST_PLATFORM_CONFIG "boost/config/platform/cray.hpp" #elif defined(__VMS) // VMS: # define BOOST_PLATFORM_CONFIG "boost/config/platform/vms.hpp" #elif defined(__CloudABI__) // Nuxi CloudABI: # define BOOST_PLATFORM_CONFIG "boost/config/platform/cloudabi.hpp" #else # if defined(unix) \ || defined(__unix) \ || defined(_XOPEN_SOURCE) \ || defined(_POSIX_SOURCE) // generic unix platform: # ifndef BOOST_HAS_UNISTD_H # define BOOST_HAS_UNISTD_H # endif # include # endif # if defined (BOOST_ASSERT_CONFIG) // this must come last - generate an error if we don't // recognise the platform: # error "Unknown platform - please configure and report the results to boost.org" # endif #endif #if 0 // // This section allows dependency scanners to find all the files we *might* include: // # include "boost/config/platform/linux.hpp" # include "boost/config/platform/bsd.hpp" # include "boost/config/platform/solaris.hpp" # include "boost/config/platform/irix.hpp" # include "boost/config/platform/hpux.hpp" # include "boost/config/platform/cygwin.hpp" # include "boost/config/platform/win32.hpp" # include "boost/config/platform/beos.hpp" # include "boost/config/platform/macos.hpp" # include "boost/config/platform/aix.hpp" # include "boost/config/platform/amigaos.hpp" # include "boost/config/platform/qnxnto.hpp" # include "boost/config/platform/vxworks.hpp" # include "boost/config/platform/symbian.hpp" # include "boost/config/platform/cray.hpp" # include "boost/config/platform/vms.hpp" # include #endif ================================================ FILE: benchmarks/boost/config/select_stdlib_config.hpp ================================================ // Boost compiler configuration selection header file // (C) Copyright John Maddock 2001 - 2003. // (C) Copyright Jens Maurer 2001 - 2002. // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org for most recent version. // locate which std lib we are using and define BOOST_STDLIB_CONFIG as needed: // First include to determine if some version of STLport is in use as the std lib // (do not rely on this header being included since users can short-circuit this header // if they know whose std lib they are using.) #ifdef __cplusplus # include #else # include #endif #if defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION) // STLPort library; this _must_ come first, otherwise since // STLport typically sits on top of some other library, we // can end up detecting that first rather than STLport: # define BOOST_STDLIB_CONFIG "boost/config/stdlib/stlport.hpp" #else // If our std lib was not some version of STLport, and has not otherwise // been detected, then include as it is about // the smallest of the std lib headers that includes real C++ stuff. // Some std libs do not include their C++-related macros in // so this additional include makes sure we get those definitions. // Note: do not rely on this header being included since users can short-circuit this // #include if they know whose std lib they are using. #if !defined(__LIBCOMO__) && !defined(__STD_RWCOMPILER_H__) && !defined(_RWSTD_VER)\ && !defined(_LIBCPP_VERSION) && !defined(__GLIBCPP__) && !defined(__GLIBCXX__)\ && !defined(__STL_CONFIG_H) && !defined(__MSL_CPP__) && !defined(__IBMCPP__)\ && !defined(MSIPL_COMPILE_H) && !defined(_YVALS) && !defined(_CPPLIB_VER) #include #endif #if defined(__LIBCOMO__) // Comeau STL: #define BOOST_STDLIB_CONFIG "boost/config/stdlib/libcomo.hpp" #elif defined(__STD_RWCOMPILER_H__) || defined(_RWSTD_VER) // Rogue Wave library: # define BOOST_STDLIB_CONFIG "boost/config/stdlib/roguewave.hpp" #elif defined(_LIBCPP_VERSION) // libc++ # define BOOST_STDLIB_CONFIG "boost/config/stdlib/libcpp.hpp" #elif defined(__GLIBCPP__) || defined(__GLIBCXX__) // GNU libstdc++ 3 # define BOOST_STDLIB_CONFIG "boost/config/stdlib/libstdcpp3.hpp" #elif defined(__STL_CONFIG_H) // generic SGI STL # define BOOST_STDLIB_CONFIG "boost/config/stdlib/sgi.hpp" #elif defined(__MSL_CPP__) // MSL standard lib: # define BOOST_STDLIB_CONFIG "boost/config/stdlib/msl.hpp" #elif defined(__IBMCPP__) // take the default VACPP std lib # define BOOST_STDLIB_CONFIG "boost/config/stdlib/vacpp.hpp" #elif defined(MSIPL_COMPILE_H) // Modena C++ standard library # define BOOST_STDLIB_CONFIG "boost/config/stdlib/modena.hpp" #elif (defined(_YVALS) && !defined(__IBMCPP__)) || defined(_CPPLIB_VER) // Dinkumware Library (this has to appear after any possible replacement libraries): # define BOOST_STDLIB_CONFIG "boost/config/stdlib/dinkumware.hpp" #elif defined (BOOST_ASSERT_CONFIG) // this must come last - generate an error if we don't // recognise the library: # error "Unknown standard library - please configure and report the results to boost.org" #endif #endif #if 0 // // This section allows dependency scanners to find all the files we *might* include: // # include "boost/config/stdlib/stlport.hpp" # include "boost/config/stdlib/libcomo.hpp" # include "boost/config/stdlib/roguewave.hpp" # include "boost/config/stdlib/libcpp.hpp" # include "boost/config/stdlib/libstdcpp3.hpp" # include "boost/config/stdlib/sgi.hpp" # include "boost/config/stdlib/msl.hpp" # include "boost/config/stdlib/vacpp.hpp" # include "boost/config/stdlib/modena.hpp" # include "boost/config/stdlib/dinkumware.hpp" #endif ================================================ FILE: benchmarks/boost/config/stdlib/dinkumware.hpp ================================================ // (C) Copyright John Maddock 2001 - 2003. // (C) Copyright Jens Maurer 2001. // (C) Copyright Peter Dimov 2001. // (C) Copyright David Abrahams 2002. // (C) Copyright Guillaume Melquiond 2003. // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org for most recent version. // Dinkumware standard library config: #if !defined(_YVALS) && !defined(_CPPLIB_VER) #include #if !defined(_YVALS) && !defined(_CPPLIB_VER) #error This is not the Dinkumware lib! #endif #endif #if defined(_CPPLIB_VER) && (_CPPLIB_VER >= 306) // full dinkumware 3.06 and above // fully conforming provided the compiler supports it: # if !(defined(_GLOBAL_USING) && (_GLOBAL_USING+0 > 0)) && !defined(__BORLANDC__) && !defined(_STD) && !(defined(__ICC) && (__ICC >= 700)) // can be defined in yvals.h # define BOOST_NO_STDC_NAMESPACE # endif # if !(defined(_HAS_MEMBER_TEMPLATES_REBIND) && (_HAS_MEMBER_TEMPLATES_REBIND+0 > 0)) && !(defined(_MSC_VER) && (_MSC_VER > 1300)) && defined(BOOST_MSVC) # define BOOST_NO_STD_ALLOCATOR # endif # define BOOST_HAS_PARTIAL_STD_ALLOCATOR # if defined(BOOST_MSVC) && (BOOST_MSVC < 1300) // if this lib version is set up for vc6 then there is no std::use_facet: # define BOOST_NO_STD_USE_FACET # define BOOST_HAS_TWO_ARG_USE_FACET // C lib functions aren't in namespace std either: # define BOOST_NO_STDC_NAMESPACE // and nor is # define BOOST_NO_EXCEPTION_STD_NAMESPACE # endif // There's no numeric_limits support unless _LONGLONG is defined: # if !defined(_LONGLONG) && (_CPPLIB_VER <= 310) # define BOOST_NO_MS_INT64_NUMERIC_LIMITS # endif // 3.06 appears to have (non-sgi versions of) & , // and no at all #else # define BOOST_MSVC_STD_ITERATOR 1 # define BOOST_NO_STD_ITERATOR # define BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS # define BOOST_NO_STD_ALLOCATOR # define BOOST_NO_STDC_NAMESPACE # define BOOST_NO_STD_USE_FACET # define BOOST_NO_STD_OUTPUT_ITERATOR_ASSIGN # define BOOST_HAS_MACRO_USE_FACET # ifndef _CPPLIB_VER // Updated Dinkum library defines this, and provides // its own min and max definitions, as does MTA version. # ifndef __MTA__ # define BOOST_NO_STD_MIN_MAX # endif # define BOOST_NO_MS_INT64_NUMERIC_LIMITS # endif #endif // // std extension namespace is stdext for vc7.1 and later, // the same applies to other compilers that sit on top // of vc7.1 (Intel and Comeau): // #if defined(_MSC_VER) && (_MSC_VER >= 1310) && !defined(__BORLANDC__) # define BOOST_STD_EXTENSION_NAMESPACE stdext #endif #if (defined(_MSC_VER) && (_MSC_VER <= 1300) && !defined(__BORLANDC__)) || !defined(_CPPLIB_VER) || (_CPPLIB_VER < 306) // if we're using a dinkum lib that's // been configured for VC6/7 then there is // no iterator traits (true even for icl) # define BOOST_NO_STD_ITERATOR_TRAITS #endif #if defined(__ICL) && (__ICL < 800) && defined(_CPPLIB_VER) && (_CPPLIB_VER <= 310) // Intel C++ chokes over any non-trivial use of // this may be an overly restrictive define, but regex fails without it: # define BOOST_NO_STD_LOCALE #endif // Fix for VC++ 8.0 on up ( I do not have a previous version to test ) // or clang-cl. If exceptions are off you must manually include the // header before including the header. Admittedly // trying to use Boost libraries or the standard C++ libraries without // exception support is not suggested but currently clang-cl ( v 3.4 ) // does not support exceptions and must be compiled with exceptions off. #if !_HAS_EXCEPTIONS && ((defined(BOOST_MSVC) && BOOST_MSVC >= 1400) || (defined(__clang__) && defined(_MSC_VER))) #include #endif #include #if ( (!_HAS_EXCEPTIONS && !defined(__ghs__)) || (!_HAS_NAMESPACE && defined(__ghs__)) ) && !defined(__TI_COMPILER_VERSION__) && !defined(__VISUALDSPVERSION__) # define BOOST_NO_STD_TYPEINFO #endif // C++0x headers implemented in 520 (as shipped by Microsoft) // #if !defined(_CPPLIB_VER) || _CPPLIB_VER < 520 # define BOOST_NO_CXX11_HDR_ARRAY # define BOOST_NO_CXX11_HDR_CODECVT # define BOOST_NO_CXX11_HDR_FORWARD_LIST # define BOOST_NO_CXX11_HDR_INITIALIZER_LIST # define BOOST_NO_CXX11_HDR_RANDOM # define BOOST_NO_CXX11_HDR_REGEX # define BOOST_NO_CXX11_HDR_SYSTEM_ERROR # define BOOST_NO_CXX11_HDR_UNORDERED_MAP # define BOOST_NO_CXX11_HDR_UNORDERED_SET # define BOOST_NO_CXX11_HDR_TUPLE # define BOOST_NO_CXX11_HDR_TYPEINDEX # define BOOST_NO_CXX11_HDR_FUNCTIONAL # define BOOST_NO_CXX11_NUMERIC_LIMITS # define BOOST_NO_CXX11_SMART_PTR #endif #if ((!defined(_HAS_TR1_IMPORTS) || (_HAS_TR1_IMPORTS+0 == 0)) && !defined(BOOST_NO_CXX11_HDR_TUPLE)) \ && (!defined(_CPPLIB_VER) || _CPPLIB_VER < 610) # define BOOST_NO_CXX11_HDR_TUPLE #endif // C++0x headers implemented in 540 (as shipped by Microsoft) // #if !defined(_CPPLIB_VER) || _CPPLIB_VER < 540 # define BOOST_NO_CXX11_HDR_TYPE_TRAITS # define BOOST_NO_CXX11_HDR_CHRONO # define BOOST_NO_CXX11_HDR_CONDITION_VARIABLE # define BOOST_NO_CXX11_HDR_FUTURE # define BOOST_NO_CXX11_HDR_MUTEX # define BOOST_NO_CXX11_HDR_RATIO # define BOOST_NO_CXX11_HDR_THREAD # define BOOST_NO_CXX11_ATOMIC_SMART_PTR #endif // C++0x headers implemented in 610 (as shipped by Microsoft) // #if !defined(_CPPLIB_VER) || _CPPLIB_VER < 610 # define BOOST_NO_CXX11_HDR_INITIALIZER_LIST # define BOOST_NO_CXX11_HDR_ATOMIC # define BOOST_NO_CXX11_ALLOCATOR // 540 has std::align but it is not a conforming implementation # define BOOST_NO_CXX11_STD_ALIGN #endif #if defined(__has_include) #if !__has_include() # define BOOST_NO_CXX14_HDR_SHARED_MUTEX #elif __cplusplus < 201402 # define BOOST_NO_CXX14_HDR_SHARED_MUTEX #endif #elif !defined(_CPPLIB_VER) || (_CPPLIB_VER < 650) # define BOOST_NO_CXX14_HDR_SHARED_MUTEX #endif #if defined(BOOST_INTEL) && (BOOST_INTEL <= 1400) // Intel's compiler can't handle this header yet: # define BOOST_NO_CXX11_HDR_ATOMIC #endif // 520..610 have std::addressof, but it doesn't support functions // #if !defined(_CPPLIB_VER) || _CPPLIB_VER < 650 # define BOOST_NO_CXX11_ADDRESSOF #endif // Bug specific to VC14, // See https://connect.microsoft.com/VisualStudio/feedback/details/1348277/link-error-when-using-std-codecvt-utf8-utf16-char16-t // and discussion here: http://blogs.msdn.com/b/vcblog/archive/2014/11/12/visual-studio-2015-preview-now-available.aspx?PageIndex=2 #if defined(_CPPLIB_VER) && (_CPPLIB_VER == 650) # define BOOST_NO_CXX11_HDR_CODECVT #endif #if defined(_CPPLIB_VER) && (_CPPLIB_VER >= 650) // If _HAS_AUTO_PTR_ETC is defined to 0, std::auto_ptr is not available. // See https://www.visualstudio.com/en-us/news/vs2015-vs.aspx#C++ // and http://blogs.msdn.com/b/vcblog/archive/2015/06/19/c-11-14-17-features-in-vs-2015-rtm.aspx # if defined(_HAS_AUTO_PTR_ETC) && (_HAS_AUTO_PTR_ETC == 0) # define BOOST_NO_AUTO_PTR # endif #endif #ifdef _CPPLIB_VER # define BOOST_DINKUMWARE_STDLIB _CPPLIB_VER #else # define BOOST_DINKUMWARE_STDLIB 1 #endif #ifdef _CPPLIB_VER # define BOOST_STDLIB "Dinkumware standard library version " BOOST_STRINGIZE(_CPPLIB_VER) #else # define BOOST_STDLIB "Dinkumware standard library version 1.x" #endif ================================================ FILE: benchmarks/boost/config/stdlib/libcomo.hpp ================================================ // (C) Copyright John Maddock 2002 - 2003. // (C) Copyright Jens Maurer 2002 - 2003. // (C) Copyright Beman Dawes 2002 - 2003. // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org for most recent version. // Comeau STL: #if !defined(__LIBCOMO__) # include # if !defined(__LIBCOMO__) # error "This is not the Comeau STL!" # endif #endif // // std::streambuf is non-standard // NOTE: versions of libcomo prior to beta28 have octal version numbering, // e.g. version 25 is 21 (dec) #if __LIBCOMO_VERSION__ <= 22 # define BOOST_NO_STD_WSTREAMBUF #endif #if (__LIBCOMO_VERSION__ <= 31) && defined(_WIN32) #define BOOST_NO_SWPRINTF #endif #if __LIBCOMO_VERSION__ >= 31 # define BOOST_HAS_HASH # define BOOST_HAS_SLIST #endif // C++0x headers not yet implemented // # define BOOST_NO_CXX11_HDR_ARRAY # define BOOST_NO_CXX11_HDR_CHRONO # define BOOST_NO_CXX11_HDR_CODECVT # define BOOST_NO_CXX11_HDR_CONDITION_VARIABLE # define BOOST_NO_CXX11_HDR_FORWARD_LIST # define BOOST_NO_CXX11_HDR_FUTURE # define BOOST_NO_CXX11_HDR_INITIALIZER_LIST # define BOOST_NO_CXX11_HDR_MUTEX # define BOOST_NO_CXX11_HDR_RANDOM # define BOOST_NO_CXX11_HDR_RATIO # define BOOST_NO_CXX11_HDR_REGEX # define BOOST_NO_CXX11_HDR_SYSTEM_ERROR # define BOOST_NO_CXX11_HDR_THREAD # define BOOST_NO_CXX11_HDR_TUPLE # define BOOST_NO_CXX11_HDR_TYPE_TRAITS # define BOOST_NO_CXX11_HDR_TYPEINDEX # define BOOST_NO_CXX11_HDR_UNORDERED_MAP # define BOOST_NO_CXX11_HDR_UNORDERED_SET # define BOOST_NO_CXX11_NUMERIC_LIMITS # define BOOST_NO_CXX11_ALLOCATOR # define BOOST_NO_CXX11_ATOMIC_SMART_PTR # define BOOST_NO_CXX11_SMART_PTR # define BOOST_NO_CXX11_HDR_FUNCTIONAL # define BOOST_NO_CXX11_HDR_ATOMIC # define BOOST_NO_CXX11_STD_ALIGN # define BOOST_NO_CXX11_ADDRESSOF #if defined(__has_include) #if !__has_include() # define BOOST_NO_CXX14_HDR_SHARED_MUTEX #elif __cplusplus < 201402 # define BOOST_NO_CXX14_HDR_SHARED_MUTEX #endif #else # define BOOST_NO_CXX14_HDR_SHARED_MUTEX #endif // // Intrinsic type_traits support. // The SGI STL has it's own __type_traits class, which // has intrinsic compiler support with SGI's compilers. // Whatever map SGI style type traits to boost equivalents: // #define BOOST_HAS_SGI_TYPE_TRAITS #define BOOST_STDLIB "Comeau standard library " BOOST_STRINGIZE(__LIBCOMO_VERSION__) ================================================ FILE: benchmarks/boost/config/stdlib/libcpp.hpp ================================================ // (C) Copyright Christopher Jefferson 2011. // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org for most recent version. // config for libc++ // Might need more in here later. #if !defined(_LIBCPP_VERSION) # include # if !defined(_LIBCPP_VERSION) # error "This is not libc++!" # endif #endif #define BOOST_STDLIB "libc++ version " BOOST_STRINGIZE(_LIBCPP_VERSION) #define BOOST_HAS_THREADS #ifdef _LIBCPP_HAS_NO_VARIADICS # define BOOST_NO_CXX11_HDR_TUPLE #endif // BOOST_NO_CXX11_ALLOCATOR should imply no support for the C++11 // allocator model. The C++11 allocator model requires a conforming // std::allocator_traits which is only possible with C++11 template // aliases since members rebind_alloc and rebind_traits require it. #if defined(_LIBCPP_HAS_NO_TEMPLATE_ALIASES) # define BOOST_NO_CXX11_ALLOCATOR #endif #if __cplusplus < 201103 # define BOOST_NO_CXX11_HDR_ARRAY # define BOOST_NO_CXX11_HDR_CODECVT # define BOOST_NO_CXX11_HDR_CONDITION_VARIABLE # define BOOST_NO_CXX11_HDR_FORWARD_LIST # define BOOST_NO_CXX11_HDR_INITIALIZER_LIST # define BOOST_NO_CXX11_HDR_MUTEX # define BOOST_NO_CXX11_HDR_RANDOM # define BOOST_NO_CXX11_HDR_RATIO # define BOOST_NO_CXX11_HDR_REGEX # define BOOST_NO_CXX11_HDR_SYSTEM_ERROR # define BOOST_NO_CXX11_HDR_THREAD # define BOOST_NO_CXX11_HDR_TUPLE # define BOOST_NO_CXX11_HDR_TYPEINDEX # define BOOST_NO_CXX11_HDR_UNORDERED_MAP # define BOOST_NO_CXX11_HDR_UNORDERED_SET # define BOOST_NO_CXX11_NUMERIC_LIMITS # define BOOST_NO_CXX11_ALLOCATOR # define BOOST_NO_CXX11_SMART_PTR # define BOOST_NO_CXX11_HDR_FUNCTIONAL # define BOOST_NO_CXX11_STD_ALIGN # define BOOST_NO_CXX11_ADDRESSOF #endif // // These appear to be unusable/incomplete so far: // # define BOOST_NO_CXX11_HDR_CHRONO # define BOOST_NO_CXX11_HDR_FUTURE # define BOOST_NO_CXX11_HDR_TYPE_TRAITS # define BOOST_NO_CXX11_ATOMIC_SMART_PTR # define BOOST_NO_CXX11_HDR_ATOMIC // libc++ uses a non-standard messages_base #define BOOST_NO_STD_MESSAGES #if defined(__has_include) #if !__has_include() # define BOOST_NO_CXX14_HDR_SHARED_MUTEX #elif __cplusplus <= 201103 # define BOOST_NO_CXX14_HDR_SHARED_MUTEX #endif #elif __cplusplus < 201402 # define BOOST_NO_CXX14_HDR_SHARED_MUTEX #endif // --- end --- ================================================ FILE: benchmarks/boost/config/stdlib/libstdcpp3.hpp ================================================ // (C) Copyright John Maddock 2001. // (C) Copyright Jens Maurer 2001. // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org for most recent version. // config for libstdc++ v3 // not much to go in here: #define BOOST_GNU_STDLIB 1 #ifdef __GLIBCXX__ #define BOOST_STDLIB "GNU libstdc++ version " BOOST_STRINGIZE(__GLIBCXX__) #else #define BOOST_STDLIB "GNU libstdc++ version " BOOST_STRINGIZE(__GLIBCPP__) #endif #if !defined(_GLIBCPP_USE_WCHAR_T) && !defined(_GLIBCXX_USE_WCHAR_T) # define BOOST_NO_CWCHAR # define BOOST_NO_CWCTYPE # define BOOST_NO_STD_WSTRING # define BOOST_NO_STD_WSTREAMBUF #endif #if defined(__osf__) && !defined(_REENTRANT) \ && ( defined(_GLIBCXX_HAVE_GTHR_DEFAULT) || defined(_GLIBCPP_HAVE_GTHR_DEFAULT) ) // GCC 3 on Tru64 forces the definition of _REENTRANT when any std lib header // file is included, therefore for consistency we define it here as well. # define _REENTRANT #endif #ifdef __GLIBCXX__ // gcc 3.4 and greater: # if defined(_GLIBCXX_HAVE_GTHR_DEFAULT) \ || defined(_GLIBCXX__PTHREADS) \ || defined(_GLIBCXX_HAS_GTHREADS) \ || defined(_WIN32) \ || defined(_AIX) \ || defined(__HAIKU__) // // If the std lib has thread support turned on, then turn it on in Boost // as well. We do this because some gcc-3.4 std lib headers define _REENTANT // while others do not... // # define BOOST_HAS_THREADS # else # define BOOST_DISABLE_THREADS # endif #elif defined(__GLIBCPP__) \ && !defined(_GLIBCPP_HAVE_GTHR_DEFAULT) \ && !defined(_GLIBCPP__PTHREADS) // disable thread support if the std lib was built single threaded: # define BOOST_DISABLE_THREADS #endif #if (defined(linux) || defined(__linux) || defined(__linux__)) && defined(__arm__) && defined(_GLIBCPP_HAVE_GTHR_DEFAULT) // linux on arm apparently doesn't define _REENTRANT // so just turn on threading support whenever the std lib is thread safe: # define BOOST_HAS_THREADS #endif #if !defined(_GLIBCPP_USE_LONG_LONG) \ && !defined(_GLIBCXX_USE_LONG_LONG)\ && defined(BOOST_HAS_LONG_LONG) // May have been set by compiler/*.hpp, but "long long" without library // support is useless. # undef BOOST_HAS_LONG_LONG #endif // Apple doesn't seem to reliably defined a *unix* macro #if !defined(CYGWIN) && ( defined(__unix__) \ || defined(__unix) \ || defined(unix) \ || defined(__APPLE__) \ || defined(__APPLE) \ || defined(APPLE)) # include #endif #if defined(__GLIBCXX__) || (defined(__GLIBCPP__) && __GLIBCPP__>=20020514) // GCC >= 3.1.0 # define BOOST_STD_EXTENSION_NAMESPACE __gnu_cxx # define BOOST_HAS_SLIST # define BOOST_HAS_HASH # define BOOST_SLIST_HEADER # if !defined(__GNUC__) || __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 3) # define BOOST_HASH_SET_HEADER # define BOOST_HASH_MAP_HEADER # else # define BOOST_HASH_SET_HEADER # define BOOST_HASH_MAP_HEADER # endif #endif // // Decide whether we have C++11 support turned on: // #if defined(__GXX_EXPERIMENTAL_CXX0X__) || (__cplusplus >= 201103) # define BOOST_LIBSTDCXX11 #endif // // Decide which version of libstdc++ we have, normally // stdlibc++ C++0x support is detected via __GNUC__, __GNUC_MINOR__, and possibly // __GNUC_PATCHLEVEL__ at the suggestion of Jonathan Wakely, one of the stdlibc++ // developers. He also commented: // // "I'm not sure how useful __GLIBCXX__ is for your purposes, for instance in // GCC 4.2.4 it is set to 20080519 but in GCC 4.3.0 it is set to 20080305. // Although 4.3.0 was released earlier than 4.2.4, it has better C++0x support // than any release in the 4.2 series." // // Another resource for understanding stdlibc++ features is: // http://gcc.gnu.org/onlinedocs/libstdc++/manual/status.html#manual.intro.status.standard.200x // // However, using the GCC version number fails when the compiler is clang since this // only ever claims to emulate GCC-4.2, see https://svn.boost.org/trac/boost/ticket/7473 // for a long discussion on this issue. What we can do though is use clang's __has_include // to detect the presence of a C++11 header that was introduced with a specific GCC release. // We still have to be careful though as many such headers were buggy and/or incomplete when // first introduced, so we only check for headers that were fully featured from day 1, and then // use that to infer the underlying GCC version: // #ifdef __clang__ #if __has_include() # define BOOST_LIBSTDCXX_VERSION 50100 #elif __has_include() # define BOOST_LIBSTDCXX_VERSION 40900 #elif __has_include() # define BOOST_LIBSTDCXX_VERSION 40800 #elif __has_include() # define BOOST_LIBSTDCXX_VERSION 40700 #elif __has_include() # define BOOST_LIBSTDCXX_VERSION 40600 #elif __has_include() # define BOOST_LIBSTDCXX_VERSION 40500 #elif __has_include() # define BOOST_LIBSTDCXX_VERSION 40400 #elif __has_include() # define BOOST_LIBSTDCXX_VERSION 40300 #endif // // GCC 4.8 and 9 add working versions of and respectively. // However, we have no test for these as the headers were present but broken // in early GCC versions. // #endif #if defined(__SUNPRO_CC) && (__SUNPRO_CC >= 0x5130) && (__cplusplus >= 201103L) // // Oracle Solaris compiler uses it's own verison of libstdc++ but doesn't // set __GNUC__ // #define BOOST_LIBSTDCXX_VERSION 40800 #endif #if !defined(BOOST_LIBSTDCXX_VERSION) # define BOOST_LIBSTDCXX_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) #endif // C++0x headers in GCC 4.3.0 and later // #if (BOOST_LIBSTDCXX_VERSION < 40300) || !defined(BOOST_LIBSTDCXX11) # define BOOST_NO_CXX11_HDR_ARRAY # define BOOST_NO_CXX11_HDR_TUPLE # define BOOST_NO_CXX11_HDR_UNORDERED_MAP # define BOOST_NO_CXX11_HDR_UNORDERED_SET # define BOOST_NO_CXX11_HDR_FUNCTIONAL #endif // C++0x headers in GCC 4.4.0 and later // #if (BOOST_LIBSTDCXX_VERSION < 40400) || !defined(BOOST_LIBSTDCXX11) # define BOOST_NO_CXX11_HDR_CONDITION_VARIABLE # define BOOST_NO_CXX11_HDR_FORWARD_LIST # define BOOST_NO_CXX11_HDR_INITIALIZER_LIST # define BOOST_NO_CXX11_HDR_MUTEX # define BOOST_NO_CXX11_HDR_RATIO # define BOOST_NO_CXX11_HDR_SYSTEM_ERROR # define BOOST_NO_CXX11_SMART_PTR #else # define BOOST_HAS_TR1_COMPLEX_INVERSE_TRIG # define BOOST_HAS_TR1_COMPLEX_OVERLOADS #endif // C++0x features in GCC 4.5.0 and later // #if (BOOST_LIBSTDCXX_VERSION < 40500) || !defined(BOOST_LIBSTDCXX11) # define BOOST_NO_CXX11_NUMERIC_LIMITS # define BOOST_NO_CXX11_HDR_FUTURE # define BOOST_NO_CXX11_HDR_RANDOM #endif // C++0x features in GCC 4.6.0 and later // #if (BOOST_LIBSTDCXX_VERSION < 40600) || !defined(BOOST_LIBSTDCXX11) # define BOOST_NO_CXX11_HDR_TYPEINDEX # define BOOST_NO_CXX11_ADDRESSOF #endif // C++0x features in GCC 4.7.0 and later // #if (BOOST_LIBSTDCXX_VERSION < 40700) || !defined(BOOST_LIBSTDCXX11) // Note that although existed prior to 4.7, "steady_clock" is spelled "monotonic_clock" // so 4.7.0 is the first truely conforming one. # define BOOST_NO_CXX11_HDR_CHRONO # define BOOST_NO_CXX11_ALLOCATOR #endif // C++0x features in GCC 4.8.0 and later // #if (BOOST_LIBSTDCXX_VERSION < 40800) || !defined(BOOST_LIBSTDCXX11) // Note that although existed prior to gcc 4.8 it was largely unimplemented for many types: # define BOOST_NO_CXX11_HDR_ATOMIC # define BOOST_NO_CXX11_HDR_THREAD #endif // C++0x features in GCC 4.9.0 and later // #if (BOOST_LIBSTDCXX_VERSION < 40900) || !defined(BOOST_LIBSTDCXX11) // Although is present and compilable against, the actual implementation is not functional // even for the simplest patterns such as "\d" or "[0-9]". This is the case at least in gcc up to 4.8, inclusively. # define BOOST_NO_CXX11_HDR_REGEX #endif #if defined(__clang_major__) && ((__clang_major__ < 3) || ((__clang_major__ == 3) && (__clang_minor__ < 7))) // As of clang-3.6, libstdc++ header throws up errors with clang: # define BOOST_NO_CXX11_HDR_ATOMIC #endif // // C++0x features in GCC 5.1 and later // #if (BOOST_LIBSTDCXX_VERSION < 50100) || !defined(BOOST_LIBSTDCXX11) # define BOOST_NO_CXX11_HDR_TYPE_TRAITS # define BOOST_NO_CXX11_HDR_CODECVT # define BOOST_NO_CXX11_ATOMIC_SMART_PTR # define BOOST_NO_CXX11_STD_ALIGN #endif #if defined(__has_include) #if !__has_include() # define BOOST_NO_CXX14_HDR_SHARED_MUTEX #elif __cplusplus <= 201103 # define BOOST_NO_CXX14_HDR_SHARED_MUTEX #endif #elif __cplusplus < 201402 || (BOOST_LIBSTDCXX_VERSION < 40900) || !defined(BOOST_LIBSTDCXX11) # define BOOST_NO_CXX14_HDR_SHARED_MUTEX #endif // // Headers not present on Solaris with the Oracle compiler: #if defined(__SUNPRO_CC) #define BOOST_NO_CXX11_HDR_FUTURE #define BOOST_NO_CXX11_HDR_FORWARD_LIST #define BOOST_NO_CXX11_HDR_ATOMIC // shared_ptr is present, but is not convertible to bool // which causes all kinds of problems especially in Boost.Thread // but probably elsewhere as well. #define BOOST_NO_CXX11_SMART_PTR #endif #if (!defined(_GLIBCXX_HAS_GTHREADS) || !defined(_GLIBCXX_USE_C99_STDINT_TR1)) // Headers not always available: # ifndef BOOST_NO_CXX11_HDR_CONDITION_VARIABLE # define BOOST_NO_CXX11_HDR_CONDITION_VARIABLE # endif # ifndef BOOST_NO_CXX11_HDR_MUTEX # define BOOST_NO_CXX11_HDR_MUTEX # endif # ifndef BOOST_NO_CXX11_HDR_THREAD # define BOOST_NO_CXX11_HDR_THREAD # endif # ifndef BOOST_NO_CXX14_HDR_SHARED_MUTEX # define BOOST_NO_CXX14_HDR_SHARED_MUTEX # endif #endif #if (!defined(_GTHREAD_USE_MUTEX_TIMEDLOCK) || (_GTHREAD_USE_MUTEX_TIMEDLOCK == 0)) && !defined(BOOST_NO_CXX11_HDR_MUTEX) // Timed mutexes are not always available: # define BOOST_NO_CXX11_HDR_MUTEX #endif // --- end --- ================================================ FILE: benchmarks/boost/config/stdlib/modena.hpp ================================================ // (C) Copyright Jens Maurer 2001. // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org for most recent version. // Modena C++ standard library (comes with KAI C++) #if !defined(MSIPL_COMPILE_H) # include # if !defined(__MSIPL_COMPILE_H) # error "This is not the Modena C++ library!" # endif #endif #ifndef MSIPL_NL_TYPES #define BOOST_NO_STD_MESSAGES #endif #ifndef MSIPL_WCHART #define BOOST_NO_STD_WSTRING #endif // C++0x headers not yet implemented // # define BOOST_NO_CXX11_HDR_ARRAY # define BOOST_NO_CXX11_HDR_CHRONO # define BOOST_NO_CXX11_HDR_CODECVT # define BOOST_NO_CXX11_HDR_CONDITION_VARIABLE # define BOOST_NO_CXX11_HDR_FORWARD_LIST # define BOOST_NO_CXX11_HDR_FUTURE # define BOOST_NO_CXX11_HDR_INITIALIZER_LIST # define BOOST_NO_CXX11_HDR_MUTEX # define BOOST_NO_CXX11_HDR_RANDOM # define BOOST_NO_CXX11_HDR_RATIO # define BOOST_NO_CXX11_HDR_REGEX # define BOOST_NO_CXX11_HDR_SYSTEM_ERROR # define BOOST_NO_CXX11_HDR_THREAD # define BOOST_NO_CXX11_HDR_TUPLE # define BOOST_NO_CXX11_HDR_TYPE_TRAITS # define BOOST_NO_CXX11_HDR_TYPEINDEX # define BOOST_NO_CXX11_HDR_UNORDERED_MAP # define BOOST_NO_CXX11_HDR_UNORDERED_SET # define BOOST_NO_CXX11_NUMERIC_LIMITS # define BOOST_NO_CXX11_ALLOCATOR # define BOOST_NO_CXX11_ATOMIC_SMART_PTR # define BOOST_NO_CXX11_SMART_PTR # define BOOST_NO_CXX11_HDR_FUNCTIONAL # define BOOST_NO_CXX11_HDR_ATOMIC # define BOOST_NO_CXX11_STD_ALIGN # define BOOST_NO_CXX11_ADDRESSOF #if defined(__has_include) #if !__has_include() # define BOOST_NO_CXX14_HDR_SHARED_MUTEX #elif __cplusplus < 201402 # define BOOST_NO_CXX14_HDR_SHARED_MUTEX #endif #else # define BOOST_NO_CXX14_HDR_SHARED_MUTEX #endif #define BOOST_STDLIB "Modena C++ standard library" ================================================ FILE: benchmarks/boost/config/stdlib/msl.hpp ================================================ // (C) Copyright John Maddock 2001. // (C) Copyright Darin Adler 2001. // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org for most recent version. // Metrowerks standard library: #ifndef __MSL_CPP__ # include # ifndef __MSL_CPP__ # error This is not the MSL standard library! # endif #endif #if __MSL_CPP__ >= 0x6000 // Pro 6 # define BOOST_HAS_HASH # define BOOST_STD_EXTENSION_NAMESPACE Metrowerks #endif #define BOOST_HAS_SLIST #if __MSL_CPP__ < 0x6209 # define BOOST_NO_STD_MESSAGES #endif // check C lib version for #include #if defined(__MSL__) && (__MSL__ >= 0x5000) # define BOOST_HAS_STDINT_H # if !defined(__PALMOS_TRAPS__) # define BOOST_HAS_UNISTD_H # endif // boilerplate code: # include #endif #if defined(_MWMT) || _MSL_THREADSAFE # define BOOST_HAS_THREADS #endif #ifdef _MSL_NO_EXPLICIT_FUNC_TEMPLATE_ARG # define BOOST_NO_STD_USE_FACET # define BOOST_HAS_TWO_ARG_USE_FACET #endif // C++0x headers not yet implemented // # define BOOST_NO_CXX11_HDR_ARRAY # define BOOST_NO_CXX11_HDR_CHRONO # define BOOST_NO_CXX11_HDR_CODECVT # define BOOST_NO_CXX11_HDR_CONDITION_VARIABLE # define BOOST_NO_CXX11_HDR_FORWARD_LIST # define BOOST_NO_CXX11_HDR_FUTURE # define BOOST_NO_CXX11_HDR_INITIALIZER_LIST # define BOOST_NO_CXX11_HDR_MUTEX # define BOOST_NO_CXX11_HDR_RANDOM # define BOOST_NO_CXX11_HDR_RATIO # define BOOST_NO_CXX11_HDR_REGEX # define BOOST_NO_CXX11_HDR_SYSTEM_ERROR # define BOOST_NO_CXX11_HDR_THREAD # define BOOST_NO_CXX11_HDR_TUPLE # define BOOST_NO_CXX11_HDR_TYPE_TRAITS # define BOOST_NO_CXX11_HDR_TYPEINDEX # define BOOST_NO_CXX11_HDR_UNORDERED_MAP # define BOOST_NO_CXX11_HDR_UNORDERED_SET # define BOOST_NO_CXX11_NUMERIC_LIMITS # define BOOST_NO_CXX11_ALLOCATOR # define BOOST_NO_CXX11_ATOMIC_SMART_PTR # define BOOST_NO_CXX11_SMART_PTR # define BOOST_NO_CXX11_HDR_FUNCTIONAL # define BOOST_NO_CXX11_HDR_ATOMIC # define BOOST_NO_CXX11_STD_ALIGN # define BOOST_NO_CXX11_ADDRESSOF #if defined(__has_include) #if !__has_include() # define BOOST_NO_CXX14_HDR_SHARED_MUTEX #elif __cplusplus < 201402 # define BOOST_NO_CXX14_HDR_SHARED_MUTEX #endif #else # define BOOST_NO_CXX14_HDR_SHARED_MUTEX #endif #define BOOST_STDLIB "Metrowerks Standard Library version " BOOST_STRINGIZE(__MSL_CPP__) ================================================ FILE: benchmarks/boost/config/stdlib/roguewave.hpp ================================================ // (C) Copyright John Maddock 2001 - 2003. // (C) Copyright Jens Maurer 2001. // (C) Copyright David Abrahams 2003. // (C) Copyright Boris Gubenko 2007. // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org for most recent version. // Rogue Wave std lib: #define BOOST_RW_STDLIB 1 #if !defined(__STD_RWCOMPILER_H__) && !defined(_RWSTD_VER) # include # if !defined(__STD_RWCOMPILER_H__) && !defined(_RWSTD_VER) # error This is not the Rogue Wave standard library # endif #endif // // figure out a consistent version number: // #ifndef _RWSTD_VER # define BOOST_RWSTD_VER 0x010000 #elif _RWSTD_VER < 0x010000 # define BOOST_RWSTD_VER (_RWSTD_VER << 8) #else # define BOOST_RWSTD_VER _RWSTD_VER #endif #ifndef _RWSTD_VER # define BOOST_STDLIB "Rogue Wave standard library version (Unknown version)" #elif _RWSTD_VER < 0x04010200 # define BOOST_STDLIB "Rogue Wave standard library version " BOOST_STRINGIZE(_RWSTD_VER) #else # ifdef _RWSTD_VER_STR # define BOOST_STDLIB "Apache STDCXX standard library version " _RWSTD_VER_STR # else # define BOOST_STDLIB "Apache STDCXX standard library version " BOOST_STRINGIZE(_RWSTD_VER) # endif #endif // // Prior to version 2.2.0 the primary template for std::numeric_limits // does not have compile time constants, even though specializations of that // template do: // #if BOOST_RWSTD_VER < 0x020200 # define BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS #endif // Sun CC 5.5 patch 113817-07 adds long long specialization, but does not change the // library version number (http://sunsolve6.sun.com/search/document.do?assetkey=1-21-113817): #if BOOST_RWSTD_VER <= 0x020101 && (!defined(__SUNPRO_CC) || (__SUNPRO_CC < 0x550)) # define BOOST_NO_LONG_LONG_NUMERIC_LIMITS # endif // // Borland version of numeric_limits lacks __int64 specialisation: // #ifdef __BORLANDC__ # define BOOST_NO_MS_INT64_NUMERIC_LIMITS #endif // // No std::iterator if it can't figure out default template args: // #if defined(_RWSTD_NO_SIMPLE_DEFAULT_TEMPLATES) || defined(RWSTD_NO_SIMPLE_DEFAULT_TEMPLATES) || (BOOST_RWSTD_VER < 0x020000) # define BOOST_NO_STD_ITERATOR #endif // // No iterator traits without partial specialization: // #if defined(_RWSTD_NO_CLASS_PARTIAL_SPEC) || defined(RWSTD_NO_CLASS_PARTIAL_SPEC) # define BOOST_NO_STD_ITERATOR_TRAITS #endif // // Prior to version 2.0, std::auto_ptr was buggy, and there were no // new-style iostreams, and no conformant std::allocator: // #if (BOOST_RWSTD_VER < 0x020000) # define BOOST_NO_AUTO_PTR # define BOOST_NO_STRINGSTREAM # define BOOST_NO_STD_ALLOCATOR # define BOOST_NO_STD_LOCALE #endif // // No template iterator constructors without member template support: // #if defined(RWSTD_NO_MEMBER_TEMPLATES) || defined(_RWSTD_NO_MEMBER_TEMPLATES) # define BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS #endif // // RW defines _RWSTD_ALLOCATOR if the allocator is conformant and in use // (the or _HPACC_ part is a hack - the library seems to define _RWSTD_ALLOCATOR // on HP aCC systems even though the allocator is in fact broken): // #if !defined(_RWSTD_ALLOCATOR) || (defined(__HP_aCC) && __HP_aCC <= 33100) # define BOOST_NO_STD_ALLOCATOR #endif // // If we have a std::locale, we still may not have std::use_facet: // #if defined(_RWSTD_NO_TEMPLATE_ON_RETURN_TYPE) && !defined(BOOST_NO_STD_LOCALE) # define BOOST_NO_STD_USE_FACET # define BOOST_HAS_TWO_ARG_USE_FACET #endif // // There's no std::distance prior to version 2, or without // partial specialization support: // #if (BOOST_RWSTD_VER < 0x020000) || defined(_RWSTD_NO_CLASS_PARTIAL_SPEC) #define BOOST_NO_STD_DISTANCE #endif // // Some versions of the rogue wave library don't have assignable // OutputIterators: // #if BOOST_RWSTD_VER < 0x020100 # define BOOST_NO_STD_OUTPUT_ITERATOR_ASSIGN #endif // // Disable BOOST_HAS_LONG_LONG when the library has no support for it. // #if !defined(_RWSTD_LONG_LONG) && defined(BOOST_HAS_LONG_LONG) # undef BOOST_HAS_LONG_LONG #endif // // check that on HP-UX, the proper RW library is used // #if defined(__HP_aCC) && !defined(_HP_NAMESPACE_STD) # error "Boost requires Standard RW library. Please compile and link with -AA" #endif // // Define macros specific to RW V2.2 on HP-UX // #if defined(__HP_aCC) && (BOOST_RWSTD_VER == 0x02020100) # ifndef __HP_TC1_MAKE_PAIR # define __HP_TC1_MAKE_PAIR # endif # ifndef _HP_INSTANTIATE_STD2_VL # define _HP_INSTANTIATE_STD2_VL # endif #endif #if _RWSTD_VER < 0x05000000 # define BOOST_NO_CXX11_HDR_ARRAY #endif // type_traits header is incomplete: # define BOOST_NO_CXX11_HDR_TYPE_TRAITS // // C++0x headers not yet implemented // # define BOOST_NO_CXX11_HDR_CHRONO # define BOOST_NO_CXX11_HDR_CODECVT # define BOOST_NO_CXX11_HDR_CONDITION_VARIABLE # define BOOST_NO_CXX11_HDR_FORWARD_LIST # define BOOST_NO_CXX11_HDR_FUTURE # define BOOST_NO_CXX11_HDR_INITIALIZER_LIST # define BOOST_NO_CXX11_HDR_MUTEX # define BOOST_NO_CXX11_HDR_RANDOM # define BOOST_NO_CXX11_HDR_RATIO # define BOOST_NO_CXX11_HDR_REGEX # define BOOST_NO_CXX11_HDR_SYSTEM_ERROR # define BOOST_NO_CXX11_HDR_THREAD # define BOOST_NO_CXX11_HDR_TUPLE # define BOOST_NO_CXX11_HDR_TYPEINDEX # define BOOST_NO_CXX11_HDR_UNORDERED_MAP # define BOOST_NO_CXX11_HDR_UNORDERED_SET # define BOOST_NO_CXX11_NUMERIC_LIMITS # define BOOST_NO_CXX11_ALLOCATOR # define BOOST_NO_CXX11_ATOMIC_SMART_PTR # define BOOST_NO_CXX11_SMART_PTR # define BOOST_NO_CXX11_HDR_FUNCTIONAL # define BOOST_NO_CXX11_HDR_ATOMIC # define BOOST_NO_CXX11_STD_ALIGN # define BOOST_NO_CXX11_ADDRESSOF #if defined(__has_include) #if !__has_include() # define BOOST_NO_CXX14_HDR_SHARED_MUTEX #elif __cplusplus < 201402 # define BOOST_NO_CXX14_HDR_SHARED_MUTEX #endif #else # define BOOST_NO_CXX14_HDR_SHARED_MUTEX #endif ================================================ FILE: benchmarks/boost/config/stdlib/sgi.hpp ================================================ // (C) Copyright John Maddock 2001 - 2003. // (C) Copyright Darin Adler 2001. // (C) Copyright Jens Maurer 2001 - 2003. // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org for most recent version. // generic SGI STL: #if !defined(__STL_CONFIG_H) # include # if !defined(__STL_CONFIG_H) # error "This is not the SGI STL!" # endif #endif // // No std::iterator traits without partial specialisation: // #if !defined(__STL_CLASS_PARTIAL_SPECIALIZATION) # define BOOST_NO_STD_ITERATOR_TRAITS #endif // // No std::stringstream with gcc < 3 // #if defined(__GNUC__) && (__GNUC__ < 3) && \ ((__GNUC_MINOR__ < 95) || (__GNUC_MINOR__ == 96)) && \ !defined(__STL_USE_NEW_IOSTREAMS) || \ defined(__APPLE_CC__) // Note that we only set this for GNU C++ prior to 2.95 since the // latest patches for that release do contain a minimal // If you are running a 2.95 release prior to 2.95.3 then this will need // setting, but there is no way to detect that automatically (other // than by running the configure script). // Also, the unofficial GNU C++ 2.96 included in RedHat 7.1 doesn't // have . # define BOOST_NO_STRINGSTREAM #endif // Apple doesn't seem to reliably defined a *unix* macro #if !defined(CYGWIN) && ( defined(__unix__) \ || defined(__unix) \ || defined(unix) \ || defined(__APPLE__) \ || defined(__APPLE) \ || defined(APPLE)) # include #endif // // Assume no std::locale without own iostreams (this may be an // incorrect assumption in some cases): // #if !defined(__SGI_STL_OWN_IOSTREAMS) && !defined(__STL_USE_NEW_IOSTREAMS) # define BOOST_NO_STD_LOCALE #endif // // Original native SGI streams have non-standard std::messages facet: // #if defined(__sgi) && (_COMPILER_VERSION <= 650) && !defined(__SGI_STL_OWN_IOSTREAMS) # define BOOST_NO_STD_LOCALE #endif // // SGI's new iostreams have missing "const" in messages<>::open // #if defined(__sgi) && (_COMPILER_VERSION <= 740) && defined(__STL_USE_NEW_IOSTREAMS) # define BOOST_NO_STD_MESSAGES #endif // // No template iterator constructors, or std::allocator // without member templates: // #if !defined(__STL_MEMBER_TEMPLATES) # define BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS # define BOOST_NO_STD_ALLOCATOR #endif // // We always have SGI style hash_set, hash_map, and slist: // #define BOOST_HAS_HASH #define BOOST_HAS_SLIST // // If this is GNU libstdc++2, then no and no std::wstring: // #if (defined(__GNUC__) && (__GNUC__ < 3)) # include # if defined(__BASTRING__) # define BOOST_NO_LIMITS // Note: will provide compile-time constants # undef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS # define BOOST_NO_STD_WSTRING # endif #endif // // There is no standard iterator unless we have namespace support: // #if !defined(__STL_USE_NAMESPACES) # define BOOST_NO_STD_ITERATOR #endif // // Intrinsic type_traits support. // The SGI STL has it's own __type_traits class, which // has intrinsic compiler support with SGI's compilers. // Whatever map SGI style type traits to boost equivalents: // #define BOOST_HAS_SGI_TYPE_TRAITS // C++0x headers not yet implemented // # define BOOST_NO_CXX11_HDR_ARRAY # define BOOST_NO_CXX11_HDR_CHRONO # define BOOST_NO_CXX11_HDR_CODECVT # define BOOST_NO_CXX11_HDR_CONDITION_VARIABLE # define BOOST_NO_CXX11_HDR_FORWARD_LIST # define BOOST_NO_CXX11_HDR_FUTURE # define BOOST_NO_CXX11_HDR_INITIALIZER_LIST # define BOOST_NO_CXX11_HDR_MUTEX # define BOOST_NO_CXX11_HDR_RANDOM # define BOOST_NO_CXX11_HDR_RATIO # define BOOST_NO_CXX11_HDR_REGEX # define BOOST_NO_CXX11_HDR_SYSTEM_ERROR # define BOOST_NO_CXX11_HDR_THREAD # define BOOST_NO_CXX11_HDR_TUPLE # define BOOST_NO_CXX11_HDR_TYPE_TRAITS # define BOOST_NO_CXX11_HDR_TYPEINDEX # define BOOST_NO_CXX11_HDR_UNORDERED_MAP # define BOOST_NO_CXX11_HDR_UNORDERED_SET # define BOOST_NO_CXX11_NUMERIC_LIMITS # define BOOST_NO_CXX11_ALLOCATOR # define BOOST_NO_CXX11_ATOMIC_SMART_PTR # define BOOST_NO_CXX11_SMART_PTR # define BOOST_NO_CXX11_HDR_FUNCTIONAL # define BOOST_NO_CXX11_HDR_ATOMIC # define BOOST_NO_CXX11_STD_ALIGN # define BOOST_NO_CXX11_ADDRESSOF #if defined(__has_include) #if !__has_include() # define BOOST_NO_CXX14_HDR_SHARED_MUTEX #elif __cplusplus < 201402 # define BOOST_NO_CXX14_HDR_SHARED_MUTEX #endif #else # define BOOST_NO_CXX14_HDR_SHARED_MUTEX #endif #define BOOST_STDLIB "SGI standard library" ================================================ FILE: benchmarks/boost/config/stdlib/stlport.hpp ================================================ // (C) Copyright John Maddock 2001 - 2002. // (C) Copyright Darin Adler 2001. // (C) Copyright Jens Maurer 2001. // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org for most recent version. // STLPort standard library config: #if !defined(__SGI_STL_PORT) && !defined(_STLPORT_VERSION) # include # if !defined(__SGI_STL_PORT) && !defined(_STLPORT_VERSION) # error "This is not STLPort!" # endif #endif // Apple doesn't seem to reliably defined a *unix* macro #if !defined(CYGWIN) && ( defined(__unix__) \ || defined(__unix) \ || defined(unix) \ || defined(__APPLE__) \ || defined(__APPLE) \ || defined(APPLE)) # include #endif // // __STL_STATIC_CONST_INIT_BUG implies BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS // for versions prior to 4.1(beta) // #if (defined(__STL_STATIC_CONST_INIT_BUG) || defined(_STLP_STATIC_CONST_INIT_BUG)) && (__SGI_STL_PORT <= 0x400) # define BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS #endif // // If STLport thinks that there is no partial specialisation, then there is no // std::iterator traits: // #if !(defined(_STLP_CLASS_PARTIAL_SPECIALIZATION) || defined(__STL_CLASS_PARTIAL_SPECIALIZATION)) # define BOOST_NO_STD_ITERATOR_TRAITS #endif // // No new style iostreams on GCC without STLport's iostreams enabled: // #if (defined(__GNUC__) && (__GNUC__ < 3)) && !(defined(__SGI_STL_OWN_IOSTREAMS) || defined(_STLP_OWN_IOSTREAMS)) # define BOOST_NO_STRINGSTREAM #endif // // No new iostreams implies no std::locale, and no std::stringstream: // #if defined(__STL_NO_IOSTREAMS) || defined(__STL_NO_NEW_IOSTREAMS) || defined(_STLP_NO_IOSTREAMS) || defined(_STLP_NO_NEW_IOSTREAMS) # define BOOST_NO_STD_LOCALE # define BOOST_NO_STRINGSTREAM #endif // // If the streams are not native, and we have a "using ::x" compiler bug // then the io stream facets are not available in namespace std:: // #ifdef _STLPORT_VERSION # if !(_STLPORT_VERSION >= 0x500) && !defined(_STLP_OWN_IOSTREAMS) && defined(_STLP_USE_NAMESPACES) && defined(BOOST_NO_USING_TEMPLATE) && !defined(__BORLANDC__) # define BOOST_NO_STD_LOCALE # endif #else # if !defined(__SGI_STL_OWN_IOSTREAMS) && defined(__STL_USE_NAMESPACES) && defined(BOOST_NO_USING_TEMPLATE) && !defined(__BORLANDC__) # define BOOST_NO_STD_LOCALE # endif #endif #if defined(_STLPORT_VERSION) && (_STLPORT_VERSION >= 0x520) # define BOOST_HAS_TR1_UNORDERED_SET # define BOOST_HAS_TR1_UNORDERED_MAP #endif // // Without member template support enabled, their are no template // iterate constructors, and no std::allocator: // #if !(defined(__STL_MEMBER_TEMPLATES) || defined(_STLP_MEMBER_TEMPLATES)) # define BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS # define BOOST_NO_STD_ALLOCATOR #endif // // however we always have at least a partial allocator: // #define BOOST_HAS_PARTIAL_STD_ALLOCATOR #if !defined(_STLP_MEMBER_TEMPLATE_CLASSES) || defined(_STLP_DONT_SUPPORT_REBIND_MEMBER_TEMPLATE) # define BOOST_NO_STD_ALLOCATOR #endif #if defined(_STLP_NO_MEMBER_TEMPLATE_KEYWORD) && defined(BOOST_MSVC) && (BOOST_MSVC <= 1300) # define BOOST_NO_STD_ALLOCATOR #endif // // If STLport thinks there is no wchar_t at all, then we have to disable // the support for the relevant specilazations of std:: templates. // #if !defined(_STLP_HAS_WCHAR_T) && !defined(_STLP_WCHAR_T_IS_USHORT) # ifndef BOOST_NO_STD_WSTRING # define BOOST_NO_STD_WSTRING # endif # ifndef BOOST_NO_STD_WSTREAMBUF # define BOOST_NO_STD_WSTREAMBUF # endif #endif // // We always have SGI style hash_set, hash_map, and slist: // #ifndef _STLP_NO_EXTENSIONS #define BOOST_HAS_HASH #define BOOST_HAS_SLIST #endif // // STLport does a good job of importing names into namespace std::, // but doesn't always get them all, define BOOST_NO_STDC_NAMESPACE, since our // workaround does not conflict with STLports: // // // Harold Howe says: // Borland switched to STLport in BCB6. Defining BOOST_NO_STDC_NAMESPACE with // BCB6 does cause problems. If we detect C++ Builder, then don't define // BOOST_NO_STDC_NAMESPACE // #if !defined(__BORLANDC__) && !defined(__DMC__) // // If STLport is using it's own namespace, and the real names are in // the global namespace, then we duplicate STLport's using declarations // (by defining BOOST_NO_STDC_NAMESPACE), we do this because STLport doesn't // necessarily import all the names we need into namespace std:: // # if (defined(__STL_IMPORT_VENDOR_CSTD) \ || defined(__STL_USE_OWN_NAMESPACE) \ || defined(_STLP_IMPORT_VENDOR_CSTD) \ || defined(_STLP_USE_OWN_NAMESPACE)) \ && (defined(__STL_VENDOR_GLOBAL_CSTD) || defined (_STLP_VENDOR_GLOBAL_CSTD)) # define BOOST_NO_STDC_NAMESPACE # define BOOST_NO_EXCEPTION_STD_NAMESPACE # endif #elif defined(__BORLANDC__) && __BORLANDC__ < 0x560 // STLport doesn't import std::abs correctly: #include namespace std { using ::abs; } // and strcmp/strcpy don't get imported either ('cos they are macros) #include #ifdef strcpy # undef strcpy #endif #ifdef strcmp # undef strcmp #endif #ifdef _STLP_VENDOR_CSTD namespace std{ using _STLP_VENDOR_CSTD::strcmp; using _STLP_VENDOR_CSTD::strcpy; } #endif #endif // // std::use_facet may be non-standard, uses a class instead: // #if defined(__STL_NO_EXPLICIT_FUNCTION_TMPL_ARGS) || defined(_STLP_NO_EXPLICIT_FUNCTION_TMPL_ARGS) # define BOOST_NO_STD_USE_FACET # define BOOST_HAS_STLP_USE_FACET #endif // // If STLport thinks there are no wide functions, etc. is not working; but // only if BOOST_NO_STDC_NAMESPACE is not defined (if it is then we do the import // into std:: ourselves). // #if defined(_STLP_NO_NATIVE_WIDE_FUNCTIONS) && !defined(BOOST_NO_STDC_NAMESPACE) # define BOOST_NO_CWCHAR # define BOOST_NO_CWCTYPE #endif // // If STLport for some reason was configured so that it thinks that wchar_t // is not an intrinsic type, then we have to disable the support for it as // well (we would be missing required specializations otherwise). // #if !defined( _STLP_HAS_WCHAR_T) || defined(_STLP_WCHAR_T_IS_USHORT) # undef BOOST_NO_INTRINSIC_WCHAR_T # define BOOST_NO_INTRINSIC_WCHAR_T #endif // // Borland ships a version of STLport with C++ Builder 6 that lacks // hashtables and the like: // #if defined(__BORLANDC__) && (__BORLANDC__ == 0x560) # undef BOOST_HAS_HASH #endif // // gcc-2.95.3/STLPort does not like the using declarations we use to get ADL with std::min/max // #if defined(__GNUC__) && (__GNUC__ < 3) # include // for std::min and std::max # define BOOST_USING_STD_MIN() ((void)0) # define BOOST_USING_STD_MAX() ((void)0) namespace boost { using std::min; using std::max; } #endif // C++0x headers not yet implemented // # define BOOST_NO_CXX11_HDR_ARRAY # define BOOST_NO_CXX11_HDR_CHRONO # define BOOST_NO_CXX11_HDR_CODECVT # define BOOST_NO_CXX11_HDR_CONDITION_VARIABLE # define BOOST_NO_CXX11_HDR_FORWARD_LIST # define BOOST_NO_CXX11_HDR_FUTURE # define BOOST_NO_CXX11_HDR_INITIALIZER_LIST # define BOOST_NO_CXX11_HDR_MUTEX # define BOOST_NO_CXX11_HDR_RANDOM # define BOOST_NO_CXX11_HDR_RATIO # define BOOST_NO_CXX11_HDR_REGEX # define BOOST_NO_CXX11_HDR_SYSTEM_ERROR # define BOOST_NO_CXX11_HDR_THREAD # define BOOST_NO_CXX11_HDR_TUPLE # define BOOST_NO_CXX11_HDR_TYPE_TRAITS # define BOOST_NO_CXX11_HDR_TYPEINDEX # define BOOST_NO_CXX11_HDR_UNORDERED_MAP # define BOOST_NO_CXX11_HDR_UNORDERED_SET # define BOOST_NO_CXX11_NUMERIC_LIMITS # define BOOST_NO_CXX11_ALLOCATOR # define BOOST_NO_CXX11_ATOMIC_SMART_PTR # define BOOST_NO_CXX11_SMART_PTR # define BOOST_NO_CXX11_HDR_FUNCTIONAL # define BOOST_NO_CXX11_HDR_ATOMIC # define BOOST_NO_CXX11_STD_ALIGN # define BOOST_NO_CXX11_ADDRESSOF #if defined(__has_include) #if !__has_include() # define BOOST_NO_CXX14_HDR_SHARED_MUTEX #elif __cplusplus < 201402 # define BOOST_NO_CXX14_HDR_SHARED_MUTEX #endif #else # define BOOST_NO_CXX14_HDR_SHARED_MUTEX #endif #define BOOST_STDLIB "STLPort standard library version " BOOST_STRINGIZE(__SGI_STL_PORT) ================================================ FILE: benchmarks/boost/config/stdlib/vacpp.hpp ================================================ // (C) Copyright John Maddock 2001 - 2002. // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org for most recent version. #if __IBMCPP__ <= 501 # define BOOST_NO_STD_ALLOCATOR #endif #define BOOST_HAS_MACRO_USE_FACET #define BOOST_NO_STD_MESSAGES // Apple doesn't seem to reliably defined a *unix* macro #if !defined(CYGWIN) && ( defined(__unix__) \ || defined(__unix) \ || defined(unix) \ || defined(__APPLE__) \ || defined(__APPLE) \ || defined(APPLE)) # include #endif // C++0x headers not yet implemented // # define BOOST_NO_CXX11_HDR_ARRAY # define BOOST_NO_CXX11_HDR_CHRONO # define BOOST_NO_CXX11_HDR_CODECVT # define BOOST_NO_CXX11_HDR_CONDITION_VARIABLE # define BOOST_NO_CXX11_HDR_FORWARD_LIST # define BOOST_NO_CXX11_HDR_FUTURE # define BOOST_NO_CXX11_HDR_INITIALIZER_LIST # define BOOST_NO_CXX11_HDR_MUTEX # define BOOST_NO_CXX11_HDR_RANDOM # define BOOST_NO_CXX11_HDR_RATIO # define BOOST_NO_CXX11_HDR_REGEX # define BOOST_NO_CXX11_HDR_SYSTEM_ERROR # define BOOST_NO_CXX11_HDR_THREAD # define BOOST_NO_CXX11_HDR_TUPLE # define BOOST_NO_CXX11_HDR_TYPE_TRAITS # define BOOST_NO_CXX11_HDR_TYPEINDEX # define BOOST_NO_CXX11_HDR_UNORDERED_MAP # define BOOST_NO_CXX11_HDR_UNORDERED_SET # define BOOST_NO_CXX11_NUMERIC_LIMITS # define BOOST_NO_CXX11_ALLOCATOR # define BOOST_NO_CXX11_ATOMIC_SMART_PTR # define BOOST_NO_CXX11_SMART_PTR # define BOOST_NO_CXX11_HDR_FUNCTIONAL # define BOOST_NO_CXX11_HDR_ATOMIC # define BOOST_NO_CXX11_STD_ALIGN # define BOOST_NO_CXX11_ADDRESSOF #if defined(__has_include) #if !__has_include() # define BOOST_NO_CXX14_HDR_SHARED_MUTEX #elif __cplusplus < 201402 # define BOOST_NO_CXX14_HDR_SHARED_MUTEX #endif #else # define BOOST_NO_CXX14_HDR_SHARED_MUTEX #endif #define BOOST_STDLIB "Visual Age default standard library" ================================================ FILE: benchmarks/boost/config/suffix.hpp ================================================ // Boost config.hpp configuration header file ------------------------------// // boostinspect:ndprecated_macros -- tell the inspect tool to ignore this file // Copyright (c) 2001-2003 John Maddock // Copyright (c) 2001 Darin Adler // Copyright (c) 2001 Peter Dimov // Copyright (c) 2002 Bill Kempf // Copyright (c) 2002 Jens Maurer // Copyright (c) 2002-2003 David Abrahams // Copyright (c) 2003 Gennaro Prota // Copyright (c) 2003 Eric Friedman // Copyright (c) 2010 Eric Jourdanneau, Joel Falcou // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org/ for most recent version. // Boost config.hpp policy and rationale documentation has been moved to // http://www.boost.org/libs/config/ // // This file is intended to be stable, and relatively unchanging. // It should contain boilerplate code only - no compiler specific // code unless it is unavoidable - no changes unless unavoidable. #ifndef BOOST_CONFIG_SUFFIX_HPP #define BOOST_CONFIG_SUFFIX_HPP #if defined(__GNUC__) && (__GNUC__ >= 4) // // Some GCC-4.x versions issue warnings even when __extension__ is used, // so use this as a workaround: // #pragma GCC system_header #endif // // ensure that visibility macros are always defined, thus symplifying use // #ifndef BOOST_SYMBOL_EXPORT # define BOOST_SYMBOL_EXPORT #endif #ifndef BOOST_SYMBOL_IMPORT # define BOOST_SYMBOL_IMPORT #endif #ifndef BOOST_SYMBOL_VISIBLE # define BOOST_SYMBOL_VISIBLE #endif // // look for long long by looking for the appropriate macros in . // Note that we use limits.h rather than climits for maximal portability, // remember that since these just declare a bunch of macros, there should be // no namespace issues from this. // #if !defined(BOOST_HAS_LONG_LONG) && !defined(BOOST_NO_LONG_LONG) \ && !defined(BOOST_MSVC) && !defined(__BORLANDC__) # include # if (defined(ULLONG_MAX) || defined(ULONG_LONG_MAX) || defined(ULONGLONG_MAX)) # define BOOST_HAS_LONG_LONG # else # define BOOST_NO_LONG_LONG # endif #endif // GCC 3.x will clean up all of those nasty macro definitions that // BOOST_NO_CTYPE_FUNCTIONS is intended to help work around, so undefine // it under GCC 3.x. #if defined(__GNUC__) && (__GNUC__ >= 3) && defined(BOOST_NO_CTYPE_FUNCTIONS) # undef BOOST_NO_CTYPE_FUNCTIONS #endif // // Assume any extensions are in namespace std:: unless stated otherwise: // # ifndef BOOST_STD_EXTENSION_NAMESPACE # define BOOST_STD_EXTENSION_NAMESPACE std # endif // // If cv-qualified specializations are not allowed, then neither are cv-void ones: // # if defined(BOOST_NO_CV_SPECIALIZATIONS) \ && !defined(BOOST_NO_CV_VOID_SPECIALIZATIONS) # define BOOST_NO_CV_VOID_SPECIALIZATIONS # endif // // If there is no numeric_limits template, then it can't have any compile time // constants either! // # if defined(BOOST_NO_LIMITS) \ && !defined(BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS) # define BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS # define BOOST_NO_MS_INT64_NUMERIC_LIMITS # define BOOST_NO_LONG_LONG_NUMERIC_LIMITS # endif // // if there is no long long then there is no specialisation // for numeric_limits either: // #if !defined(BOOST_HAS_LONG_LONG) && !defined(BOOST_NO_LONG_LONG_NUMERIC_LIMITS) # define BOOST_NO_LONG_LONG_NUMERIC_LIMITS #endif // // if there is no __int64 then there is no specialisation // for numeric_limits<__int64> either: // #if !defined(BOOST_HAS_MS_INT64) && !defined(BOOST_NO_MS_INT64_NUMERIC_LIMITS) # define BOOST_NO_MS_INT64_NUMERIC_LIMITS #endif // // if member templates are supported then so is the // VC6 subset of member templates: // # if !defined(BOOST_NO_MEMBER_TEMPLATES) \ && !defined(BOOST_MSVC6_MEMBER_TEMPLATES) # define BOOST_MSVC6_MEMBER_TEMPLATES # endif // // Without partial specialization, can't test for partial specialisation bugs: // # if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \ && !defined(BOOST_BCB_PARTIAL_SPECIALIZATION_BUG) # define BOOST_BCB_PARTIAL_SPECIALIZATION_BUG # endif // // Without partial specialization, we can't have array-type partial specialisations: // # if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \ && !defined(BOOST_NO_ARRAY_TYPE_SPECIALIZATIONS) # define BOOST_NO_ARRAY_TYPE_SPECIALIZATIONS # endif // // Without partial specialization, std::iterator_traits can't work: // # if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \ && !defined(BOOST_NO_STD_ITERATOR_TRAITS) # define BOOST_NO_STD_ITERATOR_TRAITS # endif // // Without partial specialization, partial // specialization with default args won't work either: // # if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \ && !defined(BOOST_NO_PARTIAL_SPECIALIZATION_IMPLICIT_DEFAULT_ARGS) # define BOOST_NO_PARTIAL_SPECIALIZATION_IMPLICIT_DEFAULT_ARGS # endif // // Without member template support, we can't have template constructors // in the standard library either: // # if defined(BOOST_NO_MEMBER_TEMPLATES) \ && !defined(BOOST_MSVC6_MEMBER_TEMPLATES) \ && !defined(BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS) # define BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS # endif // // Without member template support, we can't have a conforming // std::allocator template either: // # if defined(BOOST_NO_MEMBER_TEMPLATES) \ && !defined(BOOST_MSVC6_MEMBER_TEMPLATES) \ && !defined(BOOST_NO_STD_ALLOCATOR) # define BOOST_NO_STD_ALLOCATOR # endif // // without ADL support then using declarations will break ADL as well: // #if defined(BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP) && !defined(BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL) # define BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL #endif // // Without typeid support we have no dynamic RTTI either: // #if defined(BOOST_NO_TYPEID) && !defined(BOOST_NO_RTTI) # define BOOST_NO_RTTI #endif // // If we have a standard allocator, then we have a partial one as well: // #if !defined(BOOST_NO_STD_ALLOCATOR) # define BOOST_HAS_PARTIAL_STD_ALLOCATOR #endif // // We can't have a working std::use_facet if there is no std::locale: // # if defined(BOOST_NO_STD_LOCALE) && !defined(BOOST_NO_STD_USE_FACET) # define BOOST_NO_STD_USE_FACET # endif // // We can't have a std::messages facet if there is no std::locale: // # if defined(BOOST_NO_STD_LOCALE) && !defined(BOOST_NO_STD_MESSAGES) # define BOOST_NO_STD_MESSAGES # endif // // We can't have a working std::wstreambuf if there is no std::locale: // # if defined(BOOST_NO_STD_LOCALE) && !defined(BOOST_NO_STD_WSTREAMBUF) # define BOOST_NO_STD_WSTREAMBUF # endif // // We can't have a if there is no : // # if defined(BOOST_NO_CWCHAR) && !defined(BOOST_NO_CWCTYPE) # define BOOST_NO_CWCTYPE # endif // // We can't have a swprintf if there is no : // # if defined(BOOST_NO_CWCHAR) && !defined(BOOST_NO_SWPRINTF) # define BOOST_NO_SWPRINTF # endif // // If Win32 support is turned off, then we must turn off // threading support also, unless there is some other // thread API enabled: // #if defined(BOOST_DISABLE_WIN32) && defined(_WIN32) \ && !defined(BOOST_DISABLE_THREADS) && !defined(BOOST_HAS_PTHREADS) # define BOOST_DISABLE_THREADS #endif // // Turn on threading support if the compiler thinks that it's in // multithreaded mode. We put this here because there are only a // limited number of macros that identify this (if there's any missing // from here then add to the appropriate compiler section): // #if (defined(__MT__) || defined(_MT) || defined(_REENTRANT) \ || defined(_PTHREADS) || defined(__APPLE__) || defined(__DragonFly__)) \ && !defined(BOOST_HAS_THREADS) # define BOOST_HAS_THREADS #endif // // Turn threading support off if BOOST_DISABLE_THREADS is defined: // #if defined(BOOST_DISABLE_THREADS) && defined(BOOST_HAS_THREADS) # undef BOOST_HAS_THREADS #endif // // Turn threading support off if we don't recognise the threading API: // #if defined(BOOST_HAS_THREADS) && !defined(BOOST_HAS_PTHREADS)\ && !defined(BOOST_HAS_WINTHREADS) && !defined(BOOST_HAS_BETHREADS)\ && !defined(BOOST_HAS_MPTASKS) # undef BOOST_HAS_THREADS #endif // // Turn threading detail macros off if we don't (want to) use threading // #ifndef BOOST_HAS_THREADS # undef BOOST_HAS_PTHREADS # undef BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE # undef BOOST_HAS_PTHREAD_YIELD # undef BOOST_HAS_PTHREAD_DELAY_NP # undef BOOST_HAS_WINTHREADS # undef BOOST_HAS_BETHREADS # undef BOOST_HAS_MPTASKS #endif // // If the compiler claims to be C99 conformant, then it had better // have a : // # if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901) # define BOOST_HAS_STDINT_H # ifndef BOOST_HAS_LOG1P # define BOOST_HAS_LOG1P # endif # ifndef BOOST_HAS_EXPM1 # define BOOST_HAS_EXPM1 # endif # endif // // Define BOOST_NO_SLIST and BOOST_NO_HASH if required. // Note that this is for backwards compatibility only. // # if !defined(BOOST_HAS_SLIST) && !defined(BOOST_NO_SLIST) # define BOOST_NO_SLIST # endif # if !defined(BOOST_HAS_HASH) && !defined(BOOST_NO_HASH) # define BOOST_NO_HASH # endif // // Set BOOST_SLIST_HEADER if not set already: // #if defined(BOOST_HAS_SLIST) && !defined(BOOST_SLIST_HEADER) # define BOOST_SLIST_HEADER #endif // // Set BOOST_HASH_SET_HEADER if not set already: // #if defined(BOOST_HAS_HASH) && !defined(BOOST_HASH_SET_HEADER) # define BOOST_HASH_SET_HEADER #endif // // Set BOOST_HASH_MAP_HEADER if not set already: // #if defined(BOOST_HAS_HASH) && !defined(BOOST_HASH_MAP_HEADER) # define BOOST_HASH_MAP_HEADER #endif // BOOST_HAS_ABI_HEADERS // This macro gets set if we have headers that fix the ABI, // and prevent ODR violations when linking to external libraries: #if defined(BOOST_ABI_PREFIX) && defined(BOOST_ABI_SUFFIX) && !defined(BOOST_HAS_ABI_HEADERS) # define BOOST_HAS_ABI_HEADERS #endif #if defined(BOOST_HAS_ABI_HEADERS) && defined(BOOST_DISABLE_ABI_HEADERS) # undef BOOST_HAS_ABI_HEADERS #endif // BOOST_NO_STDC_NAMESPACE workaround --------------------------------------// // Because std::size_t usage is so common, even in boost headers which do not // otherwise use the C library, the workaround is included here so // that ugly workaround code need not appear in many other boost headers. // NOTE WELL: This is a workaround for non-conforming compilers; // must still be #included in the usual places so that inclusion // works as expected with standard conforming compilers. The resulting // double inclusion of is harmless. # if defined(BOOST_NO_STDC_NAMESPACE) && defined(__cplusplus) # include namespace std { using ::ptrdiff_t; using ::size_t; } # endif // Workaround for the unfortunate min/max macros defined by some platform headers #define BOOST_PREVENT_MACRO_SUBSTITUTION #ifndef BOOST_USING_STD_MIN # define BOOST_USING_STD_MIN() using std::min #endif #ifndef BOOST_USING_STD_MAX # define BOOST_USING_STD_MAX() using std::max #endif // BOOST_NO_STD_MIN_MAX workaround -----------------------------------------// # if defined(BOOST_NO_STD_MIN_MAX) && defined(__cplusplus) namespace std { template inline const _Tp& min BOOST_PREVENT_MACRO_SUBSTITUTION (const _Tp& __a, const _Tp& __b) { return __b < __a ? __b : __a; } template inline const _Tp& max BOOST_PREVENT_MACRO_SUBSTITUTION (const _Tp& __a, const _Tp& __b) { return __a < __b ? __b : __a; } } # endif // BOOST_STATIC_CONSTANT workaround --------------------------------------- // // On compilers which don't allow in-class initialization of static integral // constant members, we must use enums as a workaround if we want the constants // to be available at compile-time. This macro gives us a convenient way to // declare such constants. # ifdef BOOST_NO_INCLASS_MEMBER_INITIALIZATION # define BOOST_STATIC_CONSTANT(type, assignment) enum { assignment } # else # define BOOST_STATIC_CONSTANT(type, assignment) static const type assignment # endif // BOOST_USE_FACET / HAS_FACET workaround ----------------------------------// // When the standard library does not have a conforming std::use_facet there // are various workarounds available, but they differ from library to library. // The same problem occurs with has_facet. // These macros provide a consistent way to access a locale's facets. // Usage: // replace // std::use_facet(loc); // with // BOOST_USE_FACET(Type, loc); // Note do not add a std:: prefix to the front of BOOST_USE_FACET! // Use for BOOST_HAS_FACET is analogous. #if defined(BOOST_NO_STD_USE_FACET) # ifdef BOOST_HAS_TWO_ARG_USE_FACET # define BOOST_USE_FACET(Type, loc) std::use_facet(loc, static_cast(0)) # define BOOST_HAS_FACET(Type, loc) std::has_facet(loc, static_cast(0)) # elif defined(BOOST_HAS_MACRO_USE_FACET) # define BOOST_USE_FACET(Type, loc) std::_USE(loc, Type) # define BOOST_HAS_FACET(Type, loc) std::_HAS(loc, Type) # elif defined(BOOST_HAS_STLP_USE_FACET) # define BOOST_USE_FACET(Type, loc) (*std::_Use_facet(loc)) # define BOOST_HAS_FACET(Type, loc) std::has_facet< Type >(loc) # endif #else # define BOOST_USE_FACET(Type, loc) std::use_facet< Type >(loc) # define BOOST_HAS_FACET(Type, loc) std::has_facet< Type >(loc) #endif // BOOST_NESTED_TEMPLATE workaround ------------------------------------------// // Member templates are supported by some compilers even though they can't use // the A::template member syntax, as a workaround replace: // // typedef typename A::template rebind binder; // // with: // // typedef typename A::BOOST_NESTED_TEMPLATE rebind binder; #ifndef BOOST_NO_MEMBER_TEMPLATE_KEYWORD # define BOOST_NESTED_TEMPLATE template #else # define BOOST_NESTED_TEMPLATE #endif // BOOST_UNREACHABLE_RETURN(x) workaround -------------------------------------// // Normally evaluates to nothing, unless BOOST_NO_UNREACHABLE_RETURN_DETECTION // is defined, in which case it evaluates to return x; Use when you have a return // statement that can never be reached. #ifndef BOOST_UNREACHABLE_RETURN # ifdef BOOST_NO_UNREACHABLE_RETURN_DETECTION # define BOOST_UNREACHABLE_RETURN(x) return x; # else # define BOOST_UNREACHABLE_RETURN(x) # endif #endif // BOOST_DEDUCED_TYPENAME workaround ------------------------------------------// // // Some compilers don't support the use of `typename' for dependent // types in deduced contexts, e.g. // // template void f(T, typename T::type); // ^^^^^^^^ // Replace these declarations with: // // template void f(T, BOOST_DEDUCED_TYPENAME T::type); #ifndef BOOST_NO_DEDUCED_TYPENAME # define BOOST_DEDUCED_TYPENAME typename #else # define BOOST_DEDUCED_TYPENAME #endif #ifndef BOOST_NO_TYPENAME_WITH_CTOR # define BOOST_CTOR_TYPENAME typename #else # define BOOST_CTOR_TYPENAME #endif // long long workaround ------------------------------------------// // On gcc (and maybe other compilers?) long long is alway supported // but it's use may generate either warnings (with -ansi), or errors // (with -pedantic -ansi) unless it's use is prefixed by __extension__ // #if defined(BOOST_HAS_LONG_LONG) && defined(__cplusplus) namespace boost{ # ifdef __GNUC__ __extension__ typedef long long long_long_type; __extension__ typedef unsigned long long ulong_long_type; # else typedef long long long_long_type; typedef unsigned long long ulong_long_type; # endif } #endif // same again for __int128: #if defined(BOOST_HAS_INT128) && defined(__cplusplus) namespace boost{ # ifdef __GNUC__ __extension__ typedef __int128 int128_type; __extension__ typedef unsigned __int128 uint128_type; # else typedef __int128 int128_type; typedef unsigned __int128 uint128_type; # endif } #endif // same again for __float128: #if defined(BOOST_HAS_FLOAT128) && defined(__cplusplus) namespace boost { # ifdef __GNUC__ __extension__ typedef __float128 float128_type; # else typedef __float128 float128_type; # endif } #endif // BOOST_[APPEND_]EXPLICIT_TEMPLATE_[NON_]TYPE macros --------------------------// // These macros are obsolete. Port away and remove. # define BOOST_EXPLICIT_TEMPLATE_TYPE(t) # define BOOST_EXPLICIT_TEMPLATE_TYPE_SPEC(t) # define BOOST_EXPLICIT_TEMPLATE_NON_TYPE(t, v) # define BOOST_EXPLICIT_TEMPLATE_NON_TYPE_SPEC(t, v) # define BOOST_APPEND_EXPLICIT_TEMPLATE_TYPE(t) # define BOOST_APPEND_EXPLICIT_TEMPLATE_TYPE_SPEC(t) # define BOOST_APPEND_EXPLICIT_TEMPLATE_NON_TYPE(t, v) # define BOOST_APPEND_EXPLICIT_TEMPLATE_NON_TYPE_SPEC(t, v) // When BOOST_NO_STD_TYPEINFO is defined, we can just import // the global definition into std namespace: #if defined(BOOST_NO_STD_TYPEINFO) && defined(__cplusplus) #include namespace std{ using ::type_info; } #endif // ---------------------------------------------------------------------------// // // Helper macro BOOST_STRINGIZE: // Converts the parameter X to a string after macro replacement // on X has been performed. // #define BOOST_STRINGIZE(X) BOOST_DO_STRINGIZE(X) #define BOOST_DO_STRINGIZE(X) #X // // Helper macro BOOST_JOIN: // The following piece of macro magic joins the two // arguments together, even when one of the arguments is // itself a macro (see 16.3.1 in C++ standard). The key // is that macro expansion of macro arguments does not // occur in BOOST_DO_JOIN2 but does in BOOST_DO_JOIN. // #define BOOST_JOIN( X, Y ) BOOST_DO_JOIN( X, Y ) #define BOOST_DO_JOIN( X, Y ) BOOST_DO_JOIN2(X,Y) #define BOOST_DO_JOIN2( X, Y ) X##Y // // Set some default values for compiler/library/platform names. // These are for debugging config setup only: // # ifndef BOOST_COMPILER # define BOOST_COMPILER "Unknown ISO C++ Compiler" # endif # ifndef BOOST_STDLIB # define BOOST_STDLIB "Unknown ISO standard library" # endif # ifndef BOOST_PLATFORM # if defined(unix) || defined(__unix) || defined(_XOPEN_SOURCE) \ || defined(_POSIX_SOURCE) # define BOOST_PLATFORM "Generic Unix" # else # define BOOST_PLATFORM "Unknown" # endif # endif // // Set some default values GPU support // # ifndef BOOST_GPU_ENABLED # define BOOST_GPU_ENABLED # endif // BOOST_FORCEINLINE ---------------------------------------------// // Macro to use in place of 'inline' to force a function to be inline #if !defined(BOOST_FORCEINLINE) # if defined(_MSC_VER) # define BOOST_FORCEINLINE __forceinline # elif defined(__GNUC__) && __GNUC__ > 3 // Clang also defines __GNUC__ (as 4) # define BOOST_FORCEINLINE inline __attribute__ ((__always_inline__)) # else # define BOOST_FORCEINLINE inline # endif #endif // BOOST_NOINLINE ---------------------------------------------// // Macro to use in place of 'inline' to prevent a function to be inlined #if !defined(BOOST_NOINLINE) # if defined(_MSC_VER) # define BOOST_NOINLINE __declspec(noinline) # elif defined(__GNUC__) && __GNUC__ > 3 // Clang also defines __GNUC__ (as 4) # if defined(__CUDACC__) // nvcc doesn't always parse __noinline__, // see: https://svn.boost.org/trac/boost/ticket/9392 # define BOOST_NOINLINE __attribute__ ((noinline)) # else # define BOOST_NOINLINE __attribute__ ((__noinline__)) # endif # else # define BOOST_NOINLINE # endif #endif // BOOST_NORETURN ---------------------------------------------// // Macro to use before a function declaration/definition to designate // the function as not returning normally (i.e. with a return statement // or by leaving the function scope, if the function return type is void). #if !defined(BOOST_NORETURN) # if defined(_MSC_VER) # define BOOST_NORETURN __declspec(noreturn) # elif defined(__GNUC__) # define BOOST_NORETURN __attribute__ ((__noreturn__)) # else # define BOOST_NO_NORETURN # define BOOST_NORETURN # endif #endif // Branch prediction hints // These macros are intended to wrap conditional expressions that yield true or false // // if (BOOST_LIKELY(var == 10)) // { // // the most probable code here // } // #if !defined(BOOST_LIKELY) # define BOOST_LIKELY(x) x #endif #if !defined(BOOST_UNLIKELY) # define BOOST_UNLIKELY(x) x #endif // Type and data alignment specification // #if !defined(BOOST_NO_CXX11_ALIGNAS) # define BOOST_ALIGNMENT(x) alignas(x) #elif defined(_MSC_VER) # define BOOST_ALIGNMENT(x) __declspec(align(x)) #elif defined(__GNUC__) # define BOOST_ALIGNMENT(x) __attribute__ ((__aligned__(x))) #else # define BOOST_NO_ALIGNMENT # define BOOST_ALIGNMENT(x) #endif // Lack of non-public defaulted functions is implied by the lack of any defaulted functions #if !defined(BOOST_NO_CXX11_NON_PUBLIC_DEFAULTED_FUNCTIONS) && defined(BOOST_NO_CXX11_DEFAULTED_FUNCTIONS) # define BOOST_NO_CXX11_NON_PUBLIC_DEFAULTED_FUNCTIONS #endif // Defaulted and deleted function declaration helpers // These macros are intended to be inside a class definition. // BOOST_DEFAULTED_FUNCTION accepts the function declaration and its // body, which will be used if the compiler doesn't support defaulted functions. // BOOST_DELETED_FUNCTION only accepts the function declaration. It // will expand to a private function declaration, if the compiler doesn't support // deleted functions. Because of this it is recommended to use BOOST_DELETED_FUNCTION // in the end of the class definition. // // class my_class // { // public: // // Default-constructible // BOOST_DEFAULTED_FUNCTION(my_class(), {}) // // Copying prohibited // BOOST_DELETED_FUNCTION(my_class(my_class const&)) // BOOST_DELETED_FUNCTION(my_class& operator= (my_class const&)) // }; // #if !(defined(BOOST_NO_CXX11_DEFAULTED_FUNCTIONS) || defined(BOOST_NO_CXX11_NON_PUBLIC_DEFAULTED_FUNCTIONS)) # define BOOST_DEFAULTED_FUNCTION(fun, body) fun = default; #else # define BOOST_DEFAULTED_FUNCTION(fun, body) fun body #endif #if !defined(BOOST_NO_CXX11_DELETED_FUNCTIONS) # define BOOST_DELETED_FUNCTION(fun) fun = delete; #else # define BOOST_DELETED_FUNCTION(fun) private: fun; #endif // // Set BOOST_NO_DECLTYPE_N3276 when BOOST_NO_DECLTYPE is defined // #if defined(BOOST_NO_CXX11_DECLTYPE) && !defined(BOOST_NO_CXX11_DECLTYPE_N3276) #define BOOST_NO_CXX11_DECLTYPE_N3276 BOOST_NO_CXX11_DECLTYPE #endif // -------------------- Deprecated macros for 1.50 --------------------------- // These will go away in a future release // Use BOOST_NO_CXX11_HDR_UNORDERED_SET or BOOST_NO_CXX11_HDR_UNORDERED_MAP // instead of BOOST_NO_STD_UNORDERED #if defined(BOOST_NO_CXX11_HDR_UNORDERED_MAP) || defined (BOOST_NO_CXX11_HDR_UNORDERED_SET) # ifndef BOOST_NO_CXX11_STD_UNORDERED # define BOOST_NO_CXX11_STD_UNORDERED # endif #endif // Use BOOST_NO_CXX11_HDR_INITIALIZER_LIST instead of BOOST_NO_INITIALIZER_LISTS #if defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST) && !defined(BOOST_NO_INITIALIZER_LISTS) # define BOOST_NO_INITIALIZER_LISTS #endif // Use BOOST_NO_CXX11_HDR_ARRAY instead of BOOST_NO_0X_HDR_ARRAY #if defined(BOOST_NO_CXX11_HDR_ARRAY) && !defined(BOOST_NO_0X_HDR_ARRAY) # define BOOST_NO_0X_HDR_ARRAY #endif // Use BOOST_NO_CXX11_HDR_CHRONO instead of BOOST_NO_0X_HDR_CHRONO #if defined(BOOST_NO_CXX11_HDR_CHRONO) && !defined(BOOST_NO_0X_HDR_CHRONO) # define BOOST_NO_0X_HDR_CHRONO #endif // Use BOOST_NO_CXX11_HDR_CODECVT instead of BOOST_NO_0X_HDR_CODECVT #if defined(BOOST_NO_CXX11_HDR_CODECVT) && !defined(BOOST_NO_0X_HDR_CODECVT) # define BOOST_NO_0X_HDR_CODECVT #endif // Use BOOST_NO_CXX11_HDR_CONDITION_VARIABLE instead of BOOST_NO_0X_HDR_CONDITION_VARIABLE #if defined(BOOST_NO_CXX11_HDR_CONDITION_VARIABLE) && !defined(BOOST_NO_0X_HDR_CONDITION_VARIABLE) # define BOOST_NO_0X_HDR_CONDITION_VARIABLE #endif // Use BOOST_NO_CXX11_HDR_FORWARD_LIST instead of BOOST_NO_0X_HDR_FORWARD_LIST #if defined(BOOST_NO_CXX11_HDR_FORWARD_LIST) && !defined(BOOST_NO_0X_HDR_FORWARD_LIST) # define BOOST_NO_0X_HDR_FORWARD_LIST #endif // Use BOOST_NO_CXX11_HDR_FUTURE instead of BOOST_NO_0X_HDR_FUTURE #if defined(BOOST_NO_CXX11_HDR_FUTURE) && !defined(BOOST_NO_0X_HDR_FUTURE) # define BOOST_NO_0X_HDR_FUTURE #endif // Use BOOST_NO_CXX11_HDR_INITIALIZER_LIST // instead of BOOST_NO_0X_HDR_INITIALIZER_LIST or BOOST_NO_INITIALIZER_LISTS #ifdef BOOST_NO_CXX11_HDR_INITIALIZER_LIST # ifndef BOOST_NO_0X_HDR_INITIALIZER_LIST # define BOOST_NO_0X_HDR_INITIALIZER_LIST # endif # ifndef BOOST_NO_INITIALIZER_LISTS # define BOOST_NO_INITIALIZER_LISTS # endif #endif // Use BOOST_NO_CXX11_HDR_MUTEX instead of BOOST_NO_0X_HDR_MUTEX #if defined(BOOST_NO_CXX11_HDR_MUTEX) && !defined(BOOST_NO_0X_HDR_MUTEX) # define BOOST_NO_0X_HDR_MUTEX #endif // Use BOOST_NO_CXX11_HDR_RANDOM instead of BOOST_NO_0X_HDR_RANDOM #if defined(BOOST_NO_CXX11_HDR_RANDOM) && !defined(BOOST_NO_0X_HDR_RANDOM) # define BOOST_NO_0X_HDR_RANDOM #endif // Use BOOST_NO_CXX11_HDR_RATIO instead of BOOST_NO_0X_HDR_RATIO #if defined(BOOST_NO_CXX11_HDR_RATIO) && !defined(BOOST_NO_0X_HDR_RATIO) # define BOOST_NO_0X_HDR_RATIO #endif // Use BOOST_NO_CXX11_HDR_REGEX instead of BOOST_NO_0X_HDR_REGEX #if defined(BOOST_NO_CXX11_HDR_REGEX) && !defined(BOOST_NO_0X_HDR_REGEX) # define BOOST_NO_0X_HDR_REGEX #endif // Use BOOST_NO_CXX11_HDR_SYSTEM_ERROR instead of BOOST_NO_0X_HDR_SYSTEM_ERROR #if defined(BOOST_NO_CXX11_HDR_SYSTEM_ERROR) && !defined(BOOST_NO_0X_HDR_SYSTEM_ERROR) # define BOOST_NO_0X_HDR_SYSTEM_ERROR #endif // Use BOOST_NO_CXX11_HDR_THREAD instead of BOOST_NO_0X_HDR_THREAD #if defined(BOOST_NO_CXX11_HDR_THREAD) && !defined(BOOST_NO_0X_HDR_THREAD) # define BOOST_NO_0X_HDR_THREAD #endif // Use BOOST_NO_CXX11_HDR_TUPLE instead of BOOST_NO_0X_HDR_TUPLE #if defined(BOOST_NO_CXX11_HDR_TUPLE) && !defined(BOOST_NO_0X_HDR_TUPLE) # define BOOST_NO_0X_HDR_TUPLE #endif // Use BOOST_NO_CXX11_HDR_TYPE_TRAITS instead of BOOST_NO_0X_HDR_TYPE_TRAITS #if defined(BOOST_NO_CXX11_HDR_TYPE_TRAITS) && !defined(BOOST_NO_0X_HDR_TYPE_TRAITS) # define BOOST_NO_0X_HDR_TYPE_TRAITS #endif // Use BOOST_NO_CXX11_HDR_TYPEINDEX instead of BOOST_NO_0X_HDR_TYPEINDEX #if defined(BOOST_NO_CXX11_HDR_TYPEINDEX) && !defined(BOOST_NO_0X_HDR_TYPEINDEX) # define BOOST_NO_0X_HDR_TYPEINDEX #endif // Use BOOST_NO_CXX11_HDR_UNORDERED_MAP instead of BOOST_NO_0X_HDR_UNORDERED_MAP #if defined(BOOST_NO_CXX11_HDR_UNORDERED_MAP) && !defined(BOOST_NO_0X_HDR_UNORDERED_MAP) # define BOOST_NO_0X_HDR_UNORDERED_MAP #endif // Use BOOST_NO_CXX11_HDR_UNORDERED_SET instead of BOOST_NO_0X_HDR_UNORDERED_SET #if defined(BOOST_NO_CXX11_HDR_UNORDERED_SET) && !defined(BOOST_NO_0X_HDR_UNORDERED_SET) # define BOOST_NO_0X_HDR_UNORDERED_SET #endif // ------------------ End of deprecated macros for 1.50 --------------------------- // -------------------- Deprecated macros for 1.51 --------------------------- // These will go away in a future release // Use BOOST_NO_CXX11_AUTO_DECLARATIONS instead of BOOST_NO_AUTO_DECLARATIONS #if defined(BOOST_NO_CXX11_AUTO_DECLARATIONS) && !defined(BOOST_NO_AUTO_DECLARATIONS) # define BOOST_NO_AUTO_DECLARATIONS #endif // Use BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS instead of BOOST_NO_AUTO_MULTIDECLARATIONS #if defined(BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS) && !defined(BOOST_NO_AUTO_MULTIDECLARATIONS) # define BOOST_NO_AUTO_MULTIDECLARATIONS #endif // Use BOOST_NO_CXX11_CHAR16_T instead of BOOST_NO_CHAR16_T #if defined(BOOST_NO_CXX11_CHAR16_T) && !defined(BOOST_NO_CHAR16_T) # define BOOST_NO_CHAR16_T #endif // Use BOOST_NO_CXX11_CHAR32_T instead of BOOST_NO_CHAR32_T #if defined(BOOST_NO_CXX11_CHAR32_T) && !defined(BOOST_NO_CHAR32_T) # define BOOST_NO_CHAR32_T #endif // Use BOOST_NO_CXX11_TEMPLATE_ALIASES instead of BOOST_NO_TEMPLATE_ALIASES #if defined(BOOST_NO_CXX11_TEMPLATE_ALIASES) && !defined(BOOST_NO_TEMPLATE_ALIASES) # define BOOST_NO_TEMPLATE_ALIASES #endif // Use BOOST_NO_CXX11_CONSTEXPR instead of BOOST_NO_CONSTEXPR #if defined(BOOST_NO_CXX11_CONSTEXPR) && !defined(BOOST_NO_CONSTEXPR) # define BOOST_NO_CONSTEXPR #endif // Use BOOST_NO_CXX11_DECLTYPE_N3276 instead of BOOST_NO_DECLTYPE_N3276 #if defined(BOOST_NO_CXX11_DECLTYPE_N3276) && !defined(BOOST_NO_DECLTYPE_N3276) # define BOOST_NO_DECLTYPE_N3276 #endif // Use BOOST_NO_CXX11_DECLTYPE instead of BOOST_NO_DECLTYPE #if defined(BOOST_NO_CXX11_DECLTYPE) && !defined(BOOST_NO_DECLTYPE) # define BOOST_NO_DECLTYPE #endif // Use BOOST_NO_CXX11_DEFAULTED_FUNCTIONS instead of BOOST_NO_DEFAULTED_FUNCTIONS #if defined(BOOST_NO_CXX11_DEFAULTED_FUNCTIONS) && !defined(BOOST_NO_DEFAULTED_FUNCTIONS) # define BOOST_NO_DEFAULTED_FUNCTIONS #endif // Use BOOST_NO_CXX11_DELETED_FUNCTIONS instead of BOOST_NO_DELETED_FUNCTIONS #if defined(BOOST_NO_CXX11_DELETED_FUNCTIONS) && !defined(BOOST_NO_DELETED_FUNCTIONS) # define BOOST_NO_DELETED_FUNCTIONS #endif // Use BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS instead of BOOST_NO_EXPLICIT_CONVERSION_OPERATORS #if defined(BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS) && !defined(BOOST_NO_EXPLICIT_CONVERSION_OPERATORS) # define BOOST_NO_EXPLICIT_CONVERSION_OPERATORS #endif // Use BOOST_NO_CXX11_EXTERN_TEMPLATE instead of BOOST_NO_EXTERN_TEMPLATE #if defined(BOOST_NO_CXX11_EXTERN_TEMPLATE) && !defined(BOOST_NO_EXTERN_TEMPLATE) # define BOOST_NO_EXTERN_TEMPLATE #endif // Use BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS instead of BOOST_NO_FUNCTION_TEMPLATE_DEFAULT_ARGS #if defined(BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS) && !defined(BOOST_NO_FUNCTION_TEMPLATE_DEFAULT_ARGS) # define BOOST_NO_FUNCTION_TEMPLATE_DEFAULT_ARGS #endif // Use BOOST_NO_CXX11_LAMBDAS instead of BOOST_NO_LAMBDAS #if defined(BOOST_NO_CXX11_LAMBDAS) && !defined(BOOST_NO_LAMBDAS) # define BOOST_NO_LAMBDAS #endif // Use BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS instead of BOOST_NO_LOCAL_CLASS_TEMPLATE_PARAMETERS #if defined(BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS) && !defined(BOOST_NO_LOCAL_CLASS_TEMPLATE_PARAMETERS) # define BOOST_NO_LOCAL_CLASS_TEMPLATE_PARAMETERS #endif // Use BOOST_NO_CXX11_NOEXCEPT instead of BOOST_NO_NOEXCEPT #if defined(BOOST_NO_CXX11_NOEXCEPT) && !defined(BOOST_NO_NOEXCEPT) # define BOOST_NO_NOEXCEPT #endif // Use BOOST_NO_CXX11_NULLPTR instead of BOOST_NO_NULLPTR #if defined(BOOST_NO_CXX11_NULLPTR) && !defined(BOOST_NO_NULLPTR) # define BOOST_NO_NULLPTR #endif // Use BOOST_NO_CXX11_RAW_LITERALS instead of BOOST_NO_RAW_LITERALS #if defined(BOOST_NO_CXX11_RAW_LITERALS) && !defined(BOOST_NO_RAW_LITERALS) # define BOOST_NO_RAW_LITERALS #endif // Use BOOST_NO_CXX11_RVALUE_REFERENCES instead of BOOST_NO_RVALUE_REFERENCES #if defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && !defined(BOOST_NO_RVALUE_REFERENCES) # define BOOST_NO_RVALUE_REFERENCES #endif // Use BOOST_NO_CXX11_SCOPED_ENUMS instead of BOOST_NO_SCOPED_ENUMS #if defined(BOOST_NO_CXX11_SCOPED_ENUMS) && !defined(BOOST_NO_SCOPED_ENUMS) # define BOOST_NO_SCOPED_ENUMS #endif // Use BOOST_NO_CXX11_STATIC_ASSERT instead of BOOST_NO_STATIC_ASSERT #if defined(BOOST_NO_CXX11_STATIC_ASSERT) && !defined(BOOST_NO_STATIC_ASSERT) # define BOOST_NO_STATIC_ASSERT #endif // Use BOOST_NO_CXX11_STD_UNORDERED instead of BOOST_NO_STD_UNORDERED #if defined(BOOST_NO_CXX11_STD_UNORDERED) && !defined(BOOST_NO_STD_UNORDERED) # define BOOST_NO_STD_UNORDERED #endif // Use BOOST_NO_CXX11_UNICODE_LITERALS instead of BOOST_NO_UNICODE_LITERALS #if defined(BOOST_NO_CXX11_UNICODE_LITERALS) && !defined(BOOST_NO_UNICODE_LITERALS) # define BOOST_NO_UNICODE_LITERALS #endif // Use BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX instead of BOOST_NO_UNIFIED_INITIALIZATION_SYNTAX #if defined(BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX) && !defined(BOOST_NO_UNIFIED_INITIALIZATION_SYNTAX) # define BOOST_NO_UNIFIED_INITIALIZATION_SYNTAX #endif // Use BOOST_NO_CXX11_VARIADIC_TEMPLATES instead of BOOST_NO_VARIADIC_TEMPLATES #if defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) && !defined(BOOST_NO_VARIADIC_TEMPLATES) # define BOOST_NO_VARIADIC_TEMPLATES #endif // Use BOOST_NO_CXX11_VARIADIC_MACROS instead of BOOST_NO_VARIADIC_MACROS #if defined(BOOST_NO_CXX11_VARIADIC_MACROS) && !defined(BOOST_NO_VARIADIC_MACROS) # define BOOST_NO_VARIADIC_MACROS #endif // Use BOOST_NO_CXX11_NUMERIC_LIMITS instead of BOOST_NO_NUMERIC_LIMITS_LOWEST #if defined(BOOST_NO_CXX11_NUMERIC_LIMITS) && !defined(BOOST_NO_NUMERIC_LIMITS_LOWEST) # define BOOST_NO_NUMERIC_LIMITS_LOWEST #endif // ------------------ End of deprecated macros for 1.51 --------------------------- // // Helper macros BOOST_NOEXCEPT, BOOST_NOEXCEPT_IF, BOOST_NOEXCEPT_EXPR // These aid the transition to C++11 while still supporting C++03 compilers // #ifdef BOOST_NO_CXX11_NOEXCEPT # define BOOST_NOEXCEPT # define BOOST_NOEXCEPT_OR_NOTHROW throw() # define BOOST_NOEXCEPT_IF(Predicate) # define BOOST_NOEXCEPT_EXPR(Expression) false #else # define BOOST_NOEXCEPT noexcept # define BOOST_NOEXCEPT_OR_NOTHROW noexcept # define BOOST_NOEXCEPT_IF(Predicate) noexcept((Predicate)) # define BOOST_NOEXCEPT_EXPR(Expression) noexcept((Expression)) #endif // // Helper macro BOOST_FALLTHROUGH // Fallback definition of BOOST_FALLTHROUGH macro used to mark intended // fall-through between case labels in a switch statement. We use a definition // that requires a semicolon after it to avoid at least one type of misuse even // on unsupported compilers. // #ifndef BOOST_FALLTHROUGH # define BOOST_FALLTHROUGH ((void)0) #endif // // constexpr workarounds // #if defined(BOOST_NO_CXX11_CONSTEXPR) #define BOOST_CONSTEXPR #define BOOST_CONSTEXPR_OR_CONST const #else #define BOOST_CONSTEXPR constexpr #define BOOST_CONSTEXPR_OR_CONST constexpr #endif #if defined(BOOST_NO_CXX14_CONSTEXPR) #define BOOST_CXX14_CONSTEXPR #else #define BOOST_CXX14_CONSTEXPR constexpr #endif // // Unused variable/typedef workarounds: // #ifndef BOOST_ATTRIBUTE_UNUSED # define BOOST_ATTRIBUTE_UNUSED #endif #define BOOST_STATIC_CONSTEXPR static BOOST_CONSTEXPR_OR_CONST // // Set BOOST_HAS_STATIC_ASSERT when BOOST_NO_CXX11_STATIC_ASSERT is not defined // #if !defined(BOOST_NO_CXX11_STATIC_ASSERT) && !defined(BOOST_HAS_STATIC_ASSERT) # define BOOST_HAS_STATIC_ASSERT #endif // // Set BOOST_HAS_RVALUE_REFS when BOOST_NO_CXX11_RVALUE_REFERENCES is not defined // #if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && !defined(BOOST_HAS_RVALUE_REFS) #define BOOST_HAS_RVALUE_REFS #endif // // Set BOOST_HAS_VARIADIC_TMPL when BOOST_NO_CXX11_VARIADIC_TEMPLATES is not defined // #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) && !defined(BOOST_HAS_VARIADIC_TMPL) #define BOOST_HAS_VARIADIC_TMPL #endif // // Set BOOST_NO_CXX11_FIXED_LENGTH_VARIADIC_TEMPLATE_EXPANSION_PACKS when // BOOST_NO_CXX11_VARIADIC_TEMPLATES is set: // #if defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) && !defined(BOOST_NO_CXX11_FIXED_LENGTH_VARIADIC_TEMPLATE_EXPANSION_PACKS) # define BOOST_NO_CXX11_FIXED_LENGTH_VARIADIC_TEMPLATE_EXPANSION_PACKS #endif // // Finish off with checks for macros that are depricated / no longer supported, // if any of these are set then it's very likely that much of Boost will no // longer work. So stop with a #error for now, but give the user a chance // to continue at their own risk if they really want to: // #if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) && !defined(BOOST_CONFIG_ALLOW_DEPRECATED) # error "You are using a compiler which lacks features which are now a minimum requirement in order to use Boost, define BOOST_CONFIG_ALLOW_DEPRECATED if you want to continue at your own risk!!!" #endif #endif ================================================ FILE: benchmarks/boost/config/user.hpp ================================================ // boost/config/user.hpp ---------------------------------------------------// // (C) Copyright John Maddock 2001. // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // Do not check in modified versions of this file, // This file may be customized by the end user, but not by boost. // // Use this file to define a site and compiler specific // configuration policy: // // define this to locate a compiler config file: // #define BOOST_COMPILER_CONFIG // define this to locate a stdlib config file: // #define BOOST_STDLIB_CONFIG // define this to locate a platform config file: // #define BOOST_PLATFORM_CONFIG // define this to disable compiler config, // use if your compiler config has nothing to set: // #define BOOST_NO_COMPILER_CONFIG // define this to disable stdlib config, // use if your stdlib config has nothing to set: // #define BOOST_NO_STDLIB_CONFIG // define this to disable platform config, // use if your platform config has nothing to set: // #define BOOST_NO_PLATFORM_CONFIG // define this to disable all config options, // excluding the user config. Use if your // setup is fully ISO compliant, and has no // useful extensions, or for autoconf generated // setups: // #define BOOST_NO_CONFIG // define this to make the config "optimistic" // about unknown compiler versions. Normally // unknown compiler versions are assumed to have // all the defects of the last known version, however // setting this flag, causes the config to assume // that unknown compiler versions are fully conformant // with the standard: // #define BOOST_STRICT_CONFIG // define this to cause the config to halt compilation // with an #error if it encounters anything unknown -- // either an unknown compiler version or an unknown // compiler/platform/library: // #define BOOST_ASSERT_CONFIG // define if you want to disable threading support, even // when available: // #define BOOST_DISABLE_THREADS // define when you want to disable Win32 specific features // even when available: // #define BOOST_DISABLE_WIN32 // BOOST_DISABLE_ABI_HEADERS: Stops boost headers from including any // prefix/suffix headers that normally control things like struct // packing and alignment. // #define BOOST_DISABLE_ABI_HEADERS // BOOST_ABI_PREFIX: A prefix header to include in place of whatever // boost.config would normally select, any replacement should set up // struct packing and alignment options as required. // #define BOOST_ABI_PREFIX my-header-name // BOOST_ABI_SUFFIX: A suffix header to include in place of whatever // boost.config would normally select, any replacement should undo // the effects of the prefix header. // #define BOOST_ABI_SUFFIX my-header-name // BOOST_ALL_DYN_LINK: Forces all libraries that have separate source, // to be linked as dll's rather than static libraries on Microsoft Windows // (this macro is used to turn on __declspec(dllimport) modifiers, so that // the compiler knows which symbols to look for in a dll rather than in a // static library). Note that there may be some libraries that can only // be linked in one way (statically or dynamically), in these cases this // macro has no effect. // #define BOOST_ALL_DYN_LINK // BOOST_WHATEVER_DYN_LINK: Forces library "whatever" to be linked as a dll // rather than a static library on Microsoft Windows: replace the WHATEVER // part of the macro name with the name of the library that you want to // dynamically link to, for example use BOOST_DATE_TIME_DYN_LINK or // BOOST_REGEX_DYN_LINK etc (this macro is used to turn on __declspec(dllimport) // modifiers, so that the compiler knows which symbols to look for in a dll // rather than in a static library). // Note that there may be some libraries that can only // be linked in one way (statically or dynamically), // in these cases this macro is unsupported. // #define BOOST_WHATEVER_DYN_LINK // BOOST_ALL_NO_LIB: Tells the config system not to automatically select // which libraries to link against. // Normally if a compiler supports #pragma lib, then the correct library // build variant will be automatically selected and linked against, // simply by the act of including one of that library's headers. // This macro turns that feature off. // #define BOOST_ALL_NO_LIB // BOOST_WHATEVER_NO_LIB: Tells the config system not to automatically // select which library to link against for library "whatever", // replace WHATEVER in the macro name with the name of the library; // for example BOOST_DATE_TIME_NO_LIB or BOOST_REGEX_NO_LIB. // Normally if a compiler supports #pragma lib, then the correct library // build variant will be automatically selected and linked against, simply // by the act of including one of that library's headers. This macro turns // that feature off. // #define BOOST_WHATEVER_NO_LIB // BOOST_LIB_BUILDID: Set to the same value as the value passed to Boost.Build's // --buildid command line option. For example if you built using: // // bjam address-model=64 --buildid=amd64 // // then compile your code with: // // -DBOOST_LIB_BUILDID = amd64 // // to ensure the correct libraries are selected at link time. // #define BOOST_LIB_BUILDID amd64 ================================================ FILE: benchmarks/boost/config/warning_disable.hpp ================================================ // Copyright John Maddock 2008 // Use, modification, and distribution is subject to the Boost Software // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // This file exists to turn off some overly-pedantic warning emitted // by certain compilers. You should include this header only in: // // * A test case, before any other headers, or, // * A library source file before any other headers. // // IT SHOULD NOT BE INCLUDED BY ANY BOOST HEADER. // // YOU SHOULD NOT INCLUDE IT IF YOU CAN REASONABLY FIX THE WARNING. // // The only warnings disabled here are those that are: // // * Quite unreasonably pedantic. // * Generally only emitted by a single compiler. // * Can't easily be fixed: for example if the vendors own std lib // code emits these warnings! // // Note that THIS HEADER MUST NOT INCLUDE ANY OTHER HEADERS: // not even std library ones! Doing so may turn the warning // off too late to be of any use. For example the VC++ C4996 // warning can be emitted from if that header is included // before or by this one :-( // #ifndef BOOST_CONFIG_WARNING_DISABLE_HPP #define BOOST_CONFIG_WARNING_DISABLE_HPP #if defined(_MSC_VER) && (_MSC_VER >= 1400) // Error 'function': was declared deprecated // http://msdn2.microsoft.com/en-us/library/ttcz0bys(VS.80).aspx // This error is emitted when you use some perfectly conforming // std lib functions in a perfectly correct way, and also by // some of Microsoft's own std lib code ! # pragma warning(disable:4996) #endif #if defined(__INTEL_COMPILER) || defined(__ICL) // As above: gives warning when a "deprecated" // std library function is encountered. # pragma warning(disable:1786) #endif #endif // BOOST_CONFIG_WARNING_DISABLE_HPP ================================================ FILE: benchmarks/boost/config.hpp ================================================ // Boost config.hpp configuration header file ------------------------------// // (C) Copyright John Maddock 2002. // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org/libs/config for most recent version. // Boost config.hpp policy and rationale documentation has been moved to // http://www.boost.org/libs/config // // CAUTION: This file is intended to be completely stable - // DO NOT MODIFY THIS FILE! // #ifndef BOOST_CONFIG_HPP #define BOOST_CONFIG_HPP // if we don't have a user config, then use the default location: #if !defined(BOOST_USER_CONFIG) && !defined(BOOST_NO_USER_CONFIG) # define BOOST_USER_CONFIG #if 0 // For dependency trackers: # include #endif #endif // include it first: #ifdef BOOST_USER_CONFIG # include BOOST_USER_CONFIG #endif // if we don't have a compiler config set, try and find one: #if !defined(BOOST_COMPILER_CONFIG) && !defined(BOOST_NO_COMPILER_CONFIG) && !defined(BOOST_NO_CONFIG) # include #endif // if we have a compiler config, include it now: #ifdef BOOST_COMPILER_CONFIG # include BOOST_COMPILER_CONFIG #endif // if we don't have a std library config set, try and find one: #if !defined(BOOST_STDLIB_CONFIG) && !defined(BOOST_NO_STDLIB_CONFIG) && !defined(BOOST_NO_CONFIG) && defined(__cplusplus) # include #endif // if we have a std library config, include it now: #ifdef BOOST_STDLIB_CONFIG # include BOOST_STDLIB_CONFIG #endif // if we don't have a platform config set, try and find one: #if !defined(BOOST_PLATFORM_CONFIG) && !defined(BOOST_NO_PLATFORM_CONFIG) && !defined(BOOST_NO_CONFIG) # include #endif // if we have a platform config, include it now: #ifdef BOOST_PLATFORM_CONFIG # include BOOST_PLATFORM_CONFIG #endif // get config suffix code: #include #ifdef BOOST_HAS_PRAGMA_ONCE #pragma once #endif #endif // BOOST_CONFIG_HPP ================================================ FILE: benchmarks/boost/core/enable_if.hpp ================================================ // Boost enable_if library // Copyright 2003 (c) The Trustees of Indiana University. // Use, modification, and distribution is subject to the Boost Software // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // Authors: Jaakko Jarvi (jajarvi at osl.iu.edu) // Jeremiah Willcock (jewillco at osl.iu.edu) // Andrew Lumsdaine (lums at osl.iu.edu) #ifndef BOOST_CORE_ENABLE_IF_HPP #define BOOST_CORE_ENABLE_IF_HPP #include "boost/config.hpp" // Even the definition of enable_if causes problems on some compilers, // so it's macroed out for all compilers that do not support SFINAE #ifndef BOOST_NO_SFINAE namespace boost { template struct enable_if_has_type { typedef R type; }; template struct enable_if_c { typedef T type; }; template struct enable_if_c {}; template struct enable_if : public enable_if_c {}; template struct lazy_enable_if_c { typedef typename T::type type; }; template struct lazy_enable_if_c {}; template struct lazy_enable_if : public lazy_enable_if_c {}; template struct disable_if_c { typedef T type; }; template struct disable_if_c {}; template struct disable_if : public disable_if_c {}; template struct lazy_disable_if_c { typedef typename T::type type; }; template struct lazy_disable_if_c {}; template struct lazy_disable_if : public lazy_disable_if_c {}; } // namespace boost #else namespace boost { namespace detail { typedef void enable_if_default_T; } template struct enable_if_does_not_work_on_this_compiler; template struct enable_if_has_type : enable_if_does_not_work_on_this_compiler { }; template struct enable_if_c : enable_if_does_not_work_on_this_compiler { }; template struct disable_if_c : enable_if_does_not_work_on_this_compiler { }; template struct lazy_enable_if_c : enable_if_does_not_work_on_this_compiler { }; template struct lazy_disable_if_c : enable_if_does_not_work_on_this_compiler { }; template struct enable_if : enable_if_does_not_work_on_this_compiler { }; template struct disable_if : enable_if_does_not_work_on_this_compiler { }; template struct lazy_enable_if : enable_if_does_not_work_on_this_compiler { }; template struct lazy_disable_if : enable_if_does_not_work_on_this_compiler { }; } // namespace boost #endif // BOOST_NO_SFINAE #endif ================================================ FILE: benchmarks/boost/core/noncopyable.hpp ================================================ // Boost noncopyable.hpp header file --------------------------------------// // (C) Copyright Beman Dawes 1999-2003. Distributed under the Boost // Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org/libs/utility for documentation. #ifndef BOOST_CORE_NONCOPYABLE_HPP #define BOOST_CORE_NONCOPYABLE_HPP #include namespace boost { // Private copy constructor and copy assignment ensure classes derived from // class noncopyable cannot be copied. // Contributed by Dave Abrahams namespace noncopyable_ // protection from unintended ADL { class noncopyable { protected: #if !defined(BOOST_NO_CXX11_DEFAULTED_FUNCTIONS) && !defined(BOOST_NO_CXX11_NON_PUBLIC_DEFAULTED_FUNCTIONS) BOOST_CONSTEXPR noncopyable() = default; ~noncopyable() = default; #else noncopyable() {} ~noncopyable() {} #endif #if !defined(BOOST_NO_CXX11_DELETED_FUNCTIONS) noncopyable( const noncopyable& ) = delete; noncopyable& operator=( const noncopyable& ) = delete; #else private: // emphasize the following members are private noncopyable( const noncopyable& ); noncopyable& operator=( const noncopyable& ); #endif }; } typedef noncopyable_::noncopyable noncopyable; } // namespace boost #endif // BOOST_CORE_NONCOPYABLE_HPP ================================================ FILE: benchmarks/boost/core/swap.hpp ================================================ // Copyright (C) 2007, 2008 Steven Watanabe, Joseph Gauterin, Niels Dekker // // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // For more information, see http://www.boost.org #ifndef BOOST_CORE_SWAP_HPP #define BOOST_CORE_SWAP_HPP // Note: the implementation of this utility contains various workarounds: // - swap_impl is put outside the boost namespace, to avoid infinite // recursion (causing stack overflow) when swapping objects of a primitive // type. // - swap_impl has a using-directive, rather than a using-declaration, // because some compilers (including MSVC 7.1, Borland 5.9.3, and // Intel 8.1) don't do argument-dependent lookup when it has a // using-declaration instead. // - boost::swap has two template arguments, instead of one, to // avoid ambiguity when swapping objects of a Boost type that does // not have its own boost::swap overload. #include //for std::swap (C++11) #include //for std::swap (C++98) #include //for std::size_t #include namespace boost_swap_impl { template BOOST_GPU_ENABLED void swap_impl(T& left, T& right) { using namespace std;//use std::swap if argument dependent lookup fails swap(left,right); } template BOOST_GPU_ENABLED void swap_impl(T (& left)[N], T (& right)[N]) { for (std::size_t i = 0; i < N; ++i) { ::boost_swap_impl::swap_impl(left[i], right[i]); } } } namespace boost { template BOOST_GPU_ENABLED void swap(T1& left, T2& right) { ::boost_swap_impl::swap_impl(left, right); } } #endif ================================================ FILE: benchmarks/boost/cstdint.hpp ================================================ // boost cstdint.hpp header file ------------------------------------------// // (C) Copyright Beman Dawes 1999. // (C) Copyright Jens Mauer 2001 // (C) Copyright John Maddock 2001 // Distributed under the Boost // Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org/libs/integer for documentation. // Revision History // 31 Oct 01 use BOOST_HAS_LONG_LONG to check for "long long" (Jens M.) // 16 Apr 01 check LONGLONG_MAX when looking for "long long" (Jens Maurer) // 23 Jan 01 prefer "long" over "int" for int32_t and intmax_t (Jens Maurer) // 12 Nov 00 Merged (Jens Maurer) // 23 Sep 00 Added INTXX_C macro support (John Maddock). // 22 Sep 00 Better 64-bit support (John Maddock) // 29 Jun 00 Reimplement to avoid including stdint.h within namespace boost // 8 Aug 99 Initial version (Beman Dawes) #ifndef BOOST_CSTDINT_HPP #define BOOST_CSTDINT_HPP // // Since we always define the INT#_C macros as per C++0x, // define __STDC_CONSTANT_MACROS so that does the right // thing if possible, and so that the user knows that the macros // are actually defined as per C99. // #ifndef __STDC_CONSTANT_MACROS # define __STDC_CONSTANT_MACROS #endif #include // // Note that GLIBC is a bit inconsistent about whether int64_t is defined or not // depending upon what headers happen to have been included first... // so we disable use of stdint.h when GLIBC does not define __GLIBC_HAVE_LONG_LONG. // See https://svn.boost.org/trac/boost/ticket/3548 and http://sources.redhat.com/bugzilla/show_bug.cgi?id=10990 // #if defined(BOOST_HAS_STDINT_H) \ && (!defined(__GLIBC__) \ || defined(__GLIBC_HAVE_LONG_LONG) \ || (defined(__GLIBC__) && ((__GLIBC__ > 2) || ((__GLIBC__ == 2) && (__GLIBC_MINOR__ >= 17))))) // The following #include is an implementation artifact; not part of interface. # ifdef __hpux // HP-UX has a vaguely nice in a non-standard location # include # ifdef __STDC_32_MODE__ // this is triggered with GCC, because it defines __cplusplus < 199707L # define BOOST_NO_INT64_T # endif # elif defined(__FreeBSD__) || defined(__IBMCPP__) || defined(_AIX) # include # else # include // There is a bug in Cygwin two _C macros # if defined(__STDC_CONSTANT_MACROS) && defined(__CYGWIN__) # undef INTMAX_C # undef UINTMAX_C # define INTMAX_C(c) c##LL # define UINTMAX_C(c) c##ULL # endif # endif #if defined(__QNX__) && defined(__EXT_QNX) // QNX (Dinkumware stdlib) defines these as non-standard names. // Reflect to the standard names. typedef ::intleast8_t int_least8_t; typedef ::intfast8_t int_fast8_t; typedef ::uintleast8_t uint_least8_t; typedef ::uintfast8_t uint_fast8_t; typedef ::intleast16_t int_least16_t; typedef ::intfast16_t int_fast16_t; typedef ::uintleast16_t uint_least16_t; typedef ::uintfast16_t uint_fast16_t; typedef ::intleast32_t int_least32_t; typedef ::intfast32_t int_fast32_t; typedef ::uintleast32_t uint_least32_t; typedef ::uintfast32_t uint_fast32_t; # ifndef BOOST_NO_INT64_T typedef ::intleast64_t int_least64_t; typedef ::intfast64_t int_fast64_t; typedef ::uintleast64_t uint_least64_t; typedef ::uintfast64_t uint_fast64_t; # endif #endif namespace boost { using ::int8_t; using ::int_least8_t; using ::int_fast8_t; using ::uint8_t; using ::uint_least8_t; using ::uint_fast8_t; using ::int16_t; using ::int_least16_t; using ::int_fast16_t; using ::uint16_t; using ::uint_least16_t; using ::uint_fast16_t; using ::int32_t; using ::int_least32_t; using ::int_fast32_t; using ::uint32_t; using ::uint_least32_t; using ::uint_fast32_t; # ifndef BOOST_NO_INT64_T using ::int64_t; using ::int_least64_t; using ::int_fast64_t; using ::uint64_t; using ::uint_least64_t; using ::uint_fast64_t; # endif using ::intmax_t; using ::uintmax_t; } // namespace boost #elif defined(__FreeBSD__) && (__FreeBSD__ <= 4) || defined(__osf__) || defined(__VMS) || defined(__SOLARIS9__) || defined(__NetBSD__) // FreeBSD and Tru64 have an that contains much of what we need. # include namespace boost { using ::int8_t; typedef int8_t int_least8_t; typedef int8_t int_fast8_t; using ::uint8_t; typedef uint8_t uint_least8_t; typedef uint8_t uint_fast8_t; using ::int16_t; typedef int16_t int_least16_t; typedef int16_t int_fast16_t; using ::uint16_t; typedef uint16_t uint_least16_t; typedef uint16_t uint_fast16_t; using ::int32_t; typedef int32_t int_least32_t; typedef int32_t int_fast32_t; using ::uint32_t; typedef uint32_t uint_least32_t; typedef uint32_t uint_fast32_t; # ifndef BOOST_NO_INT64_T using ::int64_t; typedef int64_t int_least64_t; typedef int64_t int_fast64_t; using ::uint64_t; typedef uint64_t uint_least64_t; typedef uint64_t uint_fast64_t; typedef int64_t intmax_t; typedef uint64_t uintmax_t; # else typedef int32_t intmax_t; typedef uint32_t uintmax_t; # endif } // namespace boost #else // BOOST_HAS_STDINT_H # include // implementation artifact; not part of interface # include // needed for limits macros namespace boost { // These are fairly safe guesses for some 16-bit, and most 32-bit and 64-bit // platforms. For other systems, they will have to be hand tailored. // // Because the fast types are assumed to be the same as the undecorated types, // it may be possible to hand tailor a more efficient implementation. Such // an optimization may be illusionary; on the Intel x86-family 386 on, for // example, byte arithmetic and load/stores are as fast as "int" sized ones. // 8-bit types ------------------------------------------------------------// # if UCHAR_MAX == 0xff typedef signed char int8_t; typedef signed char int_least8_t; typedef signed char int_fast8_t; typedef unsigned char uint8_t; typedef unsigned char uint_least8_t; typedef unsigned char uint_fast8_t; # else # error defaults not correct; you must hand modify boost/cstdint.hpp # endif // 16-bit types -----------------------------------------------------------// # if USHRT_MAX == 0xffff # if defined(__crayx1) // The Cray X1 has a 16-bit short, however it is not recommend // for use in performance critical code. typedef short int16_t; typedef short int_least16_t; typedef int int_fast16_t; typedef unsigned short uint16_t; typedef unsigned short uint_least16_t; typedef unsigned int uint_fast16_t; # else typedef short int16_t; typedef short int_least16_t; typedef short int_fast16_t; typedef unsigned short uint16_t; typedef unsigned short uint_least16_t; typedef unsigned short uint_fast16_t; # endif # elif (USHRT_MAX == 0xffffffff) && defined(__MTA__) // On MTA / XMT short is 32 bits unless the -short16 compiler flag is specified // MTA / XMT does support the following non-standard integer types typedef __short16 int16_t; typedef __short16 int_least16_t; typedef __short16 int_fast16_t; typedef unsigned __short16 uint16_t; typedef unsigned __short16 uint_least16_t; typedef unsigned __short16 uint_fast16_t; # elif (USHRT_MAX == 0xffffffff) && defined(CRAY) // no 16-bit types on Cray: typedef short int_least16_t; typedef short int_fast16_t; typedef unsigned short uint_least16_t; typedef unsigned short uint_fast16_t; # else # error defaults not correct; you must hand modify boost/cstdint.hpp # endif // 32-bit types -----------------------------------------------------------// # if UINT_MAX == 0xffffffff typedef int int32_t; typedef int int_least32_t; typedef int int_fast32_t; typedef unsigned int uint32_t; typedef unsigned int uint_least32_t; typedef unsigned int uint_fast32_t; # elif (USHRT_MAX == 0xffffffff) typedef short int32_t; typedef short int_least32_t; typedef short int_fast32_t; typedef unsigned short uint32_t; typedef unsigned short uint_least32_t; typedef unsigned short uint_fast32_t; # elif ULONG_MAX == 0xffffffff typedef long int32_t; typedef long int_least32_t; typedef long int_fast32_t; typedef unsigned long uint32_t; typedef unsigned long uint_least32_t; typedef unsigned long uint_fast32_t; # elif (UINT_MAX == 0xffffffffffffffff) && defined(__MTA__) // Integers are 64 bits on the MTA / XMT typedef __int32 int32_t; typedef __int32 int_least32_t; typedef __int32 int_fast32_t; typedef unsigned __int32 uint32_t; typedef unsigned __int32 uint_least32_t; typedef unsigned __int32 uint_fast32_t; # else # error defaults not correct; you must hand modify boost/cstdint.hpp # endif // 64-bit types + intmax_t and uintmax_t ----------------------------------// # if defined(BOOST_HAS_LONG_LONG) && \ !defined(BOOST_MSVC) && !defined(__BORLANDC__) && \ (!defined(__GLIBCPP__) || defined(_GLIBCPP_USE_LONG_LONG)) && \ (defined(ULLONG_MAX) || defined(ULONG_LONG_MAX) || defined(ULONGLONG_MAX)) # if defined(__hpux) // HP-UX's value of ULONG_LONG_MAX is unusable in preprocessor expressions # elif (defined(ULLONG_MAX) && ULLONG_MAX == 18446744073709551615ULL) || (defined(ULONG_LONG_MAX) && ULONG_LONG_MAX == 18446744073709551615ULL) || (defined(ULONGLONG_MAX) && ULONGLONG_MAX == 18446744073709551615ULL) // 2**64 - 1 # else # error defaults not correct; you must hand modify boost/cstdint.hpp # endif typedef ::boost::long_long_type intmax_t; typedef ::boost::ulong_long_type uintmax_t; typedef ::boost::long_long_type int64_t; typedef ::boost::long_long_type int_least64_t; typedef ::boost::long_long_type int_fast64_t; typedef ::boost::ulong_long_type uint64_t; typedef ::boost::ulong_long_type uint_least64_t; typedef ::boost::ulong_long_type uint_fast64_t; # elif ULONG_MAX != 0xffffffff # if ULONG_MAX == 18446744073709551615 // 2**64 - 1 typedef long intmax_t; typedef unsigned long uintmax_t; typedef long int64_t; typedef long int_least64_t; typedef long int_fast64_t; typedef unsigned long uint64_t; typedef unsigned long uint_least64_t; typedef unsigned long uint_fast64_t; # else # error defaults not correct; you must hand modify boost/cstdint.hpp # endif # elif defined(__GNUC__) && defined(BOOST_HAS_LONG_LONG) __extension__ typedef long long intmax_t; __extension__ typedef unsigned long long uintmax_t; __extension__ typedef long long int64_t; __extension__ typedef long long int_least64_t; __extension__ typedef long long int_fast64_t; __extension__ typedef unsigned long long uint64_t; __extension__ typedef unsigned long long uint_least64_t; __extension__ typedef unsigned long long uint_fast64_t; # elif defined(BOOST_HAS_MS_INT64) // // we have Borland/Intel/Microsoft __int64: // typedef __int64 intmax_t; typedef unsigned __int64 uintmax_t; typedef __int64 int64_t; typedef __int64 int_least64_t; typedef __int64 int_fast64_t; typedef unsigned __int64 uint64_t; typedef unsigned __int64 uint_least64_t; typedef unsigned __int64 uint_fast64_t; # else // assume no 64-bit integers # define BOOST_NO_INT64_T typedef int32_t intmax_t; typedef uint32_t uintmax_t; # endif } // namespace boost #endif // BOOST_HAS_STDINT_H // intptr_t/uintptr_t are defined separately because they are optional and not universally available #if defined(BOOST_WINDOWS) && !defined(_WIN32_WCE) && !defined(BOOST_HAS_STDINT_H) // Older MSVC don't have stdint.h and have intptr_t/uintptr_t defined in stddef.h #include #endif // PGI seems to not support intptr_t/uintptr_t properly. BOOST_HAS_STDINT_H is not defined for this compiler by Boost.Config. #if !defined(__PGIC__) #if (defined(BOOST_WINDOWS) && !defined(_WIN32_WCE)) \ || (defined(_XOPEN_UNIX) && (_XOPEN_UNIX+0 > 0) && !defined(__UCLIBC__)) \ || defined(__CYGWIN__) \ || defined(macintosh) || defined(__APPLE__) || defined(__APPLE_CC__) \ || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__) || defined(sun) namespace boost { using ::intptr_t; using ::uintptr_t; } #define BOOST_HAS_INTPTR_T // Clang pretends to be GCC, so it'll match this condition #elif defined(__GNUC__) && defined(__INTPTR_TYPE__) && defined(__UINTPTR_TYPE__) namespace boost { typedef __INTPTR_TYPE__ intptr_t; typedef __UINTPTR_TYPE__ uintptr_t; } #define BOOST_HAS_INTPTR_T #endif #endif // !defined(__PGIC__) #endif // BOOST_CSTDINT_HPP /**************************************************** Macro definition section: Added 23rd September 2000 (John Maddock). Modified 11th September 2001 to be excluded when BOOST_HAS_STDINT_H is defined (John Maddock). Modified 11th Dec 2009 to always define the INT#_C macros if they're not already defined (John Maddock). ******************************************************/ #if !defined(BOOST__STDC_CONSTANT_MACROS_DEFINED) && \ (!defined(INT8_C) || !defined(INT16_C) || !defined(INT32_C) || !defined(INT64_C)) // // For the following code we get several warnings along the lines of: // // boost/cstdint.hpp:428:35: error: use of C99 long long integer constant // // So we declare this a system header to suppress these warnings. // #if defined(__GNUC__) && (__GNUC__ >= 4) #pragma GCC system_header #endif #include # define BOOST__STDC_CONSTANT_MACROS_DEFINED # if defined(BOOST_HAS_MS_INT64) // // Borland/Intel/Microsoft compilers have width specific suffixes: // #ifndef INT8_C # define INT8_C(value) value##i8 #endif #ifndef INT16_C # define INT16_C(value) value##i16 #endif #ifndef INT32_C # define INT32_C(value) value##i32 #endif #ifndef INT64_C # define INT64_C(value) value##i64 #endif # ifdef __BORLANDC__ // Borland bug: appending ui8 makes the type a signed char # define UINT8_C(value) static_cast(value##u) # else # define UINT8_C(value) value##ui8 # endif #ifndef UINT16_C # define UINT16_C(value) value##ui16 #endif #ifndef UINT32_C # define UINT32_C(value) value##ui32 #endif #ifndef UINT64_C # define UINT64_C(value) value##ui64 #endif #ifndef INTMAX_C # define INTMAX_C(value) value##i64 # define UINTMAX_C(value) value##ui64 #endif # else // do it the old fashioned way: // 8-bit types ------------------------------------------------------------// # if (UCHAR_MAX == 0xff) && !defined(INT8_C) # define INT8_C(value) static_cast(value) # define UINT8_C(value) static_cast(value##u) # endif // 16-bit types -----------------------------------------------------------// # if (USHRT_MAX == 0xffff) && !defined(INT16_C) # define INT16_C(value) static_cast(value) # define UINT16_C(value) static_cast(value##u) # endif // 32-bit types -----------------------------------------------------------// #ifndef INT32_C # if (UINT_MAX == 0xffffffff) # define INT32_C(value) value # define UINT32_C(value) value##u # elif ULONG_MAX == 0xffffffff # define INT32_C(value) value##L # define UINT32_C(value) value##uL # endif #endif // 64-bit types + intmax_t and uintmax_t ----------------------------------// #ifndef INT64_C # if defined(BOOST_HAS_LONG_LONG) && \ (defined(ULLONG_MAX) || defined(ULONG_LONG_MAX) || defined(ULONGLONG_MAX) || defined(_ULLONG_MAX) || defined(_LLONG_MAX)) # if defined(__hpux) // HP-UX's value of ULONG_LONG_MAX is unusable in preprocessor expressions # define INT64_C(value) value##LL # define UINT64_C(value) value##uLL # elif (defined(ULLONG_MAX) && ULLONG_MAX == 18446744073709551615ULL) || \ (defined(ULONG_LONG_MAX) && ULONG_LONG_MAX == 18446744073709551615ULL) || \ (defined(ULONGLONG_MAX) && ULONGLONG_MAX == 18446744073709551615ULL) || \ (defined(_ULLONG_MAX) && _ULLONG_MAX == 18446744073709551615ULL) || \ (defined(_LLONG_MAX) && _LLONG_MAX == 9223372036854775807LL) # define INT64_C(value) value##LL # define UINT64_C(value) value##uLL # else # error defaults not correct; you must hand modify boost/cstdint.hpp # endif # elif ULONG_MAX != 0xffffffff # if ULONG_MAX == 18446744073709551615U // 2**64 - 1 # define INT64_C(value) value##L # define UINT64_C(value) value##uL # else # error defaults not correct; you must hand modify boost/cstdint.hpp # endif # elif defined(BOOST_HAS_LONG_LONG) // Usual macros not defined, work things out for ourselves: # if(~0uLL == 18446744073709551615ULL) # define INT64_C(value) value##LL # define UINT64_C(value) value##uLL # else # error defaults not correct; you must hand modify boost/cstdint.hpp # endif # else # error defaults not correct; you must hand modify boost/cstdint.hpp # endif # ifdef BOOST_NO_INT64_T # define INTMAX_C(value) INT32_C(value) # define UINTMAX_C(value) UINT32_C(value) # else # define INTMAX_C(value) INT64_C(value) # define UINTMAX_C(value) UINT64_C(value) # endif #endif # endif // Borland/Microsoft specific width suffixes #endif // INT#_C macros. ================================================ FILE: benchmarks/boost/current_function.hpp ================================================ #ifndef BOOST_CURRENT_FUNCTION_HPP_INCLUDED #define BOOST_CURRENT_FUNCTION_HPP_INCLUDED // MS compatible compilers support #pragma once #if defined(_MSC_VER) && (_MSC_VER >= 1020) # pragma once #endif // // boost/current_function.hpp - BOOST_CURRENT_FUNCTION // // Copyright (c) 2002 Peter Dimov and Multi Media Ltd. // // Distributed under the Boost Software License, Version 1.0. // See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt // // http://www.boost.org/libs/assert/current_function.html // namespace boost { namespace detail { inline void current_function_helper() { #if defined(__GNUC__) || (defined(__MWERKS__) && (__MWERKS__ >= 0x3000)) || (defined(__ICC) && (__ICC >= 600)) || defined(__ghs__) # define BOOST_CURRENT_FUNCTION __PRETTY_FUNCTION__ #elif defined(__DMC__) && (__DMC__ >= 0x810) # define BOOST_CURRENT_FUNCTION __PRETTY_FUNCTION__ #elif defined(__FUNCSIG__) # define BOOST_CURRENT_FUNCTION __FUNCSIG__ #elif (defined(__INTEL_COMPILER) && (__INTEL_COMPILER >= 600)) || (defined(__IBMCPP__) && (__IBMCPP__ >= 500)) # define BOOST_CURRENT_FUNCTION __FUNCTION__ #elif defined(__BORLANDC__) && (__BORLANDC__ >= 0x550) # define BOOST_CURRENT_FUNCTION __FUNC__ #elif defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901) # define BOOST_CURRENT_FUNCTION __func__ #elif defined(__cplusplus) && (__cplusplus >= 201103) # define BOOST_CURRENT_FUNCTION __func__ #else # define BOOST_CURRENT_FUNCTION "(unknown)" #endif } } // namespace detail } // namespace boost #endif // #ifndef BOOST_CURRENT_FUNCTION_HPP_INCLUDED ================================================ FILE: benchmarks/boost/detail/is_xxx.hpp ================================================ // Copyright David Abrahams 2005. Distributed under the Boost // Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_DETAIL_IS_XXX_DWA20051011_HPP # define BOOST_DETAIL_IS_XXX_DWA20051011_HPP # include # include # include # define BOOST_DETAIL_IS_XXX_DEF(name, qualified_name, nargs) \ template \ struct is_##name : mpl::false_ \ { \ }; \ \ template < BOOST_PP_ENUM_PARAMS_Z(1, nargs, class T) > \ struct is_##name< \ qualified_name< BOOST_PP_ENUM_PARAMS_Z(1, nargs, T) > \ > \ : mpl::true_ \ { \ }; #endif // BOOST_DETAIL_IS_XXX_DWA20051011_HPP ================================================ FILE: benchmarks/boost/detail/iterator.hpp ================================================ // (C) Copyright David Abrahams 2002. // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) #ifndef ITERATOR_DWA122600_HPP_ #define ITERATOR_DWA122600_HPP_ // This header is obsolete and will be deprecated. #include namespace boost { namespace detail { using std::iterator_traits; using std::distance; } // namespace detail } // namespace boost #endif // ITERATOR_DWA122600_HPP_ ================================================ FILE: benchmarks/boost/detail/workaround.hpp ================================================ // Copyright David Abrahams 2002. // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) #ifndef WORKAROUND_DWA2002126_HPP # define WORKAROUND_DWA2002126_HPP // Compiler/library version workaround macro // // Usage: // // #if BOOST_WORKAROUND(BOOST_MSVC, < 1300) // // workaround for eVC4 and VC6 // ... // workaround code here // #endif // // When BOOST_STRICT_CONFIG is defined, expands to 0. Otherwise, the // first argument must be undefined or expand to a numeric // value. The above expands to: // // (BOOST_MSVC) != 0 && (BOOST_MSVC) < 1300 // // When used for workarounds that apply to the latest known version // and all earlier versions of a compiler, the following convention // should be observed: // // #if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1301)) // // The version number in this case corresponds to the last version in // which the workaround was known to have been required. When // BOOST_DETECT_OUTDATED_WORKAROUNDS is not the defined, the macro // BOOST_TESTED_AT(x) expands to "!= 0", which effectively activates // the workaround for any version of the compiler. When // BOOST_DETECT_OUTDATED_WORKAROUNDS is defined, a compiler warning or // error will be issued if the compiler version exceeds the argument // to BOOST_TESTED_AT(). This can be used to locate workarounds which // may be obsoleted by newer versions. # ifndef BOOST_STRICT_CONFIG #include #ifndef __BORLANDC__ #define __BORLANDC___WORKAROUND_GUARD 1 #else #define __BORLANDC___WORKAROUND_GUARD 0 #endif #ifndef __CODEGEARC__ #define __CODEGEARC___WORKAROUND_GUARD 1 #else #define __CODEGEARC___WORKAROUND_GUARD 0 #endif #ifndef _MSC_VER #define _MSC_VER_WORKAROUND_GUARD 1 #else #define _MSC_VER_WORKAROUND_GUARD 0 #endif #ifndef _MSC_FULL_VER #define _MSC_FULL_VER_WORKAROUND_GUARD 1 #else #define _MSC_FULL_VER_WORKAROUND_GUARD 0 #endif #ifndef BOOST_MSVC #define BOOST_MSVC_WORKAROUND_GUARD 1 #else #define BOOST_MSVC_WORKAROUND_GUARD 0 #endif #ifndef BOOST_MSVC_FULL_VER #define BOOST_MSVC_FULL_VER_WORKAROUND_GUARD 1 #else #define BOOST_MSVC_FULL_VER_WORKAROUND_GUARD 0 #endif #ifndef __GNUC__ #define __GNUC___WORKAROUND_GUARD 1 #else #define __GNUC___WORKAROUND_GUARD 0 #endif #ifndef __GNUC_MINOR__ #define __GNUC_MINOR___WORKAROUND_GUARD 1 #else #define __GNUC_MINOR___WORKAROUND_GUARD 0 #endif #ifndef __GNUC_PATCHLEVEL__ #define __GNUC_PATCHLEVEL___WORKAROUND_GUARD 1 #else #define __GNUC_PATCHLEVEL___WORKAROUND_GUARD 0 #endif #ifndef __IBMCPP__ #define __IBMCPP___WORKAROUND_GUARD 1 #else #define __IBMCPP___WORKAROUND_GUARD 0 #endif #ifndef __SUNPRO_CC #define __SUNPRO_CC_WORKAROUND_GUARD 1 #else #define __SUNPRO_CC_WORKAROUND_GUARD 0 #endif #ifndef __DECCXX_VER #define __DECCXX_VER_WORKAROUND_GUARD 1 #else #define __DECCXX_VER_WORKAROUND_GUARD 0 #endif #ifndef __MWERKS__ #define __MWERKS___WORKAROUND_GUARD 1 #else #define __MWERKS___WORKAROUND_GUARD 0 #endif #ifndef __EDG__ #define __EDG___WORKAROUND_GUARD 1 #else #define __EDG___WORKAROUND_GUARD 0 #endif #ifndef __EDG_VERSION__ #define __EDG_VERSION___WORKAROUND_GUARD 1 #else #define __EDG_VERSION___WORKAROUND_GUARD 0 #endif #ifndef __HP_aCC #define __HP_aCC_WORKAROUND_GUARD 1 #else #define __HP_aCC_WORKAROUND_GUARD 0 #endif #ifndef __hpxstd98 #define __hpxstd98_WORKAROUND_GUARD 1 #else #define __hpxstd98_WORKAROUND_GUARD 0 #endif #ifndef _CRAYC #define _CRAYC_WORKAROUND_GUARD 1 #else #define _CRAYC_WORKAROUND_GUARD 0 #endif #ifndef __DMC__ #define __DMC___WORKAROUND_GUARD 1 #else #define __DMC___WORKAROUND_GUARD 0 #endif #ifndef MPW_CPLUS #define MPW_CPLUS_WORKAROUND_GUARD 1 #else #define MPW_CPLUS_WORKAROUND_GUARD 0 #endif #ifndef __COMO__ #define __COMO___WORKAROUND_GUARD 1 #else #define __COMO___WORKAROUND_GUARD 0 #endif #ifndef __COMO_VERSION__ #define __COMO_VERSION___WORKAROUND_GUARD 1 #else #define __COMO_VERSION___WORKAROUND_GUARD 0 #endif #ifndef __INTEL_COMPILER #define __INTEL_COMPILER_WORKAROUND_GUARD 1 #else #define __INTEL_COMPILER_WORKAROUND_GUARD 0 #endif #ifndef __ICL #define __ICL_WORKAROUND_GUARD 1 #else #define __ICL_WORKAROUND_GUARD 0 #endif #ifndef _COMPILER_VERSION #define _COMPILER_VERSION_WORKAROUND_GUARD 1 #else #define _COMPILER_VERSION_WORKAROUND_GUARD 0 #endif #ifndef _RWSTD_VER #define _RWSTD_VER_WORKAROUND_GUARD 1 #else #define _RWSTD_VER_WORKAROUND_GUARD 0 #endif #ifndef BOOST_RWSTD_VER #define BOOST_RWSTD_VER_WORKAROUND_GUARD 1 #else #define BOOST_RWSTD_VER_WORKAROUND_GUARD 0 #endif #ifndef __GLIBCPP__ #define __GLIBCPP___WORKAROUND_GUARD 1 #else #define __GLIBCPP___WORKAROUND_GUARD 0 #endif #ifndef _GLIBCXX_USE_C99_FP_MACROS_DYNAMIC #define _GLIBCXX_USE_C99_FP_MACROS_DYNAMIC_WORKAROUND_GUARD 1 #else #define _GLIBCXX_USE_C99_FP_MACROS_DYNAMIC_WORKAROUND_GUARD 0 #endif #ifndef __SGI_STL_PORT #define __SGI_STL_PORT_WORKAROUND_GUARD 1 #else #define __SGI_STL_PORT_WORKAROUND_GUARD 0 #endif #ifndef _STLPORT_VERSION #define _STLPORT_VERSION_WORKAROUND_GUARD 1 #else #define _STLPORT_VERSION_WORKAROUND_GUARD 0 #endif #ifndef __LIBCOMO_VERSION__ #define __LIBCOMO_VERSION___WORKAROUND_GUARD 1 #else #define __LIBCOMO_VERSION___WORKAROUND_GUARD 0 #endif #ifndef _CPPLIB_VER #define _CPPLIB_VER_WORKAROUND_GUARD 1 #else #define _CPPLIB_VER_WORKAROUND_GUARD 0 #endif #ifndef BOOST_INTEL_CXX_VERSION #define BOOST_INTEL_CXX_VERSION_WORKAROUND_GUARD 1 #else #define BOOST_INTEL_CXX_VERSION_WORKAROUND_GUARD 0 #endif #ifndef BOOST_INTEL_WIN #define BOOST_INTEL_WIN_WORKAROUND_GUARD 1 #else #define BOOST_INTEL_WIN_WORKAROUND_GUARD 0 #endif #ifndef BOOST_DINKUMWARE_STDLIB #define BOOST_DINKUMWARE_STDLIB_WORKAROUND_GUARD 1 #else #define BOOST_DINKUMWARE_STDLIB_WORKAROUND_GUARD 0 #endif #ifndef BOOST_INTEL #define BOOST_INTEL_WORKAROUND_GUARD 1 #else #define BOOST_INTEL_WORKAROUND_GUARD 0 #endif // Always define to zero, if it's used it'll be defined my MPL: #define BOOST_MPL_CFG_GCC_WORKAROUND_GUARD 0 # define BOOST_WORKAROUND(symbol, test) \ ((symbol ## _WORKAROUND_GUARD + 0 == 0) && \ (symbol != 0) && (1 % (( (symbol test) ) + 1))) // ^ ^ ^ ^ // The extra level of parenthesis nesting above, along with the // BOOST_OPEN_PAREN indirection below, is required to satisfy the // broken preprocessor in MWCW 8.3 and earlier. // // The basic mechanism works as follows: // (symbol test) + 1 => if (symbol test) then 2 else 1 // 1 % ((symbol test) + 1) => if (symbol test) then 1 else 0 // // The complication with % is for cooperation with BOOST_TESTED_AT(). // When "test" is BOOST_TESTED_AT(x) and // BOOST_DETECT_OUTDATED_WORKAROUNDS is #defined, // // symbol test => if (symbol <= x) then 1 else -1 // (symbol test) + 1 => if (symbol <= x) then 2 else 0 // 1 % ((symbol test) + 1) => if (symbol <= x) then 1 else divide-by-zero // # ifdef BOOST_DETECT_OUTDATED_WORKAROUNDS # define BOOST_OPEN_PAREN ( # define BOOST_TESTED_AT(value) > value) ?(-1): BOOST_OPEN_PAREN 1 # else # define BOOST_TESTED_AT(value) != ((value)-(value)) # endif # else # define BOOST_WORKAROUND(symbol, test) 0 # endif #endif // WORKAROUND_DWA2002126_HPP ================================================ FILE: benchmarks/boost/exception/exception.hpp ================================================ //Copyright (c) 2006-2009 Emil Dotchevski and Reverge Studios, Inc. //Distributed under the Boost Software License, Version 1.0. (See accompanying //file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) #ifndef UUID_274DA366004E11DCB1DDFE2E56D89593 #define UUID_274DA366004E11DCB1DDFE2E56D89593 #if (__GNUC__*100+__GNUC_MINOR__>301) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS) #pragma GCC system_header #endif #if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS) #pragma warning(push,1) #endif namespace boost { namespace exception_detail { template class refcount_ptr { public: refcount_ptr(): px_(0) { } ~refcount_ptr() { release(); } refcount_ptr( refcount_ptr const & x ): px_(x.px_) { add_ref(); } refcount_ptr & operator=( refcount_ptr const & x ) { adopt(x.px_); return *this; } void adopt( T * px ) { release(); px_=px; add_ref(); } T * get() const { return px_; } private: T * px_; void add_ref() { if( px_ ) px_->add_ref(); } void release() { if( px_ && px_->release() ) px_=0; } }; } //////////////////////////////////////////////////////////////////////// template class error_info; typedef error_info throw_function; typedef error_info throw_file; typedef error_info throw_line; template <> class error_info { public: typedef char const * value_type; value_type v_; explicit error_info( value_type v ): v_(v) { } }; template <> class error_info { public: typedef char const * value_type; value_type v_; explicit error_info( value_type v ): v_(v) { } }; template <> class error_info { public: typedef int value_type; value_type v_; explicit error_info( value_type v ): v_(v) { } }; #if defined(__GNUC__) # if (__GNUC__ == 4 && __GNUC_MINOR__ >= 1) || (__GNUC__ > 4) # pragma GCC visibility push (default) # endif #endif class exception; #if defined(__GNUC__) # if (__GNUC__ == 4 && __GNUC_MINOR__ >= 1) || (__GNUC__ > 4) # pragma GCC visibility pop # endif #endif template class shared_ptr; namespace exception_detail { class error_info_base; struct type_info_; struct error_info_container { virtual char const * diagnostic_information( char const * ) const = 0; virtual shared_ptr get( type_info_ const & ) const = 0; virtual void set( shared_ptr const &, type_info_ const & ) = 0; virtual void add_ref() const = 0; virtual bool release() const = 0; virtual refcount_ptr clone() const = 0; protected: ~error_info_container() throw() { } }; template struct get_info; template <> struct get_info; template <> struct get_info; template <> struct get_info; char const * get_diagnostic_information( exception const &, char const * ); void copy_boost_exception( exception *, exception const * ); template E const & set_info( E const &, error_info const & ); template E const & set_info( E const &, throw_function const & ); template E const & set_info( E const &, throw_file const & ); template E const & set_info( E const &, throw_line const & ); } #if defined(__GNUC__) # if (__GNUC__ == 4 && __GNUC_MINOR__ >= 1) || (__GNUC__ > 4) # pragma GCC visibility push (default) # endif #endif class exception { // public: template void set( typename Tag::type const & ); template typename Tag::type const * get() const; // protected: exception(): throw_function_(0), throw_file_(0), throw_line_(-1) { } #ifdef __HP_aCC //On HP aCC, this protected copy constructor prevents throwing boost::exception. //On all other platforms, the same effect is achieved by the pure virtual destructor. exception( exception const & x ) throw(): data_(x.data_), throw_function_(x.throw_function_), throw_file_(x.throw_file_), throw_line_(x.throw_line_) { } #endif virtual ~exception() throw() #ifndef __HP_aCC = 0 //Workaround for HP aCC, =0 incorrectly leads to link errors. #endif ; #if (defined(__MWERKS__) && __MWERKS__<=0x3207) || (defined(_MSC_VER) && _MSC_VER<=1310) public: #else private: template friend E const & exception_detail::set_info( E const &, throw_function const & ); template friend E const & exception_detail::set_info( E const &, throw_file const & ); template friend E const & exception_detail::set_info( E const &, throw_line const & ); template friend E const & exception_detail::set_info( E const &, error_info const & ); friend char const * exception_detail::get_diagnostic_information( exception const &, char const * ); template friend struct exception_detail::get_info; friend struct exception_detail::get_info; friend struct exception_detail::get_info; friend struct exception_detail::get_info; friend void exception_detail::copy_boost_exception( exception *, exception const * ); #endif mutable exception_detail::refcount_ptr data_; mutable char const * throw_function_; mutable char const * throw_file_; mutable int throw_line_; }; #if defined(__GNUC__) # if (__GNUC__ == 4 && __GNUC_MINOR__ >= 1) || (__GNUC__ > 4) # pragma GCC visibility pop # endif #endif inline exception:: ~exception() throw() { } namespace exception_detail { template E const & set_info( E const & x, throw_function const & y ) { x.throw_function_=y.v_; return x; } template E const & set_info( E const & x, throw_file const & y ) { x.throw_file_=y.v_; return x; } template E const & set_info( E const & x, throw_line const & y ) { x.throw_line_=y.v_; return x; } } //////////////////////////////////////////////////////////////////////// namespace exception_detail { #if defined(__GNUC__) # if (__GNUC__ == 4 && __GNUC_MINOR__ >= 1) || (__GNUC__ > 4) # pragma GCC visibility push (default) # endif #endif template struct error_info_injector: public T, public exception { explicit error_info_injector( T const & x ): T(x) { } ~error_info_injector() throw() { } }; #if defined(__GNUC__) # if (__GNUC__ == 4 && __GNUC_MINOR__ >= 1) || (__GNUC__ > 4) # pragma GCC visibility pop # endif #endif struct large_size { char c[256]; }; large_size dispatch_boost_exception( exception const * ); struct small_size { }; small_size dispatch_boost_exception( void const * ); template struct enable_error_info_helper; template struct enable_error_info_helper { typedef T type; }; template struct enable_error_info_helper { typedef error_info_injector type; }; template struct enable_error_info_return_type { typedef typename enable_error_info_helper(0)))>::type type; }; } template inline typename exception_detail::enable_error_info_return_type::type enable_error_info( T const & x ) { typedef typename exception_detail::enable_error_info_return_type::type rt; return rt(x); } //////////////////////////////////////////////////////////////////////// namespace exception_detail { #if defined(__GNUC__) # if (__GNUC__ == 4 && __GNUC_MINOR__ >= 1) || (__GNUC__ > 4) # pragma GCC visibility push (default) # endif #endif class clone_base { public: virtual clone_base const * clone() const = 0; virtual void rethrow() const = 0; virtual ~clone_base() throw() { } }; #if defined(__GNUC__) # if (__GNUC__ == 4 && __GNUC_MINOR__ >= 1) || (__GNUC__ > 4) # pragma GCC visibility pop # endif #endif inline void copy_boost_exception( exception * a, exception const * b ) { refcount_ptr data; if( error_info_container * d=b->data_.get() ) data = d->clone(); a->throw_file_ = b->throw_file_; a->throw_line_ = b->throw_line_; a->throw_function_ = b->throw_function_; a->data_ = data; } inline void copy_boost_exception( void *, void const * ) { } #if defined(__GNUC__) # if (__GNUC__ == 4 && __GNUC_MINOR__ >= 1) || (__GNUC__ > 4) # pragma GCC visibility push (default) # endif #endif template class clone_impl: public T, public virtual clone_base { struct clone_tag { }; clone_impl( clone_impl const & x, clone_tag ): T(x) { copy_boost_exception(this,&x); } public: explicit clone_impl( T const & x ): T(x) { copy_boost_exception(this,&x); } ~clone_impl() throw() { } private: clone_base const * clone() const { return new clone_impl(*this,clone_tag()); } void rethrow() const { throw*this; } }; } #if defined(__GNUC__) # if (__GNUC__ == 4 && __GNUC_MINOR__ >= 1) || (__GNUC__ > 4) # pragma GCC visibility pop # endif #endif template inline exception_detail::clone_impl enable_current_exception( T const & x ) { return exception_detail::clone_impl(x); } } #if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS) #pragma warning(pop) #endif #endif ================================================ FILE: benchmarks/boost/functional/hash/hash_fwd.hpp ================================================ // Copyright 2005-2009 Daniel James. // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // Based on Peter Dimov's proposal // http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2005/n1756.pdf // issue 6.18. #if !defined(BOOST_FUNCTIONAL_HASH_FWD_HPP) #define BOOST_FUNCTIONAL_HASH_FWD_HPP #include #if defined(BOOST_HAS_PRAGMA_ONCE) #pragma once #endif #include #include namespace boost { template struct hash; template void hash_combine(std::size_t& seed, T const& v); template std::size_t hash_range(It, It); template void hash_range(std::size_t&, It, It); #if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x551)) template inline std::size_t hash_range(T*, T*); template inline void hash_range(std::size_t&, T*, T*); #endif } #endif ================================================ FILE: benchmarks/boost/functional/hash_fwd.hpp ================================================ // Copyright 2005-2009 Daniel James. // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) #include #if defined(BOOST_HAS_PRAGMA_ONCE) #pragma once #endif #include ================================================ FILE: benchmarks/boost/limits.hpp ================================================ // (C) Copyright John maddock 1999. // (C) David Abrahams 2002. Distributed under the Boost // Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // // use this header as a workaround for missing // See http://www.boost.org/libs/compatibility/index.html for documentation. #ifndef BOOST_LIMITS #define BOOST_LIMITS #include #ifdef BOOST_NO_LIMITS # error "There is no std::numeric_limits suppport available." #else # include #endif #if (defined(BOOST_HAS_LONG_LONG) && defined(BOOST_NO_LONG_LONG_NUMERIC_LIMITS)) \ || (defined(BOOST_HAS_MS_INT64) && defined(BOOST_NO_MS_INT64_NUMERIC_LIMITS)) // Add missing specializations for numeric_limits: #ifdef BOOST_HAS_MS_INT64 # define BOOST_LLT __int64 # define BOOST_ULLT unsigned __int64 #else # define BOOST_LLT ::boost::long_long_type # define BOOST_ULLT ::boost::ulong_long_type #endif #include // for CHAR_BIT namespace std { template<> class numeric_limits { public: BOOST_STATIC_CONSTANT(bool, is_specialized = true); #ifdef BOOST_HAS_MS_INT64 static BOOST_LLT min BOOST_PREVENT_MACRO_SUBSTITUTION (){ return 0x8000000000000000i64; } static BOOST_LLT max BOOST_PREVENT_MACRO_SUBSTITUTION (){ return 0x7FFFFFFFFFFFFFFFi64; } #elif defined(LLONG_MAX) static BOOST_LLT min BOOST_PREVENT_MACRO_SUBSTITUTION (){ return LLONG_MIN; } static BOOST_LLT max BOOST_PREVENT_MACRO_SUBSTITUTION (){ return LLONG_MAX; } #elif defined(LONGLONG_MAX) static BOOST_LLT min BOOST_PREVENT_MACRO_SUBSTITUTION (){ return LONGLONG_MIN; } static BOOST_LLT max BOOST_PREVENT_MACRO_SUBSTITUTION (){ return LONGLONG_MAX; } #else static BOOST_LLT min BOOST_PREVENT_MACRO_SUBSTITUTION (){ return 1LL << (sizeof(BOOST_LLT) * CHAR_BIT - 1); } static BOOST_LLT max BOOST_PREVENT_MACRO_SUBSTITUTION (){ return ~(min)(); } #endif BOOST_STATIC_CONSTANT(int, digits = sizeof(BOOST_LLT) * CHAR_BIT -1); BOOST_STATIC_CONSTANT(int, digits10 = (CHAR_BIT * sizeof (BOOST_LLT) - 1) * 301L / 1000); BOOST_STATIC_CONSTANT(bool, is_signed = true); BOOST_STATIC_CONSTANT(bool, is_integer = true); BOOST_STATIC_CONSTANT(bool, is_exact = true); BOOST_STATIC_CONSTANT(int, radix = 2); static BOOST_LLT epsilon() throw() { return 0; }; static BOOST_LLT round_error() throw() { return 0; }; BOOST_STATIC_CONSTANT(int, min_exponent = 0); BOOST_STATIC_CONSTANT(int, min_exponent10 = 0); BOOST_STATIC_CONSTANT(int, max_exponent = 0); BOOST_STATIC_CONSTANT(int, max_exponent10 = 0); BOOST_STATIC_CONSTANT(bool, has_infinity = false); BOOST_STATIC_CONSTANT(bool, has_quiet_NaN = false); BOOST_STATIC_CONSTANT(bool, has_signaling_NaN = false); BOOST_STATIC_CONSTANT(bool, has_denorm = false); BOOST_STATIC_CONSTANT(bool, has_denorm_loss = false); static BOOST_LLT infinity() throw() { return 0; }; static BOOST_LLT quiet_NaN() throw() { return 0; }; static BOOST_LLT signaling_NaN() throw() { return 0; }; static BOOST_LLT denorm_min() throw() { return 0; }; BOOST_STATIC_CONSTANT(bool, is_iec559 = false); BOOST_STATIC_CONSTANT(bool, is_bounded = true); BOOST_STATIC_CONSTANT(bool, is_modulo = true); BOOST_STATIC_CONSTANT(bool, traps = false); BOOST_STATIC_CONSTANT(bool, tinyness_before = false); BOOST_STATIC_CONSTANT(float_round_style, round_style = round_toward_zero); }; template<> class numeric_limits { public: BOOST_STATIC_CONSTANT(bool, is_specialized = true); #ifdef BOOST_HAS_MS_INT64 static BOOST_ULLT min BOOST_PREVENT_MACRO_SUBSTITUTION (){ return 0ui64; } static BOOST_ULLT max BOOST_PREVENT_MACRO_SUBSTITUTION (){ return 0xFFFFFFFFFFFFFFFFui64; } #elif defined(ULLONG_MAX) && defined(ULLONG_MIN) static BOOST_ULLT min BOOST_PREVENT_MACRO_SUBSTITUTION (){ return ULLONG_MIN; } static BOOST_ULLT max BOOST_PREVENT_MACRO_SUBSTITUTION (){ return ULLONG_MAX; } #elif defined(ULONGLONG_MAX) && defined(ULONGLONG_MIN) static BOOST_ULLT min BOOST_PREVENT_MACRO_SUBSTITUTION (){ return ULONGLONG_MIN; } static BOOST_ULLT max BOOST_PREVENT_MACRO_SUBSTITUTION (){ return ULONGLONG_MAX; } #else static BOOST_ULLT min BOOST_PREVENT_MACRO_SUBSTITUTION (){ return 0uLL; } static BOOST_ULLT max BOOST_PREVENT_MACRO_SUBSTITUTION (){ return ~0uLL; } #endif BOOST_STATIC_CONSTANT(int, digits = sizeof(BOOST_LLT) * CHAR_BIT); BOOST_STATIC_CONSTANT(int, digits10 = (CHAR_BIT * sizeof (BOOST_LLT)) * 301L / 1000); BOOST_STATIC_CONSTANT(bool, is_signed = false); BOOST_STATIC_CONSTANT(bool, is_integer = true); BOOST_STATIC_CONSTANT(bool, is_exact = true); BOOST_STATIC_CONSTANT(int, radix = 2); static BOOST_ULLT epsilon() throw() { return 0; }; static BOOST_ULLT round_error() throw() { return 0; }; BOOST_STATIC_CONSTANT(int, min_exponent = 0); BOOST_STATIC_CONSTANT(int, min_exponent10 = 0); BOOST_STATIC_CONSTANT(int, max_exponent = 0); BOOST_STATIC_CONSTANT(int, max_exponent10 = 0); BOOST_STATIC_CONSTANT(bool, has_infinity = false); BOOST_STATIC_CONSTANT(bool, has_quiet_NaN = false); BOOST_STATIC_CONSTANT(bool, has_signaling_NaN = false); BOOST_STATIC_CONSTANT(bool, has_denorm = false); BOOST_STATIC_CONSTANT(bool, has_denorm_loss = false); static BOOST_ULLT infinity() throw() { return 0; }; static BOOST_ULLT quiet_NaN() throw() { return 0; }; static BOOST_ULLT signaling_NaN() throw() { return 0; }; static BOOST_ULLT denorm_min() throw() { return 0; }; BOOST_STATIC_CONSTANT(bool, is_iec559 = false); BOOST_STATIC_CONSTANT(bool, is_bounded = true); BOOST_STATIC_CONSTANT(bool, is_modulo = true); BOOST_STATIC_CONSTANT(bool, traps = false); BOOST_STATIC_CONSTANT(bool, tinyness_before = false); BOOST_STATIC_CONSTANT(float_round_style, round_style = round_toward_zero); }; } #endif #endif ================================================ FILE: benchmarks/boost/lockfree/detail/atomic.hpp ================================================ // Copyright (C) 2011-2013 Tim Blechmann // // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_LOCKFREE_DETAIL_ATOMIC_HPP #define BOOST_LOCKFREE_DETAIL_ATOMIC_HPP #include #ifndef BOOST_LOCKFREE_FORCE_STD_ATOMIC #define BOOST_LOCKFREE_NO_HDR_ATOMIC // MSVC supports atomic<> from version 2012 onwards. #if defined(BOOST_MSVC) && (BOOST_MSVC >= 1700) #undef BOOST_LOCKFREE_NO_HDR_ATOMIC #endif // GCC supports atomic<> from version 4.8 onwards. #if (BOOST_GCC >= 40800) && (__cplusplus >= 201103L) #undef BOOST_LOCKFREE_NO_HDR_ATOMIC #endif // Apple clang is 2 mayor versions ahead, but in fact 1 minor version behind #ifdef BOOST_CLANG #define BOOST_ATOMIC_CLANG_VERSION (__clang_major__ * 10000 + __clang_minor__ * 100 + __clang_patchlevel__) #if defined(__apple_build_version__) && (BOOST_ATOMIC_CLANG_VERSION >= 60100) && (__cplusplus >= 201103L) #undef BOOST_LOCKFREE_NO_HDR_ATOMIC #endif #if !defined(__apple_build_version__) && (BOOST_ATOMIC_CLANG_VERSION >= 30600) && (__cplusplus >= 201103L) #undef BOOST_LOCKFREE_NO_HDR_ATOMIC #endif #undef BOOST_ATOMIC_CLANG_VERSION #endif // BOOST_CLANG #endif // BOOST_LOCKFREE_FORCE_STD_ATOMIC #if defined(BOOST_LOCKFREE_NO_HDR_ATOMIC) #include #else #include #endif namespace boost { namespace lockfree { namespace detail { #if defined(BOOST_LOCKFREE_NO_HDR_ATOMIC) using boost::atomic; using boost::memory_order_acquire; using boost::memory_order_consume; using boost::memory_order_relaxed; using boost::memory_order_release; #else using std::atomic; using std::memory_order_acquire; using std::memory_order_consume; using std::memory_order_relaxed; using std::memory_order_release; #endif } using detail::atomic; using detail::memory_order_acquire; using detail::memory_order_consume; using detail::memory_order_relaxed; using detail::memory_order_release; }} #endif /* BOOST_LOCKFREE_DETAIL_ATOMIC_HPP */ ================================================ FILE: benchmarks/boost/lockfree/detail/copy_payload.hpp ================================================ // boost lockfree: copy_payload helper // // Copyright (C) 2011 Tim Blechmann // // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_LOCKFREE_DETAIL_COPY_PAYLOAD_HPP_INCLUDED #define BOOST_LOCKFREE_DETAIL_COPY_PAYLOAD_HPP_INCLUDED #include #include #if defined(_MSC_VER) #pragma warning(push) #pragma warning(disable: 4512) // assignment operator could not be generated #endif namespace boost { namespace lockfree { namespace detail { struct copy_convertible { template static void copy(T & t, U & u) { u = t; } }; struct copy_constructible_and_copyable { template static void copy(T & t, U & u) { u = U(t); } }; template void copy_payload(T & t, U & u) { typedef typename boost::mpl::if_::type, copy_convertible, copy_constructible_and_copyable >::type copy_type; copy_type::copy(t, u); } template struct consume_via_copy { consume_via_copy(T & out): out_(out) {} template void operator()(U & element) { copy_payload(element, out_); } T & out_; }; struct consume_noop { template void operator()(const U &) { } }; }}} #if defined(_MSC_VER) #pragma warning(pop) #endif #endif /* BOOST_LOCKFREE_DETAIL_COPY_PAYLOAD_HPP_INCLUDED */ ================================================ FILE: benchmarks/boost/lockfree/detail/freelist.hpp ================================================ // lock-free freelist // // Copyright (C) 2008-2013 Tim Blechmann // // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_LOCKFREE_FREELIST_HPP_INCLUDED #define BOOST_LOCKFREE_FREELIST_HPP_INCLUDED #include #include #include #include #include #include #include #include #include #include #if defined(_MSC_VER) #pragma warning(push) #pragma warning(disable: 4100) // unreferenced formal parameter #pragma warning(disable: 4127) // conditional expression is constant #endif namespace boost { namespace lockfree { namespace detail { template > class freelist_stack: Alloc { struct freelist_node { tagged_ptr next; }; typedef tagged_ptr tagged_node_ptr; public: typedef tagged_ptr tagged_node_handle; template freelist_stack (Allocator const & alloc, std::size_t n = 0): Alloc(alloc), pool_(tagged_node_ptr(NULL)) { for (std::size_t i = 0; i != n; ++i) { T * node = Alloc::allocate(1); #ifdef BOOST_LOCKFREE_FREELIST_INIT_RUNS_DTOR destruct(node); #else deallocate(node); #endif } } template void reserve (std::size_t count) { for (std::size_t i = 0; i != count; ++i) { T * node = Alloc::allocate(1); deallocate(node); } } template T * construct (void) { T * node = allocate(); if (node) new(node) T(); return node; } template T * construct (ArgumentType const & arg) { T * node = allocate(); if (node) new(node) T(arg); return node; } template T * construct (ArgumentType1 const & arg1, ArgumentType2 const & arg2) { T * node = allocate(); if (node) new(node) T(arg1, arg2); return node; } template void destruct (tagged_node_handle tagged_ptr) { T * n = tagged_ptr.get_ptr(); n->~T(); deallocate(n); } template void destruct (T * n) { n->~T(); deallocate(n); } ~freelist_stack(void) { tagged_node_ptr current = pool_.load(); while (current) { freelist_node * current_ptr = current.get_ptr(); if (current_ptr) current = current_ptr->next; Alloc::deallocate((T*)current_ptr, 1); } } bool is_lock_free(void) const { return pool_.is_lock_free(); } T * get_handle(T * pointer) const { return pointer; } T * get_handle(tagged_node_handle const & handle) const { return get_pointer(handle); } T * get_pointer(tagged_node_handle const & tptr) const { return tptr.get_ptr(); } T * get_pointer(T * pointer) const { return pointer; } T * null_handle(void) const { return NULL; } protected: // allow use from subclasses template T * allocate (void) { if (ThreadSafe) return allocate_impl(); else return allocate_impl_unsafe(); } private: template T * allocate_impl (void) { tagged_node_ptr old_pool = pool_.load(memory_order_consume); for(;;) { if (!old_pool.get_ptr()) { if (!Bounded) return Alloc::allocate(1); else return 0; } freelist_node * new_pool_ptr = old_pool->next.get_ptr(); tagged_node_ptr new_pool (new_pool_ptr, old_pool.get_next_tag()); if (pool_.compare_exchange_weak(old_pool, new_pool)) { void * ptr = old_pool.get_ptr(); return reinterpret_cast(ptr); } } } template T * allocate_impl_unsafe (void) { tagged_node_ptr old_pool = pool_.load(memory_order_relaxed); if (!old_pool.get_ptr()) { if (!Bounded) return Alloc::allocate(1); else return 0; } freelist_node * new_pool_ptr = old_pool->next.get_ptr(); tagged_node_ptr new_pool (new_pool_ptr, old_pool.get_next_tag()); pool_.store(new_pool, memory_order_relaxed); void * ptr = old_pool.get_ptr(); return reinterpret_cast(ptr); } protected: template void deallocate (T * n) { if (ThreadSafe) deallocate_impl(n); else deallocate_impl_unsafe(n); } private: void deallocate_impl (T * n) { void * node = n; tagged_node_ptr old_pool = pool_.load(memory_order_consume); freelist_node * new_pool_ptr = reinterpret_cast(node); for(;;) { tagged_node_ptr new_pool (new_pool_ptr, old_pool.get_tag()); new_pool->next.set_ptr(old_pool.get_ptr()); if (pool_.compare_exchange_weak(old_pool, new_pool)) return; } } void deallocate_impl_unsafe (T * n) { void * node = n; tagged_node_ptr old_pool = pool_.load(memory_order_relaxed); freelist_node * new_pool_ptr = reinterpret_cast(node); tagged_node_ptr new_pool (new_pool_ptr, old_pool.get_tag()); new_pool->next.set_ptr(old_pool.get_ptr()); pool_.store(new_pool, memory_order_relaxed); } atomic pool_; }; class tagged_index { public: typedef boost::uint16_t tag_t; typedef boost::uint16_t index_t; /** uninitialized constructor */ tagged_index(void) BOOST_NOEXCEPT //: index(0), tag(0) {} /** copy constructor */ #ifdef BOOST_NO_CXX11_DEFAULTED_FUNCTIONS tagged_index(tagged_index const & rhs): index(rhs.index), tag(rhs.tag) {} #else tagged_index(tagged_index const & rhs) = default; #endif explicit tagged_index(index_t i, tag_t t = 0): index(i), tag(t) {} /** index access */ /* @{ */ index_t get_index() const { return index; } void set_index(index_t i) { index = i; } /* @} */ /** tag access */ /* @{ */ tag_t get_tag() const { return tag; } tag_t get_next_tag() const { tag_t next = (get_tag() + 1u) & (std::numeric_limits::max)(); return next; } void set_tag(tag_t t) { tag = t; } /* @} */ bool operator==(tagged_index const & rhs) const { return (index == rhs.index) && (tag == rhs.tag); } bool operator!=(tagged_index const & rhs) const { return !operator==(rhs); } protected: index_t index; tag_t tag; }; template struct compiletime_sized_freelist_storage { // array-based freelists only support a 16bit address space. BOOST_STATIC_ASSERT(size < 65536); boost::array data; // unused ... only for API purposes template compiletime_sized_freelist_storage(Allocator const & /* alloc */, std::size_t /* count */) {} T * nodes(void) const { return reinterpret_cast(const_cast(data.data())); } std::size_t node_count(void) const { return size; } }; template > struct runtime_sized_freelist_storage: Alloc { T * nodes_; std::size_t node_count_; template runtime_sized_freelist_storage(Allocator const & alloc, std::size_t count): Alloc(alloc), node_count_(count) { if (count > 65535) boost::throw_exception(std::runtime_error("boost.lockfree: freelist size is limited to a maximum of 65535 objects")); nodes_ = Alloc::allocate(count); } ~runtime_sized_freelist_storage(void) { Alloc::deallocate(nodes_, node_count_); } T * nodes(void) const { return nodes_; } std::size_t node_count(void) const { return node_count_; } }; template > class fixed_size_freelist: NodeStorage { struct freelist_node { tagged_index next; }; typedef tagged_index::index_t index_t; void initialize(void) { T * nodes = NodeStorage::nodes(); for (std::size_t i = 0; i != NodeStorage::node_count(); ++i) { tagged_index * next_index = reinterpret_cast(nodes + i); next_index->set_index(null_handle()); #ifdef BOOST_LOCKFREE_FREELIST_INIT_RUNS_DTOR destruct(nodes + i); #else deallocate(static_cast(i)); #endif } } public: typedef tagged_index tagged_node_handle; template fixed_size_freelist (Allocator const & alloc, std::size_t count): NodeStorage(alloc, count), pool_(tagged_index(static_cast(count), 0)) { initialize(); } fixed_size_freelist (void): pool_(tagged_index(NodeStorage::node_count(), 0)) { initialize(); } template T * construct (void) { index_t node_index = allocate(); if (node_index == null_handle()) return NULL; T * node = NodeStorage::nodes() + node_index; new(node) T(); return node; } template T * construct (ArgumentType const & arg) { index_t node_index = allocate(); if (node_index == null_handle()) return NULL; T * node = NodeStorage::nodes() + node_index; new(node) T(arg); return node; } template T * construct (ArgumentType1 const & arg1, ArgumentType2 const & arg2) { index_t node_index = allocate(); if (node_index == null_handle()) return NULL; T * node = NodeStorage::nodes() + node_index; new(node) T(arg1, arg2); return node; } template void destruct (tagged_node_handle tagged_index) { index_t index = tagged_index.get_index(); T * n = NodeStorage::nodes() + index; (void)n; // silence msvc warning n->~T(); deallocate(index); } template void destruct (T * n) { n->~T(); deallocate(n - NodeStorage::nodes()); } bool is_lock_free(void) const { return pool_.is_lock_free(); } index_t null_handle(void) const { return static_cast(NodeStorage::node_count()); } index_t get_handle(T * pointer) const { if (pointer == NULL) return null_handle(); else return static_cast(pointer - NodeStorage::nodes()); } index_t get_handle(tagged_node_handle const & handle) const { return handle.get_index(); } T * get_pointer(tagged_node_handle const & tptr) const { return get_pointer(tptr.get_index()); } T * get_pointer(index_t index) const { if (index == null_handle()) return 0; else return NodeStorage::nodes() + index; } T * get_pointer(T * ptr) const { return ptr; } protected: // allow use from subclasses template index_t allocate (void) { if (ThreadSafe) return allocate_impl(); else return allocate_impl_unsafe(); } private: index_t allocate_impl (void) { tagged_index old_pool = pool_.load(memory_order_consume); for(;;) { index_t index = old_pool.get_index(); if (index == null_handle()) return index; T * old_node = NodeStorage::nodes() + index; tagged_index * next_index = reinterpret_cast(old_node); tagged_index new_pool(next_index->get_index(), old_pool.get_next_tag()); if (pool_.compare_exchange_weak(old_pool, new_pool)) return old_pool.get_index(); } } index_t allocate_impl_unsafe (void) { tagged_index old_pool = pool_.load(memory_order_consume); index_t index = old_pool.get_index(); if (index == null_handle()) return index; T * old_node = NodeStorage::nodes() + index; tagged_index * next_index = reinterpret_cast(old_node); tagged_index new_pool(next_index->get_index(), old_pool.get_next_tag()); pool_.store(new_pool, memory_order_relaxed); return old_pool.get_index(); } template void deallocate (index_t index) { if (ThreadSafe) deallocate_impl(index); else deallocate_impl_unsafe(index); } void deallocate_impl (index_t index) { freelist_node * new_pool_node = reinterpret_cast(NodeStorage::nodes() + index); tagged_index old_pool = pool_.load(memory_order_consume); for(;;) { tagged_index new_pool (index, old_pool.get_tag()); new_pool_node->next.set_index(old_pool.get_index()); if (pool_.compare_exchange_weak(old_pool, new_pool)) return; } } void deallocate_impl_unsafe (index_t index) { freelist_node * new_pool_node = reinterpret_cast(NodeStorage::nodes() + index); tagged_index old_pool = pool_.load(memory_order_consume); tagged_index new_pool (index, old_pool.get_tag()); new_pool_node->next.set_index(old_pool.get_index()); pool_.store(new_pool); } atomic pool_; }; template struct select_freelist { typedef typename mpl::if_c, runtime_sized_freelist_storage >::type fixed_sized_storage_type; typedef typename mpl::if_c, freelist_stack >::type type; }; template struct select_tagged_handle { typedef typename mpl::if_c, tagged_index >::type tagged_handle_type; typedef typename mpl::if_c::type handle_type; }; } /* namespace detail */ } /* namespace lockfree */ } /* namespace boost */ #if defined(_MSC_VER) #pragma warning(pop) #endif #endif /* BOOST_LOCKFREE_FREELIST_HPP_INCLUDED */ ================================================ FILE: benchmarks/boost/lockfree/detail/parameter.hpp ================================================ // boost lockfree // // Copyright (C) 2011 Tim Blechmann // // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_LOCKFREE_DETAIL_PARAMETER_HPP #define BOOST_LOCKFREE_DETAIL_PARAMETER_HPP #include namespace boost { namespace lockfree { namespace detail { namespace mpl = boost::mpl; template struct has_arg { typedef typename parameter::binding::type type; static const bool value = mpl::is_not_void_::type::value; }; template struct extract_capacity { static const bool has_capacity = has_arg::value; typedef typename mpl::if_c::type, mpl::size_t< 0 > >::type capacity_t; static const std::size_t capacity = capacity_t::value; }; template struct extract_allocator { static const bool has_allocator = has_arg::value; typedef typename mpl::if_c::type, std::allocator >::type allocator_arg; typedef typename allocator_arg::template rebind::other type; }; template struct extract_fixed_sized { static const bool has_fixed_sized = has_arg::value; typedef typename mpl::if_c::type, mpl::bool_ >::type type; static const bool value = type::value; }; } /* namespace detail */ } /* namespace lockfree */ } /* namespace boost */ #endif /* BOOST_LOCKFREE_DETAIL_PARAMETER_HPP */ ================================================ FILE: benchmarks/boost/lockfree/detail/prefix.hpp ================================================ // Copyright (C) 2009 Tim Blechmann // // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_LOCKFREE_PREFIX_HPP_INCLUDED #define BOOST_LOCKFREE_PREFIX_HPP_INCLUDED /* this file defines the following macros: BOOST_LOCKFREE_CACHELINE_BYTES: size of a cache line BOOST_LOCKFREE_PTR_COMPRESSION: use tag/pointer compression to utilize parts of the virtual address space as tag (at least 16bit) BOOST_LOCKFREE_DCAS_ALIGNMENT: symbol used for aligning structs at cache line boundaries */ #define BOOST_LOCKFREE_CACHELINE_BYTES 64 #ifdef _MSC_VER #define BOOST_LOCKFREE_CACHELINE_ALIGNMENT __declspec(align(BOOST_LOCKFREE_CACHELINE_BYTES)) #if defined(_M_IX86) #define BOOST_LOCKFREE_DCAS_ALIGNMENT #elif defined(_M_X64) || defined(_M_IA64) #define BOOST_LOCKFREE_PTR_COMPRESSION 1 #define BOOST_LOCKFREE_DCAS_ALIGNMENT __declspec(align(16)) #endif #endif /* _MSC_VER */ #ifdef __GNUC__ #define BOOST_LOCKFREE_CACHELINE_ALIGNMENT __attribute__((aligned(BOOST_LOCKFREE_CACHELINE_BYTES))) #if defined(__i386__) || defined(__ppc__) #define BOOST_LOCKFREE_DCAS_ALIGNMENT #elif defined(__x86_64__) #define BOOST_LOCKFREE_PTR_COMPRESSION 1 #define BOOST_LOCKFREE_DCAS_ALIGNMENT __attribute__((aligned(16))) #elif defined(__alpha__) // LATER: alpha may benefit from pointer compression. but what is the maximum size of the address space? #define BOOST_LOCKFREE_DCAS_ALIGNMENT #endif #endif /* __GNUC__ */ #ifndef BOOST_LOCKFREE_DCAS_ALIGNMENT #define BOOST_LOCKFREE_DCAS_ALIGNMENT /*BOOST_LOCKFREE_DCAS_ALIGNMENT*/ #endif #ifndef BOOST_LOCKFREE_CACHELINE_ALIGNMENT #define BOOST_LOCKFREE_CACHELINE_ALIGNMENT /*BOOST_LOCKFREE_CACHELINE_ALIGNMENT*/ #endif #endif /* BOOST_LOCKFREE_PREFIX_HPP_INCLUDED */ ================================================ FILE: benchmarks/boost/lockfree/detail/tagged_ptr.hpp ================================================ // tagged pointer, for aba prevention // // Copyright (C) 2008 Tim Blechmann // // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_LOCKFREE_TAGGED_PTR_HPP_INCLUDED #define BOOST_LOCKFREE_TAGGED_PTR_HPP_INCLUDED #include #include #ifndef BOOST_LOCKFREE_PTR_COMPRESSION #include #else #include #endif #endif /* BOOST_LOCKFREE_TAGGED_PTR_HPP_INCLUDED */ ================================================ FILE: benchmarks/boost/lockfree/detail/tagged_ptr_dcas.hpp ================================================ // tagged pointer, for aba prevention // // Copyright (C) 2008 Tim Blechmann // // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_LOCKFREE_TAGGED_PTR_DCAS_HPP_INCLUDED #define BOOST_LOCKFREE_TAGGED_PTR_DCAS_HPP_INCLUDED #include /* for std::size_t */ #include namespace boost { namespace lockfree { namespace detail { template class BOOST_LOCKFREE_DCAS_ALIGNMENT tagged_ptr { public: typedef std::size_t tag_t; /** uninitialized constructor */ tagged_ptr(void) BOOST_NOEXCEPT//: ptr(0), tag(0) {} #ifdef BOOST_NO_CXX11_DEFAULTED_FUNCTIONS tagged_ptr(tagged_ptr const & p): ptr(p.ptr), tag(p.tag) {} #else tagged_ptr(tagged_ptr const & p) = default; #endif explicit tagged_ptr(T * p, tag_t t = 0): ptr(p), tag(t) {} /** unsafe set operation */ /* @{ */ #ifdef BOOST_NO_CXX11_DEFAULTED_FUNCTIONS tagged_ptr & operator= (tagged_ptr const & p) { set(p.ptr, p.tag); return *this; } #else tagged_ptr & operator= (tagged_ptr const & p) = default; #endif void set(T * p, tag_t t) { ptr = p; tag = t; } /* @} */ /** comparing semantics */ /* @{ */ bool operator== (volatile tagged_ptr const & p) const { return (ptr == p.ptr) && (tag == p.tag); } bool operator!= (volatile tagged_ptr const & p) const { return !operator==(p); } /* @} */ /** pointer access */ /* @{ */ T * get_ptr(void) const { return ptr; } void set_ptr(T * p) { ptr = p; } /* @} */ /** tag access */ /* @{ */ tag_t get_tag() const { return tag; } tag_t get_next_tag() const { tag_t next = (get_tag() + 1) & (std::numeric_limits::max)(); return next; } void set_tag(tag_t t) { tag = t; } /* @} */ /** smart pointer support */ /* @{ */ T & operator*() const { return *ptr; } T * operator->() const { return ptr; } operator bool(void) const { return ptr != 0; } /* @} */ protected: T * ptr; tag_t tag; }; } /* namespace detail */ } /* namespace lockfree */ } /* namespace boost */ #endif /* BOOST_LOCKFREE_TAGGED_PTR_DCAS_HPP_INCLUDED */ ================================================ FILE: benchmarks/boost/lockfree/detail/tagged_ptr_ptrcompression.hpp ================================================ // tagged pointer, for aba prevention // // Copyright (C) 2008, 2009 Tim Blechmann, based on code by Cory Nelson // // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_LOCKFREE_TAGGED_PTR_PTRCOMPRESSION_HPP_INCLUDED #define BOOST_LOCKFREE_TAGGED_PTR_PTRCOMPRESSION_HPP_INCLUDED #include /* for std::size_t */ #include #include namespace boost { namespace lockfree { namespace detail { #if defined (__x86_64__) || defined (_M_X64) template class tagged_ptr { typedef boost::uint64_t compressed_ptr_t; public: typedef boost::uint16_t tag_t; private: union cast_unit { compressed_ptr_t value; tag_t tag[4]; }; static const int tag_index = 3; static const compressed_ptr_t ptr_mask = 0xffffffffffffUL; //(1L<<48L)-1; static T* extract_ptr(volatile compressed_ptr_t const & i) { return (T*)(i & ptr_mask); } static tag_t extract_tag(volatile compressed_ptr_t const & i) { cast_unit cu; cu.value = i; return cu.tag[tag_index]; } static compressed_ptr_t pack_ptr(T * ptr, tag_t tag) { cast_unit ret; ret.value = compressed_ptr_t(ptr); ret.tag[tag_index] = tag; return ret.value; } public: /** uninitialized constructor */ tagged_ptr(void) BOOST_NOEXCEPT//: ptr(0), tag(0) {} /** copy constructor */ #ifdef BOOST_NO_CXX11_DEFAULTED_FUNCTIONS tagged_ptr(tagged_ptr const & p): ptr(p.ptr) {} #else tagged_ptr(tagged_ptr const & p) = default; #endif explicit tagged_ptr(T * p, tag_t t = 0): ptr(pack_ptr(p, t)) {} /** unsafe set operation */ /* @{ */ #ifdef BOOST_NO_CXX11_DEFAULTED_FUNCTIONS tagged_ptr & operator= (tagged_ptr const & p) { ptr = p.ptr; return *this; } #else tagged_ptr & operator= (tagged_ptr const & p) = default; #endif void set(T * p, tag_t t) { ptr = pack_ptr(p, t); } /* @} */ /** comparing semantics */ /* @{ */ bool operator== (volatile tagged_ptr const & p) const { return (ptr == p.ptr); } bool operator!= (volatile tagged_ptr const & p) const { return !operator==(p); } /* @} */ /** pointer access */ /* @{ */ T * get_ptr() const { return extract_ptr(ptr); } void set_ptr(T * p) { tag_t tag = get_tag(); ptr = pack_ptr(p, tag); } /* @} */ /** tag access */ /* @{ */ tag_t get_tag() const { return extract_tag(ptr); } tag_t get_next_tag() const { tag_t next = (get_tag() + 1u) & (std::numeric_limits::max)(); return next; } void set_tag(tag_t t) { T * p = get_ptr(); ptr = pack_ptr(p, t); } /* @} */ /** smart pointer support */ /* @{ */ T & operator*() const { return *get_ptr(); } T * operator->() const { return get_ptr(); } operator bool(void) const { return get_ptr() != 0; } /* @} */ protected: compressed_ptr_t ptr; }; #else #error unsupported platform #endif } /* namespace detail */ } /* namespace lockfree */ } /* namespace boost */ #endif /* BOOST_LOCKFREE_TAGGED_PTR_PTRCOMPRESSION_HPP_INCLUDED */ ================================================ FILE: benchmarks/boost/lockfree/policies.hpp ================================================ // boost lockfree // // Copyright (C) 2011 Tim Blechmann // // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_LOCKFREE_POLICIES_HPP_INCLUDED #define BOOST_LOCKFREE_POLICIES_HPP_INCLUDED #include #include #include #include namespace boost { namespace lockfree { #ifndef BOOST_DOXYGEN_INVOKED namespace tag { struct allocator ; } namespace tag { struct fixed_sized; } namespace tag { struct capacity; } #endif /** Configures a data structure as \b fixed-sized. * * The internal nodes are stored inside an array and they are addressed by array indexing. This limits the possible size of the * queue to the number of elements that can be addressed by the index type (usually 2**16-2), but on platforms that lack * double-width compare-and-exchange instructions, this is the best way to achieve lock-freedom. * This implies that a data structure is bounded. * */ template struct fixed_sized: boost::parameter::template_keyword > {}; /** Sets the \b capacity of a data structure at compile-time. * * This implies that a data structure is bounded and fixed-sized. * */ template struct capacity: boost::parameter::template_keyword > {}; /** Defines the \b allocator type of a data structure. * */ template struct allocator: boost::parameter::template_keyword {}; } } #endif /* BOOST_LOCKFREE_POLICIES_HPP_INCLUDED */ ================================================ FILE: benchmarks/boost/lockfree/queue.hpp ================================================ // lock-free queue from // Michael, M. M. and Scott, M. L., // "simple, fast and practical non-blocking and blocking concurrent queue algorithms" // // Copyright (C) 2008-2013 Tim Blechmann // // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_LOCKFREE_FIFO_HPP_INCLUDED #define BOOST_LOCKFREE_FIFO_HPP_INCLUDED #include #include #include #include #include // for BOOST_LIKELY #include #include #include #include #include #ifdef BOOST_HAS_PRAGMA_ONCE #pragma once #endif #if defined(_MSC_VER) #pragma warning(push) #pragma warning(disable: 4324) // structure was padded due to __declspec(align()) #endif namespace boost { namespace lockfree { namespace detail { typedef parameter::parameters, boost::parameter::optional > queue_signature; } /* namespace detail */ /** The queue class provides a multi-writer/multi-reader queue, pushing and popping is lock-free, * construction/destruction has to be synchronized. It uses a freelist for memory management, * freed nodes are pushed to the freelist and not returned to the OS before the queue is destroyed. * * \b Policies: * - \ref boost::lockfree::fixed_sized, defaults to \c boost::lockfree::fixed_sized \n * Can be used to completely disable dynamic memory allocations during push in order to ensure lockfree behavior. \n * If the data structure is configured as fixed-sized, the internal nodes are stored inside an array and they are addressed * by array indexing. This limits the possible size of the queue to the number of elements that can be addressed by the index * type (usually 2**16-2), but on platforms that lack double-width compare-and-exchange instructions, this is the best way * to achieve lock-freedom. * * - \ref boost::lockfree::capacity, optional \n * If this template argument is passed to the options, the size of the queue is set at compile-time.\n * It this option implies \c fixed_sized * * - \ref boost::lockfree::allocator, defaults to \c boost::lockfree::allocator> \n * Specifies the allocator that is used for the internal freelist * * \b Requirements: * - T must have a copy constructor * - T must have a trivial assignment operator * - T must have a trivial destructor * * */ #ifndef BOOST_DOXYGEN_INVOKED template #else template #endif class queue { private: #ifndef BOOST_DOXYGEN_INVOKED #ifdef BOOST_HAS_TRIVIAL_DESTRUCTOR BOOST_STATIC_ASSERT((boost::has_trivial_destructor::value)); #endif #ifdef BOOST_HAS_TRIVIAL_ASSIGN BOOST_STATIC_ASSERT((boost::has_trivial_assign::value)); #endif typedef typename detail::queue_signature::bind::type bound_args; static const bool has_capacity = detail::extract_capacity::has_capacity; static const size_t capacity = detail::extract_capacity::capacity + 1; // the queue uses one dummy node static const bool fixed_sized = detail::extract_fixed_sized::value; static const bool node_based = !(has_capacity || fixed_sized); static const bool compile_time_sized = has_capacity; struct BOOST_LOCKFREE_CACHELINE_ALIGNMENT node { typedef typename detail::select_tagged_handle::tagged_handle_type tagged_node_handle; typedef typename detail::select_tagged_handle::handle_type handle_type; node(T const & v, handle_type null_handle): data(v)//, next(tagged_node_handle(0, 0)) { /* increment tag to avoid ABA problem */ tagged_node_handle old_next = next.load(memory_order_relaxed); tagged_node_handle new_next (null_handle, old_next.get_next_tag()); next.store(new_next, memory_order_release); } node (handle_type null_handle): next(tagged_node_handle(null_handle, 0)) {} node(void) {} atomic next; T data; }; typedef typename detail::extract_allocator::type node_allocator; typedef typename detail::select_freelist::type pool_t; typedef typename pool_t::tagged_node_handle tagged_node_handle; typedef typename detail::select_tagged_handle::handle_type handle_type; void initialize(void) { node * n = pool.template construct(pool.null_handle()); tagged_node_handle dummy_node(pool.get_handle(n), 0); head_.store(dummy_node, memory_order_relaxed); tail_.store(dummy_node, memory_order_release); } struct implementation_defined { typedef node_allocator allocator; typedef std::size_t size_type; }; #endif BOOST_DELETED_FUNCTION(queue(queue const&)) BOOST_DELETED_FUNCTION(queue& operator= (queue const&)) public: typedef T value_type; typedef typename implementation_defined::allocator allocator; typedef typename implementation_defined::size_type size_type; /** * \return true, if implementation is lock-free. * * \warning It only checks, if the queue head and tail nodes and the freelist can be modified in a lock-free manner. * On most platforms, the whole implementation is lock-free, if this is true. Using c++0x-style atomics, there is * no possibility to provide a completely accurate implementation, because one would need to test every internal * node, which is impossible if further nodes will be allocated from the operating system. * */ bool is_lock_free (void) const { return head_.is_lock_free() && tail_.is_lock_free() && pool.is_lock_free(); } //! Construct queue // @{ queue(void): head_(tagged_node_handle(0, 0)), tail_(tagged_node_handle(0, 0)), pool(node_allocator(), capacity) { BOOST_ASSERT(has_capacity); initialize(); } template explicit queue(typename node_allocator::template rebind::other const & alloc): head_(tagged_node_handle(0, 0)), tail_(tagged_node_handle(0, 0)), pool(alloc, capacity) { BOOST_STATIC_ASSERT(has_capacity); initialize(); } explicit queue(allocator const & alloc): head_(tagged_node_handle(0, 0)), tail_(tagged_node_handle(0, 0)), pool(alloc, capacity) { BOOST_ASSERT(has_capacity); initialize(); } // @} //! Construct queue, allocate n nodes for the freelist. // @{ explicit queue(size_type n): head_(tagged_node_handle(0, 0)), tail_(tagged_node_handle(0, 0)), pool(node_allocator(), n + 1) { BOOST_ASSERT(!has_capacity); initialize(); } template queue(size_type n, typename node_allocator::template rebind::other const & alloc): head_(tagged_node_handle(0, 0)), tail_(tagged_node_handle(0, 0)), pool(alloc, n + 1) { BOOST_STATIC_ASSERT(!has_capacity); initialize(); } // @} /** \copydoc boost::lockfree::stack::reserve * */ void reserve(size_type n) { pool.template reserve(n); } /** \copydoc boost::lockfree::stack::reserve_unsafe * */ void reserve_unsafe(size_type n) { pool.template reserve(n); } /** Destroys queue, free all nodes from freelist. * */ ~queue(void) { T dummy; while(unsynchronized_pop(dummy)) {} pool.template destruct(head_.load(memory_order_relaxed)); } /** Check if the queue is empty * * \return true, if the queue is empty, false otherwise * \note The result is only accurate, if no other thread modifies the queue. Therefore it is rarely practical to use this * value in program logic. * */ bool empty(void) const { return pool.get_handle(head_.load()) == pool.get_handle(tail_.load()); } /** Pushes object t to the queue. * * \post object will be pushed to the queue, if internal node can be allocated * \returns true, if the push operation is successful. * * \note Thread-safe. If internal memory pool is exhausted and the memory pool is not fixed-sized, a new node will be allocated * from the OS. This may not be lock-free. * */ bool push(T const & t) { return do_push(t); } /** Pushes object t to the queue. * * \post object will be pushed to the queue, if internal node can be allocated * \returns true, if the push operation is successful. * * \note Thread-safe and non-blocking. If internal memory pool is exhausted, operation will fail * \throws if memory allocator throws * */ bool bounded_push(T const & t) { return do_push(t); } private: #ifndef BOOST_DOXYGEN_INVOKED template bool do_push(T const & t) { node * n = pool.template construct(t, pool.null_handle()); handle_type node_handle = pool.get_handle(n); if (n == NULL) return false; for (;;) { tagged_node_handle tail = tail_.load(memory_order_acquire); node * tail_node = pool.get_pointer(tail); tagged_node_handle next = tail_node->next.load(memory_order_acquire); node * next_ptr = pool.get_pointer(next); tagged_node_handle tail2 = tail_.load(memory_order_acquire); if (BOOST_LIKELY(tail == tail2)) { if (next_ptr == 0) { tagged_node_handle new_tail_next(node_handle, next.get_next_tag()); if ( tail_node->next.compare_exchange_weak(next, new_tail_next) ) { tagged_node_handle new_tail(node_handle, tail.get_next_tag()); tail_.compare_exchange_strong(tail, new_tail); return true; } } else { tagged_node_handle new_tail(pool.get_handle(next_ptr), tail.get_next_tag()); tail_.compare_exchange_strong(tail, new_tail); } } } } #endif public: /** Pushes object t to the queue. * * \post object will be pushed to the queue, if internal node can be allocated * \returns true, if the push operation is successful. * * \note Not Thread-safe. If internal memory pool is exhausted and the memory pool is not fixed-sized, a new node will be allocated * from the OS. This may not be lock-free. * \throws if memory allocator throws * */ bool unsynchronized_push(T const & t) { node * n = pool.template construct(t, pool.null_handle()); if (n == NULL) return false; for (;;) { tagged_node_handle tail = tail_.load(memory_order_relaxed); tagged_node_handle next = tail->next.load(memory_order_relaxed); node * next_ptr = next.get_ptr(); if (next_ptr == 0) { tail->next.store(tagged_node_handle(n, next.get_next_tag()), memory_order_relaxed); tail_.store(tagged_node_handle(n, tail.get_next_tag()), memory_order_relaxed); return true; } else tail_.store(tagged_node_handle(next_ptr, tail.get_next_tag()), memory_order_relaxed); } } /** Pops object from queue. * * \post if pop operation is successful, object will be copied to ret. * \returns true, if the pop operation is successful, false if queue was empty. * * \note Thread-safe and non-blocking * */ bool pop (T & ret) { return pop(ret); } /** Pops object from queue. * * \pre type U must be constructible by T and copyable, or T must be convertible to U * \post if pop operation is successful, object will be copied to ret. * \returns true, if the pop operation is successful, false if queue was empty. * * \note Thread-safe and non-blocking * */ template bool pop (U & ret) { for (;;) { tagged_node_handle head = head_.load(memory_order_acquire); node * head_ptr = pool.get_pointer(head); tagged_node_handle tail = tail_.load(memory_order_acquire); tagged_node_handle next = head_ptr->next.load(memory_order_acquire); node * next_ptr = pool.get_pointer(next); tagged_node_handle head2 = head_.load(memory_order_acquire); if (BOOST_LIKELY(head == head2)) { if (pool.get_handle(head) == pool.get_handle(tail)) { if (next_ptr == 0) return false; tagged_node_handle new_tail(pool.get_handle(next), tail.get_next_tag()); tail_.compare_exchange_strong(tail, new_tail); } else { if (next_ptr == 0) /* this check is not part of the original algorithm as published by michael and scott * * however we reuse the tagged_ptr part for the freelist and clear the next part during node * allocation. we can observe a null-pointer here. * */ continue; detail::copy_payload(next_ptr->data, ret); tagged_node_handle new_head(pool.get_handle(next), head.get_next_tag()); if (head_.compare_exchange_weak(head, new_head)) { pool.template destruct(head); return true; } } } } } /** Pops object from queue. * * \post if pop operation is successful, object will be copied to ret. * \returns true, if the pop operation is successful, false if queue was empty. * * \note Not thread-safe, but non-blocking * * */ bool unsynchronized_pop (T & ret) { return unsynchronized_pop(ret); } /** Pops object from queue. * * \pre type U must be constructible by T and copyable, or T must be convertible to U * \post if pop operation is successful, object will be copied to ret. * \returns true, if the pop operation is successful, false if queue was empty. * * \note Not thread-safe, but non-blocking * * */ template bool unsynchronized_pop (U & ret) { for (;;) { tagged_node_handle head = head_.load(memory_order_relaxed); node * head_ptr = pool.get_pointer(head); tagged_node_handle tail = tail_.load(memory_order_relaxed); tagged_node_handle next = head_ptr->next.load(memory_order_relaxed); node * next_ptr = pool.get_pointer(next); if (pool.get_handle(head) == pool.get_handle(tail)) { if (next_ptr == 0) return false; tagged_node_handle new_tail(pool.get_handle(next), tail.get_next_tag()); tail_.store(new_tail); } else { if (next_ptr == 0) /* this check is not part of the original algorithm as published by michael and scott * * however we reuse the tagged_ptr part for the freelist and clear the next part during node * allocation. we can observe a null-pointer here. * */ continue; detail::copy_payload(next_ptr->data, ret); tagged_node_handle new_head(pool.get_handle(next), head.get_next_tag()); head_.store(new_head); pool.template destruct(head); return true; } } } /** consumes one element via a functor * * pops one element from the queue and applies the functor on this object * * \returns true, if one element was consumed * * \note Thread-safe and non-blocking, if functor is thread-safe and non-blocking * */ template bool consume_one(Functor & f) { T element; bool success = pop(element); if (success) f(element); return success; } /// \copydoc boost::lockfree::queue::consume_one(Functor & rhs) template bool consume_one(Functor const & f) { T element; bool success = pop(element); if (success) f(element); return success; } /** consumes all elements via a functor * * sequentially pops all elements from the queue and applies the functor on each object * * \returns number of elements that are consumed * * \note Thread-safe and non-blocking, if functor is thread-safe and non-blocking * */ template size_t consume_all(Functor & f) { size_t element_count = 0; while (consume_one(f)) element_count += 1; return element_count; } /// \copydoc boost::lockfree::queue::consume_all(Functor & rhs) template size_t consume_all(Functor const & f) { size_t element_count = 0; while (consume_one(f)) element_count += 1; return element_count; } private: #ifndef BOOST_DOXYGEN_INVOKED atomic head_; static const int padding_size = BOOST_LOCKFREE_CACHELINE_BYTES - sizeof(tagged_node_handle); char padding1[padding_size]; atomic tail_; char padding2[padding_size]; pool_t pool; #endif }; } /* namespace lockfree */ } /* namespace boost */ #if defined(_MSC_VER) #pragma warning(pop) #endif #endif /* BOOST_LOCKFREE_FIFO_HPP_INCLUDED */ ================================================ FILE: benchmarks/boost/memory_order.hpp ================================================ #ifndef BOOST_MEMORY_ORDER_HPP_INCLUDED #define BOOST_MEMORY_ORDER_HPP_INCLUDED // MS compatible compilers support #pragma once #if defined(_MSC_VER) && (_MSC_VER >= 1020) # pragma once #endif // boost/memory_order.hpp // // Defines enum boost::memory_order per the C++0x working draft // // Copyright (c) 2008, 2009 Peter Dimov // // Distributed under the Boost Software License, Version 1.0. // See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) namespace boost { // // Enum values are chosen so that code that needs to insert // a trailing fence for acquire semantics can use a single // test such as: // // if( mo & memory_order_acquire ) { ...fence... } // // For leading fences one can use: // // if( mo & memory_order_release ) { ...fence... } // // Architectures such as Alpha that need a fence on consume // can use: // // if( mo & ( memory_order_acquire | memory_order_consume ) ) { ...fence... } // // The values are also in the order of increasing "strength" // of the fences so that success/failure orders can be checked // efficiently in compare_exchange methods. // enum memory_order { memory_order_relaxed = 0, memory_order_consume = 1, memory_order_acquire = 2, memory_order_release = 4, memory_order_acq_rel = 6, // acquire | release memory_order_seq_cst = 14 // acq_rel | 8 }; } // namespace boost #endif // #ifndef BOOST_MEMORY_ORDER_HPP_INCLUDED ================================================ FILE: benchmarks/boost/mpl/O1_size.hpp ================================================ #ifndef BOOST_MPL_O1_SIZE_HPP_INCLUDED #define BOOST_MPL_O1_SIZE_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ #include #include #include #include #include namespace boost { namespace mpl { // returns sequence size if it's an O(1) operation; otherwise returns -1 template< typename BOOST_MPL_AUX_NA_PARAM(Sequence) > struct O1_size : O1_size_impl< typename sequence_tag::type > ::template apply< Sequence > { BOOST_MPL_AUX_LAMBDA_SUPPORT(1, O1_size, (Sequence)) }; BOOST_MPL_AUX_NA_SPEC(1, O1_size) }} #endif // BOOST_MPL_O1_SIZE_HPP_INCLUDED ================================================ FILE: benchmarks/boost/mpl/O1_size_fwd.hpp ================================================ #ifndef BOOST_MPL_O1_SIZE_FWD_HPP_INCLUDED #define BOOST_MPL_O1_SIZE_FWD_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ namespace boost { namespace mpl { template< typename Tag > struct O1_size_impl; template< typename Sequence > struct O1_size; }} #endif // BOOST_MPL_O1_SIZE_FWD_HPP_INCLUDED ================================================ FILE: benchmarks/boost/mpl/always.hpp ================================================ #ifndef BOOST_MPL_ALWAYS_HPP_INCLUDED #define BOOST_MPL_ALWAYS_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ #include #include #include namespace boost { namespace mpl { template< typename Value > struct always { template< BOOST_MPL_PP_DEFAULT_PARAMS(BOOST_MPL_LIMIT_METAFUNCTION_ARITY, typename T, na) > struct apply { typedef Value type; }; }; BOOST_MPL_AUX_ARITY_SPEC(0, always) }} #endif // BOOST_MPL_ALWAYS_HPP_INCLUDED ================================================ FILE: benchmarks/boost/mpl/and.hpp ================================================ #ifndef BOOST_MPL_AND_HPP_INCLUDED #define BOOST_MPL_AND_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ #include #if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ && !defined(BOOST_MPL_PREPROCESSING_MODE) # include # include # include # include // agurt, 19/may/04: workaround a conflict with header's // 'or' and 'and' macros, see http://tinyurl.com/3et69; 'defined(and)' // has to be checked in a separate condition, otherwise GCC complains // about 'and' being an alternative token #if defined(_MSC_VER) && !defined(__clang__) #ifndef __GCCXML__ #if defined(and) # pragma push_macro("and") # undef and # define and(x) #endif #endif #endif # define BOOST_MPL_PREPROCESSED_HEADER and.hpp # include #if defined(_MSC_VER) && !defined(__clang__) #ifndef __GCCXML__ #if defined(and) # pragma pop_macro("and") #endif #endif #endif #else # define AUX778076_OP_NAME and_ # define AUX778076_OP_VALUE1 false # define AUX778076_OP_VALUE2 true # include #endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS #endif // BOOST_MPL_AND_HPP_INCLUDED ================================================ FILE: benchmarks/boost/mpl/apply.hpp ================================================ #if !defined(BOOST_PP_IS_ITERATING) ///// header body #ifndef BOOST_MPL_APPLY_HPP_INCLUDED #define BOOST_MPL_APPLY_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ #if !defined(BOOST_MPL_PREPROCESSING_MODE) # include # include # include # include # include # include #endif #include #if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ && !defined(BOOST_MPL_PREPROCESSING_MODE) # define BOOST_MPL_PREPROCESSED_HEADER apply.hpp # include #else # include # include # include # include # include # include # include # include # include # include # include # include # include # include # include namespace boost { namespace mpl { // local macros, #undef-ined at the end of the header # define AUX778076_APPLY_PARAMS(param) \ BOOST_MPL_PP_PARAMS( \ BOOST_MPL_LIMIT_METAFUNCTION_ARITY \ , param \ ) \ /**/ # define AUX778076_APPLY_DEF_PARAMS(param, value) \ BOOST_MPL_PP_DEFAULT_PARAMS( \ BOOST_MPL_LIMIT_METAFUNCTION_ARITY \ , param \ , value \ ) \ /**/ # define AUX778076_APPLY_N_PARAMS(n, param) \ BOOST_MPL_PP_PARAMS(n, param) \ /**/ # define AUX778076_APPLY_N_COMMA_PARAMS(n, param) \ BOOST_PP_COMMA_IF(n) \ BOOST_MPL_PP_PARAMS(n, param) \ /**/ # define AUX778076_APPLY_N_PARTIAL_SPEC_PARAMS(n, param, def) \ BOOST_PP_COMMA_IF(n) \ BOOST_MPL_PP_PARTIAL_SPEC_PARAMS(n, param, def) \ /**/ # define AUX778076_APPLY_N_SPEC_PARAMS(n, param) \ BOOST_MPL_PP_ENUM(BOOST_PP_INC(n), param) \ /**/ #define BOOST_PP_ITERATION_PARAMS_1 \ (3,(0, BOOST_MPL_LIMIT_METAFUNCTION_ARITY, )) #include BOOST_PP_ITERATE() # if !defined(BOOST_MPL_CFG_NO_APPLY_TEMPLATE) // real C++ version is already taken care of # if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) namespace aux { // apply_count_args #define AUX778076_COUNT_ARGS_PREFIX apply #define AUX778076_COUNT_ARGS_DEFAULT na #define AUX778076_COUNT_ARGS_ARITY BOOST_MPL_LIMIT_METAFUNCTION_ARITY #include } template< typename F, AUX778076_APPLY_DEF_PARAMS(typename T, na) > struct apply : aux::apply_chooser< aux::apply_count_args< AUX778076_APPLY_PARAMS(T) >::value >::template result_< F, AUX778076_APPLY_PARAMS(T) >::type { }; # endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION # endif // BOOST_MPL_CFG_NO_APPLY_TEMPLATE # undef AUX778076_APPLY_N_SPEC_PARAMS # undef AUX778076_APPLY_N_PARTIAL_SPEC_PARAMS # undef AUX778076_APPLY_N_COMMA_PARAMS # undef AUX778076_APPLY_N_PARAMS # undef AUX778076_APPLY_DEF_PARAMS # undef AUX778076_APPLY_PARAMS }} #endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS #endif // BOOST_MPL_APPLY_HPP_INCLUDED ///// iteration, depth == 1 // For gcc 4.4 compatability, we must include the // BOOST_PP_ITERATION_DEPTH test inside an #else clause. #else // BOOST_PP_IS_ITERATING #if BOOST_PP_ITERATION_DEPTH() == 1 # define i_ BOOST_PP_FRAME_ITERATION(1) template< typename F AUX778076_APPLY_N_COMMA_PARAMS(i_, typename T) > struct BOOST_PP_CAT(apply,i_) #if !BOOST_WORKAROUND(BOOST_MSVC, < 1300) : BOOST_PP_CAT(apply_wrap,i_)< typename lambda::type AUX778076_APPLY_N_COMMA_PARAMS(i_, T) > { #else { typedef typename BOOST_PP_CAT(apply_wrap,i_)< typename lambda::type AUX778076_APPLY_N_COMMA_PARAMS(i_, T) >::type type; #endif BOOST_MPL_AUX_LAMBDA_SUPPORT( BOOST_PP_INC(i_) , BOOST_PP_CAT(apply,i_) , (F AUX778076_APPLY_N_COMMA_PARAMS(i_,T)) ) }; #if defined(BOOST_MPL_CFG_MSVC_ETI_BUG) /// workaround for ETI bug template<> struct BOOST_PP_CAT(apply,i_) { typedef int type; }; #endif # if !defined(BOOST_MPL_CFG_NO_APPLY_TEMPLATE) # if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) #if i_ == BOOST_MPL_LIMIT_METAFUNCTION_ARITY /// primary template (not a specialization!) template< typename F AUX778076_APPLY_N_COMMA_PARAMS(i_, typename T) > struct apply : BOOST_PP_CAT(apply,i_)< F AUX778076_APPLY_N_COMMA_PARAMS(i_, T) > { }; #else template< typename F AUX778076_APPLY_N_COMMA_PARAMS(i_, typename T) > struct apply< F AUX778076_APPLY_N_PARTIAL_SPEC_PARAMS(i_, T, na) > : BOOST_PP_CAT(apply,i_)< F AUX778076_APPLY_N_COMMA_PARAMS(i_, T) > { }; #endif # else // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION #if !defined(BOOST_MPL_CFG_NO_APPLY_TEMPLATE) namespace aux { template<> struct apply_chooser { template< typename F, AUX778076_APPLY_PARAMS(typename T) > struct result_ { typedef BOOST_PP_CAT(apply,i_)< F AUX778076_APPLY_N_COMMA_PARAMS(i_, T) > type; }; }; } // namespace aux #endif # endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION # endif // BOOST_MPL_CFG_NO_APPLY_TEMPLATE # undef i_ #endif // BOOST_PP_ITERATION_DEPTH() #endif // BOOST_PP_IS_ITERATING ================================================ FILE: benchmarks/boost/mpl/apply_fwd.hpp ================================================ #if !defined(BOOST_PP_IS_ITERATING) ///// header body #ifndef BOOST_MPL_APPLY_FWD_HPP_INCLUDED #define BOOST_MPL_APPLY_FWD_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ #if !defined(BOOST_MPL_PREPROCESSING_MODE) # include #endif #include #if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ && !defined(BOOST_MPL_PREPROCESSING_MODE) # define BOOST_MPL_PREPROCESSED_HEADER apply_fwd.hpp # include #else # include # include # include # include # include # include # include # include // agurt, 15/jan/02: top-level 'apply' template gives an ICE on MSVC // (for known reasons) #if BOOST_WORKAROUND(BOOST_MSVC, < 1300) # define BOOST_MPL_CFG_NO_APPLY_TEMPLATE #endif namespace boost { namespace mpl { // local macro, #undef-ined at the end of the header # define AUX778076_APPLY_DEF_PARAMS(param, value) \ BOOST_MPL_PP_DEFAULT_PARAMS( \ BOOST_MPL_LIMIT_METAFUNCTION_ARITY \ , param \ , value \ ) \ /**/ # define AUX778076_APPLY_N_COMMA_PARAMS(n, param) \ BOOST_PP_COMMA_IF(n) \ BOOST_MPL_PP_PARAMS(n, param) \ /**/ # if !defined(BOOST_MPL_CFG_NO_APPLY_TEMPLATE) #if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) // forward declaration template< typename F, AUX778076_APPLY_DEF_PARAMS(typename T, na) > struct apply; #else namespace aux { template< BOOST_AUX_NTTP_DECL(int, arity_) > struct apply_chooser; } #endif # endif // BOOST_MPL_CFG_NO_APPLY_TEMPLATE #define BOOST_PP_ITERATION_PARAMS_1 \ (3,(0, BOOST_MPL_LIMIT_METAFUNCTION_ARITY, )) #include BOOST_PP_ITERATE() # undef AUX778076_APPLY_N_COMMA_PARAMS # undef AUX778076_APPLY_DEF_PARAMS }} #endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS #endif // BOOST_MPL_APPLY_FWD_HPP_INCLUDED ///// iteration #else #define i_ BOOST_PP_FRAME_ITERATION(1) template< typename F AUX778076_APPLY_N_COMMA_PARAMS(i_, typename T) > struct BOOST_PP_CAT(apply,i_); #undef i_ #endif // BOOST_PP_IS_ITERATING ================================================ FILE: benchmarks/boost/mpl/apply_wrap.hpp ================================================ #if !defined(BOOST_PP_IS_ITERATING) ///// header body #ifndef BOOST_MPL_APPLY_WRAP_HPP_INCLUDED #define BOOST_MPL_APPLY_WRAP_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2008 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ #if !defined(BOOST_MPL_PREPROCESSING_MODE) # include # include # include # include #endif #include #if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ && !defined(BOOST_MPL_PREPROCESSING_MODE) # define BOOST_MPL_PREPROCESSED_HEADER apply_wrap.hpp # include #else # include # include # include # include # include # include # include # include # include # include # include # include # include # include namespace boost { namespace mpl { // local macros, #undef-ined at the end of the header # define AUX778076_APPLY_WRAP_PARAMS(n, param) \ BOOST_MPL_PP_PARAMS(n, param) \ /**/ # define AUX778076_APPLY_WRAP_SPEC_PARAMS(n, param) \ BOOST_MPL_PP_ENUM(BOOST_PP_INC(n), param) \ /**/ #define BOOST_PP_ITERATION_PARAMS_1 \ (3,(0, BOOST_MPL_LIMIT_METAFUNCTION_ARITY, )) #include BOOST_PP_ITERATE() # undef AUX778076_APPLY_WRAP_SPEC_PARAMS # undef AUX778076_APPLY_WRAP_PARAMS }} #endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS #endif // BOOST_MPL_APPLY_WRAP_HPP_INCLUDED ///// iteration, depth == 1 // For gcc 4.4 compatability, we must include the // BOOST_PP_ITERATION_DEPTH test inside an #else clause. #else // BOOST_PP_IS_ITERATING #if BOOST_PP_ITERATION_DEPTH() == 1 # define i_ BOOST_PP_FRAME_ITERATION(1) # if BOOST_WORKAROUND(BOOST_MSVC, < 1300) // MSVC version #define AUX778076_MSVC_DTW_NAME BOOST_PP_CAT(msvc_apply,i_) #define AUX778076_MSVC_DTW_ORIGINAL_NAME apply #define AUX778076_MSVC_DTW_ARITY i_ #include template< typename F BOOST_PP_COMMA_IF(i_) AUX778076_APPLY_WRAP_PARAMS(i_, typename T) > struct BOOST_PP_CAT(apply_wrap,i_) { // Metafunction forwarding confuses vc6 typedef typename BOOST_PP_CAT(msvc_apply,i_)::template result_< AUX778076_APPLY_WRAP_PARAMS(i_, T) >::type type; }; # elif defined(BOOST_MPL_CFG_BROKEN_DEFAULT_PARAMETERS_IN_NESTED_TEMPLATES) // MWCW/Borland version template< int N, typename F BOOST_PP_COMMA_IF(i_) AUX778076_APPLY_WRAP_PARAMS(i_, typename T) > struct BOOST_PP_CAT(apply_wrap_impl,i_); #define BOOST_PP_ITERATION_PARAMS_2 \ (3,(0, BOOST_MPL_LIMIT_METAFUNCTION_ARITY - i_, )) #include BOOST_PP_ITERATE() template< typename F BOOST_PP_COMMA_IF(i_) AUX778076_APPLY_WRAP_PARAMS(i_, typename T) > struct BOOST_PP_CAT(apply_wrap,i_) : BOOST_PP_CAT(apply_wrap_impl,i_)< ::boost::mpl::aux::arity::value , F BOOST_PP_COMMA_IF(i_) AUX778076_APPLY_WRAP_PARAMS(i_, T) >::type { }; # else // ISO98 C++, with minor concession to vc7 template< typename F BOOST_PP_COMMA_IF(i_) AUX778076_APPLY_WRAP_PARAMS(i_, typename T) #if i_ == 0 , typename has_apply_ = typename aux::has_apply::type #endif > struct BOOST_PP_CAT(apply_wrap,i_) // metafunction forwarding confuses MSVC 7.0 #if !BOOST_WORKAROUND(BOOST_MSVC, == 1300) : F::template apply< AUX778076_APPLY_WRAP_PARAMS(i_, T) > { #else { typedef typename F::template apply< AUX778076_APPLY_WRAP_PARAMS(i_, T) >::type type; #endif }; #if i_ == 0 && !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) template< typename F > struct BOOST_PP_CAT(apply_wrap,i_) : F::apply { }; #endif # endif // workarounds #if defined(BOOST_MPL_CFG_MSVC_ETI_BUG) /// workaround for ETI bug template<> struct BOOST_PP_CAT(apply_wrap,i_) { typedef int type; }; #endif # undef i_ ///// iteration, depth == 2 #elif BOOST_PP_ITERATION_DEPTH() == 2 # define j_ BOOST_PP_FRAME_ITERATION(2) #if i_ == 0 && j_ == 0 \ && defined(BOOST_MPL_CFG_BCC590_WORKAROUNDS) \ && !defined(BOOST_MPL_CFG_NO_HAS_APPLY) template< typename F, bool F_has_apply > struct apply_wrap_impl0_bcb { typedef typename F::template apply< na > type; }; template< typename F > struct apply_wrap_impl0_bcb< F, true > { typedef typename F::apply type; }; template< typename F BOOST_PP_COMMA_IF(i_) AUX778076_APPLY_WRAP_PARAMS(i_, typename T) > struct BOOST_PP_CAT(apply_wrap_impl,i_)< BOOST_MPL_PP_ADD(i_, j_) , F BOOST_PP_COMMA_IF(i_) AUX778076_APPLY_WRAP_PARAMS(i_, T) > { typedef apply_wrap_impl0_bcb< F, aux::has_apply< F >::value >::type type; }; #else template< typename F BOOST_PP_COMMA_IF(i_) AUX778076_APPLY_WRAP_PARAMS(i_, typename T) > struct BOOST_PP_CAT(apply_wrap_impl,i_)< BOOST_MPL_PP_ADD(i_, j_) , F BOOST_PP_COMMA_IF(i_) AUX778076_APPLY_WRAP_PARAMS(i_, T) > { typedef typename F::template apply< AUX778076_APPLY_WRAP_PARAMS(i_, T) #if i_ == 0 && j_ == 0 /// since the defaults are "lost", we have to pass *something* even for nullary /// metafunction classes na #else BOOST_PP_COMMA_IF(BOOST_PP_AND(i_, j_)) BOOST_MPL_PP_ENUM(j_, na) #endif > type; }; #endif # undef j_ #endif // BOOST_PP_ITERATION_DEPTH() #endif // BOOST_PP_IS_ITERATING ================================================ FILE: benchmarks/boost/mpl/arg.hpp ================================================ #if !defined(BOOST_PP_IS_ITERATING) ///// header body #ifndef BOOST_MPL_ARG_HPP_INCLUDED #define BOOST_MPL_ARG_HPP_INCLUDED // Copyright Peter Dimov 2001-2002 // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ #if !defined(BOOST_MPL_PREPROCESSING_MODE) # include # include # include # include # include #endif #include #include #if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ && !defined(BOOST_MPL_PREPROCESSING_MODE) # define BOOST_MPL_PREPROCESSED_HEADER arg.hpp # include #else # include # include # include # include # include # include # include # include # include BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN // local macro, #undef-ined at the end of the header #if !defined(BOOST_MPL_CFG_NO_DEFAULT_PARAMETERS_IN_NESTED_TEMPLATES) # define AUX778076_ARG_N_DEFAULT_PARAMS(param,value) \ BOOST_MPL_PP_DEFAULT_PARAMS( \ BOOST_MPL_LIMIT_METAFUNCTION_ARITY \ , param \ , value \ ) \ /**/ #else # define AUX778076_ARG_N_DEFAULT_PARAMS(param,value) \ BOOST_MPL_PP_PARAMS( \ BOOST_MPL_LIMIT_METAFUNCTION_ARITY \ , param \ ) \ /**/ #endif #define BOOST_PP_ITERATION_PARAMS_1 \ (3,(0, BOOST_MPL_LIMIT_METAFUNCTION_ARITY, )) #include BOOST_PP_ITERATE() # undef AUX778076_ARG_N_DEFAULT_PARAMS BOOST_MPL_AUX_NONTYPE_ARITY_SPEC(1,int,arg) BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE #endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS #endif // BOOST_MPL_ARG_HPP_INCLUDED ///// iteration #else #define i_ BOOST_PP_FRAME_ITERATION(1) #if i_ > 0 template<> struct arg { BOOST_STATIC_CONSTANT(int, value = i_); typedef arg next; BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) BOOST_MPL_AUX_ARG_TYPEDEF(na, type) template< AUX778076_ARG_N_DEFAULT_PARAMS(typename U, na) > struct apply { typedef BOOST_PP_CAT(U,i_) type; BOOST_MPL_AUX_ASSERT_NOT_NA(type); }; }; #else template<> struct arg<-1> { BOOST_STATIC_CONSTANT(int, value = -1); BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) BOOST_MPL_AUX_ARG_TYPEDEF(na, type) template< AUX778076_ARG_N_DEFAULT_PARAMS(typename U, na) > struct apply { typedef U1 type; BOOST_MPL_AUX_ASSERT_NOT_NA(type); }; }; #endif // i_ > 0 #undef i_ #endif // BOOST_PP_IS_ITERATING ================================================ FILE: benchmarks/boost/mpl/arg_fwd.hpp ================================================ #ifndef BOOST_MPL_ARG_FWD_HPP_INCLUDED #define BOOST_MPL_ARG_FWD_HPP_INCLUDED // Copyright Peter Dimov 2001-2002 // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ #include #include BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN template< BOOST_MPL_AUX_NTTP_DECL(int, N) > struct arg; BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE BOOST_MPL_AUX_ADL_BARRIER_DECL(arg) #endif // BOOST_MPL_ARG_FWD_HPP_INCLUDED ================================================ FILE: benchmarks/boost/mpl/assert.hpp ================================================ #ifndef BOOST_MPL_ASSERT_HPP_INCLUDED #define BOOST_MPL_ASSERT_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2006 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include // make sure 'size_t' is placed into 'std' #include #if BOOST_WORKAROUND(BOOST_MSVC, == 1700) #include #endif #if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x610)) \ || (BOOST_MPL_CFG_GCC != 0) \ || BOOST_WORKAROUND(__IBMCPP__, <= 600) # define BOOST_MPL_CFG_ASSERT_USE_RELATION_NAMES #endif #if BOOST_WORKAROUND(__MWERKS__, < 0x3202) \ || BOOST_WORKAROUND(__EDG_VERSION__, <= 238) \ || BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x610)) \ || BOOST_WORKAROUND(__DMC__, BOOST_TESTED_AT(0x840)) # define BOOST_MPL_CFG_ASSERT_BROKEN_POINTER_TO_POINTER_TO_MEMBER #endif // agurt, 10/nov/06: use enums for Borland (which cannot cope with static constants) // and GCC (which issues "unused variable" warnings when static constants are used // at a function scope) #if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x610)) \ || (BOOST_MPL_CFG_GCC != 0) || (BOOST_MPL_CFG_GPU != 0) # define BOOST_MPL_AUX_ASSERT_CONSTANT(T, expr) enum { expr } #else # define BOOST_MPL_AUX_ASSERT_CONSTANT(T, expr) BOOST_STATIC_CONSTANT(T, expr) #endif BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN struct failed {}; // agurt, 24/aug/04: MSVC 7.1 workaround here and below: return/accept // 'assert' by reference; can't apply it unconditionally -- apparently it // degrades the quality of GCC diagnostics #if BOOST_WORKAROUND(BOOST_MSVC, == 1310) # define AUX778076_ASSERT_ARG(x) x& #else # define AUX778076_ASSERT_ARG(x) x #endif template< bool C > struct assert { typedef void* type; }; template<> struct assert { typedef AUX778076_ASSERT_ARG(assert) type; }; template< bool C > int assertion_failed( typename assert::type ); template< bool C > struct assertion { static int failed( assert ); }; template<> struct assertion { static int failed( void* ); }; struct assert_ { #if !defined(BOOST_MPL_CFG_NO_DEFAULT_PARAMETERS_IN_NESTED_TEMPLATES) template< typename T1, typename T2 = na, typename T3 = na, typename T4 = na > struct types {}; #endif static assert_ const arg; enum relations { equal = 1, not_equal, greater, greater_equal, less, less_equal }; }; #if !defined(BOOST_MPL_CFG_ASSERT_USE_RELATION_NAMES) bool operator==( failed, failed ); bool operator!=( failed, failed ); bool operator>( failed, failed ); bool operator>=( failed, failed ); bool operator<( failed, failed ); bool operator<=( failed, failed ); #if defined(__EDG_VERSION__) template< bool (*)(failed, failed), long x, long y > struct assert_relation {}; # define BOOST_MPL_AUX_ASSERT_RELATION(x, y, r) assert_relation #else template< BOOST_MPL_AUX_NTTP_DECL(long, x), BOOST_MPL_AUX_NTTP_DECL(long, y), bool (*)(failed, failed) > struct assert_relation {}; # define BOOST_MPL_AUX_ASSERT_RELATION(x, y, r) assert_relation #endif #else // BOOST_MPL_CFG_ASSERT_USE_RELATION_NAMES boost::mpl::aux::weighted_tag<1>::type operator==( assert_, assert_ ); boost::mpl::aux::weighted_tag<2>::type operator!=( assert_, assert_ ); boost::mpl::aux::weighted_tag<3>::type operator>( assert_, assert_ ); boost::mpl::aux::weighted_tag<4>::type operator>=( assert_, assert_ ); boost::mpl::aux::weighted_tag<5>::type operator<( assert_, assert_ ); boost::mpl::aux::weighted_tag<6>::type operator<=( assert_, assert_ ); template< assert_::relations r, long x, long y > struct assert_relation {}; #endif #if BOOST_WORKAROUND(BOOST_MSVC, == 1700) template struct extract_assert_pred; template struct extract_assert_pred { typedef Pred type; }; template struct eval_assert { typedef typename extract_assert_pred::type P; typedef typename P::type p_type; typedef typename ::boost::mpl::if_c), failed ************ P::************ >::type type; }; template struct eval_assert_not { typedef typename extract_assert_pred::type P; typedef typename P::type p_type; typedef typename ::boost::mpl::if_c), failed ************ ::boost::mpl::not_

::************ >::type type; }; template< typename T > T make_assert_arg(); #elif !defined(BOOST_MPL_CFG_ASSERT_BROKEN_POINTER_TO_POINTER_TO_MEMBER) template< bool > struct assert_arg_pred_impl { typedef int type; }; template<> struct assert_arg_pred_impl { typedef void* type; }; template< typename P > struct assert_arg_pred { typedef typename P::type p_type; typedef typename assert_arg_pred_impl< p_type::value >::type type; }; template< typename P > struct assert_arg_pred_not { typedef typename P::type p_type; BOOST_MPL_AUX_ASSERT_CONSTANT( bool, p = !p_type::value ); typedef typename assert_arg_pred_impl

::type type; }; template< typename Pred > failed ************ (Pred::************ assert_arg( void (*)(Pred), typename assert_arg_pred::type ) ); template< typename Pred > failed ************ (boost::mpl::not_::************ assert_not_arg( void (*)(Pred), typename assert_arg_pred_not::type ) ); template< typename Pred > AUX778076_ASSERT_ARG(assert) assert_arg( void (*)(Pred), typename assert_arg_pred_not::type ); template< typename Pred > AUX778076_ASSERT_ARG(assert) assert_not_arg( void (*)(Pred), typename assert_arg_pred::type ); #else // BOOST_MPL_CFG_ASSERT_BROKEN_POINTER_TO_POINTER_TO_MEMBER template< bool c, typename Pred > struct assert_arg_type_impl { typedef failed ************ Pred::* mwcw83_wknd; typedef mwcw83_wknd ************* type; }; template< typename Pred > struct assert_arg_type_impl { typedef AUX778076_ASSERT_ARG(assert) type; }; template< typename Pred > struct assert_arg_type : assert_arg_type_impl< BOOST_MPL_AUX_VALUE_WKND(BOOST_MPL_AUX_NESTED_TYPE_WKND(Pred))::value, Pred > { }; template< typename Pred > typename assert_arg_type::type assert_arg(void (*)(Pred), int); template< typename Pred > typename assert_arg_type< boost::mpl::not_ >::type assert_not_arg(void (*)(Pred), int); # if !defined(BOOST_MPL_CFG_ASSERT_USE_RELATION_NAMES) template< long x, long y, bool (*r)(failed, failed) > typename assert_arg_type_impl< false,BOOST_MPL_AUX_ASSERT_RELATION(x,y,r) >::type assert_rel_arg( BOOST_MPL_AUX_ASSERT_RELATION(x,y,r) ); # else template< assert_::relations r, long x, long y > typename assert_arg_type_impl< false,assert_relation >::type assert_rel_arg( assert_relation ); # endif #endif // BOOST_MPL_CFG_ASSERT_BROKEN_POINTER_TO_POINTER_TO_MEMBER #undef AUX778076_ASSERT_ARG BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE #if BOOST_WORKAROUND(BOOST_MSVC, == 1700) // BOOST_MPL_ASSERT((pred)) #define BOOST_MPL_ASSERT(pred) \ BOOST_MPL_AUX_ASSERT_CONSTANT( \ std::size_t \ , BOOST_PP_CAT(mpl_assertion_in_line_,BOOST_MPL_AUX_PP_COUNTER()) = sizeof( \ boost::mpl::assertion_failed( \ boost::mpl::make_assert_arg< \ typename boost::mpl::eval_assert::type \ >() \ ) \ ) \ ) \ /**/ // BOOST_MPL_ASSERT_NOT((pred)) #define BOOST_MPL_ASSERT_NOT(pred) \ BOOST_MPL_AUX_ASSERT_CONSTANT( \ std::size_t \ , BOOST_PP_CAT(mpl_assertion_in_line_,BOOST_MPL_AUX_PP_COUNTER()) = sizeof( \ boost::mpl::assertion_failed( \ boost::mpl::make_assert_arg< \ typename boost::mpl::eval_assert_not::type \ >() \ ) \ ) \ ) \ /**/ #else // BOOST_MPL_ASSERT((pred)) #define BOOST_MPL_ASSERT(pred) \ BOOST_MPL_AUX_ASSERT_CONSTANT( \ std::size_t \ , BOOST_PP_CAT(mpl_assertion_in_line_,BOOST_MPL_AUX_PP_COUNTER()) = sizeof( \ boost::mpl::assertion_failed( \ boost::mpl::assert_arg( (void (*) pred)0, 1 ) \ ) \ ) \ ) \ /**/ // BOOST_MPL_ASSERT_NOT((pred)) #if BOOST_WORKAROUND(BOOST_MSVC, <= 1300) # define BOOST_MPL_ASSERT_NOT(pred) \ enum { \ BOOST_PP_CAT(mpl_assertion_in_line_,BOOST_MPL_AUX_PP_COUNTER()) = sizeof( \ boost::mpl::assertion::failed( \ boost::mpl::assert_not_arg( (void (*) pred)0, 1 ) \ ) \ ) \ }\ /**/ #else # define BOOST_MPL_ASSERT_NOT(pred) \ BOOST_MPL_AUX_ASSERT_CONSTANT( \ std::size_t \ , BOOST_PP_CAT(mpl_assertion_in_line_,BOOST_MPL_AUX_PP_COUNTER()) = sizeof( \ boost::mpl::assertion_failed( \ boost::mpl::assert_not_arg( (void (*) pred)0, 1 ) \ ) \ ) \ ) \ /**/ #endif #endif // BOOST_MPL_ASSERT_RELATION(x, ==|!=|<=|<|>=|>, y) #if defined(BOOST_MPL_CFG_ASSERT_USE_RELATION_NAMES) # if !defined(BOOST_MPL_CFG_ASSERT_BROKEN_POINTER_TO_POINTER_TO_MEMBER) // agurt, 9/nov/06: 'enum' below is a workaround for gcc 4.0.4/4.1.1 bugs #29522 and #29518 # define BOOST_MPL_ASSERT_RELATION_IMPL(counter, x, rel, y) \ enum { BOOST_PP_CAT(mpl_assert_rel_value,counter) = (x rel y) }; \ BOOST_MPL_AUX_ASSERT_CONSTANT( \ std::size_t \ , BOOST_PP_CAT(mpl_assertion_in_line_,counter) = sizeof( \ boost::mpl::assertion_failed( \ (boost::mpl::failed ************ ( boost::mpl::assert_relation< \ boost::mpl::assert_::relations( sizeof( \ boost::mpl::assert_::arg rel boost::mpl::assert_::arg \ ) ) \ , x \ , y \ >::************)) 0 ) \ ) \ ) \ /**/ # else # define BOOST_MPL_ASSERT_RELATION_IMPL(counter, x, rel, y) \ BOOST_MPL_AUX_ASSERT_CONSTANT( \ std::size_t \ , BOOST_PP_CAT(mpl_assert_rel,counter) = sizeof( \ boost::mpl::assert_::arg rel boost::mpl::assert_::arg \ ) \ ); \ BOOST_MPL_AUX_ASSERT_CONSTANT( bool, BOOST_PP_CAT(mpl_assert_rel_value,counter) = (x rel y) ); \ BOOST_MPL_AUX_ASSERT_CONSTANT( \ std::size_t \ , BOOST_PP_CAT(mpl_assertion_in_line_,counter) = sizeof( \ boost::mpl::assertion_failed( \ boost::mpl::assert_rel_arg( boost::mpl::assert_relation< \ boost::mpl::assert_::relations(BOOST_PP_CAT(mpl_assert_rel,counter)) \ , x \ , y \ >() ) \ ) \ ) \ ) \ /**/ # endif # define BOOST_MPL_ASSERT_RELATION(x, rel, y) \ BOOST_MPL_ASSERT_RELATION_IMPL(BOOST_MPL_AUX_PP_COUNTER(), x, rel, y) \ /**/ #else // !BOOST_MPL_CFG_ASSERT_USE_RELATION_NAMES # if defined(BOOST_MPL_CFG_ASSERT_BROKEN_POINTER_TO_POINTER_TO_MEMBER) # define BOOST_MPL_ASSERT_RELATION(x, rel, y) \ BOOST_MPL_AUX_ASSERT_CONSTANT( \ std::size_t \ , BOOST_PP_CAT(mpl_assertion_in_line_,BOOST_MPL_AUX_PP_COUNTER()) = sizeof( \ boost::mpl::assertion_failed<(x rel y)>( boost::mpl::assert_rel_arg( \ boost::mpl::BOOST_MPL_AUX_ASSERT_RELATION(x,y,(&boost::mpl::operator rel))() \ ) ) \ ) \ ) \ /**/ # else # define BOOST_MPL_ASSERT_RELATION(x, rel, y) \ BOOST_MPL_AUX_ASSERT_CONSTANT( \ std::size_t \ , BOOST_PP_CAT(mpl_assertion_in_line_,BOOST_MPL_AUX_PP_COUNTER()) = sizeof( \ boost::mpl::assertion_failed<(x rel y)>( (boost::mpl::failed ************ ( \ boost::mpl::BOOST_MPL_AUX_ASSERT_RELATION(x,y,(&boost::mpl::operator rel))::************))0 ) \ ) \ ) \ /**/ # endif #endif // BOOST_MPL_ASSERT_MSG( (pred::value), USER_PROVIDED_MESSAGE, (types) ) #if BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3202)) # define BOOST_MPL_ASSERT_MSG_IMPL( counter, c, msg, types_ ) \ struct msg; \ typedef struct BOOST_PP_CAT(msg,counter) : boost::mpl::assert_ \ { \ using boost::mpl::assert_::types; \ static boost::mpl::failed ************ (msg::************ assert_arg()) types_ \ { return 0; } \ } BOOST_PP_CAT(mpl_assert_arg,counter); \ BOOST_MPL_AUX_ASSERT_CONSTANT( \ std::size_t \ , BOOST_PP_CAT(mpl_assertion_in_line_,counter) = sizeof( \ boost::mpl::assertion<(c)>::failed( BOOST_PP_CAT(mpl_assert_arg,counter)::assert_arg() ) \ ) \ ) \ /**/ #else # define BOOST_MPL_ASSERT_MSG_IMPL( counter, c, msg, types_ ) \ struct msg; \ typedef struct BOOST_PP_CAT(msg,counter) : boost::mpl::assert_ \ { \ static boost::mpl::failed ************ (msg::************ assert_arg()) types_ \ { return 0; } \ } BOOST_PP_CAT(mpl_assert_arg,counter); \ BOOST_MPL_AUX_ASSERT_CONSTANT( \ std::size_t \ , BOOST_PP_CAT(mpl_assertion_in_line_,counter) = sizeof( \ boost::mpl::assertion_failed<(c)>( BOOST_PP_CAT(mpl_assert_arg,counter)::assert_arg() ) \ ) \ ) \ /**/ #endif #define BOOST_MPL_ASSERT_MSG( c, msg, types_ ) \ BOOST_MPL_ASSERT_MSG_IMPL( BOOST_MPL_AUX_PP_COUNTER(), c, msg, types_ ) \ /**/ #endif // BOOST_MPL_ASSERT_HPP_INCLUDED ================================================ FILE: benchmarks/boost/mpl/at_fwd.hpp ================================================ #ifndef BOOST_MPL_AT_FWD_HPP_INCLUDED #define BOOST_MPL_AT_FWD_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ namespace boost { namespace mpl { template< typename Tag > struct at_impl; template< typename Sequence, typename N > struct at; }} #endif // BOOST_MPL_AT_FWD_HPP_INCLUDED ================================================ FILE: benchmarks/boost/mpl/aux_/O1_size_impl.hpp ================================================ #ifndef BOOST_MPL_O1_SIZE_IMPL_HPP_INCLUDED #define BOOST_MPL_O1_SIZE_IMPL_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ #include #include #include #include #include #include #include #include namespace boost { namespace mpl { // default implementation - returns 'Sequence::size' if sequence has a 'size' // member, and -1 otherwise; conrete sequences might override it by // specializing either the 'O1_size_impl' or the primary 'O1_size' template # if !BOOST_WORKAROUND(BOOST_MSVC, < 1300) \ && !BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3003)) namespace aux { template< typename Sequence > struct O1_size_impl : Sequence::size { }; } template< typename Tag > struct O1_size_impl { template< typename Sequence > struct apply #if !defined(BOOST_MPL_CFG_NO_NESTED_FORWARDING) : if_< aux::has_size , aux::O1_size_impl , long_<-1> >::type { #else { typedef typename if_< aux::has_size , aux::O1_size_impl , long_<-1> >::type type; BOOST_STATIC_CONSTANT(long, value = (if_< aux::has_size , aux::O1_size_impl , long_<-1> >::type::value) ); #endif }; }; # else // BOOST_MSVC template< typename Tag > struct O1_size_impl { template< typename Sequence > struct apply : long_<-1> { }; }; # endif }} #endif // BOOST_MPL_O1_SIZE_IMPL_HPP_INCLUDED ================================================ FILE: benchmarks/boost/mpl/aux_/adl_barrier.hpp ================================================ #ifndef BOOST_MPL_AUX_ADL_BARRIER_HPP_INCLUDED #define BOOST_MPL_AUX_ADL_BARRIER_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2002-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ #include #include #include #if !defined(BOOST_MPL_CFG_NO_ADL_BARRIER_NAMESPACE) # define BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE mpl_ # define BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN namespace mpl_ { # define BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE } # define BOOST_MPL_AUX_ADL_BARRIER_DECL(type) \ namespace boost { namespace mpl { \ using ::BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::type; \ } } \ /**/ #if !defined(BOOST_MPL_PREPROCESSING_MODE) namespace BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE { namespace aux {} } namespace boost { namespace mpl { using namespace BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE; namespace aux { using namespace BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::aux; } }} #endif #else // BOOST_MPL_CFG_NO_ADL_BARRIER_NAMESPACE # define BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE boost::mpl # define BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN namespace boost { namespace mpl { # define BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE }} # define BOOST_MPL_AUX_ADL_BARRIER_DECL(type) /**/ #endif #endif // BOOST_MPL_AUX_ADL_BARRIER_HPP_INCLUDED ================================================ FILE: benchmarks/boost/mpl/aux_/arg_typedef.hpp ================================================ #ifndef BOOST_MPL_AUX_ARG_TYPEDEF_HPP_INCLUDED #define BOOST_MPL_AUX_ARG_TYPEDEF_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ #include #include #if defined(BOOST_MPL_CFG_NO_FULL_LAMBDA_SUPPORT) \ || BOOST_WORKAROUND(__DMC__, BOOST_TESTED_AT(0x840)) # define BOOST_MPL_AUX_ARG_TYPEDEF(T, name) typedef T name; #else # define BOOST_MPL_AUX_ARG_TYPEDEF(T, name) /**/ #endif #endif // BOOST_MPL_AUX_ARG_TYPEDEF_HPP_INCLUDED ================================================ FILE: benchmarks/boost/mpl/aux_/arity.hpp ================================================ #ifndef BOOST_MPL_AUX_ARITY_HPP_INCLUDED #define BOOST_MPL_AUX_ARITY_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ #include #if defined(BOOST_MPL_CFG_BROKEN_DEFAULT_PARAMETERS_IN_NESTED_TEMPLATES) # include # include namespace boost { namespace mpl { namespace aux { // agurt, 15/mar/02: it's possible to implement the template so that it will // "just work" and do not require any specialization, but not on the compilers // that require the arity workaround in the first place template< typename F, BOOST_MPL_AUX_NTTP_DECL(int, N) > struct arity { BOOST_STATIC_CONSTANT(int, value = N); }; }}} #endif // BOOST_MPL_CFG_BROKEN_DEFAULT_PARAMETERS_IN_NESTED_TEMPLATES #endif // BOOST_MPL_AUX_ARITY_HPP_INCLUDED ================================================ FILE: benchmarks/boost/mpl/aux_/arity_spec.hpp ================================================ #ifndef BOOST_MPL_AUX_ARITY_SPEC_HPP_INCLUDED #define BOOST_MPL_AUX_ARITY_SPEC_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ #include #include #include #include #include #include #include #include #include #if defined(BOOST_MPL_CFG_BROKEN_DEFAULT_PARAMETERS_IN_NESTED_TEMPLATES) # define BOOST_MPL_AUX_NONTYPE_ARITY_SPEC(i,type,name) \ namespace aux { \ template< BOOST_MPL_AUX_NTTP_DECL(int, N), BOOST_MPL_PP_PARAMS(i,type T) > \ struct arity< \ name< BOOST_MPL_PP_PARAMS(i,T) > \ , N \ > \ { \ BOOST_STATIC_CONSTANT(int \ , value = BOOST_MPL_LIMIT_METAFUNCTION_ARITY \ ); \ }; \ } \ /**/ #else # define BOOST_MPL_AUX_NONTYPE_ARITY_SPEC(i,type,name) /**/ #endif # define BOOST_MPL_AUX_ARITY_SPEC(i,name) \ BOOST_MPL_AUX_NONTYPE_ARITY_SPEC(i,typename,name) \ /**/ #if defined(BOOST_MPL_CFG_EXTENDED_TEMPLATE_PARAMETERS_MATCHING) \ && !defined(BOOST_MPL_CFG_NO_FULL_LAMBDA_SUPPORT) # define BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(i, name) \ namespace aux { \ template< BOOST_MPL_PP_PARAMS(i,typename T) > \ struct template_arity< name > \ : int_ \ { \ }; \ } \ /**/ #else # define BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(i, name) /**/ #endif #endif // BOOST_MPL_AUX_ARITY_SPEC_HPP_INCLUDED ================================================ FILE: benchmarks/boost/mpl/aux_/begin_end_impl.hpp ================================================ #ifndef BOOST_MPL_AUX_BEGIN_END_IMPL_HPP_INCLUDED #define BOOST_MPL_AUX_BEGIN_END_IMPL_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ #include #include #include #include #include #include #include #include namespace boost { namespace mpl { namespace aux { template< typename Sequence > struct begin_type { typedef typename Sequence::begin type; }; template< typename Sequence > struct end_type { typedef typename Sequence::end type; }; } // default implementation; conrete sequences might override it by // specializing either the 'begin_impl/end_impl' or the primary // 'begin/end' templates template< typename Tag > struct begin_impl { template< typename Sequence > struct apply { typedef typename eval_if, aux::begin_type, void_>::type type; }; }; template< typename Tag > struct end_impl { template< typename Sequence > struct apply { typedef typename eval_if, aux::end_type, void_>::type type; }; }; // specialize 'begin_trait/end_trait' for two pre-defined tags # define AUX778076_IMPL_SPEC(name, tag, result) \ template<> \ struct name##_impl \ { \ template< typename Sequence > struct apply \ { \ typedef result type; \ }; \ }; \ /**/ // a sequence with nested 'begin/end' typedefs; just query them AUX778076_IMPL_SPEC(begin, nested_begin_end_tag, typename Sequence::begin) AUX778076_IMPL_SPEC(end, nested_begin_end_tag, typename Sequence::end) // if a type 'T' does not contain 'begin/end' or 'tag' members // and doesn't specialize either 'begin/end' or 'begin_impl/end_impl' // templates, then we end up here AUX778076_IMPL_SPEC(begin, non_sequence_tag, void_) AUX778076_IMPL_SPEC(end, non_sequence_tag, void_) AUX778076_IMPL_SPEC(begin, na, void_) AUX778076_IMPL_SPEC(end, na, void_) # undef AUX778076_IMPL_SPEC BOOST_MPL_ALGORITM_TRAITS_LAMBDA_SPEC_IMPL(1,begin_impl) BOOST_MPL_ALGORITM_TRAITS_LAMBDA_SPEC_IMPL(1,end_impl) }} #endif // BOOST_MPL_AUX_BEGIN_END_IMPL_HPP_INCLUDED ================================================ FILE: benchmarks/boost/mpl/aux_/clear_impl.hpp ================================================ #ifndef BOOST_MPL_AUX_CLEAR_IMPL_HPP_INCLUDED #define BOOST_MPL_AUX_CLEAR_IMPL_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ #include #include #include namespace boost { namespace mpl { // no default implementation; the definition is needed to make MSVC happy template< typename Tag > struct clear_impl { template< typename Sequence > struct apply; }; BOOST_MPL_ALGORITM_TRAITS_LAMBDA_SPEC(1, clear_impl) }} #endif // BOOST_MPL_AUX_CLEAR_IMPL_HPP_INCLUDED ================================================ FILE: benchmarks/boost/mpl/aux_/common_name_wknd.hpp ================================================ #ifndef BOOST_MPL_AUX_COMMON_NAME_WKND_HPP_INCLUDED #define BOOST_MPL_AUX_COMMON_NAME_WKND_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2002-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ #include #if BOOST_WORKAROUND(__BORLANDC__, < 0x561) // agurt, 12/nov/02: to suppress the bogus "Cannot have both a template class // and function named 'xxx'" diagnostic # define BOOST_MPL_AUX_COMMON_NAME_WKND(name) \ namespace name_##wknd { \ template< typename > void name(); \ } \ /**/ #else # define BOOST_MPL_AUX_COMMON_NAME_WKND(name) /**/ #endif // __BORLANDC__ #endif // BOOST_MPL_AUX_COMMON_NAME_WKND_HPP_INCLUDED ================================================ FILE: benchmarks/boost/mpl/aux_/config/adl.hpp ================================================ #ifndef BOOST_MPL_AUX_CONFIG_ADL_HPP_INCLUDED #define BOOST_MPL_AUX_CONFIG_ADL_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2002-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ #include #include #include #include // agurt, 25/apr/04: technically, the ADL workaround is only needed for GCC, // but putting everything expect public, user-specializable metafunctions into // a separate global namespace has a nice side effect of reducing the length // of template instantiation symbols, so we apply the workaround on all // platforms that can handle it #if !defined(BOOST_MPL_CFG_NO_ADL_BARRIER_NAMESPACE) \ && ( BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1400)) \ || BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x610)) \ || BOOST_WORKAROUND(__DMC__, BOOST_TESTED_AT(0x840)) \ || BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3202)) \ || BOOST_WORKAROUND(BOOST_INTEL_CXX_VERSION, BOOST_TESTED_AT(810)) \ ) # define BOOST_MPL_CFG_NO_ADL_BARRIER_NAMESPACE #endif #endif // BOOST_MPL_AUX_CONFIG_ADL_HPP_INCLUDED ================================================ FILE: benchmarks/boost/mpl/aux_/config/arrays.hpp ================================================ #ifndef BOOST_MPL_AUX_CONFIG_ARRAYS_HPP_INCLUDED #define BOOST_MPL_AUX_CONFIG_ARRAYS_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2003-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ #include #include #if !defined(BOOST_MPL_CFG_NO_DEPENDENT_ARRAY_TYPES) \ && !defined(BOOST_MPL_PREPROCESSING_MODE) \ && ( BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x610)) \ || BOOST_WORKAROUND(BOOST_MSVC, <= 1300) \ ) # define BOOST_MPL_CFG_NO_DEPENDENT_ARRAY_TYPES #endif #endif // BOOST_MPL_AUX_CONFIG_ARRAYS_HPP_INCLUDED ================================================ FILE: benchmarks/boost/mpl/aux_/config/bcc.hpp ================================================ #ifndef BOOST_MPL_AUX_CONFIG_BCC_HPP_INCLUDED #define BOOST_MPL_AUX_CONFIG_BCC_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2008 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date: 2004-09-02 10:41:37 -0500 (Thu, 02 Sep 2004) $ // $Revision: 24874 $ #include #if !defined(BOOST_MPL_CFG_BCC590_WORKAROUNDS) \ && !defined(BOOST_MPL_PREPROCESSING_MODE) \ && BOOST_WORKAROUND(__BORLANDC__, >= 0x590) \ && BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x610)) # define BOOST_MPL_CFG_BCC590_WORKAROUNDS #endif #endif // BOOST_MPL_AUX_CONFIG_BCC_HPP_INCLUDED ================================================ FILE: benchmarks/boost/mpl/aux_/config/bind.hpp ================================================ #ifndef BOOST_MPL_AUX_CONFIG_BIND_HPP_INCLUDED #define BOOST_MPL_AUX_CONFIG_BIND_HPP_INCLUDED // Copyright David Abrahams 2002 // Copyright Aleksey Gurtovoy 2002-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ #include #include #if !defined(BOOST_MPL_CFG_NO_BIND_TEMPLATE) \ && !defined(BOOST_MPL_PREPROCESSING_MODE) \ && ( BOOST_WORKAROUND(BOOST_MSVC, <= 1300) \ || BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x610)) \ ) # define BOOST_MPL_CFG_NO_BIND_TEMPLATE #endif //#define BOOST_MPL_CFG_NO_UNNAMED_PLACEHOLDER_SUPPORT #endif // BOOST_MPL_AUX_CONFIG_BIND_HPP_INCLUDED ================================================ FILE: benchmarks/boost/mpl/aux_/config/compiler.hpp ================================================ #ifndef BOOST_MPL_AUX_CONFIG_COMPILER_HPP_INCLUDED #define BOOST_MPL_AUX_CONFIG_COMPILER_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2001-2008 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ #if !defined(BOOST_MPL_CFG_COMPILER_DIR) # include # include # include # include # include # include # if BOOST_WORKAROUND(BOOST_MSVC, < 1300) # define BOOST_MPL_CFG_COMPILER_DIR msvc60 # elif BOOST_WORKAROUND(BOOST_MSVC, == 1300) # define BOOST_MPL_CFG_COMPILER_DIR msvc70 # elif BOOST_WORKAROUND(BOOST_MPL_CFG_GCC, BOOST_TESTED_AT(0x0304)) # define BOOST_MPL_CFG_COMPILER_DIR gcc # elif BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x610)) # if !defined(BOOST_MPL_CFG_NO_DEFAULT_PARAMETERS_IN_NESTED_TEMPLATES) # define BOOST_MPL_CFG_COMPILER_DIR bcc551 # elif BOOST_WORKAROUND(__BORLANDC__, >= 0x590) # define BOOST_MPL_CFG_COMPILER_DIR bcc # else # define BOOST_MPL_CFG_COMPILER_DIR bcc_pre590 # endif # elif BOOST_WORKAROUND(__DMC__, BOOST_TESTED_AT(0x840)) # define BOOST_MPL_CFG_COMPILER_DIR dmc # elif defined(__MWERKS__) # if defined(BOOST_MPL_CFG_BROKEN_DEFAULT_PARAMETERS_IN_NESTED_TEMPLATES) # define BOOST_MPL_CFG_COMPILER_DIR mwcw # else # define BOOST_MPL_CFG_COMPILER_DIR plain # endif # elif defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) # define BOOST_MPL_CFG_COMPILER_DIR no_ctps # elif defined(BOOST_MPL_CFG_NO_TEMPLATE_TEMPLATE_PARAMETERS) # define BOOST_MPL_CFG_COMPILER_DIR no_ttp # else # define BOOST_MPL_CFG_COMPILER_DIR plain # endif #endif // BOOST_MPL_CFG_COMPILER_DIR #endif // BOOST_MPL_AUX_CONFIG_COMPILER_HPP_INCLUDED ================================================ FILE: benchmarks/boost/mpl/aux_/config/ctps.hpp ================================================ #ifndef BOOST_MPL_AUX_CONFIG_CTPS_HPP_INCLUDED #define BOOST_MPL_AUX_CONFIG_CTPS_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ #include #include #if !defined(BOOST_MPL_CFG_NO_NONTYPE_TEMPLATE_PARTIAL_SPEC) \ && !defined(BOOST_MPL_PREPROCESSING_MODE) \ && BOOST_WORKAROUND(__BORLANDC__, < 0x582) # define BOOST_MPL_CFG_NO_NONTYPE_TEMPLATE_PARTIAL_SPEC #endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION is defined in #endif // BOOST_MPL_AUX_CONFIG_CTPS_HPP_INCLUDED ================================================ FILE: benchmarks/boost/mpl/aux_/config/dmc_ambiguous_ctps.hpp ================================================ #ifndef BOOST_MPL_AUX_CONFIG_DMC_AMBIGUOUS_CTPS_HPP_INCLUDED #define BOOST_MPL_AUX_CONFIG_DMC_AMBIGUOUS_CTPS_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ #include #if !defined(BOOST_MPL_CFG_DMC_AMBIGUOUS_CTPS) \ && !defined(BOOST_MPL_PREPROCESSING_MODE) \ && BOOST_WORKAROUND(__DMC__, BOOST_TESTED_AT(0x840)) # define BOOST_MPL_CFG_DMC_AMBIGUOUS_CTPS #endif #endif // BOOST_MPL_AUX_CONFIG_DMC_AMBIGUOUS_CTPS_HPP_INCLUDED ================================================ FILE: benchmarks/boost/mpl/aux_/config/dtp.hpp ================================================ #ifndef BOOST_MPL_AUX_CONFIG_DTP_HPP_INCLUDED #define BOOST_MPL_AUX_CONFIG_DTP_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ #include // MWCW 7.x-8.0 "losts" default template parameters of nested class // templates when their owner classes are passed as arguments to other // templates; Borland 5.5.1 "forgets" them from the very beginning (if // the owner class is a class template), and Borland 5.6 isn't even // able to compile a definition of nested class template with DTP #if !defined(BOOST_MPL_CFG_NO_DEFAULT_PARAMETERS_IN_NESTED_TEMPLATES) \ && !defined(BOOST_MPL_PREPROCESSING_MODE) \ && BOOST_WORKAROUND(__BORLANDC__, >= 0x560) \ && BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x610)) # define BOOST_MPL_CFG_NO_DEFAULT_PARAMETERS_IN_NESTED_TEMPLATES #endif #if !defined(BOOST_MPL_CFG_BROKEN_DEFAULT_PARAMETERS_IN_NESTED_TEMPLATES) \ && !defined(BOOST_MPL_PREPROCESSING_MODE) \ && ( BOOST_WORKAROUND(__MWERKS__, <= 0x3001) \ || BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x610)) \ || defined(BOOST_MPL_CFG_NO_DEFAULT_PARAMETERS_IN_NESTED_TEMPLATES) \ ) # define BOOST_MPL_CFG_BROKEN_DEFAULT_PARAMETERS_IN_NESTED_TEMPLATES #endif #endif // BOOST_MPL_AUX_CONFIG_DTP_HPP_INCLUDED ================================================ FILE: benchmarks/boost/mpl/aux_/config/eti.hpp ================================================ #ifndef BOOST_MPL_AUX_CONFIG_ETI_HPP_INCLUDED #define BOOST_MPL_AUX_CONFIG_ETI_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ #include #include // flags for MSVC 6.5's so-called "early template instantiation bug" #if !defined(BOOST_MPL_CFG_MSVC_60_ETI_BUG) \ && !defined(BOOST_MPL_PREPROCESSING_MODE) \ && BOOST_WORKAROUND(BOOST_MSVC, < 1300) # define BOOST_MPL_CFG_MSVC_60_ETI_BUG #endif #if !defined(BOOST_MPL_CFG_MSVC_70_ETI_BUG) \ && !defined(BOOST_MPL_PREPROCESSING_MODE) \ && BOOST_WORKAROUND(BOOST_MSVC, == 1300) # define BOOST_MPL_CFG_MSVC_70_ETI_BUG #endif #if !defined(BOOST_MPL_CFG_MSVC_ETI_BUG) \ && !defined(BOOST_MPL_PREPROCESSING_MODE) \ && ( defined(BOOST_MPL_CFG_MSVC_60_ETI_BUG) \ || defined(BOOST_MPL_CFG_MSVC_70_ETI_BUG) \ ) # define BOOST_MPL_CFG_MSVC_ETI_BUG #endif #endif // BOOST_MPL_AUX_CONFIG_ETI_HPP_INCLUDED ================================================ FILE: benchmarks/boost/mpl/aux_/config/forwarding.hpp ================================================ #ifndef BOOST_MPL_AUX_CONFIG_FORWARDING_HPP_INCLUDED #define BOOST_MPL_AUX_CONFIG_FORWARDING_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ #include #if !defined(BOOST_MPL_CFG_NO_NESTED_FORWARDING) \ && !defined(BOOST_MPL_PREPROCESSING_MODE) \ && BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x610)) # define BOOST_MPL_CFG_NO_NESTED_FORWARDING #endif #endif // BOOST_MPL_AUX_CONFIG_FORWARDING_HPP_INCLUDED ================================================ FILE: benchmarks/boost/mpl/aux_/config/gcc.hpp ================================================ #ifndef BOOST_MPL_AUX_CONFIG_GCC_HPP_INCLUDED #define BOOST_MPL_AUX_CONFIG_GCC_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ #if defined(__GNUC__) && !defined(__EDG_VERSION__) # define BOOST_MPL_CFG_GCC ((__GNUC__ << 8) | __GNUC_MINOR__) #else # define BOOST_MPL_CFG_GCC 0 #endif #endif // BOOST_MPL_AUX_CONFIG_GCC_HPP_INCLUDED ================================================ FILE: benchmarks/boost/mpl/aux_/config/gpu.hpp ================================================ #ifndef BOOST_MPL_AUX_CONFIG_GPU_HPP_INCLUDED #define BOOST_MPL_AUX_CONFIG_GPU_HPP_INCLUDED // Copyright Eric Niebler 2014 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ #include #if !defined(BOOST_MPL_CFG_GPU_ENABLED) \ # define BOOST_MPL_CFG_GPU_ENABLED BOOST_GPU_ENABLED #endif #if defined __CUDACC__ # define BOOST_MPL_CFG_GPU 1 #else # define BOOST_MPL_CFG_GPU 0 #endif #endif // BOOST_MPL_AUX_CONFIG_GPU_HPP_INCLUDED ================================================ FILE: benchmarks/boost/mpl/aux_/config/has_apply.hpp ================================================ #ifndef BOOST_MPL_AUX_CONFIG_HAS_APPLY_HPP_INCLUDED #define BOOST_MPL_AUX_CONFIG_HAS_APPLY_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ #include #include #include #if !defined(BOOST_MPL_CFG_NO_HAS_APPLY) \ && ( defined(BOOST_MPL_CFG_NO_HAS_XXX) \ || BOOST_WORKAROUND(__EDG_VERSION__, < 300) \ || BOOST_WORKAROUND(BOOST_MSVC, <= 1300) \ || BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3202)) \ ) # define BOOST_MPL_CFG_NO_HAS_APPLY #endif #endif // BOOST_MPL_AUX_CONFIG_HAS_APPLY_HPP_INCLUDED ================================================ FILE: benchmarks/boost/mpl/aux_/config/has_xxx.hpp ================================================ #ifndef BOOST_MPL_AUX_CONFIG_HAS_XXX_HPP_INCLUDED #define BOOST_MPL_AUX_CONFIG_HAS_XXX_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2002-2004 // Copyright David Abrahams 2002-2003 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ #include #include // agurt, 11/jan/03: signals a stub-only 'has_xxx' implementation #if !defined(BOOST_MPL_CFG_NO_HAS_XXX) \ && ( defined(BOOST_MPL_CFG_BROKEN_OVERLOAD_RESOLUTION) \ || BOOST_WORKAROUND(__GNUC__, <= 2) \ || BOOST_WORKAROUND(__DMC__, BOOST_TESTED_AT(0x840)) \ ) # define BOOST_MPL_CFG_NO_HAS_XXX # define BOOST_MPL_CFG_NO_HAS_XXX_TEMPLATE #endif #endif // BOOST_MPL_AUX_CONFIG_HAS_XXX_HPP_INCLUDED ================================================ FILE: benchmarks/boost/mpl/aux_/config/integral.hpp ================================================ #ifndef BOOST_MPL_AUX_CONFIG_INTEGRAL_HPP_INCLUDED #define BOOST_MPL_AUX_CONFIG_INTEGRAL_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ #include #include #if !defined(BOOST_MPL_CFG_BCC_INTEGRAL_CONSTANTS) \ && !defined(BOOST_MPL_PREPROCESSING_MODE) \ && BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x610)) # define BOOST_MPL_CFG_BCC_INTEGRAL_CONSTANTS #endif #if !defined(BOOST_MPL_CFG_NO_NESTED_VALUE_ARITHMETIC) \ && !defined(BOOST_MPL_PREPROCESSING_MODE) \ && ( BOOST_WORKAROUND(BOOST_MSVC, <= 1300) \ || BOOST_WORKAROUND(__EDG_VERSION__, <= 238) \ ) # define BOOST_MPL_CFG_NO_NESTED_VALUE_ARITHMETIC #endif #endif // BOOST_MPL_AUX_CONFIG_INTEGRAL_HPP_INCLUDED ================================================ FILE: benchmarks/boost/mpl/aux_/config/intel.hpp ================================================ #ifndef BOOST_MPL_AUX_CONFIG_INTEL_HPP_INCLUDED #define BOOST_MPL_AUX_CONFIG_INTEL_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ // BOOST_INTEL_CXX_VERSION is defined here: #include #endif // BOOST_MPL_AUX_CONFIG_INTEL_HPP_INCLUDED ================================================ FILE: benchmarks/boost/mpl/aux_/config/lambda.hpp ================================================ #ifndef BOOST_MPL_AUX_CONFIG_LAMBDA_HPP_INCLUDED #define BOOST_MPL_AUX_CONFIG_LAMBDA_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2002-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ #include #include // agurt, 15/jan/02: full-fledged implementation requires both // template template parameters _and_ partial specialization #if !defined(BOOST_MPL_CFG_NO_FULL_LAMBDA_SUPPORT) \ && ( defined(BOOST_MPL_CFG_NO_TEMPLATE_TEMPLATE_PARAMETERS) \ || defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \ ) # define BOOST_MPL_CFG_NO_FULL_LAMBDA_SUPPORT #endif #endif // BOOST_MPL_AUX_CONFIG_LAMBDA_HPP_INCLUDED ================================================ FILE: benchmarks/boost/mpl/aux_/config/msvc.hpp ================================================ #ifndef BOOST_MPL_AUX_CONFIG_MSVC_HPP_INCLUDED #define BOOST_MPL_AUX_CONFIG_MSVC_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2002-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ // BOOST_MSVC is defined here: #include #endif // BOOST_MPL_AUX_CONFIG_MSVC_HPP_INCLUDED ================================================ FILE: benchmarks/boost/mpl/aux_/config/msvc_typename.hpp ================================================ #ifndef BOOST_MPL_AUX_CONFIG_MSVC_TYPENAME_HPP_INCLUDED #define BOOST_MPL_AUX_CONFIG_MSVC_TYPENAME_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ #include #include #if BOOST_WORKAROUND(BOOST_MSVC, <= 1300) # define BOOST_MSVC_TYPENAME #else # define BOOST_MSVC_TYPENAME typename #endif #endif // BOOST_MPL_AUX_CONFIG_MSVC_TYPENAME_HPP_INCLUDED ================================================ FILE: benchmarks/boost/mpl/aux_/config/nttp.hpp ================================================ #ifndef BOOST_MPL_AUX_CONFIG_NTTP_HPP_INCLUDED #define BOOST_MPL_AUX_CONFIG_NTTP_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ #include #include // MSVC 6.5 ICE-s on the code as simple as this (see "aux_/nttp_decl.hpp" // for a workaround): // // namespace std { // template< typename Char > struct string; // } // // void foo(std::string); // // namespace boost { namespace mpl { // template< int > struct arg; // }} #if !defined(BOOST_MPL_CFG_NTTP_BUG) \ && !defined(BOOST_MPL_PREPROCESSING_MODE) \ && BOOST_WORKAROUND(BOOST_MSVC, < 1300) # define BOOST_MPL_CFG_NTTP_BUG #endif #endif // BOOST_MPL_AUX_CONFIG_NTTP_HPP_INCLUDED ================================================ FILE: benchmarks/boost/mpl/aux_/config/operators.hpp ================================================ #ifndef BOOST_MPL_AUX_CONFIG_OPERATORS_HPP_INCLUDED #define BOOST_MPL_AUX_CONFIG_OPERATORS_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2003-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ #include #include #include #if !defined(BOOST_MPL_CFG_USE_OPERATORS_OVERLOADING) \ && ( BOOST_WORKAROUND(BOOST_MSVC, <= 1300) \ || BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x610)) \ || BOOST_WORKAROUND(__EDG_VERSION__, <= 245) \ || BOOST_WORKAROUND(BOOST_MPL_CFG_GCC, <= 0x0295) \ || BOOST_WORKAROUND(__IBMCPP__, BOOST_TESTED_AT(600)) \ || BOOST_WORKAROUND(__NVCC__, BOOST_TESTED_AT(1)) \ ) # define BOOST_MPL_CFG_USE_OPERATORS_OVERLOADING #endif #endif // BOOST_MPL_AUX_CONFIG_OPERATORS_HPP_INCLUDED ================================================ FILE: benchmarks/boost/mpl/aux_/config/overload_resolution.hpp ================================================ #ifndef BOOST_MPL_AUX_CONFIG_OVERLOAD_RESOLUTION_HPP_INCLUDED #define BOOST_MPL_AUX_CONFIG_OVERLOAD_RESOLUTION_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2002-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ #include #if !defined(BOOST_MPL_CFG_BROKEN_OVERLOAD_RESOLUTION) \ && !defined(BOOST_MPL_PREPROCESSING_MODE) \ && ( BOOST_WORKAROUND(__BORLANDC__, < 0x590) \ || BOOST_WORKAROUND(__MWERKS__, < 0x3001) \ ) # define BOOST_MPL_CFG_BROKEN_OVERLOAD_RESOLUTION #endif #endif // BOOST_MPL_AUX_CONFIG_OVERLOAD_RESOLUTION_HPP_INCLUDED ================================================ FILE: benchmarks/boost/mpl/aux_/config/pp_counter.hpp ================================================ #ifndef BOOST_MPL_AUX_CONFIG_PP_COUNTER_HPP_INCLUDED #define BOOST_MPL_AUX_CONFIG_PP_COUNTER_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2006 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ #if !defined(BOOST_MPL_AUX_PP_COUNTER) # include # if BOOST_WORKAROUND(BOOST_MSVC, >= 1300) # define BOOST_MPL_AUX_PP_COUNTER() __COUNTER__ # else # define BOOST_MPL_AUX_PP_COUNTER() __LINE__ # endif #endif #endif // BOOST_MPL_AUX_CONFIG_PP_COUNTER_HPP_INCLUDED ================================================ FILE: benchmarks/boost/mpl/aux_/config/preprocessor.hpp ================================================ #ifndef BOOST_MPL_AUX_CONFIG_PREPROCESSOR_HPP_INCLUDED #define BOOST_MPL_AUX_CONFIG_PREPROCESSOR_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ #include #if !defined(BOOST_MPL_CFG_BROKEN_PP_MACRO_EXPANSION) \ && ( BOOST_WORKAROUND(__MWERKS__, <= 0x3003) \ || BOOST_WORKAROUND(__BORLANDC__, < 0x582) \ || BOOST_WORKAROUND(__IBMCPP__, BOOST_TESTED_AT(502)) \ ) # define BOOST_MPL_CFG_BROKEN_PP_MACRO_EXPANSION #endif #if !defined(BOOST_MPL_CFG_NO_OWN_PP_PRIMITIVES) # define BOOST_MPL_CFG_NO_OWN_PP_PRIMITIVES #endif #if !defined(BOOST_NEEDS_TOKEN_PASTING_OP_FOR_TOKENS_JUXTAPOSING) \ && BOOST_WORKAROUND(__DMC__, BOOST_TESTED_AT(0x840)) # define BOOST_NEEDS_TOKEN_PASTING_OP_FOR_TOKENS_JUXTAPOSING #endif #endif // BOOST_MPL_AUX_CONFIG_PREPROCESSOR_HPP_INCLUDED ================================================ FILE: benchmarks/boost/mpl/aux_/config/static_constant.hpp ================================================ #ifndef BOOST_MPL_AUX_CONFIG_STATIC_CONSTANT_HPP_INCLUDED #define BOOST_MPL_AUX_CONFIG_STATIC_CONSTANT_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ #if !defined(BOOST_MPL_PREPROCESSING_MODE) // BOOST_STATIC_CONSTANT is defined here: # include #else // undef the macro for the preprocessing mode # undef BOOST_STATIC_CONSTANT #endif #endif // BOOST_MPL_AUX_CONFIG_STATIC_CONSTANT_HPP_INCLUDED ================================================ FILE: benchmarks/boost/mpl/aux_/config/ttp.hpp ================================================ #ifndef BOOST_MPL_AUX_CONFIG_TTP_HPP_INCLUDED #define BOOST_MPL_AUX_CONFIG_TTP_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ #include #include #include #if !defined(BOOST_MPL_CFG_NO_TEMPLATE_TEMPLATE_PARAMETERS) \ && ( defined(BOOST_NO_TEMPLATE_TEMPLATES) \ || BOOST_WORKAROUND( __BORLANDC__, BOOST_TESTED_AT( 0x590) ) \ ) # define BOOST_MPL_CFG_NO_TEMPLATE_TEMPLATE_PARAMETERS #endif #if !defined(BOOST_MPL_CFG_EXTENDED_TEMPLATE_PARAMETERS_MATCHING) \ && !defined(BOOST_MPL_PREPROCESSING_MODE) \ && ( BOOST_WORKAROUND(BOOST_MPL_CFG_GCC, BOOST_TESTED_AT(0x0302)) \ || BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x610)) \ ) # define BOOST_MPL_CFG_EXTENDED_TEMPLATE_PARAMETERS_MATCHING #endif #endif // BOOST_MPL_AUX_CONFIG_TTP_HPP_INCLUDED ================================================ FILE: benchmarks/boost/mpl/aux_/config/use_preprocessed.hpp ================================================ #ifndef BOOST_MPL_AUX_CONFIG_USE_PREPROCESSED_HPP_INCLUDED #define BOOST_MPL_AUX_CONFIG_USE_PREPROCESSED_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ // #define BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS #endif // BOOST_MPL_AUX_CONFIG_USE_PREPROCESSED_HPP_INCLUDED ================================================ FILE: benchmarks/boost/mpl/aux_/config/workaround.hpp ================================================ #ifndef BOOST_MPL_AUX_CONFIG_WORKAROUND_HPP_INCLUDED #define BOOST_MPL_AUX_CONFIG_WORKAROUND_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2002-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ #include #endif // BOOST_MPL_AUX_CONFIG_WORKAROUND_HPP_INCLUDED ================================================ FILE: benchmarks/boost/mpl/aux_/count_args.hpp ================================================ // NO INCLUDE GUARDS, THE HEADER IS INTENDED FOR MULTIPLE INCLUSION // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ #include #include #include #if !defined(AUX778076_COUNT_ARGS_PARAM_NAME) # define AUX778076_COUNT_ARGS_PARAM_NAME T #endif #if !defined(AUX778076_COUNT_ARGS_TEMPLATE_PARAM) # define AUX778076_COUNT_ARGS_TEMPLATE_PARAM typename AUX778076_COUNT_ARGS_PARAM_NAME #endif // local macros, #undef-ined at the end of the header #if !defined(AUX778076_COUNT_ARGS_USE_STANDARD_PP_PRIMITIVES) # include # include # define AUX778076_COUNT_ARGS_REPEAT BOOST_MPL_PP_REPEAT # define AUX778076_COUNT_ARGS_PARAMS(param) \ BOOST_MPL_PP_PARAMS( \ AUX778076_COUNT_ARGS_ARITY \ , param \ ) \ /**/ #else # include # include # include # define AUX778076_COUNT_ARGS_REPEAT BOOST_PP_REPEAT # define AUX778076_COUNT_ARGS_PARAMS(param) \ BOOST_PP_ENUM_SHIFTED_PARAMS( \ BOOST_PP_INC(AUX778076_COUNT_ARGS_ARITY) \ , param \ ) \ /**/ #endif // AUX778076_COUNT_ARGS_USE_STANDARD_PP_PRIMITIVES #define AUX778076_IS_ARG_TEMPLATE_NAME \ BOOST_PP_CAT(is_,BOOST_PP_CAT(AUX778076_COUNT_ARGS_PREFIX,_arg)) \ /**/ #define AUX778076_COUNT_ARGS_FUNC(unused, i, param) \ BOOST_PP_EXPR_IF(i, +) \ AUX778076_IS_ARG_TEMPLATE_NAME::value \ /**/ // is__arg template< AUX778076_COUNT_ARGS_TEMPLATE_PARAM > struct AUX778076_IS_ARG_TEMPLATE_NAME { BOOST_STATIC_CONSTANT(bool, value = true); }; template<> struct AUX778076_IS_ARG_TEMPLATE_NAME { BOOST_STATIC_CONSTANT(bool, value = false); }; // _count_args template< AUX778076_COUNT_ARGS_PARAMS(AUX778076_COUNT_ARGS_TEMPLATE_PARAM) > struct BOOST_PP_CAT(AUX778076_COUNT_ARGS_PREFIX,_count_args) { BOOST_STATIC_CONSTANT(int, value = AUX778076_COUNT_ARGS_REPEAT( AUX778076_COUNT_ARGS_ARITY , AUX778076_COUNT_ARGS_FUNC , AUX778076_COUNT_ARGS_PARAM_NAME )); }; #undef AUX778076_COUNT_ARGS_FUNC #undef AUX778076_IS_ARG_TEMPLATE_NAME #undef AUX778076_COUNT_ARGS_PARAMS #undef AUX778076_COUNT_ARGS_REPEAT #undef AUX778076_COUNT_ARGS_ARITY #undef AUX778076_COUNT_ARGS_DEFAULT #undef AUX778076_COUNT_ARGS_PREFIX #undef AUX778076_COUNT_ARGS_USE_STANDARD_PP_PRIMITIVES #undef AUX778076_COUNT_ARGS_TEMPLATE_PARAM #undef AUX778076_COUNT_ARGS_PARAM_NAME ================================================ FILE: benchmarks/boost/mpl/aux_/find_if_pred.hpp ================================================ #ifndef BOOST_MPL_AUX_FIND_IF_PRED_HPP_INCLUDED #define BOOST_MPL_AUX_FIND_IF_PRED_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // Copyright Eric Friedman 2002 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. #include #include namespace boost { namespace mpl { namespace aux { template< typename Predicate > struct find_if_pred { template< typename Iterator > struct apply { typedef not_< aux::iter_apply1 > type; }; }; }}} #endif // BOOST_MPL_AUX_FIND_IF_PRED_HPP_INCLUDED ================================================ FILE: benchmarks/boost/mpl/aux_/fold_impl.hpp ================================================ #ifndef BOOST_MPL_AUX_FOLD_IMPL_HPP_INCLUDED #define BOOST_MPL_AUX_FOLD_IMPL_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ #if !defined(BOOST_MPL_PREPROCESSING_MODE) # include # include # include # include # if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) # include # include # endif #endif #include #if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ && !defined(BOOST_MPL_PREPROCESSING_MODE) # define BOOST_MPL_PREPROCESSED_HEADER fold_impl.hpp # include #else # define AUX778076_FOLD_IMPL_OP(iter) typename deref::type # define AUX778076_FOLD_IMPL_NAME_PREFIX fold # include #endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS #endif // BOOST_MPL_AUX_FOLD_IMPL_HPP_INCLUDED ================================================ FILE: benchmarks/boost/mpl/aux_/fold_impl_body.hpp ================================================ // NO INCLUDE GUARDS, THE HEADER IS INTENDED FOR MULTIPLE INCLUSION #if !defined(BOOST_PP_IS_ITERATING) // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ # include # include # include # include # include # include # include # include # include // local macros, #undef-ined at the end of the header # define AUX778076_ITER_FOLD_STEP(unused, i, unused2) \ typedef typename apply2< \ ForwardOp \ , BOOST_PP_CAT(state,i) \ , AUX778076_FOLD_IMPL_OP(BOOST_PP_CAT(iter,i)) \ >::type BOOST_PP_CAT(state,BOOST_PP_INC(i)); \ typedef typename mpl::next::type \ BOOST_PP_CAT(iter,BOOST_PP_INC(i)); \ /**/ # define AUX778076_FOLD_IMPL_NAME \ BOOST_PP_CAT(AUX778076_FOLD_IMPL_NAME_PREFIX,_impl) \ /**/ # define AUX778076_FOLD_CHUNK_NAME \ BOOST_PP_CAT(AUX778076_FOLD_IMPL_NAME_PREFIX,_chunk) \ /**/ namespace boost { namespace mpl { namespace aux { /// forward declaration template< BOOST_MPL_AUX_NTTP_DECL(int, N) , typename First , typename Last , typename State , typename ForwardOp > struct AUX778076_FOLD_IMPL_NAME; #if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) # if !BOOST_WORKAROUND(__BORLANDC__, < 0x600) # define BOOST_PP_ITERATION_PARAMS_1 \ (3,(0, BOOST_MPL_LIMIT_UNROLLING, )) # include BOOST_PP_ITERATE() // implementation for N that exceeds BOOST_MPL_LIMIT_UNROLLING template< BOOST_MPL_AUX_NTTP_DECL(int, N) , typename First , typename Last , typename State , typename ForwardOp > struct AUX778076_FOLD_IMPL_NAME { typedef AUX778076_FOLD_IMPL_NAME< BOOST_MPL_LIMIT_UNROLLING , First , Last , State , ForwardOp > chunk_; typedef AUX778076_FOLD_IMPL_NAME< ( (N - BOOST_MPL_LIMIT_UNROLLING) < 0 ? 0 : N - BOOST_MPL_LIMIT_UNROLLING ) , typename chunk_::iterator , Last , typename chunk_::state , ForwardOp > res_; typedef typename res_::state state; typedef typename res_::iterator iterator; }; // fallback implementation for sequences of unknown size template< typename First , typename Last , typename State , typename ForwardOp > struct AUX778076_FOLD_IMPL_NAME<-1,First,Last,State,ForwardOp> : AUX778076_FOLD_IMPL_NAME< -1 , typename mpl::next::type , Last , typename apply2::type , ForwardOp > { }; template< typename Last , typename State , typename ForwardOp > struct AUX778076_FOLD_IMPL_NAME<-1,Last,Last,State,ForwardOp> { typedef State state; typedef Last iterator; }; # else // BOOST_WORKAROUND(__BORLANDC__, < 0x600) // Borland have some serious problems with the unrolled version, so // we always use a basic implementation template< BOOST_MPL_AUX_NTTP_DECL(int, N) , typename First , typename Last , typename State , typename ForwardOp > struct AUX778076_FOLD_IMPL_NAME { typedef AUX778076_FOLD_IMPL_NAME< -1 , typename mpl::next::type , Last , typename apply2::type , ForwardOp > res_; typedef typename res_::state state; typedef typename res_::iterator iterator; typedef state type; }; template< BOOST_MPL_AUX_NTTP_DECL(int, N) , typename Last , typename State , typename ForwardOp > struct AUX778076_FOLD_IMPL_NAME { typedef State state; typedef Last iterator; typedef state type; }; # endif // BOOST_WORKAROUND(__BORLANDC__, < 0x600) #else // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION template< BOOST_MPL_AUX_NTTP_DECL(int, N) > struct AUX778076_FOLD_CHUNK_NAME; # define BOOST_PP_ITERATION_PARAMS_1 \ (3,(0, BOOST_MPL_LIMIT_UNROLLING, )) # include BOOST_PP_ITERATE() // implementation for N that exceeds BOOST_MPL_LIMIT_UNROLLING template< BOOST_MPL_AUX_NTTP_DECL(int, N) > struct AUX778076_FOLD_CHUNK_NAME { template< typename First , typename Last , typename State , typename ForwardOp > struct result_ { typedef AUX778076_FOLD_IMPL_NAME< BOOST_MPL_LIMIT_UNROLLING , First , Last , State , ForwardOp > chunk_; typedef AUX778076_FOLD_IMPL_NAME< ( (N - BOOST_MPL_LIMIT_UNROLLING) < 0 ? 0 : N - BOOST_MPL_LIMIT_UNROLLING ) , typename chunk_::iterator , Last , typename chunk_::state , ForwardOp > res_; typedef typename res_::state state; typedef typename res_::iterator iterator; }; }; // fallback implementation for sequences of unknown size template< typename First , typename Last , typename State , typename ForwardOp > struct BOOST_PP_CAT(AUX778076_FOLD_IMPL_NAME_PREFIX,_step); template< typename Last , typename State > struct BOOST_PP_CAT(AUX778076_FOLD_IMPL_NAME_PREFIX,_null_step) { typedef Last iterator; typedef State state; }; template<> struct AUX778076_FOLD_CHUNK_NAME<-1> { template< typename First , typename Last , typename State , typename ForwardOp > struct result_ { typedef typename if_< typename is_same::type , BOOST_PP_CAT(AUX778076_FOLD_IMPL_NAME_PREFIX,_null_step) , BOOST_PP_CAT(AUX778076_FOLD_IMPL_NAME_PREFIX,_step) >::type res_; typedef typename res_::state state; typedef typename res_::iterator iterator; }; #if defined(BOOST_MPL_CFG_MSVC_60_ETI_BUG) /// ETI workaround template<> struct result_ { typedef int state; typedef int iterator; }; #endif }; template< typename First , typename Last , typename State , typename ForwardOp > struct BOOST_PP_CAT(AUX778076_FOLD_IMPL_NAME_PREFIX,_step) { // can't inherit here - it breaks MSVC 7.0 typedef AUX778076_FOLD_CHUNK_NAME<-1>::template result_< typename mpl::next::type , Last , typename apply2::type , ForwardOp > chunk_; typedef typename chunk_::state state; typedef typename chunk_::iterator iterator; }; template< BOOST_MPL_AUX_NTTP_DECL(int, N) , typename First , typename Last , typename State , typename ForwardOp > struct AUX778076_FOLD_IMPL_NAME : AUX778076_FOLD_CHUNK_NAME ::template result_ { }; #endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION }}} # undef AUX778076_FOLD_IMPL_NAME # undef AUX778076_FOLD_CHUNK_NAME # undef AUX778076_ITER_FOLD_STEP #undef AUX778076_FOLD_IMPL_OP #undef AUX778076_FOLD_IMPL_NAME_PREFIX ///// iteration #else # define n_ BOOST_PP_FRAME_ITERATION(1) #if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) template< typename First , typename Last , typename State , typename ForwardOp > struct AUX778076_FOLD_IMPL_NAME { typedef First iter0; typedef State state0; BOOST_MPL_PP_REPEAT(n_, AUX778076_ITER_FOLD_STEP, unused) typedef BOOST_PP_CAT(state,n_) state; typedef BOOST_PP_CAT(iter,n_) iterator; }; #else template<> struct AUX778076_FOLD_CHUNK_NAME { template< typename First , typename Last , typename State , typename ForwardOp > struct result_ { typedef First iter0; typedef State state0; BOOST_MPL_PP_REPEAT(n_, AUX778076_ITER_FOLD_STEP, unused) typedef BOOST_PP_CAT(state,n_) state; typedef BOOST_PP_CAT(iter,n_) iterator; }; #if defined(BOOST_MPL_CFG_MSVC_60_ETI_BUG) /// ETI workaround template<> struct result_ { typedef int state; typedef int iterator; }; #endif }; #endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION # undef n_ #endif // BOOST_PP_IS_ITERATING ================================================ FILE: benchmarks/boost/mpl/aux_/full_lambda.hpp ================================================ #if !defined(BOOST_PP_IS_ITERATING) ///// header body #ifndef BOOST_MPL_AUX_FULL_LAMBDA_HPP_INCLUDED #define BOOST_MPL_AUX_FULL_LAMBDA_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ #if !defined(BOOST_MPL_PREPROCESSING_MODE) # include # include # include # include # include # include # include # include # include # include # if defined(BOOST_MPL_CFG_EXTENDED_TEMPLATE_PARAMETERS_MATCHING) # include # endif #endif #include #include #if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ && !defined(BOOST_MPL_PREPROCESSING_MODE) # define BOOST_MPL_PREPROCESSED_HEADER full_lambda.hpp # include #else # include # include # include # include # include # include # include # include # include # include namespace boost { namespace mpl { // local macros, #undef-ined at the end of the header # define AUX778076_LAMBDA_PARAMS(i_, param) \ BOOST_MPL_PP_PARAMS(i_, param) \ /**/ # define AUX778076_BIND_PARAMS(param) \ BOOST_MPL_PP_PARAMS( \ BOOST_MPL_LIMIT_METAFUNCTION_ARITY \ , param \ ) \ /**/ # define AUX778076_BIND_N_PARAMS(i_, param) \ BOOST_PP_COMMA_IF(i_) \ BOOST_MPL_PP_PARAMS(i_, param) \ /**/ # define AUX778076_ARITY_PARAM(param) \ BOOST_MPL_AUX_LAMBDA_ARITY_PARAM(param) \ /**/ #define n_ BOOST_MPL_LIMIT_METAFUNCTION_ARITY namespace aux { template< BOOST_MPL_PP_DEFAULT_PARAMS(n_,bool C,false) > struct lambda_or : true_ { }; template<> struct lambda_or< BOOST_MPL_PP_ENUM(n_,false) > : false_ { }; } // namespace aux #undef n_ template< typename T , typename Tag AUX778076_ARITY_PARAM(typename Arity) > struct lambda { typedef false_ is_le; typedef T result_; typedef T type; }; template< typename T > struct is_lambda_expression : lambda::is_le { }; template< int N, typename Tag > struct lambda< arg,Tag AUX778076_ARITY_PARAM(int_<-1>) > { typedef true_ is_le; typedef mpl::arg result_; // qualified for the sake of MIPSpro 7.41 typedef mpl::protect type; }; #define BOOST_PP_ITERATION_PARAMS_1 \ (3,(0, BOOST_MPL_LIMIT_METAFUNCTION_ARITY, )) #include BOOST_PP_ITERATE() /// special case for 'protect' template< typename T, typename Tag > struct lambda< mpl::protect,Tag AUX778076_ARITY_PARAM(int_<1>) > { typedef false_ is_le; typedef mpl::protect result_; typedef result_ type; }; /// specializations for the main 'bind' form template< typename F, AUX778076_BIND_PARAMS(typename T) , typename Tag > struct lambda< bind , Tag AUX778076_ARITY_PARAM(int_) > { typedef false_ is_le; typedef bind result_; typedef result_ type; }; #if defined(BOOST_MPL_CFG_EXTENDED_TEMPLATE_PARAMETERS_MATCHING) template< typename F , typename Tag1 , typename Tag2 , typename Arity > struct lambda< lambda , Tag2 , int_<3> > { typedef lambda< F,Tag2 > l1; typedef lambda< Tag1,Tag2 > l2; typedef typename l1::is_le is_le; typedef bind1< quote1, typename l1::result_ > arity_; typedef lambda< typename if_::type,Tag2 > l3; typedef aux::le_result3 le_result_; typedef typename le_result_::result_ result_; typedef typename le_result_::type type; }; #elif !defined(BOOST_MPL_CFG_DMC_AMBIGUOUS_CTPS) /// workaround for MWCW 8.3+/EDG < 303, leads to ambiguity on Digital Mars template< typename F, typename Tag1, typename Tag2 > struct lambda< lambda< F,Tag1 > , Tag2 > { typedef lambda< F,Tag2 > l1; typedef lambda< Tag1,Tag2 > l2; typedef typename l1::is_le is_le; typedef aux::le_result2 le_result_; typedef typename le_result_::result_ result_; typedef typename le_result_::type type; }; #endif # undef AUX778076_ARITY_PARAM # undef AUX778076_BIND_N_PARAMS # undef AUX778076_BIND_PARAMS # undef AUX778076_LAMBDA_PARAMS #if !defined(BOOST_MPL_CFG_EXTENDED_TEMPLATE_PARAMETERS_MATCHING) BOOST_MPL_AUX_NA_SPEC(2, lambda) #else BOOST_MPL_AUX_NA_SPEC2(2, 3, lambda) #endif }} #endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS #endif // BOOST_MPL_AUX_FULL_LAMBDA_HPP_INCLUDED ///// iteration, depth == 1 // For gcc 4.4 compatability, we must include the // BOOST_PP_ITERATION_DEPTH test inside an #else clause. #else // BOOST_PP_IS_ITERATING #if BOOST_PP_ITERATION_DEPTH() == 1 #define i_ BOOST_PP_FRAME_ITERATION(1) #if i_ > 0 namespace aux { # define AUX778076_RESULT(unused, i_, T) \ BOOST_PP_COMMA_IF(i_) \ typename BOOST_PP_CAT(T, BOOST_PP_INC(i_))::result_ \ /**/ # define AUX778076_TYPE(unused, i_, T) \ BOOST_PP_COMMA_IF(i_) \ typename BOOST_PP_CAT(T, BOOST_PP_INC(i_))::type \ /**/ template< typename IsLE, typename Tag , template< AUX778076_LAMBDA_PARAMS(i_, typename P) > class F , AUX778076_LAMBDA_PARAMS(i_, typename L) > struct BOOST_PP_CAT(le_result,i_) { typedef F< BOOST_MPL_PP_REPEAT(i_, AUX778076_TYPE, L) > result_; typedef result_ type; }; template< typename Tag , template< AUX778076_LAMBDA_PARAMS(i_, typename P) > class F , AUX778076_LAMBDA_PARAMS(i_, typename L) > struct BOOST_PP_CAT(le_result,i_)< true_,Tag,F,AUX778076_LAMBDA_PARAMS(i_, L) > { typedef BOOST_PP_CAT(bind,i_)< BOOST_PP_CAT(quote,i_) , BOOST_MPL_PP_REPEAT(i_, AUX778076_RESULT, L) > result_; typedef mpl::protect type; }; # undef AUX778076_TYPE # undef AUX778076_RESULT } // namespace aux # define AUX778076_LAMBDA_TYPEDEF(unused, i_, T) \ typedef lambda< BOOST_PP_CAT(T, BOOST_PP_INC(i_)), Tag > \ BOOST_PP_CAT(l,BOOST_PP_INC(i_)); \ /**/ # define AUX778076_IS_LE_TYPEDEF(unused, i_, unused2) \ typedef typename BOOST_PP_CAT(l,BOOST_PP_INC(i_))::is_le \ BOOST_PP_CAT(is_le,BOOST_PP_INC(i_)); \ /**/ # define AUX778076_IS_LAMBDA_EXPR(unused, i_, unused2) \ BOOST_PP_COMMA_IF(i_) \ BOOST_PP_CAT(is_le,BOOST_PP_INC(i_))::value \ /**/ template< template< AUX778076_LAMBDA_PARAMS(i_, typename P) > class F , AUX778076_LAMBDA_PARAMS(i_, typename T) , typename Tag > struct lambda< F , Tag AUX778076_ARITY_PARAM(int_) > { BOOST_MPL_PP_REPEAT(i_, AUX778076_LAMBDA_TYPEDEF, T) BOOST_MPL_PP_REPEAT(i_, AUX778076_IS_LE_TYPEDEF, unused) typedef typename aux::lambda_or< BOOST_MPL_PP_REPEAT(i_, AUX778076_IS_LAMBDA_EXPR, unused) >::type is_le; typedef aux::BOOST_PP_CAT(le_result,i_)< is_le, Tag, F, AUX778076_LAMBDA_PARAMS(i_, l) > le_result_; typedef typename le_result_::result_ result_; typedef typename le_result_::type type; }; # undef AUX778076_IS_LAMBDA_EXPR # undef AUX778076_IS_LE_TYPEDEF # undef AUX778076_LAMBDA_TYPEDEF #endif // i_ > 0 template< typename F AUX778076_BIND_N_PARAMS(i_, typename T) , typename Tag > struct lambda< BOOST_PP_CAT(bind,i_) , Tag AUX778076_ARITY_PARAM(int_) > { typedef false_ is_le; typedef BOOST_PP_CAT(bind,i_)< F AUX778076_BIND_N_PARAMS(i_, T) > result_; typedef result_ type; }; #undef i_ #endif // BOOST_PP_ITERATION_DEPTH() #endif // BOOST_PP_IS_ITERATING ================================================ FILE: benchmarks/boost/mpl/aux_/has_apply.hpp ================================================ #ifndef BOOST_MPL_AUX_HAS_APPLY_HPP_INCLUDED #define BOOST_MPL_AUX_HAS_APPLY_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ #include #include namespace boost { namespace mpl { namespace aux { #if !defined(BOOST_MPL_CFG_NO_HAS_APPLY) BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(has_apply, apply, false) #else template< typename T, typename fallback_ = false_ > struct has_apply : fallback_ { }; #endif }}} #endif // BOOST_MPL_AUX_HAS_APPLY_HPP_INCLUDED ================================================ FILE: benchmarks/boost/mpl/aux_/has_begin.hpp ================================================ #ifndef BOOST_MPL_AUX_HAS_BEGIN_HPP_INCLUDED #define BOOST_MPL_AUX_HAS_BEGIN_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2002-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ #include namespace boost { namespace mpl { namespace aux { BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(has_begin, begin, true) }}} #endif // BOOST_MPL_AUX_HAS_BEGIN_HPP_INCLUDED ================================================ FILE: benchmarks/boost/mpl/aux_/has_key_impl.hpp ================================================ #ifndef BOOST_MPL_AUX_HAS_KEY_IMPL_HPP_INCLUDED #define BOOST_MPL_AUX_HAS_KEY_IMPL_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2002-2004 // Copyright David Abrahams 2003 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ #include #include namespace boost { namespace mpl { // no default implementation; the definition is needed to make MSVC happy template< typename Tag > struct has_key_impl { template< typename AssociativeSequence, typename Key > struct apply; }; BOOST_MPL_ALGORITM_TRAITS_LAMBDA_SPEC(2,has_key_impl) }} #endif // BOOST_MPL_AUX_HAS_KEY_IMPL_HPP_INCLUDED ================================================ FILE: benchmarks/boost/mpl/aux_/has_rebind.hpp ================================================ #ifndef BOOST_MPL_AUX_HAS_REBIND_HPP_INCLUDED #define BOOST_MPL_AUX_HAS_REBIND_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2002-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ #include #include #include #if BOOST_WORKAROUND(__EDG_VERSION__, <= 244) && !defined(BOOST_INTEL_CXX_VERSION) # include #elif BOOST_WORKAROUND(BOOST_MSVC, < 1300) # include # include # include # include #elif BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x610)) # include # include # include # include # include #else # include # include # include #endif namespace boost { namespace mpl { namespace aux { #if BOOST_WORKAROUND(__EDG_VERSION__, <= 244) && !defined(BOOST_INTEL_CXX_VERSION) BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(has_rebind, rebind, false) #elif BOOST_WORKAROUND(BOOST_MSVC, < 1300) BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(has_rebind_impl, rebind, false) template< typename T > struct has_rebind : if_< msvc_is_class , has_rebind_impl , bool_ >::type { }; #else // the rest template< typename T > struct has_rebind_tag {}; no_tag operator|(has_rebind_tag, void const volatile*); # if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x610)) template< typename T > struct has_rebind { static has_rebind_tag* get(); BOOST_STATIC_CONSTANT(bool, value = sizeof(has_rebind_tag() | get()) == sizeof(yes_tag) ); }; # else // __BORLANDC__ template< typename T > struct has_rebind_impl { static T* get(); BOOST_STATIC_CONSTANT(bool, value = sizeof(has_rebind_tag() | get()) == sizeof(yes_tag) ); }; template< typename T > struct has_rebind : if_< is_class , has_rebind_impl , bool_ >::type { }; # endif // __BORLANDC__ #endif }}} #endif // BOOST_MPL_AUX_HAS_REBIND_HPP_INCLUDED ================================================ FILE: benchmarks/boost/mpl/aux_/has_size.hpp ================================================ #ifndef BOOST_MPL_AUX_HAS_SIZE_HPP_INCLUDED #define BOOST_MPL_AUX_HAS_SIZE_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2002-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ #include namespace boost { namespace mpl { namespace aux { BOOST_MPL_HAS_XXX_TRAIT_DEF(size) }}} #endif // BOOST_MPL_AUX_HAS_SIZE_HPP_INCLUDED ================================================ FILE: benchmarks/boost/mpl/aux_/has_tag.hpp ================================================ #ifndef BOOST_MPL_AUX_HAS_TAG_HPP_INCLUDED #define BOOST_MPL_AUX_HAS_TAG_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2002-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ #include namespace boost { namespace mpl { namespace aux { BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(has_tag, tag, false) }}} #endif // BOOST_MPL_AUX_HAS_TAG_HPP_INCLUDED ================================================ FILE: benchmarks/boost/mpl/aux_/has_type.hpp ================================================ #ifndef BOOST_MPL_AUX_HAS_TYPE_HPP_INCLUDED #define BOOST_MPL_AUX_HAS_TYPE_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2002-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ #include namespace boost { namespace mpl { namespace aux { BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(has_type, type, true) }}} #endif // BOOST_MPL_AUX_HAS_TYPE_HPP_INCLUDED ================================================ FILE: benchmarks/boost/mpl/aux_/include_preprocessed.hpp ================================================ // NO INCLUDE GUARDS, THE HEADER IS INTENDED FOR MULTIPLE INCLUSION // Copyright Aleksey Gurtovoy 2000-2006 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ #include #include #include #include #include #if !defined(BOOST_NEEDS_TOKEN_PASTING_OP_FOR_TOKENS_JUXTAPOSING) # define AUX778076_PREPROCESSED_HEADER \ BOOST_MPL_CFG_COMPILER_DIR/BOOST_MPL_PREPROCESSED_HEADER \ /**/ #else # define AUX778076_PREPROCESSED_HEADER \ BOOST_PP_CAT(BOOST_MPL_CFG_COMPILER_DIR,/)##BOOST_MPL_PREPROCESSED_HEADER \ /**/ #endif #if BOOST_WORKAROUND(__IBMCPP__, BOOST_TESTED_AT(700)) # define AUX778076_INCLUDE_STRING BOOST_PP_STRINGIZE(boost/mpl/aux_/preprocessed/AUX778076_PREPROCESSED_HEADER) # include AUX778076_INCLUDE_STRING # undef AUX778076_INCLUDE_STRING #else # include BOOST_PP_STRINGIZE(boost/mpl/aux_/preprocessed/AUX778076_PREPROCESSED_HEADER) #endif # undef AUX778076_PREPROCESSED_HEADER #undef BOOST_MPL_PREPROCESSED_HEADER ================================================ FILE: benchmarks/boost/mpl/aux_/insert_impl.hpp ================================================ #ifndef BOOST_MPL_INSERT_IMPL_HPP_INCLUDED #define BOOST_MPL_INSERT_IMPL_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ #include #include #include #include #include #include #include namespace boost { namespace mpl { // default implementation; conrete sequences might override it by // specializing either the 'insert_impl' or the primary 'insert' template template< typename Tag > struct insert_impl { template< typename Sequence , typename Pos , typename T > struct apply { typedef iterator_range< typename begin::type , Pos > first_half_; typedef iterator_range< Pos , typename end::type > second_half_; typedef typename reverse_fold< second_half_ , typename clear::type , push_front<_,_> >::type half_sequence_; typedef typename reverse_fold< first_half_ , typename push_front::type , push_front<_,_> >::type type; }; }; BOOST_MPL_ALGORITM_TRAITS_LAMBDA_SPEC(3,insert_impl) }} #endif // BOOST_MPL_INSERT_IMPL_HPP_INCLUDED ================================================ FILE: benchmarks/boost/mpl/aux_/integral_wrapper.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2006 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ // NO INCLUDE GUARDS, THE HEADER IS INTENDED FOR MULTIPLE INCLUSION! #include #include #include #include #include #include #if !defined(AUX_WRAPPER_NAME) # define AUX_WRAPPER_NAME BOOST_PP_CAT(AUX_WRAPPER_VALUE_TYPE,_) #endif #if !defined(AUX_WRAPPER_PARAMS) # define AUX_WRAPPER_PARAMS(N) BOOST_MPL_AUX_NTTP_DECL(AUX_WRAPPER_VALUE_TYPE, N) #endif #if !defined(AUX_WRAPPER_INST) # if BOOST_WORKAROUND(__MWERKS__, <= 0x2407) # define AUX_WRAPPER_INST(value) AUX_WRAPPER_NAME< value > # else # define AUX_WRAPPER_INST(value) BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::AUX_WRAPPER_NAME< value > # endif #endif BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN template< AUX_WRAPPER_PARAMS(N) > struct AUX_WRAPPER_NAME { BOOST_STATIC_CONSTANT(AUX_WRAPPER_VALUE_TYPE, value = N); // agurt, 08/mar/03: SGI MIPSpro C++ workaround, have to #ifdef because some // other compilers (e.g. MSVC) are not particulary happy about it #if BOOST_WORKAROUND(__EDG_VERSION__, <= 238) typedef struct AUX_WRAPPER_NAME type; #else typedef AUX_WRAPPER_NAME type; #endif typedef AUX_WRAPPER_VALUE_TYPE value_type; typedef integral_c_tag tag; // have to #ifdef here: some compilers don't like the 'N + 1' form (MSVC), // while some other don't like 'value + 1' (Borland), and some don't like // either #if BOOST_WORKAROUND(__EDG_VERSION__, <= 243) private: BOOST_STATIC_CONSTANT(AUX_WRAPPER_VALUE_TYPE, next_value = BOOST_MPL_AUX_STATIC_CAST(AUX_WRAPPER_VALUE_TYPE, (N + 1))); BOOST_STATIC_CONSTANT(AUX_WRAPPER_VALUE_TYPE, prior_value = BOOST_MPL_AUX_STATIC_CAST(AUX_WRAPPER_VALUE_TYPE, (N - 1))); public: typedef AUX_WRAPPER_INST(next_value) next; typedef AUX_WRAPPER_INST(prior_value) prior; #elif BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x561)) \ || BOOST_WORKAROUND(__IBMCPP__, BOOST_TESTED_AT(502)) \ || (BOOST_WORKAROUND(__HP_aCC, <= 53800) && (BOOST_WORKAROUND(__hpxstd98, != 1))) typedef AUX_WRAPPER_INST( BOOST_MPL_AUX_STATIC_CAST(AUX_WRAPPER_VALUE_TYPE, (N + 1)) ) next; typedef AUX_WRAPPER_INST( BOOST_MPL_AUX_STATIC_CAST(AUX_WRAPPER_VALUE_TYPE, (N - 1)) ) prior; #else typedef AUX_WRAPPER_INST( BOOST_MPL_AUX_STATIC_CAST(AUX_WRAPPER_VALUE_TYPE, (value + 1)) ) next; typedef AUX_WRAPPER_INST( BOOST_MPL_AUX_STATIC_CAST(AUX_WRAPPER_VALUE_TYPE, (value - 1)) ) prior; #endif // enables uniform function call syntax for families of overloaded // functions that return objects of both arithmetic ('int', 'long', // 'double', etc.) and wrapped integral types (for an example, see // "mpl/example/power.cpp") BOOST_CONSTEXPR operator AUX_WRAPPER_VALUE_TYPE() const { return static_cast(this->value); } }; #if !defined(BOOST_NO_INCLASS_MEMBER_INITIALIZATION) template< AUX_WRAPPER_PARAMS(N) > AUX_WRAPPER_VALUE_TYPE const AUX_WRAPPER_INST(N)::value; #endif BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE #undef AUX_WRAPPER_NAME #undef AUX_WRAPPER_PARAMS #undef AUX_WRAPPER_INST #undef AUX_WRAPPER_VALUE_TYPE ================================================ FILE: benchmarks/boost/mpl/aux_/is_msvc_eti_arg.hpp ================================================ #ifndef BOOST_MPL_AUX_IS_MSVC_ETI_ARG_HPP_INCLUDED #define BOOST_MPL_AUX_IS_MSVC_ETI_ARG_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ #include #include #include namespace boost { namespace mpl { namespace aux { #if defined(BOOST_MPL_CFG_MSVC_ETI_BUG) #if defined(BOOST_MPL_CFG_MSVC_60_ETI_BUG) template< typename T > struct is_msvc_eti_arg { BOOST_STATIC_CONSTANT(bool, value = false); }; #else // BOOST_MPL_CFG_MSVC_60_ETI_BUG struct eti_int_convertible { eti_int_convertible(int); }; template< typename T > struct is_msvc_eti_arg { static no_tag test(...); static yes_tag test(eti_int_convertible); static T& get(); BOOST_STATIC_CONSTANT(bool, value = sizeof(test(get())) == sizeof(yes_tag) ); }; #endif template<> struct is_msvc_eti_arg { BOOST_STATIC_CONSTANT(bool, value = true); }; #endif // BOOST_MPL_CFG_MSVC_ETI_BUG }}} #endif // BOOST_MPL_AUX_IS_MSVC_ETI_ARG_HPP_INCLUDED ================================================ FILE: benchmarks/boost/mpl/aux_/iter_apply.hpp ================================================ #ifndef BOOST_MPL_ITER_APPLY_HPP_INCLUDED #define BOOST_MPL_ITER_APPLY_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2002-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ #include #include namespace boost { namespace mpl { namespace aux { template< typename F , typename Iterator > struct iter_apply1 : apply1< F,typename deref::type > { }; template< typename F , typename Iterator1 , typename Iterator2 > struct iter_apply2 : apply2< F , typename deref::type , typename deref::type > { }; }}} #endif // BOOST_MPL_ITER_APPLY_HPP_INCLUDED ================================================ FILE: benchmarks/boost/mpl/aux_/iter_fold_if_impl.hpp ================================================ #ifndef BOOST_MPL_AUX_ITER_FOLD_IF_IMPL_HPP_INCLUDED #define BOOST_MPL_AUX_ITER_FOLD_IF_IMPL_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2001-2004 // Copyright David Abrahams 2001-2002 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ #if !defined(BOOST_MPL_PREPROCESSING_MODE) # include # include # include # include # include #endif #include #if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ && !defined(BOOST_MPL_PREPROCESSING_MODE) # define BOOST_MPL_PREPROCESSED_HEADER iter_fold_if_impl.hpp # include #else # include # include # include # include # include # include namespace boost { namespace mpl { namespace aux { template< typename Iterator, typename State > struct iter_fold_if_null_step { typedef State state; typedef Iterator iterator; }; template< bool > struct iter_fold_if_step_impl { template< typename Iterator , typename State , typename StateOp , typename IteratorOp > struct result_ { typedef typename apply2::type state; typedef typename IteratorOp::type iterator; }; }; template<> struct iter_fold_if_step_impl { template< typename Iterator , typename State , typename StateOp , typename IteratorOp > struct result_ { typedef State state; typedef Iterator iterator; }; }; // agurt, 25/jun/02: MSVC 6.5 workaround, had to get rid of inheritance // here and in 'iter_fold_if_backward_step', because sometimes it interfered // with the "early template instantiation bug" in _really_ ugly ways template< typename Iterator , typename State , typename ForwardOp , typename Predicate > struct iter_fold_if_forward_step { typedef typename apply2::type not_last; typedef typename iter_fold_if_step_impl< BOOST_MPL_AUX_MSVC_VALUE_WKND(not_last)::value >::template result_< Iterator,State,ForwardOp,mpl::next > impl_; typedef typename impl_::state state; typedef typename impl_::iterator iterator; }; template< typename Iterator , typename State , typename BackwardOp , typename Predicate > struct iter_fold_if_backward_step { typedef typename apply2::type not_last; typedef typename iter_fold_if_step_impl< BOOST_MPL_AUX_MSVC_VALUE_WKND(not_last)::value >::template result_< Iterator,State,BackwardOp,identity > impl_; typedef typename impl_::state state; typedef typename impl_::iterator iterator; }; // local macros, #undef-ined at the end of the header # define AUX_ITER_FOLD_FORWARD_STEP(unused, i, unused2) \ typedef iter_fold_if_forward_step< \ typename BOOST_PP_CAT(forward_step,i)::iterator \ , typename BOOST_PP_CAT(forward_step,i)::state \ , ForwardOp \ , ForwardPredicate \ > BOOST_PP_CAT(forward_step, BOOST_PP_INC(i)); \ /**/ # define AUX_ITER_FOLD_BACKWARD_STEP_FUNC(i) \ typedef iter_fold_if_backward_step< \ typename BOOST_PP_CAT(forward_step,BOOST_PP_DEC(i))::iterator \ , typename BOOST_PP_CAT(backward_step,i)::state \ , BackwardOp \ , BackwardPredicate \ > BOOST_PP_CAT(backward_step,BOOST_PP_DEC(i)); \ /**/ # define AUX_ITER_FOLD_BACKWARD_STEP(unused, i, unused2) \ AUX_ITER_FOLD_BACKWARD_STEP_FUNC( \ BOOST_PP_SUB_D(1,BOOST_MPL_LIMIT_UNROLLING,i) \ ) \ /**/ # define AUX_LAST_FORWARD_STEP \ BOOST_PP_CAT(forward_step, BOOST_MPL_LIMIT_UNROLLING) \ /**/ # define AUX_LAST_BACKWARD_STEP \ BOOST_PP_CAT(backward_step, BOOST_MPL_LIMIT_UNROLLING) \ /**/ template< typename Iterator , typename State , typename ForwardOp , typename ForwardPredicate , typename BackwardOp , typename BackwardPredicate > struct iter_fold_if_impl { private: typedef iter_fold_if_null_step forward_step0; BOOST_PP_REPEAT( BOOST_MPL_LIMIT_UNROLLING , AUX_ITER_FOLD_FORWARD_STEP , unused ) typedef typename if_< typename AUX_LAST_FORWARD_STEP::not_last , iter_fold_if_impl< typename AUX_LAST_FORWARD_STEP::iterator , typename AUX_LAST_FORWARD_STEP::state , ForwardOp , ForwardPredicate , BackwardOp , BackwardPredicate > , iter_fold_if_null_step< typename AUX_LAST_FORWARD_STEP::iterator , typename AUX_LAST_FORWARD_STEP::state > >::type AUX_LAST_BACKWARD_STEP; BOOST_PP_REPEAT( BOOST_MPL_LIMIT_UNROLLING , AUX_ITER_FOLD_BACKWARD_STEP , unused ) public: typedef typename backward_step0::state state; typedef typename AUX_LAST_BACKWARD_STEP::iterator iterator; }; # undef AUX_LAST_BACKWARD_STEP # undef AUX_LAST_FORWARD_STEP # undef AUX_ITER_FOLD_BACKWARD_STEP # undef AUX_ITER_FOLD_BACKWARD_STEP_FUNC # undef AUX_ITER_FOLD_FORWARD_STEP }}} #endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS #endif // BOOST_MPL_AUX_ITER_FOLD_IF_IMPL_HPP_INCLUDED ================================================ FILE: benchmarks/boost/mpl/aux_/lambda_arity_param.hpp ================================================ #ifndef BOOST_MPL_AUX_LAMBDA_ARITY_PARAM_HPP_INCLUDED #define BOOST_MPL_AUX_LAMBDA_ARITY_PARAM_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ #include #if !defined(BOOST_MPL_CFG_EXTENDED_TEMPLATE_PARAMETERS_MATCHING) # define BOOST_MPL_AUX_LAMBDA_ARITY_PARAM(param) #else # define BOOST_MPL_AUX_LAMBDA_ARITY_PARAM(param) , param #endif #endif // BOOST_MPL_AUX_LAMBDA_ARITY_PARAM_HPP_INCLUDED ================================================ FILE: benchmarks/boost/mpl/aux_/lambda_no_ctps.hpp ================================================ #if !defined(BOOST_PP_IS_ITERATING) ///// header body #ifndef BOOST_MPL_AUX_LAMBDA_NO_CTPS_HPP_INCLUDED #define BOOST_MPL_AUX_LAMBDA_NO_CTPS_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ #if !defined(BOOST_MPL_PREPROCESSING_MODE) # include # include # include # include # include # include # include # include # include # include # include #endif #include #if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ && !defined(BOOST_MPL_PREPROCESSING_MODE) # define BOOST_MPL_PREPROCESSED_HEADER lambda_no_ctps.hpp # include #else # include # include # include # include # include # include # include # include # include # include # include namespace boost { namespace mpl { # define AUX778076_LAMBDA_PARAMS(i_, param) \ BOOST_MPL_PP_PARAMS(i_, param) \ /**/ namespace aux { #define n_ BOOST_MPL_LIMIT_METAFUNCTION_ARITY template< BOOST_MPL_PP_DEFAULT_PARAMS(n_,bool C,false) > struct lambda_or : true_ { }; template<> struct lambda_or< BOOST_MPL_PP_ENUM(n_,false) > : false_ { }; #undef n_ template< typename Arity > struct lambda_impl { template< typename T, typename Tag, typename Protect > struct result_ { typedef T type; typedef is_placeholder is_le; }; }; #define BOOST_PP_ITERATION_PARAMS_1 \ (3,(1, BOOST_MPL_LIMIT_METAFUNCTION_ARITY, )) #include BOOST_PP_ITERATE() } // namespace aux template< typename T , typename Tag , typename Protect > struct lambda { /// Metafunction forwarding confuses MSVC 6.x typedef typename aux::template_arity::type arity_; typedef typename aux::lambda_impl ::template result_< T,Tag,Protect > l_; typedef typename l_::type type; typedef typename l_::is_le is_le; BOOST_MPL_AUX_LAMBDA_SUPPORT(3, lambda, (T, Tag, Protect)) }; BOOST_MPL_AUX_NA_SPEC2(1, 3, lambda) template< typename T > struct is_lambda_expression : lambda::is_le { }; # undef AUX778076_LAMBDA_PARAMS }} #endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS #endif // BOOST_MPL_AUX_LAMBDA_NO_CTPS_HPP_INCLUDED ///// iteration, depth == 1 #else #define i_ BOOST_PP_FRAME_ITERATION(1) # define AUX778076_LAMBDA_TYPEDEF(unused, i_, F) \ typedef lambda< \ typename F::BOOST_PP_CAT(arg,BOOST_PP_INC(i_)) \ , Tag \ , false_ \ > BOOST_PP_CAT(l,BOOST_PP_INC(i_)); \ /**/ # define AUX778076_IS_LE_TYPEDEF(unused, i_, unused2) \ typedef typename BOOST_PP_CAT(l,BOOST_PP_INC(i_))::is_le \ BOOST_PP_CAT(is_le,BOOST_PP_INC(i_)); \ /**/ # define AUX778076_IS_LAMBDA_EXPR(unused, i_, unused2) \ BOOST_PP_COMMA_IF(i_) \ BOOST_MPL_AUX_MSVC_VALUE_WKND(BOOST_PP_CAT(is_le,BOOST_PP_INC(i_)))::value \ /**/ # define AUX778076_LAMBDA_RESULT(unused, i_, unused2) \ , typename BOOST_PP_CAT(l,BOOST_PP_INC(i_))::type \ /**/ template<> struct lambda_impl< int_ > { template< typename F, typename Tag, typename Protect > struct result_ { BOOST_MPL_PP_REPEAT(i_, AUX778076_LAMBDA_TYPEDEF, F) BOOST_MPL_PP_REPEAT(i_, AUX778076_IS_LE_TYPEDEF, unused) typedef aux::lambda_or< BOOST_MPL_PP_REPEAT(i_, AUX778076_IS_LAMBDA_EXPR, unused) > is_le; typedef BOOST_PP_CAT(bind,i_)< typename F::rebind BOOST_MPL_PP_REPEAT(i_, AUX778076_LAMBDA_RESULT, unused) > bind_; typedef typename if_< is_le , if_< Protect, mpl::protect, bind_ > , identity >::type type_; typedef typename type_::type type; }; }; # undef AUX778076_LAMBDA_RESULT # undef AUX778076_IS_LAMBDA_EXPR # undef AUX778076_IS_LE_TYPEDEF # undef AUX778076_LAMBDA_TYPEDEF #undef i_ #endif // BOOST_PP_IS_ITERATING ================================================ FILE: benchmarks/boost/mpl/aux_/lambda_spec.hpp ================================================ #ifndef BOOST_MPL_AUX_LAMBDA_SPEC_HPP_INCLUDED #define BOOST_MPL_AUX_LAMBDA_SPEC_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2001-2007 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ #include #include #include #include #include #include #if !defined(BOOST_MPL_CFG_NO_FULL_LAMBDA_SUPPORT) # define BOOST_MPL_AUX_PASS_THROUGH_LAMBDA_SPEC(i, name) \ template< \ BOOST_MPL_PP_PARAMS(i, typename T) \ , typename Tag \ > \ struct lambda< \ name< BOOST_MPL_PP_PARAMS(i, T) > \ , Tag \ BOOST_MPL_AUX_LAMBDA_ARITY_PARAM(int_) \ > \ { \ typedef false_ is_le; \ typedef name< BOOST_MPL_PP_PARAMS(i, T) > result_; \ typedef result_ type; \ }; \ /**/ #else # define BOOST_MPL_AUX_PASS_THROUGH_LAMBDA_SPEC(i, name) /**/ #endif #endif // BOOST_MPL_AUX_LAMBDA_SPEC_HPP_INCLUDED ================================================ FILE: benchmarks/boost/mpl/aux_/lambda_support.hpp ================================================ #ifndef BOOST_MPL_AUX_LAMBDA_SUPPORT_HPP_INCLUDED #define BOOST_MPL_AUX_LAMBDA_SUPPORT_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ #include #if !defined(BOOST_MPL_CFG_NO_FULL_LAMBDA_SUPPORT) # define BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(i, name, params) /**/ # define BOOST_MPL_AUX_LAMBDA_SUPPORT(i,name,params) /**/ #else # include # include # include # include # include # include # include # include # include # include # include # define BOOST_MPL_AUX_LAMBDA_SUPPORT_ARG_TYPEDEF_FUNC(R,typedef_,i,param) \ typedef_ param BOOST_PP_CAT(arg,BOOST_PP_INC(i)); \ /**/ // agurt, 07/mar/03: restore an old revision for the sake of SGI MIPSpro C++ #if BOOST_WORKAROUND(__EDG_VERSION__, <= 238) # define BOOST_MPL_AUX_LAMBDA_SUPPORT(i, name, params) \ typedef BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::int_ arity; \ BOOST_PP_LIST_FOR_EACH_I_R( \ 1 \ , BOOST_MPL_AUX_LAMBDA_SUPPORT_ARG_TYPEDEF_FUNC \ , typedef \ , BOOST_PP_TUPLE_TO_LIST(i,params) \ ) \ struct rebind \ { \ template< BOOST_MPL_PP_PARAMS(i,typename U) > struct apply \ : name< BOOST_MPL_PP_PARAMS(i,U) > \ { \ }; \ }; \ /**/ # define BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(i, name, params) \ BOOST_MPL_AUX_LAMBDA_SUPPORT(i, name, params) \ /**/ #elif BOOST_WORKAROUND(__EDG_VERSION__, <= 244) && !defined(BOOST_INTEL_CXX_VERSION) // agurt, 18/jan/03: old EDG-based compilers actually enforce 11.4 para 9 // (in strict mode), so we have to provide an alternative to the // MSVC-optimized implementation # define BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(i, name, params) \ typedef BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::int_ arity; \ BOOST_PP_LIST_FOR_EACH_I_R( \ 1 \ , BOOST_MPL_AUX_LAMBDA_SUPPORT_ARG_TYPEDEF_FUNC \ , typedef \ , BOOST_PP_TUPLE_TO_LIST(i,params) \ ) \ struct rebind; \ /**/ # define BOOST_MPL_AUX_LAMBDA_SUPPORT(i, name, params) \ BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(i, name, params) \ }; \ template< BOOST_MPL_PP_PARAMS(i,typename T) > \ struct name::rebind \ { \ template< BOOST_MPL_PP_PARAMS(i,typename U) > struct apply \ : name< BOOST_MPL_PP_PARAMS(i,U) > \ { \ }; \ /**/ #else // __EDG_VERSION__ namespace boost { namespace mpl { namespace aux { template< typename T > struct has_rebind_tag; }}} # define BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(i, name, params) \ typedef BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::int_ arity; \ BOOST_PP_LIST_FOR_EACH_I_R( \ 1 \ , BOOST_MPL_AUX_LAMBDA_SUPPORT_ARG_TYPEDEF_FUNC \ , typedef \ , BOOST_PP_TUPLE_TO_LIST(i,params) \ ) \ friend class BOOST_PP_CAT(name,_rebind); \ typedef BOOST_PP_CAT(name,_rebind) rebind; \ /**/ #if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x610)) # define BOOST_MPL_AUX_LAMBDA_SUPPORT_HAS_REBIND(i, name, params) \ template< BOOST_MPL_PP_PARAMS(i,typename T) > \ ::boost::mpl::aux::yes_tag operator|( \ ::boost::mpl::aux::has_rebind_tag \ , name* \ ); \ ::boost::mpl::aux::no_tag operator|( \ ::boost::mpl::aux::has_rebind_tag \ , name< BOOST_MPL_PP_ENUM(i,::boost::mpl::na) >* \ ); \ /**/ #elif !BOOST_WORKAROUND(BOOST_MSVC, < 1300) # define BOOST_MPL_AUX_LAMBDA_SUPPORT_HAS_REBIND(i, name, params) \ template< BOOST_MPL_PP_PARAMS(i,typename T) > \ ::boost::mpl::aux::yes_tag operator|( \ ::boost::mpl::aux::has_rebind_tag \ , ::boost::mpl::aux::has_rebind_tag< name >* \ ); \ /**/ #else # define BOOST_MPL_AUX_LAMBDA_SUPPORT_HAS_REBIND(i, name, params) /**/ #endif # if !defined(__BORLANDC__) # define BOOST_MPL_AUX_LAMBDA_SUPPORT(i, name, params) \ BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(i, name, params) \ }; \ BOOST_MPL_AUX_LAMBDA_SUPPORT_HAS_REBIND(i, name, params) \ class BOOST_PP_CAT(name,_rebind) \ { \ public: \ template< BOOST_MPL_PP_PARAMS(i,typename U) > struct apply \ : name< BOOST_MPL_PP_PARAMS(i,U) > \ { \ }; \ /**/ # else # define BOOST_MPL_AUX_LAMBDA_SUPPORT(i, name, params) \ BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(i, name, params) \ }; \ BOOST_MPL_AUX_LAMBDA_SUPPORT_HAS_REBIND(i, name, params) \ class BOOST_PP_CAT(name,_rebind) \ { \ public: \ template< BOOST_MPL_PP_PARAMS(i,typename U) > struct apply \ { \ typedef typename name< BOOST_MPL_PP_PARAMS(i,U) >::type type; \ }; \ /**/ # endif // __BORLANDC__ #endif // __EDG_VERSION__ #endif // BOOST_MPL_CFG_NO_FULL_LAMBDA_SUPPORT #endif // BOOST_MPL_AUX_LAMBDA_SUPPORT_HPP_INCLUDED ================================================ FILE: benchmarks/boost/mpl/aux_/logical_op.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ // NO INCLUDE GUARDS, THE HEADER IS INTENDED FOR MULTIPLE INCLUSION! #if !defined(BOOST_MPL_PREPROCESSING_MODE) # include # include # include # include #endif #include #include #include #include #include #include #include #include #include #include #include namespace boost { namespace mpl { # define AUX778076_PARAMS(param, sub) \ BOOST_MPL_PP_PARAMS( \ BOOST_MPL_PP_SUB(BOOST_MPL_LIMIT_METAFUNCTION_ARITY, sub) \ , param \ ) \ /**/ # define AUX778076_SHIFTED_PARAMS(param, sub) \ BOOST_MPL_PP_EXT_PARAMS( \ 2, BOOST_MPL_PP_SUB(BOOST_PP_INC(BOOST_MPL_LIMIT_METAFUNCTION_ARITY), sub) \ , param \ ) \ /**/ # define AUX778076_SPEC_PARAMS(param) \ BOOST_MPL_PP_ENUM( \ BOOST_PP_DEC(BOOST_MPL_LIMIT_METAFUNCTION_ARITY) \ , param \ ) \ /**/ namespace aux { #if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) template< bool C_, AUX778076_PARAMS(typename T, 1) > struct BOOST_PP_CAT(AUX778076_OP_NAME,impl) : BOOST_PP_CAT(AUX778076_OP_VALUE1,_) { }; template< AUX778076_PARAMS(typename T, 1) > struct BOOST_PP_CAT(AUX778076_OP_NAME,impl)< AUX778076_OP_VALUE2,AUX778076_PARAMS(T, 1) > : BOOST_PP_CAT(AUX778076_OP_NAME,impl)< BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value , AUX778076_SHIFTED_PARAMS(T, 1) , BOOST_PP_CAT(AUX778076_OP_VALUE2,_) > { }; template<> struct BOOST_PP_CAT(AUX778076_OP_NAME,impl)< AUX778076_OP_VALUE2 , AUX778076_SPEC_PARAMS(BOOST_PP_CAT(AUX778076_OP_VALUE2,_)) > : BOOST_PP_CAT(AUX778076_OP_VALUE2,_) { }; #else template< bool C_ > struct BOOST_PP_CAT(AUX778076_OP_NAME,impl) { template< AUX778076_PARAMS(typename T, 1) > struct result_ : BOOST_PP_CAT(AUX778076_OP_VALUE1,_) { }; }; template<> struct BOOST_PP_CAT(AUX778076_OP_NAME,impl) { template< AUX778076_PARAMS(typename T, 1) > struct result_ : BOOST_PP_CAT(AUX778076_OP_NAME,impl)< BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value >::template result_< AUX778076_SHIFTED_PARAMS(T,1),BOOST_PP_CAT(AUX778076_OP_VALUE2,_) > { }; #if BOOST_WORKAROUND(BOOST_MSVC, == 1300) template<> struct result_ : BOOST_PP_CAT(AUX778076_OP_VALUE2,_) { }; }; #else }; template<> struct BOOST_PP_CAT(AUX778076_OP_NAME,impl) ::result_< AUX778076_SPEC_PARAMS(BOOST_PP_CAT(AUX778076_OP_VALUE2,_)) > : BOOST_PP_CAT(AUX778076_OP_VALUE2,_) { }; #endif // BOOST_MSVC == 1300 #endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION } // namespace aux template< typename BOOST_MPL_AUX_NA_PARAM(T1) , typename BOOST_MPL_AUX_NA_PARAM(T2) BOOST_MPL_PP_DEF_PARAMS_TAIL(2, typename T, BOOST_PP_CAT(AUX778076_OP_VALUE2,_)) > struct AUX778076_OP_NAME #if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) : aux::BOOST_PP_CAT(AUX778076_OP_NAME,impl)< BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value , AUX778076_SHIFTED_PARAMS(T,0) > #else : aux::BOOST_PP_CAT(AUX778076_OP_NAME,impl)< BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value >::template result_< AUX778076_SHIFTED_PARAMS(T,0) > #endif { BOOST_MPL_AUX_LAMBDA_SUPPORT( BOOST_MPL_LIMIT_METAFUNCTION_ARITY , AUX778076_OP_NAME , (AUX778076_PARAMS(T, 0)) ) }; BOOST_MPL_AUX_NA_SPEC2( 2 , BOOST_MPL_LIMIT_METAFUNCTION_ARITY , AUX778076_OP_NAME ) }} #undef AUX778076_SPEC_PARAMS #undef AUX778076_SHIFTED_PARAMS #undef AUX778076_PARAMS #undef AUX778076_OP_NAME #undef AUX778076_OP_VALUE1 #undef AUX778076_OP_VALUE2 ================================================ FILE: benchmarks/boost/mpl/aux_/msvc_dtw.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ // NO INCLUDE GUARDS, THE HEADER IS INTENDED FOR MULTIPLE INCLUSION! #include // local macros, #undef-ined at the end of the header #define AUX778076_DTW_PARAMS(param) \ BOOST_MPL_PP_PARAMS(AUX778076_MSVC_DTW_ARITY, param) \ /**/ #define AUX778076_DTW_ORIGINAL_NAME \ AUX778076_MSVC_DTW_ORIGINAL_NAME \ /**/ // warning: not a well-formed C++ // workaround for MSVC 6.5's "dependent template typedef bug" template< typename F> struct AUX778076_MSVC_DTW_NAME { template< bool > struct f_ : F {}; template<> struct f_ { #if AUX778076_MSVC_DTW_ARITY > 0 template< AUX778076_DTW_PARAMS(typename P) > struct AUX778076_DTW_ORIGINAL_NAME { typedef int type; }; }; template< AUX778076_DTW_PARAMS(typename T) > struct result_ : f_< aux::msvc_never_true::value > ::template AUX778076_DTW_ORIGINAL_NAME< AUX778076_DTW_PARAMS(T) > { }; #else template< typename P = int > struct AUX778076_DTW_ORIGINAL_NAME { typedef int type; }; }; template< typename T = int > struct result_ : f_< aux::msvc_never_true::value > ::template AUX778076_DTW_ORIGINAL_NAME<> { }; #endif }; #undef AUX778076_DTW_ORIGINAL_NAME #undef AUX778076_DTW_PARAMS #undef AUX778076_MSVC_DTW_NAME #undef AUX778076_MSVC_DTW_ORIGINAL_NAME #undef AUX778076_MSVC_DTW_ARITY ================================================ FILE: benchmarks/boost/mpl/aux_/msvc_eti_base.hpp ================================================ #ifndef BOOST_MPL_AUX_MSVC_ETI_BASE_HPP_INCLUDED #define BOOST_MPL_AUX_MSVC_ETI_BASE_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ #include #include #include #include namespace boost { namespace mpl { namespace aux { #if defined(BOOST_MPL_CFG_MSVC_70_ETI_BUG) template< bool > struct msvc_eti_base_impl { template< typename T > struct result_ : T { typedef T type; }; }; template<> struct msvc_eti_base_impl { template< typename T > struct result_ { typedef result_ type; typedef result_ first; typedef result_ second; typedef result_ tag; enum { value = 0 }; }; }; template< typename T > struct msvc_eti_base : msvc_eti_base_impl< is_msvc_eti_arg::value > ::template result_ { }; #else // !BOOST_MPL_CFG_MSVC_70_ETI_BUG template< typename T > struct msvc_eti_base : T { #if BOOST_WORKAROUND(BOOST_MPL_CFG_GCC, BOOST_TESTED_AT(0x0304)) msvc_eti_base(); #endif typedef T type; }; #endif template<> struct msvc_eti_base { typedef msvc_eti_base type; typedef msvc_eti_base first; typedef msvc_eti_base second; typedef msvc_eti_base tag; enum { value = 0 }; }; }}} #endif // BOOST_MPL_AUX_MSVC_ETI_BASE_HPP_INCLUDED ================================================ FILE: benchmarks/boost/mpl/aux_/msvc_is_class.hpp ================================================ #ifndef BOOST_MPL_AUX_MSVC_IS_CLASS_HPP_INCLUDED #define BOOST_MPL_AUX_MSVC_IS_CLASS_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2002-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ #include #include #include #include #include namespace boost { namespace mpl { namespace aux { template< typename T > struct is_class_helper { typedef int (T::* type)(); }; // MSVC 6.x-specific lightweight 'is_class' implementation; // Distinguishing feature: does not instantiate the type being tested. template< typename T > struct msvc_is_class_impl { template< typename U> static yes_tag test(type_wrapper*, /*typename*/ is_class_helper::type = 0); static no_tag test(void const volatile*, ...); enum { value = sizeof(test((type_wrapper*)0)) == sizeof(yes_tag) }; typedef bool_ type; }; // agurt, 17/sep/04: have to check for 'is_reference' upfront to avoid ICEs in // complex metaprograms template< typename T > struct msvc_is_class : if_< is_reference , false_ , msvc_is_class_impl >::type { }; }}} #endif // BOOST_MPL_AUX_MSVC_IS_CLASS_HPP_INCLUDED ================================================ FILE: benchmarks/boost/mpl/aux_/msvc_never_true.hpp ================================================ #ifndef BOOST_MPL_AUX_MSVC_NEVER_TRUE_HPP_INCLUDED #define BOOST_MPL_AUX_MSVC_NEVER_TRUE_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ #include #include #if BOOST_WORKAROUND(BOOST_MSVC, <= 1300) namespace boost { namespace mpl { namespace aux { template< typename T > struct msvc_never_true { enum { value = false }; }; }}} #endif // BOOST_MSVC #endif // BOOST_MPL_AUX_MSVC_NEVER_TRUE_HPP_INCLUDED ================================================ FILE: benchmarks/boost/mpl/aux_/msvc_type.hpp ================================================ #ifndef BOOST_MPL_AUX_MSVC_TYPE_HPP_INCLUDED #define BOOST_MPL_AUX_MSVC_TYPE_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ #include #include namespace boost { namespace mpl { namespace aux { #if defined(BOOST_MPL_CFG_MSVC_70_ETI_BUG) template< bool > struct msvc_type_impl { template< typename T > struct result_ { typedef typename T::type type; }; }; template<> struct msvc_type_impl { template< typename T > struct result_ { typedef result_ type; }; }; template< typename T > struct msvc_type : msvc_type_impl< is_msvc_eti_arg::value > ::template result_ { }; #else // BOOST_MPL_CFG_MSVC_70_ETI_BUG template< typename T > struct msvc_type { typedef typename T::type type; }; template<> struct msvc_type { typedef int type; }; #endif }}} #endif // BOOST_MPL_AUX_MSVC_TYPE_HPP_INCLUDED ================================================ FILE: benchmarks/boost/mpl/aux_/na.hpp ================================================ #ifndef BOOST_MPL_AUX_NA_HPP_INCLUDED #define BOOST_MPL_AUX_NA_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ #include #include #include #include namespace boost { namespace mpl { template< typename T > struct is_na : false_ { #if BOOST_WORKAROUND(BOOST_MSVC, < 1300) using false_::value; #endif }; template<> struct is_na : true_ { #if BOOST_WORKAROUND(BOOST_MSVC, < 1300) using true_::value; #endif }; template< typename T > struct is_not_na : true_ { #if BOOST_WORKAROUND(BOOST_MSVC, < 1300) using true_::value; #endif }; template<> struct is_not_na : false_ { #if BOOST_WORKAROUND(BOOST_MSVC, < 1300) using false_::value; #endif }; #if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) template< typename T, typename U > struct if_na { typedef T type; }; template< typename U > struct if_na { typedef U type; }; #else template< typename T > struct if_na_impl { template< typename U > struct apply { typedef T type; }; }; template<> struct if_na_impl { template< typename U > struct apply { typedef U type; }; }; template< typename T, typename U > struct if_na : if_na_impl::template apply { }; #endif }} #endif // BOOST_MPL_AUX_NA_HPP_INCLUDED ================================================ FILE: benchmarks/boost/mpl/aux_/na_assert.hpp ================================================ #ifndef BOOST_MPL_AUX_NA_ASSERT_HPP_INCLUDED #define BOOST_MPL_AUX_NA_ASSERT_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ #include #include #include #if !BOOST_WORKAROUND(_MSC_FULL_VER, <= 140050601) \ && !BOOST_WORKAROUND(__EDG_VERSION__, <= 243) # include # define BOOST_MPL_AUX_ASSERT_NOT_NA(x) \ BOOST_MPL_ASSERT_NOT((boost::mpl::is_na)) \ /**/ #else # include # define BOOST_MPL_AUX_ASSERT_NOT_NA(x) \ BOOST_STATIC_ASSERT(!boost::mpl::is_na::value) \ /**/ #endif #endif // BOOST_MPL_AUX_NA_ASSERT_HPP_INCLUDED ================================================ FILE: benchmarks/boost/mpl/aux_/na_fwd.hpp ================================================ #ifndef BOOST_MPL_AUX_NA_FWD_HPP_INCLUDED #define BOOST_MPL_AUX_NA_FWD_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ #include BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN // n.a. == not available struct na { typedef na type; enum { value = 0 }; }; BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE BOOST_MPL_AUX_ADL_BARRIER_DECL(na) #endif // BOOST_MPL_AUX_NA_FWD_HPP_INCLUDED ================================================ FILE: benchmarks/boost/mpl/aux_/na_spec.hpp ================================================ #ifndef BOOST_MPL_AUX_NA_SPEC_HPP_INCLUDED #define BOOST_MPL_AUX_NA_SPEC_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ #if !defined(BOOST_MPL_PREPROCESSING_MODE) # include # include # include # include # include # include #endif #include #include #include #include #include #include #include #include #include #include #define BOOST_MPL_AUX_NA_PARAMS(i) \ BOOST_MPL_PP_ENUM(i, na) \ /**/ #if defined(BOOST_MPL_CFG_BROKEN_DEFAULT_PARAMETERS_IN_NESTED_TEMPLATES) # define BOOST_MPL_AUX_NA_SPEC_ARITY(i, name) \ namespace aux { \ template< BOOST_MPL_AUX_NTTP_DECL(int, N) > \ struct arity< \ name< BOOST_MPL_AUX_NA_PARAMS(i) > \ , N \ > \ : int_< BOOST_MPL_LIMIT_METAFUNCTION_ARITY > \ { \ }; \ } \ /**/ #else # define BOOST_MPL_AUX_NA_SPEC_ARITY(i, name) /**/ #endif #define BOOST_MPL_AUX_NA_SPEC_MAIN(i, name) \ template<> \ struct name< BOOST_MPL_AUX_NA_PARAMS(i) > \ { \ template< \ BOOST_MPL_PP_PARAMS(i, typename T) \ BOOST_MPL_PP_NESTED_DEF_PARAMS_TAIL(i, typename T, na) \ > \ struct apply \ : name< BOOST_MPL_PP_PARAMS(i, T) > \ { \ }; \ }; \ /**/ #if defined(BOOST_MPL_CFG_NO_FULL_LAMBDA_SUPPORT) # define BOOST_MPL_AUX_NA_SPEC_LAMBDA(i, name) \ template<> \ struct lambda< \ name< BOOST_MPL_AUX_NA_PARAMS(i) > \ , void_ \ , true_ \ > \ { \ typedef false_ is_le; \ typedef name< BOOST_MPL_AUX_NA_PARAMS(i) > type; \ }; \ template<> \ struct lambda< \ name< BOOST_MPL_AUX_NA_PARAMS(i) > \ , void_ \ , false_ \ > \ { \ typedef false_ is_le; \ typedef name< BOOST_MPL_AUX_NA_PARAMS(i) > type; \ }; \ /**/ #else # define BOOST_MPL_AUX_NA_SPEC_LAMBDA(i, name) \ template< typename Tag > \ struct lambda< \ name< BOOST_MPL_AUX_NA_PARAMS(i) > \ , Tag \ BOOST_MPL_AUX_LAMBDA_ARITY_PARAM(int_<-1>) \ > \ { \ typedef false_ is_le; \ typedef name< BOOST_MPL_AUX_NA_PARAMS(i) > result_; \ typedef name< BOOST_MPL_AUX_NA_PARAMS(i) > type; \ }; \ /**/ #endif #if defined(BOOST_MPL_CFG_EXTENDED_TEMPLATE_PARAMETERS_MATCHING) \ || defined(BOOST_MPL_CFG_NO_FULL_LAMBDA_SUPPORT) \ && defined(BOOST_MPL_CFG_BROKEN_OVERLOAD_RESOLUTION) # define BOOST_MPL_AUX_NA_SPEC_TEMPLATE_ARITY(i, j, name) \ namespace aux { \ template< BOOST_MPL_PP_PARAMS(j, typename T) > \ struct template_arity< \ name< BOOST_MPL_PP_PARAMS(j, T) > \ > \ : int_ \ { \ }; \ \ template<> \ struct template_arity< \ name< BOOST_MPL_PP_ENUM(i, na) > \ > \ : int_<-1> \ { \ }; \ } \ /**/ #else # define BOOST_MPL_AUX_NA_SPEC_TEMPLATE_ARITY(i, j, name) /**/ #endif #if defined(BOOST_MPL_CFG_MSVC_ETI_BUG) # define BOOST_MPL_AUX_NA_SPEC_ETI(i, name) \ template<> \ struct name< BOOST_MPL_PP_ENUM(i, int) > \ { \ typedef int type; \ enum { value = 0 }; \ }; \ /**/ #else # define BOOST_MPL_AUX_NA_SPEC_ETI(i, name) /**/ #endif #define BOOST_MPL_AUX_NA_PARAM(param) param = na #define BOOST_MPL_AUX_NA_SPEC_NO_ETI(i, name) \ BOOST_MPL_AUX_NA_SPEC_MAIN(i, name) \ BOOST_MPL_AUX_NA_SPEC_LAMBDA(i, name) \ BOOST_MPL_AUX_NA_SPEC_ARITY(i, name) \ BOOST_MPL_AUX_NA_SPEC_TEMPLATE_ARITY(i, i, name) \ /**/ #define BOOST_MPL_AUX_NA_SPEC(i, name) \ BOOST_MPL_AUX_NA_SPEC_NO_ETI(i, name) \ BOOST_MPL_AUX_NA_SPEC_ETI(i, name) \ /**/ #define BOOST_MPL_AUX_NA_SPEC2(i, j, name) \ BOOST_MPL_AUX_NA_SPEC_MAIN(i, name) \ BOOST_MPL_AUX_NA_SPEC_ETI(i, name) \ BOOST_MPL_AUX_NA_SPEC_LAMBDA(i, name) \ BOOST_MPL_AUX_NA_SPEC_ARITY(i, name) \ BOOST_MPL_AUX_NA_SPEC_TEMPLATE_ARITY(i, j, name) \ /**/ #endif // BOOST_MPL_AUX_NA_SPEC_HPP_INCLUDED ================================================ FILE: benchmarks/boost/mpl/aux_/nested_type_wknd.hpp ================================================ #ifndef BOOST_MPL_AUX_NESTED_TYPE_WKND_HPP_INCLUDED #define BOOST_MPL_AUX_NESTED_TYPE_WKND_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ #include #include #if BOOST_WORKAROUND(BOOST_MPL_CFG_GCC, BOOST_TESTED_AT(0x0302)) \ || BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x561)) \ || BOOST_WORKAROUND(__SUNPRO_CC, BOOST_TESTED_AT(0x530)) \ || BOOST_WORKAROUND(__DMC__, BOOST_TESTED_AT(0x840)) namespace boost { namespace mpl { namespace aux { template< typename T > struct nested_type_wknd : T::type { }; }}} #if BOOST_WORKAROUND(__DMC__, BOOST_TESTED_AT(0x840)) # define BOOST_MPL_AUX_NESTED_TYPE_WKND(T) \ aux::nested_type_wknd \ /**/ #else # define BOOST_MPL_AUX_NESTED_TYPE_WKND(T) \ ::boost::mpl::aux::nested_type_wknd \ /**/ #endif #else // !BOOST_MPL_CFG_GCC et al. # define BOOST_MPL_AUX_NESTED_TYPE_WKND(T) T::type #endif #endif // BOOST_MPL_AUX_NESTED_TYPE_WKND_HPP_INCLUDED ================================================ FILE: benchmarks/boost/mpl/aux_/nttp_decl.hpp ================================================ #ifndef BOOST_MPL_AUX_NTTP_DECL_HPP_INCLUDED #define BOOST_MPL_AUX_NTTP_DECL_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ #include #if defined(BOOST_MPL_CFG_NTTP_BUG) typedef bool _mpl_nttp_bool; typedef int _mpl_nttp_int; typedef unsigned _mpl_nttp_unsigned; typedef long _mpl_nttp_long; # include # define BOOST_MPL_AUX_NTTP_DECL(T, x) BOOST_PP_CAT(_mpl_nttp_,T) x /**/ #else # define BOOST_MPL_AUX_NTTP_DECL(T, x) T x /**/ #endif #endif // BOOST_MPL_AUX_NTTP_DECL_HPP_INCLUDED ================================================ FILE: benchmarks/boost/mpl/aux_/overload_names.hpp ================================================ #ifndef BOOST_MPL_AUX_OVERLOAD_NAMES_HPP_INCLUDED #define BOOST_MPL_AUX_OVERLOAD_NAMES_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ #include #include #if defined(BOOST_MPL_CFG_USE_OPERATORS_OVERLOADING) # include # define BOOST_MPL_AUX_OVERLOAD_VALUE_BY_KEY operator/ # define BOOST_MPL_AUX_OVERLOAD_ITEM_BY_ORDER operator| # define BOOST_MPL_AUX_OVERLOAD_ORDER_BY_KEY operator|| # define BOOST_MPL_AUX_OVERLOAD_IS_MASKED operator% # define BOOST_MPL_AUX_OVERLOAD_CALL_VALUE_BY_KEY(T, x) BOOST_MPL_AUX_PTR_TO_REF(T) / x # define BOOST_MPL_AUX_OVERLOAD_CALL_ITEM_BY_ORDER(T, x) BOOST_MPL_AUX_PTR_TO_REF(T) | x # define BOOST_MPL_AUX_OVERLOAD_CALL_ORDER_BY_KEY(T, x) BOOST_MPL_AUX_PTR_TO_REF(T) || x # define BOOST_MPL_AUX_OVERLOAD_CALL_IS_MASKED(T, x) BOOST_MPL_AUX_PTR_TO_REF(T) % x #else # define BOOST_MPL_AUX_OVERLOAD_VALUE_BY_KEY value_by_key_ # define BOOST_MPL_AUX_OVERLOAD_ITEM_BY_ORDER item_by_order_ # define BOOST_MPL_AUX_OVERLOAD_ORDER_BY_KEY order_by_key_ # define BOOST_MPL_AUX_OVERLOAD_IS_MASKED is_masked_ # define BOOST_MPL_AUX_OVERLOAD_CALL_VALUE_BY_KEY(T, x) T::BOOST_MPL_AUX_OVERLOAD_VALUE_BY_KEY( BOOST_MPL_AUX_PTR_TO_REF(T), x ) # define BOOST_MPL_AUX_OVERLOAD_CALL_ITEM_BY_ORDER(T, x) T::BOOST_MPL_AUX_OVERLOAD_ITEM_BY_ORDER( BOOST_MPL_AUX_PTR_TO_REF(T), x ) # define BOOST_MPL_AUX_OVERLOAD_CALL_ORDER_BY_KEY(T, x) T::BOOST_MPL_AUX_OVERLOAD_ORDER_BY_KEY( BOOST_MPL_AUX_PTR_TO_REF(T), x ) # define BOOST_MPL_AUX_OVERLOAD_CALL_IS_MASKED(T, x) T::BOOST_MPL_AUX_OVERLOAD_IS_MASKED( BOOST_MPL_AUX_PTR_TO_REF(T), x ) #endif #endif // BOOST_MPL_AUX_OVERLOAD_NAMES_HPP_INCLUDED ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/bcc/advance_backward.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // *Preprocessed* version of the main "advance_backward.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< long N > struct advance_backward; template<> struct advance_backward<0> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef iter0 type; }; }; template<> struct advance_backward<1> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef typename prior::type iter1; typedef iter1 type; }; }; template<> struct advance_backward<2> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef typename prior::type iter1; typedef typename prior::type iter2; typedef iter2 type; }; }; template<> struct advance_backward<3> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef typename prior::type iter1; typedef typename prior::type iter2; typedef typename prior::type iter3; typedef iter3 type; }; }; template<> struct advance_backward<4> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef typename prior::type iter1; typedef typename prior::type iter2; typedef typename prior::type iter3; typedef typename prior::type iter4; typedef iter4 type; }; }; template< long N > struct advance_backward { template< typename Iterator > struct apply { typedef typename apply_wrap1< advance_backward<4> , Iterator >::type chunk_result_; typedef typename apply_wrap1< advance_backward<( (N - 4) < 0 ? 0 : N - 4 )> , chunk_result_ >::type type; }; }; }}} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/bcc/advance_forward.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // *Preprocessed* version of the main "advance_forward.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< long N > struct advance_forward; template<> struct advance_forward<0> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef iter0 type; }; }; template<> struct advance_forward<1> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef typename next::type iter1; typedef iter1 type; }; }; template<> struct advance_forward<2> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef typename next::type iter1; typedef typename next::type iter2; typedef iter2 type; }; }; template<> struct advance_forward<3> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef typename next::type iter1; typedef typename next::type iter2; typedef typename next::type iter3; typedef iter3 type; }; }; template<> struct advance_forward<4> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef typename next::type iter1; typedef typename next::type iter2; typedef typename next::type iter3; typedef typename next::type iter4; typedef iter4 type; }; }; template< long N > struct advance_forward { template< typename Iterator > struct apply { typedef typename apply_wrap1< advance_forward<4> , Iterator >::type chunk_result_; typedef typename apply_wrap1< advance_forward<( (N - 4) < 0 ? 0 : N - 4 )> , chunk_result_ >::type type; }; }; }}} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/bcc/and.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // *Preprocessed* version of the main "and.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< bool C_, typename T1, typename T2, typename T3, typename T4 > struct and_impl : false_ { }; template< typename T1, typename T2, typename T3, typename T4 > struct and_impl< true,T1,T2,T3,T4 > : and_impl< BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value , T2, T3, T4 , true_ > { }; template<> struct and_impl< true , true_, true_, true_, true_ > : true_ { }; } // namespace aux template< typename BOOST_MPL_AUX_NA_PARAM(T1) , typename BOOST_MPL_AUX_NA_PARAM(T2) , typename T3 = true_, typename T4 = true_, typename T5 = true_ > struct and_ : aux::and_impl< BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value , T2, T3, T4, T5 > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , and_ , ( T1, T2, T3, T4, T5) ) }; BOOST_MPL_AUX_NA_SPEC2( 2 , 5 , and_ ) }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/bcc/apply.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // *Preprocessed* version of the main "apply.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename F > struct apply0 : apply_wrap0< typename lambda::type > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 1 , apply0 , (F ) ) }; template< typename F > struct apply< F,na,na,na,na,na > : apply0 { }; template< typename F, typename T1 > struct apply1 : apply_wrap1< typename lambda::type , T1 > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 2 , apply1 , (F, T1) ) }; template< typename F, typename T1 > struct apply< F,T1,na,na,na,na > : apply1< F,T1 > { }; template< typename F, typename T1, typename T2 > struct apply2 : apply_wrap2< typename lambda::type , T1, T2 > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 3 , apply2 , (F, T1, T2) ) }; template< typename F, typename T1, typename T2 > struct apply< F,T1,T2,na,na,na > : apply2< F,T1,T2 > { }; template< typename F, typename T1, typename T2, typename T3 > struct apply3 : apply_wrap3< typename lambda::type , T1, T2, T3 > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 4 , apply3 , (F, T1, T2, T3) ) }; template< typename F, typename T1, typename T2, typename T3 > struct apply< F,T1,T2,T3,na,na > : apply3< F,T1,T2,T3 > { }; template< typename F, typename T1, typename T2, typename T3, typename T4 > struct apply4 : apply_wrap4< typename lambda::type , T1, T2, T3, T4 > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , apply4 , (F, T1, T2, T3, T4) ) }; template< typename F, typename T1, typename T2, typename T3, typename T4 > struct apply< F,T1,T2,T3,T4,na > : apply4< F,T1,T2,T3,T4 > { }; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct apply5 : apply_wrap5< typename lambda::type , T1, T2, T3, T4, T5 > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 6 , apply5 , (F, T1, T2, T3, T4, T5) ) }; /// primary template (not a specialization!) template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct apply : apply5< F,T1,T2,T3,T4,T5 > { }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/bcc/apply_fwd.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // *Preprocessed* version of the main "apply_fwd.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename F, typename T1 = na, typename T2 = na, typename T3 = na , typename T4 = na, typename T5 = na > struct apply; template< typename F > struct apply0; template< typename F, typename T1 > struct apply1; template< typename F, typename T1, typename T2 > struct apply2; template< typename F, typename T1, typename T2, typename T3 > struct apply3; template< typename F, typename T1, typename T2, typename T3, typename T4 > struct apply4; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct apply5; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/bcc/apply_wrap.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2008 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // *Preprocessed* version of the main "apply_wrap.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< int N, typename F > struct apply_wrap_impl0; template< typename F, bool F_has_apply > struct apply_wrap_impl0_bcb { typedef typename F::template apply type; }; template< typename F > struct apply_wrap_impl0_bcb< F,true > { typedef typename F::apply type; }; template< typename F > struct apply_wrap_impl0< 0 , F > { typedef apply_wrap_impl0_bcb< F, aux::has_apply::value >::type type; }; template< typename F > struct apply_wrap_impl0< 1 , F > { typedef typename F::template apply< na > type; }; template< typename F > struct apply_wrap_impl0< 2 , F > { typedef typename F::template apply< na, na > type; }; template< typename F > struct apply_wrap_impl0< 3 , F > { typedef typename F::template apply< na, na, na > type; }; template< typename F > struct apply_wrap_impl0< 4 , F > { typedef typename F::template apply< na, na, na, na > type; }; template< typename F > struct apply_wrap_impl0< 5 , F > { typedef typename F::template apply< na, na, na, na, na > type; }; template< typename F > struct apply_wrap0 : apply_wrap_impl0< ::boost::mpl::aux::arity< F,0 >::value , F >::type { }; template< int N, typename F, typename T1 > struct apply_wrap_impl1; template< typename F, typename T1 > struct apply_wrap_impl1< 1 , F , T1 > { typedef typename F::template apply< T1 > type; }; template< typename F, typename T1 > struct apply_wrap_impl1< 2 , F , T1 > { typedef typename F::template apply< T1 , na > type; }; template< typename F, typename T1 > struct apply_wrap_impl1< 3 , F , T1 > { typedef typename F::template apply< T1 , na, na > type; }; template< typename F, typename T1 > struct apply_wrap_impl1< 4 , F , T1 > { typedef typename F::template apply< T1 , na, na, na > type; }; template< typename F, typename T1 > struct apply_wrap_impl1< 5 , F , T1 > { typedef typename F::template apply< T1 , na, na, na, na > type; }; template< typename F, typename T1 > struct apply_wrap1 : apply_wrap_impl1< ::boost::mpl::aux::arity< F,1 >::value , F , T1 >::type { }; template< int N, typename F, typename T1, typename T2 > struct apply_wrap_impl2; template< typename F, typename T1, typename T2 > struct apply_wrap_impl2< 2 , F , T1, T2 > { typedef typename F::template apply< T1, T2 > type; }; template< typename F, typename T1, typename T2 > struct apply_wrap_impl2< 3 , F , T1, T2 > { typedef typename F::template apply< T1, T2 , na > type; }; template< typename F, typename T1, typename T2 > struct apply_wrap_impl2< 4 , F , T1, T2 > { typedef typename F::template apply< T1, T2 , na, na > type; }; template< typename F, typename T1, typename T2 > struct apply_wrap_impl2< 5 , F , T1, T2 > { typedef typename F::template apply< T1, T2 , na, na, na > type; }; template< typename F, typename T1, typename T2 > struct apply_wrap2 : apply_wrap_impl2< ::boost::mpl::aux::arity< F,2 >::value , F , T1, T2 >::type { }; template< int N, typename F, typename T1, typename T2, typename T3 > struct apply_wrap_impl3; template< typename F, typename T1, typename T2, typename T3 > struct apply_wrap_impl3< 3 , F , T1, T2, T3 > { typedef typename F::template apply< T1, T2, T3 > type; }; template< typename F, typename T1, typename T2, typename T3 > struct apply_wrap_impl3< 4 , F , T1, T2, T3 > { typedef typename F::template apply< T1, T2, T3 , na > type; }; template< typename F, typename T1, typename T2, typename T3 > struct apply_wrap_impl3< 5 , F , T1, T2, T3 > { typedef typename F::template apply< T1, T2, T3 , na, na > type; }; template< typename F, typename T1, typename T2, typename T3 > struct apply_wrap3 : apply_wrap_impl3< ::boost::mpl::aux::arity< F,3 >::value , F , T1, T2, T3 >::type { }; template< int N, typename F, typename T1, typename T2, typename T3, typename T4 > struct apply_wrap_impl4; template< typename F, typename T1, typename T2, typename T3, typename T4 > struct apply_wrap_impl4< 4 , F , T1, T2, T3, T4 > { typedef typename F::template apply< T1, T2, T3, T4 > type; }; template< typename F, typename T1, typename T2, typename T3, typename T4 > struct apply_wrap_impl4< 5 , F , T1, T2, T3, T4 > { typedef typename F::template apply< T1, T2, T3, T4 , na > type; }; template< typename F, typename T1, typename T2, typename T3, typename T4 > struct apply_wrap4 : apply_wrap_impl4< ::boost::mpl::aux::arity< F,4 >::value , F , T1, T2, T3, T4 >::type { }; template< int N, typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct apply_wrap_impl5; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct apply_wrap_impl5< 5 , F , T1, T2, T3, T4, T5 > { typedef typename F::template apply< T1, T2, T3, T4, T5 > type; }; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct apply_wrap5 : apply_wrap_impl5< ::boost::mpl::aux::arity< F,5 >::value , F , T1, T2, T3, T4, T5 >::type { }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/bcc/arg.hpp ================================================ // Copyright Peter Dimov 2001-2002 // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // *Preprocessed* version of the main "arg.hpp" header // -- DO NOT modify by hand! BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN template<> struct arg< -1 > { BOOST_STATIC_CONSTANT(int, value = -1); BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) BOOST_MPL_AUX_ARG_TYPEDEF(na, type) template< typename U1, typename U2, typename U3, typename U4, typename U5 > struct apply { typedef U1 type; BOOST_MPL_AUX_ASSERT_NOT_NA(type); }; }; template<> struct arg<1> { BOOST_STATIC_CONSTANT(int, value = 1); typedef arg<2> next; BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) BOOST_MPL_AUX_ARG_TYPEDEF(na, type) template< typename U1, typename U2, typename U3, typename U4, typename U5 > struct apply { typedef U1 type; BOOST_MPL_AUX_ASSERT_NOT_NA(type); }; }; template<> struct arg<2> { BOOST_STATIC_CONSTANT(int, value = 2); typedef arg<3> next; BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) BOOST_MPL_AUX_ARG_TYPEDEF(na, type) template< typename U1, typename U2, typename U3, typename U4, typename U5 > struct apply { typedef U2 type; BOOST_MPL_AUX_ASSERT_NOT_NA(type); }; }; template<> struct arg<3> { BOOST_STATIC_CONSTANT(int, value = 3); typedef arg<4> next; BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) BOOST_MPL_AUX_ARG_TYPEDEF(na, type) template< typename U1, typename U2, typename U3, typename U4, typename U5 > struct apply { typedef U3 type; BOOST_MPL_AUX_ASSERT_NOT_NA(type); }; }; template<> struct arg<4> { BOOST_STATIC_CONSTANT(int, value = 4); typedef arg<5> next; BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) BOOST_MPL_AUX_ARG_TYPEDEF(na, type) template< typename U1, typename U2, typename U3, typename U4, typename U5 > struct apply { typedef U4 type; BOOST_MPL_AUX_ASSERT_NOT_NA(type); }; }; template<> struct arg<5> { BOOST_STATIC_CONSTANT(int, value = 5); typedef arg<6> next; BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) BOOST_MPL_AUX_ARG_TYPEDEF(na, type) template< typename U1, typename U2, typename U3, typename U4, typename U5 > struct apply { typedef U5 type; BOOST_MPL_AUX_ASSERT_NOT_NA(type); }; }; BOOST_MPL_AUX_NONTYPE_ARITY_SPEC(1,int, arg) BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/bcc/basic_bind.hpp ================================================ // Copyright Peter Dimov 2001 // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // *Preprocessed* version of the main "basic_bind.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< typename T, typename U1, typename U2, typename U3, typename U4 , typename U5 > struct resolve_bind_arg { typedef T type; }; template< int N, typename U1, typename U2, typename U3, typename U4, typename U5 > struct resolve_bind_arg< arg, U1, U2, U3, U4, U5 > { typedef typename apply_wrap5, U1, U2, U3, U4, U5>::type type; }; } // namespace aux template< typename F > struct bind0 { template< typename U1, typename U2, typename U3, typename U4, typename U5 > struct apply { private: typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; public: typedef typename apply_wrap0< f_ >::type type; }; }; namespace aux { template< typename F, typename U1, typename U2, typename U3, typename U4 , typename U5 > struct resolve_bind_arg< bind0, U1, U2, U3, U4, U5 > { typedef bind0 f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(1, bind0) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(1, bind0) template< typename F, typename T1 > struct bind1 { template< typename U1, typename U2, typename U3, typename U4, typename U5 > struct apply { private: typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; public: typedef typename apply_wrap1< f_ , typename t1::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename U1, typename U2, typename U3 , typename U4, typename U5 > struct resolve_bind_arg< bind1< F,T1 >, U1, U2, U3, U4, U5 > { typedef bind1< F,T1 > f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(2, bind1) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(2, bind1) template< typename F, typename T1, typename T2 > struct bind2 { template< typename U1, typename U2, typename U3, typename U4, typename U5 > struct apply { private: typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; public: typedef typename apply_wrap2< f_ , typename t1::type, typename t2::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename T2, typename U1, typename U2 , typename U3, typename U4, typename U5 > struct resolve_bind_arg< bind2< F,T1,T2 >, U1, U2, U3, U4, U5 > { typedef bind2< F,T1,T2 > f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(3, bind2) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(3, bind2) template< typename F, typename T1, typename T2, typename T3 > struct bind3 { template< typename U1, typename U2, typename U3, typename U4, typename U5 > struct apply { private: typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3; public: typedef typename apply_wrap3< f_ , typename t1::type, typename t2::type, typename t3::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename T2, typename T3, typename U1 , typename U2, typename U3, typename U4, typename U5 > struct resolve_bind_arg< bind3< F,T1,T2,T3 >, U1, U2, U3, U4, U5 > { typedef bind3< F,T1,T2,T3 > f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(4, bind3) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(4, bind3) template< typename F, typename T1, typename T2, typename T3, typename T4 > struct bind4 { template< typename U1, typename U2, typename U3, typename U4, typename U5 > struct apply { private: typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3; typedef aux::resolve_bind_arg< T4,U1,U2,U3,U4,U5 > t4; public: typedef typename apply_wrap4< f_ , typename t1::type, typename t2::type, typename t3::type , typename t4::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename T2, typename T3, typename T4 , typename U1, typename U2, typename U3, typename U4, typename U5 > struct resolve_bind_arg< bind4< F,T1,T2,T3,T4 >, U1, U2, U3, U4, U5 > { typedef bind4< F,T1,T2,T3,T4 > f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(5, bind4) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(5, bind4) template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct bind5 { template< typename U1, typename U2, typename U3, typename U4, typename U5 > struct apply { private: typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3; typedef aux::resolve_bind_arg< T4,U1,U2,U3,U4,U5 > t4; typedef aux::resolve_bind_arg< T5,U1,U2,U3,U4,U5 > t5; public: typedef typename apply_wrap5< f_ , typename t1::type, typename t2::type, typename t3::type , typename t4::type, typename t5::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5, typename U1, typename U2, typename U3, typename U4 , typename U5 > struct resolve_bind_arg< bind5< F,T1,T2,T3,T4,T5 >, U1, U2, U3, U4, U5 > { typedef bind5< F,T1,T2,T3,T4,T5 > f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(6, bind5) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(6, bind5) }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/bcc/bind.hpp ================================================ // Copyright Peter Dimov 2001 // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // *Preprocessed* version of the main "bind.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< typename T, typename U1, typename U2, typename U3, typename U4 , typename U5 > struct resolve_bind_arg { typedef T type; }; template< typename T , typename Arg > struct replace_unnamed_arg { typedef Arg next; typedef T type; }; template< typename Arg > struct replace_unnamed_arg< arg< -1 >, Arg > { typedef typename Arg::next next; typedef Arg type; }; template< int N, typename U1, typename U2, typename U3, typename U4, typename U5 > struct resolve_bind_arg< arg, U1, U2, U3, U4, U5 > { typedef typename apply_wrap5, U1, U2, U3, U4, U5>::type type; }; } // namespace aux template< typename F > struct bind0 { template< typename U1, typename U2, typename U3, typename U4, typename U5 > struct apply { private: typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; typedef typename r0::type a0; typedef typename r0::next n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; /// public: typedef typename apply_wrap0< f_ >::type type; }; }; namespace aux { template< typename F, typename U1, typename U2, typename U3, typename U4 , typename U5 > struct resolve_bind_arg< bind0, U1, U2, U3, U4, U5 > { typedef bind0 f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(1, bind0) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(1, bind0) template< typename F, typename T1 > struct bind1 { template< typename U1, typename U2, typename U3, typename U4, typename U5 > struct apply { private: typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; typedef typename r0::type a0; typedef typename r0::next n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; /// typedef aux::replace_unnamed_arg< T1,n1 > r1; typedef typename r1::type a1; typedef typename r1::next n2; typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; /// public: typedef typename apply_wrap1< f_ , typename t1::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename U1, typename U2, typename U3 , typename U4, typename U5 > struct resolve_bind_arg< bind1< F,T1 >, U1, U2, U3, U4, U5 > { typedef bind1< F,T1 > f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(2, bind1) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(2, bind1) template< typename F, typename T1, typename T2 > struct bind2 { template< typename U1, typename U2, typename U3, typename U4, typename U5 > struct apply { private: typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; typedef typename r0::type a0; typedef typename r0::next n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; /// typedef aux::replace_unnamed_arg< T1,n1 > r1; typedef typename r1::type a1; typedef typename r1::next n2; typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; /// typedef aux::replace_unnamed_arg< T2,n2 > r2; typedef typename r2::type a2; typedef typename r2::next n3; typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; /// public: typedef typename apply_wrap2< f_ , typename t1::type, typename t2::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename T2, typename U1, typename U2 , typename U3, typename U4, typename U5 > struct resolve_bind_arg< bind2< F,T1,T2 >, U1, U2, U3, U4, U5 > { typedef bind2< F,T1,T2 > f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(3, bind2) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(3, bind2) template< typename F, typename T1, typename T2, typename T3 > struct bind3 { template< typename U1, typename U2, typename U3, typename U4, typename U5 > struct apply { private: typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; typedef typename r0::type a0; typedef typename r0::next n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; /// typedef aux::replace_unnamed_arg< T1,n1 > r1; typedef typename r1::type a1; typedef typename r1::next n2; typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; /// typedef aux::replace_unnamed_arg< T2,n2 > r2; typedef typename r2::type a2; typedef typename r2::next n3; typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; /// typedef aux::replace_unnamed_arg< T3,n3 > r3; typedef typename r3::type a3; typedef typename r3::next n4; typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; /// public: typedef typename apply_wrap3< f_ , typename t1::type, typename t2::type, typename t3::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename T2, typename T3, typename U1 , typename U2, typename U3, typename U4, typename U5 > struct resolve_bind_arg< bind3< F,T1,T2,T3 >, U1, U2, U3, U4, U5 > { typedef bind3< F,T1,T2,T3 > f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(4, bind3) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(4, bind3) template< typename F, typename T1, typename T2, typename T3, typename T4 > struct bind4 { template< typename U1, typename U2, typename U3, typename U4, typename U5 > struct apply { private: typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; typedef typename r0::type a0; typedef typename r0::next n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; /// typedef aux::replace_unnamed_arg< T1,n1 > r1; typedef typename r1::type a1; typedef typename r1::next n2; typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; /// typedef aux::replace_unnamed_arg< T2,n2 > r2; typedef typename r2::type a2; typedef typename r2::next n3; typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; /// typedef aux::replace_unnamed_arg< T3,n3 > r3; typedef typename r3::type a3; typedef typename r3::next n4; typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; /// typedef aux::replace_unnamed_arg< T4,n4 > r4; typedef typename r4::type a4; typedef typename r4::next n5; typedef aux::resolve_bind_arg< a4,U1,U2,U3,U4,U5 > t4; /// public: typedef typename apply_wrap4< f_ , typename t1::type, typename t2::type, typename t3::type , typename t4::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename T2, typename T3, typename T4 , typename U1, typename U2, typename U3, typename U4, typename U5 > struct resolve_bind_arg< bind4< F,T1,T2,T3,T4 >, U1, U2, U3, U4, U5 > { typedef bind4< F,T1,T2,T3,T4 > f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(5, bind4) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(5, bind4) template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct bind5 { template< typename U1, typename U2, typename U3, typename U4, typename U5 > struct apply { private: typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; typedef typename r0::type a0; typedef typename r0::next n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; /// typedef aux::replace_unnamed_arg< T1,n1 > r1; typedef typename r1::type a1; typedef typename r1::next n2; typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; /// typedef aux::replace_unnamed_arg< T2,n2 > r2; typedef typename r2::type a2; typedef typename r2::next n3; typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; /// typedef aux::replace_unnamed_arg< T3,n3 > r3; typedef typename r3::type a3; typedef typename r3::next n4; typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; /// typedef aux::replace_unnamed_arg< T4,n4 > r4; typedef typename r4::type a4; typedef typename r4::next n5; typedef aux::resolve_bind_arg< a4,U1,U2,U3,U4,U5 > t4; /// typedef aux::replace_unnamed_arg< T5,n5 > r5; typedef typename r5::type a5; typedef typename r5::next n6; typedef aux::resolve_bind_arg< a5,U1,U2,U3,U4,U5 > t5; /// public: typedef typename apply_wrap5< f_ , typename t1::type, typename t2::type, typename t3::type , typename t4::type, typename t5::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5, typename U1, typename U2, typename U3, typename U4 , typename U5 > struct resolve_bind_arg< bind5< F,T1,T2,T3,T4,T5 >, U1, U2, U3, U4, U5 > { typedef bind5< F,T1,T2,T3,T4,T5 > f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(6, bind5) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(6, bind5) }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/bcc/bind_fwd.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // *Preprocessed* version of the main "bind_fwd.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename F > struct bind0; template< typename F, typename T1 > struct bind1; template< typename F, typename T1, typename T2 > struct bind2; template< typename F, typename T1, typename T2, typename T3 > struct bind3; template< typename F, typename T1, typename T2, typename T3, typename T4 > struct bind4; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct bind5; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/bcc/bitand.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // Copyright Jaap Suter 2003 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // *Preprocessed* version of the main "bitand.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct bitand_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< bitand_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< bitand_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct bitand_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct bitand_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct bitand_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct bitand_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) , typename N3 = na, typename N4 = na, typename N5 = na > struct bitand_ : bitand_< bitand_< bitand_< bitand_< N1,N2 >, N3>, N4>, N5> { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , bitand_ , ( N1, N2, N3, N4, N5 ) ) }; template< typename N1, typename N2, typename N3, typename N4 > struct bitand_< N1,N2,N3,N4,na > : bitand_< bitand_< bitand_< N1,N2 >, N3>, N4> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , bitand_ , ( N1, N2, N3, N4, na ) ) }; template< typename N1, typename N2, typename N3 > struct bitand_< N1,N2,N3,na,na > : bitand_< bitand_< N1,N2 >, N3> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , bitand_ , ( N1, N2, N3, na, na ) ) }; template< typename N1, typename N2 > struct bitand_< N1,N2,na,na,na > : bitand_impl< typename bitand_tag::type , typename bitand_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , bitand_ , ( N1, N2, na, na, na ) ) }; BOOST_MPL_AUX_NA_SPEC2(2, 5, bitand_) }} namespace boost { namespace mpl { template<> struct bitand_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : integral_c< typename aux::largest_int< typename N1::value_type , typename N2::value_type >::type , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value & BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/bcc/bitor.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // Copyright Jaap Suter 2003 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // *Preprocessed* version of the main "bitor.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct bitor_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< bitor_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< bitor_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct bitor_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct bitor_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct bitor_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct bitor_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) , typename N3 = na, typename N4 = na, typename N5 = na > struct bitor_ : bitor_< bitor_< bitor_< bitor_< N1,N2 >, N3>, N4>, N5> { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , bitor_ , ( N1, N2, N3, N4, N5 ) ) }; template< typename N1, typename N2, typename N3, typename N4 > struct bitor_< N1,N2,N3,N4,na > : bitor_< bitor_< bitor_< N1,N2 >, N3>, N4> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , bitor_ , ( N1, N2, N3, N4, na ) ) }; template< typename N1, typename N2, typename N3 > struct bitor_< N1,N2,N3,na,na > : bitor_< bitor_< N1,N2 >, N3> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , bitor_ , ( N1, N2, N3, na, na ) ) }; template< typename N1, typename N2 > struct bitor_< N1,N2,na,na,na > : bitor_impl< typename bitor_tag::type , typename bitor_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , bitor_ , ( N1, N2, na, na, na ) ) }; BOOST_MPL_AUX_NA_SPEC2(2, 5, bitor_) }} namespace boost { namespace mpl { template<> struct bitor_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : integral_c< typename aux::largest_int< typename N1::value_type , typename N2::value_type >::type , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value | BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/bcc/bitxor.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // Copyright Jaap Suter 2003 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // *Preprocessed* version of the main "bitxor.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct bitxor_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< bitxor_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< bitxor_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct bitxor_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct bitxor_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct bitxor_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct bitxor_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) , typename N3 = na, typename N4 = na, typename N5 = na > struct bitxor_ : bitxor_< bitxor_< bitxor_< bitxor_< N1,N2 >, N3>, N4>, N5> { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , bitxor_ , ( N1, N2, N3, N4, N5 ) ) }; template< typename N1, typename N2, typename N3, typename N4 > struct bitxor_< N1,N2,N3,N4,na > : bitxor_< bitxor_< bitxor_< N1,N2 >, N3>, N4> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , bitxor_ , ( N1, N2, N3, N4, na ) ) }; template< typename N1, typename N2, typename N3 > struct bitxor_< N1,N2,N3,na,na > : bitxor_< bitxor_< N1,N2 >, N3> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , bitxor_ , ( N1, N2, N3, na, na ) ) }; template< typename N1, typename N2 > struct bitxor_< N1,N2,na,na,na > : bitxor_impl< typename bitxor_tag::type , typename bitxor_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , bitxor_ , ( N1, N2, na, na, na ) ) }; BOOST_MPL_AUX_NA_SPEC2(2, 5, bitxor_) }} namespace boost { namespace mpl { template<> struct bitxor_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : integral_c< typename aux::largest_int< typename N1::value_type , typename N2::value_type >::type , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value ^ BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/bcc/deque.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // *Preprocessed* version of the main "deque.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na , typename T12 = na, typename T13 = na, typename T14 = na , typename T15 = na, typename T16 = na, typename T17 = na , typename T18 = na, typename T19 = na > struct deque; template< > struct deque< na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector0< > { typedef vector0< >::type type; }; template< typename T0 > struct deque< T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector1 { typedef typename vector1::type type; }; template< typename T0, typename T1 > struct deque< T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector2< T0,T1 > { typedef typename vector2< T0,T1 >::type type; }; template< typename T0, typename T1, typename T2 > struct deque< T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector3< T0,T1,T2 > { typedef typename vector3< T0,T1,T2 >::type type; }; template< typename T0, typename T1, typename T2, typename T3 > struct deque< T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector4< T0,T1,T2,T3 > { typedef typename vector4< T0,T1,T2,T3 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 > struct deque< T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector5< T0,T1,T2,T3,T4 > { typedef typename vector5< T0,T1,T2,T3,T4 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct deque< T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector6< T0,T1,T2,T3,T4,T5 > { typedef typename vector6< T0,T1,T2,T3,T4,T5 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6 > struct deque< T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector7< T0,T1,T2,T3,T4,T5,T6 > { typedef typename vector7< T0,T1,T2,T3,T4,T5,T6 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7 > struct deque< T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na , na, na, na > : vector8< T0,T1,T2,T3,T4,T5,T6,T7 > { typedef typename vector8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8 > struct deque< T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na , na, na, na > : vector9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > { typedef typename vector9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 > struct deque< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na , na, na, na > : vector10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > { typedef typename vector10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10 > struct deque< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na , na, na, na > : vector11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > { typedef typename vector11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11 > struct deque< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na , na, na, na, na > : vector12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > { typedef typename vector12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12 > struct deque< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na , na, na, na, na > : vector13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > { typedef typename vector13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13 > struct deque< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na , na, na, na, na > : vector14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > { typedef typename vector14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 > struct deque< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na , na, na, na, na > : vector15< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 > { typedef typename vector15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15 > struct deque< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, na, na, na, na > : vector16< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15 > { typedef typename vector16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16 > struct deque< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, na, na, na > : vector17< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16 > { typedef typename vector17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17 > struct deque< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, na, na > : vector18< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17 > { typedef typename vector18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18 > struct deque< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18, na > : vector19< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18 > { typedef typename vector19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type; }; /// primary template (not a specialization!) template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct deque : vector20< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18, T19 > { typedef typename vector20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/bcc/divides.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // *Preprocessed* version of the main "divides.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct divides_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< divides_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< divides_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct divides_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct divides_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct divides_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct divides_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) , typename N3 = na, typename N4 = na, typename N5 = na > struct divides : divides< divides< divides< divides< N1,N2 >, N3>, N4>, N5> { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , divides , ( N1, N2, N3, N4, N5 ) ) }; template< typename N1, typename N2, typename N3, typename N4 > struct divides< N1,N2,N3,N4,na > : divides< divides< divides< N1,N2 >, N3>, N4> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , divides , ( N1, N2, N3, N4, na ) ) }; template< typename N1, typename N2, typename N3 > struct divides< N1,N2,N3,na,na > : divides< divides< N1,N2 >, N3> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , divides , ( N1, N2, N3, na, na ) ) }; template< typename N1, typename N2 > struct divides< N1,N2,na,na,na > : divides_impl< typename divides_tag::type , typename divides_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , divides , ( N1, N2, na, na, na ) ) }; BOOST_MPL_AUX_NA_SPEC2(2, 5, divides) }} namespace boost { namespace mpl { template<> struct divides_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : integral_c< typename aux::largest_int< typename N1::value_type , typename N2::value_type >::type , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value / BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/bcc/equal_to.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // *Preprocessed* version of the main "equal_to.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct equal_to_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< equal_to_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< equal_to_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct equal_to_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct equal_to_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct equal_to_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct equal_to_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct equal_to : equal_to_impl< typename equal_to_tag::type , typename equal_to_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, equal_to, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 2, equal_to) }} namespace boost { namespace mpl { template<> struct equal_to_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value == BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/bcc/fold_impl.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // *Preprocessed* version of the main "fold_impl.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { /// forward declaration template< int N , typename First , typename Last , typename State , typename ForwardOp > struct fold_impl; template< typename First , typename Last , typename State , typename ForwardOp > struct fold_impl< 0,First,Last,State,ForwardOp > { typedef First iter0; typedef State state0; typedef state0 state; typedef iter0 iterator; }; template< typename First , typename Last , typename State , typename ForwardOp > struct fold_impl< 1,First,Last,State,ForwardOp > { typedef First iter0; typedef State state0; typedef typename apply2< ForwardOp, state0, typename deref::type >::type state1; typedef typename mpl::next::type iter1; typedef state1 state; typedef iter1 iterator; }; template< typename First , typename Last , typename State , typename ForwardOp > struct fold_impl< 2,First,Last,State,ForwardOp > { typedef First iter0; typedef State state0; typedef typename apply2< ForwardOp, state0, typename deref::type >::type state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp, state1, typename deref::type >::type state2; typedef typename mpl::next::type iter2; typedef state2 state; typedef iter2 iterator; }; template< typename First , typename Last , typename State , typename ForwardOp > struct fold_impl< 3,First,Last,State,ForwardOp > { typedef First iter0; typedef State state0; typedef typename apply2< ForwardOp, state0, typename deref::type >::type state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp, state1, typename deref::type >::type state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp, state2, typename deref::type >::type state3; typedef typename mpl::next::type iter3; typedef state3 state; typedef iter3 iterator; }; template< typename First , typename Last , typename State , typename ForwardOp > struct fold_impl< 4,First,Last,State,ForwardOp > { typedef First iter0; typedef State state0; typedef typename apply2< ForwardOp, state0, typename deref::type >::type state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp, state1, typename deref::type >::type state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp, state2, typename deref::type >::type state3; typedef typename mpl::next::type iter3; typedef typename apply2< ForwardOp, state3, typename deref::type >::type state4; typedef typename mpl::next::type iter4; typedef state4 state; typedef iter4 iterator; }; template< int N , typename First , typename Last , typename State , typename ForwardOp > struct fold_impl { typedef fold_impl< 4 , First , Last , State , ForwardOp > chunk_; typedef fold_impl< ( (N - 4) < 0 ? 0 : N - 4 ) , typename chunk_::iterator , Last , typename chunk_::state , ForwardOp > res_; typedef typename res_::state state; typedef typename res_::iterator iterator; }; template< typename First , typename Last , typename State , typename ForwardOp > struct fold_impl< -1,First,Last,State,ForwardOp > : fold_impl< -1 , typename mpl::next::type , Last , typename apply2::type>::type , ForwardOp > { }; template< typename Last , typename State , typename ForwardOp > struct fold_impl< -1,Last,Last,State,ForwardOp > { typedef State state; typedef Last iterator; }; }}} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/bcc/full_lambda.hpp ================================================ // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // *Preprocessed* version of the main "full_lambda.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< bool C1 = false, bool C2 = false, bool C3 = false, bool C4 = false , bool C5 = false > struct lambda_or : true_ { }; template<> struct lambda_or< false,false,false,false,false > : false_ { }; } // namespace aux template< typename T , typename Tag , typename Arity > struct lambda { typedef false_ is_le; typedef T result_; typedef T type; }; template< typename T > struct is_lambda_expression : lambda::is_le { }; template< int N, typename Tag > struct lambda< arg,Tag, int_< -1 > > { typedef true_ is_le; typedef mpl::arg result_; // qualified for the sake of MIPSpro 7.41 typedef mpl::protect type; }; template< typename F , typename Tag > struct lambda< bind0 , Tag , int_<1> > { typedef false_ is_le; typedef bind0< F > result_; typedef result_ type; }; namespace aux { template< typename IsLE, typename Tag , template< typename P1 > class F , typename L1 > struct le_result1 { typedef F< typename L1::type > result_; typedef result_ type; }; template< typename Tag , template< typename P1 > class F , typename L1 > struct le_result1< true_,Tag,F,L1 > { typedef bind1< quote1< F,Tag > , typename L1::result_ > result_; typedef mpl::protect type; }; } // namespace aux template< template< typename P1 > class F , typename T1 , typename Tag > struct lambda< F , Tag , int_<1> > { typedef lambda< T1,Tag > l1; typedef typename l1::is_le is_le1; typedef typename aux::lambda_or< is_le1::value >::type is_le; typedef aux::le_result1< is_le, Tag, F, l1 > le_result_; typedef typename le_result_::result_ result_; typedef typename le_result_::type type; }; template< typename F, typename T1 , typename Tag > struct lambda< bind1< F,T1 > , Tag , int_<2> > { typedef false_ is_le; typedef bind1< F , T1 > result_; typedef result_ type; }; namespace aux { template< typename IsLE, typename Tag , template< typename P1, typename P2 > class F , typename L1, typename L2 > struct le_result2 { typedef F< typename L1::type, typename L2::type > result_; typedef result_ type; }; template< typename Tag , template< typename P1, typename P2 > class F , typename L1, typename L2 > struct le_result2< true_,Tag,F,L1,L2 > { typedef bind2< quote2< F,Tag > , typename L1::result_, typename L2::result_ > result_; typedef mpl::protect type; }; } // namespace aux template< template< typename P1, typename P2 > class F , typename T1, typename T2 , typename Tag > struct lambda< F< T1,T2 > , Tag , int_<2> > { typedef lambda< T1,Tag > l1; typedef lambda< T2,Tag > l2; typedef typename l1::is_le is_le1; typedef typename l2::is_le is_le2; typedef typename aux::lambda_or< is_le1::value, is_le2::value >::type is_le; typedef aux::le_result2< is_le, Tag, F, l1, l2 > le_result_; typedef typename le_result_::result_ result_; typedef typename le_result_::type type; }; template< typename F, typename T1, typename T2 , typename Tag > struct lambda< bind2< F,T1,T2 > , Tag , int_<3> > { typedef false_ is_le; typedef bind2< F , T1, T2 > result_; typedef result_ type; }; namespace aux { template< typename IsLE, typename Tag , template< typename P1, typename P2, typename P3 > class F , typename L1, typename L2, typename L3 > struct le_result3 { typedef F< typename L1::type, typename L2::type, typename L3::type > result_; typedef result_ type; }; template< typename Tag , template< typename P1, typename P2, typename P3 > class F , typename L1, typename L2, typename L3 > struct le_result3< true_,Tag,F,L1,L2,L3 > { typedef bind3< quote3< F,Tag > , typename L1::result_, typename L2::result_, typename L3::result_ > result_; typedef mpl::protect type; }; } // namespace aux template< template< typename P1, typename P2, typename P3 > class F , typename T1, typename T2, typename T3 , typename Tag > struct lambda< F< T1,T2,T3 > , Tag , int_<3> > { typedef lambda< T1,Tag > l1; typedef lambda< T2,Tag > l2; typedef lambda< T3,Tag > l3; typedef typename l1::is_le is_le1; typedef typename l2::is_le is_le2; typedef typename l3::is_le is_le3; typedef typename aux::lambda_or< is_le1::value, is_le2::value, is_le3::value >::type is_le; typedef aux::le_result3< is_le, Tag, F, l1, l2, l3 > le_result_; typedef typename le_result_::result_ result_; typedef typename le_result_::type type; }; template< typename F, typename T1, typename T2, typename T3 , typename Tag > struct lambda< bind3< F,T1,T2,T3 > , Tag , int_<4> > { typedef false_ is_le; typedef bind3< F , T1, T2, T3 > result_; typedef result_ type; }; namespace aux { template< typename IsLE, typename Tag , template< typename P1, typename P2, typename P3, typename P4 > class F , typename L1, typename L2, typename L3, typename L4 > struct le_result4 { typedef F< typename L1::type, typename L2::type, typename L3::type , typename L4::type > result_; typedef result_ type; }; template< typename Tag , template< typename P1, typename P2, typename P3, typename P4 > class F , typename L1, typename L2, typename L3, typename L4 > struct le_result4< true_,Tag,F,L1,L2,L3,L4 > { typedef bind4< quote4< F,Tag > , typename L1::result_, typename L2::result_, typename L3::result_ , typename L4::result_ > result_; typedef mpl::protect type; }; } // namespace aux template< template< typename P1, typename P2, typename P3, typename P4 > class F , typename T1, typename T2, typename T3, typename T4 , typename Tag > struct lambda< F< T1,T2,T3,T4 > , Tag , int_<4> > { typedef lambda< T1,Tag > l1; typedef lambda< T2,Tag > l2; typedef lambda< T3,Tag > l3; typedef lambda< T4,Tag > l4; typedef typename l1::is_le is_le1; typedef typename l2::is_le is_le2; typedef typename l3::is_le is_le3; typedef typename l4::is_le is_le4; typedef typename aux::lambda_or< is_le1::value, is_le2::value, is_le3::value, is_le4::value >::type is_le; typedef aux::le_result4< is_le, Tag, F, l1, l2, l3, l4 > le_result_; typedef typename le_result_::result_ result_; typedef typename le_result_::type type; }; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename Tag > struct lambda< bind4< F,T1,T2,T3,T4 > , Tag , int_<5> > { typedef false_ is_le; typedef bind4< F , T1, T2, T3, T4 > result_; typedef result_ type; }; namespace aux { template< typename IsLE, typename Tag , template< typename P1, typename P2, typename P3, typename P4, typename P5 > class F , typename L1, typename L2, typename L3, typename L4, typename L5 > struct le_result5 { typedef F< typename L1::type, typename L2::type, typename L3::type , typename L4::type, typename L5::type > result_; typedef result_ type; }; template< typename Tag , template< typename P1, typename P2, typename P3, typename P4, typename P5 > class F , typename L1, typename L2, typename L3, typename L4, typename L5 > struct le_result5< true_,Tag,F,L1,L2,L3,L4,L5 > { typedef bind5< quote5< F,Tag > , typename L1::result_, typename L2::result_, typename L3::result_ , typename L4::result_, typename L5::result_ > result_; typedef mpl::protect type; }; } // namespace aux template< template< typename P1, typename P2, typename P3, typename P4 , typename P5 > class F , typename T1, typename T2, typename T3, typename T4, typename T5 , typename Tag > struct lambda< F< T1,T2,T3,T4,T5 > , Tag , int_<5> > { typedef lambda< T1,Tag > l1; typedef lambda< T2,Tag > l2; typedef lambda< T3,Tag > l3; typedef lambda< T4,Tag > l4; typedef lambda< T5,Tag > l5; typedef typename l1::is_le is_le1; typedef typename l2::is_le is_le2; typedef typename l3::is_le is_le3; typedef typename l4::is_le is_le4; typedef typename l5::is_le is_le5; typedef typename aux::lambda_or< is_le1::value, is_le2::value, is_le3::value, is_le4::value , is_le5::value >::type is_le; typedef aux::le_result5< is_le, Tag, F, l1, l2, l3, l4, l5 > le_result_; typedef typename le_result_::result_ result_; typedef typename le_result_::type type; }; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 , typename Tag > struct lambda< bind5< F,T1,T2,T3,T4,T5 > , Tag , int_<6> > { typedef false_ is_le; typedef bind5< F , T1, T2, T3, T4, T5 > result_; typedef result_ type; }; /// special case for 'protect' template< typename T, typename Tag > struct lambda< mpl::protect,Tag, int_<1> > { typedef false_ is_le; typedef mpl::protect result_; typedef result_ type; }; /// specializations for the main 'bind' form template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 , typename Tag > struct lambda< bind< F,T1,T2,T3,T4,T5 > , Tag , int_<6> > { typedef false_ is_le; typedef bind< F,T1,T2,T3,T4,T5 > result_; typedef result_ type; }; template< typename F , typename Tag1 , typename Tag2 , typename Arity > struct lambda< lambda< F,Tag1,Arity > , Tag2 , int_<3> > { typedef lambda< F,Tag2 > l1; typedef lambda< Tag1,Tag2 > l2; typedef typename l1::is_le is_le; typedef bind1< quote1, typename l1::result_ > arity_; typedef lambda< typename if_< is_le,arity_,Arity >::type, Tag2 > l3; typedef aux::le_result3 le_result_; typedef typename le_result_::result_ result_; typedef typename le_result_::type type; }; BOOST_MPL_AUX_NA_SPEC2(2, 3, lambda) }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/bcc/greater.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // *Preprocessed* version of the main "greater.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct greater_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< greater_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< greater_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct greater_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct greater_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct greater_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct greater_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct greater : greater_impl< typename greater_tag::type , typename greater_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, greater, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 2, greater) }} namespace boost { namespace mpl { template<> struct greater_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value > BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/bcc/greater_equal.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // *Preprocessed* version of the main "greater_equal.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct greater_equal_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< greater_equal_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< greater_equal_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct greater_equal_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct greater_equal_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct greater_equal_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct greater_equal_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct greater_equal : greater_equal_impl< typename greater_equal_tag::type , typename greater_equal_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, greater_equal, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 2, greater_equal) }} namespace boost { namespace mpl { template<> struct greater_equal_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value >= BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/bcc/inherit.hpp ================================================ // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // *Preprocessed* version of the main "inherit.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename BOOST_MPL_AUX_NA_PARAM(T1) , typename BOOST_MPL_AUX_NA_PARAM(T2) > struct inherit2 : T1, T2 { typedef inherit2 type; BOOST_MPL_AUX_LAMBDA_SUPPORT(2, inherit2, (T1, T2)) }; template< typename T1 > struct inherit2< T1,empty_base > { typedef T1 type; BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(2, inherit2, (T1, empty_base)) }; template< typename T2 > struct inherit2< empty_base,T2 > { typedef T2 type; BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(2, inherit2, (empty_base, T2)) }; template<> struct inherit2< empty_base,empty_base > { typedef empty_base type; BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(2, inherit2, (empty_base, empty_base)) }; BOOST_MPL_AUX_NA_SPEC(2, inherit2) template< typename T1 = na, typename T2 = na, typename T3 = na > struct inherit3 : inherit2< typename inherit2< T1, T2 >::type , T3 > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 3 , inherit3 , ( T1, T2, T3) ) }; BOOST_MPL_AUX_NA_SPEC(3, inherit3) template< typename T1 = na, typename T2 = na, typename T3 = na, typename T4 = na > struct inherit4 : inherit2< typename inherit3< T1, T2, T3 >::type , T4 > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 4 , inherit4 , ( T1, T2, T3, T4) ) }; BOOST_MPL_AUX_NA_SPEC(4, inherit4) template< typename T1 = na, typename T2 = na, typename T3 = na, typename T4 = na , typename T5 = na > struct inherit5 : inherit2< typename inherit4< T1, T2, T3, T4 >::type , T5 > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , inherit5 , ( T1, T2, T3, T4, T5) ) }; BOOST_MPL_AUX_NA_SPEC(5, inherit5) /// primary template template< typename T1 = empty_base, typename T2 = empty_base , typename T3 = empty_base, typename T4 = empty_base , typename T5 = empty_base > struct inherit : inherit5< T1,T2,T3,T4,T5 > { }; template<> struct inherit< na,na,na,na,na > { template< typename T1, typename T2, typename T3, typename T4, typename T5 > struct apply : inherit< T1,T2,T3,T4,T5 > { }; }; BOOST_MPL_AUX_NA_SPEC_LAMBDA(5, inherit) BOOST_MPL_AUX_NA_SPEC_ARITY(5, inherit) BOOST_MPL_AUX_NA_SPEC_TEMPLATE_ARITY(5, 5, inherit) }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/bcc/iter_fold_if_impl.hpp ================================================ // Copyright Aleksey Gurtovoy 2001-2004 // Copyright David Abrahams 2001-2002 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // *Preprocessed* version of the main "iter_fold_if_impl.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< typename Iterator, typename State > struct iter_fold_if_null_step { typedef State state; typedef Iterator iterator; }; template< bool > struct iter_fold_if_step_impl { template< typename Iterator , typename State , typename StateOp , typename IteratorOp > struct result_ { typedef typename apply2< StateOp,State,Iterator >::type state; typedef typename IteratorOp::type iterator; }; }; template<> struct iter_fold_if_step_impl { template< typename Iterator , typename State , typename StateOp , typename IteratorOp > struct result_ { typedef State state; typedef Iterator iterator; }; }; template< typename Iterator , typename State , typename ForwardOp , typename Predicate > struct iter_fold_if_forward_step { typedef typename apply2< Predicate,State,Iterator >::type not_last; typedef typename iter_fold_if_step_impl< BOOST_MPL_AUX_MSVC_VALUE_WKND(not_last)::value >::template result_< Iterator,State,ForwardOp, mpl::next > impl_; typedef typename impl_::state state; typedef typename impl_::iterator iterator; }; template< typename Iterator , typename State , typename BackwardOp , typename Predicate > struct iter_fold_if_backward_step { typedef typename apply2< Predicate,State,Iterator >::type not_last; typedef typename iter_fold_if_step_impl< BOOST_MPL_AUX_MSVC_VALUE_WKND(not_last)::value >::template result_< Iterator,State,BackwardOp, identity > impl_; typedef typename impl_::state state; typedef typename impl_::iterator iterator; }; template< typename Iterator , typename State , typename ForwardOp , typename ForwardPredicate , typename BackwardOp , typename BackwardPredicate > struct iter_fold_if_impl { private: typedef iter_fold_if_null_step< Iterator,State > forward_step0; typedef iter_fold_if_forward_step< typename forward_step0::iterator, typename forward_step0::state, ForwardOp, ForwardPredicate > forward_step1; typedef iter_fold_if_forward_step< typename forward_step1::iterator, typename forward_step1::state, ForwardOp, ForwardPredicate > forward_step2; typedef iter_fold_if_forward_step< typename forward_step2::iterator, typename forward_step2::state, ForwardOp, ForwardPredicate > forward_step3; typedef iter_fold_if_forward_step< typename forward_step3::iterator, typename forward_step3::state, ForwardOp, ForwardPredicate > forward_step4; typedef typename if_< typename forward_step4::not_last , iter_fold_if_impl< typename forward_step4::iterator , typename forward_step4::state , ForwardOp , ForwardPredicate , BackwardOp , BackwardPredicate > , iter_fold_if_null_step< typename forward_step4::iterator , typename forward_step4::state > >::type backward_step4; typedef iter_fold_if_backward_step< typename forward_step3::iterator, typename backward_step4::state, BackwardOp, BackwardPredicate > backward_step3; typedef iter_fold_if_backward_step< typename forward_step2::iterator, typename backward_step3::state, BackwardOp, BackwardPredicate > backward_step2; typedef iter_fold_if_backward_step< typename forward_step1::iterator, typename backward_step2::state, BackwardOp, BackwardPredicate > backward_step1; typedef iter_fold_if_backward_step< typename forward_step0::iterator, typename backward_step1::state, BackwardOp, BackwardPredicate > backward_step0; public: typedef typename backward_step0::state state; typedef typename backward_step4::iterator iterator; }; }}} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/bcc/iter_fold_impl.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // *Preprocessed* version of the main "iter_fold_impl.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { /// forward declaration template< int N , typename First , typename Last , typename State , typename ForwardOp > struct iter_fold_impl; template< typename First , typename Last , typename State , typename ForwardOp > struct iter_fold_impl< 0,First,Last,State,ForwardOp > { typedef First iter0; typedef State state0; typedef state0 state; typedef iter0 iterator; }; template< typename First , typename Last , typename State , typename ForwardOp > struct iter_fold_impl< 1,First,Last,State,ForwardOp > { typedef First iter0; typedef State state0; typedef typename apply2< ForwardOp,state0,iter0 >::type state1; typedef typename mpl::next::type iter1; typedef state1 state; typedef iter1 iterator; }; template< typename First , typename Last , typename State , typename ForwardOp > struct iter_fold_impl< 2,First,Last,State,ForwardOp > { typedef First iter0; typedef State state0; typedef typename apply2< ForwardOp,state0,iter0 >::type state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp,state1,iter1 >::type state2; typedef typename mpl::next::type iter2; typedef state2 state; typedef iter2 iterator; }; template< typename First , typename Last , typename State , typename ForwardOp > struct iter_fold_impl< 3,First,Last,State,ForwardOp > { typedef First iter0; typedef State state0; typedef typename apply2< ForwardOp,state0,iter0 >::type state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp,state1,iter1 >::type state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp,state2,iter2 >::type state3; typedef typename mpl::next::type iter3; typedef state3 state; typedef iter3 iterator; }; template< typename First , typename Last , typename State , typename ForwardOp > struct iter_fold_impl< 4,First,Last,State,ForwardOp > { typedef First iter0; typedef State state0; typedef typename apply2< ForwardOp,state0,iter0 >::type state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp,state1,iter1 >::type state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp,state2,iter2 >::type state3; typedef typename mpl::next::type iter3; typedef typename apply2< ForwardOp,state3,iter3 >::type state4; typedef typename mpl::next::type iter4; typedef state4 state; typedef iter4 iterator; }; template< int N , typename First , typename Last , typename State , typename ForwardOp > struct iter_fold_impl { typedef iter_fold_impl< 4 , First , Last , State , ForwardOp > chunk_; typedef iter_fold_impl< ( (N - 4) < 0 ? 0 : N - 4 ) , typename chunk_::iterator , Last , typename chunk_::state , ForwardOp > res_; typedef typename res_::state state; typedef typename res_::iterator iterator; }; template< typename First , typename Last , typename State , typename ForwardOp > struct iter_fold_impl< -1,First,Last,State,ForwardOp > : iter_fold_impl< -1 , typename mpl::next::type , Last , typename apply2< ForwardOp,State,First >::type , ForwardOp > { }; template< typename Last , typename State , typename ForwardOp > struct iter_fold_impl< -1,Last,Last,State,ForwardOp > { typedef State state; typedef Last iterator; }; }}} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/bcc/lambda_no_ctps.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // *Preprocessed* version of the main "lambda_no_ctps.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< bool C1 = false, bool C2 = false, bool C3 = false, bool C4 = false , bool C5 = false > struct lambda_or : true_ { }; template<> struct lambda_or< false,false,false,false,false > : false_ { }; template< typename Arity > struct lambda_impl { template< typename T, typename Tag, typename Protect > struct result_ { typedef T type; typedef is_placeholder is_le; }; }; template<> struct lambda_impl< int_<1> > { template< typename F, typename Tag, typename Protect > struct result_ { typedef lambda< typename F::arg1, Tag, false_ > l1; typedef typename l1::is_le is_le1; typedef aux::lambda_or< BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value > is_le; typedef bind1< typename F::rebind , typename l1::type > bind_; typedef typename if_< is_le , if_< Protect, mpl::protect, bind_ > , identity >::type type_; typedef typename type_::type type; }; }; template<> struct lambda_impl< int_<2> > { template< typename F, typename Tag, typename Protect > struct result_ { typedef lambda< typename F::arg1, Tag, false_ > l1; typedef lambda< typename F::arg2, Tag, false_ > l2; typedef typename l1::is_le is_le1; typedef typename l2::is_le is_le2; typedef aux::lambda_or< BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value > is_le; typedef bind2< typename F::rebind , typename l1::type, typename l2::type > bind_; typedef typename if_< is_le , if_< Protect, mpl::protect, bind_ > , identity >::type type_; typedef typename type_::type type; }; }; template<> struct lambda_impl< int_<3> > { template< typename F, typename Tag, typename Protect > struct result_ { typedef lambda< typename F::arg1, Tag, false_ > l1; typedef lambda< typename F::arg2, Tag, false_ > l2; typedef lambda< typename F::arg3, Tag, false_ > l3; typedef typename l1::is_le is_le1; typedef typename l2::is_le is_le2; typedef typename l3::is_le is_le3; typedef aux::lambda_or< BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le3)::value > is_le; typedef bind3< typename F::rebind , typename l1::type, typename l2::type, typename l3::type > bind_; typedef typename if_< is_le , if_< Protect, mpl::protect, bind_ > , identity >::type type_; typedef typename type_::type type; }; }; template<> struct lambda_impl< int_<4> > { template< typename F, typename Tag, typename Protect > struct result_ { typedef lambda< typename F::arg1, Tag, false_ > l1; typedef lambda< typename F::arg2, Tag, false_ > l2; typedef lambda< typename F::arg3, Tag, false_ > l3; typedef lambda< typename F::arg4, Tag, false_ > l4; typedef typename l1::is_le is_le1; typedef typename l2::is_le is_le2; typedef typename l3::is_le is_le3; typedef typename l4::is_le is_le4; typedef aux::lambda_or< BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le3)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le4)::value > is_le; typedef bind4< typename F::rebind , typename l1::type, typename l2::type, typename l3::type , typename l4::type > bind_; typedef typename if_< is_le , if_< Protect, mpl::protect, bind_ > , identity >::type type_; typedef typename type_::type type; }; }; template<> struct lambda_impl< int_<5> > { template< typename F, typename Tag, typename Protect > struct result_ { typedef lambda< typename F::arg1, Tag, false_ > l1; typedef lambda< typename F::arg2, Tag, false_ > l2; typedef lambda< typename F::arg3, Tag, false_ > l3; typedef lambda< typename F::arg4, Tag, false_ > l4; typedef lambda< typename F::arg5, Tag, false_ > l5; typedef typename l1::is_le is_le1; typedef typename l2::is_le is_le2; typedef typename l3::is_le is_le3; typedef typename l4::is_le is_le4; typedef typename l5::is_le is_le5; typedef aux::lambda_or< BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le3)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le4)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le5)::value > is_le; typedef bind5< typename F::rebind , typename l1::type, typename l2::type, typename l3::type , typename l4::type, typename l5::type > bind_; typedef typename if_< is_le , if_< Protect, mpl::protect, bind_ > , identity >::type type_; typedef typename type_::type type; }; }; } // namespace aux template< typename T , typename Tag , typename Protect > struct lambda { /// Metafunction forwarding confuses MSVC 6.x typedef typename aux::template_arity::type arity_; typedef typename aux::lambda_impl ::template result_< T,Tag,Protect > l_; typedef typename l_::type type; typedef typename l_::is_le is_le; BOOST_MPL_AUX_LAMBDA_SUPPORT(3, lambda, (T, Tag, Protect)) }; BOOST_MPL_AUX_NA_SPEC2(1, 3, lambda) template< typename T > struct is_lambda_expression : lambda::is_le { }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/bcc/less.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // *Preprocessed* version of the main "less.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct less_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< less_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< less_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct less_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct less_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct less_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct less_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct less : less_impl< typename less_tag::type , typename less_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, less, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 2, less) }} namespace boost { namespace mpl { template<> struct less_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N2)::value > BOOST_MPL_AUX_VALUE_WKND(N1)::value ) > { }; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/bcc/less_equal.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // *Preprocessed* version of the main "less_equal.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct less_equal_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< less_equal_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< less_equal_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct less_equal_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct less_equal_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct less_equal_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct less_equal_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct less_equal : less_equal_impl< typename less_equal_tag::type , typename less_equal_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, less_equal, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 2, less_equal) }} namespace boost { namespace mpl { template<> struct less_equal_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value <= BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/bcc/list.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // *Preprocessed* version of the main "list.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na , typename T12 = na, typename T13 = na, typename T14 = na , typename T15 = na, typename T16 = na, typename T17 = na , typename T18 = na, typename T19 = na > struct list; template< > struct list< na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : list0< > { typedef list0< >::type type; }; template< typename T0 > struct list< T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : list1 { typedef typename list1::type type; }; template< typename T0, typename T1 > struct list< T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : list2< T0,T1 > { typedef typename list2< T0,T1 >::type type; }; template< typename T0, typename T1, typename T2 > struct list< T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : list3< T0,T1,T2 > { typedef typename list3< T0,T1,T2 >::type type; }; template< typename T0, typename T1, typename T2, typename T3 > struct list< T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : list4< T0,T1,T2,T3 > { typedef typename list4< T0,T1,T2,T3 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 > struct list< T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : list5< T0,T1,T2,T3,T4 > { typedef typename list5< T0,T1,T2,T3,T4 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct list< T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : list6< T0,T1,T2,T3,T4,T5 > { typedef typename list6< T0,T1,T2,T3,T4,T5 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6 > struct list< T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na , na, na, na > : list7< T0,T1,T2,T3,T4,T5,T6 > { typedef typename list7< T0,T1,T2,T3,T4,T5,T6 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7 > struct list< T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na , na, na, na > : list8< T0,T1,T2,T3,T4,T5,T6,T7 > { typedef typename list8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8 > struct list< T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na , na, na, na > : list9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > { typedef typename list9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 > struct list< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na , na, na, na > : list10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > { typedef typename list10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10 > struct list< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na , na, na, na > : list11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > { typedef typename list11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11 > struct list< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na , na, na, na, na > : list12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > { typedef typename list12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12 > struct list< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na , na, na, na, na > : list13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > { typedef typename list13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13 > struct list< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na , na, na, na, na > : list14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > { typedef typename list14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 > struct list< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na , na, na, na, na > : list15< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 > { typedef typename list15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15 > struct list< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, na, na, na, na > : list16< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15 > { typedef typename list16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16 > struct list< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, na, na, na > : list17< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16 > { typedef typename list17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17 > struct list< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, na, na > : list18< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17 > { typedef typename list18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18 > struct list< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18, na > : list19< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18 > { typedef typename list19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type; }; /// primary template (not a specialization!) template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct list : list20< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18, T19 > { typedef typename list20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/bcc/list_c.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // *Preprocessed* version of the main "list_c.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename T, long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX , long C3 = LONG_MAX, long C4 = LONG_MAX, long C5 = LONG_MAX , long C6 = LONG_MAX, long C7 = LONG_MAX, long C8 = LONG_MAX , long C9 = LONG_MAX, long C10 = LONG_MAX, long C11 = LONG_MAX , long C12 = LONG_MAX, long C13 = LONG_MAX, long C14 = LONG_MAX , long C15 = LONG_MAX, long C16 = LONG_MAX, long C17 = LONG_MAX , long C18 = LONG_MAX, long C19 = LONG_MAX > struct list_c; template< typename T > struct list_c< T, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list0_c { typedef typename list0_c::type type; }; template< typename T, long C0 > struct list_c< T, C0, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list1_c< T,C0 > { typedef typename list1_c< T,C0 >::type type; }; template< typename T, long C0, long C1 > struct list_c< T, C0, C1, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list2_c< T,C0,C1 > { typedef typename list2_c< T,C0,C1 >::type type; }; template< typename T, long C0, long C1, long C2 > struct list_c< T, C0, C1, C2, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list3_c< T,C0,C1,C2 > { typedef typename list3_c< T,C0,C1,C2 >::type type; }; template< typename T, long C0, long C1, long C2, long C3 > struct list_c< T, C0, C1, C2, C3, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list4_c< T,C0,C1,C2,C3 > { typedef typename list4_c< T,C0,C1,C2,C3 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4 > struct list_c< T, C0, C1, C2, C3, C4, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list5_c< T,C0,C1,C2,C3,C4 > { typedef typename list5_c< T,C0,C1,C2,C3,C4 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 > struct list_c< T, C0, C1, C2, C3, C4, C5, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX > : list6_c< T,C0,C1,C2,C3,C4,C5 > { typedef typename list6_c< T,C0,C1,C2,C3,C4,C5 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX > : list7_c< T,C0,C1,C2,C3,C4,C5,C6 > { typedef typename list7_c< T,C0,C1,C2,C3,C4,C5,C6 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, C7, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX > : list8_c< T,C0,C1,C2,C3,C4,C5,C6,C7 > { typedef typename list8_c< T,C0,C1,C2,C3,C4,C5,C6,C7 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX > : list9_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8 > { typedef typename list9_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX > : list10_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 > { typedef typename list10_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list11_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 > { typedef typename list11_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list12_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 > { typedef typename list12_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list13_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 > { typedef typename list13_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list14_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 > { typedef typename list14_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list15_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 > { typedef typename list15_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list16_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15 > { typedef typename list16_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, LONG_MAX, LONG_MAX, LONG_MAX > : list17_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16 > { typedef typename list17_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, C17, LONG_MAX, LONG_MAX > : list18_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, C17 > { typedef typename list18_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, C17, C18, LONG_MAX > : list19_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, C17, C18 > { typedef typename list19_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18 >::type type; }; /// primary template (not a specialization!) template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct list_c : list20_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, C17, C18, C19 > { typedef typename list20_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19 >::type type; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/bcc/map.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // *Preprocessed* version of the main "map.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na , typename T12 = na, typename T13 = na, typename T14 = na , typename T15 = na, typename T16 = na, typename T17 = na , typename T18 = na, typename T19 = na > struct map; template< > struct map< na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : map0< > { typedef map0< >::type type; }; template< typename T0 > struct map< T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : map1 { typedef typename map1::type type; }; template< typename T0, typename T1 > struct map< T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : map2< T0,T1 > { typedef typename map2< T0,T1 >::type type; }; template< typename T0, typename T1, typename T2 > struct map< T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : map3< T0,T1,T2 > { typedef typename map3< T0,T1,T2 >::type type; }; template< typename T0, typename T1, typename T2, typename T3 > struct map< T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : map4< T0,T1,T2,T3 > { typedef typename map4< T0,T1,T2,T3 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 > struct map< T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : map5< T0,T1,T2,T3,T4 > { typedef typename map5< T0,T1,T2,T3,T4 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct map< T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : map6< T0,T1,T2,T3,T4,T5 > { typedef typename map6< T0,T1,T2,T3,T4,T5 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6 > struct map< T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na , na, na, na > : map7< T0,T1,T2,T3,T4,T5,T6 > { typedef typename map7< T0,T1,T2,T3,T4,T5,T6 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7 > struct map< T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na , na, na, na > : map8< T0,T1,T2,T3,T4,T5,T6,T7 > { typedef typename map8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8 > struct map< T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na , na, na, na > : map9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > { typedef typename map9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 > struct map< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na , na, na, na > : map10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > { typedef typename map10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10 > struct map< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na , na, na, na > : map11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > { typedef typename map11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11 > struct map< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na , na, na, na, na > : map12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > { typedef typename map12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12 > struct map< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na , na, na, na, na > : map13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > { typedef typename map13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13 > struct map< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na , na, na, na, na > : map14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > { typedef typename map14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 > struct map< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na , na, na, na, na > : map15< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 > { typedef typename map15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15 > struct map< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, na, na, na, na > : map16< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15 > { typedef typename map16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16 > struct map< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, na, na, na > : map17< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16 > { typedef typename map17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17 > struct map< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, na, na > : map18< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17 > { typedef typename map18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18 > struct map< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18, na > : map19< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18 > { typedef typename map19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type; }; /// primary template (not a specialization!) template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct map : map20< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18, T19 > { typedef typename map20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/bcc/minus.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // *Preprocessed* version of the main "minus.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct minus_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< minus_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< minus_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct minus_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct minus_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct minus_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct minus_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) , typename N3 = na, typename N4 = na, typename N5 = na > struct minus : minus< minus< minus< minus< N1,N2 >, N3>, N4>, N5> { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , minus , ( N1, N2, N3, N4, N5 ) ) }; template< typename N1, typename N2, typename N3, typename N4 > struct minus< N1,N2,N3,N4,na > : minus< minus< minus< N1,N2 >, N3>, N4> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , minus , ( N1, N2, N3, N4, na ) ) }; template< typename N1, typename N2, typename N3 > struct minus< N1,N2,N3,na,na > : minus< minus< N1,N2 >, N3> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , minus , ( N1, N2, N3, na, na ) ) }; template< typename N1, typename N2 > struct minus< N1,N2,na,na,na > : minus_impl< typename minus_tag::type , typename minus_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , minus , ( N1, N2, na, na, na ) ) }; BOOST_MPL_AUX_NA_SPEC2(2, 5, minus) }} namespace boost { namespace mpl { template<> struct minus_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : integral_c< typename aux::largest_int< typename N1::value_type , typename N2::value_type >::type , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value - BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/bcc/modulus.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // *Preprocessed* version of the main "modulus.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct modulus_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< modulus_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< modulus_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct modulus_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct modulus_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct modulus_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct modulus_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct modulus : modulus_impl< typename modulus_tag::type , typename modulus_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, modulus, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 2, modulus) }} namespace boost { namespace mpl { template<> struct modulus_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : integral_c< typename aux::largest_int< typename N1::value_type , typename N2::value_type >::type , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value % BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/bcc/not_equal_to.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // *Preprocessed* version of the main "not_equal_to.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct not_equal_to_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< not_equal_to_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< not_equal_to_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct not_equal_to_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct not_equal_to_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct not_equal_to_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct not_equal_to_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct not_equal_to : not_equal_to_impl< typename not_equal_to_tag::type , typename not_equal_to_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, not_equal_to, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 2, not_equal_to) }} namespace boost { namespace mpl { template<> struct not_equal_to_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value != BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/bcc/or.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // *Preprocessed* version of the main "or.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< bool C_, typename T1, typename T2, typename T3, typename T4 > struct or_impl : true_ { }; template< typename T1, typename T2, typename T3, typename T4 > struct or_impl< false,T1,T2,T3,T4 > : or_impl< BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value , T2, T3, T4 , false_ > { }; template<> struct or_impl< false , false_, false_, false_, false_ > : false_ { }; } // namespace aux template< typename BOOST_MPL_AUX_NA_PARAM(T1) , typename BOOST_MPL_AUX_NA_PARAM(T2) , typename T3 = false_, typename T4 = false_, typename T5 = false_ > struct or_ : aux::or_impl< BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value , T2, T3, T4, T5 > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , or_ , ( T1, T2, T3, T4, T5) ) }; BOOST_MPL_AUX_NA_SPEC2( 2 , 5 , or_ ) }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/bcc/placeholders.hpp ================================================ // Copyright Aleksey Gurtovoy 2001-2004 // Copyright Peter Dimov 2001-2003 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // *Preprocessed* version of the main "placeholders.hpp" header // -- DO NOT modify by hand! BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg< -1 > _; BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE namespace boost { namespace mpl { BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_) namespace placeholders { using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_; } }} /// agurt, 17/mar/02: one more placeholder for the last 'apply#' /// specialization BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg<1> _1; BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE namespace boost { namespace mpl { BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_1) namespace placeholders { using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_1; } }} BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg<2> _2; BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE namespace boost { namespace mpl { BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_2) namespace placeholders { using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_2; } }} BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg<3> _3; BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE namespace boost { namespace mpl { BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_3) namespace placeholders { using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_3; } }} BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg<4> _4; BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE namespace boost { namespace mpl { BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_4) namespace placeholders { using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_4; } }} BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg<5> _5; BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE namespace boost { namespace mpl { BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_5) namespace placeholders { using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_5; } }} BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg<6> _6; BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE namespace boost { namespace mpl { BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_6) namespace placeholders { using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_6; } }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/bcc/plus.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // *Preprocessed* version of the main "plus.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct plus_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< plus_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< plus_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct plus_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct plus_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct plus_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct plus_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) , typename N3 = na, typename N4 = na, typename N5 = na > struct plus : plus< plus< plus< plus< N1,N2 >, N3>, N4>, N5> { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , plus , ( N1, N2, N3, N4, N5 ) ) }; template< typename N1, typename N2, typename N3, typename N4 > struct plus< N1,N2,N3,N4,na > : plus< plus< plus< N1,N2 >, N3>, N4> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , plus , ( N1, N2, N3, N4, na ) ) }; template< typename N1, typename N2, typename N3 > struct plus< N1,N2,N3,na,na > : plus< plus< N1,N2 >, N3> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , plus , ( N1, N2, N3, na, na ) ) }; template< typename N1, typename N2 > struct plus< N1,N2,na,na,na > : plus_impl< typename plus_tag::type , typename plus_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , plus , ( N1, N2, na, na, na ) ) }; BOOST_MPL_AUX_NA_SPEC2(2, 5, plus) }} namespace boost { namespace mpl { template<> struct plus_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : integral_c< typename aux::largest_int< typename N1::value_type , typename N2::value_type >::type , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/bcc/quote.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2008 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // *Preprocessed* version of the main "quote.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename T, bool has_type_ > struct quote_impl { typedef typename T::type type; }; template< typename T > struct quote_impl< T,false > { typedef T type; }; template< template< typename P1 > class F , typename Tag = void_ > struct quote1 { template< typename U1 > struct apply { typedef typename quote_impl< F , aux::has_type< F >::value >::type type; }; }; template< template< typename P1, typename P2 > class F , typename Tag = void_ > struct quote2 { template< typename U1, typename U2 > struct apply { typedef typename quote_impl< F< U1,U2 > , aux::has_type< F< U1,U2 > >::value >::type type; }; }; template< template< typename P1, typename P2, typename P3 > class F , typename Tag = void_ > struct quote3 { template< typename U1, typename U2, typename U3 > struct apply { typedef typename quote_impl< F< U1,U2,U3 > , aux::has_type< F< U1,U2,U3 > >::value >::type type; }; }; template< template< typename P1, typename P2, typename P3, typename P4 > class F , typename Tag = void_ > struct quote4 { template< typename U1, typename U2, typename U3, typename U4 > struct apply { typedef typename quote_impl< F< U1,U2,U3,U4 > , aux::has_type< F< U1,U2,U3,U4 > >::value >::type type; }; }; template< template< typename P1, typename P2, typename P3, typename P4 , typename P5 > class F , typename Tag = void_ > struct quote5 { template< typename U1, typename U2, typename U3, typename U4 , typename U5 > struct apply { typedef typename quote_impl< F< U1,U2,U3,U4,U5 > , aux::has_type< F< U1,U2,U3,U4,U5 > >::value >::type type; }; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/bcc/reverse_fold_impl.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // *Preprocessed* version of the main "reverse_fold_impl.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { /// forward declaration template< long N , typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_fold_impl; template< long N > struct reverse_fold_chunk; template<> struct reverse_fold_chunk<0> { template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct result_ { typedef First iter0; typedef State fwd_state0; typedef fwd_state0 bkwd_state0; typedef bkwd_state0 state; typedef iter0 iterator; }; }; template<> struct reverse_fold_chunk<1> { template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct result_ { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; typedef typename mpl::next::type iter1; typedef fwd_state1 bkwd_state1; typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; typedef bkwd_state0 state; typedef iter1 iterator; }; }; template<> struct reverse_fold_chunk<2> { template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct result_ { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp, fwd_state1, typename deref::type >::type fwd_state2; typedef typename mpl::next::type iter2; typedef fwd_state2 bkwd_state2; typedef typename apply2< BackwardOp, bkwd_state2, typename deref::type >::type bkwd_state1; typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; typedef bkwd_state0 state; typedef iter2 iterator; }; }; template<> struct reverse_fold_chunk<3> { template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct result_ { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp, fwd_state1, typename deref::type >::type fwd_state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp, fwd_state2, typename deref::type >::type fwd_state3; typedef typename mpl::next::type iter3; typedef fwd_state3 bkwd_state3; typedef typename apply2< BackwardOp, bkwd_state3, typename deref::type >::type bkwd_state2; typedef typename apply2< BackwardOp, bkwd_state2, typename deref::type >::type bkwd_state1; typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; typedef bkwd_state0 state; typedef iter3 iterator; }; }; template<> struct reverse_fold_chunk<4> { template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct result_ { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp, fwd_state1, typename deref::type >::type fwd_state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp, fwd_state2, typename deref::type >::type fwd_state3; typedef typename mpl::next::type iter3; typedef typename apply2< ForwardOp, fwd_state3, typename deref::type >::type fwd_state4; typedef typename mpl::next::type iter4; typedef fwd_state4 bkwd_state4; typedef typename apply2< BackwardOp, bkwd_state4, typename deref::type >::type bkwd_state3; typedef typename apply2< BackwardOp, bkwd_state3, typename deref::type >::type bkwd_state2; typedef typename apply2< BackwardOp, bkwd_state2, typename deref::type >::type bkwd_state1; typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; typedef bkwd_state0 state; typedef iter4 iterator; }; }; template< long N > struct reverse_fold_chunk { template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct result_ { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp, fwd_state1, typename deref::type >::type fwd_state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp, fwd_state2, typename deref::type >::type fwd_state3; typedef typename mpl::next::type iter3; typedef typename apply2< ForwardOp, fwd_state3, typename deref::type >::type fwd_state4; typedef typename mpl::next::type iter4; typedef reverse_fold_impl< ( (N - 4) < 0 ? 0 : N - 4 ) , iter4 , Last , fwd_state4 , BackwardOp , ForwardOp > nested_chunk; typedef typename nested_chunk::state bkwd_state4; typedef typename apply2< BackwardOp, bkwd_state4, typename deref::type >::type bkwd_state3; typedef typename apply2< BackwardOp, bkwd_state3, typename deref::type >::type bkwd_state2; typedef typename apply2< BackwardOp, bkwd_state2, typename deref::type >::type bkwd_state1; typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; typedef bkwd_state0 state; typedef typename nested_chunk::iterator iterator; }; }; template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_fold_step; template< typename Last , typename State > struct reverse_fold_null_step { typedef Last iterator; typedef State state; }; template<> struct reverse_fold_chunk< -1 > { template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct result_ { typedef typename if_< typename is_same< First,Last >::type , reverse_fold_null_step< Last,State > , reverse_fold_step< First,Last,State,BackwardOp,ForwardOp > >::type res_; typedef typename res_::state state; typedef typename res_::iterator iterator; }; }; template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_fold_step { typedef reverse_fold_chunk< -1 >::template result_< typename mpl::next::type , Last , typename apply2::type>::type , BackwardOp , ForwardOp > nested_step; typedef typename apply2< BackwardOp , typename nested_step::state , typename deref::type >::type state; typedef typename nested_step::iterator iterator; }; template< long N , typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_fold_impl : reverse_fold_chunk ::template result_< First,Last,State,BackwardOp,ForwardOp > { }; }}} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/bcc/reverse_iter_fold_impl.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // *Preprocessed* version of the main "reverse_iter_fold_impl.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { /// forward declaration template< long N , typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_iter_fold_impl; template< long N > struct reverse_iter_fold_chunk; template<> struct reverse_iter_fold_chunk<0> { template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct result_ { typedef First iter0; typedef State fwd_state0; typedef fwd_state0 bkwd_state0; typedef bkwd_state0 state; typedef iter0 iterator; }; }; template<> struct reverse_iter_fold_chunk<1> { template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct result_ { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; typedef typename mpl::next::type iter1; typedef fwd_state1 bkwd_state1; typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; typedef bkwd_state0 state; typedef iter1 iterator; }; }; template<> struct reverse_iter_fold_chunk<2> { template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct result_ { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; typedef typename mpl::next::type iter2; typedef fwd_state2 bkwd_state2; typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1; typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; typedef bkwd_state0 state; typedef iter2 iterator; }; }; template<> struct reverse_iter_fold_chunk<3> { template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct result_ { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp,fwd_state2,iter2 >::type fwd_state3; typedef typename mpl::next::type iter3; typedef fwd_state3 bkwd_state3; typedef typename apply2< BackwardOp,bkwd_state3,iter2 >::type bkwd_state2; typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1; typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; typedef bkwd_state0 state; typedef iter3 iterator; }; }; template<> struct reverse_iter_fold_chunk<4> { template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct result_ { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp,fwd_state2,iter2 >::type fwd_state3; typedef typename mpl::next::type iter3; typedef typename apply2< ForwardOp,fwd_state3,iter3 >::type fwd_state4; typedef typename mpl::next::type iter4; typedef fwd_state4 bkwd_state4; typedef typename apply2< BackwardOp,bkwd_state4,iter3 >::type bkwd_state3; typedef typename apply2< BackwardOp,bkwd_state3,iter2 >::type bkwd_state2; typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1; typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; typedef bkwd_state0 state; typedef iter4 iterator; }; }; template< long N > struct reverse_iter_fold_chunk { template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct result_ { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp,fwd_state2,iter2 >::type fwd_state3; typedef typename mpl::next::type iter3; typedef typename apply2< ForwardOp,fwd_state3,iter3 >::type fwd_state4; typedef typename mpl::next::type iter4; typedef reverse_iter_fold_impl< ( (N - 4) < 0 ? 0 : N - 4 ) , iter4 , Last , fwd_state4 , BackwardOp , ForwardOp > nested_chunk; typedef typename nested_chunk::state bkwd_state4; typedef typename apply2< BackwardOp,bkwd_state4,iter3 >::type bkwd_state3; typedef typename apply2< BackwardOp,bkwd_state3,iter2 >::type bkwd_state2; typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1; typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; typedef bkwd_state0 state; typedef typename nested_chunk::iterator iterator; }; }; template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_iter_fold_step; template< typename Last , typename State > struct reverse_iter_fold_null_step { typedef Last iterator; typedef State state; }; template<> struct reverse_iter_fold_chunk< -1 > { template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct result_ { typedef typename if_< typename is_same< First,Last >::type , reverse_iter_fold_null_step< Last,State > , reverse_iter_fold_step< First,Last,State,BackwardOp,ForwardOp > >::type res_; typedef typename res_::state state; typedef typename res_::iterator iterator; }; }; template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_iter_fold_step { typedef reverse_iter_fold_chunk< -1 >::template result_< typename mpl::next::type , Last , typename apply2< ForwardOp,State,First >::type , BackwardOp , ForwardOp > nested_step; typedef typename apply2< BackwardOp , typename nested_step::state , First >::type state; typedef typename nested_step::iterator iterator; }; template< long N , typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_iter_fold_impl : reverse_iter_fold_chunk ::template result_< First,Last,State,BackwardOp,ForwardOp > { }; }}} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/bcc/set.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // *Preprocessed* version of the main "set.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na , typename T12 = na, typename T13 = na, typename T14 = na , typename T15 = na, typename T16 = na, typename T17 = na , typename T18 = na, typename T19 = na > struct set; template< > struct set< na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : set0< > { typedef set0< >::type type; }; template< typename T0 > struct set< T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : set1 { typedef typename set1::type type; }; template< typename T0, typename T1 > struct set< T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : set2< T0,T1 > { typedef typename set2< T0,T1 >::type type; }; template< typename T0, typename T1, typename T2 > struct set< T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : set3< T0,T1,T2 > { typedef typename set3< T0,T1,T2 >::type type; }; template< typename T0, typename T1, typename T2, typename T3 > struct set< T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : set4< T0,T1,T2,T3 > { typedef typename set4< T0,T1,T2,T3 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 > struct set< T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : set5< T0,T1,T2,T3,T4 > { typedef typename set5< T0,T1,T2,T3,T4 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct set< T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : set6< T0,T1,T2,T3,T4,T5 > { typedef typename set6< T0,T1,T2,T3,T4,T5 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6 > struct set< T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na , na, na, na > : set7< T0,T1,T2,T3,T4,T5,T6 > { typedef typename set7< T0,T1,T2,T3,T4,T5,T6 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7 > struct set< T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na , na, na, na > : set8< T0,T1,T2,T3,T4,T5,T6,T7 > { typedef typename set8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8 > struct set< T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na , na, na, na > : set9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > { typedef typename set9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 > struct set< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na , na, na, na > : set10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > { typedef typename set10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10 > struct set< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na , na, na, na > : set11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > { typedef typename set11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11 > struct set< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na , na, na, na, na > : set12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > { typedef typename set12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12 > struct set< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na , na, na, na, na > : set13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > { typedef typename set13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13 > struct set< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na , na, na, na, na > : set14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > { typedef typename set14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 > struct set< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na , na, na, na, na > : set15< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 > { typedef typename set15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15 > struct set< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, na, na, na, na > : set16< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15 > { typedef typename set16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16 > struct set< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, na, na, na > : set17< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16 > { typedef typename set17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17 > struct set< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, na, na > : set18< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17 > { typedef typename set18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18 > struct set< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18, na > : set19< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18 > { typedef typename set19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type; }; /// primary template (not a specialization!) template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct set : set20< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18, T19 > { typedef typename set20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/bcc/set_c.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // *Preprocessed* version of the main "set_c.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename T, long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX , long C3 = LONG_MAX, long C4 = LONG_MAX, long C5 = LONG_MAX , long C6 = LONG_MAX, long C7 = LONG_MAX, long C8 = LONG_MAX , long C9 = LONG_MAX, long C10 = LONG_MAX, long C11 = LONG_MAX , long C12 = LONG_MAX, long C13 = LONG_MAX, long C14 = LONG_MAX , long C15 = LONG_MAX, long C16 = LONG_MAX, long C17 = LONG_MAX , long C18 = LONG_MAX, long C19 = LONG_MAX > struct set_c; template< typename T > struct set_c< T, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : set0_c { typedef typename set0_c::type type; }; template< typename T, long C0 > struct set_c< T, C0, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : set1_c< T,C0 > { typedef typename set1_c< T,C0 >::type type; }; template< typename T, long C0, long C1 > struct set_c< T, C0, C1, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : set2_c< T,C0,C1 > { typedef typename set2_c< T,C0,C1 >::type type; }; template< typename T, long C0, long C1, long C2 > struct set_c< T, C0, C1, C2, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : set3_c< T,C0,C1,C2 > { typedef typename set3_c< T,C0,C1,C2 >::type type; }; template< typename T, long C0, long C1, long C2, long C3 > struct set_c< T, C0, C1, C2, C3, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : set4_c< T,C0,C1,C2,C3 > { typedef typename set4_c< T,C0,C1,C2,C3 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4 > struct set_c< T, C0, C1, C2, C3, C4, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : set5_c< T,C0,C1,C2,C3,C4 > { typedef typename set5_c< T,C0,C1,C2,C3,C4 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 > struct set_c< T, C0, C1, C2, C3, C4, C5, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX > : set6_c< T,C0,C1,C2,C3,C4,C5 > { typedef typename set6_c< T,C0,C1,C2,C3,C4,C5 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX > : set7_c< T,C0,C1,C2,C3,C4,C5,C6 > { typedef typename set7_c< T,C0,C1,C2,C3,C4,C5,C6 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, C7, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX > : set8_c< T,C0,C1,C2,C3,C4,C5,C6,C7 > { typedef typename set8_c< T,C0,C1,C2,C3,C4,C5,C6,C7 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX > : set9_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8 > { typedef typename set9_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX > : set10_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 > { typedef typename set10_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : set11_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 > { typedef typename set11_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : set12_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 > { typedef typename set12_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : set13_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 > { typedef typename set13_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : set14_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 > { typedef typename set14_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : set15_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 > { typedef typename set15_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : set16_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15 > { typedef typename set16_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, LONG_MAX, LONG_MAX, LONG_MAX > : set17_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16 > { typedef typename set17_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, C17, LONG_MAX, LONG_MAX > : set18_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, C17 > { typedef typename set18_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, C17, C18, LONG_MAX > : set19_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, C17, C18 > { typedef typename set19_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18 >::type type; }; /// primary template (not a specialization!) template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct set_c : set20_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, C17, C18, C19 > { typedef typename set20_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19 >::type type; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/bcc/shift_left.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // Copyright Jaap Suter 2003 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // *Preprocessed* version of the main "shift_left.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct shift_left_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< shift_left_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< shift_left_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct shift_left_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct shift_left_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct shift_left_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct shift_left_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct shift_left : shift_left_impl< typename shift_left_tag::type , typename shift_left_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, shift_left, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 2, shift_left) }} namespace boost { namespace mpl { template<> struct shift_left_impl< integral_c_tag,integral_c_tag > { template< typename N, typename S > struct apply : integral_c< typename N::value_type , ( BOOST_MPL_AUX_VALUE_WKND(N)::value << BOOST_MPL_AUX_VALUE_WKND(S)::value ) > { }; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/bcc/shift_right.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // Copyright Jaap Suter 2003 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // *Preprocessed* version of the main "shift_right.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct shift_right_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< shift_right_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< shift_right_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct shift_right_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct shift_right_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct shift_right_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct shift_right_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct shift_right : shift_right_impl< typename shift_right_tag::type , typename shift_right_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, shift_right, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 2, shift_right) }} namespace boost { namespace mpl { template<> struct shift_right_impl< integral_c_tag,integral_c_tag > { template< typename N, typename S > struct apply : integral_c< typename N::value_type , ( BOOST_MPL_AUX_VALUE_WKND(N)::value >> BOOST_MPL_AUX_VALUE_WKND(S)::value ) > { }; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/bcc/template_arity.hpp ================================================ // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // *Preprocessed* version of the main "template_arity.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< bool > struct template_arity_impl { template< typename F > struct result_ : mpl::int_< -1 > { }; }; template<> struct template_arity_impl { template< typename F > struct result_ : F::arity { }; }; template< typename F > struct template_arity : template_arity_impl< ::boost::mpl::aux::has_rebind::value > ::template result_ { }; }}} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/bcc/times.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // *Preprocessed* version of the main "times.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct times_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< times_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< times_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct times_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct times_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct times_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct times_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) , typename N3 = na, typename N4 = na, typename N5 = na > struct times : times< times< times< times< N1,N2 >, N3>, N4>, N5> { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , times , ( N1, N2, N3, N4, N5 ) ) }; template< typename N1, typename N2, typename N3, typename N4 > struct times< N1,N2,N3,N4,na > : times< times< times< N1,N2 >, N3>, N4> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , times , ( N1, N2, N3, N4, na ) ) }; template< typename N1, typename N2, typename N3 > struct times< N1,N2,N3,na,na > : times< times< N1,N2 >, N3> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , times , ( N1, N2, N3, na, na ) ) }; template< typename N1, typename N2 > struct times< N1,N2,na,na,na > : times_impl< typename times_tag::type , typename times_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , times , ( N1, N2, na, na, na ) ) }; BOOST_MPL_AUX_NA_SPEC2(2, 5, times) }} namespace boost { namespace mpl { template<> struct times_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : integral_c< typename aux::largest_int< typename N1::value_type , typename N2::value_type >::type , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value * BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/bcc/unpack_args.hpp ================================================ // Copyright Aleksey Gurtovoy 2002-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // *Preprocessed* version of the main "unpack_args.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< int size, typename F, typename Args > struct unpack_args_impl; template< typename F, typename Args > struct unpack_args_impl< 0,F,Args > : apply0< F > { }; template< typename F, typename Args > struct unpack_args_impl< 1,F,Args > : apply1< F , typename at_c< Args,0 >::type > { }; template< typename F, typename Args > struct unpack_args_impl< 2,F,Args > : apply2< F , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type > { }; template< typename F, typename Args > struct unpack_args_impl< 3,F,Args > : apply3< F , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type , typename at_c< Args,2 >::type > { }; template< typename F, typename Args > struct unpack_args_impl< 4,F,Args > : apply4< F , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type , typename at_c< Args,2 >::type, typename at_c< Args,3 >::type > { }; template< typename F, typename Args > struct unpack_args_impl< 5,F,Args > : apply5< F , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type , typename at_c< Args,2 >::type, typename at_c< Args,3 >::type , typename at_c< Args,4 >::type > { }; } template< typename F > struct unpack_args { template< typename Args > struct apply { typedef typename aux::unpack_args_impl< size::value , F , Args >::type type; }; }; BOOST_MPL_AUX_PASS_THROUGH_LAMBDA_SPEC(1, unpack_args) }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/bcc/vector.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // *Preprocessed* version of the main "vector.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na , typename T12 = na, typename T13 = na, typename T14 = na , typename T15 = na, typename T16 = na, typename T17 = na , typename T18 = na, typename T19 = na > struct vector; template< > struct vector< na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector0< > { typedef vector0< >::type type; }; template< typename T0 > struct vector< T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector1 { typedef typename vector1::type type; }; template< typename T0, typename T1 > struct vector< T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector2< T0,T1 > { typedef typename vector2< T0,T1 >::type type; }; template< typename T0, typename T1, typename T2 > struct vector< T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector3< T0,T1,T2 > { typedef typename vector3< T0,T1,T2 >::type type; }; template< typename T0, typename T1, typename T2, typename T3 > struct vector< T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector4< T0,T1,T2,T3 > { typedef typename vector4< T0,T1,T2,T3 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 > struct vector< T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector5< T0,T1,T2,T3,T4 > { typedef typename vector5< T0,T1,T2,T3,T4 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct vector< T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector6< T0,T1,T2,T3,T4,T5 > { typedef typename vector6< T0,T1,T2,T3,T4,T5 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6 > struct vector< T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector7< T0,T1,T2,T3,T4,T5,T6 > { typedef typename vector7< T0,T1,T2,T3,T4,T5,T6 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7 > struct vector< T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na , na, na, na > : vector8< T0,T1,T2,T3,T4,T5,T6,T7 > { typedef typename vector8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8 > struct vector< T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na , na, na, na > : vector9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > { typedef typename vector9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 > struct vector< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na , na, na, na > : vector10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > { typedef typename vector10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10 > struct vector< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na , na, na, na > : vector11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > { typedef typename vector11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11 > struct vector< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na , na, na, na, na > : vector12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > { typedef typename vector12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12 > struct vector< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na , na, na, na, na > : vector13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > { typedef typename vector13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13 > struct vector< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na , na, na, na, na > : vector14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > { typedef typename vector14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 > struct vector< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na , na, na, na, na > : vector15< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 > { typedef typename vector15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15 > struct vector< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, na, na, na, na > : vector16< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15 > { typedef typename vector16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16 > struct vector< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, na, na, na > : vector17< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16 > { typedef typename vector17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17 > struct vector< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, na, na > : vector18< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17 > { typedef typename vector18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18 > struct vector< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18, na > : vector19< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18 > { typedef typename vector19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type; }; /// primary template (not a specialization!) template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct vector : vector20< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18, T19 > { typedef typename vector20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/bcc/vector_c.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2008 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // *Preprocessed* version of the main "vector_c.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename T, long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX , long C3 = LONG_MAX, long C4 = LONG_MAX, long C5 = LONG_MAX , long C6 = LONG_MAX, long C7 = LONG_MAX, long C8 = LONG_MAX , long C9 = LONG_MAX, long C10 = LONG_MAX, long C11 = LONG_MAX , long C12 = LONG_MAX, long C13 = LONG_MAX, long C14 = LONG_MAX , long C15 = LONG_MAX, long C16 = LONG_MAX, long C17 = LONG_MAX , long C18 = LONG_MAX, long C19 = LONG_MAX > struct vector_c; template< typename T > struct vector_c< T, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector0_c { typedef typename vector0_c::type type; }; template< typename T, long C0 > struct vector_c< T, C0, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector1_c< T, T(C0) > { typedef typename vector1_c< T, T(C0) >::type type; }; template< typename T, long C0, long C1 > struct vector_c< T, C0, C1, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector2_c< T, T(C0), T(C1) > { typedef typename vector2_c< T, T(C0), T(C1) >::type type; }; template< typename T, long C0, long C1, long C2 > struct vector_c< T, C0, C1, C2, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector3_c< T, T(C0), T(C1), T(C2) > { typedef typename vector3_c< T, T(C0), T(C1), T(C2) >::type type; }; template< typename T, long C0, long C1, long C2, long C3 > struct vector_c< T, C0, C1, C2, C3, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector4_c< T, T(C0), T(C1), T(C2), T(C3) > { typedef typename vector4_c< T, T(C0), T(C1), T(C2), T(C3) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4 > struct vector_c< T, C0, C1, C2, C3, C4, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector5_c< T, T(C0), T(C1), T(C2), T(C3), T(C4) > { typedef typename vector5_c< T, T(C0), T(C1), T(C2), T(C3), T(C4) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 > struct vector_c< T, C0, C1, C2, C3, C4, C5, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX > : vector6_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5) > { typedef typename vector6_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX > : vector7_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6) > { typedef typename vector7_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, C7, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX > : vector8_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7) > { typedef typename vector8_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX > : vector9_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8) > { typedef typename vector9_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX > : vector10_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9) > { typedef typename vector10_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector11_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10) > { typedef typename vector11_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector12_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11) > { typedef typename vector12_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector13_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12) > { typedef typename vector13_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector14_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13) > { typedef typename vector14_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector15_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14) > { typedef typename vector15_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector16_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15) > { typedef typename vector16_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, LONG_MAX, LONG_MAX, LONG_MAX > : vector17_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16) > { typedef typename vector17_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, C17, LONG_MAX, LONG_MAX > : vector18_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17) > { typedef typename vector18_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, C17, C18, LONG_MAX > : vector19_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17), T(C18) > { typedef typename vector19_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17), T(C18) >::type type; }; /// primary template (not a specialization!) template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct vector_c : vector20_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17), T(C18), T(C19) > { typedef typename vector20_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17), T(C18), T(C19) >::type type; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/bcc551/advance_backward.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/aux_/advance_backward.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< long N > struct advance_backward; template<> struct advance_backward<0> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef iter0 type; }; }; template<> struct advance_backward<1> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef typename prior::type iter1; typedef iter1 type; }; }; template<> struct advance_backward<2> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef typename prior::type iter1; typedef typename prior::type iter2; typedef iter2 type; }; }; template<> struct advance_backward<3> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef typename prior::type iter1; typedef typename prior::type iter2; typedef typename prior::type iter3; typedef iter3 type; }; }; template<> struct advance_backward<4> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef typename prior::type iter1; typedef typename prior::type iter2; typedef typename prior::type iter3; typedef typename prior::type iter4; typedef iter4 type; }; }; template< long N > struct advance_backward { template< typename Iterator > struct apply { typedef typename apply_wrap1< advance_backward<4> , Iterator >::type chunk_result_; typedef typename apply_wrap1< advance_backward<( (N - 4) < 0 ? 0 : N - 4 )> , chunk_result_ >::type type; }; }; }}} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/bcc551/advance_forward.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/aux_/advance_forward.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< long N > struct advance_forward; template<> struct advance_forward<0> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef iter0 type; }; }; template<> struct advance_forward<1> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef typename next::type iter1; typedef iter1 type; }; }; template<> struct advance_forward<2> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef typename next::type iter1; typedef typename next::type iter2; typedef iter2 type; }; }; template<> struct advance_forward<3> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef typename next::type iter1; typedef typename next::type iter2; typedef typename next::type iter3; typedef iter3 type; }; }; template<> struct advance_forward<4> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef typename next::type iter1; typedef typename next::type iter2; typedef typename next::type iter3; typedef typename next::type iter4; typedef iter4 type; }; }; template< long N > struct advance_forward { template< typename Iterator > struct apply { typedef typename apply_wrap1< advance_forward<4> , Iterator >::type chunk_result_; typedef typename apply_wrap1< advance_forward<( (N - 4) < 0 ? 0 : N - 4 )> , chunk_result_ >::type type; }; }; }}} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/bcc551/and.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/and.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< bool C_, typename T1, typename T2, typename T3, typename T4 > struct and_impl : false_ { }; template< typename T1, typename T2, typename T3, typename T4 > struct and_impl< true,T1,T2,T3,T4 > : and_impl< BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value , T2, T3, T4 , true_ > { }; template<> struct and_impl< true , true_, true_, true_, true_ > : true_ { }; } // namespace aux template< typename BOOST_MPL_AUX_NA_PARAM(T1) , typename BOOST_MPL_AUX_NA_PARAM(T2) , typename T3 = true_, typename T4 = true_, typename T5 = true_ > struct and_ : aux::and_impl< BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value , T2, T3, T4, T5 > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , and_ , ( T1, T2, T3, T4, T5) ) }; BOOST_MPL_AUX_NA_SPEC2( 2 , 5 , and_ ) }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/bcc551/apply.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/apply.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename F > struct apply0 : apply_wrap0< typename lambda::type > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 1 , apply0 , (F ) ) }; template< typename F > struct apply< F,na,na,na,na,na > : apply0 { }; template< typename F, typename T1 > struct apply1 : apply_wrap1< typename lambda::type , T1 > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 2 , apply1 , (F, T1) ) }; template< typename F, typename T1 > struct apply< F,T1,na,na,na,na > : apply1< F,T1 > { }; template< typename F, typename T1, typename T2 > struct apply2 : apply_wrap2< typename lambda::type , T1, T2 > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 3 , apply2 , (F, T1, T2) ) }; template< typename F, typename T1, typename T2 > struct apply< F,T1,T2,na,na,na > : apply2< F,T1,T2 > { }; template< typename F, typename T1, typename T2, typename T3 > struct apply3 : apply_wrap3< typename lambda::type , T1, T2, T3 > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 4 , apply3 , (F, T1, T2, T3) ) }; template< typename F, typename T1, typename T2, typename T3 > struct apply< F,T1,T2,T3,na,na > : apply3< F,T1,T2,T3 > { }; template< typename F, typename T1, typename T2, typename T3, typename T4 > struct apply4 : apply_wrap4< typename lambda::type , T1, T2, T3, T4 > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , apply4 , (F, T1, T2, T3, T4) ) }; template< typename F, typename T1, typename T2, typename T3, typename T4 > struct apply< F,T1,T2,T3,T4,na > : apply4< F,T1,T2,T3,T4 > { }; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct apply5 : apply_wrap5< typename lambda::type , T1, T2, T3, T4, T5 > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 6 , apply5 , (F, T1, T2, T3, T4, T5) ) }; /// primary template (not a specialization!) template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct apply : apply5< F,T1,T2,T3,T4,T5 > { }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/bcc551/apply_fwd.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/apply_fwd.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename F, typename T1 = na, typename T2 = na, typename T3 = na , typename T4 = na, typename T5 = na > struct apply; template< typename F > struct apply0; template< typename F, typename T1 > struct apply1; template< typename F, typename T1, typename T2 > struct apply2; template< typename F, typename T1, typename T2, typename T3 > struct apply3; template< typename F, typename T1, typename T2, typename T3, typename T4 > struct apply4; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct apply5; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/bcc551/apply_wrap.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/apply_wrap.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< int N, typename F > struct apply_wrap_impl0; template< typename F > struct apply_wrap_impl0< 0 , F > { typedef typename F::template apply< /// since the defaults are "lost", we have to pass *something* even for nullary /// metafunction classes na > type; }; template< typename F > struct apply_wrap_impl0< 1 , F > { typedef typename F::template apply< na > type; }; template< typename F > struct apply_wrap_impl0< 2 , F > { typedef typename F::template apply< na, na > type; }; template< typename F > struct apply_wrap_impl0< 3 , F > { typedef typename F::template apply< na, na, na > type; }; template< typename F > struct apply_wrap_impl0< 4 , F > { typedef typename F::template apply< na, na, na, na > type; }; template< typename F > struct apply_wrap_impl0< 5 , F > { typedef typename F::template apply< na, na, na, na, na > type; }; template< typename F > struct apply_wrap0 : apply_wrap_impl0< ::boost::mpl::aux::arity< F,0 >::value , F >::type { }; template< int N, typename F, typename T1 > struct apply_wrap_impl1; template< typename F, typename T1 > struct apply_wrap_impl1< 1 , F , T1 > { typedef typename F::template apply< T1 > type; }; template< typename F, typename T1 > struct apply_wrap_impl1< 2 , F , T1 > { typedef typename F::template apply< T1 , na > type; }; template< typename F, typename T1 > struct apply_wrap_impl1< 3 , F , T1 > { typedef typename F::template apply< T1 , na, na > type; }; template< typename F, typename T1 > struct apply_wrap_impl1< 4 , F , T1 > { typedef typename F::template apply< T1 , na, na, na > type; }; template< typename F, typename T1 > struct apply_wrap_impl1< 5 , F , T1 > { typedef typename F::template apply< T1 , na, na, na, na > type; }; template< typename F, typename T1 > struct apply_wrap1 : apply_wrap_impl1< ::boost::mpl::aux::arity< F,1 >::value , F , T1 >::type { }; template< int N, typename F, typename T1, typename T2 > struct apply_wrap_impl2; template< typename F, typename T1, typename T2 > struct apply_wrap_impl2< 2 , F , T1, T2 > { typedef typename F::template apply< T1, T2 > type; }; template< typename F, typename T1, typename T2 > struct apply_wrap_impl2< 3 , F , T1, T2 > { typedef typename F::template apply< T1, T2 , na > type; }; template< typename F, typename T1, typename T2 > struct apply_wrap_impl2< 4 , F , T1, T2 > { typedef typename F::template apply< T1, T2 , na, na > type; }; template< typename F, typename T1, typename T2 > struct apply_wrap_impl2< 5 , F , T1, T2 > { typedef typename F::template apply< T1, T2 , na, na, na > type; }; template< typename F, typename T1, typename T2 > struct apply_wrap2 : apply_wrap_impl2< ::boost::mpl::aux::arity< F,2 >::value , F , T1, T2 >::type { }; template< int N, typename F, typename T1, typename T2, typename T3 > struct apply_wrap_impl3; template< typename F, typename T1, typename T2, typename T3 > struct apply_wrap_impl3< 3 , F , T1, T2, T3 > { typedef typename F::template apply< T1, T2, T3 > type; }; template< typename F, typename T1, typename T2, typename T3 > struct apply_wrap_impl3< 4 , F , T1, T2, T3 > { typedef typename F::template apply< T1, T2, T3 , na > type; }; template< typename F, typename T1, typename T2, typename T3 > struct apply_wrap_impl3< 5 , F , T1, T2, T3 > { typedef typename F::template apply< T1, T2, T3 , na, na > type; }; template< typename F, typename T1, typename T2, typename T3 > struct apply_wrap3 : apply_wrap_impl3< ::boost::mpl::aux::arity< F,3 >::value , F , T1, T2, T3 >::type { }; template< int N, typename F, typename T1, typename T2, typename T3, typename T4 > struct apply_wrap_impl4; template< typename F, typename T1, typename T2, typename T3, typename T4 > struct apply_wrap_impl4< 4 , F , T1, T2, T3, T4 > { typedef typename F::template apply< T1, T2, T3, T4 > type; }; template< typename F, typename T1, typename T2, typename T3, typename T4 > struct apply_wrap_impl4< 5 , F , T1, T2, T3, T4 > { typedef typename F::template apply< T1, T2, T3, T4 , na > type; }; template< typename F, typename T1, typename T2, typename T3, typename T4 > struct apply_wrap4 : apply_wrap_impl4< ::boost::mpl::aux::arity< F,4 >::value , F , T1, T2, T3, T4 >::type { }; template< int N, typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct apply_wrap_impl5; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct apply_wrap_impl5< 5 , F , T1, T2, T3, T4, T5 > { typedef typename F::template apply< T1, T2, T3, T4, T5 > type; }; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct apply_wrap5 : apply_wrap_impl5< ::boost::mpl::aux::arity< F,5 >::value , F , T1, T2, T3, T4, T5 >::type { }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/bcc551/arg.hpp ================================================ // Copyright Peter Dimov 2001-2002 // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/arg.hpp" header // -- DO NOT modify by hand! BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN template<> struct arg< -1 > { BOOST_STATIC_CONSTANT(int, value = -1); BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) BOOST_MPL_AUX_ARG_TYPEDEF(na, type) template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { typedef U1 type; BOOST_MPL_AUX_ASSERT_NOT_NA(type); }; }; template<> struct arg<1> { BOOST_STATIC_CONSTANT(int, value = 1); typedef arg<2> next; BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) BOOST_MPL_AUX_ARG_TYPEDEF(na, type) template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { typedef U1 type; BOOST_MPL_AUX_ASSERT_NOT_NA(type); }; }; template<> struct arg<2> { BOOST_STATIC_CONSTANT(int, value = 2); typedef arg<3> next; BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) BOOST_MPL_AUX_ARG_TYPEDEF(na, type) template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { typedef U2 type; BOOST_MPL_AUX_ASSERT_NOT_NA(type); }; }; template<> struct arg<3> { BOOST_STATIC_CONSTANT(int, value = 3); typedef arg<4> next; BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) BOOST_MPL_AUX_ARG_TYPEDEF(na, type) template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { typedef U3 type; BOOST_MPL_AUX_ASSERT_NOT_NA(type); }; }; template<> struct arg<4> { BOOST_STATIC_CONSTANT(int, value = 4); typedef arg<5> next; BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) BOOST_MPL_AUX_ARG_TYPEDEF(na, type) template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { typedef U4 type; BOOST_MPL_AUX_ASSERT_NOT_NA(type); }; }; template<> struct arg<5> { BOOST_STATIC_CONSTANT(int, value = 5); typedef arg<6> next; BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) BOOST_MPL_AUX_ARG_TYPEDEF(na, type) template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { typedef U5 type; BOOST_MPL_AUX_ASSERT_NOT_NA(type); }; }; BOOST_MPL_AUX_NONTYPE_ARITY_SPEC(1,int, arg) BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/bcc551/basic_bind.hpp ================================================ // Copyright Peter Dimov 2001 // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/aux_/basic_bind.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< typename T, typename U1, typename U2, typename U3, typename U4 , typename U5 > struct resolve_bind_arg { typedef T type; }; template< int N, typename U1, typename U2, typename U3, typename U4, typename U5 > struct resolve_bind_arg< arg, U1, U2, U3, U4, U5 > { typedef typename apply_wrap5, U1, U2, U3, U4, U5>::type type; }; } // namespace aux template< typename F > struct bind0 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; public: typedef typename apply_wrap0< f_ >::type type; }; }; namespace aux { template< typename F, typename U1, typename U2, typename U3, typename U4 , typename U5 > struct resolve_bind_arg< bind0, U1, U2, U3, U4, U5 > { typedef bind0 f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(1, bind0) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(1, bind0) template< typename F, typename T1 > struct bind1 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; public: typedef typename apply_wrap1< f_ , typename t1::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename U1, typename U2, typename U3 , typename U4, typename U5 > struct resolve_bind_arg< bind1< F,T1 >, U1, U2, U3, U4, U5 > { typedef bind1< F,T1 > f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(2, bind1) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(2, bind1) template< typename F, typename T1, typename T2 > struct bind2 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; public: typedef typename apply_wrap2< f_ , typename t1::type, typename t2::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename T2, typename U1, typename U2 , typename U3, typename U4, typename U5 > struct resolve_bind_arg< bind2< F,T1,T2 >, U1, U2, U3, U4, U5 > { typedef bind2< F,T1,T2 > f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(3, bind2) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(3, bind2) template< typename F, typename T1, typename T2, typename T3 > struct bind3 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3; public: typedef typename apply_wrap3< f_ , typename t1::type, typename t2::type, typename t3::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename T2, typename T3, typename U1 , typename U2, typename U3, typename U4, typename U5 > struct resolve_bind_arg< bind3< F,T1,T2,T3 >, U1, U2, U3, U4, U5 > { typedef bind3< F,T1,T2,T3 > f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(4, bind3) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(4, bind3) template< typename F, typename T1, typename T2, typename T3, typename T4 > struct bind4 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3; typedef aux::resolve_bind_arg< T4,U1,U2,U3,U4,U5 > t4; public: typedef typename apply_wrap4< f_ , typename t1::type, typename t2::type, typename t3::type , typename t4::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename T2, typename T3, typename T4 , typename U1, typename U2, typename U3, typename U4, typename U5 > struct resolve_bind_arg< bind4< F,T1,T2,T3,T4 >, U1, U2, U3, U4, U5 > { typedef bind4< F,T1,T2,T3,T4 > f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(5, bind4) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(5, bind4) template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct bind5 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3; typedef aux::resolve_bind_arg< T4,U1,U2,U3,U4,U5 > t4; typedef aux::resolve_bind_arg< T5,U1,U2,U3,U4,U5 > t5; public: typedef typename apply_wrap5< f_ , typename t1::type, typename t2::type, typename t3::type , typename t4::type, typename t5::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5, typename U1, typename U2, typename U3, typename U4 , typename U5 > struct resolve_bind_arg< bind5< F,T1,T2,T3,T4,T5 >, U1, U2, U3, U4, U5 > { typedef bind5< F,T1,T2,T3,T4,T5 > f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(6, bind5) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(6, bind5) }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/bcc551/bind.hpp ================================================ // Copyright Peter Dimov 2001 // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/bind.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< typename T, typename U1, typename U2, typename U3, typename U4 , typename U5 > struct resolve_bind_arg { typedef T type; }; template< typename T , typename Arg > struct replace_unnamed_arg { typedef Arg next; typedef T type; }; template< typename Arg > struct replace_unnamed_arg< arg< -1 >, Arg > { typedef typename Arg::next next; typedef Arg type; }; template< int N, typename U1, typename U2, typename U3, typename U4, typename U5 > struct resolve_bind_arg< arg, U1, U2, U3, U4, U5 > { typedef typename apply_wrap5, U1, U2, U3, U4, U5>::type type; }; } // namespace aux template< typename F > struct bind0 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; typedef typename r0::type a0; typedef typename r0::next n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; /// public: typedef typename apply_wrap0< f_ >::type type; }; }; namespace aux { template< typename F, typename U1, typename U2, typename U3, typename U4 , typename U5 > struct resolve_bind_arg< bind0, U1, U2, U3, U4, U5 > { typedef bind0 f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(1, bind0) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(1, bind0) template< typename F, typename T1 > struct bind1 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; typedef typename r0::type a0; typedef typename r0::next n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; /// typedef aux::replace_unnamed_arg< T1,n1 > r1; typedef typename r1::type a1; typedef typename r1::next n2; typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; /// public: typedef typename apply_wrap1< f_ , typename t1::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename U1, typename U2, typename U3 , typename U4, typename U5 > struct resolve_bind_arg< bind1< F,T1 >, U1, U2, U3, U4, U5 > { typedef bind1< F,T1 > f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(2, bind1) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(2, bind1) template< typename F, typename T1, typename T2 > struct bind2 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; typedef typename r0::type a0; typedef typename r0::next n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; /// typedef aux::replace_unnamed_arg< T1,n1 > r1; typedef typename r1::type a1; typedef typename r1::next n2; typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; /// typedef aux::replace_unnamed_arg< T2,n2 > r2; typedef typename r2::type a2; typedef typename r2::next n3; typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; /// public: typedef typename apply_wrap2< f_ , typename t1::type, typename t2::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename T2, typename U1, typename U2 , typename U3, typename U4, typename U5 > struct resolve_bind_arg< bind2< F,T1,T2 >, U1, U2, U3, U4, U5 > { typedef bind2< F,T1,T2 > f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(3, bind2) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(3, bind2) template< typename F, typename T1, typename T2, typename T3 > struct bind3 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; typedef typename r0::type a0; typedef typename r0::next n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; /// typedef aux::replace_unnamed_arg< T1,n1 > r1; typedef typename r1::type a1; typedef typename r1::next n2; typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; /// typedef aux::replace_unnamed_arg< T2,n2 > r2; typedef typename r2::type a2; typedef typename r2::next n3; typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; /// typedef aux::replace_unnamed_arg< T3,n3 > r3; typedef typename r3::type a3; typedef typename r3::next n4; typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; /// public: typedef typename apply_wrap3< f_ , typename t1::type, typename t2::type, typename t3::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename T2, typename T3, typename U1 , typename U2, typename U3, typename U4, typename U5 > struct resolve_bind_arg< bind3< F,T1,T2,T3 >, U1, U2, U3, U4, U5 > { typedef bind3< F,T1,T2,T3 > f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(4, bind3) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(4, bind3) template< typename F, typename T1, typename T2, typename T3, typename T4 > struct bind4 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; typedef typename r0::type a0; typedef typename r0::next n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; /// typedef aux::replace_unnamed_arg< T1,n1 > r1; typedef typename r1::type a1; typedef typename r1::next n2; typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; /// typedef aux::replace_unnamed_arg< T2,n2 > r2; typedef typename r2::type a2; typedef typename r2::next n3; typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; /// typedef aux::replace_unnamed_arg< T3,n3 > r3; typedef typename r3::type a3; typedef typename r3::next n4; typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; /// typedef aux::replace_unnamed_arg< T4,n4 > r4; typedef typename r4::type a4; typedef typename r4::next n5; typedef aux::resolve_bind_arg< a4,U1,U2,U3,U4,U5 > t4; /// public: typedef typename apply_wrap4< f_ , typename t1::type, typename t2::type, typename t3::type , typename t4::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename T2, typename T3, typename T4 , typename U1, typename U2, typename U3, typename U4, typename U5 > struct resolve_bind_arg< bind4< F,T1,T2,T3,T4 >, U1, U2, U3, U4, U5 > { typedef bind4< F,T1,T2,T3,T4 > f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(5, bind4) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(5, bind4) template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct bind5 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; typedef typename r0::type a0; typedef typename r0::next n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; /// typedef aux::replace_unnamed_arg< T1,n1 > r1; typedef typename r1::type a1; typedef typename r1::next n2; typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; /// typedef aux::replace_unnamed_arg< T2,n2 > r2; typedef typename r2::type a2; typedef typename r2::next n3; typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; /// typedef aux::replace_unnamed_arg< T3,n3 > r3; typedef typename r3::type a3; typedef typename r3::next n4; typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; /// typedef aux::replace_unnamed_arg< T4,n4 > r4; typedef typename r4::type a4; typedef typename r4::next n5; typedef aux::resolve_bind_arg< a4,U1,U2,U3,U4,U5 > t4; /// typedef aux::replace_unnamed_arg< T5,n5 > r5; typedef typename r5::type a5; typedef typename r5::next n6; typedef aux::resolve_bind_arg< a5,U1,U2,U3,U4,U5 > t5; /// public: typedef typename apply_wrap5< f_ , typename t1::type, typename t2::type, typename t3::type , typename t4::type, typename t5::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5, typename U1, typename U2, typename U3, typename U4 , typename U5 > struct resolve_bind_arg< bind5< F,T1,T2,T3,T4,T5 >, U1, U2, U3, U4, U5 > { typedef bind5< F,T1,T2,T3,T4,T5 > f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(6, bind5) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(6, bind5) }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/bcc551/bind_fwd.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/bind_fwd.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename F > struct bind0; template< typename F, typename T1 > struct bind1; template< typename F, typename T1, typename T2 > struct bind2; template< typename F, typename T1, typename T2, typename T3 > struct bind3; template< typename F, typename T1, typename T2, typename T3, typename T4 > struct bind4; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct bind5; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/bcc551/bitand.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // Copyright Jaap Suter 2003 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/bitand.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct bitand_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< bitand_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< bitand_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct bitand_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct bitand_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct bitand_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct bitand_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) , typename N3 = na, typename N4 = na, typename N5 = na > struct bitand_ : bitand_< bitand_< bitand_< bitand_< N1,N2 >, N3>, N4>, N5> { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , bitand_ , ( N1, N2, N3, N4, N5 ) ) }; template< typename N1, typename N2, typename N3, typename N4 > struct bitand_< N1,N2,N3,N4,na > : bitand_< bitand_< bitand_< N1,N2 >, N3>, N4> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , bitand_ , ( N1, N2, N3, N4, na ) ) }; template< typename N1, typename N2, typename N3 > struct bitand_< N1,N2,N3,na,na > : bitand_< bitand_< N1,N2 >, N3> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , bitand_ , ( N1, N2, N3, na, na ) ) }; template< typename N1, typename N2 > struct bitand_< N1,N2,na,na,na > : bitand_impl< typename bitand_tag::type , typename bitand_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , bitand_ , ( N1, N2, na, na, na ) ) }; BOOST_MPL_AUX_NA_SPEC2(2, 5, bitand_) }} namespace boost { namespace mpl { template<> struct bitand_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : integral_c< typename aux::largest_int< typename N1::value_type , typename N2::value_type >::type , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value & BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/bcc551/bitor.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // Copyright Jaap Suter 2003 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/bitor.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct bitor_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< bitor_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< bitor_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct bitor_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct bitor_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct bitor_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct bitor_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) , typename N3 = na, typename N4 = na, typename N5 = na > struct bitor_ : bitor_< bitor_< bitor_< bitor_< N1,N2 >, N3>, N4>, N5> { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , bitor_ , ( N1, N2, N3, N4, N5 ) ) }; template< typename N1, typename N2, typename N3, typename N4 > struct bitor_< N1,N2,N3,N4,na > : bitor_< bitor_< bitor_< N1,N2 >, N3>, N4> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , bitor_ , ( N1, N2, N3, N4, na ) ) }; template< typename N1, typename N2, typename N3 > struct bitor_< N1,N2,N3,na,na > : bitor_< bitor_< N1,N2 >, N3> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , bitor_ , ( N1, N2, N3, na, na ) ) }; template< typename N1, typename N2 > struct bitor_< N1,N2,na,na,na > : bitor_impl< typename bitor_tag::type , typename bitor_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , bitor_ , ( N1, N2, na, na, na ) ) }; BOOST_MPL_AUX_NA_SPEC2(2, 5, bitor_) }} namespace boost { namespace mpl { template<> struct bitor_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : integral_c< typename aux::largest_int< typename N1::value_type , typename N2::value_type >::type , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value | BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/bcc551/bitxor.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // Copyright Jaap Suter 2003 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/bitxor.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct bitxor_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< bitxor_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< bitxor_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct bitxor_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct bitxor_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct bitxor_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct bitxor_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) , typename N3 = na, typename N4 = na, typename N5 = na > struct bitxor_ : bitxor_< bitxor_< bitxor_< bitxor_< N1,N2 >, N3>, N4>, N5> { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , bitxor_ , ( N1, N2, N3, N4, N5 ) ) }; template< typename N1, typename N2, typename N3, typename N4 > struct bitxor_< N1,N2,N3,N4,na > : bitxor_< bitxor_< bitxor_< N1,N2 >, N3>, N4> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , bitxor_ , ( N1, N2, N3, N4, na ) ) }; template< typename N1, typename N2, typename N3 > struct bitxor_< N1,N2,N3,na,na > : bitxor_< bitxor_< N1,N2 >, N3> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , bitxor_ , ( N1, N2, N3, na, na ) ) }; template< typename N1, typename N2 > struct bitxor_< N1,N2,na,na,na > : bitxor_impl< typename bitxor_tag::type , typename bitxor_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , bitxor_ , ( N1, N2, na, na, na ) ) }; BOOST_MPL_AUX_NA_SPEC2(2, 5, bitxor_) }} namespace boost { namespace mpl { template<> struct bitxor_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : integral_c< typename aux::largest_int< typename N1::value_type , typename N2::value_type >::type , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value ^ BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/bcc551/deque.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/deque.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na , typename T12 = na, typename T13 = na, typename T14 = na , typename T15 = na, typename T16 = na, typename T17 = na , typename T18 = na, typename T19 = na > struct deque; template< > struct deque< na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector0< > { typedef vector0< >::type type; }; template< typename T0 > struct deque< T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector1 { typedef typename vector1::type type; }; template< typename T0, typename T1 > struct deque< T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector2< T0,T1 > { typedef typename vector2< T0,T1 >::type type; }; template< typename T0, typename T1, typename T2 > struct deque< T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector3< T0,T1,T2 > { typedef typename vector3< T0,T1,T2 >::type type; }; template< typename T0, typename T1, typename T2, typename T3 > struct deque< T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector4< T0,T1,T2,T3 > { typedef typename vector4< T0,T1,T2,T3 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 > struct deque< T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector5< T0,T1,T2,T3,T4 > { typedef typename vector5< T0,T1,T2,T3,T4 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct deque< T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector6< T0,T1,T2,T3,T4,T5 > { typedef typename vector6< T0,T1,T2,T3,T4,T5 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6 > struct deque< T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector7< T0,T1,T2,T3,T4,T5,T6 > { typedef typename vector7< T0,T1,T2,T3,T4,T5,T6 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7 > struct deque< T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na , na, na, na > : vector8< T0,T1,T2,T3,T4,T5,T6,T7 > { typedef typename vector8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8 > struct deque< T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na , na, na, na > : vector9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > { typedef typename vector9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 > struct deque< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na , na, na, na > : vector10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > { typedef typename vector10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10 > struct deque< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na , na, na, na > : vector11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > { typedef typename vector11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11 > struct deque< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na , na, na, na, na > : vector12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > { typedef typename vector12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12 > struct deque< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na , na, na, na, na > : vector13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > { typedef typename vector13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13 > struct deque< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na , na, na, na, na > : vector14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > { typedef typename vector14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 > struct deque< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na , na, na, na, na > : vector15< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 > { typedef typename vector15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15 > struct deque< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, na, na, na, na > : vector16< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15 > { typedef typename vector16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16 > struct deque< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, na, na, na > : vector17< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16 > { typedef typename vector17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17 > struct deque< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, na, na > : vector18< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17 > { typedef typename vector18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18 > struct deque< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18, na > : vector19< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18 > { typedef typename vector19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type; }; /// primary template (not a specialization!) template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct deque : vector20< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18, T19 > { typedef typename vector20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/bcc551/divides.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/divides.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct divides_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< divides_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< divides_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct divides_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct divides_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct divides_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct divides_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) , typename N3 = na, typename N4 = na, typename N5 = na > struct divides : divides< divides< divides< divides< N1,N2 >, N3>, N4>, N5> { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , divides , ( N1, N2, N3, N4, N5 ) ) }; template< typename N1, typename N2, typename N3, typename N4 > struct divides< N1,N2,N3,N4,na > : divides< divides< divides< N1,N2 >, N3>, N4> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , divides , ( N1, N2, N3, N4, na ) ) }; template< typename N1, typename N2, typename N3 > struct divides< N1,N2,N3,na,na > : divides< divides< N1,N2 >, N3> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , divides , ( N1, N2, N3, na, na ) ) }; template< typename N1, typename N2 > struct divides< N1,N2,na,na,na > : divides_impl< typename divides_tag::type , typename divides_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , divides , ( N1, N2, na, na, na ) ) }; BOOST_MPL_AUX_NA_SPEC2(2, 5, divides) }} namespace boost { namespace mpl { template<> struct divides_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : integral_c< typename aux::largest_int< typename N1::value_type , typename N2::value_type >::type , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value / BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/bcc551/equal_to.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/equal_to.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct equal_to_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< equal_to_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< equal_to_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct equal_to_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct equal_to_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct equal_to_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct equal_to_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct equal_to : equal_to_impl< typename equal_to_tag::type , typename equal_to_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, equal_to, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 2, equal_to) }} namespace boost { namespace mpl { template<> struct equal_to_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value == BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/bcc551/fold_impl.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/aux_/fold_impl.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { /// forward declaration template< int N , typename First , typename Last , typename State , typename ForwardOp > struct fold_impl; template< typename First , typename Last , typename State , typename ForwardOp > struct fold_impl< 0,First,Last,State,ForwardOp > { typedef First iter0; typedef State state0; typedef state0 state; typedef iter0 iterator; }; template< typename First , typename Last , typename State , typename ForwardOp > struct fold_impl< 1,First,Last,State,ForwardOp > { typedef First iter0; typedef State state0; typedef typename apply2< ForwardOp, state0, typename deref::type >::type state1; typedef typename mpl::next::type iter1; typedef state1 state; typedef iter1 iterator; }; template< typename First , typename Last , typename State , typename ForwardOp > struct fold_impl< 2,First,Last,State,ForwardOp > { typedef First iter0; typedef State state0; typedef typename apply2< ForwardOp, state0, typename deref::type >::type state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp, state1, typename deref::type >::type state2; typedef typename mpl::next::type iter2; typedef state2 state; typedef iter2 iterator; }; template< typename First , typename Last , typename State , typename ForwardOp > struct fold_impl< 3,First,Last,State,ForwardOp > { typedef First iter0; typedef State state0; typedef typename apply2< ForwardOp, state0, typename deref::type >::type state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp, state1, typename deref::type >::type state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp, state2, typename deref::type >::type state3; typedef typename mpl::next::type iter3; typedef state3 state; typedef iter3 iterator; }; template< typename First , typename Last , typename State , typename ForwardOp > struct fold_impl< 4,First,Last,State,ForwardOp > { typedef First iter0; typedef State state0; typedef typename apply2< ForwardOp, state0, typename deref::type >::type state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp, state1, typename deref::type >::type state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp, state2, typename deref::type >::type state3; typedef typename mpl::next::type iter3; typedef typename apply2< ForwardOp, state3, typename deref::type >::type state4; typedef typename mpl::next::type iter4; typedef state4 state; typedef iter4 iterator; }; template< int N , typename First , typename Last , typename State , typename ForwardOp > struct fold_impl { typedef fold_impl< 4 , First , Last , State , ForwardOp > chunk_; typedef fold_impl< ( (N - 4) < 0 ? 0 : N - 4 ) , typename chunk_::iterator , Last , typename chunk_::state , ForwardOp > res_; typedef typename res_::state state; typedef typename res_::iterator iterator; }; template< typename First , typename Last , typename State , typename ForwardOp > struct fold_impl< -1,First,Last,State,ForwardOp > : fold_impl< -1 , typename mpl::next::type , Last , typename apply2::type>::type , ForwardOp > { }; template< typename Last , typename State , typename ForwardOp > struct fold_impl< -1,Last,Last,State,ForwardOp > { typedef State state; typedef Last iterator; }; }}} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/bcc551/full_lambda.hpp ================================================ // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/aux_/full_lambda.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< bool C1 = false, bool C2 = false, bool C3 = false, bool C4 = false , bool C5 = false > struct lambda_or : true_ { }; template<> struct lambda_or< false,false,false,false,false > : false_ { }; } // namespace aux template< typename T , typename Tag , typename Arity > struct lambda { typedef false_ is_le; typedef T result_; typedef T type; }; template< typename T > struct is_lambda_expression : lambda::is_le { }; template< int N, typename Tag > struct lambda< arg,Tag, int_< -1 > > { typedef true_ is_le; typedef mpl::arg result_; // qualified for the sake of MIPSpro 7.41 typedef mpl::protect type; }; template< typename F , typename Tag > struct lambda< bind0 , Tag , int_<1> > { typedef false_ is_le; typedef bind0< F > result_; typedef result_ type; }; namespace aux { template< typename IsLE, typename Tag , template< typename P1 > class F , typename L1 > struct le_result1 { typedef F< typename L1::type > result_; typedef result_ type; }; template< typename Tag , template< typename P1 > class F , typename L1 > struct le_result1< true_,Tag,F,L1 > { typedef bind1< quote1< F,Tag > , typename L1::result_ > result_; typedef mpl::protect type; }; } // namespace aux template< template< typename P1 > class F , typename T1 , typename Tag > struct lambda< F , Tag , int_<1> > { typedef lambda< T1,Tag > l1; typedef typename l1::is_le is_le1; typedef typename aux::lambda_or< is_le1::value >::type is_le; typedef aux::le_result1< is_le, Tag, F, l1 > le_result_; typedef typename le_result_::result_ result_; typedef typename le_result_::type type; }; template< typename F, typename T1 , typename Tag > struct lambda< bind1< F,T1 > , Tag , int_<2> > { typedef false_ is_le; typedef bind1< F , T1 > result_; typedef result_ type; }; namespace aux { template< typename IsLE, typename Tag , template< typename P1, typename P2 > class F , typename L1, typename L2 > struct le_result2 { typedef F< typename L1::type, typename L2::type > result_; typedef result_ type; }; template< typename Tag , template< typename P1, typename P2 > class F , typename L1, typename L2 > struct le_result2< true_,Tag,F,L1,L2 > { typedef bind2< quote2< F,Tag > , typename L1::result_, typename L2::result_ > result_; typedef mpl::protect type; }; } // namespace aux template< template< typename P1, typename P2 > class F , typename T1, typename T2 , typename Tag > struct lambda< F< T1,T2 > , Tag , int_<2> > { typedef lambda< T1,Tag > l1; typedef lambda< T2,Tag > l2; typedef typename l1::is_le is_le1; typedef typename l2::is_le is_le2; typedef typename aux::lambda_or< is_le1::value, is_le2::value >::type is_le; typedef aux::le_result2< is_le, Tag, F, l1, l2 > le_result_; typedef typename le_result_::result_ result_; typedef typename le_result_::type type; }; template< typename F, typename T1, typename T2 , typename Tag > struct lambda< bind2< F,T1,T2 > , Tag , int_<3> > { typedef false_ is_le; typedef bind2< F , T1, T2 > result_; typedef result_ type; }; namespace aux { template< typename IsLE, typename Tag , template< typename P1, typename P2, typename P3 > class F , typename L1, typename L2, typename L3 > struct le_result3 { typedef F< typename L1::type, typename L2::type, typename L3::type > result_; typedef result_ type; }; template< typename Tag , template< typename P1, typename P2, typename P3 > class F , typename L1, typename L2, typename L3 > struct le_result3< true_,Tag,F,L1,L2,L3 > { typedef bind3< quote3< F,Tag > , typename L1::result_, typename L2::result_, typename L3::result_ > result_; typedef mpl::protect type; }; } // namespace aux template< template< typename P1, typename P2, typename P3 > class F , typename T1, typename T2, typename T3 , typename Tag > struct lambda< F< T1,T2,T3 > , Tag , int_<3> > { typedef lambda< T1,Tag > l1; typedef lambda< T2,Tag > l2; typedef lambda< T3,Tag > l3; typedef typename l1::is_le is_le1; typedef typename l2::is_le is_le2; typedef typename l3::is_le is_le3; typedef typename aux::lambda_or< is_le1::value, is_le2::value, is_le3::value >::type is_le; typedef aux::le_result3< is_le, Tag, F, l1, l2, l3 > le_result_; typedef typename le_result_::result_ result_; typedef typename le_result_::type type; }; template< typename F, typename T1, typename T2, typename T3 , typename Tag > struct lambda< bind3< F,T1,T2,T3 > , Tag , int_<4> > { typedef false_ is_le; typedef bind3< F , T1, T2, T3 > result_; typedef result_ type; }; namespace aux { template< typename IsLE, typename Tag , template< typename P1, typename P2, typename P3, typename P4 > class F , typename L1, typename L2, typename L3, typename L4 > struct le_result4 { typedef F< typename L1::type, typename L2::type, typename L3::type , typename L4::type > result_; typedef result_ type; }; template< typename Tag , template< typename P1, typename P2, typename P3, typename P4 > class F , typename L1, typename L2, typename L3, typename L4 > struct le_result4< true_,Tag,F,L1,L2,L3,L4 > { typedef bind4< quote4< F,Tag > , typename L1::result_, typename L2::result_, typename L3::result_ , typename L4::result_ > result_; typedef mpl::protect type; }; } // namespace aux template< template< typename P1, typename P2, typename P3, typename P4 > class F , typename T1, typename T2, typename T3, typename T4 , typename Tag > struct lambda< F< T1,T2,T3,T4 > , Tag , int_<4> > { typedef lambda< T1,Tag > l1; typedef lambda< T2,Tag > l2; typedef lambda< T3,Tag > l3; typedef lambda< T4,Tag > l4; typedef typename l1::is_le is_le1; typedef typename l2::is_le is_le2; typedef typename l3::is_le is_le3; typedef typename l4::is_le is_le4; typedef typename aux::lambda_or< is_le1::value, is_le2::value, is_le3::value, is_le4::value >::type is_le; typedef aux::le_result4< is_le, Tag, F, l1, l2, l3, l4 > le_result_; typedef typename le_result_::result_ result_; typedef typename le_result_::type type; }; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename Tag > struct lambda< bind4< F,T1,T2,T3,T4 > , Tag , int_<5> > { typedef false_ is_le; typedef bind4< F , T1, T2, T3, T4 > result_; typedef result_ type; }; namespace aux { template< typename IsLE, typename Tag , template< typename P1, typename P2, typename P3, typename P4, typename P5 > class F , typename L1, typename L2, typename L3, typename L4, typename L5 > struct le_result5 { typedef F< typename L1::type, typename L2::type, typename L3::type , typename L4::type, typename L5::type > result_; typedef result_ type; }; template< typename Tag , template< typename P1, typename P2, typename P3, typename P4, typename P5 > class F , typename L1, typename L2, typename L3, typename L4, typename L5 > struct le_result5< true_,Tag,F,L1,L2,L3,L4,L5 > { typedef bind5< quote5< F,Tag > , typename L1::result_, typename L2::result_, typename L3::result_ , typename L4::result_, typename L5::result_ > result_; typedef mpl::protect type; }; } // namespace aux template< template< typename P1, typename P2, typename P3, typename P4 , typename P5 > class F , typename T1, typename T2, typename T3, typename T4, typename T5 , typename Tag > struct lambda< F< T1,T2,T3,T4,T5 > , Tag , int_<5> > { typedef lambda< T1,Tag > l1; typedef lambda< T2,Tag > l2; typedef lambda< T3,Tag > l3; typedef lambda< T4,Tag > l4; typedef lambda< T5,Tag > l5; typedef typename l1::is_le is_le1; typedef typename l2::is_le is_le2; typedef typename l3::is_le is_le3; typedef typename l4::is_le is_le4; typedef typename l5::is_le is_le5; typedef typename aux::lambda_or< is_le1::value, is_le2::value, is_le3::value, is_le4::value , is_le5::value >::type is_le; typedef aux::le_result5< is_le, Tag, F, l1, l2, l3, l4, l5 > le_result_; typedef typename le_result_::result_ result_; typedef typename le_result_::type type; }; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 , typename Tag > struct lambda< bind5< F,T1,T2,T3,T4,T5 > , Tag , int_<6> > { typedef false_ is_le; typedef bind5< F , T1, T2, T3, T4, T5 > result_; typedef result_ type; }; /// special case for 'protect' template< typename T, typename Tag > struct lambda< mpl::protect,Tag, int_<1> > { typedef false_ is_le; typedef mpl::protect result_; typedef result_ type; }; /// specializations for the main 'bind' form template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 , typename Tag > struct lambda< bind< F,T1,T2,T3,T4,T5 > , Tag , int_<6> > { typedef false_ is_le; typedef bind< F,T1,T2,T3,T4,T5 > result_; typedef result_ type; }; template< typename F , typename Tag1 , typename Tag2 , typename Arity > struct lambda< lambda< F,Tag1,Arity > , Tag2 , int_<3> > { typedef lambda< F,Tag2 > l1; typedef lambda< Tag1,Tag2 > l2; typedef typename l1::is_le is_le; typedef bind1< quote1, typename l1::result_ > arity_; typedef lambda< typename if_< is_le,arity_,Arity >::type, Tag2 > l3; typedef aux::le_result3 le_result_; typedef typename le_result_::result_ result_; typedef typename le_result_::type type; }; BOOST_MPL_AUX_NA_SPEC2(2, 3, lambda) }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/bcc551/greater.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/greater.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct greater_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< greater_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< greater_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct greater_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct greater_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct greater_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct greater_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct greater : greater_impl< typename greater_tag::type , typename greater_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, greater, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 2, greater) }} namespace boost { namespace mpl { template<> struct greater_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value > BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/bcc551/greater_equal.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/greater_equal.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct greater_equal_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< greater_equal_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< greater_equal_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct greater_equal_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct greater_equal_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct greater_equal_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct greater_equal_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct greater_equal : greater_equal_impl< typename greater_equal_tag::type , typename greater_equal_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, greater_equal, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 2, greater_equal) }} namespace boost { namespace mpl { template<> struct greater_equal_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value >= BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/bcc551/inherit.hpp ================================================ // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/inherit.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename BOOST_MPL_AUX_NA_PARAM(T1) , typename BOOST_MPL_AUX_NA_PARAM(T2) > struct inherit2 : T1, T2 { typedef inherit2 type; BOOST_MPL_AUX_LAMBDA_SUPPORT(2, inherit2, (T1, T2)) }; template< typename T1 > struct inherit2< T1,empty_base > { typedef T1 type; BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(2, inherit2, (T1, empty_base)) }; template< typename T2 > struct inherit2< empty_base,T2 > { typedef T2 type; BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(2, inherit2, (empty_base, T2)) }; template<> struct inherit2< empty_base,empty_base > { typedef empty_base type; BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(2, inherit2, (empty_base, empty_base)) }; BOOST_MPL_AUX_NA_SPEC(2, inherit2) template< typename T1 = na, typename T2 = na, typename T3 = na > struct inherit3 : inherit2< typename inherit2< T1, T2 >::type , T3 > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 3 , inherit3 , ( T1, T2, T3) ) }; BOOST_MPL_AUX_NA_SPEC(3, inherit3) template< typename T1 = na, typename T2 = na, typename T3 = na, typename T4 = na > struct inherit4 : inherit2< typename inherit3< T1, T2, T3 >::type , T4 > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 4 , inherit4 , ( T1, T2, T3, T4) ) }; BOOST_MPL_AUX_NA_SPEC(4, inherit4) template< typename T1 = na, typename T2 = na, typename T3 = na, typename T4 = na , typename T5 = na > struct inherit5 : inherit2< typename inherit4< T1, T2, T3, T4 >::type , T5 > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , inherit5 , ( T1, T2, T3, T4, T5) ) }; BOOST_MPL_AUX_NA_SPEC(5, inherit5) /// primary template template< typename T1 = empty_base, typename T2 = empty_base , typename T3 = empty_base, typename T4 = empty_base , typename T5 = empty_base > struct inherit : inherit5< T1,T2,T3,T4,T5 > { }; template<> struct inherit< na,na,na,na,na > { template< typename T1 = empty_base, typename T2 = empty_base , typename T3 = empty_base, typename T4 = empty_base , typename T5 = empty_base > struct apply : inherit< T1,T2,T3,T4,T5 > { }; }; BOOST_MPL_AUX_NA_SPEC_LAMBDA(5, inherit) BOOST_MPL_AUX_NA_SPEC_ARITY(5, inherit) BOOST_MPL_AUX_NA_SPEC_TEMPLATE_ARITY(5, 5, inherit) }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/bcc551/iter_fold_if_impl.hpp ================================================ // Copyright Aleksey Gurtovoy 2001-2004 // Copyright David Abrahams 2001-2002 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/aux_/iter_fold_if_impl.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< typename Iterator, typename State > struct iter_fold_if_null_step { typedef State state; typedef Iterator iterator; }; template< bool > struct iter_fold_if_step_impl { template< typename Iterator , typename State , typename StateOp , typename IteratorOp > struct result_ { typedef typename apply2< StateOp,State,Iterator >::type state; typedef typename IteratorOp::type iterator; }; }; template<> struct iter_fold_if_step_impl { template< typename Iterator , typename State , typename StateOp , typename IteratorOp > struct result_ { typedef State state; typedef Iterator iterator; }; }; template< typename Iterator , typename State , typename ForwardOp , typename Predicate > struct iter_fold_if_forward_step { typedef typename apply2< Predicate,State,Iterator >::type not_last; typedef typename iter_fold_if_step_impl< BOOST_MPL_AUX_MSVC_VALUE_WKND(not_last)::value >::template result_< Iterator,State,ForwardOp, mpl::next > impl_; typedef typename impl_::state state; typedef typename impl_::iterator iterator; }; template< typename Iterator , typename State , typename BackwardOp , typename Predicate > struct iter_fold_if_backward_step { typedef typename apply2< Predicate,State,Iterator >::type not_last; typedef typename iter_fold_if_step_impl< BOOST_MPL_AUX_MSVC_VALUE_WKND(not_last)::value >::template result_< Iterator,State,BackwardOp, identity > impl_; typedef typename impl_::state state; typedef typename impl_::iterator iterator; }; template< typename Iterator , typename State , typename ForwardOp , typename ForwardPredicate , typename BackwardOp , typename BackwardPredicate > struct iter_fold_if_impl { private: typedef iter_fold_if_null_step< Iterator,State > forward_step0; typedef iter_fold_if_forward_step< typename forward_step0::iterator, typename forward_step0::state, ForwardOp, ForwardPredicate > forward_step1; typedef iter_fold_if_forward_step< typename forward_step1::iterator, typename forward_step1::state, ForwardOp, ForwardPredicate > forward_step2; typedef iter_fold_if_forward_step< typename forward_step2::iterator, typename forward_step2::state, ForwardOp, ForwardPredicate > forward_step3; typedef iter_fold_if_forward_step< typename forward_step3::iterator, typename forward_step3::state, ForwardOp, ForwardPredicate > forward_step4; typedef typename if_< typename forward_step4::not_last , iter_fold_if_impl< typename forward_step4::iterator , typename forward_step4::state , ForwardOp , ForwardPredicate , BackwardOp , BackwardPredicate > , iter_fold_if_null_step< typename forward_step4::iterator , typename forward_step4::state > >::type backward_step4; typedef iter_fold_if_backward_step< typename forward_step3::iterator, typename backward_step4::state, BackwardOp, BackwardPredicate > backward_step3; typedef iter_fold_if_backward_step< typename forward_step2::iterator, typename backward_step3::state, BackwardOp, BackwardPredicate > backward_step2; typedef iter_fold_if_backward_step< typename forward_step1::iterator, typename backward_step2::state, BackwardOp, BackwardPredicate > backward_step1; typedef iter_fold_if_backward_step< typename forward_step0::iterator, typename backward_step1::state, BackwardOp, BackwardPredicate > backward_step0; public: typedef typename backward_step0::state state; typedef typename backward_step4::iterator iterator; }; }}} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/bcc551/iter_fold_impl.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/aux_/iter_fold_impl.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { /// forward declaration template< int N , typename First , typename Last , typename State , typename ForwardOp > struct iter_fold_impl; template< typename First , typename Last , typename State , typename ForwardOp > struct iter_fold_impl< 0,First,Last,State,ForwardOp > { typedef First iter0; typedef State state0; typedef state0 state; typedef iter0 iterator; }; template< typename First , typename Last , typename State , typename ForwardOp > struct iter_fold_impl< 1,First,Last,State,ForwardOp > { typedef First iter0; typedef State state0; typedef typename apply2< ForwardOp,state0,iter0 >::type state1; typedef typename mpl::next::type iter1; typedef state1 state; typedef iter1 iterator; }; template< typename First , typename Last , typename State , typename ForwardOp > struct iter_fold_impl< 2,First,Last,State,ForwardOp > { typedef First iter0; typedef State state0; typedef typename apply2< ForwardOp,state0,iter0 >::type state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp,state1,iter1 >::type state2; typedef typename mpl::next::type iter2; typedef state2 state; typedef iter2 iterator; }; template< typename First , typename Last , typename State , typename ForwardOp > struct iter_fold_impl< 3,First,Last,State,ForwardOp > { typedef First iter0; typedef State state0; typedef typename apply2< ForwardOp,state0,iter0 >::type state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp,state1,iter1 >::type state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp,state2,iter2 >::type state3; typedef typename mpl::next::type iter3; typedef state3 state; typedef iter3 iterator; }; template< typename First , typename Last , typename State , typename ForwardOp > struct iter_fold_impl< 4,First,Last,State,ForwardOp > { typedef First iter0; typedef State state0; typedef typename apply2< ForwardOp,state0,iter0 >::type state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp,state1,iter1 >::type state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp,state2,iter2 >::type state3; typedef typename mpl::next::type iter3; typedef typename apply2< ForwardOp,state3,iter3 >::type state4; typedef typename mpl::next::type iter4; typedef state4 state; typedef iter4 iterator; }; template< int N , typename First , typename Last , typename State , typename ForwardOp > struct iter_fold_impl { typedef iter_fold_impl< 4 , First , Last , State , ForwardOp > chunk_; typedef iter_fold_impl< ( (N - 4) < 0 ? 0 : N - 4 ) , typename chunk_::iterator , Last , typename chunk_::state , ForwardOp > res_; typedef typename res_::state state; typedef typename res_::iterator iterator; }; template< typename First , typename Last , typename State , typename ForwardOp > struct iter_fold_impl< -1,First,Last,State,ForwardOp > : iter_fold_impl< -1 , typename mpl::next::type , Last , typename apply2< ForwardOp,State,First >::type , ForwardOp > { }; template< typename Last , typename State , typename ForwardOp > struct iter_fold_impl< -1,Last,Last,State,ForwardOp > { typedef State state; typedef Last iterator; }; }}} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/bcc551/lambda_no_ctps.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/aux_/lambda_no_ctps.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< bool C1 = false, bool C2 = false, bool C3 = false, bool C4 = false , bool C5 = false > struct lambda_or : true_ { }; template<> struct lambda_or< false,false,false,false,false > : false_ { }; template< typename Arity > struct lambda_impl { template< typename T, typename Tag, typename Protect > struct result_ { typedef T type; typedef is_placeholder is_le; }; }; template<> struct lambda_impl< int_<1> > { template< typename F, typename Tag, typename Protect > struct result_ { typedef lambda< typename F::arg1, Tag, false_ > l1; typedef typename l1::is_le is_le1; typedef aux::lambda_or< BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value > is_le; typedef bind1< typename F::rebind , typename l1::type > bind_; typedef typename if_< is_le , if_< Protect, mpl::protect, bind_ > , identity >::type type_; typedef typename type_::type type; }; }; template<> struct lambda_impl< int_<2> > { template< typename F, typename Tag, typename Protect > struct result_ { typedef lambda< typename F::arg1, Tag, false_ > l1; typedef lambda< typename F::arg2, Tag, false_ > l2; typedef typename l1::is_le is_le1; typedef typename l2::is_le is_le2; typedef aux::lambda_or< BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value > is_le; typedef bind2< typename F::rebind , typename l1::type, typename l2::type > bind_; typedef typename if_< is_le , if_< Protect, mpl::protect, bind_ > , identity >::type type_; typedef typename type_::type type; }; }; template<> struct lambda_impl< int_<3> > { template< typename F, typename Tag, typename Protect > struct result_ { typedef lambda< typename F::arg1, Tag, false_ > l1; typedef lambda< typename F::arg2, Tag, false_ > l2; typedef lambda< typename F::arg3, Tag, false_ > l3; typedef typename l1::is_le is_le1; typedef typename l2::is_le is_le2; typedef typename l3::is_le is_le3; typedef aux::lambda_or< BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le3)::value > is_le; typedef bind3< typename F::rebind , typename l1::type, typename l2::type, typename l3::type > bind_; typedef typename if_< is_le , if_< Protect, mpl::protect, bind_ > , identity >::type type_; typedef typename type_::type type; }; }; template<> struct lambda_impl< int_<4> > { template< typename F, typename Tag, typename Protect > struct result_ { typedef lambda< typename F::arg1, Tag, false_ > l1; typedef lambda< typename F::arg2, Tag, false_ > l2; typedef lambda< typename F::arg3, Tag, false_ > l3; typedef lambda< typename F::arg4, Tag, false_ > l4; typedef typename l1::is_le is_le1; typedef typename l2::is_le is_le2; typedef typename l3::is_le is_le3; typedef typename l4::is_le is_le4; typedef aux::lambda_or< BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le3)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le4)::value > is_le; typedef bind4< typename F::rebind , typename l1::type, typename l2::type, typename l3::type , typename l4::type > bind_; typedef typename if_< is_le , if_< Protect, mpl::protect, bind_ > , identity >::type type_; typedef typename type_::type type; }; }; template<> struct lambda_impl< int_<5> > { template< typename F, typename Tag, typename Protect > struct result_ { typedef lambda< typename F::arg1, Tag, false_ > l1; typedef lambda< typename F::arg2, Tag, false_ > l2; typedef lambda< typename F::arg3, Tag, false_ > l3; typedef lambda< typename F::arg4, Tag, false_ > l4; typedef lambda< typename F::arg5, Tag, false_ > l5; typedef typename l1::is_le is_le1; typedef typename l2::is_le is_le2; typedef typename l3::is_le is_le3; typedef typename l4::is_le is_le4; typedef typename l5::is_le is_le5; typedef aux::lambda_or< BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le3)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le4)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le5)::value > is_le; typedef bind5< typename F::rebind , typename l1::type, typename l2::type, typename l3::type , typename l4::type, typename l5::type > bind_; typedef typename if_< is_le , if_< Protect, mpl::protect, bind_ > , identity >::type type_; typedef typename type_::type type; }; }; } // namespace aux template< typename T , typename Tag , typename Protect > struct lambda { /// Metafunction forwarding confuses MSVC 6.x typedef typename aux::template_arity::type arity_; typedef typename aux::lambda_impl ::template result_< T,Tag,Protect > l_; typedef typename l_::type type; typedef typename l_::is_le is_le; BOOST_MPL_AUX_LAMBDA_SUPPORT(3, lambda, (T, Tag, Protect)) }; BOOST_MPL_AUX_NA_SPEC2(1, 3, lambda) template< typename T > struct is_lambda_expression : lambda::is_le { }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/bcc551/less.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/less.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct less_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< less_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< less_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct less_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct less_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct less_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct less_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct less : less_impl< typename less_tag::type , typename less_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, less, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 2, less) }} namespace boost { namespace mpl { template<> struct less_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N2)::value > BOOST_MPL_AUX_VALUE_WKND(N1)::value ) > { }; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/bcc551/less_equal.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/less_equal.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct less_equal_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< less_equal_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< less_equal_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct less_equal_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct less_equal_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct less_equal_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct less_equal_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct less_equal : less_equal_impl< typename less_equal_tag::type , typename less_equal_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, less_equal, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 2, less_equal) }} namespace boost { namespace mpl { template<> struct less_equal_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value <= BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/bcc551/list.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/list.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na , typename T12 = na, typename T13 = na, typename T14 = na , typename T15 = na, typename T16 = na, typename T17 = na , typename T18 = na, typename T19 = na > struct list; template< > struct list< na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : list0< > { typedef list0< >::type type; }; template< typename T0 > struct list< T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : list1 { typedef typename list1::type type; }; template< typename T0, typename T1 > struct list< T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : list2< T0,T1 > { typedef typename list2< T0,T1 >::type type; }; template< typename T0, typename T1, typename T2 > struct list< T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : list3< T0,T1,T2 > { typedef typename list3< T0,T1,T2 >::type type; }; template< typename T0, typename T1, typename T2, typename T3 > struct list< T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : list4< T0,T1,T2,T3 > { typedef typename list4< T0,T1,T2,T3 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 > struct list< T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : list5< T0,T1,T2,T3,T4 > { typedef typename list5< T0,T1,T2,T3,T4 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct list< T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : list6< T0,T1,T2,T3,T4,T5 > { typedef typename list6< T0,T1,T2,T3,T4,T5 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6 > struct list< T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na , na, na, na > : list7< T0,T1,T2,T3,T4,T5,T6 > { typedef typename list7< T0,T1,T2,T3,T4,T5,T6 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7 > struct list< T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na , na, na, na > : list8< T0,T1,T2,T3,T4,T5,T6,T7 > { typedef typename list8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8 > struct list< T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na , na, na, na > : list9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > { typedef typename list9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 > struct list< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na , na, na, na > : list10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > { typedef typename list10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10 > struct list< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na , na, na, na > : list11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > { typedef typename list11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11 > struct list< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na , na, na, na, na > : list12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > { typedef typename list12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12 > struct list< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na , na, na, na, na > : list13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > { typedef typename list13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13 > struct list< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na , na, na, na, na > : list14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > { typedef typename list14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 > struct list< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na , na, na, na, na > : list15< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 > { typedef typename list15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15 > struct list< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, na, na, na, na > : list16< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15 > { typedef typename list16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16 > struct list< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, na, na, na > : list17< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16 > { typedef typename list17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17 > struct list< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, na, na > : list18< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17 > { typedef typename list18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18 > struct list< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18, na > : list19< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18 > { typedef typename list19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type; }; /// primary template (not a specialization!) template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct list : list20< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18, T19 > { typedef typename list20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/bcc551/list_c.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/list_c.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename T, long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX , long C3 = LONG_MAX, long C4 = LONG_MAX, long C5 = LONG_MAX , long C6 = LONG_MAX, long C7 = LONG_MAX, long C8 = LONG_MAX , long C9 = LONG_MAX, long C10 = LONG_MAX, long C11 = LONG_MAX , long C12 = LONG_MAX, long C13 = LONG_MAX, long C14 = LONG_MAX , long C15 = LONG_MAX, long C16 = LONG_MAX, long C17 = LONG_MAX , long C18 = LONG_MAX, long C19 = LONG_MAX > struct list_c; template< typename T > struct list_c< T, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list0_c { typedef typename list0_c::type type; }; template< typename T, long C0 > struct list_c< T, C0, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list1_c< T,C0 > { typedef typename list1_c< T,C0 >::type type; }; template< typename T, long C0, long C1 > struct list_c< T, C0, C1, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list2_c< T,C0,C1 > { typedef typename list2_c< T,C0,C1 >::type type; }; template< typename T, long C0, long C1, long C2 > struct list_c< T, C0, C1, C2, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list3_c< T,C0,C1,C2 > { typedef typename list3_c< T,C0,C1,C2 >::type type; }; template< typename T, long C0, long C1, long C2, long C3 > struct list_c< T, C0, C1, C2, C3, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list4_c< T,C0,C1,C2,C3 > { typedef typename list4_c< T,C0,C1,C2,C3 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4 > struct list_c< T, C0, C1, C2, C3, C4, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list5_c< T,C0,C1,C2,C3,C4 > { typedef typename list5_c< T,C0,C1,C2,C3,C4 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 > struct list_c< T, C0, C1, C2, C3, C4, C5, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX > : list6_c< T,C0,C1,C2,C3,C4,C5 > { typedef typename list6_c< T,C0,C1,C2,C3,C4,C5 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX > : list7_c< T,C0,C1,C2,C3,C4,C5,C6 > { typedef typename list7_c< T,C0,C1,C2,C3,C4,C5,C6 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, C7, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX > : list8_c< T,C0,C1,C2,C3,C4,C5,C6,C7 > { typedef typename list8_c< T,C0,C1,C2,C3,C4,C5,C6,C7 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX > : list9_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8 > { typedef typename list9_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX > : list10_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 > { typedef typename list10_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list11_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 > { typedef typename list11_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list12_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 > { typedef typename list12_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list13_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 > { typedef typename list13_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list14_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 > { typedef typename list14_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list15_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 > { typedef typename list15_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list16_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15 > { typedef typename list16_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, LONG_MAX, LONG_MAX, LONG_MAX > : list17_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16 > { typedef typename list17_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, C17, LONG_MAX, LONG_MAX > : list18_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, C17 > { typedef typename list18_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, C17, C18, LONG_MAX > : list19_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, C17, C18 > { typedef typename list19_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18 >::type type; }; /// primary template (not a specialization!) template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct list_c : list20_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, C17, C18, C19 > { typedef typename list20_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19 >::type type; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/bcc551/map.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/map.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na , typename T12 = na, typename T13 = na, typename T14 = na , typename T15 = na, typename T16 = na, typename T17 = na , typename T18 = na, typename T19 = na > struct map; template< > struct map< na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : map0< > { typedef map0< >::type type; }; template< typename T0 > struct map< T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : map1 { typedef typename map1::type type; }; template< typename T0, typename T1 > struct map< T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : map2< T0,T1 > { typedef typename map2< T0,T1 >::type type; }; template< typename T0, typename T1, typename T2 > struct map< T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : map3< T0,T1,T2 > { typedef typename map3< T0,T1,T2 >::type type; }; template< typename T0, typename T1, typename T2, typename T3 > struct map< T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : map4< T0,T1,T2,T3 > { typedef typename map4< T0,T1,T2,T3 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 > struct map< T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : map5< T0,T1,T2,T3,T4 > { typedef typename map5< T0,T1,T2,T3,T4 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct map< T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : map6< T0,T1,T2,T3,T4,T5 > { typedef typename map6< T0,T1,T2,T3,T4,T5 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6 > struct map< T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na , na, na, na > : map7< T0,T1,T2,T3,T4,T5,T6 > { typedef typename map7< T0,T1,T2,T3,T4,T5,T6 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7 > struct map< T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na , na, na, na > : map8< T0,T1,T2,T3,T4,T5,T6,T7 > { typedef typename map8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8 > struct map< T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na , na, na, na > : map9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > { typedef typename map9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 > struct map< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na , na, na, na > : map10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > { typedef typename map10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10 > struct map< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na , na, na, na > : map11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > { typedef typename map11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11 > struct map< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na , na, na, na, na > : map12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > { typedef typename map12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12 > struct map< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na , na, na, na, na > : map13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > { typedef typename map13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13 > struct map< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na , na, na, na, na > : map14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > { typedef typename map14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 > struct map< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na , na, na, na, na > : map15< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 > { typedef typename map15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15 > struct map< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, na, na, na, na > : map16< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15 > { typedef typename map16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16 > struct map< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, na, na, na > : map17< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16 > { typedef typename map17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17 > struct map< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, na, na > : map18< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17 > { typedef typename map18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18 > struct map< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18, na > : map19< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18 > { typedef typename map19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type; }; /// primary template (not a specialization!) template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct map : map20< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18, T19 > { typedef typename map20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/bcc551/minus.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/minus.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct minus_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< minus_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< minus_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct minus_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct minus_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct minus_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct minus_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) , typename N3 = na, typename N4 = na, typename N5 = na > struct minus : minus< minus< minus< minus< N1,N2 >, N3>, N4>, N5> { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , minus , ( N1, N2, N3, N4, N5 ) ) }; template< typename N1, typename N2, typename N3, typename N4 > struct minus< N1,N2,N3,N4,na > : minus< minus< minus< N1,N2 >, N3>, N4> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , minus , ( N1, N2, N3, N4, na ) ) }; template< typename N1, typename N2, typename N3 > struct minus< N1,N2,N3,na,na > : minus< minus< N1,N2 >, N3> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , minus , ( N1, N2, N3, na, na ) ) }; template< typename N1, typename N2 > struct minus< N1,N2,na,na,na > : minus_impl< typename minus_tag::type , typename minus_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , minus , ( N1, N2, na, na, na ) ) }; BOOST_MPL_AUX_NA_SPEC2(2, 5, minus) }} namespace boost { namespace mpl { template<> struct minus_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : integral_c< typename aux::largest_int< typename N1::value_type , typename N2::value_type >::type , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value - BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/bcc551/modulus.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/modulus.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct modulus_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< modulus_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< modulus_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct modulus_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct modulus_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct modulus_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct modulus_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct modulus : modulus_impl< typename modulus_tag::type , typename modulus_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, modulus, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 2, modulus) }} namespace boost { namespace mpl { template<> struct modulus_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : integral_c< typename aux::largest_int< typename N1::value_type , typename N2::value_type >::type , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value % BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/bcc551/not_equal_to.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/not_equal_to.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct not_equal_to_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< not_equal_to_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< not_equal_to_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct not_equal_to_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct not_equal_to_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct not_equal_to_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct not_equal_to_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct not_equal_to : not_equal_to_impl< typename not_equal_to_tag::type , typename not_equal_to_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, not_equal_to, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 2, not_equal_to) }} namespace boost { namespace mpl { template<> struct not_equal_to_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value != BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/bcc551/or.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/or.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< bool C_, typename T1, typename T2, typename T3, typename T4 > struct or_impl : true_ { }; template< typename T1, typename T2, typename T3, typename T4 > struct or_impl< false,T1,T2,T3,T4 > : or_impl< BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value , T2, T3, T4 , false_ > { }; template<> struct or_impl< false , false_, false_, false_, false_ > : false_ { }; } // namespace aux template< typename BOOST_MPL_AUX_NA_PARAM(T1) , typename BOOST_MPL_AUX_NA_PARAM(T2) , typename T3 = false_, typename T4 = false_, typename T5 = false_ > struct or_ : aux::or_impl< BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value , T2, T3, T4, T5 > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , or_ , ( T1, T2, T3, T4, T5) ) }; BOOST_MPL_AUX_NA_SPEC2( 2 , 5 , or_ ) }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/bcc551/placeholders.hpp ================================================ // Copyright Aleksey Gurtovoy 2001-2004 // Copyright Peter Dimov 2001-2003 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/placeholders.hpp" header // -- DO NOT modify by hand! BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg< -1 > _; BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE namespace boost { namespace mpl { BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_) namespace placeholders { using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_; } }} /// agurt, 17/mar/02: one more placeholder for the last 'apply#' /// specialization BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg<1> _1; BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE namespace boost { namespace mpl { BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_1) namespace placeholders { using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_1; } }} BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg<2> _2; BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE namespace boost { namespace mpl { BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_2) namespace placeholders { using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_2; } }} BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg<3> _3; BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE namespace boost { namespace mpl { BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_3) namespace placeholders { using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_3; } }} BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg<4> _4; BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE namespace boost { namespace mpl { BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_4) namespace placeholders { using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_4; } }} BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg<5> _5; BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE namespace boost { namespace mpl { BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_5) namespace placeholders { using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_5; } }} BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg<6> _6; BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE namespace boost { namespace mpl { BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_6) namespace placeholders { using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_6; } }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/bcc551/plus.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/plus.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct plus_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< plus_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< plus_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct plus_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct plus_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct plus_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct plus_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) , typename N3 = na, typename N4 = na, typename N5 = na > struct plus : plus< plus< plus< plus< N1,N2 >, N3>, N4>, N5> { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , plus , ( N1, N2, N3, N4, N5 ) ) }; template< typename N1, typename N2, typename N3, typename N4 > struct plus< N1,N2,N3,N4,na > : plus< plus< plus< N1,N2 >, N3>, N4> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , plus , ( N1, N2, N3, N4, na ) ) }; template< typename N1, typename N2, typename N3 > struct plus< N1,N2,N3,na,na > : plus< plus< N1,N2 >, N3> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , plus , ( N1, N2, N3, na, na ) ) }; template< typename N1, typename N2 > struct plus< N1,N2,na,na,na > : plus_impl< typename plus_tag::type , typename plus_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , plus , ( N1, N2, na, na, na ) ) }; BOOST_MPL_AUX_NA_SPEC2(2, 5, plus) }} namespace boost { namespace mpl { template<> struct plus_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : integral_c< typename aux::largest_int< typename N1::value_type , typename N2::value_type >::type , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/bcc551/quote.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/quote.hpp" header // -- DO NOT modify by hand! ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/bcc551/reverse_fold_impl.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/aux_/reverse_fold_impl.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { /// forward declaration template< long N , typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_fold_impl; template< long N > struct reverse_fold_chunk; template<> struct reverse_fold_chunk<0> { template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct result_ { typedef First iter0; typedef State fwd_state0; typedef fwd_state0 bkwd_state0; typedef bkwd_state0 state; typedef iter0 iterator; }; }; template<> struct reverse_fold_chunk<1> { template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct result_ { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; typedef typename mpl::next::type iter1; typedef fwd_state1 bkwd_state1; typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; typedef bkwd_state0 state; typedef iter1 iterator; }; }; template<> struct reverse_fold_chunk<2> { template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct result_ { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp, fwd_state1, typename deref::type >::type fwd_state2; typedef typename mpl::next::type iter2; typedef fwd_state2 bkwd_state2; typedef typename apply2< BackwardOp, bkwd_state2, typename deref::type >::type bkwd_state1; typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; typedef bkwd_state0 state; typedef iter2 iterator; }; }; template<> struct reverse_fold_chunk<3> { template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct result_ { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp, fwd_state1, typename deref::type >::type fwd_state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp, fwd_state2, typename deref::type >::type fwd_state3; typedef typename mpl::next::type iter3; typedef fwd_state3 bkwd_state3; typedef typename apply2< BackwardOp, bkwd_state3, typename deref::type >::type bkwd_state2; typedef typename apply2< BackwardOp, bkwd_state2, typename deref::type >::type bkwd_state1; typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; typedef bkwd_state0 state; typedef iter3 iterator; }; }; template<> struct reverse_fold_chunk<4> { template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct result_ { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp, fwd_state1, typename deref::type >::type fwd_state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp, fwd_state2, typename deref::type >::type fwd_state3; typedef typename mpl::next::type iter3; typedef typename apply2< ForwardOp, fwd_state3, typename deref::type >::type fwd_state4; typedef typename mpl::next::type iter4; typedef fwd_state4 bkwd_state4; typedef typename apply2< BackwardOp, bkwd_state4, typename deref::type >::type bkwd_state3; typedef typename apply2< BackwardOp, bkwd_state3, typename deref::type >::type bkwd_state2; typedef typename apply2< BackwardOp, bkwd_state2, typename deref::type >::type bkwd_state1; typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; typedef bkwd_state0 state; typedef iter4 iterator; }; }; template< long N > struct reverse_fold_chunk { template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct result_ { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp, fwd_state1, typename deref::type >::type fwd_state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp, fwd_state2, typename deref::type >::type fwd_state3; typedef typename mpl::next::type iter3; typedef typename apply2< ForwardOp, fwd_state3, typename deref::type >::type fwd_state4; typedef typename mpl::next::type iter4; typedef reverse_fold_impl< ( (N - 4) < 0 ? 0 : N - 4 ) , iter4 , Last , fwd_state4 , BackwardOp , ForwardOp > nested_chunk; typedef typename nested_chunk::state bkwd_state4; typedef typename apply2< BackwardOp, bkwd_state4, typename deref::type >::type bkwd_state3; typedef typename apply2< BackwardOp, bkwd_state3, typename deref::type >::type bkwd_state2; typedef typename apply2< BackwardOp, bkwd_state2, typename deref::type >::type bkwd_state1; typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; typedef bkwd_state0 state; typedef typename nested_chunk::iterator iterator; }; }; template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_fold_step; template< typename Last , typename State > struct reverse_fold_null_step { typedef Last iterator; typedef State state; }; template<> struct reverse_fold_chunk< -1 > { template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct result_ { typedef typename if_< typename is_same< First,Last >::type , reverse_fold_null_step< Last,State > , reverse_fold_step< First,Last,State,BackwardOp,ForwardOp > >::type res_; typedef typename res_::state state; typedef typename res_::iterator iterator; }; }; template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_fold_step { typedef reverse_fold_chunk< -1 >::template result_< typename mpl::next::type , Last , typename apply2::type>::type , BackwardOp , ForwardOp > nested_step; typedef typename apply2< BackwardOp , typename nested_step::state , typename deref::type >::type state; typedef typename nested_step::iterator iterator; }; template< long N , typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_fold_impl : reverse_fold_chunk ::template result_< First,Last,State,BackwardOp,ForwardOp > { }; }}} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/bcc551/reverse_iter_fold_impl.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/aux_/reverse_iter_fold_impl.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { /// forward declaration template< long N , typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_iter_fold_impl; template< long N > struct reverse_iter_fold_chunk; template<> struct reverse_iter_fold_chunk<0> { template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct result_ { typedef First iter0; typedef State fwd_state0; typedef fwd_state0 bkwd_state0; typedef bkwd_state0 state; typedef iter0 iterator; }; }; template<> struct reverse_iter_fold_chunk<1> { template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct result_ { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; typedef typename mpl::next::type iter1; typedef fwd_state1 bkwd_state1; typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; typedef bkwd_state0 state; typedef iter1 iterator; }; }; template<> struct reverse_iter_fold_chunk<2> { template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct result_ { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; typedef typename mpl::next::type iter2; typedef fwd_state2 bkwd_state2; typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1; typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; typedef bkwd_state0 state; typedef iter2 iterator; }; }; template<> struct reverse_iter_fold_chunk<3> { template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct result_ { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp,fwd_state2,iter2 >::type fwd_state3; typedef typename mpl::next::type iter3; typedef fwd_state3 bkwd_state3; typedef typename apply2< BackwardOp,bkwd_state3,iter2 >::type bkwd_state2; typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1; typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; typedef bkwd_state0 state; typedef iter3 iterator; }; }; template<> struct reverse_iter_fold_chunk<4> { template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct result_ { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp,fwd_state2,iter2 >::type fwd_state3; typedef typename mpl::next::type iter3; typedef typename apply2< ForwardOp,fwd_state3,iter3 >::type fwd_state4; typedef typename mpl::next::type iter4; typedef fwd_state4 bkwd_state4; typedef typename apply2< BackwardOp,bkwd_state4,iter3 >::type bkwd_state3; typedef typename apply2< BackwardOp,bkwd_state3,iter2 >::type bkwd_state2; typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1; typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; typedef bkwd_state0 state; typedef iter4 iterator; }; }; template< long N > struct reverse_iter_fold_chunk { template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct result_ { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp,fwd_state2,iter2 >::type fwd_state3; typedef typename mpl::next::type iter3; typedef typename apply2< ForwardOp,fwd_state3,iter3 >::type fwd_state4; typedef typename mpl::next::type iter4; typedef reverse_iter_fold_impl< ( (N - 4) < 0 ? 0 : N - 4 ) , iter4 , Last , fwd_state4 , BackwardOp , ForwardOp > nested_chunk; typedef typename nested_chunk::state bkwd_state4; typedef typename apply2< BackwardOp,bkwd_state4,iter3 >::type bkwd_state3; typedef typename apply2< BackwardOp,bkwd_state3,iter2 >::type bkwd_state2; typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1; typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; typedef bkwd_state0 state; typedef typename nested_chunk::iterator iterator; }; }; template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_iter_fold_step; template< typename Last , typename State > struct reverse_iter_fold_null_step { typedef Last iterator; typedef State state; }; template<> struct reverse_iter_fold_chunk< -1 > { template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct result_ { typedef typename if_< typename is_same< First,Last >::type , reverse_iter_fold_null_step< Last,State > , reverse_iter_fold_step< First,Last,State,BackwardOp,ForwardOp > >::type res_; typedef typename res_::state state; typedef typename res_::iterator iterator; }; }; template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_iter_fold_step { typedef reverse_iter_fold_chunk< -1 >::template result_< typename mpl::next::type , Last , typename apply2< ForwardOp,State,First >::type , BackwardOp , ForwardOp > nested_step; typedef typename apply2< BackwardOp , typename nested_step::state , First >::type state; typedef typename nested_step::iterator iterator; }; template< long N , typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_iter_fold_impl : reverse_iter_fold_chunk ::template result_< First,Last,State,BackwardOp,ForwardOp > { }; }}} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/bcc551/set.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/set.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na , typename T12 = na, typename T13 = na, typename T14 = na , typename T15 = na, typename T16 = na, typename T17 = na , typename T18 = na, typename T19 = na > struct set; template< > struct set< na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : set0< > { typedef set0< >::type type; }; template< typename T0 > struct set< T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : set1 { typedef typename set1::type type; }; template< typename T0, typename T1 > struct set< T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : set2< T0,T1 > { typedef typename set2< T0,T1 >::type type; }; template< typename T0, typename T1, typename T2 > struct set< T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : set3< T0,T1,T2 > { typedef typename set3< T0,T1,T2 >::type type; }; template< typename T0, typename T1, typename T2, typename T3 > struct set< T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : set4< T0,T1,T2,T3 > { typedef typename set4< T0,T1,T2,T3 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 > struct set< T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : set5< T0,T1,T2,T3,T4 > { typedef typename set5< T0,T1,T2,T3,T4 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct set< T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : set6< T0,T1,T2,T3,T4,T5 > { typedef typename set6< T0,T1,T2,T3,T4,T5 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6 > struct set< T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na , na, na, na > : set7< T0,T1,T2,T3,T4,T5,T6 > { typedef typename set7< T0,T1,T2,T3,T4,T5,T6 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7 > struct set< T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na , na, na, na > : set8< T0,T1,T2,T3,T4,T5,T6,T7 > { typedef typename set8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8 > struct set< T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na , na, na, na > : set9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > { typedef typename set9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 > struct set< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na , na, na, na > : set10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > { typedef typename set10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10 > struct set< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na , na, na, na > : set11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > { typedef typename set11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11 > struct set< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na , na, na, na, na > : set12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > { typedef typename set12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12 > struct set< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na , na, na, na, na > : set13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > { typedef typename set13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13 > struct set< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na , na, na, na, na > : set14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > { typedef typename set14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 > struct set< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na , na, na, na, na > : set15< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 > { typedef typename set15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15 > struct set< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, na, na, na, na > : set16< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15 > { typedef typename set16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16 > struct set< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, na, na, na > : set17< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16 > { typedef typename set17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17 > struct set< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, na, na > : set18< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17 > { typedef typename set18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18 > struct set< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18, na > : set19< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18 > { typedef typename set19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type; }; /// primary template (not a specialization!) template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct set : set20< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18, T19 > { typedef typename set20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/bcc551/set_c.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/set_c.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename T, long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX , long C3 = LONG_MAX, long C4 = LONG_MAX, long C5 = LONG_MAX , long C6 = LONG_MAX, long C7 = LONG_MAX, long C8 = LONG_MAX , long C9 = LONG_MAX, long C10 = LONG_MAX, long C11 = LONG_MAX , long C12 = LONG_MAX, long C13 = LONG_MAX, long C14 = LONG_MAX , long C15 = LONG_MAX, long C16 = LONG_MAX, long C17 = LONG_MAX , long C18 = LONG_MAX, long C19 = LONG_MAX > struct set_c; template< typename T > struct set_c< T, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : set0_c { typedef typename set0_c::type type; }; template< typename T, long C0 > struct set_c< T, C0, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : set1_c< T,C0 > { typedef typename set1_c< T,C0 >::type type; }; template< typename T, long C0, long C1 > struct set_c< T, C0, C1, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : set2_c< T,C0,C1 > { typedef typename set2_c< T,C0,C1 >::type type; }; template< typename T, long C0, long C1, long C2 > struct set_c< T, C0, C1, C2, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : set3_c< T,C0,C1,C2 > { typedef typename set3_c< T,C0,C1,C2 >::type type; }; template< typename T, long C0, long C1, long C2, long C3 > struct set_c< T, C0, C1, C2, C3, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : set4_c< T,C0,C1,C2,C3 > { typedef typename set4_c< T,C0,C1,C2,C3 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4 > struct set_c< T, C0, C1, C2, C3, C4, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : set5_c< T,C0,C1,C2,C3,C4 > { typedef typename set5_c< T,C0,C1,C2,C3,C4 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 > struct set_c< T, C0, C1, C2, C3, C4, C5, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX > : set6_c< T,C0,C1,C2,C3,C4,C5 > { typedef typename set6_c< T,C0,C1,C2,C3,C4,C5 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX > : set7_c< T,C0,C1,C2,C3,C4,C5,C6 > { typedef typename set7_c< T,C0,C1,C2,C3,C4,C5,C6 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, C7, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX > : set8_c< T,C0,C1,C2,C3,C4,C5,C6,C7 > { typedef typename set8_c< T,C0,C1,C2,C3,C4,C5,C6,C7 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX > : set9_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8 > { typedef typename set9_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX > : set10_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 > { typedef typename set10_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : set11_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 > { typedef typename set11_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : set12_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 > { typedef typename set12_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : set13_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 > { typedef typename set13_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : set14_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 > { typedef typename set14_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : set15_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 > { typedef typename set15_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : set16_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15 > { typedef typename set16_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, LONG_MAX, LONG_MAX, LONG_MAX > : set17_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16 > { typedef typename set17_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, C17, LONG_MAX, LONG_MAX > : set18_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, C17 > { typedef typename set18_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, C17, C18, LONG_MAX > : set19_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, C17, C18 > { typedef typename set19_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18 >::type type; }; /// primary template (not a specialization!) template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct set_c : set20_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, C17, C18, C19 > { typedef typename set20_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19 >::type type; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/bcc551/shift_left.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // Copyright Jaap Suter 2003 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/shift_left.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct shift_left_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< shift_left_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< shift_left_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct shift_left_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct shift_left_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct shift_left_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct shift_left_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct shift_left : shift_left_impl< typename shift_left_tag::type , typename shift_left_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, shift_left, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 2, shift_left) }} namespace boost { namespace mpl { template<> struct shift_left_impl< integral_c_tag,integral_c_tag > { template< typename N, typename S > struct apply : integral_c< typename N::value_type , ( BOOST_MPL_AUX_VALUE_WKND(N)::value << BOOST_MPL_AUX_VALUE_WKND(S)::value ) > { }; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/bcc551/shift_right.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // Copyright Jaap Suter 2003 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/shift_right.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct shift_right_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< shift_right_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< shift_right_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct shift_right_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct shift_right_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct shift_right_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct shift_right_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct shift_right : shift_right_impl< typename shift_right_tag::type , typename shift_right_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, shift_right, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 2, shift_right) }} namespace boost { namespace mpl { template<> struct shift_right_impl< integral_c_tag,integral_c_tag > { template< typename N, typename S > struct apply : integral_c< typename N::value_type , ( BOOST_MPL_AUX_VALUE_WKND(N)::value >> BOOST_MPL_AUX_VALUE_WKND(S)::value ) > { }; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/bcc551/template_arity.hpp ================================================ // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/aux_/template_arity.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< bool > struct template_arity_impl { template< typename F > struct result_ : mpl::int_< -1 > { }; }; template<> struct template_arity_impl { template< typename F > struct result_ : F::arity { }; }; template< typename F > struct template_arity : template_arity_impl< ::boost::mpl::aux::has_rebind::value > ::template result_ { }; }}} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/bcc551/times.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/times.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct times_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< times_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< times_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct times_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct times_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct times_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct times_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) , typename N3 = na, typename N4 = na, typename N5 = na > struct times : times< times< times< times< N1,N2 >, N3>, N4>, N5> { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , times , ( N1, N2, N3, N4, N5 ) ) }; template< typename N1, typename N2, typename N3, typename N4 > struct times< N1,N2,N3,N4,na > : times< times< times< N1,N2 >, N3>, N4> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , times , ( N1, N2, N3, N4, na ) ) }; template< typename N1, typename N2, typename N3 > struct times< N1,N2,N3,na,na > : times< times< N1,N2 >, N3> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , times , ( N1, N2, N3, na, na ) ) }; template< typename N1, typename N2 > struct times< N1,N2,na,na,na > : times_impl< typename times_tag::type , typename times_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , times , ( N1, N2, na, na, na ) ) }; BOOST_MPL_AUX_NA_SPEC2(2, 5, times) }} namespace boost { namespace mpl { template<> struct times_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : integral_c< typename aux::largest_int< typename N1::value_type , typename N2::value_type >::type , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value * BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/bcc551/unpack_args.hpp ================================================ // Copyright Aleksey Gurtovoy 2002-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/unpack_args.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< int size, typename F, typename Args > struct unpack_args_impl; template< typename F, typename Args > struct unpack_args_impl< 0,F,Args > : apply0< F > { }; template< typename F, typename Args > struct unpack_args_impl< 1,F,Args > : apply1< F , typename at_c< Args,0 >::type > { }; template< typename F, typename Args > struct unpack_args_impl< 2,F,Args > : apply2< F , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type > { }; template< typename F, typename Args > struct unpack_args_impl< 3,F,Args > : apply3< F , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type , typename at_c< Args,2 >::type > { }; template< typename F, typename Args > struct unpack_args_impl< 4,F,Args > : apply4< F , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type , typename at_c< Args,2 >::type, typename at_c< Args,3 >::type > { }; template< typename F, typename Args > struct unpack_args_impl< 5,F,Args > : apply5< F , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type , typename at_c< Args,2 >::type, typename at_c< Args,3 >::type , typename at_c< Args,4 >::type > { }; } template< typename F > struct unpack_args { template< typename Args > struct apply { typedef typename aux::unpack_args_impl< size::value , F , Args >::type type; }; }; BOOST_MPL_AUX_PASS_THROUGH_LAMBDA_SPEC(1, unpack_args) }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/bcc551/vector.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/vector.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na , typename T12 = na, typename T13 = na, typename T14 = na , typename T15 = na, typename T16 = na, typename T17 = na , typename T18 = na, typename T19 = na > struct vector; template< > struct vector< na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector0< > { typedef vector0< >::type type; }; template< typename T0 > struct vector< T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector1 { typedef typename vector1::type type; }; template< typename T0, typename T1 > struct vector< T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector2< T0,T1 > { typedef typename vector2< T0,T1 >::type type; }; template< typename T0, typename T1, typename T2 > struct vector< T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector3< T0,T1,T2 > { typedef typename vector3< T0,T1,T2 >::type type; }; template< typename T0, typename T1, typename T2, typename T3 > struct vector< T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector4< T0,T1,T2,T3 > { typedef typename vector4< T0,T1,T2,T3 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 > struct vector< T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector5< T0,T1,T2,T3,T4 > { typedef typename vector5< T0,T1,T2,T3,T4 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct vector< T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector6< T0,T1,T2,T3,T4,T5 > { typedef typename vector6< T0,T1,T2,T3,T4,T5 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6 > struct vector< T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector7< T0,T1,T2,T3,T4,T5,T6 > { typedef typename vector7< T0,T1,T2,T3,T4,T5,T6 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7 > struct vector< T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na , na, na, na > : vector8< T0,T1,T2,T3,T4,T5,T6,T7 > { typedef typename vector8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8 > struct vector< T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na , na, na, na > : vector9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > { typedef typename vector9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 > struct vector< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na , na, na, na > : vector10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > { typedef typename vector10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10 > struct vector< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na , na, na, na > : vector11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > { typedef typename vector11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11 > struct vector< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na , na, na, na, na > : vector12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > { typedef typename vector12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12 > struct vector< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na , na, na, na, na > : vector13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > { typedef typename vector13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13 > struct vector< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na , na, na, na, na > : vector14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > { typedef typename vector14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 > struct vector< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na , na, na, na, na > : vector15< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 > { typedef typename vector15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15 > struct vector< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, na, na, na, na > : vector16< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15 > { typedef typename vector16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16 > struct vector< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, na, na, na > : vector17< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16 > { typedef typename vector17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17 > struct vector< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, na, na > : vector18< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17 > { typedef typename vector18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18 > struct vector< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18, na > : vector19< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18 > { typedef typename vector19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type; }; /// primary template (not a specialization!) template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct vector : vector20< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18, T19 > { typedef typename vector20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/bcc551/vector_c.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/vector_c.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename T, long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX , long C3 = LONG_MAX, long C4 = LONG_MAX, long C5 = LONG_MAX , long C6 = LONG_MAX, long C7 = LONG_MAX, long C8 = LONG_MAX , long C9 = LONG_MAX, long C10 = LONG_MAX, long C11 = LONG_MAX , long C12 = LONG_MAX, long C13 = LONG_MAX, long C14 = LONG_MAX , long C15 = LONG_MAX, long C16 = LONG_MAX, long C17 = LONG_MAX , long C18 = LONG_MAX, long C19 = LONG_MAX > struct vector_c; template< typename T > struct vector_c< T, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector0_c { typedef typename vector0_c::type type; }; template< typename T, long C0 > struct vector_c< T, C0, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector1_c< T, T(C0) > { typedef typename vector1_c< T, T(C0) >::type type; }; template< typename T, long C0, long C1 > struct vector_c< T, C0, C1, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector2_c< T, T(C0), T(C1) > { typedef typename vector2_c< T, T(C0), T(C1) >::type type; }; template< typename T, long C0, long C1, long C2 > struct vector_c< T, C0, C1, C2, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector3_c< T, T(C0), T(C1), T(C2) > { typedef typename vector3_c< T, T(C0), T(C1), T(C2) >::type type; }; template< typename T, long C0, long C1, long C2, long C3 > struct vector_c< T, C0, C1, C2, C3, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector4_c< T, T(C0), T(C1), T(C2), T(C3) > { typedef typename vector4_c< T, T(C0), T(C1), T(C2), T(C3) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4 > struct vector_c< T, C0, C1, C2, C3, C4, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector5_c< T, T(C0), T(C1), T(C2), T(C3), T(C4) > { typedef typename vector5_c< T, T(C0), T(C1), T(C2), T(C3), T(C4) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 > struct vector_c< T, C0, C1, C2, C3, C4, C5, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX > : vector6_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5) > { typedef typename vector6_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX > : vector7_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6) > { typedef typename vector7_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, C7, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX > : vector8_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7) > { typedef typename vector8_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX > : vector9_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8) > { typedef typename vector9_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX > : vector10_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9) > { typedef typename vector10_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector11_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10) > { typedef typename vector11_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector12_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11) > { typedef typename vector12_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector13_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12) > { typedef typename vector13_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector14_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13) > { typedef typename vector14_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector15_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14) > { typedef typename vector15_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector16_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15) > { typedef typename vector16_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, LONG_MAX, LONG_MAX, LONG_MAX > : vector17_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16) > { typedef typename vector17_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, C17, LONG_MAX, LONG_MAX > : vector18_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17) > { typedef typename vector18_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, C17, C18, LONG_MAX > : vector19_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17), T(C18) > { typedef typename vector19_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17), T(C18) >::type type; }; /// primary template (not a specialization!) template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct vector_c : vector20_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17), T(C18), T(C19) > { typedef typename vector20_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17), T(C18), T(C19) >::type type; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/bcc_pre590/advance_backward.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // *Preprocessed* version of the main "advance_backward.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< long N > struct advance_backward; template<> struct advance_backward<0> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef iter0 type; }; }; template<> struct advance_backward<1> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef typename prior::type iter1; typedef iter1 type; }; }; template<> struct advance_backward<2> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef typename prior::type iter1; typedef typename prior::type iter2; typedef iter2 type; }; }; template<> struct advance_backward<3> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef typename prior::type iter1; typedef typename prior::type iter2; typedef typename prior::type iter3; typedef iter3 type; }; }; template<> struct advance_backward<4> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef typename prior::type iter1; typedef typename prior::type iter2; typedef typename prior::type iter3; typedef typename prior::type iter4; typedef iter4 type; }; }; template< long N > struct advance_backward { template< typename Iterator > struct apply { typedef typename apply_wrap1< advance_backward<4> , Iterator >::type chunk_result_; typedef typename apply_wrap1< advance_backward<( (N - 4) < 0 ? 0 : N - 4 )> , chunk_result_ >::type type; }; }; }}} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/bcc_pre590/advance_forward.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // *Preprocessed* version of the main "advance_forward.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< long N > struct advance_forward; template<> struct advance_forward<0> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef iter0 type; }; }; template<> struct advance_forward<1> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef typename next::type iter1; typedef iter1 type; }; }; template<> struct advance_forward<2> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef typename next::type iter1; typedef typename next::type iter2; typedef iter2 type; }; }; template<> struct advance_forward<3> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef typename next::type iter1; typedef typename next::type iter2; typedef typename next::type iter3; typedef iter3 type; }; }; template<> struct advance_forward<4> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef typename next::type iter1; typedef typename next::type iter2; typedef typename next::type iter3; typedef typename next::type iter4; typedef iter4 type; }; }; template< long N > struct advance_forward { template< typename Iterator > struct apply { typedef typename apply_wrap1< advance_forward<4> , Iterator >::type chunk_result_; typedef typename apply_wrap1< advance_forward<( (N - 4) < 0 ? 0 : N - 4 )> , chunk_result_ >::type type; }; }; }}} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/bcc_pre590/and.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // *Preprocessed* version of the main "and.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< bool C_, typename T1, typename T2, typename T3, typename T4 > struct and_impl : false_ { }; template< typename T1, typename T2, typename T3, typename T4 > struct and_impl< true,T1,T2,T3,T4 > : and_impl< BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value , T2, T3, T4 , true_ > { }; template<> struct and_impl< true , true_, true_, true_, true_ > : true_ { }; } // namespace aux template< typename BOOST_MPL_AUX_NA_PARAM(T1) , typename BOOST_MPL_AUX_NA_PARAM(T2) , typename T3 = true_, typename T4 = true_, typename T5 = true_ > struct and_ : aux::and_impl< BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value , T2, T3, T4, T5 > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , and_ , ( T1, T2, T3, T4, T5) ) }; BOOST_MPL_AUX_NA_SPEC2( 2 , 5 , and_ ) }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/bcc_pre590/apply.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // *Preprocessed* version of the main "apply.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename F > struct apply0 : apply_wrap0< typename lambda::type > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 1 , apply0 , (F ) ) }; template< typename F > struct apply< F,na,na,na,na,na > : apply0 { }; template< typename F, typename T1 > struct apply1 : apply_wrap1< typename lambda::type , T1 > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 2 , apply1 , (F, T1) ) }; template< typename F, typename T1 > struct apply< F,T1,na,na,na,na > : apply1< F,T1 > { }; template< typename F, typename T1, typename T2 > struct apply2 : apply_wrap2< typename lambda::type , T1, T2 > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 3 , apply2 , (F, T1, T2) ) }; template< typename F, typename T1, typename T2 > struct apply< F,T1,T2,na,na,na > : apply2< F,T1,T2 > { }; template< typename F, typename T1, typename T2, typename T3 > struct apply3 : apply_wrap3< typename lambda::type , T1, T2, T3 > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 4 , apply3 , (F, T1, T2, T3) ) }; template< typename F, typename T1, typename T2, typename T3 > struct apply< F,T1,T2,T3,na,na > : apply3< F,T1,T2,T3 > { }; template< typename F, typename T1, typename T2, typename T3, typename T4 > struct apply4 : apply_wrap4< typename lambda::type , T1, T2, T3, T4 > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , apply4 , (F, T1, T2, T3, T4) ) }; template< typename F, typename T1, typename T2, typename T3, typename T4 > struct apply< F,T1,T2,T3,T4,na > : apply4< F,T1,T2,T3,T4 > { }; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct apply5 : apply_wrap5< typename lambda::type , T1, T2, T3, T4, T5 > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 6 , apply5 , (F, T1, T2, T3, T4, T5) ) }; /// primary template (not a specialization!) template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct apply : apply5< F,T1,T2,T3,T4,T5 > { }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/bcc_pre590/apply_fwd.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // *Preprocessed* version of the main "apply_fwd.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename F, typename T1 = na, typename T2 = na, typename T3 = na , typename T4 = na, typename T5 = na > struct apply; template< typename F > struct apply0; template< typename F, typename T1 > struct apply1; template< typename F, typename T1, typename T2 > struct apply2; template< typename F, typename T1, typename T2, typename T3 > struct apply3; template< typename F, typename T1, typename T2, typename T3, typename T4 > struct apply4; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct apply5; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/bcc_pre590/apply_wrap.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2008 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // *Preprocessed* version of the main "apply_wrap.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< int N, typename F > struct apply_wrap_impl0; template< typename F > struct apply_wrap_impl0< 0 , F > { typedef typename F::template apply< /// since the defaults are "lost", we have to pass *something* even for nullary /// metafunction classes na > type; }; template< typename F > struct apply_wrap_impl0< 1 , F > { typedef typename F::template apply< na > type; }; template< typename F > struct apply_wrap_impl0< 2 , F > { typedef typename F::template apply< na, na > type; }; template< typename F > struct apply_wrap_impl0< 3 , F > { typedef typename F::template apply< na, na, na > type; }; template< typename F > struct apply_wrap_impl0< 4 , F > { typedef typename F::template apply< na, na, na, na > type; }; template< typename F > struct apply_wrap_impl0< 5 , F > { typedef typename F::template apply< na, na, na, na, na > type; }; template< typename F > struct apply_wrap0 : apply_wrap_impl0< ::boost::mpl::aux::arity< F,0 >::value , F >::type { }; template< int N, typename F, typename T1 > struct apply_wrap_impl1; template< typename F, typename T1 > struct apply_wrap_impl1< 1 , F , T1 > { typedef typename F::template apply< T1 > type; }; template< typename F, typename T1 > struct apply_wrap_impl1< 2 , F , T1 > { typedef typename F::template apply< T1 , na > type; }; template< typename F, typename T1 > struct apply_wrap_impl1< 3 , F , T1 > { typedef typename F::template apply< T1 , na, na > type; }; template< typename F, typename T1 > struct apply_wrap_impl1< 4 , F , T1 > { typedef typename F::template apply< T1 , na, na, na > type; }; template< typename F, typename T1 > struct apply_wrap_impl1< 5 , F , T1 > { typedef typename F::template apply< T1 , na, na, na, na > type; }; template< typename F, typename T1 > struct apply_wrap1 : apply_wrap_impl1< ::boost::mpl::aux::arity< F,1 >::value , F , T1 >::type { }; template< int N, typename F, typename T1, typename T2 > struct apply_wrap_impl2; template< typename F, typename T1, typename T2 > struct apply_wrap_impl2< 2 , F , T1, T2 > { typedef typename F::template apply< T1, T2 > type; }; template< typename F, typename T1, typename T2 > struct apply_wrap_impl2< 3 , F , T1, T2 > { typedef typename F::template apply< T1, T2 , na > type; }; template< typename F, typename T1, typename T2 > struct apply_wrap_impl2< 4 , F , T1, T2 > { typedef typename F::template apply< T1, T2 , na, na > type; }; template< typename F, typename T1, typename T2 > struct apply_wrap_impl2< 5 , F , T1, T2 > { typedef typename F::template apply< T1, T2 , na, na, na > type; }; template< typename F, typename T1, typename T2 > struct apply_wrap2 : apply_wrap_impl2< ::boost::mpl::aux::arity< F,2 >::value , F , T1, T2 >::type { }; template< int N, typename F, typename T1, typename T2, typename T3 > struct apply_wrap_impl3; template< typename F, typename T1, typename T2, typename T3 > struct apply_wrap_impl3< 3 , F , T1, T2, T3 > { typedef typename F::template apply< T1, T2, T3 > type; }; template< typename F, typename T1, typename T2, typename T3 > struct apply_wrap_impl3< 4 , F , T1, T2, T3 > { typedef typename F::template apply< T1, T2, T3 , na > type; }; template< typename F, typename T1, typename T2, typename T3 > struct apply_wrap_impl3< 5 , F , T1, T2, T3 > { typedef typename F::template apply< T1, T2, T3 , na, na > type; }; template< typename F, typename T1, typename T2, typename T3 > struct apply_wrap3 : apply_wrap_impl3< ::boost::mpl::aux::arity< F,3 >::value , F , T1, T2, T3 >::type { }; template< int N, typename F, typename T1, typename T2, typename T3, typename T4 > struct apply_wrap_impl4; template< typename F, typename T1, typename T2, typename T3, typename T4 > struct apply_wrap_impl4< 4 , F , T1, T2, T3, T4 > { typedef typename F::template apply< T1, T2, T3, T4 > type; }; template< typename F, typename T1, typename T2, typename T3, typename T4 > struct apply_wrap_impl4< 5 , F , T1, T2, T3, T4 > { typedef typename F::template apply< T1, T2, T3, T4 , na > type; }; template< typename F, typename T1, typename T2, typename T3, typename T4 > struct apply_wrap4 : apply_wrap_impl4< ::boost::mpl::aux::arity< F,4 >::value , F , T1, T2, T3, T4 >::type { }; template< int N, typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct apply_wrap_impl5; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct apply_wrap_impl5< 5 , F , T1, T2, T3, T4, T5 > { typedef typename F::template apply< T1, T2, T3, T4, T5 > type; }; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct apply_wrap5 : apply_wrap_impl5< ::boost::mpl::aux::arity< F,5 >::value , F , T1, T2, T3, T4, T5 >::type { }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/bcc_pre590/arg.hpp ================================================ // Copyright Peter Dimov 2001-2002 // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // *Preprocessed* version of the main "arg.hpp" header // -- DO NOT modify by hand! BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN template<> struct arg< -1 > { BOOST_STATIC_CONSTANT(int, value = -1); BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) BOOST_MPL_AUX_ARG_TYPEDEF(na, type) template< typename U1, typename U2, typename U3, typename U4, typename U5 > struct apply { typedef U1 type; BOOST_MPL_AUX_ASSERT_NOT_NA(type); }; }; template<> struct arg<1> { BOOST_STATIC_CONSTANT(int, value = 1); typedef arg<2> next; BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) BOOST_MPL_AUX_ARG_TYPEDEF(na, type) template< typename U1, typename U2, typename U3, typename U4, typename U5 > struct apply { typedef U1 type; BOOST_MPL_AUX_ASSERT_NOT_NA(type); }; }; template<> struct arg<2> { BOOST_STATIC_CONSTANT(int, value = 2); typedef arg<3> next; BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) BOOST_MPL_AUX_ARG_TYPEDEF(na, type) template< typename U1, typename U2, typename U3, typename U4, typename U5 > struct apply { typedef U2 type; BOOST_MPL_AUX_ASSERT_NOT_NA(type); }; }; template<> struct arg<3> { BOOST_STATIC_CONSTANT(int, value = 3); typedef arg<4> next; BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) BOOST_MPL_AUX_ARG_TYPEDEF(na, type) template< typename U1, typename U2, typename U3, typename U4, typename U5 > struct apply { typedef U3 type; BOOST_MPL_AUX_ASSERT_NOT_NA(type); }; }; template<> struct arg<4> { BOOST_STATIC_CONSTANT(int, value = 4); typedef arg<5> next; BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) BOOST_MPL_AUX_ARG_TYPEDEF(na, type) template< typename U1, typename U2, typename U3, typename U4, typename U5 > struct apply { typedef U4 type; BOOST_MPL_AUX_ASSERT_NOT_NA(type); }; }; template<> struct arg<5> { BOOST_STATIC_CONSTANT(int, value = 5); typedef arg<6> next; BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) BOOST_MPL_AUX_ARG_TYPEDEF(na, type) template< typename U1, typename U2, typename U3, typename U4, typename U5 > struct apply { typedef U5 type; BOOST_MPL_AUX_ASSERT_NOT_NA(type); }; }; BOOST_MPL_AUX_NONTYPE_ARITY_SPEC(1,int, arg) BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/bcc_pre590/basic_bind.hpp ================================================ // Copyright Peter Dimov 2001 // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // *Preprocessed* version of the main "basic_bind.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< typename T, typename U1, typename U2, typename U3, typename U4 , typename U5 > struct resolve_bind_arg { typedef T type; }; template< int N, typename U1, typename U2, typename U3, typename U4, typename U5 > struct resolve_bind_arg< arg, U1, U2, U3, U4, U5 > { typedef typename apply_wrap5, U1, U2, U3, U4, U5>::type type; }; } // namespace aux template< typename F > struct bind0 { template< typename U1, typename U2, typename U3, typename U4, typename U5 > struct apply { private: typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; public: typedef typename apply_wrap0< f_ >::type type; }; }; namespace aux { template< typename F, typename U1, typename U2, typename U3, typename U4 , typename U5 > struct resolve_bind_arg< bind0, U1, U2, U3, U4, U5 > { typedef bind0 f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(1, bind0) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(1, bind0) template< typename F, typename T1 > struct bind1 { template< typename U1, typename U2, typename U3, typename U4, typename U5 > struct apply { private: typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; public: typedef typename apply_wrap1< f_ , typename t1::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename U1, typename U2, typename U3 , typename U4, typename U5 > struct resolve_bind_arg< bind1< F,T1 >, U1, U2, U3, U4, U5 > { typedef bind1< F,T1 > f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(2, bind1) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(2, bind1) template< typename F, typename T1, typename T2 > struct bind2 { template< typename U1, typename U2, typename U3, typename U4, typename U5 > struct apply { private: typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; public: typedef typename apply_wrap2< f_ , typename t1::type, typename t2::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename T2, typename U1, typename U2 , typename U3, typename U4, typename U5 > struct resolve_bind_arg< bind2< F,T1,T2 >, U1, U2, U3, U4, U5 > { typedef bind2< F,T1,T2 > f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(3, bind2) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(3, bind2) template< typename F, typename T1, typename T2, typename T3 > struct bind3 { template< typename U1, typename U2, typename U3, typename U4, typename U5 > struct apply { private: typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3; public: typedef typename apply_wrap3< f_ , typename t1::type, typename t2::type, typename t3::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename T2, typename T3, typename U1 , typename U2, typename U3, typename U4, typename U5 > struct resolve_bind_arg< bind3< F,T1,T2,T3 >, U1, U2, U3, U4, U5 > { typedef bind3< F,T1,T2,T3 > f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(4, bind3) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(4, bind3) template< typename F, typename T1, typename T2, typename T3, typename T4 > struct bind4 { template< typename U1, typename U2, typename U3, typename U4, typename U5 > struct apply { private: typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3; typedef aux::resolve_bind_arg< T4,U1,U2,U3,U4,U5 > t4; public: typedef typename apply_wrap4< f_ , typename t1::type, typename t2::type, typename t3::type , typename t4::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename T2, typename T3, typename T4 , typename U1, typename U2, typename U3, typename U4, typename U5 > struct resolve_bind_arg< bind4< F,T1,T2,T3,T4 >, U1, U2, U3, U4, U5 > { typedef bind4< F,T1,T2,T3,T4 > f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(5, bind4) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(5, bind4) template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct bind5 { template< typename U1, typename U2, typename U3, typename U4, typename U5 > struct apply { private: typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3; typedef aux::resolve_bind_arg< T4,U1,U2,U3,U4,U5 > t4; typedef aux::resolve_bind_arg< T5,U1,U2,U3,U4,U5 > t5; public: typedef typename apply_wrap5< f_ , typename t1::type, typename t2::type, typename t3::type , typename t4::type, typename t5::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5, typename U1, typename U2, typename U3, typename U4 , typename U5 > struct resolve_bind_arg< bind5< F,T1,T2,T3,T4,T5 >, U1, U2, U3, U4, U5 > { typedef bind5< F,T1,T2,T3,T4,T5 > f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(6, bind5) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(6, bind5) }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/bcc_pre590/bind.hpp ================================================ // Copyright Peter Dimov 2001 // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // *Preprocessed* version of the main "bind.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< typename T, typename U1, typename U2, typename U3, typename U4 , typename U5 > struct resolve_bind_arg { typedef T type; }; template< typename T , typename Arg > struct replace_unnamed_arg { typedef Arg next; typedef T type; }; template< typename Arg > struct replace_unnamed_arg< arg< -1 >, Arg > { typedef typename Arg::next next; typedef Arg type; }; template< int N, typename U1, typename U2, typename U3, typename U4, typename U5 > struct resolve_bind_arg< arg, U1, U2, U3, U4, U5 > { typedef typename apply_wrap5, U1, U2, U3, U4, U5>::type type; }; } // namespace aux template< typename F > struct bind0 { template< typename U1, typename U2, typename U3, typename U4, typename U5 > struct apply { private: typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; typedef typename r0::type a0; typedef typename r0::next n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; /// public: typedef typename apply_wrap0< f_ >::type type; }; }; namespace aux { template< typename F, typename U1, typename U2, typename U3, typename U4 , typename U5 > struct resolve_bind_arg< bind0, U1, U2, U3, U4, U5 > { typedef bind0 f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(1, bind0) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(1, bind0) template< typename F, typename T1 > struct bind1 { template< typename U1, typename U2, typename U3, typename U4, typename U5 > struct apply { private: typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; typedef typename r0::type a0; typedef typename r0::next n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; /// typedef aux::replace_unnamed_arg< T1,n1 > r1; typedef typename r1::type a1; typedef typename r1::next n2; typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; /// public: typedef typename apply_wrap1< f_ , typename t1::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename U1, typename U2, typename U3 , typename U4, typename U5 > struct resolve_bind_arg< bind1< F,T1 >, U1, U2, U3, U4, U5 > { typedef bind1< F,T1 > f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(2, bind1) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(2, bind1) template< typename F, typename T1, typename T2 > struct bind2 { template< typename U1, typename U2, typename U3, typename U4, typename U5 > struct apply { private: typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; typedef typename r0::type a0; typedef typename r0::next n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; /// typedef aux::replace_unnamed_arg< T1,n1 > r1; typedef typename r1::type a1; typedef typename r1::next n2; typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; /// typedef aux::replace_unnamed_arg< T2,n2 > r2; typedef typename r2::type a2; typedef typename r2::next n3; typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; /// public: typedef typename apply_wrap2< f_ , typename t1::type, typename t2::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename T2, typename U1, typename U2 , typename U3, typename U4, typename U5 > struct resolve_bind_arg< bind2< F,T1,T2 >, U1, U2, U3, U4, U5 > { typedef bind2< F,T1,T2 > f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(3, bind2) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(3, bind2) template< typename F, typename T1, typename T2, typename T3 > struct bind3 { template< typename U1, typename U2, typename U3, typename U4, typename U5 > struct apply { private: typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; typedef typename r0::type a0; typedef typename r0::next n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; /// typedef aux::replace_unnamed_arg< T1,n1 > r1; typedef typename r1::type a1; typedef typename r1::next n2; typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; /// typedef aux::replace_unnamed_arg< T2,n2 > r2; typedef typename r2::type a2; typedef typename r2::next n3; typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; /// typedef aux::replace_unnamed_arg< T3,n3 > r3; typedef typename r3::type a3; typedef typename r3::next n4; typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; /// public: typedef typename apply_wrap3< f_ , typename t1::type, typename t2::type, typename t3::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename T2, typename T3, typename U1 , typename U2, typename U3, typename U4, typename U5 > struct resolve_bind_arg< bind3< F,T1,T2,T3 >, U1, U2, U3, U4, U5 > { typedef bind3< F,T1,T2,T3 > f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(4, bind3) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(4, bind3) template< typename F, typename T1, typename T2, typename T3, typename T4 > struct bind4 { template< typename U1, typename U2, typename U3, typename U4, typename U5 > struct apply { private: typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; typedef typename r0::type a0; typedef typename r0::next n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; /// typedef aux::replace_unnamed_arg< T1,n1 > r1; typedef typename r1::type a1; typedef typename r1::next n2; typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; /// typedef aux::replace_unnamed_arg< T2,n2 > r2; typedef typename r2::type a2; typedef typename r2::next n3; typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; /// typedef aux::replace_unnamed_arg< T3,n3 > r3; typedef typename r3::type a3; typedef typename r3::next n4; typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; /// typedef aux::replace_unnamed_arg< T4,n4 > r4; typedef typename r4::type a4; typedef typename r4::next n5; typedef aux::resolve_bind_arg< a4,U1,U2,U3,U4,U5 > t4; /// public: typedef typename apply_wrap4< f_ , typename t1::type, typename t2::type, typename t3::type , typename t4::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename T2, typename T3, typename T4 , typename U1, typename U2, typename U3, typename U4, typename U5 > struct resolve_bind_arg< bind4< F,T1,T2,T3,T4 >, U1, U2, U3, U4, U5 > { typedef bind4< F,T1,T2,T3,T4 > f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(5, bind4) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(5, bind4) template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct bind5 { template< typename U1, typename U2, typename U3, typename U4, typename U5 > struct apply { private: typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; typedef typename r0::type a0; typedef typename r0::next n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; /// typedef aux::replace_unnamed_arg< T1,n1 > r1; typedef typename r1::type a1; typedef typename r1::next n2; typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; /// typedef aux::replace_unnamed_arg< T2,n2 > r2; typedef typename r2::type a2; typedef typename r2::next n3; typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; /// typedef aux::replace_unnamed_arg< T3,n3 > r3; typedef typename r3::type a3; typedef typename r3::next n4; typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; /// typedef aux::replace_unnamed_arg< T4,n4 > r4; typedef typename r4::type a4; typedef typename r4::next n5; typedef aux::resolve_bind_arg< a4,U1,U2,U3,U4,U5 > t4; /// typedef aux::replace_unnamed_arg< T5,n5 > r5; typedef typename r5::type a5; typedef typename r5::next n6; typedef aux::resolve_bind_arg< a5,U1,U2,U3,U4,U5 > t5; /// public: typedef typename apply_wrap5< f_ , typename t1::type, typename t2::type, typename t3::type , typename t4::type, typename t5::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5, typename U1, typename U2, typename U3, typename U4 , typename U5 > struct resolve_bind_arg< bind5< F,T1,T2,T3,T4,T5 >, U1, U2, U3, U4, U5 > { typedef bind5< F,T1,T2,T3,T4,T5 > f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(6, bind5) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(6, bind5) }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/bcc_pre590/bind_fwd.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // *Preprocessed* version of the main "bind_fwd.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename F > struct bind0; template< typename F, typename T1 > struct bind1; template< typename F, typename T1, typename T2 > struct bind2; template< typename F, typename T1, typename T2, typename T3 > struct bind3; template< typename F, typename T1, typename T2, typename T3, typename T4 > struct bind4; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct bind5; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/bcc_pre590/bitand.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // Copyright Jaap Suter 2003 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // *Preprocessed* version of the main "bitand.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct bitand_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< bitand_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< bitand_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct bitand_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct bitand_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct bitand_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct bitand_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) , typename N3 = na, typename N4 = na, typename N5 = na > struct bitand_ : bitand_< bitand_< bitand_< bitand_< N1,N2 >, N3>, N4>, N5> { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , bitand_ , ( N1, N2, N3, N4, N5 ) ) }; template< typename N1, typename N2, typename N3, typename N4 > struct bitand_< N1,N2,N3,N4,na > : bitand_< bitand_< bitand_< N1,N2 >, N3>, N4> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , bitand_ , ( N1, N2, N3, N4, na ) ) }; template< typename N1, typename N2, typename N3 > struct bitand_< N1,N2,N3,na,na > : bitand_< bitand_< N1,N2 >, N3> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , bitand_ , ( N1, N2, N3, na, na ) ) }; template< typename N1, typename N2 > struct bitand_< N1,N2,na,na,na > : bitand_impl< typename bitand_tag::type , typename bitand_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , bitand_ , ( N1, N2, na, na, na ) ) }; BOOST_MPL_AUX_NA_SPEC2(2, 5, bitand_) }} namespace boost { namespace mpl { template<> struct bitand_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : integral_c< typename aux::largest_int< typename N1::value_type , typename N2::value_type >::type , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value & BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/bcc_pre590/bitor.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // Copyright Jaap Suter 2003 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // *Preprocessed* version of the main "bitor.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct bitor_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< bitor_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< bitor_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct bitor_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct bitor_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct bitor_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct bitor_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) , typename N3 = na, typename N4 = na, typename N5 = na > struct bitor_ : bitor_< bitor_< bitor_< bitor_< N1,N2 >, N3>, N4>, N5> { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , bitor_ , ( N1, N2, N3, N4, N5 ) ) }; template< typename N1, typename N2, typename N3, typename N4 > struct bitor_< N1,N2,N3,N4,na > : bitor_< bitor_< bitor_< N1,N2 >, N3>, N4> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , bitor_ , ( N1, N2, N3, N4, na ) ) }; template< typename N1, typename N2, typename N3 > struct bitor_< N1,N2,N3,na,na > : bitor_< bitor_< N1,N2 >, N3> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , bitor_ , ( N1, N2, N3, na, na ) ) }; template< typename N1, typename N2 > struct bitor_< N1,N2,na,na,na > : bitor_impl< typename bitor_tag::type , typename bitor_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , bitor_ , ( N1, N2, na, na, na ) ) }; BOOST_MPL_AUX_NA_SPEC2(2, 5, bitor_) }} namespace boost { namespace mpl { template<> struct bitor_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : integral_c< typename aux::largest_int< typename N1::value_type , typename N2::value_type >::type , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value | BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/bcc_pre590/bitxor.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // Copyright Jaap Suter 2003 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // *Preprocessed* version of the main "bitxor.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct bitxor_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< bitxor_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< bitxor_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct bitxor_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct bitxor_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct bitxor_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct bitxor_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) , typename N3 = na, typename N4 = na, typename N5 = na > struct bitxor_ : bitxor_< bitxor_< bitxor_< bitxor_< N1,N2 >, N3>, N4>, N5> { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , bitxor_ , ( N1, N2, N3, N4, N5 ) ) }; template< typename N1, typename N2, typename N3, typename N4 > struct bitxor_< N1,N2,N3,N4,na > : bitxor_< bitxor_< bitxor_< N1,N2 >, N3>, N4> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , bitxor_ , ( N1, N2, N3, N4, na ) ) }; template< typename N1, typename N2, typename N3 > struct bitxor_< N1,N2,N3,na,na > : bitxor_< bitxor_< N1,N2 >, N3> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , bitxor_ , ( N1, N2, N3, na, na ) ) }; template< typename N1, typename N2 > struct bitxor_< N1,N2,na,na,na > : bitxor_impl< typename bitxor_tag::type , typename bitxor_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , bitxor_ , ( N1, N2, na, na, na ) ) }; BOOST_MPL_AUX_NA_SPEC2(2, 5, bitxor_) }} namespace boost { namespace mpl { template<> struct bitxor_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : integral_c< typename aux::largest_int< typename N1::value_type , typename N2::value_type >::type , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value ^ BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/bcc_pre590/deque.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // *Preprocessed* version of the main "deque.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na , typename T12 = na, typename T13 = na, typename T14 = na , typename T15 = na, typename T16 = na, typename T17 = na , typename T18 = na, typename T19 = na > struct deque; template< > struct deque< na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector0< > { typedef vector0< >::type type; }; template< typename T0 > struct deque< T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector1 { typedef typename vector1::type type; }; template< typename T0, typename T1 > struct deque< T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector2< T0,T1 > { typedef typename vector2< T0,T1 >::type type; }; template< typename T0, typename T1, typename T2 > struct deque< T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector3< T0,T1,T2 > { typedef typename vector3< T0,T1,T2 >::type type; }; template< typename T0, typename T1, typename T2, typename T3 > struct deque< T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector4< T0,T1,T2,T3 > { typedef typename vector4< T0,T1,T2,T3 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 > struct deque< T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector5< T0,T1,T2,T3,T4 > { typedef typename vector5< T0,T1,T2,T3,T4 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct deque< T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector6< T0,T1,T2,T3,T4,T5 > { typedef typename vector6< T0,T1,T2,T3,T4,T5 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6 > struct deque< T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector7< T0,T1,T2,T3,T4,T5,T6 > { typedef typename vector7< T0,T1,T2,T3,T4,T5,T6 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7 > struct deque< T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na , na, na, na > : vector8< T0,T1,T2,T3,T4,T5,T6,T7 > { typedef typename vector8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8 > struct deque< T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na , na, na, na > : vector9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > { typedef typename vector9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 > struct deque< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na , na, na, na > : vector10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > { typedef typename vector10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10 > struct deque< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na , na, na, na > : vector11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > { typedef typename vector11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11 > struct deque< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na , na, na, na, na > : vector12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > { typedef typename vector12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12 > struct deque< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na , na, na, na, na > : vector13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > { typedef typename vector13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13 > struct deque< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na , na, na, na, na > : vector14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > { typedef typename vector14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 > struct deque< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na , na, na, na, na > : vector15< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 > { typedef typename vector15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15 > struct deque< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, na, na, na, na > : vector16< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15 > { typedef typename vector16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16 > struct deque< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, na, na, na > : vector17< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16 > { typedef typename vector17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17 > struct deque< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, na, na > : vector18< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17 > { typedef typename vector18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18 > struct deque< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18, na > : vector19< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18 > { typedef typename vector19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type; }; /// primary template (not a specialization!) template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct deque : vector20< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18, T19 > { typedef typename vector20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/bcc_pre590/divides.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // *Preprocessed* version of the main "divides.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct divides_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< divides_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< divides_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct divides_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct divides_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct divides_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct divides_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) , typename N3 = na, typename N4 = na, typename N5 = na > struct divides : divides< divides< divides< divides< N1,N2 >, N3>, N4>, N5> { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , divides , ( N1, N2, N3, N4, N5 ) ) }; template< typename N1, typename N2, typename N3, typename N4 > struct divides< N1,N2,N3,N4,na > : divides< divides< divides< N1,N2 >, N3>, N4> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , divides , ( N1, N2, N3, N4, na ) ) }; template< typename N1, typename N2, typename N3 > struct divides< N1,N2,N3,na,na > : divides< divides< N1,N2 >, N3> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , divides , ( N1, N2, N3, na, na ) ) }; template< typename N1, typename N2 > struct divides< N1,N2,na,na,na > : divides_impl< typename divides_tag::type , typename divides_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , divides , ( N1, N2, na, na, na ) ) }; BOOST_MPL_AUX_NA_SPEC2(2, 5, divides) }} namespace boost { namespace mpl { template<> struct divides_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : integral_c< typename aux::largest_int< typename N1::value_type , typename N2::value_type >::type , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value / BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/bcc_pre590/equal_to.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // *Preprocessed* version of the main "equal_to.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct equal_to_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< equal_to_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< equal_to_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct equal_to_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct equal_to_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct equal_to_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct equal_to_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct equal_to : equal_to_impl< typename equal_to_tag::type , typename equal_to_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, equal_to, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 2, equal_to) }} namespace boost { namespace mpl { template<> struct equal_to_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value == BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/bcc_pre590/fold_impl.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // *Preprocessed* version of the main "fold_impl.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { /// forward declaration template< int N , typename First , typename Last , typename State , typename ForwardOp > struct fold_impl; template< typename First , typename Last , typename State , typename ForwardOp > struct fold_impl< 0,First,Last,State,ForwardOp > { typedef First iter0; typedef State state0; typedef state0 state; typedef iter0 iterator; }; template< typename First , typename Last , typename State , typename ForwardOp > struct fold_impl< 1,First,Last,State,ForwardOp > { typedef First iter0; typedef State state0; typedef typename apply2< ForwardOp, state0, typename deref::type >::type state1; typedef typename mpl::next::type iter1; typedef state1 state; typedef iter1 iterator; }; template< typename First , typename Last , typename State , typename ForwardOp > struct fold_impl< 2,First,Last,State,ForwardOp > { typedef First iter0; typedef State state0; typedef typename apply2< ForwardOp, state0, typename deref::type >::type state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp, state1, typename deref::type >::type state2; typedef typename mpl::next::type iter2; typedef state2 state; typedef iter2 iterator; }; template< typename First , typename Last , typename State , typename ForwardOp > struct fold_impl< 3,First,Last,State,ForwardOp > { typedef First iter0; typedef State state0; typedef typename apply2< ForwardOp, state0, typename deref::type >::type state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp, state1, typename deref::type >::type state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp, state2, typename deref::type >::type state3; typedef typename mpl::next::type iter3; typedef state3 state; typedef iter3 iterator; }; template< typename First , typename Last , typename State , typename ForwardOp > struct fold_impl< 4,First,Last,State,ForwardOp > { typedef First iter0; typedef State state0; typedef typename apply2< ForwardOp, state0, typename deref::type >::type state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp, state1, typename deref::type >::type state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp, state2, typename deref::type >::type state3; typedef typename mpl::next::type iter3; typedef typename apply2< ForwardOp, state3, typename deref::type >::type state4; typedef typename mpl::next::type iter4; typedef state4 state; typedef iter4 iterator; }; template< int N , typename First , typename Last , typename State , typename ForwardOp > struct fold_impl { typedef fold_impl< 4 , First , Last , State , ForwardOp > chunk_; typedef fold_impl< ( (N - 4) < 0 ? 0 : N - 4 ) , typename chunk_::iterator , Last , typename chunk_::state , ForwardOp > res_; typedef typename res_::state state; typedef typename res_::iterator iterator; }; template< typename First , typename Last , typename State , typename ForwardOp > struct fold_impl< -1,First,Last,State,ForwardOp > : fold_impl< -1 , typename mpl::next::type , Last , typename apply2::type>::type , ForwardOp > { }; template< typename Last , typename State , typename ForwardOp > struct fold_impl< -1,Last,Last,State,ForwardOp > { typedef State state; typedef Last iterator; }; }}} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/bcc_pre590/full_lambda.hpp ================================================ // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // *Preprocessed* version of the main "full_lambda.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< bool C1 = false, bool C2 = false, bool C3 = false, bool C4 = false , bool C5 = false > struct lambda_or : true_ { }; template<> struct lambda_or< false,false,false,false,false > : false_ { }; } // namespace aux template< typename T , typename Tag , typename Arity > struct lambda { typedef false_ is_le; typedef T result_; typedef T type; }; template< typename T > struct is_lambda_expression : lambda::is_le { }; template< int N, typename Tag > struct lambda< arg,Tag, int_< -1 > > { typedef true_ is_le; typedef mpl::arg result_; // qualified for the sake of MIPSpro 7.41 typedef mpl::protect type; }; template< typename F , typename Tag > struct lambda< bind0 , Tag , int_<1> > { typedef false_ is_le; typedef bind0< F > result_; typedef result_ type; }; namespace aux { template< typename IsLE, typename Tag , template< typename P1 > class F , typename L1 > struct le_result1 { typedef F< typename L1::type > result_; typedef result_ type; }; template< typename Tag , template< typename P1 > class F , typename L1 > struct le_result1< true_,Tag,F,L1 > { typedef bind1< quote1< F,Tag > , typename L1::result_ > result_; typedef mpl::protect type; }; } // namespace aux template< template< typename P1 > class F , typename T1 , typename Tag > struct lambda< F , Tag , int_<1> > { typedef lambda< T1,Tag > l1; typedef typename l1::is_le is_le1; typedef typename aux::lambda_or< is_le1::value >::type is_le; typedef aux::le_result1< is_le, Tag, F, l1 > le_result_; typedef typename le_result_::result_ result_; typedef typename le_result_::type type; }; template< typename F, typename T1 , typename Tag > struct lambda< bind1< F,T1 > , Tag , int_<2> > { typedef false_ is_le; typedef bind1< F , T1 > result_; typedef result_ type; }; namespace aux { template< typename IsLE, typename Tag , template< typename P1, typename P2 > class F , typename L1, typename L2 > struct le_result2 { typedef F< typename L1::type, typename L2::type > result_; typedef result_ type; }; template< typename Tag , template< typename P1, typename P2 > class F , typename L1, typename L2 > struct le_result2< true_,Tag,F,L1,L2 > { typedef bind2< quote2< F,Tag > , typename L1::result_, typename L2::result_ > result_; typedef mpl::protect type; }; } // namespace aux template< template< typename P1, typename P2 > class F , typename T1, typename T2 , typename Tag > struct lambda< F< T1,T2 > , Tag , int_<2> > { typedef lambda< T1,Tag > l1; typedef lambda< T2,Tag > l2; typedef typename l1::is_le is_le1; typedef typename l2::is_le is_le2; typedef typename aux::lambda_or< is_le1::value, is_le2::value >::type is_le; typedef aux::le_result2< is_le, Tag, F, l1, l2 > le_result_; typedef typename le_result_::result_ result_; typedef typename le_result_::type type; }; template< typename F, typename T1, typename T2 , typename Tag > struct lambda< bind2< F,T1,T2 > , Tag , int_<3> > { typedef false_ is_le; typedef bind2< F , T1, T2 > result_; typedef result_ type; }; namespace aux { template< typename IsLE, typename Tag , template< typename P1, typename P2, typename P3 > class F , typename L1, typename L2, typename L3 > struct le_result3 { typedef F< typename L1::type, typename L2::type, typename L3::type > result_; typedef result_ type; }; template< typename Tag , template< typename P1, typename P2, typename P3 > class F , typename L1, typename L2, typename L3 > struct le_result3< true_,Tag,F,L1,L2,L3 > { typedef bind3< quote3< F,Tag > , typename L1::result_, typename L2::result_, typename L3::result_ > result_; typedef mpl::protect type; }; } // namespace aux template< template< typename P1, typename P2, typename P3 > class F , typename T1, typename T2, typename T3 , typename Tag > struct lambda< F< T1,T2,T3 > , Tag , int_<3> > { typedef lambda< T1,Tag > l1; typedef lambda< T2,Tag > l2; typedef lambda< T3,Tag > l3; typedef typename l1::is_le is_le1; typedef typename l2::is_le is_le2; typedef typename l3::is_le is_le3; typedef typename aux::lambda_or< is_le1::value, is_le2::value, is_le3::value >::type is_le; typedef aux::le_result3< is_le, Tag, F, l1, l2, l3 > le_result_; typedef typename le_result_::result_ result_; typedef typename le_result_::type type; }; template< typename F, typename T1, typename T2, typename T3 , typename Tag > struct lambda< bind3< F,T1,T2,T3 > , Tag , int_<4> > { typedef false_ is_le; typedef bind3< F , T1, T2, T3 > result_; typedef result_ type; }; namespace aux { template< typename IsLE, typename Tag , template< typename P1, typename P2, typename P3, typename P4 > class F , typename L1, typename L2, typename L3, typename L4 > struct le_result4 { typedef F< typename L1::type, typename L2::type, typename L3::type , typename L4::type > result_; typedef result_ type; }; template< typename Tag , template< typename P1, typename P2, typename P3, typename P4 > class F , typename L1, typename L2, typename L3, typename L4 > struct le_result4< true_,Tag,F,L1,L2,L3,L4 > { typedef bind4< quote4< F,Tag > , typename L1::result_, typename L2::result_, typename L3::result_ , typename L4::result_ > result_; typedef mpl::protect type; }; } // namespace aux template< template< typename P1, typename P2, typename P3, typename P4 > class F , typename T1, typename T2, typename T3, typename T4 , typename Tag > struct lambda< F< T1,T2,T3,T4 > , Tag , int_<4> > { typedef lambda< T1,Tag > l1; typedef lambda< T2,Tag > l2; typedef lambda< T3,Tag > l3; typedef lambda< T4,Tag > l4; typedef typename l1::is_le is_le1; typedef typename l2::is_le is_le2; typedef typename l3::is_le is_le3; typedef typename l4::is_le is_le4; typedef typename aux::lambda_or< is_le1::value, is_le2::value, is_le3::value, is_le4::value >::type is_le; typedef aux::le_result4< is_le, Tag, F, l1, l2, l3, l4 > le_result_; typedef typename le_result_::result_ result_; typedef typename le_result_::type type; }; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename Tag > struct lambda< bind4< F,T1,T2,T3,T4 > , Tag , int_<5> > { typedef false_ is_le; typedef bind4< F , T1, T2, T3, T4 > result_; typedef result_ type; }; namespace aux { template< typename IsLE, typename Tag , template< typename P1, typename P2, typename P3, typename P4, typename P5 > class F , typename L1, typename L2, typename L3, typename L4, typename L5 > struct le_result5 { typedef F< typename L1::type, typename L2::type, typename L3::type , typename L4::type, typename L5::type > result_; typedef result_ type; }; template< typename Tag , template< typename P1, typename P2, typename P3, typename P4, typename P5 > class F , typename L1, typename L2, typename L3, typename L4, typename L5 > struct le_result5< true_,Tag,F,L1,L2,L3,L4,L5 > { typedef bind5< quote5< F,Tag > , typename L1::result_, typename L2::result_, typename L3::result_ , typename L4::result_, typename L5::result_ > result_; typedef mpl::protect type; }; } // namespace aux template< template< typename P1, typename P2, typename P3, typename P4 , typename P5 > class F , typename T1, typename T2, typename T3, typename T4, typename T5 , typename Tag > struct lambda< F< T1,T2,T3,T4,T5 > , Tag , int_<5> > { typedef lambda< T1,Tag > l1; typedef lambda< T2,Tag > l2; typedef lambda< T3,Tag > l3; typedef lambda< T4,Tag > l4; typedef lambda< T5,Tag > l5; typedef typename l1::is_le is_le1; typedef typename l2::is_le is_le2; typedef typename l3::is_le is_le3; typedef typename l4::is_le is_le4; typedef typename l5::is_le is_le5; typedef typename aux::lambda_or< is_le1::value, is_le2::value, is_le3::value, is_le4::value , is_le5::value >::type is_le; typedef aux::le_result5< is_le, Tag, F, l1, l2, l3, l4, l5 > le_result_; typedef typename le_result_::result_ result_; typedef typename le_result_::type type; }; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 , typename Tag > struct lambda< bind5< F,T1,T2,T3,T4,T5 > , Tag , int_<6> > { typedef false_ is_le; typedef bind5< F , T1, T2, T3, T4, T5 > result_; typedef result_ type; }; /// special case for 'protect' template< typename T, typename Tag > struct lambda< mpl::protect,Tag, int_<1> > { typedef false_ is_le; typedef mpl::protect result_; typedef result_ type; }; /// specializations for the main 'bind' form template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 , typename Tag > struct lambda< bind< F,T1,T2,T3,T4,T5 > , Tag , int_<6> > { typedef false_ is_le; typedef bind< F,T1,T2,T3,T4,T5 > result_; typedef result_ type; }; template< typename F , typename Tag1 , typename Tag2 , typename Arity > struct lambda< lambda< F,Tag1,Arity > , Tag2 , int_<3> > { typedef lambda< F,Tag2 > l1; typedef lambda< Tag1,Tag2 > l2; typedef typename l1::is_le is_le; typedef bind1< quote1, typename l1::result_ > arity_; typedef lambda< typename if_< is_le,arity_,Arity >::type, Tag2 > l3; typedef aux::le_result3 le_result_; typedef typename le_result_::result_ result_; typedef typename le_result_::type type; }; BOOST_MPL_AUX_NA_SPEC2(2, 3, lambda) }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/bcc_pre590/greater.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // *Preprocessed* version of the main "greater.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct greater_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< greater_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< greater_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct greater_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct greater_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct greater_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct greater_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct greater : greater_impl< typename greater_tag::type , typename greater_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, greater, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 2, greater) }} namespace boost { namespace mpl { template<> struct greater_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value > BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/bcc_pre590/greater_equal.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // *Preprocessed* version of the main "greater_equal.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct greater_equal_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< greater_equal_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< greater_equal_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct greater_equal_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct greater_equal_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct greater_equal_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct greater_equal_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct greater_equal : greater_equal_impl< typename greater_equal_tag::type , typename greater_equal_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, greater_equal, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 2, greater_equal) }} namespace boost { namespace mpl { template<> struct greater_equal_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value >= BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/bcc_pre590/inherit.hpp ================================================ // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // *Preprocessed* version of the main "inherit.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename BOOST_MPL_AUX_NA_PARAM(T1) , typename BOOST_MPL_AUX_NA_PARAM(T2) > struct inherit2 : T1, T2 { typedef inherit2 type; BOOST_MPL_AUX_LAMBDA_SUPPORT(2, inherit2, (T1, T2)) }; template< typename T1 > struct inherit2< T1,empty_base > { typedef T1 type; BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(2, inherit2, (T1, empty_base)) }; template< typename T2 > struct inherit2< empty_base,T2 > { typedef T2 type; BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(2, inherit2, (empty_base, T2)) }; template<> struct inherit2< empty_base,empty_base > { typedef empty_base type; BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(2, inherit2, (empty_base, empty_base)) }; BOOST_MPL_AUX_NA_SPEC(2, inherit2) template< typename T1 = na, typename T2 = na, typename T3 = na > struct inherit3 : inherit2< typename inherit2< T1, T2 >::type , T3 > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 3 , inherit3 , ( T1, T2, T3) ) }; BOOST_MPL_AUX_NA_SPEC(3, inherit3) template< typename T1 = na, typename T2 = na, typename T3 = na, typename T4 = na > struct inherit4 : inherit2< typename inherit3< T1, T2, T3 >::type , T4 > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 4 , inherit4 , ( T1, T2, T3, T4) ) }; BOOST_MPL_AUX_NA_SPEC(4, inherit4) template< typename T1 = na, typename T2 = na, typename T3 = na, typename T4 = na , typename T5 = na > struct inherit5 : inherit2< typename inherit4< T1, T2, T3, T4 >::type , T5 > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , inherit5 , ( T1, T2, T3, T4, T5) ) }; BOOST_MPL_AUX_NA_SPEC(5, inherit5) /// primary template template< typename T1 = empty_base, typename T2 = empty_base , typename T3 = empty_base, typename T4 = empty_base , typename T5 = empty_base > struct inherit : inherit5< T1,T2,T3,T4,T5 > { }; template<> struct inherit< na,na,na,na,na > { template< typename T1, typename T2, typename T3, typename T4, typename T5 > struct apply : inherit< T1,T2,T3,T4,T5 > { }; }; BOOST_MPL_AUX_NA_SPEC_LAMBDA(5, inherit) BOOST_MPL_AUX_NA_SPEC_ARITY(5, inherit) BOOST_MPL_AUX_NA_SPEC_TEMPLATE_ARITY(5, 5, inherit) }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/bcc_pre590/iter_fold_if_impl.hpp ================================================ // Copyright Aleksey Gurtovoy 2001-2004 // Copyright David Abrahams 2001-2002 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // *Preprocessed* version of the main "iter_fold_if_impl.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< typename Iterator, typename State > struct iter_fold_if_null_step { typedef State state; typedef Iterator iterator; }; template< bool > struct iter_fold_if_step_impl { template< typename Iterator , typename State , typename StateOp , typename IteratorOp > struct result_ { typedef typename apply2< StateOp,State,Iterator >::type state; typedef typename IteratorOp::type iterator; }; }; template<> struct iter_fold_if_step_impl { template< typename Iterator , typename State , typename StateOp , typename IteratorOp > struct result_ { typedef State state; typedef Iterator iterator; }; }; template< typename Iterator , typename State , typename ForwardOp , typename Predicate > struct iter_fold_if_forward_step { typedef typename apply2< Predicate,State,Iterator >::type not_last; typedef typename iter_fold_if_step_impl< BOOST_MPL_AUX_MSVC_VALUE_WKND(not_last)::value >::template result_< Iterator,State,ForwardOp, mpl::next > impl_; typedef typename impl_::state state; typedef typename impl_::iterator iterator; }; template< typename Iterator , typename State , typename BackwardOp , typename Predicate > struct iter_fold_if_backward_step { typedef typename apply2< Predicate,State,Iterator >::type not_last; typedef typename iter_fold_if_step_impl< BOOST_MPL_AUX_MSVC_VALUE_WKND(not_last)::value >::template result_< Iterator,State,BackwardOp, identity > impl_; typedef typename impl_::state state; typedef typename impl_::iterator iterator; }; template< typename Iterator , typename State , typename ForwardOp , typename ForwardPredicate , typename BackwardOp , typename BackwardPredicate > struct iter_fold_if_impl { private: typedef iter_fold_if_null_step< Iterator,State > forward_step0; typedef iter_fold_if_forward_step< typename forward_step0::iterator, typename forward_step0::state, ForwardOp, ForwardPredicate > forward_step1; typedef iter_fold_if_forward_step< typename forward_step1::iterator, typename forward_step1::state, ForwardOp, ForwardPredicate > forward_step2; typedef iter_fold_if_forward_step< typename forward_step2::iterator, typename forward_step2::state, ForwardOp, ForwardPredicate > forward_step3; typedef iter_fold_if_forward_step< typename forward_step3::iterator, typename forward_step3::state, ForwardOp, ForwardPredicate > forward_step4; typedef typename if_< typename forward_step4::not_last , iter_fold_if_impl< typename forward_step4::iterator , typename forward_step4::state , ForwardOp , ForwardPredicate , BackwardOp , BackwardPredicate > , iter_fold_if_null_step< typename forward_step4::iterator , typename forward_step4::state > >::type backward_step4; typedef iter_fold_if_backward_step< typename forward_step3::iterator, typename backward_step4::state, BackwardOp, BackwardPredicate > backward_step3; typedef iter_fold_if_backward_step< typename forward_step2::iterator, typename backward_step3::state, BackwardOp, BackwardPredicate > backward_step2; typedef iter_fold_if_backward_step< typename forward_step1::iterator, typename backward_step2::state, BackwardOp, BackwardPredicate > backward_step1; typedef iter_fold_if_backward_step< typename forward_step0::iterator, typename backward_step1::state, BackwardOp, BackwardPredicate > backward_step0; public: typedef typename backward_step0::state state; typedef typename backward_step4::iterator iterator; }; }}} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/bcc_pre590/iter_fold_impl.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // *Preprocessed* version of the main "iter_fold_impl.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { /// forward declaration template< int N , typename First , typename Last , typename State , typename ForwardOp > struct iter_fold_impl; template< typename First , typename Last , typename State , typename ForwardOp > struct iter_fold_impl< 0,First,Last,State,ForwardOp > { typedef First iter0; typedef State state0; typedef state0 state; typedef iter0 iterator; }; template< typename First , typename Last , typename State , typename ForwardOp > struct iter_fold_impl< 1,First,Last,State,ForwardOp > { typedef First iter0; typedef State state0; typedef typename apply2< ForwardOp,state0,iter0 >::type state1; typedef typename mpl::next::type iter1; typedef state1 state; typedef iter1 iterator; }; template< typename First , typename Last , typename State , typename ForwardOp > struct iter_fold_impl< 2,First,Last,State,ForwardOp > { typedef First iter0; typedef State state0; typedef typename apply2< ForwardOp,state0,iter0 >::type state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp,state1,iter1 >::type state2; typedef typename mpl::next::type iter2; typedef state2 state; typedef iter2 iterator; }; template< typename First , typename Last , typename State , typename ForwardOp > struct iter_fold_impl< 3,First,Last,State,ForwardOp > { typedef First iter0; typedef State state0; typedef typename apply2< ForwardOp,state0,iter0 >::type state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp,state1,iter1 >::type state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp,state2,iter2 >::type state3; typedef typename mpl::next::type iter3; typedef state3 state; typedef iter3 iterator; }; template< typename First , typename Last , typename State , typename ForwardOp > struct iter_fold_impl< 4,First,Last,State,ForwardOp > { typedef First iter0; typedef State state0; typedef typename apply2< ForwardOp,state0,iter0 >::type state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp,state1,iter1 >::type state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp,state2,iter2 >::type state3; typedef typename mpl::next::type iter3; typedef typename apply2< ForwardOp,state3,iter3 >::type state4; typedef typename mpl::next::type iter4; typedef state4 state; typedef iter4 iterator; }; template< int N , typename First , typename Last , typename State , typename ForwardOp > struct iter_fold_impl { typedef iter_fold_impl< 4 , First , Last , State , ForwardOp > chunk_; typedef iter_fold_impl< ( (N - 4) < 0 ? 0 : N - 4 ) , typename chunk_::iterator , Last , typename chunk_::state , ForwardOp > res_; typedef typename res_::state state; typedef typename res_::iterator iterator; }; template< typename First , typename Last , typename State , typename ForwardOp > struct iter_fold_impl< -1,First,Last,State,ForwardOp > : iter_fold_impl< -1 , typename mpl::next::type , Last , typename apply2< ForwardOp,State,First >::type , ForwardOp > { }; template< typename Last , typename State , typename ForwardOp > struct iter_fold_impl< -1,Last,Last,State,ForwardOp > { typedef State state; typedef Last iterator; }; }}} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/bcc_pre590/lambda_no_ctps.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // *Preprocessed* version of the main "lambda_no_ctps.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< bool C1 = false, bool C2 = false, bool C3 = false, bool C4 = false , bool C5 = false > struct lambda_or : true_ { }; template<> struct lambda_or< false,false,false,false,false > : false_ { }; template< typename Arity > struct lambda_impl { template< typename T, typename Tag, typename Protect > struct result_ { typedef T type; typedef is_placeholder is_le; }; }; template<> struct lambda_impl< int_<1> > { template< typename F, typename Tag, typename Protect > struct result_ { typedef lambda< typename F::arg1, Tag, false_ > l1; typedef typename l1::is_le is_le1; typedef aux::lambda_or< BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value > is_le; typedef bind1< typename F::rebind , typename l1::type > bind_; typedef typename if_< is_le , if_< Protect, mpl::protect, bind_ > , identity >::type type_; typedef typename type_::type type; }; }; template<> struct lambda_impl< int_<2> > { template< typename F, typename Tag, typename Protect > struct result_ { typedef lambda< typename F::arg1, Tag, false_ > l1; typedef lambda< typename F::arg2, Tag, false_ > l2; typedef typename l1::is_le is_le1; typedef typename l2::is_le is_le2; typedef aux::lambda_or< BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value > is_le; typedef bind2< typename F::rebind , typename l1::type, typename l2::type > bind_; typedef typename if_< is_le , if_< Protect, mpl::protect, bind_ > , identity >::type type_; typedef typename type_::type type; }; }; template<> struct lambda_impl< int_<3> > { template< typename F, typename Tag, typename Protect > struct result_ { typedef lambda< typename F::arg1, Tag, false_ > l1; typedef lambda< typename F::arg2, Tag, false_ > l2; typedef lambda< typename F::arg3, Tag, false_ > l3; typedef typename l1::is_le is_le1; typedef typename l2::is_le is_le2; typedef typename l3::is_le is_le3; typedef aux::lambda_or< BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le3)::value > is_le; typedef bind3< typename F::rebind , typename l1::type, typename l2::type, typename l3::type > bind_; typedef typename if_< is_le , if_< Protect, mpl::protect, bind_ > , identity >::type type_; typedef typename type_::type type; }; }; template<> struct lambda_impl< int_<4> > { template< typename F, typename Tag, typename Protect > struct result_ { typedef lambda< typename F::arg1, Tag, false_ > l1; typedef lambda< typename F::arg2, Tag, false_ > l2; typedef lambda< typename F::arg3, Tag, false_ > l3; typedef lambda< typename F::arg4, Tag, false_ > l4; typedef typename l1::is_le is_le1; typedef typename l2::is_le is_le2; typedef typename l3::is_le is_le3; typedef typename l4::is_le is_le4; typedef aux::lambda_or< BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le3)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le4)::value > is_le; typedef bind4< typename F::rebind , typename l1::type, typename l2::type, typename l3::type , typename l4::type > bind_; typedef typename if_< is_le , if_< Protect, mpl::protect, bind_ > , identity >::type type_; typedef typename type_::type type; }; }; template<> struct lambda_impl< int_<5> > { template< typename F, typename Tag, typename Protect > struct result_ { typedef lambda< typename F::arg1, Tag, false_ > l1; typedef lambda< typename F::arg2, Tag, false_ > l2; typedef lambda< typename F::arg3, Tag, false_ > l3; typedef lambda< typename F::arg4, Tag, false_ > l4; typedef lambda< typename F::arg5, Tag, false_ > l5; typedef typename l1::is_le is_le1; typedef typename l2::is_le is_le2; typedef typename l3::is_le is_le3; typedef typename l4::is_le is_le4; typedef typename l5::is_le is_le5; typedef aux::lambda_or< BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le3)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le4)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le5)::value > is_le; typedef bind5< typename F::rebind , typename l1::type, typename l2::type, typename l3::type , typename l4::type, typename l5::type > bind_; typedef typename if_< is_le , if_< Protect, mpl::protect, bind_ > , identity >::type type_; typedef typename type_::type type; }; }; } // namespace aux template< typename T , typename Tag , typename Protect > struct lambda { /// Metafunction forwarding confuses MSVC 6.x typedef typename aux::template_arity::type arity_; typedef typename aux::lambda_impl ::template result_< T,Tag,Protect > l_; typedef typename l_::type type; typedef typename l_::is_le is_le; BOOST_MPL_AUX_LAMBDA_SUPPORT(3, lambda, (T, Tag, Protect)) }; BOOST_MPL_AUX_NA_SPEC2(1, 3, lambda) template< typename T > struct is_lambda_expression : lambda::is_le { }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/bcc_pre590/less.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // *Preprocessed* version of the main "less.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct less_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< less_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< less_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct less_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct less_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct less_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct less_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct less : less_impl< typename less_tag::type , typename less_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, less, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 2, less) }} namespace boost { namespace mpl { template<> struct less_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N2)::value > BOOST_MPL_AUX_VALUE_WKND(N1)::value ) > { }; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/bcc_pre590/less_equal.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // *Preprocessed* version of the main "less_equal.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct less_equal_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< less_equal_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< less_equal_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct less_equal_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct less_equal_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct less_equal_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct less_equal_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct less_equal : less_equal_impl< typename less_equal_tag::type , typename less_equal_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, less_equal, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 2, less_equal) }} namespace boost { namespace mpl { template<> struct less_equal_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value <= BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/bcc_pre590/list.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // *Preprocessed* version of the main "list.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na , typename T12 = na, typename T13 = na, typename T14 = na , typename T15 = na, typename T16 = na, typename T17 = na , typename T18 = na, typename T19 = na > struct list; template< > struct list< na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : list0< > { typedef list0< >::type type; }; template< typename T0 > struct list< T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : list1 { typedef typename list1::type type; }; template< typename T0, typename T1 > struct list< T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : list2< T0,T1 > { typedef typename list2< T0,T1 >::type type; }; template< typename T0, typename T1, typename T2 > struct list< T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : list3< T0,T1,T2 > { typedef typename list3< T0,T1,T2 >::type type; }; template< typename T0, typename T1, typename T2, typename T3 > struct list< T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : list4< T0,T1,T2,T3 > { typedef typename list4< T0,T1,T2,T3 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 > struct list< T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : list5< T0,T1,T2,T3,T4 > { typedef typename list5< T0,T1,T2,T3,T4 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct list< T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : list6< T0,T1,T2,T3,T4,T5 > { typedef typename list6< T0,T1,T2,T3,T4,T5 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6 > struct list< T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na , na, na, na > : list7< T0,T1,T2,T3,T4,T5,T6 > { typedef typename list7< T0,T1,T2,T3,T4,T5,T6 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7 > struct list< T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na , na, na, na > : list8< T0,T1,T2,T3,T4,T5,T6,T7 > { typedef typename list8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8 > struct list< T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na , na, na, na > : list9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > { typedef typename list9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 > struct list< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na , na, na, na > : list10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > { typedef typename list10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10 > struct list< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na , na, na, na > : list11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > { typedef typename list11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11 > struct list< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na , na, na, na, na > : list12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > { typedef typename list12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12 > struct list< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na , na, na, na, na > : list13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > { typedef typename list13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13 > struct list< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na , na, na, na, na > : list14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > { typedef typename list14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 > struct list< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na , na, na, na, na > : list15< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 > { typedef typename list15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15 > struct list< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, na, na, na, na > : list16< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15 > { typedef typename list16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16 > struct list< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, na, na, na > : list17< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16 > { typedef typename list17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17 > struct list< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, na, na > : list18< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17 > { typedef typename list18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18 > struct list< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18, na > : list19< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18 > { typedef typename list19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type; }; /// primary template (not a specialization!) template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct list : list20< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18, T19 > { typedef typename list20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/bcc_pre590/list_c.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // *Preprocessed* version of the main "list_c.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename T, long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX , long C3 = LONG_MAX, long C4 = LONG_MAX, long C5 = LONG_MAX , long C6 = LONG_MAX, long C7 = LONG_MAX, long C8 = LONG_MAX , long C9 = LONG_MAX, long C10 = LONG_MAX, long C11 = LONG_MAX , long C12 = LONG_MAX, long C13 = LONG_MAX, long C14 = LONG_MAX , long C15 = LONG_MAX, long C16 = LONG_MAX, long C17 = LONG_MAX , long C18 = LONG_MAX, long C19 = LONG_MAX > struct list_c; template< typename T > struct list_c< T, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list0_c { typedef typename list0_c::type type; }; template< typename T, long C0 > struct list_c< T, C0, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list1_c< T,C0 > { typedef typename list1_c< T,C0 >::type type; }; template< typename T, long C0, long C1 > struct list_c< T, C0, C1, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list2_c< T,C0,C1 > { typedef typename list2_c< T,C0,C1 >::type type; }; template< typename T, long C0, long C1, long C2 > struct list_c< T, C0, C1, C2, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list3_c< T,C0,C1,C2 > { typedef typename list3_c< T,C0,C1,C2 >::type type; }; template< typename T, long C0, long C1, long C2, long C3 > struct list_c< T, C0, C1, C2, C3, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list4_c< T,C0,C1,C2,C3 > { typedef typename list4_c< T,C0,C1,C2,C3 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4 > struct list_c< T, C0, C1, C2, C3, C4, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list5_c< T,C0,C1,C2,C3,C4 > { typedef typename list5_c< T,C0,C1,C2,C3,C4 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 > struct list_c< T, C0, C1, C2, C3, C4, C5, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX > : list6_c< T,C0,C1,C2,C3,C4,C5 > { typedef typename list6_c< T,C0,C1,C2,C3,C4,C5 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX > : list7_c< T,C0,C1,C2,C3,C4,C5,C6 > { typedef typename list7_c< T,C0,C1,C2,C3,C4,C5,C6 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, C7, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX > : list8_c< T,C0,C1,C2,C3,C4,C5,C6,C7 > { typedef typename list8_c< T,C0,C1,C2,C3,C4,C5,C6,C7 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX > : list9_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8 > { typedef typename list9_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX > : list10_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 > { typedef typename list10_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list11_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 > { typedef typename list11_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list12_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 > { typedef typename list12_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list13_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 > { typedef typename list13_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list14_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 > { typedef typename list14_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list15_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 > { typedef typename list15_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list16_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15 > { typedef typename list16_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, LONG_MAX, LONG_MAX, LONG_MAX > : list17_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16 > { typedef typename list17_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, C17, LONG_MAX, LONG_MAX > : list18_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, C17 > { typedef typename list18_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, C17, C18, LONG_MAX > : list19_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, C17, C18 > { typedef typename list19_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18 >::type type; }; /// primary template (not a specialization!) template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct list_c : list20_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, C17, C18, C19 > { typedef typename list20_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19 >::type type; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/bcc_pre590/map.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // *Preprocessed* version of the main "map.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na , typename T12 = na, typename T13 = na, typename T14 = na , typename T15 = na, typename T16 = na, typename T17 = na , typename T18 = na, typename T19 = na > struct map; template< > struct map< na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : map0< > { typedef map0< >::type type; }; template< typename T0 > struct map< T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : map1 { typedef typename map1::type type; }; template< typename T0, typename T1 > struct map< T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : map2< T0,T1 > { typedef typename map2< T0,T1 >::type type; }; template< typename T0, typename T1, typename T2 > struct map< T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : map3< T0,T1,T2 > { typedef typename map3< T0,T1,T2 >::type type; }; template< typename T0, typename T1, typename T2, typename T3 > struct map< T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : map4< T0,T1,T2,T3 > { typedef typename map4< T0,T1,T2,T3 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 > struct map< T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : map5< T0,T1,T2,T3,T4 > { typedef typename map5< T0,T1,T2,T3,T4 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct map< T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : map6< T0,T1,T2,T3,T4,T5 > { typedef typename map6< T0,T1,T2,T3,T4,T5 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6 > struct map< T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na , na, na, na > : map7< T0,T1,T2,T3,T4,T5,T6 > { typedef typename map7< T0,T1,T2,T3,T4,T5,T6 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7 > struct map< T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na , na, na, na > : map8< T0,T1,T2,T3,T4,T5,T6,T7 > { typedef typename map8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8 > struct map< T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na , na, na, na > : map9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > { typedef typename map9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 > struct map< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na , na, na, na > : map10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > { typedef typename map10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10 > struct map< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na , na, na, na > : map11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > { typedef typename map11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11 > struct map< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na , na, na, na, na > : map12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > { typedef typename map12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12 > struct map< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na , na, na, na, na > : map13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > { typedef typename map13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13 > struct map< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na , na, na, na, na > : map14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > { typedef typename map14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 > struct map< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na , na, na, na, na > : map15< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 > { typedef typename map15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15 > struct map< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, na, na, na, na > : map16< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15 > { typedef typename map16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16 > struct map< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, na, na, na > : map17< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16 > { typedef typename map17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17 > struct map< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, na, na > : map18< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17 > { typedef typename map18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18 > struct map< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18, na > : map19< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18 > { typedef typename map19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type; }; /// primary template (not a specialization!) template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct map : map20< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18, T19 > { typedef typename map20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/bcc_pre590/minus.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // *Preprocessed* version of the main "minus.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct minus_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< minus_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< minus_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct minus_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct minus_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct minus_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct minus_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) , typename N3 = na, typename N4 = na, typename N5 = na > struct minus : minus< minus< minus< minus< N1,N2 >, N3>, N4>, N5> { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , minus , ( N1, N2, N3, N4, N5 ) ) }; template< typename N1, typename N2, typename N3, typename N4 > struct minus< N1,N2,N3,N4,na > : minus< minus< minus< N1,N2 >, N3>, N4> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , minus , ( N1, N2, N3, N4, na ) ) }; template< typename N1, typename N2, typename N3 > struct minus< N1,N2,N3,na,na > : minus< minus< N1,N2 >, N3> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , minus , ( N1, N2, N3, na, na ) ) }; template< typename N1, typename N2 > struct minus< N1,N2,na,na,na > : minus_impl< typename minus_tag::type , typename minus_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , minus , ( N1, N2, na, na, na ) ) }; BOOST_MPL_AUX_NA_SPEC2(2, 5, minus) }} namespace boost { namespace mpl { template<> struct minus_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : integral_c< typename aux::largest_int< typename N1::value_type , typename N2::value_type >::type , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value - BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/bcc_pre590/modulus.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // *Preprocessed* version of the main "modulus.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct modulus_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< modulus_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< modulus_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct modulus_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct modulus_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct modulus_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct modulus_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct modulus : modulus_impl< typename modulus_tag::type , typename modulus_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, modulus, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 2, modulus) }} namespace boost { namespace mpl { template<> struct modulus_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : integral_c< typename aux::largest_int< typename N1::value_type , typename N2::value_type >::type , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value % BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/bcc_pre590/not_equal_to.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // *Preprocessed* version of the main "not_equal_to.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct not_equal_to_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< not_equal_to_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< not_equal_to_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct not_equal_to_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct not_equal_to_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct not_equal_to_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct not_equal_to_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct not_equal_to : not_equal_to_impl< typename not_equal_to_tag::type , typename not_equal_to_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, not_equal_to, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 2, not_equal_to) }} namespace boost { namespace mpl { template<> struct not_equal_to_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value != BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/bcc_pre590/or.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // *Preprocessed* version of the main "or.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< bool C_, typename T1, typename T2, typename T3, typename T4 > struct or_impl : true_ { }; template< typename T1, typename T2, typename T3, typename T4 > struct or_impl< false,T1,T2,T3,T4 > : or_impl< BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value , T2, T3, T4 , false_ > { }; template<> struct or_impl< false , false_, false_, false_, false_ > : false_ { }; } // namespace aux template< typename BOOST_MPL_AUX_NA_PARAM(T1) , typename BOOST_MPL_AUX_NA_PARAM(T2) , typename T3 = false_, typename T4 = false_, typename T5 = false_ > struct or_ : aux::or_impl< BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value , T2, T3, T4, T5 > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , or_ , ( T1, T2, T3, T4, T5) ) }; BOOST_MPL_AUX_NA_SPEC2( 2 , 5 , or_ ) }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/bcc_pre590/placeholders.hpp ================================================ // Copyright Aleksey Gurtovoy 2001-2004 // Copyright Peter Dimov 2001-2003 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // *Preprocessed* version of the main "placeholders.hpp" header // -- DO NOT modify by hand! BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg< -1 > _; BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE namespace boost { namespace mpl { BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_) namespace placeholders { using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_; } }} /// agurt, 17/mar/02: one more placeholder for the last 'apply#' /// specialization BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg<1> _1; BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE namespace boost { namespace mpl { BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_1) namespace placeholders { using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_1; } }} BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg<2> _2; BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE namespace boost { namespace mpl { BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_2) namespace placeholders { using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_2; } }} BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg<3> _3; BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE namespace boost { namespace mpl { BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_3) namespace placeholders { using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_3; } }} BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg<4> _4; BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE namespace boost { namespace mpl { BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_4) namespace placeholders { using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_4; } }} BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg<5> _5; BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE namespace boost { namespace mpl { BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_5) namespace placeholders { using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_5; } }} BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg<6> _6; BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE namespace boost { namespace mpl { BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_6) namespace placeholders { using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_6; } }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/bcc_pre590/plus.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // *Preprocessed* version of the main "plus.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct plus_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< plus_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< plus_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct plus_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct plus_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct plus_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct plus_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) , typename N3 = na, typename N4 = na, typename N5 = na > struct plus : plus< plus< plus< plus< N1,N2 >, N3>, N4>, N5> { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , plus , ( N1, N2, N3, N4, N5 ) ) }; template< typename N1, typename N2, typename N3, typename N4 > struct plus< N1,N2,N3,N4,na > : plus< plus< plus< N1,N2 >, N3>, N4> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , plus , ( N1, N2, N3, N4, na ) ) }; template< typename N1, typename N2, typename N3 > struct plus< N1,N2,N3,na,na > : plus< plus< N1,N2 >, N3> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , plus , ( N1, N2, N3, na, na ) ) }; template< typename N1, typename N2 > struct plus< N1,N2,na,na,na > : plus_impl< typename plus_tag::type , typename plus_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , plus , ( N1, N2, na, na, na ) ) }; BOOST_MPL_AUX_NA_SPEC2(2, 5, plus) }} namespace boost { namespace mpl { template<> struct plus_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : integral_c< typename aux::largest_int< typename N1::value_type , typename N2::value_type >::type , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/bcc_pre590/quote.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2008 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // *Preprocessed* version of the main "quote.hpp" header // -- DO NOT modify by hand! ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/bcc_pre590/reverse_fold_impl.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // *Preprocessed* version of the main "reverse_fold_impl.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { /// forward declaration template< long N , typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_fold_impl; template< long N > struct reverse_fold_chunk; template<> struct reverse_fold_chunk<0> { template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct result_ { typedef First iter0; typedef State fwd_state0; typedef fwd_state0 bkwd_state0; typedef bkwd_state0 state; typedef iter0 iterator; }; }; template<> struct reverse_fold_chunk<1> { template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct result_ { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; typedef typename mpl::next::type iter1; typedef fwd_state1 bkwd_state1; typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; typedef bkwd_state0 state; typedef iter1 iterator; }; }; template<> struct reverse_fold_chunk<2> { template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct result_ { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp, fwd_state1, typename deref::type >::type fwd_state2; typedef typename mpl::next::type iter2; typedef fwd_state2 bkwd_state2; typedef typename apply2< BackwardOp, bkwd_state2, typename deref::type >::type bkwd_state1; typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; typedef bkwd_state0 state; typedef iter2 iterator; }; }; template<> struct reverse_fold_chunk<3> { template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct result_ { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp, fwd_state1, typename deref::type >::type fwd_state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp, fwd_state2, typename deref::type >::type fwd_state3; typedef typename mpl::next::type iter3; typedef fwd_state3 bkwd_state3; typedef typename apply2< BackwardOp, bkwd_state3, typename deref::type >::type bkwd_state2; typedef typename apply2< BackwardOp, bkwd_state2, typename deref::type >::type bkwd_state1; typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; typedef bkwd_state0 state; typedef iter3 iterator; }; }; template<> struct reverse_fold_chunk<4> { template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct result_ { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp, fwd_state1, typename deref::type >::type fwd_state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp, fwd_state2, typename deref::type >::type fwd_state3; typedef typename mpl::next::type iter3; typedef typename apply2< ForwardOp, fwd_state3, typename deref::type >::type fwd_state4; typedef typename mpl::next::type iter4; typedef fwd_state4 bkwd_state4; typedef typename apply2< BackwardOp, bkwd_state4, typename deref::type >::type bkwd_state3; typedef typename apply2< BackwardOp, bkwd_state3, typename deref::type >::type bkwd_state2; typedef typename apply2< BackwardOp, bkwd_state2, typename deref::type >::type bkwd_state1; typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; typedef bkwd_state0 state; typedef iter4 iterator; }; }; template< long N > struct reverse_fold_chunk { template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct result_ { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp, fwd_state1, typename deref::type >::type fwd_state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp, fwd_state2, typename deref::type >::type fwd_state3; typedef typename mpl::next::type iter3; typedef typename apply2< ForwardOp, fwd_state3, typename deref::type >::type fwd_state4; typedef typename mpl::next::type iter4; typedef reverse_fold_impl< ( (N - 4) < 0 ? 0 : N - 4 ) , iter4 , Last , fwd_state4 , BackwardOp , ForwardOp > nested_chunk; typedef typename nested_chunk::state bkwd_state4; typedef typename apply2< BackwardOp, bkwd_state4, typename deref::type >::type bkwd_state3; typedef typename apply2< BackwardOp, bkwd_state3, typename deref::type >::type bkwd_state2; typedef typename apply2< BackwardOp, bkwd_state2, typename deref::type >::type bkwd_state1; typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; typedef bkwd_state0 state; typedef typename nested_chunk::iterator iterator; }; }; template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_fold_step; template< typename Last , typename State > struct reverse_fold_null_step { typedef Last iterator; typedef State state; }; template<> struct reverse_fold_chunk< -1 > { template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct result_ { typedef typename if_< typename is_same< First,Last >::type , reverse_fold_null_step< Last,State > , reverse_fold_step< First,Last,State,BackwardOp,ForwardOp > >::type res_; typedef typename res_::state state; typedef typename res_::iterator iterator; }; }; template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_fold_step { typedef reverse_fold_chunk< -1 >::template result_< typename mpl::next::type , Last , typename apply2::type>::type , BackwardOp , ForwardOp > nested_step; typedef typename apply2< BackwardOp , typename nested_step::state , typename deref::type >::type state; typedef typename nested_step::iterator iterator; }; template< long N , typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_fold_impl : reverse_fold_chunk ::template result_< First,Last,State,BackwardOp,ForwardOp > { }; }}} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/bcc_pre590/reverse_iter_fold_impl.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // *Preprocessed* version of the main "reverse_iter_fold_impl.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { /// forward declaration template< long N , typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_iter_fold_impl; template< long N > struct reverse_iter_fold_chunk; template<> struct reverse_iter_fold_chunk<0> { template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct result_ { typedef First iter0; typedef State fwd_state0; typedef fwd_state0 bkwd_state0; typedef bkwd_state0 state; typedef iter0 iterator; }; }; template<> struct reverse_iter_fold_chunk<1> { template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct result_ { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; typedef typename mpl::next::type iter1; typedef fwd_state1 bkwd_state1; typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; typedef bkwd_state0 state; typedef iter1 iterator; }; }; template<> struct reverse_iter_fold_chunk<2> { template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct result_ { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; typedef typename mpl::next::type iter2; typedef fwd_state2 bkwd_state2; typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1; typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; typedef bkwd_state0 state; typedef iter2 iterator; }; }; template<> struct reverse_iter_fold_chunk<3> { template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct result_ { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp,fwd_state2,iter2 >::type fwd_state3; typedef typename mpl::next::type iter3; typedef fwd_state3 bkwd_state3; typedef typename apply2< BackwardOp,bkwd_state3,iter2 >::type bkwd_state2; typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1; typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; typedef bkwd_state0 state; typedef iter3 iterator; }; }; template<> struct reverse_iter_fold_chunk<4> { template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct result_ { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp,fwd_state2,iter2 >::type fwd_state3; typedef typename mpl::next::type iter3; typedef typename apply2< ForwardOp,fwd_state3,iter3 >::type fwd_state4; typedef typename mpl::next::type iter4; typedef fwd_state4 bkwd_state4; typedef typename apply2< BackwardOp,bkwd_state4,iter3 >::type bkwd_state3; typedef typename apply2< BackwardOp,bkwd_state3,iter2 >::type bkwd_state2; typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1; typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; typedef bkwd_state0 state; typedef iter4 iterator; }; }; template< long N > struct reverse_iter_fold_chunk { template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct result_ { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp,fwd_state2,iter2 >::type fwd_state3; typedef typename mpl::next::type iter3; typedef typename apply2< ForwardOp,fwd_state3,iter3 >::type fwd_state4; typedef typename mpl::next::type iter4; typedef reverse_iter_fold_impl< ( (N - 4) < 0 ? 0 : N - 4 ) , iter4 , Last , fwd_state4 , BackwardOp , ForwardOp > nested_chunk; typedef typename nested_chunk::state bkwd_state4; typedef typename apply2< BackwardOp,bkwd_state4,iter3 >::type bkwd_state3; typedef typename apply2< BackwardOp,bkwd_state3,iter2 >::type bkwd_state2; typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1; typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; typedef bkwd_state0 state; typedef typename nested_chunk::iterator iterator; }; }; template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_iter_fold_step; template< typename Last , typename State > struct reverse_iter_fold_null_step { typedef Last iterator; typedef State state; }; template<> struct reverse_iter_fold_chunk< -1 > { template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct result_ { typedef typename if_< typename is_same< First,Last >::type , reverse_iter_fold_null_step< Last,State > , reverse_iter_fold_step< First,Last,State,BackwardOp,ForwardOp > >::type res_; typedef typename res_::state state; typedef typename res_::iterator iterator; }; }; template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_iter_fold_step { typedef reverse_iter_fold_chunk< -1 >::template result_< typename mpl::next::type , Last , typename apply2< ForwardOp,State,First >::type , BackwardOp , ForwardOp > nested_step; typedef typename apply2< BackwardOp , typename nested_step::state , First >::type state; typedef typename nested_step::iterator iterator; }; template< long N , typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_iter_fold_impl : reverse_iter_fold_chunk ::template result_< First,Last,State,BackwardOp,ForwardOp > { }; }}} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/bcc_pre590/set.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // *Preprocessed* version of the main "set.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na , typename T12 = na, typename T13 = na, typename T14 = na , typename T15 = na, typename T16 = na, typename T17 = na , typename T18 = na, typename T19 = na > struct set; template< > struct set< na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : set0< > { typedef set0< >::type type; }; template< typename T0 > struct set< T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : set1 { typedef typename set1::type type; }; template< typename T0, typename T1 > struct set< T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : set2< T0,T1 > { typedef typename set2< T0,T1 >::type type; }; template< typename T0, typename T1, typename T2 > struct set< T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : set3< T0,T1,T2 > { typedef typename set3< T0,T1,T2 >::type type; }; template< typename T0, typename T1, typename T2, typename T3 > struct set< T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : set4< T0,T1,T2,T3 > { typedef typename set4< T0,T1,T2,T3 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 > struct set< T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : set5< T0,T1,T2,T3,T4 > { typedef typename set5< T0,T1,T2,T3,T4 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct set< T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : set6< T0,T1,T2,T3,T4,T5 > { typedef typename set6< T0,T1,T2,T3,T4,T5 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6 > struct set< T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na , na, na, na > : set7< T0,T1,T2,T3,T4,T5,T6 > { typedef typename set7< T0,T1,T2,T3,T4,T5,T6 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7 > struct set< T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na , na, na, na > : set8< T0,T1,T2,T3,T4,T5,T6,T7 > { typedef typename set8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8 > struct set< T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na , na, na, na > : set9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > { typedef typename set9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 > struct set< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na , na, na, na > : set10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > { typedef typename set10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10 > struct set< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na , na, na, na > : set11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > { typedef typename set11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11 > struct set< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na , na, na, na, na > : set12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > { typedef typename set12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12 > struct set< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na , na, na, na, na > : set13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > { typedef typename set13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13 > struct set< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na , na, na, na, na > : set14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > { typedef typename set14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 > struct set< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na , na, na, na, na > : set15< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 > { typedef typename set15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15 > struct set< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, na, na, na, na > : set16< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15 > { typedef typename set16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16 > struct set< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, na, na, na > : set17< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16 > { typedef typename set17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17 > struct set< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, na, na > : set18< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17 > { typedef typename set18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18 > struct set< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18, na > : set19< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18 > { typedef typename set19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type; }; /// primary template (not a specialization!) template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct set : set20< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18, T19 > { typedef typename set20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/bcc_pre590/set_c.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // *Preprocessed* version of the main "set_c.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename T, long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX , long C3 = LONG_MAX, long C4 = LONG_MAX, long C5 = LONG_MAX , long C6 = LONG_MAX, long C7 = LONG_MAX, long C8 = LONG_MAX , long C9 = LONG_MAX, long C10 = LONG_MAX, long C11 = LONG_MAX , long C12 = LONG_MAX, long C13 = LONG_MAX, long C14 = LONG_MAX , long C15 = LONG_MAX, long C16 = LONG_MAX, long C17 = LONG_MAX , long C18 = LONG_MAX, long C19 = LONG_MAX > struct set_c; template< typename T > struct set_c< T, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : set0_c { typedef typename set0_c::type type; }; template< typename T, long C0 > struct set_c< T, C0, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : set1_c< T,C0 > { typedef typename set1_c< T,C0 >::type type; }; template< typename T, long C0, long C1 > struct set_c< T, C0, C1, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : set2_c< T,C0,C1 > { typedef typename set2_c< T,C0,C1 >::type type; }; template< typename T, long C0, long C1, long C2 > struct set_c< T, C0, C1, C2, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : set3_c< T,C0,C1,C2 > { typedef typename set3_c< T,C0,C1,C2 >::type type; }; template< typename T, long C0, long C1, long C2, long C3 > struct set_c< T, C0, C1, C2, C3, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : set4_c< T,C0,C1,C2,C3 > { typedef typename set4_c< T,C0,C1,C2,C3 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4 > struct set_c< T, C0, C1, C2, C3, C4, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : set5_c< T,C0,C1,C2,C3,C4 > { typedef typename set5_c< T,C0,C1,C2,C3,C4 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 > struct set_c< T, C0, C1, C2, C3, C4, C5, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX > : set6_c< T,C0,C1,C2,C3,C4,C5 > { typedef typename set6_c< T,C0,C1,C2,C3,C4,C5 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX > : set7_c< T,C0,C1,C2,C3,C4,C5,C6 > { typedef typename set7_c< T,C0,C1,C2,C3,C4,C5,C6 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, C7, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX > : set8_c< T,C0,C1,C2,C3,C4,C5,C6,C7 > { typedef typename set8_c< T,C0,C1,C2,C3,C4,C5,C6,C7 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX > : set9_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8 > { typedef typename set9_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX > : set10_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 > { typedef typename set10_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : set11_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 > { typedef typename set11_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : set12_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 > { typedef typename set12_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : set13_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 > { typedef typename set13_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : set14_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 > { typedef typename set14_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : set15_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 > { typedef typename set15_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : set16_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15 > { typedef typename set16_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, LONG_MAX, LONG_MAX, LONG_MAX > : set17_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16 > { typedef typename set17_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, C17, LONG_MAX, LONG_MAX > : set18_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, C17 > { typedef typename set18_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, C17, C18, LONG_MAX > : set19_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, C17, C18 > { typedef typename set19_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18 >::type type; }; /// primary template (not a specialization!) template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct set_c : set20_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, C17, C18, C19 > { typedef typename set20_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19 >::type type; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/bcc_pre590/shift_left.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // Copyright Jaap Suter 2003 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // *Preprocessed* version of the main "shift_left.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct shift_left_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< shift_left_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< shift_left_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct shift_left_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct shift_left_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct shift_left_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct shift_left_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct shift_left : shift_left_impl< typename shift_left_tag::type , typename shift_left_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, shift_left, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 2, shift_left) }} namespace boost { namespace mpl { template<> struct shift_left_impl< integral_c_tag,integral_c_tag > { template< typename N, typename S > struct apply : integral_c< typename N::value_type , ( BOOST_MPL_AUX_VALUE_WKND(N)::value << BOOST_MPL_AUX_VALUE_WKND(S)::value ) > { }; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/bcc_pre590/shift_right.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // Copyright Jaap Suter 2003 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // *Preprocessed* version of the main "shift_right.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct shift_right_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< shift_right_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< shift_right_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct shift_right_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct shift_right_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct shift_right_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct shift_right_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct shift_right : shift_right_impl< typename shift_right_tag::type , typename shift_right_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, shift_right, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 2, shift_right) }} namespace boost { namespace mpl { template<> struct shift_right_impl< integral_c_tag,integral_c_tag > { template< typename N, typename S > struct apply : integral_c< typename N::value_type , ( BOOST_MPL_AUX_VALUE_WKND(N)::value >> BOOST_MPL_AUX_VALUE_WKND(S)::value ) > { }; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/bcc_pre590/template_arity.hpp ================================================ // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // *Preprocessed* version of the main "template_arity.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< bool > struct template_arity_impl { template< typename F > struct result_ : mpl::int_< -1 > { }; }; template<> struct template_arity_impl { template< typename F > struct result_ : F::arity { }; }; template< typename F > struct template_arity : template_arity_impl< ::boost::mpl::aux::has_rebind::value > ::template result_ { }; }}} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/bcc_pre590/times.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // *Preprocessed* version of the main "times.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct times_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< times_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< times_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct times_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct times_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct times_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct times_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) , typename N3 = na, typename N4 = na, typename N5 = na > struct times : times< times< times< times< N1,N2 >, N3>, N4>, N5> { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , times , ( N1, N2, N3, N4, N5 ) ) }; template< typename N1, typename N2, typename N3, typename N4 > struct times< N1,N2,N3,N4,na > : times< times< times< N1,N2 >, N3>, N4> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , times , ( N1, N2, N3, N4, na ) ) }; template< typename N1, typename N2, typename N3 > struct times< N1,N2,N3,na,na > : times< times< N1,N2 >, N3> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , times , ( N1, N2, N3, na, na ) ) }; template< typename N1, typename N2 > struct times< N1,N2,na,na,na > : times_impl< typename times_tag::type , typename times_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , times , ( N1, N2, na, na, na ) ) }; BOOST_MPL_AUX_NA_SPEC2(2, 5, times) }} namespace boost { namespace mpl { template<> struct times_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : integral_c< typename aux::largest_int< typename N1::value_type , typename N2::value_type >::type , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value * BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/bcc_pre590/unpack_args.hpp ================================================ // Copyright Aleksey Gurtovoy 2002-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // *Preprocessed* version of the main "unpack_args.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< int size, typename F, typename Args > struct unpack_args_impl; template< typename F, typename Args > struct unpack_args_impl< 0,F,Args > : apply0< F > { }; template< typename F, typename Args > struct unpack_args_impl< 1,F,Args > : apply1< F , typename at_c< Args,0 >::type > { }; template< typename F, typename Args > struct unpack_args_impl< 2,F,Args > : apply2< F , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type > { }; template< typename F, typename Args > struct unpack_args_impl< 3,F,Args > : apply3< F , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type , typename at_c< Args,2 >::type > { }; template< typename F, typename Args > struct unpack_args_impl< 4,F,Args > : apply4< F , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type , typename at_c< Args,2 >::type, typename at_c< Args,3 >::type > { }; template< typename F, typename Args > struct unpack_args_impl< 5,F,Args > : apply5< F , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type , typename at_c< Args,2 >::type, typename at_c< Args,3 >::type , typename at_c< Args,4 >::type > { }; } template< typename F > struct unpack_args { template< typename Args > struct apply { typedef typename aux::unpack_args_impl< size::value , F , Args >::type type; }; }; BOOST_MPL_AUX_PASS_THROUGH_LAMBDA_SPEC(1, unpack_args) }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/bcc_pre590/vector.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // *Preprocessed* version of the main "vector.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na , typename T12 = na, typename T13 = na, typename T14 = na , typename T15 = na, typename T16 = na, typename T17 = na , typename T18 = na, typename T19 = na > struct vector; template< > struct vector< na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector0< > { typedef vector0< >::type type; }; template< typename T0 > struct vector< T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector1 { typedef typename vector1::type type; }; template< typename T0, typename T1 > struct vector< T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector2< T0,T1 > { typedef typename vector2< T0,T1 >::type type; }; template< typename T0, typename T1, typename T2 > struct vector< T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector3< T0,T1,T2 > { typedef typename vector3< T0,T1,T2 >::type type; }; template< typename T0, typename T1, typename T2, typename T3 > struct vector< T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector4< T0,T1,T2,T3 > { typedef typename vector4< T0,T1,T2,T3 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 > struct vector< T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector5< T0,T1,T2,T3,T4 > { typedef typename vector5< T0,T1,T2,T3,T4 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct vector< T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector6< T0,T1,T2,T3,T4,T5 > { typedef typename vector6< T0,T1,T2,T3,T4,T5 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6 > struct vector< T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector7< T0,T1,T2,T3,T4,T5,T6 > { typedef typename vector7< T0,T1,T2,T3,T4,T5,T6 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7 > struct vector< T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na , na, na, na > : vector8< T0,T1,T2,T3,T4,T5,T6,T7 > { typedef typename vector8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8 > struct vector< T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na , na, na, na > : vector9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > { typedef typename vector9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 > struct vector< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na , na, na, na > : vector10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > { typedef typename vector10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10 > struct vector< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na , na, na, na > : vector11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > { typedef typename vector11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11 > struct vector< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na , na, na, na, na > : vector12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > { typedef typename vector12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12 > struct vector< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na , na, na, na, na > : vector13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > { typedef typename vector13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13 > struct vector< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na , na, na, na, na > : vector14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > { typedef typename vector14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 > struct vector< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na , na, na, na, na > : vector15< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 > { typedef typename vector15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15 > struct vector< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, na, na, na, na > : vector16< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15 > { typedef typename vector16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16 > struct vector< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, na, na, na > : vector17< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16 > { typedef typename vector17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17 > struct vector< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, na, na > : vector18< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17 > { typedef typename vector18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18 > struct vector< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18, na > : vector19< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18 > { typedef typename vector19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type; }; /// primary template (not a specialization!) template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct vector : vector20< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18, T19 > { typedef typename vector20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/bcc_pre590/vector_c.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2008 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // *Preprocessed* version of the main "vector_c.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename T, long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX , long C3 = LONG_MAX, long C4 = LONG_MAX, long C5 = LONG_MAX , long C6 = LONG_MAX, long C7 = LONG_MAX, long C8 = LONG_MAX , long C9 = LONG_MAX, long C10 = LONG_MAX, long C11 = LONG_MAX , long C12 = LONG_MAX, long C13 = LONG_MAX, long C14 = LONG_MAX , long C15 = LONG_MAX, long C16 = LONG_MAX, long C17 = LONG_MAX , long C18 = LONG_MAX, long C19 = LONG_MAX > struct vector_c; template< typename T > struct vector_c< T, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector0_c { typedef typename vector0_c::type type; }; template< typename T, long C0 > struct vector_c< T, C0, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector1_c< T, T(C0) > { typedef typename vector1_c< T, T(C0) >::type type; }; template< typename T, long C0, long C1 > struct vector_c< T, C0, C1, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector2_c< T, T(C0), T(C1) > { typedef typename vector2_c< T, T(C0), T(C1) >::type type; }; template< typename T, long C0, long C1, long C2 > struct vector_c< T, C0, C1, C2, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector3_c< T, T(C0), T(C1), T(C2) > { typedef typename vector3_c< T, T(C0), T(C1), T(C2) >::type type; }; template< typename T, long C0, long C1, long C2, long C3 > struct vector_c< T, C0, C1, C2, C3, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector4_c< T, T(C0), T(C1), T(C2), T(C3) > { typedef typename vector4_c< T, T(C0), T(C1), T(C2), T(C3) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4 > struct vector_c< T, C0, C1, C2, C3, C4, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector5_c< T, T(C0), T(C1), T(C2), T(C3), T(C4) > { typedef typename vector5_c< T, T(C0), T(C1), T(C2), T(C3), T(C4) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 > struct vector_c< T, C0, C1, C2, C3, C4, C5, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX > : vector6_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5) > { typedef typename vector6_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX > : vector7_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6) > { typedef typename vector7_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, C7, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX > : vector8_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7) > { typedef typename vector8_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX > : vector9_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8) > { typedef typename vector9_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX > : vector10_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9) > { typedef typename vector10_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector11_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10) > { typedef typename vector11_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector12_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11) > { typedef typename vector12_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector13_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12) > { typedef typename vector13_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector14_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13) > { typedef typename vector14_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector15_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14) > { typedef typename vector15_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector16_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15) > { typedef typename vector16_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, LONG_MAX, LONG_MAX, LONG_MAX > : vector17_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16) > { typedef typename vector17_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, C17, LONG_MAX, LONG_MAX > : vector18_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17) > { typedef typename vector18_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, C17, C18, LONG_MAX > : vector19_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17), T(C18) > { typedef typename vector19_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17), T(C18) >::type type; }; /// primary template (not a specialization!) template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct vector_c : vector20_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17), T(C18), T(C19) > { typedef typename vector20_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17), T(C18), T(C19) >::type type; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/dmc/advance_backward.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/aux_/advance_backward.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< long N > struct advance_backward; template<> struct advance_backward<0> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef iter0 type; }; }; template<> struct advance_backward<1> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef typename prior::type iter1; typedef iter1 type; }; }; template<> struct advance_backward<2> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef typename prior::type iter1; typedef typename prior::type iter2; typedef iter2 type; }; }; template<> struct advance_backward<3> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef typename prior::type iter1; typedef typename prior::type iter2; typedef typename prior::type iter3; typedef iter3 type; }; }; template<> struct advance_backward<4> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef typename prior::type iter1; typedef typename prior::type iter2; typedef typename prior::type iter3; typedef typename prior::type iter4; typedef iter4 type; }; }; template< long N > struct advance_backward { template< typename Iterator > struct apply { typedef typename apply_wrap1< advance_backward<4> , Iterator >::type chunk_result_; typedef typename apply_wrap1< advance_backward<( (N - 4) < 0 ? 0 : N - 4 )> , chunk_result_ >::type type; }; }; }}} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/dmc/advance_forward.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/aux_/advance_forward.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< long N > struct advance_forward; template<> struct advance_forward<0> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef iter0 type; }; }; template<> struct advance_forward<1> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef typename next::type iter1; typedef iter1 type; }; }; template<> struct advance_forward<2> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef typename next::type iter1; typedef typename next::type iter2; typedef iter2 type; }; }; template<> struct advance_forward<3> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef typename next::type iter1; typedef typename next::type iter2; typedef typename next::type iter3; typedef iter3 type; }; }; template<> struct advance_forward<4> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef typename next::type iter1; typedef typename next::type iter2; typedef typename next::type iter3; typedef typename next::type iter4; typedef iter4 type; }; }; template< long N > struct advance_forward { template< typename Iterator > struct apply { typedef typename apply_wrap1< advance_forward<4> , Iterator >::type chunk_result_; typedef typename apply_wrap1< advance_forward<( (N - 4) < 0 ? 0 : N - 4 )> , chunk_result_ >::type type; }; }; }}} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/dmc/and.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/and.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< bool C_, typename T1, typename T2, typename T3, typename T4 > struct and_impl : false_ { }; template< typename T1, typename T2, typename T3, typename T4 > struct and_impl< true,T1,T2,T3,T4 > : and_impl< BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value , T2, T3, T4 , true_ > { }; template<> struct and_impl< true , true_, true_, true_, true_ > : true_ { }; } // namespace aux template< typename BOOST_MPL_AUX_NA_PARAM(T1) , typename BOOST_MPL_AUX_NA_PARAM(T2) , typename T3 = true_, typename T4 = true_, typename T5 = true_ > struct and_ : aux::and_impl< BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value , T2, T3, T4, T5 > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , and_ , ( T1, T2, T3, T4, T5) ) }; BOOST_MPL_AUX_NA_SPEC2( 2 , 5 , and_ ) }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/dmc/apply.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/apply.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename F > struct apply0 : apply_wrap0< typename lambda::type > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 1 , apply0 , (F ) ) }; template< typename F > struct apply< F,na,na,na,na,na > : apply0 { }; template< typename F, typename T1 > struct apply1 : apply_wrap1< typename lambda::type , T1 > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 2 , apply1 , (F, T1) ) }; template< typename F, typename T1 > struct apply< F,T1,na,na,na,na > : apply1< F,T1 > { }; template< typename F, typename T1, typename T2 > struct apply2 : apply_wrap2< typename lambda::type , T1, T2 > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 3 , apply2 , (F, T1, T2) ) }; template< typename F, typename T1, typename T2 > struct apply< F,T1,T2,na,na,na > : apply2< F,T1,T2 > { }; template< typename F, typename T1, typename T2, typename T3 > struct apply3 : apply_wrap3< typename lambda::type , T1, T2, T3 > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 4 , apply3 , (F, T1, T2, T3) ) }; template< typename F, typename T1, typename T2, typename T3 > struct apply< F,T1,T2,T3,na,na > : apply3< F,T1,T2,T3 > { }; template< typename F, typename T1, typename T2, typename T3, typename T4 > struct apply4 : apply_wrap4< typename lambda::type , T1, T2, T3, T4 > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , apply4 , (F, T1, T2, T3, T4) ) }; template< typename F, typename T1, typename T2, typename T3, typename T4 > struct apply< F,T1,T2,T3,T4,na > : apply4< F,T1,T2,T3,T4 > { }; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct apply5 : apply_wrap5< typename lambda::type , T1, T2, T3, T4, T5 > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 6 , apply5 , (F, T1, T2, T3, T4, T5) ) }; /// primary template (not a specialization!) template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct apply : apply5< F,T1,T2,T3,T4,T5 > { }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/dmc/apply_fwd.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/apply_fwd.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename F, typename T1 = na, typename T2 = na, typename T3 = na , typename T4 = na, typename T5 = na > struct apply; template< typename F > struct apply0; template< typename F, typename T1 > struct apply1; template< typename F, typename T1, typename T2 > struct apply2; template< typename F, typename T1, typename T2, typename T3 > struct apply3; template< typename F, typename T1, typename T2, typename T3, typename T4 > struct apply4; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct apply5; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/dmc/apply_wrap.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/apply_wrap.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename F , typename has_apply_ = typename aux::has_apply::type > struct apply_wrap0 : F::template apply< > { }; template< typename F > struct apply_wrap0< F,true_ > : F::apply { }; template< typename F, typename T1 > struct apply_wrap1 : F::template apply { }; template< typename F, typename T1, typename T2 > struct apply_wrap2 : F::template apply< T1,T2 > { }; template< typename F, typename T1, typename T2, typename T3 > struct apply_wrap3 : F::template apply< T1,T2,T3 > { }; template< typename F, typename T1, typename T2, typename T3, typename T4 > struct apply_wrap4 : F::template apply< T1,T2,T3,T4 > { }; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct apply_wrap5 : F::template apply< T1,T2,T3,T4,T5 > { }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/dmc/arg.hpp ================================================ // Copyright Peter Dimov 2001-2002 // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/arg.hpp" header // -- DO NOT modify by hand! BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN template<> struct arg< -1 > { BOOST_STATIC_CONSTANT(int, value = -1); BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) BOOST_MPL_AUX_ARG_TYPEDEF(na, type) template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { typedef U1 type; BOOST_MPL_AUX_ASSERT_NOT_NA(type); }; }; template<> struct arg<1> { BOOST_STATIC_CONSTANT(int, value = 1); typedef arg<2> next; BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) BOOST_MPL_AUX_ARG_TYPEDEF(na, type) template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { typedef U1 type; BOOST_MPL_AUX_ASSERT_NOT_NA(type); }; }; template<> struct arg<2> { BOOST_STATIC_CONSTANT(int, value = 2); typedef arg<3> next; BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) BOOST_MPL_AUX_ARG_TYPEDEF(na, type) template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { typedef U2 type; BOOST_MPL_AUX_ASSERT_NOT_NA(type); }; }; template<> struct arg<3> { BOOST_STATIC_CONSTANT(int, value = 3); typedef arg<4> next; BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) BOOST_MPL_AUX_ARG_TYPEDEF(na, type) template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { typedef U3 type; BOOST_MPL_AUX_ASSERT_NOT_NA(type); }; }; template<> struct arg<4> { BOOST_STATIC_CONSTANT(int, value = 4); typedef arg<5> next; BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) BOOST_MPL_AUX_ARG_TYPEDEF(na, type) template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { typedef U4 type; BOOST_MPL_AUX_ASSERT_NOT_NA(type); }; }; template<> struct arg<5> { BOOST_STATIC_CONSTANT(int, value = 5); typedef arg<6> next; BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) BOOST_MPL_AUX_ARG_TYPEDEF(na, type) template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { typedef U5 type; BOOST_MPL_AUX_ASSERT_NOT_NA(type); }; }; BOOST_MPL_AUX_NONTYPE_ARITY_SPEC(1,int, arg) BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/dmc/basic_bind.hpp ================================================ // Copyright Peter Dimov 2001 // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/aux_/basic_bind.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< typename T, typename U1, typename U2, typename U3, typename U4 , typename U5 > struct resolve_bind_arg { typedef T type; }; template< int N, typename U1, typename U2, typename U3, typename U4, typename U5 > struct resolve_bind_arg< arg, U1, U2, U3, U4, U5 > { typedef typename apply_wrap5, U1, U2, U3, U4, U5>::type type; }; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5, typename U1, typename U2, typename U3, typename U4 , typename U5 > struct resolve_bind_arg< bind< F,T1,T2,T3,T4,T5 >, U1, U2, U3, U4, U5 > { typedef bind< F,T1,T2,T3,T4,T5 > f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux template< typename F, int dummy_ > struct bind0 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; public: typedef typename apply_wrap0< f_ >::type type; }; }; namespace aux { template< typename F, typename U1, typename U2, typename U3, typename U4 , typename U5 > struct resolve_bind_arg< bind0, U1, U2, U3, U4, U5 > { typedef bind0 f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(1, bind0) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(1, bind0) template< typename F, int dummy_ > struct bind< F,na,na,na,na,na > : bind0 { }; template< typename F, typename T1, int dummy_ > struct bind1 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; public: typedef typename apply_wrap1< f_ , typename t1::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename U1, typename U2, typename U3 , typename U4, typename U5 > struct resolve_bind_arg< bind1< F,T1 >, U1, U2, U3, U4, U5 > { typedef bind1< F,T1 > f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(2, bind1) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(2, bind1) template< typename F, typename T1, int dummy_ > struct bind< F,T1,na,na,na,na > : bind1< F,T1 > { }; template< typename F, typename T1, typename T2, int dummy_ > struct bind2 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; public: typedef typename apply_wrap2< f_ , typename t1::type, typename t2::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename T2, typename U1, typename U2 , typename U3, typename U4, typename U5 > struct resolve_bind_arg< bind2< F,T1,T2 >, U1, U2, U3, U4, U5 > { typedef bind2< F,T1,T2 > f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(3, bind2) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(3, bind2) template< typename F, typename T1, typename T2, int dummy_ > struct bind< F,T1,T2,na,na,na > : bind2< F,T1,T2 > { }; template< typename F, typename T1, typename T2, typename T3, int dummy_ > struct bind3 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3; public: typedef typename apply_wrap3< f_ , typename t1::type, typename t2::type, typename t3::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename T2, typename T3, typename U1 , typename U2, typename U3, typename U4, typename U5 > struct resolve_bind_arg< bind3< F,T1,T2,T3 >, U1, U2, U3, U4, U5 > { typedef bind3< F,T1,T2,T3 > f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(4, bind3) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(4, bind3) template< typename F, typename T1, typename T2, typename T3, int dummy_ > struct bind< F,T1,T2,T3,na,na > : bind3< F,T1,T2,T3 > { }; template< typename F, typename T1, typename T2, typename T3, typename T4 , int dummy_ > struct bind4 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3; typedef aux::resolve_bind_arg< T4,U1,U2,U3,U4,U5 > t4; public: typedef typename apply_wrap4< f_ , typename t1::type, typename t2::type, typename t3::type , typename t4::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename T2, typename T3, typename T4 , typename U1, typename U2, typename U3, typename U4, typename U5 > struct resolve_bind_arg< bind4< F,T1,T2,T3,T4 >, U1, U2, U3, U4, U5 > { typedef bind4< F,T1,T2,T3,T4 > f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(5, bind4) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(5, bind4) template< typename F, typename T1, typename T2, typename T3, typename T4 , int dummy_ > struct bind< F,T1,T2,T3,T4,na > : bind4< F,T1,T2,T3,T4 > { }; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5, int dummy_ > struct bind5 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3; typedef aux::resolve_bind_arg< T4,U1,U2,U3,U4,U5 > t4; typedef aux::resolve_bind_arg< T5,U1,U2,U3,U4,U5 > t5; public: typedef typename apply_wrap5< f_ , typename t1::type, typename t2::type, typename t3::type , typename t4::type, typename t5::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5, typename U1, typename U2, typename U3, typename U4 , typename U5 > struct resolve_bind_arg< bind5< F,T1,T2,T3,T4,T5 >, U1, U2, U3, U4, U5 > { typedef bind5< F,T1,T2,T3,T4,T5 > f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(6, bind5) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(6, bind5) /// primary template (not a specialization!) template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5, int dummy_ > struct bind : bind5< F,T1,T2,T3,T4,T5 > { }; /// if_/eval_if specializations template< template< typename T1, typename T2, typename T3 > class F, typename Tag > struct quote3; template< typename T1, typename T2, typename T3 > struct if_; template< typename Tag, typename T1, typename T2, typename T3 > struct bind3< quote3< if_,Tag > , T1, T2, T3 > { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef mpl::arg<1> n1; typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3; typedef typename if_< typename t1::type , t2, t3 >::type f_; public: typedef typename f_::type type; }; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/dmc/bind.hpp ================================================ // Copyright Peter Dimov 2001 // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/bind.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< typename T, typename U1, typename U2, typename U3, typename U4 , typename U5 > struct resolve_bind_arg { typedef T type; }; template< typename T , typename Arg > struct replace_unnamed_arg { typedef Arg next; typedef T type; }; template< typename Arg > struct replace_unnamed_arg< arg< -1 >, Arg > { typedef typename Arg::next next; typedef Arg type; }; template< int N, typename U1, typename U2, typename U3, typename U4, typename U5 > struct resolve_bind_arg< arg, U1, U2, U3, U4, U5 > { typedef typename apply_wrap5, U1, U2, U3, U4, U5>::type type; }; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5, typename U1, typename U2, typename U3, typename U4 , typename U5 > struct resolve_bind_arg< bind< F,T1,T2,T3,T4,T5 >, U1, U2, U3, U4, U5 > { typedef bind< F,T1,T2,T3,T4,T5 > f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux template< typename F, int dummy_ > struct bind0 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; typedef typename r0::type a0; typedef typename r0::next n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; /// public: typedef typename apply_wrap0< f_ >::type type; }; }; namespace aux { template< typename F, typename U1, typename U2, typename U3, typename U4 , typename U5 > struct resolve_bind_arg< bind0, U1, U2, U3, U4, U5 > { typedef bind0 f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(1, bind0) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(1, bind0) template< typename F, int dummy_ > struct bind< F,na,na,na,na,na > : bind0 { }; template< typename F, typename T1, int dummy_ > struct bind1 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; typedef typename r0::type a0; typedef typename r0::next n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; /// typedef aux::replace_unnamed_arg< T1,n1 > r1; typedef typename r1::type a1; typedef typename r1::next n2; typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; /// public: typedef typename apply_wrap1< f_ , typename t1::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename U1, typename U2, typename U3 , typename U4, typename U5 > struct resolve_bind_arg< bind1< F,T1 >, U1, U2, U3, U4, U5 > { typedef bind1< F,T1 > f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(2, bind1) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(2, bind1) template< typename F, typename T1, int dummy_ > struct bind< F,T1,na,na,na,na > : bind1< F,T1 > { }; template< typename F, typename T1, typename T2, int dummy_ > struct bind2 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; typedef typename r0::type a0; typedef typename r0::next n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; /// typedef aux::replace_unnamed_arg< T1,n1 > r1; typedef typename r1::type a1; typedef typename r1::next n2; typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; /// typedef aux::replace_unnamed_arg< T2,n2 > r2; typedef typename r2::type a2; typedef typename r2::next n3; typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; /// public: typedef typename apply_wrap2< f_ , typename t1::type, typename t2::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename T2, typename U1, typename U2 , typename U3, typename U4, typename U5 > struct resolve_bind_arg< bind2< F,T1,T2 >, U1, U2, U3, U4, U5 > { typedef bind2< F,T1,T2 > f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(3, bind2) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(3, bind2) template< typename F, typename T1, typename T2, int dummy_ > struct bind< F,T1,T2,na,na,na > : bind2< F,T1,T2 > { }; template< typename F, typename T1, typename T2, typename T3, int dummy_ > struct bind3 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; typedef typename r0::type a0; typedef typename r0::next n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; /// typedef aux::replace_unnamed_arg< T1,n1 > r1; typedef typename r1::type a1; typedef typename r1::next n2; typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; /// typedef aux::replace_unnamed_arg< T2,n2 > r2; typedef typename r2::type a2; typedef typename r2::next n3; typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; /// typedef aux::replace_unnamed_arg< T3,n3 > r3; typedef typename r3::type a3; typedef typename r3::next n4; typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; /// public: typedef typename apply_wrap3< f_ , typename t1::type, typename t2::type, typename t3::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename T2, typename T3, typename U1 , typename U2, typename U3, typename U4, typename U5 > struct resolve_bind_arg< bind3< F,T1,T2,T3 >, U1, U2, U3, U4, U5 > { typedef bind3< F,T1,T2,T3 > f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(4, bind3) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(4, bind3) template< typename F, typename T1, typename T2, typename T3, int dummy_ > struct bind< F,T1,T2,T3,na,na > : bind3< F,T1,T2,T3 > { }; template< typename F, typename T1, typename T2, typename T3, typename T4 , int dummy_ > struct bind4 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; typedef typename r0::type a0; typedef typename r0::next n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; /// typedef aux::replace_unnamed_arg< T1,n1 > r1; typedef typename r1::type a1; typedef typename r1::next n2; typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; /// typedef aux::replace_unnamed_arg< T2,n2 > r2; typedef typename r2::type a2; typedef typename r2::next n3; typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; /// typedef aux::replace_unnamed_arg< T3,n3 > r3; typedef typename r3::type a3; typedef typename r3::next n4; typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; /// typedef aux::replace_unnamed_arg< T4,n4 > r4; typedef typename r4::type a4; typedef typename r4::next n5; typedef aux::resolve_bind_arg< a4,U1,U2,U3,U4,U5 > t4; /// public: typedef typename apply_wrap4< f_ , typename t1::type, typename t2::type, typename t3::type , typename t4::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename T2, typename T3, typename T4 , typename U1, typename U2, typename U3, typename U4, typename U5 > struct resolve_bind_arg< bind4< F,T1,T2,T3,T4 >, U1, U2, U3, U4, U5 > { typedef bind4< F,T1,T2,T3,T4 > f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(5, bind4) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(5, bind4) template< typename F, typename T1, typename T2, typename T3, typename T4 , int dummy_ > struct bind< F,T1,T2,T3,T4,na > : bind4< F,T1,T2,T3,T4 > { }; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5, int dummy_ > struct bind5 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; typedef typename r0::type a0; typedef typename r0::next n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; /// typedef aux::replace_unnamed_arg< T1,n1 > r1; typedef typename r1::type a1; typedef typename r1::next n2; typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; /// typedef aux::replace_unnamed_arg< T2,n2 > r2; typedef typename r2::type a2; typedef typename r2::next n3; typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; /// typedef aux::replace_unnamed_arg< T3,n3 > r3; typedef typename r3::type a3; typedef typename r3::next n4; typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; /// typedef aux::replace_unnamed_arg< T4,n4 > r4; typedef typename r4::type a4; typedef typename r4::next n5; typedef aux::resolve_bind_arg< a4,U1,U2,U3,U4,U5 > t4; /// typedef aux::replace_unnamed_arg< T5,n5 > r5; typedef typename r5::type a5; typedef typename r5::next n6; typedef aux::resolve_bind_arg< a5,U1,U2,U3,U4,U5 > t5; /// public: typedef typename apply_wrap5< f_ , typename t1::type, typename t2::type, typename t3::type , typename t4::type, typename t5::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5, typename U1, typename U2, typename U3, typename U4 , typename U5 > struct resolve_bind_arg< bind5< F,T1,T2,T3,T4,T5 >, U1, U2, U3, U4, U5 > { typedef bind5< F,T1,T2,T3,T4,T5 > f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(6, bind5) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(6, bind5) /// primary template (not a specialization!) template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5, int dummy_ > struct bind : bind5< F,T1,T2,T3,T4,T5 > { }; /// if_/eval_if specializations template< template< typename T1, typename T2, typename T3 > class F, typename Tag > struct quote3; template< typename T1, typename T2, typename T3 > struct if_; template< typename Tag, typename T1, typename T2, typename T3 > struct bind3< quote3< if_,Tag > , T1, T2, T3 > { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef mpl::arg<1> n1; typedef aux::replace_unnamed_arg< T1,n1 > r1; typedef typename r1::type a1; typedef typename r1::next n2; typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; /// typedef aux::replace_unnamed_arg< T2,n2 > r2; typedef typename r2::type a2; typedef typename r2::next n3; typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; /// typedef aux::replace_unnamed_arg< T3,n3 > r3; typedef typename r3::type a3; typedef typename r3::next n4; typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; /// typedef typename if_< typename t1::type , t2, t3 >::type f_; public: typedef typename f_::type type; }; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/dmc/bind_fwd.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/bind_fwd.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename F, typename T1 = na, typename T2 = na, typename T3 = na , typename T4 = na, typename T5 = na, int dummy_ = 0 > struct bind; template< typename F, int dummy_ = 0 > struct bind0; template< typename F, typename T1, int dummy_ = 0 > struct bind1; template< typename F, typename T1, typename T2, int dummy_ = 0 > struct bind2; template< typename F, typename T1, typename T2, typename T3, int dummy_ = 0 > struct bind3; template< typename F, typename T1, typename T2, typename T3, typename T4 , int dummy_ = 0 > struct bind4; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5, int dummy_ = 0 > struct bind5; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/dmc/bitand.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // Copyright Jaap Suter 2003 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/bitand.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct bitand_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< bitand_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< bitand_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct bitand_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct bitand_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct bitand_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct bitand_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) , typename N3 = na, typename N4 = na, typename N5 = na > struct bitand_ : bitand_< bitand_< bitand_< bitand_< N1,N2 >, N3>, N4>, N5> { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , bitand_ , ( N1, N2, N3, N4, N5 ) ) }; template< typename N1, typename N2, typename N3, typename N4 > struct bitand_< N1,N2,N3,N4,na > : bitand_< bitand_< bitand_< N1,N2 >, N3>, N4> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , bitand_ , ( N1, N2, N3, N4, na ) ) }; template< typename N1, typename N2, typename N3 > struct bitand_< N1,N2,N3,na,na > : bitand_< bitand_< N1,N2 >, N3> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , bitand_ , ( N1, N2, N3, na, na ) ) }; template< typename N1, typename N2 > struct bitand_< N1,N2,na,na,na > : bitand_impl< typename bitand_tag::type , typename bitand_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , bitand_ , ( N1, N2, na, na, na ) ) }; BOOST_MPL_AUX_NA_SPEC2(2, 5, bitand_) }} namespace boost { namespace mpl { template<> struct bitand_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : integral_c< typename aux::largest_int< typename N1::value_type , typename N2::value_type >::type , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value & BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/dmc/bitor.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // Copyright Jaap Suter 2003 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/bitor.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct bitor_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< bitor_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< bitor_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct bitor_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct bitor_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct bitor_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct bitor_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) , typename N3 = na, typename N4 = na, typename N5 = na > struct bitor_ : bitor_< bitor_< bitor_< bitor_< N1,N2 >, N3>, N4>, N5> { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , bitor_ , ( N1, N2, N3, N4, N5 ) ) }; template< typename N1, typename N2, typename N3, typename N4 > struct bitor_< N1,N2,N3,N4,na > : bitor_< bitor_< bitor_< N1,N2 >, N3>, N4> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , bitor_ , ( N1, N2, N3, N4, na ) ) }; template< typename N1, typename N2, typename N3 > struct bitor_< N1,N2,N3,na,na > : bitor_< bitor_< N1,N2 >, N3> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , bitor_ , ( N1, N2, N3, na, na ) ) }; template< typename N1, typename N2 > struct bitor_< N1,N2,na,na,na > : bitor_impl< typename bitor_tag::type , typename bitor_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , bitor_ , ( N1, N2, na, na, na ) ) }; BOOST_MPL_AUX_NA_SPEC2(2, 5, bitor_) }} namespace boost { namespace mpl { template<> struct bitor_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : integral_c< typename aux::largest_int< typename N1::value_type , typename N2::value_type >::type , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value | BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/dmc/bitxor.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // Copyright Jaap Suter 2003 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/bitxor.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct bitxor_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< bitxor_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< bitxor_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct bitxor_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct bitxor_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct bitxor_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct bitxor_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) , typename N3 = na, typename N4 = na, typename N5 = na > struct bitxor_ : bitxor_< bitxor_< bitxor_< bitxor_< N1,N2 >, N3>, N4>, N5> { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , bitxor_ , ( N1, N2, N3, N4, N5 ) ) }; template< typename N1, typename N2, typename N3, typename N4 > struct bitxor_< N1,N2,N3,N4,na > : bitxor_< bitxor_< bitxor_< N1,N2 >, N3>, N4> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , bitxor_ , ( N1, N2, N3, N4, na ) ) }; template< typename N1, typename N2, typename N3 > struct bitxor_< N1,N2,N3,na,na > : bitxor_< bitxor_< N1,N2 >, N3> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , bitxor_ , ( N1, N2, N3, na, na ) ) }; template< typename N1, typename N2 > struct bitxor_< N1,N2,na,na,na > : bitxor_impl< typename bitxor_tag::type , typename bitxor_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , bitxor_ , ( N1, N2, na, na, na ) ) }; BOOST_MPL_AUX_NA_SPEC2(2, 5, bitxor_) }} namespace boost { namespace mpl { template<> struct bitxor_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : integral_c< typename aux::largest_int< typename N1::value_type , typename N2::value_type >::type , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value ^ BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/dmc/deque.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/deque.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na , typename T12 = na, typename T13 = na, typename T14 = na , typename T15 = na, typename T16 = na, typename T17 = na , typename T18 = na, typename T19 = na > struct deque; template< > struct deque< na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector0< > { typedef vector0< >::type type; }; template< typename T0 > struct deque< T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector1 { typedef typename vector1::type type; }; template< typename T0, typename T1 > struct deque< T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector2< T0,T1 > { typedef typename vector2< T0,T1 >::type type; }; template< typename T0, typename T1, typename T2 > struct deque< T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector3< T0,T1,T2 > { typedef typename vector3< T0,T1,T2 >::type type; }; template< typename T0, typename T1, typename T2, typename T3 > struct deque< T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector4< T0,T1,T2,T3 > { typedef typename vector4< T0,T1,T2,T3 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 > struct deque< T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector5< T0,T1,T2,T3,T4 > { typedef typename vector5< T0,T1,T2,T3,T4 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct deque< T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector6< T0,T1,T2,T3,T4,T5 > { typedef typename vector6< T0,T1,T2,T3,T4,T5 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6 > struct deque< T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector7< T0,T1,T2,T3,T4,T5,T6 > { typedef typename vector7< T0,T1,T2,T3,T4,T5,T6 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7 > struct deque< T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na , na, na, na > : vector8< T0,T1,T2,T3,T4,T5,T6,T7 > { typedef typename vector8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8 > struct deque< T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na , na, na, na > : vector9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > { typedef typename vector9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 > struct deque< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na , na, na, na > : vector10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > { typedef typename vector10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10 > struct deque< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na , na, na, na > : vector11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > { typedef typename vector11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11 > struct deque< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na , na, na, na, na > : vector12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > { typedef typename vector12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12 > struct deque< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na , na, na, na, na > : vector13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > { typedef typename vector13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13 > struct deque< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na , na, na, na, na > : vector14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > { typedef typename vector14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 > struct deque< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na , na, na, na, na > : vector15< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 > { typedef typename vector15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15 > struct deque< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, na, na, na, na > : vector16< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15 > { typedef typename vector16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16 > struct deque< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, na, na, na > : vector17< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16 > { typedef typename vector17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17 > struct deque< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, na, na > : vector18< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17 > { typedef typename vector18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18 > struct deque< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18, na > : vector19< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18 > { typedef typename vector19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type; }; /// primary template (not a specialization!) template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct deque : vector20< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18, T19 > { typedef typename vector20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/dmc/divides.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/divides.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct divides_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< divides_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< divides_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct divides_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct divides_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct divides_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct divides_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) , typename N3 = na, typename N4 = na, typename N5 = na > struct divides : divides< divides< divides< divides< N1,N2 >, N3>, N4>, N5> { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , divides , ( N1, N2, N3, N4, N5 ) ) }; template< typename N1, typename N2, typename N3, typename N4 > struct divides< N1,N2,N3,N4,na > : divides< divides< divides< N1,N2 >, N3>, N4> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , divides , ( N1, N2, N3, N4, na ) ) }; template< typename N1, typename N2, typename N3 > struct divides< N1,N2,N3,na,na > : divides< divides< N1,N2 >, N3> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , divides , ( N1, N2, N3, na, na ) ) }; template< typename N1, typename N2 > struct divides< N1,N2,na,na,na > : divides_impl< typename divides_tag::type , typename divides_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , divides , ( N1, N2, na, na, na ) ) }; BOOST_MPL_AUX_NA_SPEC2(2, 5, divides) }} namespace boost { namespace mpl { template<> struct divides_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : integral_c< typename aux::largest_int< typename N1::value_type , typename N2::value_type >::type , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value / BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/dmc/equal_to.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/equal_to.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct equal_to_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< equal_to_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< equal_to_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct equal_to_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct equal_to_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct equal_to_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct equal_to_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct equal_to : equal_to_impl< typename equal_to_tag::type , typename equal_to_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, equal_to, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 2, equal_to) }} namespace boost { namespace mpl { template<> struct equal_to_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value == BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/dmc/fold_impl.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/aux_/fold_impl.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { /// forward declaration template< int N , typename First , typename Last , typename State , typename ForwardOp > struct fold_impl; template< typename First , typename Last , typename State , typename ForwardOp > struct fold_impl< 0,First,Last,State,ForwardOp > { typedef First iter0; typedef State state0; typedef state0 state; typedef iter0 iterator; }; template< typename First , typename Last , typename State , typename ForwardOp > struct fold_impl< 1,First,Last,State,ForwardOp > { typedef First iter0; typedef State state0; typedef typename apply2< ForwardOp, state0, typename deref::type >::type state1; typedef typename mpl::next::type iter1; typedef state1 state; typedef iter1 iterator; }; template< typename First , typename Last , typename State , typename ForwardOp > struct fold_impl< 2,First,Last,State,ForwardOp > { typedef First iter0; typedef State state0; typedef typename apply2< ForwardOp, state0, typename deref::type >::type state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp, state1, typename deref::type >::type state2; typedef typename mpl::next::type iter2; typedef state2 state; typedef iter2 iterator; }; template< typename First , typename Last , typename State , typename ForwardOp > struct fold_impl< 3,First,Last,State,ForwardOp > { typedef First iter0; typedef State state0; typedef typename apply2< ForwardOp, state0, typename deref::type >::type state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp, state1, typename deref::type >::type state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp, state2, typename deref::type >::type state3; typedef typename mpl::next::type iter3; typedef state3 state; typedef iter3 iterator; }; template< typename First , typename Last , typename State , typename ForwardOp > struct fold_impl< 4,First,Last,State,ForwardOp > { typedef First iter0; typedef State state0; typedef typename apply2< ForwardOp, state0, typename deref::type >::type state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp, state1, typename deref::type >::type state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp, state2, typename deref::type >::type state3; typedef typename mpl::next::type iter3; typedef typename apply2< ForwardOp, state3, typename deref::type >::type state4; typedef typename mpl::next::type iter4; typedef state4 state; typedef iter4 iterator; }; template< int N , typename First , typename Last , typename State , typename ForwardOp > struct fold_impl { typedef fold_impl< 4 , First , Last , State , ForwardOp > chunk_; typedef fold_impl< ( (N - 4) < 0 ? 0 : N - 4 ) , typename chunk_::iterator , Last , typename chunk_::state , ForwardOp > res_; typedef typename res_::state state; typedef typename res_::iterator iterator; }; template< typename First , typename Last , typename State , typename ForwardOp > struct fold_impl< -1,First,Last,State,ForwardOp > : fold_impl< -1 , typename mpl::next::type , Last , typename apply2::type>::type , ForwardOp > { }; template< typename Last , typename State , typename ForwardOp > struct fold_impl< -1,Last,Last,State,ForwardOp > { typedef State state; typedef Last iterator; }; }}} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/dmc/full_lambda.hpp ================================================ // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/aux_/full_lambda.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< bool C1 = false, bool C2 = false, bool C3 = false, bool C4 = false , bool C5 = false > struct lambda_or : true_ { }; template<> struct lambda_or< false,false,false,false,false > : false_ { }; } // namespace aux template< typename T , typename Tag > struct lambda { typedef false_ is_le; typedef T result_; typedef T type; }; template< typename T > struct is_lambda_expression : lambda::is_le { }; template< int N, typename Tag > struct lambda< arg, Tag > { typedef true_ is_le; typedef mpl::arg result_; // qualified for the sake of MIPSpro 7.41 typedef mpl::protect type; }; template< typename F , typename Tag > struct lambda< bind0 , Tag > { typedef false_ is_le; typedef bind0< F > result_; typedef result_ type; }; namespace aux { template< typename IsLE, typename Tag , template< typename P1 > class F , typename L1 > struct le_result1 { typedef F< typename L1::type > result_; typedef result_ type; }; template< typename Tag , template< typename P1 > class F , typename L1 > struct le_result1< true_,Tag,F,L1 > { typedef bind1< quote1< F,Tag > , typename L1::result_ > result_; typedef mpl::protect type; }; } // namespace aux template< template< typename P1 > class F , typename T1 , typename Tag > struct lambda< F , Tag > { typedef lambda< T1,Tag > l1; typedef typename l1::is_le is_le1; typedef typename aux::lambda_or< is_le1::value >::type is_le; typedef aux::le_result1< is_le, Tag, F, l1 > le_result_; typedef typename le_result_::result_ result_; typedef typename le_result_::type type; }; template< typename F, typename T1 , typename Tag > struct lambda< bind1< F,T1 > , Tag > { typedef false_ is_le; typedef bind1< F , T1 > result_; typedef result_ type; }; namespace aux { template< typename IsLE, typename Tag , template< typename P1, typename P2 > class F , typename L1, typename L2 > struct le_result2 { typedef F< typename L1::type, typename L2::type > result_; typedef result_ type; }; template< typename Tag , template< typename P1, typename P2 > class F , typename L1, typename L2 > struct le_result2< true_,Tag,F,L1,L2 > { typedef bind2< quote2< F,Tag > , typename L1::result_, typename L2::result_ > result_; typedef mpl::protect type; }; } // namespace aux template< template< typename P1, typename P2 > class F , typename T1, typename T2 , typename Tag > struct lambda< F< T1,T2 > , Tag > { typedef lambda< T1,Tag > l1; typedef lambda< T2,Tag > l2; typedef typename l1::is_le is_le1; typedef typename l2::is_le is_le2; typedef typename aux::lambda_or< is_le1::value, is_le2::value >::type is_le; typedef aux::le_result2< is_le, Tag, F, l1, l2 > le_result_; typedef typename le_result_::result_ result_; typedef typename le_result_::type type; }; template< typename F, typename T1, typename T2 , typename Tag > struct lambda< bind2< F,T1,T2 > , Tag > { typedef false_ is_le; typedef bind2< F , T1, T2 > result_; typedef result_ type; }; namespace aux { template< typename IsLE, typename Tag , template< typename P1, typename P2, typename P3 > class F , typename L1, typename L2, typename L3 > struct le_result3 { typedef F< typename L1::type, typename L2::type, typename L3::type > result_; typedef result_ type; }; template< typename Tag , template< typename P1, typename P2, typename P3 > class F , typename L1, typename L2, typename L3 > struct le_result3< true_,Tag,F,L1,L2,L3 > { typedef bind3< quote3< F,Tag > , typename L1::result_, typename L2::result_, typename L3::result_ > result_; typedef mpl::protect type; }; } // namespace aux template< template< typename P1, typename P2, typename P3 > class F , typename T1, typename T2, typename T3 , typename Tag > struct lambda< F< T1,T2,T3 > , Tag > { typedef lambda< T1,Tag > l1; typedef lambda< T2,Tag > l2; typedef lambda< T3,Tag > l3; typedef typename l1::is_le is_le1; typedef typename l2::is_le is_le2; typedef typename l3::is_le is_le3; typedef typename aux::lambda_or< is_le1::value, is_le2::value, is_le3::value >::type is_le; typedef aux::le_result3< is_le, Tag, F, l1, l2, l3 > le_result_; typedef typename le_result_::result_ result_; typedef typename le_result_::type type; }; template< typename F, typename T1, typename T2, typename T3 , typename Tag > struct lambda< bind3< F,T1,T2,T3 > , Tag > { typedef false_ is_le; typedef bind3< F , T1, T2, T3 > result_; typedef result_ type; }; namespace aux { template< typename IsLE, typename Tag , template< typename P1, typename P2, typename P3, typename P4 > class F , typename L1, typename L2, typename L3, typename L4 > struct le_result4 { typedef F< typename L1::type, typename L2::type, typename L3::type , typename L4::type > result_; typedef result_ type; }; template< typename Tag , template< typename P1, typename P2, typename P3, typename P4 > class F , typename L1, typename L2, typename L3, typename L4 > struct le_result4< true_,Tag,F,L1,L2,L3,L4 > { typedef bind4< quote4< F,Tag > , typename L1::result_, typename L2::result_, typename L3::result_ , typename L4::result_ > result_; typedef mpl::protect type; }; } // namespace aux template< template< typename P1, typename P2, typename P3, typename P4 > class F , typename T1, typename T2, typename T3, typename T4 , typename Tag > struct lambda< F< T1,T2,T3,T4 > , Tag > { typedef lambda< T1,Tag > l1; typedef lambda< T2,Tag > l2; typedef lambda< T3,Tag > l3; typedef lambda< T4,Tag > l4; typedef typename l1::is_le is_le1; typedef typename l2::is_le is_le2; typedef typename l3::is_le is_le3; typedef typename l4::is_le is_le4; typedef typename aux::lambda_or< is_le1::value, is_le2::value, is_le3::value, is_le4::value >::type is_le; typedef aux::le_result4< is_le, Tag, F, l1, l2, l3, l4 > le_result_; typedef typename le_result_::result_ result_; typedef typename le_result_::type type; }; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename Tag > struct lambda< bind4< F,T1,T2,T3,T4 > , Tag > { typedef false_ is_le; typedef bind4< F , T1, T2, T3, T4 > result_; typedef result_ type; }; namespace aux { template< typename IsLE, typename Tag , template< typename P1, typename P2, typename P3, typename P4, typename P5 > class F , typename L1, typename L2, typename L3, typename L4, typename L5 > struct le_result5 { typedef F< typename L1::type, typename L2::type, typename L3::type , typename L4::type, typename L5::type > result_; typedef result_ type; }; template< typename Tag , template< typename P1, typename P2, typename P3, typename P4, typename P5 > class F , typename L1, typename L2, typename L3, typename L4, typename L5 > struct le_result5< true_,Tag,F,L1,L2,L3,L4,L5 > { typedef bind5< quote5< F,Tag > , typename L1::result_, typename L2::result_, typename L3::result_ , typename L4::result_, typename L5::result_ > result_; typedef mpl::protect type; }; } // namespace aux template< template< typename P1, typename P2, typename P3, typename P4 , typename P5 > class F , typename T1, typename T2, typename T3, typename T4, typename T5 , typename Tag > struct lambda< F< T1,T2,T3,T4,T5 > , Tag > { typedef lambda< T1,Tag > l1; typedef lambda< T2,Tag > l2; typedef lambda< T3,Tag > l3; typedef lambda< T4,Tag > l4; typedef lambda< T5,Tag > l5; typedef typename l1::is_le is_le1; typedef typename l2::is_le is_le2; typedef typename l3::is_le is_le3; typedef typename l4::is_le is_le4; typedef typename l5::is_le is_le5; typedef typename aux::lambda_or< is_le1::value, is_le2::value, is_le3::value, is_le4::value , is_le5::value >::type is_le; typedef aux::le_result5< is_le, Tag, F, l1, l2, l3, l4, l5 > le_result_; typedef typename le_result_::result_ result_; typedef typename le_result_::type type; }; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 , typename Tag > struct lambda< bind5< F,T1,T2,T3,T4,T5 > , Tag > { typedef false_ is_le; typedef bind5< F , T1, T2, T3, T4, T5 > result_; typedef result_ type; }; /// special case for 'protect' template< typename T, typename Tag > struct lambda< mpl::protect, Tag > { typedef false_ is_le; typedef mpl::protect result_; typedef result_ type; }; /// specializations for the main 'bind' form template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 , typename Tag > struct lambda< bind< F,T1,T2,T3,T4,T5 > , Tag > { typedef false_ is_le; typedef bind< F,T1,T2,T3,T4,T5 > result_; typedef result_ type; }; BOOST_MPL_AUX_NA_SPEC(2, lambda) }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/dmc/greater.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/greater.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct greater_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< greater_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< greater_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct greater_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct greater_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct greater_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct greater_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct greater : greater_impl< typename greater_tag::type , typename greater_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, greater, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 2, greater) }} namespace boost { namespace mpl { template<> struct greater_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value > BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/dmc/greater_equal.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/greater_equal.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct greater_equal_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< greater_equal_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< greater_equal_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct greater_equal_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct greater_equal_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct greater_equal_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct greater_equal_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct greater_equal : greater_equal_impl< typename greater_equal_tag::type , typename greater_equal_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, greater_equal, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 2, greater_equal) }} namespace boost { namespace mpl { template<> struct greater_equal_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value >= BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/dmc/inherit.hpp ================================================ // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/inherit.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename BOOST_MPL_AUX_NA_PARAM(T1) , typename BOOST_MPL_AUX_NA_PARAM(T2) > struct inherit2 : T1, T2 { typedef inherit2 type; BOOST_MPL_AUX_LAMBDA_SUPPORT(2, inherit2, (T1, T2)) }; template< typename T1 > struct inherit2< T1,empty_base > { typedef T1 type; BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(2, inherit2, (T1, empty_base)) }; template< typename T2 > struct inherit2< empty_base,T2 > { typedef T2 type; BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(2, inherit2, (empty_base, T2)) }; template<> struct inherit2< empty_base,empty_base > { typedef empty_base type; BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(2, inherit2, (empty_base, empty_base)) }; BOOST_MPL_AUX_NA_SPEC(2, inherit2) template< typename T1 = na, typename T2 = na, typename T3 = na > struct inherit3 : inherit2< typename inherit2< T1, T2 >::type , T3 > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 3 , inherit3 , ( T1, T2, T3) ) }; BOOST_MPL_AUX_NA_SPEC(3, inherit3) template< typename T1 = na, typename T2 = na, typename T3 = na, typename T4 = na > struct inherit4 : inherit2< typename inherit3< T1, T2, T3 >::type , T4 > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 4 , inherit4 , ( T1, T2, T3, T4) ) }; BOOST_MPL_AUX_NA_SPEC(4, inherit4) template< typename T1 = na, typename T2 = na, typename T3 = na, typename T4 = na , typename T5 = na > struct inherit5 : inherit2< typename inherit4< T1, T2, T3, T4 >::type , T5 > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , inherit5 , ( T1, T2, T3, T4, T5) ) }; BOOST_MPL_AUX_NA_SPEC(5, inherit5) /// primary template template< typename T1 = empty_base, typename T2 = empty_base , typename T3 = empty_base, typename T4 = empty_base , typename T5 = empty_base > struct inherit : inherit5< T1,T2,T3,T4,T5 > { }; template<> struct inherit< na,na,na,na,na > { template< typename T1 = empty_base, typename T2 = empty_base , typename T3 = empty_base, typename T4 = empty_base , typename T5 = empty_base > struct apply : inherit< T1,T2,T3,T4,T5 > { }; }; BOOST_MPL_AUX_NA_SPEC_LAMBDA(5, inherit) BOOST_MPL_AUX_NA_SPEC_ARITY(5, inherit) BOOST_MPL_AUX_NA_SPEC_TEMPLATE_ARITY(5, 5, inherit) }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/dmc/iter_fold_if_impl.hpp ================================================ // Copyright Aleksey Gurtovoy 2001-2004 // Copyright David Abrahams 2001-2002 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/aux_/iter_fold_if_impl.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< typename Iterator, typename State > struct iter_fold_if_null_step { typedef State state; typedef Iterator iterator; }; template< bool > struct iter_fold_if_step_impl { template< typename Iterator , typename State , typename StateOp , typename IteratorOp > struct result_ { typedef typename apply2< StateOp,State,Iterator >::type state; typedef typename IteratorOp::type iterator; }; }; template<> struct iter_fold_if_step_impl { template< typename Iterator , typename State , typename StateOp , typename IteratorOp > struct result_ { typedef State state; typedef Iterator iterator; }; }; template< typename Iterator , typename State , typename ForwardOp , typename Predicate > struct iter_fold_if_forward_step { typedef typename apply2< Predicate,State,Iterator >::type not_last; typedef typename iter_fold_if_step_impl< BOOST_MPL_AUX_MSVC_VALUE_WKND(not_last)::value >::template result_< Iterator,State,ForwardOp, mpl::next > impl_; typedef typename impl_::state state; typedef typename impl_::iterator iterator; }; template< typename Iterator , typename State , typename BackwardOp , typename Predicate > struct iter_fold_if_backward_step { typedef typename apply2< Predicate,State,Iterator >::type not_last; typedef typename iter_fold_if_step_impl< BOOST_MPL_AUX_MSVC_VALUE_WKND(not_last)::value >::template result_< Iterator,State,BackwardOp, identity > impl_; typedef typename impl_::state state; typedef typename impl_::iterator iterator; }; template< typename Iterator , typename State , typename ForwardOp , typename ForwardPredicate , typename BackwardOp , typename BackwardPredicate > struct iter_fold_if_impl { private: typedef iter_fold_if_null_step< Iterator,State > forward_step0; typedef iter_fold_if_forward_step< typename forward_step0::iterator, typename forward_step0::state, ForwardOp, ForwardPredicate > forward_step1; typedef iter_fold_if_forward_step< typename forward_step1::iterator, typename forward_step1::state, ForwardOp, ForwardPredicate > forward_step2; typedef iter_fold_if_forward_step< typename forward_step2::iterator, typename forward_step2::state, ForwardOp, ForwardPredicate > forward_step3; typedef iter_fold_if_forward_step< typename forward_step3::iterator, typename forward_step3::state, ForwardOp, ForwardPredicate > forward_step4; typedef typename if_< typename forward_step4::not_last , iter_fold_if_impl< typename forward_step4::iterator , typename forward_step4::state , ForwardOp , ForwardPredicate , BackwardOp , BackwardPredicate > , iter_fold_if_null_step< typename forward_step4::iterator , typename forward_step4::state > >::type backward_step4; typedef iter_fold_if_backward_step< typename forward_step3::iterator, typename backward_step4::state, BackwardOp, BackwardPredicate > backward_step3; typedef iter_fold_if_backward_step< typename forward_step2::iterator, typename backward_step3::state, BackwardOp, BackwardPredicate > backward_step2; typedef iter_fold_if_backward_step< typename forward_step1::iterator, typename backward_step2::state, BackwardOp, BackwardPredicate > backward_step1; typedef iter_fold_if_backward_step< typename forward_step0::iterator, typename backward_step1::state, BackwardOp, BackwardPredicate > backward_step0; public: typedef typename backward_step0::state state; typedef typename backward_step4::iterator iterator; }; }}} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/dmc/iter_fold_impl.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/aux_/iter_fold_impl.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { /// forward declaration template< int N , typename First , typename Last , typename State , typename ForwardOp > struct iter_fold_impl; template< typename First , typename Last , typename State , typename ForwardOp > struct iter_fold_impl< 0,First,Last,State,ForwardOp > { typedef First iter0; typedef State state0; typedef state0 state; typedef iter0 iterator; }; template< typename First , typename Last , typename State , typename ForwardOp > struct iter_fold_impl< 1,First,Last,State,ForwardOp > { typedef First iter0; typedef State state0; typedef typename apply2< ForwardOp,state0,iter0 >::type state1; typedef typename mpl::next::type iter1; typedef state1 state; typedef iter1 iterator; }; template< typename First , typename Last , typename State , typename ForwardOp > struct iter_fold_impl< 2,First,Last,State,ForwardOp > { typedef First iter0; typedef State state0; typedef typename apply2< ForwardOp,state0,iter0 >::type state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp,state1,iter1 >::type state2; typedef typename mpl::next::type iter2; typedef state2 state; typedef iter2 iterator; }; template< typename First , typename Last , typename State , typename ForwardOp > struct iter_fold_impl< 3,First,Last,State,ForwardOp > { typedef First iter0; typedef State state0; typedef typename apply2< ForwardOp,state0,iter0 >::type state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp,state1,iter1 >::type state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp,state2,iter2 >::type state3; typedef typename mpl::next::type iter3; typedef state3 state; typedef iter3 iterator; }; template< typename First , typename Last , typename State , typename ForwardOp > struct iter_fold_impl< 4,First,Last,State,ForwardOp > { typedef First iter0; typedef State state0; typedef typename apply2< ForwardOp,state0,iter0 >::type state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp,state1,iter1 >::type state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp,state2,iter2 >::type state3; typedef typename mpl::next::type iter3; typedef typename apply2< ForwardOp,state3,iter3 >::type state4; typedef typename mpl::next::type iter4; typedef state4 state; typedef iter4 iterator; }; template< int N , typename First , typename Last , typename State , typename ForwardOp > struct iter_fold_impl { typedef iter_fold_impl< 4 , First , Last , State , ForwardOp > chunk_; typedef iter_fold_impl< ( (N - 4) < 0 ? 0 : N - 4 ) , typename chunk_::iterator , Last , typename chunk_::state , ForwardOp > res_; typedef typename res_::state state; typedef typename res_::iterator iterator; }; template< typename First , typename Last , typename State , typename ForwardOp > struct iter_fold_impl< -1,First,Last,State,ForwardOp > : iter_fold_impl< -1 , typename mpl::next::type , Last , typename apply2< ForwardOp,State,First >::type , ForwardOp > { }; template< typename Last , typename State , typename ForwardOp > struct iter_fold_impl< -1,Last,Last,State,ForwardOp > { typedef State state; typedef Last iterator; }; }}} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/dmc/lambda_no_ctps.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/aux_/lambda_no_ctps.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< bool C1 = false, bool C2 = false, bool C3 = false, bool C4 = false , bool C5 = false > struct lambda_or : true_ { }; template<> struct lambda_or< false,false,false,false,false > : false_ { }; template< typename Arity > struct lambda_impl { template< typename T, typename Tag, typename Protect > struct result_ { typedef T type; typedef is_placeholder is_le; }; }; template<> struct lambda_impl< int_<1> > { template< typename F, typename Tag, typename Protect > struct result_ { typedef lambda< typename F::arg1, Tag, false_ > l1; typedef typename l1::is_le is_le1; typedef aux::lambda_or< BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value > is_le; typedef bind1< typename F::rebind , typename l1::type > bind_; typedef typename if_< is_le , if_< Protect, mpl::protect, bind_ > , identity >::type type_; typedef typename type_::type type; }; }; template<> struct lambda_impl< int_<2> > { template< typename F, typename Tag, typename Protect > struct result_ { typedef lambda< typename F::arg1, Tag, false_ > l1; typedef lambda< typename F::arg2, Tag, false_ > l2; typedef typename l1::is_le is_le1; typedef typename l2::is_le is_le2; typedef aux::lambda_or< BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value > is_le; typedef bind2< typename F::rebind , typename l1::type, typename l2::type > bind_; typedef typename if_< is_le , if_< Protect, mpl::protect, bind_ > , identity >::type type_; typedef typename type_::type type; }; }; template<> struct lambda_impl< int_<3> > { template< typename F, typename Tag, typename Protect > struct result_ { typedef lambda< typename F::arg1, Tag, false_ > l1; typedef lambda< typename F::arg2, Tag, false_ > l2; typedef lambda< typename F::arg3, Tag, false_ > l3; typedef typename l1::is_le is_le1; typedef typename l2::is_le is_le2; typedef typename l3::is_le is_le3; typedef aux::lambda_or< BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le3)::value > is_le; typedef bind3< typename F::rebind , typename l1::type, typename l2::type, typename l3::type > bind_; typedef typename if_< is_le , if_< Protect, mpl::protect, bind_ > , identity >::type type_; typedef typename type_::type type; }; }; template<> struct lambda_impl< int_<4> > { template< typename F, typename Tag, typename Protect > struct result_ { typedef lambda< typename F::arg1, Tag, false_ > l1; typedef lambda< typename F::arg2, Tag, false_ > l2; typedef lambda< typename F::arg3, Tag, false_ > l3; typedef lambda< typename F::arg4, Tag, false_ > l4; typedef typename l1::is_le is_le1; typedef typename l2::is_le is_le2; typedef typename l3::is_le is_le3; typedef typename l4::is_le is_le4; typedef aux::lambda_or< BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le3)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le4)::value > is_le; typedef bind4< typename F::rebind , typename l1::type, typename l2::type, typename l3::type , typename l4::type > bind_; typedef typename if_< is_le , if_< Protect, mpl::protect, bind_ > , identity >::type type_; typedef typename type_::type type; }; }; template<> struct lambda_impl< int_<5> > { template< typename F, typename Tag, typename Protect > struct result_ { typedef lambda< typename F::arg1, Tag, false_ > l1; typedef lambda< typename F::arg2, Tag, false_ > l2; typedef lambda< typename F::arg3, Tag, false_ > l3; typedef lambda< typename F::arg4, Tag, false_ > l4; typedef lambda< typename F::arg5, Tag, false_ > l5; typedef typename l1::is_le is_le1; typedef typename l2::is_le is_le2; typedef typename l3::is_le is_le3; typedef typename l4::is_le is_le4; typedef typename l5::is_le is_le5; typedef aux::lambda_or< BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le3)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le4)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le5)::value > is_le; typedef bind5< typename F::rebind , typename l1::type, typename l2::type, typename l3::type , typename l4::type, typename l5::type > bind_; typedef typename if_< is_le , if_< Protect, mpl::protect, bind_ > , identity >::type type_; typedef typename type_::type type; }; }; } // namespace aux template< typename T , typename Tag , typename Protect > struct lambda { /// Metafunction forwarding confuses MSVC 6.x typedef typename aux::template_arity::type arity_; typedef typename aux::lambda_impl ::template result_< T,Tag,Protect > l_; typedef typename l_::type type; typedef typename l_::is_le is_le; BOOST_MPL_AUX_LAMBDA_SUPPORT(3, lambda, (T, Tag, Protect)) }; BOOST_MPL_AUX_NA_SPEC2(1, 3, lambda) template< typename T > struct is_lambda_expression : lambda::is_le { }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/dmc/less.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/less.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct less_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< less_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< less_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct less_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct less_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct less_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct less_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct less : less_impl< typename less_tag::type , typename less_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, less, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 2, less) }} namespace boost { namespace mpl { template<> struct less_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N2)::value > BOOST_MPL_AUX_VALUE_WKND(N1)::value ) > { }; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/dmc/less_equal.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/less_equal.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct less_equal_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< less_equal_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< less_equal_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct less_equal_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct less_equal_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct less_equal_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct less_equal_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct less_equal : less_equal_impl< typename less_equal_tag::type , typename less_equal_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, less_equal, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 2, less_equal) }} namespace boost { namespace mpl { template<> struct less_equal_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value <= BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/dmc/list.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/list.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na , typename T12 = na, typename T13 = na, typename T14 = na , typename T15 = na, typename T16 = na, typename T17 = na , typename T18 = na, typename T19 = na > struct list; template< > struct list< na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : list0< > { typedef list0< >::type type; }; template< typename T0 > struct list< T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : list1 { typedef typename list1::type type; }; template< typename T0, typename T1 > struct list< T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : list2< T0,T1 > { typedef typename list2< T0,T1 >::type type; }; template< typename T0, typename T1, typename T2 > struct list< T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : list3< T0,T1,T2 > { typedef typename list3< T0,T1,T2 >::type type; }; template< typename T0, typename T1, typename T2, typename T3 > struct list< T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : list4< T0,T1,T2,T3 > { typedef typename list4< T0,T1,T2,T3 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 > struct list< T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : list5< T0,T1,T2,T3,T4 > { typedef typename list5< T0,T1,T2,T3,T4 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct list< T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : list6< T0,T1,T2,T3,T4,T5 > { typedef typename list6< T0,T1,T2,T3,T4,T5 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6 > struct list< T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na , na, na, na > : list7< T0,T1,T2,T3,T4,T5,T6 > { typedef typename list7< T0,T1,T2,T3,T4,T5,T6 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7 > struct list< T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na , na, na, na > : list8< T0,T1,T2,T3,T4,T5,T6,T7 > { typedef typename list8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8 > struct list< T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na , na, na, na > : list9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > { typedef typename list9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 > struct list< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na , na, na, na > : list10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > { typedef typename list10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10 > struct list< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na , na, na, na > : list11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > { typedef typename list11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11 > struct list< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na , na, na, na, na > : list12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > { typedef typename list12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12 > struct list< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na , na, na, na, na > : list13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > { typedef typename list13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13 > struct list< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na , na, na, na, na > : list14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > { typedef typename list14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 > struct list< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na , na, na, na, na > : list15< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 > { typedef typename list15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15 > struct list< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, na, na, na, na > : list16< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15 > { typedef typename list16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16 > struct list< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, na, na, na > : list17< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16 > { typedef typename list17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17 > struct list< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, na, na > : list18< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17 > { typedef typename list18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18 > struct list< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18, na > : list19< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18 > { typedef typename list19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type; }; /// primary template (not a specialization!) template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct list : list20< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18, T19 > { typedef typename list20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/dmc/list_c.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/list_c.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename T, long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX , long C3 = LONG_MAX, long C4 = LONG_MAX, long C5 = LONG_MAX , long C6 = LONG_MAX, long C7 = LONG_MAX, long C8 = LONG_MAX , long C9 = LONG_MAX, long C10 = LONG_MAX, long C11 = LONG_MAX , long C12 = LONG_MAX, long C13 = LONG_MAX, long C14 = LONG_MAX , long C15 = LONG_MAX, long C16 = LONG_MAX, long C17 = LONG_MAX , long C18 = LONG_MAX, long C19 = LONG_MAX > struct list_c; template< typename T > struct list_c< T, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list0_c { typedef typename list0_c::type type; }; template< typename T, long C0 > struct list_c< T, C0, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list1_c< T,C0 > { typedef typename list1_c< T,C0 >::type type; }; template< typename T, long C0, long C1 > struct list_c< T, C0, C1, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list2_c< T,C0,C1 > { typedef typename list2_c< T,C0,C1 >::type type; }; template< typename T, long C0, long C1, long C2 > struct list_c< T, C0, C1, C2, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list3_c< T,C0,C1,C2 > { typedef typename list3_c< T,C0,C1,C2 >::type type; }; template< typename T, long C0, long C1, long C2, long C3 > struct list_c< T, C0, C1, C2, C3, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list4_c< T,C0,C1,C2,C3 > { typedef typename list4_c< T,C0,C1,C2,C3 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4 > struct list_c< T, C0, C1, C2, C3, C4, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list5_c< T,C0,C1,C2,C3,C4 > { typedef typename list5_c< T,C0,C1,C2,C3,C4 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 > struct list_c< T, C0, C1, C2, C3, C4, C5, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX > : list6_c< T,C0,C1,C2,C3,C4,C5 > { typedef typename list6_c< T,C0,C1,C2,C3,C4,C5 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX > : list7_c< T,C0,C1,C2,C3,C4,C5,C6 > { typedef typename list7_c< T,C0,C1,C2,C3,C4,C5,C6 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, C7, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX > : list8_c< T,C0,C1,C2,C3,C4,C5,C6,C7 > { typedef typename list8_c< T,C0,C1,C2,C3,C4,C5,C6,C7 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX > : list9_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8 > { typedef typename list9_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX > : list10_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 > { typedef typename list10_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list11_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 > { typedef typename list11_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list12_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 > { typedef typename list12_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list13_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 > { typedef typename list13_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list14_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 > { typedef typename list14_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list15_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 > { typedef typename list15_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list16_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15 > { typedef typename list16_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, LONG_MAX, LONG_MAX, LONG_MAX > : list17_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16 > { typedef typename list17_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, C17, LONG_MAX, LONG_MAX > : list18_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, C17 > { typedef typename list18_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, C17, C18, LONG_MAX > : list19_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, C17, C18 > { typedef typename list19_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18 >::type type; }; /// primary template (not a specialization!) template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct list_c : list20_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, C17, C18, C19 > { typedef typename list20_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19 >::type type; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/dmc/map.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/map.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na , typename T12 = na, typename T13 = na, typename T14 = na , typename T15 = na, typename T16 = na, typename T17 = na , typename T18 = na, typename T19 = na > struct map; template< > struct map< na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : map0< > { typedef map0< >::type type; }; template< typename T0 > struct map< T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : map1 { typedef typename map1::type type; }; template< typename T0, typename T1 > struct map< T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : map2< T0,T1 > { typedef typename map2< T0,T1 >::type type; }; template< typename T0, typename T1, typename T2 > struct map< T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : map3< T0,T1,T2 > { typedef typename map3< T0,T1,T2 >::type type; }; template< typename T0, typename T1, typename T2, typename T3 > struct map< T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : map4< T0,T1,T2,T3 > { typedef typename map4< T0,T1,T2,T3 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 > struct map< T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : map5< T0,T1,T2,T3,T4 > { typedef typename map5< T0,T1,T2,T3,T4 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct map< T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : map6< T0,T1,T2,T3,T4,T5 > { typedef typename map6< T0,T1,T2,T3,T4,T5 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6 > struct map< T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na , na, na, na > : map7< T0,T1,T2,T3,T4,T5,T6 > { typedef typename map7< T0,T1,T2,T3,T4,T5,T6 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7 > struct map< T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na , na, na, na > : map8< T0,T1,T2,T3,T4,T5,T6,T7 > { typedef typename map8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8 > struct map< T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na , na, na, na > : map9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > { typedef typename map9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 > struct map< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na , na, na, na > : map10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > { typedef typename map10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10 > struct map< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na , na, na, na > : map11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > { typedef typename map11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11 > struct map< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na , na, na, na, na > : map12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > { typedef typename map12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12 > struct map< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na , na, na, na, na > : map13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > { typedef typename map13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13 > struct map< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na , na, na, na, na > : map14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > { typedef typename map14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 > struct map< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na , na, na, na, na > : map15< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 > { typedef typename map15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15 > struct map< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, na, na, na, na > : map16< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15 > { typedef typename map16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16 > struct map< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, na, na, na > : map17< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16 > { typedef typename map17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17 > struct map< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, na, na > : map18< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17 > { typedef typename map18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18 > struct map< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18, na > : map19< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18 > { typedef typename map19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type; }; /// primary template (not a specialization!) template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct map : map20< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18, T19 > { typedef typename map20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/dmc/minus.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/minus.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct minus_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< minus_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< minus_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct minus_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct minus_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct minus_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct minus_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) , typename N3 = na, typename N4 = na, typename N5 = na > struct minus : minus< minus< minus< minus< N1,N2 >, N3>, N4>, N5> { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , minus , ( N1, N2, N3, N4, N5 ) ) }; template< typename N1, typename N2, typename N3, typename N4 > struct minus< N1,N2,N3,N4,na > : minus< minus< minus< N1,N2 >, N3>, N4> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , minus , ( N1, N2, N3, N4, na ) ) }; template< typename N1, typename N2, typename N3 > struct minus< N1,N2,N3,na,na > : minus< minus< N1,N2 >, N3> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , minus , ( N1, N2, N3, na, na ) ) }; template< typename N1, typename N2 > struct minus< N1,N2,na,na,na > : minus_impl< typename minus_tag::type , typename minus_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , minus , ( N1, N2, na, na, na ) ) }; BOOST_MPL_AUX_NA_SPEC2(2, 5, minus) }} namespace boost { namespace mpl { template<> struct minus_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : integral_c< typename aux::largest_int< typename N1::value_type , typename N2::value_type >::type , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value - BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/dmc/modulus.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/modulus.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct modulus_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< modulus_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< modulus_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct modulus_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct modulus_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct modulus_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct modulus_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct modulus : modulus_impl< typename modulus_tag::type , typename modulus_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, modulus, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 2, modulus) }} namespace boost { namespace mpl { template<> struct modulus_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : integral_c< typename aux::largest_int< typename N1::value_type , typename N2::value_type >::type , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value % BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/dmc/not_equal_to.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/not_equal_to.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct not_equal_to_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< not_equal_to_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< not_equal_to_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct not_equal_to_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct not_equal_to_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct not_equal_to_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct not_equal_to_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct not_equal_to : not_equal_to_impl< typename not_equal_to_tag::type , typename not_equal_to_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, not_equal_to, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 2, not_equal_to) }} namespace boost { namespace mpl { template<> struct not_equal_to_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value != BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/dmc/or.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/or.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< bool C_, typename T1, typename T2, typename T3, typename T4 > struct or_impl : true_ { }; template< typename T1, typename T2, typename T3, typename T4 > struct or_impl< false,T1,T2,T3,T4 > : or_impl< BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value , T2, T3, T4 , false_ > { }; template<> struct or_impl< false , false_, false_, false_, false_ > : false_ { }; } // namespace aux template< typename BOOST_MPL_AUX_NA_PARAM(T1) , typename BOOST_MPL_AUX_NA_PARAM(T2) , typename T3 = false_, typename T4 = false_, typename T5 = false_ > struct or_ : aux::or_impl< BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value , T2, T3, T4, T5 > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , or_ , ( T1, T2, T3, T4, T5) ) }; BOOST_MPL_AUX_NA_SPEC2( 2 , 5 , or_ ) }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/dmc/placeholders.hpp ================================================ // Copyright Aleksey Gurtovoy 2001-2004 // Copyright Peter Dimov 2001-2003 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/placeholders.hpp" header // -- DO NOT modify by hand! BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg< -1 > _; BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE namespace boost { namespace mpl { BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_) namespace placeholders { using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_; } }} /// agurt, 17/mar/02: one more placeholder for the last 'apply#' /// specialization BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg<1> _1; BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE namespace boost { namespace mpl { BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_1) namespace placeholders { using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_1; } }} BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg<2> _2; BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE namespace boost { namespace mpl { BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_2) namespace placeholders { using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_2; } }} BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg<3> _3; BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE namespace boost { namespace mpl { BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_3) namespace placeholders { using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_3; } }} BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg<4> _4; BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE namespace boost { namespace mpl { BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_4) namespace placeholders { using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_4; } }} BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg<5> _5; BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE namespace boost { namespace mpl { BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_5) namespace placeholders { using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_5; } }} BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg<6> _6; BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE namespace boost { namespace mpl { BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_6) namespace placeholders { using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_6; } }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/dmc/plus.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/plus.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct plus_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< plus_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< plus_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct plus_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct plus_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct plus_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct plus_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) , typename N3 = na, typename N4 = na, typename N5 = na > struct plus : plus< plus< plus< plus< N1,N2 >, N3>, N4>, N5> { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , plus , ( N1, N2, N3, N4, N5 ) ) }; template< typename N1, typename N2, typename N3, typename N4 > struct plus< N1,N2,N3,N4,na > : plus< plus< plus< N1,N2 >, N3>, N4> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , plus , ( N1, N2, N3, N4, na ) ) }; template< typename N1, typename N2, typename N3 > struct plus< N1,N2,N3,na,na > : plus< plus< N1,N2 >, N3> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , plus , ( N1, N2, N3, na, na ) ) }; template< typename N1, typename N2 > struct plus< N1,N2,na,na,na > : plus_impl< typename plus_tag::type , typename plus_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , plus , ( N1, N2, na, na, na ) ) }; BOOST_MPL_AUX_NA_SPEC2(2, 5, plus) }} namespace boost { namespace mpl { template<> struct plus_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : integral_c< typename aux::largest_int< typename N1::value_type , typename N2::value_type >::type , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/dmc/quote.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/quote.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename T, bool has_type_ > struct quote_impl : T { }; template< typename T > struct quote_impl< T,false > { typedef T type; }; template< template< typename P1 > class F , typename Tag = void_ > struct quote1 { template< typename U1 > struct apply : quote_impl< F , aux::has_type< F >::value > { }; }; template< template< typename P1, typename P2 > class F , typename Tag = void_ > struct quote2 { template< typename U1, typename U2 > struct apply : quote_impl< F< U1,U2 > , aux::has_type< F< U1,U2 > >::value > { }; }; template< template< typename P1, typename P2, typename P3 > class F , typename Tag = void_ > struct quote3 { template< typename U1, typename U2, typename U3 > struct apply : quote_impl< F< U1,U2,U3 > , aux::has_type< F< U1,U2,U3 > >::value > { }; }; template< template< typename P1, typename P2, typename P3, typename P4 > class F , typename Tag = void_ > struct quote4 { template< typename U1, typename U2, typename U3, typename U4 > struct apply : quote_impl< F< U1,U2,U3,U4 > , aux::has_type< F< U1,U2,U3,U4 > >::value > { }; }; template< template< typename P1, typename P2, typename P3, typename P4 , typename P5 > class F , typename Tag = void_ > struct quote5 { template< typename U1, typename U2, typename U3, typename U4 , typename U5 > struct apply : quote_impl< F< U1,U2,U3,U4,U5 > , aux::has_type< F< U1,U2,U3,U4,U5 > >::value > { }; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/dmc/reverse_fold_impl.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/aux_/reverse_fold_impl.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { /// forward declaration template< long N , typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_fold_impl; template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_fold_impl< 0,First,Last,State,BackwardOp,ForwardOp > { typedef First iter0; typedef State fwd_state0; typedef fwd_state0 bkwd_state0; typedef bkwd_state0 state; typedef iter0 iterator; }; template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_fold_impl< 1,First,Last,State,BackwardOp,ForwardOp > { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; typedef typename mpl::next::type iter1; typedef fwd_state1 bkwd_state1; typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; typedef bkwd_state0 state; typedef iter1 iterator; }; template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_fold_impl< 2,First,Last,State,BackwardOp,ForwardOp > { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp, fwd_state1, typename deref::type >::type fwd_state2; typedef typename mpl::next::type iter2; typedef fwd_state2 bkwd_state2; typedef typename apply2< BackwardOp, bkwd_state2, typename deref::type >::type bkwd_state1; typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; typedef bkwd_state0 state; typedef iter2 iterator; }; template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_fold_impl< 3,First,Last,State,BackwardOp,ForwardOp > { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp, fwd_state1, typename deref::type >::type fwd_state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp, fwd_state2, typename deref::type >::type fwd_state3; typedef typename mpl::next::type iter3; typedef fwd_state3 bkwd_state3; typedef typename apply2< BackwardOp, bkwd_state3, typename deref::type >::type bkwd_state2; typedef typename apply2< BackwardOp, bkwd_state2, typename deref::type >::type bkwd_state1; typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; typedef bkwd_state0 state; typedef iter3 iterator; }; template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_fold_impl< 4,First,Last,State,BackwardOp,ForwardOp > { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp, fwd_state1, typename deref::type >::type fwd_state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp, fwd_state2, typename deref::type >::type fwd_state3; typedef typename mpl::next::type iter3; typedef typename apply2< ForwardOp, fwd_state3, typename deref::type >::type fwd_state4; typedef typename mpl::next::type iter4; typedef fwd_state4 bkwd_state4; typedef typename apply2< BackwardOp, bkwd_state4, typename deref::type >::type bkwd_state3; typedef typename apply2< BackwardOp, bkwd_state3, typename deref::type >::type bkwd_state2; typedef typename apply2< BackwardOp, bkwd_state2, typename deref::type >::type bkwd_state1; typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; typedef bkwd_state0 state; typedef iter4 iterator; }; template< long N , typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_fold_impl { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp, fwd_state1, typename deref::type >::type fwd_state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp, fwd_state2, typename deref::type >::type fwd_state3; typedef typename mpl::next::type iter3; typedef typename apply2< ForwardOp, fwd_state3, typename deref::type >::type fwd_state4; typedef typename mpl::next::type iter4; typedef reverse_fold_impl< ( (N - 4) < 0 ? 0 : N - 4 ) , iter4 , Last , fwd_state4 , BackwardOp , ForwardOp > nested_chunk; typedef typename nested_chunk::state bkwd_state4; typedef typename apply2< BackwardOp, bkwd_state4, typename deref::type >::type bkwd_state3; typedef typename apply2< BackwardOp, bkwd_state3, typename deref::type >::type bkwd_state2; typedef typename apply2< BackwardOp, bkwd_state2, typename deref::type >::type bkwd_state1; typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; typedef bkwd_state0 state; typedef typename nested_chunk::iterator iterator; }; template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_fold_impl< -1,First,Last,State,BackwardOp,ForwardOp > { typedef reverse_fold_impl< -1 , typename mpl::next::type , Last , typename apply2::type>::type , BackwardOp , ForwardOp > nested_step; typedef typename apply2< BackwardOp , typename nested_step::state , typename deref::type >::type state; typedef typename nested_step::iterator iterator; }; template< typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_fold_impl< -1,Last,Last,State,BackwardOp,ForwardOp > { typedef State state; typedef Last iterator; }; }}} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/dmc/reverse_iter_fold_impl.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/aux_/reverse_iter_fold_impl.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { /// forward declaration template< long N , typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_iter_fold_impl; template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_iter_fold_impl< 0,First,Last,State,BackwardOp,ForwardOp > { typedef First iter0; typedef State fwd_state0; typedef fwd_state0 bkwd_state0; typedef bkwd_state0 state; typedef iter0 iterator; }; template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_iter_fold_impl< 1,First,Last,State,BackwardOp,ForwardOp > { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; typedef typename mpl::next::type iter1; typedef fwd_state1 bkwd_state1; typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; typedef bkwd_state0 state; typedef iter1 iterator; }; template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_iter_fold_impl< 2,First,Last,State,BackwardOp,ForwardOp > { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; typedef typename mpl::next::type iter2; typedef fwd_state2 bkwd_state2; typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1; typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; typedef bkwd_state0 state; typedef iter2 iterator; }; template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_iter_fold_impl< 3,First,Last,State,BackwardOp,ForwardOp > { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp,fwd_state2,iter2 >::type fwd_state3; typedef typename mpl::next::type iter3; typedef fwd_state3 bkwd_state3; typedef typename apply2< BackwardOp,bkwd_state3,iter2 >::type bkwd_state2; typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1; typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; typedef bkwd_state0 state; typedef iter3 iterator; }; template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_iter_fold_impl< 4,First,Last,State,BackwardOp,ForwardOp > { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp,fwd_state2,iter2 >::type fwd_state3; typedef typename mpl::next::type iter3; typedef typename apply2< ForwardOp,fwd_state3,iter3 >::type fwd_state4; typedef typename mpl::next::type iter4; typedef fwd_state4 bkwd_state4; typedef typename apply2< BackwardOp,bkwd_state4,iter3 >::type bkwd_state3; typedef typename apply2< BackwardOp,bkwd_state3,iter2 >::type bkwd_state2; typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1; typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; typedef bkwd_state0 state; typedef iter4 iterator; }; template< long N , typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_iter_fold_impl { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp,fwd_state2,iter2 >::type fwd_state3; typedef typename mpl::next::type iter3; typedef typename apply2< ForwardOp,fwd_state3,iter3 >::type fwd_state4; typedef typename mpl::next::type iter4; typedef reverse_iter_fold_impl< ( (N - 4) < 0 ? 0 : N - 4 ) , iter4 , Last , fwd_state4 , BackwardOp , ForwardOp > nested_chunk; typedef typename nested_chunk::state bkwd_state4; typedef typename apply2< BackwardOp,bkwd_state4,iter3 >::type bkwd_state3; typedef typename apply2< BackwardOp,bkwd_state3,iter2 >::type bkwd_state2; typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1; typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; typedef bkwd_state0 state; typedef typename nested_chunk::iterator iterator; }; template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_iter_fold_impl< -1,First,Last,State,BackwardOp,ForwardOp > { typedef reverse_iter_fold_impl< -1 , typename mpl::next::type , Last , typename apply2< ForwardOp,State,First >::type , BackwardOp , ForwardOp > nested_step; typedef typename apply2< BackwardOp , typename nested_step::state , First >::type state; typedef typename nested_step::iterator iterator; }; template< typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_iter_fold_impl< -1,Last,Last,State,BackwardOp,ForwardOp > { typedef State state; typedef Last iterator; }; }}} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/dmc/set.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/set.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na , typename T12 = na, typename T13 = na, typename T14 = na , typename T15 = na, typename T16 = na, typename T17 = na , typename T18 = na, typename T19 = na > struct set; template< > struct set< na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : set0< > { typedef set0< >::type type; }; template< typename T0 > struct set< T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : set1 { typedef typename set1::type type; }; template< typename T0, typename T1 > struct set< T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : set2< T0,T1 > { typedef typename set2< T0,T1 >::type type; }; template< typename T0, typename T1, typename T2 > struct set< T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : set3< T0,T1,T2 > { typedef typename set3< T0,T1,T2 >::type type; }; template< typename T0, typename T1, typename T2, typename T3 > struct set< T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : set4< T0,T1,T2,T3 > { typedef typename set4< T0,T1,T2,T3 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 > struct set< T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : set5< T0,T1,T2,T3,T4 > { typedef typename set5< T0,T1,T2,T3,T4 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct set< T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : set6< T0,T1,T2,T3,T4,T5 > { typedef typename set6< T0,T1,T2,T3,T4,T5 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6 > struct set< T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na , na, na, na > : set7< T0,T1,T2,T3,T4,T5,T6 > { typedef typename set7< T0,T1,T2,T3,T4,T5,T6 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7 > struct set< T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na , na, na, na > : set8< T0,T1,T2,T3,T4,T5,T6,T7 > { typedef typename set8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8 > struct set< T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na , na, na, na > : set9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > { typedef typename set9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 > struct set< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na , na, na, na > : set10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > { typedef typename set10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10 > struct set< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na , na, na, na > : set11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > { typedef typename set11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11 > struct set< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na , na, na, na, na > : set12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > { typedef typename set12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12 > struct set< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na , na, na, na, na > : set13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > { typedef typename set13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13 > struct set< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na , na, na, na, na > : set14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > { typedef typename set14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 > struct set< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na , na, na, na, na > : set15< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 > { typedef typename set15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15 > struct set< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, na, na, na, na > : set16< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15 > { typedef typename set16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16 > struct set< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, na, na, na > : set17< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16 > { typedef typename set17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17 > struct set< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, na, na > : set18< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17 > { typedef typename set18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18 > struct set< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18, na > : set19< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18 > { typedef typename set19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type; }; /// primary template (not a specialization!) template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct set : set20< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18, T19 > { typedef typename set20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/dmc/set_c.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/set_c.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename T, long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX , long C3 = LONG_MAX, long C4 = LONG_MAX, long C5 = LONG_MAX , long C6 = LONG_MAX, long C7 = LONG_MAX, long C8 = LONG_MAX , long C9 = LONG_MAX, long C10 = LONG_MAX, long C11 = LONG_MAX , long C12 = LONG_MAX, long C13 = LONG_MAX, long C14 = LONG_MAX , long C15 = LONG_MAX, long C16 = LONG_MAX, long C17 = LONG_MAX , long C18 = LONG_MAX, long C19 = LONG_MAX > struct set_c; template< typename T > struct set_c< T, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : set0_c { typedef typename set0_c::type type; }; template< typename T, long C0 > struct set_c< T, C0, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : set1_c< T,C0 > { typedef typename set1_c< T,C0 >::type type; }; template< typename T, long C0, long C1 > struct set_c< T, C0, C1, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : set2_c< T,C0,C1 > { typedef typename set2_c< T,C0,C1 >::type type; }; template< typename T, long C0, long C1, long C2 > struct set_c< T, C0, C1, C2, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : set3_c< T,C0,C1,C2 > { typedef typename set3_c< T,C0,C1,C2 >::type type; }; template< typename T, long C0, long C1, long C2, long C3 > struct set_c< T, C0, C1, C2, C3, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : set4_c< T,C0,C1,C2,C3 > { typedef typename set4_c< T,C0,C1,C2,C3 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4 > struct set_c< T, C0, C1, C2, C3, C4, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : set5_c< T,C0,C1,C2,C3,C4 > { typedef typename set5_c< T,C0,C1,C2,C3,C4 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 > struct set_c< T, C0, C1, C2, C3, C4, C5, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX > : set6_c< T,C0,C1,C2,C3,C4,C5 > { typedef typename set6_c< T,C0,C1,C2,C3,C4,C5 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX > : set7_c< T,C0,C1,C2,C3,C4,C5,C6 > { typedef typename set7_c< T,C0,C1,C2,C3,C4,C5,C6 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, C7, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX > : set8_c< T,C0,C1,C2,C3,C4,C5,C6,C7 > { typedef typename set8_c< T,C0,C1,C2,C3,C4,C5,C6,C7 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX > : set9_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8 > { typedef typename set9_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX > : set10_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 > { typedef typename set10_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : set11_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 > { typedef typename set11_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : set12_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 > { typedef typename set12_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : set13_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 > { typedef typename set13_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : set14_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 > { typedef typename set14_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : set15_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 > { typedef typename set15_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : set16_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15 > { typedef typename set16_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, LONG_MAX, LONG_MAX, LONG_MAX > : set17_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16 > { typedef typename set17_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, C17, LONG_MAX, LONG_MAX > : set18_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, C17 > { typedef typename set18_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, C17, C18, LONG_MAX > : set19_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, C17, C18 > { typedef typename set19_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18 >::type type; }; /// primary template (not a specialization!) template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct set_c : set20_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, C17, C18, C19 > { typedef typename set20_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19 >::type type; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/dmc/shift_left.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // Copyright Jaap Suter 2003 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/shift_left.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct shift_left_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< shift_left_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< shift_left_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct shift_left_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct shift_left_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct shift_left_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct shift_left_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct shift_left : shift_left_impl< typename shift_left_tag::type , typename shift_left_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, shift_left, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 2, shift_left) }} namespace boost { namespace mpl { template<> struct shift_left_impl< integral_c_tag,integral_c_tag > { template< typename N, typename S > struct apply : integral_c< typename N::value_type , ( BOOST_MPL_AUX_VALUE_WKND(N)::value << BOOST_MPL_AUX_VALUE_WKND(S)::value ) > { }; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/dmc/shift_right.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // Copyright Jaap Suter 2003 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/shift_right.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct shift_right_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< shift_right_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< shift_right_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct shift_right_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct shift_right_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct shift_right_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct shift_right_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct shift_right : shift_right_impl< typename shift_right_tag::type , typename shift_right_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, shift_right, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 2, shift_right) }} namespace boost { namespace mpl { template<> struct shift_right_impl< integral_c_tag,integral_c_tag > { template< typename N, typename S > struct apply : integral_c< typename N::value_type , ( BOOST_MPL_AUX_VALUE_WKND(N)::value >> BOOST_MPL_AUX_VALUE_WKND(S)::value ) > { }; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/dmc/template_arity.hpp ================================================ // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/aux_/template_arity.hpp" header // -- DO NOT modify by hand! ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/dmc/times.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/times.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct times_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< times_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< times_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct times_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct times_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct times_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct times_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) , typename N3 = na, typename N4 = na, typename N5 = na > struct times : times< times< times< times< N1,N2 >, N3>, N4>, N5> { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , times , ( N1, N2, N3, N4, N5 ) ) }; template< typename N1, typename N2, typename N3, typename N4 > struct times< N1,N2,N3,N4,na > : times< times< times< N1,N2 >, N3>, N4> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , times , ( N1, N2, N3, N4, na ) ) }; template< typename N1, typename N2, typename N3 > struct times< N1,N2,N3,na,na > : times< times< N1,N2 >, N3> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , times , ( N1, N2, N3, na, na ) ) }; template< typename N1, typename N2 > struct times< N1,N2,na,na,na > : times_impl< typename times_tag::type , typename times_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , times , ( N1, N2, na, na, na ) ) }; BOOST_MPL_AUX_NA_SPEC2(2, 5, times) }} namespace boost { namespace mpl { template<> struct times_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : integral_c< typename aux::largest_int< typename N1::value_type , typename N2::value_type >::type , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value * BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/dmc/unpack_args.hpp ================================================ // Copyright Aleksey Gurtovoy 2002-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/unpack_args.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< int size, typename F, typename Args > struct unpack_args_impl; template< typename F, typename Args > struct unpack_args_impl< 0,F,Args > : apply0< F > { }; template< typename F, typename Args > struct unpack_args_impl< 1,F,Args > : apply1< F , typename at_c< Args,0 >::type > { }; template< typename F, typename Args > struct unpack_args_impl< 2,F,Args > : apply2< F , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type > { }; template< typename F, typename Args > struct unpack_args_impl< 3,F,Args > : apply3< F , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type , typename at_c< Args,2 >::type > { }; template< typename F, typename Args > struct unpack_args_impl< 4,F,Args > : apply4< F , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type , typename at_c< Args,2 >::type, typename at_c< Args,3 >::type > { }; template< typename F, typename Args > struct unpack_args_impl< 5,F,Args > : apply5< F , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type , typename at_c< Args,2 >::type, typename at_c< Args,3 >::type , typename at_c< Args,4 >::type > { }; } template< typename F > struct unpack_args { template< typename Args > struct apply : aux::unpack_args_impl< size::value,F, Args > { }; }; BOOST_MPL_AUX_PASS_THROUGH_LAMBDA_SPEC(1, unpack_args) }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/dmc/vector.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/vector.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na , typename T12 = na, typename T13 = na, typename T14 = na , typename T15 = na, typename T16 = na, typename T17 = na , typename T18 = na, typename T19 = na > struct vector; template< > struct vector< na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector0< > { typedef vector0< >::type type; }; template< typename T0 > struct vector< T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector1 { typedef typename vector1::type type; }; template< typename T0, typename T1 > struct vector< T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector2< T0,T1 > { typedef typename vector2< T0,T1 >::type type; }; template< typename T0, typename T1, typename T2 > struct vector< T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector3< T0,T1,T2 > { typedef typename vector3< T0,T1,T2 >::type type; }; template< typename T0, typename T1, typename T2, typename T3 > struct vector< T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector4< T0,T1,T2,T3 > { typedef typename vector4< T0,T1,T2,T3 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 > struct vector< T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector5< T0,T1,T2,T3,T4 > { typedef typename vector5< T0,T1,T2,T3,T4 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct vector< T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector6< T0,T1,T2,T3,T4,T5 > { typedef typename vector6< T0,T1,T2,T3,T4,T5 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6 > struct vector< T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector7< T0,T1,T2,T3,T4,T5,T6 > { typedef typename vector7< T0,T1,T2,T3,T4,T5,T6 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7 > struct vector< T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na , na, na, na > : vector8< T0,T1,T2,T3,T4,T5,T6,T7 > { typedef typename vector8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8 > struct vector< T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na , na, na, na > : vector9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > { typedef typename vector9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 > struct vector< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na , na, na, na > : vector10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > { typedef typename vector10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10 > struct vector< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na , na, na, na > : vector11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > { typedef typename vector11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11 > struct vector< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na , na, na, na, na > : vector12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > { typedef typename vector12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12 > struct vector< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na , na, na, na, na > : vector13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > { typedef typename vector13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13 > struct vector< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na , na, na, na, na > : vector14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > { typedef typename vector14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 > struct vector< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na , na, na, na, na > : vector15< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 > { typedef typename vector15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15 > struct vector< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, na, na, na, na > : vector16< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15 > { typedef typename vector16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16 > struct vector< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, na, na, na > : vector17< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16 > { typedef typename vector17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17 > struct vector< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, na, na > : vector18< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17 > { typedef typename vector18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18 > struct vector< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18, na > : vector19< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18 > { typedef typename vector19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type; }; /// primary template (not a specialization!) template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct vector : vector20< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18, T19 > { typedef typename vector20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/dmc/vector_c.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/vector_c.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename T, long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX , long C3 = LONG_MAX, long C4 = LONG_MAX, long C5 = LONG_MAX , long C6 = LONG_MAX, long C7 = LONG_MAX, long C8 = LONG_MAX , long C9 = LONG_MAX, long C10 = LONG_MAX, long C11 = LONG_MAX , long C12 = LONG_MAX, long C13 = LONG_MAX, long C14 = LONG_MAX , long C15 = LONG_MAX, long C16 = LONG_MAX, long C17 = LONG_MAX , long C18 = LONG_MAX, long C19 = LONG_MAX > struct vector_c; template< typename T > struct vector_c< T, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector0_c { typedef typename vector0_c::type type; }; template< typename T, long C0 > struct vector_c< T, C0, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector1_c< T, T(C0) > { typedef typename vector1_c< T, T(C0) >::type type; }; template< typename T, long C0, long C1 > struct vector_c< T, C0, C1, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector2_c< T, T(C0), T(C1) > { typedef typename vector2_c< T, T(C0), T(C1) >::type type; }; template< typename T, long C0, long C1, long C2 > struct vector_c< T, C0, C1, C2, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector3_c< T, T(C0), T(C1), T(C2) > { typedef typename vector3_c< T, T(C0), T(C1), T(C2) >::type type; }; template< typename T, long C0, long C1, long C2, long C3 > struct vector_c< T, C0, C1, C2, C3, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector4_c< T, T(C0), T(C1), T(C2), T(C3) > { typedef typename vector4_c< T, T(C0), T(C1), T(C2), T(C3) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4 > struct vector_c< T, C0, C1, C2, C3, C4, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector5_c< T, T(C0), T(C1), T(C2), T(C3), T(C4) > { typedef typename vector5_c< T, T(C0), T(C1), T(C2), T(C3), T(C4) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 > struct vector_c< T, C0, C1, C2, C3, C4, C5, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX > : vector6_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5) > { typedef typename vector6_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX > : vector7_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6) > { typedef typename vector7_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, C7, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX > : vector8_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7) > { typedef typename vector8_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX > : vector9_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8) > { typedef typename vector9_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX > : vector10_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9) > { typedef typename vector10_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector11_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10) > { typedef typename vector11_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector12_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11) > { typedef typename vector12_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector13_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12) > { typedef typename vector13_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector14_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13) > { typedef typename vector14_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector15_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14) > { typedef typename vector15_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector16_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15) > { typedef typename vector16_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, LONG_MAX, LONG_MAX, LONG_MAX > : vector17_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16) > { typedef typename vector17_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, C17, LONG_MAX, LONG_MAX > : vector18_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17) > { typedef typename vector18_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, C17, C18, LONG_MAX > : vector19_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17), T(C18) > { typedef typename vector19_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17), T(C18) >::type type; }; /// primary template (not a specialization!) template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct vector_c : vector20_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17), T(C18), T(C19) > { typedef typename vector20_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17), T(C18), T(C19) >::type type; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/gcc/advance_backward.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/aux_/advance_backward.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< long N > struct advance_backward; template<> struct advance_backward<0> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef iter0 type; }; }; template<> struct advance_backward<1> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef typename prior::type iter1; typedef iter1 type; }; }; template<> struct advance_backward<2> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef typename prior::type iter1; typedef typename prior::type iter2; typedef iter2 type; }; }; template<> struct advance_backward<3> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef typename prior::type iter1; typedef typename prior::type iter2; typedef typename prior::type iter3; typedef iter3 type; }; }; template<> struct advance_backward<4> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef typename prior::type iter1; typedef typename prior::type iter2; typedef typename prior::type iter3; typedef typename prior::type iter4; typedef iter4 type; }; }; template< long N > struct advance_backward { template< typename Iterator > struct apply { typedef typename apply_wrap1< advance_backward<4> , Iterator >::type chunk_result_; typedef typename apply_wrap1< advance_backward<( (N - 4) < 0 ? 0 : N - 4 )> , chunk_result_ >::type type; }; }; }}} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/gcc/advance_forward.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/aux_/advance_forward.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< long N > struct advance_forward; template<> struct advance_forward<0> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef iter0 type; }; }; template<> struct advance_forward<1> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef typename next::type iter1; typedef iter1 type; }; }; template<> struct advance_forward<2> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef typename next::type iter1; typedef typename next::type iter2; typedef iter2 type; }; }; template<> struct advance_forward<3> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef typename next::type iter1; typedef typename next::type iter2; typedef typename next::type iter3; typedef iter3 type; }; }; template<> struct advance_forward<4> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef typename next::type iter1; typedef typename next::type iter2; typedef typename next::type iter3; typedef typename next::type iter4; typedef iter4 type; }; }; template< long N > struct advance_forward { template< typename Iterator > struct apply { typedef typename apply_wrap1< advance_forward<4> , Iterator >::type chunk_result_; typedef typename apply_wrap1< advance_forward<( (N - 4) < 0 ? 0 : N - 4 )> , chunk_result_ >::type type; }; }; }}} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/gcc/and.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/and.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< bool C_, typename T1, typename T2, typename T3, typename T4 > struct and_impl : false_ { }; template< typename T1, typename T2, typename T3, typename T4 > struct and_impl< true,T1,T2,T3,T4 > : and_impl< BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value , T2, T3, T4 , true_ > { }; template<> struct and_impl< true , true_, true_, true_, true_ > : true_ { }; } // namespace aux template< typename BOOST_MPL_AUX_NA_PARAM(T1) , typename BOOST_MPL_AUX_NA_PARAM(T2) , typename T3 = true_, typename T4 = true_, typename T5 = true_ > struct and_ : aux::and_impl< BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value , T2, T3, T4, T5 > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , and_ , ( T1, T2, T3, T4, T5) ) }; BOOST_MPL_AUX_NA_SPEC2( 2 , 5 , and_ ) }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/gcc/apply.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/apply.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename F > struct apply0 : apply_wrap0< typename lambda::type > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 1 , apply0 , (F ) ) }; template< typename F > struct apply< F,na,na,na,na,na > : apply0 { }; template< typename F, typename T1 > struct apply1 : apply_wrap1< typename lambda::type , T1 > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 2 , apply1 , (F, T1) ) }; template< typename F, typename T1 > struct apply< F,T1,na,na,na,na > : apply1< F,T1 > { }; template< typename F, typename T1, typename T2 > struct apply2 : apply_wrap2< typename lambda::type , T1, T2 > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 3 , apply2 , (F, T1, T2) ) }; template< typename F, typename T1, typename T2 > struct apply< F,T1,T2,na,na,na > : apply2< F,T1,T2 > { }; template< typename F, typename T1, typename T2, typename T3 > struct apply3 : apply_wrap3< typename lambda::type , T1, T2, T3 > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 4 , apply3 , (F, T1, T2, T3) ) }; template< typename F, typename T1, typename T2, typename T3 > struct apply< F,T1,T2,T3,na,na > : apply3< F,T1,T2,T3 > { }; template< typename F, typename T1, typename T2, typename T3, typename T4 > struct apply4 : apply_wrap4< typename lambda::type , T1, T2, T3, T4 > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , apply4 , (F, T1, T2, T3, T4) ) }; template< typename F, typename T1, typename T2, typename T3, typename T4 > struct apply< F,T1,T2,T3,T4,na > : apply4< F,T1,T2,T3,T4 > { }; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct apply5 : apply_wrap5< typename lambda::type , T1, T2, T3, T4, T5 > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 6 , apply5 , (F, T1, T2, T3, T4, T5) ) }; /// primary template (not a specialization!) template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct apply : apply5< F,T1,T2,T3,T4,T5 > { }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/gcc/apply_fwd.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/apply_fwd.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename F, typename T1 = na, typename T2 = na, typename T3 = na , typename T4 = na, typename T5 = na > struct apply; template< typename F > struct apply0; template< typename F, typename T1 > struct apply1; template< typename F, typename T1, typename T2 > struct apply2; template< typename F, typename T1, typename T2, typename T3 > struct apply3; template< typename F, typename T1, typename T2, typename T3, typename T4 > struct apply4; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct apply5; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/gcc/apply_wrap.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/apply_wrap.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename F , typename has_apply_ = typename aux::has_apply::type > struct apply_wrap0 : F::template apply< > { }; template< typename F > struct apply_wrap0< F,true_ > : F::apply { }; template< typename F, typename T1 > struct apply_wrap1 : F::template apply { }; template< typename F, typename T1, typename T2 > struct apply_wrap2 : F::template apply< T1,T2 > { }; template< typename F, typename T1, typename T2, typename T3 > struct apply_wrap3 : F::template apply< T1,T2,T3 > { }; template< typename F, typename T1, typename T2, typename T3, typename T4 > struct apply_wrap4 : F::template apply< T1,T2,T3,T4 > { }; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct apply_wrap5 : F::template apply< T1,T2,T3,T4,T5 > { }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/gcc/arg.hpp ================================================ // Copyright Peter Dimov 2001-2002 // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/arg.hpp" header // -- DO NOT modify by hand! BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN template<> struct arg< -1 > { BOOST_STATIC_CONSTANT(int, value = -1); BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) BOOST_MPL_AUX_ARG_TYPEDEF(na, type) template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { typedef U1 type; BOOST_MPL_AUX_ASSERT_NOT_NA(type); }; }; template<> struct arg<1> { BOOST_STATIC_CONSTANT(int, value = 1); typedef arg<2> next; BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) BOOST_MPL_AUX_ARG_TYPEDEF(na, type) template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { typedef U1 type; BOOST_MPL_AUX_ASSERT_NOT_NA(type); }; }; template<> struct arg<2> { BOOST_STATIC_CONSTANT(int, value = 2); typedef arg<3> next; BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) BOOST_MPL_AUX_ARG_TYPEDEF(na, type) template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { typedef U2 type; BOOST_MPL_AUX_ASSERT_NOT_NA(type); }; }; template<> struct arg<3> { BOOST_STATIC_CONSTANT(int, value = 3); typedef arg<4> next; BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) BOOST_MPL_AUX_ARG_TYPEDEF(na, type) template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { typedef U3 type; BOOST_MPL_AUX_ASSERT_NOT_NA(type); }; }; template<> struct arg<4> { BOOST_STATIC_CONSTANT(int, value = 4); typedef arg<5> next; BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) BOOST_MPL_AUX_ARG_TYPEDEF(na, type) template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { typedef U4 type; BOOST_MPL_AUX_ASSERT_NOT_NA(type); }; }; template<> struct arg<5> { BOOST_STATIC_CONSTANT(int, value = 5); typedef arg<6> next; BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) BOOST_MPL_AUX_ARG_TYPEDEF(na, type) template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { typedef U5 type; BOOST_MPL_AUX_ASSERT_NOT_NA(type); }; }; BOOST_MPL_AUX_NONTYPE_ARITY_SPEC(1,int, arg) BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/gcc/basic_bind.hpp ================================================ // Copyright Peter Dimov 2001 // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/aux_/basic_bind.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< typename T, typename U1, typename U2, typename U3, typename U4 , typename U5 > struct resolve_bind_arg { typedef T type; }; template< int N, typename U1, typename U2, typename U3, typename U4, typename U5 > struct resolve_bind_arg< arg, U1, U2, U3, U4, U5 > { typedef typename apply_wrap5, U1, U2, U3, U4, U5>::type type; }; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5, typename U1, typename U2, typename U3, typename U4 , typename U5 > struct resolve_bind_arg< bind< F,T1,T2,T3,T4,T5 >, U1, U2, U3, U4, U5 > { typedef bind< F,T1,T2,T3,T4,T5 > f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux template< typename F > struct bind0 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; public: typedef typename apply_wrap0< f_ >::type type; }; }; namespace aux { template< typename F, typename U1, typename U2, typename U3, typename U4 , typename U5 > struct resolve_bind_arg< bind0, U1, U2, U3, U4, U5 > { typedef bind0 f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(1, bind0) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(1, bind0) template< typename F > struct bind< F,na,na,na,na,na > : bind0 { }; template< typename F, typename T1 > struct bind1 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; public: typedef typename apply_wrap1< f_ , typename t1::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename U1, typename U2, typename U3 , typename U4, typename U5 > struct resolve_bind_arg< bind1< F,T1 >, U1, U2, U3, U4, U5 > { typedef bind1< F,T1 > f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(2, bind1) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(2, bind1) template< typename F, typename T1 > struct bind< F,T1,na,na,na,na > : bind1< F,T1 > { }; template< typename F, typename T1, typename T2 > struct bind2 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; public: typedef typename apply_wrap2< f_ , typename t1::type, typename t2::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename T2, typename U1, typename U2 , typename U3, typename U4, typename U5 > struct resolve_bind_arg< bind2< F,T1,T2 >, U1, U2, U3, U4, U5 > { typedef bind2< F,T1,T2 > f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(3, bind2) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(3, bind2) template< typename F, typename T1, typename T2 > struct bind< F,T1,T2,na,na,na > : bind2< F,T1,T2 > { }; template< typename F, typename T1, typename T2, typename T3 > struct bind3 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3; public: typedef typename apply_wrap3< f_ , typename t1::type, typename t2::type, typename t3::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename T2, typename T3, typename U1 , typename U2, typename U3, typename U4, typename U5 > struct resolve_bind_arg< bind3< F,T1,T2,T3 >, U1, U2, U3, U4, U5 > { typedef bind3< F,T1,T2,T3 > f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(4, bind3) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(4, bind3) template< typename F, typename T1, typename T2, typename T3 > struct bind< F,T1,T2,T3,na,na > : bind3< F,T1,T2,T3 > { }; template< typename F, typename T1, typename T2, typename T3, typename T4 > struct bind4 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3; typedef aux::resolve_bind_arg< T4,U1,U2,U3,U4,U5 > t4; public: typedef typename apply_wrap4< f_ , typename t1::type, typename t2::type, typename t3::type , typename t4::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename T2, typename T3, typename T4 , typename U1, typename U2, typename U3, typename U4, typename U5 > struct resolve_bind_arg< bind4< F,T1,T2,T3,T4 >, U1, U2, U3, U4, U5 > { typedef bind4< F,T1,T2,T3,T4 > f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(5, bind4) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(5, bind4) template< typename F, typename T1, typename T2, typename T3, typename T4 > struct bind< F,T1,T2,T3,T4,na > : bind4< F,T1,T2,T3,T4 > { }; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct bind5 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3; typedef aux::resolve_bind_arg< T4,U1,U2,U3,U4,U5 > t4; typedef aux::resolve_bind_arg< T5,U1,U2,U3,U4,U5 > t5; public: typedef typename apply_wrap5< f_ , typename t1::type, typename t2::type, typename t3::type , typename t4::type, typename t5::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5, typename U1, typename U2, typename U3, typename U4 , typename U5 > struct resolve_bind_arg< bind5< F,T1,T2,T3,T4,T5 >, U1, U2, U3, U4, U5 > { typedef bind5< F,T1,T2,T3,T4,T5 > f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(6, bind5) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(6, bind5) /// primary template (not a specialization!) template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct bind : bind5< F,T1,T2,T3,T4,T5 > { }; /// if_/eval_if specializations template< template< typename T1, typename T2, typename T3 > class F, typename Tag > struct quote3; template< typename T1, typename T2, typename T3 > struct if_; template< typename Tag, typename T1, typename T2, typename T3 > struct bind3< quote3< if_,Tag > , T1, T2, T3 > { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef mpl::arg<1> n1; typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3; typedef typename if_< typename t1::type , t2, t3 >::type f_; public: typedef typename f_::type type; }; }; template< template< typename T1, typename T2, typename T3 > class F, typename Tag > struct quote3; template< typename T1, typename T2, typename T3 > struct eval_if; template< typename Tag, typename T1, typename T2, typename T3 > struct bind3< quote3< eval_if,Tag > , T1, T2, T3 > { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef mpl::arg<1> n1; typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3; typedef typename eval_if< typename t1::type , t2, t3 >::type f_; public: typedef typename f_::type type; }; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/gcc/bind.hpp ================================================ // Copyright Peter Dimov 2001 // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/bind.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< typename T, typename U1, typename U2, typename U3, typename U4 , typename U5 > struct resolve_bind_arg { typedef T type; }; template< typename T , typename Arg > struct replace_unnamed_arg { typedef Arg next; typedef T type; }; template< typename Arg > struct replace_unnamed_arg< arg< -1 >, Arg > { typedef typename Arg::next next; typedef Arg type; }; template< int N, typename U1, typename U2, typename U3, typename U4, typename U5 > struct resolve_bind_arg< arg, U1, U2, U3, U4, U5 > { typedef typename apply_wrap5, U1, U2, U3, U4, U5>::type type; }; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5, typename U1, typename U2, typename U3, typename U4 , typename U5 > struct resolve_bind_arg< bind< F,T1,T2,T3,T4,T5 >, U1, U2, U3, U4, U5 > { typedef bind< F,T1,T2,T3,T4,T5 > f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux template< typename F > struct bind0 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; typedef typename r0::type a0; typedef typename r0::next n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; /// public: typedef typename apply_wrap0< f_ >::type type; }; }; namespace aux { template< typename F, typename U1, typename U2, typename U3, typename U4 , typename U5 > struct resolve_bind_arg< bind0, U1, U2, U3, U4, U5 > { typedef bind0 f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(1, bind0) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(1, bind0) template< typename F > struct bind< F,na,na,na,na,na > : bind0 { }; template< typename F, typename T1 > struct bind1 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; typedef typename r0::type a0; typedef typename r0::next n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; /// typedef aux::replace_unnamed_arg< T1,n1 > r1; typedef typename r1::type a1; typedef typename r1::next n2; typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; /// public: typedef typename apply_wrap1< f_ , typename t1::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename U1, typename U2, typename U3 , typename U4, typename U5 > struct resolve_bind_arg< bind1< F,T1 >, U1, U2, U3, U4, U5 > { typedef bind1< F,T1 > f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(2, bind1) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(2, bind1) template< typename F, typename T1 > struct bind< F,T1,na,na,na,na > : bind1< F,T1 > { }; template< typename F, typename T1, typename T2 > struct bind2 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; typedef typename r0::type a0; typedef typename r0::next n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; /// typedef aux::replace_unnamed_arg< T1,n1 > r1; typedef typename r1::type a1; typedef typename r1::next n2; typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; /// typedef aux::replace_unnamed_arg< T2,n2 > r2; typedef typename r2::type a2; typedef typename r2::next n3; typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; /// public: typedef typename apply_wrap2< f_ , typename t1::type, typename t2::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename T2, typename U1, typename U2 , typename U3, typename U4, typename U5 > struct resolve_bind_arg< bind2< F,T1,T2 >, U1, U2, U3, U4, U5 > { typedef bind2< F,T1,T2 > f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(3, bind2) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(3, bind2) template< typename F, typename T1, typename T2 > struct bind< F,T1,T2,na,na,na > : bind2< F,T1,T2 > { }; template< typename F, typename T1, typename T2, typename T3 > struct bind3 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; typedef typename r0::type a0; typedef typename r0::next n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; /// typedef aux::replace_unnamed_arg< T1,n1 > r1; typedef typename r1::type a1; typedef typename r1::next n2; typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; /// typedef aux::replace_unnamed_arg< T2,n2 > r2; typedef typename r2::type a2; typedef typename r2::next n3; typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; /// typedef aux::replace_unnamed_arg< T3,n3 > r3; typedef typename r3::type a3; typedef typename r3::next n4; typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; /// public: typedef typename apply_wrap3< f_ , typename t1::type, typename t2::type, typename t3::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename T2, typename T3, typename U1 , typename U2, typename U3, typename U4, typename U5 > struct resolve_bind_arg< bind3< F,T1,T2,T3 >, U1, U2, U3, U4, U5 > { typedef bind3< F,T1,T2,T3 > f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(4, bind3) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(4, bind3) template< typename F, typename T1, typename T2, typename T3 > struct bind< F,T1,T2,T3,na,na > : bind3< F,T1,T2,T3 > { }; template< typename F, typename T1, typename T2, typename T3, typename T4 > struct bind4 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; typedef typename r0::type a0; typedef typename r0::next n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; /// typedef aux::replace_unnamed_arg< T1,n1 > r1; typedef typename r1::type a1; typedef typename r1::next n2; typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; /// typedef aux::replace_unnamed_arg< T2,n2 > r2; typedef typename r2::type a2; typedef typename r2::next n3; typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; /// typedef aux::replace_unnamed_arg< T3,n3 > r3; typedef typename r3::type a3; typedef typename r3::next n4; typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; /// typedef aux::replace_unnamed_arg< T4,n4 > r4; typedef typename r4::type a4; typedef typename r4::next n5; typedef aux::resolve_bind_arg< a4,U1,U2,U3,U4,U5 > t4; /// public: typedef typename apply_wrap4< f_ , typename t1::type, typename t2::type, typename t3::type , typename t4::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename T2, typename T3, typename T4 , typename U1, typename U2, typename U3, typename U4, typename U5 > struct resolve_bind_arg< bind4< F,T1,T2,T3,T4 >, U1, U2, U3, U4, U5 > { typedef bind4< F,T1,T2,T3,T4 > f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(5, bind4) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(5, bind4) template< typename F, typename T1, typename T2, typename T3, typename T4 > struct bind< F,T1,T2,T3,T4,na > : bind4< F,T1,T2,T3,T4 > { }; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct bind5 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; typedef typename r0::type a0; typedef typename r0::next n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; /// typedef aux::replace_unnamed_arg< T1,n1 > r1; typedef typename r1::type a1; typedef typename r1::next n2; typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; /// typedef aux::replace_unnamed_arg< T2,n2 > r2; typedef typename r2::type a2; typedef typename r2::next n3; typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; /// typedef aux::replace_unnamed_arg< T3,n3 > r3; typedef typename r3::type a3; typedef typename r3::next n4; typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; /// typedef aux::replace_unnamed_arg< T4,n4 > r4; typedef typename r4::type a4; typedef typename r4::next n5; typedef aux::resolve_bind_arg< a4,U1,U2,U3,U4,U5 > t4; /// typedef aux::replace_unnamed_arg< T5,n5 > r5; typedef typename r5::type a5; typedef typename r5::next n6; typedef aux::resolve_bind_arg< a5,U1,U2,U3,U4,U5 > t5; /// public: typedef typename apply_wrap5< f_ , typename t1::type, typename t2::type, typename t3::type , typename t4::type, typename t5::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5, typename U1, typename U2, typename U3, typename U4 , typename U5 > struct resolve_bind_arg< bind5< F,T1,T2,T3,T4,T5 >, U1, U2, U3, U4, U5 > { typedef bind5< F,T1,T2,T3,T4,T5 > f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(6, bind5) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(6, bind5) /// primary template (not a specialization!) template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct bind : bind5< F,T1,T2,T3,T4,T5 > { }; /// if_/eval_if specializations template< template< typename T1, typename T2, typename T3 > class F, typename Tag > struct quote3; template< typename T1, typename T2, typename T3 > struct if_; template< typename Tag, typename T1, typename T2, typename T3 > struct bind3< quote3< if_,Tag > , T1, T2, T3 > { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef mpl::arg<1> n1; typedef aux::replace_unnamed_arg< T1,n1 > r1; typedef typename r1::type a1; typedef typename r1::next n2; typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; /// typedef aux::replace_unnamed_arg< T2,n2 > r2; typedef typename r2::type a2; typedef typename r2::next n3; typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; /// typedef aux::replace_unnamed_arg< T3,n3 > r3; typedef typename r3::type a3; typedef typename r3::next n4; typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; /// typedef typename if_< typename t1::type , t2, t3 >::type f_; public: typedef typename f_::type type; }; }; template< template< typename T1, typename T2, typename T3 > class F, typename Tag > struct quote3; template< typename T1, typename T2, typename T3 > struct eval_if; template< typename Tag, typename T1, typename T2, typename T3 > struct bind3< quote3< eval_if,Tag > , T1, T2, T3 > { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef mpl::arg<1> n1; typedef aux::replace_unnamed_arg< T1,n1 > r1; typedef typename r1::type a1; typedef typename r1::next n2; typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; /// typedef aux::replace_unnamed_arg< T2,n2 > r2; typedef typename r2::type a2; typedef typename r2::next n3; typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; /// typedef aux::replace_unnamed_arg< T3,n3 > r3; typedef typename r3::type a3; typedef typename r3::next n4; typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; /// typedef typename eval_if< typename t1::type , t2, t3 >::type f_; public: typedef typename f_::type type; }; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/gcc/bind_fwd.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/bind_fwd.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename F, typename T1 = na, typename T2 = na, typename T3 = na , typename T4 = na, typename T5 = na > struct bind; template< typename F > struct bind0; template< typename F, typename T1 > struct bind1; template< typename F, typename T1, typename T2 > struct bind2; template< typename F, typename T1, typename T2, typename T3 > struct bind3; template< typename F, typename T1, typename T2, typename T3, typename T4 > struct bind4; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct bind5; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/gcc/bitand.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // Copyright Jaap Suter 2003 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/bitand.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct bitand_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< bitand_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< bitand_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct bitand_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct bitand_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct bitand_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct bitand_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) , typename N3 = na, typename N4 = na, typename N5 = na > struct bitand_ : bitand_< bitand_< bitand_< bitand_< N1,N2 >, N3>, N4>, N5> { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , bitand_ , ( N1, N2, N3, N4, N5 ) ) }; template< typename N1, typename N2, typename N3, typename N4 > struct bitand_< N1,N2,N3,N4,na > : bitand_< bitand_< bitand_< N1,N2 >, N3>, N4> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , bitand_ , ( N1, N2, N3, N4, na ) ) }; template< typename N1, typename N2, typename N3 > struct bitand_< N1,N2,N3,na,na > : bitand_< bitand_< N1,N2 >, N3> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , bitand_ , ( N1, N2, N3, na, na ) ) }; template< typename N1, typename N2 > struct bitand_< N1,N2,na,na,na > : bitand_impl< typename bitand_tag::type , typename bitand_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , bitand_ , ( N1, N2, na, na, na ) ) }; BOOST_MPL_AUX_NA_SPEC2(2, 5, bitand_) }} namespace boost { namespace mpl { template<> struct bitand_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : integral_c< typename aux::largest_int< typename N1::value_type , typename N2::value_type >::type , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value & BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/gcc/bitor.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // Copyright Jaap Suter 2003 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/bitor.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct bitor_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< bitor_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< bitor_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct bitor_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct bitor_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct bitor_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct bitor_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) , typename N3 = na, typename N4 = na, typename N5 = na > struct bitor_ : bitor_< bitor_< bitor_< bitor_< N1,N2 >, N3>, N4>, N5> { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , bitor_ , ( N1, N2, N3, N4, N5 ) ) }; template< typename N1, typename N2, typename N3, typename N4 > struct bitor_< N1,N2,N3,N4,na > : bitor_< bitor_< bitor_< N1,N2 >, N3>, N4> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , bitor_ , ( N1, N2, N3, N4, na ) ) }; template< typename N1, typename N2, typename N3 > struct bitor_< N1,N2,N3,na,na > : bitor_< bitor_< N1,N2 >, N3> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , bitor_ , ( N1, N2, N3, na, na ) ) }; template< typename N1, typename N2 > struct bitor_< N1,N2,na,na,na > : bitor_impl< typename bitor_tag::type , typename bitor_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , bitor_ , ( N1, N2, na, na, na ) ) }; BOOST_MPL_AUX_NA_SPEC2(2, 5, bitor_) }} namespace boost { namespace mpl { template<> struct bitor_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : integral_c< typename aux::largest_int< typename N1::value_type , typename N2::value_type >::type , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value | BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/gcc/bitxor.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // Copyright Jaap Suter 2003 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/bitxor.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct bitxor_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< bitxor_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< bitxor_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct bitxor_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct bitxor_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct bitxor_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct bitxor_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) , typename N3 = na, typename N4 = na, typename N5 = na > struct bitxor_ : bitxor_< bitxor_< bitxor_< bitxor_< N1,N2 >, N3>, N4>, N5> { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , bitxor_ , ( N1, N2, N3, N4, N5 ) ) }; template< typename N1, typename N2, typename N3, typename N4 > struct bitxor_< N1,N2,N3,N4,na > : bitxor_< bitxor_< bitxor_< N1,N2 >, N3>, N4> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , bitxor_ , ( N1, N2, N3, N4, na ) ) }; template< typename N1, typename N2, typename N3 > struct bitxor_< N1,N2,N3,na,na > : bitxor_< bitxor_< N1,N2 >, N3> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , bitxor_ , ( N1, N2, N3, na, na ) ) }; template< typename N1, typename N2 > struct bitxor_< N1,N2,na,na,na > : bitxor_impl< typename bitxor_tag::type , typename bitxor_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , bitxor_ , ( N1, N2, na, na, na ) ) }; BOOST_MPL_AUX_NA_SPEC2(2, 5, bitxor_) }} namespace boost { namespace mpl { template<> struct bitxor_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : integral_c< typename aux::largest_int< typename N1::value_type , typename N2::value_type >::type , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value ^ BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/gcc/deque.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/deque.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na , typename T12 = na, typename T13 = na, typename T14 = na , typename T15 = na, typename T16 = na, typename T17 = na , typename T18 = na, typename T19 = na > struct deque; template< > struct deque< na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector0< > { typedef vector0< >::type type; }; template< typename T0 > struct deque< T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector1 { typedef typename vector1::type type; }; template< typename T0, typename T1 > struct deque< T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector2< T0,T1 > { typedef typename vector2< T0,T1 >::type type; }; template< typename T0, typename T1, typename T2 > struct deque< T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector3< T0,T1,T2 > { typedef typename vector3< T0,T1,T2 >::type type; }; template< typename T0, typename T1, typename T2, typename T3 > struct deque< T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector4< T0,T1,T2,T3 > { typedef typename vector4< T0,T1,T2,T3 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 > struct deque< T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector5< T0,T1,T2,T3,T4 > { typedef typename vector5< T0,T1,T2,T3,T4 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct deque< T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector6< T0,T1,T2,T3,T4,T5 > { typedef typename vector6< T0,T1,T2,T3,T4,T5 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6 > struct deque< T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector7< T0,T1,T2,T3,T4,T5,T6 > { typedef typename vector7< T0,T1,T2,T3,T4,T5,T6 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7 > struct deque< T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na , na, na, na > : vector8< T0,T1,T2,T3,T4,T5,T6,T7 > { typedef typename vector8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8 > struct deque< T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na , na, na, na > : vector9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > { typedef typename vector9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 > struct deque< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na , na, na, na > : vector10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > { typedef typename vector10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10 > struct deque< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na , na, na, na > : vector11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > { typedef typename vector11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11 > struct deque< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na , na, na, na, na > : vector12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > { typedef typename vector12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12 > struct deque< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na , na, na, na, na > : vector13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > { typedef typename vector13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13 > struct deque< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na , na, na, na, na > : vector14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > { typedef typename vector14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 > struct deque< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na , na, na, na, na > : vector15< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 > { typedef typename vector15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15 > struct deque< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, na, na, na, na > : vector16< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15 > { typedef typename vector16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16 > struct deque< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, na, na, na > : vector17< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16 > { typedef typename vector17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17 > struct deque< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, na, na > : vector18< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17 > { typedef typename vector18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18 > struct deque< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18, na > : vector19< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18 > { typedef typename vector19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type; }; /// primary template (not a specialization!) template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct deque : vector20< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18, T19 > { typedef typename vector20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/gcc/divides.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/divides.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct divides_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< divides_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< divides_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct divides_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct divides_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct divides_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct divides_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) , typename N3 = na, typename N4 = na, typename N5 = na > struct divides : divides< divides< divides< divides< N1,N2 >, N3>, N4>, N5> { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , divides , ( N1, N2, N3, N4, N5 ) ) }; template< typename N1, typename N2, typename N3, typename N4 > struct divides< N1,N2,N3,N4,na > : divides< divides< divides< N1,N2 >, N3>, N4> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , divides , ( N1, N2, N3, N4, na ) ) }; template< typename N1, typename N2, typename N3 > struct divides< N1,N2,N3,na,na > : divides< divides< N1,N2 >, N3> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , divides , ( N1, N2, N3, na, na ) ) }; template< typename N1, typename N2 > struct divides< N1,N2,na,na,na > : divides_impl< typename divides_tag::type , typename divides_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , divides , ( N1, N2, na, na, na ) ) }; BOOST_MPL_AUX_NA_SPEC2(2, 5, divides) }} namespace boost { namespace mpl { template<> struct divides_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : integral_c< typename aux::largest_int< typename N1::value_type , typename N2::value_type >::type , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value / BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/gcc/equal_to.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/equal_to.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct equal_to_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< equal_to_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< equal_to_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct equal_to_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct equal_to_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct equal_to_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct equal_to_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct equal_to : equal_to_impl< typename equal_to_tag::type , typename equal_to_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, equal_to, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 2, equal_to) }} namespace boost { namespace mpl { template<> struct equal_to_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value == BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/gcc/fold_impl.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/aux_/fold_impl.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { /// forward declaration template< int N , typename First , typename Last , typename State , typename ForwardOp > struct fold_impl; template< typename First , typename Last , typename State , typename ForwardOp > struct fold_impl< 0,First,Last,State,ForwardOp > { typedef First iter0; typedef State state0; typedef state0 state; typedef iter0 iterator; }; template< typename First , typename Last , typename State , typename ForwardOp > struct fold_impl< 1,First,Last,State,ForwardOp > { typedef First iter0; typedef State state0; typedef typename apply2< ForwardOp, state0, typename deref::type >::type state1; typedef typename mpl::next::type iter1; typedef state1 state; typedef iter1 iterator; }; template< typename First , typename Last , typename State , typename ForwardOp > struct fold_impl< 2,First,Last,State,ForwardOp > { typedef First iter0; typedef State state0; typedef typename apply2< ForwardOp, state0, typename deref::type >::type state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp, state1, typename deref::type >::type state2; typedef typename mpl::next::type iter2; typedef state2 state; typedef iter2 iterator; }; template< typename First , typename Last , typename State , typename ForwardOp > struct fold_impl< 3,First,Last,State,ForwardOp > { typedef First iter0; typedef State state0; typedef typename apply2< ForwardOp, state0, typename deref::type >::type state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp, state1, typename deref::type >::type state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp, state2, typename deref::type >::type state3; typedef typename mpl::next::type iter3; typedef state3 state; typedef iter3 iterator; }; template< typename First , typename Last , typename State , typename ForwardOp > struct fold_impl< 4,First,Last,State,ForwardOp > { typedef First iter0; typedef State state0; typedef typename apply2< ForwardOp, state0, typename deref::type >::type state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp, state1, typename deref::type >::type state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp, state2, typename deref::type >::type state3; typedef typename mpl::next::type iter3; typedef typename apply2< ForwardOp, state3, typename deref::type >::type state4; typedef typename mpl::next::type iter4; typedef state4 state; typedef iter4 iterator; }; template< int N , typename First , typename Last , typename State , typename ForwardOp > struct fold_impl { typedef fold_impl< 4 , First , Last , State , ForwardOp > chunk_; typedef fold_impl< ( (N - 4) < 0 ? 0 : N - 4 ) , typename chunk_::iterator , Last , typename chunk_::state , ForwardOp > res_; typedef typename res_::state state; typedef typename res_::iterator iterator; }; template< typename First , typename Last , typename State , typename ForwardOp > struct fold_impl< -1,First,Last,State,ForwardOp > : fold_impl< -1 , typename mpl::next::type , Last , typename apply2::type>::type , ForwardOp > { }; template< typename Last , typename State , typename ForwardOp > struct fold_impl< -1,Last,Last,State,ForwardOp > { typedef State state; typedef Last iterator; }; }}} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/gcc/full_lambda.hpp ================================================ // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/aux_/full_lambda.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< bool C1 = false, bool C2 = false, bool C3 = false, bool C4 = false , bool C5 = false > struct lambda_or : true_ { }; template<> struct lambda_or< false,false,false,false,false > : false_ { }; } // namespace aux template< typename T , typename Tag , typename Arity > struct lambda { typedef false_ is_le; typedef T result_; typedef T type; }; template< typename T > struct is_lambda_expression : lambda::is_le { }; template< int N, typename Tag > struct lambda< arg,Tag, int_< -1 > > { typedef true_ is_le; typedef mpl::arg result_; // qualified for the sake of MIPSpro 7.41 typedef mpl::protect type; }; template< typename F , typename Tag > struct lambda< bind0 , Tag , int_<1> > { typedef false_ is_le; typedef bind0< F > result_; typedef result_ type; }; namespace aux { template< typename IsLE, typename Tag , template< typename P1 > class F , typename L1 > struct le_result1 { typedef F< typename L1::type > result_; typedef result_ type; }; template< typename Tag , template< typename P1 > class F , typename L1 > struct le_result1< true_,Tag,F,L1 > { typedef bind1< quote1< F,Tag > , typename L1::result_ > result_; typedef mpl::protect type; }; } // namespace aux template< template< typename P1 > class F , typename T1 , typename Tag > struct lambda< F , Tag , int_<1> > { typedef lambda< T1,Tag > l1; typedef typename l1::is_le is_le1; typedef typename aux::lambda_or< is_le1::value >::type is_le; typedef aux::le_result1< is_le, Tag, F, l1 > le_result_; typedef typename le_result_::result_ result_; typedef typename le_result_::type type; }; template< typename F, typename T1 , typename Tag > struct lambda< bind1< F,T1 > , Tag , int_<2> > { typedef false_ is_le; typedef bind1< F , T1 > result_; typedef result_ type; }; namespace aux { template< typename IsLE, typename Tag , template< typename P1, typename P2 > class F , typename L1, typename L2 > struct le_result2 { typedef F< typename L1::type, typename L2::type > result_; typedef result_ type; }; template< typename Tag , template< typename P1, typename P2 > class F , typename L1, typename L2 > struct le_result2< true_,Tag,F,L1,L2 > { typedef bind2< quote2< F,Tag > , typename L1::result_, typename L2::result_ > result_; typedef mpl::protect type; }; } // namespace aux template< template< typename P1, typename P2 > class F , typename T1, typename T2 , typename Tag > struct lambda< F< T1,T2 > , Tag , int_<2> > { typedef lambda< T1,Tag > l1; typedef lambda< T2,Tag > l2; typedef typename l1::is_le is_le1; typedef typename l2::is_le is_le2; typedef typename aux::lambda_or< is_le1::value, is_le2::value >::type is_le; typedef aux::le_result2< is_le, Tag, F, l1, l2 > le_result_; typedef typename le_result_::result_ result_; typedef typename le_result_::type type; }; template< typename F, typename T1, typename T2 , typename Tag > struct lambda< bind2< F,T1,T2 > , Tag , int_<3> > { typedef false_ is_le; typedef bind2< F , T1, T2 > result_; typedef result_ type; }; namespace aux { template< typename IsLE, typename Tag , template< typename P1, typename P2, typename P3 > class F , typename L1, typename L2, typename L3 > struct le_result3 { typedef F< typename L1::type, typename L2::type, typename L3::type > result_; typedef result_ type; }; template< typename Tag , template< typename P1, typename P2, typename P3 > class F , typename L1, typename L2, typename L3 > struct le_result3< true_,Tag,F,L1,L2,L3 > { typedef bind3< quote3< F,Tag > , typename L1::result_, typename L2::result_, typename L3::result_ > result_; typedef mpl::protect type; }; } // namespace aux template< template< typename P1, typename P2, typename P3 > class F , typename T1, typename T2, typename T3 , typename Tag > struct lambda< F< T1,T2,T3 > , Tag , int_<3> > { typedef lambda< T1,Tag > l1; typedef lambda< T2,Tag > l2; typedef lambda< T3,Tag > l3; typedef typename l1::is_le is_le1; typedef typename l2::is_le is_le2; typedef typename l3::is_le is_le3; typedef typename aux::lambda_or< is_le1::value, is_le2::value, is_le3::value >::type is_le; typedef aux::le_result3< is_le, Tag, F, l1, l2, l3 > le_result_; typedef typename le_result_::result_ result_; typedef typename le_result_::type type; }; template< typename F, typename T1, typename T2, typename T3 , typename Tag > struct lambda< bind3< F,T1,T2,T3 > , Tag , int_<4> > { typedef false_ is_le; typedef bind3< F , T1, T2, T3 > result_; typedef result_ type; }; namespace aux { template< typename IsLE, typename Tag , template< typename P1, typename P2, typename P3, typename P4 > class F , typename L1, typename L2, typename L3, typename L4 > struct le_result4 { typedef F< typename L1::type, typename L2::type, typename L3::type , typename L4::type > result_; typedef result_ type; }; template< typename Tag , template< typename P1, typename P2, typename P3, typename P4 > class F , typename L1, typename L2, typename L3, typename L4 > struct le_result4< true_,Tag,F,L1,L2,L3,L4 > { typedef bind4< quote4< F,Tag > , typename L1::result_, typename L2::result_, typename L3::result_ , typename L4::result_ > result_; typedef mpl::protect type; }; } // namespace aux template< template< typename P1, typename P2, typename P3, typename P4 > class F , typename T1, typename T2, typename T3, typename T4 , typename Tag > struct lambda< F< T1,T2,T3,T4 > , Tag , int_<4> > { typedef lambda< T1,Tag > l1; typedef lambda< T2,Tag > l2; typedef lambda< T3,Tag > l3; typedef lambda< T4,Tag > l4; typedef typename l1::is_le is_le1; typedef typename l2::is_le is_le2; typedef typename l3::is_le is_le3; typedef typename l4::is_le is_le4; typedef typename aux::lambda_or< is_le1::value, is_le2::value, is_le3::value, is_le4::value >::type is_le; typedef aux::le_result4< is_le, Tag, F, l1, l2, l3, l4 > le_result_; typedef typename le_result_::result_ result_; typedef typename le_result_::type type; }; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename Tag > struct lambda< bind4< F,T1,T2,T3,T4 > , Tag , int_<5> > { typedef false_ is_le; typedef bind4< F , T1, T2, T3, T4 > result_; typedef result_ type; }; namespace aux { template< typename IsLE, typename Tag , template< typename P1, typename P2, typename P3, typename P4, typename P5 > class F , typename L1, typename L2, typename L3, typename L4, typename L5 > struct le_result5 { typedef F< typename L1::type, typename L2::type, typename L3::type , typename L4::type, typename L5::type > result_; typedef result_ type; }; template< typename Tag , template< typename P1, typename P2, typename P3, typename P4, typename P5 > class F , typename L1, typename L2, typename L3, typename L4, typename L5 > struct le_result5< true_,Tag,F,L1,L2,L3,L4,L5 > { typedef bind5< quote5< F,Tag > , typename L1::result_, typename L2::result_, typename L3::result_ , typename L4::result_, typename L5::result_ > result_; typedef mpl::protect type; }; } // namespace aux template< template< typename P1, typename P2, typename P3, typename P4 , typename P5 > class F , typename T1, typename T2, typename T3, typename T4, typename T5 , typename Tag > struct lambda< F< T1,T2,T3,T4,T5 > , Tag , int_<5> > { typedef lambda< T1,Tag > l1; typedef lambda< T2,Tag > l2; typedef lambda< T3,Tag > l3; typedef lambda< T4,Tag > l4; typedef lambda< T5,Tag > l5; typedef typename l1::is_le is_le1; typedef typename l2::is_le is_le2; typedef typename l3::is_le is_le3; typedef typename l4::is_le is_le4; typedef typename l5::is_le is_le5; typedef typename aux::lambda_or< is_le1::value, is_le2::value, is_le3::value, is_le4::value , is_le5::value >::type is_le; typedef aux::le_result5< is_le, Tag, F, l1, l2, l3, l4, l5 > le_result_; typedef typename le_result_::result_ result_; typedef typename le_result_::type type; }; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 , typename Tag > struct lambda< bind5< F,T1,T2,T3,T4,T5 > , Tag , int_<6> > { typedef false_ is_le; typedef bind5< F , T1, T2, T3, T4, T5 > result_; typedef result_ type; }; /// special case for 'protect' template< typename T, typename Tag > struct lambda< mpl::protect,Tag, int_<1> > { typedef false_ is_le; typedef mpl::protect result_; typedef result_ type; }; /// specializations for the main 'bind' form template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 , typename Tag > struct lambda< bind< F,T1,T2,T3,T4,T5 > , Tag , int_<6> > { typedef false_ is_le; typedef bind< F,T1,T2,T3,T4,T5 > result_; typedef result_ type; }; template< typename F , typename Tag1 , typename Tag2 , typename Arity > struct lambda< lambda< F,Tag1,Arity > , Tag2 , int_<3> > { typedef lambda< F,Tag2 > l1; typedef lambda< Tag1,Tag2 > l2; typedef typename l1::is_le is_le; typedef bind1< quote1, typename l1::result_ > arity_; typedef lambda< typename if_< is_le,arity_,Arity >::type, Tag2 > l3; typedef aux::le_result3 le_result_; typedef typename le_result_::result_ result_; typedef typename le_result_::type type; }; BOOST_MPL_AUX_NA_SPEC2(2, 3, lambda) }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/gcc/greater.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/greater.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct greater_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< greater_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< greater_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct greater_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct greater_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct greater_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct greater_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct greater : greater_impl< typename greater_tag::type , typename greater_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, greater, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 2, greater) }} namespace boost { namespace mpl { template<> struct greater_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value > BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/gcc/greater_equal.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/greater_equal.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct greater_equal_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< greater_equal_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< greater_equal_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct greater_equal_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct greater_equal_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct greater_equal_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct greater_equal_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct greater_equal : greater_equal_impl< typename greater_equal_tag::type , typename greater_equal_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, greater_equal, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 2, greater_equal) }} namespace boost { namespace mpl { template<> struct greater_equal_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value >= BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/gcc/inherit.hpp ================================================ // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/inherit.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename BOOST_MPL_AUX_NA_PARAM(T1) , typename BOOST_MPL_AUX_NA_PARAM(T2) > struct inherit2 : T1, T2 { typedef inherit2 type; BOOST_MPL_AUX_LAMBDA_SUPPORT(2, inherit2, (T1, T2)) }; template< typename T1 > struct inherit2< T1,empty_base > { typedef T1 type; BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(2, inherit2, (T1, empty_base)) }; template< typename T2 > struct inherit2< empty_base,T2 > { typedef T2 type; BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(2, inherit2, (empty_base, T2)) }; template<> struct inherit2< empty_base,empty_base > { typedef empty_base type; BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(2, inherit2, (empty_base, empty_base)) }; BOOST_MPL_AUX_NA_SPEC(2, inherit2) template< typename T1 = na, typename T2 = na, typename T3 = na > struct inherit3 : inherit2< typename inherit2< T1, T2 >::type , T3 > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 3 , inherit3 , ( T1, T2, T3) ) }; BOOST_MPL_AUX_NA_SPEC(3, inherit3) template< typename T1 = na, typename T2 = na, typename T3 = na, typename T4 = na > struct inherit4 : inherit2< typename inherit3< T1, T2, T3 >::type , T4 > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 4 , inherit4 , ( T1, T2, T3, T4) ) }; BOOST_MPL_AUX_NA_SPEC(4, inherit4) template< typename T1 = na, typename T2 = na, typename T3 = na, typename T4 = na , typename T5 = na > struct inherit5 : inherit2< typename inherit4< T1, T2, T3, T4 >::type , T5 > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , inherit5 , ( T1, T2, T3, T4, T5) ) }; BOOST_MPL_AUX_NA_SPEC(5, inherit5) /// primary template template< typename T1 = empty_base, typename T2 = empty_base , typename T3 = empty_base, typename T4 = empty_base , typename T5 = empty_base > struct inherit : inherit5< T1,T2,T3,T4,T5 > { }; template<> struct inherit< na,na,na,na,na > { template< typename T1 = empty_base, typename T2 = empty_base , typename T3 = empty_base, typename T4 = empty_base , typename T5 = empty_base > struct apply : inherit< T1,T2,T3,T4,T5 > { }; }; BOOST_MPL_AUX_NA_SPEC_LAMBDA(5, inherit) BOOST_MPL_AUX_NA_SPEC_ARITY(5, inherit) BOOST_MPL_AUX_NA_SPEC_TEMPLATE_ARITY(5, 5, inherit) }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/gcc/iter_fold_if_impl.hpp ================================================ // Copyright Aleksey Gurtovoy 2001-2004 // Copyright David Abrahams 2001-2002 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/aux_/iter_fold_if_impl.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< typename Iterator, typename State > struct iter_fold_if_null_step { typedef State state; typedef Iterator iterator; }; template< bool > struct iter_fold_if_step_impl { template< typename Iterator , typename State , typename StateOp , typename IteratorOp > struct result_ { typedef typename apply2< StateOp,State,Iterator >::type state; typedef typename IteratorOp::type iterator; }; }; template<> struct iter_fold_if_step_impl { template< typename Iterator , typename State , typename StateOp , typename IteratorOp > struct result_ { typedef State state; typedef Iterator iterator; }; }; template< typename Iterator , typename State , typename ForwardOp , typename Predicate > struct iter_fold_if_forward_step { typedef typename apply2< Predicate,State,Iterator >::type not_last; typedef typename iter_fold_if_step_impl< BOOST_MPL_AUX_MSVC_VALUE_WKND(not_last)::value >::template result_< Iterator,State,ForwardOp, mpl::next > impl_; typedef typename impl_::state state; typedef typename impl_::iterator iterator; }; template< typename Iterator , typename State , typename BackwardOp , typename Predicate > struct iter_fold_if_backward_step { typedef typename apply2< Predicate,State,Iterator >::type not_last; typedef typename iter_fold_if_step_impl< BOOST_MPL_AUX_MSVC_VALUE_WKND(not_last)::value >::template result_< Iterator,State,BackwardOp, identity > impl_; typedef typename impl_::state state; typedef typename impl_::iterator iterator; }; template< typename Iterator , typename State , typename ForwardOp , typename ForwardPredicate , typename BackwardOp , typename BackwardPredicate > struct iter_fold_if_impl { private: typedef iter_fold_if_null_step< Iterator,State > forward_step0; typedef iter_fold_if_forward_step< typename forward_step0::iterator, typename forward_step0::state, ForwardOp, ForwardPredicate > forward_step1; typedef iter_fold_if_forward_step< typename forward_step1::iterator, typename forward_step1::state, ForwardOp, ForwardPredicate > forward_step2; typedef iter_fold_if_forward_step< typename forward_step2::iterator, typename forward_step2::state, ForwardOp, ForwardPredicate > forward_step3; typedef iter_fold_if_forward_step< typename forward_step3::iterator, typename forward_step3::state, ForwardOp, ForwardPredicate > forward_step4; typedef typename if_< typename forward_step4::not_last , iter_fold_if_impl< typename forward_step4::iterator , typename forward_step4::state , ForwardOp , ForwardPredicate , BackwardOp , BackwardPredicate > , iter_fold_if_null_step< typename forward_step4::iterator , typename forward_step4::state > >::type backward_step4; typedef iter_fold_if_backward_step< typename forward_step3::iterator, typename backward_step4::state, BackwardOp, BackwardPredicate > backward_step3; typedef iter_fold_if_backward_step< typename forward_step2::iterator, typename backward_step3::state, BackwardOp, BackwardPredicate > backward_step2; typedef iter_fold_if_backward_step< typename forward_step1::iterator, typename backward_step2::state, BackwardOp, BackwardPredicate > backward_step1; typedef iter_fold_if_backward_step< typename forward_step0::iterator, typename backward_step1::state, BackwardOp, BackwardPredicate > backward_step0; public: typedef typename backward_step0::state state; typedef typename backward_step4::iterator iterator; }; }}} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/gcc/iter_fold_impl.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/aux_/iter_fold_impl.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { /// forward declaration template< int N , typename First , typename Last , typename State , typename ForwardOp > struct iter_fold_impl; template< typename First , typename Last , typename State , typename ForwardOp > struct iter_fold_impl< 0,First,Last,State,ForwardOp > { typedef First iter0; typedef State state0; typedef state0 state; typedef iter0 iterator; }; template< typename First , typename Last , typename State , typename ForwardOp > struct iter_fold_impl< 1,First,Last,State,ForwardOp > { typedef First iter0; typedef State state0; typedef typename apply2< ForwardOp,state0,iter0 >::type state1; typedef typename mpl::next::type iter1; typedef state1 state; typedef iter1 iterator; }; template< typename First , typename Last , typename State , typename ForwardOp > struct iter_fold_impl< 2,First,Last,State,ForwardOp > { typedef First iter0; typedef State state0; typedef typename apply2< ForwardOp,state0,iter0 >::type state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp,state1,iter1 >::type state2; typedef typename mpl::next::type iter2; typedef state2 state; typedef iter2 iterator; }; template< typename First , typename Last , typename State , typename ForwardOp > struct iter_fold_impl< 3,First,Last,State,ForwardOp > { typedef First iter0; typedef State state0; typedef typename apply2< ForwardOp,state0,iter0 >::type state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp,state1,iter1 >::type state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp,state2,iter2 >::type state3; typedef typename mpl::next::type iter3; typedef state3 state; typedef iter3 iterator; }; template< typename First , typename Last , typename State , typename ForwardOp > struct iter_fold_impl< 4,First,Last,State,ForwardOp > { typedef First iter0; typedef State state0; typedef typename apply2< ForwardOp,state0,iter0 >::type state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp,state1,iter1 >::type state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp,state2,iter2 >::type state3; typedef typename mpl::next::type iter3; typedef typename apply2< ForwardOp,state3,iter3 >::type state4; typedef typename mpl::next::type iter4; typedef state4 state; typedef iter4 iterator; }; template< int N , typename First , typename Last , typename State , typename ForwardOp > struct iter_fold_impl { typedef iter_fold_impl< 4 , First , Last , State , ForwardOp > chunk_; typedef iter_fold_impl< ( (N - 4) < 0 ? 0 : N - 4 ) , typename chunk_::iterator , Last , typename chunk_::state , ForwardOp > res_; typedef typename res_::state state; typedef typename res_::iterator iterator; }; template< typename First , typename Last , typename State , typename ForwardOp > struct iter_fold_impl< -1,First,Last,State,ForwardOp > : iter_fold_impl< -1 , typename mpl::next::type , Last , typename apply2< ForwardOp,State,First >::type , ForwardOp > { }; template< typename Last , typename State , typename ForwardOp > struct iter_fold_impl< -1,Last,Last,State,ForwardOp > { typedef State state; typedef Last iterator; }; }}} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/gcc/lambda_no_ctps.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/aux_/lambda_no_ctps.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< bool C1 = false, bool C2 = false, bool C3 = false, bool C4 = false , bool C5 = false > struct lambda_or : true_ { }; template<> struct lambda_or< false,false,false,false,false > : false_ { }; template< typename Arity > struct lambda_impl { template< typename T, typename Tag, typename Protect > struct result_ { typedef T type; typedef is_placeholder is_le; }; }; template<> struct lambda_impl< int_<1> > { template< typename F, typename Tag, typename Protect > struct result_ { typedef lambda< typename F::arg1, Tag, false_ > l1; typedef typename l1::is_le is_le1; typedef aux::lambda_or< BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value > is_le; typedef bind1< typename F::rebind , typename l1::type > bind_; typedef typename if_< is_le , if_< Protect, mpl::protect, bind_ > , identity >::type type_; typedef typename type_::type type; }; }; template<> struct lambda_impl< int_<2> > { template< typename F, typename Tag, typename Protect > struct result_ { typedef lambda< typename F::arg1, Tag, false_ > l1; typedef lambda< typename F::arg2, Tag, false_ > l2; typedef typename l1::is_le is_le1; typedef typename l2::is_le is_le2; typedef aux::lambda_or< BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value > is_le; typedef bind2< typename F::rebind , typename l1::type, typename l2::type > bind_; typedef typename if_< is_le , if_< Protect, mpl::protect, bind_ > , identity >::type type_; typedef typename type_::type type; }; }; template<> struct lambda_impl< int_<3> > { template< typename F, typename Tag, typename Protect > struct result_ { typedef lambda< typename F::arg1, Tag, false_ > l1; typedef lambda< typename F::arg2, Tag, false_ > l2; typedef lambda< typename F::arg3, Tag, false_ > l3; typedef typename l1::is_le is_le1; typedef typename l2::is_le is_le2; typedef typename l3::is_le is_le3; typedef aux::lambda_or< BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le3)::value > is_le; typedef bind3< typename F::rebind , typename l1::type, typename l2::type, typename l3::type > bind_; typedef typename if_< is_le , if_< Protect, mpl::protect, bind_ > , identity >::type type_; typedef typename type_::type type; }; }; template<> struct lambda_impl< int_<4> > { template< typename F, typename Tag, typename Protect > struct result_ { typedef lambda< typename F::arg1, Tag, false_ > l1; typedef lambda< typename F::arg2, Tag, false_ > l2; typedef lambda< typename F::arg3, Tag, false_ > l3; typedef lambda< typename F::arg4, Tag, false_ > l4; typedef typename l1::is_le is_le1; typedef typename l2::is_le is_le2; typedef typename l3::is_le is_le3; typedef typename l4::is_le is_le4; typedef aux::lambda_or< BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le3)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le4)::value > is_le; typedef bind4< typename F::rebind , typename l1::type, typename l2::type, typename l3::type , typename l4::type > bind_; typedef typename if_< is_le , if_< Protect, mpl::protect, bind_ > , identity >::type type_; typedef typename type_::type type; }; }; template<> struct lambda_impl< int_<5> > { template< typename F, typename Tag, typename Protect > struct result_ { typedef lambda< typename F::arg1, Tag, false_ > l1; typedef lambda< typename F::arg2, Tag, false_ > l2; typedef lambda< typename F::arg3, Tag, false_ > l3; typedef lambda< typename F::arg4, Tag, false_ > l4; typedef lambda< typename F::arg5, Tag, false_ > l5; typedef typename l1::is_le is_le1; typedef typename l2::is_le is_le2; typedef typename l3::is_le is_le3; typedef typename l4::is_le is_le4; typedef typename l5::is_le is_le5; typedef aux::lambda_or< BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le3)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le4)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le5)::value > is_le; typedef bind5< typename F::rebind , typename l1::type, typename l2::type, typename l3::type , typename l4::type, typename l5::type > bind_; typedef typename if_< is_le , if_< Protect, mpl::protect, bind_ > , identity >::type type_; typedef typename type_::type type; }; }; } // namespace aux template< typename T , typename Tag , typename Protect > struct lambda { /// Metafunction forwarding confuses MSVC 6.x typedef typename aux::template_arity::type arity_; typedef typename aux::lambda_impl ::template result_< T,Tag,Protect > l_; typedef typename l_::type type; typedef typename l_::is_le is_le; BOOST_MPL_AUX_LAMBDA_SUPPORT(3, lambda, (T, Tag, Protect)) }; BOOST_MPL_AUX_NA_SPEC2(1, 3, lambda) template< typename T > struct is_lambda_expression : lambda::is_le { }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/gcc/less.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/less.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct less_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< less_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< less_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct less_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct less_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct less_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct less_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct less : less_impl< typename less_tag::type , typename less_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, less, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 2, less) }} namespace boost { namespace mpl { template<> struct less_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N2)::value > BOOST_MPL_AUX_VALUE_WKND(N1)::value ) > { }; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/gcc/less_equal.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/less_equal.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct less_equal_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< less_equal_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< less_equal_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct less_equal_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct less_equal_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct less_equal_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct less_equal_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct less_equal : less_equal_impl< typename less_equal_tag::type , typename less_equal_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, less_equal, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 2, less_equal) }} namespace boost { namespace mpl { template<> struct less_equal_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value <= BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/gcc/list.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/list.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na , typename T12 = na, typename T13 = na, typename T14 = na , typename T15 = na, typename T16 = na, typename T17 = na , typename T18 = na, typename T19 = na > struct list; template< > struct list< na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : list0< > { typedef list0< >::type type; }; template< typename T0 > struct list< T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : list1 { typedef typename list1::type type; }; template< typename T0, typename T1 > struct list< T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : list2< T0,T1 > { typedef typename list2< T0,T1 >::type type; }; template< typename T0, typename T1, typename T2 > struct list< T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : list3< T0,T1,T2 > { typedef typename list3< T0,T1,T2 >::type type; }; template< typename T0, typename T1, typename T2, typename T3 > struct list< T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : list4< T0,T1,T2,T3 > { typedef typename list4< T0,T1,T2,T3 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 > struct list< T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : list5< T0,T1,T2,T3,T4 > { typedef typename list5< T0,T1,T2,T3,T4 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct list< T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : list6< T0,T1,T2,T3,T4,T5 > { typedef typename list6< T0,T1,T2,T3,T4,T5 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6 > struct list< T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na , na, na, na > : list7< T0,T1,T2,T3,T4,T5,T6 > { typedef typename list7< T0,T1,T2,T3,T4,T5,T6 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7 > struct list< T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na , na, na, na > : list8< T0,T1,T2,T3,T4,T5,T6,T7 > { typedef typename list8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8 > struct list< T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na , na, na, na > : list9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > { typedef typename list9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 > struct list< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na , na, na, na > : list10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > { typedef typename list10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10 > struct list< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na , na, na, na > : list11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > { typedef typename list11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11 > struct list< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na , na, na, na, na > : list12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > { typedef typename list12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12 > struct list< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na , na, na, na, na > : list13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > { typedef typename list13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13 > struct list< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na , na, na, na, na > : list14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > { typedef typename list14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 > struct list< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na , na, na, na, na > : list15< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 > { typedef typename list15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15 > struct list< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, na, na, na, na > : list16< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15 > { typedef typename list16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16 > struct list< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, na, na, na > : list17< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16 > { typedef typename list17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17 > struct list< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, na, na > : list18< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17 > { typedef typename list18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18 > struct list< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18, na > : list19< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18 > { typedef typename list19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type; }; /// primary template (not a specialization!) template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct list : list20< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18, T19 > { typedef typename list20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/gcc/list_c.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/list_c.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename T, long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX , long C3 = LONG_MAX, long C4 = LONG_MAX, long C5 = LONG_MAX , long C6 = LONG_MAX, long C7 = LONG_MAX, long C8 = LONG_MAX , long C9 = LONG_MAX, long C10 = LONG_MAX, long C11 = LONG_MAX , long C12 = LONG_MAX, long C13 = LONG_MAX, long C14 = LONG_MAX , long C15 = LONG_MAX, long C16 = LONG_MAX, long C17 = LONG_MAX , long C18 = LONG_MAX, long C19 = LONG_MAX > struct list_c; template< typename T > struct list_c< T, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list0_c { typedef typename list0_c::type type; }; template< typename T, long C0 > struct list_c< T, C0, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list1_c< T,C0 > { typedef typename list1_c< T,C0 >::type type; }; template< typename T, long C0, long C1 > struct list_c< T, C0, C1, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list2_c< T,C0,C1 > { typedef typename list2_c< T,C0,C1 >::type type; }; template< typename T, long C0, long C1, long C2 > struct list_c< T, C0, C1, C2, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list3_c< T,C0,C1,C2 > { typedef typename list3_c< T,C0,C1,C2 >::type type; }; template< typename T, long C0, long C1, long C2, long C3 > struct list_c< T, C0, C1, C2, C3, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list4_c< T,C0,C1,C2,C3 > { typedef typename list4_c< T,C0,C1,C2,C3 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4 > struct list_c< T, C0, C1, C2, C3, C4, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list5_c< T,C0,C1,C2,C3,C4 > { typedef typename list5_c< T,C0,C1,C2,C3,C4 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 > struct list_c< T, C0, C1, C2, C3, C4, C5, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX > : list6_c< T,C0,C1,C2,C3,C4,C5 > { typedef typename list6_c< T,C0,C1,C2,C3,C4,C5 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX > : list7_c< T,C0,C1,C2,C3,C4,C5,C6 > { typedef typename list7_c< T,C0,C1,C2,C3,C4,C5,C6 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, C7, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX > : list8_c< T,C0,C1,C2,C3,C4,C5,C6,C7 > { typedef typename list8_c< T,C0,C1,C2,C3,C4,C5,C6,C7 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX > : list9_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8 > { typedef typename list9_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX > : list10_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 > { typedef typename list10_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list11_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 > { typedef typename list11_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list12_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 > { typedef typename list12_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list13_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 > { typedef typename list13_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list14_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 > { typedef typename list14_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list15_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 > { typedef typename list15_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list16_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15 > { typedef typename list16_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, LONG_MAX, LONG_MAX, LONG_MAX > : list17_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16 > { typedef typename list17_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, C17, LONG_MAX, LONG_MAX > : list18_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, C17 > { typedef typename list18_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, C17, C18, LONG_MAX > : list19_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, C17, C18 > { typedef typename list19_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18 >::type type; }; /// primary template (not a specialization!) template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct list_c : list20_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, C17, C18, C19 > { typedef typename list20_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19 >::type type; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/gcc/map.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/map.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na , typename T12 = na, typename T13 = na, typename T14 = na , typename T15 = na, typename T16 = na, typename T17 = na , typename T18 = na, typename T19 = na > struct map; template< > struct map< na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : map0< > { typedef map0< >::type type; }; template< typename T0 > struct map< T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : map1 { typedef typename map1::type type; }; template< typename T0, typename T1 > struct map< T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : map2< T0,T1 > { typedef typename map2< T0,T1 >::type type; }; template< typename T0, typename T1, typename T2 > struct map< T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : map3< T0,T1,T2 > { typedef typename map3< T0,T1,T2 >::type type; }; template< typename T0, typename T1, typename T2, typename T3 > struct map< T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : map4< T0,T1,T2,T3 > { typedef typename map4< T0,T1,T2,T3 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 > struct map< T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : map5< T0,T1,T2,T3,T4 > { typedef typename map5< T0,T1,T2,T3,T4 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct map< T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : map6< T0,T1,T2,T3,T4,T5 > { typedef typename map6< T0,T1,T2,T3,T4,T5 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6 > struct map< T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na , na, na, na > : map7< T0,T1,T2,T3,T4,T5,T6 > { typedef typename map7< T0,T1,T2,T3,T4,T5,T6 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7 > struct map< T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na , na, na, na > : map8< T0,T1,T2,T3,T4,T5,T6,T7 > { typedef typename map8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8 > struct map< T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na , na, na, na > : map9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > { typedef typename map9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 > struct map< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na , na, na, na > : map10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > { typedef typename map10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10 > struct map< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na , na, na, na > : map11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > { typedef typename map11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11 > struct map< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na , na, na, na, na > : map12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > { typedef typename map12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12 > struct map< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na , na, na, na, na > : map13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > { typedef typename map13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13 > struct map< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na , na, na, na, na > : map14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > { typedef typename map14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 > struct map< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na , na, na, na, na > : map15< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 > { typedef typename map15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15 > struct map< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, na, na, na, na > : map16< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15 > { typedef typename map16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16 > struct map< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, na, na, na > : map17< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16 > { typedef typename map17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17 > struct map< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, na, na > : map18< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17 > { typedef typename map18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18 > struct map< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18, na > : map19< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18 > { typedef typename map19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type; }; /// primary template (not a specialization!) template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct map : map20< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18, T19 > { typedef typename map20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/gcc/minus.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/minus.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct minus_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< minus_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< minus_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct minus_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct minus_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct minus_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct minus_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) , typename N3 = na, typename N4 = na, typename N5 = na > struct minus : minus< minus< minus< minus< N1,N2 >, N3>, N4>, N5> { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , minus , ( N1, N2, N3, N4, N5 ) ) }; template< typename N1, typename N2, typename N3, typename N4 > struct minus< N1,N2,N3,N4,na > : minus< minus< minus< N1,N2 >, N3>, N4> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , minus , ( N1, N2, N3, N4, na ) ) }; template< typename N1, typename N2, typename N3 > struct minus< N1,N2,N3,na,na > : minus< minus< N1,N2 >, N3> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , minus , ( N1, N2, N3, na, na ) ) }; template< typename N1, typename N2 > struct minus< N1,N2,na,na,na > : minus_impl< typename minus_tag::type , typename minus_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , minus , ( N1, N2, na, na, na ) ) }; BOOST_MPL_AUX_NA_SPEC2(2, 5, minus) }} namespace boost { namespace mpl { template<> struct minus_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : integral_c< typename aux::largest_int< typename N1::value_type , typename N2::value_type >::type , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value - BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/gcc/modulus.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/modulus.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct modulus_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< modulus_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< modulus_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct modulus_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct modulus_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct modulus_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct modulus_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct modulus : modulus_impl< typename modulus_tag::type , typename modulus_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, modulus, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 2, modulus) }} namespace boost { namespace mpl { template<> struct modulus_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : integral_c< typename aux::largest_int< typename N1::value_type , typename N2::value_type >::type , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value % BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/gcc/not_equal_to.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/not_equal_to.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct not_equal_to_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< not_equal_to_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< not_equal_to_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct not_equal_to_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct not_equal_to_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct not_equal_to_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct not_equal_to_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct not_equal_to : not_equal_to_impl< typename not_equal_to_tag::type , typename not_equal_to_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, not_equal_to, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 2, not_equal_to) }} namespace boost { namespace mpl { template<> struct not_equal_to_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value != BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/gcc/or.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/or.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< bool C_, typename T1, typename T2, typename T3, typename T4 > struct or_impl : true_ { }; template< typename T1, typename T2, typename T3, typename T4 > struct or_impl< false,T1,T2,T3,T4 > : or_impl< BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value , T2, T3, T4 , false_ > { }; template<> struct or_impl< false , false_, false_, false_, false_ > : false_ { }; } // namespace aux template< typename BOOST_MPL_AUX_NA_PARAM(T1) , typename BOOST_MPL_AUX_NA_PARAM(T2) , typename T3 = false_, typename T4 = false_, typename T5 = false_ > struct or_ : aux::or_impl< BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value , T2, T3, T4, T5 > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , or_ , ( T1, T2, T3, T4, T5) ) }; BOOST_MPL_AUX_NA_SPEC2( 2 , 5 , or_ ) }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/gcc/placeholders.hpp ================================================ // Copyright Aleksey Gurtovoy 2001-2004 // Copyright Peter Dimov 2001-2003 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/placeholders.hpp" header // -- DO NOT modify by hand! BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg< -1 > _; BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE namespace boost { namespace mpl { BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_) namespace placeholders { using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_; } }} /// agurt, 17/mar/02: one more placeholder for the last 'apply#' /// specialization BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg<1> _1; BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE namespace boost { namespace mpl { BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_1) namespace placeholders { using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_1; } }} BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg<2> _2; BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE namespace boost { namespace mpl { BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_2) namespace placeholders { using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_2; } }} BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg<3> _3; BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE namespace boost { namespace mpl { BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_3) namespace placeholders { using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_3; } }} BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg<4> _4; BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE namespace boost { namespace mpl { BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_4) namespace placeholders { using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_4; } }} BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg<5> _5; BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE namespace boost { namespace mpl { BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_5) namespace placeholders { using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_5; } }} BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg<6> _6; BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE namespace boost { namespace mpl { BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_6) namespace placeholders { using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_6; } }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/gcc/plus.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/plus.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct plus_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< plus_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< plus_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct plus_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct plus_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct plus_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct plus_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) , typename N3 = na, typename N4 = na, typename N5 = na > struct plus : plus< plus< plus< plus< N1,N2 >, N3>, N4>, N5> { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , plus , ( N1, N2, N3, N4, N5 ) ) }; template< typename N1, typename N2, typename N3, typename N4 > struct plus< N1,N2,N3,N4,na > : plus< plus< plus< N1,N2 >, N3>, N4> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , plus , ( N1, N2, N3, N4, na ) ) }; template< typename N1, typename N2, typename N3 > struct plus< N1,N2,N3,na,na > : plus< plus< N1,N2 >, N3> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , plus , ( N1, N2, N3, na, na ) ) }; template< typename N1, typename N2 > struct plus< N1,N2,na,na,na > : plus_impl< typename plus_tag::type , typename plus_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , plus , ( N1, N2, na, na, na ) ) }; BOOST_MPL_AUX_NA_SPEC2(2, 5, plus) }} namespace boost { namespace mpl { template<> struct plus_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : integral_c< typename aux::largest_int< typename N1::value_type , typename N2::value_type >::type , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/gcc/quote.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/quote.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename T, bool has_type_ > struct quote_impl { typedef typename T::type type; }; template< typename T > struct quote_impl< T,false > { typedef T type; }; template< template< typename P1 > class F , typename Tag = void_ > struct quote1 { template< typename U1 > struct apply : quote_impl< F , aux::has_type< F >::value > { }; }; template< template< typename P1, typename P2 > class F , typename Tag = void_ > struct quote2 { template< typename U1, typename U2 > struct apply : quote_impl< F< U1,U2 > , aux::has_type< F< U1,U2 > >::value > { }; }; template< template< typename P1, typename P2, typename P3 > class F , typename Tag = void_ > struct quote3 { template< typename U1, typename U2, typename U3 > struct apply : quote_impl< F< U1,U2,U3 > , aux::has_type< F< U1,U2,U3 > >::value > { }; }; template< template< typename P1, typename P2, typename P3, typename P4 > class F , typename Tag = void_ > struct quote4 { template< typename U1, typename U2, typename U3, typename U4 > struct apply : quote_impl< F< U1,U2,U3,U4 > , aux::has_type< F< U1,U2,U3,U4 > >::value > { }; }; template< template< typename P1, typename P2, typename P3, typename P4 , typename P5 > class F , typename Tag = void_ > struct quote5 { template< typename U1, typename U2, typename U3, typename U4 , typename U5 > struct apply : quote_impl< F< U1,U2,U3,U4,U5 > , aux::has_type< F< U1,U2,U3,U4,U5 > >::value > { }; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/gcc/reverse_fold_impl.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/aux_/reverse_fold_impl.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { /// forward declaration template< long N , typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_fold_impl; template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_fold_impl< 0,First,Last,State,BackwardOp,ForwardOp > { typedef First iter0; typedef State fwd_state0; typedef fwd_state0 bkwd_state0; typedef bkwd_state0 state; typedef iter0 iterator; }; template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_fold_impl< 1,First,Last,State,BackwardOp,ForwardOp > { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; typedef typename mpl::next::type iter1; typedef fwd_state1 bkwd_state1; typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; typedef bkwd_state0 state; typedef iter1 iterator; }; template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_fold_impl< 2,First,Last,State,BackwardOp,ForwardOp > { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp, fwd_state1, typename deref::type >::type fwd_state2; typedef typename mpl::next::type iter2; typedef fwd_state2 bkwd_state2; typedef typename apply2< BackwardOp, bkwd_state2, typename deref::type >::type bkwd_state1; typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; typedef bkwd_state0 state; typedef iter2 iterator; }; template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_fold_impl< 3,First,Last,State,BackwardOp,ForwardOp > { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp, fwd_state1, typename deref::type >::type fwd_state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp, fwd_state2, typename deref::type >::type fwd_state3; typedef typename mpl::next::type iter3; typedef fwd_state3 bkwd_state3; typedef typename apply2< BackwardOp, bkwd_state3, typename deref::type >::type bkwd_state2; typedef typename apply2< BackwardOp, bkwd_state2, typename deref::type >::type bkwd_state1; typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; typedef bkwd_state0 state; typedef iter3 iterator; }; template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_fold_impl< 4,First,Last,State,BackwardOp,ForwardOp > { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp, fwd_state1, typename deref::type >::type fwd_state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp, fwd_state2, typename deref::type >::type fwd_state3; typedef typename mpl::next::type iter3; typedef typename apply2< ForwardOp, fwd_state3, typename deref::type >::type fwd_state4; typedef typename mpl::next::type iter4; typedef fwd_state4 bkwd_state4; typedef typename apply2< BackwardOp, bkwd_state4, typename deref::type >::type bkwd_state3; typedef typename apply2< BackwardOp, bkwd_state3, typename deref::type >::type bkwd_state2; typedef typename apply2< BackwardOp, bkwd_state2, typename deref::type >::type bkwd_state1; typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; typedef bkwd_state0 state; typedef iter4 iterator; }; template< long N , typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_fold_impl { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp, fwd_state1, typename deref::type >::type fwd_state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp, fwd_state2, typename deref::type >::type fwd_state3; typedef typename mpl::next::type iter3; typedef typename apply2< ForwardOp, fwd_state3, typename deref::type >::type fwd_state4; typedef typename mpl::next::type iter4; typedef reverse_fold_impl< ( (N - 4) < 0 ? 0 : N - 4 ) , iter4 , Last , fwd_state4 , BackwardOp , ForwardOp > nested_chunk; typedef typename nested_chunk::state bkwd_state4; typedef typename apply2< BackwardOp, bkwd_state4, typename deref::type >::type bkwd_state3; typedef typename apply2< BackwardOp, bkwd_state3, typename deref::type >::type bkwd_state2; typedef typename apply2< BackwardOp, bkwd_state2, typename deref::type >::type bkwd_state1; typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; typedef bkwd_state0 state; typedef typename nested_chunk::iterator iterator; }; template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_fold_impl< -1,First,Last,State,BackwardOp,ForwardOp > { typedef reverse_fold_impl< -1 , typename mpl::next::type , Last , typename apply2::type>::type , BackwardOp , ForwardOp > nested_step; typedef typename apply2< BackwardOp , typename nested_step::state , typename deref::type >::type state; typedef typename nested_step::iterator iterator; }; template< typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_fold_impl< -1,Last,Last,State,BackwardOp,ForwardOp > { typedef State state; typedef Last iterator; }; }}} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/gcc/reverse_iter_fold_impl.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/aux_/reverse_iter_fold_impl.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { /// forward declaration template< long N , typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_iter_fold_impl; template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_iter_fold_impl< 0,First,Last,State,BackwardOp,ForwardOp > { typedef First iter0; typedef State fwd_state0; typedef fwd_state0 bkwd_state0; typedef bkwd_state0 state; typedef iter0 iterator; }; template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_iter_fold_impl< 1,First,Last,State,BackwardOp,ForwardOp > { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; typedef typename mpl::next::type iter1; typedef fwd_state1 bkwd_state1; typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; typedef bkwd_state0 state; typedef iter1 iterator; }; template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_iter_fold_impl< 2,First,Last,State,BackwardOp,ForwardOp > { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; typedef typename mpl::next::type iter2; typedef fwd_state2 bkwd_state2; typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1; typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; typedef bkwd_state0 state; typedef iter2 iterator; }; template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_iter_fold_impl< 3,First,Last,State,BackwardOp,ForwardOp > { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp,fwd_state2,iter2 >::type fwd_state3; typedef typename mpl::next::type iter3; typedef fwd_state3 bkwd_state3; typedef typename apply2< BackwardOp,bkwd_state3,iter2 >::type bkwd_state2; typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1; typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; typedef bkwd_state0 state; typedef iter3 iterator; }; template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_iter_fold_impl< 4,First,Last,State,BackwardOp,ForwardOp > { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp,fwd_state2,iter2 >::type fwd_state3; typedef typename mpl::next::type iter3; typedef typename apply2< ForwardOp,fwd_state3,iter3 >::type fwd_state4; typedef typename mpl::next::type iter4; typedef fwd_state4 bkwd_state4; typedef typename apply2< BackwardOp,bkwd_state4,iter3 >::type bkwd_state3; typedef typename apply2< BackwardOp,bkwd_state3,iter2 >::type bkwd_state2; typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1; typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; typedef bkwd_state0 state; typedef iter4 iterator; }; template< long N , typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_iter_fold_impl { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp,fwd_state2,iter2 >::type fwd_state3; typedef typename mpl::next::type iter3; typedef typename apply2< ForwardOp,fwd_state3,iter3 >::type fwd_state4; typedef typename mpl::next::type iter4; typedef reverse_iter_fold_impl< ( (N - 4) < 0 ? 0 : N - 4 ) , iter4 , Last , fwd_state4 , BackwardOp , ForwardOp > nested_chunk; typedef typename nested_chunk::state bkwd_state4; typedef typename apply2< BackwardOp,bkwd_state4,iter3 >::type bkwd_state3; typedef typename apply2< BackwardOp,bkwd_state3,iter2 >::type bkwd_state2; typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1; typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; typedef bkwd_state0 state; typedef typename nested_chunk::iterator iterator; }; template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_iter_fold_impl< -1,First,Last,State,BackwardOp,ForwardOp > { typedef reverse_iter_fold_impl< -1 , typename mpl::next::type , Last , typename apply2< ForwardOp,State,First >::type , BackwardOp , ForwardOp > nested_step; typedef typename apply2< BackwardOp , typename nested_step::state , First >::type state; typedef typename nested_step::iterator iterator; }; template< typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_iter_fold_impl< -1,Last,Last,State,BackwardOp,ForwardOp > { typedef State state; typedef Last iterator; }; }}} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/gcc/set.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/set.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na , typename T12 = na, typename T13 = na, typename T14 = na , typename T15 = na, typename T16 = na, typename T17 = na , typename T18 = na, typename T19 = na > struct set; template< > struct set< na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : set0< > { typedef set0< >::type type; }; template< typename T0 > struct set< T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : set1 { typedef typename set1::type type; }; template< typename T0, typename T1 > struct set< T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : set2< T0,T1 > { typedef typename set2< T0,T1 >::type type; }; template< typename T0, typename T1, typename T2 > struct set< T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : set3< T0,T1,T2 > { typedef typename set3< T0,T1,T2 >::type type; }; template< typename T0, typename T1, typename T2, typename T3 > struct set< T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : set4< T0,T1,T2,T3 > { typedef typename set4< T0,T1,T2,T3 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 > struct set< T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : set5< T0,T1,T2,T3,T4 > { typedef typename set5< T0,T1,T2,T3,T4 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct set< T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : set6< T0,T1,T2,T3,T4,T5 > { typedef typename set6< T0,T1,T2,T3,T4,T5 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6 > struct set< T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na , na, na, na > : set7< T0,T1,T2,T3,T4,T5,T6 > { typedef typename set7< T0,T1,T2,T3,T4,T5,T6 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7 > struct set< T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na , na, na, na > : set8< T0,T1,T2,T3,T4,T5,T6,T7 > { typedef typename set8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8 > struct set< T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na , na, na, na > : set9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > { typedef typename set9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 > struct set< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na , na, na, na > : set10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > { typedef typename set10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10 > struct set< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na , na, na, na > : set11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > { typedef typename set11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11 > struct set< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na , na, na, na, na > : set12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > { typedef typename set12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12 > struct set< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na , na, na, na, na > : set13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > { typedef typename set13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13 > struct set< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na , na, na, na, na > : set14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > { typedef typename set14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 > struct set< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na , na, na, na, na > : set15< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 > { typedef typename set15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15 > struct set< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, na, na, na, na > : set16< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15 > { typedef typename set16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16 > struct set< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, na, na, na > : set17< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16 > { typedef typename set17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17 > struct set< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, na, na > : set18< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17 > { typedef typename set18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18 > struct set< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18, na > : set19< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18 > { typedef typename set19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type; }; /// primary template (not a specialization!) template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct set : set20< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18, T19 > { typedef typename set20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/gcc/set_c.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/set_c.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename T, long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX , long C3 = LONG_MAX, long C4 = LONG_MAX, long C5 = LONG_MAX , long C6 = LONG_MAX, long C7 = LONG_MAX, long C8 = LONG_MAX , long C9 = LONG_MAX, long C10 = LONG_MAX, long C11 = LONG_MAX , long C12 = LONG_MAX, long C13 = LONG_MAX, long C14 = LONG_MAX , long C15 = LONG_MAX, long C16 = LONG_MAX, long C17 = LONG_MAX , long C18 = LONG_MAX, long C19 = LONG_MAX > struct set_c; template< typename T > struct set_c< T, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : set0_c { typedef typename set0_c::type type; }; template< typename T, long C0 > struct set_c< T, C0, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : set1_c< T,C0 > { typedef typename set1_c< T,C0 >::type type; }; template< typename T, long C0, long C1 > struct set_c< T, C0, C1, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : set2_c< T,C0,C1 > { typedef typename set2_c< T,C0,C1 >::type type; }; template< typename T, long C0, long C1, long C2 > struct set_c< T, C0, C1, C2, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : set3_c< T,C0,C1,C2 > { typedef typename set3_c< T,C0,C1,C2 >::type type; }; template< typename T, long C0, long C1, long C2, long C3 > struct set_c< T, C0, C1, C2, C3, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : set4_c< T,C0,C1,C2,C3 > { typedef typename set4_c< T,C0,C1,C2,C3 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4 > struct set_c< T, C0, C1, C2, C3, C4, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : set5_c< T,C0,C1,C2,C3,C4 > { typedef typename set5_c< T,C0,C1,C2,C3,C4 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 > struct set_c< T, C0, C1, C2, C3, C4, C5, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX > : set6_c< T,C0,C1,C2,C3,C4,C5 > { typedef typename set6_c< T,C0,C1,C2,C3,C4,C5 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX > : set7_c< T,C0,C1,C2,C3,C4,C5,C6 > { typedef typename set7_c< T,C0,C1,C2,C3,C4,C5,C6 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, C7, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX > : set8_c< T,C0,C1,C2,C3,C4,C5,C6,C7 > { typedef typename set8_c< T,C0,C1,C2,C3,C4,C5,C6,C7 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX > : set9_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8 > { typedef typename set9_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX > : set10_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 > { typedef typename set10_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : set11_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 > { typedef typename set11_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : set12_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 > { typedef typename set12_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : set13_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 > { typedef typename set13_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : set14_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 > { typedef typename set14_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : set15_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 > { typedef typename set15_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : set16_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15 > { typedef typename set16_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, LONG_MAX, LONG_MAX, LONG_MAX > : set17_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16 > { typedef typename set17_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, C17, LONG_MAX, LONG_MAX > : set18_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, C17 > { typedef typename set18_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, C17, C18, LONG_MAX > : set19_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, C17, C18 > { typedef typename set19_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18 >::type type; }; /// primary template (not a specialization!) template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct set_c : set20_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, C17, C18, C19 > { typedef typename set20_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19 >::type type; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/gcc/shift_left.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // Copyright Jaap Suter 2003 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/shift_left.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct shift_left_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< shift_left_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< shift_left_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct shift_left_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct shift_left_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct shift_left_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct shift_left_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct shift_left : shift_left_impl< typename shift_left_tag::type , typename shift_left_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, shift_left, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 2, shift_left) }} namespace boost { namespace mpl { template<> struct shift_left_impl< integral_c_tag,integral_c_tag > { template< typename N, typename S > struct apply : integral_c< typename N::value_type , ( BOOST_MPL_AUX_VALUE_WKND(N)::value << BOOST_MPL_AUX_VALUE_WKND(S)::value ) > { }; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/gcc/shift_right.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // Copyright Jaap Suter 2003 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/shift_right.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct shift_right_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< shift_right_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< shift_right_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct shift_right_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct shift_right_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct shift_right_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct shift_right_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct shift_right : shift_right_impl< typename shift_right_tag::type , typename shift_right_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, shift_right, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 2, shift_right) }} namespace boost { namespace mpl { template<> struct shift_right_impl< integral_c_tag,integral_c_tag > { template< typename N, typename S > struct apply : integral_c< typename N::value_type , ( BOOST_MPL_AUX_VALUE_WKND(N)::value >> BOOST_MPL_AUX_VALUE_WKND(S)::value ) > { }; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/gcc/template_arity.hpp ================================================ // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // *Preprocessed* version of the main "template_arity.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< int N > struct arity_tag { typedef char (&type)[N + 1]; }; template< int C1, int C2, int C3, int C4, int C5, int C6 > struct max_arity { BOOST_STATIC_CONSTANT(int, value = ( C6 > 0 ? C6 : ( C5 > 0 ? C5 : ( C4 > 0 ? C4 : ( C3 > 0 ? C3 : ( C2 > 0 ? C2 : ( C1 > 0 ? C1 : -1 ) ) ) ) ) ) ); }; arity_tag<0>::type arity_helper(...); template< template< typename P1 > class F , typename T1 > typename arity_tag<1>::type arity_helper(type_wrapper< F >, arity_tag<1>); template< template< typename P1, typename P2 > class F , typename T1, typename T2 > typename arity_tag<2>::type arity_helper(type_wrapper< F< T1,T2 > >, arity_tag<2>); template< template< typename P1, typename P2, typename P3 > class F , typename T1, typename T2, typename T3 > typename arity_tag<3>::type arity_helper(type_wrapper< F< T1,T2,T3 > >, arity_tag<3>); template< template< typename P1, typename P2, typename P3, typename P4 > class F , typename T1, typename T2, typename T3, typename T4 > typename arity_tag<4>::type arity_helper(type_wrapper< F< T1,T2,T3,T4 > >, arity_tag<4>); template< template< typename P1, typename P2, typename P3, typename P4 , typename P5 > class F , typename T1, typename T2, typename T3, typename T4, typename T5 > typename arity_tag<5>::type arity_helper(type_wrapper< F< T1,T2,T3,T4,T5 > >, arity_tag<5>); template< template< typename P1, typename P2, typename P3, typename P4 , typename P5, typename P6 > class F , typename T1, typename T2, typename T3, typename T4, typename T5 , typename T6 > typename arity_tag<6>::type arity_helper(type_wrapper< F< T1,T2,T3,T4,T5,T6 > >, arity_tag<6>); template< typename F, int N > struct template_arity_impl { BOOST_STATIC_CONSTANT(int, value = sizeof(::boost::mpl::aux::arity_helper(type_wrapper(), arity_tag())) - 1 ); }; template< typename F > struct template_arity { BOOST_STATIC_CONSTANT(int, value = ( max_arity< template_arity_impl< F,1 >::value, template_arity_impl< F,2 >::value, template_arity_impl< F,3 >::value, template_arity_impl< F,4 >::value, template_arity_impl< F,5 >::value, template_arity_impl< F,6 >::value >::value )); typedef mpl::int_ type; }; }}} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/gcc/times.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/times.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct times_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< times_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< times_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct times_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct times_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct times_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct times_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) , typename N3 = na, typename N4 = na, typename N5 = na > struct times : times< times< times< times< N1,N2 >, N3>, N4>, N5> { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , times , ( N1, N2, N3, N4, N5 ) ) }; template< typename N1, typename N2, typename N3, typename N4 > struct times< N1,N2,N3,N4,na > : times< times< times< N1,N2 >, N3>, N4> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , times , ( N1, N2, N3, N4, na ) ) }; template< typename N1, typename N2, typename N3 > struct times< N1,N2,N3,na,na > : times< times< N1,N2 >, N3> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , times , ( N1, N2, N3, na, na ) ) }; template< typename N1, typename N2 > struct times< N1,N2,na,na,na > : times_impl< typename times_tag::type , typename times_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , times , ( N1, N2, na, na, na ) ) }; BOOST_MPL_AUX_NA_SPEC2(2, 5, times) }} namespace boost { namespace mpl { template<> struct times_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : integral_c< typename aux::largest_int< typename N1::value_type , typename N2::value_type >::type , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value * BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/gcc/unpack_args.hpp ================================================ // Copyright Aleksey Gurtovoy 2002-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/unpack_args.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< int size, typename F, typename Args > struct unpack_args_impl; template< typename F, typename Args > struct unpack_args_impl< 0,F,Args > : apply0< F > { }; template< typename F, typename Args > struct unpack_args_impl< 1,F,Args > : apply1< F , typename at_c< Args,0 >::type > { }; template< typename F, typename Args > struct unpack_args_impl< 2,F,Args > : apply2< F , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type > { }; template< typename F, typename Args > struct unpack_args_impl< 3,F,Args > : apply3< F , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type , typename at_c< Args,2 >::type > { }; template< typename F, typename Args > struct unpack_args_impl< 4,F,Args > : apply4< F , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type , typename at_c< Args,2 >::type, typename at_c< Args,3 >::type > { }; template< typename F, typename Args > struct unpack_args_impl< 5,F,Args > : apply5< F , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type , typename at_c< Args,2 >::type, typename at_c< Args,3 >::type , typename at_c< Args,4 >::type > { }; } template< typename F > struct unpack_args { template< typename Args > struct apply : aux::unpack_args_impl< size::value,F, Args > { }; }; BOOST_MPL_AUX_PASS_THROUGH_LAMBDA_SPEC(1, unpack_args) }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/gcc/vector.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/vector.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na , typename T12 = na, typename T13 = na, typename T14 = na , typename T15 = na, typename T16 = na, typename T17 = na , typename T18 = na, typename T19 = na > struct vector; template< > struct vector< na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector0< > { typedef vector0< >::type type; }; template< typename T0 > struct vector< T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector1 { typedef typename vector1::type type; }; template< typename T0, typename T1 > struct vector< T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector2< T0,T1 > { typedef typename vector2< T0,T1 >::type type; }; template< typename T0, typename T1, typename T2 > struct vector< T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector3< T0,T1,T2 > { typedef typename vector3< T0,T1,T2 >::type type; }; template< typename T0, typename T1, typename T2, typename T3 > struct vector< T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector4< T0,T1,T2,T3 > { typedef typename vector4< T0,T1,T2,T3 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 > struct vector< T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector5< T0,T1,T2,T3,T4 > { typedef typename vector5< T0,T1,T2,T3,T4 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct vector< T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector6< T0,T1,T2,T3,T4,T5 > { typedef typename vector6< T0,T1,T2,T3,T4,T5 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6 > struct vector< T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector7< T0,T1,T2,T3,T4,T5,T6 > { typedef typename vector7< T0,T1,T2,T3,T4,T5,T6 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7 > struct vector< T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na , na, na, na > : vector8< T0,T1,T2,T3,T4,T5,T6,T7 > { typedef typename vector8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8 > struct vector< T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na , na, na, na > : vector9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > { typedef typename vector9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 > struct vector< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na , na, na, na > : vector10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > { typedef typename vector10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10 > struct vector< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na , na, na, na > : vector11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > { typedef typename vector11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11 > struct vector< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na , na, na, na, na > : vector12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > { typedef typename vector12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12 > struct vector< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na , na, na, na, na > : vector13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > { typedef typename vector13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13 > struct vector< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na , na, na, na, na > : vector14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > { typedef typename vector14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 > struct vector< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na , na, na, na, na > : vector15< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 > { typedef typename vector15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15 > struct vector< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, na, na, na, na > : vector16< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15 > { typedef typename vector16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16 > struct vector< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, na, na, na > : vector17< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16 > { typedef typename vector17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17 > struct vector< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, na, na > : vector18< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17 > { typedef typename vector18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18 > struct vector< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18, na > : vector19< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18 > { typedef typename vector19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type; }; /// primary template (not a specialization!) template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct vector : vector20< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18, T19 > { typedef typename vector20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/gcc/vector_c.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/vector_c.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename T, long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX , long C3 = LONG_MAX, long C4 = LONG_MAX, long C5 = LONG_MAX , long C6 = LONG_MAX, long C7 = LONG_MAX, long C8 = LONG_MAX , long C9 = LONG_MAX, long C10 = LONG_MAX, long C11 = LONG_MAX , long C12 = LONG_MAX, long C13 = LONG_MAX, long C14 = LONG_MAX , long C15 = LONG_MAX, long C16 = LONG_MAX, long C17 = LONG_MAX , long C18 = LONG_MAX, long C19 = LONG_MAX > struct vector_c; template< typename T > struct vector_c< T, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector0_c { typedef typename vector0_c::type type; }; template< typename T, long C0 > struct vector_c< T, C0, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector1_c< T, T(C0) > { typedef typename vector1_c< T, T(C0) >::type type; }; template< typename T, long C0, long C1 > struct vector_c< T, C0, C1, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector2_c< T, T(C0), T(C1) > { typedef typename vector2_c< T, T(C0), T(C1) >::type type; }; template< typename T, long C0, long C1, long C2 > struct vector_c< T, C0, C1, C2, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector3_c< T, T(C0), T(C1), T(C2) > { typedef typename vector3_c< T, T(C0), T(C1), T(C2) >::type type; }; template< typename T, long C0, long C1, long C2, long C3 > struct vector_c< T, C0, C1, C2, C3, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector4_c< T, T(C0), T(C1), T(C2), T(C3) > { typedef typename vector4_c< T, T(C0), T(C1), T(C2), T(C3) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4 > struct vector_c< T, C0, C1, C2, C3, C4, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector5_c< T, T(C0), T(C1), T(C2), T(C3), T(C4) > { typedef typename vector5_c< T, T(C0), T(C1), T(C2), T(C3), T(C4) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 > struct vector_c< T, C0, C1, C2, C3, C4, C5, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX > : vector6_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5) > { typedef typename vector6_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX > : vector7_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6) > { typedef typename vector7_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, C7, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX > : vector8_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7) > { typedef typename vector8_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX > : vector9_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8) > { typedef typename vector9_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX > : vector10_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9) > { typedef typename vector10_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector11_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10) > { typedef typename vector11_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector12_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11) > { typedef typename vector12_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector13_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12) > { typedef typename vector13_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector14_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13) > { typedef typename vector14_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector15_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14) > { typedef typename vector15_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector16_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15) > { typedef typename vector16_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, LONG_MAX, LONG_MAX, LONG_MAX > : vector17_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16) > { typedef typename vector17_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, C17, LONG_MAX, LONG_MAX > : vector18_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17) > { typedef typename vector18_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, C17, C18, LONG_MAX > : vector19_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17), T(C18) > { typedef typename vector19_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17), T(C18) >::type type; }; /// primary template (not a specialization!) template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct vector_c : vector20_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17), T(C18), T(C19) > { typedef typename vector20_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17), T(C18), T(C19) >::type type; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/msvc60/advance_backward.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/aux_/advance_backward.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< long N > struct advance_backward; template<> struct advance_backward<0> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef iter0 type; }; /// ETI workaround template<> struct apply { typedef int type; }; }; template<> struct advance_backward<1> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef typename prior::type iter1; typedef iter1 type; }; /// ETI workaround template<> struct apply { typedef int type; }; }; template<> struct advance_backward<2> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef typename prior::type iter1; typedef typename prior::type iter2; typedef iter2 type; }; /// ETI workaround template<> struct apply { typedef int type; }; }; template<> struct advance_backward<3> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef typename prior::type iter1; typedef typename prior::type iter2; typedef typename prior::type iter3; typedef iter3 type; }; /// ETI workaround template<> struct apply { typedef int type; }; }; template<> struct advance_backward<4> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef typename prior::type iter1; typedef typename prior::type iter2; typedef typename prior::type iter3; typedef typename prior::type iter4; typedef iter4 type; }; /// ETI workaround template<> struct apply { typedef int type; }; }; template< long N > struct advance_backward { template< typename Iterator > struct apply { typedef typename apply_wrap1< advance_backward<4> , Iterator >::type chunk_result_; typedef typename apply_wrap1< advance_backward<( (N - 4) < 0 ? 0 : N - 4 )> , chunk_result_ >::type type; }; }; }}} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/msvc60/advance_forward.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/aux_/advance_forward.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< long N > struct advance_forward; template<> struct advance_forward<0> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef iter0 type; }; /// ETI workaround template<> struct apply { typedef int type; }; }; template<> struct advance_forward<1> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef typename next::type iter1; typedef iter1 type; }; /// ETI workaround template<> struct apply { typedef int type; }; }; template<> struct advance_forward<2> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef typename next::type iter1; typedef typename next::type iter2; typedef iter2 type; }; /// ETI workaround template<> struct apply { typedef int type; }; }; template<> struct advance_forward<3> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef typename next::type iter1; typedef typename next::type iter2; typedef typename next::type iter3; typedef iter3 type; }; /// ETI workaround template<> struct apply { typedef int type; }; }; template<> struct advance_forward<4> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef typename next::type iter1; typedef typename next::type iter2; typedef typename next::type iter3; typedef typename next::type iter4; typedef iter4 type; }; /// ETI workaround template<> struct apply { typedef int type; }; }; template< long N > struct advance_forward { template< typename Iterator > struct apply { typedef typename apply_wrap1< advance_forward<4> , Iterator >::type chunk_result_; typedef typename apply_wrap1< advance_forward<( (N - 4) < 0 ? 0 : N - 4 )> , chunk_result_ >::type type; }; }; }}} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/msvc60/and.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/and.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< bool C_ > struct and_impl { template< typename T1, typename T2, typename T3, typename T4 > struct result_ : false_ { }; }; template<> struct and_impl { template< typename T1, typename T2, typename T3, typename T4 > struct result_ : and_impl< BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value >::template result_< T2,T3,T4,true_ > { }; }; template<> struct and_impl ::result_< true_,true_,true_,true_ > : true_ { }; } // namespace aux template< typename BOOST_MPL_AUX_NA_PARAM(T1) , typename BOOST_MPL_AUX_NA_PARAM(T2) , typename T3 = true_, typename T4 = true_, typename T5 = true_ > struct and_ : aux::and_impl< BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value >::template result_< T2,T3,T4,T5 > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , and_ , ( T1, T2, T3, T4, T5) ) }; BOOST_MPL_AUX_NA_SPEC2( 2 , 5 , and_ ) }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/msvc60/apply.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/apply.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename F > struct apply0 { typedef typename apply_wrap0< typename lambda::type >::type type; BOOST_MPL_AUX_LAMBDA_SUPPORT( 1 , apply0 , (F ) ) }; /// workaround for ETI bug template<> struct apply0 { typedef int type; }; template< typename F, typename T1 > struct apply1 { typedef typename apply_wrap1< typename lambda::type , T1 >::type type; BOOST_MPL_AUX_LAMBDA_SUPPORT( 2 , apply1 , (F, T1) ) }; /// workaround for ETI bug template<> struct apply1< int,int > { typedef int type; }; template< typename F, typename T1, typename T2 > struct apply2 { typedef typename apply_wrap2< typename lambda::type , T1, T2 >::type type; BOOST_MPL_AUX_LAMBDA_SUPPORT( 3 , apply2 , (F, T1, T2) ) }; /// workaround for ETI bug template<> struct apply2< int,int,int > { typedef int type; }; template< typename F, typename T1, typename T2, typename T3 > struct apply3 { typedef typename apply_wrap3< typename lambda::type , T1, T2, T3 >::type type; BOOST_MPL_AUX_LAMBDA_SUPPORT( 4 , apply3 , (F, T1, T2, T3) ) }; /// workaround for ETI bug template<> struct apply3< int,int,int,int > { typedef int type; }; template< typename F, typename T1, typename T2, typename T3, typename T4 > struct apply4 { typedef typename apply_wrap4< typename lambda::type , T1, T2, T3, T4 >::type type; BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , apply4 , (F, T1, T2, T3, T4) ) }; /// workaround for ETI bug template<> struct apply4< int,int,int,int,int > { typedef int type; }; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct apply5 { typedef typename apply_wrap5< typename lambda::type , T1, T2, T3, T4, T5 >::type type; BOOST_MPL_AUX_LAMBDA_SUPPORT( 6 , apply5 , (F, T1, T2, T3, T4, T5) ) }; /// workaround for ETI bug template<> struct apply5< int,int,int,int,int,int > { typedef int type; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/msvc60/apply_fwd.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/apply_fwd.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename F > struct apply0; template< typename F, typename T1 > struct apply1; template< typename F, typename T1, typename T2 > struct apply2; template< typename F, typename T1, typename T2, typename T3 > struct apply3; template< typename F, typename T1, typename T2, typename T3, typename T4 > struct apply4; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct apply5; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/msvc60/apply_wrap.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/apply_wrap.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename F> struct msvc_apply0 { template< bool > struct f_ : F {}; template<> struct f_ { template< typename P = int > struct apply { typedef int type; }; }; template< typename T = int > struct result_ : f_< aux::msvc_never_true::value > ::template apply<> { }; }; template< typename F > struct apply_wrap0 { typedef typename msvc_apply0::template result_< >::type type; }; /// workaround for ETI bug template<> struct apply_wrap0 { typedef int type; }; template< typename F> struct msvc_apply1 { template< bool > struct f_ : F {}; template<> struct f_ { template< typename P1 > struct apply { typedef int type; }; }; template< typename T1 > struct result_ : f_< aux::msvc_never_true::value > ::template apply { }; }; template< typename F, typename T1 > struct apply_wrap1 { typedef typename msvc_apply1::template result_< T1 >::type type; }; /// workaround for ETI bug template<> struct apply_wrap1< int,int > { typedef int type; }; template< typename F> struct msvc_apply2 { template< bool > struct f_ : F {}; template<> struct f_ { template< typename P1, typename P2 > struct apply { typedef int type; }; }; template< typename T1, typename T2 > struct result_ : f_< aux::msvc_never_true::value > ::template apply< T1,T2 > { }; }; template< typename F, typename T1, typename T2 > struct apply_wrap2 { typedef typename msvc_apply2::template result_< T1, T2 >::type type; }; /// workaround for ETI bug template<> struct apply_wrap2< int,int,int > { typedef int type; }; template< typename F> struct msvc_apply3 { template< bool > struct f_ : F {}; template<> struct f_ { template< typename P1, typename P2, typename P3 > struct apply { typedef int type; }; }; template< typename T1, typename T2, typename T3 > struct result_ : f_< aux::msvc_never_true::value > ::template apply< T1,T2,T3 > { }; }; template< typename F, typename T1, typename T2, typename T3 > struct apply_wrap3 { typedef typename msvc_apply3::template result_< T1, T2, T3 >::type type; }; /// workaround for ETI bug template<> struct apply_wrap3< int,int,int,int > { typedef int type; }; template< typename F> struct msvc_apply4 { template< bool > struct f_ : F {}; template<> struct f_ { template< typename P1, typename P2, typename P3, typename P4 > struct apply { typedef int type; }; }; template< typename T1, typename T2, typename T3, typename T4 > struct result_ : f_< aux::msvc_never_true::value > ::template apply< T1,T2,T3,T4 > { }; }; template< typename F, typename T1, typename T2, typename T3, typename T4 > struct apply_wrap4 { typedef typename msvc_apply4::template result_< T1, T2, T3, T4 >::type type; }; /// workaround for ETI bug template<> struct apply_wrap4< int,int,int,int,int > { typedef int type; }; template< typename F> struct msvc_apply5 { template< bool > struct f_ : F {}; template<> struct f_ { template< typename P1, typename P2, typename P3, typename P4 , typename P5 > struct apply { typedef int type; }; }; template< typename T1, typename T2, typename T3, typename T4 , typename T5 > struct result_ : f_< aux::msvc_never_true::value > ::template apply< T1,T2,T3,T4,T5 > { }; }; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct apply_wrap5 { typedef typename msvc_apply5::template result_< T1, T2, T3, T4, T5 >::type type; }; /// workaround for ETI bug template<> struct apply_wrap5< int,int,int,int,int,int > { typedef int type; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/msvc60/arg.hpp ================================================ // Copyright Peter Dimov 2001-2002 // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/arg.hpp" header // -- DO NOT modify by hand! BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN template<> struct arg< -1 > { BOOST_STATIC_CONSTANT(int, value = -1); BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) BOOST_MPL_AUX_ARG_TYPEDEF(na, type) template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { typedef U1 type; BOOST_MPL_AUX_ASSERT_NOT_NA(type); }; }; template<> struct arg<1> { BOOST_STATIC_CONSTANT(int, value = 1); typedef arg<2> next; BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) BOOST_MPL_AUX_ARG_TYPEDEF(na, type) template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { typedef U1 type; BOOST_MPL_AUX_ASSERT_NOT_NA(type); }; }; template<> struct arg<2> { BOOST_STATIC_CONSTANT(int, value = 2); typedef arg<3> next; BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) BOOST_MPL_AUX_ARG_TYPEDEF(na, type) template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { typedef U2 type; BOOST_MPL_AUX_ASSERT_NOT_NA(type); }; }; template<> struct arg<3> { BOOST_STATIC_CONSTANT(int, value = 3); typedef arg<4> next; BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) BOOST_MPL_AUX_ARG_TYPEDEF(na, type) template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { typedef U3 type; BOOST_MPL_AUX_ASSERT_NOT_NA(type); }; }; template<> struct arg<4> { BOOST_STATIC_CONSTANT(int, value = 4); typedef arg<5> next; BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) BOOST_MPL_AUX_ARG_TYPEDEF(na, type) template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { typedef U4 type; BOOST_MPL_AUX_ASSERT_NOT_NA(type); }; }; template<> struct arg<5> { BOOST_STATIC_CONSTANT(int, value = 5); typedef arg<6> next; BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) BOOST_MPL_AUX_ARG_TYPEDEF(na, type) template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { typedef U5 type; BOOST_MPL_AUX_ASSERT_NOT_NA(type); }; }; BOOST_MPL_AUX_NONTYPE_ARITY_SPEC(1,int, arg) BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/msvc60/basic_bind.hpp ================================================ // Copyright Peter Dimov 2001 // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/aux_/basic_bind.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< bool > struct resolve_arg_impl { template< typename T, typename U1, typename U2, typename U3 , typename U4, typename U5 > struct result_ { typedef T type; }; }; template<> struct resolve_arg_impl { template< typename T, typename U1, typename U2, typename U3 , typename U4, typename U5 > struct result_ { typedef typename apply_wrap5< T , U1, U2, U3, U4, U5 >::type type; }; }; template< typename T > struct is_bind_template; template< typename T, typename U1, typename U2, typename U3, typename U4 , typename U5 > struct resolve_bind_arg : resolve_arg_impl< is_bind_template::value > ::template result_< T,U1,U2,U3,U4,U5 > { }; template< int arity_ > struct bind_chooser; aux::no_tag is_bind_helper(...); template< typename T > aux::no_tag is_bind_helper(protect*); template< int N > aux::yes_tag is_bind_helper(arg*); template< bool is_ref_ = true > struct is_bind_template_impl { template< typename T > struct result_ { BOOST_STATIC_CONSTANT(bool, value = false); }; }; template<> struct is_bind_template_impl { template< typename T > struct result_ { BOOST_STATIC_CONSTANT(bool, value = sizeof(aux::is_bind_helper(static_cast(0))) == sizeof(aux::yes_tag) ); }; }; template< typename T > struct is_bind_template : is_bind_template_impl< ::boost::detail::is_reference_impl::value > ::template result_ { }; } // namespace aux template< typename F > struct bind0 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; public: typedef typename apply_wrap0< f_ >::type type; }; }; namespace aux { template< typename F > aux::yes_tag is_bind_helper(bind0*); } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(1, bind0) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(1, bind0) template< typename F, typename T1 > struct bind1 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; public: typedef typename apply_wrap1< f_ , typename t1::type >::type type; }; }; namespace aux { template< typename F, typename T1 > aux::yes_tag is_bind_helper(bind1< F,T1 >*); } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(2, bind1) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(2, bind1) template< typename F, typename T1, typename T2 > struct bind2 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; public: typedef typename apply_wrap2< f_ , typename t1::type, typename t2::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename T2 > aux::yes_tag is_bind_helper(bind2< F,T1,T2 >*); } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(3, bind2) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(3, bind2) template< typename F, typename T1, typename T2, typename T3 > struct bind3 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3; public: typedef typename apply_wrap3< f_ , typename t1::type, typename t2::type, typename t3::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename T2, typename T3 > aux::yes_tag is_bind_helper(bind3< F,T1,T2,T3 >*); } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(4, bind3) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(4, bind3) template< typename F, typename T1, typename T2, typename T3, typename T4 > struct bind4 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3; typedef aux::resolve_bind_arg< T4,U1,U2,U3,U4,U5 > t4; public: typedef typename apply_wrap4< f_ , typename t1::type, typename t2::type, typename t3::type , typename t4::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename T2, typename T3, typename T4 > aux::yes_tag is_bind_helper(bind4< F,T1,T2,T3,T4 >*); } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(5, bind4) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(5, bind4) template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct bind5 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3; typedef aux::resolve_bind_arg< T4,U1,U2,U3,U4,U5 > t4; typedef aux::resolve_bind_arg< T5,U1,U2,U3,U4,U5 > t5; public: typedef typename apply_wrap5< f_ , typename t1::type, typename t2::type, typename t3::type , typename t4::type, typename t5::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > aux::yes_tag is_bind_helper(bind5< F,T1,T2,T3,T4,T5 >*); } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(6, bind5) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(6, bind5) }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/msvc60/bind.hpp ================================================ // Copyright Peter Dimov 2001 // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/bind.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< bool > struct resolve_arg_impl { template< typename T, typename U1, typename U2, typename U3 , typename U4, typename U5 > struct result_ { typedef T type; }; }; template<> struct resolve_arg_impl { template< typename T, typename U1, typename U2, typename U3 , typename U4, typename U5 > struct result_ { typedef typename apply_wrap5< T , U1, U2, U3, U4, U5 >::type type; }; }; template< typename T > struct is_bind_template; template< typename T, typename U1, typename U2, typename U3, typename U4 , typename U5 > struct resolve_bind_arg : resolve_arg_impl< is_bind_template::value > ::template result_< T,U1,U2,U3,U4,U5 > { }; template< typename T > struct replace_unnamed_arg_impl { template< typename Arg > struct result_ { typedef Arg next; typedef T type; }; }; template<> struct replace_unnamed_arg_impl< arg< -1 > > { template< typename Arg > struct result_ { typedef typename next::type next; typedef Arg type; }; }; template< typename T, typename Arg > struct replace_unnamed_arg : replace_unnamed_arg_impl::template result_ { }; template< int arity_ > struct bind_chooser; aux::no_tag is_bind_helper(...); template< typename T > aux::no_tag is_bind_helper(protect*); template< int N > aux::yes_tag is_bind_helper(arg*); template< bool is_ref_ = true > struct is_bind_template_impl { template< typename T > struct result_ { BOOST_STATIC_CONSTANT(bool, value = false); }; }; template<> struct is_bind_template_impl { template< typename T > struct result_ { BOOST_STATIC_CONSTANT(bool, value = sizeof(aux::is_bind_helper(static_cast(0))) == sizeof(aux::yes_tag) ); }; }; template< typename T > struct is_bind_template : is_bind_template_impl< ::boost::detail::is_reference_impl::value > ::template result_ { }; } // namespace aux template< typename F > struct bind0 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; typedef typename r0::type a0; typedef typename r0::next n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; /// public: typedef typename apply_wrap0< f_ >::type type; }; }; namespace aux { template< typename F > aux::yes_tag is_bind_helper(bind0*); } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(1, bind0) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(1, bind0) template< typename F, typename T1 > struct bind1 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; typedef typename r0::type a0; typedef typename r0::next n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; /// typedef aux::replace_unnamed_arg< T1,n1 > r1; typedef typename r1::type a1; typedef typename r1::next n2; typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; /// public: typedef typename apply_wrap1< f_ , typename t1::type >::type type; }; }; namespace aux { template< typename F, typename T1 > aux::yes_tag is_bind_helper(bind1< F,T1 >*); } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(2, bind1) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(2, bind1) template< typename F, typename T1, typename T2 > struct bind2 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; typedef typename r0::type a0; typedef typename r0::next n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; /// typedef aux::replace_unnamed_arg< T1,n1 > r1; typedef typename r1::type a1; typedef typename r1::next n2; typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; /// typedef aux::replace_unnamed_arg< T2,n2 > r2; typedef typename r2::type a2; typedef typename r2::next n3; typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; /// public: typedef typename apply_wrap2< f_ , typename t1::type, typename t2::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename T2 > aux::yes_tag is_bind_helper(bind2< F,T1,T2 >*); } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(3, bind2) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(3, bind2) template< typename F, typename T1, typename T2, typename T3 > struct bind3 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; typedef typename r0::type a0; typedef typename r0::next n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; /// typedef aux::replace_unnamed_arg< T1,n1 > r1; typedef typename r1::type a1; typedef typename r1::next n2; typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; /// typedef aux::replace_unnamed_arg< T2,n2 > r2; typedef typename r2::type a2; typedef typename r2::next n3; typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; /// typedef aux::replace_unnamed_arg< T3,n3 > r3; typedef typename r3::type a3; typedef typename r3::next n4; typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; /// public: typedef typename apply_wrap3< f_ , typename t1::type, typename t2::type, typename t3::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename T2, typename T3 > aux::yes_tag is_bind_helper(bind3< F,T1,T2,T3 >*); } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(4, bind3) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(4, bind3) template< typename F, typename T1, typename T2, typename T3, typename T4 > struct bind4 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; typedef typename r0::type a0; typedef typename r0::next n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; /// typedef aux::replace_unnamed_arg< T1,n1 > r1; typedef typename r1::type a1; typedef typename r1::next n2; typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; /// typedef aux::replace_unnamed_arg< T2,n2 > r2; typedef typename r2::type a2; typedef typename r2::next n3; typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; /// typedef aux::replace_unnamed_arg< T3,n3 > r3; typedef typename r3::type a3; typedef typename r3::next n4; typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; /// typedef aux::replace_unnamed_arg< T4,n4 > r4; typedef typename r4::type a4; typedef typename r4::next n5; typedef aux::resolve_bind_arg< a4,U1,U2,U3,U4,U5 > t4; /// public: typedef typename apply_wrap4< f_ , typename t1::type, typename t2::type, typename t3::type , typename t4::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename T2, typename T3, typename T4 > aux::yes_tag is_bind_helper(bind4< F,T1,T2,T3,T4 >*); } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(5, bind4) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(5, bind4) template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct bind5 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; typedef typename r0::type a0; typedef typename r0::next n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; /// typedef aux::replace_unnamed_arg< T1,n1 > r1; typedef typename r1::type a1; typedef typename r1::next n2; typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; /// typedef aux::replace_unnamed_arg< T2,n2 > r2; typedef typename r2::type a2; typedef typename r2::next n3; typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; /// typedef aux::replace_unnamed_arg< T3,n3 > r3; typedef typename r3::type a3; typedef typename r3::next n4; typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; /// typedef aux::replace_unnamed_arg< T4,n4 > r4; typedef typename r4::type a4; typedef typename r4::next n5; typedef aux::resolve_bind_arg< a4,U1,U2,U3,U4,U5 > t4; /// typedef aux::replace_unnamed_arg< T5,n5 > r5; typedef typename r5::type a5; typedef typename r5::next n6; typedef aux::resolve_bind_arg< a5,U1,U2,U3,U4,U5 > t5; /// public: typedef typename apply_wrap5< f_ , typename t1::type, typename t2::type, typename t3::type , typename t4::type, typename t5::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > aux::yes_tag is_bind_helper(bind5< F,T1,T2,T3,T4,T5 >*); } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(6, bind5) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(6, bind5) }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/msvc60/bind_fwd.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/bind_fwd.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename F > struct bind0; template< typename F, typename T1 > struct bind1; template< typename F, typename T1, typename T2 > struct bind2; template< typename F, typename T1, typename T2, typename T3 > struct bind3; template< typename F, typename T1, typename T2, typename T3, typename T4 > struct bind4; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct bind5; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/msvc60/bitand.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // Copyright Jaap Suter 2003 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/bitand.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 , BOOST_MPL_AUX_NTTP_DECL(int, tag1_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value , BOOST_MPL_AUX_NTTP_DECL(int, tag2_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value > struct bitand_impl : if_c< ( tag1_ > tag2_ ) , aux::cast2nd_impl< bitand_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< bitand_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct bitand_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template<> struct bitand_impl< na,integral_c_tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template<> struct bitand_impl< integral_c_tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct bitand_tag { typedef typename T::tag type; }; /// forward declaration template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct bitand_2; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) , typename N3 = na, typename N4 = na, typename N5 = na > struct bitand_ : if_< is_na , bitand_2< N1,N2 > , bitand_< bitand_2< N1,N2 > , N3, N4, N5 > >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , bitand_ , ( N1, N2, N3, N4, N5 ) ) }; template< typename N1 , typename N2 > struct bitand_2 : aux::msvc_eti_base< typename apply_wrap2< bitand_impl< typename bitand_tag::type , typename bitand_tag::type > , N1 , N2 >::type >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, bitand_2, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 5, bitand_) }} namespace boost { namespace mpl { namespace aux { template< typename T, T n1, T n2 > struct bitand_wknd { BOOST_STATIC_CONSTANT(T, value = (n1 & n2)); typedef integral_c< T,value > type; }; } template<> struct bitand_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : aux::bitand_wknd< typename aux::largest_int< typename N1::value_type , typename N2::value_type >::type , N1::value , N2::value >::type { }; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/msvc60/bitor.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // Copyright Jaap Suter 2003 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/bitor.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 , BOOST_MPL_AUX_NTTP_DECL(int, tag1_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value , BOOST_MPL_AUX_NTTP_DECL(int, tag2_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value > struct bitor_impl : if_c< ( tag1_ > tag2_ ) , aux::cast2nd_impl< bitor_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< bitor_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct bitor_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template<> struct bitor_impl< na,integral_c_tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template<> struct bitor_impl< integral_c_tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct bitor_tag { typedef typename T::tag type; }; /// forward declaration template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct bitor_2; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) , typename N3 = na, typename N4 = na, typename N5 = na > struct bitor_ : if_< is_na , bitor_2< N1,N2 > , bitor_< bitor_2< N1,N2 > , N3, N4, N5 > >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , bitor_ , ( N1, N2, N3, N4, N5 ) ) }; template< typename N1 , typename N2 > struct bitor_2 : aux::msvc_eti_base< typename apply_wrap2< bitor_impl< typename bitor_tag::type , typename bitor_tag::type > , N1 , N2 >::type >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, bitor_2, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 5, bitor_) }} namespace boost { namespace mpl { namespace aux { template< typename T, T n1, T n2 > struct bitor_wknd { BOOST_STATIC_CONSTANT(T, value = (n1 | n2)); typedef integral_c< T,value > type; }; } template<> struct bitor_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : aux::bitor_wknd< typename aux::largest_int< typename N1::value_type , typename N2::value_type >::type , N1::value , N2::value >::type { }; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/msvc60/bitxor.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // Copyright Jaap Suter 2003 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/bitxor.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 , BOOST_MPL_AUX_NTTP_DECL(int, tag1_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value , BOOST_MPL_AUX_NTTP_DECL(int, tag2_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value > struct bitxor_impl : if_c< ( tag1_ > tag2_ ) , aux::cast2nd_impl< bitxor_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< bitxor_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct bitxor_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template<> struct bitxor_impl< na,integral_c_tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template<> struct bitxor_impl< integral_c_tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct bitxor_tag { typedef typename T::tag type; }; /// forward declaration template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct bitxor_2; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) , typename N3 = na, typename N4 = na, typename N5 = na > struct bitxor_ : if_< is_na , bitxor_2< N1,N2 > , bitxor_< bitxor_2< N1,N2 > , N3, N4, N5 > >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , bitxor_ , ( N1, N2, N3, N4, N5 ) ) }; template< typename N1 , typename N2 > struct bitxor_2 : aux::msvc_eti_base< typename apply_wrap2< bitxor_impl< typename bitxor_tag::type , typename bitxor_tag::type > , N1 , N2 >::type >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, bitxor_2, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 5, bitxor_) }} namespace boost { namespace mpl { namespace aux { template< typename T, T n1, T n2 > struct bitxor_wknd { BOOST_STATIC_CONSTANT(T, value = (n1 ^ n2)); typedef integral_c< T,value > type; }; } template<> struct bitxor_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : aux::bitxor_wknd< typename aux::largest_int< typename N1::value_type , typename N2::value_type >::type , N1::value , N2::value >::type { }; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/msvc60/deque.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/deque.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< int N > struct deque_chooser; } namespace aux { template<> struct deque_chooser<0> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef vector0< >::type type; }; }; } // namespace aux namespace aux { template<> struct deque_chooser<1> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector1< T0 >::type type; }; }; } // namespace aux namespace aux { template<> struct deque_chooser<2> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector2< T0, T1 >::type type; }; }; } // namespace aux namespace aux { template<> struct deque_chooser<3> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector3< T0, T1, T2 >::type type; }; }; } // namespace aux namespace aux { template<> struct deque_chooser<4> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector4< T0, T1, T2, T3 >::type type; }; }; } // namespace aux namespace aux { template<> struct deque_chooser<5> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector5< T0, T1, T2, T3, T4 >::type type; }; }; } // namespace aux namespace aux { template<> struct deque_chooser<6> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector6< T0, T1, T2, T3, T4, T5 >::type type; }; }; } // namespace aux namespace aux { template<> struct deque_chooser<7> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector7< T0, T1, T2, T3, T4, T5, T6 >::type type; }; }; } // namespace aux namespace aux { template<> struct deque_chooser<8> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector8< T0, T1, T2, T3, T4, T5, T6, T7 >::type type; }; }; } // namespace aux namespace aux { template<> struct deque_chooser<9> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector9< T0, T1, T2, T3, T4, T5, T6, T7, T8 >::type type; }; }; } // namespace aux namespace aux { template<> struct deque_chooser<10> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector10< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9 >::type type; }; }; } // namespace aux namespace aux { template<> struct deque_chooser<11> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector11< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10 >::type type; }; }; } // namespace aux namespace aux { template<> struct deque_chooser<12> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector12< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11 >::type type; }; }; } // namespace aux namespace aux { template<> struct deque_chooser<13> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector13< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12 >::type type; }; }; } // namespace aux namespace aux { template<> struct deque_chooser<14> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector14< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13 >::type type; }; }; } // namespace aux namespace aux { template<> struct deque_chooser<15> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector15< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 >::type type; }; }; } // namespace aux namespace aux { template<> struct deque_chooser<16> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector16< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15 >::type type; }; }; } // namespace aux namespace aux { template<> struct deque_chooser<17> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector17< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16 >::type type; }; }; } // namespace aux namespace aux { template<> struct deque_chooser<18> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector18< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17 >::type type; }; }; } // namespace aux namespace aux { template<> struct deque_chooser<19> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector19< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18 >::type type; }; }; } // namespace aux namespace aux { template<> struct deque_chooser<20> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector20< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 >::type type; }; }; } // namespace aux namespace aux { template< typename T > struct is_deque_arg { BOOST_STATIC_CONSTANT(bool, value = true); }; template<> struct is_deque_arg { BOOST_STATIC_CONSTANT(bool, value = false); }; template< typename T1, typename T2, typename T3, typename T4, typename T5 , typename T6, typename T7, typename T8, typename T9, typename T10 , typename T11, typename T12, typename T13, typename T14, typename T15 , typename T16, typename T17, typename T18, typename T19, typename T20 > struct deque_count_args { BOOST_STATIC_CONSTANT(int, value = is_deque_arg::value + is_deque_arg::value + is_deque_arg::value + is_deque_arg::value + is_deque_arg::value + is_deque_arg::value + is_deque_arg::value + is_deque_arg::value + is_deque_arg::value + is_deque_arg::value + is_deque_arg::value + is_deque_arg::value + is_deque_arg::value + is_deque_arg::value + is_deque_arg::value + is_deque_arg::value + is_deque_arg::value + is_deque_arg::value + is_deque_arg::value + is_deque_arg::value ); }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct deque_impl { typedef aux::deque_count_args< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 > arg_num_; typedef typename aux::deque_chooser< arg_num_::value > ::template result_< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; }; } // namespace aux template< typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na , typename T12 = na, typename T13 = na, typename T14 = na , typename T15 = na, typename T16 = na, typename T17 = na , typename T18 = na, typename T19 = na > struct deque : aux::deque_impl< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 >::type { typedef typename aux::deque_impl< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 >::type type; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/msvc60/divides.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/divides.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 , BOOST_MPL_AUX_NTTP_DECL(int, tag1_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value , BOOST_MPL_AUX_NTTP_DECL(int, tag2_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value > struct divides_impl : if_c< ( tag1_ > tag2_ ) , aux::cast2nd_impl< divides_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< divides_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct divides_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template<> struct divides_impl< na,integral_c_tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template<> struct divides_impl< integral_c_tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct divides_tag { typedef typename T::tag type; }; /// forward declaration template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct divides2; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) , typename N3 = na, typename N4 = na, typename N5 = na > struct divides : if_< is_na , divides2< N1,N2 > , divides< divides2< N1,N2 > , N3, N4, N5 > >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , divides , ( N1, N2, N3, N4, N5 ) ) }; template< typename N1 , typename N2 > struct divides2 : aux::msvc_eti_base< typename apply_wrap2< divides_impl< typename divides_tag::type , typename divides_tag::type > , N1 , N2 >::type >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, divides2, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 5, divides) }} namespace boost { namespace mpl { namespace aux { template< typename T, T n1, T n2 > struct divides_wknd { BOOST_STATIC_CONSTANT(T, value = (n1 / n2)); typedef integral_c< T,value > type; }; } template<> struct divides_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : aux::divides_wknd< typename aux::largest_int< typename N1::value_type , typename N2::value_type >::type , N1::value , N2::value >::type { }; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/msvc60/equal_to.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/equal_to.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 , BOOST_MPL_AUX_NTTP_DECL(int, tag1_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value , BOOST_MPL_AUX_NTTP_DECL(int, tag2_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value > struct equal_to_impl : if_c< ( tag1_ > tag2_ ) , aux::cast2nd_impl< equal_to_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< equal_to_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct equal_to_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template<> struct equal_to_impl< na,integral_c_tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template<> struct equal_to_impl< integral_c_tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct equal_to_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct equal_to : aux::msvc_eti_base< typename apply_wrap2< equal_to_impl< typename equal_to_tag::type , typename equal_to_tag::type > , N1 , N2 >::type >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, equal_to, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 2, equal_to) }} namespace boost { namespace mpl { template<> struct equal_to_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply { BOOST_STATIC_CONSTANT(bool, value = ( BOOST_MPL_AUX_VALUE_WKND(N1)::value == BOOST_MPL_AUX_VALUE_WKND(N2)::value ) ); typedef bool_ type; }; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/msvc60/fold_impl.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/aux_/fold_impl.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { /// forward declaration template< int N , typename First , typename Last , typename State , typename ForwardOp > struct fold_impl; template< int N > struct fold_chunk; template<> struct fold_chunk<0> { template< typename First , typename Last , typename State , typename ForwardOp > struct result_ { typedef First iter0; typedef State state0; typedef state0 state; typedef iter0 iterator; }; /// ETI workaround template<> struct result_< int,int,int,int > { typedef int state; typedef int iterator; }; }; template<> struct fold_chunk<1> { template< typename First , typename Last , typename State , typename ForwardOp > struct result_ { typedef First iter0; typedef State state0; typedef typename apply2< ForwardOp, state0, typename deref::type >::type state1; typedef typename mpl::next::type iter1; typedef state1 state; typedef iter1 iterator; }; /// ETI workaround template<> struct result_< int,int,int,int > { typedef int state; typedef int iterator; }; }; template<> struct fold_chunk<2> { template< typename First , typename Last , typename State , typename ForwardOp > struct result_ { typedef First iter0; typedef State state0; typedef typename apply2< ForwardOp, state0, typename deref::type >::type state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp, state1, typename deref::type >::type state2; typedef typename mpl::next::type iter2; typedef state2 state; typedef iter2 iterator; }; /// ETI workaround template<> struct result_< int,int,int,int > { typedef int state; typedef int iterator; }; }; template<> struct fold_chunk<3> { template< typename First , typename Last , typename State , typename ForwardOp > struct result_ { typedef First iter0; typedef State state0; typedef typename apply2< ForwardOp, state0, typename deref::type >::type state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp, state1, typename deref::type >::type state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp, state2, typename deref::type >::type state3; typedef typename mpl::next::type iter3; typedef state3 state; typedef iter3 iterator; }; /// ETI workaround template<> struct result_< int,int,int,int > { typedef int state; typedef int iterator; }; }; template<> struct fold_chunk<4> { template< typename First , typename Last , typename State , typename ForwardOp > struct result_ { typedef First iter0; typedef State state0; typedef typename apply2< ForwardOp, state0, typename deref::type >::type state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp, state1, typename deref::type >::type state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp, state2, typename deref::type >::type state3; typedef typename mpl::next::type iter3; typedef typename apply2< ForwardOp, state3, typename deref::type >::type state4; typedef typename mpl::next::type iter4; typedef state4 state; typedef iter4 iterator; }; /// ETI workaround template<> struct result_< int,int,int,int > { typedef int state; typedef int iterator; }; }; template< int N > struct fold_chunk { template< typename First , typename Last , typename State , typename ForwardOp > struct result_ { typedef fold_impl< 4 , First , Last , State , ForwardOp > chunk_; typedef fold_impl< ( (N - 4) < 0 ? 0 : N - 4 ) , typename chunk_::iterator , Last , typename chunk_::state , ForwardOp > res_; typedef typename res_::state state; typedef typename res_::iterator iterator; }; }; template< typename First , typename Last , typename State , typename ForwardOp > struct fold_step; template< typename Last , typename State > struct fold_null_step { typedef Last iterator; typedef State state; }; template<> struct fold_chunk< -1 > { template< typename First , typename Last , typename State , typename ForwardOp > struct result_ { typedef typename if_< typename is_same< First,Last >::type , fold_null_step< Last,State > , fold_step< First,Last,State,ForwardOp > >::type res_; typedef typename res_::state state; typedef typename res_::iterator iterator; }; /// ETI workaround template<> struct result_< int,int,int,int > { typedef int state; typedef int iterator; }; }; template< typename First , typename Last , typename State , typename ForwardOp > struct fold_step { typedef fold_chunk< -1 >::template result_< typename mpl::next::type , Last , typename apply2::type>::type , ForwardOp > chunk_; typedef typename chunk_::state state; typedef typename chunk_::iterator iterator; }; template< int N , typename First , typename Last , typename State , typename ForwardOp > struct fold_impl : fold_chunk ::template result_< First,Last,State,ForwardOp > { }; }}} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/msvc60/full_lambda.hpp ================================================ // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/aux_/full_lambda.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< bool C1 = false, bool C2 = false, bool C3 = false, bool C4 = false , bool C5 = false > struct lambda_or : true_ { }; template<> struct lambda_or< false,false,false,false,false > : false_ { }; } // namespace aux template< typename T , typename Tag > struct lambda { typedef false_ is_le; typedef T result_; typedef T type; }; template< typename T > struct is_lambda_expression : lambda::is_le { }; template< int N, typename Tag > struct lambda< arg, Tag > { typedef true_ is_le; typedef mpl::arg result_; // qualified for the sake of MIPSpro 7.41 typedef mpl::protect type; }; template< typename F , typename Tag > struct lambda< bind0 , Tag > { typedef false_ is_le; typedef bind0< F > result_; typedef result_ type; }; namespace aux { template< typename IsLE, typename Tag , template< typename P1 > class F , typename L1 > struct le_result1 { typedef F< typename L1::type > result_; typedef result_ type; }; template< typename Tag , template< typename P1 > class F , typename L1 > struct le_result1< true_,Tag,F,L1 > { typedef bind1< quote1< F,Tag > , typename L1::result_ > result_; typedef mpl::protect type; }; } // namespace aux template< template< typename P1 > class F , typename T1 , typename Tag > struct lambda< F , Tag > { typedef lambda< T1,Tag > l1; typedef typename l1::is_le is_le1; typedef typename aux::lambda_or< is_le1::value >::type is_le; typedef aux::le_result1< is_le, Tag, F, l1 > le_result_; typedef typename le_result_::result_ result_; typedef typename le_result_::type type; }; template< typename F, typename T1 , typename Tag > struct lambda< bind1< F,T1 > , Tag > { typedef false_ is_le; typedef bind1< F , T1 > result_; typedef result_ type; }; namespace aux { template< typename IsLE, typename Tag , template< typename P1, typename P2 > class F , typename L1, typename L2 > struct le_result2 { typedef F< typename L1::type, typename L2::type > result_; typedef result_ type; }; template< typename Tag , template< typename P1, typename P2 > class F , typename L1, typename L2 > struct le_result2< true_,Tag,F,L1,L2 > { typedef bind2< quote2< F,Tag > , typename L1::result_, typename L2::result_ > result_; typedef mpl::protect type; }; } // namespace aux template< template< typename P1, typename P2 > class F , typename T1, typename T2 , typename Tag > struct lambda< F< T1,T2 > , Tag > { typedef lambda< T1,Tag > l1; typedef lambda< T2,Tag > l2; typedef typename l1::is_le is_le1; typedef typename l2::is_le is_le2; typedef typename aux::lambda_or< is_le1::value, is_le2::value >::type is_le; typedef aux::le_result2< is_le, Tag, F, l1, l2 > le_result_; typedef typename le_result_::result_ result_; typedef typename le_result_::type type; }; template< typename F, typename T1, typename T2 , typename Tag > struct lambda< bind2< F,T1,T2 > , Tag > { typedef false_ is_le; typedef bind2< F , T1, T2 > result_; typedef result_ type; }; namespace aux { template< typename IsLE, typename Tag , template< typename P1, typename P2, typename P3 > class F , typename L1, typename L2, typename L3 > struct le_result3 { typedef F< typename L1::type, typename L2::type, typename L3::type > result_; typedef result_ type; }; template< typename Tag , template< typename P1, typename P2, typename P3 > class F , typename L1, typename L2, typename L3 > struct le_result3< true_,Tag,F,L1,L2,L3 > { typedef bind3< quote3< F,Tag > , typename L1::result_, typename L2::result_, typename L3::result_ > result_; typedef mpl::protect type; }; } // namespace aux template< template< typename P1, typename P2, typename P3 > class F , typename T1, typename T2, typename T3 , typename Tag > struct lambda< F< T1,T2,T3 > , Tag > { typedef lambda< T1,Tag > l1; typedef lambda< T2,Tag > l2; typedef lambda< T3,Tag > l3; typedef typename l1::is_le is_le1; typedef typename l2::is_le is_le2; typedef typename l3::is_le is_le3; typedef typename aux::lambda_or< is_le1::value, is_le2::value, is_le3::value >::type is_le; typedef aux::le_result3< is_le, Tag, F, l1, l2, l3 > le_result_; typedef typename le_result_::result_ result_; typedef typename le_result_::type type; }; template< typename F, typename T1, typename T2, typename T3 , typename Tag > struct lambda< bind3< F,T1,T2,T3 > , Tag > { typedef false_ is_le; typedef bind3< F , T1, T2, T3 > result_; typedef result_ type; }; namespace aux { template< typename IsLE, typename Tag , template< typename P1, typename P2, typename P3, typename P4 > class F , typename L1, typename L2, typename L3, typename L4 > struct le_result4 { typedef F< typename L1::type, typename L2::type, typename L3::type , typename L4::type > result_; typedef result_ type; }; template< typename Tag , template< typename P1, typename P2, typename P3, typename P4 > class F , typename L1, typename L2, typename L3, typename L4 > struct le_result4< true_,Tag,F,L1,L2,L3,L4 > { typedef bind4< quote4< F,Tag > , typename L1::result_, typename L2::result_, typename L3::result_ , typename L4::result_ > result_; typedef mpl::protect type; }; } // namespace aux template< template< typename P1, typename P2, typename P3, typename P4 > class F , typename T1, typename T2, typename T3, typename T4 , typename Tag > struct lambda< F< T1,T2,T3,T4 > , Tag > { typedef lambda< T1,Tag > l1; typedef lambda< T2,Tag > l2; typedef lambda< T3,Tag > l3; typedef lambda< T4,Tag > l4; typedef typename l1::is_le is_le1; typedef typename l2::is_le is_le2; typedef typename l3::is_le is_le3; typedef typename l4::is_le is_le4; typedef typename aux::lambda_or< is_le1::value, is_le2::value, is_le3::value, is_le4::value >::type is_le; typedef aux::le_result4< is_le, Tag, F, l1, l2, l3, l4 > le_result_; typedef typename le_result_::result_ result_; typedef typename le_result_::type type; }; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename Tag > struct lambda< bind4< F,T1,T2,T3,T4 > , Tag > { typedef false_ is_le; typedef bind4< F , T1, T2, T3, T4 > result_; typedef result_ type; }; namespace aux { template< typename IsLE, typename Tag , template< typename P1, typename P2, typename P3, typename P4, typename P5 > class F , typename L1, typename L2, typename L3, typename L4, typename L5 > struct le_result5 { typedef F< typename L1::type, typename L2::type, typename L3::type , typename L4::type, typename L5::type > result_; typedef result_ type; }; template< typename Tag , template< typename P1, typename P2, typename P3, typename P4, typename P5 > class F , typename L1, typename L2, typename L3, typename L4, typename L5 > struct le_result5< true_,Tag,F,L1,L2,L3,L4,L5 > { typedef bind5< quote5< F,Tag > , typename L1::result_, typename L2::result_, typename L3::result_ , typename L4::result_, typename L5::result_ > result_; typedef mpl::protect type; }; } // namespace aux template< template< typename P1, typename P2, typename P3, typename P4 , typename P5 > class F , typename T1, typename T2, typename T3, typename T4, typename T5 , typename Tag > struct lambda< F< T1,T2,T3,T4,T5 > , Tag > { typedef lambda< T1,Tag > l1; typedef lambda< T2,Tag > l2; typedef lambda< T3,Tag > l3; typedef lambda< T4,Tag > l4; typedef lambda< T5,Tag > l5; typedef typename l1::is_le is_le1; typedef typename l2::is_le is_le2; typedef typename l3::is_le is_le3; typedef typename l4::is_le is_le4; typedef typename l5::is_le is_le5; typedef typename aux::lambda_or< is_le1::value, is_le2::value, is_le3::value, is_le4::value , is_le5::value >::type is_le; typedef aux::le_result5< is_le, Tag, F, l1, l2, l3, l4, l5 > le_result_; typedef typename le_result_::result_ result_; typedef typename le_result_::type type; }; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 , typename Tag > struct lambda< bind5< F,T1,T2,T3,T4,T5 > , Tag > { typedef false_ is_le; typedef bind5< F , T1, T2, T3, T4, T5 > result_; typedef result_ type; }; /// special case for 'protect' template< typename T, typename Tag > struct lambda< mpl::protect, Tag > { typedef false_ is_le; typedef mpl::protect result_; typedef result_ type; }; /// specializations for the main 'bind' form template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 , typename Tag > struct lambda< bind< F,T1,T2,T3,T4,T5 > , Tag > { typedef false_ is_le; typedef bind< F,T1,T2,T3,T4,T5 > result_; typedef result_ type; }; /// workaround for MWCW 8.3+/EDG < 303, leads to ambiguity on Digital Mars template< typename F, typename Tag1, typename Tag2 > struct lambda< lambda< F,Tag1 > , Tag2 > { typedef lambda< F,Tag2 > l1; typedef lambda< Tag1,Tag2 > l2; typedef typename l1::is_le is_le; typedef aux::le_result2 le_result_; typedef typename le_result_::result_ result_; typedef typename le_result_::type type; }; BOOST_MPL_AUX_NA_SPEC(2, lambda) }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/msvc60/greater.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/greater.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 , BOOST_MPL_AUX_NTTP_DECL(int, tag1_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value , BOOST_MPL_AUX_NTTP_DECL(int, tag2_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value > struct greater_impl : if_c< ( tag1_ > tag2_ ) , aux::cast2nd_impl< greater_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< greater_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct greater_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template<> struct greater_impl< na,integral_c_tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template<> struct greater_impl< integral_c_tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct greater_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct greater : aux::msvc_eti_base< typename apply_wrap2< greater_impl< typename greater_tag::type , typename greater_tag::type > , N1 , N2 >::type >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, greater, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 2, greater) }} namespace boost { namespace mpl { template<> struct greater_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply { BOOST_STATIC_CONSTANT(bool, value = ( BOOST_MPL_AUX_VALUE_WKND(N1)::value > BOOST_MPL_AUX_VALUE_WKND(N2)::value ) ); typedef bool_ type; }; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/msvc60/greater_equal.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/greater_equal.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 , BOOST_MPL_AUX_NTTP_DECL(int, tag1_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value , BOOST_MPL_AUX_NTTP_DECL(int, tag2_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value > struct greater_equal_impl : if_c< ( tag1_ > tag2_ ) , aux::cast2nd_impl< greater_equal_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< greater_equal_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct greater_equal_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template<> struct greater_equal_impl< na,integral_c_tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template<> struct greater_equal_impl< integral_c_tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct greater_equal_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct greater_equal : aux::msvc_eti_base< typename apply_wrap2< greater_equal_impl< typename greater_equal_tag::type , typename greater_equal_tag::type > , N1 , N2 >::type >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, greater_equal, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 2, greater_equal) }} namespace boost { namespace mpl { template<> struct greater_equal_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply { BOOST_STATIC_CONSTANT(bool, value = ( BOOST_MPL_AUX_VALUE_WKND(N1)::value >= BOOST_MPL_AUX_VALUE_WKND(N2)::value ) ); typedef bool_ type; }; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/msvc60/inherit.hpp ================================================ // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/inherit.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< bool C1, bool C2 > struct inherit2_impl { template< typename Derived, typename T1, typename T2 > struct result_ : T1, T2 { typedef Derived type_; }; }; template<> struct inherit2_impl< false,true > { template< typename Derived, typename T1, typename T2 > struct result_ : T1 { typedef T1 type_; }; }; template<> struct inherit2_impl< true,false > { template< typename Derived, typename T1, typename T2 > struct result_ : T2 { typedef T2 type_; }; }; template<> struct inherit2_impl< true,true > { template< typename Derived, typename T1, typename T2 > struct result_ { typedef T1 type_; }; }; } // namespace aux template< typename BOOST_MPL_AUX_NA_PARAM(T1) , typename BOOST_MPL_AUX_NA_PARAM(T2) > struct inherit2 : aux::inherit2_impl< is_empty_base::value , is_empty_base::value >::template result_< inherit2< T1,T2 >,T1, T2 > { typedef typename inherit2::type_ type; BOOST_MPL_AUX_LAMBDA_SUPPORT(2, inherit2, (T1, T2)) }; BOOST_MPL_AUX_NA_SPEC(2, inherit2) template< typename T1 = na, typename T2 = na, typename T3 = na > struct inherit3 : inherit2< typename inherit2< T1, T2 >::type , T3 > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 3 , inherit3 , ( T1, T2, T3) ) }; BOOST_MPL_AUX_NA_SPEC(3, inherit3) template< typename T1 = na, typename T2 = na, typename T3 = na, typename T4 = na > struct inherit4 : inherit2< typename inherit3< T1, T2, T3 >::type , T4 > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 4 , inherit4 , ( T1, T2, T3, T4) ) }; BOOST_MPL_AUX_NA_SPEC(4, inherit4) template< typename T1 = na, typename T2 = na, typename T3 = na, typename T4 = na , typename T5 = na > struct inherit5 : inherit2< typename inherit4< T1, T2, T3, T4 >::type , T5 > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , inherit5 , ( T1, T2, T3, T4, T5) ) }; BOOST_MPL_AUX_NA_SPEC(5, inherit5) /// primary template template< typename T1 = empty_base, typename T2 = empty_base , typename T3 = empty_base, typename T4 = empty_base , typename T5 = empty_base > struct inherit : inherit5< T1,T2,T3,T4,T5 > { }; template<> struct inherit< na,na,na,na,na > { template< typename T1 = empty_base, typename T2 = empty_base , typename T3 = empty_base, typename T4 = empty_base , typename T5 = empty_base > struct apply : inherit< T1,T2,T3,T4,T5 > { }; }; BOOST_MPL_AUX_NA_SPEC_LAMBDA(5, inherit) BOOST_MPL_AUX_NA_SPEC_ARITY(5, inherit) BOOST_MPL_AUX_NA_SPEC_TEMPLATE_ARITY(5, 5, inherit) }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/msvc60/iter_fold_if_impl.hpp ================================================ // Copyright Aleksey Gurtovoy 2001-2004 // Copyright David Abrahams 2001-2002 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/aux_/iter_fold_if_impl.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< typename Iterator, typename State > struct iter_fold_if_null_step { typedef State state; typedef Iterator iterator; }; template< bool > struct iter_fold_if_step_impl { template< typename Iterator , typename State , typename StateOp , typename IteratorOp > struct result_ { typedef typename apply2< StateOp,State,Iterator >::type state; typedef typename IteratorOp::type iterator; }; }; template<> struct iter_fold_if_step_impl { template< typename Iterator , typename State , typename StateOp , typename IteratorOp > struct result_ { typedef State state; typedef Iterator iterator; }; }; template< typename Iterator , typename State , typename ForwardOp , typename Predicate > struct iter_fold_if_forward_step { typedef typename apply2< Predicate,State,Iterator >::type not_last; typedef typename iter_fold_if_step_impl< BOOST_MPL_AUX_MSVC_VALUE_WKND(not_last)::value >::template result_< Iterator,State,ForwardOp, mpl::next > impl_; typedef typename impl_::state state; typedef typename impl_::iterator iterator; }; template< typename Iterator , typename State , typename BackwardOp , typename Predicate > struct iter_fold_if_backward_step { typedef typename apply2< Predicate,State,Iterator >::type not_last; typedef typename iter_fold_if_step_impl< BOOST_MPL_AUX_MSVC_VALUE_WKND(not_last)::value >::template result_< Iterator,State,BackwardOp, identity > impl_; typedef typename impl_::state state; typedef typename impl_::iterator iterator; }; template< typename Iterator , typename State , typename ForwardOp , typename ForwardPredicate , typename BackwardOp , typename BackwardPredicate > struct iter_fold_if_impl { private: typedef iter_fold_if_null_step< Iterator,State > forward_step0; typedef iter_fold_if_forward_step< typename forward_step0::iterator, typename forward_step0::state, ForwardOp, ForwardPredicate > forward_step1; typedef iter_fold_if_forward_step< typename forward_step1::iterator, typename forward_step1::state, ForwardOp, ForwardPredicate > forward_step2; typedef iter_fold_if_forward_step< typename forward_step2::iterator, typename forward_step2::state, ForwardOp, ForwardPredicate > forward_step3; typedef iter_fold_if_forward_step< typename forward_step3::iterator, typename forward_step3::state, ForwardOp, ForwardPredicate > forward_step4; typedef typename if_< typename forward_step4::not_last , iter_fold_if_impl< typename forward_step4::iterator , typename forward_step4::state , ForwardOp , ForwardPredicate , BackwardOp , BackwardPredicate > , iter_fold_if_null_step< typename forward_step4::iterator , typename forward_step4::state > >::type backward_step4; typedef iter_fold_if_backward_step< typename forward_step3::iterator, typename backward_step4::state, BackwardOp, BackwardPredicate > backward_step3; typedef iter_fold_if_backward_step< typename forward_step2::iterator, typename backward_step3::state, BackwardOp, BackwardPredicate > backward_step2; typedef iter_fold_if_backward_step< typename forward_step1::iterator, typename backward_step2::state, BackwardOp, BackwardPredicate > backward_step1; typedef iter_fold_if_backward_step< typename forward_step0::iterator, typename backward_step1::state, BackwardOp, BackwardPredicate > backward_step0; public: typedef typename backward_step0::state state; typedef typename backward_step4::iterator iterator; }; }}} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/msvc60/iter_fold_impl.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/aux_/iter_fold_impl.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { /// forward declaration template< int N , typename First , typename Last , typename State , typename ForwardOp > struct iter_fold_impl; template< int N > struct iter_fold_chunk; template<> struct iter_fold_chunk<0> { template< typename First , typename Last , typename State , typename ForwardOp > struct result_ { typedef First iter0; typedef State state0; typedef state0 state; typedef iter0 iterator; }; /// ETI workaround template<> struct result_< int,int,int,int > { typedef int state; typedef int iterator; }; }; template<> struct iter_fold_chunk<1> { template< typename First , typename Last , typename State , typename ForwardOp > struct result_ { typedef First iter0; typedef State state0; typedef typename apply2< ForwardOp,state0,iter0 >::type state1; typedef typename mpl::next::type iter1; typedef state1 state; typedef iter1 iterator; }; /// ETI workaround template<> struct result_< int,int,int,int > { typedef int state; typedef int iterator; }; }; template<> struct iter_fold_chunk<2> { template< typename First , typename Last , typename State , typename ForwardOp > struct result_ { typedef First iter0; typedef State state0; typedef typename apply2< ForwardOp,state0,iter0 >::type state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp,state1,iter1 >::type state2; typedef typename mpl::next::type iter2; typedef state2 state; typedef iter2 iterator; }; /// ETI workaround template<> struct result_< int,int,int,int > { typedef int state; typedef int iterator; }; }; template<> struct iter_fold_chunk<3> { template< typename First , typename Last , typename State , typename ForwardOp > struct result_ { typedef First iter0; typedef State state0; typedef typename apply2< ForwardOp,state0,iter0 >::type state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp,state1,iter1 >::type state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp,state2,iter2 >::type state3; typedef typename mpl::next::type iter3; typedef state3 state; typedef iter3 iterator; }; /// ETI workaround template<> struct result_< int,int,int,int > { typedef int state; typedef int iterator; }; }; template<> struct iter_fold_chunk<4> { template< typename First , typename Last , typename State , typename ForwardOp > struct result_ { typedef First iter0; typedef State state0; typedef typename apply2< ForwardOp,state0,iter0 >::type state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp,state1,iter1 >::type state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp,state2,iter2 >::type state3; typedef typename mpl::next::type iter3; typedef typename apply2< ForwardOp,state3,iter3 >::type state4; typedef typename mpl::next::type iter4; typedef state4 state; typedef iter4 iterator; }; /// ETI workaround template<> struct result_< int,int,int,int > { typedef int state; typedef int iterator; }; }; template< int N > struct iter_fold_chunk { template< typename First , typename Last , typename State , typename ForwardOp > struct result_ { typedef iter_fold_impl< 4 , First , Last , State , ForwardOp > chunk_; typedef iter_fold_impl< ( (N - 4) < 0 ? 0 : N - 4 ) , typename chunk_::iterator , Last , typename chunk_::state , ForwardOp > res_; typedef typename res_::state state; typedef typename res_::iterator iterator; }; }; template< typename First , typename Last , typename State , typename ForwardOp > struct iter_fold_step; template< typename Last , typename State > struct iter_fold_null_step { typedef Last iterator; typedef State state; }; template<> struct iter_fold_chunk< -1 > { template< typename First , typename Last , typename State , typename ForwardOp > struct result_ { typedef typename if_< typename is_same< First,Last >::type , iter_fold_null_step< Last,State > , iter_fold_step< First,Last,State,ForwardOp > >::type res_; typedef typename res_::state state; typedef typename res_::iterator iterator; }; /// ETI workaround template<> struct result_< int,int,int,int > { typedef int state; typedef int iterator; }; }; template< typename First , typename Last , typename State , typename ForwardOp > struct iter_fold_step { typedef iter_fold_chunk< -1 >::template result_< typename mpl::next::type , Last , typename apply2< ForwardOp,State,First >::type , ForwardOp > chunk_; typedef typename chunk_::state state; typedef typename chunk_::iterator iterator; }; template< int N , typename First , typename Last , typename State , typename ForwardOp > struct iter_fold_impl : iter_fold_chunk ::template result_< First,Last,State,ForwardOp > { }; }}} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/msvc60/lambda_no_ctps.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/aux_/lambda_no_ctps.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< bool C1 = false, bool C2 = false, bool C3 = false, bool C4 = false , bool C5 = false > struct lambda_or : true_ { }; template<> struct lambda_or< false,false,false,false,false > : false_ { }; template< typename Arity > struct lambda_impl { template< typename T, typename Tag, typename Protect > struct result_ { typedef T type; typedef is_placeholder is_le; }; }; template<> struct lambda_impl< int_<1> > { template< typename F, typename Tag, typename Protect > struct result_ { typedef lambda< typename F::arg1, Tag, false_ > l1; typedef typename l1::is_le is_le1; typedef aux::lambda_or< BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value > is_le; typedef bind1< typename F::rebind , typename l1::type > bind_; typedef typename if_< is_le , if_< Protect, mpl::protect, bind_ > , identity >::type type_; typedef typename type_::type type; }; }; template<> struct lambda_impl< int_<2> > { template< typename F, typename Tag, typename Protect > struct result_ { typedef lambda< typename F::arg1, Tag, false_ > l1; typedef lambda< typename F::arg2, Tag, false_ > l2; typedef typename l1::is_le is_le1; typedef typename l2::is_le is_le2; typedef aux::lambda_or< BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value > is_le; typedef bind2< typename F::rebind , typename l1::type, typename l2::type > bind_; typedef typename if_< is_le , if_< Protect, mpl::protect, bind_ > , identity >::type type_; typedef typename type_::type type; }; }; template<> struct lambda_impl< int_<3> > { template< typename F, typename Tag, typename Protect > struct result_ { typedef lambda< typename F::arg1, Tag, false_ > l1; typedef lambda< typename F::arg2, Tag, false_ > l2; typedef lambda< typename F::arg3, Tag, false_ > l3; typedef typename l1::is_le is_le1; typedef typename l2::is_le is_le2; typedef typename l3::is_le is_le3; typedef aux::lambda_or< BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le3)::value > is_le; typedef bind3< typename F::rebind , typename l1::type, typename l2::type, typename l3::type > bind_; typedef typename if_< is_le , if_< Protect, mpl::protect, bind_ > , identity >::type type_; typedef typename type_::type type; }; }; template<> struct lambda_impl< int_<4> > { template< typename F, typename Tag, typename Protect > struct result_ { typedef lambda< typename F::arg1, Tag, false_ > l1; typedef lambda< typename F::arg2, Tag, false_ > l2; typedef lambda< typename F::arg3, Tag, false_ > l3; typedef lambda< typename F::arg4, Tag, false_ > l4; typedef typename l1::is_le is_le1; typedef typename l2::is_le is_le2; typedef typename l3::is_le is_le3; typedef typename l4::is_le is_le4; typedef aux::lambda_or< BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le3)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le4)::value > is_le; typedef bind4< typename F::rebind , typename l1::type, typename l2::type, typename l3::type , typename l4::type > bind_; typedef typename if_< is_le , if_< Protect, mpl::protect, bind_ > , identity >::type type_; typedef typename type_::type type; }; }; template<> struct lambda_impl< int_<5> > { template< typename F, typename Tag, typename Protect > struct result_ { typedef lambda< typename F::arg1, Tag, false_ > l1; typedef lambda< typename F::arg2, Tag, false_ > l2; typedef lambda< typename F::arg3, Tag, false_ > l3; typedef lambda< typename F::arg4, Tag, false_ > l4; typedef lambda< typename F::arg5, Tag, false_ > l5; typedef typename l1::is_le is_le1; typedef typename l2::is_le is_le2; typedef typename l3::is_le is_le3; typedef typename l4::is_le is_le4; typedef typename l5::is_le is_le5; typedef aux::lambda_or< BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le3)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le4)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le5)::value > is_le; typedef bind5< typename F::rebind , typename l1::type, typename l2::type, typename l3::type , typename l4::type, typename l5::type > bind_; typedef typename if_< is_le , if_< Protect, mpl::protect, bind_ > , identity >::type type_; typedef typename type_::type type; }; }; } // namespace aux template< typename T , typename Tag , typename Protect > struct lambda { /// Metafunction forwarding confuses MSVC 6.x typedef typename aux::template_arity::type arity_; typedef typename aux::lambda_impl ::template result_< T,Tag,Protect > l_; typedef typename l_::type type; typedef typename l_::is_le is_le; BOOST_MPL_AUX_LAMBDA_SUPPORT(3, lambda, (T, Tag, Protect)) }; BOOST_MPL_AUX_NA_SPEC2(1, 3, lambda) template< typename T > struct is_lambda_expression : lambda::is_le { }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/msvc60/less.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/less.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 , BOOST_MPL_AUX_NTTP_DECL(int, tag1_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value , BOOST_MPL_AUX_NTTP_DECL(int, tag2_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value > struct less_impl : if_c< ( tag1_ > tag2_ ) , aux::cast2nd_impl< less_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< less_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct less_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template<> struct less_impl< na,integral_c_tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template<> struct less_impl< integral_c_tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct less_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct less : aux::msvc_eti_base< typename apply_wrap2< less_impl< typename less_tag::type , typename less_tag::type > , N1 , N2 >::type >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, less, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 2, less) }} namespace boost { namespace mpl { template<> struct less_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply { BOOST_STATIC_CONSTANT(bool, value = ( BOOST_MPL_AUX_VALUE_WKND(N2)::value > BOOST_MPL_AUX_VALUE_WKND(N1)::value ) ); typedef bool_ type; }; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/msvc60/less_equal.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/less_equal.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 , BOOST_MPL_AUX_NTTP_DECL(int, tag1_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value , BOOST_MPL_AUX_NTTP_DECL(int, tag2_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value > struct less_equal_impl : if_c< ( tag1_ > tag2_ ) , aux::cast2nd_impl< less_equal_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< less_equal_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct less_equal_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template<> struct less_equal_impl< na,integral_c_tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template<> struct less_equal_impl< integral_c_tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct less_equal_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct less_equal : aux::msvc_eti_base< typename apply_wrap2< less_equal_impl< typename less_equal_tag::type , typename less_equal_tag::type > , N1 , N2 >::type >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, less_equal, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 2, less_equal) }} namespace boost { namespace mpl { template<> struct less_equal_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply { BOOST_STATIC_CONSTANT(bool, value = ( BOOST_MPL_AUX_VALUE_WKND(N1)::value <= BOOST_MPL_AUX_VALUE_WKND(N2)::value ) ); typedef bool_ type; }; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/msvc60/list.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/list.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< int N > struct list_chooser; } namespace aux { template<> struct list_chooser<0> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef list0< >::type type; }; }; } // namespace aux namespace aux { template<> struct list_chooser<1> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename list1< T0 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_chooser<2> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename list2< T0, T1 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_chooser<3> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename list3< T0, T1, T2 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_chooser<4> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename list4< T0, T1, T2, T3 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_chooser<5> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename list5< T0, T1, T2, T3, T4 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_chooser<6> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename list6< T0, T1, T2, T3, T4, T5 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_chooser<7> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename list7< T0, T1, T2, T3, T4, T5, T6 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_chooser<8> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename list8< T0, T1, T2, T3, T4, T5, T6, T7 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_chooser<9> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename list9< T0, T1, T2, T3, T4, T5, T6, T7, T8 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_chooser<10> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename list10< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_chooser<11> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename list11< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_chooser<12> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename list12< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_chooser<13> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename list13< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_chooser<14> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename list14< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_chooser<15> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename list15< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_chooser<16> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename list16< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_chooser<17> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename list17< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_chooser<18> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename list18< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_chooser<19> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename list19< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_chooser<20> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename list20< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 >::type type; }; }; } // namespace aux namespace aux { template< typename T > struct is_list_arg { BOOST_STATIC_CONSTANT(bool, value = true); }; template<> struct is_list_arg { BOOST_STATIC_CONSTANT(bool, value = false); }; template< typename T1, typename T2, typename T3, typename T4, typename T5 , typename T6, typename T7, typename T8, typename T9, typename T10 , typename T11, typename T12, typename T13, typename T14, typename T15 , typename T16, typename T17, typename T18, typename T19, typename T20 > struct list_count_args { BOOST_STATIC_CONSTANT(int, value = is_list_arg::value + is_list_arg::value + is_list_arg::value + is_list_arg::value + is_list_arg::value + is_list_arg::value + is_list_arg::value + is_list_arg::value + is_list_arg::value + is_list_arg::value + is_list_arg::value + is_list_arg::value + is_list_arg::value + is_list_arg::value + is_list_arg::value + is_list_arg::value + is_list_arg::value + is_list_arg::value + is_list_arg::value + is_list_arg::value ); }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct list_impl { typedef aux::list_count_args< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 > arg_num_; typedef typename aux::list_chooser< arg_num_::value > ::template result_< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; }; } // namespace aux template< typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na , typename T12 = na, typename T13 = na, typename T14 = na , typename T15 = na, typename T16 = na, typename T17 = na , typename T18 = na, typename T19 = na > struct list : aux::list_impl< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 >::type { typedef typename aux::list_impl< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 >::type type; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/msvc60/list_c.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/list_c.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< int N > struct list_c_chooser; } namespace aux { template<> struct list_c_chooser<0> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename list0_c< T >::type type; }; }; } // namespace aux namespace aux { template<> struct list_c_chooser<1> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename list1_c< T, C0 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_c_chooser<2> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename list2_c< T, C0, C1 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_c_chooser<3> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename list3_c< T, C0, C1, C2 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_c_chooser<4> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename list4_c< T, C0, C1, C2, C3 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_c_chooser<5> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename list5_c< T, C0, C1, C2, C3, C4 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_c_chooser<6> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename list6_c< T, C0, C1, C2, C3, C4, C5 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_c_chooser<7> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename list7_c< T, C0, C1, C2, C3, C4, C5, C6 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_c_chooser<8> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename list8_c< T, C0, C1, C2, C3, C4, C5, C6, C7 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_c_chooser<9> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename list9_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_c_chooser<10> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename list10_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_c_chooser<11> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename list11_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_c_chooser<12> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename list12_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_c_chooser<13> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename list13_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_c_chooser<14> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename list14_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_c_chooser<15> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename list15_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_c_chooser<16> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename list16_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_c_chooser<17> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename list17_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_c_chooser<18> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename list18_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_c_chooser<19> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename list19_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_c_chooser<20> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename list20_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19 >::type type; }; }; } // namespace aux namespace aux { template< long C > struct is_list_c_arg { BOOST_STATIC_CONSTANT(bool, value = true); }; template<> struct is_list_c_arg { BOOST_STATIC_CONSTANT(bool, value = false); }; template< long C1, long C2, long C3, long C4, long C5, long C6, long C7, long C8 , long C9, long C10, long C11, long C12, long C13, long C14, long C15 , long C16, long C17, long C18, long C19, long C20 > struct list_c_count_args { BOOST_STATIC_CONSTANT(int, value = is_list_c_arg::value + is_list_c_arg::value + is_list_c_arg::value + is_list_c_arg::value + is_list_c_arg::value + is_list_c_arg::value + is_list_c_arg::value + is_list_c_arg::value + is_list_c_arg::value + is_list_c_arg::value + is_list_c_arg::value + is_list_c_arg::value + is_list_c_arg::value + is_list_c_arg::value + is_list_c_arg::value + is_list_c_arg::value + is_list_c_arg::value + is_list_c_arg::value + is_list_c_arg::value + is_list_c_arg::value ); }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct list_c_impl { typedef aux::list_c_count_args< C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19 > arg_num_; typedef typename aux::list_c_chooser< arg_num_::value > ::template result_< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19 >::type type; }; } // namespace aux template< typename T, long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX , long C3 = LONG_MAX, long C4 = LONG_MAX, long C5 = LONG_MAX , long C6 = LONG_MAX, long C7 = LONG_MAX, long C8 = LONG_MAX , long C9 = LONG_MAX, long C10 = LONG_MAX, long C11 = LONG_MAX , long C12 = LONG_MAX, long C13 = LONG_MAX, long C14 = LONG_MAX , long C15 = LONG_MAX, long C16 = LONG_MAX, long C17 = LONG_MAX , long C18 = LONG_MAX, long C19 = LONG_MAX > struct list_c : aux::list_c_impl< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19 >::type { typedef typename aux::list_c_impl< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19 >::type type; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/msvc60/map.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/map.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< int N > struct map_chooser; } namespace aux { template<> struct map_chooser<0> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef map0< >::type type; }; }; } // namespace aux namespace aux { template<> struct map_chooser<1> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename map1< T0 >::type type; }; }; } // namespace aux namespace aux { template<> struct map_chooser<2> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename map2< T0, T1 >::type type; }; }; } // namespace aux namespace aux { template<> struct map_chooser<3> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename map3< T0, T1, T2 >::type type; }; }; } // namespace aux namespace aux { template<> struct map_chooser<4> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename map4< T0, T1, T2, T3 >::type type; }; }; } // namespace aux namespace aux { template<> struct map_chooser<5> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename map5< T0, T1, T2, T3, T4 >::type type; }; }; } // namespace aux namespace aux { template<> struct map_chooser<6> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename map6< T0, T1, T2, T3, T4, T5 >::type type; }; }; } // namespace aux namespace aux { template<> struct map_chooser<7> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename map7< T0, T1, T2, T3, T4, T5, T6 >::type type; }; }; } // namespace aux namespace aux { template<> struct map_chooser<8> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename map8< T0, T1, T2, T3, T4, T5, T6, T7 >::type type; }; }; } // namespace aux namespace aux { template<> struct map_chooser<9> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename map9< T0, T1, T2, T3, T4, T5, T6, T7, T8 >::type type; }; }; } // namespace aux namespace aux { template<> struct map_chooser<10> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename map10< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9 >::type type; }; }; } // namespace aux namespace aux { template<> struct map_chooser<11> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename map11< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10 >::type type; }; }; } // namespace aux namespace aux { template<> struct map_chooser<12> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename map12< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11 >::type type; }; }; } // namespace aux namespace aux { template<> struct map_chooser<13> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename map13< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12 >::type type; }; }; } // namespace aux namespace aux { template<> struct map_chooser<14> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename map14< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13 >::type type; }; }; } // namespace aux namespace aux { template<> struct map_chooser<15> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename map15< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 >::type type; }; }; } // namespace aux namespace aux { template<> struct map_chooser<16> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename map16< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15 >::type type; }; }; } // namespace aux namespace aux { template<> struct map_chooser<17> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename map17< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16 >::type type; }; }; } // namespace aux namespace aux { template<> struct map_chooser<18> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename map18< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17 >::type type; }; }; } // namespace aux namespace aux { template<> struct map_chooser<19> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename map19< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18 >::type type; }; }; } // namespace aux namespace aux { template<> struct map_chooser<20> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename map20< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 >::type type; }; }; } // namespace aux namespace aux { template< typename T > struct is_map_arg { BOOST_STATIC_CONSTANT(bool, value = true); }; template<> struct is_map_arg { BOOST_STATIC_CONSTANT(bool, value = false); }; template< typename T1, typename T2, typename T3, typename T4, typename T5 , typename T6, typename T7, typename T8, typename T9, typename T10 , typename T11, typename T12, typename T13, typename T14, typename T15 , typename T16, typename T17, typename T18, typename T19, typename T20 > struct map_count_args { BOOST_STATIC_CONSTANT(int, value = is_map_arg::value + is_map_arg::value + is_map_arg::value + is_map_arg::value + is_map_arg::value + is_map_arg::value + is_map_arg::value + is_map_arg::value + is_map_arg::value + is_map_arg::value + is_map_arg::value + is_map_arg::value + is_map_arg::value + is_map_arg::value + is_map_arg::value + is_map_arg::value + is_map_arg::value + is_map_arg::value + is_map_arg::value + is_map_arg::value ); }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct map_impl { typedef aux::map_count_args< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 > arg_num_; typedef typename aux::map_chooser< arg_num_::value > ::template result_< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; }; } // namespace aux template< typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na , typename T12 = na, typename T13 = na, typename T14 = na , typename T15 = na, typename T16 = na, typename T17 = na , typename T18 = na, typename T19 = na > struct map : aux::map_impl< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 >::type { typedef typename aux::map_impl< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 >::type type; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/msvc60/minus.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/minus.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 , BOOST_MPL_AUX_NTTP_DECL(int, tag1_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value , BOOST_MPL_AUX_NTTP_DECL(int, tag2_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value > struct minus_impl : if_c< ( tag1_ > tag2_ ) , aux::cast2nd_impl< minus_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< minus_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct minus_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template<> struct minus_impl< na,integral_c_tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template<> struct minus_impl< integral_c_tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct minus_tag { typedef typename T::tag type; }; /// forward declaration template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct minus2; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) , typename N3 = na, typename N4 = na, typename N5 = na > struct minus : if_< is_na , minus2< N1,N2 > , minus< minus2< N1,N2 > , N3, N4, N5 > >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , minus , ( N1, N2, N3, N4, N5 ) ) }; template< typename N1 , typename N2 > struct minus2 : aux::msvc_eti_base< typename apply_wrap2< minus_impl< typename minus_tag::type , typename minus_tag::type > , N1 , N2 >::type >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, minus2, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 5, minus) }} namespace boost { namespace mpl { namespace aux { template< typename T, T n1, T n2 > struct minus_wknd { BOOST_STATIC_CONSTANT(T, value = (n1 - n2)); typedef integral_c< T,value > type; }; } template<> struct minus_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : aux::minus_wknd< typename aux::largest_int< typename N1::value_type , typename N2::value_type >::type , N1::value , N2::value >::type { }; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/msvc60/modulus.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/modulus.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 , BOOST_MPL_AUX_NTTP_DECL(int, tag1_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value , BOOST_MPL_AUX_NTTP_DECL(int, tag2_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value > struct modulus_impl : if_c< ( tag1_ > tag2_ ) , aux::cast2nd_impl< modulus_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< modulus_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct modulus_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template<> struct modulus_impl< na,integral_c_tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template<> struct modulus_impl< integral_c_tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct modulus_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct modulus : aux::msvc_eti_base< typename apply_wrap2< modulus_impl< typename modulus_tag::type , typename modulus_tag::type > , N1 , N2 >::type >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, modulus, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 2, modulus) }} namespace boost { namespace mpl { namespace aux { template< typename T, T n1, T n2 > struct modulus_wknd { BOOST_STATIC_CONSTANT(T, value = (n1 % n2)); typedef integral_c< T,value > type; }; } template<> struct modulus_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : aux::modulus_wknd< typename aux::largest_int< typename N1::value_type , typename N2::value_type >::type , N1::value , N2::value >::type { }; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/msvc60/not_equal_to.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/not_equal_to.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 , BOOST_MPL_AUX_NTTP_DECL(int, tag1_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value , BOOST_MPL_AUX_NTTP_DECL(int, tag2_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value > struct not_equal_to_impl : if_c< ( tag1_ > tag2_ ) , aux::cast2nd_impl< not_equal_to_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< not_equal_to_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct not_equal_to_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template<> struct not_equal_to_impl< na,integral_c_tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template<> struct not_equal_to_impl< integral_c_tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct not_equal_to_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct not_equal_to : aux::msvc_eti_base< typename apply_wrap2< not_equal_to_impl< typename not_equal_to_tag::type , typename not_equal_to_tag::type > , N1 , N2 >::type >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, not_equal_to, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 2, not_equal_to) }} namespace boost { namespace mpl { template<> struct not_equal_to_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply { BOOST_STATIC_CONSTANT(bool, value = ( BOOST_MPL_AUX_VALUE_WKND(N1)::value != BOOST_MPL_AUX_VALUE_WKND(N2)::value ) ); typedef bool_ type; }; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/msvc60/or.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/or.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< bool C_ > struct or_impl { template< typename T1, typename T2, typename T3, typename T4 > struct result_ : true_ { }; }; template<> struct or_impl { template< typename T1, typename T2, typename T3, typename T4 > struct result_ : or_impl< BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value >::template result_< T2,T3,T4,false_ > { }; }; template<> struct or_impl ::result_< false_,false_,false_,false_ > : false_ { }; } // namespace aux template< typename BOOST_MPL_AUX_NA_PARAM(T1) , typename BOOST_MPL_AUX_NA_PARAM(T2) , typename T3 = false_, typename T4 = false_, typename T5 = false_ > struct or_ : aux::or_impl< BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value >::template result_< T2,T3,T4,T5 > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , or_ , ( T1, T2, T3, T4, T5) ) }; BOOST_MPL_AUX_NA_SPEC2( 2 , 5 , or_ ) }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/msvc60/placeholders.hpp ================================================ // Copyright Aleksey Gurtovoy 2001-2004 // Copyright Peter Dimov 2001-2003 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/placeholders.hpp" header // -- DO NOT modify by hand! BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg< -1 > _; BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE namespace boost { namespace mpl { BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_) namespace placeholders { using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_; } }} /// agurt, 17/mar/02: one more placeholder for the last 'apply#' /// specialization BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg<1> _1; BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE namespace boost { namespace mpl { BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_1) namespace placeholders { using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_1; } }} BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg<2> _2; BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE namespace boost { namespace mpl { BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_2) namespace placeholders { using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_2; } }} BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg<3> _3; BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE namespace boost { namespace mpl { BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_3) namespace placeholders { using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_3; } }} BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg<4> _4; BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE namespace boost { namespace mpl { BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_4) namespace placeholders { using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_4; } }} BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg<5> _5; BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE namespace boost { namespace mpl { BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_5) namespace placeholders { using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_5; } }} BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg<6> _6; BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE namespace boost { namespace mpl { BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_6) namespace placeholders { using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_6; } }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/msvc60/plus.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/plus.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 , BOOST_MPL_AUX_NTTP_DECL(int, tag1_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value , BOOST_MPL_AUX_NTTP_DECL(int, tag2_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value > struct plus_impl : if_c< ( tag1_ > tag2_ ) , aux::cast2nd_impl< plus_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< plus_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct plus_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template<> struct plus_impl< na,integral_c_tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template<> struct plus_impl< integral_c_tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct plus_tag { typedef typename T::tag type; }; /// forward declaration template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct plus2; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) , typename N3 = na, typename N4 = na, typename N5 = na > struct plus : if_< is_na , plus2< N1,N2 > , plus< plus2< N1,N2 > , N3, N4, N5 > >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , plus , ( N1, N2, N3, N4, N5 ) ) }; template< typename N1 , typename N2 > struct plus2 : aux::msvc_eti_base< typename apply_wrap2< plus_impl< typename plus_tag::type , typename plus_tag::type > , N1 , N2 >::type >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, plus2, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 5, plus) }} namespace boost { namespace mpl { namespace aux { template< typename T, T n1, T n2 > struct plus_wknd { BOOST_STATIC_CONSTANT(T, value = (n1 + n2)); typedef integral_c< T,value > type; }; } template<> struct plus_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : aux::plus_wknd< typename aux::largest_int< typename N1::value_type , typename N2::value_type >::type , N1::value , N2::value >::type { }; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/msvc60/quote.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/quote.hpp" header // -- DO NOT modify by hand! ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/msvc60/reverse_fold_impl.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/aux_/reverse_fold_impl.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { /// forward declaration template< long N , typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_fold_impl; template< long N > struct reverse_fold_chunk; template<> struct reverse_fold_chunk<0> { template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct result_ { typedef First iter0; typedef State fwd_state0; typedef fwd_state0 bkwd_state0; typedef bkwd_state0 state; typedef iter0 iterator; }; /// ETI workaround template<> struct result_< int,int,int,int,int > { typedef int state; typedef int iterator; }; }; template<> struct reverse_fold_chunk<1> { template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct result_ { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; typedef typename mpl::next::type iter1; typedef fwd_state1 bkwd_state1; typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; typedef bkwd_state0 state; typedef iter1 iterator; }; /// ETI workaround template<> struct result_< int,int,int,int,int > { typedef int state; typedef int iterator; }; }; template<> struct reverse_fold_chunk<2> { template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct result_ { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp, fwd_state1, typename deref::type >::type fwd_state2; typedef typename mpl::next::type iter2; typedef fwd_state2 bkwd_state2; typedef typename apply2< BackwardOp, bkwd_state2, typename deref::type >::type bkwd_state1; typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; typedef bkwd_state0 state; typedef iter2 iterator; }; /// ETI workaround template<> struct result_< int,int,int,int,int > { typedef int state; typedef int iterator; }; }; template<> struct reverse_fold_chunk<3> { template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct result_ { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp, fwd_state1, typename deref::type >::type fwd_state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp, fwd_state2, typename deref::type >::type fwd_state3; typedef typename mpl::next::type iter3; typedef fwd_state3 bkwd_state3; typedef typename apply2< BackwardOp, bkwd_state3, typename deref::type >::type bkwd_state2; typedef typename apply2< BackwardOp, bkwd_state2, typename deref::type >::type bkwd_state1; typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; typedef bkwd_state0 state; typedef iter3 iterator; }; /// ETI workaround template<> struct result_< int,int,int,int,int > { typedef int state; typedef int iterator; }; }; template<> struct reverse_fold_chunk<4> { template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct result_ { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp, fwd_state1, typename deref::type >::type fwd_state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp, fwd_state2, typename deref::type >::type fwd_state3; typedef typename mpl::next::type iter3; typedef typename apply2< ForwardOp, fwd_state3, typename deref::type >::type fwd_state4; typedef typename mpl::next::type iter4; typedef fwd_state4 bkwd_state4; typedef typename apply2< BackwardOp, bkwd_state4, typename deref::type >::type bkwd_state3; typedef typename apply2< BackwardOp, bkwd_state3, typename deref::type >::type bkwd_state2; typedef typename apply2< BackwardOp, bkwd_state2, typename deref::type >::type bkwd_state1; typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; typedef bkwd_state0 state; typedef iter4 iterator; }; /// ETI workaround template<> struct result_< int,int,int,int,int > { typedef int state; typedef int iterator; }; }; template< long N > struct reverse_fold_chunk { template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct result_ { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp, fwd_state1, typename deref::type >::type fwd_state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp, fwd_state2, typename deref::type >::type fwd_state3; typedef typename mpl::next::type iter3; typedef typename apply2< ForwardOp, fwd_state3, typename deref::type >::type fwd_state4; typedef typename mpl::next::type iter4; typedef reverse_fold_impl< ( (N - 4) < 0 ? 0 : N - 4 ) , iter4 , Last , fwd_state4 , BackwardOp , ForwardOp > nested_chunk; typedef typename nested_chunk::state bkwd_state4; typedef typename apply2< BackwardOp, bkwd_state4, typename deref::type >::type bkwd_state3; typedef typename apply2< BackwardOp, bkwd_state3, typename deref::type >::type bkwd_state2; typedef typename apply2< BackwardOp, bkwd_state2, typename deref::type >::type bkwd_state1; typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; typedef bkwd_state0 state; typedef typename nested_chunk::iterator iterator; }; }; template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_fold_step; template< typename Last , typename State > struct reverse_fold_null_step { typedef Last iterator; typedef State state; }; template<> struct reverse_fold_chunk< -1 > { template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct result_ { typedef typename if_< typename is_same< First,Last >::type , reverse_fold_null_step< Last,State > , reverse_fold_step< First,Last,State,BackwardOp,ForwardOp > >::type res_; typedef typename res_::state state; typedef typename res_::iterator iterator; }; /// ETI workaround template<> struct result_< int,int,int,int,int > { typedef int state; typedef int iterator; }; }; template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_fold_step { typedef reverse_fold_chunk< -1 >::template result_< typename mpl::next::type , Last , typename apply2::type>::type , BackwardOp , ForwardOp > nested_step; typedef typename apply2< BackwardOp , typename nested_step::state , typename deref::type >::type state; typedef typename nested_step::iterator iterator; }; template< long N , typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_fold_impl : reverse_fold_chunk ::template result_< First,Last,State,BackwardOp,ForwardOp > { }; }}} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/msvc60/reverse_iter_fold_impl.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/aux_/reverse_iter_fold_impl.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { /// forward declaration template< long N , typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_iter_fold_impl; template< long N > struct reverse_iter_fold_chunk; template<> struct reverse_iter_fold_chunk<0> { template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct result_ { typedef First iter0; typedef State fwd_state0; typedef fwd_state0 bkwd_state0; typedef bkwd_state0 state; typedef iter0 iterator; }; /// ETI workaround template<> struct result_< int,int,int,int,int > { typedef int state; typedef int iterator; }; }; template<> struct reverse_iter_fold_chunk<1> { template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct result_ { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; typedef typename mpl::next::type iter1; typedef fwd_state1 bkwd_state1; typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; typedef bkwd_state0 state; typedef iter1 iterator; }; /// ETI workaround template<> struct result_< int,int,int,int,int > { typedef int state; typedef int iterator; }; }; template<> struct reverse_iter_fold_chunk<2> { template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct result_ { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; typedef typename mpl::next::type iter2; typedef fwd_state2 bkwd_state2; typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1; typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; typedef bkwd_state0 state; typedef iter2 iterator; }; /// ETI workaround template<> struct result_< int,int,int,int,int > { typedef int state; typedef int iterator; }; }; template<> struct reverse_iter_fold_chunk<3> { template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct result_ { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp,fwd_state2,iter2 >::type fwd_state3; typedef typename mpl::next::type iter3; typedef fwd_state3 bkwd_state3; typedef typename apply2< BackwardOp,bkwd_state3,iter2 >::type bkwd_state2; typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1; typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; typedef bkwd_state0 state; typedef iter3 iterator; }; /// ETI workaround template<> struct result_< int,int,int,int,int > { typedef int state; typedef int iterator; }; }; template<> struct reverse_iter_fold_chunk<4> { template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct result_ { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp,fwd_state2,iter2 >::type fwd_state3; typedef typename mpl::next::type iter3; typedef typename apply2< ForwardOp,fwd_state3,iter3 >::type fwd_state4; typedef typename mpl::next::type iter4; typedef fwd_state4 bkwd_state4; typedef typename apply2< BackwardOp,bkwd_state4,iter3 >::type bkwd_state3; typedef typename apply2< BackwardOp,bkwd_state3,iter2 >::type bkwd_state2; typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1; typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; typedef bkwd_state0 state; typedef iter4 iterator; }; /// ETI workaround template<> struct result_< int,int,int,int,int > { typedef int state; typedef int iterator; }; }; template< long N > struct reverse_iter_fold_chunk { template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct result_ { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp,fwd_state2,iter2 >::type fwd_state3; typedef typename mpl::next::type iter3; typedef typename apply2< ForwardOp,fwd_state3,iter3 >::type fwd_state4; typedef typename mpl::next::type iter4; typedef reverse_iter_fold_impl< ( (N - 4) < 0 ? 0 : N - 4 ) , iter4 , Last , fwd_state4 , BackwardOp , ForwardOp > nested_chunk; typedef typename nested_chunk::state bkwd_state4; typedef typename apply2< BackwardOp,bkwd_state4,iter3 >::type bkwd_state3; typedef typename apply2< BackwardOp,bkwd_state3,iter2 >::type bkwd_state2; typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1; typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; typedef bkwd_state0 state; typedef typename nested_chunk::iterator iterator; }; }; template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_iter_fold_step; template< typename Last , typename State > struct reverse_iter_fold_null_step { typedef Last iterator; typedef State state; }; template<> struct reverse_iter_fold_chunk< -1 > { template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct result_ { typedef typename if_< typename is_same< First,Last >::type , reverse_iter_fold_null_step< Last,State > , reverse_iter_fold_step< First,Last,State,BackwardOp,ForwardOp > >::type res_; typedef typename res_::state state; typedef typename res_::iterator iterator; }; /// ETI workaround template<> struct result_< int,int,int,int,int > { typedef int state; typedef int iterator; }; }; template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_iter_fold_step { typedef reverse_iter_fold_chunk< -1 >::template result_< typename mpl::next::type , Last , typename apply2< ForwardOp,State,First >::type , BackwardOp , ForwardOp > nested_step; typedef typename apply2< BackwardOp , typename nested_step::state , First >::type state; typedef typename nested_step::iterator iterator; }; template< long N , typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_iter_fold_impl : reverse_iter_fold_chunk ::template result_< First,Last,State,BackwardOp,ForwardOp > { }; }}} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/msvc60/set.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/set.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< int N > struct set_chooser; } namespace aux { template<> struct set_chooser<0> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef set0< >::type type; }; }; } // namespace aux namespace aux { template<> struct set_chooser<1> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename set1< T0 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_chooser<2> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename set2< T0, T1 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_chooser<3> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename set3< T0, T1, T2 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_chooser<4> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename set4< T0, T1, T2, T3 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_chooser<5> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename set5< T0, T1, T2, T3, T4 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_chooser<6> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename set6< T0, T1, T2, T3, T4, T5 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_chooser<7> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename set7< T0, T1, T2, T3, T4, T5, T6 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_chooser<8> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename set8< T0, T1, T2, T3, T4, T5, T6, T7 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_chooser<9> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename set9< T0, T1, T2, T3, T4, T5, T6, T7, T8 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_chooser<10> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename set10< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_chooser<11> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename set11< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_chooser<12> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename set12< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_chooser<13> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename set13< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_chooser<14> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename set14< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_chooser<15> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename set15< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_chooser<16> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename set16< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_chooser<17> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename set17< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_chooser<18> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename set18< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_chooser<19> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename set19< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_chooser<20> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename set20< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 >::type type; }; }; } // namespace aux namespace aux { template< typename T > struct is_set_arg { BOOST_STATIC_CONSTANT(bool, value = true); }; template<> struct is_set_arg { BOOST_STATIC_CONSTANT(bool, value = false); }; template< typename T1, typename T2, typename T3, typename T4, typename T5 , typename T6, typename T7, typename T8, typename T9, typename T10 , typename T11, typename T12, typename T13, typename T14, typename T15 , typename T16, typename T17, typename T18, typename T19, typename T20 > struct set_count_args { BOOST_STATIC_CONSTANT(int, value = is_set_arg::value + is_set_arg::value + is_set_arg::value + is_set_arg::value + is_set_arg::value + is_set_arg::value + is_set_arg::value + is_set_arg::value + is_set_arg::value + is_set_arg::value + is_set_arg::value + is_set_arg::value + is_set_arg::value + is_set_arg::value + is_set_arg::value + is_set_arg::value + is_set_arg::value + is_set_arg::value + is_set_arg::value + is_set_arg::value ); }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct set_impl { typedef aux::set_count_args< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 > arg_num_; typedef typename aux::set_chooser< arg_num_::value > ::template result_< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; }; } // namespace aux template< typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na , typename T12 = na, typename T13 = na, typename T14 = na , typename T15 = na, typename T16 = na, typename T17 = na , typename T18 = na, typename T19 = na > struct set : aux::set_impl< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 >::type { typedef typename aux::set_impl< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 >::type type; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/msvc60/set_c.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/set_c.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< int N > struct set_c_chooser; } namespace aux { template<> struct set_c_chooser<0> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename set0_c< T >::type type; }; }; } // namespace aux namespace aux { template<> struct set_c_chooser<1> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename set1_c< T, C0 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_c_chooser<2> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename set2_c< T, C0, C1 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_c_chooser<3> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename set3_c< T, C0, C1, C2 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_c_chooser<4> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename set4_c< T, C0, C1, C2, C3 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_c_chooser<5> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename set5_c< T, C0, C1, C2, C3, C4 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_c_chooser<6> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename set6_c< T, C0, C1, C2, C3, C4, C5 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_c_chooser<7> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename set7_c< T, C0, C1, C2, C3, C4, C5, C6 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_c_chooser<8> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename set8_c< T, C0, C1, C2, C3, C4, C5, C6, C7 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_c_chooser<9> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename set9_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_c_chooser<10> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename set10_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_c_chooser<11> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename set11_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_c_chooser<12> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename set12_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_c_chooser<13> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename set13_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_c_chooser<14> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename set14_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_c_chooser<15> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename set15_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_c_chooser<16> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename set16_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_c_chooser<17> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename set17_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_c_chooser<18> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename set18_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_c_chooser<19> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename set19_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_c_chooser<20> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename set20_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19 >::type type; }; }; } // namespace aux namespace aux { template< long C > struct is_set_c_arg { BOOST_STATIC_CONSTANT(bool, value = true); }; template<> struct is_set_c_arg { BOOST_STATIC_CONSTANT(bool, value = false); }; template< long C1, long C2, long C3, long C4, long C5, long C6, long C7, long C8 , long C9, long C10, long C11, long C12, long C13, long C14, long C15 , long C16, long C17, long C18, long C19, long C20 > struct set_c_count_args { BOOST_STATIC_CONSTANT(int, value = is_set_c_arg::value + is_set_c_arg::value + is_set_c_arg::value + is_set_c_arg::value + is_set_c_arg::value + is_set_c_arg::value + is_set_c_arg::value + is_set_c_arg::value + is_set_c_arg::value + is_set_c_arg::value + is_set_c_arg::value + is_set_c_arg::value + is_set_c_arg::value + is_set_c_arg::value + is_set_c_arg::value + is_set_c_arg::value + is_set_c_arg::value + is_set_c_arg::value + is_set_c_arg::value + is_set_c_arg::value ); }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct set_c_impl { typedef aux::set_c_count_args< C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19 > arg_num_; typedef typename aux::set_c_chooser< arg_num_::value > ::template result_< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19 >::type type; }; } // namespace aux template< typename T, long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX , long C3 = LONG_MAX, long C4 = LONG_MAX, long C5 = LONG_MAX , long C6 = LONG_MAX, long C7 = LONG_MAX, long C8 = LONG_MAX , long C9 = LONG_MAX, long C10 = LONG_MAX, long C11 = LONG_MAX , long C12 = LONG_MAX, long C13 = LONG_MAX, long C14 = LONG_MAX , long C15 = LONG_MAX, long C16 = LONG_MAX, long C17 = LONG_MAX , long C18 = LONG_MAX, long C19 = LONG_MAX > struct set_c : aux::set_c_impl< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19 >::type { typedef typename aux::set_c_impl< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19 >::type type; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/msvc60/shift_left.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // Copyright Jaap Suter 2003 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/shift_left.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 , BOOST_MPL_AUX_NTTP_DECL(int, tag1_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value , BOOST_MPL_AUX_NTTP_DECL(int, tag2_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value > struct shift_left_impl : if_c< ( tag1_ > tag2_ ) , aux::cast2nd_impl< shift_left_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< shift_left_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct shift_left_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template<> struct shift_left_impl< na,integral_c_tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template<> struct shift_left_impl< integral_c_tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct shift_left_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct shift_left : aux::msvc_eti_base< typename apply_wrap2< shift_left_impl< typename shift_left_tag::type , typename shift_left_tag::type > , N1 , N2 >::type >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, shift_left, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 2, shift_left) }} namespace boost { namespace mpl { namespace aux { template< typename T, typename Shift, T n, Shift s > struct shift_left_wknd { BOOST_STATIC_CONSTANT(T, value = (n << s)); typedef integral_c< T,value > type; }; } template<> struct shift_left_impl< integral_c_tag,integral_c_tag > { template< typename N, typename S > struct apply : aux::shift_left_wknd< typename N::value_type , typename S::value_type , N::value , S::value >::type { }; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/msvc60/shift_right.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // Copyright Jaap Suter 2003 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/shift_right.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 , BOOST_MPL_AUX_NTTP_DECL(int, tag1_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value , BOOST_MPL_AUX_NTTP_DECL(int, tag2_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value > struct shift_right_impl : if_c< ( tag1_ > tag2_ ) , aux::cast2nd_impl< shift_right_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< shift_right_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct shift_right_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template<> struct shift_right_impl< na,integral_c_tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template<> struct shift_right_impl< integral_c_tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct shift_right_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct shift_right : aux::msvc_eti_base< typename apply_wrap2< shift_right_impl< typename shift_right_tag::type , typename shift_right_tag::type > , N1 , N2 >::type >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, shift_right, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 2, shift_right) }} namespace boost { namespace mpl { namespace aux { template< typename T, typename Shift, T n, Shift s > struct shift_right_wknd { BOOST_STATIC_CONSTANT(T, value = (n >> s)); typedef integral_c< T,value > type; }; } template<> struct shift_right_impl< integral_c_tag,integral_c_tag > { template< typename N, typename S > struct apply : aux::shift_right_wknd< typename N::value_type , typename S::value_type , N::value , S::value >::type { }; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/msvc60/template_arity.hpp ================================================ // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/aux_/template_arity.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< bool > struct template_arity_impl { template< typename F > struct result_ : mpl::int_< -1 > { }; }; template<> struct template_arity_impl { template< typename F > struct result_ : F::arity { }; }; template< typename F > struct template_arity : template_arity_impl< ::boost::mpl::aux::has_rebind::value > ::template result_ { }; template<> struct template_arity : mpl::int_< -1 > { }; }}} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/msvc60/times.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/times.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 , BOOST_MPL_AUX_NTTP_DECL(int, tag1_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value , BOOST_MPL_AUX_NTTP_DECL(int, tag2_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value > struct times_impl : if_c< ( tag1_ > tag2_ ) , aux::cast2nd_impl< times_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< times_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct times_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template<> struct times_impl< na,integral_c_tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template<> struct times_impl< integral_c_tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct times_tag { typedef typename T::tag type; }; /// forward declaration template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct times2; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) , typename N3 = na, typename N4 = na, typename N5 = na > struct times : if_< is_na , times2< N1,N2 > , times< times2< N1,N2 > , N3, N4, N5 > >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , times , ( N1, N2, N3, N4, N5 ) ) }; template< typename N1 , typename N2 > struct times2 : aux::msvc_eti_base< typename apply_wrap2< times_impl< typename times_tag::type , typename times_tag::type > , N1 , N2 >::type >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, times2, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 5, times) }} namespace boost { namespace mpl { namespace aux { template< typename T, T n1, T n2 > struct times_wknd { BOOST_STATIC_CONSTANT(T, value = (n1 * n2)); typedef integral_c< T,value > type; }; } template<> struct times_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : aux::times_wknd< typename aux::largest_int< typename N1::value_type , typename N2::value_type >::type , N1::value , N2::value >::type { }; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/msvc60/unpack_args.hpp ================================================ // Copyright Aleksey Gurtovoy 2002-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/unpack_args.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< BOOST_MPL_AUX_NTTP_DECL(int, size) > struct unpack_args_impl { template< typename F, typename Args > struct apply; }; template<> struct unpack_args_impl<0> { template< typename F, typename Args > struct apply : apply0< F > { }; }; template<> struct unpack_args_impl<1> { template< typename F, typename Args > struct apply : apply1< F , typename at_c< Args,0 >::type > { }; }; template<> struct unpack_args_impl<2> { template< typename F, typename Args > struct apply : apply2< F , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type > { }; }; template<> struct unpack_args_impl<3> { template< typename F, typename Args > struct apply : apply3< F , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type , typename at_c< Args,2 >::type > { }; }; template<> struct unpack_args_impl<4> { template< typename F, typename Args > struct apply : apply4< F , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type , typename at_c< Args,2 >::type, typename at_c< Args,3 >::type > { }; }; template<> struct unpack_args_impl<5> { template< typename F, typename Args > struct apply : apply5< F , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type , typename at_c< Args,2 >::type, typename at_c< Args,3 >::type , typename at_c< Args,4 >::type > { }; }; } template< typename F > struct unpack_args { template< typename Args > struct apply : aux::unpack_args_impl< size::value > ::template apply< F,Args > { }; }; BOOST_MPL_AUX_PASS_THROUGH_LAMBDA_SPEC(1, unpack_args) }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/msvc60/vector.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/vector.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< int N > struct vector_chooser; } namespace aux { template<> struct vector_chooser<0> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef vector0< >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_chooser<1> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector1< T0 >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_chooser<2> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector2< T0, T1 >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_chooser<3> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector3< T0, T1, T2 >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_chooser<4> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector4< T0, T1, T2, T3 >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_chooser<5> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector5< T0, T1, T2, T3, T4 >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_chooser<6> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector6< T0, T1, T2, T3, T4, T5 >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_chooser<7> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector7< T0, T1, T2, T3, T4, T5, T6 >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_chooser<8> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector8< T0, T1, T2, T3, T4, T5, T6, T7 >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_chooser<9> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector9< T0, T1, T2, T3, T4, T5, T6, T7, T8 >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_chooser<10> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector10< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9 >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_chooser<11> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector11< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10 >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_chooser<12> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector12< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11 >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_chooser<13> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector13< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12 >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_chooser<14> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector14< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13 >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_chooser<15> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector15< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_chooser<16> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector16< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15 >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_chooser<17> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector17< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16 >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_chooser<18> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector18< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17 >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_chooser<19> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector19< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18 >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_chooser<20> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector20< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 >::type type; }; }; } // namespace aux namespace aux { template< typename T > struct is_vector_arg { BOOST_STATIC_CONSTANT(bool, value = true); }; template<> struct is_vector_arg { BOOST_STATIC_CONSTANT(bool, value = false); }; template< typename T1, typename T2, typename T3, typename T4, typename T5 , typename T6, typename T7, typename T8, typename T9, typename T10 , typename T11, typename T12, typename T13, typename T14, typename T15 , typename T16, typename T17, typename T18, typename T19, typename T20 > struct vector_count_args { BOOST_STATIC_CONSTANT(int, value = is_vector_arg::value + is_vector_arg::value + is_vector_arg::value + is_vector_arg::value + is_vector_arg::value + is_vector_arg::value + is_vector_arg::value + is_vector_arg::value + is_vector_arg::value + is_vector_arg::value + is_vector_arg::value + is_vector_arg::value + is_vector_arg::value + is_vector_arg::value + is_vector_arg::value + is_vector_arg::value + is_vector_arg::value + is_vector_arg::value + is_vector_arg::value + is_vector_arg::value ); }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct vector_impl { typedef aux::vector_count_args< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 > arg_num_; typedef typename aux::vector_chooser< arg_num_::value > ::template result_< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; }; } // namespace aux template< typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na , typename T12 = na, typename T13 = na, typename T14 = na , typename T15 = na, typename T16 = na, typename T17 = na , typename T18 = na, typename T19 = na > struct vector : aux::vector_impl< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 >::type { typedef typename aux::vector_impl< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 >::type type; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/msvc60/vector_c.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/vector_c.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< int N > struct vector_c_chooser; } namespace aux { template<> struct vector_c_chooser<0> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename vector0_c< T >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_c_chooser<1> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename vector1_c< T, T(C0) >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_c_chooser<2> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename vector2_c< T, T(C0), T(C1) >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_c_chooser<3> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename vector3_c< T, T(C0), T(C1), T(C2) >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_c_chooser<4> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename vector4_c< T, T(C0), T(C1), T(C2), T(C3) >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_c_chooser<5> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename vector5_c< T, T(C0), T(C1), T(C2), T(C3), T(C4) >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_c_chooser<6> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename vector6_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5) >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_c_chooser<7> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename vector7_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6) >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_c_chooser<8> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename vector8_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7) >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_c_chooser<9> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename vector9_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8) >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_c_chooser<10> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename vector10_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9) >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_c_chooser<11> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename vector11_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10) >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_c_chooser<12> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename vector12_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11) >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_c_chooser<13> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename vector13_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12) >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_c_chooser<14> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename vector14_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13) >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_c_chooser<15> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename vector15_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14) >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_c_chooser<16> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename vector16_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15) >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_c_chooser<17> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename vector17_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16) >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_c_chooser<18> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename vector18_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17) >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_c_chooser<19> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename vector19_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17), T(C18) >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_c_chooser<20> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename vector20_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17), T(C18), T(C19) >::type type; }; }; } // namespace aux namespace aux { template< long C > struct is_vector_c_arg { BOOST_STATIC_CONSTANT(bool, value = true); }; template<> struct is_vector_c_arg { BOOST_STATIC_CONSTANT(bool, value = false); }; template< long C1, long C2, long C3, long C4, long C5, long C6, long C7, long C8 , long C9, long C10, long C11, long C12, long C13, long C14, long C15 , long C16, long C17, long C18, long C19, long C20 > struct vector_c_count_args { BOOST_STATIC_CONSTANT(int, value = is_vector_c_arg::value + is_vector_c_arg::value + is_vector_c_arg::value + is_vector_c_arg::value + is_vector_c_arg::value + is_vector_c_arg::value + is_vector_c_arg::value + is_vector_c_arg::value + is_vector_c_arg::value + is_vector_c_arg::value + is_vector_c_arg::value + is_vector_c_arg::value + is_vector_c_arg::value + is_vector_c_arg::value + is_vector_c_arg::value + is_vector_c_arg::value + is_vector_c_arg::value + is_vector_c_arg::value + is_vector_c_arg::value + is_vector_c_arg::value ); }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct vector_c_impl { typedef aux::vector_c_count_args< C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19 > arg_num_; typedef typename aux::vector_c_chooser< arg_num_::value > ::template result_< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19 >::type type; }; } // namespace aux template< typename T, long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX , long C3 = LONG_MAX, long C4 = LONG_MAX, long C5 = LONG_MAX , long C6 = LONG_MAX, long C7 = LONG_MAX, long C8 = LONG_MAX , long C9 = LONG_MAX, long C10 = LONG_MAX, long C11 = LONG_MAX , long C12 = LONG_MAX, long C13 = LONG_MAX, long C14 = LONG_MAX , long C15 = LONG_MAX, long C16 = LONG_MAX, long C17 = LONG_MAX , long C18 = LONG_MAX, long C19 = LONG_MAX > struct vector_c : aux::vector_c_impl< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19 >::type { typedef typename aux::vector_c_impl< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19 >::type type; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/msvc70/advance_backward.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/aux_/advance_backward.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< long N > struct advance_backward; template<> struct advance_backward<0> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef iter0 type; }; }; template<> struct advance_backward<1> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef typename prior::type iter1; typedef iter1 type; }; }; template<> struct advance_backward<2> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef typename prior::type iter1; typedef typename prior::type iter2; typedef iter2 type; }; }; template<> struct advance_backward<3> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef typename prior::type iter1; typedef typename prior::type iter2; typedef typename prior::type iter3; typedef iter3 type; }; }; template<> struct advance_backward<4> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef typename prior::type iter1; typedef typename prior::type iter2; typedef typename prior::type iter3; typedef typename prior::type iter4; typedef iter4 type; }; }; template< long N > struct advance_backward { template< typename Iterator > struct apply { typedef typename apply_wrap1< advance_backward<4> , Iterator >::type chunk_result_; typedef typename apply_wrap1< advance_backward<( (N - 4) < 0 ? 0 : N - 4 )> , chunk_result_ >::type type; }; }; }}} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/msvc70/advance_forward.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/aux_/advance_forward.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< long N > struct advance_forward; template<> struct advance_forward<0> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef iter0 type; }; }; template<> struct advance_forward<1> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef typename next::type iter1; typedef iter1 type; }; }; template<> struct advance_forward<2> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef typename next::type iter1; typedef typename next::type iter2; typedef iter2 type; }; }; template<> struct advance_forward<3> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef typename next::type iter1; typedef typename next::type iter2; typedef typename next::type iter3; typedef iter3 type; }; }; template<> struct advance_forward<4> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef typename next::type iter1; typedef typename next::type iter2; typedef typename next::type iter3; typedef typename next::type iter4; typedef iter4 type; }; }; template< long N > struct advance_forward { template< typename Iterator > struct apply { typedef typename apply_wrap1< advance_forward<4> , Iterator >::type chunk_result_; typedef typename apply_wrap1< advance_forward<( (N - 4) < 0 ? 0 : N - 4 )> , chunk_result_ >::type type; }; }; }}} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/msvc70/and.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/and.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< bool C_ > struct and_impl { template< typename T1, typename T2, typename T3, typename T4 > struct result_ : false_ { }; }; template<> struct and_impl { template< typename T1, typename T2, typename T3, typename T4 > struct result_ : and_impl< BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value >::template result_< T2,T3,T4,true_ > { }; template<> struct result_< true_,true_,true_,true_ > : true_ { }; }; } // namespace aux template< typename BOOST_MPL_AUX_NA_PARAM(T1) , typename BOOST_MPL_AUX_NA_PARAM(T2) , typename T3 = true_, typename T4 = true_, typename T5 = true_ > struct and_ : aux::and_impl< BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value >::template result_< T2,T3,T4,T5 > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , and_ , ( T1, T2, T3, T4, T5) ) }; BOOST_MPL_AUX_NA_SPEC2( 2 , 5 , and_ ) }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/msvc70/apply.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/apply.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename F > struct apply0 : apply_wrap0< typename lambda::type > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 1 , apply0 , (F ) ) }; /// workaround for ETI bug template<> struct apply0 { typedef int type; }; template< typename F, typename T1 > struct apply1 : apply_wrap1< typename lambda::type , T1 > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 2 , apply1 , (F, T1) ) }; /// workaround for ETI bug template<> struct apply1< int,int > { typedef int type; }; template< typename F, typename T1, typename T2 > struct apply2 : apply_wrap2< typename lambda::type , T1, T2 > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 3 , apply2 , (F, T1, T2) ) }; /// workaround for ETI bug template<> struct apply2< int,int,int > { typedef int type; }; template< typename F, typename T1, typename T2, typename T3 > struct apply3 : apply_wrap3< typename lambda::type , T1, T2, T3 > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 4 , apply3 , (F, T1, T2, T3) ) }; /// workaround for ETI bug template<> struct apply3< int,int,int,int > { typedef int type; }; template< typename F, typename T1, typename T2, typename T3, typename T4 > struct apply4 : apply_wrap4< typename lambda::type , T1, T2, T3, T4 > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , apply4 , (F, T1, T2, T3, T4) ) }; /// workaround for ETI bug template<> struct apply4< int,int,int,int,int > { typedef int type; }; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct apply5 : apply_wrap5< typename lambda::type , T1, T2, T3, T4, T5 > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 6 , apply5 , (F, T1, T2, T3, T4, T5) ) }; /// workaround for ETI bug template<> struct apply5< int,int,int,int,int,int > { typedef int type; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/msvc70/apply_fwd.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/apply_fwd.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename F > struct apply0; template< typename F, typename T1 > struct apply1; template< typename F, typename T1, typename T2 > struct apply2; template< typename F, typename T1, typename T2, typename T3 > struct apply3; template< typename F, typename T1, typename T2, typename T3, typename T4 > struct apply4; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct apply5; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/msvc70/apply_wrap.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/apply_wrap.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename F , typename has_apply_ = typename aux::has_apply::type > struct apply_wrap0 { typedef typename F::template apply< >::type type; }; /// workaround for ETI bug template<> struct apply_wrap0 { typedef int type; }; template< typename F, typename T1 > struct apply_wrap1 { typedef typename F::template apply< T1 >::type type; }; /// workaround for ETI bug template<> struct apply_wrap1< int,int > { typedef int type; }; template< typename F, typename T1, typename T2 > struct apply_wrap2 { typedef typename F::template apply< T1, T2 >::type type; }; /// workaround for ETI bug template<> struct apply_wrap2< int,int,int > { typedef int type; }; template< typename F, typename T1, typename T2, typename T3 > struct apply_wrap3 { typedef typename F::template apply< T1, T2, T3 >::type type; }; /// workaround for ETI bug template<> struct apply_wrap3< int,int,int,int > { typedef int type; }; template< typename F, typename T1, typename T2, typename T3, typename T4 > struct apply_wrap4 { typedef typename F::template apply< T1, T2, T3, T4 >::type type; }; /// workaround for ETI bug template<> struct apply_wrap4< int,int,int,int,int > { typedef int type; }; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct apply_wrap5 { typedef typename F::template apply< T1, T2, T3, T4, T5 >::type type; }; /// workaround for ETI bug template<> struct apply_wrap5< int,int,int,int,int,int > { typedef int type; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/msvc70/arg.hpp ================================================ // Copyright Peter Dimov 2001-2002 // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/arg.hpp" header // -- DO NOT modify by hand! BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN template<> struct arg< -1 > { BOOST_STATIC_CONSTANT(int, value = -1); BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) BOOST_MPL_AUX_ARG_TYPEDEF(na, type) template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { typedef U1 type; BOOST_MPL_AUX_ASSERT_NOT_NA(type); }; }; template<> struct arg<1> { BOOST_STATIC_CONSTANT(int, value = 1); typedef arg<2> next; BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) BOOST_MPL_AUX_ARG_TYPEDEF(na, type) template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { typedef U1 type; BOOST_MPL_AUX_ASSERT_NOT_NA(type); }; }; template<> struct arg<2> { BOOST_STATIC_CONSTANT(int, value = 2); typedef arg<3> next; BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) BOOST_MPL_AUX_ARG_TYPEDEF(na, type) template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { typedef U2 type; BOOST_MPL_AUX_ASSERT_NOT_NA(type); }; }; template<> struct arg<3> { BOOST_STATIC_CONSTANT(int, value = 3); typedef arg<4> next; BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) BOOST_MPL_AUX_ARG_TYPEDEF(na, type) template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { typedef U3 type; BOOST_MPL_AUX_ASSERT_NOT_NA(type); }; }; template<> struct arg<4> { BOOST_STATIC_CONSTANT(int, value = 4); typedef arg<5> next; BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) BOOST_MPL_AUX_ARG_TYPEDEF(na, type) template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { typedef U4 type; BOOST_MPL_AUX_ASSERT_NOT_NA(type); }; }; template<> struct arg<5> { BOOST_STATIC_CONSTANT(int, value = 5); typedef arg<6> next; BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) BOOST_MPL_AUX_ARG_TYPEDEF(na, type) template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { typedef U5 type; BOOST_MPL_AUX_ASSERT_NOT_NA(type); }; }; BOOST_MPL_AUX_NONTYPE_ARITY_SPEC(1,int, arg) BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/msvc70/basic_bind.hpp ================================================ // Copyright Peter Dimov 2001 // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/aux_/basic_bind.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< bool > struct resolve_arg_impl { template< typename T, typename U1, typename U2, typename U3 , typename U4, typename U5 > struct result_ { typedef T type; }; }; template<> struct resolve_arg_impl { template< typename T, typename U1, typename U2, typename U3 , typename U4, typename U5 > struct result_ { typedef typename apply_wrap5< T , U1, U2, U3, U4, U5 >::type type; }; }; template< typename T > struct is_bind_template; template< typename T, typename U1, typename U2, typename U3, typename U4 , typename U5 > struct resolve_bind_arg : resolve_arg_impl< is_bind_template::value > ::template result_< T,U1,U2,U3,U4,U5 > { }; template< int arity_ > struct bind_chooser; aux::no_tag is_bind_helper(...); template< typename T > aux::no_tag is_bind_helper(protect*); template< int N > aux::yes_tag is_bind_helper(arg*); template< bool is_ref_ = true > struct is_bind_template_impl { template< typename T > struct result_ { BOOST_STATIC_CONSTANT(bool, value = false); }; }; template<> struct is_bind_template_impl { template< typename T > struct result_ { BOOST_STATIC_CONSTANT(bool, value = sizeof(aux::is_bind_helper(static_cast(0))) == sizeof(aux::yes_tag) ); }; }; template< typename T > struct is_bind_template : is_bind_template_impl< ::boost::detail::is_reference_impl::value > ::template result_ { }; } // namespace aux template< typename F > struct bind0 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; public: typedef typename apply_wrap0< f_ >::type type; }; }; namespace aux { template< typename F > aux::yes_tag is_bind_helper(bind0*); } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(1, bind0) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(1, bind0) template< typename F, typename T1 > struct bind1 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; public: typedef typename apply_wrap1< f_ , typename t1::type >::type type; }; }; namespace aux { template< typename F, typename T1 > aux::yes_tag is_bind_helper(bind1< F,T1 >*); } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(2, bind1) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(2, bind1) template< typename F, typename T1, typename T2 > struct bind2 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; public: typedef typename apply_wrap2< f_ , typename t1::type, typename t2::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename T2 > aux::yes_tag is_bind_helper(bind2< F,T1,T2 >*); } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(3, bind2) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(3, bind2) template< typename F, typename T1, typename T2, typename T3 > struct bind3 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3; public: typedef typename apply_wrap3< f_ , typename t1::type, typename t2::type, typename t3::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename T2, typename T3 > aux::yes_tag is_bind_helper(bind3< F,T1,T2,T3 >*); } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(4, bind3) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(4, bind3) template< typename F, typename T1, typename T2, typename T3, typename T4 > struct bind4 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3; typedef aux::resolve_bind_arg< T4,U1,U2,U3,U4,U5 > t4; public: typedef typename apply_wrap4< f_ , typename t1::type, typename t2::type, typename t3::type , typename t4::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename T2, typename T3, typename T4 > aux::yes_tag is_bind_helper(bind4< F,T1,T2,T3,T4 >*); } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(5, bind4) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(5, bind4) template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct bind5 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3; typedef aux::resolve_bind_arg< T4,U1,U2,U3,U4,U5 > t4; typedef aux::resolve_bind_arg< T5,U1,U2,U3,U4,U5 > t5; public: typedef typename apply_wrap5< f_ , typename t1::type, typename t2::type, typename t3::type , typename t4::type, typename t5::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > aux::yes_tag is_bind_helper(bind5< F,T1,T2,T3,T4,T5 >*); } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(6, bind5) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(6, bind5) }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/msvc70/bind.hpp ================================================ // Copyright Peter Dimov 2001 // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/bind.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< bool > struct resolve_arg_impl { template< typename T, typename U1, typename U2, typename U3 , typename U4, typename U5 > struct result_ { typedef T type; }; }; template<> struct resolve_arg_impl { template< typename T, typename U1, typename U2, typename U3 , typename U4, typename U5 > struct result_ { typedef typename apply_wrap5< T , U1, U2, U3, U4, U5 >::type type; }; }; template< typename T > struct is_bind_template; template< typename T, typename U1, typename U2, typename U3, typename U4 , typename U5 > struct resolve_bind_arg : resolve_arg_impl< is_bind_template::value > ::template result_< T,U1,U2,U3,U4,U5 > { }; template< typename T > struct replace_unnamed_arg_impl { template< typename Arg > struct result_ { typedef Arg next; typedef T type; }; }; template<> struct replace_unnamed_arg_impl< arg< -1 > > { template< typename Arg > struct result_ { typedef typename next::type next; typedef Arg type; }; }; template< typename T, typename Arg > struct replace_unnamed_arg : replace_unnamed_arg_impl::template result_ { }; template< int arity_ > struct bind_chooser; aux::no_tag is_bind_helper(...); template< typename T > aux::no_tag is_bind_helper(protect*); template< int N > aux::yes_tag is_bind_helper(arg*); template< bool is_ref_ = true > struct is_bind_template_impl { template< typename T > struct result_ { BOOST_STATIC_CONSTANT(bool, value = false); }; }; template<> struct is_bind_template_impl { template< typename T > struct result_ { BOOST_STATIC_CONSTANT(bool, value = sizeof(aux::is_bind_helper(static_cast(0))) == sizeof(aux::yes_tag) ); }; }; template< typename T > struct is_bind_template : is_bind_template_impl< ::boost::detail::is_reference_impl::value > ::template result_ { }; } // namespace aux template< typename F > struct bind0 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; typedef typename r0::type a0; typedef typename r0::next n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; /// public: typedef typename apply_wrap0< f_ >::type type; }; }; namespace aux { template< typename F > aux::yes_tag is_bind_helper(bind0*); } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(1, bind0) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(1, bind0) template< typename F, typename T1 > struct bind1 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; typedef typename r0::type a0; typedef typename r0::next n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; /// typedef aux::replace_unnamed_arg< T1,n1 > r1; typedef typename r1::type a1; typedef typename r1::next n2; typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; /// public: typedef typename apply_wrap1< f_ , typename t1::type >::type type; }; }; namespace aux { template< typename F, typename T1 > aux::yes_tag is_bind_helper(bind1< F,T1 >*); } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(2, bind1) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(2, bind1) template< typename F, typename T1, typename T2 > struct bind2 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; typedef typename r0::type a0; typedef typename r0::next n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; /// typedef aux::replace_unnamed_arg< T1,n1 > r1; typedef typename r1::type a1; typedef typename r1::next n2; typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; /// typedef aux::replace_unnamed_arg< T2,n2 > r2; typedef typename r2::type a2; typedef typename r2::next n3; typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; /// public: typedef typename apply_wrap2< f_ , typename t1::type, typename t2::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename T2 > aux::yes_tag is_bind_helper(bind2< F,T1,T2 >*); } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(3, bind2) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(3, bind2) template< typename F, typename T1, typename T2, typename T3 > struct bind3 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; typedef typename r0::type a0; typedef typename r0::next n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; /// typedef aux::replace_unnamed_arg< T1,n1 > r1; typedef typename r1::type a1; typedef typename r1::next n2; typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; /// typedef aux::replace_unnamed_arg< T2,n2 > r2; typedef typename r2::type a2; typedef typename r2::next n3; typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; /// typedef aux::replace_unnamed_arg< T3,n3 > r3; typedef typename r3::type a3; typedef typename r3::next n4; typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; /// public: typedef typename apply_wrap3< f_ , typename t1::type, typename t2::type, typename t3::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename T2, typename T3 > aux::yes_tag is_bind_helper(bind3< F,T1,T2,T3 >*); } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(4, bind3) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(4, bind3) template< typename F, typename T1, typename T2, typename T3, typename T4 > struct bind4 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; typedef typename r0::type a0; typedef typename r0::next n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; /// typedef aux::replace_unnamed_arg< T1,n1 > r1; typedef typename r1::type a1; typedef typename r1::next n2; typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; /// typedef aux::replace_unnamed_arg< T2,n2 > r2; typedef typename r2::type a2; typedef typename r2::next n3; typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; /// typedef aux::replace_unnamed_arg< T3,n3 > r3; typedef typename r3::type a3; typedef typename r3::next n4; typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; /// typedef aux::replace_unnamed_arg< T4,n4 > r4; typedef typename r4::type a4; typedef typename r4::next n5; typedef aux::resolve_bind_arg< a4,U1,U2,U3,U4,U5 > t4; /// public: typedef typename apply_wrap4< f_ , typename t1::type, typename t2::type, typename t3::type , typename t4::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename T2, typename T3, typename T4 > aux::yes_tag is_bind_helper(bind4< F,T1,T2,T3,T4 >*); } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(5, bind4) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(5, bind4) template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct bind5 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; typedef typename r0::type a0; typedef typename r0::next n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; /// typedef aux::replace_unnamed_arg< T1,n1 > r1; typedef typename r1::type a1; typedef typename r1::next n2; typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; /// typedef aux::replace_unnamed_arg< T2,n2 > r2; typedef typename r2::type a2; typedef typename r2::next n3; typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; /// typedef aux::replace_unnamed_arg< T3,n3 > r3; typedef typename r3::type a3; typedef typename r3::next n4; typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; /// typedef aux::replace_unnamed_arg< T4,n4 > r4; typedef typename r4::type a4; typedef typename r4::next n5; typedef aux::resolve_bind_arg< a4,U1,U2,U3,U4,U5 > t4; /// typedef aux::replace_unnamed_arg< T5,n5 > r5; typedef typename r5::type a5; typedef typename r5::next n6; typedef aux::resolve_bind_arg< a5,U1,U2,U3,U4,U5 > t5; /// public: typedef typename apply_wrap5< f_ , typename t1::type, typename t2::type, typename t3::type , typename t4::type, typename t5::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > aux::yes_tag is_bind_helper(bind5< F,T1,T2,T3,T4,T5 >*); } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(6, bind5) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(6, bind5) }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/msvc70/bind_fwd.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/bind_fwd.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename F > struct bind0; template< typename F, typename T1 > struct bind1; template< typename F, typename T1, typename T2 > struct bind2; template< typename F, typename T1, typename T2, typename T3 > struct bind3; template< typename F, typename T1, typename T2, typename T3, typename T4 > struct bind4; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct bind5; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/msvc70/bitand.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // Copyright Jaap Suter 2003 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/bitand.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 , BOOST_MPL_AUX_NTTP_DECL(int, tag1_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value , BOOST_MPL_AUX_NTTP_DECL(int, tag2_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value > struct bitand_impl : if_c< ( tag1_ > tag2_ ) , aux::cast2nd_impl< bitand_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< bitand_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct bitand_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template<> struct bitand_impl< na,integral_c_tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template<> struct bitand_impl< integral_c_tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct bitand_tag : tag< T,na > { }; /// forward declaration template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct bitand_2; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) , typename N3 = na, typename N4 = na, typename N5 = na > struct bitand_ : aux::msvc_eti_base< typename if_< is_na , bitand_2< N1,N2 > , bitand_< bitand_2< N1,N2 > , N3, N4, N5 > >::type > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , bitand_ , ( N1, N2, N3, N4, N5 ) ) }; template< typename N1 , typename N2 > struct bitand_2 : aux::msvc_eti_base< typename apply_wrap2< bitand_impl< typename bitand_tag::type , typename bitand_tag::type > , N1 , N2 >::type >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, bitand_2, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 5, bitand_) }} namespace boost { namespace mpl { namespace aux { template< typename T, T n1, T n2 > struct bitand_wknd { BOOST_STATIC_CONSTANT(T, value = (n1 & n2)); typedef integral_c< T,value > type; }; } template<> struct bitand_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : aux::bitand_wknd< typename aux::largest_int< typename N1::value_type , typename N2::value_type >::type , N1::value , N2::value >::type { }; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/msvc70/bitor.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // Copyright Jaap Suter 2003 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/bitor.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 , BOOST_MPL_AUX_NTTP_DECL(int, tag1_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value , BOOST_MPL_AUX_NTTP_DECL(int, tag2_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value > struct bitor_impl : if_c< ( tag1_ > tag2_ ) , aux::cast2nd_impl< bitor_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< bitor_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct bitor_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template<> struct bitor_impl< na,integral_c_tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template<> struct bitor_impl< integral_c_tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct bitor_tag : tag< T,na > { }; /// forward declaration template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct bitor_2; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) , typename N3 = na, typename N4 = na, typename N5 = na > struct bitor_ : aux::msvc_eti_base< typename if_< is_na , bitor_2< N1,N2 > , bitor_< bitor_2< N1,N2 > , N3, N4, N5 > >::type > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , bitor_ , ( N1, N2, N3, N4, N5 ) ) }; template< typename N1 , typename N2 > struct bitor_2 : aux::msvc_eti_base< typename apply_wrap2< bitor_impl< typename bitor_tag::type , typename bitor_tag::type > , N1 , N2 >::type >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, bitor_2, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 5, bitor_) }} namespace boost { namespace mpl { namespace aux { template< typename T, T n1, T n2 > struct bitor_wknd { BOOST_STATIC_CONSTANT(T, value = (n1 | n2)); typedef integral_c< T,value > type; }; } template<> struct bitor_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : aux::bitor_wknd< typename aux::largest_int< typename N1::value_type , typename N2::value_type >::type , N1::value , N2::value >::type { }; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/msvc70/bitxor.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // Copyright Jaap Suter 2003 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/bitxor.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 , BOOST_MPL_AUX_NTTP_DECL(int, tag1_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value , BOOST_MPL_AUX_NTTP_DECL(int, tag2_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value > struct bitxor_impl : if_c< ( tag1_ > tag2_ ) , aux::cast2nd_impl< bitxor_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< bitxor_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct bitxor_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template<> struct bitxor_impl< na,integral_c_tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template<> struct bitxor_impl< integral_c_tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct bitxor_tag : tag< T,na > { }; /// forward declaration template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct bitxor_2; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) , typename N3 = na, typename N4 = na, typename N5 = na > struct bitxor_ : aux::msvc_eti_base< typename if_< is_na , bitxor_2< N1,N2 > , bitxor_< bitxor_2< N1,N2 > , N3, N4, N5 > >::type > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , bitxor_ , ( N1, N2, N3, N4, N5 ) ) }; template< typename N1 , typename N2 > struct bitxor_2 : aux::msvc_eti_base< typename apply_wrap2< bitxor_impl< typename bitxor_tag::type , typename bitxor_tag::type > , N1 , N2 >::type >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, bitxor_2, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 5, bitxor_) }} namespace boost { namespace mpl { namespace aux { template< typename T, T n1, T n2 > struct bitxor_wknd { BOOST_STATIC_CONSTANT(T, value = (n1 ^ n2)); typedef integral_c< T,value > type; }; } template<> struct bitxor_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : aux::bitxor_wknd< typename aux::largest_int< typename N1::value_type , typename N2::value_type >::type , N1::value , N2::value >::type { }; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/msvc70/deque.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/deque.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< int N > struct deque_chooser; } namespace aux { template<> struct deque_chooser<0> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef vector0< >::type type; }; }; } // namespace aux namespace aux { template<> struct deque_chooser<1> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector1< T0 >::type type; }; }; } // namespace aux namespace aux { template<> struct deque_chooser<2> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector2< T0, T1 >::type type; }; }; } // namespace aux namespace aux { template<> struct deque_chooser<3> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector3< T0, T1, T2 >::type type; }; }; } // namespace aux namespace aux { template<> struct deque_chooser<4> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector4< T0, T1, T2, T3 >::type type; }; }; } // namespace aux namespace aux { template<> struct deque_chooser<5> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector5< T0, T1, T2, T3, T4 >::type type; }; }; } // namespace aux namespace aux { template<> struct deque_chooser<6> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector6< T0, T1, T2, T3, T4, T5 >::type type; }; }; } // namespace aux namespace aux { template<> struct deque_chooser<7> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector7< T0, T1, T2, T3, T4, T5, T6 >::type type; }; }; } // namespace aux namespace aux { template<> struct deque_chooser<8> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector8< T0, T1, T2, T3, T4, T5, T6, T7 >::type type; }; }; } // namespace aux namespace aux { template<> struct deque_chooser<9> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector9< T0, T1, T2, T3, T4, T5, T6, T7, T8 >::type type; }; }; } // namespace aux namespace aux { template<> struct deque_chooser<10> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector10< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9 >::type type; }; }; } // namespace aux namespace aux { template<> struct deque_chooser<11> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector11< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10 >::type type; }; }; } // namespace aux namespace aux { template<> struct deque_chooser<12> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector12< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11 >::type type; }; }; } // namespace aux namespace aux { template<> struct deque_chooser<13> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector13< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12 >::type type; }; }; } // namespace aux namespace aux { template<> struct deque_chooser<14> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector14< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13 >::type type; }; }; } // namespace aux namespace aux { template<> struct deque_chooser<15> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector15< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 >::type type; }; }; } // namespace aux namespace aux { template<> struct deque_chooser<16> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector16< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15 >::type type; }; }; } // namespace aux namespace aux { template<> struct deque_chooser<17> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector17< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16 >::type type; }; }; } // namespace aux namespace aux { template<> struct deque_chooser<18> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector18< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17 >::type type; }; }; } // namespace aux namespace aux { template<> struct deque_chooser<19> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector19< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18 >::type type; }; }; } // namespace aux namespace aux { template<> struct deque_chooser<20> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector20< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 >::type type; }; }; } // namespace aux namespace aux { template< typename T > struct is_deque_arg { BOOST_STATIC_CONSTANT(bool, value = true); }; template<> struct is_deque_arg { BOOST_STATIC_CONSTANT(bool, value = false); }; template< typename T1, typename T2, typename T3, typename T4, typename T5 , typename T6, typename T7, typename T8, typename T9, typename T10 , typename T11, typename T12, typename T13, typename T14, typename T15 , typename T16, typename T17, typename T18, typename T19, typename T20 > struct deque_count_args { BOOST_STATIC_CONSTANT(int, value = is_deque_arg::value + is_deque_arg::value + is_deque_arg::value + is_deque_arg::value + is_deque_arg::value + is_deque_arg::value + is_deque_arg::value + is_deque_arg::value + is_deque_arg::value + is_deque_arg::value + is_deque_arg::value + is_deque_arg::value + is_deque_arg::value + is_deque_arg::value + is_deque_arg::value + is_deque_arg::value + is_deque_arg::value + is_deque_arg::value + is_deque_arg::value + is_deque_arg::value ); }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct deque_impl { typedef aux::deque_count_args< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 > arg_num_; typedef typename aux::deque_chooser< arg_num_::value > ::template result_< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; }; } // namespace aux template< typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na , typename T12 = na, typename T13 = na, typename T14 = na , typename T15 = na, typename T16 = na, typename T17 = na , typename T18 = na, typename T19 = na > struct deque : aux::deque_impl< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 >::type { typedef typename aux::deque_impl< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 >::type type; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/msvc70/divides.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/divides.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 , BOOST_MPL_AUX_NTTP_DECL(int, tag1_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value , BOOST_MPL_AUX_NTTP_DECL(int, tag2_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value > struct divides_impl : if_c< ( tag1_ > tag2_ ) , aux::cast2nd_impl< divides_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< divides_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct divides_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template<> struct divides_impl< na,integral_c_tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template<> struct divides_impl< integral_c_tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct divides_tag : tag< T,na > { }; /// forward declaration template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct divides2; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) , typename N3 = na, typename N4 = na, typename N5 = na > struct divides : aux::msvc_eti_base< typename if_< is_na , divides2< N1,N2 > , divides< divides2< N1,N2 > , N3, N4, N5 > >::type > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , divides , ( N1, N2, N3, N4, N5 ) ) }; template< typename N1 , typename N2 > struct divides2 : aux::msvc_eti_base< typename apply_wrap2< divides_impl< typename divides_tag::type , typename divides_tag::type > , N1 , N2 >::type >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, divides2, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 5, divides) }} namespace boost { namespace mpl { namespace aux { template< typename T, T n1, T n2 > struct divides_wknd { BOOST_STATIC_CONSTANT(T, value = (n1 / n2)); typedef integral_c< T,value > type; }; } template<> struct divides_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : aux::divides_wknd< typename aux::largest_int< typename N1::value_type , typename N2::value_type >::type , N1::value , N2::value >::type { }; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/msvc70/equal_to.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/equal_to.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 , BOOST_MPL_AUX_NTTP_DECL(int, tag1_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value , BOOST_MPL_AUX_NTTP_DECL(int, tag2_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value > struct equal_to_impl : if_c< ( tag1_ > tag2_ ) , aux::cast2nd_impl< equal_to_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< equal_to_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct equal_to_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template<> struct equal_to_impl< na,integral_c_tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template<> struct equal_to_impl< integral_c_tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct equal_to_tag : tag< T,na > { }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct equal_to : aux::msvc_eti_base< typename apply_wrap2< equal_to_impl< typename equal_to_tag::type , typename equal_to_tag::type > , N1 , N2 >::type >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, equal_to, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 2, equal_to) }} namespace boost { namespace mpl { template<> struct equal_to_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply { BOOST_STATIC_CONSTANT(bool, value = ( BOOST_MPL_AUX_VALUE_WKND(N1)::value == BOOST_MPL_AUX_VALUE_WKND(N2)::value ) ); typedef bool_ type; }; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/msvc70/fold_impl.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/aux_/fold_impl.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { /// forward declaration template< int N , typename First , typename Last , typename State , typename ForwardOp > struct fold_impl; template< int N > struct fold_chunk; template<> struct fold_chunk<0> { template< typename First , typename Last , typename State , typename ForwardOp > struct result_ { typedef First iter0; typedef State state0; typedef state0 state; typedef iter0 iterator; }; }; template<> struct fold_chunk<1> { template< typename First , typename Last , typename State , typename ForwardOp > struct result_ { typedef First iter0; typedef State state0; typedef typename apply2< ForwardOp, state0, typename deref::type >::type state1; typedef typename mpl::next::type iter1; typedef state1 state; typedef iter1 iterator; }; }; template<> struct fold_chunk<2> { template< typename First , typename Last , typename State , typename ForwardOp > struct result_ { typedef First iter0; typedef State state0; typedef typename apply2< ForwardOp, state0, typename deref::type >::type state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp, state1, typename deref::type >::type state2; typedef typename mpl::next::type iter2; typedef state2 state; typedef iter2 iterator; }; }; template<> struct fold_chunk<3> { template< typename First , typename Last , typename State , typename ForwardOp > struct result_ { typedef First iter0; typedef State state0; typedef typename apply2< ForwardOp, state0, typename deref::type >::type state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp, state1, typename deref::type >::type state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp, state2, typename deref::type >::type state3; typedef typename mpl::next::type iter3; typedef state3 state; typedef iter3 iterator; }; }; template<> struct fold_chunk<4> { template< typename First , typename Last , typename State , typename ForwardOp > struct result_ { typedef First iter0; typedef State state0; typedef typename apply2< ForwardOp, state0, typename deref::type >::type state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp, state1, typename deref::type >::type state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp, state2, typename deref::type >::type state3; typedef typename mpl::next::type iter3; typedef typename apply2< ForwardOp, state3, typename deref::type >::type state4; typedef typename mpl::next::type iter4; typedef state4 state; typedef iter4 iterator; }; }; template< int N > struct fold_chunk { template< typename First , typename Last , typename State , typename ForwardOp > struct result_ { typedef fold_impl< 4 , First , Last , State , ForwardOp > chunk_; typedef fold_impl< ( (N - 4) < 0 ? 0 : N - 4 ) , typename chunk_::iterator , Last , typename chunk_::state , ForwardOp > res_; typedef typename res_::state state; typedef typename res_::iterator iterator; }; }; template< typename First , typename Last , typename State , typename ForwardOp > struct fold_step; template< typename Last , typename State > struct fold_null_step { typedef Last iterator; typedef State state; }; template<> struct fold_chunk< -1 > { template< typename First , typename Last , typename State , typename ForwardOp > struct result_ { typedef typename if_< typename is_same< First,Last >::type , fold_null_step< Last,State > , fold_step< First,Last,State,ForwardOp > >::type res_; typedef typename res_::state state; typedef typename res_::iterator iterator; }; }; template< typename First , typename Last , typename State , typename ForwardOp > struct fold_step { typedef fold_chunk< -1 >::template result_< typename mpl::next::type , Last , typename apply2::type>::type , ForwardOp > chunk_; typedef typename chunk_::state state; typedef typename chunk_::iterator iterator; }; template< int N , typename First , typename Last , typename State , typename ForwardOp > struct fold_impl : fold_chunk ::template result_< First,Last,State,ForwardOp > { }; }}} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/msvc70/full_lambda.hpp ================================================ // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/aux_/full_lambda.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< bool C1 = false, bool C2 = false, bool C3 = false, bool C4 = false , bool C5 = false > struct lambda_or : true_ { }; template<> struct lambda_or< false,false,false,false,false > : false_ { }; } // namespace aux template< typename T , typename Tag > struct lambda { typedef false_ is_le; typedef T result_; typedef T type; }; template< typename T > struct is_lambda_expression : lambda::is_le { }; template< int N, typename Tag > struct lambda< arg, Tag > { typedef true_ is_le; typedef mpl::arg result_; // qualified for the sake of MIPSpro 7.41 typedef mpl::protect type; }; template< typename F , typename Tag > struct lambda< bind0 , Tag > { typedef false_ is_le; typedef bind0< F > result_; typedef result_ type; }; namespace aux { template< typename IsLE, typename Tag , template< typename P1 > class F , typename L1 > struct le_result1 { typedef F< typename L1::type > result_; typedef result_ type; }; template< typename Tag , template< typename P1 > class F , typename L1 > struct le_result1< true_,Tag,F,L1 > { typedef bind1< quote1< F,Tag > , typename L1::result_ > result_; typedef mpl::protect type; }; } // namespace aux template< template< typename P1 > class F , typename T1 , typename Tag > struct lambda< F , Tag > { typedef lambda< T1,Tag > l1; typedef typename l1::is_le is_le1; typedef typename aux::lambda_or< is_le1::value >::type is_le; typedef aux::le_result1< is_le, Tag, F, l1 > le_result_; typedef typename le_result_::result_ result_; typedef typename le_result_::type type; }; template< typename F, typename T1 , typename Tag > struct lambda< bind1< F,T1 > , Tag > { typedef false_ is_le; typedef bind1< F , T1 > result_; typedef result_ type; }; namespace aux { template< typename IsLE, typename Tag , template< typename P1, typename P2 > class F , typename L1, typename L2 > struct le_result2 { typedef F< typename L1::type, typename L2::type > result_; typedef result_ type; }; template< typename Tag , template< typename P1, typename P2 > class F , typename L1, typename L2 > struct le_result2< true_,Tag,F,L1,L2 > { typedef bind2< quote2< F,Tag > , typename L1::result_, typename L2::result_ > result_; typedef mpl::protect type; }; } // namespace aux template< template< typename P1, typename P2 > class F , typename T1, typename T2 , typename Tag > struct lambda< F< T1,T2 > , Tag > { typedef lambda< T1,Tag > l1; typedef lambda< T2,Tag > l2; typedef typename l1::is_le is_le1; typedef typename l2::is_le is_le2; typedef typename aux::lambda_or< is_le1::value, is_le2::value >::type is_le; typedef aux::le_result2< is_le, Tag, F, l1, l2 > le_result_; typedef typename le_result_::result_ result_; typedef typename le_result_::type type; }; template< typename F, typename T1, typename T2 , typename Tag > struct lambda< bind2< F,T1,T2 > , Tag > { typedef false_ is_le; typedef bind2< F , T1, T2 > result_; typedef result_ type; }; namespace aux { template< typename IsLE, typename Tag , template< typename P1, typename P2, typename P3 > class F , typename L1, typename L2, typename L3 > struct le_result3 { typedef F< typename L1::type, typename L2::type, typename L3::type > result_; typedef result_ type; }; template< typename Tag , template< typename P1, typename P2, typename P3 > class F , typename L1, typename L2, typename L3 > struct le_result3< true_,Tag,F,L1,L2,L3 > { typedef bind3< quote3< F,Tag > , typename L1::result_, typename L2::result_, typename L3::result_ > result_; typedef mpl::protect type; }; } // namespace aux template< template< typename P1, typename P2, typename P3 > class F , typename T1, typename T2, typename T3 , typename Tag > struct lambda< F< T1,T2,T3 > , Tag > { typedef lambda< T1,Tag > l1; typedef lambda< T2,Tag > l2; typedef lambda< T3,Tag > l3; typedef typename l1::is_le is_le1; typedef typename l2::is_le is_le2; typedef typename l3::is_le is_le3; typedef typename aux::lambda_or< is_le1::value, is_le2::value, is_le3::value >::type is_le; typedef aux::le_result3< is_le, Tag, F, l1, l2, l3 > le_result_; typedef typename le_result_::result_ result_; typedef typename le_result_::type type; }; template< typename F, typename T1, typename T2, typename T3 , typename Tag > struct lambda< bind3< F,T1,T2,T3 > , Tag > { typedef false_ is_le; typedef bind3< F , T1, T2, T3 > result_; typedef result_ type; }; namespace aux { template< typename IsLE, typename Tag , template< typename P1, typename P2, typename P3, typename P4 > class F , typename L1, typename L2, typename L3, typename L4 > struct le_result4 { typedef F< typename L1::type, typename L2::type, typename L3::type , typename L4::type > result_; typedef result_ type; }; template< typename Tag , template< typename P1, typename P2, typename P3, typename P4 > class F , typename L1, typename L2, typename L3, typename L4 > struct le_result4< true_,Tag,F,L1,L2,L3,L4 > { typedef bind4< quote4< F,Tag > , typename L1::result_, typename L2::result_, typename L3::result_ , typename L4::result_ > result_; typedef mpl::protect type; }; } // namespace aux template< template< typename P1, typename P2, typename P3, typename P4 > class F , typename T1, typename T2, typename T3, typename T4 , typename Tag > struct lambda< F< T1,T2,T3,T4 > , Tag > { typedef lambda< T1,Tag > l1; typedef lambda< T2,Tag > l2; typedef lambda< T3,Tag > l3; typedef lambda< T4,Tag > l4; typedef typename l1::is_le is_le1; typedef typename l2::is_le is_le2; typedef typename l3::is_le is_le3; typedef typename l4::is_le is_le4; typedef typename aux::lambda_or< is_le1::value, is_le2::value, is_le3::value, is_le4::value >::type is_le; typedef aux::le_result4< is_le, Tag, F, l1, l2, l3, l4 > le_result_; typedef typename le_result_::result_ result_; typedef typename le_result_::type type; }; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename Tag > struct lambda< bind4< F,T1,T2,T3,T4 > , Tag > { typedef false_ is_le; typedef bind4< F , T1, T2, T3, T4 > result_; typedef result_ type; }; namespace aux { template< typename IsLE, typename Tag , template< typename P1, typename P2, typename P3, typename P4, typename P5 > class F , typename L1, typename L2, typename L3, typename L4, typename L5 > struct le_result5 { typedef F< typename L1::type, typename L2::type, typename L3::type , typename L4::type, typename L5::type > result_; typedef result_ type; }; template< typename Tag , template< typename P1, typename P2, typename P3, typename P4, typename P5 > class F , typename L1, typename L2, typename L3, typename L4, typename L5 > struct le_result5< true_,Tag,F,L1,L2,L3,L4,L5 > { typedef bind5< quote5< F,Tag > , typename L1::result_, typename L2::result_, typename L3::result_ , typename L4::result_, typename L5::result_ > result_; typedef mpl::protect type; }; } // namespace aux template< template< typename P1, typename P2, typename P3, typename P4 , typename P5 > class F , typename T1, typename T2, typename T3, typename T4, typename T5 , typename Tag > struct lambda< F< T1,T2,T3,T4,T5 > , Tag > { typedef lambda< T1,Tag > l1; typedef lambda< T2,Tag > l2; typedef lambda< T3,Tag > l3; typedef lambda< T4,Tag > l4; typedef lambda< T5,Tag > l5; typedef typename l1::is_le is_le1; typedef typename l2::is_le is_le2; typedef typename l3::is_le is_le3; typedef typename l4::is_le is_le4; typedef typename l5::is_le is_le5; typedef typename aux::lambda_or< is_le1::value, is_le2::value, is_le3::value, is_le4::value , is_le5::value >::type is_le; typedef aux::le_result5< is_le, Tag, F, l1, l2, l3, l4, l5 > le_result_; typedef typename le_result_::result_ result_; typedef typename le_result_::type type; }; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 , typename Tag > struct lambda< bind5< F,T1,T2,T3,T4,T5 > , Tag > { typedef false_ is_le; typedef bind5< F , T1, T2, T3, T4, T5 > result_; typedef result_ type; }; /// special case for 'protect' template< typename T, typename Tag > struct lambda< mpl::protect, Tag > { typedef false_ is_le; typedef mpl::protect result_; typedef result_ type; }; /// specializations for the main 'bind' form template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 , typename Tag > struct lambda< bind< F,T1,T2,T3,T4,T5 > , Tag > { typedef false_ is_le; typedef bind< F,T1,T2,T3,T4,T5 > result_; typedef result_ type; }; /// workaround for MWCW 8.3+/EDG < 303, leads to ambiguity on Digital Mars template< typename F, typename Tag1, typename Tag2 > struct lambda< lambda< F,Tag1 > , Tag2 > { typedef lambda< F,Tag2 > l1; typedef lambda< Tag1,Tag2 > l2; typedef typename l1::is_le is_le; typedef aux::le_result2 le_result_; typedef typename le_result_::result_ result_; typedef typename le_result_::type type; }; BOOST_MPL_AUX_NA_SPEC(2, lambda) }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/msvc70/greater.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/greater.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 , BOOST_MPL_AUX_NTTP_DECL(int, tag1_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value , BOOST_MPL_AUX_NTTP_DECL(int, tag2_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value > struct greater_impl : if_c< ( tag1_ > tag2_ ) , aux::cast2nd_impl< greater_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< greater_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct greater_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template<> struct greater_impl< na,integral_c_tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template<> struct greater_impl< integral_c_tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct greater_tag : tag< T,na > { }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct greater : aux::msvc_eti_base< typename apply_wrap2< greater_impl< typename greater_tag::type , typename greater_tag::type > , N1 , N2 >::type >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, greater, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 2, greater) }} namespace boost { namespace mpl { template<> struct greater_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply { BOOST_STATIC_CONSTANT(bool, value = ( BOOST_MPL_AUX_VALUE_WKND(N1)::value > BOOST_MPL_AUX_VALUE_WKND(N2)::value ) ); typedef bool_ type; }; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/msvc70/greater_equal.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/greater_equal.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 , BOOST_MPL_AUX_NTTP_DECL(int, tag1_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value , BOOST_MPL_AUX_NTTP_DECL(int, tag2_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value > struct greater_equal_impl : if_c< ( tag1_ > tag2_ ) , aux::cast2nd_impl< greater_equal_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< greater_equal_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct greater_equal_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template<> struct greater_equal_impl< na,integral_c_tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template<> struct greater_equal_impl< integral_c_tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct greater_equal_tag : tag< T,na > { }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct greater_equal : aux::msvc_eti_base< typename apply_wrap2< greater_equal_impl< typename greater_equal_tag::type , typename greater_equal_tag::type > , N1 , N2 >::type >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, greater_equal, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 2, greater_equal) }} namespace boost { namespace mpl { template<> struct greater_equal_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply { BOOST_STATIC_CONSTANT(bool, value = ( BOOST_MPL_AUX_VALUE_WKND(N1)::value >= BOOST_MPL_AUX_VALUE_WKND(N2)::value ) ); typedef bool_ type; }; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/msvc70/inherit.hpp ================================================ // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/inherit.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< bool C1, bool C2 > struct inherit2_impl { template< typename Derived, typename T1, typename T2 > struct result_ : T1, T2 { typedef Derived type_; }; }; template<> struct inherit2_impl< false,true > { template< typename Derived, typename T1, typename T2 > struct result_ : T1 { typedef T1 type_; }; }; template<> struct inherit2_impl< true,false > { template< typename Derived, typename T1, typename T2 > struct result_ : T2 { typedef T2 type_; }; }; template<> struct inherit2_impl< true,true > { template< typename Derived, typename T1, typename T2 > struct result_ { typedef T1 type_; }; }; } // namespace aux template< typename BOOST_MPL_AUX_NA_PARAM(T1) , typename BOOST_MPL_AUX_NA_PARAM(T2) > struct inherit2 : aux::inherit2_impl< is_empty_base::value , is_empty_base::value >::template result_< inherit2< T1,T2 >,T1, T2 > { typedef typename inherit2::type_ type; BOOST_MPL_AUX_LAMBDA_SUPPORT(2, inherit2, (T1, T2)) }; BOOST_MPL_AUX_NA_SPEC(2, inherit2) template< typename T1 = na, typename T2 = na, typename T3 = na > struct inherit3 : inherit2< typename inherit2< T1, T2 >::type , T3 > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 3 , inherit3 , ( T1, T2, T3) ) }; BOOST_MPL_AUX_NA_SPEC(3, inherit3) template< typename T1 = na, typename T2 = na, typename T3 = na, typename T4 = na > struct inherit4 : inherit2< typename inherit3< T1, T2, T3 >::type , T4 > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 4 , inherit4 , ( T1, T2, T3, T4) ) }; BOOST_MPL_AUX_NA_SPEC(4, inherit4) template< typename T1 = na, typename T2 = na, typename T3 = na, typename T4 = na , typename T5 = na > struct inherit5 : inherit2< typename inherit4< T1, T2, T3, T4 >::type , T5 > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , inherit5 , ( T1, T2, T3, T4, T5) ) }; BOOST_MPL_AUX_NA_SPEC(5, inherit5) /// primary template template< typename T1 = empty_base, typename T2 = empty_base , typename T3 = empty_base, typename T4 = empty_base , typename T5 = empty_base > struct inherit : inherit5< T1,T2,T3,T4,T5 > { }; template<> struct inherit< na,na,na,na,na > { template< typename T1 = empty_base, typename T2 = empty_base , typename T3 = empty_base, typename T4 = empty_base , typename T5 = empty_base > struct apply : inherit< T1,T2,T3,T4,T5 > { }; }; BOOST_MPL_AUX_NA_SPEC_LAMBDA(5, inherit) BOOST_MPL_AUX_NA_SPEC_ARITY(5, inherit) BOOST_MPL_AUX_NA_SPEC_TEMPLATE_ARITY(5, 5, inherit) }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/msvc70/iter_fold_if_impl.hpp ================================================ // Copyright Aleksey Gurtovoy 2001-2004 // Copyright David Abrahams 2001-2002 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/aux_/iter_fold_if_impl.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< typename Iterator, typename State > struct iter_fold_if_null_step { typedef State state; typedef Iterator iterator; }; template< bool > struct iter_fold_if_step_impl { template< typename Iterator , typename State , typename StateOp , typename IteratorOp > struct result_ { typedef typename apply2< StateOp,State,Iterator >::type state; typedef typename IteratorOp::type iterator; }; }; template<> struct iter_fold_if_step_impl { template< typename Iterator , typename State , typename StateOp , typename IteratorOp > struct result_ { typedef State state; typedef Iterator iterator; }; }; template< typename Iterator , typename State , typename ForwardOp , typename Predicate > struct iter_fold_if_forward_step { typedef typename apply2< Predicate,State,Iterator >::type not_last; typedef typename iter_fold_if_step_impl< BOOST_MPL_AUX_MSVC_VALUE_WKND(not_last)::value >::template result_< Iterator,State,ForwardOp, mpl::next > impl_; typedef typename impl_::state state; typedef typename impl_::iterator iterator; }; template< typename Iterator , typename State , typename BackwardOp , typename Predicate > struct iter_fold_if_backward_step { typedef typename apply2< Predicate,State,Iterator >::type not_last; typedef typename iter_fold_if_step_impl< BOOST_MPL_AUX_MSVC_VALUE_WKND(not_last)::value >::template result_< Iterator,State,BackwardOp, identity > impl_; typedef typename impl_::state state; typedef typename impl_::iterator iterator; }; template< typename Iterator , typename State , typename ForwardOp , typename ForwardPredicate , typename BackwardOp , typename BackwardPredicate > struct iter_fold_if_impl { private: typedef iter_fold_if_null_step< Iterator,State > forward_step0; typedef iter_fold_if_forward_step< typename forward_step0::iterator, typename forward_step0::state, ForwardOp, ForwardPredicate > forward_step1; typedef iter_fold_if_forward_step< typename forward_step1::iterator, typename forward_step1::state, ForwardOp, ForwardPredicate > forward_step2; typedef iter_fold_if_forward_step< typename forward_step2::iterator, typename forward_step2::state, ForwardOp, ForwardPredicate > forward_step3; typedef iter_fold_if_forward_step< typename forward_step3::iterator, typename forward_step3::state, ForwardOp, ForwardPredicate > forward_step4; typedef typename if_< typename forward_step4::not_last , iter_fold_if_impl< typename forward_step4::iterator , typename forward_step4::state , ForwardOp , ForwardPredicate , BackwardOp , BackwardPredicate > , iter_fold_if_null_step< typename forward_step4::iterator , typename forward_step4::state > >::type backward_step4; typedef iter_fold_if_backward_step< typename forward_step3::iterator, typename backward_step4::state, BackwardOp, BackwardPredicate > backward_step3; typedef iter_fold_if_backward_step< typename forward_step2::iterator, typename backward_step3::state, BackwardOp, BackwardPredicate > backward_step2; typedef iter_fold_if_backward_step< typename forward_step1::iterator, typename backward_step2::state, BackwardOp, BackwardPredicate > backward_step1; typedef iter_fold_if_backward_step< typename forward_step0::iterator, typename backward_step1::state, BackwardOp, BackwardPredicate > backward_step0; public: typedef typename backward_step0::state state; typedef typename backward_step4::iterator iterator; }; }}} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/msvc70/iter_fold_impl.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/aux_/iter_fold_impl.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { /// forward declaration template< int N , typename First , typename Last , typename State , typename ForwardOp > struct iter_fold_impl; template< int N > struct iter_fold_chunk; template<> struct iter_fold_chunk<0> { template< typename First , typename Last , typename State , typename ForwardOp > struct result_ { typedef First iter0; typedef State state0; typedef state0 state; typedef iter0 iterator; }; }; template<> struct iter_fold_chunk<1> { template< typename First , typename Last , typename State , typename ForwardOp > struct result_ { typedef First iter0; typedef State state0; typedef typename apply2< ForwardOp,state0,iter0 >::type state1; typedef typename mpl::next::type iter1; typedef state1 state; typedef iter1 iterator; }; }; template<> struct iter_fold_chunk<2> { template< typename First , typename Last , typename State , typename ForwardOp > struct result_ { typedef First iter0; typedef State state0; typedef typename apply2< ForwardOp,state0,iter0 >::type state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp,state1,iter1 >::type state2; typedef typename mpl::next::type iter2; typedef state2 state; typedef iter2 iterator; }; }; template<> struct iter_fold_chunk<3> { template< typename First , typename Last , typename State , typename ForwardOp > struct result_ { typedef First iter0; typedef State state0; typedef typename apply2< ForwardOp,state0,iter0 >::type state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp,state1,iter1 >::type state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp,state2,iter2 >::type state3; typedef typename mpl::next::type iter3; typedef state3 state; typedef iter3 iterator; }; }; template<> struct iter_fold_chunk<4> { template< typename First , typename Last , typename State , typename ForwardOp > struct result_ { typedef First iter0; typedef State state0; typedef typename apply2< ForwardOp,state0,iter0 >::type state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp,state1,iter1 >::type state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp,state2,iter2 >::type state3; typedef typename mpl::next::type iter3; typedef typename apply2< ForwardOp,state3,iter3 >::type state4; typedef typename mpl::next::type iter4; typedef state4 state; typedef iter4 iterator; }; }; template< int N > struct iter_fold_chunk { template< typename First , typename Last , typename State , typename ForwardOp > struct result_ { typedef iter_fold_impl< 4 , First , Last , State , ForwardOp > chunk_; typedef iter_fold_impl< ( (N - 4) < 0 ? 0 : N - 4 ) , typename chunk_::iterator , Last , typename chunk_::state , ForwardOp > res_; typedef typename res_::state state; typedef typename res_::iterator iterator; }; }; template< typename First , typename Last , typename State , typename ForwardOp > struct iter_fold_step; template< typename Last , typename State > struct iter_fold_null_step { typedef Last iterator; typedef State state; }; template<> struct iter_fold_chunk< -1 > { template< typename First , typename Last , typename State , typename ForwardOp > struct result_ { typedef typename if_< typename is_same< First,Last >::type , iter_fold_null_step< Last,State > , iter_fold_step< First,Last,State,ForwardOp > >::type res_; typedef typename res_::state state; typedef typename res_::iterator iterator; }; }; template< typename First , typename Last , typename State , typename ForwardOp > struct iter_fold_step { typedef iter_fold_chunk< -1 >::template result_< typename mpl::next::type , Last , typename apply2< ForwardOp,State,First >::type , ForwardOp > chunk_; typedef typename chunk_::state state; typedef typename chunk_::iterator iterator; }; template< int N , typename First , typename Last , typename State , typename ForwardOp > struct iter_fold_impl : iter_fold_chunk ::template result_< First,Last,State,ForwardOp > { }; }}} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/msvc70/lambda_no_ctps.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/aux_/lambda_no_ctps.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< bool C1 = false, bool C2 = false, bool C3 = false, bool C4 = false , bool C5 = false > struct lambda_or : true_ { }; template<> struct lambda_or< false,false,false,false,false > : false_ { }; template< typename Arity > struct lambda_impl { template< typename T, typename Tag, typename Protect > struct result_ { typedef T type; typedef is_placeholder is_le; }; }; template<> struct lambda_impl< int_<1> > { template< typename F, typename Tag, typename Protect > struct result_ { typedef lambda< typename F::arg1, Tag, false_ > l1; typedef typename l1::is_le is_le1; typedef aux::lambda_or< BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value > is_le; typedef bind1< typename F::rebind , typename l1::type > bind_; typedef typename if_< is_le , if_< Protect, mpl::protect, bind_ > , identity >::type type_; typedef typename type_::type type; }; }; template<> struct lambda_impl< int_<2> > { template< typename F, typename Tag, typename Protect > struct result_ { typedef lambda< typename F::arg1, Tag, false_ > l1; typedef lambda< typename F::arg2, Tag, false_ > l2; typedef typename l1::is_le is_le1; typedef typename l2::is_le is_le2; typedef aux::lambda_or< BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value > is_le; typedef bind2< typename F::rebind , typename l1::type, typename l2::type > bind_; typedef typename if_< is_le , if_< Protect, mpl::protect, bind_ > , identity >::type type_; typedef typename type_::type type; }; }; template<> struct lambda_impl< int_<3> > { template< typename F, typename Tag, typename Protect > struct result_ { typedef lambda< typename F::arg1, Tag, false_ > l1; typedef lambda< typename F::arg2, Tag, false_ > l2; typedef lambda< typename F::arg3, Tag, false_ > l3; typedef typename l1::is_le is_le1; typedef typename l2::is_le is_le2; typedef typename l3::is_le is_le3; typedef aux::lambda_or< BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le3)::value > is_le; typedef bind3< typename F::rebind , typename l1::type, typename l2::type, typename l3::type > bind_; typedef typename if_< is_le , if_< Protect, mpl::protect, bind_ > , identity >::type type_; typedef typename type_::type type; }; }; template<> struct lambda_impl< int_<4> > { template< typename F, typename Tag, typename Protect > struct result_ { typedef lambda< typename F::arg1, Tag, false_ > l1; typedef lambda< typename F::arg2, Tag, false_ > l2; typedef lambda< typename F::arg3, Tag, false_ > l3; typedef lambda< typename F::arg4, Tag, false_ > l4; typedef typename l1::is_le is_le1; typedef typename l2::is_le is_le2; typedef typename l3::is_le is_le3; typedef typename l4::is_le is_le4; typedef aux::lambda_or< BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le3)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le4)::value > is_le; typedef bind4< typename F::rebind , typename l1::type, typename l2::type, typename l3::type , typename l4::type > bind_; typedef typename if_< is_le , if_< Protect, mpl::protect, bind_ > , identity >::type type_; typedef typename type_::type type; }; }; template<> struct lambda_impl< int_<5> > { template< typename F, typename Tag, typename Protect > struct result_ { typedef lambda< typename F::arg1, Tag, false_ > l1; typedef lambda< typename F::arg2, Tag, false_ > l2; typedef lambda< typename F::arg3, Tag, false_ > l3; typedef lambda< typename F::arg4, Tag, false_ > l4; typedef lambda< typename F::arg5, Tag, false_ > l5; typedef typename l1::is_le is_le1; typedef typename l2::is_le is_le2; typedef typename l3::is_le is_le3; typedef typename l4::is_le is_le4; typedef typename l5::is_le is_le5; typedef aux::lambda_or< BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le3)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le4)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le5)::value > is_le; typedef bind5< typename F::rebind , typename l1::type, typename l2::type, typename l3::type , typename l4::type, typename l5::type > bind_; typedef typename if_< is_le , if_< Protect, mpl::protect, bind_ > , identity >::type type_; typedef typename type_::type type; }; }; } // namespace aux template< typename T , typename Tag , typename Protect > struct lambda { /// Metafunction forwarding confuses MSVC 6.x typedef typename aux::template_arity::type arity_; typedef typename aux::lambda_impl ::template result_< T,Tag,Protect > l_; typedef typename l_::type type; typedef typename l_::is_le is_le; BOOST_MPL_AUX_LAMBDA_SUPPORT(3, lambda, (T, Tag, Protect)) }; BOOST_MPL_AUX_NA_SPEC2(1, 3, lambda) template< typename T > struct is_lambda_expression : lambda::is_le { }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/msvc70/less.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/less.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 , BOOST_MPL_AUX_NTTP_DECL(int, tag1_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value , BOOST_MPL_AUX_NTTP_DECL(int, tag2_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value > struct less_impl : if_c< ( tag1_ > tag2_ ) , aux::cast2nd_impl< less_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< less_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct less_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template<> struct less_impl< na,integral_c_tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template<> struct less_impl< integral_c_tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct less_tag : tag< T,na > { }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct less : aux::msvc_eti_base< typename apply_wrap2< less_impl< typename less_tag::type , typename less_tag::type > , N1 , N2 >::type >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, less, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 2, less) }} namespace boost { namespace mpl { template<> struct less_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply { BOOST_STATIC_CONSTANT(bool, value = ( BOOST_MPL_AUX_VALUE_WKND(N2)::value > BOOST_MPL_AUX_VALUE_WKND(N1)::value ) ); typedef bool_ type; }; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/msvc70/less_equal.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/less_equal.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 , BOOST_MPL_AUX_NTTP_DECL(int, tag1_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value , BOOST_MPL_AUX_NTTP_DECL(int, tag2_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value > struct less_equal_impl : if_c< ( tag1_ > tag2_ ) , aux::cast2nd_impl< less_equal_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< less_equal_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct less_equal_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template<> struct less_equal_impl< na,integral_c_tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template<> struct less_equal_impl< integral_c_tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct less_equal_tag : tag< T,na > { }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct less_equal : aux::msvc_eti_base< typename apply_wrap2< less_equal_impl< typename less_equal_tag::type , typename less_equal_tag::type > , N1 , N2 >::type >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, less_equal, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 2, less_equal) }} namespace boost { namespace mpl { template<> struct less_equal_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply { BOOST_STATIC_CONSTANT(bool, value = ( BOOST_MPL_AUX_VALUE_WKND(N1)::value <= BOOST_MPL_AUX_VALUE_WKND(N2)::value ) ); typedef bool_ type; }; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/msvc70/list.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/list.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< int N > struct list_chooser; } namespace aux { template<> struct list_chooser<0> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef list0< >::type type; }; }; } // namespace aux namespace aux { template<> struct list_chooser<1> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename list1< T0 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_chooser<2> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename list2< T0, T1 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_chooser<3> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename list3< T0, T1, T2 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_chooser<4> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename list4< T0, T1, T2, T3 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_chooser<5> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename list5< T0, T1, T2, T3, T4 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_chooser<6> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename list6< T0, T1, T2, T3, T4, T5 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_chooser<7> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename list7< T0, T1, T2, T3, T4, T5, T6 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_chooser<8> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename list8< T0, T1, T2, T3, T4, T5, T6, T7 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_chooser<9> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename list9< T0, T1, T2, T3, T4, T5, T6, T7, T8 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_chooser<10> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename list10< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_chooser<11> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename list11< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_chooser<12> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename list12< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_chooser<13> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename list13< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_chooser<14> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename list14< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_chooser<15> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename list15< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_chooser<16> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename list16< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_chooser<17> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename list17< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_chooser<18> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename list18< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_chooser<19> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename list19< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_chooser<20> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename list20< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 >::type type; }; }; } // namespace aux namespace aux { template< typename T > struct is_list_arg { BOOST_STATIC_CONSTANT(bool, value = true); }; template<> struct is_list_arg { BOOST_STATIC_CONSTANT(bool, value = false); }; template< typename T1, typename T2, typename T3, typename T4, typename T5 , typename T6, typename T7, typename T8, typename T9, typename T10 , typename T11, typename T12, typename T13, typename T14, typename T15 , typename T16, typename T17, typename T18, typename T19, typename T20 > struct list_count_args { BOOST_STATIC_CONSTANT(int, value = is_list_arg::value + is_list_arg::value + is_list_arg::value + is_list_arg::value + is_list_arg::value + is_list_arg::value + is_list_arg::value + is_list_arg::value + is_list_arg::value + is_list_arg::value + is_list_arg::value + is_list_arg::value + is_list_arg::value + is_list_arg::value + is_list_arg::value + is_list_arg::value + is_list_arg::value + is_list_arg::value + is_list_arg::value + is_list_arg::value ); }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct list_impl { typedef aux::list_count_args< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 > arg_num_; typedef typename aux::list_chooser< arg_num_::value > ::template result_< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; }; } // namespace aux template< typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na , typename T12 = na, typename T13 = na, typename T14 = na , typename T15 = na, typename T16 = na, typename T17 = na , typename T18 = na, typename T19 = na > struct list : aux::list_impl< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 >::type { typedef typename aux::list_impl< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 >::type type; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/msvc70/list_c.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/list_c.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< int N > struct list_c_chooser; } namespace aux { template<> struct list_c_chooser<0> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename list0_c< T >::type type; }; }; } // namespace aux namespace aux { template<> struct list_c_chooser<1> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename list1_c< T, C0 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_c_chooser<2> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename list2_c< T, C0, C1 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_c_chooser<3> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename list3_c< T, C0, C1, C2 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_c_chooser<4> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename list4_c< T, C0, C1, C2, C3 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_c_chooser<5> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename list5_c< T, C0, C1, C2, C3, C4 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_c_chooser<6> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename list6_c< T, C0, C1, C2, C3, C4, C5 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_c_chooser<7> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename list7_c< T, C0, C1, C2, C3, C4, C5, C6 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_c_chooser<8> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename list8_c< T, C0, C1, C2, C3, C4, C5, C6, C7 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_c_chooser<9> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename list9_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_c_chooser<10> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename list10_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_c_chooser<11> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename list11_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_c_chooser<12> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename list12_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_c_chooser<13> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename list13_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_c_chooser<14> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename list14_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_c_chooser<15> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename list15_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_c_chooser<16> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename list16_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_c_chooser<17> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename list17_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_c_chooser<18> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename list18_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_c_chooser<19> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename list19_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_c_chooser<20> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename list20_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19 >::type type; }; }; } // namespace aux namespace aux { template< long C > struct is_list_c_arg { BOOST_STATIC_CONSTANT(bool, value = true); }; template<> struct is_list_c_arg { BOOST_STATIC_CONSTANT(bool, value = false); }; template< long C1, long C2, long C3, long C4, long C5, long C6, long C7, long C8 , long C9, long C10, long C11, long C12, long C13, long C14, long C15 , long C16, long C17, long C18, long C19, long C20 > struct list_c_count_args { BOOST_STATIC_CONSTANT(int, value = is_list_c_arg::value + is_list_c_arg::value + is_list_c_arg::value + is_list_c_arg::value + is_list_c_arg::value + is_list_c_arg::value + is_list_c_arg::value + is_list_c_arg::value + is_list_c_arg::value + is_list_c_arg::value + is_list_c_arg::value + is_list_c_arg::value + is_list_c_arg::value + is_list_c_arg::value + is_list_c_arg::value + is_list_c_arg::value + is_list_c_arg::value + is_list_c_arg::value + is_list_c_arg::value + is_list_c_arg::value ); }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct list_c_impl { typedef aux::list_c_count_args< C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19 > arg_num_; typedef typename aux::list_c_chooser< arg_num_::value > ::template result_< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19 >::type type; }; } // namespace aux template< typename T, long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX , long C3 = LONG_MAX, long C4 = LONG_MAX, long C5 = LONG_MAX , long C6 = LONG_MAX, long C7 = LONG_MAX, long C8 = LONG_MAX , long C9 = LONG_MAX, long C10 = LONG_MAX, long C11 = LONG_MAX , long C12 = LONG_MAX, long C13 = LONG_MAX, long C14 = LONG_MAX , long C15 = LONG_MAX, long C16 = LONG_MAX, long C17 = LONG_MAX , long C18 = LONG_MAX, long C19 = LONG_MAX > struct list_c : aux::list_c_impl< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19 >::type { typedef typename aux::list_c_impl< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19 >::type type; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/msvc70/map.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/map.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< int N > struct map_chooser; } namespace aux { template<> struct map_chooser<0> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef map0< >::type type; }; }; } // namespace aux namespace aux { template<> struct map_chooser<1> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename map1< T0 >::type type; }; }; } // namespace aux namespace aux { template<> struct map_chooser<2> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename map2< T0, T1 >::type type; }; }; } // namespace aux namespace aux { template<> struct map_chooser<3> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename map3< T0, T1, T2 >::type type; }; }; } // namespace aux namespace aux { template<> struct map_chooser<4> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename map4< T0, T1, T2, T3 >::type type; }; }; } // namespace aux namespace aux { template<> struct map_chooser<5> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename map5< T0, T1, T2, T3, T4 >::type type; }; }; } // namespace aux namespace aux { template<> struct map_chooser<6> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename map6< T0, T1, T2, T3, T4, T5 >::type type; }; }; } // namespace aux namespace aux { template<> struct map_chooser<7> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename map7< T0, T1, T2, T3, T4, T5, T6 >::type type; }; }; } // namespace aux namespace aux { template<> struct map_chooser<8> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename map8< T0, T1, T2, T3, T4, T5, T6, T7 >::type type; }; }; } // namespace aux namespace aux { template<> struct map_chooser<9> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename map9< T0, T1, T2, T3, T4, T5, T6, T7, T8 >::type type; }; }; } // namespace aux namespace aux { template<> struct map_chooser<10> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename map10< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9 >::type type; }; }; } // namespace aux namespace aux { template<> struct map_chooser<11> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename map11< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10 >::type type; }; }; } // namespace aux namespace aux { template<> struct map_chooser<12> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename map12< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11 >::type type; }; }; } // namespace aux namespace aux { template<> struct map_chooser<13> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename map13< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12 >::type type; }; }; } // namespace aux namespace aux { template<> struct map_chooser<14> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename map14< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13 >::type type; }; }; } // namespace aux namespace aux { template<> struct map_chooser<15> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename map15< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 >::type type; }; }; } // namespace aux namespace aux { template<> struct map_chooser<16> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename map16< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15 >::type type; }; }; } // namespace aux namespace aux { template<> struct map_chooser<17> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename map17< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16 >::type type; }; }; } // namespace aux namespace aux { template<> struct map_chooser<18> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename map18< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17 >::type type; }; }; } // namespace aux namespace aux { template<> struct map_chooser<19> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename map19< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18 >::type type; }; }; } // namespace aux namespace aux { template<> struct map_chooser<20> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename map20< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 >::type type; }; }; } // namespace aux namespace aux { template< typename T > struct is_map_arg { BOOST_STATIC_CONSTANT(bool, value = true); }; template<> struct is_map_arg { BOOST_STATIC_CONSTANT(bool, value = false); }; template< typename T1, typename T2, typename T3, typename T4, typename T5 , typename T6, typename T7, typename T8, typename T9, typename T10 , typename T11, typename T12, typename T13, typename T14, typename T15 , typename T16, typename T17, typename T18, typename T19, typename T20 > struct map_count_args { BOOST_STATIC_CONSTANT(int, value = is_map_arg::value + is_map_arg::value + is_map_arg::value + is_map_arg::value + is_map_arg::value + is_map_arg::value + is_map_arg::value + is_map_arg::value + is_map_arg::value + is_map_arg::value + is_map_arg::value + is_map_arg::value + is_map_arg::value + is_map_arg::value + is_map_arg::value + is_map_arg::value + is_map_arg::value + is_map_arg::value + is_map_arg::value + is_map_arg::value ); }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct map_impl { typedef aux::map_count_args< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 > arg_num_; typedef typename aux::map_chooser< arg_num_::value > ::template result_< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; }; } // namespace aux template< typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na , typename T12 = na, typename T13 = na, typename T14 = na , typename T15 = na, typename T16 = na, typename T17 = na , typename T18 = na, typename T19 = na > struct map : aux::map_impl< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 >::type { typedef typename aux::map_impl< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 >::type type; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/msvc70/minus.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/minus.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 , BOOST_MPL_AUX_NTTP_DECL(int, tag1_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value , BOOST_MPL_AUX_NTTP_DECL(int, tag2_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value > struct minus_impl : if_c< ( tag1_ > tag2_ ) , aux::cast2nd_impl< minus_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< minus_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct minus_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template<> struct minus_impl< na,integral_c_tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template<> struct minus_impl< integral_c_tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct minus_tag : tag< T,na > { }; /// forward declaration template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct minus2; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) , typename N3 = na, typename N4 = na, typename N5 = na > struct minus : aux::msvc_eti_base< typename if_< is_na , minus2< N1,N2 > , minus< minus2< N1,N2 > , N3, N4, N5 > >::type > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , minus , ( N1, N2, N3, N4, N5 ) ) }; template< typename N1 , typename N2 > struct minus2 : aux::msvc_eti_base< typename apply_wrap2< minus_impl< typename minus_tag::type , typename minus_tag::type > , N1 , N2 >::type >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, minus2, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 5, minus) }} namespace boost { namespace mpl { namespace aux { template< typename T, T n1, T n2 > struct minus_wknd { BOOST_STATIC_CONSTANT(T, value = (n1 - n2)); typedef integral_c< T,value > type; }; } template<> struct minus_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : aux::minus_wknd< typename aux::largest_int< typename N1::value_type , typename N2::value_type >::type , N1::value , N2::value >::type { }; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/msvc70/modulus.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/modulus.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 , BOOST_MPL_AUX_NTTP_DECL(int, tag1_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value , BOOST_MPL_AUX_NTTP_DECL(int, tag2_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value > struct modulus_impl : if_c< ( tag1_ > tag2_ ) , aux::cast2nd_impl< modulus_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< modulus_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct modulus_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template<> struct modulus_impl< na,integral_c_tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template<> struct modulus_impl< integral_c_tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct modulus_tag : tag< T,na > { }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct modulus : aux::msvc_eti_base< typename apply_wrap2< modulus_impl< typename modulus_tag::type , typename modulus_tag::type > , N1 , N2 >::type >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, modulus, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 2, modulus) }} namespace boost { namespace mpl { namespace aux { template< typename T, T n1, T n2 > struct modulus_wknd { BOOST_STATIC_CONSTANT(T, value = (n1 % n2)); typedef integral_c< T,value > type; }; } template<> struct modulus_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : aux::modulus_wknd< typename aux::largest_int< typename N1::value_type , typename N2::value_type >::type , N1::value , N2::value >::type { }; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/msvc70/not_equal_to.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/not_equal_to.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 , BOOST_MPL_AUX_NTTP_DECL(int, tag1_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value , BOOST_MPL_AUX_NTTP_DECL(int, tag2_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value > struct not_equal_to_impl : if_c< ( tag1_ > tag2_ ) , aux::cast2nd_impl< not_equal_to_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< not_equal_to_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct not_equal_to_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template<> struct not_equal_to_impl< na,integral_c_tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template<> struct not_equal_to_impl< integral_c_tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct not_equal_to_tag : tag< T,na > { }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct not_equal_to : aux::msvc_eti_base< typename apply_wrap2< not_equal_to_impl< typename not_equal_to_tag::type , typename not_equal_to_tag::type > , N1 , N2 >::type >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, not_equal_to, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 2, not_equal_to) }} namespace boost { namespace mpl { template<> struct not_equal_to_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply { BOOST_STATIC_CONSTANT(bool, value = ( BOOST_MPL_AUX_VALUE_WKND(N1)::value != BOOST_MPL_AUX_VALUE_WKND(N2)::value ) ); typedef bool_ type; }; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/msvc70/or.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/or.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< bool C_ > struct or_impl { template< typename T1, typename T2, typename T3, typename T4 > struct result_ : true_ { }; }; template<> struct or_impl { template< typename T1, typename T2, typename T3, typename T4 > struct result_ : or_impl< BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value >::template result_< T2,T3,T4,false_ > { }; template<> struct result_< false_,false_,false_,false_ > : false_ { }; }; } // namespace aux template< typename BOOST_MPL_AUX_NA_PARAM(T1) , typename BOOST_MPL_AUX_NA_PARAM(T2) , typename T3 = false_, typename T4 = false_, typename T5 = false_ > struct or_ : aux::or_impl< BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value >::template result_< T2,T3,T4,T5 > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , or_ , ( T1, T2, T3, T4, T5) ) }; BOOST_MPL_AUX_NA_SPEC2( 2 , 5 , or_ ) }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/msvc70/placeholders.hpp ================================================ // Copyright Aleksey Gurtovoy 2001-2004 // Copyright Peter Dimov 2001-2003 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/placeholders.hpp" header // -- DO NOT modify by hand! BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg< -1 > _; BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE namespace boost { namespace mpl { BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_) namespace placeholders { using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_; } }} /// agurt, 17/mar/02: one more placeholder for the last 'apply#' /// specialization BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg<1> _1; BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE namespace boost { namespace mpl { BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_1) namespace placeholders { using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_1; } }} BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg<2> _2; BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE namespace boost { namespace mpl { BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_2) namespace placeholders { using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_2; } }} BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg<3> _3; BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE namespace boost { namespace mpl { BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_3) namespace placeholders { using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_3; } }} BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg<4> _4; BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE namespace boost { namespace mpl { BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_4) namespace placeholders { using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_4; } }} BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg<5> _5; BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE namespace boost { namespace mpl { BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_5) namespace placeholders { using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_5; } }} BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg<6> _6; BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE namespace boost { namespace mpl { BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_6) namespace placeholders { using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_6; } }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/msvc70/plus.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/plus.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 , BOOST_MPL_AUX_NTTP_DECL(int, tag1_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value , BOOST_MPL_AUX_NTTP_DECL(int, tag2_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value > struct plus_impl : if_c< ( tag1_ > tag2_ ) , aux::cast2nd_impl< plus_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< plus_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct plus_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template<> struct plus_impl< na,integral_c_tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template<> struct plus_impl< integral_c_tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct plus_tag : tag< T,na > { }; /// forward declaration template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct plus2; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) , typename N3 = na, typename N4 = na, typename N5 = na > struct plus : aux::msvc_eti_base< typename if_< is_na , plus2< N1,N2 > , plus< plus2< N1,N2 > , N3, N4, N5 > >::type > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , plus , ( N1, N2, N3, N4, N5 ) ) }; template< typename N1 , typename N2 > struct plus2 : aux::msvc_eti_base< typename apply_wrap2< plus_impl< typename plus_tag::type , typename plus_tag::type > , N1 , N2 >::type >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, plus2, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 5, plus) }} namespace boost { namespace mpl { namespace aux { template< typename T, T n1, T n2 > struct plus_wknd { BOOST_STATIC_CONSTANT(T, value = (n1 + n2)); typedef integral_c< T,value > type; }; } template<> struct plus_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : aux::plus_wknd< typename aux::largest_int< typename N1::value_type , typename N2::value_type >::type , N1::value , N2::value >::type { }; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/msvc70/quote.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/quote.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< bool > struct quote_impl { template< typename T > struct result_ : T { }; }; template<> struct quote_impl { template< typename T > struct result_ { typedef T type; }; }; template< template< typename P1 > class F , typename Tag = void_ > struct quote1 { template< typename U1 > struct apply : quote_impl< aux::has_type< F >::value > ::template result_< F > { }; }; template< template< typename P1, typename P2 > class F , typename Tag = void_ > struct quote2 { template< typename U1, typename U2 > struct apply : quote_impl< aux::has_type< F< U1,U2 > >::value > ::template result_< F< U1,U2 > > { }; }; template< template< typename P1, typename P2, typename P3 > class F , typename Tag = void_ > struct quote3 { template< typename U1, typename U2, typename U3 > struct apply : quote_impl< aux::has_type< F< U1,U2,U3 > >::value > ::template result_< F< U1,U2,U3 > > { }; }; template< template< typename P1, typename P2, typename P3, typename P4 > class F , typename Tag = void_ > struct quote4 { template< typename U1, typename U2, typename U3, typename U4 > struct apply : quote_impl< aux::has_type< F< U1,U2,U3,U4 > >::value > ::template result_< F< U1,U2,U3,U4 > > { }; }; template< template< typename P1, typename P2, typename P3, typename P4 , typename P5 > class F , typename Tag = void_ > struct quote5 { template< typename U1, typename U2, typename U3, typename U4 , typename U5 > struct apply : quote_impl< aux::has_type< F< U1,U2,U3,U4,U5 > >::value > ::template result_< F< U1,U2,U3,U4,U5 > > { }; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/msvc70/reverse_fold_impl.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/aux_/reverse_fold_impl.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { /// forward declaration template< long N , typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_fold_impl; template< long N > struct reverse_fold_chunk; template<> struct reverse_fold_chunk<0> { template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct result_ { typedef First iter0; typedef State fwd_state0; typedef fwd_state0 bkwd_state0; typedef bkwd_state0 state; typedef iter0 iterator; }; }; template<> struct reverse_fold_chunk<1> { template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct result_ { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; typedef typename mpl::next::type iter1; typedef fwd_state1 bkwd_state1; typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; typedef bkwd_state0 state; typedef iter1 iterator; }; }; template<> struct reverse_fold_chunk<2> { template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct result_ { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp, fwd_state1, typename deref::type >::type fwd_state2; typedef typename mpl::next::type iter2; typedef fwd_state2 bkwd_state2; typedef typename apply2< BackwardOp, bkwd_state2, typename deref::type >::type bkwd_state1; typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; typedef bkwd_state0 state; typedef iter2 iterator; }; }; template<> struct reverse_fold_chunk<3> { template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct result_ { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp, fwd_state1, typename deref::type >::type fwd_state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp, fwd_state2, typename deref::type >::type fwd_state3; typedef typename mpl::next::type iter3; typedef fwd_state3 bkwd_state3; typedef typename apply2< BackwardOp, bkwd_state3, typename deref::type >::type bkwd_state2; typedef typename apply2< BackwardOp, bkwd_state2, typename deref::type >::type bkwd_state1; typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; typedef bkwd_state0 state; typedef iter3 iterator; }; }; template<> struct reverse_fold_chunk<4> { template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct result_ { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp, fwd_state1, typename deref::type >::type fwd_state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp, fwd_state2, typename deref::type >::type fwd_state3; typedef typename mpl::next::type iter3; typedef typename apply2< ForwardOp, fwd_state3, typename deref::type >::type fwd_state4; typedef typename mpl::next::type iter4; typedef fwd_state4 bkwd_state4; typedef typename apply2< BackwardOp, bkwd_state4, typename deref::type >::type bkwd_state3; typedef typename apply2< BackwardOp, bkwd_state3, typename deref::type >::type bkwd_state2; typedef typename apply2< BackwardOp, bkwd_state2, typename deref::type >::type bkwd_state1; typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; typedef bkwd_state0 state; typedef iter4 iterator; }; }; template< long N > struct reverse_fold_chunk { template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct result_ { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp, fwd_state1, typename deref::type >::type fwd_state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp, fwd_state2, typename deref::type >::type fwd_state3; typedef typename mpl::next::type iter3; typedef typename apply2< ForwardOp, fwd_state3, typename deref::type >::type fwd_state4; typedef typename mpl::next::type iter4; typedef reverse_fold_impl< ( (N - 4) < 0 ? 0 : N - 4 ) , iter4 , Last , fwd_state4 , BackwardOp , ForwardOp > nested_chunk; typedef typename nested_chunk::state bkwd_state4; typedef typename apply2< BackwardOp, bkwd_state4, typename deref::type >::type bkwd_state3; typedef typename apply2< BackwardOp, bkwd_state3, typename deref::type >::type bkwd_state2; typedef typename apply2< BackwardOp, bkwd_state2, typename deref::type >::type bkwd_state1; typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; typedef bkwd_state0 state; typedef typename nested_chunk::iterator iterator; }; }; template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_fold_step; template< typename Last , typename State > struct reverse_fold_null_step { typedef Last iterator; typedef State state; }; template<> struct reverse_fold_chunk< -1 > { template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct result_ { typedef typename if_< typename is_same< First,Last >::type , reverse_fold_null_step< Last,State > , reverse_fold_step< First,Last,State,BackwardOp,ForwardOp > >::type res_; typedef typename res_::state state; typedef typename res_::iterator iterator; }; }; template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_fold_step { typedef reverse_fold_chunk< -1 >::template result_< typename mpl::next::type , Last , typename apply2::type>::type , BackwardOp , ForwardOp > nested_step; typedef typename apply2< BackwardOp , typename nested_step::state , typename deref::type >::type state; typedef typename nested_step::iterator iterator; }; template< long N , typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_fold_impl : reverse_fold_chunk ::template result_< First,Last,State,BackwardOp,ForwardOp > { }; }}} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/msvc70/reverse_iter_fold_impl.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/aux_/reverse_iter_fold_impl.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { /// forward declaration template< long N , typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_iter_fold_impl; template< long N > struct reverse_iter_fold_chunk; template<> struct reverse_iter_fold_chunk<0> { template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct result_ { typedef First iter0; typedef State fwd_state0; typedef fwd_state0 bkwd_state0; typedef bkwd_state0 state; typedef iter0 iterator; }; }; template<> struct reverse_iter_fold_chunk<1> { template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct result_ { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; typedef typename mpl::next::type iter1; typedef fwd_state1 bkwd_state1; typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; typedef bkwd_state0 state; typedef iter1 iterator; }; }; template<> struct reverse_iter_fold_chunk<2> { template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct result_ { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; typedef typename mpl::next::type iter2; typedef fwd_state2 bkwd_state2; typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1; typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; typedef bkwd_state0 state; typedef iter2 iterator; }; }; template<> struct reverse_iter_fold_chunk<3> { template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct result_ { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp,fwd_state2,iter2 >::type fwd_state3; typedef typename mpl::next::type iter3; typedef fwd_state3 bkwd_state3; typedef typename apply2< BackwardOp,bkwd_state3,iter2 >::type bkwd_state2; typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1; typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; typedef bkwd_state0 state; typedef iter3 iterator; }; }; template<> struct reverse_iter_fold_chunk<4> { template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct result_ { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp,fwd_state2,iter2 >::type fwd_state3; typedef typename mpl::next::type iter3; typedef typename apply2< ForwardOp,fwd_state3,iter3 >::type fwd_state4; typedef typename mpl::next::type iter4; typedef fwd_state4 bkwd_state4; typedef typename apply2< BackwardOp,bkwd_state4,iter3 >::type bkwd_state3; typedef typename apply2< BackwardOp,bkwd_state3,iter2 >::type bkwd_state2; typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1; typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; typedef bkwd_state0 state; typedef iter4 iterator; }; }; template< long N > struct reverse_iter_fold_chunk { template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct result_ { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp,fwd_state2,iter2 >::type fwd_state3; typedef typename mpl::next::type iter3; typedef typename apply2< ForwardOp,fwd_state3,iter3 >::type fwd_state4; typedef typename mpl::next::type iter4; typedef reverse_iter_fold_impl< ( (N - 4) < 0 ? 0 : N - 4 ) , iter4 , Last , fwd_state4 , BackwardOp , ForwardOp > nested_chunk; typedef typename nested_chunk::state bkwd_state4; typedef typename apply2< BackwardOp,bkwd_state4,iter3 >::type bkwd_state3; typedef typename apply2< BackwardOp,bkwd_state3,iter2 >::type bkwd_state2; typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1; typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; typedef bkwd_state0 state; typedef typename nested_chunk::iterator iterator; }; }; template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_iter_fold_step; template< typename Last , typename State > struct reverse_iter_fold_null_step { typedef Last iterator; typedef State state; }; template<> struct reverse_iter_fold_chunk< -1 > { template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct result_ { typedef typename if_< typename is_same< First,Last >::type , reverse_iter_fold_null_step< Last,State > , reverse_iter_fold_step< First,Last,State,BackwardOp,ForwardOp > >::type res_; typedef typename res_::state state; typedef typename res_::iterator iterator; }; }; template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_iter_fold_step { typedef reverse_iter_fold_chunk< -1 >::template result_< typename mpl::next::type , Last , typename apply2< ForwardOp,State,First >::type , BackwardOp , ForwardOp > nested_step; typedef typename apply2< BackwardOp , typename nested_step::state , First >::type state; typedef typename nested_step::iterator iterator; }; template< long N , typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_iter_fold_impl : reverse_iter_fold_chunk ::template result_< First,Last,State,BackwardOp,ForwardOp > { }; }}} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/msvc70/set.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/set.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< int N > struct set_chooser; } namespace aux { template<> struct set_chooser<0> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef set0< >::type type; }; }; } // namespace aux namespace aux { template<> struct set_chooser<1> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename set1< T0 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_chooser<2> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename set2< T0, T1 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_chooser<3> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename set3< T0, T1, T2 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_chooser<4> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename set4< T0, T1, T2, T3 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_chooser<5> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename set5< T0, T1, T2, T3, T4 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_chooser<6> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename set6< T0, T1, T2, T3, T4, T5 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_chooser<7> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename set7< T0, T1, T2, T3, T4, T5, T6 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_chooser<8> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename set8< T0, T1, T2, T3, T4, T5, T6, T7 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_chooser<9> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename set9< T0, T1, T2, T3, T4, T5, T6, T7, T8 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_chooser<10> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename set10< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_chooser<11> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename set11< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_chooser<12> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename set12< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_chooser<13> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename set13< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_chooser<14> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename set14< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_chooser<15> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename set15< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_chooser<16> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename set16< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_chooser<17> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename set17< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_chooser<18> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename set18< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_chooser<19> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename set19< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_chooser<20> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename set20< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 >::type type; }; }; } // namespace aux namespace aux { template< typename T > struct is_set_arg { BOOST_STATIC_CONSTANT(bool, value = true); }; template<> struct is_set_arg { BOOST_STATIC_CONSTANT(bool, value = false); }; template< typename T1, typename T2, typename T3, typename T4, typename T5 , typename T6, typename T7, typename T8, typename T9, typename T10 , typename T11, typename T12, typename T13, typename T14, typename T15 , typename T16, typename T17, typename T18, typename T19, typename T20 > struct set_count_args { BOOST_STATIC_CONSTANT(int, value = is_set_arg::value + is_set_arg::value + is_set_arg::value + is_set_arg::value + is_set_arg::value + is_set_arg::value + is_set_arg::value + is_set_arg::value + is_set_arg::value + is_set_arg::value + is_set_arg::value + is_set_arg::value + is_set_arg::value + is_set_arg::value + is_set_arg::value + is_set_arg::value + is_set_arg::value + is_set_arg::value + is_set_arg::value + is_set_arg::value ); }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct set_impl { typedef aux::set_count_args< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 > arg_num_; typedef typename aux::set_chooser< arg_num_::value > ::template result_< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; }; } // namespace aux template< typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na , typename T12 = na, typename T13 = na, typename T14 = na , typename T15 = na, typename T16 = na, typename T17 = na , typename T18 = na, typename T19 = na > struct set : aux::set_impl< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 >::type { typedef typename aux::set_impl< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 >::type type; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/msvc70/set_c.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/set_c.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< int N > struct set_c_chooser; } namespace aux { template<> struct set_c_chooser<0> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename set0_c< T >::type type; }; }; } // namespace aux namespace aux { template<> struct set_c_chooser<1> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename set1_c< T, C0 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_c_chooser<2> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename set2_c< T, C0, C1 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_c_chooser<3> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename set3_c< T, C0, C1, C2 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_c_chooser<4> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename set4_c< T, C0, C1, C2, C3 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_c_chooser<5> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename set5_c< T, C0, C1, C2, C3, C4 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_c_chooser<6> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename set6_c< T, C0, C1, C2, C3, C4, C5 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_c_chooser<7> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename set7_c< T, C0, C1, C2, C3, C4, C5, C6 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_c_chooser<8> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename set8_c< T, C0, C1, C2, C3, C4, C5, C6, C7 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_c_chooser<9> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename set9_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_c_chooser<10> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename set10_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_c_chooser<11> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename set11_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_c_chooser<12> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename set12_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_c_chooser<13> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename set13_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_c_chooser<14> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename set14_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_c_chooser<15> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename set15_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_c_chooser<16> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename set16_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_c_chooser<17> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename set17_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_c_chooser<18> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename set18_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_c_chooser<19> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename set19_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_c_chooser<20> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename set20_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19 >::type type; }; }; } // namespace aux namespace aux { template< long C > struct is_set_c_arg { BOOST_STATIC_CONSTANT(bool, value = true); }; template<> struct is_set_c_arg { BOOST_STATIC_CONSTANT(bool, value = false); }; template< long C1, long C2, long C3, long C4, long C5, long C6, long C7, long C8 , long C9, long C10, long C11, long C12, long C13, long C14, long C15 , long C16, long C17, long C18, long C19, long C20 > struct set_c_count_args { BOOST_STATIC_CONSTANT(int, value = is_set_c_arg::value + is_set_c_arg::value + is_set_c_arg::value + is_set_c_arg::value + is_set_c_arg::value + is_set_c_arg::value + is_set_c_arg::value + is_set_c_arg::value + is_set_c_arg::value + is_set_c_arg::value + is_set_c_arg::value + is_set_c_arg::value + is_set_c_arg::value + is_set_c_arg::value + is_set_c_arg::value + is_set_c_arg::value + is_set_c_arg::value + is_set_c_arg::value + is_set_c_arg::value + is_set_c_arg::value ); }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct set_c_impl { typedef aux::set_c_count_args< C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19 > arg_num_; typedef typename aux::set_c_chooser< arg_num_::value > ::template result_< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19 >::type type; }; } // namespace aux template< typename T, long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX , long C3 = LONG_MAX, long C4 = LONG_MAX, long C5 = LONG_MAX , long C6 = LONG_MAX, long C7 = LONG_MAX, long C8 = LONG_MAX , long C9 = LONG_MAX, long C10 = LONG_MAX, long C11 = LONG_MAX , long C12 = LONG_MAX, long C13 = LONG_MAX, long C14 = LONG_MAX , long C15 = LONG_MAX, long C16 = LONG_MAX, long C17 = LONG_MAX , long C18 = LONG_MAX, long C19 = LONG_MAX > struct set_c : aux::set_c_impl< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19 >::type { typedef typename aux::set_c_impl< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19 >::type type; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/msvc70/shift_left.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // Copyright Jaap Suter 2003 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/shift_left.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 , BOOST_MPL_AUX_NTTP_DECL(int, tag1_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value , BOOST_MPL_AUX_NTTP_DECL(int, tag2_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value > struct shift_left_impl : if_c< ( tag1_ > tag2_ ) , aux::cast2nd_impl< shift_left_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< shift_left_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct shift_left_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template<> struct shift_left_impl< na,integral_c_tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template<> struct shift_left_impl< integral_c_tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct shift_left_tag : tag< T,na > { }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct shift_left : aux::msvc_eti_base< typename apply_wrap2< shift_left_impl< typename shift_left_tag::type , typename shift_left_tag::type > , N1 , N2 >::type >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, shift_left, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 2, shift_left) }} namespace boost { namespace mpl { namespace aux { template< typename T, typename Shift, T n, Shift s > struct shift_left_wknd { BOOST_STATIC_CONSTANT(T, value = (n << s)); typedef integral_c< T,value > type; }; } template<> struct shift_left_impl< integral_c_tag,integral_c_tag > { template< typename N, typename S > struct apply : aux::shift_left_wknd< typename N::value_type , typename S::value_type , N::value , S::value >::type { }; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/msvc70/shift_right.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // Copyright Jaap Suter 2003 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/shift_right.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 , BOOST_MPL_AUX_NTTP_DECL(int, tag1_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value , BOOST_MPL_AUX_NTTP_DECL(int, tag2_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value > struct shift_right_impl : if_c< ( tag1_ > tag2_ ) , aux::cast2nd_impl< shift_right_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< shift_right_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct shift_right_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template<> struct shift_right_impl< na,integral_c_tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template<> struct shift_right_impl< integral_c_tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct shift_right_tag : tag< T,na > { }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct shift_right : aux::msvc_eti_base< typename apply_wrap2< shift_right_impl< typename shift_right_tag::type , typename shift_right_tag::type > , N1 , N2 >::type >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, shift_right, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 2, shift_right) }} namespace boost { namespace mpl { namespace aux { template< typename T, typename Shift, T n, Shift s > struct shift_right_wknd { BOOST_STATIC_CONSTANT(T, value = (n >> s)); typedef integral_c< T,value > type; }; } template<> struct shift_right_impl< integral_c_tag,integral_c_tag > { template< typename N, typename S > struct apply : aux::shift_right_wknd< typename N::value_type , typename S::value_type , N::value , S::value >::type { }; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/msvc70/template_arity.hpp ================================================ // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/aux_/template_arity.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< bool > struct template_arity_impl { template< typename F > struct result_ : mpl::int_< -1 > { }; }; template<> struct template_arity_impl { template< typename F > struct result_ : F::arity { }; }; template< typename F > struct template_arity : template_arity_impl< ::boost::mpl::aux::has_rebind::value > ::template result_ { }; template<> struct template_arity : mpl::int_< -1 > { }; }}} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/msvc70/times.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/times.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 , BOOST_MPL_AUX_NTTP_DECL(int, tag1_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value , BOOST_MPL_AUX_NTTP_DECL(int, tag2_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value > struct times_impl : if_c< ( tag1_ > tag2_ ) , aux::cast2nd_impl< times_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< times_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct times_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template<> struct times_impl< na,integral_c_tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template<> struct times_impl< integral_c_tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct times_tag : tag< T,na > { }; /// forward declaration template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct times2; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) , typename N3 = na, typename N4 = na, typename N5 = na > struct times : aux::msvc_eti_base< typename if_< is_na , times2< N1,N2 > , times< times2< N1,N2 > , N3, N4, N5 > >::type > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , times , ( N1, N2, N3, N4, N5 ) ) }; template< typename N1 , typename N2 > struct times2 : aux::msvc_eti_base< typename apply_wrap2< times_impl< typename times_tag::type , typename times_tag::type > , N1 , N2 >::type >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, times2, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 5, times) }} namespace boost { namespace mpl { namespace aux { template< typename T, T n1, T n2 > struct times_wknd { BOOST_STATIC_CONSTANT(T, value = (n1 * n2)); typedef integral_c< T,value > type; }; } template<> struct times_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : aux::times_wknd< typename aux::largest_int< typename N1::value_type , typename N2::value_type >::type , N1::value , N2::value >::type { }; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/msvc70/unpack_args.hpp ================================================ // Copyright Aleksey Gurtovoy 2002-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/unpack_args.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< BOOST_MPL_AUX_NTTP_DECL(int, size) > struct unpack_args_impl { template< typename F, typename Args > struct apply; }; template<> struct unpack_args_impl<0> { template< typename F, typename Args > struct apply : apply0< F > { }; }; template<> struct unpack_args_impl<1> { template< typename F, typename Args > struct apply : apply1< F , typename at_c< Args,0 >::type > { }; }; template<> struct unpack_args_impl<2> { template< typename F, typename Args > struct apply : apply2< F , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type > { }; }; template<> struct unpack_args_impl<3> { template< typename F, typename Args > struct apply : apply3< F , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type , typename at_c< Args,2 >::type > { }; }; template<> struct unpack_args_impl<4> { template< typename F, typename Args > struct apply : apply4< F , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type , typename at_c< Args,2 >::type, typename at_c< Args,3 >::type > { }; }; template<> struct unpack_args_impl<5> { template< typename F, typename Args > struct apply : apply5< F , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type , typename at_c< Args,2 >::type, typename at_c< Args,3 >::type , typename at_c< Args,4 >::type > { }; }; } template< typename F > struct unpack_args { template< typename Args > struct apply : aux::unpack_args_impl< size::value > ::template apply< F,Args > { }; }; BOOST_MPL_AUX_PASS_THROUGH_LAMBDA_SPEC(1, unpack_args) }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/msvc70/vector.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/vector.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< int N > struct vector_chooser; } namespace aux { template<> struct vector_chooser<0> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef vector0< >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_chooser<1> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector1< T0 >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_chooser<2> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector2< T0, T1 >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_chooser<3> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector3< T0, T1, T2 >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_chooser<4> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector4< T0, T1, T2, T3 >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_chooser<5> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector5< T0, T1, T2, T3, T4 >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_chooser<6> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector6< T0, T1, T2, T3, T4, T5 >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_chooser<7> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector7< T0, T1, T2, T3, T4, T5, T6 >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_chooser<8> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector8< T0, T1, T2, T3, T4, T5, T6, T7 >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_chooser<9> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector9< T0, T1, T2, T3, T4, T5, T6, T7, T8 >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_chooser<10> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector10< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9 >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_chooser<11> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector11< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10 >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_chooser<12> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector12< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11 >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_chooser<13> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector13< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12 >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_chooser<14> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector14< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13 >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_chooser<15> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector15< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_chooser<16> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector16< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15 >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_chooser<17> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector17< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16 >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_chooser<18> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector18< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17 >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_chooser<19> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector19< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18 >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_chooser<20> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector20< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 >::type type; }; }; } // namespace aux namespace aux { template< typename T > struct is_vector_arg { BOOST_STATIC_CONSTANT(bool, value = true); }; template<> struct is_vector_arg { BOOST_STATIC_CONSTANT(bool, value = false); }; template< typename T1, typename T2, typename T3, typename T4, typename T5 , typename T6, typename T7, typename T8, typename T9, typename T10 , typename T11, typename T12, typename T13, typename T14, typename T15 , typename T16, typename T17, typename T18, typename T19, typename T20 > struct vector_count_args { BOOST_STATIC_CONSTANT(int, value = is_vector_arg::value + is_vector_arg::value + is_vector_arg::value + is_vector_arg::value + is_vector_arg::value + is_vector_arg::value + is_vector_arg::value + is_vector_arg::value + is_vector_arg::value + is_vector_arg::value + is_vector_arg::value + is_vector_arg::value + is_vector_arg::value + is_vector_arg::value + is_vector_arg::value + is_vector_arg::value + is_vector_arg::value + is_vector_arg::value + is_vector_arg::value + is_vector_arg::value ); }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct vector_impl { typedef aux::vector_count_args< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 > arg_num_; typedef typename aux::vector_chooser< arg_num_::value > ::template result_< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; }; } // namespace aux template< typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na , typename T12 = na, typename T13 = na, typename T14 = na , typename T15 = na, typename T16 = na, typename T17 = na , typename T18 = na, typename T19 = na > struct vector : aux::vector_impl< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 >::type { typedef typename aux::vector_impl< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 >::type type; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/msvc70/vector_c.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/vector_c.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< int N > struct vector_c_chooser; } namespace aux { template<> struct vector_c_chooser<0> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename vector0_c< T >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_c_chooser<1> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename vector1_c< T, T(C0) >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_c_chooser<2> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename vector2_c< T, T(C0), T(C1) >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_c_chooser<3> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename vector3_c< T, T(C0), T(C1), T(C2) >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_c_chooser<4> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename vector4_c< T, T(C0), T(C1), T(C2), T(C3) >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_c_chooser<5> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename vector5_c< T, T(C0), T(C1), T(C2), T(C3), T(C4) >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_c_chooser<6> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename vector6_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5) >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_c_chooser<7> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename vector7_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6) >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_c_chooser<8> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename vector8_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7) >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_c_chooser<9> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename vector9_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8) >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_c_chooser<10> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename vector10_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9) >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_c_chooser<11> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename vector11_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10) >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_c_chooser<12> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename vector12_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11) >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_c_chooser<13> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename vector13_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12) >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_c_chooser<14> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename vector14_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13) >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_c_chooser<15> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename vector15_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14) >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_c_chooser<16> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename vector16_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15) >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_c_chooser<17> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename vector17_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16) >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_c_chooser<18> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename vector18_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17) >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_c_chooser<19> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename vector19_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17), T(C18) >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_c_chooser<20> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename vector20_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17), T(C18), T(C19) >::type type; }; }; } // namespace aux namespace aux { template< long C > struct is_vector_c_arg { BOOST_STATIC_CONSTANT(bool, value = true); }; template<> struct is_vector_c_arg { BOOST_STATIC_CONSTANT(bool, value = false); }; template< long C1, long C2, long C3, long C4, long C5, long C6, long C7, long C8 , long C9, long C10, long C11, long C12, long C13, long C14, long C15 , long C16, long C17, long C18, long C19, long C20 > struct vector_c_count_args { BOOST_STATIC_CONSTANT(int, value = is_vector_c_arg::value + is_vector_c_arg::value + is_vector_c_arg::value + is_vector_c_arg::value + is_vector_c_arg::value + is_vector_c_arg::value + is_vector_c_arg::value + is_vector_c_arg::value + is_vector_c_arg::value + is_vector_c_arg::value + is_vector_c_arg::value + is_vector_c_arg::value + is_vector_c_arg::value + is_vector_c_arg::value + is_vector_c_arg::value + is_vector_c_arg::value + is_vector_c_arg::value + is_vector_c_arg::value + is_vector_c_arg::value + is_vector_c_arg::value ); }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct vector_c_impl { typedef aux::vector_c_count_args< C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19 > arg_num_; typedef typename aux::vector_c_chooser< arg_num_::value > ::template result_< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19 >::type type; }; } // namespace aux template< typename T, long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX , long C3 = LONG_MAX, long C4 = LONG_MAX, long C5 = LONG_MAX , long C6 = LONG_MAX, long C7 = LONG_MAX, long C8 = LONG_MAX , long C9 = LONG_MAX, long C10 = LONG_MAX, long C11 = LONG_MAX , long C12 = LONG_MAX, long C13 = LONG_MAX, long C14 = LONG_MAX , long C15 = LONG_MAX, long C16 = LONG_MAX, long C17 = LONG_MAX , long C18 = LONG_MAX, long C19 = LONG_MAX > struct vector_c : aux::vector_c_impl< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19 >::type { typedef typename aux::vector_c_impl< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19 >::type type; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/mwcw/advance_backward.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/aux_/advance_backward.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< long N > struct advance_backward; template<> struct advance_backward<0> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef iter0 type; }; }; template<> struct advance_backward<1> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef typename prior::type iter1; typedef iter1 type; }; }; template<> struct advance_backward<2> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef typename prior::type iter1; typedef typename prior::type iter2; typedef iter2 type; }; }; template<> struct advance_backward<3> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef typename prior::type iter1; typedef typename prior::type iter2; typedef typename prior::type iter3; typedef iter3 type; }; }; template<> struct advance_backward<4> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef typename prior::type iter1; typedef typename prior::type iter2; typedef typename prior::type iter3; typedef typename prior::type iter4; typedef iter4 type; }; }; template< long N > struct advance_backward { template< typename Iterator > struct apply { typedef typename apply_wrap1< advance_backward<4> , Iterator >::type chunk_result_; typedef typename apply_wrap1< advance_backward<( (N - 4) < 0 ? 0 : N - 4 )> , chunk_result_ >::type type; }; }; }}} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/mwcw/advance_forward.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/aux_/advance_forward.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< long N > struct advance_forward; template<> struct advance_forward<0> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef iter0 type; }; }; template<> struct advance_forward<1> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef typename next::type iter1; typedef iter1 type; }; }; template<> struct advance_forward<2> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef typename next::type iter1; typedef typename next::type iter2; typedef iter2 type; }; }; template<> struct advance_forward<3> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef typename next::type iter1; typedef typename next::type iter2; typedef typename next::type iter3; typedef iter3 type; }; }; template<> struct advance_forward<4> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef typename next::type iter1; typedef typename next::type iter2; typedef typename next::type iter3; typedef typename next::type iter4; typedef iter4 type; }; }; template< long N > struct advance_forward { template< typename Iterator > struct apply { typedef typename apply_wrap1< advance_forward<4> , Iterator >::type chunk_result_; typedef typename apply_wrap1< advance_forward<( (N - 4) < 0 ? 0 : N - 4 )> , chunk_result_ >::type type; }; }; }}} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/mwcw/and.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/and.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< bool C_, typename T1, typename T2, typename T3, typename T4 > struct and_impl : false_ { }; template< typename T1, typename T2, typename T3, typename T4 > struct and_impl< true,T1,T2,T3,T4 > : and_impl< BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value , T2, T3, T4 , true_ > { }; template<> struct and_impl< true , true_, true_, true_, true_ > : true_ { }; } // namespace aux template< typename BOOST_MPL_AUX_NA_PARAM(T1) , typename BOOST_MPL_AUX_NA_PARAM(T2) , typename T3 = true_, typename T4 = true_, typename T5 = true_ > struct and_ : aux::and_impl< BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value , T2, T3, T4, T5 > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , and_ , ( T1, T2, T3, T4, T5) ) }; BOOST_MPL_AUX_NA_SPEC2( 2 , 5 , and_ ) }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/mwcw/apply.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/apply.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename F > struct apply0 : apply_wrap0< typename lambda::type > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 1 , apply0 , (F ) ) }; template< typename F > struct apply< F,na,na,na,na,na > : apply0 { }; template< typename F, typename T1 > struct apply1 : apply_wrap1< typename lambda::type , T1 > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 2 , apply1 , (F, T1) ) }; template< typename F, typename T1 > struct apply< F,T1,na,na,na,na > : apply1< F,T1 > { }; template< typename F, typename T1, typename T2 > struct apply2 : apply_wrap2< typename lambda::type , T1, T2 > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 3 , apply2 , (F, T1, T2) ) }; template< typename F, typename T1, typename T2 > struct apply< F,T1,T2,na,na,na > : apply2< F,T1,T2 > { }; template< typename F, typename T1, typename T2, typename T3 > struct apply3 : apply_wrap3< typename lambda::type , T1, T2, T3 > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 4 , apply3 , (F, T1, T2, T3) ) }; template< typename F, typename T1, typename T2, typename T3 > struct apply< F,T1,T2,T3,na,na > : apply3< F,T1,T2,T3 > { }; template< typename F, typename T1, typename T2, typename T3, typename T4 > struct apply4 : apply_wrap4< typename lambda::type , T1, T2, T3, T4 > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , apply4 , (F, T1, T2, T3, T4) ) }; template< typename F, typename T1, typename T2, typename T3, typename T4 > struct apply< F,T1,T2,T3,T4,na > : apply4< F,T1,T2,T3,T4 > { }; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct apply5 : apply_wrap5< typename lambda::type , T1, T2, T3, T4, T5 > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 6 , apply5 , (F, T1, T2, T3, T4, T5) ) }; /// primary template (not a specialization!) template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct apply : apply5< F,T1,T2,T3,T4,T5 > { }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/mwcw/apply_fwd.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/apply_fwd.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename F, typename T1 = na, typename T2 = na, typename T3 = na , typename T4 = na, typename T5 = na > struct apply; template< typename F > struct apply0; template< typename F, typename T1 > struct apply1; template< typename F, typename T1, typename T2 > struct apply2; template< typename F, typename T1, typename T2, typename T3 > struct apply3; template< typename F, typename T1, typename T2, typename T3, typename T4 > struct apply4; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct apply5; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/mwcw/apply_wrap.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/apply_wrap.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< int N, typename F > struct apply_wrap_impl0; template< typename F > struct apply_wrap_impl0< 0 , F > { typedef typename F::template apply< /// since the defaults are "lost", we have to pass *something* even for nullary /// metafunction classes na > type; }; template< typename F > struct apply_wrap_impl0< 1 , F > { typedef typename F::template apply< na > type; }; template< typename F > struct apply_wrap_impl0< 2 , F > { typedef typename F::template apply< na, na > type; }; template< typename F > struct apply_wrap_impl0< 3 , F > { typedef typename F::template apply< na, na, na > type; }; template< typename F > struct apply_wrap_impl0< 4 , F > { typedef typename F::template apply< na, na, na, na > type; }; template< typename F > struct apply_wrap_impl0< 5 , F > { typedef typename F::template apply< na, na, na, na, na > type; }; template< typename F > struct apply_wrap0 : apply_wrap_impl0< ::boost::mpl::aux::arity< F,0 >::value , F >::type { }; template< int N, typename F, typename T1 > struct apply_wrap_impl1; template< typename F, typename T1 > struct apply_wrap_impl1< 1 , F , T1 > { typedef typename F::template apply< T1 > type; }; template< typename F, typename T1 > struct apply_wrap_impl1< 2 , F , T1 > { typedef typename F::template apply< T1 , na > type; }; template< typename F, typename T1 > struct apply_wrap_impl1< 3 , F , T1 > { typedef typename F::template apply< T1 , na, na > type; }; template< typename F, typename T1 > struct apply_wrap_impl1< 4 , F , T1 > { typedef typename F::template apply< T1 , na, na, na > type; }; template< typename F, typename T1 > struct apply_wrap_impl1< 5 , F , T1 > { typedef typename F::template apply< T1 , na, na, na, na > type; }; template< typename F, typename T1 > struct apply_wrap1 : apply_wrap_impl1< ::boost::mpl::aux::arity< F,1 >::value , F , T1 >::type { }; template< int N, typename F, typename T1, typename T2 > struct apply_wrap_impl2; template< typename F, typename T1, typename T2 > struct apply_wrap_impl2< 2 , F , T1, T2 > { typedef typename F::template apply< T1, T2 > type; }; template< typename F, typename T1, typename T2 > struct apply_wrap_impl2< 3 , F , T1, T2 > { typedef typename F::template apply< T1, T2 , na > type; }; template< typename F, typename T1, typename T2 > struct apply_wrap_impl2< 4 , F , T1, T2 > { typedef typename F::template apply< T1, T2 , na, na > type; }; template< typename F, typename T1, typename T2 > struct apply_wrap_impl2< 5 , F , T1, T2 > { typedef typename F::template apply< T1, T2 , na, na, na > type; }; template< typename F, typename T1, typename T2 > struct apply_wrap2 : apply_wrap_impl2< ::boost::mpl::aux::arity< F,2 >::value , F , T1, T2 >::type { }; template< int N, typename F, typename T1, typename T2, typename T3 > struct apply_wrap_impl3; template< typename F, typename T1, typename T2, typename T3 > struct apply_wrap_impl3< 3 , F , T1, T2, T3 > { typedef typename F::template apply< T1, T2, T3 > type; }; template< typename F, typename T1, typename T2, typename T3 > struct apply_wrap_impl3< 4 , F , T1, T2, T3 > { typedef typename F::template apply< T1, T2, T3 , na > type; }; template< typename F, typename T1, typename T2, typename T3 > struct apply_wrap_impl3< 5 , F , T1, T2, T3 > { typedef typename F::template apply< T1, T2, T3 , na, na > type; }; template< typename F, typename T1, typename T2, typename T3 > struct apply_wrap3 : apply_wrap_impl3< ::boost::mpl::aux::arity< F,3 >::value , F , T1, T2, T3 >::type { }; template< int N, typename F, typename T1, typename T2, typename T3, typename T4 > struct apply_wrap_impl4; template< typename F, typename T1, typename T2, typename T3, typename T4 > struct apply_wrap_impl4< 4 , F , T1, T2, T3, T4 > { typedef typename F::template apply< T1, T2, T3, T4 > type; }; template< typename F, typename T1, typename T2, typename T3, typename T4 > struct apply_wrap_impl4< 5 , F , T1, T2, T3, T4 > { typedef typename F::template apply< T1, T2, T3, T4 , na > type; }; template< typename F, typename T1, typename T2, typename T3, typename T4 > struct apply_wrap4 : apply_wrap_impl4< ::boost::mpl::aux::arity< F,4 >::value , F , T1, T2, T3, T4 >::type { }; template< int N, typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct apply_wrap_impl5; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct apply_wrap_impl5< 5 , F , T1, T2, T3, T4, T5 > { typedef typename F::template apply< T1, T2, T3, T4, T5 > type; }; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct apply_wrap5 : apply_wrap_impl5< ::boost::mpl::aux::arity< F,5 >::value , F , T1, T2, T3, T4, T5 >::type { }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/mwcw/arg.hpp ================================================ // Copyright Peter Dimov 2001-2002 // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/arg.hpp" header // -- DO NOT modify by hand! BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN template<> struct arg< -1 > { BOOST_STATIC_CONSTANT(int, value = -1); BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) BOOST_MPL_AUX_ARG_TYPEDEF(na, type) template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { typedef U1 type; BOOST_MPL_AUX_ASSERT_NOT_NA(type); }; }; template<> struct arg<1> { BOOST_STATIC_CONSTANT(int, value = 1); typedef arg<2> next; BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) BOOST_MPL_AUX_ARG_TYPEDEF(na, type) template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { typedef U1 type; BOOST_MPL_AUX_ASSERT_NOT_NA(type); }; }; template<> struct arg<2> { BOOST_STATIC_CONSTANT(int, value = 2); typedef arg<3> next; BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) BOOST_MPL_AUX_ARG_TYPEDEF(na, type) template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { typedef U2 type; BOOST_MPL_AUX_ASSERT_NOT_NA(type); }; }; template<> struct arg<3> { BOOST_STATIC_CONSTANT(int, value = 3); typedef arg<4> next; BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) BOOST_MPL_AUX_ARG_TYPEDEF(na, type) template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { typedef U3 type; BOOST_MPL_AUX_ASSERT_NOT_NA(type); }; }; template<> struct arg<4> { BOOST_STATIC_CONSTANT(int, value = 4); typedef arg<5> next; BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) BOOST_MPL_AUX_ARG_TYPEDEF(na, type) template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { typedef U4 type; BOOST_MPL_AUX_ASSERT_NOT_NA(type); }; }; template<> struct arg<5> { BOOST_STATIC_CONSTANT(int, value = 5); typedef arg<6> next; BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) BOOST_MPL_AUX_ARG_TYPEDEF(na, type) template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { typedef U5 type; BOOST_MPL_AUX_ASSERT_NOT_NA(type); }; }; BOOST_MPL_AUX_NONTYPE_ARITY_SPEC(1,int, arg) BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/mwcw/basic_bind.hpp ================================================ // Copyright Peter Dimov 2001 // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/aux_/basic_bind.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< typename T, typename U1, typename U2, typename U3, typename U4 , typename U5 > struct resolve_bind_arg { typedef T type; }; template< int N, typename U1, typename U2, typename U3, typename U4, typename U5 > struct resolve_bind_arg< arg, U1, U2, U3, U4, U5 > { typedef typename apply_wrap5, U1, U2, U3, U4, U5>::type type; }; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5, typename U1, typename U2, typename U3, typename U4 , typename U5 > struct resolve_bind_arg< bind< F,T1,T2,T3,T4,T5 >, U1, U2, U3, U4, U5 > { typedef bind< F,T1,T2,T3,T4,T5 > f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux template< typename F > struct bind0 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; public: typedef typename apply_wrap0< f_ >::type type; }; }; namespace aux { template< typename F, typename U1, typename U2, typename U3, typename U4 , typename U5 > struct resolve_bind_arg< bind0, U1, U2, U3, U4, U5 > { typedef bind0 f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(1, bind0) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(1, bind0) template< typename F > struct bind< F,na,na,na,na,na > : bind0 { }; template< typename F, typename T1 > struct bind1 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; public: typedef typename apply_wrap1< f_ , typename t1::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename U1, typename U2, typename U3 , typename U4, typename U5 > struct resolve_bind_arg< bind1< F,T1 >, U1, U2, U3, U4, U5 > { typedef bind1< F,T1 > f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(2, bind1) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(2, bind1) template< typename F, typename T1 > struct bind< F,T1,na,na,na,na > : bind1< F,T1 > { }; template< typename F, typename T1, typename T2 > struct bind2 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; public: typedef typename apply_wrap2< f_ , typename t1::type, typename t2::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename T2, typename U1, typename U2 , typename U3, typename U4, typename U5 > struct resolve_bind_arg< bind2< F,T1,T2 >, U1, U2, U3, U4, U5 > { typedef bind2< F,T1,T2 > f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(3, bind2) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(3, bind2) template< typename F, typename T1, typename T2 > struct bind< F,T1,T2,na,na,na > : bind2< F,T1,T2 > { }; template< typename F, typename T1, typename T2, typename T3 > struct bind3 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3; public: typedef typename apply_wrap3< f_ , typename t1::type, typename t2::type, typename t3::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename T2, typename T3, typename U1 , typename U2, typename U3, typename U4, typename U5 > struct resolve_bind_arg< bind3< F,T1,T2,T3 >, U1, U2, U3, U4, U5 > { typedef bind3< F,T1,T2,T3 > f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(4, bind3) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(4, bind3) template< typename F, typename T1, typename T2, typename T3 > struct bind< F,T1,T2,T3,na,na > : bind3< F,T1,T2,T3 > { }; template< typename F, typename T1, typename T2, typename T3, typename T4 > struct bind4 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3; typedef aux::resolve_bind_arg< T4,U1,U2,U3,U4,U5 > t4; public: typedef typename apply_wrap4< f_ , typename t1::type, typename t2::type, typename t3::type , typename t4::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename T2, typename T3, typename T4 , typename U1, typename U2, typename U3, typename U4, typename U5 > struct resolve_bind_arg< bind4< F,T1,T2,T3,T4 >, U1, U2, U3, U4, U5 > { typedef bind4< F,T1,T2,T3,T4 > f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(5, bind4) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(5, bind4) template< typename F, typename T1, typename T2, typename T3, typename T4 > struct bind< F,T1,T2,T3,T4,na > : bind4< F,T1,T2,T3,T4 > { }; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct bind5 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3; typedef aux::resolve_bind_arg< T4,U1,U2,U3,U4,U5 > t4; typedef aux::resolve_bind_arg< T5,U1,U2,U3,U4,U5 > t5; public: typedef typename apply_wrap5< f_ , typename t1::type, typename t2::type, typename t3::type , typename t4::type, typename t5::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5, typename U1, typename U2, typename U3, typename U4 , typename U5 > struct resolve_bind_arg< bind5< F,T1,T2,T3,T4,T5 >, U1, U2, U3, U4, U5 > { typedef bind5< F,T1,T2,T3,T4,T5 > f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(6, bind5) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(6, bind5) /// primary template (not a specialization!) template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct bind : bind5< F,T1,T2,T3,T4,T5 > { }; /// if_/eval_if specializations template< template< typename T1, typename T2, typename T3 > class F, typename Tag > struct quote3; template< typename T1, typename T2, typename T3 > struct if_; template< typename Tag, typename T1, typename T2, typename T3 > struct bind3< quote3< if_,Tag > , T1, T2, T3 > { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef mpl::arg<1> n1; typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3; typedef typename if_< typename t1::type , t2, t3 >::type f_; public: typedef typename f_::type type; }; }; template< template< typename T1, typename T2, typename T3 > class F, typename Tag > struct quote3; template< typename T1, typename T2, typename T3 > struct eval_if; template< typename Tag, typename T1, typename T2, typename T3 > struct bind3< quote3< eval_if,Tag > , T1, T2, T3 > { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef mpl::arg<1> n1; typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3; typedef typename eval_if< typename t1::type , t2, t3 >::type f_; public: typedef typename f_::type type; }; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/mwcw/bind.hpp ================================================ // Copyright Peter Dimov 2001 // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/bind.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< typename T, typename U1, typename U2, typename U3, typename U4 , typename U5 > struct resolve_bind_arg { typedef T type; }; template< typename T , typename Arg > struct replace_unnamed_arg { typedef Arg next; typedef T type; }; template< typename Arg > struct replace_unnamed_arg< arg< -1 >, Arg > { typedef typename Arg::next next; typedef Arg type; }; template< int N, typename U1, typename U2, typename U3, typename U4, typename U5 > struct resolve_bind_arg< arg, U1, U2, U3, U4, U5 > { typedef typename apply_wrap5, U1, U2, U3, U4, U5>::type type; }; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5, typename U1, typename U2, typename U3, typename U4 , typename U5 > struct resolve_bind_arg< bind< F,T1,T2,T3,T4,T5 >, U1, U2, U3, U4, U5 > { typedef bind< F,T1,T2,T3,T4,T5 > f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux template< typename F > struct bind0 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; typedef typename r0::type a0; typedef typename r0::next n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; /// public: typedef typename apply_wrap0< f_ >::type type; }; }; namespace aux { template< typename F, typename U1, typename U2, typename U3, typename U4 , typename U5 > struct resolve_bind_arg< bind0, U1, U2, U3, U4, U5 > { typedef bind0 f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(1, bind0) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(1, bind0) template< typename F > struct bind< F,na,na,na,na,na > : bind0 { }; template< typename F, typename T1 > struct bind1 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; typedef typename r0::type a0; typedef typename r0::next n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; /// typedef aux::replace_unnamed_arg< T1,n1 > r1; typedef typename r1::type a1; typedef typename r1::next n2; typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; /// public: typedef typename apply_wrap1< f_ , typename t1::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename U1, typename U2, typename U3 , typename U4, typename U5 > struct resolve_bind_arg< bind1< F,T1 >, U1, U2, U3, U4, U5 > { typedef bind1< F,T1 > f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(2, bind1) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(2, bind1) template< typename F, typename T1 > struct bind< F,T1,na,na,na,na > : bind1< F,T1 > { }; template< typename F, typename T1, typename T2 > struct bind2 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; typedef typename r0::type a0; typedef typename r0::next n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; /// typedef aux::replace_unnamed_arg< T1,n1 > r1; typedef typename r1::type a1; typedef typename r1::next n2; typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; /// typedef aux::replace_unnamed_arg< T2,n2 > r2; typedef typename r2::type a2; typedef typename r2::next n3; typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; /// public: typedef typename apply_wrap2< f_ , typename t1::type, typename t2::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename T2, typename U1, typename U2 , typename U3, typename U4, typename U5 > struct resolve_bind_arg< bind2< F,T1,T2 >, U1, U2, U3, U4, U5 > { typedef bind2< F,T1,T2 > f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(3, bind2) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(3, bind2) template< typename F, typename T1, typename T2 > struct bind< F,T1,T2,na,na,na > : bind2< F,T1,T2 > { }; template< typename F, typename T1, typename T2, typename T3 > struct bind3 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; typedef typename r0::type a0; typedef typename r0::next n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; /// typedef aux::replace_unnamed_arg< T1,n1 > r1; typedef typename r1::type a1; typedef typename r1::next n2; typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; /// typedef aux::replace_unnamed_arg< T2,n2 > r2; typedef typename r2::type a2; typedef typename r2::next n3; typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; /// typedef aux::replace_unnamed_arg< T3,n3 > r3; typedef typename r3::type a3; typedef typename r3::next n4; typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; /// public: typedef typename apply_wrap3< f_ , typename t1::type, typename t2::type, typename t3::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename T2, typename T3, typename U1 , typename U2, typename U3, typename U4, typename U5 > struct resolve_bind_arg< bind3< F,T1,T2,T3 >, U1, U2, U3, U4, U5 > { typedef bind3< F,T1,T2,T3 > f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(4, bind3) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(4, bind3) template< typename F, typename T1, typename T2, typename T3 > struct bind< F,T1,T2,T3,na,na > : bind3< F,T1,T2,T3 > { }; template< typename F, typename T1, typename T2, typename T3, typename T4 > struct bind4 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; typedef typename r0::type a0; typedef typename r0::next n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; /// typedef aux::replace_unnamed_arg< T1,n1 > r1; typedef typename r1::type a1; typedef typename r1::next n2; typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; /// typedef aux::replace_unnamed_arg< T2,n2 > r2; typedef typename r2::type a2; typedef typename r2::next n3; typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; /// typedef aux::replace_unnamed_arg< T3,n3 > r3; typedef typename r3::type a3; typedef typename r3::next n4; typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; /// typedef aux::replace_unnamed_arg< T4,n4 > r4; typedef typename r4::type a4; typedef typename r4::next n5; typedef aux::resolve_bind_arg< a4,U1,U2,U3,U4,U5 > t4; /// public: typedef typename apply_wrap4< f_ , typename t1::type, typename t2::type, typename t3::type , typename t4::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename T2, typename T3, typename T4 , typename U1, typename U2, typename U3, typename U4, typename U5 > struct resolve_bind_arg< bind4< F,T1,T2,T3,T4 >, U1, U2, U3, U4, U5 > { typedef bind4< F,T1,T2,T3,T4 > f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(5, bind4) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(5, bind4) template< typename F, typename T1, typename T2, typename T3, typename T4 > struct bind< F,T1,T2,T3,T4,na > : bind4< F,T1,T2,T3,T4 > { }; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct bind5 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; typedef typename r0::type a0; typedef typename r0::next n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; /// typedef aux::replace_unnamed_arg< T1,n1 > r1; typedef typename r1::type a1; typedef typename r1::next n2; typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; /// typedef aux::replace_unnamed_arg< T2,n2 > r2; typedef typename r2::type a2; typedef typename r2::next n3; typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; /// typedef aux::replace_unnamed_arg< T3,n3 > r3; typedef typename r3::type a3; typedef typename r3::next n4; typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; /// typedef aux::replace_unnamed_arg< T4,n4 > r4; typedef typename r4::type a4; typedef typename r4::next n5; typedef aux::resolve_bind_arg< a4,U1,U2,U3,U4,U5 > t4; /// typedef aux::replace_unnamed_arg< T5,n5 > r5; typedef typename r5::type a5; typedef typename r5::next n6; typedef aux::resolve_bind_arg< a5,U1,U2,U3,U4,U5 > t5; /// public: typedef typename apply_wrap5< f_ , typename t1::type, typename t2::type, typename t3::type , typename t4::type, typename t5::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5, typename U1, typename U2, typename U3, typename U4 , typename U5 > struct resolve_bind_arg< bind5< F,T1,T2,T3,T4,T5 >, U1, U2, U3, U4, U5 > { typedef bind5< F,T1,T2,T3,T4,T5 > f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(6, bind5) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(6, bind5) /// primary template (not a specialization!) template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct bind : bind5< F,T1,T2,T3,T4,T5 > { }; /// if_/eval_if specializations template< template< typename T1, typename T2, typename T3 > class F, typename Tag > struct quote3; template< typename T1, typename T2, typename T3 > struct if_; template< typename Tag, typename T1, typename T2, typename T3 > struct bind3< quote3< if_,Tag > , T1, T2, T3 > { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef mpl::arg<1> n1; typedef aux::replace_unnamed_arg< T1,n1 > r1; typedef typename r1::type a1; typedef typename r1::next n2; typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; /// typedef aux::replace_unnamed_arg< T2,n2 > r2; typedef typename r2::type a2; typedef typename r2::next n3; typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; /// typedef aux::replace_unnamed_arg< T3,n3 > r3; typedef typename r3::type a3; typedef typename r3::next n4; typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; /// typedef typename if_< typename t1::type , t2, t3 >::type f_; public: typedef typename f_::type type; }; }; template< template< typename T1, typename T2, typename T3 > class F, typename Tag > struct quote3; template< typename T1, typename T2, typename T3 > struct eval_if; template< typename Tag, typename T1, typename T2, typename T3 > struct bind3< quote3< eval_if,Tag > , T1, T2, T3 > { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef mpl::arg<1> n1; typedef aux::replace_unnamed_arg< T1,n1 > r1; typedef typename r1::type a1; typedef typename r1::next n2; typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; /// typedef aux::replace_unnamed_arg< T2,n2 > r2; typedef typename r2::type a2; typedef typename r2::next n3; typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; /// typedef aux::replace_unnamed_arg< T3,n3 > r3; typedef typename r3::type a3; typedef typename r3::next n4; typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; /// typedef typename eval_if< typename t1::type , t2, t3 >::type f_; public: typedef typename f_::type type; }; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/mwcw/bind_fwd.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/bind_fwd.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename F, typename T1 = na, typename T2 = na, typename T3 = na , typename T4 = na, typename T5 = na > struct bind; template< typename F > struct bind0; template< typename F, typename T1 > struct bind1; template< typename F, typename T1, typename T2 > struct bind2; template< typename F, typename T1, typename T2, typename T3 > struct bind3; template< typename F, typename T1, typename T2, typename T3, typename T4 > struct bind4; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct bind5; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/mwcw/bitand.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // Copyright Jaap Suter 2003 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/bitand.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct bitand_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< bitand_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< bitand_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct bitand_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct bitand_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct bitand_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct bitand_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) , typename N3 = na, typename N4 = na, typename N5 = na > struct bitand_ : bitand_< bitand_< bitand_< bitand_< N1,N2 >, N3>, N4>, N5> { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , bitand_ , ( N1, N2, N3, N4, N5 ) ) }; template< typename N1, typename N2, typename N3, typename N4 > struct bitand_< N1,N2,N3,N4,na > : bitand_< bitand_< bitand_< N1,N2 >, N3>, N4> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , bitand_ , ( N1, N2, N3, N4, na ) ) }; template< typename N1, typename N2, typename N3 > struct bitand_< N1,N2,N3,na,na > : bitand_< bitand_< N1,N2 >, N3> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , bitand_ , ( N1, N2, N3, na, na ) ) }; template< typename N1, typename N2 > struct bitand_< N1,N2,na,na,na > : bitand_impl< typename bitand_tag::type , typename bitand_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , bitand_ , ( N1, N2, na, na, na ) ) }; BOOST_MPL_AUX_NA_SPEC2(2, 5, bitand_) }} namespace boost { namespace mpl { template<> struct bitand_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : integral_c< typename aux::largest_int< typename N1::value_type , typename N2::value_type >::type , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value & BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/mwcw/bitor.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // Copyright Jaap Suter 2003 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/bitor.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct bitor_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< bitor_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< bitor_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct bitor_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct bitor_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct bitor_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct bitor_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) , typename N3 = na, typename N4 = na, typename N5 = na > struct bitor_ : bitor_< bitor_< bitor_< bitor_< N1,N2 >, N3>, N4>, N5> { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , bitor_ , ( N1, N2, N3, N4, N5 ) ) }; template< typename N1, typename N2, typename N3, typename N4 > struct bitor_< N1,N2,N3,N4,na > : bitor_< bitor_< bitor_< N1,N2 >, N3>, N4> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , bitor_ , ( N1, N2, N3, N4, na ) ) }; template< typename N1, typename N2, typename N3 > struct bitor_< N1,N2,N3,na,na > : bitor_< bitor_< N1,N2 >, N3> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , bitor_ , ( N1, N2, N3, na, na ) ) }; template< typename N1, typename N2 > struct bitor_< N1,N2,na,na,na > : bitor_impl< typename bitor_tag::type , typename bitor_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , bitor_ , ( N1, N2, na, na, na ) ) }; BOOST_MPL_AUX_NA_SPEC2(2, 5, bitor_) }} namespace boost { namespace mpl { template<> struct bitor_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : integral_c< typename aux::largest_int< typename N1::value_type , typename N2::value_type >::type , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value | BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/mwcw/bitxor.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // Copyright Jaap Suter 2003 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/bitxor.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct bitxor_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< bitxor_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< bitxor_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct bitxor_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct bitxor_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct bitxor_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct bitxor_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) , typename N3 = na, typename N4 = na, typename N5 = na > struct bitxor_ : bitxor_< bitxor_< bitxor_< bitxor_< N1,N2 >, N3>, N4>, N5> { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , bitxor_ , ( N1, N2, N3, N4, N5 ) ) }; template< typename N1, typename N2, typename N3, typename N4 > struct bitxor_< N1,N2,N3,N4,na > : bitxor_< bitxor_< bitxor_< N1,N2 >, N3>, N4> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , bitxor_ , ( N1, N2, N3, N4, na ) ) }; template< typename N1, typename N2, typename N3 > struct bitxor_< N1,N2,N3,na,na > : bitxor_< bitxor_< N1,N2 >, N3> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , bitxor_ , ( N1, N2, N3, na, na ) ) }; template< typename N1, typename N2 > struct bitxor_< N1,N2,na,na,na > : bitxor_impl< typename bitxor_tag::type , typename bitxor_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , bitxor_ , ( N1, N2, na, na, na ) ) }; BOOST_MPL_AUX_NA_SPEC2(2, 5, bitxor_) }} namespace boost { namespace mpl { template<> struct bitxor_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : integral_c< typename aux::largest_int< typename N1::value_type , typename N2::value_type >::type , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value ^ BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/mwcw/deque.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/deque.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na , typename T12 = na, typename T13 = na, typename T14 = na , typename T15 = na, typename T16 = na, typename T17 = na , typename T18 = na, typename T19 = na > struct deque; template< > struct deque< na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector0< > { typedef vector0< >::type type; }; template< typename T0 > struct deque< T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector1 { typedef typename vector1::type type; }; template< typename T0, typename T1 > struct deque< T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector2< T0,T1 > { typedef typename vector2< T0,T1 >::type type; }; template< typename T0, typename T1, typename T2 > struct deque< T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector3< T0,T1,T2 > { typedef typename vector3< T0,T1,T2 >::type type; }; template< typename T0, typename T1, typename T2, typename T3 > struct deque< T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector4< T0,T1,T2,T3 > { typedef typename vector4< T0,T1,T2,T3 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 > struct deque< T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector5< T0,T1,T2,T3,T4 > { typedef typename vector5< T0,T1,T2,T3,T4 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct deque< T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector6< T0,T1,T2,T3,T4,T5 > { typedef typename vector6< T0,T1,T2,T3,T4,T5 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6 > struct deque< T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector7< T0,T1,T2,T3,T4,T5,T6 > { typedef typename vector7< T0,T1,T2,T3,T4,T5,T6 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7 > struct deque< T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na , na, na, na > : vector8< T0,T1,T2,T3,T4,T5,T6,T7 > { typedef typename vector8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8 > struct deque< T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na , na, na, na > : vector9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > { typedef typename vector9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 > struct deque< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na , na, na, na > : vector10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > { typedef typename vector10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10 > struct deque< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na , na, na, na > : vector11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > { typedef typename vector11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11 > struct deque< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na , na, na, na, na > : vector12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > { typedef typename vector12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12 > struct deque< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na , na, na, na, na > : vector13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > { typedef typename vector13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13 > struct deque< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na , na, na, na, na > : vector14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > { typedef typename vector14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 > struct deque< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na , na, na, na, na > : vector15< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 > { typedef typename vector15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15 > struct deque< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, na, na, na, na > : vector16< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15 > { typedef typename vector16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16 > struct deque< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, na, na, na > : vector17< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16 > { typedef typename vector17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17 > struct deque< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, na, na > : vector18< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17 > { typedef typename vector18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18 > struct deque< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18, na > : vector19< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18 > { typedef typename vector19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type; }; /// primary template (not a specialization!) template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct deque : vector20< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18, T19 > { typedef typename vector20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/mwcw/divides.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/divides.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct divides_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< divides_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< divides_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct divides_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct divides_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct divides_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct divides_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) , typename N3 = na, typename N4 = na, typename N5 = na > struct divides : divides< divides< divides< divides< N1,N2 >, N3>, N4>, N5> { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , divides , ( N1, N2, N3, N4, N5 ) ) }; template< typename N1, typename N2, typename N3, typename N4 > struct divides< N1,N2,N3,N4,na > : divides< divides< divides< N1,N2 >, N3>, N4> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , divides , ( N1, N2, N3, N4, na ) ) }; template< typename N1, typename N2, typename N3 > struct divides< N1,N2,N3,na,na > : divides< divides< N1,N2 >, N3> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , divides , ( N1, N2, N3, na, na ) ) }; template< typename N1, typename N2 > struct divides< N1,N2,na,na,na > : divides_impl< typename divides_tag::type , typename divides_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , divides , ( N1, N2, na, na, na ) ) }; BOOST_MPL_AUX_NA_SPEC2(2, 5, divides) }} namespace boost { namespace mpl { template<> struct divides_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : integral_c< typename aux::largest_int< typename N1::value_type , typename N2::value_type >::type , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value / BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/mwcw/equal_to.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/equal_to.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct equal_to_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< equal_to_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< equal_to_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct equal_to_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct equal_to_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct equal_to_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct equal_to_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct equal_to : equal_to_impl< typename equal_to_tag::type , typename equal_to_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, equal_to, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 2, equal_to) }} namespace boost { namespace mpl { template<> struct equal_to_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value == BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/mwcw/fold_impl.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/aux_/fold_impl.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { /// forward declaration template< int N , typename First , typename Last , typename State , typename ForwardOp > struct fold_impl; template< typename First , typename Last , typename State , typename ForwardOp > struct fold_impl< 0,First,Last,State,ForwardOp > { typedef First iter0; typedef State state0; typedef state0 state; typedef iter0 iterator; }; template< typename First , typename Last , typename State , typename ForwardOp > struct fold_impl< 1,First,Last,State,ForwardOp > { typedef First iter0; typedef State state0; typedef typename apply2< ForwardOp, state0, typename deref::type >::type state1; typedef typename mpl::next::type iter1; typedef state1 state; typedef iter1 iterator; }; template< typename First , typename Last , typename State , typename ForwardOp > struct fold_impl< 2,First,Last,State,ForwardOp > { typedef First iter0; typedef State state0; typedef typename apply2< ForwardOp, state0, typename deref::type >::type state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp, state1, typename deref::type >::type state2; typedef typename mpl::next::type iter2; typedef state2 state; typedef iter2 iterator; }; template< typename First , typename Last , typename State , typename ForwardOp > struct fold_impl< 3,First,Last,State,ForwardOp > { typedef First iter0; typedef State state0; typedef typename apply2< ForwardOp, state0, typename deref::type >::type state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp, state1, typename deref::type >::type state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp, state2, typename deref::type >::type state3; typedef typename mpl::next::type iter3; typedef state3 state; typedef iter3 iterator; }; template< typename First , typename Last , typename State , typename ForwardOp > struct fold_impl< 4,First,Last,State,ForwardOp > { typedef First iter0; typedef State state0; typedef typename apply2< ForwardOp, state0, typename deref::type >::type state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp, state1, typename deref::type >::type state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp, state2, typename deref::type >::type state3; typedef typename mpl::next::type iter3; typedef typename apply2< ForwardOp, state3, typename deref::type >::type state4; typedef typename mpl::next::type iter4; typedef state4 state; typedef iter4 iterator; }; template< int N , typename First , typename Last , typename State , typename ForwardOp > struct fold_impl { typedef fold_impl< 4 , First , Last , State , ForwardOp > chunk_; typedef fold_impl< ( (N - 4) < 0 ? 0 : N - 4 ) , typename chunk_::iterator , Last , typename chunk_::state , ForwardOp > res_; typedef typename res_::state state; typedef typename res_::iterator iterator; }; template< typename First , typename Last , typename State , typename ForwardOp > struct fold_impl< -1,First,Last,State,ForwardOp > : fold_impl< -1 , typename mpl::next::type , Last , typename apply2::type>::type , ForwardOp > { }; template< typename Last , typename State , typename ForwardOp > struct fold_impl< -1,Last,Last,State,ForwardOp > { typedef State state; typedef Last iterator; }; }}} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/mwcw/full_lambda.hpp ================================================ // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/aux_/full_lambda.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< bool C1 = false, bool C2 = false, bool C3 = false, bool C4 = false , bool C5 = false > struct lambda_or : true_ { }; template<> struct lambda_or< false,false,false,false,false > : false_ { }; } // namespace aux template< typename T , typename Tag > struct lambda { typedef false_ is_le; typedef T result_; typedef T type; }; template< typename T > struct is_lambda_expression : lambda::is_le { }; template< int N, typename Tag > struct lambda< arg, Tag > { typedef true_ is_le; typedef mpl::arg result_; // qualified for the sake of MIPSpro 7.41 typedef mpl::protect type; }; template< typename F , typename Tag > struct lambda< bind0 , Tag > { typedef false_ is_le; typedef bind0< F > result_; typedef result_ type; }; namespace aux { template< typename IsLE, typename Tag , template< typename P1 > class F , typename L1 > struct le_result1 { typedef F< typename L1::type > result_; typedef result_ type; }; template< typename Tag , template< typename P1 > class F , typename L1 > struct le_result1< true_,Tag,F,L1 > { typedef bind1< quote1< F,Tag > , typename L1::result_ > result_; typedef mpl::protect type; }; } // namespace aux template< template< typename P1 > class F , typename T1 , typename Tag > struct lambda< F , Tag > { typedef lambda< T1,Tag > l1; typedef typename l1::is_le is_le1; typedef typename aux::lambda_or< is_le1::value >::type is_le; typedef aux::le_result1< is_le, Tag, F, l1 > le_result_; typedef typename le_result_::result_ result_; typedef typename le_result_::type type; }; template< typename F, typename T1 , typename Tag > struct lambda< bind1< F,T1 > , Tag > { typedef false_ is_le; typedef bind1< F , T1 > result_; typedef result_ type; }; namespace aux { template< typename IsLE, typename Tag , template< typename P1, typename P2 > class F , typename L1, typename L2 > struct le_result2 { typedef F< typename L1::type, typename L2::type > result_; typedef result_ type; }; template< typename Tag , template< typename P1, typename P2 > class F , typename L1, typename L2 > struct le_result2< true_,Tag,F,L1,L2 > { typedef bind2< quote2< F,Tag > , typename L1::result_, typename L2::result_ > result_; typedef mpl::protect type; }; } // namespace aux template< template< typename P1, typename P2 > class F , typename T1, typename T2 , typename Tag > struct lambda< F< T1,T2 > , Tag > { typedef lambda< T1,Tag > l1; typedef lambda< T2,Tag > l2; typedef typename l1::is_le is_le1; typedef typename l2::is_le is_le2; typedef typename aux::lambda_or< is_le1::value, is_le2::value >::type is_le; typedef aux::le_result2< is_le, Tag, F, l1, l2 > le_result_; typedef typename le_result_::result_ result_; typedef typename le_result_::type type; }; template< typename F, typename T1, typename T2 , typename Tag > struct lambda< bind2< F,T1,T2 > , Tag > { typedef false_ is_le; typedef bind2< F , T1, T2 > result_; typedef result_ type; }; namespace aux { template< typename IsLE, typename Tag , template< typename P1, typename P2, typename P3 > class F , typename L1, typename L2, typename L3 > struct le_result3 { typedef F< typename L1::type, typename L2::type, typename L3::type > result_; typedef result_ type; }; template< typename Tag , template< typename P1, typename P2, typename P3 > class F , typename L1, typename L2, typename L3 > struct le_result3< true_,Tag,F,L1,L2,L3 > { typedef bind3< quote3< F,Tag > , typename L1::result_, typename L2::result_, typename L3::result_ > result_; typedef mpl::protect type; }; } // namespace aux template< template< typename P1, typename P2, typename P3 > class F , typename T1, typename T2, typename T3 , typename Tag > struct lambda< F< T1,T2,T3 > , Tag > { typedef lambda< T1,Tag > l1; typedef lambda< T2,Tag > l2; typedef lambda< T3,Tag > l3; typedef typename l1::is_le is_le1; typedef typename l2::is_le is_le2; typedef typename l3::is_le is_le3; typedef typename aux::lambda_or< is_le1::value, is_le2::value, is_le3::value >::type is_le; typedef aux::le_result3< is_le, Tag, F, l1, l2, l3 > le_result_; typedef typename le_result_::result_ result_; typedef typename le_result_::type type; }; template< typename F, typename T1, typename T2, typename T3 , typename Tag > struct lambda< bind3< F,T1,T2,T3 > , Tag > { typedef false_ is_le; typedef bind3< F , T1, T2, T3 > result_; typedef result_ type; }; namespace aux { template< typename IsLE, typename Tag , template< typename P1, typename P2, typename P3, typename P4 > class F , typename L1, typename L2, typename L3, typename L4 > struct le_result4 { typedef F< typename L1::type, typename L2::type, typename L3::type , typename L4::type > result_; typedef result_ type; }; template< typename Tag , template< typename P1, typename P2, typename P3, typename P4 > class F , typename L1, typename L2, typename L3, typename L4 > struct le_result4< true_,Tag,F,L1,L2,L3,L4 > { typedef bind4< quote4< F,Tag > , typename L1::result_, typename L2::result_, typename L3::result_ , typename L4::result_ > result_; typedef mpl::protect type; }; } // namespace aux template< template< typename P1, typename P2, typename P3, typename P4 > class F , typename T1, typename T2, typename T3, typename T4 , typename Tag > struct lambda< F< T1,T2,T3,T4 > , Tag > { typedef lambda< T1,Tag > l1; typedef lambda< T2,Tag > l2; typedef lambda< T3,Tag > l3; typedef lambda< T4,Tag > l4; typedef typename l1::is_le is_le1; typedef typename l2::is_le is_le2; typedef typename l3::is_le is_le3; typedef typename l4::is_le is_le4; typedef typename aux::lambda_or< is_le1::value, is_le2::value, is_le3::value, is_le4::value >::type is_le; typedef aux::le_result4< is_le, Tag, F, l1, l2, l3, l4 > le_result_; typedef typename le_result_::result_ result_; typedef typename le_result_::type type; }; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename Tag > struct lambda< bind4< F,T1,T2,T3,T4 > , Tag > { typedef false_ is_le; typedef bind4< F , T1, T2, T3, T4 > result_; typedef result_ type; }; namespace aux { template< typename IsLE, typename Tag , template< typename P1, typename P2, typename P3, typename P4, typename P5 > class F , typename L1, typename L2, typename L3, typename L4, typename L5 > struct le_result5 { typedef F< typename L1::type, typename L2::type, typename L3::type , typename L4::type, typename L5::type > result_; typedef result_ type; }; template< typename Tag , template< typename P1, typename P2, typename P3, typename P4, typename P5 > class F , typename L1, typename L2, typename L3, typename L4, typename L5 > struct le_result5< true_,Tag,F,L1,L2,L3,L4,L5 > { typedef bind5< quote5< F,Tag > , typename L1::result_, typename L2::result_, typename L3::result_ , typename L4::result_, typename L5::result_ > result_; typedef mpl::protect type; }; } // namespace aux template< template< typename P1, typename P2, typename P3, typename P4 , typename P5 > class F , typename T1, typename T2, typename T3, typename T4, typename T5 , typename Tag > struct lambda< F< T1,T2,T3,T4,T5 > , Tag > { typedef lambda< T1,Tag > l1; typedef lambda< T2,Tag > l2; typedef lambda< T3,Tag > l3; typedef lambda< T4,Tag > l4; typedef lambda< T5,Tag > l5; typedef typename l1::is_le is_le1; typedef typename l2::is_le is_le2; typedef typename l3::is_le is_le3; typedef typename l4::is_le is_le4; typedef typename l5::is_le is_le5; typedef typename aux::lambda_or< is_le1::value, is_le2::value, is_le3::value, is_le4::value , is_le5::value >::type is_le; typedef aux::le_result5< is_le, Tag, F, l1, l2, l3, l4, l5 > le_result_; typedef typename le_result_::result_ result_; typedef typename le_result_::type type; }; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 , typename Tag > struct lambda< bind5< F,T1,T2,T3,T4,T5 > , Tag > { typedef false_ is_le; typedef bind5< F , T1, T2, T3, T4, T5 > result_; typedef result_ type; }; /// special case for 'protect' template< typename T, typename Tag > struct lambda< mpl::protect, Tag > { typedef false_ is_le; typedef mpl::protect result_; typedef result_ type; }; /// specializations for the main 'bind' form template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 , typename Tag > struct lambda< bind< F,T1,T2,T3,T4,T5 > , Tag > { typedef false_ is_le; typedef bind< F,T1,T2,T3,T4,T5 > result_; typedef result_ type; }; /// workaround for MWCW 8.3+/EDG < 303, leads to ambiguity on Digital Mars template< typename F, typename Tag1, typename Tag2 > struct lambda< lambda< F,Tag1 > , Tag2 > { typedef lambda< F,Tag2 > l1; typedef lambda< Tag1,Tag2 > l2; typedef typename l1::is_le is_le; typedef aux::le_result2 le_result_; typedef typename le_result_::result_ result_; typedef typename le_result_::type type; }; BOOST_MPL_AUX_NA_SPEC(2, lambda) }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/mwcw/greater.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/greater.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct greater_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< greater_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< greater_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct greater_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct greater_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct greater_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct greater_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct greater : greater_impl< typename greater_tag::type , typename greater_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, greater, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 2, greater) }} namespace boost { namespace mpl { template<> struct greater_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value > BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/mwcw/greater_equal.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/greater_equal.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct greater_equal_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< greater_equal_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< greater_equal_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct greater_equal_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct greater_equal_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct greater_equal_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct greater_equal_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct greater_equal : greater_equal_impl< typename greater_equal_tag::type , typename greater_equal_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, greater_equal, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 2, greater_equal) }} namespace boost { namespace mpl { template<> struct greater_equal_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value >= BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/mwcw/inherit.hpp ================================================ // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/inherit.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename BOOST_MPL_AUX_NA_PARAM(T1) , typename BOOST_MPL_AUX_NA_PARAM(T2) > struct inherit2 : T1, T2 { typedef inherit2 type; BOOST_MPL_AUX_LAMBDA_SUPPORT(2, inherit2, (T1, T2)) }; template< typename T1 > struct inherit2< T1,empty_base > { typedef T1 type; BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(2, inherit2, (T1, empty_base)) }; template< typename T2 > struct inherit2< empty_base,T2 > { typedef T2 type; BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(2, inherit2, (empty_base, T2)) }; template<> struct inherit2< empty_base,empty_base > { typedef empty_base type; BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(2, inherit2, (empty_base, empty_base)) }; BOOST_MPL_AUX_NA_SPEC(2, inherit2) template< typename T1 = na, typename T2 = na, typename T3 = na > struct inherit3 : inherit2< typename inherit2< T1, T2 >::type , T3 > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 3 , inherit3 , ( T1, T2, T3) ) }; BOOST_MPL_AUX_NA_SPEC(3, inherit3) template< typename T1 = na, typename T2 = na, typename T3 = na, typename T4 = na > struct inherit4 : inherit2< typename inherit3< T1, T2, T3 >::type , T4 > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 4 , inherit4 , ( T1, T2, T3, T4) ) }; BOOST_MPL_AUX_NA_SPEC(4, inherit4) template< typename T1 = na, typename T2 = na, typename T3 = na, typename T4 = na , typename T5 = na > struct inherit5 : inherit2< typename inherit4< T1, T2, T3, T4 >::type , T5 > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , inherit5 , ( T1, T2, T3, T4, T5) ) }; BOOST_MPL_AUX_NA_SPEC(5, inherit5) /// primary template template< typename T1 = empty_base, typename T2 = empty_base , typename T3 = empty_base, typename T4 = empty_base , typename T5 = empty_base > struct inherit : inherit5< T1,T2,T3,T4,T5 > { }; template<> struct inherit< na,na,na,na,na > { template< typename T1 = empty_base, typename T2 = empty_base , typename T3 = empty_base, typename T4 = empty_base , typename T5 = empty_base > struct apply : inherit< T1,T2,T3,T4,T5 > { }; }; BOOST_MPL_AUX_NA_SPEC_LAMBDA(5, inherit) BOOST_MPL_AUX_NA_SPEC_ARITY(5, inherit) BOOST_MPL_AUX_NA_SPEC_TEMPLATE_ARITY(5, 5, inherit) }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/mwcw/iter_fold_if_impl.hpp ================================================ // Copyright Aleksey Gurtovoy 2001-2004 // Copyright David Abrahams 2001-2002 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/aux_/iter_fold_if_impl.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< typename Iterator, typename State > struct iter_fold_if_null_step { typedef State state; typedef Iterator iterator; }; template< bool > struct iter_fold_if_step_impl { template< typename Iterator , typename State , typename StateOp , typename IteratorOp > struct result_ { typedef typename apply2< StateOp,State,Iterator >::type state; typedef typename IteratorOp::type iterator; }; }; template<> struct iter_fold_if_step_impl { template< typename Iterator , typename State , typename StateOp , typename IteratorOp > struct result_ { typedef State state; typedef Iterator iterator; }; }; template< typename Iterator , typename State , typename ForwardOp , typename Predicate > struct iter_fold_if_forward_step { typedef typename apply2< Predicate,State,Iterator >::type not_last; typedef typename iter_fold_if_step_impl< BOOST_MPL_AUX_MSVC_VALUE_WKND(not_last)::value >::template result_< Iterator,State,ForwardOp, mpl::next > impl_; typedef typename impl_::state state; typedef typename impl_::iterator iterator; }; template< typename Iterator , typename State , typename BackwardOp , typename Predicate > struct iter_fold_if_backward_step { typedef typename apply2< Predicate,State,Iterator >::type not_last; typedef typename iter_fold_if_step_impl< BOOST_MPL_AUX_MSVC_VALUE_WKND(not_last)::value >::template result_< Iterator,State,BackwardOp, identity > impl_; typedef typename impl_::state state; typedef typename impl_::iterator iterator; }; template< typename Iterator , typename State , typename ForwardOp , typename ForwardPredicate , typename BackwardOp , typename BackwardPredicate > struct iter_fold_if_impl { private: typedef iter_fold_if_null_step< Iterator,State > forward_step0; typedef iter_fold_if_forward_step< typename forward_step0::iterator, typename forward_step0::state, ForwardOp, ForwardPredicate > forward_step1; typedef iter_fold_if_forward_step< typename forward_step1::iterator, typename forward_step1::state, ForwardOp, ForwardPredicate > forward_step2; typedef iter_fold_if_forward_step< typename forward_step2::iterator, typename forward_step2::state, ForwardOp, ForwardPredicate > forward_step3; typedef iter_fold_if_forward_step< typename forward_step3::iterator, typename forward_step3::state, ForwardOp, ForwardPredicate > forward_step4; typedef typename if_< typename forward_step4::not_last , iter_fold_if_impl< typename forward_step4::iterator , typename forward_step4::state , ForwardOp , ForwardPredicate , BackwardOp , BackwardPredicate > , iter_fold_if_null_step< typename forward_step4::iterator , typename forward_step4::state > >::type backward_step4; typedef iter_fold_if_backward_step< typename forward_step3::iterator, typename backward_step4::state, BackwardOp, BackwardPredicate > backward_step3; typedef iter_fold_if_backward_step< typename forward_step2::iterator, typename backward_step3::state, BackwardOp, BackwardPredicate > backward_step2; typedef iter_fold_if_backward_step< typename forward_step1::iterator, typename backward_step2::state, BackwardOp, BackwardPredicate > backward_step1; typedef iter_fold_if_backward_step< typename forward_step0::iterator, typename backward_step1::state, BackwardOp, BackwardPredicate > backward_step0; public: typedef typename backward_step0::state state; typedef typename backward_step4::iterator iterator; }; }}} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/mwcw/iter_fold_impl.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/aux_/iter_fold_impl.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { /// forward declaration template< int N , typename First , typename Last , typename State , typename ForwardOp > struct iter_fold_impl; template< typename First , typename Last , typename State , typename ForwardOp > struct iter_fold_impl< 0,First,Last,State,ForwardOp > { typedef First iter0; typedef State state0; typedef state0 state; typedef iter0 iterator; }; template< typename First , typename Last , typename State , typename ForwardOp > struct iter_fold_impl< 1,First,Last,State,ForwardOp > { typedef First iter0; typedef State state0; typedef typename apply2< ForwardOp,state0,iter0 >::type state1; typedef typename mpl::next::type iter1; typedef state1 state; typedef iter1 iterator; }; template< typename First , typename Last , typename State , typename ForwardOp > struct iter_fold_impl< 2,First,Last,State,ForwardOp > { typedef First iter0; typedef State state0; typedef typename apply2< ForwardOp,state0,iter0 >::type state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp,state1,iter1 >::type state2; typedef typename mpl::next::type iter2; typedef state2 state; typedef iter2 iterator; }; template< typename First , typename Last , typename State , typename ForwardOp > struct iter_fold_impl< 3,First,Last,State,ForwardOp > { typedef First iter0; typedef State state0; typedef typename apply2< ForwardOp,state0,iter0 >::type state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp,state1,iter1 >::type state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp,state2,iter2 >::type state3; typedef typename mpl::next::type iter3; typedef state3 state; typedef iter3 iterator; }; template< typename First , typename Last , typename State , typename ForwardOp > struct iter_fold_impl< 4,First,Last,State,ForwardOp > { typedef First iter0; typedef State state0; typedef typename apply2< ForwardOp,state0,iter0 >::type state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp,state1,iter1 >::type state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp,state2,iter2 >::type state3; typedef typename mpl::next::type iter3; typedef typename apply2< ForwardOp,state3,iter3 >::type state4; typedef typename mpl::next::type iter4; typedef state4 state; typedef iter4 iterator; }; template< int N , typename First , typename Last , typename State , typename ForwardOp > struct iter_fold_impl { typedef iter_fold_impl< 4 , First , Last , State , ForwardOp > chunk_; typedef iter_fold_impl< ( (N - 4) < 0 ? 0 : N - 4 ) , typename chunk_::iterator , Last , typename chunk_::state , ForwardOp > res_; typedef typename res_::state state; typedef typename res_::iterator iterator; }; template< typename First , typename Last , typename State , typename ForwardOp > struct iter_fold_impl< -1,First,Last,State,ForwardOp > : iter_fold_impl< -1 , typename mpl::next::type , Last , typename apply2< ForwardOp,State,First >::type , ForwardOp > { }; template< typename Last , typename State , typename ForwardOp > struct iter_fold_impl< -1,Last,Last,State,ForwardOp > { typedef State state; typedef Last iterator; }; }}} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/mwcw/lambda_no_ctps.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/aux_/lambda_no_ctps.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< bool C1 = false, bool C2 = false, bool C3 = false, bool C4 = false , bool C5 = false > struct lambda_or : true_ { }; template<> struct lambda_or< false,false,false,false,false > : false_ { }; template< typename Arity > struct lambda_impl { template< typename T, typename Tag, typename Protect > struct result_ { typedef T type; typedef is_placeholder is_le; }; }; template<> struct lambda_impl< int_<1> > { template< typename F, typename Tag, typename Protect > struct result_ { typedef lambda< typename F::arg1, Tag, false_ > l1; typedef typename l1::is_le is_le1; typedef aux::lambda_or< BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value > is_le; typedef bind1< typename F::rebind , typename l1::type > bind_; typedef typename if_< is_le , if_< Protect, mpl::protect, bind_ > , identity >::type type_; typedef typename type_::type type; }; }; template<> struct lambda_impl< int_<2> > { template< typename F, typename Tag, typename Protect > struct result_ { typedef lambda< typename F::arg1, Tag, false_ > l1; typedef lambda< typename F::arg2, Tag, false_ > l2; typedef typename l1::is_le is_le1; typedef typename l2::is_le is_le2; typedef aux::lambda_or< BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value > is_le; typedef bind2< typename F::rebind , typename l1::type, typename l2::type > bind_; typedef typename if_< is_le , if_< Protect, mpl::protect, bind_ > , identity >::type type_; typedef typename type_::type type; }; }; template<> struct lambda_impl< int_<3> > { template< typename F, typename Tag, typename Protect > struct result_ { typedef lambda< typename F::arg1, Tag, false_ > l1; typedef lambda< typename F::arg2, Tag, false_ > l2; typedef lambda< typename F::arg3, Tag, false_ > l3; typedef typename l1::is_le is_le1; typedef typename l2::is_le is_le2; typedef typename l3::is_le is_le3; typedef aux::lambda_or< BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le3)::value > is_le; typedef bind3< typename F::rebind , typename l1::type, typename l2::type, typename l3::type > bind_; typedef typename if_< is_le , if_< Protect, mpl::protect, bind_ > , identity >::type type_; typedef typename type_::type type; }; }; template<> struct lambda_impl< int_<4> > { template< typename F, typename Tag, typename Protect > struct result_ { typedef lambda< typename F::arg1, Tag, false_ > l1; typedef lambda< typename F::arg2, Tag, false_ > l2; typedef lambda< typename F::arg3, Tag, false_ > l3; typedef lambda< typename F::arg4, Tag, false_ > l4; typedef typename l1::is_le is_le1; typedef typename l2::is_le is_le2; typedef typename l3::is_le is_le3; typedef typename l4::is_le is_le4; typedef aux::lambda_or< BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le3)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le4)::value > is_le; typedef bind4< typename F::rebind , typename l1::type, typename l2::type, typename l3::type , typename l4::type > bind_; typedef typename if_< is_le , if_< Protect, mpl::protect, bind_ > , identity >::type type_; typedef typename type_::type type; }; }; template<> struct lambda_impl< int_<5> > { template< typename F, typename Tag, typename Protect > struct result_ { typedef lambda< typename F::arg1, Tag, false_ > l1; typedef lambda< typename F::arg2, Tag, false_ > l2; typedef lambda< typename F::arg3, Tag, false_ > l3; typedef lambda< typename F::arg4, Tag, false_ > l4; typedef lambda< typename F::arg5, Tag, false_ > l5; typedef typename l1::is_le is_le1; typedef typename l2::is_le is_le2; typedef typename l3::is_le is_le3; typedef typename l4::is_le is_le4; typedef typename l5::is_le is_le5; typedef aux::lambda_or< BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le3)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le4)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le5)::value > is_le; typedef bind5< typename F::rebind , typename l1::type, typename l2::type, typename l3::type , typename l4::type, typename l5::type > bind_; typedef typename if_< is_le , if_< Protect, mpl::protect, bind_ > , identity >::type type_; typedef typename type_::type type; }; }; } // namespace aux template< typename T , typename Tag , typename Protect > struct lambda { /// Metafunction forwarding confuses MSVC 6.x typedef typename aux::template_arity::type arity_; typedef typename aux::lambda_impl ::template result_< T,Tag,Protect > l_; typedef typename l_::type type; typedef typename l_::is_le is_le; BOOST_MPL_AUX_LAMBDA_SUPPORT(3, lambda, (T, Tag, Protect)) }; BOOST_MPL_AUX_NA_SPEC2(1, 3, lambda) template< typename T > struct is_lambda_expression : lambda::is_le { }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/mwcw/less.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/less.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct less_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< less_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< less_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct less_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct less_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct less_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct less_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct less : less_impl< typename less_tag::type , typename less_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, less, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 2, less) }} namespace boost { namespace mpl { template<> struct less_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N2)::value > BOOST_MPL_AUX_VALUE_WKND(N1)::value ) > { }; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/mwcw/less_equal.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/less_equal.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct less_equal_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< less_equal_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< less_equal_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct less_equal_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct less_equal_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct less_equal_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct less_equal_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct less_equal : less_equal_impl< typename less_equal_tag::type , typename less_equal_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, less_equal, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 2, less_equal) }} namespace boost { namespace mpl { template<> struct less_equal_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value <= BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/mwcw/list.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/list.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na , typename T12 = na, typename T13 = na, typename T14 = na , typename T15 = na, typename T16 = na, typename T17 = na , typename T18 = na, typename T19 = na > struct list; template< > struct list< na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : list0< > { typedef list0< >::type type; }; template< typename T0 > struct list< T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : list1 { typedef typename list1::type type; }; template< typename T0, typename T1 > struct list< T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : list2< T0,T1 > { typedef typename list2< T0,T1 >::type type; }; template< typename T0, typename T1, typename T2 > struct list< T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : list3< T0,T1,T2 > { typedef typename list3< T0,T1,T2 >::type type; }; template< typename T0, typename T1, typename T2, typename T3 > struct list< T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : list4< T0,T1,T2,T3 > { typedef typename list4< T0,T1,T2,T3 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 > struct list< T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : list5< T0,T1,T2,T3,T4 > { typedef typename list5< T0,T1,T2,T3,T4 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct list< T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : list6< T0,T1,T2,T3,T4,T5 > { typedef typename list6< T0,T1,T2,T3,T4,T5 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6 > struct list< T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na , na, na, na > : list7< T0,T1,T2,T3,T4,T5,T6 > { typedef typename list7< T0,T1,T2,T3,T4,T5,T6 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7 > struct list< T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na , na, na, na > : list8< T0,T1,T2,T3,T4,T5,T6,T7 > { typedef typename list8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8 > struct list< T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na , na, na, na > : list9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > { typedef typename list9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 > struct list< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na , na, na, na > : list10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > { typedef typename list10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10 > struct list< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na , na, na, na > : list11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > { typedef typename list11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11 > struct list< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na , na, na, na, na > : list12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > { typedef typename list12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12 > struct list< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na , na, na, na, na > : list13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > { typedef typename list13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13 > struct list< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na , na, na, na, na > : list14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > { typedef typename list14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 > struct list< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na , na, na, na, na > : list15< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 > { typedef typename list15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15 > struct list< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, na, na, na, na > : list16< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15 > { typedef typename list16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16 > struct list< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, na, na, na > : list17< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16 > { typedef typename list17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17 > struct list< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, na, na > : list18< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17 > { typedef typename list18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18 > struct list< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18, na > : list19< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18 > { typedef typename list19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type; }; /// primary template (not a specialization!) template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct list : list20< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18, T19 > { typedef typename list20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/mwcw/list_c.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/list_c.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename T, long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX , long C3 = LONG_MAX, long C4 = LONG_MAX, long C5 = LONG_MAX , long C6 = LONG_MAX, long C7 = LONG_MAX, long C8 = LONG_MAX , long C9 = LONG_MAX, long C10 = LONG_MAX, long C11 = LONG_MAX , long C12 = LONG_MAX, long C13 = LONG_MAX, long C14 = LONG_MAX , long C15 = LONG_MAX, long C16 = LONG_MAX, long C17 = LONG_MAX , long C18 = LONG_MAX, long C19 = LONG_MAX > struct list_c; template< typename T > struct list_c< T, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list0_c { typedef typename list0_c::type type; }; template< typename T, long C0 > struct list_c< T, C0, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list1_c< T,C0 > { typedef typename list1_c< T,C0 >::type type; }; template< typename T, long C0, long C1 > struct list_c< T, C0, C1, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list2_c< T,C0,C1 > { typedef typename list2_c< T,C0,C1 >::type type; }; template< typename T, long C0, long C1, long C2 > struct list_c< T, C0, C1, C2, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list3_c< T,C0,C1,C2 > { typedef typename list3_c< T,C0,C1,C2 >::type type; }; template< typename T, long C0, long C1, long C2, long C3 > struct list_c< T, C0, C1, C2, C3, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list4_c< T,C0,C1,C2,C3 > { typedef typename list4_c< T,C0,C1,C2,C3 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4 > struct list_c< T, C0, C1, C2, C3, C4, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list5_c< T,C0,C1,C2,C3,C4 > { typedef typename list5_c< T,C0,C1,C2,C3,C4 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 > struct list_c< T, C0, C1, C2, C3, C4, C5, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX > : list6_c< T,C0,C1,C2,C3,C4,C5 > { typedef typename list6_c< T,C0,C1,C2,C3,C4,C5 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX > : list7_c< T,C0,C1,C2,C3,C4,C5,C6 > { typedef typename list7_c< T,C0,C1,C2,C3,C4,C5,C6 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, C7, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX > : list8_c< T,C0,C1,C2,C3,C4,C5,C6,C7 > { typedef typename list8_c< T,C0,C1,C2,C3,C4,C5,C6,C7 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX > : list9_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8 > { typedef typename list9_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX > : list10_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 > { typedef typename list10_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list11_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 > { typedef typename list11_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list12_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 > { typedef typename list12_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list13_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 > { typedef typename list13_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list14_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 > { typedef typename list14_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list15_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 > { typedef typename list15_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list16_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15 > { typedef typename list16_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, LONG_MAX, LONG_MAX, LONG_MAX > : list17_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16 > { typedef typename list17_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, C17, LONG_MAX, LONG_MAX > : list18_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, C17 > { typedef typename list18_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, C17, C18, LONG_MAX > : list19_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, C17, C18 > { typedef typename list19_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18 >::type type; }; /// primary template (not a specialization!) template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct list_c : list20_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, C17, C18, C19 > { typedef typename list20_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19 >::type type; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/mwcw/map.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/map.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na , typename T12 = na, typename T13 = na, typename T14 = na , typename T15 = na, typename T16 = na, typename T17 = na , typename T18 = na, typename T19 = na > struct map; template< > struct map< na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : map0< > { typedef map0< >::type type; }; template< typename T0 > struct map< T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : map1 { typedef typename map1::type type; }; template< typename T0, typename T1 > struct map< T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : map2< T0,T1 > { typedef typename map2< T0,T1 >::type type; }; template< typename T0, typename T1, typename T2 > struct map< T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : map3< T0,T1,T2 > { typedef typename map3< T0,T1,T2 >::type type; }; template< typename T0, typename T1, typename T2, typename T3 > struct map< T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : map4< T0,T1,T2,T3 > { typedef typename map4< T0,T1,T2,T3 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 > struct map< T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : map5< T0,T1,T2,T3,T4 > { typedef typename map5< T0,T1,T2,T3,T4 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct map< T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : map6< T0,T1,T2,T3,T4,T5 > { typedef typename map6< T0,T1,T2,T3,T4,T5 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6 > struct map< T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na , na, na, na > : map7< T0,T1,T2,T3,T4,T5,T6 > { typedef typename map7< T0,T1,T2,T3,T4,T5,T6 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7 > struct map< T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na , na, na, na > : map8< T0,T1,T2,T3,T4,T5,T6,T7 > { typedef typename map8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8 > struct map< T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na , na, na, na > : map9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > { typedef typename map9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 > struct map< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na , na, na, na > : map10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > { typedef typename map10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10 > struct map< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na , na, na, na > : map11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > { typedef typename map11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11 > struct map< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na , na, na, na, na > : map12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > { typedef typename map12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12 > struct map< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na , na, na, na, na > : map13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > { typedef typename map13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13 > struct map< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na , na, na, na, na > : map14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > { typedef typename map14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 > struct map< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na , na, na, na, na > : map15< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 > { typedef typename map15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15 > struct map< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, na, na, na, na > : map16< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15 > { typedef typename map16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16 > struct map< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, na, na, na > : map17< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16 > { typedef typename map17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17 > struct map< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, na, na > : map18< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17 > { typedef typename map18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18 > struct map< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18, na > : map19< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18 > { typedef typename map19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type; }; /// primary template (not a specialization!) template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct map : map20< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18, T19 > { typedef typename map20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/mwcw/minus.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/minus.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct minus_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< minus_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< minus_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct minus_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct minus_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct minus_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct minus_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) , typename N3 = na, typename N4 = na, typename N5 = na > struct minus : minus< minus< minus< minus< N1,N2 >, N3>, N4>, N5> { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , minus , ( N1, N2, N3, N4, N5 ) ) }; template< typename N1, typename N2, typename N3, typename N4 > struct minus< N1,N2,N3,N4,na > : minus< minus< minus< N1,N2 >, N3>, N4> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , minus , ( N1, N2, N3, N4, na ) ) }; template< typename N1, typename N2, typename N3 > struct minus< N1,N2,N3,na,na > : minus< minus< N1,N2 >, N3> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , minus , ( N1, N2, N3, na, na ) ) }; template< typename N1, typename N2 > struct minus< N1,N2,na,na,na > : minus_impl< typename minus_tag::type , typename minus_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , minus , ( N1, N2, na, na, na ) ) }; BOOST_MPL_AUX_NA_SPEC2(2, 5, minus) }} namespace boost { namespace mpl { template<> struct minus_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : integral_c< typename aux::largest_int< typename N1::value_type , typename N2::value_type >::type , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value - BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/mwcw/modulus.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/modulus.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct modulus_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< modulus_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< modulus_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct modulus_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct modulus_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct modulus_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct modulus_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct modulus : modulus_impl< typename modulus_tag::type , typename modulus_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, modulus, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 2, modulus) }} namespace boost { namespace mpl { template<> struct modulus_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : integral_c< typename aux::largest_int< typename N1::value_type , typename N2::value_type >::type , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value % BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/mwcw/not_equal_to.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/not_equal_to.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct not_equal_to_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< not_equal_to_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< not_equal_to_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct not_equal_to_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct not_equal_to_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct not_equal_to_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct not_equal_to_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct not_equal_to : not_equal_to_impl< typename not_equal_to_tag::type , typename not_equal_to_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, not_equal_to, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 2, not_equal_to) }} namespace boost { namespace mpl { template<> struct not_equal_to_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value != BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/mwcw/or.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/or.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< bool C_, typename T1, typename T2, typename T3, typename T4 > struct or_impl : true_ { }; template< typename T1, typename T2, typename T3, typename T4 > struct or_impl< false,T1,T2,T3,T4 > : or_impl< BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value , T2, T3, T4 , false_ > { }; template<> struct or_impl< false , false_, false_, false_, false_ > : false_ { }; } // namespace aux template< typename BOOST_MPL_AUX_NA_PARAM(T1) , typename BOOST_MPL_AUX_NA_PARAM(T2) , typename T3 = false_, typename T4 = false_, typename T5 = false_ > struct or_ : aux::or_impl< BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value , T2, T3, T4, T5 > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , or_ , ( T1, T2, T3, T4, T5) ) }; BOOST_MPL_AUX_NA_SPEC2( 2 , 5 , or_ ) }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/mwcw/placeholders.hpp ================================================ // Copyright Aleksey Gurtovoy 2001-2004 // Copyright Peter Dimov 2001-2003 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/placeholders.hpp" header // -- DO NOT modify by hand! BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg< -1 > _; BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE namespace boost { namespace mpl { BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_) namespace placeholders { using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_; } }} /// agurt, 17/mar/02: one more placeholder for the last 'apply#' /// specialization BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg<1> _1; BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE namespace boost { namespace mpl { BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_1) namespace placeholders { using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_1; } }} BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg<2> _2; BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE namespace boost { namespace mpl { BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_2) namespace placeholders { using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_2; } }} BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg<3> _3; BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE namespace boost { namespace mpl { BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_3) namespace placeholders { using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_3; } }} BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg<4> _4; BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE namespace boost { namespace mpl { BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_4) namespace placeholders { using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_4; } }} BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg<5> _5; BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE namespace boost { namespace mpl { BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_5) namespace placeholders { using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_5; } }} BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg<6> _6; BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE namespace boost { namespace mpl { BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_6) namespace placeholders { using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_6; } }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/mwcw/plus.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/plus.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct plus_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< plus_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< plus_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct plus_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct plus_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct plus_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct plus_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) , typename N3 = na, typename N4 = na, typename N5 = na > struct plus : plus< plus< plus< plus< N1,N2 >, N3>, N4>, N5> { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , plus , ( N1, N2, N3, N4, N5 ) ) }; template< typename N1, typename N2, typename N3, typename N4 > struct plus< N1,N2,N3,N4,na > : plus< plus< plus< N1,N2 >, N3>, N4> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , plus , ( N1, N2, N3, N4, na ) ) }; template< typename N1, typename N2, typename N3 > struct plus< N1,N2,N3,na,na > : plus< plus< N1,N2 >, N3> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , plus , ( N1, N2, N3, na, na ) ) }; template< typename N1, typename N2 > struct plus< N1,N2,na,na,na > : plus_impl< typename plus_tag::type , typename plus_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , plus , ( N1, N2, na, na, na ) ) }; BOOST_MPL_AUX_NA_SPEC2(2, 5, plus) }} namespace boost { namespace mpl { template<> struct plus_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : integral_c< typename aux::largest_int< typename N1::value_type , typename N2::value_type >::type , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/mwcw/quote.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/quote.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename T, bool has_type_ > struct quote_impl : T { }; template< typename T > struct quote_impl< T,false > { typedef T type; }; template< template< typename P1 > class F , typename Tag = void_ > struct quote1 { template< typename U1 > struct apply : quote_impl< F , aux::has_type< F >::value > { }; }; template< template< typename P1, typename P2 > class F , typename Tag = void_ > struct quote2 { template< typename U1, typename U2 > struct apply : quote_impl< F< U1,U2 > , aux::has_type< F< U1,U2 > >::value > { }; }; template< template< typename P1, typename P2, typename P3 > class F , typename Tag = void_ > struct quote3 { template< typename U1, typename U2, typename U3 > struct apply : quote_impl< F< U1,U2,U3 > , aux::has_type< F< U1,U2,U3 > >::value > { }; }; template< template< typename P1, typename P2, typename P3, typename P4 > class F , typename Tag = void_ > struct quote4 { template< typename U1, typename U2, typename U3, typename U4 > struct apply : quote_impl< F< U1,U2,U3,U4 > , aux::has_type< F< U1,U2,U3,U4 > >::value > { }; }; template< template< typename P1, typename P2, typename P3, typename P4 , typename P5 > class F , typename Tag = void_ > struct quote5 { template< typename U1, typename U2, typename U3, typename U4 , typename U5 > struct apply : quote_impl< F< U1,U2,U3,U4,U5 > , aux::has_type< F< U1,U2,U3,U4,U5 > >::value > { }; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/mwcw/reverse_fold_impl.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/aux_/reverse_fold_impl.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { /// forward declaration template< long N , typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_fold_impl; template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_fold_impl< 0,First,Last,State,BackwardOp,ForwardOp > { typedef First iter0; typedef State fwd_state0; typedef fwd_state0 bkwd_state0; typedef bkwd_state0 state; typedef iter0 iterator; }; template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_fold_impl< 1,First,Last,State,BackwardOp,ForwardOp > { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; typedef typename mpl::next::type iter1; typedef fwd_state1 bkwd_state1; typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; typedef bkwd_state0 state; typedef iter1 iterator; }; template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_fold_impl< 2,First,Last,State,BackwardOp,ForwardOp > { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp, fwd_state1, typename deref::type >::type fwd_state2; typedef typename mpl::next::type iter2; typedef fwd_state2 bkwd_state2; typedef typename apply2< BackwardOp, bkwd_state2, typename deref::type >::type bkwd_state1; typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; typedef bkwd_state0 state; typedef iter2 iterator; }; template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_fold_impl< 3,First,Last,State,BackwardOp,ForwardOp > { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp, fwd_state1, typename deref::type >::type fwd_state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp, fwd_state2, typename deref::type >::type fwd_state3; typedef typename mpl::next::type iter3; typedef fwd_state3 bkwd_state3; typedef typename apply2< BackwardOp, bkwd_state3, typename deref::type >::type bkwd_state2; typedef typename apply2< BackwardOp, bkwd_state2, typename deref::type >::type bkwd_state1; typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; typedef bkwd_state0 state; typedef iter3 iterator; }; template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_fold_impl< 4,First,Last,State,BackwardOp,ForwardOp > { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp, fwd_state1, typename deref::type >::type fwd_state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp, fwd_state2, typename deref::type >::type fwd_state3; typedef typename mpl::next::type iter3; typedef typename apply2< ForwardOp, fwd_state3, typename deref::type >::type fwd_state4; typedef typename mpl::next::type iter4; typedef fwd_state4 bkwd_state4; typedef typename apply2< BackwardOp, bkwd_state4, typename deref::type >::type bkwd_state3; typedef typename apply2< BackwardOp, bkwd_state3, typename deref::type >::type bkwd_state2; typedef typename apply2< BackwardOp, bkwd_state2, typename deref::type >::type bkwd_state1; typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; typedef bkwd_state0 state; typedef iter4 iterator; }; template< long N , typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_fold_impl { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp, fwd_state1, typename deref::type >::type fwd_state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp, fwd_state2, typename deref::type >::type fwd_state3; typedef typename mpl::next::type iter3; typedef typename apply2< ForwardOp, fwd_state3, typename deref::type >::type fwd_state4; typedef typename mpl::next::type iter4; typedef reverse_fold_impl< ( (N - 4) < 0 ? 0 : N - 4 ) , iter4 , Last , fwd_state4 , BackwardOp , ForwardOp > nested_chunk; typedef typename nested_chunk::state bkwd_state4; typedef typename apply2< BackwardOp, bkwd_state4, typename deref::type >::type bkwd_state3; typedef typename apply2< BackwardOp, bkwd_state3, typename deref::type >::type bkwd_state2; typedef typename apply2< BackwardOp, bkwd_state2, typename deref::type >::type bkwd_state1; typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; typedef bkwd_state0 state; typedef typename nested_chunk::iterator iterator; }; template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_fold_impl< -1,First,Last,State,BackwardOp,ForwardOp > { typedef reverse_fold_impl< -1 , typename mpl::next::type , Last , typename apply2::type>::type , BackwardOp , ForwardOp > nested_step; typedef typename apply2< BackwardOp , typename nested_step::state , typename deref::type >::type state; typedef typename nested_step::iterator iterator; }; template< typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_fold_impl< -1,Last,Last,State,BackwardOp,ForwardOp > { typedef State state; typedef Last iterator; }; }}} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/mwcw/reverse_iter_fold_impl.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/aux_/reverse_iter_fold_impl.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { /// forward declaration template< long N , typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_iter_fold_impl; template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_iter_fold_impl< 0,First,Last,State,BackwardOp,ForwardOp > { typedef First iter0; typedef State fwd_state0; typedef fwd_state0 bkwd_state0; typedef bkwd_state0 state; typedef iter0 iterator; }; template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_iter_fold_impl< 1,First,Last,State,BackwardOp,ForwardOp > { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; typedef typename mpl::next::type iter1; typedef fwd_state1 bkwd_state1; typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; typedef bkwd_state0 state; typedef iter1 iterator; }; template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_iter_fold_impl< 2,First,Last,State,BackwardOp,ForwardOp > { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; typedef typename mpl::next::type iter2; typedef fwd_state2 bkwd_state2; typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1; typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; typedef bkwd_state0 state; typedef iter2 iterator; }; template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_iter_fold_impl< 3,First,Last,State,BackwardOp,ForwardOp > { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp,fwd_state2,iter2 >::type fwd_state3; typedef typename mpl::next::type iter3; typedef fwd_state3 bkwd_state3; typedef typename apply2< BackwardOp,bkwd_state3,iter2 >::type bkwd_state2; typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1; typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; typedef bkwd_state0 state; typedef iter3 iterator; }; template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_iter_fold_impl< 4,First,Last,State,BackwardOp,ForwardOp > { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp,fwd_state2,iter2 >::type fwd_state3; typedef typename mpl::next::type iter3; typedef typename apply2< ForwardOp,fwd_state3,iter3 >::type fwd_state4; typedef typename mpl::next::type iter4; typedef fwd_state4 bkwd_state4; typedef typename apply2< BackwardOp,bkwd_state4,iter3 >::type bkwd_state3; typedef typename apply2< BackwardOp,bkwd_state3,iter2 >::type bkwd_state2; typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1; typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; typedef bkwd_state0 state; typedef iter4 iterator; }; template< long N , typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_iter_fold_impl { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp,fwd_state2,iter2 >::type fwd_state3; typedef typename mpl::next::type iter3; typedef typename apply2< ForwardOp,fwd_state3,iter3 >::type fwd_state4; typedef typename mpl::next::type iter4; typedef reverse_iter_fold_impl< ( (N - 4) < 0 ? 0 : N - 4 ) , iter4 , Last , fwd_state4 , BackwardOp , ForwardOp > nested_chunk; typedef typename nested_chunk::state bkwd_state4; typedef typename apply2< BackwardOp,bkwd_state4,iter3 >::type bkwd_state3; typedef typename apply2< BackwardOp,bkwd_state3,iter2 >::type bkwd_state2; typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1; typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; typedef bkwd_state0 state; typedef typename nested_chunk::iterator iterator; }; template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_iter_fold_impl< -1,First,Last,State,BackwardOp,ForwardOp > { typedef reverse_iter_fold_impl< -1 , typename mpl::next::type , Last , typename apply2< ForwardOp,State,First >::type , BackwardOp , ForwardOp > nested_step; typedef typename apply2< BackwardOp , typename nested_step::state , First >::type state; typedef typename nested_step::iterator iterator; }; template< typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_iter_fold_impl< -1,Last,Last,State,BackwardOp,ForwardOp > { typedef State state; typedef Last iterator; }; }}} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/mwcw/set.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/set.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na , typename T12 = na, typename T13 = na, typename T14 = na , typename T15 = na, typename T16 = na, typename T17 = na , typename T18 = na, typename T19 = na > struct set; template< > struct set< na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : set0< > { typedef set0< >::type type; }; template< typename T0 > struct set< T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : set1 { typedef typename set1::type type; }; template< typename T0, typename T1 > struct set< T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : set2< T0,T1 > { typedef typename set2< T0,T1 >::type type; }; template< typename T0, typename T1, typename T2 > struct set< T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : set3< T0,T1,T2 > { typedef typename set3< T0,T1,T2 >::type type; }; template< typename T0, typename T1, typename T2, typename T3 > struct set< T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : set4< T0,T1,T2,T3 > { typedef typename set4< T0,T1,T2,T3 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 > struct set< T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : set5< T0,T1,T2,T3,T4 > { typedef typename set5< T0,T1,T2,T3,T4 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct set< T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : set6< T0,T1,T2,T3,T4,T5 > { typedef typename set6< T0,T1,T2,T3,T4,T5 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6 > struct set< T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na , na, na, na > : set7< T0,T1,T2,T3,T4,T5,T6 > { typedef typename set7< T0,T1,T2,T3,T4,T5,T6 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7 > struct set< T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na , na, na, na > : set8< T0,T1,T2,T3,T4,T5,T6,T7 > { typedef typename set8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8 > struct set< T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na , na, na, na > : set9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > { typedef typename set9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 > struct set< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na , na, na, na > : set10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > { typedef typename set10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10 > struct set< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na , na, na, na > : set11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > { typedef typename set11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11 > struct set< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na , na, na, na, na > : set12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > { typedef typename set12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12 > struct set< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na , na, na, na, na > : set13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > { typedef typename set13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13 > struct set< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na , na, na, na, na > : set14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > { typedef typename set14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 > struct set< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na , na, na, na, na > : set15< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 > { typedef typename set15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15 > struct set< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, na, na, na, na > : set16< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15 > { typedef typename set16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16 > struct set< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, na, na, na > : set17< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16 > { typedef typename set17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17 > struct set< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, na, na > : set18< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17 > { typedef typename set18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18 > struct set< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18, na > : set19< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18 > { typedef typename set19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type; }; /// primary template (not a specialization!) template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct set : set20< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18, T19 > { typedef typename set20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/mwcw/set_c.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/set_c.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename T, long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX , long C3 = LONG_MAX, long C4 = LONG_MAX, long C5 = LONG_MAX , long C6 = LONG_MAX, long C7 = LONG_MAX, long C8 = LONG_MAX , long C9 = LONG_MAX, long C10 = LONG_MAX, long C11 = LONG_MAX , long C12 = LONG_MAX, long C13 = LONG_MAX, long C14 = LONG_MAX , long C15 = LONG_MAX, long C16 = LONG_MAX, long C17 = LONG_MAX , long C18 = LONG_MAX, long C19 = LONG_MAX > struct set_c; template< typename T > struct set_c< T, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : set0_c { typedef typename set0_c::type type; }; template< typename T, long C0 > struct set_c< T, C0, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : set1_c< T,C0 > { typedef typename set1_c< T,C0 >::type type; }; template< typename T, long C0, long C1 > struct set_c< T, C0, C1, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : set2_c< T,C0,C1 > { typedef typename set2_c< T,C0,C1 >::type type; }; template< typename T, long C0, long C1, long C2 > struct set_c< T, C0, C1, C2, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : set3_c< T,C0,C1,C2 > { typedef typename set3_c< T,C0,C1,C2 >::type type; }; template< typename T, long C0, long C1, long C2, long C3 > struct set_c< T, C0, C1, C2, C3, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : set4_c< T,C0,C1,C2,C3 > { typedef typename set4_c< T,C0,C1,C2,C3 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4 > struct set_c< T, C0, C1, C2, C3, C4, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : set5_c< T,C0,C1,C2,C3,C4 > { typedef typename set5_c< T,C0,C1,C2,C3,C4 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 > struct set_c< T, C0, C1, C2, C3, C4, C5, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX > : set6_c< T,C0,C1,C2,C3,C4,C5 > { typedef typename set6_c< T,C0,C1,C2,C3,C4,C5 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX > : set7_c< T,C0,C1,C2,C3,C4,C5,C6 > { typedef typename set7_c< T,C0,C1,C2,C3,C4,C5,C6 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, C7, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX > : set8_c< T,C0,C1,C2,C3,C4,C5,C6,C7 > { typedef typename set8_c< T,C0,C1,C2,C3,C4,C5,C6,C7 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX > : set9_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8 > { typedef typename set9_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX > : set10_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 > { typedef typename set10_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : set11_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 > { typedef typename set11_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : set12_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 > { typedef typename set12_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : set13_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 > { typedef typename set13_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : set14_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 > { typedef typename set14_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : set15_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 > { typedef typename set15_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : set16_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15 > { typedef typename set16_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, LONG_MAX, LONG_MAX, LONG_MAX > : set17_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16 > { typedef typename set17_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, C17, LONG_MAX, LONG_MAX > : set18_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, C17 > { typedef typename set18_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, C17, C18, LONG_MAX > : set19_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, C17, C18 > { typedef typename set19_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18 >::type type; }; /// primary template (not a specialization!) template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct set_c : set20_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, C17, C18, C19 > { typedef typename set20_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19 >::type type; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/mwcw/shift_left.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // Copyright Jaap Suter 2003 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/shift_left.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct shift_left_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< shift_left_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< shift_left_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct shift_left_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct shift_left_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct shift_left_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct shift_left_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct shift_left : shift_left_impl< typename shift_left_tag::type , typename shift_left_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, shift_left, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 2, shift_left) }} namespace boost { namespace mpl { template<> struct shift_left_impl< integral_c_tag,integral_c_tag > { template< typename N, typename S > struct apply : integral_c< typename N::value_type , ( BOOST_MPL_AUX_VALUE_WKND(N)::value << BOOST_MPL_AUX_VALUE_WKND(S)::value ) > { }; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/mwcw/shift_right.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // Copyright Jaap Suter 2003 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/shift_right.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct shift_right_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< shift_right_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< shift_right_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct shift_right_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct shift_right_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct shift_right_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct shift_right_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct shift_right : shift_right_impl< typename shift_right_tag::type , typename shift_right_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, shift_right, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 2, shift_right) }} namespace boost { namespace mpl { template<> struct shift_right_impl< integral_c_tag,integral_c_tag > { template< typename N, typename S > struct apply : integral_c< typename N::value_type , ( BOOST_MPL_AUX_VALUE_WKND(N)::value >> BOOST_MPL_AUX_VALUE_WKND(S)::value ) > { }; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/mwcw/template_arity.hpp ================================================ // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/aux_/template_arity.hpp" header // -- DO NOT modify by hand! ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/mwcw/times.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/times.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct times_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< times_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< times_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct times_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct times_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct times_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct times_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) , typename N3 = na, typename N4 = na, typename N5 = na > struct times : times< times< times< times< N1,N2 >, N3>, N4>, N5> { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , times , ( N1, N2, N3, N4, N5 ) ) }; template< typename N1, typename N2, typename N3, typename N4 > struct times< N1,N2,N3,N4,na > : times< times< times< N1,N2 >, N3>, N4> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , times , ( N1, N2, N3, N4, na ) ) }; template< typename N1, typename N2, typename N3 > struct times< N1,N2,N3,na,na > : times< times< N1,N2 >, N3> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , times , ( N1, N2, N3, na, na ) ) }; template< typename N1, typename N2 > struct times< N1,N2,na,na,na > : times_impl< typename times_tag::type , typename times_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , times , ( N1, N2, na, na, na ) ) }; BOOST_MPL_AUX_NA_SPEC2(2, 5, times) }} namespace boost { namespace mpl { template<> struct times_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : integral_c< typename aux::largest_int< typename N1::value_type , typename N2::value_type >::type , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value * BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/mwcw/unpack_args.hpp ================================================ // Copyright Aleksey Gurtovoy 2002-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/unpack_args.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< int size, typename F, typename Args > struct unpack_args_impl; template< typename F, typename Args > struct unpack_args_impl< 0,F,Args > : apply0< F > { }; template< typename F, typename Args > struct unpack_args_impl< 1,F,Args > : apply1< F , typename at_c< Args,0 >::type > { }; template< typename F, typename Args > struct unpack_args_impl< 2,F,Args > : apply2< F , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type > { }; template< typename F, typename Args > struct unpack_args_impl< 3,F,Args > : apply3< F , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type , typename at_c< Args,2 >::type > { }; template< typename F, typename Args > struct unpack_args_impl< 4,F,Args > : apply4< F , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type , typename at_c< Args,2 >::type, typename at_c< Args,3 >::type > { }; template< typename F, typename Args > struct unpack_args_impl< 5,F,Args > : apply5< F , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type , typename at_c< Args,2 >::type, typename at_c< Args,3 >::type , typename at_c< Args,4 >::type > { }; } template< typename F > struct unpack_args { template< typename Args > struct apply : aux::unpack_args_impl< size::value,F, Args > { }; }; BOOST_MPL_AUX_PASS_THROUGH_LAMBDA_SPEC(1, unpack_args) }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/mwcw/vector.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/vector.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na , typename T12 = na, typename T13 = na, typename T14 = na , typename T15 = na, typename T16 = na, typename T17 = na , typename T18 = na, typename T19 = na > struct vector; template< > struct vector< na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector0< > { typedef vector0< >::type type; }; template< typename T0 > struct vector< T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector1 { typedef typename vector1::type type; }; template< typename T0, typename T1 > struct vector< T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector2< T0,T1 > { typedef typename vector2< T0,T1 >::type type; }; template< typename T0, typename T1, typename T2 > struct vector< T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector3< T0,T1,T2 > { typedef typename vector3< T0,T1,T2 >::type type; }; template< typename T0, typename T1, typename T2, typename T3 > struct vector< T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector4< T0,T1,T2,T3 > { typedef typename vector4< T0,T1,T2,T3 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 > struct vector< T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector5< T0,T1,T2,T3,T4 > { typedef typename vector5< T0,T1,T2,T3,T4 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct vector< T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector6< T0,T1,T2,T3,T4,T5 > { typedef typename vector6< T0,T1,T2,T3,T4,T5 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6 > struct vector< T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector7< T0,T1,T2,T3,T4,T5,T6 > { typedef typename vector7< T0,T1,T2,T3,T4,T5,T6 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7 > struct vector< T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na , na, na, na > : vector8< T0,T1,T2,T3,T4,T5,T6,T7 > { typedef typename vector8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8 > struct vector< T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na , na, na, na > : vector9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > { typedef typename vector9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 > struct vector< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na , na, na, na > : vector10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > { typedef typename vector10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10 > struct vector< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na , na, na, na > : vector11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > { typedef typename vector11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11 > struct vector< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na , na, na, na, na > : vector12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > { typedef typename vector12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12 > struct vector< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na , na, na, na, na > : vector13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > { typedef typename vector13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13 > struct vector< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na , na, na, na, na > : vector14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > { typedef typename vector14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 > struct vector< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na , na, na, na, na > : vector15< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 > { typedef typename vector15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15 > struct vector< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, na, na, na, na > : vector16< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15 > { typedef typename vector16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16 > struct vector< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, na, na, na > : vector17< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16 > { typedef typename vector17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17 > struct vector< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, na, na > : vector18< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17 > { typedef typename vector18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18 > struct vector< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18, na > : vector19< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18 > { typedef typename vector19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type; }; /// primary template (not a specialization!) template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct vector : vector20< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18, T19 > { typedef typename vector20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/mwcw/vector_c.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/vector_c.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename T, long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX , long C3 = LONG_MAX, long C4 = LONG_MAX, long C5 = LONG_MAX , long C6 = LONG_MAX, long C7 = LONG_MAX, long C8 = LONG_MAX , long C9 = LONG_MAX, long C10 = LONG_MAX, long C11 = LONG_MAX , long C12 = LONG_MAX, long C13 = LONG_MAX, long C14 = LONG_MAX , long C15 = LONG_MAX, long C16 = LONG_MAX, long C17 = LONG_MAX , long C18 = LONG_MAX, long C19 = LONG_MAX > struct vector_c; template< typename T > struct vector_c< T, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector0_c { typedef typename vector0_c::type type; }; template< typename T, long C0 > struct vector_c< T, C0, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector1_c< T, T(C0) > { typedef typename vector1_c< T, T(C0) >::type type; }; template< typename T, long C0, long C1 > struct vector_c< T, C0, C1, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector2_c< T, T(C0), T(C1) > { typedef typename vector2_c< T, T(C0), T(C1) >::type type; }; template< typename T, long C0, long C1, long C2 > struct vector_c< T, C0, C1, C2, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector3_c< T, T(C0), T(C1), T(C2) > { typedef typename vector3_c< T, T(C0), T(C1), T(C2) >::type type; }; template< typename T, long C0, long C1, long C2, long C3 > struct vector_c< T, C0, C1, C2, C3, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector4_c< T, T(C0), T(C1), T(C2), T(C3) > { typedef typename vector4_c< T, T(C0), T(C1), T(C2), T(C3) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4 > struct vector_c< T, C0, C1, C2, C3, C4, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector5_c< T, T(C0), T(C1), T(C2), T(C3), T(C4) > { typedef typename vector5_c< T, T(C0), T(C1), T(C2), T(C3), T(C4) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 > struct vector_c< T, C0, C1, C2, C3, C4, C5, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX > : vector6_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5) > { typedef typename vector6_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX > : vector7_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6) > { typedef typename vector7_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, C7, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX > : vector8_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7) > { typedef typename vector8_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX > : vector9_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8) > { typedef typename vector9_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX > : vector10_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9) > { typedef typename vector10_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector11_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10) > { typedef typename vector11_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector12_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11) > { typedef typename vector12_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector13_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12) > { typedef typename vector13_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector14_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13) > { typedef typename vector14_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector15_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14) > { typedef typename vector15_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector16_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15) > { typedef typename vector16_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, LONG_MAX, LONG_MAX, LONG_MAX > : vector17_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16) > { typedef typename vector17_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, C17, LONG_MAX, LONG_MAX > : vector18_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17) > { typedef typename vector18_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, C17, C18, LONG_MAX > : vector19_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17), T(C18) > { typedef typename vector19_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17), T(C18) >::type type; }; /// primary template (not a specialization!) template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct vector_c : vector20_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17), T(C18), T(C19) > { typedef typename vector20_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17), T(C18), T(C19) >::type type; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/no_ctps/advance_backward.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/aux_/advance_backward.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< long N > struct advance_backward; template<> struct advance_backward<0> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef iter0 type; }; }; template<> struct advance_backward<1> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef typename prior::type iter1; typedef iter1 type; }; }; template<> struct advance_backward<2> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef typename prior::type iter1; typedef typename prior::type iter2; typedef iter2 type; }; }; template<> struct advance_backward<3> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef typename prior::type iter1; typedef typename prior::type iter2; typedef typename prior::type iter3; typedef iter3 type; }; }; template<> struct advance_backward<4> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef typename prior::type iter1; typedef typename prior::type iter2; typedef typename prior::type iter3; typedef typename prior::type iter4; typedef iter4 type; }; }; template< long N > struct advance_backward { template< typename Iterator > struct apply { typedef typename apply_wrap1< advance_backward<4> , Iterator >::type chunk_result_; typedef typename apply_wrap1< advance_backward<( (N - 4) < 0 ? 0 : N - 4 )> , chunk_result_ >::type type; }; }; }}} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/no_ctps/advance_forward.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/aux_/advance_forward.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< long N > struct advance_forward; template<> struct advance_forward<0> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef iter0 type; }; }; template<> struct advance_forward<1> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef typename next::type iter1; typedef iter1 type; }; }; template<> struct advance_forward<2> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef typename next::type iter1; typedef typename next::type iter2; typedef iter2 type; }; }; template<> struct advance_forward<3> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef typename next::type iter1; typedef typename next::type iter2; typedef typename next::type iter3; typedef iter3 type; }; }; template<> struct advance_forward<4> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef typename next::type iter1; typedef typename next::type iter2; typedef typename next::type iter3; typedef typename next::type iter4; typedef iter4 type; }; }; template< long N > struct advance_forward { template< typename Iterator > struct apply { typedef typename apply_wrap1< advance_forward<4> , Iterator >::type chunk_result_; typedef typename apply_wrap1< advance_forward<( (N - 4) < 0 ? 0 : N - 4 )> , chunk_result_ >::type type; }; }; }}} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/no_ctps/and.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/and.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< bool C_ > struct and_impl { template< typename T1, typename T2, typename T3, typename T4 > struct result_ : false_ { }; }; template<> struct and_impl { template< typename T1, typename T2, typename T3, typename T4 > struct result_ : and_impl< BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value >::template result_< T2,T3,T4,true_ > { }; }; template<> struct and_impl ::result_< true_,true_,true_,true_ > : true_ { }; } // namespace aux template< typename BOOST_MPL_AUX_NA_PARAM(T1) , typename BOOST_MPL_AUX_NA_PARAM(T2) , typename T3 = true_, typename T4 = true_, typename T5 = true_ > struct and_ : aux::and_impl< BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value >::template result_< T2,T3,T4,T5 > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , and_ , ( T1, T2, T3, T4, T5) ) }; BOOST_MPL_AUX_NA_SPEC2( 2 , 5 , and_ ) }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/no_ctps/apply.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/apply.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename F > struct apply0 : apply_wrap0< typename lambda::type > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 1 , apply0 , (F ) ) }; namespace aux { template<> struct apply_chooser<0> { template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct result_ { typedef apply0< F > type; }; }; } // namespace aux template< typename F, typename T1 > struct apply1 : apply_wrap1< typename lambda::type , T1 > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 2 , apply1 , (F, T1) ) }; namespace aux { template<> struct apply_chooser<1> { template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct result_ { typedef apply1< F, T1 > type; }; }; } // namespace aux template< typename F, typename T1, typename T2 > struct apply2 : apply_wrap2< typename lambda::type , T1, T2 > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 3 , apply2 , (F, T1, T2) ) }; namespace aux { template<> struct apply_chooser<2> { template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct result_ { typedef apply2< F, T1, T2 > type; }; }; } // namespace aux template< typename F, typename T1, typename T2, typename T3 > struct apply3 : apply_wrap3< typename lambda::type , T1, T2, T3 > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 4 , apply3 , (F, T1, T2, T3) ) }; namespace aux { template<> struct apply_chooser<3> { template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct result_ { typedef apply3< F, T1, T2, T3 > type; }; }; } // namespace aux template< typename F, typename T1, typename T2, typename T3, typename T4 > struct apply4 : apply_wrap4< typename lambda::type , T1, T2, T3, T4 > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , apply4 , (F, T1, T2, T3, T4) ) }; namespace aux { template<> struct apply_chooser<4> { template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct result_ { typedef apply4< F, T1, T2, T3, T4 > type; }; }; } // namespace aux template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct apply5 : apply_wrap5< typename lambda::type , T1, T2, T3, T4, T5 > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 6 , apply5 , (F, T1, T2, T3, T4, T5) ) }; namespace aux { template<> struct apply_chooser<5> { template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct result_ { typedef apply5< F, T1, T2, T3, T4, T5 > type; }; }; } // namespace aux namespace aux { template< typename T > struct is_apply_arg { static bool const value = true; }; template<> struct is_apply_arg { static bool const value = false; }; template< typename T1, typename T2, typename T3, typename T4, typename T5 > struct apply_count_args { static int const value = is_apply_arg::value + is_apply_arg::value + is_apply_arg::value + is_apply_arg::value + is_apply_arg::value; }; } template< typename F, typename T1 = na, typename T2 = na, typename T3 = na , typename T4 = na, typename T5 = na > struct apply : aux::apply_chooser< aux::apply_count_args< T1,T2,T3,T4,T5 >::value >::template result_< F,T1,T2,T3,T4,T5 >::type { }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/no_ctps/apply_fwd.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/apply_fwd.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< BOOST_AUX_NTTP_DECL(int, arity_) > struct apply_chooser; } template< typename F > struct apply0; template< typename F, typename T1 > struct apply1; template< typename F, typename T1, typename T2 > struct apply2; template< typename F, typename T1, typename T2, typename T3 > struct apply3; template< typename F, typename T1, typename T2, typename T3, typename T4 > struct apply4; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct apply5; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/no_ctps/apply_wrap.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/apply_wrap.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename F , typename has_apply_ = typename aux::has_apply::type > struct apply_wrap0 : F::template apply< > { }; template< typename F, typename T1 > struct apply_wrap1 : F::template apply { }; template< typename F, typename T1, typename T2 > struct apply_wrap2 : F::template apply< T1,T2 > { }; template< typename F, typename T1, typename T2, typename T3 > struct apply_wrap3 : F::template apply< T1,T2,T3 > { }; template< typename F, typename T1, typename T2, typename T3, typename T4 > struct apply_wrap4 : F::template apply< T1,T2,T3,T4 > { }; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct apply_wrap5 : F::template apply< T1,T2,T3,T4,T5 > { }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/no_ctps/arg.hpp ================================================ // Copyright Peter Dimov 2001-2002 // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/arg.hpp" header // -- DO NOT modify by hand! BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN template<> struct arg< -1 > { BOOST_STATIC_CONSTANT(int, value = -1); BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) BOOST_MPL_AUX_ARG_TYPEDEF(na, type) template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { typedef U1 type; BOOST_MPL_AUX_ASSERT_NOT_NA(type); }; }; template<> struct arg<1> { BOOST_STATIC_CONSTANT(int, value = 1); typedef arg<2> next; BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) BOOST_MPL_AUX_ARG_TYPEDEF(na, type) template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { typedef U1 type; BOOST_MPL_AUX_ASSERT_NOT_NA(type); }; }; template<> struct arg<2> { BOOST_STATIC_CONSTANT(int, value = 2); typedef arg<3> next; BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) BOOST_MPL_AUX_ARG_TYPEDEF(na, type) template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { typedef U2 type; BOOST_MPL_AUX_ASSERT_NOT_NA(type); }; }; template<> struct arg<3> { BOOST_STATIC_CONSTANT(int, value = 3); typedef arg<4> next; BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) BOOST_MPL_AUX_ARG_TYPEDEF(na, type) template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { typedef U3 type; BOOST_MPL_AUX_ASSERT_NOT_NA(type); }; }; template<> struct arg<4> { BOOST_STATIC_CONSTANT(int, value = 4); typedef arg<5> next; BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) BOOST_MPL_AUX_ARG_TYPEDEF(na, type) template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { typedef U4 type; BOOST_MPL_AUX_ASSERT_NOT_NA(type); }; }; template<> struct arg<5> { BOOST_STATIC_CONSTANT(int, value = 5); typedef arg<6> next; BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) BOOST_MPL_AUX_ARG_TYPEDEF(na, type) template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { typedef U5 type; BOOST_MPL_AUX_ASSERT_NOT_NA(type); }; }; BOOST_MPL_AUX_NONTYPE_ARITY_SPEC(1,int, arg) BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/no_ctps/basic_bind.hpp ================================================ // Copyright Peter Dimov 2001 // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/aux_/basic_bind.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< bool > struct resolve_arg_impl { template< typename T, typename U1, typename U2, typename U3 , typename U4, typename U5 > struct result_ { typedef T type; }; }; template<> struct resolve_arg_impl { template< typename T, typename U1, typename U2, typename U3 , typename U4, typename U5 > struct result_ { typedef typename apply_wrap5< T , U1, U2, U3, U4, U5 >::type type; }; }; template< typename T > struct is_bind_template; template< typename T, typename U1, typename U2, typename U3, typename U4 , typename U5 > struct resolve_bind_arg : resolve_arg_impl< is_bind_template::value > ::template result_< T,U1,U2,U3,U4,U5 > { }; template< int arity_ > struct bind_chooser; aux::no_tag is_bind_helper(...); template< typename T > aux::no_tag is_bind_helper(protect*); template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > aux::yes_tag is_bind_helper(bind< F,T1,T2,T3,T4,T5 >*); template< int N > aux::yes_tag is_bind_helper(arg*); template< bool is_ref_ = true > struct is_bind_template_impl { template< typename T > struct result_ { BOOST_STATIC_CONSTANT(bool, value = false); }; }; template<> struct is_bind_template_impl { template< typename T > struct result_ { BOOST_STATIC_CONSTANT(bool, value = sizeof(aux::is_bind_helper(static_cast(0))) == sizeof(aux::yes_tag) ); }; }; template< typename T > struct is_bind_template : is_bind_template_impl< ::boost::detail::is_reference_impl::value > ::template result_ { }; } // namespace aux template< typename F > struct bind0 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; public: typedef typename apply_wrap0< f_ >::type type; }; }; namespace aux { template< typename F > aux::yes_tag is_bind_helper(bind0*); } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(1, bind0) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(1, bind0) namespace aux { template<> struct bind_chooser<0> { template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct result_ { typedef bind0 type; }; }; } // namespace aux template< typename F, typename T1 > struct bind1 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; public: typedef typename apply_wrap1< f_ , typename t1::type >::type type; }; }; namespace aux { template< typename F, typename T1 > aux::yes_tag is_bind_helper(bind1< F,T1 >*); } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(2, bind1) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(2, bind1) namespace aux { template<> struct bind_chooser<1> { template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct result_ { typedef bind1< F,T1 > type; }; }; } // namespace aux template< typename F, typename T1, typename T2 > struct bind2 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; public: typedef typename apply_wrap2< f_ , typename t1::type, typename t2::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename T2 > aux::yes_tag is_bind_helper(bind2< F,T1,T2 >*); } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(3, bind2) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(3, bind2) namespace aux { template<> struct bind_chooser<2> { template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct result_ { typedef bind2< F,T1,T2 > type; }; }; } // namespace aux template< typename F, typename T1, typename T2, typename T3 > struct bind3 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3; public: typedef typename apply_wrap3< f_ , typename t1::type, typename t2::type, typename t3::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename T2, typename T3 > aux::yes_tag is_bind_helper(bind3< F,T1,T2,T3 >*); } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(4, bind3) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(4, bind3) namespace aux { template<> struct bind_chooser<3> { template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct result_ { typedef bind3< F,T1,T2,T3 > type; }; }; } // namespace aux template< typename F, typename T1, typename T2, typename T3, typename T4 > struct bind4 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3; typedef aux::resolve_bind_arg< T4,U1,U2,U3,U4,U5 > t4; public: typedef typename apply_wrap4< f_ , typename t1::type, typename t2::type, typename t3::type , typename t4::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename T2, typename T3, typename T4 > aux::yes_tag is_bind_helper(bind4< F,T1,T2,T3,T4 >*); } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(5, bind4) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(5, bind4) namespace aux { template<> struct bind_chooser<4> { template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct result_ { typedef bind4< F,T1,T2,T3,T4 > type; }; }; } // namespace aux template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct bind5 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3; typedef aux::resolve_bind_arg< T4,U1,U2,U3,U4,U5 > t4; typedef aux::resolve_bind_arg< T5,U1,U2,U3,U4,U5 > t5; public: typedef typename apply_wrap5< f_ , typename t1::type, typename t2::type, typename t3::type , typename t4::type, typename t5::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > aux::yes_tag is_bind_helper(bind5< F,T1,T2,T3,T4,T5 >*); } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(6, bind5) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(6, bind5) namespace aux { template<> struct bind_chooser<5> { template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct result_ { typedef bind5< F,T1,T2,T3,T4,T5 > type; }; }; } // namespace aux namespace aux { template< typename T > struct is_bind_arg { BOOST_STATIC_CONSTANT(bool, value = true); }; template<> struct is_bind_arg { BOOST_STATIC_CONSTANT(bool, value = false); }; template< typename T1, typename T2, typename T3, typename T4, typename T5 > struct bind_count_args { BOOST_STATIC_CONSTANT(int, value = is_bind_arg::value + is_bind_arg::value + is_bind_arg::value + is_bind_arg::value + is_bind_arg::value ); }; } template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct bind : aux::bind_chooser< aux::bind_count_args< T1,T2,T3,T4,T5 >::value >::template result_< F,T1,T2,T3,T4,T5 >::type { }; BOOST_MPL_AUX_ARITY_SPEC( 6 , bind ) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC( 6 , bind ) }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/no_ctps/bind.hpp ================================================ // Copyright Peter Dimov 2001 // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/bind.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< bool > struct resolve_arg_impl { template< typename T, typename U1, typename U2, typename U3 , typename U4, typename U5 > struct result_ { typedef T type; }; }; template<> struct resolve_arg_impl { template< typename T, typename U1, typename U2, typename U3 , typename U4, typename U5 > struct result_ { typedef typename apply_wrap5< T , U1, U2, U3, U4, U5 >::type type; }; }; template< typename T > struct is_bind_template; template< typename T, typename U1, typename U2, typename U3, typename U4 , typename U5 > struct resolve_bind_arg : resolve_arg_impl< is_bind_template::value > ::template result_< T,U1,U2,U3,U4,U5 > { }; template< typename T > struct replace_unnamed_arg_impl { template< typename Arg > struct result_ { typedef Arg next; typedef T type; }; }; template<> struct replace_unnamed_arg_impl< arg< -1 > > { template< typename Arg > struct result_ { typedef typename next::type next; typedef Arg type; }; }; template< typename T, typename Arg > struct replace_unnamed_arg : replace_unnamed_arg_impl::template result_ { }; template< int arity_ > struct bind_chooser; aux::no_tag is_bind_helper(...); template< typename T > aux::no_tag is_bind_helper(protect*); template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > aux::yes_tag is_bind_helper(bind< F,T1,T2,T3,T4,T5 >*); template< int N > aux::yes_tag is_bind_helper(arg*); template< bool is_ref_ = true > struct is_bind_template_impl { template< typename T > struct result_ { BOOST_STATIC_CONSTANT(bool, value = false); }; }; template<> struct is_bind_template_impl { template< typename T > struct result_ { BOOST_STATIC_CONSTANT(bool, value = sizeof(aux::is_bind_helper(static_cast(0))) == sizeof(aux::yes_tag) ); }; }; template< typename T > struct is_bind_template : is_bind_template_impl< ::boost::detail::is_reference_impl::value > ::template result_ { }; } // namespace aux template< typename F > struct bind0 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; typedef typename r0::type a0; typedef typename r0::next n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; /// public: typedef typename apply_wrap0< f_ >::type type; }; }; namespace aux { template< typename F > aux::yes_tag is_bind_helper(bind0*); } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(1, bind0) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(1, bind0) namespace aux { template<> struct bind_chooser<0> { template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct result_ { typedef bind0 type; }; }; } // namespace aux template< typename F, typename T1 > struct bind1 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; typedef typename r0::type a0; typedef typename r0::next n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; /// typedef aux::replace_unnamed_arg< T1,n1 > r1; typedef typename r1::type a1; typedef typename r1::next n2; typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; /// public: typedef typename apply_wrap1< f_ , typename t1::type >::type type; }; }; namespace aux { template< typename F, typename T1 > aux::yes_tag is_bind_helper(bind1< F,T1 >*); } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(2, bind1) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(2, bind1) namespace aux { template<> struct bind_chooser<1> { template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct result_ { typedef bind1< F,T1 > type; }; }; } // namespace aux template< typename F, typename T1, typename T2 > struct bind2 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; typedef typename r0::type a0; typedef typename r0::next n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; /// typedef aux::replace_unnamed_arg< T1,n1 > r1; typedef typename r1::type a1; typedef typename r1::next n2; typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; /// typedef aux::replace_unnamed_arg< T2,n2 > r2; typedef typename r2::type a2; typedef typename r2::next n3; typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; /// public: typedef typename apply_wrap2< f_ , typename t1::type, typename t2::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename T2 > aux::yes_tag is_bind_helper(bind2< F,T1,T2 >*); } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(3, bind2) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(3, bind2) namespace aux { template<> struct bind_chooser<2> { template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct result_ { typedef bind2< F,T1,T2 > type; }; }; } // namespace aux template< typename F, typename T1, typename T2, typename T3 > struct bind3 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; typedef typename r0::type a0; typedef typename r0::next n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; /// typedef aux::replace_unnamed_arg< T1,n1 > r1; typedef typename r1::type a1; typedef typename r1::next n2; typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; /// typedef aux::replace_unnamed_arg< T2,n2 > r2; typedef typename r2::type a2; typedef typename r2::next n3; typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; /// typedef aux::replace_unnamed_arg< T3,n3 > r3; typedef typename r3::type a3; typedef typename r3::next n4; typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; /// public: typedef typename apply_wrap3< f_ , typename t1::type, typename t2::type, typename t3::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename T2, typename T3 > aux::yes_tag is_bind_helper(bind3< F,T1,T2,T3 >*); } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(4, bind3) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(4, bind3) namespace aux { template<> struct bind_chooser<3> { template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct result_ { typedef bind3< F,T1,T2,T3 > type; }; }; } // namespace aux template< typename F, typename T1, typename T2, typename T3, typename T4 > struct bind4 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; typedef typename r0::type a0; typedef typename r0::next n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; /// typedef aux::replace_unnamed_arg< T1,n1 > r1; typedef typename r1::type a1; typedef typename r1::next n2; typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; /// typedef aux::replace_unnamed_arg< T2,n2 > r2; typedef typename r2::type a2; typedef typename r2::next n3; typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; /// typedef aux::replace_unnamed_arg< T3,n3 > r3; typedef typename r3::type a3; typedef typename r3::next n4; typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; /// typedef aux::replace_unnamed_arg< T4,n4 > r4; typedef typename r4::type a4; typedef typename r4::next n5; typedef aux::resolve_bind_arg< a4,U1,U2,U3,U4,U5 > t4; /// public: typedef typename apply_wrap4< f_ , typename t1::type, typename t2::type, typename t3::type , typename t4::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename T2, typename T3, typename T4 > aux::yes_tag is_bind_helper(bind4< F,T1,T2,T3,T4 >*); } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(5, bind4) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(5, bind4) namespace aux { template<> struct bind_chooser<4> { template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct result_ { typedef bind4< F,T1,T2,T3,T4 > type; }; }; } // namespace aux template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct bind5 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; typedef typename r0::type a0; typedef typename r0::next n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; /// typedef aux::replace_unnamed_arg< T1,n1 > r1; typedef typename r1::type a1; typedef typename r1::next n2; typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; /// typedef aux::replace_unnamed_arg< T2,n2 > r2; typedef typename r2::type a2; typedef typename r2::next n3; typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; /// typedef aux::replace_unnamed_arg< T3,n3 > r3; typedef typename r3::type a3; typedef typename r3::next n4; typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; /// typedef aux::replace_unnamed_arg< T4,n4 > r4; typedef typename r4::type a4; typedef typename r4::next n5; typedef aux::resolve_bind_arg< a4,U1,U2,U3,U4,U5 > t4; /// typedef aux::replace_unnamed_arg< T5,n5 > r5; typedef typename r5::type a5; typedef typename r5::next n6; typedef aux::resolve_bind_arg< a5,U1,U2,U3,U4,U5 > t5; /// public: typedef typename apply_wrap5< f_ , typename t1::type, typename t2::type, typename t3::type , typename t4::type, typename t5::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > aux::yes_tag is_bind_helper(bind5< F,T1,T2,T3,T4,T5 >*); } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(6, bind5) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(6, bind5) namespace aux { template<> struct bind_chooser<5> { template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct result_ { typedef bind5< F,T1,T2,T3,T4,T5 > type; }; }; } // namespace aux namespace aux { template< typename T > struct is_bind_arg { BOOST_STATIC_CONSTANT(bool, value = true); }; template<> struct is_bind_arg { BOOST_STATIC_CONSTANT(bool, value = false); }; template< typename T1, typename T2, typename T3, typename T4, typename T5 > struct bind_count_args { BOOST_STATIC_CONSTANT(int, value = is_bind_arg::value + is_bind_arg::value + is_bind_arg::value + is_bind_arg::value + is_bind_arg::value ); }; } template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct bind : aux::bind_chooser< aux::bind_count_args< T1,T2,T3,T4,T5 >::value >::template result_< F,T1,T2,T3,T4,T5 >::type { }; BOOST_MPL_AUX_ARITY_SPEC( 6 , bind ) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC( 6 , bind ) }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/no_ctps/bind_fwd.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/bind_fwd.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename F, typename T1 = na, typename T2 = na, typename T3 = na , typename T4 = na, typename T5 = na > struct bind; template< typename F > struct bind0; template< typename F, typename T1 > struct bind1; template< typename F, typename T1, typename T2 > struct bind2; template< typename F, typename T1, typename T2, typename T3 > struct bind3; template< typename F, typename T1, typename T2, typename T3, typename T4 > struct bind4; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct bind5; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/no_ctps/bitand.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // Copyright Jaap Suter 2003 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/bitand.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct bitand_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< bitand_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< bitand_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct bitand_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template<> struct bitand_impl< na,integral_c_tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template<> struct bitand_impl< integral_c_tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct bitand_tag { typedef typename T::tag type; }; /// forward declaration template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct bitand_2; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) , typename N3 = na, typename N4 = na, typename N5 = na > struct bitand_ : if_< is_na , bitand_2< N1,N2 > , bitand_< bitand_2< N1,N2 > , N3, N4, N5 > >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , bitand_ , ( N1, N2, N3, N4, N5 ) ) }; template< typename N1 , typename N2 > struct bitand_2 : bitand_impl< typename bitand_tag::type , typename bitand_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, bitand_2, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 5, bitand_) }} namespace boost { namespace mpl { template<> struct bitand_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : integral_c< typename aux::largest_int< typename N1::value_type , typename N2::value_type >::type , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value & BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/no_ctps/bitor.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // Copyright Jaap Suter 2003 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/bitor.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct bitor_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< bitor_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< bitor_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct bitor_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template<> struct bitor_impl< na,integral_c_tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template<> struct bitor_impl< integral_c_tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct bitor_tag { typedef typename T::tag type; }; /// forward declaration template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct bitor_2; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) , typename N3 = na, typename N4 = na, typename N5 = na > struct bitor_ : if_< is_na , bitor_2< N1,N2 > , bitor_< bitor_2< N1,N2 > , N3, N4, N5 > >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , bitor_ , ( N1, N2, N3, N4, N5 ) ) }; template< typename N1 , typename N2 > struct bitor_2 : bitor_impl< typename bitor_tag::type , typename bitor_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, bitor_2, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 5, bitor_) }} namespace boost { namespace mpl { template<> struct bitor_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : integral_c< typename aux::largest_int< typename N1::value_type , typename N2::value_type >::type , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value | BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/no_ctps/bitxor.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // Copyright Jaap Suter 2003 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/bitxor.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct bitxor_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< bitxor_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< bitxor_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct bitxor_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template<> struct bitxor_impl< na,integral_c_tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template<> struct bitxor_impl< integral_c_tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct bitxor_tag { typedef typename T::tag type; }; /// forward declaration template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct bitxor_2; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) , typename N3 = na, typename N4 = na, typename N5 = na > struct bitxor_ : if_< is_na , bitxor_2< N1,N2 > , bitxor_< bitxor_2< N1,N2 > , N3, N4, N5 > >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , bitxor_ , ( N1, N2, N3, N4, N5 ) ) }; template< typename N1 , typename N2 > struct bitxor_2 : bitxor_impl< typename bitxor_tag::type , typename bitxor_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, bitxor_2, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 5, bitxor_) }} namespace boost { namespace mpl { template<> struct bitxor_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : integral_c< typename aux::largest_int< typename N1::value_type , typename N2::value_type >::type , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value ^ BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/no_ctps/deque.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/deque.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< int N > struct deque_chooser; } namespace aux { template<> struct deque_chooser<0> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef vector0< >::type type; }; }; } // namespace aux namespace aux { template<> struct deque_chooser<1> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector1< T0 >::type type; }; }; } // namespace aux namespace aux { template<> struct deque_chooser<2> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector2< T0, T1 >::type type; }; }; } // namespace aux namespace aux { template<> struct deque_chooser<3> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector3< T0, T1, T2 >::type type; }; }; } // namespace aux namespace aux { template<> struct deque_chooser<4> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector4< T0, T1, T2, T3 >::type type; }; }; } // namespace aux namespace aux { template<> struct deque_chooser<5> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector5< T0, T1, T2, T3, T4 >::type type; }; }; } // namespace aux namespace aux { template<> struct deque_chooser<6> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector6< T0, T1, T2, T3, T4, T5 >::type type; }; }; } // namespace aux namespace aux { template<> struct deque_chooser<7> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector7< T0, T1, T2, T3, T4, T5, T6 >::type type; }; }; } // namespace aux namespace aux { template<> struct deque_chooser<8> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector8< T0, T1, T2, T3, T4, T5, T6, T7 >::type type; }; }; } // namespace aux namespace aux { template<> struct deque_chooser<9> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector9< T0, T1, T2, T3, T4, T5, T6, T7, T8 >::type type; }; }; } // namespace aux namespace aux { template<> struct deque_chooser<10> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector10< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9 >::type type; }; }; } // namespace aux namespace aux { template<> struct deque_chooser<11> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector11< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10 >::type type; }; }; } // namespace aux namespace aux { template<> struct deque_chooser<12> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector12< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11 >::type type; }; }; } // namespace aux namespace aux { template<> struct deque_chooser<13> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector13< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12 >::type type; }; }; } // namespace aux namespace aux { template<> struct deque_chooser<14> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector14< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13 >::type type; }; }; } // namespace aux namespace aux { template<> struct deque_chooser<15> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector15< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 >::type type; }; }; } // namespace aux namespace aux { template<> struct deque_chooser<16> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector16< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15 >::type type; }; }; } // namespace aux namespace aux { template<> struct deque_chooser<17> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector17< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16 >::type type; }; }; } // namespace aux namespace aux { template<> struct deque_chooser<18> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector18< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17 >::type type; }; }; } // namespace aux namespace aux { template<> struct deque_chooser<19> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector19< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18 >::type type; }; }; } // namespace aux namespace aux { template<> struct deque_chooser<20> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector20< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 >::type type; }; }; } // namespace aux namespace aux { template< typename T > struct is_deque_arg { BOOST_STATIC_CONSTANT(bool, value = true); }; template<> struct is_deque_arg { BOOST_STATIC_CONSTANT(bool, value = false); }; template< typename T1, typename T2, typename T3, typename T4, typename T5 , typename T6, typename T7, typename T8, typename T9, typename T10 , typename T11, typename T12, typename T13, typename T14, typename T15 , typename T16, typename T17, typename T18, typename T19, typename T20 > struct deque_count_args { BOOST_STATIC_CONSTANT(int, value = is_deque_arg::value + is_deque_arg::value + is_deque_arg::value + is_deque_arg::value + is_deque_arg::value + is_deque_arg::value + is_deque_arg::value + is_deque_arg::value + is_deque_arg::value + is_deque_arg::value + is_deque_arg::value + is_deque_arg::value + is_deque_arg::value + is_deque_arg::value + is_deque_arg::value + is_deque_arg::value + is_deque_arg::value + is_deque_arg::value + is_deque_arg::value + is_deque_arg::value ); }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct deque_impl { typedef aux::deque_count_args< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 > arg_num_; typedef typename aux::deque_chooser< arg_num_::value > ::template result_< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; }; } // namespace aux template< typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na , typename T12 = na, typename T13 = na, typename T14 = na , typename T15 = na, typename T16 = na, typename T17 = na , typename T18 = na, typename T19 = na > struct deque : aux::deque_impl< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 >::type { typedef typename aux::deque_impl< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 >::type type; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/no_ctps/divides.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/divides.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct divides_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< divides_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< divides_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct divides_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template<> struct divides_impl< na,integral_c_tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template<> struct divides_impl< integral_c_tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct divides_tag { typedef typename T::tag type; }; /// forward declaration template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct divides2; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) , typename N3 = na, typename N4 = na, typename N5 = na > struct divides : if_< is_na , divides2< N1,N2 > , divides< divides2< N1,N2 > , N3, N4, N5 > >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , divides , ( N1, N2, N3, N4, N5 ) ) }; template< typename N1 , typename N2 > struct divides2 : divides_impl< typename divides_tag::type , typename divides_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, divides2, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 5, divides) }} namespace boost { namespace mpl { template<> struct divides_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : integral_c< typename aux::largest_int< typename N1::value_type , typename N2::value_type >::type , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value / BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/no_ctps/equal_to.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/equal_to.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct equal_to_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< equal_to_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< equal_to_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct equal_to_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template<> struct equal_to_impl< na,integral_c_tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template<> struct equal_to_impl< integral_c_tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct equal_to_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct equal_to : equal_to_impl< typename equal_to_tag::type , typename equal_to_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, equal_to, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 2, equal_to) }} namespace boost { namespace mpl { template<> struct equal_to_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value == BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/no_ctps/fold_impl.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/aux_/fold_impl.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { /// forward declaration template< int N , typename First , typename Last , typename State , typename ForwardOp > struct fold_impl; template< int N > struct fold_chunk; template<> struct fold_chunk<0> { template< typename First , typename Last , typename State , typename ForwardOp > struct result_ { typedef First iter0; typedef State state0; typedef state0 state; typedef iter0 iterator; }; }; template<> struct fold_chunk<1> { template< typename First , typename Last , typename State , typename ForwardOp > struct result_ { typedef First iter0; typedef State state0; typedef typename apply2< ForwardOp, state0, typename deref::type >::type state1; typedef typename mpl::next::type iter1; typedef state1 state; typedef iter1 iterator; }; }; template<> struct fold_chunk<2> { template< typename First , typename Last , typename State , typename ForwardOp > struct result_ { typedef First iter0; typedef State state0; typedef typename apply2< ForwardOp, state0, typename deref::type >::type state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp, state1, typename deref::type >::type state2; typedef typename mpl::next::type iter2; typedef state2 state; typedef iter2 iterator; }; }; template<> struct fold_chunk<3> { template< typename First , typename Last , typename State , typename ForwardOp > struct result_ { typedef First iter0; typedef State state0; typedef typename apply2< ForwardOp, state0, typename deref::type >::type state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp, state1, typename deref::type >::type state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp, state2, typename deref::type >::type state3; typedef typename mpl::next::type iter3; typedef state3 state; typedef iter3 iterator; }; }; template<> struct fold_chunk<4> { template< typename First , typename Last , typename State , typename ForwardOp > struct result_ { typedef First iter0; typedef State state0; typedef typename apply2< ForwardOp, state0, typename deref::type >::type state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp, state1, typename deref::type >::type state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp, state2, typename deref::type >::type state3; typedef typename mpl::next::type iter3; typedef typename apply2< ForwardOp, state3, typename deref::type >::type state4; typedef typename mpl::next::type iter4; typedef state4 state; typedef iter4 iterator; }; }; template< int N > struct fold_chunk { template< typename First , typename Last , typename State , typename ForwardOp > struct result_ { typedef fold_impl< 4 , First , Last , State , ForwardOp > chunk_; typedef fold_impl< ( (N - 4) < 0 ? 0 : N - 4 ) , typename chunk_::iterator , Last , typename chunk_::state , ForwardOp > res_; typedef typename res_::state state; typedef typename res_::iterator iterator; }; }; template< typename First , typename Last , typename State , typename ForwardOp > struct fold_step; template< typename Last , typename State > struct fold_null_step { typedef Last iterator; typedef State state; }; template<> struct fold_chunk< -1 > { template< typename First , typename Last , typename State , typename ForwardOp > struct result_ { typedef typename if_< typename is_same< First,Last >::type , fold_null_step< Last,State > , fold_step< First,Last,State,ForwardOp > >::type res_; typedef typename res_::state state; typedef typename res_::iterator iterator; }; }; template< typename First , typename Last , typename State , typename ForwardOp > struct fold_step { typedef fold_chunk< -1 >::template result_< typename mpl::next::type , Last , typename apply2::type>::type , ForwardOp > chunk_; typedef typename chunk_::state state; typedef typename chunk_::iterator iterator; }; template< int N , typename First , typename Last , typename State , typename ForwardOp > struct fold_impl : fold_chunk ::template result_< First,Last,State,ForwardOp > { }; }}} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/no_ctps/full_lambda.hpp ================================================ // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/aux_/full_lambda.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< bool C1 = false, bool C2 = false, bool C3 = false, bool C4 = false , bool C5 = false > struct lambda_or : true_ { }; template<> struct lambda_or< false,false,false,false,false > : false_ { }; } // namespace aux template< typename T , typename Tag > struct lambda { typedef false_ is_le; typedef T result_; typedef T type; }; template< typename T > struct is_lambda_expression : lambda::is_le { }; template< int N, typename Tag > struct lambda< arg, Tag > { typedef true_ is_le; typedef mpl::arg result_; // qualified for the sake of MIPSpro 7.41 typedef mpl::protect type; }; template< typename F , typename Tag > struct lambda< bind0 , Tag > { typedef false_ is_le; typedef bind0< F > result_; typedef result_ type; }; namespace aux { template< typename IsLE, typename Tag , template< typename P1 > class F , typename L1 > struct le_result1 { typedef F< typename L1::type > result_; typedef result_ type; }; template< typename Tag , template< typename P1 > class F , typename L1 > struct le_result1< true_,Tag,F,L1 > { typedef bind1< quote1< F,Tag > , typename L1::result_ > result_; typedef mpl::protect type; }; } // namespace aux template< template< typename P1 > class F , typename T1 , typename Tag > struct lambda< F , Tag > { typedef lambda< T1,Tag > l1; typedef typename l1::is_le is_le1; typedef typename aux::lambda_or< is_le1::value >::type is_le; typedef aux::le_result1< is_le, Tag, F, l1 > le_result_; typedef typename le_result_::result_ result_; typedef typename le_result_::type type; }; template< typename F, typename T1 , typename Tag > struct lambda< bind1< F,T1 > , Tag > { typedef false_ is_le; typedef bind1< F , T1 > result_; typedef result_ type; }; namespace aux { template< typename IsLE, typename Tag , template< typename P1, typename P2 > class F , typename L1, typename L2 > struct le_result2 { typedef F< typename L1::type, typename L2::type > result_; typedef result_ type; }; template< typename Tag , template< typename P1, typename P2 > class F , typename L1, typename L2 > struct le_result2< true_,Tag,F,L1,L2 > { typedef bind2< quote2< F,Tag > , typename L1::result_, typename L2::result_ > result_; typedef mpl::protect type; }; } // namespace aux template< template< typename P1, typename P2 > class F , typename T1, typename T2 , typename Tag > struct lambda< F< T1,T2 > , Tag > { typedef lambda< T1,Tag > l1; typedef lambda< T2,Tag > l2; typedef typename l1::is_le is_le1; typedef typename l2::is_le is_le2; typedef typename aux::lambda_or< is_le1::value, is_le2::value >::type is_le; typedef aux::le_result2< is_le, Tag, F, l1, l2 > le_result_; typedef typename le_result_::result_ result_; typedef typename le_result_::type type; }; template< typename F, typename T1, typename T2 , typename Tag > struct lambda< bind2< F,T1,T2 > , Tag > { typedef false_ is_le; typedef bind2< F , T1, T2 > result_; typedef result_ type; }; namespace aux { template< typename IsLE, typename Tag , template< typename P1, typename P2, typename P3 > class F , typename L1, typename L2, typename L3 > struct le_result3 { typedef F< typename L1::type, typename L2::type, typename L3::type > result_; typedef result_ type; }; template< typename Tag , template< typename P1, typename P2, typename P3 > class F , typename L1, typename L2, typename L3 > struct le_result3< true_,Tag,F,L1,L2,L3 > { typedef bind3< quote3< F,Tag > , typename L1::result_, typename L2::result_, typename L3::result_ > result_; typedef mpl::protect type; }; } // namespace aux template< template< typename P1, typename P2, typename P3 > class F , typename T1, typename T2, typename T3 , typename Tag > struct lambda< F< T1,T2,T3 > , Tag > { typedef lambda< T1,Tag > l1; typedef lambda< T2,Tag > l2; typedef lambda< T3,Tag > l3; typedef typename l1::is_le is_le1; typedef typename l2::is_le is_le2; typedef typename l3::is_le is_le3; typedef typename aux::lambda_or< is_le1::value, is_le2::value, is_le3::value >::type is_le; typedef aux::le_result3< is_le, Tag, F, l1, l2, l3 > le_result_; typedef typename le_result_::result_ result_; typedef typename le_result_::type type; }; template< typename F, typename T1, typename T2, typename T3 , typename Tag > struct lambda< bind3< F,T1,T2,T3 > , Tag > { typedef false_ is_le; typedef bind3< F , T1, T2, T3 > result_; typedef result_ type; }; namespace aux { template< typename IsLE, typename Tag , template< typename P1, typename P2, typename P3, typename P4 > class F , typename L1, typename L2, typename L3, typename L4 > struct le_result4 { typedef F< typename L1::type, typename L2::type, typename L3::type , typename L4::type > result_; typedef result_ type; }; template< typename Tag , template< typename P1, typename P2, typename P3, typename P4 > class F , typename L1, typename L2, typename L3, typename L4 > struct le_result4< true_,Tag,F,L1,L2,L3,L4 > { typedef bind4< quote4< F,Tag > , typename L1::result_, typename L2::result_, typename L3::result_ , typename L4::result_ > result_; typedef mpl::protect type; }; } // namespace aux template< template< typename P1, typename P2, typename P3, typename P4 > class F , typename T1, typename T2, typename T3, typename T4 , typename Tag > struct lambda< F< T1,T2,T3,T4 > , Tag > { typedef lambda< T1,Tag > l1; typedef lambda< T2,Tag > l2; typedef lambda< T3,Tag > l3; typedef lambda< T4,Tag > l4; typedef typename l1::is_le is_le1; typedef typename l2::is_le is_le2; typedef typename l3::is_le is_le3; typedef typename l4::is_le is_le4; typedef typename aux::lambda_or< is_le1::value, is_le2::value, is_le3::value, is_le4::value >::type is_le; typedef aux::le_result4< is_le, Tag, F, l1, l2, l3, l4 > le_result_; typedef typename le_result_::result_ result_; typedef typename le_result_::type type; }; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename Tag > struct lambda< bind4< F,T1,T2,T3,T4 > , Tag > { typedef false_ is_le; typedef bind4< F , T1, T2, T3, T4 > result_; typedef result_ type; }; namespace aux { template< typename IsLE, typename Tag , template< typename P1, typename P2, typename P3, typename P4, typename P5 > class F , typename L1, typename L2, typename L3, typename L4, typename L5 > struct le_result5 { typedef F< typename L1::type, typename L2::type, typename L3::type , typename L4::type, typename L5::type > result_; typedef result_ type; }; template< typename Tag , template< typename P1, typename P2, typename P3, typename P4, typename P5 > class F , typename L1, typename L2, typename L3, typename L4, typename L5 > struct le_result5< true_,Tag,F,L1,L2,L3,L4,L5 > { typedef bind5< quote5< F,Tag > , typename L1::result_, typename L2::result_, typename L3::result_ , typename L4::result_, typename L5::result_ > result_; typedef mpl::protect type; }; } // namespace aux template< template< typename P1, typename P2, typename P3, typename P4 , typename P5 > class F , typename T1, typename T2, typename T3, typename T4, typename T5 , typename Tag > struct lambda< F< T1,T2,T3,T4,T5 > , Tag > { typedef lambda< T1,Tag > l1; typedef lambda< T2,Tag > l2; typedef lambda< T3,Tag > l3; typedef lambda< T4,Tag > l4; typedef lambda< T5,Tag > l5; typedef typename l1::is_le is_le1; typedef typename l2::is_le is_le2; typedef typename l3::is_le is_le3; typedef typename l4::is_le is_le4; typedef typename l5::is_le is_le5; typedef typename aux::lambda_or< is_le1::value, is_le2::value, is_le3::value, is_le4::value , is_le5::value >::type is_le; typedef aux::le_result5< is_le, Tag, F, l1, l2, l3, l4, l5 > le_result_; typedef typename le_result_::result_ result_; typedef typename le_result_::type type; }; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 , typename Tag > struct lambda< bind5< F,T1,T2,T3,T4,T5 > , Tag > { typedef false_ is_le; typedef bind5< F , T1, T2, T3, T4, T5 > result_; typedef result_ type; }; /// special case for 'protect' template< typename T, typename Tag > struct lambda< mpl::protect, Tag > { typedef false_ is_le; typedef mpl::protect result_; typedef result_ type; }; /// specializations for the main 'bind' form template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 , typename Tag > struct lambda< bind< F,T1,T2,T3,T4,T5 > , Tag > { typedef false_ is_le; typedef bind< F,T1,T2,T3,T4,T5 > result_; typedef result_ type; }; /// workaround for MWCW 8.3+/EDG < 303, leads to ambiguity on Digital Mars template< typename F, typename Tag1, typename Tag2 > struct lambda< lambda< F,Tag1 > , Tag2 > { typedef lambda< F,Tag2 > l1; typedef lambda< Tag1,Tag2 > l2; typedef typename l1::is_le is_le; typedef aux::le_result2 le_result_; typedef typename le_result_::result_ result_; typedef typename le_result_::type type; }; BOOST_MPL_AUX_NA_SPEC(2, lambda) }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/no_ctps/greater.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/greater.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct greater_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< greater_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< greater_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct greater_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template<> struct greater_impl< na,integral_c_tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template<> struct greater_impl< integral_c_tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct greater_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct greater : greater_impl< typename greater_tag::type , typename greater_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, greater, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 2, greater) }} namespace boost { namespace mpl { template<> struct greater_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value > BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/no_ctps/greater_equal.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/greater_equal.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct greater_equal_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< greater_equal_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< greater_equal_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct greater_equal_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template<> struct greater_equal_impl< na,integral_c_tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template<> struct greater_equal_impl< integral_c_tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct greater_equal_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct greater_equal : greater_equal_impl< typename greater_equal_tag::type , typename greater_equal_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, greater_equal, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 2, greater_equal) }} namespace boost { namespace mpl { template<> struct greater_equal_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value >= BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/no_ctps/inherit.hpp ================================================ // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/inherit.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< bool C1, bool C2 > struct inherit2_impl { template< typename Derived, typename T1, typename T2 > struct result_ : T1, T2 { typedef Derived type_; }; }; template<> struct inherit2_impl< false,true > { template< typename Derived, typename T1, typename T2 > struct result_ : T1 { typedef T1 type_; }; }; template<> struct inherit2_impl< true,false > { template< typename Derived, typename T1, typename T2 > struct result_ : T2 { typedef T2 type_; }; }; template<> struct inherit2_impl< true,true > { template< typename Derived, typename T1, typename T2 > struct result_ { typedef T1 type_; }; }; } // namespace aux template< typename BOOST_MPL_AUX_NA_PARAM(T1) , typename BOOST_MPL_AUX_NA_PARAM(T2) > struct inherit2 : aux::inherit2_impl< is_empty_base::value , is_empty_base::value >::template result_< inherit2< T1,T2 >,T1, T2 > { typedef typename inherit2::type_ type; BOOST_MPL_AUX_LAMBDA_SUPPORT(2, inherit2, (T1, T2)) }; BOOST_MPL_AUX_NA_SPEC(2, inherit2) template< typename T1 = na, typename T2 = na, typename T3 = na > struct inherit3 : inherit2< typename inherit2< T1, T2 >::type , T3 > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 3 , inherit3 , ( T1, T2, T3) ) }; BOOST_MPL_AUX_NA_SPEC(3, inherit3) template< typename T1 = na, typename T2 = na, typename T3 = na, typename T4 = na > struct inherit4 : inherit2< typename inherit3< T1, T2, T3 >::type , T4 > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 4 , inherit4 , ( T1, T2, T3, T4) ) }; BOOST_MPL_AUX_NA_SPEC(4, inherit4) template< typename T1 = na, typename T2 = na, typename T3 = na, typename T4 = na , typename T5 = na > struct inherit5 : inherit2< typename inherit4< T1, T2, T3, T4 >::type , T5 > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , inherit5 , ( T1, T2, T3, T4, T5) ) }; BOOST_MPL_AUX_NA_SPEC(5, inherit5) /// primary template template< typename T1 = empty_base, typename T2 = empty_base , typename T3 = empty_base, typename T4 = empty_base , typename T5 = empty_base > struct inherit : inherit5< T1,T2,T3,T4,T5 > { }; template<> struct inherit< na,na,na,na,na > { template< typename T1 = empty_base, typename T2 = empty_base , typename T3 = empty_base, typename T4 = empty_base , typename T5 = empty_base > struct apply : inherit< T1,T2,T3,T4,T5 > { }; }; BOOST_MPL_AUX_NA_SPEC_LAMBDA(5, inherit) BOOST_MPL_AUX_NA_SPEC_ARITY(5, inherit) BOOST_MPL_AUX_NA_SPEC_TEMPLATE_ARITY(5, 5, inherit) }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/no_ctps/iter_fold_if_impl.hpp ================================================ // Copyright Aleksey Gurtovoy 2001-2004 // Copyright David Abrahams 2001-2002 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/aux_/iter_fold_if_impl.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< typename Iterator, typename State > struct iter_fold_if_null_step { typedef State state; typedef Iterator iterator; }; template< bool > struct iter_fold_if_step_impl { template< typename Iterator , typename State , typename StateOp , typename IteratorOp > struct result_ { typedef typename apply2< StateOp,State,Iterator >::type state; typedef typename IteratorOp::type iterator; }; }; template<> struct iter_fold_if_step_impl { template< typename Iterator , typename State , typename StateOp , typename IteratorOp > struct result_ { typedef State state; typedef Iterator iterator; }; }; template< typename Iterator , typename State , typename ForwardOp , typename Predicate > struct iter_fold_if_forward_step { typedef typename apply2< Predicate,State,Iterator >::type not_last; typedef typename iter_fold_if_step_impl< BOOST_MPL_AUX_MSVC_VALUE_WKND(not_last)::value >::template result_< Iterator,State,ForwardOp, mpl::next > impl_; typedef typename impl_::state state; typedef typename impl_::iterator iterator; }; template< typename Iterator , typename State , typename BackwardOp , typename Predicate > struct iter_fold_if_backward_step { typedef typename apply2< Predicate,State,Iterator >::type not_last; typedef typename iter_fold_if_step_impl< BOOST_MPL_AUX_MSVC_VALUE_WKND(not_last)::value >::template result_< Iterator,State,BackwardOp, identity > impl_; typedef typename impl_::state state; typedef typename impl_::iterator iterator; }; template< typename Iterator , typename State , typename ForwardOp , typename ForwardPredicate , typename BackwardOp , typename BackwardPredicate > struct iter_fold_if_impl { private: typedef iter_fold_if_null_step< Iterator,State > forward_step0; typedef iter_fold_if_forward_step< typename forward_step0::iterator, typename forward_step0::state, ForwardOp, ForwardPredicate > forward_step1; typedef iter_fold_if_forward_step< typename forward_step1::iterator, typename forward_step1::state, ForwardOp, ForwardPredicate > forward_step2; typedef iter_fold_if_forward_step< typename forward_step2::iterator, typename forward_step2::state, ForwardOp, ForwardPredicate > forward_step3; typedef iter_fold_if_forward_step< typename forward_step3::iterator, typename forward_step3::state, ForwardOp, ForwardPredicate > forward_step4; typedef typename if_< typename forward_step4::not_last , iter_fold_if_impl< typename forward_step4::iterator , typename forward_step4::state , ForwardOp , ForwardPredicate , BackwardOp , BackwardPredicate > , iter_fold_if_null_step< typename forward_step4::iterator , typename forward_step4::state > >::type backward_step4; typedef iter_fold_if_backward_step< typename forward_step3::iterator, typename backward_step4::state, BackwardOp, BackwardPredicate > backward_step3; typedef iter_fold_if_backward_step< typename forward_step2::iterator, typename backward_step3::state, BackwardOp, BackwardPredicate > backward_step2; typedef iter_fold_if_backward_step< typename forward_step1::iterator, typename backward_step2::state, BackwardOp, BackwardPredicate > backward_step1; typedef iter_fold_if_backward_step< typename forward_step0::iterator, typename backward_step1::state, BackwardOp, BackwardPredicate > backward_step0; public: typedef typename backward_step0::state state; typedef typename backward_step4::iterator iterator; }; }}} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/no_ctps/iter_fold_impl.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/aux_/iter_fold_impl.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { /// forward declaration template< int N , typename First , typename Last , typename State , typename ForwardOp > struct iter_fold_impl; template< int N > struct iter_fold_chunk; template<> struct iter_fold_chunk<0> { template< typename First , typename Last , typename State , typename ForwardOp > struct result_ { typedef First iter0; typedef State state0; typedef state0 state; typedef iter0 iterator; }; }; template<> struct iter_fold_chunk<1> { template< typename First , typename Last , typename State , typename ForwardOp > struct result_ { typedef First iter0; typedef State state0; typedef typename apply2< ForwardOp,state0,iter0 >::type state1; typedef typename mpl::next::type iter1; typedef state1 state; typedef iter1 iterator; }; }; template<> struct iter_fold_chunk<2> { template< typename First , typename Last , typename State , typename ForwardOp > struct result_ { typedef First iter0; typedef State state0; typedef typename apply2< ForwardOp,state0,iter0 >::type state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp,state1,iter1 >::type state2; typedef typename mpl::next::type iter2; typedef state2 state; typedef iter2 iterator; }; }; template<> struct iter_fold_chunk<3> { template< typename First , typename Last , typename State , typename ForwardOp > struct result_ { typedef First iter0; typedef State state0; typedef typename apply2< ForwardOp,state0,iter0 >::type state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp,state1,iter1 >::type state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp,state2,iter2 >::type state3; typedef typename mpl::next::type iter3; typedef state3 state; typedef iter3 iterator; }; }; template<> struct iter_fold_chunk<4> { template< typename First , typename Last , typename State , typename ForwardOp > struct result_ { typedef First iter0; typedef State state0; typedef typename apply2< ForwardOp,state0,iter0 >::type state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp,state1,iter1 >::type state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp,state2,iter2 >::type state3; typedef typename mpl::next::type iter3; typedef typename apply2< ForwardOp,state3,iter3 >::type state4; typedef typename mpl::next::type iter4; typedef state4 state; typedef iter4 iterator; }; }; template< int N > struct iter_fold_chunk { template< typename First , typename Last , typename State , typename ForwardOp > struct result_ { typedef iter_fold_impl< 4 , First , Last , State , ForwardOp > chunk_; typedef iter_fold_impl< ( (N - 4) < 0 ? 0 : N - 4 ) , typename chunk_::iterator , Last , typename chunk_::state , ForwardOp > res_; typedef typename res_::state state; typedef typename res_::iterator iterator; }; }; template< typename First , typename Last , typename State , typename ForwardOp > struct iter_fold_step; template< typename Last , typename State > struct iter_fold_null_step { typedef Last iterator; typedef State state; }; template<> struct iter_fold_chunk< -1 > { template< typename First , typename Last , typename State , typename ForwardOp > struct result_ { typedef typename if_< typename is_same< First,Last >::type , iter_fold_null_step< Last,State > , iter_fold_step< First,Last,State,ForwardOp > >::type res_; typedef typename res_::state state; typedef typename res_::iterator iterator; }; }; template< typename First , typename Last , typename State , typename ForwardOp > struct iter_fold_step { typedef iter_fold_chunk< -1 >::template result_< typename mpl::next::type , Last , typename apply2< ForwardOp,State,First >::type , ForwardOp > chunk_; typedef typename chunk_::state state; typedef typename chunk_::iterator iterator; }; template< int N , typename First , typename Last , typename State , typename ForwardOp > struct iter_fold_impl : iter_fold_chunk ::template result_< First,Last,State,ForwardOp > { }; }}} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/no_ctps/lambda_no_ctps.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/aux_/lambda_no_ctps.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< bool C1 = false, bool C2 = false, bool C3 = false, bool C4 = false , bool C5 = false > struct lambda_or : true_ { }; template<> struct lambda_or< false,false,false,false,false > : false_ { }; template< typename Arity > struct lambda_impl { template< typename T, typename Tag, typename Protect > struct result_ { typedef T type; typedef is_placeholder is_le; }; }; template<> struct lambda_impl< int_<1> > { template< typename F, typename Tag, typename Protect > struct result_ { typedef lambda< typename F::arg1, Tag, false_ > l1; typedef typename l1::is_le is_le1; typedef aux::lambda_or< BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value > is_le; typedef bind1< typename F::rebind , typename l1::type > bind_; typedef typename if_< is_le , if_< Protect, mpl::protect, bind_ > , identity >::type type_; typedef typename type_::type type; }; }; template<> struct lambda_impl< int_<2> > { template< typename F, typename Tag, typename Protect > struct result_ { typedef lambda< typename F::arg1, Tag, false_ > l1; typedef lambda< typename F::arg2, Tag, false_ > l2; typedef typename l1::is_le is_le1; typedef typename l2::is_le is_le2; typedef aux::lambda_or< BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value > is_le; typedef bind2< typename F::rebind , typename l1::type, typename l2::type > bind_; typedef typename if_< is_le , if_< Protect, mpl::protect, bind_ > , identity >::type type_; typedef typename type_::type type; }; }; template<> struct lambda_impl< int_<3> > { template< typename F, typename Tag, typename Protect > struct result_ { typedef lambda< typename F::arg1, Tag, false_ > l1; typedef lambda< typename F::arg2, Tag, false_ > l2; typedef lambda< typename F::arg3, Tag, false_ > l3; typedef typename l1::is_le is_le1; typedef typename l2::is_le is_le2; typedef typename l3::is_le is_le3; typedef aux::lambda_or< BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le3)::value > is_le; typedef bind3< typename F::rebind , typename l1::type, typename l2::type, typename l3::type > bind_; typedef typename if_< is_le , if_< Protect, mpl::protect, bind_ > , identity >::type type_; typedef typename type_::type type; }; }; template<> struct lambda_impl< int_<4> > { template< typename F, typename Tag, typename Protect > struct result_ { typedef lambda< typename F::arg1, Tag, false_ > l1; typedef lambda< typename F::arg2, Tag, false_ > l2; typedef lambda< typename F::arg3, Tag, false_ > l3; typedef lambda< typename F::arg4, Tag, false_ > l4; typedef typename l1::is_le is_le1; typedef typename l2::is_le is_le2; typedef typename l3::is_le is_le3; typedef typename l4::is_le is_le4; typedef aux::lambda_or< BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le3)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le4)::value > is_le; typedef bind4< typename F::rebind , typename l1::type, typename l2::type, typename l3::type , typename l4::type > bind_; typedef typename if_< is_le , if_< Protect, mpl::protect, bind_ > , identity >::type type_; typedef typename type_::type type; }; }; template<> struct lambda_impl< int_<5> > { template< typename F, typename Tag, typename Protect > struct result_ { typedef lambda< typename F::arg1, Tag, false_ > l1; typedef lambda< typename F::arg2, Tag, false_ > l2; typedef lambda< typename F::arg3, Tag, false_ > l3; typedef lambda< typename F::arg4, Tag, false_ > l4; typedef lambda< typename F::arg5, Tag, false_ > l5; typedef typename l1::is_le is_le1; typedef typename l2::is_le is_le2; typedef typename l3::is_le is_le3; typedef typename l4::is_le is_le4; typedef typename l5::is_le is_le5; typedef aux::lambda_or< BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le3)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le4)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le5)::value > is_le; typedef bind5< typename F::rebind , typename l1::type, typename l2::type, typename l3::type , typename l4::type, typename l5::type > bind_; typedef typename if_< is_le , if_< Protect, mpl::protect, bind_ > , identity >::type type_; typedef typename type_::type type; }; }; } // namespace aux template< typename T , typename Tag , typename Protect > struct lambda { /// Metafunction forwarding confuses MSVC 6.x typedef typename aux::template_arity::type arity_; typedef typename aux::lambda_impl ::template result_< T,Tag,Protect > l_; typedef typename l_::type type; typedef typename l_::is_le is_le; BOOST_MPL_AUX_LAMBDA_SUPPORT(3, lambda, (T, Tag, Protect)) }; BOOST_MPL_AUX_NA_SPEC2(1, 3, lambda) template< typename T > struct is_lambda_expression : lambda::is_le { }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/no_ctps/less.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/less.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct less_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< less_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< less_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct less_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template<> struct less_impl< na,integral_c_tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template<> struct less_impl< integral_c_tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct less_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct less : less_impl< typename less_tag::type , typename less_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, less, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 2, less) }} namespace boost { namespace mpl { template<> struct less_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N2)::value > BOOST_MPL_AUX_VALUE_WKND(N1)::value ) > { }; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/no_ctps/less_equal.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/less_equal.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct less_equal_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< less_equal_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< less_equal_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct less_equal_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template<> struct less_equal_impl< na,integral_c_tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template<> struct less_equal_impl< integral_c_tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct less_equal_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct less_equal : less_equal_impl< typename less_equal_tag::type , typename less_equal_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, less_equal, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 2, less_equal) }} namespace boost { namespace mpl { template<> struct less_equal_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value <= BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/no_ctps/list.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/list.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< int N > struct list_chooser; } namespace aux { template<> struct list_chooser<0> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef list0< >::type type; }; }; } // namespace aux namespace aux { template<> struct list_chooser<1> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename list1< T0 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_chooser<2> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename list2< T0, T1 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_chooser<3> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename list3< T0, T1, T2 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_chooser<4> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename list4< T0, T1, T2, T3 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_chooser<5> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename list5< T0, T1, T2, T3, T4 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_chooser<6> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename list6< T0, T1, T2, T3, T4, T5 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_chooser<7> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename list7< T0, T1, T2, T3, T4, T5, T6 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_chooser<8> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename list8< T0, T1, T2, T3, T4, T5, T6, T7 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_chooser<9> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename list9< T0, T1, T2, T3, T4, T5, T6, T7, T8 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_chooser<10> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename list10< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_chooser<11> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename list11< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_chooser<12> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename list12< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_chooser<13> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename list13< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_chooser<14> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename list14< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_chooser<15> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename list15< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_chooser<16> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename list16< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_chooser<17> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename list17< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_chooser<18> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename list18< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_chooser<19> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename list19< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_chooser<20> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename list20< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 >::type type; }; }; } // namespace aux namespace aux { template< typename T > struct is_list_arg { BOOST_STATIC_CONSTANT(bool, value = true); }; template<> struct is_list_arg { BOOST_STATIC_CONSTANT(bool, value = false); }; template< typename T1, typename T2, typename T3, typename T4, typename T5 , typename T6, typename T7, typename T8, typename T9, typename T10 , typename T11, typename T12, typename T13, typename T14, typename T15 , typename T16, typename T17, typename T18, typename T19, typename T20 > struct list_count_args { BOOST_STATIC_CONSTANT(int, value = is_list_arg::value + is_list_arg::value + is_list_arg::value + is_list_arg::value + is_list_arg::value + is_list_arg::value + is_list_arg::value + is_list_arg::value + is_list_arg::value + is_list_arg::value + is_list_arg::value + is_list_arg::value + is_list_arg::value + is_list_arg::value + is_list_arg::value + is_list_arg::value + is_list_arg::value + is_list_arg::value + is_list_arg::value + is_list_arg::value ); }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct list_impl { typedef aux::list_count_args< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 > arg_num_; typedef typename aux::list_chooser< arg_num_::value > ::template result_< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; }; } // namespace aux template< typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na , typename T12 = na, typename T13 = na, typename T14 = na , typename T15 = na, typename T16 = na, typename T17 = na , typename T18 = na, typename T19 = na > struct list : aux::list_impl< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 >::type { typedef typename aux::list_impl< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 >::type type; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/no_ctps/list_c.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/list_c.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< int N > struct list_c_chooser; } namespace aux { template<> struct list_c_chooser<0> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename list0_c< T >::type type; }; }; } // namespace aux namespace aux { template<> struct list_c_chooser<1> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename list1_c< T, C0 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_c_chooser<2> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename list2_c< T, C0, C1 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_c_chooser<3> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename list3_c< T, C0, C1, C2 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_c_chooser<4> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename list4_c< T, C0, C1, C2, C3 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_c_chooser<5> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename list5_c< T, C0, C1, C2, C3, C4 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_c_chooser<6> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename list6_c< T, C0, C1, C2, C3, C4, C5 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_c_chooser<7> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename list7_c< T, C0, C1, C2, C3, C4, C5, C6 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_c_chooser<8> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename list8_c< T, C0, C1, C2, C3, C4, C5, C6, C7 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_c_chooser<9> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename list9_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_c_chooser<10> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename list10_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_c_chooser<11> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename list11_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_c_chooser<12> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename list12_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_c_chooser<13> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename list13_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_c_chooser<14> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename list14_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_c_chooser<15> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename list15_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_c_chooser<16> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename list16_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_c_chooser<17> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename list17_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_c_chooser<18> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename list18_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_c_chooser<19> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename list19_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18 >::type type; }; }; } // namespace aux namespace aux { template<> struct list_c_chooser<20> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename list20_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19 >::type type; }; }; } // namespace aux namespace aux { template< long C > struct is_list_c_arg { BOOST_STATIC_CONSTANT(bool, value = true); }; template<> struct is_list_c_arg { BOOST_STATIC_CONSTANT(bool, value = false); }; template< long C1, long C2, long C3, long C4, long C5, long C6, long C7, long C8 , long C9, long C10, long C11, long C12, long C13, long C14, long C15 , long C16, long C17, long C18, long C19, long C20 > struct list_c_count_args { BOOST_STATIC_CONSTANT(int, value = is_list_c_arg::value + is_list_c_arg::value + is_list_c_arg::value + is_list_c_arg::value + is_list_c_arg::value + is_list_c_arg::value + is_list_c_arg::value + is_list_c_arg::value + is_list_c_arg::value + is_list_c_arg::value + is_list_c_arg::value + is_list_c_arg::value + is_list_c_arg::value + is_list_c_arg::value + is_list_c_arg::value + is_list_c_arg::value + is_list_c_arg::value + is_list_c_arg::value + is_list_c_arg::value + is_list_c_arg::value ); }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct list_c_impl { typedef aux::list_c_count_args< C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19 > arg_num_; typedef typename aux::list_c_chooser< arg_num_::value > ::template result_< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19 >::type type; }; } // namespace aux template< typename T, long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX , long C3 = LONG_MAX, long C4 = LONG_MAX, long C5 = LONG_MAX , long C6 = LONG_MAX, long C7 = LONG_MAX, long C8 = LONG_MAX , long C9 = LONG_MAX, long C10 = LONG_MAX, long C11 = LONG_MAX , long C12 = LONG_MAX, long C13 = LONG_MAX, long C14 = LONG_MAX , long C15 = LONG_MAX, long C16 = LONG_MAX, long C17 = LONG_MAX , long C18 = LONG_MAX, long C19 = LONG_MAX > struct list_c : aux::list_c_impl< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19 >::type { typedef typename aux::list_c_impl< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19 >::type type; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/no_ctps/map.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/map.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< int N > struct map_chooser; } namespace aux { template<> struct map_chooser<0> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef map0< >::type type; }; }; } // namespace aux namespace aux { template<> struct map_chooser<1> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename map1< T0 >::type type; }; }; } // namespace aux namespace aux { template<> struct map_chooser<2> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename map2< T0, T1 >::type type; }; }; } // namespace aux namespace aux { template<> struct map_chooser<3> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename map3< T0, T1, T2 >::type type; }; }; } // namespace aux namespace aux { template<> struct map_chooser<4> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename map4< T0, T1, T2, T3 >::type type; }; }; } // namespace aux namespace aux { template<> struct map_chooser<5> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename map5< T0, T1, T2, T3, T4 >::type type; }; }; } // namespace aux namespace aux { template<> struct map_chooser<6> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename map6< T0, T1, T2, T3, T4, T5 >::type type; }; }; } // namespace aux namespace aux { template<> struct map_chooser<7> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename map7< T0, T1, T2, T3, T4, T5, T6 >::type type; }; }; } // namespace aux namespace aux { template<> struct map_chooser<8> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename map8< T0, T1, T2, T3, T4, T5, T6, T7 >::type type; }; }; } // namespace aux namespace aux { template<> struct map_chooser<9> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename map9< T0, T1, T2, T3, T4, T5, T6, T7, T8 >::type type; }; }; } // namespace aux namespace aux { template<> struct map_chooser<10> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename map10< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9 >::type type; }; }; } // namespace aux namespace aux { template<> struct map_chooser<11> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename map11< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10 >::type type; }; }; } // namespace aux namespace aux { template<> struct map_chooser<12> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename map12< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11 >::type type; }; }; } // namespace aux namespace aux { template<> struct map_chooser<13> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename map13< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12 >::type type; }; }; } // namespace aux namespace aux { template<> struct map_chooser<14> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename map14< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13 >::type type; }; }; } // namespace aux namespace aux { template<> struct map_chooser<15> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename map15< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 >::type type; }; }; } // namespace aux namespace aux { template<> struct map_chooser<16> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename map16< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15 >::type type; }; }; } // namespace aux namespace aux { template<> struct map_chooser<17> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename map17< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16 >::type type; }; }; } // namespace aux namespace aux { template<> struct map_chooser<18> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename map18< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17 >::type type; }; }; } // namespace aux namespace aux { template<> struct map_chooser<19> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename map19< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18 >::type type; }; }; } // namespace aux namespace aux { template<> struct map_chooser<20> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename map20< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 >::type type; }; }; } // namespace aux namespace aux { template< typename T > struct is_map_arg { BOOST_STATIC_CONSTANT(bool, value = true); }; template<> struct is_map_arg { BOOST_STATIC_CONSTANT(bool, value = false); }; template< typename T1, typename T2, typename T3, typename T4, typename T5 , typename T6, typename T7, typename T8, typename T9, typename T10 , typename T11, typename T12, typename T13, typename T14, typename T15 , typename T16, typename T17, typename T18, typename T19, typename T20 > struct map_count_args { BOOST_STATIC_CONSTANT(int, value = is_map_arg::value + is_map_arg::value + is_map_arg::value + is_map_arg::value + is_map_arg::value + is_map_arg::value + is_map_arg::value + is_map_arg::value + is_map_arg::value + is_map_arg::value + is_map_arg::value + is_map_arg::value + is_map_arg::value + is_map_arg::value + is_map_arg::value + is_map_arg::value + is_map_arg::value + is_map_arg::value + is_map_arg::value + is_map_arg::value ); }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct map_impl { typedef aux::map_count_args< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 > arg_num_; typedef typename aux::map_chooser< arg_num_::value > ::template result_< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; }; } // namespace aux template< typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na , typename T12 = na, typename T13 = na, typename T14 = na , typename T15 = na, typename T16 = na, typename T17 = na , typename T18 = na, typename T19 = na > struct map : aux::map_impl< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 >::type { typedef typename aux::map_impl< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 >::type type; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/no_ctps/minus.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/minus.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct minus_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< minus_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< minus_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct minus_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template<> struct minus_impl< na,integral_c_tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template<> struct minus_impl< integral_c_tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct minus_tag { typedef typename T::tag type; }; /// forward declaration template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct minus2; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) , typename N3 = na, typename N4 = na, typename N5 = na > struct minus : if_< is_na , minus2< N1,N2 > , minus< minus2< N1,N2 > , N3, N4, N5 > >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , minus , ( N1, N2, N3, N4, N5 ) ) }; template< typename N1 , typename N2 > struct minus2 : minus_impl< typename minus_tag::type , typename minus_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, minus2, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 5, minus) }} namespace boost { namespace mpl { template<> struct minus_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : integral_c< typename aux::largest_int< typename N1::value_type , typename N2::value_type >::type , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value - BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/no_ctps/modulus.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/modulus.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct modulus_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< modulus_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< modulus_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct modulus_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template<> struct modulus_impl< na,integral_c_tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template<> struct modulus_impl< integral_c_tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct modulus_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct modulus : modulus_impl< typename modulus_tag::type , typename modulus_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, modulus, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 2, modulus) }} namespace boost { namespace mpl { template<> struct modulus_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : integral_c< typename aux::largest_int< typename N1::value_type , typename N2::value_type >::type , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value % BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/no_ctps/not_equal_to.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/not_equal_to.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct not_equal_to_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< not_equal_to_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< not_equal_to_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct not_equal_to_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template<> struct not_equal_to_impl< na,integral_c_tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template<> struct not_equal_to_impl< integral_c_tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct not_equal_to_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct not_equal_to : not_equal_to_impl< typename not_equal_to_tag::type , typename not_equal_to_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, not_equal_to, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 2, not_equal_to) }} namespace boost { namespace mpl { template<> struct not_equal_to_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value != BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/no_ctps/or.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/or.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< bool C_ > struct or_impl { template< typename T1, typename T2, typename T3, typename T4 > struct result_ : true_ { }; }; template<> struct or_impl { template< typename T1, typename T2, typename T3, typename T4 > struct result_ : or_impl< BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value >::template result_< T2,T3,T4,false_ > { }; }; template<> struct or_impl ::result_< false_,false_,false_,false_ > : false_ { }; } // namespace aux template< typename BOOST_MPL_AUX_NA_PARAM(T1) , typename BOOST_MPL_AUX_NA_PARAM(T2) , typename T3 = false_, typename T4 = false_, typename T5 = false_ > struct or_ : aux::or_impl< BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value >::template result_< T2,T3,T4,T5 > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , or_ , ( T1, T2, T3, T4, T5) ) }; BOOST_MPL_AUX_NA_SPEC2( 2 , 5 , or_ ) }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/no_ctps/placeholders.hpp ================================================ // Copyright Aleksey Gurtovoy 2001-2004 // Copyright Peter Dimov 2001-2003 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/placeholders.hpp" header // -- DO NOT modify by hand! BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg< -1 > _; BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE namespace boost { namespace mpl { BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_) namespace placeholders { using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_; } }} /// agurt, 17/mar/02: one more placeholder for the last 'apply#' /// specialization BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg<1> _1; BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE namespace boost { namespace mpl { BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_1) namespace placeholders { using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_1; } }} BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg<2> _2; BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE namespace boost { namespace mpl { BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_2) namespace placeholders { using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_2; } }} BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg<3> _3; BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE namespace boost { namespace mpl { BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_3) namespace placeholders { using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_3; } }} BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg<4> _4; BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE namespace boost { namespace mpl { BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_4) namespace placeholders { using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_4; } }} BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg<5> _5; BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE namespace boost { namespace mpl { BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_5) namespace placeholders { using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_5; } }} BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg<6> _6; BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE namespace boost { namespace mpl { BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_6) namespace placeholders { using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_6; } }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/no_ctps/plus.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/plus.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct plus_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< plus_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< plus_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct plus_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template<> struct plus_impl< na,integral_c_tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template<> struct plus_impl< integral_c_tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct plus_tag { typedef typename T::tag type; }; /// forward declaration template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct plus2; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) , typename N3 = na, typename N4 = na, typename N5 = na > struct plus : if_< is_na , plus2< N1,N2 > , plus< plus2< N1,N2 > , N3, N4, N5 > >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , plus , ( N1, N2, N3, N4, N5 ) ) }; template< typename N1 , typename N2 > struct plus2 : plus_impl< typename plus_tag::type , typename plus_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, plus2, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 5, plus) }} namespace boost { namespace mpl { template<> struct plus_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : integral_c< typename aux::largest_int< typename N1::value_type , typename N2::value_type >::type , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/no_ctps/quote.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/quote.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< bool > struct quote_impl { template< typename T > struct result_ : T { }; }; template<> struct quote_impl { template< typename T > struct result_ { typedef T type; }; }; template< template< typename P1 > class F , typename Tag = void_ > struct quote1 { template< typename U1 > struct apply : quote_impl< aux::has_type< F >::value > ::template result_< F > { }; }; template< template< typename P1, typename P2 > class F , typename Tag = void_ > struct quote2 { template< typename U1, typename U2 > struct apply : quote_impl< aux::has_type< F< U1,U2 > >::value > ::template result_< F< U1,U2 > > { }; }; template< template< typename P1, typename P2, typename P3 > class F , typename Tag = void_ > struct quote3 { template< typename U1, typename U2, typename U3 > struct apply : quote_impl< aux::has_type< F< U1,U2,U3 > >::value > ::template result_< F< U1,U2,U3 > > { }; }; template< template< typename P1, typename P2, typename P3, typename P4 > class F , typename Tag = void_ > struct quote4 { template< typename U1, typename U2, typename U3, typename U4 > struct apply : quote_impl< aux::has_type< F< U1,U2,U3,U4 > >::value > ::template result_< F< U1,U2,U3,U4 > > { }; }; template< template< typename P1, typename P2, typename P3, typename P4 , typename P5 > class F , typename Tag = void_ > struct quote5 { template< typename U1, typename U2, typename U3, typename U4 , typename U5 > struct apply : quote_impl< aux::has_type< F< U1,U2,U3,U4,U5 > >::value > ::template result_< F< U1,U2,U3,U4,U5 > > { }; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/no_ctps/reverse_fold_impl.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/aux_/reverse_fold_impl.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { /// forward declaration template< long N , typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_fold_impl; template< long N > struct reverse_fold_chunk; template<> struct reverse_fold_chunk<0> { template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct result_ { typedef First iter0; typedef State fwd_state0; typedef fwd_state0 bkwd_state0; typedef bkwd_state0 state; typedef iter0 iterator; }; }; template<> struct reverse_fold_chunk<1> { template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct result_ { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; typedef typename mpl::next::type iter1; typedef fwd_state1 bkwd_state1; typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; typedef bkwd_state0 state; typedef iter1 iterator; }; }; template<> struct reverse_fold_chunk<2> { template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct result_ { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp, fwd_state1, typename deref::type >::type fwd_state2; typedef typename mpl::next::type iter2; typedef fwd_state2 bkwd_state2; typedef typename apply2< BackwardOp, bkwd_state2, typename deref::type >::type bkwd_state1; typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; typedef bkwd_state0 state; typedef iter2 iterator; }; }; template<> struct reverse_fold_chunk<3> { template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct result_ { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp, fwd_state1, typename deref::type >::type fwd_state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp, fwd_state2, typename deref::type >::type fwd_state3; typedef typename mpl::next::type iter3; typedef fwd_state3 bkwd_state3; typedef typename apply2< BackwardOp, bkwd_state3, typename deref::type >::type bkwd_state2; typedef typename apply2< BackwardOp, bkwd_state2, typename deref::type >::type bkwd_state1; typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; typedef bkwd_state0 state; typedef iter3 iterator; }; }; template<> struct reverse_fold_chunk<4> { template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct result_ { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp, fwd_state1, typename deref::type >::type fwd_state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp, fwd_state2, typename deref::type >::type fwd_state3; typedef typename mpl::next::type iter3; typedef typename apply2< ForwardOp, fwd_state3, typename deref::type >::type fwd_state4; typedef typename mpl::next::type iter4; typedef fwd_state4 bkwd_state4; typedef typename apply2< BackwardOp, bkwd_state4, typename deref::type >::type bkwd_state3; typedef typename apply2< BackwardOp, bkwd_state3, typename deref::type >::type bkwd_state2; typedef typename apply2< BackwardOp, bkwd_state2, typename deref::type >::type bkwd_state1; typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; typedef bkwd_state0 state; typedef iter4 iterator; }; }; template< long N > struct reverse_fold_chunk { template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct result_ { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp, fwd_state1, typename deref::type >::type fwd_state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp, fwd_state2, typename deref::type >::type fwd_state3; typedef typename mpl::next::type iter3; typedef typename apply2< ForwardOp, fwd_state3, typename deref::type >::type fwd_state4; typedef typename mpl::next::type iter4; typedef reverse_fold_impl< ( (N - 4) < 0 ? 0 : N - 4 ) , iter4 , Last , fwd_state4 , BackwardOp , ForwardOp > nested_chunk; typedef typename nested_chunk::state bkwd_state4; typedef typename apply2< BackwardOp, bkwd_state4, typename deref::type >::type bkwd_state3; typedef typename apply2< BackwardOp, bkwd_state3, typename deref::type >::type bkwd_state2; typedef typename apply2< BackwardOp, bkwd_state2, typename deref::type >::type bkwd_state1; typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; typedef bkwd_state0 state; typedef typename nested_chunk::iterator iterator; }; }; template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_fold_step; template< typename Last , typename State > struct reverse_fold_null_step { typedef Last iterator; typedef State state; }; template<> struct reverse_fold_chunk< -1 > { template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct result_ { typedef typename if_< typename is_same< First,Last >::type , reverse_fold_null_step< Last,State > , reverse_fold_step< First,Last,State,BackwardOp,ForwardOp > >::type res_; typedef typename res_::state state; typedef typename res_::iterator iterator; }; }; template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_fold_step { typedef reverse_fold_chunk< -1 >::template result_< typename mpl::next::type , Last , typename apply2::type>::type , BackwardOp , ForwardOp > nested_step; typedef typename apply2< BackwardOp , typename nested_step::state , typename deref::type >::type state; typedef typename nested_step::iterator iterator; }; template< long N , typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_fold_impl : reverse_fold_chunk ::template result_< First,Last,State,BackwardOp,ForwardOp > { }; }}} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/no_ctps/reverse_iter_fold_impl.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/aux_/reverse_iter_fold_impl.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { /// forward declaration template< long N , typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_iter_fold_impl; template< long N > struct reverse_iter_fold_chunk; template<> struct reverse_iter_fold_chunk<0> { template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct result_ { typedef First iter0; typedef State fwd_state0; typedef fwd_state0 bkwd_state0; typedef bkwd_state0 state; typedef iter0 iterator; }; }; template<> struct reverse_iter_fold_chunk<1> { template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct result_ { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; typedef typename mpl::next::type iter1; typedef fwd_state1 bkwd_state1; typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; typedef bkwd_state0 state; typedef iter1 iterator; }; }; template<> struct reverse_iter_fold_chunk<2> { template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct result_ { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; typedef typename mpl::next::type iter2; typedef fwd_state2 bkwd_state2; typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1; typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; typedef bkwd_state0 state; typedef iter2 iterator; }; }; template<> struct reverse_iter_fold_chunk<3> { template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct result_ { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp,fwd_state2,iter2 >::type fwd_state3; typedef typename mpl::next::type iter3; typedef fwd_state3 bkwd_state3; typedef typename apply2< BackwardOp,bkwd_state3,iter2 >::type bkwd_state2; typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1; typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; typedef bkwd_state0 state; typedef iter3 iterator; }; }; template<> struct reverse_iter_fold_chunk<4> { template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct result_ { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp,fwd_state2,iter2 >::type fwd_state3; typedef typename mpl::next::type iter3; typedef typename apply2< ForwardOp,fwd_state3,iter3 >::type fwd_state4; typedef typename mpl::next::type iter4; typedef fwd_state4 bkwd_state4; typedef typename apply2< BackwardOp,bkwd_state4,iter3 >::type bkwd_state3; typedef typename apply2< BackwardOp,bkwd_state3,iter2 >::type bkwd_state2; typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1; typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; typedef bkwd_state0 state; typedef iter4 iterator; }; }; template< long N > struct reverse_iter_fold_chunk { template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct result_ { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp,fwd_state2,iter2 >::type fwd_state3; typedef typename mpl::next::type iter3; typedef typename apply2< ForwardOp,fwd_state3,iter3 >::type fwd_state4; typedef typename mpl::next::type iter4; typedef reverse_iter_fold_impl< ( (N - 4) < 0 ? 0 : N - 4 ) , iter4 , Last , fwd_state4 , BackwardOp , ForwardOp > nested_chunk; typedef typename nested_chunk::state bkwd_state4; typedef typename apply2< BackwardOp,bkwd_state4,iter3 >::type bkwd_state3; typedef typename apply2< BackwardOp,bkwd_state3,iter2 >::type bkwd_state2; typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1; typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; typedef bkwd_state0 state; typedef typename nested_chunk::iterator iterator; }; }; template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_iter_fold_step; template< typename Last , typename State > struct reverse_iter_fold_null_step { typedef Last iterator; typedef State state; }; template<> struct reverse_iter_fold_chunk< -1 > { template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct result_ { typedef typename if_< typename is_same< First,Last >::type , reverse_iter_fold_null_step< Last,State > , reverse_iter_fold_step< First,Last,State,BackwardOp,ForwardOp > >::type res_; typedef typename res_::state state; typedef typename res_::iterator iterator; }; }; template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_iter_fold_step { typedef reverse_iter_fold_chunk< -1 >::template result_< typename mpl::next::type , Last , typename apply2< ForwardOp,State,First >::type , BackwardOp , ForwardOp > nested_step; typedef typename apply2< BackwardOp , typename nested_step::state , First >::type state; typedef typename nested_step::iterator iterator; }; template< long N , typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_iter_fold_impl : reverse_iter_fold_chunk ::template result_< First,Last,State,BackwardOp,ForwardOp > { }; }}} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/no_ctps/set.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/set.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< int N > struct set_chooser; } namespace aux { template<> struct set_chooser<0> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef set0< >::type type; }; }; } // namespace aux namespace aux { template<> struct set_chooser<1> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename set1< T0 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_chooser<2> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename set2< T0, T1 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_chooser<3> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename set3< T0, T1, T2 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_chooser<4> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename set4< T0, T1, T2, T3 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_chooser<5> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename set5< T0, T1, T2, T3, T4 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_chooser<6> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename set6< T0, T1, T2, T3, T4, T5 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_chooser<7> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename set7< T0, T1, T2, T3, T4, T5, T6 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_chooser<8> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename set8< T0, T1, T2, T3, T4, T5, T6, T7 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_chooser<9> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename set9< T0, T1, T2, T3, T4, T5, T6, T7, T8 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_chooser<10> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename set10< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_chooser<11> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename set11< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_chooser<12> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename set12< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_chooser<13> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename set13< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_chooser<14> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename set14< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_chooser<15> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename set15< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_chooser<16> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename set16< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_chooser<17> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename set17< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_chooser<18> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename set18< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_chooser<19> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename set19< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_chooser<20> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename set20< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 >::type type; }; }; } // namespace aux namespace aux { template< typename T > struct is_set_arg { BOOST_STATIC_CONSTANT(bool, value = true); }; template<> struct is_set_arg { BOOST_STATIC_CONSTANT(bool, value = false); }; template< typename T1, typename T2, typename T3, typename T4, typename T5 , typename T6, typename T7, typename T8, typename T9, typename T10 , typename T11, typename T12, typename T13, typename T14, typename T15 , typename T16, typename T17, typename T18, typename T19, typename T20 > struct set_count_args { BOOST_STATIC_CONSTANT(int, value = is_set_arg::value + is_set_arg::value + is_set_arg::value + is_set_arg::value + is_set_arg::value + is_set_arg::value + is_set_arg::value + is_set_arg::value + is_set_arg::value + is_set_arg::value + is_set_arg::value + is_set_arg::value + is_set_arg::value + is_set_arg::value + is_set_arg::value + is_set_arg::value + is_set_arg::value + is_set_arg::value + is_set_arg::value + is_set_arg::value ); }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct set_impl { typedef aux::set_count_args< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 > arg_num_; typedef typename aux::set_chooser< arg_num_::value > ::template result_< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; }; } // namespace aux template< typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na , typename T12 = na, typename T13 = na, typename T14 = na , typename T15 = na, typename T16 = na, typename T17 = na , typename T18 = na, typename T19 = na > struct set : aux::set_impl< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 >::type { typedef typename aux::set_impl< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 >::type type; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/no_ctps/set_c.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/set_c.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< int N > struct set_c_chooser; } namespace aux { template<> struct set_c_chooser<0> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename set0_c< T >::type type; }; }; } // namespace aux namespace aux { template<> struct set_c_chooser<1> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename set1_c< T, C0 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_c_chooser<2> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename set2_c< T, C0, C1 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_c_chooser<3> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename set3_c< T, C0, C1, C2 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_c_chooser<4> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename set4_c< T, C0, C1, C2, C3 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_c_chooser<5> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename set5_c< T, C0, C1, C2, C3, C4 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_c_chooser<6> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename set6_c< T, C0, C1, C2, C3, C4, C5 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_c_chooser<7> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename set7_c< T, C0, C1, C2, C3, C4, C5, C6 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_c_chooser<8> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename set8_c< T, C0, C1, C2, C3, C4, C5, C6, C7 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_c_chooser<9> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename set9_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_c_chooser<10> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename set10_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_c_chooser<11> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename set11_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_c_chooser<12> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename set12_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_c_chooser<13> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename set13_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_c_chooser<14> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename set14_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_c_chooser<15> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename set15_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_c_chooser<16> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename set16_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_c_chooser<17> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename set17_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_c_chooser<18> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename set18_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_c_chooser<19> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename set19_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18 >::type type; }; }; } // namespace aux namespace aux { template<> struct set_c_chooser<20> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename set20_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19 >::type type; }; }; } // namespace aux namespace aux { template< long C > struct is_set_c_arg { BOOST_STATIC_CONSTANT(bool, value = true); }; template<> struct is_set_c_arg { BOOST_STATIC_CONSTANT(bool, value = false); }; template< long C1, long C2, long C3, long C4, long C5, long C6, long C7, long C8 , long C9, long C10, long C11, long C12, long C13, long C14, long C15 , long C16, long C17, long C18, long C19, long C20 > struct set_c_count_args { BOOST_STATIC_CONSTANT(int, value = is_set_c_arg::value + is_set_c_arg::value + is_set_c_arg::value + is_set_c_arg::value + is_set_c_arg::value + is_set_c_arg::value + is_set_c_arg::value + is_set_c_arg::value + is_set_c_arg::value + is_set_c_arg::value + is_set_c_arg::value + is_set_c_arg::value + is_set_c_arg::value + is_set_c_arg::value + is_set_c_arg::value + is_set_c_arg::value + is_set_c_arg::value + is_set_c_arg::value + is_set_c_arg::value + is_set_c_arg::value ); }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct set_c_impl { typedef aux::set_c_count_args< C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19 > arg_num_; typedef typename aux::set_c_chooser< arg_num_::value > ::template result_< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19 >::type type; }; } // namespace aux template< typename T, long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX , long C3 = LONG_MAX, long C4 = LONG_MAX, long C5 = LONG_MAX , long C6 = LONG_MAX, long C7 = LONG_MAX, long C8 = LONG_MAX , long C9 = LONG_MAX, long C10 = LONG_MAX, long C11 = LONG_MAX , long C12 = LONG_MAX, long C13 = LONG_MAX, long C14 = LONG_MAX , long C15 = LONG_MAX, long C16 = LONG_MAX, long C17 = LONG_MAX , long C18 = LONG_MAX, long C19 = LONG_MAX > struct set_c : aux::set_c_impl< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19 >::type { typedef typename aux::set_c_impl< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19 >::type type; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/no_ctps/shift_left.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // Copyright Jaap Suter 2003 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/shift_left.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct shift_left_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< shift_left_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< shift_left_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct shift_left_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template<> struct shift_left_impl< na,integral_c_tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template<> struct shift_left_impl< integral_c_tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct shift_left_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct shift_left : shift_left_impl< typename shift_left_tag::type , typename shift_left_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, shift_left, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 2, shift_left) }} namespace boost { namespace mpl { template<> struct shift_left_impl< integral_c_tag,integral_c_tag > { template< typename N, typename S > struct apply : integral_c< typename N::value_type , ( BOOST_MPL_AUX_VALUE_WKND(N)::value << BOOST_MPL_AUX_VALUE_WKND(S)::value ) > { }; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/no_ctps/shift_right.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // Copyright Jaap Suter 2003 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/shift_right.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct shift_right_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< shift_right_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< shift_right_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct shift_right_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template<> struct shift_right_impl< na,integral_c_tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template<> struct shift_right_impl< integral_c_tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct shift_right_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct shift_right : shift_right_impl< typename shift_right_tag::type , typename shift_right_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, shift_right, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 2, shift_right) }} namespace boost { namespace mpl { template<> struct shift_right_impl< integral_c_tag,integral_c_tag > { template< typename N, typename S > struct apply : integral_c< typename N::value_type , ( BOOST_MPL_AUX_VALUE_WKND(N)::value >> BOOST_MPL_AUX_VALUE_WKND(S)::value ) > { }; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/no_ctps/template_arity.hpp ================================================ // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/aux_/template_arity.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< bool > struct template_arity_impl { template< typename F > struct result_ : mpl::int_< -1 > { }; }; template<> struct template_arity_impl { template< typename F > struct result_ : F::arity { }; }; template< typename F > struct template_arity : template_arity_impl< ::boost::mpl::aux::has_rebind::value > ::template result_ { }; }}} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/no_ctps/times.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/times.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct times_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< times_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< times_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct times_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template<> struct times_impl< na,integral_c_tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template<> struct times_impl< integral_c_tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct times_tag { typedef typename T::tag type; }; /// forward declaration template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct times2; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) , typename N3 = na, typename N4 = na, typename N5 = na > struct times : if_< is_na , times2< N1,N2 > , times< times2< N1,N2 > , N3, N4, N5 > >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , times , ( N1, N2, N3, N4, N5 ) ) }; template< typename N1 , typename N2 > struct times2 : times_impl< typename times_tag::type , typename times_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, times2, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 5, times) }} namespace boost { namespace mpl { template<> struct times_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : integral_c< typename aux::largest_int< typename N1::value_type , typename N2::value_type >::type , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value * BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/no_ctps/unpack_args.hpp ================================================ // Copyright Aleksey Gurtovoy 2002-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/unpack_args.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< BOOST_MPL_AUX_NTTP_DECL(int, size) > struct unpack_args_impl { template< typename F, typename Args > struct apply; }; template<> struct unpack_args_impl<0> { template< typename F, typename Args > struct apply : apply0< F > { }; }; template<> struct unpack_args_impl<1> { template< typename F, typename Args > struct apply : apply1< F , typename at_c< Args,0 >::type > { }; }; template<> struct unpack_args_impl<2> { template< typename F, typename Args > struct apply : apply2< F , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type > { }; }; template<> struct unpack_args_impl<3> { template< typename F, typename Args > struct apply : apply3< F , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type , typename at_c< Args,2 >::type > { }; }; template<> struct unpack_args_impl<4> { template< typename F, typename Args > struct apply : apply4< F , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type , typename at_c< Args,2 >::type, typename at_c< Args,3 >::type > { }; }; template<> struct unpack_args_impl<5> { template< typename F, typename Args > struct apply : apply5< F , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type , typename at_c< Args,2 >::type, typename at_c< Args,3 >::type , typename at_c< Args,4 >::type > { }; }; } template< typename F > struct unpack_args { template< typename Args > struct apply : aux::unpack_args_impl< size::value > ::template apply< F,Args > { }; }; BOOST_MPL_AUX_PASS_THROUGH_LAMBDA_SPEC(1, unpack_args) }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/no_ctps/vector.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/vector.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< int N > struct vector_chooser; } namespace aux { template<> struct vector_chooser<0> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef vector0< >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_chooser<1> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector1< T0 >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_chooser<2> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector2< T0, T1 >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_chooser<3> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector3< T0, T1, T2 >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_chooser<4> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector4< T0, T1, T2, T3 >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_chooser<5> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector5< T0, T1, T2, T3, T4 >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_chooser<6> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector6< T0, T1, T2, T3, T4, T5 >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_chooser<7> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector7< T0, T1, T2, T3, T4, T5, T6 >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_chooser<8> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector8< T0, T1, T2, T3, T4, T5, T6, T7 >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_chooser<9> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector9< T0, T1, T2, T3, T4, T5, T6, T7, T8 >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_chooser<10> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector10< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9 >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_chooser<11> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector11< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10 >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_chooser<12> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector12< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11 >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_chooser<13> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector13< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12 >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_chooser<14> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector14< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13 >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_chooser<15> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector15< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_chooser<16> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector16< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15 >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_chooser<17> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector17< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16 >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_chooser<18> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector18< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17 >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_chooser<19> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector19< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18 >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_chooser<20> { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct result_ { typedef typename vector20< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 >::type type; }; }; } // namespace aux namespace aux { template< typename T > struct is_vector_arg { BOOST_STATIC_CONSTANT(bool, value = true); }; template<> struct is_vector_arg { BOOST_STATIC_CONSTANT(bool, value = false); }; template< typename T1, typename T2, typename T3, typename T4, typename T5 , typename T6, typename T7, typename T8, typename T9, typename T10 , typename T11, typename T12, typename T13, typename T14, typename T15 , typename T16, typename T17, typename T18, typename T19, typename T20 > struct vector_count_args { BOOST_STATIC_CONSTANT(int, value = is_vector_arg::value + is_vector_arg::value + is_vector_arg::value + is_vector_arg::value + is_vector_arg::value + is_vector_arg::value + is_vector_arg::value + is_vector_arg::value + is_vector_arg::value + is_vector_arg::value + is_vector_arg::value + is_vector_arg::value + is_vector_arg::value + is_vector_arg::value + is_vector_arg::value + is_vector_arg::value + is_vector_arg::value + is_vector_arg::value + is_vector_arg::value + is_vector_arg::value ); }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct vector_impl { typedef aux::vector_count_args< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 > arg_num_; typedef typename aux::vector_chooser< arg_num_::value > ::template result_< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; }; } // namespace aux template< typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na , typename T12 = na, typename T13 = na, typename T14 = na , typename T15 = na, typename T16 = na, typename T17 = na , typename T18 = na, typename T19 = na > struct vector : aux::vector_impl< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 >::type { typedef typename aux::vector_impl< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19 >::type type; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/no_ctps/vector_c.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/vector_c.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< int N > struct vector_c_chooser; } namespace aux { template<> struct vector_c_chooser<0> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename vector0_c< T >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_c_chooser<1> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename vector1_c< T, T(C0) >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_c_chooser<2> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename vector2_c< T, T(C0), T(C1) >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_c_chooser<3> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename vector3_c< T, T(C0), T(C1), T(C2) >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_c_chooser<4> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename vector4_c< T, T(C0), T(C1), T(C2), T(C3) >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_c_chooser<5> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename vector5_c< T, T(C0), T(C1), T(C2), T(C3), T(C4) >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_c_chooser<6> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename vector6_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5) >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_c_chooser<7> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename vector7_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6) >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_c_chooser<8> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename vector8_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7) >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_c_chooser<9> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename vector9_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8) >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_c_chooser<10> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename vector10_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9) >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_c_chooser<11> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename vector11_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10) >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_c_chooser<12> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename vector12_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11) >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_c_chooser<13> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename vector13_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12) >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_c_chooser<14> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename vector14_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13) >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_c_chooser<15> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename vector15_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14) >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_c_chooser<16> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename vector16_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15) >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_c_chooser<17> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename vector17_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16) >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_c_chooser<18> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename vector18_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17) >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_c_chooser<19> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename vector19_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17), T(C18) >::type type; }; }; } // namespace aux namespace aux { template<> struct vector_c_chooser<20> { template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct result_ { typedef typename vector20_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17), T(C18), T(C19) >::type type; }; }; } // namespace aux namespace aux { template< long C > struct is_vector_c_arg { BOOST_STATIC_CONSTANT(bool, value = true); }; template<> struct is_vector_c_arg { BOOST_STATIC_CONSTANT(bool, value = false); }; template< long C1, long C2, long C3, long C4, long C5, long C6, long C7, long C8 , long C9, long C10, long C11, long C12, long C13, long C14, long C15 , long C16, long C17, long C18, long C19, long C20 > struct vector_c_count_args { BOOST_STATIC_CONSTANT(int, value = is_vector_c_arg::value + is_vector_c_arg::value + is_vector_c_arg::value + is_vector_c_arg::value + is_vector_c_arg::value + is_vector_c_arg::value + is_vector_c_arg::value + is_vector_c_arg::value + is_vector_c_arg::value + is_vector_c_arg::value + is_vector_c_arg::value + is_vector_c_arg::value + is_vector_c_arg::value + is_vector_c_arg::value + is_vector_c_arg::value + is_vector_c_arg::value + is_vector_c_arg::value + is_vector_c_arg::value + is_vector_c_arg::value + is_vector_c_arg::value ); }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct vector_c_impl { typedef aux::vector_c_count_args< C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19 > arg_num_; typedef typename aux::vector_c_chooser< arg_num_::value > ::template result_< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19 >::type type; }; } // namespace aux template< typename T, long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX , long C3 = LONG_MAX, long C4 = LONG_MAX, long C5 = LONG_MAX , long C6 = LONG_MAX, long C7 = LONG_MAX, long C8 = LONG_MAX , long C9 = LONG_MAX, long C10 = LONG_MAX, long C11 = LONG_MAX , long C12 = LONG_MAX, long C13 = LONG_MAX, long C14 = LONG_MAX , long C15 = LONG_MAX, long C16 = LONG_MAX, long C17 = LONG_MAX , long C18 = LONG_MAX, long C19 = LONG_MAX > struct vector_c : aux::vector_c_impl< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19 >::type { typedef typename aux::vector_c_impl< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, C15, C16, C17, C18, C19 >::type type; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/no_ttp/advance_backward.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/aux_/advance_backward.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< long N > struct advance_backward; template<> struct advance_backward<0> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef iter0 type; }; }; template<> struct advance_backward<1> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef typename prior::type iter1; typedef iter1 type; }; }; template<> struct advance_backward<2> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef typename prior::type iter1; typedef typename prior::type iter2; typedef iter2 type; }; }; template<> struct advance_backward<3> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef typename prior::type iter1; typedef typename prior::type iter2; typedef typename prior::type iter3; typedef iter3 type; }; }; template<> struct advance_backward<4> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef typename prior::type iter1; typedef typename prior::type iter2; typedef typename prior::type iter3; typedef typename prior::type iter4; typedef iter4 type; }; }; template< long N > struct advance_backward { template< typename Iterator > struct apply { typedef typename apply_wrap1< advance_backward<4> , Iterator >::type chunk_result_; typedef typename apply_wrap1< advance_backward<( (N - 4) < 0 ? 0 : N - 4 )> , chunk_result_ >::type type; }; }; }}} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/no_ttp/advance_forward.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/aux_/advance_forward.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< long N > struct advance_forward; template<> struct advance_forward<0> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef iter0 type; }; }; template<> struct advance_forward<1> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef typename next::type iter1; typedef iter1 type; }; }; template<> struct advance_forward<2> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef typename next::type iter1; typedef typename next::type iter2; typedef iter2 type; }; }; template<> struct advance_forward<3> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef typename next::type iter1; typedef typename next::type iter2; typedef typename next::type iter3; typedef iter3 type; }; }; template<> struct advance_forward<4> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef typename next::type iter1; typedef typename next::type iter2; typedef typename next::type iter3; typedef typename next::type iter4; typedef iter4 type; }; }; template< long N > struct advance_forward { template< typename Iterator > struct apply { typedef typename apply_wrap1< advance_forward<4> , Iterator >::type chunk_result_; typedef typename apply_wrap1< advance_forward<( (N - 4) < 0 ? 0 : N - 4 )> , chunk_result_ >::type type; }; }; }}} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/no_ttp/and.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/and.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< bool C_, typename T1, typename T2, typename T3, typename T4 > struct and_impl : false_ { }; template< typename T1, typename T2, typename T3, typename T4 > struct and_impl< true,T1,T2,T3,T4 > : and_impl< BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value , T2, T3, T4 , true_ > { }; template<> struct and_impl< true , true_, true_, true_, true_ > : true_ { }; } // namespace aux template< typename BOOST_MPL_AUX_NA_PARAM(T1) , typename BOOST_MPL_AUX_NA_PARAM(T2) , typename T3 = true_, typename T4 = true_, typename T5 = true_ > struct and_ : aux::and_impl< BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value , T2, T3, T4, T5 > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , and_ , ( T1, T2, T3, T4, T5) ) }; BOOST_MPL_AUX_NA_SPEC2( 2 , 5 , and_ ) }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/no_ttp/apply.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/apply.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename F > struct apply0 : apply_wrap0< typename lambda::type > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 1 , apply0 , (F ) ) }; template< typename F > struct apply< F,na,na,na,na,na > : apply0 { }; template< typename F, typename T1 > struct apply1 : apply_wrap1< typename lambda::type , T1 > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 2 , apply1 , (F, T1) ) }; template< typename F, typename T1 > struct apply< F,T1,na,na,na,na > : apply1< F,T1 > { }; template< typename F, typename T1, typename T2 > struct apply2 : apply_wrap2< typename lambda::type , T1, T2 > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 3 , apply2 , (F, T1, T2) ) }; template< typename F, typename T1, typename T2 > struct apply< F,T1,T2,na,na,na > : apply2< F,T1,T2 > { }; template< typename F, typename T1, typename T2, typename T3 > struct apply3 : apply_wrap3< typename lambda::type , T1, T2, T3 > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 4 , apply3 , (F, T1, T2, T3) ) }; template< typename F, typename T1, typename T2, typename T3 > struct apply< F,T1,T2,T3,na,na > : apply3< F,T1,T2,T3 > { }; template< typename F, typename T1, typename T2, typename T3, typename T4 > struct apply4 : apply_wrap4< typename lambda::type , T1, T2, T3, T4 > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , apply4 , (F, T1, T2, T3, T4) ) }; template< typename F, typename T1, typename T2, typename T3, typename T4 > struct apply< F,T1,T2,T3,T4,na > : apply4< F,T1,T2,T3,T4 > { }; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct apply5 : apply_wrap5< typename lambda::type , T1, T2, T3, T4, T5 > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 6 , apply5 , (F, T1, T2, T3, T4, T5) ) }; /// primary template (not a specialization!) template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct apply : apply5< F,T1,T2,T3,T4,T5 > { }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/no_ttp/apply_fwd.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/apply_fwd.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename F, typename T1 = na, typename T2 = na, typename T3 = na , typename T4 = na, typename T5 = na > struct apply; template< typename F > struct apply0; template< typename F, typename T1 > struct apply1; template< typename F, typename T1, typename T2 > struct apply2; template< typename F, typename T1, typename T2, typename T3 > struct apply3; template< typename F, typename T1, typename T2, typename T3, typename T4 > struct apply4; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct apply5; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/no_ttp/apply_wrap.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/apply_wrap.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename F , typename has_apply_ = typename aux::has_apply::type > struct apply_wrap0 : F::template apply< > { }; template< typename F > struct apply_wrap0< F,true_ > : F::apply { }; template< typename F, typename T1 > struct apply_wrap1 : F::template apply { }; template< typename F, typename T1, typename T2 > struct apply_wrap2 : F::template apply< T1,T2 > { }; template< typename F, typename T1, typename T2, typename T3 > struct apply_wrap3 : F::template apply< T1,T2,T3 > { }; template< typename F, typename T1, typename T2, typename T3, typename T4 > struct apply_wrap4 : F::template apply< T1,T2,T3,T4 > { }; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct apply_wrap5 : F::template apply< T1,T2,T3,T4,T5 > { }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/no_ttp/arg.hpp ================================================ // Copyright Peter Dimov 2001-2002 // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/arg.hpp" header // -- DO NOT modify by hand! BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN template<> struct arg< -1 > { BOOST_STATIC_CONSTANT(int, value = -1); BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) BOOST_MPL_AUX_ARG_TYPEDEF(na, type) template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { typedef U1 type; BOOST_MPL_AUX_ASSERT_NOT_NA(type); }; }; template<> struct arg<1> { BOOST_STATIC_CONSTANT(int, value = 1); typedef arg<2> next; BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) BOOST_MPL_AUX_ARG_TYPEDEF(na, type) template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { typedef U1 type; BOOST_MPL_AUX_ASSERT_NOT_NA(type); }; }; template<> struct arg<2> { BOOST_STATIC_CONSTANT(int, value = 2); typedef arg<3> next; BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) BOOST_MPL_AUX_ARG_TYPEDEF(na, type) template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { typedef U2 type; BOOST_MPL_AUX_ASSERT_NOT_NA(type); }; }; template<> struct arg<3> { BOOST_STATIC_CONSTANT(int, value = 3); typedef arg<4> next; BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) BOOST_MPL_AUX_ARG_TYPEDEF(na, type) template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { typedef U3 type; BOOST_MPL_AUX_ASSERT_NOT_NA(type); }; }; template<> struct arg<4> { BOOST_STATIC_CONSTANT(int, value = 4); typedef arg<5> next; BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) BOOST_MPL_AUX_ARG_TYPEDEF(na, type) template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { typedef U4 type; BOOST_MPL_AUX_ASSERT_NOT_NA(type); }; }; template<> struct arg<5> { BOOST_STATIC_CONSTANT(int, value = 5); typedef arg<6> next; BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) BOOST_MPL_AUX_ARG_TYPEDEF(na, type) template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { typedef U5 type; BOOST_MPL_AUX_ASSERT_NOT_NA(type); }; }; BOOST_MPL_AUX_NONTYPE_ARITY_SPEC(1,int, arg) BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/no_ttp/basic_bind.hpp ================================================ // Copyright Peter Dimov 2001 // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/aux_/basic_bind.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< typename T, typename U1, typename U2, typename U3, typename U4 , typename U5 > struct resolve_bind_arg { typedef T type; }; template< int N, typename U1, typename U2, typename U3, typename U4, typename U5 > struct resolve_bind_arg< arg, U1, U2, U3, U4, U5 > { typedef typename apply_wrap5, U1, U2, U3, U4, U5>::type type; }; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5, typename U1, typename U2, typename U3, typename U4 , typename U5 > struct resolve_bind_arg< bind< F,T1,T2,T3,T4,T5 >, U1, U2, U3, U4, U5 > { typedef bind< F,T1,T2,T3,T4,T5 > f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux template< typename F > struct bind0 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; public: typedef typename apply_wrap0< f_ >::type type; }; }; namespace aux { template< typename F, typename U1, typename U2, typename U3, typename U4 , typename U5 > struct resolve_bind_arg< bind0, U1, U2, U3, U4, U5 > { typedef bind0 f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(1, bind0) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(1, bind0) template< typename F > struct bind< F,na,na,na,na,na > : bind0 { }; template< typename F, typename T1 > struct bind1 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; public: typedef typename apply_wrap1< f_ , typename t1::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename U1, typename U2, typename U3 , typename U4, typename U5 > struct resolve_bind_arg< bind1< F,T1 >, U1, U2, U3, U4, U5 > { typedef bind1< F,T1 > f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(2, bind1) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(2, bind1) template< typename F, typename T1 > struct bind< F,T1,na,na,na,na > : bind1< F,T1 > { }; template< typename F, typename T1, typename T2 > struct bind2 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; public: typedef typename apply_wrap2< f_ , typename t1::type, typename t2::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename T2, typename U1, typename U2 , typename U3, typename U4, typename U5 > struct resolve_bind_arg< bind2< F,T1,T2 >, U1, U2, U3, U4, U5 > { typedef bind2< F,T1,T2 > f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(3, bind2) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(3, bind2) template< typename F, typename T1, typename T2 > struct bind< F,T1,T2,na,na,na > : bind2< F,T1,T2 > { }; template< typename F, typename T1, typename T2, typename T3 > struct bind3 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3; public: typedef typename apply_wrap3< f_ , typename t1::type, typename t2::type, typename t3::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename T2, typename T3, typename U1 , typename U2, typename U3, typename U4, typename U5 > struct resolve_bind_arg< bind3< F,T1,T2,T3 >, U1, U2, U3, U4, U5 > { typedef bind3< F,T1,T2,T3 > f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(4, bind3) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(4, bind3) template< typename F, typename T1, typename T2, typename T3 > struct bind< F,T1,T2,T3,na,na > : bind3< F,T1,T2,T3 > { }; template< typename F, typename T1, typename T2, typename T3, typename T4 > struct bind4 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3; typedef aux::resolve_bind_arg< T4,U1,U2,U3,U4,U5 > t4; public: typedef typename apply_wrap4< f_ , typename t1::type, typename t2::type, typename t3::type , typename t4::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename T2, typename T3, typename T4 , typename U1, typename U2, typename U3, typename U4, typename U5 > struct resolve_bind_arg< bind4< F,T1,T2,T3,T4 >, U1, U2, U3, U4, U5 > { typedef bind4< F,T1,T2,T3,T4 > f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(5, bind4) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(5, bind4) template< typename F, typename T1, typename T2, typename T3, typename T4 > struct bind< F,T1,T2,T3,T4,na > : bind4< F,T1,T2,T3,T4 > { }; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct bind5 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3; typedef aux::resolve_bind_arg< T4,U1,U2,U3,U4,U5 > t4; typedef aux::resolve_bind_arg< T5,U1,U2,U3,U4,U5 > t5; public: typedef typename apply_wrap5< f_ , typename t1::type, typename t2::type, typename t3::type , typename t4::type, typename t5::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5, typename U1, typename U2, typename U3, typename U4 , typename U5 > struct resolve_bind_arg< bind5< F,T1,T2,T3,T4,T5 >, U1, U2, U3, U4, U5 > { typedef bind5< F,T1,T2,T3,T4,T5 > f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(6, bind5) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(6, bind5) /// primary template (not a specialization!) template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct bind : bind5< F,T1,T2,T3,T4,T5 > { }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/no_ttp/bind.hpp ================================================ // Copyright Peter Dimov 2001 // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/bind.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< typename T, typename U1, typename U2, typename U3, typename U4 , typename U5 > struct resolve_bind_arg { typedef T type; }; template< typename T , typename Arg > struct replace_unnamed_arg { typedef Arg next; typedef T type; }; template< typename Arg > struct replace_unnamed_arg< arg< -1 >, Arg > { typedef typename Arg::next next; typedef Arg type; }; template< int N, typename U1, typename U2, typename U3, typename U4, typename U5 > struct resolve_bind_arg< arg, U1, U2, U3, U4, U5 > { typedef typename apply_wrap5, U1, U2, U3, U4, U5>::type type; }; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5, typename U1, typename U2, typename U3, typename U4 , typename U5 > struct resolve_bind_arg< bind< F,T1,T2,T3,T4,T5 >, U1, U2, U3, U4, U5 > { typedef bind< F,T1,T2,T3,T4,T5 > f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux template< typename F > struct bind0 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; typedef typename r0::type a0; typedef typename r0::next n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; /// public: typedef typename apply_wrap0< f_ >::type type; }; }; namespace aux { template< typename F, typename U1, typename U2, typename U3, typename U4 , typename U5 > struct resolve_bind_arg< bind0, U1, U2, U3, U4, U5 > { typedef bind0 f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(1, bind0) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(1, bind0) template< typename F > struct bind< F,na,na,na,na,na > : bind0 { }; template< typename F, typename T1 > struct bind1 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; typedef typename r0::type a0; typedef typename r0::next n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; /// typedef aux::replace_unnamed_arg< T1,n1 > r1; typedef typename r1::type a1; typedef typename r1::next n2; typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; /// public: typedef typename apply_wrap1< f_ , typename t1::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename U1, typename U2, typename U3 , typename U4, typename U5 > struct resolve_bind_arg< bind1< F,T1 >, U1, U2, U3, U4, U5 > { typedef bind1< F,T1 > f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(2, bind1) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(2, bind1) template< typename F, typename T1 > struct bind< F,T1,na,na,na,na > : bind1< F,T1 > { }; template< typename F, typename T1, typename T2 > struct bind2 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; typedef typename r0::type a0; typedef typename r0::next n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; /// typedef aux::replace_unnamed_arg< T1,n1 > r1; typedef typename r1::type a1; typedef typename r1::next n2; typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; /// typedef aux::replace_unnamed_arg< T2,n2 > r2; typedef typename r2::type a2; typedef typename r2::next n3; typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; /// public: typedef typename apply_wrap2< f_ , typename t1::type, typename t2::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename T2, typename U1, typename U2 , typename U3, typename U4, typename U5 > struct resolve_bind_arg< bind2< F,T1,T2 >, U1, U2, U3, U4, U5 > { typedef bind2< F,T1,T2 > f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(3, bind2) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(3, bind2) template< typename F, typename T1, typename T2 > struct bind< F,T1,T2,na,na,na > : bind2< F,T1,T2 > { }; template< typename F, typename T1, typename T2, typename T3 > struct bind3 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; typedef typename r0::type a0; typedef typename r0::next n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; /// typedef aux::replace_unnamed_arg< T1,n1 > r1; typedef typename r1::type a1; typedef typename r1::next n2; typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; /// typedef aux::replace_unnamed_arg< T2,n2 > r2; typedef typename r2::type a2; typedef typename r2::next n3; typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; /// typedef aux::replace_unnamed_arg< T3,n3 > r3; typedef typename r3::type a3; typedef typename r3::next n4; typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; /// public: typedef typename apply_wrap3< f_ , typename t1::type, typename t2::type, typename t3::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename T2, typename T3, typename U1 , typename U2, typename U3, typename U4, typename U5 > struct resolve_bind_arg< bind3< F,T1,T2,T3 >, U1, U2, U3, U4, U5 > { typedef bind3< F,T1,T2,T3 > f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(4, bind3) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(4, bind3) template< typename F, typename T1, typename T2, typename T3 > struct bind< F,T1,T2,T3,na,na > : bind3< F,T1,T2,T3 > { }; template< typename F, typename T1, typename T2, typename T3, typename T4 > struct bind4 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; typedef typename r0::type a0; typedef typename r0::next n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; /// typedef aux::replace_unnamed_arg< T1,n1 > r1; typedef typename r1::type a1; typedef typename r1::next n2; typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; /// typedef aux::replace_unnamed_arg< T2,n2 > r2; typedef typename r2::type a2; typedef typename r2::next n3; typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; /// typedef aux::replace_unnamed_arg< T3,n3 > r3; typedef typename r3::type a3; typedef typename r3::next n4; typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; /// typedef aux::replace_unnamed_arg< T4,n4 > r4; typedef typename r4::type a4; typedef typename r4::next n5; typedef aux::resolve_bind_arg< a4,U1,U2,U3,U4,U5 > t4; /// public: typedef typename apply_wrap4< f_ , typename t1::type, typename t2::type, typename t3::type , typename t4::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename T2, typename T3, typename T4 , typename U1, typename U2, typename U3, typename U4, typename U5 > struct resolve_bind_arg< bind4< F,T1,T2,T3,T4 >, U1, U2, U3, U4, U5 > { typedef bind4< F,T1,T2,T3,T4 > f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(5, bind4) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(5, bind4) template< typename F, typename T1, typename T2, typename T3, typename T4 > struct bind< F,T1,T2,T3,T4,na > : bind4< F,T1,T2,T3,T4 > { }; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct bind5 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; typedef typename r0::type a0; typedef typename r0::next n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; /// typedef aux::replace_unnamed_arg< T1,n1 > r1; typedef typename r1::type a1; typedef typename r1::next n2; typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; /// typedef aux::replace_unnamed_arg< T2,n2 > r2; typedef typename r2::type a2; typedef typename r2::next n3; typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; /// typedef aux::replace_unnamed_arg< T3,n3 > r3; typedef typename r3::type a3; typedef typename r3::next n4; typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; /// typedef aux::replace_unnamed_arg< T4,n4 > r4; typedef typename r4::type a4; typedef typename r4::next n5; typedef aux::resolve_bind_arg< a4,U1,U2,U3,U4,U5 > t4; /// typedef aux::replace_unnamed_arg< T5,n5 > r5; typedef typename r5::type a5; typedef typename r5::next n6; typedef aux::resolve_bind_arg< a5,U1,U2,U3,U4,U5 > t5; /// public: typedef typename apply_wrap5< f_ , typename t1::type, typename t2::type, typename t3::type , typename t4::type, typename t5::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5, typename U1, typename U2, typename U3, typename U4 , typename U5 > struct resolve_bind_arg< bind5< F,T1,T2,T3,T4,T5 >, U1, U2, U3, U4, U5 > { typedef bind5< F,T1,T2,T3,T4,T5 > f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(6, bind5) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(6, bind5) /// primary template (not a specialization!) template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct bind : bind5< F,T1,T2,T3,T4,T5 > { }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/no_ttp/bind_fwd.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/bind_fwd.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename F, typename T1 = na, typename T2 = na, typename T3 = na , typename T4 = na, typename T5 = na > struct bind; template< typename F > struct bind0; template< typename F, typename T1 > struct bind1; template< typename F, typename T1, typename T2 > struct bind2; template< typename F, typename T1, typename T2, typename T3 > struct bind3; template< typename F, typename T1, typename T2, typename T3, typename T4 > struct bind4; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct bind5; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/no_ttp/bitand.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // Copyright Jaap Suter 2003 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/bitand.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct bitand_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< bitand_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< bitand_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct bitand_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct bitand_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct bitand_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct bitand_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) , typename N3 = na, typename N4 = na, typename N5 = na > struct bitand_ : bitand_< bitand_< bitand_< bitand_< N1,N2 >, N3>, N4>, N5> { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , bitand_ , ( N1, N2, N3, N4, N5 ) ) }; template< typename N1, typename N2, typename N3, typename N4 > struct bitand_< N1,N2,N3,N4,na > : bitand_< bitand_< bitand_< N1,N2 >, N3>, N4> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , bitand_ , ( N1, N2, N3, N4, na ) ) }; template< typename N1, typename N2, typename N3 > struct bitand_< N1,N2,N3,na,na > : bitand_< bitand_< N1,N2 >, N3> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , bitand_ , ( N1, N2, N3, na, na ) ) }; template< typename N1, typename N2 > struct bitand_< N1,N2,na,na,na > : bitand_impl< typename bitand_tag::type , typename bitand_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , bitand_ , ( N1, N2, na, na, na ) ) }; BOOST_MPL_AUX_NA_SPEC2(2, 5, bitand_) }} namespace boost { namespace mpl { namespace aux { template< typename T, T n1, T n2 > struct bitand_wknd { BOOST_STATIC_CONSTANT(T, value = (n1 & n2)); typedef integral_c< T,value > type; }; } template<> struct bitand_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : aux::bitand_wknd< typename aux::largest_int< typename N1::value_type , typename N2::value_type >::type , N1::value , N2::value >::type { }; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/no_ttp/bitor.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // Copyright Jaap Suter 2003 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/bitor.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct bitor_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< bitor_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< bitor_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct bitor_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct bitor_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct bitor_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct bitor_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) , typename N3 = na, typename N4 = na, typename N5 = na > struct bitor_ : bitor_< bitor_< bitor_< bitor_< N1,N2 >, N3>, N4>, N5> { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , bitor_ , ( N1, N2, N3, N4, N5 ) ) }; template< typename N1, typename N2, typename N3, typename N4 > struct bitor_< N1,N2,N3,N4,na > : bitor_< bitor_< bitor_< N1,N2 >, N3>, N4> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , bitor_ , ( N1, N2, N3, N4, na ) ) }; template< typename N1, typename N2, typename N3 > struct bitor_< N1,N2,N3,na,na > : bitor_< bitor_< N1,N2 >, N3> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , bitor_ , ( N1, N2, N3, na, na ) ) }; template< typename N1, typename N2 > struct bitor_< N1,N2,na,na,na > : bitor_impl< typename bitor_tag::type , typename bitor_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , bitor_ , ( N1, N2, na, na, na ) ) }; BOOST_MPL_AUX_NA_SPEC2(2, 5, bitor_) }} namespace boost { namespace mpl { namespace aux { template< typename T, T n1, T n2 > struct bitor_wknd { BOOST_STATIC_CONSTANT(T, value = (n1 | n2)); typedef integral_c< T,value > type; }; } template<> struct bitor_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : aux::bitor_wknd< typename aux::largest_int< typename N1::value_type , typename N2::value_type >::type , N1::value , N2::value >::type { }; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/no_ttp/bitxor.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // Copyright Jaap Suter 2003 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/bitxor.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct bitxor_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< bitxor_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< bitxor_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct bitxor_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct bitxor_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct bitxor_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct bitxor_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) , typename N3 = na, typename N4 = na, typename N5 = na > struct bitxor_ : bitxor_< bitxor_< bitxor_< bitxor_< N1,N2 >, N3>, N4>, N5> { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , bitxor_ , ( N1, N2, N3, N4, N5 ) ) }; template< typename N1, typename N2, typename N3, typename N4 > struct bitxor_< N1,N2,N3,N4,na > : bitxor_< bitxor_< bitxor_< N1,N2 >, N3>, N4> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , bitxor_ , ( N1, N2, N3, N4, na ) ) }; template< typename N1, typename N2, typename N3 > struct bitxor_< N1,N2,N3,na,na > : bitxor_< bitxor_< N1,N2 >, N3> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , bitxor_ , ( N1, N2, N3, na, na ) ) }; template< typename N1, typename N2 > struct bitxor_< N1,N2,na,na,na > : bitxor_impl< typename bitxor_tag::type , typename bitxor_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , bitxor_ , ( N1, N2, na, na, na ) ) }; BOOST_MPL_AUX_NA_SPEC2(2, 5, bitxor_) }} namespace boost { namespace mpl { namespace aux { template< typename T, T n1, T n2 > struct bitxor_wknd { BOOST_STATIC_CONSTANT(T, value = (n1 ^ n2)); typedef integral_c< T,value > type; }; } template<> struct bitxor_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : aux::bitxor_wknd< typename aux::largest_int< typename N1::value_type , typename N2::value_type >::type , N1::value , N2::value >::type { }; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/no_ttp/deque.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/deque.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na , typename T12 = na, typename T13 = na, typename T14 = na , typename T15 = na, typename T16 = na, typename T17 = na , typename T18 = na, typename T19 = na > struct deque; template< > struct deque< na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector0< > { typedef vector0< >::type type; }; template< typename T0 > struct deque< T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector1 { typedef typename vector1::type type; }; template< typename T0, typename T1 > struct deque< T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector2< T0,T1 > { typedef typename vector2< T0,T1 >::type type; }; template< typename T0, typename T1, typename T2 > struct deque< T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector3< T0,T1,T2 > { typedef typename vector3< T0,T1,T2 >::type type; }; template< typename T0, typename T1, typename T2, typename T3 > struct deque< T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector4< T0,T1,T2,T3 > { typedef typename vector4< T0,T1,T2,T3 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 > struct deque< T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector5< T0,T1,T2,T3,T4 > { typedef typename vector5< T0,T1,T2,T3,T4 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct deque< T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector6< T0,T1,T2,T3,T4,T5 > { typedef typename vector6< T0,T1,T2,T3,T4,T5 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6 > struct deque< T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector7< T0,T1,T2,T3,T4,T5,T6 > { typedef typename vector7< T0,T1,T2,T3,T4,T5,T6 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7 > struct deque< T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na , na, na, na > : vector8< T0,T1,T2,T3,T4,T5,T6,T7 > { typedef typename vector8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8 > struct deque< T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na , na, na, na > : vector9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > { typedef typename vector9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 > struct deque< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na , na, na, na > : vector10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > { typedef typename vector10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10 > struct deque< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na , na, na, na > : vector11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > { typedef typename vector11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11 > struct deque< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na , na, na, na, na > : vector12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > { typedef typename vector12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12 > struct deque< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na , na, na, na, na > : vector13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > { typedef typename vector13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13 > struct deque< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na , na, na, na, na > : vector14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > { typedef typename vector14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 > struct deque< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na , na, na, na, na > : vector15< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 > { typedef typename vector15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15 > struct deque< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, na, na, na, na > : vector16< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15 > { typedef typename vector16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16 > struct deque< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, na, na, na > : vector17< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16 > { typedef typename vector17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17 > struct deque< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, na, na > : vector18< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17 > { typedef typename vector18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18 > struct deque< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18, na > : vector19< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18 > { typedef typename vector19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type; }; /// primary template (not a specialization!) template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct deque : vector20< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18, T19 > { typedef typename vector20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/no_ttp/divides.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/divides.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct divides_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< divides_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< divides_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct divides_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct divides_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct divides_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct divides_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) , typename N3 = na, typename N4 = na, typename N5 = na > struct divides : divides< divides< divides< divides< N1,N2 >, N3>, N4>, N5> { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , divides , ( N1, N2, N3, N4, N5 ) ) }; template< typename N1, typename N2, typename N3, typename N4 > struct divides< N1,N2,N3,N4,na > : divides< divides< divides< N1,N2 >, N3>, N4> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , divides , ( N1, N2, N3, N4, na ) ) }; template< typename N1, typename N2, typename N3 > struct divides< N1,N2,N3,na,na > : divides< divides< N1,N2 >, N3> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , divides , ( N1, N2, N3, na, na ) ) }; template< typename N1, typename N2 > struct divides< N1,N2,na,na,na > : divides_impl< typename divides_tag::type , typename divides_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , divides , ( N1, N2, na, na, na ) ) }; BOOST_MPL_AUX_NA_SPEC2(2, 5, divides) }} namespace boost { namespace mpl { namespace aux { template< typename T, T n1, T n2 > struct divides_wknd { BOOST_STATIC_CONSTANT(T, value = (n1 / n2)); typedef integral_c< T,value > type; }; } template<> struct divides_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : aux::divides_wknd< typename aux::largest_int< typename N1::value_type , typename N2::value_type >::type , N1::value , N2::value >::type { }; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/no_ttp/equal_to.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/equal_to.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct equal_to_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< equal_to_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< equal_to_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct equal_to_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct equal_to_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct equal_to_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct equal_to_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct equal_to : equal_to_impl< typename equal_to_tag::type , typename equal_to_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, equal_to, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 2, equal_to) }} namespace boost { namespace mpl { template<> struct equal_to_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply { BOOST_STATIC_CONSTANT(bool, value = ( BOOST_MPL_AUX_VALUE_WKND(N1)::value == BOOST_MPL_AUX_VALUE_WKND(N2)::value ) ); typedef bool_ type; }; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/no_ttp/fold_impl.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/aux_/fold_impl.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { /// forward declaration template< int N , typename First , typename Last , typename State , typename ForwardOp > struct fold_impl; template< typename First , typename Last , typename State , typename ForwardOp > struct fold_impl< 0,First,Last,State,ForwardOp > { typedef First iter0; typedef State state0; typedef state0 state; typedef iter0 iterator; }; template< typename First , typename Last , typename State , typename ForwardOp > struct fold_impl< 1,First,Last,State,ForwardOp > { typedef First iter0; typedef State state0; typedef typename apply2< ForwardOp, state0, typename deref::type >::type state1; typedef typename mpl::next::type iter1; typedef state1 state; typedef iter1 iterator; }; template< typename First , typename Last , typename State , typename ForwardOp > struct fold_impl< 2,First,Last,State,ForwardOp > { typedef First iter0; typedef State state0; typedef typename apply2< ForwardOp, state0, typename deref::type >::type state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp, state1, typename deref::type >::type state2; typedef typename mpl::next::type iter2; typedef state2 state; typedef iter2 iterator; }; template< typename First , typename Last , typename State , typename ForwardOp > struct fold_impl< 3,First,Last,State,ForwardOp > { typedef First iter0; typedef State state0; typedef typename apply2< ForwardOp, state0, typename deref::type >::type state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp, state1, typename deref::type >::type state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp, state2, typename deref::type >::type state3; typedef typename mpl::next::type iter3; typedef state3 state; typedef iter3 iterator; }; template< typename First , typename Last , typename State , typename ForwardOp > struct fold_impl< 4,First,Last,State,ForwardOp > { typedef First iter0; typedef State state0; typedef typename apply2< ForwardOp, state0, typename deref::type >::type state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp, state1, typename deref::type >::type state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp, state2, typename deref::type >::type state3; typedef typename mpl::next::type iter3; typedef typename apply2< ForwardOp, state3, typename deref::type >::type state4; typedef typename mpl::next::type iter4; typedef state4 state; typedef iter4 iterator; }; template< int N , typename First , typename Last , typename State , typename ForwardOp > struct fold_impl { typedef fold_impl< 4 , First , Last , State , ForwardOp > chunk_; typedef fold_impl< ( (N - 4) < 0 ? 0 : N - 4 ) , typename chunk_::iterator , Last , typename chunk_::state , ForwardOp > res_; typedef typename res_::state state; typedef typename res_::iterator iterator; }; template< typename First , typename Last , typename State , typename ForwardOp > struct fold_impl< -1,First,Last,State,ForwardOp > : fold_impl< -1 , typename mpl::next::type , Last , typename apply2::type>::type , ForwardOp > { }; template< typename Last , typename State , typename ForwardOp > struct fold_impl< -1,Last,Last,State,ForwardOp > { typedef State state; typedef Last iterator; }; }}} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/no_ttp/full_lambda.hpp ================================================ // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/aux_/full_lambda.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< bool C1 = false, bool C2 = false, bool C3 = false, bool C4 = false , bool C5 = false > struct lambda_or : true_ { }; template<> struct lambda_or< false,false,false,false,false > : false_ { }; } // namespace aux template< typename T , typename Tag > struct lambda { typedef false_ is_le; typedef T result_; typedef T type; }; template< typename T > struct is_lambda_expression : lambda::is_le { }; template< int N, typename Tag > struct lambda< arg, Tag > { typedef true_ is_le; typedef mpl::arg result_; // qualified for the sake of MIPSpro 7.41 typedef mpl::protect type; }; template< typename F , typename Tag > struct lambda< bind0 , Tag > { typedef false_ is_le; typedef bind0< F > result_; typedef result_ type; }; namespace aux { template< typename IsLE, typename Tag , template< typename P1 > class F , typename L1 > struct le_result1 { typedef F< typename L1::type > result_; typedef result_ type; }; template< typename Tag , template< typename P1 > class F , typename L1 > struct le_result1< true_,Tag,F,L1 > { typedef bind1< quote1< F,Tag > , typename L1::result_ > result_; typedef mpl::protect type; }; } // namespace aux template< template< typename P1 > class F , typename T1 , typename Tag > struct lambda< F , Tag > { typedef lambda< T1,Tag > l1; typedef typename l1::is_le is_le1; typedef typename aux::lambda_or< is_le1::value >::type is_le; typedef aux::le_result1< is_le, Tag, F, l1 > le_result_; typedef typename le_result_::result_ result_; typedef typename le_result_::type type; }; template< typename F, typename T1 , typename Tag > struct lambda< bind1< F,T1 > , Tag > { typedef false_ is_le; typedef bind1< F , T1 > result_; typedef result_ type; }; namespace aux { template< typename IsLE, typename Tag , template< typename P1, typename P2 > class F , typename L1, typename L2 > struct le_result2 { typedef F< typename L1::type, typename L2::type > result_; typedef result_ type; }; template< typename Tag , template< typename P1, typename P2 > class F , typename L1, typename L2 > struct le_result2< true_,Tag,F,L1,L2 > { typedef bind2< quote2< F,Tag > , typename L1::result_, typename L2::result_ > result_; typedef mpl::protect type; }; } // namespace aux template< template< typename P1, typename P2 > class F , typename T1, typename T2 , typename Tag > struct lambda< F< T1,T2 > , Tag > { typedef lambda< T1,Tag > l1; typedef lambda< T2,Tag > l2; typedef typename l1::is_le is_le1; typedef typename l2::is_le is_le2; typedef typename aux::lambda_or< is_le1::value, is_le2::value >::type is_le; typedef aux::le_result2< is_le, Tag, F, l1, l2 > le_result_; typedef typename le_result_::result_ result_; typedef typename le_result_::type type; }; template< typename F, typename T1, typename T2 , typename Tag > struct lambda< bind2< F,T1,T2 > , Tag > { typedef false_ is_le; typedef bind2< F , T1, T2 > result_; typedef result_ type; }; namespace aux { template< typename IsLE, typename Tag , template< typename P1, typename P2, typename P3 > class F , typename L1, typename L2, typename L3 > struct le_result3 { typedef F< typename L1::type, typename L2::type, typename L3::type > result_; typedef result_ type; }; template< typename Tag , template< typename P1, typename P2, typename P3 > class F , typename L1, typename L2, typename L3 > struct le_result3< true_,Tag,F,L1,L2,L3 > { typedef bind3< quote3< F,Tag > , typename L1::result_, typename L2::result_, typename L3::result_ > result_; typedef mpl::protect type; }; } // namespace aux template< template< typename P1, typename P2, typename P3 > class F , typename T1, typename T2, typename T3 , typename Tag > struct lambda< F< T1,T2,T3 > , Tag > { typedef lambda< T1,Tag > l1; typedef lambda< T2,Tag > l2; typedef lambda< T3,Tag > l3; typedef typename l1::is_le is_le1; typedef typename l2::is_le is_le2; typedef typename l3::is_le is_le3; typedef typename aux::lambda_or< is_le1::value, is_le2::value, is_le3::value >::type is_le; typedef aux::le_result3< is_le, Tag, F, l1, l2, l3 > le_result_; typedef typename le_result_::result_ result_; typedef typename le_result_::type type; }; template< typename F, typename T1, typename T2, typename T3 , typename Tag > struct lambda< bind3< F,T1,T2,T3 > , Tag > { typedef false_ is_le; typedef bind3< F , T1, T2, T3 > result_; typedef result_ type; }; namespace aux { template< typename IsLE, typename Tag , template< typename P1, typename P2, typename P3, typename P4 > class F , typename L1, typename L2, typename L3, typename L4 > struct le_result4 { typedef F< typename L1::type, typename L2::type, typename L3::type , typename L4::type > result_; typedef result_ type; }; template< typename Tag , template< typename P1, typename P2, typename P3, typename P4 > class F , typename L1, typename L2, typename L3, typename L4 > struct le_result4< true_,Tag,F,L1,L2,L3,L4 > { typedef bind4< quote4< F,Tag > , typename L1::result_, typename L2::result_, typename L3::result_ , typename L4::result_ > result_; typedef mpl::protect type; }; } // namespace aux template< template< typename P1, typename P2, typename P3, typename P4 > class F , typename T1, typename T2, typename T3, typename T4 , typename Tag > struct lambda< F< T1,T2,T3,T4 > , Tag > { typedef lambda< T1,Tag > l1; typedef lambda< T2,Tag > l2; typedef lambda< T3,Tag > l3; typedef lambda< T4,Tag > l4; typedef typename l1::is_le is_le1; typedef typename l2::is_le is_le2; typedef typename l3::is_le is_le3; typedef typename l4::is_le is_le4; typedef typename aux::lambda_or< is_le1::value, is_le2::value, is_le3::value, is_le4::value >::type is_le; typedef aux::le_result4< is_le, Tag, F, l1, l2, l3, l4 > le_result_; typedef typename le_result_::result_ result_; typedef typename le_result_::type type; }; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename Tag > struct lambda< bind4< F,T1,T2,T3,T4 > , Tag > { typedef false_ is_le; typedef bind4< F , T1, T2, T3, T4 > result_; typedef result_ type; }; namespace aux { template< typename IsLE, typename Tag , template< typename P1, typename P2, typename P3, typename P4, typename P5 > class F , typename L1, typename L2, typename L3, typename L4, typename L5 > struct le_result5 { typedef F< typename L1::type, typename L2::type, typename L3::type , typename L4::type, typename L5::type > result_; typedef result_ type; }; template< typename Tag , template< typename P1, typename P2, typename P3, typename P4, typename P5 > class F , typename L1, typename L2, typename L3, typename L4, typename L5 > struct le_result5< true_,Tag,F,L1,L2,L3,L4,L5 > { typedef bind5< quote5< F,Tag > , typename L1::result_, typename L2::result_, typename L3::result_ , typename L4::result_, typename L5::result_ > result_; typedef mpl::protect type; }; } // namespace aux template< template< typename P1, typename P2, typename P3, typename P4 , typename P5 > class F , typename T1, typename T2, typename T3, typename T4, typename T5 , typename Tag > struct lambda< F< T1,T2,T3,T4,T5 > , Tag > { typedef lambda< T1,Tag > l1; typedef lambda< T2,Tag > l2; typedef lambda< T3,Tag > l3; typedef lambda< T4,Tag > l4; typedef lambda< T5,Tag > l5; typedef typename l1::is_le is_le1; typedef typename l2::is_le is_le2; typedef typename l3::is_le is_le3; typedef typename l4::is_le is_le4; typedef typename l5::is_le is_le5; typedef typename aux::lambda_or< is_le1::value, is_le2::value, is_le3::value, is_le4::value , is_le5::value >::type is_le; typedef aux::le_result5< is_le, Tag, F, l1, l2, l3, l4, l5 > le_result_; typedef typename le_result_::result_ result_; typedef typename le_result_::type type; }; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 , typename Tag > struct lambda< bind5< F,T1,T2,T3,T4,T5 > , Tag > { typedef false_ is_le; typedef bind5< F , T1, T2, T3, T4, T5 > result_; typedef result_ type; }; /// special case for 'protect' template< typename T, typename Tag > struct lambda< mpl::protect, Tag > { typedef false_ is_le; typedef mpl::protect result_; typedef result_ type; }; /// specializations for the main 'bind' form template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 , typename Tag > struct lambda< bind< F,T1,T2,T3,T4,T5 > , Tag > { typedef false_ is_le; typedef bind< F,T1,T2,T3,T4,T5 > result_; typedef result_ type; }; /// workaround for MWCW 8.3+/EDG < 303, leads to ambiguity on Digital Mars template< typename F, typename Tag1, typename Tag2 > struct lambda< lambda< F,Tag1 > , Tag2 > { typedef lambda< F,Tag2 > l1; typedef lambda< Tag1,Tag2 > l2; typedef typename l1::is_le is_le; typedef aux::le_result2 le_result_; typedef typename le_result_::result_ result_; typedef typename le_result_::type type; }; BOOST_MPL_AUX_NA_SPEC(2, lambda) }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/no_ttp/greater.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/greater.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct greater_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< greater_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< greater_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct greater_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct greater_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct greater_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct greater_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct greater : greater_impl< typename greater_tag::type , typename greater_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, greater, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 2, greater) }} namespace boost { namespace mpl { template<> struct greater_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply { BOOST_STATIC_CONSTANT(bool, value = ( BOOST_MPL_AUX_VALUE_WKND(N1)::value > BOOST_MPL_AUX_VALUE_WKND(N2)::value ) ); typedef bool_ type; }; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/no_ttp/greater_equal.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/greater_equal.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct greater_equal_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< greater_equal_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< greater_equal_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct greater_equal_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct greater_equal_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct greater_equal_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct greater_equal_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct greater_equal : greater_equal_impl< typename greater_equal_tag::type , typename greater_equal_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, greater_equal, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 2, greater_equal) }} namespace boost { namespace mpl { template<> struct greater_equal_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply { BOOST_STATIC_CONSTANT(bool, value = ( BOOST_MPL_AUX_VALUE_WKND(N1)::value >= BOOST_MPL_AUX_VALUE_WKND(N2)::value ) ); typedef bool_ type; }; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/no_ttp/inherit.hpp ================================================ // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/inherit.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename BOOST_MPL_AUX_NA_PARAM(T1) , typename BOOST_MPL_AUX_NA_PARAM(T2) > struct inherit2 : T1, T2 { typedef inherit2 type; BOOST_MPL_AUX_LAMBDA_SUPPORT(2, inherit2, (T1, T2)) }; template< typename T1 > struct inherit2< T1,empty_base > { typedef T1 type; BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(2, inherit2, (T1, empty_base)) }; template< typename T2 > struct inherit2< empty_base,T2 > { typedef T2 type; BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(2, inherit2, (empty_base, T2)) }; template<> struct inherit2< empty_base,empty_base > { typedef empty_base type; BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(2, inherit2, (empty_base, empty_base)) }; BOOST_MPL_AUX_NA_SPEC(2, inherit2) template< typename T1 = na, typename T2 = na, typename T3 = na > struct inherit3 : inherit2< typename inherit2< T1, T2 >::type , T3 > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 3 , inherit3 , ( T1, T2, T3) ) }; BOOST_MPL_AUX_NA_SPEC(3, inherit3) template< typename T1 = na, typename T2 = na, typename T3 = na, typename T4 = na > struct inherit4 : inherit2< typename inherit3< T1, T2, T3 >::type , T4 > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 4 , inherit4 , ( T1, T2, T3, T4) ) }; BOOST_MPL_AUX_NA_SPEC(4, inherit4) template< typename T1 = na, typename T2 = na, typename T3 = na, typename T4 = na , typename T5 = na > struct inherit5 : inherit2< typename inherit4< T1, T2, T3, T4 >::type , T5 > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , inherit5 , ( T1, T2, T3, T4, T5) ) }; BOOST_MPL_AUX_NA_SPEC(5, inherit5) /// primary template template< typename T1 = empty_base, typename T2 = empty_base , typename T3 = empty_base, typename T4 = empty_base , typename T5 = empty_base > struct inherit : inherit5< T1,T2,T3,T4,T5 > { }; template<> struct inherit< na,na,na,na,na > { template< typename T1 = empty_base, typename T2 = empty_base , typename T3 = empty_base, typename T4 = empty_base , typename T5 = empty_base > struct apply : inherit< T1,T2,T3,T4,T5 > { }; }; BOOST_MPL_AUX_NA_SPEC_LAMBDA(5, inherit) BOOST_MPL_AUX_NA_SPEC_ARITY(5, inherit) BOOST_MPL_AUX_NA_SPEC_TEMPLATE_ARITY(5, 5, inherit) }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/no_ttp/iter_fold_if_impl.hpp ================================================ // Copyright Aleksey Gurtovoy 2001-2004 // Copyright David Abrahams 2001-2002 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/aux_/iter_fold_if_impl.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< typename Iterator, typename State > struct iter_fold_if_null_step { typedef State state; typedef Iterator iterator; }; template< bool > struct iter_fold_if_step_impl { template< typename Iterator , typename State , typename StateOp , typename IteratorOp > struct result_ { typedef typename apply2< StateOp,State,Iterator >::type state; typedef typename IteratorOp::type iterator; }; }; template<> struct iter_fold_if_step_impl { template< typename Iterator , typename State , typename StateOp , typename IteratorOp > struct result_ { typedef State state; typedef Iterator iterator; }; }; template< typename Iterator , typename State , typename ForwardOp , typename Predicate > struct iter_fold_if_forward_step { typedef typename apply2< Predicate,State,Iterator >::type not_last; typedef typename iter_fold_if_step_impl< BOOST_MPL_AUX_MSVC_VALUE_WKND(not_last)::value >::template result_< Iterator,State,ForwardOp, mpl::next > impl_; typedef typename impl_::state state; typedef typename impl_::iterator iterator; }; template< typename Iterator , typename State , typename BackwardOp , typename Predicate > struct iter_fold_if_backward_step { typedef typename apply2< Predicate,State,Iterator >::type not_last; typedef typename iter_fold_if_step_impl< BOOST_MPL_AUX_MSVC_VALUE_WKND(not_last)::value >::template result_< Iterator,State,BackwardOp, identity > impl_; typedef typename impl_::state state; typedef typename impl_::iterator iterator; }; template< typename Iterator , typename State , typename ForwardOp , typename ForwardPredicate , typename BackwardOp , typename BackwardPredicate > struct iter_fold_if_impl { private: typedef iter_fold_if_null_step< Iterator,State > forward_step0; typedef iter_fold_if_forward_step< typename forward_step0::iterator, typename forward_step0::state, ForwardOp, ForwardPredicate > forward_step1; typedef iter_fold_if_forward_step< typename forward_step1::iterator, typename forward_step1::state, ForwardOp, ForwardPredicate > forward_step2; typedef iter_fold_if_forward_step< typename forward_step2::iterator, typename forward_step2::state, ForwardOp, ForwardPredicate > forward_step3; typedef iter_fold_if_forward_step< typename forward_step3::iterator, typename forward_step3::state, ForwardOp, ForwardPredicate > forward_step4; typedef typename if_< typename forward_step4::not_last , iter_fold_if_impl< typename forward_step4::iterator , typename forward_step4::state , ForwardOp , ForwardPredicate , BackwardOp , BackwardPredicate > , iter_fold_if_null_step< typename forward_step4::iterator , typename forward_step4::state > >::type backward_step4; typedef iter_fold_if_backward_step< typename forward_step3::iterator, typename backward_step4::state, BackwardOp, BackwardPredicate > backward_step3; typedef iter_fold_if_backward_step< typename forward_step2::iterator, typename backward_step3::state, BackwardOp, BackwardPredicate > backward_step2; typedef iter_fold_if_backward_step< typename forward_step1::iterator, typename backward_step2::state, BackwardOp, BackwardPredicate > backward_step1; typedef iter_fold_if_backward_step< typename forward_step0::iterator, typename backward_step1::state, BackwardOp, BackwardPredicate > backward_step0; public: typedef typename backward_step0::state state; typedef typename backward_step4::iterator iterator; }; }}} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/no_ttp/iter_fold_impl.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/aux_/iter_fold_impl.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { /// forward declaration template< int N , typename First , typename Last , typename State , typename ForwardOp > struct iter_fold_impl; template< typename First , typename Last , typename State , typename ForwardOp > struct iter_fold_impl< 0,First,Last,State,ForwardOp > { typedef First iter0; typedef State state0; typedef state0 state; typedef iter0 iterator; }; template< typename First , typename Last , typename State , typename ForwardOp > struct iter_fold_impl< 1,First,Last,State,ForwardOp > { typedef First iter0; typedef State state0; typedef typename apply2< ForwardOp,state0,iter0 >::type state1; typedef typename mpl::next::type iter1; typedef state1 state; typedef iter1 iterator; }; template< typename First , typename Last , typename State , typename ForwardOp > struct iter_fold_impl< 2,First,Last,State,ForwardOp > { typedef First iter0; typedef State state0; typedef typename apply2< ForwardOp,state0,iter0 >::type state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp,state1,iter1 >::type state2; typedef typename mpl::next::type iter2; typedef state2 state; typedef iter2 iterator; }; template< typename First , typename Last , typename State , typename ForwardOp > struct iter_fold_impl< 3,First,Last,State,ForwardOp > { typedef First iter0; typedef State state0; typedef typename apply2< ForwardOp,state0,iter0 >::type state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp,state1,iter1 >::type state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp,state2,iter2 >::type state3; typedef typename mpl::next::type iter3; typedef state3 state; typedef iter3 iterator; }; template< typename First , typename Last , typename State , typename ForwardOp > struct iter_fold_impl< 4,First,Last,State,ForwardOp > { typedef First iter0; typedef State state0; typedef typename apply2< ForwardOp,state0,iter0 >::type state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp,state1,iter1 >::type state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp,state2,iter2 >::type state3; typedef typename mpl::next::type iter3; typedef typename apply2< ForwardOp,state3,iter3 >::type state4; typedef typename mpl::next::type iter4; typedef state4 state; typedef iter4 iterator; }; template< int N , typename First , typename Last , typename State , typename ForwardOp > struct iter_fold_impl { typedef iter_fold_impl< 4 , First , Last , State , ForwardOp > chunk_; typedef iter_fold_impl< ( (N - 4) < 0 ? 0 : N - 4 ) , typename chunk_::iterator , Last , typename chunk_::state , ForwardOp > res_; typedef typename res_::state state; typedef typename res_::iterator iterator; }; template< typename First , typename Last , typename State , typename ForwardOp > struct iter_fold_impl< -1,First,Last,State,ForwardOp > : iter_fold_impl< -1 , typename mpl::next::type , Last , typename apply2< ForwardOp,State,First >::type , ForwardOp > { }; template< typename Last , typename State , typename ForwardOp > struct iter_fold_impl< -1,Last,Last,State,ForwardOp > { typedef State state; typedef Last iterator; }; }}} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/no_ttp/lambda_no_ctps.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/aux_/lambda_no_ctps.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< bool C1 = false, bool C2 = false, bool C3 = false, bool C4 = false , bool C5 = false > struct lambda_or : true_ { }; template<> struct lambda_or< false,false,false,false,false > : false_ { }; template< typename Arity > struct lambda_impl { template< typename T, typename Tag, typename Protect > struct result_ { typedef T type; typedef is_placeholder is_le; }; }; template<> struct lambda_impl< int_<1> > { template< typename F, typename Tag, typename Protect > struct result_ { typedef lambda< typename F::arg1, Tag, false_ > l1; typedef typename l1::is_le is_le1; typedef aux::lambda_or< BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value > is_le; typedef bind1< typename F::rebind , typename l1::type > bind_; typedef typename if_< is_le , if_< Protect, mpl::protect, bind_ > , identity >::type type_; typedef typename type_::type type; }; }; template<> struct lambda_impl< int_<2> > { template< typename F, typename Tag, typename Protect > struct result_ { typedef lambda< typename F::arg1, Tag, false_ > l1; typedef lambda< typename F::arg2, Tag, false_ > l2; typedef typename l1::is_le is_le1; typedef typename l2::is_le is_le2; typedef aux::lambda_or< BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value > is_le; typedef bind2< typename F::rebind , typename l1::type, typename l2::type > bind_; typedef typename if_< is_le , if_< Protect, mpl::protect, bind_ > , identity >::type type_; typedef typename type_::type type; }; }; template<> struct lambda_impl< int_<3> > { template< typename F, typename Tag, typename Protect > struct result_ { typedef lambda< typename F::arg1, Tag, false_ > l1; typedef lambda< typename F::arg2, Tag, false_ > l2; typedef lambda< typename F::arg3, Tag, false_ > l3; typedef typename l1::is_le is_le1; typedef typename l2::is_le is_le2; typedef typename l3::is_le is_le3; typedef aux::lambda_or< BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le3)::value > is_le; typedef bind3< typename F::rebind , typename l1::type, typename l2::type, typename l3::type > bind_; typedef typename if_< is_le , if_< Protect, mpl::protect, bind_ > , identity >::type type_; typedef typename type_::type type; }; }; template<> struct lambda_impl< int_<4> > { template< typename F, typename Tag, typename Protect > struct result_ { typedef lambda< typename F::arg1, Tag, false_ > l1; typedef lambda< typename F::arg2, Tag, false_ > l2; typedef lambda< typename F::arg3, Tag, false_ > l3; typedef lambda< typename F::arg4, Tag, false_ > l4; typedef typename l1::is_le is_le1; typedef typename l2::is_le is_le2; typedef typename l3::is_le is_le3; typedef typename l4::is_le is_le4; typedef aux::lambda_or< BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le3)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le4)::value > is_le; typedef bind4< typename F::rebind , typename l1::type, typename l2::type, typename l3::type , typename l4::type > bind_; typedef typename if_< is_le , if_< Protect, mpl::protect, bind_ > , identity >::type type_; typedef typename type_::type type; }; }; template<> struct lambda_impl< int_<5> > { template< typename F, typename Tag, typename Protect > struct result_ { typedef lambda< typename F::arg1, Tag, false_ > l1; typedef lambda< typename F::arg2, Tag, false_ > l2; typedef lambda< typename F::arg3, Tag, false_ > l3; typedef lambda< typename F::arg4, Tag, false_ > l4; typedef lambda< typename F::arg5, Tag, false_ > l5; typedef typename l1::is_le is_le1; typedef typename l2::is_le is_le2; typedef typename l3::is_le is_le3; typedef typename l4::is_le is_le4; typedef typename l5::is_le is_le5; typedef aux::lambda_or< BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le3)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le4)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le5)::value > is_le; typedef bind5< typename F::rebind , typename l1::type, typename l2::type, typename l3::type , typename l4::type, typename l5::type > bind_; typedef typename if_< is_le , if_< Protect, mpl::protect, bind_ > , identity >::type type_; typedef typename type_::type type; }; }; } // namespace aux template< typename T , typename Tag , typename Protect > struct lambda { /// Metafunction forwarding confuses MSVC 6.x typedef typename aux::template_arity::type arity_; typedef typename aux::lambda_impl ::template result_< T,Tag,Protect > l_; typedef typename l_::type type; typedef typename l_::is_le is_le; BOOST_MPL_AUX_LAMBDA_SUPPORT(3, lambda, (T, Tag, Protect)) }; BOOST_MPL_AUX_NA_SPEC2(1, 3, lambda) template< typename T > struct is_lambda_expression : lambda::is_le { }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/no_ttp/less.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/less.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct less_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< less_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< less_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct less_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct less_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct less_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct less_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct less : less_impl< typename less_tag::type , typename less_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, less, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 2, less) }} namespace boost { namespace mpl { template<> struct less_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply { BOOST_STATIC_CONSTANT(bool, value = ( BOOST_MPL_AUX_VALUE_WKND(N2)::value > BOOST_MPL_AUX_VALUE_WKND(N1)::value ) ); typedef bool_ type; }; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/no_ttp/less_equal.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/less_equal.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct less_equal_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< less_equal_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< less_equal_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct less_equal_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct less_equal_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct less_equal_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct less_equal_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct less_equal : less_equal_impl< typename less_equal_tag::type , typename less_equal_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, less_equal, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 2, less_equal) }} namespace boost { namespace mpl { template<> struct less_equal_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply { BOOST_STATIC_CONSTANT(bool, value = ( BOOST_MPL_AUX_VALUE_WKND(N1)::value <= BOOST_MPL_AUX_VALUE_WKND(N2)::value ) ); typedef bool_ type; }; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/no_ttp/list.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/list.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na , typename T12 = na, typename T13 = na, typename T14 = na , typename T15 = na, typename T16 = na, typename T17 = na , typename T18 = na, typename T19 = na > struct list; template< > struct list< na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : list0< > { typedef list0< >::type type; }; template< typename T0 > struct list< T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : list1 { typedef typename list1::type type; }; template< typename T0, typename T1 > struct list< T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : list2< T0,T1 > { typedef typename list2< T0,T1 >::type type; }; template< typename T0, typename T1, typename T2 > struct list< T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : list3< T0,T1,T2 > { typedef typename list3< T0,T1,T2 >::type type; }; template< typename T0, typename T1, typename T2, typename T3 > struct list< T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : list4< T0,T1,T2,T3 > { typedef typename list4< T0,T1,T2,T3 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 > struct list< T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : list5< T0,T1,T2,T3,T4 > { typedef typename list5< T0,T1,T2,T3,T4 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct list< T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : list6< T0,T1,T2,T3,T4,T5 > { typedef typename list6< T0,T1,T2,T3,T4,T5 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6 > struct list< T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na , na, na, na > : list7< T0,T1,T2,T3,T4,T5,T6 > { typedef typename list7< T0,T1,T2,T3,T4,T5,T6 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7 > struct list< T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na , na, na, na > : list8< T0,T1,T2,T3,T4,T5,T6,T7 > { typedef typename list8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8 > struct list< T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na , na, na, na > : list9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > { typedef typename list9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 > struct list< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na , na, na, na > : list10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > { typedef typename list10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10 > struct list< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na , na, na, na > : list11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > { typedef typename list11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11 > struct list< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na , na, na, na, na > : list12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > { typedef typename list12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12 > struct list< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na , na, na, na, na > : list13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > { typedef typename list13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13 > struct list< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na , na, na, na, na > : list14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > { typedef typename list14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 > struct list< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na , na, na, na, na > : list15< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 > { typedef typename list15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15 > struct list< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, na, na, na, na > : list16< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15 > { typedef typename list16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16 > struct list< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, na, na, na > : list17< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16 > { typedef typename list17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17 > struct list< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, na, na > : list18< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17 > { typedef typename list18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18 > struct list< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18, na > : list19< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18 > { typedef typename list19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type; }; /// primary template (not a specialization!) template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct list : list20< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18, T19 > { typedef typename list20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/no_ttp/list_c.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/list_c.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename T, long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX , long C3 = LONG_MAX, long C4 = LONG_MAX, long C5 = LONG_MAX , long C6 = LONG_MAX, long C7 = LONG_MAX, long C8 = LONG_MAX , long C9 = LONG_MAX, long C10 = LONG_MAX, long C11 = LONG_MAX , long C12 = LONG_MAX, long C13 = LONG_MAX, long C14 = LONG_MAX , long C15 = LONG_MAX, long C16 = LONG_MAX, long C17 = LONG_MAX , long C18 = LONG_MAX, long C19 = LONG_MAX > struct list_c; template< typename T > struct list_c< T, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list0_c { typedef typename list0_c::type type; }; template< typename T, long C0 > struct list_c< T, C0, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list1_c< T,C0 > { typedef typename list1_c< T,C0 >::type type; }; template< typename T, long C0, long C1 > struct list_c< T, C0, C1, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list2_c< T,C0,C1 > { typedef typename list2_c< T,C0,C1 >::type type; }; template< typename T, long C0, long C1, long C2 > struct list_c< T, C0, C1, C2, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list3_c< T,C0,C1,C2 > { typedef typename list3_c< T,C0,C1,C2 >::type type; }; template< typename T, long C0, long C1, long C2, long C3 > struct list_c< T, C0, C1, C2, C3, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list4_c< T,C0,C1,C2,C3 > { typedef typename list4_c< T,C0,C1,C2,C3 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4 > struct list_c< T, C0, C1, C2, C3, C4, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list5_c< T,C0,C1,C2,C3,C4 > { typedef typename list5_c< T,C0,C1,C2,C3,C4 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 > struct list_c< T, C0, C1, C2, C3, C4, C5, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX > : list6_c< T,C0,C1,C2,C3,C4,C5 > { typedef typename list6_c< T,C0,C1,C2,C3,C4,C5 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX > : list7_c< T,C0,C1,C2,C3,C4,C5,C6 > { typedef typename list7_c< T,C0,C1,C2,C3,C4,C5,C6 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, C7, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX > : list8_c< T,C0,C1,C2,C3,C4,C5,C6,C7 > { typedef typename list8_c< T,C0,C1,C2,C3,C4,C5,C6,C7 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX > : list9_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8 > { typedef typename list9_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX > : list10_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 > { typedef typename list10_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list11_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 > { typedef typename list11_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list12_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 > { typedef typename list12_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list13_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 > { typedef typename list13_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list14_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 > { typedef typename list14_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list15_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 > { typedef typename list15_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list16_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15 > { typedef typename list16_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, LONG_MAX, LONG_MAX, LONG_MAX > : list17_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16 > { typedef typename list17_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, C17, LONG_MAX, LONG_MAX > : list18_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, C17 > { typedef typename list18_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, C17, C18, LONG_MAX > : list19_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, C17, C18 > { typedef typename list19_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18 >::type type; }; /// primary template (not a specialization!) template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct list_c : list20_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, C17, C18, C19 > { typedef typename list20_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19 >::type type; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/no_ttp/map.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/map.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na , typename T12 = na, typename T13 = na, typename T14 = na , typename T15 = na, typename T16 = na, typename T17 = na , typename T18 = na, typename T19 = na > struct map; template< > struct map< na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : map0< > { typedef map0< >::type type; }; template< typename T0 > struct map< T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : map1 { typedef typename map1::type type; }; template< typename T0, typename T1 > struct map< T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : map2< T0,T1 > { typedef typename map2< T0,T1 >::type type; }; template< typename T0, typename T1, typename T2 > struct map< T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : map3< T0,T1,T2 > { typedef typename map3< T0,T1,T2 >::type type; }; template< typename T0, typename T1, typename T2, typename T3 > struct map< T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : map4< T0,T1,T2,T3 > { typedef typename map4< T0,T1,T2,T3 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 > struct map< T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : map5< T0,T1,T2,T3,T4 > { typedef typename map5< T0,T1,T2,T3,T4 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct map< T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : map6< T0,T1,T2,T3,T4,T5 > { typedef typename map6< T0,T1,T2,T3,T4,T5 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6 > struct map< T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na , na, na, na > : map7< T0,T1,T2,T3,T4,T5,T6 > { typedef typename map7< T0,T1,T2,T3,T4,T5,T6 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7 > struct map< T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na , na, na, na > : map8< T0,T1,T2,T3,T4,T5,T6,T7 > { typedef typename map8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8 > struct map< T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na , na, na, na > : map9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > { typedef typename map9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 > struct map< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na , na, na, na > : map10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > { typedef typename map10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10 > struct map< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na , na, na, na > : map11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > { typedef typename map11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11 > struct map< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na , na, na, na, na > : map12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > { typedef typename map12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12 > struct map< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na , na, na, na, na > : map13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > { typedef typename map13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13 > struct map< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na , na, na, na, na > : map14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > { typedef typename map14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 > struct map< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na , na, na, na, na > : map15< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 > { typedef typename map15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15 > struct map< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, na, na, na, na > : map16< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15 > { typedef typename map16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16 > struct map< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, na, na, na > : map17< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16 > { typedef typename map17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17 > struct map< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, na, na > : map18< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17 > { typedef typename map18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18 > struct map< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18, na > : map19< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18 > { typedef typename map19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type; }; /// primary template (not a specialization!) template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct map : map20< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18, T19 > { typedef typename map20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/no_ttp/minus.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/minus.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct minus_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< minus_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< minus_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct minus_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct minus_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct minus_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct minus_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) , typename N3 = na, typename N4 = na, typename N5 = na > struct minus : minus< minus< minus< minus< N1,N2 >, N3>, N4>, N5> { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , minus , ( N1, N2, N3, N4, N5 ) ) }; template< typename N1, typename N2, typename N3, typename N4 > struct minus< N1,N2,N3,N4,na > : minus< minus< minus< N1,N2 >, N3>, N4> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , minus , ( N1, N2, N3, N4, na ) ) }; template< typename N1, typename N2, typename N3 > struct minus< N1,N2,N3,na,na > : minus< minus< N1,N2 >, N3> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , minus , ( N1, N2, N3, na, na ) ) }; template< typename N1, typename N2 > struct minus< N1,N2,na,na,na > : minus_impl< typename minus_tag::type , typename minus_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , minus , ( N1, N2, na, na, na ) ) }; BOOST_MPL_AUX_NA_SPEC2(2, 5, minus) }} namespace boost { namespace mpl { namespace aux { template< typename T, T n1, T n2 > struct minus_wknd { BOOST_STATIC_CONSTANT(T, value = (n1 - n2)); typedef integral_c< T,value > type; }; } template<> struct minus_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : aux::minus_wknd< typename aux::largest_int< typename N1::value_type , typename N2::value_type >::type , N1::value , N2::value >::type { }; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/no_ttp/modulus.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/modulus.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct modulus_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< modulus_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< modulus_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct modulus_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct modulus_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct modulus_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct modulus_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct modulus : modulus_impl< typename modulus_tag::type , typename modulus_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, modulus, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 2, modulus) }} namespace boost { namespace mpl { namespace aux { template< typename T, T n1, T n2 > struct modulus_wknd { BOOST_STATIC_CONSTANT(T, value = (n1 % n2)); typedef integral_c< T,value > type; }; } template<> struct modulus_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : aux::modulus_wknd< typename aux::largest_int< typename N1::value_type , typename N2::value_type >::type , N1::value , N2::value >::type { }; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/no_ttp/not_equal_to.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/not_equal_to.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct not_equal_to_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< not_equal_to_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< not_equal_to_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct not_equal_to_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct not_equal_to_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct not_equal_to_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct not_equal_to_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct not_equal_to : not_equal_to_impl< typename not_equal_to_tag::type , typename not_equal_to_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, not_equal_to, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 2, not_equal_to) }} namespace boost { namespace mpl { template<> struct not_equal_to_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply { BOOST_STATIC_CONSTANT(bool, value = ( BOOST_MPL_AUX_VALUE_WKND(N1)::value != BOOST_MPL_AUX_VALUE_WKND(N2)::value ) ); typedef bool_ type; }; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/no_ttp/or.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/or.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< bool C_, typename T1, typename T2, typename T3, typename T4 > struct or_impl : true_ { }; template< typename T1, typename T2, typename T3, typename T4 > struct or_impl< false,T1,T2,T3,T4 > : or_impl< BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value , T2, T3, T4 , false_ > { }; template<> struct or_impl< false , false_, false_, false_, false_ > : false_ { }; } // namespace aux template< typename BOOST_MPL_AUX_NA_PARAM(T1) , typename BOOST_MPL_AUX_NA_PARAM(T2) , typename T3 = false_, typename T4 = false_, typename T5 = false_ > struct or_ : aux::or_impl< BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value , T2, T3, T4, T5 > { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , or_ , ( T1, T2, T3, T4, T5) ) }; BOOST_MPL_AUX_NA_SPEC2( 2 , 5 , or_ ) }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/no_ttp/placeholders.hpp ================================================ // Copyright Aleksey Gurtovoy 2001-2004 // Copyright Peter Dimov 2001-2003 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/placeholders.hpp" header // -- DO NOT modify by hand! BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg< -1 > _; BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE namespace boost { namespace mpl { BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_) namespace placeholders { using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_; } }} /// agurt, 17/mar/02: one more placeholder for the last 'apply#' /// specialization BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg<1> _1; BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE namespace boost { namespace mpl { BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_1) namespace placeholders { using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_1; } }} BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg<2> _2; BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE namespace boost { namespace mpl { BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_2) namespace placeholders { using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_2; } }} BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg<3> _3; BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE namespace boost { namespace mpl { BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_3) namespace placeholders { using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_3; } }} BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg<4> _4; BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE namespace boost { namespace mpl { BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_4) namespace placeholders { using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_4; } }} BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg<5> _5; BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE namespace boost { namespace mpl { BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_5) namespace placeholders { using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_5; } }} BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg<6> _6; BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE namespace boost { namespace mpl { BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_6) namespace placeholders { using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_6; } }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/no_ttp/plus.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/plus.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct plus_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< plus_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< plus_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct plus_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct plus_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct plus_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct plus_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) , typename N3 = na, typename N4 = na, typename N5 = na > struct plus : plus< plus< plus< plus< N1,N2 >, N3>, N4>, N5> { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , plus , ( N1, N2, N3, N4, N5 ) ) }; template< typename N1, typename N2, typename N3, typename N4 > struct plus< N1,N2,N3,N4,na > : plus< plus< plus< N1,N2 >, N3>, N4> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , plus , ( N1, N2, N3, N4, na ) ) }; template< typename N1, typename N2, typename N3 > struct plus< N1,N2,N3,na,na > : plus< plus< N1,N2 >, N3> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , plus , ( N1, N2, N3, na, na ) ) }; template< typename N1, typename N2 > struct plus< N1,N2,na,na,na > : plus_impl< typename plus_tag::type , typename plus_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , plus , ( N1, N2, na, na, na ) ) }; BOOST_MPL_AUX_NA_SPEC2(2, 5, plus) }} namespace boost { namespace mpl { namespace aux { template< typename T, T n1, T n2 > struct plus_wknd { BOOST_STATIC_CONSTANT(T, value = (n1 + n2)); typedef integral_c< T,value > type; }; } template<> struct plus_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : aux::plus_wknd< typename aux::largest_int< typename N1::value_type , typename N2::value_type >::type , N1::value , N2::value >::type { }; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/no_ttp/quote.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/quote.hpp" header // -- DO NOT modify by hand! ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/no_ttp/reverse_fold_impl.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/aux_/reverse_fold_impl.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { /// forward declaration template< long N , typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_fold_impl; template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_fold_impl< 0,First,Last,State,BackwardOp,ForwardOp > { typedef First iter0; typedef State fwd_state0; typedef fwd_state0 bkwd_state0; typedef bkwd_state0 state; typedef iter0 iterator; }; template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_fold_impl< 1,First,Last,State,BackwardOp,ForwardOp > { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; typedef typename mpl::next::type iter1; typedef fwd_state1 bkwd_state1; typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; typedef bkwd_state0 state; typedef iter1 iterator; }; template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_fold_impl< 2,First,Last,State,BackwardOp,ForwardOp > { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp, fwd_state1, typename deref::type >::type fwd_state2; typedef typename mpl::next::type iter2; typedef fwd_state2 bkwd_state2; typedef typename apply2< BackwardOp, bkwd_state2, typename deref::type >::type bkwd_state1; typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; typedef bkwd_state0 state; typedef iter2 iterator; }; template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_fold_impl< 3,First,Last,State,BackwardOp,ForwardOp > { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp, fwd_state1, typename deref::type >::type fwd_state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp, fwd_state2, typename deref::type >::type fwd_state3; typedef typename mpl::next::type iter3; typedef fwd_state3 bkwd_state3; typedef typename apply2< BackwardOp, bkwd_state3, typename deref::type >::type bkwd_state2; typedef typename apply2< BackwardOp, bkwd_state2, typename deref::type >::type bkwd_state1; typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; typedef bkwd_state0 state; typedef iter3 iterator; }; template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_fold_impl< 4,First,Last,State,BackwardOp,ForwardOp > { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp, fwd_state1, typename deref::type >::type fwd_state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp, fwd_state2, typename deref::type >::type fwd_state3; typedef typename mpl::next::type iter3; typedef typename apply2< ForwardOp, fwd_state3, typename deref::type >::type fwd_state4; typedef typename mpl::next::type iter4; typedef fwd_state4 bkwd_state4; typedef typename apply2< BackwardOp, bkwd_state4, typename deref::type >::type bkwd_state3; typedef typename apply2< BackwardOp, bkwd_state3, typename deref::type >::type bkwd_state2; typedef typename apply2< BackwardOp, bkwd_state2, typename deref::type >::type bkwd_state1; typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; typedef bkwd_state0 state; typedef iter4 iterator; }; template< long N , typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_fold_impl { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp, fwd_state1, typename deref::type >::type fwd_state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp, fwd_state2, typename deref::type >::type fwd_state3; typedef typename mpl::next::type iter3; typedef typename apply2< ForwardOp, fwd_state3, typename deref::type >::type fwd_state4; typedef typename mpl::next::type iter4; typedef reverse_fold_impl< ( (N - 4) < 0 ? 0 : N - 4 ) , iter4 , Last , fwd_state4 , BackwardOp , ForwardOp > nested_chunk; typedef typename nested_chunk::state bkwd_state4; typedef typename apply2< BackwardOp, bkwd_state4, typename deref::type >::type bkwd_state3; typedef typename apply2< BackwardOp, bkwd_state3, typename deref::type >::type bkwd_state2; typedef typename apply2< BackwardOp, bkwd_state2, typename deref::type >::type bkwd_state1; typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; typedef bkwd_state0 state; typedef typename nested_chunk::iterator iterator; }; template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_fold_impl< -1,First,Last,State,BackwardOp,ForwardOp > { typedef reverse_fold_impl< -1 , typename mpl::next::type , Last , typename apply2::type>::type , BackwardOp , ForwardOp > nested_step; typedef typename apply2< BackwardOp , typename nested_step::state , typename deref::type >::type state; typedef typename nested_step::iterator iterator; }; template< typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_fold_impl< -1,Last,Last,State,BackwardOp,ForwardOp > { typedef State state; typedef Last iterator; }; }}} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/no_ttp/reverse_iter_fold_impl.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/aux_/reverse_iter_fold_impl.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { /// forward declaration template< long N , typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_iter_fold_impl; template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_iter_fold_impl< 0,First,Last,State,BackwardOp,ForwardOp > { typedef First iter0; typedef State fwd_state0; typedef fwd_state0 bkwd_state0; typedef bkwd_state0 state; typedef iter0 iterator; }; template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_iter_fold_impl< 1,First,Last,State,BackwardOp,ForwardOp > { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; typedef typename mpl::next::type iter1; typedef fwd_state1 bkwd_state1; typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; typedef bkwd_state0 state; typedef iter1 iterator; }; template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_iter_fold_impl< 2,First,Last,State,BackwardOp,ForwardOp > { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; typedef typename mpl::next::type iter2; typedef fwd_state2 bkwd_state2; typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1; typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; typedef bkwd_state0 state; typedef iter2 iterator; }; template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_iter_fold_impl< 3,First,Last,State,BackwardOp,ForwardOp > { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp,fwd_state2,iter2 >::type fwd_state3; typedef typename mpl::next::type iter3; typedef fwd_state3 bkwd_state3; typedef typename apply2< BackwardOp,bkwd_state3,iter2 >::type bkwd_state2; typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1; typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; typedef bkwd_state0 state; typedef iter3 iterator; }; template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_iter_fold_impl< 4,First,Last,State,BackwardOp,ForwardOp > { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp,fwd_state2,iter2 >::type fwd_state3; typedef typename mpl::next::type iter3; typedef typename apply2< ForwardOp,fwd_state3,iter3 >::type fwd_state4; typedef typename mpl::next::type iter4; typedef fwd_state4 bkwd_state4; typedef typename apply2< BackwardOp,bkwd_state4,iter3 >::type bkwd_state3; typedef typename apply2< BackwardOp,bkwd_state3,iter2 >::type bkwd_state2; typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1; typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; typedef bkwd_state0 state; typedef iter4 iterator; }; template< long N , typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_iter_fold_impl { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp,fwd_state2,iter2 >::type fwd_state3; typedef typename mpl::next::type iter3; typedef typename apply2< ForwardOp,fwd_state3,iter3 >::type fwd_state4; typedef typename mpl::next::type iter4; typedef reverse_iter_fold_impl< ( (N - 4) < 0 ? 0 : N - 4 ) , iter4 , Last , fwd_state4 , BackwardOp , ForwardOp > nested_chunk; typedef typename nested_chunk::state bkwd_state4; typedef typename apply2< BackwardOp,bkwd_state4,iter3 >::type bkwd_state3; typedef typename apply2< BackwardOp,bkwd_state3,iter2 >::type bkwd_state2; typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1; typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; typedef bkwd_state0 state; typedef typename nested_chunk::iterator iterator; }; template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_iter_fold_impl< -1,First,Last,State,BackwardOp,ForwardOp > { typedef reverse_iter_fold_impl< -1 , typename mpl::next::type , Last , typename apply2< ForwardOp,State,First >::type , BackwardOp , ForwardOp > nested_step; typedef typename apply2< BackwardOp , typename nested_step::state , First >::type state; typedef typename nested_step::iterator iterator; }; template< typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_iter_fold_impl< -1,Last,Last,State,BackwardOp,ForwardOp > { typedef State state; typedef Last iterator; }; }}} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/no_ttp/set.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/set.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na , typename T12 = na, typename T13 = na, typename T14 = na , typename T15 = na, typename T16 = na, typename T17 = na , typename T18 = na, typename T19 = na > struct set; template< > struct set< na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : set0< > { typedef set0< >::type type; }; template< typename T0 > struct set< T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : set1 { typedef typename set1::type type; }; template< typename T0, typename T1 > struct set< T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : set2< T0,T1 > { typedef typename set2< T0,T1 >::type type; }; template< typename T0, typename T1, typename T2 > struct set< T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : set3< T0,T1,T2 > { typedef typename set3< T0,T1,T2 >::type type; }; template< typename T0, typename T1, typename T2, typename T3 > struct set< T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : set4< T0,T1,T2,T3 > { typedef typename set4< T0,T1,T2,T3 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 > struct set< T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : set5< T0,T1,T2,T3,T4 > { typedef typename set5< T0,T1,T2,T3,T4 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct set< T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : set6< T0,T1,T2,T3,T4,T5 > { typedef typename set6< T0,T1,T2,T3,T4,T5 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6 > struct set< T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na , na, na, na > : set7< T0,T1,T2,T3,T4,T5,T6 > { typedef typename set7< T0,T1,T2,T3,T4,T5,T6 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7 > struct set< T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na , na, na, na > : set8< T0,T1,T2,T3,T4,T5,T6,T7 > { typedef typename set8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8 > struct set< T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na , na, na, na > : set9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > { typedef typename set9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 > struct set< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na , na, na, na > : set10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > { typedef typename set10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10 > struct set< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na , na, na, na > : set11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > { typedef typename set11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11 > struct set< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na , na, na, na, na > : set12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > { typedef typename set12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12 > struct set< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na , na, na, na, na > : set13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > { typedef typename set13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13 > struct set< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na , na, na, na, na > : set14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > { typedef typename set14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 > struct set< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na , na, na, na, na > : set15< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 > { typedef typename set15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15 > struct set< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, na, na, na, na > : set16< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15 > { typedef typename set16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16 > struct set< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, na, na, na > : set17< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16 > { typedef typename set17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17 > struct set< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, na, na > : set18< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17 > { typedef typename set18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18 > struct set< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18, na > : set19< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18 > { typedef typename set19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type; }; /// primary template (not a specialization!) template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct set : set20< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18, T19 > { typedef typename set20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/no_ttp/set_c.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/set_c.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename T, long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX , long C3 = LONG_MAX, long C4 = LONG_MAX, long C5 = LONG_MAX , long C6 = LONG_MAX, long C7 = LONG_MAX, long C8 = LONG_MAX , long C9 = LONG_MAX, long C10 = LONG_MAX, long C11 = LONG_MAX , long C12 = LONG_MAX, long C13 = LONG_MAX, long C14 = LONG_MAX , long C15 = LONG_MAX, long C16 = LONG_MAX, long C17 = LONG_MAX , long C18 = LONG_MAX, long C19 = LONG_MAX > struct set_c; template< typename T > struct set_c< T, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : set0_c { typedef typename set0_c::type type; }; template< typename T, long C0 > struct set_c< T, C0, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : set1_c< T,C0 > { typedef typename set1_c< T,C0 >::type type; }; template< typename T, long C0, long C1 > struct set_c< T, C0, C1, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : set2_c< T,C0,C1 > { typedef typename set2_c< T,C0,C1 >::type type; }; template< typename T, long C0, long C1, long C2 > struct set_c< T, C0, C1, C2, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : set3_c< T,C0,C1,C2 > { typedef typename set3_c< T,C0,C1,C2 >::type type; }; template< typename T, long C0, long C1, long C2, long C3 > struct set_c< T, C0, C1, C2, C3, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : set4_c< T,C0,C1,C2,C3 > { typedef typename set4_c< T,C0,C1,C2,C3 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4 > struct set_c< T, C0, C1, C2, C3, C4, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : set5_c< T,C0,C1,C2,C3,C4 > { typedef typename set5_c< T,C0,C1,C2,C3,C4 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 > struct set_c< T, C0, C1, C2, C3, C4, C5, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX > : set6_c< T,C0,C1,C2,C3,C4,C5 > { typedef typename set6_c< T,C0,C1,C2,C3,C4,C5 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX > : set7_c< T,C0,C1,C2,C3,C4,C5,C6 > { typedef typename set7_c< T,C0,C1,C2,C3,C4,C5,C6 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, C7, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX > : set8_c< T,C0,C1,C2,C3,C4,C5,C6,C7 > { typedef typename set8_c< T,C0,C1,C2,C3,C4,C5,C6,C7 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX > : set9_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8 > { typedef typename set9_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX > : set10_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 > { typedef typename set10_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : set11_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 > { typedef typename set11_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : set12_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 > { typedef typename set12_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : set13_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 > { typedef typename set13_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : set14_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 > { typedef typename set14_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : set15_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 > { typedef typename set15_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : set16_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15 > { typedef typename set16_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, LONG_MAX, LONG_MAX, LONG_MAX > : set17_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16 > { typedef typename set17_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, C17, LONG_MAX, LONG_MAX > : set18_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, C17 > { typedef typename set18_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, C17, C18, LONG_MAX > : set19_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, C17, C18 > { typedef typename set19_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18 >::type type; }; /// primary template (not a specialization!) template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct set_c : set20_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, C17, C18, C19 > { typedef typename set20_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19 >::type type; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/no_ttp/shift_left.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // Copyright Jaap Suter 2003 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/shift_left.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct shift_left_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< shift_left_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< shift_left_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct shift_left_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct shift_left_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct shift_left_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct shift_left_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct shift_left : shift_left_impl< typename shift_left_tag::type , typename shift_left_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, shift_left, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 2, shift_left) }} namespace boost { namespace mpl { namespace aux { template< typename T, typename Shift, T n, Shift s > struct shift_left_wknd { BOOST_STATIC_CONSTANT(T, value = (n << s)); typedef integral_c< T,value > type; }; } template<> struct shift_left_impl< integral_c_tag,integral_c_tag > { template< typename N, typename S > struct apply : aux::shift_left_wknd< typename N::value_type , typename S::value_type , N::value , S::value >::type { }; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/no_ttp/shift_right.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // Copyright Jaap Suter 2003 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/shift_right.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct shift_right_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< shift_right_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< shift_right_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct shift_right_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct shift_right_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct shift_right_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct shift_right_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct shift_right : shift_right_impl< typename shift_right_tag::type , typename shift_right_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT(2, shift_right, (N1, N2)) }; BOOST_MPL_AUX_NA_SPEC2(2, 2, shift_right) }} namespace boost { namespace mpl { namespace aux { template< typename T, typename Shift, T n, Shift s > struct shift_right_wknd { BOOST_STATIC_CONSTANT(T, value = (n >> s)); typedef integral_c< T,value > type; }; } template<> struct shift_right_impl< integral_c_tag,integral_c_tag > { template< typename N, typename S > struct apply : aux::shift_right_wknd< typename N::value_type , typename S::value_type , N::value , S::value >::type { }; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/no_ttp/template_arity.hpp ================================================ // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/aux_/template_arity.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< bool > struct template_arity_impl { template< typename F > struct result_ : mpl::int_< -1 > { }; }; template<> struct template_arity_impl { template< typename F > struct result_ : F::arity { }; }; template< typename F > struct template_arity : template_arity_impl< ::boost::mpl::aux::has_rebind::value > ::template result_ { }; }}} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/no_ttp/times.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/times.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct times_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< times_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< times_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct times_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct times_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct times_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct times_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) , typename N3 = na, typename N4 = na, typename N5 = na > struct times : times< times< times< times< N1,N2 >, N3>, N4>, N5> { BOOST_MPL_AUX_LAMBDA_SUPPORT( 5 , times , ( N1, N2, N3, N4, N5 ) ) }; template< typename N1, typename N2, typename N3, typename N4 > struct times< N1,N2,N3,N4,na > : times< times< times< N1,N2 >, N3>, N4> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , times , ( N1, N2, N3, N4, na ) ) }; template< typename N1, typename N2, typename N3 > struct times< N1,N2,N3,na,na > : times< times< N1,N2 >, N3> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , times , ( N1, N2, N3, na, na ) ) }; template< typename N1, typename N2 > struct times< N1,N2,na,na,na > : times_impl< typename times_tag::type , typename times_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , times , ( N1, N2, na, na, na ) ) }; BOOST_MPL_AUX_NA_SPEC2(2, 5, times) }} namespace boost { namespace mpl { namespace aux { template< typename T, T n1, T n2 > struct times_wknd { BOOST_STATIC_CONSTANT(T, value = (n1 * n2)); typedef integral_c< T,value > type; }; } template<> struct times_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : aux::times_wknd< typename aux::largest_int< typename N1::value_type , typename N2::value_type >::type , N1::value , N2::value >::type { }; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/no_ttp/unpack_args.hpp ================================================ // Copyright Aleksey Gurtovoy 2002-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/unpack_args.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< int size, typename F, typename Args > struct unpack_args_impl; template< typename F, typename Args > struct unpack_args_impl< 0,F,Args > : apply0< F > { }; template< typename F, typename Args > struct unpack_args_impl< 1,F,Args > : apply1< F , typename at_c< Args,0 >::type > { }; template< typename F, typename Args > struct unpack_args_impl< 2,F,Args > : apply2< F , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type > { }; template< typename F, typename Args > struct unpack_args_impl< 3,F,Args > : apply3< F , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type , typename at_c< Args,2 >::type > { }; template< typename F, typename Args > struct unpack_args_impl< 4,F,Args > : apply4< F , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type , typename at_c< Args,2 >::type, typename at_c< Args,3 >::type > { }; template< typename F, typename Args > struct unpack_args_impl< 5,F,Args > : apply5< F , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type , typename at_c< Args,2 >::type, typename at_c< Args,3 >::type , typename at_c< Args,4 >::type > { }; } template< typename F > struct unpack_args { template< typename Args > struct apply : aux::unpack_args_impl< size::value,F, Args > { }; }; BOOST_MPL_AUX_PASS_THROUGH_LAMBDA_SPEC(1, unpack_args) }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/no_ttp/vector.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/vector.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na , typename T12 = na, typename T13 = na, typename T14 = na , typename T15 = na, typename T16 = na, typename T17 = na , typename T18 = na, typename T19 = na > struct vector; template< > struct vector< na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector0< > { typedef vector0< >::type type; }; template< typename T0 > struct vector< T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector1 { typedef typename vector1::type type; }; template< typename T0, typename T1 > struct vector< T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector2< T0,T1 > { typedef typename vector2< T0,T1 >::type type; }; template< typename T0, typename T1, typename T2 > struct vector< T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector3< T0,T1,T2 > { typedef typename vector3< T0,T1,T2 >::type type; }; template< typename T0, typename T1, typename T2, typename T3 > struct vector< T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector4< T0,T1,T2,T3 > { typedef typename vector4< T0,T1,T2,T3 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 > struct vector< T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector5< T0,T1,T2,T3,T4 > { typedef typename vector5< T0,T1,T2,T3,T4 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct vector< T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector6< T0,T1,T2,T3,T4,T5 > { typedef typename vector6< T0,T1,T2,T3,T4,T5 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6 > struct vector< T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector7< T0,T1,T2,T3,T4,T5,T6 > { typedef typename vector7< T0,T1,T2,T3,T4,T5,T6 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7 > struct vector< T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na , na, na, na > : vector8< T0,T1,T2,T3,T4,T5,T6,T7 > { typedef typename vector8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8 > struct vector< T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na , na, na, na > : vector9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > { typedef typename vector9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 > struct vector< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na , na, na, na > : vector10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > { typedef typename vector10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10 > struct vector< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na , na, na, na > : vector11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > { typedef typename vector11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11 > struct vector< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na , na, na, na, na > : vector12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > { typedef typename vector12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12 > struct vector< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na , na, na, na, na > : vector13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > { typedef typename vector13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13 > struct vector< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na , na, na, na, na > : vector14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > { typedef typename vector14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 > struct vector< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na , na, na, na, na > : vector15< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 > { typedef typename vector15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15 > struct vector< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, na, na, na, na > : vector16< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15 > { typedef typename vector16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16 > struct vector< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, na, na, na > : vector17< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16 > { typedef typename vector17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17 > struct vector< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, na, na > : vector18< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17 > { typedef typename vector18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18 > struct vector< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18, na > : vector19< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18 > { typedef typename vector19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type; }; /// primary template (not a specialization!) template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct vector : vector20< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18, T19 > { typedef typename vector20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/no_ttp/vector_c.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/vector_c.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename T, long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX , long C3 = LONG_MAX, long C4 = LONG_MAX, long C5 = LONG_MAX , long C6 = LONG_MAX, long C7 = LONG_MAX, long C8 = LONG_MAX , long C9 = LONG_MAX, long C10 = LONG_MAX, long C11 = LONG_MAX , long C12 = LONG_MAX, long C13 = LONG_MAX, long C14 = LONG_MAX , long C15 = LONG_MAX, long C16 = LONG_MAX, long C17 = LONG_MAX , long C18 = LONG_MAX, long C19 = LONG_MAX > struct vector_c; template< typename T > struct vector_c< T, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector0_c { typedef typename vector0_c::type type; }; template< typename T, long C0 > struct vector_c< T, C0, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector1_c< T, T(C0) > { typedef typename vector1_c< T, T(C0) >::type type; }; template< typename T, long C0, long C1 > struct vector_c< T, C0, C1, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector2_c< T, T(C0), T(C1) > { typedef typename vector2_c< T, T(C0), T(C1) >::type type; }; template< typename T, long C0, long C1, long C2 > struct vector_c< T, C0, C1, C2, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector3_c< T, T(C0), T(C1), T(C2) > { typedef typename vector3_c< T, T(C0), T(C1), T(C2) >::type type; }; template< typename T, long C0, long C1, long C2, long C3 > struct vector_c< T, C0, C1, C2, C3, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector4_c< T, T(C0), T(C1), T(C2), T(C3) > { typedef typename vector4_c< T, T(C0), T(C1), T(C2), T(C3) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4 > struct vector_c< T, C0, C1, C2, C3, C4, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector5_c< T, T(C0), T(C1), T(C2), T(C3), T(C4) > { typedef typename vector5_c< T, T(C0), T(C1), T(C2), T(C3), T(C4) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 > struct vector_c< T, C0, C1, C2, C3, C4, C5, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX > : vector6_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5) > { typedef typename vector6_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX > : vector7_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6) > { typedef typename vector7_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, C7, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX > : vector8_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7) > { typedef typename vector8_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX > : vector9_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8) > { typedef typename vector9_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX > : vector10_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9) > { typedef typename vector10_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector11_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10) > { typedef typename vector11_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector12_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11) > { typedef typename vector12_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector13_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12) > { typedef typename vector13_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector14_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13) > { typedef typename vector14_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector15_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14) > { typedef typename vector15_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector16_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15) > { typedef typename vector16_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, LONG_MAX, LONG_MAX, LONG_MAX > : vector17_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16) > { typedef typename vector17_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, C17, LONG_MAX, LONG_MAX > : vector18_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17) > { typedef typename vector18_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, C17, C18, LONG_MAX > : vector19_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17), T(C18) > { typedef typename vector19_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17), T(C18) >::type type; }; /// primary template (not a specialization!) template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct vector_c : vector20_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17), T(C18), T(C19) > { typedef typename vector20_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17), T(C18), T(C19) >::type type; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/plain/advance_backward.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/aux_/advance_backward.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< long N > struct advance_backward; template<> struct advance_backward<0> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef iter0 type; }; }; template<> struct advance_backward<1> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef typename prior::type iter1; typedef iter1 type; }; }; template<> struct advance_backward<2> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef typename prior::type iter1; typedef typename prior::type iter2; typedef iter2 type; }; }; template<> struct advance_backward<3> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef typename prior::type iter1; typedef typename prior::type iter2; typedef typename prior::type iter3; typedef iter3 type; }; }; template<> struct advance_backward<4> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef typename prior::type iter1; typedef typename prior::type iter2; typedef typename prior::type iter3; typedef typename prior::type iter4; typedef iter4 type; }; }; template< long N > struct advance_backward { template< typename Iterator > struct apply { typedef typename apply_wrap1< advance_backward<4> , Iterator >::type chunk_result_; typedef typename apply_wrap1< advance_backward<( (N - 4) < 0 ? 0 : N - 4 )> , chunk_result_ >::type type; }; }; }}} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/plain/advance_forward.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/aux_/advance_forward.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< long N > struct advance_forward; template<> struct advance_forward<0> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef iter0 type; }; }; template<> struct advance_forward<1> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef typename next::type iter1; typedef iter1 type; }; }; template<> struct advance_forward<2> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef typename next::type iter1; typedef typename next::type iter2; typedef iter2 type; }; }; template<> struct advance_forward<3> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef typename next::type iter1; typedef typename next::type iter2; typedef typename next::type iter3; typedef iter3 type; }; }; template<> struct advance_forward<4> { template< typename Iterator > struct apply { typedef Iterator iter0; typedef typename next::type iter1; typedef typename next::type iter2; typedef typename next::type iter3; typedef typename next::type iter4; typedef iter4 type; }; }; template< long N > struct advance_forward { template< typename Iterator > struct apply { typedef typename apply_wrap1< advance_forward<4> , Iterator >::type chunk_result_; typedef typename apply_wrap1< advance_forward<( (N - 4) < 0 ? 0 : N - 4 )> , chunk_result_ >::type type; }; }; }}} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/plain/and.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/and.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< bool C_, typename T1, typename T2, typename T3, typename T4 > struct and_impl : false_ { }; template< typename T1, typename T2, typename T3, typename T4 > struct and_impl< true,T1,T2,T3,T4 > : and_impl< BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value , T2, T3, T4 , true_ > { }; template<> struct and_impl< true , true_, true_, true_, true_ > : true_ { }; } // namespace aux template< typename BOOST_MPL_AUX_NA_PARAM(T1) , typename BOOST_MPL_AUX_NA_PARAM(T2) , typename T3 = true_, typename T4 = true_, typename T5 = true_ > struct and_ : aux::and_impl< BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value , T2, T3, T4, T5 > { }; BOOST_MPL_AUX_NA_SPEC2( 2 , 5 , and_ ) }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/plain/apply.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/apply.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename F > struct apply0 : apply_wrap0< typename lambda::type > { }; template< typename F > struct apply< F,na,na,na,na,na > : apply0 { }; template< typename F, typename T1 > struct apply1 : apply_wrap1< typename lambda::type , T1 > { }; template< typename F, typename T1 > struct apply< F,T1,na,na,na,na > : apply1< F,T1 > { }; template< typename F, typename T1, typename T2 > struct apply2 : apply_wrap2< typename lambda::type , T1, T2 > { }; template< typename F, typename T1, typename T2 > struct apply< F,T1,T2,na,na,na > : apply2< F,T1,T2 > { }; template< typename F, typename T1, typename T2, typename T3 > struct apply3 : apply_wrap3< typename lambda::type , T1, T2, T3 > { }; template< typename F, typename T1, typename T2, typename T3 > struct apply< F,T1,T2,T3,na,na > : apply3< F,T1,T2,T3 > { }; template< typename F, typename T1, typename T2, typename T3, typename T4 > struct apply4 : apply_wrap4< typename lambda::type , T1, T2, T3, T4 > { }; template< typename F, typename T1, typename T2, typename T3, typename T4 > struct apply< F,T1,T2,T3,T4,na > : apply4< F,T1,T2,T3,T4 > { }; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct apply5 : apply_wrap5< typename lambda::type , T1, T2, T3, T4, T5 > { }; /// primary template (not a specialization!) template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct apply : apply5< F,T1,T2,T3,T4,T5 > { }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/plain/apply_fwd.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/apply_fwd.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename F, typename T1 = na, typename T2 = na, typename T3 = na , typename T4 = na, typename T5 = na > struct apply; template< typename F > struct apply0; template< typename F, typename T1 > struct apply1; template< typename F, typename T1, typename T2 > struct apply2; template< typename F, typename T1, typename T2, typename T3 > struct apply3; template< typename F, typename T1, typename T2, typename T3, typename T4 > struct apply4; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct apply5; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/plain/apply_wrap.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/apply_wrap.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename F , typename has_apply_ = typename aux::has_apply::type > struct apply_wrap0 : F::template apply< > { }; template< typename F > struct apply_wrap0< F,true_ > : F::apply { }; template< typename F, typename T1 > struct apply_wrap1 : F::template apply { }; template< typename F, typename T1, typename T2 > struct apply_wrap2 : F::template apply< T1,T2 > { }; template< typename F, typename T1, typename T2, typename T3 > struct apply_wrap3 : F::template apply< T1,T2,T3 > { }; template< typename F, typename T1, typename T2, typename T3, typename T4 > struct apply_wrap4 : F::template apply< T1,T2,T3,T4 > { }; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct apply_wrap5 : F::template apply< T1,T2,T3,T4,T5 > { }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/plain/arg.hpp ================================================ // Copyright Peter Dimov 2001-2002 // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/arg.hpp" header // -- DO NOT modify by hand! BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN template<> struct arg< -1 > { BOOST_STATIC_CONSTANT(int, value = -1); BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) BOOST_MPL_AUX_ARG_TYPEDEF(na, type) template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { typedef U1 type; BOOST_MPL_AUX_ASSERT_NOT_NA(type); }; }; template<> struct arg<1> { BOOST_STATIC_CONSTANT(int, value = 1); typedef arg<2> next; BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) BOOST_MPL_AUX_ARG_TYPEDEF(na, type) template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { typedef U1 type; BOOST_MPL_AUX_ASSERT_NOT_NA(type); }; }; template<> struct arg<2> { BOOST_STATIC_CONSTANT(int, value = 2); typedef arg<3> next; BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) BOOST_MPL_AUX_ARG_TYPEDEF(na, type) template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { typedef U2 type; BOOST_MPL_AUX_ASSERT_NOT_NA(type); }; }; template<> struct arg<3> { BOOST_STATIC_CONSTANT(int, value = 3); typedef arg<4> next; BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) BOOST_MPL_AUX_ARG_TYPEDEF(na, type) template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { typedef U3 type; BOOST_MPL_AUX_ASSERT_NOT_NA(type); }; }; template<> struct arg<4> { BOOST_STATIC_CONSTANT(int, value = 4); typedef arg<5> next; BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) BOOST_MPL_AUX_ARG_TYPEDEF(na, type) template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { typedef U4 type; BOOST_MPL_AUX_ASSERT_NOT_NA(type); }; }; template<> struct arg<5> { BOOST_STATIC_CONSTANT(int, value = 5); typedef arg<6> next; BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) BOOST_MPL_AUX_ARG_TYPEDEF(na, type) template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { typedef U5 type; BOOST_MPL_AUX_ASSERT_NOT_NA(type); }; }; BOOST_MPL_AUX_NONTYPE_ARITY_SPEC(1,int, arg) BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/plain/basic_bind.hpp ================================================ // Copyright Peter Dimov 2001 // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/aux_/basic_bind.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< typename T, typename U1, typename U2, typename U3, typename U4 , typename U5 > struct resolve_bind_arg { typedef T type; }; template< int N, typename U1, typename U2, typename U3, typename U4, typename U5 > struct resolve_bind_arg< arg, U1, U2, U3, U4, U5 > { typedef typename apply_wrap5, U1, U2, U3, U4, U5>::type type; }; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5, typename U1, typename U2, typename U3, typename U4 , typename U5 > struct resolve_bind_arg< bind< F,T1,T2,T3,T4,T5 >, U1, U2, U3, U4, U5 > { typedef bind< F,T1,T2,T3,T4,T5 > f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux template< typename F > struct bind0 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; public: typedef typename apply_wrap0< f_ >::type type; }; }; namespace aux { template< typename F, typename U1, typename U2, typename U3, typename U4 , typename U5 > struct resolve_bind_arg< bind0, U1, U2, U3, U4, U5 > { typedef bind0 f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(1, bind0) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(1, bind0) template< typename F > struct bind< F,na,na,na,na,na > : bind0 { }; template< typename F, typename T1 > struct bind1 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; public: typedef typename apply_wrap1< f_ , typename t1::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename U1, typename U2, typename U3 , typename U4, typename U5 > struct resolve_bind_arg< bind1< F,T1 >, U1, U2, U3, U4, U5 > { typedef bind1< F,T1 > f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(2, bind1) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(2, bind1) template< typename F, typename T1 > struct bind< F,T1,na,na,na,na > : bind1< F,T1 > { }; template< typename F, typename T1, typename T2 > struct bind2 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; public: typedef typename apply_wrap2< f_ , typename t1::type, typename t2::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename T2, typename U1, typename U2 , typename U3, typename U4, typename U5 > struct resolve_bind_arg< bind2< F,T1,T2 >, U1, U2, U3, U4, U5 > { typedef bind2< F,T1,T2 > f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(3, bind2) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(3, bind2) template< typename F, typename T1, typename T2 > struct bind< F,T1,T2,na,na,na > : bind2< F,T1,T2 > { }; template< typename F, typename T1, typename T2, typename T3 > struct bind3 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3; public: typedef typename apply_wrap3< f_ , typename t1::type, typename t2::type, typename t3::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename T2, typename T3, typename U1 , typename U2, typename U3, typename U4, typename U5 > struct resolve_bind_arg< bind3< F,T1,T2,T3 >, U1, U2, U3, U4, U5 > { typedef bind3< F,T1,T2,T3 > f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(4, bind3) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(4, bind3) template< typename F, typename T1, typename T2, typename T3 > struct bind< F,T1,T2,T3,na,na > : bind3< F,T1,T2,T3 > { }; template< typename F, typename T1, typename T2, typename T3, typename T4 > struct bind4 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3; typedef aux::resolve_bind_arg< T4,U1,U2,U3,U4,U5 > t4; public: typedef typename apply_wrap4< f_ , typename t1::type, typename t2::type, typename t3::type , typename t4::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename T2, typename T3, typename T4 , typename U1, typename U2, typename U3, typename U4, typename U5 > struct resolve_bind_arg< bind4< F,T1,T2,T3,T4 >, U1, U2, U3, U4, U5 > { typedef bind4< F,T1,T2,T3,T4 > f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(5, bind4) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(5, bind4) template< typename F, typename T1, typename T2, typename T3, typename T4 > struct bind< F,T1,T2,T3,T4,na > : bind4< F,T1,T2,T3,T4 > { }; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct bind5 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef typename aux::resolve_bind_arg< F,U1,U2,U3,U4,U5 >::type f_; typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3; typedef aux::resolve_bind_arg< T4,U1,U2,U3,U4,U5 > t4; typedef aux::resolve_bind_arg< T5,U1,U2,U3,U4,U5 > t5; public: typedef typename apply_wrap5< f_ , typename t1::type, typename t2::type, typename t3::type , typename t4::type, typename t5::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5, typename U1, typename U2, typename U3, typename U4 , typename U5 > struct resolve_bind_arg< bind5< F,T1,T2,T3,T4,T5 >, U1, U2, U3, U4, U5 > { typedef bind5< F,T1,T2,T3,T4,T5 > f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(6, bind5) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(6, bind5) /// primary template (not a specialization!) template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct bind : bind5< F,T1,T2,T3,T4,T5 > { }; /// if_/eval_if specializations template< template< typename T1, typename T2, typename T3 > class F, typename Tag > struct quote3; template< typename T1, typename T2, typename T3 > struct if_; template< typename Tag, typename T1, typename T2, typename T3 > struct bind3< quote3< if_,Tag > , T1, T2, T3 > { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef mpl::arg<1> n1; typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3; typedef typename if_< typename t1::type , t2, t3 >::type f_; public: typedef typename f_::type type; }; }; template< template< typename T1, typename T2, typename T3 > class F, typename Tag > struct quote3; template< typename T1, typename T2, typename T3 > struct eval_if; template< typename Tag, typename T1, typename T2, typename T3 > struct bind3< quote3< eval_if,Tag > , T1, T2, T3 > { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef mpl::arg<1> n1; typedef aux::resolve_bind_arg< T1,U1,U2,U3,U4,U5 > t1; typedef aux::resolve_bind_arg< T2,U1,U2,U3,U4,U5 > t2; typedef aux::resolve_bind_arg< T3,U1,U2,U3,U4,U5 > t3; typedef typename eval_if< typename t1::type , t2, t3 >::type f_; public: typedef typename f_::type type; }; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/plain/bind.hpp ================================================ // Copyright Peter Dimov 2001 // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/bind.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< typename T, typename U1, typename U2, typename U3, typename U4 , typename U5 > struct resolve_bind_arg { typedef T type; }; template< typename T , typename Arg > struct replace_unnamed_arg { typedef Arg next; typedef T type; }; template< typename Arg > struct replace_unnamed_arg< arg< -1 >, Arg > { typedef typename Arg::next next; typedef Arg type; }; template< int N, typename U1, typename U2, typename U3, typename U4, typename U5 > struct resolve_bind_arg< arg, U1, U2, U3, U4, U5 > { typedef typename apply_wrap5, U1, U2, U3, U4, U5>::type type; }; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5, typename U1, typename U2, typename U3, typename U4 , typename U5 > struct resolve_bind_arg< bind< F,T1,T2,T3,T4,T5 >, U1, U2, U3, U4, U5 > { typedef bind< F,T1,T2,T3,T4,T5 > f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux template< typename F > struct bind0 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; typedef typename r0::type a0; typedef typename r0::next n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; /// public: typedef typename apply_wrap0< f_ >::type type; }; }; namespace aux { template< typename F, typename U1, typename U2, typename U3, typename U4 , typename U5 > struct resolve_bind_arg< bind0, U1, U2, U3, U4, U5 > { typedef bind0 f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(1, bind0) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(1, bind0) template< typename F > struct bind< F,na,na,na,na,na > : bind0 { }; template< typename F, typename T1 > struct bind1 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; typedef typename r0::type a0; typedef typename r0::next n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; /// typedef aux::replace_unnamed_arg< T1,n1 > r1; typedef typename r1::type a1; typedef typename r1::next n2; typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; /// public: typedef typename apply_wrap1< f_ , typename t1::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename U1, typename U2, typename U3 , typename U4, typename U5 > struct resolve_bind_arg< bind1< F,T1 >, U1, U2, U3, U4, U5 > { typedef bind1< F,T1 > f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(2, bind1) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(2, bind1) template< typename F, typename T1 > struct bind< F,T1,na,na,na,na > : bind1< F,T1 > { }; template< typename F, typename T1, typename T2 > struct bind2 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; typedef typename r0::type a0; typedef typename r0::next n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; /// typedef aux::replace_unnamed_arg< T1,n1 > r1; typedef typename r1::type a1; typedef typename r1::next n2; typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; /// typedef aux::replace_unnamed_arg< T2,n2 > r2; typedef typename r2::type a2; typedef typename r2::next n3; typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; /// public: typedef typename apply_wrap2< f_ , typename t1::type, typename t2::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename T2, typename U1, typename U2 , typename U3, typename U4, typename U5 > struct resolve_bind_arg< bind2< F,T1,T2 >, U1, U2, U3, U4, U5 > { typedef bind2< F,T1,T2 > f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(3, bind2) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(3, bind2) template< typename F, typename T1, typename T2 > struct bind< F,T1,T2,na,na,na > : bind2< F,T1,T2 > { }; template< typename F, typename T1, typename T2, typename T3 > struct bind3 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; typedef typename r0::type a0; typedef typename r0::next n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; /// typedef aux::replace_unnamed_arg< T1,n1 > r1; typedef typename r1::type a1; typedef typename r1::next n2; typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; /// typedef aux::replace_unnamed_arg< T2,n2 > r2; typedef typename r2::type a2; typedef typename r2::next n3; typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; /// typedef aux::replace_unnamed_arg< T3,n3 > r3; typedef typename r3::type a3; typedef typename r3::next n4; typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; /// public: typedef typename apply_wrap3< f_ , typename t1::type, typename t2::type, typename t3::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename T2, typename T3, typename U1 , typename U2, typename U3, typename U4, typename U5 > struct resolve_bind_arg< bind3< F,T1,T2,T3 >, U1, U2, U3, U4, U5 > { typedef bind3< F,T1,T2,T3 > f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(4, bind3) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(4, bind3) template< typename F, typename T1, typename T2, typename T3 > struct bind< F,T1,T2,T3,na,na > : bind3< F,T1,T2,T3 > { }; template< typename F, typename T1, typename T2, typename T3, typename T4 > struct bind4 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; typedef typename r0::type a0; typedef typename r0::next n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; /// typedef aux::replace_unnamed_arg< T1,n1 > r1; typedef typename r1::type a1; typedef typename r1::next n2; typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; /// typedef aux::replace_unnamed_arg< T2,n2 > r2; typedef typename r2::type a2; typedef typename r2::next n3; typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; /// typedef aux::replace_unnamed_arg< T3,n3 > r3; typedef typename r3::type a3; typedef typename r3::next n4; typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; /// typedef aux::replace_unnamed_arg< T4,n4 > r4; typedef typename r4::type a4; typedef typename r4::next n5; typedef aux::resolve_bind_arg< a4,U1,U2,U3,U4,U5 > t4; /// public: typedef typename apply_wrap4< f_ , typename t1::type, typename t2::type, typename t3::type , typename t4::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename T2, typename T3, typename T4 , typename U1, typename U2, typename U3, typename U4, typename U5 > struct resolve_bind_arg< bind4< F,T1,T2,T3,T4 >, U1, U2, U3, U4, U5 > { typedef bind4< F,T1,T2,T3,T4 > f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(5, bind4) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(5, bind4) template< typename F, typename T1, typename T2, typename T3, typename T4 > struct bind< F,T1,T2,T3,T4,na > : bind4< F,T1,T2,T3,T4 > { }; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct bind5 { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef aux::replace_unnamed_arg< F, mpl::arg<1> > r0; typedef typename r0::type a0; typedef typename r0::next n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; /// typedef aux::replace_unnamed_arg< T1,n1 > r1; typedef typename r1::type a1; typedef typename r1::next n2; typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; /// typedef aux::replace_unnamed_arg< T2,n2 > r2; typedef typename r2::type a2; typedef typename r2::next n3; typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; /// typedef aux::replace_unnamed_arg< T3,n3 > r3; typedef typename r3::type a3; typedef typename r3::next n4; typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; /// typedef aux::replace_unnamed_arg< T4,n4 > r4; typedef typename r4::type a4; typedef typename r4::next n5; typedef aux::resolve_bind_arg< a4,U1,U2,U3,U4,U5 > t4; /// typedef aux::replace_unnamed_arg< T5,n5 > r5; typedef typename r5::type a5; typedef typename r5::next n6; typedef aux::resolve_bind_arg< a5,U1,U2,U3,U4,U5 > t5; /// public: typedef typename apply_wrap5< f_ , typename t1::type, typename t2::type, typename t3::type , typename t4::type, typename t5::type >::type type; }; }; namespace aux { template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5, typename U1, typename U2, typename U3, typename U4 , typename U5 > struct resolve_bind_arg< bind5< F,T1,T2,T3,T4,T5 >, U1, U2, U3, U4, U5 > { typedef bind5< F,T1,T2,T3,T4,T5 > f_; typedef typename apply_wrap5< f_,U1,U2,U3,U4,U5 >::type type; }; } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(6, bind5) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(6, bind5) /// primary template (not a specialization!) template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct bind : bind5< F,T1,T2,T3,T4,T5 > { }; /// if_/eval_if specializations template< template< typename T1, typename T2, typename T3 > class F, typename Tag > struct quote3; template< typename T1, typename T2, typename T3 > struct if_; template< typename Tag, typename T1, typename T2, typename T3 > struct bind3< quote3< if_,Tag > , T1, T2, T3 > { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef mpl::arg<1> n1; typedef aux::replace_unnamed_arg< T1,n1 > r1; typedef typename r1::type a1; typedef typename r1::next n2; typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; /// typedef aux::replace_unnamed_arg< T2,n2 > r2; typedef typename r2::type a2; typedef typename r2::next n3; typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; /// typedef aux::replace_unnamed_arg< T3,n3 > r3; typedef typename r3::type a3; typedef typename r3::next n4; typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; /// typedef typename if_< typename t1::type , t2, t3 >::type f_; public: typedef typename f_::type type; }; }; template< template< typename T1, typename T2, typename T3 > class F, typename Tag > struct quote3; template< typename T1, typename T2, typename T3 > struct eval_if; template< typename Tag, typename T1, typename T2, typename T3 > struct bind3< quote3< eval_if,Tag > , T1, T2, T3 > { template< typename U1 = na, typename U2 = na, typename U3 = na , typename U4 = na, typename U5 = na > struct apply { private: typedef mpl::arg<1> n1; typedef aux::replace_unnamed_arg< T1,n1 > r1; typedef typename r1::type a1; typedef typename r1::next n2; typedef aux::resolve_bind_arg< a1,U1,U2,U3,U4,U5 > t1; /// typedef aux::replace_unnamed_arg< T2,n2 > r2; typedef typename r2::type a2; typedef typename r2::next n3; typedef aux::resolve_bind_arg< a2,U1,U2,U3,U4,U5 > t2; /// typedef aux::replace_unnamed_arg< T3,n3 > r3; typedef typename r3::type a3; typedef typename r3::next n4; typedef aux::resolve_bind_arg< a3,U1,U2,U3,U4,U5 > t3; /// typedef typename eval_if< typename t1::type , t2, t3 >::type f_; public: typedef typename f_::type type; }; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/plain/bind_fwd.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/bind_fwd.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename F, typename T1 = na, typename T2 = na, typename T3 = na , typename T4 = na, typename T5 = na > struct bind; template< typename F > struct bind0; template< typename F, typename T1 > struct bind1; template< typename F, typename T1, typename T2 > struct bind2; template< typename F, typename T1, typename T2, typename T3 > struct bind3; template< typename F, typename T1, typename T2, typename T3, typename T4 > struct bind4; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct bind5; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/plain/bitand.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // Copyright Jaap Suter 2003 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/bitand.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct bitand_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< bitand_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< bitand_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct bitand_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct bitand_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct bitand_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct bitand_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) , typename N3 = na, typename N4 = na, typename N5 = na > struct bitand_ : bitand_< bitand_< bitand_< bitand_< N1,N2 >, N3>, N4>, N5> { }; template< typename N1, typename N2, typename N3, typename N4 > struct bitand_< N1,N2,N3,N4,na > : bitand_< bitand_< bitand_< N1,N2 >, N3>, N4> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , bitand_ , ( N1, N2, N3, N4, na ) ) }; template< typename N1, typename N2, typename N3 > struct bitand_< N1,N2,N3,na,na > : bitand_< bitand_< N1,N2 >, N3> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , bitand_ , ( N1, N2, N3, na, na ) ) }; template< typename N1, typename N2 > struct bitand_< N1,N2,na,na,na > : bitand_impl< typename bitand_tag::type , typename bitand_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , bitand_ , ( N1, N2, na, na, na ) ) }; BOOST_MPL_AUX_NA_SPEC2(2, 5, bitand_) }} namespace boost { namespace mpl { template<> struct bitand_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : integral_c< typename aux::largest_int< typename N1::value_type , typename N2::value_type >::type , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value & BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/plain/bitor.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // Copyright Jaap Suter 2003 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/bitor.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct bitor_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< bitor_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< bitor_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct bitor_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct bitor_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct bitor_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct bitor_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) , typename N3 = na, typename N4 = na, typename N5 = na > struct bitor_ : bitor_< bitor_< bitor_< bitor_< N1,N2 >, N3>, N4>, N5> { }; template< typename N1, typename N2, typename N3, typename N4 > struct bitor_< N1,N2,N3,N4,na > : bitor_< bitor_< bitor_< N1,N2 >, N3>, N4> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , bitor_ , ( N1, N2, N3, N4, na ) ) }; template< typename N1, typename N2, typename N3 > struct bitor_< N1,N2,N3,na,na > : bitor_< bitor_< N1,N2 >, N3> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , bitor_ , ( N1, N2, N3, na, na ) ) }; template< typename N1, typename N2 > struct bitor_< N1,N2,na,na,na > : bitor_impl< typename bitor_tag::type , typename bitor_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , bitor_ , ( N1, N2, na, na, na ) ) }; BOOST_MPL_AUX_NA_SPEC2(2, 5, bitor_) }} namespace boost { namespace mpl { template<> struct bitor_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : integral_c< typename aux::largest_int< typename N1::value_type , typename N2::value_type >::type , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value | BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/plain/bitxor.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // Copyright Jaap Suter 2003 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/bitxor.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct bitxor_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< bitxor_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< bitxor_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct bitxor_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct bitxor_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct bitxor_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct bitxor_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) , typename N3 = na, typename N4 = na, typename N5 = na > struct bitxor_ : bitxor_< bitxor_< bitxor_< bitxor_< N1,N2 >, N3>, N4>, N5> { }; template< typename N1, typename N2, typename N3, typename N4 > struct bitxor_< N1,N2,N3,N4,na > : bitxor_< bitxor_< bitxor_< N1,N2 >, N3>, N4> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , bitxor_ , ( N1, N2, N3, N4, na ) ) }; template< typename N1, typename N2, typename N3 > struct bitxor_< N1,N2,N3,na,na > : bitxor_< bitxor_< N1,N2 >, N3> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , bitxor_ , ( N1, N2, N3, na, na ) ) }; template< typename N1, typename N2 > struct bitxor_< N1,N2,na,na,na > : bitxor_impl< typename bitxor_tag::type , typename bitxor_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , bitxor_ , ( N1, N2, na, na, na ) ) }; BOOST_MPL_AUX_NA_SPEC2(2, 5, bitxor_) }} namespace boost { namespace mpl { template<> struct bitxor_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : integral_c< typename aux::largest_int< typename N1::value_type , typename N2::value_type >::type , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value ^ BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/plain/deque.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/deque.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na , typename T12 = na, typename T13 = na, typename T14 = na , typename T15 = na, typename T16 = na, typename T17 = na , typename T18 = na, typename T19 = na > struct deque; template< > struct deque< na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector0< > { typedef vector0< >::type type; }; template< typename T0 > struct deque< T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector1 { typedef typename vector1::type type; }; template< typename T0, typename T1 > struct deque< T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector2< T0,T1 > { typedef typename vector2< T0,T1 >::type type; }; template< typename T0, typename T1, typename T2 > struct deque< T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector3< T0,T1,T2 > { typedef typename vector3< T0,T1,T2 >::type type; }; template< typename T0, typename T1, typename T2, typename T3 > struct deque< T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector4< T0,T1,T2,T3 > { typedef typename vector4< T0,T1,T2,T3 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 > struct deque< T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector5< T0,T1,T2,T3,T4 > { typedef typename vector5< T0,T1,T2,T3,T4 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct deque< T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector6< T0,T1,T2,T3,T4,T5 > { typedef typename vector6< T0,T1,T2,T3,T4,T5 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6 > struct deque< T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector7< T0,T1,T2,T3,T4,T5,T6 > { typedef typename vector7< T0,T1,T2,T3,T4,T5,T6 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7 > struct deque< T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na , na, na, na > : vector8< T0,T1,T2,T3,T4,T5,T6,T7 > { typedef typename vector8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8 > struct deque< T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na , na, na, na > : vector9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > { typedef typename vector9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 > struct deque< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na , na, na, na > : vector10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > { typedef typename vector10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10 > struct deque< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na , na, na, na > : vector11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > { typedef typename vector11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11 > struct deque< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na , na, na, na, na > : vector12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > { typedef typename vector12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12 > struct deque< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na , na, na, na, na > : vector13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > { typedef typename vector13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13 > struct deque< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na , na, na, na, na > : vector14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > { typedef typename vector14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 > struct deque< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na , na, na, na, na > : vector15< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 > { typedef typename vector15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15 > struct deque< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, na, na, na, na > : vector16< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15 > { typedef typename vector16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16 > struct deque< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, na, na, na > : vector17< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16 > { typedef typename vector17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17 > struct deque< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, na, na > : vector18< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17 > { typedef typename vector18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18 > struct deque< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18, na > : vector19< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18 > { typedef typename vector19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type; }; /// primary template (not a specialization!) template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct deque : vector20< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18, T19 > { typedef typename vector20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/plain/divides.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/divides.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct divides_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< divides_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< divides_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct divides_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct divides_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct divides_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct divides_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) , typename N3 = na, typename N4 = na, typename N5 = na > struct divides : divides< divides< divides< divides< N1,N2 >, N3>, N4>, N5> { }; template< typename N1, typename N2, typename N3, typename N4 > struct divides< N1,N2,N3,N4,na > : divides< divides< divides< N1,N2 >, N3>, N4> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , divides , ( N1, N2, N3, N4, na ) ) }; template< typename N1, typename N2, typename N3 > struct divides< N1,N2,N3,na,na > : divides< divides< N1,N2 >, N3> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , divides , ( N1, N2, N3, na, na ) ) }; template< typename N1, typename N2 > struct divides< N1,N2,na,na,na > : divides_impl< typename divides_tag::type , typename divides_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , divides , ( N1, N2, na, na, na ) ) }; BOOST_MPL_AUX_NA_SPEC2(2, 5, divides) }} namespace boost { namespace mpl { template<> struct divides_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : integral_c< typename aux::largest_int< typename N1::value_type , typename N2::value_type >::type , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value / BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/plain/equal_to.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/equal_to.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct equal_to_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< equal_to_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< equal_to_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct equal_to_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct equal_to_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct equal_to_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct equal_to_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct equal_to : equal_to_impl< typename equal_to_tag::type , typename equal_to_tag::type >::template apply< N1,N2 >::type { }; BOOST_MPL_AUX_NA_SPEC2(2, 2, equal_to) }} namespace boost { namespace mpl { template<> struct equal_to_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value == BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/plain/fold_impl.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/aux_/fold_impl.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { /// forward declaration template< int N , typename First , typename Last , typename State , typename ForwardOp > struct fold_impl; template< typename First , typename Last , typename State , typename ForwardOp > struct fold_impl< 0,First,Last,State,ForwardOp > { typedef First iter0; typedef State state0; typedef state0 state; typedef iter0 iterator; }; template< typename First , typename Last , typename State , typename ForwardOp > struct fold_impl< 1,First,Last,State,ForwardOp > { typedef First iter0; typedef State state0; typedef typename apply2< ForwardOp, state0, typename deref::type >::type state1; typedef typename mpl::next::type iter1; typedef state1 state; typedef iter1 iterator; }; template< typename First , typename Last , typename State , typename ForwardOp > struct fold_impl< 2,First,Last,State,ForwardOp > { typedef First iter0; typedef State state0; typedef typename apply2< ForwardOp, state0, typename deref::type >::type state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp, state1, typename deref::type >::type state2; typedef typename mpl::next::type iter2; typedef state2 state; typedef iter2 iterator; }; template< typename First , typename Last , typename State , typename ForwardOp > struct fold_impl< 3,First,Last,State,ForwardOp > { typedef First iter0; typedef State state0; typedef typename apply2< ForwardOp, state0, typename deref::type >::type state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp, state1, typename deref::type >::type state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp, state2, typename deref::type >::type state3; typedef typename mpl::next::type iter3; typedef state3 state; typedef iter3 iterator; }; template< typename First , typename Last , typename State , typename ForwardOp > struct fold_impl< 4,First,Last,State,ForwardOp > { typedef First iter0; typedef State state0; typedef typename apply2< ForwardOp, state0, typename deref::type >::type state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp, state1, typename deref::type >::type state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp, state2, typename deref::type >::type state3; typedef typename mpl::next::type iter3; typedef typename apply2< ForwardOp, state3, typename deref::type >::type state4; typedef typename mpl::next::type iter4; typedef state4 state; typedef iter4 iterator; }; template< int N , typename First , typename Last , typename State , typename ForwardOp > struct fold_impl { typedef fold_impl< 4 , First , Last , State , ForwardOp > chunk_; typedef fold_impl< ( (N - 4) < 0 ? 0 : N - 4 ) , typename chunk_::iterator , Last , typename chunk_::state , ForwardOp > res_; typedef typename res_::state state; typedef typename res_::iterator iterator; }; template< typename First , typename Last , typename State , typename ForwardOp > struct fold_impl< -1,First,Last,State,ForwardOp > : fold_impl< -1 , typename mpl::next::type , Last , typename apply2::type>::type , ForwardOp > { }; template< typename Last , typename State , typename ForwardOp > struct fold_impl< -1,Last,Last,State,ForwardOp > { typedef State state; typedef Last iterator; }; }}} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/plain/full_lambda.hpp ================================================ // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/aux_/full_lambda.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< bool C1 = false, bool C2 = false, bool C3 = false, bool C4 = false , bool C5 = false > struct lambda_or : true_ { }; template<> struct lambda_or< false,false,false,false,false > : false_ { }; } // namespace aux template< typename T , typename Tag > struct lambda { typedef false_ is_le; typedef T result_; typedef T type; }; template< typename T > struct is_lambda_expression : lambda::is_le { }; template< int N, typename Tag > struct lambda< arg, Tag > { typedef true_ is_le; typedef mpl::arg result_; // qualified for the sake of MIPSpro 7.41 typedef mpl::protect type; }; template< typename F , typename Tag > struct lambda< bind0 , Tag > { typedef false_ is_le; typedef bind0< F > result_; typedef result_ type; }; namespace aux { template< typename IsLE, typename Tag , template< typename P1 > class F , typename L1 > struct le_result1 { typedef F< typename L1::type > result_; typedef result_ type; }; template< typename Tag , template< typename P1 > class F , typename L1 > struct le_result1< true_,Tag,F,L1 > { typedef bind1< quote1< F,Tag > , typename L1::result_ > result_; typedef mpl::protect type; }; } // namespace aux template< template< typename P1 > class F , typename T1 , typename Tag > struct lambda< F , Tag > { typedef lambda< T1,Tag > l1; typedef typename l1::is_le is_le1; typedef typename aux::lambda_or< is_le1::value >::type is_le; typedef aux::le_result1< is_le, Tag, F, l1 > le_result_; typedef typename le_result_::result_ result_; typedef typename le_result_::type type; }; template< typename F, typename T1 , typename Tag > struct lambda< bind1< F,T1 > , Tag > { typedef false_ is_le; typedef bind1< F , T1 > result_; typedef result_ type; }; namespace aux { template< typename IsLE, typename Tag , template< typename P1, typename P2 > class F , typename L1, typename L2 > struct le_result2 { typedef F< typename L1::type, typename L2::type > result_; typedef result_ type; }; template< typename Tag , template< typename P1, typename P2 > class F , typename L1, typename L2 > struct le_result2< true_,Tag,F,L1,L2 > { typedef bind2< quote2< F,Tag > , typename L1::result_, typename L2::result_ > result_; typedef mpl::protect type; }; } // namespace aux template< template< typename P1, typename P2 > class F , typename T1, typename T2 , typename Tag > struct lambda< F< T1,T2 > , Tag > { typedef lambda< T1,Tag > l1; typedef lambda< T2,Tag > l2; typedef typename l1::is_le is_le1; typedef typename l2::is_le is_le2; typedef typename aux::lambda_or< is_le1::value, is_le2::value >::type is_le; typedef aux::le_result2< is_le, Tag, F, l1, l2 > le_result_; typedef typename le_result_::result_ result_; typedef typename le_result_::type type; }; template< typename F, typename T1, typename T2 , typename Tag > struct lambda< bind2< F,T1,T2 > , Tag > { typedef false_ is_le; typedef bind2< F , T1, T2 > result_; typedef result_ type; }; namespace aux { template< typename IsLE, typename Tag , template< typename P1, typename P2, typename P3 > class F , typename L1, typename L2, typename L3 > struct le_result3 { typedef F< typename L1::type, typename L2::type, typename L3::type > result_; typedef result_ type; }; template< typename Tag , template< typename P1, typename P2, typename P3 > class F , typename L1, typename L2, typename L3 > struct le_result3< true_,Tag,F,L1,L2,L3 > { typedef bind3< quote3< F,Tag > , typename L1::result_, typename L2::result_, typename L3::result_ > result_; typedef mpl::protect type; }; } // namespace aux template< template< typename P1, typename P2, typename P3 > class F , typename T1, typename T2, typename T3 , typename Tag > struct lambda< F< T1,T2,T3 > , Tag > { typedef lambda< T1,Tag > l1; typedef lambda< T2,Tag > l2; typedef lambda< T3,Tag > l3; typedef typename l1::is_le is_le1; typedef typename l2::is_le is_le2; typedef typename l3::is_le is_le3; typedef typename aux::lambda_or< is_le1::value, is_le2::value, is_le3::value >::type is_le; typedef aux::le_result3< is_le, Tag, F, l1, l2, l3 > le_result_; typedef typename le_result_::result_ result_; typedef typename le_result_::type type; }; template< typename F, typename T1, typename T2, typename T3 , typename Tag > struct lambda< bind3< F,T1,T2,T3 > , Tag > { typedef false_ is_le; typedef bind3< F , T1, T2, T3 > result_; typedef result_ type; }; namespace aux { template< typename IsLE, typename Tag , template< typename P1, typename P2, typename P3, typename P4 > class F , typename L1, typename L2, typename L3, typename L4 > struct le_result4 { typedef F< typename L1::type, typename L2::type, typename L3::type , typename L4::type > result_; typedef result_ type; }; template< typename Tag , template< typename P1, typename P2, typename P3, typename P4 > class F , typename L1, typename L2, typename L3, typename L4 > struct le_result4< true_,Tag,F,L1,L2,L3,L4 > { typedef bind4< quote4< F,Tag > , typename L1::result_, typename L2::result_, typename L3::result_ , typename L4::result_ > result_; typedef mpl::protect type; }; } // namespace aux template< template< typename P1, typename P2, typename P3, typename P4 > class F , typename T1, typename T2, typename T3, typename T4 , typename Tag > struct lambda< F< T1,T2,T3,T4 > , Tag > { typedef lambda< T1,Tag > l1; typedef lambda< T2,Tag > l2; typedef lambda< T3,Tag > l3; typedef lambda< T4,Tag > l4; typedef typename l1::is_le is_le1; typedef typename l2::is_le is_le2; typedef typename l3::is_le is_le3; typedef typename l4::is_le is_le4; typedef typename aux::lambda_or< is_le1::value, is_le2::value, is_le3::value, is_le4::value >::type is_le; typedef aux::le_result4< is_le, Tag, F, l1, l2, l3, l4 > le_result_; typedef typename le_result_::result_ result_; typedef typename le_result_::type type; }; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename Tag > struct lambda< bind4< F,T1,T2,T3,T4 > , Tag > { typedef false_ is_le; typedef bind4< F , T1, T2, T3, T4 > result_; typedef result_ type; }; namespace aux { template< typename IsLE, typename Tag , template< typename P1, typename P2, typename P3, typename P4, typename P5 > class F , typename L1, typename L2, typename L3, typename L4, typename L5 > struct le_result5 { typedef F< typename L1::type, typename L2::type, typename L3::type , typename L4::type, typename L5::type > result_; typedef result_ type; }; template< typename Tag , template< typename P1, typename P2, typename P3, typename P4, typename P5 > class F , typename L1, typename L2, typename L3, typename L4, typename L5 > struct le_result5< true_,Tag,F,L1,L2,L3,L4,L5 > { typedef bind5< quote5< F,Tag > , typename L1::result_, typename L2::result_, typename L3::result_ , typename L4::result_, typename L5::result_ > result_; typedef mpl::protect type; }; } // namespace aux template< template< typename P1, typename P2, typename P3, typename P4 , typename P5 > class F , typename T1, typename T2, typename T3, typename T4, typename T5 , typename Tag > struct lambda< F< T1,T2,T3,T4,T5 > , Tag > { typedef lambda< T1,Tag > l1; typedef lambda< T2,Tag > l2; typedef lambda< T3,Tag > l3; typedef lambda< T4,Tag > l4; typedef lambda< T5,Tag > l5; typedef typename l1::is_le is_le1; typedef typename l2::is_le is_le2; typedef typename l3::is_le is_le3; typedef typename l4::is_le is_le4; typedef typename l5::is_le is_le5; typedef typename aux::lambda_or< is_le1::value, is_le2::value, is_le3::value, is_le4::value , is_le5::value >::type is_le; typedef aux::le_result5< is_le, Tag, F, l1, l2, l3, l4, l5 > le_result_; typedef typename le_result_::result_ result_; typedef typename le_result_::type type; }; template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 , typename Tag > struct lambda< bind5< F,T1,T2,T3,T4,T5 > , Tag > { typedef false_ is_le; typedef bind5< F , T1, T2, T3, T4, T5 > result_; typedef result_ type; }; /// special case for 'protect' template< typename T, typename Tag > struct lambda< mpl::protect, Tag > { typedef false_ is_le; typedef mpl::protect result_; typedef result_ type; }; /// specializations for the main 'bind' form template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 , typename Tag > struct lambda< bind< F,T1,T2,T3,T4,T5 > , Tag > { typedef false_ is_le; typedef bind< F,T1,T2,T3,T4,T5 > result_; typedef result_ type; }; /// workaround for MWCW 8.3+/EDG < 303, leads to ambiguity on Digital Mars template< typename F, typename Tag1, typename Tag2 > struct lambda< lambda< F,Tag1 > , Tag2 > { typedef lambda< F,Tag2 > l1; typedef lambda< Tag1,Tag2 > l2; typedef typename l1::is_le is_le; typedef aux::le_result2 le_result_; typedef typename le_result_::result_ result_; typedef typename le_result_::type type; }; BOOST_MPL_AUX_NA_SPEC(2, lambda) }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/plain/greater.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/greater.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct greater_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< greater_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< greater_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct greater_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct greater_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct greater_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct greater_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct greater : greater_impl< typename greater_tag::type , typename greater_tag::type >::template apply< N1,N2 >::type { }; BOOST_MPL_AUX_NA_SPEC2(2, 2, greater) }} namespace boost { namespace mpl { template<> struct greater_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value > BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/plain/greater_equal.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/greater_equal.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct greater_equal_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< greater_equal_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< greater_equal_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct greater_equal_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct greater_equal_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct greater_equal_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct greater_equal_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct greater_equal : greater_equal_impl< typename greater_equal_tag::type , typename greater_equal_tag::type >::template apply< N1,N2 >::type { }; BOOST_MPL_AUX_NA_SPEC2(2, 2, greater_equal) }} namespace boost { namespace mpl { template<> struct greater_equal_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value >= BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/plain/inherit.hpp ================================================ // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/inherit.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename BOOST_MPL_AUX_NA_PARAM(T1) , typename BOOST_MPL_AUX_NA_PARAM(T2) > struct inherit2 : T1, T2 { typedef inherit2 type; }; template< typename T1 > struct inherit2< T1,empty_base > { typedef T1 type; BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(2, inherit2, (T1, empty_base)) }; template< typename T2 > struct inherit2< empty_base,T2 > { typedef T2 type; BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(2, inherit2, (empty_base, T2)) }; template<> struct inherit2< empty_base,empty_base > { typedef empty_base type; BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(2, inherit2, (empty_base, empty_base)) }; BOOST_MPL_AUX_NA_SPEC(2, inherit2) template< typename T1 = na, typename T2 = na, typename T3 = na > struct inherit3 : inherit2< typename inherit2< T1, T2 >::type , T3 > { }; BOOST_MPL_AUX_NA_SPEC(3, inherit3) template< typename T1 = na, typename T2 = na, typename T3 = na, typename T4 = na > struct inherit4 : inherit2< typename inherit3< T1, T2, T3 >::type , T4 > { }; BOOST_MPL_AUX_NA_SPEC(4, inherit4) template< typename T1 = na, typename T2 = na, typename T3 = na, typename T4 = na , typename T5 = na > struct inherit5 : inherit2< typename inherit4< T1, T2, T3, T4 >::type , T5 > { }; BOOST_MPL_AUX_NA_SPEC(5, inherit5) /// primary template template< typename T1 = empty_base, typename T2 = empty_base , typename T3 = empty_base, typename T4 = empty_base , typename T5 = empty_base > struct inherit : inherit5< T1,T2,T3,T4,T5 > { }; template<> struct inherit< na,na,na,na,na > { template< typename T1 = empty_base, typename T2 = empty_base , typename T3 = empty_base, typename T4 = empty_base , typename T5 = empty_base > struct apply : inherit< T1,T2,T3,T4,T5 > { }; }; BOOST_MPL_AUX_NA_SPEC_LAMBDA(5, inherit) BOOST_MPL_AUX_NA_SPEC_ARITY(5, inherit) BOOST_MPL_AUX_NA_SPEC_TEMPLATE_ARITY(5, 5, inherit) }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/plain/iter_fold_if_impl.hpp ================================================ // Copyright Aleksey Gurtovoy 2001-2004 // Copyright David Abrahams 2001-2002 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/aux_/iter_fold_if_impl.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< typename Iterator, typename State > struct iter_fold_if_null_step { typedef State state; typedef Iterator iterator; }; template< bool > struct iter_fold_if_step_impl { template< typename Iterator , typename State , typename StateOp , typename IteratorOp > struct result_ { typedef typename apply2< StateOp,State,Iterator >::type state; typedef typename IteratorOp::type iterator; }; }; template<> struct iter_fold_if_step_impl { template< typename Iterator , typename State , typename StateOp , typename IteratorOp > struct result_ { typedef State state; typedef Iterator iterator; }; }; template< typename Iterator , typename State , typename ForwardOp , typename Predicate > struct iter_fold_if_forward_step { typedef typename apply2< Predicate,State,Iterator >::type not_last; typedef typename iter_fold_if_step_impl< BOOST_MPL_AUX_MSVC_VALUE_WKND(not_last)::value >::template result_< Iterator,State,ForwardOp, mpl::next > impl_; typedef typename impl_::state state; typedef typename impl_::iterator iterator; }; template< typename Iterator , typename State , typename BackwardOp , typename Predicate > struct iter_fold_if_backward_step { typedef typename apply2< Predicate,State,Iterator >::type not_last; typedef typename iter_fold_if_step_impl< BOOST_MPL_AUX_MSVC_VALUE_WKND(not_last)::value >::template result_< Iterator,State,BackwardOp, identity > impl_; typedef typename impl_::state state; typedef typename impl_::iterator iterator; }; template< typename Iterator , typename State , typename ForwardOp , typename ForwardPredicate , typename BackwardOp , typename BackwardPredicate > struct iter_fold_if_impl { private: typedef iter_fold_if_null_step< Iterator,State > forward_step0; typedef iter_fold_if_forward_step< typename forward_step0::iterator, typename forward_step0::state, ForwardOp, ForwardPredicate > forward_step1; typedef iter_fold_if_forward_step< typename forward_step1::iterator, typename forward_step1::state, ForwardOp, ForwardPredicate > forward_step2; typedef iter_fold_if_forward_step< typename forward_step2::iterator, typename forward_step2::state, ForwardOp, ForwardPredicate > forward_step3; typedef iter_fold_if_forward_step< typename forward_step3::iterator, typename forward_step3::state, ForwardOp, ForwardPredicate > forward_step4; typedef typename if_< typename forward_step4::not_last , iter_fold_if_impl< typename forward_step4::iterator , typename forward_step4::state , ForwardOp , ForwardPredicate , BackwardOp , BackwardPredicate > , iter_fold_if_null_step< typename forward_step4::iterator , typename forward_step4::state > >::type backward_step4; typedef iter_fold_if_backward_step< typename forward_step3::iterator, typename backward_step4::state, BackwardOp, BackwardPredicate > backward_step3; typedef iter_fold_if_backward_step< typename forward_step2::iterator, typename backward_step3::state, BackwardOp, BackwardPredicate > backward_step2; typedef iter_fold_if_backward_step< typename forward_step1::iterator, typename backward_step2::state, BackwardOp, BackwardPredicate > backward_step1; typedef iter_fold_if_backward_step< typename forward_step0::iterator, typename backward_step1::state, BackwardOp, BackwardPredicate > backward_step0; public: typedef typename backward_step0::state state; typedef typename backward_step4::iterator iterator; }; }}} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/plain/iter_fold_impl.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/aux_/iter_fold_impl.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { /// forward declaration template< int N , typename First , typename Last , typename State , typename ForwardOp > struct iter_fold_impl; template< typename First , typename Last , typename State , typename ForwardOp > struct iter_fold_impl< 0,First,Last,State,ForwardOp > { typedef First iter0; typedef State state0; typedef state0 state; typedef iter0 iterator; }; template< typename First , typename Last , typename State , typename ForwardOp > struct iter_fold_impl< 1,First,Last,State,ForwardOp > { typedef First iter0; typedef State state0; typedef typename apply2< ForwardOp,state0,iter0 >::type state1; typedef typename mpl::next::type iter1; typedef state1 state; typedef iter1 iterator; }; template< typename First , typename Last , typename State , typename ForwardOp > struct iter_fold_impl< 2,First,Last,State,ForwardOp > { typedef First iter0; typedef State state0; typedef typename apply2< ForwardOp,state0,iter0 >::type state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp,state1,iter1 >::type state2; typedef typename mpl::next::type iter2; typedef state2 state; typedef iter2 iterator; }; template< typename First , typename Last , typename State , typename ForwardOp > struct iter_fold_impl< 3,First,Last,State,ForwardOp > { typedef First iter0; typedef State state0; typedef typename apply2< ForwardOp,state0,iter0 >::type state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp,state1,iter1 >::type state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp,state2,iter2 >::type state3; typedef typename mpl::next::type iter3; typedef state3 state; typedef iter3 iterator; }; template< typename First , typename Last , typename State , typename ForwardOp > struct iter_fold_impl< 4,First,Last,State,ForwardOp > { typedef First iter0; typedef State state0; typedef typename apply2< ForwardOp,state0,iter0 >::type state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp,state1,iter1 >::type state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp,state2,iter2 >::type state3; typedef typename mpl::next::type iter3; typedef typename apply2< ForwardOp,state3,iter3 >::type state4; typedef typename mpl::next::type iter4; typedef state4 state; typedef iter4 iterator; }; template< int N , typename First , typename Last , typename State , typename ForwardOp > struct iter_fold_impl { typedef iter_fold_impl< 4 , First , Last , State , ForwardOp > chunk_; typedef iter_fold_impl< ( (N - 4) < 0 ? 0 : N - 4 ) , typename chunk_::iterator , Last , typename chunk_::state , ForwardOp > res_; typedef typename res_::state state; typedef typename res_::iterator iterator; }; template< typename First , typename Last , typename State , typename ForwardOp > struct iter_fold_impl< -1,First,Last,State,ForwardOp > : iter_fold_impl< -1 , typename mpl::next::type , Last , typename apply2< ForwardOp,State,First >::type , ForwardOp > { }; template< typename Last , typename State , typename ForwardOp > struct iter_fold_impl< -1,Last,Last,State,ForwardOp > { typedef State state; typedef Last iterator; }; }}} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/plain/lambda_no_ctps.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/aux_/lambda_no_ctps.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< bool C1 = false, bool C2 = false, bool C3 = false, bool C4 = false , bool C5 = false > struct lambda_or : true_ { }; template<> struct lambda_or< false,false,false,false,false > : false_ { }; template< typename Arity > struct lambda_impl { template< typename T, typename Tag, typename Protect > struct result_ { typedef T type; typedef is_placeholder is_le; }; }; template<> struct lambda_impl< int_<1> > { template< typename F, typename Tag, typename Protect > struct result_ { typedef lambda< typename F::arg1, Tag, false_ > l1; typedef typename l1::is_le is_le1; typedef aux::lambda_or< BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value > is_le; typedef bind1< typename F::rebind , typename l1::type > bind_; typedef typename if_< is_le , if_< Protect, mpl::protect, bind_ > , identity >::type type_; typedef typename type_::type type; }; }; template<> struct lambda_impl< int_<2> > { template< typename F, typename Tag, typename Protect > struct result_ { typedef lambda< typename F::arg1, Tag, false_ > l1; typedef lambda< typename F::arg2, Tag, false_ > l2; typedef typename l1::is_le is_le1; typedef typename l2::is_le is_le2; typedef aux::lambda_or< BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value > is_le; typedef bind2< typename F::rebind , typename l1::type, typename l2::type > bind_; typedef typename if_< is_le , if_< Protect, mpl::protect, bind_ > , identity >::type type_; typedef typename type_::type type; }; }; template<> struct lambda_impl< int_<3> > { template< typename F, typename Tag, typename Protect > struct result_ { typedef lambda< typename F::arg1, Tag, false_ > l1; typedef lambda< typename F::arg2, Tag, false_ > l2; typedef lambda< typename F::arg3, Tag, false_ > l3; typedef typename l1::is_le is_le1; typedef typename l2::is_le is_le2; typedef typename l3::is_le is_le3; typedef aux::lambda_or< BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le3)::value > is_le; typedef bind3< typename F::rebind , typename l1::type, typename l2::type, typename l3::type > bind_; typedef typename if_< is_le , if_< Protect, mpl::protect, bind_ > , identity >::type type_; typedef typename type_::type type; }; }; template<> struct lambda_impl< int_<4> > { template< typename F, typename Tag, typename Protect > struct result_ { typedef lambda< typename F::arg1, Tag, false_ > l1; typedef lambda< typename F::arg2, Tag, false_ > l2; typedef lambda< typename F::arg3, Tag, false_ > l3; typedef lambda< typename F::arg4, Tag, false_ > l4; typedef typename l1::is_le is_le1; typedef typename l2::is_le is_le2; typedef typename l3::is_le is_le3; typedef typename l4::is_le is_le4; typedef aux::lambda_or< BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le3)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le4)::value > is_le; typedef bind4< typename F::rebind , typename l1::type, typename l2::type, typename l3::type , typename l4::type > bind_; typedef typename if_< is_le , if_< Protect, mpl::protect, bind_ > , identity >::type type_; typedef typename type_::type type; }; }; template<> struct lambda_impl< int_<5> > { template< typename F, typename Tag, typename Protect > struct result_ { typedef lambda< typename F::arg1, Tag, false_ > l1; typedef lambda< typename F::arg2, Tag, false_ > l2; typedef lambda< typename F::arg3, Tag, false_ > l3; typedef lambda< typename F::arg4, Tag, false_ > l4; typedef lambda< typename F::arg5, Tag, false_ > l5; typedef typename l1::is_le is_le1; typedef typename l2::is_le is_le2; typedef typename l3::is_le is_le3; typedef typename l4::is_le is_le4; typedef typename l5::is_le is_le5; typedef aux::lambda_or< BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le1)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le2)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le3)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le4)::value, BOOST_MPL_AUX_MSVC_VALUE_WKND(is_le5)::value > is_le; typedef bind5< typename F::rebind , typename l1::type, typename l2::type, typename l3::type , typename l4::type, typename l5::type > bind_; typedef typename if_< is_le , if_< Protect, mpl::protect, bind_ > , identity >::type type_; typedef typename type_::type type; }; }; } // namespace aux template< typename T , typename Tag , typename Protect > struct lambda { /// Metafunction forwarding confuses MSVC 6.x typedef typename aux::template_arity::type arity_; typedef typename aux::lambda_impl ::template result_< T,Tag,Protect > l_; typedef typename l_::type type; typedef typename l_::is_le is_le; }; BOOST_MPL_AUX_NA_SPEC2(1, 3, lambda) template< typename T > struct is_lambda_expression : lambda::is_le { }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/plain/less.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/less.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct less_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< less_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< less_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct less_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct less_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct less_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct less_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct less : less_impl< typename less_tag::type , typename less_tag::type >::template apply< N1,N2 >::type { }; BOOST_MPL_AUX_NA_SPEC2(2, 2, less) }} namespace boost { namespace mpl { template<> struct less_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N2)::value > BOOST_MPL_AUX_VALUE_WKND(N1)::value ) > { }; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/plain/less_equal.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/less_equal.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct less_equal_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< less_equal_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< less_equal_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct less_equal_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct less_equal_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct less_equal_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct less_equal_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct less_equal : less_equal_impl< typename less_equal_tag::type , typename less_equal_tag::type >::template apply< N1,N2 >::type { }; BOOST_MPL_AUX_NA_SPEC2(2, 2, less_equal) }} namespace boost { namespace mpl { template<> struct less_equal_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value <= BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/plain/list.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/list.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na , typename T12 = na, typename T13 = na, typename T14 = na , typename T15 = na, typename T16 = na, typename T17 = na , typename T18 = na, typename T19 = na > struct list; template< > struct list< na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : list0< > { typedef list0< >::type type; }; template< typename T0 > struct list< T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : list1 { typedef typename list1::type type; }; template< typename T0, typename T1 > struct list< T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : list2< T0,T1 > { typedef typename list2< T0,T1 >::type type; }; template< typename T0, typename T1, typename T2 > struct list< T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : list3< T0,T1,T2 > { typedef typename list3< T0,T1,T2 >::type type; }; template< typename T0, typename T1, typename T2, typename T3 > struct list< T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : list4< T0,T1,T2,T3 > { typedef typename list4< T0,T1,T2,T3 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 > struct list< T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : list5< T0,T1,T2,T3,T4 > { typedef typename list5< T0,T1,T2,T3,T4 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct list< T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : list6< T0,T1,T2,T3,T4,T5 > { typedef typename list6< T0,T1,T2,T3,T4,T5 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6 > struct list< T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na , na, na, na > : list7< T0,T1,T2,T3,T4,T5,T6 > { typedef typename list7< T0,T1,T2,T3,T4,T5,T6 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7 > struct list< T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na , na, na, na > : list8< T0,T1,T2,T3,T4,T5,T6,T7 > { typedef typename list8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8 > struct list< T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na , na, na, na > : list9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > { typedef typename list9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 > struct list< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na , na, na, na > : list10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > { typedef typename list10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10 > struct list< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na , na, na, na > : list11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > { typedef typename list11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11 > struct list< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na , na, na, na, na > : list12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > { typedef typename list12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12 > struct list< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na , na, na, na, na > : list13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > { typedef typename list13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13 > struct list< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na , na, na, na, na > : list14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > { typedef typename list14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 > struct list< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na , na, na, na, na > : list15< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 > { typedef typename list15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15 > struct list< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, na, na, na, na > : list16< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15 > { typedef typename list16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16 > struct list< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, na, na, na > : list17< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16 > { typedef typename list17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17 > struct list< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, na, na > : list18< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17 > { typedef typename list18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18 > struct list< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18, na > : list19< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18 > { typedef typename list19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type; }; /// primary template (not a specialization!) template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct list : list20< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18, T19 > { typedef typename list20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/plain/list_c.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/list_c.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename T, long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX , long C3 = LONG_MAX, long C4 = LONG_MAX, long C5 = LONG_MAX , long C6 = LONG_MAX, long C7 = LONG_MAX, long C8 = LONG_MAX , long C9 = LONG_MAX, long C10 = LONG_MAX, long C11 = LONG_MAX , long C12 = LONG_MAX, long C13 = LONG_MAX, long C14 = LONG_MAX , long C15 = LONG_MAX, long C16 = LONG_MAX, long C17 = LONG_MAX , long C18 = LONG_MAX, long C19 = LONG_MAX > struct list_c; template< typename T > struct list_c< T, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list0_c { typedef typename list0_c::type type; }; template< typename T, long C0 > struct list_c< T, C0, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list1_c< T,C0 > { typedef typename list1_c< T,C0 >::type type; }; template< typename T, long C0, long C1 > struct list_c< T, C0, C1, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list2_c< T,C0,C1 > { typedef typename list2_c< T,C0,C1 >::type type; }; template< typename T, long C0, long C1, long C2 > struct list_c< T, C0, C1, C2, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list3_c< T,C0,C1,C2 > { typedef typename list3_c< T,C0,C1,C2 >::type type; }; template< typename T, long C0, long C1, long C2, long C3 > struct list_c< T, C0, C1, C2, C3, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list4_c< T,C0,C1,C2,C3 > { typedef typename list4_c< T,C0,C1,C2,C3 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4 > struct list_c< T, C0, C1, C2, C3, C4, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list5_c< T,C0,C1,C2,C3,C4 > { typedef typename list5_c< T,C0,C1,C2,C3,C4 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 > struct list_c< T, C0, C1, C2, C3, C4, C5, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX > : list6_c< T,C0,C1,C2,C3,C4,C5 > { typedef typename list6_c< T,C0,C1,C2,C3,C4,C5 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX > : list7_c< T,C0,C1,C2,C3,C4,C5,C6 > { typedef typename list7_c< T,C0,C1,C2,C3,C4,C5,C6 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, C7, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX > : list8_c< T,C0,C1,C2,C3,C4,C5,C6,C7 > { typedef typename list8_c< T,C0,C1,C2,C3,C4,C5,C6,C7 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX > : list9_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8 > { typedef typename list9_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX > : list10_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 > { typedef typename list10_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list11_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 > { typedef typename list11_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list12_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 > { typedef typename list12_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list13_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 > { typedef typename list13_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list14_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 > { typedef typename list14_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list15_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 > { typedef typename list15_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : list16_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15 > { typedef typename list16_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, LONG_MAX, LONG_MAX, LONG_MAX > : list17_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16 > { typedef typename list17_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, C17, LONG_MAX, LONG_MAX > : list18_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, C17 > { typedef typename list18_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18 > struct list_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, C17, C18, LONG_MAX > : list19_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, C17, C18 > { typedef typename list19_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18 >::type type; }; /// primary template (not a specialization!) template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct list_c : list20_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, C17, C18, C19 > { typedef typename list20_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19 >::type type; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/plain/map.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/map.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na , typename T12 = na, typename T13 = na, typename T14 = na , typename T15 = na, typename T16 = na, typename T17 = na , typename T18 = na, typename T19 = na > struct map; template< > struct map< na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : map0< > { typedef map0< >::type type; }; template< typename T0 > struct map< T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : map1 { typedef typename map1::type type; }; template< typename T0, typename T1 > struct map< T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : map2< T0,T1 > { typedef typename map2< T0,T1 >::type type; }; template< typename T0, typename T1, typename T2 > struct map< T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : map3< T0,T1,T2 > { typedef typename map3< T0,T1,T2 >::type type; }; template< typename T0, typename T1, typename T2, typename T3 > struct map< T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : map4< T0,T1,T2,T3 > { typedef typename map4< T0,T1,T2,T3 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 > struct map< T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : map5< T0,T1,T2,T3,T4 > { typedef typename map5< T0,T1,T2,T3,T4 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct map< T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : map6< T0,T1,T2,T3,T4,T5 > { typedef typename map6< T0,T1,T2,T3,T4,T5 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6 > struct map< T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na , na, na, na > : map7< T0,T1,T2,T3,T4,T5,T6 > { typedef typename map7< T0,T1,T2,T3,T4,T5,T6 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7 > struct map< T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na , na, na, na > : map8< T0,T1,T2,T3,T4,T5,T6,T7 > { typedef typename map8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8 > struct map< T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na , na, na, na > : map9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > { typedef typename map9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 > struct map< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na , na, na, na > : map10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > { typedef typename map10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10 > struct map< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na , na, na, na > : map11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > { typedef typename map11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11 > struct map< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na , na, na, na, na > : map12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > { typedef typename map12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12 > struct map< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na , na, na, na, na > : map13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > { typedef typename map13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13 > struct map< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na , na, na, na, na > : map14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > { typedef typename map14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 > struct map< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na , na, na, na, na > : map15< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 > { typedef typename map15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15 > struct map< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, na, na, na, na > : map16< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15 > { typedef typename map16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16 > struct map< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, na, na, na > : map17< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16 > { typedef typename map17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17 > struct map< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, na, na > : map18< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17 > { typedef typename map18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18 > struct map< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18, na > : map19< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18 > { typedef typename map19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type; }; /// primary template (not a specialization!) template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct map : map20< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18, T19 > { typedef typename map20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/plain/minus.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/minus.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct minus_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< minus_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< minus_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct minus_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct minus_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct minus_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct minus_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) , typename N3 = na, typename N4 = na, typename N5 = na > struct minus : minus< minus< minus< minus< N1,N2 >, N3>, N4>, N5> { }; template< typename N1, typename N2, typename N3, typename N4 > struct minus< N1,N2,N3,N4,na > : minus< minus< minus< N1,N2 >, N3>, N4> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , minus , ( N1, N2, N3, N4, na ) ) }; template< typename N1, typename N2, typename N3 > struct minus< N1,N2,N3,na,na > : minus< minus< N1,N2 >, N3> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , minus , ( N1, N2, N3, na, na ) ) }; template< typename N1, typename N2 > struct minus< N1,N2,na,na,na > : minus_impl< typename minus_tag::type , typename minus_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , minus , ( N1, N2, na, na, na ) ) }; BOOST_MPL_AUX_NA_SPEC2(2, 5, minus) }} namespace boost { namespace mpl { template<> struct minus_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : integral_c< typename aux::largest_int< typename N1::value_type , typename N2::value_type >::type , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value - BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/plain/modulus.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/modulus.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct modulus_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< modulus_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< modulus_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct modulus_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct modulus_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct modulus_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct modulus_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct modulus : modulus_impl< typename modulus_tag::type , typename modulus_tag::type >::template apply< N1,N2 >::type { }; BOOST_MPL_AUX_NA_SPEC2(2, 2, modulus) }} namespace boost { namespace mpl { template<> struct modulus_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : integral_c< typename aux::largest_int< typename N1::value_type , typename N2::value_type >::type , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value % BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/plain/not_equal_to.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/not_equal_to.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct not_equal_to_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< not_equal_to_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< not_equal_to_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct not_equal_to_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct not_equal_to_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct not_equal_to_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct not_equal_to_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct not_equal_to : not_equal_to_impl< typename not_equal_to_tag::type , typename not_equal_to_tag::type >::template apply< N1,N2 >::type { }; BOOST_MPL_AUX_NA_SPEC2(2, 2, not_equal_to) }} namespace boost { namespace mpl { template<> struct not_equal_to_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value != BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/plain/or.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/or.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< bool C_, typename T1, typename T2, typename T3, typename T4 > struct or_impl : true_ { }; template< typename T1, typename T2, typename T3, typename T4 > struct or_impl< false,T1,T2,T3,T4 > : or_impl< BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value , T2, T3, T4 , false_ > { }; template<> struct or_impl< false , false_, false_, false_, false_ > : false_ { }; } // namespace aux template< typename BOOST_MPL_AUX_NA_PARAM(T1) , typename BOOST_MPL_AUX_NA_PARAM(T2) , typename T3 = false_, typename T4 = false_, typename T5 = false_ > struct or_ : aux::or_impl< BOOST_MPL_AUX_NESTED_TYPE_WKND(T1)::value , T2, T3, T4, T5 > { }; BOOST_MPL_AUX_NA_SPEC2( 2 , 5 , or_ ) }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/plain/placeholders.hpp ================================================ // Copyright Aleksey Gurtovoy 2001-2004 // Copyright Peter Dimov 2001-2003 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/placeholders.hpp" header // -- DO NOT modify by hand! BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg< -1 > _; BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE namespace boost { namespace mpl { BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_) namespace placeholders { using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_; } }} /// agurt, 17/mar/02: one more placeholder for the last 'apply#' /// specialization BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg<1> _1; BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE namespace boost { namespace mpl { BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_1) namespace placeholders { using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_1; } }} BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg<2> _2; BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE namespace boost { namespace mpl { BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_2) namespace placeholders { using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_2; } }} BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg<3> _3; BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE namespace boost { namespace mpl { BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_3) namespace placeholders { using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_3; } }} BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg<4> _4; BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE namespace boost { namespace mpl { BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_4) namespace placeholders { using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_4; } }} BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg<5> _5; BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE namespace boost { namespace mpl { BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_5) namespace placeholders { using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_5; } }} BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg<6> _6; BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE namespace boost { namespace mpl { BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_6) namespace placeholders { using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_6; } }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/plain/plus.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/plus.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct plus_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< plus_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< plus_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct plus_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct plus_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct plus_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct plus_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) , typename N3 = na, typename N4 = na, typename N5 = na > struct plus : plus< plus< plus< plus< N1,N2 >, N3>, N4>, N5> { }; template< typename N1, typename N2, typename N3, typename N4 > struct plus< N1,N2,N3,N4,na > : plus< plus< plus< N1,N2 >, N3>, N4> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , plus , ( N1, N2, N3, N4, na ) ) }; template< typename N1, typename N2, typename N3 > struct plus< N1,N2,N3,na,na > : plus< plus< N1,N2 >, N3> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , plus , ( N1, N2, N3, na, na ) ) }; template< typename N1, typename N2 > struct plus< N1,N2,na,na,na > : plus_impl< typename plus_tag::type , typename plus_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , plus , ( N1, N2, na, na, na ) ) }; BOOST_MPL_AUX_NA_SPEC2(2, 5, plus) }} namespace boost { namespace mpl { template<> struct plus_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : integral_c< typename aux::largest_int< typename N1::value_type , typename N2::value_type >::type , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value + BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/plain/quote.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/quote.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename T, bool has_type_ > struct quote_impl : T { }; template< typename T > struct quote_impl< T,false > { typedef T type; }; template< template< typename P1 > class F , typename Tag = void_ > struct quote1 { template< typename U1 > struct apply : quote_impl< F , aux::has_type< F >::value > { }; }; template< template< typename P1, typename P2 > class F , typename Tag = void_ > struct quote2 { template< typename U1, typename U2 > struct apply : quote_impl< F< U1,U2 > , aux::has_type< F< U1,U2 > >::value > { }; }; template< template< typename P1, typename P2, typename P3 > class F , typename Tag = void_ > struct quote3 { template< typename U1, typename U2, typename U3 > struct apply : quote_impl< F< U1,U2,U3 > , aux::has_type< F< U1,U2,U3 > >::value > { }; }; template< template< typename P1, typename P2, typename P3, typename P4 > class F , typename Tag = void_ > struct quote4 { template< typename U1, typename U2, typename U3, typename U4 > struct apply : quote_impl< F< U1,U2,U3,U4 > , aux::has_type< F< U1,U2,U3,U4 > >::value > { }; }; template< template< typename P1, typename P2, typename P3, typename P4 , typename P5 > class F , typename Tag = void_ > struct quote5 { template< typename U1, typename U2, typename U3, typename U4 , typename U5 > struct apply : quote_impl< F< U1,U2,U3,U4,U5 > , aux::has_type< F< U1,U2,U3,U4,U5 > >::value > { }; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/plain/reverse_fold_impl.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/aux_/reverse_fold_impl.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { /// forward declaration template< long N , typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_fold_impl; template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_fold_impl< 0,First,Last,State,BackwardOp,ForwardOp > { typedef First iter0; typedef State fwd_state0; typedef fwd_state0 bkwd_state0; typedef bkwd_state0 state; typedef iter0 iterator; }; template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_fold_impl< 1,First,Last,State,BackwardOp,ForwardOp > { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; typedef typename mpl::next::type iter1; typedef fwd_state1 bkwd_state1; typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; typedef bkwd_state0 state; typedef iter1 iterator; }; template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_fold_impl< 2,First,Last,State,BackwardOp,ForwardOp > { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp, fwd_state1, typename deref::type >::type fwd_state2; typedef typename mpl::next::type iter2; typedef fwd_state2 bkwd_state2; typedef typename apply2< BackwardOp, bkwd_state2, typename deref::type >::type bkwd_state1; typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; typedef bkwd_state0 state; typedef iter2 iterator; }; template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_fold_impl< 3,First,Last,State,BackwardOp,ForwardOp > { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp, fwd_state1, typename deref::type >::type fwd_state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp, fwd_state2, typename deref::type >::type fwd_state3; typedef typename mpl::next::type iter3; typedef fwd_state3 bkwd_state3; typedef typename apply2< BackwardOp, bkwd_state3, typename deref::type >::type bkwd_state2; typedef typename apply2< BackwardOp, bkwd_state2, typename deref::type >::type bkwd_state1; typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; typedef bkwd_state0 state; typedef iter3 iterator; }; template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_fold_impl< 4,First,Last,State,BackwardOp,ForwardOp > { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp, fwd_state1, typename deref::type >::type fwd_state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp, fwd_state2, typename deref::type >::type fwd_state3; typedef typename mpl::next::type iter3; typedef typename apply2< ForwardOp, fwd_state3, typename deref::type >::type fwd_state4; typedef typename mpl::next::type iter4; typedef fwd_state4 bkwd_state4; typedef typename apply2< BackwardOp, bkwd_state4, typename deref::type >::type bkwd_state3; typedef typename apply2< BackwardOp, bkwd_state3, typename deref::type >::type bkwd_state2; typedef typename apply2< BackwardOp, bkwd_state2, typename deref::type >::type bkwd_state1; typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; typedef bkwd_state0 state; typedef iter4 iterator; }; template< long N , typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_fold_impl { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp, fwd_state0, typename deref::type >::type fwd_state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp, fwd_state1, typename deref::type >::type fwd_state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp, fwd_state2, typename deref::type >::type fwd_state3; typedef typename mpl::next::type iter3; typedef typename apply2< ForwardOp, fwd_state3, typename deref::type >::type fwd_state4; typedef typename mpl::next::type iter4; typedef reverse_fold_impl< ( (N - 4) < 0 ? 0 : N - 4 ) , iter4 , Last , fwd_state4 , BackwardOp , ForwardOp > nested_chunk; typedef typename nested_chunk::state bkwd_state4; typedef typename apply2< BackwardOp, bkwd_state4, typename deref::type >::type bkwd_state3; typedef typename apply2< BackwardOp, bkwd_state3, typename deref::type >::type bkwd_state2; typedef typename apply2< BackwardOp, bkwd_state2, typename deref::type >::type bkwd_state1; typedef typename apply2< BackwardOp, bkwd_state1, typename deref::type >::type bkwd_state0; typedef bkwd_state0 state; typedef typename nested_chunk::iterator iterator; }; template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_fold_impl< -1,First,Last,State,BackwardOp,ForwardOp > { typedef reverse_fold_impl< -1 , typename mpl::next::type , Last , typename apply2::type>::type , BackwardOp , ForwardOp > nested_step; typedef typename apply2< BackwardOp , typename nested_step::state , typename deref::type >::type state; typedef typename nested_step::iterator iterator; }; template< typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_fold_impl< -1,Last,Last,State,BackwardOp,ForwardOp > { typedef State state; typedef Last iterator; }; }}} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/plain/reverse_iter_fold_impl.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/aux_/reverse_iter_fold_impl.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { /// forward declaration template< long N , typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_iter_fold_impl; template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_iter_fold_impl< 0,First,Last,State,BackwardOp,ForwardOp > { typedef First iter0; typedef State fwd_state0; typedef fwd_state0 bkwd_state0; typedef bkwd_state0 state; typedef iter0 iterator; }; template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_iter_fold_impl< 1,First,Last,State,BackwardOp,ForwardOp > { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; typedef typename mpl::next::type iter1; typedef fwd_state1 bkwd_state1; typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; typedef bkwd_state0 state; typedef iter1 iterator; }; template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_iter_fold_impl< 2,First,Last,State,BackwardOp,ForwardOp > { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; typedef typename mpl::next::type iter2; typedef fwd_state2 bkwd_state2; typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1; typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; typedef bkwd_state0 state; typedef iter2 iterator; }; template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_iter_fold_impl< 3,First,Last,State,BackwardOp,ForwardOp > { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp,fwd_state2,iter2 >::type fwd_state3; typedef typename mpl::next::type iter3; typedef fwd_state3 bkwd_state3; typedef typename apply2< BackwardOp,bkwd_state3,iter2 >::type bkwd_state2; typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1; typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; typedef bkwd_state0 state; typedef iter3 iterator; }; template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_iter_fold_impl< 4,First,Last,State,BackwardOp,ForwardOp > { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp,fwd_state2,iter2 >::type fwd_state3; typedef typename mpl::next::type iter3; typedef typename apply2< ForwardOp,fwd_state3,iter3 >::type fwd_state4; typedef typename mpl::next::type iter4; typedef fwd_state4 bkwd_state4; typedef typename apply2< BackwardOp,bkwd_state4,iter3 >::type bkwd_state3; typedef typename apply2< BackwardOp,bkwd_state3,iter2 >::type bkwd_state2; typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1; typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; typedef bkwd_state0 state; typedef iter4 iterator; }; template< long N , typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_iter_fold_impl { typedef First iter0; typedef State fwd_state0; typedef typename apply2< ForwardOp,fwd_state0,iter0 >::type fwd_state1; typedef typename mpl::next::type iter1; typedef typename apply2< ForwardOp,fwd_state1,iter1 >::type fwd_state2; typedef typename mpl::next::type iter2; typedef typename apply2< ForwardOp,fwd_state2,iter2 >::type fwd_state3; typedef typename mpl::next::type iter3; typedef typename apply2< ForwardOp,fwd_state3,iter3 >::type fwd_state4; typedef typename mpl::next::type iter4; typedef reverse_iter_fold_impl< ( (N - 4) < 0 ? 0 : N - 4 ) , iter4 , Last , fwd_state4 , BackwardOp , ForwardOp > nested_chunk; typedef typename nested_chunk::state bkwd_state4; typedef typename apply2< BackwardOp,bkwd_state4,iter3 >::type bkwd_state3; typedef typename apply2< BackwardOp,bkwd_state3,iter2 >::type bkwd_state2; typedef typename apply2< BackwardOp,bkwd_state2,iter1 >::type bkwd_state1; typedef typename apply2< BackwardOp,bkwd_state1,iter0 >::type bkwd_state0; typedef bkwd_state0 state; typedef typename nested_chunk::iterator iterator; }; template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_iter_fold_impl< -1,First,Last,State,BackwardOp,ForwardOp > { typedef reverse_iter_fold_impl< -1 , typename mpl::next::type , Last , typename apply2< ForwardOp,State,First >::type , BackwardOp , ForwardOp > nested_step; typedef typename apply2< BackwardOp , typename nested_step::state , First >::type state; typedef typename nested_step::iterator iterator; }; template< typename Last , typename State , typename BackwardOp , typename ForwardOp > struct reverse_iter_fold_impl< -1,Last,Last,State,BackwardOp,ForwardOp > { typedef State state; typedef Last iterator; }; }}} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/plain/set.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/set.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na , typename T12 = na, typename T13 = na, typename T14 = na , typename T15 = na, typename T16 = na, typename T17 = na , typename T18 = na, typename T19 = na > struct set; template< > struct set< na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : set0< > { typedef set0< >::type type; }; template< typename T0 > struct set< T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : set1 { typedef typename set1::type type; }; template< typename T0, typename T1 > struct set< T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : set2< T0,T1 > { typedef typename set2< T0,T1 >::type type; }; template< typename T0, typename T1, typename T2 > struct set< T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : set3< T0,T1,T2 > { typedef typename set3< T0,T1,T2 >::type type; }; template< typename T0, typename T1, typename T2, typename T3 > struct set< T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : set4< T0,T1,T2,T3 > { typedef typename set4< T0,T1,T2,T3 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 > struct set< T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : set5< T0,T1,T2,T3,T4 > { typedef typename set5< T0,T1,T2,T3,T4 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct set< T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : set6< T0,T1,T2,T3,T4,T5 > { typedef typename set6< T0,T1,T2,T3,T4,T5 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6 > struct set< T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na , na, na, na > : set7< T0,T1,T2,T3,T4,T5,T6 > { typedef typename set7< T0,T1,T2,T3,T4,T5,T6 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7 > struct set< T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na , na, na, na > : set8< T0,T1,T2,T3,T4,T5,T6,T7 > { typedef typename set8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8 > struct set< T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na , na, na, na > : set9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > { typedef typename set9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 > struct set< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na , na, na, na > : set10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > { typedef typename set10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10 > struct set< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na , na, na, na > : set11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > { typedef typename set11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11 > struct set< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na , na, na, na, na > : set12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > { typedef typename set12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12 > struct set< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na , na, na, na, na > : set13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > { typedef typename set13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13 > struct set< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na , na, na, na, na > : set14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > { typedef typename set14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 > struct set< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na , na, na, na, na > : set15< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 > { typedef typename set15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15 > struct set< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, na, na, na, na > : set16< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15 > { typedef typename set16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16 > struct set< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, na, na, na > : set17< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16 > { typedef typename set17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17 > struct set< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, na, na > : set18< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17 > { typedef typename set18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18 > struct set< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18, na > : set19< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18 > { typedef typename set19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type; }; /// primary template (not a specialization!) template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct set : set20< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18, T19 > { typedef typename set20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/plain/set_c.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/set_c.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename T, long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX , long C3 = LONG_MAX, long C4 = LONG_MAX, long C5 = LONG_MAX , long C6 = LONG_MAX, long C7 = LONG_MAX, long C8 = LONG_MAX , long C9 = LONG_MAX, long C10 = LONG_MAX, long C11 = LONG_MAX , long C12 = LONG_MAX, long C13 = LONG_MAX, long C14 = LONG_MAX , long C15 = LONG_MAX, long C16 = LONG_MAX, long C17 = LONG_MAX , long C18 = LONG_MAX, long C19 = LONG_MAX > struct set_c; template< typename T > struct set_c< T, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : set0_c { typedef typename set0_c::type type; }; template< typename T, long C0 > struct set_c< T, C0, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : set1_c< T,C0 > { typedef typename set1_c< T,C0 >::type type; }; template< typename T, long C0, long C1 > struct set_c< T, C0, C1, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : set2_c< T,C0,C1 > { typedef typename set2_c< T,C0,C1 >::type type; }; template< typename T, long C0, long C1, long C2 > struct set_c< T, C0, C1, C2, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : set3_c< T,C0,C1,C2 > { typedef typename set3_c< T,C0,C1,C2 >::type type; }; template< typename T, long C0, long C1, long C2, long C3 > struct set_c< T, C0, C1, C2, C3, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : set4_c< T,C0,C1,C2,C3 > { typedef typename set4_c< T,C0,C1,C2,C3 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4 > struct set_c< T, C0, C1, C2, C3, C4, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : set5_c< T,C0,C1,C2,C3,C4 > { typedef typename set5_c< T,C0,C1,C2,C3,C4 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 > struct set_c< T, C0, C1, C2, C3, C4, C5, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX > : set6_c< T,C0,C1,C2,C3,C4,C5 > { typedef typename set6_c< T,C0,C1,C2,C3,C4,C5 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX > : set7_c< T,C0,C1,C2,C3,C4,C5,C6 > { typedef typename set7_c< T,C0,C1,C2,C3,C4,C5,C6 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, C7, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX > : set8_c< T,C0,C1,C2,C3,C4,C5,C6,C7 > { typedef typename set8_c< T,C0,C1,C2,C3,C4,C5,C6,C7 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX > : set9_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8 > { typedef typename set9_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX > : set10_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 > { typedef typename set10_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : set11_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 > { typedef typename set11_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : set12_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 > { typedef typename set12_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : set13_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 > { typedef typename set13_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : set14_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 > { typedef typename set14_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : set15_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 > { typedef typename set15_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : set16_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15 > { typedef typename set16_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, LONG_MAX, LONG_MAX, LONG_MAX > : set17_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16 > { typedef typename set17_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, C17, LONG_MAX, LONG_MAX > : set18_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, C17 > { typedef typename set18_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17 >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18 > struct set_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, C17, C18, LONG_MAX > : set19_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, C17, C18 > { typedef typename set19_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18 >::type type; }; /// primary template (not a specialization!) template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct set_c : set20_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, C17, C18, C19 > { typedef typename set20_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19 >::type type; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/plain/shift_left.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // Copyright Jaap Suter 2003 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/shift_left.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct shift_left_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< shift_left_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< shift_left_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct shift_left_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct shift_left_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct shift_left_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct shift_left_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct shift_left : shift_left_impl< typename shift_left_tag::type , typename shift_left_tag::type >::template apply< N1,N2 >::type { }; BOOST_MPL_AUX_NA_SPEC2(2, 2, shift_left) }} namespace boost { namespace mpl { template<> struct shift_left_impl< integral_c_tag,integral_c_tag > { template< typename N, typename S > struct apply : integral_c< typename N::value_type , ( BOOST_MPL_AUX_VALUE_WKND(N)::value << BOOST_MPL_AUX_VALUE_WKND(S)::value ) > { }; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/plain/shift_right.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // Copyright Jaap Suter 2003 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/shift_right.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct shift_right_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< shift_right_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< shift_right_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct shift_right_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct shift_right_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct shift_right_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct shift_right_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) > struct shift_right : shift_right_impl< typename shift_right_tag::type , typename shift_right_tag::type >::template apply< N1,N2 >::type { }; BOOST_MPL_AUX_NA_SPEC2(2, 2, shift_right) }} namespace boost { namespace mpl { template<> struct shift_right_impl< integral_c_tag,integral_c_tag > { template< typename N, typename S > struct apply : integral_c< typename N::value_type , ( BOOST_MPL_AUX_VALUE_WKND(N)::value >> BOOST_MPL_AUX_VALUE_WKND(S)::value ) > { }; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/plain/template_arity.hpp ================================================ // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/aux_/template_arity.hpp" header // -- DO NOT modify by hand! ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/plain/times.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/times.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename Tag1 , typename Tag2 > struct times_impl : if_c< ( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1) > BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2) ) , aux::cast2nd_impl< times_impl< Tag1,Tag1 >,Tag1, Tag2 > , aux::cast1st_impl< times_impl< Tag2,Tag2 >,Tag1, Tag2 > >::type { }; /// for Digital Mars C++/compilers with no CTPS/TTP support template<> struct times_impl< na,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct times_impl< na,Tag > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename Tag > struct times_impl< Tag,na > { template< typename U1, typename U2 > struct apply { typedef apply type; BOOST_STATIC_CONSTANT(int, value = 0); }; }; template< typename T > struct times_tag { typedef typename T::tag type; }; template< typename BOOST_MPL_AUX_NA_PARAM(N1) , typename BOOST_MPL_AUX_NA_PARAM(N2) , typename N3 = na, typename N4 = na, typename N5 = na > struct times : times< times< times< times< N1,N2 >, N3>, N4>, N5> { }; template< typename N1, typename N2, typename N3, typename N4 > struct times< N1,N2,N3,N4,na > : times< times< times< N1,N2 >, N3>, N4> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , times , ( N1, N2, N3, N4, na ) ) }; template< typename N1, typename N2, typename N3 > struct times< N1,N2,N3,na,na > : times< times< N1,N2 >, N3> { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , times , ( N1, N2, N3, na, na ) ) }; template< typename N1, typename N2 > struct times< N1,N2,na,na,na > : times_impl< typename times_tag::type , typename times_tag::type >::template apply< N1,N2 >::type { BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC( 5 , times , ( N1, N2, na, na, na ) ) }; BOOST_MPL_AUX_NA_SPEC2(2, 5, times) }} namespace boost { namespace mpl { template<> struct times_impl< integral_c_tag,integral_c_tag > { template< typename N1, typename N2 > struct apply : integral_c< typename aux::largest_int< typename N1::value_type , typename N2::value_type >::type , ( BOOST_MPL_AUX_VALUE_WKND(N1)::value * BOOST_MPL_AUX_VALUE_WKND(N2)::value ) > { }; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/plain/unpack_args.hpp ================================================ // Copyright Aleksey Gurtovoy 2002-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/unpack_args.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { template< int size, typename F, typename Args > struct unpack_args_impl; template< typename F, typename Args > struct unpack_args_impl< 0,F,Args > : apply0< F > { }; template< typename F, typename Args > struct unpack_args_impl< 1,F,Args > : apply1< F , typename at_c< Args,0 >::type > { }; template< typename F, typename Args > struct unpack_args_impl< 2,F,Args > : apply2< F , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type > { }; template< typename F, typename Args > struct unpack_args_impl< 3,F,Args > : apply3< F , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type , typename at_c< Args,2 >::type > { }; template< typename F, typename Args > struct unpack_args_impl< 4,F,Args > : apply4< F , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type , typename at_c< Args,2 >::type, typename at_c< Args,3 >::type > { }; template< typename F, typename Args > struct unpack_args_impl< 5,F,Args > : apply5< F , typename at_c< Args,0 >::type, typename at_c< Args,1 >::type , typename at_c< Args,2 >::type, typename at_c< Args,3 >::type , typename at_c< Args,4 >::type > { }; } template< typename F > struct unpack_args { template< typename Args > struct apply : aux::unpack_args_impl< size::value,F, Args > { }; }; BOOST_MPL_AUX_PASS_THROUGH_LAMBDA_SPEC(1, unpack_args) }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/plain/vector.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/vector.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na , typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na , typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na , typename T12 = na, typename T13 = na, typename T14 = na , typename T15 = na, typename T16 = na, typename T17 = na , typename T18 = na, typename T19 = na > struct vector; template< > struct vector< na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector0< > { typedef vector0< >::type type; }; template< typename T0 > struct vector< T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector1 { typedef typename vector1::type type; }; template< typename T0, typename T1 > struct vector< T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector2< T0,T1 > { typedef typename vector2< T0,T1 >::type type; }; template< typename T0, typename T1, typename T2 > struct vector< T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector3< T0,T1,T2 > { typedef typename vector3< T0,T1,T2 >::type type; }; template< typename T0, typename T1, typename T2, typename T3 > struct vector< T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector4< T0,T1,T2,T3 > { typedef typename vector4< T0,T1,T2,T3 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 > struct vector< T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector5< T0,T1,T2,T3,T4 > { typedef typename vector5< T0,T1,T2,T3,T4 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct vector< T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector6< T0,T1,T2,T3,T4,T5 > { typedef typename vector6< T0,T1,T2,T3,T4,T5 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6 > struct vector< T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na , na, na, na > : vector7< T0,T1,T2,T3,T4,T5,T6 > { typedef typename vector7< T0,T1,T2,T3,T4,T5,T6 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7 > struct vector< T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na , na, na, na > : vector8< T0,T1,T2,T3,T4,T5,T6,T7 > { typedef typename vector8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8 > struct vector< T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na , na, na, na > : vector9< T0,T1,T2,T3,T4,T5,T6,T7,T8 > { typedef typename vector9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 > struct vector< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na , na, na, na > : vector10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > { typedef typename vector10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10 > struct vector< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na , na, na, na > : vector11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > { typedef typename vector11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11 > struct vector< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na , na, na, na, na > : vector12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > { typedef typename vector12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12 > struct vector< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na , na, na, na, na > : vector13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > { typedef typename vector13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13 > struct vector< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na , na, na, na, na > : vector14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > { typedef typename vector14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 > struct vector< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na , na, na, na, na > : vector15< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 > { typedef typename vector15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15 > struct vector< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, na, na, na, na > : vector16< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15 > { typedef typename vector16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16 > struct vector< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, na, na, na > : vector17< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16 > { typedef typename vector17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17 > struct vector< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, na, na > : vector18< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17 > { typedef typename vector18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18 > struct vector< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18, na > : vector19< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18 > { typedef typename vector19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type; }; /// primary template (not a specialization!) template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct vector : vector20< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 , T15, T16, T17, T18, T19 > { typedef typename vector20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessed/plain/vector_c.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/vector_c.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename T, long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX , long C3 = LONG_MAX, long C4 = LONG_MAX, long C5 = LONG_MAX , long C6 = LONG_MAX, long C7 = LONG_MAX, long C8 = LONG_MAX , long C9 = LONG_MAX, long C10 = LONG_MAX, long C11 = LONG_MAX , long C12 = LONG_MAX, long C13 = LONG_MAX, long C14 = LONG_MAX , long C15 = LONG_MAX, long C16 = LONG_MAX, long C17 = LONG_MAX , long C18 = LONG_MAX, long C19 = LONG_MAX > struct vector_c; template< typename T > struct vector_c< T, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector0_c { typedef typename vector0_c::type type; }; template< typename T, long C0 > struct vector_c< T, C0, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector1_c< T, T(C0) > { typedef typename vector1_c< T, T(C0) >::type type; }; template< typename T, long C0, long C1 > struct vector_c< T, C0, C1, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector2_c< T, T(C0), T(C1) > { typedef typename vector2_c< T, T(C0), T(C1) >::type type; }; template< typename T, long C0, long C1, long C2 > struct vector_c< T, C0, C1, C2, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector3_c< T, T(C0), T(C1), T(C2) > { typedef typename vector3_c< T, T(C0), T(C1), T(C2) >::type type; }; template< typename T, long C0, long C1, long C2, long C3 > struct vector_c< T, C0, C1, C2, C3, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector4_c< T, T(C0), T(C1), T(C2), T(C3) > { typedef typename vector4_c< T, T(C0), T(C1), T(C2), T(C3) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4 > struct vector_c< T, C0, C1, C2, C3, C4, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector5_c< T, T(C0), T(C1), T(C2), T(C3), T(C4) > { typedef typename vector5_c< T, T(C0), T(C1), T(C2), T(C3), T(C4) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 > struct vector_c< T, C0, C1, C2, C3, C4, C5, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX > : vector6_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5) > { typedef typename vector6_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX > : vector7_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6) > { typedef typename vector7_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, C7, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX > : vector8_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7) > { typedef typename vector8_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX > : vector9_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8) > { typedef typename vector9_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX , LONG_MAX > : vector10_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9) > { typedef typename vector10_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, LONG_MAX, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector11_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10) > { typedef typename vector11_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector12_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11) > { typedef typename vector12_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, LONG_MAX , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector13_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12) > { typedef typename vector13_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13 , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector14_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13) > { typedef typename vector14_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector15_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14) > { typedef typename vector15_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX > : vector16_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15) > { typedef typename vector16_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, LONG_MAX, LONG_MAX, LONG_MAX > : vector17_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16) > { typedef typename vector17_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, C17, LONG_MAX, LONG_MAX > : vector18_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17) > { typedef typename vector18_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17) >::type type; }; template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18 > struct vector_c< T, C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14 , C15, C16, C17, C18, LONG_MAX > : vector19_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17), T(C18) > { typedef typename vector19_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17), T(C18) >::type type; }; /// primary template (not a specialization!) template< typename T, long C0, long C1, long C2, long C3, long C4, long C5 , long C6, long C7, long C8, long C9, long C10, long C11, long C12 , long C13, long C14, long C15, long C16, long C17, long C18, long C19 > struct vector_c : vector20_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17), T(C18), T(C19) > { typedef typename vector20_c< T, T(C0), T(C1), T(C2), T(C3), T(C4), T(C5), T(C6), T(C7), T(C8), T(C9), T(C10), T(C11), T(C12), T(C13), T(C14), T(C15), T(C16), T(C17), T(C18), T(C19) >::type type; }; }} ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessor/add.hpp ================================================ #ifndef BOOST_MPL_AUX_PREPROCESSOR_ADD_HPP_INCLUDED #define BOOST_MPL_AUX_PREPROCESSOR_ADD_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2002-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ #include #if !defined(BOOST_MPL_CFG_NO_OWN_PP_PRIMITIVES) # include #if defined(BOOST_MPL_CFG_BROKEN_PP_MACRO_EXPANSION) # include # define BOOST_MPL_PP_ADD(i,j) \ BOOST_MPL_PP_ADD_DELAY(i,j) \ /**/ # define BOOST_MPL_PP_ADD_DELAY(i,j) \ BOOST_PP_CAT(BOOST_MPL_PP_TUPLE_11_ELEM_##i,BOOST_MPL_PP_ADD_##j) \ /**/ #else # define BOOST_MPL_PP_ADD(i,j) \ BOOST_MPL_PP_ADD_DELAY(i,j) \ /**/ # define BOOST_MPL_PP_ADD_DELAY(i,j) \ BOOST_MPL_PP_TUPLE_11_ELEM_##i BOOST_MPL_PP_ADD_##j \ /**/ #endif # define BOOST_MPL_PP_ADD_0 (0,1,2,3,4,5,6,7,8,9,10) # define BOOST_MPL_PP_ADD_1 (1,2,3,4,5,6,7,8,9,10,0) # define BOOST_MPL_PP_ADD_2 (2,3,4,5,6,7,8,9,10,0,0) # define BOOST_MPL_PP_ADD_3 (3,4,5,6,7,8,9,10,0,0,0) # define BOOST_MPL_PP_ADD_4 (4,5,6,7,8,9,10,0,0,0,0) # define BOOST_MPL_PP_ADD_5 (5,6,7,8,9,10,0,0,0,0,0) # define BOOST_MPL_PP_ADD_6 (6,7,8,9,10,0,0,0,0,0,0) # define BOOST_MPL_PP_ADD_7 (7,8,9,10,0,0,0,0,0,0,0) # define BOOST_MPL_PP_ADD_8 (8,9,10,0,0,0,0,0,0,0,0) # define BOOST_MPL_PP_ADD_9 (9,10,0,0,0,0,0,0,0,0,0) # define BOOST_MPL_PP_ADD_10 (10,0,0,0,0,0,0,0,0,0,0) #else # include # define BOOST_MPL_PP_ADD(i,j) \ BOOST_PP_ADD(i,j) \ /**/ #endif #endif // BOOST_MPL_AUX_PREPROCESSOR_ADD_HPP_INCLUDED ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessor/def_params_tail.hpp ================================================ #ifndef BOOST_MPL_AUX_PREPROCESSOR_DEF_PARAMS_TAIL_HPP_INCLUDED #define BOOST_MPL_AUX_PREPROCESSOR_DEF_PARAMS_TAIL_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ #include #include #include #include #include #include #include // BOOST_MPL_PP_DEF_PARAMS_TAIL(1,T,value): , T1 = value, .., Tn = value // BOOST_MPL_PP_DEF_PARAMS_TAIL(2,T,value): , T2 = value, .., Tn = value // BOOST_MPL_PP_DEF_PARAMS_TAIL(n,T,value): #if !defined(BOOST_MPL_CFG_NO_OWN_PP_PRIMITIVES) # include # include # define BOOST_MPL_PP_DEF_PARAMS_TAIL_IMPL(i, param, value_func) \ BOOST_MPL_PP_DEF_PARAMS_TAIL_DELAY_1( \ i \ , BOOST_MPL_PP_SUB(BOOST_MPL_LIMIT_METAFUNCTION_ARITY,i) \ , param \ , value_func \ ) \ /**/ # define BOOST_MPL_PP_DEF_PARAMS_TAIL_DELAY_1(i, n, param, value_func) \ BOOST_MPL_PP_DEF_PARAMS_TAIL_DELAY_2(i,n,param,value_func) \ /**/ # define BOOST_MPL_PP_DEF_PARAMS_TAIL_DELAY_2(i, n, param, value_func) \ BOOST_PP_COMMA_IF(BOOST_PP_AND(i,n)) \ BOOST_MPL_PP_DEF_PARAMS_TAIL_##i(n,param,value_func) \ /**/ # define BOOST_MPL_PP_DEF_PARAMS_TAIL_0(i,p,v) BOOST_MPL_PP_FILTER_PARAMS_##i(p##1 v(),p##2 v(),p##3 v(),p##4 v(),p##5 v(),p##6 v(),p##7 v(),p##8 v(),p##9 v()) # define BOOST_MPL_PP_DEF_PARAMS_TAIL_1(i,p,v) BOOST_MPL_PP_FILTER_PARAMS_##i(p##2 v(),p##3 v(),p##4 v(),p##5 v(),p##6 v(),p##7 v(),p##8 v(),p##9 v(),p1) # define BOOST_MPL_PP_DEF_PARAMS_TAIL_2(i,p,v) BOOST_MPL_PP_FILTER_PARAMS_##i(p##3 v(),p##4 v(),p##5 v(),p##6 v(),p##7 v(),p##8 v(),p##9 v(),p1,p2) # define BOOST_MPL_PP_DEF_PARAMS_TAIL_3(i,p,v) BOOST_MPL_PP_FILTER_PARAMS_##i(p##4 v(),p##5 v(),p##6 v(),p##7 v(),p##8 v(),p##9 v(),p1,p2,p3) # define BOOST_MPL_PP_DEF_PARAMS_TAIL_4(i,p,v) BOOST_MPL_PP_FILTER_PARAMS_##i(p##5 v(),p##6 v(),p##7 v(),p##8 v(),p##9 v(),p1,p2,p3,p4) # define BOOST_MPL_PP_DEF_PARAMS_TAIL_5(i,p,v) BOOST_MPL_PP_FILTER_PARAMS_##i(p##6 v(),p##7 v(),p##8 v(),p##9 v(),p1,p2,p3,p4,p5) # define BOOST_MPL_PP_DEF_PARAMS_TAIL_6(i,p,v) BOOST_MPL_PP_FILTER_PARAMS_##i(p##7 v(),p##8 v(),p##9 v(),p1,p2,p3,p4,p5,p6) # define BOOST_MPL_PP_DEF_PARAMS_TAIL_7(i,p,v) BOOST_MPL_PP_FILTER_PARAMS_##i(p##8 v(),p##9 v(),p1,p2,p3,p4,p5,p6,p7) # define BOOST_MPL_PP_DEF_PARAMS_TAIL_8(i,p,v) BOOST_MPL_PP_FILTER_PARAMS_##i(p##9 v(),p1,p2,p3,p4,p5,p6,p7,p8) # define BOOST_MPL_PP_DEF_PARAMS_TAIL_9(i,p,v) BOOST_MPL_PP_FILTER_PARAMS_##i(p1,p2,p3,p4,p5,p6,p7,p8,p9) #else # include # include # include # include # include # include # define BOOST_MPL_PP_AUX_TAIL_PARAM_FUNC(unused, i, op) \ , BOOST_PP_CAT( \ BOOST_PP_TUPLE_ELEM(3, 1, op) \ , BOOST_PP_ADD_D(1, i, BOOST_PP_INC(BOOST_PP_TUPLE_ELEM(3, 0, op))) \ ) BOOST_PP_TUPLE_ELEM(3, 2, op)() \ /**/ # define BOOST_MPL_PP_DEF_PARAMS_TAIL_IMPL(i, param, value_func) \ BOOST_PP_REPEAT( \ BOOST_PP_SUB_D(1, BOOST_MPL_LIMIT_METAFUNCTION_ARITY, i) \ , BOOST_MPL_PP_AUX_TAIL_PARAM_FUNC \ , (i, param, value_func) \ ) \ /**/ #endif // BOOST_MPL_CFG_NO_OWN_PP_PRIMITIVES #define BOOST_MPL_PP_DEF_PARAMS_TAIL(i, param, value) \ BOOST_MPL_PP_DEF_PARAMS_TAIL_IMPL(i, param, BOOST_PP_IDENTITY(=value)) \ /**/ #if !defined(BOOST_MPL_CFG_NO_DEFAULT_PARAMETERS_IN_NESTED_TEMPLATES) # define BOOST_MPL_PP_NESTED_DEF_PARAMS_TAIL(i, param, value) \ BOOST_MPL_PP_DEF_PARAMS_TAIL_IMPL(i, param, BOOST_PP_IDENTITY(=value)) \ /**/ #else # define BOOST_MPL_PP_NESTED_DEF_PARAMS_TAIL(i, param, value) \ BOOST_MPL_PP_DEF_PARAMS_TAIL_IMPL(i, param, BOOST_PP_EMPTY) \ /**/ #endif #endif // BOOST_MPL_AUX_PREPROCESSOR_DEF_PARAMS_TAIL_HPP_INCLUDED ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessor/default_params.hpp ================================================ #ifndef BOOST_MPL_AUX_PREPROCESSOR_DEFAULT_PARAMS_HPP_INCLUDED #define BOOST_MPL_AUX_PREPROCESSOR_DEFAULT_PARAMS_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2002-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ #include // BOOST_MPL_PP_DEFAULT_PARAMS(0,T,int): // BOOST_MPL_PP_DEFAULT_PARAMS(1,T,int): T1 = int // BOOST_MPL_PP_DEFAULT_PARAMS(2,T,int): T1 = int, T2 = int // BOOST_MPL_PP_DEFAULT_PARAMS(n,T,int): T1 = int, T2 = int, .., Tn = int #if !defined(BOOST_MPL_CFG_NO_OWN_PP_PRIMITIVES) # include # define BOOST_MPL_PP_DEFAULT_PARAMS(n,p,v) \ BOOST_PP_CAT(BOOST_MPL_PP_DEFAULT_PARAMS_,n)(p,v) \ /**/ # define BOOST_MPL_PP_DEFAULT_PARAMS_0(p,v) # define BOOST_MPL_PP_DEFAULT_PARAMS_1(p,v) p##1=v # define BOOST_MPL_PP_DEFAULT_PARAMS_2(p,v) p##1=v,p##2=v # define BOOST_MPL_PP_DEFAULT_PARAMS_3(p,v) p##1=v,p##2=v,p##3=v # define BOOST_MPL_PP_DEFAULT_PARAMS_4(p,v) p##1=v,p##2=v,p##3=v,p##4=v # define BOOST_MPL_PP_DEFAULT_PARAMS_5(p,v) p##1=v,p##2=v,p##3=v,p##4=v,p##5=v # define BOOST_MPL_PP_DEFAULT_PARAMS_6(p,v) p##1=v,p##2=v,p##3=v,p##4=v,p##5=v,p##6=v # define BOOST_MPL_PP_DEFAULT_PARAMS_7(p,v) p##1=v,p##2=v,p##3=v,p##4=v,p##5=v,p##6=v,p##7=v # define BOOST_MPL_PP_DEFAULT_PARAMS_8(p,v) p##1=v,p##2=v,p##3=v,p##4=v,p##5=v,p##6=v,p##7=v,p##8=v # define BOOST_MPL_PP_DEFAULT_PARAMS_9(p,v) p##1=v,p##2=v,p##3=v,p##4=v,p##5=v,p##6=v,p##7=v,p##8=v,p##9=v #else # include # include # include # include # include # define BOOST_MPL_PP_AUX_DEFAULT_PARAM_FUNC(unused, i, pv) \ BOOST_PP_COMMA_IF(i) \ BOOST_PP_CAT( BOOST_PP_TUPLE_ELEM(2,0,pv), BOOST_PP_INC(i) ) \ = BOOST_PP_TUPLE_ELEM(2,1,pv) \ /**/ # define BOOST_MPL_PP_DEFAULT_PARAMS(n, param, value) \ BOOST_PP_REPEAT( \ n \ , BOOST_MPL_PP_AUX_DEFAULT_PARAM_FUNC \ , (param,value) \ ) \ /**/ #endif #endif // BOOST_MPL_AUX_PREPROCESSOR_DEFAULT_PARAMS_HPP_INCLUDED ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessor/enum.hpp ================================================ #ifndef BOOST_MPL_AUX_PREPROCESSOR_ENUM_HPP_INCLUDED #define BOOST_MPL_AUX_PREPROCESSOR_ENUM_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ #include // BOOST_MPL_PP_ENUM(0,int): // BOOST_MPL_PP_ENUM(1,int): int // BOOST_MPL_PP_ENUM(2,int): int, int // BOOST_MPL_PP_ENUM(n,int): int, int, .., int #if !defined(BOOST_MPL_CFG_NO_OWN_PP_PRIMITIVES) # include # define BOOST_MPL_PP_ENUM(n, param) \ BOOST_PP_CAT(BOOST_MPL_PP_ENUM_,n)(param) \ /**/ # define BOOST_MPL_PP_ENUM_0(p) # define BOOST_MPL_PP_ENUM_1(p) p # define BOOST_MPL_PP_ENUM_2(p) p,p # define BOOST_MPL_PP_ENUM_3(p) p,p,p # define BOOST_MPL_PP_ENUM_4(p) p,p,p,p # define BOOST_MPL_PP_ENUM_5(p) p,p,p,p,p # define BOOST_MPL_PP_ENUM_6(p) p,p,p,p,p,p # define BOOST_MPL_PP_ENUM_7(p) p,p,p,p,p,p,p # define BOOST_MPL_PP_ENUM_8(p) p,p,p,p,p,p,p,p # define BOOST_MPL_PP_ENUM_9(p) p,p,p,p,p,p,p,p,p #else # include # include # define BOOST_MPL_PP_AUX_ENUM_FUNC(unused, i, param) \ BOOST_PP_COMMA_IF(i) param \ /**/ # define BOOST_MPL_PP_ENUM(n, param) \ BOOST_PP_REPEAT( \ n \ , BOOST_MPL_PP_AUX_ENUM_FUNC \ , param \ ) \ /**/ #endif #endif // BOOST_MPL_AUX_PREPROCESSOR_ENUM_HPP_INCLUDED ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessor/ext_params.hpp ================================================ #ifndef BOOST_MPL_AUX_PREPROCESSOR_EXT_PARAMS_HPP_INCLUDED #define BOOST_MPL_AUX_PREPROCESSOR_EXT_PARAMS_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ #include // BOOST_MPL_PP_EXT_PARAMS(2,2,T): // BOOST_MPL_PP_EXT_PARAMS(2,3,T): T2 // BOOST_MPL_PP_EXT_PARAMS(2,4,T): T2, T3 // BOOST_MPL_PP_EXT_PARAMS(2,n,T): T2, T3, .., Tn-1 #if !defined(BOOST_MPL_CFG_NO_OWN_PP_PRIMITIVES) # include # include # define BOOST_MPL_PP_EXT_PARAMS(i,j,p) \ BOOST_MPL_PP_EXT_PARAMS_DELAY_1(i,BOOST_MPL_PP_SUB(j,i),p) \ /**/ # define BOOST_MPL_PP_EXT_PARAMS_DELAY_1(i,n,p) \ BOOST_MPL_PP_EXT_PARAMS_DELAY_2(i,n,p) \ /**/ # define BOOST_MPL_PP_EXT_PARAMS_DELAY_2(i,n,p) \ BOOST_MPL_PP_EXT_PARAMS_##i(n,p) \ /**/ # define BOOST_MPL_PP_EXT_PARAMS_1(i,p) BOOST_MPL_PP_FILTER_PARAMS_##i(p##1,p##2,p##3,p##4,p##5,p##6,p##7,p##8,p##9) # define BOOST_MPL_PP_EXT_PARAMS_2(i,p) BOOST_MPL_PP_FILTER_PARAMS_##i(p##2,p##3,p##4,p##5,p##6,p##7,p##8,p##9,p1) # define BOOST_MPL_PP_EXT_PARAMS_3(i,p) BOOST_MPL_PP_FILTER_PARAMS_##i(p##3,p##4,p##5,p##6,p##7,p##8,p##9,p1,p2) # define BOOST_MPL_PP_EXT_PARAMS_4(i,p) BOOST_MPL_PP_FILTER_PARAMS_##i(p##4,p##5,p##6,p##7,p##8,p##9,p1,p2,p3) # define BOOST_MPL_PP_EXT_PARAMS_5(i,p) BOOST_MPL_PP_FILTER_PARAMS_##i(p##5,p##6,p##7,p##8,p##9,p1,p2,p3,p4) # define BOOST_MPL_PP_EXT_PARAMS_6(i,p) BOOST_MPL_PP_FILTER_PARAMS_##i(p##6,p##7,p##8,p##9,p1,p2,p3,p4,p5) # define BOOST_MPL_PP_EXT_PARAMS_7(i,p) BOOST_MPL_PP_FILTER_PARAMS_##i(p##7,p##8,p##9,p1,p2,p3,p4,p5,p6) # define BOOST_MPL_PP_EXT_PARAMS_8(i,p) BOOST_MPL_PP_FILTER_PARAMS_##i(p##8,p##9,p1,p2,p3,p4,p5,p6,p7) # define BOOST_MPL_PP_EXT_PARAMS_9(i,p) BOOST_MPL_PP_FILTER_PARAMS_##i(p##9,p1,p2,p3,p4,p5,p6,p7,p8) #else # include # include # include # include # include # include # define BOOST_MPL_PP_AUX_EXT_PARAM_FUNC(unused, i, op) \ BOOST_PP_COMMA_IF(i) \ BOOST_PP_CAT( \ BOOST_PP_TUPLE_ELEM(2,1,op) \ , BOOST_PP_ADD_D(1, i, BOOST_PP_TUPLE_ELEM(2,0,op)) \ ) \ /**/ # define BOOST_MPL_PP_EXT_PARAMS(i, j, param) \ BOOST_PP_REPEAT( \ BOOST_PP_SUB_D(1,j,i) \ , BOOST_MPL_PP_AUX_EXT_PARAM_FUNC \ , (i,param) \ ) \ /**/ #endif #endif // BOOST_MPL_AUX_PREPROCESSOR_EXT_PARAMS_HPP_INCLUDED ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessor/filter_params.hpp ================================================ #ifndef BOOST_MPL_AUX_PREPROCESSOR_FILTER_PARAMS_HPP_INCLUDED #define BOOST_MPL_AUX_PREPROCESSOR_FILTER_PARAMS_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ #define BOOST_MPL_PP_FILTER_PARAMS_0(p1,p2,p3,p4,p5,p6,p7,p8,p9) #define BOOST_MPL_PP_FILTER_PARAMS_1(p1,p2,p3,p4,p5,p6,p7,p8,p9) p1 #define BOOST_MPL_PP_FILTER_PARAMS_2(p1,p2,p3,p4,p5,p6,p7,p8,p9) p1,p2 #define BOOST_MPL_PP_FILTER_PARAMS_3(p1,p2,p3,p4,p5,p6,p7,p8,p9) p1,p2,p3 #define BOOST_MPL_PP_FILTER_PARAMS_4(p1,p2,p3,p4,p5,p6,p7,p8,p9) p1,p2,p3,p4 #define BOOST_MPL_PP_FILTER_PARAMS_5(p1,p2,p3,p4,p5,p6,p7,p8,p9) p1,p2,p3,p4,p5 #define BOOST_MPL_PP_FILTER_PARAMS_6(p1,p2,p3,p4,p5,p6,p7,p8,p9) p1,p2,p3,p4,p5,p6 #define BOOST_MPL_PP_FILTER_PARAMS_7(p1,p2,p3,p4,p5,p6,p7,p8,p9) p1,p2,p3,p4,p5,p6,p7 #define BOOST_MPL_PP_FILTER_PARAMS_8(p1,p2,p3,p4,p5,p6,p7,p8,p9) p1,p2,p3,p4,p5,p6,p7,p8 #define BOOST_MPL_PP_FILTER_PARAMS_9(p1,p2,p3,p4,p5,p6,p7,p8,p9) p1,p2,p3,p4,p5,p6,p7,p8,p9 #endif // BOOST_MPL_AUX_PREPROCESSOR_FILTER_PARAMS_HPP_INCLUDED ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessor/params.hpp ================================================ #ifndef BOOST_MPL_AUX_PREPROCESSOR_PARAMS_HPP_INCLUDED #define BOOST_MPL_AUX_PREPROCESSOR_PARAMS_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ #include // BOOST_MPL_PP_PARAMS(0,T): // BOOST_MPL_PP_PARAMS(1,T): T1 // BOOST_MPL_PP_PARAMS(2,T): T1, T2 // BOOST_MPL_PP_PARAMS(n,T): T1, T2, .., Tn #if !defined(BOOST_MPL_CFG_NO_OWN_PP_PRIMITIVES) # include # define BOOST_MPL_PP_PARAMS(n,p) \ BOOST_PP_CAT(BOOST_MPL_PP_PARAMS_,n)(p) \ /**/ # define BOOST_MPL_PP_PARAMS_0(p) # define BOOST_MPL_PP_PARAMS_1(p) p##1 # define BOOST_MPL_PP_PARAMS_2(p) p##1,p##2 # define BOOST_MPL_PP_PARAMS_3(p) p##1,p##2,p##3 # define BOOST_MPL_PP_PARAMS_4(p) p##1,p##2,p##3,p##4 # define BOOST_MPL_PP_PARAMS_5(p) p##1,p##2,p##3,p##4,p##5 # define BOOST_MPL_PP_PARAMS_6(p) p##1,p##2,p##3,p##4,p##5,p##6 # define BOOST_MPL_PP_PARAMS_7(p) p##1,p##2,p##3,p##4,p##5,p##6,p##7 # define BOOST_MPL_PP_PARAMS_8(p) p##1,p##2,p##3,p##4,p##5,p##6,p##7,p##8 # define BOOST_MPL_PP_PARAMS_9(p) p##1,p##2,p##3,p##4,p##5,p##6,p##7,p##8,p##9 #else # include # include # include # include # define BOOST_MPL_PP_AUX_PARAM_FUNC(unused, i, param) \ BOOST_PP_COMMA_IF(i) \ BOOST_PP_CAT(param, BOOST_PP_INC(i)) \ /**/ # define BOOST_MPL_PP_PARAMS(n, param) \ BOOST_PP_REPEAT( \ n \ , BOOST_MPL_PP_AUX_PARAM_FUNC \ , param \ ) \ /**/ #endif #endif // BOOST_MPL_AUX_PREPROCESSOR_PARAMS_HPP_INCLUDED ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessor/partial_spec_params.hpp ================================================ #ifndef BOOST_MPL_AUX_PREPROCESSOR_PARTIAL_SPEC_PARAMS_HPP_INCLUDED #define BOOST_MPL_AUX_PREPROCESSOR_PARTIAL_SPEC_PARAMS_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ #include #include #include #include #include #define BOOST_MPL_PP_PARTIAL_SPEC_PARAMS(n, param, def) \ BOOST_MPL_PP_PARAMS(n, param) \ BOOST_PP_COMMA_IF(BOOST_MPL_PP_SUB(BOOST_MPL_LIMIT_METAFUNCTION_ARITY,n)) \ BOOST_MPL_PP_ENUM( \ BOOST_MPL_PP_SUB(BOOST_MPL_LIMIT_METAFUNCTION_ARITY,n) \ , def \ ) \ /**/ #endif // BOOST_MPL_AUX_PREPROCESSOR_PARTIAL_SPEC_PARAMS_HPP_INCLUDED ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessor/range.hpp ================================================ #ifndef BOOST_MPL_AUX_PREPROCESSOR_RANGE_HPP_INCLUDED #define BOOST_MPL_AUX_PREPROCESSOR_RANGE_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2002-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ #include #include #include #define BOOST_MPL_PP_RANGE_ITEM(z,n,_) (n) #define BOOST_MPL_PP_RANGE(first, length) \ BOOST_PP_SEQ_SUBSEQ( \ BOOST_PP_REPEAT(BOOST_PP_ADD(first,length), BOOST_MPL_PP_RANGE_ITEM, _), \ first, length \ ) \ /**/ #endif // BOOST_MPL_AUX_PREPROCESSOR_RANGE_HPP_INCLUDED ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessor/repeat.hpp ================================================ #ifndef BOOST_MPL_AUX_PREPROCESSOR_REPEAT_HPP_INCLUDED #define BOOST_MPL_AUX_PREPROCESSOR_REPEAT_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2002-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ #include #if !defined(BOOST_MPL_CFG_NO_OWN_PP_PRIMITIVES) # include # define BOOST_MPL_PP_REPEAT(n,f,param) \ BOOST_PP_CAT(BOOST_MPL_PP_REPEAT_,n)(f,param) \ /**/ # define BOOST_MPL_PP_REPEAT_0(f,p) # define BOOST_MPL_PP_REPEAT_1(f,p) f(0,0,p) # define BOOST_MPL_PP_REPEAT_2(f,p) f(0,0,p) f(0,1,p) # define BOOST_MPL_PP_REPEAT_3(f,p) f(0,0,p) f(0,1,p) f(0,2,p) # define BOOST_MPL_PP_REPEAT_4(f,p) f(0,0,p) f(0,1,p) f(0,2,p) f(0,3,p) # define BOOST_MPL_PP_REPEAT_5(f,p) f(0,0,p) f(0,1,p) f(0,2,p) f(0,3,p) f(0,4,p) # define BOOST_MPL_PP_REPEAT_6(f,p) f(0,0,p) f(0,1,p) f(0,2,p) f(0,3,p) f(0,4,p) f(0,5,p) # define BOOST_MPL_PP_REPEAT_7(f,p) f(0,0,p) f(0,1,p) f(0,2,p) f(0,3,p) f(0,4,p) f(0,5,p) f(0,6,p) # define BOOST_MPL_PP_REPEAT_8(f,p) f(0,0,p) f(0,1,p) f(0,2,p) f(0,3,p) f(0,4,p) f(0,5,p) f(0,6,p) f(0,7,p) # define BOOST_MPL_PP_REPEAT_9(f,p) f(0,0,p) f(0,1,p) f(0,2,p) f(0,3,p) f(0,4,p) f(0,5,p) f(0,6,p) f(0,7,p) f(0,8,p) # define BOOST_MPL_PP_REPEAT_10(f,p) f(0,0,p) f(0,1,p) f(0,2,p) f(0,3,p) f(0,4,p) f(0,5,p) f(0,6,p) f(0,7,p) f(0,8,p) f(0,9,p) #else # include # define BOOST_MPL_PP_REPEAT(n,f,param) \ BOOST_PP_REPEAT(n,f,param) \ /**/ #endif #define BOOST_MPL_PP_REPEAT_IDENTITY_FUNC(unused1, unused2, x) x #endif // BOOST_MPL_AUX_PREPROCESSOR_REPEAT_HPP_INCLUDED ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessor/sub.hpp ================================================ #ifndef BOOST_MPL_AUX_PREPROCESSOR_SUB_HPP_INCLUDED #define BOOST_MPL_AUX_PREPROCESSOR_SUB_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2002-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ #include #if !defined(BOOST_MPL_CFG_NO_OWN_PP_PRIMITIVES) # include #if defined(BOOST_MPL_CFG_BROKEN_PP_MACRO_EXPANSION) # include # define BOOST_MPL_PP_SUB(i,j) \ BOOST_MPL_PP_SUB_DELAY(i,j) \ /**/ # define BOOST_MPL_PP_SUB_DELAY(i,j) \ BOOST_PP_CAT(BOOST_MPL_PP_TUPLE_11_ELEM_##i,BOOST_MPL_PP_SUB_##j) \ /**/ #else # define BOOST_MPL_PP_SUB(i,j) \ BOOST_MPL_PP_SUB_DELAY(i,j) \ /**/ # define BOOST_MPL_PP_SUB_DELAY(i,j) \ BOOST_MPL_PP_TUPLE_11_ELEM_##i BOOST_MPL_PP_SUB_##j \ /**/ #endif # define BOOST_MPL_PP_SUB_0 (0,1,2,3,4,5,6,7,8,9,10) # define BOOST_MPL_PP_SUB_1 (0,0,1,2,3,4,5,6,7,8,9) # define BOOST_MPL_PP_SUB_2 (0,0,0,1,2,3,4,5,6,7,8) # define BOOST_MPL_PP_SUB_3 (0,0,0,0,1,2,3,4,5,6,7) # define BOOST_MPL_PP_SUB_4 (0,0,0,0,0,1,2,3,4,5,6) # define BOOST_MPL_PP_SUB_5 (0,0,0,0,0,0,1,2,3,4,5) # define BOOST_MPL_PP_SUB_6 (0,0,0,0,0,0,0,1,2,3,4) # define BOOST_MPL_PP_SUB_7 (0,0,0,0,0,0,0,0,1,2,3) # define BOOST_MPL_PP_SUB_8 (0,0,0,0,0,0,0,0,0,1,2) # define BOOST_MPL_PP_SUB_9 (0,0,0,0,0,0,0,0,0,0,1) # define BOOST_MPL_PP_SUB_10 (0,0,0,0,0,0,0,0,0,0,0) #else # include # define BOOST_MPL_PP_SUB(i,j) \ BOOST_PP_SUB(i,j) \ /**/ #endif #endif // BOOST_MPL_AUX_PREPROCESSOR_SUB_HPP_INCLUDED ================================================ FILE: benchmarks/boost/mpl/aux_/preprocessor/tuple.hpp ================================================ #ifndef BOOST_MPL_AUX_PREPROCESSOR_TUPLE_HPP_INCLUDED #define BOOST_MPL_AUX_PREPROCESSOR_TUPLE_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2002-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ #define BOOST_MPL_PP_TUPLE_11_ELEM_0(e0,e1,e2,e3,e4,e5,e6,e7,e8,e9,e10) e0 #define BOOST_MPL_PP_TUPLE_11_ELEM_1(e0,e1,e2,e3,e4,e5,e6,e7,e8,e9,e10) e1 #define BOOST_MPL_PP_TUPLE_11_ELEM_2(e0,e1,e2,e3,e4,e5,e6,e7,e8,e9,e10) e2 #define BOOST_MPL_PP_TUPLE_11_ELEM_3(e0,e1,e2,e3,e4,e5,e6,e7,e8,e9,e10) e3 #define BOOST_MPL_PP_TUPLE_11_ELEM_4(e0,e1,e2,e3,e4,e5,e6,e7,e8,e9,e10) e4 #define BOOST_MPL_PP_TUPLE_11_ELEM_5(e0,e1,e2,e3,e4,e5,e6,e7,e8,e9,e10) e5 #define BOOST_MPL_PP_TUPLE_11_ELEM_6(e0,e1,e2,e3,e4,e5,e6,e7,e8,e9,e10) e6 #define BOOST_MPL_PP_TUPLE_11_ELEM_7(e0,e1,e2,e3,e4,e5,e6,e7,e8,e9,e10) e7 #define BOOST_MPL_PP_TUPLE_11_ELEM_8(e0,e1,e2,e3,e4,e5,e6,e7,e8,e9,e10) e8 #define BOOST_MPL_PP_TUPLE_11_ELEM_9(e0,e1,e2,e3,e4,e5,e6,e7,e8,e9,e10) e9 #define BOOST_MPL_PP_TUPLE_11_ELEM_10(e0,e1,e2,e3,e4,e5,e6,e7,e8,e9,e10) e10 #endif // BOOST_MPL_AUX_PREPROCESSOR_TUPLE_HPP_INCLUDED ================================================ FILE: benchmarks/boost/mpl/aux_/ptr_to_ref.hpp ================================================ #ifndef BOOST_MPL_AUX_PTR_TO_REF_HPP_INCLUDED #define BOOST_MPL_AUX_PTR_TO_REF_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2003-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ #include #include #include #if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1400)) \ || ( BOOST_WORKAROUND(__EDG_VERSION__, <= 245) \ && !(defined(__STD_STRICT_ANSI) \ || defined(__STD_STRICT_ANSI_ERRORS)) ) # define BOOST_MPL_AUX_PTR_TO_REF(X) \ *BOOST_MPL_AUX_STATIC_CAST(X*, 0) \ /**/ #else # define BOOST_MPL_AUX_PTR_TO_REF(X) \ aux::ptr_to_ref(BOOST_MPL_AUX_STATIC_CAST(X*, 0)) \ /**/ #endif namespace boost { namespace mpl { namespace aux { template< typename T > static T const& ptr_to_ref(T*); }}} #endif // BOOST_MPL_AUX_PTR_TO_REF_HPP_INCLUDED ================================================ FILE: benchmarks/boost/mpl/aux_/push_front_impl.hpp ================================================ #ifndef BOOST_MPL_AUX_PUSH_FRONT_IMPL_HPP_INCLUDED #define BOOST_MPL_AUX_PUSH_FRONT_IMPL_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2008 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ #include #include #include #include #include #include #include namespace boost { namespace mpl { struct has_push_front_arg {}; // agurt 05/feb/04: no default implementation; the stub definition is needed // to enable the default 'has_push_front' implementation below template< typename Tag > struct push_front_impl { template< typename Sequence, typename T > struct apply { // should be instantiated only in the context of 'has_push_front_impl'; // if you've got an assert here, you are requesting a 'push_front' // specialization that doesn't exist. BOOST_MPL_ASSERT_MSG( ( boost::is_same< T, has_push_front_arg >::value ) , REQUESTED_PUSH_FRONT_SPECIALIZATION_FOR_SEQUENCE_DOES_NOT_EXIST , ( Sequence ) ); }; }; template< typename Tag > struct has_push_front_impl { template< typename Seq > struct apply #if !defined(BOOST_MPL_CFG_NO_NESTED_FORWARDING) : aux::has_type< push_front< Seq, has_push_front_arg > > { #else { typedef aux::has_type< push_front< Seq, has_push_front_arg > > type; BOOST_STATIC_CONSTANT(bool, value = (aux::has_type< push_front< Seq, has_push_front_arg > >::value) ); #endif }; }; BOOST_MPL_ALGORITM_TRAITS_LAMBDA_SPEC(2, push_front_impl) BOOST_MPL_ALGORITM_TRAITS_LAMBDA_SPEC(1, has_push_front_impl) }} #endif // BOOST_MPL_AUX_PUSH_FRONT_IMPL_HPP_INCLUDED ================================================ FILE: benchmarks/boost/mpl/aux_/reverse_fold_impl.hpp ================================================ #ifndef BOOST_MPL_AUX_REVERSE_FOLD_IMPL_HPP_INCLUDED #define BOOST_MPL_AUX_REVERSE_FOLD_IMPL_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ #if !defined(BOOST_MPL_PREPROCESSING_MODE) # include # include # include # include # if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \ || defined(BOOST_MPL_CFG_NO_NONTYPE_TEMPLATE_PARTIAL_SPEC) # include # include # endif #endif #include #if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ && !defined(BOOST_MPL_PREPROCESSING_MODE) # define BOOST_MPL_PREPROCESSED_HEADER reverse_fold_impl.hpp # include #else # define AUX778076_FOLD_IMPL_OP(iter) typename deref::type # define AUX778076_FOLD_IMPL_NAME_PREFIX reverse_fold # include #endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS #endif // BOOST_MPL_AUX_REVERSE_FOLD_IMPL_HPP_INCLUDED ================================================ FILE: benchmarks/boost/mpl/aux_/reverse_fold_impl_body.hpp ================================================ // NO INCLUDE GUARDS, THE HEADER IS INTENDED FOR MULTIPLE INCLUSION! #if !defined(BOOST_PP_IS_ITERATING) // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ # include # include # include # include # include # include # include # include # include // local macros, #undef-ined at the end of the header # define AUX778076_ITER_FOLD_FORWARD_STEP(unused, n_, unused2) \ typedef typename apply2< \ ForwardOp \ , BOOST_PP_CAT(fwd_state,n_) \ , AUX778076_FOLD_IMPL_OP(BOOST_PP_CAT(iter,n_)) \ >::type BOOST_PP_CAT(fwd_state,BOOST_PP_INC(n_)); \ typedef typename mpl::next::type \ BOOST_PP_CAT(iter,BOOST_PP_INC(n_)); \ /**/ # define AUX778076_ITER_FOLD_BACKWARD_STEP_FUNC(n_) \ typedef typename apply2< \ BackwardOp \ , BOOST_PP_CAT(bkwd_state,n_) \ , AUX778076_FOLD_IMPL_OP(BOOST_PP_CAT(iter,BOOST_PP_DEC(n_))) \ >::type BOOST_PP_CAT(bkwd_state,BOOST_PP_DEC(n_)); \ /**/ # define AUX778076_ITER_FOLD_BACKWARD_STEP(unused, n_, j) \ AUX778076_ITER_FOLD_BACKWARD_STEP_FUNC( \ BOOST_PP_SUB_D(1,j,n_) \ ) \ /**/ # define AUX778076_FIRST_BACKWARD_STATE_TYPEDEF(n_) \ typedef typename nested_chunk::state BOOST_PP_CAT(bkwd_state,n_); /**/ # define AUX778076_FOLD_IMPL_NAME \ BOOST_PP_CAT(AUX778076_FOLD_IMPL_NAME_PREFIX,_impl) \ /**/ # define AUX778076_FOLD_CHUNK_NAME \ BOOST_PP_CAT(AUX778076_FOLD_IMPL_NAME_PREFIX,_chunk) \ /**/ namespace boost { namespace mpl { namespace aux { /// forward declaration template< BOOST_MPL_AUX_NTTP_DECL(long, N) , typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct AUX778076_FOLD_IMPL_NAME; #if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \ && !defined(BOOST_MPL_CFG_NO_NONTYPE_TEMPLATE_PARTIAL_SPEC) # define BOOST_PP_ITERATION_PARAMS_1 \ (3,(0, BOOST_MPL_LIMIT_UNROLLING, )) # include BOOST_PP_ITERATE() // implementation for N that exceeds BOOST_MPL_LIMIT_UNROLLING template< BOOST_MPL_AUX_NTTP_DECL(long, N) , typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct AUX778076_FOLD_IMPL_NAME { typedef First iter0; typedef State fwd_state0; BOOST_MPL_PP_REPEAT( BOOST_MPL_LIMIT_UNROLLING , AUX778076_ITER_FOLD_FORWARD_STEP , unused ) typedef AUX778076_FOLD_IMPL_NAME< ( (N - BOOST_MPL_LIMIT_UNROLLING) < 0 ? 0 : N - BOOST_MPL_LIMIT_UNROLLING ) , BOOST_PP_CAT(iter,BOOST_MPL_LIMIT_UNROLLING) , Last , BOOST_PP_CAT(fwd_state,BOOST_MPL_LIMIT_UNROLLING) , BackwardOp , ForwardOp > nested_chunk; AUX778076_FIRST_BACKWARD_STATE_TYPEDEF(BOOST_MPL_LIMIT_UNROLLING) BOOST_MPL_PP_REPEAT( BOOST_MPL_LIMIT_UNROLLING , AUX778076_ITER_FOLD_BACKWARD_STEP , BOOST_MPL_LIMIT_UNROLLING ) typedef bkwd_state0 state; typedef typename nested_chunk::iterator iterator; }; // fallback implementation for sequences of unknown size template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct AUX778076_FOLD_IMPL_NAME<-1,First,Last,State,BackwardOp,ForwardOp> { typedef AUX778076_FOLD_IMPL_NAME< -1 , typename mpl::next::type , Last , typename apply2::type , BackwardOp , ForwardOp > nested_step; typedef typename apply2< BackwardOp , typename nested_step::state , AUX778076_FOLD_IMPL_OP(First) >::type state; typedef typename nested_step::iterator iterator; }; template< typename Last , typename State , typename BackwardOp , typename ForwardOp > struct AUX778076_FOLD_IMPL_NAME<-1,Last,Last,State,BackwardOp,ForwardOp> { typedef State state; typedef Last iterator; }; #else // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION template< BOOST_MPL_AUX_NTTP_DECL(long, N) > struct AUX778076_FOLD_CHUNK_NAME; # define BOOST_PP_ITERATION_PARAMS_1 \ (3,(0, BOOST_MPL_LIMIT_UNROLLING, )) # include BOOST_PP_ITERATE() // implementation for N that exceeds BOOST_MPL_LIMIT_UNROLLING template< BOOST_MPL_AUX_NTTP_DECL(long, N) > struct AUX778076_FOLD_CHUNK_NAME { template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct result_ { typedef First iter0; typedef State fwd_state0; BOOST_MPL_PP_REPEAT( BOOST_MPL_LIMIT_UNROLLING , AUX778076_ITER_FOLD_FORWARD_STEP , unused ) typedef AUX778076_FOLD_IMPL_NAME< ( (N - BOOST_MPL_LIMIT_UNROLLING) < 0 ? 0 : N - BOOST_MPL_LIMIT_UNROLLING ) , BOOST_PP_CAT(iter,BOOST_MPL_LIMIT_UNROLLING) , Last , BOOST_PP_CAT(fwd_state,BOOST_MPL_LIMIT_UNROLLING) , BackwardOp , ForwardOp > nested_chunk; AUX778076_FIRST_BACKWARD_STATE_TYPEDEF(BOOST_MPL_LIMIT_UNROLLING) BOOST_MPL_PP_REPEAT( BOOST_MPL_LIMIT_UNROLLING , AUX778076_ITER_FOLD_BACKWARD_STEP , BOOST_MPL_LIMIT_UNROLLING ) typedef bkwd_state0 state; typedef typename nested_chunk::iterator iterator; }; }; // fallback implementation for sequences of unknown size template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct BOOST_PP_CAT(AUX778076_FOLD_IMPL_NAME_PREFIX,_step); template< typename Last , typename State > struct BOOST_PP_CAT(AUX778076_FOLD_IMPL_NAME_PREFIX,_null_step) { typedef Last iterator; typedef State state; }; template<> struct AUX778076_FOLD_CHUNK_NAME<-1> { template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct result_ { typedef typename if_< typename is_same::type , BOOST_PP_CAT(AUX778076_FOLD_IMPL_NAME_PREFIX,_null_step) , BOOST_PP_CAT(AUX778076_FOLD_IMPL_NAME_PREFIX,_step) >::type res_; typedef typename res_::state state; typedef typename res_::iterator iterator; }; #if defined(BOOST_MPL_CFG_MSVC_60_ETI_BUG) /// ETI workaround template<> struct result_ { typedef int state; typedef int iterator; }; #endif }; template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct BOOST_PP_CAT(AUX778076_FOLD_IMPL_NAME_PREFIX,_step) { typedef AUX778076_FOLD_CHUNK_NAME<-1>::template result_< typename mpl::next::type , Last , typename apply2::type , BackwardOp , ForwardOp > nested_step; typedef typename apply2< BackwardOp , typename nested_step::state , AUX778076_FOLD_IMPL_OP(First) >::type state; typedef typename nested_step::iterator iterator; }; template< BOOST_MPL_AUX_NTTP_DECL(long, N) , typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct AUX778076_FOLD_IMPL_NAME : AUX778076_FOLD_CHUNK_NAME ::template result_ { }; #endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION }}} # undef AUX778076_FIRST_BACKWARD_STATE_TYPEDEF # undef AUX778076_ITER_FOLD_BACKWARD_STEP # undef AUX778076_ITER_FOLD_BACKWARD_STEP_FUNC # undef AUX778076_ITER_FOLD_FORWARD_STEP #undef AUX778076_FOLD_IMPL_OP #undef AUX778076_FOLD_IMPL_NAME_PREFIX ///// iteration #else # define n_ BOOST_PP_FRAME_ITERATION(1) #if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \ && !defined(BOOST_MPL_CFG_NO_NONTYPE_TEMPLATE_PARTIAL_SPEC) template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct AUX778076_FOLD_IMPL_NAME { typedef First iter0; typedef State fwd_state0; BOOST_MPL_PP_REPEAT( n_ , AUX778076_ITER_FOLD_FORWARD_STEP , unused ) typedef BOOST_PP_CAT(fwd_state,n_) BOOST_PP_CAT(bkwd_state,n_); BOOST_MPL_PP_REPEAT( n_ , AUX778076_ITER_FOLD_BACKWARD_STEP , n_ ) typedef bkwd_state0 state; typedef BOOST_PP_CAT(iter,n_) iterator; }; #else template<> struct AUX778076_FOLD_CHUNK_NAME { template< typename First , typename Last , typename State , typename BackwardOp , typename ForwardOp > struct result_ { typedef First iter0; typedef State fwd_state0; BOOST_MPL_PP_REPEAT( n_ , AUX778076_ITER_FOLD_FORWARD_STEP , unused ) typedef BOOST_PP_CAT(fwd_state,n_) BOOST_PP_CAT(bkwd_state,n_); BOOST_MPL_PP_REPEAT( n_ , AUX778076_ITER_FOLD_BACKWARD_STEP , n_ ) typedef bkwd_state0 state; typedef BOOST_PP_CAT(iter,n_) iterator; }; #if defined(BOOST_MPL_CFG_MSVC_60_ETI_BUG) /// ETI workaround template<> struct result_ { typedef int state; typedef int iterator; }; #endif }; #endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION # undef n_ #endif // BOOST_PP_IS_ITERATING ================================================ FILE: benchmarks/boost/mpl/aux_/sequence_wrapper.hpp ================================================ // NO INCLUDE GUARDS, THE HEADER IS INTENDED FOR MULTIPLE INCLUSION #if !defined(BOOST_PP_IS_ITERATING) ///// header body // Copyright Aleksey Gurtovoy 2000-2008 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ # include # include # include # include # include # include # include # include # include # include # include #if defined(BOOST_MPL_PREPROCESSING_MODE) # undef LONG_MAX #endif namespace boost { namespace mpl { #if !defined(AUX778076_SEQUENCE_BASE_NAME) # define AUX778076_SEQUENCE_BASE_NAME AUX778076_SEQUENCE_NAME #endif #if !defined(AUX778076_SEQUENCE_INTEGRAL_WRAPPER) # define AUX778076_SEQUENCE_PARAM_NAME T # define AUX778076_SEQUENCE_TEMPLATE_PARAM typename T # define AUX778076_SEQUENCE_DEFAULT na # define AUX778076_SEQUENCE_NAME_N(n) \ BOOST_PP_CAT(AUX778076_SEQUENCE_BASE_NAME,n) \ /**/ # define AUX778076_SEQUENCE_PARAMS() \ BOOST_PP_ENUM_PARAMS( \ AUX778076_SEQUENCE_LIMIT \ , AUX778076_SEQUENCE_TEMPLATE_PARAM \ ) \ /**/ # define AUX778076_SEQUENCE_ARGS() \ BOOST_PP_ENUM_PARAMS( \ AUX778076_SEQUENCE_LIMIT \ , T \ ) \ /**/ # define AUX778076_SEQUENCE_DEFAULT_PARAMS() \ BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT( \ AUX778076_SEQUENCE_LIMIT \ , AUX778076_SEQUENCE_TEMPLATE_PARAM \ , AUX778076_SEQUENCE_DEFAULT \ ) \ /**/ # define AUX778076_SEQUENCE_N_PARAMS(n) \ BOOST_PP_ENUM_PARAMS(n, AUX778076_SEQUENCE_TEMPLATE_PARAM) \ /**/ # define AUX778076_SEQUENCE_N_ARGS(n) \ BOOST_PP_ENUM_PARAMS(n, T) \ /**/ # define AUX778076_SEQUENCE_N_PARTIAL_SPEC_ARGS(n) \ BOOST_PP_ENUM_PARAMS(n, T) \ BOOST_PP_COMMA_IF(n) \ BOOST_PP_ENUM( \ BOOST_PP_SUB_D(1,AUX778076_SEQUENCE_LIMIT,n) \ , BOOST_PP_TUPLE_ELEM_3_2 \ , AUX778076_SEQUENCE_DEFAULT \ ) \ /**/ #else // AUX778076_SEQUENCE_INTEGRAL_WRAPPER # define AUX778076_SEQUENCE_PARAM_NAME C # define AUX778076_SEQUENCE_TEMPLATE_PARAM BOOST_MPL_AUX_NTTP_DECL(long, C) # define AUX778076_SEQUENCE_DEFAULT LONG_MAX # define AUX778076_SEQUENCE_PARAMS() \ typename T, BOOST_PP_ENUM_PARAMS( \ AUX778076_SEQUENCE_LIMIT \ , AUX778076_SEQUENCE_TEMPLATE_PARAM \ ) \ /**/ # define AUX778076_SEQUENCE_ARGS() \ T, BOOST_PP_ENUM_PARAMS( \ AUX778076_SEQUENCE_LIMIT \ , C \ ) \ /**/ # define AUX778076_SEQUENCE_DEFAULT_PARAMS() \ typename T, \ BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT( \ AUX778076_SEQUENCE_LIMIT \ , AUX778076_SEQUENCE_TEMPLATE_PARAM \ , AUX778076_SEQUENCE_DEFAULT \ ) \ /**/ # define AUX778076_SEQUENCE_N_PARAMS(n) \ typename T BOOST_PP_COMMA_IF(n) \ BOOST_PP_ENUM_PARAMS(n, AUX778076_SEQUENCE_TEMPLATE_PARAM) \ /**/ # if !defined(AUX778076_SEQUENCE_CONVERT_CN_TO) # define AUX778076_SEQUENCE_CONVERT_CN_TO(z,n,TARGET) BOOST_PP_CAT(C,n) # endif # define AUX778076_SEQUENCE_N_ARGS(n) \ T BOOST_PP_COMMA_IF(n) \ BOOST_PP_ENUM(n,AUX778076_SEQUENCE_CONVERT_CN_TO,T) \ /**/ # define AUX778076_SEQUENCE_N_PARTIAL_SPEC_ARGS(n) \ T, BOOST_PP_ENUM_PARAMS(n, C) \ BOOST_PP_COMMA_IF(n) \ BOOST_PP_ENUM( \ BOOST_PP_SUB_D(1,AUX778076_SEQUENCE_LIMIT,n) \ , BOOST_PP_TUPLE_ELEM_3_2 \ , AUX778076_SEQUENCE_DEFAULT \ ) \ /**/ #endif // AUX778076_SEQUENCE_INTEGRAL_WRAPPER #if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) // forward declaration template< AUX778076_SEQUENCE_DEFAULT_PARAMS() > struct AUX778076_SEQUENCE_NAME; #else namespace aux { template< BOOST_MPL_AUX_NTTP_DECL(int, N) > struct BOOST_PP_CAT(AUX778076_SEQUENCE_NAME,_chooser); } #endif #define BOOST_PP_ITERATION_PARAMS_1 \ (3,(0, AUX778076_SEQUENCE_LIMIT, )) #include BOOST_PP_ITERATE() // real C++ version is already taken care of #if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) namespace aux { // ???_count_args #define AUX778076_COUNT_ARGS_PREFIX AUX778076_SEQUENCE_NAME #define AUX778076_COUNT_ARGS_DEFAULT AUX778076_SEQUENCE_DEFAULT #define AUX778076_COUNT_ARGS_PARAM_NAME AUX778076_SEQUENCE_PARAM_NAME #define AUX778076_COUNT_ARGS_TEMPLATE_PARAM AUX778076_SEQUENCE_TEMPLATE_PARAM #define AUX778076_COUNT_ARGS_ARITY AUX778076_SEQUENCE_LIMIT #define AUX778076_COUNT_ARGS_USE_STANDARD_PP_PRIMITIVES #include template< AUX778076_SEQUENCE_PARAMS() > struct BOOST_PP_CAT(AUX778076_SEQUENCE_NAME,_impl) { typedef aux::BOOST_PP_CAT(AUX778076_SEQUENCE_NAME,_count_args)< BOOST_PP_ENUM_PARAMS(AUX778076_SEQUENCE_LIMIT, AUX778076_SEQUENCE_PARAM_NAME) > arg_num_; typedef typename aux::BOOST_PP_CAT(AUX778076_SEQUENCE_NAME,_chooser)< arg_num_::value > ::template result_< AUX778076_SEQUENCE_ARGS() >::type type; }; } // namespace aux template< AUX778076_SEQUENCE_DEFAULT_PARAMS() > struct AUX778076_SEQUENCE_NAME : aux::BOOST_PP_CAT(AUX778076_SEQUENCE_NAME,_impl)< AUX778076_SEQUENCE_ARGS() >::type { typedef typename aux::BOOST_PP_CAT(AUX778076_SEQUENCE_NAME,_impl)< AUX778076_SEQUENCE_ARGS() >::type type; }; #endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION # undef AUX778076_SEQUENCE_N_PARTIAL_SPEC_ARGS # undef AUX778076_SEQUENCE_N_ARGS # undef AUX778076_SEQUENCE_CONVERT_CN_TO # undef AUX778076_SEQUENCE_N_PARAMS # undef AUX778076_SEQUENCE_DEFAULT_PARAMS # undef AUX778076_SEQUENCE_ARGS # undef AUX778076_SEQUENCE_PARAMS # undef AUX778076_SEQUENCE_NAME_N # undef AUX778076_SEQUENCE_DEFAULT # undef AUX778076_SEQUENCE_TEMPLATE_PARAM # undef AUX778076_SEQUENCE_PARAM_NAME # undef AUX778076_SEQUENCE_LIMIT # undef AUX778076_SEQUENCE_BASE_NAME # undef AUX778076_SEQUENCE_NAME # undef AUX778076_SEQUENCE_INTEGRAL_WRAPPER }} ///// iteration #else #define i_ BOOST_PP_FRAME_ITERATION(1) # if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) #if i_ == AUX778076_SEQUENCE_LIMIT /// primary template (not a specialization!) template< AUX778076_SEQUENCE_N_PARAMS(i_) > struct AUX778076_SEQUENCE_NAME : AUX778076_SEQUENCE_NAME_N(i_)< AUX778076_SEQUENCE_N_ARGS(i_) > { typedef typename AUX778076_SEQUENCE_NAME_N(i_)< AUX778076_SEQUENCE_N_ARGS(i_) >::type type; }; #else template< AUX778076_SEQUENCE_N_PARAMS(i_) > struct AUX778076_SEQUENCE_NAME< AUX778076_SEQUENCE_N_PARTIAL_SPEC_ARGS(i_) > : AUX778076_SEQUENCE_NAME_N(i_)< AUX778076_SEQUENCE_N_ARGS(i_) > { #if i_ > 0 || defined(AUX778076_SEQUENCE_INTEGRAL_WRAPPER) typedef typename AUX778076_SEQUENCE_NAME_N(i_)< AUX778076_SEQUENCE_N_ARGS(i_) >::type type; #else typedef AUX778076_SEQUENCE_NAME_N(i_)< AUX778076_SEQUENCE_N_ARGS(i_) >::type type; #endif }; #endif // i_ == AUX778076_SEQUENCE_LIMIT # else namespace aux { template<> struct BOOST_PP_CAT(AUX778076_SEQUENCE_NAME,_chooser) { template< AUX778076_SEQUENCE_PARAMS() > struct result_ { #if i_ > 0 || defined(AUX778076_SEQUENCE_INTEGRAL_WRAPPER) typedef typename AUX778076_SEQUENCE_NAME_N(i_)< AUX778076_SEQUENCE_N_ARGS(i_) >::type type; #else typedef AUX778076_SEQUENCE_NAME_N(i_)< AUX778076_SEQUENCE_N_ARGS(i_) >::type type; #endif }; }; } // namespace aux # endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION #undef i_ #endif // BOOST_PP_IS_ITERATING ================================================ FILE: benchmarks/boost/mpl/aux_/static_cast.hpp ================================================ #ifndef BOOST_MPL_AUX_STATIC_CAST_HPP_INCLUDED #define BOOST_MPL_AUX_STATIC_CAST_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ #include #if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x561)) \ || BOOST_WORKAROUND(__GNUC__, < 3) \ || BOOST_WORKAROUND(__MWERKS__, <= 0x3001) # define BOOST_MPL_AUX_STATIC_CAST(T, expr) (T)(expr) #else # define BOOST_MPL_AUX_STATIC_CAST(T, expr) static_cast(expr) #endif #endif // BOOST_MPL_AUX_STATIC_CAST_HPP_INCLUDED ================================================ FILE: benchmarks/boost/mpl/aux_/template_arity.hpp ================================================ #if !defined(BOOST_PP_IS_ITERATING) ///// header body #ifndef BOOST_MPL_AUX_TEMPLATE_ARITY_HPP_INCLUDED #define BOOST_MPL_AUX_TEMPLATE_ARITY_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ #include #include #if !defined(BOOST_MPL_PREPROCESSING_MODE) # include # include # if !defined(BOOST_MPL_CFG_NO_FULL_LAMBDA_SUPPORT) # if defined(BOOST_MPL_CFG_EXTENDED_TEMPLATE_PARAMETERS_MATCHING) # include # endif # else # include # endif #endif #include #include #if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ && !defined(BOOST_MPL_PREPROCESSING_MODE) # define BOOST_MPL_PREPROCESSED_HEADER template_arity.hpp # include #else # if !defined(BOOST_MPL_CFG_NO_FULL_LAMBDA_SUPPORT) # if defined(BOOST_MPL_CFG_EXTENDED_TEMPLATE_PARAMETERS_MATCHING) # include # include # include # include # include # include # include # include # include # include # define AUX778076_ARITY BOOST_PP_INC(BOOST_MPL_LIMIT_METAFUNCTION_ARITY) namespace boost { namespace mpl { namespace aux { template< BOOST_MPL_AUX_NTTP_DECL(int, N) > struct arity_tag { typedef char (&type)[N + 1]; }; # define AUX778076_MAX_ARITY_OP(unused, state, i_) \ ( BOOST_PP_CAT(C,i_) > 0 ? BOOST_PP_CAT(C,i_) : state ) \ /**/ template< BOOST_MPL_PP_PARAMS(AUX778076_ARITY, BOOST_MPL_AUX_NTTP_DECL(int, C)) > struct max_arity { BOOST_STATIC_CONSTANT(int, value = BOOST_PP_SEQ_FOLD_LEFT( AUX778076_MAX_ARITY_OP , -1 , BOOST_MPL_PP_RANGE(1, AUX778076_ARITY) ) ); }; # undef AUX778076_MAX_ARITY_OP arity_tag<0>::type arity_helper(...); # define BOOST_PP_ITERATION_LIMITS (1, AUX778076_ARITY) # define BOOST_PP_FILENAME_1 # include BOOST_PP_ITERATE() template< typename F, BOOST_MPL_AUX_NTTP_DECL(int, N) > struct template_arity_impl { BOOST_STATIC_CONSTANT(int, value = sizeof(::boost::mpl::aux::arity_helper(type_wrapper(),arity_tag())) - 1 ); }; # define AUX778076_TEMPLATE_ARITY_IMPL_INVOCATION(unused, i_, F) \ BOOST_PP_COMMA_IF(i_) template_arity_impl::value \ /**/ template< typename F > struct template_arity { BOOST_STATIC_CONSTANT(int, value = ( max_arity< BOOST_MPL_PP_REPEAT( AUX778076_ARITY , AUX778076_TEMPLATE_ARITY_IMPL_INVOCATION , F ) >::value )); typedef mpl::int_ type; }; # undef AUX778076_TEMPLATE_ARITY_IMPL_INVOCATION # undef AUX778076_ARITY }}} # endif // BOOST_MPL_CFG_EXTENDED_TEMPLATE_PARAMETERS_MATCHING # else // BOOST_MPL_CFG_NO_FULL_LAMBDA_SUPPORT # include namespace boost { namespace mpl { namespace aux { template< bool > struct template_arity_impl { template< typename F > struct result_ : mpl::int_<-1> { }; }; template<> struct template_arity_impl { template< typename F > struct result_ : F::arity { }; }; template< typename F > struct template_arity : template_arity_impl< ::boost::mpl::aux::has_rebind::value > ::template result_ { }; #if defined(BOOST_MPL_CFG_MSVC_ETI_BUG) template<> struct template_arity : mpl::int_<-1> { }; #endif }}} # endif // BOOST_MPL_CFG_NO_FULL_LAMBDA_SUPPORT #endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS #endif // BOOST_MPL_AUX_TEMPLATE_ARITY_HPP_INCLUDED ///// iteration #else #define i_ BOOST_PP_FRAME_ITERATION(1) template< template< BOOST_MPL_PP_PARAMS(i_, typename P) > class F , BOOST_MPL_PP_PARAMS(i_, typename T) > typename arity_tag::type arity_helper(type_wrapper< F >, arity_tag); #undef i_ #endif // BOOST_PP_IS_ITERATING ================================================ FILE: benchmarks/boost/mpl/aux_/template_arity_fwd.hpp ================================================ #ifndef BOOST_MPL_AUX_TEMPLATE_ARITY_FWD_HPP_INCLUDED #define BOOST_MPL_AUX_TEMPLATE_ARITY_FWD_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ namespace boost { namespace mpl { namespace aux { template< typename F > struct template_arity; }}} #endif // BOOST_MPL_AUX_TEMPLATE_ARITY_FWD_HPP_INCLUDED ================================================ FILE: benchmarks/boost/mpl/aux_/traits_lambda_spec.hpp ================================================ #ifndef BOOST_MPL_AUX_TRAITS_LAMBDA_SPEC_HPP_INCLUDED #define BOOST_MPL_AUX_TRAITS_LAMBDA_SPEC_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2008 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ #include #include #include #include #if !defined(BOOST_MPL_CFG_NO_FULL_LAMBDA_SUPPORT) # define BOOST_MPL_ALGORITM_TRAITS_LAMBDA_SPEC_IMPL(i, trait) /**/ #elif !defined(BOOST_MPL_CFG_MSVC_ETI_BUG) # define BOOST_MPL_ALGORITM_TRAITS_LAMBDA_SPEC_IMPL(i, trait) \ template<> struct trait \ { \ template< BOOST_MPL_PP_PARAMS(i, typename T) > struct apply \ { \ }; \ }; \ /**/ #else # define BOOST_MPL_ALGORITM_TRAITS_LAMBDA_SPEC_IMPL(i, trait) \ template<> struct trait \ { \ template< BOOST_MPL_PP_PARAMS(i, typename T) > struct apply \ { \ }; \ }; \ template<> struct trait \ { \ template< BOOST_MPL_PP_PARAMS(i, typename T) > struct apply \ { \ typedef int type; \ }; \ }; \ /**/ #endif // BOOST_MPL_CFG_NO_FULL_LAMBDA_SUPPORT #define BOOST_MPL_ALGORITM_TRAITS_LAMBDA_SPEC(i, trait) \ BOOST_MPL_ALGORITM_TRAITS_LAMBDA_SPEC_IMPL(i, trait) \ template<> struct trait {}; \ /**/ #endif // BOOST_MPL_AUX_TRAITS_LAMBDA_SPEC_HPP_INCLUDED ================================================ FILE: benchmarks/boost/mpl/aux_/type_wrapper.hpp ================================================ #ifndef BOOST_MPL_AUX_TYPE_WRAPPER_HPP_INCLUDED #define BOOST_MPL_AUX_TYPE_WRAPPER_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // Copyright Peter Dimov 2000-2003 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ #include namespace boost { namespace mpl { namespace aux { template< typename T > struct type_wrapper { typedef T type; }; #if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) // agurt 08/may/03: a complicated way to extract the wrapped type; need it // mostly for the sake of GCC (3.2.x), which ICEs if you try to extract the // nested 'type' from 'type_wrapper' when the latter was the result of a // 'typeof' expression template< typename T > struct wrapped_type; template< typename T > struct wrapped_type< type_wrapper > { typedef T type; }; #else template< typename W > struct wrapped_type { typedef typename W::type type; }; #endif }}} #endif // BOOST_MPL_AUX_TYPE_WRAPPER_HPP_INCLUDED ================================================ FILE: benchmarks/boost/mpl/aux_/value_wknd.hpp ================================================ #ifndef BOOST_MPL_AUX_VALUE_WKND_HPP_INCLUDED #define BOOST_MPL_AUX_VALUE_WKND_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ #include #include #include #include #if defined(BOOST_MPL_CFG_BCC_INTEGRAL_CONSTANTS) \ || defined(BOOST_MPL_CFG_MSVC_60_ETI_BUG) # include namespace boost { namespace mpl { namespace aux { template< typename C_ > struct value_wknd : C_ { }; #if defined(BOOST_MPL_CFG_MSVC_60_ETI_BUG) template<> struct value_wknd : int_<1> { using int_<1>::value; }; #endif }}} #if !defined(BOOST_MPL_CFG_MSVC_60_ETI_BUG) # define BOOST_MPL_AUX_VALUE_WKND(C) \ ::BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::aux::value_wknd< C > \ /**/ # define BOOST_MPL_AUX_MSVC_VALUE_WKND(C) BOOST_MPL_AUX_VALUE_WKND(C) #else # define BOOST_MPL_AUX_VALUE_WKND(C) C # define BOOST_MPL_AUX_MSVC_VALUE_WKND(C) \ ::boost::mpl::aux::value_wknd< C > \ /**/ #endif #else // BOOST_MPL_CFG_BCC_INTEGRAL_CONSTANTS # define BOOST_MPL_AUX_VALUE_WKND(C) C # define BOOST_MPL_AUX_MSVC_VALUE_WKND(C) C #endif #if BOOST_WORKAROUND(__EDG_VERSION__, <= 238) # define BOOST_MPL_AUX_NESTED_VALUE_WKND(T, C) \ BOOST_MPL_AUX_STATIC_CAST(T, C::value) \ /**/ #else # define BOOST_MPL_AUX_NESTED_VALUE_WKND(T, C) \ BOOST_MPL_AUX_VALUE_WKND(C)::value \ /**/ #endif namespace boost { namespace mpl { namespace aux { template< typename T > struct value_type_wknd { typedef typename T::value_type type; }; #if defined(BOOST_MPL_CFG_MSVC_ETI_BUG) template<> struct value_type_wknd { typedef int type; }; #endif }}} #endif // BOOST_MPL_AUX_VALUE_WKND_HPP_INCLUDED ================================================ FILE: benchmarks/boost/mpl/aux_/yes_no.hpp ================================================ #ifndef BOOST_MPL_AUX_YES_NO_HPP_INCLUDED #define BOOST_MPL_AUX_YES_NO_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ #include #include #include #include namespace boost { namespace mpl { namespace aux { typedef char (&no_tag)[1]; typedef char (&yes_tag)[2]; template< bool C_ > struct yes_no_tag { typedef no_tag type; }; template<> struct yes_no_tag { typedef yes_tag type; }; template< BOOST_MPL_AUX_NTTP_DECL(long, n) > struct weighted_tag { #if !BOOST_WORKAROUND(BOOST_MSVC, < 1300) typedef char (&type)[n]; #else char buf[n]; typedef weighted_tag type; #endif }; #if defined(BOOST_MPL_CFG_NO_DEPENDENT_ARRAY_TYPES) template<> struct weighted_tag<0> { typedef char (&type)[1]; }; #endif }}} #endif // BOOST_MPL_AUX_YES_NO_HPP_INCLUDED ================================================ FILE: benchmarks/boost/mpl/base.hpp ================================================ #ifndef BOOST_MPL_BASE_HPP_INCLUDED #define BOOST_MPL_BASE_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ #include #include namespace boost { namespace mpl { template< typename BOOST_MPL_AUX_NA_PARAM(T) > struct base { typedef typename T::base type; BOOST_MPL_AUX_LAMBDA_SUPPORT(1,base,(T)) }; BOOST_MPL_AUX_NA_SPEC(1, base) }} #endif // BOOST_MPL_BASE_HPP_INCLUDED ================================================ FILE: benchmarks/boost/mpl/begin.hpp ================================================ #ifndef BOOST_MPL_BEGIN_HPP_INCLUDED #define BOOST_MPL_BEGIN_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ #include #endif // BOOST_MPL_BEGIN_HPP_INCLUDED ================================================ FILE: benchmarks/boost/mpl/begin_end.hpp ================================================ #ifndef BOOST_MPL_BEGIN_END_HPP_INCLUDED #define BOOST_MPL_BEGIN_END_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ #include #include #include #include #include namespace boost { namespace mpl { // agurt, 13/sep/02: switched from inheritance to typedef; MSVC is more // happy this way (less ETI-related errors), and it doesn't affect // anything else template< typename BOOST_MPL_AUX_NA_PARAM(Sequence) > struct begin { typedef typename sequence_tag::type tag_; typedef typename begin_impl< tag_ > ::template apply< Sequence >::type type; BOOST_MPL_AUX_LAMBDA_SUPPORT(1,begin,(Sequence)) }; template< typename BOOST_MPL_AUX_NA_PARAM(Sequence) > struct end { typedef typename sequence_tag::type tag_; typedef typename end_impl< tag_ > ::template apply< Sequence >::type type; BOOST_MPL_AUX_LAMBDA_SUPPORT(1,end,(Sequence)) }; BOOST_MPL_AUX_NA_SPEC(1, begin) BOOST_MPL_AUX_NA_SPEC(1, end) }} #endif // BOOST_MPL_BEGIN_END_HPP_INCLUDED ================================================ FILE: benchmarks/boost/mpl/begin_end_fwd.hpp ================================================ #ifndef BOOST_MPL_BEGIN_END_FWD_HPP_INCLUDED #define BOOST_MPL_BEGIN_END_FWD_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ namespace boost { namespace mpl { template< typename Tag > struct begin_impl; template< typename Tag > struct end_impl; template< typename Sequence > struct begin; template< typename Sequence > struct end; }} #endif // BOOST_MPL_BEGIN_END_FWD_HPP_INCLUDED ================================================ FILE: benchmarks/boost/mpl/bind.hpp ================================================ #if !defined(BOOST_PP_IS_ITERATING) ///// header body #ifndef BOOST_MPL_BIND_HPP_INCLUDED #define BOOST_MPL_BIND_HPP_INCLUDED // Copyright Peter Dimov 2001 // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ #if !defined(BOOST_MPL_PREPROCESSING_MODE) # include # include # include # include # include # include # include # include # include # include # if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) # include # endif #endif #include #include #include #if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ && !defined(BOOST_MPL_PREPROCESSING_MODE) # if defined(BOOST_MPL_CFG_NO_UNNAMED_PLACEHOLDER_SUPPORT) # define BOOST_MPL_PREPROCESSED_HEADER basic_bind.hpp # else # define BOOST_MPL_PREPROCESSED_HEADER bind.hpp # endif # include #else # include # include # include # include # include # include # include # include # include # include # include # include # include # include # include # include # include namespace boost { namespace mpl { // local macros, #undef-ined at the end of the header # define AUX778076_APPLY \ BOOST_PP_CAT(apply_wrap,BOOST_MPL_LIMIT_METAFUNCTION_ARITY) \ /**/ # if defined(BOOST_MPL_CFG_DMC_AMBIGUOUS_CTPS) # define AUX778076_DMC_PARAM() , int dummy_ # else # define AUX778076_DMC_PARAM() # endif # define AUX778076_BIND_PARAMS(param) \ BOOST_MPL_PP_PARAMS( \ BOOST_MPL_LIMIT_METAFUNCTION_ARITY \ , param \ ) \ /**/ # define AUX778076_BIND_DEFAULT_PARAMS(param, value) \ BOOST_MPL_PP_DEFAULT_PARAMS( \ BOOST_MPL_LIMIT_METAFUNCTION_ARITY \ , param \ , value \ ) \ /**/ # define AUX778076_BIND_N_PARAMS(n, param) \ BOOST_PP_COMMA_IF(n) BOOST_MPL_PP_PARAMS(n, param) \ /**/ # define AUX778076_BIND_N_SPEC_PARAMS(n, param, def) \ BOOST_PP_COMMA_IF(n) \ BOOST_MPL_PP_PARTIAL_SPEC_PARAMS(n, param, def) \ /**/ #if !defined(BOOST_MPL_CFG_NO_DEFAULT_PARAMETERS_IN_NESTED_TEMPLATES) # define AUX778076_BIND_NESTED_DEFAULT_PARAMS(param, value) \ AUX778076_BIND_DEFAULT_PARAMS(param, value) \ /**/ #else # define AUX778076_BIND_NESTED_DEFAULT_PARAMS(param, value) \ AUX778076_BIND_PARAMS(param) \ /**/ #endif namespace aux { #if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) template< typename T, AUX778076_BIND_PARAMS(typename U) > struct resolve_bind_arg { typedef T type; }; # if !defined(BOOST_MPL_CFG_NO_UNNAMED_PLACEHOLDER_SUPPORT) template< typename T , typename Arg > struct replace_unnamed_arg { typedef Arg next; typedef T type; }; template< typename Arg > struct replace_unnamed_arg< arg<-1>,Arg > { typedef typename Arg::next next; typedef Arg type; }; # endif // BOOST_MPL_CFG_NO_UNNAMED_PLACEHOLDER_SUPPORT template< BOOST_MPL_AUX_NTTP_DECL(int, N), AUX778076_BIND_PARAMS(typename U) > struct resolve_bind_arg< arg,AUX778076_BIND_PARAMS(U) > { typedef typename AUX778076_APPLY, AUX778076_BIND_PARAMS(U)>::type type; }; #if !defined(BOOST_MPL_CFG_NO_BIND_TEMPLATE) template< typename F, AUX778076_BIND_PARAMS(typename T), AUX778076_BIND_PARAMS(typename U) > struct resolve_bind_arg< bind,AUX778076_BIND_PARAMS(U) > { typedef bind f_; typedef typename AUX778076_APPLY::type type; }; #endif #else // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION // agurt, 15/jan/02: it's not a intended to be used as a function class, and // MSVC6.5 has problems with 'apply' name here (the code compiles, but doesn't // work), so I went with the 'result_' here, and in all other similar cases template< bool > struct resolve_arg_impl { template< typename T, AUX778076_BIND_PARAMS(typename U) > struct result_ { typedef T type; }; }; template<> struct resolve_arg_impl { template< typename T, AUX778076_BIND_PARAMS(typename U) > struct result_ { typedef typename AUX778076_APPLY< T , AUX778076_BIND_PARAMS(U) >::type type; }; }; // for 'resolve_bind_arg' template< typename T > struct is_bind_template; template< typename T, AUX778076_BIND_PARAMS(typename U) > struct resolve_bind_arg : resolve_arg_impl< is_bind_template::value > ::template result_< T,AUX778076_BIND_PARAMS(U) > { }; # if !defined(BOOST_MPL_CFG_NO_UNNAMED_PLACEHOLDER_SUPPORT) template< typename T > struct replace_unnamed_arg_impl { template< typename Arg > struct result_ { typedef Arg next; typedef T type; }; }; template<> struct replace_unnamed_arg_impl< arg<-1> > { template< typename Arg > struct result_ { typedef typename next::type next; typedef Arg type; }; }; template< typename T, typename Arg > struct replace_unnamed_arg : replace_unnamed_arg_impl::template result_ { }; # endif // BOOST_MPL_CFG_NO_UNNAMED_PLACEHOLDER_SUPPORT // agurt, 10/mar/02: the forward declaration has to appear before any of // 'is_bind_helper' overloads, otherwise MSVC6.5 issues an ICE on it template< BOOST_MPL_AUX_NTTP_DECL(int, arity_) > struct bind_chooser; aux::no_tag is_bind_helper(...); template< typename T > aux::no_tag is_bind_helper(protect*); // overload for "main" form // agurt, 15/mar/02: MSVC 6.5 fails to properly resolve the overload // in case if we use 'aux::type_wrapper< bind<...> >' here, and all // 'bind' instantiations form a complete type anyway #if !defined(BOOST_MPL_CFG_NO_BIND_TEMPLATE) template< typename F, AUX778076_BIND_PARAMS(typename T) > aux::yes_tag is_bind_helper(bind*); #endif template< BOOST_MPL_AUX_NTTP_DECL(int, N) > aux::yes_tag is_bind_helper(arg*); template< bool is_ref_ = true > struct is_bind_template_impl { template< typename T > struct result_ { BOOST_STATIC_CONSTANT(bool, value = false); }; }; template<> struct is_bind_template_impl { template< typename T > struct result_ { BOOST_STATIC_CONSTANT(bool, value = sizeof(aux::is_bind_helper(static_cast(0))) == sizeof(aux::yes_tag) ); }; }; template< typename T > struct is_bind_template : is_bind_template_impl< ::boost::detail::is_reference_impl::value > ::template result_ { }; #endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION } // namespace aux #define BOOST_PP_ITERATION_PARAMS_1 \ (3,(0, BOOST_MPL_LIMIT_METAFUNCTION_ARITY, )) #include BOOST_PP_ITERATE() #if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \ && !defined(BOOST_MPL_CFG_NO_TEMPLATE_TEMPLATE_PARAMETERS) /// if_/eval_if specializations # define AUX778076_SPEC_NAME if_ # define BOOST_PP_ITERATION_PARAMS_1 (3,(3, 3, )) # include BOOST_PP_ITERATE() #if !defined(BOOST_MPL_CFG_DMC_AMBIGUOUS_CTPS) # define AUX778076_SPEC_NAME eval_if # define BOOST_PP_ITERATION_PARAMS_1 (3,(3, 3, )) # include BOOST_PP_ITERATE() #endif #endif // real C++ version is already taken care of #if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \ && !defined(BOOST_MPL_CFG_NO_BIND_TEMPLATE) namespace aux { // apply_count_args #define AUX778076_COUNT_ARGS_PREFIX bind #define AUX778076_COUNT_ARGS_DEFAULT na #define AUX778076_COUNT_ARGS_ARITY BOOST_MPL_LIMIT_METAFUNCTION_ARITY #include } // bind template< typename F, AUX778076_BIND_PARAMS(typename T) AUX778076_DMC_PARAM() > struct bind : aux::bind_chooser< aux::bind_count_args::value >::template result_< F,AUX778076_BIND_PARAMS(T) >::type { }; BOOST_MPL_AUX_ARITY_SPEC( BOOST_PP_INC(BOOST_MPL_LIMIT_METAFUNCTION_ARITY) , bind ) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC( BOOST_PP_INC(BOOST_MPL_LIMIT_METAFUNCTION_ARITY) , bind ) #endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION # undef AUX778076_BIND_NESTED_DEFAULT_PARAMS # undef AUX778076_BIND_N_SPEC_PARAMS # undef AUX778076_BIND_N_PARAMS # undef AUX778076_BIND_DEFAULT_PARAMS # undef AUX778076_BIND_PARAMS # undef AUX778076_DMC_PARAM # undef AUX778076_APPLY }} #endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS #endif // BOOST_MPL_BIND_HPP_INCLUDED ///// iteration, depth == 1 // For gcc 4.4 compatability, we must include the // BOOST_PP_ITERATION_DEPTH test inside an #else clause. #else // BOOST_PP_IS_ITERATING #if BOOST_PP_ITERATION_DEPTH() == 1 # define i_ BOOST_PP_FRAME_ITERATION(1) #if defined(AUX778076_SPEC_NAME) // lazy metafunction specialization template< template< BOOST_MPL_PP_PARAMS(i_, typename T) > class F, typename Tag > struct BOOST_PP_CAT(quote,i_); template< BOOST_MPL_PP_PARAMS(i_, typename T) > struct AUX778076_SPEC_NAME; template< typename Tag AUX778076_BIND_N_PARAMS(i_, typename T) > struct BOOST_PP_CAT(bind,i_)< BOOST_PP_CAT(quote,i_) AUX778076_BIND_N_PARAMS(i_,T) > { template< AUX778076_BIND_NESTED_DEFAULT_PARAMS(typename U, na) > struct apply { private: typedef mpl::arg<1> n1; # define BOOST_PP_ITERATION_PARAMS_2 (3,(1, i_, )) # include BOOST_PP_ITERATE() typedef typename AUX778076_SPEC_NAME< typename t1::type , BOOST_MPL_PP_EXT_PARAMS(2, BOOST_PP_INC(i_), t) >::type f_; public: typedef typename f_::type type; }; }; #undef AUX778076_SPEC_NAME #else // AUX778076_SPEC_NAME template< typename F AUX778076_BIND_N_PARAMS(i_, typename T) AUX778076_DMC_PARAM() > struct BOOST_PP_CAT(bind,i_) { template< AUX778076_BIND_NESTED_DEFAULT_PARAMS(typename U, na) > struct apply { private: # if !defined(BOOST_MPL_CFG_NO_UNNAMED_PLACEHOLDER_SUPPORT) typedef aux::replace_unnamed_arg< F,mpl::arg<1> > r0; typedef typename r0::type a0; typedef typename r0::next n1; typedef typename aux::resolve_bind_arg::type f_; /// # else typedef typename aux::resolve_bind_arg::type f_; # endif // BOOST_MPL_CFG_NO_UNNAMED_PLACEHOLDER_SUPPORT # if i_ > 0 # define BOOST_PP_ITERATION_PARAMS_2 (3,(1, i_, )) # include BOOST_PP_ITERATE() # endif public: # define AUX778076_ARG(unused, i_, t) \ BOOST_PP_COMMA_IF(i_) \ typename BOOST_PP_CAT(t,BOOST_PP_INC(i_))::type \ /**/ typedef typename BOOST_PP_CAT(apply_wrap,i_)< f_ BOOST_PP_COMMA_IF(i_) BOOST_MPL_PP_REPEAT(i_, AUX778076_ARG, t) >::type type; # undef AUX778076_ARG }; }; namespace aux { #if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) template< typename F AUX778076_BIND_N_PARAMS(i_, typename T), AUX778076_BIND_PARAMS(typename U) > struct resolve_bind_arg< BOOST_PP_CAT(bind,i_),AUX778076_BIND_PARAMS(U) > { typedef BOOST_PP_CAT(bind,i_) f_; typedef typename AUX778076_APPLY::type type; }; #else template< typename F AUX778076_BIND_N_PARAMS(i_, typename T) > aux::yes_tag is_bind_helper(BOOST_PP_CAT(bind,i_)*); #endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION } // namespace aux BOOST_MPL_AUX_ARITY_SPEC(BOOST_PP_INC(i_), BOOST_PP_CAT(bind,i_)) BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(BOOST_PP_INC(i_), BOOST_PP_CAT(bind,i_)) # if !defined(BOOST_MPL_CFG_NO_BIND_TEMPLATE) # if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) #if i_ == BOOST_MPL_LIMIT_METAFUNCTION_ARITY /// primary template (not a specialization!) template< typename F AUX778076_BIND_N_PARAMS(i_, typename T) AUX778076_DMC_PARAM() > struct bind : BOOST_PP_CAT(bind,i_) { }; #else template< typename F AUX778076_BIND_N_PARAMS(i_, typename T) AUX778076_DMC_PARAM() > struct bind< F AUX778076_BIND_N_SPEC_PARAMS(i_, T, na) > : BOOST_PP_CAT(bind,i_) { }; #endif # else // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION namespace aux { template<> struct bind_chooser { template< typename F, AUX778076_BIND_PARAMS(typename T) > struct result_ { typedef BOOST_PP_CAT(bind,i_)< F AUX778076_BIND_N_PARAMS(i_,T) > type; }; }; } // namespace aux # endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION # endif // BOOST_MPL_CFG_NO_BIND_TEMPLATE #endif // AUX778076_SPEC_NAME # undef i_ ///// iteration, depth == 2 #elif BOOST_PP_ITERATION_DEPTH() == 2 # define j_ BOOST_PP_FRAME_ITERATION(2) # if !defined(BOOST_MPL_CFG_NO_UNNAMED_PLACEHOLDER_SUPPORT) typedef aux::replace_unnamed_arg< BOOST_PP_CAT(T,j_),BOOST_PP_CAT(n,j_) > BOOST_PP_CAT(r,j_); typedef typename BOOST_PP_CAT(r,j_)::type BOOST_PP_CAT(a,j_); typedef typename BOOST_PP_CAT(r,j_)::next BOOST_PP_CAT(n,BOOST_PP_INC(j_)); typedef aux::resolve_bind_arg BOOST_PP_CAT(t,j_); /// # else typedef aux::resolve_bind_arg< BOOST_PP_CAT(T,j_),AUX778076_BIND_PARAMS(U)> BOOST_PP_CAT(t,j_); # endif # undef j_ #endif // BOOST_PP_ITERATION_DEPTH() #endif // BOOST_PP_IS_ITERATING ================================================ FILE: benchmarks/boost/mpl/bind_fwd.hpp ================================================ #if !defined(BOOST_PP_IS_ITERATING) ///// header body #ifndef BOOST_MPL_BIND_FWD_HPP_INCLUDED #define BOOST_MPL_BIND_FWD_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ #if !defined(BOOST_MPL_PREPROCESSING_MODE) # include #endif #include #include #if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ && !defined(BOOST_MPL_PREPROCESSING_MODE) # define BOOST_MPL_PREPROCESSED_HEADER bind_fwd.hpp # include #else # include # include # include # include # include # include # include namespace boost { namespace mpl { // local macros, #undef-ined at the end of the header # if defined(BOOST_MPL_CFG_DMC_AMBIGUOUS_CTPS) # define AUX778076_DMC_PARAM() , int dummy_ = 0 # else # define AUX778076_DMC_PARAM() # endif # define AUX778076_BIND_DEFAULT_PARAMS(param, value) \ BOOST_MPL_PP_DEFAULT_PARAMS( \ BOOST_MPL_LIMIT_METAFUNCTION_ARITY \ , param \ , value \ ) \ AUX778076_DMC_PARAM() \ /**/ # define AUX778076_BIND_N_PARAMS(n, param) \ BOOST_PP_COMMA_IF(n) BOOST_MPL_PP_PARAMS(n, param) \ AUX778076_DMC_PARAM() \ /**/ #if !defined(BOOST_MPL_CFG_NO_BIND_TEMPLATE) template< typename F, AUX778076_BIND_DEFAULT_PARAMS(typename T, na) > struct bind; #endif #define BOOST_PP_ITERATION_PARAMS_1 \ (3,(0, BOOST_MPL_LIMIT_METAFUNCTION_ARITY, )) #include BOOST_PP_ITERATE() # undef AUX778076_BIND_N_PARAMS # undef AUX778076_BIND_DEFAULT_PARAMS # undef AUX778076_DMC_PARAM }} #endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS #endif // BOOST_MPL_BIND_FWD_HPP_INCLUDED ///// iteration #else #define i_ BOOST_PP_FRAME_ITERATION(1) template< typename F AUX778076_BIND_N_PARAMS(i_, typename T) > struct BOOST_PP_CAT(bind,i_); #undef i_ #endif // BOOST_PP_IS_ITERATING ================================================ FILE: benchmarks/boost/mpl/bool.hpp ================================================ #ifndef BOOST_MPL_BOOL_HPP_INCLUDED #define BOOST_MPL_BOOL_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ #include #include #include BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN template< bool C_ > struct bool_ { BOOST_STATIC_CONSTANT(bool, value = C_); typedef integral_c_tag tag; typedef bool_ type; typedef bool value_type; BOOST_CONSTEXPR operator bool() const { return this->value; } }; #if !defined(BOOST_NO_INCLASS_MEMBER_INITIALIZATION) template< bool C_ > bool const bool_::value; #endif BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE #endif // BOOST_MPL_BOOL_HPP_INCLUDED ================================================ FILE: benchmarks/boost/mpl/bool_fwd.hpp ================================================ #ifndef BOOST_MPL_BOOL_FWD_HPP_INCLUDED #define BOOST_MPL_BOOL_FWD_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ #include BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN template< bool C_ > struct bool_; // shorcuts typedef bool_ true_; typedef bool_ false_; BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE BOOST_MPL_AUX_ADL_BARRIER_DECL(bool_) BOOST_MPL_AUX_ADL_BARRIER_DECL(true_) BOOST_MPL_AUX_ADL_BARRIER_DECL(false_) #endif // BOOST_MPL_BOOL_FWD_HPP_INCLUDED ================================================ FILE: benchmarks/boost/mpl/clear.hpp ================================================ #ifndef BOOST_MPL_CLEAR_HPP_INCLUDED #define BOOST_MPL_CLEAR_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ #include #include #include #include #include namespace boost { namespace mpl { template< typename BOOST_MPL_AUX_NA_PARAM(Sequence) > struct clear : clear_impl< typename sequence_tag::type > ::template apply< Sequence > { BOOST_MPL_AUX_LAMBDA_SUPPORT(1,clear,(Sequence)) }; BOOST_MPL_AUX_NA_SPEC(1, clear) }} #endif // BOOST_MPL_CLEAR_HPP_INCLUDED ================================================ FILE: benchmarks/boost/mpl/clear_fwd.hpp ================================================ #ifndef BOOST_MPL_CLEAR_FWD_HPP_INCLUDED #define BOOST_MPL_CLEAR_FWD_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ namespace boost { namespace mpl { template< typename Tag > struct clear_impl; template< typename Sequence > struct clear; }} #endif // BOOST_MPL_CLEAR_FWD_HPP_INCLUDED ================================================ FILE: benchmarks/boost/mpl/deref.hpp ================================================ #ifndef BOOST_MPL_DEREF_HPP_INCLUDED #define BOOST_MPL_DEREF_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2002-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ #include #include #include #include namespace boost { namespace mpl { template< typename BOOST_MPL_AUX_NA_PARAM(Iterator) > struct deref { #if !defined(BOOST_MPL_CFG_MSVC_70_ETI_BUG) typedef typename Iterator::type type; #else typedef typename aux::msvc_type::type type; #endif BOOST_MPL_AUX_LAMBDA_SUPPORT(1,deref,(Iterator)) }; BOOST_MPL_AUX_NA_SPEC(1, deref) }} #endif // BOOST_MPL_DEREF_HPP_INCLUDED ================================================ FILE: benchmarks/boost/mpl/empty_fwd.hpp ================================================ #ifndef BOOST_MPL_EMPTY_FWD_HPP_INCLUDED #define BOOST_MPL_EMPTY_FWD_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ namespace boost { namespace mpl { template< typename Tag > struct empty_impl; template< typename Sequence > struct empty; }} #endif // BOOST_MPL_EMPTY_FWD_HPP_INCLUDED ================================================ FILE: benchmarks/boost/mpl/end.hpp ================================================ #ifndef BOOST_MPL_END_HPP_INCLUDED #define BOOST_MPL_END_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ #include #endif // BOOST_MPL_END_HPP_INCLUDED ================================================ FILE: benchmarks/boost/mpl/erase_fwd.hpp ================================================ #ifndef BOOST_MPL_ERASE_FWD_HPP_INCLUDED #define BOOST_MPL_ERASE_FWD_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ namespace boost { namespace mpl { template< typename Tag > struct erase_impl; template< typename Sequence, typename First, typename Last > struct erase; }} #endif // BOOST_MPL_ERASE_FWD_HPP_INCLUDED ================================================ FILE: benchmarks/boost/mpl/erase_key_fwd.hpp ================================================ #ifndef BOOST_MPL_ERASE_KEY_FWD_HPP_INCLUDED #define BOOST_MPL_ERASE_KEY_FWD_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ namespace boost { namespace mpl { template< typename Tag > struct erase_key_impl; template< typename Sequence, typename Key > struct erase_key; }} #endif // BOOST_MPL_ERASE_KEY_FWD_HPP_INCLUDED ================================================ FILE: benchmarks/boost/mpl/eval_if.hpp ================================================ #ifndef BOOST_MPL_EVAL_IF_HPP_INCLUDED #define BOOST_MPL_EVAL_IF_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ #include #include #include #include #include #include namespace boost { namespace mpl { template< typename BOOST_MPL_AUX_NA_PARAM(C) , typename BOOST_MPL_AUX_NA_PARAM(F1) , typename BOOST_MPL_AUX_NA_PARAM(F2) > struct eval_if #if BOOST_WORKAROUND(BOOST_MSVC, <= 1300) \ || ( BOOST_WORKAROUND(BOOST_MPL_CFG_GCC, >= 0x0300) \ && BOOST_WORKAROUND(BOOST_MPL_CFG_GCC, BOOST_TESTED_AT(0x0304)) \ ) { typedef typename if_::type f_; typedef typename f_::type type; #else : if_::type { #endif BOOST_MPL_AUX_LAMBDA_SUPPORT(3,eval_if,(C,F1,F2)) }; // (almost) copy & paste in order to save one more // recursively nested template instantiation to user template< bool C , typename F1 , typename F2 > struct eval_if_c #if BOOST_WORKAROUND(BOOST_MSVC, <= 1300) \ || ( BOOST_WORKAROUND(BOOST_MPL_CFG_GCC, >= 0x0300) \ && BOOST_WORKAROUND(BOOST_MPL_CFG_GCC, BOOST_TESTED_AT(0x0304)) \ ) { typedef typename if_c::type f_; typedef typename f_::type type; #else : if_c::type { #endif }; BOOST_MPL_AUX_NA_SPEC(3, eval_if) }} #endif // BOOST_MPL_EVAL_IF_HPP_INCLUDED ================================================ FILE: benchmarks/boost/mpl/find.hpp ================================================ #ifndef BOOST_MPL_FIND_HPP_INCLUDED #define BOOST_MPL_FIND_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2002 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ #include #include #include #include namespace boost { namespace mpl { template< typename BOOST_MPL_AUX_NA_PARAM(Sequence) , typename BOOST_MPL_AUX_NA_PARAM(T) > struct find : find_if< Sequence,same_as > { BOOST_MPL_AUX_LAMBDA_SUPPORT(2,find,(Sequence,T)) }; BOOST_MPL_AUX_NA_SPEC(2, find) }} #endif // BOOST_MPL_FIND_HPP_INCLUDED ================================================ FILE: benchmarks/boost/mpl/find_if.hpp ================================================ #ifndef BOOST_MPL_FIND_IF_HPP_INCLUDED #define BOOST_MPL_FIND_IF_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ #include #include #include #include #include #include namespace boost { namespace mpl { BOOST_MPL_AUX_COMMON_NAME_WKND(find_if) template< typename BOOST_MPL_AUX_NA_PARAM(Sequence) , typename BOOST_MPL_AUX_NA_PARAM(Predicate) > struct find_if { typedef typename iter_fold_if< Sequence , void , mpl::arg<1> // ignore , protect< aux::find_if_pred > >::type result_; typedef typename second::type type; BOOST_MPL_AUX_LAMBDA_SUPPORT(2,find_if,(Sequence,Predicate)) }; BOOST_MPL_AUX_NA_SPEC(2,find_if) }} #endif // BOOST_MPL_FIND_IF_HPP_INCLUDED ================================================ FILE: benchmarks/boost/mpl/fold.hpp ================================================ #ifndef BOOST_MPL_FOLD_HPP_INCLUDED #define BOOST_MPL_FOLD_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2001-2004 // Copyright David Abrahams 2001-2002 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ #include #include #include #include #include namespace boost { namespace mpl { template< typename BOOST_MPL_AUX_NA_PARAM(Sequence) , typename BOOST_MPL_AUX_NA_PARAM(State) , typename BOOST_MPL_AUX_NA_PARAM(ForwardOp) > struct fold { typedef typename aux::fold_impl< ::boost::mpl::O1_size::value , typename begin::type , typename end::type , State , ForwardOp >::state type; BOOST_MPL_AUX_LAMBDA_SUPPORT(3,fold,(Sequence,State,ForwardOp)) }; BOOST_MPL_AUX_NA_SPEC(3, fold) }} #endif // BOOST_MPL_FOLD_HPP_INCLUDED ================================================ FILE: benchmarks/boost/mpl/front_fwd.hpp ================================================ #ifndef BOOST_MPL_FRONT_FWD_HPP_INCLUDED #define BOOST_MPL_FRONT_FWD_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ namespace boost { namespace mpl { template< typename Tag > struct front_impl; template< typename Sequence > struct front; }} #endif // BOOST_MPL_FRONT_FWD_HPP_INCLUDED ================================================ FILE: benchmarks/boost/mpl/has_key.hpp ================================================ #ifndef BOOST_MPL_HAS_KEY_HPP_INCLUDED #define BOOST_MPL_HAS_KEY_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2003-2004 // Copyright David Abrahams 2003-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ #include #include #include #include #include namespace boost { namespace mpl { template< typename BOOST_MPL_AUX_NA_PARAM(AssociativeSequence) , typename BOOST_MPL_AUX_NA_PARAM(Key) > struct has_key : has_key_impl< typename sequence_tag::type > ::template apply { BOOST_MPL_AUX_LAMBDA_SUPPORT(2,has_key,(AssociativeSequence,Key)) }; BOOST_MPL_AUX_NA_SPEC(2, has_key) }} #endif // BOOST_MPL_HAS_KEY_HPP_INCLUDED ================================================ FILE: benchmarks/boost/mpl/has_key_fwd.hpp ================================================ #ifndef BOOST_MPL_HAS_KEY_FWD_HPP_INCLUDED #define BOOST_MPL_HAS_KEY_FWD_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2003-2004 // Copyright David Abrahams 2003-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ namespace boost { namespace mpl { template< typename Tag > struct has_key_impl; template< typename AssociativeSequence, typename Key > struct has_key; }} #endif // BOOST_MPL_HAS_KEY_FWD_HPP_INCLUDED ================================================ FILE: benchmarks/boost/mpl/has_xxx.hpp ================================================ #ifndef BOOST_MPL_HAS_XXX_HPP_INCLUDED #define BOOST_MPL_HAS_XXX_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2002-2006 // Copyright David Abrahams 2002-2003 // Copyright Daniel Walker 2007 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #if BOOST_WORKAROUND( __BORLANDC__, BOOST_TESTED_AT(0x590) ) # include #endif #if !defined(BOOST_MPL_CFG_NO_HAS_XXX) # if BOOST_WORKAROUND(BOOST_MSVC, <= 1300) // agurt, 11/sep/02: MSVC-specific version (< 7.1), based on a USENET // newsgroup's posting by John Madsen (comp.lang.c++.moderated, // 1999-11-12 19:17:06 GMT); the code is _not_ standard-conforming, but // it works way more reliably than the SFINAE-based implementation // Modified dwa 8/Oct/02 to handle reference types. # include # include namespace boost { namespace mpl { namespace aux { struct has_xxx_tag; #if BOOST_WORKAROUND(BOOST_MSVC, == 1300) template< typename U > struct msvc_incomplete_array { typedef char (&type)[sizeof(U) + 1]; }; #endif template< typename T > struct msvc_is_incomplete { // MSVC is capable of some kinds of SFINAE. If U is an incomplete // type, it won't pick the second overload static char tester(...); #if BOOST_WORKAROUND(BOOST_MSVC, == 1300) template< typename U > static typename msvc_incomplete_array::type tester(type_wrapper); #else template< typename U > static char (& tester(type_wrapper) )[sizeof(U)+1]; #endif BOOST_STATIC_CONSTANT(bool, value = sizeof(tester(type_wrapper())) == 1 ); }; template<> struct msvc_is_incomplete { BOOST_STATIC_CONSTANT(bool, value = false); }; }}} # define BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF_(trait, name, default_) \ template< typename T, typename name = ::boost::mpl::aux::has_xxx_tag > \ struct BOOST_PP_CAT(trait,_impl) : T \ { \ static boost::mpl::aux::no_tag \ test(void(*)(::boost::mpl::aux::has_xxx_tag)); \ \ static boost::mpl::aux::yes_tag test(...); \ \ BOOST_STATIC_CONSTANT(bool, value = \ sizeof(test(static_cast(0))) \ != sizeof(boost::mpl::aux::no_tag) \ ); \ typedef boost::mpl::bool_ type; \ }; \ \ template< typename T, typename fallback_ = boost::mpl::bool_ > \ struct trait \ : boost::mpl::if_c< \ boost::mpl::aux::msvc_is_incomplete::value \ , boost::mpl::bool_ \ , BOOST_PP_CAT(trait,_impl) \ >::type \ { \ }; \ \ BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, void) \ BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, bool) \ BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, char) \ BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, signed char) \ BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, unsigned char) \ BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, signed short) \ BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, unsigned short) \ BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, signed int) \ BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, unsigned int) \ BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, signed long) \ BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, unsigned long) \ BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, float) \ BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, double) \ BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, long double) \ /**/ # define BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, T) \ template<> struct trait \ { \ BOOST_STATIC_CONSTANT(bool, value = false); \ typedef boost::mpl::bool_ type; \ }; \ /**/ #if !defined(BOOST_NO_INTRINSIC_WCHAR_T) # define BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(trait, name, unused) \ BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF_(trait, name, unused) \ BOOST_MPL_AUX_HAS_XXX_TRAIT_SPEC(trait, wchar_t) \ /**/ #else # define BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(trait, name, unused) \ BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF_(trait, name, unused) \ /**/ #endif // SFINAE-based implementations below are derived from a USENET newsgroup's // posting by Rani Sharoni (comp.lang.c++.moderated, 2002-03-17 07:45:09 PST) # elif BOOST_WORKAROUND(BOOST_MSVC, <= 1400) \ || (BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1800)) && defined(__CUDACC__)) \ || BOOST_WORKAROUND(__IBMCPP__, <= 700) // MSVC 7.1 & MSVC 8.0 & VACPP // agurt, 15/jun/05: replace overload-based SFINAE implementation with SFINAE // applied to partial specialization to fix some apparently random failures // (thanks to Daniel Wallin for researching this!) # define BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(trait, name, default_) \ template< typename T > \ struct BOOST_PP_CAT(trait, _msvc_sfinae_helper) \ { \ typedef void type; \ };\ \ template< typename T, typename U = void > \ struct BOOST_PP_CAT(trait,_impl_) \ { \ BOOST_STATIC_CONSTANT(bool, value = false); \ typedef boost::mpl::bool_ type; \ }; \ \ template< typename T > \ struct BOOST_PP_CAT(trait,_impl_)< \ T \ , typename BOOST_PP_CAT(trait, _msvc_sfinae_helper)< typename T::name >::type \ > \ { \ BOOST_STATIC_CONSTANT(bool, value = true); \ typedef boost::mpl::bool_ type; \ }; \ \ template< typename T, typename fallback_ = boost::mpl::bool_ > \ struct trait \ : BOOST_PP_CAT(trait,_impl_) \ { \ }; \ /**/ # elif BOOST_WORKAROUND( __BORLANDC__, BOOST_TESTED_AT(0x590) ) # define BOOST_MPL_HAS_XXX_TRAIT_NAMED_BCB_DEF(trait, trait_tester, name, default_) \ template< typename T, bool IS_CLASS > \ struct trait_tester \ { \ BOOST_STATIC_CONSTANT( bool, value = false ); \ }; \ template< typename T > \ struct trait_tester< T, true > \ { \ struct trait_tester_impl \ { \ template < class U > \ static int resolve( boost::mpl::aux::type_wrapper const volatile * \ , boost::mpl::aux::type_wrapper* = 0 ); \ static char resolve( ... ); \ }; \ typedef boost::mpl::aux::type_wrapper t_; \ BOOST_STATIC_CONSTANT( bool, value = ( sizeof( trait_tester_impl::resolve( static_cast< t_ * >(0) ) ) == sizeof(int) ) ); \ }; \ template< typename T, typename fallback_ = boost::mpl::bool_ > \ struct trait \ { \ BOOST_STATIC_CONSTANT( bool, value = (trait_tester< T, boost::is_class< T >::value >::value) ); \ typedef boost::mpl::bool_< trait< T, fallback_ >::value > type; \ }; # define BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(trait, name, default_) \ BOOST_MPL_HAS_XXX_TRAIT_NAMED_BCB_DEF( trait \ , BOOST_PP_CAT(trait,_tester) \ , name \ , default_ ) \ /**/ # else // other SFINAE-capable compilers # define BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(trait, name, default_) \ template< typename T, typename fallback_ = boost::mpl::bool_ > \ struct trait \ { \ struct gcc_3_2_wknd \ { \ template< typename U > \ static boost::mpl::aux::yes_tag test( \ boost::mpl::aux::type_wrapper const volatile* \ , boost::mpl::aux::type_wrapper* = 0 \ ); \ \ static boost::mpl::aux::no_tag test(...); \ }; \ \ typedef boost::mpl::aux::type_wrapper t_; \ BOOST_STATIC_CONSTANT(bool, value = \ sizeof(gcc_3_2_wknd::test(static_cast(0))) \ == sizeof(boost::mpl::aux::yes_tag) \ ); \ typedef boost::mpl::bool_ type; \ }; \ /**/ # endif // BOOST_WORKAROUND(BOOST_MSVC, <= 1300) #else // BOOST_MPL_CFG_NO_HAS_XXX // placeholder implementation # define BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(trait, name, default_) \ template< typename T, typename fallback_ = boost::mpl::bool_ > \ struct trait \ { \ BOOST_STATIC_CONSTANT(bool, value = fallback_::value); \ typedef fallback_ type; \ }; \ /**/ #endif #define BOOST_MPL_HAS_XXX_TRAIT_DEF(name) \ BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(BOOST_PP_CAT(has_,name), name, false) \ /**/ #if !defined(BOOST_MPL_CFG_NO_HAS_XXX_TEMPLATE) // Create a boolean Metafunction to detect a nested template // member. This implementation is based on a USENET newsgroup's // posting by Aleksey Gurtovoy (comp.lang.c++.moderated, 2002-03-19), // Rani Sharoni's USENET posting cited above, the non-template has_xxx // implementations above, and discussion on the Boost mailing list. # if !defined(BOOST_MPL_HAS_XXX_NO_WRAPPED_TYPES) # if BOOST_WORKAROUND(BOOST_MSVC, <= 1400) # define BOOST_MPL_HAS_XXX_NO_WRAPPED_TYPES 1 # else # define BOOST_MPL_HAS_XXX_NO_WRAPPED_TYPES 0 # endif # endif # if !defined(BOOST_MPL_HAS_XXX_NO_EXPLICIT_TEST_FUNCTION) # if (defined(BOOST_NO_EXPLICIT_FUNCTION_TEMPLATE_ARGUMENTS)) # define BOOST_MPL_HAS_XXX_NO_EXPLICIT_TEST_FUNCTION 1 # else # define BOOST_MPL_HAS_XXX_NO_EXPLICIT_TEST_FUNCTION 0 # endif # endif # if !defined(BOOST_MPL_HAS_XXX_NEEDS_TEMPLATE_SFINAE) # if BOOST_WORKAROUND(BOOST_MSVC, <= 1400) # define BOOST_MPL_HAS_XXX_NEEDS_TEMPLATE_SFINAE 1 # else # define BOOST_MPL_HAS_XXX_NEEDS_TEMPLATE_SFINAE 0 # endif # endif // NOTE: Many internal implementation macros take a Boost.Preprocessor // array argument called args which is of the following form. // ( 4, ( trait, name, max_arity, default_ ) ) # define BOOST_MPL_HAS_MEMBER_INTROSPECTION_NAME(args) \ BOOST_PP_CAT(BOOST_PP_ARRAY_ELEM(0, args) , _introspect) \ /**/ # define BOOST_MPL_HAS_MEMBER_INTROSPECTION_SUBSTITUTE_NAME(args, n) \ BOOST_PP_CAT(BOOST_PP_CAT(BOOST_PP_ARRAY_ELEM(0, args) , _substitute), n) \ /**/ # define BOOST_MPL_HAS_MEMBER_INTROSPECTION_TEST_NAME(args) \ BOOST_PP_CAT(BOOST_PP_ARRAY_ELEM(0, args) , _test) \ /**/ // Thanks to Guillaume Melquiond for pointing out the need for the // "substitute" template as an argument to the overloaded test // functions to get SFINAE to work for member templates with the // correct name but different number of arguments. # define BOOST_MPL_HAS_MEMBER_MULTI_SUBSTITUTE(z, n, args) \ template< \ template< BOOST_PP_ENUM_PARAMS(BOOST_PP_INC(n), typename V) > class V \ > \ struct BOOST_MPL_HAS_MEMBER_INTROSPECTION_SUBSTITUTE_NAME(args, n) { \ }; \ /**/ # define BOOST_MPL_HAS_MEMBER_SUBSTITUTE(args, substitute_macro) \ BOOST_PP_REPEAT( \ BOOST_PP_ARRAY_ELEM(2, args) \ , BOOST_MPL_HAS_MEMBER_MULTI_SUBSTITUTE \ , args \ ) \ /**/ # if !BOOST_MPL_HAS_XXX_NO_EXPLICIT_TEST_FUNCTION # define BOOST_MPL_HAS_MEMBER_REJECT(args, member_macro) \ template< typename V > \ static boost::mpl::aux::no_tag \ BOOST_MPL_HAS_MEMBER_INTROSPECTION_TEST_NAME(args)(...); \ /**/ # else # define BOOST_MPL_HAS_MEMBER_REJECT(args, member_macro) \ static boost::mpl::aux::no_tag \ BOOST_MPL_HAS_MEMBER_INTROSPECTION_TEST_NAME(args)(...); \ /**/ # endif # if !BOOST_MPL_HAS_XXX_NO_WRAPPED_TYPES # define BOOST_MPL_HAS_MEMBER_MULTI_ACCEPT(z, n, args) \ template< typename V > \ static boost::mpl::aux::yes_tag \ BOOST_MPL_HAS_MEMBER_INTROSPECTION_TEST_NAME(args)( \ boost::mpl::aux::type_wrapper< V > const volatile* \ , BOOST_MPL_HAS_MEMBER_INTROSPECTION_SUBSTITUTE_NAME(args, n) < \ V::template BOOST_PP_ARRAY_ELEM(1, args) \ >* = 0 \ ); \ /**/ # define BOOST_MPL_HAS_MEMBER_ACCEPT(args, member_macro) \ BOOST_PP_REPEAT( \ BOOST_PP_ARRAY_ELEM(2, args) \ , BOOST_MPL_HAS_MEMBER_MULTI_ACCEPT \ , args \ ) \ /**/ # else # define BOOST_MPL_HAS_MEMBER_ACCEPT(args, member_macro) \ template< typename V > \ static boost::mpl::aux::yes_tag \ BOOST_MPL_HAS_MEMBER_INTROSPECTION_TEST_NAME(args)( \ V const volatile* \ , member_macro(args, V, T)* = 0 \ ); \ /**/ # endif # if !BOOST_MPL_HAS_XXX_NO_EXPLICIT_TEST_FUNCTION # define BOOST_MPL_HAS_MEMBER_TEST(args) \ sizeof(BOOST_MPL_HAS_MEMBER_INTROSPECTION_TEST_NAME(args)< U >(0)) \ == sizeof(boost::mpl::aux::yes_tag) \ /**/ # else # if !BOOST_MPL_HAS_XXX_NO_WRAPPED_TYPES # define BOOST_MPL_HAS_MEMBER_TEST(args) \ sizeof( \ BOOST_MPL_HAS_MEMBER_INTROSPECTION_TEST_NAME(args)( \ static_cast< boost::mpl::aux::type_wrapper< U >* >(0) \ ) \ ) == sizeof(boost::mpl::aux::yes_tag) \ /**/ # else # define BOOST_MPL_HAS_MEMBER_TEST(args) \ sizeof( \ BOOST_MPL_HAS_MEMBER_INTROSPECTION_TEST_NAME(args)( \ static_cast< U* >(0) \ ) \ ) == sizeof(boost::mpl::aux::yes_tag) \ /**/ # endif # endif # define BOOST_MPL_HAS_MEMBER_INTROSPECT( \ args, substitute_macro, member_macro \ ) \ template< typename U > \ struct BOOST_MPL_HAS_MEMBER_INTROSPECTION_NAME(args) { \ BOOST_MPL_HAS_MEMBER_SUBSTITUTE(args, substitute_macro) \ BOOST_MPL_HAS_MEMBER_REJECT(args, member_macro) \ BOOST_MPL_HAS_MEMBER_ACCEPT(args, member_macro) \ BOOST_STATIC_CONSTANT( \ bool, value = BOOST_MPL_HAS_MEMBER_TEST(args) \ ); \ typedef boost::mpl::bool_< value > type; \ }; \ /**/ # define BOOST_MPL_HAS_MEMBER_IMPLEMENTATION( \ args, introspect_macro, substitute_macro, member_macro \ ) \ template< \ typename T \ , typename fallback_ \ = boost::mpl::bool_< BOOST_PP_ARRAY_ELEM(3, args) > \ > \ class BOOST_PP_ARRAY_ELEM(0, args) { \ introspect_macro(args, substitute_macro, member_macro) \ public: \ static const bool value \ = BOOST_MPL_HAS_MEMBER_INTROSPECTION_NAME(args)< T >::value; \ typedef typename BOOST_MPL_HAS_MEMBER_INTROSPECTION_NAME(args)< \ T \ >::type type; \ }; \ /**/ // BOOST_MPL_HAS_MEMBER_WITH_FUNCTION_SFINAE expands to the full // implementation of the function-based metafunction. Compile with -E // to see the preprocessor output for this macro. # define BOOST_MPL_HAS_MEMBER_WITH_FUNCTION_SFINAE( \ args, substitute_macro, member_macro \ ) \ BOOST_MPL_HAS_MEMBER_IMPLEMENTATION( \ args \ , BOOST_MPL_HAS_MEMBER_INTROSPECT \ , substitute_macro \ , member_macro \ ) \ /**/ # if BOOST_MPL_HAS_XXX_NEEDS_TEMPLATE_SFINAE # if !defined(BOOST_MPL_HAS_XXX_NEEDS_NAMESPACE_LEVEL_SUBSTITUTE) # if BOOST_WORKAROUND(BOOST_MSVC, <= 1400) # define BOOST_MPL_HAS_XXX_NEEDS_NAMESPACE_LEVEL_SUBSTITUTE 1 # endif # endif # if !BOOST_MPL_HAS_XXX_NEEDS_NAMESPACE_LEVEL_SUBSTITUTE # define BOOST_MPL_HAS_MEMBER_INTROSPECTION_SUBSTITUTE_NAME_WITH_TEMPLATE_SFINAE( \ args, n \ ) \ BOOST_MPL_HAS_MEMBER_INTROSPECTION_SUBSTITUTE_NAME(args, n) \ /**/ # else # define BOOST_MPL_HAS_MEMBER_INTROSPECTION_SUBSTITUTE_NAME_WITH_TEMPLATE_SFINAE( \ args, n \ ) \ BOOST_PP_CAT( \ boost_mpl_has_xxx_ \ , BOOST_MPL_HAS_MEMBER_INTROSPECTION_SUBSTITUTE_NAME(args, n) \ ) \ /**/ # endif # define BOOST_MPL_HAS_MEMBER_INTROSPECTION_SUBSTITUTE_TAG_NAME( \ args \ ) \ BOOST_PP_CAT( \ BOOST_MPL_HAS_MEMBER_INTROSPECTION_SUBSTITUTE_NAME_WITH_TEMPLATE_SFINAE( \ args, 0 \ ) \ , _tag \ ) \ /**/ # define BOOST_MPL_HAS_MEMBER_MULTI_SUBSTITUTE_WITH_TEMPLATE_SFINAE( \ z, n, args \ ) \ template< \ template< BOOST_PP_ENUM_PARAMS(BOOST_PP_INC(n), typename U) > class U \ > \ struct BOOST_MPL_HAS_MEMBER_INTROSPECTION_SUBSTITUTE_NAME_WITH_TEMPLATE_SFINAE( \ args, n \ ) { \ typedef \ BOOST_MPL_HAS_MEMBER_INTROSPECTION_SUBSTITUTE_TAG_NAME(args) \ type; \ }; \ /**/ # define BOOST_MPL_HAS_MEMBER_SUBSTITUTE_WITH_TEMPLATE_SFINAE( \ args, substitute_macro \ ) \ typedef void \ BOOST_MPL_HAS_MEMBER_INTROSPECTION_SUBSTITUTE_TAG_NAME(args); \ BOOST_PP_REPEAT( \ BOOST_PP_ARRAY_ELEM(2, args) \ , BOOST_MPL_HAS_MEMBER_MULTI_SUBSTITUTE_WITH_TEMPLATE_SFINAE \ , args \ ) \ /**/ # define BOOST_MPL_HAS_MEMBER_REJECT_WITH_TEMPLATE_SFINAE( \ args, member_macro \ ) \ template< \ typename U \ , typename V \ = BOOST_MPL_HAS_MEMBER_INTROSPECTION_SUBSTITUTE_TAG_NAME(args) \ > \ struct BOOST_MPL_HAS_MEMBER_INTROSPECTION_TEST_NAME(args) { \ BOOST_STATIC_CONSTANT(bool, value = false); \ typedef boost::mpl::bool_< value > type; \ }; \ /**/ # define BOOST_MPL_HAS_MEMBER_MULTI_ACCEPT_WITH_TEMPLATE_SFINAE( \ z, n, args \ ) \ template< typename U > \ struct BOOST_MPL_HAS_MEMBER_INTROSPECTION_TEST_NAME(args)< \ U \ , typename \ BOOST_MPL_HAS_MEMBER_INTROSPECTION_SUBSTITUTE_NAME_WITH_TEMPLATE_SFINAE( \ args, n \ )< \ BOOST_MSVC_TYPENAME U::BOOST_PP_ARRAY_ELEM(1, args)< > \ >::type \ > { \ BOOST_STATIC_CONSTANT(bool, value = true); \ typedef boost::mpl::bool_< value > type; \ }; \ /**/ # define BOOST_MPL_HAS_MEMBER_ACCEPT_WITH_TEMPLATE_SFINAE( \ args, member_macro \ ) \ BOOST_PP_REPEAT( \ BOOST_PP_ARRAY_ELEM(2, args) \ , BOOST_MPL_HAS_MEMBER_MULTI_ACCEPT_WITH_TEMPLATE_SFINAE \ , args \ ) \ /**/ # define BOOST_MPL_HAS_MEMBER_INTROSPECT_WITH_TEMPLATE_SFINAE( \ args, substitute_macro, member_macro \ ) \ BOOST_MPL_HAS_MEMBER_REJECT_WITH_TEMPLATE_SFINAE(args, member_macro) \ BOOST_MPL_HAS_MEMBER_ACCEPT_WITH_TEMPLATE_SFINAE(args, member_macro) \ template< typename U > \ struct BOOST_MPL_HAS_MEMBER_INTROSPECTION_NAME(args) \ : BOOST_MPL_HAS_MEMBER_INTROSPECTION_TEST_NAME(args)< U > { \ }; \ /**/ // BOOST_MPL_HAS_MEMBER_WITH_TEMPLATE_SFINAE expands to the full // implementation of the template-based metafunction. Compile with -E // to see the preprocessor output for this macro. // // Note that if BOOST_MPL_HAS_XXX_NEEDS_NAMESPACE_LEVEL_SUBSTITUTE is // defined BOOST_MPL_HAS_MEMBER_SUBSTITUTE_WITH_TEMPLATE_SFINAE needs // to be expanded at namespace level before // BOOST_MPL_HAS_MEMBER_WITH_TEMPLATE_SFINAE can be used. # define BOOST_MPL_HAS_MEMBER_WITH_TEMPLATE_SFINAE( \ args, substitute_macro, member_macro \ ) \ BOOST_MPL_HAS_MEMBER_SUBSTITUTE_WITH_TEMPLATE_SFINAE( \ args, substitute_macro \ ) \ BOOST_MPL_HAS_MEMBER_IMPLEMENTATION( \ args \ , BOOST_MPL_HAS_MEMBER_INTROSPECT_WITH_TEMPLATE_SFINAE \ , substitute_macro \ , member_macro \ ) \ /**/ # endif // BOOST_MPL_HAS_XXX_NEEDS_TEMPLATE_SFINAE // Note: In the current implementation the parameter and access macros // are no longer expanded. # if !BOOST_WORKAROUND(BOOST_MSVC, <= 1400) # define BOOST_MPL_HAS_XXX_TEMPLATE_NAMED_DEF(trait, name, default_) \ BOOST_MPL_HAS_MEMBER_WITH_FUNCTION_SFINAE( \ ( 4, ( trait, name, BOOST_MPL_LIMIT_METAFUNCTION_ARITY, default_ ) ) \ , BOOST_MPL_HAS_MEMBER_TEMPLATE_SUBSTITUTE_PARAMETER \ , BOOST_MPL_HAS_MEMBER_TEMPLATE_ACCESS \ ) \ /**/ # else # define BOOST_MPL_HAS_XXX_TEMPLATE_NAMED_DEF(trait, name, default_) \ BOOST_MPL_HAS_MEMBER_WITH_TEMPLATE_SFINAE( \ ( 4, ( trait, name, BOOST_MPL_LIMIT_METAFUNCTION_ARITY, default_ ) ) \ , BOOST_MPL_HAS_MEMBER_TEMPLATE_SUBSTITUTE_PARAMETER \ , BOOST_MPL_HAS_MEMBER_TEMPLATE_ACCESS \ ) \ /**/ # endif #else // BOOST_MPL_CFG_NO_HAS_XXX_TEMPLATE // placeholder implementation # define BOOST_MPL_HAS_XXX_TEMPLATE_NAMED_DEF(trait, name, default_) \ template< typename T \ , typename fallback_ = boost::mpl::bool_< default_ > > \ struct trait { \ BOOST_STATIC_CONSTANT(bool, value = fallback_::value); \ typedef fallback_ type; \ }; \ /**/ #endif // BOOST_MPL_CFG_NO_HAS_XXX_TEMPLATE # define BOOST_MPL_HAS_XXX_TEMPLATE_DEF(name) \ BOOST_MPL_HAS_XXX_TEMPLATE_NAMED_DEF( \ BOOST_PP_CAT(has_, name), name, false \ ) \ /**/ #endif // BOOST_MPL_HAS_XXX_HPP_INCLUDED ================================================ FILE: benchmarks/boost/mpl/identity.hpp ================================================ #ifndef BOOST_MPL_IDENTITY_HPP_INCLUDED #define BOOST_MPL_IDENTITY_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ #include #include namespace boost { namespace mpl { template< typename BOOST_MPL_AUX_NA_PARAM(T) > struct identity { typedef T type; BOOST_MPL_AUX_LAMBDA_SUPPORT(1, identity, (T)) }; template< typename BOOST_MPL_AUX_NA_PARAM(T) > struct make_identity { typedef identity type; BOOST_MPL_AUX_LAMBDA_SUPPORT(1, make_identity, (T)) }; BOOST_MPL_AUX_NA_SPEC_NO_ETI(1, identity) BOOST_MPL_AUX_NA_SPEC_NO_ETI(1, make_identity) }} #endif // BOOST_MPL_IDENTITY_HPP_INCLUDED ================================================ FILE: benchmarks/boost/mpl/if.hpp ================================================ #ifndef BOOST_MPL_IF_HPP_INCLUDED #define BOOST_MPL_IF_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ #include #include #include #include #include #include #include namespace boost { namespace mpl { #if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) template< bool C , typename T1 , typename T2 > struct if_c { typedef T1 type; }; template< typename T1 , typename T2 > struct if_c { typedef T2 type; }; // agurt, 05/sep/04: nondescriptive parameter names for the sake of DigitalMars // (and possibly MWCW < 8.0); see http://article.gmane.org/gmane.comp.lib.boost.devel/108959 template< typename BOOST_MPL_AUX_NA_PARAM(T1) , typename BOOST_MPL_AUX_NA_PARAM(T2) , typename BOOST_MPL_AUX_NA_PARAM(T3) > struct if_ { private: // agurt, 02/jan/03: two-step 'type' definition for the sake of aCC typedef if_c< #if defined(BOOST_MPL_CFG_BCC_INTEGRAL_CONSTANTS) BOOST_MPL_AUX_VALUE_WKND(T1)::value #else BOOST_MPL_AUX_STATIC_CAST(bool, BOOST_MPL_AUX_VALUE_WKND(T1)::value) #endif , T2 , T3 > almost_type_; public: typedef typename almost_type_::type type; BOOST_MPL_AUX_LAMBDA_SUPPORT(3,if_,(T1,T2,T3)) }; #else // no partial class template specialization namespace aux { template< bool C > struct if_impl { template< typename T1, typename T2 > struct result_ { typedef T1 type; }; }; template<> struct if_impl { template< typename T1, typename T2 > struct result_ { typedef T2 type; }; }; } // namespace aux template< bool C_ , typename T1 , typename T2 > struct if_c { typedef typename aux::if_impl< C_ > ::template result_::type type; }; // (almost) copy & paste in order to save one more // recursively nested template instantiation to user template< typename BOOST_MPL_AUX_NA_PARAM(C_) , typename BOOST_MPL_AUX_NA_PARAM(T1) , typename BOOST_MPL_AUX_NA_PARAM(T2) > struct if_ { enum { msvc_wknd_ = BOOST_MPL_AUX_MSVC_VALUE_WKND(C_)::value }; typedef typename aux::if_impl< BOOST_MPL_AUX_STATIC_CAST(bool, msvc_wknd_) > ::template result_::type type; BOOST_MPL_AUX_LAMBDA_SUPPORT(3,if_,(C_,T1,T2)) }; #endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION BOOST_MPL_AUX_NA_SPEC(3, if_) }} #endif // BOOST_MPL_IF_HPP_INCLUDED ================================================ FILE: benchmarks/boost/mpl/insert.hpp ================================================ #ifndef BOOST_MPL_INSERT_HPP_INCLUDED #define BOOST_MPL_INSERT_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ #include #include #include #include #include namespace boost { namespace mpl { template< typename BOOST_MPL_AUX_NA_PARAM(Sequence) , typename BOOST_MPL_AUX_NA_PARAM(Pos_or_T) , typename BOOST_MPL_AUX_NA_PARAM(T) > struct insert : insert_impl< typename sequence_tag::type > ::template apply< Sequence,Pos_or_T,T > { BOOST_MPL_AUX_LAMBDA_SUPPORT(3,insert,(Sequence,Pos_or_T,T)) }; BOOST_MPL_AUX_NA_SPEC(3, insert) }} #endif // BOOST_MPL_INSERT_HPP_INCLUDED ================================================ FILE: benchmarks/boost/mpl/insert_fwd.hpp ================================================ #ifndef BOOST_MPL_INSERT_FWD_HPP_INCLUDED #define BOOST_MPL_INSERT_FWD_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ namespace boost { namespace mpl { template< typename Tag > struct insert_impl; template< typename Sequence, typename Pos_or_T, typename T > struct insert; }} #endif // BOOST_MPL_INSERT_FWD_HPP_INCLUDED ================================================ FILE: benchmarks/boost/mpl/insert_range_fwd.hpp ================================================ #ifndef BOOST_MPL_INSERT_RANGE_FWD_HPP_INCLUDED #define BOOST_MPL_INSERT_RANGE_FWD_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ namespace boost { namespace mpl { template< typename Tag > struct insert_range_impl; template< typename Sequence, typename Pos, typename Range > struct insert_range; }} #endif // BOOST_MPL_INSERT_RANGE_FWD_HPP_INCLUDED ================================================ FILE: benchmarks/boost/mpl/int.hpp ================================================ #ifndef BOOST_MPL_INT_HPP_INCLUDED #define BOOST_MPL_INT_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ #include #define AUX_WRAPPER_VALUE_TYPE int #include #endif // BOOST_MPL_INT_HPP_INCLUDED ================================================ FILE: benchmarks/boost/mpl/int_fwd.hpp ================================================ #ifndef BOOST_MPL_INT_FWD_HPP_INCLUDED #define BOOST_MPL_INT_FWD_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ #include #include BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN template< BOOST_MPL_AUX_NTTP_DECL(int, N) > struct int_; BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE BOOST_MPL_AUX_ADL_BARRIER_DECL(int_) #endif // BOOST_MPL_INT_FWD_HPP_INCLUDED ================================================ FILE: benchmarks/boost/mpl/integral_c.hpp ================================================ #ifndef BOOST_MPL_INTEGRAL_C_HPP_INCLUDED #define BOOST_MPL_INTEGRAL_C_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2006 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ #include #include #include #include #if BOOST_WORKAROUND(__HP_aCC, <= 53800) // the type of non-type template arguments may not depend on template arguments # define AUX_WRAPPER_PARAMS(N) typename T, long N #else # define AUX_WRAPPER_PARAMS(N) typename T, T N #endif #define AUX_WRAPPER_NAME integral_c #define AUX_WRAPPER_VALUE_TYPE T #define AUX_WRAPPER_INST(value) AUX_WRAPPER_NAME< T, value > #include #if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \ && !BOOST_WORKAROUND(__BORLANDC__, <= 0x551) BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN // 'bool' constant doesn't have 'next'/'prior' members template< bool C > struct integral_c { BOOST_STATIC_CONSTANT(bool, value = C); typedef integral_c_tag tag; typedef integral_c type; typedef bool value_type; operator bool() const { return this->value; } }; BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE #endif #endif // BOOST_MPL_INTEGRAL_C_HPP_INCLUDED ================================================ FILE: benchmarks/boost/mpl/integral_c_fwd.hpp ================================================ #ifndef BOOST_MPL_INTEGRAL_C_FWD_HPP_INCLUDED #define BOOST_MPL_INTEGRAL_C_FWD_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2006 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ #include #include BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN #if BOOST_WORKAROUND(__HP_aCC, <= 53800) // the type of non-type template arguments may not depend on template arguments template< typename T, long N > struct integral_c; #else template< typename T, T N > struct integral_c; #endif BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE BOOST_MPL_AUX_ADL_BARRIER_DECL(integral_c) #endif // BOOST_MPL_INTEGRAL_C_FWD_HPP_INCLUDED ================================================ FILE: benchmarks/boost/mpl/integral_c_tag.hpp ================================================ #ifndef BOOST_MPL_INTEGRAL_C_TAG_HPP_INCLUDED #define BOOST_MPL_INTEGRAL_C_TAG_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ #include #include BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN struct integral_c_tag { BOOST_STATIC_CONSTANT(int, value = 0); }; BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE BOOST_MPL_AUX_ADL_BARRIER_DECL(integral_c_tag) #endif // BOOST_MPL_INTEGRAL_C_TAG_HPP_INCLUDED ================================================ FILE: benchmarks/boost/mpl/is_placeholder.hpp ================================================ #ifndef BOOST_MPL_IS_PLACEHOLDER_HPP_INCLUDED #define BOOST_MPL_IS_PLACEHOLDER_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ #include #include #include #include #include #include #include namespace boost { namespace mpl { #if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) template< typename T > struct is_placeholder : bool_ { }; template< BOOST_MPL_AUX_NTTP_DECL(int, N) > struct is_placeholder< arg > : bool_ { }; #else namespace aux { aux::no_tag is_placeholder_helper(...); template< BOOST_MPL_AUX_NTTP_DECL(int, N) > aux::yes_tag is_placeholder_helper(aux::type_wrapper< arg >*); } // namespace aux template< typename T > struct is_placeholder { static aux::type_wrapper* get(); BOOST_STATIC_CONSTANT(bool, value = sizeof(aux::is_placeholder_helper(get())) == sizeof(aux::yes_tag) ); typedef bool_ type; }; #endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION }} #endif // BOOST_MPL_IS_PLACEHOLDER_HPP_INCLUDED ================================================ FILE: benchmarks/boost/mpl/iter_fold_if.hpp ================================================ #ifndef BOOST_MPL_ITER_FOLD_IF_HPP_INCLUDED #define BOOST_MPL_ITER_FOLD_IF_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2003-2004 // Copyright Eric Friedman 2003 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ #include #include #include #include #include #include #include #include #include #include #include #include #include namespace boost { namespace mpl { namespace aux { template< typename Predicate, typename LastIterator > struct iter_fold_if_pred { template< typename State, typename Iterator > struct apply #if !defined(BOOST_MPL_CFG_NO_NESTED_FORWARDING) : and_< not_< is_same > , apply1 > { #else { typedef and_< not_< is_same > , apply1 > type; #endif }; }; } // namespace aux template< typename BOOST_MPL_AUX_NA_PARAM(Sequence) , typename BOOST_MPL_AUX_NA_PARAM(State) , typename BOOST_MPL_AUX_NA_PARAM(ForwardOp) , typename BOOST_MPL_AUX_NA_PARAM(ForwardPredicate) , typename BOOST_MPL_AUX_NA_PARAM(BackwardOp) , typename BOOST_MPL_AUX_NA_PARAM(BackwardPredicate) > struct iter_fold_if { typedef typename begin::type first_; typedef typename end::type last_; typedef typename eval_if< is_na , if_< is_na, always, always > , identity >::type backward_pred_; // cwpro8 doesn't like 'cut-off' type here (use typedef instead) #if !BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3003)) && !BOOST_WORKAROUND(__IBMCPP__, BOOST_TESTED_AT(600)) struct result_ : #else typedef #endif aux::iter_fold_if_impl< first_ , State , ForwardOp , protect< aux::iter_fold_if_pred< ForwardPredicate,last_ > > , BackwardOp , backward_pred_ > #if !BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3003)) && !BOOST_WORKAROUND(__IBMCPP__, BOOST_TESTED_AT(600)) { }; #else result_; #endif public: typedef pair< typename result_::state , typename result_::iterator > type; BOOST_MPL_AUX_LAMBDA_SUPPORT( 6 , iter_fold_if , (Sequence,State,ForwardOp,ForwardPredicate,BackwardOp,BackwardPredicate) ) }; BOOST_MPL_AUX_NA_SPEC(6, iter_fold_if) }} #endif // BOOST_MPL_ITER_FOLD_IF_HPP_INCLUDED ================================================ FILE: benchmarks/boost/mpl/iterator_range.hpp ================================================ #ifndef BOOST_MPL_ITERATOR_RANGE_HPP_INCLUDED #define BOOST_MPL_ITERATOR_RANGE_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ #include #include namespace boost { namespace mpl { struct iterator_range_tag; template< typename BOOST_MPL_AUX_NA_PARAM(First) , typename BOOST_MPL_AUX_NA_PARAM(Last) > struct iterator_range { typedef iterator_range_tag tag; typedef iterator_range type; typedef First begin; typedef Last end; BOOST_MPL_AUX_LAMBDA_SUPPORT(2,iterator_range,(First,Last)) }; BOOST_MPL_AUX_NA_SPEC(2, iterator_range) }} #endif // BOOST_MPL_ITERATOR_RANGE_HPP_INCLUDED ================================================ FILE: benchmarks/boost/mpl/iterator_tags.hpp ================================================ #ifndef BOOST_MPL_ITERATOR_TAG_HPP_INCLUDED #define BOOST_MPL_ITERATOR_TAG_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ #include namespace boost { namespace mpl { struct forward_iterator_tag : int_<0> { typedef forward_iterator_tag type; }; struct bidirectional_iterator_tag : int_<1> { typedef bidirectional_iterator_tag type; }; struct random_access_iterator_tag : int_<2> { typedef random_access_iterator_tag type; }; }} #endif // BOOST_MPL_ITERATOR_TAG_HPP_INCLUDED ================================================ FILE: benchmarks/boost/mpl/key_type_fwd.hpp ================================================ #ifndef BOOST_MPL_KEY_TYPE_FWD_HPP_INCLUDED #define BOOST_MPL_KEY_TYPE_FWD_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2003-2004 // Copyright David Abrahams 2003-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ namespace boost { namespace mpl { template< typename Tag > struct key_type_impl; template< typename AssociativeSequence, typename T > struct key_type; }} #endif // BOOST_MPL_KEY_TYPE_FWD_HPP_INCLUDED ================================================ FILE: benchmarks/boost/mpl/lambda.hpp ================================================ #ifndef BOOST_MPL_LAMBDA_HPP_INCLUDED #define BOOST_MPL_LAMBDA_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ #include #include #include #if !defined(BOOST_MPL_CFG_NO_FULL_LAMBDA_SUPPORT) # include #else # include # include # define BOOST_MPL_CFG_NO_IMPLICIT_METAFUNCTIONS #endif #endif // BOOST_MPL_LAMBDA_HPP_INCLUDED ================================================ FILE: benchmarks/boost/mpl/lambda_fwd.hpp ================================================ #ifndef BOOST_MPL_LAMBDA_FWD_HPP_INCLUDED #define BOOST_MPL_LAMBDA_FWD_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ #include #include #include #if !defined(BOOST_MPL_CFG_NO_FULL_LAMBDA_SUPPORT) # include # include # include namespace boost { namespace mpl { template< typename T = na , typename Tag = void_ BOOST_MPL_AUX_LAMBDA_ARITY_PARAM( typename Arity = int_< aux::template_arity::value > ) > struct lambda; }} #else // BOOST_MPL_CFG_NO_FULL_LAMBDA_SUPPORT # include namespace boost { namespace mpl { template< typename T = na , typename Tag = void_ , typename Protect = true_ > struct lambda; }} #endif #endif // BOOST_MPL_LAMBDA_FWD_HPP_INCLUDED ================================================ FILE: benchmarks/boost/mpl/limits/arity.hpp ================================================ #ifndef BOOST_MPL_LIMITS_ARITY_HPP_INCLUDED #define BOOST_MPL_LIMITS_ARITY_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ #if !defined(BOOST_MPL_LIMIT_METAFUNCTION_ARITY) # define BOOST_MPL_LIMIT_METAFUNCTION_ARITY 5 #endif #endif // BOOST_MPL_LIMITS_ARITY_HPP_INCLUDED ================================================ FILE: benchmarks/boost/mpl/limits/list.hpp ================================================ #ifndef BOOST_MPL_LIMITS_LIST_HPP_INCLUDED #define BOOST_MPL_LIMITS_LIST_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ #if !defined(BOOST_MPL_LIMIT_LIST_SIZE) # define BOOST_MPL_LIMIT_LIST_SIZE 20 #endif #endif // BOOST_MPL_LIMITS_LIST_HPP_INCLUDED ================================================ FILE: benchmarks/boost/mpl/limits/unrolling.hpp ================================================ #ifndef BOOST_MPL_LIMITS_UNROLLING_HPP_INCLUDED #define BOOST_MPL_LIMITS_UNROLLING_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ #if !defined(BOOST_MPL_LIMIT_UNROLLING) # define BOOST_MPL_LIMIT_UNROLLING 4 #endif #endif // BOOST_MPL_LIMITS_UNROLLING_HPP_INCLUDED ================================================ FILE: benchmarks/boost/mpl/list/aux_/O1_size.hpp ================================================ #ifndef BOOST_MPL_LIST_AUX_O1_SIZE_HPP_INCLUDED #define BOOST_MPL_LIST_AUX_O1_SIZE_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ #include #include namespace boost { namespace mpl { template<> struct O1_size_impl< aux::list_tag > { template< typename List > struct apply : List::size { }; }; }} #endif // BOOST_MPL_LIST_AUX_O1_SIZE_HPP_INCLUDED ================================================ FILE: benchmarks/boost/mpl/list/aux_/begin_end.hpp ================================================ #ifndef BOOST_MPL_LIST_AUX_BEGIN_END_HPP_INCLUDED #define BOOST_MPL_LIST_AUX_BEGIN_END_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ #include #include #include #include namespace boost { namespace mpl { template<> struct begin_impl< aux::list_tag > { template< typename List > struct apply { typedef l_iter type; }; }; template<> struct end_impl< aux::list_tag > { template< typename > struct apply { typedef l_iter type; }; }; }} #endif // BOOST_MPL_LIST_AUX_BEGIN_END_HPP_INCLUDED ================================================ FILE: benchmarks/boost/mpl/list/aux_/clear.hpp ================================================ #ifndef BOOST_MPL_LIST_AUX_CLEAR_HPP_INCLUDED #define BOOST_MPL_LIST_AUX_CLEAR_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ #include #include #include namespace boost { namespace mpl { template<> struct clear_impl< aux::list_tag > { template< typename List > struct apply { typedef l_end type; }; }; }} #endif // BOOST_MPL_LIST_AUX_CLEAR_HPP_INCLUDED ================================================ FILE: benchmarks/boost/mpl/list/aux_/empty.hpp ================================================ #ifndef BOOST_MPL_LIST_AUX_EMPTY_HPP_INCLUDED #define BOOST_MPL_LIST_AUX_EMPTY_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ #include #include #include namespace boost { namespace mpl { template<> struct empty_impl< aux::list_tag > { template< typename List > struct apply : not_ { }; }; }} #endif // BOOST_MPL_LIST_AUX_EMPTY_HPP_INCLUDED ================================================ FILE: benchmarks/boost/mpl/list/aux_/front.hpp ================================================ #ifndef BOOST_MPL_LIST_AUX_FRONT_HPP_INCLUDED #define BOOST_MPL_LIST_AUX_FRONT_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ #include #include namespace boost { namespace mpl { template<> struct front_impl< aux::list_tag > { template< typename List > struct apply { typedef typename List::item type; }; }; }} #endif // BOOST_MPL_LIST_AUX_FRONT_HPP_INCLUDED ================================================ FILE: benchmarks/boost/mpl/list/aux_/include_preprocessed.hpp ================================================ // Copyright Aleksey Gurtovoy 2001-2006 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ // NO INCLUDE GUARDS, THE HEADER IS INTENDED FOR MULTIPLE INCLUSION! #include #include #include # define AUX778076_HEADER \ aux_/preprocessed/plain/BOOST_MPL_PREPROCESSED_HEADER \ /**/ #if BOOST_WORKAROUND(__IBMCPP__, BOOST_TESTED_AT(700)) # define AUX778076_INCLUDE_STRING BOOST_PP_STRINGIZE(boost/mpl/list/AUX778076_HEADER) # include AUX778076_INCLUDE_STRING # undef AUX778076_INCLUDE_STRING #else # include BOOST_PP_STRINGIZE(boost/mpl/list/AUX778076_HEADER) #endif # undef AUX778076_HEADER #undef BOOST_MPL_PREPROCESSED_HEADER ================================================ FILE: benchmarks/boost/mpl/list/aux_/item.hpp ================================================ #ifndef BOOST_MPL_LIST_AUX_NODE_HPP_INCLUDED #define BOOST_MPL_LIST_AUX_NODE_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ #include #include #include #include namespace boost { namespace mpl { template< typename Size , typename T , typename Next > struct l_item { // agurt, 17/jul/03: to facilitate the deficient 'is_sequence' implementation #if BOOST_WORKAROUND(BOOST_MSVC, <= 1300) typedef int begin; #endif typedef aux::list_tag tag; typedef l_item type; typedef Size size; typedef T item; typedef Next next; }; struct l_end { #if BOOST_WORKAROUND(BOOST_MSVC, <= 1300) typedef int begin; #endif typedef aux::list_tag tag; typedef l_end type; typedef long_<0> size; }; }} #endif // BOOST_MPL_LIST_AUX_NODE_HPP_INCLUDED ================================================ FILE: benchmarks/boost/mpl/list/aux_/iterator.hpp ================================================ #ifndef BOOST_MPL_LIST_AUX_ITERATOR_HPP_INCLUDED #define BOOST_MPL_LIST_AUX_ITERATOR_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ #include #include #include #include #include #include #include namespace boost { namespace mpl { #if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) template< typename Node > struct l_iter { typedef aux::l_iter_tag tag; typedef forward_iterator_tag category; }; template< typename Node > struct deref< l_iter > { typedef typename Node::item type; }; template< typename Node > struct next< l_iter > { typedef l_iter< typename Node::next > type; }; #else // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION template< typename Node > struct l_iter { typedef aux::l_iter_tag tag; typedef forward_iterator_tag category; typedef typename Node::item type; typedef l_iter< typename mpl::next::type > next; }; #endif template<> struct l_iter { typedef aux::l_iter_tag tag; typedef forward_iterator_tag category; #if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) typedef na type; typedef l_iter next; #endif }; BOOST_MPL_AUX_PASS_THROUGH_LAMBDA_SPEC(1, l_iter) }} #endif // BOOST_MPL_LIST_AUX_ITERATOR_HPP_INCLUDED ================================================ FILE: benchmarks/boost/mpl/list/aux_/numbered.hpp ================================================ // NO INCLUDE GUARDS, THE HEADER IS INTENDED FOR MULTIPLE INCLUSION // Copyright Peter Dimov 2000-2002 // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ #if defined(BOOST_PP_IS_ITERATING) #include #include #include #include #define i BOOST_PP_FRAME_ITERATION(1) #if i == 1 template< BOOST_PP_ENUM_PARAMS(i, typename T) > struct list1 : l_item< long_<1> , T0 , l_end > { typedef list1 type; }; #else # define MPL_AUX_LIST_TAIL(list, i, T) \ BOOST_PP_CAT(list,BOOST_PP_DEC(i))< \ BOOST_PP_ENUM_SHIFTED_PARAMS(i, T) \ > \ /**/ template< BOOST_PP_ENUM_PARAMS(i, typename T) > struct BOOST_PP_CAT(list,i) : l_item< long_ , T0 , MPL_AUX_LIST_TAIL(list,i,T) > { typedef BOOST_PP_CAT(list,i) type; }; # undef MPL_AUX_LIST_TAIL #endif // i == 1 #undef i #endif // BOOST_PP_IS_ITERATING ================================================ FILE: benchmarks/boost/mpl/list/aux_/numbered_c.hpp ================================================ // NO INCLUDE GUARDS, THE HEADER IS INTENDED FOR MULTIPLE INCLUSION // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ #if defined(BOOST_PP_IS_ITERATING) #include #include #include #include #define i BOOST_PP_FRAME_ITERATION(1) #if i == 1 template< typename T , BOOST_PP_ENUM_PARAMS(i, T C) > struct list1_c : l_item< long_<1> , integral_c , l_end > { typedef list1_c type; typedef T value_type; }; #else # define MPL_AUX_LIST_C_TAIL(list, i, C) \ BOOST_PP_CAT(BOOST_PP_CAT(list,BOOST_PP_DEC(i)),_c) \ /**/ template< typename T , BOOST_PP_ENUM_PARAMS(i, T C) > struct BOOST_PP_CAT(BOOST_PP_CAT(list,i),_c) : l_item< long_ , integral_c , MPL_AUX_LIST_C_TAIL(list,i,C) > { typedef BOOST_PP_CAT(BOOST_PP_CAT(list,i),_c) type; typedef T value_type; }; # undef MPL_AUX_LIST_C_TAIL #endif // i == 1 #undef i #endif // BOOST_PP_IS_ITERATING ================================================ FILE: benchmarks/boost/mpl/list/aux_/pop_front.hpp ================================================ #ifndef BOOST_MPL_LIST_AUX_POP_FRONT_HPP_INCLUDED #define BOOST_MPL_LIST_AUX_POP_FRONT_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ #include #include #include namespace boost { namespace mpl { template<> struct pop_front_impl< aux::list_tag > { template< typename List > struct apply { typedef typename mpl::next::type type; }; }; }} #endif // BOOST_MPL_LIST_AUX_POP_FRONT_HPP_INCLUDED ================================================ FILE: benchmarks/boost/mpl/list/aux_/preprocessed/plain/list10.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/list/list10.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename T0 > struct list1 : l_item< long_<1> , T0 , l_end > { typedef list1 type; }; template< typename T0, typename T1 > struct list2 : l_item< long_<2> , T0 , list1 > { typedef list2 type; }; template< typename T0, typename T1, typename T2 > struct list3 : l_item< long_<3> , T0 , list2< T1,T2 > > { typedef list3 type; }; template< typename T0, typename T1, typename T2, typename T3 > struct list4 : l_item< long_<4> , T0 , list3< T1,T2,T3 > > { typedef list4 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 > struct list5 : l_item< long_<5> , T0 , list4< T1,T2,T3,T4 > > { typedef list5 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5 > struct list6 : l_item< long_<6> , T0 , list5< T1,T2,T3,T4,T5 > > { typedef list6 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6 > struct list7 : l_item< long_<7> , T0 , list6< T1,T2,T3,T4,T5,T6 > > { typedef list7 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7 > struct list8 : l_item< long_<8> , T0 , list7< T1,T2,T3,T4,T5,T6,T7 > > { typedef list8 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8 > struct list9 : l_item< long_<9> , T0 , list8< T1,T2,T3,T4,T5,T6,T7,T8 > > { typedef list9 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 > struct list10 : l_item< long_<10> , T0 , list9< T1,T2,T3,T4,T5,T6,T7,T8,T9 > > { typedef list10 type; }; }} ================================================ FILE: benchmarks/boost/mpl/list/aux_/preprocessed/plain/list10_c.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/list/list10_c.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename T , T C0 > struct list1_c : l_item< long_<1> , integral_c< T,C0 > , l_end > { typedef list1_c type; typedef T value_type; }; template< typename T , T C0, T C1 > struct list2_c : l_item< long_<2> , integral_c< T,C0 > , list1_c< T,C1 > > { typedef list2_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2 > struct list3_c : l_item< long_<3> , integral_c< T,C0 > , list2_c< T,C1,C2 > > { typedef list3_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3 > struct list4_c : l_item< long_<4> , integral_c< T,C0 > , list3_c< T,C1,C2,C3 > > { typedef list4_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4 > struct list5_c : l_item< long_<5> , integral_c< T,C0 > , list4_c< T,C1,C2,C3,C4 > > { typedef list5_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5 > struct list6_c : l_item< long_<6> , integral_c< T,C0 > , list5_c< T,C1,C2,C3,C4,C5 > > { typedef list6_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6 > struct list7_c : l_item< long_<7> , integral_c< T,C0 > , list6_c< T,C1,C2,C3,C4,C5,C6 > > { typedef list7_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7 > struct list8_c : l_item< long_<8> , integral_c< T,C0 > , list7_c< T,C1,C2,C3,C4,C5,C6,C7 > > { typedef list8_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8 > struct list9_c : l_item< long_<9> , integral_c< T,C0 > , list8_c< T,C1,C2,C3,C4,C5,C6,C7,C8 > > { typedef list9_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9 > struct list10_c : l_item< long_<10> , integral_c< T,C0 > , list9_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9 > > { typedef list10_c type; typedef T value_type; }; }} ================================================ FILE: benchmarks/boost/mpl/list/aux_/preprocessed/plain/list20.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/list/list20.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10 > struct list11 : l_item< long_<11> , T0 , list10< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 > > { typedef list11 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11 > struct list12 : l_item< long_<12> , T0 , list11< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 > > { typedef list12 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12 > struct list13 : l_item< long_<13> , T0 , list12< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 > > { typedef list13 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13 > struct list14 : l_item< long_<14> , T0 , list13< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 > > { typedef list14 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 > struct list15 : l_item< long_<15> , T0 , list14< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 > > { typedef list15 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15 > struct list16 : l_item< long_<16> , T0 , list15< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 > > { typedef list16 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16 > struct list17 : l_item< long_<17> , T0 , list16< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 > > { typedef list17 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17 > struct list18 : l_item< long_<18> , T0 , list17< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 > > { typedef list18 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18 > struct list19 : l_item< long_<19> , T0 , list18< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 > > { typedef list19 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 > struct list20 : l_item< long_<20> , T0 , list19< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 > > { typedef list20 type; }; }} ================================================ FILE: benchmarks/boost/mpl/list/aux_/preprocessed/plain/list20_c.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/list/list20_c.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 > struct list11_c : l_item< long_<11> , integral_c< T,C0 > , list10_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10 > > { typedef list11_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11 > struct list12_c : l_item< long_<12> , integral_c< T,C0 > , list11_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11 > > { typedef list12_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12 > struct list13_c : l_item< long_<13> , integral_c< T,C0 > , list12_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12 > > { typedef list13_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13 > struct list14_c : l_item< long_<14> , integral_c< T,C0 > , list13_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13 > > { typedef list14_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14 > struct list15_c : l_item< long_<15> , integral_c< T,C0 > , list14_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14 > > { typedef list15_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15 > struct list16_c : l_item< long_<16> , integral_c< T,C0 > , list15_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15 > > { typedef list16_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15, T C16 > struct list17_c : l_item< long_<17> , integral_c< T,C0 > , list16_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16 > > { typedef list17_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15, T C16, T C17 > struct list18_c : l_item< long_<18> , integral_c< T,C0 > , list17_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17 > > { typedef list18_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18 > struct list19_c : l_item< long_<19> , integral_c< T,C0 > , list18_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18 > > { typedef list19_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19 > struct list20_c : l_item< long_<20> , integral_c< T,C0 > , list19_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19 > > { typedef list20_c type; typedef T value_type; }; }} ================================================ FILE: benchmarks/boost/mpl/list/aux_/preprocessed/plain/list30.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/list/list30.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 , typename T20 > struct list21 : l_item< long_<21> , T0 , list20< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20 > > { typedef list21 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 , typename T20, typename T21 > struct list22 : l_item< long_<22> , T0 , list21< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21 > > { typedef list22 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 , typename T20, typename T21, typename T22 > struct list23 : l_item< long_<23> , T0 , list22< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22 > > { typedef list23 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 , typename T20, typename T21, typename T22, typename T23 > struct list24 : l_item< long_<24> , T0 , list23< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23 > > { typedef list24 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 , typename T20, typename T21, typename T22, typename T23, typename T24 > struct list25 : l_item< long_<25> , T0 , list24< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24 > > { typedef list25 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 , typename T20, typename T21, typename T22, typename T23, typename T24 , typename T25 > struct list26 : l_item< long_<26> , T0 , list25< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25 > > { typedef list26 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 , typename T20, typename T21, typename T22, typename T23, typename T24 , typename T25, typename T26 > struct list27 : l_item< long_<27> , T0 , list26< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26 > > { typedef list27 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 , typename T20, typename T21, typename T22, typename T23, typename T24 , typename T25, typename T26, typename T27 > struct list28 : l_item< long_<28> , T0 , list27< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27 > > { typedef list28 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 , typename T20, typename T21, typename T22, typename T23, typename T24 , typename T25, typename T26, typename T27, typename T28 > struct list29 : l_item< long_<29> , T0 , list28< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28 > > { typedef list29 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 , typename T20, typename T21, typename T22, typename T23, typename T24 , typename T25, typename T26, typename T27, typename T28, typename T29 > struct list30 : l_item< long_<30> , T0 , list29< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29 > > { typedef list30 type; }; }} ================================================ FILE: benchmarks/boost/mpl/list/aux_/preprocessed/plain/list30_c.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/list/list30_c.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 > struct list21_c : l_item< long_<21> , integral_c< T,C0 > , list20_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20 > > { typedef list21_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 , T C21 > struct list22_c : l_item< long_<22> , integral_c< T,C0 > , list21_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21 > > { typedef list22_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 , T C21, T C22 > struct list23_c : l_item< long_<23> , integral_c< T,C0 > , list22_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22 > > { typedef list23_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 , T C21, T C22, T C23 > struct list24_c : l_item< long_<24> , integral_c< T,C0 > , list23_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23 > > { typedef list24_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 , T C21, T C22, T C23, T C24 > struct list25_c : l_item< long_<25> , integral_c< T,C0 > , list24_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24 > > { typedef list25_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 , T C21, T C22, T C23, T C24, T C25 > struct list26_c : l_item< long_<26> , integral_c< T,C0 > , list25_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25 > > { typedef list26_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 , T C21, T C22, T C23, T C24, T C25, T C26 > struct list27_c : l_item< long_<27> , integral_c< T,C0 > , list26_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26 > > { typedef list27_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 , T C21, T C22, T C23, T C24, T C25, T C26, T C27 > struct list28_c : l_item< long_<28> , integral_c< T,C0 > , list27_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27 > > { typedef list28_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28 > struct list29_c : l_item< long_<29> , integral_c< T,C0 > , list28_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28 > > { typedef list29_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29 > struct list30_c : l_item< long_<30> , integral_c< T,C0 > , list29_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29 > > { typedef list30_c type; typedef T value_type; }; }} ================================================ FILE: benchmarks/boost/mpl/list/aux_/preprocessed/plain/list40.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/list/list40.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 , typename T20, typename T21, typename T22, typename T23, typename T24 , typename T25, typename T26, typename T27, typename T28, typename T29 , typename T30 > struct list31 : l_item< long_<31> , T0 , list30< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30 > > { typedef list31 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 , typename T20, typename T21, typename T22, typename T23, typename T24 , typename T25, typename T26, typename T27, typename T28, typename T29 , typename T30, typename T31 > struct list32 : l_item< long_<32> , T0 , list31< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31 > > { typedef list32 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 , typename T20, typename T21, typename T22, typename T23, typename T24 , typename T25, typename T26, typename T27, typename T28, typename T29 , typename T30, typename T31, typename T32 > struct list33 : l_item< long_<33> , T0 , list32< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32 > > { typedef list33 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 , typename T20, typename T21, typename T22, typename T23, typename T24 , typename T25, typename T26, typename T27, typename T28, typename T29 , typename T30, typename T31, typename T32, typename T33 > struct list34 : l_item< long_<34> , T0 , list33< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33 > > { typedef list34 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 , typename T20, typename T21, typename T22, typename T23, typename T24 , typename T25, typename T26, typename T27, typename T28, typename T29 , typename T30, typename T31, typename T32, typename T33, typename T34 > struct list35 : l_item< long_<35> , T0 , list34< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34 > > { typedef list35 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 , typename T20, typename T21, typename T22, typename T23, typename T24 , typename T25, typename T26, typename T27, typename T28, typename T29 , typename T30, typename T31, typename T32, typename T33, typename T34 , typename T35 > struct list36 : l_item< long_<36> , T0 , list35< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35 > > { typedef list36 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 , typename T20, typename T21, typename T22, typename T23, typename T24 , typename T25, typename T26, typename T27, typename T28, typename T29 , typename T30, typename T31, typename T32, typename T33, typename T34 , typename T35, typename T36 > struct list37 : l_item< long_<37> , T0 , list36< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36 > > { typedef list37 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 , typename T20, typename T21, typename T22, typename T23, typename T24 , typename T25, typename T26, typename T27, typename T28, typename T29 , typename T30, typename T31, typename T32, typename T33, typename T34 , typename T35, typename T36, typename T37 > struct list38 : l_item< long_<38> , T0 , list37< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37 > > { typedef list38 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 , typename T20, typename T21, typename T22, typename T23, typename T24 , typename T25, typename T26, typename T27, typename T28, typename T29 , typename T30, typename T31, typename T32, typename T33, typename T34 , typename T35, typename T36, typename T37, typename T38 > struct list39 : l_item< long_<39> , T0 , list38< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37,T38 > > { typedef list39 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 , typename T20, typename T21, typename T22, typename T23, typename T24 , typename T25, typename T26, typename T27, typename T28, typename T29 , typename T30, typename T31, typename T32, typename T33, typename T34 , typename T35, typename T36, typename T37, typename T38, typename T39 > struct list40 : l_item< long_<40> , T0 , list39< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37,T38,T39 > > { typedef list40 type; }; }} ================================================ FILE: benchmarks/boost/mpl/list/aux_/preprocessed/plain/list40_c.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/list/list40_c.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30 > struct list31_c : l_item< long_<31> , integral_c< T,C0 > , list30_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30 > > { typedef list31_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30 , T C31 > struct list32_c : l_item< long_<32> , integral_c< T,C0 > , list31_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31 > > { typedef list32_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30 , T C31, T C32 > struct list33_c : l_item< long_<33> , integral_c< T,C0 > , list32_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32 > > { typedef list33_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30 , T C31, T C32, T C33 > struct list34_c : l_item< long_<34> , integral_c< T,C0 > , list33_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33 > > { typedef list34_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30 , T C31, T C32, T C33, T C34 > struct list35_c : l_item< long_<35> , integral_c< T,C0 > , list34_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34 > > { typedef list35_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30 , T C31, T C32, T C33, T C34, T C35 > struct list36_c : l_item< long_<36> , integral_c< T,C0 > , list35_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35 > > { typedef list36_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30 , T C31, T C32, T C33, T C34, T C35, T C36 > struct list37_c : l_item< long_<37> , integral_c< T,C0 > , list36_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36 > > { typedef list37_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30 , T C31, T C32, T C33, T C34, T C35, T C36, T C37 > struct list38_c : l_item< long_<38> , integral_c< T,C0 > , list37_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36,C37 > > { typedef list38_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30 , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38 > struct list39_c : l_item< long_<39> , integral_c< T,C0 > , list38_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36,C37,C38 > > { typedef list39_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30 , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38, T C39 > struct list40_c : l_item< long_<40> , integral_c< T,C0 > , list39_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36,C37,C38,C39 > > { typedef list40_c type; typedef T value_type; }; }} ================================================ FILE: benchmarks/boost/mpl/list/aux_/preprocessed/plain/list50.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/list/list50.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 , typename T20, typename T21, typename T22, typename T23, typename T24 , typename T25, typename T26, typename T27, typename T28, typename T29 , typename T30, typename T31, typename T32, typename T33, typename T34 , typename T35, typename T36, typename T37, typename T38, typename T39 , typename T40 > struct list41 : l_item< long_<41> , T0 , list40< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37,T38,T39,T40 > > { typedef list41 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 , typename T20, typename T21, typename T22, typename T23, typename T24 , typename T25, typename T26, typename T27, typename T28, typename T29 , typename T30, typename T31, typename T32, typename T33, typename T34 , typename T35, typename T36, typename T37, typename T38, typename T39 , typename T40, typename T41 > struct list42 : l_item< long_<42> , T0 , list41< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37,T38,T39,T40,T41 > > { typedef list42 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 , typename T20, typename T21, typename T22, typename T23, typename T24 , typename T25, typename T26, typename T27, typename T28, typename T29 , typename T30, typename T31, typename T32, typename T33, typename T34 , typename T35, typename T36, typename T37, typename T38, typename T39 , typename T40, typename T41, typename T42 > struct list43 : l_item< long_<43> , T0 , list42< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37,T38,T39,T40,T41,T42 > > { typedef list43 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 , typename T20, typename T21, typename T22, typename T23, typename T24 , typename T25, typename T26, typename T27, typename T28, typename T29 , typename T30, typename T31, typename T32, typename T33, typename T34 , typename T35, typename T36, typename T37, typename T38, typename T39 , typename T40, typename T41, typename T42, typename T43 > struct list44 : l_item< long_<44> , T0 , list43< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37,T38,T39,T40,T41,T42,T43 > > { typedef list44 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 , typename T20, typename T21, typename T22, typename T23, typename T24 , typename T25, typename T26, typename T27, typename T28, typename T29 , typename T30, typename T31, typename T32, typename T33, typename T34 , typename T35, typename T36, typename T37, typename T38, typename T39 , typename T40, typename T41, typename T42, typename T43, typename T44 > struct list45 : l_item< long_<45> , T0 , list44< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37,T38,T39,T40,T41,T42,T43,T44 > > { typedef list45 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 , typename T20, typename T21, typename T22, typename T23, typename T24 , typename T25, typename T26, typename T27, typename T28, typename T29 , typename T30, typename T31, typename T32, typename T33, typename T34 , typename T35, typename T36, typename T37, typename T38, typename T39 , typename T40, typename T41, typename T42, typename T43, typename T44 , typename T45 > struct list46 : l_item< long_<46> , T0 , list45< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37,T38,T39,T40,T41,T42,T43,T44,T45 > > { typedef list46 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 , typename T20, typename T21, typename T22, typename T23, typename T24 , typename T25, typename T26, typename T27, typename T28, typename T29 , typename T30, typename T31, typename T32, typename T33, typename T34 , typename T35, typename T36, typename T37, typename T38, typename T39 , typename T40, typename T41, typename T42, typename T43, typename T44 , typename T45, typename T46 > struct list47 : l_item< long_<47> , T0 , list46< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37,T38,T39,T40,T41,T42,T43,T44,T45,T46 > > { typedef list47 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 , typename T20, typename T21, typename T22, typename T23, typename T24 , typename T25, typename T26, typename T27, typename T28, typename T29 , typename T30, typename T31, typename T32, typename T33, typename T34 , typename T35, typename T36, typename T37, typename T38, typename T39 , typename T40, typename T41, typename T42, typename T43, typename T44 , typename T45, typename T46, typename T47 > struct list48 : l_item< long_<48> , T0 , list47< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37,T38,T39,T40,T41,T42,T43,T44,T45,T46,T47 > > { typedef list48 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 , typename T20, typename T21, typename T22, typename T23, typename T24 , typename T25, typename T26, typename T27, typename T28, typename T29 , typename T30, typename T31, typename T32, typename T33, typename T34 , typename T35, typename T36, typename T37, typename T38, typename T39 , typename T40, typename T41, typename T42, typename T43, typename T44 , typename T45, typename T46, typename T47, typename T48 > struct list49 : l_item< long_<49> , T0 , list48< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37,T38,T39,T40,T41,T42,T43,T44,T45,T46,T47,T48 > > { typedef list49 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 , typename T20, typename T21, typename T22, typename T23, typename T24 , typename T25, typename T26, typename T27, typename T28, typename T29 , typename T30, typename T31, typename T32, typename T33, typename T34 , typename T35, typename T36, typename T37, typename T38, typename T39 , typename T40, typename T41, typename T42, typename T43, typename T44 , typename T45, typename T46, typename T47, typename T48, typename T49 > struct list50 : l_item< long_<50> , T0 , list49< T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37,T38,T39,T40,T41,T42,T43,T44,T45,T46,T47,T48,T49 > > { typedef list50 type; }; }} ================================================ FILE: benchmarks/boost/mpl/list/aux_/preprocessed/plain/list50_c.hpp ================================================ // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/list/list50_c.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30 , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38, T C39, T C40 > struct list41_c : l_item< long_<41> , integral_c< T,C0 > , list40_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36,C37,C38,C39,C40 > > { typedef list41_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30 , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38, T C39, T C40 , T C41 > struct list42_c : l_item< long_<42> , integral_c< T,C0 > , list41_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36,C37,C38,C39,C40,C41 > > { typedef list42_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30 , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38, T C39, T C40 , T C41, T C42 > struct list43_c : l_item< long_<43> , integral_c< T,C0 > , list42_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36,C37,C38,C39,C40,C41,C42 > > { typedef list43_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30 , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38, T C39, T C40 , T C41, T C42, T C43 > struct list44_c : l_item< long_<44> , integral_c< T,C0 > , list43_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36,C37,C38,C39,C40,C41,C42,C43 > > { typedef list44_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30 , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38, T C39, T C40 , T C41, T C42, T C43, T C44 > struct list45_c : l_item< long_<45> , integral_c< T,C0 > , list44_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36,C37,C38,C39,C40,C41,C42,C43,C44 > > { typedef list45_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30 , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38, T C39, T C40 , T C41, T C42, T C43, T C44, T C45 > struct list46_c : l_item< long_<46> , integral_c< T,C0 > , list45_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36,C37,C38,C39,C40,C41,C42,C43,C44,C45 > > { typedef list46_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30 , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38, T C39, T C40 , T C41, T C42, T C43, T C44, T C45, T C46 > struct list47_c : l_item< long_<47> , integral_c< T,C0 > , list46_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36,C37,C38,C39,C40,C41,C42,C43,C44,C45,C46 > > { typedef list47_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30 , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38, T C39, T C40 , T C41, T C42, T C43, T C44, T C45, T C46, T C47 > struct list48_c : l_item< long_<48> , integral_c< T,C0 > , list47_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36,C37,C38,C39,C40,C41,C42,C43,C44,C45,C46,C47 > > { typedef list48_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30 , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38, T C39, T C40 , T C41, T C42, T C43, T C44, T C45, T C46, T C47, T C48 > struct list49_c : l_item< long_<49> , integral_c< T,C0 > , list48_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36,C37,C38,C39,C40,C41,C42,C43,C44,C45,C46,C47,C48 > > { typedef list49_c type; typedef T value_type; }; template< typename T , T C0, T C1, T C2, T C3, T C4, T C5, T C6, T C7, T C8, T C9, T C10 , T C11, T C12, T C13, T C14, T C15, T C16, T C17, T C18, T C19, T C20 , T C21, T C22, T C23, T C24, T C25, T C26, T C27, T C28, T C29, T C30 , T C31, T C32, T C33, T C34, T C35, T C36, T C37, T C38, T C39, T C40 , T C41, T C42, T C43, T C44, T C45, T C46, T C47, T C48, T C49 > struct list50_c : l_item< long_<50> , integral_c< T,C0 > , list49_c< T,C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11,C12,C13,C14,C15,C16,C17,C18,C19,C20,C21,C22,C23,C24,C25,C26,C27,C28,C29,C30,C31,C32,C33,C34,C35,C36,C37,C38,C39,C40,C41,C42,C43,C44,C45,C46,C47,C48,C49 > > { typedef list50_c type; typedef T value_type; }; }} ================================================ FILE: benchmarks/boost/mpl/list/aux_/push_back.hpp ================================================ #ifndef BOOST_MPL_LIST_AUX_PUSH_BACK_HPP_INCLUDED #define BOOST_MPL_LIST_AUX_PUSH_BACK_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ #include #include #include namespace boost { namespace mpl { template< typename Tag > struct has_push_back_impl; template<> struct has_push_back_impl< aux::list_tag > { template< typename Seq > struct apply : false_ { }; }; }} #endif // BOOST_MPL_LIST_AUX_PUSH_BACK_HPP_INCLUDED ================================================ FILE: benchmarks/boost/mpl/list/aux_/push_front.hpp ================================================ #ifndef BOOST_MPL_LIST_AUX_PUSH_FRONT_HPP_INCLUDED #define BOOST_MPL_LIST_AUX_PUSH_FRONT_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ #include #include #include #include namespace boost { namespace mpl { template<> struct push_front_impl< aux::list_tag > { template< typename List, typename T > struct apply { typedef l_item< typename next::type , T , typename List::type > type; }; }; }} #endif // BOOST_MPL_LIST_AUX_PUSH_FRONT_HPP_INCLUDED ================================================ FILE: benchmarks/boost/mpl/list/aux_/size.hpp ================================================ #ifndef BOOST_MPL_LIST_AUX_SIZE_HPP_INCLUDED #define BOOST_MPL_LIST_AUX_SIZE_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ #include #include namespace boost { namespace mpl { template<> struct size_impl< aux::list_tag > { template< typename List > struct apply : List::size { }; }; }} #endif // BOOST_MPL_LIST_AUX_SIZE_HPP_INCLUDED ================================================ FILE: benchmarks/boost/mpl/list/aux_/tag.hpp ================================================ #ifndef BOOST_MPL_LIST_AUX_TAG_HPP_INCLUDED #define BOOST_MPL_LIST_AUX_TAG_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ namespace boost { namespace mpl { namespace aux { struct list_tag; struct l_iter_tag; }}} #endif // BOOST_MPL_LIST_AUX_TAG_HPP_INCLUDED ================================================ FILE: benchmarks/boost/mpl/list/list0.hpp ================================================ #ifndef BOOST_MPL_LIST_LIST0_HPP_INCLUDED #define BOOST_MPL_LIST_LIST0_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ #include #include #include #include #include #include #include #include #include #include #include #include namespace boost { namespace mpl { template< typename Dummy = na > struct list0; template<> struct list0 : l_end { typedef l_end type; }; }} #endif // BOOST_MPL_LIST_LIST0_HPP_INCLUDED ================================================ FILE: benchmarks/boost/mpl/list/list0_c.hpp ================================================ #ifndef BOOST_MPL_LIST_LIST0_C_HPP_INCLUDED #define BOOST_MPL_LIST_LIST0_C_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ #include #include namespace boost { namespace mpl { template< typename T > struct list0_c : l_end { typedef l_end type; typedef T value_type; }; }} #endif // BOOST_MPL_LIST_LIST0_C_HPP_INCLUDED ================================================ FILE: benchmarks/boost/mpl/list/list10.hpp ================================================ #ifndef BOOST_MPL_LIST_LIST10_HPP_INCLUDED #define BOOST_MPL_LIST_LIST10_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ #if !defined(BOOST_MPL_PREPROCESSING_MODE) # include #endif #include #if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ && !defined(BOOST_MPL_PREPROCESSING_MODE) # define BOOST_MPL_PREPROCESSED_HEADER list10.hpp # include #else # include namespace boost { namespace mpl { # define BOOST_PP_ITERATION_PARAMS_1 \ (3,(1, 10, )) # include BOOST_PP_ITERATE() }} #endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS #endif // BOOST_MPL_LIST_LIST10_HPP_INCLUDED ================================================ FILE: benchmarks/boost/mpl/list/list10_c.hpp ================================================ #ifndef BOOST_MPL_LIST_LIST10_C_HPP_INCLUDED #define BOOST_MPL_LIST_LIST10_C_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ #if !defined(BOOST_MPL_PREPROCESSING_MODE) # include #endif #include #if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ && !defined(BOOST_MPL_PREPROCESSING_MODE) # define BOOST_MPL_PREPROCESSED_HEADER list10_c.hpp # include #else # include namespace boost { namespace mpl { # define BOOST_PP_ITERATION_PARAMS_1 \ (3,(1, 10, )) # include BOOST_PP_ITERATE() }} #endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS #endif // BOOST_MPL_LIST_LIST10_C_HPP_INCLUDED ================================================ FILE: benchmarks/boost/mpl/list/list20.hpp ================================================ #ifndef BOOST_MPL_LIST_LIST20_HPP_INCLUDED #define BOOST_MPL_LIST_LIST20_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ #if !defined(BOOST_MPL_PREPROCESSING_MODE) # include #endif #include #if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ && !defined(BOOST_MPL_PREPROCESSING_MODE) # define BOOST_MPL_PREPROCESSED_HEADER list20.hpp # include #else # include namespace boost { namespace mpl { # define BOOST_PP_ITERATION_PARAMS_1 \ (3,(11, 20, )) # include BOOST_PP_ITERATE() }} #endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS #endif // BOOST_MPL_LIST_LIST20_HPP_INCLUDED ================================================ FILE: benchmarks/boost/mpl/list/list20_c.hpp ================================================ #ifndef BOOST_MPL_LIST_LIST20_C_HPP_INCLUDED #define BOOST_MPL_LIST_LIST20_C_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ #if !defined(BOOST_MPL_PREPROCESSING_MODE) # include #endif #include #if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ && !defined(BOOST_MPL_PREPROCESSING_MODE) # define BOOST_MPL_PREPROCESSED_HEADER list20_c.hpp # include #else # include namespace boost { namespace mpl { # define BOOST_PP_ITERATION_PARAMS_1 \ (3,(11, 20, )) # include BOOST_PP_ITERATE() }} #endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS #endif // BOOST_MPL_LIST_LIST20_C_HPP_INCLUDED ================================================ FILE: benchmarks/boost/mpl/list/list30.hpp ================================================ #ifndef BOOST_MPL_LIST_LIST30_HPP_INCLUDED #define BOOST_MPL_LIST_LIST30_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ #if !defined(BOOST_MPL_PREPROCESSING_MODE) # include #endif #include #if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ && !defined(BOOST_MPL_PREPROCESSING_MODE) # define BOOST_MPL_PREPROCESSED_HEADER list30.hpp # include #else # include namespace boost { namespace mpl { # define BOOST_PP_ITERATION_PARAMS_1 \ (3,(21, 30, )) # include BOOST_PP_ITERATE() }} #endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS #endif // BOOST_MPL_LIST_LIST30_HPP_INCLUDED ================================================ FILE: benchmarks/boost/mpl/list/list30_c.hpp ================================================ #ifndef BOOST_MPL_LIST_LIST30_C_HPP_INCLUDED #define BOOST_MPL_LIST_LIST30_C_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ #if !defined(BOOST_MPL_PREPROCESSING_MODE) # include #endif #include #if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ && !defined(BOOST_MPL_PREPROCESSING_MODE) # define BOOST_MPL_PREPROCESSED_HEADER list30_c.hpp # include #else # include namespace boost { namespace mpl { # define BOOST_PP_ITERATION_PARAMS_1 \ (3,(21, 30, )) # include BOOST_PP_ITERATE() }} #endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS #endif // BOOST_MPL_LIST_LIST30_C_HPP_INCLUDED ================================================ FILE: benchmarks/boost/mpl/list/list40.hpp ================================================ #ifndef BOOST_MPL_LIST_LIST40_HPP_INCLUDED #define BOOST_MPL_LIST_LIST40_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ #if !defined(BOOST_MPL_PREPROCESSING_MODE) # include #endif #include #if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ && !defined(BOOST_MPL_PREPROCESSING_MODE) # define BOOST_MPL_PREPROCESSED_HEADER list40.hpp # include #else # include namespace boost { namespace mpl { # define BOOST_PP_ITERATION_PARAMS_1 \ (3,(31, 40, )) # include BOOST_PP_ITERATE() }} #endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS #endif // BOOST_MPL_LIST_LIST40_HPP_INCLUDED ================================================ FILE: benchmarks/boost/mpl/list/list40_c.hpp ================================================ #ifndef BOOST_MPL_LIST_LIST40_C_HPP_INCLUDED #define BOOST_MPL_LIST_LIST40_C_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ #if !defined(BOOST_MPL_PREPROCESSING_MODE) # include #endif #include #if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ && !defined(BOOST_MPL_PREPROCESSING_MODE) # define BOOST_MPL_PREPROCESSED_HEADER list40_c.hpp # include #else # include namespace boost { namespace mpl { # define BOOST_PP_ITERATION_PARAMS_1 \ (3,(31, 40, )) # include BOOST_PP_ITERATE() }} #endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS #endif // BOOST_MPL_LIST_LIST40_C_HPP_INCLUDED ================================================ FILE: benchmarks/boost/mpl/list/list50.hpp ================================================ #ifndef BOOST_MPL_LIST_LIST50_HPP_INCLUDED #define BOOST_MPL_LIST_LIST50_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ #if !defined(BOOST_MPL_PREPROCESSING_MODE) # include #endif #include #if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ && !defined(BOOST_MPL_PREPROCESSING_MODE) # define BOOST_MPL_PREPROCESSED_HEADER list50.hpp # include #else # include namespace boost { namespace mpl { # define BOOST_PP_ITERATION_PARAMS_1 \ (3,(41, 50, )) # include BOOST_PP_ITERATE() }} #endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS #endif // BOOST_MPL_LIST_LIST50_HPP_INCLUDED ================================================ FILE: benchmarks/boost/mpl/list/list50_c.hpp ================================================ #ifndef BOOST_MPL_LIST_LIST50_C_HPP_INCLUDED #define BOOST_MPL_LIST_LIST50_C_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ #if !defined(BOOST_MPL_PREPROCESSING_MODE) # include #endif #include #if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ && !defined(BOOST_MPL_PREPROCESSING_MODE) # define BOOST_MPL_PREPROCESSED_HEADER list50_c.hpp # include #else # include namespace boost { namespace mpl { # define BOOST_PP_ITERATION_PARAMS_1 \ (3,(41, 50, )) # include BOOST_PP_ITERATE() }} #endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS #endif // BOOST_MPL_LIST_LIST50_C_HPP_INCLUDED ================================================ FILE: benchmarks/boost/mpl/list.hpp ================================================ #ifndef BOOST_MPL_LIST_HPP_INCLUDED #define BOOST_MPL_LIST_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ #if !defined(BOOST_MPL_PREPROCESSING_MODE) # include # include # include # include # include # include #if !defined(BOOST_NEEDS_TOKEN_PASTING_OP_FOR_TOKENS_JUXTAPOSING) # define AUX778076_LIST_HEADER \ BOOST_PP_CAT(list,BOOST_MPL_LIMIT_LIST_SIZE).hpp \ /**/ #else # define AUX778076_LIST_HEADER \ BOOST_PP_CAT(list,BOOST_MPL_LIMIT_LIST_SIZE)##.hpp \ /**/ #endif # include BOOST_PP_STRINGIZE(boost/mpl/list/AUX778076_LIST_HEADER) # undef AUX778076_LIST_HEADER #endif #include #if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ && !defined(BOOST_MPL_PREPROCESSING_MODE) # define BOOST_MPL_PREPROCESSED_HEADER list.hpp # include #else # include # define AUX778076_SEQUENCE_NAME list # define AUX778076_SEQUENCE_LIMIT BOOST_MPL_LIMIT_LIST_SIZE # include #endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS #endif // BOOST_MPL_LIST_HPP_INCLUDED ================================================ FILE: benchmarks/boost/mpl/logical.hpp ================================================ #ifndef BOOST_MPL_LOGICAL_HPP_INCLUDED #define BOOST_MPL_LOGICAL_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ #include #include #include #endif // BOOST_MPL_LOGICAL_HPP_INCLUDED ================================================ FILE: benchmarks/boost/mpl/long.hpp ================================================ #ifndef BOOST_MPL_LONG_HPP_INCLUDED #define BOOST_MPL_LONG_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ #include #define AUX_WRAPPER_VALUE_TYPE long #include #endif // BOOST_MPL_LONG_HPP_INCLUDED ================================================ FILE: benchmarks/boost/mpl/long_fwd.hpp ================================================ #ifndef BOOST_MPL_LONG_FWD_HPP_INCLUDED #define BOOST_MPL_LONG_FWD_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ #include #include BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN template< BOOST_MPL_AUX_NTTP_DECL(long, N) > struct long_; BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE BOOST_MPL_AUX_ADL_BARRIER_DECL(long_) #endif // BOOST_MPL_LONG_FWD_HPP_INCLUDED ================================================ FILE: benchmarks/boost/mpl/next.hpp ================================================ #ifndef BOOST_MPL_NEXT_HPP_INCLUDED #define BOOST_MPL_NEXT_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ #include #endif // BOOST_MPL_NEXT_HPP_INCLUDED ================================================ FILE: benchmarks/boost/mpl/next_prior.hpp ================================================ #ifndef BOOST_MPL_NEXT_PRIOR_HPP_INCLUDED #define BOOST_MPL_NEXT_PRIOR_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ #include #include #include namespace boost { namespace mpl { BOOST_MPL_AUX_COMMON_NAME_WKND(next) BOOST_MPL_AUX_COMMON_NAME_WKND(prior) template< typename BOOST_MPL_AUX_NA_PARAM(T) > struct next { typedef typename T::next type; BOOST_MPL_AUX_LAMBDA_SUPPORT(1,next,(T)) }; template< typename BOOST_MPL_AUX_NA_PARAM(T) > struct prior { typedef typename T::prior type; BOOST_MPL_AUX_LAMBDA_SUPPORT(1,prior,(T)) }; BOOST_MPL_AUX_NA_SPEC(1, next) BOOST_MPL_AUX_NA_SPEC(1, prior) }} #endif // BOOST_MPL_NEXT_PRIOR_HPP_INCLUDED ================================================ FILE: benchmarks/boost/mpl/not.hpp ================================================ #ifndef BOOST_MPL_NOT_HPP_INCLUDED #define BOOST_MPL_NOT_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ #include #include #include #include #include namespace boost { namespace mpl { namespace aux { template< BOOST_MPL_AUX_NTTP_DECL(long, C_) > // 'long' is intentional here struct not_impl : bool_ { }; } // namespace aux template< typename BOOST_MPL_AUX_NA_PARAM(T) > struct not_ : aux::not_impl< BOOST_MPL_AUX_NESTED_TYPE_WKND(T)::value > { BOOST_MPL_AUX_LAMBDA_SUPPORT(1,not_,(T)) }; BOOST_MPL_AUX_NA_SPEC(1,not_) }} #endif // BOOST_MPL_NOT_HPP_INCLUDED ================================================ FILE: benchmarks/boost/mpl/or.hpp ================================================ #ifndef BOOST_MPL_OR_HPP_INCLUDED #define BOOST_MPL_OR_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ #include #if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ && !defined(BOOST_MPL_PREPROCESSING_MODE) # include # include # include # include # include // agurt, 19/may/04: workaround a conflict with header's // 'or' and 'and' macros, see http://tinyurl.com/3et69; 'defined(or)' // has to be checked in a separate condition, otherwise GCC complains // about 'or' being an alternative token #if defined(_MSC_VER) && !defined(__clang__) #ifndef __GCCXML__ #if defined(or) # pragma push_macro("or") # undef or # define or(x) #endif #endif #endif # define BOOST_MPL_PREPROCESSED_HEADER or.hpp # include #if defined(_MSC_VER) && !defined(__clang__) #ifndef __GCCXML__ #if defined(or) # pragma pop_macro("or") #endif #endif #endif #else # define AUX778076_OP_NAME or_ # define AUX778076_OP_VALUE1 true # define AUX778076_OP_VALUE2 false # include #endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS #endif // BOOST_MPL_OR_HPP_INCLUDED ================================================ FILE: benchmarks/boost/mpl/pair.hpp ================================================ #ifndef BOOST_MPL_PAIR_HPP_INCLUDED #define BOOST_MPL_PAIR_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ #include #include #include #include namespace boost { namespace mpl { template< typename BOOST_MPL_AUX_NA_PARAM(T1) , typename BOOST_MPL_AUX_NA_PARAM(T2) > struct pair { typedef pair type; typedef T1 first; typedef T2 second; BOOST_MPL_AUX_LAMBDA_SUPPORT(2,pair,(T1,T2)) }; template< typename BOOST_MPL_AUX_NA_PARAM(P) > struct first { #if !defined(BOOST_MPL_CFG_MSVC_70_ETI_BUG) typedef typename P::first type; #else typedef typename aux::msvc_eti_base

::first type; #endif BOOST_MPL_AUX_LAMBDA_SUPPORT(1,first,(P)) }; template< typename BOOST_MPL_AUX_NA_PARAM(P) > struct second { #if !defined(BOOST_MPL_CFG_MSVC_70_ETI_BUG) typedef typename P::second type; #else typedef typename aux::msvc_eti_base

::second type; #endif BOOST_MPL_AUX_LAMBDA_SUPPORT(1,second,(P)) }; BOOST_MPL_AUX_NA_SPEC_NO_ETI(2, pair) BOOST_MPL_AUX_NA_SPEC(1, first) BOOST_MPL_AUX_NA_SPEC(1, second) }} #endif // BOOST_MPL_PAIR_HPP_INCLUDED ================================================ FILE: benchmarks/boost/mpl/placeholders.hpp ================================================ #if !defined(BOOST_PP_IS_ITERATING) ///// header body #ifndef BOOST_MPL_PLACEHOLDERS_HPP_INCLUDED #define BOOST_MPL_PLACEHOLDERS_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2001-2004 // Copyright Peter Dimov 2001-2003 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ #if !defined(BOOST_MPL_PREPROCESSING_MODE) # include # include # if !defined(BOOST_MPL_CFG_NO_ADL_BARRIER_NAMESPACE) # define BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(type) \ using ::BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::type; \ /**/ # else # define BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(type) /**/ # endif #endif #include #if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ && !defined(BOOST_MPL_PREPROCESSING_MODE) # define BOOST_MPL_PREPROCESSED_HEADER placeholders.hpp # include #else # include # include # include # include // watch out for GNU gettext users, who #define _(x) #if !defined(_) || defined(BOOST_MPL_CFG_NO_UNNAMED_PLACEHOLDER_SUPPORT) BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg<-1> _; BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE namespace boost { namespace mpl { BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_) namespace placeholders { using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_; } }} #endif /// agurt, 17/mar/02: one more placeholder for the last 'apply#' /// specialization #define BOOST_PP_ITERATION_PARAMS_1 \ (3,(1, BOOST_MPL_LIMIT_METAFUNCTION_ARITY + 1, )) #include BOOST_PP_ITERATE() #endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS #endif // BOOST_MPL_PLACEHOLDERS_HPP_INCLUDED ///// iteration #else #define i_ BOOST_PP_FRAME_ITERATION(1) BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN typedef arg BOOST_PP_CAT(_,i_); BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE namespace boost { namespace mpl { BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(BOOST_PP_CAT(_,i_)) namespace placeholders { using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::BOOST_PP_CAT(_,i_); } }} #undef i_ #endif // BOOST_PP_IS_ITERATING ================================================ FILE: benchmarks/boost/mpl/pop_front_fwd.hpp ================================================ #ifndef BOOST_MPL_POP_FRONT_FWD_HPP_INCLUDED #define BOOST_MPL_POP_FRONT_FWD_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ namespace boost { namespace mpl { template< typename Tag > struct pop_front_impl; template< typename Sequence > struct pop_front; }} #endif // BOOST_MPL_POP_FRONT_FWD_HPP_INCLUDED ================================================ FILE: benchmarks/boost/mpl/prior.hpp ================================================ #ifndef BOOST_MPL_PRIOR_HPP_INCLUDED #define BOOST_MPL_PRIOR_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ #include #endif // BOOST_MPL_PRIOR_HPP_INCLUDED ================================================ FILE: benchmarks/boost/mpl/protect.hpp ================================================ #ifndef BOOST_MPL_PROTECT_HPP_INCLUDED #define BOOST_MPL_PROTECT_HPP_INCLUDED // Copyright Peter Dimov 2001 // Copyright Aleksey Gurtovoy 2002-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ #include #include #include #include namespace boost { namespace mpl { template< typename BOOST_MPL_AUX_NA_PARAM(T) , int not_le_ = 0 > struct protect : T { #if BOOST_WORKAROUND(__EDG_VERSION__, == 238) typedef mpl::protect type; #else typedef protect type; #endif }; #if defined(BOOST_MPL_CFG_BROKEN_DEFAULT_PARAMETERS_IN_NESTED_TEMPLATES) namespace aux { template< BOOST_MPL_AUX_NTTP_DECL(int, N), typename T > struct arity< protect, N > : arity { }; } // namespace aux #endif BOOST_MPL_AUX_NA_SPEC_MAIN(1, protect) #if !defined(BOOST_MPL_CFG_NO_FULL_LAMBDA_SUPPORT) BOOST_MPL_AUX_NA_SPEC_TEMPLATE_ARITY(1, 1, protect) #endif }} #endif // BOOST_MPL_PROTECT_HPP_INCLUDED ================================================ FILE: benchmarks/boost/mpl/push_back_fwd.hpp ================================================ #ifndef BOOST_MPL_PUSH_BACK_FWD_HPP_INCLUDED #define BOOST_MPL_PUSH_BACK_FWD_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ namespace boost { namespace mpl { template< typename Tag > struct push_back_impl; template< typename Sequence, typename T > struct push_back; }} #endif // BOOST_MPL_PUSH_BACK_FWD_HPP_INCLUDED ================================================ FILE: benchmarks/boost/mpl/push_front.hpp ================================================ #ifndef BOOST_MPL_PUSH_FRONT_HPP_INCLUDED #define BOOST_MPL_PUSH_FRONT_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ #include #include #include #include #include namespace boost { namespace mpl { template< typename BOOST_MPL_AUX_NA_PARAM(Sequence) , typename BOOST_MPL_AUX_NA_PARAM(T) > struct push_front : push_front_impl< typename sequence_tag::type > ::template apply< Sequence,T > { BOOST_MPL_AUX_LAMBDA_SUPPORT(2,push_front,(Sequence,T)) }; template< typename BOOST_MPL_AUX_NA_PARAM(Sequence) > struct has_push_front : has_push_front_impl< typename sequence_tag::type > ::template apply< Sequence > { BOOST_MPL_AUX_LAMBDA_SUPPORT(1,has_push_front,(Sequence)) }; BOOST_MPL_AUX_NA_SPEC(2, push_front) BOOST_MPL_AUX_NA_SPEC(1, has_push_front) }} #endif // BOOST_MPL_PUSH_FRONT_HPP_INCLUDED ================================================ FILE: benchmarks/boost/mpl/push_front_fwd.hpp ================================================ #ifndef BOOST_MPL_PUSH_FRONT_FWD_HPP_INCLUDED #define BOOST_MPL_PUSH_FRONT_FWD_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ namespace boost { namespace mpl { template< typename Tag > struct push_front_impl; template< typename Sequence, typename T > struct push_front; }} #endif // BOOST_MPL_PUSH_FRONT_FWD_HPP_INCLUDED ================================================ FILE: benchmarks/boost/mpl/quote.hpp ================================================ #if !defined(BOOST_PP_IS_ITERATING) ///// header body #ifndef BOOST_MPL_QUOTE_HPP_INCLUDED #define BOOST_MPL_QUOTE_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2008 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ #if !defined(BOOST_MPL_PREPROCESSING_MODE) # include # include #endif #include #include #if defined(BOOST_MPL_CFG_NO_TEMPLATE_TEMPLATE_PARAMETERS) \ && !defined(BOOST_MPL_CFG_BCC590_WORKAROUNDS) # define BOOST_MPL_CFG_NO_QUOTE_TEMPLATE #endif #if !defined(BOOST_MPL_CFG_NO_IMPLICIT_METAFUNCTIONS) \ && defined(BOOST_MPL_CFG_NO_HAS_XXX) # define BOOST_MPL_CFG_NO_IMPLICIT_METAFUNCTIONS #endif #include #if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ && !defined(BOOST_MPL_PREPROCESSING_MODE) # define BOOST_MPL_PREPROCESSED_HEADER quote.hpp # include #else # include # include # include # include # include # include #if !defined(BOOST_MPL_CFG_NO_QUOTE_TEMPLATE) namespace boost { namespace mpl { #if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) template< typename T, bool has_type_ > struct quote_impl // GCC has a problem with metafunction forwarding when T is a // specialization of a template called 'type'. # if BOOST_WORKAROUND(__GNUC__, BOOST_TESTED_AT(4)) \ && BOOST_WORKAROUND(__GNUC_MINOR__, BOOST_TESTED_AT(0)) \ && BOOST_WORKAROUND(__GNUC_PATCHLEVEL__, BOOST_TESTED_AT(2)) { typedef typename T::type type; }; # else : T { }; # endif template< typename T > struct quote_impl { typedef T type; }; #else // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION template< bool > struct quote_impl { template< typename T > struct result_ : T { }; }; template<> struct quote_impl { template< typename T > struct result_ { typedef T type; }; }; #endif #define BOOST_PP_ITERATION_PARAMS_1 \ (3,(1, BOOST_MPL_LIMIT_METAFUNCTION_ARITY, )) #include BOOST_PP_ITERATE() }} #endif // BOOST_MPL_CFG_NO_QUOTE_TEMPLATE #endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS #endif // BOOST_MPL_QUOTE_HPP_INCLUDED ///// iteration #else #define i_ BOOST_PP_FRAME_ITERATION(1) template< template< BOOST_MPL_PP_PARAMS(i_, typename P) > class F , typename Tag = void_ > struct BOOST_PP_CAT(quote,i_) { template< BOOST_MPL_PP_PARAMS(i_, typename U) > struct apply #if defined(BOOST_MPL_CFG_BCC590_WORKAROUNDS) { typedef typename quote_impl< F< BOOST_MPL_PP_PARAMS(i_, U) > , aux::has_type< F< BOOST_MPL_PP_PARAMS(i_, U) > >::value >::type type; }; #elif !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) : quote_impl< F< BOOST_MPL_PP_PARAMS(i_, U) > , aux::has_type< F< BOOST_MPL_PP_PARAMS(i_, U) > >::value > { }; #else : quote_impl< aux::has_type< F< BOOST_MPL_PP_PARAMS(i_, U) > >::value > ::template result_< F< BOOST_MPL_PP_PARAMS(i_, U) > > { }; #endif }; #undef i_ #endif // BOOST_PP_IS_ITERATING ================================================ FILE: benchmarks/boost/mpl/reverse_fold.hpp ================================================ #ifndef BOOST_MPL_REVERSE_FOLD_HPP_INCLUDED #define BOOST_MPL_REVERSE_FOLD_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2001-2004 // Copyright David Abrahams 2001-2002 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ #include #include #include #include #include namespace boost { namespace mpl { template< typename BOOST_MPL_AUX_NA_PARAM(Sequence) , typename BOOST_MPL_AUX_NA_PARAM(State) , typename BOOST_MPL_AUX_NA_PARAM(BackwardOp) , typename ForwardOp = arg<1> > struct reverse_fold { typedef typename aux::reverse_fold_impl< ::boost::mpl::O1_size::value , typename begin::type , typename end::type , State , BackwardOp , ForwardOp >::state type; BOOST_MPL_AUX_LAMBDA_SUPPORT(3,reverse_fold,(Sequence,State,BackwardOp)) }; BOOST_MPL_AUX_NA_SPEC(3, reverse_fold) }} #endif // BOOST_MPL_REVERSE_FOLD_HPP_INCLUDED ================================================ FILE: benchmarks/boost/mpl/same_as.hpp ================================================ #ifndef BOOST_MPL_SAME_AS_HPP_INCLUDED #define BOOST_MPL_SAME_AS_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ #include #include #include #include namespace boost { namespace mpl { template< typename T1 > struct same_as { template< typename T2 > struct apply #if !defined(BOOST_MPL_CFG_NO_NESTED_FORWARDING) : is_same { #else { typedef typename is_same::type type; #endif }; }; template< typename T1 > struct not_same_as { template< typename T2 > struct apply #if !defined(BOOST_MPL_CFG_NO_NESTED_FORWARDING) : not_< is_same > { #else { typedef typename not_< is_same >::type type; #endif }; }; }} #endif // BOOST_MPL_SAME_AS_HPP_INCLUDED ================================================ FILE: benchmarks/boost/mpl/sequence_tag.hpp ================================================ #ifndef BOOST_MPL_SEQUENCE_TAG_HPP_INCLUDED #define BOOST_MPL_SEQUENCE_TAG_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ #include #include #include #include #include #include #include #include namespace boost { namespace mpl { // agurt, 27/nov/02: have to use a simplistic 'sequence_tag' implementation // on MSVC to avoid dreadful "internal structure overflow" error #if BOOST_WORKAROUND(BOOST_MSVC, < 1300) \ || defined(BOOST_MPL_CFG_NO_HAS_XXX) template< typename BOOST_MPL_AUX_NA_PARAM(Sequence) > struct sequence_tag { typedef typename Sequence::tag type; }; #elif BOOST_WORKAROUND(BOOST_MSVC, == 1300) // agurt, 07/feb/03: workaround for what seems to be MSVC 7.0-specific ETI issue namespace aux { template< bool > struct sequence_tag_impl { template< typename Sequence > struct result_ { typedef typename Sequence::tag type; }; }; template<> struct sequence_tag_impl { template< typename Sequence > struct result_ { typedef int type; }; }; } // namespace aux template< typename BOOST_MPL_AUX_NA_PARAM(Sequence) > struct sequence_tag : aux::sequence_tag_impl< !aux::is_msvc_eti_arg::value > ::template result_ { }; #else namespace aux { template< bool has_tag_, bool has_begin_ > struct sequence_tag_impl { // agurt 24/nov/02: MSVC 6.5 gets confused in 'sequence_tag_impl' // specialization below, if we name it 'result_' here template< typename Sequence > struct result2_; }; # define AUX_CLASS_SEQUENCE_TAG_SPEC(has_tag, has_begin, result_type) \ template<> struct sequence_tag_impl \ { \ template< typename Sequence > struct result2_ \ { \ typedef result_type type; \ }; \ }; \ /**/ AUX_CLASS_SEQUENCE_TAG_SPEC(true, true, typename Sequence::tag) AUX_CLASS_SEQUENCE_TAG_SPEC(true, false, typename Sequence::tag) AUX_CLASS_SEQUENCE_TAG_SPEC(false, true, nested_begin_end_tag) AUX_CLASS_SEQUENCE_TAG_SPEC(false, false, non_sequence_tag) # undef AUX_CLASS_SEQUENCE_TAG_SPEC } // namespace aux template< typename BOOST_MPL_AUX_NA_PARAM(Sequence) > struct sequence_tag : aux::sequence_tag_impl< ::boost::mpl::aux::has_tag::value , ::boost::mpl::aux::has_begin::value >::template result2_ { }; #endif // BOOST_MSVC BOOST_MPL_AUX_NA_SPEC(1, sequence_tag) }} #endif // BOOST_MPL_SEQUENCE_TAG_HPP_INCLUDED ================================================ FILE: benchmarks/boost/mpl/sequence_tag_fwd.hpp ================================================ #ifndef BOOST_MPL_SEQUENCE_TAG_FWD_HPP_INCLUDED #define BOOST_MPL_SEQUENCE_TAG_FWD_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ namespace boost { namespace mpl { struct nested_begin_end_tag; struct non_sequence_tag; template< typename Sequence > struct sequence_tag; }} #endif // BOOST_MPL_SEQUENCE_TAG_FWD_HPP_INCLUDED ================================================ FILE: benchmarks/boost/mpl/set/aux_/at_impl.hpp ================================================ #ifndef BOOST_MPL_SET_AUX_AT_IMPL_HPP_INCLUDED #define BOOST_MPL_SET_AUX_AT_IMPL_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2003-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ #include #include #include #include #include namespace boost { namespace mpl { template<> struct at_impl< aux::set_tag > { template< typename Set, typename T > struct apply { typedef typename if_< has_key_impl::apply , T , void_ >::type type; }; }; }} #endif // BOOST_MPL_SET_AUX_AT_IMPL_HPP_INCLUDED ================================================ FILE: benchmarks/boost/mpl/set/aux_/begin_end_impl.hpp ================================================ #ifndef BOOST_MPL_SET_AUX_BEGIN_END_IMPL_HPP_INCLUDED #define BOOST_MPL_SET_AUX_BEGIN_END_IMPL_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2003-2007 // Copyright David Abrahams 2003-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ #include #include namespace boost { namespace mpl { template<> struct begin_impl< aux::set_tag > { template< typename Set > struct apply : s_iter_get { }; }; template<> struct end_impl< aux::set_tag > { template< typename Set > struct apply { typedef s_iter< Set,set0<> > type; }; }; }} #endif // BOOST_MPL_SET_AUX_BEGIN_END_IMPL_HPP_INCLUDED ================================================ FILE: benchmarks/boost/mpl/set/aux_/clear_impl.hpp ================================================ #ifndef BOOST_MPL_SET_AUX_CLEAR_IMPL_HPP_INCLUDED #define BOOST_MPL_SET_AUX_CLEAR_IMPL_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2003-2004 // Copyright David Abrahams 2003-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ #include #include #include namespace boost { namespace mpl { template<> struct clear_impl< aux::set_tag > { template< typename Set > struct apply { typedef set0<> type; }; }; }} #endif // BOOST_MPL_SET_AUX_CLEAR_IMPL_HPP_INCLUDED ================================================ FILE: benchmarks/boost/mpl/set/aux_/empty_impl.hpp ================================================ #ifndef BOOST_MPL_SET_AUX_EMPTY_IMPL_HPP_INCLUDED #define BOOST_MPL_SET_AUX_EMPTY_IMPL_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2003-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ #include #include #include namespace boost { namespace mpl { template<> struct empty_impl< aux::set_tag > { template< typename Set > struct apply : not_< typename Set::size > { }; }; }} #endif // BOOST_MPL_SET_AUX_EMPTY_IMPL_HPP_INCLUDED ================================================ FILE: benchmarks/boost/mpl/set/aux_/erase_impl.hpp ================================================ #ifndef BOOST_MPL_SET_AUX_ERASE_IMPL_HPP_INCLUDED #define BOOST_MPL_SET_AUX_ERASE_IMPL_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2003-2004 // Copyright David Abrahams 2003-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ #include #include #include namespace boost { namespace mpl { template<> struct erase_impl< aux::set_tag > { template< typename Set , typename Pos , typename unused_ > struct apply : erase_key_impl ::apply { }; }; }} #endif // BOOST_MPL_SET_AUX_ERASE_IMPL_HPP_INCLUDED ================================================ FILE: benchmarks/boost/mpl/set/aux_/erase_key_impl.hpp ================================================ #ifndef BOOST_MPL_SET_AUX_ERASE_KEY_IMPL_HPP_INCLUDED #define BOOST_MPL_SET_AUX_ERASE_KEY_IMPL_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2003-2007 // Copyright David Abrahams 2003-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ #include #include #include #include #include #include #include #include namespace boost { namespace mpl { template<> struct erase_key_impl< aux::set_tag > { template< typename Set , typename T > struct apply : eval_if< has_key_impl::apply , eval_if< is_same< T,typename Set::item_type_ > , base , identity< s_mask > > , identity > { }; }; }} #endif // BOOST_MPL_SET_AUX_ERASE_KEY_IMPL_HPP_INCLUDED ================================================ FILE: benchmarks/boost/mpl/set/aux_/has_key_impl.hpp ================================================ #ifndef BOOST_MPL_SET_AUX_HAS_KEY_IMPL_HPP_INCLUDED #define BOOST_MPL_SET_AUX_HAS_KEY_IMPL_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2003-2004 // Copyright David Abrahams 2003-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ #include #include #include #include #include #include #include #include #include namespace boost { namespace mpl { template<> struct has_key_impl< aux::set_tag > { template< typename Set, typename T > struct apply #if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1400)) \ || BOOST_WORKAROUND(__EDG_VERSION__, <= 245) { BOOST_STATIC_CONSTANT(bool, value = ( sizeof( BOOST_MPL_AUX_OVERLOAD_CALL_IS_MASKED( Set , BOOST_MPL_AUX_STATIC_CAST(aux::type_wrapper*, 0) ) ) == sizeof(aux::no_tag) ) ); typedef bool_ type; #else // ISO98 C++ : bool_< ( sizeof( BOOST_MPL_AUX_OVERLOAD_CALL_IS_MASKED( Set , BOOST_MPL_AUX_STATIC_CAST(aux::type_wrapper*, 0) ) ) == sizeof(aux::no_tag) ) > { #endif }; }; }} #endif // BOOST_MPL_SET_AUX_HAS_KEY_IMPL_HPP_INCLUDED ================================================ FILE: benchmarks/boost/mpl/set/aux_/insert_impl.hpp ================================================ #ifndef BOOST_MPL_SET_AUX_INSERT_IMPL_HPP_INCLUDED #define BOOST_MPL_SET_AUX_INSERT_IMPL_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2003-2007 // Copyright David Abrahams 2003-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ #include #include #include #include #include #include #include #include #include namespace boost { namespace mpl { namespace aux { template< typename Set, typename T > struct set_insert_impl : eval_if< has_key_impl::apply , identity , eval_if< is_same< T,typename Set::last_masked_ > , base , identity< s_item > > > { }; } template<> struct insert_impl< aux::set_tag > { template< typename Set , typename PosOrKey , typename KeyOrNA > struct apply : aux::set_insert_impl< Set , typename if_na::type > { }; }; }} #endif // BOOST_MPL_SET_AUX_INSERT_IMPL_HPP_INCLUDED ================================================ FILE: benchmarks/boost/mpl/set/aux_/insert_range_impl.hpp ================================================ #ifndef BOOST_MPL_SET_AUX_INSERT_RANGE_IMPL_HPP_INCLUDED #define BOOST_MPL_SET_AUX_INSERT_RANGE_IMPL_HPP_INCLUDED // Copyright Bruno Dutra 2015 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ #include #include #include #include #include namespace boost { namespace mpl { template<> struct insert_range_impl< aux::set_tag > { template< typename Sequence , typename /*Pos*/ , typename Range > struct apply : fold > { }; }; }} #endif // BOOST_MPL_SET_AUX_INSERT_RANGE_IMPL_HPP_INCLUDED ================================================ FILE: benchmarks/boost/mpl/set/aux_/item.hpp ================================================ #ifndef BOOST_MPL_SET_AUX_ITEM_HPP_INCLUDED #define BOOST_MPL_SET_AUX_ITEM_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2003-2007 // Copyright David Abrahams 2003-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ #include #include #include #include #include #include #include namespace boost { namespace mpl { template< typename T, typename Base > struct s_item : Base { typedef s_item item_; typedef void_ last_masked_; typedef T item_type_; typedef typename Base::item_ base; typedef s_item type; typedef typename next< typename Base::size >::type size; typedef typename next< typename Base::order >::type order; #if defined(BOOST_MPL_CFG_NO_DEPENDENT_ARRAY_TYPES) typedef typename aux::weighted_tag::type order_tag_; #else typedef char (&order_tag_)[BOOST_MPL_AUX_MSVC_VALUE_WKND(order)::value]; #endif BOOST_MPL_AUX_SET_OVERLOAD( order_tag_, ORDER_BY_KEY, s_item, aux::type_wrapper* ); BOOST_MPL_AUX_SET_OVERLOAD( aux::no_tag, IS_MASKED, s_item, aux::type_wrapper* ); }; template< typename T, typename Base > struct s_mask : Base { typedef s_mask item_; typedef T last_masked_; typedef void_ item_type_; typedef typename Base::item_ base; typedef typename prior< typename Base::size >::type size; typedef s_mask type; BOOST_MPL_AUX_SET_OVERLOAD( aux::yes_tag, IS_MASKED, s_mask, aux::type_wrapper* ); }; template< typename T, typename Base > struct s_unmask : Base { typedef s_unmask item_; typedef void_ last_masked_; typedef T item_type_; typedef typename Base::item_ base; typedef typename next< typename Base::size >::type size; BOOST_MPL_AUX_SET_OVERLOAD( aux::no_tag, IS_MASKED, s_unmask, aux::type_wrapper* ); }; }} #endif // BOOST_MPL_SET_AUX_ITEM_HPP_INCLUDED ================================================ FILE: benchmarks/boost/mpl/set/aux_/iterator.hpp ================================================ #ifndef BOOST_MPL_SET_AUX_ITERATOR_HPP_INCLUDED #define BOOST_MPL_SET_AUX_ITERATOR_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2003-2007 // Copyright David Abrahams 2003-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ #include #include #include #include #include #include #include #include namespace boost { namespace mpl { // used by 's_iter_get' template< typename Set, typename Tail > struct s_iter; template< typename Set, typename Tail > struct s_iter_get : eval_if< has_key< Set,typename Tail::item_type_ > , identity< s_iter > , next< s_iter > > { }; template< typename Set, typename Tail > struct s_iter_impl { typedef Tail tail_; typedef forward_iterator_tag category; typedef typename Tail::item_type_ type; #if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) typedef typename s_iter_get< Set,typename Tail::base >::type next; #endif }; #if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) template< typename Set, typename Tail > struct next< s_iter > : s_iter_get< Set,typename Tail::base > { }; template< typename Set > struct next< s_iter > > { typedef s_iter > type; }; template< typename Set, typename Tail > struct s_iter : s_iter_impl { }; template< typename Set > struct s_iter > { typedef forward_iterator_tag category; }; #else template< typename Set > struct s_end_iter { typedef forward_iterator_tag category; typedef s_iter > next; }; template< typename Set, typename Tail > struct s_iter : if_< is_same< Tail,set0<> > , s_end_iter , s_iter_impl >::type { }; #endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION }} #endif // BOOST_MPL_SET_AUX_ITERATOR_HPP_INCLUDED ================================================ FILE: benchmarks/boost/mpl/set/aux_/key_type_impl.hpp ================================================ #ifndef BOOST_MPL_SET_AUX_KEY_TYPE_IMPL_HPP_INCLUDED #define BOOST_MPL_SET_AUX_KEY_TYPE_IMPL_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2003-2004 // Copyright David Abrahams 2003-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ #include #include namespace boost { namespace mpl { template<> struct key_type_impl< aux::set_tag > { template< typename Set, typename T > struct apply { typedef T type; }; }; }} #endif // BOOST_MPL_SET_AUX_KEY_TYPE_IMPL_HPP_INCLUDED ================================================ FILE: benchmarks/boost/mpl/set/aux_/set0.hpp ================================================ #ifndef BOOST_MPL_SET_AUX_SET0_HPP_INCLUDED #define BOOST_MPL_SET_AUX_SET0_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2003-2004 // Copyright David Abrahams 2003-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ #include #include #include #include #include #include #include #include namespace boost { namespace mpl { #if defined(BOOST_MPL_CFG_USE_OPERATORS_OVERLOADING) # define BOOST_MPL_AUX_SET0_OVERLOAD(R, f, X, T) \ friend R BOOST_PP_CAT(BOOST_MPL_AUX_OVERLOAD_,f)(X const&, T) \ /**/ # define BOOST_MPL_AUX_SET_OVERLOAD(R, f, X, T) \ BOOST_MPL_AUX_SET0_OVERLOAD(R, f, X, T) \ /**/ #else # define BOOST_MPL_AUX_SET0_OVERLOAD(R, f, X, T) \ static R BOOST_PP_CAT(BOOST_MPL_AUX_OVERLOAD_,f)(X const&, T) \ /**/ # define BOOST_MPL_AUX_SET_OVERLOAD(R, f, X, T) \ BOOST_MPL_AUX_SET0_OVERLOAD(R, f, X, T); \ using Base::BOOST_PP_CAT(BOOST_MPL_AUX_OVERLOAD_,f) \ /**/ #endif template< typename Dummy = na > struct set0 { typedef set0<> item_; typedef item_ type; typedef aux::set_tag tag; typedef void_ last_masked_; typedef void_ item_type_; typedef long_<0> size; typedef long_<1> order; BOOST_MPL_AUX_SET0_OVERLOAD( aux::no_tag, ORDER_BY_KEY, set0<>, void const volatile* ); BOOST_MPL_AUX_SET0_OVERLOAD( aux::yes_tag, IS_MASKED, set0<>, void const volatile* ); }; }} #endif // BOOST_MPL_SET_AUX_SET0_HPP_INCLUDED ================================================ FILE: benchmarks/boost/mpl/set/aux_/size_impl.hpp ================================================ #ifndef BOOST_MPL_SET_AUX_SIZE_IMPL_HPP_INCLUDED #define BOOST_MPL_SET_AUX_SIZE_IMPL_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2003-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ #include #include namespace boost { namespace mpl { template<> struct size_impl< aux::set_tag > { template< typename Set > struct apply : Set::size { }; }; }} #endif // BOOST_MPL_SET_AUX_SIZE_IMPL_HPP_INCLUDED ================================================ FILE: benchmarks/boost/mpl/set/aux_/tag.hpp ================================================ #ifndef BOOST_MPL_SET_AUX_TAG_HPP_INCLUDED #define BOOST_MPL_SET_AUX_TAG_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2003-2004 // Copyright David Abrahams 2003-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ namespace boost { namespace mpl { namespace aux { struct set_tag; }}} #endif // BOOST_MPL_SET_AUX_TAG_HPP_INCLUDED ================================================ FILE: benchmarks/boost/mpl/set/aux_/value_type_impl.hpp ================================================ #ifndef BOOST_MPL_SET_AUX_VALUE_TYPE_IMPL_HPP_INCLUDED #define BOOST_MPL_SET_AUX_VALUE_TYPE_IMPL_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2003-2004 // Copyright David Abrahams 2003-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ #include #include namespace boost { namespace mpl { template<> struct value_type_impl< aux::set_tag > { template< typename Set, typename T > struct apply { typedef T type; }; }; }} #endif // BOOST_MPL_SET_AUX_VALUE_TYPE_IMPL_HPP_INCLUDED ================================================ FILE: benchmarks/boost/mpl/set/set0.hpp ================================================ #ifndef BOOST_MPL_SET_SET0_HPP_INCLUDED #define BOOST_MPL_SET_SET0_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2003-2004 // Copyright David Abrahams 2003-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ #include #include //#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #endif // BOOST_MPL_SET_SET0_HPP_INCLUDED ================================================ FILE: benchmarks/boost/mpl/size_fwd.hpp ================================================ #ifndef BOOST_MPL_SIZE_FWD_HPP_INCLUDED #define BOOST_MPL_SIZE_FWD_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ namespace boost { namespace mpl { template< typename Tag > struct size_impl; template< typename Sequence > struct size; }} #endif // BOOST_MPL_SIZE_FWD_HPP_INCLUDED ================================================ FILE: benchmarks/boost/mpl/size_t.hpp ================================================ #ifndef BOOST_MPL_SIZE_T_HPP_INCLUDED #define BOOST_MPL_SIZE_T_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ #include #define AUX_WRAPPER_VALUE_TYPE std::size_t #define AUX_WRAPPER_NAME size_t #define AUX_WRAPPER_PARAMS(N) std::size_t N #include #endif // BOOST_MPL_SIZE_T_HPP_INCLUDED ================================================ FILE: benchmarks/boost/mpl/size_t_fwd.hpp ================================================ #ifndef BOOST_MPL_SIZE_T_FWD_HPP_INCLUDED #define BOOST_MPL_SIZE_T_FWD_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ #include #include // make sure 'size_t' is placed into 'std' #include BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN template< std::size_t N > struct size_t; BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE BOOST_MPL_AUX_ADL_BARRIER_DECL(size_t) #endif // BOOST_MPL_SIZE_T_FWD_HPP_INCLUDED ================================================ FILE: benchmarks/boost/mpl/value_type_fwd.hpp ================================================ #ifndef BOOST_MPL_VALUE_TYPE_FWD_HPP_INCLUDED #define BOOST_MPL_VALUE_TYPE_FWD_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2003-2004 // Copyright David Abrahams 2003-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ namespace boost { namespace mpl { template< typename Tag > struct value_type_impl; template< typename AssociativeSequence, typename T > struct value_type; }} #endif // BOOST_MPL_VALUE_TYPE_FWD_HPP_INCLUDED ================================================ FILE: benchmarks/boost/mpl/void.hpp ================================================ #ifndef BOOST_MPL_VOID_HPP_INCLUDED #define BOOST_MPL_VOID_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ #include #include #include #include #include BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN // [JDG Feb-4-2003] made void_ a complete type to allow it to be // instantiated so that it can be passed in as an object that can be // used to select an overloaded function. Possible use includes signaling // a zero arity functor evaluation call. struct void_ { typedef void_ type; }; BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE namespace boost { namespace mpl { template< typename T > struct is_void_ : false_ { #if BOOST_WORKAROUND(BOOST_MSVC, < 1300) using false_::value; #endif }; template<> struct is_void_ : true_ { #if BOOST_WORKAROUND(BOOST_MSVC, < 1300) using true_::value; #endif }; template< typename T > struct is_not_void_ : true_ { #if BOOST_WORKAROUND(BOOST_MSVC, < 1300) using true_::value; #endif }; template<> struct is_not_void_ : false_ { #if BOOST_WORKAROUND(BOOST_MSVC, < 1300) using false_::value; #endif }; BOOST_MPL_AUX_NA_SPEC(1, is_void_) BOOST_MPL_AUX_NA_SPEC(1, is_not_void_) }} #endif // BOOST_MPL_VOID_HPP_INCLUDED ================================================ FILE: benchmarks/boost/mpl/void_fwd.hpp ================================================ #ifndef BOOST_MPL_VOID_FWD_HPP_INCLUDED #define BOOST_MPL_VOID_FWD_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2001-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ #include BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN struct void_; BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE BOOST_MPL_AUX_ADL_BARRIER_DECL(void_) #endif // BOOST_MPL_VOID_FWD_HPP_INCLUDED ================================================ FILE: benchmarks/boost/noncopyable.hpp ================================================ /* * Copyright (c) 2014 Glen Fernandes * * Distributed under the Boost Software License, Version 1.0. (See * accompanying file LICENSE_1_0.txt or copy at * http://www.boost.org/LICENSE_1_0.txt) */ #ifndef BOOST_NONCOPYABLE_HPP #define BOOST_NONCOPYABLE_HPP // The header file at this path is deprecated; // use boost/core/noncopyable.hpp instead. #include #endif ================================================ FILE: benchmarks/boost/parameter/aux_/arg_list.hpp ================================================ // Copyright Daniel Wallin, David Abrahams 2005. Use, modification and // distribution is subject to the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) #ifndef ARG_LIST_050329_HPP #define ARG_LIST_050329_HPP #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include namespace boost { namespace parameter { // Forward declaration for aux::arg_list, below. template struct keyword; namespace aux { // Tag type passed to MPL lambda. struct lambda_tag; // // Structures used to build the tuple of actual arguments. The // tuple is a nested cons-style list of arg_list specializations // terminated by an empty_arg_list. // // Each specialization of arg_list is derived from its successor in // the list type. This feature is used along with using // declarations to build member function overload sets that can // match against keywords. // // MPL sequence support struct arg_list_tag; // Terminates arg_list<> and represents an empty list. Since this // is just the terminating case you might want to look at arg_list // first, to get a feel for what's really happening here. struct empty_arg_list { empty_arg_list() {} // Constructor taking BOOST_PARAMETER_MAX_ARITY empty_arg_list // arguments; this makes initialization empty_arg_list( BOOST_PP_ENUM_PARAMS( BOOST_PARAMETER_MAX_ARITY, void_ BOOST_PP_INTERCEPT )) {} // A metafunction class that, given a keyword and a default // type, returns the appropriate result type for a keyword // lookup given that default struct binding { template struct apply { typedef Default type; }; }; // Terminator for has_key, indicating that the keyword is unique template static no_tag has_key(KW*); #if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) // The overload set technique doesn't work with these older // compilers, so they need some explicit handholding. // A metafunction class that, given a keyword, returns the type // of the base sublist whose get() function can produce the // value for that key struct key_owner { template struct apply { typedef empty_arg_list type; }; }; template T& get(default_ x) const { return x.value; } template typename result_of0::type get(lazy_default x) const { return x.compute_default(); } #endif // If this function is called, it means there is no argument // in the list that matches the supplied keyword. Just return // the default value. template Default& operator[](default_ x) const { return x.value; } // If this function is called, it means there is no argument // in the list that matches the supplied keyword. Just evaluate // and return the default value. template typename result_of0::type operator[]( BOOST_PARAMETER_lazy_default_fallback x) const { return x.compute_default(); } // No argument corresponding to ParameterRequirements::key_type // was found if we match this overload, so unless that parameter // has a default, we indicate that the actual arguments don't // match the function's requirements. template static typename ParameterRequirements::has_default satisfies(ParameterRequirements*, ArgPack*); // MPL sequence support typedef empty_arg_list type; // convenience typedef arg_list_tag tag; // For dispatching to sequence intrinsics }; // Forward declaration for arg_list::operator, template struct tagged_argument; template struct get_reference { typedef typename T::reference type; }; // A tuple of tagged arguments, terminated with empty_arg_list. // Every TaggedArg is an instance of tagged_argument<>. template struct arg_list : Next { typedef arg_list self; typedef typename TaggedArg::key_type key_type; typedef typename is_maybe::type holds_maybe; typedef typename mpl::eval_if< holds_maybe , get_reference , get_reference >::type reference; typedef typename mpl::if_< holds_maybe , reference , typename TaggedArg::value_type >::type value_type; TaggedArg arg; // Stores the argument // Store the arguments in successive nodes of this list template< // class A0, class A1, ... BOOST_PP_ENUM_PARAMS(BOOST_PARAMETER_MAX_ARITY, class A) > arg_list( // A0& a0, A1& a1, ... BOOST_PP_ENUM_BINARY_PARAMS(BOOST_PARAMETER_MAX_ARITY, A, & a) ) : Next( // a1, a2, ... BOOST_PP_ENUM_SHIFTED_PARAMS(BOOST_PARAMETER_MAX_ARITY, a) , void_reference() ) , arg(a0) {} // Create a new list by prepending arg to a copy of tail. Used // when incrementally building this structure with the comma // operator. arg_list(TaggedArg head, Next const& tail) : Next(tail) , arg(head) {} // A metafunction class that, given a keyword and a default // type, returns the appropriate result type for a keyword // lookup given that default struct binding { template struct apply { typedef typename mpl::eval_if< boost::is_same , mpl::if_ , mpl::apply_wrap3 >::type type; }; }; #if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) // Overload for key_type, so the assert below will fire if the // same keyword is used again static yes_tag has_key(key_type*); using Next::has_key; BOOST_MPL_ASSERT_MSG( sizeof(Next::has_key((key_type*)0)) == sizeof(no_tag) , duplicate_keyword, (key_type) ); #endif // // Begin implementation of indexing operators for looking up // specific arguments by name // // Helpers that handle the case when TaggedArg is // empty. template reference get_default(D const&, mpl::false_) const { return arg.value; } template reference get_default(D const& d, mpl::true_) const { return arg.value ? arg.value.get() : arg.value.construct(d.value); } #if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) // These older compilers don't support the overload set creation // idiom well, so we need to do all the return type calculation // for the compiler and dispatch through an outer function template // A metafunction class that, given a keyword, returns the base // sublist whose get() function can produce the value for that // key. struct key_owner { template struct apply { typedef typename mpl::eval_if< boost::is_same , mpl::identity > , mpl::apply_wrap1 >::type type; }; }; // Outer indexing operators that dispatch to the right node's // get() function. template typename mpl::apply_wrap3::type operator[](keyword const& x) const { typename mpl::apply_wrap1::type const& sublist = *this; return sublist.get(x); } template typename mpl::apply_wrap3::type operator[](default_ x) const { typename mpl::apply_wrap1::type const& sublist = *this; return sublist.get(x); } template typename mpl::apply_wrap3< binding,KW , typename result_of0::type , mpl::true_ >::type operator[](lazy_default x) const { typename mpl::apply_wrap1::type const& sublist = *this; return sublist.get(x); } // These just return the stored value; when empty_arg_list is // reached, indicating no matching argument was passed, the // default is returned, or if no default_ or lazy_default was // passed, compilation fails. reference get(keyword const&) const { BOOST_MPL_ASSERT_NOT((holds_maybe)); return arg.value; } template reference get(default_ const& d) const { return get_default(d, holds_maybe()); } template reference get(lazy_default) const { return arg.value; } #else reference operator[](keyword const&) const { BOOST_MPL_ASSERT_NOT((holds_maybe)); return arg.value; } template reference operator[](default_ const& d) const { return get_default(d, holds_maybe()); } template reference operator[](lazy_default) const { return arg.value; } // Builds an overload set including operator[]s defined in base // classes. using Next::operator[]; // // End of indexing support // // // For parameter_requirements matching this node's key_type, // return a bool constant wrapper indicating whether the // requirements are satisfied by TaggedArg. Used only for // compile-time computation and never really called, so a // declaration is enough. // template static typename mpl::apply_wrap2< typename mpl::lambda::type , value_type, ArgPack >::type satisfies( parameter_requirements* , ArgPack* ); // Builds an overload set including satisfies functions defined // in base classes. using Next::satisfies; #endif // Comma operator to compose argument list without using parameters<>. // Useful for argument lists with undetermined length. template arg_list, self> operator,(tagged_argument x) const { return arg_list, self>(x, *this); } // MPL sequence support typedef self type; // Convenience for users typedef Next tail_type; // For the benefit of iterators typedef arg_list_tag tag; // For dispatching to sequence intrinsics }; // MPL sequence support template struct arg_list_iterator { typedef mpl::forward_iterator_tag category; // The incremented iterator typedef arg_list_iterator next; // dereferencing yields the key type typedef typename ArgumentPack::key_type type; }; template <> struct arg_list_iterator {}; }} // namespace parameter::aux // MPL sequence support namespace mpl { template <> struct begin_impl { template struct apply { typedef parameter::aux::arg_list_iterator type; }; }; template <> struct end_impl { template struct apply { typedef parameter::aux::arg_list_iterator type; }; }; } } // namespace boost #endif // ARG_LIST_050329_HPP ================================================ FILE: benchmarks/boost/parameter/aux_/cast.hpp ================================================ // Copyright Daniel Wallin 2006. Use, modification and distribution is // subject to the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_PARAMETER_CAST_060902_HPP # define BOOST_PARAMETER_CAST_060902_HPP # include # if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) # include # include # endif namespace boost { namespace parameter { namespace aux { struct use_default_tag {}; # if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) # define BOOST_PARAMETER_FUNCTION_CAST(value, predicate) value # else // Handles possible implicit casts. Used by preprocessor.hpp to // normalize user input. // // cast::execute() is identity // cast::execute() is identity // cast::execute() casts to X // // preprocessor.hpp uses this like this: // // #define X(value, predicate) // cast::execute(value) // // X(something, *) // X(something, *(predicate)) // X(something, (int)) template struct cast; template struct cast { static use_default_tag execute(use_default_tag) { return use_default_tag(); } static use_default_tag remove_const(use_default_tag) { return use_default_tag(); } template static U& execute(U& value) { return value; } template static U& remove_const(U& x) { return x; } }; #if BOOST_WORKAROUND(__SUNPRO_CC, BOOST_TESTED_AT(0x580)) typedef void* voidstar; template struct cast : cast { }; #else template struct cast : cast { }; #endif // This is a hack used in cast<> to turn the user supplied type, // which may or may not be a placeholder expression into one, so // that it will be properly evaluated by mpl::apply. template struct as_placeholder_expr { typedef T type; }; template struct cast { typedef typename mpl::apply2< as_placeholder_expr, Args, Args>::type type0; typedef typename boost::add_reference< typename boost::remove_const::type >::type reference; static use_default_tag execute(use_default_tag) { return use_default_tag(); } static use_default_tag remove_const(use_default_tag) { return use_default_tag(); } static type0 execute(type0 value) { return value; } template static reference remove_const(U const& x) { return const_cast(x); } }; # define BOOST_PARAMETER_FUNCTION_CAST(value, predicate, args) \ boost::parameter::aux::cast::remove_const( \ boost::parameter::aux::cast::execute(value) \ ) # endif }}} // namespace boost::parameter::aux #endif // BOOST_PARAMETER_CAST_060902_HPP ================================================ FILE: benchmarks/boost/parameter/aux_/default.hpp ================================================ // Copyright Daniel Wallin, David Abrahams 2005. Use, modification and // distribution is subject to the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) #ifndef DEFAULT_050329_HPP # define DEFAULT_050329_HPP # include namespace boost { namespace parameter { namespace aux { // A wrapper for the default value passed by the user when resolving // the value of the parameter with the given Keyword template struct default_ { default_(Value& x) : value(x) {} Value& value; }; // // lazy_default -- // // A wrapper for the default value computation function passed by // the user when resolving the value of the parameter with the // given keyword // # if BOOST_WORKAROUND(__EDG_VERSION__, <= 300) // These compilers need a little extra help with overload // resolution; we have empty_arg_list's operator[] accept a base // class to make that overload less preferable. template struct lazy_default_base { lazy_default_base(DefaultComputer const& x) : compute_default(x) {} DefaultComputer const& compute_default; }; template struct lazy_default : lazy_default_base { lazy_default(DefaultComputer const & x) : lazy_default_base(x) {} }; # define BOOST_PARAMETER_lazy_default_fallback lazy_default_base # else template struct lazy_default { lazy_default(const DefaultComputer& x) : compute_default(x) {} DefaultComputer const& compute_default; }; # define BOOST_PARAMETER_lazy_default_fallback lazy_default # endif }}} // namespace boost::parameter::aux #endif // DEFAULT_050329_HPP ================================================ FILE: benchmarks/boost/parameter/aux_/is_maybe.hpp ================================================ // Copyright Daniel Wallin, David Abrahams 2010. Use, modification and // distribution is subject to the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_PARAMETER_IS_MAYBE_050329_HPP #define BOOST_PARAMETER_IS_MAYBE_050329_HPP #include namespace boost { namespace parameter { namespace aux { struct maybe_base {}; template struct is_maybe : is_base_and_derived {}; } // namespace aux } // namespace parameter } // namespace boost #endif // BOOST_PARAMETER_IS_MAYBE_050329_HPP ================================================ FILE: benchmarks/boost/parameter/aux_/overloads.hpp ================================================ // Copyright David Abrahams, Daniel Wallin 2003. Use, modification and // distribution is subject to the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // This file generates overloads in this format: // // template // typename mpl::apply_wrap1< // aux::make_arg_list< // PS0,A0 // , aux::make_arg_list< // PS1,A1 // , mpl::identity // > // > // , unnamed_list // >::type // operator()(A0 const& a0, A1 const& a1) const // { // typedef typename mpl::apply_wrap1< // aux::make_arg_list< // PS0,A0 // , aux::make_arg_list< // PS1,A1 // , mpl::identity // > // > // >::type arg_tuple; // // return arg_tuple( // a0 // , a1 // , aux::void_() // ... // ); // } // #if !defined(BOOST_PP_IS_ITERATING) # error Boost.Parameters - do not include this file! #endif #define N BOOST_PP_ITERATION() #define BOOST_PARAMETER_open_list(z, n, text) \ aux::item< \ BOOST_PP_CAT(PS, n), BOOST_PP_CAT(A, n) #define BOOST_PARAMETER_close_list(z, n, text) > #define BOOST_PARAMETER_arg_list(n) \ aux::make_arg_list< \ BOOST_PP_ENUM(N, BOOST_PARAMETER_open_list, _) \ , void_ \ BOOST_PP_REPEAT(N, BOOST_PARAMETER_close_list, _) \ , deduced_list \ , aux::tag_keyword_arg \ > #define BOOST_PARAMETER_arg_pack_init(z, n, limit) \ BOOST_PP_CAT(a, BOOST_PP_SUB(limit,n)) template typename mpl::first< typename BOOST_PARAMETER_arg_list(N)::type >::type operator()(BOOST_PP_ENUM_BINARY_PARAMS(N, A, & a)) const { typedef typename BOOST_PARAMETER_arg_list(N)::type result; typedef typename mpl::first::type result_type; typedef typename mpl::second::type error; error(); return result_type( BOOST_PP_ENUM(N, BOOST_PARAMETER_arg_pack_init, BOOST_PP_DEC(N)) BOOST_PP_ENUM_TRAILING_PARAMS( BOOST_PP_SUB(BOOST_PARAMETER_MAX_ARITY, N) , aux::void_reference() BOOST_PP_INTERCEPT )); } #undef BOOST_PARAMETER_arg_list #undef BOOST_PARAMETER_open_list #undef BOOST_PARAMETER_close_list #undef N ================================================ FILE: benchmarks/boost/parameter/aux_/parameter_requirements.hpp ================================================ // Copyright Daniel Wallin, David Abrahams 2005. Use, modification and // distribution is subject to the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) #ifndef PARAMETER_REQUIREMENTS_050331_HPP #define PARAMETER_REQUIREMENTS_050331_HPP namespace boost { namespace parameter { namespace aux { // Used to pass static information about parameter requirements // through the satisfies() overload set (below). The // matched function is never invoked, but its type indicates whether // a parameter matches at compile-time template struct parameter_requirements { typedef Keyword keyword; typedef Predicate predicate; typedef HasDefault has_default; }; }}} // namespace boost::parameter::aux #endif // PARAMETER_REQUIREMENTS_050331_HPP ================================================ FILE: benchmarks/boost/parameter/aux_/parenthesized_type.hpp ================================================ // Copyright David Abrahams 2006. Distributed under the Boost // Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_PARAMETER_AUX_PARENTHESIZED_TYPE_DWA2006414_HPP # define BOOST_PARAMETER_AUX_PARENTHESIZED_TYPE_DWA2006414_HPP # include # include namespace boost { namespace parameter { namespace aux { // A macro that takes a parenthesized C++ type name (T) and transforms // it into an un-parenthesized type expression equivalent to T. # define BOOST_PARAMETER_PARENTHESIZED_TYPE(x) \ boost::parameter::aux::unaryfunptr_arg_type< void(*)x >::type // A metafunction that transforms void(*)(T) -> T template struct unaryfunptr_arg_type; template struct unaryfunptr_arg_type { typedef Arg type; }; template <> struct unaryfunptr_arg_type { typedef void type; }; }}} // namespace boost::parameter::aux #endif // BOOST_PARAMETER_AUX_PARENTHESIZED_TYPE_DWA2006414_HPP ================================================ FILE: benchmarks/boost/parameter/aux_/preprocessor/flatten.hpp ================================================ // Copyright Daniel Wallin 2005. Use, modification and distribution is // subject to the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_PARAMETER_FLATTEN_051217_HPP # define BOOST_PARAMETER_FLATTEN_051217_HPP # include # include # include # include # include # include # include # include # include # include # define BOOST_PARAMETER_FLATTEN_SPLIT_required required, # define BOOST_PARAMETER_FLATTEN_SPLIT_optional optional, # define BOOST_PARAMETER_FLATTEN_SPLIT_deduced deduced, # define BOOST_PARAMETER_FLATTEN_SPLIT(sub) \ BOOST_PP_CAT(BOOST_PARAMETER_FLATTEN_SPLIT_, sub) # define BOOST_PARAMETER_FLATTEN_QUALIFIER(sub) \ BOOST_PP_SPLIT(0, BOOST_PARAMETER_FLATTEN_SPLIT(sub)) # define BOOST_PARAMETER_FLATTEN_ARGS(sub) \ BOOST_PP_SPLIT(1, BOOST_PARAMETER_FLATTEN_SPLIT(sub)) # define BOOST_PARAMETER_FLATTEN_ARITY_optional(arities) \ BOOST_PP_TUPLE_ELEM(3,0,arities) # define BOOST_PARAMETER_FLATTEN_ARITY_required(arities) \ BOOST_PP_TUPLE_ELEM(3,1,arities) # define BOOST_PARAMETER_FLATTEN_SPEC0_DUMMY_ELEM(z, n, data) ~ # define BOOST_PARAMETER_FLATTEN_SPEC0(r, n, elem, data) \ (( \ BOOST_PP_TUPLE_ELEM(3,2,data) \ , BOOST_PP_TUPLE_REM(BOOST_PP_TUPLE_ELEM(3,0,data)) elem \ BOOST_PP_ENUM_TRAILING( \ BOOST_PP_SUB( \ BOOST_PP_TUPLE_ELEM(3,1,data) \ , BOOST_PP_TUPLE_ELEM(3,0,data) \ ) \ , BOOST_PARAMETER_FLATTEN_SPEC0_DUMMY_ELEM \ , ~ \ ) \ )) # define BOOST_PARAMETER_FLATTEN_SPEC_AUX(r, arity, max_arity, spec, transform) \ BOOST_PARAMETER_FOR_EACH_R( \ r \ , arity \ , BOOST_PARAMETER_FLATTEN_ARGS(spec) \ , (arity, max_arity, transform(BOOST_PARAMETER_FLATTEN_QUALIFIER(spec))) \ , BOOST_PARAMETER_FLATTEN_SPEC0 \ ) # define BOOST_PARAMETER_FLATTEN_IDENTITY(x) x # define BOOST_PARAMETER_FLATTEN_SPEC_optional(r, arities, spec) \ BOOST_PARAMETER_FLATTEN_SPEC_AUX( \ r \ , BOOST_PP_CAT( \ BOOST_PARAMETER_FLATTEN_ARITY_, BOOST_PARAMETER_FLATTEN_QUALIFIER(spec) \ )(arities) \ , BOOST_PP_TUPLE_ELEM(3,2,arities) \ , spec \ , BOOST_PARAMETER_FLATTEN_IDENTITY \ ) # define BOOST_PARAMETER_FLATTEN_SPEC_required(r, arities, spec) \ BOOST_PARAMETER_FLATTEN_SPEC_optional(r, arities, spec) # define BOOST_PARAMETER_FLATTEN_SPEC_AS_DEDUCED(x) BOOST_PP_CAT(deduced_,x) # define BOOST_PARAMETER_FLATTEN_SPEC_deduced_M(r, arities, n, spec) \ BOOST_PARAMETER_FLATTEN_SPEC_AUX( \ r \ , BOOST_PP_CAT( \ BOOST_PARAMETER_FLATTEN_ARITY_, BOOST_PARAMETER_FLATTEN_QUALIFIER(spec) \ )(arities) \ , BOOST_PP_TUPLE_ELEM(3,2,arities) \ , spec \ , BOOST_PARAMETER_FLATTEN_SPEC_AS_DEDUCED \ ) # define BOOST_PARAMETER_FLATTEN_SPEC_deduced(r, arities, spec) \ BOOST_PP_SEQ_FOR_EACH_I_R( \ r \ , BOOST_PARAMETER_FLATTEN_SPEC_deduced_M \ , arities \ , BOOST_PARAMETER_FLATTEN_ARGS(spec) \ ) # define BOOST_PARAMETER_FLATTEN_SPEC(r, arities, spec) \ BOOST_PP_CAT( \ BOOST_PARAMETER_FLATTEN_SPEC_, BOOST_PARAMETER_FLATTEN_QUALIFIER(spec) \ )(r, arities, spec) # define BOOST_PARAMETER_FLATTEN(optional_arity, required_arity, wanted_arity, specs) \ BOOST_PP_SEQ_FOR_EACH( \ BOOST_PARAMETER_FLATTEN_SPEC \ , ( \ optional_arity, required_arity \ , wanted_arity \ ) \ , specs \ ) #endif // BOOST_PARAMETER_FLATTEN_051217_HPP ================================================ FILE: benchmarks/boost/parameter/aux_/preprocessor/for_each.hpp ================================================ // Copyright Daniel Wallin 2005. Use, modification and distribution is // subject to the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_PARAMETER_FOR_EACH_051217_HPP # define BOOST_PARAMETER_FOR_EACH_051217_HPP # include # include # include # include # include # include # include # include # include # include # define BOOST_PARAMETER_FOR_EACH_head_aux2(x,y) (x,y), ~ # define BOOST_PARAMETER_FOR_EACH_head_aux3(x,y,z) (x,y,z), ~ # define BOOST_PARAMETER_FOR_EACH_head_aux4(x,y,z,u) (x,y,z,u), ~ # define BOOST_PARAMETER_FOR_EACH_head(n,x) \ BOOST_PP_SPLIT(0, BOOST_PP_CAT(BOOST_PARAMETER_FOR_EACH_head_aux,n) x) # define BOOST_PARAMETER_FOR_EACH_pred_aux_BOOST_PARAMETER_FOR_EACH_END_SENTINEL # define BOOST_PARAMETER_FOR_EACH_pred_aux_check(x) \ BOOST_PP_NOT(BOOST_PP_IS_EMPTY( \ BOOST_PP_CAT(BOOST_PARAMETER_FOR_EACH_pred_aux_, x) \ )), ~ # define BOOST_PARAMETER_FOR_EACH_pred_aux2(x,y) \ BOOST_PARAMETER_FOR_EACH_pred_aux_check(x) # define BOOST_PARAMETER_FOR_EACH_pred_aux3(x,y,z) \ BOOST_PARAMETER_FOR_EACH_pred_aux_check(x) # define BOOST_PARAMETER_FOR_EACH_pred_aux4(x,y,z,u) \ BOOST_PARAMETER_FOR_EACH_pred_aux_check(x) # define BOOST_PARAMETER_FOR_EACH_pred_aux0(n,x) \ BOOST_PP_CAT(BOOST_PARAMETER_FOR_EACH_pred_aux,n) x # if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MSVC() # define BOOST_PARAMETER_FOR_EACH_pred_SPLIT_FIRST(x) \ BOOST_PP_SPLIT(0, x) # define BOOST_PARAMETER_FOR_EACH_pred(r, state) \ BOOST_PARAMETER_FOR_EACH_pred_SPLIT_FIRST( \ BOOST_PARAMETER_FOR_EACH_pred_aux0( \ BOOST_PP_TUPLE_ELEM(5,3,state) \ , BOOST_PP_TUPLE_ELEM(5,0,state) \ ) \ ) # else # define BOOST_PARAMETER_FOR_EACH_pred(r, state) \ BOOST_PP_SPLIT( \ 0 \ , BOOST_PARAMETER_FOR_EACH_pred_aux0( \ BOOST_PP_TUPLE_ELEM(5,3,state) \ , BOOST_PP_TUPLE_ELEM(5,0,state) \ ) \ ) # endif # define BOOST_PARAMETER_FOR_EACH_op(r, state) \ ( \ BOOST_PP_TUPLE_EAT(BOOST_PP_TUPLE_ELEM(5,3,state)) \ BOOST_PP_TUPLE_ELEM(5,0,state) \ , BOOST_PP_TUPLE_ELEM(5,1,state) \ , BOOST_PP_TUPLE_ELEM(5,2,state) \ , BOOST_PP_TUPLE_ELEM(5,3,state) \ , BOOST_PP_INC(BOOST_PP_TUPLE_ELEM(5,4,state)) \ ) # define BOOST_PARAMETER_FOR_EACH_macro(r, state) \ BOOST_PP_TUPLE_ELEM(5,2,state)( \ r \ , BOOST_PP_TUPLE_ELEM(5,4,state) \ , BOOST_PARAMETER_FOR_EACH_head( \ BOOST_PP_TUPLE_ELEM(5,3,state) \ , BOOST_PP_TUPLE_ELEM(5,0,state) \ ) \ , BOOST_PP_TUPLE_ELEM(5,1,state) \ ) # define BOOST_PARAMETER_FOR_EACH_build_end_sentinel(z,n,text) \ BOOST_PP_COMMA_IF(n) BOOST_PARAMETER_FOR_EACH_END_SENTINEL # define BOOST_PARAMETER_FOR_EACH_build_end_sentinel_tuple(arity) \ ( \ BOOST_PP_REPEAT(arity, BOOST_PARAMETER_FOR_EACH_build_end_sentinel, _) \ ) # define BOOST_PARAMETER_FOR_EACH_R(r, arity, list, data, macro) \ BOOST_PP_CAT(BOOST_PP_FOR_, r)( \ (list BOOST_PARAMETER_FOR_EACH_build_end_sentinel_tuple(arity), data, macro, arity, 0) \ , BOOST_PARAMETER_FOR_EACH_pred \ , BOOST_PARAMETER_FOR_EACH_op \ , BOOST_PARAMETER_FOR_EACH_macro \ ) # define BOOST_PARAMETER_FOR_EACH(arity, list, data, macro) \ BOOST_PARAMETER_FOR_EACH_R(BOOST_PP_DEDUCE_R(), arity, list, data, macro) #endif // BOOST_PARAMETER_FOR_EACH_051217_HPP ================================================ FILE: benchmarks/boost/parameter/aux_/result_of0.hpp ================================================ // Copyright David Abrahams 2005. Distributed under the Boost // Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_PARAMETER_AUX_RESULT_OF0_DWA2005511_HPP # define BOOST_PARAMETER_AUX_RESULT_OF0_DWA2005511_HPP # include // A metafunction returning the result of invoking a nullary function // object of the given type. #ifndef BOOST_NO_RESULT_OF # include namespace boost { namespace parameter { namespace aux { template struct result_of0 : result_of {}; }}} // namespace boost::parameter::aux_ #else namespace boost { namespace parameter { namespace aux { template struct result_of0 { typedef typename F::result_type type; }; }}} // namespace boost::parameter::aux_ #endif #endif // BOOST_PARAMETER_AUX_RESULT_OF0_DWA2005511_HPP ================================================ FILE: benchmarks/boost/parameter/aux_/set.hpp ================================================ // Copyright Daniel Wallin 2006. Use, modification and distribution is // subject to the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_PARAMETER_SET_060912_HPP # define BOOST_PARAMETER_SET_060912_HPP # include # if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) # include # include # include namespace boost { namespace parameter { namespace aux { typedef mpl::set0<> set0; template struct insert_ { typedef typename mpl::insert::type type; }; template struct has_key_ { typedef typename mpl::has_key::type type; }; }}} // namespace boost::parameter::aux # else # include # include # include # include # include namespace boost { namespace parameter { namespace aux { typedef mpl::list0<> set0; template struct insert_ { typedef typename mpl::push_front::type type; }; template struct has_key_ { typedef typename mpl::find::type iter; typedef mpl::not_< is_same::type> > type; }; }}} // namespace boost::parameter::aux # endif #endif // BOOST_PARAMETER_SET_060912_HPP ================================================ FILE: benchmarks/boost/parameter/aux_/tag.hpp ================================================ // Copyright David Abrahams 2005. Distributed under the Boost // Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_PARAMETER_AUX_TAG_DWA2005610_HPP # define BOOST_PARAMETER_AUX_TAG_DWA2005610_HPP # include # include namespace boost { namespace parameter { namespace aux { template ::type #endif > struct tag { typedef tagged_argument< Keyword , typename unwrap_cv_reference::type > type; }; #if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) template struct tag { typedef tagged_argument< Keyword , ActualArg > type; }; #endif }}} // namespace boost::parameter::aux_ #endif // BOOST_PARAMETER_AUX_TAG_DWA2005610_HPP ================================================ FILE: benchmarks/boost/parameter/aux_/tagged_argument.hpp ================================================ // Copyright Daniel Wallin, David Abrahams 2005. Use, modification and // distribution is subject to the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_PARAMETER_TAGGED_ARGUMENT_050328_HPP # define BOOST_PARAMETER_TAGGED_ARGUMENT_050328_HPP # include # include # include # include # include # include # include # include # include # include namespace boost { namespace parameter { namespace aux { struct empty_arg_list; struct arg_list_tag; struct tagged_argument_base {}; // Holds a reference to an argument of type Arg associated with // keyword Keyword template struct tagged_argument : tagged_argument_base { typedef Keyword key_type; typedef Arg value_type; typedef Arg& reference; tagged_argument(reference x) : value(x) {} // A metafunction class that, given a keyword and a default // type, returns the appropriate result type for a keyword // lookup given that default struct binding { template struct apply { typedef typename mpl::eval_if< boost::is_same , mpl::if_ , mpl::identity >::type type; }; }; // Comma operator to compose argument list without using parameters<>. // Useful for argument lists with undetermined length. template arg_list< tagged_argument , arg_list > > operator,(tagged_argument x) const { return arg_list< tagged_argument , arg_list > >( *this , arg_list >(x, empty_arg_list()) ); } reference operator[](keyword const&) const { return value; } # if defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) || BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) template Default& get_with_default(default_ const& x, int) const { return x.value; } template reference get_with_default(default_ const&, long) const { return value; } template typename mpl::apply_wrap3::type operator[](default_ const& x) const { return get_with_default(x, 0L); } template typename result_of0::type get_with_lazy_default(lazy_default const& x, int) const { return x.compute_default(); } template reference get_with_lazy_default(lazy_default const&, long) const { return value; } template typename mpl::apply_wrap3< binding,KW , typename result_of0::type , mpl::true_ >::type operator[](lazy_default const& x) const { return get_with_lazy_default(x, 0L); } # else template reference operator[](default_ const& ) const { return value; } template reference operator[](lazy_default const& ) const { return value; } template Default& operator[](default_ const& x) const { return x.value; } template typename result_of0::type operator[](lazy_default const& x) const { return x.compute_default(); } template static typename ParameterRequirements::has_default satisfies(ParameterRequirements*); template static typename mpl::apply1::type satisfies( parameter_requirements* ); # endif reference value; # if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1310)) // warning suppression private: void operator=(tagged_argument const&); public: # endif // MPL sequence support typedef tagged_argument type; // Convenience for users typedef empty_arg_list tail_type; // For the benefit of iterators typedef arg_list_tag tag; // For dispatching to sequence intrinsics }; // Defines a metafunction, is_tagged_argument, that identifies // tagged_argument specializations and their derived classes. template struct is_tagged_argument_aux : is_convertible {}; template struct is_tagged_argument : mpl::and_< mpl::not_ > , is_tagged_argument_aux > {}; }}} // namespace boost::parameter::aux #endif // BOOST_PARAMETER_TAGGED_ARGUMENT_050328_HPP ================================================ FILE: benchmarks/boost/parameter/aux_/template_keyword.hpp ================================================ // Copyright Daniel Wallin 2006. Use, modification and distribution is // subject to the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_PARAMETER_TEMPLATE_KEYWORD_060203_HPP # define BOOST_PARAMETER_TEMPLATE_KEYWORD_060203_HPP # include # include # include # include namespace boost { namespace parameter { namespace aux { struct template_keyword_tag {}; template struct is_pointer_convertible : is_convertible {}; template struct is_template_keyword : mpl::and_< mpl::not_ > , is_pointer_convertible > {}; } // namespace aux template struct template_keyword : aux::template_keyword_tag { typedef Tag key_type; typedef T value_type; typedef value_type reference; }; }} // namespace boost::parameter #endif // BOOST_PARAMETER_TEMPLATE_KEYWORD_060203_HPP ================================================ FILE: benchmarks/boost/parameter/aux_/unwrap_cv_reference.hpp ================================================ // Copyright Daniel Wallin, David Abrahams 2005. Use, modification and // distribution is subject to the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) #ifndef UNWRAP_CV_REFERENCE_050328_HPP #define UNWRAP_CV_REFERENCE_050328_HPP #include #include #include #include namespace boost { template class reference_wrapper; } namespace boost { namespace parameter { namespace aux { // // reference_wrapper support -- because of the forwarding problem, // when passing arguments positionally by non-const reference, we // ask users of named parameter interfaces to use ref(x) to wrap // them. // // is_cv_reference_wrapper returns mpl::true_ if T is of type // reference_wrapper cv template yes_tag is_cv_reference_wrapper_check(reference_wrapper const volatile*); no_tag is_cv_reference_wrapper_check(...); template struct is_cv_reference_wrapper { BOOST_STATIC_CONSTANT( bool, value = ( sizeof(is_cv_reference_wrapper_check((T*)0)) == sizeof(yes_tag) ) ); typedef mpl::bool_< #if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) is_cv_reference_wrapper:: #endif value> type; }; // Needed for unwrap_cv_reference below. T might be const, so // eval_if might fail because of deriving from T const on EDG. template struct get_type { typedef typename T::type type; }; #if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) template ::type> struct unwrap_cv_reference { typedef T type; }; template struct unwrap_cv_reference { typedef T const type; }; template struct unwrap_cv_reference : T {}; #else // Produces the unwrapped type to hold a reference to in named<> // Can't use boost::unwrap_reference<> here because it // doesn't handle the case where T = reference_wrapper cv template struct unwrap_cv_reference { typedef typename mpl::eval_if< is_cv_reference_wrapper , get_type , mpl::identity >::type type; }; #endif }}} // namespace boost::parameter::aux #endif // UNWRAP_CV_REFERENCE_050328_HPP ================================================ FILE: benchmarks/boost/parameter/aux_/void.hpp ================================================ // Copyright Daniel Wallin, David Abrahams 2005. Use, modification and // distribution is subject to the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_PARAMETER_VOID_050329_HPP #define BOOST_PARAMETER_VOID_050329_HPP namespace boost { namespace parameter { // A placemarker for "no argument passed." // MAINTAINER NOTE: Do not make this into a metafunction struct void_ {}; namespace aux { inline void_& void_reference() { static void_ instance; return instance; } } // namespace aux }} // namespace boost::parameter #endif // BOOST_PARAMETER_VOID_050329_HPP ================================================ FILE: benchmarks/boost/parameter/aux_/yesno.hpp ================================================ // Copyright Daniel Wallin, David Abrahams 2005. Use, modification and // distribution is subject to the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) #ifndef YESNO_050328_HPP #define YESNO_050328_HPP #include namespace boost { namespace parameter { namespace aux { // types used with the "sizeof trick" to capture the results of // overload resolution at compile-time. typedef char yes_tag; typedef char (&no_tag)[2]; // mpl::true_ and mpl::false_ are not distinguishable by sizeof(), // so we pass them through these functions to get a type that is. yes_tag to_yesno(mpl::true_); no_tag to_yesno(mpl::false_); }}} // namespace boost::parameter::aux #endif // YESNO_050328_HPP ================================================ FILE: benchmarks/boost/parameter/binding.hpp ================================================ // Copyright David Abrahams 2005. Distributed under the Boost // Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_PARAMETER_BINDING_DWA200558_HPP # define BOOST_PARAMETER_BINDING_DWA200558_HPP # include # include # include # include # include # include namespace boost { namespace parameter { // A metafunction that, given an argument pack, returns the type of // the parameter identified by the given keyword. If no such // parameter has been specified, returns Default # if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) template struct binding0 { typedef typename mpl::apply_wrap3< typename Parameters::binding,Keyword,Default,mpl::true_ >::type type; BOOST_MPL_ASSERT_NOT(( mpl::and_< is_same , is_same > )); }; # endif template struct binding { # if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) typedef typename mpl::eval_if< mpl::is_placeholder , mpl::identity , binding0 >::type type; # else typedef typename mpl::apply_wrap3< typename Parameters::binding,Keyword,Default,mpl::true_ >::type type; BOOST_MPL_ASSERT_NOT(( mpl::and_< is_same , is_same > )); # endif BOOST_MPL_AUX_LAMBDA_SUPPORT(3,binding,(Parameters,Keyword,Default)) }; // A metafunction that, given an argument pack, returns the type of // the parameter identified by the given keyword. If no such // parameter has been specified, returns the type returned by invoking // DefaultFn template struct lazy_binding { typedef typename mpl::apply_wrap3< typename Parameters::binding , Keyword , typename aux::result_of0::type , mpl::true_ >::type type; }; }} // namespace boost::parameter #endif // BOOST_PARAMETER_BINDING_DWA200558_HPP ================================================ FILE: benchmarks/boost/parameter/config.hpp ================================================ // Copyright Daniel Wallin, David Abrahams 2005. Use, modification and // distribution is subject to the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_PARAMETER_CONFIG_050403_HPP #define BOOST_PARAMETER_CONFIG_050403_HPP #ifndef BOOST_PARAMETER_MAX_ARITY # define BOOST_PARAMETER_MAX_ARITY 8 #endif #endif // BOOST_PARAMETER_CONFIG_050403_HPP ================================================ FILE: benchmarks/boost/parameter/keyword.hpp ================================================ // Copyright Daniel Wallin, David Abrahams 2005. Use, modification and // distribution is subject to the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) #ifndef KEYWORD_050328_HPP #define KEYWORD_050328_HPP #include #include #include namespace boost { namespace parameter { // Instances of unique specializations of keyword<...> serve to // associate arguments with parameter names. For example: // // struct rate_; // parameter names // struct skew_; // namespace // { // keyword rate; // keywords // keyword skew; // } // // ... // // f(rate = 1, skew = 2.4); // template struct keyword { template typename aux::tag::type const operator=(T& x) const { typedef typename aux::tag::type result; return result(x); } template aux::default_ operator|(Default& default_) const { return aux::default_(default_); } template aux::lazy_default operator||(Default& default_) const { return aux::lazy_default(default_); } template typename aux::tag::type const operator=(T const& x) const { typedef typename aux::tag::type result; return result(x); } template aux::default_ operator|(const Default& default_) const { return aux::default_(default_); } template aux::lazy_default operator||(Default const& default_) const { return aux::lazy_default(default_); } public: // Insurance against ODR violations // People will need to define these keywords in header files. To // prevent ODR violations, it's important that the keyword used in // every instantiation of a function template is the same object. // We provide a reference to a common instance of each keyword // object and prevent construction by users. static keyword const instance; // This interface is deprecated static keyword& get() { return const_cast&>(instance); } }; template keyword const keyword::instance = {}; // Reduces boilerplate required to declare and initialize keywords // without violating ODR. Declares a keyword tag type with the given // name in namespace tag_namespace, and declares and initializes a // reference in an anonymous namespace to a singleton instance of that // type. #define BOOST_PARAMETER_KEYWORD(tag_namespace,name) \ namespace tag_namespace \ { \ struct name \ { \ static char const* keyword_name() \ { \ return #name; \ } \ }; \ } \ namespace \ { \ ::boost::parameter::keyword const& name \ = ::boost::parameter::keyword::instance;\ } }} // namespace boost::parameter #endif // KEYWORD_050328_HPP ================================================ FILE: benchmarks/boost/parameter/macros.hpp ================================================ // Copyright David Abrahams, Daniel Wallin 2003. Use, modification and // distribution is subject to the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_PARAMETER_MACROS_050412_HPP #define BOOST_PARAMETER_MACROS_050412_HPP #include #include #include #include #include #include #include #include #include #include #define BOOST_PARAMETER_FUN_TEMPLATE_HEAD1(n) \ template #define BOOST_PARAMETER_FUN_TEMPLATE_HEAD0(n) #if ! defined(BOOST_NO_SFINAE) && ! BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x592)) # define BOOST_PARAMETER_MATCH_TYPE(n, param) \ BOOST_PP_EXPR_IF(n, typename) param::match \ < \ BOOST_PP_ENUM_PARAMS(n, T) \ >::type #else # define BOOST_PARAMETER_MATCH_TYPE(n, param) param #endif #define BOOST_PARAMETER_FUN_DECL(z, n, params) \ \ BOOST_PP_CAT(BOOST_PARAMETER_FUN_TEMPLATE_HEAD, BOOST_PP_BOOL(n))(n) \ \ BOOST_PP_TUPLE_ELEM(3, 0, params) \ BOOST_PP_TUPLE_ELEM(3, 1, params)( \ BOOST_PP_ENUM_BINARY_PARAMS(n, T, const& p) \ BOOST_PP_COMMA_IF(n) \ BOOST_PARAMETER_MATCH_TYPE(n,BOOST_PP_TUPLE_ELEM(3, 2, params)) \ kw = BOOST_PP_TUPLE_ELEM(3, 2, params)() \ ) \ { \ return BOOST_PP_CAT(BOOST_PP_TUPLE_ELEM(3, 1, params), _with_named_params)( \ kw(BOOST_PP_ENUM_PARAMS(n, p)) \ ); \ } // Generates: // // template // ret name ## _with_named_params(Params const&); // // template // ret name(T0 const& p0, typename parameters::match::type kw = parameters()) // { // return name ## _with_named_params(kw(p0)); // } // // template // ret name(T0 const& p0, ..., TN const& PN // , typename parameters::match::type kw = parameters()) // { // return name ## _with_named_params(kw(p0, ..., pN)); // } // // template // ret name ## _with_named_params(Params const&) // // lo and hi determines the min and max arity of the generated functions. #define BOOST_PARAMETER_FUN(ret, name, lo, hi, parameters) \ \ template \ ret BOOST_PP_CAT(name, _with_named_params)(Params const& p); \ \ BOOST_PP_REPEAT_FROM_TO( \ lo, BOOST_PP_INC(hi), BOOST_PARAMETER_FUN_DECL, (ret, name, parameters)) \ \ template \ ret BOOST_PP_CAT(name, _with_named_params)(Params const& p) #define BOOST_PARAMETER_MEMFUN(ret, name, lo, hi, parameters) \ \ BOOST_PP_REPEAT_FROM_TO( \ lo, BOOST_PP_INC(hi), BOOST_PARAMETER_FUN_DECL, (ret, name, parameters)) \ \ template \ ret BOOST_PP_CAT(name, _with_named_params)(Params const& p) #endif // BOOST_PARAMETER_MACROS_050412_HPP ================================================ FILE: benchmarks/boost/parameter/match.hpp ================================================ // Copyright David Abrahams 2005. Distributed under the Boost // Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_PARAMETER_MATCH_DWA2005714_HPP # define BOOST_PARAMETER_MATCH_DWA2005714_HPP # include # include # if BOOST_WORKAROUND(__MWERKS__, <= 0x3003) // Temporary version of BOOST_PP_SEQ_ENUM until Paul M. integrates the workaround. # define BOOST_PARAMETER_SEQ_ENUM_I(size,seq) BOOST_PP_CAT(BOOST_PP_SEQ_ENUM_, size) seq # define BOOST_PARAMETER_SEQ_ENUM(seq) BOOST_PARAMETER_SEQ_ENUM_I(BOOST_PP_SEQ_SIZE(seq), seq) # else # define BOOST_PARAMETER_SEQ_ENUM(seq) BOOST_PP_SEQ_ENUM(seq) # endif # if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) # include # include # include # include # include # define BOOST_PARAMETER_MATCH_DEFAULTS(ArgTypes) \ BOOST_PP_ENUM_TRAILING_PARAMS( \ BOOST_PP_SUB( \ BOOST_PARAMETER_MAX_ARITY \ , BOOST_PP_SEQ_SIZE(ArgTypes) \ ) \ , ::boost::parameter::void_ BOOST_PP_INTERCEPT \ ) # else # define BOOST_PARAMETER_MATCH_DEFAULTS(ArgTypes) # endif // // Generates, e.g. // // typename dfs_params::match::type name = dfs_params() // // with workarounds for Borland compatibility. // # define BOOST_PARAMETER_MATCH(ParameterSpec, ArgTypes, name) \ typename ParameterSpec ::match< \ BOOST_PARAMETER_SEQ_ENUM(ArgTypes) \ BOOST_PARAMETER_MATCH_DEFAULTS(ArgTypes) \ >::type name = ParameterSpec () #endif // BOOST_PARAMETER_MATCH_DWA2005714_HPP ================================================ FILE: benchmarks/boost/parameter/name.hpp ================================================ // Copyright Daniel Wallin 2006. Use, modification and distribution is // subject to the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_PARAMETER_NAME_060806_HPP # define BOOST_PARAMETER_NAME_060806_HPP # include # include # include # include # include # include # include # include # include # if !defined(BOOST_NO_SFINAE) \ && !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x592)) # include # include namespace boost { namespace parameter { namespace aux { // Tag type passed to MPL lambda. struct lambda_tag; struct name_tag_base {}; template struct name_tag {}; template struct is_name_tag : mpl::false_ {}; }}} // namespace boost::parameter::aux namespace boost { namespace mpl { template struct lambda< T , typename boost::enable_if< parameter::aux::is_name_tag, parameter::aux::lambda_tag >::type > { typedef true_ is_le; typedef bind3< quote3, arg<2>, T, void> result_; typedef result_ type; }; }} // namespace boost::mpl # endif # if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) # include // From Paul Mensonides # define BOOST_PARAMETER_IS_BINARY(x) \ BOOST_PP_SPLIT(1, BOOST_PARAMETER_IS_BINARY_C x BOOST_PP_COMMA() 0) \ /**/ # define BOOST_PARAMETER_IS_BINARY_C(x,y) \ ~, 1 BOOST_PP_RPAREN() \ BOOST_PP_TUPLE_EAT(2) BOOST_PP_LPAREN() ~ \ /**/ # else # include # define BOOST_PARAMETER_IS_BINARY(x) BOOST_PP_IS_BINARY(x) # endif # define BOOST_PARAMETER_BASIC_NAME(tag_namespace, tag, name) \ namespace tag_namespace \ { \ struct tag \ { \ static char const* keyword_name() \ { \ return BOOST_PP_STRINGIZE(tag); \ } \ \ typedef boost::parameter::value_type< \ boost::mpl::_2, tag, boost::parameter::void_ \ > _; \ \ typedef boost::parameter::value_type< \ boost::mpl::_2, tag, boost::parameter::void_ \ > _1; \ }; \ } \ namespace \ { \ ::boost::parameter::keyword const& name \ = ::boost::parameter::keyword::instance; \ } # define BOOST_PARAMETER_COMPLEX_NAME_TUPLE1(tag,namespace) \ (tag, namespace), ~ # define BOOST_PARAMETER_COMPLEX_NAME_TUPLE(name) \ BOOST_PP_TUPLE_ELEM(2, 0, (BOOST_PARAMETER_COMPLEX_NAME_TUPLE1 name)) # define BOOST_PARAMETER_COMPLEX_NAME_TAG(name) \ BOOST_PP_TUPLE_ELEM(2, 0, BOOST_PARAMETER_COMPLEX_NAME_TUPLE(name)) # define BOOST_PARAMETER_COMPLEX_NAME_NAMESPACE(name) \ BOOST_PP_TUPLE_ELEM(2, 1, BOOST_PARAMETER_COMPLEX_NAME_TUPLE(name)) # define BOOST_PARAMETER_COMPLEX_NAME(name) \ BOOST_PARAMETER_BASIC_NAME( \ BOOST_PARAMETER_COMPLEX_NAME_NAMESPACE(name) \ , BOOST_PP_TUPLE_EAT(2) name \ , BOOST_PARAMETER_COMPLEX_NAME_TAG(name) \ ) \ /**/ # define BOOST_PARAMETER_SIMPLE_NAME(name) \ BOOST_PARAMETER_BASIC_NAME(tag, name, BOOST_PP_CAT(_, name)) # define BOOST_PARAMETER_NAME(name) \ BOOST_PP_IIF( \ BOOST_PARAMETER_IS_BINARY(name) \ , BOOST_PARAMETER_COMPLEX_NAME \ , BOOST_PARAMETER_SIMPLE_NAME \ )(name) \ /**/ # define BOOST_PARAMETER_TEMPLATE_KEYWORD(name) \ namespace tag \ { \ struct name; \ } \ template \ struct name \ : boost::parameter::template_keyword \ {}; \ /**/ #endif // BOOST_PARAMETER_NAME_060806_HPP ================================================ FILE: benchmarks/boost/parameter/parameters.hpp ================================================ // Copyright David Abrahams, Daniel Wallin 2003. Use, modification and // distribution is subject to the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_PARAMETERS_031014_HPP #define BOOST_PARAMETERS_031014_HPP #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 #include #include #include #include #include #include #include #include #include #include namespace parameter_ { template struct unmatched_argument { BOOST_MPL_ASSERT((boost::is_same)); typedef int type; }; } // namespace parameter_ namespace boost { template class reference_wrapper; namespace parameter { namespace aux { struct use_default {}; } // These templates can be used to describe the treatment of particular // named parameters for the purposes of overload elimination with // SFINAE, by placing specializations in the parameters<...> list. In // order for a treated function to participate in overload resolution: // // - all keyword tags wrapped in required<...> must have a matching // actual argument // // - The actual argument type matched by every keyword tag // associated with a predicate must satisfy that predicate // // If a keyword k is specified without an optional<...> or // required<...>, wrapper, it is treated as though optional were // specified. // // If a keyword k is specified with deduced<...>, that keyword // will be automatically deduced from the argument list. // template struct required { typedef Tag key_type; typedef Predicate predicate; }; template struct optional { typedef Tag key_type; typedef Predicate predicate; }; template struct deduced { typedef Tag key_type; }; namespace aux { // Defines metafunctions, is_required and is_optional, that // identify required<...>, optional<...> and deduced<...> specializations. BOOST_DETAIL_IS_XXX_DEF(required, required, 2) BOOST_DETAIL_IS_XXX_DEF(optional, optional, 2) BOOST_DETAIL_IS_XXX_DEF(deduced_aux, deduced, 1) template struct is_deduced0 : is_deduced_aux< typename S::key_type >::type {}; template struct is_deduced : mpl::eval_if< mpl::or_< is_optional, is_required > , is_deduced0 , mpl::false_ >::type {}; // // key_type, has_default, and predicate -- // // These metafunctions accept a ParameterSpec and extract the // keyword tag, whether or not a default is supplied for the // parameter, and the predicate that the corresponding actual // argument type is required match. // // a ParameterSpec is a specialization of either keyword<...>, // required<...>, optional<...> // // helper for key_type<...>, below. template struct get_tag_type0 { typedef typename T::key_type type; }; template struct get_tag_type : mpl::eval_if< is_deduced_aux , get_tag_type0 , mpl::identity > {}; template struct tag_type : mpl::eval_if< mpl::or_< is_optional , is_required > , get_tag_type , mpl::identity > {}; template struct has_default : mpl::not_ > {}; // helper for get_predicate<...>, below template struct get_predicate_or_default { typedef T type; }; template <> struct get_predicate_or_default { typedef mpl::always type; }; // helper for predicate<...>, below template struct get_predicate { typedef typename get_predicate_or_default::type type; }; template struct predicate : mpl::eval_if< mpl::or_< is_optional , is_required > , get_predicate , mpl::identity > > { }; // Converts a ParameterSpec into a specialization of // parameter_requirements. We need to do this in order to get the // tag_type into the type in a way that can be conveniently matched // by a satisfies(...) member function in arg_list. template struct as_parameter_requirements { typedef parameter_requirements< typename tag_type::type , typename predicate::type , typename has_default::type > type; }; template struct is_named_argument : mpl::or_< is_template_keyword , is_tagged_argument > {}; // Returns mpl::true_ iff the given ParameterRequirements are // satisfied by ArgList. template struct satisfies { #if BOOST_WORKAROUND(BOOST_MSVC, == 1310) // VC7.1 can't handle the sizeof() implementation below, // so we use this instead. typedef typename mpl::apply_wrap3< typename ArgList::binding , typename ParameterRequirements::keyword , void_ , mpl::false_ >::type bound; typedef typename mpl::eval_if< is_same , typename ParameterRequirements::has_default , mpl::apply_wrap2< typename mpl::lambda< typename ParameterRequirements::predicate, lambda_tag >::type , bound , ArgList > >::type type; #else BOOST_STATIC_CONSTANT( bool, value = ( sizeof( aux::to_yesno( ArgList::satisfies((ParameterRequirements*)0, (ArgList*)0) ) ) == sizeof(yes_tag) ) ); typedef mpl::bool_ type; #endif }; // Returns mpl::true_ if the requirements of the given ParameterSpec // are satisfied by ArgList. template struct satisfies_requirements_of : satisfies< ArgList , typename as_parameter_requirements::type > {}; // Tags a deduced argument Arg with the keyword tag of Spec using TagFn. // Returns the tagged argument and the mpl::set<> UsedArgs with the // tag of Spec inserted. template struct tag_deduced { typedef mpl::pair< typename mpl::apply_wrap2::type, Arg>::type , typename aux::insert_::type>::type > type; }; template < class Argument , class ArgumentPack , class DeducedArgs , class UsedArgs , class TagFn > struct deduce_tag; // Tag type passed to MPL lambda. struct lambda_tag; // Helper for deduce_tag<> below. template < class Argument , class ArgumentPack , class DeducedArgs , class UsedArgs , class TagFn > struct deduce_tag0 { typedef typename DeducedArgs::spec spec; typedef typename mpl::apply_wrap2< typename mpl::lambda< typename spec::predicate, lambda_tag >::type , Argument , ArgumentPack >::type condition; // Deduced parameter matches several arguments. BOOST_MPL_ASSERT(( mpl::not_::type> > > )); typedef typename mpl::eval_if< condition , tag_deduced , deduce_tag >::type type; }; // Tries to deduced a keyword tag for a given Argument. // Returns an mpl::pair<> consisting of the tagged_argument<>, // and an mpl::set<> where the new tag has been inserted. // // Argument: The argument type to be tagged. // // ArgumentPack: The ArgumentPack built so far. // // DeducedArgs: A specialization of deduced_item<> (see below). // A list containing only the deduced ParameterSpecs. // // UsedArgs: An mpl::set<> containing the keyword tags used so far. // // TagFn: A metafunction class used to tag positional or deduced // arguments with a keyword tag. template < class Argument , class ArgumentPack , class DeducedArgs , class UsedArgs , class TagFn > struct deduce_tag { typedef typename mpl::eval_if< is_same , mpl::pair , deduce_tag0 >::type type; }; template < class List , class DeducedArgs , class TagFn , class Positional , class UsedArgs , class ArgumentPack , class Error > struct make_arg_list_aux; // Inserts Tagged::key_type into the UserArgs set. // Extra indirection to lazily evaluate Tagged::key_type. template struct insert_tagged { typedef typename aux::insert_< UsedArgs, typename Tagged::key_type >::type type; }; // Borland needs the insane extra-indirection workaround below // so that it doesn't magically drop the const qualifier from // the argument type. template < class List , class DeducedArgs , class TagFn , class Positional , class UsedArgs , class ArgumentPack #if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) , class argument #endif , class Error > #if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) struct make_arg_list00 #else struct make_arg_list0 #endif { #if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) typedef typename List::arg argument; #endif typedef typename List::spec parameter_spec; typedef typename tag_type::type tag_; typedef is_named_argument is_tagged; // If this argument is either explicitly tagged or a deduced // parameter, we turn off positional matching. typedef mpl::and_< mpl::not_< mpl::or_, is_tagged> > , Positional > positional; // If this parameter is explicitly tagged we add it to the // used-parmeters set. We only really need to add parameters // that are deduced, but we would need a way to check if // a given tag corresponds to a deduced parameter spec. typedef typename mpl::eval_if< is_tagged , insert_tagged , mpl::identity >::type used_args; // If this parameter is neither explicitly tagged, nor // positionally matched; deduce the tag from the deduced // parameter specs. typedef typename mpl::eval_if< mpl::or_ , mpl::pair , deduce_tag >::type deduced_data; // If this parameter is explicitly tagged.. typedef typename mpl::eval_if< is_tagged , mpl::identity // .. just use it , mpl::eval_if< // .. else, if positional matching is turned on.. positional , mpl::apply_wrap2 // .. tag it positionally , mpl::first // .. else, use the deduced tag > >::type tagged; // We build the arg_list incrementally as we go, prepending new // nodes. typedef typename mpl::if_< mpl::and_< is_same , is_same > , parameter_::unmatched_argument , void_ >::type error; typedef typename mpl::if_< is_same , ArgumentPack , arg_list >::type argument_pack; typedef typename make_arg_list_aux< typename List::tail , DeducedArgs , TagFn , positional , typename deduced_data::second , argument_pack , error >::type type; }; #if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) template < class List , class DeducedArgs , class TagFn , class Positional , class UsedArgs , class ArgumentPack , class Error > struct make_arg_list0 { typedef typename mpl::eval_if< typename List::is_arg_const , make_arg_list00< List , DeducedArgs , TagFn , Positional , UsedArgs , ArgumentPack , typename List::arg const , Error > , make_arg_list00< List , DeducedArgs , TagFn , Positional , UsedArgs , ArgumentPack , typename List::arg , Error > >::type type; }; #endif // Returns an ArgumentPack where the list of arguments has // been tagged with keyword tags. // // List: A specialization of item<> (see below). Contains // both the ordered ParameterSpecs, and the given arguments. // // DeducedArgs: A specialization of deduced_item<> (see below). // A list containing only the deduced ParameterSpecs. // // TagFn: A metafunction class used to tag positional or deduced // arguments with a keyword tag. // // Position: An mpl::bool_<> specialization indicating if positional // matching is to be performed. // // DeducedSet: An mpl::set<> containing the keyword tags used so far. // // ArgumentPack: The ArgumentPack built so far. This is initially an // empty_arg_list and is built incrementally. // template < class List , class DeducedArgs , class TagFn , class Positional , class DeducedSet , class ArgumentPack , class Error > struct make_arg_list_aux { typedef typename mpl::eval_if< is_same , mpl::identity > , make_arg_list0 >::type type; }; // VC6.5 was choking on the default parameters for make_arg_list_aux, so // this just forwards to that adding in the defaults. template < class List , class DeducedArgs , class TagFn , class EmitErrors = mpl::true_ > struct make_arg_list { typedef typename make_arg_list_aux< List, DeducedArgs, TagFn, mpl::true_, aux::set0, empty_arg_list, void_ >::type type; }; // A parameter spec item typelist. template struct item { typedef Spec spec; #if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) typedef is_const is_arg_const; #endif typedef Arg arg; typedef Tail tail; }; template struct make_item { typedef item type; }; // Creates a item typelist. template struct make_items { typedef typename mpl::eval_if< is_same , mpl::identity , make_item >::type type; }; // A typelist that stored deduced parameter specs. template struct deduced_item { typedef ParameterSpec spec; typedef Tail tail; }; // Evaluate Tail and construct deduced_item list. template struct make_deduced_item { typedef deduced_item type; }; template struct make_deduced_items { typedef typename mpl::eval_if< is_same , mpl::identity , mpl::eval_if< is_deduced , make_deduced_item , Tail > >::type type; }; // Generates: // // make< // parameter_spec#0, argument_type#0 // , make< // parameter_spec#1, argument_type#1 // , ... mpl::identity // ...> // > #define BOOST_PARAMETER_make_arg_list(z, n, names) \ BOOST_PP_SEQ_ELEM(0,names)< \ BOOST_PP_CAT(BOOST_PP_SEQ_ELEM(1,names), n), \ BOOST_PP_CAT(BOOST_PP_SEQ_ELEM(2,names), n), #define BOOST_PARAMETER_right_angle(z, n, text) > #define BOOST_PARAMETER_build_arg_list(n, make, parameter_spec, argument_type) \ BOOST_PP_REPEAT( \ n, BOOST_PARAMETER_make_arg_list, (make)(parameter_spec)(argument_type)) \ mpl::identity \ BOOST_PP_REPEAT(n, BOOST_PARAMETER_right_angle, _) #define BOOST_PARAMETER_make_deduced_list(z, n, names) \ BOOST_PP_SEQ_ELEM(0,names)< \ BOOST_PP_CAT(BOOST_PP_SEQ_ELEM(1,names), n), #define BOOST_PARAMETER_build_deduced_list(n, make, parameter_spec) \ BOOST_PP_REPEAT( \ n, BOOST_PARAMETER_make_deduced_list, (make)(parameter_spec)) \ mpl::identity \ BOOST_PP_REPEAT(n, BOOST_PARAMETER_right_angle, _) struct tag_keyword_arg { template struct apply : tag {}; }; struct tag_template_keyword_arg { template struct apply { typedef template_keyword type; }; }; } // namespace aux #define BOOST_PARAMETER_FORWARD_TYPEDEF(z, i, names) \ typedef BOOST_PP_CAT(BOOST_PP_SEQ_ELEM(0,names),i) BOOST_PP_CAT(BOOST_PP_SEQ_ELEM(1,names),i); #define BOOST_PARAMETER_FORWARD_TYPEDEFS(n, src, dest) \ BOOST_PP_REPEAT(n, BOOST_PARAMETER_FORWARD_TYPEDEF, (src)(dest)) #define BOOST_PARAMETER_TEMPLATE_ARGS(z, n, text) class BOOST_PP_CAT(PS, n) = void_ template< class PS0 , BOOST_PP_ENUM_SHIFTED(BOOST_PARAMETER_MAX_ARITY, BOOST_PARAMETER_TEMPLATE_ARGS, _) > struct parameters { #undef BOOST_PARAMETER_TEMPLATE_ARGS typedef typename BOOST_PARAMETER_build_deduced_list( BOOST_PARAMETER_MAX_ARITY, aux::make_deduced_items, PS )::type deduced_list; // if the elements of NamedList match the criteria of overload // resolution, returns a type which can be constructed from // parameters. Otherwise, this is not a valid metafunction (no nested // ::type). #if ! defined(BOOST_NO_SFINAE) && ! BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x592)) // If NamedList satisfies the PS0, PS1, ..., this is a // metafunction returning parameters. Otherwise it // has no nested ::type. template struct match_base : mpl::if_< // mpl::and_< // aux::satisfies_requirements_of // , mpl::and_< // aux::satisfies_requirements_of... // ..., mpl::true_ // ...> > # define BOOST_PARAMETER_satisfies(z, n, text) \ mpl::and_< \ aux::satisfies_requirements_of< \ typename mpl::first::type \ , BOOST_PP_CAT(PS, n)> \ , mpl::and_< is_same::type, void_> , BOOST_PP_REPEAT(BOOST_PARAMETER_MAX_ARITY, BOOST_PARAMETER_satisfies, _) mpl::true_ BOOST_PP_REPEAT(BOOST_PARAMETER_MAX_ARITY, BOOST_PARAMETER_right_angle, _) > # undef BOOST_PARAMETER_satisfies , mpl::identity , void_ > {}; #endif // Specializations are to be used as an optional argument to // eliminate overloads via SFINAE template< #if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) // Borland simply can't handle default arguments in member // class templates. People wishing to write portable code can // explicitly specify BOOST_PARAMETER_MAX_ARITY arguments BOOST_PP_ENUM_PARAMS(BOOST_PARAMETER_MAX_ARITY, class A) #else BOOST_PP_ENUM_BINARY_PARAMS( BOOST_PARAMETER_MAX_ARITY, class A, = void_ BOOST_PP_INTERCEPT ) #endif > struct match # if ! defined(BOOST_NO_SFINAE) && ! BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x592)) : match_base< typename aux::make_arg_list< typename BOOST_PARAMETER_build_arg_list( BOOST_PARAMETER_MAX_ARITY, aux::make_items, PS, A )::type , deduced_list , aux::tag_keyword_arg , mpl::false_ // Don't emit errors when doing SFINAE >::type >::type {}; # else { typedef parameters< BOOST_PP_ENUM_PARAMS(BOOST_PARAMETER_MAX_ARITY, PS) > type; }; # endif // Metafunction that returns an ArgumentPack. // TODO, bind has to instantiate the error type in the result // of make_arg_list. template < #if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) // Borland simply can't handle default arguments in member // class templates. People wishing to write portable code can // explicitly specify BOOST_PARAMETER_MAX_ARITY arguments BOOST_PP_ENUM_PARAMS(BOOST_PARAMETER_MAX_ARITY, class A) #else BOOST_PP_ENUM_BINARY_PARAMS( BOOST_PARAMETER_MAX_ARITY, class A, = void_ BOOST_PP_INTERCEPT ) #endif > struct bind { typedef typename aux::make_arg_list< typename BOOST_PARAMETER_build_arg_list( BOOST_PARAMETER_MAX_ARITY, aux::make_items, PS, A )::type , deduced_list , aux::tag_template_keyword_arg >::type result; typedef typename mpl::first::type type; }; BOOST_PARAMETER_FORWARD_TYPEDEFS(BOOST_PARAMETER_MAX_ARITY, PS, parameter_spec) // // The function call operator is used to build an arg_list that // labels the positional parameters and maintains whatever other // tags may have been specified by the caller. // // !!!NOTE!!! // // The make_arg_list<> produces a reversed arg_list, so // we need to pass the arguments to its constructor // reversed. // aux::empty_arg_list operator()() const { return aux::empty_arg_list(); } template typename mpl::first< typename aux::make_arg_list< aux::item< PS0,A0 > , deduced_list , aux::tag_keyword_arg >::type >::type operator()(A0& a0) const { typedef typename aux::make_arg_list< aux::item< PS0,A0 > , deduced_list , aux::tag_keyword_arg >::type result; typedef typename mpl::first::type result_type; typedef typename mpl::second::type error; error(); return result_type( a0 // , void_(), void_(), void_() ... BOOST_PP_ENUM_TRAILING_PARAMS( BOOST_PP_SUB(BOOST_PARAMETER_MAX_ARITY, 1) , aux::void_reference() BOOST_PP_INTERCEPT) ); } template typename mpl::first< typename aux::make_arg_list< aux::item< PS0,A0 , aux::item< PS1,A1 > > , deduced_list , aux::tag_keyword_arg >::type >::type operator()(A0& a0, A1& a1) const { typedef typename aux::make_arg_list< aux::item< PS0,A0 , aux::item< PS1,A1 > > , deduced_list , aux::tag_keyword_arg >::type result; typedef typename mpl::first::type result_type; typedef typename mpl::second::type error; error(); return result_type( a1,a0 // , void_(), void_() ... BOOST_PP_ENUM_TRAILING_PARAMS( BOOST_PP_SUB(BOOST_PARAMETER_MAX_ARITY, 2) , aux::void_reference() BOOST_PP_INTERCEPT) ); } // Higher arities are handled by the preprocessor #define BOOST_PP_ITERATION_PARAMS_1 (3,( \ 3,BOOST_PARAMETER_MAX_ARITY, \ )) #include BOOST_PP_ITERATE() }; } // namespace parameter } // namespace boost #endif // BOOST_PARAMETERS_031014_HPP ================================================ FILE: benchmarks/boost/parameter/preprocessor.hpp ================================================ // Copyright Daniel Wallin 2006. Use, modification and distribution is // subject to the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_PARAMETER_PREPROCESSOR_060206_HPP # define BOOST_PARAMETER_PREPROCESSOR_060206_HPP # 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 # include namespace boost { namespace parameter { namespace aux { # if ! defined(BOOST_NO_SFINAE) && ! BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x592)) // Given Match, which is "void x" where x is an argument matching // criterion, extract a corresponding MPL predicate. template struct unwrap_predicate; // Match anything template <> struct unwrap_predicate { typedef mpl::always type; }; #if BOOST_WORKAROUND(__SUNPRO_CC, BOOST_TESTED_AT(0x580)) typedef void* voidstar; // A matching predicate is explicitly specified template struct unwrap_predicate { typedef Predicate type; }; #else // A matching predicate is explicitly specified template struct unwrap_predicate { typedef Predicate type; }; #endif // A type to which the argument is supposed to be convertible is // specified template struct unwrap_predicate { typedef is_convertible type; }; // Recast the ParameterSpec's nested match metafunction as a free metafunction template < class Parameters , BOOST_PP_ENUM_BINARY_PARAMS( BOOST_PARAMETER_MAX_ARITY, class A, = boost::parameter::void_ BOOST_PP_INTERCEPT ) > struct match : Parameters::template match< BOOST_PP_ENUM_PARAMS(BOOST_PARAMETER_MAX_ARITY, A) > {}; # endif # undef false_ template < class Parameters , BOOST_PP_ENUM_BINARY_PARAMS( BOOST_PARAMETER_MAX_ARITY, class A, = boost::parameter::void_ BOOST_PP_INTERCEPT ) > struct argument_pack { typedef typename make_arg_list< typename BOOST_PARAMETER_build_arg_list( BOOST_PARAMETER_MAX_ARITY, make_items, typename Parameters::parameter_spec, A )::type , typename Parameters::deduced_list , tag_keyword_arg , mpl::false_ >::type result; typedef typename mpl::first::type type; }; // Works around VC6 problem where it won't accept rvalues. template T& as_lvalue(T& value, long) { return value; } template T const& as_lvalue(T const& value, int) { return value; } # if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) template struct apply_predicate { BOOST_MPL_ASSERT(( mpl::and_ )); typedef typename mpl::if_< typename mpl::apply2::type , char , int >::type type; }; template struct funptr_predicate { static P p; template static typename apply_predicate::type check_predicate(type, Args*, void**(*)(P0)); template static typename mpl::if_< is_convertible , char , int >::type check_predicate(type, Args*, void*(*)(P0)); template struct apply { BOOST_STATIC_CONSTANT(bool, result = sizeof(check_predicate(boost::type(), (Args*)0, &p)) == 1 ); typedef mpl::bool_::result> type; }; }; template <> struct funptr_predicate : mpl::always {}; # endif }}} // namespace boost::parameter::aux # if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) // From Paul Mensonides # define BOOST_PARAMETER_IS_NULLARY(x) \ BOOST_PP_SPLIT(1, BOOST_PARAMETER_IS_NULLARY_C x BOOST_PP_COMMA() 0) \ /**/ # define BOOST_PARAMETER_IS_NULLARY_C() \ ~, 1 BOOST_PP_RPAREN() \ BOOST_PP_TUPLE_EAT(2) BOOST_PP_LPAREN() ~ \ /**/ # else # define BOOST_PARAMETER_IS_NULLARY(x) BOOST_PP_IS_NULLARY(x) # endif # define BOOST_PARAMETER_MEMBER_FUNCTION_CHECK_STATIC_static () # define BOOST_PARAMETER_MEMBER_FUNCTION_IS_STATIC(name) \ BOOST_PARAMETER_IS_NULLARY( \ BOOST_PP_CAT(BOOST_PARAMETER_MEMBER_FUNCTION_CHECK_STATIC_,name) \ ) # if !defined(BOOST_MSVC) # define BOOST_PARAMETER_MEMBER_FUNCTION_STRIP_STATIC_static # define BOOST_PARAMETER_MEMBER_FUNCTION_STRIP_STATIC(name) \ BOOST_PP_CAT(BOOST_PARAMETER_MEMBER_FUNCTION_STRIP_STATIC_, name) # else // Workaround for MSVC preprocessor. // // When stripping static from "static f", msvc will produce // " f". The leading whitespace doesn't go away when pasting // the token with something else, so this thing is a hack to // strip the whitespace. # define BOOST_PARAMETER_MEMBER_FUNCTION_STRIP_STATIC_static ( # define BOOST_PARAMETER_MEMBER_FUNCTION_STRIP_STATIC_AUX(name) \ BOOST_PP_CAT(BOOST_PARAMETER_MEMBER_FUNCTION_STRIP_STATIC_, name)) # define BOOST_PARAMETER_MEMBER_FUNCTION_STRIP_STATIC(name) \ BOOST_PP_SEQ_HEAD( \ BOOST_PARAMETER_MEMBER_FUNCTION_STRIP_STATIC_AUX(name) \ ) # endif # define BOOST_PARAMETER_MEMBER_FUNCTION_STATIC(name) \ BOOST_PP_EXPR_IF( \ BOOST_PARAMETER_MEMBER_FUNCTION_IS_STATIC(name) \ , static \ ) # define BOOST_PARAMETER_MEMBER_FUNCTION_NAME(name) \ BOOST_PP_IF( \ BOOST_PARAMETER_MEMBER_FUNCTION_IS_STATIC(name) \ , BOOST_PARAMETER_MEMBER_FUNCTION_STRIP_STATIC \ , name BOOST_PP_TUPLE_EAT(1) \ )(name) // Calculates [begin, end) arity range. # define BOOST_PARAMETER_ARITY_RANGE_M_optional(state) state # define BOOST_PARAMETER_ARITY_RANGE_M_deduced_optional(state) state # define BOOST_PARAMETER_ARITY_RANGE_M_required(state) BOOST_PP_INC(state) # define BOOST_PARAMETER_ARITY_RANGE_M_deduced_required(state) BOOST_PP_INC(state) # define BOOST_PARAMETER_ARITY_RANGE_M(s, state, x) \ BOOST_PP_CAT( \ BOOST_PARAMETER_ARITY_RANGE_M_ \ , BOOST_PARAMETER_FN_ARG_QUALIFIER(x) \ )(state) /**/ # define BOOST_PARAMETER_ARITY_RANGE(args) \ ( \ BOOST_PP_SEQ_FOLD_LEFT(BOOST_PARAMETER_ARITY_RANGE_M, 0, args) \ , BOOST_PP_INC(BOOST_PP_SEQ_SIZE(args)) \ ) /**/ // Accessor macros for the argument specs tuple. # define BOOST_PARAMETER_FN_ARG_QUALIFIER(x) \ BOOST_PP_TUPLE_ELEM(4,0,x) /**/ # define BOOST_PARAMETER_FN_ARG_NAME(x) \ BOOST_PP_TUPLE_ELEM(4,1,x) /**/ # define BOOST_PARAMETER_FN_ARG_PRED(x) \ BOOST_PP_TUPLE_ELEM(4,2,x) /**/ # define BOOST_PARAMETER_FN_ARG_DEFAULT(x) \ BOOST_PP_TUPLE_ELEM(4,3,x) /**/ # define BOOST_PARAMETETER_FUNCTION_EAT_KEYWORD_QUALIFIER_out(x) # define BOOST_PARAMETETER_FUNCTION_EAT_KEYWORD_QUALIFIER_in_out(x) // Returns 1 if x is either "out(k)" or "in_out(k)". # define BOOST_PARAMETER_FUNCTION_IS_KEYWORD_QUALIFIER(x) \ BOOST_PP_IS_EMPTY( \ BOOST_PP_CAT(BOOST_PARAMETETER_FUNCTION_EAT_KEYWORD_QUALIFIER_, x) \ ) \ /**/ # define BOOST_PARAMETETER_FUNCTION_GET_KEYWORD_QUALIFIER_out(x) x # define BOOST_PARAMETETER_FUNCTION_GET_KEYWORD_QUALIFIER_in_out(x) x # define BOOST_PARAMETER_FUNCTION_KEYWORD_GET(x) \ BOOST_PP_CAT(BOOST_PARAMETETER_FUNCTION_GET_KEYWORD_QUALIFIER_, x) /**/ // Returns the keyword of x, where x is either a keyword qualifier // or a keyword. // // k => k // out(k) => k // in_out(k) => k // # define BOOST_PARAMETER_FUNCTION_KEYWORD(x) \ BOOST_PP_IF( \ BOOST_PARAMETER_FUNCTION_IS_KEYWORD_QUALIFIER(x) \ , BOOST_PARAMETER_FUNCTION_KEYWORD_GET \ , x BOOST_PP_TUPLE_EAT(1) \ )(x) /**/ # define BOOST_PARAMETER_FN_ARG_KEYWORD(x) \ BOOST_PARAMETER_FUNCTION_KEYWORD( \ BOOST_PARAMETER_FN_ARG_NAME(x) \ ) // Builds forwarding functions. # define BOOST_PARAMETER_FUNCTION_FWD_FUNCTION_TEMPLATE_Z(z, n) \ template /**/ # if ! defined(BOOST_NO_SFINAE) && ! BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x592)) # define BOOST_PARAMETER_FUNCTION_FWD_MATCH_Z(z, name, parameters, n) \ , typename boost::parameter::aux::match< \ parameters, BOOST_PP_ENUM_PARAMS(n, ParameterArgumentType) \ >::type = parameters() # else # define BOOST_PARAMETER_FUNCTION_FWD_MATCH_Z(z, name, parameters, n) # endif /**/ # define BOOST_PARAMETER_FUNCTION_PARAMETERS_NAME(base) \ BOOST_PP_CAT( \ boost_param_parameters_ \ , BOOST_PP_CAT(__LINE__, BOOST_PARAMETER_MEMBER_FUNCTION_NAME(base)) \ ) // Produce a name for a result type metafunction for the function // named base # define BOOST_PARAMETER_FUNCTION_RESULT_NAME(base) \ BOOST_PP_CAT( \ boost_param_result_ \ , BOOST_PP_CAT(__LINE__,BOOST_PARAMETER_MEMBER_FUNCTION_NAME(base)) \ ) // Can't do boost_param_impl_ ## basee because base might start with an underscore // daniel: what? how is that relevant? the reason for using CAT() is to make sure // base is expanded. i'm not sure we need to here, but it's more stable to do it. # define BOOST_PARAMETER_IMPL(base) \ BOOST_PP_CAT(boost_param_impl,BOOST_PARAMETER_MEMBER_FUNCTION_NAME(base)) # define BOOST_PARAMETER_FUNCTION_FWD_FUNCTION00(z, n, r, data, elem) \ BOOST_PP_IF( \ n \ , BOOST_PARAMETER_FUNCTION_FWD_FUNCTION_TEMPLATE_Z, BOOST_PP_TUPLE_EAT(2) \ )(z,n) \ BOOST_PARAMETER_MEMBER_FUNCTION_STATIC(BOOST_PP_TUPLE_ELEM(7,3,data)) \ inline \ BOOST_PP_EXPR_IF(n, typename) \ BOOST_PARAMETER_FUNCTION_RESULT_NAME(BOOST_PP_TUPLE_ELEM(7,3,data))< \ BOOST_PP_EXPR_IF(n, typename) \ boost::parameter::aux::argument_pack< \ BOOST_PARAMETER_FUNCTION_PARAMETERS_NAME(BOOST_PP_TUPLE_ELEM(7,3,data)) \ BOOST_PP_COMMA_IF(n) \ BOOST_PP_IF( \ n, BOOST_PP_SEQ_ENUM, BOOST_PP_TUPLE_EAT(1) \ )(elem) \ >::type \ >::type \ BOOST_PARAMETER_MEMBER_FUNCTION_NAME(BOOST_PP_TUPLE_ELEM(7,3,data))( \ BOOST_PP_IF( \ n \ , BOOST_PP_SEQ_FOR_EACH_I_R \ , BOOST_PP_TUPLE_EAT(4) \ )( \ r \ , BOOST_PARAMETER_FUNCTION_ARGUMENT \ , ~ \ , elem \ ) \ BOOST_PP_IF(n, BOOST_PARAMETER_FUNCTION_FWD_MATCH_Z, BOOST_PP_TUPLE_EAT(4))( \ z \ , BOOST_PP_TUPLE_ELEM(7,3,data) \ , BOOST_PARAMETER_FUNCTION_PARAMETERS_NAME(BOOST_PP_TUPLE_ELEM(7,3,data)) \ , n \ ) \ ) BOOST_PP_EXPR_IF(BOOST_PP_TUPLE_ELEM(7,4,data), const) \ { \ return BOOST_PARAMETER_IMPL(BOOST_PP_TUPLE_ELEM(7,3,data))( \ BOOST_PARAMETER_FUNCTION_PARAMETERS_NAME(BOOST_PP_TUPLE_ELEM(7,3,data))()( \ BOOST_PP_ENUM_PARAMS_Z(z, n, a) \ ) \ ); \ } /**/ # define BOOST_PARAMETER_FUNCTION_FWD_FUNCTION0(r, data, elem) \ BOOST_PARAMETER_FUNCTION_FWD_FUNCTION00( \ BOOST_PP_TUPLE_ELEM(7,0,data) \ , BOOST_PP_TUPLE_ELEM(7,1,data) \ , r \ , data \ , elem \ ) /**/ # define BOOST_PARAMETER_FUNCTION_FWD_FUNCTION_ARITY_0(z, n, data) \ BOOST_PARAMETER_FUNCTION_FWD_FUNCTION00( \ z, n, BOOST_PP_DEDUCE_R() \ , (z, n, BOOST_PP_TUPLE_REM(5) data) \ , ~ \ ) /**/ # define BOOST_PARAMETER_FUNCTION_FWD_FUNCTION_ARITY_N(z, n, data) \ BOOST_PP_SEQ_FOR_EACH( \ BOOST_PARAMETER_FUNCTION_FWD_FUNCTION0 \ , (z, n, BOOST_PP_TUPLE_REM(5) data) \ , BOOST_PP_SEQ_FOR_EACH_PRODUCT( \ BOOST_PARAMETER_FUNCTION_FWD_PRODUCT \ , BOOST_PP_SEQ_FIRST_N( \ n, BOOST_PP_TUPLE_ELEM(5,3,data) \ ) \ ) \ ) /**/ # define BOOST_PARAMETER_FUNCTION_FWD_FUNCTION(z, n, data) \ BOOST_PP_IF( \ n \ , BOOST_PARAMETER_FUNCTION_FWD_FUNCTION_ARITY_N \ , BOOST_PARAMETER_FUNCTION_FWD_FUNCTION_ARITY_0 \ )(z,n,data) \ /**/ # define BOOST_PARAMETER_FUNCTION_FWD_FUNCTIONS0( \ result,name,args,const_,combinations,range \ ) \ BOOST_PP_REPEAT_FROM_TO( \ BOOST_PP_TUPLE_ELEM(2,0,range), BOOST_PP_TUPLE_ELEM(2,1,range) \ , BOOST_PARAMETER_FUNCTION_FWD_FUNCTION \ , (result,name,const_,combinations,BOOST_PP_TUPLE_ELEM(2,1,range)) \ ) /**/ # define BOOST_PARAMETER_FUNCTION_FWD_FUNCTIONS(result,name,args, const_, combinations) \ BOOST_PARAMETER_FUNCTION_FWD_FUNCTIONS0( \ result, name, args, const_, combinations, BOOST_PARAMETER_ARITY_RANGE(args) \ ) /**/ // Builds boost::parameter::parameters<> specialization # define BOOST_PARAMETER_FUNCTION_PARAMETERS_QUALIFIER_optional(tag) \ optional # define BOOST_PARAMETER_FUNCTION_PARAMETERS_QUALIFIER_deduced_required(tag) \ required # if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) # define BOOST_PARAMETER_FUNCTION_PARAMETERS_M(r,tag_namespace,i,elem) \ BOOST_PP_COMMA_IF(i) \ boost::parameter::BOOST_PP_CAT( \ BOOST_PARAMETER_FUNCTION_PARAMETERS_QUALIFIER_ \ , BOOST_PARAMETER_FN_ARG_QUALIFIER(elem) \ )( \ tag_namespace::BOOST_PARAMETER_FUNCTION_KEYWORD( \ BOOST_PARAMETER_FN_ARG_KEYWORD(elem) \ ) \ ) \ , typename boost::parameter::aux::unwrap_predicate< \ void BOOST_PARAMETER_FN_ARG_PRED(elem) \ >::type \ > # elif BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) # define BOOST_PARAMETER_FUNCTION_PARAMETERS_M(r,tag_namespace,i,elem) \ BOOST_PP_COMMA_IF(i) \ boost::parameter::BOOST_PP_CAT( \ BOOST_PARAMETER_FUNCTION_PARAMETERS_QUALIFIER_ \ , BOOST_PARAMETER_FN_ARG_QUALIFIER(elem) \ )( \ tag_namespace::BOOST_PARAMETER_FUNCTION_KEYWORD( \ BOOST_PARAMETER_FN_ARG_KEYWORD(elem) \ ) \ ) \ , boost::mpl::always \ > # endif # define BOOST_PARAMETER_FUNCTION_PARAMETERS(tag_namespace, base, args) \ template \ struct BOOST_PP_CAT( \ BOOST_PP_CAT(boost_param_params_, __LINE__) \ , BOOST_PARAMETER_MEMBER_FUNCTION_NAME(base) \ ) : boost::parameter::parameters< \ BOOST_PP_SEQ_FOR_EACH_I( \ BOOST_PARAMETER_FUNCTION_PARAMETERS_M, tag_namespace, args \ ) \ > \ {}; \ \ typedef BOOST_PP_CAT( \ BOOST_PP_CAT(boost_param_params_, __LINE__) \ , BOOST_PARAMETER_MEMBER_FUNCTION_NAME(base) \ ) // Defines result type metafunction # define BOOST_PARAMETER_FUNCTION_RESULT_ARG(z, _, i, x) \ BOOST_PP_COMMA_IF(i) class BOOST_PP_TUPLE_ELEM(3,1,x) /**/ # define BOOST_PARAMETER_FUNCTION_RESULT_(result, name, args) \ template \ struct BOOST_PARAMETER_FUNCTION_RESULT_NAME(name) \ { \ typedef typename BOOST_PARAMETER_PARENTHESIZED_TYPE(result) type; \ }; // Defines implementation function # define BOOST_PARAMETER_FUNCTION_IMPL_HEAD(name) \ template \ typename BOOST_PARAMETER_FUNCTION_RESULT_NAME(name)< \ Args \ >::type BOOST_PARAMETER_IMPL(name)(Args const& args) # define BOOST_PARAMETER_FUNCTION_IMPL_FWD(name) \ BOOST_PARAMETER_FUNCTION_IMPL_HEAD(name); /**/ # define BOOST_PARAMETER_FUNCTION_SPLIT_ARG_required(state, arg) \ ( \ BOOST_PP_INC(BOOST_PP_TUPLE_ELEM(4, 0, state)) \ , BOOST_PP_SEQ_PUSH_BACK(BOOST_PP_TUPLE_ELEM(4, 1, state), arg) \ , BOOST_PP_TUPLE_ELEM(4, 2, state) \ , BOOST_PP_TUPLE_ELEM(4, 3, state) \ ) # define BOOST_PARAMETER_FUNCTION_SPLIT_ARG_deduced_required(state, arg) \ BOOST_PARAMETER_FUNCTION_SPLIT_ARG_required(state, arg) # define BOOST_PARAMETER_FUNCTION_SPLIT_ARG_optional(state, arg) \ ( \ BOOST_PP_TUPLE_ELEM(4, 0, state) \ , BOOST_PP_TUPLE_ELEM(4, 1, state) \ , BOOST_PP_INC(BOOST_PP_TUPLE_ELEM(4, 2, state)) \ , BOOST_PP_SEQ_PUSH_BACK(BOOST_PP_TUPLE_ELEM(4, 3, state), arg) \ ) # define BOOST_PARAMETER_FUNCTION_SPLIT_ARG_deduced_optional(state, arg) \ BOOST_PARAMETER_FUNCTION_SPLIT_ARG_optional(state, arg) # define BOOST_PARAMETER_FUNCTION_SPLIT_ARG(s, state, arg) \ BOOST_PP_CAT( \ BOOST_PARAMETER_FUNCTION_SPLIT_ARG_ \ , BOOST_PARAMETER_FN_ARG_QUALIFIER(arg) \ )(state, arg) // Returns (required_count, required, optional_count, optionals) tuple # define BOOST_PARAMETER_FUNCTION_SPLIT_ARGS(args) \ BOOST_PP_SEQ_FOLD_LEFT( \ BOOST_PARAMETER_FUNCTION_SPLIT_ARG \ , (0,BOOST_PP_SEQ_NIL, 0,BOOST_PP_SEQ_NIL) \ , args \ ) # define BOOST_PARAMETER_FUNCTION_DEFAULT_FUNCTION_ARG_NAME(keyword) \ BOOST_PP_CAT(BOOST_PP_CAT(keyword,_),type) // Helpers used as parameters to BOOST_PARAMETER_FUNCTION_DEFAULT_ARGUMENTS. # define BOOST_PARAMETER_FUNCTION_DEFAULT_FUNCTION_TEMPLATE_ARG(r, _, arg) \ , class BOOST_PARAMETER_FUNCTION_DEFAULT_FUNCTION_ARG_NAME( \ BOOST_PARAMETER_FN_ARG_KEYWORD(arg) \ ) # define BOOST_PARAMETER_FUNCTION_DEFAULT_FUNCTION_ARG(r, _, arg) \ , BOOST_PARAMETER_FUNCTION_DEFAULT_FUNCTION_ARG_NAME( \ BOOST_PARAMETER_FN_ARG_KEYWORD(arg) \ )& BOOST_PARAMETER_FN_ARG_KEYWORD(arg) # define BOOST_PARAMETER_FUNCTION_DEFAULT_FUNCTION_PARAMETER(r, _, arg) \ , BOOST_PARAMETER_FN_ARG_KEYWORD(arg) // Produces a name for the dispatch functions. # define BOOST_PARAMETER_FUNCTION_DEFAULT_NAME(name) \ BOOST_PP_CAT( \ boost_param_default_ \ , BOOST_PP_CAT(__LINE__, BOOST_PARAMETER_MEMBER_FUNCTION_NAME(name)) \ ) // Helper macro used below to produce lists based on the keyword argument // names. macro is applied to every element. n is the number of // optional arguments that should be included. # define BOOST_PARAMETER_FUNCTION_DEFAULT_ARGUMENTS(macro, n, split_args) \ BOOST_PP_SEQ_FOR_EACH( \ macro \ , ~ \ , BOOST_PP_TUPLE_ELEM(4,1,split_args) \ ) \ BOOST_PP_SEQ_FOR_EACH( \ macro \ , ~ \ , BOOST_PP_SEQ_FIRST_N( \ BOOST_PP_SUB(BOOST_PP_TUPLE_ELEM(4,2,split_args), n) \ , BOOST_PP_TUPLE_ELEM(4,3,split_args) \ ) \ ) // Generates a keyword | default expression. # define BOOST_PARAMETER_FUNCTION_DEFAULT_EVAL_DEFAULT(arg, tag_namespace) \ boost::parameter::keyword< \ tag_namespace::BOOST_PARAMETER_FN_ARG_KEYWORD(arg) \ >::instance | boost::parameter::aux::use_default_tag() # define BOOST_PARAMETER_FUNCTION_DEFAULT_FUNCTION_GET_ARG(arg, tag_ns) \ BOOST_PARAMETER_FUNCTION_CAST( \ args[ \ BOOST_PARAMETER_FUNCTION_DEFAULT_EVAL_DEFAULT( \ arg, tag_ns \ ) \ ] \ , BOOST_PARAMETER_FN_ARG_PRED(arg) \ , Args \ ) # define BOOST_PARAMETER_FUNCTION_DEFAULT_FUNCTION_BODY(name, n, split_args, tag_namespace) \ { \ return BOOST_PARAMETER_FUNCTION_DEFAULT_NAME(name)( \ (ResultType(*)())0 \ , args \ , 0L \ BOOST_PARAMETER_FUNCTION_DEFAULT_ARGUMENTS( \ BOOST_PARAMETER_FUNCTION_DEFAULT_FUNCTION_PARAMETER \ , n \ , split_args \ ) \ , BOOST_PARAMETER_FUNCTION_DEFAULT_FUNCTION_GET_ARG( \ BOOST_PP_SEQ_ELEM( \ BOOST_PP_SUB(BOOST_PP_TUPLE_ELEM(4,2,split_args), n) \ , BOOST_PP_TUPLE_ELEM(4,3,split_args) \ ) \ , tag_namespace \ ) \ ); \ } # define BOOST_PARAMETER_FUNCTION_DEFAULT_EVAL_ACTUAL_DEFAULT(arg) \ BOOST_PARAMETER_FUNCTION_CAST( \ boost::parameter::aux::as_lvalue(BOOST_PARAMETER_FN_ARG_DEFAULT(arg), 0L) \ , BOOST_PARAMETER_FN_ARG_PRED(arg) \ , Args \ ) # define BOOST_PARAMETER_FUNCTION_DEFAULT_EVAL_DEFAULT_BODY(name, n, split_args, tag_ns, const_) \ template < \ class ResultType \ , class Args \ BOOST_PARAMETER_FUNCTION_DEFAULT_ARGUMENTS( \ BOOST_PARAMETER_FUNCTION_DEFAULT_FUNCTION_TEMPLATE_ARG \ , BOOST_PP_INC(n) \ , split_args \ ) \ > \ BOOST_PARAMETER_MEMBER_FUNCTION_STATIC(name) \ ResultType BOOST_PARAMETER_FUNCTION_DEFAULT_NAME(name)( \ ResultType(*)() \ , Args const& args \ , long \ BOOST_PARAMETER_FUNCTION_DEFAULT_ARGUMENTS( \ BOOST_PARAMETER_FUNCTION_DEFAULT_FUNCTION_ARG \ , BOOST_PP_INC(n) \ , split_args \ ) \ , boost::parameter::aux::use_default_tag \ ) BOOST_PP_EXPR_IF(const_, const) \ { \ return BOOST_PARAMETER_FUNCTION_DEFAULT_NAME(name)( \ (ResultType(*)())0 \ , args \ , 0L \ BOOST_PARAMETER_FUNCTION_DEFAULT_ARGUMENTS( \ BOOST_PARAMETER_FUNCTION_DEFAULT_FUNCTION_PARAMETER \ , BOOST_PP_INC(n) \ , split_args \ ) \ , BOOST_PARAMETER_FUNCTION_DEFAULT_EVAL_ACTUAL_DEFAULT( \ BOOST_PP_SEQ_ELEM( \ BOOST_PP_SUB(BOOST_PP_TUPLE_ELEM(4,2,split_args), BOOST_PP_INC(n)) \ , BOOST_PP_TUPLE_ELEM(4,3,split_args) \ ) \ ) \ ); \ } // Produces a forwarding layer in the default evaluation machine. // // data is a tuple: // // (name, split_args) // // Where name is the base name of the function, and split_args is a tuple: // // (required_count, required_args, optional_count, required_args) // // defines the actual function body for BOOST_PARAMETER_FUNCTION_DEFAULT_FUNCTION below. # define BOOST_PARAMETER_FUNCTION_DEFAULT_FUNCTION0(z, n, data) \ template < \ class ResultType \ , class Args \ BOOST_PARAMETER_FUNCTION_DEFAULT_ARGUMENTS( \ BOOST_PARAMETER_FUNCTION_DEFAULT_FUNCTION_TEMPLATE_ARG \ , n \ , BOOST_PP_TUPLE_ELEM(5,1,data) \ ) \ > \ BOOST_PARAMETER_MEMBER_FUNCTION_STATIC(BOOST_PP_TUPLE_ELEM(5,0,data)) \ ResultType BOOST_PARAMETER_FUNCTION_DEFAULT_NAME(BOOST_PP_TUPLE_ELEM(5,0,data))( \ ResultType(*)() \ , Args const& args \ , int \ BOOST_PARAMETER_FUNCTION_DEFAULT_ARGUMENTS( \ BOOST_PARAMETER_FUNCTION_DEFAULT_FUNCTION_ARG \ , n \ , BOOST_PP_TUPLE_ELEM(5,1,data) \ ) \ ) BOOST_PP_EXPR_IF(BOOST_PP_TUPLE_ELEM(5,2,data), const) \ BOOST_PP_IF( \ n \ , BOOST_PARAMETER_FUNCTION_DEFAULT_FUNCTION_BODY \ , ; BOOST_PP_TUPLE_EAT(4) \ )( \ BOOST_PP_TUPLE_ELEM(5,0,data) \ , n \ , BOOST_PP_TUPLE_ELEM(5,1,data) \ , BOOST_PP_TUPLE_ELEM(5,3,data) \ ) # define BOOST_PARAMETER_FUNCTION_DEFAULT_FUNCTION(z, n, data) \ BOOST_PP_IF( \ BOOST_PP_AND( \ BOOST_PP_NOT(n) \ , BOOST_PP_TUPLE_ELEM(5,4,data) \ ) \ , BOOST_PP_TUPLE_EAT(3) \ , BOOST_PARAMETER_FUNCTION_DEFAULT_FUNCTION0 \ )(z, n, data) \ BOOST_PP_IF( \ BOOST_PP_EQUAL(n, BOOST_PP_TUPLE_ELEM(4,2,BOOST_PP_TUPLE_ELEM(5,1,data))) \ , BOOST_PP_TUPLE_EAT(5) \ , BOOST_PARAMETER_FUNCTION_DEFAULT_EVAL_DEFAULT_BODY \ )( \ BOOST_PP_TUPLE_ELEM(5,0,data) \ , n \ , BOOST_PP_TUPLE_ELEM(5,1,data) \ , BOOST_PP_TUPLE_ELEM(5,3,data) \ , BOOST_PP_TUPLE_ELEM(5,2,data) \ ) # define BOOST_PARAMETER_FUNCTION_DEFAULT_GET_ARG(r, tag_ns, arg) \ , BOOST_PARAMETER_FUNCTION_CAST( \ args[ \ boost::parameter::keyword::instance \ ] \ , BOOST_PARAMETER_FN_ARG_PRED(arg) \ , Args \ ) // Generates the function template that recives a ArgumentPack, and then // goes on to call the layers of overloads generated by // BOOST_PARAMETER_FUNCTION_DEFAULT_LAYER. # define BOOST_PARAMETER_FUNCTION_INITIAL_DISPATCH_FUNCTION(name, split_args, const_, tag_ns) \ template \ typename BOOST_PARAMETER_FUNCTION_RESULT_NAME(name)::type \ BOOST_PARAMETER_MEMBER_FUNCTION_STATIC(name) \ BOOST_PARAMETER_IMPL(name)(Args const& args) BOOST_PP_EXPR_IF(const_, const) \ { \ return BOOST_PARAMETER_FUNCTION_DEFAULT_NAME(name)( \ (typename BOOST_PARAMETER_FUNCTION_RESULT_NAME(name)::type(*)())0 \ , args \ , 0L \ \ BOOST_PP_SEQ_FOR_EACH( \ BOOST_PARAMETER_FUNCTION_DEFAULT_GET_ARG \ , tag_ns \ , BOOST_PP_TUPLE_ELEM(4,1,split_args) \ ) \ \ ); \ } // Helper for BOOST_PARAMETER_FUNCTION_DEFAULT_LAYER below. # define BOOST_PARAMETER_FUNCTION_DEFAULT_LAYER_AUX( \ name, split_args, skip_fwd_decl, const_, tag_namespace \ ) \ BOOST_PP_REPEAT_FROM_TO( \ 0 \ , BOOST_PP_INC(BOOST_PP_TUPLE_ELEM(4, 2, split_args)) \ , BOOST_PARAMETER_FUNCTION_DEFAULT_FUNCTION \ , (name, split_args, const_, tag_namespace, skip_fwd_decl) \ ) \ \ BOOST_PARAMETER_FUNCTION_INITIAL_DISPATCH_FUNCTION(name, split_args, const_, tag_namespace) \ \ template < \ class ResultType \ , class Args \ BOOST_PARAMETER_FUNCTION_DEFAULT_ARGUMENTS( \ BOOST_PARAMETER_FUNCTION_DEFAULT_FUNCTION_TEMPLATE_ARG \ , 0 \ , split_args \ ) \ > \ BOOST_PARAMETER_MEMBER_FUNCTION_STATIC(name) \ ResultType BOOST_PARAMETER_FUNCTION_DEFAULT_NAME(name)( \ ResultType(*)() \ , Args const& \ , int \ BOOST_PARAMETER_FUNCTION_DEFAULT_ARGUMENTS( \ BOOST_PARAMETER_FUNCTION_DEFAULT_FUNCTION_ARG \ , 0 \ , split_args \ ) \ ) BOOST_PP_EXPR_IF(const_, const) // Generates a bunch of forwarding functions that each extract // one more argument. # define BOOST_PARAMETER_FUNCTION_DEFAULT_LAYER(name, args, skip_fwd_decl, const_, tag_ns) \ BOOST_PARAMETER_FUNCTION_DEFAULT_LAYER_AUX( \ name, BOOST_PARAMETER_FUNCTION_SPLIT_ARGS(args), skip_fwd_decl, const_, tag_ns \ ) /**/ // Defines the result metafunction and the parameters specialization. # define BOOST_PARAMETER_FUNCTION_HEAD(result, name, tag_namespace, args) \ BOOST_PARAMETER_FUNCTION_RESULT_(result, name, args) \ \ BOOST_PARAMETER_FUNCTION_PARAMETERS(tag_namespace, name, args) \ BOOST_PARAMETER_FUNCTION_PARAMETERS_NAME(name); \ // Helper for BOOST_PARAMETER_FUNCTION below. # define BOOST_PARAMETER_FUNCTION_AUX(result, name, tag_namespace, args) \ BOOST_PARAMETER_FUNCTION_HEAD(result, name, tag_namespace, args) \ BOOST_PARAMETER_FUNCTION_IMPL_HEAD(name); \ \ BOOST_PARAMETER_FUNCTION_FWD_FUNCTIONS( \ result, name, args, 0 \ , BOOST_PARAMETER_FUNCTION_FWD_COMBINATIONS(args) \ ) \ \ BOOST_PARAMETER_FUNCTION_DEFAULT_LAYER(name, args, 0, 0, tag_namespace) // Defines a Boost.Parameter enabled function with the new syntax. # define BOOST_PARAMETER_FUNCTION(result, name, tag_namespace, args) \ BOOST_PARAMETER_FUNCTION_AUX( \ result, name, tag_namespace \ , BOOST_PARAMETER_FLATTEN(3, 2, 3, args) \ ) \ /**/ // Defines a Boost.Parameter enabled function. # define BOOST_PARAMETER_BASIC_FUNCTION_AUX(result, name, tag_namespace, args) \ BOOST_PARAMETER_FUNCTION_HEAD(result, name, tag_namespace, args) \ \ BOOST_PARAMETER_FUNCTION_IMPL_FWD(name) \ \ BOOST_PARAMETER_FUNCTION_FWD_FUNCTIONS( \ result, name, args, 0 \ , BOOST_PARAMETER_FUNCTION_FWD_COMBINATIONS(args) \ ) \ \ BOOST_PARAMETER_FUNCTION_IMPL_HEAD(name) # define BOOST_PARAMETER_BASIC_FUNCTION(result, name, tag_namespace, args) \ BOOST_PARAMETER_BASIC_FUNCTION_AUX( \ result, name, tag_namespace \ , BOOST_PARAMETER_FLATTEN(2, 2, 3, args) \ ) \ /**/ // Defines a Boost.Parameter enabled member function. # define BOOST_PARAMETER_BASIC_MEMBER_FUNCTION_AUX(result, name, tag_namespace, args, const_) \ BOOST_PARAMETER_FUNCTION_HEAD(result, name, tag_namespace, args) \ \ BOOST_PARAMETER_FUNCTION_FWD_FUNCTIONS( \ result, name, args, const_ \ , BOOST_PARAMETER_FUNCTION_FWD_COMBINATIONS(args) \ ) \ \ BOOST_PARAMETER_FUNCTION_IMPL_HEAD(name) BOOST_PP_EXPR_IF(const_, const) \ /**/ # define BOOST_PARAMETER_BASIC_MEMBER_FUNCTION(result, name, tag_namespace, args) \ BOOST_PARAMETER_BASIC_MEMBER_FUNCTION_AUX( \ result, name, tag_namespace \ , BOOST_PARAMETER_FLATTEN(2, 2, 3, args) \ , 0 \ ) /**/ # define BOOST_PARAMETER_BASIC_CONST_MEMBER_FUNCTION(result, name, tag_namespace, args) \ BOOST_PARAMETER_BASIC_MEMBER_FUNCTION_AUX( \ result, name, tag_namespace \ , BOOST_PARAMETER_FLATTEN(2, 2, 3, args) \ , 1 \ ) /**/ # define BOOST_PARAMETER_MEMBER_FUNCTION_AUX(result, name, tag_namespace, const_, args) \ BOOST_PARAMETER_FUNCTION_HEAD(result, name, tag_namespace, args) \ \ BOOST_PARAMETER_FUNCTION_FWD_FUNCTIONS( \ result, name, args, const_ \ , BOOST_PARAMETER_FUNCTION_FWD_COMBINATIONS(args) \ ) \ \ BOOST_PARAMETER_FUNCTION_DEFAULT_LAYER(name, args, 1, const_, tag_namespace) // Defines a Boost.Parameter enabled function with the new syntax. # define BOOST_PARAMETER_MEMBER_FUNCTION(result, name, tag_namespace, args) \ BOOST_PARAMETER_MEMBER_FUNCTION_AUX( \ result, name, tag_namespace, 0 \ , BOOST_PARAMETER_FLATTEN(3, 2, 3, args) \ ) \ /**/ # define BOOST_PARAMETER_CONST_MEMBER_FUNCTION(result, name, tag_namespace, args) \ BOOST_PARAMETER_MEMBER_FUNCTION_AUX( \ result, name, tag_namespace, 1 \ , BOOST_PARAMETER_FLATTEN(3, 2, 3, args) \ ) \ /**/ // Defines a Boost.Parameter enabled constructor. # define BOOST_PARAMETER_FUNCTION_ARGUMENT(r, _, i, elem) \ BOOST_PP_COMMA_IF(i) elem& BOOST_PP_CAT(a, i) /**/ # define BOOST_PARAMETER_FUNCTION_FWD_CONSTRUCTOR00(z, n, r, data, elem) \ BOOST_PP_IF( \ n \ , BOOST_PARAMETER_FUNCTION_FWD_FUNCTION_TEMPLATE_Z, BOOST_PP_TUPLE_EAT(2) \ )(z, n) \ BOOST_PP_EXPR_IF(BOOST_PP_EQUAL(n,1), explicit) \ BOOST_PP_TUPLE_ELEM(6,2,data)( \ BOOST_PP_IF( \ n \ , BOOST_PP_SEQ_FOR_EACH_I_R \ , BOOST_PP_TUPLE_EAT(4) \ )( \ r \ , BOOST_PARAMETER_FUNCTION_ARGUMENT \ , ~ \ , elem \ ) \ BOOST_PP_IF(n, BOOST_PARAMETER_FUNCTION_FWD_MATCH_Z, BOOST_PP_TUPLE_EAT(4))( \ z \ , BOOST_PP_TUPLE_ELEM(6,3,data) \ , BOOST_PP_CAT(constructor_parameters, __LINE__) \ , n \ ) \ ) \ : BOOST_PARAMETER_PARENTHESIZED_TYPE(BOOST_PP_TUPLE_ELEM(6,3,data)) ( \ BOOST_PP_CAT(constructor_parameters, __LINE__)()( \ BOOST_PP_ENUM_PARAMS_Z(z, n, a) \ ) \ ) \ {} /**/ # define BOOST_PARAMETER_FUNCTION_FWD_CONSTRUCTOR0(r, data, elem) \ BOOST_PARAMETER_FUNCTION_FWD_CONSTRUCTOR00( \ BOOST_PP_TUPLE_ELEM(6,0,data) \ , BOOST_PP_TUPLE_ELEM(6,1,data) \ , r \ , data \ , elem \ ) /**/ # define BOOST_PARAMETER_FUNCTION_FWD_PRODUCT(r, product) \ (product) /**/ # define BOOST_PARAMETER_FUNCTION_FWD_CONSTRUCTOR_ARITY_0(z, n, data) \ BOOST_PARAMETER_FUNCTION_FWD_CONSTRUCTOR00( \ z, n, BOOST_PP_DEDUCE_R() \ , (z, n, BOOST_PP_TUPLE_REM(4) data) \ , ~ \ ) /**/ # define BOOST_PARAMETER_FUNCTION_FWD_CONSTRUCTOR_ARITY_N(z, n, data) \ BOOST_PP_SEQ_FOR_EACH( \ BOOST_PARAMETER_FUNCTION_FWD_CONSTRUCTOR0 \ , (z, n, BOOST_PP_TUPLE_REM(4) data) \ , BOOST_PP_SEQ_FOR_EACH_PRODUCT( \ BOOST_PARAMETER_FUNCTION_FWD_PRODUCT \ , BOOST_PP_SEQ_FIRST_N( \ n, BOOST_PP_TUPLE_ELEM(4,2,data) \ ) \ ) \ ) /**/ # define BOOST_PARAMETER_FUNCTION_FWD_CONSTRUCTOR(z, n, data) \ BOOST_PP_IF( \ n \ , BOOST_PARAMETER_FUNCTION_FWD_CONSTRUCTOR_ARITY_N \ , BOOST_PARAMETER_FUNCTION_FWD_CONSTRUCTOR_ARITY_0 \ )(z,n,data) \ /**/ # define BOOST_PARAMETER_FUNCTION_FWD_CONSTRUCTORS0(class_,base,args,combinations,range) \ BOOST_PP_REPEAT_FROM_TO( \ BOOST_PP_TUPLE_ELEM(2,0,range), BOOST_PP_TUPLE_ELEM(2,1,range) \ , BOOST_PARAMETER_FUNCTION_FWD_CONSTRUCTOR \ , (class_,base,combinations,BOOST_PP_TUPLE_ELEM(2,1,range)) \ ) /**/ # define BOOST_PARAMETER_FUNCTION_FWD_CONSTRUCTORS(class_,base,args,combinations) \ BOOST_PARAMETER_FUNCTION_FWD_CONSTRUCTORS0( \ class_, base, args, combinations, BOOST_PARAMETER_ARITY_RANGE(args) \ ) /**/ # define BOOST_PARAMETER_CONSTRUCTOR_AUX(class_, base, tag_namespace, args) \ BOOST_PARAMETER_FUNCTION_PARAMETERS(tag_namespace, ctor, args) \ BOOST_PP_CAT(constructor_parameters, __LINE__); \ \ BOOST_PARAMETER_FUNCTION_FWD_CONSTRUCTORS( \ class_, base, args \ , BOOST_PARAMETER_FUNCTION_FWD_COMBINATIONS(args) \ ) \ /**/ # define BOOST_PARAMETER_CONSTRUCTOR(class_, base, tag_namespace, args) \ BOOST_PARAMETER_CONSTRUCTOR_AUX( \ class_, base, tag_namespace \ , BOOST_PARAMETER_FLATTEN(2, 2, 3, args) \ ) /**/ # ifndef BOOST_NO_FUNCTION_TEMPLATE_ORDERING # define BOOST_PARAMETER_FUNCTION_FWD_COMBINATION(r, _, i, elem) \ (BOOST_PP_IF( \ BOOST_PARAMETER_FUNCTION_IS_KEYWORD_QUALIFIER( \ BOOST_PARAMETER_FN_ARG_NAME(elem) \ ) \ , (const ParameterArgumentType ## i)(ParameterArgumentType ## i) \ , (const ParameterArgumentType ## i) \ )) // No partial ordering. This feature doesn't work. # else # define BOOST_PARAMETER_FUNCTION_FWD_COMBINATION(r, _, i, elem) \ (BOOST_PP_IF( \ BOOST_PARAMETER_FUNCTION_IS_KEYWORD_QUALIFIER( \ BOOST_PARAMETER_FN_ARG_NAME(elem) \ ) \ , (ParameterArgumentType ## i) \ , (const ParameterArgumentType ## i) \ )) # endif # define BOOST_PARAMETER_FUNCTION_FWD_COMBINATIONS(args) \ BOOST_PP_SEQ_FOR_EACH_I(BOOST_PARAMETER_FUNCTION_FWD_COMBINATION, ~, args) #endif // BOOST_PARAMETER_PREPROCESSOR_060206_HPP ================================================ FILE: benchmarks/boost/parameter/value_type.hpp ================================================ // Copyright Daniel Wallin 2006. Use, modification and distribution is // subject to the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_PARAMETER_VALUE_TYPE_060921_HPP # define BOOST_PARAMETER_VALUE_TYPE_060921_HPP # include # include # include # include # include # include namespace boost { namespace parameter { // A metafunction that, given an argument pack, returns the type of // the parameter identified by the given keyword. If no such // parameter has been specified, returns Default # if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) template struct value_type0 { typedef typename mpl::apply_wrap3< typename Parameters::binding,Keyword,Default,mpl::false_ >::type type; BOOST_MPL_ASSERT_NOT(( mpl::and_< is_same , is_same > )); }; # endif template struct value_type { # if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) typedef typename mpl::eval_if< mpl::is_placeholder , mpl::identity , value_type0 >::type type; # else typedef typename mpl::apply_wrap3< typename Parameters::binding,Keyword,Default,mpl::false_ >::type type; BOOST_MPL_ASSERT_NOT(( mpl::and_< is_same , is_same > )); # endif BOOST_MPL_AUX_LAMBDA_SUPPORT(3,value_type,(Parameters,Keyword,Default)) }; // A metafunction that, given an argument pack, returns the type of // the parameter identified by the given keyword. If no such // parameter has been specified, returns the type returned by invoking // DefaultFn template struct lazy_value_type { typedef typename mpl::apply_wrap3< typename Parameters::binding , Keyword , typename aux::result_of0::type , mpl::false_ >::type type; }; }} // namespace boost::parameter #endif // BOOST_PARAMETER_VALUE_TYPE_060921_HPP ================================================ FILE: benchmarks/boost/parameter.hpp ================================================ // Copyright David Abrahams, Daniel Wallin 2005. Use, modification and // distribution is subject to the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // See www.boost.org/libs/parameter for documentation. #ifndef BOOST_PARAMETER_050401_HPP #define BOOST_PARAMETER_050401_HPP #include #include #include #include #include #include #include #include #endif // BOOST_PARAMETER_050401_HPP ================================================ FILE: benchmarks/boost/preprocessor/arithmetic/add.hpp ================================================ # /* Copyright (C) 2001 # * Housemarque Oy # * http://www.housemarque.com # * # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # */ # # /* Revised by Paul Mensonides (2002) */ # # /* See http://www.boost.org for most recent version. */ # # ifndef BOOST_PREPROCESSOR_ARITHMETIC_ADD_HPP # define BOOST_PREPROCESSOR_ARITHMETIC_ADD_HPP # # include # include # include # include # include # # /* BOOST_PP_ADD */ # # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() # define BOOST_PP_ADD(x, y) BOOST_PP_TUPLE_ELEM(2, 0, BOOST_PP_WHILE(BOOST_PP_ADD_P, BOOST_PP_ADD_O, (x, y))) # else # define BOOST_PP_ADD(x, y) BOOST_PP_ADD_I(x, y) # define BOOST_PP_ADD_I(x, y) BOOST_PP_TUPLE_ELEM(2, 0, BOOST_PP_WHILE(BOOST_PP_ADD_P, BOOST_PP_ADD_O, (x, y))) # endif # # define BOOST_PP_ADD_P(d, xy) BOOST_PP_TUPLE_ELEM(2, 1, xy) # # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC() # define BOOST_PP_ADD_O(d, xy) BOOST_PP_ADD_O_I xy # else # define BOOST_PP_ADD_O(d, xy) BOOST_PP_ADD_O_I(BOOST_PP_TUPLE_ELEM(2, 0, xy), BOOST_PP_TUPLE_ELEM(2, 1, xy)) # endif # # define BOOST_PP_ADD_O_I(x, y) (BOOST_PP_INC(x), BOOST_PP_DEC(y)) # # /* BOOST_PP_ADD_D */ # # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() # define BOOST_PP_ADD_D(d, x, y) BOOST_PP_TUPLE_ELEM(2, 0, BOOST_PP_WHILE_ ## d(BOOST_PP_ADD_P, BOOST_PP_ADD_O, (x, y))) # else # define BOOST_PP_ADD_D(d, x, y) BOOST_PP_ADD_D_I(d, x, y) # define BOOST_PP_ADD_D_I(d, x, y) BOOST_PP_TUPLE_ELEM(2, 0, BOOST_PP_WHILE_ ## d(BOOST_PP_ADD_P, BOOST_PP_ADD_O, (x, y))) # endif # # endif ================================================ FILE: benchmarks/boost/preprocessor/arithmetic/dec.hpp ================================================ # /* Copyright (C) 2001 # * Housemarque Oy # * http://www.housemarque.com # * # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # */ # # /* Revised by Paul Mensonides (2002) */ # # /* See http://www.boost.org for most recent version. */ # # ifndef BOOST_PREPROCESSOR_ARITHMETIC_DEC_HPP # define BOOST_PREPROCESSOR_ARITHMETIC_DEC_HPP # # include # # /* BOOST_PP_DEC */ # # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC() # define BOOST_PP_DEC(x) BOOST_PP_DEC_I(x) # else # define BOOST_PP_DEC(x) BOOST_PP_DEC_OO((x)) # define BOOST_PP_DEC_OO(par) BOOST_PP_DEC_I ## par # endif # # define BOOST_PP_DEC_I(x) BOOST_PP_DEC_ ## x # # define BOOST_PP_DEC_0 0 # define BOOST_PP_DEC_1 0 # define BOOST_PP_DEC_2 1 # define BOOST_PP_DEC_3 2 # define BOOST_PP_DEC_4 3 # define BOOST_PP_DEC_5 4 # define BOOST_PP_DEC_6 5 # define BOOST_PP_DEC_7 6 # define BOOST_PP_DEC_8 7 # define BOOST_PP_DEC_9 8 # define BOOST_PP_DEC_10 9 # define BOOST_PP_DEC_11 10 # define BOOST_PP_DEC_12 11 # define BOOST_PP_DEC_13 12 # define BOOST_PP_DEC_14 13 # define BOOST_PP_DEC_15 14 # define BOOST_PP_DEC_16 15 # define BOOST_PP_DEC_17 16 # define BOOST_PP_DEC_18 17 # define BOOST_PP_DEC_19 18 # define BOOST_PP_DEC_20 19 # define BOOST_PP_DEC_21 20 # define BOOST_PP_DEC_22 21 # define BOOST_PP_DEC_23 22 # define BOOST_PP_DEC_24 23 # define BOOST_PP_DEC_25 24 # define BOOST_PP_DEC_26 25 # define BOOST_PP_DEC_27 26 # define BOOST_PP_DEC_28 27 # define BOOST_PP_DEC_29 28 # define BOOST_PP_DEC_30 29 # define BOOST_PP_DEC_31 30 # define BOOST_PP_DEC_32 31 # define BOOST_PP_DEC_33 32 # define BOOST_PP_DEC_34 33 # define BOOST_PP_DEC_35 34 # define BOOST_PP_DEC_36 35 # define BOOST_PP_DEC_37 36 # define BOOST_PP_DEC_38 37 # define BOOST_PP_DEC_39 38 # define BOOST_PP_DEC_40 39 # define BOOST_PP_DEC_41 40 # define BOOST_PP_DEC_42 41 # define BOOST_PP_DEC_43 42 # define BOOST_PP_DEC_44 43 # define BOOST_PP_DEC_45 44 # define BOOST_PP_DEC_46 45 # define BOOST_PP_DEC_47 46 # define BOOST_PP_DEC_48 47 # define BOOST_PP_DEC_49 48 # define BOOST_PP_DEC_50 49 # define BOOST_PP_DEC_51 50 # define BOOST_PP_DEC_52 51 # define BOOST_PP_DEC_53 52 # define BOOST_PP_DEC_54 53 # define BOOST_PP_DEC_55 54 # define BOOST_PP_DEC_56 55 # define BOOST_PP_DEC_57 56 # define BOOST_PP_DEC_58 57 # define BOOST_PP_DEC_59 58 # define BOOST_PP_DEC_60 59 # define BOOST_PP_DEC_61 60 # define BOOST_PP_DEC_62 61 # define BOOST_PP_DEC_63 62 # define BOOST_PP_DEC_64 63 # define BOOST_PP_DEC_65 64 # define BOOST_PP_DEC_66 65 # define BOOST_PP_DEC_67 66 # define BOOST_PP_DEC_68 67 # define BOOST_PP_DEC_69 68 # define BOOST_PP_DEC_70 69 # define BOOST_PP_DEC_71 70 # define BOOST_PP_DEC_72 71 # define BOOST_PP_DEC_73 72 # define BOOST_PP_DEC_74 73 # define BOOST_PP_DEC_75 74 # define BOOST_PP_DEC_76 75 # define BOOST_PP_DEC_77 76 # define BOOST_PP_DEC_78 77 # define BOOST_PP_DEC_79 78 # define BOOST_PP_DEC_80 79 # define BOOST_PP_DEC_81 80 # define BOOST_PP_DEC_82 81 # define BOOST_PP_DEC_83 82 # define BOOST_PP_DEC_84 83 # define BOOST_PP_DEC_85 84 # define BOOST_PP_DEC_86 85 # define BOOST_PP_DEC_87 86 # define BOOST_PP_DEC_88 87 # define BOOST_PP_DEC_89 88 # define BOOST_PP_DEC_90 89 # define BOOST_PP_DEC_91 90 # define BOOST_PP_DEC_92 91 # define BOOST_PP_DEC_93 92 # define BOOST_PP_DEC_94 93 # define BOOST_PP_DEC_95 94 # define BOOST_PP_DEC_96 95 # define BOOST_PP_DEC_97 96 # define BOOST_PP_DEC_98 97 # define BOOST_PP_DEC_99 98 # define BOOST_PP_DEC_100 99 # define BOOST_PP_DEC_101 100 # define BOOST_PP_DEC_102 101 # define BOOST_PP_DEC_103 102 # define BOOST_PP_DEC_104 103 # define BOOST_PP_DEC_105 104 # define BOOST_PP_DEC_106 105 # define BOOST_PP_DEC_107 106 # define BOOST_PP_DEC_108 107 # define BOOST_PP_DEC_109 108 # define BOOST_PP_DEC_110 109 # define BOOST_PP_DEC_111 110 # define BOOST_PP_DEC_112 111 # define BOOST_PP_DEC_113 112 # define BOOST_PP_DEC_114 113 # define BOOST_PP_DEC_115 114 # define BOOST_PP_DEC_116 115 # define BOOST_PP_DEC_117 116 # define BOOST_PP_DEC_118 117 # define BOOST_PP_DEC_119 118 # define BOOST_PP_DEC_120 119 # define BOOST_PP_DEC_121 120 # define BOOST_PP_DEC_122 121 # define BOOST_PP_DEC_123 122 # define BOOST_PP_DEC_124 123 # define BOOST_PP_DEC_125 124 # define BOOST_PP_DEC_126 125 # define BOOST_PP_DEC_127 126 # define BOOST_PP_DEC_128 127 # define BOOST_PP_DEC_129 128 # define BOOST_PP_DEC_130 129 # define BOOST_PP_DEC_131 130 # define BOOST_PP_DEC_132 131 # define BOOST_PP_DEC_133 132 # define BOOST_PP_DEC_134 133 # define BOOST_PP_DEC_135 134 # define BOOST_PP_DEC_136 135 # define BOOST_PP_DEC_137 136 # define BOOST_PP_DEC_138 137 # define BOOST_PP_DEC_139 138 # define BOOST_PP_DEC_140 139 # define BOOST_PP_DEC_141 140 # define BOOST_PP_DEC_142 141 # define BOOST_PP_DEC_143 142 # define BOOST_PP_DEC_144 143 # define BOOST_PP_DEC_145 144 # define BOOST_PP_DEC_146 145 # define BOOST_PP_DEC_147 146 # define BOOST_PP_DEC_148 147 # define BOOST_PP_DEC_149 148 # define BOOST_PP_DEC_150 149 # define BOOST_PP_DEC_151 150 # define BOOST_PP_DEC_152 151 # define BOOST_PP_DEC_153 152 # define BOOST_PP_DEC_154 153 # define BOOST_PP_DEC_155 154 # define BOOST_PP_DEC_156 155 # define BOOST_PP_DEC_157 156 # define BOOST_PP_DEC_158 157 # define BOOST_PP_DEC_159 158 # define BOOST_PP_DEC_160 159 # define BOOST_PP_DEC_161 160 # define BOOST_PP_DEC_162 161 # define BOOST_PP_DEC_163 162 # define BOOST_PP_DEC_164 163 # define BOOST_PP_DEC_165 164 # define BOOST_PP_DEC_166 165 # define BOOST_PP_DEC_167 166 # define BOOST_PP_DEC_168 167 # define BOOST_PP_DEC_169 168 # define BOOST_PP_DEC_170 169 # define BOOST_PP_DEC_171 170 # define BOOST_PP_DEC_172 171 # define BOOST_PP_DEC_173 172 # define BOOST_PP_DEC_174 173 # define BOOST_PP_DEC_175 174 # define BOOST_PP_DEC_176 175 # define BOOST_PP_DEC_177 176 # define BOOST_PP_DEC_178 177 # define BOOST_PP_DEC_179 178 # define BOOST_PP_DEC_180 179 # define BOOST_PP_DEC_181 180 # define BOOST_PP_DEC_182 181 # define BOOST_PP_DEC_183 182 # define BOOST_PP_DEC_184 183 # define BOOST_PP_DEC_185 184 # define BOOST_PP_DEC_186 185 # define BOOST_PP_DEC_187 186 # define BOOST_PP_DEC_188 187 # define BOOST_PP_DEC_189 188 # define BOOST_PP_DEC_190 189 # define BOOST_PP_DEC_191 190 # define BOOST_PP_DEC_192 191 # define BOOST_PP_DEC_193 192 # define BOOST_PP_DEC_194 193 # define BOOST_PP_DEC_195 194 # define BOOST_PP_DEC_196 195 # define BOOST_PP_DEC_197 196 # define BOOST_PP_DEC_198 197 # define BOOST_PP_DEC_199 198 # define BOOST_PP_DEC_200 199 # define BOOST_PP_DEC_201 200 # define BOOST_PP_DEC_202 201 # define BOOST_PP_DEC_203 202 # define BOOST_PP_DEC_204 203 # define BOOST_PP_DEC_205 204 # define BOOST_PP_DEC_206 205 # define BOOST_PP_DEC_207 206 # define BOOST_PP_DEC_208 207 # define BOOST_PP_DEC_209 208 # define BOOST_PP_DEC_210 209 # define BOOST_PP_DEC_211 210 # define BOOST_PP_DEC_212 211 # define BOOST_PP_DEC_213 212 # define BOOST_PP_DEC_214 213 # define BOOST_PP_DEC_215 214 # define BOOST_PP_DEC_216 215 # define BOOST_PP_DEC_217 216 # define BOOST_PP_DEC_218 217 # define BOOST_PP_DEC_219 218 # define BOOST_PP_DEC_220 219 # define BOOST_PP_DEC_221 220 # define BOOST_PP_DEC_222 221 # define BOOST_PP_DEC_223 222 # define BOOST_PP_DEC_224 223 # define BOOST_PP_DEC_225 224 # define BOOST_PP_DEC_226 225 # define BOOST_PP_DEC_227 226 # define BOOST_PP_DEC_228 227 # define BOOST_PP_DEC_229 228 # define BOOST_PP_DEC_230 229 # define BOOST_PP_DEC_231 230 # define BOOST_PP_DEC_232 231 # define BOOST_PP_DEC_233 232 # define BOOST_PP_DEC_234 233 # define BOOST_PP_DEC_235 234 # define BOOST_PP_DEC_236 235 # define BOOST_PP_DEC_237 236 # define BOOST_PP_DEC_238 237 # define BOOST_PP_DEC_239 238 # define BOOST_PP_DEC_240 239 # define BOOST_PP_DEC_241 240 # define BOOST_PP_DEC_242 241 # define BOOST_PP_DEC_243 242 # define BOOST_PP_DEC_244 243 # define BOOST_PP_DEC_245 244 # define BOOST_PP_DEC_246 245 # define BOOST_PP_DEC_247 246 # define BOOST_PP_DEC_248 247 # define BOOST_PP_DEC_249 248 # define BOOST_PP_DEC_250 249 # define BOOST_PP_DEC_251 250 # define BOOST_PP_DEC_252 251 # define BOOST_PP_DEC_253 252 # define BOOST_PP_DEC_254 253 # define BOOST_PP_DEC_255 254 # define BOOST_PP_DEC_256 255 # define BOOST_PP_DEC_257 256 # # endif ================================================ FILE: benchmarks/boost/preprocessor/arithmetic/inc.hpp ================================================ # /* Copyright (C) 2001 # * Housemarque Oy # * http://www.housemarque.com # * # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # */ # # /* Revised by Paul Mensonides (2002) */ # # /* See http://www.boost.org for most recent version. */ # # ifndef BOOST_PREPROCESSOR_ARITHMETIC_INC_HPP # define BOOST_PREPROCESSOR_ARITHMETIC_INC_HPP # # include # # /* BOOST_PP_INC */ # # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC() # define BOOST_PP_INC(x) BOOST_PP_INC_I(x) # else # define BOOST_PP_INC(x) BOOST_PP_INC_OO((x)) # define BOOST_PP_INC_OO(par) BOOST_PP_INC_I ## par # endif # # define BOOST_PP_INC_I(x) BOOST_PP_INC_ ## x # # define BOOST_PP_INC_0 1 # define BOOST_PP_INC_1 2 # define BOOST_PP_INC_2 3 # define BOOST_PP_INC_3 4 # define BOOST_PP_INC_4 5 # define BOOST_PP_INC_5 6 # define BOOST_PP_INC_6 7 # define BOOST_PP_INC_7 8 # define BOOST_PP_INC_8 9 # define BOOST_PP_INC_9 10 # define BOOST_PP_INC_10 11 # define BOOST_PP_INC_11 12 # define BOOST_PP_INC_12 13 # define BOOST_PP_INC_13 14 # define BOOST_PP_INC_14 15 # define BOOST_PP_INC_15 16 # define BOOST_PP_INC_16 17 # define BOOST_PP_INC_17 18 # define BOOST_PP_INC_18 19 # define BOOST_PP_INC_19 20 # define BOOST_PP_INC_20 21 # define BOOST_PP_INC_21 22 # define BOOST_PP_INC_22 23 # define BOOST_PP_INC_23 24 # define BOOST_PP_INC_24 25 # define BOOST_PP_INC_25 26 # define BOOST_PP_INC_26 27 # define BOOST_PP_INC_27 28 # define BOOST_PP_INC_28 29 # define BOOST_PP_INC_29 30 # define BOOST_PP_INC_30 31 # define BOOST_PP_INC_31 32 # define BOOST_PP_INC_32 33 # define BOOST_PP_INC_33 34 # define BOOST_PP_INC_34 35 # define BOOST_PP_INC_35 36 # define BOOST_PP_INC_36 37 # define BOOST_PP_INC_37 38 # define BOOST_PP_INC_38 39 # define BOOST_PP_INC_39 40 # define BOOST_PP_INC_40 41 # define BOOST_PP_INC_41 42 # define BOOST_PP_INC_42 43 # define BOOST_PP_INC_43 44 # define BOOST_PP_INC_44 45 # define BOOST_PP_INC_45 46 # define BOOST_PP_INC_46 47 # define BOOST_PP_INC_47 48 # define BOOST_PP_INC_48 49 # define BOOST_PP_INC_49 50 # define BOOST_PP_INC_50 51 # define BOOST_PP_INC_51 52 # define BOOST_PP_INC_52 53 # define BOOST_PP_INC_53 54 # define BOOST_PP_INC_54 55 # define BOOST_PP_INC_55 56 # define BOOST_PP_INC_56 57 # define BOOST_PP_INC_57 58 # define BOOST_PP_INC_58 59 # define BOOST_PP_INC_59 60 # define BOOST_PP_INC_60 61 # define BOOST_PP_INC_61 62 # define BOOST_PP_INC_62 63 # define BOOST_PP_INC_63 64 # define BOOST_PP_INC_64 65 # define BOOST_PP_INC_65 66 # define BOOST_PP_INC_66 67 # define BOOST_PP_INC_67 68 # define BOOST_PP_INC_68 69 # define BOOST_PP_INC_69 70 # define BOOST_PP_INC_70 71 # define BOOST_PP_INC_71 72 # define BOOST_PP_INC_72 73 # define BOOST_PP_INC_73 74 # define BOOST_PP_INC_74 75 # define BOOST_PP_INC_75 76 # define BOOST_PP_INC_76 77 # define BOOST_PP_INC_77 78 # define BOOST_PP_INC_78 79 # define BOOST_PP_INC_79 80 # define BOOST_PP_INC_80 81 # define BOOST_PP_INC_81 82 # define BOOST_PP_INC_82 83 # define BOOST_PP_INC_83 84 # define BOOST_PP_INC_84 85 # define BOOST_PP_INC_85 86 # define BOOST_PP_INC_86 87 # define BOOST_PP_INC_87 88 # define BOOST_PP_INC_88 89 # define BOOST_PP_INC_89 90 # define BOOST_PP_INC_90 91 # define BOOST_PP_INC_91 92 # define BOOST_PP_INC_92 93 # define BOOST_PP_INC_93 94 # define BOOST_PP_INC_94 95 # define BOOST_PP_INC_95 96 # define BOOST_PP_INC_96 97 # define BOOST_PP_INC_97 98 # define BOOST_PP_INC_98 99 # define BOOST_PP_INC_99 100 # define BOOST_PP_INC_100 101 # define BOOST_PP_INC_101 102 # define BOOST_PP_INC_102 103 # define BOOST_PP_INC_103 104 # define BOOST_PP_INC_104 105 # define BOOST_PP_INC_105 106 # define BOOST_PP_INC_106 107 # define BOOST_PP_INC_107 108 # define BOOST_PP_INC_108 109 # define BOOST_PP_INC_109 110 # define BOOST_PP_INC_110 111 # define BOOST_PP_INC_111 112 # define BOOST_PP_INC_112 113 # define BOOST_PP_INC_113 114 # define BOOST_PP_INC_114 115 # define BOOST_PP_INC_115 116 # define BOOST_PP_INC_116 117 # define BOOST_PP_INC_117 118 # define BOOST_PP_INC_118 119 # define BOOST_PP_INC_119 120 # define BOOST_PP_INC_120 121 # define BOOST_PP_INC_121 122 # define BOOST_PP_INC_122 123 # define BOOST_PP_INC_123 124 # define BOOST_PP_INC_124 125 # define BOOST_PP_INC_125 126 # define BOOST_PP_INC_126 127 # define BOOST_PP_INC_127 128 # define BOOST_PP_INC_128 129 # define BOOST_PP_INC_129 130 # define BOOST_PP_INC_130 131 # define BOOST_PP_INC_131 132 # define BOOST_PP_INC_132 133 # define BOOST_PP_INC_133 134 # define BOOST_PP_INC_134 135 # define BOOST_PP_INC_135 136 # define BOOST_PP_INC_136 137 # define BOOST_PP_INC_137 138 # define BOOST_PP_INC_138 139 # define BOOST_PP_INC_139 140 # define BOOST_PP_INC_140 141 # define BOOST_PP_INC_141 142 # define BOOST_PP_INC_142 143 # define BOOST_PP_INC_143 144 # define BOOST_PP_INC_144 145 # define BOOST_PP_INC_145 146 # define BOOST_PP_INC_146 147 # define BOOST_PP_INC_147 148 # define BOOST_PP_INC_148 149 # define BOOST_PP_INC_149 150 # define BOOST_PP_INC_150 151 # define BOOST_PP_INC_151 152 # define BOOST_PP_INC_152 153 # define BOOST_PP_INC_153 154 # define BOOST_PP_INC_154 155 # define BOOST_PP_INC_155 156 # define BOOST_PP_INC_156 157 # define BOOST_PP_INC_157 158 # define BOOST_PP_INC_158 159 # define BOOST_PP_INC_159 160 # define BOOST_PP_INC_160 161 # define BOOST_PP_INC_161 162 # define BOOST_PP_INC_162 163 # define BOOST_PP_INC_163 164 # define BOOST_PP_INC_164 165 # define BOOST_PP_INC_165 166 # define BOOST_PP_INC_166 167 # define BOOST_PP_INC_167 168 # define BOOST_PP_INC_168 169 # define BOOST_PP_INC_169 170 # define BOOST_PP_INC_170 171 # define BOOST_PP_INC_171 172 # define BOOST_PP_INC_172 173 # define BOOST_PP_INC_173 174 # define BOOST_PP_INC_174 175 # define BOOST_PP_INC_175 176 # define BOOST_PP_INC_176 177 # define BOOST_PP_INC_177 178 # define BOOST_PP_INC_178 179 # define BOOST_PP_INC_179 180 # define BOOST_PP_INC_180 181 # define BOOST_PP_INC_181 182 # define BOOST_PP_INC_182 183 # define BOOST_PP_INC_183 184 # define BOOST_PP_INC_184 185 # define BOOST_PP_INC_185 186 # define BOOST_PP_INC_186 187 # define BOOST_PP_INC_187 188 # define BOOST_PP_INC_188 189 # define BOOST_PP_INC_189 190 # define BOOST_PP_INC_190 191 # define BOOST_PP_INC_191 192 # define BOOST_PP_INC_192 193 # define BOOST_PP_INC_193 194 # define BOOST_PP_INC_194 195 # define BOOST_PP_INC_195 196 # define BOOST_PP_INC_196 197 # define BOOST_PP_INC_197 198 # define BOOST_PP_INC_198 199 # define BOOST_PP_INC_199 200 # define BOOST_PP_INC_200 201 # define BOOST_PP_INC_201 202 # define BOOST_PP_INC_202 203 # define BOOST_PP_INC_203 204 # define BOOST_PP_INC_204 205 # define BOOST_PP_INC_205 206 # define BOOST_PP_INC_206 207 # define BOOST_PP_INC_207 208 # define BOOST_PP_INC_208 209 # define BOOST_PP_INC_209 210 # define BOOST_PP_INC_210 211 # define BOOST_PP_INC_211 212 # define BOOST_PP_INC_212 213 # define BOOST_PP_INC_213 214 # define BOOST_PP_INC_214 215 # define BOOST_PP_INC_215 216 # define BOOST_PP_INC_216 217 # define BOOST_PP_INC_217 218 # define BOOST_PP_INC_218 219 # define BOOST_PP_INC_219 220 # define BOOST_PP_INC_220 221 # define BOOST_PP_INC_221 222 # define BOOST_PP_INC_222 223 # define BOOST_PP_INC_223 224 # define BOOST_PP_INC_224 225 # define BOOST_PP_INC_225 226 # define BOOST_PP_INC_226 227 # define BOOST_PP_INC_227 228 # define BOOST_PP_INC_228 229 # define BOOST_PP_INC_229 230 # define BOOST_PP_INC_230 231 # define BOOST_PP_INC_231 232 # define BOOST_PP_INC_232 233 # define BOOST_PP_INC_233 234 # define BOOST_PP_INC_234 235 # define BOOST_PP_INC_235 236 # define BOOST_PP_INC_236 237 # define BOOST_PP_INC_237 238 # define BOOST_PP_INC_238 239 # define BOOST_PP_INC_239 240 # define BOOST_PP_INC_240 241 # define BOOST_PP_INC_241 242 # define BOOST_PP_INC_242 243 # define BOOST_PP_INC_243 244 # define BOOST_PP_INC_244 245 # define BOOST_PP_INC_245 246 # define BOOST_PP_INC_246 247 # define BOOST_PP_INC_247 248 # define BOOST_PP_INC_248 249 # define BOOST_PP_INC_249 250 # define BOOST_PP_INC_250 251 # define BOOST_PP_INC_251 252 # define BOOST_PP_INC_252 253 # define BOOST_PP_INC_253 254 # define BOOST_PP_INC_254 255 # define BOOST_PP_INC_255 256 # define BOOST_PP_INC_256 256 # # endif ================================================ FILE: benchmarks/boost/preprocessor/arithmetic/sub.hpp ================================================ # /* Copyright (C) 2001 # * Housemarque Oy # * http://www.housemarque.com # * # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # */ # # /* Revised by Paul Mensonides (2002) */ # # /* See http://www.boost.org for most recent version. */ # # ifndef BOOST_PREPROCESSOR_ARITHMETIC_SUB_HPP # define BOOST_PREPROCESSOR_ARITHMETIC_SUB_HPP # # include # include # include # include # # /* BOOST_PP_SUB */ # # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() # define BOOST_PP_SUB(x, y) BOOST_PP_TUPLE_ELEM(2, 0, BOOST_PP_WHILE(BOOST_PP_SUB_P, BOOST_PP_SUB_O, (x, y))) # else # define BOOST_PP_SUB(x, y) BOOST_PP_SUB_I(x, y) # define BOOST_PP_SUB_I(x, y) BOOST_PP_TUPLE_ELEM(2, 0, BOOST_PP_WHILE(BOOST_PP_SUB_P, BOOST_PP_SUB_O, (x, y))) # endif # # define BOOST_PP_SUB_P(d, xy) BOOST_PP_TUPLE_ELEM(2, 1, xy) # # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC() # define BOOST_PP_SUB_O(d, xy) BOOST_PP_SUB_O_I xy # else # define BOOST_PP_SUB_O(d, xy) BOOST_PP_SUB_O_I(BOOST_PP_TUPLE_ELEM(2, 0, xy), BOOST_PP_TUPLE_ELEM(2, 1, xy)) # endif # # define BOOST_PP_SUB_O_I(x, y) (BOOST_PP_DEC(x), BOOST_PP_DEC(y)) # # /* BOOST_PP_SUB_D */ # # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() # define BOOST_PP_SUB_D(d, x, y) BOOST_PP_TUPLE_ELEM(2, 0, BOOST_PP_WHILE_ ## d(BOOST_PP_SUB_P, BOOST_PP_SUB_O, (x, y))) # else # define BOOST_PP_SUB_D(d, x, y) BOOST_PP_SUB_D_I(d, x, y) # define BOOST_PP_SUB_D_I(d, x, y) BOOST_PP_TUPLE_ELEM(2, 0, BOOST_PP_WHILE_ ## d(BOOST_PP_SUB_P, BOOST_PP_SUB_O, (x, y))) # endif # # endif ================================================ FILE: benchmarks/boost/preprocessor/array/data.hpp ================================================ # /* ************************************************************************** # * * # * (C) Copyright Paul Mensonides 2002. # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # * * # ************************************************************************** */ # # /* See http://www.boost.org for most recent version. */ # # ifndef BOOST_PREPROCESSOR_ARRAY_DATA_HPP # define BOOST_PREPROCESSOR_ARRAY_DATA_HPP # # include # include # # /* BOOST_PP_ARRAY_DATA */ # # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() # define BOOST_PP_ARRAY_DATA(array) BOOST_PP_TUPLE_ELEM(2, 1, array) # else # define BOOST_PP_ARRAY_DATA(array) BOOST_PP_ARRAY_DATA_I(array) # define BOOST_PP_ARRAY_DATA_I(array) BOOST_PP_ARRAY_DATA_II array # define BOOST_PP_ARRAY_DATA_II(size, data) data # endif # # endif ================================================ FILE: benchmarks/boost/preprocessor/array/elem.hpp ================================================ # /* ************************************************************************** # * * # * (C) Copyright Paul Mensonides 2002. # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # * * # ************************************************************************** */ # # /* See http://www.boost.org for most recent version. */ # # ifndef BOOST_PREPROCESSOR_ARRAY_ELEM_HPP # define BOOST_PREPROCESSOR_ARRAY_ELEM_HPP # # include # include # include # include # # /* BOOST_PP_ARRAY_ELEM */ # # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() # define BOOST_PP_ARRAY_ELEM(i, array) BOOST_PP_TUPLE_ELEM(BOOST_PP_ARRAY_SIZE(array), i, BOOST_PP_ARRAY_DATA(array)) # else # define BOOST_PP_ARRAY_ELEM(i, array) BOOST_PP_ARRAY_ELEM_I(i, array) # define BOOST_PP_ARRAY_ELEM_I(i, array) BOOST_PP_TUPLE_ELEM(BOOST_PP_ARRAY_SIZE(array), i, BOOST_PP_ARRAY_DATA(array)) # endif # # endif ================================================ FILE: benchmarks/boost/preprocessor/array/size.hpp ================================================ # /* ************************************************************************** # * * # * (C) Copyright Paul Mensonides 2002. # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # * * # ************************************************************************** */ # # /* See http://www.boost.org for most recent version. */ # # ifndef BOOST_PREPROCESSOR_ARRAY_SIZE_HPP # define BOOST_PREPROCESSOR_ARRAY_SIZE_HPP # # include # include # # /* BOOST_PP_ARRAY_SIZE */ # # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() # define BOOST_PP_ARRAY_SIZE(array) BOOST_PP_TUPLE_ELEM(2, 0, array) # else # define BOOST_PP_ARRAY_SIZE(array) BOOST_PP_ARRAY_SIZE_I(array) # define BOOST_PP_ARRAY_SIZE_I(array) BOOST_PP_ARRAY_SIZE_II array # define BOOST_PP_ARRAY_SIZE_II(size, data) size # endif # # endif ================================================ FILE: benchmarks/boost/preprocessor/cat.hpp ================================================ # /* Copyright (C) 2001 # * Housemarque Oy # * http://www.housemarque.com # * # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # */ # # /* Revised by Paul Mensonides (2002) */ # # /* See http://www.boost.org for most recent version. */ # # ifndef BOOST_PREPROCESSOR_CAT_HPP # define BOOST_PREPROCESSOR_CAT_HPP # # include # # /* BOOST_PP_CAT */ # # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC() # define BOOST_PP_CAT(a, b) BOOST_PP_CAT_I(a, b) # else # define BOOST_PP_CAT(a, b) BOOST_PP_CAT_OO((a, b)) # define BOOST_PP_CAT_OO(par) BOOST_PP_CAT_I ## par # endif # # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MSVC() # define BOOST_PP_CAT_I(a, b) a ## b # else # define BOOST_PP_CAT_I(a, b) BOOST_PP_CAT_II(~, a ## b) # define BOOST_PP_CAT_II(p, res) res # endif # # endif ================================================ FILE: benchmarks/boost/preprocessor/comma_if.hpp ================================================ # /* ************************************************************************** # * * # * (C) Copyright Paul Mensonides 2002. # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # * * # ************************************************************************** */ # # /* See http://www.boost.org for most recent version. */ # # ifndef BOOST_PREPROCESSOR_COMMA_IF_HPP # define BOOST_PREPROCESSOR_COMMA_IF_HPP # # include # # endif ================================================ FILE: benchmarks/boost/preprocessor/comparison/equal.hpp ================================================ # /* Copyright (C) 2001 # * Housemarque Oy # * http://www.housemarque.com # * # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # */ # # /* Revised by Paul Mensonides (2002) */ # # /* See http://www.boost.org for most recent version. */ # # ifndef BOOST_PREPROCESSOR_COMPARISON_EQUAL_HPP # define BOOST_PREPROCESSOR_COMPARISON_EQUAL_HPP # # include # include # include # # /* BOOST_PP_EQUAL */ # # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() # define BOOST_PP_EQUAL(x, y) BOOST_PP_COMPL(BOOST_PP_NOT_EQUAL(x, y)) # else # define BOOST_PP_EQUAL(x, y) BOOST_PP_EQUAL_I(x, y) # define BOOST_PP_EQUAL_I(x, y) BOOST_PP_COMPL(BOOST_PP_NOT_EQUAL(x, y)) # endif # # /* BOOST_PP_EQUAL_D */ # # define BOOST_PP_EQUAL_D(d, x, y) BOOST_PP_EQUAL(x, y) # # endif ================================================ FILE: benchmarks/boost/preprocessor/comparison/less_equal.hpp ================================================ # /* Copyright (C) 2001 # * Housemarque Oy # * http://www.housemarque.com # * # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # */ # # /* Revised by Paul Mensonides (2002) */ # # /* See http://www.boost.org for most recent version. */ # # ifndef BOOST_PREPROCESSOR_COMPARISON_LESS_EQUAL_HPP # define BOOST_PREPROCESSOR_COMPARISON_LESS_EQUAL_HPP # # include # include # include # # /* BOOST_PP_LESS_EQUAL */ # # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() # define BOOST_PP_LESS_EQUAL(x, y) BOOST_PP_NOT(BOOST_PP_SUB(x, y)) # else # define BOOST_PP_LESS_EQUAL(x, y) BOOST_PP_LESS_EQUAL_I(x, y) # define BOOST_PP_LESS_EQUAL_I(x, y) BOOST_PP_NOT(BOOST_PP_SUB(x, y)) # endif # # /* BOOST_PP_LESS_EQUAL_D */ # # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() # define BOOST_PP_LESS_EQUAL_D(d, x, y) BOOST_PP_NOT(BOOST_PP_SUB_D(d, x, y)) # else # define BOOST_PP_LESS_EQUAL_D(d, x, y) BOOST_PP_LESS_EQUAL_D_I(d, x, y) # define BOOST_PP_LESS_EQUAL_D_I(d, x, y) BOOST_PP_NOT(BOOST_PP_SUB_D(d, x, y)) # endif # # endif ================================================ FILE: benchmarks/boost/preprocessor/comparison/not_equal.hpp ================================================ # /* Copyright (C) 2001 # * Housemarque Oy # * http://www.housemarque.com # * # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # */ # # /* Revised by Paul Mensonides (2002) */ # # /* See http://www.boost.org for most recent version. */ # # ifndef BOOST_PREPROCESSOR_COMPARISON_NOT_EQUAL_HPP # define BOOST_PREPROCESSOR_COMPARISON_NOT_EQUAL_HPP # # include # include # include # # /* BOOST_PP_NOT_EQUAL */ # # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC() # define BOOST_PP_NOT_EQUAL(x, y) BOOST_PP_NOT_EQUAL_I(x, y) # else # define BOOST_PP_NOT_EQUAL(x, y) BOOST_PP_NOT_EQUAL_OO((x, y)) # define BOOST_PP_NOT_EQUAL_OO(par) BOOST_PP_NOT_EQUAL_I ## par # endif # # define BOOST_PP_NOT_EQUAL_I(x, y) BOOST_PP_CAT(BOOST_PP_NOT_EQUAL_CHECK_, BOOST_PP_NOT_EQUAL_ ## x(0, BOOST_PP_NOT_EQUAL_ ## y)) # # /* BOOST_PP_NOT_EQUAL_D */ # # define BOOST_PP_NOT_EQUAL_D(d, x, y) BOOST_PP_NOT_EQUAL(x, y) # # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NIL 1 # # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_0(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_1(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_2(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_3(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_4(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_5(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_6(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_7(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_8(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_9(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_10(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_11(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_12(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_13(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_14(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_15(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_16(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_17(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_18(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_19(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_20(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_21(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_22(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_23(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_24(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_25(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_26(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_27(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_28(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_29(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_30(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_31(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_32(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_33(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_34(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_35(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_36(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_37(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_38(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_39(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_40(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_41(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_42(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_43(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_44(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_45(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_46(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_47(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_48(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_49(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_50(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_51(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_52(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_53(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_54(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_55(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_56(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_57(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_58(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_59(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_60(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_61(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_62(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_63(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_64(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_65(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_66(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_67(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_68(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_69(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_70(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_71(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_72(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_73(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_74(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_75(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_76(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_77(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_78(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_79(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_80(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_81(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_82(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_83(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_84(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_85(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_86(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_87(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_88(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_89(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_90(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_91(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_92(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_93(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_94(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_95(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_96(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_97(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_98(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_99(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_100(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_101(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_102(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_103(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_104(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_105(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_106(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_107(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_108(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_109(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_110(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_111(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_112(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_113(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_114(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_115(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_116(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_117(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_118(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_119(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_120(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_121(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_122(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_123(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_124(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_125(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_126(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_127(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_128(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_129(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_130(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_131(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_132(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_133(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_134(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_135(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_136(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_137(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_138(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_139(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_140(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_141(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_142(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_143(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_144(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_145(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_146(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_147(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_148(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_149(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_150(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_151(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_152(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_153(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_154(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_155(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_156(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_157(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_158(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_159(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_160(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_161(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_162(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_163(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_164(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_165(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_166(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_167(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_168(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_169(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_170(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_171(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_172(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_173(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_174(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_175(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_176(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_177(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_178(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_179(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_180(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_181(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_182(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_183(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_184(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_185(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_186(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_187(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_188(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_189(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_190(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_191(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_192(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_193(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_194(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_195(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_196(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_197(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_198(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_199(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_200(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_201(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_202(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_203(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_204(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_205(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_206(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_207(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_208(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_209(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_210(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_211(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_212(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_213(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_214(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_215(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_216(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_217(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_218(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_219(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_220(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_221(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_222(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_223(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_224(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_225(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_226(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_227(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_228(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_229(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_230(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_231(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_232(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_233(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_234(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_235(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_236(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_237(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_238(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_239(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_240(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_241(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_242(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_243(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_244(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_245(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_246(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_247(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_248(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_249(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_250(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_251(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_252(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_253(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_254(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_255(c, y) 0 # define BOOST_PP_NOT_EQUAL_CHECK_BOOST_PP_NOT_EQUAL_256(c, y) 0 # #if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_DMC() # define BOOST_PP_NOT_EQUAL_0(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_1(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_2(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_3(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_4(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_5(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_6(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_7(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_8(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_9(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_10(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_11(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_12(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_13(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_14(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_15(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_16(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_17(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_18(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_19(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_20(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_21(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_22(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_23(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_24(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_25(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_26(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_27(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_28(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_29(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_30(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_31(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_32(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_33(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_34(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_35(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_36(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_37(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_38(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_39(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_40(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_41(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_42(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_43(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_44(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_45(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_46(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_47(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_48(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_49(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_50(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_51(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_52(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_53(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_54(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_55(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_56(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_57(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_58(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_59(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_60(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_61(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_62(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_63(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_64(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_65(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_66(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_67(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_68(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_69(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_70(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_71(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_72(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_73(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_74(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_75(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_76(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_77(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_78(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_79(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_80(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_81(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_82(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_83(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_84(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_85(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_86(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_87(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_88(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_89(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_90(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_91(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_92(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_93(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_94(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_95(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_96(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_97(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_98(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_99(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_100(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_101(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_102(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_103(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_104(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_105(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_106(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_107(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_108(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_109(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_110(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_111(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_112(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_113(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_114(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_115(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_116(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_117(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_118(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_119(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_120(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_121(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_122(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_123(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_124(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_125(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_126(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_127(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_128(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_129(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_130(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_131(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_132(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_133(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_134(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_135(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_136(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_137(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_138(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_139(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_140(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_141(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_142(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_143(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_144(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_145(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_146(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_147(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_148(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_149(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_150(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_151(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_152(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_153(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_154(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_155(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_156(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_157(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_158(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_159(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_160(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_161(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_162(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_163(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_164(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_165(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_166(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_167(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_168(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_169(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_170(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_171(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_172(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_173(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_174(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_175(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_176(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_177(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_178(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_179(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_180(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_181(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_182(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_183(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_184(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_185(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_186(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_187(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_188(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_189(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_190(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_191(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_192(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_193(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_194(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_195(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_196(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_197(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_198(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_199(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_200(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_201(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_202(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_203(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_204(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_205(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_206(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_207(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_208(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_209(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_210(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_211(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_212(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_213(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_214(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_215(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_216(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_217(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_218(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_219(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_220(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_221(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_222(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_223(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_224(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_225(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_226(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_227(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_228(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_229(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_230(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_231(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_232(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_233(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_234(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_235(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_236(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_237(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_238(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_239(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_240(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_241(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_242(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_243(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_244(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_245(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_246(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_247(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_248(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_249(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_250(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_251(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_252(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_253(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_254(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_255(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_256(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y(1, BOOST_PP_NIL)) # else # define BOOST_PP_NOT_EQUAL_0(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_1(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_2(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_3(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_4(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_5(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_6(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_7(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_8(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_9(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_10(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_11(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_12(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_13(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_14(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_15(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_16(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_17(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_18(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_19(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_20(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_21(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_22(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_23(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_24(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_25(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_26(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_27(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_28(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_29(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_30(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_31(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_32(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_33(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_34(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_35(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_36(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_37(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_38(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_39(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_40(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_41(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_42(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_43(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_44(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_45(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_46(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_47(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_48(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_49(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_50(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_51(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_52(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_53(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_54(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_55(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_56(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_57(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_58(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_59(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_60(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_61(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_62(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_63(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_64(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_65(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_66(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_67(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_68(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_69(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_70(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_71(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_72(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_73(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_74(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_75(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_76(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_77(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_78(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_79(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_80(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_81(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_82(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_83(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_84(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_85(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_86(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_87(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_88(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_89(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_90(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_91(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_92(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_93(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_94(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_95(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_96(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_97(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_98(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_99(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_100(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_101(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_102(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_103(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_104(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_105(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_106(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_107(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_108(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_109(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_110(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_111(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_112(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_113(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_114(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_115(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_116(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_117(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_118(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_119(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_120(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_121(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_122(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_123(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_124(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_125(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_126(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_127(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_128(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_129(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_130(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_131(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_132(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_133(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_134(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_135(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_136(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_137(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_138(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_139(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_140(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_141(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_142(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_143(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_144(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_145(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_146(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_147(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_148(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_149(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_150(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_151(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_152(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_153(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_154(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_155(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_156(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_157(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_158(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_159(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_160(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_161(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_162(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_163(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_164(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_165(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_166(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_167(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_168(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_169(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_170(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_171(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_172(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_173(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_174(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_175(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_176(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_177(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_178(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_179(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_180(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_181(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_182(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_183(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_184(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_185(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_186(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_187(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_188(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_189(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_190(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_191(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_192(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_193(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_194(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_195(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_196(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_197(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_198(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_199(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_200(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_201(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_202(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_203(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_204(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_205(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_206(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_207(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_208(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_209(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_210(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_211(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_212(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_213(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_214(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_215(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_216(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_217(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_218(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_219(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_220(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_221(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_222(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_223(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_224(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_225(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_226(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_227(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_228(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_229(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_230(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_231(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_232(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_233(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_234(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_235(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_236(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_237(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_238(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_239(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_240(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_241(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_242(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_243(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_244(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_245(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_246(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_247(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_248(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_249(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_250(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_251(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_252(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_253(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_254(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_255(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # define BOOST_PP_NOT_EQUAL_256(c, y) BOOST_PP_IIF(c, BOOST_PP_NIL, y##(1, BOOST_PP_NIL)) # endif # # endif ================================================ FILE: benchmarks/boost/preprocessor/config/config.hpp ================================================ # /* ************************************************************************** # * * # * (C) Copyright Paul Mensonides 2002-2011. * # * (C) Copyright Edward Diener 2011. * # * Distributed under the Boost Software License, Version 1.0. (See * # * accompanying file LICENSE_1_0.txt or copy at * # * http://www.boost.org/LICENSE_1_0.txt) * # * * # ************************************************************************** */ # # /* See http://www.boost.org for most recent version. */ # # ifndef BOOST_PREPROCESSOR_CONFIG_CONFIG_HPP # define BOOST_PREPROCESSOR_CONFIG_CONFIG_HPP # # /* BOOST_PP_CONFIG_FLAGS */ # # define BOOST_PP_CONFIG_STRICT() 0x0001 # define BOOST_PP_CONFIG_IDEAL() 0x0002 # # define BOOST_PP_CONFIG_MSVC() 0x0004 # define BOOST_PP_CONFIG_MWCC() 0x0008 # define BOOST_PP_CONFIG_BCC() 0x0010 # define BOOST_PP_CONFIG_EDG() 0x0020 # define BOOST_PP_CONFIG_DMC() 0x0040 # # ifndef BOOST_PP_CONFIG_FLAGS # if defined(__GCCXML__) # define BOOST_PP_CONFIG_FLAGS() (BOOST_PP_CONFIG_STRICT()) # elif defined(__WAVE__) # define BOOST_PP_CONFIG_FLAGS() (BOOST_PP_CONFIG_STRICT()) # elif defined(__MWERKS__) && __MWERKS__ >= 0x3200 # define BOOST_PP_CONFIG_FLAGS() (BOOST_PP_CONFIG_STRICT()) # elif defined(__EDG__) || defined(__EDG_VERSION__) # if defined(_MSC_VER) && (defined(__INTELLISENSE__) || __EDG_VERSION__ >= 308) # define BOOST_PP_CONFIG_FLAGS() (BOOST_PP_CONFIG_MSVC()) # else # define BOOST_PP_CONFIG_FLAGS() (BOOST_PP_CONFIG_EDG() | BOOST_PP_CONFIG_STRICT()) # endif # elif defined(__MWERKS__) # define BOOST_PP_CONFIG_FLAGS() (BOOST_PP_CONFIG_MWCC()) # elif defined(__DMC__) # define BOOST_PP_CONFIG_FLAGS() (BOOST_PP_CONFIG_DMC()) # elif defined(__BORLANDC__) && __BORLANDC__ >= 0x581 # define BOOST_PP_CONFIG_FLAGS() (BOOST_PP_CONFIG_STRICT()) # elif defined(__BORLANDC__) || defined(__IBMC__) || defined(__IBMCPP__) || defined(__SUNPRO_CC) # define BOOST_PP_CONFIG_FLAGS() (BOOST_PP_CONFIG_BCC()) # elif defined(_MSC_VER) && !defined(__clang__) # define BOOST_PP_CONFIG_FLAGS() (BOOST_PP_CONFIG_MSVC()) # else # define BOOST_PP_CONFIG_FLAGS() (BOOST_PP_CONFIG_STRICT()) # endif # endif # # /* BOOST_PP_CONFIG_EXTENDED_LINE_INFO */ # # ifndef BOOST_PP_CONFIG_EXTENDED_LINE_INFO # define BOOST_PP_CONFIG_EXTENDED_LINE_INFO 0 # endif # # /* BOOST_PP_CONFIG_ERRORS */ # # ifndef BOOST_PP_CONFIG_ERRORS # ifdef NDEBUG # define BOOST_PP_CONFIG_ERRORS 0 # else # define BOOST_PP_CONFIG_ERRORS 1 # endif # endif # # /* BOOST_PP_VARIADICS */ # # define BOOST_PP_VARIADICS_MSVC 0 # if !defined BOOST_PP_VARIADICS # /* variadic support explicitly disabled for all untested compilers */ # if defined __GCCXML__ || defined __CUDACC__ || defined __PATHSCALE__ || defined __DMC__ || defined __CODEGEARC__ || defined __BORLANDC__ || defined __MWERKS__ || ( defined __SUNPRO_CC && __SUNPRO_CC < 0x5130 ) || defined __HP_aCC && !defined __EDG__ || defined __MRC__ || defined __SC__ || defined __IBMCPP__ || defined __PGI # define BOOST_PP_VARIADICS 0 # /* VC++ (C/C++) */ # elif defined _MSC_VER && _MSC_VER >= 1400 && (!defined __EDG__ || defined(__INTELLISENSE__)) && !defined __clang__ # define BOOST_PP_VARIADICS 1 # undef BOOST_PP_VARIADICS_MSVC # define BOOST_PP_VARIADICS_MSVC 1 # /* Wave (C/C++), GCC (C++) */ # elif defined __WAVE__ && __WAVE_HAS_VARIADICS__ || defined __GNUC__ && defined __GXX_EXPERIMENTAL_CXX0X__ && __GXX_EXPERIMENTAL_CXX0X__ # define BOOST_PP_VARIADICS 1 # /* EDG-based (C/C++), GCC (C), and unknown (C/C++) */ # elif !defined __cplusplus && __STDC_VERSION__ >= 199901L || __cplusplus >= 201103L # define BOOST_PP_VARIADICS 1 # else # define BOOST_PP_VARIADICS 0 # endif # elif !BOOST_PP_VARIADICS + 1 < 2 # undef BOOST_PP_VARIADICS # define BOOST_PP_VARIADICS 1 # if defined _MSC_VER && _MSC_VER >= 1400 && (defined(__INTELLISENSE__) || !(defined __EDG__ || defined __GCCXML__ || defined __CUDACC__ || defined __PATHSCALE__ || defined __clang__ || defined __DMC__ || defined __CODEGEARC__ || defined __BORLANDC__ || defined __MWERKS__ || defined __SUNPRO_CC || defined __HP_aCC || defined __MRC__ || defined __SC__ || defined __IBMCPP__ || defined __PGI)) # undef BOOST_PP_VARIADICS_MSVC # define BOOST_PP_VARIADICS_MSVC 1 # endif # else # undef BOOST_PP_VARIADICS # define BOOST_PP_VARIADICS 0 # endif # # endif ================================================ FILE: benchmarks/boost/preprocessor/control/detail/dmc/while.hpp ================================================ # /* Copyright (C) 2001 # * Housemarque Oy # * http://www.housemarque.com # * # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # */ # # /* Revised by Paul Mensonides (2002) */ # # /* See http://www.boost.org for most recent version. */ # # ifndef BOOST_PREPROCESSOR_CONTROL_DETAIL_WHILE_HPP # define BOOST_PREPROCESSOR_CONTROL_DETAIL_WHILE_HPP # # include # include # include # # define BOOST_PP_WHILE_1(p, o, s) BOOST_PP_WHILE_1_C(BOOST_PP_BOOL(p##(2, s)), p, o, s) # define BOOST_PP_WHILE_2(p, o, s) BOOST_PP_WHILE_2_C(BOOST_PP_BOOL(p##(3, s)), p, o, s) # define BOOST_PP_WHILE_3(p, o, s) BOOST_PP_WHILE_3_C(BOOST_PP_BOOL(p##(4, s)), p, o, s) # define BOOST_PP_WHILE_4(p, o, s) BOOST_PP_WHILE_4_C(BOOST_PP_BOOL(p##(5, s)), p, o, s) # define BOOST_PP_WHILE_5(p, o, s) BOOST_PP_WHILE_5_C(BOOST_PP_BOOL(p##(6, s)), p, o, s) # define BOOST_PP_WHILE_6(p, o, s) BOOST_PP_WHILE_6_C(BOOST_PP_BOOL(p##(7, s)), p, o, s) # define BOOST_PP_WHILE_7(p, o, s) BOOST_PP_WHILE_7_C(BOOST_PP_BOOL(p##(8, s)), p, o, s) # define BOOST_PP_WHILE_8(p, o, s) BOOST_PP_WHILE_8_C(BOOST_PP_BOOL(p##(9, s)), p, o, s) # define BOOST_PP_WHILE_9(p, o, s) BOOST_PP_WHILE_9_C(BOOST_PP_BOOL(p##(10, s)), p, o, s) # define BOOST_PP_WHILE_10(p, o, s) BOOST_PP_WHILE_10_C(BOOST_PP_BOOL(p##(11, s)), p, o, s) # define BOOST_PP_WHILE_11(p, o, s) BOOST_PP_WHILE_11_C(BOOST_PP_BOOL(p##(12, s)), p, o, s) # define BOOST_PP_WHILE_12(p, o, s) BOOST_PP_WHILE_12_C(BOOST_PP_BOOL(p##(13, s)), p, o, s) # define BOOST_PP_WHILE_13(p, o, s) BOOST_PP_WHILE_13_C(BOOST_PP_BOOL(p##(14, s)), p, o, s) # define BOOST_PP_WHILE_14(p, o, s) BOOST_PP_WHILE_14_C(BOOST_PP_BOOL(p##(15, s)), p, o, s) # define BOOST_PP_WHILE_15(p, o, s) BOOST_PP_WHILE_15_C(BOOST_PP_BOOL(p##(16, s)), p, o, s) # define BOOST_PP_WHILE_16(p, o, s) BOOST_PP_WHILE_16_C(BOOST_PP_BOOL(p##(17, s)), p, o, s) # define BOOST_PP_WHILE_17(p, o, s) BOOST_PP_WHILE_17_C(BOOST_PP_BOOL(p##(18, s)), p, o, s) # define BOOST_PP_WHILE_18(p, o, s) BOOST_PP_WHILE_18_C(BOOST_PP_BOOL(p##(19, s)), p, o, s) # define BOOST_PP_WHILE_19(p, o, s) BOOST_PP_WHILE_19_C(BOOST_PP_BOOL(p##(20, s)), p, o, s) # define BOOST_PP_WHILE_20(p, o, s) BOOST_PP_WHILE_20_C(BOOST_PP_BOOL(p##(21, s)), p, o, s) # define BOOST_PP_WHILE_21(p, o, s) BOOST_PP_WHILE_21_C(BOOST_PP_BOOL(p##(22, s)), p, o, s) # define BOOST_PP_WHILE_22(p, o, s) BOOST_PP_WHILE_22_C(BOOST_PP_BOOL(p##(23, s)), p, o, s) # define BOOST_PP_WHILE_23(p, o, s) BOOST_PP_WHILE_23_C(BOOST_PP_BOOL(p##(24, s)), p, o, s) # define BOOST_PP_WHILE_24(p, o, s) BOOST_PP_WHILE_24_C(BOOST_PP_BOOL(p##(25, s)), p, o, s) # define BOOST_PP_WHILE_25(p, o, s) BOOST_PP_WHILE_25_C(BOOST_PP_BOOL(p##(26, s)), p, o, s) # define BOOST_PP_WHILE_26(p, o, s) BOOST_PP_WHILE_26_C(BOOST_PP_BOOL(p##(27, s)), p, o, s) # define BOOST_PP_WHILE_27(p, o, s) BOOST_PP_WHILE_27_C(BOOST_PP_BOOL(p##(28, s)), p, o, s) # define BOOST_PP_WHILE_28(p, o, s) BOOST_PP_WHILE_28_C(BOOST_PP_BOOL(p##(29, s)), p, o, s) # define BOOST_PP_WHILE_29(p, o, s) BOOST_PP_WHILE_29_C(BOOST_PP_BOOL(p##(30, s)), p, o, s) # define BOOST_PP_WHILE_30(p, o, s) BOOST_PP_WHILE_30_C(BOOST_PP_BOOL(p##(31, s)), p, o, s) # define BOOST_PP_WHILE_31(p, o, s) BOOST_PP_WHILE_31_C(BOOST_PP_BOOL(p##(32, s)), p, o, s) # define BOOST_PP_WHILE_32(p, o, s) BOOST_PP_WHILE_32_C(BOOST_PP_BOOL(p##(33, s)), p, o, s) # define BOOST_PP_WHILE_33(p, o, s) BOOST_PP_WHILE_33_C(BOOST_PP_BOOL(p##(34, s)), p, o, s) # define BOOST_PP_WHILE_34(p, o, s) BOOST_PP_WHILE_34_C(BOOST_PP_BOOL(p##(35, s)), p, o, s) # define BOOST_PP_WHILE_35(p, o, s) BOOST_PP_WHILE_35_C(BOOST_PP_BOOL(p##(36, s)), p, o, s) # define BOOST_PP_WHILE_36(p, o, s) BOOST_PP_WHILE_36_C(BOOST_PP_BOOL(p##(37, s)), p, o, s) # define BOOST_PP_WHILE_37(p, o, s) BOOST_PP_WHILE_37_C(BOOST_PP_BOOL(p##(38, s)), p, o, s) # define BOOST_PP_WHILE_38(p, o, s) BOOST_PP_WHILE_38_C(BOOST_PP_BOOL(p##(39, s)), p, o, s) # define BOOST_PP_WHILE_39(p, o, s) BOOST_PP_WHILE_39_C(BOOST_PP_BOOL(p##(40, s)), p, o, s) # define BOOST_PP_WHILE_40(p, o, s) BOOST_PP_WHILE_40_C(BOOST_PP_BOOL(p##(41, s)), p, o, s) # define BOOST_PP_WHILE_41(p, o, s) BOOST_PP_WHILE_41_C(BOOST_PP_BOOL(p##(42, s)), p, o, s) # define BOOST_PP_WHILE_42(p, o, s) BOOST_PP_WHILE_42_C(BOOST_PP_BOOL(p##(43, s)), p, o, s) # define BOOST_PP_WHILE_43(p, o, s) BOOST_PP_WHILE_43_C(BOOST_PP_BOOL(p##(44, s)), p, o, s) # define BOOST_PP_WHILE_44(p, o, s) BOOST_PP_WHILE_44_C(BOOST_PP_BOOL(p##(45, s)), p, o, s) # define BOOST_PP_WHILE_45(p, o, s) BOOST_PP_WHILE_45_C(BOOST_PP_BOOL(p##(46, s)), p, o, s) # define BOOST_PP_WHILE_46(p, o, s) BOOST_PP_WHILE_46_C(BOOST_PP_BOOL(p##(47, s)), p, o, s) # define BOOST_PP_WHILE_47(p, o, s) BOOST_PP_WHILE_47_C(BOOST_PP_BOOL(p##(48, s)), p, o, s) # define BOOST_PP_WHILE_48(p, o, s) BOOST_PP_WHILE_48_C(BOOST_PP_BOOL(p##(49, s)), p, o, s) # define BOOST_PP_WHILE_49(p, o, s) BOOST_PP_WHILE_49_C(BOOST_PP_BOOL(p##(50, s)), p, o, s) # define BOOST_PP_WHILE_50(p, o, s) BOOST_PP_WHILE_50_C(BOOST_PP_BOOL(p##(51, s)), p, o, s) # define BOOST_PP_WHILE_51(p, o, s) BOOST_PP_WHILE_51_C(BOOST_PP_BOOL(p##(52, s)), p, o, s) # define BOOST_PP_WHILE_52(p, o, s) BOOST_PP_WHILE_52_C(BOOST_PP_BOOL(p##(53, s)), p, o, s) # define BOOST_PP_WHILE_53(p, o, s) BOOST_PP_WHILE_53_C(BOOST_PP_BOOL(p##(54, s)), p, o, s) # define BOOST_PP_WHILE_54(p, o, s) BOOST_PP_WHILE_54_C(BOOST_PP_BOOL(p##(55, s)), p, o, s) # define BOOST_PP_WHILE_55(p, o, s) BOOST_PP_WHILE_55_C(BOOST_PP_BOOL(p##(56, s)), p, o, s) # define BOOST_PP_WHILE_56(p, o, s) BOOST_PP_WHILE_56_C(BOOST_PP_BOOL(p##(57, s)), p, o, s) # define BOOST_PP_WHILE_57(p, o, s) BOOST_PP_WHILE_57_C(BOOST_PP_BOOL(p##(58, s)), p, o, s) # define BOOST_PP_WHILE_58(p, o, s) BOOST_PP_WHILE_58_C(BOOST_PP_BOOL(p##(59, s)), p, o, s) # define BOOST_PP_WHILE_59(p, o, s) BOOST_PP_WHILE_59_C(BOOST_PP_BOOL(p##(60, s)), p, o, s) # define BOOST_PP_WHILE_60(p, o, s) BOOST_PP_WHILE_60_C(BOOST_PP_BOOL(p##(61, s)), p, o, s) # define BOOST_PP_WHILE_61(p, o, s) BOOST_PP_WHILE_61_C(BOOST_PP_BOOL(p##(62, s)), p, o, s) # define BOOST_PP_WHILE_62(p, o, s) BOOST_PP_WHILE_62_C(BOOST_PP_BOOL(p##(63, s)), p, o, s) # define BOOST_PP_WHILE_63(p, o, s) BOOST_PP_WHILE_63_C(BOOST_PP_BOOL(p##(64, s)), p, o, s) # define BOOST_PP_WHILE_64(p, o, s) BOOST_PP_WHILE_64_C(BOOST_PP_BOOL(p##(65, s)), p, o, s) # define BOOST_PP_WHILE_65(p, o, s) BOOST_PP_WHILE_65_C(BOOST_PP_BOOL(p##(66, s)), p, o, s) # define BOOST_PP_WHILE_66(p, o, s) BOOST_PP_WHILE_66_C(BOOST_PP_BOOL(p##(67, s)), p, o, s) # define BOOST_PP_WHILE_67(p, o, s) BOOST_PP_WHILE_67_C(BOOST_PP_BOOL(p##(68, s)), p, o, s) # define BOOST_PP_WHILE_68(p, o, s) BOOST_PP_WHILE_68_C(BOOST_PP_BOOL(p##(69, s)), p, o, s) # define BOOST_PP_WHILE_69(p, o, s) BOOST_PP_WHILE_69_C(BOOST_PP_BOOL(p##(70, s)), p, o, s) # define BOOST_PP_WHILE_70(p, o, s) BOOST_PP_WHILE_70_C(BOOST_PP_BOOL(p##(71, s)), p, o, s) # define BOOST_PP_WHILE_71(p, o, s) BOOST_PP_WHILE_71_C(BOOST_PP_BOOL(p##(72, s)), p, o, s) # define BOOST_PP_WHILE_72(p, o, s) BOOST_PP_WHILE_72_C(BOOST_PP_BOOL(p##(73, s)), p, o, s) # define BOOST_PP_WHILE_73(p, o, s) BOOST_PP_WHILE_73_C(BOOST_PP_BOOL(p##(74, s)), p, o, s) # define BOOST_PP_WHILE_74(p, o, s) BOOST_PP_WHILE_74_C(BOOST_PP_BOOL(p##(75, s)), p, o, s) # define BOOST_PP_WHILE_75(p, o, s) BOOST_PP_WHILE_75_C(BOOST_PP_BOOL(p##(76, s)), p, o, s) # define BOOST_PP_WHILE_76(p, o, s) BOOST_PP_WHILE_76_C(BOOST_PP_BOOL(p##(77, s)), p, o, s) # define BOOST_PP_WHILE_77(p, o, s) BOOST_PP_WHILE_77_C(BOOST_PP_BOOL(p##(78, s)), p, o, s) # define BOOST_PP_WHILE_78(p, o, s) BOOST_PP_WHILE_78_C(BOOST_PP_BOOL(p##(79, s)), p, o, s) # define BOOST_PP_WHILE_79(p, o, s) BOOST_PP_WHILE_79_C(BOOST_PP_BOOL(p##(80, s)), p, o, s) # define BOOST_PP_WHILE_80(p, o, s) BOOST_PP_WHILE_80_C(BOOST_PP_BOOL(p##(81, s)), p, o, s) # define BOOST_PP_WHILE_81(p, o, s) BOOST_PP_WHILE_81_C(BOOST_PP_BOOL(p##(82, s)), p, o, s) # define BOOST_PP_WHILE_82(p, o, s) BOOST_PP_WHILE_82_C(BOOST_PP_BOOL(p##(83, s)), p, o, s) # define BOOST_PP_WHILE_83(p, o, s) BOOST_PP_WHILE_83_C(BOOST_PP_BOOL(p##(84, s)), p, o, s) # define BOOST_PP_WHILE_84(p, o, s) BOOST_PP_WHILE_84_C(BOOST_PP_BOOL(p##(85, s)), p, o, s) # define BOOST_PP_WHILE_85(p, o, s) BOOST_PP_WHILE_85_C(BOOST_PP_BOOL(p##(86, s)), p, o, s) # define BOOST_PP_WHILE_86(p, o, s) BOOST_PP_WHILE_86_C(BOOST_PP_BOOL(p##(87, s)), p, o, s) # define BOOST_PP_WHILE_87(p, o, s) BOOST_PP_WHILE_87_C(BOOST_PP_BOOL(p##(88, s)), p, o, s) # define BOOST_PP_WHILE_88(p, o, s) BOOST_PP_WHILE_88_C(BOOST_PP_BOOL(p##(89, s)), p, o, s) # define BOOST_PP_WHILE_89(p, o, s) BOOST_PP_WHILE_89_C(BOOST_PP_BOOL(p##(90, s)), p, o, s) # define BOOST_PP_WHILE_90(p, o, s) BOOST_PP_WHILE_90_C(BOOST_PP_BOOL(p##(91, s)), p, o, s) # define BOOST_PP_WHILE_91(p, o, s) BOOST_PP_WHILE_91_C(BOOST_PP_BOOL(p##(92, s)), p, o, s) # define BOOST_PP_WHILE_92(p, o, s) BOOST_PP_WHILE_92_C(BOOST_PP_BOOL(p##(93, s)), p, o, s) # define BOOST_PP_WHILE_93(p, o, s) BOOST_PP_WHILE_93_C(BOOST_PP_BOOL(p##(94, s)), p, o, s) # define BOOST_PP_WHILE_94(p, o, s) BOOST_PP_WHILE_94_C(BOOST_PP_BOOL(p##(95, s)), p, o, s) # define BOOST_PP_WHILE_95(p, o, s) BOOST_PP_WHILE_95_C(BOOST_PP_BOOL(p##(96, s)), p, o, s) # define BOOST_PP_WHILE_96(p, o, s) BOOST_PP_WHILE_96_C(BOOST_PP_BOOL(p##(97, s)), p, o, s) # define BOOST_PP_WHILE_97(p, o, s) BOOST_PP_WHILE_97_C(BOOST_PP_BOOL(p##(98, s)), p, o, s) # define BOOST_PP_WHILE_98(p, o, s) BOOST_PP_WHILE_98_C(BOOST_PP_BOOL(p##(99, s)), p, o, s) # define BOOST_PP_WHILE_99(p, o, s) BOOST_PP_WHILE_99_C(BOOST_PP_BOOL(p##(100, s)), p, o, s) # define BOOST_PP_WHILE_100(p, o, s) BOOST_PP_WHILE_100_C(BOOST_PP_BOOL(p##(101, s)), p, o, s) # define BOOST_PP_WHILE_101(p, o, s) BOOST_PP_WHILE_101_C(BOOST_PP_BOOL(p##(102, s)), p, o, s) # define BOOST_PP_WHILE_102(p, o, s) BOOST_PP_WHILE_102_C(BOOST_PP_BOOL(p##(103, s)), p, o, s) # define BOOST_PP_WHILE_103(p, o, s) BOOST_PP_WHILE_103_C(BOOST_PP_BOOL(p##(104, s)), p, o, s) # define BOOST_PP_WHILE_104(p, o, s) BOOST_PP_WHILE_104_C(BOOST_PP_BOOL(p##(105, s)), p, o, s) # define BOOST_PP_WHILE_105(p, o, s) BOOST_PP_WHILE_105_C(BOOST_PP_BOOL(p##(106, s)), p, o, s) # define BOOST_PP_WHILE_106(p, o, s) BOOST_PP_WHILE_106_C(BOOST_PP_BOOL(p##(107, s)), p, o, s) # define BOOST_PP_WHILE_107(p, o, s) BOOST_PP_WHILE_107_C(BOOST_PP_BOOL(p##(108, s)), p, o, s) # define BOOST_PP_WHILE_108(p, o, s) BOOST_PP_WHILE_108_C(BOOST_PP_BOOL(p##(109, s)), p, o, s) # define BOOST_PP_WHILE_109(p, o, s) BOOST_PP_WHILE_109_C(BOOST_PP_BOOL(p##(110, s)), p, o, s) # define BOOST_PP_WHILE_110(p, o, s) BOOST_PP_WHILE_110_C(BOOST_PP_BOOL(p##(111, s)), p, o, s) # define BOOST_PP_WHILE_111(p, o, s) BOOST_PP_WHILE_111_C(BOOST_PP_BOOL(p##(112, s)), p, o, s) # define BOOST_PP_WHILE_112(p, o, s) BOOST_PP_WHILE_112_C(BOOST_PP_BOOL(p##(113, s)), p, o, s) # define BOOST_PP_WHILE_113(p, o, s) BOOST_PP_WHILE_113_C(BOOST_PP_BOOL(p##(114, s)), p, o, s) # define BOOST_PP_WHILE_114(p, o, s) BOOST_PP_WHILE_114_C(BOOST_PP_BOOL(p##(115, s)), p, o, s) # define BOOST_PP_WHILE_115(p, o, s) BOOST_PP_WHILE_115_C(BOOST_PP_BOOL(p##(116, s)), p, o, s) # define BOOST_PP_WHILE_116(p, o, s) BOOST_PP_WHILE_116_C(BOOST_PP_BOOL(p##(117, s)), p, o, s) # define BOOST_PP_WHILE_117(p, o, s) BOOST_PP_WHILE_117_C(BOOST_PP_BOOL(p##(118, s)), p, o, s) # define BOOST_PP_WHILE_118(p, o, s) BOOST_PP_WHILE_118_C(BOOST_PP_BOOL(p##(119, s)), p, o, s) # define BOOST_PP_WHILE_119(p, o, s) BOOST_PP_WHILE_119_C(BOOST_PP_BOOL(p##(120, s)), p, o, s) # define BOOST_PP_WHILE_120(p, o, s) BOOST_PP_WHILE_120_C(BOOST_PP_BOOL(p##(121, s)), p, o, s) # define BOOST_PP_WHILE_121(p, o, s) BOOST_PP_WHILE_121_C(BOOST_PP_BOOL(p##(122, s)), p, o, s) # define BOOST_PP_WHILE_122(p, o, s) BOOST_PP_WHILE_122_C(BOOST_PP_BOOL(p##(123, s)), p, o, s) # define BOOST_PP_WHILE_123(p, o, s) BOOST_PP_WHILE_123_C(BOOST_PP_BOOL(p##(124, s)), p, o, s) # define BOOST_PP_WHILE_124(p, o, s) BOOST_PP_WHILE_124_C(BOOST_PP_BOOL(p##(125, s)), p, o, s) # define BOOST_PP_WHILE_125(p, o, s) BOOST_PP_WHILE_125_C(BOOST_PP_BOOL(p##(126, s)), p, o, s) # define BOOST_PP_WHILE_126(p, o, s) BOOST_PP_WHILE_126_C(BOOST_PP_BOOL(p##(127, s)), p, o, s) # define BOOST_PP_WHILE_127(p, o, s) BOOST_PP_WHILE_127_C(BOOST_PP_BOOL(p##(128, s)), p, o, s) # define BOOST_PP_WHILE_128(p, o, s) BOOST_PP_WHILE_128_C(BOOST_PP_BOOL(p##(129, s)), p, o, s) # define BOOST_PP_WHILE_129(p, o, s) BOOST_PP_WHILE_129_C(BOOST_PP_BOOL(p##(130, s)), p, o, s) # define BOOST_PP_WHILE_130(p, o, s) BOOST_PP_WHILE_130_C(BOOST_PP_BOOL(p##(131, s)), p, o, s) # define BOOST_PP_WHILE_131(p, o, s) BOOST_PP_WHILE_131_C(BOOST_PP_BOOL(p##(132, s)), p, o, s) # define BOOST_PP_WHILE_132(p, o, s) BOOST_PP_WHILE_132_C(BOOST_PP_BOOL(p##(133, s)), p, o, s) # define BOOST_PP_WHILE_133(p, o, s) BOOST_PP_WHILE_133_C(BOOST_PP_BOOL(p##(134, s)), p, o, s) # define BOOST_PP_WHILE_134(p, o, s) BOOST_PP_WHILE_134_C(BOOST_PP_BOOL(p##(135, s)), p, o, s) # define BOOST_PP_WHILE_135(p, o, s) BOOST_PP_WHILE_135_C(BOOST_PP_BOOL(p##(136, s)), p, o, s) # define BOOST_PP_WHILE_136(p, o, s) BOOST_PP_WHILE_136_C(BOOST_PP_BOOL(p##(137, s)), p, o, s) # define BOOST_PP_WHILE_137(p, o, s) BOOST_PP_WHILE_137_C(BOOST_PP_BOOL(p##(138, s)), p, o, s) # define BOOST_PP_WHILE_138(p, o, s) BOOST_PP_WHILE_138_C(BOOST_PP_BOOL(p##(139, s)), p, o, s) # define BOOST_PP_WHILE_139(p, o, s) BOOST_PP_WHILE_139_C(BOOST_PP_BOOL(p##(140, s)), p, o, s) # define BOOST_PP_WHILE_140(p, o, s) BOOST_PP_WHILE_140_C(BOOST_PP_BOOL(p##(141, s)), p, o, s) # define BOOST_PP_WHILE_141(p, o, s) BOOST_PP_WHILE_141_C(BOOST_PP_BOOL(p##(142, s)), p, o, s) # define BOOST_PP_WHILE_142(p, o, s) BOOST_PP_WHILE_142_C(BOOST_PP_BOOL(p##(143, s)), p, o, s) # define BOOST_PP_WHILE_143(p, o, s) BOOST_PP_WHILE_143_C(BOOST_PP_BOOL(p##(144, s)), p, o, s) # define BOOST_PP_WHILE_144(p, o, s) BOOST_PP_WHILE_144_C(BOOST_PP_BOOL(p##(145, s)), p, o, s) # define BOOST_PP_WHILE_145(p, o, s) BOOST_PP_WHILE_145_C(BOOST_PP_BOOL(p##(146, s)), p, o, s) # define BOOST_PP_WHILE_146(p, o, s) BOOST_PP_WHILE_146_C(BOOST_PP_BOOL(p##(147, s)), p, o, s) # define BOOST_PP_WHILE_147(p, o, s) BOOST_PP_WHILE_147_C(BOOST_PP_BOOL(p##(148, s)), p, o, s) # define BOOST_PP_WHILE_148(p, o, s) BOOST_PP_WHILE_148_C(BOOST_PP_BOOL(p##(149, s)), p, o, s) # define BOOST_PP_WHILE_149(p, o, s) BOOST_PP_WHILE_149_C(BOOST_PP_BOOL(p##(150, s)), p, o, s) # define BOOST_PP_WHILE_150(p, o, s) BOOST_PP_WHILE_150_C(BOOST_PP_BOOL(p##(151, s)), p, o, s) # define BOOST_PP_WHILE_151(p, o, s) BOOST_PP_WHILE_151_C(BOOST_PP_BOOL(p##(152, s)), p, o, s) # define BOOST_PP_WHILE_152(p, o, s) BOOST_PP_WHILE_152_C(BOOST_PP_BOOL(p##(153, s)), p, o, s) # define BOOST_PP_WHILE_153(p, o, s) BOOST_PP_WHILE_153_C(BOOST_PP_BOOL(p##(154, s)), p, o, s) # define BOOST_PP_WHILE_154(p, o, s) BOOST_PP_WHILE_154_C(BOOST_PP_BOOL(p##(155, s)), p, o, s) # define BOOST_PP_WHILE_155(p, o, s) BOOST_PP_WHILE_155_C(BOOST_PP_BOOL(p##(156, s)), p, o, s) # define BOOST_PP_WHILE_156(p, o, s) BOOST_PP_WHILE_156_C(BOOST_PP_BOOL(p##(157, s)), p, o, s) # define BOOST_PP_WHILE_157(p, o, s) BOOST_PP_WHILE_157_C(BOOST_PP_BOOL(p##(158, s)), p, o, s) # define BOOST_PP_WHILE_158(p, o, s) BOOST_PP_WHILE_158_C(BOOST_PP_BOOL(p##(159, s)), p, o, s) # define BOOST_PP_WHILE_159(p, o, s) BOOST_PP_WHILE_159_C(BOOST_PP_BOOL(p##(160, s)), p, o, s) # define BOOST_PP_WHILE_160(p, o, s) BOOST_PP_WHILE_160_C(BOOST_PP_BOOL(p##(161, s)), p, o, s) # define BOOST_PP_WHILE_161(p, o, s) BOOST_PP_WHILE_161_C(BOOST_PP_BOOL(p##(162, s)), p, o, s) # define BOOST_PP_WHILE_162(p, o, s) BOOST_PP_WHILE_162_C(BOOST_PP_BOOL(p##(163, s)), p, o, s) # define BOOST_PP_WHILE_163(p, o, s) BOOST_PP_WHILE_163_C(BOOST_PP_BOOL(p##(164, s)), p, o, s) # define BOOST_PP_WHILE_164(p, o, s) BOOST_PP_WHILE_164_C(BOOST_PP_BOOL(p##(165, s)), p, o, s) # define BOOST_PP_WHILE_165(p, o, s) BOOST_PP_WHILE_165_C(BOOST_PP_BOOL(p##(166, s)), p, o, s) # define BOOST_PP_WHILE_166(p, o, s) BOOST_PP_WHILE_166_C(BOOST_PP_BOOL(p##(167, s)), p, o, s) # define BOOST_PP_WHILE_167(p, o, s) BOOST_PP_WHILE_167_C(BOOST_PP_BOOL(p##(168, s)), p, o, s) # define BOOST_PP_WHILE_168(p, o, s) BOOST_PP_WHILE_168_C(BOOST_PP_BOOL(p##(169, s)), p, o, s) # define BOOST_PP_WHILE_169(p, o, s) BOOST_PP_WHILE_169_C(BOOST_PP_BOOL(p##(170, s)), p, o, s) # define BOOST_PP_WHILE_170(p, o, s) BOOST_PP_WHILE_170_C(BOOST_PP_BOOL(p##(171, s)), p, o, s) # define BOOST_PP_WHILE_171(p, o, s) BOOST_PP_WHILE_171_C(BOOST_PP_BOOL(p##(172, s)), p, o, s) # define BOOST_PP_WHILE_172(p, o, s) BOOST_PP_WHILE_172_C(BOOST_PP_BOOL(p##(173, s)), p, o, s) # define BOOST_PP_WHILE_173(p, o, s) BOOST_PP_WHILE_173_C(BOOST_PP_BOOL(p##(174, s)), p, o, s) # define BOOST_PP_WHILE_174(p, o, s) BOOST_PP_WHILE_174_C(BOOST_PP_BOOL(p##(175, s)), p, o, s) # define BOOST_PP_WHILE_175(p, o, s) BOOST_PP_WHILE_175_C(BOOST_PP_BOOL(p##(176, s)), p, o, s) # define BOOST_PP_WHILE_176(p, o, s) BOOST_PP_WHILE_176_C(BOOST_PP_BOOL(p##(177, s)), p, o, s) # define BOOST_PP_WHILE_177(p, o, s) BOOST_PP_WHILE_177_C(BOOST_PP_BOOL(p##(178, s)), p, o, s) # define BOOST_PP_WHILE_178(p, o, s) BOOST_PP_WHILE_178_C(BOOST_PP_BOOL(p##(179, s)), p, o, s) # define BOOST_PP_WHILE_179(p, o, s) BOOST_PP_WHILE_179_C(BOOST_PP_BOOL(p##(180, s)), p, o, s) # define BOOST_PP_WHILE_180(p, o, s) BOOST_PP_WHILE_180_C(BOOST_PP_BOOL(p##(181, s)), p, o, s) # define BOOST_PP_WHILE_181(p, o, s) BOOST_PP_WHILE_181_C(BOOST_PP_BOOL(p##(182, s)), p, o, s) # define BOOST_PP_WHILE_182(p, o, s) BOOST_PP_WHILE_182_C(BOOST_PP_BOOL(p##(183, s)), p, o, s) # define BOOST_PP_WHILE_183(p, o, s) BOOST_PP_WHILE_183_C(BOOST_PP_BOOL(p##(184, s)), p, o, s) # define BOOST_PP_WHILE_184(p, o, s) BOOST_PP_WHILE_184_C(BOOST_PP_BOOL(p##(185, s)), p, o, s) # define BOOST_PP_WHILE_185(p, o, s) BOOST_PP_WHILE_185_C(BOOST_PP_BOOL(p##(186, s)), p, o, s) # define BOOST_PP_WHILE_186(p, o, s) BOOST_PP_WHILE_186_C(BOOST_PP_BOOL(p##(187, s)), p, o, s) # define BOOST_PP_WHILE_187(p, o, s) BOOST_PP_WHILE_187_C(BOOST_PP_BOOL(p##(188, s)), p, o, s) # define BOOST_PP_WHILE_188(p, o, s) BOOST_PP_WHILE_188_C(BOOST_PP_BOOL(p##(189, s)), p, o, s) # define BOOST_PP_WHILE_189(p, o, s) BOOST_PP_WHILE_189_C(BOOST_PP_BOOL(p##(190, s)), p, o, s) # define BOOST_PP_WHILE_190(p, o, s) BOOST_PP_WHILE_190_C(BOOST_PP_BOOL(p##(191, s)), p, o, s) # define BOOST_PP_WHILE_191(p, o, s) BOOST_PP_WHILE_191_C(BOOST_PP_BOOL(p##(192, s)), p, o, s) # define BOOST_PP_WHILE_192(p, o, s) BOOST_PP_WHILE_192_C(BOOST_PP_BOOL(p##(193, s)), p, o, s) # define BOOST_PP_WHILE_193(p, o, s) BOOST_PP_WHILE_193_C(BOOST_PP_BOOL(p##(194, s)), p, o, s) # define BOOST_PP_WHILE_194(p, o, s) BOOST_PP_WHILE_194_C(BOOST_PP_BOOL(p##(195, s)), p, o, s) # define BOOST_PP_WHILE_195(p, o, s) BOOST_PP_WHILE_195_C(BOOST_PP_BOOL(p##(196, s)), p, o, s) # define BOOST_PP_WHILE_196(p, o, s) BOOST_PP_WHILE_196_C(BOOST_PP_BOOL(p##(197, s)), p, o, s) # define BOOST_PP_WHILE_197(p, o, s) BOOST_PP_WHILE_197_C(BOOST_PP_BOOL(p##(198, s)), p, o, s) # define BOOST_PP_WHILE_198(p, o, s) BOOST_PP_WHILE_198_C(BOOST_PP_BOOL(p##(199, s)), p, o, s) # define BOOST_PP_WHILE_199(p, o, s) BOOST_PP_WHILE_199_C(BOOST_PP_BOOL(p##(200, s)), p, o, s) # define BOOST_PP_WHILE_200(p, o, s) BOOST_PP_WHILE_200_C(BOOST_PP_BOOL(p##(201, s)), p, o, s) # define BOOST_PP_WHILE_201(p, o, s) BOOST_PP_WHILE_201_C(BOOST_PP_BOOL(p##(202, s)), p, o, s) # define BOOST_PP_WHILE_202(p, o, s) BOOST_PP_WHILE_202_C(BOOST_PP_BOOL(p##(203, s)), p, o, s) # define BOOST_PP_WHILE_203(p, o, s) BOOST_PP_WHILE_203_C(BOOST_PP_BOOL(p##(204, s)), p, o, s) # define BOOST_PP_WHILE_204(p, o, s) BOOST_PP_WHILE_204_C(BOOST_PP_BOOL(p##(205, s)), p, o, s) # define BOOST_PP_WHILE_205(p, o, s) BOOST_PP_WHILE_205_C(BOOST_PP_BOOL(p##(206, s)), p, o, s) # define BOOST_PP_WHILE_206(p, o, s) BOOST_PP_WHILE_206_C(BOOST_PP_BOOL(p##(207, s)), p, o, s) # define BOOST_PP_WHILE_207(p, o, s) BOOST_PP_WHILE_207_C(BOOST_PP_BOOL(p##(208, s)), p, o, s) # define BOOST_PP_WHILE_208(p, o, s) BOOST_PP_WHILE_208_C(BOOST_PP_BOOL(p##(209, s)), p, o, s) # define BOOST_PP_WHILE_209(p, o, s) BOOST_PP_WHILE_209_C(BOOST_PP_BOOL(p##(210, s)), p, o, s) # define BOOST_PP_WHILE_210(p, o, s) BOOST_PP_WHILE_210_C(BOOST_PP_BOOL(p##(211, s)), p, o, s) # define BOOST_PP_WHILE_211(p, o, s) BOOST_PP_WHILE_211_C(BOOST_PP_BOOL(p##(212, s)), p, o, s) # define BOOST_PP_WHILE_212(p, o, s) BOOST_PP_WHILE_212_C(BOOST_PP_BOOL(p##(213, s)), p, o, s) # define BOOST_PP_WHILE_213(p, o, s) BOOST_PP_WHILE_213_C(BOOST_PP_BOOL(p##(214, s)), p, o, s) # define BOOST_PP_WHILE_214(p, o, s) BOOST_PP_WHILE_214_C(BOOST_PP_BOOL(p##(215, s)), p, o, s) # define BOOST_PP_WHILE_215(p, o, s) BOOST_PP_WHILE_215_C(BOOST_PP_BOOL(p##(216, s)), p, o, s) # define BOOST_PP_WHILE_216(p, o, s) BOOST_PP_WHILE_216_C(BOOST_PP_BOOL(p##(217, s)), p, o, s) # define BOOST_PP_WHILE_217(p, o, s) BOOST_PP_WHILE_217_C(BOOST_PP_BOOL(p##(218, s)), p, o, s) # define BOOST_PP_WHILE_218(p, o, s) BOOST_PP_WHILE_218_C(BOOST_PP_BOOL(p##(219, s)), p, o, s) # define BOOST_PP_WHILE_219(p, o, s) BOOST_PP_WHILE_219_C(BOOST_PP_BOOL(p##(220, s)), p, o, s) # define BOOST_PP_WHILE_220(p, o, s) BOOST_PP_WHILE_220_C(BOOST_PP_BOOL(p##(221, s)), p, o, s) # define BOOST_PP_WHILE_221(p, o, s) BOOST_PP_WHILE_221_C(BOOST_PP_BOOL(p##(222, s)), p, o, s) # define BOOST_PP_WHILE_222(p, o, s) BOOST_PP_WHILE_222_C(BOOST_PP_BOOL(p##(223, s)), p, o, s) # define BOOST_PP_WHILE_223(p, o, s) BOOST_PP_WHILE_223_C(BOOST_PP_BOOL(p##(224, s)), p, o, s) # define BOOST_PP_WHILE_224(p, o, s) BOOST_PP_WHILE_224_C(BOOST_PP_BOOL(p##(225, s)), p, o, s) # define BOOST_PP_WHILE_225(p, o, s) BOOST_PP_WHILE_225_C(BOOST_PP_BOOL(p##(226, s)), p, o, s) # define BOOST_PP_WHILE_226(p, o, s) BOOST_PP_WHILE_226_C(BOOST_PP_BOOL(p##(227, s)), p, o, s) # define BOOST_PP_WHILE_227(p, o, s) BOOST_PP_WHILE_227_C(BOOST_PP_BOOL(p##(228, s)), p, o, s) # define BOOST_PP_WHILE_228(p, o, s) BOOST_PP_WHILE_228_C(BOOST_PP_BOOL(p##(229, s)), p, o, s) # define BOOST_PP_WHILE_229(p, o, s) BOOST_PP_WHILE_229_C(BOOST_PP_BOOL(p##(230, s)), p, o, s) # define BOOST_PP_WHILE_230(p, o, s) BOOST_PP_WHILE_230_C(BOOST_PP_BOOL(p##(231, s)), p, o, s) # define BOOST_PP_WHILE_231(p, o, s) BOOST_PP_WHILE_231_C(BOOST_PP_BOOL(p##(232, s)), p, o, s) # define BOOST_PP_WHILE_232(p, o, s) BOOST_PP_WHILE_232_C(BOOST_PP_BOOL(p##(233, s)), p, o, s) # define BOOST_PP_WHILE_233(p, o, s) BOOST_PP_WHILE_233_C(BOOST_PP_BOOL(p##(234, s)), p, o, s) # define BOOST_PP_WHILE_234(p, o, s) BOOST_PP_WHILE_234_C(BOOST_PP_BOOL(p##(235, s)), p, o, s) # define BOOST_PP_WHILE_235(p, o, s) BOOST_PP_WHILE_235_C(BOOST_PP_BOOL(p##(236, s)), p, o, s) # define BOOST_PP_WHILE_236(p, o, s) BOOST_PP_WHILE_236_C(BOOST_PP_BOOL(p##(237, s)), p, o, s) # define BOOST_PP_WHILE_237(p, o, s) BOOST_PP_WHILE_237_C(BOOST_PP_BOOL(p##(238, s)), p, o, s) # define BOOST_PP_WHILE_238(p, o, s) BOOST_PP_WHILE_238_C(BOOST_PP_BOOL(p##(239, s)), p, o, s) # define BOOST_PP_WHILE_239(p, o, s) BOOST_PP_WHILE_239_C(BOOST_PP_BOOL(p##(240, s)), p, o, s) # define BOOST_PP_WHILE_240(p, o, s) BOOST_PP_WHILE_240_C(BOOST_PP_BOOL(p##(241, s)), p, o, s) # define BOOST_PP_WHILE_241(p, o, s) BOOST_PP_WHILE_241_C(BOOST_PP_BOOL(p##(242, s)), p, o, s) # define BOOST_PP_WHILE_242(p, o, s) BOOST_PP_WHILE_242_C(BOOST_PP_BOOL(p##(243, s)), p, o, s) # define BOOST_PP_WHILE_243(p, o, s) BOOST_PP_WHILE_243_C(BOOST_PP_BOOL(p##(244, s)), p, o, s) # define BOOST_PP_WHILE_244(p, o, s) BOOST_PP_WHILE_244_C(BOOST_PP_BOOL(p##(245, s)), p, o, s) # define BOOST_PP_WHILE_245(p, o, s) BOOST_PP_WHILE_245_C(BOOST_PP_BOOL(p##(246, s)), p, o, s) # define BOOST_PP_WHILE_246(p, o, s) BOOST_PP_WHILE_246_C(BOOST_PP_BOOL(p##(247, s)), p, o, s) # define BOOST_PP_WHILE_247(p, o, s) BOOST_PP_WHILE_247_C(BOOST_PP_BOOL(p##(248, s)), p, o, s) # define BOOST_PP_WHILE_248(p, o, s) BOOST_PP_WHILE_248_C(BOOST_PP_BOOL(p##(249, s)), p, o, s) # define BOOST_PP_WHILE_249(p, o, s) BOOST_PP_WHILE_249_C(BOOST_PP_BOOL(p##(250, s)), p, o, s) # define BOOST_PP_WHILE_250(p, o, s) BOOST_PP_WHILE_250_C(BOOST_PP_BOOL(p##(251, s)), p, o, s) # define BOOST_PP_WHILE_251(p, o, s) BOOST_PP_WHILE_251_C(BOOST_PP_BOOL(p##(252, s)), p, o, s) # define BOOST_PP_WHILE_252(p, o, s) BOOST_PP_WHILE_252_C(BOOST_PP_BOOL(p##(253, s)), p, o, s) # define BOOST_PP_WHILE_253(p, o, s) BOOST_PP_WHILE_253_C(BOOST_PP_BOOL(p##(254, s)), p, o, s) # define BOOST_PP_WHILE_254(p, o, s) BOOST_PP_WHILE_254_C(BOOST_PP_BOOL(p##(255, s)), p, o, s) # define BOOST_PP_WHILE_255(p, o, s) BOOST_PP_WHILE_255_C(BOOST_PP_BOOL(p##(256, s)), p, o, s) # define BOOST_PP_WHILE_256(p, o, s) BOOST_PP_WHILE_256_C(BOOST_PP_BOOL(p##(257, s)), p, o, s) # # define BOOST_PP_WHILE_1_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_2, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(2, s)) # define BOOST_PP_WHILE_2_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_3, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(3, s)) # define BOOST_PP_WHILE_3_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_4, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(4, s)) # define BOOST_PP_WHILE_4_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_5, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(5, s)) # define BOOST_PP_WHILE_5_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_6, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(6, s)) # define BOOST_PP_WHILE_6_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_7, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(7, s)) # define BOOST_PP_WHILE_7_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_8, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(8, s)) # define BOOST_PP_WHILE_8_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_9, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(9, s)) # define BOOST_PP_WHILE_9_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_10, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(10, s)) # define BOOST_PP_WHILE_10_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_11, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(11, s)) # define BOOST_PP_WHILE_11_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_12, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(12, s)) # define BOOST_PP_WHILE_12_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_13, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(13, s)) # define BOOST_PP_WHILE_13_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_14, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(14, s)) # define BOOST_PP_WHILE_14_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_15, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(15, s)) # define BOOST_PP_WHILE_15_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_16, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(16, s)) # define BOOST_PP_WHILE_16_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_17, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(17, s)) # define BOOST_PP_WHILE_17_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_18, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(18, s)) # define BOOST_PP_WHILE_18_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_19, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(19, s)) # define BOOST_PP_WHILE_19_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_20, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(20, s)) # define BOOST_PP_WHILE_20_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_21, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(21, s)) # define BOOST_PP_WHILE_21_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_22, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(22, s)) # define BOOST_PP_WHILE_22_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_23, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(23, s)) # define BOOST_PP_WHILE_23_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_24, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(24, s)) # define BOOST_PP_WHILE_24_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_25, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(25, s)) # define BOOST_PP_WHILE_25_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_26, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(26, s)) # define BOOST_PP_WHILE_26_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_27, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(27, s)) # define BOOST_PP_WHILE_27_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_28, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(28, s)) # define BOOST_PP_WHILE_28_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_29, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(29, s)) # define BOOST_PP_WHILE_29_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_30, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(30, s)) # define BOOST_PP_WHILE_30_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_31, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(31, s)) # define BOOST_PP_WHILE_31_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_32, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(32, s)) # define BOOST_PP_WHILE_32_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_33, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(33, s)) # define BOOST_PP_WHILE_33_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_34, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(34, s)) # define BOOST_PP_WHILE_34_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_35, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(35, s)) # define BOOST_PP_WHILE_35_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_36, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(36, s)) # define BOOST_PP_WHILE_36_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_37, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(37, s)) # define BOOST_PP_WHILE_37_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_38, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(38, s)) # define BOOST_PP_WHILE_38_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_39, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(39, s)) # define BOOST_PP_WHILE_39_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_40, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(40, s)) # define BOOST_PP_WHILE_40_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_41, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(41, s)) # define BOOST_PP_WHILE_41_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_42, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(42, s)) # define BOOST_PP_WHILE_42_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_43, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(43, s)) # define BOOST_PP_WHILE_43_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_44, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(44, s)) # define BOOST_PP_WHILE_44_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_45, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(45, s)) # define BOOST_PP_WHILE_45_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_46, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(46, s)) # define BOOST_PP_WHILE_46_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_47, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(47, s)) # define BOOST_PP_WHILE_47_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_48, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(48, s)) # define BOOST_PP_WHILE_48_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_49, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(49, s)) # define BOOST_PP_WHILE_49_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_50, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(50, s)) # define BOOST_PP_WHILE_50_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_51, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(51, s)) # define BOOST_PP_WHILE_51_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_52, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(52, s)) # define BOOST_PP_WHILE_52_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_53, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(53, s)) # define BOOST_PP_WHILE_53_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_54, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(54, s)) # define BOOST_PP_WHILE_54_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_55, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(55, s)) # define BOOST_PP_WHILE_55_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_56, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(56, s)) # define BOOST_PP_WHILE_56_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_57, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(57, s)) # define BOOST_PP_WHILE_57_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_58, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(58, s)) # define BOOST_PP_WHILE_58_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_59, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(59, s)) # define BOOST_PP_WHILE_59_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_60, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(60, s)) # define BOOST_PP_WHILE_60_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_61, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(61, s)) # define BOOST_PP_WHILE_61_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_62, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(62, s)) # define BOOST_PP_WHILE_62_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_63, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(63, s)) # define BOOST_PP_WHILE_63_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_64, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(64, s)) # define BOOST_PP_WHILE_64_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_65, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(65, s)) # define BOOST_PP_WHILE_65_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_66, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(66, s)) # define BOOST_PP_WHILE_66_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_67, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(67, s)) # define BOOST_PP_WHILE_67_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_68, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(68, s)) # define BOOST_PP_WHILE_68_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_69, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(69, s)) # define BOOST_PP_WHILE_69_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_70, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(70, s)) # define BOOST_PP_WHILE_70_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_71, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(71, s)) # define BOOST_PP_WHILE_71_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_72, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(72, s)) # define BOOST_PP_WHILE_72_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_73, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(73, s)) # define BOOST_PP_WHILE_73_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_74, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(74, s)) # define BOOST_PP_WHILE_74_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_75, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(75, s)) # define BOOST_PP_WHILE_75_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_76, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(76, s)) # define BOOST_PP_WHILE_76_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_77, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(77, s)) # define BOOST_PP_WHILE_77_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_78, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(78, s)) # define BOOST_PP_WHILE_78_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_79, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(79, s)) # define BOOST_PP_WHILE_79_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_80, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(80, s)) # define BOOST_PP_WHILE_80_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_81, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(81, s)) # define BOOST_PP_WHILE_81_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_82, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(82, s)) # define BOOST_PP_WHILE_82_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_83, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(83, s)) # define BOOST_PP_WHILE_83_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_84, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(84, s)) # define BOOST_PP_WHILE_84_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_85, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(85, s)) # define BOOST_PP_WHILE_85_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_86, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(86, s)) # define BOOST_PP_WHILE_86_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_87, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(87, s)) # define BOOST_PP_WHILE_87_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_88, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(88, s)) # define BOOST_PP_WHILE_88_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_89, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(89, s)) # define BOOST_PP_WHILE_89_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_90, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(90, s)) # define BOOST_PP_WHILE_90_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_91, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(91, s)) # define BOOST_PP_WHILE_91_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_92, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(92, s)) # define BOOST_PP_WHILE_92_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_93, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(93, s)) # define BOOST_PP_WHILE_93_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_94, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(94, s)) # define BOOST_PP_WHILE_94_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_95, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(95, s)) # define BOOST_PP_WHILE_95_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_96, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(96, s)) # define BOOST_PP_WHILE_96_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_97, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(97, s)) # define BOOST_PP_WHILE_97_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_98, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(98, s)) # define BOOST_PP_WHILE_98_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_99, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(99, s)) # define BOOST_PP_WHILE_99_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_100, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(100, s)) # define BOOST_PP_WHILE_100_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_101, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(101, s)) # define BOOST_PP_WHILE_101_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_102, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(102, s)) # define BOOST_PP_WHILE_102_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_103, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(103, s)) # define BOOST_PP_WHILE_103_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_104, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(104, s)) # define BOOST_PP_WHILE_104_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_105, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(105, s)) # define BOOST_PP_WHILE_105_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_106, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(106, s)) # define BOOST_PP_WHILE_106_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_107, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(107, s)) # define BOOST_PP_WHILE_107_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_108, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(108, s)) # define BOOST_PP_WHILE_108_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_109, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(109, s)) # define BOOST_PP_WHILE_109_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_110, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(110, s)) # define BOOST_PP_WHILE_110_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_111, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(111, s)) # define BOOST_PP_WHILE_111_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_112, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(112, s)) # define BOOST_PP_WHILE_112_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_113, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(113, s)) # define BOOST_PP_WHILE_113_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_114, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(114, s)) # define BOOST_PP_WHILE_114_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_115, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(115, s)) # define BOOST_PP_WHILE_115_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_116, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(116, s)) # define BOOST_PP_WHILE_116_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_117, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(117, s)) # define BOOST_PP_WHILE_117_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_118, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(118, s)) # define BOOST_PP_WHILE_118_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_119, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(119, s)) # define BOOST_PP_WHILE_119_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_120, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(120, s)) # define BOOST_PP_WHILE_120_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_121, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(121, s)) # define BOOST_PP_WHILE_121_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_122, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(122, s)) # define BOOST_PP_WHILE_122_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_123, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(123, s)) # define BOOST_PP_WHILE_123_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_124, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(124, s)) # define BOOST_PP_WHILE_124_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_125, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(125, s)) # define BOOST_PP_WHILE_125_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_126, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(126, s)) # define BOOST_PP_WHILE_126_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_127, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(127, s)) # define BOOST_PP_WHILE_127_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_128, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(128, s)) # define BOOST_PP_WHILE_128_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_129, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(129, s)) # define BOOST_PP_WHILE_129_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_130, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(130, s)) # define BOOST_PP_WHILE_130_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_131, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(131, s)) # define BOOST_PP_WHILE_131_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_132, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(132, s)) # define BOOST_PP_WHILE_132_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_133, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(133, s)) # define BOOST_PP_WHILE_133_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_134, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(134, s)) # define BOOST_PP_WHILE_134_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_135, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(135, s)) # define BOOST_PP_WHILE_135_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_136, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(136, s)) # define BOOST_PP_WHILE_136_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_137, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(137, s)) # define BOOST_PP_WHILE_137_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_138, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(138, s)) # define BOOST_PP_WHILE_138_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_139, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(139, s)) # define BOOST_PP_WHILE_139_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_140, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(140, s)) # define BOOST_PP_WHILE_140_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_141, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(141, s)) # define BOOST_PP_WHILE_141_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_142, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(142, s)) # define BOOST_PP_WHILE_142_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_143, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(143, s)) # define BOOST_PP_WHILE_143_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_144, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(144, s)) # define BOOST_PP_WHILE_144_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_145, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(145, s)) # define BOOST_PP_WHILE_145_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_146, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(146, s)) # define BOOST_PP_WHILE_146_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_147, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(147, s)) # define BOOST_PP_WHILE_147_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_148, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(148, s)) # define BOOST_PP_WHILE_148_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_149, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(149, s)) # define BOOST_PP_WHILE_149_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_150, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(150, s)) # define BOOST_PP_WHILE_150_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_151, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(151, s)) # define BOOST_PP_WHILE_151_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_152, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(152, s)) # define BOOST_PP_WHILE_152_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_153, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(153, s)) # define BOOST_PP_WHILE_153_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_154, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(154, s)) # define BOOST_PP_WHILE_154_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_155, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(155, s)) # define BOOST_PP_WHILE_155_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_156, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(156, s)) # define BOOST_PP_WHILE_156_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_157, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(157, s)) # define BOOST_PP_WHILE_157_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_158, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(158, s)) # define BOOST_PP_WHILE_158_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_159, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(159, s)) # define BOOST_PP_WHILE_159_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_160, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(160, s)) # define BOOST_PP_WHILE_160_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_161, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(161, s)) # define BOOST_PP_WHILE_161_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_162, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(162, s)) # define BOOST_PP_WHILE_162_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_163, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(163, s)) # define BOOST_PP_WHILE_163_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_164, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(164, s)) # define BOOST_PP_WHILE_164_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_165, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(165, s)) # define BOOST_PP_WHILE_165_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_166, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(166, s)) # define BOOST_PP_WHILE_166_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_167, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(167, s)) # define BOOST_PP_WHILE_167_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_168, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(168, s)) # define BOOST_PP_WHILE_168_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_169, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(169, s)) # define BOOST_PP_WHILE_169_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_170, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(170, s)) # define BOOST_PP_WHILE_170_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_171, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(171, s)) # define BOOST_PP_WHILE_171_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_172, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(172, s)) # define BOOST_PP_WHILE_172_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_173, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(173, s)) # define BOOST_PP_WHILE_173_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_174, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(174, s)) # define BOOST_PP_WHILE_174_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_175, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(175, s)) # define BOOST_PP_WHILE_175_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_176, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(176, s)) # define BOOST_PP_WHILE_176_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_177, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(177, s)) # define BOOST_PP_WHILE_177_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_178, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(178, s)) # define BOOST_PP_WHILE_178_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_179, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(179, s)) # define BOOST_PP_WHILE_179_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_180, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(180, s)) # define BOOST_PP_WHILE_180_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_181, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(181, s)) # define BOOST_PP_WHILE_181_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_182, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(182, s)) # define BOOST_PP_WHILE_182_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_183, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(183, s)) # define BOOST_PP_WHILE_183_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_184, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(184, s)) # define BOOST_PP_WHILE_184_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_185, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(185, s)) # define BOOST_PP_WHILE_185_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_186, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(186, s)) # define BOOST_PP_WHILE_186_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_187, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(187, s)) # define BOOST_PP_WHILE_187_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_188, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(188, s)) # define BOOST_PP_WHILE_188_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_189, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(189, s)) # define BOOST_PP_WHILE_189_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_190, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(190, s)) # define BOOST_PP_WHILE_190_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_191, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(191, s)) # define BOOST_PP_WHILE_191_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_192, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(192, s)) # define BOOST_PP_WHILE_192_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_193, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(193, s)) # define BOOST_PP_WHILE_193_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_194, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(194, s)) # define BOOST_PP_WHILE_194_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_195, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(195, s)) # define BOOST_PP_WHILE_195_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_196, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(196, s)) # define BOOST_PP_WHILE_196_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_197, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(197, s)) # define BOOST_PP_WHILE_197_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_198, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(198, s)) # define BOOST_PP_WHILE_198_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_199, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(199, s)) # define BOOST_PP_WHILE_199_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_200, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(200, s)) # define BOOST_PP_WHILE_200_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_201, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(201, s)) # define BOOST_PP_WHILE_201_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_202, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(202, s)) # define BOOST_PP_WHILE_202_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_203, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(203, s)) # define BOOST_PP_WHILE_203_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_204, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(204, s)) # define BOOST_PP_WHILE_204_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_205, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(205, s)) # define BOOST_PP_WHILE_205_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_206, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(206, s)) # define BOOST_PP_WHILE_206_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_207, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(207, s)) # define BOOST_PP_WHILE_207_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_208, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(208, s)) # define BOOST_PP_WHILE_208_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_209, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(209, s)) # define BOOST_PP_WHILE_209_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_210, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(210, s)) # define BOOST_PP_WHILE_210_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_211, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(211, s)) # define BOOST_PP_WHILE_211_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_212, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(212, s)) # define BOOST_PP_WHILE_212_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_213, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(213, s)) # define BOOST_PP_WHILE_213_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_214, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(214, s)) # define BOOST_PP_WHILE_214_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_215, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(215, s)) # define BOOST_PP_WHILE_215_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_216, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(216, s)) # define BOOST_PP_WHILE_216_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_217, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(217, s)) # define BOOST_PP_WHILE_217_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_218, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(218, s)) # define BOOST_PP_WHILE_218_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_219, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(219, s)) # define BOOST_PP_WHILE_219_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_220, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(220, s)) # define BOOST_PP_WHILE_220_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_221, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(221, s)) # define BOOST_PP_WHILE_221_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_222, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(222, s)) # define BOOST_PP_WHILE_222_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_223, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(223, s)) # define BOOST_PP_WHILE_223_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_224, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(224, s)) # define BOOST_PP_WHILE_224_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_225, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(225, s)) # define BOOST_PP_WHILE_225_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_226, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(226, s)) # define BOOST_PP_WHILE_226_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_227, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(227, s)) # define BOOST_PP_WHILE_227_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_228, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(228, s)) # define BOOST_PP_WHILE_228_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_229, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(229, s)) # define BOOST_PP_WHILE_229_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_230, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(230, s)) # define BOOST_PP_WHILE_230_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_231, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(231, s)) # define BOOST_PP_WHILE_231_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_232, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(232, s)) # define BOOST_PP_WHILE_232_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_233, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(233, s)) # define BOOST_PP_WHILE_233_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_234, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(234, s)) # define BOOST_PP_WHILE_234_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_235, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(235, s)) # define BOOST_PP_WHILE_235_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_236, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(236, s)) # define BOOST_PP_WHILE_236_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_237, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(237, s)) # define BOOST_PP_WHILE_237_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_238, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(238, s)) # define BOOST_PP_WHILE_238_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_239, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(239, s)) # define BOOST_PP_WHILE_239_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_240, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(240, s)) # define BOOST_PP_WHILE_240_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_241, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(241, s)) # define BOOST_PP_WHILE_241_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_242, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(242, s)) # define BOOST_PP_WHILE_242_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_243, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(243, s)) # define BOOST_PP_WHILE_243_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_244, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(244, s)) # define BOOST_PP_WHILE_244_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_245, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(245, s)) # define BOOST_PP_WHILE_245_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_246, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(246, s)) # define BOOST_PP_WHILE_246_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_247, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(247, s)) # define BOOST_PP_WHILE_247_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_248, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(248, s)) # define BOOST_PP_WHILE_248_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_249, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(249, s)) # define BOOST_PP_WHILE_249_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_250, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(250, s)) # define BOOST_PP_WHILE_250_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_251, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(251, s)) # define BOOST_PP_WHILE_251_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_252, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(252, s)) # define BOOST_PP_WHILE_252_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_253, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(253, s)) # define BOOST_PP_WHILE_253_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_254, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(254, s)) # define BOOST_PP_WHILE_254_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_255, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(255, s)) # define BOOST_PP_WHILE_255_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_256, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(256, s)) # define BOOST_PP_WHILE_256_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_257, BOOST_PP_TUPLE_ELEM_3_2)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_TUPLE_ELEM_2_1)(257, s)) # # # endif ================================================ FILE: benchmarks/boost/preprocessor/control/detail/edg/while.hpp ================================================ # /* Copyright (C) 2001 # * Housemarque Oy # * http://www.housemarque.com # * # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # */ # # /* Revised by Paul Mensonides (2002) */ # # /* See http://www.boost.org for most recent version. */ # # ifndef BOOST_PREPROCESSOR_CONTROL_DETAIL_EDG_WHILE_HPP # define BOOST_PREPROCESSOR_CONTROL_DETAIL_EDG_WHILE_HPP # # include # include # # define BOOST_PP_WHILE_1(p, o, s) BOOST_PP_WHILE_1_I(p, o, s) # define BOOST_PP_WHILE_2(p, o, s) BOOST_PP_WHILE_2_I(p, o, s) # define BOOST_PP_WHILE_3(p, o, s) BOOST_PP_WHILE_3_I(p, o, s) # define BOOST_PP_WHILE_4(p, o, s) BOOST_PP_WHILE_4_I(p, o, s) # define BOOST_PP_WHILE_5(p, o, s) BOOST_PP_WHILE_5_I(p, o, s) # define BOOST_PP_WHILE_6(p, o, s) BOOST_PP_WHILE_6_I(p, o, s) # define BOOST_PP_WHILE_7(p, o, s) BOOST_PP_WHILE_7_I(p, o, s) # define BOOST_PP_WHILE_8(p, o, s) BOOST_PP_WHILE_8_I(p, o, s) # define BOOST_PP_WHILE_9(p, o, s) BOOST_PP_WHILE_9_I(p, o, s) # define BOOST_PP_WHILE_10(p, o, s) BOOST_PP_WHILE_10_I(p, o, s) # define BOOST_PP_WHILE_11(p, o, s) BOOST_PP_WHILE_11_I(p, o, s) # define BOOST_PP_WHILE_12(p, o, s) BOOST_PP_WHILE_12_I(p, o, s) # define BOOST_PP_WHILE_13(p, o, s) BOOST_PP_WHILE_13_I(p, o, s) # define BOOST_PP_WHILE_14(p, o, s) BOOST_PP_WHILE_14_I(p, o, s) # define BOOST_PP_WHILE_15(p, o, s) BOOST_PP_WHILE_15_I(p, o, s) # define BOOST_PP_WHILE_16(p, o, s) BOOST_PP_WHILE_16_I(p, o, s) # define BOOST_PP_WHILE_17(p, o, s) BOOST_PP_WHILE_17_I(p, o, s) # define BOOST_PP_WHILE_18(p, o, s) BOOST_PP_WHILE_18_I(p, o, s) # define BOOST_PP_WHILE_19(p, o, s) BOOST_PP_WHILE_19_I(p, o, s) # define BOOST_PP_WHILE_20(p, o, s) BOOST_PP_WHILE_20_I(p, o, s) # define BOOST_PP_WHILE_21(p, o, s) BOOST_PP_WHILE_21_I(p, o, s) # define BOOST_PP_WHILE_22(p, o, s) BOOST_PP_WHILE_22_I(p, o, s) # define BOOST_PP_WHILE_23(p, o, s) BOOST_PP_WHILE_23_I(p, o, s) # define BOOST_PP_WHILE_24(p, o, s) BOOST_PP_WHILE_24_I(p, o, s) # define BOOST_PP_WHILE_25(p, o, s) BOOST_PP_WHILE_25_I(p, o, s) # define BOOST_PP_WHILE_26(p, o, s) BOOST_PP_WHILE_26_I(p, o, s) # define BOOST_PP_WHILE_27(p, o, s) BOOST_PP_WHILE_27_I(p, o, s) # define BOOST_PP_WHILE_28(p, o, s) BOOST_PP_WHILE_28_I(p, o, s) # define BOOST_PP_WHILE_29(p, o, s) BOOST_PP_WHILE_29_I(p, o, s) # define BOOST_PP_WHILE_30(p, o, s) BOOST_PP_WHILE_30_I(p, o, s) # define BOOST_PP_WHILE_31(p, o, s) BOOST_PP_WHILE_31_I(p, o, s) # define BOOST_PP_WHILE_32(p, o, s) BOOST_PP_WHILE_32_I(p, o, s) # define BOOST_PP_WHILE_33(p, o, s) BOOST_PP_WHILE_33_I(p, o, s) # define BOOST_PP_WHILE_34(p, o, s) BOOST_PP_WHILE_34_I(p, o, s) # define BOOST_PP_WHILE_35(p, o, s) BOOST_PP_WHILE_35_I(p, o, s) # define BOOST_PP_WHILE_36(p, o, s) BOOST_PP_WHILE_36_I(p, o, s) # define BOOST_PP_WHILE_37(p, o, s) BOOST_PP_WHILE_37_I(p, o, s) # define BOOST_PP_WHILE_38(p, o, s) BOOST_PP_WHILE_38_I(p, o, s) # define BOOST_PP_WHILE_39(p, o, s) BOOST_PP_WHILE_39_I(p, o, s) # define BOOST_PP_WHILE_40(p, o, s) BOOST_PP_WHILE_40_I(p, o, s) # define BOOST_PP_WHILE_41(p, o, s) BOOST_PP_WHILE_41_I(p, o, s) # define BOOST_PP_WHILE_42(p, o, s) BOOST_PP_WHILE_42_I(p, o, s) # define BOOST_PP_WHILE_43(p, o, s) BOOST_PP_WHILE_43_I(p, o, s) # define BOOST_PP_WHILE_44(p, o, s) BOOST_PP_WHILE_44_I(p, o, s) # define BOOST_PP_WHILE_45(p, o, s) BOOST_PP_WHILE_45_I(p, o, s) # define BOOST_PP_WHILE_46(p, o, s) BOOST_PP_WHILE_46_I(p, o, s) # define BOOST_PP_WHILE_47(p, o, s) BOOST_PP_WHILE_47_I(p, o, s) # define BOOST_PP_WHILE_48(p, o, s) BOOST_PP_WHILE_48_I(p, o, s) # define BOOST_PP_WHILE_49(p, o, s) BOOST_PP_WHILE_49_I(p, o, s) # define BOOST_PP_WHILE_50(p, o, s) BOOST_PP_WHILE_50_I(p, o, s) # define BOOST_PP_WHILE_51(p, o, s) BOOST_PP_WHILE_51_I(p, o, s) # define BOOST_PP_WHILE_52(p, o, s) BOOST_PP_WHILE_52_I(p, o, s) # define BOOST_PP_WHILE_53(p, o, s) BOOST_PP_WHILE_53_I(p, o, s) # define BOOST_PP_WHILE_54(p, o, s) BOOST_PP_WHILE_54_I(p, o, s) # define BOOST_PP_WHILE_55(p, o, s) BOOST_PP_WHILE_55_I(p, o, s) # define BOOST_PP_WHILE_56(p, o, s) BOOST_PP_WHILE_56_I(p, o, s) # define BOOST_PP_WHILE_57(p, o, s) BOOST_PP_WHILE_57_I(p, o, s) # define BOOST_PP_WHILE_58(p, o, s) BOOST_PP_WHILE_58_I(p, o, s) # define BOOST_PP_WHILE_59(p, o, s) BOOST_PP_WHILE_59_I(p, o, s) # define BOOST_PP_WHILE_60(p, o, s) BOOST_PP_WHILE_60_I(p, o, s) # define BOOST_PP_WHILE_61(p, o, s) BOOST_PP_WHILE_61_I(p, o, s) # define BOOST_PP_WHILE_62(p, o, s) BOOST_PP_WHILE_62_I(p, o, s) # define BOOST_PP_WHILE_63(p, o, s) BOOST_PP_WHILE_63_I(p, o, s) # define BOOST_PP_WHILE_64(p, o, s) BOOST_PP_WHILE_64_I(p, o, s) # define BOOST_PP_WHILE_65(p, o, s) BOOST_PP_WHILE_65_I(p, o, s) # define BOOST_PP_WHILE_66(p, o, s) BOOST_PP_WHILE_66_I(p, o, s) # define BOOST_PP_WHILE_67(p, o, s) BOOST_PP_WHILE_67_I(p, o, s) # define BOOST_PP_WHILE_68(p, o, s) BOOST_PP_WHILE_68_I(p, o, s) # define BOOST_PP_WHILE_69(p, o, s) BOOST_PP_WHILE_69_I(p, o, s) # define BOOST_PP_WHILE_70(p, o, s) BOOST_PP_WHILE_70_I(p, o, s) # define BOOST_PP_WHILE_71(p, o, s) BOOST_PP_WHILE_71_I(p, o, s) # define BOOST_PP_WHILE_72(p, o, s) BOOST_PP_WHILE_72_I(p, o, s) # define BOOST_PP_WHILE_73(p, o, s) BOOST_PP_WHILE_73_I(p, o, s) # define BOOST_PP_WHILE_74(p, o, s) BOOST_PP_WHILE_74_I(p, o, s) # define BOOST_PP_WHILE_75(p, o, s) BOOST_PP_WHILE_75_I(p, o, s) # define BOOST_PP_WHILE_76(p, o, s) BOOST_PP_WHILE_76_I(p, o, s) # define BOOST_PP_WHILE_77(p, o, s) BOOST_PP_WHILE_77_I(p, o, s) # define BOOST_PP_WHILE_78(p, o, s) BOOST_PP_WHILE_78_I(p, o, s) # define BOOST_PP_WHILE_79(p, o, s) BOOST_PP_WHILE_79_I(p, o, s) # define BOOST_PP_WHILE_80(p, o, s) BOOST_PP_WHILE_80_I(p, o, s) # define BOOST_PP_WHILE_81(p, o, s) BOOST_PP_WHILE_81_I(p, o, s) # define BOOST_PP_WHILE_82(p, o, s) BOOST_PP_WHILE_82_I(p, o, s) # define BOOST_PP_WHILE_83(p, o, s) BOOST_PP_WHILE_83_I(p, o, s) # define BOOST_PP_WHILE_84(p, o, s) BOOST_PP_WHILE_84_I(p, o, s) # define BOOST_PP_WHILE_85(p, o, s) BOOST_PP_WHILE_85_I(p, o, s) # define BOOST_PP_WHILE_86(p, o, s) BOOST_PP_WHILE_86_I(p, o, s) # define BOOST_PP_WHILE_87(p, o, s) BOOST_PP_WHILE_87_I(p, o, s) # define BOOST_PP_WHILE_88(p, o, s) BOOST_PP_WHILE_88_I(p, o, s) # define BOOST_PP_WHILE_89(p, o, s) BOOST_PP_WHILE_89_I(p, o, s) # define BOOST_PP_WHILE_90(p, o, s) BOOST_PP_WHILE_90_I(p, o, s) # define BOOST_PP_WHILE_91(p, o, s) BOOST_PP_WHILE_91_I(p, o, s) # define BOOST_PP_WHILE_92(p, o, s) BOOST_PP_WHILE_92_I(p, o, s) # define BOOST_PP_WHILE_93(p, o, s) BOOST_PP_WHILE_93_I(p, o, s) # define BOOST_PP_WHILE_94(p, o, s) BOOST_PP_WHILE_94_I(p, o, s) # define BOOST_PP_WHILE_95(p, o, s) BOOST_PP_WHILE_95_I(p, o, s) # define BOOST_PP_WHILE_96(p, o, s) BOOST_PP_WHILE_96_I(p, o, s) # define BOOST_PP_WHILE_97(p, o, s) BOOST_PP_WHILE_97_I(p, o, s) # define BOOST_PP_WHILE_98(p, o, s) BOOST_PP_WHILE_98_I(p, o, s) # define BOOST_PP_WHILE_99(p, o, s) BOOST_PP_WHILE_99_I(p, o, s) # define BOOST_PP_WHILE_100(p, o, s) BOOST_PP_WHILE_100_I(p, o, s) # define BOOST_PP_WHILE_101(p, o, s) BOOST_PP_WHILE_101_I(p, o, s) # define BOOST_PP_WHILE_102(p, o, s) BOOST_PP_WHILE_102_I(p, o, s) # define BOOST_PP_WHILE_103(p, o, s) BOOST_PP_WHILE_103_I(p, o, s) # define BOOST_PP_WHILE_104(p, o, s) BOOST_PP_WHILE_104_I(p, o, s) # define BOOST_PP_WHILE_105(p, o, s) BOOST_PP_WHILE_105_I(p, o, s) # define BOOST_PP_WHILE_106(p, o, s) BOOST_PP_WHILE_106_I(p, o, s) # define BOOST_PP_WHILE_107(p, o, s) BOOST_PP_WHILE_107_I(p, o, s) # define BOOST_PP_WHILE_108(p, o, s) BOOST_PP_WHILE_108_I(p, o, s) # define BOOST_PP_WHILE_109(p, o, s) BOOST_PP_WHILE_109_I(p, o, s) # define BOOST_PP_WHILE_110(p, o, s) BOOST_PP_WHILE_110_I(p, o, s) # define BOOST_PP_WHILE_111(p, o, s) BOOST_PP_WHILE_111_I(p, o, s) # define BOOST_PP_WHILE_112(p, o, s) BOOST_PP_WHILE_112_I(p, o, s) # define BOOST_PP_WHILE_113(p, o, s) BOOST_PP_WHILE_113_I(p, o, s) # define BOOST_PP_WHILE_114(p, o, s) BOOST_PP_WHILE_114_I(p, o, s) # define BOOST_PP_WHILE_115(p, o, s) BOOST_PP_WHILE_115_I(p, o, s) # define BOOST_PP_WHILE_116(p, o, s) BOOST_PP_WHILE_116_I(p, o, s) # define BOOST_PP_WHILE_117(p, o, s) BOOST_PP_WHILE_117_I(p, o, s) # define BOOST_PP_WHILE_118(p, o, s) BOOST_PP_WHILE_118_I(p, o, s) # define BOOST_PP_WHILE_119(p, o, s) BOOST_PP_WHILE_119_I(p, o, s) # define BOOST_PP_WHILE_120(p, o, s) BOOST_PP_WHILE_120_I(p, o, s) # define BOOST_PP_WHILE_121(p, o, s) BOOST_PP_WHILE_121_I(p, o, s) # define BOOST_PP_WHILE_122(p, o, s) BOOST_PP_WHILE_122_I(p, o, s) # define BOOST_PP_WHILE_123(p, o, s) BOOST_PP_WHILE_123_I(p, o, s) # define BOOST_PP_WHILE_124(p, o, s) BOOST_PP_WHILE_124_I(p, o, s) # define BOOST_PP_WHILE_125(p, o, s) BOOST_PP_WHILE_125_I(p, o, s) # define BOOST_PP_WHILE_126(p, o, s) BOOST_PP_WHILE_126_I(p, o, s) # define BOOST_PP_WHILE_127(p, o, s) BOOST_PP_WHILE_127_I(p, o, s) # define BOOST_PP_WHILE_128(p, o, s) BOOST_PP_WHILE_128_I(p, o, s) # define BOOST_PP_WHILE_129(p, o, s) BOOST_PP_WHILE_129_I(p, o, s) # define BOOST_PP_WHILE_130(p, o, s) BOOST_PP_WHILE_130_I(p, o, s) # define BOOST_PP_WHILE_131(p, o, s) BOOST_PP_WHILE_131_I(p, o, s) # define BOOST_PP_WHILE_132(p, o, s) BOOST_PP_WHILE_132_I(p, o, s) # define BOOST_PP_WHILE_133(p, o, s) BOOST_PP_WHILE_133_I(p, o, s) # define BOOST_PP_WHILE_134(p, o, s) BOOST_PP_WHILE_134_I(p, o, s) # define BOOST_PP_WHILE_135(p, o, s) BOOST_PP_WHILE_135_I(p, o, s) # define BOOST_PP_WHILE_136(p, o, s) BOOST_PP_WHILE_136_I(p, o, s) # define BOOST_PP_WHILE_137(p, o, s) BOOST_PP_WHILE_137_I(p, o, s) # define BOOST_PP_WHILE_138(p, o, s) BOOST_PP_WHILE_138_I(p, o, s) # define BOOST_PP_WHILE_139(p, o, s) BOOST_PP_WHILE_139_I(p, o, s) # define BOOST_PP_WHILE_140(p, o, s) BOOST_PP_WHILE_140_I(p, o, s) # define BOOST_PP_WHILE_141(p, o, s) BOOST_PP_WHILE_141_I(p, o, s) # define BOOST_PP_WHILE_142(p, o, s) BOOST_PP_WHILE_142_I(p, o, s) # define BOOST_PP_WHILE_143(p, o, s) BOOST_PP_WHILE_143_I(p, o, s) # define BOOST_PP_WHILE_144(p, o, s) BOOST_PP_WHILE_144_I(p, o, s) # define BOOST_PP_WHILE_145(p, o, s) BOOST_PP_WHILE_145_I(p, o, s) # define BOOST_PP_WHILE_146(p, o, s) BOOST_PP_WHILE_146_I(p, o, s) # define BOOST_PP_WHILE_147(p, o, s) BOOST_PP_WHILE_147_I(p, o, s) # define BOOST_PP_WHILE_148(p, o, s) BOOST_PP_WHILE_148_I(p, o, s) # define BOOST_PP_WHILE_149(p, o, s) BOOST_PP_WHILE_149_I(p, o, s) # define BOOST_PP_WHILE_150(p, o, s) BOOST_PP_WHILE_150_I(p, o, s) # define BOOST_PP_WHILE_151(p, o, s) BOOST_PP_WHILE_151_I(p, o, s) # define BOOST_PP_WHILE_152(p, o, s) BOOST_PP_WHILE_152_I(p, o, s) # define BOOST_PP_WHILE_153(p, o, s) BOOST_PP_WHILE_153_I(p, o, s) # define BOOST_PP_WHILE_154(p, o, s) BOOST_PP_WHILE_154_I(p, o, s) # define BOOST_PP_WHILE_155(p, o, s) BOOST_PP_WHILE_155_I(p, o, s) # define BOOST_PP_WHILE_156(p, o, s) BOOST_PP_WHILE_156_I(p, o, s) # define BOOST_PP_WHILE_157(p, o, s) BOOST_PP_WHILE_157_I(p, o, s) # define BOOST_PP_WHILE_158(p, o, s) BOOST_PP_WHILE_158_I(p, o, s) # define BOOST_PP_WHILE_159(p, o, s) BOOST_PP_WHILE_159_I(p, o, s) # define BOOST_PP_WHILE_160(p, o, s) BOOST_PP_WHILE_160_I(p, o, s) # define BOOST_PP_WHILE_161(p, o, s) BOOST_PP_WHILE_161_I(p, o, s) # define BOOST_PP_WHILE_162(p, o, s) BOOST_PP_WHILE_162_I(p, o, s) # define BOOST_PP_WHILE_163(p, o, s) BOOST_PP_WHILE_163_I(p, o, s) # define BOOST_PP_WHILE_164(p, o, s) BOOST_PP_WHILE_164_I(p, o, s) # define BOOST_PP_WHILE_165(p, o, s) BOOST_PP_WHILE_165_I(p, o, s) # define BOOST_PP_WHILE_166(p, o, s) BOOST_PP_WHILE_166_I(p, o, s) # define BOOST_PP_WHILE_167(p, o, s) BOOST_PP_WHILE_167_I(p, o, s) # define BOOST_PP_WHILE_168(p, o, s) BOOST_PP_WHILE_168_I(p, o, s) # define BOOST_PP_WHILE_169(p, o, s) BOOST_PP_WHILE_169_I(p, o, s) # define BOOST_PP_WHILE_170(p, o, s) BOOST_PP_WHILE_170_I(p, o, s) # define BOOST_PP_WHILE_171(p, o, s) BOOST_PP_WHILE_171_I(p, o, s) # define BOOST_PP_WHILE_172(p, o, s) BOOST_PP_WHILE_172_I(p, o, s) # define BOOST_PP_WHILE_173(p, o, s) BOOST_PP_WHILE_173_I(p, o, s) # define BOOST_PP_WHILE_174(p, o, s) BOOST_PP_WHILE_174_I(p, o, s) # define BOOST_PP_WHILE_175(p, o, s) BOOST_PP_WHILE_175_I(p, o, s) # define BOOST_PP_WHILE_176(p, o, s) BOOST_PP_WHILE_176_I(p, o, s) # define BOOST_PP_WHILE_177(p, o, s) BOOST_PP_WHILE_177_I(p, o, s) # define BOOST_PP_WHILE_178(p, o, s) BOOST_PP_WHILE_178_I(p, o, s) # define BOOST_PP_WHILE_179(p, o, s) BOOST_PP_WHILE_179_I(p, o, s) # define BOOST_PP_WHILE_180(p, o, s) BOOST_PP_WHILE_180_I(p, o, s) # define BOOST_PP_WHILE_181(p, o, s) BOOST_PP_WHILE_181_I(p, o, s) # define BOOST_PP_WHILE_182(p, o, s) BOOST_PP_WHILE_182_I(p, o, s) # define BOOST_PP_WHILE_183(p, o, s) BOOST_PP_WHILE_183_I(p, o, s) # define BOOST_PP_WHILE_184(p, o, s) BOOST_PP_WHILE_184_I(p, o, s) # define BOOST_PP_WHILE_185(p, o, s) BOOST_PP_WHILE_185_I(p, o, s) # define BOOST_PP_WHILE_186(p, o, s) BOOST_PP_WHILE_186_I(p, o, s) # define BOOST_PP_WHILE_187(p, o, s) BOOST_PP_WHILE_187_I(p, o, s) # define BOOST_PP_WHILE_188(p, o, s) BOOST_PP_WHILE_188_I(p, o, s) # define BOOST_PP_WHILE_189(p, o, s) BOOST_PP_WHILE_189_I(p, o, s) # define BOOST_PP_WHILE_190(p, o, s) BOOST_PP_WHILE_190_I(p, o, s) # define BOOST_PP_WHILE_191(p, o, s) BOOST_PP_WHILE_191_I(p, o, s) # define BOOST_PP_WHILE_192(p, o, s) BOOST_PP_WHILE_192_I(p, o, s) # define BOOST_PP_WHILE_193(p, o, s) BOOST_PP_WHILE_193_I(p, o, s) # define BOOST_PP_WHILE_194(p, o, s) BOOST_PP_WHILE_194_I(p, o, s) # define BOOST_PP_WHILE_195(p, o, s) BOOST_PP_WHILE_195_I(p, o, s) # define BOOST_PP_WHILE_196(p, o, s) BOOST_PP_WHILE_196_I(p, o, s) # define BOOST_PP_WHILE_197(p, o, s) BOOST_PP_WHILE_197_I(p, o, s) # define BOOST_PP_WHILE_198(p, o, s) BOOST_PP_WHILE_198_I(p, o, s) # define BOOST_PP_WHILE_199(p, o, s) BOOST_PP_WHILE_199_I(p, o, s) # define BOOST_PP_WHILE_200(p, o, s) BOOST_PP_WHILE_200_I(p, o, s) # define BOOST_PP_WHILE_201(p, o, s) BOOST_PP_WHILE_201_I(p, o, s) # define BOOST_PP_WHILE_202(p, o, s) BOOST_PP_WHILE_202_I(p, o, s) # define BOOST_PP_WHILE_203(p, o, s) BOOST_PP_WHILE_203_I(p, o, s) # define BOOST_PP_WHILE_204(p, o, s) BOOST_PP_WHILE_204_I(p, o, s) # define BOOST_PP_WHILE_205(p, o, s) BOOST_PP_WHILE_205_I(p, o, s) # define BOOST_PP_WHILE_206(p, o, s) BOOST_PP_WHILE_206_I(p, o, s) # define BOOST_PP_WHILE_207(p, o, s) BOOST_PP_WHILE_207_I(p, o, s) # define BOOST_PP_WHILE_208(p, o, s) BOOST_PP_WHILE_208_I(p, o, s) # define BOOST_PP_WHILE_209(p, o, s) BOOST_PP_WHILE_209_I(p, o, s) # define BOOST_PP_WHILE_210(p, o, s) BOOST_PP_WHILE_210_I(p, o, s) # define BOOST_PP_WHILE_211(p, o, s) BOOST_PP_WHILE_211_I(p, o, s) # define BOOST_PP_WHILE_212(p, o, s) BOOST_PP_WHILE_212_I(p, o, s) # define BOOST_PP_WHILE_213(p, o, s) BOOST_PP_WHILE_213_I(p, o, s) # define BOOST_PP_WHILE_214(p, o, s) BOOST_PP_WHILE_214_I(p, o, s) # define BOOST_PP_WHILE_215(p, o, s) BOOST_PP_WHILE_215_I(p, o, s) # define BOOST_PP_WHILE_216(p, o, s) BOOST_PP_WHILE_216_I(p, o, s) # define BOOST_PP_WHILE_217(p, o, s) BOOST_PP_WHILE_217_I(p, o, s) # define BOOST_PP_WHILE_218(p, o, s) BOOST_PP_WHILE_218_I(p, o, s) # define BOOST_PP_WHILE_219(p, o, s) BOOST_PP_WHILE_219_I(p, o, s) # define BOOST_PP_WHILE_220(p, o, s) BOOST_PP_WHILE_220_I(p, o, s) # define BOOST_PP_WHILE_221(p, o, s) BOOST_PP_WHILE_221_I(p, o, s) # define BOOST_PP_WHILE_222(p, o, s) BOOST_PP_WHILE_222_I(p, o, s) # define BOOST_PP_WHILE_223(p, o, s) BOOST_PP_WHILE_223_I(p, o, s) # define BOOST_PP_WHILE_224(p, o, s) BOOST_PP_WHILE_224_I(p, o, s) # define BOOST_PP_WHILE_225(p, o, s) BOOST_PP_WHILE_225_I(p, o, s) # define BOOST_PP_WHILE_226(p, o, s) BOOST_PP_WHILE_226_I(p, o, s) # define BOOST_PP_WHILE_227(p, o, s) BOOST_PP_WHILE_227_I(p, o, s) # define BOOST_PP_WHILE_228(p, o, s) BOOST_PP_WHILE_228_I(p, o, s) # define BOOST_PP_WHILE_229(p, o, s) BOOST_PP_WHILE_229_I(p, o, s) # define BOOST_PP_WHILE_230(p, o, s) BOOST_PP_WHILE_230_I(p, o, s) # define BOOST_PP_WHILE_231(p, o, s) BOOST_PP_WHILE_231_I(p, o, s) # define BOOST_PP_WHILE_232(p, o, s) BOOST_PP_WHILE_232_I(p, o, s) # define BOOST_PP_WHILE_233(p, o, s) BOOST_PP_WHILE_233_I(p, o, s) # define BOOST_PP_WHILE_234(p, o, s) BOOST_PP_WHILE_234_I(p, o, s) # define BOOST_PP_WHILE_235(p, o, s) BOOST_PP_WHILE_235_I(p, o, s) # define BOOST_PP_WHILE_236(p, o, s) BOOST_PP_WHILE_236_I(p, o, s) # define BOOST_PP_WHILE_237(p, o, s) BOOST_PP_WHILE_237_I(p, o, s) # define BOOST_PP_WHILE_238(p, o, s) BOOST_PP_WHILE_238_I(p, o, s) # define BOOST_PP_WHILE_239(p, o, s) BOOST_PP_WHILE_239_I(p, o, s) # define BOOST_PP_WHILE_240(p, o, s) BOOST_PP_WHILE_240_I(p, o, s) # define BOOST_PP_WHILE_241(p, o, s) BOOST_PP_WHILE_241_I(p, o, s) # define BOOST_PP_WHILE_242(p, o, s) BOOST_PP_WHILE_242_I(p, o, s) # define BOOST_PP_WHILE_243(p, o, s) BOOST_PP_WHILE_243_I(p, o, s) # define BOOST_PP_WHILE_244(p, o, s) BOOST_PP_WHILE_244_I(p, o, s) # define BOOST_PP_WHILE_245(p, o, s) BOOST_PP_WHILE_245_I(p, o, s) # define BOOST_PP_WHILE_246(p, o, s) BOOST_PP_WHILE_246_I(p, o, s) # define BOOST_PP_WHILE_247(p, o, s) BOOST_PP_WHILE_247_I(p, o, s) # define BOOST_PP_WHILE_248(p, o, s) BOOST_PP_WHILE_248_I(p, o, s) # define BOOST_PP_WHILE_249(p, o, s) BOOST_PP_WHILE_249_I(p, o, s) # define BOOST_PP_WHILE_250(p, o, s) BOOST_PP_WHILE_250_I(p, o, s) # define BOOST_PP_WHILE_251(p, o, s) BOOST_PP_WHILE_251_I(p, o, s) # define BOOST_PP_WHILE_252(p, o, s) BOOST_PP_WHILE_252_I(p, o, s) # define BOOST_PP_WHILE_253(p, o, s) BOOST_PP_WHILE_253_I(p, o, s) # define BOOST_PP_WHILE_254(p, o, s) BOOST_PP_WHILE_254_I(p, o, s) # define BOOST_PP_WHILE_255(p, o, s) BOOST_PP_WHILE_255_I(p, o, s) # define BOOST_PP_WHILE_256(p, o, s) BOOST_PP_WHILE_256_I(p, o, s) # # define BOOST_PP_WHILE_1_I(p, o, s) BOOST_PP_IF(p(2, s), BOOST_PP_WHILE_2, s BOOST_PP_TUPLE_EAT_3)(p, o, o(2, s)) # define BOOST_PP_WHILE_2_I(p, o, s) BOOST_PP_IF(p(3, s), BOOST_PP_WHILE_3, s BOOST_PP_TUPLE_EAT_3)(p, o, o(3, s)) # define BOOST_PP_WHILE_3_I(p, o, s) BOOST_PP_IF(p(4, s), BOOST_PP_WHILE_4, s BOOST_PP_TUPLE_EAT_3)(p, o, o(4, s)) # define BOOST_PP_WHILE_4_I(p, o, s) BOOST_PP_IF(p(5, s), BOOST_PP_WHILE_5, s BOOST_PP_TUPLE_EAT_3)(p, o, o(5, s)) # define BOOST_PP_WHILE_5_I(p, o, s) BOOST_PP_IF(p(6, s), BOOST_PP_WHILE_6, s BOOST_PP_TUPLE_EAT_3)(p, o, o(6, s)) # define BOOST_PP_WHILE_6_I(p, o, s) BOOST_PP_IF(p(7, s), BOOST_PP_WHILE_7, s BOOST_PP_TUPLE_EAT_3)(p, o, o(7, s)) # define BOOST_PP_WHILE_7_I(p, o, s) BOOST_PP_IF(p(8, s), BOOST_PP_WHILE_8, s BOOST_PP_TUPLE_EAT_3)(p, o, o(8, s)) # define BOOST_PP_WHILE_8_I(p, o, s) BOOST_PP_IF(p(9, s), BOOST_PP_WHILE_9, s BOOST_PP_TUPLE_EAT_3)(p, o, o(9, s)) # define BOOST_PP_WHILE_9_I(p, o, s) BOOST_PP_IF(p(10, s), BOOST_PP_WHILE_10, s BOOST_PP_TUPLE_EAT_3)(p, o, o(10, s)) # define BOOST_PP_WHILE_10_I(p, o, s) BOOST_PP_IF(p(11, s), BOOST_PP_WHILE_11, s BOOST_PP_TUPLE_EAT_3)(p, o, o(11, s)) # define BOOST_PP_WHILE_11_I(p, o, s) BOOST_PP_IF(p(12, s), BOOST_PP_WHILE_12, s BOOST_PP_TUPLE_EAT_3)(p, o, o(12, s)) # define BOOST_PP_WHILE_12_I(p, o, s) BOOST_PP_IF(p(13, s), BOOST_PP_WHILE_13, s BOOST_PP_TUPLE_EAT_3)(p, o, o(13, s)) # define BOOST_PP_WHILE_13_I(p, o, s) BOOST_PP_IF(p(14, s), BOOST_PP_WHILE_14, s BOOST_PP_TUPLE_EAT_3)(p, o, o(14, s)) # define BOOST_PP_WHILE_14_I(p, o, s) BOOST_PP_IF(p(15, s), BOOST_PP_WHILE_15, s BOOST_PP_TUPLE_EAT_3)(p, o, o(15, s)) # define BOOST_PP_WHILE_15_I(p, o, s) BOOST_PP_IF(p(16, s), BOOST_PP_WHILE_16, s BOOST_PP_TUPLE_EAT_3)(p, o, o(16, s)) # define BOOST_PP_WHILE_16_I(p, o, s) BOOST_PP_IF(p(17, s), BOOST_PP_WHILE_17, s BOOST_PP_TUPLE_EAT_3)(p, o, o(17, s)) # define BOOST_PP_WHILE_17_I(p, o, s) BOOST_PP_IF(p(18, s), BOOST_PP_WHILE_18, s BOOST_PP_TUPLE_EAT_3)(p, o, o(18, s)) # define BOOST_PP_WHILE_18_I(p, o, s) BOOST_PP_IF(p(19, s), BOOST_PP_WHILE_19, s BOOST_PP_TUPLE_EAT_3)(p, o, o(19, s)) # define BOOST_PP_WHILE_19_I(p, o, s) BOOST_PP_IF(p(20, s), BOOST_PP_WHILE_20, s BOOST_PP_TUPLE_EAT_3)(p, o, o(20, s)) # define BOOST_PP_WHILE_20_I(p, o, s) BOOST_PP_IF(p(21, s), BOOST_PP_WHILE_21, s BOOST_PP_TUPLE_EAT_3)(p, o, o(21, s)) # define BOOST_PP_WHILE_21_I(p, o, s) BOOST_PP_IF(p(22, s), BOOST_PP_WHILE_22, s BOOST_PP_TUPLE_EAT_3)(p, o, o(22, s)) # define BOOST_PP_WHILE_22_I(p, o, s) BOOST_PP_IF(p(23, s), BOOST_PP_WHILE_23, s BOOST_PP_TUPLE_EAT_3)(p, o, o(23, s)) # define BOOST_PP_WHILE_23_I(p, o, s) BOOST_PP_IF(p(24, s), BOOST_PP_WHILE_24, s BOOST_PP_TUPLE_EAT_3)(p, o, o(24, s)) # define BOOST_PP_WHILE_24_I(p, o, s) BOOST_PP_IF(p(25, s), BOOST_PP_WHILE_25, s BOOST_PP_TUPLE_EAT_3)(p, o, o(25, s)) # define BOOST_PP_WHILE_25_I(p, o, s) BOOST_PP_IF(p(26, s), BOOST_PP_WHILE_26, s BOOST_PP_TUPLE_EAT_3)(p, o, o(26, s)) # define BOOST_PP_WHILE_26_I(p, o, s) BOOST_PP_IF(p(27, s), BOOST_PP_WHILE_27, s BOOST_PP_TUPLE_EAT_3)(p, o, o(27, s)) # define BOOST_PP_WHILE_27_I(p, o, s) BOOST_PP_IF(p(28, s), BOOST_PP_WHILE_28, s BOOST_PP_TUPLE_EAT_3)(p, o, o(28, s)) # define BOOST_PP_WHILE_28_I(p, o, s) BOOST_PP_IF(p(29, s), BOOST_PP_WHILE_29, s BOOST_PP_TUPLE_EAT_3)(p, o, o(29, s)) # define BOOST_PP_WHILE_29_I(p, o, s) BOOST_PP_IF(p(30, s), BOOST_PP_WHILE_30, s BOOST_PP_TUPLE_EAT_3)(p, o, o(30, s)) # define BOOST_PP_WHILE_30_I(p, o, s) BOOST_PP_IF(p(31, s), BOOST_PP_WHILE_31, s BOOST_PP_TUPLE_EAT_3)(p, o, o(31, s)) # define BOOST_PP_WHILE_31_I(p, o, s) BOOST_PP_IF(p(32, s), BOOST_PP_WHILE_32, s BOOST_PP_TUPLE_EAT_3)(p, o, o(32, s)) # define BOOST_PP_WHILE_32_I(p, o, s) BOOST_PP_IF(p(33, s), BOOST_PP_WHILE_33, s BOOST_PP_TUPLE_EAT_3)(p, o, o(33, s)) # define BOOST_PP_WHILE_33_I(p, o, s) BOOST_PP_IF(p(34, s), BOOST_PP_WHILE_34, s BOOST_PP_TUPLE_EAT_3)(p, o, o(34, s)) # define BOOST_PP_WHILE_34_I(p, o, s) BOOST_PP_IF(p(35, s), BOOST_PP_WHILE_35, s BOOST_PP_TUPLE_EAT_3)(p, o, o(35, s)) # define BOOST_PP_WHILE_35_I(p, o, s) BOOST_PP_IF(p(36, s), BOOST_PP_WHILE_36, s BOOST_PP_TUPLE_EAT_3)(p, o, o(36, s)) # define BOOST_PP_WHILE_36_I(p, o, s) BOOST_PP_IF(p(37, s), BOOST_PP_WHILE_37, s BOOST_PP_TUPLE_EAT_3)(p, o, o(37, s)) # define BOOST_PP_WHILE_37_I(p, o, s) BOOST_PP_IF(p(38, s), BOOST_PP_WHILE_38, s BOOST_PP_TUPLE_EAT_3)(p, o, o(38, s)) # define BOOST_PP_WHILE_38_I(p, o, s) BOOST_PP_IF(p(39, s), BOOST_PP_WHILE_39, s BOOST_PP_TUPLE_EAT_3)(p, o, o(39, s)) # define BOOST_PP_WHILE_39_I(p, o, s) BOOST_PP_IF(p(40, s), BOOST_PP_WHILE_40, s BOOST_PP_TUPLE_EAT_3)(p, o, o(40, s)) # define BOOST_PP_WHILE_40_I(p, o, s) BOOST_PP_IF(p(41, s), BOOST_PP_WHILE_41, s BOOST_PP_TUPLE_EAT_3)(p, o, o(41, s)) # define BOOST_PP_WHILE_41_I(p, o, s) BOOST_PP_IF(p(42, s), BOOST_PP_WHILE_42, s BOOST_PP_TUPLE_EAT_3)(p, o, o(42, s)) # define BOOST_PP_WHILE_42_I(p, o, s) BOOST_PP_IF(p(43, s), BOOST_PP_WHILE_43, s BOOST_PP_TUPLE_EAT_3)(p, o, o(43, s)) # define BOOST_PP_WHILE_43_I(p, o, s) BOOST_PP_IF(p(44, s), BOOST_PP_WHILE_44, s BOOST_PP_TUPLE_EAT_3)(p, o, o(44, s)) # define BOOST_PP_WHILE_44_I(p, o, s) BOOST_PP_IF(p(45, s), BOOST_PP_WHILE_45, s BOOST_PP_TUPLE_EAT_3)(p, o, o(45, s)) # define BOOST_PP_WHILE_45_I(p, o, s) BOOST_PP_IF(p(46, s), BOOST_PP_WHILE_46, s BOOST_PP_TUPLE_EAT_3)(p, o, o(46, s)) # define BOOST_PP_WHILE_46_I(p, o, s) BOOST_PP_IF(p(47, s), BOOST_PP_WHILE_47, s BOOST_PP_TUPLE_EAT_3)(p, o, o(47, s)) # define BOOST_PP_WHILE_47_I(p, o, s) BOOST_PP_IF(p(48, s), BOOST_PP_WHILE_48, s BOOST_PP_TUPLE_EAT_3)(p, o, o(48, s)) # define BOOST_PP_WHILE_48_I(p, o, s) BOOST_PP_IF(p(49, s), BOOST_PP_WHILE_49, s BOOST_PP_TUPLE_EAT_3)(p, o, o(49, s)) # define BOOST_PP_WHILE_49_I(p, o, s) BOOST_PP_IF(p(50, s), BOOST_PP_WHILE_50, s BOOST_PP_TUPLE_EAT_3)(p, o, o(50, s)) # define BOOST_PP_WHILE_50_I(p, o, s) BOOST_PP_IF(p(51, s), BOOST_PP_WHILE_51, s BOOST_PP_TUPLE_EAT_3)(p, o, o(51, s)) # define BOOST_PP_WHILE_51_I(p, o, s) BOOST_PP_IF(p(52, s), BOOST_PP_WHILE_52, s BOOST_PP_TUPLE_EAT_3)(p, o, o(52, s)) # define BOOST_PP_WHILE_52_I(p, o, s) BOOST_PP_IF(p(53, s), BOOST_PP_WHILE_53, s BOOST_PP_TUPLE_EAT_3)(p, o, o(53, s)) # define BOOST_PP_WHILE_53_I(p, o, s) BOOST_PP_IF(p(54, s), BOOST_PP_WHILE_54, s BOOST_PP_TUPLE_EAT_3)(p, o, o(54, s)) # define BOOST_PP_WHILE_54_I(p, o, s) BOOST_PP_IF(p(55, s), BOOST_PP_WHILE_55, s BOOST_PP_TUPLE_EAT_3)(p, o, o(55, s)) # define BOOST_PP_WHILE_55_I(p, o, s) BOOST_PP_IF(p(56, s), BOOST_PP_WHILE_56, s BOOST_PP_TUPLE_EAT_3)(p, o, o(56, s)) # define BOOST_PP_WHILE_56_I(p, o, s) BOOST_PP_IF(p(57, s), BOOST_PP_WHILE_57, s BOOST_PP_TUPLE_EAT_3)(p, o, o(57, s)) # define BOOST_PP_WHILE_57_I(p, o, s) BOOST_PP_IF(p(58, s), BOOST_PP_WHILE_58, s BOOST_PP_TUPLE_EAT_3)(p, o, o(58, s)) # define BOOST_PP_WHILE_58_I(p, o, s) BOOST_PP_IF(p(59, s), BOOST_PP_WHILE_59, s BOOST_PP_TUPLE_EAT_3)(p, o, o(59, s)) # define BOOST_PP_WHILE_59_I(p, o, s) BOOST_PP_IF(p(60, s), BOOST_PP_WHILE_60, s BOOST_PP_TUPLE_EAT_3)(p, o, o(60, s)) # define BOOST_PP_WHILE_60_I(p, o, s) BOOST_PP_IF(p(61, s), BOOST_PP_WHILE_61, s BOOST_PP_TUPLE_EAT_3)(p, o, o(61, s)) # define BOOST_PP_WHILE_61_I(p, o, s) BOOST_PP_IF(p(62, s), BOOST_PP_WHILE_62, s BOOST_PP_TUPLE_EAT_3)(p, o, o(62, s)) # define BOOST_PP_WHILE_62_I(p, o, s) BOOST_PP_IF(p(63, s), BOOST_PP_WHILE_63, s BOOST_PP_TUPLE_EAT_3)(p, o, o(63, s)) # define BOOST_PP_WHILE_63_I(p, o, s) BOOST_PP_IF(p(64, s), BOOST_PP_WHILE_64, s BOOST_PP_TUPLE_EAT_3)(p, o, o(64, s)) # define BOOST_PP_WHILE_64_I(p, o, s) BOOST_PP_IF(p(65, s), BOOST_PP_WHILE_65, s BOOST_PP_TUPLE_EAT_3)(p, o, o(65, s)) # define BOOST_PP_WHILE_65_I(p, o, s) BOOST_PP_IF(p(66, s), BOOST_PP_WHILE_66, s BOOST_PP_TUPLE_EAT_3)(p, o, o(66, s)) # define BOOST_PP_WHILE_66_I(p, o, s) BOOST_PP_IF(p(67, s), BOOST_PP_WHILE_67, s BOOST_PP_TUPLE_EAT_3)(p, o, o(67, s)) # define BOOST_PP_WHILE_67_I(p, o, s) BOOST_PP_IF(p(68, s), BOOST_PP_WHILE_68, s BOOST_PP_TUPLE_EAT_3)(p, o, o(68, s)) # define BOOST_PP_WHILE_68_I(p, o, s) BOOST_PP_IF(p(69, s), BOOST_PP_WHILE_69, s BOOST_PP_TUPLE_EAT_3)(p, o, o(69, s)) # define BOOST_PP_WHILE_69_I(p, o, s) BOOST_PP_IF(p(70, s), BOOST_PP_WHILE_70, s BOOST_PP_TUPLE_EAT_3)(p, o, o(70, s)) # define BOOST_PP_WHILE_70_I(p, o, s) BOOST_PP_IF(p(71, s), BOOST_PP_WHILE_71, s BOOST_PP_TUPLE_EAT_3)(p, o, o(71, s)) # define BOOST_PP_WHILE_71_I(p, o, s) BOOST_PP_IF(p(72, s), BOOST_PP_WHILE_72, s BOOST_PP_TUPLE_EAT_3)(p, o, o(72, s)) # define BOOST_PP_WHILE_72_I(p, o, s) BOOST_PP_IF(p(73, s), BOOST_PP_WHILE_73, s BOOST_PP_TUPLE_EAT_3)(p, o, o(73, s)) # define BOOST_PP_WHILE_73_I(p, o, s) BOOST_PP_IF(p(74, s), BOOST_PP_WHILE_74, s BOOST_PP_TUPLE_EAT_3)(p, o, o(74, s)) # define BOOST_PP_WHILE_74_I(p, o, s) BOOST_PP_IF(p(75, s), BOOST_PP_WHILE_75, s BOOST_PP_TUPLE_EAT_3)(p, o, o(75, s)) # define BOOST_PP_WHILE_75_I(p, o, s) BOOST_PP_IF(p(76, s), BOOST_PP_WHILE_76, s BOOST_PP_TUPLE_EAT_3)(p, o, o(76, s)) # define BOOST_PP_WHILE_76_I(p, o, s) BOOST_PP_IF(p(77, s), BOOST_PP_WHILE_77, s BOOST_PP_TUPLE_EAT_3)(p, o, o(77, s)) # define BOOST_PP_WHILE_77_I(p, o, s) BOOST_PP_IF(p(78, s), BOOST_PP_WHILE_78, s BOOST_PP_TUPLE_EAT_3)(p, o, o(78, s)) # define BOOST_PP_WHILE_78_I(p, o, s) BOOST_PP_IF(p(79, s), BOOST_PP_WHILE_79, s BOOST_PP_TUPLE_EAT_3)(p, o, o(79, s)) # define BOOST_PP_WHILE_79_I(p, o, s) BOOST_PP_IF(p(80, s), BOOST_PP_WHILE_80, s BOOST_PP_TUPLE_EAT_3)(p, o, o(80, s)) # define BOOST_PP_WHILE_80_I(p, o, s) BOOST_PP_IF(p(81, s), BOOST_PP_WHILE_81, s BOOST_PP_TUPLE_EAT_3)(p, o, o(81, s)) # define BOOST_PP_WHILE_81_I(p, o, s) BOOST_PP_IF(p(82, s), BOOST_PP_WHILE_82, s BOOST_PP_TUPLE_EAT_3)(p, o, o(82, s)) # define BOOST_PP_WHILE_82_I(p, o, s) BOOST_PP_IF(p(83, s), BOOST_PP_WHILE_83, s BOOST_PP_TUPLE_EAT_3)(p, o, o(83, s)) # define BOOST_PP_WHILE_83_I(p, o, s) BOOST_PP_IF(p(84, s), BOOST_PP_WHILE_84, s BOOST_PP_TUPLE_EAT_3)(p, o, o(84, s)) # define BOOST_PP_WHILE_84_I(p, o, s) BOOST_PP_IF(p(85, s), BOOST_PP_WHILE_85, s BOOST_PP_TUPLE_EAT_3)(p, o, o(85, s)) # define BOOST_PP_WHILE_85_I(p, o, s) BOOST_PP_IF(p(86, s), BOOST_PP_WHILE_86, s BOOST_PP_TUPLE_EAT_3)(p, o, o(86, s)) # define BOOST_PP_WHILE_86_I(p, o, s) BOOST_PP_IF(p(87, s), BOOST_PP_WHILE_87, s BOOST_PP_TUPLE_EAT_3)(p, o, o(87, s)) # define BOOST_PP_WHILE_87_I(p, o, s) BOOST_PP_IF(p(88, s), BOOST_PP_WHILE_88, s BOOST_PP_TUPLE_EAT_3)(p, o, o(88, s)) # define BOOST_PP_WHILE_88_I(p, o, s) BOOST_PP_IF(p(89, s), BOOST_PP_WHILE_89, s BOOST_PP_TUPLE_EAT_3)(p, o, o(89, s)) # define BOOST_PP_WHILE_89_I(p, o, s) BOOST_PP_IF(p(90, s), BOOST_PP_WHILE_90, s BOOST_PP_TUPLE_EAT_3)(p, o, o(90, s)) # define BOOST_PP_WHILE_90_I(p, o, s) BOOST_PP_IF(p(91, s), BOOST_PP_WHILE_91, s BOOST_PP_TUPLE_EAT_3)(p, o, o(91, s)) # define BOOST_PP_WHILE_91_I(p, o, s) BOOST_PP_IF(p(92, s), BOOST_PP_WHILE_92, s BOOST_PP_TUPLE_EAT_3)(p, o, o(92, s)) # define BOOST_PP_WHILE_92_I(p, o, s) BOOST_PP_IF(p(93, s), BOOST_PP_WHILE_93, s BOOST_PP_TUPLE_EAT_3)(p, o, o(93, s)) # define BOOST_PP_WHILE_93_I(p, o, s) BOOST_PP_IF(p(94, s), BOOST_PP_WHILE_94, s BOOST_PP_TUPLE_EAT_3)(p, o, o(94, s)) # define BOOST_PP_WHILE_94_I(p, o, s) BOOST_PP_IF(p(95, s), BOOST_PP_WHILE_95, s BOOST_PP_TUPLE_EAT_3)(p, o, o(95, s)) # define BOOST_PP_WHILE_95_I(p, o, s) BOOST_PP_IF(p(96, s), BOOST_PP_WHILE_96, s BOOST_PP_TUPLE_EAT_3)(p, o, o(96, s)) # define BOOST_PP_WHILE_96_I(p, o, s) BOOST_PP_IF(p(97, s), BOOST_PP_WHILE_97, s BOOST_PP_TUPLE_EAT_3)(p, o, o(97, s)) # define BOOST_PP_WHILE_97_I(p, o, s) BOOST_PP_IF(p(98, s), BOOST_PP_WHILE_98, s BOOST_PP_TUPLE_EAT_3)(p, o, o(98, s)) # define BOOST_PP_WHILE_98_I(p, o, s) BOOST_PP_IF(p(99, s), BOOST_PP_WHILE_99, s BOOST_PP_TUPLE_EAT_3)(p, o, o(99, s)) # define BOOST_PP_WHILE_99_I(p, o, s) BOOST_PP_IF(p(100, s), BOOST_PP_WHILE_100, s BOOST_PP_TUPLE_EAT_3)(p, o, o(100, s)) # define BOOST_PP_WHILE_100_I(p, o, s) BOOST_PP_IF(p(101, s), BOOST_PP_WHILE_101, s BOOST_PP_TUPLE_EAT_3)(p, o, o(101, s)) # define BOOST_PP_WHILE_101_I(p, o, s) BOOST_PP_IF(p(102, s), BOOST_PP_WHILE_102, s BOOST_PP_TUPLE_EAT_3)(p, o, o(102, s)) # define BOOST_PP_WHILE_102_I(p, o, s) BOOST_PP_IF(p(103, s), BOOST_PP_WHILE_103, s BOOST_PP_TUPLE_EAT_3)(p, o, o(103, s)) # define BOOST_PP_WHILE_103_I(p, o, s) BOOST_PP_IF(p(104, s), BOOST_PP_WHILE_104, s BOOST_PP_TUPLE_EAT_3)(p, o, o(104, s)) # define BOOST_PP_WHILE_104_I(p, o, s) BOOST_PP_IF(p(105, s), BOOST_PP_WHILE_105, s BOOST_PP_TUPLE_EAT_3)(p, o, o(105, s)) # define BOOST_PP_WHILE_105_I(p, o, s) BOOST_PP_IF(p(106, s), BOOST_PP_WHILE_106, s BOOST_PP_TUPLE_EAT_3)(p, o, o(106, s)) # define BOOST_PP_WHILE_106_I(p, o, s) BOOST_PP_IF(p(107, s), BOOST_PP_WHILE_107, s BOOST_PP_TUPLE_EAT_3)(p, o, o(107, s)) # define BOOST_PP_WHILE_107_I(p, o, s) BOOST_PP_IF(p(108, s), BOOST_PP_WHILE_108, s BOOST_PP_TUPLE_EAT_3)(p, o, o(108, s)) # define BOOST_PP_WHILE_108_I(p, o, s) BOOST_PP_IF(p(109, s), BOOST_PP_WHILE_109, s BOOST_PP_TUPLE_EAT_3)(p, o, o(109, s)) # define BOOST_PP_WHILE_109_I(p, o, s) BOOST_PP_IF(p(110, s), BOOST_PP_WHILE_110, s BOOST_PP_TUPLE_EAT_3)(p, o, o(110, s)) # define BOOST_PP_WHILE_110_I(p, o, s) BOOST_PP_IF(p(111, s), BOOST_PP_WHILE_111, s BOOST_PP_TUPLE_EAT_3)(p, o, o(111, s)) # define BOOST_PP_WHILE_111_I(p, o, s) BOOST_PP_IF(p(112, s), BOOST_PP_WHILE_112, s BOOST_PP_TUPLE_EAT_3)(p, o, o(112, s)) # define BOOST_PP_WHILE_112_I(p, o, s) BOOST_PP_IF(p(113, s), BOOST_PP_WHILE_113, s BOOST_PP_TUPLE_EAT_3)(p, o, o(113, s)) # define BOOST_PP_WHILE_113_I(p, o, s) BOOST_PP_IF(p(114, s), BOOST_PP_WHILE_114, s BOOST_PP_TUPLE_EAT_3)(p, o, o(114, s)) # define BOOST_PP_WHILE_114_I(p, o, s) BOOST_PP_IF(p(115, s), BOOST_PP_WHILE_115, s BOOST_PP_TUPLE_EAT_3)(p, o, o(115, s)) # define BOOST_PP_WHILE_115_I(p, o, s) BOOST_PP_IF(p(116, s), BOOST_PP_WHILE_116, s BOOST_PP_TUPLE_EAT_3)(p, o, o(116, s)) # define BOOST_PP_WHILE_116_I(p, o, s) BOOST_PP_IF(p(117, s), BOOST_PP_WHILE_117, s BOOST_PP_TUPLE_EAT_3)(p, o, o(117, s)) # define BOOST_PP_WHILE_117_I(p, o, s) BOOST_PP_IF(p(118, s), BOOST_PP_WHILE_118, s BOOST_PP_TUPLE_EAT_3)(p, o, o(118, s)) # define BOOST_PP_WHILE_118_I(p, o, s) BOOST_PP_IF(p(119, s), BOOST_PP_WHILE_119, s BOOST_PP_TUPLE_EAT_3)(p, o, o(119, s)) # define BOOST_PP_WHILE_119_I(p, o, s) BOOST_PP_IF(p(120, s), BOOST_PP_WHILE_120, s BOOST_PP_TUPLE_EAT_3)(p, o, o(120, s)) # define BOOST_PP_WHILE_120_I(p, o, s) BOOST_PP_IF(p(121, s), BOOST_PP_WHILE_121, s BOOST_PP_TUPLE_EAT_3)(p, o, o(121, s)) # define BOOST_PP_WHILE_121_I(p, o, s) BOOST_PP_IF(p(122, s), BOOST_PP_WHILE_122, s BOOST_PP_TUPLE_EAT_3)(p, o, o(122, s)) # define BOOST_PP_WHILE_122_I(p, o, s) BOOST_PP_IF(p(123, s), BOOST_PP_WHILE_123, s BOOST_PP_TUPLE_EAT_3)(p, o, o(123, s)) # define BOOST_PP_WHILE_123_I(p, o, s) BOOST_PP_IF(p(124, s), BOOST_PP_WHILE_124, s BOOST_PP_TUPLE_EAT_3)(p, o, o(124, s)) # define BOOST_PP_WHILE_124_I(p, o, s) BOOST_PP_IF(p(125, s), BOOST_PP_WHILE_125, s BOOST_PP_TUPLE_EAT_3)(p, o, o(125, s)) # define BOOST_PP_WHILE_125_I(p, o, s) BOOST_PP_IF(p(126, s), BOOST_PP_WHILE_126, s BOOST_PP_TUPLE_EAT_3)(p, o, o(126, s)) # define BOOST_PP_WHILE_126_I(p, o, s) BOOST_PP_IF(p(127, s), BOOST_PP_WHILE_127, s BOOST_PP_TUPLE_EAT_3)(p, o, o(127, s)) # define BOOST_PP_WHILE_127_I(p, o, s) BOOST_PP_IF(p(128, s), BOOST_PP_WHILE_128, s BOOST_PP_TUPLE_EAT_3)(p, o, o(128, s)) # define BOOST_PP_WHILE_128_I(p, o, s) BOOST_PP_IF(p(129, s), BOOST_PP_WHILE_129, s BOOST_PP_TUPLE_EAT_3)(p, o, o(129, s)) # define BOOST_PP_WHILE_129_I(p, o, s) BOOST_PP_IF(p(130, s), BOOST_PP_WHILE_130, s BOOST_PP_TUPLE_EAT_3)(p, o, o(130, s)) # define BOOST_PP_WHILE_130_I(p, o, s) BOOST_PP_IF(p(131, s), BOOST_PP_WHILE_131, s BOOST_PP_TUPLE_EAT_3)(p, o, o(131, s)) # define BOOST_PP_WHILE_131_I(p, o, s) BOOST_PP_IF(p(132, s), BOOST_PP_WHILE_132, s BOOST_PP_TUPLE_EAT_3)(p, o, o(132, s)) # define BOOST_PP_WHILE_132_I(p, o, s) BOOST_PP_IF(p(133, s), BOOST_PP_WHILE_133, s BOOST_PP_TUPLE_EAT_3)(p, o, o(133, s)) # define BOOST_PP_WHILE_133_I(p, o, s) BOOST_PP_IF(p(134, s), BOOST_PP_WHILE_134, s BOOST_PP_TUPLE_EAT_3)(p, o, o(134, s)) # define BOOST_PP_WHILE_134_I(p, o, s) BOOST_PP_IF(p(135, s), BOOST_PP_WHILE_135, s BOOST_PP_TUPLE_EAT_3)(p, o, o(135, s)) # define BOOST_PP_WHILE_135_I(p, o, s) BOOST_PP_IF(p(136, s), BOOST_PP_WHILE_136, s BOOST_PP_TUPLE_EAT_3)(p, o, o(136, s)) # define BOOST_PP_WHILE_136_I(p, o, s) BOOST_PP_IF(p(137, s), BOOST_PP_WHILE_137, s BOOST_PP_TUPLE_EAT_3)(p, o, o(137, s)) # define BOOST_PP_WHILE_137_I(p, o, s) BOOST_PP_IF(p(138, s), BOOST_PP_WHILE_138, s BOOST_PP_TUPLE_EAT_3)(p, o, o(138, s)) # define BOOST_PP_WHILE_138_I(p, o, s) BOOST_PP_IF(p(139, s), BOOST_PP_WHILE_139, s BOOST_PP_TUPLE_EAT_3)(p, o, o(139, s)) # define BOOST_PP_WHILE_139_I(p, o, s) BOOST_PP_IF(p(140, s), BOOST_PP_WHILE_140, s BOOST_PP_TUPLE_EAT_3)(p, o, o(140, s)) # define BOOST_PP_WHILE_140_I(p, o, s) BOOST_PP_IF(p(141, s), BOOST_PP_WHILE_141, s BOOST_PP_TUPLE_EAT_3)(p, o, o(141, s)) # define BOOST_PP_WHILE_141_I(p, o, s) BOOST_PP_IF(p(142, s), BOOST_PP_WHILE_142, s BOOST_PP_TUPLE_EAT_3)(p, o, o(142, s)) # define BOOST_PP_WHILE_142_I(p, o, s) BOOST_PP_IF(p(143, s), BOOST_PP_WHILE_143, s BOOST_PP_TUPLE_EAT_3)(p, o, o(143, s)) # define BOOST_PP_WHILE_143_I(p, o, s) BOOST_PP_IF(p(144, s), BOOST_PP_WHILE_144, s BOOST_PP_TUPLE_EAT_3)(p, o, o(144, s)) # define BOOST_PP_WHILE_144_I(p, o, s) BOOST_PP_IF(p(145, s), BOOST_PP_WHILE_145, s BOOST_PP_TUPLE_EAT_3)(p, o, o(145, s)) # define BOOST_PP_WHILE_145_I(p, o, s) BOOST_PP_IF(p(146, s), BOOST_PP_WHILE_146, s BOOST_PP_TUPLE_EAT_3)(p, o, o(146, s)) # define BOOST_PP_WHILE_146_I(p, o, s) BOOST_PP_IF(p(147, s), BOOST_PP_WHILE_147, s BOOST_PP_TUPLE_EAT_3)(p, o, o(147, s)) # define BOOST_PP_WHILE_147_I(p, o, s) BOOST_PP_IF(p(148, s), BOOST_PP_WHILE_148, s BOOST_PP_TUPLE_EAT_3)(p, o, o(148, s)) # define BOOST_PP_WHILE_148_I(p, o, s) BOOST_PP_IF(p(149, s), BOOST_PP_WHILE_149, s BOOST_PP_TUPLE_EAT_3)(p, o, o(149, s)) # define BOOST_PP_WHILE_149_I(p, o, s) BOOST_PP_IF(p(150, s), BOOST_PP_WHILE_150, s BOOST_PP_TUPLE_EAT_3)(p, o, o(150, s)) # define BOOST_PP_WHILE_150_I(p, o, s) BOOST_PP_IF(p(151, s), BOOST_PP_WHILE_151, s BOOST_PP_TUPLE_EAT_3)(p, o, o(151, s)) # define BOOST_PP_WHILE_151_I(p, o, s) BOOST_PP_IF(p(152, s), BOOST_PP_WHILE_152, s BOOST_PP_TUPLE_EAT_3)(p, o, o(152, s)) # define BOOST_PP_WHILE_152_I(p, o, s) BOOST_PP_IF(p(153, s), BOOST_PP_WHILE_153, s BOOST_PP_TUPLE_EAT_3)(p, o, o(153, s)) # define BOOST_PP_WHILE_153_I(p, o, s) BOOST_PP_IF(p(154, s), BOOST_PP_WHILE_154, s BOOST_PP_TUPLE_EAT_3)(p, o, o(154, s)) # define BOOST_PP_WHILE_154_I(p, o, s) BOOST_PP_IF(p(155, s), BOOST_PP_WHILE_155, s BOOST_PP_TUPLE_EAT_3)(p, o, o(155, s)) # define BOOST_PP_WHILE_155_I(p, o, s) BOOST_PP_IF(p(156, s), BOOST_PP_WHILE_156, s BOOST_PP_TUPLE_EAT_3)(p, o, o(156, s)) # define BOOST_PP_WHILE_156_I(p, o, s) BOOST_PP_IF(p(157, s), BOOST_PP_WHILE_157, s BOOST_PP_TUPLE_EAT_3)(p, o, o(157, s)) # define BOOST_PP_WHILE_157_I(p, o, s) BOOST_PP_IF(p(158, s), BOOST_PP_WHILE_158, s BOOST_PP_TUPLE_EAT_3)(p, o, o(158, s)) # define BOOST_PP_WHILE_158_I(p, o, s) BOOST_PP_IF(p(159, s), BOOST_PP_WHILE_159, s BOOST_PP_TUPLE_EAT_3)(p, o, o(159, s)) # define BOOST_PP_WHILE_159_I(p, o, s) BOOST_PP_IF(p(160, s), BOOST_PP_WHILE_160, s BOOST_PP_TUPLE_EAT_3)(p, o, o(160, s)) # define BOOST_PP_WHILE_160_I(p, o, s) BOOST_PP_IF(p(161, s), BOOST_PP_WHILE_161, s BOOST_PP_TUPLE_EAT_3)(p, o, o(161, s)) # define BOOST_PP_WHILE_161_I(p, o, s) BOOST_PP_IF(p(162, s), BOOST_PP_WHILE_162, s BOOST_PP_TUPLE_EAT_3)(p, o, o(162, s)) # define BOOST_PP_WHILE_162_I(p, o, s) BOOST_PP_IF(p(163, s), BOOST_PP_WHILE_163, s BOOST_PP_TUPLE_EAT_3)(p, o, o(163, s)) # define BOOST_PP_WHILE_163_I(p, o, s) BOOST_PP_IF(p(164, s), BOOST_PP_WHILE_164, s BOOST_PP_TUPLE_EAT_3)(p, o, o(164, s)) # define BOOST_PP_WHILE_164_I(p, o, s) BOOST_PP_IF(p(165, s), BOOST_PP_WHILE_165, s BOOST_PP_TUPLE_EAT_3)(p, o, o(165, s)) # define BOOST_PP_WHILE_165_I(p, o, s) BOOST_PP_IF(p(166, s), BOOST_PP_WHILE_166, s BOOST_PP_TUPLE_EAT_3)(p, o, o(166, s)) # define BOOST_PP_WHILE_166_I(p, o, s) BOOST_PP_IF(p(167, s), BOOST_PP_WHILE_167, s BOOST_PP_TUPLE_EAT_3)(p, o, o(167, s)) # define BOOST_PP_WHILE_167_I(p, o, s) BOOST_PP_IF(p(168, s), BOOST_PP_WHILE_168, s BOOST_PP_TUPLE_EAT_3)(p, o, o(168, s)) # define BOOST_PP_WHILE_168_I(p, o, s) BOOST_PP_IF(p(169, s), BOOST_PP_WHILE_169, s BOOST_PP_TUPLE_EAT_3)(p, o, o(169, s)) # define BOOST_PP_WHILE_169_I(p, o, s) BOOST_PP_IF(p(170, s), BOOST_PP_WHILE_170, s BOOST_PP_TUPLE_EAT_3)(p, o, o(170, s)) # define BOOST_PP_WHILE_170_I(p, o, s) BOOST_PP_IF(p(171, s), BOOST_PP_WHILE_171, s BOOST_PP_TUPLE_EAT_3)(p, o, o(171, s)) # define BOOST_PP_WHILE_171_I(p, o, s) BOOST_PP_IF(p(172, s), BOOST_PP_WHILE_172, s BOOST_PP_TUPLE_EAT_3)(p, o, o(172, s)) # define BOOST_PP_WHILE_172_I(p, o, s) BOOST_PP_IF(p(173, s), BOOST_PP_WHILE_173, s BOOST_PP_TUPLE_EAT_3)(p, o, o(173, s)) # define BOOST_PP_WHILE_173_I(p, o, s) BOOST_PP_IF(p(174, s), BOOST_PP_WHILE_174, s BOOST_PP_TUPLE_EAT_3)(p, o, o(174, s)) # define BOOST_PP_WHILE_174_I(p, o, s) BOOST_PP_IF(p(175, s), BOOST_PP_WHILE_175, s BOOST_PP_TUPLE_EAT_3)(p, o, o(175, s)) # define BOOST_PP_WHILE_175_I(p, o, s) BOOST_PP_IF(p(176, s), BOOST_PP_WHILE_176, s BOOST_PP_TUPLE_EAT_3)(p, o, o(176, s)) # define BOOST_PP_WHILE_176_I(p, o, s) BOOST_PP_IF(p(177, s), BOOST_PP_WHILE_177, s BOOST_PP_TUPLE_EAT_3)(p, o, o(177, s)) # define BOOST_PP_WHILE_177_I(p, o, s) BOOST_PP_IF(p(178, s), BOOST_PP_WHILE_178, s BOOST_PP_TUPLE_EAT_3)(p, o, o(178, s)) # define BOOST_PP_WHILE_178_I(p, o, s) BOOST_PP_IF(p(179, s), BOOST_PP_WHILE_179, s BOOST_PP_TUPLE_EAT_3)(p, o, o(179, s)) # define BOOST_PP_WHILE_179_I(p, o, s) BOOST_PP_IF(p(180, s), BOOST_PP_WHILE_180, s BOOST_PP_TUPLE_EAT_3)(p, o, o(180, s)) # define BOOST_PP_WHILE_180_I(p, o, s) BOOST_PP_IF(p(181, s), BOOST_PP_WHILE_181, s BOOST_PP_TUPLE_EAT_3)(p, o, o(181, s)) # define BOOST_PP_WHILE_181_I(p, o, s) BOOST_PP_IF(p(182, s), BOOST_PP_WHILE_182, s BOOST_PP_TUPLE_EAT_3)(p, o, o(182, s)) # define BOOST_PP_WHILE_182_I(p, o, s) BOOST_PP_IF(p(183, s), BOOST_PP_WHILE_183, s BOOST_PP_TUPLE_EAT_3)(p, o, o(183, s)) # define BOOST_PP_WHILE_183_I(p, o, s) BOOST_PP_IF(p(184, s), BOOST_PP_WHILE_184, s BOOST_PP_TUPLE_EAT_3)(p, o, o(184, s)) # define BOOST_PP_WHILE_184_I(p, o, s) BOOST_PP_IF(p(185, s), BOOST_PP_WHILE_185, s BOOST_PP_TUPLE_EAT_3)(p, o, o(185, s)) # define BOOST_PP_WHILE_185_I(p, o, s) BOOST_PP_IF(p(186, s), BOOST_PP_WHILE_186, s BOOST_PP_TUPLE_EAT_3)(p, o, o(186, s)) # define BOOST_PP_WHILE_186_I(p, o, s) BOOST_PP_IF(p(187, s), BOOST_PP_WHILE_187, s BOOST_PP_TUPLE_EAT_3)(p, o, o(187, s)) # define BOOST_PP_WHILE_187_I(p, o, s) BOOST_PP_IF(p(188, s), BOOST_PP_WHILE_188, s BOOST_PP_TUPLE_EAT_3)(p, o, o(188, s)) # define BOOST_PP_WHILE_188_I(p, o, s) BOOST_PP_IF(p(189, s), BOOST_PP_WHILE_189, s BOOST_PP_TUPLE_EAT_3)(p, o, o(189, s)) # define BOOST_PP_WHILE_189_I(p, o, s) BOOST_PP_IF(p(190, s), BOOST_PP_WHILE_190, s BOOST_PP_TUPLE_EAT_3)(p, o, o(190, s)) # define BOOST_PP_WHILE_190_I(p, o, s) BOOST_PP_IF(p(191, s), BOOST_PP_WHILE_191, s BOOST_PP_TUPLE_EAT_3)(p, o, o(191, s)) # define BOOST_PP_WHILE_191_I(p, o, s) BOOST_PP_IF(p(192, s), BOOST_PP_WHILE_192, s BOOST_PP_TUPLE_EAT_3)(p, o, o(192, s)) # define BOOST_PP_WHILE_192_I(p, o, s) BOOST_PP_IF(p(193, s), BOOST_PP_WHILE_193, s BOOST_PP_TUPLE_EAT_3)(p, o, o(193, s)) # define BOOST_PP_WHILE_193_I(p, o, s) BOOST_PP_IF(p(194, s), BOOST_PP_WHILE_194, s BOOST_PP_TUPLE_EAT_3)(p, o, o(194, s)) # define BOOST_PP_WHILE_194_I(p, o, s) BOOST_PP_IF(p(195, s), BOOST_PP_WHILE_195, s BOOST_PP_TUPLE_EAT_3)(p, o, o(195, s)) # define BOOST_PP_WHILE_195_I(p, o, s) BOOST_PP_IF(p(196, s), BOOST_PP_WHILE_196, s BOOST_PP_TUPLE_EAT_3)(p, o, o(196, s)) # define BOOST_PP_WHILE_196_I(p, o, s) BOOST_PP_IF(p(197, s), BOOST_PP_WHILE_197, s BOOST_PP_TUPLE_EAT_3)(p, o, o(197, s)) # define BOOST_PP_WHILE_197_I(p, o, s) BOOST_PP_IF(p(198, s), BOOST_PP_WHILE_198, s BOOST_PP_TUPLE_EAT_3)(p, o, o(198, s)) # define BOOST_PP_WHILE_198_I(p, o, s) BOOST_PP_IF(p(199, s), BOOST_PP_WHILE_199, s BOOST_PP_TUPLE_EAT_3)(p, o, o(199, s)) # define BOOST_PP_WHILE_199_I(p, o, s) BOOST_PP_IF(p(200, s), BOOST_PP_WHILE_200, s BOOST_PP_TUPLE_EAT_3)(p, o, o(200, s)) # define BOOST_PP_WHILE_200_I(p, o, s) BOOST_PP_IF(p(201, s), BOOST_PP_WHILE_201, s BOOST_PP_TUPLE_EAT_3)(p, o, o(201, s)) # define BOOST_PP_WHILE_201_I(p, o, s) BOOST_PP_IF(p(202, s), BOOST_PP_WHILE_202, s BOOST_PP_TUPLE_EAT_3)(p, o, o(202, s)) # define BOOST_PP_WHILE_202_I(p, o, s) BOOST_PP_IF(p(203, s), BOOST_PP_WHILE_203, s BOOST_PP_TUPLE_EAT_3)(p, o, o(203, s)) # define BOOST_PP_WHILE_203_I(p, o, s) BOOST_PP_IF(p(204, s), BOOST_PP_WHILE_204, s BOOST_PP_TUPLE_EAT_3)(p, o, o(204, s)) # define BOOST_PP_WHILE_204_I(p, o, s) BOOST_PP_IF(p(205, s), BOOST_PP_WHILE_205, s BOOST_PP_TUPLE_EAT_3)(p, o, o(205, s)) # define BOOST_PP_WHILE_205_I(p, o, s) BOOST_PP_IF(p(206, s), BOOST_PP_WHILE_206, s BOOST_PP_TUPLE_EAT_3)(p, o, o(206, s)) # define BOOST_PP_WHILE_206_I(p, o, s) BOOST_PP_IF(p(207, s), BOOST_PP_WHILE_207, s BOOST_PP_TUPLE_EAT_3)(p, o, o(207, s)) # define BOOST_PP_WHILE_207_I(p, o, s) BOOST_PP_IF(p(208, s), BOOST_PP_WHILE_208, s BOOST_PP_TUPLE_EAT_3)(p, o, o(208, s)) # define BOOST_PP_WHILE_208_I(p, o, s) BOOST_PP_IF(p(209, s), BOOST_PP_WHILE_209, s BOOST_PP_TUPLE_EAT_3)(p, o, o(209, s)) # define BOOST_PP_WHILE_209_I(p, o, s) BOOST_PP_IF(p(210, s), BOOST_PP_WHILE_210, s BOOST_PP_TUPLE_EAT_3)(p, o, o(210, s)) # define BOOST_PP_WHILE_210_I(p, o, s) BOOST_PP_IF(p(211, s), BOOST_PP_WHILE_211, s BOOST_PP_TUPLE_EAT_3)(p, o, o(211, s)) # define BOOST_PP_WHILE_211_I(p, o, s) BOOST_PP_IF(p(212, s), BOOST_PP_WHILE_212, s BOOST_PP_TUPLE_EAT_3)(p, o, o(212, s)) # define BOOST_PP_WHILE_212_I(p, o, s) BOOST_PP_IF(p(213, s), BOOST_PP_WHILE_213, s BOOST_PP_TUPLE_EAT_3)(p, o, o(213, s)) # define BOOST_PP_WHILE_213_I(p, o, s) BOOST_PP_IF(p(214, s), BOOST_PP_WHILE_214, s BOOST_PP_TUPLE_EAT_3)(p, o, o(214, s)) # define BOOST_PP_WHILE_214_I(p, o, s) BOOST_PP_IF(p(215, s), BOOST_PP_WHILE_215, s BOOST_PP_TUPLE_EAT_3)(p, o, o(215, s)) # define BOOST_PP_WHILE_215_I(p, o, s) BOOST_PP_IF(p(216, s), BOOST_PP_WHILE_216, s BOOST_PP_TUPLE_EAT_3)(p, o, o(216, s)) # define BOOST_PP_WHILE_216_I(p, o, s) BOOST_PP_IF(p(217, s), BOOST_PP_WHILE_217, s BOOST_PP_TUPLE_EAT_3)(p, o, o(217, s)) # define BOOST_PP_WHILE_217_I(p, o, s) BOOST_PP_IF(p(218, s), BOOST_PP_WHILE_218, s BOOST_PP_TUPLE_EAT_3)(p, o, o(218, s)) # define BOOST_PP_WHILE_218_I(p, o, s) BOOST_PP_IF(p(219, s), BOOST_PP_WHILE_219, s BOOST_PP_TUPLE_EAT_3)(p, o, o(219, s)) # define BOOST_PP_WHILE_219_I(p, o, s) BOOST_PP_IF(p(220, s), BOOST_PP_WHILE_220, s BOOST_PP_TUPLE_EAT_3)(p, o, o(220, s)) # define BOOST_PP_WHILE_220_I(p, o, s) BOOST_PP_IF(p(221, s), BOOST_PP_WHILE_221, s BOOST_PP_TUPLE_EAT_3)(p, o, o(221, s)) # define BOOST_PP_WHILE_221_I(p, o, s) BOOST_PP_IF(p(222, s), BOOST_PP_WHILE_222, s BOOST_PP_TUPLE_EAT_3)(p, o, o(222, s)) # define BOOST_PP_WHILE_222_I(p, o, s) BOOST_PP_IF(p(223, s), BOOST_PP_WHILE_223, s BOOST_PP_TUPLE_EAT_3)(p, o, o(223, s)) # define BOOST_PP_WHILE_223_I(p, o, s) BOOST_PP_IF(p(224, s), BOOST_PP_WHILE_224, s BOOST_PP_TUPLE_EAT_3)(p, o, o(224, s)) # define BOOST_PP_WHILE_224_I(p, o, s) BOOST_PP_IF(p(225, s), BOOST_PP_WHILE_225, s BOOST_PP_TUPLE_EAT_3)(p, o, o(225, s)) # define BOOST_PP_WHILE_225_I(p, o, s) BOOST_PP_IF(p(226, s), BOOST_PP_WHILE_226, s BOOST_PP_TUPLE_EAT_3)(p, o, o(226, s)) # define BOOST_PP_WHILE_226_I(p, o, s) BOOST_PP_IF(p(227, s), BOOST_PP_WHILE_227, s BOOST_PP_TUPLE_EAT_3)(p, o, o(227, s)) # define BOOST_PP_WHILE_227_I(p, o, s) BOOST_PP_IF(p(228, s), BOOST_PP_WHILE_228, s BOOST_PP_TUPLE_EAT_3)(p, o, o(228, s)) # define BOOST_PP_WHILE_228_I(p, o, s) BOOST_PP_IF(p(229, s), BOOST_PP_WHILE_229, s BOOST_PP_TUPLE_EAT_3)(p, o, o(229, s)) # define BOOST_PP_WHILE_229_I(p, o, s) BOOST_PP_IF(p(230, s), BOOST_PP_WHILE_230, s BOOST_PP_TUPLE_EAT_3)(p, o, o(230, s)) # define BOOST_PP_WHILE_230_I(p, o, s) BOOST_PP_IF(p(231, s), BOOST_PP_WHILE_231, s BOOST_PP_TUPLE_EAT_3)(p, o, o(231, s)) # define BOOST_PP_WHILE_231_I(p, o, s) BOOST_PP_IF(p(232, s), BOOST_PP_WHILE_232, s BOOST_PP_TUPLE_EAT_3)(p, o, o(232, s)) # define BOOST_PP_WHILE_232_I(p, o, s) BOOST_PP_IF(p(233, s), BOOST_PP_WHILE_233, s BOOST_PP_TUPLE_EAT_3)(p, o, o(233, s)) # define BOOST_PP_WHILE_233_I(p, o, s) BOOST_PP_IF(p(234, s), BOOST_PP_WHILE_234, s BOOST_PP_TUPLE_EAT_3)(p, o, o(234, s)) # define BOOST_PP_WHILE_234_I(p, o, s) BOOST_PP_IF(p(235, s), BOOST_PP_WHILE_235, s BOOST_PP_TUPLE_EAT_3)(p, o, o(235, s)) # define BOOST_PP_WHILE_235_I(p, o, s) BOOST_PP_IF(p(236, s), BOOST_PP_WHILE_236, s BOOST_PP_TUPLE_EAT_3)(p, o, o(236, s)) # define BOOST_PP_WHILE_236_I(p, o, s) BOOST_PP_IF(p(237, s), BOOST_PP_WHILE_237, s BOOST_PP_TUPLE_EAT_3)(p, o, o(237, s)) # define BOOST_PP_WHILE_237_I(p, o, s) BOOST_PP_IF(p(238, s), BOOST_PP_WHILE_238, s BOOST_PP_TUPLE_EAT_3)(p, o, o(238, s)) # define BOOST_PP_WHILE_238_I(p, o, s) BOOST_PP_IF(p(239, s), BOOST_PP_WHILE_239, s BOOST_PP_TUPLE_EAT_3)(p, o, o(239, s)) # define BOOST_PP_WHILE_239_I(p, o, s) BOOST_PP_IF(p(240, s), BOOST_PP_WHILE_240, s BOOST_PP_TUPLE_EAT_3)(p, o, o(240, s)) # define BOOST_PP_WHILE_240_I(p, o, s) BOOST_PP_IF(p(241, s), BOOST_PP_WHILE_241, s BOOST_PP_TUPLE_EAT_3)(p, o, o(241, s)) # define BOOST_PP_WHILE_241_I(p, o, s) BOOST_PP_IF(p(242, s), BOOST_PP_WHILE_242, s BOOST_PP_TUPLE_EAT_3)(p, o, o(242, s)) # define BOOST_PP_WHILE_242_I(p, o, s) BOOST_PP_IF(p(243, s), BOOST_PP_WHILE_243, s BOOST_PP_TUPLE_EAT_3)(p, o, o(243, s)) # define BOOST_PP_WHILE_243_I(p, o, s) BOOST_PP_IF(p(244, s), BOOST_PP_WHILE_244, s BOOST_PP_TUPLE_EAT_3)(p, o, o(244, s)) # define BOOST_PP_WHILE_244_I(p, o, s) BOOST_PP_IF(p(245, s), BOOST_PP_WHILE_245, s BOOST_PP_TUPLE_EAT_3)(p, o, o(245, s)) # define BOOST_PP_WHILE_245_I(p, o, s) BOOST_PP_IF(p(246, s), BOOST_PP_WHILE_246, s BOOST_PP_TUPLE_EAT_3)(p, o, o(246, s)) # define BOOST_PP_WHILE_246_I(p, o, s) BOOST_PP_IF(p(247, s), BOOST_PP_WHILE_247, s BOOST_PP_TUPLE_EAT_3)(p, o, o(247, s)) # define BOOST_PP_WHILE_247_I(p, o, s) BOOST_PP_IF(p(248, s), BOOST_PP_WHILE_248, s BOOST_PP_TUPLE_EAT_3)(p, o, o(248, s)) # define BOOST_PP_WHILE_248_I(p, o, s) BOOST_PP_IF(p(249, s), BOOST_PP_WHILE_249, s BOOST_PP_TUPLE_EAT_3)(p, o, o(249, s)) # define BOOST_PP_WHILE_249_I(p, o, s) BOOST_PP_IF(p(250, s), BOOST_PP_WHILE_250, s BOOST_PP_TUPLE_EAT_3)(p, o, o(250, s)) # define BOOST_PP_WHILE_250_I(p, o, s) BOOST_PP_IF(p(251, s), BOOST_PP_WHILE_251, s BOOST_PP_TUPLE_EAT_3)(p, o, o(251, s)) # define BOOST_PP_WHILE_251_I(p, o, s) BOOST_PP_IF(p(252, s), BOOST_PP_WHILE_252, s BOOST_PP_TUPLE_EAT_3)(p, o, o(252, s)) # define BOOST_PP_WHILE_252_I(p, o, s) BOOST_PP_IF(p(253, s), BOOST_PP_WHILE_253, s BOOST_PP_TUPLE_EAT_3)(p, o, o(253, s)) # define BOOST_PP_WHILE_253_I(p, o, s) BOOST_PP_IF(p(254, s), BOOST_PP_WHILE_254, s BOOST_PP_TUPLE_EAT_3)(p, o, o(254, s)) # define BOOST_PP_WHILE_254_I(p, o, s) BOOST_PP_IF(p(255, s), BOOST_PP_WHILE_255, s BOOST_PP_TUPLE_EAT_3)(p, o, o(255, s)) # define BOOST_PP_WHILE_255_I(p, o, s) BOOST_PP_IF(p(256, s), BOOST_PP_WHILE_256, s BOOST_PP_TUPLE_EAT_3)(p, o, o(256, s)) # define BOOST_PP_WHILE_256_I(p, o, s) BOOST_PP_IF(p(257, s), BOOST_PP_WHILE_257, s BOOST_PP_TUPLE_EAT_3)(p, o, o(257, s)) # # endif ================================================ FILE: benchmarks/boost/preprocessor/control/detail/msvc/while.hpp ================================================ # /* Copyright (C) 2001 # * Housemarque Oy # * http://www.housemarque.com # * # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # */ # # /* Revised by Paul Mensonides (2002) */ # # /* See http://www.boost.org for most recent version. */ # # ifndef BOOST_PREPROCESSOR_CONTROL_DETAIL_MSVC_WHILE_HPP # define BOOST_PREPROCESSOR_CONTROL_DETAIL_MSVC_WHILE_HPP # # include # include # # define BOOST_PP_WHILE_1(p, o, s) BOOST_PP_IF(p(2, s), BOOST_PP_WHILE_2, s BOOST_PP_TUPLE_EAT_3)(p, o, o(2, s)) # define BOOST_PP_WHILE_2(p, o, s) BOOST_PP_IF(p(3, s), BOOST_PP_WHILE_3, s BOOST_PP_TUPLE_EAT_3)(p, o, o(3, s)) # define BOOST_PP_WHILE_3(p, o, s) BOOST_PP_IF(p(4, s), BOOST_PP_WHILE_4, s BOOST_PP_TUPLE_EAT_3)(p, o, o(4, s)) # define BOOST_PP_WHILE_4(p, o, s) BOOST_PP_IF(p(5, s), BOOST_PP_WHILE_5, s BOOST_PP_TUPLE_EAT_3)(p, o, o(5, s)) # define BOOST_PP_WHILE_5(p, o, s) BOOST_PP_IF(p(6, s), BOOST_PP_WHILE_6, s BOOST_PP_TUPLE_EAT_3)(p, o, o(6, s)) # define BOOST_PP_WHILE_6(p, o, s) BOOST_PP_IF(p(7, s), BOOST_PP_WHILE_7, s BOOST_PP_TUPLE_EAT_3)(p, o, o(7, s)) # define BOOST_PP_WHILE_7(p, o, s) BOOST_PP_IF(p(8, s), BOOST_PP_WHILE_8, s BOOST_PP_TUPLE_EAT_3)(p, o, o(8, s)) # define BOOST_PP_WHILE_8(p, o, s) BOOST_PP_IF(p(9, s), BOOST_PP_WHILE_9, s BOOST_PP_TUPLE_EAT_3)(p, o, o(9, s)) # define BOOST_PP_WHILE_9(p, o, s) BOOST_PP_IF(p(10, s), BOOST_PP_WHILE_10, s BOOST_PP_TUPLE_EAT_3)(p, o, o(10, s)) # define BOOST_PP_WHILE_10(p, o, s) BOOST_PP_IF(p(11, s), BOOST_PP_WHILE_11, s BOOST_PP_TUPLE_EAT_3)(p, o, o(11, s)) # define BOOST_PP_WHILE_11(p, o, s) BOOST_PP_IF(p(12, s), BOOST_PP_WHILE_12, s BOOST_PP_TUPLE_EAT_3)(p, o, o(12, s)) # define BOOST_PP_WHILE_12(p, o, s) BOOST_PP_IF(p(13, s), BOOST_PP_WHILE_13, s BOOST_PP_TUPLE_EAT_3)(p, o, o(13, s)) # define BOOST_PP_WHILE_13(p, o, s) BOOST_PP_IF(p(14, s), BOOST_PP_WHILE_14, s BOOST_PP_TUPLE_EAT_3)(p, o, o(14, s)) # define BOOST_PP_WHILE_14(p, o, s) BOOST_PP_IF(p(15, s), BOOST_PP_WHILE_15, s BOOST_PP_TUPLE_EAT_3)(p, o, o(15, s)) # define BOOST_PP_WHILE_15(p, o, s) BOOST_PP_IF(p(16, s), BOOST_PP_WHILE_16, s BOOST_PP_TUPLE_EAT_3)(p, o, o(16, s)) # define BOOST_PP_WHILE_16(p, o, s) BOOST_PP_IF(p(17, s), BOOST_PP_WHILE_17, s BOOST_PP_TUPLE_EAT_3)(p, o, o(17, s)) # define BOOST_PP_WHILE_17(p, o, s) BOOST_PP_IF(p(18, s), BOOST_PP_WHILE_18, s BOOST_PP_TUPLE_EAT_3)(p, o, o(18, s)) # define BOOST_PP_WHILE_18(p, o, s) BOOST_PP_IF(p(19, s), BOOST_PP_WHILE_19, s BOOST_PP_TUPLE_EAT_3)(p, o, o(19, s)) # define BOOST_PP_WHILE_19(p, o, s) BOOST_PP_IF(p(20, s), BOOST_PP_WHILE_20, s BOOST_PP_TUPLE_EAT_3)(p, o, o(20, s)) # define BOOST_PP_WHILE_20(p, o, s) BOOST_PP_IF(p(21, s), BOOST_PP_WHILE_21, s BOOST_PP_TUPLE_EAT_3)(p, o, o(21, s)) # define BOOST_PP_WHILE_21(p, o, s) BOOST_PP_IF(p(22, s), BOOST_PP_WHILE_22, s BOOST_PP_TUPLE_EAT_3)(p, o, o(22, s)) # define BOOST_PP_WHILE_22(p, o, s) BOOST_PP_IF(p(23, s), BOOST_PP_WHILE_23, s BOOST_PP_TUPLE_EAT_3)(p, o, o(23, s)) # define BOOST_PP_WHILE_23(p, o, s) BOOST_PP_IF(p(24, s), BOOST_PP_WHILE_24, s BOOST_PP_TUPLE_EAT_3)(p, o, o(24, s)) # define BOOST_PP_WHILE_24(p, o, s) BOOST_PP_IF(p(25, s), BOOST_PP_WHILE_25, s BOOST_PP_TUPLE_EAT_3)(p, o, o(25, s)) # define BOOST_PP_WHILE_25(p, o, s) BOOST_PP_IF(p(26, s), BOOST_PP_WHILE_26, s BOOST_PP_TUPLE_EAT_3)(p, o, o(26, s)) # define BOOST_PP_WHILE_26(p, o, s) BOOST_PP_IF(p(27, s), BOOST_PP_WHILE_27, s BOOST_PP_TUPLE_EAT_3)(p, o, o(27, s)) # define BOOST_PP_WHILE_27(p, o, s) BOOST_PP_IF(p(28, s), BOOST_PP_WHILE_28, s BOOST_PP_TUPLE_EAT_3)(p, o, o(28, s)) # define BOOST_PP_WHILE_28(p, o, s) BOOST_PP_IF(p(29, s), BOOST_PP_WHILE_29, s BOOST_PP_TUPLE_EAT_3)(p, o, o(29, s)) # define BOOST_PP_WHILE_29(p, o, s) BOOST_PP_IF(p(30, s), BOOST_PP_WHILE_30, s BOOST_PP_TUPLE_EAT_3)(p, o, o(30, s)) # define BOOST_PP_WHILE_30(p, o, s) BOOST_PP_IF(p(31, s), BOOST_PP_WHILE_31, s BOOST_PP_TUPLE_EAT_3)(p, o, o(31, s)) # define BOOST_PP_WHILE_31(p, o, s) BOOST_PP_IF(p(32, s), BOOST_PP_WHILE_32, s BOOST_PP_TUPLE_EAT_3)(p, o, o(32, s)) # define BOOST_PP_WHILE_32(p, o, s) BOOST_PP_IF(p(33, s), BOOST_PP_WHILE_33, s BOOST_PP_TUPLE_EAT_3)(p, o, o(33, s)) # define BOOST_PP_WHILE_33(p, o, s) BOOST_PP_IF(p(34, s), BOOST_PP_WHILE_34, s BOOST_PP_TUPLE_EAT_3)(p, o, o(34, s)) # define BOOST_PP_WHILE_34(p, o, s) BOOST_PP_IF(p(35, s), BOOST_PP_WHILE_35, s BOOST_PP_TUPLE_EAT_3)(p, o, o(35, s)) # define BOOST_PP_WHILE_35(p, o, s) BOOST_PP_IF(p(36, s), BOOST_PP_WHILE_36, s BOOST_PP_TUPLE_EAT_3)(p, o, o(36, s)) # define BOOST_PP_WHILE_36(p, o, s) BOOST_PP_IF(p(37, s), BOOST_PP_WHILE_37, s BOOST_PP_TUPLE_EAT_3)(p, o, o(37, s)) # define BOOST_PP_WHILE_37(p, o, s) BOOST_PP_IF(p(38, s), BOOST_PP_WHILE_38, s BOOST_PP_TUPLE_EAT_3)(p, o, o(38, s)) # define BOOST_PP_WHILE_38(p, o, s) BOOST_PP_IF(p(39, s), BOOST_PP_WHILE_39, s BOOST_PP_TUPLE_EAT_3)(p, o, o(39, s)) # define BOOST_PP_WHILE_39(p, o, s) BOOST_PP_IF(p(40, s), BOOST_PP_WHILE_40, s BOOST_PP_TUPLE_EAT_3)(p, o, o(40, s)) # define BOOST_PP_WHILE_40(p, o, s) BOOST_PP_IF(p(41, s), BOOST_PP_WHILE_41, s BOOST_PP_TUPLE_EAT_3)(p, o, o(41, s)) # define BOOST_PP_WHILE_41(p, o, s) BOOST_PP_IF(p(42, s), BOOST_PP_WHILE_42, s BOOST_PP_TUPLE_EAT_3)(p, o, o(42, s)) # define BOOST_PP_WHILE_42(p, o, s) BOOST_PP_IF(p(43, s), BOOST_PP_WHILE_43, s BOOST_PP_TUPLE_EAT_3)(p, o, o(43, s)) # define BOOST_PP_WHILE_43(p, o, s) BOOST_PP_IF(p(44, s), BOOST_PP_WHILE_44, s BOOST_PP_TUPLE_EAT_3)(p, o, o(44, s)) # define BOOST_PP_WHILE_44(p, o, s) BOOST_PP_IF(p(45, s), BOOST_PP_WHILE_45, s BOOST_PP_TUPLE_EAT_3)(p, o, o(45, s)) # define BOOST_PP_WHILE_45(p, o, s) BOOST_PP_IF(p(46, s), BOOST_PP_WHILE_46, s BOOST_PP_TUPLE_EAT_3)(p, o, o(46, s)) # define BOOST_PP_WHILE_46(p, o, s) BOOST_PP_IF(p(47, s), BOOST_PP_WHILE_47, s BOOST_PP_TUPLE_EAT_3)(p, o, o(47, s)) # define BOOST_PP_WHILE_47(p, o, s) BOOST_PP_IF(p(48, s), BOOST_PP_WHILE_48, s BOOST_PP_TUPLE_EAT_3)(p, o, o(48, s)) # define BOOST_PP_WHILE_48(p, o, s) BOOST_PP_IF(p(49, s), BOOST_PP_WHILE_49, s BOOST_PP_TUPLE_EAT_3)(p, o, o(49, s)) # define BOOST_PP_WHILE_49(p, o, s) BOOST_PP_IF(p(50, s), BOOST_PP_WHILE_50, s BOOST_PP_TUPLE_EAT_3)(p, o, o(50, s)) # define BOOST_PP_WHILE_50(p, o, s) BOOST_PP_IF(p(51, s), BOOST_PP_WHILE_51, s BOOST_PP_TUPLE_EAT_3)(p, o, o(51, s)) # define BOOST_PP_WHILE_51(p, o, s) BOOST_PP_IF(p(52, s), BOOST_PP_WHILE_52, s BOOST_PP_TUPLE_EAT_3)(p, o, o(52, s)) # define BOOST_PP_WHILE_52(p, o, s) BOOST_PP_IF(p(53, s), BOOST_PP_WHILE_53, s BOOST_PP_TUPLE_EAT_3)(p, o, o(53, s)) # define BOOST_PP_WHILE_53(p, o, s) BOOST_PP_IF(p(54, s), BOOST_PP_WHILE_54, s BOOST_PP_TUPLE_EAT_3)(p, o, o(54, s)) # define BOOST_PP_WHILE_54(p, o, s) BOOST_PP_IF(p(55, s), BOOST_PP_WHILE_55, s BOOST_PP_TUPLE_EAT_3)(p, o, o(55, s)) # define BOOST_PP_WHILE_55(p, o, s) BOOST_PP_IF(p(56, s), BOOST_PP_WHILE_56, s BOOST_PP_TUPLE_EAT_3)(p, o, o(56, s)) # define BOOST_PP_WHILE_56(p, o, s) BOOST_PP_IF(p(57, s), BOOST_PP_WHILE_57, s BOOST_PP_TUPLE_EAT_3)(p, o, o(57, s)) # define BOOST_PP_WHILE_57(p, o, s) BOOST_PP_IF(p(58, s), BOOST_PP_WHILE_58, s BOOST_PP_TUPLE_EAT_3)(p, o, o(58, s)) # define BOOST_PP_WHILE_58(p, o, s) BOOST_PP_IF(p(59, s), BOOST_PP_WHILE_59, s BOOST_PP_TUPLE_EAT_3)(p, o, o(59, s)) # define BOOST_PP_WHILE_59(p, o, s) BOOST_PP_IF(p(60, s), BOOST_PP_WHILE_60, s BOOST_PP_TUPLE_EAT_3)(p, o, o(60, s)) # define BOOST_PP_WHILE_60(p, o, s) BOOST_PP_IF(p(61, s), BOOST_PP_WHILE_61, s BOOST_PP_TUPLE_EAT_3)(p, o, o(61, s)) # define BOOST_PP_WHILE_61(p, o, s) BOOST_PP_IF(p(62, s), BOOST_PP_WHILE_62, s BOOST_PP_TUPLE_EAT_3)(p, o, o(62, s)) # define BOOST_PP_WHILE_62(p, o, s) BOOST_PP_IF(p(63, s), BOOST_PP_WHILE_63, s BOOST_PP_TUPLE_EAT_3)(p, o, o(63, s)) # define BOOST_PP_WHILE_63(p, o, s) BOOST_PP_IF(p(64, s), BOOST_PP_WHILE_64, s BOOST_PP_TUPLE_EAT_3)(p, o, o(64, s)) # define BOOST_PP_WHILE_64(p, o, s) BOOST_PP_IF(p(65, s), BOOST_PP_WHILE_65, s BOOST_PP_TUPLE_EAT_3)(p, o, o(65, s)) # define BOOST_PP_WHILE_65(p, o, s) BOOST_PP_IF(p(66, s), BOOST_PP_WHILE_66, s BOOST_PP_TUPLE_EAT_3)(p, o, o(66, s)) # define BOOST_PP_WHILE_66(p, o, s) BOOST_PP_IF(p(67, s), BOOST_PP_WHILE_67, s BOOST_PP_TUPLE_EAT_3)(p, o, o(67, s)) # define BOOST_PP_WHILE_67(p, o, s) BOOST_PP_IF(p(68, s), BOOST_PP_WHILE_68, s BOOST_PP_TUPLE_EAT_3)(p, o, o(68, s)) # define BOOST_PP_WHILE_68(p, o, s) BOOST_PP_IF(p(69, s), BOOST_PP_WHILE_69, s BOOST_PP_TUPLE_EAT_3)(p, o, o(69, s)) # define BOOST_PP_WHILE_69(p, o, s) BOOST_PP_IF(p(70, s), BOOST_PP_WHILE_70, s BOOST_PP_TUPLE_EAT_3)(p, o, o(70, s)) # define BOOST_PP_WHILE_70(p, o, s) BOOST_PP_IF(p(71, s), BOOST_PP_WHILE_71, s BOOST_PP_TUPLE_EAT_3)(p, o, o(71, s)) # define BOOST_PP_WHILE_71(p, o, s) BOOST_PP_IF(p(72, s), BOOST_PP_WHILE_72, s BOOST_PP_TUPLE_EAT_3)(p, o, o(72, s)) # define BOOST_PP_WHILE_72(p, o, s) BOOST_PP_IF(p(73, s), BOOST_PP_WHILE_73, s BOOST_PP_TUPLE_EAT_3)(p, o, o(73, s)) # define BOOST_PP_WHILE_73(p, o, s) BOOST_PP_IF(p(74, s), BOOST_PP_WHILE_74, s BOOST_PP_TUPLE_EAT_3)(p, o, o(74, s)) # define BOOST_PP_WHILE_74(p, o, s) BOOST_PP_IF(p(75, s), BOOST_PP_WHILE_75, s BOOST_PP_TUPLE_EAT_3)(p, o, o(75, s)) # define BOOST_PP_WHILE_75(p, o, s) BOOST_PP_IF(p(76, s), BOOST_PP_WHILE_76, s BOOST_PP_TUPLE_EAT_3)(p, o, o(76, s)) # define BOOST_PP_WHILE_76(p, o, s) BOOST_PP_IF(p(77, s), BOOST_PP_WHILE_77, s BOOST_PP_TUPLE_EAT_3)(p, o, o(77, s)) # define BOOST_PP_WHILE_77(p, o, s) BOOST_PP_IF(p(78, s), BOOST_PP_WHILE_78, s BOOST_PP_TUPLE_EAT_3)(p, o, o(78, s)) # define BOOST_PP_WHILE_78(p, o, s) BOOST_PP_IF(p(79, s), BOOST_PP_WHILE_79, s BOOST_PP_TUPLE_EAT_3)(p, o, o(79, s)) # define BOOST_PP_WHILE_79(p, o, s) BOOST_PP_IF(p(80, s), BOOST_PP_WHILE_80, s BOOST_PP_TUPLE_EAT_3)(p, o, o(80, s)) # define BOOST_PP_WHILE_80(p, o, s) BOOST_PP_IF(p(81, s), BOOST_PP_WHILE_81, s BOOST_PP_TUPLE_EAT_3)(p, o, o(81, s)) # define BOOST_PP_WHILE_81(p, o, s) BOOST_PP_IF(p(82, s), BOOST_PP_WHILE_82, s BOOST_PP_TUPLE_EAT_3)(p, o, o(82, s)) # define BOOST_PP_WHILE_82(p, o, s) BOOST_PP_IF(p(83, s), BOOST_PP_WHILE_83, s BOOST_PP_TUPLE_EAT_3)(p, o, o(83, s)) # define BOOST_PP_WHILE_83(p, o, s) BOOST_PP_IF(p(84, s), BOOST_PP_WHILE_84, s BOOST_PP_TUPLE_EAT_3)(p, o, o(84, s)) # define BOOST_PP_WHILE_84(p, o, s) BOOST_PP_IF(p(85, s), BOOST_PP_WHILE_85, s BOOST_PP_TUPLE_EAT_3)(p, o, o(85, s)) # define BOOST_PP_WHILE_85(p, o, s) BOOST_PP_IF(p(86, s), BOOST_PP_WHILE_86, s BOOST_PP_TUPLE_EAT_3)(p, o, o(86, s)) # define BOOST_PP_WHILE_86(p, o, s) BOOST_PP_IF(p(87, s), BOOST_PP_WHILE_87, s BOOST_PP_TUPLE_EAT_3)(p, o, o(87, s)) # define BOOST_PP_WHILE_87(p, o, s) BOOST_PP_IF(p(88, s), BOOST_PP_WHILE_88, s BOOST_PP_TUPLE_EAT_3)(p, o, o(88, s)) # define BOOST_PP_WHILE_88(p, o, s) BOOST_PP_IF(p(89, s), BOOST_PP_WHILE_89, s BOOST_PP_TUPLE_EAT_3)(p, o, o(89, s)) # define BOOST_PP_WHILE_89(p, o, s) BOOST_PP_IF(p(90, s), BOOST_PP_WHILE_90, s BOOST_PP_TUPLE_EAT_3)(p, o, o(90, s)) # define BOOST_PP_WHILE_90(p, o, s) BOOST_PP_IF(p(91, s), BOOST_PP_WHILE_91, s BOOST_PP_TUPLE_EAT_3)(p, o, o(91, s)) # define BOOST_PP_WHILE_91(p, o, s) BOOST_PP_IF(p(92, s), BOOST_PP_WHILE_92, s BOOST_PP_TUPLE_EAT_3)(p, o, o(92, s)) # define BOOST_PP_WHILE_92(p, o, s) BOOST_PP_IF(p(93, s), BOOST_PP_WHILE_93, s BOOST_PP_TUPLE_EAT_3)(p, o, o(93, s)) # define BOOST_PP_WHILE_93(p, o, s) BOOST_PP_IF(p(94, s), BOOST_PP_WHILE_94, s BOOST_PP_TUPLE_EAT_3)(p, o, o(94, s)) # define BOOST_PP_WHILE_94(p, o, s) BOOST_PP_IF(p(95, s), BOOST_PP_WHILE_95, s BOOST_PP_TUPLE_EAT_3)(p, o, o(95, s)) # define BOOST_PP_WHILE_95(p, o, s) BOOST_PP_IF(p(96, s), BOOST_PP_WHILE_96, s BOOST_PP_TUPLE_EAT_3)(p, o, o(96, s)) # define BOOST_PP_WHILE_96(p, o, s) BOOST_PP_IF(p(97, s), BOOST_PP_WHILE_97, s BOOST_PP_TUPLE_EAT_3)(p, o, o(97, s)) # define BOOST_PP_WHILE_97(p, o, s) BOOST_PP_IF(p(98, s), BOOST_PP_WHILE_98, s BOOST_PP_TUPLE_EAT_3)(p, o, o(98, s)) # define BOOST_PP_WHILE_98(p, o, s) BOOST_PP_IF(p(99, s), BOOST_PP_WHILE_99, s BOOST_PP_TUPLE_EAT_3)(p, o, o(99, s)) # define BOOST_PP_WHILE_99(p, o, s) BOOST_PP_IF(p(100, s), BOOST_PP_WHILE_100, s BOOST_PP_TUPLE_EAT_3)(p, o, o(100, s)) # define BOOST_PP_WHILE_100(p, o, s) BOOST_PP_IF(p(101, s), BOOST_PP_WHILE_101, s BOOST_PP_TUPLE_EAT_3)(p, o, o(101, s)) # define BOOST_PP_WHILE_101(p, o, s) BOOST_PP_IF(p(102, s), BOOST_PP_WHILE_102, s BOOST_PP_TUPLE_EAT_3)(p, o, o(102, s)) # define BOOST_PP_WHILE_102(p, o, s) BOOST_PP_IF(p(103, s), BOOST_PP_WHILE_103, s BOOST_PP_TUPLE_EAT_3)(p, o, o(103, s)) # define BOOST_PP_WHILE_103(p, o, s) BOOST_PP_IF(p(104, s), BOOST_PP_WHILE_104, s BOOST_PP_TUPLE_EAT_3)(p, o, o(104, s)) # define BOOST_PP_WHILE_104(p, o, s) BOOST_PP_IF(p(105, s), BOOST_PP_WHILE_105, s BOOST_PP_TUPLE_EAT_3)(p, o, o(105, s)) # define BOOST_PP_WHILE_105(p, o, s) BOOST_PP_IF(p(106, s), BOOST_PP_WHILE_106, s BOOST_PP_TUPLE_EAT_3)(p, o, o(106, s)) # define BOOST_PP_WHILE_106(p, o, s) BOOST_PP_IF(p(107, s), BOOST_PP_WHILE_107, s BOOST_PP_TUPLE_EAT_3)(p, o, o(107, s)) # define BOOST_PP_WHILE_107(p, o, s) BOOST_PP_IF(p(108, s), BOOST_PP_WHILE_108, s BOOST_PP_TUPLE_EAT_3)(p, o, o(108, s)) # define BOOST_PP_WHILE_108(p, o, s) BOOST_PP_IF(p(109, s), BOOST_PP_WHILE_109, s BOOST_PP_TUPLE_EAT_3)(p, o, o(109, s)) # define BOOST_PP_WHILE_109(p, o, s) BOOST_PP_IF(p(110, s), BOOST_PP_WHILE_110, s BOOST_PP_TUPLE_EAT_3)(p, o, o(110, s)) # define BOOST_PP_WHILE_110(p, o, s) BOOST_PP_IF(p(111, s), BOOST_PP_WHILE_111, s BOOST_PP_TUPLE_EAT_3)(p, o, o(111, s)) # define BOOST_PP_WHILE_111(p, o, s) BOOST_PP_IF(p(112, s), BOOST_PP_WHILE_112, s BOOST_PP_TUPLE_EAT_3)(p, o, o(112, s)) # define BOOST_PP_WHILE_112(p, o, s) BOOST_PP_IF(p(113, s), BOOST_PP_WHILE_113, s BOOST_PP_TUPLE_EAT_3)(p, o, o(113, s)) # define BOOST_PP_WHILE_113(p, o, s) BOOST_PP_IF(p(114, s), BOOST_PP_WHILE_114, s BOOST_PP_TUPLE_EAT_3)(p, o, o(114, s)) # define BOOST_PP_WHILE_114(p, o, s) BOOST_PP_IF(p(115, s), BOOST_PP_WHILE_115, s BOOST_PP_TUPLE_EAT_3)(p, o, o(115, s)) # define BOOST_PP_WHILE_115(p, o, s) BOOST_PP_IF(p(116, s), BOOST_PP_WHILE_116, s BOOST_PP_TUPLE_EAT_3)(p, o, o(116, s)) # define BOOST_PP_WHILE_116(p, o, s) BOOST_PP_IF(p(117, s), BOOST_PP_WHILE_117, s BOOST_PP_TUPLE_EAT_3)(p, o, o(117, s)) # define BOOST_PP_WHILE_117(p, o, s) BOOST_PP_IF(p(118, s), BOOST_PP_WHILE_118, s BOOST_PP_TUPLE_EAT_3)(p, o, o(118, s)) # define BOOST_PP_WHILE_118(p, o, s) BOOST_PP_IF(p(119, s), BOOST_PP_WHILE_119, s BOOST_PP_TUPLE_EAT_3)(p, o, o(119, s)) # define BOOST_PP_WHILE_119(p, o, s) BOOST_PP_IF(p(120, s), BOOST_PP_WHILE_120, s BOOST_PP_TUPLE_EAT_3)(p, o, o(120, s)) # define BOOST_PP_WHILE_120(p, o, s) BOOST_PP_IF(p(121, s), BOOST_PP_WHILE_121, s BOOST_PP_TUPLE_EAT_3)(p, o, o(121, s)) # define BOOST_PP_WHILE_121(p, o, s) BOOST_PP_IF(p(122, s), BOOST_PP_WHILE_122, s BOOST_PP_TUPLE_EAT_3)(p, o, o(122, s)) # define BOOST_PP_WHILE_122(p, o, s) BOOST_PP_IF(p(123, s), BOOST_PP_WHILE_123, s BOOST_PP_TUPLE_EAT_3)(p, o, o(123, s)) # define BOOST_PP_WHILE_123(p, o, s) BOOST_PP_IF(p(124, s), BOOST_PP_WHILE_124, s BOOST_PP_TUPLE_EAT_3)(p, o, o(124, s)) # define BOOST_PP_WHILE_124(p, o, s) BOOST_PP_IF(p(125, s), BOOST_PP_WHILE_125, s BOOST_PP_TUPLE_EAT_3)(p, o, o(125, s)) # define BOOST_PP_WHILE_125(p, o, s) BOOST_PP_IF(p(126, s), BOOST_PP_WHILE_126, s BOOST_PP_TUPLE_EAT_3)(p, o, o(126, s)) # define BOOST_PP_WHILE_126(p, o, s) BOOST_PP_IF(p(127, s), BOOST_PP_WHILE_127, s BOOST_PP_TUPLE_EAT_3)(p, o, o(127, s)) # define BOOST_PP_WHILE_127(p, o, s) BOOST_PP_IF(p(128, s), BOOST_PP_WHILE_128, s BOOST_PP_TUPLE_EAT_3)(p, o, o(128, s)) # define BOOST_PP_WHILE_128(p, o, s) BOOST_PP_IF(p(129, s), BOOST_PP_WHILE_129, s BOOST_PP_TUPLE_EAT_3)(p, o, o(129, s)) # define BOOST_PP_WHILE_129(p, o, s) BOOST_PP_IF(p(130, s), BOOST_PP_WHILE_130, s BOOST_PP_TUPLE_EAT_3)(p, o, o(130, s)) # define BOOST_PP_WHILE_130(p, o, s) BOOST_PP_IF(p(131, s), BOOST_PP_WHILE_131, s BOOST_PP_TUPLE_EAT_3)(p, o, o(131, s)) # define BOOST_PP_WHILE_131(p, o, s) BOOST_PP_IF(p(132, s), BOOST_PP_WHILE_132, s BOOST_PP_TUPLE_EAT_3)(p, o, o(132, s)) # define BOOST_PP_WHILE_132(p, o, s) BOOST_PP_IF(p(133, s), BOOST_PP_WHILE_133, s BOOST_PP_TUPLE_EAT_3)(p, o, o(133, s)) # define BOOST_PP_WHILE_133(p, o, s) BOOST_PP_IF(p(134, s), BOOST_PP_WHILE_134, s BOOST_PP_TUPLE_EAT_3)(p, o, o(134, s)) # define BOOST_PP_WHILE_134(p, o, s) BOOST_PP_IF(p(135, s), BOOST_PP_WHILE_135, s BOOST_PP_TUPLE_EAT_3)(p, o, o(135, s)) # define BOOST_PP_WHILE_135(p, o, s) BOOST_PP_IF(p(136, s), BOOST_PP_WHILE_136, s BOOST_PP_TUPLE_EAT_3)(p, o, o(136, s)) # define BOOST_PP_WHILE_136(p, o, s) BOOST_PP_IF(p(137, s), BOOST_PP_WHILE_137, s BOOST_PP_TUPLE_EAT_3)(p, o, o(137, s)) # define BOOST_PP_WHILE_137(p, o, s) BOOST_PP_IF(p(138, s), BOOST_PP_WHILE_138, s BOOST_PP_TUPLE_EAT_3)(p, o, o(138, s)) # define BOOST_PP_WHILE_138(p, o, s) BOOST_PP_IF(p(139, s), BOOST_PP_WHILE_139, s BOOST_PP_TUPLE_EAT_3)(p, o, o(139, s)) # define BOOST_PP_WHILE_139(p, o, s) BOOST_PP_IF(p(140, s), BOOST_PP_WHILE_140, s BOOST_PP_TUPLE_EAT_3)(p, o, o(140, s)) # define BOOST_PP_WHILE_140(p, o, s) BOOST_PP_IF(p(141, s), BOOST_PP_WHILE_141, s BOOST_PP_TUPLE_EAT_3)(p, o, o(141, s)) # define BOOST_PP_WHILE_141(p, o, s) BOOST_PP_IF(p(142, s), BOOST_PP_WHILE_142, s BOOST_PP_TUPLE_EAT_3)(p, o, o(142, s)) # define BOOST_PP_WHILE_142(p, o, s) BOOST_PP_IF(p(143, s), BOOST_PP_WHILE_143, s BOOST_PP_TUPLE_EAT_3)(p, o, o(143, s)) # define BOOST_PP_WHILE_143(p, o, s) BOOST_PP_IF(p(144, s), BOOST_PP_WHILE_144, s BOOST_PP_TUPLE_EAT_3)(p, o, o(144, s)) # define BOOST_PP_WHILE_144(p, o, s) BOOST_PP_IF(p(145, s), BOOST_PP_WHILE_145, s BOOST_PP_TUPLE_EAT_3)(p, o, o(145, s)) # define BOOST_PP_WHILE_145(p, o, s) BOOST_PP_IF(p(146, s), BOOST_PP_WHILE_146, s BOOST_PP_TUPLE_EAT_3)(p, o, o(146, s)) # define BOOST_PP_WHILE_146(p, o, s) BOOST_PP_IF(p(147, s), BOOST_PP_WHILE_147, s BOOST_PP_TUPLE_EAT_3)(p, o, o(147, s)) # define BOOST_PP_WHILE_147(p, o, s) BOOST_PP_IF(p(148, s), BOOST_PP_WHILE_148, s BOOST_PP_TUPLE_EAT_3)(p, o, o(148, s)) # define BOOST_PP_WHILE_148(p, o, s) BOOST_PP_IF(p(149, s), BOOST_PP_WHILE_149, s BOOST_PP_TUPLE_EAT_3)(p, o, o(149, s)) # define BOOST_PP_WHILE_149(p, o, s) BOOST_PP_IF(p(150, s), BOOST_PP_WHILE_150, s BOOST_PP_TUPLE_EAT_3)(p, o, o(150, s)) # define BOOST_PP_WHILE_150(p, o, s) BOOST_PP_IF(p(151, s), BOOST_PP_WHILE_151, s BOOST_PP_TUPLE_EAT_3)(p, o, o(151, s)) # define BOOST_PP_WHILE_151(p, o, s) BOOST_PP_IF(p(152, s), BOOST_PP_WHILE_152, s BOOST_PP_TUPLE_EAT_3)(p, o, o(152, s)) # define BOOST_PP_WHILE_152(p, o, s) BOOST_PP_IF(p(153, s), BOOST_PP_WHILE_153, s BOOST_PP_TUPLE_EAT_3)(p, o, o(153, s)) # define BOOST_PP_WHILE_153(p, o, s) BOOST_PP_IF(p(154, s), BOOST_PP_WHILE_154, s BOOST_PP_TUPLE_EAT_3)(p, o, o(154, s)) # define BOOST_PP_WHILE_154(p, o, s) BOOST_PP_IF(p(155, s), BOOST_PP_WHILE_155, s BOOST_PP_TUPLE_EAT_3)(p, o, o(155, s)) # define BOOST_PP_WHILE_155(p, o, s) BOOST_PP_IF(p(156, s), BOOST_PP_WHILE_156, s BOOST_PP_TUPLE_EAT_3)(p, o, o(156, s)) # define BOOST_PP_WHILE_156(p, o, s) BOOST_PP_IF(p(157, s), BOOST_PP_WHILE_157, s BOOST_PP_TUPLE_EAT_3)(p, o, o(157, s)) # define BOOST_PP_WHILE_157(p, o, s) BOOST_PP_IF(p(158, s), BOOST_PP_WHILE_158, s BOOST_PP_TUPLE_EAT_3)(p, o, o(158, s)) # define BOOST_PP_WHILE_158(p, o, s) BOOST_PP_IF(p(159, s), BOOST_PP_WHILE_159, s BOOST_PP_TUPLE_EAT_3)(p, o, o(159, s)) # define BOOST_PP_WHILE_159(p, o, s) BOOST_PP_IF(p(160, s), BOOST_PP_WHILE_160, s BOOST_PP_TUPLE_EAT_3)(p, o, o(160, s)) # define BOOST_PP_WHILE_160(p, o, s) BOOST_PP_IF(p(161, s), BOOST_PP_WHILE_161, s BOOST_PP_TUPLE_EAT_3)(p, o, o(161, s)) # define BOOST_PP_WHILE_161(p, o, s) BOOST_PP_IF(p(162, s), BOOST_PP_WHILE_162, s BOOST_PP_TUPLE_EAT_3)(p, o, o(162, s)) # define BOOST_PP_WHILE_162(p, o, s) BOOST_PP_IF(p(163, s), BOOST_PP_WHILE_163, s BOOST_PP_TUPLE_EAT_3)(p, o, o(163, s)) # define BOOST_PP_WHILE_163(p, o, s) BOOST_PP_IF(p(164, s), BOOST_PP_WHILE_164, s BOOST_PP_TUPLE_EAT_3)(p, o, o(164, s)) # define BOOST_PP_WHILE_164(p, o, s) BOOST_PP_IF(p(165, s), BOOST_PP_WHILE_165, s BOOST_PP_TUPLE_EAT_3)(p, o, o(165, s)) # define BOOST_PP_WHILE_165(p, o, s) BOOST_PP_IF(p(166, s), BOOST_PP_WHILE_166, s BOOST_PP_TUPLE_EAT_3)(p, o, o(166, s)) # define BOOST_PP_WHILE_166(p, o, s) BOOST_PP_IF(p(167, s), BOOST_PP_WHILE_167, s BOOST_PP_TUPLE_EAT_3)(p, o, o(167, s)) # define BOOST_PP_WHILE_167(p, o, s) BOOST_PP_IF(p(168, s), BOOST_PP_WHILE_168, s BOOST_PP_TUPLE_EAT_3)(p, o, o(168, s)) # define BOOST_PP_WHILE_168(p, o, s) BOOST_PP_IF(p(169, s), BOOST_PP_WHILE_169, s BOOST_PP_TUPLE_EAT_3)(p, o, o(169, s)) # define BOOST_PP_WHILE_169(p, o, s) BOOST_PP_IF(p(170, s), BOOST_PP_WHILE_170, s BOOST_PP_TUPLE_EAT_3)(p, o, o(170, s)) # define BOOST_PP_WHILE_170(p, o, s) BOOST_PP_IF(p(171, s), BOOST_PP_WHILE_171, s BOOST_PP_TUPLE_EAT_3)(p, o, o(171, s)) # define BOOST_PP_WHILE_171(p, o, s) BOOST_PP_IF(p(172, s), BOOST_PP_WHILE_172, s BOOST_PP_TUPLE_EAT_3)(p, o, o(172, s)) # define BOOST_PP_WHILE_172(p, o, s) BOOST_PP_IF(p(173, s), BOOST_PP_WHILE_173, s BOOST_PP_TUPLE_EAT_3)(p, o, o(173, s)) # define BOOST_PP_WHILE_173(p, o, s) BOOST_PP_IF(p(174, s), BOOST_PP_WHILE_174, s BOOST_PP_TUPLE_EAT_3)(p, o, o(174, s)) # define BOOST_PP_WHILE_174(p, o, s) BOOST_PP_IF(p(175, s), BOOST_PP_WHILE_175, s BOOST_PP_TUPLE_EAT_3)(p, o, o(175, s)) # define BOOST_PP_WHILE_175(p, o, s) BOOST_PP_IF(p(176, s), BOOST_PP_WHILE_176, s BOOST_PP_TUPLE_EAT_3)(p, o, o(176, s)) # define BOOST_PP_WHILE_176(p, o, s) BOOST_PP_IF(p(177, s), BOOST_PP_WHILE_177, s BOOST_PP_TUPLE_EAT_3)(p, o, o(177, s)) # define BOOST_PP_WHILE_177(p, o, s) BOOST_PP_IF(p(178, s), BOOST_PP_WHILE_178, s BOOST_PP_TUPLE_EAT_3)(p, o, o(178, s)) # define BOOST_PP_WHILE_178(p, o, s) BOOST_PP_IF(p(179, s), BOOST_PP_WHILE_179, s BOOST_PP_TUPLE_EAT_3)(p, o, o(179, s)) # define BOOST_PP_WHILE_179(p, o, s) BOOST_PP_IF(p(180, s), BOOST_PP_WHILE_180, s BOOST_PP_TUPLE_EAT_3)(p, o, o(180, s)) # define BOOST_PP_WHILE_180(p, o, s) BOOST_PP_IF(p(181, s), BOOST_PP_WHILE_181, s BOOST_PP_TUPLE_EAT_3)(p, o, o(181, s)) # define BOOST_PP_WHILE_181(p, o, s) BOOST_PP_IF(p(182, s), BOOST_PP_WHILE_182, s BOOST_PP_TUPLE_EAT_3)(p, o, o(182, s)) # define BOOST_PP_WHILE_182(p, o, s) BOOST_PP_IF(p(183, s), BOOST_PP_WHILE_183, s BOOST_PP_TUPLE_EAT_3)(p, o, o(183, s)) # define BOOST_PP_WHILE_183(p, o, s) BOOST_PP_IF(p(184, s), BOOST_PP_WHILE_184, s BOOST_PP_TUPLE_EAT_3)(p, o, o(184, s)) # define BOOST_PP_WHILE_184(p, o, s) BOOST_PP_IF(p(185, s), BOOST_PP_WHILE_185, s BOOST_PP_TUPLE_EAT_3)(p, o, o(185, s)) # define BOOST_PP_WHILE_185(p, o, s) BOOST_PP_IF(p(186, s), BOOST_PP_WHILE_186, s BOOST_PP_TUPLE_EAT_3)(p, o, o(186, s)) # define BOOST_PP_WHILE_186(p, o, s) BOOST_PP_IF(p(187, s), BOOST_PP_WHILE_187, s BOOST_PP_TUPLE_EAT_3)(p, o, o(187, s)) # define BOOST_PP_WHILE_187(p, o, s) BOOST_PP_IF(p(188, s), BOOST_PP_WHILE_188, s BOOST_PP_TUPLE_EAT_3)(p, o, o(188, s)) # define BOOST_PP_WHILE_188(p, o, s) BOOST_PP_IF(p(189, s), BOOST_PP_WHILE_189, s BOOST_PP_TUPLE_EAT_3)(p, o, o(189, s)) # define BOOST_PP_WHILE_189(p, o, s) BOOST_PP_IF(p(190, s), BOOST_PP_WHILE_190, s BOOST_PP_TUPLE_EAT_3)(p, o, o(190, s)) # define BOOST_PP_WHILE_190(p, o, s) BOOST_PP_IF(p(191, s), BOOST_PP_WHILE_191, s BOOST_PP_TUPLE_EAT_3)(p, o, o(191, s)) # define BOOST_PP_WHILE_191(p, o, s) BOOST_PP_IF(p(192, s), BOOST_PP_WHILE_192, s BOOST_PP_TUPLE_EAT_3)(p, o, o(192, s)) # define BOOST_PP_WHILE_192(p, o, s) BOOST_PP_IF(p(193, s), BOOST_PP_WHILE_193, s BOOST_PP_TUPLE_EAT_3)(p, o, o(193, s)) # define BOOST_PP_WHILE_193(p, o, s) BOOST_PP_IF(p(194, s), BOOST_PP_WHILE_194, s BOOST_PP_TUPLE_EAT_3)(p, o, o(194, s)) # define BOOST_PP_WHILE_194(p, o, s) BOOST_PP_IF(p(195, s), BOOST_PP_WHILE_195, s BOOST_PP_TUPLE_EAT_3)(p, o, o(195, s)) # define BOOST_PP_WHILE_195(p, o, s) BOOST_PP_IF(p(196, s), BOOST_PP_WHILE_196, s BOOST_PP_TUPLE_EAT_3)(p, o, o(196, s)) # define BOOST_PP_WHILE_196(p, o, s) BOOST_PP_IF(p(197, s), BOOST_PP_WHILE_197, s BOOST_PP_TUPLE_EAT_3)(p, o, o(197, s)) # define BOOST_PP_WHILE_197(p, o, s) BOOST_PP_IF(p(198, s), BOOST_PP_WHILE_198, s BOOST_PP_TUPLE_EAT_3)(p, o, o(198, s)) # define BOOST_PP_WHILE_198(p, o, s) BOOST_PP_IF(p(199, s), BOOST_PP_WHILE_199, s BOOST_PP_TUPLE_EAT_3)(p, o, o(199, s)) # define BOOST_PP_WHILE_199(p, o, s) BOOST_PP_IF(p(200, s), BOOST_PP_WHILE_200, s BOOST_PP_TUPLE_EAT_3)(p, o, o(200, s)) # define BOOST_PP_WHILE_200(p, o, s) BOOST_PP_IF(p(201, s), BOOST_PP_WHILE_201, s BOOST_PP_TUPLE_EAT_3)(p, o, o(201, s)) # define BOOST_PP_WHILE_201(p, o, s) BOOST_PP_IF(p(202, s), BOOST_PP_WHILE_202, s BOOST_PP_TUPLE_EAT_3)(p, o, o(202, s)) # define BOOST_PP_WHILE_202(p, o, s) BOOST_PP_IF(p(203, s), BOOST_PP_WHILE_203, s BOOST_PP_TUPLE_EAT_3)(p, o, o(203, s)) # define BOOST_PP_WHILE_203(p, o, s) BOOST_PP_IF(p(204, s), BOOST_PP_WHILE_204, s BOOST_PP_TUPLE_EAT_3)(p, o, o(204, s)) # define BOOST_PP_WHILE_204(p, o, s) BOOST_PP_IF(p(205, s), BOOST_PP_WHILE_205, s BOOST_PP_TUPLE_EAT_3)(p, o, o(205, s)) # define BOOST_PP_WHILE_205(p, o, s) BOOST_PP_IF(p(206, s), BOOST_PP_WHILE_206, s BOOST_PP_TUPLE_EAT_3)(p, o, o(206, s)) # define BOOST_PP_WHILE_206(p, o, s) BOOST_PP_IF(p(207, s), BOOST_PP_WHILE_207, s BOOST_PP_TUPLE_EAT_3)(p, o, o(207, s)) # define BOOST_PP_WHILE_207(p, o, s) BOOST_PP_IF(p(208, s), BOOST_PP_WHILE_208, s BOOST_PP_TUPLE_EAT_3)(p, o, o(208, s)) # define BOOST_PP_WHILE_208(p, o, s) BOOST_PP_IF(p(209, s), BOOST_PP_WHILE_209, s BOOST_PP_TUPLE_EAT_3)(p, o, o(209, s)) # define BOOST_PP_WHILE_209(p, o, s) BOOST_PP_IF(p(210, s), BOOST_PP_WHILE_210, s BOOST_PP_TUPLE_EAT_3)(p, o, o(210, s)) # define BOOST_PP_WHILE_210(p, o, s) BOOST_PP_IF(p(211, s), BOOST_PP_WHILE_211, s BOOST_PP_TUPLE_EAT_3)(p, o, o(211, s)) # define BOOST_PP_WHILE_211(p, o, s) BOOST_PP_IF(p(212, s), BOOST_PP_WHILE_212, s BOOST_PP_TUPLE_EAT_3)(p, o, o(212, s)) # define BOOST_PP_WHILE_212(p, o, s) BOOST_PP_IF(p(213, s), BOOST_PP_WHILE_213, s BOOST_PP_TUPLE_EAT_3)(p, o, o(213, s)) # define BOOST_PP_WHILE_213(p, o, s) BOOST_PP_IF(p(214, s), BOOST_PP_WHILE_214, s BOOST_PP_TUPLE_EAT_3)(p, o, o(214, s)) # define BOOST_PP_WHILE_214(p, o, s) BOOST_PP_IF(p(215, s), BOOST_PP_WHILE_215, s BOOST_PP_TUPLE_EAT_3)(p, o, o(215, s)) # define BOOST_PP_WHILE_215(p, o, s) BOOST_PP_IF(p(216, s), BOOST_PP_WHILE_216, s BOOST_PP_TUPLE_EAT_3)(p, o, o(216, s)) # define BOOST_PP_WHILE_216(p, o, s) BOOST_PP_IF(p(217, s), BOOST_PP_WHILE_217, s BOOST_PP_TUPLE_EAT_3)(p, o, o(217, s)) # define BOOST_PP_WHILE_217(p, o, s) BOOST_PP_IF(p(218, s), BOOST_PP_WHILE_218, s BOOST_PP_TUPLE_EAT_3)(p, o, o(218, s)) # define BOOST_PP_WHILE_218(p, o, s) BOOST_PP_IF(p(219, s), BOOST_PP_WHILE_219, s BOOST_PP_TUPLE_EAT_3)(p, o, o(219, s)) # define BOOST_PP_WHILE_219(p, o, s) BOOST_PP_IF(p(220, s), BOOST_PP_WHILE_220, s BOOST_PP_TUPLE_EAT_3)(p, o, o(220, s)) # define BOOST_PP_WHILE_220(p, o, s) BOOST_PP_IF(p(221, s), BOOST_PP_WHILE_221, s BOOST_PP_TUPLE_EAT_3)(p, o, o(221, s)) # define BOOST_PP_WHILE_221(p, o, s) BOOST_PP_IF(p(222, s), BOOST_PP_WHILE_222, s BOOST_PP_TUPLE_EAT_3)(p, o, o(222, s)) # define BOOST_PP_WHILE_222(p, o, s) BOOST_PP_IF(p(223, s), BOOST_PP_WHILE_223, s BOOST_PP_TUPLE_EAT_3)(p, o, o(223, s)) # define BOOST_PP_WHILE_223(p, o, s) BOOST_PP_IF(p(224, s), BOOST_PP_WHILE_224, s BOOST_PP_TUPLE_EAT_3)(p, o, o(224, s)) # define BOOST_PP_WHILE_224(p, o, s) BOOST_PP_IF(p(225, s), BOOST_PP_WHILE_225, s BOOST_PP_TUPLE_EAT_3)(p, o, o(225, s)) # define BOOST_PP_WHILE_225(p, o, s) BOOST_PP_IF(p(226, s), BOOST_PP_WHILE_226, s BOOST_PP_TUPLE_EAT_3)(p, o, o(226, s)) # define BOOST_PP_WHILE_226(p, o, s) BOOST_PP_IF(p(227, s), BOOST_PP_WHILE_227, s BOOST_PP_TUPLE_EAT_3)(p, o, o(227, s)) # define BOOST_PP_WHILE_227(p, o, s) BOOST_PP_IF(p(228, s), BOOST_PP_WHILE_228, s BOOST_PP_TUPLE_EAT_3)(p, o, o(228, s)) # define BOOST_PP_WHILE_228(p, o, s) BOOST_PP_IF(p(229, s), BOOST_PP_WHILE_229, s BOOST_PP_TUPLE_EAT_3)(p, o, o(229, s)) # define BOOST_PP_WHILE_229(p, o, s) BOOST_PP_IF(p(230, s), BOOST_PP_WHILE_230, s BOOST_PP_TUPLE_EAT_3)(p, o, o(230, s)) # define BOOST_PP_WHILE_230(p, o, s) BOOST_PP_IF(p(231, s), BOOST_PP_WHILE_231, s BOOST_PP_TUPLE_EAT_3)(p, o, o(231, s)) # define BOOST_PP_WHILE_231(p, o, s) BOOST_PP_IF(p(232, s), BOOST_PP_WHILE_232, s BOOST_PP_TUPLE_EAT_3)(p, o, o(232, s)) # define BOOST_PP_WHILE_232(p, o, s) BOOST_PP_IF(p(233, s), BOOST_PP_WHILE_233, s BOOST_PP_TUPLE_EAT_3)(p, o, o(233, s)) # define BOOST_PP_WHILE_233(p, o, s) BOOST_PP_IF(p(234, s), BOOST_PP_WHILE_234, s BOOST_PP_TUPLE_EAT_3)(p, o, o(234, s)) # define BOOST_PP_WHILE_234(p, o, s) BOOST_PP_IF(p(235, s), BOOST_PP_WHILE_235, s BOOST_PP_TUPLE_EAT_3)(p, o, o(235, s)) # define BOOST_PP_WHILE_235(p, o, s) BOOST_PP_IF(p(236, s), BOOST_PP_WHILE_236, s BOOST_PP_TUPLE_EAT_3)(p, o, o(236, s)) # define BOOST_PP_WHILE_236(p, o, s) BOOST_PP_IF(p(237, s), BOOST_PP_WHILE_237, s BOOST_PP_TUPLE_EAT_3)(p, o, o(237, s)) # define BOOST_PP_WHILE_237(p, o, s) BOOST_PP_IF(p(238, s), BOOST_PP_WHILE_238, s BOOST_PP_TUPLE_EAT_3)(p, o, o(238, s)) # define BOOST_PP_WHILE_238(p, o, s) BOOST_PP_IF(p(239, s), BOOST_PP_WHILE_239, s BOOST_PP_TUPLE_EAT_3)(p, o, o(239, s)) # define BOOST_PP_WHILE_239(p, o, s) BOOST_PP_IF(p(240, s), BOOST_PP_WHILE_240, s BOOST_PP_TUPLE_EAT_3)(p, o, o(240, s)) # define BOOST_PP_WHILE_240(p, o, s) BOOST_PP_IF(p(241, s), BOOST_PP_WHILE_241, s BOOST_PP_TUPLE_EAT_3)(p, o, o(241, s)) # define BOOST_PP_WHILE_241(p, o, s) BOOST_PP_IF(p(242, s), BOOST_PP_WHILE_242, s BOOST_PP_TUPLE_EAT_3)(p, o, o(242, s)) # define BOOST_PP_WHILE_242(p, o, s) BOOST_PP_IF(p(243, s), BOOST_PP_WHILE_243, s BOOST_PP_TUPLE_EAT_3)(p, o, o(243, s)) # define BOOST_PP_WHILE_243(p, o, s) BOOST_PP_IF(p(244, s), BOOST_PP_WHILE_244, s BOOST_PP_TUPLE_EAT_3)(p, o, o(244, s)) # define BOOST_PP_WHILE_244(p, o, s) BOOST_PP_IF(p(245, s), BOOST_PP_WHILE_245, s BOOST_PP_TUPLE_EAT_3)(p, o, o(245, s)) # define BOOST_PP_WHILE_245(p, o, s) BOOST_PP_IF(p(246, s), BOOST_PP_WHILE_246, s BOOST_PP_TUPLE_EAT_3)(p, o, o(246, s)) # define BOOST_PP_WHILE_246(p, o, s) BOOST_PP_IF(p(247, s), BOOST_PP_WHILE_247, s BOOST_PP_TUPLE_EAT_3)(p, o, o(247, s)) # define BOOST_PP_WHILE_247(p, o, s) BOOST_PP_IF(p(248, s), BOOST_PP_WHILE_248, s BOOST_PP_TUPLE_EAT_3)(p, o, o(248, s)) # define BOOST_PP_WHILE_248(p, o, s) BOOST_PP_IF(p(249, s), BOOST_PP_WHILE_249, s BOOST_PP_TUPLE_EAT_3)(p, o, o(249, s)) # define BOOST_PP_WHILE_249(p, o, s) BOOST_PP_IF(p(250, s), BOOST_PP_WHILE_250, s BOOST_PP_TUPLE_EAT_3)(p, o, o(250, s)) # define BOOST_PP_WHILE_250(p, o, s) BOOST_PP_IF(p(251, s), BOOST_PP_WHILE_251, s BOOST_PP_TUPLE_EAT_3)(p, o, o(251, s)) # define BOOST_PP_WHILE_251(p, o, s) BOOST_PP_IF(p(252, s), BOOST_PP_WHILE_252, s BOOST_PP_TUPLE_EAT_3)(p, o, o(252, s)) # define BOOST_PP_WHILE_252(p, o, s) BOOST_PP_IF(p(253, s), BOOST_PP_WHILE_253, s BOOST_PP_TUPLE_EAT_3)(p, o, o(253, s)) # define BOOST_PP_WHILE_253(p, o, s) BOOST_PP_IF(p(254, s), BOOST_PP_WHILE_254, s BOOST_PP_TUPLE_EAT_3)(p, o, o(254, s)) # define BOOST_PP_WHILE_254(p, o, s) BOOST_PP_IF(p(255, s), BOOST_PP_WHILE_255, s BOOST_PP_TUPLE_EAT_3)(p, o, o(255, s)) # define BOOST_PP_WHILE_255(p, o, s) BOOST_PP_IF(p(256, s), BOOST_PP_WHILE_256, s BOOST_PP_TUPLE_EAT_3)(p, o, o(256, s)) # define BOOST_PP_WHILE_256(p, o, s) BOOST_PP_IF(p(257, s), BOOST_PP_WHILE_257, s BOOST_PP_TUPLE_EAT_3)(p, o, o(257, s)) # # endif ================================================ FILE: benchmarks/boost/preprocessor/control/detail/while.hpp ================================================ # /* Copyright (C) 2001 # * Housemarque Oy # * http://www.housemarque.com # * # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # */ # # /* Revised by Paul Mensonides (2002) */ # # /* See http://www.boost.org for most recent version. */ # # ifndef BOOST_PREPROCESSOR_CONTROL_DETAIL_WHILE_HPP # define BOOST_PREPROCESSOR_CONTROL_DETAIL_WHILE_HPP # # include # include # include # # define BOOST_PP_WHILE_1(p, o, s) BOOST_PP_WHILE_1_C(BOOST_PP_BOOL(p(2, s)), p, o, s) # define BOOST_PP_WHILE_2(p, o, s) BOOST_PP_WHILE_2_C(BOOST_PP_BOOL(p(3, s)), p, o, s) # define BOOST_PP_WHILE_3(p, o, s) BOOST_PP_WHILE_3_C(BOOST_PP_BOOL(p(4, s)), p, o, s) # define BOOST_PP_WHILE_4(p, o, s) BOOST_PP_WHILE_4_C(BOOST_PP_BOOL(p(5, s)), p, o, s) # define BOOST_PP_WHILE_5(p, o, s) BOOST_PP_WHILE_5_C(BOOST_PP_BOOL(p(6, s)), p, o, s) # define BOOST_PP_WHILE_6(p, o, s) BOOST_PP_WHILE_6_C(BOOST_PP_BOOL(p(7, s)), p, o, s) # define BOOST_PP_WHILE_7(p, o, s) BOOST_PP_WHILE_7_C(BOOST_PP_BOOL(p(8, s)), p, o, s) # define BOOST_PP_WHILE_8(p, o, s) BOOST_PP_WHILE_8_C(BOOST_PP_BOOL(p(9, s)), p, o, s) # define BOOST_PP_WHILE_9(p, o, s) BOOST_PP_WHILE_9_C(BOOST_PP_BOOL(p(10, s)), p, o, s) # define BOOST_PP_WHILE_10(p, o, s) BOOST_PP_WHILE_10_C(BOOST_PP_BOOL(p(11, s)), p, o, s) # define BOOST_PP_WHILE_11(p, o, s) BOOST_PP_WHILE_11_C(BOOST_PP_BOOL(p(12, s)), p, o, s) # define BOOST_PP_WHILE_12(p, o, s) BOOST_PP_WHILE_12_C(BOOST_PP_BOOL(p(13, s)), p, o, s) # define BOOST_PP_WHILE_13(p, o, s) BOOST_PP_WHILE_13_C(BOOST_PP_BOOL(p(14, s)), p, o, s) # define BOOST_PP_WHILE_14(p, o, s) BOOST_PP_WHILE_14_C(BOOST_PP_BOOL(p(15, s)), p, o, s) # define BOOST_PP_WHILE_15(p, o, s) BOOST_PP_WHILE_15_C(BOOST_PP_BOOL(p(16, s)), p, o, s) # define BOOST_PP_WHILE_16(p, o, s) BOOST_PP_WHILE_16_C(BOOST_PP_BOOL(p(17, s)), p, o, s) # define BOOST_PP_WHILE_17(p, o, s) BOOST_PP_WHILE_17_C(BOOST_PP_BOOL(p(18, s)), p, o, s) # define BOOST_PP_WHILE_18(p, o, s) BOOST_PP_WHILE_18_C(BOOST_PP_BOOL(p(19, s)), p, o, s) # define BOOST_PP_WHILE_19(p, o, s) BOOST_PP_WHILE_19_C(BOOST_PP_BOOL(p(20, s)), p, o, s) # define BOOST_PP_WHILE_20(p, o, s) BOOST_PP_WHILE_20_C(BOOST_PP_BOOL(p(21, s)), p, o, s) # define BOOST_PP_WHILE_21(p, o, s) BOOST_PP_WHILE_21_C(BOOST_PP_BOOL(p(22, s)), p, o, s) # define BOOST_PP_WHILE_22(p, o, s) BOOST_PP_WHILE_22_C(BOOST_PP_BOOL(p(23, s)), p, o, s) # define BOOST_PP_WHILE_23(p, o, s) BOOST_PP_WHILE_23_C(BOOST_PP_BOOL(p(24, s)), p, o, s) # define BOOST_PP_WHILE_24(p, o, s) BOOST_PP_WHILE_24_C(BOOST_PP_BOOL(p(25, s)), p, o, s) # define BOOST_PP_WHILE_25(p, o, s) BOOST_PP_WHILE_25_C(BOOST_PP_BOOL(p(26, s)), p, o, s) # define BOOST_PP_WHILE_26(p, o, s) BOOST_PP_WHILE_26_C(BOOST_PP_BOOL(p(27, s)), p, o, s) # define BOOST_PP_WHILE_27(p, o, s) BOOST_PP_WHILE_27_C(BOOST_PP_BOOL(p(28, s)), p, o, s) # define BOOST_PP_WHILE_28(p, o, s) BOOST_PP_WHILE_28_C(BOOST_PP_BOOL(p(29, s)), p, o, s) # define BOOST_PP_WHILE_29(p, o, s) BOOST_PP_WHILE_29_C(BOOST_PP_BOOL(p(30, s)), p, o, s) # define BOOST_PP_WHILE_30(p, o, s) BOOST_PP_WHILE_30_C(BOOST_PP_BOOL(p(31, s)), p, o, s) # define BOOST_PP_WHILE_31(p, o, s) BOOST_PP_WHILE_31_C(BOOST_PP_BOOL(p(32, s)), p, o, s) # define BOOST_PP_WHILE_32(p, o, s) BOOST_PP_WHILE_32_C(BOOST_PP_BOOL(p(33, s)), p, o, s) # define BOOST_PP_WHILE_33(p, o, s) BOOST_PP_WHILE_33_C(BOOST_PP_BOOL(p(34, s)), p, o, s) # define BOOST_PP_WHILE_34(p, o, s) BOOST_PP_WHILE_34_C(BOOST_PP_BOOL(p(35, s)), p, o, s) # define BOOST_PP_WHILE_35(p, o, s) BOOST_PP_WHILE_35_C(BOOST_PP_BOOL(p(36, s)), p, o, s) # define BOOST_PP_WHILE_36(p, o, s) BOOST_PP_WHILE_36_C(BOOST_PP_BOOL(p(37, s)), p, o, s) # define BOOST_PP_WHILE_37(p, o, s) BOOST_PP_WHILE_37_C(BOOST_PP_BOOL(p(38, s)), p, o, s) # define BOOST_PP_WHILE_38(p, o, s) BOOST_PP_WHILE_38_C(BOOST_PP_BOOL(p(39, s)), p, o, s) # define BOOST_PP_WHILE_39(p, o, s) BOOST_PP_WHILE_39_C(BOOST_PP_BOOL(p(40, s)), p, o, s) # define BOOST_PP_WHILE_40(p, o, s) BOOST_PP_WHILE_40_C(BOOST_PP_BOOL(p(41, s)), p, o, s) # define BOOST_PP_WHILE_41(p, o, s) BOOST_PP_WHILE_41_C(BOOST_PP_BOOL(p(42, s)), p, o, s) # define BOOST_PP_WHILE_42(p, o, s) BOOST_PP_WHILE_42_C(BOOST_PP_BOOL(p(43, s)), p, o, s) # define BOOST_PP_WHILE_43(p, o, s) BOOST_PP_WHILE_43_C(BOOST_PP_BOOL(p(44, s)), p, o, s) # define BOOST_PP_WHILE_44(p, o, s) BOOST_PP_WHILE_44_C(BOOST_PP_BOOL(p(45, s)), p, o, s) # define BOOST_PP_WHILE_45(p, o, s) BOOST_PP_WHILE_45_C(BOOST_PP_BOOL(p(46, s)), p, o, s) # define BOOST_PP_WHILE_46(p, o, s) BOOST_PP_WHILE_46_C(BOOST_PP_BOOL(p(47, s)), p, o, s) # define BOOST_PP_WHILE_47(p, o, s) BOOST_PP_WHILE_47_C(BOOST_PP_BOOL(p(48, s)), p, o, s) # define BOOST_PP_WHILE_48(p, o, s) BOOST_PP_WHILE_48_C(BOOST_PP_BOOL(p(49, s)), p, o, s) # define BOOST_PP_WHILE_49(p, o, s) BOOST_PP_WHILE_49_C(BOOST_PP_BOOL(p(50, s)), p, o, s) # define BOOST_PP_WHILE_50(p, o, s) BOOST_PP_WHILE_50_C(BOOST_PP_BOOL(p(51, s)), p, o, s) # define BOOST_PP_WHILE_51(p, o, s) BOOST_PP_WHILE_51_C(BOOST_PP_BOOL(p(52, s)), p, o, s) # define BOOST_PP_WHILE_52(p, o, s) BOOST_PP_WHILE_52_C(BOOST_PP_BOOL(p(53, s)), p, o, s) # define BOOST_PP_WHILE_53(p, o, s) BOOST_PP_WHILE_53_C(BOOST_PP_BOOL(p(54, s)), p, o, s) # define BOOST_PP_WHILE_54(p, o, s) BOOST_PP_WHILE_54_C(BOOST_PP_BOOL(p(55, s)), p, o, s) # define BOOST_PP_WHILE_55(p, o, s) BOOST_PP_WHILE_55_C(BOOST_PP_BOOL(p(56, s)), p, o, s) # define BOOST_PP_WHILE_56(p, o, s) BOOST_PP_WHILE_56_C(BOOST_PP_BOOL(p(57, s)), p, o, s) # define BOOST_PP_WHILE_57(p, o, s) BOOST_PP_WHILE_57_C(BOOST_PP_BOOL(p(58, s)), p, o, s) # define BOOST_PP_WHILE_58(p, o, s) BOOST_PP_WHILE_58_C(BOOST_PP_BOOL(p(59, s)), p, o, s) # define BOOST_PP_WHILE_59(p, o, s) BOOST_PP_WHILE_59_C(BOOST_PP_BOOL(p(60, s)), p, o, s) # define BOOST_PP_WHILE_60(p, o, s) BOOST_PP_WHILE_60_C(BOOST_PP_BOOL(p(61, s)), p, o, s) # define BOOST_PP_WHILE_61(p, o, s) BOOST_PP_WHILE_61_C(BOOST_PP_BOOL(p(62, s)), p, o, s) # define BOOST_PP_WHILE_62(p, o, s) BOOST_PP_WHILE_62_C(BOOST_PP_BOOL(p(63, s)), p, o, s) # define BOOST_PP_WHILE_63(p, o, s) BOOST_PP_WHILE_63_C(BOOST_PP_BOOL(p(64, s)), p, o, s) # define BOOST_PP_WHILE_64(p, o, s) BOOST_PP_WHILE_64_C(BOOST_PP_BOOL(p(65, s)), p, o, s) # define BOOST_PP_WHILE_65(p, o, s) BOOST_PP_WHILE_65_C(BOOST_PP_BOOL(p(66, s)), p, o, s) # define BOOST_PP_WHILE_66(p, o, s) BOOST_PP_WHILE_66_C(BOOST_PP_BOOL(p(67, s)), p, o, s) # define BOOST_PP_WHILE_67(p, o, s) BOOST_PP_WHILE_67_C(BOOST_PP_BOOL(p(68, s)), p, o, s) # define BOOST_PP_WHILE_68(p, o, s) BOOST_PP_WHILE_68_C(BOOST_PP_BOOL(p(69, s)), p, o, s) # define BOOST_PP_WHILE_69(p, o, s) BOOST_PP_WHILE_69_C(BOOST_PP_BOOL(p(70, s)), p, o, s) # define BOOST_PP_WHILE_70(p, o, s) BOOST_PP_WHILE_70_C(BOOST_PP_BOOL(p(71, s)), p, o, s) # define BOOST_PP_WHILE_71(p, o, s) BOOST_PP_WHILE_71_C(BOOST_PP_BOOL(p(72, s)), p, o, s) # define BOOST_PP_WHILE_72(p, o, s) BOOST_PP_WHILE_72_C(BOOST_PP_BOOL(p(73, s)), p, o, s) # define BOOST_PP_WHILE_73(p, o, s) BOOST_PP_WHILE_73_C(BOOST_PP_BOOL(p(74, s)), p, o, s) # define BOOST_PP_WHILE_74(p, o, s) BOOST_PP_WHILE_74_C(BOOST_PP_BOOL(p(75, s)), p, o, s) # define BOOST_PP_WHILE_75(p, o, s) BOOST_PP_WHILE_75_C(BOOST_PP_BOOL(p(76, s)), p, o, s) # define BOOST_PP_WHILE_76(p, o, s) BOOST_PP_WHILE_76_C(BOOST_PP_BOOL(p(77, s)), p, o, s) # define BOOST_PP_WHILE_77(p, o, s) BOOST_PP_WHILE_77_C(BOOST_PP_BOOL(p(78, s)), p, o, s) # define BOOST_PP_WHILE_78(p, o, s) BOOST_PP_WHILE_78_C(BOOST_PP_BOOL(p(79, s)), p, o, s) # define BOOST_PP_WHILE_79(p, o, s) BOOST_PP_WHILE_79_C(BOOST_PP_BOOL(p(80, s)), p, o, s) # define BOOST_PP_WHILE_80(p, o, s) BOOST_PP_WHILE_80_C(BOOST_PP_BOOL(p(81, s)), p, o, s) # define BOOST_PP_WHILE_81(p, o, s) BOOST_PP_WHILE_81_C(BOOST_PP_BOOL(p(82, s)), p, o, s) # define BOOST_PP_WHILE_82(p, o, s) BOOST_PP_WHILE_82_C(BOOST_PP_BOOL(p(83, s)), p, o, s) # define BOOST_PP_WHILE_83(p, o, s) BOOST_PP_WHILE_83_C(BOOST_PP_BOOL(p(84, s)), p, o, s) # define BOOST_PP_WHILE_84(p, o, s) BOOST_PP_WHILE_84_C(BOOST_PP_BOOL(p(85, s)), p, o, s) # define BOOST_PP_WHILE_85(p, o, s) BOOST_PP_WHILE_85_C(BOOST_PP_BOOL(p(86, s)), p, o, s) # define BOOST_PP_WHILE_86(p, o, s) BOOST_PP_WHILE_86_C(BOOST_PP_BOOL(p(87, s)), p, o, s) # define BOOST_PP_WHILE_87(p, o, s) BOOST_PP_WHILE_87_C(BOOST_PP_BOOL(p(88, s)), p, o, s) # define BOOST_PP_WHILE_88(p, o, s) BOOST_PP_WHILE_88_C(BOOST_PP_BOOL(p(89, s)), p, o, s) # define BOOST_PP_WHILE_89(p, o, s) BOOST_PP_WHILE_89_C(BOOST_PP_BOOL(p(90, s)), p, o, s) # define BOOST_PP_WHILE_90(p, o, s) BOOST_PP_WHILE_90_C(BOOST_PP_BOOL(p(91, s)), p, o, s) # define BOOST_PP_WHILE_91(p, o, s) BOOST_PP_WHILE_91_C(BOOST_PP_BOOL(p(92, s)), p, o, s) # define BOOST_PP_WHILE_92(p, o, s) BOOST_PP_WHILE_92_C(BOOST_PP_BOOL(p(93, s)), p, o, s) # define BOOST_PP_WHILE_93(p, o, s) BOOST_PP_WHILE_93_C(BOOST_PP_BOOL(p(94, s)), p, o, s) # define BOOST_PP_WHILE_94(p, o, s) BOOST_PP_WHILE_94_C(BOOST_PP_BOOL(p(95, s)), p, o, s) # define BOOST_PP_WHILE_95(p, o, s) BOOST_PP_WHILE_95_C(BOOST_PP_BOOL(p(96, s)), p, o, s) # define BOOST_PP_WHILE_96(p, o, s) BOOST_PP_WHILE_96_C(BOOST_PP_BOOL(p(97, s)), p, o, s) # define BOOST_PP_WHILE_97(p, o, s) BOOST_PP_WHILE_97_C(BOOST_PP_BOOL(p(98, s)), p, o, s) # define BOOST_PP_WHILE_98(p, o, s) BOOST_PP_WHILE_98_C(BOOST_PP_BOOL(p(99, s)), p, o, s) # define BOOST_PP_WHILE_99(p, o, s) BOOST_PP_WHILE_99_C(BOOST_PP_BOOL(p(100, s)), p, o, s) # define BOOST_PP_WHILE_100(p, o, s) BOOST_PP_WHILE_100_C(BOOST_PP_BOOL(p(101, s)), p, o, s) # define BOOST_PP_WHILE_101(p, o, s) BOOST_PP_WHILE_101_C(BOOST_PP_BOOL(p(102, s)), p, o, s) # define BOOST_PP_WHILE_102(p, o, s) BOOST_PP_WHILE_102_C(BOOST_PP_BOOL(p(103, s)), p, o, s) # define BOOST_PP_WHILE_103(p, o, s) BOOST_PP_WHILE_103_C(BOOST_PP_BOOL(p(104, s)), p, o, s) # define BOOST_PP_WHILE_104(p, o, s) BOOST_PP_WHILE_104_C(BOOST_PP_BOOL(p(105, s)), p, o, s) # define BOOST_PP_WHILE_105(p, o, s) BOOST_PP_WHILE_105_C(BOOST_PP_BOOL(p(106, s)), p, o, s) # define BOOST_PP_WHILE_106(p, o, s) BOOST_PP_WHILE_106_C(BOOST_PP_BOOL(p(107, s)), p, o, s) # define BOOST_PP_WHILE_107(p, o, s) BOOST_PP_WHILE_107_C(BOOST_PP_BOOL(p(108, s)), p, o, s) # define BOOST_PP_WHILE_108(p, o, s) BOOST_PP_WHILE_108_C(BOOST_PP_BOOL(p(109, s)), p, o, s) # define BOOST_PP_WHILE_109(p, o, s) BOOST_PP_WHILE_109_C(BOOST_PP_BOOL(p(110, s)), p, o, s) # define BOOST_PP_WHILE_110(p, o, s) BOOST_PP_WHILE_110_C(BOOST_PP_BOOL(p(111, s)), p, o, s) # define BOOST_PP_WHILE_111(p, o, s) BOOST_PP_WHILE_111_C(BOOST_PP_BOOL(p(112, s)), p, o, s) # define BOOST_PP_WHILE_112(p, o, s) BOOST_PP_WHILE_112_C(BOOST_PP_BOOL(p(113, s)), p, o, s) # define BOOST_PP_WHILE_113(p, o, s) BOOST_PP_WHILE_113_C(BOOST_PP_BOOL(p(114, s)), p, o, s) # define BOOST_PP_WHILE_114(p, o, s) BOOST_PP_WHILE_114_C(BOOST_PP_BOOL(p(115, s)), p, o, s) # define BOOST_PP_WHILE_115(p, o, s) BOOST_PP_WHILE_115_C(BOOST_PP_BOOL(p(116, s)), p, o, s) # define BOOST_PP_WHILE_116(p, o, s) BOOST_PP_WHILE_116_C(BOOST_PP_BOOL(p(117, s)), p, o, s) # define BOOST_PP_WHILE_117(p, o, s) BOOST_PP_WHILE_117_C(BOOST_PP_BOOL(p(118, s)), p, o, s) # define BOOST_PP_WHILE_118(p, o, s) BOOST_PP_WHILE_118_C(BOOST_PP_BOOL(p(119, s)), p, o, s) # define BOOST_PP_WHILE_119(p, o, s) BOOST_PP_WHILE_119_C(BOOST_PP_BOOL(p(120, s)), p, o, s) # define BOOST_PP_WHILE_120(p, o, s) BOOST_PP_WHILE_120_C(BOOST_PP_BOOL(p(121, s)), p, o, s) # define BOOST_PP_WHILE_121(p, o, s) BOOST_PP_WHILE_121_C(BOOST_PP_BOOL(p(122, s)), p, o, s) # define BOOST_PP_WHILE_122(p, o, s) BOOST_PP_WHILE_122_C(BOOST_PP_BOOL(p(123, s)), p, o, s) # define BOOST_PP_WHILE_123(p, o, s) BOOST_PP_WHILE_123_C(BOOST_PP_BOOL(p(124, s)), p, o, s) # define BOOST_PP_WHILE_124(p, o, s) BOOST_PP_WHILE_124_C(BOOST_PP_BOOL(p(125, s)), p, o, s) # define BOOST_PP_WHILE_125(p, o, s) BOOST_PP_WHILE_125_C(BOOST_PP_BOOL(p(126, s)), p, o, s) # define BOOST_PP_WHILE_126(p, o, s) BOOST_PP_WHILE_126_C(BOOST_PP_BOOL(p(127, s)), p, o, s) # define BOOST_PP_WHILE_127(p, o, s) BOOST_PP_WHILE_127_C(BOOST_PP_BOOL(p(128, s)), p, o, s) # define BOOST_PP_WHILE_128(p, o, s) BOOST_PP_WHILE_128_C(BOOST_PP_BOOL(p(129, s)), p, o, s) # define BOOST_PP_WHILE_129(p, o, s) BOOST_PP_WHILE_129_C(BOOST_PP_BOOL(p(130, s)), p, o, s) # define BOOST_PP_WHILE_130(p, o, s) BOOST_PP_WHILE_130_C(BOOST_PP_BOOL(p(131, s)), p, o, s) # define BOOST_PP_WHILE_131(p, o, s) BOOST_PP_WHILE_131_C(BOOST_PP_BOOL(p(132, s)), p, o, s) # define BOOST_PP_WHILE_132(p, o, s) BOOST_PP_WHILE_132_C(BOOST_PP_BOOL(p(133, s)), p, o, s) # define BOOST_PP_WHILE_133(p, o, s) BOOST_PP_WHILE_133_C(BOOST_PP_BOOL(p(134, s)), p, o, s) # define BOOST_PP_WHILE_134(p, o, s) BOOST_PP_WHILE_134_C(BOOST_PP_BOOL(p(135, s)), p, o, s) # define BOOST_PP_WHILE_135(p, o, s) BOOST_PP_WHILE_135_C(BOOST_PP_BOOL(p(136, s)), p, o, s) # define BOOST_PP_WHILE_136(p, o, s) BOOST_PP_WHILE_136_C(BOOST_PP_BOOL(p(137, s)), p, o, s) # define BOOST_PP_WHILE_137(p, o, s) BOOST_PP_WHILE_137_C(BOOST_PP_BOOL(p(138, s)), p, o, s) # define BOOST_PP_WHILE_138(p, o, s) BOOST_PP_WHILE_138_C(BOOST_PP_BOOL(p(139, s)), p, o, s) # define BOOST_PP_WHILE_139(p, o, s) BOOST_PP_WHILE_139_C(BOOST_PP_BOOL(p(140, s)), p, o, s) # define BOOST_PP_WHILE_140(p, o, s) BOOST_PP_WHILE_140_C(BOOST_PP_BOOL(p(141, s)), p, o, s) # define BOOST_PP_WHILE_141(p, o, s) BOOST_PP_WHILE_141_C(BOOST_PP_BOOL(p(142, s)), p, o, s) # define BOOST_PP_WHILE_142(p, o, s) BOOST_PP_WHILE_142_C(BOOST_PP_BOOL(p(143, s)), p, o, s) # define BOOST_PP_WHILE_143(p, o, s) BOOST_PP_WHILE_143_C(BOOST_PP_BOOL(p(144, s)), p, o, s) # define BOOST_PP_WHILE_144(p, o, s) BOOST_PP_WHILE_144_C(BOOST_PP_BOOL(p(145, s)), p, o, s) # define BOOST_PP_WHILE_145(p, o, s) BOOST_PP_WHILE_145_C(BOOST_PP_BOOL(p(146, s)), p, o, s) # define BOOST_PP_WHILE_146(p, o, s) BOOST_PP_WHILE_146_C(BOOST_PP_BOOL(p(147, s)), p, o, s) # define BOOST_PP_WHILE_147(p, o, s) BOOST_PP_WHILE_147_C(BOOST_PP_BOOL(p(148, s)), p, o, s) # define BOOST_PP_WHILE_148(p, o, s) BOOST_PP_WHILE_148_C(BOOST_PP_BOOL(p(149, s)), p, o, s) # define BOOST_PP_WHILE_149(p, o, s) BOOST_PP_WHILE_149_C(BOOST_PP_BOOL(p(150, s)), p, o, s) # define BOOST_PP_WHILE_150(p, o, s) BOOST_PP_WHILE_150_C(BOOST_PP_BOOL(p(151, s)), p, o, s) # define BOOST_PP_WHILE_151(p, o, s) BOOST_PP_WHILE_151_C(BOOST_PP_BOOL(p(152, s)), p, o, s) # define BOOST_PP_WHILE_152(p, o, s) BOOST_PP_WHILE_152_C(BOOST_PP_BOOL(p(153, s)), p, o, s) # define BOOST_PP_WHILE_153(p, o, s) BOOST_PP_WHILE_153_C(BOOST_PP_BOOL(p(154, s)), p, o, s) # define BOOST_PP_WHILE_154(p, o, s) BOOST_PP_WHILE_154_C(BOOST_PP_BOOL(p(155, s)), p, o, s) # define BOOST_PP_WHILE_155(p, o, s) BOOST_PP_WHILE_155_C(BOOST_PP_BOOL(p(156, s)), p, o, s) # define BOOST_PP_WHILE_156(p, o, s) BOOST_PP_WHILE_156_C(BOOST_PP_BOOL(p(157, s)), p, o, s) # define BOOST_PP_WHILE_157(p, o, s) BOOST_PP_WHILE_157_C(BOOST_PP_BOOL(p(158, s)), p, o, s) # define BOOST_PP_WHILE_158(p, o, s) BOOST_PP_WHILE_158_C(BOOST_PP_BOOL(p(159, s)), p, o, s) # define BOOST_PP_WHILE_159(p, o, s) BOOST_PP_WHILE_159_C(BOOST_PP_BOOL(p(160, s)), p, o, s) # define BOOST_PP_WHILE_160(p, o, s) BOOST_PP_WHILE_160_C(BOOST_PP_BOOL(p(161, s)), p, o, s) # define BOOST_PP_WHILE_161(p, o, s) BOOST_PP_WHILE_161_C(BOOST_PP_BOOL(p(162, s)), p, o, s) # define BOOST_PP_WHILE_162(p, o, s) BOOST_PP_WHILE_162_C(BOOST_PP_BOOL(p(163, s)), p, o, s) # define BOOST_PP_WHILE_163(p, o, s) BOOST_PP_WHILE_163_C(BOOST_PP_BOOL(p(164, s)), p, o, s) # define BOOST_PP_WHILE_164(p, o, s) BOOST_PP_WHILE_164_C(BOOST_PP_BOOL(p(165, s)), p, o, s) # define BOOST_PP_WHILE_165(p, o, s) BOOST_PP_WHILE_165_C(BOOST_PP_BOOL(p(166, s)), p, o, s) # define BOOST_PP_WHILE_166(p, o, s) BOOST_PP_WHILE_166_C(BOOST_PP_BOOL(p(167, s)), p, o, s) # define BOOST_PP_WHILE_167(p, o, s) BOOST_PP_WHILE_167_C(BOOST_PP_BOOL(p(168, s)), p, o, s) # define BOOST_PP_WHILE_168(p, o, s) BOOST_PP_WHILE_168_C(BOOST_PP_BOOL(p(169, s)), p, o, s) # define BOOST_PP_WHILE_169(p, o, s) BOOST_PP_WHILE_169_C(BOOST_PP_BOOL(p(170, s)), p, o, s) # define BOOST_PP_WHILE_170(p, o, s) BOOST_PP_WHILE_170_C(BOOST_PP_BOOL(p(171, s)), p, o, s) # define BOOST_PP_WHILE_171(p, o, s) BOOST_PP_WHILE_171_C(BOOST_PP_BOOL(p(172, s)), p, o, s) # define BOOST_PP_WHILE_172(p, o, s) BOOST_PP_WHILE_172_C(BOOST_PP_BOOL(p(173, s)), p, o, s) # define BOOST_PP_WHILE_173(p, o, s) BOOST_PP_WHILE_173_C(BOOST_PP_BOOL(p(174, s)), p, o, s) # define BOOST_PP_WHILE_174(p, o, s) BOOST_PP_WHILE_174_C(BOOST_PP_BOOL(p(175, s)), p, o, s) # define BOOST_PP_WHILE_175(p, o, s) BOOST_PP_WHILE_175_C(BOOST_PP_BOOL(p(176, s)), p, o, s) # define BOOST_PP_WHILE_176(p, o, s) BOOST_PP_WHILE_176_C(BOOST_PP_BOOL(p(177, s)), p, o, s) # define BOOST_PP_WHILE_177(p, o, s) BOOST_PP_WHILE_177_C(BOOST_PP_BOOL(p(178, s)), p, o, s) # define BOOST_PP_WHILE_178(p, o, s) BOOST_PP_WHILE_178_C(BOOST_PP_BOOL(p(179, s)), p, o, s) # define BOOST_PP_WHILE_179(p, o, s) BOOST_PP_WHILE_179_C(BOOST_PP_BOOL(p(180, s)), p, o, s) # define BOOST_PP_WHILE_180(p, o, s) BOOST_PP_WHILE_180_C(BOOST_PP_BOOL(p(181, s)), p, o, s) # define BOOST_PP_WHILE_181(p, o, s) BOOST_PP_WHILE_181_C(BOOST_PP_BOOL(p(182, s)), p, o, s) # define BOOST_PP_WHILE_182(p, o, s) BOOST_PP_WHILE_182_C(BOOST_PP_BOOL(p(183, s)), p, o, s) # define BOOST_PP_WHILE_183(p, o, s) BOOST_PP_WHILE_183_C(BOOST_PP_BOOL(p(184, s)), p, o, s) # define BOOST_PP_WHILE_184(p, o, s) BOOST_PP_WHILE_184_C(BOOST_PP_BOOL(p(185, s)), p, o, s) # define BOOST_PP_WHILE_185(p, o, s) BOOST_PP_WHILE_185_C(BOOST_PP_BOOL(p(186, s)), p, o, s) # define BOOST_PP_WHILE_186(p, o, s) BOOST_PP_WHILE_186_C(BOOST_PP_BOOL(p(187, s)), p, o, s) # define BOOST_PP_WHILE_187(p, o, s) BOOST_PP_WHILE_187_C(BOOST_PP_BOOL(p(188, s)), p, o, s) # define BOOST_PP_WHILE_188(p, o, s) BOOST_PP_WHILE_188_C(BOOST_PP_BOOL(p(189, s)), p, o, s) # define BOOST_PP_WHILE_189(p, o, s) BOOST_PP_WHILE_189_C(BOOST_PP_BOOL(p(190, s)), p, o, s) # define BOOST_PP_WHILE_190(p, o, s) BOOST_PP_WHILE_190_C(BOOST_PP_BOOL(p(191, s)), p, o, s) # define BOOST_PP_WHILE_191(p, o, s) BOOST_PP_WHILE_191_C(BOOST_PP_BOOL(p(192, s)), p, o, s) # define BOOST_PP_WHILE_192(p, o, s) BOOST_PP_WHILE_192_C(BOOST_PP_BOOL(p(193, s)), p, o, s) # define BOOST_PP_WHILE_193(p, o, s) BOOST_PP_WHILE_193_C(BOOST_PP_BOOL(p(194, s)), p, o, s) # define BOOST_PP_WHILE_194(p, o, s) BOOST_PP_WHILE_194_C(BOOST_PP_BOOL(p(195, s)), p, o, s) # define BOOST_PP_WHILE_195(p, o, s) BOOST_PP_WHILE_195_C(BOOST_PP_BOOL(p(196, s)), p, o, s) # define BOOST_PP_WHILE_196(p, o, s) BOOST_PP_WHILE_196_C(BOOST_PP_BOOL(p(197, s)), p, o, s) # define BOOST_PP_WHILE_197(p, o, s) BOOST_PP_WHILE_197_C(BOOST_PP_BOOL(p(198, s)), p, o, s) # define BOOST_PP_WHILE_198(p, o, s) BOOST_PP_WHILE_198_C(BOOST_PP_BOOL(p(199, s)), p, o, s) # define BOOST_PP_WHILE_199(p, o, s) BOOST_PP_WHILE_199_C(BOOST_PP_BOOL(p(200, s)), p, o, s) # define BOOST_PP_WHILE_200(p, o, s) BOOST_PP_WHILE_200_C(BOOST_PP_BOOL(p(201, s)), p, o, s) # define BOOST_PP_WHILE_201(p, o, s) BOOST_PP_WHILE_201_C(BOOST_PP_BOOL(p(202, s)), p, o, s) # define BOOST_PP_WHILE_202(p, o, s) BOOST_PP_WHILE_202_C(BOOST_PP_BOOL(p(203, s)), p, o, s) # define BOOST_PP_WHILE_203(p, o, s) BOOST_PP_WHILE_203_C(BOOST_PP_BOOL(p(204, s)), p, o, s) # define BOOST_PP_WHILE_204(p, o, s) BOOST_PP_WHILE_204_C(BOOST_PP_BOOL(p(205, s)), p, o, s) # define BOOST_PP_WHILE_205(p, o, s) BOOST_PP_WHILE_205_C(BOOST_PP_BOOL(p(206, s)), p, o, s) # define BOOST_PP_WHILE_206(p, o, s) BOOST_PP_WHILE_206_C(BOOST_PP_BOOL(p(207, s)), p, o, s) # define BOOST_PP_WHILE_207(p, o, s) BOOST_PP_WHILE_207_C(BOOST_PP_BOOL(p(208, s)), p, o, s) # define BOOST_PP_WHILE_208(p, o, s) BOOST_PP_WHILE_208_C(BOOST_PP_BOOL(p(209, s)), p, o, s) # define BOOST_PP_WHILE_209(p, o, s) BOOST_PP_WHILE_209_C(BOOST_PP_BOOL(p(210, s)), p, o, s) # define BOOST_PP_WHILE_210(p, o, s) BOOST_PP_WHILE_210_C(BOOST_PP_BOOL(p(211, s)), p, o, s) # define BOOST_PP_WHILE_211(p, o, s) BOOST_PP_WHILE_211_C(BOOST_PP_BOOL(p(212, s)), p, o, s) # define BOOST_PP_WHILE_212(p, o, s) BOOST_PP_WHILE_212_C(BOOST_PP_BOOL(p(213, s)), p, o, s) # define BOOST_PP_WHILE_213(p, o, s) BOOST_PP_WHILE_213_C(BOOST_PP_BOOL(p(214, s)), p, o, s) # define BOOST_PP_WHILE_214(p, o, s) BOOST_PP_WHILE_214_C(BOOST_PP_BOOL(p(215, s)), p, o, s) # define BOOST_PP_WHILE_215(p, o, s) BOOST_PP_WHILE_215_C(BOOST_PP_BOOL(p(216, s)), p, o, s) # define BOOST_PP_WHILE_216(p, o, s) BOOST_PP_WHILE_216_C(BOOST_PP_BOOL(p(217, s)), p, o, s) # define BOOST_PP_WHILE_217(p, o, s) BOOST_PP_WHILE_217_C(BOOST_PP_BOOL(p(218, s)), p, o, s) # define BOOST_PP_WHILE_218(p, o, s) BOOST_PP_WHILE_218_C(BOOST_PP_BOOL(p(219, s)), p, o, s) # define BOOST_PP_WHILE_219(p, o, s) BOOST_PP_WHILE_219_C(BOOST_PP_BOOL(p(220, s)), p, o, s) # define BOOST_PP_WHILE_220(p, o, s) BOOST_PP_WHILE_220_C(BOOST_PP_BOOL(p(221, s)), p, o, s) # define BOOST_PP_WHILE_221(p, o, s) BOOST_PP_WHILE_221_C(BOOST_PP_BOOL(p(222, s)), p, o, s) # define BOOST_PP_WHILE_222(p, o, s) BOOST_PP_WHILE_222_C(BOOST_PP_BOOL(p(223, s)), p, o, s) # define BOOST_PP_WHILE_223(p, o, s) BOOST_PP_WHILE_223_C(BOOST_PP_BOOL(p(224, s)), p, o, s) # define BOOST_PP_WHILE_224(p, o, s) BOOST_PP_WHILE_224_C(BOOST_PP_BOOL(p(225, s)), p, o, s) # define BOOST_PP_WHILE_225(p, o, s) BOOST_PP_WHILE_225_C(BOOST_PP_BOOL(p(226, s)), p, o, s) # define BOOST_PP_WHILE_226(p, o, s) BOOST_PP_WHILE_226_C(BOOST_PP_BOOL(p(227, s)), p, o, s) # define BOOST_PP_WHILE_227(p, o, s) BOOST_PP_WHILE_227_C(BOOST_PP_BOOL(p(228, s)), p, o, s) # define BOOST_PP_WHILE_228(p, o, s) BOOST_PP_WHILE_228_C(BOOST_PP_BOOL(p(229, s)), p, o, s) # define BOOST_PP_WHILE_229(p, o, s) BOOST_PP_WHILE_229_C(BOOST_PP_BOOL(p(230, s)), p, o, s) # define BOOST_PP_WHILE_230(p, o, s) BOOST_PP_WHILE_230_C(BOOST_PP_BOOL(p(231, s)), p, o, s) # define BOOST_PP_WHILE_231(p, o, s) BOOST_PP_WHILE_231_C(BOOST_PP_BOOL(p(232, s)), p, o, s) # define BOOST_PP_WHILE_232(p, o, s) BOOST_PP_WHILE_232_C(BOOST_PP_BOOL(p(233, s)), p, o, s) # define BOOST_PP_WHILE_233(p, o, s) BOOST_PP_WHILE_233_C(BOOST_PP_BOOL(p(234, s)), p, o, s) # define BOOST_PP_WHILE_234(p, o, s) BOOST_PP_WHILE_234_C(BOOST_PP_BOOL(p(235, s)), p, o, s) # define BOOST_PP_WHILE_235(p, o, s) BOOST_PP_WHILE_235_C(BOOST_PP_BOOL(p(236, s)), p, o, s) # define BOOST_PP_WHILE_236(p, o, s) BOOST_PP_WHILE_236_C(BOOST_PP_BOOL(p(237, s)), p, o, s) # define BOOST_PP_WHILE_237(p, o, s) BOOST_PP_WHILE_237_C(BOOST_PP_BOOL(p(238, s)), p, o, s) # define BOOST_PP_WHILE_238(p, o, s) BOOST_PP_WHILE_238_C(BOOST_PP_BOOL(p(239, s)), p, o, s) # define BOOST_PP_WHILE_239(p, o, s) BOOST_PP_WHILE_239_C(BOOST_PP_BOOL(p(240, s)), p, o, s) # define BOOST_PP_WHILE_240(p, o, s) BOOST_PP_WHILE_240_C(BOOST_PP_BOOL(p(241, s)), p, o, s) # define BOOST_PP_WHILE_241(p, o, s) BOOST_PP_WHILE_241_C(BOOST_PP_BOOL(p(242, s)), p, o, s) # define BOOST_PP_WHILE_242(p, o, s) BOOST_PP_WHILE_242_C(BOOST_PP_BOOL(p(243, s)), p, o, s) # define BOOST_PP_WHILE_243(p, o, s) BOOST_PP_WHILE_243_C(BOOST_PP_BOOL(p(244, s)), p, o, s) # define BOOST_PP_WHILE_244(p, o, s) BOOST_PP_WHILE_244_C(BOOST_PP_BOOL(p(245, s)), p, o, s) # define BOOST_PP_WHILE_245(p, o, s) BOOST_PP_WHILE_245_C(BOOST_PP_BOOL(p(246, s)), p, o, s) # define BOOST_PP_WHILE_246(p, o, s) BOOST_PP_WHILE_246_C(BOOST_PP_BOOL(p(247, s)), p, o, s) # define BOOST_PP_WHILE_247(p, o, s) BOOST_PP_WHILE_247_C(BOOST_PP_BOOL(p(248, s)), p, o, s) # define BOOST_PP_WHILE_248(p, o, s) BOOST_PP_WHILE_248_C(BOOST_PP_BOOL(p(249, s)), p, o, s) # define BOOST_PP_WHILE_249(p, o, s) BOOST_PP_WHILE_249_C(BOOST_PP_BOOL(p(250, s)), p, o, s) # define BOOST_PP_WHILE_250(p, o, s) BOOST_PP_WHILE_250_C(BOOST_PP_BOOL(p(251, s)), p, o, s) # define BOOST_PP_WHILE_251(p, o, s) BOOST_PP_WHILE_251_C(BOOST_PP_BOOL(p(252, s)), p, o, s) # define BOOST_PP_WHILE_252(p, o, s) BOOST_PP_WHILE_252_C(BOOST_PP_BOOL(p(253, s)), p, o, s) # define BOOST_PP_WHILE_253(p, o, s) BOOST_PP_WHILE_253_C(BOOST_PP_BOOL(p(254, s)), p, o, s) # define BOOST_PP_WHILE_254(p, o, s) BOOST_PP_WHILE_254_C(BOOST_PP_BOOL(p(255, s)), p, o, s) # define BOOST_PP_WHILE_255(p, o, s) BOOST_PP_WHILE_255_C(BOOST_PP_BOOL(p(256, s)), p, o, s) # define BOOST_PP_WHILE_256(p, o, s) BOOST_PP_WHILE_256_C(BOOST_PP_BOOL(p(257, s)), p, o, s) # # define BOOST_PP_WHILE_1_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_2, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(2, s)) # define BOOST_PP_WHILE_2_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_3, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(3, s)) # define BOOST_PP_WHILE_3_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_4, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(4, s)) # define BOOST_PP_WHILE_4_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_5, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(5, s)) # define BOOST_PP_WHILE_5_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_6, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(6, s)) # define BOOST_PP_WHILE_6_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_7, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(7, s)) # define BOOST_PP_WHILE_7_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_8, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(8, s)) # define BOOST_PP_WHILE_8_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_9, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(9, s)) # define BOOST_PP_WHILE_9_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_10, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(10, s)) # define BOOST_PP_WHILE_10_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_11, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(11, s)) # define BOOST_PP_WHILE_11_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_12, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(12, s)) # define BOOST_PP_WHILE_12_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_13, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(13, s)) # define BOOST_PP_WHILE_13_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_14, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(14, s)) # define BOOST_PP_WHILE_14_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_15, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(15, s)) # define BOOST_PP_WHILE_15_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_16, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(16, s)) # define BOOST_PP_WHILE_16_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_17, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(17, s)) # define BOOST_PP_WHILE_17_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_18, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(18, s)) # define BOOST_PP_WHILE_18_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_19, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(19, s)) # define BOOST_PP_WHILE_19_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_20, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(20, s)) # define BOOST_PP_WHILE_20_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_21, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(21, s)) # define BOOST_PP_WHILE_21_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_22, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(22, s)) # define BOOST_PP_WHILE_22_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_23, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(23, s)) # define BOOST_PP_WHILE_23_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_24, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(24, s)) # define BOOST_PP_WHILE_24_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_25, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(25, s)) # define BOOST_PP_WHILE_25_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_26, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(26, s)) # define BOOST_PP_WHILE_26_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_27, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(27, s)) # define BOOST_PP_WHILE_27_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_28, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(28, s)) # define BOOST_PP_WHILE_28_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_29, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(29, s)) # define BOOST_PP_WHILE_29_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_30, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(30, s)) # define BOOST_PP_WHILE_30_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_31, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(31, s)) # define BOOST_PP_WHILE_31_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_32, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(32, s)) # define BOOST_PP_WHILE_32_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_33, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(33, s)) # define BOOST_PP_WHILE_33_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_34, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(34, s)) # define BOOST_PP_WHILE_34_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_35, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(35, s)) # define BOOST_PP_WHILE_35_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_36, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(36, s)) # define BOOST_PP_WHILE_36_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_37, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(37, s)) # define BOOST_PP_WHILE_37_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_38, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(38, s)) # define BOOST_PP_WHILE_38_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_39, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(39, s)) # define BOOST_PP_WHILE_39_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_40, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(40, s)) # define BOOST_PP_WHILE_40_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_41, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(41, s)) # define BOOST_PP_WHILE_41_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_42, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(42, s)) # define BOOST_PP_WHILE_42_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_43, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(43, s)) # define BOOST_PP_WHILE_43_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_44, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(44, s)) # define BOOST_PP_WHILE_44_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_45, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(45, s)) # define BOOST_PP_WHILE_45_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_46, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(46, s)) # define BOOST_PP_WHILE_46_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_47, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(47, s)) # define BOOST_PP_WHILE_47_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_48, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(48, s)) # define BOOST_PP_WHILE_48_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_49, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(49, s)) # define BOOST_PP_WHILE_49_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_50, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(50, s)) # define BOOST_PP_WHILE_50_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_51, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(51, s)) # define BOOST_PP_WHILE_51_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_52, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(52, s)) # define BOOST_PP_WHILE_52_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_53, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(53, s)) # define BOOST_PP_WHILE_53_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_54, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(54, s)) # define BOOST_PP_WHILE_54_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_55, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(55, s)) # define BOOST_PP_WHILE_55_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_56, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(56, s)) # define BOOST_PP_WHILE_56_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_57, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(57, s)) # define BOOST_PP_WHILE_57_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_58, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(58, s)) # define BOOST_PP_WHILE_58_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_59, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(59, s)) # define BOOST_PP_WHILE_59_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_60, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(60, s)) # define BOOST_PP_WHILE_60_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_61, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(61, s)) # define BOOST_PP_WHILE_61_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_62, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(62, s)) # define BOOST_PP_WHILE_62_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_63, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(63, s)) # define BOOST_PP_WHILE_63_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_64, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(64, s)) # define BOOST_PP_WHILE_64_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_65, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(65, s)) # define BOOST_PP_WHILE_65_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_66, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(66, s)) # define BOOST_PP_WHILE_66_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_67, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(67, s)) # define BOOST_PP_WHILE_67_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_68, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(68, s)) # define BOOST_PP_WHILE_68_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_69, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(69, s)) # define BOOST_PP_WHILE_69_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_70, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(70, s)) # define BOOST_PP_WHILE_70_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_71, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(71, s)) # define BOOST_PP_WHILE_71_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_72, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(72, s)) # define BOOST_PP_WHILE_72_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_73, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(73, s)) # define BOOST_PP_WHILE_73_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_74, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(74, s)) # define BOOST_PP_WHILE_74_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_75, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(75, s)) # define BOOST_PP_WHILE_75_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_76, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(76, s)) # define BOOST_PP_WHILE_76_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_77, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(77, s)) # define BOOST_PP_WHILE_77_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_78, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(78, s)) # define BOOST_PP_WHILE_78_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_79, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(79, s)) # define BOOST_PP_WHILE_79_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_80, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(80, s)) # define BOOST_PP_WHILE_80_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_81, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(81, s)) # define BOOST_PP_WHILE_81_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_82, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(82, s)) # define BOOST_PP_WHILE_82_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_83, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(83, s)) # define BOOST_PP_WHILE_83_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_84, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(84, s)) # define BOOST_PP_WHILE_84_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_85, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(85, s)) # define BOOST_PP_WHILE_85_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_86, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(86, s)) # define BOOST_PP_WHILE_86_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_87, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(87, s)) # define BOOST_PP_WHILE_87_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_88, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(88, s)) # define BOOST_PP_WHILE_88_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_89, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(89, s)) # define BOOST_PP_WHILE_89_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_90, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(90, s)) # define BOOST_PP_WHILE_90_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_91, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(91, s)) # define BOOST_PP_WHILE_91_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_92, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(92, s)) # define BOOST_PP_WHILE_92_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_93, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(93, s)) # define BOOST_PP_WHILE_93_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_94, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(94, s)) # define BOOST_PP_WHILE_94_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_95, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(95, s)) # define BOOST_PP_WHILE_95_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_96, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(96, s)) # define BOOST_PP_WHILE_96_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_97, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(97, s)) # define BOOST_PP_WHILE_97_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_98, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(98, s)) # define BOOST_PP_WHILE_98_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_99, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(99, s)) # define BOOST_PP_WHILE_99_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_100, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(100, s)) # define BOOST_PP_WHILE_100_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_101, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(101, s)) # define BOOST_PP_WHILE_101_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_102, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(102, s)) # define BOOST_PP_WHILE_102_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_103, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(103, s)) # define BOOST_PP_WHILE_103_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_104, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(104, s)) # define BOOST_PP_WHILE_104_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_105, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(105, s)) # define BOOST_PP_WHILE_105_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_106, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(106, s)) # define BOOST_PP_WHILE_106_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_107, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(107, s)) # define BOOST_PP_WHILE_107_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_108, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(108, s)) # define BOOST_PP_WHILE_108_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_109, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(109, s)) # define BOOST_PP_WHILE_109_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_110, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(110, s)) # define BOOST_PP_WHILE_110_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_111, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(111, s)) # define BOOST_PP_WHILE_111_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_112, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(112, s)) # define BOOST_PP_WHILE_112_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_113, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(113, s)) # define BOOST_PP_WHILE_113_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_114, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(114, s)) # define BOOST_PP_WHILE_114_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_115, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(115, s)) # define BOOST_PP_WHILE_115_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_116, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(116, s)) # define BOOST_PP_WHILE_116_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_117, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(117, s)) # define BOOST_PP_WHILE_117_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_118, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(118, s)) # define BOOST_PP_WHILE_118_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_119, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(119, s)) # define BOOST_PP_WHILE_119_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_120, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(120, s)) # define BOOST_PP_WHILE_120_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_121, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(121, s)) # define BOOST_PP_WHILE_121_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_122, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(122, s)) # define BOOST_PP_WHILE_122_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_123, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(123, s)) # define BOOST_PP_WHILE_123_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_124, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(124, s)) # define BOOST_PP_WHILE_124_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_125, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(125, s)) # define BOOST_PP_WHILE_125_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_126, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(126, s)) # define BOOST_PP_WHILE_126_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_127, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(127, s)) # define BOOST_PP_WHILE_127_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_128, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(128, s)) # define BOOST_PP_WHILE_128_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_129, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(129, s)) # define BOOST_PP_WHILE_129_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_130, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(130, s)) # define BOOST_PP_WHILE_130_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_131, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(131, s)) # define BOOST_PP_WHILE_131_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_132, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(132, s)) # define BOOST_PP_WHILE_132_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_133, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(133, s)) # define BOOST_PP_WHILE_133_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_134, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(134, s)) # define BOOST_PP_WHILE_134_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_135, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(135, s)) # define BOOST_PP_WHILE_135_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_136, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(136, s)) # define BOOST_PP_WHILE_136_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_137, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(137, s)) # define BOOST_PP_WHILE_137_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_138, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(138, s)) # define BOOST_PP_WHILE_138_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_139, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(139, s)) # define BOOST_PP_WHILE_139_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_140, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(140, s)) # define BOOST_PP_WHILE_140_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_141, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(141, s)) # define BOOST_PP_WHILE_141_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_142, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(142, s)) # define BOOST_PP_WHILE_142_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_143, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(143, s)) # define BOOST_PP_WHILE_143_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_144, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(144, s)) # define BOOST_PP_WHILE_144_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_145, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(145, s)) # define BOOST_PP_WHILE_145_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_146, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(146, s)) # define BOOST_PP_WHILE_146_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_147, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(147, s)) # define BOOST_PP_WHILE_147_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_148, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(148, s)) # define BOOST_PP_WHILE_148_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_149, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(149, s)) # define BOOST_PP_WHILE_149_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_150, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(150, s)) # define BOOST_PP_WHILE_150_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_151, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(151, s)) # define BOOST_PP_WHILE_151_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_152, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(152, s)) # define BOOST_PP_WHILE_152_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_153, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(153, s)) # define BOOST_PP_WHILE_153_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_154, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(154, s)) # define BOOST_PP_WHILE_154_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_155, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(155, s)) # define BOOST_PP_WHILE_155_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_156, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(156, s)) # define BOOST_PP_WHILE_156_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_157, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(157, s)) # define BOOST_PP_WHILE_157_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_158, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(158, s)) # define BOOST_PP_WHILE_158_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_159, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(159, s)) # define BOOST_PP_WHILE_159_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_160, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(160, s)) # define BOOST_PP_WHILE_160_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_161, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(161, s)) # define BOOST_PP_WHILE_161_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_162, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(162, s)) # define BOOST_PP_WHILE_162_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_163, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(163, s)) # define BOOST_PP_WHILE_163_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_164, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(164, s)) # define BOOST_PP_WHILE_164_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_165, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(165, s)) # define BOOST_PP_WHILE_165_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_166, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(166, s)) # define BOOST_PP_WHILE_166_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_167, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(167, s)) # define BOOST_PP_WHILE_167_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_168, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(168, s)) # define BOOST_PP_WHILE_168_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_169, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(169, s)) # define BOOST_PP_WHILE_169_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_170, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(170, s)) # define BOOST_PP_WHILE_170_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_171, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(171, s)) # define BOOST_PP_WHILE_171_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_172, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(172, s)) # define BOOST_PP_WHILE_172_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_173, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(173, s)) # define BOOST_PP_WHILE_173_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_174, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(174, s)) # define BOOST_PP_WHILE_174_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_175, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(175, s)) # define BOOST_PP_WHILE_175_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_176, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(176, s)) # define BOOST_PP_WHILE_176_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_177, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(177, s)) # define BOOST_PP_WHILE_177_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_178, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(178, s)) # define BOOST_PP_WHILE_178_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_179, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(179, s)) # define BOOST_PP_WHILE_179_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_180, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(180, s)) # define BOOST_PP_WHILE_180_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_181, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(181, s)) # define BOOST_PP_WHILE_181_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_182, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(182, s)) # define BOOST_PP_WHILE_182_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_183, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(183, s)) # define BOOST_PP_WHILE_183_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_184, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(184, s)) # define BOOST_PP_WHILE_184_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_185, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(185, s)) # define BOOST_PP_WHILE_185_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_186, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(186, s)) # define BOOST_PP_WHILE_186_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_187, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(187, s)) # define BOOST_PP_WHILE_187_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_188, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(188, s)) # define BOOST_PP_WHILE_188_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_189, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(189, s)) # define BOOST_PP_WHILE_189_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_190, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(190, s)) # define BOOST_PP_WHILE_190_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_191, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(191, s)) # define BOOST_PP_WHILE_191_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_192, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(192, s)) # define BOOST_PP_WHILE_192_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_193, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(193, s)) # define BOOST_PP_WHILE_193_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_194, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(194, s)) # define BOOST_PP_WHILE_194_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_195, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(195, s)) # define BOOST_PP_WHILE_195_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_196, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(196, s)) # define BOOST_PP_WHILE_196_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_197, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(197, s)) # define BOOST_PP_WHILE_197_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_198, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(198, s)) # define BOOST_PP_WHILE_198_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_199, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(199, s)) # define BOOST_PP_WHILE_199_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_200, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(200, s)) # define BOOST_PP_WHILE_200_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_201, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(201, s)) # define BOOST_PP_WHILE_201_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_202, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(202, s)) # define BOOST_PP_WHILE_202_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_203, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(203, s)) # define BOOST_PP_WHILE_203_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_204, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(204, s)) # define BOOST_PP_WHILE_204_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_205, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(205, s)) # define BOOST_PP_WHILE_205_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_206, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(206, s)) # define BOOST_PP_WHILE_206_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_207, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(207, s)) # define BOOST_PP_WHILE_207_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_208, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(208, s)) # define BOOST_PP_WHILE_208_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_209, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(209, s)) # define BOOST_PP_WHILE_209_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_210, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(210, s)) # define BOOST_PP_WHILE_210_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_211, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(211, s)) # define BOOST_PP_WHILE_211_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_212, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(212, s)) # define BOOST_PP_WHILE_212_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_213, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(213, s)) # define BOOST_PP_WHILE_213_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_214, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(214, s)) # define BOOST_PP_WHILE_214_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_215, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(215, s)) # define BOOST_PP_WHILE_215_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_216, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(216, s)) # define BOOST_PP_WHILE_216_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_217, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(217, s)) # define BOOST_PP_WHILE_217_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_218, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(218, s)) # define BOOST_PP_WHILE_218_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_219, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(219, s)) # define BOOST_PP_WHILE_219_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_220, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(220, s)) # define BOOST_PP_WHILE_220_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_221, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(221, s)) # define BOOST_PP_WHILE_221_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_222, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(222, s)) # define BOOST_PP_WHILE_222_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_223, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(223, s)) # define BOOST_PP_WHILE_223_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_224, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(224, s)) # define BOOST_PP_WHILE_224_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_225, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(225, s)) # define BOOST_PP_WHILE_225_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_226, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(226, s)) # define BOOST_PP_WHILE_226_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_227, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(227, s)) # define BOOST_PP_WHILE_227_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_228, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(228, s)) # define BOOST_PP_WHILE_228_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_229, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(229, s)) # define BOOST_PP_WHILE_229_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_230, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(230, s)) # define BOOST_PP_WHILE_230_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_231, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(231, s)) # define BOOST_PP_WHILE_231_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_232, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(232, s)) # define BOOST_PP_WHILE_232_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_233, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(233, s)) # define BOOST_PP_WHILE_233_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_234, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(234, s)) # define BOOST_PP_WHILE_234_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_235, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(235, s)) # define BOOST_PP_WHILE_235_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_236, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(236, s)) # define BOOST_PP_WHILE_236_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_237, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(237, s)) # define BOOST_PP_WHILE_237_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_238, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(238, s)) # define BOOST_PP_WHILE_238_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_239, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(239, s)) # define BOOST_PP_WHILE_239_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_240, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(240, s)) # define BOOST_PP_WHILE_240_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_241, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(241, s)) # define BOOST_PP_WHILE_241_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_242, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(242, s)) # define BOOST_PP_WHILE_242_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_243, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(243, s)) # define BOOST_PP_WHILE_243_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_244, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(244, s)) # define BOOST_PP_WHILE_244_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_245, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(245, s)) # define BOOST_PP_WHILE_245_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_246, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(246, s)) # define BOOST_PP_WHILE_246_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_247, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(247, s)) # define BOOST_PP_WHILE_247_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_248, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(248, s)) # define BOOST_PP_WHILE_248_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_249, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(249, s)) # define BOOST_PP_WHILE_249_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_250, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(250, s)) # define BOOST_PP_WHILE_250_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_251, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(251, s)) # define BOOST_PP_WHILE_251_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_252, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(252, s)) # define BOOST_PP_WHILE_252_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_253, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(253, s)) # define BOOST_PP_WHILE_253_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_254, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(254, s)) # define BOOST_PP_WHILE_254_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_255, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(255, s)) # define BOOST_PP_WHILE_255_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_256, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(256, s)) # define BOOST_PP_WHILE_256_C(c, p, o, s) BOOST_PP_IIF(c, BOOST_PP_WHILE_257, s BOOST_PP_TUPLE_EAT_3)(p, o, BOOST_PP_IIF(c, o, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_2)(257, s)) # # # endif ================================================ FILE: benchmarks/boost/preprocessor/control/expr_if.hpp ================================================ # /* Copyright (C) 2001 # * Housemarque Oy # * http://www.housemarque.com # * # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # */ # # /* Revised by Paul Mensonides (2002) */ # # /* See http://www.boost.org for most recent version. */ # # ifndef BOOST_PREPROCESSOR_CONTROL_EXPR_IF_HPP # define BOOST_PREPROCESSOR_CONTROL_EXPR_IF_HPP # # include # include # include # # /* BOOST_PP_EXPR_IF */ # # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() # define BOOST_PP_EXPR_IF(cond, expr) BOOST_PP_EXPR_IIF(BOOST_PP_BOOL(cond), expr) # else # define BOOST_PP_EXPR_IF(cond, expr) BOOST_PP_EXPR_IF_I(cond, expr) # define BOOST_PP_EXPR_IF_I(cond, expr) BOOST_PP_EXPR_IIF(BOOST_PP_BOOL(cond), expr) # endif # # endif ================================================ FILE: benchmarks/boost/preprocessor/control/expr_iif.hpp ================================================ # /* ************************************************************************** # * * # * (C) Copyright Paul Mensonides 2002. # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # * * # ************************************************************************** */ # # /* See http://www.boost.org for most recent version. */ # # ifndef BOOST_PREPROCESSOR_CONTROL_EXPR_IIF_HPP # define BOOST_PREPROCESSOR_CONTROL_EXPR_IIF_HPP # # include # # /* BOOST_PP_EXPR_IIF */ # # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC() # define BOOST_PP_EXPR_IIF(bit, expr) BOOST_PP_EXPR_IIF_I(bit, expr) # else # define BOOST_PP_EXPR_IIF(bit, expr) BOOST_PP_EXPR_IIF_OO((bit, expr)) # define BOOST_PP_EXPR_IIF_OO(par) BOOST_PP_EXPR_IIF_I ## par # endif # # define BOOST_PP_EXPR_IIF_I(bit, expr) BOOST_PP_EXPR_IIF_ ## bit(expr) # # define BOOST_PP_EXPR_IIF_0(expr) # define BOOST_PP_EXPR_IIF_1(expr) expr # # endif ================================================ FILE: benchmarks/boost/preprocessor/control/if.hpp ================================================ # /* Copyright (C) 2001 # * Housemarque Oy # * http://www.housemarque.com # * # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # */ # # /* Revised by Paul Mensonides (2002) */ # # /* See http://www.boost.org for most recent version. */ # # ifndef BOOST_PREPROCESSOR_CONTROL_IF_HPP # define BOOST_PREPROCESSOR_CONTROL_IF_HPP # # include # include # include # # /* BOOST_PP_IF */ # # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() # define BOOST_PP_IF(cond, t, f) BOOST_PP_IIF(BOOST_PP_BOOL(cond), t, f) # else # define BOOST_PP_IF(cond, t, f) BOOST_PP_IF_I(cond, t, f) # define BOOST_PP_IF_I(cond, t, f) BOOST_PP_IIF(BOOST_PP_BOOL(cond), t, f) # endif # # endif ================================================ FILE: benchmarks/boost/preprocessor/control/iif.hpp ================================================ # /* ************************************************************************** # * * # * (C) Copyright Paul Mensonides 2002. # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # * * # ************************************************************************** */ # # /* See http://www.boost.org for most recent version. */ # # ifndef BOOST_PREPROCESSOR_CONTROL_IIF_HPP # define BOOST_PREPROCESSOR_CONTROL_IIF_HPP # # include # # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC() # define BOOST_PP_IIF(bit, t, f) BOOST_PP_IIF_I(bit, t, f) # else # define BOOST_PP_IIF(bit, t, f) BOOST_PP_IIF_OO((bit, t, f)) # define BOOST_PP_IIF_OO(par) BOOST_PP_IIF_I ## par # endif # # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MSVC() # define BOOST_PP_IIF_I(bit, t, f) BOOST_PP_IIF_ ## bit(t, f) # else # define BOOST_PP_IIF_I(bit, t, f) BOOST_PP_IIF_II(BOOST_PP_IIF_ ## bit(t, f)) # define BOOST_PP_IIF_II(id) id # endif # # define BOOST_PP_IIF_0(t, f) f # define BOOST_PP_IIF_1(t, f) t # # endif ================================================ FILE: benchmarks/boost/preprocessor/control/while.hpp ================================================ # /* Copyright (C) 2001 # * Housemarque Oy # * http://www.housemarque.com # * # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # */ # # /* Revised by Paul Mensonides (2002) */ # # /* See http://www.boost.org for most recent version. */ # # ifndef BOOST_PREPROCESSOR_CONTROL_WHILE_HPP # define BOOST_PREPROCESSOR_CONTROL_WHILE_HPP # # include # include # include # include # include # include # include # # /* BOOST_PP_WHILE */ # # if 0 # define BOOST_PP_WHILE(pred, op, state) # endif # # define BOOST_PP_WHILE BOOST_PP_CAT(BOOST_PP_WHILE_, BOOST_PP_AUTO_REC(BOOST_PP_WHILE_P, 256)) # # if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() # define BOOST_PP_WHILE_P(n) BOOST_PP_BITAND(BOOST_PP_CAT(BOOST_PP_WHILE_CHECK_, BOOST_PP_WHILE_ ## n(BOOST_PP_WHILE_F, BOOST_PP_NIL, BOOST_PP_NIL)), BOOST_PP_BITAND(BOOST_PP_CAT(BOOST_PP_LIST_FOLD_LEFT_CHECK_, BOOST_PP_LIST_FOLD_LEFT_ ## n(BOOST_PP_NIL, BOOST_PP_NIL, BOOST_PP_NIL)), BOOST_PP_CAT(BOOST_PP_LIST_FOLD_RIGHT_CHECK_, BOOST_PP_LIST_FOLD_RIGHT_ ## n(BOOST_PP_NIL, BOOST_PP_NIL, BOOST_PP_NIL)))) # else # define BOOST_PP_WHILE_P(n) BOOST_PP_BITAND(BOOST_PP_CAT(BOOST_PP_WHILE_CHECK_, BOOST_PP_WHILE_ ## n(BOOST_PP_WHILE_F, BOOST_PP_NIL, BOOST_PP_NIL)), BOOST_PP_CAT(BOOST_PP_LIST_FOLD_LEFT_CHECK_, BOOST_PP_LIST_FOLD_LEFT_ ## n(BOOST_PP_NIL, BOOST_PP_NIL, BOOST_PP_NIL))) # endif # # define BOOST_PP_WHILE_F(d, _) 0 # # if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() # include # elif BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MSVC() # include # elif BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_DMC() # include # else # include # endif # # define BOOST_PP_WHILE_257(p, o, s) BOOST_PP_ERROR(0x0001) # # define BOOST_PP_WHILE_CHECK_BOOST_PP_NIL 1 # # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_1(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_2(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_3(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_4(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_5(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_6(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_7(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_8(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_9(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_10(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_11(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_12(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_13(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_14(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_15(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_16(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_17(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_18(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_19(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_20(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_21(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_22(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_23(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_24(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_25(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_26(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_27(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_28(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_29(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_30(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_31(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_32(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_33(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_34(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_35(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_36(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_37(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_38(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_39(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_40(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_41(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_42(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_43(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_44(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_45(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_46(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_47(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_48(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_49(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_50(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_51(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_52(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_53(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_54(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_55(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_56(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_57(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_58(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_59(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_60(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_61(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_62(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_63(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_64(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_65(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_66(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_67(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_68(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_69(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_70(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_71(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_72(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_73(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_74(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_75(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_76(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_77(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_78(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_79(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_80(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_81(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_82(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_83(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_84(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_85(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_86(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_87(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_88(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_89(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_90(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_91(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_92(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_93(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_94(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_95(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_96(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_97(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_98(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_99(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_100(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_101(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_102(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_103(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_104(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_105(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_106(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_107(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_108(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_109(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_110(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_111(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_112(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_113(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_114(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_115(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_116(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_117(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_118(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_119(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_120(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_121(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_122(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_123(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_124(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_125(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_126(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_127(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_128(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_129(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_130(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_131(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_132(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_133(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_134(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_135(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_136(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_137(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_138(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_139(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_140(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_141(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_142(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_143(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_144(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_145(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_146(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_147(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_148(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_149(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_150(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_151(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_152(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_153(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_154(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_155(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_156(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_157(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_158(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_159(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_160(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_161(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_162(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_163(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_164(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_165(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_166(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_167(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_168(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_169(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_170(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_171(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_172(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_173(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_174(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_175(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_176(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_177(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_178(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_179(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_180(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_181(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_182(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_183(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_184(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_185(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_186(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_187(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_188(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_189(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_190(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_191(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_192(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_193(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_194(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_195(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_196(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_197(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_198(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_199(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_200(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_201(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_202(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_203(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_204(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_205(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_206(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_207(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_208(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_209(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_210(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_211(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_212(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_213(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_214(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_215(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_216(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_217(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_218(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_219(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_220(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_221(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_222(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_223(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_224(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_225(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_226(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_227(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_228(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_229(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_230(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_231(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_232(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_233(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_234(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_235(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_236(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_237(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_238(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_239(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_240(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_241(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_242(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_243(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_244(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_245(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_246(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_247(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_248(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_249(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_250(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_251(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_252(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_253(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_254(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_255(p, o, s) 0 # define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_256(p, o, s) 0 # # endif ================================================ FILE: benchmarks/boost/preprocessor/debug/error.hpp ================================================ # /* ************************************************************************** # * * # * (C) Copyright Paul Mensonides 2002. # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # * * # ************************************************************************** */ # # /* See http://www.boost.org for most recent version. */ # # ifndef BOOST_PREPROCESSOR_DEBUG_ERROR_HPP # define BOOST_PREPROCESSOR_DEBUG_ERROR_HPP # # include # include # # /* BOOST_PP_ERROR */ # # if BOOST_PP_CONFIG_ERRORS # define BOOST_PP_ERROR(code) BOOST_PP_CAT(BOOST_PP_ERROR_, code) # endif # # define BOOST_PP_ERROR_0x0000 BOOST_PP_ERROR(0x0000, BOOST_PP_INDEX_OUT_OF_BOUNDS) # define BOOST_PP_ERROR_0x0001 BOOST_PP_ERROR(0x0001, BOOST_PP_WHILE_OVERFLOW) # define BOOST_PP_ERROR_0x0002 BOOST_PP_ERROR(0x0002, BOOST_PP_FOR_OVERFLOW) # define BOOST_PP_ERROR_0x0003 BOOST_PP_ERROR(0x0003, BOOST_PP_REPEAT_OVERFLOW) # define BOOST_PP_ERROR_0x0004 BOOST_PP_ERROR(0x0004, BOOST_PP_LIST_FOLD_OVERFLOW) # define BOOST_PP_ERROR_0x0005 BOOST_PP_ERROR(0x0005, BOOST_PP_SEQ_FOLD_OVERFLOW) # define BOOST_PP_ERROR_0x0006 BOOST_PP_ERROR(0x0006, BOOST_PP_ARITHMETIC_OVERFLOW) # define BOOST_PP_ERROR_0x0007 BOOST_PP_ERROR(0x0007, BOOST_PP_DIVISION_BY_ZERO) # # endif ================================================ FILE: benchmarks/boost/preprocessor/dec.hpp ================================================ # /* ************************************************************************** # * * # * (C) Copyright Paul Mensonides 2002. # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # * * # ************************************************************************** */ # # /* See http://www.boost.org for most recent version. */ # # ifndef BOOST_PREPROCESSOR_DEC_HPP # define BOOST_PREPROCESSOR_DEC_HPP # # include # # endif ================================================ FILE: benchmarks/boost/preprocessor/detail/auto_rec.hpp ================================================ # /* ************************************************************************** # * * # * (C) Copyright Paul Mensonides 2002. # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # * * # ************************************************************************** */ # # /* See http://www.boost.org for most recent version. */ # # include # # if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_DMC() # include # else # # ifndef BOOST_PREPROCESSOR_DETAIL_AUTO_REC_HPP # define BOOST_PREPROCESSOR_DETAIL_AUTO_REC_HPP # # include # # /* BOOST_PP_AUTO_REC */ # # define BOOST_PP_AUTO_REC(pred, n) BOOST_PP_NODE_ENTRY_ ## n(pred) # # define BOOST_PP_NODE_ENTRY_256(p) BOOST_PP_NODE_128(p)(p)(p)(p)(p)(p)(p)(p) # define BOOST_PP_NODE_ENTRY_128(p) BOOST_PP_NODE_64(p)(p)(p)(p)(p)(p)(p) # define BOOST_PP_NODE_ENTRY_64(p) BOOST_PP_NODE_32(p)(p)(p)(p)(p)(p) # define BOOST_PP_NODE_ENTRY_32(p) BOOST_PP_NODE_16(p)(p)(p)(p)(p) # define BOOST_PP_NODE_ENTRY_16(p) BOOST_PP_NODE_8(p)(p)(p)(p) # define BOOST_PP_NODE_ENTRY_8(p) BOOST_PP_NODE_4(p)(p)(p) # define BOOST_PP_NODE_ENTRY_4(p) BOOST_PP_NODE_2(p)(p) # define BOOST_PP_NODE_ENTRY_2(p) BOOST_PP_NODE_1(p) # # define BOOST_PP_NODE_128(p) BOOST_PP_IIF(p(128), BOOST_PP_NODE_64, BOOST_PP_NODE_192) # define BOOST_PP_NODE_64(p) BOOST_PP_IIF(p(64), BOOST_PP_NODE_32, BOOST_PP_NODE_96) # define BOOST_PP_NODE_32(p) BOOST_PP_IIF(p(32), BOOST_PP_NODE_16, BOOST_PP_NODE_48) # define BOOST_PP_NODE_16(p) BOOST_PP_IIF(p(16), BOOST_PP_NODE_8, BOOST_PP_NODE_24) # define BOOST_PP_NODE_8(p) BOOST_PP_IIF(p(8), BOOST_PP_NODE_4, BOOST_PP_NODE_12) # define BOOST_PP_NODE_4(p) BOOST_PP_IIF(p(4), BOOST_PP_NODE_2, BOOST_PP_NODE_6) # define BOOST_PP_NODE_2(p) BOOST_PP_IIF(p(2), BOOST_PP_NODE_1, BOOST_PP_NODE_3) # define BOOST_PP_NODE_1(p) BOOST_PP_IIF(p(1), 1, 2) # define BOOST_PP_NODE_3(p) BOOST_PP_IIF(p(3), 3, 4) # define BOOST_PP_NODE_6(p) BOOST_PP_IIF(p(6), BOOST_PP_NODE_5, BOOST_PP_NODE_7) # define BOOST_PP_NODE_5(p) BOOST_PP_IIF(p(5), 5, 6) # define BOOST_PP_NODE_7(p) BOOST_PP_IIF(p(7), 7, 8) # define BOOST_PP_NODE_12(p) BOOST_PP_IIF(p(12), BOOST_PP_NODE_10, BOOST_PP_NODE_14) # define BOOST_PP_NODE_10(p) BOOST_PP_IIF(p(10), BOOST_PP_NODE_9, BOOST_PP_NODE_11) # define BOOST_PP_NODE_9(p) BOOST_PP_IIF(p(9), 9, 10) # define BOOST_PP_NODE_11(p) BOOST_PP_IIF(p(11), 11, 12) # define BOOST_PP_NODE_14(p) BOOST_PP_IIF(p(14), BOOST_PP_NODE_13, BOOST_PP_NODE_15) # define BOOST_PP_NODE_13(p) BOOST_PP_IIF(p(13), 13, 14) # define BOOST_PP_NODE_15(p) BOOST_PP_IIF(p(15), 15, 16) # define BOOST_PP_NODE_24(p) BOOST_PP_IIF(p(24), BOOST_PP_NODE_20, BOOST_PP_NODE_28) # define BOOST_PP_NODE_20(p) BOOST_PP_IIF(p(20), BOOST_PP_NODE_18, BOOST_PP_NODE_22) # define BOOST_PP_NODE_18(p) BOOST_PP_IIF(p(18), BOOST_PP_NODE_17, BOOST_PP_NODE_19) # define BOOST_PP_NODE_17(p) BOOST_PP_IIF(p(17), 17, 18) # define BOOST_PP_NODE_19(p) BOOST_PP_IIF(p(19), 19, 20) # define BOOST_PP_NODE_22(p) BOOST_PP_IIF(p(22), BOOST_PP_NODE_21, BOOST_PP_NODE_23) # define BOOST_PP_NODE_21(p) BOOST_PP_IIF(p(21), 21, 22) # define BOOST_PP_NODE_23(p) BOOST_PP_IIF(p(23), 23, 24) # define BOOST_PP_NODE_28(p) BOOST_PP_IIF(p(28), BOOST_PP_NODE_26, BOOST_PP_NODE_30) # define BOOST_PP_NODE_26(p) BOOST_PP_IIF(p(26), BOOST_PP_NODE_25, BOOST_PP_NODE_27) # define BOOST_PP_NODE_25(p) BOOST_PP_IIF(p(25), 25, 26) # define BOOST_PP_NODE_27(p) BOOST_PP_IIF(p(27), 27, 28) # define BOOST_PP_NODE_30(p) BOOST_PP_IIF(p(30), BOOST_PP_NODE_29, BOOST_PP_NODE_31) # define BOOST_PP_NODE_29(p) BOOST_PP_IIF(p(29), 29, 30) # define BOOST_PP_NODE_31(p) BOOST_PP_IIF(p(31), 31, 32) # define BOOST_PP_NODE_48(p) BOOST_PP_IIF(p(48), BOOST_PP_NODE_40, BOOST_PP_NODE_56) # define BOOST_PP_NODE_40(p) BOOST_PP_IIF(p(40), BOOST_PP_NODE_36, BOOST_PP_NODE_44) # define BOOST_PP_NODE_36(p) BOOST_PP_IIF(p(36), BOOST_PP_NODE_34, BOOST_PP_NODE_38) # define BOOST_PP_NODE_34(p) BOOST_PP_IIF(p(34), BOOST_PP_NODE_33, BOOST_PP_NODE_35) # define BOOST_PP_NODE_33(p) BOOST_PP_IIF(p(33), 33, 34) # define BOOST_PP_NODE_35(p) BOOST_PP_IIF(p(35), 35, 36) # define BOOST_PP_NODE_38(p) BOOST_PP_IIF(p(38), BOOST_PP_NODE_37, BOOST_PP_NODE_39) # define BOOST_PP_NODE_37(p) BOOST_PP_IIF(p(37), 37, 38) # define BOOST_PP_NODE_39(p) BOOST_PP_IIF(p(39), 39, 40) # define BOOST_PP_NODE_44(p) BOOST_PP_IIF(p(44), BOOST_PP_NODE_42, BOOST_PP_NODE_46) # define BOOST_PP_NODE_42(p) BOOST_PP_IIF(p(42), BOOST_PP_NODE_41, BOOST_PP_NODE_43) # define BOOST_PP_NODE_41(p) BOOST_PP_IIF(p(41), 41, 42) # define BOOST_PP_NODE_43(p) BOOST_PP_IIF(p(43), 43, 44) # define BOOST_PP_NODE_46(p) BOOST_PP_IIF(p(46), BOOST_PP_NODE_45, BOOST_PP_NODE_47) # define BOOST_PP_NODE_45(p) BOOST_PP_IIF(p(45), 45, 46) # define BOOST_PP_NODE_47(p) BOOST_PP_IIF(p(47), 47, 48) # define BOOST_PP_NODE_56(p) BOOST_PP_IIF(p(56), BOOST_PP_NODE_52, BOOST_PP_NODE_60) # define BOOST_PP_NODE_52(p) BOOST_PP_IIF(p(52), BOOST_PP_NODE_50, BOOST_PP_NODE_54) # define BOOST_PP_NODE_50(p) BOOST_PP_IIF(p(50), BOOST_PP_NODE_49, BOOST_PP_NODE_51) # define BOOST_PP_NODE_49(p) BOOST_PP_IIF(p(49), 49, 50) # define BOOST_PP_NODE_51(p) BOOST_PP_IIF(p(51), 51, 52) # define BOOST_PP_NODE_54(p) BOOST_PP_IIF(p(54), BOOST_PP_NODE_53, BOOST_PP_NODE_55) # define BOOST_PP_NODE_53(p) BOOST_PP_IIF(p(53), 53, 54) # define BOOST_PP_NODE_55(p) BOOST_PP_IIF(p(55), 55, 56) # define BOOST_PP_NODE_60(p) BOOST_PP_IIF(p(60), BOOST_PP_NODE_58, BOOST_PP_NODE_62) # define BOOST_PP_NODE_58(p) BOOST_PP_IIF(p(58), BOOST_PP_NODE_57, BOOST_PP_NODE_59) # define BOOST_PP_NODE_57(p) BOOST_PP_IIF(p(57), 57, 58) # define BOOST_PP_NODE_59(p) BOOST_PP_IIF(p(59), 59, 60) # define BOOST_PP_NODE_62(p) BOOST_PP_IIF(p(62), BOOST_PP_NODE_61, BOOST_PP_NODE_63) # define BOOST_PP_NODE_61(p) BOOST_PP_IIF(p(61), 61, 62) # define BOOST_PP_NODE_63(p) BOOST_PP_IIF(p(63), 63, 64) # define BOOST_PP_NODE_96(p) BOOST_PP_IIF(p(96), BOOST_PP_NODE_80, BOOST_PP_NODE_112) # define BOOST_PP_NODE_80(p) BOOST_PP_IIF(p(80), BOOST_PP_NODE_72, BOOST_PP_NODE_88) # define BOOST_PP_NODE_72(p) BOOST_PP_IIF(p(72), BOOST_PP_NODE_68, BOOST_PP_NODE_76) # define BOOST_PP_NODE_68(p) BOOST_PP_IIF(p(68), BOOST_PP_NODE_66, BOOST_PP_NODE_70) # define BOOST_PP_NODE_66(p) BOOST_PP_IIF(p(66), BOOST_PP_NODE_65, BOOST_PP_NODE_67) # define BOOST_PP_NODE_65(p) BOOST_PP_IIF(p(65), 65, 66) # define BOOST_PP_NODE_67(p) BOOST_PP_IIF(p(67), 67, 68) # define BOOST_PP_NODE_70(p) BOOST_PP_IIF(p(70), BOOST_PP_NODE_69, BOOST_PP_NODE_71) # define BOOST_PP_NODE_69(p) BOOST_PP_IIF(p(69), 69, 70) # define BOOST_PP_NODE_71(p) BOOST_PP_IIF(p(71), 71, 72) # define BOOST_PP_NODE_76(p) BOOST_PP_IIF(p(76), BOOST_PP_NODE_74, BOOST_PP_NODE_78) # define BOOST_PP_NODE_74(p) BOOST_PP_IIF(p(74), BOOST_PP_NODE_73, BOOST_PP_NODE_75) # define BOOST_PP_NODE_73(p) BOOST_PP_IIF(p(73), 73, 74) # define BOOST_PP_NODE_75(p) BOOST_PP_IIF(p(75), 75, 76) # define BOOST_PP_NODE_78(p) BOOST_PP_IIF(p(78), BOOST_PP_NODE_77, BOOST_PP_NODE_79) # define BOOST_PP_NODE_77(p) BOOST_PP_IIF(p(77), 77, 78) # define BOOST_PP_NODE_79(p) BOOST_PP_IIF(p(79), 79, 80) # define BOOST_PP_NODE_88(p) BOOST_PP_IIF(p(88), BOOST_PP_NODE_84, BOOST_PP_NODE_92) # define BOOST_PP_NODE_84(p) BOOST_PP_IIF(p(84), BOOST_PP_NODE_82, BOOST_PP_NODE_86) # define BOOST_PP_NODE_82(p) BOOST_PP_IIF(p(82), BOOST_PP_NODE_81, BOOST_PP_NODE_83) # define BOOST_PP_NODE_81(p) BOOST_PP_IIF(p(81), 81, 82) # define BOOST_PP_NODE_83(p) BOOST_PP_IIF(p(83), 83, 84) # define BOOST_PP_NODE_86(p) BOOST_PP_IIF(p(86), BOOST_PP_NODE_85, BOOST_PP_NODE_87) # define BOOST_PP_NODE_85(p) BOOST_PP_IIF(p(85), 85, 86) # define BOOST_PP_NODE_87(p) BOOST_PP_IIF(p(87), 87, 88) # define BOOST_PP_NODE_92(p) BOOST_PP_IIF(p(92), BOOST_PP_NODE_90, BOOST_PP_NODE_94) # define BOOST_PP_NODE_90(p) BOOST_PP_IIF(p(90), BOOST_PP_NODE_89, BOOST_PP_NODE_91) # define BOOST_PP_NODE_89(p) BOOST_PP_IIF(p(89), 89, 90) # define BOOST_PP_NODE_91(p) BOOST_PP_IIF(p(91), 91, 92) # define BOOST_PP_NODE_94(p) BOOST_PP_IIF(p(94), BOOST_PP_NODE_93, BOOST_PP_NODE_95) # define BOOST_PP_NODE_93(p) BOOST_PP_IIF(p(93), 93, 94) # define BOOST_PP_NODE_95(p) BOOST_PP_IIF(p(95), 95, 96) # define BOOST_PP_NODE_112(p) BOOST_PP_IIF(p(112), BOOST_PP_NODE_104, BOOST_PP_NODE_120) # define BOOST_PP_NODE_104(p) BOOST_PP_IIF(p(104), BOOST_PP_NODE_100, BOOST_PP_NODE_108) # define BOOST_PP_NODE_100(p) BOOST_PP_IIF(p(100), BOOST_PP_NODE_98, BOOST_PP_NODE_102) # define BOOST_PP_NODE_98(p) BOOST_PP_IIF(p(98), BOOST_PP_NODE_97, BOOST_PP_NODE_99) # define BOOST_PP_NODE_97(p) BOOST_PP_IIF(p(97), 97, 98) # define BOOST_PP_NODE_99(p) BOOST_PP_IIF(p(99), 99, 100) # define BOOST_PP_NODE_102(p) BOOST_PP_IIF(p(102), BOOST_PP_NODE_101, BOOST_PP_NODE_103) # define BOOST_PP_NODE_101(p) BOOST_PP_IIF(p(101), 101, 102) # define BOOST_PP_NODE_103(p) BOOST_PP_IIF(p(103), 103, 104) # define BOOST_PP_NODE_108(p) BOOST_PP_IIF(p(108), BOOST_PP_NODE_106, BOOST_PP_NODE_110) # define BOOST_PP_NODE_106(p) BOOST_PP_IIF(p(106), BOOST_PP_NODE_105, BOOST_PP_NODE_107) # define BOOST_PP_NODE_105(p) BOOST_PP_IIF(p(105), 105, 106) # define BOOST_PP_NODE_107(p) BOOST_PP_IIF(p(107), 107, 108) # define BOOST_PP_NODE_110(p) BOOST_PP_IIF(p(110), BOOST_PP_NODE_109, BOOST_PP_NODE_111) # define BOOST_PP_NODE_109(p) BOOST_PP_IIF(p(109), 109, 110) # define BOOST_PP_NODE_111(p) BOOST_PP_IIF(p(111), 111, 112) # define BOOST_PP_NODE_120(p) BOOST_PP_IIF(p(120), BOOST_PP_NODE_116, BOOST_PP_NODE_124) # define BOOST_PP_NODE_116(p) BOOST_PP_IIF(p(116), BOOST_PP_NODE_114, BOOST_PP_NODE_118) # define BOOST_PP_NODE_114(p) BOOST_PP_IIF(p(114), BOOST_PP_NODE_113, BOOST_PP_NODE_115) # define BOOST_PP_NODE_113(p) BOOST_PP_IIF(p(113), 113, 114) # define BOOST_PP_NODE_115(p) BOOST_PP_IIF(p(115), 115, 116) # define BOOST_PP_NODE_118(p) BOOST_PP_IIF(p(118), BOOST_PP_NODE_117, BOOST_PP_NODE_119) # define BOOST_PP_NODE_117(p) BOOST_PP_IIF(p(117), 117, 118) # define BOOST_PP_NODE_119(p) BOOST_PP_IIF(p(119), 119, 120) # define BOOST_PP_NODE_124(p) BOOST_PP_IIF(p(124), BOOST_PP_NODE_122, BOOST_PP_NODE_126) # define BOOST_PP_NODE_122(p) BOOST_PP_IIF(p(122), BOOST_PP_NODE_121, BOOST_PP_NODE_123) # define BOOST_PP_NODE_121(p) BOOST_PP_IIF(p(121), 121, 122) # define BOOST_PP_NODE_123(p) BOOST_PP_IIF(p(123), 123, 124) # define BOOST_PP_NODE_126(p) BOOST_PP_IIF(p(126), BOOST_PP_NODE_125, BOOST_PP_NODE_127) # define BOOST_PP_NODE_125(p) BOOST_PP_IIF(p(125), 125, 126) # define BOOST_PP_NODE_127(p) BOOST_PP_IIF(p(127), 127, 128) # define BOOST_PP_NODE_192(p) BOOST_PP_IIF(p(192), BOOST_PP_NODE_160, BOOST_PP_NODE_224) # define BOOST_PP_NODE_160(p) BOOST_PP_IIF(p(160), BOOST_PP_NODE_144, BOOST_PP_NODE_176) # define BOOST_PP_NODE_144(p) BOOST_PP_IIF(p(144), BOOST_PP_NODE_136, BOOST_PP_NODE_152) # define BOOST_PP_NODE_136(p) BOOST_PP_IIF(p(136), BOOST_PP_NODE_132, BOOST_PP_NODE_140) # define BOOST_PP_NODE_132(p) BOOST_PP_IIF(p(132), BOOST_PP_NODE_130, BOOST_PP_NODE_134) # define BOOST_PP_NODE_130(p) BOOST_PP_IIF(p(130), BOOST_PP_NODE_129, BOOST_PP_NODE_131) # define BOOST_PP_NODE_129(p) BOOST_PP_IIF(p(129), 129, 130) # define BOOST_PP_NODE_131(p) BOOST_PP_IIF(p(131), 131, 132) # define BOOST_PP_NODE_134(p) BOOST_PP_IIF(p(134), BOOST_PP_NODE_133, BOOST_PP_NODE_135) # define BOOST_PP_NODE_133(p) BOOST_PP_IIF(p(133), 133, 134) # define BOOST_PP_NODE_135(p) BOOST_PP_IIF(p(135), 135, 136) # define BOOST_PP_NODE_140(p) BOOST_PP_IIF(p(140), BOOST_PP_NODE_138, BOOST_PP_NODE_142) # define BOOST_PP_NODE_138(p) BOOST_PP_IIF(p(138), BOOST_PP_NODE_137, BOOST_PP_NODE_139) # define BOOST_PP_NODE_137(p) BOOST_PP_IIF(p(137), 137, 138) # define BOOST_PP_NODE_139(p) BOOST_PP_IIF(p(139), 139, 140) # define BOOST_PP_NODE_142(p) BOOST_PP_IIF(p(142), BOOST_PP_NODE_141, BOOST_PP_NODE_143) # define BOOST_PP_NODE_141(p) BOOST_PP_IIF(p(141), 141, 142) # define BOOST_PP_NODE_143(p) BOOST_PP_IIF(p(143), 143, 144) # define BOOST_PP_NODE_152(p) BOOST_PP_IIF(p(152), BOOST_PP_NODE_148, BOOST_PP_NODE_156) # define BOOST_PP_NODE_148(p) BOOST_PP_IIF(p(148), BOOST_PP_NODE_146, BOOST_PP_NODE_150) # define BOOST_PP_NODE_146(p) BOOST_PP_IIF(p(146), BOOST_PP_NODE_145, BOOST_PP_NODE_147) # define BOOST_PP_NODE_145(p) BOOST_PP_IIF(p(145), 145, 146) # define BOOST_PP_NODE_147(p) BOOST_PP_IIF(p(147), 147, 148) # define BOOST_PP_NODE_150(p) BOOST_PP_IIF(p(150), BOOST_PP_NODE_149, BOOST_PP_NODE_151) # define BOOST_PP_NODE_149(p) BOOST_PP_IIF(p(149), 149, 150) # define BOOST_PP_NODE_151(p) BOOST_PP_IIF(p(151), 151, 152) # define BOOST_PP_NODE_156(p) BOOST_PP_IIF(p(156), BOOST_PP_NODE_154, BOOST_PP_NODE_158) # define BOOST_PP_NODE_154(p) BOOST_PP_IIF(p(154), BOOST_PP_NODE_153, BOOST_PP_NODE_155) # define BOOST_PP_NODE_153(p) BOOST_PP_IIF(p(153), 153, 154) # define BOOST_PP_NODE_155(p) BOOST_PP_IIF(p(155), 155, 156) # define BOOST_PP_NODE_158(p) BOOST_PP_IIF(p(158), BOOST_PP_NODE_157, BOOST_PP_NODE_159) # define BOOST_PP_NODE_157(p) BOOST_PP_IIF(p(157), 157, 158) # define BOOST_PP_NODE_159(p) BOOST_PP_IIF(p(159), 159, 160) # define BOOST_PP_NODE_176(p) BOOST_PP_IIF(p(176), BOOST_PP_NODE_168, BOOST_PP_NODE_184) # define BOOST_PP_NODE_168(p) BOOST_PP_IIF(p(168), BOOST_PP_NODE_164, BOOST_PP_NODE_172) # define BOOST_PP_NODE_164(p) BOOST_PP_IIF(p(164), BOOST_PP_NODE_162, BOOST_PP_NODE_166) # define BOOST_PP_NODE_162(p) BOOST_PP_IIF(p(162), BOOST_PP_NODE_161, BOOST_PP_NODE_163) # define BOOST_PP_NODE_161(p) BOOST_PP_IIF(p(161), 161, 162) # define BOOST_PP_NODE_163(p) BOOST_PP_IIF(p(163), 163, 164) # define BOOST_PP_NODE_166(p) BOOST_PP_IIF(p(166), BOOST_PP_NODE_165, BOOST_PP_NODE_167) # define BOOST_PP_NODE_165(p) BOOST_PP_IIF(p(165), 165, 166) # define BOOST_PP_NODE_167(p) BOOST_PP_IIF(p(167), 167, 168) # define BOOST_PP_NODE_172(p) BOOST_PP_IIF(p(172), BOOST_PP_NODE_170, BOOST_PP_NODE_174) # define BOOST_PP_NODE_170(p) BOOST_PP_IIF(p(170), BOOST_PP_NODE_169, BOOST_PP_NODE_171) # define BOOST_PP_NODE_169(p) BOOST_PP_IIF(p(169), 169, 170) # define BOOST_PP_NODE_171(p) BOOST_PP_IIF(p(171), 171, 172) # define BOOST_PP_NODE_174(p) BOOST_PP_IIF(p(174), BOOST_PP_NODE_173, BOOST_PP_NODE_175) # define BOOST_PP_NODE_173(p) BOOST_PP_IIF(p(173), 173, 174) # define BOOST_PP_NODE_175(p) BOOST_PP_IIF(p(175), 175, 176) # define BOOST_PP_NODE_184(p) BOOST_PP_IIF(p(184), BOOST_PP_NODE_180, BOOST_PP_NODE_188) # define BOOST_PP_NODE_180(p) BOOST_PP_IIF(p(180), BOOST_PP_NODE_178, BOOST_PP_NODE_182) # define BOOST_PP_NODE_178(p) BOOST_PP_IIF(p(178), BOOST_PP_NODE_177, BOOST_PP_NODE_179) # define BOOST_PP_NODE_177(p) BOOST_PP_IIF(p(177), 177, 178) # define BOOST_PP_NODE_179(p) BOOST_PP_IIF(p(179), 179, 180) # define BOOST_PP_NODE_182(p) BOOST_PP_IIF(p(182), BOOST_PP_NODE_181, BOOST_PP_NODE_183) # define BOOST_PP_NODE_181(p) BOOST_PP_IIF(p(181), 181, 182) # define BOOST_PP_NODE_183(p) BOOST_PP_IIF(p(183), 183, 184) # define BOOST_PP_NODE_188(p) BOOST_PP_IIF(p(188), BOOST_PP_NODE_186, BOOST_PP_NODE_190) # define BOOST_PP_NODE_186(p) BOOST_PP_IIF(p(186), BOOST_PP_NODE_185, BOOST_PP_NODE_187) # define BOOST_PP_NODE_185(p) BOOST_PP_IIF(p(185), 185, 186) # define BOOST_PP_NODE_187(p) BOOST_PP_IIF(p(187), 187, 188) # define BOOST_PP_NODE_190(p) BOOST_PP_IIF(p(190), BOOST_PP_NODE_189, BOOST_PP_NODE_191) # define BOOST_PP_NODE_189(p) BOOST_PP_IIF(p(189), 189, 190) # define BOOST_PP_NODE_191(p) BOOST_PP_IIF(p(191), 191, 192) # define BOOST_PP_NODE_224(p) BOOST_PP_IIF(p(224), BOOST_PP_NODE_208, BOOST_PP_NODE_240) # define BOOST_PP_NODE_208(p) BOOST_PP_IIF(p(208), BOOST_PP_NODE_200, BOOST_PP_NODE_216) # define BOOST_PP_NODE_200(p) BOOST_PP_IIF(p(200), BOOST_PP_NODE_196, BOOST_PP_NODE_204) # define BOOST_PP_NODE_196(p) BOOST_PP_IIF(p(196), BOOST_PP_NODE_194, BOOST_PP_NODE_198) # define BOOST_PP_NODE_194(p) BOOST_PP_IIF(p(194), BOOST_PP_NODE_193, BOOST_PP_NODE_195) # define BOOST_PP_NODE_193(p) BOOST_PP_IIF(p(193), 193, 194) # define BOOST_PP_NODE_195(p) BOOST_PP_IIF(p(195), 195, 196) # define BOOST_PP_NODE_198(p) BOOST_PP_IIF(p(198), BOOST_PP_NODE_197, BOOST_PP_NODE_199) # define BOOST_PP_NODE_197(p) BOOST_PP_IIF(p(197), 197, 198) # define BOOST_PP_NODE_199(p) BOOST_PP_IIF(p(199), 199, 200) # define BOOST_PP_NODE_204(p) BOOST_PP_IIF(p(204), BOOST_PP_NODE_202, BOOST_PP_NODE_206) # define BOOST_PP_NODE_202(p) BOOST_PP_IIF(p(202), BOOST_PP_NODE_201, BOOST_PP_NODE_203) # define BOOST_PP_NODE_201(p) BOOST_PP_IIF(p(201), 201, 202) # define BOOST_PP_NODE_203(p) BOOST_PP_IIF(p(203), 203, 204) # define BOOST_PP_NODE_206(p) BOOST_PP_IIF(p(206), BOOST_PP_NODE_205, BOOST_PP_NODE_207) # define BOOST_PP_NODE_205(p) BOOST_PP_IIF(p(205), 205, 206) # define BOOST_PP_NODE_207(p) BOOST_PP_IIF(p(207), 207, 208) # define BOOST_PP_NODE_216(p) BOOST_PP_IIF(p(216), BOOST_PP_NODE_212, BOOST_PP_NODE_220) # define BOOST_PP_NODE_212(p) BOOST_PP_IIF(p(212), BOOST_PP_NODE_210, BOOST_PP_NODE_214) # define BOOST_PP_NODE_210(p) BOOST_PP_IIF(p(210), BOOST_PP_NODE_209, BOOST_PP_NODE_211) # define BOOST_PP_NODE_209(p) BOOST_PP_IIF(p(209), 209, 210) # define BOOST_PP_NODE_211(p) BOOST_PP_IIF(p(211), 211, 212) # define BOOST_PP_NODE_214(p) BOOST_PP_IIF(p(214), BOOST_PP_NODE_213, BOOST_PP_NODE_215) # define BOOST_PP_NODE_213(p) BOOST_PP_IIF(p(213), 213, 214) # define BOOST_PP_NODE_215(p) BOOST_PP_IIF(p(215), 215, 216) # define BOOST_PP_NODE_220(p) BOOST_PP_IIF(p(220), BOOST_PP_NODE_218, BOOST_PP_NODE_222) # define BOOST_PP_NODE_218(p) BOOST_PP_IIF(p(218), BOOST_PP_NODE_217, BOOST_PP_NODE_219) # define BOOST_PP_NODE_217(p) BOOST_PP_IIF(p(217), 217, 218) # define BOOST_PP_NODE_219(p) BOOST_PP_IIF(p(219), 219, 220) # define BOOST_PP_NODE_222(p) BOOST_PP_IIF(p(222), BOOST_PP_NODE_221, BOOST_PP_NODE_223) # define BOOST_PP_NODE_221(p) BOOST_PP_IIF(p(221), 221, 222) # define BOOST_PP_NODE_223(p) BOOST_PP_IIF(p(223), 223, 224) # define BOOST_PP_NODE_240(p) BOOST_PP_IIF(p(240), BOOST_PP_NODE_232, BOOST_PP_NODE_248) # define BOOST_PP_NODE_232(p) BOOST_PP_IIF(p(232), BOOST_PP_NODE_228, BOOST_PP_NODE_236) # define BOOST_PP_NODE_228(p) BOOST_PP_IIF(p(228), BOOST_PP_NODE_226, BOOST_PP_NODE_230) # define BOOST_PP_NODE_226(p) BOOST_PP_IIF(p(226), BOOST_PP_NODE_225, BOOST_PP_NODE_227) # define BOOST_PP_NODE_225(p) BOOST_PP_IIF(p(225), 225, 226) # define BOOST_PP_NODE_227(p) BOOST_PP_IIF(p(227), 227, 228) # define BOOST_PP_NODE_230(p) BOOST_PP_IIF(p(230), BOOST_PP_NODE_229, BOOST_PP_NODE_231) # define BOOST_PP_NODE_229(p) BOOST_PP_IIF(p(229), 229, 230) # define BOOST_PP_NODE_231(p) BOOST_PP_IIF(p(231), 231, 232) # define BOOST_PP_NODE_236(p) BOOST_PP_IIF(p(236), BOOST_PP_NODE_234, BOOST_PP_NODE_238) # define BOOST_PP_NODE_234(p) BOOST_PP_IIF(p(234), BOOST_PP_NODE_233, BOOST_PP_NODE_235) # define BOOST_PP_NODE_233(p) BOOST_PP_IIF(p(233), 233, 234) # define BOOST_PP_NODE_235(p) BOOST_PP_IIF(p(235), 235, 236) # define BOOST_PP_NODE_238(p) BOOST_PP_IIF(p(238), BOOST_PP_NODE_237, BOOST_PP_NODE_239) # define BOOST_PP_NODE_237(p) BOOST_PP_IIF(p(237), 237, 238) # define BOOST_PP_NODE_239(p) BOOST_PP_IIF(p(239), 239, 240) # define BOOST_PP_NODE_248(p) BOOST_PP_IIF(p(248), BOOST_PP_NODE_244, BOOST_PP_NODE_252) # define BOOST_PP_NODE_244(p) BOOST_PP_IIF(p(244), BOOST_PP_NODE_242, BOOST_PP_NODE_246) # define BOOST_PP_NODE_242(p) BOOST_PP_IIF(p(242), BOOST_PP_NODE_241, BOOST_PP_NODE_243) # define BOOST_PP_NODE_241(p) BOOST_PP_IIF(p(241), 241, 242) # define BOOST_PP_NODE_243(p) BOOST_PP_IIF(p(243), 243, 244) # define BOOST_PP_NODE_246(p) BOOST_PP_IIF(p(246), BOOST_PP_NODE_245, BOOST_PP_NODE_247) # define BOOST_PP_NODE_245(p) BOOST_PP_IIF(p(245), 245, 246) # define BOOST_PP_NODE_247(p) BOOST_PP_IIF(p(247), 247, 248) # define BOOST_PP_NODE_252(p) BOOST_PP_IIF(p(252), BOOST_PP_NODE_250, BOOST_PP_NODE_254) # define BOOST_PP_NODE_250(p) BOOST_PP_IIF(p(250), BOOST_PP_NODE_249, BOOST_PP_NODE_251) # define BOOST_PP_NODE_249(p) BOOST_PP_IIF(p(249), 249, 250) # define BOOST_PP_NODE_251(p) BOOST_PP_IIF(p(251), 251, 252) # define BOOST_PP_NODE_254(p) BOOST_PP_IIF(p(254), BOOST_PP_NODE_253, BOOST_PP_NODE_255) # define BOOST_PP_NODE_253(p) BOOST_PP_IIF(p(253), 253, 254) # define BOOST_PP_NODE_255(p) BOOST_PP_IIF(p(255), 255, 256) # # endif # endif ================================================ FILE: benchmarks/boost/preprocessor/detail/check.hpp ================================================ # /* ************************************************************************** # * * # * (C) Copyright Paul Mensonides 2002. # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # * * # ************************************************************************** */ # # /* See http://www.boost.org for most recent version. */ # # ifndef BOOST_PREPROCESSOR_DETAIL_CHECK_HPP # define BOOST_PREPROCESSOR_DETAIL_CHECK_HPP # # include # include # # /* BOOST_PP_CHECK */ # # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC() # define BOOST_PP_CHECK(x, type) BOOST_PP_CHECK_D(x, type) # else # define BOOST_PP_CHECK(x, type) BOOST_PP_CHECK_OO((x, type)) # define BOOST_PP_CHECK_OO(par) BOOST_PP_CHECK_D ## par # endif # # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MSVC() && ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_DMC() # define BOOST_PP_CHECK_D(x, type) BOOST_PP_CHECK_1(BOOST_PP_CAT(BOOST_PP_CHECK_RESULT_, type x)) # define BOOST_PP_CHECK_1(chk) BOOST_PP_CHECK_2(chk) # define BOOST_PP_CHECK_2(res, _) res # elif BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MSVC() # define BOOST_PP_CHECK_D(x, type) BOOST_PP_CHECK_1(type x) # define BOOST_PP_CHECK_1(chk) BOOST_PP_CHECK_2(chk) # define BOOST_PP_CHECK_2(chk) BOOST_PP_CHECK_3((BOOST_PP_CHECK_RESULT_ ## chk)) # define BOOST_PP_CHECK_3(im) BOOST_PP_CHECK_5(BOOST_PP_CHECK_4 im) # define BOOST_PP_CHECK_4(res, _) res # define BOOST_PP_CHECK_5(res) res # else /* DMC */ # define BOOST_PP_CHECK_D(x, type) BOOST_PP_CHECK_OO((type x)) # define BOOST_PP_CHECK_OO(par) BOOST_PP_CHECK_0 ## par # define BOOST_PP_CHECK_0(chk) BOOST_PP_CHECK_1(BOOST_PP_CAT(BOOST_PP_CHECK_RESULT_, chk)) # define BOOST_PP_CHECK_1(chk) BOOST_PP_CHECK_2(chk) # define BOOST_PP_CHECK_2(res, _) res # endif # # define BOOST_PP_CHECK_RESULT_1 1, BOOST_PP_NIL # # endif ================================================ FILE: benchmarks/boost/preprocessor/detail/dmc/auto_rec.hpp ================================================ # /* ************************************************************************** # * * # * (C) Copyright Paul Mensonides 2002. # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # * * # ************************************************************************** */ # # /* See http://www.boost.org for most recent version. */ # # ifndef BOOST_PREPROCESSOR_DETAIL_AUTO_REC_HPP # define BOOST_PREPROCESSOR_DETAIL_AUTO_REC_HPP # # include # # /* BOOST_PP_AUTO_REC */ # # define BOOST_PP_AUTO_REC(pred, n) BOOST_PP_NODE_ENTRY_ ## n(pred) # # define BOOST_PP_NODE_ENTRY_256(p) BOOST_PP_NODE_128(p)(p)(p)(p)(p)(p)(p)(p) # define BOOST_PP_NODE_ENTRY_128(p) BOOST_PP_NODE_64(p)(p)(p)(p)(p)(p)(p) # define BOOST_PP_NODE_ENTRY_64(p) BOOST_PP_NODE_32(p)(p)(p)(p)(p)(p) # define BOOST_PP_NODE_ENTRY_32(p) BOOST_PP_NODE_16(p)(p)(p)(p)(p) # define BOOST_PP_NODE_ENTRY_16(p) BOOST_PP_NODE_8(p)(p)(p)(p) # define BOOST_PP_NODE_ENTRY_8(p) BOOST_PP_NODE_4(p)(p)(p) # define BOOST_PP_NODE_ENTRY_4(p) BOOST_PP_NODE_2(p)(p) # define BOOST_PP_NODE_ENTRY_2(p) BOOST_PP_NODE_1(p) # # define BOOST_PP_NODE_128(p) BOOST_PP_IIF(p##(128), BOOST_PP_NODE_64, BOOST_PP_NODE_192) # define BOOST_PP_NODE_64(p) BOOST_PP_IIF(p##(64), BOOST_PP_NODE_32, BOOST_PP_NODE_96) # define BOOST_PP_NODE_32(p) BOOST_PP_IIF(p##(32), BOOST_PP_NODE_16, BOOST_PP_NODE_48) # define BOOST_PP_NODE_16(p) BOOST_PP_IIF(p##(16), BOOST_PP_NODE_8, BOOST_PP_NODE_24) # define BOOST_PP_NODE_8(p) BOOST_PP_IIF(p##(8), BOOST_PP_NODE_4, BOOST_PP_NODE_12) # define BOOST_PP_NODE_4(p) BOOST_PP_IIF(p##(4), BOOST_PP_NODE_2, BOOST_PP_NODE_6) # define BOOST_PP_NODE_2(p) BOOST_PP_IIF(p##(2), BOOST_PP_NODE_1, BOOST_PP_NODE_3) # define BOOST_PP_NODE_1(p) BOOST_PP_IIF(p##(1), 1, 2) # define BOOST_PP_NODE_3(p) BOOST_PP_IIF(p##(3), 3, 4) # define BOOST_PP_NODE_6(p) BOOST_PP_IIF(p##(6), BOOST_PP_NODE_5, BOOST_PP_NODE_7) # define BOOST_PP_NODE_5(p) BOOST_PP_IIF(p##(5), 5, 6) # define BOOST_PP_NODE_7(p) BOOST_PP_IIF(p##(7), 7, 8) # define BOOST_PP_NODE_12(p) BOOST_PP_IIF(p##(12), BOOST_PP_NODE_10, BOOST_PP_NODE_14) # define BOOST_PP_NODE_10(p) BOOST_PP_IIF(p##(10), BOOST_PP_NODE_9, BOOST_PP_NODE_11) # define BOOST_PP_NODE_9(p) BOOST_PP_IIF(p##(9), 9, 10) # define BOOST_PP_NODE_11(p) BOOST_PP_IIF(p##(11), 11, 12) # define BOOST_PP_NODE_14(p) BOOST_PP_IIF(p##(14), BOOST_PP_NODE_13, BOOST_PP_NODE_15) # define BOOST_PP_NODE_13(p) BOOST_PP_IIF(p##(13), 13, 14) # define BOOST_PP_NODE_15(p) BOOST_PP_IIF(p##(15), 15, 16) # define BOOST_PP_NODE_24(p) BOOST_PP_IIF(p##(24), BOOST_PP_NODE_20, BOOST_PP_NODE_28) # define BOOST_PP_NODE_20(p) BOOST_PP_IIF(p##(20), BOOST_PP_NODE_18, BOOST_PP_NODE_22) # define BOOST_PP_NODE_18(p) BOOST_PP_IIF(p##(18), BOOST_PP_NODE_17, BOOST_PP_NODE_19) # define BOOST_PP_NODE_17(p) BOOST_PP_IIF(p##(17), 17, 18) # define BOOST_PP_NODE_19(p) BOOST_PP_IIF(p##(19), 19, 20) # define BOOST_PP_NODE_22(p) BOOST_PP_IIF(p##(22), BOOST_PP_NODE_21, BOOST_PP_NODE_23) # define BOOST_PP_NODE_21(p) BOOST_PP_IIF(p##(21), 21, 22) # define BOOST_PP_NODE_23(p) BOOST_PP_IIF(p##(23), 23, 24) # define BOOST_PP_NODE_28(p) BOOST_PP_IIF(p##(28), BOOST_PP_NODE_26, BOOST_PP_NODE_30) # define BOOST_PP_NODE_26(p) BOOST_PP_IIF(p##(26), BOOST_PP_NODE_25, BOOST_PP_NODE_27) # define BOOST_PP_NODE_25(p) BOOST_PP_IIF(p##(25), 25, 26) # define BOOST_PP_NODE_27(p) BOOST_PP_IIF(p##(27), 27, 28) # define BOOST_PP_NODE_30(p) BOOST_PP_IIF(p##(30), BOOST_PP_NODE_29, BOOST_PP_NODE_31) # define BOOST_PP_NODE_29(p) BOOST_PP_IIF(p##(29), 29, 30) # define BOOST_PP_NODE_31(p) BOOST_PP_IIF(p##(31), 31, 32) # define BOOST_PP_NODE_48(p) BOOST_PP_IIF(p##(48), BOOST_PP_NODE_40, BOOST_PP_NODE_56) # define BOOST_PP_NODE_40(p) BOOST_PP_IIF(p##(40), BOOST_PP_NODE_36, BOOST_PP_NODE_44) # define BOOST_PP_NODE_36(p) BOOST_PP_IIF(p##(36), BOOST_PP_NODE_34, BOOST_PP_NODE_38) # define BOOST_PP_NODE_34(p) BOOST_PP_IIF(p##(34), BOOST_PP_NODE_33, BOOST_PP_NODE_35) # define BOOST_PP_NODE_33(p) BOOST_PP_IIF(p##(33), 33, 34) # define BOOST_PP_NODE_35(p) BOOST_PP_IIF(p##(35), 35, 36) # define BOOST_PP_NODE_38(p) BOOST_PP_IIF(p##(38), BOOST_PP_NODE_37, BOOST_PP_NODE_39) # define BOOST_PP_NODE_37(p) BOOST_PP_IIF(p##(37), 37, 38) # define BOOST_PP_NODE_39(p) BOOST_PP_IIF(p##(39), 39, 40) # define BOOST_PP_NODE_44(p) BOOST_PP_IIF(p##(44), BOOST_PP_NODE_42, BOOST_PP_NODE_46) # define BOOST_PP_NODE_42(p) BOOST_PP_IIF(p##(42), BOOST_PP_NODE_41, BOOST_PP_NODE_43) # define BOOST_PP_NODE_41(p) BOOST_PP_IIF(p##(41), 41, 42) # define BOOST_PP_NODE_43(p) BOOST_PP_IIF(p##(43), 43, 44) # define BOOST_PP_NODE_46(p) BOOST_PP_IIF(p##(46), BOOST_PP_NODE_45, BOOST_PP_NODE_47) # define BOOST_PP_NODE_45(p) BOOST_PP_IIF(p##(45), 45, 46) # define BOOST_PP_NODE_47(p) BOOST_PP_IIF(p##(47), 47, 48) # define BOOST_PP_NODE_56(p) BOOST_PP_IIF(p##(56), BOOST_PP_NODE_52, BOOST_PP_NODE_60) # define BOOST_PP_NODE_52(p) BOOST_PP_IIF(p##(52), BOOST_PP_NODE_50, BOOST_PP_NODE_54) # define BOOST_PP_NODE_50(p) BOOST_PP_IIF(p##(50), BOOST_PP_NODE_49, BOOST_PP_NODE_51) # define BOOST_PP_NODE_49(p) BOOST_PP_IIF(p##(49), 49, 50) # define BOOST_PP_NODE_51(p) BOOST_PP_IIF(p##(51), 51, 52) # define BOOST_PP_NODE_54(p) BOOST_PP_IIF(p##(54), BOOST_PP_NODE_53, BOOST_PP_NODE_55) # define BOOST_PP_NODE_53(p) BOOST_PP_IIF(p##(53), 53, 54) # define BOOST_PP_NODE_55(p) BOOST_PP_IIF(p##(55), 55, 56) # define BOOST_PP_NODE_60(p) BOOST_PP_IIF(p##(60), BOOST_PP_NODE_58, BOOST_PP_NODE_62) # define BOOST_PP_NODE_58(p) BOOST_PP_IIF(p##(58), BOOST_PP_NODE_57, BOOST_PP_NODE_59) # define BOOST_PP_NODE_57(p) BOOST_PP_IIF(p##(57), 57, 58) # define BOOST_PP_NODE_59(p) BOOST_PP_IIF(p##(59), 59, 60) # define BOOST_PP_NODE_62(p) BOOST_PP_IIF(p##(62), BOOST_PP_NODE_61, BOOST_PP_NODE_63) # define BOOST_PP_NODE_61(p) BOOST_PP_IIF(p##(61), 61, 62) # define BOOST_PP_NODE_63(p) BOOST_PP_IIF(p##(63), 63, 64) # define BOOST_PP_NODE_96(p) BOOST_PP_IIF(p##(96), BOOST_PP_NODE_80, BOOST_PP_NODE_112) # define BOOST_PP_NODE_80(p) BOOST_PP_IIF(p##(80), BOOST_PP_NODE_72, BOOST_PP_NODE_88) # define BOOST_PP_NODE_72(p) BOOST_PP_IIF(p##(72), BOOST_PP_NODE_68, BOOST_PP_NODE_76) # define BOOST_PP_NODE_68(p) BOOST_PP_IIF(p##(68), BOOST_PP_NODE_66, BOOST_PP_NODE_70) # define BOOST_PP_NODE_66(p) BOOST_PP_IIF(p##(66), BOOST_PP_NODE_65, BOOST_PP_NODE_67) # define BOOST_PP_NODE_65(p) BOOST_PP_IIF(p##(65), 65, 66) # define BOOST_PP_NODE_67(p) BOOST_PP_IIF(p##(67), 67, 68) # define BOOST_PP_NODE_70(p) BOOST_PP_IIF(p##(70), BOOST_PP_NODE_69, BOOST_PP_NODE_71) # define BOOST_PP_NODE_69(p) BOOST_PP_IIF(p##(69), 69, 70) # define BOOST_PP_NODE_71(p) BOOST_PP_IIF(p##(71), 71, 72) # define BOOST_PP_NODE_76(p) BOOST_PP_IIF(p##(76), BOOST_PP_NODE_74, BOOST_PP_NODE_78) # define BOOST_PP_NODE_74(p) BOOST_PP_IIF(p##(74), BOOST_PP_NODE_73, BOOST_PP_NODE_75) # define BOOST_PP_NODE_73(p) BOOST_PP_IIF(p##(73), 73, 74) # define BOOST_PP_NODE_75(p) BOOST_PP_IIF(p##(75), 75, 76) # define BOOST_PP_NODE_78(p) BOOST_PP_IIF(p##(78), BOOST_PP_NODE_77, BOOST_PP_NODE_79) # define BOOST_PP_NODE_77(p) BOOST_PP_IIF(p##(77), 77, 78) # define BOOST_PP_NODE_79(p) BOOST_PP_IIF(p##(79), 79, 80) # define BOOST_PP_NODE_88(p) BOOST_PP_IIF(p##(88), BOOST_PP_NODE_84, BOOST_PP_NODE_92) # define BOOST_PP_NODE_84(p) BOOST_PP_IIF(p##(84), BOOST_PP_NODE_82, BOOST_PP_NODE_86) # define BOOST_PP_NODE_82(p) BOOST_PP_IIF(p##(82), BOOST_PP_NODE_81, BOOST_PP_NODE_83) # define BOOST_PP_NODE_81(p) BOOST_PP_IIF(p##(81), 81, 82) # define BOOST_PP_NODE_83(p) BOOST_PP_IIF(p##(83), 83, 84) # define BOOST_PP_NODE_86(p) BOOST_PP_IIF(p##(86), BOOST_PP_NODE_85, BOOST_PP_NODE_87) # define BOOST_PP_NODE_85(p) BOOST_PP_IIF(p##(85), 85, 86) # define BOOST_PP_NODE_87(p) BOOST_PP_IIF(p##(87), 87, 88) # define BOOST_PP_NODE_92(p) BOOST_PP_IIF(p##(92), BOOST_PP_NODE_90, BOOST_PP_NODE_94) # define BOOST_PP_NODE_90(p) BOOST_PP_IIF(p##(90), BOOST_PP_NODE_89, BOOST_PP_NODE_91) # define BOOST_PP_NODE_89(p) BOOST_PP_IIF(p##(89), 89, 90) # define BOOST_PP_NODE_91(p) BOOST_PP_IIF(p##(91), 91, 92) # define BOOST_PP_NODE_94(p) BOOST_PP_IIF(p##(94), BOOST_PP_NODE_93, BOOST_PP_NODE_95) # define BOOST_PP_NODE_93(p) BOOST_PP_IIF(p##(93), 93, 94) # define BOOST_PP_NODE_95(p) BOOST_PP_IIF(p##(95), 95, 96) # define BOOST_PP_NODE_112(p) BOOST_PP_IIF(p##(112), BOOST_PP_NODE_104, BOOST_PP_NODE_120) # define BOOST_PP_NODE_104(p) BOOST_PP_IIF(p##(104), BOOST_PP_NODE_100, BOOST_PP_NODE_108) # define BOOST_PP_NODE_100(p) BOOST_PP_IIF(p##(100), BOOST_PP_NODE_98, BOOST_PP_NODE_102) # define BOOST_PP_NODE_98(p) BOOST_PP_IIF(p##(98), BOOST_PP_NODE_97, BOOST_PP_NODE_99) # define BOOST_PP_NODE_97(p) BOOST_PP_IIF(p##(97), 97, 98) # define BOOST_PP_NODE_99(p) BOOST_PP_IIF(p##(99), 99, 100) # define BOOST_PP_NODE_102(p) BOOST_PP_IIF(p##(102), BOOST_PP_NODE_101, BOOST_PP_NODE_103) # define BOOST_PP_NODE_101(p) BOOST_PP_IIF(p##(101), 101, 102) # define BOOST_PP_NODE_103(p) BOOST_PP_IIF(p##(103), 103, 104) # define BOOST_PP_NODE_108(p) BOOST_PP_IIF(p##(108), BOOST_PP_NODE_106, BOOST_PP_NODE_110) # define BOOST_PP_NODE_106(p) BOOST_PP_IIF(p##(106), BOOST_PP_NODE_105, BOOST_PP_NODE_107) # define BOOST_PP_NODE_105(p) BOOST_PP_IIF(p##(105), 105, 106) # define BOOST_PP_NODE_107(p) BOOST_PP_IIF(p##(107), 107, 108) # define BOOST_PP_NODE_110(p) BOOST_PP_IIF(p##(110), BOOST_PP_NODE_109, BOOST_PP_NODE_111) # define BOOST_PP_NODE_109(p) BOOST_PP_IIF(p##(109), 109, 110) # define BOOST_PP_NODE_111(p) BOOST_PP_IIF(p##(111), 111, 112) # define BOOST_PP_NODE_120(p) BOOST_PP_IIF(p##(120), BOOST_PP_NODE_116, BOOST_PP_NODE_124) # define BOOST_PP_NODE_116(p) BOOST_PP_IIF(p##(116), BOOST_PP_NODE_114, BOOST_PP_NODE_118) # define BOOST_PP_NODE_114(p) BOOST_PP_IIF(p##(114), BOOST_PP_NODE_113, BOOST_PP_NODE_115) # define BOOST_PP_NODE_113(p) BOOST_PP_IIF(p##(113), 113, 114) # define BOOST_PP_NODE_115(p) BOOST_PP_IIF(p##(115), 115, 116) # define BOOST_PP_NODE_118(p) BOOST_PP_IIF(p##(118), BOOST_PP_NODE_117, BOOST_PP_NODE_119) # define BOOST_PP_NODE_117(p) BOOST_PP_IIF(p##(117), 117, 118) # define BOOST_PP_NODE_119(p) BOOST_PP_IIF(p##(119), 119, 120) # define BOOST_PP_NODE_124(p) BOOST_PP_IIF(p##(124), BOOST_PP_NODE_122, BOOST_PP_NODE_126) # define BOOST_PP_NODE_122(p) BOOST_PP_IIF(p##(122), BOOST_PP_NODE_121, BOOST_PP_NODE_123) # define BOOST_PP_NODE_121(p) BOOST_PP_IIF(p##(121), 121, 122) # define BOOST_PP_NODE_123(p) BOOST_PP_IIF(p##(123), 123, 124) # define BOOST_PP_NODE_126(p) BOOST_PP_IIF(p##(126), BOOST_PP_NODE_125, BOOST_PP_NODE_127) # define BOOST_PP_NODE_125(p) BOOST_PP_IIF(p##(125), 125, 126) # define BOOST_PP_NODE_127(p) BOOST_PP_IIF(p##(127), 127, 128) # define BOOST_PP_NODE_192(p) BOOST_PP_IIF(p##(192), BOOST_PP_NODE_160, BOOST_PP_NODE_224) # define BOOST_PP_NODE_160(p) BOOST_PP_IIF(p##(160), BOOST_PP_NODE_144, BOOST_PP_NODE_176) # define BOOST_PP_NODE_144(p) BOOST_PP_IIF(p##(144), BOOST_PP_NODE_136, BOOST_PP_NODE_152) # define BOOST_PP_NODE_136(p) BOOST_PP_IIF(p##(136), BOOST_PP_NODE_132, BOOST_PP_NODE_140) # define BOOST_PP_NODE_132(p) BOOST_PP_IIF(p##(132), BOOST_PP_NODE_130, BOOST_PP_NODE_134) # define BOOST_PP_NODE_130(p) BOOST_PP_IIF(p##(130), BOOST_PP_NODE_129, BOOST_PP_NODE_131) # define BOOST_PP_NODE_129(p) BOOST_PP_IIF(p##(129), 129, 130) # define BOOST_PP_NODE_131(p) BOOST_PP_IIF(p##(131), 131, 132) # define BOOST_PP_NODE_134(p) BOOST_PP_IIF(p##(134), BOOST_PP_NODE_133, BOOST_PP_NODE_135) # define BOOST_PP_NODE_133(p) BOOST_PP_IIF(p##(133), 133, 134) # define BOOST_PP_NODE_135(p) BOOST_PP_IIF(p##(135), 135, 136) # define BOOST_PP_NODE_140(p) BOOST_PP_IIF(p##(140), BOOST_PP_NODE_138, BOOST_PP_NODE_142) # define BOOST_PP_NODE_138(p) BOOST_PP_IIF(p##(138), BOOST_PP_NODE_137, BOOST_PP_NODE_139) # define BOOST_PP_NODE_137(p) BOOST_PP_IIF(p##(137), 137, 138) # define BOOST_PP_NODE_139(p) BOOST_PP_IIF(p##(139), 139, 140) # define BOOST_PP_NODE_142(p) BOOST_PP_IIF(p##(142), BOOST_PP_NODE_141, BOOST_PP_NODE_143) # define BOOST_PP_NODE_141(p) BOOST_PP_IIF(p##(141), 141, 142) # define BOOST_PP_NODE_143(p) BOOST_PP_IIF(p##(143), 143, 144) # define BOOST_PP_NODE_152(p) BOOST_PP_IIF(p##(152), BOOST_PP_NODE_148, BOOST_PP_NODE_156) # define BOOST_PP_NODE_148(p) BOOST_PP_IIF(p##(148), BOOST_PP_NODE_146, BOOST_PP_NODE_150) # define BOOST_PP_NODE_146(p) BOOST_PP_IIF(p##(146), BOOST_PP_NODE_145, BOOST_PP_NODE_147) # define BOOST_PP_NODE_145(p) BOOST_PP_IIF(p##(145), 145, 146) # define BOOST_PP_NODE_147(p) BOOST_PP_IIF(p##(147), 147, 148) # define BOOST_PP_NODE_150(p) BOOST_PP_IIF(p##(150), BOOST_PP_NODE_149, BOOST_PP_NODE_151) # define BOOST_PP_NODE_149(p) BOOST_PP_IIF(p##(149), 149, 150) # define BOOST_PP_NODE_151(p) BOOST_PP_IIF(p##(151), 151, 152) # define BOOST_PP_NODE_156(p) BOOST_PP_IIF(p##(156), BOOST_PP_NODE_154, BOOST_PP_NODE_158) # define BOOST_PP_NODE_154(p) BOOST_PP_IIF(p##(154), BOOST_PP_NODE_153, BOOST_PP_NODE_155) # define BOOST_PP_NODE_153(p) BOOST_PP_IIF(p##(153), 153, 154) # define BOOST_PP_NODE_155(p) BOOST_PP_IIF(p##(155), 155, 156) # define BOOST_PP_NODE_158(p) BOOST_PP_IIF(p##(158), BOOST_PP_NODE_157, BOOST_PP_NODE_159) # define BOOST_PP_NODE_157(p) BOOST_PP_IIF(p##(157), 157, 158) # define BOOST_PP_NODE_159(p) BOOST_PP_IIF(p##(159), 159, 160) # define BOOST_PP_NODE_176(p) BOOST_PP_IIF(p##(176), BOOST_PP_NODE_168, BOOST_PP_NODE_184) # define BOOST_PP_NODE_168(p) BOOST_PP_IIF(p##(168), BOOST_PP_NODE_164, BOOST_PP_NODE_172) # define BOOST_PP_NODE_164(p) BOOST_PP_IIF(p##(164), BOOST_PP_NODE_162, BOOST_PP_NODE_166) # define BOOST_PP_NODE_162(p) BOOST_PP_IIF(p##(162), BOOST_PP_NODE_161, BOOST_PP_NODE_163) # define BOOST_PP_NODE_161(p) BOOST_PP_IIF(p##(161), 161, 162) # define BOOST_PP_NODE_163(p) BOOST_PP_IIF(p##(163), 163, 164) # define BOOST_PP_NODE_166(p) BOOST_PP_IIF(p##(166), BOOST_PP_NODE_165, BOOST_PP_NODE_167) # define BOOST_PP_NODE_165(p) BOOST_PP_IIF(p##(165), 165, 166) # define BOOST_PP_NODE_167(p) BOOST_PP_IIF(p##(167), 167, 168) # define BOOST_PP_NODE_172(p) BOOST_PP_IIF(p##(172), BOOST_PP_NODE_170, BOOST_PP_NODE_174) # define BOOST_PP_NODE_170(p) BOOST_PP_IIF(p##(170), BOOST_PP_NODE_169, BOOST_PP_NODE_171) # define BOOST_PP_NODE_169(p) BOOST_PP_IIF(p##(169), 169, 170) # define BOOST_PP_NODE_171(p) BOOST_PP_IIF(p##(171), 171, 172) # define BOOST_PP_NODE_174(p) BOOST_PP_IIF(p##(174), BOOST_PP_NODE_173, BOOST_PP_NODE_175) # define BOOST_PP_NODE_173(p) BOOST_PP_IIF(p##(173), 173, 174) # define BOOST_PP_NODE_175(p) BOOST_PP_IIF(p##(175), 175, 176) # define BOOST_PP_NODE_184(p) BOOST_PP_IIF(p##(184), BOOST_PP_NODE_180, BOOST_PP_NODE_188) # define BOOST_PP_NODE_180(p) BOOST_PP_IIF(p##(180), BOOST_PP_NODE_178, BOOST_PP_NODE_182) # define BOOST_PP_NODE_178(p) BOOST_PP_IIF(p##(178), BOOST_PP_NODE_177, BOOST_PP_NODE_179) # define BOOST_PP_NODE_177(p) BOOST_PP_IIF(p##(177), 177, 178) # define BOOST_PP_NODE_179(p) BOOST_PP_IIF(p##(179), 179, 180) # define BOOST_PP_NODE_182(p) BOOST_PP_IIF(p##(182), BOOST_PP_NODE_181, BOOST_PP_NODE_183) # define BOOST_PP_NODE_181(p) BOOST_PP_IIF(p##(181), 181, 182) # define BOOST_PP_NODE_183(p) BOOST_PP_IIF(p##(183), 183, 184) # define BOOST_PP_NODE_188(p) BOOST_PP_IIF(p##(188), BOOST_PP_NODE_186, BOOST_PP_NODE_190) # define BOOST_PP_NODE_186(p) BOOST_PP_IIF(p##(186), BOOST_PP_NODE_185, BOOST_PP_NODE_187) # define BOOST_PP_NODE_185(p) BOOST_PP_IIF(p##(185), 185, 186) # define BOOST_PP_NODE_187(p) BOOST_PP_IIF(p##(187), 187, 188) # define BOOST_PP_NODE_190(p) BOOST_PP_IIF(p##(190), BOOST_PP_NODE_189, BOOST_PP_NODE_191) # define BOOST_PP_NODE_189(p) BOOST_PP_IIF(p##(189), 189, 190) # define BOOST_PP_NODE_191(p) BOOST_PP_IIF(p##(191), 191, 192) # define BOOST_PP_NODE_224(p) BOOST_PP_IIF(p##(224), BOOST_PP_NODE_208, BOOST_PP_NODE_240) # define BOOST_PP_NODE_208(p) BOOST_PP_IIF(p##(208), BOOST_PP_NODE_200, BOOST_PP_NODE_216) # define BOOST_PP_NODE_200(p) BOOST_PP_IIF(p##(200), BOOST_PP_NODE_196, BOOST_PP_NODE_204) # define BOOST_PP_NODE_196(p) BOOST_PP_IIF(p##(196), BOOST_PP_NODE_194, BOOST_PP_NODE_198) # define BOOST_PP_NODE_194(p) BOOST_PP_IIF(p##(194), BOOST_PP_NODE_193, BOOST_PP_NODE_195) # define BOOST_PP_NODE_193(p) BOOST_PP_IIF(p##(193), 193, 194) # define BOOST_PP_NODE_195(p) BOOST_PP_IIF(p##(195), 195, 196) # define BOOST_PP_NODE_198(p) BOOST_PP_IIF(p##(198), BOOST_PP_NODE_197, BOOST_PP_NODE_199) # define BOOST_PP_NODE_197(p) BOOST_PP_IIF(p##(197), 197, 198) # define BOOST_PP_NODE_199(p) BOOST_PP_IIF(p##(199), 199, 200) # define BOOST_PP_NODE_204(p) BOOST_PP_IIF(p##(204), BOOST_PP_NODE_202, BOOST_PP_NODE_206) # define BOOST_PP_NODE_202(p) BOOST_PP_IIF(p##(202), BOOST_PP_NODE_201, BOOST_PP_NODE_203) # define BOOST_PP_NODE_201(p) BOOST_PP_IIF(p##(201), 201, 202) # define BOOST_PP_NODE_203(p) BOOST_PP_IIF(p##(203), 203, 204) # define BOOST_PP_NODE_206(p) BOOST_PP_IIF(p##(206), BOOST_PP_NODE_205, BOOST_PP_NODE_207) # define BOOST_PP_NODE_205(p) BOOST_PP_IIF(p##(205), 205, 206) # define BOOST_PP_NODE_207(p) BOOST_PP_IIF(p##(207), 207, 208) # define BOOST_PP_NODE_216(p) BOOST_PP_IIF(p##(216), BOOST_PP_NODE_212, BOOST_PP_NODE_220) # define BOOST_PP_NODE_212(p) BOOST_PP_IIF(p##(212), BOOST_PP_NODE_210, BOOST_PP_NODE_214) # define BOOST_PP_NODE_210(p) BOOST_PP_IIF(p##(210), BOOST_PP_NODE_209, BOOST_PP_NODE_211) # define BOOST_PP_NODE_209(p) BOOST_PP_IIF(p##(209), 209, 210) # define BOOST_PP_NODE_211(p) BOOST_PP_IIF(p##(211), 211, 212) # define BOOST_PP_NODE_214(p) BOOST_PP_IIF(p##(214), BOOST_PP_NODE_213, BOOST_PP_NODE_215) # define BOOST_PP_NODE_213(p) BOOST_PP_IIF(p##(213), 213, 214) # define BOOST_PP_NODE_215(p) BOOST_PP_IIF(p##(215), 215, 216) # define BOOST_PP_NODE_220(p) BOOST_PP_IIF(p##(220), BOOST_PP_NODE_218, BOOST_PP_NODE_222) # define BOOST_PP_NODE_218(p) BOOST_PP_IIF(p##(218), BOOST_PP_NODE_217, BOOST_PP_NODE_219) # define BOOST_PP_NODE_217(p) BOOST_PP_IIF(p##(217), 217, 218) # define BOOST_PP_NODE_219(p) BOOST_PP_IIF(p##(219), 219, 220) # define BOOST_PP_NODE_222(p) BOOST_PP_IIF(p##(222), BOOST_PP_NODE_221, BOOST_PP_NODE_223) # define BOOST_PP_NODE_221(p) BOOST_PP_IIF(p##(221), 221, 222) # define BOOST_PP_NODE_223(p) BOOST_PP_IIF(p##(223), 223, 224) # define BOOST_PP_NODE_240(p) BOOST_PP_IIF(p##(240), BOOST_PP_NODE_232, BOOST_PP_NODE_248) # define BOOST_PP_NODE_232(p) BOOST_PP_IIF(p##(232), BOOST_PP_NODE_228, BOOST_PP_NODE_236) # define BOOST_PP_NODE_228(p) BOOST_PP_IIF(p##(228), BOOST_PP_NODE_226, BOOST_PP_NODE_230) # define BOOST_PP_NODE_226(p) BOOST_PP_IIF(p##(226), BOOST_PP_NODE_225, BOOST_PP_NODE_227) # define BOOST_PP_NODE_225(p) BOOST_PP_IIF(p##(225), 225, 226) # define BOOST_PP_NODE_227(p) BOOST_PP_IIF(p##(227), 227, 228) # define BOOST_PP_NODE_230(p) BOOST_PP_IIF(p##(230), BOOST_PP_NODE_229, BOOST_PP_NODE_231) # define BOOST_PP_NODE_229(p) BOOST_PP_IIF(p##(229), 229, 230) # define BOOST_PP_NODE_231(p) BOOST_PP_IIF(p##(231), 231, 232) # define BOOST_PP_NODE_236(p) BOOST_PP_IIF(p##(236), BOOST_PP_NODE_234, BOOST_PP_NODE_238) # define BOOST_PP_NODE_234(p) BOOST_PP_IIF(p##(234), BOOST_PP_NODE_233, BOOST_PP_NODE_235) # define BOOST_PP_NODE_233(p) BOOST_PP_IIF(p##(233), 233, 234) # define BOOST_PP_NODE_235(p) BOOST_PP_IIF(p##(235), 235, 236) # define BOOST_PP_NODE_238(p) BOOST_PP_IIF(p##(238), BOOST_PP_NODE_237, BOOST_PP_NODE_239) # define BOOST_PP_NODE_237(p) BOOST_PP_IIF(p##(237), 237, 238) # define BOOST_PP_NODE_239(p) BOOST_PP_IIF(p##(239), 239, 240) # define BOOST_PP_NODE_248(p) BOOST_PP_IIF(p##(248), BOOST_PP_NODE_244, BOOST_PP_NODE_252) # define BOOST_PP_NODE_244(p) BOOST_PP_IIF(p##(244), BOOST_PP_NODE_242, BOOST_PP_NODE_246) # define BOOST_PP_NODE_242(p) BOOST_PP_IIF(p##(242), BOOST_PP_NODE_241, BOOST_PP_NODE_243) # define BOOST_PP_NODE_241(p) BOOST_PP_IIF(p##(241), 241, 242) # define BOOST_PP_NODE_243(p) BOOST_PP_IIF(p##(243), 243, 244) # define BOOST_PP_NODE_246(p) BOOST_PP_IIF(p##(246), BOOST_PP_NODE_245, BOOST_PP_NODE_247) # define BOOST_PP_NODE_245(p) BOOST_PP_IIF(p##(245), 245, 246) # define BOOST_PP_NODE_247(p) BOOST_PP_IIF(p##(247), 247, 248) # define BOOST_PP_NODE_252(p) BOOST_PP_IIF(p##(252), BOOST_PP_NODE_250, BOOST_PP_NODE_254) # define BOOST_PP_NODE_250(p) BOOST_PP_IIF(p##(250), BOOST_PP_NODE_249, BOOST_PP_NODE_251) # define BOOST_PP_NODE_249(p) BOOST_PP_IIF(p##(249), 249, 250) # define BOOST_PP_NODE_251(p) BOOST_PP_IIF(p##(251), 251, 252) # define BOOST_PP_NODE_254(p) BOOST_PP_IIF(p##(254), BOOST_PP_NODE_253, BOOST_PP_NODE_255) # define BOOST_PP_NODE_253(p) BOOST_PP_IIF(p##(253), 253, 254) # define BOOST_PP_NODE_255(p) BOOST_PP_IIF(p##(255), 255, 256) # # endif ================================================ FILE: benchmarks/boost/preprocessor/detail/is_binary.hpp ================================================ # /* ************************************************************************** # * * # * (C) Copyright Paul Mensonides 2002. # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # * * # ************************************************************************** */ # # /* See http://www.boost.org for most recent version. */ # # ifndef BOOST_PREPROCESSOR_DETAIL_IS_BINARY_HPP # define BOOST_PREPROCESSOR_DETAIL_IS_BINARY_HPP # # include # include # # /* BOOST_PP_IS_BINARY */ # # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() # define BOOST_PP_IS_BINARY(x) BOOST_PP_CHECK(x, BOOST_PP_IS_BINARY_CHECK) # else # define BOOST_PP_IS_BINARY(x) BOOST_PP_IS_BINARY_I(x) # define BOOST_PP_IS_BINARY_I(x) BOOST_PP_CHECK(x, BOOST_PP_IS_BINARY_CHECK) # endif # # define BOOST_PP_IS_BINARY_CHECK(a, b) 1 # define BOOST_PP_CHECK_RESULT_BOOST_PP_IS_BINARY_CHECK 0, BOOST_PP_NIL # # endif ================================================ FILE: benchmarks/boost/preprocessor/detail/is_nullary.hpp ================================================ # /* ************************************************************************** # * * # * (C) Copyright Paul Mensonides 2002. # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # * * # ************************************************************************** */ # # /* See http://www.boost.org for most recent version. */ # # ifndef BOOST_PREPROCESSOR_DETAIL_IS_NULLARY_HPP # define BOOST_PREPROCESSOR_DETAIL_IS_NULLARY_HPP # # include # include # # /* BOOST_PP_IS_NULLARY */ # # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() # define BOOST_PP_IS_NULLARY(x) BOOST_PP_CHECK(x, BOOST_PP_IS_NULLARY_CHECK) # else # define BOOST_PP_IS_NULLARY(x) BOOST_PP_IS_NULLARY_I(x) # define BOOST_PP_IS_NULLARY_I(x) BOOST_PP_CHECK(x, BOOST_PP_IS_NULLARY_CHECK) # endif # # define BOOST_PP_IS_NULLARY_CHECK() 1 # define BOOST_PP_CHECK_RESULT_BOOST_PP_IS_NULLARY_CHECK 0, BOOST_PP_NIL # # endif ================================================ FILE: benchmarks/boost/preprocessor/detail/split.hpp ================================================ # /* ************************************************************************** # * * # * (C) Copyright Paul Mensonides 2002. # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # * * # ************************************************************************** */ # # ifndef BOOST_PREPROCESSOR_DETAIL_SPLIT_HPP # define BOOST_PREPROCESSOR_DETAIL_SPLIT_HPP # # include # # /* BOOST_PP_SPLIT */ # # if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC() # define BOOST_PP_SPLIT(n, im) BOOST_PP_SPLIT_I((n, im)) # define BOOST_PP_SPLIT_I(par) BOOST_PP_SPLIT_II ## par # define BOOST_PP_SPLIT_II(n, a, b) BOOST_PP_SPLIT_ ## n(a, b) # elif BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MSVC() # define BOOST_PP_SPLIT(n, im) BOOST_PP_SPLIT_I(n((im))) # define BOOST_PP_SPLIT_I(n) BOOST_PP_SPLIT_ID(BOOST_PP_SPLIT_II_ ## n) # define BOOST_PP_SPLIT_II_0(s) BOOST_PP_SPLIT_ID(BOOST_PP_SPLIT_0 s) # define BOOST_PP_SPLIT_II_1(s) BOOST_PP_SPLIT_ID(BOOST_PP_SPLIT_1 s) # define BOOST_PP_SPLIT_ID(id) id # else # define BOOST_PP_SPLIT(n, im) BOOST_PP_SPLIT_I(n)(im) # define BOOST_PP_SPLIT_I(n) BOOST_PP_SPLIT_ ## n # endif # # define BOOST_PP_SPLIT_0(a, b) a # define BOOST_PP_SPLIT_1(a, b) b # # endif ================================================ FILE: benchmarks/boost/preprocessor/empty.hpp ================================================ # /* ************************************************************************** # * * # * (C) Copyright Paul Mensonides 2002. # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # * * # ************************************************************************** */ # # /* See http://www.boost.org for most recent version. */ # # ifndef BOOST_PREPROCESSOR_EMPTY_HPP # define BOOST_PREPROCESSOR_EMPTY_HPP # # include # # endif ================================================ FILE: benchmarks/boost/preprocessor/enum.hpp ================================================ # /* ************************************************************************** # * * # * (C) Copyright Paul Mensonides 2002. # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # * * # ************************************************************************** */ # # /* See http://www.boost.org for most recent version. */ # # ifndef BOOST_PREPROCESSOR_ENUM_HPP # define BOOST_PREPROCESSOR_ENUM_HPP # # include # # endif ================================================ FILE: benchmarks/boost/preprocessor/enum_params.hpp ================================================ # /* ************************************************************************** # * * # * (C) Copyright Paul Mensonides 2002. # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # * * # ************************************************************************** */ # # /* See http://www.boost.org for most recent version. */ # # ifndef BOOST_PREPROCESSOR_ENUM_PARAMS_HPP # define BOOST_PREPROCESSOR_ENUM_PARAMS_HPP # # include # # endif ================================================ FILE: benchmarks/boost/preprocessor/enum_params_with_a_default.hpp ================================================ # /* ************************************************************************** # * * # * (C) Copyright Paul Mensonides 2002. # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # * * # ************************************************************************** */ # # /* See http://www.boost.org for most recent version. */ # # ifndef BOOST_PREPROCESSOR_ENUM_PARAMS_WITH_A_DEFAULT_HPP # define BOOST_PREPROCESSOR_ENUM_PARAMS_WITH_A_DEFAULT_HPP # # include # # endif ================================================ FILE: benchmarks/boost/preprocessor/enum_shifted_params.hpp ================================================ # /* ************************************************************************** # * * # * (C) Copyright Paul Mensonides 2002. # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # * * # ************************************************************************** */ # # /* See http://www.boost.org for most recent version. */ # # ifndef BOOST_PREPROCESSOR_ENUM_SHIFTED_PARAMS_HPP # define BOOST_PREPROCESSOR_ENUM_SHIFTED_PARAMS_HPP # # include # # endif ================================================ FILE: benchmarks/boost/preprocessor/expr_if.hpp ================================================ # /* ************************************************************************** # * * # * (C) Copyright Paul Mensonides 2002. # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # * * # ************************************************************************** */ # # /* See http://www.boost.org for most recent version. */ # # ifndef BOOST_PREPROCESSOR_EXPR_IF_HPP # define BOOST_PREPROCESSOR_EXPR_IF_HPP # # include # # endif ================================================ FILE: benchmarks/boost/preprocessor/facilities/detail/is_empty.hpp ================================================ # /* ************************************************************************** # * * # * (C) Copyright Edward Diener 2014. # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # * * # ************************************************************************** */ # # /* See http://www.boost.org for most recent version. */ # #ifndef BOOST_PREPROCESSOR_DETAIL_IS_EMPTY_HPP #define BOOST_PREPROCESSOR_DETAIL_IS_EMPTY_HPP #include #if BOOST_PP_VARIADICS_MSVC # pragma warning(once:4002) #define BOOST_PP_DETAIL_IS_EMPTY_IIF_0(t, b) b #define BOOST_PP_DETAIL_IS_EMPTY_IIF_1(t, b) t #else #define BOOST_PP_DETAIL_IS_EMPTY_IIF_0(t, ...) __VA_ARGS__ #define BOOST_PP_DETAIL_IS_EMPTY_IIF_1(t, ...) t #endif #if BOOST_PP_VARIADICS_MSVC && _MSC_VER <= 1400 #define BOOST_PP_DETAIL_IS_EMPTY_PROCESS(param) \ BOOST_PP_IS_BEGIN_PARENS \ ( \ BOOST_PP_DETAIL_IS_EMPTY_NON_FUNCTION_C param () \ ) \ /**/ #else #define BOOST_PP_DETAIL_IS_EMPTY_PROCESS(...) \ BOOST_PP_IS_BEGIN_PARENS \ ( \ BOOST_PP_DETAIL_IS_EMPTY_NON_FUNCTION_C __VA_ARGS__ () \ ) \ /**/ #endif #define BOOST_PP_DETAIL_IS_EMPTY_PRIMITIVE_CAT(a, b) a ## b #define BOOST_PP_DETAIL_IS_EMPTY_IIF(bit) BOOST_PP_DETAIL_IS_EMPTY_PRIMITIVE_CAT(BOOST_PP_DETAIL_IS_EMPTY_IIF_,bit) #define BOOST_PP_DETAIL_IS_EMPTY_NON_FUNCTION_C(...) () #endif /* BOOST_PREPROCESSOR_DETAIL_IS_EMPTY_HPP */ ================================================ FILE: benchmarks/boost/preprocessor/facilities/empty.hpp ================================================ # /* Copyright (C) 2001 # * Housemarque Oy # * http://www.housemarque.com # * # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # */ # # /* Revised by Paul Mensonides (2002) */ # # /* See http://www.boost.org for most recent version. */ # # ifndef BOOST_PREPROCESSOR_FACILITIES_EMPTY_HPP # define BOOST_PREPROCESSOR_FACILITIES_EMPTY_HPP # # include # # /* BOOST_PP_EMPTY */ # # define BOOST_PP_EMPTY() # # endif ================================================ FILE: benchmarks/boost/preprocessor/facilities/expand.hpp ================================================ # /* Copyright (C) 2001 # * Housemarque Oy # * http://www.housemarque.com # * # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # */ # # /* Revised by Paul Mensonides (2002) */ # # /* See http://www.boost.org for most recent version. */ # # ifndef BOOST_PREPROCESSOR_FACILITIES_EXPAND_HPP # define BOOST_PREPROCESSOR_FACILITIES_EXPAND_HPP # # include # # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC() && ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_DMC() # define BOOST_PP_EXPAND(x) BOOST_PP_EXPAND_I(x) # else # define BOOST_PP_EXPAND(x) BOOST_PP_EXPAND_OO((x)) # define BOOST_PP_EXPAND_OO(par) BOOST_PP_EXPAND_I ## par # endif # # define BOOST_PP_EXPAND_I(x) x # # endif ================================================ FILE: benchmarks/boost/preprocessor/facilities/identity.hpp ================================================ # /* Copyright (C) 2001 # * Housemarque Oy # * http://www.housemarque.com # * # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # */ # # /* Revised by Paul Mensonides (2002) */ # /* Revised by Edward Diener (2015) */ # # /* See http://www.boost.org for most recent version. */ # # ifndef BOOST_PREPROCESSOR_FACILITIES_IDENTITY_HPP # define BOOST_PREPROCESSOR_FACILITIES_IDENTITY_HPP # # include # include # # /* BOOST_PP_IDENTITY */ # # define BOOST_PP_IDENTITY(item) item BOOST_PP_EMPTY # # define BOOST_PP_IDENTITY_N(item,n) item BOOST_PP_TUPLE_EAT_N(n) # # endif ================================================ FILE: benchmarks/boost/preprocessor/facilities/intercept.hpp ================================================ # /* ************************************************************************** # * * # * (C) Copyright Paul Mensonides 2002. # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # * * # ************************************************************************** */ # # /* See http://www.boost.org for most recent version. */ # # ifndef BOOST_PREPROCESSOR_FACILITIES_INTERCEPT_HPP # define BOOST_PREPROCESSOR_FACILITIES_INTERCEPT_HPP # # /* BOOST_PP_INTERCEPT */ # # define BOOST_PP_INTERCEPT BOOST_PP_INTERCEPT_ # # define BOOST_PP_INTERCEPT_0 # define BOOST_PP_INTERCEPT_1 # define BOOST_PP_INTERCEPT_2 # define BOOST_PP_INTERCEPT_3 # define BOOST_PP_INTERCEPT_4 # define BOOST_PP_INTERCEPT_5 # define BOOST_PP_INTERCEPT_6 # define BOOST_PP_INTERCEPT_7 # define BOOST_PP_INTERCEPT_8 # define BOOST_PP_INTERCEPT_9 # define BOOST_PP_INTERCEPT_10 # define BOOST_PP_INTERCEPT_11 # define BOOST_PP_INTERCEPT_12 # define BOOST_PP_INTERCEPT_13 # define BOOST_PP_INTERCEPT_14 # define BOOST_PP_INTERCEPT_15 # define BOOST_PP_INTERCEPT_16 # define BOOST_PP_INTERCEPT_17 # define BOOST_PP_INTERCEPT_18 # define BOOST_PP_INTERCEPT_19 # define BOOST_PP_INTERCEPT_20 # define BOOST_PP_INTERCEPT_21 # define BOOST_PP_INTERCEPT_22 # define BOOST_PP_INTERCEPT_23 # define BOOST_PP_INTERCEPT_24 # define BOOST_PP_INTERCEPT_25 # define BOOST_PP_INTERCEPT_26 # define BOOST_PP_INTERCEPT_27 # define BOOST_PP_INTERCEPT_28 # define BOOST_PP_INTERCEPT_29 # define BOOST_PP_INTERCEPT_30 # define BOOST_PP_INTERCEPT_31 # define BOOST_PP_INTERCEPT_32 # define BOOST_PP_INTERCEPT_33 # define BOOST_PP_INTERCEPT_34 # define BOOST_PP_INTERCEPT_35 # define BOOST_PP_INTERCEPT_36 # define BOOST_PP_INTERCEPT_37 # define BOOST_PP_INTERCEPT_38 # define BOOST_PP_INTERCEPT_39 # define BOOST_PP_INTERCEPT_40 # define BOOST_PP_INTERCEPT_41 # define BOOST_PP_INTERCEPT_42 # define BOOST_PP_INTERCEPT_43 # define BOOST_PP_INTERCEPT_44 # define BOOST_PP_INTERCEPT_45 # define BOOST_PP_INTERCEPT_46 # define BOOST_PP_INTERCEPT_47 # define BOOST_PP_INTERCEPT_48 # define BOOST_PP_INTERCEPT_49 # define BOOST_PP_INTERCEPT_50 # define BOOST_PP_INTERCEPT_51 # define BOOST_PP_INTERCEPT_52 # define BOOST_PP_INTERCEPT_53 # define BOOST_PP_INTERCEPT_54 # define BOOST_PP_INTERCEPT_55 # define BOOST_PP_INTERCEPT_56 # define BOOST_PP_INTERCEPT_57 # define BOOST_PP_INTERCEPT_58 # define BOOST_PP_INTERCEPT_59 # define BOOST_PP_INTERCEPT_60 # define BOOST_PP_INTERCEPT_61 # define BOOST_PP_INTERCEPT_62 # define BOOST_PP_INTERCEPT_63 # define BOOST_PP_INTERCEPT_64 # define BOOST_PP_INTERCEPT_65 # define BOOST_PP_INTERCEPT_66 # define BOOST_PP_INTERCEPT_67 # define BOOST_PP_INTERCEPT_68 # define BOOST_PP_INTERCEPT_69 # define BOOST_PP_INTERCEPT_70 # define BOOST_PP_INTERCEPT_71 # define BOOST_PP_INTERCEPT_72 # define BOOST_PP_INTERCEPT_73 # define BOOST_PP_INTERCEPT_74 # define BOOST_PP_INTERCEPT_75 # define BOOST_PP_INTERCEPT_76 # define BOOST_PP_INTERCEPT_77 # define BOOST_PP_INTERCEPT_78 # define BOOST_PP_INTERCEPT_79 # define BOOST_PP_INTERCEPT_80 # define BOOST_PP_INTERCEPT_81 # define BOOST_PP_INTERCEPT_82 # define BOOST_PP_INTERCEPT_83 # define BOOST_PP_INTERCEPT_84 # define BOOST_PP_INTERCEPT_85 # define BOOST_PP_INTERCEPT_86 # define BOOST_PP_INTERCEPT_87 # define BOOST_PP_INTERCEPT_88 # define BOOST_PP_INTERCEPT_89 # define BOOST_PP_INTERCEPT_90 # define BOOST_PP_INTERCEPT_91 # define BOOST_PP_INTERCEPT_92 # define BOOST_PP_INTERCEPT_93 # define BOOST_PP_INTERCEPT_94 # define BOOST_PP_INTERCEPT_95 # define BOOST_PP_INTERCEPT_96 # define BOOST_PP_INTERCEPT_97 # define BOOST_PP_INTERCEPT_98 # define BOOST_PP_INTERCEPT_99 # define BOOST_PP_INTERCEPT_100 # define BOOST_PP_INTERCEPT_101 # define BOOST_PP_INTERCEPT_102 # define BOOST_PP_INTERCEPT_103 # define BOOST_PP_INTERCEPT_104 # define BOOST_PP_INTERCEPT_105 # define BOOST_PP_INTERCEPT_106 # define BOOST_PP_INTERCEPT_107 # define BOOST_PP_INTERCEPT_108 # define BOOST_PP_INTERCEPT_109 # define BOOST_PP_INTERCEPT_110 # define BOOST_PP_INTERCEPT_111 # define BOOST_PP_INTERCEPT_112 # define BOOST_PP_INTERCEPT_113 # define BOOST_PP_INTERCEPT_114 # define BOOST_PP_INTERCEPT_115 # define BOOST_PP_INTERCEPT_116 # define BOOST_PP_INTERCEPT_117 # define BOOST_PP_INTERCEPT_118 # define BOOST_PP_INTERCEPT_119 # define BOOST_PP_INTERCEPT_120 # define BOOST_PP_INTERCEPT_121 # define BOOST_PP_INTERCEPT_122 # define BOOST_PP_INTERCEPT_123 # define BOOST_PP_INTERCEPT_124 # define BOOST_PP_INTERCEPT_125 # define BOOST_PP_INTERCEPT_126 # define BOOST_PP_INTERCEPT_127 # define BOOST_PP_INTERCEPT_128 # define BOOST_PP_INTERCEPT_129 # define BOOST_PP_INTERCEPT_130 # define BOOST_PP_INTERCEPT_131 # define BOOST_PP_INTERCEPT_132 # define BOOST_PP_INTERCEPT_133 # define BOOST_PP_INTERCEPT_134 # define BOOST_PP_INTERCEPT_135 # define BOOST_PP_INTERCEPT_136 # define BOOST_PP_INTERCEPT_137 # define BOOST_PP_INTERCEPT_138 # define BOOST_PP_INTERCEPT_139 # define BOOST_PP_INTERCEPT_140 # define BOOST_PP_INTERCEPT_141 # define BOOST_PP_INTERCEPT_142 # define BOOST_PP_INTERCEPT_143 # define BOOST_PP_INTERCEPT_144 # define BOOST_PP_INTERCEPT_145 # define BOOST_PP_INTERCEPT_146 # define BOOST_PP_INTERCEPT_147 # define BOOST_PP_INTERCEPT_148 # define BOOST_PP_INTERCEPT_149 # define BOOST_PP_INTERCEPT_150 # define BOOST_PP_INTERCEPT_151 # define BOOST_PP_INTERCEPT_152 # define BOOST_PP_INTERCEPT_153 # define BOOST_PP_INTERCEPT_154 # define BOOST_PP_INTERCEPT_155 # define BOOST_PP_INTERCEPT_156 # define BOOST_PP_INTERCEPT_157 # define BOOST_PP_INTERCEPT_158 # define BOOST_PP_INTERCEPT_159 # define BOOST_PP_INTERCEPT_160 # define BOOST_PP_INTERCEPT_161 # define BOOST_PP_INTERCEPT_162 # define BOOST_PP_INTERCEPT_163 # define BOOST_PP_INTERCEPT_164 # define BOOST_PP_INTERCEPT_165 # define BOOST_PP_INTERCEPT_166 # define BOOST_PP_INTERCEPT_167 # define BOOST_PP_INTERCEPT_168 # define BOOST_PP_INTERCEPT_169 # define BOOST_PP_INTERCEPT_170 # define BOOST_PP_INTERCEPT_171 # define BOOST_PP_INTERCEPT_172 # define BOOST_PP_INTERCEPT_173 # define BOOST_PP_INTERCEPT_174 # define BOOST_PP_INTERCEPT_175 # define BOOST_PP_INTERCEPT_176 # define BOOST_PP_INTERCEPT_177 # define BOOST_PP_INTERCEPT_178 # define BOOST_PP_INTERCEPT_179 # define BOOST_PP_INTERCEPT_180 # define BOOST_PP_INTERCEPT_181 # define BOOST_PP_INTERCEPT_182 # define BOOST_PP_INTERCEPT_183 # define BOOST_PP_INTERCEPT_184 # define BOOST_PP_INTERCEPT_185 # define BOOST_PP_INTERCEPT_186 # define BOOST_PP_INTERCEPT_187 # define BOOST_PP_INTERCEPT_188 # define BOOST_PP_INTERCEPT_189 # define BOOST_PP_INTERCEPT_190 # define BOOST_PP_INTERCEPT_191 # define BOOST_PP_INTERCEPT_192 # define BOOST_PP_INTERCEPT_193 # define BOOST_PP_INTERCEPT_194 # define BOOST_PP_INTERCEPT_195 # define BOOST_PP_INTERCEPT_196 # define BOOST_PP_INTERCEPT_197 # define BOOST_PP_INTERCEPT_198 # define BOOST_PP_INTERCEPT_199 # define BOOST_PP_INTERCEPT_200 # define BOOST_PP_INTERCEPT_201 # define BOOST_PP_INTERCEPT_202 # define BOOST_PP_INTERCEPT_203 # define BOOST_PP_INTERCEPT_204 # define BOOST_PP_INTERCEPT_205 # define BOOST_PP_INTERCEPT_206 # define BOOST_PP_INTERCEPT_207 # define BOOST_PP_INTERCEPT_208 # define BOOST_PP_INTERCEPT_209 # define BOOST_PP_INTERCEPT_210 # define BOOST_PP_INTERCEPT_211 # define BOOST_PP_INTERCEPT_212 # define BOOST_PP_INTERCEPT_213 # define BOOST_PP_INTERCEPT_214 # define BOOST_PP_INTERCEPT_215 # define BOOST_PP_INTERCEPT_216 # define BOOST_PP_INTERCEPT_217 # define BOOST_PP_INTERCEPT_218 # define BOOST_PP_INTERCEPT_219 # define BOOST_PP_INTERCEPT_220 # define BOOST_PP_INTERCEPT_221 # define BOOST_PP_INTERCEPT_222 # define BOOST_PP_INTERCEPT_223 # define BOOST_PP_INTERCEPT_224 # define BOOST_PP_INTERCEPT_225 # define BOOST_PP_INTERCEPT_226 # define BOOST_PP_INTERCEPT_227 # define BOOST_PP_INTERCEPT_228 # define BOOST_PP_INTERCEPT_229 # define BOOST_PP_INTERCEPT_230 # define BOOST_PP_INTERCEPT_231 # define BOOST_PP_INTERCEPT_232 # define BOOST_PP_INTERCEPT_233 # define BOOST_PP_INTERCEPT_234 # define BOOST_PP_INTERCEPT_235 # define BOOST_PP_INTERCEPT_236 # define BOOST_PP_INTERCEPT_237 # define BOOST_PP_INTERCEPT_238 # define BOOST_PP_INTERCEPT_239 # define BOOST_PP_INTERCEPT_240 # define BOOST_PP_INTERCEPT_241 # define BOOST_PP_INTERCEPT_242 # define BOOST_PP_INTERCEPT_243 # define BOOST_PP_INTERCEPT_244 # define BOOST_PP_INTERCEPT_245 # define BOOST_PP_INTERCEPT_246 # define BOOST_PP_INTERCEPT_247 # define BOOST_PP_INTERCEPT_248 # define BOOST_PP_INTERCEPT_249 # define BOOST_PP_INTERCEPT_250 # define BOOST_PP_INTERCEPT_251 # define BOOST_PP_INTERCEPT_252 # define BOOST_PP_INTERCEPT_253 # define BOOST_PP_INTERCEPT_254 # define BOOST_PP_INTERCEPT_255 # define BOOST_PP_INTERCEPT_256 # # endif ================================================ FILE: benchmarks/boost/preprocessor/facilities/is_1.hpp ================================================ # /* ************************************************************************** # * * # * (C) Copyright Paul Mensonides 2003. # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # * * # ************************************************************************** */ # # /* See http://www.boost.org for most recent version. */ # # ifndef BOOST_PREPROCESSOR_FACILITIES_IS_1_HPP # define BOOST_PREPROCESSOR_FACILITIES_IS_1_HPP # # include # include # # /* BOOST_PP_IS_1 */ # # define BOOST_PP_IS_1(x) BOOST_PP_IS_EMPTY(BOOST_PP_CAT(BOOST_PP_IS_1_HELPER_, x)) # define BOOST_PP_IS_1_HELPER_1 # # endif ================================================ FILE: benchmarks/boost/preprocessor/facilities/is_empty.hpp ================================================ # /* ************************************************************************** # * * # * (C) Copyright Paul Mensonides 2003. # * (C) Copyright Edward Diener 2014. # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # * * # ************************************************************************** */ # # /* See http://www.boost.org for most recent version. */ # # ifndef BOOST_PREPROCESSOR_FACILITIES_IS_EMPTY_HPP # define BOOST_PREPROCESSOR_FACILITIES_IS_EMPTY_HPP # # include # # if BOOST_PP_VARIADICS # # include # # else # # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MSVC() && ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC() # include # include # else # include # include # endif # # /* BOOST_PP_IS_EMPTY */ # # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MSVC() && ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC() # define BOOST_PP_IS_EMPTY(x) BOOST_PP_IS_EMPTY_I(x BOOST_PP_IS_EMPTY_HELPER) # define BOOST_PP_IS_EMPTY_I(contents) BOOST_PP_TUPLE_ELEM(2, 1, (BOOST_PP_IS_EMPTY_DEF_ ## contents())) # define BOOST_PP_IS_EMPTY_DEF_BOOST_PP_IS_EMPTY_HELPER 1, BOOST_PP_IDENTITY(1) # define BOOST_PP_IS_EMPTY_HELPER() , 0 # else # if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MSVC() # define BOOST_PP_IS_EMPTY(x) BOOST_PP_IS_EMPTY_I(BOOST_PP_IS_EMPTY_HELPER x ()) # define BOOST_PP_IS_EMPTY_I(test) BOOST_PP_IS_EMPTY_II(BOOST_PP_SPLIT(0, BOOST_PP_CAT(BOOST_PP_IS_EMPTY_DEF_, test))) # define BOOST_PP_IS_EMPTY_II(id) id # else # define BOOST_PP_IS_EMPTY(x) BOOST_PP_IS_EMPTY_I((BOOST_PP_IS_EMPTY_HELPER x ())) # define BOOST_PP_IS_EMPTY_I(par) BOOST_PP_IS_EMPTY_II ## par # define BOOST_PP_IS_EMPTY_II(test) BOOST_PP_SPLIT(0, BOOST_PP_CAT(BOOST_PP_IS_EMPTY_DEF_, test)) # endif # define BOOST_PP_IS_EMPTY_HELPER() 1 # define BOOST_PP_IS_EMPTY_DEF_1 1, BOOST_PP_NIL # define BOOST_PP_IS_EMPTY_DEF_BOOST_PP_IS_EMPTY_HELPER 0, BOOST_PP_NIL # endif # # endif /* BOOST_PP_VARIADICS */ # # endif /* BOOST_PREPROCESSOR_FACILITIES_IS_EMPTY_HPP */ ================================================ FILE: benchmarks/boost/preprocessor/facilities/is_empty_variadic.hpp ================================================ # /* ************************************************************************** # * * # * (C) Copyright Edward Diener 2014. # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # * * # ************************************************************************** */ # # /* See http://www.boost.org for most recent version. */ # # ifndef BOOST_PREPROCESSOR_FACILITIES_IS_EMPTY_VARIADIC_HPP # define BOOST_PREPROCESSOR_FACILITIES_IS_EMPTY_VARIADIC_HPP # # include # # if BOOST_PP_VARIADICS # # include # include # #if BOOST_PP_VARIADICS_MSVC && _MSC_VER <= 1400 # #define BOOST_PP_IS_EMPTY(param) \ BOOST_PP_DETAIL_IS_EMPTY_IIF \ ( \ BOOST_PP_IS_BEGIN_PARENS \ ( \ param \ ) \ ) \ ( \ BOOST_PP_IS_EMPTY_ZERO, \ BOOST_PP_DETAIL_IS_EMPTY_PROCESS \ ) \ (param) \ /**/ #define BOOST_PP_IS_EMPTY_ZERO(param) 0 # else #define BOOST_PP_IS_EMPTY(...) \ BOOST_PP_DETAIL_IS_EMPTY_IIF \ ( \ BOOST_PP_IS_BEGIN_PARENS \ ( \ __VA_ARGS__ \ ) \ ) \ ( \ BOOST_PP_IS_EMPTY_ZERO, \ BOOST_PP_DETAIL_IS_EMPTY_PROCESS \ ) \ (__VA_ARGS__) \ /**/ #define BOOST_PP_IS_EMPTY_ZERO(...) 0 # endif /* BOOST_PP_VARIADICS_MSVC && _MSC_VER <= 1400 */ # endif /* BOOST_PP_VARIADICS */ # endif /* BOOST_PREPROCESSOR_FACILITIES_IS_EMPTY_VARIADIC_HPP */ ================================================ FILE: benchmarks/boost/preprocessor/facilities/overload.hpp ================================================ # /* ************************************************************************** # * * # * (C) Copyright Paul Mensonides 2011. * # * (C) Copyright Edward Diener 2011. * # * Distributed under the Boost Software License, Version 1.0. (See * # * accompanying file LICENSE_1_0.txt or copy at * # * http://www.boost.org/LICENSE_1_0.txt) * # * * # ************************************************************************** */ # # /* See http://www.boost.org for most recent version. */ # # ifndef BOOST_PREPROCESSOR_FACILITIES_OVERLOAD_HPP # define BOOST_PREPROCESSOR_FACILITIES_OVERLOAD_HPP # # include # include # # /* BOOST_PP_OVERLOAD */ # # if BOOST_PP_VARIADICS # define BOOST_PP_OVERLOAD(prefix, ...) BOOST_PP_CAT(prefix, BOOST_PP_VARIADIC_SIZE(__VA_ARGS__)) # endif # # endif ================================================ FILE: benchmarks/boost/preprocessor/for.hpp ================================================ # /* ************************************************************************** # * * # * (C) Copyright Paul Mensonides 2002. # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # * * # ************************************************************************** */ # # /* See http://www.boost.org for most recent version. */ # # ifndef BOOST_PREPROCESSOR_FOR_HPP # define BOOST_PREPROCESSOR_FOR_HPP # # include # # endif ================================================ FILE: benchmarks/boost/preprocessor/identity.hpp ================================================ # /* ************************************************************************** # * * # * (C) Copyright Paul Mensonides 2002. # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # * * # ************************************************************************** */ # # /* See http://www.boost.org for most recent version. */ # # ifndef BOOST_PREPROCESSOR_IDENTITY_HPP # define BOOST_PREPROCESSOR_IDENTITY_HPP # # include # # endif ================================================ FILE: benchmarks/boost/preprocessor/inc.hpp ================================================ # /* ************************************************************************** # * * # * (C) Copyright Paul Mensonides 2002. # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # * * # ************************************************************************** */ # # /* See http://www.boost.org for most recent version. */ # # ifndef BOOST_PREPROCESSOR_INC_HPP # define BOOST_PREPROCESSOR_INC_HPP # # include # # endif ================================================ FILE: benchmarks/boost/preprocessor/iterate.hpp ================================================ # /* ************************************************************************** # * * # * (C) Copyright Paul Mensonides 2002. # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # * * # ************************************************************************** */ # # /* See http://www.boost.org for most recent version. */ # # ifndef BOOST_PREPROCESSOR_ITERATE_HPP # define BOOST_PREPROCESSOR_ITERATE_HPP # # include # # endif ================================================ FILE: benchmarks/boost/preprocessor/iteration/detail/bounds/lower1.hpp ================================================ # /* ************************************************************************** # * * # * (C) Copyright Paul Mensonides 2002. # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # * * # ************************************************************************** */ # # /* See http://www.boost.org for most recent version. */ # # include # # undef BOOST_PP_ITERATION_START_1 # # undef BOOST_PP_ITERATION_START_1_DIGIT_1 # undef BOOST_PP_ITERATION_START_1_DIGIT_2 # undef BOOST_PP_ITERATION_START_1_DIGIT_3 # undef BOOST_PP_ITERATION_START_1_DIGIT_4 # undef BOOST_PP_ITERATION_START_1_DIGIT_5 # undef BOOST_PP_ITERATION_START_1_DIGIT_6 # undef BOOST_PP_ITERATION_START_1_DIGIT_7 # undef BOOST_PP_ITERATION_START_1_DIGIT_8 # undef BOOST_PP_ITERATION_START_1_DIGIT_9 # undef BOOST_PP_ITERATION_START_1_DIGIT_10 # # if BOOST_PP_SLOT_TEMP_3 == 0 # define BOOST_PP_ITERATION_START_1_DIGIT_3 0 # elif BOOST_PP_SLOT_TEMP_3 == 1 # define BOOST_PP_ITERATION_START_1_DIGIT_3 1 # elif BOOST_PP_SLOT_TEMP_3 == 2 # define BOOST_PP_ITERATION_START_1_DIGIT_3 2 # elif BOOST_PP_SLOT_TEMP_3 == 3 # define BOOST_PP_ITERATION_START_1_DIGIT_3 3 # elif BOOST_PP_SLOT_TEMP_3 == 4 # define BOOST_PP_ITERATION_START_1_DIGIT_3 4 # elif BOOST_PP_SLOT_TEMP_3 == 5 # define BOOST_PP_ITERATION_START_1_DIGIT_3 5 # elif BOOST_PP_SLOT_TEMP_3 == 6 # define BOOST_PP_ITERATION_START_1_DIGIT_3 6 # elif BOOST_PP_SLOT_TEMP_3 == 7 # define BOOST_PP_ITERATION_START_1_DIGIT_3 7 # elif BOOST_PP_SLOT_TEMP_3 == 8 # define BOOST_PP_ITERATION_START_1_DIGIT_3 8 # elif BOOST_PP_SLOT_TEMP_3 == 9 # define BOOST_PP_ITERATION_START_1_DIGIT_3 9 # endif # # if BOOST_PP_SLOT_TEMP_2 == 0 # define BOOST_PP_ITERATION_START_1_DIGIT_2 0 # elif BOOST_PP_SLOT_TEMP_2 == 1 # define BOOST_PP_ITERATION_START_1_DIGIT_2 1 # elif BOOST_PP_SLOT_TEMP_2 == 2 # define BOOST_PP_ITERATION_START_1_DIGIT_2 2 # elif BOOST_PP_SLOT_TEMP_2 == 3 # define BOOST_PP_ITERATION_START_1_DIGIT_2 3 # elif BOOST_PP_SLOT_TEMP_2 == 4 # define BOOST_PP_ITERATION_START_1_DIGIT_2 4 # elif BOOST_PP_SLOT_TEMP_2 == 5 # define BOOST_PP_ITERATION_START_1_DIGIT_2 5 # elif BOOST_PP_SLOT_TEMP_2 == 6 # define BOOST_PP_ITERATION_START_1_DIGIT_2 6 # elif BOOST_PP_SLOT_TEMP_2 == 7 # define BOOST_PP_ITERATION_START_1_DIGIT_2 7 # elif BOOST_PP_SLOT_TEMP_2 == 8 # define BOOST_PP_ITERATION_START_1_DIGIT_2 8 # elif BOOST_PP_SLOT_TEMP_2 == 9 # define BOOST_PP_ITERATION_START_1_DIGIT_2 9 # endif # # if BOOST_PP_SLOT_TEMP_1 == 0 # define BOOST_PP_ITERATION_START_1_DIGIT_1 0 # elif BOOST_PP_SLOT_TEMP_1 == 1 # define BOOST_PP_ITERATION_START_1_DIGIT_1 1 # elif BOOST_PP_SLOT_TEMP_1 == 2 # define BOOST_PP_ITERATION_START_1_DIGIT_1 2 # elif BOOST_PP_SLOT_TEMP_1 == 3 # define BOOST_PP_ITERATION_START_1_DIGIT_1 3 # elif BOOST_PP_SLOT_TEMP_1 == 4 # define BOOST_PP_ITERATION_START_1_DIGIT_1 4 # elif BOOST_PP_SLOT_TEMP_1 == 5 # define BOOST_PP_ITERATION_START_1_DIGIT_1 5 # elif BOOST_PP_SLOT_TEMP_1 == 6 # define BOOST_PP_ITERATION_START_1_DIGIT_1 6 # elif BOOST_PP_SLOT_TEMP_1 == 7 # define BOOST_PP_ITERATION_START_1_DIGIT_1 7 # elif BOOST_PP_SLOT_TEMP_1 == 8 # define BOOST_PP_ITERATION_START_1_DIGIT_1 8 # elif BOOST_PP_SLOT_TEMP_1 == 9 # define BOOST_PP_ITERATION_START_1_DIGIT_1 9 # endif # # if BOOST_PP_ITERATION_START_1_DIGIT_3 # define BOOST_PP_ITERATION_START_1 BOOST_PP_SLOT_CC_3(BOOST_PP_ITERATION_START_1_DIGIT_3, BOOST_PP_ITERATION_START_1_DIGIT_2, BOOST_PP_ITERATION_START_1_DIGIT_1) # elif BOOST_PP_ITERATION_START_1_DIGIT_2 # define BOOST_PP_ITERATION_START_1 BOOST_PP_SLOT_CC_2(BOOST_PP_ITERATION_START_1_DIGIT_2, BOOST_PP_ITERATION_START_1_DIGIT_1) # else # define BOOST_PP_ITERATION_START_1 BOOST_PP_ITERATION_START_1_DIGIT_1 # endif ================================================ FILE: benchmarks/boost/preprocessor/iteration/detail/bounds/lower2.hpp ================================================ # /* ************************************************************************** # * * # * (C) Copyright Paul Mensonides 2002. # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # * * # ************************************************************************** */ # # /* See http://www.boost.org for most recent version. */ # # include # # undef BOOST_PP_ITERATION_START_2 # # undef BOOST_PP_ITERATION_START_2_DIGIT_1 # undef BOOST_PP_ITERATION_START_2_DIGIT_2 # undef BOOST_PP_ITERATION_START_2_DIGIT_3 # undef BOOST_PP_ITERATION_START_2_DIGIT_4 # undef BOOST_PP_ITERATION_START_2_DIGIT_5 # undef BOOST_PP_ITERATION_START_2_DIGIT_6 # undef BOOST_PP_ITERATION_START_2_DIGIT_7 # undef BOOST_PP_ITERATION_START_2_DIGIT_8 # undef BOOST_PP_ITERATION_START_2_DIGIT_9 # undef BOOST_PP_ITERATION_START_2_DIGIT_10 # # if BOOST_PP_SLOT_TEMP_3 == 0 # define BOOST_PP_ITERATION_START_2_DIGIT_3 0 # elif BOOST_PP_SLOT_TEMP_3 == 1 # define BOOST_PP_ITERATION_START_2_DIGIT_3 1 # elif BOOST_PP_SLOT_TEMP_3 == 2 # define BOOST_PP_ITERATION_START_2_DIGIT_3 2 # elif BOOST_PP_SLOT_TEMP_3 == 3 # define BOOST_PP_ITERATION_START_2_DIGIT_3 3 # elif BOOST_PP_SLOT_TEMP_3 == 4 # define BOOST_PP_ITERATION_START_2_DIGIT_3 4 # elif BOOST_PP_SLOT_TEMP_3 == 5 # define BOOST_PP_ITERATION_START_2_DIGIT_3 5 # elif BOOST_PP_SLOT_TEMP_3 == 6 # define BOOST_PP_ITERATION_START_2_DIGIT_3 6 # elif BOOST_PP_SLOT_TEMP_3 == 7 # define BOOST_PP_ITERATION_START_2_DIGIT_3 7 # elif BOOST_PP_SLOT_TEMP_3 == 8 # define BOOST_PP_ITERATION_START_2_DIGIT_3 8 # elif BOOST_PP_SLOT_TEMP_3 == 9 # define BOOST_PP_ITERATION_START_2_DIGIT_3 9 # endif # # if BOOST_PP_SLOT_TEMP_2 == 0 # define BOOST_PP_ITERATION_START_2_DIGIT_2 0 # elif BOOST_PP_SLOT_TEMP_2 == 1 # define BOOST_PP_ITERATION_START_2_DIGIT_2 1 # elif BOOST_PP_SLOT_TEMP_2 == 2 # define BOOST_PP_ITERATION_START_2_DIGIT_2 2 # elif BOOST_PP_SLOT_TEMP_2 == 3 # define BOOST_PP_ITERATION_START_2_DIGIT_2 3 # elif BOOST_PP_SLOT_TEMP_2 == 4 # define BOOST_PP_ITERATION_START_2_DIGIT_2 4 # elif BOOST_PP_SLOT_TEMP_2 == 5 # define BOOST_PP_ITERATION_START_2_DIGIT_2 5 # elif BOOST_PP_SLOT_TEMP_2 == 6 # define BOOST_PP_ITERATION_START_2_DIGIT_2 6 # elif BOOST_PP_SLOT_TEMP_2 == 7 # define BOOST_PP_ITERATION_START_2_DIGIT_2 7 # elif BOOST_PP_SLOT_TEMP_2 == 8 # define BOOST_PP_ITERATION_START_2_DIGIT_2 8 # elif BOOST_PP_SLOT_TEMP_2 == 9 # define BOOST_PP_ITERATION_START_2_DIGIT_2 9 # endif # # if BOOST_PP_SLOT_TEMP_1 == 0 # define BOOST_PP_ITERATION_START_2_DIGIT_1 0 # elif BOOST_PP_SLOT_TEMP_1 == 1 # define BOOST_PP_ITERATION_START_2_DIGIT_1 1 # elif BOOST_PP_SLOT_TEMP_1 == 2 # define BOOST_PP_ITERATION_START_2_DIGIT_1 2 # elif BOOST_PP_SLOT_TEMP_1 == 3 # define BOOST_PP_ITERATION_START_2_DIGIT_1 3 # elif BOOST_PP_SLOT_TEMP_1 == 4 # define BOOST_PP_ITERATION_START_2_DIGIT_1 4 # elif BOOST_PP_SLOT_TEMP_1 == 5 # define BOOST_PP_ITERATION_START_2_DIGIT_1 5 # elif BOOST_PP_SLOT_TEMP_1 == 6 # define BOOST_PP_ITERATION_START_2_DIGIT_1 6 # elif BOOST_PP_SLOT_TEMP_1 == 7 # define BOOST_PP_ITERATION_START_2_DIGIT_1 7 # elif BOOST_PP_SLOT_TEMP_1 == 8 # define BOOST_PP_ITERATION_START_2_DIGIT_1 8 # elif BOOST_PP_SLOT_TEMP_1 == 9 # define BOOST_PP_ITERATION_START_2_DIGIT_1 9 # endif # # if BOOST_PP_ITERATION_START_2_DIGIT_3 # define BOOST_PP_ITERATION_START_2 BOOST_PP_SLOT_CC_3(BOOST_PP_ITERATION_START_2_DIGIT_3, BOOST_PP_ITERATION_START_2_DIGIT_2, BOOST_PP_ITERATION_START_2_DIGIT_1) # elif BOOST_PP_ITERATION_START_2_DIGIT_2 # define BOOST_PP_ITERATION_START_2 BOOST_PP_SLOT_CC_2(BOOST_PP_ITERATION_START_2_DIGIT_2, BOOST_PP_ITERATION_START_2_DIGIT_1) # else # define BOOST_PP_ITERATION_START_2 BOOST_PP_ITERATION_START_2_DIGIT_1 # endif ================================================ FILE: benchmarks/boost/preprocessor/iteration/detail/bounds/lower3.hpp ================================================ # /* ************************************************************************** # * * # * (C) Copyright Paul Mensonides 2002. # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # * * # ************************************************************************** */ # # /* See http://www.boost.org for most recent version. */ # # include # # undef BOOST_PP_ITERATION_START_3 # # undef BOOST_PP_ITERATION_START_3_DIGIT_1 # undef BOOST_PP_ITERATION_START_3_DIGIT_2 # undef BOOST_PP_ITERATION_START_3_DIGIT_3 # undef BOOST_PP_ITERATION_START_3_DIGIT_4 # undef BOOST_PP_ITERATION_START_3_DIGIT_5 # undef BOOST_PP_ITERATION_START_3_DIGIT_6 # undef BOOST_PP_ITERATION_START_3_DIGIT_7 # undef BOOST_PP_ITERATION_START_3_DIGIT_8 # undef BOOST_PP_ITERATION_START_3_DIGIT_9 # undef BOOST_PP_ITERATION_START_3_DIGIT_10 # # if BOOST_PP_SLOT_TEMP_3 == 0 # define BOOST_PP_ITERATION_START_3_DIGIT_3 0 # elif BOOST_PP_SLOT_TEMP_3 == 1 # define BOOST_PP_ITERATION_START_3_DIGIT_3 1 # elif BOOST_PP_SLOT_TEMP_3 == 2 # define BOOST_PP_ITERATION_START_3_DIGIT_3 2 # elif BOOST_PP_SLOT_TEMP_3 == 3 # define BOOST_PP_ITERATION_START_3_DIGIT_3 3 # elif BOOST_PP_SLOT_TEMP_3 == 4 # define BOOST_PP_ITERATION_START_3_DIGIT_3 4 # elif BOOST_PP_SLOT_TEMP_3 == 5 # define BOOST_PP_ITERATION_START_3_DIGIT_3 5 # elif BOOST_PP_SLOT_TEMP_3 == 6 # define BOOST_PP_ITERATION_START_3_DIGIT_3 6 # elif BOOST_PP_SLOT_TEMP_3 == 7 # define BOOST_PP_ITERATION_START_3_DIGIT_3 7 # elif BOOST_PP_SLOT_TEMP_3 == 8 # define BOOST_PP_ITERATION_START_3_DIGIT_3 8 # elif BOOST_PP_SLOT_TEMP_3 == 9 # define BOOST_PP_ITERATION_START_3_DIGIT_3 9 # endif # # if BOOST_PP_SLOT_TEMP_2 == 0 # define BOOST_PP_ITERATION_START_3_DIGIT_2 0 # elif BOOST_PP_SLOT_TEMP_2 == 1 # define BOOST_PP_ITERATION_START_3_DIGIT_2 1 # elif BOOST_PP_SLOT_TEMP_2 == 2 # define BOOST_PP_ITERATION_START_3_DIGIT_2 2 # elif BOOST_PP_SLOT_TEMP_2 == 3 # define BOOST_PP_ITERATION_START_3_DIGIT_2 3 # elif BOOST_PP_SLOT_TEMP_2 == 4 # define BOOST_PP_ITERATION_START_3_DIGIT_2 4 # elif BOOST_PP_SLOT_TEMP_2 == 5 # define BOOST_PP_ITERATION_START_3_DIGIT_2 5 # elif BOOST_PP_SLOT_TEMP_2 == 6 # define BOOST_PP_ITERATION_START_3_DIGIT_2 6 # elif BOOST_PP_SLOT_TEMP_2 == 7 # define BOOST_PP_ITERATION_START_3_DIGIT_2 7 # elif BOOST_PP_SLOT_TEMP_2 == 8 # define BOOST_PP_ITERATION_START_3_DIGIT_2 8 # elif BOOST_PP_SLOT_TEMP_2 == 9 # define BOOST_PP_ITERATION_START_3_DIGIT_2 9 # endif # # if BOOST_PP_SLOT_TEMP_1 == 0 # define BOOST_PP_ITERATION_START_3_DIGIT_1 0 # elif BOOST_PP_SLOT_TEMP_1 == 1 # define BOOST_PP_ITERATION_START_3_DIGIT_1 1 # elif BOOST_PP_SLOT_TEMP_1 == 2 # define BOOST_PP_ITERATION_START_3_DIGIT_1 2 # elif BOOST_PP_SLOT_TEMP_1 == 3 # define BOOST_PP_ITERATION_START_3_DIGIT_1 3 # elif BOOST_PP_SLOT_TEMP_1 == 4 # define BOOST_PP_ITERATION_START_3_DIGIT_1 4 # elif BOOST_PP_SLOT_TEMP_1 == 5 # define BOOST_PP_ITERATION_START_3_DIGIT_1 5 # elif BOOST_PP_SLOT_TEMP_1 == 6 # define BOOST_PP_ITERATION_START_3_DIGIT_1 6 # elif BOOST_PP_SLOT_TEMP_1 == 7 # define BOOST_PP_ITERATION_START_3_DIGIT_1 7 # elif BOOST_PP_SLOT_TEMP_1 == 8 # define BOOST_PP_ITERATION_START_3_DIGIT_1 8 # elif BOOST_PP_SLOT_TEMP_1 == 9 # define BOOST_PP_ITERATION_START_3_DIGIT_1 9 # endif # # if BOOST_PP_ITERATION_START_3_DIGIT_3 # define BOOST_PP_ITERATION_START_3 BOOST_PP_SLOT_CC_3(BOOST_PP_ITERATION_START_3_DIGIT_3, BOOST_PP_ITERATION_START_3_DIGIT_2, BOOST_PP_ITERATION_START_3_DIGIT_1) # elif BOOST_PP_ITERATION_START_3_DIGIT_2 # define BOOST_PP_ITERATION_START_3 BOOST_PP_SLOT_CC_2(BOOST_PP_ITERATION_START_3_DIGIT_2, BOOST_PP_ITERATION_START_3_DIGIT_1) # else # define BOOST_PP_ITERATION_START_3 BOOST_PP_ITERATION_START_3_DIGIT_1 # endif ================================================ FILE: benchmarks/boost/preprocessor/iteration/detail/bounds/lower4.hpp ================================================ # /* ************************************************************************** # * * # * (C) Copyright Paul Mensonides 2002. # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # * * # ************************************************************************** */ # # /* See http://www.boost.org for most recent version. */ # # include # # undef BOOST_PP_ITERATION_START_4 # # undef BOOST_PP_ITERATION_START_4_DIGIT_1 # undef BOOST_PP_ITERATION_START_4_DIGIT_2 # undef BOOST_PP_ITERATION_START_4_DIGIT_3 # undef BOOST_PP_ITERATION_START_4_DIGIT_4 # undef BOOST_PP_ITERATION_START_4_DIGIT_5 # undef BOOST_PP_ITERATION_START_4_DIGIT_6 # undef BOOST_PP_ITERATION_START_4_DIGIT_7 # undef BOOST_PP_ITERATION_START_4_DIGIT_8 # undef BOOST_PP_ITERATION_START_4_DIGIT_9 # undef BOOST_PP_ITERATION_START_4_DIGIT_10 # # if BOOST_PP_SLOT_TEMP_3 == 0 # define BOOST_PP_ITERATION_START_4_DIGIT_3 0 # elif BOOST_PP_SLOT_TEMP_3 == 1 # define BOOST_PP_ITERATION_START_4_DIGIT_3 1 # elif BOOST_PP_SLOT_TEMP_3 == 2 # define BOOST_PP_ITERATION_START_4_DIGIT_3 2 # elif BOOST_PP_SLOT_TEMP_3 == 3 # define BOOST_PP_ITERATION_START_4_DIGIT_3 3 # elif BOOST_PP_SLOT_TEMP_3 == 4 # define BOOST_PP_ITERATION_START_4_DIGIT_3 4 # elif BOOST_PP_SLOT_TEMP_3 == 5 # define BOOST_PP_ITERATION_START_4_DIGIT_3 5 # elif BOOST_PP_SLOT_TEMP_3 == 6 # define BOOST_PP_ITERATION_START_4_DIGIT_3 6 # elif BOOST_PP_SLOT_TEMP_3 == 7 # define BOOST_PP_ITERATION_START_4_DIGIT_3 7 # elif BOOST_PP_SLOT_TEMP_3 == 8 # define BOOST_PP_ITERATION_START_4_DIGIT_3 8 # elif BOOST_PP_SLOT_TEMP_3 == 9 # define BOOST_PP_ITERATION_START_4_DIGIT_3 9 # endif # # if BOOST_PP_SLOT_TEMP_2 == 0 # define BOOST_PP_ITERATION_START_4_DIGIT_2 0 # elif BOOST_PP_SLOT_TEMP_2 == 1 # define BOOST_PP_ITERATION_START_4_DIGIT_2 1 # elif BOOST_PP_SLOT_TEMP_2 == 2 # define BOOST_PP_ITERATION_START_4_DIGIT_2 2 # elif BOOST_PP_SLOT_TEMP_2 == 3 # define BOOST_PP_ITERATION_START_4_DIGIT_2 3 # elif BOOST_PP_SLOT_TEMP_2 == 4 # define BOOST_PP_ITERATION_START_4_DIGIT_2 4 # elif BOOST_PP_SLOT_TEMP_2 == 5 # define BOOST_PP_ITERATION_START_4_DIGIT_2 5 # elif BOOST_PP_SLOT_TEMP_2 == 6 # define BOOST_PP_ITERATION_START_4_DIGIT_2 6 # elif BOOST_PP_SLOT_TEMP_2 == 7 # define BOOST_PP_ITERATION_START_4_DIGIT_2 7 # elif BOOST_PP_SLOT_TEMP_2 == 8 # define BOOST_PP_ITERATION_START_4_DIGIT_2 8 # elif BOOST_PP_SLOT_TEMP_2 == 9 # define BOOST_PP_ITERATION_START_4_DIGIT_2 9 # endif # # if BOOST_PP_SLOT_TEMP_1 == 0 # define BOOST_PP_ITERATION_START_4_DIGIT_1 0 # elif BOOST_PP_SLOT_TEMP_1 == 1 # define BOOST_PP_ITERATION_START_4_DIGIT_1 1 # elif BOOST_PP_SLOT_TEMP_1 == 2 # define BOOST_PP_ITERATION_START_4_DIGIT_1 2 # elif BOOST_PP_SLOT_TEMP_1 == 3 # define BOOST_PP_ITERATION_START_4_DIGIT_1 3 # elif BOOST_PP_SLOT_TEMP_1 == 4 # define BOOST_PP_ITERATION_START_4_DIGIT_1 4 # elif BOOST_PP_SLOT_TEMP_1 == 5 # define BOOST_PP_ITERATION_START_4_DIGIT_1 5 # elif BOOST_PP_SLOT_TEMP_1 == 6 # define BOOST_PP_ITERATION_START_4_DIGIT_1 6 # elif BOOST_PP_SLOT_TEMP_1 == 7 # define BOOST_PP_ITERATION_START_4_DIGIT_1 7 # elif BOOST_PP_SLOT_TEMP_1 == 8 # define BOOST_PP_ITERATION_START_4_DIGIT_1 8 # elif BOOST_PP_SLOT_TEMP_1 == 9 # define BOOST_PP_ITERATION_START_4_DIGIT_1 9 # endif # # if BOOST_PP_ITERATION_START_4_DIGIT_3 # define BOOST_PP_ITERATION_START_4 BOOST_PP_SLOT_CC_3(BOOST_PP_ITERATION_START_4_DIGIT_3, BOOST_PP_ITERATION_START_4_DIGIT_2, BOOST_PP_ITERATION_START_4_DIGIT_1) # elif BOOST_PP_ITERATION_START_4_DIGIT_2 # define BOOST_PP_ITERATION_START_4 BOOST_PP_SLOT_CC_2(BOOST_PP_ITERATION_START_4_DIGIT_2, BOOST_PP_ITERATION_START_4_DIGIT_1) # else # define BOOST_PP_ITERATION_START_4 BOOST_PP_ITERATION_START_4_DIGIT_1 # endif ================================================ FILE: benchmarks/boost/preprocessor/iteration/detail/bounds/lower5.hpp ================================================ # /* ************************************************************************** # * * # * (C) Copyright Paul Mensonides 2002. # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # * * # ************************************************************************** */ # # /* See http://www.boost.org for most recent version. */ # # include # # undef BOOST_PP_ITERATION_START_5 # # undef BOOST_PP_ITERATION_START_5_DIGIT_1 # undef BOOST_PP_ITERATION_START_5_DIGIT_2 # undef BOOST_PP_ITERATION_START_5_DIGIT_3 # undef BOOST_PP_ITERATION_START_5_DIGIT_4 # undef BOOST_PP_ITERATION_START_5_DIGIT_5 # undef BOOST_PP_ITERATION_START_5_DIGIT_6 # undef BOOST_PP_ITERATION_START_5_DIGIT_7 # undef BOOST_PP_ITERATION_START_5_DIGIT_8 # undef BOOST_PP_ITERATION_START_5_DIGIT_9 # undef BOOST_PP_ITERATION_START_5_DIGIT_10 # # if BOOST_PP_SLOT_TEMP_3 == 0 # define BOOST_PP_ITERATION_START_5_DIGIT_3 0 # elif BOOST_PP_SLOT_TEMP_3 == 1 # define BOOST_PP_ITERATION_START_5_DIGIT_3 1 # elif BOOST_PP_SLOT_TEMP_3 == 2 # define BOOST_PP_ITERATION_START_5_DIGIT_3 2 # elif BOOST_PP_SLOT_TEMP_3 == 3 # define BOOST_PP_ITERATION_START_5_DIGIT_3 3 # elif BOOST_PP_SLOT_TEMP_3 == 4 # define BOOST_PP_ITERATION_START_5_DIGIT_3 4 # elif BOOST_PP_SLOT_TEMP_3 == 5 # define BOOST_PP_ITERATION_START_5_DIGIT_3 5 # elif BOOST_PP_SLOT_TEMP_3 == 6 # define BOOST_PP_ITERATION_START_5_DIGIT_3 6 # elif BOOST_PP_SLOT_TEMP_3 == 7 # define BOOST_PP_ITERATION_START_5_DIGIT_3 7 # elif BOOST_PP_SLOT_TEMP_3 == 8 # define BOOST_PP_ITERATION_START_5_DIGIT_3 8 # elif BOOST_PP_SLOT_TEMP_3 == 9 # define BOOST_PP_ITERATION_START_5_DIGIT_3 9 # endif # # if BOOST_PP_SLOT_TEMP_2 == 0 # define BOOST_PP_ITERATION_START_5_DIGIT_2 0 # elif BOOST_PP_SLOT_TEMP_2 == 1 # define BOOST_PP_ITERATION_START_5_DIGIT_2 1 # elif BOOST_PP_SLOT_TEMP_2 == 2 # define BOOST_PP_ITERATION_START_5_DIGIT_2 2 # elif BOOST_PP_SLOT_TEMP_2 == 3 # define BOOST_PP_ITERATION_START_5_DIGIT_2 3 # elif BOOST_PP_SLOT_TEMP_2 == 4 # define BOOST_PP_ITERATION_START_5_DIGIT_2 4 # elif BOOST_PP_SLOT_TEMP_2 == 5 # define BOOST_PP_ITERATION_START_5_DIGIT_2 5 # elif BOOST_PP_SLOT_TEMP_2 == 6 # define BOOST_PP_ITERATION_START_5_DIGIT_2 6 # elif BOOST_PP_SLOT_TEMP_2 == 7 # define BOOST_PP_ITERATION_START_5_DIGIT_2 7 # elif BOOST_PP_SLOT_TEMP_2 == 8 # define BOOST_PP_ITERATION_START_5_DIGIT_2 8 # elif BOOST_PP_SLOT_TEMP_2 == 9 # define BOOST_PP_ITERATION_START_5_DIGIT_2 9 # endif # # if BOOST_PP_SLOT_TEMP_1 == 0 # define BOOST_PP_ITERATION_START_5_DIGIT_1 0 # elif BOOST_PP_SLOT_TEMP_1 == 1 # define BOOST_PP_ITERATION_START_5_DIGIT_1 1 # elif BOOST_PP_SLOT_TEMP_1 == 2 # define BOOST_PP_ITERATION_START_5_DIGIT_1 2 # elif BOOST_PP_SLOT_TEMP_1 == 3 # define BOOST_PP_ITERATION_START_5_DIGIT_1 3 # elif BOOST_PP_SLOT_TEMP_1 == 4 # define BOOST_PP_ITERATION_START_5_DIGIT_1 4 # elif BOOST_PP_SLOT_TEMP_1 == 5 # define BOOST_PP_ITERATION_START_5_DIGIT_1 5 # elif BOOST_PP_SLOT_TEMP_1 == 6 # define BOOST_PP_ITERATION_START_5_DIGIT_1 6 # elif BOOST_PP_SLOT_TEMP_1 == 7 # define BOOST_PP_ITERATION_START_5_DIGIT_1 7 # elif BOOST_PP_SLOT_TEMP_1 == 8 # define BOOST_PP_ITERATION_START_5_DIGIT_1 8 # elif BOOST_PP_SLOT_TEMP_1 == 9 # define BOOST_PP_ITERATION_START_5_DIGIT_1 9 # endif # # if BOOST_PP_ITERATION_START_5_DIGIT_3 # define BOOST_PP_ITERATION_START_5 BOOST_PP_SLOT_CC_3(BOOST_PP_ITERATION_START_5_DIGIT_3, BOOST_PP_ITERATION_START_5_DIGIT_2, BOOST_PP_ITERATION_START_5_DIGIT_1) # elif BOOST_PP_ITERATION_START_5_DIGIT_2 # define BOOST_PP_ITERATION_START_5 BOOST_PP_SLOT_CC_2(BOOST_PP_ITERATION_START_5_DIGIT_2, BOOST_PP_ITERATION_START_5_DIGIT_1) # else # define BOOST_PP_ITERATION_START_5 BOOST_PP_ITERATION_START_5_DIGIT_1 # endif ================================================ FILE: benchmarks/boost/preprocessor/iteration/detail/bounds/upper1.hpp ================================================ # /* ************************************************************************** # * * # * (C) Copyright Paul Mensonides 2002. # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # * * # ************************************************************************** */ # # /* See http://www.boost.org for most recent version. */ # # include # # undef BOOST_PP_ITERATION_FINISH_1 # # undef BOOST_PP_ITERATION_FINISH_1_DIGIT_1 # undef BOOST_PP_ITERATION_FINISH_1_DIGIT_2 # undef BOOST_PP_ITERATION_FINISH_1_DIGIT_3 # undef BOOST_PP_ITERATION_FINISH_1_DIGIT_4 # undef BOOST_PP_ITERATION_FINISH_1_DIGIT_5 # undef BOOST_PP_ITERATION_FINISH_1_DIGIT_6 # undef BOOST_PP_ITERATION_FINISH_1_DIGIT_7 # undef BOOST_PP_ITERATION_FINISH_1_DIGIT_8 # undef BOOST_PP_ITERATION_FINISH_1_DIGIT_9 # undef BOOST_PP_ITERATION_FINISH_1_DIGIT_10 # # if BOOST_PP_SLOT_TEMP_3 == 0 # define BOOST_PP_ITERATION_FINISH_1_DIGIT_3 0 # elif BOOST_PP_SLOT_TEMP_3 == 1 # define BOOST_PP_ITERATION_FINISH_1_DIGIT_3 1 # elif BOOST_PP_SLOT_TEMP_3 == 2 # define BOOST_PP_ITERATION_FINISH_1_DIGIT_3 2 # elif BOOST_PP_SLOT_TEMP_3 == 3 # define BOOST_PP_ITERATION_FINISH_1_DIGIT_3 3 # elif BOOST_PP_SLOT_TEMP_3 == 4 # define BOOST_PP_ITERATION_FINISH_1_DIGIT_3 4 # elif BOOST_PP_SLOT_TEMP_3 == 5 # define BOOST_PP_ITERATION_FINISH_1_DIGIT_3 5 # elif BOOST_PP_SLOT_TEMP_3 == 6 # define BOOST_PP_ITERATION_FINISH_1_DIGIT_3 6 # elif BOOST_PP_SLOT_TEMP_3 == 7 # define BOOST_PP_ITERATION_FINISH_1_DIGIT_3 7 # elif BOOST_PP_SLOT_TEMP_3 == 8 # define BOOST_PP_ITERATION_FINISH_1_DIGIT_3 8 # elif BOOST_PP_SLOT_TEMP_3 == 9 # define BOOST_PP_ITERATION_FINISH_1_DIGIT_3 9 # endif # # if BOOST_PP_SLOT_TEMP_2 == 0 # define BOOST_PP_ITERATION_FINISH_1_DIGIT_2 0 # elif BOOST_PP_SLOT_TEMP_2 == 1 # define BOOST_PP_ITERATION_FINISH_1_DIGIT_2 1 # elif BOOST_PP_SLOT_TEMP_2 == 2 # define BOOST_PP_ITERATION_FINISH_1_DIGIT_2 2 # elif BOOST_PP_SLOT_TEMP_2 == 3 # define BOOST_PP_ITERATION_FINISH_1_DIGIT_2 3 # elif BOOST_PP_SLOT_TEMP_2 == 4 # define BOOST_PP_ITERATION_FINISH_1_DIGIT_2 4 # elif BOOST_PP_SLOT_TEMP_2 == 5 # define BOOST_PP_ITERATION_FINISH_1_DIGIT_2 5 # elif BOOST_PP_SLOT_TEMP_2 == 6 # define BOOST_PP_ITERATION_FINISH_1_DIGIT_2 6 # elif BOOST_PP_SLOT_TEMP_2 == 7 # define BOOST_PP_ITERATION_FINISH_1_DIGIT_2 7 # elif BOOST_PP_SLOT_TEMP_2 == 8 # define BOOST_PP_ITERATION_FINISH_1_DIGIT_2 8 # elif BOOST_PP_SLOT_TEMP_2 == 9 # define BOOST_PP_ITERATION_FINISH_1_DIGIT_2 9 # endif # # if BOOST_PP_SLOT_TEMP_1 == 0 # define BOOST_PP_ITERATION_FINISH_1_DIGIT_1 0 # elif BOOST_PP_SLOT_TEMP_1 == 1 # define BOOST_PP_ITERATION_FINISH_1_DIGIT_1 1 # elif BOOST_PP_SLOT_TEMP_1 == 2 # define BOOST_PP_ITERATION_FINISH_1_DIGIT_1 2 # elif BOOST_PP_SLOT_TEMP_1 == 3 # define BOOST_PP_ITERATION_FINISH_1_DIGIT_1 3 # elif BOOST_PP_SLOT_TEMP_1 == 4 # define BOOST_PP_ITERATION_FINISH_1_DIGIT_1 4 # elif BOOST_PP_SLOT_TEMP_1 == 5 # define BOOST_PP_ITERATION_FINISH_1_DIGIT_1 5 # elif BOOST_PP_SLOT_TEMP_1 == 6 # define BOOST_PP_ITERATION_FINISH_1_DIGIT_1 6 # elif BOOST_PP_SLOT_TEMP_1 == 7 # define BOOST_PP_ITERATION_FINISH_1_DIGIT_1 7 # elif BOOST_PP_SLOT_TEMP_1 == 8 # define BOOST_PP_ITERATION_FINISH_1_DIGIT_1 8 # elif BOOST_PP_SLOT_TEMP_1 == 9 # define BOOST_PP_ITERATION_FINISH_1_DIGIT_1 9 # endif # # if BOOST_PP_ITERATION_FINISH_1_DIGIT_3 # define BOOST_PP_ITERATION_FINISH_1 BOOST_PP_SLOT_CC_3(BOOST_PP_ITERATION_FINISH_1_DIGIT_3, BOOST_PP_ITERATION_FINISH_1_DIGIT_2, BOOST_PP_ITERATION_FINISH_1_DIGIT_1) # elif BOOST_PP_ITERATION_FINISH_1_DIGIT_2 # define BOOST_PP_ITERATION_FINISH_1 BOOST_PP_SLOT_CC_2(BOOST_PP_ITERATION_FINISH_1_DIGIT_2, BOOST_PP_ITERATION_FINISH_1_DIGIT_1) # else # define BOOST_PP_ITERATION_FINISH_1 BOOST_PP_ITERATION_FINISH_1_DIGIT_1 # endif ================================================ FILE: benchmarks/boost/preprocessor/iteration/detail/bounds/upper2.hpp ================================================ # /* ************************************************************************** # * * # * (C) Copyright Paul Mensonides 2002. # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # * * # ************************************************************************** */ # # /* See http://www.boost.org for most recent version. */ # # include # # undef BOOST_PP_ITERATION_FINISH_2 # # undef BOOST_PP_ITERATION_FINISH_2_DIGIT_1 # undef BOOST_PP_ITERATION_FINISH_2_DIGIT_2 # undef BOOST_PP_ITERATION_FINISH_2_DIGIT_3 # undef BOOST_PP_ITERATION_FINISH_2_DIGIT_4 # undef BOOST_PP_ITERATION_FINISH_2_DIGIT_5 # undef BOOST_PP_ITERATION_FINISH_2_DIGIT_6 # undef BOOST_PP_ITERATION_FINISH_2_DIGIT_7 # undef BOOST_PP_ITERATION_FINISH_2_DIGIT_8 # undef BOOST_PP_ITERATION_FINISH_2_DIGIT_9 # undef BOOST_PP_ITERATION_FINISH_2_DIGIT_10 # # if BOOST_PP_SLOT_TEMP_3 == 0 # define BOOST_PP_ITERATION_FINISH_2_DIGIT_3 0 # elif BOOST_PP_SLOT_TEMP_3 == 1 # define BOOST_PP_ITERATION_FINISH_2_DIGIT_3 1 # elif BOOST_PP_SLOT_TEMP_3 == 2 # define BOOST_PP_ITERATION_FINISH_2_DIGIT_3 2 # elif BOOST_PP_SLOT_TEMP_3 == 3 # define BOOST_PP_ITERATION_FINISH_2_DIGIT_3 3 # elif BOOST_PP_SLOT_TEMP_3 == 4 # define BOOST_PP_ITERATION_FINISH_2_DIGIT_3 4 # elif BOOST_PP_SLOT_TEMP_3 == 5 # define BOOST_PP_ITERATION_FINISH_2_DIGIT_3 5 # elif BOOST_PP_SLOT_TEMP_3 == 6 # define BOOST_PP_ITERATION_FINISH_2_DIGIT_3 6 # elif BOOST_PP_SLOT_TEMP_3 == 7 # define BOOST_PP_ITERATION_FINISH_2_DIGIT_3 7 # elif BOOST_PP_SLOT_TEMP_3 == 8 # define BOOST_PP_ITERATION_FINISH_2_DIGIT_3 8 # elif BOOST_PP_SLOT_TEMP_3 == 9 # define BOOST_PP_ITERATION_FINISH_2_DIGIT_3 9 # endif # # if BOOST_PP_SLOT_TEMP_2 == 0 # define BOOST_PP_ITERATION_FINISH_2_DIGIT_2 0 # elif BOOST_PP_SLOT_TEMP_2 == 1 # define BOOST_PP_ITERATION_FINISH_2_DIGIT_2 1 # elif BOOST_PP_SLOT_TEMP_2 == 2 # define BOOST_PP_ITERATION_FINISH_2_DIGIT_2 2 # elif BOOST_PP_SLOT_TEMP_2 == 3 # define BOOST_PP_ITERATION_FINISH_2_DIGIT_2 3 # elif BOOST_PP_SLOT_TEMP_2 == 4 # define BOOST_PP_ITERATION_FINISH_2_DIGIT_2 4 # elif BOOST_PP_SLOT_TEMP_2 == 5 # define BOOST_PP_ITERATION_FINISH_2_DIGIT_2 5 # elif BOOST_PP_SLOT_TEMP_2 == 6 # define BOOST_PP_ITERATION_FINISH_2_DIGIT_2 6 # elif BOOST_PP_SLOT_TEMP_2 == 7 # define BOOST_PP_ITERATION_FINISH_2_DIGIT_2 7 # elif BOOST_PP_SLOT_TEMP_2 == 8 # define BOOST_PP_ITERATION_FINISH_2_DIGIT_2 8 # elif BOOST_PP_SLOT_TEMP_2 == 9 # define BOOST_PP_ITERATION_FINISH_2_DIGIT_2 9 # endif # # if BOOST_PP_SLOT_TEMP_1 == 0 # define BOOST_PP_ITERATION_FINISH_2_DIGIT_1 0 # elif BOOST_PP_SLOT_TEMP_1 == 1 # define BOOST_PP_ITERATION_FINISH_2_DIGIT_1 1 # elif BOOST_PP_SLOT_TEMP_1 == 2 # define BOOST_PP_ITERATION_FINISH_2_DIGIT_1 2 # elif BOOST_PP_SLOT_TEMP_1 == 3 # define BOOST_PP_ITERATION_FINISH_2_DIGIT_1 3 # elif BOOST_PP_SLOT_TEMP_1 == 4 # define BOOST_PP_ITERATION_FINISH_2_DIGIT_1 4 # elif BOOST_PP_SLOT_TEMP_1 == 5 # define BOOST_PP_ITERATION_FINISH_2_DIGIT_1 5 # elif BOOST_PP_SLOT_TEMP_1 == 6 # define BOOST_PP_ITERATION_FINISH_2_DIGIT_1 6 # elif BOOST_PP_SLOT_TEMP_1 == 7 # define BOOST_PP_ITERATION_FINISH_2_DIGIT_1 7 # elif BOOST_PP_SLOT_TEMP_1 == 8 # define BOOST_PP_ITERATION_FINISH_2_DIGIT_1 8 # elif BOOST_PP_SLOT_TEMP_1 == 9 # define BOOST_PP_ITERATION_FINISH_2_DIGIT_1 9 # endif # # if BOOST_PP_ITERATION_FINISH_2_DIGIT_3 # define BOOST_PP_ITERATION_FINISH_2 BOOST_PP_SLOT_CC_3(BOOST_PP_ITERATION_FINISH_2_DIGIT_3, BOOST_PP_ITERATION_FINISH_2_DIGIT_2, BOOST_PP_ITERATION_FINISH_2_DIGIT_1) # elif BOOST_PP_ITERATION_FINISH_2_DIGIT_2 # define BOOST_PP_ITERATION_FINISH_2 BOOST_PP_SLOT_CC_2(BOOST_PP_ITERATION_FINISH_2_DIGIT_2, BOOST_PP_ITERATION_FINISH_2_DIGIT_1) # else # define BOOST_PP_ITERATION_FINISH_2 BOOST_PP_ITERATION_FINISH_2_DIGIT_1 # endif ================================================ FILE: benchmarks/boost/preprocessor/iteration/detail/bounds/upper3.hpp ================================================ # /* ************************************************************************** # * * # * (C) Copyright Paul Mensonides 2002. # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # * * # ************************************************************************** */ # # /* See http://www.boost.org for most recent version. */ # # include # # undef BOOST_PP_ITERATION_FINISH_3 # # undef BOOST_PP_ITERATION_FINISH_3_DIGIT_1 # undef BOOST_PP_ITERATION_FINISH_3_DIGIT_2 # undef BOOST_PP_ITERATION_FINISH_3_DIGIT_3 # undef BOOST_PP_ITERATION_FINISH_3_DIGIT_4 # undef BOOST_PP_ITERATION_FINISH_3_DIGIT_5 # undef BOOST_PP_ITERATION_FINISH_3_DIGIT_6 # undef BOOST_PP_ITERATION_FINISH_3_DIGIT_7 # undef BOOST_PP_ITERATION_FINISH_3_DIGIT_8 # undef BOOST_PP_ITERATION_FINISH_3_DIGIT_9 # undef BOOST_PP_ITERATION_FINISH_3_DIGIT_10 # # if BOOST_PP_SLOT_TEMP_3 == 0 # define BOOST_PP_ITERATION_FINISH_3_DIGIT_3 0 # elif BOOST_PP_SLOT_TEMP_3 == 1 # define BOOST_PP_ITERATION_FINISH_3_DIGIT_3 1 # elif BOOST_PP_SLOT_TEMP_3 == 2 # define BOOST_PP_ITERATION_FINISH_3_DIGIT_3 2 # elif BOOST_PP_SLOT_TEMP_3 == 3 # define BOOST_PP_ITERATION_FINISH_3_DIGIT_3 3 # elif BOOST_PP_SLOT_TEMP_3 == 4 # define BOOST_PP_ITERATION_FINISH_3_DIGIT_3 4 # elif BOOST_PP_SLOT_TEMP_3 == 5 # define BOOST_PP_ITERATION_FINISH_3_DIGIT_3 5 # elif BOOST_PP_SLOT_TEMP_3 == 6 # define BOOST_PP_ITERATION_FINISH_3_DIGIT_3 6 # elif BOOST_PP_SLOT_TEMP_3 == 7 # define BOOST_PP_ITERATION_FINISH_3_DIGIT_3 7 # elif BOOST_PP_SLOT_TEMP_3 == 8 # define BOOST_PP_ITERATION_FINISH_3_DIGIT_3 8 # elif BOOST_PP_SLOT_TEMP_3 == 9 # define BOOST_PP_ITERATION_FINISH_3_DIGIT_3 9 # endif # # if BOOST_PP_SLOT_TEMP_2 == 0 # define BOOST_PP_ITERATION_FINISH_3_DIGIT_2 0 # elif BOOST_PP_SLOT_TEMP_2 == 1 # define BOOST_PP_ITERATION_FINISH_3_DIGIT_2 1 # elif BOOST_PP_SLOT_TEMP_2 == 2 # define BOOST_PP_ITERATION_FINISH_3_DIGIT_2 2 # elif BOOST_PP_SLOT_TEMP_2 == 3 # define BOOST_PP_ITERATION_FINISH_3_DIGIT_2 3 # elif BOOST_PP_SLOT_TEMP_2 == 4 # define BOOST_PP_ITERATION_FINISH_3_DIGIT_2 4 # elif BOOST_PP_SLOT_TEMP_2 == 5 # define BOOST_PP_ITERATION_FINISH_3_DIGIT_2 5 # elif BOOST_PP_SLOT_TEMP_2 == 6 # define BOOST_PP_ITERATION_FINISH_3_DIGIT_2 6 # elif BOOST_PP_SLOT_TEMP_2 == 7 # define BOOST_PP_ITERATION_FINISH_3_DIGIT_2 7 # elif BOOST_PP_SLOT_TEMP_2 == 8 # define BOOST_PP_ITERATION_FINISH_3_DIGIT_2 8 # elif BOOST_PP_SLOT_TEMP_2 == 9 # define BOOST_PP_ITERATION_FINISH_3_DIGIT_2 9 # endif # # if BOOST_PP_SLOT_TEMP_1 == 0 # define BOOST_PP_ITERATION_FINISH_3_DIGIT_1 0 # elif BOOST_PP_SLOT_TEMP_1 == 1 # define BOOST_PP_ITERATION_FINISH_3_DIGIT_1 1 # elif BOOST_PP_SLOT_TEMP_1 == 2 # define BOOST_PP_ITERATION_FINISH_3_DIGIT_1 2 # elif BOOST_PP_SLOT_TEMP_1 == 3 # define BOOST_PP_ITERATION_FINISH_3_DIGIT_1 3 # elif BOOST_PP_SLOT_TEMP_1 == 4 # define BOOST_PP_ITERATION_FINISH_3_DIGIT_1 4 # elif BOOST_PP_SLOT_TEMP_1 == 5 # define BOOST_PP_ITERATION_FINISH_3_DIGIT_1 5 # elif BOOST_PP_SLOT_TEMP_1 == 6 # define BOOST_PP_ITERATION_FINISH_3_DIGIT_1 6 # elif BOOST_PP_SLOT_TEMP_1 == 7 # define BOOST_PP_ITERATION_FINISH_3_DIGIT_1 7 # elif BOOST_PP_SLOT_TEMP_1 == 8 # define BOOST_PP_ITERATION_FINISH_3_DIGIT_1 8 # elif BOOST_PP_SLOT_TEMP_1 == 9 # define BOOST_PP_ITERATION_FINISH_3_DIGIT_1 9 # endif # # if BOOST_PP_ITERATION_FINISH_3_DIGIT_3 # define BOOST_PP_ITERATION_FINISH_3 BOOST_PP_SLOT_CC_3(BOOST_PP_ITERATION_FINISH_3_DIGIT_3, BOOST_PP_ITERATION_FINISH_3_DIGIT_2, BOOST_PP_ITERATION_FINISH_3_DIGIT_1) # elif BOOST_PP_ITERATION_FINISH_3_DIGIT_2 # define BOOST_PP_ITERATION_FINISH_3 BOOST_PP_SLOT_CC_2(BOOST_PP_ITERATION_FINISH_3_DIGIT_2, BOOST_PP_ITERATION_FINISH_3_DIGIT_1) # else # define BOOST_PP_ITERATION_FINISH_3 BOOST_PP_ITERATION_FINISH_3_DIGIT_1 # endif ================================================ FILE: benchmarks/boost/preprocessor/iteration/detail/bounds/upper4.hpp ================================================ # /* ************************************************************************** # * * # * (C) Copyright Paul Mensonides 2002. # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # * * # ************************************************************************** */ # # /* See http://www.boost.org for most recent version. */ # # include # # undef BOOST_PP_ITERATION_FINISH_4 # # undef BOOST_PP_ITERATION_FINISH_4_DIGIT_1 # undef BOOST_PP_ITERATION_FINISH_4_DIGIT_2 # undef BOOST_PP_ITERATION_FINISH_4_DIGIT_3 # undef BOOST_PP_ITERATION_FINISH_4_DIGIT_4 # undef BOOST_PP_ITERATION_FINISH_4_DIGIT_5 # undef BOOST_PP_ITERATION_FINISH_4_DIGIT_6 # undef BOOST_PP_ITERATION_FINISH_4_DIGIT_7 # undef BOOST_PP_ITERATION_FINISH_4_DIGIT_8 # undef BOOST_PP_ITERATION_FINISH_4_DIGIT_9 # undef BOOST_PP_ITERATION_FINISH_4_DIGIT_10 # # if BOOST_PP_SLOT_TEMP_3 == 0 # define BOOST_PP_ITERATION_FINISH_4_DIGIT_3 0 # elif BOOST_PP_SLOT_TEMP_3 == 1 # define BOOST_PP_ITERATION_FINISH_4_DIGIT_3 1 # elif BOOST_PP_SLOT_TEMP_3 == 2 # define BOOST_PP_ITERATION_FINISH_4_DIGIT_3 2 # elif BOOST_PP_SLOT_TEMP_3 == 3 # define BOOST_PP_ITERATION_FINISH_4_DIGIT_3 3 # elif BOOST_PP_SLOT_TEMP_3 == 4 # define BOOST_PP_ITERATION_FINISH_4_DIGIT_3 4 # elif BOOST_PP_SLOT_TEMP_3 == 5 # define BOOST_PP_ITERATION_FINISH_4_DIGIT_3 5 # elif BOOST_PP_SLOT_TEMP_3 == 6 # define BOOST_PP_ITERATION_FINISH_4_DIGIT_3 6 # elif BOOST_PP_SLOT_TEMP_3 == 7 # define BOOST_PP_ITERATION_FINISH_4_DIGIT_3 7 # elif BOOST_PP_SLOT_TEMP_3 == 8 # define BOOST_PP_ITERATION_FINISH_4_DIGIT_3 8 # elif BOOST_PP_SLOT_TEMP_3 == 9 # define BOOST_PP_ITERATION_FINISH_4_DIGIT_3 9 # endif # # if BOOST_PP_SLOT_TEMP_2 == 0 # define BOOST_PP_ITERATION_FINISH_4_DIGIT_2 0 # elif BOOST_PP_SLOT_TEMP_2 == 1 # define BOOST_PP_ITERATION_FINISH_4_DIGIT_2 1 # elif BOOST_PP_SLOT_TEMP_2 == 2 # define BOOST_PP_ITERATION_FINISH_4_DIGIT_2 2 # elif BOOST_PP_SLOT_TEMP_2 == 3 # define BOOST_PP_ITERATION_FINISH_4_DIGIT_2 3 # elif BOOST_PP_SLOT_TEMP_2 == 4 # define BOOST_PP_ITERATION_FINISH_4_DIGIT_2 4 # elif BOOST_PP_SLOT_TEMP_2 == 5 # define BOOST_PP_ITERATION_FINISH_4_DIGIT_2 5 # elif BOOST_PP_SLOT_TEMP_2 == 6 # define BOOST_PP_ITERATION_FINISH_4_DIGIT_2 6 # elif BOOST_PP_SLOT_TEMP_2 == 7 # define BOOST_PP_ITERATION_FINISH_4_DIGIT_2 7 # elif BOOST_PP_SLOT_TEMP_2 == 8 # define BOOST_PP_ITERATION_FINISH_4_DIGIT_2 8 # elif BOOST_PP_SLOT_TEMP_2 == 9 # define BOOST_PP_ITERATION_FINISH_4_DIGIT_2 9 # endif # # if BOOST_PP_SLOT_TEMP_1 == 0 # define BOOST_PP_ITERATION_FINISH_4_DIGIT_1 0 # elif BOOST_PP_SLOT_TEMP_1 == 1 # define BOOST_PP_ITERATION_FINISH_4_DIGIT_1 1 # elif BOOST_PP_SLOT_TEMP_1 == 2 # define BOOST_PP_ITERATION_FINISH_4_DIGIT_1 2 # elif BOOST_PP_SLOT_TEMP_1 == 3 # define BOOST_PP_ITERATION_FINISH_4_DIGIT_1 3 # elif BOOST_PP_SLOT_TEMP_1 == 4 # define BOOST_PP_ITERATION_FINISH_4_DIGIT_1 4 # elif BOOST_PP_SLOT_TEMP_1 == 5 # define BOOST_PP_ITERATION_FINISH_4_DIGIT_1 5 # elif BOOST_PP_SLOT_TEMP_1 == 6 # define BOOST_PP_ITERATION_FINISH_4_DIGIT_1 6 # elif BOOST_PP_SLOT_TEMP_1 == 7 # define BOOST_PP_ITERATION_FINISH_4_DIGIT_1 7 # elif BOOST_PP_SLOT_TEMP_1 == 8 # define BOOST_PP_ITERATION_FINISH_4_DIGIT_1 8 # elif BOOST_PP_SLOT_TEMP_1 == 9 # define BOOST_PP_ITERATION_FINISH_4_DIGIT_1 9 # endif # # if BOOST_PP_ITERATION_FINISH_4_DIGIT_3 # define BOOST_PP_ITERATION_FINISH_4 BOOST_PP_SLOT_CC_3(BOOST_PP_ITERATION_FINISH_4_DIGIT_3, BOOST_PP_ITERATION_FINISH_4_DIGIT_2, BOOST_PP_ITERATION_FINISH_4_DIGIT_1) # elif BOOST_PP_ITERATION_FINISH_4_DIGIT_2 # define BOOST_PP_ITERATION_FINISH_4 BOOST_PP_SLOT_CC_2(BOOST_PP_ITERATION_FINISH_4_DIGIT_2, BOOST_PP_ITERATION_FINISH_4_DIGIT_1) # else # define BOOST_PP_ITERATION_FINISH_4 BOOST_PP_ITERATION_FINISH_4_DIGIT_1 # endif ================================================ FILE: benchmarks/boost/preprocessor/iteration/detail/bounds/upper5.hpp ================================================ # /* ************************************************************************** # * * # * (C) Copyright Paul Mensonides 2002. # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # * * # ************************************************************************** */ # # /* See http://www.boost.org for most recent version. */ # # include # # undef BOOST_PP_ITERATION_FINISH_5 # # undef BOOST_PP_ITERATION_FINISH_5_DIGIT_1 # undef BOOST_PP_ITERATION_FINISH_5_DIGIT_2 # undef BOOST_PP_ITERATION_FINISH_5_DIGIT_3 # undef BOOST_PP_ITERATION_FINISH_5_DIGIT_4 # undef BOOST_PP_ITERATION_FINISH_5_DIGIT_5 # undef BOOST_PP_ITERATION_FINISH_5_DIGIT_6 # undef BOOST_PP_ITERATION_FINISH_5_DIGIT_7 # undef BOOST_PP_ITERATION_FINISH_5_DIGIT_8 # undef BOOST_PP_ITERATION_FINISH_5_DIGIT_9 # undef BOOST_PP_ITERATION_FINISH_5_DIGIT_10 # # if BOOST_PP_SLOT_TEMP_3 == 0 # define BOOST_PP_ITERATION_FINISH_5_DIGIT_3 0 # elif BOOST_PP_SLOT_TEMP_3 == 1 # define BOOST_PP_ITERATION_FINISH_5_DIGIT_3 1 # elif BOOST_PP_SLOT_TEMP_3 == 2 # define BOOST_PP_ITERATION_FINISH_5_DIGIT_3 2 # elif BOOST_PP_SLOT_TEMP_3 == 3 # define BOOST_PP_ITERATION_FINISH_5_DIGIT_3 3 # elif BOOST_PP_SLOT_TEMP_3 == 4 # define BOOST_PP_ITERATION_FINISH_5_DIGIT_3 4 # elif BOOST_PP_SLOT_TEMP_3 == 5 # define BOOST_PP_ITERATION_FINISH_5_DIGIT_3 5 # elif BOOST_PP_SLOT_TEMP_3 == 6 # define BOOST_PP_ITERATION_FINISH_5_DIGIT_3 6 # elif BOOST_PP_SLOT_TEMP_3 == 7 # define BOOST_PP_ITERATION_FINISH_5_DIGIT_3 7 # elif BOOST_PP_SLOT_TEMP_3 == 8 # define BOOST_PP_ITERATION_FINISH_5_DIGIT_3 8 # elif BOOST_PP_SLOT_TEMP_3 == 9 # define BOOST_PP_ITERATION_FINISH_5_DIGIT_3 9 # endif # # if BOOST_PP_SLOT_TEMP_2 == 0 # define BOOST_PP_ITERATION_FINISH_5_DIGIT_2 0 # elif BOOST_PP_SLOT_TEMP_2 == 1 # define BOOST_PP_ITERATION_FINISH_5_DIGIT_2 1 # elif BOOST_PP_SLOT_TEMP_2 == 2 # define BOOST_PP_ITERATION_FINISH_5_DIGIT_2 2 # elif BOOST_PP_SLOT_TEMP_2 == 3 # define BOOST_PP_ITERATION_FINISH_5_DIGIT_2 3 # elif BOOST_PP_SLOT_TEMP_2 == 4 # define BOOST_PP_ITERATION_FINISH_5_DIGIT_2 4 # elif BOOST_PP_SLOT_TEMP_2 == 5 # define BOOST_PP_ITERATION_FINISH_5_DIGIT_2 5 # elif BOOST_PP_SLOT_TEMP_2 == 6 # define BOOST_PP_ITERATION_FINISH_5_DIGIT_2 6 # elif BOOST_PP_SLOT_TEMP_2 == 7 # define BOOST_PP_ITERATION_FINISH_5_DIGIT_2 7 # elif BOOST_PP_SLOT_TEMP_2 == 8 # define BOOST_PP_ITERATION_FINISH_5_DIGIT_2 8 # elif BOOST_PP_SLOT_TEMP_2 == 9 # define BOOST_PP_ITERATION_FINISH_5_DIGIT_2 9 # endif # # if BOOST_PP_SLOT_TEMP_1 == 0 # define BOOST_PP_ITERATION_FINISH_5_DIGIT_1 0 # elif BOOST_PP_SLOT_TEMP_1 == 1 # define BOOST_PP_ITERATION_FINISH_5_DIGIT_1 1 # elif BOOST_PP_SLOT_TEMP_1 == 2 # define BOOST_PP_ITERATION_FINISH_5_DIGIT_1 2 # elif BOOST_PP_SLOT_TEMP_1 == 3 # define BOOST_PP_ITERATION_FINISH_5_DIGIT_1 3 # elif BOOST_PP_SLOT_TEMP_1 == 4 # define BOOST_PP_ITERATION_FINISH_5_DIGIT_1 4 # elif BOOST_PP_SLOT_TEMP_1 == 5 # define BOOST_PP_ITERATION_FINISH_5_DIGIT_1 5 # elif BOOST_PP_SLOT_TEMP_1 == 6 # define BOOST_PP_ITERATION_FINISH_5_DIGIT_1 6 # elif BOOST_PP_SLOT_TEMP_1 == 7 # define BOOST_PP_ITERATION_FINISH_5_DIGIT_1 7 # elif BOOST_PP_SLOT_TEMP_1 == 8 # define BOOST_PP_ITERATION_FINISH_5_DIGIT_1 8 # elif BOOST_PP_SLOT_TEMP_1 == 9 # define BOOST_PP_ITERATION_FINISH_5_DIGIT_1 9 # endif # # if BOOST_PP_ITERATION_FINISH_5_DIGIT_3 # define BOOST_PP_ITERATION_FINISH_5 BOOST_PP_SLOT_CC_3(BOOST_PP_ITERATION_FINISH_5_DIGIT_3, BOOST_PP_ITERATION_FINISH_5_DIGIT_2, BOOST_PP_ITERATION_FINISH_5_DIGIT_1) # elif BOOST_PP_ITERATION_FINISH_5_DIGIT_2 # define BOOST_PP_ITERATION_FINISH_5 BOOST_PP_SLOT_CC_2(BOOST_PP_ITERATION_FINISH_5_DIGIT_2, BOOST_PP_ITERATION_FINISH_5_DIGIT_1) # else # define BOOST_PP_ITERATION_FINISH_5 BOOST_PP_ITERATION_FINISH_5_DIGIT_1 # endif ================================================ FILE: benchmarks/boost/preprocessor/iteration/detail/finish.hpp ================================================ # /* ************************************************************************** # * * # * (C) Copyright Paul Mensonides 2002. # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # * * # ************************************************************************** */ # # /* See http://www.boost.org for most recent version. */ # # include # # undef BOOST_PP_LOCAL_FE # # undef BOOST_PP_LOCAL_FE_DIGIT_1 # undef BOOST_PP_LOCAL_FE_DIGIT_2 # undef BOOST_PP_LOCAL_FE_DIGIT_3 # undef BOOST_PP_LOCAL_FE_DIGIT_4 # undef BOOST_PP_LOCAL_FE_DIGIT_5 # undef BOOST_PP_LOCAL_FE_DIGIT_6 # undef BOOST_PP_LOCAL_FE_DIGIT_7 # undef BOOST_PP_LOCAL_FE_DIGIT_8 # undef BOOST_PP_LOCAL_FE_DIGIT_9 # undef BOOST_PP_LOCAL_FE_DIGIT_10 # # if BOOST_PP_SLOT_TEMP_3 == 0 # define BOOST_PP_LOCAL_FE_DIGIT_3 0 # elif BOOST_PP_SLOT_TEMP_3 == 1 # define BOOST_PP_LOCAL_FE_DIGIT_3 1 # elif BOOST_PP_SLOT_TEMP_3 == 2 # define BOOST_PP_LOCAL_FE_DIGIT_3 2 # elif BOOST_PP_SLOT_TEMP_3 == 3 # define BOOST_PP_LOCAL_FE_DIGIT_3 3 # elif BOOST_PP_SLOT_TEMP_3 == 4 # define BOOST_PP_LOCAL_FE_DIGIT_3 4 # elif BOOST_PP_SLOT_TEMP_3 == 5 # define BOOST_PP_LOCAL_FE_DIGIT_3 5 # elif BOOST_PP_SLOT_TEMP_3 == 6 # define BOOST_PP_LOCAL_FE_DIGIT_3 6 # elif BOOST_PP_SLOT_TEMP_3 == 7 # define BOOST_PP_LOCAL_FE_DIGIT_3 7 # elif BOOST_PP_SLOT_TEMP_3 == 8 # define BOOST_PP_LOCAL_FE_DIGIT_3 8 # elif BOOST_PP_SLOT_TEMP_3 == 9 # define BOOST_PP_LOCAL_FE_DIGIT_3 9 # endif # # if BOOST_PP_SLOT_TEMP_2 == 0 # define BOOST_PP_LOCAL_FE_DIGIT_2 0 # elif BOOST_PP_SLOT_TEMP_2 == 1 # define BOOST_PP_LOCAL_FE_DIGIT_2 1 # elif BOOST_PP_SLOT_TEMP_2 == 2 # define BOOST_PP_LOCAL_FE_DIGIT_2 2 # elif BOOST_PP_SLOT_TEMP_2 == 3 # define BOOST_PP_LOCAL_FE_DIGIT_2 3 # elif BOOST_PP_SLOT_TEMP_2 == 4 # define BOOST_PP_LOCAL_FE_DIGIT_2 4 # elif BOOST_PP_SLOT_TEMP_2 == 5 # define BOOST_PP_LOCAL_FE_DIGIT_2 5 # elif BOOST_PP_SLOT_TEMP_2 == 6 # define BOOST_PP_LOCAL_FE_DIGIT_2 6 # elif BOOST_PP_SLOT_TEMP_2 == 7 # define BOOST_PP_LOCAL_FE_DIGIT_2 7 # elif BOOST_PP_SLOT_TEMP_2 == 8 # define BOOST_PP_LOCAL_FE_DIGIT_2 8 # elif BOOST_PP_SLOT_TEMP_2 == 9 # define BOOST_PP_LOCAL_FE_DIGIT_2 9 # endif # # if BOOST_PP_SLOT_TEMP_1 == 0 # define BOOST_PP_LOCAL_FE_DIGIT_1 0 # elif BOOST_PP_SLOT_TEMP_1 == 1 # define BOOST_PP_LOCAL_FE_DIGIT_1 1 # elif BOOST_PP_SLOT_TEMP_1 == 2 # define BOOST_PP_LOCAL_FE_DIGIT_1 2 # elif BOOST_PP_SLOT_TEMP_1 == 3 # define BOOST_PP_LOCAL_FE_DIGIT_1 3 # elif BOOST_PP_SLOT_TEMP_1 == 4 # define BOOST_PP_LOCAL_FE_DIGIT_1 4 # elif BOOST_PP_SLOT_TEMP_1 == 5 # define BOOST_PP_LOCAL_FE_DIGIT_1 5 # elif BOOST_PP_SLOT_TEMP_1 == 6 # define BOOST_PP_LOCAL_FE_DIGIT_1 6 # elif BOOST_PP_SLOT_TEMP_1 == 7 # define BOOST_PP_LOCAL_FE_DIGIT_1 7 # elif BOOST_PP_SLOT_TEMP_1 == 8 # define BOOST_PP_LOCAL_FE_DIGIT_1 8 # elif BOOST_PP_SLOT_TEMP_1 == 9 # define BOOST_PP_LOCAL_FE_DIGIT_1 9 # endif # # if BOOST_PP_LOCAL_FE_DIGIT_3 # define BOOST_PP_LOCAL_FE() BOOST_PP_SLOT_CC_3(BOOST_PP_LOCAL_FE_DIGIT_3, BOOST_PP_LOCAL_FE_DIGIT_2, BOOST_PP_LOCAL_FE_DIGIT_1) # elif BOOST_PP_LOCAL_FE_DIGIT_2 # define BOOST_PP_LOCAL_FE() BOOST_PP_SLOT_CC_2(BOOST_PP_LOCAL_FE_DIGIT_2, BOOST_PP_LOCAL_FE_DIGIT_1) # else # define BOOST_PP_LOCAL_FE() BOOST_PP_LOCAL_FE_DIGIT_1 # endif ================================================ FILE: benchmarks/boost/preprocessor/iteration/detail/iter/forward1.hpp ================================================ # /* ************************************************************************** # * * # * (C) Copyright Paul Mensonides 2002. # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # * * # ************************************************************************** */ # # /* See http://www.boost.org for most recent version. */ # # if defined(BOOST_PP_ITERATION_LIMITS) # if !defined(BOOST_PP_FILENAME_1) # error BOOST_PP_ERROR: depth #1 filename is not defined # endif # define BOOST_PP_VALUE BOOST_PP_TUPLE_ELEM(2, 0, BOOST_PP_ITERATION_LIMITS) # include # define BOOST_PP_VALUE BOOST_PP_TUPLE_ELEM(2, 1, BOOST_PP_ITERATION_LIMITS) # include # define BOOST_PP_ITERATION_FLAGS_1() 0 # undef BOOST_PP_ITERATION_LIMITS # elif defined(BOOST_PP_ITERATION_PARAMS_1) # define BOOST_PP_VALUE BOOST_PP_ARRAY_ELEM(0, BOOST_PP_ITERATION_PARAMS_1) # include # define BOOST_PP_VALUE BOOST_PP_ARRAY_ELEM(1, BOOST_PP_ITERATION_PARAMS_1) # include # define BOOST_PP_FILENAME_1 BOOST_PP_ARRAY_ELEM(2, BOOST_PP_ITERATION_PARAMS_1) # if BOOST_PP_ARRAY_SIZE(BOOST_PP_ITERATION_PARAMS_1) >= 4 # define BOOST_PP_ITERATION_FLAGS_1() BOOST_PP_ARRAY_ELEM(3, BOOST_PP_ITERATION_PARAMS_1) # else # define BOOST_PP_ITERATION_FLAGS_1() 0 # endif # else # error BOOST_PP_ERROR: depth #1 iteration boundaries or filename not defined # endif # # undef BOOST_PP_ITERATION_DEPTH # define BOOST_PP_ITERATION_DEPTH() 1 # # define BOOST_PP_IS_ITERATING 1 # # if (BOOST_PP_ITERATION_START_1) > (BOOST_PP_ITERATION_FINISH_1) # include # else # if BOOST_PP_ITERATION_START_1 <= 0 && BOOST_PP_ITERATION_FINISH_1 >= 0 # define BOOST_PP_ITERATION_1 0 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 1 && BOOST_PP_ITERATION_FINISH_1 >= 1 # define BOOST_PP_ITERATION_1 1 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 2 && BOOST_PP_ITERATION_FINISH_1 >= 2 # define BOOST_PP_ITERATION_1 2 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 3 && BOOST_PP_ITERATION_FINISH_1 >= 3 # define BOOST_PP_ITERATION_1 3 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 4 && BOOST_PP_ITERATION_FINISH_1 >= 4 # define BOOST_PP_ITERATION_1 4 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 5 && BOOST_PP_ITERATION_FINISH_1 >= 5 # define BOOST_PP_ITERATION_1 5 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 6 && BOOST_PP_ITERATION_FINISH_1 >= 6 # define BOOST_PP_ITERATION_1 6 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 7 && BOOST_PP_ITERATION_FINISH_1 >= 7 # define BOOST_PP_ITERATION_1 7 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 8 && BOOST_PP_ITERATION_FINISH_1 >= 8 # define BOOST_PP_ITERATION_1 8 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 9 && BOOST_PP_ITERATION_FINISH_1 >= 9 # define BOOST_PP_ITERATION_1 9 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 10 && BOOST_PP_ITERATION_FINISH_1 >= 10 # define BOOST_PP_ITERATION_1 10 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 11 && BOOST_PP_ITERATION_FINISH_1 >= 11 # define BOOST_PP_ITERATION_1 11 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 12 && BOOST_PP_ITERATION_FINISH_1 >= 12 # define BOOST_PP_ITERATION_1 12 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 13 && BOOST_PP_ITERATION_FINISH_1 >= 13 # define BOOST_PP_ITERATION_1 13 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 14 && BOOST_PP_ITERATION_FINISH_1 >= 14 # define BOOST_PP_ITERATION_1 14 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 15 && BOOST_PP_ITERATION_FINISH_1 >= 15 # define BOOST_PP_ITERATION_1 15 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 16 && BOOST_PP_ITERATION_FINISH_1 >= 16 # define BOOST_PP_ITERATION_1 16 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 17 && BOOST_PP_ITERATION_FINISH_1 >= 17 # define BOOST_PP_ITERATION_1 17 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 18 && BOOST_PP_ITERATION_FINISH_1 >= 18 # define BOOST_PP_ITERATION_1 18 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 19 && BOOST_PP_ITERATION_FINISH_1 >= 19 # define BOOST_PP_ITERATION_1 19 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 20 && BOOST_PP_ITERATION_FINISH_1 >= 20 # define BOOST_PP_ITERATION_1 20 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 21 && BOOST_PP_ITERATION_FINISH_1 >= 21 # define BOOST_PP_ITERATION_1 21 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 22 && BOOST_PP_ITERATION_FINISH_1 >= 22 # define BOOST_PP_ITERATION_1 22 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 23 && BOOST_PP_ITERATION_FINISH_1 >= 23 # define BOOST_PP_ITERATION_1 23 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 24 && BOOST_PP_ITERATION_FINISH_1 >= 24 # define BOOST_PP_ITERATION_1 24 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 25 && BOOST_PP_ITERATION_FINISH_1 >= 25 # define BOOST_PP_ITERATION_1 25 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 26 && BOOST_PP_ITERATION_FINISH_1 >= 26 # define BOOST_PP_ITERATION_1 26 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 27 && BOOST_PP_ITERATION_FINISH_1 >= 27 # define BOOST_PP_ITERATION_1 27 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 28 && BOOST_PP_ITERATION_FINISH_1 >= 28 # define BOOST_PP_ITERATION_1 28 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 29 && BOOST_PP_ITERATION_FINISH_1 >= 29 # define BOOST_PP_ITERATION_1 29 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 30 && BOOST_PP_ITERATION_FINISH_1 >= 30 # define BOOST_PP_ITERATION_1 30 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 31 && BOOST_PP_ITERATION_FINISH_1 >= 31 # define BOOST_PP_ITERATION_1 31 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 32 && BOOST_PP_ITERATION_FINISH_1 >= 32 # define BOOST_PP_ITERATION_1 32 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 33 && BOOST_PP_ITERATION_FINISH_1 >= 33 # define BOOST_PP_ITERATION_1 33 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 34 && BOOST_PP_ITERATION_FINISH_1 >= 34 # define BOOST_PP_ITERATION_1 34 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 35 && BOOST_PP_ITERATION_FINISH_1 >= 35 # define BOOST_PP_ITERATION_1 35 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 36 && BOOST_PP_ITERATION_FINISH_1 >= 36 # define BOOST_PP_ITERATION_1 36 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 37 && BOOST_PP_ITERATION_FINISH_1 >= 37 # define BOOST_PP_ITERATION_1 37 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 38 && BOOST_PP_ITERATION_FINISH_1 >= 38 # define BOOST_PP_ITERATION_1 38 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 39 && BOOST_PP_ITERATION_FINISH_1 >= 39 # define BOOST_PP_ITERATION_1 39 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 40 && BOOST_PP_ITERATION_FINISH_1 >= 40 # define BOOST_PP_ITERATION_1 40 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 41 && BOOST_PP_ITERATION_FINISH_1 >= 41 # define BOOST_PP_ITERATION_1 41 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 42 && BOOST_PP_ITERATION_FINISH_1 >= 42 # define BOOST_PP_ITERATION_1 42 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 43 && BOOST_PP_ITERATION_FINISH_1 >= 43 # define BOOST_PP_ITERATION_1 43 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 44 && BOOST_PP_ITERATION_FINISH_1 >= 44 # define BOOST_PP_ITERATION_1 44 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 45 && BOOST_PP_ITERATION_FINISH_1 >= 45 # define BOOST_PP_ITERATION_1 45 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 46 && BOOST_PP_ITERATION_FINISH_1 >= 46 # define BOOST_PP_ITERATION_1 46 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 47 && BOOST_PP_ITERATION_FINISH_1 >= 47 # define BOOST_PP_ITERATION_1 47 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 48 && BOOST_PP_ITERATION_FINISH_1 >= 48 # define BOOST_PP_ITERATION_1 48 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 49 && BOOST_PP_ITERATION_FINISH_1 >= 49 # define BOOST_PP_ITERATION_1 49 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 50 && BOOST_PP_ITERATION_FINISH_1 >= 50 # define BOOST_PP_ITERATION_1 50 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 51 && BOOST_PP_ITERATION_FINISH_1 >= 51 # define BOOST_PP_ITERATION_1 51 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 52 && BOOST_PP_ITERATION_FINISH_1 >= 52 # define BOOST_PP_ITERATION_1 52 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 53 && BOOST_PP_ITERATION_FINISH_1 >= 53 # define BOOST_PP_ITERATION_1 53 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 54 && BOOST_PP_ITERATION_FINISH_1 >= 54 # define BOOST_PP_ITERATION_1 54 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 55 && BOOST_PP_ITERATION_FINISH_1 >= 55 # define BOOST_PP_ITERATION_1 55 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 56 && BOOST_PP_ITERATION_FINISH_1 >= 56 # define BOOST_PP_ITERATION_1 56 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 57 && BOOST_PP_ITERATION_FINISH_1 >= 57 # define BOOST_PP_ITERATION_1 57 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 58 && BOOST_PP_ITERATION_FINISH_1 >= 58 # define BOOST_PP_ITERATION_1 58 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 59 && BOOST_PP_ITERATION_FINISH_1 >= 59 # define BOOST_PP_ITERATION_1 59 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 60 && BOOST_PP_ITERATION_FINISH_1 >= 60 # define BOOST_PP_ITERATION_1 60 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 61 && BOOST_PP_ITERATION_FINISH_1 >= 61 # define BOOST_PP_ITERATION_1 61 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 62 && BOOST_PP_ITERATION_FINISH_1 >= 62 # define BOOST_PP_ITERATION_1 62 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 63 && BOOST_PP_ITERATION_FINISH_1 >= 63 # define BOOST_PP_ITERATION_1 63 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 64 && BOOST_PP_ITERATION_FINISH_1 >= 64 # define BOOST_PP_ITERATION_1 64 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 65 && BOOST_PP_ITERATION_FINISH_1 >= 65 # define BOOST_PP_ITERATION_1 65 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 66 && BOOST_PP_ITERATION_FINISH_1 >= 66 # define BOOST_PP_ITERATION_1 66 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 67 && BOOST_PP_ITERATION_FINISH_1 >= 67 # define BOOST_PP_ITERATION_1 67 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 68 && BOOST_PP_ITERATION_FINISH_1 >= 68 # define BOOST_PP_ITERATION_1 68 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 69 && BOOST_PP_ITERATION_FINISH_1 >= 69 # define BOOST_PP_ITERATION_1 69 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 70 && BOOST_PP_ITERATION_FINISH_1 >= 70 # define BOOST_PP_ITERATION_1 70 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 71 && BOOST_PP_ITERATION_FINISH_1 >= 71 # define BOOST_PP_ITERATION_1 71 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 72 && BOOST_PP_ITERATION_FINISH_1 >= 72 # define BOOST_PP_ITERATION_1 72 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 73 && BOOST_PP_ITERATION_FINISH_1 >= 73 # define BOOST_PP_ITERATION_1 73 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 74 && BOOST_PP_ITERATION_FINISH_1 >= 74 # define BOOST_PP_ITERATION_1 74 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 75 && BOOST_PP_ITERATION_FINISH_1 >= 75 # define BOOST_PP_ITERATION_1 75 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 76 && BOOST_PP_ITERATION_FINISH_1 >= 76 # define BOOST_PP_ITERATION_1 76 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 77 && BOOST_PP_ITERATION_FINISH_1 >= 77 # define BOOST_PP_ITERATION_1 77 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 78 && BOOST_PP_ITERATION_FINISH_1 >= 78 # define BOOST_PP_ITERATION_1 78 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 79 && BOOST_PP_ITERATION_FINISH_1 >= 79 # define BOOST_PP_ITERATION_1 79 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 80 && BOOST_PP_ITERATION_FINISH_1 >= 80 # define BOOST_PP_ITERATION_1 80 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 81 && BOOST_PP_ITERATION_FINISH_1 >= 81 # define BOOST_PP_ITERATION_1 81 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 82 && BOOST_PP_ITERATION_FINISH_1 >= 82 # define BOOST_PP_ITERATION_1 82 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 83 && BOOST_PP_ITERATION_FINISH_1 >= 83 # define BOOST_PP_ITERATION_1 83 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 84 && BOOST_PP_ITERATION_FINISH_1 >= 84 # define BOOST_PP_ITERATION_1 84 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 85 && BOOST_PP_ITERATION_FINISH_1 >= 85 # define BOOST_PP_ITERATION_1 85 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 86 && BOOST_PP_ITERATION_FINISH_1 >= 86 # define BOOST_PP_ITERATION_1 86 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 87 && BOOST_PP_ITERATION_FINISH_1 >= 87 # define BOOST_PP_ITERATION_1 87 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 88 && BOOST_PP_ITERATION_FINISH_1 >= 88 # define BOOST_PP_ITERATION_1 88 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 89 && BOOST_PP_ITERATION_FINISH_1 >= 89 # define BOOST_PP_ITERATION_1 89 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 90 && BOOST_PP_ITERATION_FINISH_1 >= 90 # define BOOST_PP_ITERATION_1 90 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 91 && BOOST_PP_ITERATION_FINISH_1 >= 91 # define BOOST_PP_ITERATION_1 91 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 92 && BOOST_PP_ITERATION_FINISH_1 >= 92 # define BOOST_PP_ITERATION_1 92 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 93 && BOOST_PP_ITERATION_FINISH_1 >= 93 # define BOOST_PP_ITERATION_1 93 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 94 && BOOST_PP_ITERATION_FINISH_1 >= 94 # define BOOST_PP_ITERATION_1 94 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 95 && BOOST_PP_ITERATION_FINISH_1 >= 95 # define BOOST_PP_ITERATION_1 95 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 96 && BOOST_PP_ITERATION_FINISH_1 >= 96 # define BOOST_PP_ITERATION_1 96 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 97 && BOOST_PP_ITERATION_FINISH_1 >= 97 # define BOOST_PP_ITERATION_1 97 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 98 && BOOST_PP_ITERATION_FINISH_1 >= 98 # define BOOST_PP_ITERATION_1 98 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 99 && BOOST_PP_ITERATION_FINISH_1 >= 99 # define BOOST_PP_ITERATION_1 99 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 100 && BOOST_PP_ITERATION_FINISH_1 >= 100 # define BOOST_PP_ITERATION_1 100 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 101 && BOOST_PP_ITERATION_FINISH_1 >= 101 # define BOOST_PP_ITERATION_1 101 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 102 && BOOST_PP_ITERATION_FINISH_1 >= 102 # define BOOST_PP_ITERATION_1 102 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 103 && BOOST_PP_ITERATION_FINISH_1 >= 103 # define BOOST_PP_ITERATION_1 103 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 104 && BOOST_PP_ITERATION_FINISH_1 >= 104 # define BOOST_PP_ITERATION_1 104 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 105 && BOOST_PP_ITERATION_FINISH_1 >= 105 # define BOOST_PP_ITERATION_1 105 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 106 && BOOST_PP_ITERATION_FINISH_1 >= 106 # define BOOST_PP_ITERATION_1 106 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 107 && BOOST_PP_ITERATION_FINISH_1 >= 107 # define BOOST_PP_ITERATION_1 107 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 108 && BOOST_PP_ITERATION_FINISH_1 >= 108 # define BOOST_PP_ITERATION_1 108 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 109 && BOOST_PP_ITERATION_FINISH_1 >= 109 # define BOOST_PP_ITERATION_1 109 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 110 && BOOST_PP_ITERATION_FINISH_1 >= 110 # define BOOST_PP_ITERATION_1 110 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 111 && BOOST_PP_ITERATION_FINISH_1 >= 111 # define BOOST_PP_ITERATION_1 111 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 112 && BOOST_PP_ITERATION_FINISH_1 >= 112 # define BOOST_PP_ITERATION_1 112 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 113 && BOOST_PP_ITERATION_FINISH_1 >= 113 # define BOOST_PP_ITERATION_1 113 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 114 && BOOST_PP_ITERATION_FINISH_1 >= 114 # define BOOST_PP_ITERATION_1 114 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 115 && BOOST_PP_ITERATION_FINISH_1 >= 115 # define BOOST_PP_ITERATION_1 115 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 116 && BOOST_PP_ITERATION_FINISH_1 >= 116 # define BOOST_PP_ITERATION_1 116 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 117 && BOOST_PP_ITERATION_FINISH_1 >= 117 # define BOOST_PP_ITERATION_1 117 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 118 && BOOST_PP_ITERATION_FINISH_1 >= 118 # define BOOST_PP_ITERATION_1 118 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 119 && BOOST_PP_ITERATION_FINISH_1 >= 119 # define BOOST_PP_ITERATION_1 119 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 120 && BOOST_PP_ITERATION_FINISH_1 >= 120 # define BOOST_PP_ITERATION_1 120 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 121 && BOOST_PP_ITERATION_FINISH_1 >= 121 # define BOOST_PP_ITERATION_1 121 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 122 && BOOST_PP_ITERATION_FINISH_1 >= 122 # define BOOST_PP_ITERATION_1 122 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 123 && BOOST_PP_ITERATION_FINISH_1 >= 123 # define BOOST_PP_ITERATION_1 123 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 124 && BOOST_PP_ITERATION_FINISH_1 >= 124 # define BOOST_PP_ITERATION_1 124 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 125 && BOOST_PP_ITERATION_FINISH_1 >= 125 # define BOOST_PP_ITERATION_1 125 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 126 && BOOST_PP_ITERATION_FINISH_1 >= 126 # define BOOST_PP_ITERATION_1 126 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 127 && BOOST_PP_ITERATION_FINISH_1 >= 127 # define BOOST_PP_ITERATION_1 127 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 128 && BOOST_PP_ITERATION_FINISH_1 >= 128 # define BOOST_PP_ITERATION_1 128 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 129 && BOOST_PP_ITERATION_FINISH_1 >= 129 # define BOOST_PP_ITERATION_1 129 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 130 && BOOST_PP_ITERATION_FINISH_1 >= 130 # define BOOST_PP_ITERATION_1 130 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 131 && BOOST_PP_ITERATION_FINISH_1 >= 131 # define BOOST_PP_ITERATION_1 131 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 132 && BOOST_PP_ITERATION_FINISH_1 >= 132 # define BOOST_PP_ITERATION_1 132 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 133 && BOOST_PP_ITERATION_FINISH_1 >= 133 # define BOOST_PP_ITERATION_1 133 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 134 && BOOST_PP_ITERATION_FINISH_1 >= 134 # define BOOST_PP_ITERATION_1 134 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 135 && BOOST_PP_ITERATION_FINISH_1 >= 135 # define BOOST_PP_ITERATION_1 135 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 136 && BOOST_PP_ITERATION_FINISH_1 >= 136 # define BOOST_PP_ITERATION_1 136 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 137 && BOOST_PP_ITERATION_FINISH_1 >= 137 # define BOOST_PP_ITERATION_1 137 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 138 && BOOST_PP_ITERATION_FINISH_1 >= 138 # define BOOST_PP_ITERATION_1 138 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 139 && BOOST_PP_ITERATION_FINISH_1 >= 139 # define BOOST_PP_ITERATION_1 139 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 140 && BOOST_PP_ITERATION_FINISH_1 >= 140 # define BOOST_PP_ITERATION_1 140 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 141 && BOOST_PP_ITERATION_FINISH_1 >= 141 # define BOOST_PP_ITERATION_1 141 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 142 && BOOST_PP_ITERATION_FINISH_1 >= 142 # define BOOST_PP_ITERATION_1 142 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 143 && BOOST_PP_ITERATION_FINISH_1 >= 143 # define BOOST_PP_ITERATION_1 143 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 144 && BOOST_PP_ITERATION_FINISH_1 >= 144 # define BOOST_PP_ITERATION_1 144 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 145 && BOOST_PP_ITERATION_FINISH_1 >= 145 # define BOOST_PP_ITERATION_1 145 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 146 && BOOST_PP_ITERATION_FINISH_1 >= 146 # define BOOST_PP_ITERATION_1 146 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 147 && BOOST_PP_ITERATION_FINISH_1 >= 147 # define BOOST_PP_ITERATION_1 147 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 148 && BOOST_PP_ITERATION_FINISH_1 >= 148 # define BOOST_PP_ITERATION_1 148 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 149 && BOOST_PP_ITERATION_FINISH_1 >= 149 # define BOOST_PP_ITERATION_1 149 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 150 && BOOST_PP_ITERATION_FINISH_1 >= 150 # define BOOST_PP_ITERATION_1 150 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 151 && BOOST_PP_ITERATION_FINISH_1 >= 151 # define BOOST_PP_ITERATION_1 151 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 152 && BOOST_PP_ITERATION_FINISH_1 >= 152 # define BOOST_PP_ITERATION_1 152 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 153 && BOOST_PP_ITERATION_FINISH_1 >= 153 # define BOOST_PP_ITERATION_1 153 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 154 && BOOST_PP_ITERATION_FINISH_1 >= 154 # define BOOST_PP_ITERATION_1 154 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 155 && BOOST_PP_ITERATION_FINISH_1 >= 155 # define BOOST_PP_ITERATION_1 155 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 156 && BOOST_PP_ITERATION_FINISH_1 >= 156 # define BOOST_PP_ITERATION_1 156 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 157 && BOOST_PP_ITERATION_FINISH_1 >= 157 # define BOOST_PP_ITERATION_1 157 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 158 && BOOST_PP_ITERATION_FINISH_1 >= 158 # define BOOST_PP_ITERATION_1 158 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 159 && BOOST_PP_ITERATION_FINISH_1 >= 159 # define BOOST_PP_ITERATION_1 159 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 160 && BOOST_PP_ITERATION_FINISH_1 >= 160 # define BOOST_PP_ITERATION_1 160 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 161 && BOOST_PP_ITERATION_FINISH_1 >= 161 # define BOOST_PP_ITERATION_1 161 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 162 && BOOST_PP_ITERATION_FINISH_1 >= 162 # define BOOST_PP_ITERATION_1 162 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 163 && BOOST_PP_ITERATION_FINISH_1 >= 163 # define BOOST_PP_ITERATION_1 163 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 164 && BOOST_PP_ITERATION_FINISH_1 >= 164 # define BOOST_PP_ITERATION_1 164 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 165 && BOOST_PP_ITERATION_FINISH_1 >= 165 # define BOOST_PP_ITERATION_1 165 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 166 && BOOST_PP_ITERATION_FINISH_1 >= 166 # define BOOST_PP_ITERATION_1 166 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 167 && BOOST_PP_ITERATION_FINISH_1 >= 167 # define BOOST_PP_ITERATION_1 167 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 168 && BOOST_PP_ITERATION_FINISH_1 >= 168 # define BOOST_PP_ITERATION_1 168 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 169 && BOOST_PP_ITERATION_FINISH_1 >= 169 # define BOOST_PP_ITERATION_1 169 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 170 && BOOST_PP_ITERATION_FINISH_1 >= 170 # define BOOST_PP_ITERATION_1 170 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 171 && BOOST_PP_ITERATION_FINISH_1 >= 171 # define BOOST_PP_ITERATION_1 171 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 172 && BOOST_PP_ITERATION_FINISH_1 >= 172 # define BOOST_PP_ITERATION_1 172 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 173 && BOOST_PP_ITERATION_FINISH_1 >= 173 # define BOOST_PP_ITERATION_1 173 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 174 && BOOST_PP_ITERATION_FINISH_1 >= 174 # define BOOST_PP_ITERATION_1 174 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 175 && BOOST_PP_ITERATION_FINISH_1 >= 175 # define BOOST_PP_ITERATION_1 175 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 176 && BOOST_PP_ITERATION_FINISH_1 >= 176 # define BOOST_PP_ITERATION_1 176 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 177 && BOOST_PP_ITERATION_FINISH_1 >= 177 # define BOOST_PP_ITERATION_1 177 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 178 && BOOST_PP_ITERATION_FINISH_1 >= 178 # define BOOST_PP_ITERATION_1 178 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 179 && BOOST_PP_ITERATION_FINISH_1 >= 179 # define BOOST_PP_ITERATION_1 179 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 180 && BOOST_PP_ITERATION_FINISH_1 >= 180 # define BOOST_PP_ITERATION_1 180 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 181 && BOOST_PP_ITERATION_FINISH_1 >= 181 # define BOOST_PP_ITERATION_1 181 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 182 && BOOST_PP_ITERATION_FINISH_1 >= 182 # define BOOST_PP_ITERATION_1 182 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 183 && BOOST_PP_ITERATION_FINISH_1 >= 183 # define BOOST_PP_ITERATION_1 183 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 184 && BOOST_PP_ITERATION_FINISH_1 >= 184 # define BOOST_PP_ITERATION_1 184 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 185 && BOOST_PP_ITERATION_FINISH_1 >= 185 # define BOOST_PP_ITERATION_1 185 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 186 && BOOST_PP_ITERATION_FINISH_1 >= 186 # define BOOST_PP_ITERATION_1 186 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 187 && BOOST_PP_ITERATION_FINISH_1 >= 187 # define BOOST_PP_ITERATION_1 187 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 188 && BOOST_PP_ITERATION_FINISH_1 >= 188 # define BOOST_PP_ITERATION_1 188 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 189 && BOOST_PP_ITERATION_FINISH_1 >= 189 # define BOOST_PP_ITERATION_1 189 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 190 && BOOST_PP_ITERATION_FINISH_1 >= 190 # define BOOST_PP_ITERATION_1 190 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 191 && BOOST_PP_ITERATION_FINISH_1 >= 191 # define BOOST_PP_ITERATION_1 191 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 192 && BOOST_PP_ITERATION_FINISH_1 >= 192 # define BOOST_PP_ITERATION_1 192 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 193 && BOOST_PP_ITERATION_FINISH_1 >= 193 # define BOOST_PP_ITERATION_1 193 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 194 && BOOST_PP_ITERATION_FINISH_1 >= 194 # define BOOST_PP_ITERATION_1 194 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 195 && BOOST_PP_ITERATION_FINISH_1 >= 195 # define BOOST_PP_ITERATION_1 195 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 196 && BOOST_PP_ITERATION_FINISH_1 >= 196 # define BOOST_PP_ITERATION_1 196 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 197 && BOOST_PP_ITERATION_FINISH_1 >= 197 # define BOOST_PP_ITERATION_1 197 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 198 && BOOST_PP_ITERATION_FINISH_1 >= 198 # define BOOST_PP_ITERATION_1 198 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 199 && BOOST_PP_ITERATION_FINISH_1 >= 199 # define BOOST_PP_ITERATION_1 199 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 200 && BOOST_PP_ITERATION_FINISH_1 >= 200 # define BOOST_PP_ITERATION_1 200 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 201 && BOOST_PP_ITERATION_FINISH_1 >= 201 # define BOOST_PP_ITERATION_1 201 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 202 && BOOST_PP_ITERATION_FINISH_1 >= 202 # define BOOST_PP_ITERATION_1 202 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 203 && BOOST_PP_ITERATION_FINISH_1 >= 203 # define BOOST_PP_ITERATION_1 203 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 204 && BOOST_PP_ITERATION_FINISH_1 >= 204 # define BOOST_PP_ITERATION_1 204 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 205 && BOOST_PP_ITERATION_FINISH_1 >= 205 # define BOOST_PP_ITERATION_1 205 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 206 && BOOST_PP_ITERATION_FINISH_1 >= 206 # define BOOST_PP_ITERATION_1 206 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 207 && BOOST_PP_ITERATION_FINISH_1 >= 207 # define BOOST_PP_ITERATION_1 207 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 208 && BOOST_PP_ITERATION_FINISH_1 >= 208 # define BOOST_PP_ITERATION_1 208 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 209 && BOOST_PP_ITERATION_FINISH_1 >= 209 # define BOOST_PP_ITERATION_1 209 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 210 && BOOST_PP_ITERATION_FINISH_1 >= 210 # define BOOST_PP_ITERATION_1 210 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 211 && BOOST_PP_ITERATION_FINISH_1 >= 211 # define BOOST_PP_ITERATION_1 211 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 212 && BOOST_PP_ITERATION_FINISH_1 >= 212 # define BOOST_PP_ITERATION_1 212 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 213 && BOOST_PP_ITERATION_FINISH_1 >= 213 # define BOOST_PP_ITERATION_1 213 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 214 && BOOST_PP_ITERATION_FINISH_1 >= 214 # define BOOST_PP_ITERATION_1 214 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 215 && BOOST_PP_ITERATION_FINISH_1 >= 215 # define BOOST_PP_ITERATION_1 215 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 216 && BOOST_PP_ITERATION_FINISH_1 >= 216 # define BOOST_PP_ITERATION_1 216 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 217 && BOOST_PP_ITERATION_FINISH_1 >= 217 # define BOOST_PP_ITERATION_1 217 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 218 && BOOST_PP_ITERATION_FINISH_1 >= 218 # define BOOST_PP_ITERATION_1 218 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 219 && BOOST_PP_ITERATION_FINISH_1 >= 219 # define BOOST_PP_ITERATION_1 219 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 220 && BOOST_PP_ITERATION_FINISH_1 >= 220 # define BOOST_PP_ITERATION_1 220 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 221 && BOOST_PP_ITERATION_FINISH_1 >= 221 # define BOOST_PP_ITERATION_1 221 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 222 && BOOST_PP_ITERATION_FINISH_1 >= 222 # define BOOST_PP_ITERATION_1 222 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 223 && BOOST_PP_ITERATION_FINISH_1 >= 223 # define BOOST_PP_ITERATION_1 223 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 224 && BOOST_PP_ITERATION_FINISH_1 >= 224 # define BOOST_PP_ITERATION_1 224 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 225 && BOOST_PP_ITERATION_FINISH_1 >= 225 # define BOOST_PP_ITERATION_1 225 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 226 && BOOST_PP_ITERATION_FINISH_1 >= 226 # define BOOST_PP_ITERATION_1 226 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 227 && BOOST_PP_ITERATION_FINISH_1 >= 227 # define BOOST_PP_ITERATION_1 227 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 228 && BOOST_PP_ITERATION_FINISH_1 >= 228 # define BOOST_PP_ITERATION_1 228 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 229 && BOOST_PP_ITERATION_FINISH_1 >= 229 # define BOOST_PP_ITERATION_1 229 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 230 && BOOST_PP_ITERATION_FINISH_1 >= 230 # define BOOST_PP_ITERATION_1 230 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 231 && BOOST_PP_ITERATION_FINISH_1 >= 231 # define BOOST_PP_ITERATION_1 231 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 232 && BOOST_PP_ITERATION_FINISH_1 >= 232 # define BOOST_PP_ITERATION_1 232 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 233 && BOOST_PP_ITERATION_FINISH_1 >= 233 # define BOOST_PP_ITERATION_1 233 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 234 && BOOST_PP_ITERATION_FINISH_1 >= 234 # define BOOST_PP_ITERATION_1 234 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 235 && BOOST_PP_ITERATION_FINISH_1 >= 235 # define BOOST_PP_ITERATION_1 235 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 236 && BOOST_PP_ITERATION_FINISH_1 >= 236 # define BOOST_PP_ITERATION_1 236 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 237 && BOOST_PP_ITERATION_FINISH_1 >= 237 # define BOOST_PP_ITERATION_1 237 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 238 && BOOST_PP_ITERATION_FINISH_1 >= 238 # define BOOST_PP_ITERATION_1 238 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 239 && BOOST_PP_ITERATION_FINISH_1 >= 239 # define BOOST_PP_ITERATION_1 239 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 240 && BOOST_PP_ITERATION_FINISH_1 >= 240 # define BOOST_PP_ITERATION_1 240 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 241 && BOOST_PP_ITERATION_FINISH_1 >= 241 # define BOOST_PP_ITERATION_1 241 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 242 && BOOST_PP_ITERATION_FINISH_1 >= 242 # define BOOST_PP_ITERATION_1 242 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 243 && BOOST_PP_ITERATION_FINISH_1 >= 243 # define BOOST_PP_ITERATION_1 243 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 244 && BOOST_PP_ITERATION_FINISH_1 >= 244 # define BOOST_PP_ITERATION_1 244 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 245 && BOOST_PP_ITERATION_FINISH_1 >= 245 # define BOOST_PP_ITERATION_1 245 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 246 && BOOST_PP_ITERATION_FINISH_1 >= 246 # define BOOST_PP_ITERATION_1 246 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 247 && BOOST_PP_ITERATION_FINISH_1 >= 247 # define BOOST_PP_ITERATION_1 247 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 248 && BOOST_PP_ITERATION_FINISH_1 >= 248 # define BOOST_PP_ITERATION_1 248 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 249 && BOOST_PP_ITERATION_FINISH_1 >= 249 # define BOOST_PP_ITERATION_1 249 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 250 && BOOST_PP_ITERATION_FINISH_1 >= 250 # define BOOST_PP_ITERATION_1 250 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 251 && BOOST_PP_ITERATION_FINISH_1 >= 251 # define BOOST_PP_ITERATION_1 251 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 252 && BOOST_PP_ITERATION_FINISH_1 >= 252 # define BOOST_PP_ITERATION_1 252 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 253 && BOOST_PP_ITERATION_FINISH_1 >= 253 # define BOOST_PP_ITERATION_1 253 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 254 && BOOST_PP_ITERATION_FINISH_1 >= 254 # define BOOST_PP_ITERATION_1 254 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 255 && BOOST_PP_ITERATION_FINISH_1 >= 255 # define BOOST_PP_ITERATION_1 255 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_START_1 <= 256 && BOOST_PP_ITERATION_FINISH_1 >= 256 # define BOOST_PP_ITERATION_1 256 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # endif # # undef BOOST_PP_IS_ITERATING # # undef BOOST_PP_ITERATION_DEPTH # define BOOST_PP_ITERATION_DEPTH() 0 # # undef BOOST_PP_ITERATION_START_1 # undef BOOST_PP_ITERATION_FINISH_1 # undef BOOST_PP_FILENAME_1 # # undef BOOST_PP_ITERATION_FLAGS_1 # undef BOOST_PP_ITERATION_PARAMS_1 ================================================ FILE: benchmarks/boost/preprocessor/iteration/detail/iter/forward2.hpp ================================================ # /* ************************************************************************** # * * # * (C) Copyright Paul Mensonides 2002. # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # * * # ************************************************************************** */ # # /* See http://www.boost.org for most recent version. */ # # if defined(BOOST_PP_ITERATION_LIMITS) # if !defined(BOOST_PP_FILENAME_2) # error BOOST_PP_ERROR: depth #2 filename is not defined # endif # define BOOST_PP_VALUE BOOST_PP_TUPLE_ELEM(2, 0, BOOST_PP_ITERATION_LIMITS) # include # define BOOST_PP_VALUE BOOST_PP_TUPLE_ELEM(2, 1, BOOST_PP_ITERATION_LIMITS) # include # define BOOST_PP_ITERATION_FLAGS_2() 0 # undef BOOST_PP_ITERATION_LIMITS # elif defined(BOOST_PP_ITERATION_PARAMS_2) # define BOOST_PP_VALUE BOOST_PP_ARRAY_ELEM(0, BOOST_PP_ITERATION_PARAMS_2) # include # define BOOST_PP_VALUE BOOST_PP_ARRAY_ELEM(1, BOOST_PP_ITERATION_PARAMS_2) # include # define BOOST_PP_FILENAME_2 BOOST_PP_ARRAY_ELEM(2, BOOST_PP_ITERATION_PARAMS_2) # if BOOST_PP_ARRAY_SIZE(BOOST_PP_ITERATION_PARAMS_2) >= 4 # define BOOST_PP_ITERATION_FLAGS_2() BOOST_PP_ARRAY_ELEM(3, BOOST_PP_ITERATION_PARAMS_2) # else # define BOOST_PP_ITERATION_FLAGS_2() 0 # endif # else # error BOOST_PP_ERROR: depth #2 iteration boundaries or filename not defined # endif # # undef BOOST_PP_ITERATION_DEPTH # define BOOST_PP_ITERATION_DEPTH() 2 # # if (BOOST_PP_ITERATION_START_2) > (BOOST_PP_ITERATION_FINISH_2) # include # else # if BOOST_PP_ITERATION_START_2 <= 0 && BOOST_PP_ITERATION_FINISH_2 >= 0 # define BOOST_PP_ITERATION_2 0 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 1 && BOOST_PP_ITERATION_FINISH_2 >= 1 # define BOOST_PP_ITERATION_2 1 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 2 && BOOST_PP_ITERATION_FINISH_2 >= 2 # define BOOST_PP_ITERATION_2 2 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 3 && BOOST_PP_ITERATION_FINISH_2 >= 3 # define BOOST_PP_ITERATION_2 3 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 4 && BOOST_PP_ITERATION_FINISH_2 >= 4 # define BOOST_PP_ITERATION_2 4 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 5 && BOOST_PP_ITERATION_FINISH_2 >= 5 # define BOOST_PP_ITERATION_2 5 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 6 && BOOST_PP_ITERATION_FINISH_2 >= 6 # define BOOST_PP_ITERATION_2 6 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 7 && BOOST_PP_ITERATION_FINISH_2 >= 7 # define BOOST_PP_ITERATION_2 7 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 8 && BOOST_PP_ITERATION_FINISH_2 >= 8 # define BOOST_PP_ITERATION_2 8 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 9 && BOOST_PP_ITERATION_FINISH_2 >= 9 # define BOOST_PP_ITERATION_2 9 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 10 && BOOST_PP_ITERATION_FINISH_2 >= 10 # define BOOST_PP_ITERATION_2 10 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 11 && BOOST_PP_ITERATION_FINISH_2 >= 11 # define BOOST_PP_ITERATION_2 11 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 12 && BOOST_PP_ITERATION_FINISH_2 >= 12 # define BOOST_PP_ITERATION_2 12 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 13 && BOOST_PP_ITERATION_FINISH_2 >= 13 # define BOOST_PP_ITERATION_2 13 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 14 && BOOST_PP_ITERATION_FINISH_2 >= 14 # define BOOST_PP_ITERATION_2 14 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 15 && BOOST_PP_ITERATION_FINISH_2 >= 15 # define BOOST_PP_ITERATION_2 15 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 16 && BOOST_PP_ITERATION_FINISH_2 >= 16 # define BOOST_PP_ITERATION_2 16 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 17 && BOOST_PP_ITERATION_FINISH_2 >= 17 # define BOOST_PP_ITERATION_2 17 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 18 && BOOST_PP_ITERATION_FINISH_2 >= 18 # define BOOST_PP_ITERATION_2 18 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 19 && BOOST_PP_ITERATION_FINISH_2 >= 19 # define BOOST_PP_ITERATION_2 19 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 20 && BOOST_PP_ITERATION_FINISH_2 >= 20 # define BOOST_PP_ITERATION_2 20 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 21 && BOOST_PP_ITERATION_FINISH_2 >= 21 # define BOOST_PP_ITERATION_2 21 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 22 && BOOST_PP_ITERATION_FINISH_2 >= 22 # define BOOST_PP_ITERATION_2 22 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 23 && BOOST_PP_ITERATION_FINISH_2 >= 23 # define BOOST_PP_ITERATION_2 23 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 24 && BOOST_PP_ITERATION_FINISH_2 >= 24 # define BOOST_PP_ITERATION_2 24 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 25 && BOOST_PP_ITERATION_FINISH_2 >= 25 # define BOOST_PP_ITERATION_2 25 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 26 && BOOST_PP_ITERATION_FINISH_2 >= 26 # define BOOST_PP_ITERATION_2 26 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 27 && BOOST_PP_ITERATION_FINISH_2 >= 27 # define BOOST_PP_ITERATION_2 27 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 28 && BOOST_PP_ITERATION_FINISH_2 >= 28 # define BOOST_PP_ITERATION_2 28 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 29 && BOOST_PP_ITERATION_FINISH_2 >= 29 # define BOOST_PP_ITERATION_2 29 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 30 && BOOST_PP_ITERATION_FINISH_2 >= 30 # define BOOST_PP_ITERATION_2 30 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 31 && BOOST_PP_ITERATION_FINISH_2 >= 31 # define BOOST_PP_ITERATION_2 31 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 32 && BOOST_PP_ITERATION_FINISH_2 >= 32 # define BOOST_PP_ITERATION_2 32 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 33 && BOOST_PP_ITERATION_FINISH_2 >= 33 # define BOOST_PP_ITERATION_2 33 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 34 && BOOST_PP_ITERATION_FINISH_2 >= 34 # define BOOST_PP_ITERATION_2 34 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 35 && BOOST_PP_ITERATION_FINISH_2 >= 35 # define BOOST_PP_ITERATION_2 35 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 36 && BOOST_PP_ITERATION_FINISH_2 >= 36 # define BOOST_PP_ITERATION_2 36 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 37 && BOOST_PP_ITERATION_FINISH_2 >= 37 # define BOOST_PP_ITERATION_2 37 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 38 && BOOST_PP_ITERATION_FINISH_2 >= 38 # define BOOST_PP_ITERATION_2 38 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 39 && BOOST_PP_ITERATION_FINISH_2 >= 39 # define BOOST_PP_ITERATION_2 39 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 40 && BOOST_PP_ITERATION_FINISH_2 >= 40 # define BOOST_PP_ITERATION_2 40 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 41 && BOOST_PP_ITERATION_FINISH_2 >= 41 # define BOOST_PP_ITERATION_2 41 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 42 && BOOST_PP_ITERATION_FINISH_2 >= 42 # define BOOST_PP_ITERATION_2 42 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 43 && BOOST_PP_ITERATION_FINISH_2 >= 43 # define BOOST_PP_ITERATION_2 43 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 44 && BOOST_PP_ITERATION_FINISH_2 >= 44 # define BOOST_PP_ITERATION_2 44 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 45 && BOOST_PP_ITERATION_FINISH_2 >= 45 # define BOOST_PP_ITERATION_2 45 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 46 && BOOST_PP_ITERATION_FINISH_2 >= 46 # define BOOST_PP_ITERATION_2 46 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 47 && BOOST_PP_ITERATION_FINISH_2 >= 47 # define BOOST_PP_ITERATION_2 47 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 48 && BOOST_PP_ITERATION_FINISH_2 >= 48 # define BOOST_PP_ITERATION_2 48 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 49 && BOOST_PP_ITERATION_FINISH_2 >= 49 # define BOOST_PP_ITERATION_2 49 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 50 && BOOST_PP_ITERATION_FINISH_2 >= 50 # define BOOST_PP_ITERATION_2 50 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 51 && BOOST_PP_ITERATION_FINISH_2 >= 51 # define BOOST_PP_ITERATION_2 51 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 52 && BOOST_PP_ITERATION_FINISH_2 >= 52 # define BOOST_PP_ITERATION_2 52 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 53 && BOOST_PP_ITERATION_FINISH_2 >= 53 # define BOOST_PP_ITERATION_2 53 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 54 && BOOST_PP_ITERATION_FINISH_2 >= 54 # define BOOST_PP_ITERATION_2 54 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 55 && BOOST_PP_ITERATION_FINISH_2 >= 55 # define BOOST_PP_ITERATION_2 55 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 56 && BOOST_PP_ITERATION_FINISH_2 >= 56 # define BOOST_PP_ITERATION_2 56 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 57 && BOOST_PP_ITERATION_FINISH_2 >= 57 # define BOOST_PP_ITERATION_2 57 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 58 && BOOST_PP_ITERATION_FINISH_2 >= 58 # define BOOST_PP_ITERATION_2 58 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 59 && BOOST_PP_ITERATION_FINISH_2 >= 59 # define BOOST_PP_ITERATION_2 59 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 60 && BOOST_PP_ITERATION_FINISH_2 >= 60 # define BOOST_PP_ITERATION_2 60 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 61 && BOOST_PP_ITERATION_FINISH_2 >= 61 # define BOOST_PP_ITERATION_2 61 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 62 && BOOST_PP_ITERATION_FINISH_2 >= 62 # define BOOST_PP_ITERATION_2 62 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 63 && BOOST_PP_ITERATION_FINISH_2 >= 63 # define BOOST_PP_ITERATION_2 63 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 64 && BOOST_PP_ITERATION_FINISH_2 >= 64 # define BOOST_PP_ITERATION_2 64 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 65 && BOOST_PP_ITERATION_FINISH_2 >= 65 # define BOOST_PP_ITERATION_2 65 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 66 && BOOST_PP_ITERATION_FINISH_2 >= 66 # define BOOST_PP_ITERATION_2 66 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 67 && BOOST_PP_ITERATION_FINISH_2 >= 67 # define BOOST_PP_ITERATION_2 67 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 68 && BOOST_PP_ITERATION_FINISH_2 >= 68 # define BOOST_PP_ITERATION_2 68 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 69 && BOOST_PP_ITERATION_FINISH_2 >= 69 # define BOOST_PP_ITERATION_2 69 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 70 && BOOST_PP_ITERATION_FINISH_2 >= 70 # define BOOST_PP_ITERATION_2 70 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 71 && BOOST_PP_ITERATION_FINISH_2 >= 71 # define BOOST_PP_ITERATION_2 71 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 72 && BOOST_PP_ITERATION_FINISH_2 >= 72 # define BOOST_PP_ITERATION_2 72 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 73 && BOOST_PP_ITERATION_FINISH_2 >= 73 # define BOOST_PP_ITERATION_2 73 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 74 && BOOST_PP_ITERATION_FINISH_2 >= 74 # define BOOST_PP_ITERATION_2 74 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 75 && BOOST_PP_ITERATION_FINISH_2 >= 75 # define BOOST_PP_ITERATION_2 75 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 76 && BOOST_PP_ITERATION_FINISH_2 >= 76 # define BOOST_PP_ITERATION_2 76 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 77 && BOOST_PP_ITERATION_FINISH_2 >= 77 # define BOOST_PP_ITERATION_2 77 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 78 && BOOST_PP_ITERATION_FINISH_2 >= 78 # define BOOST_PP_ITERATION_2 78 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 79 && BOOST_PP_ITERATION_FINISH_2 >= 79 # define BOOST_PP_ITERATION_2 79 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 80 && BOOST_PP_ITERATION_FINISH_2 >= 80 # define BOOST_PP_ITERATION_2 80 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 81 && BOOST_PP_ITERATION_FINISH_2 >= 81 # define BOOST_PP_ITERATION_2 81 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 82 && BOOST_PP_ITERATION_FINISH_2 >= 82 # define BOOST_PP_ITERATION_2 82 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 83 && BOOST_PP_ITERATION_FINISH_2 >= 83 # define BOOST_PP_ITERATION_2 83 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 84 && BOOST_PP_ITERATION_FINISH_2 >= 84 # define BOOST_PP_ITERATION_2 84 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 85 && BOOST_PP_ITERATION_FINISH_2 >= 85 # define BOOST_PP_ITERATION_2 85 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 86 && BOOST_PP_ITERATION_FINISH_2 >= 86 # define BOOST_PP_ITERATION_2 86 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 87 && BOOST_PP_ITERATION_FINISH_2 >= 87 # define BOOST_PP_ITERATION_2 87 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 88 && BOOST_PP_ITERATION_FINISH_2 >= 88 # define BOOST_PP_ITERATION_2 88 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 89 && BOOST_PP_ITERATION_FINISH_2 >= 89 # define BOOST_PP_ITERATION_2 89 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 90 && BOOST_PP_ITERATION_FINISH_2 >= 90 # define BOOST_PP_ITERATION_2 90 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 91 && BOOST_PP_ITERATION_FINISH_2 >= 91 # define BOOST_PP_ITERATION_2 91 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 92 && BOOST_PP_ITERATION_FINISH_2 >= 92 # define BOOST_PP_ITERATION_2 92 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 93 && BOOST_PP_ITERATION_FINISH_2 >= 93 # define BOOST_PP_ITERATION_2 93 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 94 && BOOST_PP_ITERATION_FINISH_2 >= 94 # define BOOST_PP_ITERATION_2 94 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 95 && BOOST_PP_ITERATION_FINISH_2 >= 95 # define BOOST_PP_ITERATION_2 95 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 96 && BOOST_PP_ITERATION_FINISH_2 >= 96 # define BOOST_PP_ITERATION_2 96 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 97 && BOOST_PP_ITERATION_FINISH_2 >= 97 # define BOOST_PP_ITERATION_2 97 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 98 && BOOST_PP_ITERATION_FINISH_2 >= 98 # define BOOST_PP_ITERATION_2 98 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 99 && BOOST_PP_ITERATION_FINISH_2 >= 99 # define BOOST_PP_ITERATION_2 99 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 100 && BOOST_PP_ITERATION_FINISH_2 >= 100 # define BOOST_PP_ITERATION_2 100 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 101 && BOOST_PP_ITERATION_FINISH_2 >= 101 # define BOOST_PP_ITERATION_2 101 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 102 && BOOST_PP_ITERATION_FINISH_2 >= 102 # define BOOST_PP_ITERATION_2 102 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 103 && BOOST_PP_ITERATION_FINISH_2 >= 103 # define BOOST_PP_ITERATION_2 103 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 104 && BOOST_PP_ITERATION_FINISH_2 >= 104 # define BOOST_PP_ITERATION_2 104 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 105 && BOOST_PP_ITERATION_FINISH_2 >= 105 # define BOOST_PP_ITERATION_2 105 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 106 && BOOST_PP_ITERATION_FINISH_2 >= 106 # define BOOST_PP_ITERATION_2 106 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 107 && BOOST_PP_ITERATION_FINISH_2 >= 107 # define BOOST_PP_ITERATION_2 107 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 108 && BOOST_PP_ITERATION_FINISH_2 >= 108 # define BOOST_PP_ITERATION_2 108 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 109 && BOOST_PP_ITERATION_FINISH_2 >= 109 # define BOOST_PP_ITERATION_2 109 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 110 && BOOST_PP_ITERATION_FINISH_2 >= 110 # define BOOST_PP_ITERATION_2 110 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 111 && BOOST_PP_ITERATION_FINISH_2 >= 111 # define BOOST_PP_ITERATION_2 111 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 112 && BOOST_PP_ITERATION_FINISH_2 >= 112 # define BOOST_PP_ITERATION_2 112 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 113 && BOOST_PP_ITERATION_FINISH_2 >= 113 # define BOOST_PP_ITERATION_2 113 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 114 && BOOST_PP_ITERATION_FINISH_2 >= 114 # define BOOST_PP_ITERATION_2 114 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 115 && BOOST_PP_ITERATION_FINISH_2 >= 115 # define BOOST_PP_ITERATION_2 115 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 116 && BOOST_PP_ITERATION_FINISH_2 >= 116 # define BOOST_PP_ITERATION_2 116 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 117 && BOOST_PP_ITERATION_FINISH_2 >= 117 # define BOOST_PP_ITERATION_2 117 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 118 && BOOST_PP_ITERATION_FINISH_2 >= 118 # define BOOST_PP_ITERATION_2 118 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 119 && BOOST_PP_ITERATION_FINISH_2 >= 119 # define BOOST_PP_ITERATION_2 119 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 120 && BOOST_PP_ITERATION_FINISH_2 >= 120 # define BOOST_PP_ITERATION_2 120 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 121 && BOOST_PP_ITERATION_FINISH_2 >= 121 # define BOOST_PP_ITERATION_2 121 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 122 && BOOST_PP_ITERATION_FINISH_2 >= 122 # define BOOST_PP_ITERATION_2 122 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 123 && BOOST_PP_ITERATION_FINISH_2 >= 123 # define BOOST_PP_ITERATION_2 123 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 124 && BOOST_PP_ITERATION_FINISH_2 >= 124 # define BOOST_PP_ITERATION_2 124 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 125 && BOOST_PP_ITERATION_FINISH_2 >= 125 # define BOOST_PP_ITERATION_2 125 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 126 && BOOST_PP_ITERATION_FINISH_2 >= 126 # define BOOST_PP_ITERATION_2 126 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 127 && BOOST_PP_ITERATION_FINISH_2 >= 127 # define BOOST_PP_ITERATION_2 127 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 128 && BOOST_PP_ITERATION_FINISH_2 >= 128 # define BOOST_PP_ITERATION_2 128 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 129 && BOOST_PP_ITERATION_FINISH_2 >= 129 # define BOOST_PP_ITERATION_2 129 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 130 && BOOST_PP_ITERATION_FINISH_2 >= 130 # define BOOST_PP_ITERATION_2 130 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 131 && BOOST_PP_ITERATION_FINISH_2 >= 131 # define BOOST_PP_ITERATION_2 131 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 132 && BOOST_PP_ITERATION_FINISH_2 >= 132 # define BOOST_PP_ITERATION_2 132 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 133 && BOOST_PP_ITERATION_FINISH_2 >= 133 # define BOOST_PP_ITERATION_2 133 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 134 && BOOST_PP_ITERATION_FINISH_2 >= 134 # define BOOST_PP_ITERATION_2 134 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 135 && BOOST_PP_ITERATION_FINISH_2 >= 135 # define BOOST_PP_ITERATION_2 135 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 136 && BOOST_PP_ITERATION_FINISH_2 >= 136 # define BOOST_PP_ITERATION_2 136 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 137 && BOOST_PP_ITERATION_FINISH_2 >= 137 # define BOOST_PP_ITERATION_2 137 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 138 && BOOST_PP_ITERATION_FINISH_2 >= 138 # define BOOST_PP_ITERATION_2 138 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 139 && BOOST_PP_ITERATION_FINISH_2 >= 139 # define BOOST_PP_ITERATION_2 139 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 140 && BOOST_PP_ITERATION_FINISH_2 >= 140 # define BOOST_PP_ITERATION_2 140 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 141 && BOOST_PP_ITERATION_FINISH_2 >= 141 # define BOOST_PP_ITERATION_2 141 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 142 && BOOST_PP_ITERATION_FINISH_2 >= 142 # define BOOST_PP_ITERATION_2 142 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 143 && BOOST_PP_ITERATION_FINISH_2 >= 143 # define BOOST_PP_ITERATION_2 143 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 144 && BOOST_PP_ITERATION_FINISH_2 >= 144 # define BOOST_PP_ITERATION_2 144 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 145 && BOOST_PP_ITERATION_FINISH_2 >= 145 # define BOOST_PP_ITERATION_2 145 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 146 && BOOST_PP_ITERATION_FINISH_2 >= 146 # define BOOST_PP_ITERATION_2 146 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 147 && BOOST_PP_ITERATION_FINISH_2 >= 147 # define BOOST_PP_ITERATION_2 147 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 148 && BOOST_PP_ITERATION_FINISH_2 >= 148 # define BOOST_PP_ITERATION_2 148 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 149 && BOOST_PP_ITERATION_FINISH_2 >= 149 # define BOOST_PP_ITERATION_2 149 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 150 && BOOST_PP_ITERATION_FINISH_2 >= 150 # define BOOST_PP_ITERATION_2 150 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 151 && BOOST_PP_ITERATION_FINISH_2 >= 151 # define BOOST_PP_ITERATION_2 151 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 152 && BOOST_PP_ITERATION_FINISH_2 >= 152 # define BOOST_PP_ITERATION_2 152 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 153 && BOOST_PP_ITERATION_FINISH_2 >= 153 # define BOOST_PP_ITERATION_2 153 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 154 && BOOST_PP_ITERATION_FINISH_2 >= 154 # define BOOST_PP_ITERATION_2 154 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 155 && BOOST_PP_ITERATION_FINISH_2 >= 155 # define BOOST_PP_ITERATION_2 155 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 156 && BOOST_PP_ITERATION_FINISH_2 >= 156 # define BOOST_PP_ITERATION_2 156 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 157 && BOOST_PP_ITERATION_FINISH_2 >= 157 # define BOOST_PP_ITERATION_2 157 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 158 && BOOST_PP_ITERATION_FINISH_2 >= 158 # define BOOST_PP_ITERATION_2 158 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 159 && BOOST_PP_ITERATION_FINISH_2 >= 159 # define BOOST_PP_ITERATION_2 159 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 160 && BOOST_PP_ITERATION_FINISH_2 >= 160 # define BOOST_PP_ITERATION_2 160 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 161 && BOOST_PP_ITERATION_FINISH_2 >= 161 # define BOOST_PP_ITERATION_2 161 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 162 && BOOST_PP_ITERATION_FINISH_2 >= 162 # define BOOST_PP_ITERATION_2 162 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 163 && BOOST_PP_ITERATION_FINISH_2 >= 163 # define BOOST_PP_ITERATION_2 163 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 164 && BOOST_PP_ITERATION_FINISH_2 >= 164 # define BOOST_PP_ITERATION_2 164 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 165 && BOOST_PP_ITERATION_FINISH_2 >= 165 # define BOOST_PP_ITERATION_2 165 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 166 && BOOST_PP_ITERATION_FINISH_2 >= 166 # define BOOST_PP_ITERATION_2 166 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 167 && BOOST_PP_ITERATION_FINISH_2 >= 167 # define BOOST_PP_ITERATION_2 167 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 168 && BOOST_PP_ITERATION_FINISH_2 >= 168 # define BOOST_PP_ITERATION_2 168 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 169 && BOOST_PP_ITERATION_FINISH_2 >= 169 # define BOOST_PP_ITERATION_2 169 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 170 && BOOST_PP_ITERATION_FINISH_2 >= 170 # define BOOST_PP_ITERATION_2 170 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 171 && BOOST_PP_ITERATION_FINISH_2 >= 171 # define BOOST_PP_ITERATION_2 171 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 172 && BOOST_PP_ITERATION_FINISH_2 >= 172 # define BOOST_PP_ITERATION_2 172 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 173 && BOOST_PP_ITERATION_FINISH_2 >= 173 # define BOOST_PP_ITERATION_2 173 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 174 && BOOST_PP_ITERATION_FINISH_2 >= 174 # define BOOST_PP_ITERATION_2 174 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 175 && BOOST_PP_ITERATION_FINISH_2 >= 175 # define BOOST_PP_ITERATION_2 175 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 176 && BOOST_PP_ITERATION_FINISH_2 >= 176 # define BOOST_PP_ITERATION_2 176 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 177 && BOOST_PP_ITERATION_FINISH_2 >= 177 # define BOOST_PP_ITERATION_2 177 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 178 && BOOST_PP_ITERATION_FINISH_2 >= 178 # define BOOST_PP_ITERATION_2 178 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 179 && BOOST_PP_ITERATION_FINISH_2 >= 179 # define BOOST_PP_ITERATION_2 179 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 180 && BOOST_PP_ITERATION_FINISH_2 >= 180 # define BOOST_PP_ITERATION_2 180 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 181 && BOOST_PP_ITERATION_FINISH_2 >= 181 # define BOOST_PP_ITERATION_2 181 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 182 && BOOST_PP_ITERATION_FINISH_2 >= 182 # define BOOST_PP_ITERATION_2 182 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 183 && BOOST_PP_ITERATION_FINISH_2 >= 183 # define BOOST_PP_ITERATION_2 183 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 184 && BOOST_PP_ITERATION_FINISH_2 >= 184 # define BOOST_PP_ITERATION_2 184 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 185 && BOOST_PP_ITERATION_FINISH_2 >= 185 # define BOOST_PP_ITERATION_2 185 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 186 && BOOST_PP_ITERATION_FINISH_2 >= 186 # define BOOST_PP_ITERATION_2 186 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 187 && BOOST_PP_ITERATION_FINISH_2 >= 187 # define BOOST_PP_ITERATION_2 187 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 188 && BOOST_PP_ITERATION_FINISH_2 >= 188 # define BOOST_PP_ITERATION_2 188 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 189 && BOOST_PP_ITERATION_FINISH_2 >= 189 # define BOOST_PP_ITERATION_2 189 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 190 && BOOST_PP_ITERATION_FINISH_2 >= 190 # define BOOST_PP_ITERATION_2 190 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 191 && BOOST_PP_ITERATION_FINISH_2 >= 191 # define BOOST_PP_ITERATION_2 191 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 192 && BOOST_PP_ITERATION_FINISH_2 >= 192 # define BOOST_PP_ITERATION_2 192 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 193 && BOOST_PP_ITERATION_FINISH_2 >= 193 # define BOOST_PP_ITERATION_2 193 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 194 && BOOST_PP_ITERATION_FINISH_2 >= 194 # define BOOST_PP_ITERATION_2 194 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 195 && BOOST_PP_ITERATION_FINISH_2 >= 195 # define BOOST_PP_ITERATION_2 195 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 196 && BOOST_PP_ITERATION_FINISH_2 >= 196 # define BOOST_PP_ITERATION_2 196 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 197 && BOOST_PP_ITERATION_FINISH_2 >= 197 # define BOOST_PP_ITERATION_2 197 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 198 && BOOST_PP_ITERATION_FINISH_2 >= 198 # define BOOST_PP_ITERATION_2 198 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 199 && BOOST_PP_ITERATION_FINISH_2 >= 199 # define BOOST_PP_ITERATION_2 199 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 200 && BOOST_PP_ITERATION_FINISH_2 >= 200 # define BOOST_PP_ITERATION_2 200 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 201 && BOOST_PP_ITERATION_FINISH_2 >= 201 # define BOOST_PP_ITERATION_2 201 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 202 && BOOST_PP_ITERATION_FINISH_2 >= 202 # define BOOST_PP_ITERATION_2 202 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 203 && BOOST_PP_ITERATION_FINISH_2 >= 203 # define BOOST_PP_ITERATION_2 203 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 204 && BOOST_PP_ITERATION_FINISH_2 >= 204 # define BOOST_PP_ITERATION_2 204 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 205 && BOOST_PP_ITERATION_FINISH_2 >= 205 # define BOOST_PP_ITERATION_2 205 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 206 && BOOST_PP_ITERATION_FINISH_2 >= 206 # define BOOST_PP_ITERATION_2 206 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 207 && BOOST_PP_ITERATION_FINISH_2 >= 207 # define BOOST_PP_ITERATION_2 207 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 208 && BOOST_PP_ITERATION_FINISH_2 >= 208 # define BOOST_PP_ITERATION_2 208 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 209 && BOOST_PP_ITERATION_FINISH_2 >= 209 # define BOOST_PP_ITERATION_2 209 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 210 && BOOST_PP_ITERATION_FINISH_2 >= 210 # define BOOST_PP_ITERATION_2 210 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 211 && BOOST_PP_ITERATION_FINISH_2 >= 211 # define BOOST_PP_ITERATION_2 211 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 212 && BOOST_PP_ITERATION_FINISH_2 >= 212 # define BOOST_PP_ITERATION_2 212 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 213 && BOOST_PP_ITERATION_FINISH_2 >= 213 # define BOOST_PP_ITERATION_2 213 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 214 && BOOST_PP_ITERATION_FINISH_2 >= 214 # define BOOST_PP_ITERATION_2 214 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 215 && BOOST_PP_ITERATION_FINISH_2 >= 215 # define BOOST_PP_ITERATION_2 215 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 216 && BOOST_PP_ITERATION_FINISH_2 >= 216 # define BOOST_PP_ITERATION_2 216 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 217 && BOOST_PP_ITERATION_FINISH_2 >= 217 # define BOOST_PP_ITERATION_2 217 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 218 && BOOST_PP_ITERATION_FINISH_2 >= 218 # define BOOST_PP_ITERATION_2 218 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 219 && BOOST_PP_ITERATION_FINISH_2 >= 219 # define BOOST_PP_ITERATION_2 219 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 220 && BOOST_PP_ITERATION_FINISH_2 >= 220 # define BOOST_PP_ITERATION_2 220 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 221 && BOOST_PP_ITERATION_FINISH_2 >= 221 # define BOOST_PP_ITERATION_2 221 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 222 && BOOST_PP_ITERATION_FINISH_2 >= 222 # define BOOST_PP_ITERATION_2 222 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 223 && BOOST_PP_ITERATION_FINISH_2 >= 223 # define BOOST_PP_ITERATION_2 223 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 224 && BOOST_PP_ITERATION_FINISH_2 >= 224 # define BOOST_PP_ITERATION_2 224 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 225 && BOOST_PP_ITERATION_FINISH_2 >= 225 # define BOOST_PP_ITERATION_2 225 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 226 && BOOST_PP_ITERATION_FINISH_2 >= 226 # define BOOST_PP_ITERATION_2 226 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 227 && BOOST_PP_ITERATION_FINISH_2 >= 227 # define BOOST_PP_ITERATION_2 227 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 228 && BOOST_PP_ITERATION_FINISH_2 >= 228 # define BOOST_PP_ITERATION_2 228 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 229 && BOOST_PP_ITERATION_FINISH_2 >= 229 # define BOOST_PP_ITERATION_2 229 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 230 && BOOST_PP_ITERATION_FINISH_2 >= 230 # define BOOST_PP_ITERATION_2 230 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 231 && BOOST_PP_ITERATION_FINISH_2 >= 231 # define BOOST_PP_ITERATION_2 231 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 232 && BOOST_PP_ITERATION_FINISH_2 >= 232 # define BOOST_PP_ITERATION_2 232 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 233 && BOOST_PP_ITERATION_FINISH_2 >= 233 # define BOOST_PP_ITERATION_2 233 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 234 && BOOST_PP_ITERATION_FINISH_2 >= 234 # define BOOST_PP_ITERATION_2 234 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 235 && BOOST_PP_ITERATION_FINISH_2 >= 235 # define BOOST_PP_ITERATION_2 235 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 236 && BOOST_PP_ITERATION_FINISH_2 >= 236 # define BOOST_PP_ITERATION_2 236 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 237 && BOOST_PP_ITERATION_FINISH_2 >= 237 # define BOOST_PP_ITERATION_2 237 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 238 && BOOST_PP_ITERATION_FINISH_2 >= 238 # define BOOST_PP_ITERATION_2 238 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 239 && BOOST_PP_ITERATION_FINISH_2 >= 239 # define BOOST_PP_ITERATION_2 239 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 240 && BOOST_PP_ITERATION_FINISH_2 >= 240 # define BOOST_PP_ITERATION_2 240 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 241 && BOOST_PP_ITERATION_FINISH_2 >= 241 # define BOOST_PP_ITERATION_2 241 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 242 && BOOST_PP_ITERATION_FINISH_2 >= 242 # define BOOST_PP_ITERATION_2 242 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 243 && BOOST_PP_ITERATION_FINISH_2 >= 243 # define BOOST_PP_ITERATION_2 243 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 244 && BOOST_PP_ITERATION_FINISH_2 >= 244 # define BOOST_PP_ITERATION_2 244 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 245 && BOOST_PP_ITERATION_FINISH_2 >= 245 # define BOOST_PP_ITERATION_2 245 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 246 && BOOST_PP_ITERATION_FINISH_2 >= 246 # define BOOST_PP_ITERATION_2 246 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 247 && BOOST_PP_ITERATION_FINISH_2 >= 247 # define BOOST_PP_ITERATION_2 247 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 248 && BOOST_PP_ITERATION_FINISH_2 >= 248 # define BOOST_PP_ITERATION_2 248 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 249 && BOOST_PP_ITERATION_FINISH_2 >= 249 # define BOOST_PP_ITERATION_2 249 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 250 && BOOST_PP_ITERATION_FINISH_2 >= 250 # define BOOST_PP_ITERATION_2 250 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 251 && BOOST_PP_ITERATION_FINISH_2 >= 251 # define BOOST_PP_ITERATION_2 251 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 252 && BOOST_PP_ITERATION_FINISH_2 >= 252 # define BOOST_PP_ITERATION_2 252 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 253 && BOOST_PP_ITERATION_FINISH_2 >= 253 # define BOOST_PP_ITERATION_2 253 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 254 && BOOST_PP_ITERATION_FINISH_2 >= 254 # define BOOST_PP_ITERATION_2 254 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 255 && BOOST_PP_ITERATION_FINISH_2 >= 255 # define BOOST_PP_ITERATION_2 255 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_START_2 <= 256 && BOOST_PP_ITERATION_FINISH_2 >= 256 # define BOOST_PP_ITERATION_2 256 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # endif # # undef BOOST_PP_ITERATION_DEPTH # define BOOST_PP_ITERATION_DEPTH() 1 # # undef BOOST_PP_ITERATION_START_2 # undef BOOST_PP_ITERATION_FINISH_2 # undef BOOST_PP_FILENAME_2 # # undef BOOST_PP_ITERATION_FLAGS_2 # undef BOOST_PP_ITERATION_PARAMS_2 ================================================ FILE: benchmarks/boost/preprocessor/iteration/detail/iter/forward3.hpp ================================================ # /* ************************************************************************** # * * # * (C) Copyright Paul Mensonides 2002. # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # * * # ************************************************************************** */ # # /* See http://www.boost.org for most recent version. */ # # if defined(BOOST_PP_ITERATION_LIMITS) # if !defined(BOOST_PP_FILENAME_3) # error BOOST_PP_ERROR: depth #3 filename is not defined # endif # define BOOST_PP_VALUE BOOST_PP_TUPLE_ELEM(2, 0, BOOST_PP_ITERATION_LIMITS) # include # define BOOST_PP_VALUE BOOST_PP_TUPLE_ELEM(2, 1, BOOST_PP_ITERATION_LIMITS) # include # define BOOST_PP_ITERATION_FLAGS_3() 0 # undef BOOST_PP_ITERATION_LIMITS # elif defined(BOOST_PP_ITERATION_PARAMS_3) # define BOOST_PP_VALUE BOOST_PP_ARRAY_ELEM(0, BOOST_PP_ITERATION_PARAMS_3) # include # define BOOST_PP_VALUE BOOST_PP_ARRAY_ELEM(1, BOOST_PP_ITERATION_PARAMS_3) # include # define BOOST_PP_FILENAME_3 BOOST_PP_ARRAY_ELEM(2, BOOST_PP_ITERATION_PARAMS_3) # if BOOST_PP_ARRAY_SIZE(BOOST_PP_ITERATION_PARAMS_3) >= 4 # define BOOST_PP_ITERATION_FLAGS_3() BOOST_PP_ARRAY_ELEM(3, BOOST_PP_ITERATION_PARAMS_3) # else # define BOOST_PP_ITERATION_FLAGS_3() 0 # endif # else # error BOOST_PP_ERROR: depth #3 iteration boundaries or filename not defined # endif # # undef BOOST_PP_ITERATION_DEPTH # define BOOST_PP_ITERATION_DEPTH() 3 # # if (BOOST_PP_ITERATION_START_3) > (BOOST_PP_ITERATION_FINISH_3) # include # else # if BOOST_PP_ITERATION_START_3 <= 0 && BOOST_PP_ITERATION_FINISH_3 >= 0 # define BOOST_PP_ITERATION_3 0 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 1 && BOOST_PP_ITERATION_FINISH_3 >= 1 # define BOOST_PP_ITERATION_3 1 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 2 && BOOST_PP_ITERATION_FINISH_3 >= 2 # define BOOST_PP_ITERATION_3 2 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 3 && BOOST_PP_ITERATION_FINISH_3 >= 3 # define BOOST_PP_ITERATION_3 3 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 4 && BOOST_PP_ITERATION_FINISH_3 >= 4 # define BOOST_PP_ITERATION_3 4 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 5 && BOOST_PP_ITERATION_FINISH_3 >= 5 # define BOOST_PP_ITERATION_3 5 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 6 && BOOST_PP_ITERATION_FINISH_3 >= 6 # define BOOST_PP_ITERATION_3 6 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 7 && BOOST_PP_ITERATION_FINISH_3 >= 7 # define BOOST_PP_ITERATION_3 7 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 8 && BOOST_PP_ITERATION_FINISH_3 >= 8 # define BOOST_PP_ITERATION_3 8 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 9 && BOOST_PP_ITERATION_FINISH_3 >= 9 # define BOOST_PP_ITERATION_3 9 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 10 && BOOST_PP_ITERATION_FINISH_3 >= 10 # define BOOST_PP_ITERATION_3 10 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 11 && BOOST_PP_ITERATION_FINISH_3 >= 11 # define BOOST_PP_ITERATION_3 11 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 12 && BOOST_PP_ITERATION_FINISH_3 >= 12 # define BOOST_PP_ITERATION_3 12 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 13 && BOOST_PP_ITERATION_FINISH_3 >= 13 # define BOOST_PP_ITERATION_3 13 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 14 && BOOST_PP_ITERATION_FINISH_3 >= 14 # define BOOST_PP_ITERATION_3 14 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 15 && BOOST_PP_ITERATION_FINISH_3 >= 15 # define BOOST_PP_ITERATION_3 15 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 16 && BOOST_PP_ITERATION_FINISH_3 >= 16 # define BOOST_PP_ITERATION_3 16 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 17 && BOOST_PP_ITERATION_FINISH_3 >= 17 # define BOOST_PP_ITERATION_3 17 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 18 && BOOST_PP_ITERATION_FINISH_3 >= 18 # define BOOST_PP_ITERATION_3 18 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 19 && BOOST_PP_ITERATION_FINISH_3 >= 19 # define BOOST_PP_ITERATION_3 19 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 20 && BOOST_PP_ITERATION_FINISH_3 >= 20 # define BOOST_PP_ITERATION_3 20 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 21 && BOOST_PP_ITERATION_FINISH_3 >= 21 # define BOOST_PP_ITERATION_3 21 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 22 && BOOST_PP_ITERATION_FINISH_3 >= 22 # define BOOST_PP_ITERATION_3 22 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 23 && BOOST_PP_ITERATION_FINISH_3 >= 23 # define BOOST_PP_ITERATION_3 23 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 24 && BOOST_PP_ITERATION_FINISH_3 >= 24 # define BOOST_PP_ITERATION_3 24 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 25 && BOOST_PP_ITERATION_FINISH_3 >= 25 # define BOOST_PP_ITERATION_3 25 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 26 && BOOST_PP_ITERATION_FINISH_3 >= 26 # define BOOST_PP_ITERATION_3 26 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 27 && BOOST_PP_ITERATION_FINISH_3 >= 27 # define BOOST_PP_ITERATION_3 27 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 28 && BOOST_PP_ITERATION_FINISH_3 >= 28 # define BOOST_PP_ITERATION_3 28 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 29 && BOOST_PP_ITERATION_FINISH_3 >= 29 # define BOOST_PP_ITERATION_3 29 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 30 && BOOST_PP_ITERATION_FINISH_3 >= 30 # define BOOST_PP_ITERATION_3 30 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 31 && BOOST_PP_ITERATION_FINISH_3 >= 31 # define BOOST_PP_ITERATION_3 31 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 32 && BOOST_PP_ITERATION_FINISH_3 >= 32 # define BOOST_PP_ITERATION_3 32 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 33 && BOOST_PP_ITERATION_FINISH_3 >= 33 # define BOOST_PP_ITERATION_3 33 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 34 && BOOST_PP_ITERATION_FINISH_3 >= 34 # define BOOST_PP_ITERATION_3 34 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 35 && BOOST_PP_ITERATION_FINISH_3 >= 35 # define BOOST_PP_ITERATION_3 35 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 36 && BOOST_PP_ITERATION_FINISH_3 >= 36 # define BOOST_PP_ITERATION_3 36 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 37 && BOOST_PP_ITERATION_FINISH_3 >= 37 # define BOOST_PP_ITERATION_3 37 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 38 && BOOST_PP_ITERATION_FINISH_3 >= 38 # define BOOST_PP_ITERATION_3 38 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 39 && BOOST_PP_ITERATION_FINISH_3 >= 39 # define BOOST_PP_ITERATION_3 39 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 40 && BOOST_PP_ITERATION_FINISH_3 >= 40 # define BOOST_PP_ITERATION_3 40 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 41 && BOOST_PP_ITERATION_FINISH_3 >= 41 # define BOOST_PP_ITERATION_3 41 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 42 && BOOST_PP_ITERATION_FINISH_3 >= 42 # define BOOST_PP_ITERATION_3 42 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 43 && BOOST_PP_ITERATION_FINISH_3 >= 43 # define BOOST_PP_ITERATION_3 43 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 44 && BOOST_PP_ITERATION_FINISH_3 >= 44 # define BOOST_PP_ITERATION_3 44 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 45 && BOOST_PP_ITERATION_FINISH_3 >= 45 # define BOOST_PP_ITERATION_3 45 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 46 && BOOST_PP_ITERATION_FINISH_3 >= 46 # define BOOST_PP_ITERATION_3 46 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 47 && BOOST_PP_ITERATION_FINISH_3 >= 47 # define BOOST_PP_ITERATION_3 47 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 48 && BOOST_PP_ITERATION_FINISH_3 >= 48 # define BOOST_PP_ITERATION_3 48 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 49 && BOOST_PP_ITERATION_FINISH_3 >= 49 # define BOOST_PP_ITERATION_3 49 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 50 && BOOST_PP_ITERATION_FINISH_3 >= 50 # define BOOST_PP_ITERATION_3 50 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 51 && BOOST_PP_ITERATION_FINISH_3 >= 51 # define BOOST_PP_ITERATION_3 51 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 52 && BOOST_PP_ITERATION_FINISH_3 >= 52 # define BOOST_PP_ITERATION_3 52 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 53 && BOOST_PP_ITERATION_FINISH_3 >= 53 # define BOOST_PP_ITERATION_3 53 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 54 && BOOST_PP_ITERATION_FINISH_3 >= 54 # define BOOST_PP_ITERATION_3 54 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 55 && BOOST_PP_ITERATION_FINISH_3 >= 55 # define BOOST_PP_ITERATION_3 55 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 56 && BOOST_PP_ITERATION_FINISH_3 >= 56 # define BOOST_PP_ITERATION_3 56 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 57 && BOOST_PP_ITERATION_FINISH_3 >= 57 # define BOOST_PP_ITERATION_3 57 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 58 && BOOST_PP_ITERATION_FINISH_3 >= 58 # define BOOST_PP_ITERATION_3 58 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 59 && BOOST_PP_ITERATION_FINISH_3 >= 59 # define BOOST_PP_ITERATION_3 59 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 60 && BOOST_PP_ITERATION_FINISH_3 >= 60 # define BOOST_PP_ITERATION_3 60 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 61 && BOOST_PP_ITERATION_FINISH_3 >= 61 # define BOOST_PP_ITERATION_3 61 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 62 && BOOST_PP_ITERATION_FINISH_3 >= 62 # define BOOST_PP_ITERATION_3 62 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 63 && BOOST_PP_ITERATION_FINISH_3 >= 63 # define BOOST_PP_ITERATION_3 63 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 64 && BOOST_PP_ITERATION_FINISH_3 >= 64 # define BOOST_PP_ITERATION_3 64 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 65 && BOOST_PP_ITERATION_FINISH_3 >= 65 # define BOOST_PP_ITERATION_3 65 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 66 && BOOST_PP_ITERATION_FINISH_3 >= 66 # define BOOST_PP_ITERATION_3 66 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 67 && BOOST_PP_ITERATION_FINISH_3 >= 67 # define BOOST_PP_ITERATION_3 67 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 68 && BOOST_PP_ITERATION_FINISH_3 >= 68 # define BOOST_PP_ITERATION_3 68 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 69 && BOOST_PP_ITERATION_FINISH_3 >= 69 # define BOOST_PP_ITERATION_3 69 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 70 && BOOST_PP_ITERATION_FINISH_3 >= 70 # define BOOST_PP_ITERATION_3 70 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 71 && BOOST_PP_ITERATION_FINISH_3 >= 71 # define BOOST_PP_ITERATION_3 71 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 72 && BOOST_PP_ITERATION_FINISH_3 >= 72 # define BOOST_PP_ITERATION_3 72 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 73 && BOOST_PP_ITERATION_FINISH_3 >= 73 # define BOOST_PP_ITERATION_3 73 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 74 && BOOST_PP_ITERATION_FINISH_3 >= 74 # define BOOST_PP_ITERATION_3 74 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 75 && BOOST_PP_ITERATION_FINISH_3 >= 75 # define BOOST_PP_ITERATION_3 75 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 76 && BOOST_PP_ITERATION_FINISH_3 >= 76 # define BOOST_PP_ITERATION_3 76 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 77 && BOOST_PP_ITERATION_FINISH_3 >= 77 # define BOOST_PP_ITERATION_3 77 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 78 && BOOST_PP_ITERATION_FINISH_3 >= 78 # define BOOST_PP_ITERATION_3 78 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 79 && BOOST_PP_ITERATION_FINISH_3 >= 79 # define BOOST_PP_ITERATION_3 79 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 80 && BOOST_PP_ITERATION_FINISH_3 >= 80 # define BOOST_PP_ITERATION_3 80 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 81 && BOOST_PP_ITERATION_FINISH_3 >= 81 # define BOOST_PP_ITERATION_3 81 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 82 && BOOST_PP_ITERATION_FINISH_3 >= 82 # define BOOST_PP_ITERATION_3 82 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 83 && BOOST_PP_ITERATION_FINISH_3 >= 83 # define BOOST_PP_ITERATION_3 83 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 84 && BOOST_PP_ITERATION_FINISH_3 >= 84 # define BOOST_PP_ITERATION_3 84 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 85 && BOOST_PP_ITERATION_FINISH_3 >= 85 # define BOOST_PP_ITERATION_3 85 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 86 && BOOST_PP_ITERATION_FINISH_3 >= 86 # define BOOST_PP_ITERATION_3 86 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 87 && BOOST_PP_ITERATION_FINISH_3 >= 87 # define BOOST_PP_ITERATION_3 87 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 88 && BOOST_PP_ITERATION_FINISH_3 >= 88 # define BOOST_PP_ITERATION_3 88 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 89 && BOOST_PP_ITERATION_FINISH_3 >= 89 # define BOOST_PP_ITERATION_3 89 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 90 && BOOST_PP_ITERATION_FINISH_3 >= 90 # define BOOST_PP_ITERATION_3 90 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 91 && BOOST_PP_ITERATION_FINISH_3 >= 91 # define BOOST_PP_ITERATION_3 91 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 92 && BOOST_PP_ITERATION_FINISH_3 >= 92 # define BOOST_PP_ITERATION_3 92 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 93 && BOOST_PP_ITERATION_FINISH_3 >= 93 # define BOOST_PP_ITERATION_3 93 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 94 && BOOST_PP_ITERATION_FINISH_3 >= 94 # define BOOST_PP_ITERATION_3 94 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 95 && BOOST_PP_ITERATION_FINISH_3 >= 95 # define BOOST_PP_ITERATION_3 95 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 96 && BOOST_PP_ITERATION_FINISH_3 >= 96 # define BOOST_PP_ITERATION_3 96 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 97 && BOOST_PP_ITERATION_FINISH_3 >= 97 # define BOOST_PP_ITERATION_3 97 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 98 && BOOST_PP_ITERATION_FINISH_3 >= 98 # define BOOST_PP_ITERATION_3 98 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 99 && BOOST_PP_ITERATION_FINISH_3 >= 99 # define BOOST_PP_ITERATION_3 99 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 100 && BOOST_PP_ITERATION_FINISH_3 >= 100 # define BOOST_PP_ITERATION_3 100 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 101 && BOOST_PP_ITERATION_FINISH_3 >= 101 # define BOOST_PP_ITERATION_3 101 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 102 && BOOST_PP_ITERATION_FINISH_3 >= 102 # define BOOST_PP_ITERATION_3 102 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 103 && BOOST_PP_ITERATION_FINISH_3 >= 103 # define BOOST_PP_ITERATION_3 103 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 104 && BOOST_PP_ITERATION_FINISH_3 >= 104 # define BOOST_PP_ITERATION_3 104 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 105 && BOOST_PP_ITERATION_FINISH_3 >= 105 # define BOOST_PP_ITERATION_3 105 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 106 && BOOST_PP_ITERATION_FINISH_3 >= 106 # define BOOST_PP_ITERATION_3 106 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 107 && BOOST_PP_ITERATION_FINISH_3 >= 107 # define BOOST_PP_ITERATION_3 107 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 108 && BOOST_PP_ITERATION_FINISH_3 >= 108 # define BOOST_PP_ITERATION_3 108 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 109 && BOOST_PP_ITERATION_FINISH_3 >= 109 # define BOOST_PP_ITERATION_3 109 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 110 && BOOST_PP_ITERATION_FINISH_3 >= 110 # define BOOST_PP_ITERATION_3 110 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 111 && BOOST_PP_ITERATION_FINISH_3 >= 111 # define BOOST_PP_ITERATION_3 111 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 112 && BOOST_PP_ITERATION_FINISH_3 >= 112 # define BOOST_PP_ITERATION_3 112 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 113 && BOOST_PP_ITERATION_FINISH_3 >= 113 # define BOOST_PP_ITERATION_3 113 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 114 && BOOST_PP_ITERATION_FINISH_3 >= 114 # define BOOST_PP_ITERATION_3 114 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 115 && BOOST_PP_ITERATION_FINISH_3 >= 115 # define BOOST_PP_ITERATION_3 115 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 116 && BOOST_PP_ITERATION_FINISH_3 >= 116 # define BOOST_PP_ITERATION_3 116 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 117 && BOOST_PP_ITERATION_FINISH_3 >= 117 # define BOOST_PP_ITERATION_3 117 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 118 && BOOST_PP_ITERATION_FINISH_3 >= 118 # define BOOST_PP_ITERATION_3 118 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 119 && BOOST_PP_ITERATION_FINISH_3 >= 119 # define BOOST_PP_ITERATION_3 119 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 120 && BOOST_PP_ITERATION_FINISH_3 >= 120 # define BOOST_PP_ITERATION_3 120 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 121 && BOOST_PP_ITERATION_FINISH_3 >= 121 # define BOOST_PP_ITERATION_3 121 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 122 && BOOST_PP_ITERATION_FINISH_3 >= 122 # define BOOST_PP_ITERATION_3 122 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 123 && BOOST_PP_ITERATION_FINISH_3 >= 123 # define BOOST_PP_ITERATION_3 123 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 124 && BOOST_PP_ITERATION_FINISH_3 >= 124 # define BOOST_PP_ITERATION_3 124 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 125 && BOOST_PP_ITERATION_FINISH_3 >= 125 # define BOOST_PP_ITERATION_3 125 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 126 && BOOST_PP_ITERATION_FINISH_3 >= 126 # define BOOST_PP_ITERATION_3 126 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 127 && BOOST_PP_ITERATION_FINISH_3 >= 127 # define BOOST_PP_ITERATION_3 127 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 128 && BOOST_PP_ITERATION_FINISH_3 >= 128 # define BOOST_PP_ITERATION_3 128 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 129 && BOOST_PP_ITERATION_FINISH_3 >= 129 # define BOOST_PP_ITERATION_3 129 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 130 && BOOST_PP_ITERATION_FINISH_3 >= 130 # define BOOST_PP_ITERATION_3 130 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 131 && BOOST_PP_ITERATION_FINISH_3 >= 131 # define BOOST_PP_ITERATION_3 131 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 132 && BOOST_PP_ITERATION_FINISH_3 >= 132 # define BOOST_PP_ITERATION_3 132 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 133 && BOOST_PP_ITERATION_FINISH_3 >= 133 # define BOOST_PP_ITERATION_3 133 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 134 && BOOST_PP_ITERATION_FINISH_3 >= 134 # define BOOST_PP_ITERATION_3 134 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 135 && BOOST_PP_ITERATION_FINISH_3 >= 135 # define BOOST_PP_ITERATION_3 135 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 136 && BOOST_PP_ITERATION_FINISH_3 >= 136 # define BOOST_PP_ITERATION_3 136 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 137 && BOOST_PP_ITERATION_FINISH_3 >= 137 # define BOOST_PP_ITERATION_3 137 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 138 && BOOST_PP_ITERATION_FINISH_3 >= 138 # define BOOST_PP_ITERATION_3 138 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 139 && BOOST_PP_ITERATION_FINISH_3 >= 139 # define BOOST_PP_ITERATION_3 139 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 140 && BOOST_PP_ITERATION_FINISH_3 >= 140 # define BOOST_PP_ITERATION_3 140 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 141 && BOOST_PP_ITERATION_FINISH_3 >= 141 # define BOOST_PP_ITERATION_3 141 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 142 && BOOST_PP_ITERATION_FINISH_3 >= 142 # define BOOST_PP_ITERATION_3 142 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 143 && BOOST_PP_ITERATION_FINISH_3 >= 143 # define BOOST_PP_ITERATION_3 143 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 144 && BOOST_PP_ITERATION_FINISH_3 >= 144 # define BOOST_PP_ITERATION_3 144 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 145 && BOOST_PP_ITERATION_FINISH_3 >= 145 # define BOOST_PP_ITERATION_3 145 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 146 && BOOST_PP_ITERATION_FINISH_3 >= 146 # define BOOST_PP_ITERATION_3 146 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 147 && BOOST_PP_ITERATION_FINISH_3 >= 147 # define BOOST_PP_ITERATION_3 147 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 148 && BOOST_PP_ITERATION_FINISH_3 >= 148 # define BOOST_PP_ITERATION_3 148 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 149 && BOOST_PP_ITERATION_FINISH_3 >= 149 # define BOOST_PP_ITERATION_3 149 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 150 && BOOST_PP_ITERATION_FINISH_3 >= 150 # define BOOST_PP_ITERATION_3 150 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 151 && BOOST_PP_ITERATION_FINISH_3 >= 151 # define BOOST_PP_ITERATION_3 151 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 152 && BOOST_PP_ITERATION_FINISH_3 >= 152 # define BOOST_PP_ITERATION_3 152 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 153 && BOOST_PP_ITERATION_FINISH_3 >= 153 # define BOOST_PP_ITERATION_3 153 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 154 && BOOST_PP_ITERATION_FINISH_3 >= 154 # define BOOST_PP_ITERATION_3 154 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 155 && BOOST_PP_ITERATION_FINISH_3 >= 155 # define BOOST_PP_ITERATION_3 155 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 156 && BOOST_PP_ITERATION_FINISH_3 >= 156 # define BOOST_PP_ITERATION_3 156 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 157 && BOOST_PP_ITERATION_FINISH_3 >= 157 # define BOOST_PP_ITERATION_3 157 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 158 && BOOST_PP_ITERATION_FINISH_3 >= 158 # define BOOST_PP_ITERATION_3 158 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 159 && BOOST_PP_ITERATION_FINISH_3 >= 159 # define BOOST_PP_ITERATION_3 159 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 160 && BOOST_PP_ITERATION_FINISH_3 >= 160 # define BOOST_PP_ITERATION_3 160 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 161 && BOOST_PP_ITERATION_FINISH_3 >= 161 # define BOOST_PP_ITERATION_3 161 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 162 && BOOST_PP_ITERATION_FINISH_3 >= 162 # define BOOST_PP_ITERATION_3 162 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 163 && BOOST_PP_ITERATION_FINISH_3 >= 163 # define BOOST_PP_ITERATION_3 163 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 164 && BOOST_PP_ITERATION_FINISH_3 >= 164 # define BOOST_PP_ITERATION_3 164 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 165 && BOOST_PP_ITERATION_FINISH_3 >= 165 # define BOOST_PP_ITERATION_3 165 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 166 && BOOST_PP_ITERATION_FINISH_3 >= 166 # define BOOST_PP_ITERATION_3 166 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 167 && BOOST_PP_ITERATION_FINISH_3 >= 167 # define BOOST_PP_ITERATION_3 167 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 168 && BOOST_PP_ITERATION_FINISH_3 >= 168 # define BOOST_PP_ITERATION_3 168 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 169 && BOOST_PP_ITERATION_FINISH_3 >= 169 # define BOOST_PP_ITERATION_3 169 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 170 && BOOST_PP_ITERATION_FINISH_3 >= 170 # define BOOST_PP_ITERATION_3 170 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 171 && BOOST_PP_ITERATION_FINISH_3 >= 171 # define BOOST_PP_ITERATION_3 171 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 172 && BOOST_PP_ITERATION_FINISH_3 >= 172 # define BOOST_PP_ITERATION_3 172 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 173 && BOOST_PP_ITERATION_FINISH_3 >= 173 # define BOOST_PP_ITERATION_3 173 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 174 && BOOST_PP_ITERATION_FINISH_3 >= 174 # define BOOST_PP_ITERATION_3 174 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 175 && BOOST_PP_ITERATION_FINISH_3 >= 175 # define BOOST_PP_ITERATION_3 175 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 176 && BOOST_PP_ITERATION_FINISH_3 >= 176 # define BOOST_PP_ITERATION_3 176 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 177 && BOOST_PP_ITERATION_FINISH_3 >= 177 # define BOOST_PP_ITERATION_3 177 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 178 && BOOST_PP_ITERATION_FINISH_3 >= 178 # define BOOST_PP_ITERATION_3 178 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 179 && BOOST_PP_ITERATION_FINISH_3 >= 179 # define BOOST_PP_ITERATION_3 179 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 180 && BOOST_PP_ITERATION_FINISH_3 >= 180 # define BOOST_PP_ITERATION_3 180 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 181 && BOOST_PP_ITERATION_FINISH_3 >= 181 # define BOOST_PP_ITERATION_3 181 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 182 && BOOST_PP_ITERATION_FINISH_3 >= 182 # define BOOST_PP_ITERATION_3 182 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 183 && BOOST_PP_ITERATION_FINISH_3 >= 183 # define BOOST_PP_ITERATION_3 183 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 184 && BOOST_PP_ITERATION_FINISH_3 >= 184 # define BOOST_PP_ITERATION_3 184 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 185 && BOOST_PP_ITERATION_FINISH_3 >= 185 # define BOOST_PP_ITERATION_3 185 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 186 && BOOST_PP_ITERATION_FINISH_3 >= 186 # define BOOST_PP_ITERATION_3 186 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 187 && BOOST_PP_ITERATION_FINISH_3 >= 187 # define BOOST_PP_ITERATION_3 187 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 188 && BOOST_PP_ITERATION_FINISH_3 >= 188 # define BOOST_PP_ITERATION_3 188 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 189 && BOOST_PP_ITERATION_FINISH_3 >= 189 # define BOOST_PP_ITERATION_3 189 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 190 && BOOST_PP_ITERATION_FINISH_3 >= 190 # define BOOST_PP_ITERATION_3 190 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 191 && BOOST_PP_ITERATION_FINISH_3 >= 191 # define BOOST_PP_ITERATION_3 191 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 192 && BOOST_PP_ITERATION_FINISH_3 >= 192 # define BOOST_PP_ITERATION_3 192 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 193 && BOOST_PP_ITERATION_FINISH_3 >= 193 # define BOOST_PP_ITERATION_3 193 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 194 && BOOST_PP_ITERATION_FINISH_3 >= 194 # define BOOST_PP_ITERATION_3 194 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 195 && BOOST_PP_ITERATION_FINISH_3 >= 195 # define BOOST_PP_ITERATION_3 195 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 196 && BOOST_PP_ITERATION_FINISH_3 >= 196 # define BOOST_PP_ITERATION_3 196 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 197 && BOOST_PP_ITERATION_FINISH_3 >= 197 # define BOOST_PP_ITERATION_3 197 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 198 && BOOST_PP_ITERATION_FINISH_3 >= 198 # define BOOST_PP_ITERATION_3 198 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 199 && BOOST_PP_ITERATION_FINISH_3 >= 199 # define BOOST_PP_ITERATION_3 199 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 200 && BOOST_PP_ITERATION_FINISH_3 >= 200 # define BOOST_PP_ITERATION_3 200 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 201 && BOOST_PP_ITERATION_FINISH_3 >= 201 # define BOOST_PP_ITERATION_3 201 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 202 && BOOST_PP_ITERATION_FINISH_3 >= 202 # define BOOST_PP_ITERATION_3 202 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 203 && BOOST_PP_ITERATION_FINISH_3 >= 203 # define BOOST_PP_ITERATION_3 203 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 204 && BOOST_PP_ITERATION_FINISH_3 >= 204 # define BOOST_PP_ITERATION_3 204 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 205 && BOOST_PP_ITERATION_FINISH_3 >= 205 # define BOOST_PP_ITERATION_3 205 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 206 && BOOST_PP_ITERATION_FINISH_3 >= 206 # define BOOST_PP_ITERATION_3 206 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 207 && BOOST_PP_ITERATION_FINISH_3 >= 207 # define BOOST_PP_ITERATION_3 207 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 208 && BOOST_PP_ITERATION_FINISH_3 >= 208 # define BOOST_PP_ITERATION_3 208 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 209 && BOOST_PP_ITERATION_FINISH_3 >= 209 # define BOOST_PP_ITERATION_3 209 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 210 && BOOST_PP_ITERATION_FINISH_3 >= 210 # define BOOST_PP_ITERATION_3 210 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 211 && BOOST_PP_ITERATION_FINISH_3 >= 211 # define BOOST_PP_ITERATION_3 211 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 212 && BOOST_PP_ITERATION_FINISH_3 >= 212 # define BOOST_PP_ITERATION_3 212 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 213 && BOOST_PP_ITERATION_FINISH_3 >= 213 # define BOOST_PP_ITERATION_3 213 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 214 && BOOST_PP_ITERATION_FINISH_3 >= 214 # define BOOST_PP_ITERATION_3 214 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 215 && BOOST_PP_ITERATION_FINISH_3 >= 215 # define BOOST_PP_ITERATION_3 215 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 216 && BOOST_PP_ITERATION_FINISH_3 >= 216 # define BOOST_PP_ITERATION_3 216 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 217 && BOOST_PP_ITERATION_FINISH_3 >= 217 # define BOOST_PP_ITERATION_3 217 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 218 && BOOST_PP_ITERATION_FINISH_3 >= 218 # define BOOST_PP_ITERATION_3 218 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 219 && BOOST_PP_ITERATION_FINISH_3 >= 219 # define BOOST_PP_ITERATION_3 219 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 220 && BOOST_PP_ITERATION_FINISH_3 >= 220 # define BOOST_PP_ITERATION_3 220 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 221 && BOOST_PP_ITERATION_FINISH_3 >= 221 # define BOOST_PP_ITERATION_3 221 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 222 && BOOST_PP_ITERATION_FINISH_3 >= 222 # define BOOST_PP_ITERATION_3 222 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 223 && BOOST_PP_ITERATION_FINISH_3 >= 223 # define BOOST_PP_ITERATION_3 223 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 224 && BOOST_PP_ITERATION_FINISH_3 >= 224 # define BOOST_PP_ITERATION_3 224 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 225 && BOOST_PP_ITERATION_FINISH_3 >= 225 # define BOOST_PP_ITERATION_3 225 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 226 && BOOST_PP_ITERATION_FINISH_3 >= 226 # define BOOST_PP_ITERATION_3 226 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 227 && BOOST_PP_ITERATION_FINISH_3 >= 227 # define BOOST_PP_ITERATION_3 227 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 228 && BOOST_PP_ITERATION_FINISH_3 >= 228 # define BOOST_PP_ITERATION_3 228 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 229 && BOOST_PP_ITERATION_FINISH_3 >= 229 # define BOOST_PP_ITERATION_3 229 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 230 && BOOST_PP_ITERATION_FINISH_3 >= 230 # define BOOST_PP_ITERATION_3 230 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 231 && BOOST_PP_ITERATION_FINISH_3 >= 231 # define BOOST_PP_ITERATION_3 231 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 232 && BOOST_PP_ITERATION_FINISH_3 >= 232 # define BOOST_PP_ITERATION_3 232 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 233 && BOOST_PP_ITERATION_FINISH_3 >= 233 # define BOOST_PP_ITERATION_3 233 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 234 && BOOST_PP_ITERATION_FINISH_3 >= 234 # define BOOST_PP_ITERATION_3 234 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 235 && BOOST_PP_ITERATION_FINISH_3 >= 235 # define BOOST_PP_ITERATION_3 235 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 236 && BOOST_PP_ITERATION_FINISH_3 >= 236 # define BOOST_PP_ITERATION_3 236 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 237 && BOOST_PP_ITERATION_FINISH_3 >= 237 # define BOOST_PP_ITERATION_3 237 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 238 && BOOST_PP_ITERATION_FINISH_3 >= 238 # define BOOST_PP_ITERATION_3 238 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 239 && BOOST_PP_ITERATION_FINISH_3 >= 239 # define BOOST_PP_ITERATION_3 239 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 240 && BOOST_PP_ITERATION_FINISH_3 >= 240 # define BOOST_PP_ITERATION_3 240 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 241 && BOOST_PP_ITERATION_FINISH_3 >= 241 # define BOOST_PP_ITERATION_3 241 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 242 && BOOST_PP_ITERATION_FINISH_3 >= 242 # define BOOST_PP_ITERATION_3 242 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 243 && BOOST_PP_ITERATION_FINISH_3 >= 243 # define BOOST_PP_ITERATION_3 243 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 244 && BOOST_PP_ITERATION_FINISH_3 >= 244 # define BOOST_PP_ITERATION_3 244 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 245 && BOOST_PP_ITERATION_FINISH_3 >= 245 # define BOOST_PP_ITERATION_3 245 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 246 && BOOST_PP_ITERATION_FINISH_3 >= 246 # define BOOST_PP_ITERATION_3 246 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 247 && BOOST_PP_ITERATION_FINISH_3 >= 247 # define BOOST_PP_ITERATION_3 247 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 248 && BOOST_PP_ITERATION_FINISH_3 >= 248 # define BOOST_PP_ITERATION_3 248 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 249 && BOOST_PP_ITERATION_FINISH_3 >= 249 # define BOOST_PP_ITERATION_3 249 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 250 && BOOST_PP_ITERATION_FINISH_3 >= 250 # define BOOST_PP_ITERATION_3 250 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 251 && BOOST_PP_ITERATION_FINISH_3 >= 251 # define BOOST_PP_ITERATION_3 251 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 252 && BOOST_PP_ITERATION_FINISH_3 >= 252 # define BOOST_PP_ITERATION_3 252 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 253 && BOOST_PP_ITERATION_FINISH_3 >= 253 # define BOOST_PP_ITERATION_3 253 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 254 && BOOST_PP_ITERATION_FINISH_3 >= 254 # define BOOST_PP_ITERATION_3 254 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 255 && BOOST_PP_ITERATION_FINISH_3 >= 255 # define BOOST_PP_ITERATION_3 255 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_START_3 <= 256 && BOOST_PP_ITERATION_FINISH_3 >= 256 # define BOOST_PP_ITERATION_3 256 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # endif # # undef BOOST_PP_ITERATION_DEPTH # define BOOST_PP_ITERATION_DEPTH() 2 # # undef BOOST_PP_ITERATION_START_3 # undef BOOST_PP_ITERATION_FINISH_3 # undef BOOST_PP_FILENAME_3 # # undef BOOST_PP_ITERATION_FLAGS_3 # undef BOOST_PP_ITERATION_PARAMS_3 ================================================ FILE: benchmarks/boost/preprocessor/iteration/detail/iter/forward4.hpp ================================================ # /* ************************************************************************** # * * # * (C) Copyright Paul Mensonides 2002. # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # * * # ************************************************************************** */ # # /* See http://www.boost.org for most recent version. */ # # if defined(BOOST_PP_ITERATION_LIMITS) # if !defined(BOOST_PP_FILENAME_4) # error BOOST_PP_ERROR: depth #4 filename is not defined # endif # define BOOST_PP_VALUE BOOST_PP_TUPLE_ELEM(2, 0, BOOST_PP_ITERATION_LIMITS) # include # define BOOST_PP_VALUE BOOST_PP_TUPLE_ELEM(2, 1, BOOST_PP_ITERATION_LIMITS) # include # define BOOST_PP_ITERATION_FLAGS_4() 0 # undef BOOST_PP_ITERATION_LIMITS # elif defined(BOOST_PP_ITERATION_PARAMS_4) # define BOOST_PP_VALUE BOOST_PP_ARRAY_ELEM(0, BOOST_PP_ITERATION_PARAMS_4) # include # define BOOST_PP_VALUE BOOST_PP_ARRAY_ELEM(1, BOOST_PP_ITERATION_PARAMS_4) # include # define BOOST_PP_FILENAME_4 BOOST_PP_ARRAY_ELEM(2, BOOST_PP_ITERATION_PARAMS_4) # if BOOST_PP_ARRAY_SIZE(BOOST_PP_ITERATION_PARAMS_4) >= 4 # define BOOST_PP_ITERATION_FLAGS_4() BOOST_PP_ARRAY_ELEM(3, BOOST_PP_ITERATION_PARAMS_4) # else # define BOOST_PP_ITERATION_FLAGS_4() 0 # endif # else # error BOOST_PP_ERROR: depth #4 iteration boundaries or filename not defined # endif # # undef BOOST_PP_ITERATION_DEPTH # define BOOST_PP_ITERATION_DEPTH() 4 # # if (BOOST_PP_ITERATION_START_4) > (BOOST_PP_ITERATION_FINISH_4) # include # else # if BOOST_PP_ITERATION_START_4 <= 0 && BOOST_PP_ITERATION_FINISH_4 >= 0 # define BOOST_PP_ITERATION_4 0 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 1 && BOOST_PP_ITERATION_FINISH_4 >= 1 # define BOOST_PP_ITERATION_4 1 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 2 && BOOST_PP_ITERATION_FINISH_4 >= 2 # define BOOST_PP_ITERATION_4 2 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 3 && BOOST_PP_ITERATION_FINISH_4 >= 3 # define BOOST_PP_ITERATION_4 3 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 4 && BOOST_PP_ITERATION_FINISH_4 >= 4 # define BOOST_PP_ITERATION_4 4 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 5 && BOOST_PP_ITERATION_FINISH_4 >= 5 # define BOOST_PP_ITERATION_4 5 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 6 && BOOST_PP_ITERATION_FINISH_4 >= 6 # define BOOST_PP_ITERATION_4 6 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 7 && BOOST_PP_ITERATION_FINISH_4 >= 7 # define BOOST_PP_ITERATION_4 7 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 8 && BOOST_PP_ITERATION_FINISH_4 >= 8 # define BOOST_PP_ITERATION_4 8 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 9 && BOOST_PP_ITERATION_FINISH_4 >= 9 # define BOOST_PP_ITERATION_4 9 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 10 && BOOST_PP_ITERATION_FINISH_4 >= 10 # define BOOST_PP_ITERATION_4 10 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 11 && BOOST_PP_ITERATION_FINISH_4 >= 11 # define BOOST_PP_ITERATION_4 11 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 12 && BOOST_PP_ITERATION_FINISH_4 >= 12 # define BOOST_PP_ITERATION_4 12 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 13 && BOOST_PP_ITERATION_FINISH_4 >= 13 # define BOOST_PP_ITERATION_4 13 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 14 && BOOST_PP_ITERATION_FINISH_4 >= 14 # define BOOST_PP_ITERATION_4 14 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 15 && BOOST_PP_ITERATION_FINISH_4 >= 15 # define BOOST_PP_ITERATION_4 15 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 16 && BOOST_PP_ITERATION_FINISH_4 >= 16 # define BOOST_PP_ITERATION_4 16 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 17 && BOOST_PP_ITERATION_FINISH_4 >= 17 # define BOOST_PP_ITERATION_4 17 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 18 && BOOST_PP_ITERATION_FINISH_4 >= 18 # define BOOST_PP_ITERATION_4 18 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 19 && BOOST_PP_ITERATION_FINISH_4 >= 19 # define BOOST_PP_ITERATION_4 19 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 20 && BOOST_PP_ITERATION_FINISH_4 >= 20 # define BOOST_PP_ITERATION_4 20 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 21 && BOOST_PP_ITERATION_FINISH_4 >= 21 # define BOOST_PP_ITERATION_4 21 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 22 && BOOST_PP_ITERATION_FINISH_4 >= 22 # define BOOST_PP_ITERATION_4 22 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 23 && BOOST_PP_ITERATION_FINISH_4 >= 23 # define BOOST_PP_ITERATION_4 23 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 24 && BOOST_PP_ITERATION_FINISH_4 >= 24 # define BOOST_PP_ITERATION_4 24 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 25 && BOOST_PP_ITERATION_FINISH_4 >= 25 # define BOOST_PP_ITERATION_4 25 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 26 && BOOST_PP_ITERATION_FINISH_4 >= 26 # define BOOST_PP_ITERATION_4 26 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 27 && BOOST_PP_ITERATION_FINISH_4 >= 27 # define BOOST_PP_ITERATION_4 27 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 28 && BOOST_PP_ITERATION_FINISH_4 >= 28 # define BOOST_PP_ITERATION_4 28 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 29 && BOOST_PP_ITERATION_FINISH_4 >= 29 # define BOOST_PP_ITERATION_4 29 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 30 && BOOST_PP_ITERATION_FINISH_4 >= 30 # define BOOST_PP_ITERATION_4 30 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 31 && BOOST_PP_ITERATION_FINISH_4 >= 31 # define BOOST_PP_ITERATION_4 31 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 32 && BOOST_PP_ITERATION_FINISH_4 >= 32 # define BOOST_PP_ITERATION_4 32 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 33 && BOOST_PP_ITERATION_FINISH_4 >= 33 # define BOOST_PP_ITERATION_4 33 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 34 && BOOST_PP_ITERATION_FINISH_4 >= 34 # define BOOST_PP_ITERATION_4 34 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 35 && BOOST_PP_ITERATION_FINISH_4 >= 35 # define BOOST_PP_ITERATION_4 35 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 36 && BOOST_PP_ITERATION_FINISH_4 >= 36 # define BOOST_PP_ITERATION_4 36 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 37 && BOOST_PP_ITERATION_FINISH_4 >= 37 # define BOOST_PP_ITERATION_4 37 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 38 && BOOST_PP_ITERATION_FINISH_4 >= 38 # define BOOST_PP_ITERATION_4 38 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 39 && BOOST_PP_ITERATION_FINISH_4 >= 39 # define BOOST_PP_ITERATION_4 39 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 40 && BOOST_PP_ITERATION_FINISH_4 >= 40 # define BOOST_PP_ITERATION_4 40 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 41 && BOOST_PP_ITERATION_FINISH_4 >= 41 # define BOOST_PP_ITERATION_4 41 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 42 && BOOST_PP_ITERATION_FINISH_4 >= 42 # define BOOST_PP_ITERATION_4 42 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 43 && BOOST_PP_ITERATION_FINISH_4 >= 43 # define BOOST_PP_ITERATION_4 43 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 44 && BOOST_PP_ITERATION_FINISH_4 >= 44 # define BOOST_PP_ITERATION_4 44 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 45 && BOOST_PP_ITERATION_FINISH_4 >= 45 # define BOOST_PP_ITERATION_4 45 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 46 && BOOST_PP_ITERATION_FINISH_4 >= 46 # define BOOST_PP_ITERATION_4 46 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 47 && BOOST_PP_ITERATION_FINISH_4 >= 47 # define BOOST_PP_ITERATION_4 47 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 48 && BOOST_PP_ITERATION_FINISH_4 >= 48 # define BOOST_PP_ITERATION_4 48 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 49 && BOOST_PP_ITERATION_FINISH_4 >= 49 # define BOOST_PP_ITERATION_4 49 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 50 && BOOST_PP_ITERATION_FINISH_4 >= 50 # define BOOST_PP_ITERATION_4 50 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 51 && BOOST_PP_ITERATION_FINISH_4 >= 51 # define BOOST_PP_ITERATION_4 51 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 52 && BOOST_PP_ITERATION_FINISH_4 >= 52 # define BOOST_PP_ITERATION_4 52 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 53 && BOOST_PP_ITERATION_FINISH_4 >= 53 # define BOOST_PP_ITERATION_4 53 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 54 && BOOST_PP_ITERATION_FINISH_4 >= 54 # define BOOST_PP_ITERATION_4 54 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 55 && BOOST_PP_ITERATION_FINISH_4 >= 55 # define BOOST_PP_ITERATION_4 55 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 56 && BOOST_PP_ITERATION_FINISH_4 >= 56 # define BOOST_PP_ITERATION_4 56 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 57 && BOOST_PP_ITERATION_FINISH_4 >= 57 # define BOOST_PP_ITERATION_4 57 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 58 && BOOST_PP_ITERATION_FINISH_4 >= 58 # define BOOST_PP_ITERATION_4 58 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 59 && BOOST_PP_ITERATION_FINISH_4 >= 59 # define BOOST_PP_ITERATION_4 59 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 60 && BOOST_PP_ITERATION_FINISH_4 >= 60 # define BOOST_PP_ITERATION_4 60 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 61 && BOOST_PP_ITERATION_FINISH_4 >= 61 # define BOOST_PP_ITERATION_4 61 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 62 && BOOST_PP_ITERATION_FINISH_4 >= 62 # define BOOST_PP_ITERATION_4 62 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 63 && BOOST_PP_ITERATION_FINISH_4 >= 63 # define BOOST_PP_ITERATION_4 63 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 64 && BOOST_PP_ITERATION_FINISH_4 >= 64 # define BOOST_PP_ITERATION_4 64 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 65 && BOOST_PP_ITERATION_FINISH_4 >= 65 # define BOOST_PP_ITERATION_4 65 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 66 && BOOST_PP_ITERATION_FINISH_4 >= 66 # define BOOST_PP_ITERATION_4 66 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 67 && BOOST_PP_ITERATION_FINISH_4 >= 67 # define BOOST_PP_ITERATION_4 67 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 68 && BOOST_PP_ITERATION_FINISH_4 >= 68 # define BOOST_PP_ITERATION_4 68 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 69 && BOOST_PP_ITERATION_FINISH_4 >= 69 # define BOOST_PP_ITERATION_4 69 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 70 && BOOST_PP_ITERATION_FINISH_4 >= 70 # define BOOST_PP_ITERATION_4 70 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 71 && BOOST_PP_ITERATION_FINISH_4 >= 71 # define BOOST_PP_ITERATION_4 71 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 72 && BOOST_PP_ITERATION_FINISH_4 >= 72 # define BOOST_PP_ITERATION_4 72 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 73 && BOOST_PP_ITERATION_FINISH_4 >= 73 # define BOOST_PP_ITERATION_4 73 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 74 && BOOST_PP_ITERATION_FINISH_4 >= 74 # define BOOST_PP_ITERATION_4 74 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 75 && BOOST_PP_ITERATION_FINISH_4 >= 75 # define BOOST_PP_ITERATION_4 75 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 76 && BOOST_PP_ITERATION_FINISH_4 >= 76 # define BOOST_PP_ITERATION_4 76 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 77 && BOOST_PP_ITERATION_FINISH_4 >= 77 # define BOOST_PP_ITERATION_4 77 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 78 && BOOST_PP_ITERATION_FINISH_4 >= 78 # define BOOST_PP_ITERATION_4 78 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 79 && BOOST_PP_ITERATION_FINISH_4 >= 79 # define BOOST_PP_ITERATION_4 79 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 80 && BOOST_PP_ITERATION_FINISH_4 >= 80 # define BOOST_PP_ITERATION_4 80 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 81 && BOOST_PP_ITERATION_FINISH_4 >= 81 # define BOOST_PP_ITERATION_4 81 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 82 && BOOST_PP_ITERATION_FINISH_4 >= 82 # define BOOST_PP_ITERATION_4 82 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 83 && BOOST_PP_ITERATION_FINISH_4 >= 83 # define BOOST_PP_ITERATION_4 83 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 84 && BOOST_PP_ITERATION_FINISH_4 >= 84 # define BOOST_PP_ITERATION_4 84 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 85 && BOOST_PP_ITERATION_FINISH_4 >= 85 # define BOOST_PP_ITERATION_4 85 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 86 && BOOST_PP_ITERATION_FINISH_4 >= 86 # define BOOST_PP_ITERATION_4 86 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 87 && BOOST_PP_ITERATION_FINISH_4 >= 87 # define BOOST_PP_ITERATION_4 87 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 88 && BOOST_PP_ITERATION_FINISH_4 >= 88 # define BOOST_PP_ITERATION_4 88 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 89 && BOOST_PP_ITERATION_FINISH_4 >= 89 # define BOOST_PP_ITERATION_4 89 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 90 && BOOST_PP_ITERATION_FINISH_4 >= 90 # define BOOST_PP_ITERATION_4 90 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 91 && BOOST_PP_ITERATION_FINISH_4 >= 91 # define BOOST_PP_ITERATION_4 91 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 92 && BOOST_PP_ITERATION_FINISH_4 >= 92 # define BOOST_PP_ITERATION_4 92 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 93 && BOOST_PP_ITERATION_FINISH_4 >= 93 # define BOOST_PP_ITERATION_4 93 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 94 && BOOST_PP_ITERATION_FINISH_4 >= 94 # define BOOST_PP_ITERATION_4 94 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 95 && BOOST_PP_ITERATION_FINISH_4 >= 95 # define BOOST_PP_ITERATION_4 95 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 96 && BOOST_PP_ITERATION_FINISH_4 >= 96 # define BOOST_PP_ITERATION_4 96 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 97 && BOOST_PP_ITERATION_FINISH_4 >= 97 # define BOOST_PP_ITERATION_4 97 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 98 && BOOST_PP_ITERATION_FINISH_4 >= 98 # define BOOST_PP_ITERATION_4 98 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 99 && BOOST_PP_ITERATION_FINISH_4 >= 99 # define BOOST_PP_ITERATION_4 99 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 100 && BOOST_PP_ITERATION_FINISH_4 >= 100 # define BOOST_PP_ITERATION_4 100 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 101 && BOOST_PP_ITERATION_FINISH_4 >= 101 # define BOOST_PP_ITERATION_4 101 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 102 && BOOST_PP_ITERATION_FINISH_4 >= 102 # define BOOST_PP_ITERATION_4 102 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 103 && BOOST_PP_ITERATION_FINISH_4 >= 103 # define BOOST_PP_ITERATION_4 103 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 104 && BOOST_PP_ITERATION_FINISH_4 >= 104 # define BOOST_PP_ITERATION_4 104 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 105 && BOOST_PP_ITERATION_FINISH_4 >= 105 # define BOOST_PP_ITERATION_4 105 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 106 && BOOST_PP_ITERATION_FINISH_4 >= 106 # define BOOST_PP_ITERATION_4 106 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 107 && BOOST_PP_ITERATION_FINISH_4 >= 107 # define BOOST_PP_ITERATION_4 107 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 108 && BOOST_PP_ITERATION_FINISH_4 >= 108 # define BOOST_PP_ITERATION_4 108 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 109 && BOOST_PP_ITERATION_FINISH_4 >= 109 # define BOOST_PP_ITERATION_4 109 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 110 && BOOST_PP_ITERATION_FINISH_4 >= 110 # define BOOST_PP_ITERATION_4 110 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 111 && BOOST_PP_ITERATION_FINISH_4 >= 111 # define BOOST_PP_ITERATION_4 111 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 112 && BOOST_PP_ITERATION_FINISH_4 >= 112 # define BOOST_PP_ITERATION_4 112 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 113 && BOOST_PP_ITERATION_FINISH_4 >= 113 # define BOOST_PP_ITERATION_4 113 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 114 && BOOST_PP_ITERATION_FINISH_4 >= 114 # define BOOST_PP_ITERATION_4 114 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 115 && BOOST_PP_ITERATION_FINISH_4 >= 115 # define BOOST_PP_ITERATION_4 115 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 116 && BOOST_PP_ITERATION_FINISH_4 >= 116 # define BOOST_PP_ITERATION_4 116 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 117 && BOOST_PP_ITERATION_FINISH_4 >= 117 # define BOOST_PP_ITERATION_4 117 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 118 && BOOST_PP_ITERATION_FINISH_4 >= 118 # define BOOST_PP_ITERATION_4 118 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 119 && BOOST_PP_ITERATION_FINISH_4 >= 119 # define BOOST_PP_ITERATION_4 119 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 120 && BOOST_PP_ITERATION_FINISH_4 >= 120 # define BOOST_PP_ITERATION_4 120 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 121 && BOOST_PP_ITERATION_FINISH_4 >= 121 # define BOOST_PP_ITERATION_4 121 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 122 && BOOST_PP_ITERATION_FINISH_4 >= 122 # define BOOST_PP_ITERATION_4 122 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 123 && BOOST_PP_ITERATION_FINISH_4 >= 123 # define BOOST_PP_ITERATION_4 123 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 124 && BOOST_PP_ITERATION_FINISH_4 >= 124 # define BOOST_PP_ITERATION_4 124 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 125 && BOOST_PP_ITERATION_FINISH_4 >= 125 # define BOOST_PP_ITERATION_4 125 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 126 && BOOST_PP_ITERATION_FINISH_4 >= 126 # define BOOST_PP_ITERATION_4 126 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 127 && BOOST_PP_ITERATION_FINISH_4 >= 127 # define BOOST_PP_ITERATION_4 127 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 128 && BOOST_PP_ITERATION_FINISH_4 >= 128 # define BOOST_PP_ITERATION_4 128 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 129 && BOOST_PP_ITERATION_FINISH_4 >= 129 # define BOOST_PP_ITERATION_4 129 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 130 && BOOST_PP_ITERATION_FINISH_4 >= 130 # define BOOST_PP_ITERATION_4 130 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 131 && BOOST_PP_ITERATION_FINISH_4 >= 131 # define BOOST_PP_ITERATION_4 131 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 132 && BOOST_PP_ITERATION_FINISH_4 >= 132 # define BOOST_PP_ITERATION_4 132 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 133 && BOOST_PP_ITERATION_FINISH_4 >= 133 # define BOOST_PP_ITERATION_4 133 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 134 && BOOST_PP_ITERATION_FINISH_4 >= 134 # define BOOST_PP_ITERATION_4 134 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 135 && BOOST_PP_ITERATION_FINISH_4 >= 135 # define BOOST_PP_ITERATION_4 135 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 136 && BOOST_PP_ITERATION_FINISH_4 >= 136 # define BOOST_PP_ITERATION_4 136 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 137 && BOOST_PP_ITERATION_FINISH_4 >= 137 # define BOOST_PP_ITERATION_4 137 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 138 && BOOST_PP_ITERATION_FINISH_4 >= 138 # define BOOST_PP_ITERATION_4 138 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 139 && BOOST_PP_ITERATION_FINISH_4 >= 139 # define BOOST_PP_ITERATION_4 139 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 140 && BOOST_PP_ITERATION_FINISH_4 >= 140 # define BOOST_PP_ITERATION_4 140 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 141 && BOOST_PP_ITERATION_FINISH_4 >= 141 # define BOOST_PP_ITERATION_4 141 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 142 && BOOST_PP_ITERATION_FINISH_4 >= 142 # define BOOST_PP_ITERATION_4 142 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 143 && BOOST_PP_ITERATION_FINISH_4 >= 143 # define BOOST_PP_ITERATION_4 143 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 144 && BOOST_PP_ITERATION_FINISH_4 >= 144 # define BOOST_PP_ITERATION_4 144 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 145 && BOOST_PP_ITERATION_FINISH_4 >= 145 # define BOOST_PP_ITERATION_4 145 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 146 && BOOST_PP_ITERATION_FINISH_4 >= 146 # define BOOST_PP_ITERATION_4 146 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 147 && BOOST_PP_ITERATION_FINISH_4 >= 147 # define BOOST_PP_ITERATION_4 147 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 148 && BOOST_PP_ITERATION_FINISH_4 >= 148 # define BOOST_PP_ITERATION_4 148 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 149 && BOOST_PP_ITERATION_FINISH_4 >= 149 # define BOOST_PP_ITERATION_4 149 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 150 && BOOST_PP_ITERATION_FINISH_4 >= 150 # define BOOST_PP_ITERATION_4 150 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 151 && BOOST_PP_ITERATION_FINISH_4 >= 151 # define BOOST_PP_ITERATION_4 151 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 152 && BOOST_PP_ITERATION_FINISH_4 >= 152 # define BOOST_PP_ITERATION_4 152 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 153 && BOOST_PP_ITERATION_FINISH_4 >= 153 # define BOOST_PP_ITERATION_4 153 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 154 && BOOST_PP_ITERATION_FINISH_4 >= 154 # define BOOST_PP_ITERATION_4 154 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 155 && BOOST_PP_ITERATION_FINISH_4 >= 155 # define BOOST_PP_ITERATION_4 155 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 156 && BOOST_PP_ITERATION_FINISH_4 >= 156 # define BOOST_PP_ITERATION_4 156 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 157 && BOOST_PP_ITERATION_FINISH_4 >= 157 # define BOOST_PP_ITERATION_4 157 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 158 && BOOST_PP_ITERATION_FINISH_4 >= 158 # define BOOST_PP_ITERATION_4 158 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 159 && BOOST_PP_ITERATION_FINISH_4 >= 159 # define BOOST_PP_ITERATION_4 159 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 160 && BOOST_PP_ITERATION_FINISH_4 >= 160 # define BOOST_PP_ITERATION_4 160 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 161 && BOOST_PP_ITERATION_FINISH_4 >= 161 # define BOOST_PP_ITERATION_4 161 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 162 && BOOST_PP_ITERATION_FINISH_4 >= 162 # define BOOST_PP_ITERATION_4 162 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 163 && BOOST_PP_ITERATION_FINISH_4 >= 163 # define BOOST_PP_ITERATION_4 163 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 164 && BOOST_PP_ITERATION_FINISH_4 >= 164 # define BOOST_PP_ITERATION_4 164 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 165 && BOOST_PP_ITERATION_FINISH_4 >= 165 # define BOOST_PP_ITERATION_4 165 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 166 && BOOST_PP_ITERATION_FINISH_4 >= 166 # define BOOST_PP_ITERATION_4 166 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 167 && BOOST_PP_ITERATION_FINISH_4 >= 167 # define BOOST_PP_ITERATION_4 167 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 168 && BOOST_PP_ITERATION_FINISH_4 >= 168 # define BOOST_PP_ITERATION_4 168 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 169 && BOOST_PP_ITERATION_FINISH_4 >= 169 # define BOOST_PP_ITERATION_4 169 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 170 && BOOST_PP_ITERATION_FINISH_4 >= 170 # define BOOST_PP_ITERATION_4 170 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 171 && BOOST_PP_ITERATION_FINISH_4 >= 171 # define BOOST_PP_ITERATION_4 171 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 172 && BOOST_PP_ITERATION_FINISH_4 >= 172 # define BOOST_PP_ITERATION_4 172 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 173 && BOOST_PP_ITERATION_FINISH_4 >= 173 # define BOOST_PP_ITERATION_4 173 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 174 && BOOST_PP_ITERATION_FINISH_4 >= 174 # define BOOST_PP_ITERATION_4 174 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 175 && BOOST_PP_ITERATION_FINISH_4 >= 175 # define BOOST_PP_ITERATION_4 175 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 176 && BOOST_PP_ITERATION_FINISH_4 >= 176 # define BOOST_PP_ITERATION_4 176 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 177 && BOOST_PP_ITERATION_FINISH_4 >= 177 # define BOOST_PP_ITERATION_4 177 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 178 && BOOST_PP_ITERATION_FINISH_4 >= 178 # define BOOST_PP_ITERATION_4 178 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 179 && BOOST_PP_ITERATION_FINISH_4 >= 179 # define BOOST_PP_ITERATION_4 179 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 180 && BOOST_PP_ITERATION_FINISH_4 >= 180 # define BOOST_PP_ITERATION_4 180 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 181 && BOOST_PP_ITERATION_FINISH_4 >= 181 # define BOOST_PP_ITERATION_4 181 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 182 && BOOST_PP_ITERATION_FINISH_4 >= 182 # define BOOST_PP_ITERATION_4 182 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 183 && BOOST_PP_ITERATION_FINISH_4 >= 183 # define BOOST_PP_ITERATION_4 183 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 184 && BOOST_PP_ITERATION_FINISH_4 >= 184 # define BOOST_PP_ITERATION_4 184 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 185 && BOOST_PP_ITERATION_FINISH_4 >= 185 # define BOOST_PP_ITERATION_4 185 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 186 && BOOST_PP_ITERATION_FINISH_4 >= 186 # define BOOST_PP_ITERATION_4 186 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 187 && BOOST_PP_ITERATION_FINISH_4 >= 187 # define BOOST_PP_ITERATION_4 187 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 188 && BOOST_PP_ITERATION_FINISH_4 >= 188 # define BOOST_PP_ITERATION_4 188 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 189 && BOOST_PP_ITERATION_FINISH_4 >= 189 # define BOOST_PP_ITERATION_4 189 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 190 && BOOST_PP_ITERATION_FINISH_4 >= 190 # define BOOST_PP_ITERATION_4 190 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 191 && BOOST_PP_ITERATION_FINISH_4 >= 191 # define BOOST_PP_ITERATION_4 191 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 192 && BOOST_PP_ITERATION_FINISH_4 >= 192 # define BOOST_PP_ITERATION_4 192 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 193 && BOOST_PP_ITERATION_FINISH_4 >= 193 # define BOOST_PP_ITERATION_4 193 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 194 && BOOST_PP_ITERATION_FINISH_4 >= 194 # define BOOST_PP_ITERATION_4 194 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 195 && BOOST_PP_ITERATION_FINISH_4 >= 195 # define BOOST_PP_ITERATION_4 195 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 196 && BOOST_PP_ITERATION_FINISH_4 >= 196 # define BOOST_PP_ITERATION_4 196 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 197 && BOOST_PP_ITERATION_FINISH_4 >= 197 # define BOOST_PP_ITERATION_4 197 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 198 && BOOST_PP_ITERATION_FINISH_4 >= 198 # define BOOST_PP_ITERATION_4 198 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 199 && BOOST_PP_ITERATION_FINISH_4 >= 199 # define BOOST_PP_ITERATION_4 199 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 200 && BOOST_PP_ITERATION_FINISH_4 >= 200 # define BOOST_PP_ITERATION_4 200 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 201 && BOOST_PP_ITERATION_FINISH_4 >= 201 # define BOOST_PP_ITERATION_4 201 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 202 && BOOST_PP_ITERATION_FINISH_4 >= 202 # define BOOST_PP_ITERATION_4 202 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 203 && BOOST_PP_ITERATION_FINISH_4 >= 203 # define BOOST_PP_ITERATION_4 203 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 204 && BOOST_PP_ITERATION_FINISH_4 >= 204 # define BOOST_PP_ITERATION_4 204 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 205 && BOOST_PP_ITERATION_FINISH_4 >= 205 # define BOOST_PP_ITERATION_4 205 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 206 && BOOST_PP_ITERATION_FINISH_4 >= 206 # define BOOST_PP_ITERATION_4 206 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 207 && BOOST_PP_ITERATION_FINISH_4 >= 207 # define BOOST_PP_ITERATION_4 207 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 208 && BOOST_PP_ITERATION_FINISH_4 >= 208 # define BOOST_PP_ITERATION_4 208 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 209 && BOOST_PP_ITERATION_FINISH_4 >= 209 # define BOOST_PP_ITERATION_4 209 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 210 && BOOST_PP_ITERATION_FINISH_4 >= 210 # define BOOST_PP_ITERATION_4 210 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 211 && BOOST_PP_ITERATION_FINISH_4 >= 211 # define BOOST_PP_ITERATION_4 211 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 212 && BOOST_PP_ITERATION_FINISH_4 >= 212 # define BOOST_PP_ITERATION_4 212 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 213 && BOOST_PP_ITERATION_FINISH_4 >= 213 # define BOOST_PP_ITERATION_4 213 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 214 && BOOST_PP_ITERATION_FINISH_4 >= 214 # define BOOST_PP_ITERATION_4 214 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 215 && BOOST_PP_ITERATION_FINISH_4 >= 215 # define BOOST_PP_ITERATION_4 215 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 216 && BOOST_PP_ITERATION_FINISH_4 >= 216 # define BOOST_PP_ITERATION_4 216 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 217 && BOOST_PP_ITERATION_FINISH_4 >= 217 # define BOOST_PP_ITERATION_4 217 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 218 && BOOST_PP_ITERATION_FINISH_4 >= 218 # define BOOST_PP_ITERATION_4 218 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 219 && BOOST_PP_ITERATION_FINISH_4 >= 219 # define BOOST_PP_ITERATION_4 219 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 220 && BOOST_PP_ITERATION_FINISH_4 >= 220 # define BOOST_PP_ITERATION_4 220 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 221 && BOOST_PP_ITERATION_FINISH_4 >= 221 # define BOOST_PP_ITERATION_4 221 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 222 && BOOST_PP_ITERATION_FINISH_4 >= 222 # define BOOST_PP_ITERATION_4 222 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 223 && BOOST_PP_ITERATION_FINISH_4 >= 223 # define BOOST_PP_ITERATION_4 223 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 224 && BOOST_PP_ITERATION_FINISH_4 >= 224 # define BOOST_PP_ITERATION_4 224 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 225 && BOOST_PP_ITERATION_FINISH_4 >= 225 # define BOOST_PP_ITERATION_4 225 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 226 && BOOST_PP_ITERATION_FINISH_4 >= 226 # define BOOST_PP_ITERATION_4 226 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 227 && BOOST_PP_ITERATION_FINISH_4 >= 227 # define BOOST_PP_ITERATION_4 227 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 228 && BOOST_PP_ITERATION_FINISH_4 >= 228 # define BOOST_PP_ITERATION_4 228 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 229 && BOOST_PP_ITERATION_FINISH_4 >= 229 # define BOOST_PP_ITERATION_4 229 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 230 && BOOST_PP_ITERATION_FINISH_4 >= 230 # define BOOST_PP_ITERATION_4 230 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 231 && BOOST_PP_ITERATION_FINISH_4 >= 231 # define BOOST_PP_ITERATION_4 231 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 232 && BOOST_PP_ITERATION_FINISH_4 >= 232 # define BOOST_PP_ITERATION_4 232 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 233 && BOOST_PP_ITERATION_FINISH_4 >= 233 # define BOOST_PP_ITERATION_4 233 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 234 && BOOST_PP_ITERATION_FINISH_4 >= 234 # define BOOST_PP_ITERATION_4 234 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 235 && BOOST_PP_ITERATION_FINISH_4 >= 235 # define BOOST_PP_ITERATION_4 235 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 236 && BOOST_PP_ITERATION_FINISH_4 >= 236 # define BOOST_PP_ITERATION_4 236 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 237 && BOOST_PP_ITERATION_FINISH_4 >= 237 # define BOOST_PP_ITERATION_4 237 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 238 && BOOST_PP_ITERATION_FINISH_4 >= 238 # define BOOST_PP_ITERATION_4 238 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 239 && BOOST_PP_ITERATION_FINISH_4 >= 239 # define BOOST_PP_ITERATION_4 239 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 240 && BOOST_PP_ITERATION_FINISH_4 >= 240 # define BOOST_PP_ITERATION_4 240 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 241 && BOOST_PP_ITERATION_FINISH_4 >= 241 # define BOOST_PP_ITERATION_4 241 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 242 && BOOST_PP_ITERATION_FINISH_4 >= 242 # define BOOST_PP_ITERATION_4 242 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 243 && BOOST_PP_ITERATION_FINISH_4 >= 243 # define BOOST_PP_ITERATION_4 243 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 244 && BOOST_PP_ITERATION_FINISH_4 >= 244 # define BOOST_PP_ITERATION_4 244 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 245 && BOOST_PP_ITERATION_FINISH_4 >= 245 # define BOOST_PP_ITERATION_4 245 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 246 && BOOST_PP_ITERATION_FINISH_4 >= 246 # define BOOST_PP_ITERATION_4 246 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 247 && BOOST_PP_ITERATION_FINISH_4 >= 247 # define BOOST_PP_ITERATION_4 247 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 248 && BOOST_PP_ITERATION_FINISH_4 >= 248 # define BOOST_PP_ITERATION_4 248 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 249 && BOOST_PP_ITERATION_FINISH_4 >= 249 # define BOOST_PP_ITERATION_4 249 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 250 && BOOST_PP_ITERATION_FINISH_4 >= 250 # define BOOST_PP_ITERATION_4 250 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 251 && BOOST_PP_ITERATION_FINISH_4 >= 251 # define BOOST_PP_ITERATION_4 251 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 252 && BOOST_PP_ITERATION_FINISH_4 >= 252 # define BOOST_PP_ITERATION_4 252 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 253 && BOOST_PP_ITERATION_FINISH_4 >= 253 # define BOOST_PP_ITERATION_4 253 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 254 && BOOST_PP_ITERATION_FINISH_4 >= 254 # define BOOST_PP_ITERATION_4 254 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 255 && BOOST_PP_ITERATION_FINISH_4 >= 255 # define BOOST_PP_ITERATION_4 255 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_START_4 <= 256 && BOOST_PP_ITERATION_FINISH_4 >= 256 # define BOOST_PP_ITERATION_4 256 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # endif # # undef BOOST_PP_ITERATION_DEPTH # define BOOST_PP_ITERATION_DEPTH() 3 # # undef BOOST_PP_ITERATION_START_4 # undef BOOST_PP_ITERATION_FINISH_4 # undef BOOST_PP_FILENAME_4 # # undef BOOST_PP_ITERATION_FLAGS_4 # undef BOOST_PP_ITERATION_PARAMS_4 ================================================ FILE: benchmarks/boost/preprocessor/iteration/detail/iter/forward5.hpp ================================================ # /* ************************************************************************** # * * # * (C) Copyright Paul Mensonides 2002. # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # * * # ************************************************************************** */ # # /* See http://www.boost.org for most recent version. */ # # if defined(BOOST_PP_ITERATION_LIMITS) # if !defined(BOOST_PP_FILENAME_5) # error BOOST_PP_ERROR: depth #5 filename is not defined # endif # define BOOST_PP_VALUE BOOST_PP_TUPLE_ELEM(2, 0, BOOST_PP_ITERATION_LIMITS) # include # define BOOST_PP_VALUE BOOST_PP_TUPLE_ELEM(2, 1, BOOST_PP_ITERATION_LIMITS) # include # define BOOST_PP_ITERATION_FLAGS_5() 0 # undef BOOST_PP_ITERATION_LIMITS # elif defined(BOOST_PP_ITERATION_PARAMS_5) # define BOOST_PP_VALUE BOOST_PP_ARRAY_ELEM(0, BOOST_PP_ITERATION_PARAMS_5) # include # define BOOST_PP_VALUE BOOST_PP_ARRAY_ELEM(1, BOOST_PP_ITERATION_PARAMS_5) # include # define BOOST_PP_FILENAME_5 BOOST_PP_ARRAY_ELEM(2, BOOST_PP_ITERATION_PARAMS_5) # if BOOST_PP_ARRAY_SIZE(BOOST_PP_ITERATION_PARAMS_5) >= 4 # define BOOST_PP_ITERATION_FLAGS_5() BOOST_PP_ARRAY_ELEM(3, BOOST_PP_ITERATION_PARAMS_5) # else # define BOOST_PP_ITERATION_FLAGS_5() 0 # endif # else # error BOOST_PP_ERROR: depth #5 iteration boundaries or filename not defined # endif # # undef BOOST_PP_ITERATION_DEPTH # define BOOST_PP_ITERATION_DEPTH() 5 # # if (BOOST_PP_ITERATION_START_5) > (BOOST_PP_ITERATION_FINISH_5) # include # else # if BOOST_PP_ITERATION_START_5 <= 0 && BOOST_PP_ITERATION_FINISH_5 >= 0 # define BOOST_PP_ITERATION_5 0 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 1 && BOOST_PP_ITERATION_FINISH_5 >= 1 # define BOOST_PP_ITERATION_5 1 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 2 && BOOST_PP_ITERATION_FINISH_5 >= 2 # define BOOST_PP_ITERATION_5 2 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 3 && BOOST_PP_ITERATION_FINISH_5 >= 3 # define BOOST_PP_ITERATION_5 3 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 4 && BOOST_PP_ITERATION_FINISH_5 >= 4 # define BOOST_PP_ITERATION_5 4 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 5 && BOOST_PP_ITERATION_FINISH_5 >= 5 # define BOOST_PP_ITERATION_5 5 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 6 && BOOST_PP_ITERATION_FINISH_5 >= 6 # define BOOST_PP_ITERATION_5 6 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 7 && BOOST_PP_ITERATION_FINISH_5 >= 7 # define BOOST_PP_ITERATION_5 7 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 8 && BOOST_PP_ITERATION_FINISH_5 >= 8 # define BOOST_PP_ITERATION_5 8 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 9 && BOOST_PP_ITERATION_FINISH_5 >= 9 # define BOOST_PP_ITERATION_5 9 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 10 && BOOST_PP_ITERATION_FINISH_5 >= 10 # define BOOST_PP_ITERATION_5 10 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 11 && BOOST_PP_ITERATION_FINISH_5 >= 11 # define BOOST_PP_ITERATION_5 11 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 12 && BOOST_PP_ITERATION_FINISH_5 >= 12 # define BOOST_PP_ITERATION_5 12 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 13 && BOOST_PP_ITERATION_FINISH_5 >= 13 # define BOOST_PP_ITERATION_5 13 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 14 && BOOST_PP_ITERATION_FINISH_5 >= 14 # define BOOST_PP_ITERATION_5 14 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 15 && BOOST_PP_ITERATION_FINISH_5 >= 15 # define BOOST_PP_ITERATION_5 15 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 16 && BOOST_PP_ITERATION_FINISH_5 >= 16 # define BOOST_PP_ITERATION_5 16 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 17 && BOOST_PP_ITERATION_FINISH_5 >= 17 # define BOOST_PP_ITERATION_5 17 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 18 && BOOST_PP_ITERATION_FINISH_5 >= 18 # define BOOST_PP_ITERATION_5 18 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 19 && BOOST_PP_ITERATION_FINISH_5 >= 19 # define BOOST_PP_ITERATION_5 19 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 20 && BOOST_PP_ITERATION_FINISH_5 >= 20 # define BOOST_PP_ITERATION_5 20 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 21 && BOOST_PP_ITERATION_FINISH_5 >= 21 # define BOOST_PP_ITERATION_5 21 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 22 && BOOST_PP_ITERATION_FINISH_5 >= 22 # define BOOST_PP_ITERATION_5 22 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 23 && BOOST_PP_ITERATION_FINISH_5 >= 23 # define BOOST_PP_ITERATION_5 23 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 24 && BOOST_PP_ITERATION_FINISH_5 >= 24 # define BOOST_PP_ITERATION_5 24 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 25 && BOOST_PP_ITERATION_FINISH_5 >= 25 # define BOOST_PP_ITERATION_5 25 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 26 && BOOST_PP_ITERATION_FINISH_5 >= 26 # define BOOST_PP_ITERATION_5 26 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 27 && BOOST_PP_ITERATION_FINISH_5 >= 27 # define BOOST_PP_ITERATION_5 27 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 28 && BOOST_PP_ITERATION_FINISH_5 >= 28 # define BOOST_PP_ITERATION_5 28 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 29 && BOOST_PP_ITERATION_FINISH_5 >= 29 # define BOOST_PP_ITERATION_5 29 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 30 && BOOST_PP_ITERATION_FINISH_5 >= 30 # define BOOST_PP_ITERATION_5 30 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 31 && BOOST_PP_ITERATION_FINISH_5 >= 31 # define BOOST_PP_ITERATION_5 31 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 32 && BOOST_PP_ITERATION_FINISH_5 >= 32 # define BOOST_PP_ITERATION_5 32 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 33 && BOOST_PP_ITERATION_FINISH_5 >= 33 # define BOOST_PP_ITERATION_5 33 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 34 && BOOST_PP_ITERATION_FINISH_5 >= 34 # define BOOST_PP_ITERATION_5 34 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 35 && BOOST_PP_ITERATION_FINISH_5 >= 35 # define BOOST_PP_ITERATION_5 35 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 36 && BOOST_PP_ITERATION_FINISH_5 >= 36 # define BOOST_PP_ITERATION_5 36 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 37 && BOOST_PP_ITERATION_FINISH_5 >= 37 # define BOOST_PP_ITERATION_5 37 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 38 && BOOST_PP_ITERATION_FINISH_5 >= 38 # define BOOST_PP_ITERATION_5 38 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 39 && BOOST_PP_ITERATION_FINISH_5 >= 39 # define BOOST_PP_ITERATION_5 39 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 40 && BOOST_PP_ITERATION_FINISH_5 >= 40 # define BOOST_PP_ITERATION_5 40 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 41 && BOOST_PP_ITERATION_FINISH_5 >= 41 # define BOOST_PP_ITERATION_5 41 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 42 && BOOST_PP_ITERATION_FINISH_5 >= 42 # define BOOST_PP_ITERATION_5 42 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 43 && BOOST_PP_ITERATION_FINISH_5 >= 43 # define BOOST_PP_ITERATION_5 43 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 44 && BOOST_PP_ITERATION_FINISH_5 >= 44 # define BOOST_PP_ITERATION_5 44 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 45 && BOOST_PP_ITERATION_FINISH_5 >= 45 # define BOOST_PP_ITERATION_5 45 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 46 && BOOST_PP_ITERATION_FINISH_5 >= 46 # define BOOST_PP_ITERATION_5 46 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 47 && BOOST_PP_ITERATION_FINISH_5 >= 47 # define BOOST_PP_ITERATION_5 47 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 48 && BOOST_PP_ITERATION_FINISH_5 >= 48 # define BOOST_PP_ITERATION_5 48 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 49 && BOOST_PP_ITERATION_FINISH_5 >= 49 # define BOOST_PP_ITERATION_5 49 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 50 && BOOST_PP_ITERATION_FINISH_5 >= 50 # define BOOST_PP_ITERATION_5 50 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 51 && BOOST_PP_ITERATION_FINISH_5 >= 51 # define BOOST_PP_ITERATION_5 51 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 52 && BOOST_PP_ITERATION_FINISH_5 >= 52 # define BOOST_PP_ITERATION_5 52 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 53 && BOOST_PP_ITERATION_FINISH_5 >= 53 # define BOOST_PP_ITERATION_5 53 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 54 && BOOST_PP_ITERATION_FINISH_5 >= 54 # define BOOST_PP_ITERATION_5 54 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 55 && BOOST_PP_ITERATION_FINISH_5 >= 55 # define BOOST_PP_ITERATION_5 55 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 56 && BOOST_PP_ITERATION_FINISH_5 >= 56 # define BOOST_PP_ITERATION_5 56 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 57 && BOOST_PP_ITERATION_FINISH_5 >= 57 # define BOOST_PP_ITERATION_5 57 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 58 && BOOST_PP_ITERATION_FINISH_5 >= 58 # define BOOST_PP_ITERATION_5 58 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 59 && BOOST_PP_ITERATION_FINISH_5 >= 59 # define BOOST_PP_ITERATION_5 59 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 60 && BOOST_PP_ITERATION_FINISH_5 >= 60 # define BOOST_PP_ITERATION_5 60 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 61 && BOOST_PP_ITERATION_FINISH_5 >= 61 # define BOOST_PP_ITERATION_5 61 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 62 && BOOST_PP_ITERATION_FINISH_5 >= 62 # define BOOST_PP_ITERATION_5 62 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 63 && BOOST_PP_ITERATION_FINISH_5 >= 63 # define BOOST_PP_ITERATION_5 63 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 64 && BOOST_PP_ITERATION_FINISH_5 >= 64 # define BOOST_PP_ITERATION_5 64 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 65 && BOOST_PP_ITERATION_FINISH_5 >= 65 # define BOOST_PP_ITERATION_5 65 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 66 && BOOST_PP_ITERATION_FINISH_5 >= 66 # define BOOST_PP_ITERATION_5 66 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 67 && BOOST_PP_ITERATION_FINISH_5 >= 67 # define BOOST_PP_ITERATION_5 67 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 68 && BOOST_PP_ITERATION_FINISH_5 >= 68 # define BOOST_PP_ITERATION_5 68 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 69 && BOOST_PP_ITERATION_FINISH_5 >= 69 # define BOOST_PP_ITERATION_5 69 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 70 && BOOST_PP_ITERATION_FINISH_5 >= 70 # define BOOST_PP_ITERATION_5 70 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 71 && BOOST_PP_ITERATION_FINISH_5 >= 71 # define BOOST_PP_ITERATION_5 71 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 72 && BOOST_PP_ITERATION_FINISH_5 >= 72 # define BOOST_PP_ITERATION_5 72 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 73 && BOOST_PP_ITERATION_FINISH_5 >= 73 # define BOOST_PP_ITERATION_5 73 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 74 && BOOST_PP_ITERATION_FINISH_5 >= 74 # define BOOST_PP_ITERATION_5 74 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 75 && BOOST_PP_ITERATION_FINISH_5 >= 75 # define BOOST_PP_ITERATION_5 75 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 76 && BOOST_PP_ITERATION_FINISH_5 >= 76 # define BOOST_PP_ITERATION_5 76 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 77 && BOOST_PP_ITERATION_FINISH_5 >= 77 # define BOOST_PP_ITERATION_5 77 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 78 && BOOST_PP_ITERATION_FINISH_5 >= 78 # define BOOST_PP_ITERATION_5 78 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 79 && BOOST_PP_ITERATION_FINISH_5 >= 79 # define BOOST_PP_ITERATION_5 79 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 80 && BOOST_PP_ITERATION_FINISH_5 >= 80 # define BOOST_PP_ITERATION_5 80 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 81 && BOOST_PP_ITERATION_FINISH_5 >= 81 # define BOOST_PP_ITERATION_5 81 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 82 && BOOST_PP_ITERATION_FINISH_5 >= 82 # define BOOST_PP_ITERATION_5 82 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 83 && BOOST_PP_ITERATION_FINISH_5 >= 83 # define BOOST_PP_ITERATION_5 83 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 84 && BOOST_PP_ITERATION_FINISH_5 >= 84 # define BOOST_PP_ITERATION_5 84 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 85 && BOOST_PP_ITERATION_FINISH_5 >= 85 # define BOOST_PP_ITERATION_5 85 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 86 && BOOST_PP_ITERATION_FINISH_5 >= 86 # define BOOST_PP_ITERATION_5 86 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 87 && BOOST_PP_ITERATION_FINISH_5 >= 87 # define BOOST_PP_ITERATION_5 87 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 88 && BOOST_PP_ITERATION_FINISH_5 >= 88 # define BOOST_PP_ITERATION_5 88 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 89 && BOOST_PP_ITERATION_FINISH_5 >= 89 # define BOOST_PP_ITERATION_5 89 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 90 && BOOST_PP_ITERATION_FINISH_5 >= 90 # define BOOST_PP_ITERATION_5 90 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 91 && BOOST_PP_ITERATION_FINISH_5 >= 91 # define BOOST_PP_ITERATION_5 91 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 92 && BOOST_PP_ITERATION_FINISH_5 >= 92 # define BOOST_PP_ITERATION_5 92 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 93 && BOOST_PP_ITERATION_FINISH_5 >= 93 # define BOOST_PP_ITERATION_5 93 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 94 && BOOST_PP_ITERATION_FINISH_5 >= 94 # define BOOST_PP_ITERATION_5 94 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 95 && BOOST_PP_ITERATION_FINISH_5 >= 95 # define BOOST_PP_ITERATION_5 95 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 96 && BOOST_PP_ITERATION_FINISH_5 >= 96 # define BOOST_PP_ITERATION_5 96 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 97 && BOOST_PP_ITERATION_FINISH_5 >= 97 # define BOOST_PP_ITERATION_5 97 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 98 && BOOST_PP_ITERATION_FINISH_5 >= 98 # define BOOST_PP_ITERATION_5 98 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 99 && BOOST_PP_ITERATION_FINISH_5 >= 99 # define BOOST_PP_ITERATION_5 99 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 100 && BOOST_PP_ITERATION_FINISH_5 >= 100 # define BOOST_PP_ITERATION_5 100 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 101 && BOOST_PP_ITERATION_FINISH_5 >= 101 # define BOOST_PP_ITERATION_5 101 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 102 && BOOST_PP_ITERATION_FINISH_5 >= 102 # define BOOST_PP_ITERATION_5 102 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 103 && BOOST_PP_ITERATION_FINISH_5 >= 103 # define BOOST_PP_ITERATION_5 103 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 104 && BOOST_PP_ITERATION_FINISH_5 >= 104 # define BOOST_PP_ITERATION_5 104 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 105 && BOOST_PP_ITERATION_FINISH_5 >= 105 # define BOOST_PP_ITERATION_5 105 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 106 && BOOST_PP_ITERATION_FINISH_5 >= 106 # define BOOST_PP_ITERATION_5 106 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 107 && BOOST_PP_ITERATION_FINISH_5 >= 107 # define BOOST_PP_ITERATION_5 107 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 108 && BOOST_PP_ITERATION_FINISH_5 >= 108 # define BOOST_PP_ITERATION_5 108 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 109 && BOOST_PP_ITERATION_FINISH_5 >= 109 # define BOOST_PP_ITERATION_5 109 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 110 && BOOST_PP_ITERATION_FINISH_5 >= 110 # define BOOST_PP_ITERATION_5 110 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 111 && BOOST_PP_ITERATION_FINISH_5 >= 111 # define BOOST_PP_ITERATION_5 111 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 112 && BOOST_PP_ITERATION_FINISH_5 >= 112 # define BOOST_PP_ITERATION_5 112 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 113 && BOOST_PP_ITERATION_FINISH_5 >= 113 # define BOOST_PP_ITERATION_5 113 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 114 && BOOST_PP_ITERATION_FINISH_5 >= 114 # define BOOST_PP_ITERATION_5 114 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 115 && BOOST_PP_ITERATION_FINISH_5 >= 115 # define BOOST_PP_ITERATION_5 115 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 116 && BOOST_PP_ITERATION_FINISH_5 >= 116 # define BOOST_PP_ITERATION_5 116 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 117 && BOOST_PP_ITERATION_FINISH_5 >= 117 # define BOOST_PP_ITERATION_5 117 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 118 && BOOST_PP_ITERATION_FINISH_5 >= 118 # define BOOST_PP_ITERATION_5 118 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 119 && BOOST_PP_ITERATION_FINISH_5 >= 119 # define BOOST_PP_ITERATION_5 119 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 120 && BOOST_PP_ITERATION_FINISH_5 >= 120 # define BOOST_PP_ITERATION_5 120 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 121 && BOOST_PP_ITERATION_FINISH_5 >= 121 # define BOOST_PP_ITERATION_5 121 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 122 && BOOST_PP_ITERATION_FINISH_5 >= 122 # define BOOST_PP_ITERATION_5 122 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 123 && BOOST_PP_ITERATION_FINISH_5 >= 123 # define BOOST_PP_ITERATION_5 123 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 124 && BOOST_PP_ITERATION_FINISH_5 >= 124 # define BOOST_PP_ITERATION_5 124 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 125 && BOOST_PP_ITERATION_FINISH_5 >= 125 # define BOOST_PP_ITERATION_5 125 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 126 && BOOST_PP_ITERATION_FINISH_5 >= 126 # define BOOST_PP_ITERATION_5 126 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 127 && BOOST_PP_ITERATION_FINISH_5 >= 127 # define BOOST_PP_ITERATION_5 127 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 128 && BOOST_PP_ITERATION_FINISH_5 >= 128 # define BOOST_PP_ITERATION_5 128 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 129 && BOOST_PP_ITERATION_FINISH_5 >= 129 # define BOOST_PP_ITERATION_5 129 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 130 && BOOST_PP_ITERATION_FINISH_5 >= 130 # define BOOST_PP_ITERATION_5 130 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 131 && BOOST_PP_ITERATION_FINISH_5 >= 131 # define BOOST_PP_ITERATION_5 131 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 132 && BOOST_PP_ITERATION_FINISH_5 >= 132 # define BOOST_PP_ITERATION_5 132 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 133 && BOOST_PP_ITERATION_FINISH_5 >= 133 # define BOOST_PP_ITERATION_5 133 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 134 && BOOST_PP_ITERATION_FINISH_5 >= 134 # define BOOST_PP_ITERATION_5 134 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 135 && BOOST_PP_ITERATION_FINISH_5 >= 135 # define BOOST_PP_ITERATION_5 135 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 136 && BOOST_PP_ITERATION_FINISH_5 >= 136 # define BOOST_PP_ITERATION_5 136 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 137 && BOOST_PP_ITERATION_FINISH_5 >= 137 # define BOOST_PP_ITERATION_5 137 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 138 && BOOST_PP_ITERATION_FINISH_5 >= 138 # define BOOST_PP_ITERATION_5 138 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 139 && BOOST_PP_ITERATION_FINISH_5 >= 139 # define BOOST_PP_ITERATION_5 139 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 140 && BOOST_PP_ITERATION_FINISH_5 >= 140 # define BOOST_PP_ITERATION_5 140 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 141 && BOOST_PP_ITERATION_FINISH_5 >= 141 # define BOOST_PP_ITERATION_5 141 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 142 && BOOST_PP_ITERATION_FINISH_5 >= 142 # define BOOST_PP_ITERATION_5 142 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 143 && BOOST_PP_ITERATION_FINISH_5 >= 143 # define BOOST_PP_ITERATION_5 143 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 144 && BOOST_PP_ITERATION_FINISH_5 >= 144 # define BOOST_PP_ITERATION_5 144 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 145 && BOOST_PP_ITERATION_FINISH_5 >= 145 # define BOOST_PP_ITERATION_5 145 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 146 && BOOST_PP_ITERATION_FINISH_5 >= 146 # define BOOST_PP_ITERATION_5 146 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 147 && BOOST_PP_ITERATION_FINISH_5 >= 147 # define BOOST_PP_ITERATION_5 147 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 148 && BOOST_PP_ITERATION_FINISH_5 >= 148 # define BOOST_PP_ITERATION_5 148 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 149 && BOOST_PP_ITERATION_FINISH_5 >= 149 # define BOOST_PP_ITERATION_5 149 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 150 && BOOST_PP_ITERATION_FINISH_5 >= 150 # define BOOST_PP_ITERATION_5 150 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 151 && BOOST_PP_ITERATION_FINISH_5 >= 151 # define BOOST_PP_ITERATION_5 151 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 152 && BOOST_PP_ITERATION_FINISH_5 >= 152 # define BOOST_PP_ITERATION_5 152 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 153 && BOOST_PP_ITERATION_FINISH_5 >= 153 # define BOOST_PP_ITERATION_5 153 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 154 && BOOST_PP_ITERATION_FINISH_5 >= 154 # define BOOST_PP_ITERATION_5 154 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 155 && BOOST_PP_ITERATION_FINISH_5 >= 155 # define BOOST_PP_ITERATION_5 155 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 156 && BOOST_PP_ITERATION_FINISH_5 >= 156 # define BOOST_PP_ITERATION_5 156 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 157 && BOOST_PP_ITERATION_FINISH_5 >= 157 # define BOOST_PP_ITERATION_5 157 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 158 && BOOST_PP_ITERATION_FINISH_5 >= 158 # define BOOST_PP_ITERATION_5 158 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 159 && BOOST_PP_ITERATION_FINISH_5 >= 159 # define BOOST_PP_ITERATION_5 159 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 160 && BOOST_PP_ITERATION_FINISH_5 >= 160 # define BOOST_PP_ITERATION_5 160 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 161 && BOOST_PP_ITERATION_FINISH_5 >= 161 # define BOOST_PP_ITERATION_5 161 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 162 && BOOST_PP_ITERATION_FINISH_5 >= 162 # define BOOST_PP_ITERATION_5 162 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 163 && BOOST_PP_ITERATION_FINISH_5 >= 163 # define BOOST_PP_ITERATION_5 163 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 164 && BOOST_PP_ITERATION_FINISH_5 >= 164 # define BOOST_PP_ITERATION_5 164 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 165 && BOOST_PP_ITERATION_FINISH_5 >= 165 # define BOOST_PP_ITERATION_5 165 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 166 && BOOST_PP_ITERATION_FINISH_5 >= 166 # define BOOST_PP_ITERATION_5 166 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 167 && BOOST_PP_ITERATION_FINISH_5 >= 167 # define BOOST_PP_ITERATION_5 167 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 168 && BOOST_PP_ITERATION_FINISH_5 >= 168 # define BOOST_PP_ITERATION_5 168 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 169 && BOOST_PP_ITERATION_FINISH_5 >= 169 # define BOOST_PP_ITERATION_5 169 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 170 && BOOST_PP_ITERATION_FINISH_5 >= 170 # define BOOST_PP_ITERATION_5 170 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 171 && BOOST_PP_ITERATION_FINISH_5 >= 171 # define BOOST_PP_ITERATION_5 171 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 172 && BOOST_PP_ITERATION_FINISH_5 >= 172 # define BOOST_PP_ITERATION_5 172 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 173 && BOOST_PP_ITERATION_FINISH_5 >= 173 # define BOOST_PP_ITERATION_5 173 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 174 && BOOST_PP_ITERATION_FINISH_5 >= 174 # define BOOST_PP_ITERATION_5 174 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 175 && BOOST_PP_ITERATION_FINISH_5 >= 175 # define BOOST_PP_ITERATION_5 175 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 176 && BOOST_PP_ITERATION_FINISH_5 >= 176 # define BOOST_PP_ITERATION_5 176 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 177 && BOOST_PP_ITERATION_FINISH_5 >= 177 # define BOOST_PP_ITERATION_5 177 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 178 && BOOST_PP_ITERATION_FINISH_5 >= 178 # define BOOST_PP_ITERATION_5 178 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 179 && BOOST_PP_ITERATION_FINISH_5 >= 179 # define BOOST_PP_ITERATION_5 179 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 180 && BOOST_PP_ITERATION_FINISH_5 >= 180 # define BOOST_PP_ITERATION_5 180 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 181 && BOOST_PP_ITERATION_FINISH_5 >= 181 # define BOOST_PP_ITERATION_5 181 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 182 && BOOST_PP_ITERATION_FINISH_5 >= 182 # define BOOST_PP_ITERATION_5 182 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 183 && BOOST_PP_ITERATION_FINISH_5 >= 183 # define BOOST_PP_ITERATION_5 183 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 184 && BOOST_PP_ITERATION_FINISH_5 >= 184 # define BOOST_PP_ITERATION_5 184 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 185 && BOOST_PP_ITERATION_FINISH_5 >= 185 # define BOOST_PP_ITERATION_5 185 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 186 && BOOST_PP_ITERATION_FINISH_5 >= 186 # define BOOST_PP_ITERATION_5 186 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 187 && BOOST_PP_ITERATION_FINISH_5 >= 187 # define BOOST_PP_ITERATION_5 187 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 188 && BOOST_PP_ITERATION_FINISH_5 >= 188 # define BOOST_PP_ITERATION_5 188 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 189 && BOOST_PP_ITERATION_FINISH_5 >= 189 # define BOOST_PP_ITERATION_5 189 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 190 && BOOST_PP_ITERATION_FINISH_5 >= 190 # define BOOST_PP_ITERATION_5 190 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 191 && BOOST_PP_ITERATION_FINISH_5 >= 191 # define BOOST_PP_ITERATION_5 191 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 192 && BOOST_PP_ITERATION_FINISH_5 >= 192 # define BOOST_PP_ITERATION_5 192 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 193 && BOOST_PP_ITERATION_FINISH_5 >= 193 # define BOOST_PP_ITERATION_5 193 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 194 && BOOST_PP_ITERATION_FINISH_5 >= 194 # define BOOST_PP_ITERATION_5 194 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 195 && BOOST_PP_ITERATION_FINISH_5 >= 195 # define BOOST_PP_ITERATION_5 195 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 196 && BOOST_PP_ITERATION_FINISH_5 >= 196 # define BOOST_PP_ITERATION_5 196 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 197 && BOOST_PP_ITERATION_FINISH_5 >= 197 # define BOOST_PP_ITERATION_5 197 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 198 && BOOST_PP_ITERATION_FINISH_5 >= 198 # define BOOST_PP_ITERATION_5 198 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 199 && BOOST_PP_ITERATION_FINISH_5 >= 199 # define BOOST_PP_ITERATION_5 199 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 200 && BOOST_PP_ITERATION_FINISH_5 >= 200 # define BOOST_PP_ITERATION_5 200 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 201 && BOOST_PP_ITERATION_FINISH_5 >= 201 # define BOOST_PP_ITERATION_5 201 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 202 && BOOST_PP_ITERATION_FINISH_5 >= 202 # define BOOST_PP_ITERATION_5 202 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 203 && BOOST_PP_ITERATION_FINISH_5 >= 203 # define BOOST_PP_ITERATION_5 203 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 204 && BOOST_PP_ITERATION_FINISH_5 >= 204 # define BOOST_PP_ITERATION_5 204 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 205 && BOOST_PP_ITERATION_FINISH_5 >= 205 # define BOOST_PP_ITERATION_5 205 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 206 && BOOST_PP_ITERATION_FINISH_5 >= 206 # define BOOST_PP_ITERATION_5 206 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 207 && BOOST_PP_ITERATION_FINISH_5 >= 207 # define BOOST_PP_ITERATION_5 207 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 208 && BOOST_PP_ITERATION_FINISH_5 >= 208 # define BOOST_PP_ITERATION_5 208 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 209 && BOOST_PP_ITERATION_FINISH_5 >= 209 # define BOOST_PP_ITERATION_5 209 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 210 && BOOST_PP_ITERATION_FINISH_5 >= 210 # define BOOST_PP_ITERATION_5 210 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 211 && BOOST_PP_ITERATION_FINISH_5 >= 211 # define BOOST_PP_ITERATION_5 211 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 212 && BOOST_PP_ITERATION_FINISH_5 >= 212 # define BOOST_PP_ITERATION_5 212 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 213 && BOOST_PP_ITERATION_FINISH_5 >= 213 # define BOOST_PP_ITERATION_5 213 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 214 && BOOST_PP_ITERATION_FINISH_5 >= 214 # define BOOST_PP_ITERATION_5 214 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 215 && BOOST_PP_ITERATION_FINISH_5 >= 215 # define BOOST_PP_ITERATION_5 215 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 216 && BOOST_PP_ITERATION_FINISH_5 >= 216 # define BOOST_PP_ITERATION_5 216 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 217 && BOOST_PP_ITERATION_FINISH_5 >= 217 # define BOOST_PP_ITERATION_5 217 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 218 && BOOST_PP_ITERATION_FINISH_5 >= 218 # define BOOST_PP_ITERATION_5 218 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 219 && BOOST_PP_ITERATION_FINISH_5 >= 219 # define BOOST_PP_ITERATION_5 219 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 220 && BOOST_PP_ITERATION_FINISH_5 >= 220 # define BOOST_PP_ITERATION_5 220 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 221 && BOOST_PP_ITERATION_FINISH_5 >= 221 # define BOOST_PP_ITERATION_5 221 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 222 && BOOST_PP_ITERATION_FINISH_5 >= 222 # define BOOST_PP_ITERATION_5 222 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 223 && BOOST_PP_ITERATION_FINISH_5 >= 223 # define BOOST_PP_ITERATION_5 223 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 224 && BOOST_PP_ITERATION_FINISH_5 >= 224 # define BOOST_PP_ITERATION_5 224 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 225 && BOOST_PP_ITERATION_FINISH_5 >= 225 # define BOOST_PP_ITERATION_5 225 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 226 && BOOST_PP_ITERATION_FINISH_5 >= 226 # define BOOST_PP_ITERATION_5 226 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 227 && BOOST_PP_ITERATION_FINISH_5 >= 227 # define BOOST_PP_ITERATION_5 227 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 228 && BOOST_PP_ITERATION_FINISH_5 >= 228 # define BOOST_PP_ITERATION_5 228 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 229 && BOOST_PP_ITERATION_FINISH_5 >= 229 # define BOOST_PP_ITERATION_5 229 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 230 && BOOST_PP_ITERATION_FINISH_5 >= 230 # define BOOST_PP_ITERATION_5 230 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 231 && BOOST_PP_ITERATION_FINISH_5 >= 231 # define BOOST_PP_ITERATION_5 231 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 232 && BOOST_PP_ITERATION_FINISH_5 >= 232 # define BOOST_PP_ITERATION_5 232 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 233 && BOOST_PP_ITERATION_FINISH_5 >= 233 # define BOOST_PP_ITERATION_5 233 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 234 && BOOST_PP_ITERATION_FINISH_5 >= 234 # define BOOST_PP_ITERATION_5 234 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 235 && BOOST_PP_ITERATION_FINISH_5 >= 235 # define BOOST_PP_ITERATION_5 235 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 236 && BOOST_PP_ITERATION_FINISH_5 >= 236 # define BOOST_PP_ITERATION_5 236 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 237 && BOOST_PP_ITERATION_FINISH_5 >= 237 # define BOOST_PP_ITERATION_5 237 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 238 && BOOST_PP_ITERATION_FINISH_5 >= 238 # define BOOST_PP_ITERATION_5 238 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 239 && BOOST_PP_ITERATION_FINISH_5 >= 239 # define BOOST_PP_ITERATION_5 239 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 240 && BOOST_PP_ITERATION_FINISH_5 >= 240 # define BOOST_PP_ITERATION_5 240 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 241 && BOOST_PP_ITERATION_FINISH_5 >= 241 # define BOOST_PP_ITERATION_5 241 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 242 && BOOST_PP_ITERATION_FINISH_5 >= 242 # define BOOST_PP_ITERATION_5 242 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 243 && BOOST_PP_ITERATION_FINISH_5 >= 243 # define BOOST_PP_ITERATION_5 243 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 244 && BOOST_PP_ITERATION_FINISH_5 >= 244 # define BOOST_PP_ITERATION_5 244 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 245 && BOOST_PP_ITERATION_FINISH_5 >= 245 # define BOOST_PP_ITERATION_5 245 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 246 && BOOST_PP_ITERATION_FINISH_5 >= 246 # define BOOST_PP_ITERATION_5 246 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 247 && BOOST_PP_ITERATION_FINISH_5 >= 247 # define BOOST_PP_ITERATION_5 247 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 248 && BOOST_PP_ITERATION_FINISH_5 >= 248 # define BOOST_PP_ITERATION_5 248 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 249 && BOOST_PP_ITERATION_FINISH_5 >= 249 # define BOOST_PP_ITERATION_5 249 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 250 && BOOST_PP_ITERATION_FINISH_5 >= 250 # define BOOST_PP_ITERATION_5 250 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 251 && BOOST_PP_ITERATION_FINISH_5 >= 251 # define BOOST_PP_ITERATION_5 251 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 252 && BOOST_PP_ITERATION_FINISH_5 >= 252 # define BOOST_PP_ITERATION_5 252 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 253 && BOOST_PP_ITERATION_FINISH_5 >= 253 # define BOOST_PP_ITERATION_5 253 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 254 && BOOST_PP_ITERATION_FINISH_5 >= 254 # define BOOST_PP_ITERATION_5 254 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 255 && BOOST_PP_ITERATION_FINISH_5 >= 255 # define BOOST_PP_ITERATION_5 255 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_START_5 <= 256 && BOOST_PP_ITERATION_FINISH_5 >= 256 # define BOOST_PP_ITERATION_5 256 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # endif # # undef BOOST_PP_ITERATION_DEPTH # define BOOST_PP_ITERATION_DEPTH() 4 # # undef BOOST_PP_ITERATION_START_5 # undef BOOST_PP_ITERATION_FINISH_5 # undef BOOST_PP_FILENAME_5 # # undef BOOST_PP_ITERATION_FLAGS_5 # undef BOOST_PP_ITERATION_PARAMS_5 ================================================ FILE: benchmarks/boost/preprocessor/iteration/detail/iter/reverse1.hpp ================================================ # /* ************************************************************************** # * * # * (C) Copyright Paul Mensonides 2002. # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # * * # ************************************************************************** */ # # /* See http://www.boost.org for most recent version. */ # # if BOOST_PP_ITERATION_FINISH_1 <= 256 && BOOST_PP_ITERATION_START_1 >= 256 # define BOOST_PP_ITERATION_1 256 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 255 && BOOST_PP_ITERATION_START_1 >= 255 # define BOOST_PP_ITERATION_1 255 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 254 && BOOST_PP_ITERATION_START_1 >= 254 # define BOOST_PP_ITERATION_1 254 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 253 && BOOST_PP_ITERATION_START_1 >= 253 # define BOOST_PP_ITERATION_1 253 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 252 && BOOST_PP_ITERATION_START_1 >= 252 # define BOOST_PP_ITERATION_1 252 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 251 && BOOST_PP_ITERATION_START_1 >= 251 # define BOOST_PP_ITERATION_1 251 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 250 && BOOST_PP_ITERATION_START_1 >= 250 # define BOOST_PP_ITERATION_1 250 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 249 && BOOST_PP_ITERATION_START_1 >= 249 # define BOOST_PP_ITERATION_1 249 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 248 && BOOST_PP_ITERATION_START_1 >= 248 # define BOOST_PP_ITERATION_1 248 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 247 && BOOST_PP_ITERATION_START_1 >= 247 # define BOOST_PP_ITERATION_1 247 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 246 && BOOST_PP_ITERATION_START_1 >= 246 # define BOOST_PP_ITERATION_1 246 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 245 && BOOST_PP_ITERATION_START_1 >= 245 # define BOOST_PP_ITERATION_1 245 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 244 && BOOST_PP_ITERATION_START_1 >= 244 # define BOOST_PP_ITERATION_1 244 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 243 && BOOST_PP_ITERATION_START_1 >= 243 # define BOOST_PP_ITERATION_1 243 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 242 && BOOST_PP_ITERATION_START_1 >= 242 # define BOOST_PP_ITERATION_1 242 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 241 && BOOST_PP_ITERATION_START_1 >= 241 # define BOOST_PP_ITERATION_1 241 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 240 && BOOST_PP_ITERATION_START_1 >= 240 # define BOOST_PP_ITERATION_1 240 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 239 && BOOST_PP_ITERATION_START_1 >= 239 # define BOOST_PP_ITERATION_1 239 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 238 && BOOST_PP_ITERATION_START_1 >= 238 # define BOOST_PP_ITERATION_1 238 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 237 && BOOST_PP_ITERATION_START_1 >= 237 # define BOOST_PP_ITERATION_1 237 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 236 && BOOST_PP_ITERATION_START_1 >= 236 # define BOOST_PP_ITERATION_1 236 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 235 && BOOST_PP_ITERATION_START_1 >= 235 # define BOOST_PP_ITERATION_1 235 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 234 && BOOST_PP_ITERATION_START_1 >= 234 # define BOOST_PP_ITERATION_1 234 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 233 && BOOST_PP_ITERATION_START_1 >= 233 # define BOOST_PP_ITERATION_1 233 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 232 && BOOST_PP_ITERATION_START_1 >= 232 # define BOOST_PP_ITERATION_1 232 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 231 && BOOST_PP_ITERATION_START_1 >= 231 # define BOOST_PP_ITERATION_1 231 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 230 && BOOST_PP_ITERATION_START_1 >= 230 # define BOOST_PP_ITERATION_1 230 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 229 && BOOST_PP_ITERATION_START_1 >= 229 # define BOOST_PP_ITERATION_1 229 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 228 && BOOST_PP_ITERATION_START_1 >= 228 # define BOOST_PP_ITERATION_1 228 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 227 && BOOST_PP_ITERATION_START_1 >= 227 # define BOOST_PP_ITERATION_1 227 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 226 && BOOST_PP_ITERATION_START_1 >= 226 # define BOOST_PP_ITERATION_1 226 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 225 && BOOST_PP_ITERATION_START_1 >= 225 # define BOOST_PP_ITERATION_1 225 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 224 && BOOST_PP_ITERATION_START_1 >= 224 # define BOOST_PP_ITERATION_1 224 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 223 && BOOST_PP_ITERATION_START_1 >= 223 # define BOOST_PP_ITERATION_1 223 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 222 && BOOST_PP_ITERATION_START_1 >= 222 # define BOOST_PP_ITERATION_1 222 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 221 && BOOST_PP_ITERATION_START_1 >= 221 # define BOOST_PP_ITERATION_1 221 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 220 && BOOST_PP_ITERATION_START_1 >= 220 # define BOOST_PP_ITERATION_1 220 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 219 && BOOST_PP_ITERATION_START_1 >= 219 # define BOOST_PP_ITERATION_1 219 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 218 && BOOST_PP_ITERATION_START_1 >= 218 # define BOOST_PP_ITERATION_1 218 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 217 && BOOST_PP_ITERATION_START_1 >= 217 # define BOOST_PP_ITERATION_1 217 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 216 && BOOST_PP_ITERATION_START_1 >= 216 # define BOOST_PP_ITERATION_1 216 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 215 && BOOST_PP_ITERATION_START_1 >= 215 # define BOOST_PP_ITERATION_1 215 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 214 && BOOST_PP_ITERATION_START_1 >= 214 # define BOOST_PP_ITERATION_1 214 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 213 && BOOST_PP_ITERATION_START_1 >= 213 # define BOOST_PP_ITERATION_1 213 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 212 && BOOST_PP_ITERATION_START_1 >= 212 # define BOOST_PP_ITERATION_1 212 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 211 && BOOST_PP_ITERATION_START_1 >= 211 # define BOOST_PP_ITERATION_1 211 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 210 && BOOST_PP_ITERATION_START_1 >= 210 # define BOOST_PP_ITERATION_1 210 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 209 && BOOST_PP_ITERATION_START_1 >= 209 # define BOOST_PP_ITERATION_1 209 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 208 && BOOST_PP_ITERATION_START_1 >= 208 # define BOOST_PP_ITERATION_1 208 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 207 && BOOST_PP_ITERATION_START_1 >= 207 # define BOOST_PP_ITERATION_1 207 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 206 && BOOST_PP_ITERATION_START_1 >= 206 # define BOOST_PP_ITERATION_1 206 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 205 && BOOST_PP_ITERATION_START_1 >= 205 # define BOOST_PP_ITERATION_1 205 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 204 && BOOST_PP_ITERATION_START_1 >= 204 # define BOOST_PP_ITERATION_1 204 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 203 && BOOST_PP_ITERATION_START_1 >= 203 # define BOOST_PP_ITERATION_1 203 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 202 && BOOST_PP_ITERATION_START_1 >= 202 # define BOOST_PP_ITERATION_1 202 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 201 && BOOST_PP_ITERATION_START_1 >= 201 # define BOOST_PP_ITERATION_1 201 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 200 && BOOST_PP_ITERATION_START_1 >= 200 # define BOOST_PP_ITERATION_1 200 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 199 && BOOST_PP_ITERATION_START_1 >= 199 # define BOOST_PP_ITERATION_1 199 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 198 && BOOST_PP_ITERATION_START_1 >= 198 # define BOOST_PP_ITERATION_1 198 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 197 && BOOST_PP_ITERATION_START_1 >= 197 # define BOOST_PP_ITERATION_1 197 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 196 && BOOST_PP_ITERATION_START_1 >= 196 # define BOOST_PP_ITERATION_1 196 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 195 && BOOST_PP_ITERATION_START_1 >= 195 # define BOOST_PP_ITERATION_1 195 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 194 && BOOST_PP_ITERATION_START_1 >= 194 # define BOOST_PP_ITERATION_1 194 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 193 && BOOST_PP_ITERATION_START_1 >= 193 # define BOOST_PP_ITERATION_1 193 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 192 && BOOST_PP_ITERATION_START_1 >= 192 # define BOOST_PP_ITERATION_1 192 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 191 && BOOST_PP_ITERATION_START_1 >= 191 # define BOOST_PP_ITERATION_1 191 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 190 && BOOST_PP_ITERATION_START_1 >= 190 # define BOOST_PP_ITERATION_1 190 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 189 && BOOST_PP_ITERATION_START_1 >= 189 # define BOOST_PP_ITERATION_1 189 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 188 && BOOST_PP_ITERATION_START_1 >= 188 # define BOOST_PP_ITERATION_1 188 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 187 && BOOST_PP_ITERATION_START_1 >= 187 # define BOOST_PP_ITERATION_1 187 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 186 && BOOST_PP_ITERATION_START_1 >= 186 # define BOOST_PP_ITERATION_1 186 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 185 && BOOST_PP_ITERATION_START_1 >= 185 # define BOOST_PP_ITERATION_1 185 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 184 && BOOST_PP_ITERATION_START_1 >= 184 # define BOOST_PP_ITERATION_1 184 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 183 && BOOST_PP_ITERATION_START_1 >= 183 # define BOOST_PP_ITERATION_1 183 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 182 && BOOST_PP_ITERATION_START_1 >= 182 # define BOOST_PP_ITERATION_1 182 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 181 && BOOST_PP_ITERATION_START_1 >= 181 # define BOOST_PP_ITERATION_1 181 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 180 && BOOST_PP_ITERATION_START_1 >= 180 # define BOOST_PP_ITERATION_1 180 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 179 && BOOST_PP_ITERATION_START_1 >= 179 # define BOOST_PP_ITERATION_1 179 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 178 && BOOST_PP_ITERATION_START_1 >= 178 # define BOOST_PP_ITERATION_1 178 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 177 && BOOST_PP_ITERATION_START_1 >= 177 # define BOOST_PP_ITERATION_1 177 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 176 && BOOST_PP_ITERATION_START_1 >= 176 # define BOOST_PP_ITERATION_1 176 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 175 && BOOST_PP_ITERATION_START_1 >= 175 # define BOOST_PP_ITERATION_1 175 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 174 && BOOST_PP_ITERATION_START_1 >= 174 # define BOOST_PP_ITERATION_1 174 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 173 && BOOST_PP_ITERATION_START_1 >= 173 # define BOOST_PP_ITERATION_1 173 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 172 && BOOST_PP_ITERATION_START_1 >= 172 # define BOOST_PP_ITERATION_1 172 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 171 && BOOST_PP_ITERATION_START_1 >= 171 # define BOOST_PP_ITERATION_1 171 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 170 && BOOST_PP_ITERATION_START_1 >= 170 # define BOOST_PP_ITERATION_1 170 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 169 && BOOST_PP_ITERATION_START_1 >= 169 # define BOOST_PP_ITERATION_1 169 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 168 && BOOST_PP_ITERATION_START_1 >= 168 # define BOOST_PP_ITERATION_1 168 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 167 && BOOST_PP_ITERATION_START_1 >= 167 # define BOOST_PP_ITERATION_1 167 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 166 && BOOST_PP_ITERATION_START_1 >= 166 # define BOOST_PP_ITERATION_1 166 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 165 && BOOST_PP_ITERATION_START_1 >= 165 # define BOOST_PP_ITERATION_1 165 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 164 && BOOST_PP_ITERATION_START_1 >= 164 # define BOOST_PP_ITERATION_1 164 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 163 && BOOST_PP_ITERATION_START_1 >= 163 # define BOOST_PP_ITERATION_1 163 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 162 && BOOST_PP_ITERATION_START_1 >= 162 # define BOOST_PP_ITERATION_1 162 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 161 && BOOST_PP_ITERATION_START_1 >= 161 # define BOOST_PP_ITERATION_1 161 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 160 && BOOST_PP_ITERATION_START_1 >= 160 # define BOOST_PP_ITERATION_1 160 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 159 && BOOST_PP_ITERATION_START_1 >= 159 # define BOOST_PP_ITERATION_1 159 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 158 && BOOST_PP_ITERATION_START_1 >= 158 # define BOOST_PP_ITERATION_1 158 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 157 && BOOST_PP_ITERATION_START_1 >= 157 # define BOOST_PP_ITERATION_1 157 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 156 && BOOST_PP_ITERATION_START_1 >= 156 # define BOOST_PP_ITERATION_1 156 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 155 && BOOST_PP_ITERATION_START_1 >= 155 # define BOOST_PP_ITERATION_1 155 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 154 && BOOST_PP_ITERATION_START_1 >= 154 # define BOOST_PP_ITERATION_1 154 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 153 && BOOST_PP_ITERATION_START_1 >= 153 # define BOOST_PP_ITERATION_1 153 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 152 && BOOST_PP_ITERATION_START_1 >= 152 # define BOOST_PP_ITERATION_1 152 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 151 && BOOST_PP_ITERATION_START_1 >= 151 # define BOOST_PP_ITERATION_1 151 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 150 && BOOST_PP_ITERATION_START_1 >= 150 # define BOOST_PP_ITERATION_1 150 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 149 && BOOST_PP_ITERATION_START_1 >= 149 # define BOOST_PP_ITERATION_1 149 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 148 && BOOST_PP_ITERATION_START_1 >= 148 # define BOOST_PP_ITERATION_1 148 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 147 && BOOST_PP_ITERATION_START_1 >= 147 # define BOOST_PP_ITERATION_1 147 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 146 && BOOST_PP_ITERATION_START_1 >= 146 # define BOOST_PP_ITERATION_1 146 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 145 && BOOST_PP_ITERATION_START_1 >= 145 # define BOOST_PP_ITERATION_1 145 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 144 && BOOST_PP_ITERATION_START_1 >= 144 # define BOOST_PP_ITERATION_1 144 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 143 && BOOST_PP_ITERATION_START_1 >= 143 # define BOOST_PP_ITERATION_1 143 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 142 && BOOST_PP_ITERATION_START_1 >= 142 # define BOOST_PP_ITERATION_1 142 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 141 && BOOST_PP_ITERATION_START_1 >= 141 # define BOOST_PP_ITERATION_1 141 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 140 && BOOST_PP_ITERATION_START_1 >= 140 # define BOOST_PP_ITERATION_1 140 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 139 && BOOST_PP_ITERATION_START_1 >= 139 # define BOOST_PP_ITERATION_1 139 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 138 && BOOST_PP_ITERATION_START_1 >= 138 # define BOOST_PP_ITERATION_1 138 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 137 && BOOST_PP_ITERATION_START_1 >= 137 # define BOOST_PP_ITERATION_1 137 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 136 && BOOST_PP_ITERATION_START_1 >= 136 # define BOOST_PP_ITERATION_1 136 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 135 && BOOST_PP_ITERATION_START_1 >= 135 # define BOOST_PP_ITERATION_1 135 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 134 && BOOST_PP_ITERATION_START_1 >= 134 # define BOOST_PP_ITERATION_1 134 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 133 && BOOST_PP_ITERATION_START_1 >= 133 # define BOOST_PP_ITERATION_1 133 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 132 && BOOST_PP_ITERATION_START_1 >= 132 # define BOOST_PP_ITERATION_1 132 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 131 && BOOST_PP_ITERATION_START_1 >= 131 # define BOOST_PP_ITERATION_1 131 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 130 && BOOST_PP_ITERATION_START_1 >= 130 # define BOOST_PP_ITERATION_1 130 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 129 && BOOST_PP_ITERATION_START_1 >= 129 # define BOOST_PP_ITERATION_1 129 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 128 && BOOST_PP_ITERATION_START_1 >= 128 # define BOOST_PP_ITERATION_1 128 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 127 && BOOST_PP_ITERATION_START_1 >= 127 # define BOOST_PP_ITERATION_1 127 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 126 && BOOST_PP_ITERATION_START_1 >= 126 # define BOOST_PP_ITERATION_1 126 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 125 && BOOST_PP_ITERATION_START_1 >= 125 # define BOOST_PP_ITERATION_1 125 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 124 && BOOST_PP_ITERATION_START_1 >= 124 # define BOOST_PP_ITERATION_1 124 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 123 && BOOST_PP_ITERATION_START_1 >= 123 # define BOOST_PP_ITERATION_1 123 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 122 && BOOST_PP_ITERATION_START_1 >= 122 # define BOOST_PP_ITERATION_1 122 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 121 && BOOST_PP_ITERATION_START_1 >= 121 # define BOOST_PP_ITERATION_1 121 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 120 && BOOST_PP_ITERATION_START_1 >= 120 # define BOOST_PP_ITERATION_1 120 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 119 && BOOST_PP_ITERATION_START_1 >= 119 # define BOOST_PP_ITERATION_1 119 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 118 && BOOST_PP_ITERATION_START_1 >= 118 # define BOOST_PP_ITERATION_1 118 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 117 && BOOST_PP_ITERATION_START_1 >= 117 # define BOOST_PP_ITERATION_1 117 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 116 && BOOST_PP_ITERATION_START_1 >= 116 # define BOOST_PP_ITERATION_1 116 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 115 && BOOST_PP_ITERATION_START_1 >= 115 # define BOOST_PP_ITERATION_1 115 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 114 && BOOST_PP_ITERATION_START_1 >= 114 # define BOOST_PP_ITERATION_1 114 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 113 && BOOST_PP_ITERATION_START_1 >= 113 # define BOOST_PP_ITERATION_1 113 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 112 && BOOST_PP_ITERATION_START_1 >= 112 # define BOOST_PP_ITERATION_1 112 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 111 && BOOST_PP_ITERATION_START_1 >= 111 # define BOOST_PP_ITERATION_1 111 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 110 && BOOST_PP_ITERATION_START_1 >= 110 # define BOOST_PP_ITERATION_1 110 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 109 && BOOST_PP_ITERATION_START_1 >= 109 # define BOOST_PP_ITERATION_1 109 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 108 && BOOST_PP_ITERATION_START_1 >= 108 # define BOOST_PP_ITERATION_1 108 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 107 && BOOST_PP_ITERATION_START_1 >= 107 # define BOOST_PP_ITERATION_1 107 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 106 && BOOST_PP_ITERATION_START_1 >= 106 # define BOOST_PP_ITERATION_1 106 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 105 && BOOST_PP_ITERATION_START_1 >= 105 # define BOOST_PP_ITERATION_1 105 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 104 && BOOST_PP_ITERATION_START_1 >= 104 # define BOOST_PP_ITERATION_1 104 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 103 && BOOST_PP_ITERATION_START_1 >= 103 # define BOOST_PP_ITERATION_1 103 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 102 && BOOST_PP_ITERATION_START_1 >= 102 # define BOOST_PP_ITERATION_1 102 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 101 && BOOST_PP_ITERATION_START_1 >= 101 # define BOOST_PP_ITERATION_1 101 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 100 && BOOST_PP_ITERATION_START_1 >= 100 # define BOOST_PP_ITERATION_1 100 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 99 && BOOST_PP_ITERATION_START_1 >= 99 # define BOOST_PP_ITERATION_1 99 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 98 && BOOST_PP_ITERATION_START_1 >= 98 # define BOOST_PP_ITERATION_1 98 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 97 && BOOST_PP_ITERATION_START_1 >= 97 # define BOOST_PP_ITERATION_1 97 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 96 && BOOST_PP_ITERATION_START_1 >= 96 # define BOOST_PP_ITERATION_1 96 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 95 && BOOST_PP_ITERATION_START_1 >= 95 # define BOOST_PP_ITERATION_1 95 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 94 && BOOST_PP_ITERATION_START_1 >= 94 # define BOOST_PP_ITERATION_1 94 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 93 && BOOST_PP_ITERATION_START_1 >= 93 # define BOOST_PP_ITERATION_1 93 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 92 && BOOST_PP_ITERATION_START_1 >= 92 # define BOOST_PP_ITERATION_1 92 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 91 && BOOST_PP_ITERATION_START_1 >= 91 # define BOOST_PP_ITERATION_1 91 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 90 && BOOST_PP_ITERATION_START_1 >= 90 # define BOOST_PP_ITERATION_1 90 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 89 && BOOST_PP_ITERATION_START_1 >= 89 # define BOOST_PP_ITERATION_1 89 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 88 && BOOST_PP_ITERATION_START_1 >= 88 # define BOOST_PP_ITERATION_1 88 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 87 && BOOST_PP_ITERATION_START_1 >= 87 # define BOOST_PP_ITERATION_1 87 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 86 && BOOST_PP_ITERATION_START_1 >= 86 # define BOOST_PP_ITERATION_1 86 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 85 && BOOST_PP_ITERATION_START_1 >= 85 # define BOOST_PP_ITERATION_1 85 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 84 && BOOST_PP_ITERATION_START_1 >= 84 # define BOOST_PP_ITERATION_1 84 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 83 && BOOST_PP_ITERATION_START_1 >= 83 # define BOOST_PP_ITERATION_1 83 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 82 && BOOST_PP_ITERATION_START_1 >= 82 # define BOOST_PP_ITERATION_1 82 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 81 && BOOST_PP_ITERATION_START_1 >= 81 # define BOOST_PP_ITERATION_1 81 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 80 && BOOST_PP_ITERATION_START_1 >= 80 # define BOOST_PP_ITERATION_1 80 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 79 && BOOST_PP_ITERATION_START_1 >= 79 # define BOOST_PP_ITERATION_1 79 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 78 && BOOST_PP_ITERATION_START_1 >= 78 # define BOOST_PP_ITERATION_1 78 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 77 && BOOST_PP_ITERATION_START_1 >= 77 # define BOOST_PP_ITERATION_1 77 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 76 && BOOST_PP_ITERATION_START_1 >= 76 # define BOOST_PP_ITERATION_1 76 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 75 && BOOST_PP_ITERATION_START_1 >= 75 # define BOOST_PP_ITERATION_1 75 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 74 && BOOST_PP_ITERATION_START_1 >= 74 # define BOOST_PP_ITERATION_1 74 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 73 && BOOST_PP_ITERATION_START_1 >= 73 # define BOOST_PP_ITERATION_1 73 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 72 && BOOST_PP_ITERATION_START_1 >= 72 # define BOOST_PP_ITERATION_1 72 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 71 && BOOST_PP_ITERATION_START_1 >= 71 # define BOOST_PP_ITERATION_1 71 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 70 && BOOST_PP_ITERATION_START_1 >= 70 # define BOOST_PP_ITERATION_1 70 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 69 && BOOST_PP_ITERATION_START_1 >= 69 # define BOOST_PP_ITERATION_1 69 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 68 && BOOST_PP_ITERATION_START_1 >= 68 # define BOOST_PP_ITERATION_1 68 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 67 && BOOST_PP_ITERATION_START_1 >= 67 # define BOOST_PP_ITERATION_1 67 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 66 && BOOST_PP_ITERATION_START_1 >= 66 # define BOOST_PP_ITERATION_1 66 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 65 && BOOST_PP_ITERATION_START_1 >= 65 # define BOOST_PP_ITERATION_1 65 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 64 && BOOST_PP_ITERATION_START_1 >= 64 # define BOOST_PP_ITERATION_1 64 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 63 && BOOST_PP_ITERATION_START_1 >= 63 # define BOOST_PP_ITERATION_1 63 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 62 && BOOST_PP_ITERATION_START_1 >= 62 # define BOOST_PP_ITERATION_1 62 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 61 && BOOST_PP_ITERATION_START_1 >= 61 # define BOOST_PP_ITERATION_1 61 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 60 && BOOST_PP_ITERATION_START_1 >= 60 # define BOOST_PP_ITERATION_1 60 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 59 && BOOST_PP_ITERATION_START_1 >= 59 # define BOOST_PP_ITERATION_1 59 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 58 && BOOST_PP_ITERATION_START_1 >= 58 # define BOOST_PP_ITERATION_1 58 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 57 && BOOST_PP_ITERATION_START_1 >= 57 # define BOOST_PP_ITERATION_1 57 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 56 && BOOST_PP_ITERATION_START_1 >= 56 # define BOOST_PP_ITERATION_1 56 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 55 && BOOST_PP_ITERATION_START_1 >= 55 # define BOOST_PP_ITERATION_1 55 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 54 && BOOST_PP_ITERATION_START_1 >= 54 # define BOOST_PP_ITERATION_1 54 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 53 && BOOST_PP_ITERATION_START_1 >= 53 # define BOOST_PP_ITERATION_1 53 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 52 && BOOST_PP_ITERATION_START_1 >= 52 # define BOOST_PP_ITERATION_1 52 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 51 && BOOST_PP_ITERATION_START_1 >= 51 # define BOOST_PP_ITERATION_1 51 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 50 && BOOST_PP_ITERATION_START_1 >= 50 # define BOOST_PP_ITERATION_1 50 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 49 && BOOST_PP_ITERATION_START_1 >= 49 # define BOOST_PP_ITERATION_1 49 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 48 && BOOST_PP_ITERATION_START_1 >= 48 # define BOOST_PP_ITERATION_1 48 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 47 && BOOST_PP_ITERATION_START_1 >= 47 # define BOOST_PP_ITERATION_1 47 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 46 && BOOST_PP_ITERATION_START_1 >= 46 # define BOOST_PP_ITERATION_1 46 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 45 && BOOST_PP_ITERATION_START_1 >= 45 # define BOOST_PP_ITERATION_1 45 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 44 && BOOST_PP_ITERATION_START_1 >= 44 # define BOOST_PP_ITERATION_1 44 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 43 && BOOST_PP_ITERATION_START_1 >= 43 # define BOOST_PP_ITERATION_1 43 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 42 && BOOST_PP_ITERATION_START_1 >= 42 # define BOOST_PP_ITERATION_1 42 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 41 && BOOST_PP_ITERATION_START_1 >= 41 # define BOOST_PP_ITERATION_1 41 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 40 && BOOST_PP_ITERATION_START_1 >= 40 # define BOOST_PP_ITERATION_1 40 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 39 && BOOST_PP_ITERATION_START_1 >= 39 # define BOOST_PP_ITERATION_1 39 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 38 && BOOST_PP_ITERATION_START_1 >= 38 # define BOOST_PP_ITERATION_1 38 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 37 && BOOST_PP_ITERATION_START_1 >= 37 # define BOOST_PP_ITERATION_1 37 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 36 && BOOST_PP_ITERATION_START_1 >= 36 # define BOOST_PP_ITERATION_1 36 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 35 && BOOST_PP_ITERATION_START_1 >= 35 # define BOOST_PP_ITERATION_1 35 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 34 && BOOST_PP_ITERATION_START_1 >= 34 # define BOOST_PP_ITERATION_1 34 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 33 && BOOST_PP_ITERATION_START_1 >= 33 # define BOOST_PP_ITERATION_1 33 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 32 && BOOST_PP_ITERATION_START_1 >= 32 # define BOOST_PP_ITERATION_1 32 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 31 && BOOST_PP_ITERATION_START_1 >= 31 # define BOOST_PP_ITERATION_1 31 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 30 && BOOST_PP_ITERATION_START_1 >= 30 # define BOOST_PP_ITERATION_1 30 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 29 && BOOST_PP_ITERATION_START_1 >= 29 # define BOOST_PP_ITERATION_1 29 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 28 && BOOST_PP_ITERATION_START_1 >= 28 # define BOOST_PP_ITERATION_1 28 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 27 && BOOST_PP_ITERATION_START_1 >= 27 # define BOOST_PP_ITERATION_1 27 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 26 && BOOST_PP_ITERATION_START_1 >= 26 # define BOOST_PP_ITERATION_1 26 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 25 && BOOST_PP_ITERATION_START_1 >= 25 # define BOOST_PP_ITERATION_1 25 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 24 && BOOST_PP_ITERATION_START_1 >= 24 # define BOOST_PP_ITERATION_1 24 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 23 && BOOST_PP_ITERATION_START_1 >= 23 # define BOOST_PP_ITERATION_1 23 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 22 && BOOST_PP_ITERATION_START_1 >= 22 # define BOOST_PP_ITERATION_1 22 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 21 && BOOST_PP_ITERATION_START_1 >= 21 # define BOOST_PP_ITERATION_1 21 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 20 && BOOST_PP_ITERATION_START_1 >= 20 # define BOOST_PP_ITERATION_1 20 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 19 && BOOST_PP_ITERATION_START_1 >= 19 # define BOOST_PP_ITERATION_1 19 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 18 && BOOST_PP_ITERATION_START_1 >= 18 # define BOOST_PP_ITERATION_1 18 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 17 && BOOST_PP_ITERATION_START_1 >= 17 # define BOOST_PP_ITERATION_1 17 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 16 && BOOST_PP_ITERATION_START_1 >= 16 # define BOOST_PP_ITERATION_1 16 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 15 && BOOST_PP_ITERATION_START_1 >= 15 # define BOOST_PP_ITERATION_1 15 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 14 && BOOST_PP_ITERATION_START_1 >= 14 # define BOOST_PP_ITERATION_1 14 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 13 && BOOST_PP_ITERATION_START_1 >= 13 # define BOOST_PP_ITERATION_1 13 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 12 && BOOST_PP_ITERATION_START_1 >= 12 # define BOOST_PP_ITERATION_1 12 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 11 && BOOST_PP_ITERATION_START_1 >= 11 # define BOOST_PP_ITERATION_1 11 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 10 && BOOST_PP_ITERATION_START_1 >= 10 # define BOOST_PP_ITERATION_1 10 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 9 && BOOST_PP_ITERATION_START_1 >= 9 # define BOOST_PP_ITERATION_1 9 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 8 && BOOST_PP_ITERATION_START_1 >= 8 # define BOOST_PP_ITERATION_1 8 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 7 && BOOST_PP_ITERATION_START_1 >= 7 # define BOOST_PP_ITERATION_1 7 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 6 && BOOST_PP_ITERATION_START_1 >= 6 # define BOOST_PP_ITERATION_1 6 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 5 && BOOST_PP_ITERATION_START_1 >= 5 # define BOOST_PP_ITERATION_1 5 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 4 && BOOST_PP_ITERATION_START_1 >= 4 # define BOOST_PP_ITERATION_1 4 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 3 && BOOST_PP_ITERATION_START_1 >= 3 # define BOOST_PP_ITERATION_1 3 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 2 && BOOST_PP_ITERATION_START_1 >= 2 # define BOOST_PP_ITERATION_1 2 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 1 && BOOST_PP_ITERATION_START_1 >= 1 # define BOOST_PP_ITERATION_1 1 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif # if BOOST_PP_ITERATION_FINISH_1 <= 0 && BOOST_PP_ITERATION_START_1 >= 0 # define BOOST_PP_ITERATION_1 0 # include BOOST_PP_FILENAME_1 # undef BOOST_PP_ITERATION_1 # endif ================================================ FILE: benchmarks/boost/preprocessor/iteration/detail/iter/reverse2.hpp ================================================ # /* ************************************************************************** # * * # * (C) Copyright Paul Mensonides 2002. # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # * * # ************************************************************************** */ # # /* See http://www.boost.org for most recent version. */ # # if BOOST_PP_ITERATION_FINISH_2 <= 256 && BOOST_PP_ITERATION_START_2 >= 256 # define BOOST_PP_ITERATION_2 256 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 255 && BOOST_PP_ITERATION_START_2 >= 255 # define BOOST_PP_ITERATION_2 255 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 254 && BOOST_PP_ITERATION_START_2 >= 254 # define BOOST_PP_ITERATION_2 254 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 253 && BOOST_PP_ITERATION_START_2 >= 253 # define BOOST_PP_ITERATION_2 253 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 252 && BOOST_PP_ITERATION_START_2 >= 252 # define BOOST_PP_ITERATION_2 252 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 251 && BOOST_PP_ITERATION_START_2 >= 251 # define BOOST_PP_ITERATION_2 251 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 250 && BOOST_PP_ITERATION_START_2 >= 250 # define BOOST_PP_ITERATION_2 250 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 249 && BOOST_PP_ITERATION_START_2 >= 249 # define BOOST_PP_ITERATION_2 249 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 248 && BOOST_PP_ITERATION_START_2 >= 248 # define BOOST_PP_ITERATION_2 248 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 247 && BOOST_PP_ITERATION_START_2 >= 247 # define BOOST_PP_ITERATION_2 247 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 246 && BOOST_PP_ITERATION_START_2 >= 246 # define BOOST_PP_ITERATION_2 246 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 245 && BOOST_PP_ITERATION_START_2 >= 245 # define BOOST_PP_ITERATION_2 245 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 244 && BOOST_PP_ITERATION_START_2 >= 244 # define BOOST_PP_ITERATION_2 244 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 243 && BOOST_PP_ITERATION_START_2 >= 243 # define BOOST_PP_ITERATION_2 243 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 242 && BOOST_PP_ITERATION_START_2 >= 242 # define BOOST_PP_ITERATION_2 242 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 241 && BOOST_PP_ITERATION_START_2 >= 241 # define BOOST_PP_ITERATION_2 241 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 240 && BOOST_PP_ITERATION_START_2 >= 240 # define BOOST_PP_ITERATION_2 240 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 239 && BOOST_PP_ITERATION_START_2 >= 239 # define BOOST_PP_ITERATION_2 239 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 238 && BOOST_PP_ITERATION_START_2 >= 238 # define BOOST_PP_ITERATION_2 238 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 237 && BOOST_PP_ITERATION_START_2 >= 237 # define BOOST_PP_ITERATION_2 237 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 236 && BOOST_PP_ITERATION_START_2 >= 236 # define BOOST_PP_ITERATION_2 236 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 235 && BOOST_PP_ITERATION_START_2 >= 235 # define BOOST_PP_ITERATION_2 235 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 234 && BOOST_PP_ITERATION_START_2 >= 234 # define BOOST_PP_ITERATION_2 234 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 233 && BOOST_PP_ITERATION_START_2 >= 233 # define BOOST_PP_ITERATION_2 233 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 232 && BOOST_PP_ITERATION_START_2 >= 232 # define BOOST_PP_ITERATION_2 232 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 231 && BOOST_PP_ITERATION_START_2 >= 231 # define BOOST_PP_ITERATION_2 231 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 230 && BOOST_PP_ITERATION_START_2 >= 230 # define BOOST_PP_ITERATION_2 230 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 229 && BOOST_PP_ITERATION_START_2 >= 229 # define BOOST_PP_ITERATION_2 229 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 228 && BOOST_PP_ITERATION_START_2 >= 228 # define BOOST_PP_ITERATION_2 228 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 227 && BOOST_PP_ITERATION_START_2 >= 227 # define BOOST_PP_ITERATION_2 227 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 226 && BOOST_PP_ITERATION_START_2 >= 226 # define BOOST_PP_ITERATION_2 226 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 225 && BOOST_PP_ITERATION_START_2 >= 225 # define BOOST_PP_ITERATION_2 225 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 224 && BOOST_PP_ITERATION_START_2 >= 224 # define BOOST_PP_ITERATION_2 224 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 223 && BOOST_PP_ITERATION_START_2 >= 223 # define BOOST_PP_ITERATION_2 223 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 222 && BOOST_PP_ITERATION_START_2 >= 222 # define BOOST_PP_ITERATION_2 222 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 221 && BOOST_PP_ITERATION_START_2 >= 221 # define BOOST_PP_ITERATION_2 221 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 220 && BOOST_PP_ITERATION_START_2 >= 220 # define BOOST_PP_ITERATION_2 220 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 219 && BOOST_PP_ITERATION_START_2 >= 219 # define BOOST_PP_ITERATION_2 219 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 218 && BOOST_PP_ITERATION_START_2 >= 218 # define BOOST_PP_ITERATION_2 218 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 217 && BOOST_PP_ITERATION_START_2 >= 217 # define BOOST_PP_ITERATION_2 217 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 216 && BOOST_PP_ITERATION_START_2 >= 216 # define BOOST_PP_ITERATION_2 216 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 215 && BOOST_PP_ITERATION_START_2 >= 215 # define BOOST_PP_ITERATION_2 215 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 214 && BOOST_PP_ITERATION_START_2 >= 214 # define BOOST_PP_ITERATION_2 214 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 213 && BOOST_PP_ITERATION_START_2 >= 213 # define BOOST_PP_ITERATION_2 213 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 212 && BOOST_PP_ITERATION_START_2 >= 212 # define BOOST_PP_ITERATION_2 212 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 211 && BOOST_PP_ITERATION_START_2 >= 211 # define BOOST_PP_ITERATION_2 211 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 210 && BOOST_PP_ITERATION_START_2 >= 210 # define BOOST_PP_ITERATION_2 210 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 209 && BOOST_PP_ITERATION_START_2 >= 209 # define BOOST_PP_ITERATION_2 209 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 208 && BOOST_PP_ITERATION_START_2 >= 208 # define BOOST_PP_ITERATION_2 208 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 207 && BOOST_PP_ITERATION_START_2 >= 207 # define BOOST_PP_ITERATION_2 207 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 206 && BOOST_PP_ITERATION_START_2 >= 206 # define BOOST_PP_ITERATION_2 206 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 205 && BOOST_PP_ITERATION_START_2 >= 205 # define BOOST_PP_ITERATION_2 205 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 204 && BOOST_PP_ITERATION_START_2 >= 204 # define BOOST_PP_ITERATION_2 204 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 203 && BOOST_PP_ITERATION_START_2 >= 203 # define BOOST_PP_ITERATION_2 203 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 202 && BOOST_PP_ITERATION_START_2 >= 202 # define BOOST_PP_ITERATION_2 202 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 201 && BOOST_PP_ITERATION_START_2 >= 201 # define BOOST_PP_ITERATION_2 201 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 200 && BOOST_PP_ITERATION_START_2 >= 200 # define BOOST_PP_ITERATION_2 200 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 199 && BOOST_PP_ITERATION_START_2 >= 199 # define BOOST_PP_ITERATION_2 199 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 198 && BOOST_PP_ITERATION_START_2 >= 198 # define BOOST_PP_ITERATION_2 198 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 197 && BOOST_PP_ITERATION_START_2 >= 197 # define BOOST_PP_ITERATION_2 197 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 196 && BOOST_PP_ITERATION_START_2 >= 196 # define BOOST_PP_ITERATION_2 196 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 195 && BOOST_PP_ITERATION_START_2 >= 195 # define BOOST_PP_ITERATION_2 195 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 194 && BOOST_PP_ITERATION_START_2 >= 194 # define BOOST_PP_ITERATION_2 194 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 193 && BOOST_PP_ITERATION_START_2 >= 193 # define BOOST_PP_ITERATION_2 193 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 192 && BOOST_PP_ITERATION_START_2 >= 192 # define BOOST_PP_ITERATION_2 192 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 191 && BOOST_PP_ITERATION_START_2 >= 191 # define BOOST_PP_ITERATION_2 191 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 190 && BOOST_PP_ITERATION_START_2 >= 190 # define BOOST_PP_ITERATION_2 190 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 189 && BOOST_PP_ITERATION_START_2 >= 189 # define BOOST_PP_ITERATION_2 189 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 188 && BOOST_PP_ITERATION_START_2 >= 188 # define BOOST_PP_ITERATION_2 188 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 187 && BOOST_PP_ITERATION_START_2 >= 187 # define BOOST_PP_ITERATION_2 187 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 186 && BOOST_PP_ITERATION_START_2 >= 186 # define BOOST_PP_ITERATION_2 186 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 185 && BOOST_PP_ITERATION_START_2 >= 185 # define BOOST_PP_ITERATION_2 185 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 184 && BOOST_PP_ITERATION_START_2 >= 184 # define BOOST_PP_ITERATION_2 184 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 183 && BOOST_PP_ITERATION_START_2 >= 183 # define BOOST_PP_ITERATION_2 183 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 182 && BOOST_PP_ITERATION_START_2 >= 182 # define BOOST_PP_ITERATION_2 182 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 181 && BOOST_PP_ITERATION_START_2 >= 181 # define BOOST_PP_ITERATION_2 181 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 180 && BOOST_PP_ITERATION_START_2 >= 180 # define BOOST_PP_ITERATION_2 180 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 179 && BOOST_PP_ITERATION_START_2 >= 179 # define BOOST_PP_ITERATION_2 179 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 178 && BOOST_PP_ITERATION_START_2 >= 178 # define BOOST_PP_ITERATION_2 178 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 177 && BOOST_PP_ITERATION_START_2 >= 177 # define BOOST_PP_ITERATION_2 177 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 176 && BOOST_PP_ITERATION_START_2 >= 176 # define BOOST_PP_ITERATION_2 176 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 175 && BOOST_PP_ITERATION_START_2 >= 175 # define BOOST_PP_ITERATION_2 175 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 174 && BOOST_PP_ITERATION_START_2 >= 174 # define BOOST_PP_ITERATION_2 174 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 173 && BOOST_PP_ITERATION_START_2 >= 173 # define BOOST_PP_ITERATION_2 173 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 172 && BOOST_PP_ITERATION_START_2 >= 172 # define BOOST_PP_ITERATION_2 172 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 171 && BOOST_PP_ITERATION_START_2 >= 171 # define BOOST_PP_ITERATION_2 171 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 170 && BOOST_PP_ITERATION_START_2 >= 170 # define BOOST_PP_ITERATION_2 170 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 169 && BOOST_PP_ITERATION_START_2 >= 169 # define BOOST_PP_ITERATION_2 169 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 168 && BOOST_PP_ITERATION_START_2 >= 168 # define BOOST_PP_ITERATION_2 168 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 167 && BOOST_PP_ITERATION_START_2 >= 167 # define BOOST_PP_ITERATION_2 167 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 166 && BOOST_PP_ITERATION_START_2 >= 166 # define BOOST_PP_ITERATION_2 166 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 165 && BOOST_PP_ITERATION_START_2 >= 165 # define BOOST_PP_ITERATION_2 165 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 164 && BOOST_PP_ITERATION_START_2 >= 164 # define BOOST_PP_ITERATION_2 164 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 163 && BOOST_PP_ITERATION_START_2 >= 163 # define BOOST_PP_ITERATION_2 163 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 162 && BOOST_PP_ITERATION_START_2 >= 162 # define BOOST_PP_ITERATION_2 162 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 161 && BOOST_PP_ITERATION_START_2 >= 161 # define BOOST_PP_ITERATION_2 161 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 160 && BOOST_PP_ITERATION_START_2 >= 160 # define BOOST_PP_ITERATION_2 160 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 159 && BOOST_PP_ITERATION_START_2 >= 159 # define BOOST_PP_ITERATION_2 159 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 158 && BOOST_PP_ITERATION_START_2 >= 158 # define BOOST_PP_ITERATION_2 158 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 157 && BOOST_PP_ITERATION_START_2 >= 157 # define BOOST_PP_ITERATION_2 157 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 156 && BOOST_PP_ITERATION_START_2 >= 156 # define BOOST_PP_ITERATION_2 156 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 155 && BOOST_PP_ITERATION_START_2 >= 155 # define BOOST_PP_ITERATION_2 155 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 154 && BOOST_PP_ITERATION_START_2 >= 154 # define BOOST_PP_ITERATION_2 154 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 153 && BOOST_PP_ITERATION_START_2 >= 153 # define BOOST_PP_ITERATION_2 153 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 152 && BOOST_PP_ITERATION_START_2 >= 152 # define BOOST_PP_ITERATION_2 152 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 151 && BOOST_PP_ITERATION_START_2 >= 151 # define BOOST_PP_ITERATION_2 151 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 150 && BOOST_PP_ITERATION_START_2 >= 150 # define BOOST_PP_ITERATION_2 150 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 149 && BOOST_PP_ITERATION_START_2 >= 149 # define BOOST_PP_ITERATION_2 149 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 148 && BOOST_PP_ITERATION_START_2 >= 148 # define BOOST_PP_ITERATION_2 148 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 147 && BOOST_PP_ITERATION_START_2 >= 147 # define BOOST_PP_ITERATION_2 147 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 146 && BOOST_PP_ITERATION_START_2 >= 146 # define BOOST_PP_ITERATION_2 146 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 145 && BOOST_PP_ITERATION_START_2 >= 145 # define BOOST_PP_ITERATION_2 145 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 144 && BOOST_PP_ITERATION_START_2 >= 144 # define BOOST_PP_ITERATION_2 144 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 143 && BOOST_PP_ITERATION_START_2 >= 143 # define BOOST_PP_ITERATION_2 143 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 142 && BOOST_PP_ITERATION_START_2 >= 142 # define BOOST_PP_ITERATION_2 142 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 141 && BOOST_PP_ITERATION_START_2 >= 141 # define BOOST_PP_ITERATION_2 141 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 140 && BOOST_PP_ITERATION_START_2 >= 140 # define BOOST_PP_ITERATION_2 140 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 139 && BOOST_PP_ITERATION_START_2 >= 139 # define BOOST_PP_ITERATION_2 139 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 138 && BOOST_PP_ITERATION_START_2 >= 138 # define BOOST_PP_ITERATION_2 138 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 137 && BOOST_PP_ITERATION_START_2 >= 137 # define BOOST_PP_ITERATION_2 137 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 136 && BOOST_PP_ITERATION_START_2 >= 136 # define BOOST_PP_ITERATION_2 136 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 135 && BOOST_PP_ITERATION_START_2 >= 135 # define BOOST_PP_ITERATION_2 135 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 134 && BOOST_PP_ITERATION_START_2 >= 134 # define BOOST_PP_ITERATION_2 134 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 133 && BOOST_PP_ITERATION_START_2 >= 133 # define BOOST_PP_ITERATION_2 133 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 132 && BOOST_PP_ITERATION_START_2 >= 132 # define BOOST_PP_ITERATION_2 132 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 131 && BOOST_PP_ITERATION_START_2 >= 131 # define BOOST_PP_ITERATION_2 131 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 130 && BOOST_PP_ITERATION_START_2 >= 130 # define BOOST_PP_ITERATION_2 130 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 129 && BOOST_PP_ITERATION_START_2 >= 129 # define BOOST_PP_ITERATION_2 129 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 128 && BOOST_PP_ITERATION_START_2 >= 128 # define BOOST_PP_ITERATION_2 128 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 127 && BOOST_PP_ITERATION_START_2 >= 127 # define BOOST_PP_ITERATION_2 127 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 126 && BOOST_PP_ITERATION_START_2 >= 126 # define BOOST_PP_ITERATION_2 126 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 125 && BOOST_PP_ITERATION_START_2 >= 125 # define BOOST_PP_ITERATION_2 125 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 124 && BOOST_PP_ITERATION_START_2 >= 124 # define BOOST_PP_ITERATION_2 124 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 123 && BOOST_PP_ITERATION_START_2 >= 123 # define BOOST_PP_ITERATION_2 123 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 122 && BOOST_PP_ITERATION_START_2 >= 122 # define BOOST_PP_ITERATION_2 122 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 121 && BOOST_PP_ITERATION_START_2 >= 121 # define BOOST_PP_ITERATION_2 121 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 120 && BOOST_PP_ITERATION_START_2 >= 120 # define BOOST_PP_ITERATION_2 120 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 119 && BOOST_PP_ITERATION_START_2 >= 119 # define BOOST_PP_ITERATION_2 119 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 118 && BOOST_PP_ITERATION_START_2 >= 118 # define BOOST_PP_ITERATION_2 118 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 117 && BOOST_PP_ITERATION_START_2 >= 117 # define BOOST_PP_ITERATION_2 117 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 116 && BOOST_PP_ITERATION_START_2 >= 116 # define BOOST_PP_ITERATION_2 116 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 115 && BOOST_PP_ITERATION_START_2 >= 115 # define BOOST_PP_ITERATION_2 115 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 114 && BOOST_PP_ITERATION_START_2 >= 114 # define BOOST_PP_ITERATION_2 114 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 113 && BOOST_PP_ITERATION_START_2 >= 113 # define BOOST_PP_ITERATION_2 113 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 112 && BOOST_PP_ITERATION_START_2 >= 112 # define BOOST_PP_ITERATION_2 112 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 111 && BOOST_PP_ITERATION_START_2 >= 111 # define BOOST_PP_ITERATION_2 111 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 110 && BOOST_PP_ITERATION_START_2 >= 110 # define BOOST_PP_ITERATION_2 110 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 109 && BOOST_PP_ITERATION_START_2 >= 109 # define BOOST_PP_ITERATION_2 109 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 108 && BOOST_PP_ITERATION_START_2 >= 108 # define BOOST_PP_ITERATION_2 108 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 107 && BOOST_PP_ITERATION_START_2 >= 107 # define BOOST_PP_ITERATION_2 107 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 106 && BOOST_PP_ITERATION_START_2 >= 106 # define BOOST_PP_ITERATION_2 106 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 105 && BOOST_PP_ITERATION_START_2 >= 105 # define BOOST_PP_ITERATION_2 105 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 104 && BOOST_PP_ITERATION_START_2 >= 104 # define BOOST_PP_ITERATION_2 104 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 103 && BOOST_PP_ITERATION_START_2 >= 103 # define BOOST_PP_ITERATION_2 103 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 102 && BOOST_PP_ITERATION_START_2 >= 102 # define BOOST_PP_ITERATION_2 102 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 101 && BOOST_PP_ITERATION_START_2 >= 101 # define BOOST_PP_ITERATION_2 101 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 100 && BOOST_PP_ITERATION_START_2 >= 100 # define BOOST_PP_ITERATION_2 100 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 99 && BOOST_PP_ITERATION_START_2 >= 99 # define BOOST_PP_ITERATION_2 99 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 98 && BOOST_PP_ITERATION_START_2 >= 98 # define BOOST_PP_ITERATION_2 98 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 97 && BOOST_PP_ITERATION_START_2 >= 97 # define BOOST_PP_ITERATION_2 97 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 96 && BOOST_PP_ITERATION_START_2 >= 96 # define BOOST_PP_ITERATION_2 96 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 95 && BOOST_PP_ITERATION_START_2 >= 95 # define BOOST_PP_ITERATION_2 95 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 94 && BOOST_PP_ITERATION_START_2 >= 94 # define BOOST_PP_ITERATION_2 94 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 93 && BOOST_PP_ITERATION_START_2 >= 93 # define BOOST_PP_ITERATION_2 93 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 92 && BOOST_PP_ITERATION_START_2 >= 92 # define BOOST_PP_ITERATION_2 92 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 91 && BOOST_PP_ITERATION_START_2 >= 91 # define BOOST_PP_ITERATION_2 91 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 90 && BOOST_PP_ITERATION_START_2 >= 90 # define BOOST_PP_ITERATION_2 90 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 89 && BOOST_PP_ITERATION_START_2 >= 89 # define BOOST_PP_ITERATION_2 89 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 88 && BOOST_PP_ITERATION_START_2 >= 88 # define BOOST_PP_ITERATION_2 88 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 87 && BOOST_PP_ITERATION_START_2 >= 87 # define BOOST_PP_ITERATION_2 87 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 86 && BOOST_PP_ITERATION_START_2 >= 86 # define BOOST_PP_ITERATION_2 86 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 85 && BOOST_PP_ITERATION_START_2 >= 85 # define BOOST_PP_ITERATION_2 85 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 84 && BOOST_PP_ITERATION_START_2 >= 84 # define BOOST_PP_ITERATION_2 84 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 83 && BOOST_PP_ITERATION_START_2 >= 83 # define BOOST_PP_ITERATION_2 83 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 82 && BOOST_PP_ITERATION_START_2 >= 82 # define BOOST_PP_ITERATION_2 82 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 81 && BOOST_PP_ITERATION_START_2 >= 81 # define BOOST_PP_ITERATION_2 81 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 80 && BOOST_PP_ITERATION_START_2 >= 80 # define BOOST_PP_ITERATION_2 80 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 79 && BOOST_PP_ITERATION_START_2 >= 79 # define BOOST_PP_ITERATION_2 79 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 78 && BOOST_PP_ITERATION_START_2 >= 78 # define BOOST_PP_ITERATION_2 78 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 77 && BOOST_PP_ITERATION_START_2 >= 77 # define BOOST_PP_ITERATION_2 77 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 76 && BOOST_PP_ITERATION_START_2 >= 76 # define BOOST_PP_ITERATION_2 76 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 75 && BOOST_PP_ITERATION_START_2 >= 75 # define BOOST_PP_ITERATION_2 75 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 74 && BOOST_PP_ITERATION_START_2 >= 74 # define BOOST_PP_ITERATION_2 74 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 73 && BOOST_PP_ITERATION_START_2 >= 73 # define BOOST_PP_ITERATION_2 73 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 72 && BOOST_PP_ITERATION_START_2 >= 72 # define BOOST_PP_ITERATION_2 72 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 71 && BOOST_PP_ITERATION_START_2 >= 71 # define BOOST_PP_ITERATION_2 71 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 70 && BOOST_PP_ITERATION_START_2 >= 70 # define BOOST_PP_ITERATION_2 70 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 69 && BOOST_PP_ITERATION_START_2 >= 69 # define BOOST_PP_ITERATION_2 69 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 68 && BOOST_PP_ITERATION_START_2 >= 68 # define BOOST_PP_ITERATION_2 68 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 67 && BOOST_PP_ITERATION_START_2 >= 67 # define BOOST_PP_ITERATION_2 67 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 66 && BOOST_PP_ITERATION_START_2 >= 66 # define BOOST_PP_ITERATION_2 66 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 65 && BOOST_PP_ITERATION_START_2 >= 65 # define BOOST_PP_ITERATION_2 65 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 64 && BOOST_PP_ITERATION_START_2 >= 64 # define BOOST_PP_ITERATION_2 64 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 63 && BOOST_PP_ITERATION_START_2 >= 63 # define BOOST_PP_ITERATION_2 63 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 62 && BOOST_PP_ITERATION_START_2 >= 62 # define BOOST_PP_ITERATION_2 62 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 61 && BOOST_PP_ITERATION_START_2 >= 61 # define BOOST_PP_ITERATION_2 61 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 60 && BOOST_PP_ITERATION_START_2 >= 60 # define BOOST_PP_ITERATION_2 60 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 59 && BOOST_PP_ITERATION_START_2 >= 59 # define BOOST_PP_ITERATION_2 59 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 58 && BOOST_PP_ITERATION_START_2 >= 58 # define BOOST_PP_ITERATION_2 58 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 57 && BOOST_PP_ITERATION_START_2 >= 57 # define BOOST_PP_ITERATION_2 57 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 56 && BOOST_PP_ITERATION_START_2 >= 56 # define BOOST_PP_ITERATION_2 56 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 55 && BOOST_PP_ITERATION_START_2 >= 55 # define BOOST_PP_ITERATION_2 55 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 54 && BOOST_PP_ITERATION_START_2 >= 54 # define BOOST_PP_ITERATION_2 54 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 53 && BOOST_PP_ITERATION_START_2 >= 53 # define BOOST_PP_ITERATION_2 53 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 52 && BOOST_PP_ITERATION_START_2 >= 52 # define BOOST_PP_ITERATION_2 52 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 51 && BOOST_PP_ITERATION_START_2 >= 51 # define BOOST_PP_ITERATION_2 51 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 50 && BOOST_PP_ITERATION_START_2 >= 50 # define BOOST_PP_ITERATION_2 50 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 49 && BOOST_PP_ITERATION_START_2 >= 49 # define BOOST_PP_ITERATION_2 49 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 48 && BOOST_PP_ITERATION_START_2 >= 48 # define BOOST_PP_ITERATION_2 48 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 47 && BOOST_PP_ITERATION_START_2 >= 47 # define BOOST_PP_ITERATION_2 47 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 46 && BOOST_PP_ITERATION_START_2 >= 46 # define BOOST_PP_ITERATION_2 46 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 45 && BOOST_PP_ITERATION_START_2 >= 45 # define BOOST_PP_ITERATION_2 45 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 44 && BOOST_PP_ITERATION_START_2 >= 44 # define BOOST_PP_ITERATION_2 44 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 43 && BOOST_PP_ITERATION_START_2 >= 43 # define BOOST_PP_ITERATION_2 43 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 42 && BOOST_PP_ITERATION_START_2 >= 42 # define BOOST_PP_ITERATION_2 42 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 41 && BOOST_PP_ITERATION_START_2 >= 41 # define BOOST_PP_ITERATION_2 41 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 40 && BOOST_PP_ITERATION_START_2 >= 40 # define BOOST_PP_ITERATION_2 40 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 39 && BOOST_PP_ITERATION_START_2 >= 39 # define BOOST_PP_ITERATION_2 39 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 38 && BOOST_PP_ITERATION_START_2 >= 38 # define BOOST_PP_ITERATION_2 38 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 37 && BOOST_PP_ITERATION_START_2 >= 37 # define BOOST_PP_ITERATION_2 37 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 36 && BOOST_PP_ITERATION_START_2 >= 36 # define BOOST_PP_ITERATION_2 36 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 35 && BOOST_PP_ITERATION_START_2 >= 35 # define BOOST_PP_ITERATION_2 35 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 34 && BOOST_PP_ITERATION_START_2 >= 34 # define BOOST_PP_ITERATION_2 34 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 33 && BOOST_PP_ITERATION_START_2 >= 33 # define BOOST_PP_ITERATION_2 33 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 32 && BOOST_PP_ITERATION_START_2 >= 32 # define BOOST_PP_ITERATION_2 32 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 31 && BOOST_PP_ITERATION_START_2 >= 31 # define BOOST_PP_ITERATION_2 31 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 30 && BOOST_PP_ITERATION_START_2 >= 30 # define BOOST_PP_ITERATION_2 30 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 29 && BOOST_PP_ITERATION_START_2 >= 29 # define BOOST_PP_ITERATION_2 29 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 28 && BOOST_PP_ITERATION_START_2 >= 28 # define BOOST_PP_ITERATION_2 28 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 27 && BOOST_PP_ITERATION_START_2 >= 27 # define BOOST_PP_ITERATION_2 27 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 26 && BOOST_PP_ITERATION_START_2 >= 26 # define BOOST_PP_ITERATION_2 26 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 25 && BOOST_PP_ITERATION_START_2 >= 25 # define BOOST_PP_ITERATION_2 25 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 24 && BOOST_PP_ITERATION_START_2 >= 24 # define BOOST_PP_ITERATION_2 24 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 23 && BOOST_PP_ITERATION_START_2 >= 23 # define BOOST_PP_ITERATION_2 23 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 22 && BOOST_PP_ITERATION_START_2 >= 22 # define BOOST_PP_ITERATION_2 22 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 21 && BOOST_PP_ITERATION_START_2 >= 21 # define BOOST_PP_ITERATION_2 21 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 20 && BOOST_PP_ITERATION_START_2 >= 20 # define BOOST_PP_ITERATION_2 20 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 19 && BOOST_PP_ITERATION_START_2 >= 19 # define BOOST_PP_ITERATION_2 19 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 18 && BOOST_PP_ITERATION_START_2 >= 18 # define BOOST_PP_ITERATION_2 18 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 17 && BOOST_PP_ITERATION_START_2 >= 17 # define BOOST_PP_ITERATION_2 17 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 16 && BOOST_PP_ITERATION_START_2 >= 16 # define BOOST_PP_ITERATION_2 16 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 15 && BOOST_PP_ITERATION_START_2 >= 15 # define BOOST_PP_ITERATION_2 15 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 14 && BOOST_PP_ITERATION_START_2 >= 14 # define BOOST_PP_ITERATION_2 14 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 13 && BOOST_PP_ITERATION_START_2 >= 13 # define BOOST_PP_ITERATION_2 13 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 12 && BOOST_PP_ITERATION_START_2 >= 12 # define BOOST_PP_ITERATION_2 12 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 11 && BOOST_PP_ITERATION_START_2 >= 11 # define BOOST_PP_ITERATION_2 11 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 10 && BOOST_PP_ITERATION_START_2 >= 10 # define BOOST_PP_ITERATION_2 10 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 9 && BOOST_PP_ITERATION_START_2 >= 9 # define BOOST_PP_ITERATION_2 9 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 8 && BOOST_PP_ITERATION_START_2 >= 8 # define BOOST_PP_ITERATION_2 8 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 7 && BOOST_PP_ITERATION_START_2 >= 7 # define BOOST_PP_ITERATION_2 7 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 6 && BOOST_PP_ITERATION_START_2 >= 6 # define BOOST_PP_ITERATION_2 6 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 5 && BOOST_PP_ITERATION_START_2 >= 5 # define BOOST_PP_ITERATION_2 5 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 4 && BOOST_PP_ITERATION_START_2 >= 4 # define BOOST_PP_ITERATION_2 4 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 3 && BOOST_PP_ITERATION_START_2 >= 3 # define BOOST_PP_ITERATION_2 3 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 2 && BOOST_PP_ITERATION_START_2 >= 2 # define BOOST_PP_ITERATION_2 2 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 1 && BOOST_PP_ITERATION_START_2 >= 1 # define BOOST_PP_ITERATION_2 1 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif # if BOOST_PP_ITERATION_FINISH_2 <= 0 && BOOST_PP_ITERATION_START_2 >= 0 # define BOOST_PP_ITERATION_2 0 # include BOOST_PP_FILENAME_2 # undef BOOST_PP_ITERATION_2 # endif ================================================ FILE: benchmarks/boost/preprocessor/iteration/detail/iter/reverse3.hpp ================================================ # /* ************************************************************************** # * * # * (C) Copyright Paul Mensonides 2002. # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # * * # ************************************************************************** */ # # /* See http://www.boost.org for most recent version. */ # # if BOOST_PP_ITERATION_FINISH_3 <= 256 && BOOST_PP_ITERATION_START_3 >= 256 # define BOOST_PP_ITERATION_3 256 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 255 && BOOST_PP_ITERATION_START_3 >= 255 # define BOOST_PP_ITERATION_3 255 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 254 && BOOST_PP_ITERATION_START_3 >= 254 # define BOOST_PP_ITERATION_3 254 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 253 && BOOST_PP_ITERATION_START_3 >= 253 # define BOOST_PP_ITERATION_3 253 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 252 && BOOST_PP_ITERATION_START_3 >= 252 # define BOOST_PP_ITERATION_3 252 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 251 && BOOST_PP_ITERATION_START_3 >= 251 # define BOOST_PP_ITERATION_3 251 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 250 && BOOST_PP_ITERATION_START_3 >= 250 # define BOOST_PP_ITERATION_3 250 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 249 && BOOST_PP_ITERATION_START_3 >= 249 # define BOOST_PP_ITERATION_3 249 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 248 && BOOST_PP_ITERATION_START_3 >= 248 # define BOOST_PP_ITERATION_3 248 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 247 && BOOST_PP_ITERATION_START_3 >= 247 # define BOOST_PP_ITERATION_3 247 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 246 && BOOST_PP_ITERATION_START_3 >= 246 # define BOOST_PP_ITERATION_3 246 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 245 && BOOST_PP_ITERATION_START_3 >= 245 # define BOOST_PP_ITERATION_3 245 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 244 && BOOST_PP_ITERATION_START_3 >= 244 # define BOOST_PP_ITERATION_3 244 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 243 && BOOST_PP_ITERATION_START_3 >= 243 # define BOOST_PP_ITERATION_3 243 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 242 && BOOST_PP_ITERATION_START_3 >= 242 # define BOOST_PP_ITERATION_3 242 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 241 && BOOST_PP_ITERATION_START_3 >= 241 # define BOOST_PP_ITERATION_3 241 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 240 && BOOST_PP_ITERATION_START_3 >= 240 # define BOOST_PP_ITERATION_3 240 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 239 && BOOST_PP_ITERATION_START_3 >= 239 # define BOOST_PP_ITERATION_3 239 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 238 && BOOST_PP_ITERATION_START_3 >= 238 # define BOOST_PP_ITERATION_3 238 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 237 && BOOST_PP_ITERATION_START_3 >= 237 # define BOOST_PP_ITERATION_3 237 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 236 && BOOST_PP_ITERATION_START_3 >= 236 # define BOOST_PP_ITERATION_3 236 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 235 && BOOST_PP_ITERATION_START_3 >= 235 # define BOOST_PP_ITERATION_3 235 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 234 && BOOST_PP_ITERATION_START_3 >= 234 # define BOOST_PP_ITERATION_3 234 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 233 && BOOST_PP_ITERATION_START_3 >= 233 # define BOOST_PP_ITERATION_3 233 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 232 && BOOST_PP_ITERATION_START_3 >= 232 # define BOOST_PP_ITERATION_3 232 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 231 && BOOST_PP_ITERATION_START_3 >= 231 # define BOOST_PP_ITERATION_3 231 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 230 && BOOST_PP_ITERATION_START_3 >= 230 # define BOOST_PP_ITERATION_3 230 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 229 && BOOST_PP_ITERATION_START_3 >= 229 # define BOOST_PP_ITERATION_3 229 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 228 && BOOST_PP_ITERATION_START_3 >= 228 # define BOOST_PP_ITERATION_3 228 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 227 && BOOST_PP_ITERATION_START_3 >= 227 # define BOOST_PP_ITERATION_3 227 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 226 && BOOST_PP_ITERATION_START_3 >= 226 # define BOOST_PP_ITERATION_3 226 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 225 && BOOST_PP_ITERATION_START_3 >= 225 # define BOOST_PP_ITERATION_3 225 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 224 && BOOST_PP_ITERATION_START_3 >= 224 # define BOOST_PP_ITERATION_3 224 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 223 && BOOST_PP_ITERATION_START_3 >= 223 # define BOOST_PP_ITERATION_3 223 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 222 && BOOST_PP_ITERATION_START_3 >= 222 # define BOOST_PP_ITERATION_3 222 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 221 && BOOST_PP_ITERATION_START_3 >= 221 # define BOOST_PP_ITERATION_3 221 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 220 && BOOST_PP_ITERATION_START_3 >= 220 # define BOOST_PP_ITERATION_3 220 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 219 && BOOST_PP_ITERATION_START_3 >= 219 # define BOOST_PP_ITERATION_3 219 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 218 && BOOST_PP_ITERATION_START_3 >= 218 # define BOOST_PP_ITERATION_3 218 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 217 && BOOST_PP_ITERATION_START_3 >= 217 # define BOOST_PP_ITERATION_3 217 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 216 && BOOST_PP_ITERATION_START_3 >= 216 # define BOOST_PP_ITERATION_3 216 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 215 && BOOST_PP_ITERATION_START_3 >= 215 # define BOOST_PP_ITERATION_3 215 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 214 && BOOST_PP_ITERATION_START_3 >= 214 # define BOOST_PP_ITERATION_3 214 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 213 && BOOST_PP_ITERATION_START_3 >= 213 # define BOOST_PP_ITERATION_3 213 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 212 && BOOST_PP_ITERATION_START_3 >= 212 # define BOOST_PP_ITERATION_3 212 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 211 && BOOST_PP_ITERATION_START_3 >= 211 # define BOOST_PP_ITERATION_3 211 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 210 && BOOST_PP_ITERATION_START_3 >= 210 # define BOOST_PP_ITERATION_3 210 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 209 && BOOST_PP_ITERATION_START_3 >= 209 # define BOOST_PP_ITERATION_3 209 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 208 && BOOST_PP_ITERATION_START_3 >= 208 # define BOOST_PP_ITERATION_3 208 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 207 && BOOST_PP_ITERATION_START_3 >= 207 # define BOOST_PP_ITERATION_3 207 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 206 && BOOST_PP_ITERATION_START_3 >= 206 # define BOOST_PP_ITERATION_3 206 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 205 && BOOST_PP_ITERATION_START_3 >= 205 # define BOOST_PP_ITERATION_3 205 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 204 && BOOST_PP_ITERATION_START_3 >= 204 # define BOOST_PP_ITERATION_3 204 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 203 && BOOST_PP_ITERATION_START_3 >= 203 # define BOOST_PP_ITERATION_3 203 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 202 && BOOST_PP_ITERATION_START_3 >= 202 # define BOOST_PP_ITERATION_3 202 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 201 && BOOST_PP_ITERATION_START_3 >= 201 # define BOOST_PP_ITERATION_3 201 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 200 && BOOST_PP_ITERATION_START_3 >= 200 # define BOOST_PP_ITERATION_3 200 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 199 && BOOST_PP_ITERATION_START_3 >= 199 # define BOOST_PP_ITERATION_3 199 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 198 && BOOST_PP_ITERATION_START_3 >= 198 # define BOOST_PP_ITERATION_3 198 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 197 && BOOST_PP_ITERATION_START_3 >= 197 # define BOOST_PP_ITERATION_3 197 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 196 && BOOST_PP_ITERATION_START_3 >= 196 # define BOOST_PP_ITERATION_3 196 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 195 && BOOST_PP_ITERATION_START_3 >= 195 # define BOOST_PP_ITERATION_3 195 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 194 && BOOST_PP_ITERATION_START_3 >= 194 # define BOOST_PP_ITERATION_3 194 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 193 && BOOST_PP_ITERATION_START_3 >= 193 # define BOOST_PP_ITERATION_3 193 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 192 && BOOST_PP_ITERATION_START_3 >= 192 # define BOOST_PP_ITERATION_3 192 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 191 && BOOST_PP_ITERATION_START_3 >= 191 # define BOOST_PP_ITERATION_3 191 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 190 && BOOST_PP_ITERATION_START_3 >= 190 # define BOOST_PP_ITERATION_3 190 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 189 && BOOST_PP_ITERATION_START_3 >= 189 # define BOOST_PP_ITERATION_3 189 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 188 && BOOST_PP_ITERATION_START_3 >= 188 # define BOOST_PP_ITERATION_3 188 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 187 && BOOST_PP_ITERATION_START_3 >= 187 # define BOOST_PP_ITERATION_3 187 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 186 && BOOST_PP_ITERATION_START_3 >= 186 # define BOOST_PP_ITERATION_3 186 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 185 && BOOST_PP_ITERATION_START_3 >= 185 # define BOOST_PP_ITERATION_3 185 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 184 && BOOST_PP_ITERATION_START_3 >= 184 # define BOOST_PP_ITERATION_3 184 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 183 && BOOST_PP_ITERATION_START_3 >= 183 # define BOOST_PP_ITERATION_3 183 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 182 && BOOST_PP_ITERATION_START_3 >= 182 # define BOOST_PP_ITERATION_3 182 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 181 && BOOST_PP_ITERATION_START_3 >= 181 # define BOOST_PP_ITERATION_3 181 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 180 && BOOST_PP_ITERATION_START_3 >= 180 # define BOOST_PP_ITERATION_3 180 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 179 && BOOST_PP_ITERATION_START_3 >= 179 # define BOOST_PP_ITERATION_3 179 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 178 && BOOST_PP_ITERATION_START_3 >= 178 # define BOOST_PP_ITERATION_3 178 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 177 && BOOST_PP_ITERATION_START_3 >= 177 # define BOOST_PP_ITERATION_3 177 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 176 && BOOST_PP_ITERATION_START_3 >= 176 # define BOOST_PP_ITERATION_3 176 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 175 && BOOST_PP_ITERATION_START_3 >= 175 # define BOOST_PP_ITERATION_3 175 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 174 && BOOST_PP_ITERATION_START_3 >= 174 # define BOOST_PP_ITERATION_3 174 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 173 && BOOST_PP_ITERATION_START_3 >= 173 # define BOOST_PP_ITERATION_3 173 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 172 && BOOST_PP_ITERATION_START_3 >= 172 # define BOOST_PP_ITERATION_3 172 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 171 && BOOST_PP_ITERATION_START_3 >= 171 # define BOOST_PP_ITERATION_3 171 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 170 && BOOST_PP_ITERATION_START_3 >= 170 # define BOOST_PP_ITERATION_3 170 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 169 && BOOST_PP_ITERATION_START_3 >= 169 # define BOOST_PP_ITERATION_3 169 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 168 && BOOST_PP_ITERATION_START_3 >= 168 # define BOOST_PP_ITERATION_3 168 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 167 && BOOST_PP_ITERATION_START_3 >= 167 # define BOOST_PP_ITERATION_3 167 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 166 && BOOST_PP_ITERATION_START_3 >= 166 # define BOOST_PP_ITERATION_3 166 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 165 && BOOST_PP_ITERATION_START_3 >= 165 # define BOOST_PP_ITERATION_3 165 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 164 && BOOST_PP_ITERATION_START_3 >= 164 # define BOOST_PP_ITERATION_3 164 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 163 && BOOST_PP_ITERATION_START_3 >= 163 # define BOOST_PP_ITERATION_3 163 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 162 && BOOST_PP_ITERATION_START_3 >= 162 # define BOOST_PP_ITERATION_3 162 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 161 && BOOST_PP_ITERATION_START_3 >= 161 # define BOOST_PP_ITERATION_3 161 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 160 && BOOST_PP_ITERATION_START_3 >= 160 # define BOOST_PP_ITERATION_3 160 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 159 && BOOST_PP_ITERATION_START_3 >= 159 # define BOOST_PP_ITERATION_3 159 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 158 && BOOST_PP_ITERATION_START_3 >= 158 # define BOOST_PP_ITERATION_3 158 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 157 && BOOST_PP_ITERATION_START_3 >= 157 # define BOOST_PP_ITERATION_3 157 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 156 && BOOST_PP_ITERATION_START_3 >= 156 # define BOOST_PP_ITERATION_3 156 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 155 && BOOST_PP_ITERATION_START_3 >= 155 # define BOOST_PP_ITERATION_3 155 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 154 && BOOST_PP_ITERATION_START_3 >= 154 # define BOOST_PP_ITERATION_3 154 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 153 && BOOST_PP_ITERATION_START_3 >= 153 # define BOOST_PP_ITERATION_3 153 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 152 && BOOST_PP_ITERATION_START_3 >= 152 # define BOOST_PP_ITERATION_3 152 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 151 && BOOST_PP_ITERATION_START_3 >= 151 # define BOOST_PP_ITERATION_3 151 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 150 && BOOST_PP_ITERATION_START_3 >= 150 # define BOOST_PP_ITERATION_3 150 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 149 && BOOST_PP_ITERATION_START_3 >= 149 # define BOOST_PP_ITERATION_3 149 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 148 && BOOST_PP_ITERATION_START_3 >= 148 # define BOOST_PP_ITERATION_3 148 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 147 && BOOST_PP_ITERATION_START_3 >= 147 # define BOOST_PP_ITERATION_3 147 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 146 && BOOST_PP_ITERATION_START_3 >= 146 # define BOOST_PP_ITERATION_3 146 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 145 && BOOST_PP_ITERATION_START_3 >= 145 # define BOOST_PP_ITERATION_3 145 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 144 && BOOST_PP_ITERATION_START_3 >= 144 # define BOOST_PP_ITERATION_3 144 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 143 && BOOST_PP_ITERATION_START_3 >= 143 # define BOOST_PP_ITERATION_3 143 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 142 && BOOST_PP_ITERATION_START_3 >= 142 # define BOOST_PP_ITERATION_3 142 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 141 && BOOST_PP_ITERATION_START_3 >= 141 # define BOOST_PP_ITERATION_3 141 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 140 && BOOST_PP_ITERATION_START_3 >= 140 # define BOOST_PP_ITERATION_3 140 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 139 && BOOST_PP_ITERATION_START_3 >= 139 # define BOOST_PP_ITERATION_3 139 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 138 && BOOST_PP_ITERATION_START_3 >= 138 # define BOOST_PP_ITERATION_3 138 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 137 && BOOST_PP_ITERATION_START_3 >= 137 # define BOOST_PP_ITERATION_3 137 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 136 && BOOST_PP_ITERATION_START_3 >= 136 # define BOOST_PP_ITERATION_3 136 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 135 && BOOST_PP_ITERATION_START_3 >= 135 # define BOOST_PP_ITERATION_3 135 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 134 && BOOST_PP_ITERATION_START_3 >= 134 # define BOOST_PP_ITERATION_3 134 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 133 && BOOST_PP_ITERATION_START_3 >= 133 # define BOOST_PP_ITERATION_3 133 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 132 && BOOST_PP_ITERATION_START_3 >= 132 # define BOOST_PP_ITERATION_3 132 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 131 && BOOST_PP_ITERATION_START_3 >= 131 # define BOOST_PP_ITERATION_3 131 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 130 && BOOST_PP_ITERATION_START_3 >= 130 # define BOOST_PP_ITERATION_3 130 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 129 && BOOST_PP_ITERATION_START_3 >= 129 # define BOOST_PP_ITERATION_3 129 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 128 && BOOST_PP_ITERATION_START_3 >= 128 # define BOOST_PP_ITERATION_3 128 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 127 && BOOST_PP_ITERATION_START_3 >= 127 # define BOOST_PP_ITERATION_3 127 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 126 && BOOST_PP_ITERATION_START_3 >= 126 # define BOOST_PP_ITERATION_3 126 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 125 && BOOST_PP_ITERATION_START_3 >= 125 # define BOOST_PP_ITERATION_3 125 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 124 && BOOST_PP_ITERATION_START_3 >= 124 # define BOOST_PP_ITERATION_3 124 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 123 && BOOST_PP_ITERATION_START_3 >= 123 # define BOOST_PP_ITERATION_3 123 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 122 && BOOST_PP_ITERATION_START_3 >= 122 # define BOOST_PP_ITERATION_3 122 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 121 && BOOST_PP_ITERATION_START_3 >= 121 # define BOOST_PP_ITERATION_3 121 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 120 && BOOST_PP_ITERATION_START_3 >= 120 # define BOOST_PP_ITERATION_3 120 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 119 && BOOST_PP_ITERATION_START_3 >= 119 # define BOOST_PP_ITERATION_3 119 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 118 && BOOST_PP_ITERATION_START_3 >= 118 # define BOOST_PP_ITERATION_3 118 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 117 && BOOST_PP_ITERATION_START_3 >= 117 # define BOOST_PP_ITERATION_3 117 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 116 && BOOST_PP_ITERATION_START_3 >= 116 # define BOOST_PP_ITERATION_3 116 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 115 && BOOST_PP_ITERATION_START_3 >= 115 # define BOOST_PP_ITERATION_3 115 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 114 && BOOST_PP_ITERATION_START_3 >= 114 # define BOOST_PP_ITERATION_3 114 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 113 && BOOST_PP_ITERATION_START_3 >= 113 # define BOOST_PP_ITERATION_3 113 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 112 && BOOST_PP_ITERATION_START_3 >= 112 # define BOOST_PP_ITERATION_3 112 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 111 && BOOST_PP_ITERATION_START_3 >= 111 # define BOOST_PP_ITERATION_3 111 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 110 && BOOST_PP_ITERATION_START_3 >= 110 # define BOOST_PP_ITERATION_3 110 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 109 && BOOST_PP_ITERATION_START_3 >= 109 # define BOOST_PP_ITERATION_3 109 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 108 && BOOST_PP_ITERATION_START_3 >= 108 # define BOOST_PP_ITERATION_3 108 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 107 && BOOST_PP_ITERATION_START_3 >= 107 # define BOOST_PP_ITERATION_3 107 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 106 && BOOST_PP_ITERATION_START_3 >= 106 # define BOOST_PP_ITERATION_3 106 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 105 && BOOST_PP_ITERATION_START_3 >= 105 # define BOOST_PP_ITERATION_3 105 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 104 && BOOST_PP_ITERATION_START_3 >= 104 # define BOOST_PP_ITERATION_3 104 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 103 && BOOST_PP_ITERATION_START_3 >= 103 # define BOOST_PP_ITERATION_3 103 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 102 && BOOST_PP_ITERATION_START_3 >= 102 # define BOOST_PP_ITERATION_3 102 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 101 && BOOST_PP_ITERATION_START_3 >= 101 # define BOOST_PP_ITERATION_3 101 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 100 && BOOST_PP_ITERATION_START_3 >= 100 # define BOOST_PP_ITERATION_3 100 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 99 && BOOST_PP_ITERATION_START_3 >= 99 # define BOOST_PP_ITERATION_3 99 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 98 && BOOST_PP_ITERATION_START_3 >= 98 # define BOOST_PP_ITERATION_3 98 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 97 && BOOST_PP_ITERATION_START_3 >= 97 # define BOOST_PP_ITERATION_3 97 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 96 && BOOST_PP_ITERATION_START_3 >= 96 # define BOOST_PP_ITERATION_3 96 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 95 && BOOST_PP_ITERATION_START_3 >= 95 # define BOOST_PP_ITERATION_3 95 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 94 && BOOST_PP_ITERATION_START_3 >= 94 # define BOOST_PP_ITERATION_3 94 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 93 && BOOST_PP_ITERATION_START_3 >= 93 # define BOOST_PP_ITERATION_3 93 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 92 && BOOST_PP_ITERATION_START_3 >= 92 # define BOOST_PP_ITERATION_3 92 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 91 && BOOST_PP_ITERATION_START_3 >= 91 # define BOOST_PP_ITERATION_3 91 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 90 && BOOST_PP_ITERATION_START_3 >= 90 # define BOOST_PP_ITERATION_3 90 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 89 && BOOST_PP_ITERATION_START_3 >= 89 # define BOOST_PP_ITERATION_3 89 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 88 && BOOST_PP_ITERATION_START_3 >= 88 # define BOOST_PP_ITERATION_3 88 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 87 && BOOST_PP_ITERATION_START_3 >= 87 # define BOOST_PP_ITERATION_3 87 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 86 && BOOST_PP_ITERATION_START_3 >= 86 # define BOOST_PP_ITERATION_3 86 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 85 && BOOST_PP_ITERATION_START_3 >= 85 # define BOOST_PP_ITERATION_3 85 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 84 && BOOST_PP_ITERATION_START_3 >= 84 # define BOOST_PP_ITERATION_3 84 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 83 && BOOST_PP_ITERATION_START_3 >= 83 # define BOOST_PP_ITERATION_3 83 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 82 && BOOST_PP_ITERATION_START_3 >= 82 # define BOOST_PP_ITERATION_3 82 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 81 && BOOST_PP_ITERATION_START_3 >= 81 # define BOOST_PP_ITERATION_3 81 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 80 && BOOST_PP_ITERATION_START_3 >= 80 # define BOOST_PP_ITERATION_3 80 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 79 && BOOST_PP_ITERATION_START_3 >= 79 # define BOOST_PP_ITERATION_3 79 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 78 && BOOST_PP_ITERATION_START_3 >= 78 # define BOOST_PP_ITERATION_3 78 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 77 && BOOST_PP_ITERATION_START_3 >= 77 # define BOOST_PP_ITERATION_3 77 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 76 && BOOST_PP_ITERATION_START_3 >= 76 # define BOOST_PP_ITERATION_3 76 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 75 && BOOST_PP_ITERATION_START_3 >= 75 # define BOOST_PP_ITERATION_3 75 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 74 && BOOST_PP_ITERATION_START_3 >= 74 # define BOOST_PP_ITERATION_3 74 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 73 && BOOST_PP_ITERATION_START_3 >= 73 # define BOOST_PP_ITERATION_3 73 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 72 && BOOST_PP_ITERATION_START_3 >= 72 # define BOOST_PP_ITERATION_3 72 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 71 && BOOST_PP_ITERATION_START_3 >= 71 # define BOOST_PP_ITERATION_3 71 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 70 && BOOST_PP_ITERATION_START_3 >= 70 # define BOOST_PP_ITERATION_3 70 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 69 && BOOST_PP_ITERATION_START_3 >= 69 # define BOOST_PP_ITERATION_3 69 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 68 && BOOST_PP_ITERATION_START_3 >= 68 # define BOOST_PP_ITERATION_3 68 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 67 && BOOST_PP_ITERATION_START_3 >= 67 # define BOOST_PP_ITERATION_3 67 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 66 && BOOST_PP_ITERATION_START_3 >= 66 # define BOOST_PP_ITERATION_3 66 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 65 && BOOST_PP_ITERATION_START_3 >= 65 # define BOOST_PP_ITERATION_3 65 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 64 && BOOST_PP_ITERATION_START_3 >= 64 # define BOOST_PP_ITERATION_3 64 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 63 && BOOST_PP_ITERATION_START_3 >= 63 # define BOOST_PP_ITERATION_3 63 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 62 && BOOST_PP_ITERATION_START_3 >= 62 # define BOOST_PP_ITERATION_3 62 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 61 && BOOST_PP_ITERATION_START_3 >= 61 # define BOOST_PP_ITERATION_3 61 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 60 && BOOST_PP_ITERATION_START_3 >= 60 # define BOOST_PP_ITERATION_3 60 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 59 && BOOST_PP_ITERATION_START_3 >= 59 # define BOOST_PP_ITERATION_3 59 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 58 && BOOST_PP_ITERATION_START_3 >= 58 # define BOOST_PP_ITERATION_3 58 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 57 && BOOST_PP_ITERATION_START_3 >= 57 # define BOOST_PP_ITERATION_3 57 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 56 && BOOST_PP_ITERATION_START_3 >= 56 # define BOOST_PP_ITERATION_3 56 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 55 && BOOST_PP_ITERATION_START_3 >= 55 # define BOOST_PP_ITERATION_3 55 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 54 && BOOST_PP_ITERATION_START_3 >= 54 # define BOOST_PP_ITERATION_3 54 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 53 && BOOST_PP_ITERATION_START_3 >= 53 # define BOOST_PP_ITERATION_3 53 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 52 && BOOST_PP_ITERATION_START_3 >= 52 # define BOOST_PP_ITERATION_3 52 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 51 && BOOST_PP_ITERATION_START_3 >= 51 # define BOOST_PP_ITERATION_3 51 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 50 && BOOST_PP_ITERATION_START_3 >= 50 # define BOOST_PP_ITERATION_3 50 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 49 && BOOST_PP_ITERATION_START_3 >= 49 # define BOOST_PP_ITERATION_3 49 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 48 && BOOST_PP_ITERATION_START_3 >= 48 # define BOOST_PP_ITERATION_3 48 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 47 && BOOST_PP_ITERATION_START_3 >= 47 # define BOOST_PP_ITERATION_3 47 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 46 && BOOST_PP_ITERATION_START_3 >= 46 # define BOOST_PP_ITERATION_3 46 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 45 && BOOST_PP_ITERATION_START_3 >= 45 # define BOOST_PP_ITERATION_3 45 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 44 && BOOST_PP_ITERATION_START_3 >= 44 # define BOOST_PP_ITERATION_3 44 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 43 && BOOST_PP_ITERATION_START_3 >= 43 # define BOOST_PP_ITERATION_3 43 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 42 && BOOST_PP_ITERATION_START_3 >= 42 # define BOOST_PP_ITERATION_3 42 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 41 && BOOST_PP_ITERATION_START_3 >= 41 # define BOOST_PP_ITERATION_3 41 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 40 && BOOST_PP_ITERATION_START_3 >= 40 # define BOOST_PP_ITERATION_3 40 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 39 && BOOST_PP_ITERATION_START_3 >= 39 # define BOOST_PP_ITERATION_3 39 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 38 && BOOST_PP_ITERATION_START_3 >= 38 # define BOOST_PP_ITERATION_3 38 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 37 && BOOST_PP_ITERATION_START_3 >= 37 # define BOOST_PP_ITERATION_3 37 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 36 && BOOST_PP_ITERATION_START_3 >= 36 # define BOOST_PP_ITERATION_3 36 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 35 && BOOST_PP_ITERATION_START_3 >= 35 # define BOOST_PP_ITERATION_3 35 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 34 && BOOST_PP_ITERATION_START_3 >= 34 # define BOOST_PP_ITERATION_3 34 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 33 && BOOST_PP_ITERATION_START_3 >= 33 # define BOOST_PP_ITERATION_3 33 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 32 && BOOST_PP_ITERATION_START_3 >= 32 # define BOOST_PP_ITERATION_3 32 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 31 && BOOST_PP_ITERATION_START_3 >= 31 # define BOOST_PP_ITERATION_3 31 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 30 && BOOST_PP_ITERATION_START_3 >= 30 # define BOOST_PP_ITERATION_3 30 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 29 && BOOST_PP_ITERATION_START_3 >= 29 # define BOOST_PP_ITERATION_3 29 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 28 && BOOST_PP_ITERATION_START_3 >= 28 # define BOOST_PP_ITERATION_3 28 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 27 && BOOST_PP_ITERATION_START_3 >= 27 # define BOOST_PP_ITERATION_3 27 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 26 && BOOST_PP_ITERATION_START_3 >= 26 # define BOOST_PP_ITERATION_3 26 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 25 && BOOST_PP_ITERATION_START_3 >= 25 # define BOOST_PP_ITERATION_3 25 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 24 && BOOST_PP_ITERATION_START_3 >= 24 # define BOOST_PP_ITERATION_3 24 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 23 && BOOST_PP_ITERATION_START_3 >= 23 # define BOOST_PP_ITERATION_3 23 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 22 && BOOST_PP_ITERATION_START_3 >= 22 # define BOOST_PP_ITERATION_3 22 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 21 && BOOST_PP_ITERATION_START_3 >= 21 # define BOOST_PP_ITERATION_3 21 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 20 && BOOST_PP_ITERATION_START_3 >= 20 # define BOOST_PP_ITERATION_3 20 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 19 && BOOST_PP_ITERATION_START_3 >= 19 # define BOOST_PP_ITERATION_3 19 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 18 && BOOST_PP_ITERATION_START_3 >= 18 # define BOOST_PP_ITERATION_3 18 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 17 && BOOST_PP_ITERATION_START_3 >= 17 # define BOOST_PP_ITERATION_3 17 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 16 && BOOST_PP_ITERATION_START_3 >= 16 # define BOOST_PP_ITERATION_3 16 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 15 && BOOST_PP_ITERATION_START_3 >= 15 # define BOOST_PP_ITERATION_3 15 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 14 && BOOST_PP_ITERATION_START_3 >= 14 # define BOOST_PP_ITERATION_3 14 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 13 && BOOST_PP_ITERATION_START_3 >= 13 # define BOOST_PP_ITERATION_3 13 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 12 && BOOST_PP_ITERATION_START_3 >= 12 # define BOOST_PP_ITERATION_3 12 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 11 && BOOST_PP_ITERATION_START_3 >= 11 # define BOOST_PP_ITERATION_3 11 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 10 && BOOST_PP_ITERATION_START_3 >= 10 # define BOOST_PP_ITERATION_3 10 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 9 && BOOST_PP_ITERATION_START_3 >= 9 # define BOOST_PP_ITERATION_3 9 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 8 && BOOST_PP_ITERATION_START_3 >= 8 # define BOOST_PP_ITERATION_3 8 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 7 && BOOST_PP_ITERATION_START_3 >= 7 # define BOOST_PP_ITERATION_3 7 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 6 && BOOST_PP_ITERATION_START_3 >= 6 # define BOOST_PP_ITERATION_3 6 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 5 && BOOST_PP_ITERATION_START_3 >= 5 # define BOOST_PP_ITERATION_3 5 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 4 && BOOST_PP_ITERATION_START_3 >= 4 # define BOOST_PP_ITERATION_3 4 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 3 && BOOST_PP_ITERATION_START_3 >= 3 # define BOOST_PP_ITERATION_3 3 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 2 && BOOST_PP_ITERATION_START_3 >= 2 # define BOOST_PP_ITERATION_3 2 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 1 && BOOST_PP_ITERATION_START_3 >= 1 # define BOOST_PP_ITERATION_3 1 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif # if BOOST_PP_ITERATION_FINISH_3 <= 0 && BOOST_PP_ITERATION_START_3 >= 0 # define BOOST_PP_ITERATION_3 0 # include BOOST_PP_FILENAME_3 # undef BOOST_PP_ITERATION_3 # endif ================================================ FILE: benchmarks/boost/preprocessor/iteration/detail/iter/reverse4.hpp ================================================ # /* ************************************************************************** # * * # * (C) Copyright Paul Mensonides 2002. # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # * * # ************************************************************************** */ # # /* See http://www.boost.org for most recent version. */ # # if BOOST_PP_ITERATION_FINISH_4 <= 256 && BOOST_PP_ITERATION_START_4 >= 256 # define BOOST_PP_ITERATION_4 256 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 255 && BOOST_PP_ITERATION_START_4 >= 255 # define BOOST_PP_ITERATION_4 255 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 254 && BOOST_PP_ITERATION_START_4 >= 254 # define BOOST_PP_ITERATION_4 254 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 253 && BOOST_PP_ITERATION_START_4 >= 253 # define BOOST_PP_ITERATION_4 253 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 252 && BOOST_PP_ITERATION_START_4 >= 252 # define BOOST_PP_ITERATION_4 252 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 251 && BOOST_PP_ITERATION_START_4 >= 251 # define BOOST_PP_ITERATION_4 251 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 250 && BOOST_PP_ITERATION_START_4 >= 250 # define BOOST_PP_ITERATION_4 250 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 249 && BOOST_PP_ITERATION_START_4 >= 249 # define BOOST_PP_ITERATION_4 249 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 248 && BOOST_PP_ITERATION_START_4 >= 248 # define BOOST_PP_ITERATION_4 248 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 247 && BOOST_PP_ITERATION_START_4 >= 247 # define BOOST_PP_ITERATION_4 247 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 246 && BOOST_PP_ITERATION_START_4 >= 246 # define BOOST_PP_ITERATION_4 246 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 245 && BOOST_PP_ITERATION_START_4 >= 245 # define BOOST_PP_ITERATION_4 245 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 244 && BOOST_PP_ITERATION_START_4 >= 244 # define BOOST_PP_ITERATION_4 244 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 243 && BOOST_PP_ITERATION_START_4 >= 243 # define BOOST_PP_ITERATION_4 243 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 242 && BOOST_PP_ITERATION_START_4 >= 242 # define BOOST_PP_ITERATION_4 242 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 241 && BOOST_PP_ITERATION_START_4 >= 241 # define BOOST_PP_ITERATION_4 241 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 240 && BOOST_PP_ITERATION_START_4 >= 240 # define BOOST_PP_ITERATION_4 240 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 239 && BOOST_PP_ITERATION_START_4 >= 239 # define BOOST_PP_ITERATION_4 239 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 238 && BOOST_PP_ITERATION_START_4 >= 238 # define BOOST_PP_ITERATION_4 238 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 237 && BOOST_PP_ITERATION_START_4 >= 237 # define BOOST_PP_ITERATION_4 237 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 236 && BOOST_PP_ITERATION_START_4 >= 236 # define BOOST_PP_ITERATION_4 236 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 235 && BOOST_PP_ITERATION_START_4 >= 235 # define BOOST_PP_ITERATION_4 235 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 234 && BOOST_PP_ITERATION_START_4 >= 234 # define BOOST_PP_ITERATION_4 234 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 233 && BOOST_PP_ITERATION_START_4 >= 233 # define BOOST_PP_ITERATION_4 233 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 232 && BOOST_PP_ITERATION_START_4 >= 232 # define BOOST_PP_ITERATION_4 232 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 231 && BOOST_PP_ITERATION_START_4 >= 231 # define BOOST_PP_ITERATION_4 231 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 230 && BOOST_PP_ITERATION_START_4 >= 230 # define BOOST_PP_ITERATION_4 230 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 229 && BOOST_PP_ITERATION_START_4 >= 229 # define BOOST_PP_ITERATION_4 229 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 228 && BOOST_PP_ITERATION_START_4 >= 228 # define BOOST_PP_ITERATION_4 228 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 227 && BOOST_PP_ITERATION_START_4 >= 227 # define BOOST_PP_ITERATION_4 227 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 226 && BOOST_PP_ITERATION_START_4 >= 226 # define BOOST_PP_ITERATION_4 226 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 225 && BOOST_PP_ITERATION_START_4 >= 225 # define BOOST_PP_ITERATION_4 225 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 224 && BOOST_PP_ITERATION_START_4 >= 224 # define BOOST_PP_ITERATION_4 224 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 223 && BOOST_PP_ITERATION_START_4 >= 223 # define BOOST_PP_ITERATION_4 223 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 222 && BOOST_PP_ITERATION_START_4 >= 222 # define BOOST_PP_ITERATION_4 222 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 221 && BOOST_PP_ITERATION_START_4 >= 221 # define BOOST_PP_ITERATION_4 221 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 220 && BOOST_PP_ITERATION_START_4 >= 220 # define BOOST_PP_ITERATION_4 220 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 219 && BOOST_PP_ITERATION_START_4 >= 219 # define BOOST_PP_ITERATION_4 219 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 218 && BOOST_PP_ITERATION_START_4 >= 218 # define BOOST_PP_ITERATION_4 218 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 217 && BOOST_PP_ITERATION_START_4 >= 217 # define BOOST_PP_ITERATION_4 217 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 216 && BOOST_PP_ITERATION_START_4 >= 216 # define BOOST_PP_ITERATION_4 216 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 215 && BOOST_PP_ITERATION_START_4 >= 215 # define BOOST_PP_ITERATION_4 215 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 214 && BOOST_PP_ITERATION_START_4 >= 214 # define BOOST_PP_ITERATION_4 214 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 213 && BOOST_PP_ITERATION_START_4 >= 213 # define BOOST_PP_ITERATION_4 213 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 212 && BOOST_PP_ITERATION_START_4 >= 212 # define BOOST_PP_ITERATION_4 212 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 211 && BOOST_PP_ITERATION_START_4 >= 211 # define BOOST_PP_ITERATION_4 211 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 210 && BOOST_PP_ITERATION_START_4 >= 210 # define BOOST_PP_ITERATION_4 210 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 209 && BOOST_PP_ITERATION_START_4 >= 209 # define BOOST_PP_ITERATION_4 209 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 208 && BOOST_PP_ITERATION_START_4 >= 208 # define BOOST_PP_ITERATION_4 208 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 207 && BOOST_PP_ITERATION_START_4 >= 207 # define BOOST_PP_ITERATION_4 207 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 206 && BOOST_PP_ITERATION_START_4 >= 206 # define BOOST_PP_ITERATION_4 206 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 205 && BOOST_PP_ITERATION_START_4 >= 205 # define BOOST_PP_ITERATION_4 205 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 204 && BOOST_PP_ITERATION_START_4 >= 204 # define BOOST_PP_ITERATION_4 204 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 203 && BOOST_PP_ITERATION_START_4 >= 203 # define BOOST_PP_ITERATION_4 203 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 202 && BOOST_PP_ITERATION_START_4 >= 202 # define BOOST_PP_ITERATION_4 202 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 201 && BOOST_PP_ITERATION_START_4 >= 201 # define BOOST_PP_ITERATION_4 201 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 200 && BOOST_PP_ITERATION_START_4 >= 200 # define BOOST_PP_ITERATION_4 200 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 199 && BOOST_PP_ITERATION_START_4 >= 199 # define BOOST_PP_ITERATION_4 199 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 198 && BOOST_PP_ITERATION_START_4 >= 198 # define BOOST_PP_ITERATION_4 198 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 197 && BOOST_PP_ITERATION_START_4 >= 197 # define BOOST_PP_ITERATION_4 197 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 196 && BOOST_PP_ITERATION_START_4 >= 196 # define BOOST_PP_ITERATION_4 196 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 195 && BOOST_PP_ITERATION_START_4 >= 195 # define BOOST_PP_ITERATION_4 195 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 194 && BOOST_PP_ITERATION_START_4 >= 194 # define BOOST_PP_ITERATION_4 194 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 193 && BOOST_PP_ITERATION_START_4 >= 193 # define BOOST_PP_ITERATION_4 193 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 192 && BOOST_PP_ITERATION_START_4 >= 192 # define BOOST_PP_ITERATION_4 192 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 191 && BOOST_PP_ITERATION_START_4 >= 191 # define BOOST_PP_ITERATION_4 191 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 190 && BOOST_PP_ITERATION_START_4 >= 190 # define BOOST_PP_ITERATION_4 190 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 189 && BOOST_PP_ITERATION_START_4 >= 189 # define BOOST_PP_ITERATION_4 189 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 188 && BOOST_PP_ITERATION_START_4 >= 188 # define BOOST_PP_ITERATION_4 188 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 187 && BOOST_PP_ITERATION_START_4 >= 187 # define BOOST_PP_ITERATION_4 187 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 186 && BOOST_PP_ITERATION_START_4 >= 186 # define BOOST_PP_ITERATION_4 186 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 185 && BOOST_PP_ITERATION_START_4 >= 185 # define BOOST_PP_ITERATION_4 185 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 184 && BOOST_PP_ITERATION_START_4 >= 184 # define BOOST_PP_ITERATION_4 184 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 183 && BOOST_PP_ITERATION_START_4 >= 183 # define BOOST_PP_ITERATION_4 183 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 182 && BOOST_PP_ITERATION_START_4 >= 182 # define BOOST_PP_ITERATION_4 182 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 181 && BOOST_PP_ITERATION_START_4 >= 181 # define BOOST_PP_ITERATION_4 181 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 180 && BOOST_PP_ITERATION_START_4 >= 180 # define BOOST_PP_ITERATION_4 180 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 179 && BOOST_PP_ITERATION_START_4 >= 179 # define BOOST_PP_ITERATION_4 179 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 178 && BOOST_PP_ITERATION_START_4 >= 178 # define BOOST_PP_ITERATION_4 178 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 177 && BOOST_PP_ITERATION_START_4 >= 177 # define BOOST_PP_ITERATION_4 177 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 176 && BOOST_PP_ITERATION_START_4 >= 176 # define BOOST_PP_ITERATION_4 176 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 175 && BOOST_PP_ITERATION_START_4 >= 175 # define BOOST_PP_ITERATION_4 175 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 174 && BOOST_PP_ITERATION_START_4 >= 174 # define BOOST_PP_ITERATION_4 174 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 173 && BOOST_PP_ITERATION_START_4 >= 173 # define BOOST_PP_ITERATION_4 173 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 172 && BOOST_PP_ITERATION_START_4 >= 172 # define BOOST_PP_ITERATION_4 172 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 171 && BOOST_PP_ITERATION_START_4 >= 171 # define BOOST_PP_ITERATION_4 171 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 170 && BOOST_PP_ITERATION_START_4 >= 170 # define BOOST_PP_ITERATION_4 170 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 169 && BOOST_PP_ITERATION_START_4 >= 169 # define BOOST_PP_ITERATION_4 169 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 168 && BOOST_PP_ITERATION_START_4 >= 168 # define BOOST_PP_ITERATION_4 168 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 167 && BOOST_PP_ITERATION_START_4 >= 167 # define BOOST_PP_ITERATION_4 167 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 166 && BOOST_PP_ITERATION_START_4 >= 166 # define BOOST_PP_ITERATION_4 166 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 165 && BOOST_PP_ITERATION_START_4 >= 165 # define BOOST_PP_ITERATION_4 165 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 164 && BOOST_PP_ITERATION_START_4 >= 164 # define BOOST_PP_ITERATION_4 164 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 163 && BOOST_PP_ITERATION_START_4 >= 163 # define BOOST_PP_ITERATION_4 163 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 162 && BOOST_PP_ITERATION_START_4 >= 162 # define BOOST_PP_ITERATION_4 162 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 161 && BOOST_PP_ITERATION_START_4 >= 161 # define BOOST_PP_ITERATION_4 161 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 160 && BOOST_PP_ITERATION_START_4 >= 160 # define BOOST_PP_ITERATION_4 160 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 159 && BOOST_PP_ITERATION_START_4 >= 159 # define BOOST_PP_ITERATION_4 159 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 158 && BOOST_PP_ITERATION_START_4 >= 158 # define BOOST_PP_ITERATION_4 158 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 157 && BOOST_PP_ITERATION_START_4 >= 157 # define BOOST_PP_ITERATION_4 157 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 156 && BOOST_PP_ITERATION_START_4 >= 156 # define BOOST_PP_ITERATION_4 156 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 155 && BOOST_PP_ITERATION_START_4 >= 155 # define BOOST_PP_ITERATION_4 155 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 154 && BOOST_PP_ITERATION_START_4 >= 154 # define BOOST_PP_ITERATION_4 154 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 153 && BOOST_PP_ITERATION_START_4 >= 153 # define BOOST_PP_ITERATION_4 153 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 152 && BOOST_PP_ITERATION_START_4 >= 152 # define BOOST_PP_ITERATION_4 152 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 151 && BOOST_PP_ITERATION_START_4 >= 151 # define BOOST_PP_ITERATION_4 151 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 150 && BOOST_PP_ITERATION_START_4 >= 150 # define BOOST_PP_ITERATION_4 150 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 149 && BOOST_PP_ITERATION_START_4 >= 149 # define BOOST_PP_ITERATION_4 149 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 148 && BOOST_PP_ITERATION_START_4 >= 148 # define BOOST_PP_ITERATION_4 148 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 147 && BOOST_PP_ITERATION_START_4 >= 147 # define BOOST_PP_ITERATION_4 147 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 146 && BOOST_PP_ITERATION_START_4 >= 146 # define BOOST_PP_ITERATION_4 146 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 145 && BOOST_PP_ITERATION_START_4 >= 145 # define BOOST_PP_ITERATION_4 145 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 144 && BOOST_PP_ITERATION_START_4 >= 144 # define BOOST_PP_ITERATION_4 144 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 143 && BOOST_PP_ITERATION_START_4 >= 143 # define BOOST_PP_ITERATION_4 143 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 142 && BOOST_PP_ITERATION_START_4 >= 142 # define BOOST_PP_ITERATION_4 142 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 141 && BOOST_PP_ITERATION_START_4 >= 141 # define BOOST_PP_ITERATION_4 141 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 140 && BOOST_PP_ITERATION_START_4 >= 140 # define BOOST_PP_ITERATION_4 140 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 139 && BOOST_PP_ITERATION_START_4 >= 139 # define BOOST_PP_ITERATION_4 139 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 138 && BOOST_PP_ITERATION_START_4 >= 138 # define BOOST_PP_ITERATION_4 138 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 137 && BOOST_PP_ITERATION_START_4 >= 137 # define BOOST_PP_ITERATION_4 137 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 136 && BOOST_PP_ITERATION_START_4 >= 136 # define BOOST_PP_ITERATION_4 136 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 135 && BOOST_PP_ITERATION_START_4 >= 135 # define BOOST_PP_ITERATION_4 135 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 134 && BOOST_PP_ITERATION_START_4 >= 134 # define BOOST_PP_ITERATION_4 134 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 133 && BOOST_PP_ITERATION_START_4 >= 133 # define BOOST_PP_ITERATION_4 133 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 132 && BOOST_PP_ITERATION_START_4 >= 132 # define BOOST_PP_ITERATION_4 132 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 131 && BOOST_PP_ITERATION_START_4 >= 131 # define BOOST_PP_ITERATION_4 131 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 130 && BOOST_PP_ITERATION_START_4 >= 130 # define BOOST_PP_ITERATION_4 130 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 129 && BOOST_PP_ITERATION_START_4 >= 129 # define BOOST_PP_ITERATION_4 129 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 128 && BOOST_PP_ITERATION_START_4 >= 128 # define BOOST_PP_ITERATION_4 128 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 127 && BOOST_PP_ITERATION_START_4 >= 127 # define BOOST_PP_ITERATION_4 127 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 126 && BOOST_PP_ITERATION_START_4 >= 126 # define BOOST_PP_ITERATION_4 126 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 125 && BOOST_PP_ITERATION_START_4 >= 125 # define BOOST_PP_ITERATION_4 125 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 124 && BOOST_PP_ITERATION_START_4 >= 124 # define BOOST_PP_ITERATION_4 124 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 123 && BOOST_PP_ITERATION_START_4 >= 123 # define BOOST_PP_ITERATION_4 123 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 122 && BOOST_PP_ITERATION_START_4 >= 122 # define BOOST_PP_ITERATION_4 122 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 121 && BOOST_PP_ITERATION_START_4 >= 121 # define BOOST_PP_ITERATION_4 121 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 120 && BOOST_PP_ITERATION_START_4 >= 120 # define BOOST_PP_ITERATION_4 120 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 119 && BOOST_PP_ITERATION_START_4 >= 119 # define BOOST_PP_ITERATION_4 119 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 118 && BOOST_PP_ITERATION_START_4 >= 118 # define BOOST_PP_ITERATION_4 118 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 117 && BOOST_PP_ITERATION_START_4 >= 117 # define BOOST_PP_ITERATION_4 117 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 116 && BOOST_PP_ITERATION_START_4 >= 116 # define BOOST_PP_ITERATION_4 116 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 115 && BOOST_PP_ITERATION_START_4 >= 115 # define BOOST_PP_ITERATION_4 115 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 114 && BOOST_PP_ITERATION_START_4 >= 114 # define BOOST_PP_ITERATION_4 114 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 113 && BOOST_PP_ITERATION_START_4 >= 113 # define BOOST_PP_ITERATION_4 113 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 112 && BOOST_PP_ITERATION_START_4 >= 112 # define BOOST_PP_ITERATION_4 112 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 111 && BOOST_PP_ITERATION_START_4 >= 111 # define BOOST_PP_ITERATION_4 111 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 110 && BOOST_PP_ITERATION_START_4 >= 110 # define BOOST_PP_ITERATION_4 110 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 109 && BOOST_PP_ITERATION_START_4 >= 109 # define BOOST_PP_ITERATION_4 109 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 108 && BOOST_PP_ITERATION_START_4 >= 108 # define BOOST_PP_ITERATION_4 108 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 107 && BOOST_PP_ITERATION_START_4 >= 107 # define BOOST_PP_ITERATION_4 107 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 106 && BOOST_PP_ITERATION_START_4 >= 106 # define BOOST_PP_ITERATION_4 106 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 105 && BOOST_PP_ITERATION_START_4 >= 105 # define BOOST_PP_ITERATION_4 105 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 104 && BOOST_PP_ITERATION_START_4 >= 104 # define BOOST_PP_ITERATION_4 104 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 103 && BOOST_PP_ITERATION_START_4 >= 103 # define BOOST_PP_ITERATION_4 103 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 102 && BOOST_PP_ITERATION_START_4 >= 102 # define BOOST_PP_ITERATION_4 102 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 101 && BOOST_PP_ITERATION_START_4 >= 101 # define BOOST_PP_ITERATION_4 101 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 100 && BOOST_PP_ITERATION_START_4 >= 100 # define BOOST_PP_ITERATION_4 100 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 99 && BOOST_PP_ITERATION_START_4 >= 99 # define BOOST_PP_ITERATION_4 99 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 98 && BOOST_PP_ITERATION_START_4 >= 98 # define BOOST_PP_ITERATION_4 98 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 97 && BOOST_PP_ITERATION_START_4 >= 97 # define BOOST_PP_ITERATION_4 97 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 96 && BOOST_PP_ITERATION_START_4 >= 96 # define BOOST_PP_ITERATION_4 96 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 95 && BOOST_PP_ITERATION_START_4 >= 95 # define BOOST_PP_ITERATION_4 95 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 94 && BOOST_PP_ITERATION_START_4 >= 94 # define BOOST_PP_ITERATION_4 94 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 93 && BOOST_PP_ITERATION_START_4 >= 93 # define BOOST_PP_ITERATION_4 93 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 92 && BOOST_PP_ITERATION_START_4 >= 92 # define BOOST_PP_ITERATION_4 92 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 91 && BOOST_PP_ITERATION_START_4 >= 91 # define BOOST_PP_ITERATION_4 91 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 90 && BOOST_PP_ITERATION_START_4 >= 90 # define BOOST_PP_ITERATION_4 90 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 89 && BOOST_PP_ITERATION_START_4 >= 89 # define BOOST_PP_ITERATION_4 89 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 88 && BOOST_PP_ITERATION_START_4 >= 88 # define BOOST_PP_ITERATION_4 88 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 87 && BOOST_PP_ITERATION_START_4 >= 87 # define BOOST_PP_ITERATION_4 87 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 86 && BOOST_PP_ITERATION_START_4 >= 86 # define BOOST_PP_ITERATION_4 86 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 85 && BOOST_PP_ITERATION_START_4 >= 85 # define BOOST_PP_ITERATION_4 85 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 84 && BOOST_PP_ITERATION_START_4 >= 84 # define BOOST_PP_ITERATION_4 84 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 83 && BOOST_PP_ITERATION_START_4 >= 83 # define BOOST_PP_ITERATION_4 83 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 82 && BOOST_PP_ITERATION_START_4 >= 82 # define BOOST_PP_ITERATION_4 82 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 81 && BOOST_PP_ITERATION_START_4 >= 81 # define BOOST_PP_ITERATION_4 81 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 80 && BOOST_PP_ITERATION_START_4 >= 80 # define BOOST_PP_ITERATION_4 80 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 79 && BOOST_PP_ITERATION_START_4 >= 79 # define BOOST_PP_ITERATION_4 79 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 78 && BOOST_PP_ITERATION_START_4 >= 78 # define BOOST_PP_ITERATION_4 78 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 77 && BOOST_PP_ITERATION_START_4 >= 77 # define BOOST_PP_ITERATION_4 77 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 76 && BOOST_PP_ITERATION_START_4 >= 76 # define BOOST_PP_ITERATION_4 76 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 75 && BOOST_PP_ITERATION_START_4 >= 75 # define BOOST_PP_ITERATION_4 75 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 74 && BOOST_PP_ITERATION_START_4 >= 74 # define BOOST_PP_ITERATION_4 74 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 73 && BOOST_PP_ITERATION_START_4 >= 73 # define BOOST_PP_ITERATION_4 73 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 72 && BOOST_PP_ITERATION_START_4 >= 72 # define BOOST_PP_ITERATION_4 72 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 71 && BOOST_PP_ITERATION_START_4 >= 71 # define BOOST_PP_ITERATION_4 71 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 70 && BOOST_PP_ITERATION_START_4 >= 70 # define BOOST_PP_ITERATION_4 70 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 69 && BOOST_PP_ITERATION_START_4 >= 69 # define BOOST_PP_ITERATION_4 69 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 68 && BOOST_PP_ITERATION_START_4 >= 68 # define BOOST_PP_ITERATION_4 68 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 67 && BOOST_PP_ITERATION_START_4 >= 67 # define BOOST_PP_ITERATION_4 67 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 66 && BOOST_PP_ITERATION_START_4 >= 66 # define BOOST_PP_ITERATION_4 66 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 65 && BOOST_PP_ITERATION_START_4 >= 65 # define BOOST_PP_ITERATION_4 65 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 64 && BOOST_PP_ITERATION_START_4 >= 64 # define BOOST_PP_ITERATION_4 64 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 63 && BOOST_PP_ITERATION_START_4 >= 63 # define BOOST_PP_ITERATION_4 63 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 62 && BOOST_PP_ITERATION_START_4 >= 62 # define BOOST_PP_ITERATION_4 62 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 61 && BOOST_PP_ITERATION_START_4 >= 61 # define BOOST_PP_ITERATION_4 61 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 60 && BOOST_PP_ITERATION_START_4 >= 60 # define BOOST_PP_ITERATION_4 60 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 59 && BOOST_PP_ITERATION_START_4 >= 59 # define BOOST_PP_ITERATION_4 59 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 58 && BOOST_PP_ITERATION_START_4 >= 58 # define BOOST_PP_ITERATION_4 58 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 57 && BOOST_PP_ITERATION_START_4 >= 57 # define BOOST_PP_ITERATION_4 57 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 56 && BOOST_PP_ITERATION_START_4 >= 56 # define BOOST_PP_ITERATION_4 56 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 55 && BOOST_PP_ITERATION_START_4 >= 55 # define BOOST_PP_ITERATION_4 55 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 54 && BOOST_PP_ITERATION_START_4 >= 54 # define BOOST_PP_ITERATION_4 54 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 53 && BOOST_PP_ITERATION_START_4 >= 53 # define BOOST_PP_ITERATION_4 53 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 52 && BOOST_PP_ITERATION_START_4 >= 52 # define BOOST_PP_ITERATION_4 52 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 51 && BOOST_PP_ITERATION_START_4 >= 51 # define BOOST_PP_ITERATION_4 51 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 50 && BOOST_PP_ITERATION_START_4 >= 50 # define BOOST_PP_ITERATION_4 50 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 49 && BOOST_PP_ITERATION_START_4 >= 49 # define BOOST_PP_ITERATION_4 49 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 48 && BOOST_PP_ITERATION_START_4 >= 48 # define BOOST_PP_ITERATION_4 48 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 47 && BOOST_PP_ITERATION_START_4 >= 47 # define BOOST_PP_ITERATION_4 47 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 46 && BOOST_PP_ITERATION_START_4 >= 46 # define BOOST_PP_ITERATION_4 46 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 45 && BOOST_PP_ITERATION_START_4 >= 45 # define BOOST_PP_ITERATION_4 45 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 44 && BOOST_PP_ITERATION_START_4 >= 44 # define BOOST_PP_ITERATION_4 44 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 43 && BOOST_PP_ITERATION_START_4 >= 43 # define BOOST_PP_ITERATION_4 43 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 42 && BOOST_PP_ITERATION_START_4 >= 42 # define BOOST_PP_ITERATION_4 42 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 41 && BOOST_PP_ITERATION_START_4 >= 41 # define BOOST_PP_ITERATION_4 41 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 40 && BOOST_PP_ITERATION_START_4 >= 40 # define BOOST_PP_ITERATION_4 40 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 39 && BOOST_PP_ITERATION_START_4 >= 39 # define BOOST_PP_ITERATION_4 39 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 38 && BOOST_PP_ITERATION_START_4 >= 38 # define BOOST_PP_ITERATION_4 38 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 37 && BOOST_PP_ITERATION_START_4 >= 37 # define BOOST_PP_ITERATION_4 37 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 36 && BOOST_PP_ITERATION_START_4 >= 36 # define BOOST_PP_ITERATION_4 36 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 35 && BOOST_PP_ITERATION_START_4 >= 35 # define BOOST_PP_ITERATION_4 35 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 34 && BOOST_PP_ITERATION_START_4 >= 34 # define BOOST_PP_ITERATION_4 34 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 33 && BOOST_PP_ITERATION_START_4 >= 33 # define BOOST_PP_ITERATION_4 33 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 32 && BOOST_PP_ITERATION_START_4 >= 32 # define BOOST_PP_ITERATION_4 32 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 31 && BOOST_PP_ITERATION_START_4 >= 31 # define BOOST_PP_ITERATION_4 31 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 30 && BOOST_PP_ITERATION_START_4 >= 30 # define BOOST_PP_ITERATION_4 30 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 29 && BOOST_PP_ITERATION_START_4 >= 29 # define BOOST_PP_ITERATION_4 29 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 28 && BOOST_PP_ITERATION_START_4 >= 28 # define BOOST_PP_ITERATION_4 28 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 27 && BOOST_PP_ITERATION_START_4 >= 27 # define BOOST_PP_ITERATION_4 27 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 26 && BOOST_PP_ITERATION_START_4 >= 26 # define BOOST_PP_ITERATION_4 26 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 25 && BOOST_PP_ITERATION_START_4 >= 25 # define BOOST_PP_ITERATION_4 25 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 24 && BOOST_PP_ITERATION_START_4 >= 24 # define BOOST_PP_ITERATION_4 24 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 23 && BOOST_PP_ITERATION_START_4 >= 23 # define BOOST_PP_ITERATION_4 23 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 22 && BOOST_PP_ITERATION_START_4 >= 22 # define BOOST_PP_ITERATION_4 22 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 21 && BOOST_PP_ITERATION_START_4 >= 21 # define BOOST_PP_ITERATION_4 21 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 20 && BOOST_PP_ITERATION_START_4 >= 20 # define BOOST_PP_ITERATION_4 20 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 19 && BOOST_PP_ITERATION_START_4 >= 19 # define BOOST_PP_ITERATION_4 19 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 18 && BOOST_PP_ITERATION_START_4 >= 18 # define BOOST_PP_ITERATION_4 18 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 17 && BOOST_PP_ITERATION_START_4 >= 17 # define BOOST_PP_ITERATION_4 17 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 16 && BOOST_PP_ITERATION_START_4 >= 16 # define BOOST_PP_ITERATION_4 16 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 15 && BOOST_PP_ITERATION_START_4 >= 15 # define BOOST_PP_ITERATION_4 15 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 14 && BOOST_PP_ITERATION_START_4 >= 14 # define BOOST_PP_ITERATION_4 14 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 13 && BOOST_PP_ITERATION_START_4 >= 13 # define BOOST_PP_ITERATION_4 13 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 12 && BOOST_PP_ITERATION_START_4 >= 12 # define BOOST_PP_ITERATION_4 12 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 11 && BOOST_PP_ITERATION_START_4 >= 11 # define BOOST_PP_ITERATION_4 11 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 10 && BOOST_PP_ITERATION_START_4 >= 10 # define BOOST_PP_ITERATION_4 10 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 9 && BOOST_PP_ITERATION_START_4 >= 9 # define BOOST_PP_ITERATION_4 9 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 8 && BOOST_PP_ITERATION_START_4 >= 8 # define BOOST_PP_ITERATION_4 8 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 7 && BOOST_PP_ITERATION_START_4 >= 7 # define BOOST_PP_ITERATION_4 7 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 6 && BOOST_PP_ITERATION_START_4 >= 6 # define BOOST_PP_ITERATION_4 6 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 5 && BOOST_PP_ITERATION_START_4 >= 5 # define BOOST_PP_ITERATION_4 5 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 4 && BOOST_PP_ITERATION_START_4 >= 4 # define BOOST_PP_ITERATION_4 4 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 3 && BOOST_PP_ITERATION_START_4 >= 3 # define BOOST_PP_ITERATION_4 3 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 2 && BOOST_PP_ITERATION_START_4 >= 2 # define BOOST_PP_ITERATION_4 2 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 1 && BOOST_PP_ITERATION_START_4 >= 1 # define BOOST_PP_ITERATION_4 1 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif # if BOOST_PP_ITERATION_FINISH_4 <= 0 && BOOST_PP_ITERATION_START_4 >= 0 # define BOOST_PP_ITERATION_4 0 # include BOOST_PP_FILENAME_4 # undef BOOST_PP_ITERATION_4 # endif ================================================ FILE: benchmarks/boost/preprocessor/iteration/detail/iter/reverse5.hpp ================================================ # /* ************************************************************************** # * * # * (C) Copyright Paul Mensonides 2002. # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # * * # ************************************************************************** */ # # /* See http://www.boost.org for most recent version. */ # # if BOOST_PP_ITERATION_FINISH_5 <= 256 && BOOST_PP_ITERATION_START_5 >= 256 # define BOOST_PP_ITERATION_5 256 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 255 && BOOST_PP_ITERATION_START_5 >= 255 # define BOOST_PP_ITERATION_5 255 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 254 && BOOST_PP_ITERATION_START_5 >= 254 # define BOOST_PP_ITERATION_5 254 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 253 && BOOST_PP_ITERATION_START_5 >= 253 # define BOOST_PP_ITERATION_5 253 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 252 && BOOST_PP_ITERATION_START_5 >= 252 # define BOOST_PP_ITERATION_5 252 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 251 && BOOST_PP_ITERATION_START_5 >= 251 # define BOOST_PP_ITERATION_5 251 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 250 && BOOST_PP_ITERATION_START_5 >= 250 # define BOOST_PP_ITERATION_5 250 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 249 && BOOST_PP_ITERATION_START_5 >= 249 # define BOOST_PP_ITERATION_5 249 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 248 && BOOST_PP_ITERATION_START_5 >= 248 # define BOOST_PP_ITERATION_5 248 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 247 && BOOST_PP_ITERATION_START_5 >= 247 # define BOOST_PP_ITERATION_5 247 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 246 && BOOST_PP_ITERATION_START_5 >= 246 # define BOOST_PP_ITERATION_5 246 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 245 && BOOST_PP_ITERATION_START_5 >= 245 # define BOOST_PP_ITERATION_5 245 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 244 && BOOST_PP_ITERATION_START_5 >= 244 # define BOOST_PP_ITERATION_5 244 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 243 && BOOST_PP_ITERATION_START_5 >= 243 # define BOOST_PP_ITERATION_5 243 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 242 && BOOST_PP_ITERATION_START_5 >= 242 # define BOOST_PP_ITERATION_5 242 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 241 && BOOST_PP_ITERATION_START_5 >= 241 # define BOOST_PP_ITERATION_5 241 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 240 && BOOST_PP_ITERATION_START_5 >= 240 # define BOOST_PP_ITERATION_5 240 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 239 && BOOST_PP_ITERATION_START_5 >= 239 # define BOOST_PP_ITERATION_5 239 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 238 && BOOST_PP_ITERATION_START_5 >= 238 # define BOOST_PP_ITERATION_5 238 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 237 && BOOST_PP_ITERATION_START_5 >= 237 # define BOOST_PP_ITERATION_5 237 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 236 && BOOST_PP_ITERATION_START_5 >= 236 # define BOOST_PP_ITERATION_5 236 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 235 && BOOST_PP_ITERATION_START_5 >= 235 # define BOOST_PP_ITERATION_5 235 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 234 && BOOST_PP_ITERATION_START_5 >= 234 # define BOOST_PP_ITERATION_5 234 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 233 && BOOST_PP_ITERATION_START_5 >= 233 # define BOOST_PP_ITERATION_5 233 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 232 && BOOST_PP_ITERATION_START_5 >= 232 # define BOOST_PP_ITERATION_5 232 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 231 && BOOST_PP_ITERATION_START_5 >= 231 # define BOOST_PP_ITERATION_5 231 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 230 && BOOST_PP_ITERATION_START_5 >= 230 # define BOOST_PP_ITERATION_5 230 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 229 && BOOST_PP_ITERATION_START_5 >= 229 # define BOOST_PP_ITERATION_5 229 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 228 && BOOST_PP_ITERATION_START_5 >= 228 # define BOOST_PP_ITERATION_5 228 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 227 && BOOST_PP_ITERATION_START_5 >= 227 # define BOOST_PP_ITERATION_5 227 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 226 && BOOST_PP_ITERATION_START_5 >= 226 # define BOOST_PP_ITERATION_5 226 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 225 && BOOST_PP_ITERATION_START_5 >= 225 # define BOOST_PP_ITERATION_5 225 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 224 && BOOST_PP_ITERATION_START_5 >= 224 # define BOOST_PP_ITERATION_5 224 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 223 && BOOST_PP_ITERATION_START_5 >= 223 # define BOOST_PP_ITERATION_5 223 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 222 && BOOST_PP_ITERATION_START_5 >= 222 # define BOOST_PP_ITERATION_5 222 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 221 && BOOST_PP_ITERATION_START_5 >= 221 # define BOOST_PP_ITERATION_5 221 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 220 && BOOST_PP_ITERATION_START_5 >= 220 # define BOOST_PP_ITERATION_5 220 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 219 && BOOST_PP_ITERATION_START_5 >= 219 # define BOOST_PP_ITERATION_5 219 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 218 && BOOST_PP_ITERATION_START_5 >= 218 # define BOOST_PP_ITERATION_5 218 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 217 && BOOST_PP_ITERATION_START_5 >= 217 # define BOOST_PP_ITERATION_5 217 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 216 && BOOST_PP_ITERATION_START_5 >= 216 # define BOOST_PP_ITERATION_5 216 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 215 && BOOST_PP_ITERATION_START_5 >= 215 # define BOOST_PP_ITERATION_5 215 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 214 && BOOST_PP_ITERATION_START_5 >= 214 # define BOOST_PP_ITERATION_5 214 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 213 && BOOST_PP_ITERATION_START_5 >= 213 # define BOOST_PP_ITERATION_5 213 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 212 && BOOST_PP_ITERATION_START_5 >= 212 # define BOOST_PP_ITERATION_5 212 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 211 && BOOST_PP_ITERATION_START_5 >= 211 # define BOOST_PP_ITERATION_5 211 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 210 && BOOST_PP_ITERATION_START_5 >= 210 # define BOOST_PP_ITERATION_5 210 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 209 && BOOST_PP_ITERATION_START_5 >= 209 # define BOOST_PP_ITERATION_5 209 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 208 && BOOST_PP_ITERATION_START_5 >= 208 # define BOOST_PP_ITERATION_5 208 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 207 && BOOST_PP_ITERATION_START_5 >= 207 # define BOOST_PP_ITERATION_5 207 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 206 && BOOST_PP_ITERATION_START_5 >= 206 # define BOOST_PP_ITERATION_5 206 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 205 && BOOST_PP_ITERATION_START_5 >= 205 # define BOOST_PP_ITERATION_5 205 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 204 && BOOST_PP_ITERATION_START_5 >= 204 # define BOOST_PP_ITERATION_5 204 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 203 && BOOST_PP_ITERATION_START_5 >= 203 # define BOOST_PP_ITERATION_5 203 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 202 && BOOST_PP_ITERATION_START_5 >= 202 # define BOOST_PP_ITERATION_5 202 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 201 && BOOST_PP_ITERATION_START_5 >= 201 # define BOOST_PP_ITERATION_5 201 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 200 && BOOST_PP_ITERATION_START_5 >= 200 # define BOOST_PP_ITERATION_5 200 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 199 && BOOST_PP_ITERATION_START_5 >= 199 # define BOOST_PP_ITERATION_5 199 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 198 && BOOST_PP_ITERATION_START_5 >= 198 # define BOOST_PP_ITERATION_5 198 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 197 && BOOST_PP_ITERATION_START_5 >= 197 # define BOOST_PP_ITERATION_5 197 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 196 && BOOST_PP_ITERATION_START_5 >= 196 # define BOOST_PP_ITERATION_5 196 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 195 && BOOST_PP_ITERATION_START_5 >= 195 # define BOOST_PP_ITERATION_5 195 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 194 && BOOST_PP_ITERATION_START_5 >= 194 # define BOOST_PP_ITERATION_5 194 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 193 && BOOST_PP_ITERATION_START_5 >= 193 # define BOOST_PP_ITERATION_5 193 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 192 && BOOST_PP_ITERATION_START_5 >= 192 # define BOOST_PP_ITERATION_5 192 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 191 && BOOST_PP_ITERATION_START_5 >= 191 # define BOOST_PP_ITERATION_5 191 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 190 && BOOST_PP_ITERATION_START_5 >= 190 # define BOOST_PP_ITERATION_5 190 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 189 && BOOST_PP_ITERATION_START_5 >= 189 # define BOOST_PP_ITERATION_5 189 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 188 && BOOST_PP_ITERATION_START_5 >= 188 # define BOOST_PP_ITERATION_5 188 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 187 && BOOST_PP_ITERATION_START_5 >= 187 # define BOOST_PP_ITERATION_5 187 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 186 && BOOST_PP_ITERATION_START_5 >= 186 # define BOOST_PP_ITERATION_5 186 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 185 && BOOST_PP_ITERATION_START_5 >= 185 # define BOOST_PP_ITERATION_5 185 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 184 && BOOST_PP_ITERATION_START_5 >= 184 # define BOOST_PP_ITERATION_5 184 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 183 && BOOST_PP_ITERATION_START_5 >= 183 # define BOOST_PP_ITERATION_5 183 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 182 && BOOST_PP_ITERATION_START_5 >= 182 # define BOOST_PP_ITERATION_5 182 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 181 && BOOST_PP_ITERATION_START_5 >= 181 # define BOOST_PP_ITERATION_5 181 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 180 && BOOST_PP_ITERATION_START_5 >= 180 # define BOOST_PP_ITERATION_5 180 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 179 && BOOST_PP_ITERATION_START_5 >= 179 # define BOOST_PP_ITERATION_5 179 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 178 && BOOST_PP_ITERATION_START_5 >= 178 # define BOOST_PP_ITERATION_5 178 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 177 && BOOST_PP_ITERATION_START_5 >= 177 # define BOOST_PP_ITERATION_5 177 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 176 && BOOST_PP_ITERATION_START_5 >= 176 # define BOOST_PP_ITERATION_5 176 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 175 && BOOST_PP_ITERATION_START_5 >= 175 # define BOOST_PP_ITERATION_5 175 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 174 && BOOST_PP_ITERATION_START_5 >= 174 # define BOOST_PP_ITERATION_5 174 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 173 && BOOST_PP_ITERATION_START_5 >= 173 # define BOOST_PP_ITERATION_5 173 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 172 && BOOST_PP_ITERATION_START_5 >= 172 # define BOOST_PP_ITERATION_5 172 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 171 && BOOST_PP_ITERATION_START_5 >= 171 # define BOOST_PP_ITERATION_5 171 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 170 && BOOST_PP_ITERATION_START_5 >= 170 # define BOOST_PP_ITERATION_5 170 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 169 && BOOST_PP_ITERATION_START_5 >= 169 # define BOOST_PP_ITERATION_5 169 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 168 && BOOST_PP_ITERATION_START_5 >= 168 # define BOOST_PP_ITERATION_5 168 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 167 && BOOST_PP_ITERATION_START_5 >= 167 # define BOOST_PP_ITERATION_5 167 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 166 && BOOST_PP_ITERATION_START_5 >= 166 # define BOOST_PP_ITERATION_5 166 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 165 && BOOST_PP_ITERATION_START_5 >= 165 # define BOOST_PP_ITERATION_5 165 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 164 && BOOST_PP_ITERATION_START_5 >= 164 # define BOOST_PP_ITERATION_5 164 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 163 && BOOST_PP_ITERATION_START_5 >= 163 # define BOOST_PP_ITERATION_5 163 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 162 && BOOST_PP_ITERATION_START_5 >= 162 # define BOOST_PP_ITERATION_5 162 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 161 && BOOST_PP_ITERATION_START_5 >= 161 # define BOOST_PP_ITERATION_5 161 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 160 && BOOST_PP_ITERATION_START_5 >= 160 # define BOOST_PP_ITERATION_5 160 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 159 && BOOST_PP_ITERATION_START_5 >= 159 # define BOOST_PP_ITERATION_5 159 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 158 && BOOST_PP_ITERATION_START_5 >= 158 # define BOOST_PP_ITERATION_5 158 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 157 && BOOST_PP_ITERATION_START_5 >= 157 # define BOOST_PP_ITERATION_5 157 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 156 && BOOST_PP_ITERATION_START_5 >= 156 # define BOOST_PP_ITERATION_5 156 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 155 && BOOST_PP_ITERATION_START_5 >= 155 # define BOOST_PP_ITERATION_5 155 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 154 && BOOST_PP_ITERATION_START_5 >= 154 # define BOOST_PP_ITERATION_5 154 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 153 && BOOST_PP_ITERATION_START_5 >= 153 # define BOOST_PP_ITERATION_5 153 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 152 && BOOST_PP_ITERATION_START_5 >= 152 # define BOOST_PP_ITERATION_5 152 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 151 && BOOST_PP_ITERATION_START_5 >= 151 # define BOOST_PP_ITERATION_5 151 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 150 && BOOST_PP_ITERATION_START_5 >= 150 # define BOOST_PP_ITERATION_5 150 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 149 && BOOST_PP_ITERATION_START_5 >= 149 # define BOOST_PP_ITERATION_5 149 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 148 && BOOST_PP_ITERATION_START_5 >= 148 # define BOOST_PP_ITERATION_5 148 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 147 && BOOST_PP_ITERATION_START_5 >= 147 # define BOOST_PP_ITERATION_5 147 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 146 && BOOST_PP_ITERATION_START_5 >= 146 # define BOOST_PP_ITERATION_5 146 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 145 && BOOST_PP_ITERATION_START_5 >= 145 # define BOOST_PP_ITERATION_5 145 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 144 && BOOST_PP_ITERATION_START_5 >= 144 # define BOOST_PP_ITERATION_5 144 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 143 && BOOST_PP_ITERATION_START_5 >= 143 # define BOOST_PP_ITERATION_5 143 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 142 && BOOST_PP_ITERATION_START_5 >= 142 # define BOOST_PP_ITERATION_5 142 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 141 && BOOST_PP_ITERATION_START_5 >= 141 # define BOOST_PP_ITERATION_5 141 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 140 && BOOST_PP_ITERATION_START_5 >= 140 # define BOOST_PP_ITERATION_5 140 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 139 && BOOST_PP_ITERATION_START_5 >= 139 # define BOOST_PP_ITERATION_5 139 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 138 && BOOST_PP_ITERATION_START_5 >= 138 # define BOOST_PP_ITERATION_5 138 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 137 && BOOST_PP_ITERATION_START_5 >= 137 # define BOOST_PP_ITERATION_5 137 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 136 && BOOST_PP_ITERATION_START_5 >= 136 # define BOOST_PP_ITERATION_5 136 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 135 && BOOST_PP_ITERATION_START_5 >= 135 # define BOOST_PP_ITERATION_5 135 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 134 && BOOST_PP_ITERATION_START_5 >= 134 # define BOOST_PP_ITERATION_5 134 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 133 && BOOST_PP_ITERATION_START_5 >= 133 # define BOOST_PP_ITERATION_5 133 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 132 && BOOST_PP_ITERATION_START_5 >= 132 # define BOOST_PP_ITERATION_5 132 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 131 && BOOST_PP_ITERATION_START_5 >= 131 # define BOOST_PP_ITERATION_5 131 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 130 && BOOST_PP_ITERATION_START_5 >= 130 # define BOOST_PP_ITERATION_5 130 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 129 && BOOST_PP_ITERATION_START_5 >= 129 # define BOOST_PP_ITERATION_5 129 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 128 && BOOST_PP_ITERATION_START_5 >= 128 # define BOOST_PP_ITERATION_5 128 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 127 && BOOST_PP_ITERATION_START_5 >= 127 # define BOOST_PP_ITERATION_5 127 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 126 && BOOST_PP_ITERATION_START_5 >= 126 # define BOOST_PP_ITERATION_5 126 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 125 && BOOST_PP_ITERATION_START_5 >= 125 # define BOOST_PP_ITERATION_5 125 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 124 && BOOST_PP_ITERATION_START_5 >= 124 # define BOOST_PP_ITERATION_5 124 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 123 && BOOST_PP_ITERATION_START_5 >= 123 # define BOOST_PP_ITERATION_5 123 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 122 && BOOST_PP_ITERATION_START_5 >= 122 # define BOOST_PP_ITERATION_5 122 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 121 && BOOST_PP_ITERATION_START_5 >= 121 # define BOOST_PP_ITERATION_5 121 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 120 && BOOST_PP_ITERATION_START_5 >= 120 # define BOOST_PP_ITERATION_5 120 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 119 && BOOST_PP_ITERATION_START_5 >= 119 # define BOOST_PP_ITERATION_5 119 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 118 && BOOST_PP_ITERATION_START_5 >= 118 # define BOOST_PP_ITERATION_5 118 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 117 && BOOST_PP_ITERATION_START_5 >= 117 # define BOOST_PP_ITERATION_5 117 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 116 && BOOST_PP_ITERATION_START_5 >= 116 # define BOOST_PP_ITERATION_5 116 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 115 && BOOST_PP_ITERATION_START_5 >= 115 # define BOOST_PP_ITERATION_5 115 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 114 && BOOST_PP_ITERATION_START_5 >= 114 # define BOOST_PP_ITERATION_5 114 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 113 && BOOST_PP_ITERATION_START_5 >= 113 # define BOOST_PP_ITERATION_5 113 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 112 && BOOST_PP_ITERATION_START_5 >= 112 # define BOOST_PP_ITERATION_5 112 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 111 && BOOST_PP_ITERATION_START_5 >= 111 # define BOOST_PP_ITERATION_5 111 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 110 && BOOST_PP_ITERATION_START_5 >= 110 # define BOOST_PP_ITERATION_5 110 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 109 && BOOST_PP_ITERATION_START_5 >= 109 # define BOOST_PP_ITERATION_5 109 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 108 && BOOST_PP_ITERATION_START_5 >= 108 # define BOOST_PP_ITERATION_5 108 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 107 && BOOST_PP_ITERATION_START_5 >= 107 # define BOOST_PP_ITERATION_5 107 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 106 && BOOST_PP_ITERATION_START_5 >= 106 # define BOOST_PP_ITERATION_5 106 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 105 && BOOST_PP_ITERATION_START_5 >= 105 # define BOOST_PP_ITERATION_5 105 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 104 && BOOST_PP_ITERATION_START_5 >= 104 # define BOOST_PP_ITERATION_5 104 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 103 && BOOST_PP_ITERATION_START_5 >= 103 # define BOOST_PP_ITERATION_5 103 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 102 && BOOST_PP_ITERATION_START_5 >= 102 # define BOOST_PP_ITERATION_5 102 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 101 && BOOST_PP_ITERATION_START_5 >= 101 # define BOOST_PP_ITERATION_5 101 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 100 && BOOST_PP_ITERATION_START_5 >= 100 # define BOOST_PP_ITERATION_5 100 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 99 && BOOST_PP_ITERATION_START_5 >= 99 # define BOOST_PP_ITERATION_5 99 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 98 && BOOST_PP_ITERATION_START_5 >= 98 # define BOOST_PP_ITERATION_5 98 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 97 && BOOST_PP_ITERATION_START_5 >= 97 # define BOOST_PP_ITERATION_5 97 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 96 && BOOST_PP_ITERATION_START_5 >= 96 # define BOOST_PP_ITERATION_5 96 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 95 && BOOST_PP_ITERATION_START_5 >= 95 # define BOOST_PP_ITERATION_5 95 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 94 && BOOST_PP_ITERATION_START_5 >= 94 # define BOOST_PP_ITERATION_5 94 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 93 && BOOST_PP_ITERATION_START_5 >= 93 # define BOOST_PP_ITERATION_5 93 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 92 && BOOST_PP_ITERATION_START_5 >= 92 # define BOOST_PP_ITERATION_5 92 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 91 && BOOST_PP_ITERATION_START_5 >= 91 # define BOOST_PP_ITERATION_5 91 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 90 && BOOST_PP_ITERATION_START_5 >= 90 # define BOOST_PP_ITERATION_5 90 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 89 && BOOST_PP_ITERATION_START_5 >= 89 # define BOOST_PP_ITERATION_5 89 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 88 && BOOST_PP_ITERATION_START_5 >= 88 # define BOOST_PP_ITERATION_5 88 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 87 && BOOST_PP_ITERATION_START_5 >= 87 # define BOOST_PP_ITERATION_5 87 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 86 && BOOST_PP_ITERATION_START_5 >= 86 # define BOOST_PP_ITERATION_5 86 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 85 && BOOST_PP_ITERATION_START_5 >= 85 # define BOOST_PP_ITERATION_5 85 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 84 && BOOST_PP_ITERATION_START_5 >= 84 # define BOOST_PP_ITERATION_5 84 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 83 && BOOST_PP_ITERATION_START_5 >= 83 # define BOOST_PP_ITERATION_5 83 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 82 && BOOST_PP_ITERATION_START_5 >= 82 # define BOOST_PP_ITERATION_5 82 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 81 && BOOST_PP_ITERATION_START_5 >= 81 # define BOOST_PP_ITERATION_5 81 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 80 && BOOST_PP_ITERATION_START_5 >= 80 # define BOOST_PP_ITERATION_5 80 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 79 && BOOST_PP_ITERATION_START_5 >= 79 # define BOOST_PP_ITERATION_5 79 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 78 && BOOST_PP_ITERATION_START_5 >= 78 # define BOOST_PP_ITERATION_5 78 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 77 && BOOST_PP_ITERATION_START_5 >= 77 # define BOOST_PP_ITERATION_5 77 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 76 && BOOST_PP_ITERATION_START_5 >= 76 # define BOOST_PP_ITERATION_5 76 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 75 && BOOST_PP_ITERATION_START_5 >= 75 # define BOOST_PP_ITERATION_5 75 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 74 && BOOST_PP_ITERATION_START_5 >= 74 # define BOOST_PP_ITERATION_5 74 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 73 && BOOST_PP_ITERATION_START_5 >= 73 # define BOOST_PP_ITERATION_5 73 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 72 && BOOST_PP_ITERATION_START_5 >= 72 # define BOOST_PP_ITERATION_5 72 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 71 && BOOST_PP_ITERATION_START_5 >= 71 # define BOOST_PP_ITERATION_5 71 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 70 && BOOST_PP_ITERATION_START_5 >= 70 # define BOOST_PP_ITERATION_5 70 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 69 && BOOST_PP_ITERATION_START_5 >= 69 # define BOOST_PP_ITERATION_5 69 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 68 && BOOST_PP_ITERATION_START_5 >= 68 # define BOOST_PP_ITERATION_5 68 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 67 && BOOST_PP_ITERATION_START_5 >= 67 # define BOOST_PP_ITERATION_5 67 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 66 && BOOST_PP_ITERATION_START_5 >= 66 # define BOOST_PP_ITERATION_5 66 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 65 && BOOST_PP_ITERATION_START_5 >= 65 # define BOOST_PP_ITERATION_5 65 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 64 && BOOST_PP_ITERATION_START_5 >= 64 # define BOOST_PP_ITERATION_5 64 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 63 && BOOST_PP_ITERATION_START_5 >= 63 # define BOOST_PP_ITERATION_5 63 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 62 && BOOST_PP_ITERATION_START_5 >= 62 # define BOOST_PP_ITERATION_5 62 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 61 && BOOST_PP_ITERATION_START_5 >= 61 # define BOOST_PP_ITERATION_5 61 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 60 && BOOST_PP_ITERATION_START_5 >= 60 # define BOOST_PP_ITERATION_5 60 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 59 && BOOST_PP_ITERATION_START_5 >= 59 # define BOOST_PP_ITERATION_5 59 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 58 && BOOST_PP_ITERATION_START_5 >= 58 # define BOOST_PP_ITERATION_5 58 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 57 && BOOST_PP_ITERATION_START_5 >= 57 # define BOOST_PP_ITERATION_5 57 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 56 && BOOST_PP_ITERATION_START_5 >= 56 # define BOOST_PP_ITERATION_5 56 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 55 && BOOST_PP_ITERATION_START_5 >= 55 # define BOOST_PP_ITERATION_5 55 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 54 && BOOST_PP_ITERATION_START_5 >= 54 # define BOOST_PP_ITERATION_5 54 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 53 && BOOST_PP_ITERATION_START_5 >= 53 # define BOOST_PP_ITERATION_5 53 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 52 && BOOST_PP_ITERATION_START_5 >= 52 # define BOOST_PP_ITERATION_5 52 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 51 && BOOST_PP_ITERATION_START_5 >= 51 # define BOOST_PP_ITERATION_5 51 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 50 && BOOST_PP_ITERATION_START_5 >= 50 # define BOOST_PP_ITERATION_5 50 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 49 && BOOST_PP_ITERATION_START_5 >= 49 # define BOOST_PP_ITERATION_5 49 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 48 && BOOST_PP_ITERATION_START_5 >= 48 # define BOOST_PP_ITERATION_5 48 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 47 && BOOST_PP_ITERATION_START_5 >= 47 # define BOOST_PP_ITERATION_5 47 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 46 && BOOST_PP_ITERATION_START_5 >= 46 # define BOOST_PP_ITERATION_5 46 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 45 && BOOST_PP_ITERATION_START_5 >= 45 # define BOOST_PP_ITERATION_5 45 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 44 && BOOST_PP_ITERATION_START_5 >= 44 # define BOOST_PP_ITERATION_5 44 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 43 && BOOST_PP_ITERATION_START_5 >= 43 # define BOOST_PP_ITERATION_5 43 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 42 && BOOST_PP_ITERATION_START_5 >= 42 # define BOOST_PP_ITERATION_5 42 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 41 && BOOST_PP_ITERATION_START_5 >= 41 # define BOOST_PP_ITERATION_5 41 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 40 && BOOST_PP_ITERATION_START_5 >= 40 # define BOOST_PP_ITERATION_5 40 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 39 && BOOST_PP_ITERATION_START_5 >= 39 # define BOOST_PP_ITERATION_5 39 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 38 && BOOST_PP_ITERATION_START_5 >= 38 # define BOOST_PP_ITERATION_5 38 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 37 && BOOST_PP_ITERATION_START_5 >= 37 # define BOOST_PP_ITERATION_5 37 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 36 && BOOST_PP_ITERATION_START_5 >= 36 # define BOOST_PP_ITERATION_5 36 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 35 && BOOST_PP_ITERATION_START_5 >= 35 # define BOOST_PP_ITERATION_5 35 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 34 && BOOST_PP_ITERATION_START_5 >= 34 # define BOOST_PP_ITERATION_5 34 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 33 && BOOST_PP_ITERATION_START_5 >= 33 # define BOOST_PP_ITERATION_5 33 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 32 && BOOST_PP_ITERATION_START_5 >= 32 # define BOOST_PP_ITERATION_5 32 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 31 && BOOST_PP_ITERATION_START_5 >= 31 # define BOOST_PP_ITERATION_5 31 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 30 && BOOST_PP_ITERATION_START_5 >= 30 # define BOOST_PP_ITERATION_5 30 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 29 && BOOST_PP_ITERATION_START_5 >= 29 # define BOOST_PP_ITERATION_5 29 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 28 && BOOST_PP_ITERATION_START_5 >= 28 # define BOOST_PP_ITERATION_5 28 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 27 && BOOST_PP_ITERATION_START_5 >= 27 # define BOOST_PP_ITERATION_5 27 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 26 && BOOST_PP_ITERATION_START_5 >= 26 # define BOOST_PP_ITERATION_5 26 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 25 && BOOST_PP_ITERATION_START_5 >= 25 # define BOOST_PP_ITERATION_5 25 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 24 && BOOST_PP_ITERATION_START_5 >= 24 # define BOOST_PP_ITERATION_5 24 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 23 && BOOST_PP_ITERATION_START_5 >= 23 # define BOOST_PP_ITERATION_5 23 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 22 && BOOST_PP_ITERATION_START_5 >= 22 # define BOOST_PP_ITERATION_5 22 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 21 && BOOST_PP_ITERATION_START_5 >= 21 # define BOOST_PP_ITERATION_5 21 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 20 && BOOST_PP_ITERATION_START_5 >= 20 # define BOOST_PP_ITERATION_5 20 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 19 && BOOST_PP_ITERATION_START_5 >= 19 # define BOOST_PP_ITERATION_5 19 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 18 && BOOST_PP_ITERATION_START_5 >= 18 # define BOOST_PP_ITERATION_5 18 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 17 && BOOST_PP_ITERATION_START_5 >= 17 # define BOOST_PP_ITERATION_5 17 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 16 && BOOST_PP_ITERATION_START_5 >= 16 # define BOOST_PP_ITERATION_5 16 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 15 && BOOST_PP_ITERATION_START_5 >= 15 # define BOOST_PP_ITERATION_5 15 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 14 && BOOST_PP_ITERATION_START_5 >= 14 # define BOOST_PP_ITERATION_5 14 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 13 && BOOST_PP_ITERATION_START_5 >= 13 # define BOOST_PP_ITERATION_5 13 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 12 && BOOST_PP_ITERATION_START_5 >= 12 # define BOOST_PP_ITERATION_5 12 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 11 && BOOST_PP_ITERATION_START_5 >= 11 # define BOOST_PP_ITERATION_5 11 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 10 && BOOST_PP_ITERATION_START_5 >= 10 # define BOOST_PP_ITERATION_5 10 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 9 && BOOST_PP_ITERATION_START_5 >= 9 # define BOOST_PP_ITERATION_5 9 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 8 && BOOST_PP_ITERATION_START_5 >= 8 # define BOOST_PP_ITERATION_5 8 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 7 && BOOST_PP_ITERATION_START_5 >= 7 # define BOOST_PP_ITERATION_5 7 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 6 && BOOST_PP_ITERATION_START_5 >= 6 # define BOOST_PP_ITERATION_5 6 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 5 && BOOST_PP_ITERATION_START_5 >= 5 # define BOOST_PP_ITERATION_5 5 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 4 && BOOST_PP_ITERATION_START_5 >= 4 # define BOOST_PP_ITERATION_5 4 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 3 && BOOST_PP_ITERATION_START_5 >= 3 # define BOOST_PP_ITERATION_5 3 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 2 && BOOST_PP_ITERATION_START_5 >= 2 # define BOOST_PP_ITERATION_5 2 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 1 && BOOST_PP_ITERATION_START_5 >= 1 # define BOOST_PP_ITERATION_5 1 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif # if BOOST_PP_ITERATION_FINISH_5 <= 0 && BOOST_PP_ITERATION_START_5 >= 0 # define BOOST_PP_ITERATION_5 0 # include BOOST_PP_FILENAME_5 # undef BOOST_PP_ITERATION_5 # endif ================================================ FILE: benchmarks/boost/preprocessor/iteration/detail/local.hpp ================================================ # /* ************************************************************************** # * * # * (C) Copyright Paul Mensonides 2002. # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # * * # ************************************************************************** */ # # /* See http://www.boost.org for most recent version. */ # # if !defined(BOOST_PP_LOCAL_LIMITS) # error BOOST_PP_ERROR: local iteration boundaries are not defined # elif !defined(BOOST_PP_LOCAL_MACRO) # error BOOST_PP_ERROR: local iteration target macro is not defined # else # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() # define BOOST_PP_LOCAL_S BOOST_PP_TUPLE_ELEM(2, 0, BOOST_PP_LOCAL_LIMITS) # define BOOST_PP_LOCAL_F BOOST_PP_TUPLE_ELEM(2, 1, BOOST_PP_LOCAL_LIMITS) # else # define BOOST_PP_VALUE BOOST_PP_TUPLE_ELEM(2, 0, BOOST_PP_LOCAL_LIMITS) # include # define BOOST_PP_VALUE BOOST_PP_TUPLE_ELEM(2, 1, BOOST_PP_LOCAL_LIMITS) # include # define BOOST_PP_LOCAL_S BOOST_PP_LOCAL_SE() # define BOOST_PP_LOCAL_F BOOST_PP_LOCAL_FE() # endif # endif # # if (BOOST_PP_LOCAL_S) > (BOOST_PP_LOCAL_F) # include # else # if BOOST_PP_LOCAL_C(0) BOOST_PP_LOCAL_MACRO(0) # endif # if BOOST_PP_LOCAL_C(1) BOOST_PP_LOCAL_MACRO(1) # endif # if BOOST_PP_LOCAL_C(2) BOOST_PP_LOCAL_MACRO(2) # endif # if BOOST_PP_LOCAL_C(3) BOOST_PP_LOCAL_MACRO(3) # endif # if BOOST_PP_LOCAL_C(4) BOOST_PP_LOCAL_MACRO(4) # endif # if BOOST_PP_LOCAL_C(5) BOOST_PP_LOCAL_MACRO(5) # endif # if BOOST_PP_LOCAL_C(6) BOOST_PP_LOCAL_MACRO(6) # endif # if BOOST_PP_LOCAL_C(7) BOOST_PP_LOCAL_MACRO(7) # endif # if BOOST_PP_LOCAL_C(8) BOOST_PP_LOCAL_MACRO(8) # endif # if BOOST_PP_LOCAL_C(9) BOOST_PP_LOCAL_MACRO(9) # endif # if BOOST_PP_LOCAL_C(10) BOOST_PP_LOCAL_MACRO(10) # endif # if BOOST_PP_LOCAL_C(11) BOOST_PP_LOCAL_MACRO(11) # endif # if BOOST_PP_LOCAL_C(12) BOOST_PP_LOCAL_MACRO(12) # endif # if BOOST_PP_LOCAL_C(13) BOOST_PP_LOCAL_MACRO(13) # endif # if BOOST_PP_LOCAL_C(14) BOOST_PP_LOCAL_MACRO(14) # endif # if BOOST_PP_LOCAL_C(15) BOOST_PP_LOCAL_MACRO(15) # endif # if BOOST_PP_LOCAL_C(16) BOOST_PP_LOCAL_MACRO(16) # endif # if BOOST_PP_LOCAL_C(17) BOOST_PP_LOCAL_MACRO(17) # endif # if BOOST_PP_LOCAL_C(18) BOOST_PP_LOCAL_MACRO(18) # endif # if BOOST_PP_LOCAL_C(19) BOOST_PP_LOCAL_MACRO(19) # endif # if BOOST_PP_LOCAL_C(20) BOOST_PP_LOCAL_MACRO(20) # endif # if BOOST_PP_LOCAL_C(21) BOOST_PP_LOCAL_MACRO(21) # endif # if BOOST_PP_LOCAL_C(22) BOOST_PP_LOCAL_MACRO(22) # endif # if BOOST_PP_LOCAL_C(23) BOOST_PP_LOCAL_MACRO(23) # endif # if BOOST_PP_LOCAL_C(24) BOOST_PP_LOCAL_MACRO(24) # endif # if BOOST_PP_LOCAL_C(25) BOOST_PP_LOCAL_MACRO(25) # endif # if BOOST_PP_LOCAL_C(26) BOOST_PP_LOCAL_MACRO(26) # endif # if BOOST_PP_LOCAL_C(27) BOOST_PP_LOCAL_MACRO(27) # endif # if BOOST_PP_LOCAL_C(28) BOOST_PP_LOCAL_MACRO(28) # endif # if BOOST_PP_LOCAL_C(29) BOOST_PP_LOCAL_MACRO(29) # endif # if BOOST_PP_LOCAL_C(30) BOOST_PP_LOCAL_MACRO(30) # endif # if BOOST_PP_LOCAL_C(31) BOOST_PP_LOCAL_MACRO(31) # endif # if BOOST_PP_LOCAL_C(32) BOOST_PP_LOCAL_MACRO(32) # endif # if BOOST_PP_LOCAL_C(33) BOOST_PP_LOCAL_MACRO(33) # endif # if BOOST_PP_LOCAL_C(34) BOOST_PP_LOCAL_MACRO(34) # endif # if BOOST_PP_LOCAL_C(35) BOOST_PP_LOCAL_MACRO(35) # endif # if BOOST_PP_LOCAL_C(36) BOOST_PP_LOCAL_MACRO(36) # endif # if BOOST_PP_LOCAL_C(37) BOOST_PP_LOCAL_MACRO(37) # endif # if BOOST_PP_LOCAL_C(38) BOOST_PP_LOCAL_MACRO(38) # endif # if BOOST_PP_LOCAL_C(39) BOOST_PP_LOCAL_MACRO(39) # endif # if BOOST_PP_LOCAL_C(40) BOOST_PP_LOCAL_MACRO(40) # endif # if BOOST_PP_LOCAL_C(41) BOOST_PP_LOCAL_MACRO(41) # endif # if BOOST_PP_LOCAL_C(42) BOOST_PP_LOCAL_MACRO(42) # endif # if BOOST_PP_LOCAL_C(43) BOOST_PP_LOCAL_MACRO(43) # endif # if BOOST_PP_LOCAL_C(44) BOOST_PP_LOCAL_MACRO(44) # endif # if BOOST_PP_LOCAL_C(45) BOOST_PP_LOCAL_MACRO(45) # endif # if BOOST_PP_LOCAL_C(46) BOOST_PP_LOCAL_MACRO(46) # endif # if BOOST_PP_LOCAL_C(47) BOOST_PP_LOCAL_MACRO(47) # endif # if BOOST_PP_LOCAL_C(48) BOOST_PP_LOCAL_MACRO(48) # endif # if BOOST_PP_LOCAL_C(49) BOOST_PP_LOCAL_MACRO(49) # endif # if BOOST_PP_LOCAL_C(50) BOOST_PP_LOCAL_MACRO(50) # endif # if BOOST_PP_LOCAL_C(51) BOOST_PP_LOCAL_MACRO(51) # endif # if BOOST_PP_LOCAL_C(52) BOOST_PP_LOCAL_MACRO(52) # endif # if BOOST_PP_LOCAL_C(53) BOOST_PP_LOCAL_MACRO(53) # endif # if BOOST_PP_LOCAL_C(54) BOOST_PP_LOCAL_MACRO(54) # endif # if BOOST_PP_LOCAL_C(55) BOOST_PP_LOCAL_MACRO(55) # endif # if BOOST_PP_LOCAL_C(56) BOOST_PP_LOCAL_MACRO(56) # endif # if BOOST_PP_LOCAL_C(57) BOOST_PP_LOCAL_MACRO(57) # endif # if BOOST_PP_LOCAL_C(58) BOOST_PP_LOCAL_MACRO(58) # endif # if BOOST_PP_LOCAL_C(59) BOOST_PP_LOCAL_MACRO(59) # endif # if BOOST_PP_LOCAL_C(60) BOOST_PP_LOCAL_MACRO(60) # endif # if BOOST_PP_LOCAL_C(61) BOOST_PP_LOCAL_MACRO(61) # endif # if BOOST_PP_LOCAL_C(62) BOOST_PP_LOCAL_MACRO(62) # endif # if BOOST_PP_LOCAL_C(63) BOOST_PP_LOCAL_MACRO(63) # endif # if BOOST_PP_LOCAL_C(64) BOOST_PP_LOCAL_MACRO(64) # endif # if BOOST_PP_LOCAL_C(65) BOOST_PP_LOCAL_MACRO(65) # endif # if BOOST_PP_LOCAL_C(66) BOOST_PP_LOCAL_MACRO(66) # endif # if BOOST_PP_LOCAL_C(67) BOOST_PP_LOCAL_MACRO(67) # endif # if BOOST_PP_LOCAL_C(68) BOOST_PP_LOCAL_MACRO(68) # endif # if BOOST_PP_LOCAL_C(69) BOOST_PP_LOCAL_MACRO(69) # endif # if BOOST_PP_LOCAL_C(70) BOOST_PP_LOCAL_MACRO(70) # endif # if BOOST_PP_LOCAL_C(71) BOOST_PP_LOCAL_MACRO(71) # endif # if BOOST_PP_LOCAL_C(72) BOOST_PP_LOCAL_MACRO(72) # endif # if BOOST_PP_LOCAL_C(73) BOOST_PP_LOCAL_MACRO(73) # endif # if BOOST_PP_LOCAL_C(74) BOOST_PP_LOCAL_MACRO(74) # endif # if BOOST_PP_LOCAL_C(75) BOOST_PP_LOCAL_MACRO(75) # endif # if BOOST_PP_LOCAL_C(76) BOOST_PP_LOCAL_MACRO(76) # endif # if BOOST_PP_LOCAL_C(77) BOOST_PP_LOCAL_MACRO(77) # endif # if BOOST_PP_LOCAL_C(78) BOOST_PP_LOCAL_MACRO(78) # endif # if BOOST_PP_LOCAL_C(79) BOOST_PP_LOCAL_MACRO(79) # endif # if BOOST_PP_LOCAL_C(80) BOOST_PP_LOCAL_MACRO(80) # endif # if BOOST_PP_LOCAL_C(81) BOOST_PP_LOCAL_MACRO(81) # endif # if BOOST_PP_LOCAL_C(82) BOOST_PP_LOCAL_MACRO(82) # endif # if BOOST_PP_LOCAL_C(83) BOOST_PP_LOCAL_MACRO(83) # endif # if BOOST_PP_LOCAL_C(84) BOOST_PP_LOCAL_MACRO(84) # endif # if BOOST_PP_LOCAL_C(85) BOOST_PP_LOCAL_MACRO(85) # endif # if BOOST_PP_LOCAL_C(86) BOOST_PP_LOCAL_MACRO(86) # endif # if BOOST_PP_LOCAL_C(87) BOOST_PP_LOCAL_MACRO(87) # endif # if BOOST_PP_LOCAL_C(88) BOOST_PP_LOCAL_MACRO(88) # endif # if BOOST_PP_LOCAL_C(89) BOOST_PP_LOCAL_MACRO(89) # endif # if BOOST_PP_LOCAL_C(90) BOOST_PP_LOCAL_MACRO(90) # endif # if BOOST_PP_LOCAL_C(91) BOOST_PP_LOCAL_MACRO(91) # endif # if BOOST_PP_LOCAL_C(92) BOOST_PP_LOCAL_MACRO(92) # endif # if BOOST_PP_LOCAL_C(93) BOOST_PP_LOCAL_MACRO(93) # endif # if BOOST_PP_LOCAL_C(94) BOOST_PP_LOCAL_MACRO(94) # endif # if BOOST_PP_LOCAL_C(95) BOOST_PP_LOCAL_MACRO(95) # endif # if BOOST_PP_LOCAL_C(96) BOOST_PP_LOCAL_MACRO(96) # endif # if BOOST_PP_LOCAL_C(97) BOOST_PP_LOCAL_MACRO(97) # endif # if BOOST_PP_LOCAL_C(98) BOOST_PP_LOCAL_MACRO(98) # endif # if BOOST_PP_LOCAL_C(99) BOOST_PP_LOCAL_MACRO(99) # endif # if BOOST_PP_LOCAL_C(100) BOOST_PP_LOCAL_MACRO(100) # endif # if BOOST_PP_LOCAL_C(101) BOOST_PP_LOCAL_MACRO(101) # endif # if BOOST_PP_LOCAL_C(102) BOOST_PP_LOCAL_MACRO(102) # endif # if BOOST_PP_LOCAL_C(103) BOOST_PP_LOCAL_MACRO(103) # endif # if BOOST_PP_LOCAL_C(104) BOOST_PP_LOCAL_MACRO(104) # endif # if BOOST_PP_LOCAL_C(105) BOOST_PP_LOCAL_MACRO(105) # endif # if BOOST_PP_LOCAL_C(106) BOOST_PP_LOCAL_MACRO(106) # endif # if BOOST_PP_LOCAL_C(107) BOOST_PP_LOCAL_MACRO(107) # endif # if BOOST_PP_LOCAL_C(108) BOOST_PP_LOCAL_MACRO(108) # endif # if BOOST_PP_LOCAL_C(109) BOOST_PP_LOCAL_MACRO(109) # endif # if BOOST_PP_LOCAL_C(110) BOOST_PP_LOCAL_MACRO(110) # endif # if BOOST_PP_LOCAL_C(111) BOOST_PP_LOCAL_MACRO(111) # endif # if BOOST_PP_LOCAL_C(112) BOOST_PP_LOCAL_MACRO(112) # endif # if BOOST_PP_LOCAL_C(113) BOOST_PP_LOCAL_MACRO(113) # endif # if BOOST_PP_LOCAL_C(114) BOOST_PP_LOCAL_MACRO(114) # endif # if BOOST_PP_LOCAL_C(115) BOOST_PP_LOCAL_MACRO(115) # endif # if BOOST_PP_LOCAL_C(116) BOOST_PP_LOCAL_MACRO(116) # endif # if BOOST_PP_LOCAL_C(117) BOOST_PP_LOCAL_MACRO(117) # endif # if BOOST_PP_LOCAL_C(118) BOOST_PP_LOCAL_MACRO(118) # endif # if BOOST_PP_LOCAL_C(119) BOOST_PP_LOCAL_MACRO(119) # endif # if BOOST_PP_LOCAL_C(120) BOOST_PP_LOCAL_MACRO(120) # endif # if BOOST_PP_LOCAL_C(121) BOOST_PP_LOCAL_MACRO(121) # endif # if BOOST_PP_LOCAL_C(122) BOOST_PP_LOCAL_MACRO(122) # endif # if BOOST_PP_LOCAL_C(123) BOOST_PP_LOCAL_MACRO(123) # endif # if BOOST_PP_LOCAL_C(124) BOOST_PP_LOCAL_MACRO(124) # endif # if BOOST_PP_LOCAL_C(125) BOOST_PP_LOCAL_MACRO(125) # endif # if BOOST_PP_LOCAL_C(126) BOOST_PP_LOCAL_MACRO(126) # endif # if BOOST_PP_LOCAL_C(127) BOOST_PP_LOCAL_MACRO(127) # endif # if BOOST_PP_LOCAL_C(128) BOOST_PP_LOCAL_MACRO(128) # endif # if BOOST_PP_LOCAL_C(129) BOOST_PP_LOCAL_MACRO(129) # endif # if BOOST_PP_LOCAL_C(130) BOOST_PP_LOCAL_MACRO(130) # endif # if BOOST_PP_LOCAL_C(131) BOOST_PP_LOCAL_MACRO(131) # endif # if BOOST_PP_LOCAL_C(132) BOOST_PP_LOCAL_MACRO(132) # endif # if BOOST_PP_LOCAL_C(133) BOOST_PP_LOCAL_MACRO(133) # endif # if BOOST_PP_LOCAL_C(134) BOOST_PP_LOCAL_MACRO(134) # endif # if BOOST_PP_LOCAL_C(135) BOOST_PP_LOCAL_MACRO(135) # endif # if BOOST_PP_LOCAL_C(136) BOOST_PP_LOCAL_MACRO(136) # endif # if BOOST_PP_LOCAL_C(137) BOOST_PP_LOCAL_MACRO(137) # endif # if BOOST_PP_LOCAL_C(138) BOOST_PP_LOCAL_MACRO(138) # endif # if BOOST_PP_LOCAL_C(139) BOOST_PP_LOCAL_MACRO(139) # endif # if BOOST_PP_LOCAL_C(140) BOOST_PP_LOCAL_MACRO(140) # endif # if BOOST_PP_LOCAL_C(141) BOOST_PP_LOCAL_MACRO(141) # endif # if BOOST_PP_LOCAL_C(142) BOOST_PP_LOCAL_MACRO(142) # endif # if BOOST_PP_LOCAL_C(143) BOOST_PP_LOCAL_MACRO(143) # endif # if BOOST_PP_LOCAL_C(144) BOOST_PP_LOCAL_MACRO(144) # endif # if BOOST_PP_LOCAL_C(145) BOOST_PP_LOCAL_MACRO(145) # endif # if BOOST_PP_LOCAL_C(146) BOOST_PP_LOCAL_MACRO(146) # endif # if BOOST_PP_LOCAL_C(147) BOOST_PP_LOCAL_MACRO(147) # endif # if BOOST_PP_LOCAL_C(148) BOOST_PP_LOCAL_MACRO(148) # endif # if BOOST_PP_LOCAL_C(149) BOOST_PP_LOCAL_MACRO(149) # endif # if BOOST_PP_LOCAL_C(150) BOOST_PP_LOCAL_MACRO(150) # endif # if BOOST_PP_LOCAL_C(151) BOOST_PP_LOCAL_MACRO(151) # endif # if BOOST_PP_LOCAL_C(152) BOOST_PP_LOCAL_MACRO(152) # endif # if BOOST_PP_LOCAL_C(153) BOOST_PP_LOCAL_MACRO(153) # endif # if BOOST_PP_LOCAL_C(154) BOOST_PP_LOCAL_MACRO(154) # endif # if BOOST_PP_LOCAL_C(155) BOOST_PP_LOCAL_MACRO(155) # endif # if BOOST_PP_LOCAL_C(156) BOOST_PP_LOCAL_MACRO(156) # endif # if BOOST_PP_LOCAL_C(157) BOOST_PP_LOCAL_MACRO(157) # endif # if BOOST_PP_LOCAL_C(158) BOOST_PP_LOCAL_MACRO(158) # endif # if BOOST_PP_LOCAL_C(159) BOOST_PP_LOCAL_MACRO(159) # endif # if BOOST_PP_LOCAL_C(160) BOOST_PP_LOCAL_MACRO(160) # endif # if BOOST_PP_LOCAL_C(161) BOOST_PP_LOCAL_MACRO(161) # endif # if BOOST_PP_LOCAL_C(162) BOOST_PP_LOCAL_MACRO(162) # endif # if BOOST_PP_LOCAL_C(163) BOOST_PP_LOCAL_MACRO(163) # endif # if BOOST_PP_LOCAL_C(164) BOOST_PP_LOCAL_MACRO(164) # endif # if BOOST_PP_LOCAL_C(165) BOOST_PP_LOCAL_MACRO(165) # endif # if BOOST_PP_LOCAL_C(166) BOOST_PP_LOCAL_MACRO(166) # endif # if BOOST_PP_LOCAL_C(167) BOOST_PP_LOCAL_MACRO(167) # endif # if BOOST_PP_LOCAL_C(168) BOOST_PP_LOCAL_MACRO(168) # endif # if BOOST_PP_LOCAL_C(169) BOOST_PP_LOCAL_MACRO(169) # endif # if BOOST_PP_LOCAL_C(170) BOOST_PP_LOCAL_MACRO(170) # endif # if BOOST_PP_LOCAL_C(171) BOOST_PP_LOCAL_MACRO(171) # endif # if BOOST_PP_LOCAL_C(172) BOOST_PP_LOCAL_MACRO(172) # endif # if BOOST_PP_LOCAL_C(173) BOOST_PP_LOCAL_MACRO(173) # endif # if BOOST_PP_LOCAL_C(174) BOOST_PP_LOCAL_MACRO(174) # endif # if BOOST_PP_LOCAL_C(175) BOOST_PP_LOCAL_MACRO(175) # endif # if BOOST_PP_LOCAL_C(176) BOOST_PP_LOCAL_MACRO(176) # endif # if BOOST_PP_LOCAL_C(177) BOOST_PP_LOCAL_MACRO(177) # endif # if BOOST_PP_LOCAL_C(178) BOOST_PP_LOCAL_MACRO(178) # endif # if BOOST_PP_LOCAL_C(179) BOOST_PP_LOCAL_MACRO(179) # endif # if BOOST_PP_LOCAL_C(180) BOOST_PP_LOCAL_MACRO(180) # endif # if BOOST_PP_LOCAL_C(181) BOOST_PP_LOCAL_MACRO(181) # endif # if BOOST_PP_LOCAL_C(182) BOOST_PP_LOCAL_MACRO(182) # endif # if BOOST_PP_LOCAL_C(183) BOOST_PP_LOCAL_MACRO(183) # endif # if BOOST_PP_LOCAL_C(184) BOOST_PP_LOCAL_MACRO(184) # endif # if BOOST_PP_LOCAL_C(185) BOOST_PP_LOCAL_MACRO(185) # endif # if BOOST_PP_LOCAL_C(186) BOOST_PP_LOCAL_MACRO(186) # endif # if BOOST_PP_LOCAL_C(187) BOOST_PP_LOCAL_MACRO(187) # endif # if BOOST_PP_LOCAL_C(188) BOOST_PP_LOCAL_MACRO(188) # endif # if BOOST_PP_LOCAL_C(189) BOOST_PP_LOCAL_MACRO(189) # endif # if BOOST_PP_LOCAL_C(190) BOOST_PP_LOCAL_MACRO(190) # endif # if BOOST_PP_LOCAL_C(191) BOOST_PP_LOCAL_MACRO(191) # endif # if BOOST_PP_LOCAL_C(192) BOOST_PP_LOCAL_MACRO(192) # endif # if BOOST_PP_LOCAL_C(193) BOOST_PP_LOCAL_MACRO(193) # endif # if BOOST_PP_LOCAL_C(194) BOOST_PP_LOCAL_MACRO(194) # endif # if BOOST_PP_LOCAL_C(195) BOOST_PP_LOCAL_MACRO(195) # endif # if BOOST_PP_LOCAL_C(196) BOOST_PP_LOCAL_MACRO(196) # endif # if BOOST_PP_LOCAL_C(197) BOOST_PP_LOCAL_MACRO(197) # endif # if BOOST_PP_LOCAL_C(198) BOOST_PP_LOCAL_MACRO(198) # endif # if BOOST_PP_LOCAL_C(199) BOOST_PP_LOCAL_MACRO(199) # endif # if BOOST_PP_LOCAL_C(200) BOOST_PP_LOCAL_MACRO(200) # endif # if BOOST_PP_LOCAL_C(201) BOOST_PP_LOCAL_MACRO(201) # endif # if BOOST_PP_LOCAL_C(202) BOOST_PP_LOCAL_MACRO(202) # endif # if BOOST_PP_LOCAL_C(203) BOOST_PP_LOCAL_MACRO(203) # endif # if BOOST_PP_LOCAL_C(204) BOOST_PP_LOCAL_MACRO(204) # endif # if BOOST_PP_LOCAL_C(205) BOOST_PP_LOCAL_MACRO(205) # endif # if BOOST_PP_LOCAL_C(206) BOOST_PP_LOCAL_MACRO(206) # endif # if BOOST_PP_LOCAL_C(207) BOOST_PP_LOCAL_MACRO(207) # endif # if BOOST_PP_LOCAL_C(208) BOOST_PP_LOCAL_MACRO(208) # endif # if BOOST_PP_LOCAL_C(209) BOOST_PP_LOCAL_MACRO(209) # endif # if BOOST_PP_LOCAL_C(210) BOOST_PP_LOCAL_MACRO(210) # endif # if BOOST_PP_LOCAL_C(211) BOOST_PP_LOCAL_MACRO(211) # endif # if BOOST_PP_LOCAL_C(212) BOOST_PP_LOCAL_MACRO(212) # endif # if BOOST_PP_LOCAL_C(213) BOOST_PP_LOCAL_MACRO(213) # endif # if BOOST_PP_LOCAL_C(214) BOOST_PP_LOCAL_MACRO(214) # endif # if BOOST_PP_LOCAL_C(215) BOOST_PP_LOCAL_MACRO(215) # endif # if BOOST_PP_LOCAL_C(216) BOOST_PP_LOCAL_MACRO(216) # endif # if BOOST_PP_LOCAL_C(217) BOOST_PP_LOCAL_MACRO(217) # endif # if BOOST_PP_LOCAL_C(218) BOOST_PP_LOCAL_MACRO(218) # endif # if BOOST_PP_LOCAL_C(219) BOOST_PP_LOCAL_MACRO(219) # endif # if BOOST_PP_LOCAL_C(220) BOOST_PP_LOCAL_MACRO(220) # endif # if BOOST_PP_LOCAL_C(221) BOOST_PP_LOCAL_MACRO(221) # endif # if BOOST_PP_LOCAL_C(222) BOOST_PP_LOCAL_MACRO(222) # endif # if BOOST_PP_LOCAL_C(223) BOOST_PP_LOCAL_MACRO(223) # endif # if BOOST_PP_LOCAL_C(224) BOOST_PP_LOCAL_MACRO(224) # endif # if BOOST_PP_LOCAL_C(225) BOOST_PP_LOCAL_MACRO(225) # endif # if BOOST_PP_LOCAL_C(226) BOOST_PP_LOCAL_MACRO(226) # endif # if BOOST_PP_LOCAL_C(227) BOOST_PP_LOCAL_MACRO(227) # endif # if BOOST_PP_LOCAL_C(228) BOOST_PP_LOCAL_MACRO(228) # endif # if BOOST_PP_LOCAL_C(229) BOOST_PP_LOCAL_MACRO(229) # endif # if BOOST_PP_LOCAL_C(230) BOOST_PP_LOCAL_MACRO(230) # endif # if BOOST_PP_LOCAL_C(231) BOOST_PP_LOCAL_MACRO(231) # endif # if BOOST_PP_LOCAL_C(232) BOOST_PP_LOCAL_MACRO(232) # endif # if BOOST_PP_LOCAL_C(233) BOOST_PP_LOCAL_MACRO(233) # endif # if BOOST_PP_LOCAL_C(234) BOOST_PP_LOCAL_MACRO(234) # endif # if BOOST_PP_LOCAL_C(235) BOOST_PP_LOCAL_MACRO(235) # endif # if BOOST_PP_LOCAL_C(236) BOOST_PP_LOCAL_MACRO(236) # endif # if BOOST_PP_LOCAL_C(237) BOOST_PP_LOCAL_MACRO(237) # endif # if BOOST_PP_LOCAL_C(238) BOOST_PP_LOCAL_MACRO(238) # endif # if BOOST_PP_LOCAL_C(239) BOOST_PP_LOCAL_MACRO(239) # endif # if BOOST_PP_LOCAL_C(240) BOOST_PP_LOCAL_MACRO(240) # endif # if BOOST_PP_LOCAL_C(241) BOOST_PP_LOCAL_MACRO(241) # endif # if BOOST_PP_LOCAL_C(242) BOOST_PP_LOCAL_MACRO(242) # endif # if BOOST_PP_LOCAL_C(243) BOOST_PP_LOCAL_MACRO(243) # endif # if BOOST_PP_LOCAL_C(244) BOOST_PP_LOCAL_MACRO(244) # endif # if BOOST_PP_LOCAL_C(245) BOOST_PP_LOCAL_MACRO(245) # endif # if BOOST_PP_LOCAL_C(246) BOOST_PP_LOCAL_MACRO(246) # endif # if BOOST_PP_LOCAL_C(247) BOOST_PP_LOCAL_MACRO(247) # endif # if BOOST_PP_LOCAL_C(248) BOOST_PP_LOCAL_MACRO(248) # endif # if BOOST_PP_LOCAL_C(249) BOOST_PP_LOCAL_MACRO(249) # endif # if BOOST_PP_LOCAL_C(250) BOOST_PP_LOCAL_MACRO(250) # endif # if BOOST_PP_LOCAL_C(251) BOOST_PP_LOCAL_MACRO(251) # endif # if BOOST_PP_LOCAL_C(252) BOOST_PP_LOCAL_MACRO(252) # endif # if BOOST_PP_LOCAL_C(253) BOOST_PP_LOCAL_MACRO(253) # endif # if BOOST_PP_LOCAL_C(254) BOOST_PP_LOCAL_MACRO(254) # endif # if BOOST_PP_LOCAL_C(255) BOOST_PP_LOCAL_MACRO(255) # endif # if BOOST_PP_LOCAL_C(256) BOOST_PP_LOCAL_MACRO(256) # endif # endif # # undef BOOST_PP_LOCAL_LIMITS # # undef BOOST_PP_LOCAL_S # undef BOOST_PP_LOCAL_F # # undef BOOST_PP_LOCAL_MACRO ================================================ FILE: benchmarks/boost/preprocessor/iteration/detail/rlocal.hpp ================================================ # /* ************************************************************************** # * * # * (C) Copyright Paul Mensonides 2002. # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # * * # ************************************************************************** */ # # /* See http://www.boost.org for most recent version. */ # # if BOOST_PP_LOCAL_R(256) BOOST_PP_LOCAL_MACRO(256) # endif # if BOOST_PP_LOCAL_R(255) BOOST_PP_LOCAL_MACRO(255) # endif # if BOOST_PP_LOCAL_R(254) BOOST_PP_LOCAL_MACRO(254) # endif # if BOOST_PP_LOCAL_R(253) BOOST_PP_LOCAL_MACRO(253) # endif # if BOOST_PP_LOCAL_R(252) BOOST_PP_LOCAL_MACRO(252) # endif # if BOOST_PP_LOCAL_R(251) BOOST_PP_LOCAL_MACRO(251) # endif # if BOOST_PP_LOCAL_R(250) BOOST_PP_LOCAL_MACRO(250) # endif # if BOOST_PP_LOCAL_R(249) BOOST_PP_LOCAL_MACRO(249) # endif # if BOOST_PP_LOCAL_R(248) BOOST_PP_LOCAL_MACRO(248) # endif # if BOOST_PP_LOCAL_R(247) BOOST_PP_LOCAL_MACRO(247) # endif # if BOOST_PP_LOCAL_R(246) BOOST_PP_LOCAL_MACRO(246) # endif # if BOOST_PP_LOCAL_R(245) BOOST_PP_LOCAL_MACRO(245) # endif # if BOOST_PP_LOCAL_R(244) BOOST_PP_LOCAL_MACRO(244) # endif # if BOOST_PP_LOCAL_R(243) BOOST_PP_LOCAL_MACRO(243) # endif # if BOOST_PP_LOCAL_R(242) BOOST_PP_LOCAL_MACRO(242) # endif # if BOOST_PP_LOCAL_R(241) BOOST_PP_LOCAL_MACRO(241) # endif # if BOOST_PP_LOCAL_R(240) BOOST_PP_LOCAL_MACRO(240) # endif # if BOOST_PP_LOCAL_R(239) BOOST_PP_LOCAL_MACRO(239) # endif # if BOOST_PP_LOCAL_R(238) BOOST_PP_LOCAL_MACRO(238) # endif # if BOOST_PP_LOCAL_R(237) BOOST_PP_LOCAL_MACRO(237) # endif # if BOOST_PP_LOCAL_R(236) BOOST_PP_LOCAL_MACRO(236) # endif # if BOOST_PP_LOCAL_R(235) BOOST_PP_LOCAL_MACRO(235) # endif # if BOOST_PP_LOCAL_R(234) BOOST_PP_LOCAL_MACRO(234) # endif # if BOOST_PP_LOCAL_R(233) BOOST_PP_LOCAL_MACRO(233) # endif # if BOOST_PP_LOCAL_R(232) BOOST_PP_LOCAL_MACRO(232) # endif # if BOOST_PP_LOCAL_R(231) BOOST_PP_LOCAL_MACRO(231) # endif # if BOOST_PP_LOCAL_R(230) BOOST_PP_LOCAL_MACRO(230) # endif # if BOOST_PP_LOCAL_R(229) BOOST_PP_LOCAL_MACRO(229) # endif # if BOOST_PP_LOCAL_R(228) BOOST_PP_LOCAL_MACRO(228) # endif # if BOOST_PP_LOCAL_R(227) BOOST_PP_LOCAL_MACRO(227) # endif # if BOOST_PP_LOCAL_R(226) BOOST_PP_LOCAL_MACRO(226) # endif # if BOOST_PP_LOCAL_R(225) BOOST_PP_LOCAL_MACRO(225) # endif # if BOOST_PP_LOCAL_R(224) BOOST_PP_LOCAL_MACRO(224) # endif # if BOOST_PP_LOCAL_R(223) BOOST_PP_LOCAL_MACRO(223) # endif # if BOOST_PP_LOCAL_R(222) BOOST_PP_LOCAL_MACRO(222) # endif # if BOOST_PP_LOCAL_R(221) BOOST_PP_LOCAL_MACRO(221) # endif # if BOOST_PP_LOCAL_R(220) BOOST_PP_LOCAL_MACRO(220) # endif # if BOOST_PP_LOCAL_R(219) BOOST_PP_LOCAL_MACRO(219) # endif # if BOOST_PP_LOCAL_R(218) BOOST_PP_LOCAL_MACRO(218) # endif # if BOOST_PP_LOCAL_R(217) BOOST_PP_LOCAL_MACRO(217) # endif # if BOOST_PP_LOCAL_R(216) BOOST_PP_LOCAL_MACRO(216) # endif # if BOOST_PP_LOCAL_R(215) BOOST_PP_LOCAL_MACRO(215) # endif # if BOOST_PP_LOCAL_R(214) BOOST_PP_LOCAL_MACRO(214) # endif # if BOOST_PP_LOCAL_R(213) BOOST_PP_LOCAL_MACRO(213) # endif # if BOOST_PP_LOCAL_R(212) BOOST_PP_LOCAL_MACRO(212) # endif # if BOOST_PP_LOCAL_R(211) BOOST_PP_LOCAL_MACRO(211) # endif # if BOOST_PP_LOCAL_R(210) BOOST_PP_LOCAL_MACRO(210) # endif # if BOOST_PP_LOCAL_R(209) BOOST_PP_LOCAL_MACRO(209) # endif # if BOOST_PP_LOCAL_R(208) BOOST_PP_LOCAL_MACRO(208) # endif # if BOOST_PP_LOCAL_R(207) BOOST_PP_LOCAL_MACRO(207) # endif # if BOOST_PP_LOCAL_R(206) BOOST_PP_LOCAL_MACRO(206) # endif # if BOOST_PP_LOCAL_R(205) BOOST_PP_LOCAL_MACRO(205) # endif # if BOOST_PP_LOCAL_R(204) BOOST_PP_LOCAL_MACRO(204) # endif # if BOOST_PP_LOCAL_R(203) BOOST_PP_LOCAL_MACRO(203) # endif # if BOOST_PP_LOCAL_R(202) BOOST_PP_LOCAL_MACRO(202) # endif # if BOOST_PP_LOCAL_R(201) BOOST_PP_LOCAL_MACRO(201) # endif # if BOOST_PP_LOCAL_R(200) BOOST_PP_LOCAL_MACRO(200) # endif # if BOOST_PP_LOCAL_R(199) BOOST_PP_LOCAL_MACRO(199) # endif # if BOOST_PP_LOCAL_R(198) BOOST_PP_LOCAL_MACRO(198) # endif # if BOOST_PP_LOCAL_R(197) BOOST_PP_LOCAL_MACRO(197) # endif # if BOOST_PP_LOCAL_R(196) BOOST_PP_LOCAL_MACRO(196) # endif # if BOOST_PP_LOCAL_R(195) BOOST_PP_LOCAL_MACRO(195) # endif # if BOOST_PP_LOCAL_R(194) BOOST_PP_LOCAL_MACRO(194) # endif # if BOOST_PP_LOCAL_R(193) BOOST_PP_LOCAL_MACRO(193) # endif # if BOOST_PP_LOCAL_R(192) BOOST_PP_LOCAL_MACRO(192) # endif # if BOOST_PP_LOCAL_R(191) BOOST_PP_LOCAL_MACRO(191) # endif # if BOOST_PP_LOCAL_R(190) BOOST_PP_LOCAL_MACRO(190) # endif # if BOOST_PP_LOCAL_R(189) BOOST_PP_LOCAL_MACRO(189) # endif # if BOOST_PP_LOCAL_R(188) BOOST_PP_LOCAL_MACRO(188) # endif # if BOOST_PP_LOCAL_R(187) BOOST_PP_LOCAL_MACRO(187) # endif # if BOOST_PP_LOCAL_R(186) BOOST_PP_LOCAL_MACRO(186) # endif # if BOOST_PP_LOCAL_R(185) BOOST_PP_LOCAL_MACRO(185) # endif # if BOOST_PP_LOCAL_R(184) BOOST_PP_LOCAL_MACRO(184) # endif # if BOOST_PP_LOCAL_R(183) BOOST_PP_LOCAL_MACRO(183) # endif # if BOOST_PP_LOCAL_R(182) BOOST_PP_LOCAL_MACRO(182) # endif # if BOOST_PP_LOCAL_R(181) BOOST_PP_LOCAL_MACRO(181) # endif # if BOOST_PP_LOCAL_R(180) BOOST_PP_LOCAL_MACRO(180) # endif # if BOOST_PP_LOCAL_R(179) BOOST_PP_LOCAL_MACRO(179) # endif # if BOOST_PP_LOCAL_R(178) BOOST_PP_LOCAL_MACRO(178) # endif # if BOOST_PP_LOCAL_R(177) BOOST_PP_LOCAL_MACRO(177) # endif # if BOOST_PP_LOCAL_R(176) BOOST_PP_LOCAL_MACRO(176) # endif # if BOOST_PP_LOCAL_R(175) BOOST_PP_LOCAL_MACRO(175) # endif # if BOOST_PP_LOCAL_R(174) BOOST_PP_LOCAL_MACRO(174) # endif # if BOOST_PP_LOCAL_R(173) BOOST_PP_LOCAL_MACRO(173) # endif # if BOOST_PP_LOCAL_R(172) BOOST_PP_LOCAL_MACRO(172) # endif # if BOOST_PP_LOCAL_R(171) BOOST_PP_LOCAL_MACRO(171) # endif # if BOOST_PP_LOCAL_R(170) BOOST_PP_LOCAL_MACRO(170) # endif # if BOOST_PP_LOCAL_R(169) BOOST_PP_LOCAL_MACRO(169) # endif # if BOOST_PP_LOCAL_R(168) BOOST_PP_LOCAL_MACRO(168) # endif # if BOOST_PP_LOCAL_R(167) BOOST_PP_LOCAL_MACRO(167) # endif # if BOOST_PP_LOCAL_R(166) BOOST_PP_LOCAL_MACRO(166) # endif # if BOOST_PP_LOCAL_R(165) BOOST_PP_LOCAL_MACRO(165) # endif # if BOOST_PP_LOCAL_R(164) BOOST_PP_LOCAL_MACRO(164) # endif # if BOOST_PP_LOCAL_R(163) BOOST_PP_LOCAL_MACRO(163) # endif # if BOOST_PP_LOCAL_R(162) BOOST_PP_LOCAL_MACRO(162) # endif # if BOOST_PP_LOCAL_R(161) BOOST_PP_LOCAL_MACRO(161) # endif # if BOOST_PP_LOCAL_R(160) BOOST_PP_LOCAL_MACRO(160) # endif # if BOOST_PP_LOCAL_R(159) BOOST_PP_LOCAL_MACRO(159) # endif # if BOOST_PP_LOCAL_R(158) BOOST_PP_LOCAL_MACRO(158) # endif # if BOOST_PP_LOCAL_R(157) BOOST_PP_LOCAL_MACRO(157) # endif # if BOOST_PP_LOCAL_R(156) BOOST_PP_LOCAL_MACRO(156) # endif # if BOOST_PP_LOCAL_R(155) BOOST_PP_LOCAL_MACRO(155) # endif # if BOOST_PP_LOCAL_R(154) BOOST_PP_LOCAL_MACRO(154) # endif # if BOOST_PP_LOCAL_R(153) BOOST_PP_LOCAL_MACRO(153) # endif # if BOOST_PP_LOCAL_R(152) BOOST_PP_LOCAL_MACRO(152) # endif # if BOOST_PP_LOCAL_R(151) BOOST_PP_LOCAL_MACRO(151) # endif # if BOOST_PP_LOCAL_R(150) BOOST_PP_LOCAL_MACRO(150) # endif # if BOOST_PP_LOCAL_R(149) BOOST_PP_LOCAL_MACRO(149) # endif # if BOOST_PP_LOCAL_R(148) BOOST_PP_LOCAL_MACRO(148) # endif # if BOOST_PP_LOCAL_R(147) BOOST_PP_LOCAL_MACRO(147) # endif # if BOOST_PP_LOCAL_R(146) BOOST_PP_LOCAL_MACRO(146) # endif # if BOOST_PP_LOCAL_R(145) BOOST_PP_LOCAL_MACRO(145) # endif # if BOOST_PP_LOCAL_R(144) BOOST_PP_LOCAL_MACRO(144) # endif # if BOOST_PP_LOCAL_R(143) BOOST_PP_LOCAL_MACRO(143) # endif # if BOOST_PP_LOCAL_R(142) BOOST_PP_LOCAL_MACRO(142) # endif # if BOOST_PP_LOCAL_R(141) BOOST_PP_LOCAL_MACRO(141) # endif # if BOOST_PP_LOCAL_R(140) BOOST_PP_LOCAL_MACRO(140) # endif # if BOOST_PP_LOCAL_R(139) BOOST_PP_LOCAL_MACRO(139) # endif # if BOOST_PP_LOCAL_R(138) BOOST_PP_LOCAL_MACRO(138) # endif # if BOOST_PP_LOCAL_R(137) BOOST_PP_LOCAL_MACRO(137) # endif # if BOOST_PP_LOCAL_R(136) BOOST_PP_LOCAL_MACRO(136) # endif # if BOOST_PP_LOCAL_R(135) BOOST_PP_LOCAL_MACRO(135) # endif # if BOOST_PP_LOCAL_R(134) BOOST_PP_LOCAL_MACRO(134) # endif # if BOOST_PP_LOCAL_R(133) BOOST_PP_LOCAL_MACRO(133) # endif # if BOOST_PP_LOCAL_R(132) BOOST_PP_LOCAL_MACRO(132) # endif # if BOOST_PP_LOCAL_R(131) BOOST_PP_LOCAL_MACRO(131) # endif # if BOOST_PP_LOCAL_R(130) BOOST_PP_LOCAL_MACRO(130) # endif # if BOOST_PP_LOCAL_R(129) BOOST_PP_LOCAL_MACRO(129) # endif # if BOOST_PP_LOCAL_R(128) BOOST_PP_LOCAL_MACRO(128) # endif # if BOOST_PP_LOCAL_R(127) BOOST_PP_LOCAL_MACRO(127) # endif # if BOOST_PP_LOCAL_R(126) BOOST_PP_LOCAL_MACRO(126) # endif # if BOOST_PP_LOCAL_R(125) BOOST_PP_LOCAL_MACRO(125) # endif # if BOOST_PP_LOCAL_R(124) BOOST_PP_LOCAL_MACRO(124) # endif # if BOOST_PP_LOCAL_R(123) BOOST_PP_LOCAL_MACRO(123) # endif # if BOOST_PP_LOCAL_R(122) BOOST_PP_LOCAL_MACRO(122) # endif # if BOOST_PP_LOCAL_R(121) BOOST_PP_LOCAL_MACRO(121) # endif # if BOOST_PP_LOCAL_R(120) BOOST_PP_LOCAL_MACRO(120) # endif # if BOOST_PP_LOCAL_R(119) BOOST_PP_LOCAL_MACRO(119) # endif # if BOOST_PP_LOCAL_R(118) BOOST_PP_LOCAL_MACRO(118) # endif # if BOOST_PP_LOCAL_R(117) BOOST_PP_LOCAL_MACRO(117) # endif # if BOOST_PP_LOCAL_R(116) BOOST_PP_LOCAL_MACRO(116) # endif # if BOOST_PP_LOCAL_R(115) BOOST_PP_LOCAL_MACRO(115) # endif # if BOOST_PP_LOCAL_R(114) BOOST_PP_LOCAL_MACRO(114) # endif # if BOOST_PP_LOCAL_R(113) BOOST_PP_LOCAL_MACRO(113) # endif # if BOOST_PP_LOCAL_R(112) BOOST_PP_LOCAL_MACRO(112) # endif # if BOOST_PP_LOCAL_R(111) BOOST_PP_LOCAL_MACRO(111) # endif # if BOOST_PP_LOCAL_R(110) BOOST_PP_LOCAL_MACRO(110) # endif # if BOOST_PP_LOCAL_R(109) BOOST_PP_LOCAL_MACRO(109) # endif # if BOOST_PP_LOCAL_R(108) BOOST_PP_LOCAL_MACRO(108) # endif # if BOOST_PP_LOCAL_R(107) BOOST_PP_LOCAL_MACRO(107) # endif # if BOOST_PP_LOCAL_R(106) BOOST_PP_LOCAL_MACRO(106) # endif # if BOOST_PP_LOCAL_R(105) BOOST_PP_LOCAL_MACRO(105) # endif # if BOOST_PP_LOCAL_R(104) BOOST_PP_LOCAL_MACRO(104) # endif # if BOOST_PP_LOCAL_R(103) BOOST_PP_LOCAL_MACRO(103) # endif # if BOOST_PP_LOCAL_R(102) BOOST_PP_LOCAL_MACRO(102) # endif # if BOOST_PP_LOCAL_R(101) BOOST_PP_LOCAL_MACRO(101) # endif # if BOOST_PP_LOCAL_R(100) BOOST_PP_LOCAL_MACRO(100) # endif # if BOOST_PP_LOCAL_R(99) BOOST_PP_LOCAL_MACRO(99) # endif # if BOOST_PP_LOCAL_R(98) BOOST_PP_LOCAL_MACRO(98) # endif # if BOOST_PP_LOCAL_R(97) BOOST_PP_LOCAL_MACRO(97) # endif # if BOOST_PP_LOCAL_R(96) BOOST_PP_LOCAL_MACRO(96) # endif # if BOOST_PP_LOCAL_R(95) BOOST_PP_LOCAL_MACRO(95) # endif # if BOOST_PP_LOCAL_R(94) BOOST_PP_LOCAL_MACRO(94) # endif # if BOOST_PP_LOCAL_R(93) BOOST_PP_LOCAL_MACRO(93) # endif # if BOOST_PP_LOCAL_R(92) BOOST_PP_LOCAL_MACRO(92) # endif # if BOOST_PP_LOCAL_R(91) BOOST_PP_LOCAL_MACRO(91) # endif # if BOOST_PP_LOCAL_R(90) BOOST_PP_LOCAL_MACRO(90) # endif # if BOOST_PP_LOCAL_R(89) BOOST_PP_LOCAL_MACRO(89) # endif # if BOOST_PP_LOCAL_R(88) BOOST_PP_LOCAL_MACRO(88) # endif # if BOOST_PP_LOCAL_R(87) BOOST_PP_LOCAL_MACRO(87) # endif # if BOOST_PP_LOCAL_R(86) BOOST_PP_LOCAL_MACRO(86) # endif # if BOOST_PP_LOCAL_R(85) BOOST_PP_LOCAL_MACRO(85) # endif # if BOOST_PP_LOCAL_R(84) BOOST_PP_LOCAL_MACRO(84) # endif # if BOOST_PP_LOCAL_R(83) BOOST_PP_LOCAL_MACRO(83) # endif # if BOOST_PP_LOCAL_R(82) BOOST_PP_LOCAL_MACRO(82) # endif # if BOOST_PP_LOCAL_R(81) BOOST_PP_LOCAL_MACRO(81) # endif # if BOOST_PP_LOCAL_R(80) BOOST_PP_LOCAL_MACRO(80) # endif # if BOOST_PP_LOCAL_R(79) BOOST_PP_LOCAL_MACRO(79) # endif # if BOOST_PP_LOCAL_R(78) BOOST_PP_LOCAL_MACRO(78) # endif # if BOOST_PP_LOCAL_R(77) BOOST_PP_LOCAL_MACRO(77) # endif # if BOOST_PP_LOCAL_R(76) BOOST_PP_LOCAL_MACRO(76) # endif # if BOOST_PP_LOCAL_R(75) BOOST_PP_LOCAL_MACRO(75) # endif # if BOOST_PP_LOCAL_R(74) BOOST_PP_LOCAL_MACRO(74) # endif # if BOOST_PP_LOCAL_R(73) BOOST_PP_LOCAL_MACRO(73) # endif # if BOOST_PP_LOCAL_R(72) BOOST_PP_LOCAL_MACRO(72) # endif # if BOOST_PP_LOCAL_R(71) BOOST_PP_LOCAL_MACRO(71) # endif # if BOOST_PP_LOCAL_R(70) BOOST_PP_LOCAL_MACRO(70) # endif # if BOOST_PP_LOCAL_R(69) BOOST_PP_LOCAL_MACRO(69) # endif # if BOOST_PP_LOCAL_R(68) BOOST_PP_LOCAL_MACRO(68) # endif # if BOOST_PP_LOCAL_R(67) BOOST_PP_LOCAL_MACRO(67) # endif # if BOOST_PP_LOCAL_R(66) BOOST_PP_LOCAL_MACRO(66) # endif # if BOOST_PP_LOCAL_R(65) BOOST_PP_LOCAL_MACRO(65) # endif # if BOOST_PP_LOCAL_R(64) BOOST_PP_LOCAL_MACRO(64) # endif # if BOOST_PP_LOCAL_R(63) BOOST_PP_LOCAL_MACRO(63) # endif # if BOOST_PP_LOCAL_R(62) BOOST_PP_LOCAL_MACRO(62) # endif # if BOOST_PP_LOCAL_R(61) BOOST_PP_LOCAL_MACRO(61) # endif # if BOOST_PP_LOCAL_R(60) BOOST_PP_LOCAL_MACRO(60) # endif # if BOOST_PP_LOCAL_R(59) BOOST_PP_LOCAL_MACRO(59) # endif # if BOOST_PP_LOCAL_R(58) BOOST_PP_LOCAL_MACRO(58) # endif # if BOOST_PP_LOCAL_R(57) BOOST_PP_LOCAL_MACRO(57) # endif # if BOOST_PP_LOCAL_R(56) BOOST_PP_LOCAL_MACRO(56) # endif # if BOOST_PP_LOCAL_R(55) BOOST_PP_LOCAL_MACRO(55) # endif # if BOOST_PP_LOCAL_R(54) BOOST_PP_LOCAL_MACRO(54) # endif # if BOOST_PP_LOCAL_R(53) BOOST_PP_LOCAL_MACRO(53) # endif # if BOOST_PP_LOCAL_R(52) BOOST_PP_LOCAL_MACRO(52) # endif # if BOOST_PP_LOCAL_R(51) BOOST_PP_LOCAL_MACRO(51) # endif # if BOOST_PP_LOCAL_R(50) BOOST_PP_LOCAL_MACRO(50) # endif # if BOOST_PP_LOCAL_R(49) BOOST_PP_LOCAL_MACRO(49) # endif # if BOOST_PP_LOCAL_R(48) BOOST_PP_LOCAL_MACRO(48) # endif # if BOOST_PP_LOCAL_R(47) BOOST_PP_LOCAL_MACRO(47) # endif # if BOOST_PP_LOCAL_R(46) BOOST_PP_LOCAL_MACRO(46) # endif # if BOOST_PP_LOCAL_R(45) BOOST_PP_LOCAL_MACRO(45) # endif # if BOOST_PP_LOCAL_R(44) BOOST_PP_LOCAL_MACRO(44) # endif # if BOOST_PP_LOCAL_R(43) BOOST_PP_LOCAL_MACRO(43) # endif # if BOOST_PP_LOCAL_R(42) BOOST_PP_LOCAL_MACRO(42) # endif # if BOOST_PP_LOCAL_R(41) BOOST_PP_LOCAL_MACRO(41) # endif # if BOOST_PP_LOCAL_R(40) BOOST_PP_LOCAL_MACRO(40) # endif # if BOOST_PP_LOCAL_R(39) BOOST_PP_LOCAL_MACRO(39) # endif # if BOOST_PP_LOCAL_R(38) BOOST_PP_LOCAL_MACRO(38) # endif # if BOOST_PP_LOCAL_R(37) BOOST_PP_LOCAL_MACRO(37) # endif # if BOOST_PP_LOCAL_R(36) BOOST_PP_LOCAL_MACRO(36) # endif # if BOOST_PP_LOCAL_R(35) BOOST_PP_LOCAL_MACRO(35) # endif # if BOOST_PP_LOCAL_R(34) BOOST_PP_LOCAL_MACRO(34) # endif # if BOOST_PP_LOCAL_R(33) BOOST_PP_LOCAL_MACRO(33) # endif # if BOOST_PP_LOCAL_R(32) BOOST_PP_LOCAL_MACRO(32) # endif # if BOOST_PP_LOCAL_R(31) BOOST_PP_LOCAL_MACRO(31) # endif # if BOOST_PP_LOCAL_R(30) BOOST_PP_LOCAL_MACRO(30) # endif # if BOOST_PP_LOCAL_R(29) BOOST_PP_LOCAL_MACRO(29) # endif # if BOOST_PP_LOCAL_R(28) BOOST_PP_LOCAL_MACRO(28) # endif # if BOOST_PP_LOCAL_R(27) BOOST_PP_LOCAL_MACRO(27) # endif # if BOOST_PP_LOCAL_R(26) BOOST_PP_LOCAL_MACRO(26) # endif # if BOOST_PP_LOCAL_R(25) BOOST_PP_LOCAL_MACRO(25) # endif # if BOOST_PP_LOCAL_R(24) BOOST_PP_LOCAL_MACRO(24) # endif # if BOOST_PP_LOCAL_R(23) BOOST_PP_LOCAL_MACRO(23) # endif # if BOOST_PP_LOCAL_R(22) BOOST_PP_LOCAL_MACRO(22) # endif # if BOOST_PP_LOCAL_R(21) BOOST_PP_LOCAL_MACRO(21) # endif # if BOOST_PP_LOCAL_R(20) BOOST_PP_LOCAL_MACRO(20) # endif # if BOOST_PP_LOCAL_R(19) BOOST_PP_LOCAL_MACRO(19) # endif # if BOOST_PP_LOCAL_R(18) BOOST_PP_LOCAL_MACRO(18) # endif # if BOOST_PP_LOCAL_R(17) BOOST_PP_LOCAL_MACRO(17) # endif # if BOOST_PP_LOCAL_R(16) BOOST_PP_LOCAL_MACRO(16) # endif # if BOOST_PP_LOCAL_R(15) BOOST_PP_LOCAL_MACRO(15) # endif # if BOOST_PP_LOCAL_R(14) BOOST_PP_LOCAL_MACRO(14) # endif # if BOOST_PP_LOCAL_R(13) BOOST_PP_LOCAL_MACRO(13) # endif # if BOOST_PP_LOCAL_R(12) BOOST_PP_LOCAL_MACRO(12) # endif # if BOOST_PP_LOCAL_R(11) BOOST_PP_LOCAL_MACRO(11) # endif # if BOOST_PP_LOCAL_R(10) BOOST_PP_LOCAL_MACRO(10) # endif # if BOOST_PP_LOCAL_R(9) BOOST_PP_LOCAL_MACRO(9) # endif # if BOOST_PP_LOCAL_R(8) BOOST_PP_LOCAL_MACRO(8) # endif # if BOOST_PP_LOCAL_R(7) BOOST_PP_LOCAL_MACRO(7) # endif # if BOOST_PP_LOCAL_R(6) BOOST_PP_LOCAL_MACRO(6) # endif # if BOOST_PP_LOCAL_R(5) BOOST_PP_LOCAL_MACRO(5) # endif # if BOOST_PP_LOCAL_R(4) BOOST_PP_LOCAL_MACRO(4) # endif # if BOOST_PP_LOCAL_R(3) BOOST_PP_LOCAL_MACRO(3) # endif # if BOOST_PP_LOCAL_R(2) BOOST_PP_LOCAL_MACRO(2) # endif # if BOOST_PP_LOCAL_R(1) BOOST_PP_LOCAL_MACRO(1) # endif # if BOOST_PP_LOCAL_R(0) BOOST_PP_LOCAL_MACRO(0) # endif ================================================ FILE: benchmarks/boost/preprocessor/iteration/detail/self.hpp ================================================ # /* ************************************************************************** # * * # * (C) Copyright Paul Mensonides 2002. # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # * * # ************************************************************************** */ # # /* See http://www.boost.org for most recent version. */ # # if !defined(BOOST_PP_INDIRECT_SELF) # error BOOST_PP_ERROR: no indirect file to include # endif # # define BOOST_PP_IS_SELFISH 1 # # include BOOST_PP_INDIRECT_SELF # # undef BOOST_PP_IS_SELFISH # undef BOOST_PP_INDIRECT_SELF ================================================ FILE: benchmarks/boost/preprocessor/iteration/detail/start.hpp ================================================ # /* ************************************************************************** # * * # * (C) Copyright Paul Mensonides 2002. # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # * * # ************************************************************************** */ # # /* See http://www.boost.org for most recent version. */ # # include # # undef BOOST_PP_LOCAL_SE # # undef BOOST_PP_LOCAL_SE_DIGIT_1 # undef BOOST_PP_LOCAL_SE_DIGIT_2 # undef BOOST_PP_LOCAL_SE_DIGIT_3 # undef BOOST_PP_LOCAL_SE_DIGIT_4 # undef BOOST_PP_LOCAL_SE_DIGIT_5 # undef BOOST_PP_LOCAL_SE_DIGIT_6 # undef BOOST_PP_LOCAL_SE_DIGIT_7 # undef BOOST_PP_LOCAL_SE_DIGIT_8 # undef BOOST_PP_LOCAL_SE_DIGIT_9 # undef BOOST_PP_LOCAL_SE_DIGIT_10 # # if BOOST_PP_SLOT_TEMP_3 == 0 # define BOOST_PP_LOCAL_SE_DIGIT_3 0 # elif BOOST_PP_SLOT_TEMP_3 == 1 # define BOOST_PP_LOCAL_SE_DIGIT_3 1 # elif BOOST_PP_SLOT_TEMP_3 == 2 # define BOOST_PP_LOCAL_SE_DIGIT_3 2 # elif BOOST_PP_SLOT_TEMP_3 == 3 # define BOOST_PP_LOCAL_SE_DIGIT_3 3 # elif BOOST_PP_SLOT_TEMP_3 == 4 # define BOOST_PP_LOCAL_SE_DIGIT_3 4 # elif BOOST_PP_SLOT_TEMP_3 == 5 # define BOOST_PP_LOCAL_SE_DIGIT_3 5 # elif BOOST_PP_SLOT_TEMP_3 == 6 # define BOOST_PP_LOCAL_SE_DIGIT_3 6 # elif BOOST_PP_SLOT_TEMP_3 == 7 # define BOOST_PP_LOCAL_SE_DIGIT_3 7 # elif BOOST_PP_SLOT_TEMP_3 == 8 # define BOOST_PP_LOCAL_SE_DIGIT_3 8 # elif BOOST_PP_SLOT_TEMP_3 == 9 # define BOOST_PP_LOCAL_SE_DIGIT_3 9 # endif # # if BOOST_PP_SLOT_TEMP_2 == 0 # define BOOST_PP_LOCAL_SE_DIGIT_2 0 # elif BOOST_PP_SLOT_TEMP_2 == 1 # define BOOST_PP_LOCAL_SE_DIGIT_2 1 # elif BOOST_PP_SLOT_TEMP_2 == 2 # define BOOST_PP_LOCAL_SE_DIGIT_2 2 # elif BOOST_PP_SLOT_TEMP_2 == 3 # define BOOST_PP_LOCAL_SE_DIGIT_2 3 # elif BOOST_PP_SLOT_TEMP_2 == 4 # define BOOST_PP_LOCAL_SE_DIGIT_2 4 # elif BOOST_PP_SLOT_TEMP_2 == 5 # define BOOST_PP_LOCAL_SE_DIGIT_2 5 # elif BOOST_PP_SLOT_TEMP_2 == 6 # define BOOST_PP_LOCAL_SE_DIGIT_2 6 # elif BOOST_PP_SLOT_TEMP_2 == 7 # define BOOST_PP_LOCAL_SE_DIGIT_2 7 # elif BOOST_PP_SLOT_TEMP_2 == 8 # define BOOST_PP_LOCAL_SE_DIGIT_2 8 # elif BOOST_PP_SLOT_TEMP_2 == 9 # define BOOST_PP_LOCAL_SE_DIGIT_2 9 # endif # # if BOOST_PP_SLOT_TEMP_1 == 0 # define BOOST_PP_LOCAL_SE_DIGIT_1 0 # elif BOOST_PP_SLOT_TEMP_1 == 1 # define BOOST_PP_LOCAL_SE_DIGIT_1 1 # elif BOOST_PP_SLOT_TEMP_1 == 2 # define BOOST_PP_LOCAL_SE_DIGIT_1 2 # elif BOOST_PP_SLOT_TEMP_1 == 3 # define BOOST_PP_LOCAL_SE_DIGIT_1 3 # elif BOOST_PP_SLOT_TEMP_1 == 4 # define BOOST_PP_LOCAL_SE_DIGIT_1 4 # elif BOOST_PP_SLOT_TEMP_1 == 5 # define BOOST_PP_LOCAL_SE_DIGIT_1 5 # elif BOOST_PP_SLOT_TEMP_1 == 6 # define BOOST_PP_LOCAL_SE_DIGIT_1 6 # elif BOOST_PP_SLOT_TEMP_1 == 7 # define BOOST_PP_LOCAL_SE_DIGIT_1 7 # elif BOOST_PP_SLOT_TEMP_1 == 8 # define BOOST_PP_LOCAL_SE_DIGIT_1 8 # elif BOOST_PP_SLOT_TEMP_1 == 9 # define BOOST_PP_LOCAL_SE_DIGIT_1 9 # endif # # if BOOST_PP_LOCAL_SE_DIGIT_3 # define BOOST_PP_LOCAL_SE() BOOST_PP_SLOT_CC_3(BOOST_PP_LOCAL_SE_DIGIT_3, BOOST_PP_LOCAL_SE_DIGIT_2, BOOST_PP_LOCAL_SE_DIGIT_1) # elif BOOST_PP_LOCAL_SE_DIGIT_2 # define BOOST_PP_LOCAL_SE() BOOST_PP_SLOT_CC_2(BOOST_PP_LOCAL_SE_DIGIT_2, BOOST_PP_LOCAL_SE_DIGIT_1) # else # define BOOST_PP_LOCAL_SE() BOOST_PP_LOCAL_SE_DIGIT_1 # endif ================================================ FILE: benchmarks/boost/preprocessor/iteration/iterate.hpp ================================================ # /* ************************************************************************** # * * # * (C) Copyright Paul Mensonides 2002. # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # * * # ************************************************************************** */ # # /* See http://www.boost.org for most recent version. */ # # ifndef BOOST_PREPROCESSOR_ITERATION_ITERATE_HPP # define BOOST_PREPROCESSOR_ITERATION_ITERATE_HPP # # include # include # include # include # include # include # include # # /* BOOST_PP_ITERATION_DEPTH */ # # define BOOST_PP_ITERATION_DEPTH() 0 # # /* BOOST_PP_ITERATION */ # # define BOOST_PP_ITERATION() BOOST_PP_CAT(BOOST_PP_ITERATION_, BOOST_PP_ITERATION_DEPTH()) # # /* BOOST_PP_ITERATION_START && BOOST_PP_ITERATION_FINISH */ # # define BOOST_PP_ITERATION_START() BOOST_PP_CAT(BOOST_PP_ITERATION_START_, BOOST_PP_ITERATION_DEPTH()) # define BOOST_PP_ITERATION_FINISH() BOOST_PP_CAT(BOOST_PP_ITERATION_FINISH_, BOOST_PP_ITERATION_DEPTH()) # # /* BOOST_PP_ITERATION_FLAGS */ # # define BOOST_PP_ITERATION_FLAGS() (BOOST_PP_CAT(BOOST_PP_ITERATION_FLAGS_, BOOST_PP_ITERATION_DEPTH())()) # # /* BOOST_PP_FRAME_ITERATION */ # # define BOOST_PP_FRAME_ITERATION(i) BOOST_PP_CAT(BOOST_PP_ITERATION_, i) # # /* BOOST_PP_FRAME_START && BOOST_PP_FRAME_FINISH */ # # define BOOST_PP_FRAME_START(i) BOOST_PP_CAT(BOOST_PP_ITERATION_START_, i) # define BOOST_PP_FRAME_FINISH(i) BOOST_PP_CAT(BOOST_PP_ITERATION_FINISH_, i) # # /* BOOST_PP_FRAME_FLAGS */ # # define BOOST_PP_FRAME_FLAGS(i) (BOOST_PP_CAT(BOOST_PP_ITERATION_FLAGS_, i)()) # # /* BOOST_PP_RELATIVE_ITERATION */ # # define BOOST_PP_RELATIVE_ITERATION(i) BOOST_PP_CAT(BOOST_PP_RELATIVE_, i)(BOOST_PP_ITERATION_) # # define BOOST_PP_RELATIVE_0(m) BOOST_PP_CAT(m, BOOST_PP_ITERATION_DEPTH()) # define BOOST_PP_RELATIVE_1(m) BOOST_PP_CAT(m, BOOST_PP_DEC(BOOST_PP_ITERATION_DEPTH())) # define BOOST_PP_RELATIVE_2(m) BOOST_PP_CAT(m, BOOST_PP_DEC(BOOST_PP_DEC(BOOST_PP_ITERATION_DEPTH()))) # define BOOST_PP_RELATIVE_3(m) BOOST_PP_CAT(m, BOOST_PP_DEC(BOOST_PP_DEC(BOOST_PP_DEC(BOOST_PP_ITERATION_DEPTH())))) # define BOOST_PP_RELATIVE_4(m) BOOST_PP_CAT(m, BOOST_PP_DEC(BOOST_PP_DEC(BOOST_PP_DEC(BOOST_PP_DEC(BOOST_PP_ITERATION_DEPTH()))))) # # /* BOOST_PP_RELATIVE_START && BOOST_PP_RELATIVE_FINISH */ # # define BOOST_PP_RELATIVE_START(i) BOOST_PP_CAT(BOOST_PP_RELATIVE_, i)(BOOST_PP_ITERATION_START_) # define BOOST_PP_RELATIVE_FINISH(i) BOOST_PP_CAT(BOOST_PP_RELATIVE_, i)(BOOST_PP_ITERATION_FINISH_) # # /* BOOST_PP_RELATIVE_FLAGS */ # # define BOOST_PP_RELATIVE_FLAGS(i) (BOOST_PP_CAT(BOOST_PP_RELATIVE_, i)(BOOST_PP_ITERATION_FLAGS_)()) # # /* BOOST_PP_ITERATE */ # # define BOOST_PP_ITERATE() BOOST_PP_CAT(BOOST_PP_ITERATE_, BOOST_PP_INC(BOOST_PP_ITERATION_DEPTH())) # # define BOOST_PP_ITERATE_1 # define BOOST_PP_ITERATE_2 # define BOOST_PP_ITERATE_3 # define BOOST_PP_ITERATE_4 # define BOOST_PP_ITERATE_5 # # endif ================================================ FILE: benchmarks/boost/preprocessor/iteration/local.hpp ================================================ # /* ************************************************************************** # * * # * (C) Copyright Paul Mensonides 2002. # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # * * # ************************************************************************** */ # # /* See http://www.boost.org for most recent version. */ # # ifndef BOOST_PREPROCESSOR_ITERATION_LOCAL_HPP # define BOOST_PREPROCESSOR_ITERATION_LOCAL_HPP # # include # include # include # # /* BOOST_PP_LOCAL_ITERATE */ # # define BOOST_PP_LOCAL_ITERATE() # # define BOOST_PP_LOCAL_C(n) (BOOST_PP_LOCAL_S) <= n && (BOOST_PP_LOCAL_F) >= n # define BOOST_PP_LOCAL_R(n) (BOOST_PP_LOCAL_F) <= n && (BOOST_PP_LOCAL_S) >= n # # endif ================================================ FILE: benchmarks/boost/preprocessor/iteration/self.hpp ================================================ # /* ************************************************************************** # * * # * (C) Copyright Paul Mensonides 2002. # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # * * # ************************************************************************** */ # # /* See http://www.boost.org for most recent version. */ # # ifndef BOOST_PREPROCESSOR_ITERATION_SELF_HPP # define BOOST_PREPROCESSOR_ITERATION_SELF_HPP # # /* BOOST_PP_INCLUDE_SELF */ # # define BOOST_PP_INCLUDE_SELF() # # endif ================================================ FILE: benchmarks/boost/preprocessor/list/adt.hpp ================================================ # /* Copyright (C) 2001 # * Housemarque Oy # * http://www.housemarque.com # * # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # * # * See http://www.boost.org for most recent version. # */ # # /* Revised by Paul Mensonides (2002) */ # # ifndef BOOST_PREPROCESSOR_LIST_ADT_HPP # define BOOST_PREPROCESSOR_LIST_ADT_HPP # # include # include # include # include # # /* BOOST_PP_LIST_CONS */ # # define BOOST_PP_LIST_CONS(head, tail) (head, tail) # # /* BOOST_PP_LIST_NIL */ # # define BOOST_PP_LIST_NIL BOOST_PP_NIL # # /* BOOST_PP_LIST_FIRST */ # # define BOOST_PP_LIST_FIRST(list) BOOST_PP_LIST_FIRST_D(list) # # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC() # define BOOST_PP_LIST_FIRST_D(list) BOOST_PP_LIST_FIRST_I list # else # define BOOST_PP_LIST_FIRST_D(list) BOOST_PP_LIST_FIRST_I ## list # endif # # define BOOST_PP_LIST_FIRST_I(head, tail) head # # /* BOOST_PP_LIST_REST */ # # define BOOST_PP_LIST_REST(list) BOOST_PP_LIST_REST_D(list) # # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC() # define BOOST_PP_LIST_REST_D(list) BOOST_PP_LIST_REST_I list # else # define BOOST_PP_LIST_REST_D(list) BOOST_PP_LIST_REST_I ## list # endif # # define BOOST_PP_LIST_REST_I(head, tail) tail # # /* BOOST_PP_LIST_IS_CONS */ # # if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_BCC() # define BOOST_PP_LIST_IS_CONS(list) BOOST_PP_LIST_IS_CONS_D(list) # define BOOST_PP_LIST_IS_CONS_D(list) BOOST_PP_LIST_IS_CONS_ ## list # define BOOST_PP_LIST_IS_CONS_(head, tail) 1 # define BOOST_PP_LIST_IS_CONS_BOOST_PP_NIL 0 # else # define BOOST_PP_LIST_IS_CONS(list) BOOST_PP_IS_BINARY(list) # endif # # /* BOOST_PP_LIST_IS_NIL */ # # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_BCC() # define BOOST_PP_LIST_IS_NIL(list) BOOST_PP_COMPL(BOOST_PP_IS_BINARY(list)) # else # define BOOST_PP_LIST_IS_NIL(list) BOOST_PP_COMPL(BOOST_PP_LIST_IS_CONS(list)) # endif # # endif ================================================ FILE: benchmarks/boost/preprocessor/list/detail/dmc/fold_left.hpp ================================================ # /* Copyright (C) 2001 # * Housemarque Oy # * http://www.housemarque.com # * # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # */ # # /* Revised by Paul Mensonides (2002) */ # # /* See http://www.boost.org for most recent version. */ # # ifndef BOOST_PREPROCESSOR_LIST_DETAIL_FOLD_LEFT_HPP # define BOOST_PREPROCESSOR_LIST_DETAIL_FOLD_LEFT_HPP # # include # include # include # include # # define BOOST_PP_LIST_FOLD_LEFT_1(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_2, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(2, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_2(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_3, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(3, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_3(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_4, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(4, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_4(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_5, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(5, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_5(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_6, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(6, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_6(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_7, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(7, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_7(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_8, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(8, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_8(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_9, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(9, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_9(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_10, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(10, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_10(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_11, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(11, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_11(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_12, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(12, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_12(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_13, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(13, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_13(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_14, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(14, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_14(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_15, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(15, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_15(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_16, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(16, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_16(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_17, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(17, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_17(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_18, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(18, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_18(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_19, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(19, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_19(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_20, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(20, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_20(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_21, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(21, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_21(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_22, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(22, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_22(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_23, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(23, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_23(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_24, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(24, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_24(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_25, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(25, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_25(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_26, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(26, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_26(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_27, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(27, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_27(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_28, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(28, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_28(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_29, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(29, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_29(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_30, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(30, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_30(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_31, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(31, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_31(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_32, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(32, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_32(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_33, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(33, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_33(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_34, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(34, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_34(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_35, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(35, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_35(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_36, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(36, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_36(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_37, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(37, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_37(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_38, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(38, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_38(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_39, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(39, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_39(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_40, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(40, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_40(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_41, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(41, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_41(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_42, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(42, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_42(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_43, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(43, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_43(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_44, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(44, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_44(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_45, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(45, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_45(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_46, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(46, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_46(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_47, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(47, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_47(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_48, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(48, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_48(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_49, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(49, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_49(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_50, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(50, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_50(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_51, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(51, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_51(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_52, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(52, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_52(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_53, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(53, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_53(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_54, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(54, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_54(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_55, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(55, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_55(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_56, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(56, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_56(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_57, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(57, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_57(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_58, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(58, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_58(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_59, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(59, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_59(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_60, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(60, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_60(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_61, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(61, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_61(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_62, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(62, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_62(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_63, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(63, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_63(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_64, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(64, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_64(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_65, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(65, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_65(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_66, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(66, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_66(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_67, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(67, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_67(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_68, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(68, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_68(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_69, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(69, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_69(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_70, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(70, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_70(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_71, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(71, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_71(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_72, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(72, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_72(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_73, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(73, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_73(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_74, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(74, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_74(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_75, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(75, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_75(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_76, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(76, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_76(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_77, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(77, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_77(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_78, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(78, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_78(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_79, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(79, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_79(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_80, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(80, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_80(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_81, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(81, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_81(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_82, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(82, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_82(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_83, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(83, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_83(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_84, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(84, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_84(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_85, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(85, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_85(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_86, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(86, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_86(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_87, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(87, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_87(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_88, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(88, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_88(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_89, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(89, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_89(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_90, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(90, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_90(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_91, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(91, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_91(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_92, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(92, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_92(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_93, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(93, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_93(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_94, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(94, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_94(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_95, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(95, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_95(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_96, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(96, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_96(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_97, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(97, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_97(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_98, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(98, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_98(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_99, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(99, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_99(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_100, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(100, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_100(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_101, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(101, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_101(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_102, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(102, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_102(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_103, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(103, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_103(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_104, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(104, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_104(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_105, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(105, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_105(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_106, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(106, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_106(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_107, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(107, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_107(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_108, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(108, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_108(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_109, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(109, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_109(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_110, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(110, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_110(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_111, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(111, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_111(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_112, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(112, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_112(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_113, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(113, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_113(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_114, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(114, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_114(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_115, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(115, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_115(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_116, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(116, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_116(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_117, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(117, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_117(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_118, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(118, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_118(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_119, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(119, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_119(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_120, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(120, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_120(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_121, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(121, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_121(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_122, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(122, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_122(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_123, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(123, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_123(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_124, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(124, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_124(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_125, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(125, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_125(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_126, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(126, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_126(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_127, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(127, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_127(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_128, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(128, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_128(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_129, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(129, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_129(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_130, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(130, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_130(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_131, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(131, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_131(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_132, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(132, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_132(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_133, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(133, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_133(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_134, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(134, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_134(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_135, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(135, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_135(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_136, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(136, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_136(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_137, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(137, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_137(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_138, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(138, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_138(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_139, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(139, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_139(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_140, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(140, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_140(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_141, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(141, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_141(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_142, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(142, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_142(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_143, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(143, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_143(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_144, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(144, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_144(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_145, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(145, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_145(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_146, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(146, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_146(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_147, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(147, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_147(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_148, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(148, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_148(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_149, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(149, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_149(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_150, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(150, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_150(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_151, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(151, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_151(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_152, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(152, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_152(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_153, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(153, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_153(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_154, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(154, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_154(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_155, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(155, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_155(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_156, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(156, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_156(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_157, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(157, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_157(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_158, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(158, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_158(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_159, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(159, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_159(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_160, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(160, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_160(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_161, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(161, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_161(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_162, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(162, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_162(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_163, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(163, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_163(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_164, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(164, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_164(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_165, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(165, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_165(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_166, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(166, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_166(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_167, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(167, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_167(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_168, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(168, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_168(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_169, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(169, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_169(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_170, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(170, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_170(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_171, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(171, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_171(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_172, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(172, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_172(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_173, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(173, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_173(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_174, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(174, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_174(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_175, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(175, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_175(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_176, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(176, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_176(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_177, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(177, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_177(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_178, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(178, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_178(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_179, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(179, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_179(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_180, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(180, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_180(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_181, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(181, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_181(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_182, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(182, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_182(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_183, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(183, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_183(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_184, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(184, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_184(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_185, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(185, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_185(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_186, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(186, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_186(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_187, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(187, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_187(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_188, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(188, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_188(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_189, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(189, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_189(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_190, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(190, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_190(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_191, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(191, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_191(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_192, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(192, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_192(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_193, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(193, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_193(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_194, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(194, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_194(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_195, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(195, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_195(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_196, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(196, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_196(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_197, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(197, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_197(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_198, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(198, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_198(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_199, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(199, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_199(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_200, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(200, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_200(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_201, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(201, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_201(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_202, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(202, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_202(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_203, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(203, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_203(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_204, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(204, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_204(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_205, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(205, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_205(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_206, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(206, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_206(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_207, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(207, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_207(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_208, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(208, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_208(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_209, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(209, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_209(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_210, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(210, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_210(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_211, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(211, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_211(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_212, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(212, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_212(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_213, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(213, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_213(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_214, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(214, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_214(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_215, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(215, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_215(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_216, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(216, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_216(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_217, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(217, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_217(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_218, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(218, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_218(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_219, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(219, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_219(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_220, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(220, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_220(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_221, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(221, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_221(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_222, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(222, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_222(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_223, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(223, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_223(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_224, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(224, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_224(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_225, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(225, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_225(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_226, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(226, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_226(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_227, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(227, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_227(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_228, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(228, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_228(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_229, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(229, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_229(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_230, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(230, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_230(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_231, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(231, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_231(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_232, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(232, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_232(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_233, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(233, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_233(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_234, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(234, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_234(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_235, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(235, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_235(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_236, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(236, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_236(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_237, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(237, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_237(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_238, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(238, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_238(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_239, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(239, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_239(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_240, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(240, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_240(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_241, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(241, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_241(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_242, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(242, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_242(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_243, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(243, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_243(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_244, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(244, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_244(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_245, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(245, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_245(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_246, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(246, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_246(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_247, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(247, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_247(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_248, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(248, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_248(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_249, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(249, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_249(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_250, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(250, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_250(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_251, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(251, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_251(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_252, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(252, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_252(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_253, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(253, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_253(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_254, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(254, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_254(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_255, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(255, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_255(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_256, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(256, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_256(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_257, BOOST_PP_TUPLE_ELEM_3_1)(o, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, BOOST_PP_TUPLE_ELEM_3_1)(257, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # # endif ================================================ FILE: benchmarks/boost/preprocessor/list/detail/edg/fold_left.hpp ================================================ # /* Copyright (C) 2001 # * Housemarque Oy # * http://www.housemarque.com # * # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # */ # # /* Revised by Paul Mensonides (2002) */ # # /* See http://www.boost.org for most recent version. */ # # ifndef BOOST_PREPROCESSOR_LIST_DETAIL_EDG_FOLD_LEFT_HPP # define BOOST_PREPROCESSOR_LIST_DETAIL_EDG_FOLD_LEFT_HPP # # include # include # include # include # # define BOOST_PP_LIST_FOLD_LEFT_1(o, s, l) BOOST_PP_LIST_FOLD_LEFT_1_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_2(o, s, l) BOOST_PP_LIST_FOLD_LEFT_2_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_3(o, s, l) BOOST_PP_LIST_FOLD_LEFT_3_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_4(o, s, l) BOOST_PP_LIST_FOLD_LEFT_4_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_5(o, s, l) BOOST_PP_LIST_FOLD_LEFT_5_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_6(o, s, l) BOOST_PP_LIST_FOLD_LEFT_6_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_7(o, s, l) BOOST_PP_LIST_FOLD_LEFT_7_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_8(o, s, l) BOOST_PP_LIST_FOLD_LEFT_8_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_9(o, s, l) BOOST_PP_LIST_FOLD_LEFT_9_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_10(o, s, l) BOOST_PP_LIST_FOLD_LEFT_10_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_11(o, s, l) BOOST_PP_LIST_FOLD_LEFT_11_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_12(o, s, l) BOOST_PP_LIST_FOLD_LEFT_12_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_13(o, s, l) BOOST_PP_LIST_FOLD_LEFT_13_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_14(o, s, l) BOOST_PP_LIST_FOLD_LEFT_14_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_15(o, s, l) BOOST_PP_LIST_FOLD_LEFT_15_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_16(o, s, l) BOOST_PP_LIST_FOLD_LEFT_16_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_17(o, s, l) BOOST_PP_LIST_FOLD_LEFT_17_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_18(o, s, l) BOOST_PP_LIST_FOLD_LEFT_18_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_19(o, s, l) BOOST_PP_LIST_FOLD_LEFT_19_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_20(o, s, l) BOOST_PP_LIST_FOLD_LEFT_20_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_21(o, s, l) BOOST_PP_LIST_FOLD_LEFT_21_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_22(o, s, l) BOOST_PP_LIST_FOLD_LEFT_22_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_23(o, s, l) BOOST_PP_LIST_FOLD_LEFT_23_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_24(o, s, l) BOOST_PP_LIST_FOLD_LEFT_24_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_25(o, s, l) BOOST_PP_LIST_FOLD_LEFT_25_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_26(o, s, l) BOOST_PP_LIST_FOLD_LEFT_26_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_27(o, s, l) BOOST_PP_LIST_FOLD_LEFT_27_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_28(o, s, l) BOOST_PP_LIST_FOLD_LEFT_28_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_29(o, s, l) BOOST_PP_LIST_FOLD_LEFT_29_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_30(o, s, l) BOOST_PP_LIST_FOLD_LEFT_30_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_31(o, s, l) BOOST_PP_LIST_FOLD_LEFT_31_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_32(o, s, l) BOOST_PP_LIST_FOLD_LEFT_32_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_33(o, s, l) BOOST_PP_LIST_FOLD_LEFT_33_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_34(o, s, l) BOOST_PP_LIST_FOLD_LEFT_34_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_35(o, s, l) BOOST_PP_LIST_FOLD_LEFT_35_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_36(o, s, l) BOOST_PP_LIST_FOLD_LEFT_36_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_37(o, s, l) BOOST_PP_LIST_FOLD_LEFT_37_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_38(o, s, l) BOOST_PP_LIST_FOLD_LEFT_38_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_39(o, s, l) BOOST_PP_LIST_FOLD_LEFT_39_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_40(o, s, l) BOOST_PP_LIST_FOLD_LEFT_40_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_41(o, s, l) BOOST_PP_LIST_FOLD_LEFT_41_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_42(o, s, l) BOOST_PP_LIST_FOLD_LEFT_42_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_43(o, s, l) BOOST_PP_LIST_FOLD_LEFT_43_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_44(o, s, l) BOOST_PP_LIST_FOLD_LEFT_44_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_45(o, s, l) BOOST_PP_LIST_FOLD_LEFT_45_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_46(o, s, l) BOOST_PP_LIST_FOLD_LEFT_46_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_47(o, s, l) BOOST_PP_LIST_FOLD_LEFT_47_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_48(o, s, l) BOOST_PP_LIST_FOLD_LEFT_48_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_49(o, s, l) BOOST_PP_LIST_FOLD_LEFT_49_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_50(o, s, l) BOOST_PP_LIST_FOLD_LEFT_50_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_51(o, s, l) BOOST_PP_LIST_FOLD_LEFT_51_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_52(o, s, l) BOOST_PP_LIST_FOLD_LEFT_52_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_53(o, s, l) BOOST_PP_LIST_FOLD_LEFT_53_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_54(o, s, l) BOOST_PP_LIST_FOLD_LEFT_54_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_55(o, s, l) BOOST_PP_LIST_FOLD_LEFT_55_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_56(o, s, l) BOOST_PP_LIST_FOLD_LEFT_56_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_57(o, s, l) BOOST_PP_LIST_FOLD_LEFT_57_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_58(o, s, l) BOOST_PP_LIST_FOLD_LEFT_58_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_59(o, s, l) BOOST_PP_LIST_FOLD_LEFT_59_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_60(o, s, l) BOOST_PP_LIST_FOLD_LEFT_60_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_61(o, s, l) BOOST_PP_LIST_FOLD_LEFT_61_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_62(o, s, l) BOOST_PP_LIST_FOLD_LEFT_62_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_63(o, s, l) BOOST_PP_LIST_FOLD_LEFT_63_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_64(o, s, l) BOOST_PP_LIST_FOLD_LEFT_64_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_65(o, s, l) BOOST_PP_LIST_FOLD_LEFT_65_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_66(o, s, l) BOOST_PP_LIST_FOLD_LEFT_66_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_67(o, s, l) BOOST_PP_LIST_FOLD_LEFT_67_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_68(o, s, l) BOOST_PP_LIST_FOLD_LEFT_68_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_69(o, s, l) BOOST_PP_LIST_FOLD_LEFT_69_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_70(o, s, l) BOOST_PP_LIST_FOLD_LEFT_70_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_71(o, s, l) BOOST_PP_LIST_FOLD_LEFT_71_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_72(o, s, l) BOOST_PP_LIST_FOLD_LEFT_72_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_73(o, s, l) BOOST_PP_LIST_FOLD_LEFT_73_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_74(o, s, l) BOOST_PP_LIST_FOLD_LEFT_74_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_75(o, s, l) BOOST_PP_LIST_FOLD_LEFT_75_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_76(o, s, l) BOOST_PP_LIST_FOLD_LEFT_76_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_77(o, s, l) BOOST_PP_LIST_FOLD_LEFT_77_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_78(o, s, l) BOOST_PP_LIST_FOLD_LEFT_78_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_79(o, s, l) BOOST_PP_LIST_FOLD_LEFT_79_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_80(o, s, l) BOOST_PP_LIST_FOLD_LEFT_80_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_81(o, s, l) BOOST_PP_LIST_FOLD_LEFT_81_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_82(o, s, l) BOOST_PP_LIST_FOLD_LEFT_82_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_83(o, s, l) BOOST_PP_LIST_FOLD_LEFT_83_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_84(o, s, l) BOOST_PP_LIST_FOLD_LEFT_84_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_85(o, s, l) BOOST_PP_LIST_FOLD_LEFT_85_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_86(o, s, l) BOOST_PP_LIST_FOLD_LEFT_86_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_87(o, s, l) BOOST_PP_LIST_FOLD_LEFT_87_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_88(o, s, l) BOOST_PP_LIST_FOLD_LEFT_88_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_89(o, s, l) BOOST_PP_LIST_FOLD_LEFT_89_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_90(o, s, l) BOOST_PP_LIST_FOLD_LEFT_90_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_91(o, s, l) BOOST_PP_LIST_FOLD_LEFT_91_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_92(o, s, l) BOOST_PP_LIST_FOLD_LEFT_92_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_93(o, s, l) BOOST_PP_LIST_FOLD_LEFT_93_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_94(o, s, l) BOOST_PP_LIST_FOLD_LEFT_94_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_95(o, s, l) BOOST_PP_LIST_FOLD_LEFT_95_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_96(o, s, l) BOOST_PP_LIST_FOLD_LEFT_96_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_97(o, s, l) BOOST_PP_LIST_FOLD_LEFT_97_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_98(o, s, l) BOOST_PP_LIST_FOLD_LEFT_98_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_99(o, s, l) BOOST_PP_LIST_FOLD_LEFT_99_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_100(o, s, l) BOOST_PP_LIST_FOLD_LEFT_100_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_101(o, s, l) BOOST_PP_LIST_FOLD_LEFT_101_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_102(o, s, l) BOOST_PP_LIST_FOLD_LEFT_102_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_103(o, s, l) BOOST_PP_LIST_FOLD_LEFT_103_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_104(o, s, l) BOOST_PP_LIST_FOLD_LEFT_104_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_105(o, s, l) BOOST_PP_LIST_FOLD_LEFT_105_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_106(o, s, l) BOOST_PP_LIST_FOLD_LEFT_106_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_107(o, s, l) BOOST_PP_LIST_FOLD_LEFT_107_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_108(o, s, l) BOOST_PP_LIST_FOLD_LEFT_108_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_109(o, s, l) BOOST_PP_LIST_FOLD_LEFT_109_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_110(o, s, l) BOOST_PP_LIST_FOLD_LEFT_110_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_111(o, s, l) BOOST_PP_LIST_FOLD_LEFT_111_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_112(o, s, l) BOOST_PP_LIST_FOLD_LEFT_112_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_113(o, s, l) BOOST_PP_LIST_FOLD_LEFT_113_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_114(o, s, l) BOOST_PP_LIST_FOLD_LEFT_114_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_115(o, s, l) BOOST_PP_LIST_FOLD_LEFT_115_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_116(o, s, l) BOOST_PP_LIST_FOLD_LEFT_116_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_117(o, s, l) BOOST_PP_LIST_FOLD_LEFT_117_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_118(o, s, l) BOOST_PP_LIST_FOLD_LEFT_118_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_119(o, s, l) BOOST_PP_LIST_FOLD_LEFT_119_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_120(o, s, l) BOOST_PP_LIST_FOLD_LEFT_120_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_121(o, s, l) BOOST_PP_LIST_FOLD_LEFT_121_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_122(o, s, l) BOOST_PP_LIST_FOLD_LEFT_122_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_123(o, s, l) BOOST_PP_LIST_FOLD_LEFT_123_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_124(o, s, l) BOOST_PP_LIST_FOLD_LEFT_124_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_125(o, s, l) BOOST_PP_LIST_FOLD_LEFT_125_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_126(o, s, l) BOOST_PP_LIST_FOLD_LEFT_126_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_127(o, s, l) BOOST_PP_LIST_FOLD_LEFT_127_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_128(o, s, l) BOOST_PP_LIST_FOLD_LEFT_128_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_129(o, s, l) BOOST_PP_LIST_FOLD_LEFT_129_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_130(o, s, l) BOOST_PP_LIST_FOLD_LEFT_130_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_131(o, s, l) BOOST_PP_LIST_FOLD_LEFT_131_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_132(o, s, l) BOOST_PP_LIST_FOLD_LEFT_132_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_133(o, s, l) BOOST_PP_LIST_FOLD_LEFT_133_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_134(o, s, l) BOOST_PP_LIST_FOLD_LEFT_134_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_135(o, s, l) BOOST_PP_LIST_FOLD_LEFT_135_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_136(o, s, l) BOOST_PP_LIST_FOLD_LEFT_136_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_137(o, s, l) BOOST_PP_LIST_FOLD_LEFT_137_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_138(o, s, l) BOOST_PP_LIST_FOLD_LEFT_138_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_139(o, s, l) BOOST_PP_LIST_FOLD_LEFT_139_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_140(o, s, l) BOOST_PP_LIST_FOLD_LEFT_140_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_141(o, s, l) BOOST_PP_LIST_FOLD_LEFT_141_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_142(o, s, l) BOOST_PP_LIST_FOLD_LEFT_142_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_143(o, s, l) BOOST_PP_LIST_FOLD_LEFT_143_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_144(o, s, l) BOOST_PP_LIST_FOLD_LEFT_144_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_145(o, s, l) BOOST_PP_LIST_FOLD_LEFT_145_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_146(o, s, l) BOOST_PP_LIST_FOLD_LEFT_146_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_147(o, s, l) BOOST_PP_LIST_FOLD_LEFT_147_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_148(o, s, l) BOOST_PP_LIST_FOLD_LEFT_148_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_149(o, s, l) BOOST_PP_LIST_FOLD_LEFT_149_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_150(o, s, l) BOOST_PP_LIST_FOLD_LEFT_150_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_151(o, s, l) BOOST_PP_LIST_FOLD_LEFT_151_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_152(o, s, l) BOOST_PP_LIST_FOLD_LEFT_152_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_153(o, s, l) BOOST_PP_LIST_FOLD_LEFT_153_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_154(o, s, l) BOOST_PP_LIST_FOLD_LEFT_154_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_155(o, s, l) BOOST_PP_LIST_FOLD_LEFT_155_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_156(o, s, l) BOOST_PP_LIST_FOLD_LEFT_156_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_157(o, s, l) BOOST_PP_LIST_FOLD_LEFT_157_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_158(o, s, l) BOOST_PP_LIST_FOLD_LEFT_158_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_159(o, s, l) BOOST_PP_LIST_FOLD_LEFT_159_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_160(o, s, l) BOOST_PP_LIST_FOLD_LEFT_160_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_161(o, s, l) BOOST_PP_LIST_FOLD_LEFT_161_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_162(o, s, l) BOOST_PP_LIST_FOLD_LEFT_162_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_163(o, s, l) BOOST_PP_LIST_FOLD_LEFT_163_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_164(o, s, l) BOOST_PP_LIST_FOLD_LEFT_164_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_165(o, s, l) BOOST_PP_LIST_FOLD_LEFT_165_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_166(o, s, l) BOOST_PP_LIST_FOLD_LEFT_166_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_167(o, s, l) BOOST_PP_LIST_FOLD_LEFT_167_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_168(o, s, l) BOOST_PP_LIST_FOLD_LEFT_168_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_169(o, s, l) BOOST_PP_LIST_FOLD_LEFT_169_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_170(o, s, l) BOOST_PP_LIST_FOLD_LEFT_170_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_171(o, s, l) BOOST_PP_LIST_FOLD_LEFT_171_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_172(o, s, l) BOOST_PP_LIST_FOLD_LEFT_172_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_173(o, s, l) BOOST_PP_LIST_FOLD_LEFT_173_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_174(o, s, l) BOOST_PP_LIST_FOLD_LEFT_174_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_175(o, s, l) BOOST_PP_LIST_FOLD_LEFT_175_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_176(o, s, l) BOOST_PP_LIST_FOLD_LEFT_176_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_177(o, s, l) BOOST_PP_LIST_FOLD_LEFT_177_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_178(o, s, l) BOOST_PP_LIST_FOLD_LEFT_178_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_179(o, s, l) BOOST_PP_LIST_FOLD_LEFT_179_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_180(o, s, l) BOOST_PP_LIST_FOLD_LEFT_180_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_181(o, s, l) BOOST_PP_LIST_FOLD_LEFT_181_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_182(o, s, l) BOOST_PP_LIST_FOLD_LEFT_182_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_183(o, s, l) BOOST_PP_LIST_FOLD_LEFT_183_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_184(o, s, l) BOOST_PP_LIST_FOLD_LEFT_184_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_185(o, s, l) BOOST_PP_LIST_FOLD_LEFT_185_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_186(o, s, l) BOOST_PP_LIST_FOLD_LEFT_186_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_187(o, s, l) BOOST_PP_LIST_FOLD_LEFT_187_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_188(o, s, l) BOOST_PP_LIST_FOLD_LEFT_188_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_189(o, s, l) BOOST_PP_LIST_FOLD_LEFT_189_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_190(o, s, l) BOOST_PP_LIST_FOLD_LEFT_190_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_191(o, s, l) BOOST_PP_LIST_FOLD_LEFT_191_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_192(o, s, l) BOOST_PP_LIST_FOLD_LEFT_192_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_193(o, s, l) BOOST_PP_LIST_FOLD_LEFT_193_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_194(o, s, l) BOOST_PP_LIST_FOLD_LEFT_194_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_195(o, s, l) BOOST_PP_LIST_FOLD_LEFT_195_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_196(o, s, l) BOOST_PP_LIST_FOLD_LEFT_196_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_197(o, s, l) BOOST_PP_LIST_FOLD_LEFT_197_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_198(o, s, l) BOOST_PP_LIST_FOLD_LEFT_198_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_199(o, s, l) BOOST_PP_LIST_FOLD_LEFT_199_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_200(o, s, l) BOOST_PP_LIST_FOLD_LEFT_200_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_201(o, s, l) BOOST_PP_LIST_FOLD_LEFT_201_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_202(o, s, l) BOOST_PP_LIST_FOLD_LEFT_202_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_203(o, s, l) BOOST_PP_LIST_FOLD_LEFT_203_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_204(o, s, l) BOOST_PP_LIST_FOLD_LEFT_204_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_205(o, s, l) BOOST_PP_LIST_FOLD_LEFT_205_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_206(o, s, l) BOOST_PP_LIST_FOLD_LEFT_206_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_207(o, s, l) BOOST_PP_LIST_FOLD_LEFT_207_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_208(o, s, l) BOOST_PP_LIST_FOLD_LEFT_208_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_209(o, s, l) BOOST_PP_LIST_FOLD_LEFT_209_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_210(o, s, l) BOOST_PP_LIST_FOLD_LEFT_210_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_211(o, s, l) BOOST_PP_LIST_FOLD_LEFT_211_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_212(o, s, l) BOOST_PP_LIST_FOLD_LEFT_212_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_213(o, s, l) BOOST_PP_LIST_FOLD_LEFT_213_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_214(o, s, l) BOOST_PP_LIST_FOLD_LEFT_214_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_215(o, s, l) BOOST_PP_LIST_FOLD_LEFT_215_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_216(o, s, l) BOOST_PP_LIST_FOLD_LEFT_216_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_217(o, s, l) BOOST_PP_LIST_FOLD_LEFT_217_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_218(o, s, l) BOOST_PP_LIST_FOLD_LEFT_218_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_219(o, s, l) BOOST_PP_LIST_FOLD_LEFT_219_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_220(o, s, l) BOOST_PP_LIST_FOLD_LEFT_220_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_221(o, s, l) BOOST_PP_LIST_FOLD_LEFT_221_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_222(o, s, l) BOOST_PP_LIST_FOLD_LEFT_222_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_223(o, s, l) BOOST_PP_LIST_FOLD_LEFT_223_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_224(o, s, l) BOOST_PP_LIST_FOLD_LEFT_224_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_225(o, s, l) BOOST_PP_LIST_FOLD_LEFT_225_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_226(o, s, l) BOOST_PP_LIST_FOLD_LEFT_226_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_227(o, s, l) BOOST_PP_LIST_FOLD_LEFT_227_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_228(o, s, l) BOOST_PP_LIST_FOLD_LEFT_228_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_229(o, s, l) BOOST_PP_LIST_FOLD_LEFT_229_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_230(o, s, l) BOOST_PP_LIST_FOLD_LEFT_230_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_231(o, s, l) BOOST_PP_LIST_FOLD_LEFT_231_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_232(o, s, l) BOOST_PP_LIST_FOLD_LEFT_232_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_233(o, s, l) BOOST_PP_LIST_FOLD_LEFT_233_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_234(o, s, l) BOOST_PP_LIST_FOLD_LEFT_234_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_235(o, s, l) BOOST_PP_LIST_FOLD_LEFT_235_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_236(o, s, l) BOOST_PP_LIST_FOLD_LEFT_236_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_237(o, s, l) BOOST_PP_LIST_FOLD_LEFT_237_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_238(o, s, l) BOOST_PP_LIST_FOLD_LEFT_238_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_239(o, s, l) BOOST_PP_LIST_FOLD_LEFT_239_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_240(o, s, l) BOOST_PP_LIST_FOLD_LEFT_240_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_241(o, s, l) BOOST_PP_LIST_FOLD_LEFT_241_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_242(o, s, l) BOOST_PP_LIST_FOLD_LEFT_242_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_243(o, s, l) BOOST_PP_LIST_FOLD_LEFT_243_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_244(o, s, l) BOOST_PP_LIST_FOLD_LEFT_244_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_245(o, s, l) BOOST_PP_LIST_FOLD_LEFT_245_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_246(o, s, l) BOOST_PP_LIST_FOLD_LEFT_246_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_247(o, s, l) BOOST_PP_LIST_FOLD_LEFT_247_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_248(o, s, l) BOOST_PP_LIST_FOLD_LEFT_248_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_249(o, s, l) BOOST_PP_LIST_FOLD_LEFT_249_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_250(o, s, l) BOOST_PP_LIST_FOLD_LEFT_250_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_251(o, s, l) BOOST_PP_LIST_FOLD_LEFT_251_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_252(o, s, l) BOOST_PP_LIST_FOLD_LEFT_252_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_253(o, s, l) BOOST_PP_LIST_FOLD_LEFT_253_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_254(o, s, l) BOOST_PP_LIST_FOLD_LEFT_254_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_255(o, s, l) BOOST_PP_LIST_FOLD_LEFT_255_D(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_256(o, s, l) BOOST_PP_LIST_FOLD_LEFT_256_D(o, s, l) # # define BOOST_PP_LIST_FOLD_LEFT_1_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_2, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(2, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_2_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_3, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(3, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_3_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_4, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(4, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_4_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_5, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(5, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_5_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_6, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(6, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_6_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_7, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(7, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_7_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_8, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(8, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_8_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_9, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(9, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_9_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_10, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(10, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_10_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_11, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(11, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_11_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_12, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(12, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_12_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_13, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(13, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_13_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_14, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(14, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_14_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_15, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(15, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_15_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_16, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(16, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_16_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_17, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(17, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_17_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_18, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(18, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_18_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_19, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(19, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_19_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_20, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(20, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_20_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_21, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(21, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_21_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_22, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(22, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_22_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_23, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(23, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_23_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_24, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(24, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_24_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_25, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(25, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_25_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_26, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(26, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_26_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_27, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(27, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_27_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_28, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(28, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_28_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_29, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(29, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_29_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_30, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(30, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_30_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_31, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(31, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_31_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_32, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(32, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_32_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_33, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(33, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_33_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_34, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(34, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_34_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_35, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(35, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_35_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_36, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(36, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_36_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_37, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(37, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_37_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_38, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(38, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_38_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_39, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(39, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_39_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_40, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(40, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_40_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_41, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(41, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_41_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_42, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(42, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_42_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_43, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(43, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_43_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_44, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(44, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_44_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_45, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(45, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_45_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_46, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(46, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_46_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_47, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(47, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_47_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_48, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(48, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_48_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_49, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(49, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_49_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_50, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(50, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_50_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_51, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(51, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_51_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_52, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(52, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_52_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_53, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(53, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_53_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_54, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(54, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_54_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_55, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(55, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_55_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_56, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(56, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_56_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_57, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(57, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_57_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_58, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(58, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_58_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_59, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(59, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_59_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_60, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(60, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_60_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_61, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(61, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_61_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_62, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(62, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_62_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_63, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(63, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_63_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_64, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(64, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_64_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_65, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(65, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_65_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_66, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(66, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_66_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_67, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(67, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_67_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_68, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(68, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_68_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_69, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(69, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_69_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_70, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(70, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_70_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_71, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(71, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_71_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_72, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(72, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_72_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_73, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(73, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_73_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_74, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(74, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_74_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_75, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(75, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_75_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_76, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(76, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_76_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_77, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(77, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_77_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_78, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(78, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_78_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_79, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(79, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_79_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_80, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(80, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_80_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_81, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(81, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_81_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_82, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(82, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_82_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_83, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(83, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_83_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_84, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(84, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_84_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_85, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(85, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_85_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_86, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(86, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_86_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_87, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(87, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_87_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_88, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(88, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_88_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_89, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(89, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_89_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_90, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(90, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_90_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_91, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(91, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_91_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_92, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(92, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_92_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_93, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(93, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_93_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_94, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(94, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_94_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_95, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(95, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_95_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_96, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(96, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_96_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_97, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(97, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_97_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_98, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(98, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_98_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_99, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(99, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_99_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_100, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(100, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_100_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_101, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(101, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_101_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_102, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(102, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_102_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_103, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(103, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_103_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_104, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(104, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_104_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_105, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(105, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_105_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_106, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(106, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_106_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_107, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(107, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_107_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_108, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(108, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_108_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_109, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(109, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_109_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_110, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(110, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_110_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_111, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(111, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_111_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_112, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(112, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_112_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_113, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(113, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_113_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_114, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(114, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_114_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_115, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(115, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_115_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_116, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(116, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_116_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_117, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(117, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_117_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_118, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(118, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_118_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_119, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(119, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_119_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_120, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(120, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_120_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_121, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(121, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_121_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_122, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(122, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_122_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_123, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(123, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_123_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_124, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(124, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_124_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_125, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(125, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_125_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_126, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(126, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_126_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_127, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(127, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_127_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_128, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(128, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_128_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_129, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(129, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_129_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_130, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(130, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_130_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_131, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(131, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_131_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_132, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(132, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_132_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_133, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(133, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_133_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_134, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(134, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_134_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_135, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(135, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_135_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_136, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(136, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_136_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_137, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(137, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_137_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_138, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(138, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_138_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_139, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(139, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_139_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_140, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(140, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_140_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_141, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(141, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_141_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_142, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(142, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_142_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_143, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(143, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_143_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_144, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(144, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_144_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_145, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(145, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_145_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_146, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(146, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_146_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_147, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(147, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_147_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_148, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(148, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_148_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_149, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(149, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_149_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_150, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(150, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_150_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_151, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(151, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_151_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_152, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(152, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_152_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_153, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(153, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_153_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_154, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(154, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_154_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_155, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(155, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_155_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_156, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(156, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_156_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_157, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(157, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_157_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_158, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(158, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_158_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_159, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(159, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_159_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_160, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(160, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_160_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_161, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(161, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_161_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_162, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(162, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_162_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_163, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(163, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_163_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_164, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(164, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_164_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_165, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(165, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_165_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_166, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(166, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_166_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_167, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(167, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_167_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_168, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(168, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_168_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_169, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(169, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_169_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_170, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(170, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_170_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_171, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(171, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_171_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_172, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(172, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_172_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_173, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(173, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_173_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_174, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(174, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_174_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_175, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(175, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_175_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_176, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(176, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_176_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_177, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(177, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_177_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_178, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(178, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_178_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_179, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(179, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_179_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_180, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(180, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_180_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_181, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(181, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_181_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_182, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(182, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_182_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_183, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(183, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_183_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_184, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(184, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_184_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_185, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(185, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_185_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_186, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(186, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_186_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_187, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(187, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_187_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_188, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(188, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_188_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_189, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(189, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_189_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_190, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(190, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_190_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_191, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(191, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_191_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_192, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(192, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_192_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_193, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(193, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_193_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_194, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(194, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_194_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_195, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(195, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_195_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_196, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(196, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_196_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_197, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(197, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_197_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_198, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(198, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_198_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_199, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(199, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_199_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_200, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(200, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_200_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_201, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(201, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_201_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_202, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(202, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_202_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_203, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(203, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_203_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_204, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(204, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_204_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_205, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(205, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_205_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_206, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(206, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_206_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_207, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(207, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_207_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_208, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(208, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_208_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_209, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(209, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_209_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_210, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(210, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_210_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_211, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(211, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_211_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_212, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(212, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_212_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_213, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(213, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_213_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_214, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(214, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_214_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_215, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(215, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_215_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_216, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(216, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_216_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_217, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(217, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_217_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_218, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(218, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_218_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_219, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(219, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_219_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_220, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(220, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_220_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_221, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(221, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_221_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_222, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(222, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_222_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_223, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(223, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_223_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_224, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(224, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_224_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_225, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(225, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_225_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_226, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(226, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_226_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_227, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(227, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_227_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_228, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(228, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_228_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_229, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(229, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_229_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_230, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(230, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_230_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_231, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(231, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_231_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_232, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(232, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_232_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_233, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(233, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_233_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_234, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(234, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_234_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_235, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(235, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_235_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_236, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(236, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_236_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_237, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(237, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_237_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_238, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(238, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_238_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_239, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(239, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_239_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_240, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(240, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_240_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_241, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(241, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_241_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_242, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(242, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_242_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_243, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(243, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_243_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_244, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(244, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_244_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_245, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(245, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_245_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_246, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(246, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_246_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_247, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(247, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_247_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_248, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(248, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_248_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_249, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(249, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_249_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_250, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(250, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_250_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_251, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(251, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_251_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_252, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(252, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_252_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_253, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(253, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_253_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_254, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(254, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_254_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_255, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(255, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_255_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_256, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(256, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_256_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_257, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(257, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # # endif ================================================ FILE: benchmarks/boost/preprocessor/list/detail/edg/fold_right.hpp ================================================ # /* Copyright (C) 2001 # * Housemarque Oy # * http://www.housemarque.com # * # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # */ # # /* Revised by Paul Mensonides (2002) */ # # /* See http://www.boost.org for most recent version. */ # # ifndef BOOST_PREPROCESSOR_LIST_DETAIL_EDG_FOLD_RIGHT_HPP # define BOOST_PREPROCESSOR_LIST_DETAIL_EDG_FOLD_RIGHT_HPP # # include # include # include # # define BOOST_PP_LIST_FOLD_RIGHT_1(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_1_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_2(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_2_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_3(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_3_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_4(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_4_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_5(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_5_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_6(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_6_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_7(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_7_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_8(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_8_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_9(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_9_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_10(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_10_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_11(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_11_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_12(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_12_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_13(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_13_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_14(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_14_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_15(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_15_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_16(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_16_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_17(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_17_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_18(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_18_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_19(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_19_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_20(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_20_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_21(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_21_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_22(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_22_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_23(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_23_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_24(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_24_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_25(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_25_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_26(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_26_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_27(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_27_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_28(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_28_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_29(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_29_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_30(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_30_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_31(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_31_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_32(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_32_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_33(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_33_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_34(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_34_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_35(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_35_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_36(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_36_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_37(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_37_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_38(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_38_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_39(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_39_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_40(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_40_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_41(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_41_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_42(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_42_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_43(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_43_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_44(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_44_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_45(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_45_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_46(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_46_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_47(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_47_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_48(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_48_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_49(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_49_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_50(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_50_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_51(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_51_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_52(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_52_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_53(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_53_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_54(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_54_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_55(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_55_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_56(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_56_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_57(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_57_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_58(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_58_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_59(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_59_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_60(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_60_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_61(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_61_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_62(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_62_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_63(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_63_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_64(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_64_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_65(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_65_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_66(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_66_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_67(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_67_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_68(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_68_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_69(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_69_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_70(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_70_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_71(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_71_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_72(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_72_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_73(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_73_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_74(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_74_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_75(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_75_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_76(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_76_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_77(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_77_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_78(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_78_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_79(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_79_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_80(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_80_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_81(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_81_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_82(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_82_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_83(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_83_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_84(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_84_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_85(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_85_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_86(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_86_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_87(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_87_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_88(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_88_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_89(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_89_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_90(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_90_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_91(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_91_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_92(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_92_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_93(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_93_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_94(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_94_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_95(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_95_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_96(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_96_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_97(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_97_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_98(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_98_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_99(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_99_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_100(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_100_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_101(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_101_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_102(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_102_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_103(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_103_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_104(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_104_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_105(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_105_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_106(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_106_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_107(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_107_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_108(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_108_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_109(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_109_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_110(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_110_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_111(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_111_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_112(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_112_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_113(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_113_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_114(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_114_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_115(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_115_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_116(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_116_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_117(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_117_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_118(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_118_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_119(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_119_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_120(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_120_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_121(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_121_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_122(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_122_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_123(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_123_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_124(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_124_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_125(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_125_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_126(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_126_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_127(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_127_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_128(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_128_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_129(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_129_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_130(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_130_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_131(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_131_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_132(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_132_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_133(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_133_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_134(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_134_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_135(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_135_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_136(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_136_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_137(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_137_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_138(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_138_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_139(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_139_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_140(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_140_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_141(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_141_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_142(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_142_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_143(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_143_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_144(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_144_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_145(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_145_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_146(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_146_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_147(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_147_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_148(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_148_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_149(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_149_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_150(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_150_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_151(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_151_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_152(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_152_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_153(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_153_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_154(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_154_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_155(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_155_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_156(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_156_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_157(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_157_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_158(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_158_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_159(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_159_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_160(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_160_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_161(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_161_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_162(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_162_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_163(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_163_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_164(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_164_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_165(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_165_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_166(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_166_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_167(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_167_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_168(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_168_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_169(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_169_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_170(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_170_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_171(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_171_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_172(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_172_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_173(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_173_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_174(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_174_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_175(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_175_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_176(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_176_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_177(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_177_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_178(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_178_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_179(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_179_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_180(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_180_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_181(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_181_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_182(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_182_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_183(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_183_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_184(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_184_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_185(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_185_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_186(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_186_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_187(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_187_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_188(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_188_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_189(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_189_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_190(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_190_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_191(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_191_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_192(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_192_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_193(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_193_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_194(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_194_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_195(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_195_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_196(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_196_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_197(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_197_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_198(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_198_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_199(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_199_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_200(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_200_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_201(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_201_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_202(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_202_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_203(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_203_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_204(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_204_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_205(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_205_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_206(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_206_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_207(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_207_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_208(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_208_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_209(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_209_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_210(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_210_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_211(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_211_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_212(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_212_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_213(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_213_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_214(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_214_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_215(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_215_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_216(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_216_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_217(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_217_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_218(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_218_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_219(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_219_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_220(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_220_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_221(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_221_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_222(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_222_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_223(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_223_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_224(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_224_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_225(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_225_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_226(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_226_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_227(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_227_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_228(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_228_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_229(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_229_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_230(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_230_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_231(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_231_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_232(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_232_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_233(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_233_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_234(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_234_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_235(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_235_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_236(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_236_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_237(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_237_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_238(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_238_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_239(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_239_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_240(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_240_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_241(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_241_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_242(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_242_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_243(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_243_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_244(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_244_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_245(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_245_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_246(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_246_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_247(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_247_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_248(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_248_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_249(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_249_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_250(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_250_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_251(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_251_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_252(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_252_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_253(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_253_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_254(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_254_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_255(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_255_D(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_256(o, s, l) BOOST_PP_LIST_FOLD_RIGHT_256_D(o, s, l) # # define BOOST_PP_LIST_FOLD_RIGHT_1_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(2, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_2, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_2_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(3, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_3, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_3_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(4, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_4, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_4_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(5, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_5, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_5_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(6, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_6, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_6_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(7, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_7, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_7_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(8, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_8, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_8_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(9, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_9, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_9_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(10, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_10, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_10_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(11, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_11, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_11_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(12, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_12, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_12_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(13, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_13, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_13_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(14, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_14, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_14_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(15, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_15, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_15_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(16, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_16, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_16_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(17, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_17, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_17_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(18, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_18, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_18_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(19, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_19, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_19_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(20, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_20, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_20_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(21, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_21, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_21_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(22, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_22, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_22_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(23, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_23, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_23_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(24, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_24, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_24_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(25, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_25, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_25_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(26, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_26, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_26_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(27, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_27, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_27_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(28, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_28, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_28_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(29, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_29, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_29_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(30, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_30, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_30_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(31, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_31, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_31_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(32, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_32, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_32_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(33, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_33, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_33_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(34, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_34, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_34_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(35, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_35, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_35_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(36, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_36, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_36_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(37, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_37, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_37_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(38, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_38, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_38_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(39, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_39, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_39_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(40, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_40, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_40_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(41, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_41, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_41_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(42, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_42, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_42_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(43, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_43, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_43_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(44, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_44, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_44_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(45, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_45, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_45_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(46, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_46, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_46_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(47, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_47, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_47_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(48, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_48, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_48_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(49, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_49, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_49_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(50, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_50, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_50_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(51, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_51, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_51_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(52, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_52, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_52_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(53, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_53, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_53_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(54, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_54, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_54_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(55, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_55, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_55_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(56, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_56, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_56_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(57, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_57, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_57_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(58, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_58, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_58_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(59, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_59, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_59_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(60, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_60, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_60_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(61, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_61, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_61_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(62, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_62, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_62_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(63, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_63, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_63_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(64, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_64, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_64_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(65, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_65, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_65_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(66, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_66, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_66_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(67, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_67, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_67_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(68, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_68, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_68_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(69, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_69, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_69_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(70, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_70, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_70_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(71, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_71, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_71_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(72, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_72, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_72_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(73, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_73, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_73_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(74, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_74, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_74_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(75, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_75, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_75_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(76, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_76, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_76_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(77, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_77, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_77_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(78, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_78, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_78_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(79, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_79, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_79_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(80, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_80, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_80_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(81, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_81, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_81_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(82, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_82, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_82_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(83, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_83, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_83_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(84, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_84, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_84_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(85, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_85, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_85_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(86, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_86, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_86_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(87, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_87, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_87_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(88, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_88, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_88_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(89, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_89, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_89_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(90, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_90, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_90_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(91, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_91, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_91_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(92, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_92, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_92_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(93, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_93, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_93_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(94, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_94, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_94_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(95, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_95, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_95_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(96, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_96, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_96_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(97, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_97, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_97_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(98, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_98, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_98_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(99, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_99, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_99_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(100, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_100, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_100_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(101, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_101, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_101_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(102, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_102, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_102_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(103, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_103, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_103_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(104, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_104, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_104_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(105, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_105, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_105_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(106, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_106, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_106_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(107, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_107, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_107_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(108, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_108, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_108_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(109, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_109, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_109_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(110, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_110, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_110_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(111, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_111, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_111_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(112, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_112, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_112_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(113, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_113, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_113_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(114, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_114, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_114_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(115, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_115, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_115_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(116, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_116, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_116_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(117, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_117, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_117_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(118, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_118, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_118_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(119, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_119, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_119_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(120, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_120, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_120_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(121, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_121, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_121_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(122, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_122, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_122_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(123, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_123, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_123_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(124, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_124, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_124_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(125, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_125, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_125_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(126, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_126, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_126_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(127, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_127, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_127_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(128, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_128, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_128_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(129, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_129, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_129_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(130, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_130, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_130_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(131, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_131, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_131_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(132, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_132, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_132_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(133, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_133, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_133_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(134, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_134, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_134_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(135, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_135, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_135_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(136, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_136, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_136_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(137, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_137, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_137_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(138, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_138, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_138_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(139, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_139, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_139_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(140, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_140, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_140_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(141, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_141, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_141_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(142, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_142, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_142_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(143, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_143, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_143_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(144, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_144, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_144_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(145, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_145, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_145_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(146, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_146, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_146_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(147, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_147, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_147_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(148, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_148, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_148_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(149, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_149, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_149_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(150, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_150, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_150_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(151, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_151, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_151_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(152, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_152, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_152_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(153, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_153, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_153_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(154, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_154, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_154_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(155, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_155, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_155_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(156, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_156, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_156_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(157, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_157, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_157_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(158, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_158, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_158_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(159, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_159, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_159_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(160, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_160, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_160_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(161, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_161, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_161_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(162, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_162, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_162_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(163, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_163, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_163_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(164, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_164, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_164_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(165, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_165, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_165_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(166, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_166, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_166_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(167, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_167, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_167_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(168, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_168, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_168_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(169, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_169, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_169_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(170, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_170, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_170_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(171, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_171, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_171_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(172, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_172, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_172_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(173, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_173, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_173_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(174, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_174, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_174_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(175, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_175, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_175_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(176, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_176, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_176_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(177, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_177, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_177_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(178, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_178, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_178_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(179, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_179, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_179_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(180, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_180, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_180_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(181, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_181, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_181_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(182, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_182, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_182_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(183, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_183, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_183_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(184, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_184, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_184_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(185, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_185, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_185_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(186, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_186, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_186_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(187, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_187, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_187_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(188, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_188, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_188_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(189, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_189, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_189_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(190, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_190, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_190_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(191, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_191, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_191_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(192, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_192, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_192_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(193, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_193, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_193_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(194, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_194, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_194_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(195, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_195, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_195_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(196, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_196, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_196_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(197, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_197, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_197_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(198, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_198, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_198_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(199, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_199, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_199_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(200, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_200, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_200_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(201, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_201, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_201_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(202, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_202, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_202_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(203, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_203, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_203_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(204, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_204, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_204_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(205, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_205, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_205_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(206, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_206, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_206_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(207, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_207, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_207_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(208, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_208, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_208_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(209, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_209, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_209_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(210, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_210, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_210_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(211, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_211, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_211_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(212, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_212, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_212_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(213, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_213, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_213_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(214, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_214, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_214_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(215, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_215, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_215_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(216, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_216, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_216_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(217, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_217, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_217_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(218, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_218, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_218_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(219, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_219, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_219_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(220, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_220, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_220_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(221, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_221, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_221_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(222, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_222, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_222_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(223, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_223, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_223_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(224, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_224, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_224_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(225, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_225, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_225_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(226, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_226, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_226_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(227, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_227, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_227_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(228, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_228, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_228_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(229, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_229, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_229_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(230, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_230, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_230_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(231, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_231, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_231_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(232, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_232, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_232_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(233, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_233, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_233_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(234, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_234, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_234_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(235, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_235, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_235_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(236, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_236, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_236_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(237, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_237, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_237_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(238, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_238, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_238_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(239, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_239, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_239_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(240, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_240, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_240_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(241, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_241, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_241_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(242, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_242, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_242_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(243, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_243, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_243_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(244, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_244, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_244_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(245, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_245, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_245_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(246, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_246, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_246_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(247, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_247, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_247_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(248, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_248, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_248_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(249, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_249, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_249_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(250, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_250, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_250_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(251, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_251, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_251_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(252, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_252, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_252_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(253, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_253, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_253_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(254, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_254, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_254_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(255, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_255, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_255_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(256, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_256, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # define BOOST_PP_LIST_FOLD_RIGHT_256_D(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), o, s BOOST_PP_TUPLE_EAT_3)(257, BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_RIGHT_257, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3)(o, s, BOOST_PP_LIST_REST(l)), BOOST_PP_LIST_FIRST(l)) # # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_NIL 1 # # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_1(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_2(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_3(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_4(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_5(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_6(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_7(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_8(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_9(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_10(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_11(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_12(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_13(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_14(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_15(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_16(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_17(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_18(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_19(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_20(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_21(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_22(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_23(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_24(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_25(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_26(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_27(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_28(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_29(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_30(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_31(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_32(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_33(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_34(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_35(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_36(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_37(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_38(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_39(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_40(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_41(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_42(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_43(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_44(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_45(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_46(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_47(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_48(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_49(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_50(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_51(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_52(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_53(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_54(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_55(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_56(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_57(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_58(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_59(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_60(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_61(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_62(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_63(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_64(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_65(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_66(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_67(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_68(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_69(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_70(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_71(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_72(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_73(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_74(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_75(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_76(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_77(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_78(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_79(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_80(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_81(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_82(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_83(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_84(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_85(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_86(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_87(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_88(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_89(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_90(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_91(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_92(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_93(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_94(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_95(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_96(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_97(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_98(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_99(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_100(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_101(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_102(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_103(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_104(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_105(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_106(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_107(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_108(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_109(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_110(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_111(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_112(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_113(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_114(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_115(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_116(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_117(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_118(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_119(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_120(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_121(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_122(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_123(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_124(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_125(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_126(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_127(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_128(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_129(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_130(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_131(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_132(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_133(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_134(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_135(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_136(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_137(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_138(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_139(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_140(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_141(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_142(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_143(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_144(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_145(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_146(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_147(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_148(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_149(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_150(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_151(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_152(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_153(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_154(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_155(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_156(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_157(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_158(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_159(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_160(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_161(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_162(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_163(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_164(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_165(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_166(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_167(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_168(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_169(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_170(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_171(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_172(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_173(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_174(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_175(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_176(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_177(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_178(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_179(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_180(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_181(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_182(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_183(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_184(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_185(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_186(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_187(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_188(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_189(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_190(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_191(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_192(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_193(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_194(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_195(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_196(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_197(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_198(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_199(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_200(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_201(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_202(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_203(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_204(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_205(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_206(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_207(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_208(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_209(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_210(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_211(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_212(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_213(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_214(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_215(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_216(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_217(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_218(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_219(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_220(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_221(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_222(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_223(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_224(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_225(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_226(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_227(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_228(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_229(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_230(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_231(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_232(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_233(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_234(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_235(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_236(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_237(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_238(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_239(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_240(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_241(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_242(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_243(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_244(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_245(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_246(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_247(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_248(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_249(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_250(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_251(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_252(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_253(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_254(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_255(o, s, l) 0 # define BOOST_PP_LIST_FOLD_RIGHT_CHECK_BOOST_PP_LIST_FOLD_RIGHT_256(o, s, l) 0 # # endif ================================================ FILE: benchmarks/boost/preprocessor/list/detail/fold_left.hpp ================================================ # /* Copyright (C) 2001 # * Housemarque Oy # * http://www.housemarque.com # * # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # */ # # /* Revised by Paul Mensonides (2002) */ # # /* See http://www.boost.org for most recent version. */ # # ifndef BOOST_PREPROCESSOR_LIST_DETAIL_FOLD_LEFT_HPP # define BOOST_PREPROCESSOR_LIST_DETAIL_FOLD_LEFT_HPP # # include # include # include # include # # define BOOST_PP_LIST_FOLD_LEFT_1(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_2, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(2, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_2(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_3, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(3, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_3(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_4, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(4, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_4(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_5, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(5, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_5(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_6, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(6, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_6(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_7, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(7, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_7(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_8, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(8, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_8(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_9, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(9, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_9(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_10, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(10, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_10(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_11, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(11, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_11(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_12, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(12, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_12(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_13, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(13, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_13(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_14, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(14, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_14(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_15, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(15, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_15(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_16, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(16, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_16(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_17, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(17, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_17(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_18, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(18, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_18(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_19, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(19, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_19(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_20, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(20, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_20(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_21, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(21, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_21(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_22, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(22, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_22(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_23, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(23, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_23(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_24, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(24, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_24(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_25, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(25, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_25(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_26, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(26, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_26(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_27, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(27, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_27(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_28, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(28, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_28(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_29, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(29, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_29(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_30, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(30, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_30(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_31, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(31, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_31(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_32, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(32, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_32(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_33, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(33, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_33(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_34, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(34, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_34(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_35, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(35, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_35(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_36, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(36, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_36(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_37, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(37, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_37(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_38, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(38, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_38(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_39, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(39, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_39(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_40, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(40, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_40(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_41, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(41, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_41(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_42, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(42, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_42(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_43, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(43, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_43(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_44, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(44, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_44(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_45, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(45, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_45(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_46, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(46, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_46(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_47, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(47, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_47(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_48, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(48, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_48(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_49, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(49, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_49(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_50, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(50, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_50(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_51, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(51, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_51(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_52, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(52, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_52(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_53, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(53, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_53(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_54, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(54, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_54(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_55, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(55, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_55(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_56, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(56, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_56(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_57, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(57, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_57(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_58, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(58, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_58(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_59, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(59, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_59(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_60, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(60, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_60(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_61, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(61, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_61(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_62, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(62, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_62(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_63, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(63, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_63(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_64, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(64, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_64(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_65, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(65, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_65(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_66, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(66, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_66(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_67, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(67, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_67(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_68, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(68, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_68(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_69, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(69, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_69(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_70, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(70, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_70(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_71, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(71, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_71(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_72, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(72, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_72(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_73, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(73, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_73(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_74, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(74, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_74(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_75, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(75, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_75(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_76, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(76, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_76(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_77, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(77, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_77(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_78, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(78, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_78(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_79, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(79, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_79(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_80, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(80, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_80(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_81, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(81, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_81(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_82, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(82, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_82(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_83, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(83, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_83(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_84, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(84, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_84(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_85, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(85, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_85(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_86, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(86, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_86(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_87, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(87, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_87(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_88, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(88, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_88(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_89, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(89, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_89(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_90, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(90, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_90(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_91, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(91, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_91(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_92, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(92, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_92(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_93, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(93, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_93(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_94, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(94, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_94(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_95, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(95, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_95(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_96, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(96, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_96(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_97, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(97, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_97(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_98, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(98, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_98(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_99, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(99, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_99(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_100, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(100, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_100(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_101, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(101, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_101(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_102, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(102, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_102(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_103, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(103, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_103(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_104, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(104, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_104(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_105, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(105, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_105(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_106, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(106, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_106(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_107, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(107, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_107(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_108, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(108, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_108(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_109, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(109, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_109(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_110, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(110, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_110(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_111, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(111, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_111(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_112, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(112, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_112(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_113, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(113, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_113(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_114, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(114, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_114(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_115, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(115, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_115(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_116, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(116, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_116(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_117, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(117, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_117(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_118, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(118, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_118(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_119, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(119, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_119(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_120, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(120, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_120(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_121, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(121, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_121(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_122, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(122, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_122(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_123, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(123, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_123(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_124, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(124, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_124(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_125, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(125, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_125(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_126, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(126, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_126(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_127, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(127, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_127(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_128, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(128, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_128(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_129, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(129, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_129(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_130, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(130, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_130(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_131, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(131, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_131(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_132, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(132, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_132(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_133, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(133, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_133(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_134, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(134, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_134(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_135, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(135, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_135(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_136, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(136, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_136(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_137, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(137, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_137(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_138, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(138, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_138(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_139, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(139, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_139(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_140, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(140, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_140(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_141, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(141, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_141(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_142, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(142, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_142(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_143, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(143, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_143(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_144, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(144, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_144(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_145, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(145, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_145(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_146, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(146, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_146(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_147, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(147, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_147(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_148, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(148, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_148(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_149, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(149, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_149(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_150, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(150, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_150(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_151, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(151, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_151(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_152, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(152, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_152(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_153, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(153, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_153(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_154, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(154, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_154(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_155, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(155, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_155(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_156, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(156, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_156(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_157, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(157, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_157(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_158, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(158, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_158(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_159, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(159, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_159(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_160, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(160, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_160(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_161, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(161, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_161(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_162, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(162, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_162(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_163, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(163, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_163(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_164, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(164, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_164(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_165, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(165, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_165(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_166, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(166, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_166(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_167, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(167, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_167(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_168, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(168, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_168(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_169, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(169, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_169(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_170, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(170, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_170(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_171, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(171, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_171(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_172, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(172, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_172(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_173, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(173, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_173(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_174, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(174, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_174(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_175, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(175, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_175(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_176, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(176, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_176(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_177, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(177, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_177(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_178, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(178, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_178(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_179, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(179, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_179(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_180, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(180, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_180(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_181, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(181, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_181(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_182, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(182, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_182(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_183, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(183, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_183(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_184, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(184, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_184(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_185, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(185, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_185(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_186, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(186, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_186(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_187, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(187, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_187(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_188, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(188, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_188(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_189, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(189, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_189(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_190, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(190, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_190(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_191, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(191, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_191(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_192, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(192, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_192(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_193, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(193, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_193(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_194, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(194, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_194(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_195, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(195, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_195(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_196, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(196, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_196(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_197, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(197, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_197(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_198, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(198, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_198(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_199, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(199, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_199(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_200, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(200, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_200(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_201, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(201, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_201(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_202, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(202, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_202(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_203, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(203, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_203(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_204, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(204, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_204(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_205, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(205, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_205(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_206, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(206, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_206(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_207, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(207, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_207(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_208, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(208, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_208(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_209, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(209, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_209(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_210, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(210, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_210(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_211, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(211, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_211(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_212, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(212, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_212(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_213, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(213, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_213(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_214, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(214, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_214(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_215, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(215, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_215(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_216, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(216, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_216(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_217, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(217, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_217(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_218, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(218, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_218(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_219, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(219, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_219(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_220, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(220, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_220(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_221, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(221, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_221(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_222, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(222, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_222(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_223, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(223, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_223(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_224, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(224, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_224(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_225, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(225, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_225(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_226, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(226, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_226(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_227, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(227, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_227(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_228, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(228, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_228(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_229, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(229, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_229(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_230, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(230, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_230(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_231, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(231, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_231(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_232, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(232, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_232(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_233, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(233, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_233(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_234, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(234, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_234(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_235, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(235, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_235(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_236, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(236, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_236(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_237, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(237, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_237(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_238, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(238, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_238(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_239, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(239, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_239(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_240, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(240, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_240(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_241, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(241, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_241(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_242, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(242, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_242(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_243, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(243, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_243(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_244, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(244, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_244(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_245, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(245, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_245(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_246, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(246, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_246(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_247, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(247, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_247(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_248, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(248, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_248(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_249, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(249, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_249(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_250, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(250, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_250(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_251, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(251, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_251(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_252, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(252, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_252(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_253, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(253, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_253(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_254, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(254, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_254(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_255, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(255, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_255(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_256, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(256, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # define BOOST_PP_LIST_FOLD_LEFT_256(o, s, l) BOOST_PP_IIF(BOOST_PP_LIST_IS_CONS(l), BOOST_PP_LIST_FOLD_LEFT_257, s BOOST_PP_TUPLE_EAT_3)(o, BOOST_PP_EXPR_IIF(BOOST_PP_LIST_IS_CONS(l), o)(257, s, BOOST_PP_LIST_FIRST(l)), BOOST_PP_LIST_REST(l)) # # endif ================================================ FILE: benchmarks/boost/preprocessor/list/detail/fold_right.hpp ================================================ # /* Copyright (C) 2001 # * Housemarque Oy # * http://www.housemarque.com # * # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # */ # # /* Revised by Paul Mensonides (2002) */ # # /* See http://www.boost.org for most recent version. */ # # ifndef BOOST_PREPROCESSOR_LIST_DETAIL_FOLD_RIGHT_HPP # define BOOST_PREPROCESSOR_LIST_DETAIL_FOLD_RIGHT_HPP # # include # include # # define BOOST_PP_LIST_FOLD_RIGHT_1(o, s, l) BOOST_PP_LIST_FOLD_LEFT_1(o, s, BOOST_PP_LIST_REVERSE_D(1, l)) # define BOOST_PP_LIST_FOLD_RIGHT_2(o, s, l) BOOST_PP_LIST_FOLD_LEFT_2(o, s, BOOST_PP_LIST_REVERSE_D(2, l)) # define BOOST_PP_LIST_FOLD_RIGHT_3(o, s, l) BOOST_PP_LIST_FOLD_LEFT_3(o, s, BOOST_PP_LIST_REVERSE_D(3, l)) # define BOOST_PP_LIST_FOLD_RIGHT_4(o, s, l) BOOST_PP_LIST_FOLD_LEFT_4(o, s, BOOST_PP_LIST_REVERSE_D(4, l)) # define BOOST_PP_LIST_FOLD_RIGHT_5(o, s, l) BOOST_PP_LIST_FOLD_LEFT_5(o, s, BOOST_PP_LIST_REVERSE_D(5, l)) # define BOOST_PP_LIST_FOLD_RIGHT_6(o, s, l) BOOST_PP_LIST_FOLD_LEFT_6(o, s, BOOST_PP_LIST_REVERSE_D(6, l)) # define BOOST_PP_LIST_FOLD_RIGHT_7(o, s, l) BOOST_PP_LIST_FOLD_LEFT_7(o, s, BOOST_PP_LIST_REVERSE_D(7, l)) # define BOOST_PP_LIST_FOLD_RIGHT_8(o, s, l) BOOST_PP_LIST_FOLD_LEFT_8(o, s, BOOST_PP_LIST_REVERSE_D(8, l)) # define BOOST_PP_LIST_FOLD_RIGHT_9(o, s, l) BOOST_PP_LIST_FOLD_LEFT_9(o, s, BOOST_PP_LIST_REVERSE_D(9, l)) # define BOOST_PP_LIST_FOLD_RIGHT_10(o, s, l) BOOST_PP_LIST_FOLD_LEFT_10(o, s, BOOST_PP_LIST_REVERSE_D(10, l)) # define BOOST_PP_LIST_FOLD_RIGHT_11(o, s, l) BOOST_PP_LIST_FOLD_LEFT_11(o, s, BOOST_PP_LIST_REVERSE_D(11, l)) # define BOOST_PP_LIST_FOLD_RIGHT_12(o, s, l) BOOST_PP_LIST_FOLD_LEFT_12(o, s, BOOST_PP_LIST_REVERSE_D(12, l)) # define BOOST_PP_LIST_FOLD_RIGHT_13(o, s, l) BOOST_PP_LIST_FOLD_LEFT_13(o, s, BOOST_PP_LIST_REVERSE_D(13, l)) # define BOOST_PP_LIST_FOLD_RIGHT_14(o, s, l) BOOST_PP_LIST_FOLD_LEFT_14(o, s, BOOST_PP_LIST_REVERSE_D(14, l)) # define BOOST_PP_LIST_FOLD_RIGHT_15(o, s, l) BOOST_PP_LIST_FOLD_LEFT_15(o, s, BOOST_PP_LIST_REVERSE_D(15, l)) # define BOOST_PP_LIST_FOLD_RIGHT_16(o, s, l) BOOST_PP_LIST_FOLD_LEFT_16(o, s, BOOST_PP_LIST_REVERSE_D(16, l)) # define BOOST_PP_LIST_FOLD_RIGHT_17(o, s, l) BOOST_PP_LIST_FOLD_LEFT_17(o, s, BOOST_PP_LIST_REVERSE_D(17, l)) # define BOOST_PP_LIST_FOLD_RIGHT_18(o, s, l) BOOST_PP_LIST_FOLD_LEFT_18(o, s, BOOST_PP_LIST_REVERSE_D(18, l)) # define BOOST_PP_LIST_FOLD_RIGHT_19(o, s, l) BOOST_PP_LIST_FOLD_LEFT_19(o, s, BOOST_PP_LIST_REVERSE_D(19, l)) # define BOOST_PP_LIST_FOLD_RIGHT_20(o, s, l) BOOST_PP_LIST_FOLD_LEFT_20(o, s, BOOST_PP_LIST_REVERSE_D(20, l)) # define BOOST_PP_LIST_FOLD_RIGHT_21(o, s, l) BOOST_PP_LIST_FOLD_LEFT_21(o, s, BOOST_PP_LIST_REVERSE_D(21, l)) # define BOOST_PP_LIST_FOLD_RIGHT_22(o, s, l) BOOST_PP_LIST_FOLD_LEFT_22(o, s, BOOST_PP_LIST_REVERSE_D(22, l)) # define BOOST_PP_LIST_FOLD_RIGHT_23(o, s, l) BOOST_PP_LIST_FOLD_LEFT_23(o, s, BOOST_PP_LIST_REVERSE_D(23, l)) # define BOOST_PP_LIST_FOLD_RIGHT_24(o, s, l) BOOST_PP_LIST_FOLD_LEFT_24(o, s, BOOST_PP_LIST_REVERSE_D(24, l)) # define BOOST_PP_LIST_FOLD_RIGHT_25(o, s, l) BOOST_PP_LIST_FOLD_LEFT_25(o, s, BOOST_PP_LIST_REVERSE_D(25, l)) # define BOOST_PP_LIST_FOLD_RIGHT_26(o, s, l) BOOST_PP_LIST_FOLD_LEFT_26(o, s, BOOST_PP_LIST_REVERSE_D(26, l)) # define BOOST_PP_LIST_FOLD_RIGHT_27(o, s, l) BOOST_PP_LIST_FOLD_LEFT_27(o, s, BOOST_PP_LIST_REVERSE_D(27, l)) # define BOOST_PP_LIST_FOLD_RIGHT_28(o, s, l) BOOST_PP_LIST_FOLD_LEFT_28(o, s, BOOST_PP_LIST_REVERSE_D(28, l)) # define BOOST_PP_LIST_FOLD_RIGHT_29(o, s, l) BOOST_PP_LIST_FOLD_LEFT_29(o, s, BOOST_PP_LIST_REVERSE_D(29, l)) # define BOOST_PP_LIST_FOLD_RIGHT_30(o, s, l) BOOST_PP_LIST_FOLD_LEFT_30(o, s, BOOST_PP_LIST_REVERSE_D(30, l)) # define BOOST_PP_LIST_FOLD_RIGHT_31(o, s, l) BOOST_PP_LIST_FOLD_LEFT_31(o, s, BOOST_PP_LIST_REVERSE_D(31, l)) # define BOOST_PP_LIST_FOLD_RIGHT_32(o, s, l) BOOST_PP_LIST_FOLD_LEFT_32(o, s, BOOST_PP_LIST_REVERSE_D(32, l)) # define BOOST_PP_LIST_FOLD_RIGHT_33(o, s, l) BOOST_PP_LIST_FOLD_LEFT_33(o, s, BOOST_PP_LIST_REVERSE_D(33, l)) # define BOOST_PP_LIST_FOLD_RIGHT_34(o, s, l) BOOST_PP_LIST_FOLD_LEFT_34(o, s, BOOST_PP_LIST_REVERSE_D(34, l)) # define BOOST_PP_LIST_FOLD_RIGHT_35(o, s, l) BOOST_PP_LIST_FOLD_LEFT_35(o, s, BOOST_PP_LIST_REVERSE_D(35, l)) # define BOOST_PP_LIST_FOLD_RIGHT_36(o, s, l) BOOST_PP_LIST_FOLD_LEFT_36(o, s, BOOST_PP_LIST_REVERSE_D(36, l)) # define BOOST_PP_LIST_FOLD_RIGHT_37(o, s, l) BOOST_PP_LIST_FOLD_LEFT_37(o, s, BOOST_PP_LIST_REVERSE_D(37, l)) # define BOOST_PP_LIST_FOLD_RIGHT_38(o, s, l) BOOST_PP_LIST_FOLD_LEFT_38(o, s, BOOST_PP_LIST_REVERSE_D(38, l)) # define BOOST_PP_LIST_FOLD_RIGHT_39(o, s, l) BOOST_PP_LIST_FOLD_LEFT_39(o, s, BOOST_PP_LIST_REVERSE_D(39, l)) # define BOOST_PP_LIST_FOLD_RIGHT_40(o, s, l) BOOST_PP_LIST_FOLD_LEFT_40(o, s, BOOST_PP_LIST_REVERSE_D(40, l)) # define BOOST_PP_LIST_FOLD_RIGHT_41(o, s, l) BOOST_PP_LIST_FOLD_LEFT_41(o, s, BOOST_PP_LIST_REVERSE_D(41, l)) # define BOOST_PP_LIST_FOLD_RIGHT_42(o, s, l) BOOST_PP_LIST_FOLD_LEFT_42(o, s, BOOST_PP_LIST_REVERSE_D(42, l)) # define BOOST_PP_LIST_FOLD_RIGHT_43(o, s, l) BOOST_PP_LIST_FOLD_LEFT_43(o, s, BOOST_PP_LIST_REVERSE_D(43, l)) # define BOOST_PP_LIST_FOLD_RIGHT_44(o, s, l) BOOST_PP_LIST_FOLD_LEFT_44(o, s, BOOST_PP_LIST_REVERSE_D(44, l)) # define BOOST_PP_LIST_FOLD_RIGHT_45(o, s, l) BOOST_PP_LIST_FOLD_LEFT_45(o, s, BOOST_PP_LIST_REVERSE_D(45, l)) # define BOOST_PP_LIST_FOLD_RIGHT_46(o, s, l) BOOST_PP_LIST_FOLD_LEFT_46(o, s, BOOST_PP_LIST_REVERSE_D(46, l)) # define BOOST_PP_LIST_FOLD_RIGHT_47(o, s, l) BOOST_PP_LIST_FOLD_LEFT_47(o, s, BOOST_PP_LIST_REVERSE_D(47, l)) # define BOOST_PP_LIST_FOLD_RIGHT_48(o, s, l) BOOST_PP_LIST_FOLD_LEFT_48(o, s, BOOST_PP_LIST_REVERSE_D(48, l)) # define BOOST_PP_LIST_FOLD_RIGHT_49(o, s, l) BOOST_PP_LIST_FOLD_LEFT_49(o, s, BOOST_PP_LIST_REVERSE_D(49, l)) # define BOOST_PP_LIST_FOLD_RIGHT_50(o, s, l) BOOST_PP_LIST_FOLD_LEFT_50(o, s, BOOST_PP_LIST_REVERSE_D(50, l)) # define BOOST_PP_LIST_FOLD_RIGHT_51(o, s, l) BOOST_PP_LIST_FOLD_LEFT_51(o, s, BOOST_PP_LIST_REVERSE_D(51, l)) # define BOOST_PP_LIST_FOLD_RIGHT_52(o, s, l) BOOST_PP_LIST_FOLD_LEFT_52(o, s, BOOST_PP_LIST_REVERSE_D(52, l)) # define BOOST_PP_LIST_FOLD_RIGHT_53(o, s, l) BOOST_PP_LIST_FOLD_LEFT_53(o, s, BOOST_PP_LIST_REVERSE_D(53, l)) # define BOOST_PP_LIST_FOLD_RIGHT_54(o, s, l) BOOST_PP_LIST_FOLD_LEFT_54(o, s, BOOST_PP_LIST_REVERSE_D(54, l)) # define BOOST_PP_LIST_FOLD_RIGHT_55(o, s, l) BOOST_PP_LIST_FOLD_LEFT_55(o, s, BOOST_PP_LIST_REVERSE_D(55, l)) # define BOOST_PP_LIST_FOLD_RIGHT_56(o, s, l) BOOST_PP_LIST_FOLD_LEFT_56(o, s, BOOST_PP_LIST_REVERSE_D(56, l)) # define BOOST_PP_LIST_FOLD_RIGHT_57(o, s, l) BOOST_PP_LIST_FOLD_LEFT_57(o, s, BOOST_PP_LIST_REVERSE_D(57, l)) # define BOOST_PP_LIST_FOLD_RIGHT_58(o, s, l) BOOST_PP_LIST_FOLD_LEFT_58(o, s, BOOST_PP_LIST_REVERSE_D(58, l)) # define BOOST_PP_LIST_FOLD_RIGHT_59(o, s, l) BOOST_PP_LIST_FOLD_LEFT_59(o, s, BOOST_PP_LIST_REVERSE_D(59, l)) # define BOOST_PP_LIST_FOLD_RIGHT_60(o, s, l) BOOST_PP_LIST_FOLD_LEFT_60(o, s, BOOST_PP_LIST_REVERSE_D(60, l)) # define BOOST_PP_LIST_FOLD_RIGHT_61(o, s, l) BOOST_PP_LIST_FOLD_LEFT_61(o, s, BOOST_PP_LIST_REVERSE_D(61, l)) # define BOOST_PP_LIST_FOLD_RIGHT_62(o, s, l) BOOST_PP_LIST_FOLD_LEFT_62(o, s, BOOST_PP_LIST_REVERSE_D(62, l)) # define BOOST_PP_LIST_FOLD_RIGHT_63(o, s, l) BOOST_PP_LIST_FOLD_LEFT_63(o, s, BOOST_PP_LIST_REVERSE_D(63, l)) # define BOOST_PP_LIST_FOLD_RIGHT_64(o, s, l) BOOST_PP_LIST_FOLD_LEFT_64(o, s, BOOST_PP_LIST_REVERSE_D(64, l)) # define BOOST_PP_LIST_FOLD_RIGHT_65(o, s, l) BOOST_PP_LIST_FOLD_LEFT_65(o, s, BOOST_PP_LIST_REVERSE_D(65, l)) # define BOOST_PP_LIST_FOLD_RIGHT_66(o, s, l) BOOST_PP_LIST_FOLD_LEFT_66(o, s, BOOST_PP_LIST_REVERSE_D(66, l)) # define BOOST_PP_LIST_FOLD_RIGHT_67(o, s, l) BOOST_PP_LIST_FOLD_LEFT_67(o, s, BOOST_PP_LIST_REVERSE_D(67, l)) # define BOOST_PP_LIST_FOLD_RIGHT_68(o, s, l) BOOST_PP_LIST_FOLD_LEFT_68(o, s, BOOST_PP_LIST_REVERSE_D(68, l)) # define BOOST_PP_LIST_FOLD_RIGHT_69(o, s, l) BOOST_PP_LIST_FOLD_LEFT_69(o, s, BOOST_PP_LIST_REVERSE_D(69, l)) # define BOOST_PP_LIST_FOLD_RIGHT_70(o, s, l) BOOST_PP_LIST_FOLD_LEFT_70(o, s, BOOST_PP_LIST_REVERSE_D(70, l)) # define BOOST_PP_LIST_FOLD_RIGHT_71(o, s, l) BOOST_PP_LIST_FOLD_LEFT_71(o, s, BOOST_PP_LIST_REVERSE_D(71, l)) # define BOOST_PP_LIST_FOLD_RIGHT_72(o, s, l) BOOST_PP_LIST_FOLD_LEFT_72(o, s, BOOST_PP_LIST_REVERSE_D(72, l)) # define BOOST_PP_LIST_FOLD_RIGHT_73(o, s, l) BOOST_PP_LIST_FOLD_LEFT_73(o, s, BOOST_PP_LIST_REVERSE_D(73, l)) # define BOOST_PP_LIST_FOLD_RIGHT_74(o, s, l) BOOST_PP_LIST_FOLD_LEFT_74(o, s, BOOST_PP_LIST_REVERSE_D(74, l)) # define BOOST_PP_LIST_FOLD_RIGHT_75(o, s, l) BOOST_PP_LIST_FOLD_LEFT_75(o, s, BOOST_PP_LIST_REVERSE_D(75, l)) # define BOOST_PP_LIST_FOLD_RIGHT_76(o, s, l) BOOST_PP_LIST_FOLD_LEFT_76(o, s, BOOST_PP_LIST_REVERSE_D(76, l)) # define BOOST_PP_LIST_FOLD_RIGHT_77(o, s, l) BOOST_PP_LIST_FOLD_LEFT_77(o, s, BOOST_PP_LIST_REVERSE_D(77, l)) # define BOOST_PP_LIST_FOLD_RIGHT_78(o, s, l) BOOST_PP_LIST_FOLD_LEFT_78(o, s, BOOST_PP_LIST_REVERSE_D(78, l)) # define BOOST_PP_LIST_FOLD_RIGHT_79(o, s, l) BOOST_PP_LIST_FOLD_LEFT_79(o, s, BOOST_PP_LIST_REVERSE_D(79, l)) # define BOOST_PP_LIST_FOLD_RIGHT_80(o, s, l) BOOST_PP_LIST_FOLD_LEFT_80(o, s, BOOST_PP_LIST_REVERSE_D(80, l)) # define BOOST_PP_LIST_FOLD_RIGHT_81(o, s, l) BOOST_PP_LIST_FOLD_LEFT_81(o, s, BOOST_PP_LIST_REVERSE_D(81, l)) # define BOOST_PP_LIST_FOLD_RIGHT_82(o, s, l) BOOST_PP_LIST_FOLD_LEFT_82(o, s, BOOST_PP_LIST_REVERSE_D(82, l)) # define BOOST_PP_LIST_FOLD_RIGHT_83(o, s, l) BOOST_PP_LIST_FOLD_LEFT_83(o, s, BOOST_PP_LIST_REVERSE_D(83, l)) # define BOOST_PP_LIST_FOLD_RIGHT_84(o, s, l) BOOST_PP_LIST_FOLD_LEFT_84(o, s, BOOST_PP_LIST_REVERSE_D(84, l)) # define BOOST_PP_LIST_FOLD_RIGHT_85(o, s, l) BOOST_PP_LIST_FOLD_LEFT_85(o, s, BOOST_PP_LIST_REVERSE_D(85, l)) # define BOOST_PP_LIST_FOLD_RIGHT_86(o, s, l) BOOST_PP_LIST_FOLD_LEFT_86(o, s, BOOST_PP_LIST_REVERSE_D(86, l)) # define BOOST_PP_LIST_FOLD_RIGHT_87(o, s, l) BOOST_PP_LIST_FOLD_LEFT_87(o, s, BOOST_PP_LIST_REVERSE_D(87, l)) # define BOOST_PP_LIST_FOLD_RIGHT_88(o, s, l) BOOST_PP_LIST_FOLD_LEFT_88(o, s, BOOST_PP_LIST_REVERSE_D(88, l)) # define BOOST_PP_LIST_FOLD_RIGHT_89(o, s, l) BOOST_PP_LIST_FOLD_LEFT_89(o, s, BOOST_PP_LIST_REVERSE_D(89, l)) # define BOOST_PP_LIST_FOLD_RIGHT_90(o, s, l) BOOST_PP_LIST_FOLD_LEFT_90(o, s, BOOST_PP_LIST_REVERSE_D(90, l)) # define BOOST_PP_LIST_FOLD_RIGHT_91(o, s, l) BOOST_PP_LIST_FOLD_LEFT_91(o, s, BOOST_PP_LIST_REVERSE_D(91, l)) # define BOOST_PP_LIST_FOLD_RIGHT_92(o, s, l) BOOST_PP_LIST_FOLD_LEFT_92(o, s, BOOST_PP_LIST_REVERSE_D(92, l)) # define BOOST_PP_LIST_FOLD_RIGHT_93(o, s, l) BOOST_PP_LIST_FOLD_LEFT_93(o, s, BOOST_PP_LIST_REVERSE_D(93, l)) # define BOOST_PP_LIST_FOLD_RIGHT_94(o, s, l) BOOST_PP_LIST_FOLD_LEFT_94(o, s, BOOST_PP_LIST_REVERSE_D(94, l)) # define BOOST_PP_LIST_FOLD_RIGHT_95(o, s, l) BOOST_PP_LIST_FOLD_LEFT_95(o, s, BOOST_PP_LIST_REVERSE_D(95, l)) # define BOOST_PP_LIST_FOLD_RIGHT_96(o, s, l) BOOST_PP_LIST_FOLD_LEFT_96(o, s, BOOST_PP_LIST_REVERSE_D(96, l)) # define BOOST_PP_LIST_FOLD_RIGHT_97(o, s, l) BOOST_PP_LIST_FOLD_LEFT_97(o, s, BOOST_PP_LIST_REVERSE_D(97, l)) # define BOOST_PP_LIST_FOLD_RIGHT_98(o, s, l) BOOST_PP_LIST_FOLD_LEFT_98(o, s, BOOST_PP_LIST_REVERSE_D(98, l)) # define BOOST_PP_LIST_FOLD_RIGHT_99(o, s, l) BOOST_PP_LIST_FOLD_LEFT_99(o, s, BOOST_PP_LIST_REVERSE_D(99, l)) # define BOOST_PP_LIST_FOLD_RIGHT_100(o, s, l) BOOST_PP_LIST_FOLD_LEFT_100(o, s, BOOST_PP_LIST_REVERSE_D(100, l)) # define BOOST_PP_LIST_FOLD_RIGHT_101(o, s, l) BOOST_PP_LIST_FOLD_LEFT_101(o, s, BOOST_PP_LIST_REVERSE_D(101, l)) # define BOOST_PP_LIST_FOLD_RIGHT_102(o, s, l) BOOST_PP_LIST_FOLD_LEFT_102(o, s, BOOST_PP_LIST_REVERSE_D(102, l)) # define BOOST_PP_LIST_FOLD_RIGHT_103(o, s, l) BOOST_PP_LIST_FOLD_LEFT_103(o, s, BOOST_PP_LIST_REVERSE_D(103, l)) # define BOOST_PP_LIST_FOLD_RIGHT_104(o, s, l) BOOST_PP_LIST_FOLD_LEFT_104(o, s, BOOST_PP_LIST_REVERSE_D(104, l)) # define BOOST_PP_LIST_FOLD_RIGHT_105(o, s, l) BOOST_PP_LIST_FOLD_LEFT_105(o, s, BOOST_PP_LIST_REVERSE_D(105, l)) # define BOOST_PP_LIST_FOLD_RIGHT_106(o, s, l) BOOST_PP_LIST_FOLD_LEFT_106(o, s, BOOST_PP_LIST_REVERSE_D(106, l)) # define BOOST_PP_LIST_FOLD_RIGHT_107(o, s, l) BOOST_PP_LIST_FOLD_LEFT_107(o, s, BOOST_PP_LIST_REVERSE_D(107, l)) # define BOOST_PP_LIST_FOLD_RIGHT_108(o, s, l) BOOST_PP_LIST_FOLD_LEFT_108(o, s, BOOST_PP_LIST_REVERSE_D(108, l)) # define BOOST_PP_LIST_FOLD_RIGHT_109(o, s, l) BOOST_PP_LIST_FOLD_LEFT_109(o, s, BOOST_PP_LIST_REVERSE_D(109, l)) # define BOOST_PP_LIST_FOLD_RIGHT_110(o, s, l) BOOST_PP_LIST_FOLD_LEFT_110(o, s, BOOST_PP_LIST_REVERSE_D(110, l)) # define BOOST_PP_LIST_FOLD_RIGHT_111(o, s, l) BOOST_PP_LIST_FOLD_LEFT_111(o, s, BOOST_PP_LIST_REVERSE_D(111, l)) # define BOOST_PP_LIST_FOLD_RIGHT_112(o, s, l) BOOST_PP_LIST_FOLD_LEFT_112(o, s, BOOST_PP_LIST_REVERSE_D(112, l)) # define BOOST_PP_LIST_FOLD_RIGHT_113(o, s, l) BOOST_PP_LIST_FOLD_LEFT_113(o, s, BOOST_PP_LIST_REVERSE_D(113, l)) # define BOOST_PP_LIST_FOLD_RIGHT_114(o, s, l) BOOST_PP_LIST_FOLD_LEFT_114(o, s, BOOST_PP_LIST_REVERSE_D(114, l)) # define BOOST_PP_LIST_FOLD_RIGHT_115(o, s, l) BOOST_PP_LIST_FOLD_LEFT_115(o, s, BOOST_PP_LIST_REVERSE_D(115, l)) # define BOOST_PP_LIST_FOLD_RIGHT_116(o, s, l) BOOST_PP_LIST_FOLD_LEFT_116(o, s, BOOST_PP_LIST_REVERSE_D(116, l)) # define BOOST_PP_LIST_FOLD_RIGHT_117(o, s, l) BOOST_PP_LIST_FOLD_LEFT_117(o, s, BOOST_PP_LIST_REVERSE_D(117, l)) # define BOOST_PP_LIST_FOLD_RIGHT_118(o, s, l) BOOST_PP_LIST_FOLD_LEFT_118(o, s, BOOST_PP_LIST_REVERSE_D(118, l)) # define BOOST_PP_LIST_FOLD_RIGHT_119(o, s, l) BOOST_PP_LIST_FOLD_LEFT_119(o, s, BOOST_PP_LIST_REVERSE_D(119, l)) # define BOOST_PP_LIST_FOLD_RIGHT_120(o, s, l) BOOST_PP_LIST_FOLD_LEFT_120(o, s, BOOST_PP_LIST_REVERSE_D(120, l)) # define BOOST_PP_LIST_FOLD_RIGHT_121(o, s, l) BOOST_PP_LIST_FOLD_LEFT_121(o, s, BOOST_PP_LIST_REVERSE_D(121, l)) # define BOOST_PP_LIST_FOLD_RIGHT_122(o, s, l) BOOST_PP_LIST_FOLD_LEFT_122(o, s, BOOST_PP_LIST_REVERSE_D(122, l)) # define BOOST_PP_LIST_FOLD_RIGHT_123(o, s, l) BOOST_PP_LIST_FOLD_LEFT_123(o, s, BOOST_PP_LIST_REVERSE_D(123, l)) # define BOOST_PP_LIST_FOLD_RIGHT_124(o, s, l) BOOST_PP_LIST_FOLD_LEFT_124(o, s, BOOST_PP_LIST_REVERSE_D(124, l)) # define BOOST_PP_LIST_FOLD_RIGHT_125(o, s, l) BOOST_PP_LIST_FOLD_LEFT_125(o, s, BOOST_PP_LIST_REVERSE_D(125, l)) # define BOOST_PP_LIST_FOLD_RIGHT_126(o, s, l) BOOST_PP_LIST_FOLD_LEFT_126(o, s, BOOST_PP_LIST_REVERSE_D(126, l)) # define BOOST_PP_LIST_FOLD_RIGHT_127(o, s, l) BOOST_PP_LIST_FOLD_LEFT_127(o, s, BOOST_PP_LIST_REVERSE_D(127, l)) # define BOOST_PP_LIST_FOLD_RIGHT_128(o, s, l) BOOST_PP_LIST_FOLD_LEFT_128(o, s, BOOST_PP_LIST_REVERSE_D(128, l)) # define BOOST_PP_LIST_FOLD_RIGHT_129(o, s, l) BOOST_PP_LIST_FOLD_LEFT_129(o, s, BOOST_PP_LIST_REVERSE_D(129, l)) # define BOOST_PP_LIST_FOLD_RIGHT_130(o, s, l) BOOST_PP_LIST_FOLD_LEFT_130(o, s, BOOST_PP_LIST_REVERSE_D(130, l)) # define BOOST_PP_LIST_FOLD_RIGHT_131(o, s, l) BOOST_PP_LIST_FOLD_LEFT_131(o, s, BOOST_PP_LIST_REVERSE_D(131, l)) # define BOOST_PP_LIST_FOLD_RIGHT_132(o, s, l) BOOST_PP_LIST_FOLD_LEFT_132(o, s, BOOST_PP_LIST_REVERSE_D(132, l)) # define BOOST_PP_LIST_FOLD_RIGHT_133(o, s, l) BOOST_PP_LIST_FOLD_LEFT_133(o, s, BOOST_PP_LIST_REVERSE_D(133, l)) # define BOOST_PP_LIST_FOLD_RIGHT_134(o, s, l) BOOST_PP_LIST_FOLD_LEFT_134(o, s, BOOST_PP_LIST_REVERSE_D(134, l)) # define BOOST_PP_LIST_FOLD_RIGHT_135(o, s, l) BOOST_PP_LIST_FOLD_LEFT_135(o, s, BOOST_PP_LIST_REVERSE_D(135, l)) # define BOOST_PP_LIST_FOLD_RIGHT_136(o, s, l) BOOST_PP_LIST_FOLD_LEFT_136(o, s, BOOST_PP_LIST_REVERSE_D(136, l)) # define BOOST_PP_LIST_FOLD_RIGHT_137(o, s, l) BOOST_PP_LIST_FOLD_LEFT_137(o, s, BOOST_PP_LIST_REVERSE_D(137, l)) # define BOOST_PP_LIST_FOLD_RIGHT_138(o, s, l) BOOST_PP_LIST_FOLD_LEFT_138(o, s, BOOST_PP_LIST_REVERSE_D(138, l)) # define BOOST_PP_LIST_FOLD_RIGHT_139(o, s, l) BOOST_PP_LIST_FOLD_LEFT_139(o, s, BOOST_PP_LIST_REVERSE_D(139, l)) # define BOOST_PP_LIST_FOLD_RIGHT_140(o, s, l) BOOST_PP_LIST_FOLD_LEFT_140(o, s, BOOST_PP_LIST_REVERSE_D(140, l)) # define BOOST_PP_LIST_FOLD_RIGHT_141(o, s, l) BOOST_PP_LIST_FOLD_LEFT_141(o, s, BOOST_PP_LIST_REVERSE_D(141, l)) # define BOOST_PP_LIST_FOLD_RIGHT_142(o, s, l) BOOST_PP_LIST_FOLD_LEFT_142(o, s, BOOST_PP_LIST_REVERSE_D(142, l)) # define BOOST_PP_LIST_FOLD_RIGHT_143(o, s, l) BOOST_PP_LIST_FOLD_LEFT_143(o, s, BOOST_PP_LIST_REVERSE_D(143, l)) # define BOOST_PP_LIST_FOLD_RIGHT_144(o, s, l) BOOST_PP_LIST_FOLD_LEFT_144(o, s, BOOST_PP_LIST_REVERSE_D(144, l)) # define BOOST_PP_LIST_FOLD_RIGHT_145(o, s, l) BOOST_PP_LIST_FOLD_LEFT_145(o, s, BOOST_PP_LIST_REVERSE_D(145, l)) # define BOOST_PP_LIST_FOLD_RIGHT_146(o, s, l) BOOST_PP_LIST_FOLD_LEFT_146(o, s, BOOST_PP_LIST_REVERSE_D(146, l)) # define BOOST_PP_LIST_FOLD_RIGHT_147(o, s, l) BOOST_PP_LIST_FOLD_LEFT_147(o, s, BOOST_PP_LIST_REVERSE_D(147, l)) # define BOOST_PP_LIST_FOLD_RIGHT_148(o, s, l) BOOST_PP_LIST_FOLD_LEFT_148(o, s, BOOST_PP_LIST_REVERSE_D(148, l)) # define BOOST_PP_LIST_FOLD_RIGHT_149(o, s, l) BOOST_PP_LIST_FOLD_LEFT_149(o, s, BOOST_PP_LIST_REVERSE_D(149, l)) # define BOOST_PP_LIST_FOLD_RIGHT_150(o, s, l) BOOST_PP_LIST_FOLD_LEFT_150(o, s, BOOST_PP_LIST_REVERSE_D(150, l)) # define BOOST_PP_LIST_FOLD_RIGHT_151(o, s, l) BOOST_PP_LIST_FOLD_LEFT_151(o, s, BOOST_PP_LIST_REVERSE_D(151, l)) # define BOOST_PP_LIST_FOLD_RIGHT_152(o, s, l) BOOST_PP_LIST_FOLD_LEFT_152(o, s, BOOST_PP_LIST_REVERSE_D(152, l)) # define BOOST_PP_LIST_FOLD_RIGHT_153(o, s, l) BOOST_PP_LIST_FOLD_LEFT_153(o, s, BOOST_PP_LIST_REVERSE_D(153, l)) # define BOOST_PP_LIST_FOLD_RIGHT_154(o, s, l) BOOST_PP_LIST_FOLD_LEFT_154(o, s, BOOST_PP_LIST_REVERSE_D(154, l)) # define BOOST_PP_LIST_FOLD_RIGHT_155(o, s, l) BOOST_PP_LIST_FOLD_LEFT_155(o, s, BOOST_PP_LIST_REVERSE_D(155, l)) # define BOOST_PP_LIST_FOLD_RIGHT_156(o, s, l) BOOST_PP_LIST_FOLD_LEFT_156(o, s, BOOST_PP_LIST_REVERSE_D(156, l)) # define BOOST_PP_LIST_FOLD_RIGHT_157(o, s, l) BOOST_PP_LIST_FOLD_LEFT_157(o, s, BOOST_PP_LIST_REVERSE_D(157, l)) # define BOOST_PP_LIST_FOLD_RIGHT_158(o, s, l) BOOST_PP_LIST_FOLD_LEFT_158(o, s, BOOST_PP_LIST_REVERSE_D(158, l)) # define BOOST_PP_LIST_FOLD_RIGHT_159(o, s, l) BOOST_PP_LIST_FOLD_LEFT_159(o, s, BOOST_PP_LIST_REVERSE_D(159, l)) # define BOOST_PP_LIST_FOLD_RIGHT_160(o, s, l) BOOST_PP_LIST_FOLD_LEFT_160(o, s, BOOST_PP_LIST_REVERSE_D(160, l)) # define BOOST_PP_LIST_FOLD_RIGHT_161(o, s, l) BOOST_PP_LIST_FOLD_LEFT_161(o, s, BOOST_PP_LIST_REVERSE_D(161, l)) # define BOOST_PP_LIST_FOLD_RIGHT_162(o, s, l) BOOST_PP_LIST_FOLD_LEFT_162(o, s, BOOST_PP_LIST_REVERSE_D(162, l)) # define BOOST_PP_LIST_FOLD_RIGHT_163(o, s, l) BOOST_PP_LIST_FOLD_LEFT_163(o, s, BOOST_PP_LIST_REVERSE_D(163, l)) # define BOOST_PP_LIST_FOLD_RIGHT_164(o, s, l) BOOST_PP_LIST_FOLD_LEFT_164(o, s, BOOST_PP_LIST_REVERSE_D(164, l)) # define BOOST_PP_LIST_FOLD_RIGHT_165(o, s, l) BOOST_PP_LIST_FOLD_LEFT_165(o, s, BOOST_PP_LIST_REVERSE_D(165, l)) # define BOOST_PP_LIST_FOLD_RIGHT_166(o, s, l) BOOST_PP_LIST_FOLD_LEFT_166(o, s, BOOST_PP_LIST_REVERSE_D(166, l)) # define BOOST_PP_LIST_FOLD_RIGHT_167(o, s, l) BOOST_PP_LIST_FOLD_LEFT_167(o, s, BOOST_PP_LIST_REVERSE_D(167, l)) # define BOOST_PP_LIST_FOLD_RIGHT_168(o, s, l) BOOST_PP_LIST_FOLD_LEFT_168(o, s, BOOST_PP_LIST_REVERSE_D(168, l)) # define BOOST_PP_LIST_FOLD_RIGHT_169(o, s, l) BOOST_PP_LIST_FOLD_LEFT_169(o, s, BOOST_PP_LIST_REVERSE_D(169, l)) # define BOOST_PP_LIST_FOLD_RIGHT_170(o, s, l) BOOST_PP_LIST_FOLD_LEFT_170(o, s, BOOST_PP_LIST_REVERSE_D(170, l)) # define BOOST_PP_LIST_FOLD_RIGHT_171(o, s, l) BOOST_PP_LIST_FOLD_LEFT_171(o, s, BOOST_PP_LIST_REVERSE_D(171, l)) # define BOOST_PP_LIST_FOLD_RIGHT_172(o, s, l) BOOST_PP_LIST_FOLD_LEFT_172(o, s, BOOST_PP_LIST_REVERSE_D(172, l)) # define BOOST_PP_LIST_FOLD_RIGHT_173(o, s, l) BOOST_PP_LIST_FOLD_LEFT_173(o, s, BOOST_PP_LIST_REVERSE_D(173, l)) # define BOOST_PP_LIST_FOLD_RIGHT_174(o, s, l) BOOST_PP_LIST_FOLD_LEFT_174(o, s, BOOST_PP_LIST_REVERSE_D(174, l)) # define BOOST_PP_LIST_FOLD_RIGHT_175(o, s, l) BOOST_PP_LIST_FOLD_LEFT_175(o, s, BOOST_PP_LIST_REVERSE_D(175, l)) # define BOOST_PP_LIST_FOLD_RIGHT_176(o, s, l) BOOST_PP_LIST_FOLD_LEFT_176(o, s, BOOST_PP_LIST_REVERSE_D(176, l)) # define BOOST_PP_LIST_FOLD_RIGHT_177(o, s, l) BOOST_PP_LIST_FOLD_LEFT_177(o, s, BOOST_PP_LIST_REVERSE_D(177, l)) # define BOOST_PP_LIST_FOLD_RIGHT_178(o, s, l) BOOST_PP_LIST_FOLD_LEFT_178(o, s, BOOST_PP_LIST_REVERSE_D(178, l)) # define BOOST_PP_LIST_FOLD_RIGHT_179(o, s, l) BOOST_PP_LIST_FOLD_LEFT_179(o, s, BOOST_PP_LIST_REVERSE_D(179, l)) # define BOOST_PP_LIST_FOLD_RIGHT_180(o, s, l) BOOST_PP_LIST_FOLD_LEFT_180(o, s, BOOST_PP_LIST_REVERSE_D(180, l)) # define BOOST_PP_LIST_FOLD_RIGHT_181(o, s, l) BOOST_PP_LIST_FOLD_LEFT_181(o, s, BOOST_PP_LIST_REVERSE_D(181, l)) # define BOOST_PP_LIST_FOLD_RIGHT_182(o, s, l) BOOST_PP_LIST_FOLD_LEFT_182(o, s, BOOST_PP_LIST_REVERSE_D(182, l)) # define BOOST_PP_LIST_FOLD_RIGHT_183(o, s, l) BOOST_PP_LIST_FOLD_LEFT_183(o, s, BOOST_PP_LIST_REVERSE_D(183, l)) # define BOOST_PP_LIST_FOLD_RIGHT_184(o, s, l) BOOST_PP_LIST_FOLD_LEFT_184(o, s, BOOST_PP_LIST_REVERSE_D(184, l)) # define BOOST_PP_LIST_FOLD_RIGHT_185(o, s, l) BOOST_PP_LIST_FOLD_LEFT_185(o, s, BOOST_PP_LIST_REVERSE_D(185, l)) # define BOOST_PP_LIST_FOLD_RIGHT_186(o, s, l) BOOST_PP_LIST_FOLD_LEFT_186(o, s, BOOST_PP_LIST_REVERSE_D(186, l)) # define BOOST_PP_LIST_FOLD_RIGHT_187(o, s, l) BOOST_PP_LIST_FOLD_LEFT_187(o, s, BOOST_PP_LIST_REVERSE_D(187, l)) # define BOOST_PP_LIST_FOLD_RIGHT_188(o, s, l) BOOST_PP_LIST_FOLD_LEFT_188(o, s, BOOST_PP_LIST_REVERSE_D(188, l)) # define BOOST_PP_LIST_FOLD_RIGHT_189(o, s, l) BOOST_PP_LIST_FOLD_LEFT_189(o, s, BOOST_PP_LIST_REVERSE_D(189, l)) # define BOOST_PP_LIST_FOLD_RIGHT_190(o, s, l) BOOST_PP_LIST_FOLD_LEFT_190(o, s, BOOST_PP_LIST_REVERSE_D(190, l)) # define BOOST_PP_LIST_FOLD_RIGHT_191(o, s, l) BOOST_PP_LIST_FOLD_LEFT_191(o, s, BOOST_PP_LIST_REVERSE_D(191, l)) # define BOOST_PP_LIST_FOLD_RIGHT_192(o, s, l) BOOST_PP_LIST_FOLD_LEFT_192(o, s, BOOST_PP_LIST_REVERSE_D(192, l)) # define BOOST_PP_LIST_FOLD_RIGHT_193(o, s, l) BOOST_PP_LIST_FOLD_LEFT_193(o, s, BOOST_PP_LIST_REVERSE_D(193, l)) # define BOOST_PP_LIST_FOLD_RIGHT_194(o, s, l) BOOST_PP_LIST_FOLD_LEFT_194(o, s, BOOST_PP_LIST_REVERSE_D(194, l)) # define BOOST_PP_LIST_FOLD_RIGHT_195(o, s, l) BOOST_PP_LIST_FOLD_LEFT_195(o, s, BOOST_PP_LIST_REVERSE_D(195, l)) # define BOOST_PP_LIST_FOLD_RIGHT_196(o, s, l) BOOST_PP_LIST_FOLD_LEFT_196(o, s, BOOST_PP_LIST_REVERSE_D(196, l)) # define BOOST_PP_LIST_FOLD_RIGHT_197(o, s, l) BOOST_PP_LIST_FOLD_LEFT_197(o, s, BOOST_PP_LIST_REVERSE_D(197, l)) # define BOOST_PP_LIST_FOLD_RIGHT_198(o, s, l) BOOST_PP_LIST_FOLD_LEFT_198(o, s, BOOST_PP_LIST_REVERSE_D(198, l)) # define BOOST_PP_LIST_FOLD_RIGHT_199(o, s, l) BOOST_PP_LIST_FOLD_LEFT_199(o, s, BOOST_PP_LIST_REVERSE_D(199, l)) # define BOOST_PP_LIST_FOLD_RIGHT_200(o, s, l) BOOST_PP_LIST_FOLD_LEFT_200(o, s, BOOST_PP_LIST_REVERSE_D(200, l)) # define BOOST_PP_LIST_FOLD_RIGHT_201(o, s, l) BOOST_PP_LIST_FOLD_LEFT_201(o, s, BOOST_PP_LIST_REVERSE_D(201, l)) # define BOOST_PP_LIST_FOLD_RIGHT_202(o, s, l) BOOST_PP_LIST_FOLD_LEFT_202(o, s, BOOST_PP_LIST_REVERSE_D(202, l)) # define BOOST_PP_LIST_FOLD_RIGHT_203(o, s, l) BOOST_PP_LIST_FOLD_LEFT_203(o, s, BOOST_PP_LIST_REVERSE_D(203, l)) # define BOOST_PP_LIST_FOLD_RIGHT_204(o, s, l) BOOST_PP_LIST_FOLD_LEFT_204(o, s, BOOST_PP_LIST_REVERSE_D(204, l)) # define BOOST_PP_LIST_FOLD_RIGHT_205(o, s, l) BOOST_PP_LIST_FOLD_LEFT_205(o, s, BOOST_PP_LIST_REVERSE_D(205, l)) # define BOOST_PP_LIST_FOLD_RIGHT_206(o, s, l) BOOST_PP_LIST_FOLD_LEFT_206(o, s, BOOST_PP_LIST_REVERSE_D(206, l)) # define BOOST_PP_LIST_FOLD_RIGHT_207(o, s, l) BOOST_PP_LIST_FOLD_LEFT_207(o, s, BOOST_PP_LIST_REVERSE_D(207, l)) # define BOOST_PP_LIST_FOLD_RIGHT_208(o, s, l) BOOST_PP_LIST_FOLD_LEFT_208(o, s, BOOST_PP_LIST_REVERSE_D(208, l)) # define BOOST_PP_LIST_FOLD_RIGHT_209(o, s, l) BOOST_PP_LIST_FOLD_LEFT_209(o, s, BOOST_PP_LIST_REVERSE_D(209, l)) # define BOOST_PP_LIST_FOLD_RIGHT_210(o, s, l) BOOST_PP_LIST_FOLD_LEFT_210(o, s, BOOST_PP_LIST_REVERSE_D(210, l)) # define BOOST_PP_LIST_FOLD_RIGHT_211(o, s, l) BOOST_PP_LIST_FOLD_LEFT_211(o, s, BOOST_PP_LIST_REVERSE_D(211, l)) # define BOOST_PP_LIST_FOLD_RIGHT_212(o, s, l) BOOST_PP_LIST_FOLD_LEFT_212(o, s, BOOST_PP_LIST_REVERSE_D(212, l)) # define BOOST_PP_LIST_FOLD_RIGHT_213(o, s, l) BOOST_PP_LIST_FOLD_LEFT_213(o, s, BOOST_PP_LIST_REVERSE_D(213, l)) # define BOOST_PP_LIST_FOLD_RIGHT_214(o, s, l) BOOST_PP_LIST_FOLD_LEFT_214(o, s, BOOST_PP_LIST_REVERSE_D(214, l)) # define BOOST_PP_LIST_FOLD_RIGHT_215(o, s, l) BOOST_PP_LIST_FOLD_LEFT_215(o, s, BOOST_PP_LIST_REVERSE_D(215, l)) # define BOOST_PP_LIST_FOLD_RIGHT_216(o, s, l) BOOST_PP_LIST_FOLD_LEFT_216(o, s, BOOST_PP_LIST_REVERSE_D(216, l)) # define BOOST_PP_LIST_FOLD_RIGHT_217(o, s, l) BOOST_PP_LIST_FOLD_LEFT_217(o, s, BOOST_PP_LIST_REVERSE_D(217, l)) # define BOOST_PP_LIST_FOLD_RIGHT_218(o, s, l) BOOST_PP_LIST_FOLD_LEFT_218(o, s, BOOST_PP_LIST_REVERSE_D(218, l)) # define BOOST_PP_LIST_FOLD_RIGHT_219(o, s, l) BOOST_PP_LIST_FOLD_LEFT_219(o, s, BOOST_PP_LIST_REVERSE_D(219, l)) # define BOOST_PP_LIST_FOLD_RIGHT_220(o, s, l) BOOST_PP_LIST_FOLD_LEFT_220(o, s, BOOST_PP_LIST_REVERSE_D(220, l)) # define BOOST_PP_LIST_FOLD_RIGHT_221(o, s, l) BOOST_PP_LIST_FOLD_LEFT_221(o, s, BOOST_PP_LIST_REVERSE_D(221, l)) # define BOOST_PP_LIST_FOLD_RIGHT_222(o, s, l) BOOST_PP_LIST_FOLD_LEFT_222(o, s, BOOST_PP_LIST_REVERSE_D(222, l)) # define BOOST_PP_LIST_FOLD_RIGHT_223(o, s, l) BOOST_PP_LIST_FOLD_LEFT_223(o, s, BOOST_PP_LIST_REVERSE_D(223, l)) # define BOOST_PP_LIST_FOLD_RIGHT_224(o, s, l) BOOST_PP_LIST_FOLD_LEFT_224(o, s, BOOST_PP_LIST_REVERSE_D(224, l)) # define BOOST_PP_LIST_FOLD_RIGHT_225(o, s, l) BOOST_PP_LIST_FOLD_LEFT_225(o, s, BOOST_PP_LIST_REVERSE_D(225, l)) # define BOOST_PP_LIST_FOLD_RIGHT_226(o, s, l) BOOST_PP_LIST_FOLD_LEFT_226(o, s, BOOST_PP_LIST_REVERSE_D(226, l)) # define BOOST_PP_LIST_FOLD_RIGHT_227(o, s, l) BOOST_PP_LIST_FOLD_LEFT_227(o, s, BOOST_PP_LIST_REVERSE_D(227, l)) # define BOOST_PP_LIST_FOLD_RIGHT_228(o, s, l) BOOST_PP_LIST_FOLD_LEFT_228(o, s, BOOST_PP_LIST_REVERSE_D(228, l)) # define BOOST_PP_LIST_FOLD_RIGHT_229(o, s, l) BOOST_PP_LIST_FOLD_LEFT_229(o, s, BOOST_PP_LIST_REVERSE_D(229, l)) # define BOOST_PP_LIST_FOLD_RIGHT_230(o, s, l) BOOST_PP_LIST_FOLD_LEFT_230(o, s, BOOST_PP_LIST_REVERSE_D(230, l)) # define BOOST_PP_LIST_FOLD_RIGHT_231(o, s, l) BOOST_PP_LIST_FOLD_LEFT_231(o, s, BOOST_PP_LIST_REVERSE_D(231, l)) # define BOOST_PP_LIST_FOLD_RIGHT_232(o, s, l) BOOST_PP_LIST_FOLD_LEFT_232(o, s, BOOST_PP_LIST_REVERSE_D(232, l)) # define BOOST_PP_LIST_FOLD_RIGHT_233(o, s, l) BOOST_PP_LIST_FOLD_LEFT_233(o, s, BOOST_PP_LIST_REVERSE_D(233, l)) # define BOOST_PP_LIST_FOLD_RIGHT_234(o, s, l) BOOST_PP_LIST_FOLD_LEFT_234(o, s, BOOST_PP_LIST_REVERSE_D(234, l)) # define BOOST_PP_LIST_FOLD_RIGHT_235(o, s, l) BOOST_PP_LIST_FOLD_LEFT_235(o, s, BOOST_PP_LIST_REVERSE_D(235, l)) # define BOOST_PP_LIST_FOLD_RIGHT_236(o, s, l) BOOST_PP_LIST_FOLD_LEFT_236(o, s, BOOST_PP_LIST_REVERSE_D(236, l)) # define BOOST_PP_LIST_FOLD_RIGHT_237(o, s, l) BOOST_PP_LIST_FOLD_LEFT_237(o, s, BOOST_PP_LIST_REVERSE_D(237, l)) # define BOOST_PP_LIST_FOLD_RIGHT_238(o, s, l) BOOST_PP_LIST_FOLD_LEFT_238(o, s, BOOST_PP_LIST_REVERSE_D(238, l)) # define BOOST_PP_LIST_FOLD_RIGHT_239(o, s, l) BOOST_PP_LIST_FOLD_LEFT_239(o, s, BOOST_PP_LIST_REVERSE_D(239, l)) # define BOOST_PP_LIST_FOLD_RIGHT_240(o, s, l) BOOST_PP_LIST_FOLD_LEFT_240(o, s, BOOST_PP_LIST_REVERSE_D(240, l)) # define BOOST_PP_LIST_FOLD_RIGHT_241(o, s, l) BOOST_PP_LIST_FOLD_LEFT_241(o, s, BOOST_PP_LIST_REVERSE_D(241, l)) # define BOOST_PP_LIST_FOLD_RIGHT_242(o, s, l) BOOST_PP_LIST_FOLD_LEFT_242(o, s, BOOST_PP_LIST_REVERSE_D(242, l)) # define BOOST_PP_LIST_FOLD_RIGHT_243(o, s, l) BOOST_PP_LIST_FOLD_LEFT_243(o, s, BOOST_PP_LIST_REVERSE_D(243, l)) # define BOOST_PP_LIST_FOLD_RIGHT_244(o, s, l) BOOST_PP_LIST_FOLD_LEFT_244(o, s, BOOST_PP_LIST_REVERSE_D(244, l)) # define BOOST_PP_LIST_FOLD_RIGHT_245(o, s, l) BOOST_PP_LIST_FOLD_LEFT_245(o, s, BOOST_PP_LIST_REVERSE_D(245, l)) # define BOOST_PP_LIST_FOLD_RIGHT_246(o, s, l) BOOST_PP_LIST_FOLD_LEFT_246(o, s, BOOST_PP_LIST_REVERSE_D(246, l)) # define BOOST_PP_LIST_FOLD_RIGHT_247(o, s, l) BOOST_PP_LIST_FOLD_LEFT_247(o, s, BOOST_PP_LIST_REVERSE_D(247, l)) # define BOOST_PP_LIST_FOLD_RIGHT_248(o, s, l) BOOST_PP_LIST_FOLD_LEFT_248(o, s, BOOST_PP_LIST_REVERSE_D(248, l)) # define BOOST_PP_LIST_FOLD_RIGHT_249(o, s, l) BOOST_PP_LIST_FOLD_LEFT_249(o, s, BOOST_PP_LIST_REVERSE_D(249, l)) # define BOOST_PP_LIST_FOLD_RIGHT_250(o, s, l) BOOST_PP_LIST_FOLD_LEFT_250(o, s, BOOST_PP_LIST_REVERSE_D(250, l)) # define BOOST_PP_LIST_FOLD_RIGHT_251(o, s, l) BOOST_PP_LIST_FOLD_LEFT_251(o, s, BOOST_PP_LIST_REVERSE_D(251, l)) # define BOOST_PP_LIST_FOLD_RIGHT_252(o, s, l) BOOST_PP_LIST_FOLD_LEFT_252(o, s, BOOST_PP_LIST_REVERSE_D(252, l)) # define BOOST_PP_LIST_FOLD_RIGHT_253(o, s, l) BOOST_PP_LIST_FOLD_LEFT_253(o, s, BOOST_PP_LIST_REVERSE_D(253, l)) # define BOOST_PP_LIST_FOLD_RIGHT_254(o, s, l) BOOST_PP_LIST_FOLD_LEFT_254(o, s, BOOST_PP_LIST_REVERSE_D(254, l)) # define BOOST_PP_LIST_FOLD_RIGHT_255(o, s, l) BOOST_PP_LIST_FOLD_LEFT_255(o, s, BOOST_PP_LIST_REVERSE_D(255, l)) # define BOOST_PP_LIST_FOLD_RIGHT_256(o, s, l) BOOST_PP_LIST_FOLD_LEFT_256(o, s, BOOST_PP_LIST_REVERSE_D(256, l)) # # endif ================================================ FILE: benchmarks/boost/preprocessor/list/fold_left.hpp ================================================ # /* Copyright (C) 2001 # * Housemarque Oy # * http://www.housemarque.com # * # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # */ # # /* Revised by Paul Mensonides (2002) */ # # /* See http://www.boost.org for most recent version. */ # # ifndef BOOST_PREPROCESSOR_LIST_FOLD_LEFT_HPP # define BOOST_PREPROCESSOR_LIST_FOLD_LEFT_HPP # # include # include # include # include # # /* BOOST_PP_LIST_FOLD_LEFT */ # # if 0 # define BOOST_PP_LIST_FOLD_LEFT(op, state, list) # endif # # define BOOST_PP_LIST_FOLD_LEFT BOOST_PP_CAT(BOOST_PP_LIST_FOLD_LEFT_, BOOST_PP_AUTO_REC(BOOST_PP_WHILE_P, 256)) # # define BOOST_PP_LIST_FOLD_LEFT_257(o, s, l) BOOST_PP_ERROR(0x0004) # # define BOOST_PP_LIST_FOLD_LEFT_D(d, o, s, l) BOOST_PP_LIST_FOLD_LEFT_ ## d(o, s, l) # define BOOST_PP_LIST_FOLD_LEFT_2ND BOOST_PP_LIST_FOLD_LEFT # define BOOST_PP_LIST_FOLD_LEFT_2ND_D BOOST_PP_LIST_FOLD_LEFT_D # # if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() # include # elif BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_DMC() # include # else # include # endif # # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_NIL 1 # # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_1(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_2(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_3(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_4(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_5(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_6(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_7(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_8(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_9(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_10(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_11(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_12(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_13(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_14(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_15(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_16(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_17(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_18(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_19(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_20(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_21(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_22(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_23(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_24(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_25(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_26(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_27(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_28(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_29(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_30(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_31(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_32(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_33(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_34(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_35(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_36(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_37(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_38(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_39(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_40(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_41(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_42(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_43(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_44(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_45(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_46(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_47(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_48(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_49(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_50(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_51(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_52(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_53(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_54(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_55(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_56(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_57(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_58(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_59(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_60(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_61(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_62(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_63(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_64(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_65(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_66(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_67(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_68(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_69(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_70(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_71(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_72(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_73(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_74(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_75(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_76(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_77(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_78(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_79(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_80(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_81(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_82(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_83(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_84(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_85(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_86(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_87(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_88(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_89(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_90(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_91(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_92(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_93(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_94(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_95(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_96(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_97(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_98(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_99(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_100(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_101(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_102(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_103(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_104(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_105(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_106(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_107(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_108(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_109(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_110(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_111(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_112(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_113(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_114(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_115(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_116(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_117(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_118(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_119(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_120(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_121(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_122(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_123(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_124(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_125(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_126(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_127(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_128(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_129(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_130(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_131(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_132(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_133(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_134(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_135(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_136(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_137(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_138(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_139(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_140(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_141(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_142(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_143(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_144(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_145(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_146(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_147(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_148(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_149(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_150(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_151(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_152(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_153(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_154(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_155(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_156(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_157(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_158(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_159(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_160(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_161(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_162(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_163(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_164(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_165(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_166(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_167(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_168(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_169(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_170(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_171(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_172(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_173(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_174(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_175(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_176(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_177(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_178(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_179(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_180(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_181(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_182(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_183(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_184(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_185(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_186(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_187(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_188(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_189(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_190(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_191(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_192(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_193(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_194(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_195(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_196(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_197(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_198(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_199(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_200(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_201(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_202(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_203(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_204(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_205(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_206(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_207(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_208(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_209(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_210(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_211(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_212(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_213(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_214(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_215(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_216(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_217(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_218(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_219(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_220(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_221(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_222(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_223(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_224(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_225(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_226(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_227(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_228(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_229(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_230(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_231(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_232(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_233(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_234(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_235(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_236(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_237(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_238(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_239(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_240(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_241(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_242(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_243(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_244(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_245(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_246(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_247(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_248(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_249(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_250(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_251(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_252(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_253(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_254(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_255(o, s, l) 0 # define BOOST_PP_LIST_FOLD_LEFT_CHECK_BOOST_PP_LIST_FOLD_LEFT_256(o, s, l) 0 # # endif ================================================ FILE: benchmarks/boost/preprocessor/list/fold_right.hpp ================================================ # /* Copyright (C) 2001 # * Housemarque Oy # * http://www.housemarque.com # * # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # */ # # /* Revised by Paul Mensonides (2002) */ # # /* See http://www.boost.org for most recent version. */ # # ifndef BOOST_PREPROCESSOR_LIST_FOLD_RIGHT_HPP # define BOOST_PREPROCESSOR_LIST_FOLD_RIGHT_HPP # # include # include # include # include # # if 0 # define BOOST_PP_LIST_FOLD_RIGHT(op, state, list) # endif # # define BOOST_PP_LIST_FOLD_RIGHT BOOST_PP_CAT(BOOST_PP_LIST_FOLD_RIGHT_, BOOST_PP_AUTO_REC(BOOST_PP_WHILE_P, 256)) # # define BOOST_PP_LIST_FOLD_RIGHT_257(o, s, l) BOOST_PP_ERROR(0x0004) # # define BOOST_PP_LIST_FOLD_RIGHT_D(d, o, s, l) BOOST_PP_LIST_FOLD_RIGHT_ ## d(o, s, l) # define BOOST_PP_LIST_FOLD_RIGHT_2ND BOOST_PP_LIST_FOLD_RIGHT # define BOOST_PP_LIST_FOLD_RIGHT_2ND_D BOOST_PP_LIST_FOLD_RIGHT_D # # if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() # include # else # include # endif # # endif ================================================ FILE: benchmarks/boost/preprocessor/list/for_each_i.hpp ================================================ # /* Copyright (C) 2001 # * Housemarque Oy # * http://www.housemarque.com # * # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # */ # # /* Revised by Paul Mensonides (2002) */ # # /* See http://www.boost.org for most recent version. */ # # ifndef BOOST_PREPROCESSOR_LIST_LIST_FOR_EACH_I_HPP # define BOOST_PREPROCESSOR_LIST_LIST_FOR_EACH_I_HPP # # include # include # include # include # include # include # # /* BOOST_PP_LIST_FOR_EACH_I */ # # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() && ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MSVC() # define BOOST_PP_LIST_FOR_EACH_I(macro, data, list) BOOST_PP_FOR((macro, data, list, 0), BOOST_PP_LIST_FOR_EACH_I_P, BOOST_PP_LIST_FOR_EACH_I_O, BOOST_PP_LIST_FOR_EACH_I_M) # else # define BOOST_PP_LIST_FOR_EACH_I(macro, data, list) BOOST_PP_LIST_FOR_EACH_I_I(macro, data, list) # define BOOST_PP_LIST_FOR_EACH_I_I(macro, data, list) BOOST_PP_FOR((macro, data, list, 0), BOOST_PP_LIST_FOR_EACH_I_P, BOOST_PP_LIST_FOR_EACH_I_O, BOOST_PP_LIST_FOR_EACH_I_M) # endif # # if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_STRICT() # define BOOST_PP_LIST_FOR_EACH_I_P(r, x) BOOST_PP_LIST_FOR_EACH_I_P_D x # define BOOST_PP_LIST_FOR_EACH_I_P_D(m, d, l, i) BOOST_PP_LIST_IS_CONS(l) # else # define BOOST_PP_LIST_FOR_EACH_I_P(r, x) BOOST_PP_LIST_IS_CONS(BOOST_PP_TUPLE_ELEM(4, 2, x)) # endif # # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC() # define BOOST_PP_LIST_FOR_EACH_I_O(r, x) BOOST_PP_LIST_FOR_EACH_I_O_D x # define BOOST_PP_LIST_FOR_EACH_I_O_D(m, d, l, i) (m, d, BOOST_PP_LIST_REST(l), BOOST_PP_INC(i)) # else # define BOOST_PP_LIST_FOR_EACH_I_O(r, x) (BOOST_PP_TUPLE_ELEM(4, 0, x), BOOST_PP_TUPLE_ELEM(4, 1, x), BOOST_PP_LIST_REST(BOOST_PP_TUPLE_ELEM(4, 2, x)), BOOST_PP_INC(BOOST_PP_TUPLE_ELEM(4, 3, x))) # endif # # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() # define BOOST_PP_LIST_FOR_EACH_I_M(r, x) BOOST_PP_LIST_FOR_EACH_I_M_D(r, BOOST_PP_TUPLE_ELEM(4, 0, x), BOOST_PP_TUPLE_ELEM(4, 1, x), BOOST_PP_TUPLE_ELEM(4, 2, x), BOOST_PP_TUPLE_ELEM(4, 3, x)) # else # define BOOST_PP_LIST_FOR_EACH_I_M(r, x) BOOST_PP_LIST_FOR_EACH_I_M_I(r, BOOST_PP_TUPLE_REM_4 x) # define BOOST_PP_LIST_FOR_EACH_I_M_I(r, x_e) BOOST_PP_LIST_FOR_EACH_I_M_D(r, x_e) # endif # # define BOOST_PP_LIST_FOR_EACH_I_M_D(r, m, d, l, i) m(r, d, i, BOOST_PP_LIST_FIRST(l)) # # /* BOOST_PP_LIST_FOR_EACH_I_R */ # # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() # define BOOST_PP_LIST_FOR_EACH_I_R(r, macro, data, list) BOOST_PP_FOR_ ## r((macro, data, list, 0), BOOST_PP_LIST_FOR_EACH_I_P, BOOST_PP_LIST_FOR_EACH_I_O, BOOST_PP_LIST_FOR_EACH_I_M) # else # define BOOST_PP_LIST_FOR_EACH_I_R(r, macro, data, list) BOOST_PP_LIST_FOR_EACH_I_R_I(r, macro, data, list) # define BOOST_PP_LIST_FOR_EACH_I_R_I(r, macro, data, list) BOOST_PP_FOR_ ## r((macro, data, list, 0), BOOST_PP_LIST_FOR_EACH_I_P, BOOST_PP_LIST_FOR_EACH_I_O, BOOST_PP_LIST_FOR_EACH_I_M) # endif # # endif ================================================ FILE: benchmarks/boost/preprocessor/list/reverse.hpp ================================================ # /* Copyright (C) 2001 # * Housemarque Oy # * http://www.housemarque.com # * # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # */ # # /* Revised by Paul Mensonides (2002) */ # # /* See http://www.boost.org for most recent version. */ # # ifndef BOOST_PREPROCESSOR_LIST_REVERSE_HPP # define BOOST_PREPROCESSOR_LIST_REVERSE_HPP # # include # include # # /* BOOST_PP_LIST_REVERSE */ # # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() # define BOOST_PP_LIST_REVERSE(list) BOOST_PP_LIST_FOLD_LEFT(BOOST_PP_LIST_REVERSE_O, BOOST_PP_NIL, list) # else # define BOOST_PP_LIST_REVERSE(list) BOOST_PP_LIST_REVERSE_I(list) # define BOOST_PP_LIST_REVERSE_I(list) BOOST_PP_LIST_FOLD_LEFT(BOOST_PP_LIST_REVERSE_O, BOOST_PP_NIL, list) # endif # # define BOOST_PP_LIST_REVERSE_O(d, s, x) (x, s) # # /* BOOST_PP_LIST_REVERSE_D */ # # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() # define BOOST_PP_LIST_REVERSE_D(d, list) BOOST_PP_LIST_FOLD_LEFT_ ## d(BOOST_PP_LIST_REVERSE_O, BOOST_PP_NIL, list) # else # define BOOST_PP_LIST_REVERSE_D(d, list) BOOST_PP_LIST_REVERSE_D_I(d, list) # define BOOST_PP_LIST_REVERSE_D_I(d, list) BOOST_PP_LIST_FOLD_LEFT_ ## d(BOOST_PP_LIST_REVERSE_O, BOOST_PP_NIL, list) # endif # # endif ================================================ FILE: benchmarks/boost/preprocessor/logical/and.hpp ================================================ # /* Copyright (C) 2001 # * Housemarque Oy # * http://www.housemarque.com # * # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # */ # # /* Revised by Paul Mensonides (2002) */ # # /* See http://www.boost.org for most recent version. */ # # ifndef BOOST_PREPROCESSOR_LOGICAL_AND_HPP # define BOOST_PREPROCESSOR_LOGICAL_AND_HPP # # include # include # include # # /* BOOST_PP_AND */ # # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() # define BOOST_PP_AND(p, q) BOOST_PP_BITAND(BOOST_PP_BOOL(p), BOOST_PP_BOOL(q)) # else # define BOOST_PP_AND(p, q) BOOST_PP_AND_I(p, q) # define BOOST_PP_AND_I(p, q) BOOST_PP_BITAND(BOOST_PP_BOOL(p), BOOST_PP_BOOL(q)) # endif # # endif ================================================ FILE: benchmarks/boost/preprocessor/logical/bitand.hpp ================================================ # /* ************************************************************************** # * * # * (C) Copyright Paul Mensonides 2002. # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # * * # ************************************************************************** */ # # /* See http://www.boost.org for most recent version. */ # # ifndef BOOST_PREPROCESSOR_LOGICAL_BITAND_HPP # define BOOST_PREPROCESSOR_LOGICAL_BITAND_HPP # # include # # /* BOOST_PP_BITAND */ # # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC() # define BOOST_PP_BITAND(x, y) BOOST_PP_BITAND_I(x, y) # else # define BOOST_PP_BITAND(x, y) BOOST_PP_BITAND_OO((x, y)) # define BOOST_PP_BITAND_OO(par) BOOST_PP_BITAND_I ## par # endif # # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MSVC() # define BOOST_PP_BITAND_I(x, y) BOOST_PP_BITAND_ ## x ## y # else # define BOOST_PP_BITAND_I(x, y) BOOST_PP_BITAND_ID(BOOST_PP_BITAND_ ## x ## y) # define BOOST_PP_BITAND_ID(res) res # endif # # define BOOST_PP_BITAND_00 0 # define BOOST_PP_BITAND_01 0 # define BOOST_PP_BITAND_10 0 # define BOOST_PP_BITAND_11 1 # # endif ================================================ FILE: benchmarks/boost/preprocessor/logical/bool.hpp ================================================ # /* Copyright (C) 2001 # * Housemarque Oy # * http://www.housemarque.com # * # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # */ # # /* Revised by Paul Mensonides (2002) */ # # /* See http://www.boost.org for most recent version. */ # # ifndef BOOST_PREPROCESSOR_LOGICAL_BOOL_HPP # define BOOST_PREPROCESSOR_LOGICAL_BOOL_HPP # # include # # /* BOOST_PP_BOOL */ # # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC() # define BOOST_PP_BOOL(x) BOOST_PP_BOOL_I(x) # else # define BOOST_PP_BOOL(x) BOOST_PP_BOOL_OO((x)) # define BOOST_PP_BOOL_OO(par) BOOST_PP_BOOL_I ## par # endif # # define BOOST_PP_BOOL_I(x) BOOST_PP_BOOL_ ## x # # define BOOST_PP_BOOL_0 0 # define BOOST_PP_BOOL_1 1 # define BOOST_PP_BOOL_2 1 # define BOOST_PP_BOOL_3 1 # define BOOST_PP_BOOL_4 1 # define BOOST_PP_BOOL_5 1 # define BOOST_PP_BOOL_6 1 # define BOOST_PP_BOOL_7 1 # define BOOST_PP_BOOL_8 1 # define BOOST_PP_BOOL_9 1 # define BOOST_PP_BOOL_10 1 # define BOOST_PP_BOOL_11 1 # define BOOST_PP_BOOL_12 1 # define BOOST_PP_BOOL_13 1 # define BOOST_PP_BOOL_14 1 # define BOOST_PP_BOOL_15 1 # define BOOST_PP_BOOL_16 1 # define BOOST_PP_BOOL_17 1 # define BOOST_PP_BOOL_18 1 # define BOOST_PP_BOOL_19 1 # define BOOST_PP_BOOL_20 1 # define BOOST_PP_BOOL_21 1 # define BOOST_PP_BOOL_22 1 # define BOOST_PP_BOOL_23 1 # define BOOST_PP_BOOL_24 1 # define BOOST_PP_BOOL_25 1 # define BOOST_PP_BOOL_26 1 # define BOOST_PP_BOOL_27 1 # define BOOST_PP_BOOL_28 1 # define BOOST_PP_BOOL_29 1 # define BOOST_PP_BOOL_30 1 # define BOOST_PP_BOOL_31 1 # define BOOST_PP_BOOL_32 1 # define BOOST_PP_BOOL_33 1 # define BOOST_PP_BOOL_34 1 # define BOOST_PP_BOOL_35 1 # define BOOST_PP_BOOL_36 1 # define BOOST_PP_BOOL_37 1 # define BOOST_PP_BOOL_38 1 # define BOOST_PP_BOOL_39 1 # define BOOST_PP_BOOL_40 1 # define BOOST_PP_BOOL_41 1 # define BOOST_PP_BOOL_42 1 # define BOOST_PP_BOOL_43 1 # define BOOST_PP_BOOL_44 1 # define BOOST_PP_BOOL_45 1 # define BOOST_PP_BOOL_46 1 # define BOOST_PP_BOOL_47 1 # define BOOST_PP_BOOL_48 1 # define BOOST_PP_BOOL_49 1 # define BOOST_PP_BOOL_50 1 # define BOOST_PP_BOOL_51 1 # define BOOST_PP_BOOL_52 1 # define BOOST_PP_BOOL_53 1 # define BOOST_PP_BOOL_54 1 # define BOOST_PP_BOOL_55 1 # define BOOST_PP_BOOL_56 1 # define BOOST_PP_BOOL_57 1 # define BOOST_PP_BOOL_58 1 # define BOOST_PP_BOOL_59 1 # define BOOST_PP_BOOL_60 1 # define BOOST_PP_BOOL_61 1 # define BOOST_PP_BOOL_62 1 # define BOOST_PP_BOOL_63 1 # define BOOST_PP_BOOL_64 1 # define BOOST_PP_BOOL_65 1 # define BOOST_PP_BOOL_66 1 # define BOOST_PP_BOOL_67 1 # define BOOST_PP_BOOL_68 1 # define BOOST_PP_BOOL_69 1 # define BOOST_PP_BOOL_70 1 # define BOOST_PP_BOOL_71 1 # define BOOST_PP_BOOL_72 1 # define BOOST_PP_BOOL_73 1 # define BOOST_PP_BOOL_74 1 # define BOOST_PP_BOOL_75 1 # define BOOST_PP_BOOL_76 1 # define BOOST_PP_BOOL_77 1 # define BOOST_PP_BOOL_78 1 # define BOOST_PP_BOOL_79 1 # define BOOST_PP_BOOL_80 1 # define BOOST_PP_BOOL_81 1 # define BOOST_PP_BOOL_82 1 # define BOOST_PP_BOOL_83 1 # define BOOST_PP_BOOL_84 1 # define BOOST_PP_BOOL_85 1 # define BOOST_PP_BOOL_86 1 # define BOOST_PP_BOOL_87 1 # define BOOST_PP_BOOL_88 1 # define BOOST_PP_BOOL_89 1 # define BOOST_PP_BOOL_90 1 # define BOOST_PP_BOOL_91 1 # define BOOST_PP_BOOL_92 1 # define BOOST_PP_BOOL_93 1 # define BOOST_PP_BOOL_94 1 # define BOOST_PP_BOOL_95 1 # define BOOST_PP_BOOL_96 1 # define BOOST_PP_BOOL_97 1 # define BOOST_PP_BOOL_98 1 # define BOOST_PP_BOOL_99 1 # define BOOST_PP_BOOL_100 1 # define BOOST_PP_BOOL_101 1 # define BOOST_PP_BOOL_102 1 # define BOOST_PP_BOOL_103 1 # define BOOST_PP_BOOL_104 1 # define BOOST_PP_BOOL_105 1 # define BOOST_PP_BOOL_106 1 # define BOOST_PP_BOOL_107 1 # define BOOST_PP_BOOL_108 1 # define BOOST_PP_BOOL_109 1 # define BOOST_PP_BOOL_110 1 # define BOOST_PP_BOOL_111 1 # define BOOST_PP_BOOL_112 1 # define BOOST_PP_BOOL_113 1 # define BOOST_PP_BOOL_114 1 # define BOOST_PP_BOOL_115 1 # define BOOST_PP_BOOL_116 1 # define BOOST_PP_BOOL_117 1 # define BOOST_PP_BOOL_118 1 # define BOOST_PP_BOOL_119 1 # define BOOST_PP_BOOL_120 1 # define BOOST_PP_BOOL_121 1 # define BOOST_PP_BOOL_122 1 # define BOOST_PP_BOOL_123 1 # define BOOST_PP_BOOL_124 1 # define BOOST_PP_BOOL_125 1 # define BOOST_PP_BOOL_126 1 # define BOOST_PP_BOOL_127 1 # define BOOST_PP_BOOL_128 1 # define BOOST_PP_BOOL_129 1 # define BOOST_PP_BOOL_130 1 # define BOOST_PP_BOOL_131 1 # define BOOST_PP_BOOL_132 1 # define BOOST_PP_BOOL_133 1 # define BOOST_PP_BOOL_134 1 # define BOOST_PP_BOOL_135 1 # define BOOST_PP_BOOL_136 1 # define BOOST_PP_BOOL_137 1 # define BOOST_PP_BOOL_138 1 # define BOOST_PP_BOOL_139 1 # define BOOST_PP_BOOL_140 1 # define BOOST_PP_BOOL_141 1 # define BOOST_PP_BOOL_142 1 # define BOOST_PP_BOOL_143 1 # define BOOST_PP_BOOL_144 1 # define BOOST_PP_BOOL_145 1 # define BOOST_PP_BOOL_146 1 # define BOOST_PP_BOOL_147 1 # define BOOST_PP_BOOL_148 1 # define BOOST_PP_BOOL_149 1 # define BOOST_PP_BOOL_150 1 # define BOOST_PP_BOOL_151 1 # define BOOST_PP_BOOL_152 1 # define BOOST_PP_BOOL_153 1 # define BOOST_PP_BOOL_154 1 # define BOOST_PP_BOOL_155 1 # define BOOST_PP_BOOL_156 1 # define BOOST_PP_BOOL_157 1 # define BOOST_PP_BOOL_158 1 # define BOOST_PP_BOOL_159 1 # define BOOST_PP_BOOL_160 1 # define BOOST_PP_BOOL_161 1 # define BOOST_PP_BOOL_162 1 # define BOOST_PP_BOOL_163 1 # define BOOST_PP_BOOL_164 1 # define BOOST_PP_BOOL_165 1 # define BOOST_PP_BOOL_166 1 # define BOOST_PP_BOOL_167 1 # define BOOST_PP_BOOL_168 1 # define BOOST_PP_BOOL_169 1 # define BOOST_PP_BOOL_170 1 # define BOOST_PP_BOOL_171 1 # define BOOST_PP_BOOL_172 1 # define BOOST_PP_BOOL_173 1 # define BOOST_PP_BOOL_174 1 # define BOOST_PP_BOOL_175 1 # define BOOST_PP_BOOL_176 1 # define BOOST_PP_BOOL_177 1 # define BOOST_PP_BOOL_178 1 # define BOOST_PP_BOOL_179 1 # define BOOST_PP_BOOL_180 1 # define BOOST_PP_BOOL_181 1 # define BOOST_PP_BOOL_182 1 # define BOOST_PP_BOOL_183 1 # define BOOST_PP_BOOL_184 1 # define BOOST_PP_BOOL_185 1 # define BOOST_PP_BOOL_186 1 # define BOOST_PP_BOOL_187 1 # define BOOST_PP_BOOL_188 1 # define BOOST_PP_BOOL_189 1 # define BOOST_PP_BOOL_190 1 # define BOOST_PP_BOOL_191 1 # define BOOST_PP_BOOL_192 1 # define BOOST_PP_BOOL_193 1 # define BOOST_PP_BOOL_194 1 # define BOOST_PP_BOOL_195 1 # define BOOST_PP_BOOL_196 1 # define BOOST_PP_BOOL_197 1 # define BOOST_PP_BOOL_198 1 # define BOOST_PP_BOOL_199 1 # define BOOST_PP_BOOL_200 1 # define BOOST_PP_BOOL_201 1 # define BOOST_PP_BOOL_202 1 # define BOOST_PP_BOOL_203 1 # define BOOST_PP_BOOL_204 1 # define BOOST_PP_BOOL_205 1 # define BOOST_PP_BOOL_206 1 # define BOOST_PP_BOOL_207 1 # define BOOST_PP_BOOL_208 1 # define BOOST_PP_BOOL_209 1 # define BOOST_PP_BOOL_210 1 # define BOOST_PP_BOOL_211 1 # define BOOST_PP_BOOL_212 1 # define BOOST_PP_BOOL_213 1 # define BOOST_PP_BOOL_214 1 # define BOOST_PP_BOOL_215 1 # define BOOST_PP_BOOL_216 1 # define BOOST_PP_BOOL_217 1 # define BOOST_PP_BOOL_218 1 # define BOOST_PP_BOOL_219 1 # define BOOST_PP_BOOL_220 1 # define BOOST_PP_BOOL_221 1 # define BOOST_PP_BOOL_222 1 # define BOOST_PP_BOOL_223 1 # define BOOST_PP_BOOL_224 1 # define BOOST_PP_BOOL_225 1 # define BOOST_PP_BOOL_226 1 # define BOOST_PP_BOOL_227 1 # define BOOST_PP_BOOL_228 1 # define BOOST_PP_BOOL_229 1 # define BOOST_PP_BOOL_230 1 # define BOOST_PP_BOOL_231 1 # define BOOST_PP_BOOL_232 1 # define BOOST_PP_BOOL_233 1 # define BOOST_PP_BOOL_234 1 # define BOOST_PP_BOOL_235 1 # define BOOST_PP_BOOL_236 1 # define BOOST_PP_BOOL_237 1 # define BOOST_PP_BOOL_238 1 # define BOOST_PP_BOOL_239 1 # define BOOST_PP_BOOL_240 1 # define BOOST_PP_BOOL_241 1 # define BOOST_PP_BOOL_242 1 # define BOOST_PP_BOOL_243 1 # define BOOST_PP_BOOL_244 1 # define BOOST_PP_BOOL_245 1 # define BOOST_PP_BOOL_246 1 # define BOOST_PP_BOOL_247 1 # define BOOST_PP_BOOL_248 1 # define BOOST_PP_BOOL_249 1 # define BOOST_PP_BOOL_250 1 # define BOOST_PP_BOOL_251 1 # define BOOST_PP_BOOL_252 1 # define BOOST_PP_BOOL_253 1 # define BOOST_PP_BOOL_254 1 # define BOOST_PP_BOOL_255 1 # define BOOST_PP_BOOL_256 1 # # endif ================================================ FILE: benchmarks/boost/preprocessor/logical/compl.hpp ================================================ # /* ************************************************************************** # * * # * (C) Copyright Paul Mensonides 2002. # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # * * # ************************************************************************** */ # # /* See http://www.boost.org for most recent version. */ # # ifndef BOOST_PREPROCESSOR_LOGICAL_COMPL_HPP # define BOOST_PREPROCESSOR_LOGICAL_COMPL_HPP # # include # # /* BOOST_PP_COMPL */ # # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC() # define BOOST_PP_COMPL(x) BOOST_PP_COMPL_I(x) # else # define BOOST_PP_COMPL(x) BOOST_PP_COMPL_OO((x)) # define BOOST_PP_COMPL_OO(par) BOOST_PP_COMPL_I ## par # endif # # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MSVC() # define BOOST_PP_COMPL_I(x) BOOST_PP_COMPL_ ## x # else # define BOOST_PP_COMPL_I(x) BOOST_PP_COMPL_ID(BOOST_PP_COMPL_ ## x) # define BOOST_PP_COMPL_ID(id) id # endif # # define BOOST_PP_COMPL_0 1 # define BOOST_PP_COMPL_1 0 # # endif ================================================ FILE: benchmarks/boost/preprocessor/logical/not.hpp ================================================ # /* Copyright (C) 2001 # * Housemarque Oy # * http://www.housemarque.com # * # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # */ # # /* Revised by Paul Mensonides (2002) */ # # /* See http://www.boost.org for most recent version. */ # # ifndef BOOST_PREPROCESSOR_LOGICAL_NOT_HPP # define BOOST_PREPROCESSOR_LOGICAL_NOT_HPP # # include # include # include # # /* BOOST_PP_NOT */ # # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() # define BOOST_PP_NOT(x) BOOST_PP_COMPL(BOOST_PP_BOOL(x)) # else # define BOOST_PP_NOT(x) BOOST_PP_NOT_I(x) # define BOOST_PP_NOT_I(x) BOOST_PP_COMPL(BOOST_PP_BOOL(x)) # endif # # endif ================================================ FILE: benchmarks/boost/preprocessor/punctuation/comma.hpp ================================================ # /* Copyright (C) 2001 # * Housemarque Oy # * http://www.housemarque.com # * # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # */ # # /* Revised by Paul Mensonides (2002) */ # # /* See http://www.boost.org for most recent version. */ # # ifndef BOOST_PREPROCESSOR_PUNCTUATION_COMMA_HPP # define BOOST_PREPROCESSOR_PUNCTUATION_COMMA_HPP # # /* BOOST_PP_COMMA */ # # define BOOST_PP_COMMA() , # # endif ================================================ FILE: benchmarks/boost/preprocessor/punctuation/comma_if.hpp ================================================ # /* Copyright (C) 2001 # * Housemarque Oy # * http://www.housemarque.com # * # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # */ # # /* Revised by Paul Mensonides (2002) */ # # /* See http://www.boost.org for most recent version. */ # # ifndef BOOST_PREPROCESSOR_PUNCTUATION_COMMA_IF_HPP # define BOOST_PREPROCESSOR_PUNCTUATION_COMMA_IF_HPP # # include # include # include # include # # /* BOOST_PP_COMMA_IF */ # # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() # define BOOST_PP_COMMA_IF(cond) BOOST_PP_IF(cond, BOOST_PP_COMMA, BOOST_PP_EMPTY)() # else # define BOOST_PP_COMMA_IF(cond) BOOST_PP_COMMA_IF_I(cond) # define BOOST_PP_COMMA_IF_I(cond) BOOST_PP_IF(cond, BOOST_PP_COMMA, BOOST_PP_EMPTY)() # endif # # endif ================================================ FILE: benchmarks/boost/preprocessor/punctuation/detail/is_begin_parens.hpp ================================================ # /* ************************************************************************** # * * # * (C) Copyright Edward Diener 2014. # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # * * # ************************************************************************** */ # # /* See http://www.boost.org for most recent version. */ # #ifndef BOOST_PREPROCESSOR_DETAIL_IS_BEGIN_PARENS_HPP #define BOOST_PREPROCESSOR_DETAIL_IS_BEGIN_PARENS_HPP #if BOOST_PP_VARIADICS_MSVC #include #define BOOST_PP_DETAIL_VD_IBP_CAT(a, b) BOOST_PP_DETAIL_VD_IBP_CAT_I(a, b) #define BOOST_PP_DETAIL_VD_IBP_CAT_I(a, b) BOOST_PP_DETAIL_VD_IBP_CAT_II(a ## b) #define BOOST_PP_DETAIL_VD_IBP_CAT_II(res) res #define BOOST_PP_DETAIL_IBP_SPLIT(i, ...) \ BOOST_PP_DETAIL_VD_IBP_CAT(BOOST_PP_DETAIL_IBP_PRIMITIVE_CAT(BOOST_PP_DETAIL_IBP_SPLIT_,i)(__VA_ARGS__),BOOST_PP_EMPTY()) \ /**/ #define BOOST_PP_DETAIL_IBP_IS_VARIADIC_C(...) 1 1 #else #define BOOST_PP_DETAIL_IBP_SPLIT(i, ...) \ BOOST_PP_DETAIL_IBP_PRIMITIVE_CAT(BOOST_PP_DETAIL_IBP_SPLIT_,i)(__VA_ARGS__) \ /**/ #define BOOST_PP_DETAIL_IBP_IS_VARIADIC_C(...) 1 #endif /* BOOST_PP_VARIADICS_MSVC */ #define BOOST_PP_DETAIL_IBP_SPLIT_0(a, ...) a #define BOOST_PP_DETAIL_IBP_SPLIT_1(a, ...) __VA_ARGS__ #define BOOST_PP_DETAIL_IBP_CAT(a, ...) BOOST_PP_DETAIL_IBP_PRIMITIVE_CAT(a,__VA_ARGS__) #define BOOST_PP_DETAIL_IBP_PRIMITIVE_CAT(a, ...) a ## __VA_ARGS__ #define BOOST_PP_DETAIL_IBP_IS_VARIADIC_R_1 1, #define BOOST_PP_DETAIL_IBP_IS_VARIADIC_R_BOOST_PP_DETAIL_IBP_IS_VARIADIC_C 0, #endif /* BOOST_PREPROCESSOR_DETAIL_IS_BEGIN_PARENS_HPP */ ================================================ FILE: benchmarks/boost/preprocessor/punctuation/is_begin_parens.hpp ================================================ # /* ************************************************************************** # * * # * (C) Copyright Edward Diener 2014. # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # * * # ************************************************************************** */ # # /* See http://www.boost.org for most recent version. */ # # ifndef BOOST_PREPROCESSOR_IS_BEGIN_PARENS_HPP # define BOOST_PREPROCESSOR_IS_BEGIN_PARENS_HPP # include #if BOOST_PP_VARIADICS #include #if BOOST_PP_VARIADICS_MSVC && _MSC_VER <= 1400 #define BOOST_PP_IS_BEGIN_PARENS(param) \ BOOST_PP_DETAIL_IBP_SPLIT \ ( \ 0, \ BOOST_PP_DETAIL_IBP_CAT \ ( \ BOOST_PP_DETAIL_IBP_IS_VARIADIC_R_, \ BOOST_PP_DETAIL_IBP_IS_VARIADIC_C param \ ) \ ) \ /**/ #else #define BOOST_PP_IS_BEGIN_PARENS(...) \ BOOST_PP_DETAIL_IBP_SPLIT \ ( \ 0, \ BOOST_PP_DETAIL_IBP_CAT \ ( \ BOOST_PP_DETAIL_IBP_IS_VARIADIC_R_, \ BOOST_PP_DETAIL_IBP_IS_VARIADIC_C __VA_ARGS__ \ ) \ ) \ /**/ #endif /* BOOST_PP_VARIADICS_MSVC && _MSC_VER <= 1400 */ #endif /* BOOST_PP_VARIADICS */ #endif /* BOOST_PREPROCESSOR_IS_BEGIN_PARENS_HPP */ ================================================ FILE: benchmarks/boost/preprocessor/repeat.hpp ================================================ # /* ************************************************************************** # * * # * (C) Copyright Paul Mensonides 2002. # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # * * # ************************************************************************** */ # # /* See http://www.boost.org for most recent version. */ # # ifndef BOOST_PREPROCESSOR_REPEAT_HPP # define BOOST_PREPROCESSOR_REPEAT_HPP # # include # # endif ================================================ FILE: benchmarks/boost/preprocessor/repetition/deduce_r.hpp ================================================ # /* ************************************************************************** # * * # * (C) Copyright Paul Mensonides 2002. # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # * * # ************************************************************************** */ # # /* See http://www.boost.org for most recent version. */ # # ifndef BOOST_PREPROCESSOR_REPETITION_DEDUCE_R_HPP # define BOOST_PREPROCESSOR_REPETITION_DEDUCE_R_HPP # # include # include # # /* BOOST_PP_DEDUCE_R */ # # define BOOST_PP_DEDUCE_R() BOOST_PP_AUTO_REC(BOOST_PP_FOR_P, 256) # # endif ================================================ FILE: benchmarks/boost/preprocessor/repetition/detail/dmc/for.hpp ================================================ # /* Copyright (C) 2001 # * Housemarque Oy # * http://www.housemarque.com # * # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # */ # # /* Revised by Paul Mensonides (2002) */ # # /* See http://www.boost.org for most recent version. */ # # ifndef BOOST_PREPROCESSOR_REPETITION_DETAIL_FOR_HPP # define BOOST_PREPROCESSOR_REPETITION_DETAIL_FOR_HPP # # include # include # include # include # # define BOOST_PP_FOR_1(s, p, o, m) BOOST_PP_FOR_1_C(BOOST_PP_BOOL(p##(2, s)), s, p, o, m) # define BOOST_PP_FOR_2(s, p, o, m) BOOST_PP_FOR_2_C(BOOST_PP_BOOL(p##(3, s)), s, p, o, m) # define BOOST_PP_FOR_3(s, p, o, m) BOOST_PP_FOR_3_C(BOOST_PP_BOOL(p##(4, s)), s, p, o, m) # define BOOST_PP_FOR_4(s, p, o, m) BOOST_PP_FOR_4_C(BOOST_PP_BOOL(p##(5, s)), s, p, o, m) # define BOOST_PP_FOR_5(s, p, o, m) BOOST_PP_FOR_5_C(BOOST_PP_BOOL(p##(6, s)), s, p, o, m) # define BOOST_PP_FOR_6(s, p, o, m) BOOST_PP_FOR_6_C(BOOST_PP_BOOL(p##(7, s)), s, p, o, m) # define BOOST_PP_FOR_7(s, p, o, m) BOOST_PP_FOR_7_C(BOOST_PP_BOOL(p##(8, s)), s, p, o, m) # define BOOST_PP_FOR_8(s, p, o, m) BOOST_PP_FOR_8_C(BOOST_PP_BOOL(p##(9, s)), s, p, o, m) # define BOOST_PP_FOR_9(s, p, o, m) BOOST_PP_FOR_9_C(BOOST_PP_BOOL(p##(10, s)), s, p, o, m) # define BOOST_PP_FOR_10(s, p, o, m) BOOST_PP_FOR_10_C(BOOST_PP_BOOL(p##(11, s)), s, p, o, m) # define BOOST_PP_FOR_11(s, p, o, m) BOOST_PP_FOR_11_C(BOOST_PP_BOOL(p##(12, s)), s, p, o, m) # define BOOST_PP_FOR_12(s, p, o, m) BOOST_PP_FOR_12_C(BOOST_PP_BOOL(p##(13, s)), s, p, o, m) # define BOOST_PP_FOR_13(s, p, o, m) BOOST_PP_FOR_13_C(BOOST_PP_BOOL(p##(14, s)), s, p, o, m) # define BOOST_PP_FOR_14(s, p, o, m) BOOST_PP_FOR_14_C(BOOST_PP_BOOL(p##(15, s)), s, p, o, m) # define BOOST_PP_FOR_15(s, p, o, m) BOOST_PP_FOR_15_C(BOOST_PP_BOOL(p##(16, s)), s, p, o, m) # define BOOST_PP_FOR_16(s, p, o, m) BOOST_PP_FOR_16_C(BOOST_PP_BOOL(p##(17, s)), s, p, o, m) # define BOOST_PP_FOR_17(s, p, o, m) BOOST_PP_FOR_17_C(BOOST_PP_BOOL(p##(18, s)), s, p, o, m) # define BOOST_PP_FOR_18(s, p, o, m) BOOST_PP_FOR_18_C(BOOST_PP_BOOL(p##(19, s)), s, p, o, m) # define BOOST_PP_FOR_19(s, p, o, m) BOOST_PP_FOR_19_C(BOOST_PP_BOOL(p##(20, s)), s, p, o, m) # define BOOST_PP_FOR_20(s, p, o, m) BOOST_PP_FOR_20_C(BOOST_PP_BOOL(p##(21, s)), s, p, o, m) # define BOOST_PP_FOR_21(s, p, o, m) BOOST_PP_FOR_21_C(BOOST_PP_BOOL(p##(22, s)), s, p, o, m) # define BOOST_PP_FOR_22(s, p, o, m) BOOST_PP_FOR_22_C(BOOST_PP_BOOL(p##(23, s)), s, p, o, m) # define BOOST_PP_FOR_23(s, p, o, m) BOOST_PP_FOR_23_C(BOOST_PP_BOOL(p##(24, s)), s, p, o, m) # define BOOST_PP_FOR_24(s, p, o, m) BOOST_PP_FOR_24_C(BOOST_PP_BOOL(p##(25, s)), s, p, o, m) # define BOOST_PP_FOR_25(s, p, o, m) BOOST_PP_FOR_25_C(BOOST_PP_BOOL(p##(26, s)), s, p, o, m) # define BOOST_PP_FOR_26(s, p, o, m) BOOST_PP_FOR_26_C(BOOST_PP_BOOL(p##(27, s)), s, p, o, m) # define BOOST_PP_FOR_27(s, p, o, m) BOOST_PP_FOR_27_C(BOOST_PP_BOOL(p##(28, s)), s, p, o, m) # define BOOST_PP_FOR_28(s, p, o, m) BOOST_PP_FOR_28_C(BOOST_PP_BOOL(p##(29, s)), s, p, o, m) # define BOOST_PP_FOR_29(s, p, o, m) BOOST_PP_FOR_29_C(BOOST_PP_BOOL(p##(30, s)), s, p, o, m) # define BOOST_PP_FOR_30(s, p, o, m) BOOST_PP_FOR_30_C(BOOST_PP_BOOL(p##(31, s)), s, p, o, m) # define BOOST_PP_FOR_31(s, p, o, m) BOOST_PP_FOR_31_C(BOOST_PP_BOOL(p##(32, s)), s, p, o, m) # define BOOST_PP_FOR_32(s, p, o, m) BOOST_PP_FOR_32_C(BOOST_PP_BOOL(p##(33, s)), s, p, o, m) # define BOOST_PP_FOR_33(s, p, o, m) BOOST_PP_FOR_33_C(BOOST_PP_BOOL(p##(34, s)), s, p, o, m) # define BOOST_PP_FOR_34(s, p, o, m) BOOST_PP_FOR_34_C(BOOST_PP_BOOL(p##(35, s)), s, p, o, m) # define BOOST_PP_FOR_35(s, p, o, m) BOOST_PP_FOR_35_C(BOOST_PP_BOOL(p##(36, s)), s, p, o, m) # define BOOST_PP_FOR_36(s, p, o, m) BOOST_PP_FOR_36_C(BOOST_PP_BOOL(p##(37, s)), s, p, o, m) # define BOOST_PP_FOR_37(s, p, o, m) BOOST_PP_FOR_37_C(BOOST_PP_BOOL(p##(38, s)), s, p, o, m) # define BOOST_PP_FOR_38(s, p, o, m) BOOST_PP_FOR_38_C(BOOST_PP_BOOL(p##(39, s)), s, p, o, m) # define BOOST_PP_FOR_39(s, p, o, m) BOOST_PP_FOR_39_C(BOOST_PP_BOOL(p##(40, s)), s, p, o, m) # define BOOST_PP_FOR_40(s, p, o, m) BOOST_PP_FOR_40_C(BOOST_PP_BOOL(p##(41, s)), s, p, o, m) # define BOOST_PP_FOR_41(s, p, o, m) BOOST_PP_FOR_41_C(BOOST_PP_BOOL(p##(42, s)), s, p, o, m) # define BOOST_PP_FOR_42(s, p, o, m) BOOST_PP_FOR_42_C(BOOST_PP_BOOL(p##(43, s)), s, p, o, m) # define BOOST_PP_FOR_43(s, p, o, m) BOOST_PP_FOR_43_C(BOOST_PP_BOOL(p##(44, s)), s, p, o, m) # define BOOST_PP_FOR_44(s, p, o, m) BOOST_PP_FOR_44_C(BOOST_PP_BOOL(p##(45, s)), s, p, o, m) # define BOOST_PP_FOR_45(s, p, o, m) BOOST_PP_FOR_45_C(BOOST_PP_BOOL(p##(46, s)), s, p, o, m) # define BOOST_PP_FOR_46(s, p, o, m) BOOST_PP_FOR_46_C(BOOST_PP_BOOL(p##(47, s)), s, p, o, m) # define BOOST_PP_FOR_47(s, p, o, m) BOOST_PP_FOR_47_C(BOOST_PP_BOOL(p##(48, s)), s, p, o, m) # define BOOST_PP_FOR_48(s, p, o, m) BOOST_PP_FOR_48_C(BOOST_PP_BOOL(p##(49, s)), s, p, o, m) # define BOOST_PP_FOR_49(s, p, o, m) BOOST_PP_FOR_49_C(BOOST_PP_BOOL(p##(50, s)), s, p, o, m) # define BOOST_PP_FOR_50(s, p, o, m) BOOST_PP_FOR_50_C(BOOST_PP_BOOL(p##(51, s)), s, p, o, m) # define BOOST_PP_FOR_51(s, p, o, m) BOOST_PP_FOR_51_C(BOOST_PP_BOOL(p##(52, s)), s, p, o, m) # define BOOST_PP_FOR_52(s, p, o, m) BOOST_PP_FOR_52_C(BOOST_PP_BOOL(p##(53, s)), s, p, o, m) # define BOOST_PP_FOR_53(s, p, o, m) BOOST_PP_FOR_53_C(BOOST_PP_BOOL(p##(54, s)), s, p, o, m) # define BOOST_PP_FOR_54(s, p, o, m) BOOST_PP_FOR_54_C(BOOST_PP_BOOL(p##(55, s)), s, p, o, m) # define BOOST_PP_FOR_55(s, p, o, m) BOOST_PP_FOR_55_C(BOOST_PP_BOOL(p##(56, s)), s, p, o, m) # define BOOST_PP_FOR_56(s, p, o, m) BOOST_PP_FOR_56_C(BOOST_PP_BOOL(p##(57, s)), s, p, o, m) # define BOOST_PP_FOR_57(s, p, o, m) BOOST_PP_FOR_57_C(BOOST_PP_BOOL(p##(58, s)), s, p, o, m) # define BOOST_PP_FOR_58(s, p, o, m) BOOST_PP_FOR_58_C(BOOST_PP_BOOL(p##(59, s)), s, p, o, m) # define BOOST_PP_FOR_59(s, p, o, m) BOOST_PP_FOR_59_C(BOOST_PP_BOOL(p##(60, s)), s, p, o, m) # define BOOST_PP_FOR_60(s, p, o, m) BOOST_PP_FOR_60_C(BOOST_PP_BOOL(p##(61, s)), s, p, o, m) # define BOOST_PP_FOR_61(s, p, o, m) BOOST_PP_FOR_61_C(BOOST_PP_BOOL(p##(62, s)), s, p, o, m) # define BOOST_PP_FOR_62(s, p, o, m) BOOST_PP_FOR_62_C(BOOST_PP_BOOL(p##(63, s)), s, p, o, m) # define BOOST_PP_FOR_63(s, p, o, m) BOOST_PP_FOR_63_C(BOOST_PP_BOOL(p##(64, s)), s, p, o, m) # define BOOST_PP_FOR_64(s, p, o, m) BOOST_PP_FOR_64_C(BOOST_PP_BOOL(p##(65, s)), s, p, o, m) # define BOOST_PP_FOR_65(s, p, o, m) BOOST_PP_FOR_65_C(BOOST_PP_BOOL(p##(66, s)), s, p, o, m) # define BOOST_PP_FOR_66(s, p, o, m) BOOST_PP_FOR_66_C(BOOST_PP_BOOL(p##(67, s)), s, p, o, m) # define BOOST_PP_FOR_67(s, p, o, m) BOOST_PP_FOR_67_C(BOOST_PP_BOOL(p##(68, s)), s, p, o, m) # define BOOST_PP_FOR_68(s, p, o, m) BOOST_PP_FOR_68_C(BOOST_PP_BOOL(p##(69, s)), s, p, o, m) # define BOOST_PP_FOR_69(s, p, o, m) BOOST_PP_FOR_69_C(BOOST_PP_BOOL(p##(70, s)), s, p, o, m) # define BOOST_PP_FOR_70(s, p, o, m) BOOST_PP_FOR_70_C(BOOST_PP_BOOL(p##(71, s)), s, p, o, m) # define BOOST_PP_FOR_71(s, p, o, m) BOOST_PP_FOR_71_C(BOOST_PP_BOOL(p##(72, s)), s, p, o, m) # define BOOST_PP_FOR_72(s, p, o, m) BOOST_PP_FOR_72_C(BOOST_PP_BOOL(p##(73, s)), s, p, o, m) # define BOOST_PP_FOR_73(s, p, o, m) BOOST_PP_FOR_73_C(BOOST_PP_BOOL(p##(74, s)), s, p, o, m) # define BOOST_PP_FOR_74(s, p, o, m) BOOST_PP_FOR_74_C(BOOST_PP_BOOL(p##(75, s)), s, p, o, m) # define BOOST_PP_FOR_75(s, p, o, m) BOOST_PP_FOR_75_C(BOOST_PP_BOOL(p##(76, s)), s, p, o, m) # define BOOST_PP_FOR_76(s, p, o, m) BOOST_PP_FOR_76_C(BOOST_PP_BOOL(p##(77, s)), s, p, o, m) # define BOOST_PP_FOR_77(s, p, o, m) BOOST_PP_FOR_77_C(BOOST_PP_BOOL(p##(78, s)), s, p, o, m) # define BOOST_PP_FOR_78(s, p, o, m) BOOST_PP_FOR_78_C(BOOST_PP_BOOL(p##(79, s)), s, p, o, m) # define BOOST_PP_FOR_79(s, p, o, m) BOOST_PP_FOR_79_C(BOOST_PP_BOOL(p##(80, s)), s, p, o, m) # define BOOST_PP_FOR_80(s, p, o, m) BOOST_PP_FOR_80_C(BOOST_PP_BOOL(p##(81, s)), s, p, o, m) # define BOOST_PP_FOR_81(s, p, o, m) BOOST_PP_FOR_81_C(BOOST_PP_BOOL(p##(82, s)), s, p, o, m) # define BOOST_PP_FOR_82(s, p, o, m) BOOST_PP_FOR_82_C(BOOST_PP_BOOL(p##(83, s)), s, p, o, m) # define BOOST_PP_FOR_83(s, p, o, m) BOOST_PP_FOR_83_C(BOOST_PP_BOOL(p##(84, s)), s, p, o, m) # define BOOST_PP_FOR_84(s, p, o, m) BOOST_PP_FOR_84_C(BOOST_PP_BOOL(p##(85, s)), s, p, o, m) # define BOOST_PP_FOR_85(s, p, o, m) BOOST_PP_FOR_85_C(BOOST_PP_BOOL(p##(86, s)), s, p, o, m) # define BOOST_PP_FOR_86(s, p, o, m) BOOST_PP_FOR_86_C(BOOST_PP_BOOL(p##(87, s)), s, p, o, m) # define BOOST_PP_FOR_87(s, p, o, m) BOOST_PP_FOR_87_C(BOOST_PP_BOOL(p##(88, s)), s, p, o, m) # define BOOST_PP_FOR_88(s, p, o, m) BOOST_PP_FOR_88_C(BOOST_PP_BOOL(p##(89, s)), s, p, o, m) # define BOOST_PP_FOR_89(s, p, o, m) BOOST_PP_FOR_89_C(BOOST_PP_BOOL(p##(90, s)), s, p, o, m) # define BOOST_PP_FOR_90(s, p, o, m) BOOST_PP_FOR_90_C(BOOST_PP_BOOL(p##(91, s)), s, p, o, m) # define BOOST_PP_FOR_91(s, p, o, m) BOOST_PP_FOR_91_C(BOOST_PP_BOOL(p##(92, s)), s, p, o, m) # define BOOST_PP_FOR_92(s, p, o, m) BOOST_PP_FOR_92_C(BOOST_PP_BOOL(p##(93, s)), s, p, o, m) # define BOOST_PP_FOR_93(s, p, o, m) BOOST_PP_FOR_93_C(BOOST_PP_BOOL(p##(94, s)), s, p, o, m) # define BOOST_PP_FOR_94(s, p, o, m) BOOST_PP_FOR_94_C(BOOST_PP_BOOL(p##(95, s)), s, p, o, m) # define BOOST_PP_FOR_95(s, p, o, m) BOOST_PP_FOR_95_C(BOOST_PP_BOOL(p##(96, s)), s, p, o, m) # define BOOST_PP_FOR_96(s, p, o, m) BOOST_PP_FOR_96_C(BOOST_PP_BOOL(p##(97, s)), s, p, o, m) # define BOOST_PP_FOR_97(s, p, o, m) BOOST_PP_FOR_97_C(BOOST_PP_BOOL(p##(98, s)), s, p, o, m) # define BOOST_PP_FOR_98(s, p, o, m) BOOST_PP_FOR_98_C(BOOST_PP_BOOL(p##(99, s)), s, p, o, m) # define BOOST_PP_FOR_99(s, p, o, m) BOOST_PP_FOR_99_C(BOOST_PP_BOOL(p##(100, s)), s, p, o, m) # define BOOST_PP_FOR_100(s, p, o, m) BOOST_PP_FOR_100_C(BOOST_PP_BOOL(p##(101, s)), s, p, o, m) # define BOOST_PP_FOR_101(s, p, o, m) BOOST_PP_FOR_101_C(BOOST_PP_BOOL(p##(102, s)), s, p, o, m) # define BOOST_PP_FOR_102(s, p, o, m) BOOST_PP_FOR_102_C(BOOST_PP_BOOL(p##(103, s)), s, p, o, m) # define BOOST_PP_FOR_103(s, p, o, m) BOOST_PP_FOR_103_C(BOOST_PP_BOOL(p##(104, s)), s, p, o, m) # define BOOST_PP_FOR_104(s, p, o, m) BOOST_PP_FOR_104_C(BOOST_PP_BOOL(p##(105, s)), s, p, o, m) # define BOOST_PP_FOR_105(s, p, o, m) BOOST_PP_FOR_105_C(BOOST_PP_BOOL(p##(106, s)), s, p, o, m) # define BOOST_PP_FOR_106(s, p, o, m) BOOST_PP_FOR_106_C(BOOST_PP_BOOL(p##(107, s)), s, p, o, m) # define BOOST_PP_FOR_107(s, p, o, m) BOOST_PP_FOR_107_C(BOOST_PP_BOOL(p##(108, s)), s, p, o, m) # define BOOST_PP_FOR_108(s, p, o, m) BOOST_PP_FOR_108_C(BOOST_PP_BOOL(p##(109, s)), s, p, o, m) # define BOOST_PP_FOR_109(s, p, o, m) BOOST_PP_FOR_109_C(BOOST_PP_BOOL(p##(110, s)), s, p, o, m) # define BOOST_PP_FOR_110(s, p, o, m) BOOST_PP_FOR_110_C(BOOST_PP_BOOL(p##(111, s)), s, p, o, m) # define BOOST_PP_FOR_111(s, p, o, m) BOOST_PP_FOR_111_C(BOOST_PP_BOOL(p##(112, s)), s, p, o, m) # define BOOST_PP_FOR_112(s, p, o, m) BOOST_PP_FOR_112_C(BOOST_PP_BOOL(p##(113, s)), s, p, o, m) # define BOOST_PP_FOR_113(s, p, o, m) BOOST_PP_FOR_113_C(BOOST_PP_BOOL(p##(114, s)), s, p, o, m) # define BOOST_PP_FOR_114(s, p, o, m) BOOST_PP_FOR_114_C(BOOST_PP_BOOL(p##(115, s)), s, p, o, m) # define BOOST_PP_FOR_115(s, p, o, m) BOOST_PP_FOR_115_C(BOOST_PP_BOOL(p##(116, s)), s, p, o, m) # define BOOST_PP_FOR_116(s, p, o, m) BOOST_PP_FOR_116_C(BOOST_PP_BOOL(p##(117, s)), s, p, o, m) # define BOOST_PP_FOR_117(s, p, o, m) BOOST_PP_FOR_117_C(BOOST_PP_BOOL(p##(118, s)), s, p, o, m) # define BOOST_PP_FOR_118(s, p, o, m) BOOST_PP_FOR_118_C(BOOST_PP_BOOL(p##(119, s)), s, p, o, m) # define BOOST_PP_FOR_119(s, p, o, m) BOOST_PP_FOR_119_C(BOOST_PP_BOOL(p##(120, s)), s, p, o, m) # define BOOST_PP_FOR_120(s, p, o, m) BOOST_PP_FOR_120_C(BOOST_PP_BOOL(p##(121, s)), s, p, o, m) # define BOOST_PP_FOR_121(s, p, o, m) BOOST_PP_FOR_121_C(BOOST_PP_BOOL(p##(122, s)), s, p, o, m) # define BOOST_PP_FOR_122(s, p, o, m) BOOST_PP_FOR_122_C(BOOST_PP_BOOL(p##(123, s)), s, p, o, m) # define BOOST_PP_FOR_123(s, p, o, m) BOOST_PP_FOR_123_C(BOOST_PP_BOOL(p##(124, s)), s, p, o, m) # define BOOST_PP_FOR_124(s, p, o, m) BOOST_PP_FOR_124_C(BOOST_PP_BOOL(p##(125, s)), s, p, o, m) # define BOOST_PP_FOR_125(s, p, o, m) BOOST_PP_FOR_125_C(BOOST_PP_BOOL(p##(126, s)), s, p, o, m) # define BOOST_PP_FOR_126(s, p, o, m) BOOST_PP_FOR_126_C(BOOST_PP_BOOL(p##(127, s)), s, p, o, m) # define BOOST_PP_FOR_127(s, p, o, m) BOOST_PP_FOR_127_C(BOOST_PP_BOOL(p##(128, s)), s, p, o, m) # define BOOST_PP_FOR_128(s, p, o, m) BOOST_PP_FOR_128_C(BOOST_PP_BOOL(p##(129, s)), s, p, o, m) # define BOOST_PP_FOR_129(s, p, o, m) BOOST_PP_FOR_129_C(BOOST_PP_BOOL(p##(130, s)), s, p, o, m) # define BOOST_PP_FOR_130(s, p, o, m) BOOST_PP_FOR_130_C(BOOST_PP_BOOL(p##(131, s)), s, p, o, m) # define BOOST_PP_FOR_131(s, p, o, m) BOOST_PP_FOR_131_C(BOOST_PP_BOOL(p##(132, s)), s, p, o, m) # define BOOST_PP_FOR_132(s, p, o, m) BOOST_PP_FOR_132_C(BOOST_PP_BOOL(p##(133, s)), s, p, o, m) # define BOOST_PP_FOR_133(s, p, o, m) BOOST_PP_FOR_133_C(BOOST_PP_BOOL(p##(134, s)), s, p, o, m) # define BOOST_PP_FOR_134(s, p, o, m) BOOST_PP_FOR_134_C(BOOST_PP_BOOL(p##(135, s)), s, p, o, m) # define BOOST_PP_FOR_135(s, p, o, m) BOOST_PP_FOR_135_C(BOOST_PP_BOOL(p##(136, s)), s, p, o, m) # define BOOST_PP_FOR_136(s, p, o, m) BOOST_PP_FOR_136_C(BOOST_PP_BOOL(p##(137, s)), s, p, o, m) # define BOOST_PP_FOR_137(s, p, o, m) BOOST_PP_FOR_137_C(BOOST_PP_BOOL(p##(138, s)), s, p, o, m) # define BOOST_PP_FOR_138(s, p, o, m) BOOST_PP_FOR_138_C(BOOST_PP_BOOL(p##(139, s)), s, p, o, m) # define BOOST_PP_FOR_139(s, p, o, m) BOOST_PP_FOR_139_C(BOOST_PP_BOOL(p##(140, s)), s, p, o, m) # define BOOST_PP_FOR_140(s, p, o, m) BOOST_PP_FOR_140_C(BOOST_PP_BOOL(p##(141, s)), s, p, o, m) # define BOOST_PP_FOR_141(s, p, o, m) BOOST_PP_FOR_141_C(BOOST_PP_BOOL(p##(142, s)), s, p, o, m) # define BOOST_PP_FOR_142(s, p, o, m) BOOST_PP_FOR_142_C(BOOST_PP_BOOL(p##(143, s)), s, p, o, m) # define BOOST_PP_FOR_143(s, p, o, m) BOOST_PP_FOR_143_C(BOOST_PP_BOOL(p##(144, s)), s, p, o, m) # define BOOST_PP_FOR_144(s, p, o, m) BOOST_PP_FOR_144_C(BOOST_PP_BOOL(p##(145, s)), s, p, o, m) # define BOOST_PP_FOR_145(s, p, o, m) BOOST_PP_FOR_145_C(BOOST_PP_BOOL(p##(146, s)), s, p, o, m) # define BOOST_PP_FOR_146(s, p, o, m) BOOST_PP_FOR_146_C(BOOST_PP_BOOL(p##(147, s)), s, p, o, m) # define BOOST_PP_FOR_147(s, p, o, m) BOOST_PP_FOR_147_C(BOOST_PP_BOOL(p##(148, s)), s, p, o, m) # define BOOST_PP_FOR_148(s, p, o, m) BOOST_PP_FOR_148_C(BOOST_PP_BOOL(p##(149, s)), s, p, o, m) # define BOOST_PP_FOR_149(s, p, o, m) BOOST_PP_FOR_149_C(BOOST_PP_BOOL(p##(150, s)), s, p, o, m) # define BOOST_PP_FOR_150(s, p, o, m) BOOST_PP_FOR_150_C(BOOST_PP_BOOL(p##(151, s)), s, p, o, m) # define BOOST_PP_FOR_151(s, p, o, m) BOOST_PP_FOR_151_C(BOOST_PP_BOOL(p##(152, s)), s, p, o, m) # define BOOST_PP_FOR_152(s, p, o, m) BOOST_PP_FOR_152_C(BOOST_PP_BOOL(p##(153, s)), s, p, o, m) # define BOOST_PP_FOR_153(s, p, o, m) BOOST_PP_FOR_153_C(BOOST_PP_BOOL(p##(154, s)), s, p, o, m) # define BOOST_PP_FOR_154(s, p, o, m) BOOST_PP_FOR_154_C(BOOST_PP_BOOL(p##(155, s)), s, p, o, m) # define BOOST_PP_FOR_155(s, p, o, m) BOOST_PP_FOR_155_C(BOOST_PP_BOOL(p##(156, s)), s, p, o, m) # define BOOST_PP_FOR_156(s, p, o, m) BOOST_PP_FOR_156_C(BOOST_PP_BOOL(p##(157, s)), s, p, o, m) # define BOOST_PP_FOR_157(s, p, o, m) BOOST_PP_FOR_157_C(BOOST_PP_BOOL(p##(158, s)), s, p, o, m) # define BOOST_PP_FOR_158(s, p, o, m) BOOST_PP_FOR_158_C(BOOST_PP_BOOL(p##(159, s)), s, p, o, m) # define BOOST_PP_FOR_159(s, p, o, m) BOOST_PP_FOR_159_C(BOOST_PP_BOOL(p##(160, s)), s, p, o, m) # define BOOST_PP_FOR_160(s, p, o, m) BOOST_PP_FOR_160_C(BOOST_PP_BOOL(p##(161, s)), s, p, o, m) # define BOOST_PP_FOR_161(s, p, o, m) BOOST_PP_FOR_161_C(BOOST_PP_BOOL(p##(162, s)), s, p, o, m) # define BOOST_PP_FOR_162(s, p, o, m) BOOST_PP_FOR_162_C(BOOST_PP_BOOL(p##(163, s)), s, p, o, m) # define BOOST_PP_FOR_163(s, p, o, m) BOOST_PP_FOR_163_C(BOOST_PP_BOOL(p##(164, s)), s, p, o, m) # define BOOST_PP_FOR_164(s, p, o, m) BOOST_PP_FOR_164_C(BOOST_PP_BOOL(p##(165, s)), s, p, o, m) # define BOOST_PP_FOR_165(s, p, o, m) BOOST_PP_FOR_165_C(BOOST_PP_BOOL(p##(166, s)), s, p, o, m) # define BOOST_PP_FOR_166(s, p, o, m) BOOST_PP_FOR_166_C(BOOST_PP_BOOL(p##(167, s)), s, p, o, m) # define BOOST_PP_FOR_167(s, p, o, m) BOOST_PP_FOR_167_C(BOOST_PP_BOOL(p##(168, s)), s, p, o, m) # define BOOST_PP_FOR_168(s, p, o, m) BOOST_PP_FOR_168_C(BOOST_PP_BOOL(p##(169, s)), s, p, o, m) # define BOOST_PP_FOR_169(s, p, o, m) BOOST_PP_FOR_169_C(BOOST_PP_BOOL(p##(170, s)), s, p, o, m) # define BOOST_PP_FOR_170(s, p, o, m) BOOST_PP_FOR_170_C(BOOST_PP_BOOL(p##(171, s)), s, p, o, m) # define BOOST_PP_FOR_171(s, p, o, m) BOOST_PP_FOR_171_C(BOOST_PP_BOOL(p##(172, s)), s, p, o, m) # define BOOST_PP_FOR_172(s, p, o, m) BOOST_PP_FOR_172_C(BOOST_PP_BOOL(p##(173, s)), s, p, o, m) # define BOOST_PP_FOR_173(s, p, o, m) BOOST_PP_FOR_173_C(BOOST_PP_BOOL(p##(174, s)), s, p, o, m) # define BOOST_PP_FOR_174(s, p, o, m) BOOST_PP_FOR_174_C(BOOST_PP_BOOL(p##(175, s)), s, p, o, m) # define BOOST_PP_FOR_175(s, p, o, m) BOOST_PP_FOR_175_C(BOOST_PP_BOOL(p##(176, s)), s, p, o, m) # define BOOST_PP_FOR_176(s, p, o, m) BOOST_PP_FOR_176_C(BOOST_PP_BOOL(p##(177, s)), s, p, o, m) # define BOOST_PP_FOR_177(s, p, o, m) BOOST_PP_FOR_177_C(BOOST_PP_BOOL(p##(178, s)), s, p, o, m) # define BOOST_PP_FOR_178(s, p, o, m) BOOST_PP_FOR_178_C(BOOST_PP_BOOL(p##(179, s)), s, p, o, m) # define BOOST_PP_FOR_179(s, p, o, m) BOOST_PP_FOR_179_C(BOOST_PP_BOOL(p##(180, s)), s, p, o, m) # define BOOST_PP_FOR_180(s, p, o, m) BOOST_PP_FOR_180_C(BOOST_PP_BOOL(p##(181, s)), s, p, o, m) # define BOOST_PP_FOR_181(s, p, o, m) BOOST_PP_FOR_181_C(BOOST_PP_BOOL(p##(182, s)), s, p, o, m) # define BOOST_PP_FOR_182(s, p, o, m) BOOST_PP_FOR_182_C(BOOST_PP_BOOL(p##(183, s)), s, p, o, m) # define BOOST_PP_FOR_183(s, p, o, m) BOOST_PP_FOR_183_C(BOOST_PP_BOOL(p##(184, s)), s, p, o, m) # define BOOST_PP_FOR_184(s, p, o, m) BOOST_PP_FOR_184_C(BOOST_PP_BOOL(p##(185, s)), s, p, o, m) # define BOOST_PP_FOR_185(s, p, o, m) BOOST_PP_FOR_185_C(BOOST_PP_BOOL(p##(186, s)), s, p, o, m) # define BOOST_PP_FOR_186(s, p, o, m) BOOST_PP_FOR_186_C(BOOST_PP_BOOL(p##(187, s)), s, p, o, m) # define BOOST_PP_FOR_187(s, p, o, m) BOOST_PP_FOR_187_C(BOOST_PP_BOOL(p##(188, s)), s, p, o, m) # define BOOST_PP_FOR_188(s, p, o, m) BOOST_PP_FOR_188_C(BOOST_PP_BOOL(p##(189, s)), s, p, o, m) # define BOOST_PP_FOR_189(s, p, o, m) BOOST_PP_FOR_189_C(BOOST_PP_BOOL(p##(190, s)), s, p, o, m) # define BOOST_PP_FOR_190(s, p, o, m) BOOST_PP_FOR_190_C(BOOST_PP_BOOL(p##(191, s)), s, p, o, m) # define BOOST_PP_FOR_191(s, p, o, m) BOOST_PP_FOR_191_C(BOOST_PP_BOOL(p##(192, s)), s, p, o, m) # define BOOST_PP_FOR_192(s, p, o, m) BOOST_PP_FOR_192_C(BOOST_PP_BOOL(p##(193, s)), s, p, o, m) # define BOOST_PP_FOR_193(s, p, o, m) BOOST_PP_FOR_193_C(BOOST_PP_BOOL(p##(194, s)), s, p, o, m) # define BOOST_PP_FOR_194(s, p, o, m) BOOST_PP_FOR_194_C(BOOST_PP_BOOL(p##(195, s)), s, p, o, m) # define BOOST_PP_FOR_195(s, p, o, m) BOOST_PP_FOR_195_C(BOOST_PP_BOOL(p##(196, s)), s, p, o, m) # define BOOST_PP_FOR_196(s, p, o, m) BOOST_PP_FOR_196_C(BOOST_PP_BOOL(p##(197, s)), s, p, o, m) # define BOOST_PP_FOR_197(s, p, o, m) BOOST_PP_FOR_197_C(BOOST_PP_BOOL(p##(198, s)), s, p, o, m) # define BOOST_PP_FOR_198(s, p, o, m) BOOST_PP_FOR_198_C(BOOST_PP_BOOL(p##(199, s)), s, p, o, m) # define BOOST_PP_FOR_199(s, p, o, m) BOOST_PP_FOR_199_C(BOOST_PP_BOOL(p##(200, s)), s, p, o, m) # define BOOST_PP_FOR_200(s, p, o, m) BOOST_PP_FOR_200_C(BOOST_PP_BOOL(p##(201, s)), s, p, o, m) # define BOOST_PP_FOR_201(s, p, o, m) BOOST_PP_FOR_201_C(BOOST_PP_BOOL(p##(202, s)), s, p, o, m) # define BOOST_PP_FOR_202(s, p, o, m) BOOST_PP_FOR_202_C(BOOST_PP_BOOL(p##(203, s)), s, p, o, m) # define BOOST_PP_FOR_203(s, p, o, m) BOOST_PP_FOR_203_C(BOOST_PP_BOOL(p##(204, s)), s, p, o, m) # define BOOST_PP_FOR_204(s, p, o, m) BOOST_PP_FOR_204_C(BOOST_PP_BOOL(p##(205, s)), s, p, o, m) # define BOOST_PP_FOR_205(s, p, o, m) BOOST_PP_FOR_205_C(BOOST_PP_BOOL(p##(206, s)), s, p, o, m) # define BOOST_PP_FOR_206(s, p, o, m) BOOST_PP_FOR_206_C(BOOST_PP_BOOL(p##(207, s)), s, p, o, m) # define BOOST_PP_FOR_207(s, p, o, m) BOOST_PP_FOR_207_C(BOOST_PP_BOOL(p##(208, s)), s, p, o, m) # define BOOST_PP_FOR_208(s, p, o, m) BOOST_PP_FOR_208_C(BOOST_PP_BOOL(p##(209, s)), s, p, o, m) # define BOOST_PP_FOR_209(s, p, o, m) BOOST_PP_FOR_209_C(BOOST_PP_BOOL(p##(210, s)), s, p, o, m) # define BOOST_PP_FOR_210(s, p, o, m) BOOST_PP_FOR_210_C(BOOST_PP_BOOL(p##(211, s)), s, p, o, m) # define BOOST_PP_FOR_211(s, p, o, m) BOOST_PP_FOR_211_C(BOOST_PP_BOOL(p##(212, s)), s, p, o, m) # define BOOST_PP_FOR_212(s, p, o, m) BOOST_PP_FOR_212_C(BOOST_PP_BOOL(p##(213, s)), s, p, o, m) # define BOOST_PP_FOR_213(s, p, o, m) BOOST_PP_FOR_213_C(BOOST_PP_BOOL(p##(214, s)), s, p, o, m) # define BOOST_PP_FOR_214(s, p, o, m) BOOST_PP_FOR_214_C(BOOST_PP_BOOL(p##(215, s)), s, p, o, m) # define BOOST_PP_FOR_215(s, p, o, m) BOOST_PP_FOR_215_C(BOOST_PP_BOOL(p##(216, s)), s, p, o, m) # define BOOST_PP_FOR_216(s, p, o, m) BOOST_PP_FOR_216_C(BOOST_PP_BOOL(p##(217, s)), s, p, o, m) # define BOOST_PP_FOR_217(s, p, o, m) BOOST_PP_FOR_217_C(BOOST_PP_BOOL(p##(218, s)), s, p, o, m) # define BOOST_PP_FOR_218(s, p, o, m) BOOST_PP_FOR_218_C(BOOST_PP_BOOL(p##(219, s)), s, p, o, m) # define BOOST_PP_FOR_219(s, p, o, m) BOOST_PP_FOR_219_C(BOOST_PP_BOOL(p##(220, s)), s, p, o, m) # define BOOST_PP_FOR_220(s, p, o, m) BOOST_PP_FOR_220_C(BOOST_PP_BOOL(p##(221, s)), s, p, o, m) # define BOOST_PP_FOR_221(s, p, o, m) BOOST_PP_FOR_221_C(BOOST_PP_BOOL(p##(222, s)), s, p, o, m) # define BOOST_PP_FOR_222(s, p, o, m) BOOST_PP_FOR_222_C(BOOST_PP_BOOL(p##(223, s)), s, p, o, m) # define BOOST_PP_FOR_223(s, p, o, m) BOOST_PP_FOR_223_C(BOOST_PP_BOOL(p##(224, s)), s, p, o, m) # define BOOST_PP_FOR_224(s, p, o, m) BOOST_PP_FOR_224_C(BOOST_PP_BOOL(p##(225, s)), s, p, o, m) # define BOOST_PP_FOR_225(s, p, o, m) BOOST_PP_FOR_225_C(BOOST_PP_BOOL(p##(226, s)), s, p, o, m) # define BOOST_PP_FOR_226(s, p, o, m) BOOST_PP_FOR_226_C(BOOST_PP_BOOL(p##(227, s)), s, p, o, m) # define BOOST_PP_FOR_227(s, p, o, m) BOOST_PP_FOR_227_C(BOOST_PP_BOOL(p##(228, s)), s, p, o, m) # define BOOST_PP_FOR_228(s, p, o, m) BOOST_PP_FOR_228_C(BOOST_PP_BOOL(p##(229, s)), s, p, o, m) # define BOOST_PP_FOR_229(s, p, o, m) BOOST_PP_FOR_229_C(BOOST_PP_BOOL(p##(230, s)), s, p, o, m) # define BOOST_PP_FOR_230(s, p, o, m) BOOST_PP_FOR_230_C(BOOST_PP_BOOL(p##(231, s)), s, p, o, m) # define BOOST_PP_FOR_231(s, p, o, m) BOOST_PP_FOR_231_C(BOOST_PP_BOOL(p##(232, s)), s, p, o, m) # define BOOST_PP_FOR_232(s, p, o, m) BOOST_PP_FOR_232_C(BOOST_PP_BOOL(p##(233, s)), s, p, o, m) # define BOOST_PP_FOR_233(s, p, o, m) BOOST_PP_FOR_233_C(BOOST_PP_BOOL(p##(234, s)), s, p, o, m) # define BOOST_PP_FOR_234(s, p, o, m) BOOST_PP_FOR_234_C(BOOST_PP_BOOL(p##(235, s)), s, p, o, m) # define BOOST_PP_FOR_235(s, p, o, m) BOOST_PP_FOR_235_C(BOOST_PP_BOOL(p##(236, s)), s, p, o, m) # define BOOST_PP_FOR_236(s, p, o, m) BOOST_PP_FOR_236_C(BOOST_PP_BOOL(p##(237, s)), s, p, o, m) # define BOOST_PP_FOR_237(s, p, o, m) BOOST_PP_FOR_237_C(BOOST_PP_BOOL(p##(238, s)), s, p, o, m) # define BOOST_PP_FOR_238(s, p, o, m) BOOST_PP_FOR_238_C(BOOST_PP_BOOL(p##(239, s)), s, p, o, m) # define BOOST_PP_FOR_239(s, p, o, m) BOOST_PP_FOR_239_C(BOOST_PP_BOOL(p##(240, s)), s, p, o, m) # define BOOST_PP_FOR_240(s, p, o, m) BOOST_PP_FOR_240_C(BOOST_PP_BOOL(p##(241, s)), s, p, o, m) # define BOOST_PP_FOR_241(s, p, o, m) BOOST_PP_FOR_241_C(BOOST_PP_BOOL(p##(242, s)), s, p, o, m) # define BOOST_PP_FOR_242(s, p, o, m) BOOST_PP_FOR_242_C(BOOST_PP_BOOL(p##(243, s)), s, p, o, m) # define BOOST_PP_FOR_243(s, p, o, m) BOOST_PP_FOR_243_C(BOOST_PP_BOOL(p##(244, s)), s, p, o, m) # define BOOST_PP_FOR_244(s, p, o, m) BOOST_PP_FOR_244_C(BOOST_PP_BOOL(p##(245, s)), s, p, o, m) # define BOOST_PP_FOR_245(s, p, o, m) BOOST_PP_FOR_245_C(BOOST_PP_BOOL(p##(246, s)), s, p, o, m) # define BOOST_PP_FOR_246(s, p, o, m) BOOST_PP_FOR_246_C(BOOST_PP_BOOL(p##(247, s)), s, p, o, m) # define BOOST_PP_FOR_247(s, p, o, m) BOOST_PP_FOR_247_C(BOOST_PP_BOOL(p##(248, s)), s, p, o, m) # define BOOST_PP_FOR_248(s, p, o, m) BOOST_PP_FOR_248_C(BOOST_PP_BOOL(p##(249, s)), s, p, o, m) # define BOOST_PP_FOR_249(s, p, o, m) BOOST_PP_FOR_249_C(BOOST_PP_BOOL(p##(250, s)), s, p, o, m) # define BOOST_PP_FOR_250(s, p, o, m) BOOST_PP_FOR_250_C(BOOST_PP_BOOL(p##(251, s)), s, p, o, m) # define BOOST_PP_FOR_251(s, p, o, m) BOOST_PP_FOR_251_C(BOOST_PP_BOOL(p##(252, s)), s, p, o, m) # define BOOST_PP_FOR_252(s, p, o, m) BOOST_PP_FOR_252_C(BOOST_PP_BOOL(p##(253, s)), s, p, o, m) # define BOOST_PP_FOR_253(s, p, o, m) BOOST_PP_FOR_253_C(BOOST_PP_BOOL(p##(254, s)), s, p, o, m) # define BOOST_PP_FOR_254(s, p, o, m) BOOST_PP_FOR_254_C(BOOST_PP_BOOL(p##(255, s)), s, p, o, m) # define BOOST_PP_FOR_255(s, p, o, m) BOOST_PP_FOR_255_C(BOOST_PP_BOOL(p##(256, s)), s, p, o, m) # define BOOST_PP_FOR_256(s, p, o, m) BOOST_PP_FOR_256_C(BOOST_PP_BOOL(p##(257, s)), s, p, o, m) # # define BOOST_PP_FOR_1_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(2, s) BOOST_PP_IIF(c, BOOST_PP_FOR_2, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(2, s), p, o, m) # define BOOST_PP_FOR_2_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(3, s) BOOST_PP_IIF(c, BOOST_PP_FOR_3, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(3, s), p, o, m) # define BOOST_PP_FOR_3_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(4, s) BOOST_PP_IIF(c, BOOST_PP_FOR_4, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(4, s), p, o, m) # define BOOST_PP_FOR_4_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(5, s) BOOST_PP_IIF(c, BOOST_PP_FOR_5, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(5, s), p, o, m) # define BOOST_PP_FOR_5_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(6, s) BOOST_PP_IIF(c, BOOST_PP_FOR_6, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(6, s), p, o, m) # define BOOST_PP_FOR_6_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(7, s) BOOST_PP_IIF(c, BOOST_PP_FOR_7, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(7, s), p, o, m) # define BOOST_PP_FOR_7_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(8, s) BOOST_PP_IIF(c, BOOST_PP_FOR_8, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(8, s), p, o, m) # define BOOST_PP_FOR_8_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(9, s) BOOST_PP_IIF(c, BOOST_PP_FOR_9, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(9, s), p, o, m) # define BOOST_PP_FOR_9_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(10, s) BOOST_PP_IIF(c, BOOST_PP_FOR_10, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(10, s), p, o, m) # define BOOST_PP_FOR_10_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(11, s) BOOST_PP_IIF(c, BOOST_PP_FOR_11, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(11, s), p, o, m) # define BOOST_PP_FOR_11_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(12, s) BOOST_PP_IIF(c, BOOST_PP_FOR_12, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(12, s), p, o, m) # define BOOST_PP_FOR_12_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(13, s) BOOST_PP_IIF(c, BOOST_PP_FOR_13, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(13, s), p, o, m) # define BOOST_PP_FOR_13_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(14, s) BOOST_PP_IIF(c, BOOST_PP_FOR_14, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(14, s), p, o, m) # define BOOST_PP_FOR_14_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(15, s) BOOST_PP_IIF(c, BOOST_PP_FOR_15, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(15, s), p, o, m) # define BOOST_PP_FOR_15_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(16, s) BOOST_PP_IIF(c, BOOST_PP_FOR_16, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(16, s), p, o, m) # define BOOST_PP_FOR_16_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(17, s) BOOST_PP_IIF(c, BOOST_PP_FOR_17, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(17, s), p, o, m) # define BOOST_PP_FOR_17_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(18, s) BOOST_PP_IIF(c, BOOST_PP_FOR_18, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(18, s), p, o, m) # define BOOST_PP_FOR_18_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(19, s) BOOST_PP_IIF(c, BOOST_PP_FOR_19, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(19, s), p, o, m) # define BOOST_PP_FOR_19_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(20, s) BOOST_PP_IIF(c, BOOST_PP_FOR_20, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(20, s), p, o, m) # define BOOST_PP_FOR_20_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(21, s) BOOST_PP_IIF(c, BOOST_PP_FOR_21, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(21, s), p, o, m) # define BOOST_PP_FOR_21_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(22, s) BOOST_PP_IIF(c, BOOST_PP_FOR_22, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(22, s), p, o, m) # define BOOST_PP_FOR_22_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(23, s) BOOST_PP_IIF(c, BOOST_PP_FOR_23, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(23, s), p, o, m) # define BOOST_PP_FOR_23_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(24, s) BOOST_PP_IIF(c, BOOST_PP_FOR_24, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(24, s), p, o, m) # define BOOST_PP_FOR_24_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(25, s) BOOST_PP_IIF(c, BOOST_PP_FOR_25, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(25, s), p, o, m) # define BOOST_PP_FOR_25_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(26, s) BOOST_PP_IIF(c, BOOST_PP_FOR_26, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(26, s), p, o, m) # define BOOST_PP_FOR_26_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(27, s) BOOST_PP_IIF(c, BOOST_PP_FOR_27, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(27, s), p, o, m) # define BOOST_PP_FOR_27_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(28, s) BOOST_PP_IIF(c, BOOST_PP_FOR_28, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(28, s), p, o, m) # define BOOST_PP_FOR_28_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(29, s) BOOST_PP_IIF(c, BOOST_PP_FOR_29, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(29, s), p, o, m) # define BOOST_PP_FOR_29_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(30, s) BOOST_PP_IIF(c, BOOST_PP_FOR_30, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(30, s), p, o, m) # define BOOST_PP_FOR_30_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(31, s) BOOST_PP_IIF(c, BOOST_PP_FOR_31, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(31, s), p, o, m) # define BOOST_PP_FOR_31_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(32, s) BOOST_PP_IIF(c, BOOST_PP_FOR_32, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(32, s), p, o, m) # define BOOST_PP_FOR_32_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(33, s) BOOST_PP_IIF(c, BOOST_PP_FOR_33, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(33, s), p, o, m) # define BOOST_PP_FOR_33_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(34, s) BOOST_PP_IIF(c, BOOST_PP_FOR_34, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(34, s), p, o, m) # define BOOST_PP_FOR_34_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(35, s) BOOST_PP_IIF(c, BOOST_PP_FOR_35, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(35, s), p, o, m) # define BOOST_PP_FOR_35_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(36, s) BOOST_PP_IIF(c, BOOST_PP_FOR_36, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(36, s), p, o, m) # define BOOST_PP_FOR_36_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(37, s) BOOST_PP_IIF(c, BOOST_PP_FOR_37, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(37, s), p, o, m) # define BOOST_PP_FOR_37_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(38, s) BOOST_PP_IIF(c, BOOST_PP_FOR_38, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(38, s), p, o, m) # define BOOST_PP_FOR_38_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(39, s) BOOST_PP_IIF(c, BOOST_PP_FOR_39, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(39, s), p, o, m) # define BOOST_PP_FOR_39_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(40, s) BOOST_PP_IIF(c, BOOST_PP_FOR_40, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(40, s), p, o, m) # define BOOST_PP_FOR_40_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(41, s) BOOST_PP_IIF(c, BOOST_PP_FOR_41, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(41, s), p, o, m) # define BOOST_PP_FOR_41_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(42, s) BOOST_PP_IIF(c, BOOST_PP_FOR_42, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(42, s), p, o, m) # define BOOST_PP_FOR_42_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(43, s) BOOST_PP_IIF(c, BOOST_PP_FOR_43, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(43, s), p, o, m) # define BOOST_PP_FOR_43_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(44, s) BOOST_PP_IIF(c, BOOST_PP_FOR_44, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(44, s), p, o, m) # define BOOST_PP_FOR_44_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(45, s) BOOST_PP_IIF(c, BOOST_PP_FOR_45, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(45, s), p, o, m) # define BOOST_PP_FOR_45_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(46, s) BOOST_PP_IIF(c, BOOST_PP_FOR_46, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(46, s), p, o, m) # define BOOST_PP_FOR_46_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(47, s) BOOST_PP_IIF(c, BOOST_PP_FOR_47, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(47, s), p, o, m) # define BOOST_PP_FOR_47_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(48, s) BOOST_PP_IIF(c, BOOST_PP_FOR_48, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(48, s), p, o, m) # define BOOST_PP_FOR_48_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(49, s) BOOST_PP_IIF(c, BOOST_PP_FOR_49, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(49, s), p, o, m) # define BOOST_PP_FOR_49_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(50, s) BOOST_PP_IIF(c, BOOST_PP_FOR_50, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(50, s), p, o, m) # define BOOST_PP_FOR_50_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(51, s) BOOST_PP_IIF(c, BOOST_PP_FOR_51, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(51, s), p, o, m) # define BOOST_PP_FOR_51_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(52, s) BOOST_PP_IIF(c, BOOST_PP_FOR_52, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(52, s), p, o, m) # define BOOST_PP_FOR_52_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(53, s) BOOST_PP_IIF(c, BOOST_PP_FOR_53, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(53, s), p, o, m) # define BOOST_PP_FOR_53_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(54, s) BOOST_PP_IIF(c, BOOST_PP_FOR_54, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(54, s), p, o, m) # define BOOST_PP_FOR_54_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(55, s) BOOST_PP_IIF(c, BOOST_PP_FOR_55, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(55, s), p, o, m) # define BOOST_PP_FOR_55_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(56, s) BOOST_PP_IIF(c, BOOST_PP_FOR_56, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(56, s), p, o, m) # define BOOST_PP_FOR_56_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(57, s) BOOST_PP_IIF(c, BOOST_PP_FOR_57, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(57, s), p, o, m) # define BOOST_PP_FOR_57_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(58, s) BOOST_PP_IIF(c, BOOST_PP_FOR_58, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(58, s), p, o, m) # define BOOST_PP_FOR_58_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(59, s) BOOST_PP_IIF(c, BOOST_PP_FOR_59, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(59, s), p, o, m) # define BOOST_PP_FOR_59_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(60, s) BOOST_PP_IIF(c, BOOST_PP_FOR_60, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(60, s), p, o, m) # define BOOST_PP_FOR_60_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(61, s) BOOST_PP_IIF(c, BOOST_PP_FOR_61, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(61, s), p, o, m) # define BOOST_PP_FOR_61_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(62, s) BOOST_PP_IIF(c, BOOST_PP_FOR_62, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(62, s), p, o, m) # define BOOST_PP_FOR_62_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(63, s) BOOST_PP_IIF(c, BOOST_PP_FOR_63, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(63, s), p, o, m) # define BOOST_PP_FOR_63_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(64, s) BOOST_PP_IIF(c, BOOST_PP_FOR_64, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(64, s), p, o, m) # define BOOST_PP_FOR_64_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(65, s) BOOST_PP_IIF(c, BOOST_PP_FOR_65, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(65, s), p, o, m) # define BOOST_PP_FOR_65_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(66, s) BOOST_PP_IIF(c, BOOST_PP_FOR_66, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(66, s), p, o, m) # define BOOST_PP_FOR_66_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(67, s) BOOST_PP_IIF(c, BOOST_PP_FOR_67, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(67, s), p, o, m) # define BOOST_PP_FOR_67_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(68, s) BOOST_PP_IIF(c, BOOST_PP_FOR_68, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(68, s), p, o, m) # define BOOST_PP_FOR_68_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(69, s) BOOST_PP_IIF(c, BOOST_PP_FOR_69, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(69, s), p, o, m) # define BOOST_PP_FOR_69_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(70, s) BOOST_PP_IIF(c, BOOST_PP_FOR_70, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(70, s), p, o, m) # define BOOST_PP_FOR_70_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(71, s) BOOST_PP_IIF(c, BOOST_PP_FOR_71, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(71, s), p, o, m) # define BOOST_PP_FOR_71_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(72, s) BOOST_PP_IIF(c, BOOST_PP_FOR_72, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(72, s), p, o, m) # define BOOST_PP_FOR_72_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(73, s) BOOST_PP_IIF(c, BOOST_PP_FOR_73, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(73, s), p, o, m) # define BOOST_PP_FOR_73_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(74, s) BOOST_PP_IIF(c, BOOST_PP_FOR_74, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(74, s), p, o, m) # define BOOST_PP_FOR_74_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(75, s) BOOST_PP_IIF(c, BOOST_PP_FOR_75, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(75, s), p, o, m) # define BOOST_PP_FOR_75_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(76, s) BOOST_PP_IIF(c, BOOST_PP_FOR_76, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(76, s), p, o, m) # define BOOST_PP_FOR_76_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(77, s) BOOST_PP_IIF(c, BOOST_PP_FOR_77, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(77, s), p, o, m) # define BOOST_PP_FOR_77_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(78, s) BOOST_PP_IIF(c, BOOST_PP_FOR_78, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(78, s), p, o, m) # define BOOST_PP_FOR_78_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(79, s) BOOST_PP_IIF(c, BOOST_PP_FOR_79, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(79, s), p, o, m) # define BOOST_PP_FOR_79_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(80, s) BOOST_PP_IIF(c, BOOST_PP_FOR_80, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(80, s), p, o, m) # define BOOST_PP_FOR_80_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(81, s) BOOST_PP_IIF(c, BOOST_PP_FOR_81, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(81, s), p, o, m) # define BOOST_PP_FOR_81_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(82, s) BOOST_PP_IIF(c, BOOST_PP_FOR_82, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(82, s), p, o, m) # define BOOST_PP_FOR_82_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(83, s) BOOST_PP_IIF(c, BOOST_PP_FOR_83, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(83, s), p, o, m) # define BOOST_PP_FOR_83_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(84, s) BOOST_PP_IIF(c, BOOST_PP_FOR_84, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(84, s), p, o, m) # define BOOST_PP_FOR_84_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(85, s) BOOST_PP_IIF(c, BOOST_PP_FOR_85, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(85, s), p, o, m) # define BOOST_PP_FOR_85_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(86, s) BOOST_PP_IIF(c, BOOST_PP_FOR_86, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(86, s), p, o, m) # define BOOST_PP_FOR_86_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(87, s) BOOST_PP_IIF(c, BOOST_PP_FOR_87, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(87, s), p, o, m) # define BOOST_PP_FOR_87_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(88, s) BOOST_PP_IIF(c, BOOST_PP_FOR_88, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(88, s), p, o, m) # define BOOST_PP_FOR_88_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(89, s) BOOST_PP_IIF(c, BOOST_PP_FOR_89, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(89, s), p, o, m) # define BOOST_PP_FOR_89_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(90, s) BOOST_PP_IIF(c, BOOST_PP_FOR_90, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(90, s), p, o, m) # define BOOST_PP_FOR_90_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(91, s) BOOST_PP_IIF(c, BOOST_PP_FOR_91, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(91, s), p, o, m) # define BOOST_PP_FOR_91_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(92, s) BOOST_PP_IIF(c, BOOST_PP_FOR_92, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(92, s), p, o, m) # define BOOST_PP_FOR_92_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(93, s) BOOST_PP_IIF(c, BOOST_PP_FOR_93, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(93, s), p, o, m) # define BOOST_PP_FOR_93_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(94, s) BOOST_PP_IIF(c, BOOST_PP_FOR_94, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(94, s), p, o, m) # define BOOST_PP_FOR_94_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(95, s) BOOST_PP_IIF(c, BOOST_PP_FOR_95, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(95, s), p, o, m) # define BOOST_PP_FOR_95_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(96, s) BOOST_PP_IIF(c, BOOST_PP_FOR_96, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(96, s), p, o, m) # define BOOST_PP_FOR_96_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(97, s) BOOST_PP_IIF(c, BOOST_PP_FOR_97, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(97, s), p, o, m) # define BOOST_PP_FOR_97_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(98, s) BOOST_PP_IIF(c, BOOST_PP_FOR_98, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(98, s), p, o, m) # define BOOST_PP_FOR_98_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(99, s) BOOST_PP_IIF(c, BOOST_PP_FOR_99, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(99, s), p, o, m) # define BOOST_PP_FOR_99_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(100, s) BOOST_PP_IIF(c, BOOST_PP_FOR_100, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(100, s), p, o, m) # define BOOST_PP_FOR_100_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(101, s) BOOST_PP_IIF(c, BOOST_PP_FOR_101, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(101, s), p, o, m) # define BOOST_PP_FOR_101_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(102, s) BOOST_PP_IIF(c, BOOST_PP_FOR_102, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(102, s), p, o, m) # define BOOST_PP_FOR_102_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(103, s) BOOST_PP_IIF(c, BOOST_PP_FOR_103, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(103, s), p, o, m) # define BOOST_PP_FOR_103_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(104, s) BOOST_PP_IIF(c, BOOST_PP_FOR_104, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(104, s), p, o, m) # define BOOST_PP_FOR_104_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(105, s) BOOST_PP_IIF(c, BOOST_PP_FOR_105, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(105, s), p, o, m) # define BOOST_PP_FOR_105_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(106, s) BOOST_PP_IIF(c, BOOST_PP_FOR_106, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(106, s), p, o, m) # define BOOST_PP_FOR_106_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(107, s) BOOST_PP_IIF(c, BOOST_PP_FOR_107, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(107, s), p, o, m) # define BOOST_PP_FOR_107_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(108, s) BOOST_PP_IIF(c, BOOST_PP_FOR_108, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(108, s), p, o, m) # define BOOST_PP_FOR_108_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(109, s) BOOST_PP_IIF(c, BOOST_PP_FOR_109, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(109, s), p, o, m) # define BOOST_PP_FOR_109_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(110, s) BOOST_PP_IIF(c, BOOST_PP_FOR_110, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(110, s), p, o, m) # define BOOST_PP_FOR_110_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(111, s) BOOST_PP_IIF(c, BOOST_PP_FOR_111, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(111, s), p, o, m) # define BOOST_PP_FOR_111_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(112, s) BOOST_PP_IIF(c, BOOST_PP_FOR_112, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(112, s), p, o, m) # define BOOST_PP_FOR_112_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(113, s) BOOST_PP_IIF(c, BOOST_PP_FOR_113, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(113, s), p, o, m) # define BOOST_PP_FOR_113_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(114, s) BOOST_PP_IIF(c, BOOST_PP_FOR_114, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(114, s), p, o, m) # define BOOST_PP_FOR_114_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(115, s) BOOST_PP_IIF(c, BOOST_PP_FOR_115, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(115, s), p, o, m) # define BOOST_PP_FOR_115_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(116, s) BOOST_PP_IIF(c, BOOST_PP_FOR_116, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(116, s), p, o, m) # define BOOST_PP_FOR_116_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(117, s) BOOST_PP_IIF(c, BOOST_PP_FOR_117, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(117, s), p, o, m) # define BOOST_PP_FOR_117_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(118, s) BOOST_PP_IIF(c, BOOST_PP_FOR_118, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(118, s), p, o, m) # define BOOST_PP_FOR_118_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(119, s) BOOST_PP_IIF(c, BOOST_PP_FOR_119, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(119, s), p, o, m) # define BOOST_PP_FOR_119_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(120, s) BOOST_PP_IIF(c, BOOST_PP_FOR_120, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(120, s), p, o, m) # define BOOST_PP_FOR_120_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(121, s) BOOST_PP_IIF(c, BOOST_PP_FOR_121, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(121, s), p, o, m) # define BOOST_PP_FOR_121_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(122, s) BOOST_PP_IIF(c, BOOST_PP_FOR_122, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(122, s), p, o, m) # define BOOST_PP_FOR_122_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(123, s) BOOST_PP_IIF(c, BOOST_PP_FOR_123, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(123, s), p, o, m) # define BOOST_PP_FOR_123_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(124, s) BOOST_PP_IIF(c, BOOST_PP_FOR_124, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(124, s), p, o, m) # define BOOST_PP_FOR_124_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(125, s) BOOST_PP_IIF(c, BOOST_PP_FOR_125, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(125, s), p, o, m) # define BOOST_PP_FOR_125_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(126, s) BOOST_PP_IIF(c, BOOST_PP_FOR_126, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(126, s), p, o, m) # define BOOST_PP_FOR_126_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(127, s) BOOST_PP_IIF(c, BOOST_PP_FOR_127, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(127, s), p, o, m) # define BOOST_PP_FOR_127_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(128, s) BOOST_PP_IIF(c, BOOST_PP_FOR_128, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(128, s), p, o, m) # define BOOST_PP_FOR_128_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(129, s) BOOST_PP_IIF(c, BOOST_PP_FOR_129, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(129, s), p, o, m) # define BOOST_PP_FOR_129_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(130, s) BOOST_PP_IIF(c, BOOST_PP_FOR_130, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(130, s), p, o, m) # define BOOST_PP_FOR_130_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(131, s) BOOST_PP_IIF(c, BOOST_PP_FOR_131, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(131, s), p, o, m) # define BOOST_PP_FOR_131_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(132, s) BOOST_PP_IIF(c, BOOST_PP_FOR_132, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(132, s), p, o, m) # define BOOST_PP_FOR_132_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(133, s) BOOST_PP_IIF(c, BOOST_PP_FOR_133, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(133, s), p, o, m) # define BOOST_PP_FOR_133_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(134, s) BOOST_PP_IIF(c, BOOST_PP_FOR_134, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(134, s), p, o, m) # define BOOST_PP_FOR_134_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(135, s) BOOST_PP_IIF(c, BOOST_PP_FOR_135, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(135, s), p, o, m) # define BOOST_PP_FOR_135_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(136, s) BOOST_PP_IIF(c, BOOST_PP_FOR_136, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(136, s), p, o, m) # define BOOST_PP_FOR_136_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(137, s) BOOST_PP_IIF(c, BOOST_PP_FOR_137, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(137, s), p, o, m) # define BOOST_PP_FOR_137_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(138, s) BOOST_PP_IIF(c, BOOST_PP_FOR_138, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(138, s), p, o, m) # define BOOST_PP_FOR_138_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(139, s) BOOST_PP_IIF(c, BOOST_PP_FOR_139, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(139, s), p, o, m) # define BOOST_PP_FOR_139_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(140, s) BOOST_PP_IIF(c, BOOST_PP_FOR_140, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(140, s), p, o, m) # define BOOST_PP_FOR_140_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(141, s) BOOST_PP_IIF(c, BOOST_PP_FOR_141, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(141, s), p, o, m) # define BOOST_PP_FOR_141_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(142, s) BOOST_PP_IIF(c, BOOST_PP_FOR_142, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(142, s), p, o, m) # define BOOST_PP_FOR_142_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(143, s) BOOST_PP_IIF(c, BOOST_PP_FOR_143, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(143, s), p, o, m) # define BOOST_PP_FOR_143_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(144, s) BOOST_PP_IIF(c, BOOST_PP_FOR_144, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(144, s), p, o, m) # define BOOST_PP_FOR_144_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(145, s) BOOST_PP_IIF(c, BOOST_PP_FOR_145, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(145, s), p, o, m) # define BOOST_PP_FOR_145_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(146, s) BOOST_PP_IIF(c, BOOST_PP_FOR_146, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(146, s), p, o, m) # define BOOST_PP_FOR_146_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(147, s) BOOST_PP_IIF(c, BOOST_PP_FOR_147, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(147, s), p, o, m) # define BOOST_PP_FOR_147_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(148, s) BOOST_PP_IIF(c, BOOST_PP_FOR_148, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(148, s), p, o, m) # define BOOST_PP_FOR_148_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(149, s) BOOST_PP_IIF(c, BOOST_PP_FOR_149, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(149, s), p, o, m) # define BOOST_PP_FOR_149_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(150, s) BOOST_PP_IIF(c, BOOST_PP_FOR_150, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(150, s), p, o, m) # define BOOST_PP_FOR_150_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(151, s) BOOST_PP_IIF(c, BOOST_PP_FOR_151, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(151, s), p, o, m) # define BOOST_PP_FOR_151_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(152, s) BOOST_PP_IIF(c, BOOST_PP_FOR_152, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(152, s), p, o, m) # define BOOST_PP_FOR_152_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(153, s) BOOST_PP_IIF(c, BOOST_PP_FOR_153, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(153, s), p, o, m) # define BOOST_PP_FOR_153_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(154, s) BOOST_PP_IIF(c, BOOST_PP_FOR_154, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(154, s), p, o, m) # define BOOST_PP_FOR_154_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(155, s) BOOST_PP_IIF(c, BOOST_PP_FOR_155, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(155, s), p, o, m) # define BOOST_PP_FOR_155_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(156, s) BOOST_PP_IIF(c, BOOST_PP_FOR_156, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(156, s), p, o, m) # define BOOST_PP_FOR_156_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(157, s) BOOST_PP_IIF(c, BOOST_PP_FOR_157, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(157, s), p, o, m) # define BOOST_PP_FOR_157_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(158, s) BOOST_PP_IIF(c, BOOST_PP_FOR_158, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(158, s), p, o, m) # define BOOST_PP_FOR_158_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(159, s) BOOST_PP_IIF(c, BOOST_PP_FOR_159, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(159, s), p, o, m) # define BOOST_PP_FOR_159_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(160, s) BOOST_PP_IIF(c, BOOST_PP_FOR_160, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(160, s), p, o, m) # define BOOST_PP_FOR_160_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(161, s) BOOST_PP_IIF(c, BOOST_PP_FOR_161, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(161, s), p, o, m) # define BOOST_PP_FOR_161_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(162, s) BOOST_PP_IIF(c, BOOST_PP_FOR_162, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(162, s), p, o, m) # define BOOST_PP_FOR_162_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(163, s) BOOST_PP_IIF(c, BOOST_PP_FOR_163, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(163, s), p, o, m) # define BOOST_PP_FOR_163_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(164, s) BOOST_PP_IIF(c, BOOST_PP_FOR_164, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(164, s), p, o, m) # define BOOST_PP_FOR_164_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(165, s) BOOST_PP_IIF(c, BOOST_PP_FOR_165, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(165, s), p, o, m) # define BOOST_PP_FOR_165_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(166, s) BOOST_PP_IIF(c, BOOST_PP_FOR_166, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(166, s), p, o, m) # define BOOST_PP_FOR_166_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(167, s) BOOST_PP_IIF(c, BOOST_PP_FOR_167, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(167, s), p, o, m) # define BOOST_PP_FOR_167_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(168, s) BOOST_PP_IIF(c, BOOST_PP_FOR_168, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(168, s), p, o, m) # define BOOST_PP_FOR_168_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(169, s) BOOST_PP_IIF(c, BOOST_PP_FOR_169, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(169, s), p, o, m) # define BOOST_PP_FOR_169_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(170, s) BOOST_PP_IIF(c, BOOST_PP_FOR_170, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(170, s), p, o, m) # define BOOST_PP_FOR_170_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(171, s) BOOST_PP_IIF(c, BOOST_PP_FOR_171, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(171, s), p, o, m) # define BOOST_PP_FOR_171_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(172, s) BOOST_PP_IIF(c, BOOST_PP_FOR_172, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(172, s), p, o, m) # define BOOST_PP_FOR_172_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(173, s) BOOST_PP_IIF(c, BOOST_PP_FOR_173, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(173, s), p, o, m) # define BOOST_PP_FOR_173_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(174, s) BOOST_PP_IIF(c, BOOST_PP_FOR_174, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(174, s), p, o, m) # define BOOST_PP_FOR_174_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(175, s) BOOST_PP_IIF(c, BOOST_PP_FOR_175, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(175, s), p, o, m) # define BOOST_PP_FOR_175_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(176, s) BOOST_PP_IIF(c, BOOST_PP_FOR_176, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(176, s), p, o, m) # define BOOST_PP_FOR_176_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(177, s) BOOST_PP_IIF(c, BOOST_PP_FOR_177, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(177, s), p, o, m) # define BOOST_PP_FOR_177_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(178, s) BOOST_PP_IIF(c, BOOST_PP_FOR_178, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(178, s), p, o, m) # define BOOST_PP_FOR_178_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(179, s) BOOST_PP_IIF(c, BOOST_PP_FOR_179, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(179, s), p, o, m) # define BOOST_PP_FOR_179_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(180, s) BOOST_PP_IIF(c, BOOST_PP_FOR_180, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(180, s), p, o, m) # define BOOST_PP_FOR_180_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(181, s) BOOST_PP_IIF(c, BOOST_PP_FOR_181, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(181, s), p, o, m) # define BOOST_PP_FOR_181_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(182, s) BOOST_PP_IIF(c, BOOST_PP_FOR_182, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(182, s), p, o, m) # define BOOST_PP_FOR_182_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(183, s) BOOST_PP_IIF(c, BOOST_PP_FOR_183, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(183, s), p, o, m) # define BOOST_PP_FOR_183_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(184, s) BOOST_PP_IIF(c, BOOST_PP_FOR_184, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(184, s), p, o, m) # define BOOST_PP_FOR_184_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(185, s) BOOST_PP_IIF(c, BOOST_PP_FOR_185, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(185, s), p, o, m) # define BOOST_PP_FOR_185_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(186, s) BOOST_PP_IIF(c, BOOST_PP_FOR_186, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(186, s), p, o, m) # define BOOST_PP_FOR_186_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(187, s) BOOST_PP_IIF(c, BOOST_PP_FOR_187, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(187, s), p, o, m) # define BOOST_PP_FOR_187_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(188, s) BOOST_PP_IIF(c, BOOST_PP_FOR_188, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(188, s), p, o, m) # define BOOST_PP_FOR_188_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(189, s) BOOST_PP_IIF(c, BOOST_PP_FOR_189, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(189, s), p, o, m) # define BOOST_PP_FOR_189_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(190, s) BOOST_PP_IIF(c, BOOST_PP_FOR_190, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(190, s), p, o, m) # define BOOST_PP_FOR_190_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(191, s) BOOST_PP_IIF(c, BOOST_PP_FOR_191, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(191, s), p, o, m) # define BOOST_PP_FOR_191_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(192, s) BOOST_PP_IIF(c, BOOST_PP_FOR_192, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(192, s), p, o, m) # define BOOST_PP_FOR_192_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(193, s) BOOST_PP_IIF(c, BOOST_PP_FOR_193, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(193, s), p, o, m) # define BOOST_PP_FOR_193_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(194, s) BOOST_PP_IIF(c, BOOST_PP_FOR_194, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(194, s), p, o, m) # define BOOST_PP_FOR_194_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(195, s) BOOST_PP_IIF(c, BOOST_PP_FOR_195, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(195, s), p, o, m) # define BOOST_PP_FOR_195_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(196, s) BOOST_PP_IIF(c, BOOST_PP_FOR_196, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(196, s), p, o, m) # define BOOST_PP_FOR_196_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(197, s) BOOST_PP_IIF(c, BOOST_PP_FOR_197, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(197, s), p, o, m) # define BOOST_PP_FOR_197_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(198, s) BOOST_PP_IIF(c, BOOST_PP_FOR_198, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(198, s), p, o, m) # define BOOST_PP_FOR_198_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(199, s) BOOST_PP_IIF(c, BOOST_PP_FOR_199, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(199, s), p, o, m) # define BOOST_PP_FOR_199_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(200, s) BOOST_PP_IIF(c, BOOST_PP_FOR_200, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(200, s), p, o, m) # define BOOST_PP_FOR_200_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(201, s) BOOST_PP_IIF(c, BOOST_PP_FOR_201, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(201, s), p, o, m) # define BOOST_PP_FOR_201_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(202, s) BOOST_PP_IIF(c, BOOST_PP_FOR_202, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(202, s), p, o, m) # define BOOST_PP_FOR_202_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(203, s) BOOST_PP_IIF(c, BOOST_PP_FOR_203, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(203, s), p, o, m) # define BOOST_PP_FOR_203_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(204, s) BOOST_PP_IIF(c, BOOST_PP_FOR_204, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(204, s), p, o, m) # define BOOST_PP_FOR_204_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(205, s) BOOST_PP_IIF(c, BOOST_PP_FOR_205, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(205, s), p, o, m) # define BOOST_PP_FOR_205_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(206, s) BOOST_PP_IIF(c, BOOST_PP_FOR_206, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(206, s), p, o, m) # define BOOST_PP_FOR_206_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(207, s) BOOST_PP_IIF(c, BOOST_PP_FOR_207, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(207, s), p, o, m) # define BOOST_PP_FOR_207_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(208, s) BOOST_PP_IIF(c, BOOST_PP_FOR_208, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(208, s), p, o, m) # define BOOST_PP_FOR_208_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(209, s) BOOST_PP_IIF(c, BOOST_PP_FOR_209, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(209, s), p, o, m) # define BOOST_PP_FOR_209_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(210, s) BOOST_PP_IIF(c, BOOST_PP_FOR_210, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(210, s), p, o, m) # define BOOST_PP_FOR_210_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(211, s) BOOST_PP_IIF(c, BOOST_PP_FOR_211, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(211, s), p, o, m) # define BOOST_PP_FOR_211_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(212, s) BOOST_PP_IIF(c, BOOST_PP_FOR_212, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(212, s), p, o, m) # define BOOST_PP_FOR_212_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(213, s) BOOST_PP_IIF(c, BOOST_PP_FOR_213, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(213, s), p, o, m) # define BOOST_PP_FOR_213_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(214, s) BOOST_PP_IIF(c, BOOST_PP_FOR_214, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(214, s), p, o, m) # define BOOST_PP_FOR_214_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(215, s) BOOST_PP_IIF(c, BOOST_PP_FOR_215, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(215, s), p, o, m) # define BOOST_PP_FOR_215_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(216, s) BOOST_PP_IIF(c, BOOST_PP_FOR_216, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(216, s), p, o, m) # define BOOST_PP_FOR_216_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(217, s) BOOST_PP_IIF(c, BOOST_PP_FOR_217, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(217, s), p, o, m) # define BOOST_PP_FOR_217_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(218, s) BOOST_PP_IIF(c, BOOST_PP_FOR_218, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(218, s), p, o, m) # define BOOST_PP_FOR_218_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(219, s) BOOST_PP_IIF(c, BOOST_PP_FOR_219, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(219, s), p, o, m) # define BOOST_PP_FOR_219_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(220, s) BOOST_PP_IIF(c, BOOST_PP_FOR_220, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(220, s), p, o, m) # define BOOST_PP_FOR_220_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(221, s) BOOST_PP_IIF(c, BOOST_PP_FOR_221, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(221, s), p, o, m) # define BOOST_PP_FOR_221_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(222, s) BOOST_PP_IIF(c, BOOST_PP_FOR_222, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(222, s), p, o, m) # define BOOST_PP_FOR_222_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(223, s) BOOST_PP_IIF(c, BOOST_PP_FOR_223, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(223, s), p, o, m) # define BOOST_PP_FOR_223_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(224, s) BOOST_PP_IIF(c, BOOST_PP_FOR_224, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(224, s), p, o, m) # define BOOST_PP_FOR_224_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(225, s) BOOST_PP_IIF(c, BOOST_PP_FOR_225, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(225, s), p, o, m) # define BOOST_PP_FOR_225_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(226, s) BOOST_PP_IIF(c, BOOST_PP_FOR_226, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(226, s), p, o, m) # define BOOST_PP_FOR_226_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(227, s) BOOST_PP_IIF(c, BOOST_PP_FOR_227, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(227, s), p, o, m) # define BOOST_PP_FOR_227_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(228, s) BOOST_PP_IIF(c, BOOST_PP_FOR_228, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(228, s), p, o, m) # define BOOST_PP_FOR_228_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(229, s) BOOST_PP_IIF(c, BOOST_PP_FOR_229, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(229, s), p, o, m) # define BOOST_PP_FOR_229_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(230, s) BOOST_PP_IIF(c, BOOST_PP_FOR_230, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(230, s), p, o, m) # define BOOST_PP_FOR_230_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(231, s) BOOST_PP_IIF(c, BOOST_PP_FOR_231, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(231, s), p, o, m) # define BOOST_PP_FOR_231_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(232, s) BOOST_PP_IIF(c, BOOST_PP_FOR_232, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(232, s), p, o, m) # define BOOST_PP_FOR_232_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(233, s) BOOST_PP_IIF(c, BOOST_PP_FOR_233, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(233, s), p, o, m) # define BOOST_PP_FOR_233_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(234, s) BOOST_PP_IIF(c, BOOST_PP_FOR_234, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(234, s), p, o, m) # define BOOST_PP_FOR_234_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(235, s) BOOST_PP_IIF(c, BOOST_PP_FOR_235, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(235, s), p, o, m) # define BOOST_PP_FOR_235_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(236, s) BOOST_PP_IIF(c, BOOST_PP_FOR_236, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(236, s), p, o, m) # define BOOST_PP_FOR_236_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(237, s) BOOST_PP_IIF(c, BOOST_PP_FOR_237, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(237, s), p, o, m) # define BOOST_PP_FOR_237_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(238, s) BOOST_PP_IIF(c, BOOST_PP_FOR_238, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(238, s), p, o, m) # define BOOST_PP_FOR_238_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(239, s) BOOST_PP_IIF(c, BOOST_PP_FOR_239, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(239, s), p, o, m) # define BOOST_PP_FOR_239_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(240, s) BOOST_PP_IIF(c, BOOST_PP_FOR_240, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(240, s), p, o, m) # define BOOST_PP_FOR_240_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(241, s) BOOST_PP_IIF(c, BOOST_PP_FOR_241, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(241, s), p, o, m) # define BOOST_PP_FOR_241_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(242, s) BOOST_PP_IIF(c, BOOST_PP_FOR_242, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(242, s), p, o, m) # define BOOST_PP_FOR_242_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(243, s) BOOST_PP_IIF(c, BOOST_PP_FOR_243, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(243, s), p, o, m) # define BOOST_PP_FOR_243_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(244, s) BOOST_PP_IIF(c, BOOST_PP_FOR_244, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(244, s), p, o, m) # define BOOST_PP_FOR_244_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(245, s) BOOST_PP_IIF(c, BOOST_PP_FOR_245, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(245, s), p, o, m) # define BOOST_PP_FOR_245_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(246, s) BOOST_PP_IIF(c, BOOST_PP_FOR_246, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(246, s), p, o, m) # define BOOST_PP_FOR_246_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(247, s) BOOST_PP_IIF(c, BOOST_PP_FOR_247, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(247, s), p, o, m) # define BOOST_PP_FOR_247_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(248, s) BOOST_PP_IIF(c, BOOST_PP_FOR_248, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(248, s), p, o, m) # define BOOST_PP_FOR_248_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(249, s) BOOST_PP_IIF(c, BOOST_PP_FOR_249, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(249, s), p, o, m) # define BOOST_PP_FOR_249_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(250, s) BOOST_PP_IIF(c, BOOST_PP_FOR_250, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(250, s), p, o, m) # define BOOST_PP_FOR_250_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(251, s) BOOST_PP_IIF(c, BOOST_PP_FOR_251, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(251, s), p, o, m) # define BOOST_PP_FOR_251_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(252, s) BOOST_PP_IIF(c, BOOST_PP_FOR_252, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(252, s), p, o, m) # define BOOST_PP_FOR_252_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(253, s) BOOST_PP_IIF(c, BOOST_PP_FOR_253, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(253, s), p, o, m) # define BOOST_PP_FOR_253_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(254, s) BOOST_PP_IIF(c, BOOST_PP_FOR_254, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(254, s), p, o, m) # define BOOST_PP_FOR_254_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(255, s) BOOST_PP_IIF(c, BOOST_PP_FOR_255, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(255, s), p, o, m) # define BOOST_PP_FOR_255_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(256, s) BOOST_PP_IIF(c, BOOST_PP_FOR_256, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(256, s), p, o, m) # define BOOST_PP_FOR_256_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(257, s) BOOST_PP_IIF(c, BOOST_PP_FOR_257, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(257, s), p, o, m) # # endif ================================================ FILE: benchmarks/boost/preprocessor/repetition/detail/edg/for.hpp ================================================ # /* Copyright (C) 2001 # * Housemarque Oy # * http://www.housemarque.com # * # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # */ # # /* Revised by Paul Mensonides (2002) */ # # /* See http://www.boost.org for most recent version. */ # # ifndef BOOST_PREPROCESSOR_REPETITION_DETAIL_EDG_FOR_HPP # define BOOST_PREPROCESSOR_REPETITION_DETAIL_EDG_FOR_HPP # # include # include # # define BOOST_PP_FOR_1(s, p, o, m) BOOST_PP_FOR_1_I(s, p, o, m) # define BOOST_PP_FOR_2(s, p, o, m) BOOST_PP_FOR_2_I(s, p, o, m) # define BOOST_PP_FOR_3(s, p, o, m) BOOST_PP_FOR_3_I(s, p, o, m) # define BOOST_PP_FOR_4(s, p, o, m) BOOST_PP_FOR_4_I(s, p, o, m) # define BOOST_PP_FOR_5(s, p, o, m) BOOST_PP_FOR_5_I(s, p, o, m) # define BOOST_PP_FOR_6(s, p, o, m) BOOST_PP_FOR_6_I(s, p, o, m) # define BOOST_PP_FOR_7(s, p, o, m) BOOST_PP_FOR_7_I(s, p, o, m) # define BOOST_PP_FOR_8(s, p, o, m) BOOST_PP_FOR_8_I(s, p, o, m) # define BOOST_PP_FOR_9(s, p, o, m) BOOST_PP_FOR_9_I(s, p, o, m) # define BOOST_PP_FOR_10(s, p, o, m) BOOST_PP_FOR_10_I(s, p, o, m) # define BOOST_PP_FOR_11(s, p, o, m) BOOST_PP_FOR_11_I(s, p, o, m) # define BOOST_PP_FOR_12(s, p, o, m) BOOST_PP_FOR_12_I(s, p, o, m) # define BOOST_PP_FOR_13(s, p, o, m) BOOST_PP_FOR_13_I(s, p, o, m) # define BOOST_PP_FOR_14(s, p, o, m) BOOST_PP_FOR_14_I(s, p, o, m) # define BOOST_PP_FOR_15(s, p, o, m) BOOST_PP_FOR_15_I(s, p, o, m) # define BOOST_PP_FOR_16(s, p, o, m) BOOST_PP_FOR_16_I(s, p, o, m) # define BOOST_PP_FOR_17(s, p, o, m) BOOST_PP_FOR_17_I(s, p, o, m) # define BOOST_PP_FOR_18(s, p, o, m) BOOST_PP_FOR_18_I(s, p, o, m) # define BOOST_PP_FOR_19(s, p, o, m) BOOST_PP_FOR_19_I(s, p, o, m) # define BOOST_PP_FOR_20(s, p, o, m) BOOST_PP_FOR_20_I(s, p, o, m) # define BOOST_PP_FOR_21(s, p, o, m) BOOST_PP_FOR_21_I(s, p, o, m) # define BOOST_PP_FOR_22(s, p, o, m) BOOST_PP_FOR_22_I(s, p, o, m) # define BOOST_PP_FOR_23(s, p, o, m) BOOST_PP_FOR_23_I(s, p, o, m) # define BOOST_PP_FOR_24(s, p, o, m) BOOST_PP_FOR_24_I(s, p, o, m) # define BOOST_PP_FOR_25(s, p, o, m) BOOST_PP_FOR_25_I(s, p, o, m) # define BOOST_PP_FOR_26(s, p, o, m) BOOST_PP_FOR_26_I(s, p, o, m) # define BOOST_PP_FOR_27(s, p, o, m) BOOST_PP_FOR_27_I(s, p, o, m) # define BOOST_PP_FOR_28(s, p, o, m) BOOST_PP_FOR_28_I(s, p, o, m) # define BOOST_PP_FOR_29(s, p, o, m) BOOST_PP_FOR_29_I(s, p, o, m) # define BOOST_PP_FOR_30(s, p, o, m) BOOST_PP_FOR_30_I(s, p, o, m) # define BOOST_PP_FOR_31(s, p, o, m) BOOST_PP_FOR_31_I(s, p, o, m) # define BOOST_PP_FOR_32(s, p, o, m) BOOST_PP_FOR_32_I(s, p, o, m) # define BOOST_PP_FOR_33(s, p, o, m) BOOST_PP_FOR_33_I(s, p, o, m) # define BOOST_PP_FOR_34(s, p, o, m) BOOST_PP_FOR_34_I(s, p, o, m) # define BOOST_PP_FOR_35(s, p, o, m) BOOST_PP_FOR_35_I(s, p, o, m) # define BOOST_PP_FOR_36(s, p, o, m) BOOST_PP_FOR_36_I(s, p, o, m) # define BOOST_PP_FOR_37(s, p, o, m) BOOST_PP_FOR_37_I(s, p, o, m) # define BOOST_PP_FOR_38(s, p, o, m) BOOST_PP_FOR_38_I(s, p, o, m) # define BOOST_PP_FOR_39(s, p, o, m) BOOST_PP_FOR_39_I(s, p, o, m) # define BOOST_PP_FOR_40(s, p, o, m) BOOST_PP_FOR_40_I(s, p, o, m) # define BOOST_PP_FOR_41(s, p, o, m) BOOST_PP_FOR_41_I(s, p, o, m) # define BOOST_PP_FOR_42(s, p, o, m) BOOST_PP_FOR_42_I(s, p, o, m) # define BOOST_PP_FOR_43(s, p, o, m) BOOST_PP_FOR_43_I(s, p, o, m) # define BOOST_PP_FOR_44(s, p, o, m) BOOST_PP_FOR_44_I(s, p, o, m) # define BOOST_PP_FOR_45(s, p, o, m) BOOST_PP_FOR_45_I(s, p, o, m) # define BOOST_PP_FOR_46(s, p, o, m) BOOST_PP_FOR_46_I(s, p, o, m) # define BOOST_PP_FOR_47(s, p, o, m) BOOST_PP_FOR_47_I(s, p, o, m) # define BOOST_PP_FOR_48(s, p, o, m) BOOST_PP_FOR_48_I(s, p, o, m) # define BOOST_PP_FOR_49(s, p, o, m) BOOST_PP_FOR_49_I(s, p, o, m) # define BOOST_PP_FOR_50(s, p, o, m) BOOST_PP_FOR_50_I(s, p, o, m) # define BOOST_PP_FOR_51(s, p, o, m) BOOST_PP_FOR_51_I(s, p, o, m) # define BOOST_PP_FOR_52(s, p, o, m) BOOST_PP_FOR_52_I(s, p, o, m) # define BOOST_PP_FOR_53(s, p, o, m) BOOST_PP_FOR_53_I(s, p, o, m) # define BOOST_PP_FOR_54(s, p, o, m) BOOST_PP_FOR_54_I(s, p, o, m) # define BOOST_PP_FOR_55(s, p, o, m) BOOST_PP_FOR_55_I(s, p, o, m) # define BOOST_PP_FOR_56(s, p, o, m) BOOST_PP_FOR_56_I(s, p, o, m) # define BOOST_PP_FOR_57(s, p, o, m) BOOST_PP_FOR_57_I(s, p, o, m) # define BOOST_PP_FOR_58(s, p, o, m) BOOST_PP_FOR_58_I(s, p, o, m) # define BOOST_PP_FOR_59(s, p, o, m) BOOST_PP_FOR_59_I(s, p, o, m) # define BOOST_PP_FOR_60(s, p, o, m) BOOST_PP_FOR_60_I(s, p, o, m) # define BOOST_PP_FOR_61(s, p, o, m) BOOST_PP_FOR_61_I(s, p, o, m) # define BOOST_PP_FOR_62(s, p, o, m) BOOST_PP_FOR_62_I(s, p, o, m) # define BOOST_PP_FOR_63(s, p, o, m) BOOST_PP_FOR_63_I(s, p, o, m) # define BOOST_PP_FOR_64(s, p, o, m) BOOST_PP_FOR_64_I(s, p, o, m) # define BOOST_PP_FOR_65(s, p, o, m) BOOST_PP_FOR_65_I(s, p, o, m) # define BOOST_PP_FOR_66(s, p, o, m) BOOST_PP_FOR_66_I(s, p, o, m) # define BOOST_PP_FOR_67(s, p, o, m) BOOST_PP_FOR_67_I(s, p, o, m) # define BOOST_PP_FOR_68(s, p, o, m) BOOST_PP_FOR_68_I(s, p, o, m) # define BOOST_PP_FOR_69(s, p, o, m) BOOST_PP_FOR_69_I(s, p, o, m) # define BOOST_PP_FOR_70(s, p, o, m) BOOST_PP_FOR_70_I(s, p, o, m) # define BOOST_PP_FOR_71(s, p, o, m) BOOST_PP_FOR_71_I(s, p, o, m) # define BOOST_PP_FOR_72(s, p, o, m) BOOST_PP_FOR_72_I(s, p, o, m) # define BOOST_PP_FOR_73(s, p, o, m) BOOST_PP_FOR_73_I(s, p, o, m) # define BOOST_PP_FOR_74(s, p, o, m) BOOST_PP_FOR_74_I(s, p, o, m) # define BOOST_PP_FOR_75(s, p, o, m) BOOST_PP_FOR_75_I(s, p, o, m) # define BOOST_PP_FOR_76(s, p, o, m) BOOST_PP_FOR_76_I(s, p, o, m) # define BOOST_PP_FOR_77(s, p, o, m) BOOST_PP_FOR_77_I(s, p, o, m) # define BOOST_PP_FOR_78(s, p, o, m) BOOST_PP_FOR_78_I(s, p, o, m) # define BOOST_PP_FOR_79(s, p, o, m) BOOST_PP_FOR_79_I(s, p, o, m) # define BOOST_PP_FOR_80(s, p, o, m) BOOST_PP_FOR_80_I(s, p, o, m) # define BOOST_PP_FOR_81(s, p, o, m) BOOST_PP_FOR_81_I(s, p, o, m) # define BOOST_PP_FOR_82(s, p, o, m) BOOST_PP_FOR_82_I(s, p, o, m) # define BOOST_PP_FOR_83(s, p, o, m) BOOST_PP_FOR_83_I(s, p, o, m) # define BOOST_PP_FOR_84(s, p, o, m) BOOST_PP_FOR_84_I(s, p, o, m) # define BOOST_PP_FOR_85(s, p, o, m) BOOST_PP_FOR_85_I(s, p, o, m) # define BOOST_PP_FOR_86(s, p, o, m) BOOST_PP_FOR_86_I(s, p, o, m) # define BOOST_PP_FOR_87(s, p, o, m) BOOST_PP_FOR_87_I(s, p, o, m) # define BOOST_PP_FOR_88(s, p, o, m) BOOST_PP_FOR_88_I(s, p, o, m) # define BOOST_PP_FOR_89(s, p, o, m) BOOST_PP_FOR_89_I(s, p, o, m) # define BOOST_PP_FOR_90(s, p, o, m) BOOST_PP_FOR_90_I(s, p, o, m) # define BOOST_PP_FOR_91(s, p, o, m) BOOST_PP_FOR_91_I(s, p, o, m) # define BOOST_PP_FOR_92(s, p, o, m) BOOST_PP_FOR_92_I(s, p, o, m) # define BOOST_PP_FOR_93(s, p, o, m) BOOST_PP_FOR_93_I(s, p, o, m) # define BOOST_PP_FOR_94(s, p, o, m) BOOST_PP_FOR_94_I(s, p, o, m) # define BOOST_PP_FOR_95(s, p, o, m) BOOST_PP_FOR_95_I(s, p, o, m) # define BOOST_PP_FOR_96(s, p, o, m) BOOST_PP_FOR_96_I(s, p, o, m) # define BOOST_PP_FOR_97(s, p, o, m) BOOST_PP_FOR_97_I(s, p, o, m) # define BOOST_PP_FOR_98(s, p, o, m) BOOST_PP_FOR_98_I(s, p, o, m) # define BOOST_PP_FOR_99(s, p, o, m) BOOST_PP_FOR_99_I(s, p, o, m) # define BOOST_PP_FOR_100(s, p, o, m) BOOST_PP_FOR_100_I(s, p, o, m) # define BOOST_PP_FOR_101(s, p, o, m) BOOST_PP_FOR_101_I(s, p, o, m) # define BOOST_PP_FOR_102(s, p, o, m) BOOST_PP_FOR_102_I(s, p, o, m) # define BOOST_PP_FOR_103(s, p, o, m) BOOST_PP_FOR_103_I(s, p, o, m) # define BOOST_PP_FOR_104(s, p, o, m) BOOST_PP_FOR_104_I(s, p, o, m) # define BOOST_PP_FOR_105(s, p, o, m) BOOST_PP_FOR_105_I(s, p, o, m) # define BOOST_PP_FOR_106(s, p, o, m) BOOST_PP_FOR_106_I(s, p, o, m) # define BOOST_PP_FOR_107(s, p, o, m) BOOST_PP_FOR_107_I(s, p, o, m) # define BOOST_PP_FOR_108(s, p, o, m) BOOST_PP_FOR_108_I(s, p, o, m) # define BOOST_PP_FOR_109(s, p, o, m) BOOST_PP_FOR_109_I(s, p, o, m) # define BOOST_PP_FOR_110(s, p, o, m) BOOST_PP_FOR_110_I(s, p, o, m) # define BOOST_PP_FOR_111(s, p, o, m) BOOST_PP_FOR_111_I(s, p, o, m) # define BOOST_PP_FOR_112(s, p, o, m) BOOST_PP_FOR_112_I(s, p, o, m) # define BOOST_PP_FOR_113(s, p, o, m) BOOST_PP_FOR_113_I(s, p, o, m) # define BOOST_PP_FOR_114(s, p, o, m) BOOST_PP_FOR_114_I(s, p, o, m) # define BOOST_PP_FOR_115(s, p, o, m) BOOST_PP_FOR_115_I(s, p, o, m) # define BOOST_PP_FOR_116(s, p, o, m) BOOST_PP_FOR_116_I(s, p, o, m) # define BOOST_PP_FOR_117(s, p, o, m) BOOST_PP_FOR_117_I(s, p, o, m) # define BOOST_PP_FOR_118(s, p, o, m) BOOST_PP_FOR_118_I(s, p, o, m) # define BOOST_PP_FOR_119(s, p, o, m) BOOST_PP_FOR_119_I(s, p, o, m) # define BOOST_PP_FOR_120(s, p, o, m) BOOST_PP_FOR_120_I(s, p, o, m) # define BOOST_PP_FOR_121(s, p, o, m) BOOST_PP_FOR_121_I(s, p, o, m) # define BOOST_PP_FOR_122(s, p, o, m) BOOST_PP_FOR_122_I(s, p, o, m) # define BOOST_PP_FOR_123(s, p, o, m) BOOST_PP_FOR_123_I(s, p, o, m) # define BOOST_PP_FOR_124(s, p, o, m) BOOST_PP_FOR_124_I(s, p, o, m) # define BOOST_PP_FOR_125(s, p, o, m) BOOST_PP_FOR_125_I(s, p, o, m) # define BOOST_PP_FOR_126(s, p, o, m) BOOST_PP_FOR_126_I(s, p, o, m) # define BOOST_PP_FOR_127(s, p, o, m) BOOST_PP_FOR_127_I(s, p, o, m) # define BOOST_PP_FOR_128(s, p, o, m) BOOST_PP_FOR_128_I(s, p, o, m) # define BOOST_PP_FOR_129(s, p, o, m) BOOST_PP_FOR_129_I(s, p, o, m) # define BOOST_PP_FOR_130(s, p, o, m) BOOST_PP_FOR_130_I(s, p, o, m) # define BOOST_PP_FOR_131(s, p, o, m) BOOST_PP_FOR_131_I(s, p, o, m) # define BOOST_PP_FOR_132(s, p, o, m) BOOST_PP_FOR_132_I(s, p, o, m) # define BOOST_PP_FOR_133(s, p, o, m) BOOST_PP_FOR_133_I(s, p, o, m) # define BOOST_PP_FOR_134(s, p, o, m) BOOST_PP_FOR_134_I(s, p, o, m) # define BOOST_PP_FOR_135(s, p, o, m) BOOST_PP_FOR_135_I(s, p, o, m) # define BOOST_PP_FOR_136(s, p, o, m) BOOST_PP_FOR_136_I(s, p, o, m) # define BOOST_PP_FOR_137(s, p, o, m) BOOST_PP_FOR_137_I(s, p, o, m) # define BOOST_PP_FOR_138(s, p, o, m) BOOST_PP_FOR_138_I(s, p, o, m) # define BOOST_PP_FOR_139(s, p, o, m) BOOST_PP_FOR_139_I(s, p, o, m) # define BOOST_PP_FOR_140(s, p, o, m) BOOST_PP_FOR_140_I(s, p, o, m) # define BOOST_PP_FOR_141(s, p, o, m) BOOST_PP_FOR_141_I(s, p, o, m) # define BOOST_PP_FOR_142(s, p, o, m) BOOST_PP_FOR_142_I(s, p, o, m) # define BOOST_PP_FOR_143(s, p, o, m) BOOST_PP_FOR_143_I(s, p, o, m) # define BOOST_PP_FOR_144(s, p, o, m) BOOST_PP_FOR_144_I(s, p, o, m) # define BOOST_PP_FOR_145(s, p, o, m) BOOST_PP_FOR_145_I(s, p, o, m) # define BOOST_PP_FOR_146(s, p, o, m) BOOST_PP_FOR_146_I(s, p, o, m) # define BOOST_PP_FOR_147(s, p, o, m) BOOST_PP_FOR_147_I(s, p, o, m) # define BOOST_PP_FOR_148(s, p, o, m) BOOST_PP_FOR_148_I(s, p, o, m) # define BOOST_PP_FOR_149(s, p, o, m) BOOST_PP_FOR_149_I(s, p, o, m) # define BOOST_PP_FOR_150(s, p, o, m) BOOST_PP_FOR_150_I(s, p, o, m) # define BOOST_PP_FOR_151(s, p, o, m) BOOST_PP_FOR_151_I(s, p, o, m) # define BOOST_PP_FOR_152(s, p, o, m) BOOST_PP_FOR_152_I(s, p, o, m) # define BOOST_PP_FOR_153(s, p, o, m) BOOST_PP_FOR_153_I(s, p, o, m) # define BOOST_PP_FOR_154(s, p, o, m) BOOST_PP_FOR_154_I(s, p, o, m) # define BOOST_PP_FOR_155(s, p, o, m) BOOST_PP_FOR_155_I(s, p, o, m) # define BOOST_PP_FOR_156(s, p, o, m) BOOST_PP_FOR_156_I(s, p, o, m) # define BOOST_PP_FOR_157(s, p, o, m) BOOST_PP_FOR_157_I(s, p, o, m) # define BOOST_PP_FOR_158(s, p, o, m) BOOST_PP_FOR_158_I(s, p, o, m) # define BOOST_PP_FOR_159(s, p, o, m) BOOST_PP_FOR_159_I(s, p, o, m) # define BOOST_PP_FOR_160(s, p, o, m) BOOST_PP_FOR_160_I(s, p, o, m) # define BOOST_PP_FOR_161(s, p, o, m) BOOST_PP_FOR_161_I(s, p, o, m) # define BOOST_PP_FOR_162(s, p, o, m) BOOST_PP_FOR_162_I(s, p, o, m) # define BOOST_PP_FOR_163(s, p, o, m) BOOST_PP_FOR_163_I(s, p, o, m) # define BOOST_PP_FOR_164(s, p, o, m) BOOST_PP_FOR_164_I(s, p, o, m) # define BOOST_PP_FOR_165(s, p, o, m) BOOST_PP_FOR_165_I(s, p, o, m) # define BOOST_PP_FOR_166(s, p, o, m) BOOST_PP_FOR_166_I(s, p, o, m) # define BOOST_PP_FOR_167(s, p, o, m) BOOST_PP_FOR_167_I(s, p, o, m) # define BOOST_PP_FOR_168(s, p, o, m) BOOST_PP_FOR_168_I(s, p, o, m) # define BOOST_PP_FOR_169(s, p, o, m) BOOST_PP_FOR_169_I(s, p, o, m) # define BOOST_PP_FOR_170(s, p, o, m) BOOST_PP_FOR_170_I(s, p, o, m) # define BOOST_PP_FOR_171(s, p, o, m) BOOST_PP_FOR_171_I(s, p, o, m) # define BOOST_PP_FOR_172(s, p, o, m) BOOST_PP_FOR_172_I(s, p, o, m) # define BOOST_PP_FOR_173(s, p, o, m) BOOST_PP_FOR_173_I(s, p, o, m) # define BOOST_PP_FOR_174(s, p, o, m) BOOST_PP_FOR_174_I(s, p, o, m) # define BOOST_PP_FOR_175(s, p, o, m) BOOST_PP_FOR_175_I(s, p, o, m) # define BOOST_PP_FOR_176(s, p, o, m) BOOST_PP_FOR_176_I(s, p, o, m) # define BOOST_PP_FOR_177(s, p, o, m) BOOST_PP_FOR_177_I(s, p, o, m) # define BOOST_PP_FOR_178(s, p, o, m) BOOST_PP_FOR_178_I(s, p, o, m) # define BOOST_PP_FOR_179(s, p, o, m) BOOST_PP_FOR_179_I(s, p, o, m) # define BOOST_PP_FOR_180(s, p, o, m) BOOST_PP_FOR_180_I(s, p, o, m) # define BOOST_PP_FOR_181(s, p, o, m) BOOST_PP_FOR_181_I(s, p, o, m) # define BOOST_PP_FOR_182(s, p, o, m) BOOST_PP_FOR_182_I(s, p, o, m) # define BOOST_PP_FOR_183(s, p, o, m) BOOST_PP_FOR_183_I(s, p, o, m) # define BOOST_PP_FOR_184(s, p, o, m) BOOST_PP_FOR_184_I(s, p, o, m) # define BOOST_PP_FOR_185(s, p, o, m) BOOST_PP_FOR_185_I(s, p, o, m) # define BOOST_PP_FOR_186(s, p, o, m) BOOST_PP_FOR_186_I(s, p, o, m) # define BOOST_PP_FOR_187(s, p, o, m) BOOST_PP_FOR_187_I(s, p, o, m) # define BOOST_PP_FOR_188(s, p, o, m) BOOST_PP_FOR_188_I(s, p, o, m) # define BOOST_PP_FOR_189(s, p, o, m) BOOST_PP_FOR_189_I(s, p, o, m) # define BOOST_PP_FOR_190(s, p, o, m) BOOST_PP_FOR_190_I(s, p, o, m) # define BOOST_PP_FOR_191(s, p, o, m) BOOST_PP_FOR_191_I(s, p, o, m) # define BOOST_PP_FOR_192(s, p, o, m) BOOST_PP_FOR_192_I(s, p, o, m) # define BOOST_PP_FOR_193(s, p, o, m) BOOST_PP_FOR_193_I(s, p, o, m) # define BOOST_PP_FOR_194(s, p, o, m) BOOST_PP_FOR_194_I(s, p, o, m) # define BOOST_PP_FOR_195(s, p, o, m) BOOST_PP_FOR_195_I(s, p, o, m) # define BOOST_PP_FOR_196(s, p, o, m) BOOST_PP_FOR_196_I(s, p, o, m) # define BOOST_PP_FOR_197(s, p, o, m) BOOST_PP_FOR_197_I(s, p, o, m) # define BOOST_PP_FOR_198(s, p, o, m) BOOST_PP_FOR_198_I(s, p, o, m) # define BOOST_PP_FOR_199(s, p, o, m) BOOST_PP_FOR_199_I(s, p, o, m) # define BOOST_PP_FOR_200(s, p, o, m) BOOST_PP_FOR_200_I(s, p, o, m) # define BOOST_PP_FOR_201(s, p, o, m) BOOST_PP_FOR_201_I(s, p, o, m) # define BOOST_PP_FOR_202(s, p, o, m) BOOST_PP_FOR_202_I(s, p, o, m) # define BOOST_PP_FOR_203(s, p, o, m) BOOST_PP_FOR_203_I(s, p, o, m) # define BOOST_PP_FOR_204(s, p, o, m) BOOST_PP_FOR_204_I(s, p, o, m) # define BOOST_PP_FOR_205(s, p, o, m) BOOST_PP_FOR_205_I(s, p, o, m) # define BOOST_PP_FOR_206(s, p, o, m) BOOST_PP_FOR_206_I(s, p, o, m) # define BOOST_PP_FOR_207(s, p, o, m) BOOST_PP_FOR_207_I(s, p, o, m) # define BOOST_PP_FOR_208(s, p, o, m) BOOST_PP_FOR_208_I(s, p, o, m) # define BOOST_PP_FOR_209(s, p, o, m) BOOST_PP_FOR_209_I(s, p, o, m) # define BOOST_PP_FOR_210(s, p, o, m) BOOST_PP_FOR_210_I(s, p, o, m) # define BOOST_PP_FOR_211(s, p, o, m) BOOST_PP_FOR_211_I(s, p, o, m) # define BOOST_PP_FOR_212(s, p, o, m) BOOST_PP_FOR_212_I(s, p, o, m) # define BOOST_PP_FOR_213(s, p, o, m) BOOST_PP_FOR_213_I(s, p, o, m) # define BOOST_PP_FOR_214(s, p, o, m) BOOST_PP_FOR_214_I(s, p, o, m) # define BOOST_PP_FOR_215(s, p, o, m) BOOST_PP_FOR_215_I(s, p, o, m) # define BOOST_PP_FOR_216(s, p, o, m) BOOST_PP_FOR_216_I(s, p, o, m) # define BOOST_PP_FOR_217(s, p, o, m) BOOST_PP_FOR_217_I(s, p, o, m) # define BOOST_PP_FOR_218(s, p, o, m) BOOST_PP_FOR_218_I(s, p, o, m) # define BOOST_PP_FOR_219(s, p, o, m) BOOST_PP_FOR_219_I(s, p, o, m) # define BOOST_PP_FOR_220(s, p, o, m) BOOST_PP_FOR_220_I(s, p, o, m) # define BOOST_PP_FOR_221(s, p, o, m) BOOST_PP_FOR_221_I(s, p, o, m) # define BOOST_PP_FOR_222(s, p, o, m) BOOST_PP_FOR_222_I(s, p, o, m) # define BOOST_PP_FOR_223(s, p, o, m) BOOST_PP_FOR_223_I(s, p, o, m) # define BOOST_PP_FOR_224(s, p, o, m) BOOST_PP_FOR_224_I(s, p, o, m) # define BOOST_PP_FOR_225(s, p, o, m) BOOST_PP_FOR_225_I(s, p, o, m) # define BOOST_PP_FOR_226(s, p, o, m) BOOST_PP_FOR_226_I(s, p, o, m) # define BOOST_PP_FOR_227(s, p, o, m) BOOST_PP_FOR_227_I(s, p, o, m) # define BOOST_PP_FOR_228(s, p, o, m) BOOST_PP_FOR_228_I(s, p, o, m) # define BOOST_PP_FOR_229(s, p, o, m) BOOST_PP_FOR_229_I(s, p, o, m) # define BOOST_PP_FOR_230(s, p, o, m) BOOST_PP_FOR_230_I(s, p, o, m) # define BOOST_PP_FOR_231(s, p, o, m) BOOST_PP_FOR_231_I(s, p, o, m) # define BOOST_PP_FOR_232(s, p, o, m) BOOST_PP_FOR_232_I(s, p, o, m) # define BOOST_PP_FOR_233(s, p, o, m) BOOST_PP_FOR_233_I(s, p, o, m) # define BOOST_PP_FOR_234(s, p, o, m) BOOST_PP_FOR_234_I(s, p, o, m) # define BOOST_PP_FOR_235(s, p, o, m) BOOST_PP_FOR_235_I(s, p, o, m) # define BOOST_PP_FOR_236(s, p, o, m) BOOST_PP_FOR_236_I(s, p, o, m) # define BOOST_PP_FOR_237(s, p, o, m) BOOST_PP_FOR_237_I(s, p, o, m) # define BOOST_PP_FOR_238(s, p, o, m) BOOST_PP_FOR_238_I(s, p, o, m) # define BOOST_PP_FOR_239(s, p, o, m) BOOST_PP_FOR_239_I(s, p, o, m) # define BOOST_PP_FOR_240(s, p, o, m) BOOST_PP_FOR_240_I(s, p, o, m) # define BOOST_PP_FOR_241(s, p, o, m) BOOST_PP_FOR_241_I(s, p, o, m) # define BOOST_PP_FOR_242(s, p, o, m) BOOST_PP_FOR_242_I(s, p, o, m) # define BOOST_PP_FOR_243(s, p, o, m) BOOST_PP_FOR_243_I(s, p, o, m) # define BOOST_PP_FOR_244(s, p, o, m) BOOST_PP_FOR_244_I(s, p, o, m) # define BOOST_PP_FOR_245(s, p, o, m) BOOST_PP_FOR_245_I(s, p, o, m) # define BOOST_PP_FOR_246(s, p, o, m) BOOST_PP_FOR_246_I(s, p, o, m) # define BOOST_PP_FOR_247(s, p, o, m) BOOST_PP_FOR_247_I(s, p, o, m) # define BOOST_PP_FOR_248(s, p, o, m) BOOST_PP_FOR_248_I(s, p, o, m) # define BOOST_PP_FOR_249(s, p, o, m) BOOST_PP_FOR_249_I(s, p, o, m) # define BOOST_PP_FOR_250(s, p, o, m) BOOST_PP_FOR_250_I(s, p, o, m) # define BOOST_PP_FOR_251(s, p, o, m) BOOST_PP_FOR_251_I(s, p, o, m) # define BOOST_PP_FOR_252(s, p, o, m) BOOST_PP_FOR_252_I(s, p, o, m) # define BOOST_PP_FOR_253(s, p, o, m) BOOST_PP_FOR_253_I(s, p, o, m) # define BOOST_PP_FOR_254(s, p, o, m) BOOST_PP_FOR_254_I(s, p, o, m) # define BOOST_PP_FOR_255(s, p, o, m) BOOST_PP_FOR_255_I(s, p, o, m) # define BOOST_PP_FOR_256(s, p, o, m) BOOST_PP_FOR_256_I(s, p, o, m) # # define BOOST_PP_FOR_1_I(s, p, o, m) BOOST_PP_IF(p(2, s), m, BOOST_PP_TUPLE_EAT_2)(2, s) BOOST_PP_IF(p(2, s), BOOST_PP_FOR_2, BOOST_PP_TUPLE_EAT_4)(o(2, s), p, o, m) # define BOOST_PP_FOR_2_I(s, p, o, m) BOOST_PP_IF(p(3, s), m, BOOST_PP_TUPLE_EAT_2)(3, s) BOOST_PP_IF(p(3, s), BOOST_PP_FOR_3, BOOST_PP_TUPLE_EAT_4)(o(3, s), p, o, m) # define BOOST_PP_FOR_3_I(s, p, o, m) BOOST_PP_IF(p(4, s), m, BOOST_PP_TUPLE_EAT_2)(4, s) BOOST_PP_IF(p(4, s), BOOST_PP_FOR_4, BOOST_PP_TUPLE_EAT_4)(o(4, s), p, o, m) # define BOOST_PP_FOR_4_I(s, p, o, m) BOOST_PP_IF(p(5, s), m, BOOST_PP_TUPLE_EAT_2)(5, s) BOOST_PP_IF(p(5, s), BOOST_PP_FOR_5, BOOST_PP_TUPLE_EAT_4)(o(5, s), p, o, m) # define BOOST_PP_FOR_5_I(s, p, o, m) BOOST_PP_IF(p(6, s), m, BOOST_PP_TUPLE_EAT_2)(6, s) BOOST_PP_IF(p(6, s), BOOST_PP_FOR_6, BOOST_PP_TUPLE_EAT_4)(o(6, s), p, o, m) # define BOOST_PP_FOR_6_I(s, p, o, m) BOOST_PP_IF(p(7, s), m, BOOST_PP_TUPLE_EAT_2)(7, s) BOOST_PP_IF(p(7, s), BOOST_PP_FOR_7, BOOST_PP_TUPLE_EAT_4)(o(7, s), p, o, m) # define BOOST_PP_FOR_7_I(s, p, o, m) BOOST_PP_IF(p(8, s), m, BOOST_PP_TUPLE_EAT_2)(8, s) BOOST_PP_IF(p(8, s), BOOST_PP_FOR_8, BOOST_PP_TUPLE_EAT_4)(o(8, s), p, o, m) # define BOOST_PP_FOR_8_I(s, p, o, m) BOOST_PP_IF(p(9, s), m, BOOST_PP_TUPLE_EAT_2)(9, s) BOOST_PP_IF(p(9, s), BOOST_PP_FOR_9, BOOST_PP_TUPLE_EAT_4)(o(9, s), p, o, m) # define BOOST_PP_FOR_9_I(s, p, o, m) BOOST_PP_IF(p(10, s), m, BOOST_PP_TUPLE_EAT_2)(10, s) BOOST_PP_IF(p(10, s), BOOST_PP_FOR_10, BOOST_PP_TUPLE_EAT_4)(o(10, s), p, o, m) # define BOOST_PP_FOR_10_I(s, p, o, m) BOOST_PP_IF(p(11, s), m, BOOST_PP_TUPLE_EAT_2)(11, s) BOOST_PP_IF(p(11, s), BOOST_PP_FOR_11, BOOST_PP_TUPLE_EAT_4)(o(11, s), p, o, m) # define BOOST_PP_FOR_11_I(s, p, o, m) BOOST_PP_IF(p(12, s), m, BOOST_PP_TUPLE_EAT_2)(12, s) BOOST_PP_IF(p(12, s), BOOST_PP_FOR_12, BOOST_PP_TUPLE_EAT_4)(o(12, s), p, o, m) # define BOOST_PP_FOR_12_I(s, p, o, m) BOOST_PP_IF(p(13, s), m, BOOST_PP_TUPLE_EAT_2)(13, s) BOOST_PP_IF(p(13, s), BOOST_PP_FOR_13, BOOST_PP_TUPLE_EAT_4)(o(13, s), p, o, m) # define BOOST_PP_FOR_13_I(s, p, o, m) BOOST_PP_IF(p(14, s), m, BOOST_PP_TUPLE_EAT_2)(14, s) BOOST_PP_IF(p(14, s), BOOST_PP_FOR_14, BOOST_PP_TUPLE_EAT_4)(o(14, s), p, o, m) # define BOOST_PP_FOR_14_I(s, p, o, m) BOOST_PP_IF(p(15, s), m, BOOST_PP_TUPLE_EAT_2)(15, s) BOOST_PP_IF(p(15, s), BOOST_PP_FOR_15, BOOST_PP_TUPLE_EAT_4)(o(15, s), p, o, m) # define BOOST_PP_FOR_15_I(s, p, o, m) BOOST_PP_IF(p(16, s), m, BOOST_PP_TUPLE_EAT_2)(16, s) BOOST_PP_IF(p(16, s), BOOST_PP_FOR_16, BOOST_PP_TUPLE_EAT_4)(o(16, s), p, o, m) # define BOOST_PP_FOR_16_I(s, p, o, m) BOOST_PP_IF(p(17, s), m, BOOST_PP_TUPLE_EAT_2)(17, s) BOOST_PP_IF(p(17, s), BOOST_PP_FOR_17, BOOST_PP_TUPLE_EAT_4)(o(17, s), p, o, m) # define BOOST_PP_FOR_17_I(s, p, o, m) BOOST_PP_IF(p(18, s), m, BOOST_PP_TUPLE_EAT_2)(18, s) BOOST_PP_IF(p(18, s), BOOST_PP_FOR_18, BOOST_PP_TUPLE_EAT_4)(o(18, s), p, o, m) # define BOOST_PP_FOR_18_I(s, p, o, m) BOOST_PP_IF(p(19, s), m, BOOST_PP_TUPLE_EAT_2)(19, s) BOOST_PP_IF(p(19, s), BOOST_PP_FOR_19, BOOST_PP_TUPLE_EAT_4)(o(19, s), p, o, m) # define BOOST_PP_FOR_19_I(s, p, o, m) BOOST_PP_IF(p(20, s), m, BOOST_PP_TUPLE_EAT_2)(20, s) BOOST_PP_IF(p(20, s), BOOST_PP_FOR_20, BOOST_PP_TUPLE_EAT_4)(o(20, s), p, o, m) # define BOOST_PP_FOR_20_I(s, p, o, m) BOOST_PP_IF(p(21, s), m, BOOST_PP_TUPLE_EAT_2)(21, s) BOOST_PP_IF(p(21, s), BOOST_PP_FOR_21, BOOST_PP_TUPLE_EAT_4)(o(21, s), p, o, m) # define BOOST_PP_FOR_21_I(s, p, o, m) BOOST_PP_IF(p(22, s), m, BOOST_PP_TUPLE_EAT_2)(22, s) BOOST_PP_IF(p(22, s), BOOST_PP_FOR_22, BOOST_PP_TUPLE_EAT_4)(o(22, s), p, o, m) # define BOOST_PP_FOR_22_I(s, p, o, m) BOOST_PP_IF(p(23, s), m, BOOST_PP_TUPLE_EAT_2)(23, s) BOOST_PP_IF(p(23, s), BOOST_PP_FOR_23, BOOST_PP_TUPLE_EAT_4)(o(23, s), p, o, m) # define BOOST_PP_FOR_23_I(s, p, o, m) BOOST_PP_IF(p(24, s), m, BOOST_PP_TUPLE_EAT_2)(24, s) BOOST_PP_IF(p(24, s), BOOST_PP_FOR_24, BOOST_PP_TUPLE_EAT_4)(o(24, s), p, o, m) # define BOOST_PP_FOR_24_I(s, p, o, m) BOOST_PP_IF(p(25, s), m, BOOST_PP_TUPLE_EAT_2)(25, s) BOOST_PP_IF(p(25, s), BOOST_PP_FOR_25, BOOST_PP_TUPLE_EAT_4)(o(25, s), p, o, m) # define BOOST_PP_FOR_25_I(s, p, o, m) BOOST_PP_IF(p(26, s), m, BOOST_PP_TUPLE_EAT_2)(26, s) BOOST_PP_IF(p(26, s), BOOST_PP_FOR_26, BOOST_PP_TUPLE_EAT_4)(o(26, s), p, o, m) # define BOOST_PP_FOR_26_I(s, p, o, m) BOOST_PP_IF(p(27, s), m, BOOST_PP_TUPLE_EAT_2)(27, s) BOOST_PP_IF(p(27, s), BOOST_PP_FOR_27, BOOST_PP_TUPLE_EAT_4)(o(27, s), p, o, m) # define BOOST_PP_FOR_27_I(s, p, o, m) BOOST_PP_IF(p(28, s), m, BOOST_PP_TUPLE_EAT_2)(28, s) BOOST_PP_IF(p(28, s), BOOST_PP_FOR_28, BOOST_PP_TUPLE_EAT_4)(o(28, s), p, o, m) # define BOOST_PP_FOR_28_I(s, p, o, m) BOOST_PP_IF(p(29, s), m, BOOST_PP_TUPLE_EAT_2)(29, s) BOOST_PP_IF(p(29, s), BOOST_PP_FOR_29, BOOST_PP_TUPLE_EAT_4)(o(29, s), p, o, m) # define BOOST_PP_FOR_29_I(s, p, o, m) BOOST_PP_IF(p(30, s), m, BOOST_PP_TUPLE_EAT_2)(30, s) BOOST_PP_IF(p(30, s), BOOST_PP_FOR_30, BOOST_PP_TUPLE_EAT_4)(o(30, s), p, o, m) # define BOOST_PP_FOR_30_I(s, p, o, m) BOOST_PP_IF(p(31, s), m, BOOST_PP_TUPLE_EAT_2)(31, s) BOOST_PP_IF(p(31, s), BOOST_PP_FOR_31, BOOST_PP_TUPLE_EAT_4)(o(31, s), p, o, m) # define BOOST_PP_FOR_31_I(s, p, o, m) BOOST_PP_IF(p(32, s), m, BOOST_PP_TUPLE_EAT_2)(32, s) BOOST_PP_IF(p(32, s), BOOST_PP_FOR_32, BOOST_PP_TUPLE_EAT_4)(o(32, s), p, o, m) # define BOOST_PP_FOR_32_I(s, p, o, m) BOOST_PP_IF(p(33, s), m, BOOST_PP_TUPLE_EAT_2)(33, s) BOOST_PP_IF(p(33, s), BOOST_PP_FOR_33, BOOST_PP_TUPLE_EAT_4)(o(33, s), p, o, m) # define BOOST_PP_FOR_33_I(s, p, o, m) BOOST_PP_IF(p(34, s), m, BOOST_PP_TUPLE_EAT_2)(34, s) BOOST_PP_IF(p(34, s), BOOST_PP_FOR_34, BOOST_PP_TUPLE_EAT_4)(o(34, s), p, o, m) # define BOOST_PP_FOR_34_I(s, p, o, m) BOOST_PP_IF(p(35, s), m, BOOST_PP_TUPLE_EAT_2)(35, s) BOOST_PP_IF(p(35, s), BOOST_PP_FOR_35, BOOST_PP_TUPLE_EAT_4)(o(35, s), p, o, m) # define BOOST_PP_FOR_35_I(s, p, o, m) BOOST_PP_IF(p(36, s), m, BOOST_PP_TUPLE_EAT_2)(36, s) BOOST_PP_IF(p(36, s), BOOST_PP_FOR_36, BOOST_PP_TUPLE_EAT_4)(o(36, s), p, o, m) # define BOOST_PP_FOR_36_I(s, p, o, m) BOOST_PP_IF(p(37, s), m, BOOST_PP_TUPLE_EAT_2)(37, s) BOOST_PP_IF(p(37, s), BOOST_PP_FOR_37, BOOST_PP_TUPLE_EAT_4)(o(37, s), p, o, m) # define BOOST_PP_FOR_37_I(s, p, o, m) BOOST_PP_IF(p(38, s), m, BOOST_PP_TUPLE_EAT_2)(38, s) BOOST_PP_IF(p(38, s), BOOST_PP_FOR_38, BOOST_PP_TUPLE_EAT_4)(o(38, s), p, o, m) # define BOOST_PP_FOR_38_I(s, p, o, m) BOOST_PP_IF(p(39, s), m, BOOST_PP_TUPLE_EAT_2)(39, s) BOOST_PP_IF(p(39, s), BOOST_PP_FOR_39, BOOST_PP_TUPLE_EAT_4)(o(39, s), p, o, m) # define BOOST_PP_FOR_39_I(s, p, o, m) BOOST_PP_IF(p(40, s), m, BOOST_PP_TUPLE_EAT_2)(40, s) BOOST_PP_IF(p(40, s), BOOST_PP_FOR_40, BOOST_PP_TUPLE_EAT_4)(o(40, s), p, o, m) # define BOOST_PP_FOR_40_I(s, p, o, m) BOOST_PP_IF(p(41, s), m, BOOST_PP_TUPLE_EAT_2)(41, s) BOOST_PP_IF(p(41, s), BOOST_PP_FOR_41, BOOST_PP_TUPLE_EAT_4)(o(41, s), p, o, m) # define BOOST_PP_FOR_41_I(s, p, o, m) BOOST_PP_IF(p(42, s), m, BOOST_PP_TUPLE_EAT_2)(42, s) BOOST_PP_IF(p(42, s), BOOST_PP_FOR_42, BOOST_PP_TUPLE_EAT_4)(o(42, s), p, o, m) # define BOOST_PP_FOR_42_I(s, p, o, m) BOOST_PP_IF(p(43, s), m, BOOST_PP_TUPLE_EAT_2)(43, s) BOOST_PP_IF(p(43, s), BOOST_PP_FOR_43, BOOST_PP_TUPLE_EAT_4)(o(43, s), p, o, m) # define BOOST_PP_FOR_43_I(s, p, o, m) BOOST_PP_IF(p(44, s), m, BOOST_PP_TUPLE_EAT_2)(44, s) BOOST_PP_IF(p(44, s), BOOST_PP_FOR_44, BOOST_PP_TUPLE_EAT_4)(o(44, s), p, o, m) # define BOOST_PP_FOR_44_I(s, p, o, m) BOOST_PP_IF(p(45, s), m, BOOST_PP_TUPLE_EAT_2)(45, s) BOOST_PP_IF(p(45, s), BOOST_PP_FOR_45, BOOST_PP_TUPLE_EAT_4)(o(45, s), p, o, m) # define BOOST_PP_FOR_45_I(s, p, o, m) BOOST_PP_IF(p(46, s), m, BOOST_PP_TUPLE_EAT_2)(46, s) BOOST_PP_IF(p(46, s), BOOST_PP_FOR_46, BOOST_PP_TUPLE_EAT_4)(o(46, s), p, o, m) # define BOOST_PP_FOR_46_I(s, p, o, m) BOOST_PP_IF(p(47, s), m, BOOST_PP_TUPLE_EAT_2)(47, s) BOOST_PP_IF(p(47, s), BOOST_PP_FOR_47, BOOST_PP_TUPLE_EAT_4)(o(47, s), p, o, m) # define BOOST_PP_FOR_47_I(s, p, o, m) BOOST_PP_IF(p(48, s), m, BOOST_PP_TUPLE_EAT_2)(48, s) BOOST_PP_IF(p(48, s), BOOST_PP_FOR_48, BOOST_PP_TUPLE_EAT_4)(o(48, s), p, o, m) # define BOOST_PP_FOR_48_I(s, p, o, m) BOOST_PP_IF(p(49, s), m, BOOST_PP_TUPLE_EAT_2)(49, s) BOOST_PP_IF(p(49, s), BOOST_PP_FOR_49, BOOST_PP_TUPLE_EAT_4)(o(49, s), p, o, m) # define BOOST_PP_FOR_49_I(s, p, o, m) BOOST_PP_IF(p(50, s), m, BOOST_PP_TUPLE_EAT_2)(50, s) BOOST_PP_IF(p(50, s), BOOST_PP_FOR_50, BOOST_PP_TUPLE_EAT_4)(o(50, s), p, o, m) # define BOOST_PP_FOR_50_I(s, p, o, m) BOOST_PP_IF(p(51, s), m, BOOST_PP_TUPLE_EAT_2)(51, s) BOOST_PP_IF(p(51, s), BOOST_PP_FOR_51, BOOST_PP_TUPLE_EAT_4)(o(51, s), p, o, m) # define BOOST_PP_FOR_51_I(s, p, o, m) BOOST_PP_IF(p(52, s), m, BOOST_PP_TUPLE_EAT_2)(52, s) BOOST_PP_IF(p(52, s), BOOST_PP_FOR_52, BOOST_PP_TUPLE_EAT_4)(o(52, s), p, o, m) # define BOOST_PP_FOR_52_I(s, p, o, m) BOOST_PP_IF(p(53, s), m, BOOST_PP_TUPLE_EAT_2)(53, s) BOOST_PP_IF(p(53, s), BOOST_PP_FOR_53, BOOST_PP_TUPLE_EAT_4)(o(53, s), p, o, m) # define BOOST_PP_FOR_53_I(s, p, o, m) BOOST_PP_IF(p(54, s), m, BOOST_PP_TUPLE_EAT_2)(54, s) BOOST_PP_IF(p(54, s), BOOST_PP_FOR_54, BOOST_PP_TUPLE_EAT_4)(o(54, s), p, o, m) # define BOOST_PP_FOR_54_I(s, p, o, m) BOOST_PP_IF(p(55, s), m, BOOST_PP_TUPLE_EAT_2)(55, s) BOOST_PP_IF(p(55, s), BOOST_PP_FOR_55, BOOST_PP_TUPLE_EAT_4)(o(55, s), p, o, m) # define BOOST_PP_FOR_55_I(s, p, o, m) BOOST_PP_IF(p(56, s), m, BOOST_PP_TUPLE_EAT_2)(56, s) BOOST_PP_IF(p(56, s), BOOST_PP_FOR_56, BOOST_PP_TUPLE_EAT_4)(o(56, s), p, o, m) # define BOOST_PP_FOR_56_I(s, p, o, m) BOOST_PP_IF(p(57, s), m, BOOST_PP_TUPLE_EAT_2)(57, s) BOOST_PP_IF(p(57, s), BOOST_PP_FOR_57, BOOST_PP_TUPLE_EAT_4)(o(57, s), p, o, m) # define BOOST_PP_FOR_57_I(s, p, o, m) BOOST_PP_IF(p(58, s), m, BOOST_PP_TUPLE_EAT_2)(58, s) BOOST_PP_IF(p(58, s), BOOST_PP_FOR_58, BOOST_PP_TUPLE_EAT_4)(o(58, s), p, o, m) # define BOOST_PP_FOR_58_I(s, p, o, m) BOOST_PP_IF(p(59, s), m, BOOST_PP_TUPLE_EAT_2)(59, s) BOOST_PP_IF(p(59, s), BOOST_PP_FOR_59, BOOST_PP_TUPLE_EAT_4)(o(59, s), p, o, m) # define BOOST_PP_FOR_59_I(s, p, o, m) BOOST_PP_IF(p(60, s), m, BOOST_PP_TUPLE_EAT_2)(60, s) BOOST_PP_IF(p(60, s), BOOST_PP_FOR_60, BOOST_PP_TUPLE_EAT_4)(o(60, s), p, o, m) # define BOOST_PP_FOR_60_I(s, p, o, m) BOOST_PP_IF(p(61, s), m, BOOST_PP_TUPLE_EAT_2)(61, s) BOOST_PP_IF(p(61, s), BOOST_PP_FOR_61, BOOST_PP_TUPLE_EAT_4)(o(61, s), p, o, m) # define BOOST_PP_FOR_61_I(s, p, o, m) BOOST_PP_IF(p(62, s), m, BOOST_PP_TUPLE_EAT_2)(62, s) BOOST_PP_IF(p(62, s), BOOST_PP_FOR_62, BOOST_PP_TUPLE_EAT_4)(o(62, s), p, o, m) # define BOOST_PP_FOR_62_I(s, p, o, m) BOOST_PP_IF(p(63, s), m, BOOST_PP_TUPLE_EAT_2)(63, s) BOOST_PP_IF(p(63, s), BOOST_PP_FOR_63, BOOST_PP_TUPLE_EAT_4)(o(63, s), p, o, m) # define BOOST_PP_FOR_63_I(s, p, o, m) BOOST_PP_IF(p(64, s), m, BOOST_PP_TUPLE_EAT_2)(64, s) BOOST_PP_IF(p(64, s), BOOST_PP_FOR_64, BOOST_PP_TUPLE_EAT_4)(o(64, s), p, o, m) # define BOOST_PP_FOR_64_I(s, p, o, m) BOOST_PP_IF(p(65, s), m, BOOST_PP_TUPLE_EAT_2)(65, s) BOOST_PP_IF(p(65, s), BOOST_PP_FOR_65, BOOST_PP_TUPLE_EAT_4)(o(65, s), p, o, m) # define BOOST_PP_FOR_65_I(s, p, o, m) BOOST_PP_IF(p(66, s), m, BOOST_PP_TUPLE_EAT_2)(66, s) BOOST_PP_IF(p(66, s), BOOST_PP_FOR_66, BOOST_PP_TUPLE_EAT_4)(o(66, s), p, o, m) # define BOOST_PP_FOR_66_I(s, p, o, m) BOOST_PP_IF(p(67, s), m, BOOST_PP_TUPLE_EAT_2)(67, s) BOOST_PP_IF(p(67, s), BOOST_PP_FOR_67, BOOST_PP_TUPLE_EAT_4)(o(67, s), p, o, m) # define BOOST_PP_FOR_67_I(s, p, o, m) BOOST_PP_IF(p(68, s), m, BOOST_PP_TUPLE_EAT_2)(68, s) BOOST_PP_IF(p(68, s), BOOST_PP_FOR_68, BOOST_PP_TUPLE_EAT_4)(o(68, s), p, o, m) # define BOOST_PP_FOR_68_I(s, p, o, m) BOOST_PP_IF(p(69, s), m, BOOST_PP_TUPLE_EAT_2)(69, s) BOOST_PP_IF(p(69, s), BOOST_PP_FOR_69, BOOST_PP_TUPLE_EAT_4)(o(69, s), p, o, m) # define BOOST_PP_FOR_69_I(s, p, o, m) BOOST_PP_IF(p(70, s), m, BOOST_PP_TUPLE_EAT_2)(70, s) BOOST_PP_IF(p(70, s), BOOST_PP_FOR_70, BOOST_PP_TUPLE_EAT_4)(o(70, s), p, o, m) # define BOOST_PP_FOR_70_I(s, p, o, m) BOOST_PP_IF(p(71, s), m, BOOST_PP_TUPLE_EAT_2)(71, s) BOOST_PP_IF(p(71, s), BOOST_PP_FOR_71, BOOST_PP_TUPLE_EAT_4)(o(71, s), p, o, m) # define BOOST_PP_FOR_71_I(s, p, o, m) BOOST_PP_IF(p(72, s), m, BOOST_PP_TUPLE_EAT_2)(72, s) BOOST_PP_IF(p(72, s), BOOST_PP_FOR_72, BOOST_PP_TUPLE_EAT_4)(o(72, s), p, o, m) # define BOOST_PP_FOR_72_I(s, p, o, m) BOOST_PP_IF(p(73, s), m, BOOST_PP_TUPLE_EAT_2)(73, s) BOOST_PP_IF(p(73, s), BOOST_PP_FOR_73, BOOST_PP_TUPLE_EAT_4)(o(73, s), p, o, m) # define BOOST_PP_FOR_73_I(s, p, o, m) BOOST_PP_IF(p(74, s), m, BOOST_PP_TUPLE_EAT_2)(74, s) BOOST_PP_IF(p(74, s), BOOST_PP_FOR_74, BOOST_PP_TUPLE_EAT_4)(o(74, s), p, o, m) # define BOOST_PP_FOR_74_I(s, p, o, m) BOOST_PP_IF(p(75, s), m, BOOST_PP_TUPLE_EAT_2)(75, s) BOOST_PP_IF(p(75, s), BOOST_PP_FOR_75, BOOST_PP_TUPLE_EAT_4)(o(75, s), p, o, m) # define BOOST_PP_FOR_75_I(s, p, o, m) BOOST_PP_IF(p(76, s), m, BOOST_PP_TUPLE_EAT_2)(76, s) BOOST_PP_IF(p(76, s), BOOST_PP_FOR_76, BOOST_PP_TUPLE_EAT_4)(o(76, s), p, o, m) # define BOOST_PP_FOR_76_I(s, p, o, m) BOOST_PP_IF(p(77, s), m, BOOST_PP_TUPLE_EAT_2)(77, s) BOOST_PP_IF(p(77, s), BOOST_PP_FOR_77, BOOST_PP_TUPLE_EAT_4)(o(77, s), p, o, m) # define BOOST_PP_FOR_77_I(s, p, o, m) BOOST_PP_IF(p(78, s), m, BOOST_PP_TUPLE_EAT_2)(78, s) BOOST_PP_IF(p(78, s), BOOST_PP_FOR_78, BOOST_PP_TUPLE_EAT_4)(o(78, s), p, o, m) # define BOOST_PP_FOR_78_I(s, p, o, m) BOOST_PP_IF(p(79, s), m, BOOST_PP_TUPLE_EAT_2)(79, s) BOOST_PP_IF(p(79, s), BOOST_PP_FOR_79, BOOST_PP_TUPLE_EAT_4)(o(79, s), p, o, m) # define BOOST_PP_FOR_79_I(s, p, o, m) BOOST_PP_IF(p(80, s), m, BOOST_PP_TUPLE_EAT_2)(80, s) BOOST_PP_IF(p(80, s), BOOST_PP_FOR_80, BOOST_PP_TUPLE_EAT_4)(o(80, s), p, o, m) # define BOOST_PP_FOR_80_I(s, p, o, m) BOOST_PP_IF(p(81, s), m, BOOST_PP_TUPLE_EAT_2)(81, s) BOOST_PP_IF(p(81, s), BOOST_PP_FOR_81, BOOST_PP_TUPLE_EAT_4)(o(81, s), p, o, m) # define BOOST_PP_FOR_81_I(s, p, o, m) BOOST_PP_IF(p(82, s), m, BOOST_PP_TUPLE_EAT_2)(82, s) BOOST_PP_IF(p(82, s), BOOST_PP_FOR_82, BOOST_PP_TUPLE_EAT_4)(o(82, s), p, o, m) # define BOOST_PP_FOR_82_I(s, p, o, m) BOOST_PP_IF(p(83, s), m, BOOST_PP_TUPLE_EAT_2)(83, s) BOOST_PP_IF(p(83, s), BOOST_PP_FOR_83, BOOST_PP_TUPLE_EAT_4)(o(83, s), p, o, m) # define BOOST_PP_FOR_83_I(s, p, o, m) BOOST_PP_IF(p(84, s), m, BOOST_PP_TUPLE_EAT_2)(84, s) BOOST_PP_IF(p(84, s), BOOST_PP_FOR_84, BOOST_PP_TUPLE_EAT_4)(o(84, s), p, o, m) # define BOOST_PP_FOR_84_I(s, p, o, m) BOOST_PP_IF(p(85, s), m, BOOST_PP_TUPLE_EAT_2)(85, s) BOOST_PP_IF(p(85, s), BOOST_PP_FOR_85, BOOST_PP_TUPLE_EAT_4)(o(85, s), p, o, m) # define BOOST_PP_FOR_85_I(s, p, o, m) BOOST_PP_IF(p(86, s), m, BOOST_PP_TUPLE_EAT_2)(86, s) BOOST_PP_IF(p(86, s), BOOST_PP_FOR_86, BOOST_PP_TUPLE_EAT_4)(o(86, s), p, o, m) # define BOOST_PP_FOR_86_I(s, p, o, m) BOOST_PP_IF(p(87, s), m, BOOST_PP_TUPLE_EAT_2)(87, s) BOOST_PP_IF(p(87, s), BOOST_PP_FOR_87, BOOST_PP_TUPLE_EAT_4)(o(87, s), p, o, m) # define BOOST_PP_FOR_87_I(s, p, o, m) BOOST_PP_IF(p(88, s), m, BOOST_PP_TUPLE_EAT_2)(88, s) BOOST_PP_IF(p(88, s), BOOST_PP_FOR_88, BOOST_PP_TUPLE_EAT_4)(o(88, s), p, o, m) # define BOOST_PP_FOR_88_I(s, p, o, m) BOOST_PP_IF(p(89, s), m, BOOST_PP_TUPLE_EAT_2)(89, s) BOOST_PP_IF(p(89, s), BOOST_PP_FOR_89, BOOST_PP_TUPLE_EAT_4)(o(89, s), p, o, m) # define BOOST_PP_FOR_89_I(s, p, o, m) BOOST_PP_IF(p(90, s), m, BOOST_PP_TUPLE_EAT_2)(90, s) BOOST_PP_IF(p(90, s), BOOST_PP_FOR_90, BOOST_PP_TUPLE_EAT_4)(o(90, s), p, o, m) # define BOOST_PP_FOR_90_I(s, p, o, m) BOOST_PP_IF(p(91, s), m, BOOST_PP_TUPLE_EAT_2)(91, s) BOOST_PP_IF(p(91, s), BOOST_PP_FOR_91, BOOST_PP_TUPLE_EAT_4)(o(91, s), p, o, m) # define BOOST_PP_FOR_91_I(s, p, o, m) BOOST_PP_IF(p(92, s), m, BOOST_PP_TUPLE_EAT_2)(92, s) BOOST_PP_IF(p(92, s), BOOST_PP_FOR_92, BOOST_PP_TUPLE_EAT_4)(o(92, s), p, o, m) # define BOOST_PP_FOR_92_I(s, p, o, m) BOOST_PP_IF(p(93, s), m, BOOST_PP_TUPLE_EAT_2)(93, s) BOOST_PP_IF(p(93, s), BOOST_PP_FOR_93, BOOST_PP_TUPLE_EAT_4)(o(93, s), p, o, m) # define BOOST_PP_FOR_93_I(s, p, o, m) BOOST_PP_IF(p(94, s), m, BOOST_PP_TUPLE_EAT_2)(94, s) BOOST_PP_IF(p(94, s), BOOST_PP_FOR_94, BOOST_PP_TUPLE_EAT_4)(o(94, s), p, o, m) # define BOOST_PP_FOR_94_I(s, p, o, m) BOOST_PP_IF(p(95, s), m, BOOST_PP_TUPLE_EAT_2)(95, s) BOOST_PP_IF(p(95, s), BOOST_PP_FOR_95, BOOST_PP_TUPLE_EAT_4)(o(95, s), p, o, m) # define BOOST_PP_FOR_95_I(s, p, o, m) BOOST_PP_IF(p(96, s), m, BOOST_PP_TUPLE_EAT_2)(96, s) BOOST_PP_IF(p(96, s), BOOST_PP_FOR_96, BOOST_PP_TUPLE_EAT_4)(o(96, s), p, o, m) # define BOOST_PP_FOR_96_I(s, p, o, m) BOOST_PP_IF(p(97, s), m, BOOST_PP_TUPLE_EAT_2)(97, s) BOOST_PP_IF(p(97, s), BOOST_PP_FOR_97, BOOST_PP_TUPLE_EAT_4)(o(97, s), p, o, m) # define BOOST_PP_FOR_97_I(s, p, o, m) BOOST_PP_IF(p(98, s), m, BOOST_PP_TUPLE_EAT_2)(98, s) BOOST_PP_IF(p(98, s), BOOST_PP_FOR_98, BOOST_PP_TUPLE_EAT_4)(o(98, s), p, o, m) # define BOOST_PP_FOR_98_I(s, p, o, m) BOOST_PP_IF(p(99, s), m, BOOST_PP_TUPLE_EAT_2)(99, s) BOOST_PP_IF(p(99, s), BOOST_PP_FOR_99, BOOST_PP_TUPLE_EAT_4)(o(99, s), p, o, m) # define BOOST_PP_FOR_99_I(s, p, o, m) BOOST_PP_IF(p(100, s), m, BOOST_PP_TUPLE_EAT_2)(100, s) BOOST_PP_IF(p(100, s), BOOST_PP_FOR_100, BOOST_PP_TUPLE_EAT_4)(o(100, s), p, o, m) # define BOOST_PP_FOR_100_I(s, p, o, m) BOOST_PP_IF(p(101, s), m, BOOST_PP_TUPLE_EAT_2)(101, s) BOOST_PP_IF(p(101, s), BOOST_PP_FOR_101, BOOST_PP_TUPLE_EAT_4)(o(101, s), p, o, m) # define BOOST_PP_FOR_101_I(s, p, o, m) BOOST_PP_IF(p(102, s), m, BOOST_PP_TUPLE_EAT_2)(102, s) BOOST_PP_IF(p(102, s), BOOST_PP_FOR_102, BOOST_PP_TUPLE_EAT_4)(o(102, s), p, o, m) # define BOOST_PP_FOR_102_I(s, p, o, m) BOOST_PP_IF(p(103, s), m, BOOST_PP_TUPLE_EAT_2)(103, s) BOOST_PP_IF(p(103, s), BOOST_PP_FOR_103, BOOST_PP_TUPLE_EAT_4)(o(103, s), p, o, m) # define BOOST_PP_FOR_103_I(s, p, o, m) BOOST_PP_IF(p(104, s), m, BOOST_PP_TUPLE_EAT_2)(104, s) BOOST_PP_IF(p(104, s), BOOST_PP_FOR_104, BOOST_PP_TUPLE_EAT_4)(o(104, s), p, o, m) # define BOOST_PP_FOR_104_I(s, p, o, m) BOOST_PP_IF(p(105, s), m, BOOST_PP_TUPLE_EAT_2)(105, s) BOOST_PP_IF(p(105, s), BOOST_PP_FOR_105, BOOST_PP_TUPLE_EAT_4)(o(105, s), p, o, m) # define BOOST_PP_FOR_105_I(s, p, o, m) BOOST_PP_IF(p(106, s), m, BOOST_PP_TUPLE_EAT_2)(106, s) BOOST_PP_IF(p(106, s), BOOST_PP_FOR_106, BOOST_PP_TUPLE_EAT_4)(o(106, s), p, o, m) # define BOOST_PP_FOR_106_I(s, p, o, m) BOOST_PP_IF(p(107, s), m, BOOST_PP_TUPLE_EAT_2)(107, s) BOOST_PP_IF(p(107, s), BOOST_PP_FOR_107, BOOST_PP_TUPLE_EAT_4)(o(107, s), p, o, m) # define BOOST_PP_FOR_107_I(s, p, o, m) BOOST_PP_IF(p(108, s), m, BOOST_PP_TUPLE_EAT_2)(108, s) BOOST_PP_IF(p(108, s), BOOST_PP_FOR_108, BOOST_PP_TUPLE_EAT_4)(o(108, s), p, o, m) # define BOOST_PP_FOR_108_I(s, p, o, m) BOOST_PP_IF(p(109, s), m, BOOST_PP_TUPLE_EAT_2)(109, s) BOOST_PP_IF(p(109, s), BOOST_PP_FOR_109, BOOST_PP_TUPLE_EAT_4)(o(109, s), p, o, m) # define BOOST_PP_FOR_109_I(s, p, o, m) BOOST_PP_IF(p(110, s), m, BOOST_PP_TUPLE_EAT_2)(110, s) BOOST_PP_IF(p(110, s), BOOST_PP_FOR_110, BOOST_PP_TUPLE_EAT_4)(o(110, s), p, o, m) # define BOOST_PP_FOR_110_I(s, p, o, m) BOOST_PP_IF(p(111, s), m, BOOST_PP_TUPLE_EAT_2)(111, s) BOOST_PP_IF(p(111, s), BOOST_PP_FOR_111, BOOST_PP_TUPLE_EAT_4)(o(111, s), p, o, m) # define BOOST_PP_FOR_111_I(s, p, o, m) BOOST_PP_IF(p(112, s), m, BOOST_PP_TUPLE_EAT_2)(112, s) BOOST_PP_IF(p(112, s), BOOST_PP_FOR_112, BOOST_PP_TUPLE_EAT_4)(o(112, s), p, o, m) # define BOOST_PP_FOR_112_I(s, p, o, m) BOOST_PP_IF(p(113, s), m, BOOST_PP_TUPLE_EAT_2)(113, s) BOOST_PP_IF(p(113, s), BOOST_PP_FOR_113, BOOST_PP_TUPLE_EAT_4)(o(113, s), p, o, m) # define BOOST_PP_FOR_113_I(s, p, o, m) BOOST_PP_IF(p(114, s), m, BOOST_PP_TUPLE_EAT_2)(114, s) BOOST_PP_IF(p(114, s), BOOST_PP_FOR_114, BOOST_PP_TUPLE_EAT_4)(o(114, s), p, o, m) # define BOOST_PP_FOR_114_I(s, p, o, m) BOOST_PP_IF(p(115, s), m, BOOST_PP_TUPLE_EAT_2)(115, s) BOOST_PP_IF(p(115, s), BOOST_PP_FOR_115, BOOST_PP_TUPLE_EAT_4)(o(115, s), p, o, m) # define BOOST_PP_FOR_115_I(s, p, o, m) BOOST_PP_IF(p(116, s), m, BOOST_PP_TUPLE_EAT_2)(116, s) BOOST_PP_IF(p(116, s), BOOST_PP_FOR_116, BOOST_PP_TUPLE_EAT_4)(o(116, s), p, o, m) # define BOOST_PP_FOR_116_I(s, p, o, m) BOOST_PP_IF(p(117, s), m, BOOST_PP_TUPLE_EAT_2)(117, s) BOOST_PP_IF(p(117, s), BOOST_PP_FOR_117, BOOST_PP_TUPLE_EAT_4)(o(117, s), p, o, m) # define BOOST_PP_FOR_117_I(s, p, o, m) BOOST_PP_IF(p(118, s), m, BOOST_PP_TUPLE_EAT_2)(118, s) BOOST_PP_IF(p(118, s), BOOST_PP_FOR_118, BOOST_PP_TUPLE_EAT_4)(o(118, s), p, o, m) # define BOOST_PP_FOR_118_I(s, p, o, m) BOOST_PP_IF(p(119, s), m, BOOST_PP_TUPLE_EAT_2)(119, s) BOOST_PP_IF(p(119, s), BOOST_PP_FOR_119, BOOST_PP_TUPLE_EAT_4)(o(119, s), p, o, m) # define BOOST_PP_FOR_119_I(s, p, o, m) BOOST_PP_IF(p(120, s), m, BOOST_PP_TUPLE_EAT_2)(120, s) BOOST_PP_IF(p(120, s), BOOST_PP_FOR_120, BOOST_PP_TUPLE_EAT_4)(o(120, s), p, o, m) # define BOOST_PP_FOR_120_I(s, p, o, m) BOOST_PP_IF(p(121, s), m, BOOST_PP_TUPLE_EAT_2)(121, s) BOOST_PP_IF(p(121, s), BOOST_PP_FOR_121, BOOST_PP_TUPLE_EAT_4)(o(121, s), p, o, m) # define BOOST_PP_FOR_121_I(s, p, o, m) BOOST_PP_IF(p(122, s), m, BOOST_PP_TUPLE_EAT_2)(122, s) BOOST_PP_IF(p(122, s), BOOST_PP_FOR_122, BOOST_PP_TUPLE_EAT_4)(o(122, s), p, o, m) # define BOOST_PP_FOR_122_I(s, p, o, m) BOOST_PP_IF(p(123, s), m, BOOST_PP_TUPLE_EAT_2)(123, s) BOOST_PP_IF(p(123, s), BOOST_PP_FOR_123, BOOST_PP_TUPLE_EAT_4)(o(123, s), p, o, m) # define BOOST_PP_FOR_123_I(s, p, o, m) BOOST_PP_IF(p(124, s), m, BOOST_PP_TUPLE_EAT_2)(124, s) BOOST_PP_IF(p(124, s), BOOST_PP_FOR_124, BOOST_PP_TUPLE_EAT_4)(o(124, s), p, o, m) # define BOOST_PP_FOR_124_I(s, p, o, m) BOOST_PP_IF(p(125, s), m, BOOST_PP_TUPLE_EAT_2)(125, s) BOOST_PP_IF(p(125, s), BOOST_PP_FOR_125, BOOST_PP_TUPLE_EAT_4)(o(125, s), p, o, m) # define BOOST_PP_FOR_125_I(s, p, o, m) BOOST_PP_IF(p(126, s), m, BOOST_PP_TUPLE_EAT_2)(126, s) BOOST_PP_IF(p(126, s), BOOST_PP_FOR_126, BOOST_PP_TUPLE_EAT_4)(o(126, s), p, o, m) # define BOOST_PP_FOR_126_I(s, p, o, m) BOOST_PP_IF(p(127, s), m, BOOST_PP_TUPLE_EAT_2)(127, s) BOOST_PP_IF(p(127, s), BOOST_PP_FOR_127, BOOST_PP_TUPLE_EAT_4)(o(127, s), p, o, m) # define BOOST_PP_FOR_127_I(s, p, o, m) BOOST_PP_IF(p(128, s), m, BOOST_PP_TUPLE_EAT_2)(128, s) BOOST_PP_IF(p(128, s), BOOST_PP_FOR_128, BOOST_PP_TUPLE_EAT_4)(o(128, s), p, o, m) # define BOOST_PP_FOR_128_I(s, p, o, m) BOOST_PP_IF(p(129, s), m, BOOST_PP_TUPLE_EAT_2)(129, s) BOOST_PP_IF(p(129, s), BOOST_PP_FOR_129, BOOST_PP_TUPLE_EAT_4)(o(129, s), p, o, m) # define BOOST_PP_FOR_129_I(s, p, o, m) BOOST_PP_IF(p(130, s), m, BOOST_PP_TUPLE_EAT_2)(130, s) BOOST_PP_IF(p(130, s), BOOST_PP_FOR_130, BOOST_PP_TUPLE_EAT_4)(o(130, s), p, o, m) # define BOOST_PP_FOR_130_I(s, p, o, m) BOOST_PP_IF(p(131, s), m, BOOST_PP_TUPLE_EAT_2)(131, s) BOOST_PP_IF(p(131, s), BOOST_PP_FOR_131, BOOST_PP_TUPLE_EAT_4)(o(131, s), p, o, m) # define BOOST_PP_FOR_131_I(s, p, o, m) BOOST_PP_IF(p(132, s), m, BOOST_PP_TUPLE_EAT_2)(132, s) BOOST_PP_IF(p(132, s), BOOST_PP_FOR_132, BOOST_PP_TUPLE_EAT_4)(o(132, s), p, o, m) # define BOOST_PP_FOR_132_I(s, p, o, m) BOOST_PP_IF(p(133, s), m, BOOST_PP_TUPLE_EAT_2)(133, s) BOOST_PP_IF(p(133, s), BOOST_PP_FOR_133, BOOST_PP_TUPLE_EAT_4)(o(133, s), p, o, m) # define BOOST_PP_FOR_133_I(s, p, o, m) BOOST_PP_IF(p(134, s), m, BOOST_PP_TUPLE_EAT_2)(134, s) BOOST_PP_IF(p(134, s), BOOST_PP_FOR_134, BOOST_PP_TUPLE_EAT_4)(o(134, s), p, o, m) # define BOOST_PP_FOR_134_I(s, p, o, m) BOOST_PP_IF(p(135, s), m, BOOST_PP_TUPLE_EAT_2)(135, s) BOOST_PP_IF(p(135, s), BOOST_PP_FOR_135, BOOST_PP_TUPLE_EAT_4)(o(135, s), p, o, m) # define BOOST_PP_FOR_135_I(s, p, o, m) BOOST_PP_IF(p(136, s), m, BOOST_PP_TUPLE_EAT_2)(136, s) BOOST_PP_IF(p(136, s), BOOST_PP_FOR_136, BOOST_PP_TUPLE_EAT_4)(o(136, s), p, o, m) # define BOOST_PP_FOR_136_I(s, p, o, m) BOOST_PP_IF(p(137, s), m, BOOST_PP_TUPLE_EAT_2)(137, s) BOOST_PP_IF(p(137, s), BOOST_PP_FOR_137, BOOST_PP_TUPLE_EAT_4)(o(137, s), p, o, m) # define BOOST_PP_FOR_137_I(s, p, o, m) BOOST_PP_IF(p(138, s), m, BOOST_PP_TUPLE_EAT_2)(138, s) BOOST_PP_IF(p(138, s), BOOST_PP_FOR_138, BOOST_PP_TUPLE_EAT_4)(o(138, s), p, o, m) # define BOOST_PP_FOR_138_I(s, p, o, m) BOOST_PP_IF(p(139, s), m, BOOST_PP_TUPLE_EAT_2)(139, s) BOOST_PP_IF(p(139, s), BOOST_PP_FOR_139, BOOST_PP_TUPLE_EAT_4)(o(139, s), p, o, m) # define BOOST_PP_FOR_139_I(s, p, o, m) BOOST_PP_IF(p(140, s), m, BOOST_PP_TUPLE_EAT_2)(140, s) BOOST_PP_IF(p(140, s), BOOST_PP_FOR_140, BOOST_PP_TUPLE_EAT_4)(o(140, s), p, o, m) # define BOOST_PP_FOR_140_I(s, p, o, m) BOOST_PP_IF(p(141, s), m, BOOST_PP_TUPLE_EAT_2)(141, s) BOOST_PP_IF(p(141, s), BOOST_PP_FOR_141, BOOST_PP_TUPLE_EAT_4)(o(141, s), p, o, m) # define BOOST_PP_FOR_141_I(s, p, o, m) BOOST_PP_IF(p(142, s), m, BOOST_PP_TUPLE_EAT_2)(142, s) BOOST_PP_IF(p(142, s), BOOST_PP_FOR_142, BOOST_PP_TUPLE_EAT_4)(o(142, s), p, o, m) # define BOOST_PP_FOR_142_I(s, p, o, m) BOOST_PP_IF(p(143, s), m, BOOST_PP_TUPLE_EAT_2)(143, s) BOOST_PP_IF(p(143, s), BOOST_PP_FOR_143, BOOST_PP_TUPLE_EAT_4)(o(143, s), p, o, m) # define BOOST_PP_FOR_143_I(s, p, o, m) BOOST_PP_IF(p(144, s), m, BOOST_PP_TUPLE_EAT_2)(144, s) BOOST_PP_IF(p(144, s), BOOST_PP_FOR_144, BOOST_PP_TUPLE_EAT_4)(o(144, s), p, o, m) # define BOOST_PP_FOR_144_I(s, p, o, m) BOOST_PP_IF(p(145, s), m, BOOST_PP_TUPLE_EAT_2)(145, s) BOOST_PP_IF(p(145, s), BOOST_PP_FOR_145, BOOST_PP_TUPLE_EAT_4)(o(145, s), p, o, m) # define BOOST_PP_FOR_145_I(s, p, o, m) BOOST_PP_IF(p(146, s), m, BOOST_PP_TUPLE_EAT_2)(146, s) BOOST_PP_IF(p(146, s), BOOST_PP_FOR_146, BOOST_PP_TUPLE_EAT_4)(o(146, s), p, o, m) # define BOOST_PP_FOR_146_I(s, p, o, m) BOOST_PP_IF(p(147, s), m, BOOST_PP_TUPLE_EAT_2)(147, s) BOOST_PP_IF(p(147, s), BOOST_PP_FOR_147, BOOST_PP_TUPLE_EAT_4)(o(147, s), p, o, m) # define BOOST_PP_FOR_147_I(s, p, o, m) BOOST_PP_IF(p(148, s), m, BOOST_PP_TUPLE_EAT_2)(148, s) BOOST_PP_IF(p(148, s), BOOST_PP_FOR_148, BOOST_PP_TUPLE_EAT_4)(o(148, s), p, o, m) # define BOOST_PP_FOR_148_I(s, p, o, m) BOOST_PP_IF(p(149, s), m, BOOST_PP_TUPLE_EAT_2)(149, s) BOOST_PP_IF(p(149, s), BOOST_PP_FOR_149, BOOST_PP_TUPLE_EAT_4)(o(149, s), p, o, m) # define BOOST_PP_FOR_149_I(s, p, o, m) BOOST_PP_IF(p(150, s), m, BOOST_PP_TUPLE_EAT_2)(150, s) BOOST_PP_IF(p(150, s), BOOST_PP_FOR_150, BOOST_PP_TUPLE_EAT_4)(o(150, s), p, o, m) # define BOOST_PP_FOR_150_I(s, p, o, m) BOOST_PP_IF(p(151, s), m, BOOST_PP_TUPLE_EAT_2)(151, s) BOOST_PP_IF(p(151, s), BOOST_PP_FOR_151, BOOST_PP_TUPLE_EAT_4)(o(151, s), p, o, m) # define BOOST_PP_FOR_151_I(s, p, o, m) BOOST_PP_IF(p(152, s), m, BOOST_PP_TUPLE_EAT_2)(152, s) BOOST_PP_IF(p(152, s), BOOST_PP_FOR_152, BOOST_PP_TUPLE_EAT_4)(o(152, s), p, o, m) # define BOOST_PP_FOR_152_I(s, p, o, m) BOOST_PP_IF(p(153, s), m, BOOST_PP_TUPLE_EAT_2)(153, s) BOOST_PP_IF(p(153, s), BOOST_PP_FOR_153, BOOST_PP_TUPLE_EAT_4)(o(153, s), p, o, m) # define BOOST_PP_FOR_153_I(s, p, o, m) BOOST_PP_IF(p(154, s), m, BOOST_PP_TUPLE_EAT_2)(154, s) BOOST_PP_IF(p(154, s), BOOST_PP_FOR_154, BOOST_PP_TUPLE_EAT_4)(o(154, s), p, o, m) # define BOOST_PP_FOR_154_I(s, p, o, m) BOOST_PP_IF(p(155, s), m, BOOST_PP_TUPLE_EAT_2)(155, s) BOOST_PP_IF(p(155, s), BOOST_PP_FOR_155, BOOST_PP_TUPLE_EAT_4)(o(155, s), p, o, m) # define BOOST_PP_FOR_155_I(s, p, o, m) BOOST_PP_IF(p(156, s), m, BOOST_PP_TUPLE_EAT_2)(156, s) BOOST_PP_IF(p(156, s), BOOST_PP_FOR_156, BOOST_PP_TUPLE_EAT_4)(o(156, s), p, o, m) # define BOOST_PP_FOR_156_I(s, p, o, m) BOOST_PP_IF(p(157, s), m, BOOST_PP_TUPLE_EAT_2)(157, s) BOOST_PP_IF(p(157, s), BOOST_PP_FOR_157, BOOST_PP_TUPLE_EAT_4)(o(157, s), p, o, m) # define BOOST_PP_FOR_157_I(s, p, o, m) BOOST_PP_IF(p(158, s), m, BOOST_PP_TUPLE_EAT_2)(158, s) BOOST_PP_IF(p(158, s), BOOST_PP_FOR_158, BOOST_PP_TUPLE_EAT_4)(o(158, s), p, o, m) # define BOOST_PP_FOR_158_I(s, p, o, m) BOOST_PP_IF(p(159, s), m, BOOST_PP_TUPLE_EAT_2)(159, s) BOOST_PP_IF(p(159, s), BOOST_PP_FOR_159, BOOST_PP_TUPLE_EAT_4)(o(159, s), p, o, m) # define BOOST_PP_FOR_159_I(s, p, o, m) BOOST_PP_IF(p(160, s), m, BOOST_PP_TUPLE_EAT_2)(160, s) BOOST_PP_IF(p(160, s), BOOST_PP_FOR_160, BOOST_PP_TUPLE_EAT_4)(o(160, s), p, o, m) # define BOOST_PP_FOR_160_I(s, p, o, m) BOOST_PP_IF(p(161, s), m, BOOST_PP_TUPLE_EAT_2)(161, s) BOOST_PP_IF(p(161, s), BOOST_PP_FOR_161, BOOST_PP_TUPLE_EAT_4)(o(161, s), p, o, m) # define BOOST_PP_FOR_161_I(s, p, o, m) BOOST_PP_IF(p(162, s), m, BOOST_PP_TUPLE_EAT_2)(162, s) BOOST_PP_IF(p(162, s), BOOST_PP_FOR_162, BOOST_PP_TUPLE_EAT_4)(o(162, s), p, o, m) # define BOOST_PP_FOR_162_I(s, p, o, m) BOOST_PP_IF(p(163, s), m, BOOST_PP_TUPLE_EAT_2)(163, s) BOOST_PP_IF(p(163, s), BOOST_PP_FOR_163, BOOST_PP_TUPLE_EAT_4)(o(163, s), p, o, m) # define BOOST_PP_FOR_163_I(s, p, o, m) BOOST_PP_IF(p(164, s), m, BOOST_PP_TUPLE_EAT_2)(164, s) BOOST_PP_IF(p(164, s), BOOST_PP_FOR_164, BOOST_PP_TUPLE_EAT_4)(o(164, s), p, o, m) # define BOOST_PP_FOR_164_I(s, p, o, m) BOOST_PP_IF(p(165, s), m, BOOST_PP_TUPLE_EAT_2)(165, s) BOOST_PP_IF(p(165, s), BOOST_PP_FOR_165, BOOST_PP_TUPLE_EAT_4)(o(165, s), p, o, m) # define BOOST_PP_FOR_165_I(s, p, o, m) BOOST_PP_IF(p(166, s), m, BOOST_PP_TUPLE_EAT_2)(166, s) BOOST_PP_IF(p(166, s), BOOST_PP_FOR_166, BOOST_PP_TUPLE_EAT_4)(o(166, s), p, o, m) # define BOOST_PP_FOR_166_I(s, p, o, m) BOOST_PP_IF(p(167, s), m, BOOST_PP_TUPLE_EAT_2)(167, s) BOOST_PP_IF(p(167, s), BOOST_PP_FOR_167, BOOST_PP_TUPLE_EAT_4)(o(167, s), p, o, m) # define BOOST_PP_FOR_167_I(s, p, o, m) BOOST_PP_IF(p(168, s), m, BOOST_PP_TUPLE_EAT_2)(168, s) BOOST_PP_IF(p(168, s), BOOST_PP_FOR_168, BOOST_PP_TUPLE_EAT_4)(o(168, s), p, o, m) # define BOOST_PP_FOR_168_I(s, p, o, m) BOOST_PP_IF(p(169, s), m, BOOST_PP_TUPLE_EAT_2)(169, s) BOOST_PP_IF(p(169, s), BOOST_PP_FOR_169, BOOST_PP_TUPLE_EAT_4)(o(169, s), p, o, m) # define BOOST_PP_FOR_169_I(s, p, o, m) BOOST_PP_IF(p(170, s), m, BOOST_PP_TUPLE_EAT_2)(170, s) BOOST_PP_IF(p(170, s), BOOST_PP_FOR_170, BOOST_PP_TUPLE_EAT_4)(o(170, s), p, o, m) # define BOOST_PP_FOR_170_I(s, p, o, m) BOOST_PP_IF(p(171, s), m, BOOST_PP_TUPLE_EAT_2)(171, s) BOOST_PP_IF(p(171, s), BOOST_PP_FOR_171, BOOST_PP_TUPLE_EAT_4)(o(171, s), p, o, m) # define BOOST_PP_FOR_171_I(s, p, o, m) BOOST_PP_IF(p(172, s), m, BOOST_PP_TUPLE_EAT_2)(172, s) BOOST_PP_IF(p(172, s), BOOST_PP_FOR_172, BOOST_PP_TUPLE_EAT_4)(o(172, s), p, o, m) # define BOOST_PP_FOR_172_I(s, p, o, m) BOOST_PP_IF(p(173, s), m, BOOST_PP_TUPLE_EAT_2)(173, s) BOOST_PP_IF(p(173, s), BOOST_PP_FOR_173, BOOST_PP_TUPLE_EAT_4)(o(173, s), p, o, m) # define BOOST_PP_FOR_173_I(s, p, o, m) BOOST_PP_IF(p(174, s), m, BOOST_PP_TUPLE_EAT_2)(174, s) BOOST_PP_IF(p(174, s), BOOST_PP_FOR_174, BOOST_PP_TUPLE_EAT_4)(o(174, s), p, o, m) # define BOOST_PP_FOR_174_I(s, p, o, m) BOOST_PP_IF(p(175, s), m, BOOST_PP_TUPLE_EAT_2)(175, s) BOOST_PP_IF(p(175, s), BOOST_PP_FOR_175, BOOST_PP_TUPLE_EAT_4)(o(175, s), p, o, m) # define BOOST_PP_FOR_175_I(s, p, o, m) BOOST_PP_IF(p(176, s), m, BOOST_PP_TUPLE_EAT_2)(176, s) BOOST_PP_IF(p(176, s), BOOST_PP_FOR_176, BOOST_PP_TUPLE_EAT_4)(o(176, s), p, o, m) # define BOOST_PP_FOR_176_I(s, p, o, m) BOOST_PP_IF(p(177, s), m, BOOST_PP_TUPLE_EAT_2)(177, s) BOOST_PP_IF(p(177, s), BOOST_PP_FOR_177, BOOST_PP_TUPLE_EAT_4)(o(177, s), p, o, m) # define BOOST_PP_FOR_177_I(s, p, o, m) BOOST_PP_IF(p(178, s), m, BOOST_PP_TUPLE_EAT_2)(178, s) BOOST_PP_IF(p(178, s), BOOST_PP_FOR_178, BOOST_PP_TUPLE_EAT_4)(o(178, s), p, o, m) # define BOOST_PP_FOR_178_I(s, p, o, m) BOOST_PP_IF(p(179, s), m, BOOST_PP_TUPLE_EAT_2)(179, s) BOOST_PP_IF(p(179, s), BOOST_PP_FOR_179, BOOST_PP_TUPLE_EAT_4)(o(179, s), p, o, m) # define BOOST_PP_FOR_179_I(s, p, o, m) BOOST_PP_IF(p(180, s), m, BOOST_PP_TUPLE_EAT_2)(180, s) BOOST_PP_IF(p(180, s), BOOST_PP_FOR_180, BOOST_PP_TUPLE_EAT_4)(o(180, s), p, o, m) # define BOOST_PP_FOR_180_I(s, p, o, m) BOOST_PP_IF(p(181, s), m, BOOST_PP_TUPLE_EAT_2)(181, s) BOOST_PP_IF(p(181, s), BOOST_PP_FOR_181, BOOST_PP_TUPLE_EAT_4)(o(181, s), p, o, m) # define BOOST_PP_FOR_181_I(s, p, o, m) BOOST_PP_IF(p(182, s), m, BOOST_PP_TUPLE_EAT_2)(182, s) BOOST_PP_IF(p(182, s), BOOST_PP_FOR_182, BOOST_PP_TUPLE_EAT_4)(o(182, s), p, o, m) # define BOOST_PP_FOR_182_I(s, p, o, m) BOOST_PP_IF(p(183, s), m, BOOST_PP_TUPLE_EAT_2)(183, s) BOOST_PP_IF(p(183, s), BOOST_PP_FOR_183, BOOST_PP_TUPLE_EAT_4)(o(183, s), p, o, m) # define BOOST_PP_FOR_183_I(s, p, o, m) BOOST_PP_IF(p(184, s), m, BOOST_PP_TUPLE_EAT_2)(184, s) BOOST_PP_IF(p(184, s), BOOST_PP_FOR_184, BOOST_PP_TUPLE_EAT_4)(o(184, s), p, o, m) # define BOOST_PP_FOR_184_I(s, p, o, m) BOOST_PP_IF(p(185, s), m, BOOST_PP_TUPLE_EAT_2)(185, s) BOOST_PP_IF(p(185, s), BOOST_PP_FOR_185, BOOST_PP_TUPLE_EAT_4)(o(185, s), p, o, m) # define BOOST_PP_FOR_185_I(s, p, o, m) BOOST_PP_IF(p(186, s), m, BOOST_PP_TUPLE_EAT_2)(186, s) BOOST_PP_IF(p(186, s), BOOST_PP_FOR_186, BOOST_PP_TUPLE_EAT_4)(o(186, s), p, o, m) # define BOOST_PP_FOR_186_I(s, p, o, m) BOOST_PP_IF(p(187, s), m, BOOST_PP_TUPLE_EAT_2)(187, s) BOOST_PP_IF(p(187, s), BOOST_PP_FOR_187, BOOST_PP_TUPLE_EAT_4)(o(187, s), p, o, m) # define BOOST_PP_FOR_187_I(s, p, o, m) BOOST_PP_IF(p(188, s), m, BOOST_PP_TUPLE_EAT_2)(188, s) BOOST_PP_IF(p(188, s), BOOST_PP_FOR_188, BOOST_PP_TUPLE_EAT_4)(o(188, s), p, o, m) # define BOOST_PP_FOR_188_I(s, p, o, m) BOOST_PP_IF(p(189, s), m, BOOST_PP_TUPLE_EAT_2)(189, s) BOOST_PP_IF(p(189, s), BOOST_PP_FOR_189, BOOST_PP_TUPLE_EAT_4)(o(189, s), p, o, m) # define BOOST_PP_FOR_189_I(s, p, o, m) BOOST_PP_IF(p(190, s), m, BOOST_PP_TUPLE_EAT_2)(190, s) BOOST_PP_IF(p(190, s), BOOST_PP_FOR_190, BOOST_PP_TUPLE_EAT_4)(o(190, s), p, o, m) # define BOOST_PP_FOR_190_I(s, p, o, m) BOOST_PP_IF(p(191, s), m, BOOST_PP_TUPLE_EAT_2)(191, s) BOOST_PP_IF(p(191, s), BOOST_PP_FOR_191, BOOST_PP_TUPLE_EAT_4)(o(191, s), p, o, m) # define BOOST_PP_FOR_191_I(s, p, o, m) BOOST_PP_IF(p(192, s), m, BOOST_PP_TUPLE_EAT_2)(192, s) BOOST_PP_IF(p(192, s), BOOST_PP_FOR_192, BOOST_PP_TUPLE_EAT_4)(o(192, s), p, o, m) # define BOOST_PP_FOR_192_I(s, p, o, m) BOOST_PP_IF(p(193, s), m, BOOST_PP_TUPLE_EAT_2)(193, s) BOOST_PP_IF(p(193, s), BOOST_PP_FOR_193, BOOST_PP_TUPLE_EAT_4)(o(193, s), p, o, m) # define BOOST_PP_FOR_193_I(s, p, o, m) BOOST_PP_IF(p(194, s), m, BOOST_PP_TUPLE_EAT_2)(194, s) BOOST_PP_IF(p(194, s), BOOST_PP_FOR_194, BOOST_PP_TUPLE_EAT_4)(o(194, s), p, o, m) # define BOOST_PP_FOR_194_I(s, p, o, m) BOOST_PP_IF(p(195, s), m, BOOST_PP_TUPLE_EAT_2)(195, s) BOOST_PP_IF(p(195, s), BOOST_PP_FOR_195, BOOST_PP_TUPLE_EAT_4)(o(195, s), p, o, m) # define BOOST_PP_FOR_195_I(s, p, o, m) BOOST_PP_IF(p(196, s), m, BOOST_PP_TUPLE_EAT_2)(196, s) BOOST_PP_IF(p(196, s), BOOST_PP_FOR_196, BOOST_PP_TUPLE_EAT_4)(o(196, s), p, o, m) # define BOOST_PP_FOR_196_I(s, p, o, m) BOOST_PP_IF(p(197, s), m, BOOST_PP_TUPLE_EAT_2)(197, s) BOOST_PP_IF(p(197, s), BOOST_PP_FOR_197, BOOST_PP_TUPLE_EAT_4)(o(197, s), p, o, m) # define BOOST_PP_FOR_197_I(s, p, o, m) BOOST_PP_IF(p(198, s), m, BOOST_PP_TUPLE_EAT_2)(198, s) BOOST_PP_IF(p(198, s), BOOST_PP_FOR_198, BOOST_PP_TUPLE_EAT_4)(o(198, s), p, o, m) # define BOOST_PP_FOR_198_I(s, p, o, m) BOOST_PP_IF(p(199, s), m, BOOST_PP_TUPLE_EAT_2)(199, s) BOOST_PP_IF(p(199, s), BOOST_PP_FOR_199, BOOST_PP_TUPLE_EAT_4)(o(199, s), p, o, m) # define BOOST_PP_FOR_199_I(s, p, o, m) BOOST_PP_IF(p(200, s), m, BOOST_PP_TUPLE_EAT_2)(200, s) BOOST_PP_IF(p(200, s), BOOST_PP_FOR_200, BOOST_PP_TUPLE_EAT_4)(o(200, s), p, o, m) # define BOOST_PP_FOR_200_I(s, p, o, m) BOOST_PP_IF(p(201, s), m, BOOST_PP_TUPLE_EAT_2)(201, s) BOOST_PP_IF(p(201, s), BOOST_PP_FOR_201, BOOST_PP_TUPLE_EAT_4)(o(201, s), p, o, m) # define BOOST_PP_FOR_201_I(s, p, o, m) BOOST_PP_IF(p(202, s), m, BOOST_PP_TUPLE_EAT_2)(202, s) BOOST_PP_IF(p(202, s), BOOST_PP_FOR_202, BOOST_PP_TUPLE_EAT_4)(o(202, s), p, o, m) # define BOOST_PP_FOR_202_I(s, p, o, m) BOOST_PP_IF(p(203, s), m, BOOST_PP_TUPLE_EAT_2)(203, s) BOOST_PP_IF(p(203, s), BOOST_PP_FOR_203, BOOST_PP_TUPLE_EAT_4)(o(203, s), p, o, m) # define BOOST_PP_FOR_203_I(s, p, o, m) BOOST_PP_IF(p(204, s), m, BOOST_PP_TUPLE_EAT_2)(204, s) BOOST_PP_IF(p(204, s), BOOST_PP_FOR_204, BOOST_PP_TUPLE_EAT_4)(o(204, s), p, o, m) # define BOOST_PP_FOR_204_I(s, p, o, m) BOOST_PP_IF(p(205, s), m, BOOST_PP_TUPLE_EAT_2)(205, s) BOOST_PP_IF(p(205, s), BOOST_PP_FOR_205, BOOST_PP_TUPLE_EAT_4)(o(205, s), p, o, m) # define BOOST_PP_FOR_205_I(s, p, o, m) BOOST_PP_IF(p(206, s), m, BOOST_PP_TUPLE_EAT_2)(206, s) BOOST_PP_IF(p(206, s), BOOST_PP_FOR_206, BOOST_PP_TUPLE_EAT_4)(o(206, s), p, o, m) # define BOOST_PP_FOR_206_I(s, p, o, m) BOOST_PP_IF(p(207, s), m, BOOST_PP_TUPLE_EAT_2)(207, s) BOOST_PP_IF(p(207, s), BOOST_PP_FOR_207, BOOST_PP_TUPLE_EAT_4)(o(207, s), p, o, m) # define BOOST_PP_FOR_207_I(s, p, o, m) BOOST_PP_IF(p(208, s), m, BOOST_PP_TUPLE_EAT_2)(208, s) BOOST_PP_IF(p(208, s), BOOST_PP_FOR_208, BOOST_PP_TUPLE_EAT_4)(o(208, s), p, o, m) # define BOOST_PP_FOR_208_I(s, p, o, m) BOOST_PP_IF(p(209, s), m, BOOST_PP_TUPLE_EAT_2)(209, s) BOOST_PP_IF(p(209, s), BOOST_PP_FOR_209, BOOST_PP_TUPLE_EAT_4)(o(209, s), p, o, m) # define BOOST_PP_FOR_209_I(s, p, o, m) BOOST_PP_IF(p(210, s), m, BOOST_PP_TUPLE_EAT_2)(210, s) BOOST_PP_IF(p(210, s), BOOST_PP_FOR_210, BOOST_PP_TUPLE_EAT_4)(o(210, s), p, o, m) # define BOOST_PP_FOR_210_I(s, p, o, m) BOOST_PP_IF(p(211, s), m, BOOST_PP_TUPLE_EAT_2)(211, s) BOOST_PP_IF(p(211, s), BOOST_PP_FOR_211, BOOST_PP_TUPLE_EAT_4)(o(211, s), p, o, m) # define BOOST_PP_FOR_211_I(s, p, o, m) BOOST_PP_IF(p(212, s), m, BOOST_PP_TUPLE_EAT_2)(212, s) BOOST_PP_IF(p(212, s), BOOST_PP_FOR_212, BOOST_PP_TUPLE_EAT_4)(o(212, s), p, o, m) # define BOOST_PP_FOR_212_I(s, p, o, m) BOOST_PP_IF(p(213, s), m, BOOST_PP_TUPLE_EAT_2)(213, s) BOOST_PP_IF(p(213, s), BOOST_PP_FOR_213, BOOST_PP_TUPLE_EAT_4)(o(213, s), p, o, m) # define BOOST_PP_FOR_213_I(s, p, o, m) BOOST_PP_IF(p(214, s), m, BOOST_PP_TUPLE_EAT_2)(214, s) BOOST_PP_IF(p(214, s), BOOST_PP_FOR_214, BOOST_PP_TUPLE_EAT_4)(o(214, s), p, o, m) # define BOOST_PP_FOR_214_I(s, p, o, m) BOOST_PP_IF(p(215, s), m, BOOST_PP_TUPLE_EAT_2)(215, s) BOOST_PP_IF(p(215, s), BOOST_PP_FOR_215, BOOST_PP_TUPLE_EAT_4)(o(215, s), p, o, m) # define BOOST_PP_FOR_215_I(s, p, o, m) BOOST_PP_IF(p(216, s), m, BOOST_PP_TUPLE_EAT_2)(216, s) BOOST_PP_IF(p(216, s), BOOST_PP_FOR_216, BOOST_PP_TUPLE_EAT_4)(o(216, s), p, o, m) # define BOOST_PP_FOR_216_I(s, p, o, m) BOOST_PP_IF(p(217, s), m, BOOST_PP_TUPLE_EAT_2)(217, s) BOOST_PP_IF(p(217, s), BOOST_PP_FOR_217, BOOST_PP_TUPLE_EAT_4)(o(217, s), p, o, m) # define BOOST_PP_FOR_217_I(s, p, o, m) BOOST_PP_IF(p(218, s), m, BOOST_PP_TUPLE_EAT_2)(218, s) BOOST_PP_IF(p(218, s), BOOST_PP_FOR_218, BOOST_PP_TUPLE_EAT_4)(o(218, s), p, o, m) # define BOOST_PP_FOR_218_I(s, p, o, m) BOOST_PP_IF(p(219, s), m, BOOST_PP_TUPLE_EAT_2)(219, s) BOOST_PP_IF(p(219, s), BOOST_PP_FOR_219, BOOST_PP_TUPLE_EAT_4)(o(219, s), p, o, m) # define BOOST_PP_FOR_219_I(s, p, o, m) BOOST_PP_IF(p(220, s), m, BOOST_PP_TUPLE_EAT_2)(220, s) BOOST_PP_IF(p(220, s), BOOST_PP_FOR_220, BOOST_PP_TUPLE_EAT_4)(o(220, s), p, o, m) # define BOOST_PP_FOR_220_I(s, p, o, m) BOOST_PP_IF(p(221, s), m, BOOST_PP_TUPLE_EAT_2)(221, s) BOOST_PP_IF(p(221, s), BOOST_PP_FOR_221, BOOST_PP_TUPLE_EAT_4)(o(221, s), p, o, m) # define BOOST_PP_FOR_221_I(s, p, o, m) BOOST_PP_IF(p(222, s), m, BOOST_PP_TUPLE_EAT_2)(222, s) BOOST_PP_IF(p(222, s), BOOST_PP_FOR_222, BOOST_PP_TUPLE_EAT_4)(o(222, s), p, o, m) # define BOOST_PP_FOR_222_I(s, p, o, m) BOOST_PP_IF(p(223, s), m, BOOST_PP_TUPLE_EAT_2)(223, s) BOOST_PP_IF(p(223, s), BOOST_PP_FOR_223, BOOST_PP_TUPLE_EAT_4)(o(223, s), p, o, m) # define BOOST_PP_FOR_223_I(s, p, o, m) BOOST_PP_IF(p(224, s), m, BOOST_PP_TUPLE_EAT_2)(224, s) BOOST_PP_IF(p(224, s), BOOST_PP_FOR_224, BOOST_PP_TUPLE_EAT_4)(o(224, s), p, o, m) # define BOOST_PP_FOR_224_I(s, p, o, m) BOOST_PP_IF(p(225, s), m, BOOST_PP_TUPLE_EAT_2)(225, s) BOOST_PP_IF(p(225, s), BOOST_PP_FOR_225, BOOST_PP_TUPLE_EAT_4)(o(225, s), p, o, m) # define BOOST_PP_FOR_225_I(s, p, o, m) BOOST_PP_IF(p(226, s), m, BOOST_PP_TUPLE_EAT_2)(226, s) BOOST_PP_IF(p(226, s), BOOST_PP_FOR_226, BOOST_PP_TUPLE_EAT_4)(o(226, s), p, o, m) # define BOOST_PP_FOR_226_I(s, p, o, m) BOOST_PP_IF(p(227, s), m, BOOST_PP_TUPLE_EAT_2)(227, s) BOOST_PP_IF(p(227, s), BOOST_PP_FOR_227, BOOST_PP_TUPLE_EAT_4)(o(227, s), p, o, m) # define BOOST_PP_FOR_227_I(s, p, o, m) BOOST_PP_IF(p(228, s), m, BOOST_PP_TUPLE_EAT_2)(228, s) BOOST_PP_IF(p(228, s), BOOST_PP_FOR_228, BOOST_PP_TUPLE_EAT_4)(o(228, s), p, o, m) # define BOOST_PP_FOR_228_I(s, p, o, m) BOOST_PP_IF(p(229, s), m, BOOST_PP_TUPLE_EAT_2)(229, s) BOOST_PP_IF(p(229, s), BOOST_PP_FOR_229, BOOST_PP_TUPLE_EAT_4)(o(229, s), p, o, m) # define BOOST_PP_FOR_229_I(s, p, o, m) BOOST_PP_IF(p(230, s), m, BOOST_PP_TUPLE_EAT_2)(230, s) BOOST_PP_IF(p(230, s), BOOST_PP_FOR_230, BOOST_PP_TUPLE_EAT_4)(o(230, s), p, o, m) # define BOOST_PP_FOR_230_I(s, p, o, m) BOOST_PP_IF(p(231, s), m, BOOST_PP_TUPLE_EAT_2)(231, s) BOOST_PP_IF(p(231, s), BOOST_PP_FOR_231, BOOST_PP_TUPLE_EAT_4)(o(231, s), p, o, m) # define BOOST_PP_FOR_231_I(s, p, o, m) BOOST_PP_IF(p(232, s), m, BOOST_PP_TUPLE_EAT_2)(232, s) BOOST_PP_IF(p(232, s), BOOST_PP_FOR_232, BOOST_PP_TUPLE_EAT_4)(o(232, s), p, o, m) # define BOOST_PP_FOR_232_I(s, p, o, m) BOOST_PP_IF(p(233, s), m, BOOST_PP_TUPLE_EAT_2)(233, s) BOOST_PP_IF(p(233, s), BOOST_PP_FOR_233, BOOST_PP_TUPLE_EAT_4)(o(233, s), p, o, m) # define BOOST_PP_FOR_233_I(s, p, o, m) BOOST_PP_IF(p(234, s), m, BOOST_PP_TUPLE_EAT_2)(234, s) BOOST_PP_IF(p(234, s), BOOST_PP_FOR_234, BOOST_PP_TUPLE_EAT_4)(o(234, s), p, o, m) # define BOOST_PP_FOR_234_I(s, p, o, m) BOOST_PP_IF(p(235, s), m, BOOST_PP_TUPLE_EAT_2)(235, s) BOOST_PP_IF(p(235, s), BOOST_PP_FOR_235, BOOST_PP_TUPLE_EAT_4)(o(235, s), p, o, m) # define BOOST_PP_FOR_235_I(s, p, o, m) BOOST_PP_IF(p(236, s), m, BOOST_PP_TUPLE_EAT_2)(236, s) BOOST_PP_IF(p(236, s), BOOST_PP_FOR_236, BOOST_PP_TUPLE_EAT_4)(o(236, s), p, o, m) # define BOOST_PP_FOR_236_I(s, p, o, m) BOOST_PP_IF(p(237, s), m, BOOST_PP_TUPLE_EAT_2)(237, s) BOOST_PP_IF(p(237, s), BOOST_PP_FOR_237, BOOST_PP_TUPLE_EAT_4)(o(237, s), p, o, m) # define BOOST_PP_FOR_237_I(s, p, o, m) BOOST_PP_IF(p(238, s), m, BOOST_PP_TUPLE_EAT_2)(238, s) BOOST_PP_IF(p(238, s), BOOST_PP_FOR_238, BOOST_PP_TUPLE_EAT_4)(o(238, s), p, o, m) # define BOOST_PP_FOR_238_I(s, p, o, m) BOOST_PP_IF(p(239, s), m, BOOST_PP_TUPLE_EAT_2)(239, s) BOOST_PP_IF(p(239, s), BOOST_PP_FOR_239, BOOST_PP_TUPLE_EAT_4)(o(239, s), p, o, m) # define BOOST_PP_FOR_239_I(s, p, o, m) BOOST_PP_IF(p(240, s), m, BOOST_PP_TUPLE_EAT_2)(240, s) BOOST_PP_IF(p(240, s), BOOST_PP_FOR_240, BOOST_PP_TUPLE_EAT_4)(o(240, s), p, o, m) # define BOOST_PP_FOR_240_I(s, p, o, m) BOOST_PP_IF(p(241, s), m, BOOST_PP_TUPLE_EAT_2)(241, s) BOOST_PP_IF(p(241, s), BOOST_PP_FOR_241, BOOST_PP_TUPLE_EAT_4)(o(241, s), p, o, m) # define BOOST_PP_FOR_241_I(s, p, o, m) BOOST_PP_IF(p(242, s), m, BOOST_PP_TUPLE_EAT_2)(242, s) BOOST_PP_IF(p(242, s), BOOST_PP_FOR_242, BOOST_PP_TUPLE_EAT_4)(o(242, s), p, o, m) # define BOOST_PP_FOR_242_I(s, p, o, m) BOOST_PP_IF(p(243, s), m, BOOST_PP_TUPLE_EAT_2)(243, s) BOOST_PP_IF(p(243, s), BOOST_PP_FOR_243, BOOST_PP_TUPLE_EAT_4)(o(243, s), p, o, m) # define BOOST_PP_FOR_243_I(s, p, o, m) BOOST_PP_IF(p(244, s), m, BOOST_PP_TUPLE_EAT_2)(244, s) BOOST_PP_IF(p(244, s), BOOST_PP_FOR_244, BOOST_PP_TUPLE_EAT_4)(o(244, s), p, o, m) # define BOOST_PP_FOR_244_I(s, p, o, m) BOOST_PP_IF(p(245, s), m, BOOST_PP_TUPLE_EAT_2)(245, s) BOOST_PP_IF(p(245, s), BOOST_PP_FOR_245, BOOST_PP_TUPLE_EAT_4)(o(245, s), p, o, m) # define BOOST_PP_FOR_245_I(s, p, o, m) BOOST_PP_IF(p(246, s), m, BOOST_PP_TUPLE_EAT_2)(246, s) BOOST_PP_IF(p(246, s), BOOST_PP_FOR_246, BOOST_PP_TUPLE_EAT_4)(o(246, s), p, o, m) # define BOOST_PP_FOR_246_I(s, p, o, m) BOOST_PP_IF(p(247, s), m, BOOST_PP_TUPLE_EAT_2)(247, s) BOOST_PP_IF(p(247, s), BOOST_PP_FOR_247, BOOST_PP_TUPLE_EAT_4)(o(247, s), p, o, m) # define BOOST_PP_FOR_247_I(s, p, o, m) BOOST_PP_IF(p(248, s), m, BOOST_PP_TUPLE_EAT_2)(248, s) BOOST_PP_IF(p(248, s), BOOST_PP_FOR_248, BOOST_PP_TUPLE_EAT_4)(o(248, s), p, o, m) # define BOOST_PP_FOR_248_I(s, p, o, m) BOOST_PP_IF(p(249, s), m, BOOST_PP_TUPLE_EAT_2)(249, s) BOOST_PP_IF(p(249, s), BOOST_PP_FOR_249, BOOST_PP_TUPLE_EAT_4)(o(249, s), p, o, m) # define BOOST_PP_FOR_249_I(s, p, o, m) BOOST_PP_IF(p(250, s), m, BOOST_PP_TUPLE_EAT_2)(250, s) BOOST_PP_IF(p(250, s), BOOST_PP_FOR_250, BOOST_PP_TUPLE_EAT_4)(o(250, s), p, o, m) # define BOOST_PP_FOR_250_I(s, p, o, m) BOOST_PP_IF(p(251, s), m, BOOST_PP_TUPLE_EAT_2)(251, s) BOOST_PP_IF(p(251, s), BOOST_PP_FOR_251, BOOST_PP_TUPLE_EAT_4)(o(251, s), p, o, m) # define BOOST_PP_FOR_251_I(s, p, o, m) BOOST_PP_IF(p(252, s), m, BOOST_PP_TUPLE_EAT_2)(252, s) BOOST_PP_IF(p(252, s), BOOST_PP_FOR_252, BOOST_PP_TUPLE_EAT_4)(o(252, s), p, o, m) # define BOOST_PP_FOR_252_I(s, p, o, m) BOOST_PP_IF(p(253, s), m, BOOST_PP_TUPLE_EAT_2)(253, s) BOOST_PP_IF(p(253, s), BOOST_PP_FOR_253, BOOST_PP_TUPLE_EAT_4)(o(253, s), p, o, m) # define BOOST_PP_FOR_253_I(s, p, o, m) BOOST_PP_IF(p(254, s), m, BOOST_PP_TUPLE_EAT_2)(254, s) BOOST_PP_IF(p(254, s), BOOST_PP_FOR_254, BOOST_PP_TUPLE_EAT_4)(o(254, s), p, o, m) # define BOOST_PP_FOR_254_I(s, p, o, m) BOOST_PP_IF(p(255, s), m, BOOST_PP_TUPLE_EAT_2)(255, s) BOOST_PP_IF(p(255, s), BOOST_PP_FOR_255, BOOST_PP_TUPLE_EAT_4)(o(255, s), p, o, m) # define BOOST_PP_FOR_255_I(s, p, o, m) BOOST_PP_IF(p(256, s), m, BOOST_PP_TUPLE_EAT_2)(256, s) BOOST_PP_IF(p(256, s), BOOST_PP_FOR_256, BOOST_PP_TUPLE_EAT_4)(o(256, s), p, o, m) # define BOOST_PP_FOR_256_I(s, p, o, m) BOOST_PP_IF(p(257, s), m, BOOST_PP_TUPLE_EAT_2)(257, s) BOOST_PP_IF(p(257, s), BOOST_PP_FOR_257, BOOST_PP_TUPLE_EAT_4)(o(257, s), p, o, m) # # endif ================================================ FILE: benchmarks/boost/preprocessor/repetition/detail/for.hpp ================================================ # /* Copyright (C) 2001 # * Housemarque Oy # * http://www.housemarque.com # * # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # */ # # /* Revised by Paul Mensonides (2002) */ # # /* See http://www.boost.org for most recent version. */ # # ifndef BOOST_PREPROCESSOR_REPETITION_DETAIL_FOR_HPP # define BOOST_PREPROCESSOR_REPETITION_DETAIL_FOR_HPP # # include # include # include # include # # define BOOST_PP_FOR_1(s, p, o, m) BOOST_PP_FOR_1_C(BOOST_PP_BOOL(p(2, s)), s, p, o, m) # define BOOST_PP_FOR_2(s, p, o, m) BOOST_PP_FOR_2_C(BOOST_PP_BOOL(p(3, s)), s, p, o, m) # define BOOST_PP_FOR_3(s, p, o, m) BOOST_PP_FOR_3_C(BOOST_PP_BOOL(p(4, s)), s, p, o, m) # define BOOST_PP_FOR_4(s, p, o, m) BOOST_PP_FOR_4_C(BOOST_PP_BOOL(p(5, s)), s, p, o, m) # define BOOST_PP_FOR_5(s, p, o, m) BOOST_PP_FOR_5_C(BOOST_PP_BOOL(p(6, s)), s, p, o, m) # define BOOST_PP_FOR_6(s, p, o, m) BOOST_PP_FOR_6_C(BOOST_PP_BOOL(p(7, s)), s, p, o, m) # define BOOST_PP_FOR_7(s, p, o, m) BOOST_PP_FOR_7_C(BOOST_PP_BOOL(p(8, s)), s, p, o, m) # define BOOST_PP_FOR_8(s, p, o, m) BOOST_PP_FOR_8_C(BOOST_PP_BOOL(p(9, s)), s, p, o, m) # define BOOST_PP_FOR_9(s, p, o, m) BOOST_PP_FOR_9_C(BOOST_PP_BOOL(p(10, s)), s, p, o, m) # define BOOST_PP_FOR_10(s, p, o, m) BOOST_PP_FOR_10_C(BOOST_PP_BOOL(p(11, s)), s, p, o, m) # define BOOST_PP_FOR_11(s, p, o, m) BOOST_PP_FOR_11_C(BOOST_PP_BOOL(p(12, s)), s, p, o, m) # define BOOST_PP_FOR_12(s, p, o, m) BOOST_PP_FOR_12_C(BOOST_PP_BOOL(p(13, s)), s, p, o, m) # define BOOST_PP_FOR_13(s, p, o, m) BOOST_PP_FOR_13_C(BOOST_PP_BOOL(p(14, s)), s, p, o, m) # define BOOST_PP_FOR_14(s, p, o, m) BOOST_PP_FOR_14_C(BOOST_PP_BOOL(p(15, s)), s, p, o, m) # define BOOST_PP_FOR_15(s, p, o, m) BOOST_PP_FOR_15_C(BOOST_PP_BOOL(p(16, s)), s, p, o, m) # define BOOST_PP_FOR_16(s, p, o, m) BOOST_PP_FOR_16_C(BOOST_PP_BOOL(p(17, s)), s, p, o, m) # define BOOST_PP_FOR_17(s, p, o, m) BOOST_PP_FOR_17_C(BOOST_PP_BOOL(p(18, s)), s, p, o, m) # define BOOST_PP_FOR_18(s, p, o, m) BOOST_PP_FOR_18_C(BOOST_PP_BOOL(p(19, s)), s, p, o, m) # define BOOST_PP_FOR_19(s, p, o, m) BOOST_PP_FOR_19_C(BOOST_PP_BOOL(p(20, s)), s, p, o, m) # define BOOST_PP_FOR_20(s, p, o, m) BOOST_PP_FOR_20_C(BOOST_PP_BOOL(p(21, s)), s, p, o, m) # define BOOST_PP_FOR_21(s, p, o, m) BOOST_PP_FOR_21_C(BOOST_PP_BOOL(p(22, s)), s, p, o, m) # define BOOST_PP_FOR_22(s, p, o, m) BOOST_PP_FOR_22_C(BOOST_PP_BOOL(p(23, s)), s, p, o, m) # define BOOST_PP_FOR_23(s, p, o, m) BOOST_PP_FOR_23_C(BOOST_PP_BOOL(p(24, s)), s, p, o, m) # define BOOST_PP_FOR_24(s, p, o, m) BOOST_PP_FOR_24_C(BOOST_PP_BOOL(p(25, s)), s, p, o, m) # define BOOST_PP_FOR_25(s, p, o, m) BOOST_PP_FOR_25_C(BOOST_PP_BOOL(p(26, s)), s, p, o, m) # define BOOST_PP_FOR_26(s, p, o, m) BOOST_PP_FOR_26_C(BOOST_PP_BOOL(p(27, s)), s, p, o, m) # define BOOST_PP_FOR_27(s, p, o, m) BOOST_PP_FOR_27_C(BOOST_PP_BOOL(p(28, s)), s, p, o, m) # define BOOST_PP_FOR_28(s, p, o, m) BOOST_PP_FOR_28_C(BOOST_PP_BOOL(p(29, s)), s, p, o, m) # define BOOST_PP_FOR_29(s, p, o, m) BOOST_PP_FOR_29_C(BOOST_PP_BOOL(p(30, s)), s, p, o, m) # define BOOST_PP_FOR_30(s, p, o, m) BOOST_PP_FOR_30_C(BOOST_PP_BOOL(p(31, s)), s, p, o, m) # define BOOST_PP_FOR_31(s, p, o, m) BOOST_PP_FOR_31_C(BOOST_PP_BOOL(p(32, s)), s, p, o, m) # define BOOST_PP_FOR_32(s, p, o, m) BOOST_PP_FOR_32_C(BOOST_PP_BOOL(p(33, s)), s, p, o, m) # define BOOST_PP_FOR_33(s, p, o, m) BOOST_PP_FOR_33_C(BOOST_PP_BOOL(p(34, s)), s, p, o, m) # define BOOST_PP_FOR_34(s, p, o, m) BOOST_PP_FOR_34_C(BOOST_PP_BOOL(p(35, s)), s, p, o, m) # define BOOST_PP_FOR_35(s, p, o, m) BOOST_PP_FOR_35_C(BOOST_PP_BOOL(p(36, s)), s, p, o, m) # define BOOST_PP_FOR_36(s, p, o, m) BOOST_PP_FOR_36_C(BOOST_PP_BOOL(p(37, s)), s, p, o, m) # define BOOST_PP_FOR_37(s, p, o, m) BOOST_PP_FOR_37_C(BOOST_PP_BOOL(p(38, s)), s, p, o, m) # define BOOST_PP_FOR_38(s, p, o, m) BOOST_PP_FOR_38_C(BOOST_PP_BOOL(p(39, s)), s, p, o, m) # define BOOST_PP_FOR_39(s, p, o, m) BOOST_PP_FOR_39_C(BOOST_PP_BOOL(p(40, s)), s, p, o, m) # define BOOST_PP_FOR_40(s, p, o, m) BOOST_PP_FOR_40_C(BOOST_PP_BOOL(p(41, s)), s, p, o, m) # define BOOST_PP_FOR_41(s, p, o, m) BOOST_PP_FOR_41_C(BOOST_PP_BOOL(p(42, s)), s, p, o, m) # define BOOST_PP_FOR_42(s, p, o, m) BOOST_PP_FOR_42_C(BOOST_PP_BOOL(p(43, s)), s, p, o, m) # define BOOST_PP_FOR_43(s, p, o, m) BOOST_PP_FOR_43_C(BOOST_PP_BOOL(p(44, s)), s, p, o, m) # define BOOST_PP_FOR_44(s, p, o, m) BOOST_PP_FOR_44_C(BOOST_PP_BOOL(p(45, s)), s, p, o, m) # define BOOST_PP_FOR_45(s, p, o, m) BOOST_PP_FOR_45_C(BOOST_PP_BOOL(p(46, s)), s, p, o, m) # define BOOST_PP_FOR_46(s, p, o, m) BOOST_PP_FOR_46_C(BOOST_PP_BOOL(p(47, s)), s, p, o, m) # define BOOST_PP_FOR_47(s, p, o, m) BOOST_PP_FOR_47_C(BOOST_PP_BOOL(p(48, s)), s, p, o, m) # define BOOST_PP_FOR_48(s, p, o, m) BOOST_PP_FOR_48_C(BOOST_PP_BOOL(p(49, s)), s, p, o, m) # define BOOST_PP_FOR_49(s, p, o, m) BOOST_PP_FOR_49_C(BOOST_PP_BOOL(p(50, s)), s, p, o, m) # define BOOST_PP_FOR_50(s, p, o, m) BOOST_PP_FOR_50_C(BOOST_PP_BOOL(p(51, s)), s, p, o, m) # define BOOST_PP_FOR_51(s, p, o, m) BOOST_PP_FOR_51_C(BOOST_PP_BOOL(p(52, s)), s, p, o, m) # define BOOST_PP_FOR_52(s, p, o, m) BOOST_PP_FOR_52_C(BOOST_PP_BOOL(p(53, s)), s, p, o, m) # define BOOST_PP_FOR_53(s, p, o, m) BOOST_PP_FOR_53_C(BOOST_PP_BOOL(p(54, s)), s, p, o, m) # define BOOST_PP_FOR_54(s, p, o, m) BOOST_PP_FOR_54_C(BOOST_PP_BOOL(p(55, s)), s, p, o, m) # define BOOST_PP_FOR_55(s, p, o, m) BOOST_PP_FOR_55_C(BOOST_PP_BOOL(p(56, s)), s, p, o, m) # define BOOST_PP_FOR_56(s, p, o, m) BOOST_PP_FOR_56_C(BOOST_PP_BOOL(p(57, s)), s, p, o, m) # define BOOST_PP_FOR_57(s, p, o, m) BOOST_PP_FOR_57_C(BOOST_PP_BOOL(p(58, s)), s, p, o, m) # define BOOST_PP_FOR_58(s, p, o, m) BOOST_PP_FOR_58_C(BOOST_PP_BOOL(p(59, s)), s, p, o, m) # define BOOST_PP_FOR_59(s, p, o, m) BOOST_PP_FOR_59_C(BOOST_PP_BOOL(p(60, s)), s, p, o, m) # define BOOST_PP_FOR_60(s, p, o, m) BOOST_PP_FOR_60_C(BOOST_PP_BOOL(p(61, s)), s, p, o, m) # define BOOST_PP_FOR_61(s, p, o, m) BOOST_PP_FOR_61_C(BOOST_PP_BOOL(p(62, s)), s, p, o, m) # define BOOST_PP_FOR_62(s, p, o, m) BOOST_PP_FOR_62_C(BOOST_PP_BOOL(p(63, s)), s, p, o, m) # define BOOST_PP_FOR_63(s, p, o, m) BOOST_PP_FOR_63_C(BOOST_PP_BOOL(p(64, s)), s, p, o, m) # define BOOST_PP_FOR_64(s, p, o, m) BOOST_PP_FOR_64_C(BOOST_PP_BOOL(p(65, s)), s, p, o, m) # define BOOST_PP_FOR_65(s, p, o, m) BOOST_PP_FOR_65_C(BOOST_PP_BOOL(p(66, s)), s, p, o, m) # define BOOST_PP_FOR_66(s, p, o, m) BOOST_PP_FOR_66_C(BOOST_PP_BOOL(p(67, s)), s, p, o, m) # define BOOST_PP_FOR_67(s, p, o, m) BOOST_PP_FOR_67_C(BOOST_PP_BOOL(p(68, s)), s, p, o, m) # define BOOST_PP_FOR_68(s, p, o, m) BOOST_PP_FOR_68_C(BOOST_PP_BOOL(p(69, s)), s, p, o, m) # define BOOST_PP_FOR_69(s, p, o, m) BOOST_PP_FOR_69_C(BOOST_PP_BOOL(p(70, s)), s, p, o, m) # define BOOST_PP_FOR_70(s, p, o, m) BOOST_PP_FOR_70_C(BOOST_PP_BOOL(p(71, s)), s, p, o, m) # define BOOST_PP_FOR_71(s, p, o, m) BOOST_PP_FOR_71_C(BOOST_PP_BOOL(p(72, s)), s, p, o, m) # define BOOST_PP_FOR_72(s, p, o, m) BOOST_PP_FOR_72_C(BOOST_PP_BOOL(p(73, s)), s, p, o, m) # define BOOST_PP_FOR_73(s, p, o, m) BOOST_PP_FOR_73_C(BOOST_PP_BOOL(p(74, s)), s, p, o, m) # define BOOST_PP_FOR_74(s, p, o, m) BOOST_PP_FOR_74_C(BOOST_PP_BOOL(p(75, s)), s, p, o, m) # define BOOST_PP_FOR_75(s, p, o, m) BOOST_PP_FOR_75_C(BOOST_PP_BOOL(p(76, s)), s, p, o, m) # define BOOST_PP_FOR_76(s, p, o, m) BOOST_PP_FOR_76_C(BOOST_PP_BOOL(p(77, s)), s, p, o, m) # define BOOST_PP_FOR_77(s, p, o, m) BOOST_PP_FOR_77_C(BOOST_PP_BOOL(p(78, s)), s, p, o, m) # define BOOST_PP_FOR_78(s, p, o, m) BOOST_PP_FOR_78_C(BOOST_PP_BOOL(p(79, s)), s, p, o, m) # define BOOST_PP_FOR_79(s, p, o, m) BOOST_PP_FOR_79_C(BOOST_PP_BOOL(p(80, s)), s, p, o, m) # define BOOST_PP_FOR_80(s, p, o, m) BOOST_PP_FOR_80_C(BOOST_PP_BOOL(p(81, s)), s, p, o, m) # define BOOST_PP_FOR_81(s, p, o, m) BOOST_PP_FOR_81_C(BOOST_PP_BOOL(p(82, s)), s, p, o, m) # define BOOST_PP_FOR_82(s, p, o, m) BOOST_PP_FOR_82_C(BOOST_PP_BOOL(p(83, s)), s, p, o, m) # define BOOST_PP_FOR_83(s, p, o, m) BOOST_PP_FOR_83_C(BOOST_PP_BOOL(p(84, s)), s, p, o, m) # define BOOST_PP_FOR_84(s, p, o, m) BOOST_PP_FOR_84_C(BOOST_PP_BOOL(p(85, s)), s, p, o, m) # define BOOST_PP_FOR_85(s, p, o, m) BOOST_PP_FOR_85_C(BOOST_PP_BOOL(p(86, s)), s, p, o, m) # define BOOST_PP_FOR_86(s, p, o, m) BOOST_PP_FOR_86_C(BOOST_PP_BOOL(p(87, s)), s, p, o, m) # define BOOST_PP_FOR_87(s, p, o, m) BOOST_PP_FOR_87_C(BOOST_PP_BOOL(p(88, s)), s, p, o, m) # define BOOST_PP_FOR_88(s, p, o, m) BOOST_PP_FOR_88_C(BOOST_PP_BOOL(p(89, s)), s, p, o, m) # define BOOST_PP_FOR_89(s, p, o, m) BOOST_PP_FOR_89_C(BOOST_PP_BOOL(p(90, s)), s, p, o, m) # define BOOST_PP_FOR_90(s, p, o, m) BOOST_PP_FOR_90_C(BOOST_PP_BOOL(p(91, s)), s, p, o, m) # define BOOST_PP_FOR_91(s, p, o, m) BOOST_PP_FOR_91_C(BOOST_PP_BOOL(p(92, s)), s, p, o, m) # define BOOST_PP_FOR_92(s, p, o, m) BOOST_PP_FOR_92_C(BOOST_PP_BOOL(p(93, s)), s, p, o, m) # define BOOST_PP_FOR_93(s, p, o, m) BOOST_PP_FOR_93_C(BOOST_PP_BOOL(p(94, s)), s, p, o, m) # define BOOST_PP_FOR_94(s, p, o, m) BOOST_PP_FOR_94_C(BOOST_PP_BOOL(p(95, s)), s, p, o, m) # define BOOST_PP_FOR_95(s, p, o, m) BOOST_PP_FOR_95_C(BOOST_PP_BOOL(p(96, s)), s, p, o, m) # define BOOST_PP_FOR_96(s, p, o, m) BOOST_PP_FOR_96_C(BOOST_PP_BOOL(p(97, s)), s, p, o, m) # define BOOST_PP_FOR_97(s, p, o, m) BOOST_PP_FOR_97_C(BOOST_PP_BOOL(p(98, s)), s, p, o, m) # define BOOST_PP_FOR_98(s, p, o, m) BOOST_PP_FOR_98_C(BOOST_PP_BOOL(p(99, s)), s, p, o, m) # define BOOST_PP_FOR_99(s, p, o, m) BOOST_PP_FOR_99_C(BOOST_PP_BOOL(p(100, s)), s, p, o, m) # define BOOST_PP_FOR_100(s, p, o, m) BOOST_PP_FOR_100_C(BOOST_PP_BOOL(p(101, s)), s, p, o, m) # define BOOST_PP_FOR_101(s, p, o, m) BOOST_PP_FOR_101_C(BOOST_PP_BOOL(p(102, s)), s, p, o, m) # define BOOST_PP_FOR_102(s, p, o, m) BOOST_PP_FOR_102_C(BOOST_PP_BOOL(p(103, s)), s, p, o, m) # define BOOST_PP_FOR_103(s, p, o, m) BOOST_PP_FOR_103_C(BOOST_PP_BOOL(p(104, s)), s, p, o, m) # define BOOST_PP_FOR_104(s, p, o, m) BOOST_PP_FOR_104_C(BOOST_PP_BOOL(p(105, s)), s, p, o, m) # define BOOST_PP_FOR_105(s, p, o, m) BOOST_PP_FOR_105_C(BOOST_PP_BOOL(p(106, s)), s, p, o, m) # define BOOST_PP_FOR_106(s, p, o, m) BOOST_PP_FOR_106_C(BOOST_PP_BOOL(p(107, s)), s, p, o, m) # define BOOST_PP_FOR_107(s, p, o, m) BOOST_PP_FOR_107_C(BOOST_PP_BOOL(p(108, s)), s, p, o, m) # define BOOST_PP_FOR_108(s, p, o, m) BOOST_PP_FOR_108_C(BOOST_PP_BOOL(p(109, s)), s, p, o, m) # define BOOST_PP_FOR_109(s, p, o, m) BOOST_PP_FOR_109_C(BOOST_PP_BOOL(p(110, s)), s, p, o, m) # define BOOST_PP_FOR_110(s, p, o, m) BOOST_PP_FOR_110_C(BOOST_PP_BOOL(p(111, s)), s, p, o, m) # define BOOST_PP_FOR_111(s, p, o, m) BOOST_PP_FOR_111_C(BOOST_PP_BOOL(p(112, s)), s, p, o, m) # define BOOST_PP_FOR_112(s, p, o, m) BOOST_PP_FOR_112_C(BOOST_PP_BOOL(p(113, s)), s, p, o, m) # define BOOST_PP_FOR_113(s, p, o, m) BOOST_PP_FOR_113_C(BOOST_PP_BOOL(p(114, s)), s, p, o, m) # define BOOST_PP_FOR_114(s, p, o, m) BOOST_PP_FOR_114_C(BOOST_PP_BOOL(p(115, s)), s, p, o, m) # define BOOST_PP_FOR_115(s, p, o, m) BOOST_PP_FOR_115_C(BOOST_PP_BOOL(p(116, s)), s, p, o, m) # define BOOST_PP_FOR_116(s, p, o, m) BOOST_PP_FOR_116_C(BOOST_PP_BOOL(p(117, s)), s, p, o, m) # define BOOST_PP_FOR_117(s, p, o, m) BOOST_PP_FOR_117_C(BOOST_PP_BOOL(p(118, s)), s, p, o, m) # define BOOST_PP_FOR_118(s, p, o, m) BOOST_PP_FOR_118_C(BOOST_PP_BOOL(p(119, s)), s, p, o, m) # define BOOST_PP_FOR_119(s, p, o, m) BOOST_PP_FOR_119_C(BOOST_PP_BOOL(p(120, s)), s, p, o, m) # define BOOST_PP_FOR_120(s, p, o, m) BOOST_PP_FOR_120_C(BOOST_PP_BOOL(p(121, s)), s, p, o, m) # define BOOST_PP_FOR_121(s, p, o, m) BOOST_PP_FOR_121_C(BOOST_PP_BOOL(p(122, s)), s, p, o, m) # define BOOST_PP_FOR_122(s, p, o, m) BOOST_PP_FOR_122_C(BOOST_PP_BOOL(p(123, s)), s, p, o, m) # define BOOST_PP_FOR_123(s, p, o, m) BOOST_PP_FOR_123_C(BOOST_PP_BOOL(p(124, s)), s, p, o, m) # define BOOST_PP_FOR_124(s, p, o, m) BOOST_PP_FOR_124_C(BOOST_PP_BOOL(p(125, s)), s, p, o, m) # define BOOST_PP_FOR_125(s, p, o, m) BOOST_PP_FOR_125_C(BOOST_PP_BOOL(p(126, s)), s, p, o, m) # define BOOST_PP_FOR_126(s, p, o, m) BOOST_PP_FOR_126_C(BOOST_PP_BOOL(p(127, s)), s, p, o, m) # define BOOST_PP_FOR_127(s, p, o, m) BOOST_PP_FOR_127_C(BOOST_PP_BOOL(p(128, s)), s, p, o, m) # define BOOST_PP_FOR_128(s, p, o, m) BOOST_PP_FOR_128_C(BOOST_PP_BOOL(p(129, s)), s, p, o, m) # define BOOST_PP_FOR_129(s, p, o, m) BOOST_PP_FOR_129_C(BOOST_PP_BOOL(p(130, s)), s, p, o, m) # define BOOST_PP_FOR_130(s, p, o, m) BOOST_PP_FOR_130_C(BOOST_PP_BOOL(p(131, s)), s, p, o, m) # define BOOST_PP_FOR_131(s, p, o, m) BOOST_PP_FOR_131_C(BOOST_PP_BOOL(p(132, s)), s, p, o, m) # define BOOST_PP_FOR_132(s, p, o, m) BOOST_PP_FOR_132_C(BOOST_PP_BOOL(p(133, s)), s, p, o, m) # define BOOST_PP_FOR_133(s, p, o, m) BOOST_PP_FOR_133_C(BOOST_PP_BOOL(p(134, s)), s, p, o, m) # define BOOST_PP_FOR_134(s, p, o, m) BOOST_PP_FOR_134_C(BOOST_PP_BOOL(p(135, s)), s, p, o, m) # define BOOST_PP_FOR_135(s, p, o, m) BOOST_PP_FOR_135_C(BOOST_PP_BOOL(p(136, s)), s, p, o, m) # define BOOST_PP_FOR_136(s, p, o, m) BOOST_PP_FOR_136_C(BOOST_PP_BOOL(p(137, s)), s, p, o, m) # define BOOST_PP_FOR_137(s, p, o, m) BOOST_PP_FOR_137_C(BOOST_PP_BOOL(p(138, s)), s, p, o, m) # define BOOST_PP_FOR_138(s, p, o, m) BOOST_PP_FOR_138_C(BOOST_PP_BOOL(p(139, s)), s, p, o, m) # define BOOST_PP_FOR_139(s, p, o, m) BOOST_PP_FOR_139_C(BOOST_PP_BOOL(p(140, s)), s, p, o, m) # define BOOST_PP_FOR_140(s, p, o, m) BOOST_PP_FOR_140_C(BOOST_PP_BOOL(p(141, s)), s, p, o, m) # define BOOST_PP_FOR_141(s, p, o, m) BOOST_PP_FOR_141_C(BOOST_PP_BOOL(p(142, s)), s, p, o, m) # define BOOST_PP_FOR_142(s, p, o, m) BOOST_PP_FOR_142_C(BOOST_PP_BOOL(p(143, s)), s, p, o, m) # define BOOST_PP_FOR_143(s, p, o, m) BOOST_PP_FOR_143_C(BOOST_PP_BOOL(p(144, s)), s, p, o, m) # define BOOST_PP_FOR_144(s, p, o, m) BOOST_PP_FOR_144_C(BOOST_PP_BOOL(p(145, s)), s, p, o, m) # define BOOST_PP_FOR_145(s, p, o, m) BOOST_PP_FOR_145_C(BOOST_PP_BOOL(p(146, s)), s, p, o, m) # define BOOST_PP_FOR_146(s, p, o, m) BOOST_PP_FOR_146_C(BOOST_PP_BOOL(p(147, s)), s, p, o, m) # define BOOST_PP_FOR_147(s, p, o, m) BOOST_PP_FOR_147_C(BOOST_PP_BOOL(p(148, s)), s, p, o, m) # define BOOST_PP_FOR_148(s, p, o, m) BOOST_PP_FOR_148_C(BOOST_PP_BOOL(p(149, s)), s, p, o, m) # define BOOST_PP_FOR_149(s, p, o, m) BOOST_PP_FOR_149_C(BOOST_PP_BOOL(p(150, s)), s, p, o, m) # define BOOST_PP_FOR_150(s, p, o, m) BOOST_PP_FOR_150_C(BOOST_PP_BOOL(p(151, s)), s, p, o, m) # define BOOST_PP_FOR_151(s, p, o, m) BOOST_PP_FOR_151_C(BOOST_PP_BOOL(p(152, s)), s, p, o, m) # define BOOST_PP_FOR_152(s, p, o, m) BOOST_PP_FOR_152_C(BOOST_PP_BOOL(p(153, s)), s, p, o, m) # define BOOST_PP_FOR_153(s, p, o, m) BOOST_PP_FOR_153_C(BOOST_PP_BOOL(p(154, s)), s, p, o, m) # define BOOST_PP_FOR_154(s, p, o, m) BOOST_PP_FOR_154_C(BOOST_PP_BOOL(p(155, s)), s, p, o, m) # define BOOST_PP_FOR_155(s, p, o, m) BOOST_PP_FOR_155_C(BOOST_PP_BOOL(p(156, s)), s, p, o, m) # define BOOST_PP_FOR_156(s, p, o, m) BOOST_PP_FOR_156_C(BOOST_PP_BOOL(p(157, s)), s, p, o, m) # define BOOST_PP_FOR_157(s, p, o, m) BOOST_PP_FOR_157_C(BOOST_PP_BOOL(p(158, s)), s, p, o, m) # define BOOST_PP_FOR_158(s, p, o, m) BOOST_PP_FOR_158_C(BOOST_PP_BOOL(p(159, s)), s, p, o, m) # define BOOST_PP_FOR_159(s, p, o, m) BOOST_PP_FOR_159_C(BOOST_PP_BOOL(p(160, s)), s, p, o, m) # define BOOST_PP_FOR_160(s, p, o, m) BOOST_PP_FOR_160_C(BOOST_PP_BOOL(p(161, s)), s, p, o, m) # define BOOST_PP_FOR_161(s, p, o, m) BOOST_PP_FOR_161_C(BOOST_PP_BOOL(p(162, s)), s, p, o, m) # define BOOST_PP_FOR_162(s, p, o, m) BOOST_PP_FOR_162_C(BOOST_PP_BOOL(p(163, s)), s, p, o, m) # define BOOST_PP_FOR_163(s, p, o, m) BOOST_PP_FOR_163_C(BOOST_PP_BOOL(p(164, s)), s, p, o, m) # define BOOST_PP_FOR_164(s, p, o, m) BOOST_PP_FOR_164_C(BOOST_PP_BOOL(p(165, s)), s, p, o, m) # define BOOST_PP_FOR_165(s, p, o, m) BOOST_PP_FOR_165_C(BOOST_PP_BOOL(p(166, s)), s, p, o, m) # define BOOST_PP_FOR_166(s, p, o, m) BOOST_PP_FOR_166_C(BOOST_PP_BOOL(p(167, s)), s, p, o, m) # define BOOST_PP_FOR_167(s, p, o, m) BOOST_PP_FOR_167_C(BOOST_PP_BOOL(p(168, s)), s, p, o, m) # define BOOST_PP_FOR_168(s, p, o, m) BOOST_PP_FOR_168_C(BOOST_PP_BOOL(p(169, s)), s, p, o, m) # define BOOST_PP_FOR_169(s, p, o, m) BOOST_PP_FOR_169_C(BOOST_PP_BOOL(p(170, s)), s, p, o, m) # define BOOST_PP_FOR_170(s, p, o, m) BOOST_PP_FOR_170_C(BOOST_PP_BOOL(p(171, s)), s, p, o, m) # define BOOST_PP_FOR_171(s, p, o, m) BOOST_PP_FOR_171_C(BOOST_PP_BOOL(p(172, s)), s, p, o, m) # define BOOST_PP_FOR_172(s, p, o, m) BOOST_PP_FOR_172_C(BOOST_PP_BOOL(p(173, s)), s, p, o, m) # define BOOST_PP_FOR_173(s, p, o, m) BOOST_PP_FOR_173_C(BOOST_PP_BOOL(p(174, s)), s, p, o, m) # define BOOST_PP_FOR_174(s, p, o, m) BOOST_PP_FOR_174_C(BOOST_PP_BOOL(p(175, s)), s, p, o, m) # define BOOST_PP_FOR_175(s, p, o, m) BOOST_PP_FOR_175_C(BOOST_PP_BOOL(p(176, s)), s, p, o, m) # define BOOST_PP_FOR_176(s, p, o, m) BOOST_PP_FOR_176_C(BOOST_PP_BOOL(p(177, s)), s, p, o, m) # define BOOST_PP_FOR_177(s, p, o, m) BOOST_PP_FOR_177_C(BOOST_PP_BOOL(p(178, s)), s, p, o, m) # define BOOST_PP_FOR_178(s, p, o, m) BOOST_PP_FOR_178_C(BOOST_PP_BOOL(p(179, s)), s, p, o, m) # define BOOST_PP_FOR_179(s, p, o, m) BOOST_PP_FOR_179_C(BOOST_PP_BOOL(p(180, s)), s, p, o, m) # define BOOST_PP_FOR_180(s, p, o, m) BOOST_PP_FOR_180_C(BOOST_PP_BOOL(p(181, s)), s, p, o, m) # define BOOST_PP_FOR_181(s, p, o, m) BOOST_PP_FOR_181_C(BOOST_PP_BOOL(p(182, s)), s, p, o, m) # define BOOST_PP_FOR_182(s, p, o, m) BOOST_PP_FOR_182_C(BOOST_PP_BOOL(p(183, s)), s, p, o, m) # define BOOST_PP_FOR_183(s, p, o, m) BOOST_PP_FOR_183_C(BOOST_PP_BOOL(p(184, s)), s, p, o, m) # define BOOST_PP_FOR_184(s, p, o, m) BOOST_PP_FOR_184_C(BOOST_PP_BOOL(p(185, s)), s, p, o, m) # define BOOST_PP_FOR_185(s, p, o, m) BOOST_PP_FOR_185_C(BOOST_PP_BOOL(p(186, s)), s, p, o, m) # define BOOST_PP_FOR_186(s, p, o, m) BOOST_PP_FOR_186_C(BOOST_PP_BOOL(p(187, s)), s, p, o, m) # define BOOST_PP_FOR_187(s, p, o, m) BOOST_PP_FOR_187_C(BOOST_PP_BOOL(p(188, s)), s, p, o, m) # define BOOST_PP_FOR_188(s, p, o, m) BOOST_PP_FOR_188_C(BOOST_PP_BOOL(p(189, s)), s, p, o, m) # define BOOST_PP_FOR_189(s, p, o, m) BOOST_PP_FOR_189_C(BOOST_PP_BOOL(p(190, s)), s, p, o, m) # define BOOST_PP_FOR_190(s, p, o, m) BOOST_PP_FOR_190_C(BOOST_PP_BOOL(p(191, s)), s, p, o, m) # define BOOST_PP_FOR_191(s, p, o, m) BOOST_PP_FOR_191_C(BOOST_PP_BOOL(p(192, s)), s, p, o, m) # define BOOST_PP_FOR_192(s, p, o, m) BOOST_PP_FOR_192_C(BOOST_PP_BOOL(p(193, s)), s, p, o, m) # define BOOST_PP_FOR_193(s, p, o, m) BOOST_PP_FOR_193_C(BOOST_PP_BOOL(p(194, s)), s, p, o, m) # define BOOST_PP_FOR_194(s, p, o, m) BOOST_PP_FOR_194_C(BOOST_PP_BOOL(p(195, s)), s, p, o, m) # define BOOST_PP_FOR_195(s, p, o, m) BOOST_PP_FOR_195_C(BOOST_PP_BOOL(p(196, s)), s, p, o, m) # define BOOST_PP_FOR_196(s, p, o, m) BOOST_PP_FOR_196_C(BOOST_PP_BOOL(p(197, s)), s, p, o, m) # define BOOST_PP_FOR_197(s, p, o, m) BOOST_PP_FOR_197_C(BOOST_PP_BOOL(p(198, s)), s, p, o, m) # define BOOST_PP_FOR_198(s, p, o, m) BOOST_PP_FOR_198_C(BOOST_PP_BOOL(p(199, s)), s, p, o, m) # define BOOST_PP_FOR_199(s, p, o, m) BOOST_PP_FOR_199_C(BOOST_PP_BOOL(p(200, s)), s, p, o, m) # define BOOST_PP_FOR_200(s, p, o, m) BOOST_PP_FOR_200_C(BOOST_PP_BOOL(p(201, s)), s, p, o, m) # define BOOST_PP_FOR_201(s, p, o, m) BOOST_PP_FOR_201_C(BOOST_PP_BOOL(p(202, s)), s, p, o, m) # define BOOST_PP_FOR_202(s, p, o, m) BOOST_PP_FOR_202_C(BOOST_PP_BOOL(p(203, s)), s, p, o, m) # define BOOST_PP_FOR_203(s, p, o, m) BOOST_PP_FOR_203_C(BOOST_PP_BOOL(p(204, s)), s, p, o, m) # define BOOST_PP_FOR_204(s, p, o, m) BOOST_PP_FOR_204_C(BOOST_PP_BOOL(p(205, s)), s, p, o, m) # define BOOST_PP_FOR_205(s, p, o, m) BOOST_PP_FOR_205_C(BOOST_PP_BOOL(p(206, s)), s, p, o, m) # define BOOST_PP_FOR_206(s, p, o, m) BOOST_PP_FOR_206_C(BOOST_PP_BOOL(p(207, s)), s, p, o, m) # define BOOST_PP_FOR_207(s, p, o, m) BOOST_PP_FOR_207_C(BOOST_PP_BOOL(p(208, s)), s, p, o, m) # define BOOST_PP_FOR_208(s, p, o, m) BOOST_PP_FOR_208_C(BOOST_PP_BOOL(p(209, s)), s, p, o, m) # define BOOST_PP_FOR_209(s, p, o, m) BOOST_PP_FOR_209_C(BOOST_PP_BOOL(p(210, s)), s, p, o, m) # define BOOST_PP_FOR_210(s, p, o, m) BOOST_PP_FOR_210_C(BOOST_PP_BOOL(p(211, s)), s, p, o, m) # define BOOST_PP_FOR_211(s, p, o, m) BOOST_PP_FOR_211_C(BOOST_PP_BOOL(p(212, s)), s, p, o, m) # define BOOST_PP_FOR_212(s, p, o, m) BOOST_PP_FOR_212_C(BOOST_PP_BOOL(p(213, s)), s, p, o, m) # define BOOST_PP_FOR_213(s, p, o, m) BOOST_PP_FOR_213_C(BOOST_PP_BOOL(p(214, s)), s, p, o, m) # define BOOST_PP_FOR_214(s, p, o, m) BOOST_PP_FOR_214_C(BOOST_PP_BOOL(p(215, s)), s, p, o, m) # define BOOST_PP_FOR_215(s, p, o, m) BOOST_PP_FOR_215_C(BOOST_PP_BOOL(p(216, s)), s, p, o, m) # define BOOST_PP_FOR_216(s, p, o, m) BOOST_PP_FOR_216_C(BOOST_PP_BOOL(p(217, s)), s, p, o, m) # define BOOST_PP_FOR_217(s, p, o, m) BOOST_PP_FOR_217_C(BOOST_PP_BOOL(p(218, s)), s, p, o, m) # define BOOST_PP_FOR_218(s, p, o, m) BOOST_PP_FOR_218_C(BOOST_PP_BOOL(p(219, s)), s, p, o, m) # define BOOST_PP_FOR_219(s, p, o, m) BOOST_PP_FOR_219_C(BOOST_PP_BOOL(p(220, s)), s, p, o, m) # define BOOST_PP_FOR_220(s, p, o, m) BOOST_PP_FOR_220_C(BOOST_PP_BOOL(p(221, s)), s, p, o, m) # define BOOST_PP_FOR_221(s, p, o, m) BOOST_PP_FOR_221_C(BOOST_PP_BOOL(p(222, s)), s, p, o, m) # define BOOST_PP_FOR_222(s, p, o, m) BOOST_PP_FOR_222_C(BOOST_PP_BOOL(p(223, s)), s, p, o, m) # define BOOST_PP_FOR_223(s, p, o, m) BOOST_PP_FOR_223_C(BOOST_PP_BOOL(p(224, s)), s, p, o, m) # define BOOST_PP_FOR_224(s, p, o, m) BOOST_PP_FOR_224_C(BOOST_PP_BOOL(p(225, s)), s, p, o, m) # define BOOST_PP_FOR_225(s, p, o, m) BOOST_PP_FOR_225_C(BOOST_PP_BOOL(p(226, s)), s, p, o, m) # define BOOST_PP_FOR_226(s, p, o, m) BOOST_PP_FOR_226_C(BOOST_PP_BOOL(p(227, s)), s, p, o, m) # define BOOST_PP_FOR_227(s, p, o, m) BOOST_PP_FOR_227_C(BOOST_PP_BOOL(p(228, s)), s, p, o, m) # define BOOST_PP_FOR_228(s, p, o, m) BOOST_PP_FOR_228_C(BOOST_PP_BOOL(p(229, s)), s, p, o, m) # define BOOST_PP_FOR_229(s, p, o, m) BOOST_PP_FOR_229_C(BOOST_PP_BOOL(p(230, s)), s, p, o, m) # define BOOST_PP_FOR_230(s, p, o, m) BOOST_PP_FOR_230_C(BOOST_PP_BOOL(p(231, s)), s, p, o, m) # define BOOST_PP_FOR_231(s, p, o, m) BOOST_PP_FOR_231_C(BOOST_PP_BOOL(p(232, s)), s, p, o, m) # define BOOST_PP_FOR_232(s, p, o, m) BOOST_PP_FOR_232_C(BOOST_PP_BOOL(p(233, s)), s, p, o, m) # define BOOST_PP_FOR_233(s, p, o, m) BOOST_PP_FOR_233_C(BOOST_PP_BOOL(p(234, s)), s, p, o, m) # define BOOST_PP_FOR_234(s, p, o, m) BOOST_PP_FOR_234_C(BOOST_PP_BOOL(p(235, s)), s, p, o, m) # define BOOST_PP_FOR_235(s, p, o, m) BOOST_PP_FOR_235_C(BOOST_PP_BOOL(p(236, s)), s, p, o, m) # define BOOST_PP_FOR_236(s, p, o, m) BOOST_PP_FOR_236_C(BOOST_PP_BOOL(p(237, s)), s, p, o, m) # define BOOST_PP_FOR_237(s, p, o, m) BOOST_PP_FOR_237_C(BOOST_PP_BOOL(p(238, s)), s, p, o, m) # define BOOST_PP_FOR_238(s, p, o, m) BOOST_PP_FOR_238_C(BOOST_PP_BOOL(p(239, s)), s, p, o, m) # define BOOST_PP_FOR_239(s, p, o, m) BOOST_PP_FOR_239_C(BOOST_PP_BOOL(p(240, s)), s, p, o, m) # define BOOST_PP_FOR_240(s, p, o, m) BOOST_PP_FOR_240_C(BOOST_PP_BOOL(p(241, s)), s, p, o, m) # define BOOST_PP_FOR_241(s, p, o, m) BOOST_PP_FOR_241_C(BOOST_PP_BOOL(p(242, s)), s, p, o, m) # define BOOST_PP_FOR_242(s, p, o, m) BOOST_PP_FOR_242_C(BOOST_PP_BOOL(p(243, s)), s, p, o, m) # define BOOST_PP_FOR_243(s, p, o, m) BOOST_PP_FOR_243_C(BOOST_PP_BOOL(p(244, s)), s, p, o, m) # define BOOST_PP_FOR_244(s, p, o, m) BOOST_PP_FOR_244_C(BOOST_PP_BOOL(p(245, s)), s, p, o, m) # define BOOST_PP_FOR_245(s, p, o, m) BOOST_PP_FOR_245_C(BOOST_PP_BOOL(p(246, s)), s, p, o, m) # define BOOST_PP_FOR_246(s, p, o, m) BOOST_PP_FOR_246_C(BOOST_PP_BOOL(p(247, s)), s, p, o, m) # define BOOST_PP_FOR_247(s, p, o, m) BOOST_PP_FOR_247_C(BOOST_PP_BOOL(p(248, s)), s, p, o, m) # define BOOST_PP_FOR_248(s, p, o, m) BOOST_PP_FOR_248_C(BOOST_PP_BOOL(p(249, s)), s, p, o, m) # define BOOST_PP_FOR_249(s, p, o, m) BOOST_PP_FOR_249_C(BOOST_PP_BOOL(p(250, s)), s, p, o, m) # define BOOST_PP_FOR_250(s, p, o, m) BOOST_PP_FOR_250_C(BOOST_PP_BOOL(p(251, s)), s, p, o, m) # define BOOST_PP_FOR_251(s, p, o, m) BOOST_PP_FOR_251_C(BOOST_PP_BOOL(p(252, s)), s, p, o, m) # define BOOST_PP_FOR_252(s, p, o, m) BOOST_PP_FOR_252_C(BOOST_PP_BOOL(p(253, s)), s, p, o, m) # define BOOST_PP_FOR_253(s, p, o, m) BOOST_PP_FOR_253_C(BOOST_PP_BOOL(p(254, s)), s, p, o, m) # define BOOST_PP_FOR_254(s, p, o, m) BOOST_PP_FOR_254_C(BOOST_PP_BOOL(p(255, s)), s, p, o, m) # define BOOST_PP_FOR_255(s, p, o, m) BOOST_PP_FOR_255_C(BOOST_PP_BOOL(p(256, s)), s, p, o, m) # define BOOST_PP_FOR_256(s, p, o, m) BOOST_PP_FOR_256_C(BOOST_PP_BOOL(p(257, s)), s, p, o, m) # # define BOOST_PP_FOR_1_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(2, s) BOOST_PP_IIF(c, BOOST_PP_FOR_2, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(2, s), p, o, m) # define BOOST_PP_FOR_2_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(3, s) BOOST_PP_IIF(c, BOOST_PP_FOR_3, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(3, s), p, o, m) # define BOOST_PP_FOR_3_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(4, s) BOOST_PP_IIF(c, BOOST_PP_FOR_4, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(4, s), p, o, m) # define BOOST_PP_FOR_4_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(5, s) BOOST_PP_IIF(c, BOOST_PP_FOR_5, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(5, s), p, o, m) # define BOOST_PP_FOR_5_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(6, s) BOOST_PP_IIF(c, BOOST_PP_FOR_6, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(6, s), p, o, m) # define BOOST_PP_FOR_6_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(7, s) BOOST_PP_IIF(c, BOOST_PP_FOR_7, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(7, s), p, o, m) # define BOOST_PP_FOR_7_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(8, s) BOOST_PP_IIF(c, BOOST_PP_FOR_8, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(8, s), p, o, m) # define BOOST_PP_FOR_8_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(9, s) BOOST_PP_IIF(c, BOOST_PP_FOR_9, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(9, s), p, o, m) # define BOOST_PP_FOR_9_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(10, s) BOOST_PP_IIF(c, BOOST_PP_FOR_10, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(10, s), p, o, m) # define BOOST_PP_FOR_10_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(11, s) BOOST_PP_IIF(c, BOOST_PP_FOR_11, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(11, s), p, o, m) # define BOOST_PP_FOR_11_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(12, s) BOOST_PP_IIF(c, BOOST_PP_FOR_12, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(12, s), p, o, m) # define BOOST_PP_FOR_12_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(13, s) BOOST_PP_IIF(c, BOOST_PP_FOR_13, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(13, s), p, o, m) # define BOOST_PP_FOR_13_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(14, s) BOOST_PP_IIF(c, BOOST_PP_FOR_14, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(14, s), p, o, m) # define BOOST_PP_FOR_14_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(15, s) BOOST_PP_IIF(c, BOOST_PP_FOR_15, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(15, s), p, o, m) # define BOOST_PP_FOR_15_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(16, s) BOOST_PP_IIF(c, BOOST_PP_FOR_16, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(16, s), p, o, m) # define BOOST_PP_FOR_16_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(17, s) BOOST_PP_IIF(c, BOOST_PP_FOR_17, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(17, s), p, o, m) # define BOOST_PP_FOR_17_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(18, s) BOOST_PP_IIF(c, BOOST_PP_FOR_18, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(18, s), p, o, m) # define BOOST_PP_FOR_18_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(19, s) BOOST_PP_IIF(c, BOOST_PP_FOR_19, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(19, s), p, o, m) # define BOOST_PP_FOR_19_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(20, s) BOOST_PP_IIF(c, BOOST_PP_FOR_20, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(20, s), p, o, m) # define BOOST_PP_FOR_20_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(21, s) BOOST_PP_IIF(c, BOOST_PP_FOR_21, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(21, s), p, o, m) # define BOOST_PP_FOR_21_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(22, s) BOOST_PP_IIF(c, BOOST_PP_FOR_22, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(22, s), p, o, m) # define BOOST_PP_FOR_22_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(23, s) BOOST_PP_IIF(c, BOOST_PP_FOR_23, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(23, s), p, o, m) # define BOOST_PP_FOR_23_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(24, s) BOOST_PP_IIF(c, BOOST_PP_FOR_24, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(24, s), p, o, m) # define BOOST_PP_FOR_24_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(25, s) BOOST_PP_IIF(c, BOOST_PP_FOR_25, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(25, s), p, o, m) # define BOOST_PP_FOR_25_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(26, s) BOOST_PP_IIF(c, BOOST_PP_FOR_26, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(26, s), p, o, m) # define BOOST_PP_FOR_26_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(27, s) BOOST_PP_IIF(c, BOOST_PP_FOR_27, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(27, s), p, o, m) # define BOOST_PP_FOR_27_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(28, s) BOOST_PP_IIF(c, BOOST_PP_FOR_28, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(28, s), p, o, m) # define BOOST_PP_FOR_28_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(29, s) BOOST_PP_IIF(c, BOOST_PP_FOR_29, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(29, s), p, o, m) # define BOOST_PP_FOR_29_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(30, s) BOOST_PP_IIF(c, BOOST_PP_FOR_30, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(30, s), p, o, m) # define BOOST_PP_FOR_30_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(31, s) BOOST_PP_IIF(c, BOOST_PP_FOR_31, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(31, s), p, o, m) # define BOOST_PP_FOR_31_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(32, s) BOOST_PP_IIF(c, BOOST_PP_FOR_32, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(32, s), p, o, m) # define BOOST_PP_FOR_32_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(33, s) BOOST_PP_IIF(c, BOOST_PP_FOR_33, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(33, s), p, o, m) # define BOOST_PP_FOR_33_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(34, s) BOOST_PP_IIF(c, BOOST_PP_FOR_34, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(34, s), p, o, m) # define BOOST_PP_FOR_34_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(35, s) BOOST_PP_IIF(c, BOOST_PP_FOR_35, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(35, s), p, o, m) # define BOOST_PP_FOR_35_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(36, s) BOOST_PP_IIF(c, BOOST_PP_FOR_36, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(36, s), p, o, m) # define BOOST_PP_FOR_36_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(37, s) BOOST_PP_IIF(c, BOOST_PP_FOR_37, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(37, s), p, o, m) # define BOOST_PP_FOR_37_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(38, s) BOOST_PP_IIF(c, BOOST_PP_FOR_38, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(38, s), p, o, m) # define BOOST_PP_FOR_38_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(39, s) BOOST_PP_IIF(c, BOOST_PP_FOR_39, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(39, s), p, o, m) # define BOOST_PP_FOR_39_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(40, s) BOOST_PP_IIF(c, BOOST_PP_FOR_40, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(40, s), p, o, m) # define BOOST_PP_FOR_40_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(41, s) BOOST_PP_IIF(c, BOOST_PP_FOR_41, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(41, s), p, o, m) # define BOOST_PP_FOR_41_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(42, s) BOOST_PP_IIF(c, BOOST_PP_FOR_42, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(42, s), p, o, m) # define BOOST_PP_FOR_42_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(43, s) BOOST_PP_IIF(c, BOOST_PP_FOR_43, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(43, s), p, o, m) # define BOOST_PP_FOR_43_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(44, s) BOOST_PP_IIF(c, BOOST_PP_FOR_44, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(44, s), p, o, m) # define BOOST_PP_FOR_44_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(45, s) BOOST_PP_IIF(c, BOOST_PP_FOR_45, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(45, s), p, o, m) # define BOOST_PP_FOR_45_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(46, s) BOOST_PP_IIF(c, BOOST_PP_FOR_46, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(46, s), p, o, m) # define BOOST_PP_FOR_46_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(47, s) BOOST_PP_IIF(c, BOOST_PP_FOR_47, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(47, s), p, o, m) # define BOOST_PP_FOR_47_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(48, s) BOOST_PP_IIF(c, BOOST_PP_FOR_48, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(48, s), p, o, m) # define BOOST_PP_FOR_48_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(49, s) BOOST_PP_IIF(c, BOOST_PP_FOR_49, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(49, s), p, o, m) # define BOOST_PP_FOR_49_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(50, s) BOOST_PP_IIF(c, BOOST_PP_FOR_50, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(50, s), p, o, m) # define BOOST_PP_FOR_50_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(51, s) BOOST_PP_IIF(c, BOOST_PP_FOR_51, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(51, s), p, o, m) # define BOOST_PP_FOR_51_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(52, s) BOOST_PP_IIF(c, BOOST_PP_FOR_52, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(52, s), p, o, m) # define BOOST_PP_FOR_52_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(53, s) BOOST_PP_IIF(c, BOOST_PP_FOR_53, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(53, s), p, o, m) # define BOOST_PP_FOR_53_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(54, s) BOOST_PP_IIF(c, BOOST_PP_FOR_54, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(54, s), p, o, m) # define BOOST_PP_FOR_54_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(55, s) BOOST_PP_IIF(c, BOOST_PP_FOR_55, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(55, s), p, o, m) # define BOOST_PP_FOR_55_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(56, s) BOOST_PP_IIF(c, BOOST_PP_FOR_56, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(56, s), p, o, m) # define BOOST_PP_FOR_56_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(57, s) BOOST_PP_IIF(c, BOOST_PP_FOR_57, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(57, s), p, o, m) # define BOOST_PP_FOR_57_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(58, s) BOOST_PP_IIF(c, BOOST_PP_FOR_58, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(58, s), p, o, m) # define BOOST_PP_FOR_58_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(59, s) BOOST_PP_IIF(c, BOOST_PP_FOR_59, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(59, s), p, o, m) # define BOOST_PP_FOR_59_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(60, s) BOOST_PP_IIF(c, BOOST_PP_FOR_60, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(60, s), p, o, m) # define BOOST_PP_FOR_60_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(61, s) BOOST_PP_IIF(c, BOOST_PP_FOR_61, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(61, s), p, o, m) # define BOOST_PP_FOR_61_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(62, s) BOOST_PP_IIF(c, BOOST_PP_FOR_62, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(62, s), p, o, m) # define BOOST_PP_FOR_62_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(63, s) BOOST_PP_IIF(c, BOOST_PP_FOR_63, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(63, s), p, o, m) # define BOOST_PP_FOR_63_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(64, s) BOOST_PP_IIF(c, BOOST_PP_FOR_64, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(64, s), p, o, m) # define BOOST_PP_FOR_64_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(65, s) BOOST_PP_IIF(c, BOOST_PP_FOR_65, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(65, s), p, o, m) # define BOOST_PP_FOR_65_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(66, s) BOOST_PP_IIF(c, BOOST_PP_FOR_66, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(66, s), p, o, m) # define BOOST_PP_FOR_66_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(67, s) BOOST_PP_IIF(c, BOOST_PP_FOR_67, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(67, s), p, o, m) # define BOOST_PP_FOR_67_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(68, s) BOOST_PP_IIF(c, BOOST_PP_FOR_68, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(68, s), p, o, m) # define BOOST_PP_FOR_68_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(69, s) BOOST_PP_IIF(c, BOOST_PP_FOR_69, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(69, s), p, o, m) # define BOOST_PP_FOR_69_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(70, s) BOOST_PP_IIF(c, BOOST_PP_FOR_70, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(70, s), p, o, m) # define BOOST_PP_FOR_70_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(71, s) BOOST_PP_IIF(c, BOOST_PP_FOR_71, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(71, s), p, o, m) # define BOOST_PP_FOR_71_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(72, s) BOOST_PP_IIF(c, BOOST_PP_FOR_72, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(72, s), p, o, m) # define BOOST_PP_FOR_72_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(73, s) BOOST_PP_IIF(c, BOOST_PP_FOR_73, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(73, s), p, o, m) # define BOOST_PP_FOR_73_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(74, s) BOOST_PP_IIF(c, BOOST_PP_FOR_74, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(74, s), p, o, m) # define BOOST_PP_FOR_74_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(75, s) BOOST_PP_IIF(c, BOOST_PP_FOR_75, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(75, s), p, o, m) # define BOOST_PP_FOR_75_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(76, s) BOOST_PP_IIF(c, BOOST_PP_FOR_76, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(76, s), p, o, m) # define BOOST_PP_FOR_76_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(77, s) BOOST_PP_IIF(c, BOOST_PP_FOR_77, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(77, s), p, o, m) # define BOOST_PP_FOR_77_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(78, s) BOOST_PP_IIF(c, BOOST_PP_FOR_78, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(78, s), p, o, m) # define BOOST_PP_FOR_78_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(79, s) BOOST_PP_IIF(c, BOOST_PP_FOR_79, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(79, s), p, o, m) # define BOOST_PP_FOR_79_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(80, s) BOOST_PP_IIF(c, BOOST_PP_FOR_80, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(80, s), p, o, m) # define BOOST_PP_FOR_80_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(81, s) BOOST_PP_IIF(c, BOOST_PP_FOR_81, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(81, s), p, o, m) # define BOOST_PP_FOR_81_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(82, s) BOOST_PP_IIF(c, BOOST_PP_FOR_82, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(82, s), p, o, m) # define BOOST_PP_FOR_82_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(83, s) BOOST_PP_IIF(c, BOOST_PP_FOR_83, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(83, s), p, o, m) # define BOOST_PP_FOR_83_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(84, s) BOOST_PP_IIF(c, BOOST_PP_FOR_84, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(84, s), p, o, m) # define BOOST_PP_FOR_84_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(85, s) BOOST_PP_IIF(c, BOOST_PP_FOR_85, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(85, s), p, o, m) # define BOOST_PP_FOR_85_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(86, s) BOOST_PP_IIF(c, BOOST_PP_FOR_86, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(86, s), p, o, m) # define BOOST_PP_FOR_86_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(87, s) BOOST_PP_IIF(c, BOOST_PP_FOR_87, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(87, s), p, o, m) # define BOOST_PP_FOR_87_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(88, s) BOOST_PP_IIF(c, BOOST_PP_FOR_88, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(88, s), p, o, m) # define BOOST_PP_FOR_88_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(89, s) BOOST_PP_IIF(c, BOOST_PP_FOR_89, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(89, s), p, o, m) # define BOOST_PP_FOR_89_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(90, s) BOOST_PP_IIF(c, BOOST_PP_FOR_90, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(90, s), p, o, m) # define BOOST_PP_FOR_90_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(91, s) BOOST_PP_IIF(c, BOOST_PP_FOR_91, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(91, s), p, o, m) # define BOOST_PP_FOR_91_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(92, s) BOOST_PP_IIF(c, BOOST_PP_FOR_92, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(92, s), p, o, m) # define BOOST_PP_FOR_92_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(93, s) BOOST_PP_IIF(c, BOOST_PP_FOR_93, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(93, s), p, o, m) # define BOOST_PP_FOR_93_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(94, s) BOOST_PP_IIF(c, BOOST_PP_FOR_94, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(94, s), p, o, m) # define BOOST_PP_FOR_94_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(95, s) BOOST_PP_IIF(c, BOOST_PP_FOR_95, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(95, s), p, o, m) # define BOOST_PP_FOR_95_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(96, s) BOOST_PP_IIF(c, BOOST_PP_FOR_96, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(96, s), p, o, m) # define BOOST_PP_FOR_96_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(97, s) BOOST_PP_IIF(c, BOOST_PP_FOR_97, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(97, s), p, o, m) # define BOOST_PP_FOR_97_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(98, s) BOOST_PP_IIF(c, BOOST_PP_FOR_98, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(98, s), p, o, m) # define BOOST_PP_FOR_98_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(99, s) BOOST_PP_IIF(c, BOOST_PP_FOR_99, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(99, s), p, o, m) # define BOOST_PP_FOR_99_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(100, s) BOOST_PP_IIF(c, BOOST_PP_FOR_100, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(100, s), p, o, m) # define BOOST_PP_FOR_100_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(101, s) BOOST_PP_IIF(c, BOOST_PP_FOR_101, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(101, s), p, o, m) # define BOOST_PP_FOR_101_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(102, s) BOOST_PP_IIF(c, BOOST_PP_FOR_102, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(102, s), p, o, m) # define BOOST_PP_FOR_102_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(103, s) BOOST_PP_IIF(c, BOOST_PP_FOR_103, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(103, s), p, o, m) # define BOOST_PP_FOR_103_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(104, s) BOOST_PP_IIF(c, BOOST_PP_FOR_104, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(104, s), p, o, m) # define BOOST_PP_FOR_104_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(105, s) BOOST_PP_IIF(c, BOOST_PP_FOR_105, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(105, s), p, o, m) # define BOOST_PP_FOR_105_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(106, s) BOOST_PP_IIF(c, BOOST_PP_FOR_106, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(106, s), p, o, m) # define BOOST_PP_FOR_106_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(107, s) BOOST_PP_IIF(c, BOOST_PP_FOR_107, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(107, s), p, o, m) # define BOOST_PP_FOR_107_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(108, s) BOOST_PP_IIF(c, BOOST_PP_FOR_108, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(108, s), p, o, m) # define BOOST_PP_FOR_108_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(109, s) BOOST_PP_IIF(c, BOOST_PP_FOR_109, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(109, s), p, o, m) # define BOOST_PP_FOR_109_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(110, s) BOOST_PP_IIF(c, BOOST_PP_FOR_110, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(110, s), p, o, m) # define BOOST_PP_FOR_110_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(111, s) BOOST_PP_IIF(c, BOOST_PP_FOR_111, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(111, s), p, o, m) # define BOOST_PP_FOR_111_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(112, s) BOOST_PP_IIF(c, BOOST_PP_FOR_112, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(112, s), p, o, m) # define BOOST_PP_FOR_112_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(113, s) BOOST_PP_IIF(c, BOOST_PP_FOR_113, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(113, s), p, o, m) # define BOOST_PP_FOR_113_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(114, s) BOOST_PP_IIF(c, BOOST_PP_FOR_114, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(114, s), p, o, m) # define BOOST_PP_FOR_114_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(115, s) BOOST_PP_IIF(c, BOOST_PP_FOR_115, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(115, s), p, o, m) # define BOOST_PP_FOR_115_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(116, s) BOOST_PP_IIF(c, BOOST_PP_FOR_116, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(116, s), p, o, m) # define BOOST_PP_FOR_116_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(117, s) BOOST_PP_IIF(c, BOOST_PP_FOR_117, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(117, s), p, o, m) # define BOOST_PP_FOR_117_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(118, s) BOOST_PP_IIF(c, BOOST_PP_FOR_118, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(118, s), p, o, m) # define BOOST_PP_FOR_118_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(119, s) BOOST_PP_IIF(c, BOOST_PP_FOR_119, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(119, s), p, o, m) # define BOOST_PP_FOR_119_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(120, s) BOOST_PP_IIF(c, BOOST_PP_FOR_120, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(120, s), p, o, m) # define BOOST_PP_FOR_120_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(121, s) BOOST_PP_IIF(c, BOOST_PP_FOR_121, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(121, s), p, o, m) # define BOOST_PP_FOR_121_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(122, s) BOOST_PP_IIF(c, BOOST_PP_FOR_122, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(122, s), p, o, m) # define BOOST_PP_FOR_122_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(123, s) BOOST_PP_IIF(c, BOOST_PP_FOR_123, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(123, s), p, o, m) # define BOOST_PP_FOR_123_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(124, s) BOOST_PP_IIF(c, BOOST_PP_FOR_124, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(124, s), p, o, m) # define BOOST_PP_FOR_124_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(125, s) BOOST_PP_IIF(c, BOOST_PP_FOR_125, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(125, s), p, o, m) # define BOOST_PP_FOR_125_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(126, s) BOOST_PP_IIF(c, BOOST_PP_FOR_126, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(126, s), p, o, m) # define BOOST_PP_FOR_126_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(127, s) BOOST_PP_IIF(c, BOOST_PP_FOR_127, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(127, s), p, o, m) # define BOOST_PP_FOR_127_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(128, s) BOOST_PP_IIF(c, BOOST_PP_FOR_128, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(128, s), p, o, m) # define BOOST_PP_FOR_128_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(129, s) BOOST_PP_IIF(c, BOOST_PP_FOR_129, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(129, s), p, o, m) # define BOOST_PP_FOR_129_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(130, s) BOOST_PP_IIF(c, BOOST_PP_FOR_130, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(130, s), p, o, m) # define BOOST_PP_FOR_130_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(131, s) BOOST_PP_IIF(c, BOOST_PP_FOR_131, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(131, s), p, o, m) # define BOOST_PP_FOR_131_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(132, s) BOOST_PP_IIF(c, BOOST_PP_FOR_132, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(132, s), p, o, m) # define BOOST_PP_FOR_132_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(133, s) BOOST_PP_IIF(c, BOOST_PP_FOR_133, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(133, s), p, o, m) # define BOOST_PP_FOR_133_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(134, s) BOOST_PP_IIF(c, BOOST_PP_FOR_134, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(134, s), p, o, m) # define BOOST_PP_FOR_134_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(135, s) BOOST_PP_IIF(c, BOOST_PP_FOR_135, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(135, s), p, o, m) # define BOOST_PP_FOR_135_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(136, s) BOOST_PP_IIF(c, BOOST_PP_FOR_136, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(136, s), p, o, m) # define BOOST_PP_FOR_136_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(137, s) BOOST_PP_IIF(c, BOOST_PP_FOR_137, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(137, s), p, o, m) # define BOOST_PP_FOR_137_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(138, s) BOOST_PP_IIF(c, BOOST_PP_FOR_138, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(138, s), p, o, m) # define BOOST_PP_FOR_138_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(139, s) BOOST_PP_IIF(c, BOOST_PP_FOR_139, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(139, s), p, o, m) # define BOOST_PP_FOR_139_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(140, s) BOOST_PP_IIF(c, BOOST_PP_FOR_140, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(140, s), p, o, m) # define BOOST_PP_FOR_140_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(141, s) BOOST_PP_IIF(c, BOOST_PP_FOR_141, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(141, s), p, o, m) # define BOOST_PP_FOR_141_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(142, s) BOOST_PP_IIF(c, BOOST_PP_FOR_142, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(142, s), p, o, m) # define BOOST_PP_FOR_142_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(143, s) BOOST_PP_IIF(c, BOOST_PP_FOR_143, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(143, s), p, o, m) # define BOOST_PP_FOR_143_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(144, s) BOOST_PP_IIF(c, BOOST_PP_FOR_144, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(144, s), p, o, m) # define BOOST_PP_FOR_144_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(145, s) BOOST_PP_IIF(c, BOOST_PP_FOR_145, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(145, s), p, o, m) # define BOOST_PP_FOR_145_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(146, s) BOOST_PP_IIF(c, BOOST_PP_FOR_146, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(146, s), p, o, m) # define BOOST_PP_FOR_146_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(147, s) BOOST_PP_IIF(c, BOOST_PP_FOR_147, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(147, s), p, o, m) # define BOOST_PP_FOR_147_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(148, s) BOOST_PP_IIF(c, BOOST_PP_FOR_148, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(148, s), p, o, m) # define BOOST_PP_FOR_148_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(149, s) BOOST_PP_IIF(c, BOOST_PP_FOR_149, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(149, s), p, o, m) # define BOOST_PP_FOR_149_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(150, s) BOOST_PP_IIF(c, BOOST_PP_FOR_150, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(150, s), p, o, m) # define BOOST_PP_FOR_150_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(151, s) BOOST_PP_IIF(c, BOOST_PP_FOR_151, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(151, s), p, o, m) # define BOOST_PP_FOR_151_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(152, s) BOOST_PP_IIF(c, BOOST_PP_FOR_152, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(152, s), p, o, m) # define BOOST_PP_FOR_152_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(153, s) BOOST_PP_IIF(c, BOOST_PP_FOR_153, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(153, s), p, o, m) # define BOOST_PP_FOR_153_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(154, s) BOOST_PP_IIF(c, BOOST_PP_FOR_154, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(154, s), p, o, m) # define BOOST_PP_FOR_154_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(155, s) BOOST_PP_IIF(c, BOOST_PP_FOR_155, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(155, s), p, o, m) # define BOOST_PP_FOR_155_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(156, s) BOOST_PP_IIF(c, BOOST_PP_FOR_156, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(156, s), p, o, m) # define BOOST_PP_FOR_156_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(157, s) BOOST_PP_IIF(c, BOOST_PP_FOR_157, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(157, s), p, o, m) # define BOOST_PP_FOR_157_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(158, s) BOOST_PP_IIF(c, BOOST_PP_FOR_158, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(158, s), p, o, m) # define BOOST_PP_FOR_158_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(159, s) BOOST_PP_IIF(c, BOOST_PP_FOR_159, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(159, s), p, o, m) # define BOOST_PP_FOR_159_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(160, s) BOOST_PP_IIF(c, BOOST_PP_FOR_160, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(160, s), p, o, m) # define BOOST_PP_FOR_160_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(161, s) BOOST_PP_IIF(c, BOOST_PP_FOR_161, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(161, s), p, o, m) # define BOOST_PP_FOR_161_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(162, s) BOOST_PP_IIF(c, BOOST_PP_FOR_162, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(162, s), p, o, m) # define BOOST_PP_FOR_162_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(163, s) BOOST_PP_IIF(c, BOOST_PP_FOR_163, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(163, s), p, o, m) # define BOOST_PP_FOR_163_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(164, s) BOOST_PP_IIF(c, BOOST_PP_FOR_164, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(164, s), p, o, m) # define BOOST_PP_FOR_164_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(165, s) BOOST_PP_IIF(c, BOOST_PP_FOR_165, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(165, s), p, o, m) # define BOOST_PP_FOR_165_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(166, s) BOOST_PP_IIF(c, BOOST_PP_FOR_166, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(166, s), p, o, m) # define BOOST_PP_FOR_166_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(167, s) BOOST_PP_IIF(c, BOOST_PP_FOR_167, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(167, s), p, o, m) # define BOOST_PP_FOR_167_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(168, s) BOOST_PP_IIF(c, BOOST_PP_FOR_168, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(168, s), p, o, m) # define BOOST_PP_FOR_168_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(169, s) BOOST_PP_IIF(c, BOOST_PP_FOR_169, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(169, s), p, o, m) # define BOOST_PP_FOR_169_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(170, s) BOOST_PP_IIF(c, BOOST_PP_FOR_170, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(170, s), p, o, m) # define BOOST_PP_FOR_170_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(171, s) BOOST_PP_IIF(c, BOOST_PP_FOR_171, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(171, s), p, o, m) # define BOOST_PP_FOR_171_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(172, s) BOOST_PP_IIF(c, BOOST_PP_FOR_172, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(172, s), p, o, m) # define BOOST_PP_FOR_172_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(173, s) BOOST_PP_IIF(c, BOOST_PP_FOR_173, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(173, s), p, o, m) # define BOOST_PP_FOR_173_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(174, s) BOOST_PP_IIF(c, BOOST_PP_FOR_174, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(174, s), p, o, m) # define BOOST_PP_FOR_174_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(175, s) BOOST_PP_IIF(c, BOOST_PP_FOR_175, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(175, s), p, o, m) # define BOOST_PP_FOR_175_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(176, s) BOOST_PP_IIF(c, BOOST_PP_FOR_176, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(176, s), p, o, m) # define BOOST_PP_FOR_176_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(177, s) BOOST_PP_IIF(c, BOOST_PP_FOR_177, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(177, s), p, o, m) # define BOOST_PP_FOR_177_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(178, s) BOOST_PP_IIF(c, BOOST_PP_FOR_178, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(178, s), p, o, m) # define BOOST_PP_FOR_178_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(179, s) BOOST_PP_IIF(c, BOOST_PP_FOR_179, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(179, s), p, o, m) # define BOOST_PP_FOR_179_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(180, s) BOOST_PP_IIF(c, BOOST_PP_FOR_180, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(180, s), p, o, m) # define BOOST_PP_FOR_180_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(181, s) BOOST_PP_IIF(c, BOOST_PP_FOR_181, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(181, s), p, o, m) # define BOOST_PP_FOR_181_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(182, s) BOOST_PP_IIF(c, BOOST_PP_FOR_182, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(182, s), p, o, m) # define BOOST_PP_FOR_182_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(183, s) BOOST_PP_IIF(c, BOOST_PP_FOR_183, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(183, s), p, o, m) # define BOOST_PP_FOR_183_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(184, s) BOOST_PP_IIF(c, BOOST_PP_FOR_184, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(184, s), p, o, m) # define BOOST_PP_FOR_184_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(185, s) BOOST_PP_IIF(c, BOOST_PP_FOR_185, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(185, s), p, o, m) # define BOOST_PP_FOR_185_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(186, s) BOOST_PP_IIF(c, BOOST_PP_FOR_186, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(186, s), p, o, m) # define BOOST_PP_FOR_186_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(187, s) BOOST_PP_IIF(c, BOOST_PP_FOR_187, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(187, s), p, o, m) # define BOOST_PP_FOR_187_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(188, s) BOOST_PP_IIF(c, BOOST_PP_FOR_188, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(188, s), p, o, m) # define BOOST_PP_FOR_188_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(189, s) BOOST_PP_IIF(c, BOOST_PP_FOR_189, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(189, s), p, o, m) # define BOOST_PP_FOR_189_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(190, s) BOOST_PP_IIF(c, BOOST_PP_FOR_190, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(190, s), p, o, m) # define BOOST_PP_FOR_190_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(191, s) BOOST_PP_IIF(c, BOOST_PP_FOR_191, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(191, s), p, o, m) # define BOOST_PP_FOR_191_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(192, s) BOOST_PP_IIF(c, BOOST_PP_FOR_192, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(192, s), p, o, m) # define BOOST_PP_FOR_192_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(193, s) BOOST_PP_IIF(c, BOOST_PP_FOR_193, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(193, s), p, o, m) # define BOOST_PP_FOR_193_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(194, s) BOOST_PP_IIF(c, BOOST_PP_FOR_194, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(194, s), p, o, m) # define BOOST_PP_FOR_194_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(195, s) BOOST_PP_IIF(c, BOOST_PP_FOR_195, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(195, s), p, o, m) # define BOOST_PP_FOR_195_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(196, s) BOOST_PP_IIF(c, BOOST_PP_FOR_196, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(196, s), p, o, m) # define BOOST_PP_FOR_196_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(197, s) BOOST_PP_IIF(c, BOOST_PP_FOR_197, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(197, s), p, o, m) # define BOOST_PP_FOR_197_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(198, s) BOOST_PP_IIF(c, BOOST_PP_FOR_198, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(198, s), p, o, m) # define BOOST_PP_FOR_198_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(199, s) BOOST_PP_IIF(c, BOOST_PP_FOR_199, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(199, s), p, o, m) # define BOOST_PP_FOR_199_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(200, s) BOOST_PP_IIF(c, BOOST_PP_FOR_200, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(200, s), p, o, m) # define BOOST_PP_FOR_200_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(201, s) BOOST_PP_IIF(c, BOOST_PP_FOR_201, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(201, s), p, o, m) # define BOOST_PP_FOR_201_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(202, s) BOOST_PP_IIF(c, BOOST_PP_FOR_202, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(202, s), p, o, m) # define BOOST_PP_FOR_202_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(203, s) BOOST_PP_IIF(c, BOOST_PP_FOR_203, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(203, s), p, o, m) # define BOOST_PP_FOR_203_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(204, s) BOOST_PP_IIF(c, BOOST_PP_FOR_204, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(204, s), p, o, m) # define BOOST_PP_FOR_204_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(205, s) BOOST_PP_IIF(c, BOOST_PP_FOR_205, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(205, s), p, o, m) # define BOOST_PP_FOR_205_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(206, s) BOOST_PP_IIF(c, BOOST_PP_FOR_206, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(206, s), p, o, m) # define BOOST_PP_FOR_206_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(207, s) BOOST_PP_IIF(c, BOOST_PP_FOR_207, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(207, s), p, o, m) # define BOOST_PP_FOR_207_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(208, s) BOOST_PP_IIF(c, BOOST_PP_FOR_208, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(208, s), p, o, m) # define BOOST_PP_FOR_208_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(209, s) BOOST_PP_IIF(c, BOOST_PP_FOR_209, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(209, s), p, o, m) # define BOOST_PP_FOR_209_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(210, s) BOOST_PP_IIF(c, BOOST_PP_FOR_210, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(210, s), p, o, m) # define BOOST_PP_FOR_210_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(211, s) BOOST_PP_IIF(c, BOOST_PP_FOR_211, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(211, s), p, o, m) # define BOOST_PP_FOR_211_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(212, s) BOOST_PP_IIF(c, BOOST_PP_FOR_212, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(212, s), p, o, m) # define BOOST_PP_FOR_212_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(213, s) BOOST_PP_IIF(c, BOOST_PP_FOR_213, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(213, s), p, o, m) # define BOOST_PP_FOR_213_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(214, s) BOOST_PP_IIF(c, BOOST_PP_FOR_214, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(214, s), p, o, m) # define BOOST_PP_FOR_214_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(215, s) BOOST_PP_IIF(c, BOOST_PP_FOR_215, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(215, s), p, o, m) # define BOOST_PP_FOR_215_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(216, s) BOOST_PP_IIF(c, BOOST_PP_FOR_216, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(216, s), p, o, m) # define BOOST_PP_FOR_216_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(217, s) BOOST_PP_IIF(c, BOOST_PP_FOR_217, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(217, s), p, o, m) # define BOOST_PP_FOR_217_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(218, s) BOOST_PP_IIF(c, BOOST_PP_FOR_218, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(218, s), p, o, m) # define BOOST_PP_FOR_218_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(219, s) BOOST_PP_IIF(c, BOOST_PP_FOR_219, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(219, s), p, o, m) # define BOOST_PP_FOR_219_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(220, s) BOOST_PP_IIF(c, BOOST_PP_FOR_220, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(220, s), p, o, m) # define BOOST_PP_FOR_220_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(221, s) BOOST_PP_IIF(c, BOOST_PP_FOR_221, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(221, s), p, o, m) # define BOOST_PP_FOR_221_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(222, s) BOOST_PP_IIF(c, BOOST_PP_FOR_222, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(222, s), p, o, m) # define BOOST_PP_FOR_222_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(223, s) BOOST_PP_IIF(c, BOOST_PP_FOR_223, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(223, s), p, o, m) # define BOOST_PP_FOR_223_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(224, s) BOOST_PP_IIF(c, BOOST_PP_FOR_224, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(224, s), p, o, m) # define BOOST_PP_FOR_224_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(225, s) BOOST_PP_IIF(c, BOOST_PP_FOR_225, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(225, s), p, o, m) # define BOOST_PP_FOR_225_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(226, s) BOOST_PP_IIF(c, BOOST_PP_FOR_226, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(226, s), p, o, m) # define BOOST_PP_FOR_226_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(227, s) BOOST_PP_IIF(c, BOOST_PP_FOR_227, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(227, s), p, o, m) # define BOOST_PP_FOR_227_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(228, s) BOOST_PP_IIF(c, BOOST_PP_FOR_228, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(228, s), p, o, m) # define BOOST_PP_FOR_228_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(229, s) BOOST_PP_IIF(c, BOOST_PP_FOR_229, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(229, s), p, o, m) # define BOOST_PP_FOR_229_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(230, s) BOOST_PP_IIF(c, BOOST_PP_FOR_230, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(230, s), p, o, m) # define BOOST_PP_FOR_230_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(231, s) BOOST_PP_IIF(c, BOOST_PP_FOR_231, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(231, s), p, o, m) # define BOOST_PP_FOR_231_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(232, s) BOOST_PP_IIF(c, BOOST_PP_FOR_232, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(232, s), p, o, m) # define BOOST_PP_FOR_232_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(233, s) BOOST_PP_IIF(c, BOOST_PP_FOR_233, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(233, s), p, o, m) # define BOOST_PP_FOR_233_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(234, s) BOOST_PP_IIF(c, BOOST_PP_FOR_234, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(234, s), p, o, m) # define BOOST_PP_FOR_234_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(235, s) BOOST_PP_IIF(c, BOOST_PP_FOR_235, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(235, s), p, o, m) # define BOOST_PP_FOR_235_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(236, s) BOOST_PP_IIF(c, BOOST_PP_FOR_236, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(236, s), p, o, m) # define BOOST_PP_FOR_236_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(237, s) BOOST_PP_IIF(c, BOOST_PP_FOR_237, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(237, s), p, o, m) # define BOOST_PP_FOR_237_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(238, s) BOOST_PP_IIF(c, BOOST_PP_FOR_238, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(238, s), p, o, m) # define BOOST_PP_FOR_238_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(239, s) BOOST_PP_IIF(c, BOOST_PP_FOR_239, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(239, s), p, o, m) # define BOOST_PP_FOR_239_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(240, s) BOOST_PP_IIF(c, BOOST_PP_FOR_240, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(240, s), p, o, m) # define BOOST_PP_FOR_240_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(241, s) BOOST_PP_IIF(c, BOOST_PP_FOR_241, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(241, s), p, o, m) # define BOOST_PP_FOR_241_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(242, s) BOOST_PP_IIF(c, BOOST_PP_FOR_242, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(242, s), p, o, m) # define BOOST_PP_FOR_242_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(243, s) BOOST_PP_IIF(c, BOOST_PP_FOR_243, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(243, s), p, o, m) # define BOOST_PP_FOR_243_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(244, s) BOOST_PP_IIF(c, BOOST_PP_FOR_244, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(244, s), p, o, m) # define BOOST_PP_FOR_244_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(245, s) BOOST_PP_IIF(c, BOOST_PP_FOR_245, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(245, s), p, o, m) # define BOOST_PP_FOR_245_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(246, s) BOOST_PP_IIF(c, BOOST_PP_FOR_246, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(246, s), p, o, m) # define BOOST_PP_FOR_246_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(247, s) BOOST_PP_IIF(c, BOOST_PP_FOR_247, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(247, s), p, o, m) # define BOOST_PP_FOR_247_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(248, s) BOOST_PP_IIF(c, BOOST_PP_FOR_248, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(248, s), p, o, m) # define BOOST_PP_FOR_248_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(249, s) BOOST_PP_IIF(c, BOOST_PP_FOR_249, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(249, s), p, o, m) # define BOOST_PP_FOR_249_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(250, s) BOOST_PP_IIF(c, BOOST_PP_FOR_250, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(250, s), p, o, m) # define BOOST_PP_FOR_250_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(251, s) BOOST_PP_IIF(c, BOOST_PP_FOR_251, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(251, s), p, o, m) # define BOOST_PP_FOR_251_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(252, s) BOOST_PP_IIF(c, BOOST_PP_FOR_252, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(252, s), p, o, m) # define BOOST_PP_FOR_252_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(253, s) BOOST_PP_IIF(c, BOOST_PP_FOR_253, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(253, s), p, o, m) # define BOOST_PP_FOR_253_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(254, s) BOOST_PP_IIF(c, BOOST_PP_FOR_254, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(254, s), p, o, m) # define BOOST_PP_FOR_254_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(255, s) BOOST_PP_IIF(c, BOOST_PP_FOR_255, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(255, s), p, o, m) # define BOOST_PP_FOR_255_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(256, s) BOOST_PP_IIF(c, BOOST_PP_FOR_256, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(256, s), p, o, m) # define BOOST_PP_FOR_256_C(c, s, p, o, m) BOOST_PP_IIF(c, m, BOOST_PP_TUPLE_EAT_2)(257, s) BOOST_PP_IIF(c, BOOST_PP_FOR_257, BOOST_PP_TUPLE_EAT_4)(BOOST_PP_EXPR_IIF(c, o)(257, s), p, o, m) # # endif ================================================ FILE: benchmarks/boost/preprocessor/repetition/detail/msvc/for.hpp ================================================ # /* Copyright (C) 2001 # * Housemarque Oy # * http://www.housemarque.com # * # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # */ # # /* Revised by Paul Mensonides (2002) */ # # /* See http://www.boost.org for most recent version. */ # # ifndef BOOST_PREPROCESSOR_REPETITION_DETAIL_MSVC_FOR_HPP # define BOOST_PREPROCESSOR_REPETITION_DETAIL_MSVC_FOR_HPP # # include # include # # define BOOST_PP_FOR_1(s, p, o, m) BOOST_PP_IF(p(2, s), m, BOOST_PP_TUPLE_EAT_2)(2, s) BOOST_PP_IF(p(2, s), BOOST_PP_FOR_2, BOOST_PP_TUPLE_EAT_4)(o(2, s), p, o, m) # define BOOST_PP_FOR_2(s, p, o, m) BOOST_PP_IF(p(3, s), m, BOOST_PP_TUPLE_EAT_2)(3, s) BOOST_PP_IF(p(3, s), BOOST_PP_FOR_3, BOOST_PP_TUPLE_EAT_4)(o(3, s), p, o, m) # define BOOST_PP_FOR_3(s, p, o, m) BOOST_PP_IF(p(4, s), m, BOOST_PP_TUPLE_EAT_2)(4, s) BOOST_PP_IF(p(4, s), BOOST_PP_FOR_4, BOOST_PP_TUPLE_EAT_4)(o(4, s), p, o, m) # define BOOST_PP_FOR_4(s, p, o, m) BOOST_PP_IF(p(5, s), m, BOOST_PP_TUPLE_EAT_2)(5, s) BOOST_PP_IF(p(5, s), BOOST_PP_FOR_5, BOOST_PP_TUPLE_EAT_4)(o(5, s), p, o, m) # define BOOST_PP_FOR_5(s, p, o, m) BOOST_PP_IF(p(6, s), m, BOOST_PP_TUPLE_EAT_2)(6, s) BOOST_PP_IF(p(6, s), BOOST_PP_FOR_6, BOOST_PP_TUPLE_EAT_4)(o(6, s), p, o, m) # define BOOST_PP_FOR_6(s, p, o, m) BOOST_PP_IF(p(7, s), m, BOOST_PP_TUPLE_EAT_2)(7, s) BOOST_PP_IF(p(7, s), BOOST_PP_FOR_7, BOOST_PP_TUPLE_EAT_4)(o(7, s), p, o, m) # define BOOST_PP_FOR_7(s, p, o, m) BOOST_PP_IF(p(8, s), m, BOOST_PP_TUPLE_EAT_2)(8, s) BOOST_PP_IF(p(8, s), BOOST_PP_FOR_8, BOOST_PP_TUPLE_EAT_4)(o(8, s), p, o, m) # define BOOST_PP_FOR_8(s, p, o, m) BOOST_PP_IF(p(9, s), m, BOOST_PP_TUPLE_EAT_2)(9, s) BOOST_PP_IF(p(9, s), BOOST_PP_FOR_9, BOOST_PP_TUPLE_EAT_4)(o(9, s), p, o, m) # define BOOST_PP_FOR_9(s, p, o, m) BOOST_PP_IF(p(10, s), m, BOOST_PP_TUPLE_EAT_2)(10, s) BOOST_PP_IF(p(10, s), BOOST_PP_FOR_10, BOOST_PP_TUPLE_EAT_4)(o(10, s), p, o, m) # define BOOST_PP_FOR_10(s, p, o, m) BOOST_PP_IF(p(11, s), m, BOOST_PP_TUPLE_EAT_2)(11, s) BOOST_PP_IF(p(11, s), BOOST_PP_FOR_11, BOOST_PP_TUPLE_EAT_4)(o(11, s), p, o, m) # define BOOST_PP_FOR_11(s, p, o, m) BOOST_PP_IF(p(12, s), m, BOOST_PP_TUPLE_EAT_2)(12, s) BOOST_PP_IF(p(12, s), BOOST_PP_FOR_12, BOOST_PP_TUPLE_EAT_4)(o(12, s), p, o, m) # define BOOST_PP_FOR_12(s, p, o, m) BOOST_PP_IF(p(13, s), m, BOOST_PP_TUPLE_EAT_2)(13, s) BOOST_PP_IF(p(13, s), BOOST_PP_FOR_13, BOOST_PP_TUPLE_EAT_4)(o(13, s), p, o, m) # define BOOST_PP_FOR_13(s, p, o, m) BOOST_PP_IF(p(14, s), m, BOOST_PP_TUPLE_EAT_2)(14, s) BOOST_PP_IF(p(14, s), BOOST_PP_FOR_14, BOOST_PP_TUPLE_EAT_4)(o(14, s), p, o, m) # define BOOST_PP_FOR_14(s, p, o, m) BOOST_PP_IF(p(15, s), m, BOOST_PP_TUPLE_EAT_2)(15, s) BOOST_PP_IF(p(15, s), BOOST_PP_FOR_15, BOOST_PP_TUPLE_EAT_4)(o(15, s), p, o, m) # define BOOST_PP_FOR_15(s, p, o, m) BOOST_PP_IF(p(16, s), m, BOOST_PP_TUPLE_EAT_2)(16, s) BOOST_PP_IF(p(16, s), BOOST_PP_FOR_16, BOOST_PP_TUPLE_EAT_4)(o(16, s), p, o, m) # define BOOST_PP_FOR_16(s, p, o, m) BOOST_PP_IF(p(17, s), m, BOOST_PP_TUPLE_EAT_2)(17, s) BOOST_PP_IF(p(17, s), BOOST_PP_FOR_17, BOOST_PP_TUPLE_EAT_4)(o(17, s), p, o, m) # define BOOST_PP_FOR_17(s, p, o, m) BOOST_PP_IF(p(18, s), m, BOOST_PP_TUPLE_EAT_2)(18, s) BOOST_PP_IF(p(18, s), BOOST_PP_FOR_18, BOOST_PP_TUPLE_EAT_4)(o(18, s), p, o, m) # define BOOST_PP_FOR_18(s, p, o, m) BOOST_PP_IF(p(19, s), m, BOOST_PP_TUPLE_EAT_2)(19, s) BOOST_PP_IF(p(19, s), BOOST_PP_FOR_19, BOOST_PP_TUPLE_EAT_4)(o(19, s), p, o, m) # define BOOST_PP_FOR_19(s, p, o, m) BOOST_PP_IF(p(20, s), m, BOOST_PP_TUPLE_EAT_2)(20, s) BOOST_PP_IF(p(20, s), BOOST_PP_FOR_20, BOOST_PP_TUPLE_EAT_4)(o(20, s), p, o, m) # define BOOST_PP_FOR_20(s, p, o, m) BOOST_PP_IF(p(21, s), m, BOOST_PP_TUPLE_EAT_2)(21, s) BOOST_PP_IF(p(21, s), BOOST_PP_FOR_21, BOOST_PP_TUPLE_EAT_4)(o(21, s), p, o, m) # define BOOST_PP_FOR_21(s, p, o, m) BOOST_PP_IF(p(22, s), m, BOOST_PP_TUPLE_EAT_2)(22, s) BOOST_PP_IF(p(22, s), BOOST_PP_FOR_22, BOOST_PP_TUPLE_EAT_4)(o(22, s), p, o, m) # define BOOST_PP_FOR_22(s, p, o, m) BOOST_PP_IF(p(23, s), m, BOOST_PP_TUPLE_EAT_2)(23, s) BOOST_PP_IF(p(23, s), BOOST_PP_FOR_23, BOOST_PP_TUPLE_EAT_4)(o(23, s), p, o, m) # define BOOST_PP_FOR_23(s, p, o, m) BOOST_PP_IF(p(24, s), m, BOOST_PP_TUPLE_EAT_2)(24, s) BOOST_PP_IF(p(24, s), BOOST_PP_FOR_24, BOOST_PP_TUPLE_EAT_4)(o(24, s), p, o, m) # define BOOST_PP_FOR_24(s, p, o, m) BOOST_PP_IF(p(25, s), m, BOOST_PP_TUPLE_EAT_2)(25, s) BOOST_PP_IF(p(25, s), BOOST_PP_FOR_25, BOOST_PP_TUPLE_EAT_4)(o(25, s), p, o, m) # define BOOST_PP_FOR_25(s, p, o, m) BOOST_PP_IF(p(26, s), m, BOOST_PP_TUPLE_EAT_2)(26, s) BOOST_PP_IF(p(26, s), BOOST_PP_FOR_26, BOOST_PP_TUPLE_EAT_4)(o(26, s), p, o, m) # define BOOST_PP_FOR_26(s, p, o, m) BOOST_PP_IF(p(27, s), m, BOOST_PP_TUPLE_EAT_2)(27, s) BOOST_PP_IF(p(27, s), BOOST_PP_FOR_27, BOOST_PP_TUPLE_EAT_4)(o(27, s), p, o, m) # define BOOST_PP_FOR_27(s, p, o, m) BOOST_PP_IF(p(28, s), m, BOOST_PP_TUPLE_EAT_2)(28, s) BOOST_PP_IF(p(28, s), BOOST_PP_FOR_28, BOOST_PP_TUPLE_EAT_4)(o(28, s), p, o, m) # define BOOST_PP_FOR_28(s, p, o, m) BOOST_PP_IF(p(29, s), m, BOOST_PP_TUPLE_EAT_2)(29, s) BOOST_PP_IF(p(29, s), BOOST_PP_FOR_29, BOOST_PP_TUPLE_EAT_4)(o(29, s), p, o, m) # define BOOST_PP_FOR_29(s, p, o, m) BOOST_PP_IF(p(30, s), m, BOOST_PP_TUPLE_EAT_2)(30, s) BOOST_PP_IF(p(30, s), BOOST_PP_FOR_30, BOOST_PP_TUPLE_EAT_4)(o(30, s), p, o, m) # define BOOST_PP_FOR_30(s, p, o, m) BOOST_PP_IF(p(31, s), m, BOOST_PP_TUPLE_EAT_2)(31, s) BOOST_PP_IF(p(31, s), BOOST_PP_FOR_31, BOOST_PP_TUPLE_EAT_4)(o(31, s), p, o, m) # define BOOST_PP_FOR_31(s, p, o, m) BOOST_PP_IF(p(32, s), m, BOOST_PP_TUPLE_EAT_2)(32, s) BOOST_PP_IF(p(32, s), BOOST_PP_FOR_32, BOOST_PP_TUPLE_EAT_4)(o(32, s), p, o, m) # define BOOST_PP_FOR_32(s, p, o, m) BOOST_PP_IF(p(33, s), m, BOOST_PP_TUPLE_EAT_2)(33, s) BOOST_PP_IF(p(33, s), BOOST_PP_FOR_33, BOOST_PP_TUPLE_EAT_4)(o(33, s), p, o, m) # define BOOST_PP_FOR_33(s, p, o, m) BOOST_PP_IF(p(34, s), m, BOOST_PP_TUPLE_EAT_2)(34, s) BOOST_PP_IF(p(34, s), BOOST_PP_FOR_34, BOOST_PP_TUPLE_EAT_4)(o(34, s), p, o, m) # define BOOST_PP_FOR_34(s, p, o, m) BOOST_PP_IF(p(35, s), m, BOOST_PP_TUPLE_EAT_2)(35, s) BOOST_PP_IF(p(35, s), BOOST_PP_FOR_35, BOOST_PP_TUPLE_EAT_4)(o(35, s), p, o, m) # define BOOST_PP_FOR_35(s, p, o, m) BOOST_PP_IF(p(36, s), m, BOOST_PP_TUPLE_EAT_2)(36, s) BOOST_PP_IF(p(36, s), BOOST_PP_FOR_36, BOOST_PP_TUPLE_EAT_4)(o(36, s), p, o, m) # define BOOST_PP_FOR_36(s, p, o, m) BOOST_PP_IF(p(37, s), m, BOOST_PP_TUPLE_EAT_2)(37, s) BOOST_PP_IF(p(37, s), BOOST_PP_FOR_37, BOOST_PP_TUPLE_EAT_4)(o(37, s), p, o, m) # define BOOST_PP_FOR_37(s, p, o, m) BOOST_PP_IF(p(38, s), m, BOOST_PP_TUPLE_EAT_2)(38, s) BOOST_PP_IF(p(38, s), BOOST_PP_FOR_38, BOOST_PP_TUPLE_EAT_4)(o(38, s), p, o, m) # define BOOST_PP_FOR_38(s, p, o, m) BOOST_PP_IF(p(39, s), m, BOOST_PP_TUPLE_EAT_2)(39, s) BOOST_PP_IF(p(39, s), BOOST_PP_FOR_39, BOOST_PP_TUPLE_EAT_4)(o(39, s), p, o, m) # define BOOST_PP_FOR_39(s, p, o, m) BOOST_PP_IF(p(40, s), m, BOOST_PP_TUPLE_EAT_2)(40, s) BOOST_PP_IF(p(40, s), BOOST_PP_FOR_40, BOOST_PP_TUPLE_EAT_4)(o(40, s), p, o, m) # define BOOST_PP_FOR_40(s, p, o, m) BOOST_PP_IF(p(41, s), m, BOOST_PP_TUPLE_EAT_2)(41, s) BOOST_PP_IF(p(41, s), BOOST_PP_FOR_41, BOOST_PP_TUPLE_EAT_4)(o(41, s), p, o, m) # define BOOST_PP_FOR_41(s, p, o, m) BOOST_PP_IF(p(42, s), m, BOOST_PP_TUPLE_EAT_2)(42, s) BOOST_PP_IF(p(42, s), BOOST_PP_FOR_42, BOOST_PP_TUPLE_EAT_4)(o(42, s), p, o, m) # define BOOST_PP_FOR_42(s, p, o, m) BOOST_PP_IF(p(43, s), m, BOOST_PP_TUPLE_EAT_2)(43, s) BOOST_PP_IF(p(43, s), BOOST_PP_FOR_43, BOOST_PP_TUPLE_EAT_4)(o(43, s), p, o, m) # define BOOST_PP_FOR_43(s, p, o, m) BOOST_PP_IF(p(44, s), m, BOOST_PP_TUPLE_EAT_2)(44, s) BOOST_PP_IF(p(44, s), BOOST_PP_FOR_44, BOOST_PP_TUPLE_EAT_4)(o(44, s), p, o, m) # define BOOST_PP_FOR_44(s, p, o, m) BOOST_PP_IF(p(45, s), m, BOOST_PP_TUPLE_EAT_2)(45, s) BOOST_PP_IF(p(45, s), BOOST_PP_FOR_45, BOOST_PP_TUPLE_EAT_4)(o(45, s), p, o, m) # define BOOST_PP_FOR_45(s, p, o, m) BOOST_PP_IF(p(46, s), m, BOOST_PP_TUPLE_EAT_2)(46, s) BOOST_PP_IF(p(46, s), BOOST_PP_FOR_46, BOOST_PP_TUPLE_EAT_4)(o(46, s), p, o, m) # define BOOST_PP_FOR_46(s, p, o, m) BOOST_PP_IF(p(47, s), m, BOOST_PP_TUPLE_EAT_2)(47, s) BOOST_PP_IF(p(47, s), BOOST_PP_FOR_47, BOOST_PP_TUPLE_EAT_4)(o(47, s), p, o, m) # define BOOST_PP_FOR_47(s, p, o, m) BOOST_PP_IF(p(48, s), m, BOOST_PP_TUPLE_EAT_2)(48, s) BOOST_PP_IF(p(48, s), BOOST_PP_FOR_48, BOOST_PP_TUPLE_EAT_4)(o(48, s), p, o, m) # define BOOST_PP_FOR_48(s, p, o, m) BOOST_PP_IF(p(49, s), m, BOOST_PP_TUPLE_EAT_2)(49, s) BOOST_PP_IF(p(49, s), BOOST_PP_FOR_49, BOOST_PP_TUPLE_EAT_4)(o(49, s), p, o, m) # define BOOST_PP_FOR_49(s, p, o, m) BOOST_PP_IF(p(50, s), m, BOOST_PP_TUPLE_EAT_2)(50, s) BOOST_PP_IF(p(50, s), BOOST_PP_FOR_50, BOOST_PP_TUPLE_EAT_4)(o(50, s), p, o, m) # define BOOST_PP_FOR_50(s, p, o, m) BOOST_PP_IF(p(51, s), m, BOOST_PP_TUPLE_EAT_2)(51, s) BOOST_PP_IF(p(51, s), BOOST_PP_FOR_51, BOOST_PP_TUPLE_EAT_4)(o(51, s), p, o, m) # define BOOST_PP_FOR_51(s, p, o, m) BOOST_PP_IF(p(52, s), m, BOOST_PP_TUPLE_EAT_2)(52, s) BOOST_PP_IF(p(52, s), BOOST_PP_FOR_52, BOOST_PP_TUPLE_EAT_4)(o(52, s), p, o, m) # define BOOST_PP_FOR_52(s, p, o, m) BOOST_PP_IF(p(53, s), m, BOOST_PP_TUPLE_EAT_2)(53, s) BOOST_PP_IF(p(53, s), BOOST_PP_FOR_53, BOOST_PP_TUPLE_EAT_4)(o(53, s), p, o, m) # define BOOST_PP_FOR_53(s, p, o, m) BOOST_PP_IF(p(54, s), m, BOOST_PP_TUPLE_EAT_2)(54, s) BOOST_PP_IF(p(54, s), BOOST_PP_FOR_54, BOOST_PP_TUPLE_EAT_4)(o(54, s), p, o, m) # define BOOST_PP_FOR_54(s, p, o, m) BOOST_PP_IF(p(55, s), m, BOOST_PP_TUPLE_EAT_2)(55, s) BOOST_PP_IF(p(55, s), BOOST_PP_FOR_55, BOOST_PP_TUPLE_EAT_4)(o(55, s), p, o, m) # define BOOST_PP_FOR_55(s, p, o, m) BOOST_PP_IF(p(56, s), m, BOOST_PP_TUPLE_EAT_2)(56, s) BOOST_PP_IF(p(56, s), BOOST_PP_FOR_56, BOOST_PP_TUPLE_EAT_4)(o(56, s), p, o, m) # define BOOST_PP_FOR_56(s, p, o, m) BOOST_PP_IF(p(57, s), m, BOOST_PP_TUPLE_EAT_2)(57, s) BOOST_PP_IF(p(57, s), BOOST_PP_FOR_57, BOOST_PP_TUPLE_EAT_4)(o(57, s), p, o, m) # define BOOST_PP_FOR_57(s, p, o, m) BOOST_PP_IF(p(58, s), m, BOOST_PP_TUPLE_EAT_2)(58, s) BOOST_PP_IF(p(58, s), BOOST_PP_FOR_58, BOOST_PP_TUPLE_EAT_4)(o(58, s), p, o, m) # define BOOST_PP_FOR_58(s, p, o, m) BOOST_PP_IF(p(59, s), m, BOOST_PP_TUPLE_EAT_2)(59, s) BOOST_PP_IF(p(59, s), BOOST_PP_FOR_59, BOOST_PP_TUPLE_EAT_4)(o(59, s), p, o, m) # define BOOST_PP_FOR_59(s, p, o, m) BOOST_PP_IF(p(60, s), m, BOOST_PP_TUPLE_EAT_2)(60, s) BOOST_PP_IF(p(60, s), BOOST_PP_FOR_60, BOOST_PP_TUPLE_EAT_4)(o(60, s), p, o, m) # define BOOST_PP_FOR_60(s, p, o, m) BOOST_PP_IF(p(61, s), m, BOOST_PP_TUPLE_EAT_2)(61, s) BOOST_PP_IF(p(61, s), BOOST_PP_FOR_61, BOOST_PP_TUPLE_EAT_4)(o(61, s), p, o, m) # define BOOST_PP_FOR_61(s, p, o, m) BOOST_PP_IF(p(62, s), m, BOOST_PP_TUPLE_EAT_2)(62, s) BOOST_PP_IF(p(62, s), BOOST_PP_FOR_62, BOOST_PP_TUPLE_EAT_4)(o(62, s), p, o, m) # define BOOST_PP_FOR_62(s, p, o, m) BOOST_PP_IF(p(63, s), m, BOOST_PP_TUPLE_EAT_2)(63, s) BOOST_PP_IF(p(63, s), BOOST_PP_FOR_63, BOOST_PP_TUPLE_EAT_4)(o(63, s), p, o, m) # define BOOST_PP_FOR_63(s, p, o, m) BOOST_PP_IF(p(64, s), m, BOOST_PP_TUPLE_EAT_2)(64, s) BOOST_PP_IF(p(64, s), BOOST_PP_FOR_64, BOOST_PP_TUPLE_EAT_4)(o(64, s), p, o, m) # define BOOST_PP_FOR_64(s, p, o, m) BOOST_PP_IF(p(65, s), m, BOOST_PP_TUPLE_EAT_2)(65, s) BOOST_PP_IF(p(65, s), BOOST_PP_FOR_65, BOOST_PP_TUPLE_EAT_4)(o(65, s), p, o, m) # define BOOST_PP_FOR_65(s, p, o, m) BOOST_PP_IF(p(66, s), m, BOOST_PP_TUPLE_EAT_2)(66, s) BOOST_PP_IF(p(66, s), BOOST_PP_FOR_66, BOOST_PP_TUPLE_EAT_4)(o(66, s), p, o, m) # define BOOST_PP_FOR_66(s, p, o, m) BOOST_PP_IF(p(67, s), m, BOOST_PP_TUPLE_EAT_2)(67, s) BOOST_PP_IF(p(67, s), BOOST_PP_FOR_67, BOOST_PP_TUPLE_EAT_4)(o(67, s), p, o, m) # define BOOST_PP_FOR_67(s, p, o, m) BOOST_PP_IF(p(68, s), m, BOOST_PP_TUPLE_EAT_2)(68, s) BOOST_PP_IF(p(68, s), BOOST_PP_FOR_68, BOOST_PP_TUPLE_EAT_4)(o(68, s), p, o, m) # define BOOST_PP_FOR_68(s, p, o, m) BOOST_PP_IF(p(69, s), m, BOOST_PP_TUPLE_EAT_2)(69, s) BOOST_PP_IF(p(69, s), BOOST_PP_FOR_69, BOOST_PP_TUPLE_EAT_4)(o(69, s), p, o, m) # define BOOST_PP_FOR_69(s, p, o, m) BOOST_PP_IF(p(70, s), m, BOOST_PP_TUPLE_EAT_2)(70, s) BOOST_PP_IF(p(70, s), BOOST_PP_FOR_70, BOOST_PP_TUPLE_EAT_4)(o(70, s), p, o, m) # define BOOST_PP_FOR_70(s, p, o, m) BOOST_PP_IF(p(71, s), m, BOOST_PP_TUPLE_EAT_2)(71, s) BOOST_PP_IF(p(71, s), BOOST_PP_FOR_71, BOOST_PP_TUPLE_EAT_4)(o(71, s), p, o, m) # define BOOST_PP_FOR_71(s, p, o, m) BOOST_PP_IF(p(72, s), m, BOOST_PP_TUPLE_EAT_2)(72, s) BOOST_PP_IF(p(72, s), BOOST_PP_FOR_72, BOOST_PP_TUPLE_EAT_4)(o(72, s), p, o, m) # define BOOST_PP_FOR_72(s, p, o, m) BOOST_PP_IF(p(73, s), m, BOOST_PP_TUPLE_EAT_2)(73, s) BOOST_PP_IF(p(73, s), BOOST_PP_FOR_73, BOOST_PP_TUPLE_EAT_4)(o(73, s), p, o, m) # define BOOST_PP_FOR_73(s, p, o, m) BOOST_PP_IF(p(74, s), m, BOOST_PP_TUPLE_EAT_2)(74, s) BOOST_PP_IF(p(74, s), BOOST_PP_FOR_74, BOOST_PP_TUPLE_EAT_4)(o(74, s), p, o, m) # define BOOST_PP_FOR_74(s, p, o, m) BOOST_PP_IF(p(75, s), m, BOOST_PP_TUPLE_EAT_2)(75, s) BOOST_PP_IF(p(75, s), BOOST_PP_FOR_75, BOOST_PP_TUPLE_EAT_4)(o(75, s), p, o, m) # define BOOST_PP_FOR_75(s, p, o, m) BOOST_PP_IF(p(76, s), m, BOOST_PP_TUPLE_EAT_2)(76, s) BOOST_PP_IF(p(76, s), BOOST_PP_FOR_76, BOOST_PP_TUPLE_EAT_4)(o(76, s), p, o, m) # define BOOST_PP_FOR_76(s, p, o, m) BOOST_PP_IF(p(77, s), m, BOOST_PP_TUPLE_EAT_2)(77, s) BOOST_PP_IF(p(77, s), BOOST_PP_FOR_77, BOOST_PP_TUPLE_EAT_4)(o(77, s), p, o, m) # define BOOST_PP_FOR_77(s, p, o, m) BOOST_PP_IF(p(78, s), m, BOOST_PP_TUPLE_EAT_2)(78, s) BOOST_PP_IF(p(78, s), BOOST_PP_FOR_78, BOOST_PP_TUPLE_EAT_4)(o(78, s), p, o, m) # define BOOST_PP_FOR_78(s, p, o, m) BOOST_PP_IF(p(79, s), m, BOOST_PP_TUPLE_EAT_2)(79, s) BOOST_PP_IF(p(79, s), BOOST_PP_FOR_79, BOOST_PP_TUPLE_EAT_4)(o(79, s), p, o, m) # define BOOST_PP_FOR_79(s, p, o, m) BOOST_PP_IF(p(80, s), m, BOOST_PP_TUPLE_EAT_2)(80, s) BOOST_PP_IF(p(80, s), BOOST_PP_FOR_80, BOOST_PP_TUPLE_EAT_4)(o(80, s), p, o, m) # define BOOST_PP_FOR_80(s, p, o, m) BOOST_PP_IF(p(81, s), m, BOOST_PP_TUPLE_EAT_2)(81, s) BOOST_PP_IF(p(81, s), BOOST_PP_FOR_81, BOOST_PP_TUPLE_EAT_4)(o(81, s), p, o, m) # define BOOST_PP_FOR_81(s, p, o, m) BOOST_PP_IF(p(82, s), m, BOOST_PP_TUPLE_EAT_2)(82, s) BOOST_PP_IF(p(82, s), BOOST_PP_FOR_82, BOOST_PP_TUPLE_EAT_4)(o(82, s), p, o, m) # define BOOST_PP_FOR_82(s, p, o, m) BOOST_PP_IF(p(83, s), m, BOOST_PP_TUPLE_EAT_2)(83, s) BOOST_PP_IF(p(83, s), BOOST_PP_FOR_83, BOOST_PP_TUPLE_EAT_4)(o(83, s), p, o, m) # define BOOST_PP_FOR_83(s, p, o, m) BOOST_PP_IF(p(84, s), m, BOOST_PP_TUPLE_EAT_2)(84, s) BOOST_PP_IF(p(84, s), BOOST_PP_FOR_84, BOOST_PP_TUPLE_EAT_4)(o(84, s), p, o, m) # define BOOST_PP_FOR_84(s, p, o, m) BOOST_PP_IF(p(85, s), m, BOOST_PP_TUPLE_EAT_2)(85, s) BOOST_PP_IF(p(85, s), BOOST_PP_FOR_85, BOOST_PP_TUPLE_EAT_4)(o(85, s), p, o, m) # define BOOST_PP_FOR_85(s, p, o, m) BOOST_PP_IF(p(86, s), m, BOOST_PP_TUPLE_EAT_2)(86, s) BOOST_PP_IF(p(86, s), BOOST_PP_FOR_86, BOOST_PP_TUPLE_EAT_4)(o(86, s), p, o, m) # define BOOST_PP_FOR_86(s, p, o, m) BOOST_PP_IF(p(87, s), m, BOOST_PP_TUPLE_EAT_2)(87, s) BOOST_PP_IF(p(87, s), BOOST_PP_FOR_87, BOOST_PP_TUPLE_EAT_4)(o(87, s), p, o, m) # define BOOST_PP_FOR_87(s, p, o, m) BOOST_PP_IF(p(88, s), m, BOOST_PP_TUPLE_EAT_2)(88, s) BOOST_PP_IF(p(88, s), BOOST_PP_FOR_88, BOOST_PP_TUPLE_EAT_4)(o(88, s), p, o, m) # define BOOST_PP_FOR_88(s, p, o, m) BOOST_PP_IF(p(89, s), m, BOOST_PP_TUPLE_EAT_2)(89, s) BOOST_PP_IF(p(89, s), BOOST_PP_FOR_89, BOOST_PP_TUPLE_EAT_4)(o(89, s), p, o, m) # define BOOST_PP_FOR_89(s, p, o, m) BOOST_PP_IF(p(90, s), m, BOOST_PP_TUPLE_EAT_2)(90, s) BOOST_PP_IF(p(90, s), BOOST_PP_FOR_90, BOOST_PP_TUPLE_EAT_4)(o(90, s), p, o, m) # define BOOST_PP_FOR_90(s, p, o, m) BOOST_PP_IF(p(91, s), m, BOOST_PP_TUPLE_EAT_2)(91, s) BOOST_PP_IF(p(91, s), BOOST_PP_FOR_91, BOOST_PP_TUPLE_EAT_4)(o(91, s), p, o, m) # define BOOST_PP_FOR_91(s, p, o, m) BOOST_PP_IF(p(92, s), m, BOOST_PP_TUPLE_EAT_2)(92, s) BOOST_PP_IF(p(92, s), BOOST_PP_FOR_92, BOOST_PP_TUPLE_EAT_4)(o(92, s), p, o, m) # define BOOST_PP_FOR_92(s, p, o, m) BOOST_PP_IF(p(93, s), m, BOOST_PP_TUPLE_EAT_2)(93, s) BOOST_PP_IF(p(93, s), BOOST_PP_FOR_93, BOOST_PP_TUPLE_EAT_4)(o(93, s), p, o, m) # define BOOST_PP_FOR_93(s, p, o, m) BOOST_PP_IF(p(94, s), m, BOOST_PP_TUPLE_EAT_2)(94, s) BOOST_PP_IF(p(94, s), BOOST_PP_FOR_94, BOOST_PP_TUPLE_EAT_4)(o(94, s), p, o, m) # define BOOST_PP_FOR_94(s, p, o, m) BOOST_PP_IF(p(95, s), m, BOOST_PP_TUPLE_EAT_2)(95, s) BOOST_PP_IF(p(95, s), BOOST_PP_FOR_95, BOOST_PP_TUPLE_EAT_4)(o(95, s), p, o, m) # define BOOST_PP_FOR_95(s, p, o, m) BOOST_PP_IF(p(96, s), m, BOOST_PP_TUPLE_EAT_2)(96, s) BOOST_PP_IF(p(96, s), BOOST_PP_FOR_96, BOOST_PP_TUPLE_EAT_4)(o(96, s), p, o, m) # define BOOST_PP_FOR_96(s, p, o, m) BOOST_PP_IF(p(97, s), m, BOOST_PP_TUPLE_EAT_2)(97, s) BOOST_PP_IF(p(97, s), BOOST_PP_FOR_97, BOOST_PP_TUPLE_EAT_4)(o(97, s), p, o, m) # define BOOST_PP_FOR_97(s, p, o, m) BOOST_PP_IF(p(98, s), m, BOOST_PP_TUPLE_EAT_2)(98, s) BOOST_PP_IF(p(98, s), BOOST_PP_FOR_98, BOOST_PP_TUPLE_EAT_4)(o(98, s), p, o, m) # define BOOST_PP_FOR_98(s, p, o, m) BOOST_PP_IF(p(99, s), m, BOOST_PP_TUPLE_EAT_2)(99, s) BOOST_PP_IF(p(99, s), BOOST_PP_FOR_99, BOOST_PP_TUPLE_EAT_4)(o(99, s), p, o, m) # define BOOST_PP_FOR_99(s, p, o, m) BOOST_PP_IF(p(100, s), m, BOOST_PP_TUPLE_EAT_2)(100, s) BOOST_PP_IF(p(100, s), BOOST_PP_FOR_100, BOOST_PP_TUPLE_EAT_4)(o(100, s), p, o, m) # define BOOST_PP_FOR_100(s, p, o, m) BOOST_PP_IF(p(101, s), m, BOOST_PP_TUPLE_EAT_2)(101, s) BOOST_PP_IF(p(101, s), BOOST_PP_FOR_101, BOOST_PP_TUPLE_EAT_4)(o(101, s), p, o, m) # define BOOST_PP_FOR_101(s, p, o, m) BOOST_PP_IF(p(102, s), m, BOOST_PP_TUPLE_EAT_2)(102, s) BOOST_PP_IF(p(102, s), BOOST_PP_FOR_102, BOOST_PP_TUPLE_EAT_4)(o(102, s), p, o, m) # define BOOST_PP_FOR_102(s, p, o, m) BOOST_PP_IF(p(103, s), m, BOOST_PP_TUPLE_EAT_2)(103, s) BOOST_PP_IF(p(103, s), BOOST_PP_FOR_103, BOOST_PP_TUPLE_EAT_4)(o(103, s), p, o, m) # define BOOST_PP_FOR_103(s, p, o, m) BOOST_PP_IF(p(104, s), m, BOOST_PP_TUPLE_EAT_2)(104, s) BOOST_PP_IF(p(104, s), BOOST_PP_FOR_104, BOOST_PP_TUPLE_EAT_4)(o(104, s), p, o, m) # define BOOST_PP_FOR_104(s, p, o, m) BOOST_PP_IF(p(105, s), m, BOOST_PP_TUPLE_EAT_2)(105, s) BOOST_PP_IF(p(105, s), BOOST_PP_FOR_105, BOOST_PP_TUPLE_EAT_4)(o(105, s), p, o, m) # define BOOST_PP_FOR_105(s, p, o, m) BOOST_PP_IF(p(106, s), m, BOOST_PP_TUPLE_EAT_2)(106, s) BOOST_PP_IF(p(106, s), BOOST_PP_FOR_106, BOOST_PP_TUPLE_EAT_4)(o(106, s), p, o, m) # define BOOST_PP_FOR_106(s, p, o, m) BOOST_PP_IF(p(107, s), m, BOOST_PP_TUPLE_EAT_2)(107, s) BOOST_PP_IF(p(107, s), BOOST_PP_FOR_107, BOOST_PP_TUPLE_EAT_4)(o(107, s), p, o, m) # define BOOST_PP_FOR_107(s, p, o, m) BOOST_PP_IF(p(108, s), m, BOOST_PP_TUPLE_EAT_2)(108, s) BOOST_PP_IF(p(108, s), BOOST_PP_FOR_108, BOOST_PP_TUPLE_EAT_4)(o(108, s), p, o, m) # define BOOST_PP_FOR_108(s, p, o, m) BOOST_PP_IF(p(109, s), m, BOOST_PP_TUPLE_EAT_2)(109, s) BOOST_PP_IF(p(109, s), BOOST_PP_FOR_109, BOOST_PP_TUPLE_EAT_4)(o(109, s), p, o, m) # define BOOST_PP_FOR_109(s, p, o, m) BOOST_PP_IF(p(110, s), m, BOOST_PP_TUPLE_EAT_2)(110, s) BOOST_PP_IF(p(110, s), BOOST_PP_FOR_110, BOOST_PP_TUPLE_EAT_4)(o(110, s), p, o, m) # define BOOST_PP_FOR_110(s, p, o, m) BOOST_PP_IF(p(111, s), m, BOOST_PP_TUPLE_EAT_2)(111, s) BOOST_PP_IF(p(111, s), BOOST_PP_FOR_111, BOOST_PP_TUPLE_EAT_4)(o(111, s), p, o, m) # define BOOST_PP_FOR_111(s, p, o, m) BOOST_PP_IF(p(112, s), m, BOOST_PP_TUPLE_EAT_2)(112, s) BOOST_PP_IF(p(112, s), BOOST_PP_FOR_112, BOOST_PP_TUPLE_EAT_4)(o(112, s), p, o, m) # define BOOST_PP_FOR_112(s, p, o, m) BOOST_PP_IF(p(113, s), m, BOOST_PP_TUPLE_EAT_2)(113, s) BOOST_PP_IF(p(113, s), BOOST_PP_FOR_113, BOOST_PP_TUPLE_EAT_4)(o(113, s), p, o, m) # define BOOST_PP_FOR_113(s, p, o, m) BOOST_PP_IF(p(114, s), m, BOOST_PP_TUPLE_EAT_2)(114, s) BOOST_PP_IF(p(114, s), BOOST_PP_FOR_114, BOOST_PP_TUPLE_EAT_4)(o(114, s), p, o, m) # define BOOST_PP_FOR_114(s, p, o, m) BOOST_PP_IF(p(115, s), m, BOOST_PP_TUPLE_EAT_2)(115, s) BOOST_PP_IF(p(115, s), BOOST_PP_FOR_115, BOOST_PP_TUPLE_EAT_4)(o(115, s), p, o, m) # define BOOST_PP_FOR_115(s, p, o, m) BOOST_PP_IF(p(116, s), m, BOOST_PP_TUPLE_EAT_2)(116, s) BOOST_PP_IF(p(116, s), BOOST_PP_FOR_116, BOOST_PP_TUPLE_EAT_4)(o(116, s), p, o, m) # define BOOST_PP_FOR_116(s, p, o, m) BOOST_PP_IF(p(117, s), m, BOOST_PP_TUPLE_EAT_2)(117, s) BOOST_PP_IF(p(117, s), BOOST_PP_FOR_117, BOOST_PP_TUPLE_EAT_4)(o(117, s), p, o, m) # define BOOST_PP_FOR_117(s, p, o, m) BOOST_PP_IF(p(118, s), m, BOOST_PP_TUPLE_EAT_2)(118, s) BOOST_PP_IF(p(118, s), BOOST_PP_FOR_118, BOOST_PP_TUPLE_EAT_4)(o(118, s), p, o, m) # define BOOST_PP_FOR_118(s, p, o, m) BOOST_PP_IF(p(119, s), m, BOOST_PP_TUPLE_EAT_2)(119, s) BOOST_PP_IF(p(119, s), BOOST_PP_FOR_119, BOOST_PP_TUPLE_EAT_4)(o(119, s), p, o, m) # define BOOST_PP_FOR_119(s, p, o, m) BOOST_PP_IF(p(120, s), m, BOOST_PP_TUPLE_EAT_2)(120, s) BOOST_PP_IF(p(120, s), BOOST_PP_FOR_120, BOOST_PP_TUPLE_EAT_4)(o(120, s), p, o, m) # define BOOST_PP_FOR_120(s, p, o, m) BOOST_PP_IF(p(121, s), m, BOOST_PP_TUPLE_EAT_2)(121, s) BOOST_PP_IF(p(121, s), BOOST_PP_FOR_121, BOOST_PP_TUPLE_EAT_4)(o(121, s), p, o, m) # define BOOST_PP_FOR_121(s, p, o, m) BOOST_PP_IF(p(122, s), m, BOOST_PP_TUPLE_EAT_2)(122, s) BOOST_PP_IF(p(122, s), BOOST_PP_FOR_122, BOOST_PP_TUPLE_EAT_4)(o(122, s), p, o, m) # define BOOST_PP_FOR_122(s, p, o, m) BOOST_PP_IF(p(123, s), m, BOOST_PP_TUPLE_EAT_2)(123, s) BOOST_PP_IF(p(123, s), BOOST_PP_FOR_123, BOOST_PP_TUPLE_EAT_4)(o(123, s), p, o, m) # define BOOST_PP_FOR_123(s, p, o, m) BOOST_PP_IF(p(124, s), m, BOOST_PP_TUPLE_EAT_2)(124, s) BOOST_PP_IF(p(124, s), BOOST_PP_FOR_124, BOOST_PP_TUPLE_EAT_4)(o(124, s), p, o, m) # define BOOST_PP_FOR_124(s, p, o, m) BOOST_PP_IF(p(125, s), m, BOOST_PP_TUPLE_EAT_2)(125, s) BOOST_PP_IF(p(125, s), BOOST_PP_FOR_125, BOOST_PP_TUPLE_EAT_4)(o(125, s), p, o, m) # define BOOST_PP_FOR_125(s, p, o, m) BOOST_PP_IF(p(126, s), m, BOOST_PP_TUPLE_EAT_2)(126, s) BOOST_PP_IF(p(126, s), BOOST_PP_FOR_126, BOOST_PP_TUPLE_EAT_4)(o(126, s), p, o, m) # define BOOST_PP_FOR_126(s, p, o, m) BOOST_PP_IF(p(127, s), m, BOOST_PP_TUPLE_EAT_2)(127, s) BOOST_PP_IF(p(127, s), BOOST_PP_FOR_127, BOOST_PP_TUPLE_EAT_4)(o(127, s), p, o, m) # define BOOST_PP_FOR_127(s, p, o, m) BOOST_PP_IF(p(128, s), m, BOOST_PP_TUPLE_EAT_2)(128, s) BOOST_PP_IF(p(128, s), BOOST_PP_FOR_128, BOOST_PP_TUPLE_EAT_4)(o(128, s), p, o, m) # define BOOST_PP_FOR_128(s, p, o, m) BOOST_PP_IF(p(129, s), m, BOOST_PP_TUPLE_EAT_2)(129, s) BOOST_PP_IF(p(129, s), BOOST_PP_FOR_129, BOOST_PP_TUPLE_EAT_4)(o(129, s), p, o, m) # define BOOST_PP_FOR_129(s, p, o, m) BOOST_PP_IF(p(130, s), m, BOOST_PP_TUPLE_EAT_2)(130, s) BOOST_PP_IF(p(130, s), BOOST_PP_FOR_130, BOOST_PP_TUPLE_EAT_4)(o(130, s), p, o, m) # define BOOST_PP_FOR_130(s, p, o, m) BOOST_PP_IF(p(131, s), m, BOOST_PP_TUPLE_EAT_2)(131, s) BOOST_PP_IF(p(131, s), BOOST_PP_FOR_131, BOOST_PP_TUPLE_EAT_4)(o(131, s), p, o, m) # define BOOST_PP_FOR_131(s, p, o, m) BOOST_PP_IF(p(132, s), m, BOOST_PP_TUPLE_EAT_2)(132, s) BOOST_PP_IF(p(132, s), BOOST_PP_FOR_132, BOOST_PP_TUPLE_EAT_4)(o(132, s), p, o, m) # define BOOST_PP_FOR_132(s, p, o, m) BOOST_PP_IF(p(133, s), m, BOOST_PP_TUPLE_EAT_2)(133, s) BOOST_PP_IF(p(133, s), BOOST_PP_FOR_133, BOOST_PP_TUPLE_EAT_4)(o(133, s), p, o, m) # define BOOST_PP_FOR_133(s, p, o, m) BOOST_PP_IF(p(134, s), m, BOOST_PP_TUPLE_EAT_2)(134, s) BOOST_PP_IF(p(134, s), BOOST_PP_FOR_134, BOOST_PP_TUPLE_EAT_4)(o(134, s), p, o, m) # define BOOST_PP_FOR_134(s, p, o, m) BOOST_PP_IF(p(135, s), m, BOOST_PP_TUPLE_EAT_2)(135, s) BOOST_PP_IF(p(135, s), BOOST_PP_FOR_135, BOOST_PP_TUPLE_EAT_4)(o(135, s), p, o, m) # define BOOST_PP_FOR_135(s, p, o, m) BOOST_PP_IF(p(136, s), m, BOOST_PP_TUPLE_EAT_2)(136, s) BOOST_PP_IF(p(136, s), BOOST_PP_FOR_136, BOOST_PP_TUPLE_EAT_4)(o(136, s), p, o, m) # define BOOST_PP_FOR_136(s, p, o, m) BOOST_PP_IF(p(137, s), m, BOOST_PP_TUPLE_EAT_2)(137, s) BOOST_PP_IF(p(137, s), BOOST_PP_FOR_137, BOOST_PP_TUPLE_EAT_4)(o(137, s), p, o, m) # define BOOST_PP_FOR_137(s, p, o, m) BOOST_PP_IF(p(138, s), m, BOOST_PP_TUPLE_EAT_2)(138, s) BOOST_PP_IF(p(138, s), BOOST_PP_FOR_138, BOOST_PP_TUPLE_EAT_4)(o(138, s), p, o, m) # define BOOST_PP_FOR_138(s, p, o, m) BOOST_PP_IF(p(139, s), m, BOOST_PP_TUPLE_EAT_2)(139, s) BOOST_PP_IF(p(139, s), BOOST_PP_FOR_139, BOOST_PP_TUPLE_EAT_4)(o(139, s), p, o, m) # define BOOST_PP_FOR_139(s, p, o, m) BOOST_PP_IF(p(140, s), m, BOOST_PP_TUPLE_EAT_2)(140, s) BOOST_PP_IF(p(140, s), BOOST_PP_FOR_140, BOOST_PP_TUPLE_EAT_4)(o(140, s), p, o, m) # define BOOST_PP_FOR_140(s, p, o, m) BOOST_PP_IF(p(141, s), m, BOOST_PP_TUPLE_EAT_2)(141, s) BOOST_PP_IF(p(141, s), BOOST_PP_FOR_141, BOOST_PP_TUPLE_EAT_4)(o(141, s), p, o, m) # define BOOST_PP_FOR_141(s, p, o, m) BOOST_PP_IF(p(142, s), m, BOOST_PP_TUPLE_EAT_2)(142, s) BOOST_PP_IF(p(142, s), BOOST_PP_FOR_142, BOOST_PP_TUPLE_EAT_4)(o(142, s), p, o, m) # define BOOST_PP_FOR_142(s, p, o, m) BOOST_PP_IF(p(143, s), m, BOOST_PP_TUPLE_EAT_2)(143, s) BOOST_PP_IF(p(143, s), BOOST_PP_FOR_143, BOOST_PP_TUPLE_EAT_4)(o(143, s), p, o, m) # define BOOST_PP_FOR_143(s, p, o, m) BOOST_PP_IF(p(144, s), m, BOOST_PP_TUPLE_EAT_2)(144, s) BOOST_PP_IF(p(144, s), BOOST_PP_FOR_144, BOOST_PP_TUPLE_EAT_4)(o(144, s), p, o, m) # define BOOST_PP_FOR_144(s, p, o, m) BOOST_PP_IF(p(145, s), m, BOOST_PP_TUPLE_EAT_2)(145, s) BOOST_PP_IF(p(145, s), BOOST_PP_FOR_145, BOOST_PP_TUPLE_EAT_4)(o(145, s), p, o, m) # define BOOST_PP_FOR_145(s, p, o, m) BOOST_PP_IF(p(146, s), m, BOOST_PP_TUPLE_EAT_2)(146, s) BOOST_PP_IF(p(146, s), BOOST_PP_FOR_146, BOOST_PP_TUPLE_EAT_4)(o(146, s), p, o, m) # define BOOST_PP_FOR_146(s, p, o, m) BOOST_PP_IF(p(147, s), m, BOOST_PP_TUPLE_EAT_2)(147, s) BOOST_PP_IF(p(147, s), BOOST_PP_FOR_147, BOOST_PP_TUPLE_EAT_4)(o(147, s), p, o, m) # define BOOST_PP_FOR_147(s, p, o, m) BOOST_PP_IF(p(148, s), m, BOOST_PP_TUPLE_EAT_2)(148, s) BOOST_PP_IF(p(148, s), BOOST_PP_FOR_148, BOOST_PP_TUPLE_EAT_4)(o(148, s), p, o, m) # define BOOST_PP_FOR_148(s, p, o, m) BOOST_PP_IF(p(149, s), m, BOOST_PP_TUPLE_EAT_2)(149, s) BOOST_PP_IF(p(149, s), BOOST_PP_FOR_149, BOOST_PP_TUPLE_EAT_4)(o(149, s), p, o, m) # define BOOST_PP_FOR_149(s, p, o, m) BOOST_PP_IF(p(150, s), m, BOOST_PP_TUPLE_EAT_2)(150, s) BOOST_PP_IF(p(150, s), BOOST_PP_FOR_150, BOOST_PP_TUPLE_EAT_4)(o(150, s), p, o, m) # define BOOST_PP_FOR_150(s, p, o, m) BOOST_PP_IF(p(151, s), m, BOOST_PP_TUPLE_EAT_2)(151, s) BOOST_PP_IF(p(151, s), BOOST_PP_FOR_151, BOOST_PP_TUPLE_EAT_4)(o(151, s), p, o, m) # define BOOST_PP_FOR_151(s, p, o, m) BOOST_PP_IF(p(152, s), m, BOOST_PP_TUPLE_EAT_2)(152, s) BOOST_PP_IF(p(152, s), BOOST_PP_FOR_152, BOOST_PP_TUPLE_EAT_4)(o(152, s), p, o, m) # define BOOST_PP_FOR_152(s, p, o, m) BOOST_PP_IF(p(153, s), m, BOOST_PP_TUPLE_EAT_2)(153, s) BOOST_PP_IF(p(153, s), BOOST_PP_FOR_153, BOOST_PP_TUPLE_EAT_4)(o(153, s), p, o, m) # define BOOST_PP_FOR_153(s, p, o, m) BOOST_PP_IF(p(154, s), m, BOOST_PP_TUPLE_EAT_2)(154, s) BOOST_PP_IF(p(154, s), BOOST_PP_FOR_154, BOOST_PP_TUPLE_EAT_4)(o(154, s), p, o, m) # define BOOST_PP_FOR_154(s, p, o, m) BOOST_PP_IF(p(155, s), m, BOOST_PP_TUPLE_EAT_2)(155, s) BOOST_PP_IF(p(155, s), BOOST_PP_FOR_155, BOOST_PP_TUPLE_EAT_4)(o(155, s), p, o, m) # define BOOST_PP_FOR_155(s, p, o, m) BOOST_PP_IF(p(156, s), m, BOOST_PP_TUPLE_EAT_2)(156, s) BOOST_PP_IF(p(156, s), BOOST_PP_FOR_156, BOOST_PP_TUPLE_EAT_4)(o(156, s), p, o, m) # define BOOST_PP_FOR_156(s, p, o, m) BOOST_PP_IF(p(157, s), m, BOOST_PP_TUPLE_EAT_2)(157, s) BOOST_PP_IF(p(157, s), BOOST_PP_FOR_157, BOOST_PP_TUPLE_EAT_4)(o(157, s), p, o, m) # define BOOST_PP_FOR_157(s, p, o, m) BOOST_PP_IF(p(158, s), m, BOOST_PP_TUPLE_EAT_2)(158, s) BOOST_PP_IF(p(158, s), BOOST_PP_FOR_158, BOOST_PP_TUPLE_EAT_4)(o(158, s), p, o, m) # define BOOST_PP_FOR_158(s, p, o, m) BOOST_PP_IF(p(159, s), m, BOOST_PP_TUPLE_EAT_2)(159, s) BOOST_PP_IF(p(159, s), BOOST_PP_FOR_159, BOOST_PP_TUPLE_EAT_4)(o(159, s), p, o, m) # define BOOST_PP_FOR_159(s, p, o, m) BOOST_PP_IF(p(160, s), m, BOOST_PP_TUPLE_EAT_2)(160, s) BOOST_PP_IF(p(160, s), BOOST_PP_FOR_160, BOOST_PP_TUPLE_EAT_4)(o(160, s), p, o, m) # define BOOST_PP_FOR_160(s, p, o, m) BOOST_PP_IF(p(161, s), m, BOOST_PP_TUPLE_EAT_2)(161, s) BOOST_PP_IF(p(161, s), BOOST_PP_FOR_161, BOOST_PP_TUPLE_EAT_4)(o(161, s), p, o, m) # define BOOST_PP_FOR_161(s, p, o, m) BOOST_PP_IF(p(162, s), m, BOOST_PP_TUPLE_EAT_2)(162, s) BOOST_PP_IF(p(162, s), BOOST_PP_FOR_162, BOOST_PP_TUPLE_EAT_4)(o(162, s), p, o, m) # define BOOST_PP_FOR_162(s, p, o, m) BOOST_PP_IF(p(163, s), m, BOOST_PP_TUPLE_EAT_2)(163, s) BOOST_PP_IF(p(163, s), BOOST_PP_FOR_163, BOOST_PP_TUPLE_EAT_4)(o(163, s), p, o, m) # define BOOST_PP_FOR_163(s, p, o, m) BOOST_PP_IF(p(164, s), m, BOOST_PP_TUPLE_EAT_2)(164, s) BOOST_PP_IF(p(164, s), BOOST_PP_FOR_164, BOOST_PP_TUPLE_EAT_4)(o(164, s), p, o, m) # define BOOST_PP_FOR_164(s, p, o, m) BOOST_PP_IF(p(165, s), m, BOOST_PP_TUPLE_EAT_2)(165, s) BOOST_PP_IF(p(165, s), BOOST_PP_FOR_165, BOOST_PP_TUPLE_EAT_4)(o(165, s), p, o, m) # define BOOST_PP_FOR_165(s, p, o, m) BOOST_PP_IF(p(166, s), m, BOOST_PP_TUPLE_EAT_2)(166, s) BOOST_PP_IF(p(166, s), BOOST_PP_FOR_166, BOOST_PP_TUPLE_EAT_4)(o(166, s), p, o, m) # define BOOST_PP_FOR_166(s, p, o, m) BOOST_PP_IF(p(167, s), m, BOOST_PP_TUPLE_EAT_2)(167, s) BOOST_PP_IF(p(167, s), BOOST_PP_FOR_167, BOOST_PP_TUPLE_EAT_4)(o(167, s), p, o, m) # define BOOST_PP_FOR_167(s, p, o, m) BOOST_PP_IF(p(168, s), m, BOOST_PP_TUPLE_EAT_2)(168, s) BOOST_PP_IF(p(168, s), BOOST_PP_FOR_168, BOOST_PP_TUPLE_EAT_4)(o(168, s), p, o, m) # define BOOST_PP_FOR_168(s, p, o, m) BOOST_PP_IF(p(169, s), m, BOOST_PP_TUPLE_EAT_2)(169, s) BOOST_PP_IF(p(169, s), BOOST_PP_FOR_169, BOOST_PP_TUPLE_EAT_4)(o(169, s), p, o, m) # define BOOST_PP_FOR_169(s, p, o, m) BOOST_PP_IF(p(170, s), m, BOOST_PP_TUPLE_EAT_2)(170, s) BOOST_PP_IF(p(170, s), BOOST_PP_FOR_170, BOOST_PP_TUPLE_EAT_4)(o(170, s), p, o, m) # define BOOST_PP_FOR_170(s, p, o, m) BOOST_PP_IF(p(171, s), m, BOOST_PP_TUPLE_EAT_2)(171, s) BOOST_PP_IF(p(171, s), BOOST_PP_FOR_171, BOOST_PP_TUPLE_EAT_4)(o(171, s), p, o, m) # define BOOST_PP_FOR_171(s, p, o, m) BOOST_PP_IF(p(172, s), m, BOOST_PP_TUPLE_EAT_2)(172, s) BOOST_PP_IF(p(172, s), BOOST_PP_FOR_172, BOOST_PP_TUPLE_EAT_4)(o(172, s), p, o, m) # define BOOST_PP_FOR_172(s, p, o, m) BOOST_PP_IF(p(173, s), m, BOOST_PP_TUPLE_EAT_2)(173, s) BOOST_PP_IF(p(173, s), BOOST_PP_FOR_173, BOOST_PP_TUPLE_EAT_4)(o(173, s), p, o, m) # define BOOST_PP_FOR_173(s, p, o, m) BOOST_PP_IF(p(174, s), m, BOOST_PP_TUPLE_EAT_2)(174, s) BOOST_PP_IF(p(174, s), BOOST_PP_FOR_174, BOOST_PP_TUPLE_EAT_4)(o(174, s), p, o, m) # define BOOST_PP_FOR_174(s, p, o, m) BOOST_PP_IF(p(175, s), m, BOOST_PP_TUPLE_EAT_2)(175, s) BOOST_PP_IF(p(175, s), BOOST_PP_FOR_175, BOOST_PP_TUPLE_EAT_4)(o(175, s), p, o, m) # define BOOST_PP_FOR_175(s, p, o, m) BOOST_PP_IF(p(176, s), m, BOOST_PP_TUPLE_EAT_2)(176, s) BOOST_PP_IF(p(176, s), BOOST_PP_FOR_176, BOOST_PP_TUPLE_EAT_4)(o(176, s), p, o, m) # define BOOST_PP_FOR_176(s, p, o, m) BOOST_PP_IF(p(177, s), m, BOOST_PP_TUPLE_EAT_2)(177, s) BOOST_PP_IF(p(177, s), BOOST_PP_FOR_177, BOOST_PP_TUPLE_EAT_4)(o(177, s), p, o, m) # define BOOST_PP_FOR_177(s, p, o, m) BOOST_PP_IF(p(178, s), m, BOOST_PP_TUPLE_EAT_2)(178, s) BOOST_PP_IF(p(178, s), BOOST_PP_FOR_178, BOOST_PP_TUPLE_EAT_4)(o(178, s), p, o, m) # define BOOST_PP_FOR_178(s, p, o, m) BOOST_PP_IF(p(179, s), m, BOOST_PP_TUPLE_EAT_2)(179, s) BOOST_PP_IF(p(179, s), BOOST_PP_FOR_179, BOOST_PP_TUPLE_EAT_4)(o(179, s), p, o, m) # define BOOST_PP_FOR_179(s, p, o, m) BOOST_PP_IF(p(180, s), m, BOOST_PP_TUPLE_EAT_2)(180, s) BOOST_PP_IF(p(180, s), BOOST_PP_FOR_180, BOOST_PP_TUPLE_EAT_4)(o(180, s), p, o, m) # define BOOST_PP_FOR_180(s, p, o, m) BOOST_PP_IF(p(181, s), m, BOOST_PP_TUPLE_EAT_2)(181, s) BOOST_PP_IF(p(181, s), BOOST_PP_FOR_181, BOOST_PP_TUPLE_EAT_4)(o(181, s), p, o, m) # define BOOST_PP_FOR_181(s, p, o, m) BOOST_PP_IF(p(182, s), m, BOOST_PP_TUPLE_EAT_2)(182, s) BOOST_PP_IF(p(182, s), BOOST_PP_FOR_182, BOOST_PP_TUPLE_EAT_4)(o(182, s), p, o, m) # define BOOST_PP_FOR_182(s, p, o, m) BOOST_PP_IF(p(183, s), m, BOOST_PP_TUPLE_EAT_2)(183, s) BOOST_PP_IF(p(183, s), BOOST_PP_FOR_183, BOOST_PP_TUPLE_EAT_4)(o(183, s), p, o, m) # define BOOST_PP_FOR_183(s, p, o, m) BOOST_PP_IF(p(184, s), m, BOOST_PP_TUPLE_EAT_2)(184, s) BOOST_PP_IF(p(184, s), BOOST_PP_FOR_184, BOOST_PP_TUPLE_EAT_4)(o(184, s), p, o, m) # define BOOST_PP_FOR_184(s, p, o, m) BOOST_PP_IF(p(185, s), m, BOOST_PP_TUPLE_EAT_2)(185, s) BOOST_PP_IF(p(185, s), BOOST_PP_FOR_185, BOOST_PP_TUPLE_EAT_4)(o(185, s), p, o, m) # define BOOST_PP_FOR_185(s, p, o, m) BOOST_PP_IF(p(186, s), m, BOOST_PP_TUPLE_EAT_2)(186, s) BOOST_PP_IF(p(186, s), BOOST_PP_FOR_186, BOOST_PP_TUPLE_EAT_4)(o(186, s), p, o, m) # define BOOST_PP_FOR_186(s, p, o, m) BOOST_PP_IF(p(187, s), m, BOOST_PP_TUPLE_EAT_2)(187, s) BOOST_PP_IF(p(187, s), BOOST_PP_FOR_187, BOOST_PP_TUPLE_EAT_4)(o(187, s), p, o, m) # define BOOST_PP_FOR_187(s, p, o, m) BOOST_PP_IF(p(188, s), m, BOOST_PP_TUPLE_EAT_2)(188, s) BOOST_PP_IF(p(188, s), BOOST_PP_FOR_188, BOOST_PP_TUPLE_EAT_4)(o(188, s), p, o, m) # define BOOST_PP_FOR_188(s, p, o, m) BOOST_PP_IF(p(189, s), m, BOOST_PP_TUPLE_EAT_2)(189, s) BOOST_PP_IF(p(189, s), BOOST_PP_FOR_189, BOOST_PP_TUPLE_EAT_4)(o(189, s), p, o, m) # define BOOST_PP_FOR_189(s, p, o, m) BOOST_PP_IF(p(190, s), m, BOOST_PP_TUPLE_EAT_2)(190, s) BOOST_PP_IF(p(190, s), BOOST_PP_FOR_190, BOOST_PP_TUPLE_EAT_4)(o(190, s), p, o, m) # define BOOST_PP_FOR_190(s, p, o, m) BOOST_PP_IF(p(191, s), m, BOOST_PP_TUPLE_EAT_2)(191, s) BOOST_PP_IF(p(191, s), BOOST_PP_FOR_191, BOOST_PP_TUPLE_EAT_4)(o(191, s), p, o, m) # define BOOST_PP_FOR_191(s, p, o, m) BOOST_PP_IF(p(192, s), m, BOOST_PP_TUPLE_EAT_2)(192, s) BOOST_PP_IF(p(192, s), BOOST_PP_FOR_192, BOOST_PP_TUPLE_EAT_4)(o(192, s), p, o, m) # define BOOST_PP_FOR_192(s, p, o, m) BOOST_PP_IF(p(193, s), m, BOOST_PP_TUPLE_EAT_2)(193, s) BOOST_PP_IF(p(193, s), BOOST_PP_FOR_193, BOOST_PP_TUPLE_EAT_4)(o(193, s), p, o, m) # define BOOST_PP_FOR_193(s, p, o, m) BOOST_PP_IF(p(194, s), m, BOOST_PP_TUPLE_EAT_2)(194, s) BOOST_PP_IF(p(194, s), BOOST_PP_FOR_194, BOOST_PP_TUPLE_EAT_4)(o(194, s), p, o, m) # define BOOST_PP_FOR_194(s, p, o, m) BOOST_PP_IF(p(195, s), m, BOOST_PP_TUPLE_EAT_2)(195, s) BOOST_PP_IF(p(195, s), BOOST_PP_FOR_195, BOOST_PP_TUPLE_EAT_4)(o(195, s), p, o, m) # define BOOST_PP_FOR_195(s, p, o, m) BOOST_PP_IF(p(196, s), m, BOOST_PP_TUPLE_EAT_2)(196, s) BOOST_PP_IF(p(196, s), BOOST_PP_FOR_196, BOOST_PP_TUPLE_EAT_4)(o(196, s), p, o, m) # define BOOST_PP_FOR_196(s, p, o, m) BOOST_PP_IF(p(197, s), m, BOOST_PP_TUPLE_EAT_2)(197, s) BOOST_PP_IF(p(197, s), BOOST_PP_FOR_197, BOOST_PP_TUPLE_EAT_4)(o(197, s), p, o, m) # define BOOST_PP_FOR_197(s, p, o, m) BOOST_PP_IF(p(198, s), m, BOOST_PP_TUPLE_EAT_2)(198, s) BOOST_PP_IF(p(198, s), BOOST_PP_FOR_198, BOOST_PP_TUPLE_EAT_4)(o(198, s), p, o, m) # define BOOST_PP_FOR_198(s, p, o, m) BOOST_PP_IF(p(199, s), m, BOOST_PP_TUPLE_EAT_2)(199, s) BOOST_PP_IF(p(199, s), BOOST_PP_FOR_199, BOOST_PP_TUPLE_EAT_4)(o(199, s), p, o, m) # define BOOST_PP_FOR_199(s, p, o, m) BOOST_PP_IF(p(200, s), m, BOOST_PP_TUPLE_EAT_2)(200, s) BOOST_PP_IF(p(200, s), BOOST_PP_FOR_200, BOOST_PP_TUPLE_EAT_4)(o(200, s), p, o, m) # define BOOST_PP_FOR_200(s, p, o, m) BOOST_PP_IF(p(201, s), m, BOOST_PP_TUPLE_EAT_2)(201, s) BOOST_PP_IF(p(201, s), BOOST_PP_FOR_201, BOOST_PP_TUPLE_EAT_4)(o(201, s), p, o, m) # define BOOST_PP_FOR_201(s, p, o, m) BOOST_PP_IF(p(202, s), m, BOOST_PP_TUPLE_EAT_2)(202, s) BOOST_PP_IF(p(202, s), BOOST_PP_FOR_202, BOOST_PP_TUPLE_EAT_4)(o(202, s), p, o, m) # define BOOST_PP_FOR_202(s, p, o, m) BOOST_PP_IF(p(203, s), m, BOOST_PP_TUPLE_EAT_2)(203, s) BOOST_PP_IF(p(203, s), BOOST_PP_FOR_203, BOOST_PP_TUPLE_EAT_4)(o(203, s), p, o, m) # define BOOST_PP_FOR_203(s, p, o, m) BOOST_PP_IF(p(204, s), m, BOOST_PP_TUPLE_EAT_2)(204, s) BOOST_PP_IF(p(204, s), BOOST_PP_FOR_204, BOOST_PP_TUPLE_EAT_4)(o(204, s), p, o, m) # define BOOST_PP_FOR_204(s, p, o, m) BOOST_PP_IF(p(205, s), m, BOOST_PP_TUPLE_EAT_2)(205, s) BOOST_PP_IF(p(205, s), BOOST_PP_FOR_205, BOOST_PP_TUPLE_EAT_4)(o(205, s), p, o, m) # define BOOST_PP_FOR_205(s, p, o, m) BOOST_PP_IF(p(206, s), m, BOOST_PP_TUPLE_EAT_2)(206, s) BOOST_PP_IF(p(206, s), BOOST_PP_FOR_206, BOOST_PP_TUPLE_EAT_4)(o(206, s), p, o, m) # define BOOST_PP_FOR_206(s, p, o, m) BOOST_PP_IF(p(207, s), m, BOOST_PP_TUPLE_EAT_2)(207, s) BOOST_PP_IF(p(207, s), BOOST_PP_FOR_207, BOOST_PP_TUPLE_EAT_4)(o(207, s), p, o, m) # define BOOST_PP_FOR_207(s, p, o, m) BOOST_PP_IF(p(208, s), m, BOOST_PP_TUPLE_EAT_2)(208, s) BOOST_PP_IF(p(208, s), BOOST_PP_FOR_208, BOOST_PP_TUPLE_EAT_4)(o(208, s), p, o, m) # define BOOST_PP_FOR_208(s, p, o, m) BOOST_PP_IF(p(209, s), m, BOOST_PP_TUPLE_EAT_2)(209, s) BOOST_PP_IF(p(209, s), BOOST_PP_FOR_209, BOOST_PP_TUPLE_EAT_4)(o(209, s), p, o, m) # define BOOST_PP_FOR_209(s, p, o, m) BOOST_PP_IF(p(210, s), m, BOOST_PP_TUPLE_EAT_2)(210, s) BOOST_PP_IF(p(210, s), BOOST_PP_FOR_210, BOOST_PP_TUPLE_EAT_4)(o(210, s), p, o, m) # define BOOST_PP_FOR_210(s, p, o, m) BOOST_PP_IF(p(211, s), m, BOOST_PP_TUPLE_EAT_2)(211, s) BOOST_PP_IF(p(211, s), BOOST_PP_FOR_211, BOOST_PP_TUPLE_EAT_4)(o(211, s), p, o, m) # define BOOST_PP_FOR_211(s, p, o, m) BOOST_PP_IF(p(212, s), m, BOOST_PP_TUPLE_EAT_2)(212, s) BOOST_PP_IF(p(212, s), BOOST_PP_FOR_212, BOOST_PP_TUPLE_EAT_4)(o(212, s), p, o, m) # define BOOST_PP_FOR_212(s, p, o, m) BOOST_PP_IF(p(213, s), m, BOOST_PP_TUPLE_EAT_2)(213, s) BOOST_PP_IF(p(213, s), BOOST_PP_FOR_213, BOOST_PP_TUPLE_EAT_4)(o(213, s), p, o, m) # define BOOST_PP_FOR_213(s, p, o, m) BOOST_PP_IF(p(214, s), m, BOOST_PP_TUPLE_EAT_2)(214, s) BOOST_PP_IF(p(214, s), BOOST_PP_FOR_214, BOOST_PP_TUPLE_EAT_4)(o(214, s), p, o, m) # define BOOST_PP_FOR_214(s, p, o, m) BOOST_PP_IF(p(215, s), m, BOOST_PP_TUPLE_EAT_2)(215, s) BOOST_PP_IF(p(215, s), BOOST_PP_FOR_215, BOOST_PP_TUPLE_EAT_4)(o(215, s), p, o, m) # define BOOST_PP_FOR_215(s, p, o, m) BOOST_PP_IF(p(216, s), m, BOOST_PP_TUPLE_EAT_2)(216, s) BOOST_PP_IF(p(216, s), BOOST_PP_FOR_216, BOOST_PP_TUPLE_EAT_4)(o(216, s), p, o, m) # define BOOST_PP_FOR_216(s, p, o, m) BOOST_PP_IF(p(217, s), m, BOOST_PP_TUPLE_EAT_2)(217, s) BOOST_PP_IF(p(217, s), BOOST_PP_FOR_217, BOOST_PP_TUPLE_EAT_4)(o(217, s), p, o, m) # define BOOST_PP_FOR_217(s, p, o, m) BOOST_PP_IF(p(218, s), m, BOOST_PP_TUPLE_EAT_2)(218, s) BOOST_PP_IF(p(218, s), BOOST_PP_FOR_218, BOOST_PP_TUPLE_EAT_4)(o(218, s), p, o, m) # define BOOST_PP_FOR_218(s, p, o, m) BOOST_PP_IF(p(219, s), m, BOOST_PP_TUPLE_EAT_2)(219, s) BOOST_PP_IF(p(219, s), BOOST_PP_FOR_219, BOOST_PP_TUPLE_EAT_4)(o(219, s), p, o, m) # define BOOST_PP_FOR_219(s, p, o, m) BOOST_PP_IF(p(220, s), m, BOOST_PP_TUPLE_EAT_2)(220, s) BOOST_PP_IF(p(220, s), BOOST_PP_FOR_220, BOOST_PP_TUPLE_EAT_4)(o(220, s), p, o, m) # define BOOST_PP_FOR_220(s, p, o, m) BOOST_PP_IF(p(221, s), m, BOOST_PP_TUPLE_EAT_2)(221, s) BOOST_PP_IF(p(221, s), BOOST_PP_FOR_221, BOOST_PP_TUPLE_EAT_4)(o(221, s), p, o, m) # define BOOST_PP_FOR_221(s, p, o, m) BOOST_PP_IF(p(222, s), m, BOOST_PP_TUPLE_EAT_2)(222, s) BOOST_PP_IF(p(222, s), BOOST_PP_FOR_222, BOOST_PP_TUPLE_EAT_4)(o(222, s), p, o, m) # define BOOST_PP_FOR_222(s, p, o, m) BOOST_PP_IF(p(223, s), m, BOOST_PP_TUPLE_EAT_2)(223, s) BOOST_PP_IF(p(223, s), BOOST_PP_FOR_223, BOOST_PP_TUPLE_EAT_4)(o(223, s), p, o, m) # define BOOST_PP_FOR_223(s, p, o, m) BOOST_PP_IF(p(224, s), m, BOOST_PP_TUPLE_EAT_2)(224, s) BOOST_PP_IF(p(224, s), BOOST_PP_FOR_224, BOOST_PP_TUPLE_EAT_4)(o(224, s), p, o, m) # define BOOST_PP_FOR_224(s, p, o, m) BOOST_PP_IF(p(225, s), m, BOOST_PP_TUPLE_EAT_2)(225, s) BOOST_PP_IF(p(225, s), BOOST_PP_FOR_225, BOOST_PP_TUPLE_EAT_4)(o(225, s), p, o, m) # define BOOST_PP_FOR_225(s, p, o, m) BOOST_PP_IF(p(226, s), m, BOOST_PP_TUPLE_EAT_2)(226, s) BOOST_PP_IF(p(226, s), BOOST_PP_FOR_226, BOOST_PP_TUPLE_EAT_4)(o(226, s), p, o, m) # define BOOST_PP_FOR_226(s, p, o, m) BOOST_PP_IF(p(227, s), m, BOOST_PP_TUPLE_EAT_2)(227, s) BOOST_PP_IF(p(227, s), BOOST_PP_FOR_227, BOOST_PP_TUPLE_EAT_4)(o(227, s), p, o, m) # define BOOST_PP_FOR_227(s, p, o, m) BOOST_PP_IF(p(228, s), m, BOOST_PP_TUPLE_EAT_2)(228, s) BOOST_PP_IF(p(228, s), BOOST_PP_FOR_228, BOOST_PP_TUPLE_EAT_4)(o(228, s), p, o, m) # define BOOST_PP_FOR_228(s, p, o, m) BOOST_PP_IF(p(229, s), m, BOOST_PP_TUPLE_EAT_2)(229, s) BOOST_PP_IF(p(229, s), BOOST_PP_FOR_229, BOOST_PP_TUPLE_EAT_4)(o(229, s), p, o, m) # define BOOST_PP_FOR_229(s, p, o, m) BOOST_PP_IF(p(230, s), m, BOOST_PP_TUPLE_EAT_2)(230, s) BOOST_PP_IF(p(230, s), BOOST_PP_FOR_230, BOOST_PP_TUPLE_EAT_4)(o(230, s), p, o, m) # define BOOST_PP_FOR_230(s, p, o, m) BOOST_PP_IF(p(231, s), m, BOOST_PP_TUPLE_EAT_2)(231, s) BOOST_PP_IF(p(231, s), BOOST_PP_FOR_231, BOOST_PP_TUPLE_EAT_4)(o(231, s), p, o, m) # define BOOST_PP_FOR_231(s, p, o, m) BOOST_PP_IF(p(232, s), m, BOOST_PP_TUPLE_EAT_2)(232, s) BOOST_PP_IF(p(232, s), BOOST_PP_FOR_232, BOOST_PP_TUPLE_EAT_4)(o(232, s), p, o, m) # define BOOST_PP_FOR_232(s, p, o, m) BOOST_PP_IF(p(233, s), m, BOOST_PP_TUPLE_EAT_2)(233, s) BOOST_PP_IF(p(233, s), BOOST_PP_FOR_233, BOOST_PP_TUPLE_EAT_4)(o(233, s), p, o, m) # define BOOST_PP_FOR_233(s, p, o, m) BOOST_PP_IF(p(234, s), m, BOOST_PP_TUPLE_EAT_2)(234, s) BOOST_PP_IF(p(234, s), BOOST_PP_FOR_234, BOOST_PP_TUPLE_EAT_4)(o(234, s), p, o, m) # define BOOST_PP_FOR_234(s, p, o, m) BOOST_PP_IF(p(235, s), m, BOOST_PP_TUPLE_EAT_2)(235, s) BOOST_PP_IF(p(235, s), BOOST_PP_FOR_235, BOOST_PP_TUPLE_EAT_4)(o(235, s), p, o, m) # define BOOST_PP_FOR_235(s, p, o, m) BOOST_PP_IF(p(236, s), m, BOOST_PP_TUPLE_EAT_2)(236, s) BOOST_PP_IF(p(236, s), BOOST_PP_FOR_236, BOOST_PP_TUPLE_EAT_4)(o(236, s), p, o, m) # define BOOST_PP_FOR_236(s, p, o, m) BOOST_PP_IF(p(237, s), m, BOOST_PP_TUPLE_EAT_2)(237, s) BOOST_PP_IF(p(237, s), BOOST_PP_FOR_237, BOOST_PP_TUPLE_EAT_4)(o(237, s), p, o, m) # define BOOST_PP_FOR_237(s, p, o, m) BOOST_PP_IF(p(238, s), m, BOOST_PP_TUPLE_EAT_2)(238, s) BOOST_PP_IF(p(238, s), BOOST_PP_FOR_238, BOOST_PP_TUPLE_EAT_4)(o(238, s), p, o, m) # define BOOST_PP_FOR_238(s, p, o, m) BOOST_PP_IF(p(239, s), m, BOOST_PP_TUPLE_EAT_2)(239, s) BOOST_PP_IF(p(239, s), BOOST_PP_FOR_239, BOOST_PP_TUPLE_EAT_4)(o(239, s), p, o, m) # define BOOST_PP_FOR_239(s, p, o, m) BOOST_PP_IF(p(240, s), m, BOOST_PP_TUPLE_EAT_2)(240, s) BOOST_PP_IF(p(240, s), BOOST_PP_FOR_240, BOOST_PP_TUPLE_EAT_4)(o(240, s), p, o, m) # define BOOST_PP_FOR_240(s, p, o, m) BOOST_PP_IF(p(241, s), m, BOOST_PP_TUPLE_EAT_2)(241, s) BOOST_PP_IF(p(241, s), BOOST_PP_FOR_241, BOOST_PP_TUPLE_EAT_4)(o(241, s), p, o, m) # define BOOST_PP_FOR_241(s, p, o, m) BOOST_PP_IF(p(242, s), m, BOOST_PP_TUPLE_EAT_2)(242, s) BOOST_PP_IF(p(242, s), BOOST_PP_FOR_242, BOOST_PP_TUPLE_EAT_4)(o(242, s), p, o, m) # define BOOST_PP_FOR_242(s, p, o, m) BOOST_PP_IF(p(243, s), m, BOOST_PP_TUPLE_EAT_2)(243, s) BOOST_PP_IF(p(243, s), BOOST_PP_FOR_243, BOOST_PP_TUPLE_EAT_4)(o(243, s), p, o, m) # define BOOST_PP_FOR_243(s, p, o, m) BOOST_PP_IF(p(244, s), m, BOOST_PP_TUPLE_EAT_2)(244, s) BOOST_PP_IF(p(244, s), BOOST_PP_FOR_244, BOOST_PP_TUPLE_EAT_4)(o(244, s), p, o, m) # define BOOST_PP_FOR_244(s, p, o, m) BOOST_PP_IF(p(245, s), m, BOOST_PP_TUPLE_EAT_2)(245, s) BOOST_PP_IF(p(245, s), BOOST_PP_FOR_245, BOOST_PP_TUPLE_EAT_4)(o(245, s), p, o, m) # define BOOST_PP_FOR_245(s, p, o, m) BOOST_PP_IF(p(246, s), m, BOOST_PP_TUPLE_EAT_2)(246, s) BOOST_PP_IF(p(246, s), BOOST_PP_FOR_246, BOOST_PP_TUPLE_EAT_4)(o(246, s), p, o, m) # define BOOST_PP_FOR_246(s, p, o, m) BOOST_PP_IF(p(247, s), m, BOOST_PP_TUPLE_EAT_2)(247, s) BOOST_PP_IF(p(247, s), BOOST_PP_FOR_247, BOOST_PP_TUPLE_EAT_4)(o(247, s), p, o, m) # define BOOST_PP_FOR_247(s, p, o, m) BOOST_PP_IF(p(248, s), m, BOOST_PP_TUPLE_EAT_2)(248, s) BOOST_PP_IF(p(248, s), BOOST_PP_FOR_248, BOOST_PP_TUPLE_EAT_4)(o(248, s), p, o, m) # define BOOST_PP_FOR_248(s, p, o, m) BOOST_PP_IF(p(249, s), m, BOOST_PP_TUPLE_EAT_2)(249, s) BOOST_PP_IF(p(249, s), BOOST_PP_FOR_249, BOOST_PP_TUPLE_EAT_4)(o(249, s), p, o, m) # define BOOST_PP_FOR_249(s, p, o, m) BOOST_PP_IF(p(250, s), m, BOOST_PP_TUPLE_EAT_2)(250, s) BOOST_PP_IF(p(250, s), BOOST_PP_FOR_250, BOOST_PP_TUPLE_EAT_4)(o(250, s), p, o, m) # define BOOST_PP_FOR_250(s, p, o, m) BOOST_PP_IF(p(251, s), m, BOOST_PP_TUPLE_EAT_2)(251, s) BOOST_PP_IF(p(251, s), BOOST_PP_FOR_251, BOOST_PP_TUPLE_EAT_4)(o(251, s), p, o, m) # define BOOST_PP_FOR_251(s, p, o, m) BOOST_PP_IF(p(252, s), m, BOOST_PP_TUPLE_EAT_2)(252, s) BOOST_PP_IF(p(252, s), BOOST_PP_FOR_252, BOOST_PP_TUPLE_EAT_4)(o(252, s), p, o, m) # define BOOST_PP_FOR_252(s, p, o, m) BOOST_PP_IF(p(253, s), m, BOOST_PP_TUPLE_EAT_2)(253, s) BOOST_PP_IF(p(253, s), BOOST_PP_FOR_253, BOOST_PP_TUPLE_EAT_4)(o(253, s), p, o, m) # define BOOST_PP_FOR_253(s, p, o, m) BOOST_PP_IF(p(254, s), m, BOOST_PP_TUPLE_EAT_2)(254, s) BOOST_PP_IF(p(254, s), BOOST_PP_FOR_254, BOOST_PP_TUPLE_EAT_4)(o(254, s), p, o, m) # define BOOST_PP_FOR_254(s, p, o, m) BOOST_PP_IF(p(255, s), m, BOOST_PP_TUPLE_EAT_2)(255, s) BOOST_PP_IF(p(255, s), BOOST_PP_FOR_255, BOOST_PP_TUPLE_EAT_4)(o(255, s), p, o, m) # define BOOST_PP_FOR_255(s, p, o, m) BOOST_PP_IF(p(256, s), m, BOOST_PP_TUPLE_EAT_2)(256, s) BOOST_PP_IF(p(256, s), BOOST_PP_FOR_256, BOOST_PP_TUPLE_EAT_4)(o(256, s), p, o, m) # define BOOST_PP_FOR_256(s, p, o, m) BOOST_PP_IF(p(257, s), m, BOOST_PP_TUPLE_EAT_2)(257, s) BOOST_PP_IF(p(257, s), BOOST_PP_FOR_257, BOOST_PP_TUPLE_EAT_4)(o(257, s), p, o, m) # # endif ================================================ FILE: benchmarks/boost/preprocessor/repetition/enum.hpp ================================================ # /* Copyright (C) 2001 # * Housemarque Oy # * http://www.housemarque.com # * # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # */ # # /* Revised by Paul Mensonides (2002) */ # # /* See http://www.boost.org for most recent version. */ # # ifndef BOOST_PREPROCESSOR_REPETITION_ENUM_HPP # define BOOST_PREPROCESSOR_REPETITION_ENUM_HPP # # include # include # include # include # include # include # include # include # # /* BOOST_PP_ENUM */ # # if 0 # define BOOST_PP_ENUM(count, macro, data) # endif # # define BOOST_PP_ENUM BOOST_PP_CAT(BOOST_PP_ENUM_, BOOST_PP_AUTO_REC(BOOST_PP_REPEAT_P, 4)) # # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() # define BOOST_PP_ENUM_1(c, m, d) BOOST_PP_REPEAT_1(c, BOOST_PP_ENUM_M_1, (m, d)) # define BOOST_PP_ENUM_2(c, m, d) BOOST_PP_REPEAT_2(c, BOOST_PP_ENUM_M_2, (m, d)) # define BOOST_PP_ENUM_3(c, m, d) BOOST_PP_REPEAT_3(c, BOOST_PP_ENUM_M_3, (m, d)) # else # define BOOST_PP_ENUM_1(c, m, d) BOOST_PP_ENUM_1_I(c, m, d) # define BOOST_PP_ENUM_2(c, m, d) BOOST_PP_ENUM_2_I(c, m, d) # define BOOST_PP_ENUM_3(c, m, d) BOOST_PP_ENUM_3_I(c, m, d) # define BOOST_PP_ENUM_1_I(c, m, d) BOOST_PP_REPEAT_1(c, BOOST_PP_ENUM_M_1, (m, d)) # define BOOST_PP_ENUM_2_I(c, m, d) BOOST_PP_REPEAT_2(c, BOOST_PP_ENUM_M_2, (m, d)) # define BOOST_PP_ENUM_3_I(c, m, d) BOOST_PP_REPEAT_3(c, BOOST_PP_ENUM_M_3, (m, d)) # endif # # define BOOST_PP_ENUM_4(c, m, d) BOOST_PP_ERROR(0x0003) # # if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_STRICT() # define BOOST_PP_ENUM_M_1(z, n, md) BOOST_PP_ENUM_M_1_IM(z, n, BOOST_PP_TUPLE_REM_2 md) # define BOOST_PP_ENUM_M_2(z, n, md) BOOST_PP_ENUM_M_2_IM(z, n, BOOST_PP_TUPLE_REM_2 md) # define BOOST_PP_ENUM_M_3(z, n, md) BOOST_PP_ENUM_M_3_IM(z, n, BOOST_PP_TUPLE_REM_2 md) # define BOOST_PP_ENUM_M_1_IM(z, n, im) BOOST_PP_ENUM_M_1_I(z, n, im) # define BOOST_PP_ENUM_M_2_IM(z, n, im) BOOST_PP_ENUM_M_2_I(z, n, im) # define BOOST_PP_ENUM_M_3_IM(z, n, im) BOOST_PP_ENUM_M_3_I(z, n, im) # else # define BOOST_PP_ENUM_M_1(z, n, md) BOOST_PP_ENUM_M_1_I(z, n, BOOST_PP_TUPLE_ELEM(2, 0, md), BOOST_PP_TUPLE_ELEM(2, 1, md)) # define BOOST_PP_ENUM_M_2(z, n, md) BOOST_PP_ENUM_M_2_I(z, n, BOOST_PP_TUPLE_ELEM(2, 0, md), BOOST_PP_TUPLE_ELEM(2, 1, md)) # define BOOST_PP_ENUM_M_3(z, n, md) BOOST_PP_ENUM_M_3_I(z, n, BOOST_PP_TUPLE_ELEM(2, 0, md), BOOST_PP_TUPLE_ELEM(2, 1, md)) # endif # # define BOOST_PP_ENUM_M_1_I(z, n, m, d) BOOST_PP_COMMA_IF(n) m(z, n, d) # define BOOST_PP_ENUM_M_2_I(z, n, m, d) BOOST_PP_COMMA_IF(n) m(z, n, d) # define BOOST_PP_ENUM_M_3_I(z, n, m, d) BOOST_PP_COMMA_IF(n) m(z, n, d) # # endif ================================================ FILE: benchmarks/boost/preprocessor/repetition/enum_binary_params.hpp ================================================ # /* ************************************************************************** # * * # * (C) Copyright Paul Mensonides 2002. # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # * * # ************************************************************************** */ # # /* See http://www.boost.org for most recent version. */ # # ifndef BOOST_PREPROCESSOR_REPETITION_ENUM_BINARY_PARAMS_HPP # define BOOST_PREPROCESSOR_REPETITION_ENUM_BINARY_PARAMS_HPP # # include # include # include # include # include # include # # /* BOOST_PP_ENUM_BINARY_PARAMS */ # # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() # define BOOST_PP_ENUM_BINARY_PARAMS(count, p1, p2) BOOST_PP_REPEAT(count, BOOST_PP_ENUM_BINARY_PARAMS_M, (p1, p2)) # else # define BOOST_PP_ENUM_BINARY_PARAMS(count, p1, p2) BOOST_PP_ENUM_BINARY_PARAMS_I(count, p1, p2) # define BOOST_PP_ENUM_BINARY_PARAMS_I(count, p1, p2) BOOST_PP_REPEAT(count, BOOST_PP_ENUM_BINARY_PARAMS_M, (p1, p2)) # endif # # if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_STRICT() # define BOOST_PP_ENUM_BINARY_PARAMS_M(z, n, pp) BOOST_PP_ENUM_BINARY_PARAMS_M_IM(z, n, BOOST_PP_TUPLE_REM_2 pp) # define BOOST_PP_ENUM_BINARY_PARAMS_M_IM(z, n, im) BOOST_PP_ENUM_BINARY_PARAMS_M_I(z, n, im) # else # define BOOST_PP_ENUM_BINARY_PARAMS_M(z, n, pp) BOOST_PP_ENUM_BINARY_PARAMS_M_I(z, n, BOOST_PP_TUPLE_ELEM(2, 0, pp), BOOST_PP_TUPLE_ELEM(2, 1, pp)) # endif # # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MSVC() # define BOOST_PP_ENUM_BINARY_PARAMS_M_I(z, n, p1, p2) BOOST_PP_ENUM_BINARY_PARAMS_M_II(z, n, p1, p2) # define BOOST_PP_ENUM_BINARY_PARAMS_M_II(z, n, p1, p2) BOOST_PP_COMMA_IF(n) p1 ## n p2 ## n # else # define BOOST_PP_ENUM_BINARY_PARAMS_M_I(z, n, p1, p2) BOOST_PP_COMMA_IF(n) BOOST_PP_CAT(p1, n) BOOST_PP_CAT(p2, n) # endif # # /* BOOST_PP_ENUM_BINARY_PARAMS_Z */ # # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() # define BOOST_PP_ENUM_BINARY_PARAMS_Z(z, count, p1, p2) BOOST_PP_REPEAT_ ## z(count, BOOST_PP_ENUM_BINARY_PARAMS_M, (p1, p2)) # else # define BOOST_PP_ENUM_BINARY_PARAMS_Z(z, count, p1, p2) BOOST_PP_ENUM_BINARY_PARAMS_Z_I(z, count, p1, p2) # define BOOST_PP_ENUM_BINARY_PARAMS_Z_I(z, count, p1, p2) BOOST_PP_REPEAT_ ## z(count, BOOST_PP_ENUM_BINARY_PARAMS_M, (p1, p2)) # endif # # endif ================================================ FILE: benchmarks/boost/preprocessor/repetition/enum_params.hpp ================================================ # /* Copyright (C) 2001 # * Housemarque Oy # * http://www.housemarque.com # * # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # */ # # /* Revised by Paul Mensonides (2002) */ # # /* See http://www.boost.org for most recent version. */ # # ifndef BOOST_PREPROCESSOR_REPETITION_ENUM_PARAMS_HPP # define BOOST_PREPROCESSOR_REPETITION_ENUM_PARAMS_HPP # # include # include # include # # /* BOOST_PP_ENUM_PARAMS */ # # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() # define BOOST_PP_ENUM_PARAMS(count, param) BOOST_PP_REPEAT(count, BOOST_PP_ENUM_PARAMS_M, param) # else # define BOOST_PP_ENUM_PARAMS(count, param) BOOST_PP_ENUM_PARAMS_I(count, param) # define BOOST_PP_ENUM_PARAMS_I(count, param) BOOST_PP_REPEAT(count, BOOST_PP_ENUM_PARAMS_M, param) # endif # # define BOOST_PP_ENUM_PARAMS_M(z, n, param) BOOST_PP_COMMA_IF(n) param ## n # # /* BOOST_PP_ENUM_PARAMS_Z */ # # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() # define BOOST_PP_ENUM_PARAMS_Z(z, count, param) BOOST_PP_REPEAT_ ## z(count, BOOST_PP_ENUM_PARAMS_M, param) # else # define BOOST_PP_ENUM_PARAMS_Z(z, count, param) BOOST_PP_ENUM_PARAMS_Z_I(z, count, param) # define BOOST_PP_ENUM_PARAMS_Z_I(z, count, param) BOOST_PP_REPEAT_ ## z(count, BOOST_PP_ENUM_PARAMS_M, param) # endif # # endif ================================================ FILE: benchmarks/boost/preprocessor/repetition/enum_params_with_a_default.hpp ================================================ # /* Copyright (C) 2001 # * Housemarque Oy # * http://www.housemarque.com # * # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # */ # # /* Revised by Paul Mensonides (2002) */ # # /* See http://www.boost.org for most recent version. */ # # ifndef BOOST_PREPROCESSOR_REPETITION_ENUM_PARAMS_WITH_A_DEFAULT_HPP # define BOOST_PREPROCESSOR_REPETITION_ENUM_PARAMS_WITH_A_DEFAULT_HPP # # include # include # include # # /* BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT */ # # define BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT(count, param, def) BOOST_PP_ENUM_BINARY_PARAMS(count, param, = def BOOST_PP_INTERCEPT) # # endif ================================================ FILE: benchmarks/boost/preprocessor/repetition/enum_shifted.hpp ================================================ # /* Copyright (C) 2001 # * Housemarque Oy # * http://www.housemarque.com # * # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # */ # # /* Revised by Paul Mensonides (2002) */ # # /* See http://www.boost.org for most recent version. */ # # ifndef BOOST_PREPROCESSOR_REPETITION_ENUM_SHIFTED_HPP # define BOOST_PREPROCESSOR_REPETITION_ENUM_SHIFTED_HPP # # include # include # include # include # include # include # include # include # include # include # # /* BOOST_PP_ENUM_SHIFTED */ # # if 0 # define BOOST_PP_ENUM_SHIFTED(count, macro, data) # endif # # define BOOST_PP_ENUM_SHIFTED BOOST_PP_CAT(BOOST_PP_ENUM_SHIFTED_, BOOST_PP_AUTO_REC(BOOST_PP_REPEAT_P, 4)) # # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() # define BOOST_PP_ENUM_SHIFTED_1(c, m, d) BOOST_PP_REPEAT_1(BOOST_PP_DEC(c), BOOST_PP_ENUM_SHIFTED_M_1, (m, d)) # define BOOST_PP_ENUM_SHIFTED_2(c, m, d) BOOST_PP_REPEAT_2(BOOST_PP_DEC(c), BOOST_PP_ENUM_SHIFTED_M_2, (m, d)) # define BOOST_PP_ENUM_SHIFTED_3(c, m, d) BOOST_PP_REPEAT_3(BOOST_PP_DEC(c), BOOST_PP_ENUM_SHIFTED_M_3, (m, d)) # else # define BOOST_PP_ENUM_SHIFTED_1(c, m, d) BOOST_PP_ENUM_SHIFTED_1_I(c, m, d) # define BOOST_PP_ENUM_SHIFTED_2(c, m, d) BOOST_PP_ENUM_SHIFTED_1_2(c, m, d) # define BOOST_PP_ENUM_SHIFTED_3(c, m, d) BOOST_PP_ENUM_SHIFTED_1_3(c, m, d) # define BOOST_PP_ENUM_SHIFTED_1_I(c, m, d) BOOST_PP_REPEAT_1(BOOST_PP_DEC(c), BOOST_PP_ENUM_SHIFTED_M_1, (m, d)) # define BOOST_PP_ENUM_SHIFTED_2_I(c, m, d) BOOST_PP_REPEAT_2(BOOST_PP_DEC(c), BOOST_PP_ENUM_SHIFTED_M_2, (m, d)) # define BOOST_PP_ENUM_SHIFTED_3_I(c, m, d) BOOST_PP_REPEAT_3(BOOST_PP_DEC(c), BOOST_PP_ENUM_SHIFTED_M_3, (m, d)) # endif # # define BOOST_PP_ENUM_SHIFTED_4(c, m, d) BOOST_PP_ERROR(0x0003) # # if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_STRICT() # define BOOST_PP_ENUM_SHIFTED_M_1(z, n, md) BOOST_PP_ENUM_SHIFTED_M_1_IM(z, n, BOOST_PP_TUPLE_REM_2 md) # define BOOST_PP_ENUM_SHIFTED_M_2(z, n, md) BOOST_PP_ENUM_SHIFTED_M_2_IM(z, n, BOOST_PP_TUPLE_REM_2 md) # define BOOST_PP_ENUM_SHIFTED_M_3(z, n, md) BOOST_PP_ENUM_SHIFTED_M_3_IM(z, n, BOOST_PP_TUPLE_REM_2 md) # define BOOST_PP_ENUM_SHIFTED_M_1_IM(z, n, im) BOOST_PP_ENUM_SHIFTED_M_1_I(z, n, im) # define BOOST_PP_ENUM_SHIFTED_M_2_IM(z, n, im) BOOST_PP_ENUM_SHIFTED_M_2_I(z, n, im) # define BOOST_PP_ENUM_SHIFTED_M_3_IM(z, n, im) BOOST_PP_ENUM_SHIFTED_M_3_I(z, n, im) # else # define BOOST_PP_ENUM_SHIFTED_M_1(z, n, md) BOOST_PP_ENUM_SHIFTED_M_1_I(z, n, BOOST_PP_TUPLE_ELEM(2, 0, md), BOOST_PP_TUPLE_ELEM(2, 1, md)) # define BOOST_PP_ENUM_SHIFTED_M_2(z, n, md) BOOST_PP_ENUM_SHIFTED_M_2_I(z, n, BOOST_PP_TUPLE_ELEM(2, 0, md), BOOST_PP_TUPLE_ELEM(2, 1, md)) # define BOOST_PP_ENUM_SHIFTED_M_3(z, n, md) BOOST_PP_ENUM_SHIFTED_M_3_I(z, n, BOOST_PP_TUPLE_ELEM(2, 0, md), BOOST_PP_TUPLE_ELEM(2, 1, md)) # endif # # define BOOST_PP_ENUM_SHIFTED_M_1_I(z, n, m, d) BOOST_PP_COMMA_IF(n) m(z, BOOST_PP_INC(n), d) # define BOOST_PP_ENUM_SHIFTED_M_2_I(z, n, m, d) BOOST_PP_COMMA_IF(n) m(z, BOOST_PP_INC(n), d) # define BOOST_PP_ENUM_SHIFTED_M_3_I(z, n, m, d) BOOST_PP_COMMA_IF(n) m(z, BOOST_PP_INC(n), d) # # endif ================================================ FILE: benchmarks/boost/preprocessor/repetition/enum_shifted_params.hpp ================================================ # /* Copyright (C) 2001 # * Housemarque Oy # * http://www.housemarque.com # * # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # */ # # /* Revised by Paul Mensonides (2002) */ # # /* See http://www.boost.org for most recent version. */ # # ifndef BOOST_PREPROCESSOR_REPETITION_ENUM_SHIFTED_PARAMS_HPP # define BOOST_PREPROCESSOR_REPETITION_ENUM_SHIFTED_PARAMS_HPP # # include # include # include # include # include # include # # /* BOOST_PP_ENUM_SHIFTED_PARAMS */ # # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() # define BOOST_PP_ENUM_SHIFTED_PARAMS(count, param) BOOST_PP_REPEAT(BOOST_PP_DEC(count), BOOST_PP_ENUM_SHIFTED_PARAMS_M, param) # else # define BOOST_PP_ENUM_SHIFTED_PARAMS(count, param) BOOST_PP_ENUM_SHIFTED_PARAMS_I(count, param) # define BOOST_PP_ENUM_SHIFTED_PARAMS_I(count, param) BOOST_PP_REPEAT(BOOST_PP_DEC(count), BOOST_PP_ENUM_SHIFTED_PARAMS_M, param) # endif # # define BOOST_PP_ENUM_SHIFTED_PARAMS_M(z, n, param) BOOST_PP_COMMA_IF(n) BOOST_PP_CAT(param, BOOST_PP_INC(n)) # # /* BOOST_PP_ENUM_SHIFTED_PARAMS_Z */ # # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() # define BOOST_PP_ENUM_SHIFTED_PARAMS_Z(z, count, param) BOOST_PP_REPEAT_ ## z(BOOST_PP_DEC(count), BOOST_PP_ENUM_SHIFTED_PARAMS_M, param) # else # define BOOST_PP_ENUM_SHIFTED_PARAMS_Z(z, count, param) BOOST_PP_ENUM_SHIFTED_PARAMS_Z_I(z, count, param) # define BOOST_PP_ENUM_SHIFTED_PARAMS_Z_I(z, count, param) BOOST_PP_REPEAT_ ## z(BOOST_PP_DEC(count), BOOST_PP_ENUM_SHIFTED_PARAMS_M, param) # endif # # endif ================================================ FILE: benchmarks/boost/preprocessor/repetition/enum_trailing.hpp ================================================ # /* ************************************************************************** # * * # * (C) Copyright Paul Mensonides 2002. # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # * * # ************************************************************************** */ # # /* See http://www.boost.org for most recent version. */ # # ifndef BOOST_PREPROCESSOR_REPETITION_ENUM_TRAILING_HPP # define BOOST_PREPROCESSOR_REPETITION_ENUM_TRAILING_HPP # # include # include # include # include # include # include # include # # /* BOOST_PP_ENUM_TRAILING */ # # if 0 # define BOOST_PP_ENUM_TRAILING(count, macro, data) # endif # # define BOOST_PP_ENUM_TRAILING BOOST_PP_CAT(BOOST_PP_ENUM_TRAILING_, BOOST_PP_AUTO_REC(BOOST_PP_REPEAT_P, 4)) # # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() # define BOOST_PP_ENUM_TRAILING_1(c, m, d) BOOST_PP_REPEAT_1(c, BOOST_PP_ENUM_TRAILING_M_1, (m, d)) # define BOOST_PP_ENUM_TRAILING_2(c, m, d) BOOST_PP_REPEAT_2(c, BOOST_PP_ENUM_TRAILING_M_2, (m, d)) # define BOOST_PP_ENUM_TRAILING_3(c, m, d) BOOST_PP_REPEAT_3(c, BOOST_PP_ENUM_TRAILING_M_3, (m, d)) # else # define BOOST_PP_ENUM_TRAILING_1(c, m, d) BOOST_PP_ENUM_TRAILING_1_I(c, m, d) # define BOOST_PP_ENUM_TRAILING_2(c, m, d) BOOST_PP_ENUM_TRAILING_2_I(c, m, d) # define BOOST_PP_ENUM_TRAILING_3(c, m, d) BOOST_PP_ENUM_TRAILING_3_I(c, m, d) # define BOOST_PP_ENUM_TRAILING_1_I(c, m, d) BOOST_PP_REPEAT_1(c, BOOST_PP_ENUM_TRAILING_M_1, (m, d)) # define BOOST_PP_ENUM_TRAILING_2_I(c, m, d) BOOST_PP_REPEAT_2(c, BOOST_PP_ENUM_TRAILING_M_2, (m, d)) # define BOOST_PP_ENUM_TRAILING_3_I(c, m, d) BOOST_PP_REPEAT_3(c, BOOST_PP_ENUM_TRAILING_M_3, (m, d)) # endif # # define BOOST_PP_ENUM_TRAILING_4(c, m, d) BOOST_PP_ERROR(0x0003) # # if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_STRICT() # define BOOST_PP_ENUM_TRAILING_M_1(z, n, md) BOOST_PP_ENUM_TRAILING_M_1_IM(z, n, BOOST_PP_TUPLE_REM_2 md) # define BOOST_PP_ENUM_TRAILING_M_2(z, n, md) BOOST_PP_ENUM_TRAILING_M_2_IM(z, n, BOOST_PP_TUPLE_REM_2 md) # define BOOST_PP_ENUM_TRAILING_M_3(z, n, md) BOOST_PP_ENUM_TRAILING_M_3_IM(z, n, BOOST_PP_TUPLE_REM_2 md) # define BOOST_PP_ENUM_TRAILING_M_1_IM(z, n, im) BOOST_PP_ENUM_TRAILING_M_1_I(z, n, im) # define BOOST_PP_ENUM_TRAILING_M_2_IM(z, n, im) BOOST_PP_ENUM_TRAILING_M_2_I(z, n, im) # define BOOST_PP_ENUM_TRAILING_M_3_IM(z, n, im) BOOST_PP_ENUM_TRAILING_M_3_I(z, n, im) # else # define BOOST_PP_ENUM_TRAILING_M_1(z, n, md) BOOST_PP_ENUM_TRAILING_M_1_I(z, n, BOOST_PP_TUPLE_ELEM(2, 0, md), BOOST_PP_TUPLE_ELEM(2, 1, md)) # define BOOST_PP_ENUM_TRAILING_M_2(z, n, md) BOOST_PP_ENUM_TRAILING_M_2_I(z, n, BOOST_PP_TUPLE_ELEM(2, 0, md), BOOST_PP_TUPLE_ELEM(2, 1, md)) # define BOOST_PP_ENUM_TRAILING_M_3(z, n, md) BOOST_PP_ENUM_TRAILING_M_3_I(z, n, BOOST_PP_TUPLE_ELEM(2, 0, md), BOOST_PP_TUPLE_ELEM(2, 1, md)) # endif # # define BOOST_PP_ENUM_TRAILING_M_1_I(z, n, m, d) , m(z, n, d) # define BOOST_PP_ENUM_TRAILING_M_2_I(z, n, m, d) , m(z, n, d) # define BOOST_PP_ENUM_TRAILING_M_3_I(z, n, m, d) , m(z, n, d) # # endif ================================================ FILE: benchmarks/boost/preprocessor/repetition/enum_trailing_params.hpp ================================================ # /* ************************************************************************** # * * # * (C) Copyright Paul Mensonides 2002. # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # * * # ************************************************************************** */ # # /* See http://www.boost.org for most recent version. */ # # ifndef BOOST_PREPROCESSOR_REPETITION_ENUM_TRAILING_PARAMS_HPP # define BOOST_PREPROCESSOR_REPETITION_ENUM_TRAILING_PARAMS_HPP # # include # include # # /* BOOST_PP_ENUM_TRAILING_PARAMS */ # # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() # define BOOST_PP_ENUM_TRAILING_PARAMS(count, param) BOOST_PP_REPEAT(count, BOOST_PP_ENUM_TRAILING_PARAMS_M, param) # else # define BOOST_PP_ENUM_TRAILING_PARAMS(count, param) BOOST_PP_ENUM_TRAILING_PARAMS_I(count, param) # define BOOST_PP_ENUM_TRAILING_PARAMS_I(count, param) BOOST_PP_REPEAT(count, BOOST_PP_ENUM_TRAILING_PARAMS_M, param) # endif # # define BOOST_PP_ENUM_TRAILING_PARAMS_M(z, n, param) , param ## n # # /* BOOST_PP_ENUM_TRAILING_PARAMS_Z */ # # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() # define BOOST_PP_ENUM_TRAILING_PARAMS_Z(z, count, param) BOOST_PP_REPEAT_ ## z(count, BOOST_PP_ENUM_TRAILING_PARAMS_M, param) # else # define BOOST_PP_ENUM_TRAILING_PARAMS_Z(z, count, param) BOOST_PP_ENUM_TRAILING_PARAMS_Z_I(z, count, param) # define BOOST_PP_ENUM_TRAILING_PARAMS_Z_I(z, count, param) BOOST_PP_REPEAT_ ## z(count, BOOST_PP_ENUM_TRAILING_PARAMS_M, param) # endif # # endif ================================================ FILE: benchmarks/boost/preprocessor/repetition/for.hpp ================================================ # /* Copyright (C) 2001 # * Housemarque Oy # * http://www.housemarque.com # * # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # */ # # /* Revised by Paul Mensonides (2002) */ # # /* See http://www.boost.org for most recent version. */ # # ifndef BOOST_PREPROCESSOR_REPETITION_FOR_HPP # define BOOST_PREPROCESSOR_REPETITION_FOR_HPP # # include # include # include # include # include # # /* BOOST_PP_FOR */ # # if 0 # define BOOST_PP_FOR(state, pred, op, macro) # endif # # define BOOST_PP_FOR BOOST_PP_CAT(BOOST_PP_FOR_, BOOST_PP_AUTO_REC(BOOST_PP_FOR_P, 256)) # # define BOOST_PP_FOR_P(n) BOOST_PP_CAT(BOOST_PP_FOR_CHECK_, BOOST_PP_FOR_ ## n(1, BOOST_PP_FOR_SR_P, BOOST_PP_FOR_SR_O, BOOST_PP_FOR_SR_M)) # # define BOOST_PP_FOR_SR_P(r, s) s # define BOOST_PP_FOR_SR_O(r, s) 0 # define BOOST_PP_FOR_SR_M(r, s) BOOST_PP_NIL # # if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() # include # elif BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MSVC() # include # elif BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_DMC() # include # else # include # endif # # if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_DMC() # define BOOST_PP_FOR_257_PR(s, p) BOOST_PP_BOOL(p##(257, s)) # else # define BOOST_PP_FOR_257_PR(s, p) BOOST_PP_BOOL(p(257, s)) # endif # define BOOST_PP_FOR_257_ERROR() BOOST_PP_ERROR(0x0002) # define BOOST_PP_FOR_257(s, p, o, m) \ BOOST_PP_IIF \ ( \ BOOST_PP_FOR_257_PR(s,p), \ BOOST_PP_FOR_257_ERROR, \ BOOST_PP_EMPTY \ ) \ () \ /**/ // # define BOOST_PP_FOR_257(s, p, o, m) BOOST_PP_ERROR(0x0002) # # define BOOST_PP_FOR_CHECK_BOOST_PP_NIL 1 # # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_1(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_2(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_3(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_4(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_5(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_6(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_7(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_8(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_9(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_10(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_11(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_12(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_13(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_14(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_15(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_16(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_17(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_18(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_19(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_20(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_21(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_22(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_23(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_24(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_25(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_26(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_27(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_28(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_29(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_30(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_31(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_32(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_33(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_34(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_35(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_36(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_37(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_38(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_39(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_40(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_41(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_42(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_43(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_44(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_45(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_46(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_47(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_48(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_49(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_50(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_51(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_52(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_53(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_54(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_55(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_56(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_57(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_58(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_59(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_60(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_61(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_62(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_63(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_64(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_65(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_66(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_67(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_68(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_69(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_70(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_71(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_72(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_73(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_74(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_75(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_76(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_77(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_78(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_79(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_80(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_81(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_82(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_83(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_84(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_85(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_86(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_87(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_88(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_89(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_90(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_91(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_92(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_93(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_94(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_95(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_96(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_97(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_98(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_99(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_100(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_101(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_102(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_103(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_104(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_105(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_106(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_107(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_108(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_109(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_110(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_111(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_112(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_113(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_114(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_115(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_116(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_117(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_118(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_119(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_120(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_121(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_122(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_123(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_124(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_125(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_126(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_127(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_128(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_129(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_130(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_131(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_132(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_133(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_134(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_135(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_136(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_137(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_138(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_139(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_140(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_141(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_142(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_143(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_144(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_145(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_146(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_147(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_148(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_149(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_150(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_151(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_152(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_153(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_154(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_155(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_156(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_157(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_158(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_159(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_160(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_161(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_162(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_163(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_164(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_165(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_166(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_167(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_168(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_169(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_170(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_171(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_172(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_173(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_174(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_175(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_176(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_177(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_178(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_179(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_180(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_181(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_182(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_183(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_184(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_185(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_186(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_187(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_188(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_189(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_190(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_191(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_192(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_193(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_194(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_195(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_196(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_197(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_198(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_199(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_200(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_201(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_202(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_203(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_204(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_205(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_206(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_207(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_208(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_209(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_210(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_211(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_212(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_213(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_214(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_215(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_216(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_217(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_218(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_219(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_220(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_221(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_222(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_223(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_224(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_225(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_226(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_227(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_228(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_229(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_230(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_231(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_232(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_233(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_234(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_235(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_236(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_237(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_238(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_239(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_240(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_241(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_242(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_243(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_244(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_245(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_246(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_247(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_248(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_249(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_250(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_251(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_252(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_253(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_254(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_255(s, p, o, m) 0 # define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_256(s, p, o, m) 0 # # endif ================================================ FILE: benchmarks/boost/preprocessor/repetition/repeat.hpp ================================================ # /* Copyright (C) 2001 # * Housemarque Oy # * http://www.housemarque.com # * # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # */ # # /* Revised by Paul Mensonides (2002) */ # # /* See http://www.boost.org for most recent version. */ # # ifndef BOOST_PREPROCESSOR_REPETITION_REPEAT_HPP # define BOOST_PREPROCESSOR_REPETITION_REPEAT_HPP # # include # include # include # include # include # # /* BOOST_PP_REPEAT */ # # if 0 # define BOOST_PP_REPEAT(count, macro, data) # endif # # define BOOST_PP_REPEAT BOOST_PP_CAT(BOOST_PP_REPEAT_, BOOST_PP_AUTO_REC(BOOST_PP_REPEAT_P, 4)) # # define BOOST_PP_REPEAT_P(n) BOOST_PP_CAT(BOOST_PP_REPEAT_CHECK_, BOOST_PP_REPEAT_ ## n(1, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3, BOOST_PP_NIL)) # # define BOOST_PP_REPEAT_CHECK_BOOST_PP_NIL 1 # define BOOST_PP_REPEAT_CHECK_BOOST_PP_REPEAT_1(c, m, d) 0 # define BOOST_PP_REPEAT_CHECK_BOOST_PP_REPEAT_2(c, m, d) 0 # define BOOST_PP_REPEAT_CHECK_BOOST_PP_REPEAT_3(c, m, d) 0 # # define BOOST_PP_REPEAT_1(c, m, d) BOOST_PP_REPEAT_1_I(c, m, d) # define BOOST_PP_REPEAT_2(c, m, d) BOOST_PP_REPEAT_2_I(c, m, d) # define BOOST_PP_REPEAT_3(c, m, d) BOOST_PP_REPEAT_3_I(c, m, d) # define BOOST_PP_REPEAT_4(c, m, d) BOOST_PP_ERROR(0x0003) # # define BOOST_PP_REPEAT_1_I(c, m, d) BOOST_PP_REPEAT_1_ ## c(m, d) # define BOOST_PP_REPEAT_2_I(c, m, d) BOOST_PP_REPEAT_2_ ## c(m, d) # define BOOST_PP_REPEAT_3_I(c, m, d) BOOST_PP_REPEAT_3_ ## c(m, d) # # define BOOST_PP_REPEAT_1ST BOOST_PP_REPEAT_1 # define BOOST_PP_REPEAT_2ND BOOST_PP_REPEAT_2 # define BOOST_PP_REPEAT_3RD BOOST_PP_REPEAT_3 # # define BOOST_PP_REPEAT_1_0(m, d) # define BOOST_PP_REPEAT_1_1(m, d) m(2, 0, d) # define BOOST_PP_REPEAT_1_2(m, d) BOOST_PP_REPEAT_1_1(m, d) m(2, 1, d) # define BOOST_PP_REPEAT_1_3(m, d) BOOST_PP_REPEAT_1_2(m, d) m(2, 2, d) # define BOOST_PP_REPEAT_1_4(m, d) BOOST_PP_REPEAT_1_3(m, d) m(2, 3, d) # define BOOST_PP_REPEAT_1_5(m, d) BOOST_PP_REPEAT_1_4(m, d) m(2, 4, d) # define BOOST_PP_REPEAT_1_6(m, d) BOOST_PP_REPEAT_1_5(m, d) m(2, 5, d) # define BOOST_PP_REPEAT_1_7(m, d) BOOST_PP_REPEAT_1_6(m, d) m(2, 6, d) # define BOOST_PP_REPEAT_1_8(m, d) BOOST_PP_REPEAT_1_7(m, d) m(2, 7, d) # define BOOST_PP_REPEAT_1_9(m, d) BOOST_PP_REPEAT_1_8(m, d) m(2, 8, d) # define BOOST_PP_REPEAT_1_10(m, d) BOOST_PP_REPEAT_1_9(m, d) m(2, 9, d) # define BOOST_PP_REPEAT_1_11(m, d) BOOST_PP_REPEAT_1_10(m, d) m(2, 10, d) # define BOOST_PP_REPEAT_1_12(m, d) BOOST_PP_REPEAT_1_11(m, d) m(2, 11, d) # define BOOST_PP_REPEAT_1_13(m, d) BOOST_PP_REPEAT_1_12(m, d) m(2, 12, d) # define BOOST_PP_REPEAT_1_14(m, d) BOOST_PP_REPEAT_1_13(m, d) m(2, 13, d) # define BOOST_PP_REPEAT_1_15(m, d) BOOST_PP_REPEAT_1_14(m, d) m(2, 14, d) # define BOOST_PP_REPEAT_1_16(m, d) BOOST_PP_REPEAT_1_15(m, d) m(2, 15, d) # define BOOST_PP_REPEAT_1_17(m, d) BOOST_PP_REPEAT_1_16(m, d) m(2, 16, d) # define BOOST_PP_REPEAT_1_18(m, d) BOOST_PP_REPEAT_1_17(m, d) m(2, 17, d) # define BOOST_PP_REPEAT_1_19(m, d) BOOST_PP_REPEAT_1_18(m, d) m(2, 18, d) # define BOOST_PP_REPEAT_1_20(m, d) BOOST_PP_REPEAT_1_19(m, d) m(2, 19, d) # define BOOST_PP_REPEAT_1_21(m, d) BOOST_PP_REPEAT_1_20(m, d) m(2, 20, d) # define BOOST_PP_REPEAT_1_22(m, d) BOOST_PP_REPEAT_1_21(m, d) m(2, 21, d) # define BOOST_PP_REPEAT_1_23(m, d) BOOST_PP_REPEAT_1_22(m, d) m(2, 22, d) # define BOOST_PP_REPEAT_1_24(m, d) BOOST_PP_REPEAT_1_23(m, d) m(2, 23, d) # define BOOST_PP_REPEAT_1_25(m, d) BOOST_PP_REPEAT_1_24(m, d) m(2, 24, d) # define BOOST_PP_REPEAT_1_26(m, d) BOOST_PP_REPEAT_1_25(m, d) m(2, 25, d) # define BOOST_PP_REPEAT_1_27(m, d) BOOST_PP_REPEAT_1_26(m, d) m(2, 26, d) # define BOOST_PP_REPEAT_1_28(m, d) BOOST_PP_REPEAT_1_27(m, d) m(2, 27, d) # define BOOST_PP_REPEAT_1_29(m, d) BOOST_PP_REPEAT_1_28(m, d) m(2, 28, d) # define BOOST_PP_REPEAT_1_30(m, d) BOOST_PP_REPEAT_1_29(m, d) m(2, 29, d) # define BOOST_PP_REPEAT_1_31(m, d) BOOST_PP_REPEAT_1_30(m, d) m(2, 30, d) # define BOOST_PP_REPEAT_1_32(m, d) BOOST_PP_REPEAT_1_31(m, d) m(2, 31, d) # define BOOST_PP_REPEAT_1_33(m, d) BOOST_PP_REPEAT_1_32(m, d) m(2, 32, d) # define BOOST_PP_REPEAT_1_34(m, d) BOOST_PP_REPEAT_1_33(m, d) m(2, 33, d) # define BOOST_PP_REPEAT_1_35(m, d) BOOST_PP_REPEAT_1_34(m, d) m(2, 34, d) # define BOOST_PP_REPEAT_1_36(m, d) BOOST_PP_REPEAT_1_35(m, d) m(2, 35, d) # define BOOST_PP_REPEAT_1_37(m, d) BOOST_PP_REPEAT_1_36(m, d) m(2, 36, d) # define BOOST_PP_REPEAT_1_38(m, d) BOOST_PP_REPEAT_1_37(m, d) m(2, 37, d) # define BOOST_PP_REPEAT_1_39(m, d) BOOST_PP_REPEAT_1_38(m, d) m(2, 38, d) # define BOOST_PP_REPEAT_1_40(m, d) BOOST_PP_REPEAT_1_39(m, d) m(2, 39, d) # define BOOST_PP_REPEAT_1_41(m, d) BOOST_PP_REPEAT_1_40(m, d) m(2, 40, d) # define BOOST_PP_REPEAT_1_42(m, d) BOOST_PP_REPEAT_1_41(m, d) m(2, 41, d) # define BOOST_PP_REPEAT_1_43(m, d) BOOST_PP_REPEAT_1_42(m, d) m(2, 42, d) # define BOOST_PP_REPEAT_1_44(m, d) BOOST_PP_REPEAT_1_43(m, d) m(2, 43, d) # define BOOST_PP_REPEAT_1_45(m, d) BOOST_PP_REPEAT_1_44(m, d) m(2, 44, d) # define BOOST_PP_REPEAT_1_46(m, d) BOOST_PP_REPEAT_1_45(m, d) m(2, 45, d) # define BOOST_PP_REPEAT_1_47(m, d) BOOST_PP_REPEAT_1_46(m, d) m(2, 46, d) # define BOOST_PP_REPEAT_1_48(m, d) BOOST_PP_REPEAT_1_47(m, d) m(2, 47, d) # define BOOST_PP_REPEAT_1_49(m, d) BOOST_PP_REPEAT_1_48(m, d) m(2, 48, d) # define BOOST_PP_REPEAT_1_50(m, d) BOOST_PP_REPEAT_1_49(m, d) m(2, 49, d) # define BOOST_PP_REPEAT_1_51(m, d) BOOST_PP_REPEAT_1_50(m, d) m(2, 50, d) # define BOOST_PP_REPEAT_1_52(m, d) BOOST_PP_REPEAT_1_51(m, d) m(2, 51, d) # define BOOST_PP_REPEAT_1_53(m, d) BOOST_PP_REPEAT_1_52(m, d) m(2, 52, d) # define BOOST_PP_REPEAT_1_54(m, d) BOOST_PP_REPEAT_1_53(m, d) m(2, 53, d) # define BOOST_PP_REPEAT_1_55(m, d) BOOST_PP_REPEAT_1_54(m, d) m(2, 54, d) # define BOOST_PP_REPEAT_1_56(m, d) BOOST_PP_REPEAT_1_55(m, d) m(2, 55, d) # define BOOST_PP_REPEAT_1_57(m, d) BOOST_PP_REPEAT_1_56(m, d) m(2, 56, d) # define BOOST_PP_REPEAT_1_58(m, d) BOOST_PP_REPEAT_1_57(m, d) m(2, 57, d) # define BOOST_PP_REPEAT_1_59(m, d) BOOST_PP_REPEAT_1_58(m, d) m(2, 58, d) # define BOOST_PP_REPEAT_1_60(m, d) BOOST_PP_REPEAT_1_59(m, d) m(2, 59, d) # define BOOST_PP_REPEAT_1_61(m, d) BOOST_PP_REPEAT_1_60(m, d) m(2, 60, d) # define BOOST_PP_REPEAT_1_62(m, d) BOOST_PP_REPEAT_1_61(m, d) m(2, 61, d) # define BOOST_PP_REPEAT_1_63(m, d) BOOST_PP_REPEAT_1_62(m, d) m(2, 62, d) # define BOOST_PP_REPEAT_1_64(m, d) BOOST_PP_REPEAT_1_63(m, d) m(2, 63, d) # define BOOST_PP_REPEAT_1_65(m, d) BOOST_PP_REPEAT_1_64(m, d) m(2, 64, d) # define BOOST_PP_REPEAT_1_66(m, d) BOOST_PP_REPEAT_1_65(m, d) m(2, 65, d) # define BOOST_PP_REPEAT_1_67(m, d) BOOST_PP_REPEAT_1_66(m, d) m(2, 66, d) # define BOOST_PP_REPEAT_1_68(m, d) BOOST_PP_REPEAT_1_67(m, d) m(2, 67, d) # define BOOST_PP_REPEAT_1_69(m, d) BOOST_PP_REPEAT_1_68(m, d) m(2, 68, d) # define BOOST_PP_REPEAT_1_70(m, d) BOOST_PP_REPEAT_1_69(m, d) m(2, 69, d) # define BOOST_PP_REPEAT_1_71(m, d) BOOST_PP_REPEAT_1_70(m, d) m(2, 70, d) # define BOOST_PP_REPEAT_1_72(m, d) BOOST_PP_REPEAT_1_71(m, d) m(2, 71, d) # define BOOST_PP_REPEAT_1_73(m, d) BOOST_PP_REPEAT_1_72(m, d) m(2, 72, d) # define BOOST_PP_REPEAT_1_74(m, d) BOOST_PP_REPEAT_1_73(m, d) m(2, 73, d) # define BOOST_PP_REPEAT_1_75(m, d) BOOST_PP_REPEAT_1_74(m, d) m(2, 74, d) # define BOOST_PP_REPEAT_1_76(m, d) BOOST_PP_REPEAT_1_75(m, d) m(2, 75, d) # define BOOST_PP_REPEAT_1_77(m, d) BOOST_PP_REPEAT_1_76(m, d) m(2, 76, d) # define BOOST_PP_REPEAT_1_78(m, d) BOOST_PP_REPEAT_1_77(m, d) m(2, 77, d) # define BOOST_PP_REPEAT_1_79(m, d) BOOST_PP_REPEAT_1_78(m, d) m(2, 78, d) # define BOOST_PP_REPEAT_1_80(m, d) BOOST_PP_REPEAT_1_79(m, d) m(2, 79, d) # define BOOST_PP_REPEAT_1_81(m, d) BOOST_PP_REPEAT_1_80(m, d) m(2, 80, d) # define BOOST_PP_REPEAT_1_82(m, d) BOOST_PP_REPEAT_1_81(m, d) m(2, 81, d) # define BOOST_PP_REPEAT_1_83(m, d) BOOST_PP_REPEAT_1_82(m, d) m(2, 82, d) # define BOOST_PP_REPEAT_1_84(m, d) BOOST_PP_REPEAT_1_83(m, d) m(2, 83, d) # define BOOST_PP_REPEAT_1_85(m, d) BOOST_PP_REPEAT_1_84(m, d) m(2, 84, d) # define BOOST_PP_REPEAT_1_86(m, d) BOOST_PP_REPEAT_1_85(m, d) m(2, 85, d) # define BOOST_PP_REPEAT_1_87(m, d) BOOST_PP_REPEAT_1_86(m, d) m(2, 86, d) # define BOOST_PP_REPEAT_1_88(m, d) BOOST_PP_REPEAT_1_87(m, d) m(2, 87, d) # define BOOST_PP_REPEAT_1_89(m, d) BOOST_PP_REPEAT_1_88(m, d) m(2, 88, d) # define BOOST_PP_REPEAT_1_90(m, d) BOOST_PP_REPEAT_1_89(m, d) m(2, 89, d) # define BOOST_PP_REPEAT_1_91(m, d) BOOST_PP_REPEAT_1_90(m, d) m(2, 90, d) # define BOOST_PP_REPEAT_1_92(m, d) BOOST_PP_REPEAT_1_91(m, d) m(2, 91, d) # define BOOST_PP_REPEAT_1_93(m, d) BOOST_PP_REPEAT_1_92(m, d) m(2, 92, d) # define BOOST_PP_REPEAT_1_94(m, d) BOOST_PP_REPEAT_1_93(m, d) m(2, 93, d) # define BOOST_PP_REPEAT_1_95(m, d) BOOST_PP_REPEAT_1_94(m, d) m(2, 94, d) # define BOOST_PP_REPEAT_1_96(m, d) BOOST_PP_REPEAT_1_95(m, d) m(2, 95, d) # define BOOST_PP_REPEAT_1_97(m, d) BOOST_PP_REPEAT_1_96(m, d) m(2, 96, d) # define BOOST_PP_REPEAT_1_98(m, d) BOOST_PP_REPEAT_1_97(m, d) m(2, 97, d) # define BOOST_PP_REPEAT_1_99(m, d) BOOST_PP_REPEAT_1_98(m, d) m(2, 98, d) # define BOOST_PP_REPEAT_1_100(m, d) BOOST_PP_REPEAT_1_99(m, d) m(2, 99, d) # define BOOST_PP_REPEAT_1_101(m, d) BOOST_PP_REPEAT_1_100(m, d) m(2, 100, d) # define BOOST_PP_REPEAT_1_102(m, d) BOOST_PP_REPEAT_1_101(m, d) m(2, 101, d) # define BOOST_PP_REPEAT_1_103(m, d) BOOST_PP_REPEAT_1_102(m, d) m(2, 102, d) # define BOOST_PP_REPEAT_1_104(m, d) BOOST_PP_REPEAT_1_103(m, d) m(2, 103, d) # define BOOST_PP_REPEAT_1_105(m, d) BOOST_PP_REPEAT_1_104(m, d) m(2, 104, d) # define BOOST_PP_REPEAT_1_106(m, d) BOOST_PP_REPEAT_1_105(m, d) m(2, 105, d) # define BOOST_PP_REPEAT_1_107(m, d) BOOST_PP_REPEAT_1_106(m, d) m(2, 106, d) # define BOOST_PP_REPEAT_1_108(m, d) BOOST_PP_REPEAT_1_107(m, d) m(2, 107, d) # define BOOST_PP_REPEAT_1_109(m, d) BOOST_PP_REPEAT_1_108(m, d) m(2, 108, d) # define BOOST_PP_REPEAT_1_110(m, d) BOOST_PP_REPEAT_1_109(m, d) m(2, 109, d) # define BOOST_PP_REPEAT_1_111(m, d) BOOST_PP_REPEAT_1_110(m, d) m(2, 110, d) # define BOOST_PP_REPEAT_1_112(m, d) BOOST_PP_REPEAT_1_111(m, d) m(2, 111, d) # define BOOST_PP_REPEAT_1_113(m, d) BOOST_PP_REPEAT_1_112(m, d) m(2, 112, d) # define BOOST_PP_REPEAT_1_114(m, d) BOOST_PP_REPEAT_1_113(m, d) m(2, 113, d) # define BOOST_PP_REPEAT_1_115(m, d) BOOST_PP_REPEAT_1_114(m, d) m(2, 114, d) # define BOOST_PP_REPEAT_1_116(m, d) BOOST_PP_REPEAT_1_115(m, d) m(2, 115, d) # define BOOST_PP_REPEAT_1_117(m, d) BOOST_PP_REPEAT_1_116(m, d) m(2, 116, d) # define BOOST_PP_REPEAT_1_118(m, d) BOOST_PP_REPEAT_1_117(m, d) m(2, 117, d) # define BOOST_PP_REPEAT_1_119(m, d) BOOST_PP_REPEAT_1_118(m, d) m(2, 118, d) # define BOOST_PP_REPEAT_1_120(m, d) BOOST_PP_REPEAT_1_119(m, d) m(2, 119, d) # define BOOST_PP_REPEAT_1_121(m, d) BOOST_PP_REPEAT_1_120(m, d) m(2, 120, d) # define BOOST_PP_REPEAT_1_122(m, d) BOOST_PP_REPEAT_1_121(m, d) m(2, 121, d) # define BOOST_PP_REPEAT_1_123(m, d) BOOST_PP_REPEAT_1_122(m, d) m(2, 122, d) # define BOOST_PP_REPEAT_1_124(m, d) BOOST_PP_REPEAT_1_123(m, d) m(2, 123, d) # define BOOST_PP_REPEAT_1_125(m, d) BOOST_PP_REPEAT_1_124(m, d) m(2, 124, d) # define BOOST_PP_REPEAT_1_126(m, d) BOOST_PP_REPEAT_1_125(m, d) m(2, 125, d) # define BOOST_PP_REPEAT_1_127(m, d) BOOST_PP_REPEAT_1_126(m, d) m(2, 126, d) # define BOOST_PP_REPEAT_1_128(m, d) BOOST_PP_REPEAT_1_127(m, d) m(2, 127, d) # define BOOST_PP_REPEAT_1_129(m, d) BOOST_PP_REPEAT_1_128(m, d) m(2, 128, d) # define BOOST_PP_REPEAT_1_130(m, d) BOOST_PP_REPEAT_1_129(m, d) m(2, 129, d) # define BOOST_PP_REPEAT_1_131(m, d) BOOST_PP_REPEAT_1_130(m, d) m(2, 130, d) # define BOOST_PP_REPEAT_1_132(m, d) BOOST_PP_REPEAT_1_131(m, d) m(2, 131, d) # define BOOST_PP_REPEAT_1_133(m, d) BOOST_PP_REPEAT_1_132(m, d) m(2, 132, d) # define BOOST_PP_REPEAT_1_134(m, d) BOOST_PP_REPEAT_1_133(m, d) m(2, 133, d) # define BOOST_PP_REPEAT_1_135(m, d) BOOST_PP_REPEAT_1_134(m, d) m(2, 134, d) # define BOOST_PP_REPEAT_1_136(m, d) BOOST_PP_REPEAT_1_135(m, d) m(2, 135, d) # define BOOST_PP_REPEAT_1_137(m, d) BOOST_PP_REPEAT_1_136(m, d) m(2, 136, d) # define BOOST_PP_REPEAT_1_138(m, d) BOOST_PP_REPEAT_1_137(m, d) m(2, 137, d) # define BOOST_PP_REPEAT_1_139(m, d) BOOST_PP_REPEAT_1_138(m, d) m(2, 138, d) # define BOOST_PP_REPEAT_1_140(m, d) BOOST_PP_REPEAT_1_139(m, d) m(2, 139, d) # define BOOST_PP_REPEAT_1_141(m, d) BOOST_PP_REPEAT_1_140(m, d) m(2, 140, d) # define BOOST_PP_REPEAT_1_142(m, d) BOOST_PP_REPEAT_1_141(m, d) m(2, 141, d) # define BOOST_PP_REPEAT_1_143(m, d) BOOST_PP_REPEAT_1_142(m, d) m(2, 142, d) # define BOOST_PP_REPEAT_1_144(m, d) BOOST_PP_REPEAT_1_143(m, d) m(2, 143, d) # define BOOST_PP_REPEAT_1_145(m, d) BOOST_PP_REPEAT_1_144(m, d) m(2, 144, d) # define BOOST_PP_REPEAT_1_146(m, d) BOOST_PP_REPEAT_1_145(m, d) m(2, 145, d) # define BOOST_PP_REPEAT_1_147(m, d) BOOST_PP_REPEAT_1_146(m, d) m(2, 146, d) # define BOOST_PP_REPEAT_1_148(m, d) BOOST_PP_REPEAT_1_147(m, d) m(2, 147, d) # define BOOST_PP_REPEAT_1_149(m, d) BOOST_PP_REPEAT_1_148(m, d) m(2, 148, d) # define BOOST_PP_REPEAT_1_150(m, d) BOOST_PP_REPEAT_1_149(m, d) m(2, 149, d) # define BOOST_PP_REPEAT_1_151(m, d) BOOST_PP_REPEAT_1_150(m, d) m(2, 150, d) # define BOOST_PP_REPEAT_1_152(m, d) BOOST_PP_REPEAT_1_151(m, d) m(2, 151, d) # define BOOST_PP_REPEAT_1_153(m, d) BOOST_PP_REPEAT_1_152(m, d) m(2, 152, d) # define BOOST_PP_REPEAT_1_154(m, d) BOOST_PP_REPEAT_1_153(m, d) m(2, 153, d) # define BOOST_PP_REPEAT_1_155(m, d) BOOST_PP_REPEAT_1_154(m, d) m(2, 154, d) # define BOOST_PP_REPEAT_1_156(m, d) BOOST_PP_REPEAT_1_155(m, d) m(2, 155, d) # define BOOST_PP_REPEAT_1_157(m, d) BOOST_PP_REPEAT_1_156(m, d) m(2, 156, d) # define BOOST_PP_REPEAT_1_158(m, d) BOOST_PP_REPEAT_1_157(m, d) m(2, 157, d) # define BOOST_PP_REPEAT_1_159(m, d) BOOST_PP_REPEAT_1_158(m, d) m(2, 158, d) # define BOOST_PP_REPEAT_1_160(m, d) BOOST_PP_REPEAT_1_159(m, d) m(2, 159, d) # define BOOST_PP_REPEAT_1_161(m, d) BOOST_PP_REPEAT_1_160(m, d) m(2, 160, d) # define BOOST_PP_REPEAT_1_162(m, d) BOOST_PP_REPEAT_1_161(m, d) m(2, 161, d) # define BOOST_PP_REPEAT_1_163(m, d) BOOST_PP_REPEAT_1_162(m, d) m(2, 162, d) # define BOOST_PP_REPEAT_1_164(m, d) BOOST_PP_REPEAT_1_163(m, d) m(2, 163, d) # define BOOST_PP_REPEAT_1_165(m, d) BOOST_PP_REPEAT_1_164(m, d) m(2, 164, d) # define BOOST_PP_REPEAT_1_166(m, d) BOOST_PP_REPEAT_1_165(m, d) m(2, 165, d) # define BOOST_PP_REPEAT_1_167(m, d) BOOST_PP_REPEAT_1_166(m, d) m(2, 166, d) # define BOOST_PP_REPEAT_1_168(m, d) BOOST_PP_REPEAT_1_167(m, d) m(2, 167, d) # define BOOST_PP_REPEAT_1_169(m, d) BOOST_PP_REPEAT_1_168(m, d) m(2, 168, d) # define BOOST_PP_REPEAT_1_170(m, d) BOOST_PP_REPEAT_1_169(m, d) m(2, 169, d) # define BOOST_PP_REPEAT_1_171(m, d) BOOST_PP_REPEAT_1_170(m, d) m(2, 170, d) # define BOOST_PP_REPEAT_1_172(m, d) BOOST_PP_REPEAT_1_171(m, d) m(2, 171, d) # define BOOST_PP_REPEAT_1_173(m, d) BOOST_PP_REPEAT_1_172(m, d) m(2, 172, d) # define BOOST_PP_REPEAT_1_174(m, d) BOOST_PP_REPEAT_1_173(m, d) m(2, 173, d) # define BOOST_PP_REPEAT_1_175(m, d) BOOST_PP_REPEAT_1_174(m, d) m(2, 174, d) # define BOOST_PP_REPEAT_1_176(m, d) BOOST_PP_REPEAT_1_175(m, d) m(2, 175, d) # define BOOST_PP_REPEAT_1_177(m, d) BOOST_PP_REPEAT_1_176(m, d) m(2, 176, d) # define BOOST_PP_REPEAT_1_178(m, d) BOOST_PP_REPEAT_1_177(m, d) m(2, 177, d) # define BOOST_PP_REPEAT_1_179(m, d) BOOST_PP_REPEAT_1_178(m, d) m(2, 178, d) # define BOOST_PP_REPEAT_1_180(m, d) BOOST_PP_REPEAT_1_179(m, d) m(2, 179, d) # define BOOST_PP_REPEAT_1_181(m, d) BOOST_PP_REPEAT_1_180(m, d) m(2, 180, d) # define BOOST_PP_REPEAT_1_182(m, d) BOOST_PP_REPEAT_1_181(m, d) m(2, 181, d) # define BOOST_PP_REPEAT_1_183(m, d) BOOST_PP_REPEAT_1_182(m, d) m(2, 182, d) # define BOOST_PP_REPEAT_1_184(m, d) BOOST_PP_REPEAT_1_183(m, d) m(2, 183, d) # define BOOST_PP_REPEAT_1_185(m, d) BOOST_PP_REPEAT_1_184(m, d) m(2, 184, d) # define BOOST_PP_REPEAT_1_186(m, d) BOOST_PP_REPEAT_1_185(m, d) m(2, 185, d) # define BOOST_PP_REPEAT_1_187(m, d) BOOST_PP_REPEAT_1_186(m, d) m(2, 186, d) # define BOOST_PP_REPEAT_1_188(m, d) BOOST_PP_REPEAT_1_187(m, d) m(2, 187, d) # define BOOST_PP_REPEAT_1_189(m, d) BOOST_PP_REPEAT_1_188(m, d) m(2, 188, d) # define BOOST_PP_REPEAT_1_190(m, d) BOOST_PP_REPEAT_1_189(m, d) m(2, 189, d) # define BOOST_PP_REPEAT_1_191(m, d) BOOST_PP_REPEAT_1_190(m, d) m(2, 190, d) # define BOOST_PP_REPEAT_1_192(m, d) BOOST_PP_REPEAT_1_191(m, d) m(2, 191, d) # define BOOST_PP_REPEAT_1_193(m, d) BOOST_PP_REPEAT_1_192(m, d) m(2, 192, d) # define BOOST_PP_REPEAT_1_194(m, d) BOOST_PP_REPEAT_1_193(m, d) m(2, 193, d) # define BOOST_PP_REPEAT_1_195(m, d) BOOST_PP_REPEAT_1_194(m, d) m(2, 194, d) # define BOOST_PP_REPEAT_1_196(m, d) BOOST_PP_REPEAT_1_195(m, d) m(2, 195, d) # define BOOST_PP_REPEAT_1_197(m, d) BOOST_PP_REPEAT_1_196(m, d) m(2, 196, d) # define BOOST_PP_REPEAT_1_198(m, d) BOOST_PP_REPEAT_1_197(m, d) m(2, 197, d) # define BOOST_PP_REPEAT_1_199(m, d) BOOST_PP_REPEAT_1_198(m, d) m(2, 198, d) # define BOOST_PP_REPEAT_1_200(m, d) BOOST_PP_REPEAT_1_199(m, d) m(2, 199, d) # define BOOST_PP_REPEAT_1_201(m, d) BOOST_PP_REPEAT_1_200(m, d) m(2, 200, d) # define BOOST_PP_REPEAT_1_202(m, d) BOOST_PP_REPEAT_1_201(m, d) m(2, 201, d) # define BOOST_PP_REPEAT_1_203(m, d) BOOST_PP_REPEAT_1_202(m, d) m(2, 202, d) # define BOOST_PP_REPEAT_1_204(m, d) BOOST_PP_REPEAT_1_203(m, d) m(2, 203, d) # define BOOST_PP_REPEAT_1_205(m, d) BOOST_PP_REPEAT_1_204(m, d) m(2, 204, d) # define BOOST_PP_REPEAT_1_206(m, d) BOOST_PP_REPEAT_1_205(m, d) m(2, 205, d) # define BOOST_PP_REPEAT_1_207(m, d) BOOST_PP_REPEAT_1_206(m, d) m(2, 206, d) # define BOOST_PP_REPEAT_1_208(m, d) BOOST_PP_REPEAT_1_207(m, d) m(2, 207, d) # define BOOST_PP_REPEAT_1_209(m, d) BOOST_PP_REPEAT_1_208(m, d) m(2, 208, d) # define BOOST_PP_REPEAT_1_210(m, d) BOOST_PP_REPEAT_1_209(m, d) m(2, 209, d) # define BOOST_PP_REPEAT_1_211(m, d) BOOST_PP_REPEAT_1_210(m, d) m(2, 210, d) # define BOOST_PP_REPEAT_1_212(m, d) BOOST_PP_REPEAT_1_211(m, d) m(2, 211, d) # define BOOST_PP_REPEAT_1_213(m, d) BOOST_PP_REPEAT_1_212(m, d) m(2, 212, d) # define BOOST_PP_REPEAT_1_214(m, d) BOOST_PP_REPEAT_1_213(m, d) m(2, 213, d) # define BOOST_PP_REPEAT_1_215(m, d) BOOST_PP_REPEAT_1_214(m, d) m(2, 214, d) # define BOOST_PP_REPEAT_1_216(m, d) BOOST_PP_REPEAT_1_215(m, d) m(2, 215, d) # define BOOST_PP_REPEAT_1_217(m, d) BOOST_PP_REPEAT_1_216(m, d) m(2, 216, d) # define BOOST_PP_REPEAT_1_218(m, d) BOOST_PP_REPEAT_1_217(m, d) m(2, 217, d) # define BOOST_PP_REPEAT_1_219(m, d) BOOST_PP_REPEAT_1_218(m, d) m(2, 218, d) # define BOOST_PP_REPEAT_1_220(m, d) BOOST_PP_REPEAT_1_219(m, d) m(2, 219, d) # define BOOST_PP_REPEAT_1_221(m, d) BOOST_PP_REPEAT_1_220(m, d) m(2, 220, d) # define BOOST_PP_REPEAT_1_222(m, d) BOOST_PP_REPEAT_1_221(m, d) m(2, 221, d) # define BOOST_PP_REPEAT_1_223(m, d) BOOST_PP_REPEAT_1_222(m, d) m(2, 222, d) # define BOOST_PP_REPEAT_1_224(m, d) BOOST_PP_REPEAT_1_223(m, d) m(2, 223, d) # define BOOST_PP_REPEAT_1_225(m, d) BOOST_PP_REPEAT_1_224(m, d) m(2, 224, d) # define BOOST_PP_REPEAT_1_226(m, d) BOOST_PP_REPEAT_1_225(m, d) m(2, 225, d) # define BOOST_PP_REPEAT_1_227(m, d) BOOST_PP_REPEAT_1_226(m, d) m(2, 226, d) # define BOOST_PP_REPEAT_1_228(m, d) BOOST_PP_REPEAT_1_227(m, d) m(2, 227, d) # define BOOST_PP_REPEAT_1_229(m, d) BOOST_PP_REPEAT_1_228(m, d) m(2, 228, d) # define BOOST_PP_REPEAT_1_230(m, d) BOOST_PP_REPEAT_1_229(m, d) m(2, 229, d) # define BOOST_PP_REPEAT_1_231(m, d) BOOST_PP_REPEAT_1_230(m, d) m(2, 230, d) # define BOOST_PP_REPEAT_1_232(m, d) BOOST_PP_REPEAT_1_231(m, d) m(2, 231, d) # define BOOST_PP_REPEAT_1_233(m, d) BOOST_PP_REPEAT_1_232(m, d) m(2, 232, d) # define BOOST_PP_REPEAT_1_234(m, d) BOOST_PP_REPEAT_1_233(m, d) m(2, 233, d) # define BOOST_PP_REPEAT_1_235(m, d) BOOST_PP_REPEAT_1_234(m, d) m(2, 234, d) # define BOOST_PP_REPEAT_1_236(m, d) BOOST_PP_REPEAT_1_235(m, d) m(2, 235, d) # define BOOST_PP_REPEAT_1_237(m, d) BOOST_PP_REPEAT_1_236(m, d) m(2, 236, d) # define BOOST_PP_REPEAT_1_238(m, d) BOOST_PP_REPEAT_1_237(m, d) m(2, 237, d) # define BOOST_PP_REPEAT_1_239(m, d) BOOST_PP_REPEAT_1_238(m, d) m(2, 238, d) # define BOOST_PP_REPEAT_1_240(m, d) BOOST_PP_REPEAT_1_239(m, d) m(2, 239, d) # define BOOST_PP_REPEAT_1_241(m, d) BOOST_PP_REPEAT_1_240(m, d) m(2, 240, d) # define BOOST_PP_REPEAT_1_242(m, d) BOOST_PP_REPEAT_1_241(m, d) m(2, 241, d) # define BOOST_PP_REPEAT_1_243(m, d) BOOST_PP_REPEAT_1_242(m, d) m(2, 242, d) # define BOOST_PP_REPEAT_1_244(m, d) BOOST_PP_REPEAT_1_243(m, d) m(2, 243, d) # define BOOST_PP_REPEAT_1_245(m, d) BOOST_PP_REPEAT_1_244(m, d) m(2, 244, d) # define BOOST_PP_REPEAT_1_246(m, d) BOOST_PP_REPEAT_1_245(m, d) m(2, 245, d) # define BOOST_PP_REPEAT_1_247(m, d) BOOST_PP_REPEAT_1_246(m, d) m(2, 246, d) # define BOOST_PP_REPEAT_1_248(m, d) BOOST_PP_REPEAT_1_247(m, d) m(2, 247, d) # define BOOST_PP_REPEAT_1_249(m, d) BOOST_PP_REPEAT_1_248(m, d) m(2, 248, d) # define BOOST_PP_REPEAT_1_250(m, d) BOOST_PP_REPEAT_1_249(m, d) m(2, 249, d) # define BOOST_PP_REPEAT_1_251(m, d) BOOST_PP_REPEAT_1_250(m, d) m(2, 250, d) # define BOOST_PP_REPEAT_1_252(m, d) BOOST_PP_REPEAT_1_251(m, d) m(2, 251, d) # define BOOST_PP_REPEAT_1_253(m, d) BOOST_PP_REPEAT_1_252(m, d) m(2, 252, d) # define BOOST_PP_REPEAT_1_254(m, d) BOOST_PP_REPEAT_1_253(m, d) m(2, 253, d) # define BOOST_PP_REPEAT_1_255(m, d) BOOST_PP_REPEAT_1_254(m, d) m(2, 254, d) # define BOOST_PP_REPEAT_1_256(m, d) BOOST_PP_REPEAT_1_255(m, d) m(2, 255, d) # # define BOOST_PP_REPEAT_2_0(m, d) # define BOOST_PP_REPEAT_2_1(m, d) m(3, 0, d) # define BOOST_PP_REPEAT_2_2(m, d) BOOST_PP_REPEAT_2_1(m, d) m(3, 1, d) # define BOOST_PP_REPEAT_2_3(m, d) BOOST_PP_REPEAT_2_2(m, d) m(3, 2, d) # define BOOST_PP_REPEAT_2_4(m, d) BOOST_PP_REPEAT_2_3(m, d) m(3, 3, d) # define BOOST_PP_REPEAT_2_5(m, d) BOOST_PP_REPEAT_2_4(m, d) m(3, 4, d) # define BOOST_PP_REPEAT_2_6(m, d) BOOST_PP_REPEAT_2_5(m, d) m(3, 5, d) # define BOOST_PP_REPEAT_2_7(m, d) BOOST_PP_REPEAT_2_6(m, d) m(3, 6, d) # define BOOST_PP_REPEAT_2_8(m, d) BOOST_PP_REPEAT_2_7(m, d) m(3, 7, d) # define BOOST_PP_REPEAT_2_9(m, d) BOOST_PP_REPEAT_2_8(m, d) m(3, 8, d) # define BOOST_PP_REPEAT_2_10(m, d) BOOST_PP_REPEAT_2_9(m, d) m(3, 9, d) # define BOOST_PP_REPEAT_2_11(m, d) BOOST_PP_REPEAT_2_10(m, d) m(3, 10, d) # define BOOST_PP_REPEAT_2_12(m, d) BOOST_PP_REPEAT_2_11(m, d) m(3, 11, d) # define BOOST_PP_REPEAT_2_13(m, d) BOOST_PP_REPEAT_2_12(m, d) m(3, 12, d) # define BOOST_PP_REPEAT_2_14(m, d) BOOST_PP_REPEAT_2_13(m, d) m(3, 13, d) # define BOOST_PP_REPEAT_2_15(m, d) BOOST_PP_REPEAT_2_14(m, d) m(3, 14, d) # define BOOST_PP_REPEAT_2_16(m, d) BOOST_PP_REPEAT_2_15(m, d) m(3, 15, d) # define BOOST_PP_REPEAT_2_17(m, d) BOOST_PP_REPEAT_2_16(m, d) m(3, 16, d) # define BOOST_PP_REPEAT_2_18(m, d) BOOST_PP_REPEAT_2_17(m, d) m(3, 17, d) # define BOOST_PP_REPEAT_2_19(m, d) BOOST_PP_REPEAT_2_18(m, d) m(3, 18, d) # define BOOST_PP_REPEAT_2_20(m, d) BOOST_PP_REPEAT_2_19(m, d) m(3, 19, d) # define BOOST_PP_REPEAT_2_21(m, d) BOOST_PP_REPEAT_2_20(m, d) m(3, 20, d) # define BOOST_PP_REPEAT_2_22(m, d) BOOST_PP_REPEAT_2_21(m, d) m(3, 21, d) # define BOOST_PP_REPEAT_2_23(m, d) BOOST_PP_REPEAT_2_22(m, d) m(3, 22, d) # define BOOST_PP_REPEAT_2_24(m, d) BOOST_PP_REPEAT_2_23(m, d) m(3, 23, d) # define BOOST_PP_REPEAT_2_25(m, d) BOOST_PP_REPEAT_2_24(m, d) m(3, 24, d) # define BOOST_PP_REPEAT_2_26(m, d) BOOST_PP_REPEAT_2_25(m, d) m(3, 25, d) # define BOOST_PP_REPEAT_2_27(m, d) BOOST_PP_REPEAT_2_26(m, d) m(3, 26, d) # define BOOST_PP_REPEAT_2_28(m, d) BOOST_PP_REPEAT_2_27(m, d) m(3, 27, d) # define BOOST_PP_REPEAT_2_29(m, d) BOOST_PP_REPEAT_2_28(m, d) m(3, 28, d) # define BOOST_PP_REPEAT_2_30(m, d) BOOST_PP_REPEAT_2_29(m, d) m(3, 29, d) # define BOOST_PP_REPEAT_2_31(m, d) BOOST_PP_REPEAT_2_30(m, d) m(3, 30, d) # define BOOST_PP_REPEAT_2_32(m, d) BOOST_PP_REPEAT_2_31(m, d) m(3, 31, d) # define BOOST_PP_REPEAT_2_33(m, d) BOOST_PP_REPEAT_2_32(m, d) m(3, 32, d) # define BOOST_PP_REPEAT_2_34(m, d) BOOST_PP_REPEAT_2_33(m, d) m(3, 33, d) # define BOOST_PP_REPEAT_2_35(m, d) BOOST_PP_REPEAT_2_34(m, d) m(3, 34, d) # define BOOST_PP_REPEAT_2_36(m, d) BOOST_PP_REPEAT_2_35(m, d) m(3, 35, d) # define BOOST_PP_REPEAT_2_37(m, d) BOOST_PP_REPEAT_2_36(m, d) m(3, 36, d) # define BOOST_PP_REPEAT_2_38(m, d) BOOST_PP_REPEAT_2_37(m, d) m(3, 37, d) # define BOOST_PP_REPEAT_2_39(m, d) BOOST_PP_REPEAT_2_38(m, d) m(3, 38, d) # define BOOST_PP_REPEAT_2_40(m, d) BOOST_PP_REPEAT_2_39(m, d) m(3, 39, d) # define BOOST_PP_REPEAT_2_41(m, d) BOOST_PP_REPEAT_2_40(m, d) m(3, 40, d) # define BOOST_PP_REPEAT_2_42(m, d) BOOST_PP_REPEAT_2_41(m, d) m(3, 41, d) # define BOOST_PP_REPEAT_2_43(m, d) BOOST_PP_REPEAT_2_42(m, d) m(3, 42, d) # define BOOST_PP_REPEAT_2_44(m, d) BOOST_PP_REPEAT_2_43(m, d) m(3, 43, d) # define BOOST_PP_REPEAT_2_45(m, d) BOOST_PP_REPEAT_2_44(m, d) m(3, 44, d) # define BOOST_PP_REPEAT_2_46(m, d) BOOST_PP_REPEAT_2_45(m, d) m(3, 45, d) # define BOOST_PP_REPEAT_2_47(m, d) BOOST_PP_REPEAT_2_46(m, d) m(3, 46, d) # define BOOST_PP_REPEAT_2_48(m, d) BOOST_PP_REPEAT_2_47(m, d) m(3, 47, d) # define BOOST_PP_REPEAT_2_49(m, d) BOOST_PP_REPEAT_2_48(m, d) m(3, 48, d) # define BOOST_PP_REPEAT_2_50(m, d) BOOST_PP_REPEAT_2_49(m, d) m(3, 49, d) # define BOOST_PP_REPEAT_2_51(m, d) BOOST_PP_REPEAT_2_50(m, d) m(3, 50, d) # define BOOST_PP_REPEAT_2_52(m, d) BOOST_PP_REPEAT_2_51(m, d) m(3, 51, d) # define BOOST_PP_REPEAT_2_53(m, d) BOOST_PP_REPEAT_2_52(m, d) m(3, 52, d) # define BOOST_PP_REPEAT_2_54(m, d) BOOST_PP_REPEAT_2_53(m, d) m(3, 53, d) # define BOOST_PP_REPEAT_2_55(m, d) BOOST_PP_REPEAT_2_54(m, d) m(3, 54, d) # define BOOST_PP_REPEAT_2_56(m, d) BOOST_PP_REPEAT_2_55(m, d) m(3, 55, d) # define BOOST_PP_REPEAT_2_57(m, d) BOOST_PP_REPEAT_2_56(m, d) m(3, 56, d) # define BOOST_PP_REPEAT_2_58(m, d) BOOST_PP_REPEAT_2_57(m, d) m(3, 57, d) # define BOOST_PP_REPEAT_2_59(m, d) BOOST_PP_REPEAT_2_58(m, d) m(3, 58, d) # define BOOST_PP_REPEAT_2_60(m, d) BOOST_PP_REPEAT_2_59(m, d) m(3, 59, d) # define BOOST_PP_REPEAT_2_61(m, d) BOOST_PP_REPEAT_2_60(m, d) m(3, 60, d) # define BOOST_PP_REPEAT_2_62(m, d) BOOST_PP_REPEAT_2_61(m, d) m(3, 61, d) # define BOOST_PP_REPEAT_2_63(m, d) BOOST_PP_REPEAT_2_62(m, d) m(3, 62, d) # define BOOST_PP_REPEAT_2_64(m, d) BOOST_PP_REPEAT_2_63(m, d) m(3, 63, d) # define BOOST_PP_REPEAT_2_65(m, d) BOOST_PP_REPEAT_2_64(m, d) m(3, 64, d) # define BOOST_PP_REPEAT_2_66(m, d) BOOST_PP_REPEAT_2_65(m, d) m(3, 65, d) # define BOOST_PP_REPEAT_2_67(m, d) BOOST_PP_REPEAT_2_66(m, d) m(3, 66, d) # define BOOST_PP_REPEAT_2_68(m, d) BOOST_PP_REPEAT_2_67(m, d) m(3, 67, d) # define BOOST_PP_REPEAT_2_69(m, d) BOOST_PP_REPEAT_2_68(m, d) m(3, 68, d) # define BOOST_PP_REPEAT_2_70(m, d) BOOST_PP_REPEAT_2_69(m, d) m(3, 69, d) # define BOOST_PP_REPEAT_2_71(m, d) BOOST_PP_REPEAT_2_70(m, d) m(3, 70, d) # define BOOST_PP_REPEAT_2_72(m, d) BOOST_PP_REPEAT_2_71(m, d) m(3, 71, d) # define BOOST_PP_REPEAT_2_73(m, d) BOOST_PP_REPEAT_2_72(m, d) m(3, 72, d) # define BOOST_PP_REPEAT_2_74(m, d) BOOST_PP_REPEAT_2_73(m, d) m(3, 73, d) # define BOOST_PP_REPEAT_2_75(m, d) BOOST_PP_REPEAT_2_74(m, d) m(3, 74, d) # define BOOST_PP_REPEAT_2_76(m, d) BOOST_PP_REPEAT_2_75(m, d) m(3, 75, d) # define BOOST_PP_REPEAT_2_77(m, d) BOOST_PP_REPEAT_2_76(m, d) m(3, 76, d) # define BOOST_PP_REPEAT_2_78(m, d) BOOST_PP_REPEAT_2_77(m, d) m(3, 77, d) # define BOOST_PP_REPEAT_2_79(m, d) BOOST_PP_REPEAT_2_78(m, d) m(3, 78, d) # define BOOST_PP_REPEAT_2_80(m, d) BOOST_PP_REPEAT_2_79(m, d) m(3, 79, d) # define BOOST_PP_REPEAT_2_81(m, d) BOOST_PP_REPEAT_2_80(m, d) m(3, 80, d) # define BOOST_PP_REPEAT_2_82(m, d) BOOST_PP_REPEAT_2_81(m, d) m(3, 81, d) # define BOOST_PP_REPEAT_2_83(m, d) BOOST_PP_REPEAT_2_82(m, d) m(3, 82, d) # define BOOST_PP_REPEAT_2_84(m, d) BOOST_PP_REPEAT_2_83(m, d) m(3, 83, d) # define BOOST_PP_REPEAT_2_85(m, d) BOOST_PP_REPEAT_2_84(m, d) m(3, 84, d) # define BOOST_PP_REPEAT_2_86(m, d) BOOST_PP_REPEAT_2_85(m, d) m(3, 85, d) # define BOOST_PP_REPEAT_2_87(m, d) BOOST_PP_REPEAT_2_86(m, d) m(3, 86, d) # define BOOST_PP_REPEAT_2_88(m, d) BOOST_PP_REPEAT_2_87(m, d) m(3, 87, d) # define BOOST_PP_REPEAT_2_89(m, d) BOOST_PP_REPEAT_2_88(m, d) m(3, 88, d) # define BOOST_PP_REPEAT_2_90(m, d) BOOST_PP_REPEAT_2_89(m, d) m(3, 89, d) # define BOOST_PP_REPEAT_2_91(m, d) BOOST_PP_REPEAT_2_90(m, d) m(3, 90, d) # define BOOST_PP_REPEAT_2_92(m, d) BOOST_PP_REPEAT_2_91(m, d) m(3, 91, d) # define BOOST_PP_REPEAT_2_93(m, d) BOOST_PP_REPEAT_2_92(m, d) m(3, 92, d) # define BOOST_PP_REPEAT_2_94(m, d) BOOST_PP_REPEAT_2_93(m, d) m(3, 93, d) # define BOOST_PP_REPEAT_2_95(m, d) BOOST_PP_REPEAT_2_94(m, d) m(3, 94, d) # define BOOST_PP_REPEAT_2_96(m, d) BOOST_PP_REPEAT_2_95(m, d) m(3, 95, d) # define BOOST_PP_REPEAT_2_97(m, d) BOOST_PP_REPEAT_2_96(m, d) m(3, 96, d) # define BOOST_PP_REPEAT_2_98(m, d) BOOST_PP_REPEAT_2_97(m, d) m(3, 97, d) # define BOOST_PP_REPEAT_2_99(m, d) BOOST_PP_REPEAT_2_98(m, d) m(3, 98, d) # define BOOST_PP_REPEAT_2_100(m, d) BOOST_PP_REPEAT_2_99(m, d) m(3, 99, d) # define BOOST_PP_REPEAT_2_101(m, d) BOOST_PP_REPEAT_2_100(m, d) m(3, 100, d) # define BOOST_PP_REPEAT_2_102(m, d) BOOST_PP_REPEAT_2_101(m, d) m(3, 101, d) # define BOOST_PP_REPEAT_2_103(m, d) BOOST_PP_REPEAT_2_102(m, d) m(3, 102, d) # define BOOST_PP_REPEAT_2_104(m, d) BOOST_PP_REPEAT_2_103(m, d) m(3, 103, d) # define BOOST_PP_REPEAT_2_105(m, d) BOOST_PP_REPEAT_2_104(m, d) m(3, 104, d) # define BOOST_PP_REPEAT_2_106(m, d) BOOST_PP_REPEAT_2_105(m, d) m(3, 105, d) # define BOOST_PP_REPEAT_2_107(m, d) BOOST_PP_REPEAT_2_106(m, d) m(3, 106, d) # define BOOST_PP_REPEAT_2_108(m, d) BOOST_PP_REPEAT_2_107(m, d) m(3, 107, d) # define BOOST_PP_REPEAT_2_109(m, d) BOOST_PP_REPEAT_2_108(m, d) m(3, 108, d) # define BOOST_PP_REPEAT_2_110(m, d) BOOST_PP_REPEAT_2_109(m, d) m(3, 109, d) # define BOOST_PP_REPEAT_2_111(m, d) BOOST_PP_REPEAT_2_110(m, d) m(3, 110, d) # define BOOST_PP_REPEAT_2_112(m, d) BOOST_PP_REPEAT_2_111(m, d) m(3, 111, d) # define BOOST_PP_REPEAT_2_113(m, d) BOOST_PP_REPEAT_2_112(m, d) m(3, 112, d) # define BOOST_PP_REPEAT_2_114(m, d) BOOST_PP_REPEAT_2_113(m, d) m(3, 113, d) # define BOOST_PP_REPEAT_2_115(m, d) BOOST_PP_REPEAT_2_114(m, d) m(3, 114, d) # define BOOST_PP_REPEAT_2_116(m, d) BOOST_PP_REPEAT_2_115(m, d) m(3, 115, d) # define BOOST_PP_REPEAT_2_117(m, d) BOOST_PP_REPEAT_2_116(m, d) m(3, 116, d) # define BOOST_PP_REPEAT_2_118(m, d) BOOST_PP_REPEAT_2_117(m, d) m(3, 117, d) # define BOOST_PP_REPEAT_2_119(m, d) BOOST_PP_REPEAT_2_118(m, d) m(3, 118, d) # define BOOST_PP_REPEAT_2_120(m, d) BOOST_PP_REPEAT_2_119(m, d) m(3, 119, d) # define BOOST_PP_REPEAT_2_121(m, d) BOOST_PP_REPEAT_2_120(m, d) m(3, 120, d) # define BOOST_PP_REPEAT_2_122(m, d) BOOST_PP_REPEAT_2_121(m, d) m(3, 121, d) # define BOOST_PP_REPEAT_2_123(m, d) BOOST_PP_REPEAT_2_122(m, d) m(3, 122, d) # define BOOST_PP_REPEAT_2_124(m, d) BOOST_PP_REPEAT_2_123(m, d) m(3, 123, d) # define BOOST_PP_REPEAT_2_125(m, d) BOOST_PP_REPEAT_2_124(m, d) m(3, 124, d) # define BOOST_PP_REPEAT_2_126(m, d) BOOST_PP_REPEAT_2_125(m, d) m(3, 125, d) # define BOOST_PP_REPEAT_2_127(m, d) BOOST_PP_REPEAT_2_126(m, d) m(3, 126, d) # define BOOST_PP_REPEAT_2_128(m, d) BOOST_PP_REPEAT_2_127(m, d) m(3, 127, d) # define BOOST_PP_REPEAT_2_129(m, d) BOOST_PP_REPEAT_2_128(m, d) m(3, 128, d) # define BOOST_PP_REPEAT_2_130(m, d) BOOST_PP_REPEAT_2_129(m, d) m(3, 129, d) # define BOOST_PP_REPEAT_2_131(m, d) BOOST_PP_REPEAT_2_130(m, d) m(3, 130, d) # define BOOST_PP_REPEAT_2_132(m, d) BOOST_PP_REPEAT_2_131(m, d) m(3, 131, d) # define BOOST_PP_REPEAT_2_133(m, d) BOOST_PP_REPEAT_2_132(m, d) m(3, 132, d) # define BOOST_PP_REPEAT_2_134(m, d) BOOST_PP_REPEAT_2_133(m, d) m(3, 133, d) # define BOOST_PP_REPEAT_2_135(m, d) BOOST_PP_REPEAT_2_134(m, d) m(3, 134, d) # define BOOST_PP_REPEAT_2_136(m, d) BOOST_PP_REPEAT_2_135(m, d) m(3, 135, d) # define BOOST_PP_REPEAT_2_137(m, d) BOOST_PP_REPEAT_2_136(m, d) m(3, 136, d) # define BOOST_PP_REPEAT_2_138(m, d) BOOST_PP_REPEAT_2_137(m, d) m(3, 137, d) # define BOOST_PP_REPEAT_2_139(m, d) BOOST_PP_REPEAT_2_138(m, d) m(3, 138, d) # define BOOST_PP_REPEAT_2_140(m, d) BOOST_PP_REPEAT_2_139(m, d) m(3, 139, d) # define BOOST_PP_REPEAT_2_141(m, d) BOOST_PP_REPEAT_2_140(m, d) m(3, 140, d) # define BOOST_PP_REPEAT_2_142(m, d) BOOST_PP_REPEAT_2_141(m, d) m(3, 141, d) # define BOOST_PP_REPEAT_2_143(m, d) BOOST_PP_REPEAT_2_142(m, d) m(3, 142, d) # define BOOST_PP_REPEAT_2_144(m, d) BOOST_PP_REPEAT_2_143(m, d) m(3, 143, d) # define BOOST_PP_REPEAT_2_145(m, d) BOOST_PP_REPEAT_2_144(m, d) m(3, 144, d) # define BOOST_PP_REPEAT_2_146(m, d) BOOST_PP_REPEAT_2_145(m, d) m(3, 145, d) # define BOOST_PP_REPEAT_2_147(m, d) BOOST_PP_REPEAT_2_146(m, d) m(3, 146, d) # define BOOST_PP_REPEAT_2_148(m, d) BOOST_PP_REPEAT_2_147(m, d) m(3, 147, d) # define BOOST_PP_REPEAT_2_149(m, d) BOOST_PP_REPEAT_2_148(m, d) m(3, 148, d) # define BOOST_PP_REPEAT_2_150(m, d) BOOST_PP_REPEAT_2_149(m, d) m(3, 149, d) # define BOOST_PP_REPEAT_2_151(m, d) BOOST_PP_REPEAT_2_150(m, d) m(3, 150, d) # define BOOST_PP_REPEAT_2_152(m, d) BOOST_PP_REPEAT_2_151(m, d) m(3, 151, d) # define BOOST_PP_REPEAT_2_153(m, d) BOOST_PP_REPEAT_2_152(m, d) m(3, 152, d) # define BOOST_PP_REPEAT_2_154(m, d) BOOST_PP_REPEAT_2_153(m, d) m(3, 153, d) # define BOOST_PP_REPEAT_2_155(m, d) BOOST_PP_REPEAT_2_154(m, d) m(3, 154, d) # define BOOST_PP_REPEAT_2_156(m, d) BOOST_PP_REPEAT_2_155(m, d) m(3, 155, d) # define BOOST_PP_REPEAT_2_157(m, d) BOOST_PP_REPEAT_2_156(m, d) m(3, 156, d) # define BOOST_PP_REPEAT_2_158(m, d) BOOST_PP_REPEAT_2_157(m, d) m(3, 157, d) # define BOOST_PP_REPEAT_2_159(m, d) BOOST_PP_REPEAT_2_158(m, d) m(3, 158, d) # define BOOST_PP_REPEAT_2_160(m, d) BOOST_PP_REPEAT_2_159(m, d) m(3, 159, d) # define BOOST_PP_REPEAT_2_161(m, d) BOOST_PP_REPEAT_2_160(m, d) m(3, 160, d) # define BOOST_PP_REPEAT_2_162(m, d) BOOST_PP_REPEAT_2_161(m, d) m(3, 161, d) # define BOOST_PP_REPEAT_2_163(m, d) BOOST_PP_REPEAT_2_162(m, d) m(3, 162, d) # define BOOST_PP_REPEAT_2_164(m, d) BOOST_PP_REPEAT_2_163(m, d) m(3, 163, d) # define BOOST_PP_REPEAT_2_165(m, d) BOOST_PP_REPEAT_2_164(m, d) m(3, 164, d) # define BOOST_PP_REPEAT_2_166(m, d) BOOST_PP_REPEAT_2_165(m, d) m(3, 165, d) # define BOOST_PP_REPEAT_2_167(m, d) BOOST_PP_REPEAT_2_166(m, d) m(3, 166, d) # define BOOST_PP_REPEAT_2_168(m, d) BOOST_PP_REPEAT_2_167(m, d) m(3, 167, d) # define BOOST_PP_REPEAT_2_169(m, d) BOOST_PP_REPEAT_2_168(m, d) m(3, 168, d) # define BOOST_PP_REPEAT_2_170(m, d) BOOST_PP_REPEAT_2_169(m, d) m(3, 169, d) # define BOOST_PP_REPEAT_2_171(m, d) BOOST_PP_REPEAT_2_170(m, d) m(3, 170, d) # define BOOST_PP_REPEAT_2_172(m, d) BOOST_PP_REPEAT_2_171(m, d) m(3, 171, d) # define BOOST_PP_REPEAT_2_173(m, d) BOOST_PP_REPEAT_2_172(m, d) m(3, 172, d) # define BOOST_PP_REPEAT_2_174(m, d) BOOST_PP_REPEAT_2_173(m, d) m(3, 173, d) # define BOOST_PP_REPEAT_2_175(m, d) BOOST_PP_REPEAT_2_174(m, d) m(3, 174, d) # define BOOST_PP_REPEAT_2_176(m, d) BOOST_PP_REPEAT_2_175(m, d) m(3, 175, d) # define BOOST_PP_REPEAT_2_177(m, d) BOOST_PP_REPEAT_2_176(m, d) m(3, 176, d) # define BOOST_PP_REPEAT_2_178(m, d) BOOST_PP_REPEAT_2_177(m, d) m(3, 177, d) # define BOOST_PP_REPEAT_2_179(m, d) BOOST_PP_REPEAT_2_178(m, d) m(3, 178, d) # define BOOST_PP_REPEAT_2_180(m, d) BOOST_PP_REPEAT_2_179(m, d) m(3, 179, d) # define BOOST_PP_REPEAT_2_181(m, d) BOOST_PP_REPEAT_2_180(m, d) m(3, 180, d) # define BOOST_PP_REPEAT_2_182(m, d) BOOST_PP_REPEAT_2_181(m, d) m(3, 181, d) # define BOOST_PP_REPEAT_2_183(m, d) BOOST_PP_REPEAT_2_182(m, d) m(3, 182, d) # define BOOST_PP_REPEAT_2_184(m, d) BOOST_PP_REPEAT_2_183(m, d) m(3, 183, d) # define BOOST_PP_REPEAT_2_185(m, d) BOOST_PP_REPEAT_2_184(m, d) m(3, 184, d) # define BOOST_PP_REPEAT_2_186(m, d) BOOST_PP_REPEAT_2_185(m, d) m(3, 185, d) # define BOOST_PP_REPEAT_2_187(m, d) BOOST_PP_REPEAT_2_186(m, d) m(3, 186, d) # define BOOST_PP_REPEAT_2_188(m, d) BOOST_PP_REPEAT_2_187(m, d) m(3, 187, d) # define BOOST_PP_REPEAT_2_189(m, d) BOOST_PP_REPEAT_2_188(m, d) m(3, 188, d) # define BOOST_PP_REPEAT_2_190(m, d) BOOST_PP_REPEAT_2_189(m, d) m(3, 189, d) # define BOOST_PP_REPEAT_2_191(m, d) BOOST_PP_REPEAT_2_190(m, d) m(3, 190, d) # define BOOST_PP_REPEAT_2_192(m, d) BOOST_PP_REPEAT_2_191(m, d) m(3, 191, d) # define BOOST_PP_REPEAT_2_193(m, d) BOOST_PP_REPEAT_2_192(m, d) m(3, 192, d) # define BOOST_PP_REPEAT_2_194(m, d) BOOST_PP_REPEAT_2_193(m, d) m(3, 193, d) # define BOOST_PP_REPEAT_2_195(m, d) BOOST_PP_REPEAT_2_194(m, d) m(3, 194, d) # define BOOST_PP_REPEAT_2_196(m, d) BOOST_PP_REPEAT_2_195(m, d) m(3, 195, d) # define BOOST_PP_REPEAT_2_197(m, d) BOOST_PP_REPEAT_2_196(m, d) m(3, 196, d) # define BOOST_PP_REPEAT_2_198(m, d) BOOST_PP_REPEAT_2_197(m, d) m(3, 197, d) # define BOOST_PP_REPEAT_2_199(m, d) BOOST_PP_REPEAT_2_198(m, d) m(3, 198, d) # define BOOST_PP_REPEAT_2_200(m, d) BOOST_PP_REPEAT_2_199(m, d) m(3, 199, d) # define BOOST_PP_REPEAT_2_201(m, d) BOOST_PP_REPEAT_2_200(m, d) m(3, 200, d) # define BOOST_PP_REPEAT_2_202(m, d) BOOST_PP_REPEAT_2_201(m, d) m(3, 201, d) # define BOOST_PP_REPEAT_2_203(m, d) BOOST_PP_REPEAT_2_202(m, d) m(3, 202, d) # define BOOST_PP_REPEAT_2_204(m, d) BOOST_PP_REPEAT_2_203(m, d) m(3, 203, d) # define BOOST_PP_REPEAT_2_205(m, d) BOOST_PP_REPEAT_2_204(m, d) m(3, 204, d) # define BOOST_PP_REPEAT_2_206(m, d) BOOST_PP_REPEAT_2_205(m, d) m(3, 205, d) # define BOOST_PP_REPEAT_2_207(m, d) BOOST_PP_REPEAT_2_206(m, d) m(3, 206, d) # define BOOST_PP_REPEAT_2_208(m, d) BOOST_PP_REPEAT_2_207(m, d) m(3, 207, d) # define BOOST_PP_REPEAT_2_209(m, d) BOOST_PP_REPEAT_2_208(m, d) m(3, 208, d) # define BOOST_PP_REPEAT_2_210(m, d) BOOST_PP_REPEAT_2_209(m, d) m(3, 209, d) # define BOOST_PP_REPEAT_2_211(m, d) BOOST_PP_REPEAT_2_210(m, d) m(3, 210, d) # define BOOST_PP_REPEAT_2_212(m, d) BOOST_PP_REPEAT_2_211(m, d) m(3, 211, d) # define BOOST_PP_REPEAT_2_213(m, d) BOOST_PP_REPEAT_2_212(m, d) m(3, 212, d) # define BOOST_PP_REPEAT_2_214(m, d) BOOST_PP_REPEAT_2_213(m, d) m(3, 213, d) # define BOOST_PP_REPEAT_2_215(m, d) BOOST_PP_REPEAT_2_214(m, d) m(3, 214, d) # define BOOST_PP_REPEAT_2_216(m, d) BOOST_PP_REPEAT_2_215(m, d) m(3, 215, d) # define BOOST_PP_REPEAT_2_217(m, d) BOOST_PP_REPEAT_2_216(m, d) m(3, 216, d) # define BOOST_PP_REPEAT_2_218(m, d) BOOST_PP_REPEAT_2_217(m, d) m(3, 217, d) # define BOOST_PP_REPEAT_2_219(m, d) BOOST_PP_REPEAT_2_218(m, d) m(3, 218, d) # define BOOST_PP_REPEAT_2_220(m, d) BOOST_PP_REPEAT_2_219(m, d) m(3, 219, d) # define BOOST_PP_REPEAT_2_221(m, d) BOOST_PP_REPEAT_2_220(m, d) m(3, 220, d) # define BOOST_PP_REPEAT_2_222(m, d) BOOST_PP_REPEAT_2_221(m, d) m(3, 221, d) # define BOOST_PP_REPEAT_2_223(m, d) BOOST_PP_REPEAT_2_222(m, d) m(3, 222, d) # define BOOST_PP_REPEAT_2_224(m, d) BOOST_PP_REPEAT_2_223(m, d) m(3, 223, d) # define BOOST_PP_REPEAT_2_225(m, d) BOOST_PP_REPEAT_2_224(m, d) m(3, 224, d) # define BOOST_PP_REPEAT_2_226(m, d) BOOST_PP_REPEAT_2_225(m, d) m(3, 225, d) # define BOOST_PP_REPEAT_2_227(m, d) BOOST_PP_REPEAT_2_226(m, d) m(3, 226, d) # define BOOST_PP_REPEAT_2_228(m, d) BOOST_PP_REPEAT_2_227(m, d) m(3, 227, d) # define BOOST_PP_REPEAT_2_229(m, d) BOOST_PP_REPEAT_2_228(m, d) m(3, 228, d) # define BOOST_PP_REPEAT_2_230(m, d) BOOST_PP_REPEAT_2_229(m, d) m(3, 229, d) # define BOOST_PP_REPEAT_2_231(m, d) BOOST_PP_REPEAT_2_230(m, d) m(3, 230, d) # define BOOST_PP_REPEAT_2_232(m, d) BOOST_PP_REPEAT_2_231(m, d) m(3, 231, d) # define BOOST_PP_REPEAT_2_233(m, d) BOOST_PP_REPEAT_2_232(m, d) m(3, 232, d) # define BOOST_PP_REPEAT_2_234(m, d) BOOST_PP_REPEAT_2_233(m, d) m(3, 233, d) # define BOOST_PP_REPEAT_2_235(m, d) BOOST_PP_REPEAT_2_234(m, d) m(3, 234, d) # define BOOST_PP_REPEAT_2_236(m, d) BOOST_PP_REPEAT_2_235(m, d) m(3, 235, d) # define BOOST_PP_REPEAT_2_237(m, d) BOOST_PP_REPEAT_2_236(m, d) m(3, 236, d) # define BOOST_PP_REPEAT_2_238(m, d) BOOST_PP_REPEAT_2_237(m, d) m(3, 237, d) # define BOOST_PP_REPEAT_2_239(m, d) BOOST_PP_REPEAT_2_238(m, d) m(3, 238, d) # define BOOST_PP_REPEAT_2_240(m, d) BOOST_PP_REPEAT_2_239(m, d) m(3, 239, d) # define BOOST_PP_REPEAT_2_241(m, d) BOOST_PP_REPEAT_2_240(m, d) m(3, 240, d) # define BOOST_PP_REPEAT_2_242(m, d) BOOST_PP_REPEAT_2_241(m, d) m(3, 241, d) # define BOOST_PP_REPEAT_2_243(m, d) BOOST_PP_REPEAT_2_242(m, d) m(3, 242, d) # define BOOST_PP_REPEAT_2_244(m, d) BOOST_PP_REPEAT_2_243(m, d) m(3, 243, d) # define BOOST_PP_REPEAT_2_245(m, d) BOOST_PP_REPEAT_2_244(m, d) m(3, 244, d) # define BOOST_PP_REPEAT_2_246(m, d) BOOST_PP_REPEAT_2_245(m, d) m(3, 245, d) # define BOOST_PP_REPEAT_2_247(m, d) BOOST_PP_REPEAT_2_246(m, d) m(3, 246, d) # define BOOST_PP_REPEAT_2_248(m, d) BOOST_PP_REPEAT_2_247(m, d) m(3, 247, d) # define BOOST_PP_REPEAT_2_249(m, d) BOOST_PP_REPEAT_2_248(m, d) m(3, 248, d) # define BOOST_PP_REPEAT_2_250(m, d) BOOST_PP_REPEAT_2_249(m, d) m(3, 249, d) # define BOOST_PP_REPEAT_2_251(m, d) BOOST_PP_REPEAT_2_250(m, d) m(3, 250, d) # define BOOST_PP_REPEAT_2_252(m, d) BOOST_PP_REPEAT_2_251(m, d) m(3, 251, d) # define BOOST_PP_REPEAT_2_253(m, d) BOOST_PP_REPEAT_2_252(m, d) m(3, 252, d) # define BOOST_PP_REPEAT_2_254(m, d) BOOST_PP_REPEAT_2_253(m, d) m(3, 253, d) # define BOOST_PP_REPEAT_2_255(m, d) BOOST_PP_REPEAT_2_254(m, d) m(3, 254, d) # define BOOST_PP_REPEAT_2_256(m, d) BOOST_PP_REPEAT_2_255(m, d) m(3, 255, d) # # define BOOST_PP_REPEAT_3_0(m, d) # define BOOST_PP_REPEAT_3_1(m, d) m(4, 0, d) # define BOOST_PP_REPEAT_3_2(m, d) BOOST_PP_REPEAT_3_1(m, d) m(4, 1, d) # define BOOST_PP_REPEAT_3_3(m, d) BOOST_PP_REPEAT_3_2(m, d) m(4, 2, d) # define BOOST_PP_REPEAT_3_4(m, d) BOOST_PP_REPEAT_3_3(m, d) m(4, 3, d) # define BOOST_PP_REPEAT_3_5(m, d) BOOST_PP_REPEAT_3_4(m, d) m(4, 4, d) # define BOOST_PP_REPEAT_3_6(m, d) BOOST_PP_REPEAT_3_5(m, d) m(4, 5, d) # define BOOST_PP_REPEAT_3_7(m, d) BOOST_PP_REPEAT_3_6(m, d) m(4, 6, d) # define BOOST_PP_REPEAT_3_8(m, d) BOOST_PP_REPEAT_3_7(m, d) m(4, 7, d) # define BOOST_PP_REPEAT_3_9(m, d) BOOST_PP_REPEAT_3_8(m, d) m(4, 8, d) # define BOOST_PP_REPEAT_3_10(m, d) BOOST_PP_REPEAT_3_9(m, d) m(4, 9, d) # define BOOST_PP_REPEAT_3_11(m, d) BOOST_PP_REPEAT_3_10(m, d) m(4, 10, d) # define BOOST_PP_REPEAT_3_12(m, d) BOOST_PP_REPEAT_3_11(m, d) m(4, 11, d) # define BOOST_PP_REPEAT_3_13(m, d) BOOST_PP_REPEAT_3_12(m, d) m(4, 12, d) # define BOOST_PP_REPEAT_3_14(m, d) BOOST_PP_REPEAT_3_13(m, d) m(4, 13, d) # define BOOST_PP_REPEAT_3_15(m, d) BOOST_PP_REPEAT_3_14(m, d) m(4, 14, d) # define BOOST_PP_REPEAT_3_16(m, d) BOOST_PP_REPEAT_3_15(m, d) m(4, 15, d) # define BOOST_PP_REPEAT_3_17(m, d) BOOST_PP_REPEAT_3_16(m, d) m(4, 16, d) # define BOOST_PP_REPEAT_3_18(m, d) BOOST_PP_REPEAT_3_17(m, d) m(4, 17, d) # define BOOST_PP_REPEAT_3_19(m, d) BOOST_PP_REPEAT_3_18(m, d) m(4, 18, d) # define BOOST_PP_REPEAT_3_20(m, d) BOOST_PP_REPEAT_3_19(m, d) m(4, 19, d) # define BOOST_PP_REPEAT_3_21(m, d) BOOST_PP_REPEAT_3_20(m, d) m(4, 20, d) # define BOOST_PP_REPEAT_3_22(m, d) BOOST_PP_REPEAT_3_21(m, d) m(4, 21, d) # define BOOST_PP_REPEAT_3_23(m, d) BOOST_PP_REPEAT_3_22(m, d) m(4, 22, d) # define BOOST_PP_REPEAT_3_24(m, d) BOOST_PP_REPEAT_3_23(m, d) m(4, 23, d) # define BOOST_PP_REPEAT_3_25(m, d) BOOST_PP_REPEAT_3_24(m, d) m(4, 24, d) # define BOOST_PP_REPEAT_3_26(m, d) BOOST_PP_REPEAT_3_25(m, d) m(4, 25, d) # define BOOST_PP_REPEAT_3_27(m, d) BOOST_PP_REPEAT_3_26(m, d) m(4, 26, d) # define BOOST_PP_REPEAT_3_28(m, d) BOOST_PP_REPEAT_3_27(m, d) m(4, 27, d) # define BOOST_PP_REPEAT_3_29(m, d) BOOST_PP_REPEAT_3_28(m, d) m(4, 28, d) # define BOOST_PP_REPEAT_3_30(m, d) BOOST_PP_REPEAT_3_29(m, d) m(4, 29, d) # define BOOST_PP_REPEAT_3_31(m, d) BOOST_PP_REPEAT_3_30(m, d) m(4, 30, d) # define BOOST_PP_REPEAT_3_32(m, d) BOOST_PP_REPEAT_3_31(m, d) m(4, 31, d) # define BOOST_PP_REPEAT_3_33(m, d) BOOST_PP_REPEAT_3_32(m, d) m(4, 32, d) # define BOOST_PP_REPEAT_3_34(m, d) BOOST_PP_REPEAT_3_33(m, d) m(4, 33, d) # define BOOST_PP_REPEAT_3_35(m, d) BOOST_PP_REPEAT_3_34(m, d) m(4, 34, d) # define BOOST_PP_REPEAT_3_36(m, d) BOOST_PP_REPEAT_3_35(m, d) m(4, 35, d) # define BOOST_PP_REPEAT_3_37(m, d) BOOST_PP_REPEAT_3_36(m, d) m(4, 36, d) # define BOOST_PP_REPEAT_3_38(m, d) BOOST_PP_REPEAT_3_37(m, d) m(4, 37, d) # define BOOST_PP_REPEAT_3_39(m, d) BOOST_PP_REPEAT_3_38(m, d) m(4, 38, d) # define BOOST_PP_REPEAT_3_40(m, d) BOOST_PP_REPEAT_3_39(m, d) m(4, 39, d) # define BOOST_PP_REPEAT_3_41(m, d) BOOST_PP_REPEAT_3_40(m, d) m(4, 40, d) # define BOOST_PP_REPEAT_3_42(m, d) BOOST_PP_REPEAT_3_41(m, d) m(4, 41, d) # define BOOST_PP_REPEAT_3_43(m, d) BOOST_PP_REPEAT_3_42(m, d) m(4, 42, d) # define BOOST_PP_REPEAT_3_44(m, d) BOOST_PP_REPEAT_3_43(m, d) m(4, 43, d) # define BOOST_PP_REPEAT_3_45(m, d) BOOST_PP_REPEAT_3_44(m, d) m(4, 44, d) # define BOOST_PP_REPEAT_3_46(m, d) BOOST_PP_REPEAT_3_45(m, d) m(4, 45, d) # define BOOST_PP_REPEAT_3_47(m, d) BOOST_PP_REPEAT_3_46(m, d) m(4, 46, d) # define BOOST_PP_REPEAT_3_48(m, d) BOOST_PP_REPEAT_3_47(m, d) m(4, 47, d) # define BOOST_PP_REPEAT_3_49(m, d) BOOST_PP_REPEAT_3_48(m, d) m(4, 48, d) # define BOOST_PP_REPEAT_3_50(m, d) BOOST_PP_REPEAT_3_49(m, d) m(4, 49, d) # define BOOST_PP_REPEAT_3_51(m, d) BOOST_PP_REPEAT_3_50(m, d) m(4, 50, d) # define BOOST_PP_REPEAT_3_52(m, d) BOOST_PP_REPEAT_3_51(m, d) m(4, 51, d) # define BOOST_PP_REPEAT_3_53(m, d) BOOST_PP_REPEAT_3_52(m, d) m(4, 52, d) # define BOOST_PP_REPEAT_3_54(m, d) BOOST_PP_REPEAT_3_53(m, d) m(4, 53, d) # define BOOST_PP_REPEAT_3_55(m, d) BOOST_PP_REPEAT_3_54(m, d) m(4, 54, d) # define BOOST_PP_REPEAT_3_56(m, d) BOOST_PP_REPEAT_3_55(m, d) m(4, 55, d) # define BOOST_PP_REPEAT_3_57(m, d) BOOST_PP_REPEAT_3_56(m, d) m(4, 56, d) # define BOOST_PP_REPEAT_3_58(m, d) BOOST_PP_REPEAT_3_57(m, d) m(4, 57, d) # define BOOST_PP_REPEAT_3_59(m, d) BOOST_PP_REPEAT_3_58(m, d) m(4, 58, d) # define BOOST_PP_REPEAT_3_60(m, d) BOOST_PP_REPEAT_3_59(m, d) m(4, 59, d) # define BOOST_PP_REPEAT_3_61(m, d) BOOST_PP_REPEAT_3_60(m, d) m(4, 60, d) # define BOOST_PP_REPEAT_3_62(m, d) BOOST_PP_REPEAT_3_61(m, d) m(4, 61, d) # define BOOST_PP_REPEAT_3_63(m, d) BOOST_PP_REPEAT_3_62(m, d) m(4, 62, d) # define BOOST_PP_REPEAT_3_64(m, d) BOOST_PP_REPEAT_3_63(m, d) m(4, 63, d) # define BOOST_PP_REPEAT_3_65(m, d) BOOST_PP_REPEAT_3_64(m, d) m(4, 64, d) # define BOOST_PP_REPEAT_3_66(m, d) BOOST_PP_REPEAT_3_65(m, d) m(4, 65, d) # define BOOST_PP_REPEAT_3_67(m, d) BOOST_PP_REPEAT_3_66(m, d) m(4, 66, d) # define BOOST_PP_REPEAT_3_68(m, d) BOOST_PP_REPEAT_3_67(m, d) m(4, 67, d) # define BOOST_PP_REPEAT_3_69(m, d) BOOST_PP_REPEAT_3_68(m, d) m(4, 68, d) # define BOOST_PP_REPEAT_3_70(m, d) BOOST_PP_REPEAT_3_69(m, d) m(4, 69, d) # define BOOST_PP_REPEAT_3_71(m, d) BOOST_PP_REPEAT_3_70(m, d) m(4, 70, d) # define BOOST_PP_REPEAT_3_72(m, d) BOOST_PP_REPEAT_3_71(m, d) m(4, 71, d) # define BOOST_PP_REPEAT_3_73(m, d) BOOST_PP_REPEAT_3_72(m, d) m(4, 72, d) # define BOOST_PP_REPEAT_3_74(m, d) BOOST_PP_REPEAT_3_73(m, d) m(4, 73, d) # define BOOST_PP_REPEAT_3_75(m, d) BOOST_PP_REPEAT_3_74(m, d) m(4, 74, d) # define BOOST_PP_REPEAT_3_76(m, d) BOOST_PP_REPEAT_3_75(m, d) m(4, 75, d) # define BOOST_PP_REPEAT_3_77(m, d) BOOST_PP_REPEAT_3_76(m, d) m(4, 76, d) # define BOOST_PP_REPEAT_3_78(m, d) BOOST_PP_REPEAT_3_77(m, d) m(4, 77, d) # define BOOST_PP_REPEAT_3_79(m, d) BOOST_PP_REPEAT_3_78(m, d) m(4, 78, d) # define BOOST_PP_REPEAT_3_80(m, d) BOOST_PP_REPEAT_3_79(m, d) m(4, 79, d) # define BOOST_PP_REPEAT_3_81(m, d) BOOST_PP_REPEAT_3_80(m, d) m(4, 80, d) # define BOOST_PP_REPEAT_3_82(m, d) BOOST_PP_REPEAT_3_81(m, d) m(4, 81, d) # define BOOST_PP_REPEAT_3_83(m, d) BOOST_PP_REPEAT_3_82(m, d) m(4, 82, d) # define BOOST_PP_REPEAT_3_84(m, d) BOOST_PP_REPEAT_3_83(m, d) m(4, 83, d) # define BOOST_PP_REPEAT_3_85(m, d) BOOST_PP_REPEAT_3_84(m, d) m(4, 84, d) # define BOOST_PP_REPEAT_3_86(m, d) BOOST_PP_REPEAT_3_85(m, d) m(4, 85, d) # define BOOST_PP_REPEAT_3_87(m, d) BOOST_PP_REPEAT_3_86(m, d) m(4, 86, d) # define BOOST_PP_REPEAT_3_88(m, d) BOOST_PP_REPEAT_3_87(m, d) m(4, 87, d) # define BOOST_PP_REPEAT_3_89(m, d) BOOST_PP_REPEAT_3_88(m, d) m(4, 88, d) # define BOOST_PP_REPEAT_3_90(m, d) BOOST_PP_REPEAT_3_89(m, d) m(4, 89, d) # define BOOST_PP_REPEAT_3_91(m, d) BOOST_PP_REPEAT_3_90(m, d) m(4, 90, d) # define BOOST_PP_REPEAT_3_92(m, d) BOOST_PP_REPEAT_3_91(m, d) m(4, 91, d) # define BOOST_PP_REPEAT_3_93(m, d) BOOST_PP_REPEAT_3_92(m, d) m(4, 92, d) # define BOOST_PP_REPEAT_3_94(m, d) BOOST_PP_REPEAT_3_93(m, d) m(4, 93, d) # define BOOST_PP_REPEAT_3_95(m, d) BOOST_PP_REPEAT_3_94(m, d) m(4, 94, d) # define BOOST_PP_REPEAT_3_96(m, d) BOOST_PP_REPEAT_3_95(m, d) m(4, 95, d) # define BOOST_PP_REPEAT_3_97(m, d) BOOST_PP_REPEAT_3_96(m, d) m(4, 96, d) # define BOOST_PP_REPEAT_3_98(m, d) BOOST_PP_REPEAT_3_97(m, d) m(4, 97, d) # define BOOST_PP_REPEAT_3_99(m, d) BOOST_PP_REPEAT_3_98(m, d) m(4, 98, d) # define BOOST_PP_REPEAT_3_100(m, d) BOOST_PP_REPEAT_3_99(m, d) m(4, 99, d) # define BOOST_PP_REPEAT_3_101(m, d) BOOST_PP_REPEAT_3_100(m, d) m(4, 100, d) # define BOOST_PP_REPEAT_3_102(m, d) BOOST_PP_REPEAT_3_101(m, d) m(4, 101, d) # define BOOST_PP_REPEAT_3_103(m, d) BOOST_PP_REPEAT_3_102(m, d) m(4, 102, d) # define BOOST_PP_REPEAT_3_104(m, d) BOOST_PP_REPEAT_3_103(m, d) m(4, 103, d) # define BOOST_PP_REPEAT_3_105(m, d) BOOST_PP_REPEAT_3_104(m, d) m(4, 104, d) # define BOOST_PP_REPEAT_3_106(m, d) BOOST_PP_REPEAT_3_105(m, d) m(4, 105, d) # define BOOST_PP_REPEAT_3_107(m, d) BOOST_PP_REPEAT_3_106(m, d) m(4, 106, d) # define BOOST_PP_REPEAT_3_108(m, d) BOOST_PP_REPEAT_3_107(m, d) m(4, 107, d) # define BOOST_PP_REPEAT_3_109(m, d) BOOST_PP_REPEAT_3_108(m, d) m(4, 108, d) # define BOOST_PP_REPEAT_3_110(m, d) BOOST_PP_REPEAT_3_109(m, d) m(4, 109, d) # define BOOST_PP_REPEAT_3_111(m, d) BOOST_PP_REPEAT_3_110(m, d) m(4, 110, d) # define BOOST_PP_REPEAT_3_112(m, d) BOOST_PP_REPEAT_3_111(m, d) m(4, 111, d) # define BOOST_PP_REPEAT_3_113(m, d) BOOST_PP_REPEAT_3_112(m, d) m(4, 112, d) # define BOOST_PP_REPEAT_3_114(m, d) BOOST_PP_REPEAT_3_113(m, d) m(4, 113, d) # define BOOST_PP_REPEAT_3_115(m, d) BOOST_PP_REPEAT_3_114(m, d) m(4, 114, d) # define BOOST_PP_REPEAT_3_116(m, d) BOOST_PP_REPEAT_3_115(m, d) m(4, 115, d) # define BOOST_PP_REPEAT_3_117(m, d) BOOST_PP_REPEAT_3_116(m, d) m(4, 116, d) # define BOOST_PP_REPEAT_3_118(m, d) BOOST_PP_REPEAT_3_117(m, d) m(4, 117, d) # define BOOST_PP_REPEAT_3_119(m, d) BOOST_PP_REPEAT_3_118(m, d) m(4, 118, d) # define BOOST_PP_REPEAT_3_120(m, d) BOOST_PP_REPEAT_3_119(m, d) m(4, 119, d) # define BOOST_PP_REPEAT_3_121(m, d) BOOST_PP_REPEAT_3_120(m, d) m(4, 120, d) # define BOOST_PP_REPEAT_3_122(m, d) BOOST_PP_REPEAT_3_121(m, d) m(4, 121, d) # define BOOST_PP_REPEAT_3_123(m, d) BOOST_PP_REPEAT_3_122(m, d) m(4, 122, d) # define BOOST_PP_REPEAT_3_124(m, d) BOOST_PP_REPEAT_3_123(m, d) m(4, 123, d) # define BOOST_PP_REPEAT_3_125(m, d) BOOST_PP_REPEAT_3_124(m, d) m(4, 124, d) # define BOOST_PP_REPEAT_3_126(m, d) BOOST_PP_REPEAT_3_125(m, d) m(4, 125, d) # define BOOST_PP_REPEAT_3_127(m, d) BOOST_PP_REPEAT_3_126(m, d) m(4, 126, d) # define BOOST_PP_REPEAT_3_128(m, d) BOOST_PP_REPEAT_3_127(m, d) m(4, 127, d) # define BOOST_PP_REPEAT_3_129(m, d) BOOST_PP_REPEAT_3_128(m, d) m(4, 128, d) # define BOOST_PP_REPEAT_3_130(m, d) BOOST_PP_REPEAT_3_129(m, d) m(4, 129, d) # define BOOST_PP_REPEAT_3_131(m, d) BOOST_PP_REPEAT_3_130(m, d) m(4, 130, d) # define BOOST_PP_REPEAT_3_132(m, d) BOOST_PP_REPEAT_3_131(m, d) m(4, 131, d) # define BOOST_PP_REPEAT_3_133(m, d) BOOST_PP_REPEAT_3_132(m, d) m(4, 132, d) # define BOOST_PP_REPEAT_3_134(m, d) BOOST_PP_REPEAT_3_133(m, d) m(4, 133, d) # define BOOST_PP_REPEAT_3_135(m, d) BOOST_PP_REPEAT_3_134(m, d) m(4, 134, d) # define BOOST_PP_REPEAT_3_136(m, d) BOOST_PP_REPEAT_3_135(m, d) m(4, 135, d) # define BOOST_PP_REPEAT_3_137(m, d) BOOST_PP_REPEAT_3_136(m, d) m(4, 136, d) # define BOOST_PP_REPEAT_3_138(m, d) BOOST_PP_REPEAT_3_137(m, d) m(4, 137, d) # define BOOST_PP_REPEAT_3_139(m, d) BOOST_PP_REPEAT_3_138(m, d) m(4, 138, d) # define BOOST_PP_REPEAT_3_140(m, d) BOOST_PP_REPEAT_3_139(m, d) m(4, 139, d) # define BOOST_PP_REPEAT_3_141(m, d) BOOST_PP_REPEAT_3_140(m, d) m(4, 140, d) # define BOOST_PP_REPEAT_3_142(m, d) BOOST_PP_REPEAT_3_141(m, d) m(4, 141, d) # define BOOST_PP_REPEAT_3_143(m, d) BOOST_PP_REPEAT_3_142(m, d) m(4, 142, d) # define BOOST_PP_REPEAT_3_144(m, d) BOOST_PP_REPEAT_3_143(m, d) m(4, 143, d) # define BOOST_PP_REPEAT_3_145(m, d) BOOST_PP_REPEAT_3_144(m, d) m(4, 144, d) # define BOOST_PP_REPEAT_3_146(m, d) BOOST_PP_REPEAT_3_145(m, d) m(4, 145, d) # define BOOST_PP_REPEAT_3_147(m, d) BOOST_PP_REPEAT_3_146(m, d) m(4, 146, d) # define BOOST_PP_REPEAT_3_148(m, d) BOOST_PP_REPEAT_3_147(m, d) m(4, 147, d) # define BOOST_PP_REPEAT_3_149(m, d) BOOST_PP_REPEAT_3_148(m, d) m(4, 148, d) # define BOOST_PP_REPEAT_3_150(m, d) BOOST_PP_REPEAT_3_149(m, d) m(4, 149, d) # define BOOST_PP_REPEAT_3_151(m, d) BOOST_PP_REPEAT_3_150(m, d) m(4, 150, d) # define BOOST_PP_REPEAT_3_152(m, d) BOOST_PP_REPEAT_3_151(m, d) m(4, 151, d) # define BOOST_PP_REPEAT_3_153(m, d) BOOST_PP_REPEAT_3_152(m, d) m(4, 152, d) # define BOOST_PP_REPEAT_3_154(m, d) BOOST_PP_REPEAT_3_153(m, d) m(4, 153, d) # define BOOST_PP_REPEAT_3_155(m, d) BOOST_PP_REPEAT_3_154(m, d) m(4, 154, d) # define BOOST_PP_REPEAT_3_156(m, d) BOOST_PP_REPEAT_3_155(m, d) m(4, 155, d) # define BOOST_PP_REPEAT_3_157(m, d) BOOST_PP_REPEAT_3_156(m, d) m(4, 156, d) # define BOOST_PP_REPEAT_3_158(m, d) BOOST_PP_REPEAT_3_157(m, d) m(4, 157, d) # define BOOST_PP_REPEAT_3_159(m, d) BOOST_PP_REPEAT_3_158(m, d) m(4, 158, d) # define BOOST_PP_REPEAT_3_160(m, d) BOOST_PP_REPEAT_3_159(m, d) m(4, 159, d) # define BOOST_PP_REPEAT_3_161(m, d) BOOST_PP_REPEAT_3_160(m, d) m(4, 160, d) # define BOOST_PP_REPEAT_3_162(m, d) BOOST_PP_REPEAT_3_161(m, d) m(4, 161, d) # define BOOST_PP_REPEAT_3_163(m, d) BOOST_PP_REPEAT_3_162(m, d) m(4, 162, d) # define BOOST_PP_REPEAT_3_164(m, d) BOOST_PP_REPEAT_3_163(m, d) m(4, 163, d) # define BOOST_PP_REPEAT_3_165(m, d) BOOST_PP_REPEAT_3_164(m, d) m(4, 164, d) # define BOOST_PP_REPEAT_3_166(m, d) BOOST_PP_REPEAT_3_165(m, d) m(4, 165, d) # define BOOST_PP_REPEAT_3_167(m, d) BOOST_PP_REPEAT_3_166(m, d) m(4, 166, d) # define BOOST_PP_REPEAT_3_168(m, d) BOOST_PP_REPEAT_3_167(m, d) m(4, 167, d) # define BOOST_PP_REPEAT_3_169(m, d) BOOST_PP_REPEAT_3_168(m, d) m(4, 168, d) # define BOOST_PP_REPEAT_3_170(m, d) BOOST_PP_REPEAT_3_169(m, d) m(4, 169, d) # define BOOST_PP_REPEAT_3_171(m, d) BOOST_PP_REPEAT_3_170(m, d) m(4, 170, d) # define BOOST_PP_REPEAT_3_172(m, d) BOOST_PP_REPEAT_3_171(m, d) m(4, 171, d) # define BOOST_PP_REPEAT_3_173(m, d) BOOST_PP_REPEAT_3_172(m, d) m(4, 172, d) # define BOOST_PP_REPEAT_3_174(m, d) BOOST_PP_REPEAT_3_173(m, d) m(4, 173, d) # define BOOST_PP_REPEAT_3_175(m, d) BOOST_PP_REPEAT_3_174(m, d) m(4, 174, d) # define BOOST_PP_REPEAT_3_176(m, d) BOOST_PP_REPEAT_3_175(m, d) m(4, 175, d) # define BOOST_PP_REPEAT_3_177(m, d) BOOST_PP_REPEAT_3_176(m, d) m(4, 176, d) # define BOOST_PP_REPEAT_3_178(m, d) BOOST_PP_REPEAT_3_177(m, d) m(4, 177, d) # define BOOST_PP_REPEAT_3_179(m, d) BOOST_PP_REPEAT_3_178(m, d) m(4, 178, d) # define BOOST_PP_REPEAT_3_180(m, d) BOOST_PP_REPEAT_3_179(m, d) m(4, 179, d) # define BOOST_PP_REPEAT_3_181(m, d) BOOST_PP_REPEAT_3_180(m, d) m(4, 180, d) # define BOOST_PP_REPEAT_3_182(m, d) BOOST_PP_REPEAT_3_181(m, d) m(4, 181, d) # define BOOST_PP_REPEAT_3_183(m, d) BOOST_PP_REPEAT_3_182(m, d) m(4, 182, d) # define BOOST_PP_REPEAT_3_184(m, d) BOOST_PP_REPEAT_3_183(m, d) m(4, 183, d) # define BOOST_PP_REPEAT_3_185(m, d) BOOST_PP_REPEAT_3_184(m, d) m(4, 184, d) # define BOOST_PP_REPEAT_3_186(m, d) BOOST_PP_REPEAT_3_185(m, d) m(4, 185, d) # define BOOST_PP_REPEAT_3_187(m, d) BOOST_PP_REPEAT_3_186(m, d) m(4, 186, d) # define BOOST_PP_REPEAT_3_188(m, d) BOOST_PP_REPEAT_3_187(m, d) m(4, 187, d) # define BOOST_PP_REPEAT_3_189(m, d) BOOST_PP_REPEAT_3_188(m, d) m(4, 188, d) # define BOOST_PP_REPEAT_3_190(m, d) BOOST_PP_REPEAT_3_189(m, d) m(4, 189, d) # define BOOST_PP_REPEAT_3_191(m, d) BOOST_PP_REPEAT_3_190(m, d) m(4, 190, d) # define BOOST_PP_REPEAT_3_192(m, d) BOOST_PP_REPEAT_3_191(m, d) m(4, 191, d) # define BOOST_PP_REPEAT_3_193(m, d) BOOST_PP_REPEAT_3_192(m, d) m(4, 192, d) # define BOOST_PP_REPEAT_3_194(m, d) BOOST_PP_REPEAT_3_193(m, d) m(4, 193, d) # define BOOST_PP_REPEAT_3_195(m, d) BOOST_PP_REPEAT_3_194(m, d) m(4, 194, d) # define BOOST_PP_REPEAT_3_196(m, d) BOOST_PP_REPEAT_3_195(m, d) m(4, 195, d) # define BOOST_PP_REPEAT_3_197(m, d) BOOST_PP_REPEAT_3_196(m, d) m(4, 196, d) # define BOOST_PP_REPEAT_3_198(m, d) BOOST_PP_REPEAT_3_197(m, d) m(4, 197, d) # define BOOST_PP_REPEAT_3_199(m, d) BOOST_PP_REPEAT_3_198(m, d) m(4, 198, d) # define BOOST_PP_REPEAT_3_200(m, d) BOOST_PP_REPEAT_3_199(m, d) m(4, 199, d) # define BOOST_PP_REPEAT_3_201(m, d) BOOST_PP_REPEAT_3_200(m, d) m(4, 200, d) # define BOOST_PP_REPEAT_3_202(m, d) BOOST_PP_REPEAT_3_201(m, d) m(4, 201, d) # define BOOST_PP_REPEAT_3_203(m, d) BOOST_PP_REPEAT_3_202(m, d) m(4, 202, d) # define BOOST_PP_REPEAT_3_204(m, d) BOOST_PP_REPEAT_3_203(m, d) m(4, 203, d) # define BOOST_PP_REPEAT_3_205(m, d) BOOST_PP_REPEAT_3_204(m, d) m(4, 204, d) # define BOOST_PP_REPEAT_3_206(m, d) BOOST_PP_REPEAT_3_205(m, d) m(4, 205, d) # define BOOST_PP_REPEAT_3_207(m, d) BOOST_PP_REPEAT_3_206(m, d) m(4, 206, d) # define BOOST_PP_REPEAT_3_208(m, d) BOOST_PP_REPEAT_3_207(m, d) m(4, 207, d) # define BOOST_PP_REPEAT_3_209(m, d) BOOST_PP_REPEAT_3_208(m, d) m(4, 208, d) # define BOOST_PP_REPEAT_3_210(m, d) BOOST_PP_REPEAT_3_209(m, d) m(4, 209, d) # define BOOST_PP_REPEAT_3_211(m, d) BOOST_PP_REPEAT_3_210(m, d) m(4, 210, d) # define BOOST_PP_REPEAT_3_212(m, d) BOOST_PP_REPEAT_3_211(m, d) m(4, 211, d) # define BOOST_PP_REPEAT_3_213(m, d) BOOST_PP_REPEAT_3_212(m, d) m(4, 212, d) # define BOOST_PP_REPEAT_3_214(m, d) BOOST_PP_REPEAT_3_213(m, d) m(4, 213, d) # define BOOST_PP_REPEAT_3_215(m, d) BOOST_PP_REPEAT_3_214(m, d) m(4, 214, d) # define BOOST_PP_REPEAT_3_216(m, d) BOOST_PP_REPEAT_3_215(m, d) m(4, 215, d) # define BOOST_PP_REPEAT_3_217(m, d) BOOST_PP_REPEAT_3_216(m, d) m(4, 216, d) # define BOOST_PP_REPEAT_3_218(m, d) BOOST_PP_REPEAT_3_217(m, d) m(4, 217, d) # define BOOST_PP_REPEAT_3_219(m, d) BOOST_PP_REPEAT_3_218(m, d) m(4, 218, d) # define BOOST_PP_REPEAT_3_220(m, d) BOOST_PP_REPEAT_3_219(m, d) m(4, 219, d) # define BOOST_PP_REPEAT_3_221(m, d) BOOST_PP_REPEAT_3_220(m, d) m(4, 220, d) # define BOOST_PP_REPEAT_3_222(m, d) BOOST_PP_REPEAT_3_221(m, d) m(4, 221, d) # define BOOST_PP_REPEAT_3_223(m, d) BOOST_PP_REPEAT_3_222(m, d) m(4, 222, d) # define BOOST_PP_REPEAT_3_224(m, d) BOOST_PP_REPEAT_3_223(m, d) m(4, 223, d) # define BOOST_PP_REPEAT_3_225(m, d) BOOST_PP_REPEAT_3_224(m, d) m(4, 224, d) # define BOOST_PP_REPEAT_3_226(m, d) BOOST_PP_REPEAT_3_225(m, d) m(4, 225, d) # define BOOST_PP_REPEAT_3_227(m, d) BOOST_PP_REPEAT_3_226(m, d) m(4, 226, d) # define BOOST_PP_REPEAT_3_228(m, d) BOOST_PP_REPEAT_3_227(m, d) m(4, 227, d) # define BOOST_PP_REPEAT_3_229(m, d) BOOST_PP_REPEAT_3_228(m, d) m(4, 228, d) # define BOOST_PP_REPEAT_3_230(m, d) BOOST_PP_REPEAT_3_229(m, d) m(4, 229, d) # define BOOST_PP_REPEAT_3_231(m, d) BOOST_PP_REPEAT_3_230(m, d) m(4, 230, d) # define BOOST_PP_REPEAT_3_232(m, d) BOOST_PP_REPEAT_3_231(m, d) m(4, 231, d) # define BOOST_PP_REPEAT_3_233(m, d) BOOST_PP_REPEAT_3_232(m, d) m(4, 232, d) # define BOOST_PP_REPEAT_3_234(m, d) BOOST_PP_REPEAT_3_233(m, d) m(4, 233, d) # define BOOST_PP_REPEAT_3_235(m, d) BOOST_PP_REPEAT_3_234(m, d) m(4, 234, d) # define BOOST_PP_REPEAT_3_236(m, d) BOOST_PP_REPEAT_3_235(m, d) m(4, 235, d) # define BOOST_PP_REPEAT_3_237(m, d) BOOST_PP_REPEAT_3_236(m, d) m(4, 236, d) # define BOOST_PP_REPEAT_3_238(m, d) BOOST_PP_REPEAT_3_237(m, d) m(4, 237, d) # define BOOST_PP_REPEAT_3_239(m, d) BOOST_PP_REPEAT_3_238(m, d) m(4, 238, d) # define BOOST_PP_REPEAT_3_240(m, d) BOOST_PP_REPEAT_3_239(m, d) m(4, 239, d) # define BOOST_PP_REPEAT_3_241(m, d) BOOST_PP_REPEAT_3_240(m, d) m(4, 240, d) # define BOOST_PP_REPEAT_3_242(m, d) BOOST_PP_REPEAT_3_241(m, d) m(4, 241, d) # define BOOST_PP_REPEAT_3_243(m, d) BOOST_PP_REPEAT_3_242(m, d) m(4, 242, d) # define BOOST_PP_REPEAT_3_244(m, d) BOOST_PP_REPEAT_3_243(m, d) m(4, 243, d) # define BOOST_PP_REPEAT_3_245(m, d) BOOST_PP_REPEAT_3_244(m, d) m(4, 244, d) # define BOOST_PP_REPEAT_3_246(m, d) BOOST_PP_REPEAT_3_245(m, d) m(4, 245, d) # define BOOST_PP_REPEAT_3_247(m, d) BOOST_PP_REPEAT_3_246(m, d) m(4, 246, d) # define BOOST_PP_REPEAT_3_248(m, d) BOOST_PP_REPEAT_3_247(m, d) m(4, 247, d) # define BOOST_PP_REPEAT_3_249(m, d) BOOST_PP_REPEAT_3_248(m, d) m(4, 248, d) # define BOOST_PP_REPEAT_3_250(m, d) BOOST_PP_REPEAT_3_249(m, d) m(4, 249, d) # define BOOST_PP_REPEAT_3_251(m, d) BOOST_PP_REPEAT_3_250(m, d) m(4, 250, d) # define BOOST_PP_REPEAT_3_252(m, d) BOOST_PP_REPEAT_3_251(m, d) m(4, 251, d) # define BOOST_PP_REPEAT_3_253(m, d) BOOST_PP_REPEAT_3_252(m, d) m(4, 252, d) # define BOOST_PP_REPEAT_3_254(m, d) BOOST_PP_REPEAT_3_253(m, d) m(4, 253, d) # define BOOST_PP_REPEAT_3_255(m, d) BOOST_PP_REPEAT_3_254(m, d) m(4, 254, d) # define BOOST_PP_REPEAT_3_256(m, d) BOOST_PP_REPEAT_3_255(m, d) m(4, 255, d) # # endif ================================================ FILE: benchmarks/boost/preprocessor/repetition/repeat_from_to.hpp ================================================ # /* Copyright (C) 2001 # * Housemarque Oy # * http://www.housemarque.com # * # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # */ # # /* Revised by Paul Mensonides (2002) */ # # /* See http://www.boost.org for most recent version. */ # # ifndef BOOST_PREPROCESSOR_REPETITION_REPEAT_FROM_TO_HPP # define BOOST_PREPROCESSOR_REPETITION_REPEAT_FROM_TO_HPP # # include # include # include # include # include # include # include # include # include # include # # /* BOOST_PP_REPEAT_FROM_TO */ # # if 0 # define BOOST_PP_REPEAT_FROM_TO(first, last, macro, data) # endif # # define BOOST_PP_REPEAT_FROM_TO BOOST_PP_CAT(BOOST_PP_REPEAT_FROM_TO_, BOOST_PP_AUTO_REC(BOOST_PP_REPEAT_P, 4)) # # define BOOST_PP_REPEAT_FROM_TO_1(f, l, m, dt) BOOST_PP_REPEAT_FROM_TO_D_1(BOOST_PP_AUTO_REC(BOOST_PP_WHILE_P, 256), f, l, m, dt) # define BOOST_PP_REPEAT_FROM_TO_2(f, l, m, dt) BOOST_PP_REPEAT_FROM_TO_D_2(BOOST_PP_AUTO_REC(BOOST_PP_WHILE_P, 256), f, l, m, dt) # define BOOST_PP_REPEAT_FROM_TO_3(f, l, m, dt) BOOST_PP_REPEAT_FROM_TO_D_3(BOOST_PP_AUTO_REC(BOOST_PP_WHILE_P, 256), f, l, m, dt) # define BOOST_PP_REPEAT_FROM_TO_4(f, l, m, dt) BOOST_PP_ERROR(0x0003) # # define BOOST_PP_REPEAT_FROM_TO_1ST BOOST_PP_REPEAT_FROM_TO_1 # define BOOST_PP_REPEAT_FROM_TO_2ND BOOST_PP_REPEAT_FROM_TO_2 # define BOOST_PP_REPEAT_FROM_TO_3RD BOOST_PP_REPEAT_FROM_TO_3 # # /* BOOST_PP_REPEAT_FROM_TO_D */ # # if 0 # define BOOST_PP_REPEAT_FROM_TO_D(d, first, last, macro, data) # endif # # define BOOST_PP_REPEAT_FROM_TO_D BOOST_PP_CAT(BOOST_PP_REPEAT_FROM_TO_D_, BOOST_PP_AUTO_REC(BOOST_PP_REPEAT_P, 4)) # # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() # define BOOST_PP_REPEAT_FROM_TO_D_1(d, f, l, m, dt) BOOST_PP_REPEAT_1(BOOST_PP_SUB_D(d, l, f), BOOST_PP_REPEAT_FROM_TO_M_1, (d, f, m, dt)) # define BOOST_PP_REPEAT_FROM_TO_D_2(d, f, l, m, dt) BOOST_PP_REPEAT_2(BOOST_PP_SUB_D(d, l, f), BOOST_PP_REPEAT_FROM_TO_M_2, (d, f, m, dt)) # define BOOST_PP_REPEAT_FROM_TO_D_3(d, f, l, m, dt) BOOST_PP_REPEAT_3(BOOST_PP_SUB_D(d, l, f), BOOST_PP_REPEAT_FROM_TO_M_3, (d, f, m, dt)) # else # define BOOST_PP_REPEAT_FROM_TO_D_1(d, f, l, m, dt) BOOST_PP_REPEAT_FROM_TO_D_1_I(d, f, l, m, dt) # define BOOST_PP_REPEAT_FROM_TO_D_2(d, f, l, m, dt) BOOST_PP_REPEAT_FROM_TO_D_2_I(d, f, l, m, dt) # define BOOST_PP_REPEAT_FROM_TO_D_3(d, f, l, m, dt) BOOST_PP_REPEAT_FROM_TO_D_3_I(d, f, l, m, dt) # define BOOST_PP_REPEAT_FROM_TO_D_1_I(d, f, l, m, dt) BOOST_PP_REPEAT_1(BOOST_PP_SUB_D(d, l, f), BOOST_PP_REPEAT_FROM_TO_M_1, (d, f, m, dt)) # define BOOST_PP_REPEAT_FROM_TO_D_2_I(d, f, l, m, dt) BOOST_PP_REPEAT_2(BOOST_PP_SUB_D(d, l, f), BOOST_PP_REPEAT_FROM_TO_M_2, (d, f, m, dt)) # define BOOST_PP_REPEAT_FROM_TO_D_3_I(d, f, l, m, dt) BOOST_PP_REPEAT_3(BOOST_PP_SUB_D(d, l, f), BOOST_PP_REPEAT_FROM_TO_M_3, (d, f, m, dt)) # endif # # if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_STRICT() # define BOOST_PP_REPEAT_FROM_TO_M_1(z, n, dfmd) BOOST_PP_REPEAT_FROM_TO_M_1_IM(z, n, BOOST_PP_TUPLE_REM_4 dfmd) # define BOOST_PP_REPEAT_FROM_TO_M_2(z, n, dfmd) BOOST_PP_REPEAT_FROM_TO_M_2_IM(z, n, BOOST_PP_TUPLE_REM_4 dfmd) # define BOOST_PP_REPEAT_FROM_TO_M_3(z, n, dfmd) BOOST_PP_REPEAT_FROM_TO_M_3_IM(z, n, BOOST_PP_TUPLE_REM_4 dfmd) # define BOOST_PP_REPEAT_FROM_TO_M_1_IM(z, n, im) BOOST_PP_REPEAT_FROM_TO_M_1_I(z, n, im) # define BOOST_PP_REPEAT_FROM_TO_M_2_IM(z, n, im) BOOST_PP_REPEAT_FROM_TO_M_2_I(z, n, im) # define BOOST_PP_REPEAT_FROM_TO_M_3_IM(z, n, im) BOOST_PP_REPEAT_FROM_TO_M_3_I(z, n, im) # else # define BOOST_PP_REPEAT_FROM_TO_M_1(z, n, dfmd) BOOST_PP_REPEAT_FROM_TO_M_1_I(z, n, BOOST_PP_TUPLE_ELEM(4, 0, dfmd), BOOST_PP_TUPLE_ELEM(4, 1, dfmd), BOOST_PP_TUPLE_ELEM(4, 2, dfmd), BOOST_PP_TUPLE_ELEM(4, 3, dfmd)) # define BOOST_PP_REPEAT_FROM_TO_M_2(z, n, dfmd) BOOST_PP_REPEAT_FROM_TO_M_2_I(z, n, BOOST_PP_TUPLE_ELEM(4, 0, dfmd), BOOST_PP_TUPLE_ELEM(4, 1, dfmd), BOOST_PP_TUPLE_ELEM(4, 2, dfmd), BOOST_PP_TUPLE_ELEM(4, 3, dfmd)) # define BOOST_PP_REPEAT_FROM_TO_M_3(z, n, dfmd) BOOST_PP_REPEAT_FROM_TO_M_3_I(z, n, BOOST_PP_TUPLE_ELEM(4, 0, dfmd), BOOST_PP_TUPLE_ELEM(4, 1, dfmd), BOOST_PP_TUPLE_ELEM(4, 2, dfmd), BOOST_PP_TUPLE_ELEM(4, 3, dfmd)) # endif # # define BOOST_PP_REPEAT_FROM_TO_M_1_I(z, n, d, f, m, dt) BOOST_PP_REPEAT_FROM_TO_M_1_II(z, BOOST_PP_ADD_D(d, n, f), m, dt) # define BOOST_PP_REPEAT_FROM_TO_M_2_I(z, n, d, f, m, dt) BOOST_PP_REPEAT_FROM_TO_M_2_II(z, BOOST_PP_ADD_D(d, n, f), m, dt) # define BOOST_PP_REPEAT_FROM_TO_M_3_I(z, n, d, f, m, dt) BOOST_PP_REPEAT_FROM_TO_M_3_II(z, BOOST_PP_ADD_D(d, n, f), m, dt) # # define BOOST_PP_REPEAT_FROM_TO_M_1_II(z, n, m, dt) m(z, n, dt) # define BOOST_PP_REPEAT_FROM_TO_M_2_II(z, n, m, dt) m(z, n, dt) # define BOOST_PP_REPEAT_FROM_TO_M_3_II(z, n, m, dt) m(z, n, dt) # # endif ================================================ FILE: benchmarks/boost/preprocessor/selection/max.hpp ================================================ # /* Copyright (C) 2001 # * Housemarque Oy # * http://www.housemarque.com # * # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # */ # # /* Revised by Paul Mensonides (2002) */ # # /* See http://www.boost.org for most recent version. */ # # ifndef BOOST_PREPROCESSOR_SELECTION_MAX_HPP # define BOOST_PREPROCESSOR_SELECTION_MAX_HPP # # include # include # include # # /* BOOST_PP_MAX */ # # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() # define BOOST_PP_MAX(x, y) BOOST_PP_IIF(BOOST_PP_LESS_EQUAL(x, y), y, x) # else # define BOOST_PP_MAX(x, y) BOOST_PP_MAX_I(x, y) # define BOOST_PP_MAX_I(x, y) BOOST_PP_IIF(BOOST_PP_LESS_EQUAL(x, y), y, x) # endif # # /* BOOST_PP_MAX_D */ # # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() # define BOOST_PP_MAX_D(d, x, y) BOOST_PP_IIF(BOOST_PP_LESS_EQUAL_D(d, x, y), y, x) # else # define BOOST_PP_MAX_D(d, x, y) BOOST_PP_MAX_D_I(d, x, y) # define BOOST_PP_MAX_D_I(d, x, y) BOOST_PP_IIF(BOOST_PP_LESS_EQUAL_D(d, x, y), y, x) # endif # # endif ================================================ FILE: benchmarks/boost/preprocessor/seq/detail/is_empty.hpp ================================================ # /* ************************************************************************** # * * # * (C) Copyright Edward Diener 2015. # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # * * # ************************************************************************** */ # # /* See http://www.boost.org for most recent version. */ # # ifndef BOOST_PREPROCESSOR_SEQ_DETAIL_IS_EMPTY_HPP # define BOOST_PREPROCESSOR_SEQ_DETAIL_IS_EMPTY_HPP # # include # include # include # include # include # /* An empty seq is one that is just BOOST_PP_SEQ_NIL */ # # define BOOST_PP_SEQ_DETAIL_IS_EMPTY(seq) \ BOOST_PP_COMPL \ ( \ BOOST_PP_SEQ_DETAIL_IS_NOT_EMPTY(seq) \ ) \ /**/ # # define BOOST_PP_SEQ_DETAIL_IS_EMPTY_SIZE(size) \ BOOST_PP_COMPL \ ( \ BOOST_PP_SEQ_DETAIL_IS_NOT_EMPTY_SIZE(size) \ ) \ /**/ # # define BOOST_PP_SEQ_DETAIL_IS_NOT_EMPTY(seq) \ BOOST_PP_SEQ_DETAIL_IS_NOT_EMPTY_SIZE(BOOST_PP_SEQ_DETAIL_EMPTY_SIZE(seq)) \ /**/ # # define BOOST_PP_SEQ_DETAIL_IS_NOT_EMPTY_SIZE(size) \ BOOST_PP_BOOL(size) \ /**/ # # define BOOST_PP_SEQ_DETAIL_EMPTY_SIZE(seq) \ BOOST_PP_DEC(BOOST_PP_SEQ_SIZE(seq (nil))) \ /**/ # # endif ================================================ FILE: benchmarks/boost/preprocessor/seq/detail/split.hpp ================================================ # /* ************************************************************************** # * * # * (C) Copyright Paul Mensonides 2002. # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # * * # ************************************************************************** */ # # /* See http://www.boost.org for most recent version. */ # # ifndef BOOST_PREPROCESSOR_SEQ_DETAIL_SPLIT_HPP # define BOOST_PREPROCESSOR_SEQ_DETAIL_SPLIT_HPP # # include # # /* BOOST_PP_SEQ_SPLIT */ # # define BOOST_PP_SEQ_SPLIT(n, seq) BOOST_PP_SEQ_SPLIT_D(n, seq) # # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC() # define BOOST_PP_SEQ_SPLIT_D(n, seq) (BOOST_PP_SEQ_SPLIT_ ## n seq) # else # define BOOST_PP_SEQ_SPLIT_D(n, seq) (BOOST_PP_SEQ_SPLIT_ ## n ## seq) # endif # # define BOOST_PP_SEQ_SPLIT_1(x) (x), # define BOOST_PP_SEQ_SPLIT_2(x) (x) BOOST_PP_SEQ_SPLIT_1 # define BOOST_PP_SEQ_SPLIT_3(x) (x) BOOST_PP_SEQ_SPLIT_2 # define BOOST_PP_SEQ_SPLIT_4(x) (x) BOOST_PP_SEQ_SPLIT_3 # define BOOST_PP_SEQ_SPLIT_5(x) (x) BOOST_PP_SEQ_SPLIT_4 # define BOOST_PP_SEQ_SPLIT_6(x) (x) BOOST_PP_SEQ_SPLIT_5 # define BOOST_PP_SEQ_SPLIT_7(x) (x) BOOST_PP_SEQ_SPLIT_6 # define BOOST_PP_SEQ_SPLIT_8(x) (x) BOOST_PP_SEQ_SPLIT_7 # define BOOST_PP_SEQ_SPLIT_9(x) (x) BOOST_PP_SEQ_SPLIT_8 # define BOOST_PP_SEQ_SPLIT_10(x) (x) BOOST_PP_SEQ_SPLIT_9 # define BOOST_PP_SEQ_SPLIT_11(x) (x) BOOST_PP_SEQ_SPLIT_10 # define BOOST_PP_SEQ_SPLIT_12(x) (x) BOOST_PP_SEQ_SPLIT_11 # define BOOST_PP_SEQ_SPLIT_13(x) (x) BOOST_PP_SEQ_SPLIT_12 # define BOOST_PP_SEQ_SPLIT_14(x) (x) BOOST_PP_SEQ_SPLIT_13 # define BOOST_PP_SEQ_SPLIT_15(x) (x) BOOST_PP_SEQ_SPLIT_14 # define BOOST_PP_SEQ_SPLIT_16(x) (x) BOOST_PP_SEQ_SPLIT_15 # define BOOST_PP_SEQ_SPLIT_17(x) (x) BOOST_PP_SEQ_SPLIT_16 # define BOOST_PP_SEQ_SPLIT_18(x) (x) BOOST_PP_SEQ_SPLIT_17 # define BOOST_PP_SEQ_SPLIT_19(x) (x) BOOST_PP_SEQ_SPLIT_18 # define BOOST_PP_SEQ_SPLIT_20(x) (x) BOOST_PP_SEQ_SPLIT_19 # define BOOST_PP_SEQ_SPLIT_21(x) (x) BOOST_PP_SEQ_SPLIT_20 # define BOOST_PP_SEQ_SPLIT_22(x) (x) BOOST_PP_SEQ_SPLIT_21 # define BOOST_PP_SEQ_SPLIT_23(x) (x) BOOST_PP_SEQ_SPLIT_22 # define BOOST_PP_SEQ_SPLIT_24(x) (x) BOOST_PP_SEQ_SPLIT_23 # define BOOST_PP_SEQ_SPLIT_25(x) (x) BOOST_PP_SEQ_SPLIT_24 # define BOOST_PP_SEQ_SPLIT_26(x) (x) BOOST_PP_SEQ_SPLIT_25 # define BOOST_PP_SEQ_SPLIT_27(x) (x) BOOST_PP_SEQ_SPLIT_26 # define BOOST_PP_SEQ_SPLIT_28(x) (x) BOOST_PP_SEQ_SPLIT_27 # define BOOST_PP_SEQ_SPLIT_29(x) (x) BOOST_PP_SEQ_SPLIT_28 # define BOOST_PP_SEQ_SPLIT_30(x) (x) BOOST_PP_SEQ_SPLIT_29 # define BOOST_PP_SEQ_SPLIT_31(x) (x) BOOST_PP_SEQ_SPLIT_30 # define BOOST_PP_SEQ_SPLIT_32(x) (x) BOOST_PP_SEQ_SPLIT_31 # define BOOST_PP_SEQ_SPLIT_33(x) (x) BOOST_PP_SEQ_SPLIT_32 # define BOOST_PP_SEQ_SPLIT_34(x) (x) BOOST_PP_SEQ_SPLIT_33 # define BOOST_PP_SEQ_SPLIT_35(x) (x) BOOST_PP_SEQ_SPLIT_34 # define BOOST_PP_SEQ_SPLIT_36(x) (x) BOOST_PP_SEQ_SPLIT_35 # define BOOST_PP_SEQ_SPLIT_37(x) (x) BOOST_PP_SEQ_SPLIT_36 # define BOOST_PP_SEQ_SPLIT_38(x) (x) BOOST_PP_SEQ_SPLIT_37 # define BOOST_PP_SEQ_SPLIT_39(x) (x) BOOST_PP_SEQ_SPLIT_38 # define BOOST_PP_SEQ_SPLIT_40(x) (x) BOOST_PP_SEQ_SPLIT_39 # define BOOST_PP_SEQ_SPLIT_41(x) (x) BOOST_PP_SEQ_SPLIT_40 # define BOOST_PP_SEQ_SPLIT_42(x) (x) BOOST_PP_SEQ_SPLIT_41 # define BOOST_PP_SEQ_SPLIT_43(x) (x) BOOST_PP_SEQ_SPLIT_42 # define BOOST_PP_SEQ_SPLIT_44(x) (x) BOOST_PP_SEQ_SPLIT_43 # define BOOST_PP_SEQ_SPLIT_45(x) (x) BOOST_PP_SEQ_SPLIT_44 # define BOOST_PP_SEQ_SPLIT_46(x) (x) BOOST_PP_SEQ_SPLIT_45 # define BOOST_PP_SEQ_SPLIT_47(x) (x) BOOST_PP_SEQ_SPLIT_46 # define BOOST_PP_SEQ_SPLIT_48(x) (x) BOOST_PP_SEQ_SPLIT_47 # define BOOST_PP_SEQ_SPLIT_49(x) (x) BOOST_PP_SEQ_SPLIT_48 # define BOOST_PP_SEQ_SPLIT_50(x) (x) BOOST_PP_SEQ_SPLIT_49 # define BOOST_PP_SEQ_SPLIT_51(x) (x) BOOST_PP_SEQ_SPLIT_50 # define BOOST_PP_SEQ_SPLIT_52(x) (x) BOOST_PP_SEQ_SPLIT_51 # define BOOST_PP_SEQ_SPLIT_53(x) (x) BOOST_PP_SEQ_SPLIT_52 # define BOOST_PP_SEQ_SPLIT_54(x) (x) BOOST_PP_SEQ_SPLIT_53 # define BOOST_PP_SEQ_SPLIT_55(x) (x) BOOST_PP_SEQ_SPLIT_54 # define BOOST_PP_SEQ_SPLIT_56(x) (x) BOOST_PP_SEQ_SPLIT_55 # define BOOST_PP_SEQ_SPLIT_57(x) (x) BOOST_PP_SEQ_SPLIT_56 # define BOOST_PP_SEQ_SPLIT_58(x) (x) BOOST_PP_SEQ_SPLIT_57 # define BOOST_PP_SEQ_SPLIT_59(x) (x) BOOST_PP_SEQ_SPLIT_58 # define BOOST_PP_SEQ_SPLIT_60(x) (x) BOOST_PP_SEQ_SPLIT_59 # define BOOST_PP_SEQ_SPLIT_61(x) (x) BOOST_PP_SEQ_SPLIT_60 # define BOOST_PP_SEQ_SPLIT_62(x) (x) BOOST_PP_SEQ_SPLIT_61 # define BOOST_PP_SEQ_SPLIT_63(x) (x) BOOST_PP_SEQ_SPLIT_62 # define BOOST_PP_SEQ_SPLIT_64(x) (x) BOOST_PP_SEQ_SPLIT_63 # define BOOST_PP_SEQ_SPLIT_65(x) (x) BOOST_PP_SEQ_SPLIT_64 # define BOOST_PP_SEQ_SPLIT_66(x) (x) BOOST_PP_SEQ_SPLIT_65 # define BOOST_PP_SEQ_SPLIT_67(x) (x) BOOST_PP_SEQ_SPLIT_66 # define BOOST_PP_SEQ_SPLIT_68(x) (x) BOOST_PP_SEQ_SPLIT_67 # define BOOST_PP_SEQ_SPLIT_69(x) (x) BOOST_PP_SEQ_SPLIT_68 # define BOOST_PP_SEQ_SPLIT_70(x) (x) BOOST_PP_SEQ_SPLIT_69 # define BOOST_PP_SEQ_SPLIT_71(x) (x) BOOST_PP_SEQ_SPLIT_70 # define BOOST_PP_SEQ_SPLIT_72(x) (x) BOOST_PP_SEQ_SPLIT_71 # define BOOST_PP_SEQ_SPLIT_73(x) (x) BOOST_PP_SEQ_SPLIT_72 # define BOOST_PP_SEQ_SPLIT_74(x) (x) BOOST_PP_SEQ_SPLIT_73 # define BOOST_PP_SEQ_SPLIT_75(x) (x) BOOST_PP_SEQ_SPLIT_74 # define BOOST_PP_SEQ_SPLIT_76(x) (x) BOOST_PP_SEQ_SPLIT_75 # define BOOST_PP_SEQ_SPLIT_77(x) (x) BOOST_PP_SEQ_SPLIT_76 # define BOOST_PP_SEQ_SPLIT_78(x) (x) BOOST_PP_SEQ_SPLIT_77 # define BOOST_PP_SEQ_SPLIT_79(x) (x) BOOST_PP_SEQ_SPLIT_78 # define BOOST_PP_SEQ_SPLIT_80(x) (x) BOOST_PP_SEQ_SPLIT_79 # define BOOST_PP_SEQ_SPLIT_81(x) (x) BOOST_PP_SEQ_SPLIT_80 # define BOOST_PP_SEQ_SPLIT_82(x) (x) BOOST_PP_SEQ_SPLIT_81 # define BOOST_PP_SEQ_SPLIT_83(x) (x) BOOST_PP_SEQ_SPLIT_82 # define BOOST_PP_SEQ_SPLIT_84(x) (x) BOOST_PP_SEQ_SPLIT_83 # define BOOST_PP_SEQ_SPLIT_85(x) (x) BOOST_PP_SEQ_SPLIT_84 # define BOOST_PP_SEQ_SPLIT_86(x) (x) BOOST_PP_SEQ_SPLIT_85 # define BOOST_PP_SEQ_SPLIT_87(x) (x) BOOST_PP_SEQ_SPLIT_86 # define BOOST_PP_SEQ_SPLIT_88(x) (x) BOOST_PP_SEQ_SPLIT_87 # define BOOST_PP_SEQ_SPLIT_89(x) (x) BOOST_PP_SEQ_SPLIT_88 # define BOOST_PP_SEQ_SPLIT_90(x) (x) BOOST_PP_SEQ_SPLIT_89 # define BOOST_PP_SEQ_SPLIT_91(x) (x) BOOST_PP_SEQ_SPLIT_90 # define BOOST_PP_SEQ_SPLIT_92(x) (x) BOOST_PP_SEQ_SPLIT_91 # define BOOST_PP_SEQ_SPLIT_93(x) (x) BOOST_PP_SEQ_SPLIT_92 # define BOOST_PP_SEQ_SPLIT_94(x) (x) BOOST_PP_SEQ_SPLIT_93 # define BOOST_PP_SEQ_SPLIT_95(x) (x) BOOST_PP_SEQ_SPLIT_94 # define BOOST_PP_SEQ_SPLIT_96(x) (x) BOOST_PP_SEQ_SPLIT_95 # define BOOST_PP_SEQ_SPLIT_97(x) (x) BOOST_PP_SEQ_SPLIT_96 # define BOOST_PP_SEQ_SPLIT_98(x) (x) BOOST_PP_SEQ_SPLIT_97 # define BOOST_PP_SEQ_SPLIT_99(x) (x) BOOST_PP_SEQ_SPLIT_98 # define BOOST_PP_SEQ_SPLIT_100(x) (x) BOOST_PP_SEQ_SPLIT_99 # define BOOST_PP_SEQ_SPLIT_101(x) (x) BOOST_PP_SEQ_SPLIT_100 # define BOOST_PP_SEQ_SPLIT_102(x) (x) BOOST_PP_SEQ_SPLIT_101 # define BOOST_PP_SEQ_SPLIT_103(x) (x) BOOST_PP_SEQ_SPLIT_102 # define BOOST_PP_SEQ_SPLIT_104(x) (x) BOOST_PP_SEQ_SPLIT_103 # define BOOST_PP_SEQ_SPLIT_105(x) (x) BOOST_PP_SEQ_SPLIT_104 # define BOOST_PP_SEQ_SPLIT_106(x) (x) BOOST_PP_SEQ_SPLIT_105 # define BOOST_PP_SEQ_SPLIT_107(x) (x) BOOST_PP_SEQ_SPLIT_106 # define BOOST_PP_SEQ_SPLIT_108(x) (x) BOOST_PP_SEQ_SPLIT_107 # define BOOST_PP_SEQ_SPLIT_109(x) (x) BOOST_PP_SEQ_SPLIT_108 # define BOOST_PP_SEQ_SPLIT_110(x) (x) BOOST_PP_SEQ_SPLIT_109 # define BOOST_PP_SEQ_SPLIT_111(x) (x) BOOST_PP_SEQ_SPLIT_110 # define BOOST_PP_SEQ_SPLIT_112(x) (x) BOOST_PP_SEQ_SPLIT_111 # define BOOST_PP_SEQ_SPLIT_113(x) (x) BOOST_PP_SEQ_SPLIT_112 # define BOOST_PP_SEQ_SPLIT_114(x) (x) BOOST_PP_SEQ_SPLIT_113 # define BOOST_PP_SEQ_SPLIT_115(x) (x) BOOST_PP_SEQ_SPLIT_114 # define BOOST_PP_SEQ_SPLIT_116(x) (x) BOOST_PP_SEQ_SPLIT_115 # define BOOST_PP_SEQ_SPLIT_117(x) (x) BOOST_PP_SEQ_SPLIT_116 # define BOOST_PP_SEQ_SPLIT_118(x) (x) BOOST_PP_SEQ_SPLIT_117 # define BOOST_PP_SEQ_SPLIT_119(x) (x) BOOST_PP_SEQ_SPLIT_118 # define BOOST_PP_SEQ_SPLIT_120(x) (x) BOOST_PP_SEQ_SPLIT_119 # define BOOST_PP_SEQ_SPLIT_121(x) (x) BOOST_PP_SEQ_SPLIT_120 # define BOOST_PP_SEQ_SPLIT_122(x) (x) BOOST_PP_SEQ_SPLIT_121 # define BOOST_PP_SEQ_SPLIT_123(x) (x) BOOST_PP_SEQ_SPLIT_122 # define BOOST_PP_SEQ_SPLIT_124(x) (x) BOOST_PP_SEQ_SPLIT_123 # define BOOST_PP_SEQ_SPLIT_125(x) (x) BOOST_PP_SEQ_SPLIT_124 # define BOOST_PP_SEQ_SPLIT_126(x) (x) BOOST_PP_SEQ_SPLIT_125 # define BOOST_PP_SEQ_SPLIT_127(x) (x) BOOST_PP_SEQ_SPLIT_126 # define BOOST_PP_SEQ_SPLIT_128(x) (x) BOOST_PP_SEQ_SPLIT_127 # define BOOST_PP_SEQ_SPLIT_129(x) (x) BOOST_PP_SEQ_SPLIT_128 # define BOOST_PP_SEQ_SPLIT_130(x) (x) BOOST_PP_SEQ_SPLIT_129 # define BOOST_PP_SEQ_SPLIT_131(x) (x) BOOST_PP_SEQ_SPLIT_130 # define BOOST_PP_SEQ_SPLIT_132(x) (x) BOOST_PP_SEQ_SPLIT_131 # define BOOST_PP_SEQ_SPLIT_133(x) (x) BOOST_PP_SEQ_SPLIT_132 # define BOOST_PP_SEQ_SPLIT_134(x) (x) BOOST_PP_SEQ_SPLIT_133 # define BOOST_PP_SEQ_SPLIT_135(x) (x) BOOST_PP_SEQ_SPLIT_134 # define BOOST_PP_SEQ_SPLIT_136(x) (x) BOOST_PP_SEQ_SPLIT_135 # define BOOST_PP_SEQ_SPLIT_137(x) (x) BOOST_PP_SEQ_SPLIT_136 # define BOOST_PP_SEQ_SPLIT_138(x) (x) BOOST_PP_SEQ_SPLIT_137 # define BOOST_PP_SEQ_SPLIT_139(x) (x) BOOST_PP_SEQ_SPLIT_138 # define BOOST_PP_SEQ_SPLIT_140(x) (x) BOOST_PP_SEQ_SPLIT_139 # define BOOST_PP_SEQ_SPLIT_141(x) (x) BOOST_PP_SEQ_SPLIT_140 # define BOOST_PP_SEQ_SPLIT_142(x) (x) BOOST_PP_SEQ_SPLIT_141 # define BOOST_PP_SEQ_SPLIT_143(x) (x) BOOST_PP_SEQ_SPLIT_142 # define BOOST_PP_SEQ_SPLIT_144(x) (x) BOOST_PP_SEQ_SPLIT_143 # define BOOST_PP_SEQ_SPLIT_145(x) (x) BOOST_PP_SEQ_SPLIT_144 # define BOOST_PP_SEQ_SPLIT_146(x) (x) BOOST_PP_SEQ_SPLIT_145 # define BOOST_PP_SEQ_SPLIT_147(x) (x) BOOST_PP_SEQ_SPLIT_146 # define BOOST_PP_SEQ_SPLIT_148(x) (x) BOOST_PP_SEQ_SPLIT_147 # define BOOST_PP_SEQ_SPLIT_149(x) (x) BOOST_PP_SEQ_SPLIT_148 # define BOOST_PP_SEQ_SPLIT_150(x) (x) BOOST_PP_SEQ_SPLIT_149 # define BOOST_PP_SEQ_SPLIT_151(x) (x) BOOST_PP_SEQ_SPLIT_150 # define BOOST_PP_SEQ_SPLIT_152(x) (x) BOOST_PP_SEQ_SPLIT_151 # define BOOST_PP_SEQ_SPLIT_153(x) (x) BOOST_PP_SEQ_SPLIT_152 # define BOOST_PP_SEQ_SPLIT_154(x) (x) BOOST_PP_SEQ_SPLIT_153 # define BOOST_PP_SEQ_SPLIT_155(x) (x) BOOST_PP_SEQ_SPLIT_154 # define BOOST_PP_SEQ_SPLIT_156(x) (x) BOOST_PP_SEQ_SPLIT_155 # define BOOST_PP_SEQ_SPLIT_157(x) (x) BOOST_PP_SEQ_SPLIT_156 # define BOOST_PP_SEQ_SPLIT_158(x) (x) BOOST_PP_SEQ_SPLIT_157 # define BOOST_PP_SEQ_SPLIT_159(x) (x) BOOST_PP_SEQ_SPLIT_158 # define BOOST_PP_SEQ_SPLIT_160(x) (x) BOOST_PP_SEQ_SPLIT_159 # define BOOST_PP_SEQ_SPLIT_161(x) (x) BOOST_PP_SEQ_SPLIT_160 # define BOOST_PP_SEQ_SPLIT_162(x) (x) BOOST_PP_SEQ_SPLIT_161 # define BOOST_PP_SEQ_SPLIT_163(x) (x) BOOST_PP_SEQ_SPLIT_162 # define BOOST_PP_SEQ_SPLIT_164(x) (x) BOOST_PP_SEQ_SPLIT_163 # define BOOST_PP_SEQ_SPLIT_165(x) (x) BOOST_PP_SEQ_SPLIT_164 # define BOOST_PP_SEQ_SPLIT_166(x) (x) BOOST_PP_SEQ_SPLIT_165 # define BOOST_PP_SEQ_SPLIT_167(x) (x) BOOST_PP_SEQ_SPLIT_166 # define BOOST_PP_SEQ_SPLIT_168(x) (x) BOOST_PP_SEQ_SPLIT_167 # define BOOST_PP_SEQ_SPLIT_169(x) (x) BOOST_PP_SEQ_SPLIT_168 # define BOOST_PP_SEQ_SPLIT_170(x) (x) BOOST_PP_SEQ_SPLIT_169 # define BOOST_PP_SEQ_SPLIT_171(x) (x) BOOST_PP_SEQ_SPLIT_170 # define BOOST_PP_SEQ_SPLIT_172(x) (x) BOOST_PP_SEQ_SPLIT_171 # define BOOST_PP_SEQ_SPLIT_173(x) (x) BOOST_PP_SEQ_SPLIT_172 # define BOOST_PP_SEQ_SPLIT_174(x) (x) BOOST_PP_SEQ_SPLIT_173 # define BOOST_PP_SEQ_SPLIT_175(x) (x) BOOST_PP_SEQ_SPLIT_174 # define BOOST_PP_SEQ_SPLIT_176(x) (x) BOOST_PP_SEQ_SPLIT_175 # define BOOST_PP_SEQ_SPLIT_177(x) (x) BOOST_PP_SEQ_SPLIT_176 # define BOOST_PP_SEQ_SPLIT_178(x) (x) BOOST_PP_SEQ_SPLIT_177 # define BOOST_PP_SEQ_SPLIT_179(x) (x) BOOST_PP_SEQ_SPLIT_178 # define BOOST_PP_SEQ_SPLIT_180(x) (x) BOOST_PP_SEQ_SPLIT_179 # define BOOST_PP_SEQ_SPLIT_181(x) (x) BOOST_PP_SEQ_SPLIT_180 # define BOOST_PP_SEQ_SPLIT_182(x) (x) BOOST_PP_SEQ_SPLIT_181 # define BOOST_PP_SEQ_SPLIT_183(x) (x) BOOST_PP_SEQ_SPLIT_182 # define BOOST_PP_SEQ_SPLIT_184(x) (x) BOOST_PP_SEQ_SPLIT_183 # define BOOST_PP_SEQ_SPLIT_185(x) (x) BOOST_PP_SEQ_SPLIT_184 # define BOOST_PP_SEQ_SPLIT_186(x) (x) BOOST_PP_SEQ_SPLIT_185 # define BOOST_PP_SEQ_SPLIT_187(x) (x) BOOST_PP_SEQ_SPLIT_186 # define BOOST_PP_SEQ_SPLIT_188(x) (x) BOOST_PP_SEQ_SPLIT_187 # define BOOST_PP_SEQ_SPLIT_189(x) (x) BOOST_PP_SEQ_SPLIT_188 # define BOOST_PP_SEQ_SPLIT_190(x) (x) BOOST_PP_SEQ_SPLIT_189 # define BOOST_PP_SEQ_SPLIT_191(x) (x) BOOST_PP_SEQ_SPLIT_190 # define BOOST_PP_SEQ_SPLIT_192(x) (x) BOOST_PP_SEQ_SPLIT_191 # define BOOST_PP_SEQ_SPLIT_193(x) (x) BOOST_PP_SEQ_SPLIT_192 # define BOOST_PP_SEQ_SPLIT_194(x) (x) BOOST_PP_SEQ_SPLIT_193 # define BOOST_PP_SEQ_SPLIT_195(x) (x) BOOST_PP_SEQ_SPLIT_194 # define BOOST_PP_SEQ_SPLIT_196(x) (x) BOOST_PP_SEQ_SPLIT_195 # define BOOST_PP_SEQ_SPLIT_197(x) (x) BOOST_PP_SEQ_SPLIT_196 # define BOOST_PP_SEQ_SPLIT_198(x) (x) BOOST_PP_SEQ_SPLIT_197 # define BOOST_PP_SEQ_SPLIT_199(x) (x) BOOST_PP_SEQ_SPLIT_198 # define BOOST_PP_SEQ_SPLIT_200(x) (x) BOOST_PP_SEQ_SPLIT_199 # define BOOST_PP_SEQ_SPLIT_201(x) (x) BOOST_PP_SEQ_SPLIT_200 # define BOOST_PP_SEQ_SPLIT_202(x) (x) BOOST_PP_SEQ_SPLIT_201 # define BOOST_PP_SEQ_SPLIT_203(x) (x) BOOST_PP_SEQ_SPLIT_202 # define BOOST_PP_SEQ_SPLIT_204(x) (x) BOOST_PP_SEQ_SPLIT_203 # define BOOST_PP_SEQ_SPLIT_205(x) (x) BOOST_PP_SEQ_SPLIT_204 # define BOOST_PP_SEQ_SPLIT_206(x) (x) BOOST_PP_SEQ_SPLIT_205 # define BOOST_PP_SEQ_SPLIT_207(x) (x) BOOST_PP_SEQ_SPLIT_206 # define BOOST_PP_SEQ_SPLIT_208(x) (x) BOOST_PP_SEQ_SPLIT_207 # define BOOST_PP_SEQ_SPLIT_209(x) (x) BOOST_PP_SEQ_SPLIT_208 # define BOOST_PP_SEQ_SPLIT_210(x) (x) BOOST_PP_SEQ_SPLIT_209 # define BOOST_PP_SEQ_SPLIT_211(x) (x) BOOST_PP_SEQ_SPLIT_210 # define BOOST_PP_SEQ_SPLIT_212(x) (x) BOOST_PP_SEQ_SPLIT_211 # define BOOST_PP_SEQ_SPLIT_213(x) (x) BOOST_PP_SEQ_SPLIT_212 # define BOOST_PP_SEQ_SPLIT_214(x) (x) BOOST_PP_SEQ_SPLIT_213 # define BOOST_PP_SEQ_SPLIT_215(x) (x) BOOST_PP_SEQ_SPLIT_214 # define BOOST_PP_SEQ_SPLIT_216(x) (x) BOOST_PP_SEQ_SPLIT_215 # define BOOST_PP_SEQ_SPLIT_217(x) (x) BOOST_PP_SEQ_SPLIT_216 # define BOOST_PP_SEQ_SPLIT_218(x) (x) BOOST_PP_SEQ_SPLIT_217 # define BOOST_PP_SEQ_SPLIT_219(x) (x) BOOST_PP_SEQ_SPLIT_218 # define BOOST_PP_SEQ_SPLIT_220(x) (x) BOOST_PP_SEQ_SPLIT_219 # define BOOST_PP_SEQ_SPLIT_221(x) (x) BOOST_PP_SEQ_SPLIT_220 # define BOOST_PP_SEQ_SPLIT_222(x) (x) BOOST_PP_SEQ_SPLIT_221 # define BOOST_PP_SEQ_SPLIT_223(x) (x) BOOST_PP_SEQ_SPLIT_222 # define BOOST_PP_SEQ_SPLIT_224(x) (x) BOOST_PP_SEQ_SPLIT_223 # define BOOST_PP_SEQ_SPLIT_225(x) (x) BOOST_PP_SEQ_SPLIT_224 # define BOOST_PP_SEQ_SPLIT_226(x) (x) BOOST_PP_SEQ_SPLIT_225 # define BOOST_PP_SEQ_SPLIT_227(x) (x) BOOST_PP_SEQ_SPLIT_226 # define BOOST_PP_SEQ_SPLIT_228(x) (x) BOOST_PP_SEQ_SPLIT_227 # define BOOST_PP_SEQ_SPLIT_229(x) (x) BOOST_PP_SEQ_SPLIT_228 # define BOOST_PP_SEQ_SPLIT_230(x) (x) BOOST_PP_SEQ_SPLIT_229 # define BOOST_PP_SEQ_SPLIT_231(x) (x) BOOST_PP_SEQ_SPLIT_230 # define BOOST_PP_SEQ_SPLIT_232(x) (x) BOOST_PP_SEQ_SPLIT_231 # define BOOST_PP_SEQ_SPLIT_233(x) (x) BOOST_PP_SEQ_SPLIT_232 # define BOOST_PP_SEQ_SPLIT_234(x) (x) BOOST_PP_SEQ_SPLIT_233 # define BOOST_PP_SEQ_SPLIT_235(x) (x) BOOST_PP_SEQ_SPLIT_234 # define BOOST_PP_SEQ_SPLIT_236(x) (x) BOOST_PP_SEQ_SPLIT_235 # define BOOST_PP_SEQ_SPLIT_237(x) (x) BOOST_PP_SEQ_SPLIT_236 # define BOOST_PP_SEQ_SPLIT_238(x) (x) BOOST_PP_SEQ_SPLIT_237 # define BOOST_PP_SEQ_SPLIT_239(x) (x) BOOST_PP_SEQ_SPLIT_238 # define BOOST_PP_SEQ_SPLIT_240(x) (x) BOOST_PP_SEQ_SPLIT_239 # define BOOST_PP_SEQ_SPLIT_241(x) (x) BOOST_PP_SEQ_SPLIT_240 # define BOOST_PP_SEQ_SPLIT_242(x) (x) BOOST_PP_SEQ_SPLIT_241 # define BOOST_PP_SEQ_SPLIT_243(x) (x) BOOST_PP_SEQ_SPLIT_242 # define BOOST_PP_SEQ_SPLIT_244(x) (x) BOOST_PP_SEQ_SPLIT_243 # define BOOST_PP_SEQ_SPLIT_245(x) (x) BOOST_PP_SEQ_SPLIT_244 # define BOOST_PP_SEQ_SPLIT_246(x) (x) BOOST_PP_SEQ_SPLIT_245 # define BOOST_PP_SEQ_SPLIT_247(x) (x) BOOST_PP_SEQ_SPLIT_246 # define BOOST_PP_SEQ_SPLIT_248(x) (x) BOOST_PP_SEQ_SPLIT_247 # define BOOST_PP_SEQ_SPLIT_249(x) (x) BOOST_PP_SEQ_SPLIT_248 # define BOOST_PP_SEQ_SPLIT_250(x) (x) BOOST_PP_SEQ_SPLIT_249 # define BOOST_PP_SEQ_SPLIT_251(x) (x) BOOST_PP_SEQ_SPLIT_250 # define BOOST_PP_SEQ_SPLIT_252(x) (x) BOOST_PP_SEQ_SPLIT_251 # define BOOST_PP_SEQ_SPLIT_253(x) (x) BOOST_PP_SEQ_SPLIT_252 # define BOOST_PP_SEQ_SPLIT_254(x) (x) BOOST_PP_SEQ_SPLIT_253 # define BOOST_PP_SEQ_SPLIT_255(x) (x) BOOST_PP_SEQ_SPLIT_254 # define BOOST_PP_SEQ_SPLIT_256(x) (x) BOOST_PP_SEQ_SPLIT_255 # # endif ================================================ FILE: benchmarks/boost/preprocessor/seq/elem.hpp ================================================ # /* ************************************************************************** # * * # * (C) Copyright Paul Mensonides 2002. # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # * * # ************************************************************************** */ # # /* See http://www.boost.org for most recent version. */ # # ifndef BOOST_PREPROCESSOR_SEQ_ELEM_HPP # define BOOST_PREPROCESSOR_SEQ_ELEM_HPP # # include # include # include # # /* BOOST_PP_SEQ_ELEM */ # # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC() # define BOOST_PP_SEQ_ELEM(i, seq) BOOST_PP_SEQ_ELEM_I(i, seq) # else # define BOOST_PP_SEQ_ELEM(i, seq) BOOST_PP_SEQ_ELEM_I((i, seq)) # endif # # if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MSVC() # define BOOST_PP_SEQ_ELEM_I(i, seq) BOOST_PP_SEQ_ELEM_II((BOOST_PP_SEQ_ELEM_ ## i seq)) # define BOOST_PP_SEQ_ELEM_II(res) BOOST_PP_SEQ_ELEM_IV(BOOST_PP_SEQ_ELEM_III res) # define BOOST_PP_SEQ_ELEM_III(x, _) x BOOST_PP_EMPTY() # define BOOST_PP_SEQ_ELEM_IV(x) x # elif BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC() # define BOOST_PP_SEQ_ELEM_I(par) BOOST_PP_SEQ_ELEM_II ## par # define BOOST_PP_SEQ_ELEM_II(i, seq) BOOST_PP_SEQ_ELEM_III(BOOST_PP_SEQ_ELEM_ ## i ## seq) # define BOOST_PP_SEQ_ELEM_III(im) BOOST_PP_SEQ_ELEM_IV(im) # define BOOST_PP_SEQ_ELEM_IV(x, _) x # else # if defined(__IBMC__) || defined(__IBMCPP__) # define BOOST_PP_SEQ_ELEM_I(i, seq) BOOST_PP_SEQ_ELEM_II(BOOST_PP_CAT(BOOST_PP_SEQ_ELEM_ ## i, seq)) # else # define BOOST_PP_SEQ_ELEM_I(i, seq) BOOST_PP_SEQ_ELEM_II(BOOST_PP_SEQ_ELEM_ ## i seq) # endif # define BOOST_PP_SEQ_ELEM_II(im) BOOST_PP_SEQ_ELEM_III(im) # define BOOST_PP_SEQ_ELEM_III(x, _) x # endif # # define BOOST_PP_SEQ_ELEM_0(x) x, BOOST_PP_NIL # define BOOST_PP_SEQ_ELEM_1(_) BOOST_PP_SEQ_ELEM_0 # define BOOST_PP_SEQ_ELEM_2(_) BOOST_PP_SEQ_ELEM_1 # define BOOST_PP_SEQ_ELEM_3(_) BOOST_PP_SEQ_ELEM_2 # define BOOST_PP_SEQ_ELEM_4(_) BOOST_PP_SEQ_ELEM_3 # define BOOST_PP_SEQ_ELEM_5(_) BOOST_PP_SEQ_ELEM_4 # define BOOST_PP_SEQ_ELEM_6(_) BOOST_PP_SEQ_ELEM_5 # define BOOST_PP_SEQ_ELEM_7(_) BOOST_PP_SEQ_ELEM_6 # define BOOST_PP_SEQ_ELEM_8(_) BOOST_PP_SEQ_ELEM_7 # define BOOST_PP_SEQ_ELEM_9(_) BOOST_PP_SEQ_ELEM_8 # define BOOST_PP_SEQ_ELEM_10(_) BOOST_PP_SEQ_ELEM_9 # define BOOST_PP_SEQ_ELEM_11(_) BOOST_PP_SEQ_ELEM_10 # define BOOST_PP_SEQ_ELEM_12(_) BOOST_PP_SEQ_ELEM_11 # define BOOST_PP_SEQ_ELEM_13(_) BOOST_PP_SEQ_ELEM_12 # define BOOST_PP_SEQ_ELEM_14(_) BOOST_PP_SEQ_ELEM_13 # define BOOST_PP_SEQ_ELEM_15(_) BOOST_PP_SEQ_ELEM_14 # define BOOST_PP_SEQ_ELEM_16(_) BOOST_PP_SEQ_ELEM_15 # define BOOST_PP_SEQ_ELEM_17(_) BOOST_PP_SEQ_ELEM_16 # define BOOST_PP_SEQ_ELEM_18(_) BOOST_PP_SEQ_ELEM_17 # define BOOST_PP_SEQ_ELEM_19(_) BOOST_PP_SEQ_ELEM_18 # define BOOST_PP_SEQ_ELEM_20(_) BOOST_PP_SEQ_ELEM_19 # define BOOST_PP_SEQ_ELEM_21(_) BOOST_PP_SEQ_ELEM_20 # define BOOST_PP_SEQ_ELEM_22(_) BOOST_PP_SEQ_ELEM_21 # define BOOST_PP_SEQ_ELEM_23(_) BOOST_PP_SEQ_ELEM_22 # define BOOST_PP_SEQ_ELEM_24(_) BOOST_PP_SEQ_ELEM_23 # define BOOST_PP_SEQ_ELEM_25(_) BOOST_PP_SEQ_ELEM_24 # define BOOST_PP_SEQ_ELEM_26(_) BOOST_PP_SEQ_ELEM_25 # define BOOST_PP_SEQ_ELEM_27(_) BOOST_PP_SEQ_ELEM_26 # define BOOST_PP_SEQ_ELEM_28(_) BOOST_PP_SEQ_ELEM_27 # define BOOST_PP_SEQ_ELEM_29(_) BOOST_PP_SEQ_ELEM_28 # define BOOST_PP_SEQ_ELEM_30(_) BOOST_PP_SEQ_ELEM_29 # define BOOST_PP_SEQ_ELEM_31(_) BOOST_PP_SEQ_ELEM_30 # define BOOST_PP_SEQ_ELEM_32(_) BOOST_PP_SEQ_ELEM_31 # define BOOST_PP_SEQ_ELEM_33(_) BOOST_PP_SEQ_ELEM_32 # define BOOST_PP_SEQ_ELEM_34(_) BOOST_PP_SEQ_ELEM_33 # define BOOST_PP_SEQ_ELEM_35(_) BOOST_PP_SEQ_ELEM_34 # define BOOST_PP_SEQ_ELEM_36(_) BOOST_PP_SEQ_ELEM_35 # define BOOST_PP_SEQ_ELEM_37(_) BOOST_PP_SEQ_ELEM_36 # define BOOST_PP_SEQ_ELEM_38(_) BOOST_PP_SEQ_ELEM_37 # define BOOST_PP_SEQ_ELEM_39(_) BOOST_PP_SEQ_ELEM_38 # define BOOST_PP_SEQ_ELEM_40(_) BOOST_PP_SEQ_ELEM_39 # define BOOST_PP_SEQ_ELEM_41(_) BOOST_PP_SEQ_ELEM_40 # define BOOST_PP_SEQ_ELEM_42(_) BOOST_PP_SEQ_ELEM_41 # define BOOST_PP_SEQ_ELEM_43(_) BOOST_PP_SEQ_ELEM_42 # define BOOST_PP_SEQ_ELEM_44(_) BOOST_PP_SEQ_ELEM_43 # define BOOST_PP_SEQ_ELEM_45(_) BOOST_PP_SEQ_ELEM_44 # define BOOST_PP_SEQ_ELEM_46(_) BOOST_PP_SEQ_ELEM_45 # define BOOST_PP_SEQ_ELEM_47(_) BOOST_PP_SEQ_ELEM_46 # define BOOST_PP_SEQ_ELEM_48(_) BOOST_PP_SEQ_ELEM_47 # define BOOST_PP_SEQ_ELEM_49(_) BOOST_PP_SEQ_ELEM_48 # define BOOST_PP_SEQ_ELEM_50(_) BOOST_PP_SEQ_ELEM_49 # define BOOST_PP_SEQ_ELEM_51(_) BOOST_PP_SEQ_ELEM_50 # define BOOST_PP_SEQ_ELEM_52(_) BOOST_PP_SEQ_ELEM_51 # define BOOST_PP_SEQ_ELEM_53(_) BOOST_PP_SEQ_ELEM_52 # define BOOST_PP_SEQ_ELEM_54(_) BOOST_PP_SEQ_ELEM_53 # define BOOST_PP_SEQ_ELEM_55(_) BOOST_PP_SEQ_ELEM_54 # define BOOST_PP_SEQ_ELEM_56(_) BOOST_PP_SEQ_ELEM_55 # define BOOST_PP_SEQ_ELEM_57(_) BOOST_PP_SEQ_ELEM_56 # define BOOST_PP_SEQ_ELEM_58(_) BOOST_PP_SEQ_ELEM_57 # define BOOST_PP_SEQ_ELEM_59(_) BOOST_PP_SEQ_ELEM_58 # define BOOST_PP_SEQ_ELEM_60(_) BOOST_PP_SEQ_ELEM_59 # define BOOST_PP_SEQ_ELEM_61(_) BOOST_PP_SEQ_ELEM_60 # define BOOST_PP_SEQ_ELEM_62(_) BOOST_PP_SEQ_ELEM_61 # define BOOST_PP_SEQ_ELEM_63(_) BOOST_PP_SEQ_ELEM_62 # define BOOST_PP_SEQ_ELEM_64(_) BOOST_PP_SEQ_ELEM_63 # define BOOST_PP_SEQ_ELEM_65(_) BOOST_PP_SEQ_ELEM_64 # define BOOST_PP_SEQ_ELEM_66(_) BOOST_PP_SEQ_ELEM_65 # define BOOST_PP_SEQ_ELEM_67(_) BOOST_PP_SEQ_ELEM_66 # define BOOST_PP_SEQ_ELEM_68(_) BOOST_PP_SEQ_ELEM_67 # define BOOST_PP_SEQ_ELEM_69(_) BOOST_PP_SEQ_ELEM_68 # define BOOST_PP_SEQ_ELEM_70(_) BOOST_PP_SEQ_ELEM_69 # define BOOST_PP_SEQ_ELEM_71(_) BOOST_PP_SEQ_ELEM_70 # define BOOST_PP_SEQ_ELEM_72(_) BOOST_PP_SEQ_ELEM_71 # define BOOST_PP_SEQ_ELEM_73(_) BOOST_PP_SEQ_ELEM_72 # define BOOST_PP_SEQ_ELEM_74(_) BOOST_PP_SEQ_ELEM_73 # define BOOST_PP_SEQ_ELEM_75(_) BOOST_PP_SEQ_ELEM_74 # define BOOST_PP_SEQ_ELEM_76(_) BOOST_PP_SEQ_ELEM_75 # define BOOST_PP_SEQ_ELEM_77(_) BOOST_PP_SEQ_ELEM_76 # define BOOST_PP_SEQ_ELEM_78(_) BOOST_PP_SEQ_ELEM_77 # define BOOST_PP_SEQ_ELEM_79(_) BOOST_PP_SEQ_ELEM_78 # define BOOST_PP_SEQ_ELEM_80(_) BOOST_PP_SEQ_ELEM_79 # define BOOST_PP_SEQ_ELEM_81(_) BOOST_PP_SEQ_ELEM_80 # define BOOST_PP_SEQ_ELEM_82(_) BOOST_PP_SEQ_ELEM_81 # define BOOST_PP_SEQ_ELEM_83(_) BOOST_PP_SEQ_ELEM_82 # define BOOST_PP_SEQ_ELEM_84(_) BOOST_PP_SEQ_ELEM_83 # define BOOST_PP_SEQ_ELEM_85(_) BOOST_PP_SEQ_ELEM_84 # define BOOST_PP_SEQ_ELEM_86(_) BOOST_PP_SEQ_ELEM_85 # define BOOST_PP_SEQ_ELEM_87(_) BOOST_PP_SEQ_ELEM_86 # define BOOST_PP_SEQ_ELEM_88(_) BOOST_PP_SEQ_ELEM_87 # define BOOST_PP_SEQ_ELEM_89(_) BOOST_PP_SEQ_ELEM_88 # define BOOST_PP_SEQ_ELEM_90(_) BOOST_PP_SEQ_ELEM_89 # define BOOST_PP_SEQ_ELEM_91(_) BOOST_PP_SEQ_ELEM_90 # define BOOST_PP_SEQ_ELEM_92(_) BOOST_PP_SEQ_ELEM_91 # define BOOST_PP_SEQ_ELEM_93(_) BOOST_PP_SEQ_ELEM_92 # define BOOST_PP_SEQ_ELEM_94(_) BOOST_PP_SEQ_ELEM_93 # define BOOST_PP_SEQ_ELEM_95(_) BOOST_PP_SEQ_ELEM_94 # define BOOST_PP_SEQ_ELEM_96(_) BOOST_PP_SEQ_ELEM_95 # define BOOST_PP_SEQ_ELEM_97(_) BOOST_PP_SEQ_ELEM_96 # define BOOST_PP_SEQ_ELEM_98(_) BOOST_PP_SEQ_ELEM_97 # define BOOST_PP_SEQ_ELEM_99(_) BOOST_PP_SEQ_ELEM_98 # define BOOST_PP_SEQ_ELEM_100(_) BOOST_PP_SEQ_ELEM_99 # define BOOST_PP_SEQ_ELEM_101(_) BOOST_PP_SEQ_ELEM_100 # define BOOST_PP_SEQ_ELEM_102(_) BOOST_PP_SEQ_ELEM_101 # define BOOST_PP_SEQ_ELEM_103(_) BOOST_PP_SEQ_ELEM_102 # define BOOST_PP_SEQ_ELEM_104(_) BOOST_PP_SEQ_ELEM_103 # define BOOST_PP_SEQ_ELEM_105(_) BOOST_PP_SEQ_ELEM_104 # define BOOST_PP_SEQ_ELEM_106(_) BOOST_PP_SEQ_ELEM_105 # define BOOST_PP_SEQ_ELEM_107(_) BOOST_PP_SEQ_ELEM_106 # define BOOST_PP_SEQ_ELEM_108(_) BOOST_PP_SEQ_ELEM_107 # define BOOST_PP_SEQ_ELEM_109(_) BOOST_PP_SEQ_ELEM_108 # define BOOST_PP_SEQ_ELEM_110(_) BOOST_PP_SEQ_ELEM_109 # define BOOST_PP_SEQ_ELEM_111(_) BOOST_PP_SEQ_ELEM_110 # define BOOST_PP_SEQ_ELEM_112(_) BOOST_PP_SEQ_ELEM_111 # define BOOST_PP_SEQ_ELEM_113(_) BOOST_PP_SEQ_ELEM_112 # define BOOST_PP_SEQ_ELEM_114(_) BOOST_PP_SEQ_ELEM_113 # define BOOST_PP_SEQ_ELEM_115(_) BOOST_PP_SEQ_ELEM_114 # define BOOST_PP_SEQ_ELEM_116(_) BOOST_PP_SEQ_ELEM_115 # define BOOST_PP_SEQ_ELEM_117(_) BOOST_PP_SEQ_ELEM_116 # define BOOST_PP_SEQ_ELEM_118(_) BOOST_PP_SEQ_ELEM_117 # define BOOST_PP_SEQ_ELEM_119(_) BOOST_PP_SEQ_ELEM_118 # define BOOST_PP_SEQ_ELEM_120(_) BOOST_PP_SEQ_ELEM_119 # define BOOST_PP_SEQ_ELEM_121(_) BOOST_PP_SEQ_ELEM_120 # define BOOST_PP_SEQ_ELEM_122(_) BOOST_PP_SEQ_ELEM_121 # define BOOST_PP_SEQ_ELEM_123(_) BOOST_PP_SEQ_ELEM_122 # define BOOST_PP_SEQ_ELEM_124(_) BOOST_PP_SEQ_ELEM_123 # define BOOST_PP_SEQ_ELEM_125(_) BOOST_PP_SEQ_ELEM_124 # define BOOST_PP_SEQ_ELEM_126(_) BOOST_PP_SEQ_ELEM_125 # define BOOST_PP_SEQ_ELEM_127(_) BOOST_PP_SEQ_ELEM_126 # define BOOST_PP_SEQ_ELEM_128(_) BOOST_PP_SEQ_ELEM_127 # define BOOST_PP_SEQ_ELEM_129(_) BOOST_PP_SEQ_ELEM_128 # define BOOST_PP_SEQ_ELEM_130(_) BOOST_PP_SEQ_ELEM_129 # define BOOST_PP_SEQ_ELEM_131(_) BOOST_PP_SEQ_ELEM_130 # define BOOST_PP_SEQ_ELEM_132(_) BOOST_PP_SEQ_ELEM_131 # define BOOST_PP_SEQ_ELEM_133(_) BOOST_PP_SEQ_ELEM_132 # define BOOST_PP_SEQ_ELEM_134(_) BOOST_PP_SEQ_ELEM_133 # define BOOST_PP_SEQ_ELEM_135(_) BOOST_PP_SEQ_ELEM_134 # define BOOST_PP_SEQ_ELEM_136(_) BOOST_PP_SEQ_ELEM_135 # define BOOST_PP_SEQ_ELEM_137(_) BOOST_PP_SEQ_ELEM_136 # define BOOST_PP_SEQ_ELEM_138(_) BOOST_PP_SEQ_ELEM_137 # define BOOST_PP_SEQ_ELEM_139(_) BOOST_PP_SEQ_ELEM_138 # define BOOST_PP_SEQ_ELEM_140(_) BOOST_PP_SEQ_ELEM_139 # define BOOST_PP_SEQ_ELEM_141(_) BOOST_PP_SEQ_ELEM_140 # define BOOST_PP_SEQ_ELEM_142(_) BOOST_PP_SEQ_ELEM_141 # define BOOST_PP_SEQ_ELEM_143(_) BOOST_PP_SEQ_ELEM_142 # define BOOST_PP_SEQ_ELEM_144(_) BOOST_PP_SEQ_ELEM_143 # define BOOST_PP_SEQ_ELEM_145(_) BOOST_PP_SEQ_ELEM_144 # define BOOST_PP_SEQ_ELEM_146(_) BOOST_PP_SEQ_ELEM_145 # define BOOST_PP_SEQ_ELEM_147(_) BOOST_PP_SEQ_ELEM_146 # define BOOST_PP_SEQ_ELEM_148(_) BOOST_PP_SEQ_ELEM_147 # define BOOST_PP_SEQ_ELEM_149(_) BOOST_PP_SEQ_ELEM_148 # define BOOST_PP_SEQ_ELEM_150(_) BOOST_PP_SEQ_ELEM_149 # define BOOST_PP_SEQ_ELEM_151(_) BOOST_PP_SEQ_ELEM_150 # define BOOST_PP_SEQ_ELEM_152(_) BOOST_PP_SEQ_ELEM_151 # define BOOST_PP_SEQ_ELEM_153(_) BOOST_PP_SEQ_ELEM_152 # define BOOST_PP_SEQ_ELEM_154(_) BOOST_PP_SEQ_ELEM_153 # define BOOST_PP_SEQ_ELEM_155(_) BOOST_PP_SEQ_ELEM_154 # define BOOST_PP_SEQ_ELEM_156(_) BOOST_PP_SEQ_ELEM_155 # define BOOST_PP_SEQ_ELEM_157(_) BOOST_PP_SEQ_ELEM_156 # define BOOST_PP_SEQ_ELEM_158(_) BOOST_PP_SEQ_ELEM_157 # define BOOST_PP_SEQ_ELEM_159(_) BOOST_PP_SEQ_ELEM_158 # define BOOST_PP_SEQ_ELEM_160(_) BOOST_PP_SEQ_ELEM_159 # define BOOST_PP_SEQ_ELEM_161(_) BOOST_PP_SEQ_ELEM_160 # define BOOST_PP_SEQ_ELEM_162(_) BOOST_PP_SEQ_ELEM_161 # define BOOST_PP_SEQ_ELEM_163(_) BOOST_PP_SEQ_ELEM_162 # define BOOST_PP_SEQ_ELEM_164(_) BOOST_PP_SEQ_ELEM_163 # define BOOST_PP_SEQ_ELEM_165(_) BOOST_PP_SEQ_ELEM_164 # define BOOST_PP_SEQ_ELEM_166(_) BOOST_PP_SEQ_ELEM_165 # define BOOST_PP_SEQ_ELEM_167(_) BOOST_PP_SEQ_ELEM_166 # define BOOST_PP_SEQ_ELEM_168(_) BOOST_PP_SEQ_ELEM_167 # define BOOST_PP_SEQ_ELEM_169(_) BOOST_PP_SEQ_ELEM_168 # define BOOST_PP_SEQ_ELEM_170(_) BOOST_PP_SEQ_ELEM_169 # define BOOST_PP_SEQ_ELEM_171(_) BOOST_PP_SEQ_ELEM_170 # define BOOST_PP_SEQ_ELEM_172(_) BOOST_PP_SEQ_ELEM_171 # define BOOST_PP_SEQ_ELEM_173(_) BOOST_PP_SEQ_ELEM_172 # define BOOST_PP_SEQ_ELEM_174(_) BOOST_PP_SEQ_ELEM_173 # define BOOST_PP_SEQ_ELEM_175(_) BOOST_PP_SEQ_ELEM_174 # define BOOST_PP_SEQ_ELEM_176(_) BOOST_PP_SEQ_ELEM_175 # define BOOST_PP_SEQ_ELEM_177(_) BOOST_PP_SEQ_ELEM_176 # define BOOST_PP_SEQ_ELEM_178(_) BOOST_PP_SEQ_ELEM_177 # define BOOST_PP_SEQ_ELEM_179(_) BOOST_PP_SEQ_ELEM_178 # define BOOST_PP_SEQ_ELEM_180(_) BOOST_PP_SEQ_ELEM_179 # define BOOST_PP_SEQ_ELEM_181(_) BOOST_PP_SEQ_ELEM_180 # define BOOST_PP_SEQ_ELEM_182(_) BOOST_PP_SEQ_ELEM_181 # define BOOST_PP_SEQ_ELEM_183(_) BOOST_PP_SEQ_ELEM_182 # define BOOST_PP_SEQ_ELEM_184(_) BOOST_PP_SEQ_ELEM_183 # define BOOST_PP_SEQ_ELEM_185(_) BOOST_PP_SEQ_ELEM_184 # define BOOST_PP_SEQ_ELEM_186(_) BOOST_PP_SEQ_ELEM_185 # define BOOST_PP_SEQ_ELEM_187(_) BOOST_PP_SEQ_ELEM_186 # define BOOST_PP_SEQ_ELEM_188(_) BOOST_PP_SEQ_ELEM_187 # define BOOST_PP_SEQ_ELEM_189(_) BOOST_PP_SEQ_ELEM_188 # define BOOST_PP_SEQ_ELEM_190(_) BOOST_PP_SEQ_ELEM_189 # define BOOST_PP_SEQ_ELEM_191(_) BOOST_PP_SEQ_ELEM_190 # define BOOST_PP_SEQ_ELEM_192(_) BOOST_PP_SEQ_ELEM_191 # define BOOST_PP_SEQ_ELEM_193(_) BOOST_PP_SEQ_ELEM_192 # define BOOST_PP_SEQ_ELEM_194(_) BOOST_PP_SEQ_ELEM_193 # define BOOST_PP_SEQ_ELEM_195(_) BOOST_PP_SEQ_ELEM_194 # define BOOST_PP_SEQ_ELEM_196(_) BOOST_PP_SEQ_ELEM_195 # define BOOST_PP_SEQ_ELEM_197(_) BOOST_PP_SEQ_ELEM_196 # define BOOST_PP_SEQ_ELEM_198(_) BOOST_PP_SEQ_ELEM_197 # define BOOST_PP_SEQ_ELEM_199(_) BOOST_PP_SEQ_ELEM_198 # define BOOST_PP_SEQ_ELEM_200(_) BOOST_PP_SEQ_ELEM_199 # define BOOST_PP_SEQ_ELEM_201(_) BOOST_PP_SEQ_ELEM_200 # define BOOST_PP_SEQ_ELEM_202(_) BOOST_PP_SEQ_ELEM_201 # define BOOST_PP_SEQ_ELEM_203(_) BOOST_PP_SEQ_ELEM_202 # define BOOST_PP_SEQ_ELEM_204(_) BOOST_PP_SEQ_ELEM_203 # define BOOST_PP_SEQ_ELEM_205(_) BOOST_PP_SEQ_ELEM_204 # define BOOST_PP_SEQ_ELEM_206(_) BOOST_PP_SEQ_ELEM_205 # define BOOST_PP_SEQ_ELEM_207(_) BOOST_PP_SEQ_ELEM_206 # define BOOST_PP_SEQ_ELEM_208(_) BOOST_PP_SEQ_ELEM_207 # define BOOST_PP_SEQ_ELEM_209(_) BOOST_PP_SEQ_ELEM_208 # define BOOST_PP_SEQ_ELEM_210(_) BOOST_PP_SEQ_ELEM_209 # define BOOST_PP_SEQ_ELEM_211(_) BOOST_PP_SEQ_ELEM_210 # define BOOST_PP_SEQ_ELEM_212(_) BOOST_PP_SEQ_ELEM_211 # define BOOST_PP_SEQ_ELEM_213(_) BOOST_PP_SEQ_ELEM_212 # define BOOST_PP_SEQ_ELEM_214(_) BOOST_PP_SEQ_ELEM_213 # define BOOST_PP_SEQ_ELEM_215(_) BOOST_PP_SEQ_ELEM_214 # define BOOST_PP_SEQ_ELEM_216(_) BOOST_PP_SEQ_ELEM_215 # define BOOST_PP_SEQ_ELEM_217(_) BOOST_PP_SEQ_ELEM_216 # define BOOST_PP_SEQ_ELEM_218(_) BOOST_PP_SEQ_ELEM_217 # define BOOST_PP_SEQ_ELEM_219(_) BOOST_PP_SEQ_ELEM_218 # define BOOST_PP_SEQ_ELEM_220(_) BOOST_PP_SEQ_ELEM_219 # define BOOST_PP_SEQ_ELEM_221(_) BOOST_PP_SEQ_ELEM_220 # define BOOST_PP_SEQ_ELEM_222(_) BOOST_PP_SEQ_ELEM_221 # define BOOST_PP_SEQ_ELEM_223(_) BOOST_PP_SEQ_ELEM_222 # define BOOST_PP_SEQ_ELEM_224(_) BOOST_PP_SEQ_ELEM_223 # define BOOST_PP_SEQ_ELEM_225(_) BOOST_PP_SEQ_ELEM_224 # define BOOST_PP_SEQ_ELEM_226(_) BOOST_PP_SEQ_ELEM_225 # define BOOST_PP_SEQ_ELEM_227(_) BOOST_PP_SEQ_ELEM_226 # define BOOST_PP_SEQ_ELEM_228(_) BOOST_PP_SEQ_ELEM_227 # define BOOST_PP_SEQ_ELEM_229(_) BOOST_PP_SEQ_ELEM_228 # define BOOST_PP_SEQ_ELEM_230(_) BOOST_PP_SEQ_ELEM_229 # define BOOST_PP_SEQ_ELEM_231(_) BOOST_PP_SEQ_ELEM_230 # define BOOST_PP_SEQ_ELEM_232(_) BOOST_PP_SEQ_ELEM_231 # define BOOST_PP_SEQ_ELEM_233(_) BOOST_PP_SEQ_ELEM_232 # define BOOST_PP_SEQ_ELEM_234(_) BOOST_PP_SEQ_ELEM_233 # define BOOST_PP_SEQ_ELEM_235(_) BOOST_PP_SEQ_ELEM_234 # define BOOST_PP_SEQ_ELEM_236(_) BOOST_PP_SEQ_ELEM_235 # define BOOST_PP_SEQ_ELEM_237(_) BOOST_PP_SEQ_ELEM_236 # define BOOST_PP_SEQ_ELEM_238(_) BOOST_PP_SEQ_ELEM_237 # define BOOST_PP_SEQ_ELEM_239(_) BOOST_PP_SEQ_ELEM_238 # define BOOST_PP_SEQ_ELEM_240(_) BOOST_PP_SEQ_ELEM_239 # define BOOST_PP_SEQ_ELEM_241(_) BOOST_PP_SEQ_ELEM_240 # define BOOST_PP_SEQ_ELEM_242(_) BOOST_PP_SEQ_ELEM_241 # define BOOST_PP_SEQ_ELEM_243(_) BOOST_PP_SEQ_ELEM_242 # define BOOST_PP_SEQ_ELEM_244(_) BOOST_PP_SEQ_ELEM_243 # define BOOST_PP_SEQ_ELEM_245(_) BOOST_PP_SEQ_ELEM_244 # define BOOST_PP_SEQ_ELEM_246(_) BOOST_PP_SEQ_ELEM_245 # define BOOST_PP_SEQ_ELEM_247(_) BOOST_PP_SEQ_ELEM_246 # define BOOST_PP_SEQ_ELEM_248(_) BOOST_PP_SEQ_ELEM_247 # define BOOST_PP_SEQ_ELEM_249(_) BOOST_PP_SEQ_ELEM_248 # define BOOST_PP_SEQ_ELEM_250(_) BOOST_PP_SEQ_ELEM_249 # define BOOST_PP_SEQ_ELEM_251(_) BOOST_PP_SEQ_ELEM_250 # define BOOST_PP_SEQ_ELEM_252(_) BOOST_PP_SEQ_ELEM_251 # define BOOST_PP_SEQ_ELEM_253(_) BOOST_PP_SEQ_ELEM_252 # define BOOST_PP_SEQ_ELEM_254(_) BOOST_PP_SEQ_ELEM_253 # define BOOST_PP_SEQ_ELEM_255(_) BOOST_PP_SEQ_ELEM_254 # # endif ================================================ FILE: benchmarks/boost/preprocessor/seq/enum.hpp ================================================ # /* ************************************************************************** # * * # * (C) Copyright Paul Mensonides 2002. # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # * * # ************************************************************************** */ # # /* See http://www.boost.org for most recent version. */ # # ifndef BOOST_PREPROCESSOR_SEQ_ENUM_HPP # define BOOST_PREPROCESSOR_SEQ_ENUM_HPP # # include # include # include # # /* BOOST_PP_SEQ_ENUM */ # # if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() # define BOOST_PP_SEQ_ENUM(seq) BOOST_PP_SEQ_ENUM_I(seq) # define BOOST_PP_SEQ_ENUM_I(seq) BOOST_PP_CAT(BOOST_PP_SEQ_ENUM_, BOOST_PP_SEQ_SIZE(seq)) seq # elif BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC() # define BOOST_PP_SEQ_ENUM(seq) BOOST_PP_SEQ_ENUM_I(BOOST_PP_SEQ_SIZE(seq), seq) # define BOOST_PP_SEQ_ENUM_I(size, seq) BOOST_PP_CAT(BOOST_PP_SEQ_ENUM_, size) seq # else # define BOOST_PP_SEQ_ENUM(seq) BOOST_PP_CAT(BOOST_PP_SEQ_ENUM_, BOOST_PP_SEQ_SIZE(seq)) seq # endif # # define BOOST_PP_SEQ_ENUM_1(x) x # define BOOST_PP_SEQ_ENUM_2(x) x, BOOST_PP_SEQ_ENUM_1 # define BOOST_PP_SEQ_ENUM_3(x) x, BOOST_PP_SEQ_ENUM_2 # define BOOST_PP_SEQ_ENUM_4(x) x, BOOST_PP_SEQ_ENUM_3 # define BOOST_PP_SEQ_ENUM_5(x) x, BOOST_PP_SEQ_ENUM_4 # define BOOST_PP_SEQ_ENUM_6(x) x, BOOST_PP_SEQ_ENUM_5 # define BOOST_PP_SEQ_ENUM_7(x) x, BOOST_PP_SEQ_ENUM_6 # define BOOST_PP_SEQ_ENUM_8(x) x, BOOST_PP_SEQ_ENUM_7 # define BOOST_PP_SEQ_ENUM_9(x) x, BOOST_PP_SEQ_ENUM_8 # define BOOST_PP_SEQ_ENUM_10(x) x, BOOST_PP_SEQ_ENUM_9 # define BOOST_PP_SEQ_ENUM_11(x) x, BOOST_PP_SEQ_ENUM_10 # define BOOST_PP_SEQ_ENUM_12(x) x, BOOST_PP_SEQ_ENUM_11 # define BOOST_PP_SEQ_ENUM_13(x) x, BOOST_PP_SEQ_ENUM_12 # define BOOST_PP_SEQ_ENUM_14(x) x, BOOST_PP_SEQ_ENUM_13 # define BOOST_PP_SEQ_ENUM_15(x) x, BOOST_PP_SEQ_ENUM_14 # define BOOST_PP_SEQ_ENUM_16(x) x, BOOST_PP_SEQ_ENUM_15 # define BOOST_PP_SEQ_ENUM_17(x) x, BOOST_PP_SEQ_ENUM_16 # define BOOST_PP_SEQ_ENUM_18(x) x, BOOST_PP_SEQ_ENUM_17 # define BOOST_PP_SEQ_ENUM_19(x) x, BOOST_PP_SEQ_ENUM_18 # define BOOST_PP_SEQ_ENUM_20(x) x, BOOST_PP_SEQ_ENUM_19 # define BOOST_PP_SEQ_ENUM_21(x) x, BOOST_PP_SEQ_ENUM_20 # define BOOST_PP_SEQ_ENUM_22(x) x, BOOST_PP_SEQ_ENUM_21 # define BOOST_PP_SEQ_ENUM_23(x) x, BOOST_PP_SEQ_ENUM_22 # define BOOST_PP_SEQ_ENUM_24(x) x, BOOST_PP_SEQ_ENUM_23 # define BOOST_PP_SEQ_ENUM_25(x) x, BOOST_PP_SEQ_ENUM_24 # define BOOST_PP_SEQ_ENUM_26(x) x, BOOST_PP_SEQ_ENUM_25 # define BOOST_PP_SEQ_ENUM_27(x) x, BOOST_PP_SEQ_ENUM_26 # define BOOST_PP_SEQ_ENUM_28(x) x, BOOST_PP_SEQ_ENUM_27 # define BOOST_PP_SEQ_ENUM_29(x) x, BOOST_PP_SEQ_ENUM_28 # define BOOST_PP_SEQ_ENUM_30(x) x, BOOST_PP_SEQ_ENUM_29 # define BOOST_PP_SEQ_ENUM_31(x) x, BOOST_PP_SEQ_ENUM_30 # define BOOST_PP_SEQ_ENUM_32(x) x, BOOST_PP_SEQ_ENUM_31 # define BOOST_PP_SEQ_ENUM_33(x) x, BOOST_PP_SEQ_ENUM_32 # define BOOST_PP_SEQ_ENUM_34(x) x, BOOST_PP_SEQ_ENUM_33 # define BOOST_PP_SEQ_ENUM_35(x) x, BOOST_PP_SEQ_ENUM_34 # define BOOST_PP_SEQ_ENUM_36(x) x, BOOST_PP_SEQ_ENUM_35 # define BOOST_PP_SEQ_ENUM_37(x) x, BOOST_PP_SEQ_ENUM_36 # define BOOST_PP_SEQ_ENUM_38(x) x, BOOST_PP_SEQ_ENUM_37 # define BOOST_PP_SEQ_ENUM_39(x) x, BOOST_PP_SEQ_ENUM_38 # define BOOST_PP_SEQ_ENUM_40(x) x, BOOST_PP_SEQ_ENUM_39 # define BOOST_PP_SEQ_ENUM_41(x) x, BOOST_PP_SEQ_ENUM_40 # define BOOST_PP_SEQ_ENUM_42(x) x, BOOST_PP_SEQ_ENUM_41 # define BOOST_PP_SEQ_ENUM_43(x) x, BOOST_PP_SEQ_ENUM_42 # define BOOST_PP_SEQ_ENUM_44(x) x, BOOST_PP_SEQ_ENUM_43 # define BOOST_PP_SEQ_ENUM_45(x) x, BOOST_PP_SEQ_ENUM_44 # define BOOST_PP_SEQ_ENUM_46(x) x, BOOST_PP_SEQ_ENUM_45 # define BOOST_PP_SEQ_ENUM_47(x) x, BOOST_PP_SEQ_ENUM_46 # define BOOST_PP_SEQ_ENUM_48(x) x, BOOST_PP_SEQ_ENUM_47 # define BOOST_PP_SEQ_ENUM_49(x) x, BOOST_PP_SEQ_ENUM_48 # define BOOST_PP_SEQ_ENUM_50(x) x, BOOST_PP_SEQ_ENUM_49 # define BOOST_PP_SEQ_ENUM_51(x) x, BOOST_PP_SEQ_ENUM_50 # define BOOST_PP_SEQ_ENUM_52(x) x, BOOST_PP_SEQ_ENUM_51 # define BOOST_PP_SEQ_ENUM_53(x) x, BOOST_PP_SEQ_ENUM_52 # define BOOST_PP_SEQ_ENUM_54(x) x, BOOST_PP_SEQ_ENUM_53 # define BOOST_PP_SEQ_ENUM_55(x) x, BOOST_PP_SEQ_ENUM_54 # define BOOST_PP_SEQ_ENUM_56(x) x, BOOST_PP_SEQ_ENUM_55 # define BOOST_PP_SEQ_ENUM_57(x) x, BOOST_PP_SEQ_ENUM_56 # define BOOST_PP_SEQ_ENUM_58(x) x, BOOST_PP_SEQ_ENUM_57 # define BOOST_PP_SEQ_ENUM_59(x) x, BOOST_PP_SEQ_ENUM_58 # define BOOST_PP_SEQ_ENUM_60(x) x, BOOST_PP_SEQ_ENUM_59 # define BOOST_PP_SEQ_ENUM_61(x) x, BOOST_PP_SEQ_ENUM_60 # define BOOST_PP_SEQ_ENUM_62(x) x, BOOST_PP_SEQ_ENUM_61 # define BOOST_PP_SEQ_ENUM_63(x) x, BOOST_PP_SEQ_ENUM_62 # define BOOST_PP_SEQ_ENUM_64(x) x, BOOST_PP_SEQ_ENUM_63 # define BOOST_PP_SEQ_ENUM_65(x) x, BOOST_PP_SEQ_ENUM_64 # define BOOST_PP_SEQ_ENUM_66(x) x, BOOST_PP_SEQ_ENUM_65 # define BOOST_PP_SEQ_ENUM_67(x) x, BOOST_PP_SEQ_ENUM_66 # define BOOST_PP_SEQ_ENUM_68(x) x, BOOST_PP_SEQ_ENUM_67 # define BOOST_PP_SEQ_ENUM_69(x) x, BOOST_PP_SEQ_ENUM_68 # define BOOST_PP_SEQ_ENUM_70(x) x, BOOST_PP_SEQ_ENUM_69 # define BOOST_PP_SEQ_ENUM_71(x) x, BOOST_PP_SEQ_ENUM_70 # define BOOST_PP_SEQ_ENUM_72(x) x, BOOST_PP_SEQ_ENUM_71 # define BOOST_PP_SEQ_ENUM_73(x) x, BOOST_PP_SEQ_ENUM_72 # define BOOST_PP_SEQ_ENUM_74(x) x, BOOST_PP_SEQ_ENUM_73 # define BOOST_PP_SEQ_ENUM_75(x) x, BOOST_PP_SEQ_ENUM_74 # define BOOST_PP_SEQ_ENUM_76(x) x, BOOST_PP_SEQ_ENUM_75 # define BOOST_PP_SEQ_ENUM_77(x) x, BOOST_PP_SEQ_ENUM_76 # define BOOST_PP_SEQ_ENUM_78(x) x, BOOST_PP_SEQ_ENUM_77 # define BOOST_PP_SEQ_ENUM_79(x) x, BOOST_PP_SEQ_ENUM_78 # define BOOST_PP_SEQ_ENUM_80(x) x, BOOST_PP_SEQ_ENUM_79 # define BOOST_PP_SEQ_ENUM_81(x) x, BOOST_PP_SEQ_ENUM_80 # define BOOST_PP_SEQ_ENUM_82(x) x, BOOST_PP_SEQ_ENUM_81 # define BOOST_PP_SEQ_ENUM_83(x) x, BOOST_PP_SEQ_ENUM_82 # define BOOST_PP_SEQ_ENUM_84(x) x, BOOST_PP_SEQ_ENUM_83 # define BOOST_PP_SEQ_ENUM_85(x) x, BOOST_PP_SEQ_ENUM_84 # define BOOST_PP_SEQ_ENUM_86(x) x, BOOST_PP_SEQ_ENUM_85 # define BOOST_PP_SEQ_ENUM_87(x) x, BOOST_PP_SEQ_ENUM_86 # define BOOST_PP_SEQ_ENUM_88(x) x, BOOST_PP_SEQ_ENUM_87 # define BOOST_PP_SEQ_ENUM_89(x) x, BOOST_PP_SEQ_ENUM_88 # define BOOST_PP_SEQ_ENUM_90(x) x, BOOST_PP_SEQ_ENUM_89 # define BOOST_PP_SEQ_ENUM_91(x) x, BOOST_PP_SEQ_ENUM_90 # define BOOST_PP_SEQ_ENUM_92(x) x, BOOST_PP_SEQ_ENUM_91 # define BOOST_PP_SEQ_ENUM_93(x) x, BOOST_PP_SEQ_ENUM_92 # define BOOST_PP_SEQ_ENUM_94(x) x, BOOST_PP_SEQ_ENUM_93 # define BOOST_PP_SEQ_ENUM_95(x) x, BOOST_PP_SEQ_ENUM_94 # define BOOST_PP_SEQ_ENUM_96(x) x, BOOST_PP_SEQ_ENUM_95 # define BOOST_PP_SEQ_ENUM_97(x) x, BOOST_PP_SEQ_ENUM_96 # define BOOST_PP_SEQ_ENUM_98(x) x, BOOST_PP_SEQ_ENUM_97 # define BOOST_PP_SEQ_ENUM_99(x) x, BOOST_PP_SEQ_ENUM_98 # define BOOST_PP_SEQ_ENUM_100(x) x, BOOST_PP_SEQ_ENUM_99 # define BOOST_PP_SEQ_ENUM_101(x) x, BOOST_PP_SEQ_ENUM_100 # define BOOST_PP_SEQ_ENUM_102(x) x, BOOST_PP_SEQ_ENUM_101 # define BOOST_PP_SEQ_ENUM_103(x) x, BOOST_PP_SEQ_ENUM_102 # define BOOST_PP_SEQ_ENUM_104(x) x, BOOST_PP_SEQ_ENUM_103 # define BOOST_PP_SEQ_ENUM_105(x) x, BOOST_PP_SEQ_ENUM_104 # define BOOST_PP_SEQ_ENUM_106(x) x, BOOST_PP_SEQ_ENUM_105 # define BOOST_PP_SEQ_ENUM_107(x) x, BOOST_PP_SEQ_ENUM_106 # define BOOST_PP_SEQ_ENUM_108(x) x, BOOST_PP_SEQ_ENUM_107 # define BOOST_PP_SEQ_ENUM_109(x) x, BOOST_PP_SEQ_ENUM_108 # define BOOST_PP_SEQ_ENUM_110(x) x, BOOST_PP_SEQ_ENUM_109 # define BOOST_PP_SEQ_ENUM_111(x) x, BOOST_PP_SEQ_ENUM_110 # define BOOST_PP_SEQ_ENUM_112(x) x, BOOST_PP_SEQ_ENUM_111 # define BOOST_PP_SEQ_ENUM_113(x) x, BOOST_PP_SEQ_ENUM_112 # define BOOST_PP_SEQ_ENUM_114(x) x, BOOST_PP_SEQ_ENUM_113 # define BOOST_PP_SEQ_ENUM_115(x) x, BOOST_PP_SEQ_ENUM_114 # define BOOST_PP_SEQ_ENUM_116(x) x, BOOST_PP_SEQ_ENUM_115 # define BOOST_PP_SEQ_ENUM_117(x) x, BOOST_PP_SEQ_ENUM_116 # define BOOST_PP_SEQ_ENUM_118(x) x, BOOST_PP_SEQ_ENUM_117 # define BOOST_PP_SEQ_ENUM_119(x) x, BOOST_PP_SEQ_ENUM_118 # define BOOST_PP_SEQ_ENUM_120(x) x, BOOST_PP_SEQ_ENUM_119 # define BOOST_PP_SEQ_ENUM_121(x) x, BOOST_PP_SEQ_ENUM_120 # define BOOST_PP_SEQ_ENUM_122(x) x, BOOST_PP_SEQ_ENUM_121 # define BOOST_PP_SEQ_ENUM_123(x) x, BOOST_PP_SEQ_ENUM_122 # define BOOST_PP_SEQ_ENUM_124(x) x, BOOST_PP_SEQ_ENUM_123 # define BOOST_PP_SEQ_ENUM_125(x) x, BOOST_PP_SEQ_ENUM_124 # define BOOST_PP_SEQ_ENUM_126(x) x, BOOST_PP_SEQ_ENUM_125 # define BOOST_PP_SEQ_ENUM_127(x) x, BOOST_PP_SEQ_ENUM_126 # define BOOST_PP_SEQ_ENUM_128(x) x, BOOST_PP_SEQ_ENUM_127 # define BOOST_PP_SEQ_ENUM_129(x) x, BOOST_PP_SEQ_ENUM_128 # define BOOST_PP_SEQ_ENUM_130(x) x, BOOST_PP_SEQ_ENUM_129 # define BOOST_PP_SEQ_ENUM_131(x) x, BOOST_PP_SEQ_ENUM_130 # define BOOST_PP_SEQ_ENUM_132(x) x, BOOST_PP_SEQ_ENUM_131 # define BOOST_PP_SEQ_ENUM_133(x) x, BOOST_PP_SEQ_ENUM_132 # define BOOST_PP_SEQ_ENUM_134(x) x, BOOST_PP_SEQ_ENUM_133 # define BOOST_PP_SEQ_ENUM_135(x) x, BOOST_PP_SEQ_ENUM_134 # define BOOST_PP_SEQ_ENUM_136(x) x, BOOST_PP_SEQ_ENUM_135 # define BOOST_PP_SEQ_ENUM_137(x) x, BOOST_PP_SEQ_ENUM_136 # define BOOST_PP_SEQ_ENUM_138(x) x, BOOST_PP_SEQ_ENUM_137 # define BOOST_PP_SEQ_ENUM_139(x) x, BOOST_PP_SEQ_ENUM_138 # define BOOST_PP_SEQ_ENUM_140(x) x, BOOST_PP_SEQ_ENUM_139 # define BOOST_PP_SEQ_ENUM_141(x) x, BOOST_PP_SEQ_ENUM_140 # define BOOST_PP_SEQ_ENUM_142(x) x, BOOST_PP_SEQ_ENUM_141 # define BOOST_PP_SEQ_ENUM_143(x) x, BOOST_PP_SEQ_ENUM_142 # define BOOST_PP_SEQ_ENUM_144(x) x, BOOST_PP_SEQ_ENUM_143 # define BOOST_PP_SEQ_ENUM_145(x) x, BOOST_PP_SEQ_ENUM_144 # define BOOST_PP_SEQ_ENUM_146(x) x, BOOST_PP_SEQ_ENUM_145 # define BOOST_PP_SEQ_ENUM_147(x) x, BOOST_PP_SEQ_ENUM_146 # define BOOST_PP_SEQ_ENUM_148(x) x, BOOST_PP_SEQ_ENUM_147 # define BOOST_PP_SEQ_ENUM_149(x) x, BOOST_PP_SEQ_ENUM_148 # define BOOST_PP_SEQ_ENUM_150(x) x, BOOST_PP_SEQ_ENUM_149 # define BOOST_PP_SEQ_ENUM_151(x) x, BOOST_PP_SEQ_ENUM_150 # define BOOST_PP_SEQ_ENUM_152(x) x, BOOST_PP_SEQ_ENUM_151 # define BOOST_PP_SEQ_ENUM_153(x) x, BOOST_PP_SEQ_ENUM_152 # define BOOST_PP_SEQ_ENUM_154(x) x, BOOST_PP_SEQ_ENUM_153 # define BOOST_PP_SEQ_ENUM_155(x) x, BOOST_PP_SEQ_ENUM_154 # define BOOST_PP_SEQ_ENUM_156(x) x, BOOST_PP_SEQ_ENUM_155 # define BOOST_PP_SEQ_ENUM_157(x) x, BOOST_PP_SEQ_ENUM_156 # define BOOST_PP_SEQ_ENUM_158(x) x, BOOST_PP_SEQ_ENUM_157 # define BOOST_PP_SEQ_ENUM_159(x) x, BOOST_PP_SEQ_ENUM_158 # define BOOST_PP_SEQ_ENUM_160(x) x, BOOST_PP_SEQ_ENUM_159 # define BOOST_PP_SEQ_ENUM_161(x) x, BOOST_PP_SEQ_ENUM_160 # define BOOST_PP_SEQ_ENUM_162(x) x, BOOST_PP_SEQ_ENUM_161 # define BOOST_PP_SEQ_ENUM_163(x) x, BOOST_PP_SEQ_ENUM_162 # define BOOST_PP_SEQ_ENUM_164(x) x, BOOST_PP_SEQ_ENUM_163 # define BOOST_PP_SEQ_ENUM_165(x) x, BOOST_PP_SEQ_ENUM_164 # define BOOST_PP_SEQ_ENUM_166(x) x, BOOST_PP_SEQ_ENUM_165 # define BOOST_PP_SEQ_ENUM_167(x) x, BOOST_PP_SEQ_ENUM_166 # define BOOST_PP_SEQ_ENUM_168(x) x, BOOST_PP_SEQ_ENUM_167 # define BOOST_PP_SEQ_ENUM_169(x) x, BOOST_PP_SEQ_ENUM_168 # define BOOST_PP_SEQ_ENUM_170(x) x, BOOST_PP_SEQ_ENUM_169 # define BOOST_PP_SEQ_ENUM_171(x) x, BOOST_PP_SEQ_ENUM_170 # define BOOST_PP_SEQ_ENUM_172(x) x, BOOST_PP_SEQ_ENUM_171 # define BOOST_PP_SEQ_ENUM_173(x) x, BOOST_PP_SEQ_ENUM_172 # define BOOST_PP_SEQ_ENUM_174(x) x, BOOST_PP_SEQ_ENUM_173 # define BOOST_PP_SEQ_ENUM_175(x) x, BOOST_PP_SEQ_ENUM_174 # define BOOST_PP_SEQ_ENUM_176(x) x, BOOST_PP_SEQ_ENUM_175 # define BOOST_PP_SEQ_ENUM_177(x) x, BOOST_PP_SEQ_ENUM_176 # define BOOST_PP_SEQ_ENUM_178(x) x, BOOST_PP_SEQ_ENUM_177 # define BOOST_PP_SEQ_ENUM_179(x) x, BOOST_PP_SEQ_ENUM_178 # define BOOST_PP_SEQ_ENUM_180(x) x, BOOST_PP_SEQ_ENUM_179 # define BOOST_PP_SEQ_ENUM_181(x) x, BOOST_PP_SEQ_ENUM_180 # define BOOST_PP_SEQ_ENUM_182(x) x, BOOST_PP_SEQ_ENUM_181 # define BOOST_PP_SEQ_ENUM_183(x) x, BOOST_PP_SEQ_ENUM_182 # define BOOST_PP_SEQ_ENUM_184(x) x, BOOST_PP_SEQ_ENUM_183 # define BOOST_PP_SEQ_ENUM_185(x) x, BOOST_PP_SEQ_ENUM_184 # define BOOST_PP_SEQ_ENUM_186(x) x, BOOST_PP_SEQ_ENUM_185 # define BOOST_PP_SEQ_ENUM_187(x) x, BOOST_PP_SEQ_ENUM_186 # define BOOST_PP_SEQ_ENUM_188(x) x, BOOST_PP_SEQ_ENUM_187 # define BOOST_PP_SEQ_ENUM_189(x) x, BOOST_PP_SEQ_ENUM_188 # define BOOST_PP_SEQ_ENUM_190(x) x, BOOST_PP_SEQ_ENUM_189 # define BOOST_PP_SEQ_ENUM_191(x) x, BOOST_PP_SEQ_ENUM_190 # define BOOST_PP_SEQ_ENUM_192(x) x, BOOST_PP_SEQ_ENUM_191 # define BOOST_PP_SEQ_ENUM_193(x) x, BOOST_PP_SEQ_ENUM_192 # define BOOST_PP_SEQ_ENUM_194(x) x, BOOST_PP_SEQ_ENUM_193 # define BOOST_PP_SEQ_ENUM_195(x) x, BOOST_PP_SEQ_ENUM_194 # define BOOST_PP_SEQ_ENUM_196(x) x, BOOST_PP_SEQ_ENUM_195 # define BOOST_PP_SEQ_ENUM_197(x) x, BOOST_PP_SEQ_ENUM_196 # define BOOST_PP_SEQ_ENUM_198(x) x, BOOST_PP_SEQ_ENUM_197 # define BOOST_PP_SEQ_ENUM_199(x) x, BOOST_PP_SEQ_ENUM_198 # define BOOST_PP_SEQ_ENUM_200(x) x, BOOST_PP_SEQ_ENUM_199 # define BOOST_PP_SEQ_ENUM_201(x) x, BOOST_PP_SEQ_ENUM_200 # define BOOST_PP_SEQ_ENUM_202(x) x, BOOST_PP_SEQ_ENUM_201 # define BOOST_PP_SEQ_ENUM_203(x) x, BOOST_PP_SEQ_ENUM_202 # define BOOST_PP_SEQ_ENUM_204(x) x, BOOST_PP_SEQ_ENUM_203 # define BOOST_PP_SEQ_ENUM_205(x) x, BOOST_PP_SEQ_ENUM_204 # define BOOST_PP_SEQ_ENUM_206(x) x, BOOST_PP_SEQ_ENUM_205 # define BOOST_PP_SEQ_ENUM_207(x) x, BOOST_PP_SEQ_ENUM_206 # define BOOST_PP_SEQ_ENUM_208(x) x, BOOST_PP_SEQ_ENUM_207 # define BOOST_PP_SEQ_ENUM_209(x) x, BOOST_PP_SEQ_ENUM_208 # define BOOST_PP_SEQ_ENUM_210(x) x, BOOST_PP_SEQ_ENUM_209 # define BOOST_PP_SEQ_ENUM_211(x) x, BOOST_PP_SEQ_ENUM_210 # define BOOST_PP_SEQ_ENUM_212(x) x, BOOST_PP_SEQ_ENUM_211 # define BOOST_PP_SEQ_ENUM_213(x) x, BOOST_PP_SEQ_ENUM_212 # define BOOST_PP_SEQ_ENUM_214(x) x, BOOST_PP_SEQ_ENUM_213 # define BOOST_PP_SEQ_ENUM_215(x) x, BOOST_PP_SEQ_ENUM_214 # define BOOST_PP_SEQ_ENUM_216(x) x, BOOST_PP_SEQ_ENUM_215 # define BOOST_PP_SEQ_ENUM_217(x) x, BOOST_PP_SEQ_ENUM_216 # define BOOST_PP_SEQ_ENUM_218(x) x, BOOST_PP_SEQ_ENUM_217 # define BOOST_PP_SEQ_ENUM_219(x) x, BOOST_PP_SEQ_ENUM_218 # define BOOST_PP_SEQ_ENUM_220(x) x, BOOST_PP_SEQ_ENUM_219 # define BOOST_PP_SEQ_ENUM_221(x) x, BOOST_PP_SEQ_ENUM_220 # define BOOST_PP_SEQ_ENUM_222(x) x, BOOST_PP_SEQ_ENUM_221 # define BOOST_PP_SEQ_ENUM_223(x) x, BOOST_PP_SEQ_ENUM_222 # define BOOST_PP_SEQ_ENUM_224(x) x, BOOST_PP_SEQ_ENUM_223 # define BOOST_PP_SEQ_ENUM_225(x) x, BOOST_PP_SEQ_ENUM_224 # define BOOST_PP_SEQ_ENUM_226(x) x, BOOST_PP_SEQ_ENUM_225 # define BOOST_PP_SEQ_ENUM_227(x) x, BOOST_PP_SEQ_ENUM_226 # define BOOST_PP_SEQ_ENUM_228(x) x, BOOST_PP_SEQ_ENUM_227 # define BOOST_PP_SEQ_ENUM_229(x) x, BOOST_PP_SEQ_ENUM_228 # define BOOST_PP_SEQ_ENUM_230(x) x, BOOST_PP_SEQ_ENUM_229 # define BOOST_PP_SEQ_ENUM_231(x) x, BOOST_PP_SEQ_ENUM_230 # define BOOST_PP_SEQ_ENUM_232(x) x, BOOST_PP_SEQ_ENUM_231 # define BOOST_PP_SEQ_ENUM_233(x) x, BOOST_PP_SEQ_ENUM_232 # define BOOST_PP_SEQ_ENUM_234(x) x, BOOST_PP_SEQ_ENUM_233 # define BOOST_PP_SEQ_ENUM_235(x) x, BOOST_PP_SEQ_ENUM_234 # define BOOST_PP_SEQ_ENUM_236(x) x, BOOST_PP_SEQ_ENUM_235 # define BOOST_PP_SEQ_ENUM_237(x) x, BOOST_PP_SEQ_ENUM_236 # define BOOST_PP_SEQ_ENUM_238(x) x, BOOST_PP_SEQ_ENUM_237 # define BOOST_PP_SEQ_ENUM_239(x) x, BOOST_PP_SEQ_ENUM_238 # define BOOST_PP_SEQ_ENUM_240(x) x, BOOST_PP_SEQ_ENUM_239 # define BOOST_PP_SEQ_ENUM_241(x) x, BOOST_PP_SEQ_ENUM_240 # define BOOST_PP_SEQ_ENUM_242(x) x, BOOST_PP_SEQ_ENUM_241 # define BOOST_PP_SEQ_ENUM_243(x) x, BOOST_PP_SEQ_ENUM_242 # define BOOST_PP_SEQ_ENUM_244(x) x, BOOST_PP_SEQ_ENUM_243 # define BOOST_PP_SEQ_ENUM_245(x) x, BOOST_PP_SEQ_ENUM_244 # define BOOST_PP_SEQ_ENUM_246(x) x, BOOST_PP_SEQ_ENUM_245 # define BOOST_PP_SEQ_ENUM_247(x) x, BOOST_PP_SEQ_ENUM_246 # define BOOST_PP_SEQ_ENUM_248(x) x, BOOST_PP_SEQ_ENUM_247 # define BOOST_PP_SEQ_ENUM_249(x) x, BOOST_PP_SEQ_ENUM_248 # define BOOST_PP_SEQ_ENUM_250(x) x, BOOST_PP_SEQ_ENUM_249 # define BOOST_PP_SEQ_ENUM_251(x) x, BOOST_PP_SEQ_ENUM_250 # define BOOST_PP_SEQ_ENUM_252(x) x, BOOST_PP_SEQ_ENUM_251 # define BOOST_PP_SEQ_ENUM_253(x) x, BOOST_PP_SEQ_ENUM_252 # define BOOST_PP_SEQ_ENUM_254(x) x, BOOST_PP_SEQ_ENUM_253 # define BOOST_PP_SEQ_ENUM_255(x) x, BOOST_PP_SEQ_ENUM_254 # define BOOST_PP_SEQ_ENUM_256(x) x, BOOST_PP_SEQ_ENUM_255 # # endif ================================================ FILE: benchmarks/boost/preprocessor/seq/first_n.hpp ================================================ # /* ************************************************************************** # * * # * (C) Copyright Paul Mensonides 2002. # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # * * # ************************************************************************** */ # # /* See http://www.boost.org for most recent version. */ # # ifndef BOOST_PREPROCESSOR_SEQ_FIRST_N_HPP # define BOOST_PREPROCESSOR_SEQ_FIRST_N_HPP # # include # include # include # include # include # # /* BOOST_PP_SEQ_FIRST_N */ # # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() # define BOOST_PP_SEQ_FIRST_N(n, seq) BOOST_PP_IF(n, BOOST_PP_TUPLE_ELEM, BOOST_PP_TUPLE_EAT_3)(2, 0, BOOST_PP_SEQ_SPLIT(n, seq (nil))) # else # define BOOST_PP_SEQ_FIRST_N(n, seq) BOOST_PP_SEQ_FIRST_N_I(n, seq) # define BOOST_PP_SEQ_FIRST_N_I(n, seq) BOOST_PP_IF(n, BOOST_PP_TUPLE_ELEM, BOOST_PP_TUPLE_EAT_3)(2, 0, BOOST_PP_SEQ_SPLIT(n, seq (nil))) # endif # # endif ================================================ FILE: benchmarks/boost/preprocessor/seq/fold_left.hpp ================================================ # /* ************************************************************************** # * * # * (C) Copyright Paul Mensonides 2002. # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # * * # ************************************************************************** */ # # /* See http://www.boost.org for most recent version. */ # # ifndef BOOST_PREPROCESSOR_SEQ_FOLD_LEFT_HPP # define BOOST_PREPROCESSOR_SEQ_FOLD_LEFT_HPP # # include # include # include # include # include # include # include # # /* BOOST_PP_SEQ_FOLD_LEFT */ # # if 0 # define BOOST_PP_SEQ_FOLD_LEFT(op, state, seq) ... # endif # # define BOOST_PP_SEQ_FOLD_LEFT BOOST_PP_CAT(BOOST_PP_SEQ_FOLD_LEFT_, BOOST_PP_AUTO_REC(BOOST_PP_SEQ_FOLD_LEFT_P, 256)) # define BOOST_PP_SEQ_FOLD_LEFT_P(n) BOOST_PP_CAT(BOOST_PP_SEQ_FOLD_LEFT_CHECK_, BOOST_PP_SEQ_FOLD_LEFT_I_ ## n(BOOST_PP_SEQ_FOLD_LEFT_O, BOOST_PP_NIL, (nil), 1)) # define BOOST_PP_SEQ_FOLD_LEFT_O(s, st, _) st # # define BOOST_PP_SEQ_FOLD_LEFT_257(op, st, ss) BOOST_PP_ERROR(0x0005) # define BOOST_PP_SEQ_FOLD_LEFT_I_257(op, st, ss, sz) BOOST_PP_ERROR(0x0005) # # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_NIL 1 # # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_1(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_2(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_3(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_4(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_5(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_6(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_7(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_8(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_9(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_10(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_11(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_12(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_13(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_14(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_15(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_16(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_17(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_18(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_19(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_20(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_21(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_22(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_23(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_24(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_25(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_26(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_27(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_28(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_29(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_30(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_31(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_32(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_33(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_34(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_35(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_36(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_37(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_38(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_39(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_40(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_41(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_42(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_43(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_44(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_45(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_46(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_47(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_48(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_49(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_50(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_51(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_52(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_53(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_54(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_55(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_56(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_57(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_58(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_59(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_60(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_61(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_62(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_63(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_64(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_65(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_66(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_67(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_68(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_69(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_70(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_71(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_72(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_73(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_74(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_75(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_76(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_77(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_78(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_79(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_80(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_81(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_82(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_83(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_84(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_85(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_86(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_87(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_88(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_89(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_90(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_91(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_92(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_93(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_94(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_95(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_96(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_97(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_98(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_99(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_100(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_101(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_102(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_103(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_104(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_105(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_106(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_107(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_108(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_109(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_110(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_111(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_112(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_113(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_114(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_115(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_116(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_117(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_118(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_119(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_120(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_121(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_122(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_123(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_124(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_125(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_126(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_127(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_128(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_129(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_130(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_131(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_132(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_133(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_134(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_135(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_136(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_137(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_138(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_139(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_140(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_141(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_142(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_143(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_144(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_145(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_146(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_147(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_148(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_149(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_150(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_151(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_152(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_153(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_154(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_155(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_156(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_157(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_158(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_159(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_160(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_161(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_162(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_163(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_164(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_165(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_166(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_167(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_168(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_169(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_170(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_171(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_172(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_173(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_174(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_175(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_176(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_177(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_178(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_179(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_180(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_181(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_182(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_183(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_184(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_185(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_186(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_187(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_188(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_189(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_190(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_191(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_192(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_193(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_194(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_195(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_196(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_197(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_198(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_199(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_200(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_201(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_202(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_203(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_204(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_205(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_206(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_207(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_208(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_209(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_210(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_211(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_212(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_213(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_214(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_215(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_216(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_217(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_218(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_219(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_220(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_221(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_222(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_223(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_224(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_225(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_226(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_227(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_228(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_229(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_230(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_231(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_232(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_233(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_234(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_235(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_236(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_237(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_238(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_239(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_240(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_241(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_242(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_243(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_244(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_245(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_246(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_247(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_248(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_249(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_250(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_251(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_252(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_253(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_254(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_255(op, st, ss, sz) 0 # define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_256(op, st, ss, sz) 0 # # define BOOST_PP_SEQ_FOLD_LEFT_F(op, st, ss, sz) st # # define BOOST_PP_SEQ_FOLD_LEFT_1(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_1(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_2(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_2(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_3(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_3(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_4(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_4(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_5(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_5(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_6(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_6(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_7(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_7(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_8(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_8(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_9(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_9(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_10(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_10(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_11(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_11(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_12(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_12(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_13(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_13(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_14(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_14(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_15(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_15(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_16(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_16(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_17(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_17(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_18(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_18(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_19(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_19(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_20(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_20(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_21(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_21(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_22(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_22(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_23(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_23(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_24(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_24(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_25(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_25(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_26(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_26(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_27(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_27(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_28(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_28(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_29(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_29(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_30(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_30(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_31(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_31(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_32(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_32(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_33(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_33(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_34(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_34(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_35(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_35(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_36(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_36(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_37(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_37(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_38(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_38(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_39(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_39(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_40(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_40(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_41(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_41(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_42(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_42(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_43(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_43(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_44(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_44(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_45(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_45(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_46(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_46(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_47(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_47(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_48(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_48(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_49(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_49(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_50(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_50(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_51(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_51(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_52(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_52(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_53(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_53(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_54(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_54(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_55(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_55(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_56(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_56(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_57(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_57(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_58(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_58(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_59(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_59(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_60(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_60(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_61(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_61(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_62(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_62(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_63(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_63(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_64(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_64(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_65(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_65(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_66(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_66(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_67(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_67(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_68(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_68(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_69(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_69(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_70(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_70(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_71(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_71(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_72(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_72(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_73(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_73(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_74(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_74(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_75(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_75(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_76(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_76(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_77(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_77(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_78(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_78(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_79(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_79(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_80(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_80(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_81(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_81(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_82(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_82(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_83(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_83(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_84(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_84(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_85(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_85(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_86(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_86(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_87(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_87(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_88(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_88(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_89(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_89(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_90(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_90(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_91(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_91(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_92(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_92(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_93(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_93(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_94(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_94(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_95(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_95(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_96(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_96(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_97(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_97(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_98(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_98(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_99(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_99(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_100(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_100(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_101(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_101(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_102(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_102(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_103(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_103(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_104(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_104(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_105(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_105(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_106(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_106(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_107(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_107(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_108(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_108(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_109(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_109(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_110(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_110(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_111(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_111(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_112(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_112(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_113(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_113(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_114(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_114(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_115(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_115(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_116(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_116(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_117(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_117(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_118(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_118(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_119(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_119(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_120(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_120(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_121(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_121(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_122(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_122(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_123(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_123(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_124(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_124(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_125(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_125(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_126(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_126(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_127(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_127(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_128(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_128(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_129(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_129(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_130(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_130(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_131(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_131(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_132(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_132(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_133(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_133(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_134(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_134(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_135(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_135(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_136(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_136(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_137(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_137(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_138(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_138(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_139(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_139(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_140(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_140(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_141(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_141(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_142(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_142(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_143(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_143(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_144(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_144(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_145(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_145(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_146(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_146(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_147(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_147(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_148(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_148(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_149(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_149(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_150(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_150(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_151(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_151(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_152(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_152(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_153(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_153(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_154(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_154(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_155(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_155(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_156(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_156(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_157(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_157(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_158(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_158(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_159(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_159(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_160(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_160(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_161(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_161(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_162(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_162(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_163(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_163(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_164(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_164(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_165(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_165(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_166(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_166(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_167(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_167(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_168(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_168(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_169(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_169(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_170(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_170(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_171(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_171(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_172(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_172(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_173(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_173(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_174(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_174(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_175(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_175(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_176(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_176(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_177(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_177(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_178(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_178(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_179(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_179(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_180(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_180(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_181(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_181(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_182(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_182(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_183(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_183(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_184(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_184(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_185(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_185(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_186(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_186(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_187(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_187(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_188(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_188(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_189(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_189(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_190(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_190(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_191(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_191(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_192(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_192(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_193(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_193(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_194(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_194(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_195(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_195(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_196(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_196(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_197(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_197(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_198(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_198(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_199(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_199(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_200(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_200(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_201(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_201(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_202(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_202(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_203(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_203(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_204(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_204(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_205(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_205(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_206(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_206(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_207(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_207(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_208(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_208(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_209(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_209(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_210(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_210(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_211(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_211(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_212(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_212(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_213(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_213(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_214(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_214(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_215(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_215(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_216(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_216(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_217(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_217(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_218(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_218(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_219(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_219(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_220(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_220(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_221(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_221(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_222(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_222(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_223(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_223(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_224(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_224(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_225(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_225(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_226(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_226(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_227(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_227(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_228(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_228(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_229(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_229(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_230(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_230(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_231(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_231(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_232(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_232(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_233(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_233(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_234(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_234(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_235(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_235(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_236(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_236(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_237(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_237(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_238(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_238(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_239(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_239(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_240(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_240(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_241(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_241(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_242(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_242(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_243(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_243(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_244(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_244(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_245(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_245(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_246(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_246(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_247(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_247(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_248(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_248(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_249(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_249(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_250(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_250(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_251(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_251(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_252(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_252(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_253(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_253(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_254(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_254(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_255(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_255(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # define BOOST_PP_SEQ_FOLD_LEFT_256(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_256(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) # # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_DMC() # define BOOST_PP_SEQ_FOLD_LEFT_I_1(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_2, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(2, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_2(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_3, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(3, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_3(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_4, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(4, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_4(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_5, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(5, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_5(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_6, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(6, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_6(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_7, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(7, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_7(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_8, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(8, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_8(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_9, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(9, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_9(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_10, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(10, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_10(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_11, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(11, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_11(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_12, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(12, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_12(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_13, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(13, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_13(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_14, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(14, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_14(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_15, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(15, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_15(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_16, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(16, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_16(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_17, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(17, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_17(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_18, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(18, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_18(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_19, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(19, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_19(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_20, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(20, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_20(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_21, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(21, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_21(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_22, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(22, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_22(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_23, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(23, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_23(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_24, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(24, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_24(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_25, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(25, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_25(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_26, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(26, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_26(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_27, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(27, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_27(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_28, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(28, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_28(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_29, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(29, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_29(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_30, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(30, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_30(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_31, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(31, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_31(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_32, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(32, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_32(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_33, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(33, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_33(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_34, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(34, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_34(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_35, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(35, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_35(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_36, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(36, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_36(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_37, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(37, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_37(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_38, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(38, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_38(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_39, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(39, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_39(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_40, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(40, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_40(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_41, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(41, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_41(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_42, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(42, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_42(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_43, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(43, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_43(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_44, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(44, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_44(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_45, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(45, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_45(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_46, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(46, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_46(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_47, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(47, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_47(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_48, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(48, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_48(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_49, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(49, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_49(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_50, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(50, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_50(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_51, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(51, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_51(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_52, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(52, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_52(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_53, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(53, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_53(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_54, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(54, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_54(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_55, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(55, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_55(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_56, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(56, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_56(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_57, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(57, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_57(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_58, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(58, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_58(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_59, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(59, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_59(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_60, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(60, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_60(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_61, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(61, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_61(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_62, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(62, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_62(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_63, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(63, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_63(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_64, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(64, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_64(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_65, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(65, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_65(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_66, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(66, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_66(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_67, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(67, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_67(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_68, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(68, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_68(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_69, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(69, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_69(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_70, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(70, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_70(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_71, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(71, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_71(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_72, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(72, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_72(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_73, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(73, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_73(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_74, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(74, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_74(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_75, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(75, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_75(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_76, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(76, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_76(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_77, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(77, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_77(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_78, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(78, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_78(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_79, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(79, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_79(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_80, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(80, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_80(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_81, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(81, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_81(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_82, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(82, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_82(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_83, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(83, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_83(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_84, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(84, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_84(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_85, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(85, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_85(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_86, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(86, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_86(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_87, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(87, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_87(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_88, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(88, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_88(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_89, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(89, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_89(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_90, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(90, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_90(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_91, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(91, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_91(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_92, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(92, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_92(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_93, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(93, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_93(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_94, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(94, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_94(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_95, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(95, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_95(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_96, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(96, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_96(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_97, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(97, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_97(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_98, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(98, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_98(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_99, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(99, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_99(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_100, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(100, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_100(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_101, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(101, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_101(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_102, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(102, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_102(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_103, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(103, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_103(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_104, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(104, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_104(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_105, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(105, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_105(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_106, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(106, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_106(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_107, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(107, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_107(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_108, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(108, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_108(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_109, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(109, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_109(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_110, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(110, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_110(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_111, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(111, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_111(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_112, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(112, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_112(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_113, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(113, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_113(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_114, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(114, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_114(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_115, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(115, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_115(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_116, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(116, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_116(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_117, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(117, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_117(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_118, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(118, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_118(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_119, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(119, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_119(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_120, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(120, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_120(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_121, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(121, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_121(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_122, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(122, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_122(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_123, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(123, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_123(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_124, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(124, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_124(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_125, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(125, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_125(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_126, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(126, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_126(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_127, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(127, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_127(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_128, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(128, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_128(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_129, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(129, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_129(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_130, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(130, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_130(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_131, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(131, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_131(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_132, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(132, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_132(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_133, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(133, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_133(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_134, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(134, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_134(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_135, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(135, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_135(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_136, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(136, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_136(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_137, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(137, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_137(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_138, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(138, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_138(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_139, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(139, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_139(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_140, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(140, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_140(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_141, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(141, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_141(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_142, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(142, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_142(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_143, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(143, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_143(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_144, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(144, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_144(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_145, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(145, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_145(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_146, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(146, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_146(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_147, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(147, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_147(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_148, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(148, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_148(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_149, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(149, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_149(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_150, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(150, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_150(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_151, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(151, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_151(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_152, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(152, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_152(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_153, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(153, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_153(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_154, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(154, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_154(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_155, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(155, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_155(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_156, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(156, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_156(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_157, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(157, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_157(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_158, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(158, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_158(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_159, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(159, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_159(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_160, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(160, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_160(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_161, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(161, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_161(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_162, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(162, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_162(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_163, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(163, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_163(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_164, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(164, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_164(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_165, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(165, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_165(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_166, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(166, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_166(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_167, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(167, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_167(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_168, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(168, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_168(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_169, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(169, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_169(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_170, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(170, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_170(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_171, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(171, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_171(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_172, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(172, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_172(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_173, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(173, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_173(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_174, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(174, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_174(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_175, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(175, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_175(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_176, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(176, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_176(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_177, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(177, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_177(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_178, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(178, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_178(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_179, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(179, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_179(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_180, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(180, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_180(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_181, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(181, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_181(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_182, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(182, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_182(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_183, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(183, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_183(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_184, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(184, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_184(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_185, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(185, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_185(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_186, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(186, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_186(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_187, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(187, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_187(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_188, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(188, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_188(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_189, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(189, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_189(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_190, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(190, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_190(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_191, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(191, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_191(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_192, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(192, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_192(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_193, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(193, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_193(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_194, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(194, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_194(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_195, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(195, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_195(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_196, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(196, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_196(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_197, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(197, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_197(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_198, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(198, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_198(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_199, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(199, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_199(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_200, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(200, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_200(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_201, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(201, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_201(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_202, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(202, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_202(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_203, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(203, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_203(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_204, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(204, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_204(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_205, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(205, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_205(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_206, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(206, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_206(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_207, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(207, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_207(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_208, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(208, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_208(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_209, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(209, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_209(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_210, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(210, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_210(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_211, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(211, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_211(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_212, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(212, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_212(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_213, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(213, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_213(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_214, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(214, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_214(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_215, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(215, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_215(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_216, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(216, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_216(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_217, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(217, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_217(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_218, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(218, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_218(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_219, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(219, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_219(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_220, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(220, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_220(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_221, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(221, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_221(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_222, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(222, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_222(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_223, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(223, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_223(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_224, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(224, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_224(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_225, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(225, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_225(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_226, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(226, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_226(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_227, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(227, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_227(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_228, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(228, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_228(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_229, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(229, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_229(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_230, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(230, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_230(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_231, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(231, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_231(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_232, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(232, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_232(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_233, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(233, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_233(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_234, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(234, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_234(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_235, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(235, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_235(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_236, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(236, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_236(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_237, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(237, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_237(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_238, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(238, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_238(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_239, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(239, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_239(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_240, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(240, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_240(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_241, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(241, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_241(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_242, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(242, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_242(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_243, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(243, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_243(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_244, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(244, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_244(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_245, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(245, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_245(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_246, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(246, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_246(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_247, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(247, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_247(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_248, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(248, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_248(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_249, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(249, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_249(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_250, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(250, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_250(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_251, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(251, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_251(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_252, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(252, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_252(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_253, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(253, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_253(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_254, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(254, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_254(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_255, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(255, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_255(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_256, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(256, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_256(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_257, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(257, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # else # define BOOST_PP_SEQ_FOLD_LEFT_I_1(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_2, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(2, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_2(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_3, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(3, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_3(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_4, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(4, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_4(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_5, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(5, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_5(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_6, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(6, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_6(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_7, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(7, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_7(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_8, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(8, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_8(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_9, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(9, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_9(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_10, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(10, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_10(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_11, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(11, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_11(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_12, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(12, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_12(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_13, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(13, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_13(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_14, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(14, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_14(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_15, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(15, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_15(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_16, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(16, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_16(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_17, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(17, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_17(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_18, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(18, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_18(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_19, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(19, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_19(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_20, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(20, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_20(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_21, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(21, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_21(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_22, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(22, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_22(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_23, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(23, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_23(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_24, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(24, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_24(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_25, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(25, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_25(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_26, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(26, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_26(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_27, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(27, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_27(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_28, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(28, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_28(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_29, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(29, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_29(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_30, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(30, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_30(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_31, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(31, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_31(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_32, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(32, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_32(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_33, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(33, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_33(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_34, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(34, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_34(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_35, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(35, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_35(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_36, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(36, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_36(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_37, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(37, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_37(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_38, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(38, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_38(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_39, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(39, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_39(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_40, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(40, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_40(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_41, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(41, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_41(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_42, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(42, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_42(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_43, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(43, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_43(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_44, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(44, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_44(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_45, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(45, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_45(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_46, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(46, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_46(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_47, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(47, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_47(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_48, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(48, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_48(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_49, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(49, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_49(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_50, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(50, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_50(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_51, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(51, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_51(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_52, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(52, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_52(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_53, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(53, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_53(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_54, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(54, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_54(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_55, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(55, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_55(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_56, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(56, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_56(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_57, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(57, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_57(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_58, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(58, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_58(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_59, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(59, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_59(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_60, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(60, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_60(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_61, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(61, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_61(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_62, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(62, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_62(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_63, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(63, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_63(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_64, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(64, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_64(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_65, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(65, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_65(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_66, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(66, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_66(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_67, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(67, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_67(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_68, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(68, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_68(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_69, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(69, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_69(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_70, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(70, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_70(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_71, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(71, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_71(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_72, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(72, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_72(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_73, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(73, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_73(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_74, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(74, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_74(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_75, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(75, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_75(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_76, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(76, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_76(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_77, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(77, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_77(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_78, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(78, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_78(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_79, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(79, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_79(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_80, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(80, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_80(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_81, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(81, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_81(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_82, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(82, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_82(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_83, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(83, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_83(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_84, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(84, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_84(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_85, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(85, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_85(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_86, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(86, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_86(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_87, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(87, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_87(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_88, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(88, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_88(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_89, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(89, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_89(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_90, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(90, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_90(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_91, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(91, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_91(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_92, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(92, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_92(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_93, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(93, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_93(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_94, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(94, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_94(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_95, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(95, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_95(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_96, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(96, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_96(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_97, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(97, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_97(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_98, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(98, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_98(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_99, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(99, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_99(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_100, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(100, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_100(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_101, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(101, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_101(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_102, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(102, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_102(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_103, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(103, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_103(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_104, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(104, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_104(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_105, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(105, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_105(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_106, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(106, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_106(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_107, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(107, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_107(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_108, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(108, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_108(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_109, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(109, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_109(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_110, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(110, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_110(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_111, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(111, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_111(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_112, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(112, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_112(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_113, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(113, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_113(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_114, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(114, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_114(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_115, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(115, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_115(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_116, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(116, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_116(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_117, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(117, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_117(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_118, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(118, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_118(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_119, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(119, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_119(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_120, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(120, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_120(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_121, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(121, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_121(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_122, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(122, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_122(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_123, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(123, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_123(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_124, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(124, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_124(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_125, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(125, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_125(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_126, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(126, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_126(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_127, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(127, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_127(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_128, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(128, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_128(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_129, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(129, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_129(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_130, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(130, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_130(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_131, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(131, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_131(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_132, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(132, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_132(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_133, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(133, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_133(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_134, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(134, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_134(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_135, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(135, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_135(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_136, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(136, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_136(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_137, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(137, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_137(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_138, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(138, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_138(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_139, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(139, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_139(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_140, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(140, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_140(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_141, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(141, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_141(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_142, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(142, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_142(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_143, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(143, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_143(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_144, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(144, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_144(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_145, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(145, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_145(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_146, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(146, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_146(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_147, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(147, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_147(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_148, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(148, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_148(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_149, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(149, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_149(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_150, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(150, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_150(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_151, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(151, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_151(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_152, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(152, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_152(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_153, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(153, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_153(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_154, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(154, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_154(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_155, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(155, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_155(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_156, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(156, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_156(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_157, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(157, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_157(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_158, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(158, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_158(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_159, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(159, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_159(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_160, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(160, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_160(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_161, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(161, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_161(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_162, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(162, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_162(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_163, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(163, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_163(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_164, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(164, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_164(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_165, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(165, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_165(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_166, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(166, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_166(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_167, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(167, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_167(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_168, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(168, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_168(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_169, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(169, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_169(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_170, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(170, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_170(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_171, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(171, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_171(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_172, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(172, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_172(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_173, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(173, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_173(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_174, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(174, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_174(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_175, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(175, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_175(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_176, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(176, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_176(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_177, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(177, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_177(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_178, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(178, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_178(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_179, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(179, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_179(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_180, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(180, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_180(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_181, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(181, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_181(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_182, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(182, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_182(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_183, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(183, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_183(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_184, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(184, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_184(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_185, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(185, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_185(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_186, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(186, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_186(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_187, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(187, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_187(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_188, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(188, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_188(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_189, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(189, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_189(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_190, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(190, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_190(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_191, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(191, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_191(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_192, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(192, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_192(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_193, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(193, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_193(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_194, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(194, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_194(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_195, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(195, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_195(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_196, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(196, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_196(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_197, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(197, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_197(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_198, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(198, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_198(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_199, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(199, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_199(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_200, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(200, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_200(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_201, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(201, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_201(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_202, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(202, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_202(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_203, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(203, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_203(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_204, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(204, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_204(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_205, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(205, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_205(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_206, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(206, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_206(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_207, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(207, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_207(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_208, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(208, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_208(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_209, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(209, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_209(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_210, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(210, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_210(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_211, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(211, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_211(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_212, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(212, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_212(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_213, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(213, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_213(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_214, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(214, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_214(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_215, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(215, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_215(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_216, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(216, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_216(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_217, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(217, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_217(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_218, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(218, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_218(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_219, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(219, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_219(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_220, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(220, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_220(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_221, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(221, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_221(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_222, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(222, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_222(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_223, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(223, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_223(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_224, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(224, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_224(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_225, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(225, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_225(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_226, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(226, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_226(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_227, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(227, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_227(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_228, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(228, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_228(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_229, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(229, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_229(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_230, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(230, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_230(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_231, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(231, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_231(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_232, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(232, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_232(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_233, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(233, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_233(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_234, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(234, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_234(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_235, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(235, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_235(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_236, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(236, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_236(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_237, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(237, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_237(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_238, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(238, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_238(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_239, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(239, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_239(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_240, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(240, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_240(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_241, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(241, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_241(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_242, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(242, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_242(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_243, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(243, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_243(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_244, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(244, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_244(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_245, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(245, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_245(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_246, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(246, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_246(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_247, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(247, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_247(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_248, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(248, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_248(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_249, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(249, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_249(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_250, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(250, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_250(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_251, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(251, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_251(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_252, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(252, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_252(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_253, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(253, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_253(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_254, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(254, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_254(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_255, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(255, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_255(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_256, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(256, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # define BOOST_PP_SEQ_FOLD_LEFT_I_256(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_257, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(257, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) # endif # # endif ================================================ FILE: benchmarks/boost/preprocessor/seq/for_each.hpp ================================================ # /* ************************************************************************** # * * # * (C) Copyright Paul Mensonides 2002. # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # * * # ************************************************************************** */ # # /* See http://www.boost.org for most recent version. */ # # ifndef BOOST_PREPROCESSOR_SEQ_FOR_EACH_HPP # define BOOST_PREPROCESSOR_SEQ_FOR_EACH_HPP # # include # include # include # include # include # include # include # include # include # include # # /* BOOST_PP_SEQ_FOR_EACH */ # # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() # define BOOST_PP_SEQ_FOR_EACH(macro, data, seq) BOOST_PP_SEQ_FOR_EACH_DETAIL_CHECK(macro, data, seq) # else # define BOOST_PP_SEQ_FOR_EACH(macro, data, seq) BOOST_PP_SEQ_FOR_EACH_D(macro, data, seq) # define BOOST_PP_SEQ_FOR_EACH_D(macro, data, seq) BOOST_PP_SEQ_FOR_EACH_DETAIL_CHECK(macro, data, seq) # endif # # define BOOST_PP_SEQ_FOR_EACH_DETAIL_CHECK_EXEC(macro, data, seq) BOOST_PP_FOR((macro, data, seq, BOOST_PP_SEQ_SIZE(seq)), BOOST_PP_SEQ_FOR_EACH_P, BOOST_PP_SEQ_FOR_EACH_O, BOOST_PP_SEQ_FOR_EACH_M) # define BOOST_PP_SEQ_FOR_EACH_DETAIL_CHECK_EMPTY(macro, data, seq) # # define BOOST_PP_SEQ_FOR_EACH_DETAIL_CHECK(macro, data, seq) \ BOOST_PP_IIF \ ( \ BOOST_PP_SEQ_DETAIL_IS_NOT_EMPTY(seq), \ BOOST_PP_SEQ_FOR_EACH_DETAIL_CHECK_EXEC, \ BOOST_PP_SEQ_FOR_EACH_DETAIL_CHECK_EMPTY \ ) \ (macro, data, seq) \ /**/ # # define BOOST_PP_SEQ_FOR_EACH_P(r, x) BOOST_PP_TUPLE_ELEM(4, 3, x) # # if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_STRICT() # define BOOST_PP_SEQ_FOR_EACH_O(r, x) BOOST_PP_SEQ_FOR_EACH_O_I x # else # define BOOST_PP_SEQ_FOR_EACH_O(r, x) BOOST_PP_SEQ_FOR_EACH_O_I(BOOST_PP_TUPLE_ELEM(4, 0, x), BOOST_PP_TUPLE_ELEM(4, 1, x), BOOST_PP_TUPLE_ELEM(4, 2, x), BOOST_PP_TUPLE_ELEM(4, 3, x)) # endif # # define BOOST_PP_SEQ_FOR_EACH_O_I(macro, data, seq, sz) \ BOOST_PP_SEQ_FOR_EACH_O_I_DEC(macro, data, seq, BOOST_PP_DEC(sz)) \ /**/ # define BOOST_PP_SEQ_FOR_EACH_O_I_DEC(macro, data, seq, sz) \ ( \ macro, \ data, \ BOOST_PP_IF \ ( \ sz, \ BOOST_PP_SEQ_FOR_EACH_O_I_TAIL, \ BOOST_PP_SEQ_FOR_EACH_O_I_NIL \ ) \ (seq), \ sz \ ) \ /**/ # define BOOST_PP_SEQ_FOR_EACH_O_I_TAIL(seq) BOOST_PP_SEQ_TAIL(seq) # define BOOST_PP_SEQ_FOR_EACH_O_I_NIL(seq) BOOST_PP_NIL # # if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_STRICT() # define BOOST_PP_SEQ_FOR_EACH_M(r, x) BOOST_PP_SEQ_FOR_EACH_M_IM(r, BOOST_PP_TUPLE_REM_4 x) # define BOOST_PP_SEQ_FOR_EACH_M_IM(r, im) BOOST_PP_SEQ_FOR_EACH_M_I(r, im) # else # define BOOST_PP_SEQ_FOR_EACH_M(r, x) BOOST_PP_SEQ_FOR_EACH_M_I(r, BOOST_PP_TUPLE_ELEM(4, 0, x), BOOST_PP_TUPLE_ELEM(4, 1, x), BOOST_PP_TUPLE_ELEM(4, 2, x), BOOST_PP_TUPLE_ELEM(4, 3, x)) # endif # # define BOOST_PP_SEQ_FOR_EACH_M_I(r, macro, data, seq, sz) macro(r, data, BOOST_PP_SEQ_HEAD(seq)) # # /* BOOST_PP_SEQ_FOR_EACH_R */ # # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() # define BOOST_PP_SEQ_FOR_EACH_R(r, macro, data, seq) BOOST_PP_SEQ_FOR_EACH_DETAIL_CHECK_R(r, macro, data, seq) # else # define BOOST_PP_SEQ_FOR_EACH_R(r, macro, data, seq) BOOST_PP_SEQ_FOR_EACH_R_I(r, macro, data, seq) # define BOOST_PP_SEQ_FOR_EACH_R_I(r, macro, data, seq) BOOST_PP_SEQ_FOR_EACH_DETAIL_CHECK_R(r, macro, data, seq) # endif # # define BOOST_PP_SEQ_FOR_EACH_DETAIL_CHECK_EXEC_R(r, macro, data, seq) BOOST_PP_FOR_ ## r((macro, data, seq, BOOST_PP_SEQ_SIZE(seq)), BOOST_PP_SEQ_FOR_EACH_P, BOOST_PP_SEQ_FOR_EACH_O, BOOST_PP_SEQ_FOR_EACH_M) # define BOOST_PP_SEQ_FOR_EACH_DETAIL_CHECK_EMPTY_R(r, macro, data, seq) # # define BOOST_PP_SEQ_FOR_EACH_DETAIL_CHECK_R(r, macro, data, seq) \ BOOST_PP_IIF \ ( \ BOOST_PP_SEQ_DETAIL_IS_NOT_EMPTY(seq), \ BOOST_PP_SEQ_FOR_EACH_DETAIL_CHECK_EXEC_R, \ BOOST_PP_SEQ_FOR_EACH_DETAIL_CHECK_EMPTY_R \ ) \ (r, macro, data, seq) \ /**/ # # endif ================================================ FILE: benchmarks/boost/preprocessor/seq/for_each_i.hpp ================================================ # /* ************************************************************************** # * * # * (C) Copyright Paul Mensonides 2002. # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # * * # ************************************************************************** */ # # /* See http://www.boost.org for most recent version. */ # # ifndef BOOST_PREPROCESSOR_SEQ_FOR_EACH_I_HPP # define BOOST_PREPROCESSOR_SEQ_FOR_EACH_I_HPP # # include # include # include # include # include # include # include # include # include # include # include # # /* BOOST_PP_SEQ_FOR_EACH_I */ # # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() # define BOOST_PP_SEQ_FOR_EACH_I(macro, data, seq) BOOST_PP_SEQ_FOR_EACH_I_DETAIL_CHECK(macro, data, seq) # else # define BOOST_PP_SEQ_FOR_EACH_I(macro, data, seq) BOOST_PP_SEQ_FOR_EACH_I_I(macro, data, seq) # define BOOST_PP_SEQ_FOR_EACH_I_I(macro, data, seq) BOOST_PP_SEQ_FOR_EACH_I_DETAIL_CHECK(macro, data, seq) # endif # # define BOOST_PP_SEQ_FOR_EACH_I_DETAIL_CHECK_EXEC(macro, data, seq) BOOST_PP_FOR((macro, data, seq, 0, BOOST_PP_SEQ_SIZE(seq)), BOOST_PP_SEQ_FOR_EACH_I_P, BOOST_PP_SEQ_FOR_EACH_I_O, BOOST_PP_SEQ_FOR_EACH_I_M) # define BOOST_PP_SEQ_FOR_EACH_I_DETAIL_CHECK_EMPTY(macro, data, seq) # # define BOOST_PP_SEQ_FOR_EACH_I_DETAIL_CHECK(macro, data, seq) \ BOOST_PP_IIF \ ( \ BOOST_PP_SEQ_DETAIL_IS_NOT_EMPTY(seq), \ BOOST_PP_SEQ_FOR_EACH_I_DETAIL_CHECK_EXEC, \ BOOST_PP_SEQ_FOR_EACH_I_DETAIL_CHECK_EMPTY \ ) \ (macro, data, seq) \ /**/ # # define BOOST_PP_SEQ_FOR_EACH_I_P(r, x) BOOST_PP_TUPLE_ELEM(5, 4, x) # # if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_STRICT() # define BOOST_PP_SEQ_FOR_EACH_I_O(r, x) BOOST_PP_SEQ_FOR_EACH_I_O_I x # else # define BOOST_PP_SEQ_FOR_EACH_I_O(r, x) BOOST_PP_SEQ_FOR_EACH_I_O_I(BOOST_PP_TUPLE_ELEM(5, 0, x), BOOST_PP_TUPLE_ELEM(5, 1, x), BOOST_PP_TUPLE_ELEM(5, 2, x), BOOST_PP_TUPLE_ELEM(5, 3, x), BOOST_PP_TUPLE_ELEM(5, 4, x)) # endif # # define BOOST_PP_SEQ_FOR_EACH_I_O_I(macro, data, seq, i, sz) \ BOOST_PP_SEQ_FOR_EACH_I_O_I_DEC(macro, data, seq, i, BOOST_PP_DEC(sz)) \ /**/ # define BOOST_PP_SEQ_FOR_EACH_I_O_I_DEC(macro, data, seq, i, sz) \ ( \ macro, \ data, \ BOOST_PP_IF \ ( \ sz, \ BOOST_PP_SEQ_FOR_EACH_I_O_I_TAIL, \ BOOST_PP_SEQ_FOR_EACH_I_O_I_NIL \ ) \ (seq), \ BOOST_PP_INC(i), \ sz \ ) \ /**/ # define BOOST_PP_SEQ_FOR_EACH_I_O_I_TAIL(seq) BOOST_PP_SEQ_TAIL(seq) # define BOOST_PP_SEQ_FOR_EACH_I_O_I_NIL(seq) BOOST_PP_NIL # # if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_STRICT() # define BOOST_PP_SEQ_FOR_EACH_I_M(r, x) BOOST_PP_SEQ_FOR_EACH_I_M_IM(r, BOOST_PP_TUPLE_REM_5 x) # define BOOST_PP_SEQ_FOR_EACH_I_M_IM(r, im) BOOST_PP_SEQ_FOR_EACH_I_M_I(r, im) # else # define BOOST_PP_SEQ_FOR_EACH_I_M(r, x) BOOST_PP_SEQ_FOR_EACH_I_M_I(r, BOOST_PP_TUPLE_ELEM(5, 0, x), BOOST_PP_TUPLE_ELEM(5, 1, x), BOOST_PP_TUPLE_ELEM(5, 2, x), BOOST_PP_TUPLE_ELEM(5, 3, x), BOOST_PP_TUPLE_ELEM(5, 4, x)) # endif # # define BOOST_PP_SEQ_FOR_EACH_I_M_I(r, macro, data, seq, i, sz) macro(r, data, i, BOOST_PP_SEQ_HEAD(seq)) # # /* BOOST_PP_SEQ_FOR_EACH_I_R */ # # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() # define BOOST_PP_SEQ_FOR_EACH_I_R(r, macro, data, seq) BOOST_PP_SEQ_FOR_EACH_I_R_DETAIL_CHECK(r, macro, data, seq) # else # define BOOST_PP_SEQ_FOR_EACH_I_R(r, macro, data, seq) BOOST_PP_SEQ_FOR_EACH_I_R_I(r, macro, data, seq) # define BOOST_PP_SEQ_FOR_EACH_I_R_I(r, macro, data, seq) BOOST_PP_SEQ_FOR_EACH_I_R_DETAIL_CHECK(r, macro, data, seq) # endif # # define BOOST_PP_SEQ_FOR_EACH_I_R_DETAIL_CHECK_EXEC(r, macro, data, seq) BOOST_PP_FOR_ ## r((macro, data, seq, 0, BOOST_PP_SEQ_SIZE(seq)), BOOST_PP_SEQ_FOR_EACH_I_P, BOOST_PP_SEQ_FOR_EACH_I_O, BOOST_PP_SEQ_FOR_EACH_I_M) # define BOOST_PP_SEQ_FOR_EACH_I_R_DETAIL_CHECK_EMPTY(r, macro, data, seq) # # define BOOST_PP_SEQ_FOR_EACH_I_R_DETAIL_CHECK(r, macro, data, seq) \ BOOST_PP_IIF \ ( \ BOOST_PP_SEQ_DETAIL_IS_NOT_EMPTY(seq), \ BOOST_PP_SEQ_FOR_EACH_I_R_DETAIL_CHECK_EXEC, \ BOOST_PP_SEQ_FOR_EACH_I_R_DETAIL_CHECK_EMPTY \ ) \ (r, macro, data, seq) \ /**/ # # endif ================================================ FILE: benchmarks/boost/preprocessor/seq/for_each_product.hpp ================================================ # /* ************************************************************************** # * * # * (C) Copyright Paul Mensonides 2002. # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # * * # ************************************************************************** */ # # /* See http://www.boost.org for most recent version. */ # # ifndef BOOST_PREPROCESSOR_SEQ_FOR_EACH_PRODUCT_HPP # define BOOST_PREPROCESSOR_SEQ_FOR_EACH_PRODUCT_HPP # # include # include # include # include # include # include # include # include # # /* BOOST_PP_SEQ_FOR_EACH_PRODUCT */ # # define BOOST_PP_SEQ_FOR_EACH_PRODUCT(macro, sets) BOOST_PP_SEQ_FOR_EACH_PRODUCT_E(BOOST_PP_FOR, macro, sets) # # /* BOOST_PP_SEQ_FOR_EACH_PRODUCT_R */ # # define BOOST_PP_SEQ_FOR_EACH_PRODUCT_R(r, macro, sets) BOOST_PP_SEQ_FOR_EACH_PRODUCT_E(BOOST_PP_FOR_ ## r, macro, sets) # # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() # define BOOST_PP_SEQ_FOR_EACH_PRODUCT_E(impl, macro, sets) impl((BOOST_PP_SEQ_HEAD(sets)(nil), BOOST_PP_SEQ_TAIL(sets)(nil), (nil), macro), BOOST_PP_SEQ_FOR_EACH_PRODUCT_P, BOOST_PP_SEQ_FOR_EACH_PRODUCT_O, BOOST_PP_SEQ_FOR_EACH_PRODUCT_M_0) # else # define BOOST_PP_SEQ_FOR_EACH_PRODUCT_E(impl, macro, sets) BOOST_PP_SEQ_FOR_EACH_PRODUCT_E_I(impl, macro, sets) # define BOOST_PP_SEQ_FOR_EACH_PRODUCT_E_I(impl, macro, sets) impl((BOOST_PP_SEQ_HEAD(sets)(nil), BOOST_PP_SEQ_TAIL(sets)(nil), (nil), macro), BOOST_PP_SEQ_FOR_EACH_PRODUCT_P, BOOST_PP_SEQ_FOR_EACH_PRODUCT_O, BOOST_PP_SEQ_FOR_EACH_PRODUCT_M_0) # endif # # if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_STRICT() # define BOOST_PP_SEQ_FOR_EACH_PRODUCT_P(r, data) BOOST_PP_SEQ_FOR_EACH_PRODUCT_P_I data # define BOOST_PP_SEQ_FOR_EACH_PRODUCT_P_I(cset, rset, res, macro) BOOST_PP_DEC(BOOST_PP_SEQ_SIZE(cset)) # else # define BOOST_PP_SEQ_FOR_EACH_PRODUCT_P(r, data) BOOST_PP_DEC(BOOST_PP_SEQ_SIZE(BOOST_PP_TUPLE_ELEM(4, 0, data))) # endif # # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC() # define BOOST_PP_SEQ_FOR_EACH_PRODUCT_O(r, data) BOOST_PP_SEQ_FOR_EACH_PRODUCT_O_I data # define BOOST_PP_SEQ_FOR_EACH_PRODUCT_O_I(cset, rset, res, macro) (BOOST_PP_SEQ_TAIL(cset), rset, res, macro) # else # define BOOST_PP_SEQ_FOR_EACH_PRODUCT_O(r, data) (BOOST_PP_SEQ_TAIL(BOOST_PP_TUPLE_ELEM(4, 0, data)), BOOST_PP_TUPLE_ELEM(4, 1, data), BOOST_PP_TUPLE_ELEM(4, 2, data), BOOST_PP_TUPLE_ELEM(4, 3, data)) # endif # # define BOOST_PP_SEQ_FOR_EACH_PRODUCT_C(data, i) BOOST_PP_IF(BOOST_PP_DEC(BOOST_PP_SEQ_SIZE(BOOST_PP_TUPLE_ELEM(4, 1, data))), BOOST_PP_SEQ_FOR_EACH_PRODUCT_N_ ## i, BOOST_PP_SEQ_FOR_EACH_PRODUCT_I) # # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() # define BOOST_PP_SEQ_FOR_EACH_PRODUCT_I(r, data) BOOST_PP_SEQ_FOR_EACH_PRODUCT_I_I(r, BOOST_PP_TUPLE_ELEM(4, 0, data), BOOST_PP_TUPLE_ELEM(4, 1, data), BOOST_PP_TUPLE_ELEM(4, 2, data), BOOST_PP_TUPLE_ELEM(4, 3, data)) # else # define BOOST_PP_SEQ_FOR_EACH_PRODUCT_I(r, data) BOOST_PP_SEQ_FOR_EACH_PRODUCT_I_IM(r, BOOST_PP_TUPLE_REM_4 data) # define BOOST_PP_SEQ_FOR_EACH_PRODUCT_I_IM(r, im) BOOST_PP_SEQ_FOR_EACH_PRODUCT_I_I(r, im) # endif # # define BOOST_PP_SEQ_FOR_EACH_PRODUCT_I_I(r, cset, rset, res, macro) macro(r, BOOST_PP_SEQ_TAIL(res (BOOST_PP_SEQ_HEAD(cset)))) # # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC() # define BOOST_PP_SEQ_FOR_EACH_PRODUCT_H(data) BOOST_PP_SEQ_FOR_EACH_PRODUCT_H_I data # else # define BOOST_PP_SEQ_FOR_EACH_PRODUCT_H(data) BOOST_PP_SEQ_FOR_EACH_PRODUCT_H_I(BOOST_PP_TUPLE_ELEM(4, 0, data), BOOST_PP_TUPLE_ELEM(4, 1, data), BOOST_PP_TUPLE_ELEM(4, 2, data), BOOST_PP_TUPLE_ELEM(4, 3, data)) # endif # # define BOOST_PP_SEQ_FOR_EACH_PRODUCT_H_I(cset, rset, res, macro) (BOOST_PP_SEQ_HEAD(rset)(nil), BOOST_PP_SEQ_TAIL(rset), res (BOOST_PP_SEQ_HEAD(cset)), macro) # # define BOOST_PP_SEQ_FOR_EACH_PRODUCT_M_0(r, data) BOOST_PP_SEQ_FOR_EACH_PRODUCT_C(data, 0)(r, data) # define BOOST_PP_SEQ_FOR_EACH_PRODUCT_M_1(r, data) BOOST_PP_SEQ_FOR_EACH_PRODUCT_C(data, 1)(r, data) # define BOOST_PP_SEQ_FOR_EACH_PRODUCT_M_2(r, data) BOOST_PP_SEQ_FOR_EACH_PRODUCT_C(data, 2)(r, data) # define BOOST_PP_SEQ_FOR_EACH_PRODUCT_M_3(r, data) BOOST_PP_SEQ_FOR_EACH_PRODUCT_C(data, 3)(r, data) # define BOOST_PP_SEQ_FOR_EACH_PRODUCT_M_4(r, data) BOOST_PP_SEQ_FOR_EACH_PRODUCT_C(data, 4)(r, data) # define BOOST_PP_SEQ_FOR_EACH_PRODUCT_M_5(r, data) BOOST_PP_SEQ_FOR_EACH_PRODUCT_C(data, 5)(r, data) # define BOOST_PP_SEQ_FOR_EACH_PRODUCT_M_6(r, data) BOOST_PP_SEQ_FOR_EACH_PRODUCT_C(data, 6)(r, data) # define BOOST_PP_SEQ_FOR_EACH_PRODUCT_M_7(r, data) BOOST_PP_SEQ_FOR_EACH_PRODUCT_C(data, 7)(r, data) # define BOOST_PP_SEQ_FOR_EACH_PRODUCT_M_8(r, data) BOOST_PP_SEQ_FOR_EACH_PRODUCT_C(data, 8)(r, data) # define BOOST_PP_SEQ_FOR_EACH_PRODUCT_M_9(r, data) BOOST_PP_SEQ_FOR_EACH_PRODUCT_C(data, 9)(r, data) # define BOOST_PP_SEQ_FOR_EACH_PRODUCT_M_10(r, data) BOOST_PP_SEQ_FOR_EACH_PRODUCT_C(data, 10)(r, data) # define BOOST_PP_SEQ_FOR_EACH_PRODUCT_M_11(r, data) BOOST_PP_SEQ_FOR_EACH_PRODUCT_C(data, 11)(r, data) # define BOOST_PP_SEQ_FOR_EACH_PRODUCT_M_12(r, data) BOOST_PP_SEQ_FOR_EACH_PRODUCT_C(data, 12)(r, data) # define BOOST_PP_SEQ_FOR_EACH_PRODUCT_M_13(r, data) BOOST_PP_SEQ_FOR_EACH_PRODUCT_C(data, 13)(r, data) # define BOOST_PP_SEQ_FOR_EACH_PRODUCT_M_14(r, data) BOOST_PP_SEQ_FOR_EACH_PRODUCT_C(data, 14)(r, data) # define BOOST_PP_SEQ_FOR_EACH_PRODUCT_M_15(r, data) BOOST_PP_SEQ_FOR_EACH_PRODUCT_C(data, 15)(r, data) # define BOOST_PP_SEQ_FOR_EACH_PRODUCT_M_16(r, data) BOOST_PP_SEQ_FOR_EACH_PRODUCT_C(data, 16)(r, data) # define BOOST_PP_SEQ_FOR_EACH_PRODUCT_M_17(r, data) BOOST_PP_SEQ_FOR_EACH_PRODUCT_C(data, 17)(r, data) # define BOOST_PP_SEQ_FOR_EACH_PRODUCT_M_18(r, data) BOOST_PP_SEQ_FOR_EACH_PRODUCT_C(data, 18)(r, data) # define BOOST_PP_SEQ_FOR_EACH_PRODUCT_M_19(r, data) BOOST_PP_SEQ_FOR_EACH_PRODUCT_C(data, 19)(r, data) # define BOOST_PP_SEQ_FOR_EACH_PRODUCT_M_20(r, data) BOOST_PP_SEQ_FOR_EACH_PRODUCT_C(data, 20)(r, data) # define BOOST_PP_SEQ_FOR_EACH_PRODUCT_M_21(r, data) BOOST_PP_SEQ_FOR_EACH_PRODUCT_C(data, 21)(r, data) # define BOOST_PP_SEQ_FOR_EACH_PRODUCT_M_22(r, data) BOOST_PP_SEQ_FOR_EACH_PRODUCT_C(data, 22)(r, data) # define BOOST_PP_SEQ_FOR_EACH_PRODUCT_M_23(r, data) BOOST_PP_SEQ_FOR_EACH_PRODUCT_C(data, 23)(r, data) # define BOOST_PP_SEQ_FOR_EACH_PRODUCT_M_24(r, data) BOOST_PP_SEQ_FOR_EACH_PRODUCT_C(data, 24)(r, data) # define BOOST_PP_SEQ_FOR_EACH_PRODUCT_M_25(r, data) BOOST_PP_SEQ_FOR_EACH_PRODUCT_C(data, 25)(r, data) # # define BOOST_PP_SEQ_FOR_EACH_PRODUCT_N_0(r, data) BOOST_PP_FOR_ ## r(BOOST_PP_SEQ_FOR_EACH_PRODUCT_H(data), BOOST_PP_SEQ_FOR_EACH_PRODUCT_P, BOOST_PP_SEQ_FOR_EACH_PRODUCT_O, BOOST_PP_SEQ_FOR_EACH_PRODUCT_M_1) # define BOOST_PP_SEQ_FOR_EACH_PRODUCT_N_1(r, data) BOOST_PP_FOR_ ## r(BOOST_PP_SEQ_FOR_EACH_PRODUCT_H(data), BOOST_PP_SEQ_FOR_EACH_PRODUCT_P, BOOST_PP_SEQ_FOR_EACH_PRODUCT_O, BOOST_PP_SEQ_FOR_EACH_PRODUCT_M_2) # define BOOST_PP_SEQ_FOR_EACH_PRODUCT_N_2(r, data) BOOST_PP_FOR_ ## r(BOOST_PP_SEQ_FOR_EACH_PRODUCT_H(data), BOOST_PP_SEQ_FOR_EACH_PRODUCT_P, BOOST_PP_SEQ_FOR_EACH_PRODUCT_O, BOOST_PP_SEQ_FOR_EACH_PRODUCT_M_3) # define BOOST_PP_SEQ_FOR_EACH_PRODUCT_N_3(r, data) BOOST_PP_FOR_ ## r(BOOST_PP_SEQ_FOR_EACH_PRODUCT_H(data), BOOST_PP_SEQ_FOR_EACH_PRODUCT_P, BOOST_PP_SEQ_FOR_EACH_PRODUCT_O, BOOST_PP_SEQ_FOR_EACH_PRODUCT_M_4) # define BOOST_PP_SEQ_FOR_EACH_PRODUCT_N_4(r, data) BOOST_PP_FOR_ ## r(BOOST_PP_SEQ_FOR_EACH_PRODUCT_H(data), BOOST_PP_SEQ_FOR_EACH_PRODUCT_P, BOOST_PP_SEQ_FOR_EACH_PRODUCT_O, BOOST_PP_SEQ_FOR_EACH_PRODUCT_M_5) # define BOOST_PP_SEQ_FOR_EACH_PRODUCT_N_5(r, data) BOOST_PP_FOR_ ## r(BOOST_PP_SEQ_FOR_EACH_PRODUCT_H(data), BOOST_PP_SEQ_FOR_EACH_PRODUCT_P, BOOST_PP_SEQ_FOR_EACH_PRODUCT_O, BOOST_PP_SEQ_FOR_EACH_PRODUCT_M_6) # define BOOST_PP_SEQ_FOR_EACH_PRODUCT_N_6(r, data) BOOST_PP_FOR_ ## r(BOOST_PP_SEQ_FOR_EACH_PRODUCT_H(data), BOOST_PP_SEQ_FOR_EACH_PRODUCT_P, BOOST_PP_SEQ_FOR_EACH_PRODUCT_O, BOOST_PP_SEQ_FOR_EACH_PRODUCT_M_7) # define BOOST_PP_SEQ_FOR_EACH_PRODUCT_N_7(r, data) BOOST_PP_FOR_ ## r(BOOST_PP_SEQ_FOR_EACH_PRODUCT_H(data), BOOST_PP_SEQ_FOR_EACH_PRODUCT_P, BOOST_PP_SEQ_FOR_EACH_PRODUCT_O, BOOST_PP_SEQ_FOR_EACH_PRODUCT_M_8) # define BOOST_PP_SEQ_FOR_EACH_PRODUCT_N_8(r, data) BOOST_PP_FOR_ ## r(BOOST_PP_SEQ_FOR_EACH_PRODUCT_H(data), BOOST_PP_SEQ_FOR_EACH_PRODUCT_P, BOOST_PP_SEQ_FOR_EACH_PRODUCT_O, BOOST_PP_SEQ_FOR_EACH_PRODUCT_M_9) # define BOOST_PP_SEQ_FOR_EACH_PRODUCT_N_9(r, data) BOOST_PP_FOR_ ## r(BOOST_PP_SEQ_FOR_EACH_PRODUCT_H(data), BOOST_PP_SEQ_FOR_EACH_PRODUCT_P, BOOST_PP_SEQ_FOR_EACH_PRODUCT_O, BOOST_PP_SEQ_FOR_EACH_PRODUCT_M_10) # define BOOST_PP_SEQ_FOR_EACH_PRODUCT_N_10(r, data) BOOST_PP_FOR_ ## r(BOOST_PP_SEQ_FOR_EACH_PRODUCT_H(data), BOOST_PP_SEQ_FOR_EACH_PRODUCT_P, BOOST_PP_SEQ_FOR_EACH_PRODUCT_O, BOOST_PP_SEQ_FOR_EACH_PRODUCT_M_11) # define BOOST_PP_SEQ_FOR_EACH_PRODUCT_N_11(r, data) BOOST_PP_FOR_ ## r(BOOST_PP_SEQ_FOR_EACH_PRODUCT_H(data), BOOST_PP_SEQ_FOR_EACH_PRODUCT_P, BOOST_PP_SEQ_FOR_EACH_PRODUCT_O, BOOST_PP_SEQ_FOR_EACH_PRODUCT_M_12) # define BOOST_PP_SEQ_FOR_EACH_PRODUCT_N_12(r, data) BOOST_PP_FOR_ ## r(BOOST_PP_SEQ_FOR_EACH_PRODUCT_H(data), BOOST_PP_SEQ_FOR_EACH_PRODUCT_P, BOOST_PP_SEQ_FOR_EACH_PRODUCT_O, BOOST_PP_SEQ_FOR_EACH_PRODUCT_M_13) # define BOOST_PP_SEQ_FOR_EACH_PRODUCT_N_13(r, data) BOOST_PP_FOR_ ## r(BOOST_PP_SEQ_FOR_EACH_PRODUCT_H(data), BOOST_PP_SEQ_FOR_EACH_PRODUCT_P, BOOST_PP_SEQ_FOR_EACH_PRODUCT_O, BOOST_PP_SEQ_FOR_EACH_PRODUCT_M_14) # define BOOST_PP_SEQ_FOR_EACH_PRODUCT_N_14(r, data) BOOST_PP_FOR_ ## r(BOOST_PP_SEQ_FOR_EACH_PRODUCT_H(data), BOOST_PP_SEQ_FOR_EACH_PRODUCT_P, BOOST_PP_SEQ_FOR_EACH_PRODUCT_O, BOOST_PP_SEQ_FOR_EACH_PRODUCT_M_15) # define BOOST_PP_SEQ_FOR_EACH_PRODUCT_N_15(r, data) BOOST_PP_FOR_ ## r(BOOST_PP_SEQ_FOR_EACH_PRODUCT_H(data), BOOST_PP_SEQ_FOR_EACH_PRODUCT_P, BOOST_PP_SEQ_FOR_EACH_PRODUCT_O, BOOST_PP_SEQ_FOR_EACH_PRODUCT_M_16) # define BOOST_PP_SEQ_FOR_EACH_PRODUCT_N_16(r, data) BOOST_PP_FOR_ ## r(BOOST_PP_SEQ_FOR_EACH_PRODUCT_H(data), BOOST_PP_SEQ_FOR_EACH_PRODUCT_P, BOOST_PP_SEQ_FOR_EACH_PRODUCT_O, BOOST_PP_SEQ_FOR_EACH_PRODUCT_M_17) # define BOOST_PP_SEQ_FOR_EACH_PRODUCT_N_17(r, data) BOOST_PP_FOR_ ## r(BOOST_PP_SEQ_FOR_EACH_PRODUCT_H(data), BOOST_PP_SEQ_FOR_EACH_PRODUCT_P, BOOST_PP_SEQ_FOR_EACH_PRODUCT_O, BOOST_PP_SEQ_FOR_EACH_PRODUCT_M_18) # define BOOST_PP_SEQ_FOR_EACH_PRODUCT_N_18(r, data) BOOST_PP_FOR_ ## r(BOOST_PP_SEQ_FOR_EACH_PRODUCT_H(data), BOOST_PP_SEQ_FOR_EACH_PRODUCT_P, BOOST_PP_SEQ_FOR_EACH_PRODUCT_O, BOOST_PP_SEQ_FOR_EACH_PRODUCT_M_19) # define BOOST_PP_SEQ_FOR_EACH_PRODUCT_N_19(r, data) BOOST_PP_FOR_ ## r(BOOST_PP_SEQ_FOR_EACH_PRODUCT_H(data), BOOST_PP_SEQ_FOR_EACH_PRODUCT_P, BOOST_PP_SEQ_FOR_EACH_PRODUCT_O, BOOST_PP_SEQ_FOR_EACH_PRODUCT_M_20) # define BOOST_PP_SEQ_FOR_EACH_PRODUCT_N_20(r, data) BOOST_PP_FOR_ ## r(BOOST_PP_SEQ_FOR_EACH_PRODUCT_H(data), BOOST_PP_SEQ_FOR_EACH_PRODUCT_P, BOOST_PP_SEQ_FOR_EACH_PRODUCT_O, BOOST_PP_SEQ_FOR_EACH_PRODUCT_M_21) # define BOOST_PP_SEQ_FOR_EACH_PRODUCT_N_21(r, data) BOOST_PP_FOR_ ## r(BOOST_PP_SEQ_FOR_EACH_PRODUCT_H(data), BOOST_PP_SEQ_FOR_EACH_PRODUCT_P, BOOST_PP_SEQ_FOR_EACH_PRODUCT_O, BOOST_PP_SEQ_FOR_EACH_PRODUCT_M_22) # define BOOST_PP_SEQ_FOR_EACH_PRODUCT_N_22(r, data) BOOST_PP_FOR_ ## r(BOOST_PP_SEQ_FOR_EACH_PRODUCT_H(data), BOOST_PP_SEQ_FOR_EACH_PRODUCT_P, BOOST_PP_SEQ_FOR_EACH_PRODUCT_O, BOOST_PP_SEQ_FOR_EACH_PRODUCT_M_23) # define BOOST_PP_SEQ_FOR_EACH_PRODUCT_N_23(r, data) BOOST_PP_FOR_ ## r(BOOST_PP_SEQ_FOR_EACH_PRODUCT_H(data), BOOST_PP_SEQ_FOR_EACH_PRODUCT_P, BOOST_PP_SEQ_FOR_EACH_PRODUCT_O, BOOST_PP_SEQ_FOR_EACH_PRODUCT_M_24) # define BOOST_PP_SEQ_FOR_EACH_PRODUCT_N_24(r, data) BOOST_PP_FOR_ ## r(BOOST_PP_SEQ_FOR_EACH_PRODUCT_H(data), BOOST_PP_SEQ_FOR_EACH_PRODUCT_P, BOOST_PP_SEQ_FOR_EACH_PRODUCT_O, BOOST_PP_SEQ_FOR_EACH_PRODUCT_M_25) # define BOOST_PP_SEQ_FOR_EACH_PRODUCT_N_25(r, data) BOOST_PP_FOR_ ## r(BOOST_PP_SEQ_FOR_EACH_PRODUCT_H(data), BOOST_PP_SEQ_FOR_EACH_PRODUCT_P, BOOST_PP_SEQ_FOR_EACH_PRODUCT_O, BOOST_PP_SEQ_FOR_EACH_PRODUCT_M_26) # # endif ================================================ FILE: benchmarks/boost/preprocessor/seq/push_back.hpp ================================================ # /* ************************************************************************** # * * # * (C) Copyright Paul Mensonides 2002. # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # * * # ************************************************************************** */ # # /* See http://www.boost.org for most recent version. */ # # ifndef BOOST_PREPROCESSOR_SEQ_PUSH_BACK_HPP # define BOOST_PREPROCESSOR_SEQ_PUSH_BACK_HPP # # /* BOOST_PP_SEQ_PUSH_BACK */ # # define BOOST_PP_SEQ_PUSH_BACK(seq, elem) seq(elem) # # endif ================================================ FILE: benchmarks/boost/preprocessor/seq/rest_n.hpp ================================================ # /* ************************************************************************** # * * # * (C) Copyright Paul Mensonides 2002. # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # * * # ************************************************************************** */ # # /* See http://www.boost.org for most recent version. */ # # ifndef BOOST_PREPROCESSOR_SEQ_REST_N_HPP # define BOOST_PREPROCESSOR_SEQ_REST_N_HPP # # include # include # include # include # include # include # include # include # include # # /* BOOST_PP_SEQ_REST_N */ # # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() # define BOOST_PP_SEQ_REST_N(n, seq) BOOST_PP_SEQ_REST_N_DETAIL_EXEC(n, seq, BOOST_PP_SEQ_DETAIL_EMPTY_SIZE(seq)) # else # define BOOST_PP_SEQ_REST_N(n, seq) BOOST_PP_SEQ_REST_N_I(n, seq) # define BOOST_PP_SEQ_REST_N_I(n, seq) BOOST_PP_SEQ_REST_N_DETAIL_EXEC(n, seq, BOOST_PP_SEQ_DETAIL_EMPTY_SIZE(seq)) # endif # # define BOOST_PP_SEQ_REST_N_DETAIL_EXEC(n, seq, size) \ BOOST_PP_EXPR_IIF \ ( \ BOOST_PP_BITAND \ ( \ BOOST_PP_SEQ_DETAIL_IS_NOT_EMPTY_SIZE(size), \ BOOST_PP_NOT_EQUAL(n,size) \ ), \ BOOST_PP_TUPLE_ELEM(2, 1, BOOST_PP_SEQ_SPLIT(BOOST_PP_INC(n), BOOST_PP_IDENTITY( (nil) seq )))() \ ) \ /**/ # # endif ================================================ FILE: benchmarks/boost/preprocessor/seq/seq.hpp ================================================ # /* ************************************************************************** # * * # * (C) Copyright Paul Mensonides 2002. # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # * * # ************************************************************************** */ # # /* See http://www.boost.org for most recent version. */ # # ifndef BOOST_PREPROCESSOR_SEQ_SEQ_HPP # define BOOST_PREPROCESSOR_SEQ_SEQ_HPP # # include # include # # /* BOOST_PP_SEQ_HEAD */ # # define BOOST_PP_SEQ_HEAD(seq) BOOST_PP_SEQ_ELEM(0, seq) # # /* BOOST_PP_SEQ_TAIL */ # # if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC() # define BOOST_PP_SEQ_TAIL(seq) BOOST_PP_SEQ_TAIL_1((seq)) # define BOOST_PP_SEQ_TAIL_1(par) BOOST_PP_SEQ_TAIL_2 ## par # define BOOST_PP_SEQ_TAIL_2(seq) BOOST_PP_SEQ_TAIL_I ## seq # elif BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MSVC() # define BOOST_PP_SEQ_TAIL(seq) BOOST_PP_SEQ_TAIL_ID(BOOST_PP_SEQ_TAIL_I seq) # define BOOST_PP_SEQ_TAIL_ID(id) id # elif BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() # define BOOST_PP_SEQ_TAIL(seq) BOOST_PP_SEQ_TAIL_D(seq) # define BOOST_PP_SEQ_TAIL_D(seq) BOOST_PP_SEQ_TAIL_I seq # else # define BOOST_PP_SEQ_TAIL(seq) BOOST_PP_SEQ_TAIL_I seq # endif # # define BOOST_PP_SEQ_TAIL_I(x) # # /* BOOST_PP_SEQ_NIL */ # # define BOOST_PP_SEQ_NIL(x) (x) # # endif ================================================ FILE: benchmarks/boost/preprocessor/seq/size.hpp ================================================ # /* ************************************************************************** # * * # * (C) Copyright Paul Mensonides 2002. # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # * * # ************************************************************************** */ # # /* See http://www.boost.org for most recent version. */ # # ifndef BOOST_PREPROCESSOR_SEQ_SIZE_HPP # define BOOST_PREPROCESSOR_SEQ_SIZE_HPP # # include # include # # if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC() # define BOOST_PP_SEQ_SIZE(seq) BOOST_PP_SEQ_SIZE_I((seq)) # define BOOST_PP_SEQ_SIZE_I(par) BOOST_PP_SEQ_SIZE_II ## par # define BOOST_PP_SEQ_SIZE_II(seq) BOOST_PP_CAT(BOOST_PP_SEQ_SIZE_, BOOST_PP_SEQ_SIZE_0 ## seq) # elif BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() || BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MSVC() # define BOOST_PP_SEQ_SIZE(seq) BOOST_PP_SEQ_SIZE_I(seq) # define BOOST_PP_SEQ_SIZE_I(seq) BOOST_PP_CAT(BOOST_PP_SEQ_SIZE_, BOOST_PP_SEQ_SIZE_0 seq) # elif defined(__IBMC__) || defined(__IBMCPP__) # define BOOST_PP_SEQ_SIZE(seq) BOOST_PP_CAT(BOOST_PP_SEQ_SIZE_, BOOST_PP_CAT(BOOST_PP_SEQ_SIZE_0, seq)) # else # define BOOST_PP_SEQ_SIZE(seq) BOOST_PP_CAT(BOOST_PP_SEQ_SIZE_, BOOST_PP_SEQ_SIZE_0 seq) # endif # # define BOOST_PP_SEQ_SIZE_0(_) BOOST_PP_SEQ_SIZE_1 # define BOOST_PP_SEQ_SIZE_1(_) BOOST_PP_SEQ_SIZE_2 # define BOOST_PP_SEQ_SIZE_2(_) BOOST_PP_SEQ_SIZE_3 # define BOOST_PP_SEQ_SIZE_3(_) BOOST_PP_SEQ_SIZE_4 # define BOOST_PP_SEQ_SIZE_4(_) BOOST_PP_SEQ_SIZE_5 # define BOOST_PP_SEQ_SIZE_5(_) BOOST_PP_SEQ_SIZE_6 # define BOOST_PP_SEQ_SIZE_6(_) BOOST_PP_SEQ_SIZE_7 # define BOOST_PP_SEQ_SIZE_7(_) BOOST_PP_SEQ_SIZE_8 # define BOOST_PP_SEQ_SIZE_8(_) BOOST_PP_SEQ_SIZE_9 # define BOOST_PP_SEQ_SIZE_9(_) BOOST_PP_SEQ_SIZE_10 # define BOOST_PP_SEQ_SIZE_10(_) BOOST_PP_SEQ_SIZE_11 # define BOOST_PP_SEQ_SIZE_11(_) BOOST_PP_SEQ_SIZE_12 # define BOOST_PP_SEQ_SIZE_12(_) BOOST_PP_SEQ_SIZE_13 # define BOOST_PP_SEQ_SIZE_13(_) BOOST_PP_SEQ_SIZE_14 # define BOOST_PP_SEQ_SIZE_14(_) BOOST_PP_SEQ_SIZE_15 # define BOOST_PP_SEQ_SIZE_15(_) BOOST_PP_SEQ_SIZE_16 # define BOOST_PP_SEQ_SIZE_16(_) BOOST_PP_SEQ_SIZE_17 # define BOOST_PP_SEQ_SIZE_17(_) BOOST_PP_SEQ_SIZE_18 # define BOOST_PP_SEQ_SIZE_18(_) BOOST_PP_SEQ_SIZE_19 # define BOOST_PP_SEQ_SIZE_19(_) BOOST_PP_SEQ_SIZE_20 # define BOOST_PP_SEQ_SIZE_20(_) BOOST_PP_SEQ_SIZE_21 # define BOOST_PP_SEQ_SIZE_21(_) BOOST_PP_SEQ_SIZE_22 # define BOOST_PP_SEQ_SIZE_22(_) BOOST_PP_SEQ_SIZE_23 # define BOOST_PP_SEQ_SIZE_23(_) BOOST_PP_SEQ_SIZE_24 # define BOOST_PP_SEQ_SIZE_24(_) BOOST_PP_SEQ_SIZE_25 # define BOOST_PP_SEQ_SIZE_25(_) BOOST_PP_SEQ_SIZE_26 # define BOOST_PP_SEQ_SIZE_26(_) BOOST_PP_SEQ_SIZE_27 # define BOOST_PP_SEQ_SIZE_27(_) BOOST_PP_SEQ_SIZE_28 # define BOOST_PP_SEQ_SIZE_28(_) BOOST_PP_SEQ_SIZE_29 # define BOOST_PP_SEQ_SIZE_29(_) BOOST_PP_SEQ_SIZE_30 # define BOOST_PP_SEQ_SIZE_30(_) BOOST_PP_SEQ_SIZE_31 # define BOOST_PP_SEQ_SIZE_31(_) BOOST_PP_SEQ_SIZE_32 # define BOOST_PP_SEQ_SIZE_32(_) BOOST_PP_SEQ_SIZE_33 # define BOOST_PP_SEQ_SIZE_33(_) BOOST_PP_SEQ_SIZE_34 # define BOOST_PP_SEQ_SIZE_34(_) BOOST_PP_SEQ_SIZE_35 # define BOOST_PP_SEQ_SIZE_35(_) BOOST_PP_SEQ_SIZE_36 # define BOOST_PP_SEQ_SIZE_36(_) BOOST_PP_SEQ_SIZE_37 # define BOOST_PP_SEQ_SIZE_37(_) BOOST_PP_SEQ_SIZE_38 # define BOOST_PP_SEQ_SIZE_38(_) BOOST_PP_SEQ_SIZE_39 # define BOOST_PP_SEQ_SIZE_39(_) BOOST_PP_SEQ_SIZE_40 # define BOOST_PP_SEQ_SIZE_40(_) BOOST_PP_SEQ_SIZE_41 # define BOOST_PP_SEQ_SIZE_41(_) BOOST_PP_SEQ_SIZE_42 # define BOOST_PP_SEQ_SIZE_42(_) BOOST_PP_SEQ_SIZE_43 # define BOOST_PP_SEQ_SIZE_43(_) BOOST_PP_SEQ_SIZE_44 # define BOOST_PP_SEQ_SIZE_44(_) BOOST_PP_SEQ_SIZE_45 # define BOOST_PP_SEQ_SIZE_45(_) BOOST_PP_SEQ_SIZE_46 # define BOOST_PP_SEQ_SIZE_46(_) BOOST_PP_SEQ_SIZE_47 # define BOOST_PP_SEQ_SIZE_47(_) BOOST_PP_SEQ_SIZE_48 # define BOOST_PP_SEQ_SIZE_48(_) BOOST_PP_SEQ_SIZE_49 # define BOOST_PP_SEQ_SIZE_49(_) BOOST_PP_SEQ_SIZE_50 # define BOOST_PP_SEQ_SIZE_50(_) BOOST_PP_SEQ_SIZE_51 # define BOOST_PP_SEQ_SIZE_51(_) BOOST_PP_SEQ_SIZE_52 # define BOOST_PP_SEQ_SIZE_52(_) BOOST_PP_SEQ_SIZE_53 # define BOOST_PP_SEQ_SIZE_53(_) BOOST_PP_SEQ_SIZE_54 # define BOOST_PP_SEQ_SIZE_54(_) BOOST_PP_SEQ_SIZE_55 # define BOOST_PP_SEQ_SIZE_55(_) BOOST_PP_SEQ_SIZE_56 # define BOOST_PP_SEQ_SIZE_56(_) BOOST_PP_SEQ_SIZE_57 # define BOOST_PP_SEQ_SIZE_57(_) BOOST_PP_SEQ_SIZE_58 # define BOOST_PP_SEQ_SIZE_58(_) BOOST_PP_SEQ_SIZE_59 # define BOOST_PP_SEQ_SIZE_59(_) BOOST_PP_SEQ_SIZE_60 # define BOOST_PP_SEQ_SIZE_60(_) BOOST_PP_SEQ_SIZE_61 # define BOOST_PP_SEQ_SIZE_61(_) BOOST_PP_SEQ_SIZE_62 # define BOOST_PP_SEQ_SIZE_62(_) BOOST_PP_SEQ_SIZE_63 # define BOOST_PP_SEQ_SIZE_63(_) BOOST_PP_SEQ_SIZE_64 # define BOOST_PP_SEQ_SIZE_64(_) BOOST_PP_SEQ_SIZE_65 # define BOOST_PP_SEQ_SIZE_65(_) BOOST_PP_SEQ_SIZE_66 # define BOOST_PP_SEQ_SIZE_66(_) BOOST_PP_SEQ_SIZE_67 # define BOOST_PP_SEQ_SIZE_67(_) BOOST_PP_SEQ_SIZE_68 # define BOOST_PP_SEQ_SIZE_68(_) BOOST_PP_SEQ_SIZE_69 # define BOOST_PP_SEQ_SIZE_69(_) BOOST_PP_SEQ_SIZE_70 # define BOOST_PP_SEQ_SIZE_70(_) BOOST_PP_SEQ_SIZE_71 # define BOOST_PP_SEQ_SIZE_71(_) BOOST_PP_SEQ_SIZE_72 # define BOOST_PP_SEQ_SIZE_72(_) BOOST_PP_SEQ_SIZE_73 # define BOOST_PP_SEQ_SIZE_73(_) BOOST_PP_SEQ_SIZE_74 # define BOOST_PP_SEQ_SIZE_74(_) BOOST_PP_SEQ_SIZE_75 # define BOOST_PP_SEQ_SIZE_75(_) BOOST_PP_SEQ_SIZE_76 # define BOOST_PP_SEQ_SIZE_76(_) BOOST_PP_SEQ_SIZE_77 # define BOOST_PP_SEQ_SIZE_77(_) BOOST_PP_SEQ_SIZE_78 # define BOOST_PP_SEQ_SIZE_78(_) BOOST_PP_SEQ_SIZE_79 # define BOOST_PP_SEQ_SIZE_79(_) BOOST_PP_SEQ_SIZE_80 # define BOOST_PP_SEQ_SIZE_80(_) BOOST_PP_SEQ_SIZE_81 # define BOOST_PP_SEQ_SIZE_81(_) BOOST_PP_SEQ_SIZE_82 # define BOOST_PP_SEQ_SIZE_82(_) BOOST_PP_SEQ_SIZE_83 # define BOOST_PP_SEQ_SIZE_83(_) BOOST_PP_SEQ_SIZE_84 # define BOOST_PP_SEQ_SIZE_84(_) BOOST_PP_SEQ_SIZE_85 # define BOOST_PP_SEQ_SIZE_85(_) BOOST_PP_SEQ_SIZE_86 # define BOOST_PP_SEQ_SIZE_86(_) BOOST_PP_SEQ_SIZE_87 # define BOOST_PP_SEQ_SIZE_87(_) BOOST_PP_SEQ_SIZE_88 # define BOOST_PP_SEQ_SIZE_88(_) BOOST_PP_SEQ_SIZE_89 # define BOOST_PP_SEQ_SIZE_89(_) BOOST_PP_SEQ_SIZE_90 # define BOOST_PP_SEQ_SIZE_90(_) BOOST_PP_SEQ_SIZE_91 # define BOOST_PP_SEQ_SIZE_91(_) BOOST_PP_SEQ_SIZE_92 # define BOOST_PP_SEQ_SIZE_92(_) BOOST_PP_SEQ_SIZE_93 # define BOOST_PP_SEQ_SIZE_93(_) BOOST_PP_SEQ_SIZE_94 # define BOOST_PP_SEQ_SIZE_94(_) BOOST_PP_SEQ_SIZE_95 # define BOOST_PP_SEQ_SIZE_95(_) BOOST_PP_SEQ_SIZE_96 # define BOOST_PP_SEQ_SIZE_96(_) BOOST_PP_SEQ_SIZE_97 # define BOOST_PP_SEQ_SIZE_97(_) BOOST_PP_SEQ_SIZE_98 # define BOOST_PP_SEQ_SIZE_98(_) BOOST_PP_SEQ_SIZE_99 # define BOOST_PP_SEQ_SIZE_99(_) BOOST_PP_SEQ_SIZE_100 # define BOOST_PP_SEQ_SIZE_100(_) BOOST_PP_SEQ_SIZE_101 # define BOOST_PP_SEQ_SIZE_101(_) BOOST_PP_SEQ_SIZE_102 # define BOOST_PP_SEQ_SIZE_102(_) BOOST_PP_SEQ_SIZE_103 # define BOOST_PP_SEQ_SIZE_103(_) BOOST_PP_SEQ_SIZE_104 # define BOOST_PP_SEQ_SIZE_104(_) BOOST_PP_SEQ_SIZE_105 # define BOOST_PP_SEQ_SIZE_105(_) BOOST_PP_SEQ_SIZE_106 # define BOOST_PP_SEQ_SIZE_106(_) BOOST_PP_SEQ_SIZE_107 # define BOOST_PP_SEQ_SIZE_107(_) BOOST_PP_SEQ_SIZE_108 # define BOOST_PP_SEQ_SIZE_108(_) BOOST_PP_SEQ_SIZE_109 # define BOOST_PP_SEQ_SIZE_109(_) BOOST_PP_SEQ_SIZE_110 # define BOOST_PP_SEQ_SIZE_110(_) BOOST_PP_SEQ_SIZE_111 # define BOOST_PP_SEQ_SIZE_111(_) BOOST_PP_SEQ_SIZE_112 # define BOOST_PP_SEQ_SIZE_112(_) BOOST_PP_SEQ_SIZE_113 # define BOOST_PP_SEQ_SIZE_113(_) BOOST_PP_SEQ_SIZE_114 # define BOOST_PP_SEQ_SIZE_114(_) BOOST_PP_SEQ_SIZE_115 # define BOOST_PP_SEQ_SIZE_115(_) BOOST_PP_SEQ_SIZE_116 # define BOOST_PP_SEQ_SIZE_116(_) BOOST_PP_SEQ_SIZE_117 # define BOOST_PP_SEQ_SIZE_117(_) BOOST_PP_SEQ_SIZE_118 # define BOOST_PP_SEQ_SIZE_118(_) BOOST_PP_SEQ_SIZE_119 # define BOOST_PP_SEQ_SIZE_119(_) BOOST_PP_SEQ_SIZE_120 # define BOOST_PP_SEQ_SIZE_120(_) BOOST_PP_SEQ_SIZE_121 # define BOOST_PP_SEQ_SIZE_121(_) BOOST_PP_SEQ_SIZE_122 # define BOOST_PP_SEQ_SIZE_122(_) BOOST_PP_SEQ_SIZE_123 # define BOOST_PP_SEQ_SIZE_123(_) BOOST_PP_SEQ_SIZE_124 # define BOOST_PP_SEQ_SIZE_124(_) BOOST_PP_SEQ_SIZE_125 # define BOOST_PP_SEQ_SIZE_125(_) BOOST_PP_SEQ_SIZE_126 # define BOOST_PP_SEQ_SIZE_126(_) BOOST_PP_SEQ_SIZE_127 # define BOOST_PP_SEQ_SIZE_127(_) BOOST_PP_SEQ_SIZE_128 # define BOOST_PP_SEQ_SIZE_128(_) BOOST_PP_SEQ_SIZE_129 # define BOOST_PP_SEQ_SIZE_129(_) BOOST_PP_SEQ_SIZE_130 # define BOOST_PP_SEQ_SIZE_130(_) BOOST_PP_SEQ_SIZE_131 # define BOOST_PP_SEQ_SIZE_131(_) BOOST_PP_SEQ_SIZE_132 # define BOOST_PP_SEQ_SIZE_132(_) BOOST_PP_SEQ_SIZE_133 # define BOOST_PP_SEQ_SIZE_133(_) BOOST_PP_SEQ_SIZE_134 # define BOOST_PP_SEQ_SIZE_134(_) BOOST_PP_SEQ_SIZE_135 # define BOOST_PP_SEQ_SIZE_135(_) BOOST_PP_SEQ_SIZE_136 # define BOOST_PP_SEQ_SIZE_136(_) BOOST_PP_SEQ_SIZE_137 # define BOOST_PP_SEQ_SIZE_137(_) BOOST_PP_SEQ_SIZE_138 # define BOOST_PP_SEQ_SIZE_138(_) BOOST_PP_SEQ_SIZE_139 # define BOOST_PP_SEQ_SIZE_139(_) BOOST_PP_SEQ_SIZE_140 # define BOOST_PP_SEQ_SIZE_140(_) BOOST_PP_SEQ_SIZE_141 # define BOOST_PP_SEQ_SIZE_141(_) BOOST_PP_SEQ_SIZE_142 # define BOOST_PP_SEQ_SIZE_142(_) BOOST_PP_SEQ_SIZE_143 # define BOOST_PP_SEQ_SIZE_143(_) BOOST_PP_SEQ_SIZE_144 # define BOOST_PP_SEQ_SIZE_144(_) BOOST_PP_SEQ_SIZE_145 # define BOOST_PP_SEQ_SIZE_145(_) BOOST_PP_SEQ_SIZE_146 # define BOOST_PP_SEQ_SIZE_146(_) BOOST_PP_SEQ_SIZE_147 # define BOOST_PP_SEQ_SIZE_147(_) BOOST_PP_SEQ_SIZE_148 # define BOOST_PP_SEQ_SIZE_148(_) BOOST_PP_SEQ_SIZE_149 # define BOOST_PP_SEQ_SIZE_149(_) BOOST_PP_SEQ_SIZE_150 # define BOOST_PP_SEQ_SIZE_150(_) BOOST_PP_SEQ_SIZE_151 # define BOOST_PP_SEQ_SIZE_151(_) BOOST_PP_SEQ_SIZE_152 # define BOOST_PP_SEQ_SIZE_152(_) BOOST_PP_SEQ_SIZE_153 # define BOOST_PP_SEQ_SIZE_153(_) BOOST_PP_SEQ_SIZE_154 # define BOOST_PP_SEQ_SIZE_154(_) BOOST_PP_SEQ_SIZE_155 # define BOOST_PP_SEQ_SIZE_155(_) BOOST_PP_SEQ_SIZE_156 # define BOOST_PP_SEQ_SIZE_156(_) BOOST_PP_SEQ_SIZE_157 # define BOOST_PP_SEQ_SIZE_157(_) BOOST_PP_SEQ_SIZE_158 # define BOOST_PP_SEQ_SIZE_158(_) BOOST_PP_SEQ_SIZE_159 # define BOOST_PP_SEQ_SIZE_159(_) BOOST_PP_SEQ_SIZE_160 # define BOOST_PP_SEQ_SIZE_160(_) BOOST_PP_SEQ_SIZE_161 # define BOOST_PP_SEQ_SIZE_161(_) BOOST_PP_SEQ_SIZE_162 # define BOOST_PP_SEQ_SIZE_162(_) BOOST_PP_SEQ_SIZE_163 # define BOOST_PP_SEQ_SIZE_163(_) BOOST_PP_SEQ_SIZE_164 # define BOOST_PP_SEQ_SIZE_164(_) BOOST_PP_SEQ_SIZE_165 # define BOOST_PP_SEQ_SIZE_165(_) BOOST_PP_SEQ_SIZE_166 # define BOOST_PP_SEQ_SIZE_166(_) BOOST_PP_SEQ_SIZE_167 # define BOOST_PP_SEQ_SIZE_167(_) BOOST_PP_SEQ_SIZE_168 # define BOOST_PP_SEQ_SIZE_168(_) BOOST_PP_SEQ_SIZE_169 # define BOOST_PP_SEQ_SIZE_169(_) BOOST_PP_SEQ_SIZE_170 # define BOOST_PP_SEQ_SIZE_170(_) BOOST_PP_SEQ_SIZE_171 # define BOOST_PP_SEQ_SIZE_171(_) BOOST_PP_SEQ_SIZE_172 # define BOOST_PP_SEQ_SIZE_172(_) BOOST_PP_SEQ_SIZE_173 # define BOOST_PP_SEQ_SIZE_173(_) BOOST_PP_SEQ_SIZE_174 # define BOOST_PP_SEQ_SIZE_174(_) BOOST_PP_SEQ_SIZE_175 # define BOOST_PP_SEQ_SIZE_175(_) BOOST_PP_SEQ_SIZE_176 # define BOOST_PP_SEQ_SIZE_176(_) BOOST_PP_SEQ_SIZE_177 # define BOOST_PP_SEQ_SIZE_177(_) BOOST_PP_SEQ_SIZE_178 # define BOOST_PP_SEQ_SIZE_178(_) BOOST_PP_SEQ_SIZE_179 # define BOOST_PP_SEQ_SIZE_179(_) BOOST_PP_SEQ_SIZE_180 # define BOOST_PP_SEQ_SIZE_180(_) BOOST_PP_SEQ_SIZE_181 # define BOOST_PP_SEQ_SIZE_181(_) BOOST_PP_SEQ_SIZE_182 # define BOOST_PP_SEQ_SIZE_182(_) BOOST_PP_SEQ_SIZE_183 # define BOOST_PP_SEQ_SIZE_183(_) BOOST_PP_SEQ_SIZE_184 # define BOOST_PP_SEQ_SIZE_184(_) BOOST_PP_SEQ_SIZE_185 # define BOOST_PP_SEQ_SIZE_185(_) BOOST_PP_SEQ_SIZE_186 # define BOOST_PP_SEQ_SIZE_186(_) BOOST_PP_SEQ_SIZE_187 # define BOOST_PP_SEQ_SIZE_187(_) BOOST_PP_SEQ_SIZE_188 # define BOOST_PP_SEQ_SIZE_188(_) BOOST_PP_SEQ_SIZE_189 # define BOOST_PP_SEQ_SIZE_189(_) BOOST_PP_SEQ_SIZE_190 # define BOOST_PP_SEQ_SIZE_190(_) BOOST_PP_SEQ_SIZE_191 # define BOOST_PP_SEQ_SIZE_191(_) BOOST_PP_SEQ_SIZE_192 # define BOOST_PP_SEQ_SIZE_192(_) BOOST_PP_SEQ_SIZE_193 # define BOOST_PP_SEQ_SIZE_193(_) BOOST_PP_SEQ_SIZE_194 # define BOOST_PP_SEQ_SIZE_194(_) BOOST_PP_SEQ_SIZE_195 # define BOOST_PP_SEQ_SIZE_195(_) BOOST_PP_SEQ_SIZE_196 # define BOOST_PP_SEQ_SIZE_196(_) BOOST_PP_SEQ_SIZE_197 # define BOOST_PP_SEQ_SIZE_197(_) BOOST_PP_SEQ_SIZE_198 # define BOOST_PP_SEQ_SIZE_198(_) BOOST_PP_SEQ_SIZE_199 # define BOOST_PP_SEQ_SIZE_199(_) BOOST_PP_SEQ_SIZE_200 # define BOOST_PP_SEQ_SIZE_200(_) BOOST_PP_SEQ_SIZE_201 # define BOOST_PP_SEQ_SIZE_201(_) BOOST_PP_SEQ_SIZE_202 # define BOOST_PP_SEQ_SIZE_202(_) BOOST_PP_SEQ_SIZE_203 # define BOOST_PP_SEQ_SIZE_203(_) BOOST_PP_SEQ_SIZE_204 # define BOOST_PP_SEQ_SIZE_204(_) BOOST_PP_SEQ_SIZE_205 # define BOOST_PP_SEQ_SIZE_205(_) BOOST_PP_SEQ_SIZE_206 # define BOOST_PP_SEQ_SIZE_206(_) BOOST_PP_SEQ_SIZE_207 # define BOOST_PP_SEQ_SIZE_207(_) BOOST_PP_SEQ_SIZE_208 # define BOOST_PP_SEQ_SIZE_208(_) BOOST_PP_SEQ_SIZE_209 # define BOOST_PP_SEQ_SIZE_209(_) BOOST_PP_SEQ_SIZE_210 # define BOOST_PP_SEQ_SIZE_210(_) BOOST_PP_SEQ_SIZE_211 # define BOOST_PP_SEQ_SIZE_211(_) BOOST_PP_SEQ_SIZE_212 # define BOOST_PP_SEQ_SIZE_212(_) BOOST_PP_SEQ_SIZE_213 # define BOOST_PP_SEQ_SIZE_213(_) BOOST_PP_SEQ_SIZE_214 # define BOOST_PP_SEQ_SIZE_214(_) BOOST_PP_SEQ_SIZE_215 # define BOOST_PP_SEQ_SIZE_215(_) BOOST_PP_SEQ_SIZE_216 # define BOOST_PP_SEQ_SIZE_216(_) BOOST_PP_SEQ_SIZE_217 # define BOOST_PP_SEQ_SIZE_217(_) BOOST_PP_SEQ_SIZE_218 # define BOOST_PP_SEQ_SIZE_218(_) BOOST_PP_SEQ_SIZE_219 # define BOOST_PP_SEQ_SIZE_219(_) BOOST_PP_SEQ_SIZE_220 # define BOOST_PP_SEQ_SIZE_220(_) BOOST_PP_SEQ_SIZE_221 # define BOOST_PP_SEQ_SIZE_221(_) BOOST_PP_SEQ_SIZE_222 # define BOOST_PP_SEQ_SIZE_222(_) BOOST_PP_SEQ_SIZE_223 # define BOOST_PP_SEQ_SIZE_223(_) BOOST_PP_SEQ_SIZE_224 # define BOOST_PP_SEQ_SIZE_224(_) BOOST_PP_SEQ_SIZE_225 # define BOOST_PP_SEQ_SIZE_225(_) BOOST_PP_SEQ_SIZE_226 # define BOOST_PP_SEQ_SIZE_226(_) BOOST_PP_SEQ_SIZE_227 # define BOOST_PP_SEQ_SIZE_227(_) BOOST_PP_SEQ_SIZE_228 # define BOOST_PP_SEQ_SIZE_228(_) BOOST_PP_SEQ_SIZE_229 # define BOOST_PP_SEQ_SIZE_229(_) BOOST_PP_SEQ_SIZE_230 # define BOOST_PP_SEQ_SIZE_230(_) BOOST_PP_SEQ_SIZE_231 # define BOOST_PP_SEQ_SIZE_231(_) BOOST_PP_SEQ_SIZE_232 # define BOOST_PP_SEQ_SIZE_232(_) BOOST_PP_SEQ_SIZE_233 # define BOOST_PP_SEQ_SIZE_233(_) BOOST_PP_SEQ_SIZE_234 # define BOOST_PP_SEQ_SIZE_234(_) BOOST_PP_SEQ_SIZE_235 # define BOOST_PP_SEQ_SIZE_235(_) BOOST_PP_SEQ_SIZE_236 # define BOOST_PP_SEQ_SIZE_236(_) BOOST_PP_SEQ_SIZE_237 # define BOOST_PP_SEQ_SIZE_237(_) BOOST_PP_SEQ_SIZE_238 # define BOOST_PP_SEQ_SIZE_238(_) BOOST_PP_SEQ_SIZE_239 # define BOOST_PP_SEQ_SIZE_239(_) BOOST_PP_SEQ_SIZE_240 # define BOOST_PP_SEQ_SIZE_240(_) BOOST_PP_SEQ_SIZE_241 # define BOOST_PP_SEQ_SIZE_241(_) BOOST_PP_SEQ_SIZE_242 # define BOOST_PP_SEQ_SIZE_242(_) BOOST_PP_SEQ_SIZE_243 # define BOOST_PP_SEQ_SIZE_243(_) BOOST_PP_SEQ_SIZE_244 # define BOOST_PP_SEQ_SIZE_244(_) BOOST_PP_SEQ_SIZE_245 # define BOOST_PP_SEQ_SIZE_245(_) BOOST_PP_SEQ_SIZE_246 # define BOOST_PP_SEQ_SIZE_246(_) BOOST_PP_SEQ_SIZE_247 # define BOOST_PP_SEQ_SIZE_247(_) BOOST_PP_SEQ_SIZE_248 # define BOOST_PP_SEQ_SIZE_248(_) BOOST_PP_SEQ_SIZE_249 # define BOOST_PP_SEQ_SIZE_249(_) BOOST_PP_SEQ_SIZE_250 # define BOOST_PP_SEQ_SIZE_250(_) BOOST_PP_SEQ_SIZE_251 # define BOOST_PP_SEQ_SIZE_251(_) BOOST_PP_SEQ_SIZE_252 # define BOOST_PP_SEQ_SIZE_252(_) BOOST_PP_SEQ_SIZE_253 # define BOOST_PP_SEQ_SIZE_253(_) BOOST_PP_SEQ_SIZE_254 # define BOOST_PP_SEQ_SIZE_254(_) BOOST_PP_SEQ_SIZE_255 # define BOOST_PP_SEQ_SIZE_255(_) BOOST_PP_SEQ_SIZE_256 # define BOOST_PP_SEQ_SIZE_256(_) BOOST_PP_SEQ_SIZE_257 # # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_0 0 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_1 1 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_2 2 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_3 3 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_4 4 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_5 5 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_6 6 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_7 7 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_8 8 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_9 9 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_10 10 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_11 11 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_12 12 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_13 13 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_14 14 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_15 15 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_16 16 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_17 17 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_18 18 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_19 19 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_20 20 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_21 21 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_22 22 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_23 23 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_24 24 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_25 25 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_26 26 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_27 27 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_28 28 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_29 29 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_30 30 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_31 31 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_32 32 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_33 33 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_34 34 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_35 35 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_36 36 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_37 37 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_38 38 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_39 39 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_40 40 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_41 41 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_42 42 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_43 43 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_44 44 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_45 45 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_46 46 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_47 47 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_48 48 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_49 49 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_50 50 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_51 51 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_52 52 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_53 53 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_54 54 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_55 55 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_56 56 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_57 57 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_58 58 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_59 59 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_60 60 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_61 61 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_62 62 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_63 63 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_64 64 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_65 65 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_66 66 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_67 67 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_68 68 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_69 69 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_70 70 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_71 71 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_72 72 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_73 73 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_74 74 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_75 75 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_76 76 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_77 77 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_78 78 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_79 79 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_80 80 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_81 81 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_82 82 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_83 83 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_84 84 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_85 85 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_86 86 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_87 87 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_88 88 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_89 89 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_90 90 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_91 91 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_92 92 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_93 93 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_94 94 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_95 95 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_96 96 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_97 97 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_98 98 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_99 99 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_100 100 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_101 101 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_102 102 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_103 103 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_104 104 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_105 105 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_106 106 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_107 107 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_108 108 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_109 109 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_110 110 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_111 111 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_112 112 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_113 113 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_114 114 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_115 115 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_116 116 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_117 117 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_118 118 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_119 119 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_120 120 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_121 121 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_122 122 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_123 123 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_124 124 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_125 125 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_126 126 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_127 127 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_128 128 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_129 129 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_130 130 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_131 131 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_132 132 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_133 133 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_134 134 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_135 135 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_136 136 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_137 137 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_138 138 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_139 139 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_140 140 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_141 141 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_142 142 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_143 143 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_144 144 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_145 145 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_146 146 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_147 147 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_148 148 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_149 149 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_150 150 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_151 151 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_152 152 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_153 153 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_154 154 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_155 155 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_156 156 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_157 157 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_158 158 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_159 159 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_160 160 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_161 161 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_162 162 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_163 163 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_164 164 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_165 165 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_166 166 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_167 167 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_168 168 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_169 169 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_170 170 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_171 171 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_172 172 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_173 173 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_174 174 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_175 175 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_176 176 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_177 177 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_178 178 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_179 179 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_180 180 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_181 181 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_182 182 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_183 183 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_184 184 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_185 185 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_186 186 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_187 187 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_188 188 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_189 189 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_190 190 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_191 191 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_192 192 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_193 193 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_194 194 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_195 195 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_196 196 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_197 197 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_198 198 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_199 199 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_200 200 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_201 201 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_202 202 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_203 203 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_204 204 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_205 205 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_206 206 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_207 207 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_208 208 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_209 209 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_210 210 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_211 211 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_212 212 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_213 213 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_214 214 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_215 215 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_216 216 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_217 217 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_218 218 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_219 219 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_220 220 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_221 221 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_222 222 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_223 223 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_224 224 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_225 225 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_226 226 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_227 227 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_228 228 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_229 229 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_230 230 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_231 231 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_232 232 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_233 233 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_234 234 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_235 235 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_236 236 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_237 237 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_238 238 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_239 239 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_240 240 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_241 241 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_242 242 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_243 243 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_244 244 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_245 245 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_246 246 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_247 247 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_248 248 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_249 249 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_250 250 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_251 251 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_252 252 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_253 253 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_254 254 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_255 255 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_256 256 # define BOOST_PP_SEQ_SIZE_BOOST_PP_SEQ_SIZE_257 257 # # endif ================================================ FILE: benchmarks/boost/preprocessor/seq/subseq.hpp ================================================ # /* ************************************************************************** # * * # * (C) Copyright Paul Mensonides 2002. # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # * * # ************************************************************************** */ # # /* See http://www.boost.org for most recent version. */ # # ifndef BOOST_PREPROCESSOR_SEQ_SUBSEQ_HPP # define BOOST_PREPROCESSOR_SEQ_SUBSEQ_HPP # # include # include # include # # /* BOOST_PP_SEQ_SUBSEQ */ # # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() # define BOOST_PP_SEQ_SUBSEQ(seq, i, len) BOOST_PP_SEQ_FIRST_N(len, BOOST_PP_SEQ_REST_N(i, seq)) # else # define BOOST_PP_SEQ_SUBSEQ(seq, i, len) BOOST_PP_SEQ_SUBSEQ_I(seq, i, len) # define BOOST_PP_SEQ_SUBSEQ_I(seq, i, len) BOOST_PP_SEQ_FIRST_N(len, BOOST_PP_SEQ_REST_N(i, seq)) # endif # # endif ================================================ FILE: benchmarks/boost/preprocessor/slot/detail/counter.hpp ================================================ # /* ************************************************************************** # * * # * (C) Copyright Paul Mensonides 2005. * # * Distributed under the Boost Software License, Version 1.0. (See * # * accompanying file LICENSE_1_0.txt or copy at * # * http://www.boost.org/LICENSE_1_0.txt) * # * * # ************************************************************************** */ # # /* See http://www.boost.org for most recent version. */ # # define BOOST_PP_VALUE BOOST_PP_COUNTER + 1 # # include # # undef BOOST_PP_COUNTER # # undef BOOST_PP_COUNTER_DIGIT_1 # undef BOOST_PP_COUNTER_DIGIT_2 # undef BOOST_PP_COUNTER_DIGIT_3 # undef BOOST_PP_COUNTER_DIGIT_4 # undef BOOST_PP_COUNTER_DIGIT_5 # undef BOOST_PP_COUNTER_DIGIT_6 # undef BOOST_PP_COUNTER_DIGIT_7 # undef BOOST_PP_COUNTER_DIGIT_8 # undef BOOST_PP_COUNTER_DIGIT_9 # undef BOOST_PP_COUNTER_DIGIT_10 # # if BOOST_PP_SLOT_TEMP_10 == 0 # define BOOST_PP_COUNTER_DIGIT_10 0 # elif BOOST_PP_SLOT_TEMP_10 == 1 # define BOOST_PP_COUNTER_DIGIT_10 1 # elif BOOST_PP_SLOT_TEMP_10 == 2 # define BOOST_PP_COUNTER_DIGIT_10 2 # elif BOOST_PP_SLOT_TEMP_10 == 3 # define BOOST_PP_COUNTER_DIGIT_10 3 # elif BOOST_PP_SLOT_TEMP_10 == 4 # define BOOST_PP_COUNTER_DIGIT_10 4 # elif BOOST_PP_SLOT_TEMP_10 == 5 # define BOOST_PP_COUNTER_DIGIT_10 5 # elif BOOST_PP_SLOT_TEMP_10 == 6 # define BOOST_PP_COUNTER_DIGIT_10 6 # elif BOOST_PP_SLOT_TEMP_10 == 7 # define BOOST_PP_COUNTER_DIGIT_10 7 # elif BOOST_PP_SLOT_TEMP_10 == 8 # define BOOST_PP_COUNTER_DIGIT_10 8 # elif BOOST_PP_SLOT_TEMP_10 == 9 # define BOOST_PP_COUNTER_DIGIT_10 9 # endif # # if BOOST_PP_SLOT_TEMP_9 == 0 # define BOOST_PP_COUNTER_DIGIT_9 0 # elif BOOST_PP_SLOT_TEMP_9 == 1 # define BOOST_PP_COUNTER_DIGIT_9 1 # elif BOOST_PP_SLOT_TEMP_9 == 2 # define BOOST_PP_COUNTER_DIGIT_9 2 # elif BOOST_PP_SLOT_TEMP_9 == 3 # define BOOST_PP_COUNTER_DIGIT_9 3 # elif BOOST_PP_SLOT_TEMP_9 == 4 # define BOOST_PP_COUNTER_DIGIT_9 4 # elif BOOST_PP_SLOT_TEMP_9 == 5 # define BOOST_PP_COUNTER_DIGIT_9 5 # elif BOOST_PP_SLOT_TEMP_9 == 6 # define BOOST_PP_COUNTER_DIGIT_9 6 # elif BOOST_PP_SLOT_TEMP_9 == 7 # define BOOST_PP_COUNTER_DIGIT_9 7 # elif BOOST_PP_SLOT_TEMP_9 == 8 # define BOOST_PP_COUNTER_DIGIT_9 8 # elif BOOST_PP_SLOT_TEMP_9 == 9 # define BOOST_PP_COUNTER_DIGIT_9 9 # endif # # if BOOST_PP_SLOT_TEMP_8 == 0 # define BOOST_PP_COUNTER_DIGIT_8 0 # elif BOOST_PP_SLOT_TEMP_8 == 1 # define BOOST_PP_COUNTER_DIGIT_8 1 # elif BOOST_PP_SLOT_TEMP_8 == 2 # define BOOST_PP_COUNTER_DIGIT_8 2 # elif BOOST_PP_SLOT_TEMP_8 == 3 # define BOOST_PP_COUNTER_DIGIT_8 3 # elif BOOST_PP_SLOT_TEMP_8 == 4 # define BOOST_PP_COUNTER_DIGIT_8 4 # elif BOOST_PP_SLOT_TEMP_8 == 5 # define BOOST_PP_COUNTER_DIGIT_8 5 # elif BOOST_PP_SLOT_TEMP_8 == 6 # define BOOST_PP_COUNTER_DIGIT_8 6 # elif BOOST_PP_SLOT_TEMP_8 == 7 # define BOOST_PP_COUNTER_DIGIT_8 7 # elif BOOST_PP_SLOT_TEMP_8 == 8 # define BOOST_PP_COUNTER_DIGIT_8 8 # elif BOOST_PP_SLOT_TEMP_8 == 9 # define BOOST_PP_COUNTER_DIGIT_8 9 # endif # # if BOOST_PP_SLOT_TEMP_7 == 0 # define BOOST_PP_COUNTER_DIGIT_7 0 # elif BOOST_PP_SLOT_TEMP_7 == 1 # define BOOST_PP_COUNTER_DIGIT_7 1 # elif BOOST_PP_SLOT_TEMP_7 == 2 # define BOOST_PP_COUNTER_DIGIT_7 2 # elif BOOST_PP_SLOT_TEMP_7 == 3 # define BOOST_PP_COUNTER_DIGIT_7 3 # elif BOOST_PP_SLOT_TEMP_7 == 4 # define BOOST_PP_COUNTER_DIGIT_7 4 # elif BOOST_PP_SLOT_TEMP_7 == 5 # define BOOST_PP_COUNTER_DIGIT_7 5 # elif BOOST_PP_SLOT_TEMP_7 == 6 # define BOOST_PP_COUNTER_DIGIT_7 6 # elif BOOST_PP_SLOT_TEMP_7 == 7 # define BOOST_PP_COUNTER_DIGIT_7 7 # elif BOOST_PP_SLOT_TEMP_7 == 8 # define BOOST_PP_COUNTER_DIGIT_7 8 # elif BOOST_PP_SLOT_TEMP_7 == 9 # define BOOST_PP_COUNTER_DIGIT_7 9 # endif # # if BOOST_PP_SLOT_TEMP_6 == 0 # define BOOST_PP_COUNTER_DIGIT_6 0 # elif BOOST_PP_SLOT_TEMP_6 == 1 # define BOOST_PP_COUNTER_DIGIT_6 1 # elif BOOST_PP_SLOT_TEMP_6 == 2 # define BOOST_PP_COUNTER_DIGIT_6 2 # elif BOOST_PP_SLOT_TEMP_6 == 3 # define BOOST_PP_COUNTER_DIGIT_6 3 # elif BOOST_PP_SLOT_TEMP_6 == 4 # define BOOST_PP_COUNTER_DIGIT_6 4 # elif BOOST_PP_SLOT_TEMP_6 == 5 # define BOOST_PP_COUNTER_DIGIT_6 5 # elif BOOST_PP_SLOT_TEMP_6 == 6 # define BOOST_PP_COUNTER_DIGIT_6 6 # elif BOOST_PP_SLOT_TEMP_6 == 7 # define BOOST_PP_COUNTER_DIGIT_6 7 # elif BOOST_PP_SLOT_TEMP_6 == 8 # define BOOST_PP_COUNTER_DIGIT_6 8 # elif BOOST_PP_SLOT_TEMP_6 == 9 # define BOOST_PP_COUNTER_DIGIT_6 9 # endif # # if BOOST_PP_SLOT_TEMP_5 == 0 # define BOOST_PP_COUNTER_DIGIT_5 0 # elif BOOST_PP_SLOT_TEMP_5 == 1 # define BOOST_PP_COUNTER_DIGIT_5 1 # elif BOOST_PP_SLOT_TEMP_5 == 2 # define BOOST_PP_COUNTER_DIGIT_5 2 # elif BOOST_PP_SLOT_TEMP_5 == 3 # define BOOST_PP_COUNTER_DIGIT_5 3 # elif BOOST_PP_SLOT_TEMP_5 == 4 # define BOOST_PP_COUNTER_DIGIT_5 4 # elif BOOST_PP_SLOT_TEMP_5 == 5 # define BOOST_PP_COUNTER_DIGIT_5 5 # elif BOOST_PP_SLOT_TEMP_5 == 6 # define BOOST_PP_COUNTER_DIGIT_5 6 # elif BOOST_PP_SLOT_TEMP_5 == 7 # define BOOST_PP_COUNTER_DIGIT_5 7 # elif BOOST_PP_SLOT_TEMP_5 == 8 # define BOOST_PP_COUNTER_DIGIT_5 8 # elif BOOST_PP_SLOT_TEMP_5 == 9 # define BOOST_PP_COUNTER_DIGIT_5 9 # endif # # if BOOST_PP_SLOT_TEMP_4 == 0 # define BOOST_PP_COUNTER_DIGIT_4 0 # elif BOOST_PP_SLOT_TEMP_4 == 1 # define BOOST_PP_COUNTER_DIGIT_4 1 # elif BOOST_PP_SLOT_TEMP_4 == 2 # define BOOST_PP_COUNTER_DIGIT_4 2 # elif BOOST_PP_SLOT_TEMP_4 == 3 # define BOOST_PP_COUNTER_DIGIT_4 3 # elif BOOST_PP_SLOT_TEMP_4 == 4 # define BOOST_PP_COUNTER_DIGIT_4 4 # elif BOOST_PP_SLOT_TEMP_4 == 5 # define BOOST_PP_COUNTER_DIGIT_4 5 # elif BOOST_PP_SLOT_TEMP_4 == 6 # define BOOST_PP_COUNTER_DIGIT_4 6 # elif BOOST_PP_SLOT_TEMP_4 == 7 # define BOOST_PP_COUNTER_DIGIT_4 7 # elif BOOST_PP_SLOT_TEMP_4 == 8 # define BOOST_PP_COUNTER_DIGIT_4 8 # elif BOOST_PP_SLOT_TEMP_4 == 9 # define BOOST_PP_COUNTER_DIGIT_4 9 # endif # # if BOOST_PP_SLOT_TEMP_3 == 0 # define BOOST_PP_COUNTER_DIGIT_3 0 # elif BOOST_PP_SLOT_TEMP_3 == 1 # define BOOST_PP_COUNTER_DIGIT_3 1 # elif BOOST_PP_SLOT_TEMP_3 == 2 # define BOOST_PP_COUNTER_DIGIT_3 2 # elif BOOST_PP_SLOT_TEMP_3 == 3 # define BOOST_PP_COUNTER_DIGIT_3 3 # elif BOOST_PP_SLOT_TEMP_3 == 4 # define BOOST_PP_COUNTER_DIGIT_3 4 # elif BOOST_PP_SLOT_TEMP_3 == 5 # define BOOST_PP_COUNTER_DIGIT_3 5 # elif BOOST_PP_SLOT_TEMP_3 == 6 # define BOOST_PP_COUNTER_DIGIT_3 6 # elif BOOST_PP_SLOT_TEMP_3 == 7 # define BOOST_PP_COUNTER_DIGIT_3 7 # elif BOOST_PP_SLOT_TEMP_3 == 8 # define BOOST_PP_COUNTER_DIGIT_3 8 # elif BOOST_PP_SLOT_TEMP_3 == 9 # define BOOST_PP_COUNTER_DIGIT_3 9 # endif # # if BOOST_PP_SLOT_TEMP_2 == 0 # define BOOST_PP_COUNTER_DIGIT_2 0 # elif BOOST_PP_SLOT_TEMP_2 == 1 # define BOOST_PP_COUNTER_DIGIT_2 1 # elif BOOST_PP_SLOT_TEMP_2 == 2 # define BOOST_PP_COUNTER_DIGIT_2 2 # elif BOOST_PP_SLOT_TEMP_2 == 3 # define BOOST_PP_COUNTER_DIGIT_2 3 # elif BOOST_PP_SLOT_TEMP_2 == 4 # define BOOST_PP_COUNTER_DIGIT_2 4 # elif BOOST_PP_SLOT_TEMP_2 == 5 # define BOOST_PP_COUNTER_DIGIT_2 5 # elif BOOST_PP_SLOT_TEMP_2 == 6 # define BOOST_PP_COUNTER_DIGIT_2 6 # elif BOOST_PP_SLOT_TEMP_2 == 7 # define BOOST_PP_COUNTER_DIGIT_2 7 # elif BOOST_PP_SLOT_TEMP_2 == 8 # define BOOST_PP_COUNTER_DIGIT_2 8 # elif BOOST_PP_SLOT_TEMP_2 == 9 # define BOOST_PP_COUNTER_DIGIT_2 9 # endif # # if BOOST_PP_SLOT_TEMP_1 == 0 # define BOOST_PP_COUNTER_DIGIT_1 0 # elif BOOST_PP_SLOT_TEMP_1 == 1 # define BOOST_PP_COUNTER_DIGIT_1 1 # elif BOOST_PP_SLOT_TEMP_1 == 2 # define BOOST_PP_COUNTER_DIGIT_1 2 # elif BOOST_PP_SLOT_TEMP_1 == 3 # define BOOST_PP_COUNTER_DIGIT_1 3 # elif BOOST_PP_SLOT_TEMP_1 == 4 # define BOOST_PP_COUNTER_DIGIT_1 4 # elif BOOST_PP_SLOT_TEMP_1 == 5 # define BOOST_PP_COUNTER_DIGIT_1 5 # elif BOOST_PP_SLOT_TEMP_1 == 6 # define BOOST_PP_COUNTER_DIGIT_1 6 # elif BOOST_PP_SLOT_TEMP_1 == 7 # define BOOST_PP_COUNTER_DIGIT_1 7 # elif BOOST_PP_SLOT_TEMP_1 == 8 # define BOOST_PP_COUNTER_DIGIT_1 8 # elif BOOST_PP_SLOT_TEMP_1 == 9 # define BOOST_PP_COUNTER_DIGIT_1 9 # endif # # if BOOST_PP_COUNTER_DIGIT_10 # define BOOST_PP_COUNTER BOOST_PP_SLOT_CC_10(BOOST_PP_COUNTER_DIGIT_10, BOOST_PP_COUNTER_DIGIT_9, BOOST_PP_COUNTER_DIGIT_8, BOOST_PP_COUNTER_DIGIT_7, BOOST_PP_COUNTER_DIGIT_6, BOOST_PP_COUNTER_DIGIT_5, BOOST_PP_COUNTER_DIGIT_4, BOOST_PP_COUNTER_DIGIT_3, BOOST_PP_COUNTER_DIGIT_2, BOOST_PP_COUNTER_DIGIT_1) # elif BOOST_PP_COUNTER_DIGIT_9 # define BOOST_PP_COUNTER BOOST_PP_SLOT_CC_9(BOOST_PP_COUNTER_DIGIT_9, BOOST_PP_COUNTER_DIGIT_8, BOOST_PP_COUNTER_DIGIT_7, BOOST_PP_COUNTER_DIGIT_6, BOOST_PP_COUNTER_DIGIT_5, BOOST_PP_COUNTER_DIGIT_4, BOOST_PP_COUNTER_DIGIT_3, BOOST_PP_COUNTER_DIGIT_2, BOOST_PP_COUNTER_DIGIT_1) # elif BOOST_PP_COUNTER_DIGIT_8 # define BOOST_PP_COUNTER BOOST_PP_SLOT_CC_8(BOOST_PP_COUNTER_DIGIT_8, BOOST_PP_COUNTER_DIGIT_7, BOOST_PP_COUNTER_DIGIT_6, BOOST_PP_COUNTER_DIGIT_5, BOOST_PP_COUNTER_DIGIT_4, BOOST_PP_COUNTER_DIGIT_3, BOOST_PP_COUNTER_DIGIT_2, BOOST_PP_COUNTER_DIGIT_1) # elif BOOST_PP_COUNTER_DIGIT_7 # define BOOST_PP_COUNTER BOOST_PP_SLOT_CC_7(BOOST_PP_COUNTER_DIGIT_7, BOOST_PP_COUNTER_DIGIT_6, BOOST_PP_COUNTER_DIGIT_5, BOOST_PP_COUNTER_DIGIT_4, BOOST_PP_COUNTER_DIGIT_3, BOOST_PP_COUNTER_DIGIT_2, BOOST_PP_COUNTER_DIGIT_1) # elif BOOST_PP_COUNTER_DIGIT_6 # define BOOST_PP_COUNTER BOOST_PP_SLOT_CC_6(BOOST_PP_COUNTER_DIGIT_6, BOOST_PP_COUNTER_DIGIT_5, BOOST_PP_COUNTER_DIGIT_4, BOOST_PP_COUNTER_DIGIT_3, BOOST_PP_COUNTER_DIGIT_2, BOOST_PP_COUNTER_DIGIT_1) # elif BOOST_PP_COUNTER_DIGIT_5 # define BOOST_PP_COUNTER BOOST_PP_SLOT_CC_5(BOOST_PP_COUNTER_DIGIT_5, BOOST_PP_COUNTER_DIGIT_4, BOOST_PP_COUNTER_DIGIT_3, BOOST_PP_COUNTER_DIGIT_2, BOOST_PP_COUNTER_DIGIT_1) # elif BOOST_PP_COUNTER_DIGIT_4 # define BOOST_PP_COUNTER BOOST_PP_SLOT_CC_4(BOOST_PP_COUNTER_DIGIT_4, BOOST_PP_COUNTER_DIGIT_3, BOOST_PP_COUNTER_DIGIT_2, BOOST_PP_COUNTER_DIGIT_1) # elif BOOST_PP_COUNTER_DIGIT_3 # define BOOST_PP_COUNTER BOOST_PP_SLOT_CC_3(BOOST_PP_COUNTER_DIGIT_3, BOOST_PP_COUNTER_DIGIT_2, BOOST_PP_COUNTER_DIGIT_1) # elif BOOST_PP_COUNTER_DIGIT_2 # define BOOST_PP_COUNTER BOOST_PP_SLOT_CC_2(BOOST_PP_COUNTER_DIGIT_2, BOOST_PP_COUNTER_DIGIT_1) # else # define BOOST_PP_COUNTER BOOST_PP_COUNTER_DIGIT_1 # endif ================================================ FILE: benchmarks/boost/preprocessor/slot/detail/def.hpp ================================================ # /* ************************************************************************** # * * # * (C) Copyright Paul Mensonides 2002. # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # * * # ************************************************************************** */ # # /* See http://www.boost.org for most recent version. */ # # ifndef BOOST_PREPROCESSOR_SLOT_DETAIL_DEF_HPP # define BOOST_PREPROCESSOR_SLOT_DETAIL_DEF_HPP # # /* BOOST_PP_SLOT_OFFSET_x */ # # define BOOST_PP_SLOT_OFFSET_10(x) (x) % 1000000000UL # define BOOST_PP_SLOT_OFFSET_9(x) BOOST_PP_SLOT_OFFSET_10(x) % 100000000UL # define BOOST_PP_SLOT_OFFSET_8(x) BOOST_PP_SLOT_OFFSET_9(x) % 10000000UL # define BOOST_PP_SLOT_OFFSET_7(x) BOOST_PP_SLOT_OFFSET_8(x) % 1000000UL # define BOOST_PP_SLOT_OFFSET_6(x) BOOST_PP_SLOT_OFFSET_7(x) % 100000UL # define BOOST_PP_SLOT_OFFSET_5(x) BOOST_PP_SLOT_OFFSET_6(x) % 10000UL # define BOOST_PP_SLOT_OFFSET_4(x) BOOST_PP_SLOT_OFFSET_5(x) % 1000UL # define BOOST_PP_SLOT_OFFSET_3(x) BOOST_PP_SLOT_OFFSET_4(x) % 100UL # define BOOST_PP_SLOT_OFFSET_2(x) BOOST_PP_SLOT_OFFSET_3(x) % 10UL # # /* BOOST_PP_SLOT_CC_x */ # # define BOOST_PP_SLOT_CC_2(a, b) BOOST_PP_SLOT_CC_2_D(a, b) # define BOOST_PP_SLOT_CC_3(a, b, c) BOOST_PP_SLOT_CC_3_D(a, b, c) # define BOOST_PP_SLOT_CC_4(a, b, c, d) BOOST_PP_SLOT_CC_4_D(a, b, c, d) # define BOOST_PP_SLOT_CC_5(a, b, c, d, e) BOOST_PP_SLOT_CC_5_D(a, b, c, d, e) # define BOOST_PP_SLOT_CC_6(a, b, c, d, e, f) BOOST_PP_SLOT_CC_6_D(a, b, c, d, e, f) # define BOOST_PP_SLOT_CC_7(a, b, c, d, e, f, g) BOOST_PP_SLOT_CC_7_D(a, b, c, d, e, f, g) # define BOOST_PP_SLOT_CC_8(a, b, c, d, e, f, g, h) BOOST_PP_SLOT_CC_8_D(a, b, c, d, e, f, g, h) # define BOOST_PP_SLOT_CC_9(a, b, c, d, e, f, g, h, i) BOOST_PP_SLOT_CC_9_D(a, b, c, d, e, f, g, h, i) # define BOOST_PP_SLOT_CC_10(a, b, c, d, e, f, g, h, i, j) BOOST_PP_SLOT_CC_10_D(a, b, c, d, e, f, g, h, i, j) # # define BOOST_PP_SLOT_CC_2_D(a, b) a ## b # define BOOST_PP_SLOT_CC_3_D(a, b, c) a ## b ## c # define BOOST_PP_SLOT_CC_4_D(a, b, c, d) a ## b ## c ## d # define BOOST_PP_SLOT_CC_5_D(a, b, c, d, e) a ## b ## c ## d ## e # define BOOST_PP_SLOT_CC_6_D(a, b, c, d, e, f) a ## b ## c ## d ## e ## f # define BOOST_PP_SLOT_CC_7_D(a, b, c, d, e, f, g) a ## b ## c ## d ## e ## f ## g # define BOOST_PP_SLOT_CC_8_D(a, b, c, d, e, f, g, h) a ## b ## c ## d ## e ## f ## g ## h # define BOOST_PP_SLOT_CC_9_D(a, b, c, d, e, f, g, h, i) a ## b ## c ## d ## e ## f ## g ## h ## i # define BOOST_PP_SLOT_CC_10_D(a, b, c, d, e, f, g, h, i, j) a ## b ## c ## d ## e ## f ## g ## h ## i ## j # # endif ================================================ FILE: benchmarks/boost/preprocessor/slot/detail/shared.hpp ================================================ # /* ************************************************************************** # * * # * (C) Copyright Paul Mensonides 2002. # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # * * # ************************************************************************** */ # # /* See http://www.boost.org for most recent version. */ # # ifndef BOOST_PP_VALUE # error BOOST_PP_ERROR: BOOST_PP_VALUE is not defined # endif # # undef BOOST_PP_SLOT_TEMP_1 # undef BOOST_PP_SLOT_TEMP_2 # undef BOOST_PP_SLOT_TEMP_3 # undef BOOST_PP_SLOT_TEMP_4 # undef BOOST_PP_SLOT_TEMP_5 # undef BOOST_PP_SLOT_TEMP_6 # undef BOOST_PP_SLOT_TEMP_7 # undef BOOST_PP_SLOT_TEMP_8 # undef BOOST_PP_SLOT_TEMP_9 # undef BOOST_PP_SLOT_TEMP_10 # # if (BOOST_PP_VALUE) / 1000000000UL == 0 # define BOOST_PP_SLOT_TEMP_10 0 # elif (BOOST_PP_VALUE) / 1000000000UL == 1 # define BOOST_PP_SLOT_TEMP_10 1 # elif (BOOST_PP_VALUE) / 1000000000UL == 2 # define BOOST_PP_SLOT_TEMP_10 2 # elif (BOOST_PP_VALUE) / 1000000000UL == 3 # define BOOST_PP_SLOT_TEMP_10 3 # elif (BOOST_PP_VALUE) / 1000000000UL == 4 # define BOOST_PP_SLOT_TEMP_10 4 # elif (BOOST_PP_VALUE) / 1000000000UL == 5 # define BOOST_PP_SLOT_TEMP_10 5 # elif (BOOST_PP_VALUE) / 1000000000UL == 6 # define BOOST_PP_SLOT_TEMP_10 6 # elif (BOOST_PP_VALUE) / 1000000000UL == 7 # define BOOST_PP_SLOT_TEMP_10 7 # elif (BOOST_PP_VALUE) / 1000000000UL == 8 # define BOOST_PP_SLOT_TEMP_10 8 # elif (BOOST_PP_VALUE) / 1000000000UL == 9 # define BOOST_PP_SLOT_TEMP_10 9 # endif # # if BOOST_PP_SLOT_OFFSET_10(BOOST_PP_VALUE) / 100000000UL == 0 # define BOOST_PP_SLOT_TEMP_9 0 # elif BOOST_PP_SLOT_OFFSET_10(BOOST_PP_VALUE) / 100000000UL == 1 # define BOOST_PP_SLOT_TEMP_9 1 # elif BOOST_PP_SLOT_OFFSET_10(BOOST_PP_VALUE) / 100000000UL == 2 # define BOOST_PP_SLOT_TEMP_9 2 # elif BOOST_PP_SLOT_OFFSET_10(BOOST_PP_VALUE) / 100000000UL == 3 # define BOOST_PP_SLOT_TEMP_9 3 # elif BOOST_PP_SLOT_OFFSET_10(BOOST_PP_VALUE) / 100000000UL == 4 # define BOOST_PP_SLOT_TEMP_9 4 # elif BOOST_PP_SLOT_OFFSET_10(BOOST_PP_VALUE) / 100000000UL == 5 # define BOOST_PP_SLOT_TEMP_9 5 # elif BOOST_PP_SLOT_OFFSET_10(BOOST_PP_VALUE) / 100000000UL == 6 # define BOOST_PP_SLOT_TEMP_9 6 # elif BOOST_PP_SLOT_OFFSET_10(BOOST_PP_VALUE) / 100000000UL == 7 # define BOOST_PP_SLOT_TEMP_9 7 # elif BOOST_PP_SLOT_OFFSET_10(BOOST_PP_VALUE) / 100000000UL == 8 # define BOOST_PP_SLOT_TEMP_9 8 # elif BOOST_PP_SLOT_OFFSET_10(BOOST_PP_VALUE) / 100000000UL == 9 # define BOOST_PP_SLOT_TEMP_9 9 # endif # # if BOOST_PP_SLOT_OFFSET_9(BOOST_PP_VALUE) / 10000000UL == 0 # define BOOST_PP_SLOT_TEMP_8 0 # elif BOOST_PP_SLOT_OFFSET_9(BOOST_PP_VALUE) / 10000000UL == 1 # define BOOST_PP_SLOT_TEMP_8 1 # elif BOOST_PP_SLOT_OFFSET_9(BOOST_PP_VALUE) / 10000000UL == 2 # define BOOST_PP_SLOT_TEMP_8 2 # elif BOOST_PP_SLOT_OFFSET_9(BOOST_PP_VALUE) / 10000000UL == 3 # define BOOST_PP_SLOT_TEMP_8 3 # elif BOOST_PP_SLOT_OFFSET_9(BOOST_PP_VALUE) / 10000000UL == 4 # define BOOST_PP_SLOT_TEMP_8 4 # elif BOOST_PP_SLOT_OFFSET_9(BOOST_PP_VALUE) / 10000000UL == 5 # define BOOST_PP_SLOT_TEMP_8 5 # elif BOOST_PP_SLOT_OFFSET_9(BOOST_PP_VALUE) / 10000000UL == 6 # define BOOST_PP_SLOT_TEMP_8 6 # elif BOOST_PP_SLOT_OFFSET_9(BOOST_PP_VALUE) / 10000000UL == 7 # define BOOST_PP_SLOT_TEMP_8 7 # elif BOOST_PP_SLOT_OFFSET_9(BOOST_PP_VALUE) / 10000000UL == 8 # define BOOST_PP_SLOT_TEMP_8 8 # elif BOOST_PP_SLOT_OFFSET_9(BOOST_PP_VALUE) / 10000000UL == 9 # define BOOST_PP_SLOT_TEMP_8 9 # endif # # if BOOST_PP_SLOT_OFFSET_8(BOOST_PP_VALUE) / 1000000UL == 0 # define BOOST_PP_SLOT_TEMP_7 0 # elif BOOST_PP_SLOT_OFFSET_8(BOOST_PP_VALUE) / 1000000UL == 1 # define BOOST_PP_SLOT_TEMP_7 1 # elif BOOST_PP_SLOT_OFFSET_8(BOOST_PP_VALUE) / 1000000UL == 2 # define BOOST_PP_SLOT_TEMP_7 2 # elif BOOST_PP_SLOT_OFFSET_8(BOOST_PP_VALUE) / 1000000UL == 3 # define BOOST_PP_SLOT_TEMP_7 3 # elif BOOST_PP_SLOT_OFFSET_8(BOOST_PP_VALUE) / 1000000UL == 4 # define BOOST_PP_SLOT_TEMP_7 4 # elif BOOST_PP_SLOT_OFFSET_8(BOOST_PP_VALUE) / 1000000UL == 5 # define BOOST_PP_SLOT_TEMP_7 5 # elif BOOST_PP_SLOT_OFFSET_8(BOOST_PP_VALUE) / 1000000UL == 6 # define BOOST_PP_SLOT_TEMP_7 6 # elif BOOST_PP_SLOT_OFFSET_8(BOOST_PP_VALUE) / 1000000UL == 7 # define BOOST_PP_SLOT_TEMP_7 7 # elif BOOST_PP_SLOT_OFFSET_8(BOOST_PP_VALUE) / 1000000UL == 8 # define BOOST_PP_SLOT_TEMP_7 8 # elif BOOST_PP_SLOT_OFFSET_8(BOOST_PP_VALUE) / 1000000UL == 9 # define BOOST_PP_SLOT_TEMP_7 9 # endif # # if BOOST_PP_SLOT_OFFSET_7(BOOST_PP_VALUE) / 100000UL == 0 # define BOOST_PP_SLOT_TEMP_6 0 # elif BOOST_PP_SLOT_OFFSET_7(BOOST_PP_VALUE) / 100000UL == 1 # define BOOST_PP_SLOT_TEMP_6 1 # elif BOOST_PP_SLOT_OFFSET_7(BOOST_PP_VALUE) / 100000UL == 2 # define BOOST_PP_SLOT_TEMP_6 2 # elif BOOST_PP_SLOT_OFFSET_7(BOOST_PP_VALUE) / 100000UL == 3 # define BOOST_PP_SLOT_TEMP_6 3 # elif BOOST_PP_SLOT_OFFSET_7(BOOST_PP_VALUE) / 100000UL == 4 # define BOOST_PP_SLOT_TEMP_6 4 # elif BOOST_PP_SLOT_OFFSET_7(BOOST_PP_VALUE) / 100000UL == 5 # define BOOST_PP_SLOT_TEMP_6 5 # elif BOOST_PP_SLOT_OFFSET_7(BOOST_PP_VALUE) / 100000UL == 6 # define BOOST_PP_SLOT_TEMP_6 6 # elif BOOST_PP_SLOT_OFFSET_7(BOOST_PP_VALUE) / 100000UL == 7 # define BOOST_PP_SLOT_TEMP_6 7 # elif BOOST_PP_SLOT_OFFSET_7(BOOST_PP_VALUE) / 100000UL == 8 # define BOOST_PP_SLOT_TEMP_6 8 # elif BOOST_PP_SLOT_OFFSET_7(BOOST_PP_VALUE) / 100000UL == 9 # define BOOST_PP_SLOT_TEMP_6 9 # endif # # if BOOST_PP_SLOT_OFFSET_6(BOOST_PP_VALUE) / 10000UL == 0 # define BOOST_PP_SLOT_TEMP_5 0 # elif BOOST_PP_SLOT_OFFSET_6(BOOST_PP_VALUE) / 10000UL == 1 # define BOOST_PP_SLOT_TEMP_5 1 # elif BOOST_PP_SLOT_OFFSET_6(BOOST_PP_VALUE) / 10000UL == 2 # define BOOST_PP_SLOT_TEMP_5 2 # elif BOOST_PP_SLOT_OFFSET_6(BOOST_PP_VALUE) / 10000UL == 3 # define BOOST_PP_SLOT_TEMP_5 3 # elif BOOST_PP_SLOT_OFFSET_6(BOOST_PP_VALUE) / 10000UL == 4 # define BOOST_PP_SLOT_TEMP_5 4 # elif BOOST_PP_SLOT_OFFSET_6(BOOST_PP_VALUE) / 10000UL == 5 # define BOOST_PP_SLOT_TEMP_5 5 # elif BOOST_PP_SLOT_OFFSET_6(BOOST_PP_VALUE) / 10000UL == 6 # define BOOST_PP_SLOT_TEMP_5 6 # elif BOOST_PP_SLOT_OFFSET_6(BOOST_PP_VALUE) / 10000UL == 7 # define BOOST_PP_SLOT_TEMP_5 7 # elif BOOST_PP_SLOT_OFFSET_6(BOOST_PP_VALUE) / 10000UL == 8 # define BOOST_PP_SLOT_TEMP_5 8 # elif BOOST_PP_SLOT_OFFSET_6(BOOST_PP_VALUE) / 10000UL == 9 # define BOOST_PP_SLOT_TEMP_5 9 # endif # # if BOOST_PP_SLOT_OFFSET_5(BOOST_PP_VALUE) / 1000UL == 0 # define BOOST_PP_SLOT_TEMP_4 0 # elif BOOST_PP_SLOT_OFFSET_5(BOOST_PP_VALUE) / 1000UL == 1 # define BOOST_PP_SLOT_TEMP_4 1 # elif BOOST_PP_SLOT_OFFSET_5(BOOST_PP_VALUE) / 1000UL == 2 # define BOOST_PP_SLOT_TEMP_4 2 # elif BOOST_PP_SLOT_OFFSET_5(BOOST_PP_VALUE) / 1000UL == 3 # define BOOST_PP_SLOT_TEMP_4 3 # elif BOOST_PP_SLOT_OFFSET_5(BOOST_PP_VALUE) / 1000UL == 4 # define BOOST_PP_SLOT_TEMP_4 4 # elif BOOST_PP_SLOT_OFFSET_5(BOOST_PP_VALUE) / 1000UL == 5 # define BOOST_PP_SLOT_TEMP_4 5 # elif BOOST_PP_SLOT_OFFSET_5(BOOST_PP_VALUE) / 1000UL == 6 # define BOOST_PP_SLOT_TEMP_4 6 # elif BOOST_PP_SLOT_OFFSET_5(BOOST_PP_VALUE) / 1000UL == 7 # define BOOST_PP_SLOT_TEMP_4 7 # elif BOOST_PP_SLOT_OFFSET_5(BOOST_PP_VALUE) / 1000UL == 8 # define BOOST_PP_SLOT_TEMP_4 8 # elif BOOST_PP_SLOT_OFFSET_5(BOOST_PP_VALUE) / 1000UL == 9 # define BOOST_PP_SLOT_TEMP_4 9 # endif # # if BOOST_PP_SLOT_OFFSET_4(BOOST_PP_VALUE) / 100UL == 0 # define BOOST_PP_SLOT_TEMP_3 0 # elif BOOST_PP_SLOT_OFFSET_4(BOOST_PP_VALUE) / 100UL == 1 # define BOOST_PP_SLOT_TEMP_3 1 # elif BOOST_PP_SLOT_OFFSET_4(BOOST_PP_VALUE) / 100UL == 2 # define BOOST_PP_SLOT_TEMP_3 2 # elif BOOST_PP_SLOT_OFFSET_4(BOOST_PP_VALUE) / 100UL == 3 # define BOOST_PP_SLOT_TEMP_3 3 # elif BOOST_PP_SLOT_OFFSET_4(BOOST_PP_VALUE) / 100UL == 4 # define BOOST_PP_SLOT_TEMP_3 4 # elif BOOST_PP_SLOT_OFFSET_4(BOOST_PP_VALUE) / 100UL == 5 # define BOOST_PP_SLOT_TEMP_3 5 # elif BOOST_PP_SLOT_OFFSET_4(BOOST_PP_VALUE) / 100UL == 6 # define BOOST_PP_SLOT_TEMP_3 6 # elif BOOST_PP_SLOT_OFFSET_4(BOOST_PP_VALUE) / 100UL == 7 # define BOOST_PP_SLOT_TEMP_3 7 # elif BOOST_PP_SLOT_OFFSET_4(BOOST_PP_VALUE) / 100UL == 8 # define BOOST_PP_SLOT_TEMP_3 8 # elif BOOST_PP_SLOT_OFFSET_4(BOOST_PP_VALUE) / 100UL == 9 # define BOOST_PP_SLOT_TEMP_3 9 # endif # # if BOOST_PP_SLOT_OFFSET_3(BOOST_PP_VALUE) / 10UL == 0 # define BOOST_PP_SLOT_TEMP_2 0 # elif BOOST_PP_SLOT_OFFSET_3(BOOST_PP_VALUE) / 10UL == 1 # define BOOST_PP_SLOT_TEMP_2 1 # elif BOOST_PP_SLOT_OFFSET_3(BOOST_PP_VALUE) / 10UL == 2 # define BOOST_PP_SLOT_TEMP_2 2 # elif BOOST_PP_SLOT_OFFSET_3(BOOST_PP_VALUE) / 10UL == 3 # define BOOST_PP_SLOT_TEMP_2 3 # elif BOOST_PP_SLOT_OFFSET_3(BOOST_PP_VALUE) / 10UL == 4 # define BOOST_PP_SLOT_TEMP_2 4 # elif BOOST_PP_SLOT_OFFSET_3(BOOST_PP_VALUE) / 10UL == 5 # define BOOST_PP_SLOT_TEMP_2 5 # elif BOOST_PP_SLOT_OFFSET_3(BOOST_PP_VALUE) / 10UL == 6 # define BOOST_PP_SLOT_TEMP_2 6 # elif BOOST_PP_SLOT_OFFSET_3(BOOST_PP_VALUE) / 10UL == 7 # define BOOST_PP_SLOT_TEMP_2 7 # elif BOOST_PP_SLOT_OFFSET_3(BOOST_PP_VALUE) / 10UL == 8 # define BOOST_PP_SLOT_TEMP_2 8 # elif BOOST_PP_SLOT_OFFSET_3(BOOST_PP_VALUE) / 10UL == 9 # define BOOST_PP_SLOT_TEMP_2 9 # endif # # if BOOST_PP_SLOT_OFFSET_2(BOOST_PP_VALUE) == 0 # define BOOST_PP_SLOT_TEMP_1 0 # elif BOOST_PP_SLOT_OFFSET_2(BOOST_PP_VALUE) == 1 # define BOOST_PP_SLOT_TEMP_1 1 # elif BOOST_PP_SLOT_OFFSET_2(BOOST_PP_VALUE) == 2 # define BOOST_PP_SLOT_TEMP_1 2 # elif BOOST_PP_SLOT_OFFSET_2(BOOST_PP_VALUE) == 3 # define BOOST_PP_SLOT_TEMP_1 3 # elif BOOST_PP_SLOT_OFFSET_2(BOOST_PP_VALUE) == 4 # define BOOST_PP_SLOT_TEMP_1 4 # elif BOOST_PP_SLOT_OFFSET_2(BOOST_PP_VALUE) == 5 # define BOOST_PP_SLOT_TEMP_1 5 # elif BOOST_PP_SLOT_OFFSET_2(BOOST_PP_VALUE) == 6 # define BOOST_PP_SLOT_TEMP_1 6 # elif BOOST_PP_SLOT_OFFSET_2(BOOST_PP_VALUE) == 7 # define BOOST_PP_SLOT_TEMP_1 7 # elif BOOST_PP_SLOT_OFFSET_2(BOOST_PP_VALUE) == 8 # define BOOST_PP_SLOT_TEMP_1 8 # elif BOOST_PP_SLOT_OFFSET_2(BOOST_PP_VALUE) == 9 # define BOOST_PP_SLOT_TEMP_1 9 # endif # # undef BOOST_PP_VALUE ================================================ FILE: benchmarks/boost/preprocessor/slot/detail/slot1.hpp ================================================ # /* ************************************************************************** # * * # * (C) Copyright Paul Mensonides 2002. # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # * * # ************************************************************************** */ # # /* See http://www.boost.org for most recent version. */ # # include # # undef BOOST_PP_SLOT_1 # # undef BOOST_PP_SLOT_1_DIGIT_1 # undef BOOST_PP_SLOT_1_DIGIT_2 # undef BOOST_PP_SLOT_1_DIGIT_3 # undef BOOST_PP_SLOT_1_DIGIT_4 # undef BOOST_PP_SLOT_1_DIGIT_5 # undef BOOST_PP_SLOT_1_DIGIT_6 # undef BOOST_PP_SLOT_1_DIGIT_7 # undef BOOST_PP_SLOT_1_DIGIT_8 # undef BOOST_PP_SLOT_1_DIGIT_9 # undef BOOST_PP_SLOT_1_DIGIT_10 # # if BOOST_PP_SLOT_TEMP_10 == 0 # define BOOST_PP_SLOT_1_DIGIT_10 0 # elif BOOST_PP_SLOT_TEMP_10 == 1 # define BOOST_PP_SLOT_1_DIGIT_10 1 # elif BOOST_PP_SLOT_TEMP_10 == 2 # define BOOST_PP_SLOT_1_DIGIT_10 2 # elif BOOST_PP_SLOT_TEMP_10 == 3 # define BOOST_PP_SLOT_1_DIGIT_10 3 # elif BOOST_PP_SLOT_TEMP_10 == 4 # define BOOST_PP_SLOT_1_DIGIT_10 4 # elif BOOST_PP_SLOT_TEMP_10 == 5 # define BOOST_PP_SLOT_1_DIGIT_10 5 # elif BOOST_PP_SLOT_TEMP_10 == 6 # define BOOST_PP_SLOT_1_DIGIT_10 6 # elif BOOST_PP_SLOT_TEMP_10 == 7 # define BOOST_PP_SLOT_1_DIGIT_10 7 # elif BOOST_PP_SLOT_TEMP_10 == 8 # define BOOST_PP_SLOT_1_DIGIT_10 8 # elif BOOST_PP_SLOT_TEMP_10 == 9 # define BOOST_PP_SLOT_1_DIGIT_10 9 # endif # # if BOOST_PP_SLOT_TEMP_9 == 0 # define BOOST_PP_SLOT_1_DIGIT_9 0 # elif BOOST_PP_SLOT_TEMP_9 == 1 # define BOOST_PP_SLOT_1_DIGIT_9 1 # elif BOOST_PP_SLOT_TEMP_9 == 2 # define BOOST_PP_SLOT_1_DIGIT_9 2 # elif BOOST_PP_SLOT_TEMP_9 == 3 # define BOOST_PP_SLOT_1_DIGIT_9 3 # elif BOOST_PP_SLOT_TEMP_9 == 4 # define BOOST_PP_SLOT_1_DIGIT_9 4 # elif BOOST_PP_SLOT_TEMP_9 == 5 # define BOOST_PP_SLOT_1_DIGIT_9 5 # elif BOOST_PP_SLOT_TEMP_9 == 6 # define BOOST_PP_SLOT_1_DIGIT_9 6 # elif BOOST_PP_SLOT_TEMP_9 == 7 # define BOOST_PP_SLOT_1_DIGIT_9 7 # elif BOOST_PP_SLOT_TEMP_9 == 8 # define BOOST_PP_SLOT_1_DIGIT_9 8 # elif BOOST_PP_SLOT_TEMP_9 == 9 # define BOOST_PP_SLOT_1_DIGIT_9 9 # endif # # if BOOST_PP_SLOT_TEMP_8 == 0 # define BOOST_PP_SLOT_1_DIGIT_8 0 # elif BOOST_PP_SLOT_TEMP_8 == 1 # define BOOST_PP_SLOT_1_DIGIT_8 1 # elif BOOST_PP_SLOT_TEMP_8 == 2 # define BOOST_PP_SLOT_1_DIGIT_8 2 # elif BOOST_PP_SLOT_TEMP_8 == 3 # define BOOST_PP_SLOT_1_DIGIT_8 3 # elif BOOST_PP_SLOT_TEMP_8 == 4 # define BOOST_PP_SLOT_1_DIGIT_8 4 # elif BOOST_PP_SLOT_TEMP_8 == 5 # define BOOST_PP_SLOT_1_DIGIT_8 5 # elif BOOST_PP_SLOT_TEMP_8 == 6 # define BOOST_PP_SLOT_1_DIGIT_8 6 # elif BOOST_PP_SLOT_TEMP_8 == 7 # define BOOST_PP_SLOT_1_DIGIT_8 7 # elif BOOST_PP_SLOT_TEMP_8 == 8 # define BOOST_PP_SLOT_1_DIGIT_8 8 # elif BOOST_PP_SLOT_TEMP_8 == 9 # define BOOST_PP_SLOT_1_DIGIT_8 9 # endif # # if BOOST_PP_SLOT_TEMP_7 == 0 # define BOOST_PP_SLOT_1_DIGIT_7 0 # elif BOOST_PP_SLOT_TEMP_7 == 1 # define BOOST_PP_SLOT_1_DIGIT_7 1 # elif BOOST_PP_SLOT_TEMP_7 == 2 # define BOOST_PP_SLOT_1_DIGIT_7 2 # elif BOOST_PP_SLOT_TEMP_7 == 3 # define BOOST_PP_SLOT_1_DIGIT_7 3 # elif BOOST_PP_SLOT_TEMP_7 == 4 # define BOOST_PP_SLOT_1_DIGIT_7 4 # elif BOOST_PP_SLOT_TEMP_7 == 5 # define BOOST_PP_SLOT_1_DIGIT_7 5 # elif BOOST_PP_SLOT_TEMP_7 == 6 # define BOOST_PP_SLOT_1_DIGIT_7 6 # elif BOOST_PP_SLOT_TEMP_7 == 7 # define BOOST_PP_SLOT_1_DIGIT_7 7 # elif BOOST_PP_SLOT_TEMP_7 == 8 # define BOOST_PP_SLOT_1_DIGIT_7 8 # elif BOOST_PP_SLOT_TEMP_7 == 9 # define BOOST_PP_SLOT_1_DIGIT_7 9 # endif # # if BOOST_PP_SLOT_TEMP_6 == 0 # define BOOST_PP_SLOT_1_DIGIT_6 0 # elif BOOST_PP_SLOT_TEMP_6 == 1 # define BOOST_PP_SLOT_1_DIGIT_6 1 # elif BOOST_PP_SLOT_TEMP_6 == 2 # define BOOST_PP_SLOT_1_DIGIT_6 2 # elif BOOST_PP_SLOT_TEMP_6 == 3 # define BOOST_PP_SLOT_1_DIGIT_6 3 # elif BOOST_PP_SLOT_TEMP_6 == 4 # define BOOST_PP_SLOT_1_DIGIT_6 4 # elif BOOST_PP_SLOT_TEMP_6 == 5 # define BOOST_PP_SLOT_1_DIGIT_6 5 # elif BOOST_PP_SLOT_TEMP_6 == 6 # define BOOST_PP_SLOT_1_DIGIT_6 6 # elif BOOST_PP_SLOT_TEMP_6 == 7 # define BOOST_PP_SLOT_1_DIGIT_6 7 # elif BOOST_PP_SLOT_TEMP_6 == 8 # define BOOST_PP_SLOT_1_DIGIT_6 8 # elif BOOST_PP_SLOT_TEMP_6 == 9 # define BOOST_PP_SLOT_1_DIGIT_6 9 # endif # # if BOOST_PP_SLOT_TEMP_5 == 0 # define BOOST_PP_SLOT_1_DIGIT_5 0 # elif BOOST_PP_SLOT_TEMP_5 == 1 # define BOOST_PP_SLOT_1_DIGIT_5 1 # elif BOOST_PP_SLOT_TEMP_5 == 2 # define BOOST_PP_SLOT_1_DIGIT_5 2 # elif BOOST_PP_SLOT_TEMP_5 == 3 # define BOOST_PP_SLOT_1_DIGIT_5 3 # elif BOOST_PP_SLOT_TEMP_5 == 4 # define BOOST_PP_SLOT_1_DIGIT_5 4 # elif BOOST_PP_SLOT_TEMP_5 == 5 # define BOOST_PP_SLOT_1_DIGIT_5 5 # elif BOOST_PP_SLOT_TEMP_5 == 6 # define BOOST_PP_SLOT_1_DIGIT_5 6 # elif BOOST_PP_SLOT_TEMP_5 == 7 # define BOOST_PP_SLOT_1_DIGIT_5 7 # elif BOOST_PP_SLOT_TEMP_5 == 8 # define BOOST_PP_SLOT_1_DIGIT_5 8 # elif BOOST_PP_SLOT_TEMP_5 == 9 # define BOOST_PP_SLOT_1_DIGIT_5 9 # endif # # if BOOST_PP_SLOT_TEMP_4 == 0 # define BOOST_PP_SLOT_1_DIGIT_4 0 # elif BOOST_PP_SLOT_TEMP_4 == 1 # define BOOST_PP_SLOT_1_DIGIT_4 1 # elif BOOST_PP_SLOT_TEMP_4 == 2 # define BOOST_PP_SLOT_1_DIGIT_4 2 # elif BOOST_PP_SLOT_TEMP_4 == 3 # define BOOST_PP_SLOT_1_DIGIT_4 3 # elif BOOST_PP_SLOT_TEMP_4 == 4 # define BOOST_PP_SLOT_1_DIGIT_4 4 # elif BOOST_PP_SLOT_TEMP_4 == 5 # define BOOST_PP_SLOT_1_DIGIT_4 5 # elif BOOST_PP_SLOT_TEMP_4 == 6 # define BOOST_PP_SLOT_1_DIGIT_4 6 # elif BOOST_PP_SLOT_TEMP_4 == 7 # define BOOST_PP_SLOT_1_DIGIT_4 7 # elif BOOST_PP_SLOT_TEMP_4 == 8 # define BOOST_PP_SLOT_1_DIGIT_4 8 # elif BOOST_PP_SLOT_TEMP_4 == 9 # define BOOST_PP_SLOT_1_DIGIT_4 9 # endif # # if BOOST_PP_SLOT_TEMP_3 == 0 # define BOOST_PP_SLOT_1_DIGIT_3 0 # elif BOOST_PP_SLOT_TEMP_3 == 1 # define BOOST_PP_SLOT_1_DIGIT_3 1 # elif BOOST_PP_SLOT_TEMP_3 == 2 # define BOOST_PP_SLOT_1_DIGIT_3 2 # elif BOOST_PP_SLOT_TEMP_3 == 3 # define BOOST_PP_SLOT_1_DIGIT_3 3 # elif BOOST_PP_SLOT_TEMP_3 == 4 # define BOOST_PP_SLOT_1_DIGIT_3 4 # elif BOOST_PP_SLOT_TEMP_3 == 5 # define BOOST_PP_SLOT_1_DIGIT_3 5 # elif BOOST_PP_SLOT_TEMP_3 == 6 # define BOOST_PP_SLOT_1_DIGIT_3 6 # elif BOOST_PP_SLOT_TEMP_3 == 7 # define BOOST_PP_SLOT_1_DIGIT_3 7 # elif BOOST_PP_SLOT_TEMP_3 == 8 # define BOOST_PP_SLOT_1_DIGIT_3 8 # elif BOOST_PP_SLOT_TEMP_3 == 9 # define BOOST_PP_SLOT_1_DIGIT_3 9 # endif # # if BOOST_PP_SLOT_TEMP_2 == 0 # define BOOST_PP_SLOT_1_DIGIT_2 0 # elif BOOST_PP_SLOT_TEMP_2 == 1 # define BOOST_PP_SLOT_1_DIGIT_2 1 # elif BOOST_PP_SLOT_TEMP_2 == 2 # define BOOST_PP_SLOT_1_DIGIT_2 2 # elif BOOST_PP_SLOT_TEMP_2 == 3 # define BOOST_PP_SLOT_1_DIGIT_2 3 # elif BOOST_PP_SLOT_TEMP_2 == 4 # define BOOST_PP_SLOT_1_DIGIT_2 4 # elif BOOST_PP_SLOT_TEMP_2 == 5 # define BOOST_PP_SLOT_1_DIGIT_2 5 # elif BOOST_PP_SLOT_TEMP_2 == 6 # define BOOST_PP_SLOT_1_DIGIT_2 6 # elif BOOST_PP_SLOT_TEMP_2 == 7 # define BOOST_PP_SLOT_1_DIGIT_2 7 # elif BOOST_PP_SLOT_TEMP_2 == 8 # define BOOST_PP_SLOT_1_DIGIT_2 8 # elif BOOST_PP_SLOT_TEMP_2 == 9 # define BOOST_PP_SLOT_1_DIGIT_2 9 # endif # # if BOOST_PP_SLOT_TEMP_1 == 0 # define BOOST_PP_SLOT_1_DIGIT_1 0 # elif BOOST_PP_SLOT_TEMP_1 == 1 # define BOOST_PP_SLOT_1_DIGIT_1 1 # elif BOOST_PP_SLOT_TEMP_1 == 2 # define BOOST_PP_SLOT_1_DIGIT_1 2 # elif BOOST_PP_SLOT_TEMP_1 == 3 # define BOOST_PP_SLOT_1_DIGIT_1 3 # elif BOOST_PP_SLOT_TEMP_1 == 4 # define BOOST_PP_SLOT_1_DIGIT_1 4 # elif BOOST_PP_SLOT_TEMP_1 == 5 # define BOOST_PP_SLOT_1_DIGIT_1 5 # elif BOOST_PP_SLOT_TEMP_1 == 6 # define BOOST_PP_SLOT_1_DIGIT_1 6 # elif BOOST_PP_SLOT_TEMP_1 == 7 # define BOOST_PP_SLOT_1_DIGIT_1 7 # elif BOOST_PP_SLOT_TEMP_1 == 8 # define BOOST_PP_SLOT_1_DIGIT_1 8 # elif BOOST_PP_SLOT_TEMP_1 == 9 # define BOOST_PP_SLOT_1_DIGIT_1 9 # endif # # if BOOST_PP_SLOT_1_DIGIT_10 # define BOOST_PP_SLOT_1() BOOST_PP_SLOT_CC_10(BOOST_PP_SLOT_1_DIGIT_10, BOOST_PP_SLOT_1_DIGIT_9, BOOST_PP_SLOT_1_DIGIT_8, BOOST_PP_SLOT_1_DIGIT_7, BOOST_PP_SLOT_1_DIGIT_6, BOOST_PP_SLOT_1_DIGIT_5, BOOST_PP_SLOT_1_DIGIT_4, BOOST_PP_SLOT_1_DIGIT_3, BOOST_PP_SLOT_1_DIGIT_2, BOOST_PP_SLOT_1_DIGIT_1) # elif BOOST_PP_SLOT_1_DIGIT_9 # define BOOST_PP_SLOT_1() BOOST_PP_SLOT_CC_9(BOOST_PP_SLOT_1_DIGIT_9, BOOST_PP_SLOT_1_DIGIT_8, BOOST_PP_SLOT_1_DIGIT_7, BOOST_PP_SLOT_1_DIGIT_6, BOOST_PP_SLOT_1_DIGIT_5, BOOST_PP_SLOT_1_DIGIT_4, BOOST_PP_SLOT_1_DIGIT_3, BOOST_PP_SLOT_1_DIGIT_2, BOOST_PP_SLOT_1_DIGIT_1) # elif BOOST_PP_SLOT_1_DIGIT_8 # define BOOST_PP_SLOT_1() BOOST_PP_SLOT_CC_8(BOOST_PP_SLOT_1_DIGIT_8, BOOST_PP_SLOT_1_DIGIT_7, BOOST_PP_SLOT_1_DIGIT_6, BOOST_PP_SLOT_1_DIGIT_5, BOOST_PP_SLOT_1_DIGIT_4, BOOST_PP_SLOT_1_DIGIT_3, BOOST_PP_SLOT_1_DIGIT_2, BOOST_PP_SLOT_1_DIGIT_1) # elif BOOST_PP_SLOT_1_DIGIT_7 # define BOOST_PP_SLOT_1() BOOST_PP_SLOT_CC_7(BOOST_PP_SLOT_1_DIGIT_7, BOOST_PP_SLOT_1_DIGIT_6, BOOST_PP_SLOT_1_DIGIT_5, BOOST_PP_SLOT_1_DIGIT_4, BOOST_PP_SLOT_1_DIGIT_3, BOOST_PP_SLOT_1_DIGIT_2, BOOST_PP_SLOT_1_DIGIT_1) # elif BOOST_PP_SLOT_1_DIGIT_6 # define BOOST_PP_SLOT_1() BOOST_PP_SLOT_CC_6(BOOST_PP_SLOT_1_DIGIT_6, BOOST_PP_SLOT_1_DIGIT_5, BOOST_PP_SLOT_1_DIGIT_4, BOOST_PP_SLOT_1_DIGIT_3, BOOST_PP_SLOT_1_DIGIT_2, BOOST_PP_SLOT_1_DIGIT_1) # elif BOOST_PP_SLOT_1_DIGIT_5 # define BOOST_PP_SLOT_1() BOOST_PP_SLOT_CC_5(BOOST_PP_SLOT_1_DIGIT_5, BOOST_PP_SLOT_1_DIGIT_4, BOOST_PP_SLOT_1_DIGIT_3, BOOST_PP_SLOT_1_DIGIT_2, BOOST_PP_SLOT_1_DIGIT_1) # elif BOOST_PP_SLOT_1_DIGIT_4 # define BOOST_PP_SLOT_1() BOOST_PP_SLOT_CC_4(BOOST_PP_SLOT_1_DIGIT_4, BOOST_PP_SLOT_1_DIGIT_3, BOOST_PP_SLOT_1_DIGIT_2, BOOST_PP_SLOT_1_DIGIT_1) # elif BOOST_PP_SLOT_1_DIGIT_3 # define BOOST_PP_SLOT_1() BOOST_PP_SLOT_CC_3(BOOST_PP_SLOT_1_DIGIT_3, BOOST_PP_SLOT_1_DIGIT_2, BOOST_PP_SLOT_1_DIGIT_1) # elif BOOST_PP_SLOT_1_DIGIT_2 # define BOOST_PP_SLOT_1() BOOST_PP_SLOT_CC_2(BOOST_PP_SLOT_1_DIGIT_2, BOOST_PP_SLOT_1_DIGIT_1) # else # define BOOST_PP_SLOT_1() BOOST_PP_SLOT_1_DIGIT_1 # endif ================================================ FILE: benchmarks/boost/preprocessor/slot/detail/slot2.hpp ================================================ # /* ************************************************************************** # * * # * (C) Copyright Paul Mensonides 2002. # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # * * # ************************************************************************** */ # # /* See http://www.boost.org for most recent version. */ # # include # # undef BOOST_PP_SLOT_2 # # undef BOOST_PP_SLOT_2_DIGIT_1 # undef BOOST_PP_SLOT_2_DIGIT_2 # undef BOOST_PP_SLOT_2_DIGIT_3 # undef BOOST_PP_SLOT_2_DIGIT_4 # undef BOOST_PP_SLOT_2_DIGIT_5 # undef BOOST_PP_SLOT_2_DIGIT_6 # undef BOOST_PP_SLOT_2_DIGIT_7 # undef BOOST_PP_SLOT_2_DIGIT_8 # undef BOOST_PP_SLOT_2_DIGIT_9 # undef BOOST_PP_SLOT_2_DIGIT_10 # # if BOOST_PP_SLOT_TEMP_10 == 0 # define BOOST_PP_SLOT_2_DIGIT_10 0 # elif BOOST_PP_SLOT_TEMP_10 == 1 # define BOOST_PP_SLOT_2_DIGIT_10 1 # elif BOOST_PP_SLOT_TEMP_10 == 2 # define BOOST_PP_SLOT_2_DIGIT_10 2 # elif BOOST_PP_SLOT_TEMP_10 == 3 # define BOOST_PP_SLOT_2_DIGIT_10 3 # elif BOOST_PP_SLOT_TEMP_10 == 4 # define BOOST_PP_SLOT_2_DIGIT_10 4 # elif BOOST_PP_SLOT_TEMP_10 == 5 # define BOOST_PP_SLOT_2_DIGIT_10 5 # elif BOOST_PP_SLOT_TEMP_10 == 6 # define BOOST_PP_SLOT_2_DIGIT_10 6 # elif BOOST_PP_SLOT_TEMP_10 == 7 # define BOOST_PP_SLOT_2_DIGIT_10 7 # elif BOOST_PP_SLOT_TEMP_10 == 8 # define BOOST_PP_SLOT_2_DIGIT_10 8 # elif BOOST_PP_SLOT_TEMP_10 == 9 # define BOOST_PP_SLOT_2_DIGIT_10 9 # endif # # if BOOST_PP_SLOT_TEMP_9 == 0 # define BOOST_PP_SLOT_2_DIGIT_9 0 # elif BOOST_PP_SLOT_TEMP_9 == 1 # define BOOST_PP_SLOT_2_DIGIT_9 1 # elif BOOST_PP_SLOT_TEMP_9 == 2 # define BOOST_PP_SLOT_2_DIGIT_9 2 # elif BOOST_PP_SLOT_TEMP_9 == 3 # define BOOST_PP_SLOT_2_DIGIT_9 3 # elif BOOST_PP_SLOT_TEMP_9 == 4 # define BOOST_PP_SLOT_2_DIGIT_9 4 # elif BOOST_PP_SLOT_TEMP_9 == 5 # define BOOST_PP_SLOT_2_DIGIT_9 5 # elif BOOST_PP_SLOT_TEMP_9 == 6 # define BOOST_PP_SLOT_2_DIGIT_9 6 # elif BOOST_PP_SLOT_TEMP_9 == 7 # define BOOST_PP_SLOT_2_DIGIT_9 7 # elif BOOST_PP_SLOT_TEMP_9 == 8 # define BOOST_PP_SLOT_2_DIGIT_9 8 # elif BOOST_PP_SLOT_TEMP_9 == 9 # define BOOST_PP_SLOT_2_DIGIT_9 9 # endif # # if BOOST_PP_SLOT_TEMP_8 == 0 # define BOOST_PP_SLOT_2_DIGIT_8 0 # elif BOOST_PP_SLOT_TEMP_8 == 1 # define BOOST_PP_SLOT_2_DIGIT_8 1 # elif BOOST_PP_SLOT_TEMP_8 == 2 # define BOOST_PP_SLOT_2_DIGIT_8 2 # elif BOOST_PP_SLOT_TEMP_8 == 3 # define BOOST_PP_SLOT_2_DIGIT_8 3 # elif BOOST_PP_SLOT_TEMP_8 == 4 # define BOOST_PP_SLOT_2_DIGIT_8 4 # elif BOOST_PP_SLOT_TEMP_8 == 5 # define BOOST_PP_SLOT_2_DIGIT_8 5 # elif BOOST_PP_SLOT_TEMP_8 == 6 # define BOOST_PP_SLOT_2_DIGIT_8 6 # elif BOOST_PP_SLOT_TEMP_8 == 7 # define BOOST_PP_SLOT_2_DIGIT_8 7 # elif BOOST_PP_SLOT_TEMP_8 == 8 # define BOOST_PP_SLOT_2_DIGIT_8 8 # elif BOOST_PP_SLOT_TEMP_8 == 9 # define BOOST_PP_SLOT_2_DIGIT_8 9 # endif # # if BOOST_PP_SLOT_TEMP_7 == 0 # define BOOST_PP_SLOT_2_DIGIT_7 0 # elif BOOST_PP_SLOT_TEMP_7 == 1 # define BOOST_PP_SLOT_2_DIGIT_7 1 # elif BOOST_PP_SLOT_TEMP_7 == 2 # define BOOST_PP_SLOT_2_DIGIT_7 2 # elif BOOST_PP_SLOT_TEMP_7 == 3 # define BOOST_PP_SLOT_2_DIGIT_7 3 # elif BOOST_PP_SLOT_TEMP_7 == 4 # define BOOST_PP_SLOT_2_DIGIT_7 4 # elif BOOST_PP_SLOT_TEMP_7 == 5 # define BOOST_PP_SLOT_2_DIGIT_7 5 # elif BOOST_PP_SLOT_TEMP_7 == 6 # define BOOST_PP_SLOT_2_DIGIT_7 6 # elif BOOST_PP_SLOT_TEMP_7 == 7 # define BOOST_PP_SLOT_2_DIGIT_7 7 # elif BOOST_PP_SLOT_TEMP_7 == 8 # define BOOST_PP_SLOT_2_DIGIT_7 8 # elif BOOST_PP_SLOT_TEMP_7 == 9 # define BOOST_PP_SLOT_2_DIGIT_7 9 # endif # # if BOOST_PP_SLOT_TEMP_6 == 0 # define BOOST_PP_SLOT_2_DIGIT_6 0 # elif BOOST_PP_SLOT_TEMP_6 == 1 # define BOOST_PP_SLOT_2_DIGIT_6 1 # elif BOOST_PP_SLOT_TEMP_6 == 2 # define BOOST_PP_SLOT_2_DIGIT_6 2 # elif BOOST_PP_SLOT_TEMP_6 == 3 # define BOOST_PP_SLOT_2_DIGIT_6 3 # elif BOOST_PP_SLOT_TEMP_6 == 4 # define BOOST_PP_SLOT_2_DIGIT_6 4 # elif BOOST_PP_SLOT_TEMP_6 == 5 # define BOOST_PP_SLOT_2_DIGIT_6 5 # elif BOOST_PP_SLOT_TEMP_6 == 6 # define BOOST_PP_SLOT_2_DIGIT_6 6 # elif BOOST_PP_SLOT_TEMP_6 == 7 # define BOOST_PP_SLOT_2_DIGIT_6 7 # elif BOOST_PP_SLOT_TEMP_6 == 8 # define BOOST_PP_SLOT_2_DIGIT_6 8 # elif BOOST_PP_SLOT_TEMP_6 == 9 # define BOOST_PP_SLOT_2_DIGIT_6 9 # endif # # if BOOST_PP_SLOT_TEMP_5 == 0 # define BOOST_PP_SLOT_2_DIGIT_5 0 # elif BOOST_PP_SLOT_TEMP_5 == 1 # define BOOST_PP_SLOT_2_DIGIT_5 1 # elif BOOST_PP_SLOT_TEMP_5 == 2 # define BOOST_PP_SLOT_2_DIGIT_5 2 # elif BOOST_PP_SLOT_TEMP_5 == 3 # define BOOST_PP_SLOT_2_DIGIT_5 3 # elif BOOST_PP_SLOT_TEMP_5 == 4 # define BOOST_PP_SLOT_2_DIGIT_5 4 # elif BOOST_PP_SLOT_TEMP_5 == 5 # define BOOST_PP_SLOT_2_DIGIT_5 5 # elif BOOST_PP_SLOT_TEMP_5 == 6 # define BOOST_PP_SLOT_2_DIGIT_5 6 # elif BOOST_PP_SLOT_TEMP_5 == 7 # define BOOST_PP_SLOT_2_DIGIT_5 7 # elif BOOST_PP_SLOT_TEMP_5 == 8 # define BOOST_PP_SLOT_2_DIGIT_5 8 # elif BOOST_PP_SLOT_TEMP_5 == 9 # define BOOST_PP_SLOT_2_DIGIT_5 9 # endif # # if BOOST_PP_SLOT_TEMP_4 == 0 # define BOOST_PP_SLOT_2_DIGIT_4 0 # elif BOOST_PP_SLOT_TEMP_4 == 1 # define BOOST_PP_SLOT_2_DIGIT_4 1 # elif BOOST_PP_SLOT_TEMP_4 == 2 # define BOOST_PP_SLOT_2_DIGIT_4 2 # elif BOOST_PP_SLOT_TEMP_4 == 3 # define BOOST_PP_SLOT_2_DIGIT_4 3 # elif BOOST_PP_SLOT_TEMP_4 == 4 # define BOOST_PP_SLOT_2_DIGIT_4 4 # elif BOOST_PP_SLOT_TEMP_4 == 5 # define BOOST_PP_SLOT_2_DIGIT_4 5 # elif BOOST_PP_SLOT_TEMP_4 == 6 # define BOOST_PP_SLOT_2_DIGIT_4 6 # elif BOOST_PP_SLOT_TEMP_4 == 7 # define BOOST_PP_SLOT_2_DIGIT_4 7 # elif BOOST_PP_SLOT_TEMP_4 == 8 # define BOOST_PP_SLOT_2_DIGIT_4 8 # elif BOOST_PP_SLOT_TEMP_4 == 9 # define BOOST_PP_SLOT_2_DIGIT_4 9 # endif # # if BOOST_PP_SLOT_TEMP_3 == 0 # define BOOST_PP_SLOT_2_DIGIT_3 0 # elif BOOST_PP_SLOT_TEMP_3 == 1 # define BOOST_PP_SLOT_2_DIGIT_3 1 # elif BOOST_PP_SLOT_TEMP_3 == 2 # define BOOST_PP_SLOT_2_DIGIT_3 2 # elif BOOST_PP_SLOT_TEMP_3 == 3 # define BOOST_PP_SLOT_2_DIGIT_3 3 # elif BOOST_PP_SLOT_TEMP_3 == 4 # define BOOST_PP_SLOT_2_DIGIT_3 4 # elif BOOST_PP_SLOT_TEMP_3 == 5 # define BOOST_PP_SLOT_2_DIGIT_3 5 # elif BOOST_PP_SLOT_TEMP_3 == 6 # define BOOST_PP_SLOT_2_DIGIT_3 6 # elif BOOST_PP_SLOT_TEMP_3 == 7 # define BOOST_PP_SLOT_2_DIGIT_3 7 # elif BOOST_PP_SLOT_TEMP_3 == 8 # define BOOST_PP_SLOT_2_DIGIT_3 8 # elif BOOST_PP_SLOT_TEMP_3 == 9 # define BOOST_PP_SLOT_2_DIGIT_3 9 # endif # # if BOOST_PP_SLOT_TEMP_2 == 0 # define BOOST_PP_SLOT_2_DIGIT_2 0 # elif BOOST_PP_SLOT_TEMP_2 == 1 # define BOOST_PP_SLOT_2_DIGIT_2 1 # elif BOOST_PP_SLOT_TEMP_2 == 2 # define BOOST_PP_SLOT_2_DIGIT_2 2 # elif BOOST_PP_SLOT_TEMP_2 == 3 # define BOOST_PP_SLOT_2_DIGIT_2 3 # elif BOOST_PP_SLOT_TEMP_2 == 4 # define BOOST_PP_SLOT_2_DIGIT_2 4 # elif BOOST_PP_SLOT_TEMP_2 == 5 # define BOOST_PP_SLOT_2_DIGIT_2 5 # elif BOOST_PP_SLOT_TEMP_2 == 6 # define BOOST_PP_SLOT_2_DIGIT_2 6 # elif BOOST_PP_SLOT_TEMP_2 == 7 # define BOOST_PP_SLOT_2_DIGIT_2 7 # elif BOOST_PP_SLOT_TEMP_2 == 8 # define BOOST_PP_SLOT_2_DIGIT_2 8 # elif BOOST_PP_SLOT_TEMP_2 == 9 # define BOOST_PP_SLOT_2_DIGIT_2 9 # endif # # if BOOST_PP_SLOT_TEMP_1 == 0 # define BOOST_PP_SLOT_2_DIGIT_1 0 # elif BOOST_PP_SLOT_TEMP_1 == 1 # define BOOST_PP_SLOT_2_DIGIT_1 1 # elif BOOST_PP_SLOT_TEMP_1 == 2 # define BOOST_PP_SLOT_2_DIGIT_1 2 # elif BOOST_PP_SLOT_TEMP_1 == 3 # define BOOST_PP_SLOT_2_DIGIT_1 3 # elif BOOST_PP_SLOT_TEMP_1 == 4 # define BOOST_PP_SLOT_2_DIGIT_1 4 # elif BOOST_PP_SLOT_TEMP_1 == 5 # define BOOST_PP_SLOT_2_DIGIT_1 5 # elif BOOST_PP_SLOT_TEMP_1 == 6 # define BOOST_PP_SLOT_2_DIGIT_1 6 # elif BOOST_PP_SLOT_TEMP_1 == 7 # define BOOST_PP_SLOT_2_DIGIT_1 7 # elif BOOST_PP_SLOT_TEMP_1 == 8 # define BOOST_PP_SLOT_2_DIGIT_1 8 # elif BOOST_PP_SLOT_TEMP_1 == 9 # define BOOST_PP_SLOT_2_DIGIT_1 9 # endif # # if BOOST_PP_SLOT_2_DIGIT_10 # define BOOST_PP_SLOT_2() BOOST_PP_SLOT_CC_10(BOOST_PP_SLOT_2_DIGIT_10, BOOST_PP_SLOT_2_DIGIT_9, BOOST_PP_SLOT_2_DIGIT_8, BOOST_PP_SLOT_2_DIGIT_7, BOOST_PP_SLOT_2_DIGIT_6, BOOST_PP_SLOT_2_DIGIT_5, BOOST_PP_SLOT_2_DIGIT_4, BOOST_PP_SLOT_2_DIGIT_3, BOOST_PP_SLOT_2_DIGIT_2, BOOST_PP_SLOT_2_DIGIT_1) # elif BOOST_PP_SLOT_2_DIGIT_9 # define BOOST_PP_SLOT_2() BOOST_PP_SLOT_CC_9(BOOST_PP_SLOT_2_DIGIT_9, BOOST_PP_SLOT_2_DIGIT_8, BOOST_PP_SLOT_2_DIGIT_7, BOOST_PP_SLOT_2_DIGIT_6, BOOST_PP_SLOT_2_DIGIT_5, BOOST_PP_SLOT_2_DIGIT_4, BOOST_PP_SLOT_2_DIGIT_3, BOOST_PP_SLOT_2_DIGIT_2, BOOST_PP_SLOT_2_DIGIT_1) # elif BOOST_PP_SLOT_2_DIGIT_8 # define BOOST_PP_SLOT_2() BOOST_PP_SLOT_CC_8(BOOST_PP_SLOT_2_DIGIT_8, BOOST_PP_SLOT_2_DIGIT_7, BOOST_PP_SLOT_2_DIGIT_6, BOOST_PP_SLOT_2_DIGIT_5, BOOST_PP_SLOT_2_DIGIT_4, BOOST_PP_SLOT_2_DIGIT_3, BOOST_PP_SLOT_2_DIGIT_2, BOOST_PP_SLOT_2_DIGIT_1) # elif BOOST_PP_SLOT_2_DIGIT_7 # define BOOST_PP_SLOT_2() BOOST_PP_SLOT_CC_7(BOOST_PP_SLOT_2_DIGIT_7, BOOST_PP_SLOT_2_DIGIT_6, BOOST_PP_SLOT_2_DIGIT_5, BOOST_PP_SLOT_2_DIGIT_4, BOOST_PP_SLOT_2_DIGIT_3, BOOST_PP_SLOT_2_DIGIT_2, BOOST_PP_SLOT_2_DIGIT_1) # elif BOOST_PP_SLOT_2_DIGIT_6 # define BOOST_PP_SLOT_2() BOOST_PP_SLOT_CC_6(BOOST_PP_SLOT_2_DIGIT_6, BOOST_PP_SLOT_2_DIGIT_5, BOOST_PP_SLOT_2_DIGIT_4, BOOST_PP_SLOT_2_DIGIT_3, BOOST_PP_SLOT_2_DIGIT_2, BOOST_PP_SLOT_2_DIGIT_1) # elif BOOST_PP_SLOT_2_DIGIT_5 # define BOOST_PP_SLOT_2() BOOST_PP_SLOT_CC_5(BOOST_PP_SLOT_2_DIGIT_5, BOOST_PP_SLOT_2_DIGIT_4, BOOST_PP_SLOT_2_DIGIT_3, BOOST_PP_SLOT_2_DIGIT_2, BOOST_PP_SLOT_2_DIGIT_1) # elif BOOST_PP_SLOT_2_DIGIT_4 # define BOOST_PP_SLOT_2() BOOST_PP_SLOT_CC_4(BOOST_PP_SLOT_2_DIGIT_4, BOOST_PP_SLOT_2_DIGIT_3, BOOST_PP_SLOT_2_DIGIT_2, BOOST_PP_SLOT_2_DIGIT_1) # elif BOOST_PP_SLOT_2_DIGIT_3 # define BOOST_PP_SLOT_2() BOOST_PP_SLOT_CC_3(BOOST_PP_SLOT_2_DIGIT_3, BOOST_PP_SLOT_2_DIGIT_2, BOOST_PP_SLOT_2_DIGIT_1) # elif BOOST_PP_SLOT_2_DIGIT_2 # define BOOST_PP_SLOT_2() BOOST_PP_SLOT_CC_2(BOOST_PP_SLOT_2_DIGIT_2, BOOST_PP_SLOT_2_DIGIT_1) # else # define BOOST_PP_SLOT_2() BOOST_PP_SLOT_2_DIGIT_1 # endif ================================================ FILE: benchmarks/boost/preprocessor/slot/detail/slot3.hpp ================================================ # /* ************************************************************************** # * * # * (C) Copyright Paul Mensonides 2002. # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # * * # ************************************************************************** */ # # /* See http://www.boost.org for most recent version. */ # # include # # undef BOOST_PP_SLOT_3 # # undef BOOST_PP_SLOT_3_DIGIT_1 # undef BOOST_PP_SLOT_3_DIGIT_2 # undef BOOST_PP_SLOT_3_DIGIT_3 # undef BOOST_PP_SLOT_3_DIGIT_4 # undef BOOST_PP_SLOT_3_DIGIT_5 # undef BOOST_PP_SLOT_3_DIGIT_6 # undef BOOST_PP_SLOT_3_DIGIT_7 # undef BOOST_PP_SLOT_3_DIGIT_8 # undef BOOST_PP_SLOT_3_DIGIT_9 # undef BOOST_PP_SLOT_3_DIGIT_10 # # if BOOST_PP_SLOT_TEMP_10 == 0 # define BOOST_PP_SLOT_3_DIGIT_10 0 # elif BOOST_PP_SLOT_TEMP_10 == 1 # define BOOST_PP_SLOT_3_DIGIT_10 1 # elif BOOST_PP_SLOT_TEMP_10 == 2 # define BOOST_PP_SLOT_3_DIGIT_10 2 # elif BOOST_PP_SLOT_TEMP_10 == 3 # define BOOST_PP_SLOT_3_DIGIT_10 3 # elif BOOST_PP_SLOT_TEMP_10 == 4 # define BOOST_PP_SLOT_3_DIGIT_10 4 # elif BOOST_PP_SLOT_TEMP_10 == 5 # define BOOST_PP_SLOT_3_DIGIT_10 5 # elif BOOST_PP_SLOT_TEMP_10 == 6 # define BOOST_PP_SLOT_3_DIGIT_10 6 # elif BOOST_PP_SLOT_TEMP_10 == 7 # define BOOST_PP_SLOT_3_DIGIT_10 7 # elif BOOST_PP_SLOT_TEMP_10 == 8 # define BOOST_PP_SLOT_3_DIGIT_10 8 # elif BOOST_PP_SLOT_TEMP_10 == 9 # define BOOST_PP_SLOT_3_DIGIT_10 9 # endif # # if BOOST_PP_SLOT_TEMP_9 == 0 # define BOOST_PP_SLOT_3_DIGIT_9 0 # elif BOOST_PP_SLOT_TEMP_9 == 1 # define BOOST_PP_SLOT_3_DIGIT_9 1 # elif BOOST_PP_SLOT_TEMP_9 == 2 # define BOOST_PP_SLOT_3_DIGIT_9 2 # elif BOOST_PP_SLOT_TEMP_9 == 3 # define BOOST_PP_SLOT_3_DIGIT_9 3 # elif BOOST_PP_SLOT_TEMP_9 == 4 # define BOOST_PP_SLOT_3_DIGIT_9 4 # elif BOOST_PP_SLOT_TEMP_9 == 5 # define BOOST_PP_SLOT_3_DIGIT_9 5 # elif BOOST_PP_SLOT_TEMP_9 == 6 # define BOOST_PP_SLOT_3_DIGIT_9 6 # elif BOOST_PP_SLOT_TEMP_9 == 7 # define BOOST_PP_SLOT_3_DIGIT_9 7 # elif BOOST_PP_SLOT_TEMP_9 == 8 # define BOOST_PP_SLOT_3_DIGIT_9 8 # elif BOOST_PP_SLOT_TEMP_9 == 9 # define BOOST_PP_SLOT_3_DIGIT_9 9 # endif # # if BOOST_PP_SLOT_TEMP_8 == 0 # define BOOST_PP_SLOT_3_DIGIT_8 0 # elif BOOST_PP_SLOT_TEMP_8 == 1 # define BOOST_PP_SLOT_3_DIGIT_8 1 # elif BOOST_PP_SLOT_TEMP_8 == 2 # define BOOST_PP_SLOT_3_DIGIT_8 2 # elif BOOST_PP_SLOT_TEMP_8 == 3 # define BOOST_PP_SLOT_3_DIGIT_8 3 # elif BOOST_PP_SLOT_TEMP_8 == 4 # define BOOST_PP_SLOT_3_DIGIT_8 4 # elif BOOST_PP_SLOT_TEMP_8 == 5 # define BOOST_PP_SLOT_3_DIGIT_8 5 # elif BOOST_PP_SLOT_TEMP_8 == 6 # define BOOST_PP_SLOT_3_DIGIT_8 6 # elif BOOST_PP_SLOT_TEMP_8 == 7 # define BOOST_PP_SLOT_3_DIGIT_8 7 # elif BOOST_PP_SLOT_TEMP_8 == 8 # define BOOST_PP_SLOT_3_DIGIT_8 8 # elif BOOST_PP_SLOT_TEMP_8 == 9 # define BOOST_PP_SLOT_3_DIGIT_8 9 # endif # # if BOOST_PP_SLOT_TEMP_7 == 0 # define BOOST_PP_SLOT_3_DIGIT_7 0 # elif BOOST_PP_SLOT_TEMP_7 == 1 # define BOOST_PP_SLOT_3_DIGIT_7 1 # elif BOOST_PP_SLOT_TEMP_7 == 2 # define BOOST_PP_SLOT_3_DIGIT_7 2 # elif BOOST_PP_SLOT_TEMP_7 == 3 # define BOOST_PP_SLOT_3_DIGIT_7 3 # elif BOOST_PP_SLOT_TEMP_7 == 4 # define BOOST_PP_SLOT_3_DIGIT_7 4 # elif BOOST_PP_SLOT_TEMP_7 == 5 # define BOOST_PP_SLOT_3_DIGIT_7 5 # elif BOOST_PP_SLOT_TEMP_7 == 6 # define BOOST_PP_SLOT_3_DIGIT_7 6 # elif BOOST_PP_SLOT_TEMP_7 == 7 # define BOOST_PP_SLOT_3_DIGIT_7 7 # elif BOOST_PP_SLOT_TEMP_7 == 8 # define BOOST_PP_SLOT_3_DIGIT_7 8 # elif BOOST_PP_SLOT_TEMP_7 == 9 # define BOOST_PP_SLOT_3_DIGIT_7 9 # endif # # if BOOST_PP_SLOT_TEMP_6 == 0 # define BOOST_PP_SLOT_3_DIGIT_6 0 # elif BOOST_PP_SLOT_TEMP_6 == 1 # define BOOST_PP_SLOT_3_DIGIT_6 1 # elif BOOST_PP_SLOT_TEMP_6 == 2 # define BOOST_PP_SLOT_3_DIGIT_6 2 # elif BOOST_PP_SLOT_TEMP_6 == 3 # define BOOST_PP_SLOT_3_DIGIT_6 3 # elif BOOST_PP_SLOT_TEMP_6 == 4 # define BOOST_PP_SLOT_3_DIGIT_6 4 # elif BOOST_PP_SLOT_TEMP_6 == 5 # define BOOST_PP_SLOT_3_DIGIT_6 5 # elif BOOST_PP_SLOT_TEMP_6 == 6 # define BOOST_PP_SLOT_3_DIGIT_6 6 # elif BOOST_PP_SLOT_TEMP_6 == 7 # define BOOST_PP_SLOT_3_DIGIT_6 7 # elif BOOST_PP_SLOT_TEMP_6 == 8 # define BOOST_PP_SLOT_3_DIGIT_6 8 # elif BOOST_PP_SLOT_TEMP_6 == 9 # define BOOST_PP_SLOT_3_DIGIT_6 9 # endif # # if BOOST_PP_SLOT_TEMP_5 == 0 # define BOOST_PP_SLOT_3_DIGIT_5 0 # elif BOOST_PP_SLOT_TEMP_5 == 1 # define BOOST_PP_SLOT_3_DIGIT_5 1 # elif BOOST_PP_SLOT_TEMP_5 == 2 # define BOOST_PP_SLOT_3_DIGIT_5 2 # elif BOOST_PP_SLOT_TEMP_5 == 3 # define BOOST_PP_SLOT_3_DIGIT_5 3 # elif BOOST_PP_SLOT_TEMP_5 == 4 # define BOOST_PP_SLOT_3_DIGIT_5 4 # elif BOOST_PP_SLOT_TEMP_5 == 5 # define BOOST_PP_SLOT_3_DIGIT_5 5 # elif BOOST_PP_SLOT_TEMP_5 == 6 # define BOOST_PP_SLOT_3_DIGIT_5 6 # elif BOOST_PP_SLOT_TEMP_5 == 7 # define BOOST_PP_SLOT_3_DIGIT_5 7 # elif BOOST_PP_SLOT_TEMP_5 == 8 # define BOOST_PP_SLOT_3_DIGIT_5 8 # elif BOOST_PP_SLOT_TEMP_5 == 9 # define BOOST_PP_SLOT_3_DIGIT_5 9 # endif # # if BOOST_PP_SLOT_TEMP_4 == 0 # define BOOST_PP_SLOT_3_DIGIT_4 0 # elif BOOST_PP_SLOT_TEMP_4 == 1 # define BOOST_PP_SLOT_3_DIGIT_4 1 # elif BOOST_PP_SLOT_TEMP_4 == 2 # define BOOST_PP_SLOT_3_DIGIT_4 2 # elif BOOST_PP_SLOT_TEMP_4 == 3 # define BOOST_PP_SLOT_3_DIGIT_4 3 # elif BOOST_PP_SLOT_TEMP_4 == 4 # define BOOST_PP_SLOT_3_DIGIT_4 4 # elif BOOST_PP_SLOT_TEMP_4 == 5 # define BOOST_PP_SLOT_3_DIGIT_4 5 # elif BOOST_PP_SLOT_TEMP_4 == 6 # define BOOST_PP_SLOT_3_DIGIT_4 6 # elif BOOST_PP_SLOT_TEMP_4 == 7 # define BOOST_PP_SLOT_3_DIGIT_4 7 # elif BOOST_PP_SLOT_TEMP_4 == 8 # define BOOST_PP_SLOT_3_DIGIT_4 8 # elif BOOST_PP_SLOT_TEMP_4 == 9 # define BOOST_PP_SLOT_3_DIGIT_4 9 # endif # # if BOOST_PP_SLOT_TEMP_3 == 0 # define BOOST_PP_SLOT_3_DIGIT_3 0 # elif BOOST_PP_SLOT_TEMP_3 == 1 # define BOOST_PP_SLOT_3_DIGIT_3 1 # elif BOOST_PP_SLOT_TEMP_3 == 2 # define BOOST_PP_SLOT_3_DIGIT_3 2 # elif BOOST_PP_SLOT_TEMP_3 == 3 # define BOOST_PP_SLOT_3_DIGIT_3 3 # elif BOOST_PP_SLOT_TEMP_3 == 4 # define BOOST_PP_SLOT_3_DIGIT_3 4 # elif BOOST_PP_SLOT_TEMP_3 == 5 # define BOOST_PP_SLOT_3_DIGIT_3 5 # elif BOOST_PP_SLOT_TEMP_3 == 6 # define BOOST_PP_SLOT_3_DIGIT_3 6 # elif BOOST_PP_SLOT_TEMP_3 == 7 # define BOOST_PP_SLOT_3_DIGIT_3 7 # elif BOOST_PP_SLOT_TEMP_3 == 8 # define BOOST_PP_SLOT_3_DIGIT_3 8 # elif BOOST_PP_SLOT_TEMP_3 == 9 # define BOOST_PP_SLOT_3_DIGIT_3 9 # endif # # if BOOST_PP_SLOT_TEMP_2 == 0 # define BOOST_PP_SLOT_3_DIGIT_2 0 # elif BOOST_PP_SLOT_TEMP_2 == 1 # define BOOST_PP_SLOT_3_DIGIT_2 1 # elif BOOST_PP_SLOT_TEMP_2 == 2 # define BOOST_PP_SLOT_3_DIGIT_2 2 # elif BOOST_PP_SLOT_TEMP_2 == 3 # define BOOST_PP_SLOT_3_DIGIT_2 3 # elif BOOST_PP_SLOT_TEMP_2 == 4 # define BOOST_PP_SLOT_3_DIGIT_2 4 # elif BOOST_PP_SLOT_TEMP_2 == 5 # define BOOST_PP_SLOT_3_DIGIT_2 5 # elif BOOST_PP_SLOT_TEMP_2 == 6 # define BOOST_PP_SLOT_3_DIGIT_2 6 # elif BOOST_PP_SLOT_TEMP_2 == 7 # define BOOST_PP_SLOT_3_DIGIT_2 7 # elif BOOST_PP_SLOT_TEMP_2 == 8 # define BOOST_PP_SLOT_3_DIGIT_2 8 # elif BOOST_PP_SLOT_TEMP_2 == 9 # define BOOST_PP_SLOT_3_DIGIT_2 9 # endif # # if BOOST_PP_SLOT_TEMP_1 == 0 # define BOOST_PP_SLOT_3_DIGIT_1 0 # elif BOOST_PP_SLOT_TEMP_1 == 1 # define BOOST_PP_SLOT_3_DIGIT_1 1 # elif BOOST_PP_SLOT_TEMP_1 == 2 # define BOOST_PP_SLOT_3_DIGIT_1 2 # elif BOOST_PP_SLOT_TEMP_1 == 3 # define BOOST_PP_SLOT_3_DIGIT_1 3 # elif BOOST_PP_SLOT_TEMP_1 == 4 # define BOOST_PP_SLOT_3_DIGIT_1 4 # elif BOOST_PP_SLOT_TEMP_1 == 5 # define BOOST_PP_SLOT_3_DIGIT_1 5 # elif BOOST_PP_SLOT_TEMP_1 == 6 # define BOOST_PP_SLOT_3_DIGIT_1 6 # elif BOOST_PP_SLOT_TEMP_1 == 7 # define BOOST_PP_SLOT_3_DIGIT_1 7 # elif BOOST_PP_SLOT_TEMP_1 == 8 # define BOOST_PP_SLOT_3_DIGIT_1 8 # elif BOOST_PP_SLOT_TEMP_1 == 9 # define BOOST_PP_SLOT_3_DIGIT_1 9 # endif # # if BOOST_PP_SLOT_3_DIGIT_10 # define BOOST_PP_SLOT_3() BOOST_PP_SLOT_CC_10(BOOST_PP_SLOT_3_DIGIT_10, BOOST_PP_SLOT_3_DIGIT_9, BOOST_PP_SLOT_3_DIGIT_8, BOOST_PP_SLOT_3_DIGIT_7, BOOST_PP_SLOT_3_DIGIT_6, BOOST_PP_SLOT_3_DIGIT_5, BOOST_PP_SLOT_3_DIGIT_4, BOOST_PP_SLOT_3_DIGIT_3, BOOST_PP_SLOT_3_DIGIT_2, BOOST_PP_SLOT_3_DIGIT_1) # elif BOOST_PP_SLOT_3_DIGIT_9 # define BOOST_PP_SLOT_3() BOOST_PP_SLOT_CC_9(BOOST_PP_SLOT_3_DIGIT_9, BOOST_PP_SLOT_3_DIGIT_8, BOOST_PP_SLOT_3_DIGIT_7, BOOST_PP_SLOT_3_DIGIT_6, BOOST_PP_SLOT_3_DIGIT_5, BOOST_PP_SLOT_3_DIGIT_4, BOOST_PP_SLOT_3_DIGIT_3, BOOST_PP_SLOT_3_DIGIT_2, BOOST_PP_SLOT_3_DIGIT_1) # elif BOOST_PP_SLOT_3_DIGIT_8 # define BOOST_PP_SLOT_3() BOOST_PP_SLOT_CC_8(BOOST_PP_SLOT_3_DIGIT_8, BOOST_PP_SLOT_3_DIGIT_7, BOOST_PP_SLOT_3_DIGIT_6, BOOST_PP_SLOT_3_DIGIT_5, BOOST_PP_SLOT_3_DIGIT_4, BOOST_PP_SLOT_3_DIGIT_3, BOOST_PP_SLOT_3_DIGIT_2, BOOST_PP_SLOT_3_DIGIT_1) # elif BOOST_PP_SLOT_3_DIGIT_7 # define BOOST_PP_SLOT_3() BOOST_PP_SLOT_CC_7(BOOST_PP_SLOT_3_DIGIT_7, BOOST_PP_SLOT_3_DIGIT_6, BOOST_PP_SLOT_3_DIGIT_5, BOOST_PP_SLOT_3_DIGIT_4, BOOST_PP_SLOT_3_DIGIT_3, BOOST_PP_SLOT_3_DIGIT_2, BOOST_PP_SLOT_3_DIGIT_1) # elif BOOST_PP_SLOT_3_DIGIT_6 # define BOOST_PP_SLOT_3() BOOST_PP_SLOT_CC_6(BOOST_PP_SLOT_3_DIGIT_6, BOOST_PP_SLOT_3_DIGIT_5, BOOST_PP_SLOT_3_DIGIT_4, BOOST_PP_SLOT_3_DIGIT_3, BOOST_PP_SLOT_3_DIGIT_2, BOOST_PP_SLOT_3_DIGIT_1) # elif BOOST_PP_SLOT_3_DIGIT_5 # define BOOST_PP_SLOT_3() BOOST_PP_SLOT_CC_5(BOOST_PP_SLOT_3_DIGIT_5, BOOST_PP_SLOT_3_DIGIT_4, BOOST_PP_SLOT_3_DIGIT_3, BOOST_PP_SLOT_3_DIGIT_2, BOOST_PP_SLOT_3_DIGIT_1) # elif BOOST_PP_SLOT_3_DIGIT_4 # define BOOST_PP_SLOT_3() BOOST_PP_SLOT_CC_4(BOOST_PP_SLOT_3_DIGIT_4, BOOST_PP_SLOT_3_DIGIT_3, BOOST_PP_SLOT_3_DIGIT_2, BOOST_PP_SLOT_3_DIGIT_1) # elif BOOST_PP_SLOT_3_DIGIT_3 # define BOOST_PP_SLOT_3() BOOST_PP_SLOT_CC_3(BOOST_PP_SLOT_3_DIGIT_3, BOOST_PP_SLOT_3_DIGIT_2, BOOST_PP_SLOT_3_DIGIT_1) # elif BOOST_PP_SLOT_3_DIGIT_2 # define BOOST_PP_SLOT_3() BOOST_PP_SLOT_CC_2(BOOST_PP_SLOT_3_DIGIT_2, BOOST_PP_SLOT_3_DIGIT_1) # else # define BOOST_PP_SLOT_3() BOOST_PP_SLOT_3_DIGIT_1 # endif ================================================ FILE: benchmarks/boost/preprocessor/slot/detail/slot4.hpp ================================================ # /* ************************************************************************** # * * # * (C) Copyright Paul Mensonides 2002. # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # * * # ************************************************************************** */ # # /* See http://www.boost.org for most recent version. */ # # include # # undef BOOST_PP_SLOT_4 # # undef BOOST_PP_SLOT_4_DIGIT_1 # undef BOOST_PP_SLOT_4_DIGIT_2 # undef BOOST_PP_SLOT_4_DIGIT_3 # undef BOOST_PP_SLOT_4_DIGIT_4 # undef BOOST_PP_SLOT_4_DIGIT_5 # undef BOOST_PP_SLOT_4_DIGIT_6 # undef BOOST_PP_SLOT_4_DIGIT_7 # undef BOOST_PP_SLOT_4_DIGIT_8 # undef BOOST_PP_SLOT_4_DIGIT_9 # undef BOOST_PP_SLOT_4_DIGIT_10 # # if BOOST_PP_SLOT_TEMP_10 == 0 # define BOOST_PP_SLOT_4_DIGIT_10 0 # elif BOOST_PP_SLOT_TEMP_10 == 1 # define BOOST_PP_SLOT_4_DIGIT_10 1 # elif BOOST_PP_SLOT_TEMP_10 == 2 # define BOOST_PP_SLOT_4_DIGIT_10 2 # elif BOOST_PP_SLOT_TEMP_10 == 3 # define BOOST_PP_SLOT_4_DIGIT_10 3 # elif BOOST_PP_SLOT_TEMP_10 == 4 # define BOOST_PP_SLOT_4_DIGIT_10 4 # elif BOOST_PP_SLOT_TEMP_10 == 5 # define BOOST_PP_SLOT_4_DIGIT_10 5 # elif BOOST_PP_SLOT_TEMP_10 == 6 # define BOOST_PP_SLOT_4_DIGIT_10 6 # elif BOOST_PP_SLOT_TEMP_10 == 7 # define BOOST_PP_SLOT_4_DIGIT_10 7 # elif BOOST_PP_SLOT_TEMP_10 == 8 # define BOOST_PP_SLOT_4_DIGIT_10 8 # elif BOOST_PP_SLOT_TEMP_10 == 9 # define BOOST_PP_SLOT_4_DIGIT_10 9 # endif # # if BOOST_PP_SLOT_TEMP_9 == 0 # define BOOST_PP_SLOT_4_DIGIT_9 0 # elif BOOST_PP_SLOT_TEMP_9 == 1 # define BOOST_PP_SLOT_4_DIGIT_9 1 # elif BOOST_PP_SLOT_TEMP_9 == 2 # define BOOST_PP_SLOT_4_DIGIT_9 2 # elif BOOST_PP_SLOT_TEMP_9 == 3 # define BOOST_PP_SLOT_4_DIGIT_9 3 # elif BOOST_PP_SLOT_TEMP_9 == 4 # define BOOST_PP_SLOT_4_DIGIT_9 4 # elif BOOST_PP_SLOT_TEMP_9 == 5 # define BOOST_PP_SLOT_4_DIGIT_9 5 # elif BOOST_PP_SLOT_TEMP_9 == 6 # define BOOST_PP_SLOT_4_DIGIT_9 6 # elif BOOST_PP_SLOT_TEMP_9 == 7 # define BOOST_PP_SLOT_4_DIGIT_9 7 # elif BOOST_PP_SLOT_TEMP_9 == 8 # define BOOST_PP_SLOT_4_DIGIT_9 8 # elif BOOST_PP_SLOT_TEMP_9 == 9 # define BOOST_PP_SLOT_4_DIGIT_9 9 # endif # # if BOOST_PP_SLOT_TEMP_8 == 0 # define BOOST_PP_SLOT_4_DIGIT_8 0 # elif BOOST_PP_SLOT_TEMP_8 == 1 # define BOOST_PP_SLOT_4_DIGIT_8 1 # elif BOOST_PP_SLOT_TEMP_8 == 2 # define BOOST_PP_SLOT_4_DIGIT_8 2 # elif BOOST_PP_SLOT_TEMP_8 == 3 # define BOOST_PP_SLOT_4_DIGIT_8 3 # elif BOOST_PP_SLOT_TEMP_8 == 4 # define BOOST_PP_SLOT_4_DIGIT_8 4 # elif BOOST_PP_SLOT_TEMP_8 == 5 # define BOOST_PP_SLOT_4_DIGIT_8 5 # elif BOOST_PP_SLOT_TEMP_8 == 6 # define BOOST_PP_SLOT_4_DIGIT_8 6 # elif BOOST_PP_SLOT_TEMP_8 == 7 # define BOOST_PP_SLOT_4_DIGIT_8 7 # elif BOOST_PP_SLOT_TEMP_8 == 8 # define BOOST_PP_SLOT_4_DIGIT_8 8 # elif BOOST_PP_SLOT_TEMP_8 == 9 # define BOOST_PP_SLOT_4_DIGIT_8 9 # endif # # if BOOST_PP_SLOT_TEMP_7 == 0 # define BOOST_PP_SLOT_4_DIGIT_7 0 # elif BOOST_PP_SLOT_TEMP_7 == 1 # define BOOST_PP_SLOT_4_DIGIT_7 1 # elif BOOST_PP_SLOT_TEMP_7 == 2 # define BOOST_PP_SLOT_4_DIGIT_7 2 # elif BOOST_PP_SLOT_TEMP_7 == 3 # define BOOST_PP_SLOT_4_DIGIT_7 3 # elif BOOST_PP_SLOT_TEMP_7 == 4 # define BOOST_PP_SLOT_4_DIGIT_7 4 # elif BOOST_PP_SLOT_TEMP_7 == 5 # define BOOST_PP_SLOT_4_DIGIT_7 5 # elif BOOST_PP_SLOT_TEMP_7 == 6 # define BOOST_PP_SLOT_4_DIGIT_7 6 # elif BOOST_PP_SLOT_TEMP_7 == 7 # define BOOST_PP_SLOT_4_DIGIT_7 7 # elif BOOST_PP_SLOT_TEMP_7 == 8 # define BOOST_PP_SLOT_4_DIGIT_7 8 # elif BOOST_PP_SLOT_TEMP_7 == 9 # define BOOST_PP_SLOT_4_DIGIT_7 9 # endif # # if BOOST_PP_SLOT_TEMP_6 == 0 # define BOOST_PP_SLOT_4_DIGIT_6 0 # elif BOOST_PP_SLOT_TEMP_6 == 1 # define BOOST_PP_SLOT_4_DIGIT_6 1 # elif BOOST_PP_SLOT_TEMP_6 == 2 # define BOOST_PP_SLOT_4_DIGIT_6 2 # elif BOOST_PP_SLOT_TEMP_6 == 3 # define BOOST_PP_SLOT_4_DIGIT_6 3 # elif BOOST_PP_SLOT_TEMP_6 == 4 # define BOOST_PP_SLOT_4_DIGIT_6 4 # elif BOOST_PP_SLOT_TEMP_6 == 5 # define BOOST_PP_SLOT_4_DIGIT_6 5 # elif BOOST_PP_SLOT_TEMP_6 == 6 # define BOOST_PP_SLOT_4_DIGIT_6 6 # elif BOOST_PP_SLOT_TEMP_6 == 7 # define BOOST_PP_SLOT_4_DIGIT_6 7 # elif BOOST_PP_SLOT_TEMP_6 == 8 # define BOOST_PP_SLOT_4_DIGIT_6 8 # elif BOOST_PP_SLOT_TEMP_6 == 9 # define BOOST_PP_SLOT_4_DIGIT_6 9 # endif # # if BOOST_PP_SLOT_TEMP_5 == 0 # define BOOST_PP_SLOT_4_DIGIT_5 0 # elif BOOST_PP_SLOT_TEMP_5 == 1 # define BOOST_PP_SLOT_4_DIGIT_5 1 # elif BOOST_PP_SLOT_TEMP_5 == 2 # define BOOST_PP_SLOT_4_DIGIT_5 2 # elif BOOST_PP_SLOT_TEMP_5 == 3 # define BOOST_PP_SLOT_4_DIGIT_5 3 # elif BOOST_PP_SLOT_TEMP_5 == 4 # define BOOST_PP_SLOT_4_DIGIT_5 4 # elif BOOST_PP_SLOT_TEMP_5 == 5 # define BOOST_PP_SLOT_4_DIGIT_5 5 # elif BOOST_PP_SLOT_TEMP_5 == 6 # define BOOST_PP_SLOT_4_DIGIT_5 6 # elif BOOST_PP_SLOT_TEMP_5 == 7 # define BOOST_PP_SLOT_4_DIGIT_5 7 # elif BOOST_PP_SLOT_TEMP_5 == 8 # define BOOST_PP_SLOT_4_DIGIT_5 8 # elif BOOST_PP_SLOT_TEMP_5 == 9 # define BOOST_PP_SLOT_4_DIGIT_5 9 # endif # # if BOOST_PP_SLOT_TEMP_4 == 0 # define BOOST_PP_SLOT_4_DIGIT_4 0 # elif BOOST_PP_SLOT_TEMP_4 == 1 # define BOOST_PP_SLOT_4_DIGIT_4 1 # elif BOOST_PP_SLOT_TEMP_4 == 2 # define BOOST_PP_SLOT_4_DIGIT_4 2 # elif BOOST_PP_SLOT_TEMP_4 == 3 # define BOOST_PP_SLOT_4_DIGIT_4 3 # elif BOOST_PP_SLOT_TEMP_4 == 4 # define BOOST_PP_SLOT_4_DIGIT_4 4 # elif BOOST_PP_SLOT_TEMP_4 == 5 # define BOOST_PP_SLOT_4_DIGIT_4 5 # elif BOOST_PP_SLOT_TEMP_4 == 6 # define BOOST_PP_SLOT_4_DIGIT_4 6 # elif BOOST_PP_SLOT_TEMP_4 == 7 # define BOOST_PP_SLOT_4_DIGIT_4 7 # elif BOOST_PP_SLOT_TEMP_4 == 8 # define BOOST_PP_SLOT_4_DIGIT_4 8 # elif BOOST_PP_SLOT_TEMP_4 == 9 # define BOOST_PP_SLOT_4_DIGIT_4 9 # endif # # if BOOST_PP_SLOT_TEMP_3 == 0 # define BOOST_PP_SLOT_4_DIGIT_3 0 # elif BOOST_PP_SLOT_TEMP_3 == 1 # define BOOST_PP_SLOT_4_DIGIT_3 1 # elif BOOST_PP_SLOT_TEMP_3 == 2 # define BOOST_PP_SLOT_4_DIGIT_3 2 # elif BOOST_PP_SLOT_TEMP_3 == 3 # define BOOST_PP_SLOT_4_DIGIT_3 3 # elif BOOST_PP_SLOT_TEMP_3 == 4 # define BOOST_PP_SLOT_4_DIGIT_3 4 # elif BOOST_PP_SLOT_TEMP_3 == 5 # define BOOST_PP_SLOT_4_DIGIT_3 5 # elif BOOST_PP_SLOT_TEMP_3 == 6 # define BOOST_PP_SLOT_4_DIGIT_3 6 # elif BOOST_PP_SLOT_TEMP_3 == 7 # define BOOST_PP_SLOT_4_DIGIT_3 7 # elif BOOST_PP_SLOT_TEMP_3 == 8 # define BOOST_PP_SLOT_4_DIGIT_3 8 # elif BOOST_PP_SLOT_TEMP_3 == 9 # define BOOST_PP_SLOT_4_DIGIT_3 9 # endif # # if BOOST_PP_SLOT_TEMP_2 == 0 # define BOOST_PP_SLOT_4_DIGIT_2 0 # elif BOOST_PP_SLOT_TEMP_2 == 1 # define BOOST_PP_SLOT_4_DIGIT_2 1 # elif BOOST_PP_SLOT_TEMP_2 == 2 # define BOOST_PP_SLOT_4_DIGIT_2 2 # elif BOOST_PP_SLOT_TEMP_2 == 3 # define BOOST_PP_SLOT_4_DIGIT_2 3 # elif BOOST_PP_SLOT_TEMP_2 == 4 # define BOOST_PP_SLOT_4_DIGIT_2 4 # elif BOOST_PP_SLOT_TEMP_2 == 5 # define BOOST_PP_SLOT_4_DIGIT_2 5 # elif BOOST_PP_SLOT_TEMP_2 == 6 # define BOOST_PP_SLOT_4_DIGIT_2 6 # elif BOOST_PP_SLOT_TEMP_2 == 7 # define BOOST_PP_SLOT_4_DIGIT_2 7 # elif BOOST_PP_SLOT_TEMP_2 == 8 # define BOOST_PP_SLOT_4_DIGIT_2 8 # elif BOOST_PP_SLOT_TEMP_2 == 9 # define BOOST_PP_SLOT_4_DIGIT_2 9 # endif # # if BOOST_PP_SLOT_TEMP_1 == 0 # define BOOST_PP_SLOT_4_DIGIT_1 0 # elif BOOST_PP_SLOT_TEMP_1 == 1 # define BOOST_PP_SLOT_4_DIGIT_1 1 # elif BOOST_PP_SLOT_TEMP_1 == 2 # define BOOST_PP_SLOT_4_DIGIT_1 2 # elif BOOST_PP_SLOT_TEMP_1 == 3 # define BOOST_PP_SLOT_4_DIGIT_1 3 # elif BOOST_PP_SLOT_TEMP_1 == 4 # define BOOST_PP_SLOT_4_DIGIT_1 4 # elif BOOST_PP_SLOT_TEMP_1 == 5 # define BOOST_PP_SLOT_4_DIGIT_1 5 # elif BOOST_PP_SLOT_TEMP_1 == 6 # define BOOST_PP_SLOT_4_DIGIT_1 6 # elif BOOST_PP_SLOT_TEMP_1 == 7 # define BOOST_PP_SLOT_4_DIGIT_1 7 # elif BOOST_PP_SLOT_TEMP_1 == 8 # define BOOST_PP_SLOT_4_DIGIT_1 8 # elif BOOST_PP_SLOT_TEMP_1 == 9 # define BOOST_PP_SLOT_4_DIGIT_1 9 # endif # # if BOOST_PP_SLOT_4_DIGIT_10 # define BOOST_PP_SLOT_4() BOOST_PP_SLOT_CC_10(BOOST_PP_SLOT_4_DIGIT_10, BOOST_PP_SLOT_4_DIGIT_9, BOOST_PP_SLOT_4_DIGIT_8, BOOST_PP_SLOT_4_DIGIT_7, BOOST_PP_SLOT_4_DIGIT_6, BOOST_PP_SLOT_4_DIGIT_5, BOOST_PP_SLOT_4_DIGIT_4, BOOST_PP_SLOT_4_DIGIT_3, BOOST_PP_SLOT_4_DIGIT_2, BOOST_PP_SLOT_4_DIGIT_1) # elif BOOST_PP_SLOT_4_DIGIT_9 # define BOOST_PP_SLOT_4() BOOST_PP_SLOT_CC_9(BOOST_PP_SLOT_4_DIGIT_9, BOOST_PP_SLOT_4_DIGIT_8, BOOST_PP_SLOT_4_DIGIT_7, BOOST_PP_SLOT_4_DIGIT_6, BOOST_PP_SLOT_4_DIGIT_5, BOOST_PP_SLOT_4_DIGIT_4, BOOST_PP_SLOT_4_DIGIT_3, BOOST_PP_SLOT_4_DIGIT_2, BOOST_PP_SLOT_4_DIGIT_1) # elif BOOST_PP_SLOT_4_DIGIT_8 # define BOOST_PP_SLOT_4() BOOST_PP_SLOT_CC_8(BOOST_PP_SLOT_4_DIGIT_8, BOOST_PP_SLOT_4_DIGIT_7, BOOST_PP_SLOT_4_DIGIT_6, BOOST_PP_SLOT_4_DIGIT_5, BOOST_PP_SLOT_4_DIGIT_4, BOOST_PP_SLOT_4_DIGIT_3, BOOST_PP_SLOT_4_DIGIT_2, BOOST_PP_SLOT_4_DIGIT_1) # elif BOOST_PP_SLOT_4_DIGIT_7 # define BOOST_PP_SLOT_4() BOOST_PP_SLOT_CC_7(BOOST_PP_SLOT_4_DIGIT_7, BOOST_PP_SLOT_4_DIGIT_6, BOOST_PP_SLOT_4_DIGIT_5, BOOST_PP_SLOT_4_DIGIT_4, BOOST_PP_SLOT_4_DIGIT_3, BOOST_PP_SLOT_4_DIGIT_2, BOOST_PP_SLOT_4_DIGIT_1) # elif BOOST_PP_SLOT_4_DIGIT_6 # define BOOST_PP_SLOT_4() BOOST_PP_SLOT_CC_6(BOOST_PP_SLOT_4_DIGIT_6, BOOST_PP_SLOT_4_DIGIT_5, BOOST_PP_SLOT_4_DIGIT_4, BOOST_PP_SLOT_4_DIGIT_3, BOOST_PP_SLOT_4_DIGIT_2, BOOST_PP_SLOT_4_DIGIT_1) # elif BOOST_PP_SLOT_4_DIGIT_5 # define BOOST_PP_SLOT_4() BOOST_PP_SLOT_CC_5(BOOST_PP_SLOT_4_DIGIT_5, BOOST_PP_SLOT_4_DIGIT_4, BOOST_PP_SLOT_4_DIGIT_3, BOOST_PP_SLOT_4_DIGIT_2, BOOST_PP_SLOT_4_DIGIT_1) # elif BOOST_PP_SLOT_4_DIGIT_4 # define BOOST_PP_SLOT_4() BOOST_PP_SLOT_CC_4(BOOST_PP_SLOT_4_DIGIT_4, BOOST_PP_SLOT_4_DIGIT_3, BOOST_PP_SLOT_4_DIGIT_2, BOOST_PP_SLOT_4_DIGIT_1) # elif BOOST_PP_SLOT_4_DIGIT_3 # define BOOST_PP_SLOT_4() BOOST_PP_SLOT_CC_3(BOOST_PP_SLOT_4_DIGIT_3, BOOST_PP_SLOT_4_DIGIT_2, BOOST_PP_SLOT_4_DIGIT_1) # elif BOOST_PP_SLOT_4_DIGIT_2 # define BOOST_PP_SLOT_4() BOOST_PP_SLOT_CC_2(BOOST_PP_SLOT_4_DIGIT_2, BOOST_PP_SLOT_4_DIGIT_1) # else # define BOOST_PP_SLOT_4() BOOST_PP_SLOT_4_DIGIT_1 # endif ================================================ FILE: benchmarks/boost/preprocessor/slot/detail/slot5.hpp ================================================ # /* ************************************************************************** # * * # * (C) Copyright Paul Mensonides 2002. # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # * * # ************************************************************************** */ # # /* See http://www.boost.org for most recent version. */ # # include # # undef BOOST_PP_SLOT_5 # # undef BOOST_PP_SLOT_5_DIGIT_1 # undef BOOST_PP_SLOT_5_DIGIT_2 # undef BOOST_PP_SLOT_5_DIGIT_3 # undef BOOST_PP_SLOT_5_DIGIT_4 # undef BOOST_PP_SLOT_5_DIGIT_5 # undef BOOST_PP_SLOT_5_DIGIT_6 # undef BOOST_PP_SLOT_5_DIGIT_7 # undef BOOST_PP_SLOT_5_DIGIT_8 # undef BOOST_PP_SLOT_5_DIGIT_9 # undef BOOST_PP_SLOT_5_DIGIT_10 # # if BOOST_PP_SLOT_TEMP_10 == 0 # define BOOST_PP_SLOT_5_DIGIT_10 0 # elif BOOST_PP_SLOT_TEMP_10 == 1 # define BOOST_PP_SLOT_5_DIGIT_10 1 # elif BOOST_PP_SLOT_TEMP_10 == 2 # define BOOST_PP_SLOT_5_DIGIT_10 2 # elif BOOST_PP_SLOT_TEMP_10 == 3 # define BOOST_PP_SLOT_5_DIGIT_10 3 # elif BOOST_PP_SLOT_TEMP_10 == 4 # define BOOST_PP_SLOT_5_DIGIT_10 4 # elif BOOST_PP_SLOT_TEMP_10 == 5 # define BOOST_PP_SLOT_5_DIGIT_10 5 # elif BOOST_PP_SLOT_TEMP_10 == 6 # define BOOST_PP_SLOT_5_DIGIT_10 6 # elif BOOST_PP_SLOT_TEMP_10 == 7 # define BOOST_PP_SLOT_5_DIGIT_10 7 # elif BOOST_PP_SLOT_TEMP_10 == 8 # define BOOST_PP_SLOT_5_DIGIT_10 8 # elif BOOST_PP_SLOT_TEMP_10 == 9 # define BOOST_PP_SLOT_5_DIGIT_10 9 # endif # # if BOOST_PP_SLOT_TEMP_9 == 0 # define BOOST_PP_SLOT_5_DIGIT_9 0 # elif BOOST_PP_SLOT_TEMP_9 == 1 # define BOOST_PP_SLOT_5_DIGIT_9 1 # elif BOOST_PP_SLOT_TEMP_9 == 2 # define BOOST_PP_SLOT_5_DIGIT_9 2 # elif BOOST_PP_SLOT_TEMP_9 == 3 # define BOOST_PP_SLOT_5_DIGIT_9 3 # elif BOOST_PP_SLOT_TEMP_9 == 4 # define BOOST_PP_SLOT_5_DIGIT_9 4 # elif BOOST_PP_SLOT_TEMP_9 == 5 # define BOOST_PP_SLOT_5_DIGIT_9 5 # elif BOOST_PP_SLOT_TEMP_9 == 6 # define BOOST_PP_SLOT_5_DIGIT_9 6 # elif BOOST_PP_SLOT_TEMP_9 == 7 # define BOOST_PP_SLOT_5_DIGIT_9 7 # elif BOOST_PP_SLOT_TEMP_9 == 8 # define BOOST_PP_SLOT_5_DIGIT_9 8 # elif BOOST_PP_SLOT_TEMP_9 == 9 # define BOOST_PP_SLOT_5_DIGIT_9 9 # endif # # if BOOST_PP_SLOT_TEMP_8 == 0 # define BOOST_PP_SLOT_5_DIGIT_8 0 # elif BOOST_PP_SLOT_TEMP_8 == 1 # define BOOST_PP_SLOT_5_DIGIT_8 1 # elif BOOST_PP_SLOT_TEMP_8 == 2 # define BOOST_PP_SLOT_5_DIGIT_8 2 # elif BOOST_PP_SLOT_TEMP_8 == 3 # define BOOST_PP_SLOT_5_DIGIT_8 3 # elif BOOST_PP_SLOT_TEMP_8 == 4 # define BOOST_PP_SLOT_5_DIGIT_8 4 # elif BOOST_PP_SLOT_TEMP_8 == 5 # define BOOST_PP_SLOT_5_DIGIT_8 5 # elif BOOST_PP_SLOT_TEMP_8 == 6 # define BOOST_PP_SLOT_5_DIGIT_8 6 # elif BOOST_PP_SLOT_TEMP_8 == 7 # define BOOST_PP_SLOT_5_DIGIT_8 7 # elif BOOST_PP_SLOT_TEMP_8 == 8 # define BOOST_PP_SLOT_5_DIGIT_8 8 # elif BOOST_PP_SLOT_TEMP_8 == 9 # define BOOST_PP_SLOT_5_DIGIT_8 9 # endif # # if BOOST_PP_SLOT_TEMP_7 == 0 # define BOOST_PP_SLOT_5_DIGIT_7 0 # elif BOOST_PP_SLOT_TEMP_7 == 1 # define BOOST_PP_SLOT_5_DIGIT_7 1 # elif BOOST_PP_SLOT_TEMP_7 == 2 # define BOOST_PP_SLOT_5_DIGIT_7 2 # elif BOOST_PP_SLOT_TEMP_7 == 3 # define BOOST_PP_SLOT_5_DIGIT_7 3 # elif BOOST_PP_SLOT_TEMP_7 == 4 # define BOOST_PP_SLOT_5_DIGIT_7 4 # elif BOOST_PP_SLOT_TEMP_7 == 5 # define BOOST_PP_SLOT_5_DIGIT_7 5 # elif BOOST_PP_SLOT_TEMP_7 == 6 # define BOOST_PP_SLOT_5_DIGIT_7 6 # elif BOOST_PP_SLOT_TEMP_7 == 7 # define BOOST_PP_SLOT_5_DIGIT_7 7 # elif BOOST_PP_SLOT_TEMP_7 == 8 # define BOOST_PP_SLOT_5_DIGIT_7 8 # elif BOOST_PP_SLOT_TEMP_7 == 9 # define BOOST_PP_SLOT_5_DIGIT_7 9 # endif # # if BOOST_PP_SLOT_TEMP_6 == 0 # define BOOST_PP_SLOT_5_DIGIT_6 0 # elif BOOST_PP_SLOT_TEMP_6 == 1 # define BOOST_PP_SLOT_5_DIGIT_6 1 # elif BOOST_PP_SLOT_TEMP_6 == 2 # define BOOST_PP_SLOT_5_DIGIT_6 2 # elif BOOST_PP_SLOT_TEMP_6 == 3 # define BOOST_PP_SLOT_5_DIGIT_6 3 # elif BOOST_PP_SLOT_TEMP_6 == 4 # define BOOST_PP_SLOT_5_DIGIT_6 4 # elif BOOST_PP_SLOT_TEMP_6 == 5 # define BOOST_PP_SLOT_5_DIGIT_6 5 # elif BOOST_PP_SLOT_TEMP_6 == 6 # define BOOST_PP_SLOT_5_DIGIT_6 6 # elif BOOST_PP_SLOT_TEMP_6 == 7 # define BOOST_PP_SLOT_5_DIGIT_6 7 # elif BOOST_PP_SLOT_TEMP_6 == 8 # define BOOST_PP_SLOT_5_DIGIT_6 8 # elif BOOST_PP_SLOT_TEMP_6 == 9 # define BOOST_PP_SLOT_5_DIGIT_6 9 # endif # # if BOOST_PP_SLOT_TEMP_5 == 0 # define BOOST_PP_SLOT_5_DIGIT_5 0 # elif BOOST_PP_SLOT_TEMP_5 == 1 # define BOOST_PP_SLOT_5_DIGIT_5 1 # elif BOOST_PP_SLOT_TEMP_5 == 2 # define BOOST_PP_SLOT_5_DIGIT_5 2 # elif BOOST_PP_SLOT_TEMP_5 == 3 # define BOOST_PP_SLOT_5_DIGIT_5 3 # elif BOOST_PP_SLOT_TEMP_5 == 4 # define BOOST_PP_SLOT_5_DIGIT_5 4 # elif BOOST_PP_SLOT_TEMP_5 == 5 # define BOOST_PP_SLOT_5_DIGIT_5 5 # elif BOOST_PP_SLOT_TEMP_5 == 6 # define BOOST_PP_SLOT_5_DIGIT_5 6 # elif BOOST_PP_SLOT_TEMP_5 == 7 # define BOOST_PP_SLOT_5_DIGIT_5 7 # elif BOOST_PP_SLOT_TEMP_5 == 8 # define BOOST_PP_SLOT_5_DIGIT_5 8 # elif BOOST_PP_SLOT_TEMP_5 == 9 # define BOOST_PP_SLOT_5_DIGIT_5 9 # endif # # if BOOST_PP_SLOT_TEMP_4 == 0 # define BOOST_PP_SLOT_5_DIGIT_4 0 # elif BOOST_PP_SLOT_TEMP_4 == 1 # define BOOST_PP_SLOT_5_DIGIT_4 1 # elif BOOST_PP_SLOT_TEMP_4 == 2 # define BOOST_PP_SLOT_5_DIGIT_4 2 # elif BOOST_PP_SLOT_TEMP_4 == 3 # define BOOST_PP_SLOT_5_DIGIT_4 3 # elif BOOST_PP_SLOT_TEMP_4 == 4 # define BOOST_PP_SLOT_5_DIGIT_4 4 # elif BOOST_PP_SLOT_TEMP_4 == 5 # define BOOST_PP_SLOT_5_DIGIT_4 5 # elif BOOST_PP_SLOT_TEMP_4 == 6 # define BOOST_PP_SLOT_5_DIGIT_4 6 # elif BOOST_PP_SLOT_TEMP_4 == 7 # define BOOST_PP_SLOT_5_DIGIT_4 7 # elif BOOST_PP_SLOT_TEMP_4 == 8 # define BOOST_PP_SLOT_5_DIGIT_4 8 # elif BOOST_PP_SLOT_TEMP_4 == 9 # define BOOST_PP_SLOT_5_DIGIT_4 9 # endif # # if BOOST_PP_SLOT_TEMP_3 == 0 # define BOOST_PP_SLOT_5_DIGIT_3 0 # elif BOOST_PP_SLOT_TEMP_3 == 1 # define BOOST_PP_SLOT_5_DIGIT_3 1 # elif BOOST_PP_SLOT_TEMP_3 == 2 # define BOOST_PP_SLOT_5_DIGIT_3 2 # elif BOOST_PP_SLOT_TEMP_3 == 3 # define BOOST_PP_SLOT_5_DIGIT_3 3 # elif BOOST_PP_SLOT_TEMP_3 == 4 # define BOOST_PP_SLOT_5_DIGIT_3 4 # elif BOOST_PP_SLOT_TEMP_3 == 5 # define BOOST_PP_SLOT_5_DIGIT_3 5 # elif BOOST_PP_SLOT_TEMP_3 == 6 # define BOOST_PP_SLOT_5_DIGIT_3 6 # elif BOOST_PP_SLOT_TEMP_3 == 7 # define BOOST_PP_SLOT_5_DIGIT_3 7 # elif BOOST_PP_SLOT_TEMP_3 == 8 # define BOOST_PP_SLOT_5_DIGIT_3 8 # elif BOOST_PP_SLOT_TEMP_3 == 9 # define BOOST_PP_SLOT_5_DIGIT_3 9 # endif # # if BOOST_PP_SLOT_TEMP_2 == 0 # define BOOST_PP_SLOT_5_DIGIT_2 0 # elif BOOST_PP_SLOT_TEMP_2 == 1 # define BOOST_PP_SLOT_5_DIGIT_2 1 # elif BOOST_PP_SLOT_TEMP_2 == 2 # define BOOST_PP_SLOT_5_DIGIT_2 2 # elif BOOST_PP_SLOT_TEMP_2 == 3 # define BOOST_PP_SLOT_5_DIGIT_2 3 # elif BOOST_PP_SLOT_TEMP_2 == 4 # define BOOST_PP_SLOT_5_DIGIT_2 4 # elif BOOST_PP_SLOT_TEMP_2 == 5 # define BOOST_PP_SLOT_5_DIGIT_2 5 # elif BOOST_PP_SLOT_TEMP_2 == 6 # define BOOST_PP_SLOT_5_DIGIT_2 6 # elif BOOST_PP_SLOT_TEMP_2 == 7 # define BOOST_PP_SLOT_5_DIGIT_2 7 # elif BOOST_PP_SLOT_TEMP_2 == 8 # define BOOST_PP_SLOT_5_DIGIT_2 8 # elif BOOST_PP_SLOT_TEMP_2 == 9 # define BOOST_PP_SLOT_5_DIGIT_2 9 # endif # # if BOOST_PP_SLOT_TEMP_1 == 0 # define BOOST_PP_SLOT_5_DIGIT_1 0 # elif BOOST_PP_SLOT_TEMP_1 == 1 # define BOOST_PP_SLOT_5_DIGIT_1 1 # elif BOOST_PP_SLOT_TEMP_1 == 2 # define BOOST_PP_SLOT_5_DIGIT_1 2 # elif BOOST_PP_SLOT_TEMP_1 == 3 # define BOOST_PP_SLOT_5_DIGIT_1 3 # elif BOOST_PP_SLOT_TEMP_1 == 4 # define BOOST_PP_SLOT_5_DIGIT_1 4 # elif BOOST_PP_SLOT_TEMP_1 == 5 # define BOOST_PP_SLOT_5_DIGIT_1 5 # elif BOOST_PP_SLOT_TEMP_1 == 6 # define BOOST_PP_SLOT_5_DIGIT_1 6 # elif BOOST_PP_SLOT_TEMP_1 == 7 # define BOOST_PP_SLOT_5_DIGIT_1 7 # elif BOOST_PP_SLOT_TEMP_1 == 8 # define BOOST_PP_SLOT_5_DIGIT_1 8 # elif BOOST_PP_SLOT_TEMP_1 == 9 # define BOOST_PP_SLOT_5_DIGIT_1 9 # endif # # if BOOST_PP_SLOT_5_DIGIT_10 # define BOOST_PP_SLOT_5() BOOST_PP_SLOT_CC_10(BOOST_PP_SLOT_5_DIGIT_10, BOOST_PP_SLOT_5_DIGIT_9, BOOST_PP_SLOT_5_DIGIT_8, BOOST_PP_SLOT_5_DIGIT_7, BOOST_PP_SLOT_5_DIGIT_6, BOOST_PP_SLOT_5_DIGIT_5, BOOST_PP_SLOT_5_DIGIT_4, BOOST_PP_SLOT_5_DIGIT_3, BOOST_PP_SLOT_5_DIGIT_2, BOOST_PP_SLOT_5_DIGIT_1) # elif BOOST_PP_SLOT_5_DIGIT_9 # define BOOST_PP_SLOT_5() BOOST_PP_SLOT_CC_9(BOOST_PP_SLOT_5_DIGIT_9, BOOST_PP_SLOT_5_DIGIT_8, BOOST_PP_SLOT_5_DIGIT_7, BOOST_PP_SLOT_5_DIGIT_6, BOOST_PP_SLOT_5_DIGIT_5, BOOST_PP_SLOT_5_DIGIT_4, BOOST_PP_SLOT_5_DIGIT_3, BOOST_PP_SLOT_5_DIGIT_2, BOOST_PP_SLOT_5_DIGIT_1) # elif BOOST_PP_SLOT_5_DIGIT_8 # define BOOST_PP_SLOT_5() BOOST_PP_SLOT_CC_8(BOOST_PP_SLOT_5_DIGIT_8, BOOST_PP_SLOT_5_DIGIT_7, BOOST_PP_SLOT_5_DIGIT_6, BOOST_PP_SLOT_5_DIGIT_5, BOOST_PP_SLOT_5_DIGIT_4, BOOST_PP_SLOT_5_DIGIT_3, BOOST_PP_SLOT_5_DIGIT_2, BOOST_PP_SLOT_5_DIGIT_1) # elif BOOST_PP_SLOT_5_DIGIT_7 # define BOOST_PP_SLOT_5() BOOST_PP_SLOT_CC_7(BOOST_PP_SLOT_5_DIGIT_7, BOOST_PP_SLOT_5_DIGIT_6, BOOST_PP_SLOT_5_DIGIT_5, BOOST_PP_SLOT_5_DIGIT_4, BOOST_PP_SLOT_5_DIGIT_3, BOOST_PP_SLOT_5_DIGIT_2, BOOST_PP_SLOT_5_DIGIT_1) # elif BOOST_PP_SLOT_5_DIGIT_6 # define BOOST_PP_SLOT_5() BOOST_PP_SLOT_CC_6(BOOST_PP_SLOT_5_DIGIT_6, BOOST_PP_SLOT_5_DIGIT_5, BOOST_PP_SLOT_5_DIGIT_4, BOOST_PP_SLOT_5_DIGIT_3, BOOST_PP_SLOT_5_DIGIT_2, BOOST_PP_SLOT_5_DIGIT_1) # elif BOOST_PP_SLOT_5_DIGIT_5 # define BOOST_PP_SLOT_5() BOOST_PP_SLOT_CC_5(BOOST_PP_SLOT_5_DIGIT_5, BOOST_PP_SLOT_5_DIGIT_4, BOOST_PP_SLOT_5_DIGIT_3, BOOST_PP_SLOT_5_DIGIT_2, BOOST_PP_SLOT_5_DIGIT_1) # elif BOOST_PP_SLOT_5_DIGIT_4 # define BOOST_PP_SLOT_5() BOOST_PP_SLOT_CC_4(BOOST_PP_SLOT_5_DIGIT_4, BOOST_PP_SLOT_5_DIGIT_3, BOOST_PP_SLOT_5_DIGIT_2, BOOST_PP_SLOT_5_DIGIT_1) # elif BOOST_PP_SLOT_5_DIGIT_3 # define BOOST_PP_SLOT_5() BOOST_PP_SLOT_CC_3(BOOST_PP_SLOT_5_DIGIT_3, BOOST_PP_SLOT_5_DIGIT_2, BOOST_PP_SLOT_5_DIGIT_1) # elif BOOST_PP_SLOT_5_DIGIT_2 # define BOOST_PP_SLOT_5() BOOST_PP_SLOT_CC_2(BOOST_PP_SLOT_5_DIGIT_2, BOOST_PP_SLOT_5_DIGIT_1) # else # define BOOST_PP_SLOT_5() BOOST_PP_SLOT_5_DIGIT_1 # endif ================================================ FILE: benchmarks/boost/preprocessor/slot/slot.hpp ================================================ # /* ************************************************************************** # * * # * (C) Copyright Paul Mensonides 2002. # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # * * # ************************************************************************** */ # # /* See http://www.boost.org for most recent version. */ # # ifndef BOOST_PREPROCESSOR_SLOT_SLOT_HPP # define BOOST_PREPROCESSOR_SLOT_SLOT_HPP # # include # include # # /* BOOST_PP_ASSIGN_SLOT */ # # define BOOST_PP_ASSIGN_SLOT(i) BOOST_PP_CAT(BOOST_PP_ASSIGN_SLOT_, i) # # define BOOST_PP_ASSIGN_SLOT_1 # define BOOST_PP_ASSIGN_SLOT_2 # define BOOST_PP_ASSIGN_SLOT_3 # define BOOST_PP_ASSIGN_SLOT_4 # define BOOST_PP_ASSIGN_SLOT_5 # # /* BOOST_PP_SLOT */ # # define BOOST_PP_SLOT(i) BOOST_PP_CAT(BOOST_PP_SLOT_, i)() # # endif ================================================ FILE: benchmarks/boost/preprocessor/stringize.hpp ================================================ # /* Copyright (C) 2001 # * Housemarque Oy # * http://www.housemarque.com # * # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # */ # # /* Revised by Paul Mensonides (2002) */ # # /* See http://www.boost.org for most recent version. */ # # ifndef BOOST_PREPROCESSOR_STRINGIZE_HPP # define BOOST_PREPROCESSOR_STRINGIZE_HPP # # include # # /* BOOST_PP_STRINGIZE */ # # if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MSVC() # define BOOST_PP_STRINGIZE(text) BOOST_PP_STRINGIZE_A((text)) # define BOOST_PP_STRINGIZE_A(arg) BOOST_PP_STRINGIZE_I arg # elif BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC() # define BOOST_PP_STRINGIZE(text) BOOST_PP_STRINGIZE_OO((text)) # define BOOST_PP_STRINGIZE_OO(par) BOOST_PP_STRINGIZE_I ## par # else # define BOOST_PP_STRINGIZE(text) BOOST_PP_STRINGIZE_I(text) # endif # # define BOOST_PP_STRINGIZE_I(text) #text # # endif ================================================ FILE: benchmarks/boost/preprocessor/tuple/detail/is_single_return.hpp ================================================ # /* ************************************************************************** # * * # * (C) Copyright Edward Diener 2014. * # * Distributed under the Boost Software License, Version 1.0. (See * # * accompanying file LICENSE_1_0.txt or copy at * # * http://www.boost.org/LICENSE_1_0.txt) * # * * # ************************************************************************** */ # # /* See http://www.boost.org for most recent version. */ # # ifndef BOOST_PREPROCESSOR_TUPLE_DETAIL_IS_SINGLE_RETURN_HPP # define BOOST_PREPROCESSOR_TUPLE_DETAIL_IS_SINGLE_RETURN_HPP # # include # # /* BOOST_PP_TUPLE_IS_SINGLE_RETURN */ # # if BOOST_PP_VARIADICS && BOOST_PP_VARIADICS_MSVC # include # include # include # define BOOST_PP_TUPLE_IS_SINGLE_RETURN(sr,nsr,tuple) \ BOOST_PP_IIF(BOOST_PP_IS_1(BOOST_PP_TUPLE_SIZE(tuple)),sr,nsr) \ /**/ # endif /* BOOST_PP_VARIADICS && BOOST_PP_VARIADICS_MSVC */ # # endif /* BOOST_PREPROCESSOR_TUPLE_DETAIL_IS_SINGLE_RETURN_HPP */ ================================================ FILE: benchmarks/boost/preprocessor/tuple/eat.hpp ================================================ # /* Copyright (C) 2001 # * Housemarque Oy # * http://www.housemarque.com # * # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # */ # # /* Revised by Paul Mensonides (2002-2011) */ # /* Revised by Edward Diener (2011,2015) */ # # /* See http://www.boost.org for most recent version. */ # # ifndef BOOST_PREPROCESSOR_TUPLE_EAT_HPP # define BOOST_PREPROCESSOR_TUPLE_EAT_HPP # # include # # /* BOOST_PP_EAT */ # # if BOOST_PP_VARIADICS # define BOOST_PP_EAT(...) # else # define BOOST_PP_EAT(x) # endif # # /* BOOST_PP_TUPLE_EAT */ # # if BOOST_PP_VARIADICS # define BOOST_PP_TUPLE_EAT(size) BOOST_PP_EAT # else # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC() # define BOOST_PP_TUPLE_EAT(size) BOOST_PP_TUPLE_EAT_I(size) # else # define BOOST_PP_TUPLE_EAT(size) BOOST_PP_TUPLE_EAT_OO((size)) # define BOOST_PP_TUPLE_EAT_OO(par) BOOST_PP_TUPLE_EAT_I ## par # endif # define BOOST_PP_TUPLE_EAT_I(size) BOOST_PP_TUPLE_EAT_ ## size # endif # # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC() # define BOOST_PP_TUPLE_EAT_N(size) BOOST_PP_TUPLE_EAT_N_I(size) # else # define BOOST_PP_TUPLE_EAT_N(size) BOOST_PP_TUPLE_EAT_N_OO((size)) # define BOOST_PP_TUPLE_EAT_N_OO(par) BOOST_PP_TUPLE_EAT_N_I ## par # endif # define BOOST_PP_TUPLE_EAT_N_I(size) BOOST_PP_TUPLE_EAT_ ## size # # define BOOST_PP_TUPLE_EAT_1(e0) # define BOOST_PP_TUPLE_EAT_2(e0, e1) # define BOOST_PP_TUPLE_EAT_3(e0, e1, e2) # define BOOST_PP_TUPLE_EAT_4(e0, e1, e2, e3) # define BOOST_PP_TUPLE_EAT_5(e0, e1, e2, e3, e4) # define BOOST_PP_TUPLE_EAT_6(e0, e1, e2, e3, e4, e5) # define BOOST_PP_TUPLE_EAT_7(e0, e1, e2, e3, e4, e5, e6) # define BOOST_PP_TUPLE_EAT_8(e0, e1, e2, e3, e4, e5, e6, e7) # define BOOST_PP_TUPLE_EAT_9(e0, e1, e2, e3, e4, e5, e6, e7, e8) # define BOOST_PP_TUPLE_EAT_10(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9) # define BOOST_PP_TUPLE_EAT_11(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10) # define BOOST_PP_TUPLE_EAT_12(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11) # define BOOST_PP_TUPLE_EAT_13(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12) # define BOOST_PP_TUPLE_EAT_14(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13) # define BOOST_PP_TUPLE_EAT_15(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14) # define BOOST_PP_TUPLE_EAT_16(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15) # define BOOST_PP_TUPLE_EAT_17(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16) # define BOOST_PP_TUPLE_EAT_18(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17) # define BOOST_PP_TUPLE_EAT_19(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18) # define BOOST_PP_TUPLE_EAT_20(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19) # define BOOST_PP_TUPLE_EAT_21(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20) # define BOOST_PP_TUPLE_EAT_22(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21) # define BOOST_PP_TUPLE_EAT_23(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22) # define BOOST_PP_TUPLE_EAT_24(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23) # define BOOST_PP_TUPLE_EAT_25(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24) # define BOOST_PP_TUPLE_EAT_26(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25) # define BOOST_PP_TUPLE_EAT_27(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26) # define BOOST_PP_TUPLE_EAT_28(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27) # define BOOST_PP_TUPLE_EAT_29(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28) # define BOOST_PP_TUPLE_EAT_30(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29) # define BOOST_PP_TUPLE_EAT_31(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30) # define BOOST_PP_TUPLE_EAT_32(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31) # define BOOST_PP_TUPLE_EAT_33(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32) # define BOOST_PP_TUPLE_EAT_34(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33) # define BOOST_PP_TUPLE_EAT_35(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34) # define BOOST_PP_TUPLE_EAT_36(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35) # define BOOST_PP_TUPLE_EAT_37(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36) # define BOOST_PP_TUPLE_EAT_38(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37) # define BOOST_PP_TUPLE_EAT_39(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38) # define BOOST_PP_TUPLE_EAT_40(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39) # define BOOST_PP_TUPLE_EAT_41(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40) # define BOOST_PP_TUPLE_EAT_42(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41) # define BOOST_PP_TUPLE_EAT_43(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42) # define BOOST_PP_TUPLE_EAT_44(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43) # define BOOST_PP_TUPLE_EAT_45(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44) # define BOOST_PP_TUPLE_EAT_46(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45) # define BOOST_PP_TUPLE_EAT_47(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46) # define BOOST_PP_TUPLE_EAT_48(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47) # define BOOST_PP_TUPLE_EAT_49(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48) # define BOOST_PP_TUPLE_EAT_50(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49) # define BOOST_PP_TUPLE_EAT_51(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50) # define BOOST_PP_TUPLE_EAT_52(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51) # define BOOST_PP_TUPLE_EAT_53(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52) # define BOOST_PP_TUPLE_EAT_54(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53) # define BOOST_PP_TUPLE_EAT_55(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54) # define BOOST_PP_TUPLE_EAT_56(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55) # define BOOST_PP_TUPLE_EAT_57(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56) # define BOOST_PP_TUPLE_EAT_58(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57) # define BOOST_PP_TUPLE_EAT_59(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58) # define BOOST_PP_TUPLE_EAT_60(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59) # define BOOST_PP_TUPLE_EAT_61(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60) # define BOOST_PP_TUPLE_EAT_62(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61) # define BOOST_PP_TUPLE_EAT_63(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62) # define BOOST_PP_TUPLE_EAT_64(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) # # endif ================================================ FILE: benchmarks/boost/preprocessor/tuple/elem.hpp ================================================ # /* Copyright (C) 2001 # * Housemarque Oy # * http://www.housemarque.com # * # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # */ # # /* Revised by Paul Mensonides (2002-2011) */ # /* Revised by Edward Diener (2011,2014) */ # # /* See http://www.boost.org for most recent version. */ # # ifndef BOOST_PREPROCESSOR_TUPLE_ELEM_HPP # define BOOST_PREPROCESSOR_TUPLE_ELEM_HPP # # include # include # include # include # include # include # include # # if BOOST_PP_VARIADICS # if BOOST_PP_VARIADICS_MSVC # define BOOST_PP_TUPLE_ELEM(...) BOOST_PP_TUPLE_ELEM_I(BOOST_PP_OVERLOAD(BOOST_PP_TUPLE_ELEM_O_, __VA_ARGS__), (__VA_ARGS__)) # define BOOST_PP_TUPLE_ELEM_I(m, args) BOOST_PP_TUPLE_ELEM_II(m, args) # define BOOST_PP_TUPLE_ELEM_II(m, args) BOOST_PP_CAT(m ## args,) /* Use BOOST_PP_REM_CAT if it is a single element tuple ( which might be empty ) else use BOOST_PP_REM. This fixes a VC++ problem with an empty tuple and BOOST_PP_TUPLE_ELEM functionality. See tuple_elem_bug_test.cxx. */ # define BOOST_PP_TUPLE_ELEM_O_2(n, tuple) \ BOOST_PP_VARIADIC_ELEM(n, BOOST_PP_EXPAND(BOOST_PP_TUPLE_IS_SINGLE_RETURN(BOOST_PP_REM_CAT,BOOST_PP_REM,tuple) tuple)) \ /**/ # else # define BOOST_PP_TUPLE_ELEM(...) BOOST_PP_OVERLOAD(BOOST_PP_TUPLE_ELEM_O_, __VA_ARGS__)(__VA_ARGS__) # define BOOST_PP_TUPLE_ELEM_O_2(n, tuple) BOOST_PP_VARIADIC_ELEM(n, BOOST_PP_REM tuple) # endif # define BOOST_PP_TUPLE_ELEM_O_3(size, n, tuple) BOOST_PP_TUPLE_ELEM_O_2(n, tuple) # else # if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MSVC() # define BOOST_PP_TUPLE_ELEM(size, n, tuple) BOOST_PP_TUPLE_ELEM_I(BOOST_PP_CAT(BOOST_PP_TUPLE_ELEM_, n), BOOST_PP_CAT(BOOST_PP_CAT(BOOST_PP_TUPLE_ELEM_E_, size), tuple)) # define BOOST_PP_TUPLE_ELEM_I(m, args) BOOST_PP_TUPLE_ELEM_II(m, args) # define BOOST_PP_TUPLE_ELEM_II(m, args) BOOST_PP_CAT(m ## args,) # elif BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC() # define BOOST_PP_TUPLE_ELEM(size, n, tuple) BOOST_PP_TUPLE_ELEM_I_OO((size, n, tuple)) # define BOOST_PP_TUPLE_ELEM_I_OO(par) BOOST_PP_TUPLE_ELEM_I ## par # define BOOST_PP_TUPLE_ELEM_I(size, n, tuple) BOOST_PP_TUPLE_ELEM_II((n, BOOST_PP_TUPLE_ELEM_E_ ## size ## tuple)) # define BOOST_PP_TUPLE_ELEM_II(par) BOOST_PP_TUPLE_ELEM_III_OO(par) # define BOOST_PP_TUPLE_ELEM_III_OO(par) BOOST_PP_TUPLE_ELEM_III ## par # define BOOST_PP_TUPLE_ELEM_III(n, etuple) BOOST_PP_TUPLE_ELEM_ ## n ## etuple # else # define BOOST_PP_TUPLE_ELEM(size, n, tuple) BOOST_PP_TUPLE_ELEM_I(BOOST_PP_CAT(BOOST_PP_TUPLE_ELEM_, n) BOOST_PP_CAT(BOOST_PP_TUPLE_ELEM_E_, size) tuple) # define BOOST_PP_TUPLE_ELEM_I(x) x # endif # define BOOST_PP_TUPLE_ELEM_E_1(e0) (e0, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) # define BOOST_PP_TUPLE_ELEM_E_2(e0, e1) (e0, e1, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) # define BOOST_PP_TUPLE_ELEM_E_3(e0, e1, e2) (e0, e1, e2, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) # define BOOST_PP_TUPLE_ELEM_E_4(e0, e1, e2, e3) (e0, e1, e2, e3, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) # define BOOST_PP_TUPLE_ELEM_E_5(e0, e1, e2, e3, e4) (e0, e1, e2, e3, e4, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) # define BOOST_PP_TUPLE_ELEM_E_6(e0, e1, e2, e3, e4, e5) (e0, e1, e2, e3, e4, e5, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) # define BOOST_PP_TUPLE_ELEM_E_7(e0, e1, e2, e3, e4, e5, e6) (e0, e1, e2, e3, e4, e5, e6, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) # define BOOST_PP_TUPLE_ELEM_E_8(e0, e1, e2, e3, e4, e5, e6, e7) (e0, e1, e2, e3, e4, e5, e6, e7, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) # define BOOST_PP_TUPLE_ELEM_E_9(e0, e1, e2, e3, e4, e5, e6, e7, e8) (e0, e1, e2, e3, e4, e5, e6, e7, e8, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) # define BOOST_PP_TUPLE_ELEM_E_10(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) # define BOOST_PP_TUPLE_ELEM_E_11(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) # define BOOST_PP_TUPLE_ELEM_E_12(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) # define BOOST_PP_TUPLE_ELEM_E_13(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) # define BOOST_PP_TUPLE_ELEM_E_14(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) # define BOOST_PP_TUPLE_ELEM_E_15(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) # define BOOST_PP_TUPLE_ELEM_E_16(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) # define BOOST_PP_TUPLE_ELEM_E_17(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) # define BOOST_PP_TUPLE_ELEM_E_18(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) # define BOOST_PP_TUPLE_ELEM_E_19(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) # define BOOST_PP_TUPLE_ELEM_E_20(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) # define BOOST_PP_TUPLE_ELEM_E_21(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) # define BOOST_PP_TUPLE_ELEM_E_22(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) # define BOOST_PP_TUPLE_ELEM_E_23(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) # define BOOST_PP_TUPLE_ELEM_E_24(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) # define BOOST_PP_TUPLE_ELEM_E_25(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) # define BOOST_PP_TUPLE_ELEM_E_26(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) # define BOOST_PP_TUPLE_ELEM_E_27(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) # define BOOST_PP_TUPLE_ELEM_E_28(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) # define BOOST_PP_TUPLE_ELEM_E_29(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) # define BOOST_PP_TUPLE_ELEM_E_30(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) # define BOOST_PP_TUPLE_ELEM_E_31(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) # define BOOST_PP_TUPLE_ELEM_E_32(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) # define BOOST_PP_TUPLE_ELEM_E_33(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) # define BOOST_PP_TUPLE_ELEM_E_34(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) # define BOOST_PP_TUPLE_ELEM_E_35(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) # define BOOST_PP_TUPLE_ELEM_E_36(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) # define BOOST_PP_TUPLE_ELEM_E_37(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) # define BOOST_PP_TUPLE_ELEM_E_38(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) # define BOOST_PP_TUPLE_ELEM_E_39(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) # define BOOST_PP_TUPLE_ELEM_E_40(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) # define BOOST_PP_TUPLE_ELEM_E_41(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) # define BOOST_PP_TUPLE_ELEM_E_42(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) # define BOOST_PP_TUPLE_ELEM_E_43(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) # define BOOST_PP_TUPLE_ELEM_E_44(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) # define BOOST_PP_TUPLE_ELEM_E_45(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) # define BOOST_PP_TUPLE_ELEM_E_46(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) # define BOOST_PP_TUPLE_ELEM_E_47(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) # define BOOST_PP_TUPLE_ELEM_E_48(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) # define BOOST_PP_TUPLE_ELEM_E_49(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) # define BOOST_PP_TUPLE_ELEM_E_50(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) # define BOOST_PP_TUPLE_ELEM_E_51(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) # define BOOST_PP_TUPLE_ELEM_E_52(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) # define BOOST_PP_TUPLE_ELEM_E_53(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) # define BOOST_PP_TUPLE_ELEM_E_54(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) # define BOOST_PP_TUPLE_ELEM_E_55(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, ?, ?, ?, ?, ?, ?, ?, ?, ?) # define BOOST_PP_TUPLE_ELEM_E_56(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, ?, ?, ?, ?, ?, ?, ?, ?) # define BOOST_PP_TUPLE_ELEM_E_57(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, ?, ?, ?, ?, ?, ?, ?) # define BOOST_PP_TUPLE_ELEM_E_58(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, ?, ?, ?, ?, ?, ?) # define BOOST_PP_TUPLE_ELEM_E_59(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, ?, ?, ?, ?, ?) # define BOOST_PP_TUPLE_ELEM_E_60(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, ?, ?, ?, ?) # define BOOST_PP_TUPLE_ELEM_E_61(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, ?, ?, ?) # define BOOST_PP_TUPLE_ELEM_E_62(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, ?, ?) # define BOOST_PP_TUPLE_ELEM_E_63(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, ?) # define BOOST_PP_TUPLE_ELEM_E_64 # define BOOST_PP_TUPLE_ELEM_0(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e0 # define BOOST_PP_TUPLE_ELEM_1(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e1 # define BOOST_PP_TUPLE_ELEM_2(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e2 # define BOOST_PP_TUPLE_ELEM_3(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e3 # define BOOST_PP_TUPLE_ELEM_4(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e4 # define BOOST_PP_TUPLE_ELEM_5(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e5 # define BOOST_PP_TUPLE_ELEM_6(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e6 # define BOOST_PP_TUPLE_ELEM_7(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e7 # define BOOST_PP_TUPLE_ELEM_8(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e8 # define BOOST_PP_TUPLE_ELEM_9(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e9 # define BOOST_PP_TUPLE_ELEM_10(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e10 # define BOOST_PP_TUPLE_ELEM_11(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e11 # define BOOST_PP_TUPLE_ELEM_12(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e12 # define BOOST_PP_TUPLE_ELEM_13(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e13 # define BOOST_PP_TUPLE_ELEM_14(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e14 # define BOOST_PP_TUPLE_ELEM_15(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e15 # define BOOST_PP_TUPLE_ELEM_16(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e16 # define BOOST_PP_TUPLE_ELEM_17(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e17 # define BOOST_PP_TUPLE_ELEM_18(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e18 # define BOOST_PP_TUPLE_ELEM_19(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e19 # define BOOST_PP_TUPLE_ELEM_20(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e20 # define BOOST_PP_TUPLE_ELEM_21(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e21 # define BOOST_PP_TUPLE_ELEM_22(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e22 # define BOOST_PP_TUPLE_ELEM_23(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e23 # define BOOST_PP_TUPLE_ELEM_24(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e24 # define BOOST_PP_TUPLE_ELEM_25(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e25 # define BOOST_PP_TUPLE_ELEM_26(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e26 # define BOOST_PP_TUPLE_ELEM_27(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e27 # define BOOST_PP_TUPLE_ELEM_28(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e28 # define BOOST_PP_TUPLE_ELEM_29(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e29 # define BOOST_PP_TUPLE_ELEM_30(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e30 # define BOOST_PP_TUPLE_ELEM_31(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e31 # define BOOST_PP_TUPLE_ELEM_32(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e32 # define BOOST_PP_TUPLE_ELEM_33(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e33 # define BOOST_PP_TUPLE_ELEM_34(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e34 # define BOOST_PP_TUPLE_ELEM_35(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e35 # define BOOST_PP_TUPLE_ELEM_36(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e36 # define BOOST_PP_TUPLE_ELEM_37(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e37 # define BOOST_PP_TUPLE_ELEM_38(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e38 # define BOOST_PP_TUPLE_ELEM_39(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e39 # define BOOST_PP_TUPLE_ELEM_40(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e40 # define BOOST_PP_TUPLE_ELEM_41(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e41 # define BOOST_PP_TUPLE_ELEM_42(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e42 # define BOOST_PP_TUPLE_ELEM_43(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e43 # define BOOST_PP_TUPLE_ELEM_44(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e44 # define BOOST_PP_TUPLE_ELEM_45(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e45 # define BOOST_PP_TUPLE_ELEM_46(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e46 # define BOOST_PP_TUPLE_ELEM_47(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e47 # define BOOST_PP_TUPLE_ELEM_48(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e48 # define BOOST_PP_TUPLE_ELEM_49(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e49 # define BOOST_PP_TUPLE_ELEM_50(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e50 # define BOOST_PP_TUPLE_ELEM_51(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e51 # define BOOST_PP_TUPLE_ELEM_52(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e52 # define BOOST_PP_TUPLE_ELEM_53(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e53 # define BOOST_PP_TUPLE_ELEM_54(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e54 # define BOOST_PP_TUPLE_ELEM_55(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e55 # define BOOST_PP_TUPLE_ELEM_56(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e56 # define BOOST_PP_TUPLE_ELEM_57(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e57 # define BOOST_PP_TUPLE_ELEM_58(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e58 # define BOOST_PP_TUPLE_ELEM_59(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e59 # define BOOST_PP_TUPLE_ELEM_60(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e60 # define BOOST_PP_TUPLE_ELEM_61(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e61 # define BOOST_PP_TUPLE_ELEM_62(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e62 # define BOOST_PP_TUPLE_ELEM_63(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e63 # endif # # /* directly used elsewhere in Boost... */ # # define BOOST_PP_TUPLE_ELEM_1_0(a) a # # define BOOST_PP_TUPLE_ELEM_2_0(a, b) a # define BOOST_PP_TUPLE_ELEM_2_1(a, b) b # # define BOOST_PP_TUPLE_ELEM_3_0(a, b, c) a # define BOOST_PP_TUPLE_ELEM_3_1(a, b, c) b # define BOOST_PP_TUPLE_ELEM_3_2(a, b, c) c # # endif ================================================ FILE: benchmarks/boost/preprocessor/tuple/rem.hpp ================================================ # /* ************************************************************************** # * * # * (C) Copyright Paul Mensonides 2002-2011. * # * (C) Copyright Edward Diener 2011,2013. * # * Distributed under the Boost Software License, Version 1.0. (See * # * accompanying file LICENSE_1_0.txt or copy at * # * http://www.boost.org/LICENSE_1_0.txt) * # * * # ************************************************************************** */ # # /* See http://www.boost.org for most recent version. */ # # ifndef BOOST_PREPROCESSOR_TUPLE_REM_HPP # define BOOST_PREPROCESSOR_TUPLE_REM_HPP # # include # include # include # include # include # # /* BOOST_PP_REM */ # # if BOOST_PP_VARIADICS # if BOOST_PP_VARIADICS_MSVC /* To be used internally when __VA_ARGS__ could be empty ( or is a single element ) */ # define BOOST_PP_REM_CAT(...) BOOST_PP_CAT(__VA_ARGS__,) # endif # define BOOST_PP_REM(...) __VA_ARGS__ # else # define BOOST_PP_REM(x) x # endif # # /* BOOST_PP_TUPLE_REM */ # /* VC++8.0 cannot handle the variadic version of BOOST_PP_TUPLE_REM(size) */ # if BOOST_PP_VARIADICS && !(BOOST_PP_VARIADICS_MSVC && _MSC_VER <= 1400) # if BOOST_PP_VARIADICS_MSVC /* To be used internally when the size could be 0 ( or 1 ) */ # define BOOST_PP_TUPLE_REM_CAT(size) BOOST_PP_REM_CAT # endif # define BOOST_PP_TUPLE_REM(size) BOOST_PP_REM # else # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC() # define BOOST_PP_TUPLE_REM(size) BOOST_PP_TUPLE_REM_I(size) # else # define BOOST_PP_TUPLE_REM(size) BOOST_PP_TUPLE_REM_OO((size)) # define BOOST_PP_TUPLE_REM_OO(par) BOOST_PP_TUPLE_REM_I ## par # endif # define BOOST_PP_TUPLE_REM_I(size) BOOST_PP_TUPLE_REM_ ## size # endif # define BOOST_PP_TUPLE_REM_0() # define BOOST_PP_TUPLE_REM_1(e0) e0 # define BOOST_PP_TUPLE_REM_2(e0, e1) e0, e1 # define BOOST_PP_TUPLE_REM_3(e0, e1, e2) e0, e1, e2 # define BOOST_PP_TUPLE_REM_4(e0, e1, e2, e3) e0, e1, e2, e3 # define BOOST_PP_TUPLE_REM_5(e0, e1, e2, e3, e4) e0, e1, e2, e3, e4 # define BOOST_PP_TUPLE_REM_6(e0, e1, e2, e3, e4, e5) e0, e1, e2, e3, e4, e5 # define BOOST_PP_TUPLE_REM_7(e0, e1, e2, e3, e4, e5, e6) e0, e1, e2, e3, e4, e5, e6 # define BOOST_PP_TUPLE_REM_8(e0, e1, e2, e3, e4, e5, e6, e7) e0, e1, e2, e3, e4, e5, e6, e7 # define BOOST_PP_TUPLE_REM_9(e0, e1, e2, e3, e4, e5, e6, e7, e8) e0, e1, e2, e3, e4, e5, e6, e7, e8 # define BOOST_PP_TUPLE_REM_10(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9 # define BOOST_PP_TUPLE_REM_11(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10 # define BOOST_PP_TUPLE_REM_12(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11 # define BOOST_PP_TUPLE_REM_13(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12 # define BOOST_PP_TUPLE_REM_14(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13 # define BOOST_PP_TUPLE_REM_15(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14 # define BOOST_PP_TUPLE_REM_16(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15 # define BOOST_PP_TUPLE_REM_17(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16 # define BOOST_PP_TUPLE_REM_18(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17 # define BOOST_PP_TUPLE_REM_19(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18 # define BOOST_PP_TUPLE_REM_20(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19 # define BOOST_PP_TUPLE_REM_21(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20 # define BOOST_PP_TUPLE_REM_22(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21 # define BOOST_PP_TUPLE_REM_23(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22 # define BOOST_PP_TUPLE_REM_24(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23 # define BOOST_PP_TUPLE_REM_25(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24 # define BOOST_PP_TUPLE_REM_26(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25 # define BOOST_PP_TUPLE_REM_27(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26 # define BOOST_PP_TUPLE_REM_28(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27 # define BOOST_PP_TUPLE_REM_29(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28 # define BOOST_PP_TUPLE_REM_30(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29 # define BOOST_PP_TUPLE_REM_31(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30 # define BOOST_PP_TUPLE_REM_32(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31 # define BOOST_PP_TUPLE_REM_33(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32 # define BOOST_PP_TUPLE_REM_34(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33 # define BOOST_PP_TUPLE_REM_35(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34 # define BOOST_PP_TUPLE_REM_36(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35 # define BOOST_PP_TUPLE_REM_37(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36 # define BOOST_PP_TUPLE_REM_38(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37 # define BOOST_PP_TUPLE_REM_39(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38 # define BOOST_PP_TUPLE_REM_40(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39 # define BOOST_PP_TUPLE_REM_41(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40 # define BOOST_PP_TUPLE_REM_42(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41 # define BOOST_PP_TUPLE_REM_43(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42 # define BOOST_PP_TUPLE_REM_44(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43 # define BOOST_PP_TUPLE_REM_45(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44 # define BOOST_PP_TUPLE_REM_46(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45 # define BOOST_PP_TUPLE_REM_47(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46 # define BOOST_PP_TUPLE_REM_48(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47 # define BOOST_PP_TUPLE_REM_49(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48 # define BOOST_PP_TUPLE_REM_50(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49 # define BOOST_PP_TUPLE_REM_51(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50 # define BOOST_PP_TUPLE_REM_52(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51 # define BOOST_PP_TUPLE_REM_53(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52 # define BOOST_PP_TUPLE_REM_54(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53 # define BOOST_PP_TUPLE_REM_55(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54 # define BOOST_PP_TUPLE_REM_56(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55 # define BOOST_PP_TUPLE_REM_57(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56 # define BOOST_PP_TUPLE_REM_58(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57 # define BOOST_PP_TUPLE_REM_59(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58 # define BOOST_PP_TUPLE_REM_60(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59 # define BOOST_PP_TUPLE_REM_61(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60 # define BOOST_PP_TUPLE_REM_62(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61 # define BOOST_PP_TUPLE_REM_63(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62 # define BOOST_PP_TUPLE_REM_64(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63 # # /* BOOST_PP_TUPLE_REM_CTOR */ # # if BOOST_PP_VARIADICS # if BOOST_PP_VARIADICS_MSVC # define BOOST_PP_TUPLE_REM_CTOR(...) BOOST_PP_TUPLE_REM_CTOR_I(BOOST_PP_OVERLOAD(BOOST_PP_TUPLE_REM_CTOR_O_, __VA_ARGS__), (__VA_ARGS__)) # define BOOST_PP_TUPLE_REM_CTOR_I(m, args) BOOST_PP_TUPLE_REM_CTOR_II(m, args) # define BOOST_PP_TUPLE_REM_CTOR_II(m, args) BOOST_PP_CAT(m ## args,) # define BOOST_PP_TUPLE_REM_CTOR_O_1(tuple) BOOST_PP_EXPAND(BOOST_PP_TUPLE_IS_SINGLE_RETURN(BOOST_PP_REM_CAT,BOOST_PP_REM,tuple) tuple) # else # define BOOST_PP_TUPLE_REM_CTOR(...) BOOST_PP_OVERLOAD(BOOST_PP_TUPLE_REM_CTOR_O_, __VA_ARGS__)(__VA_ARGS__) # define BOOST_PP_TUPLE_REM_CTOR_O_1(tuple) BOOST_PP_REM tuple # endif # define BOOST_PP_TUPLE_REM_CTOR_O_2(size, tuple) BOOST_PP_TUPLE_REM_CTOR_O_1(tuple) # else # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() # define BOOST_PP_TUPLE_REM_CTOR(size, tuple) BOOST_PP_TUPLE_REM_CTOR_I(BOOST_PP_TUPLE_REM(size), tuple) # else # define BOOST_PP_TUPLE_REM_CTOR(size, tuple) BOOST_PP_TUPLE_REM_CTOR_D(size, tuple) # define BOOST_PP_TUPLE_REM_CTOR_D(size, tuple) BOOST_PP_TUPLE_REM_CTOR_I(BOOST_PP_TUPLE_REM(size), tuple) # endif # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC() # define BOOST_PP_TUPLE_REM_CTOR_I(ext, tuple) ext tuple # else # define BOOST_PP_TUPLE_REM_CTOR_I(ext, tuple) BOOST_PP_TUPLE_REM_CTOR_OO((ext, tuple)) # define BOOST_PP_TUPLE_REM_CTOR_OO(par) BOOST_PP_TUPLE_REM_CTOR_II ## par # define BOOST_PP_TUPLE_REM_CTOR_II(ext, tuple) ext ## tuple # endif # endif # # endif ================================================ FILE: benchmarks/boost/preprocessor/tuple/size.hpp ================================================ # /* ************************************************************************** # * * # * (C) Copyright Edward Diener 2011. * # * (C) Copyright Paul Mensonides 2011. * # * Distributed under the Boost Software License, Version 1.0. (See * # * accompanying file LICENSE_1_0.txt or copy at * # * http://www.boost.org/LICENSE_1_0.txt) * # * * # ************************************************************************** */ # # /* See http://www.boost.org for most recent version. */ # # ifndef BOOST_PREPROCESSOR_TUPLE_SIZE_HPP # define BOOST_PREPROCESSOR_TUPLE_SIZE_HPP # # include # include # include # # if BOOST_PP_VARIADICS # if BOOST_PP_VARIADICS_MSVC # define BOOST_PP_TUPLE_SIZE(tuple) BOOST_PP_CAT(BOOST_PP_VARIADIC_SIZE tuple,) # else # define BOOST_PP_TUPLE_SIZE(tuple) BOOST_PP_VARIADIC_SIZE tuple # endif # endif # # endif ================================================ FILE: benchmarks/boost/preprocessor/tuple/to_list.hpp ================================================ # /* Copyright (C) 2001 # * Housemarque Oy # * http://www.housemarque.com # * # * Distributed under the Boost Software License, Version 1.0. (See # * accompanying file LICENSE_1_0.txt or copy at # * http://www.boost.org/LICENSE_1_0.txt) # */ # # /* Revised by Paul Mensonides (2002-2011) */ # /* Revised by Edward Diener (2011) */ # # /* See http://www.boost.org for most recent version. */ # # ifndef BOOST_PREPROCESSOR_TUPLE_TO_LIST_HPP # define BOOST_PREPROCESSOR_TUPLE_TO_LIST_HPP # # include # include # include # include # include # # /* BOOST_PP_TUPLE_TO_LIST */ # # if BOOST_PP_VARIADICS # if BOOST_PP_VARIADICS_MSVC # define BOOST_PP_TUPLE_TO_LIST(...) BOOST_PP_TUPLE_TO_LIST_I(BOOST_PP_OVERLOAD(BOOST_PP_TUPLE_TO_LIST_O_, __VA_ARGS__), (__VA_ARGS__)) # define BOOST_PP_TUPLE_TO_LIST_I(m, args) BOOST_PP_TUPLE_TO_LIST_II(m, args) # define BOOST_PP_TUPLE_TO_LIST_II(m, args) BOOST_PP_CAT(m ## args,) # define BOOST_PP_TUPLE_TO_LIST_O_1(tuple) BOOST_PP_CAT(BOOST_PP_TUPLE_TO_LIST_, BOOST_PP_TUPLE_SIZE(tuple)) tuple # else # define BOOST_PP_TUPLE_TO_LIST(...) BOOST_PP_OVERLOAD(BOOST_PP_TUPLE_TO_LIST_O_, __VA_ARGS__)(__VA_ARGS__) # define BOOST_PP_TUPLE_TO_LIST_O_1(tuple) BOOST_PP_CAT(BOOST_PP_TUPLE_TO_LIST_, BOOST_PP_VARIADIC_SIZE tuple) tuple # endif # define BOOST_PP_TUPLE_TO_LIST_O_2(size, tuple) BOOST_PP_TUPLE_TO_LIST_O_1(tuple) # else # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC() # define BOOST_PP_TUPLE_TO_LIST(size, tuple) BOOST_PP_TUPLE_TO_LIST_I(size, tuple) # if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MSVC() # define BOOST_PP_TUPLE_TO_LIST_I(s, t) BOOST_PP_TUPLE_TO_LIST_ ## s t # else # define BOOST_PP_TUPLE_TO_LIST_I(s, t) BOOST_PP_TUPLE_TO_LIST_II(BOOST_PP_TUPLE_TO_LIST_ ## s t) # define BOOST_PP_TUPLE_TO_LIST_II(res) res # endif # else # define BOOST_PP_TUPLE_TO_LIST(size, tuple) BOOST_PP_TUPLE_TO_LIST_OO((size, tuple)) # define BOOST_PP_TUPLE_TO_LIST_OO(par) BOOST_PP_TUPLE_TO_LIST_I ## par # define BOOST_PP_TUPLE_TO_LIST_I(s, t) BOOST_PP_TUPLE_TO_LIST_ ## s ## t # endif # endif # # define BOOST_PP_TUPLE_TO_LIST_1(e0) (e0, BOOST_PP_NIL) # define BOOST_PP_TUPLE_TO_LIST_2(e0, e1) (e0, (e1, BOOST_PP_NIL)) # define BOOST_PP_TUPLE_TO_LIST_3(e0, e1, e2) (e0, (e1, (e2, BOOST_PP_NIL))) # define BOOST_PP_TUPLE_TO_LIST_4(e0, e1, e2, e3) (e0, (e1, (e2, (e3, BOOST_PP_NIL)))) # define BOOST_PP_TUPLE_TO_LIST_5(e0, e1, e2, e3, e4) (e0, (e1, (e2, (e3, (e4, BOOST_PP_NIL))))) # define BOOST_PP_TUPLE_TO_LIST_6(e0, e1, e2, e3, e4, e5) (e0, (e1, (e2, (e3, (e4, (e5, BOOST_PP_NIL)))))) # define BOOST_PP_TUPLE_TO_LIST_7(e0, e1, e2, e3, e4, e5, e6) (e0, (e1, (e2, (e3, (e4, (e5, (e6, BOOST_PP_NIL))))))) # define BOOST_PP_TUPLE_TO_LIST_8(e0, e1, e2, e3, e4, e5, e6, e7) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, BOOST_PP_NIL)))))))) # define BOOST_PP_TUPLE_TO_LIST_9(e0, e1, e2, e3, e4, e5, e6, e7, e8) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, BOOST_PP_NIL))))))))) # define BOOST_PP_TUPLE_TO_LIST_10(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, BOOST_PP_NIL)))))))))) # define BOOST_PP_TUPLE_TO_LIST_11(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, BOOST_PP_NIL))))))))))) # define BOOST_PP_TUPLE_TO_LIST_12(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, BOOST_PP_NIL)))))))))))) # define BOOST_PP_TUPLE_TO_LIST_13(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, BOOST_PP_NIL))))))))))))) # define BOOST_PP_TUPLE_TO_LIST_14(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, BOOST_PP_NIL)))))))))))))) # define BOOST_PP_TUPLE_TO_LIST_15(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, BOOST_PP_NIL))))))))))))))) # define BOOST_PP_TUPLE_TO_LIST_16(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, BOOST_PP_NIL)))))))))))))))) # define BOOST_PP_TUPLE_TO_LIST_17(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, BOOST_PP_NIL))))))))))))))))) # define BOOST_PP_TUPLE_TO_LIST_18(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, BOOST_PP_NIL)))))))))))))))))) # define BOOST_PP_TUPLE_TO_LIST_19(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, BOOST_PP_NIL))))))))))))))))))) # define BOOST_PP_TUPLE_TO_LIST_20(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, BOOST_PP_NIL)))))))))))))))))))) # define BOOST_PP_TUPLE_TO_LIST_21(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, BOOST_PP_NIL))))))))))))))))))))) # define BOOST_PP_TUPLE_TO_LIST_22(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, BOOST_PP_NIL)))))))))))))))))))))) # define BOOST_PP_TUPLE_TO_LIST_23(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, BOOST_PP_NIL))))))))))))))))))))))) # define BOOST_PP_TUPLE_TO_LIST_24(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, BOOST_PP_NIL)))))))))))))))))))))))) # define BOOST_PP_TUPLE_TO_LIST_25(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, (e24, BOOST_PP_NIL))))))))))))))))))))))))) # define BOOST_PP_TUPLE_TO_LIST_26(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, (e24, (e25, BOOST_PP_NIL)))))))))))))))))))))))))) # define BOOST_PP_TUPLE_TO_LIST_27(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, (e24, (e25, (e26, BOOST_PP_NIL))))))))))))))))))))))))))) # define BOOST_PP_TUPLE_TO_LIST_28(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, (e24, (e25, (e26, (e27, BOOST_PP_NIL)))))))))))))))))))))))))))) # define BOOST_PP_TUPLE_TO_LIST_29(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, (e24, (e25, (e26, (e27, (e28, BOOST_PP_NIL))))))))))))))))))))))))))))) # define BOOST_PP_TUPLE_TO_LIST_30(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, (e24, (e25, (e26, (e27, (e28, (e29, BOOST_PP_NIL)))))))))))))))))))))))))))))) # define BOOST_PP_TUPLE_TO_LIST_31(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, (e24, (e25, (e26, (e27, (e28, (e29, (e30, BOOST_PP_NIL))))))))))))))))))))))))))))))) # define BOOST_PP_TUPLE_TO_LIST_32(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, (e24, (e25, (e26, (e27, (e28, (e29, (e30, (e31, BOOST_PP_NIL)))))))))))))))))))))))))))))))) # define BOOST_PP_TUPLE_TO_LIST_33(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, (e24, (e25, (e26, (e27, (e28, (e29, (e30, (e31, (e32, BOOST_PP_NIL))))))))))))))))))))))))))))))))) # define BOOST_PP_TUPLE_TO_LIST_34(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, (e24, (e25, (e26, (e27, (e28, (e29, (e30, (e31, (e32, (e33, BOOST_PP_NIL)))))))))))))))))))))))))))))))))) # define BOOST_PP_TUPLE_TO_LIST_35(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, (e24, (e25, (e26, (e27, (e28, (e29, (e30, (e31, (e32, (e33, (e34, BOOST_PP_NIL))))))))))))))))))))))))))))))))))) # define BOOST_PP_TUPLE_TO_LIST_36(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, (e24, (e25, (e26, (e27, (e28, (e29, (e30, (e31, (e32, (e33, (e34, (e35, BOOST_PP_NIL)))))))))))))))))))))))))))))))))))) # define BOOST_PP_TUPLE_TO_LIST_37(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, (e24, (e25, (e26, (e27, (e28, (e29, (e30, (e31, (e32, (e33, (e34, (e35, (e36, BOOST_PP_NIL))))))))))))))))))))))))))))))))))))) # define BOOST_PP_TUPLE_TO_LIST_38(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, (e24, (e25, (e26, (e27, (e28, (e29, (e30, (e31, (e32, (e33, (e34, (e35, (e36, (e37, BOOST_PP_NIL)))))))))))))))))))))))))))))))))))))) # define BOOST_PP_TUPLE_TO_LIST_39(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, (e24, (e25, (e26, (e27, (e28, (e29, (e30, (e31, (e32, (e33, (e34, (e35, (e36, (e37, (e38, BOOST_PP_NIL))))))))))))))))))))))))))))))))))))))) # define BOOST_PP_TUPLE_TO_LIST_40(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, (e24, (e25, (e26, (e27, (e28, (e29, (e30, (e31, (e32, (e33, (e34, (e35, (e36, (e37, (e38, (e39, BOOST_PP_NIL)))))))))))))))))))))))))))))))))))))))) # define BOOST_PP_TUPLE_TO_LIST_41(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, (e24, (e25, (e26, (e27, (e28, (e29, (e30, (e31, (e32, (e33, (e34, (e35, (e36, (e37, (e38, (e39, (e40, BOOST_PP_NIL))))))))))))))))))))))))))))))))))))))))) # define BOOST_PP_TUPLE_TO_LIST_42(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, (e24, (e25, (e26, (e27, (e28, (e29, (e30, (e31, (e32, (e33, (e34, (e35, (e36, (e37, (e38, (e39, (e40, (e41, BOOST_PP_NIL)))))))))))))))))))))))))))))))))))))))))) # define BOOST_PP_TUPLE_TO_LIST_43(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, (e24, (e25, (e26, (e27, (e28, (e29, (e30, (e31, (e32, (e33, (e34, (e35, (e36, (e37, (e38, (e39, (e40, (e41, (e42, BOOST_PP_NIL))))))))))))))))))))))))))))))))))))))))))) # define BOOST_PP_TUPLE_TO_LIST_44(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, (e24, (e25, (e26, (e27, (e28, (e29, (e30, (e31, (e32, (e33, (e34, (e35, (e36, (e37, (e38, (e39, (e40, (e41, (e42, (e43, BOOST_PP_NIL)))))))))))))))))))))))))))))))))))))))))))) # define BOOST_PP_TUPLE_TO_LIST_45(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, (e24, (e25, (e26, (e27, (e28, (e29, (e30, (e31, (e32, (e33, (e34, (e35, (e36, (e37, (e38, (e39, (e40, (e41, (e42, (e43, (e44, BOOST_PP_NIL))))))))))))))))))))))))))))))))))))))))))))) # define BOOST_PP_TUPLE_TO_LIST_46(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, (e24, (e25, (e26, (e27, (e28, (e29, (e30, (e31, (e32, (e33, (e34, (e35, (e36, (e37, (e38, (e39, (e40, (e41, (e42, (e43, (e44, (e45, BOOST_PP_NIL)))))))))))))))))))))))))))))))))))))))))))))) # define BOOST_PP_TUPLE_TO_LIST_47(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, (e24, (e25, (e26, (e27, (e28, (e29, (e30, (e31, (e32, (e33, (e34, (e35, (e36, (e37, (e38, (e39, (e40, (e41, (e42, (e43, (e44, (e45, (e46, BOOST_PP_NIL))))))))))))))))))))))))))))))))))))))))))))))) # define BOOST_PP_TUPLE_TO_LIST_48(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, (e24, (e25, (e26, (e27, (e28, (e29, (e30, (e31, (e32, (e33, (e34, (e35, (e36, (e37, (e38, (e39, (e40, (e41, (e42, (e43, (e44, (e45, (e46, (e47, BOOST_PP_NIL)))))))))))))))))))))))))))))))))))))))))))))))) # define BOOST_PP_TUPLE_TO_LIST_49(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, (e24, (e25, (e26, (e27, (e28, (e29, (e30, (e31, (e32, (e33, (e34, (e35, (e36, (e37, (e38, (e39, (e40, (e41, (e42, (e43, (e44, (e45, (e46, (e47, (e48, BOOST_PP_NIL))))))))))))))))))))))))))))))))))))))))))))))))) # define BOOST_PP_TUPLE_TO_LIST_50(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, (e24, (e25, (e26, (e27, (e28, (e29, (e30, (e31, (e32, (e33, (e34, (e35, (e36, (e37, (e38, (e39, (e40, (e41, (e42, (e43, (e44, (e45, (e46, (e47, (e48, (e49, BOOST_PP_NIL)))))))))))))))))))))))))))))))))))))))))))))))))) # define BOOST_PP_TUPLE_TO_LIST_51(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, (e24, (e25, (e26, (e27, (e28, (e29, (e30, (e31, (e32, (e33, (e34, (e35, (e36, (e37, (e38, (e39, (e40, (e41, (e42, (e43, (e44, (e45, (e46, (e47, (e48, (e49, (e50, BOOST_PP_NIL))))))))))))))))))))))))))))))))))))))))))))))))))) # define BOOST_PP_TUPLE_TO_LIST_52(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, (e24, (e25, (e26, (e27, (e28, (e29, (e30, (e31, (e32, (e33, (e34, (e35, (e36, (e37, (e38, (e39, (e40, (e41, (e42, (e43, (e44, (e45, (e46, (e47, (e48, (e49, (e50, (e51, BOOST_PP_NIL)))))))))))))))))))))))))))))))))))))))))))))))))))) # define BOOST_PP_TUPLE_TO_LIST_53(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, (e24, (e25, (e26, (e27, (e28, (e29, (e30, (e31, (e32, (e33, (e34, (e35, (e36, (e37, (e38, (e39, (e40, (e41, (e42, (e43, (e44, (e45, (e46, (e47, (e48, (e49, (e50, (e51, (e52, BOOST_PP_NIL))))))))))))))))))))))))))))))))))))))))))))))))))))) # define BOOST_PP_TUPLE_TO_LIST_54(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, (e24, (e25, (e26, (e27, (e28, (e29, (e30, (e31, (e32, (e33, (e34, (e35, (e36, (e37, (e38, (e39, (e40, (e41, (e42, (e43, (e44, (e45, (e46, (e47, (e48, (e49, (e50, (e51, (e52, (e53, BOOST_PP_NIL)))))))))))))))))))))))))))))))))))))))))))))))))))))) # define BOOST_PP_TUPLE_TO_LIST_55(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, (e24, (e25, (e26, (e27, (e28, (e29, (e30, (e31, (e32, (e33, (e34, (e35, (e36, (e37, (e38, (e39, (e40, (e41, (e42, (e43, (e44, (e45, (e46, (e47, (e48, (e49, (e50, (e51, (e52, (e53, (e54, BOOST_PP_NIL))))))))))))))))))))))))))))))))))))))))))))))))))))))) # define BOOST_PP_TUPLE_TO_LIST_56(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, (e24, (e25, (e26, (e27, (e28, (e29, (e30, (e31, (e32, (e33, (e34, (e35, (e36, (e37, (e38, (e39, (e40, (e41, (e42, (e43, (e44, (e45, (e46, (e47, (e48, (e49, (e50, (e51, (e52, (e53, (e54, (e55, BOOST_PP_NIL)))))))))))))))))))))))))))))))))))))))))))))))))))))))) # define BOOST_PP_TUPLE_TO_LIST_57(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, (e24, (e25, (e26, (e27, (e28, (e29, (e30, (e31, (e32, (e33, (e34, (e35, (e36, (e37, (e38, (e39, (e40, (e41, (e42, (e43, (e44, (e45, (e46, (e47, (e48, (e49, (e50, (e51, (e52, (e53, (e54, (e55, (e56, BOOST_PP_NIL))))))))))))))))))))))))))))))))))))))))))))))))))))))))) # define BOOST_PP_TUPLE_TO_LIST_58(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, (e24, (e25, (e26, (e27, (e28, (e29, (e30, (e31, (e32, (e33, (e34, (e35, (e36, (e37, (e38, (e39, (e40, (e41, (e42, (e43, (e44, (e45, (e46, (e47, (e48, (e49, (e50, (e51, (e52, (e53, (e54, (e55, (e56, (e57, BOOST_PP_NIL)))))))))))))))))))))))))))))))))))))))))))))))))))))))))) # define BOOST_PP_TUPLE_TO_LIST_59(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, (e24, (e25, (e26, (e27, (e28, (e29, (e30, (e31, (e32, (e33, (e34, (e35, (e36, (e37, (e38, (e39, (e40, (e41, (e42, (e43, (e44, (e45, (e46, (e47, (e48, (e49, (e50, (e51, (e52, (e53, (e54, (e55, (e56, (e57, (e58, BOOST_PP_NIL))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) # define BOOST_PP_TUPLE_TO_LIST_60(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, (e24, (e25, (e26, (e27, (e28, (e29, (e30, (e31, (e32, (e33, (e34, (e35, (e36, (e37, (e38, (e39, (e40, (e41, (e42, (e43, (e44, (e45, (e46, (e47, (e48, (e49, (e50, (e51, (e52, (e53, (e54, (e55, (e56, (e57, (e58, (e59, BOOST_PP_NIL)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) # define BOOST_PP_TUPLE_TO_LIST_61(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, (e24, (e25, (e26, (e27, (e28, (e29, (e30, (e31, (e32, (e33, (e34, (e35, (e36, (e37, (e38, (e39, (e40, (e41, (e42, (e43, (e44, (e45, (e46, (e47, (e48, (e49, (e50, (e51, (e52, (e53, (e54, (e55, (e56, (e57, (e58, (e59, (e60, BOOST_PP_NIL))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) # define BOOST_PP_TUPLE_TO_LIST_62(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, (e24, (e25, (e26, (e27, (e28, (e29, (e30, (e31, (e32, (e33, (e34, (e35, (e36, (e37, (e38, (e39, (e40, (e41, (e42, (e43, (e44, (e45, (e46, (e47, (e48, (e49, (e50, (e51, (e52, (e53, (e54, (e55, (e56, (e57, (e58, (e59, (e60, (e61, BOOST_PP_NIL)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) # define BOOST_PP_TUPLE_TO_LIST_63(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, (e24, (e25, (e26, (e27, (e28, (e29, (e30, (e31, (e32, (e33, (e34, (e35, (e36, (e37, (e38, (e39, (e40, (e41, (e42, (e43, (e44, (e45, (e46, (e47, (e48, (e49, (e50, (e51, (e52, (e53, (e54, (e55, (e56, (e57, (e58, (e59, (e60, (e61, (e62, BOOST_PP_NIL))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) # define BOOST_PP_TUPLE_TO_LIST_64(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, (e12, (e13, (e14, (e15, (e16, (e17, (e18, (e19, (e20, (e21, (e22, (e23, (e24, (e25, (e26, (e27, (e28, (e29, (e30, (e31, (e32, (e33, (e34, (e35, (e36, (e37, (e38, (e39, (e40, (e41, (e42, (e43, (e44, (e45, (e46, (e47, (e48, (e49, (e50, (e51, (e52, (e53, (e54, (e55, (e56, (e57, (e58, (e59, (e60, (e61, (e62, (e63, BOOST_PP_NIL)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) # # endif ================================================ FILE: benchmarks/boost/preprocessor/variadic/elem.hpp ================================================ # /* ************************************************************************** # * * # * (C) Copyright Edward Diener 2011. * # * (C) Copyright Paul Mensonides 2011. * # * Distributed under the Boost Software License, Version 1.0. (See * # * accompanying file LICENSE_1_0.txt or copy at * # * http://www.boost.org/LICENSE_1_0.txt) * # * * # ************************************************************************** */ # # /* See http://www.boost.org for most recent version. */ # # ifndef BOOST_PREPROCESSOR_VARIADIC_ELEM_HPP # define BOOST_PREPROCESSOR_VARIADIC_ELEM_HPP # # include # include # # /* BOOST_PP_VARIADIC_ELEM */ # # if BOOST_PP_VARIADICS # if BOOST_PP_VARIADICS_MSVC # define BOOST_PP_VARIADIC_ELEM(n, ...) BOOST_PP_VARIADIC_ELEM_I(n,__VA_ARGS__) # define BOOST_PP_VARIADIC_ELEM_I(n, ...) BOOST_PP_CAT(BOOST_PP_CAT(BOOST_PP_VARIADIC_ELEM_, n)(__VA_ARGS__,),) # else # define BOOST_PP_VARIADIC_ELEM(n, ...) BOOST_PP_CAT(BOOST_PP_VARIADIC_ELEM_, n)(__VA_ARGS__,) # endif # define BOOST_PP_VARIADIC_ELEM_0(e0, ...) e0 # define BOOST_PP_VARIADIC_ELEM_1(e0, e1, ...) e1 # define BOOST_PP_VARIADIC_ELEM_2(e0, e1, e2, ...) e2 # define BOOST_PP_VARIADIC_ELEM_3(e0, e1, e2, e3, ...) e3 # define BOOST_PP_VARIADIC_ELEM_4(e0, e1, e2, e3, e4, ...) e4 # define BOOST_PP_VARIADIC_ELEM_5(e0, e1, e2, e3, e4, e5, ...) e5 # define BOOST_PP_VARIADIC_ELEM_6(e0, e1, e2, e3, e4, e5, e6, ...) e6 # define BOOST_PP_VARIADIC_ELEM_7(e0, e1, e2, e3, e4, e5, e6, e7, ...) e7 # define BOOST_PP_VARIADIC_ELEM_8(e0, e1, e2, e3, e4, e5, e6, e7, e8, ...) e8 # define BOOST_PP_VARIADIC_ELEM_9(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, ...) e9 # define BOOST_PP_VARIADIC_ELEM_10(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, ...) e10 # define BOOST_PP_VARIADIC_ELEM_11(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, ...) e11 # define BOOST_PP_VARIADIC_ELEM_12(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, ...) e12 # define BOOST_PP_VARIADIC_ELEM_13(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, ...) e13 # define BOOST_PP_VARIADIC_ELEM_14(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, ...) e14 # define BOOST_PP_VARIADIC_ELEM_15(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, ...) e15 # define BOOST_PP_VARIADIC_ELEM_16(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, ...) e16 # define BOOST_PP_VARIADIC_ELEM_17(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, ...) e17 # define BOOST_PP_VARIADIC_ELEM_18(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, ...) e18 # define BOOST_PP_VARIADIC_ELEM_19(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, ...) e19 # define BOOST_PP_VARIADIC_ELEM_20(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, ...) e20 # define BOOST_PP_VARIADIC_ELEM_21(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, ...) e21 # define BOOST_PP_VARIADIC_ELEM_22(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, ...) e22 # define BOOST_PP_VARIADIC_ELEM_23(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, ...) e23 # define BOOST_PP_VARIADIC_ELEM_24(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, ...) e24 # define BOOST_PP_VARIADIC_ELEM_25(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, ...) e25 # define BOOST_PP_VARIADIC_ELEM_26(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, ...) e26 # define BOOST_PP_VARIADIC_ELEM_27(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, ...) e27 # define BOOST_PP_VARIADIC_ELEM_28(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, ...) e28 # define BOOST_PP_VARIADIC_ELEM_29(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, ...) e29 # define BOOST_PP_VARIADIC_ELEM_30(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, ...) e30 # define BOOST_PP_VARIADIC_ELEM_31(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, ...) e31 # define BOOST_PP_VARIADIC_ELEM_32(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, ...) e32 # define BOOST_PP_VARIADIC_ELEM_33(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, ...) e33 # define BOOST_PP_VARIADIC_ELEM_34(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, ...) e34 # define BOOST_PP_VARIADIC_ELEM_35(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, ...) e35 # define BOOST_PP_VARIADIC_ELEM_36(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, ...) e36 # define BOOST_PP_VARIADIC_ELEM_37(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, ...) e37 # define BOOST_PP_VARIADIC_ELEM_38(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, ...) e38 # define BOOST_PP_VARIADIC_ELEM_39(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, ...) e39 # define BOOST_PP_VARIADIC_ELEM_40(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, ...) e40 # define BOOST_PP_VARIADIC_ELEM_41(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, ...) e41 # define BOOST_PP_VARIADIC_ELEM_42(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, ...) e42 # define BOOST_PP_VARIADIC_ELEM_43(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, ...) e43 # define BOOST_PP_VARIADIC_ELEM_44(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, ...) e44 # define BOOST_PP_VARIADIC_ELEM_45(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, ...) e45 # define BOOST_PP_VARIADIC_ELEM_46(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, ...) e46 # define BOOST_PP_VARIADIC_ELEM_47(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, ...) e47 # define BOOST_PP_VARIADIC_ELEM_48(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, ...) e48 # define BOOST_PP_VARIADIC_ELEM_49(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, ...) e49 # define BOOST_PP_VARIADIC_ELEM_50(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, ...) e50 # define BOOST_PP_VARIADIC_ELEM_51(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, ...) e51 # define BOOST_PP_VARIADIC_ELEM_52(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, ...) e52 # define BOOST_PP_VARIADIC_ELEM_53(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, ...) e53 # define BOOST_PP_VARIADIC_ELEM_54(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, ...) e54 # define BOOST_PP_VARIADIC_ELEM_55(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, ...) e55 # define BOOST_PP_VARIADIC_ELEM_56(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, ...) e56 # define BOOST_PP_VARIADIC_ELEM_57(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, ...) e57 # define BOOST_PP_VARIADIC_ELEM_58(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, ...) e58 # define BOOST_PP_VARIADIC_ELEM_59(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, ...) e59 # define BOOST_PP_VARIADIC_ELEM_60(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, ...) e60 # define BOOST_PP_VARIADIC_ELEM_61(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, ...) e61 # define BOOST_PP_VARIADIC_ELEM_62(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, ...) e62 # define BOOST_PP_VARIADIC_ELEM_63(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63, ...) e63 # endif # # endif ================================================ FILE: benchmarks/boost/preprocessor/variadic/size.hpp ================================================ # /* ************************************************************************** # * * # * (C) Copyright Edward Diener 2011. * # * (C) Copyright Paul Mensonides 2011. * # * Distributed under the Boost Software License, Version 1.0. (See * # * accompanying file LICENSE_1_0.txt or copy at * # * http://www.boost.org/LICENSE_1_0.txt) * # * * # ************************************************************************** */ # # /* See http://www.boost.org for most recent version. */ # # ifndef BOOST_PREPROCESSOR_VARIADIC_SIZE_HPP # define BOOST_PREPROCESSOR_VARIADIC_SIZE_HPP # # include # include # # /* BOOST_PP_VARIADIC_SIZE */ # # if BOOST_PP_VARIADICS # if BOOST_PP_VARIADICS_MSVC # define BOOST_PP_VARIADIC_SIZE(...) BOOST_PP_CAT(BOOST_PP_VARIADIC_SIZE_I(__VA_ARGS__, 64, 63, 62, 61, 60, 59, 58, 57, 56, 55, 54, 53, 52, 51, 50, 49, 48, 47, 46, 45, 44, 43, 42, 41, 40, 39, 38, 37, 36, 35, 34, 33, 32, 31, 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1,),) # else # define BOOST_PP_VARIADIC_SIZE(...) BOOST_PP_VARIADIC_SIZE_I(__VA_ARGS__, 64, 63, 62, 61, 60, 59, 58, 57, 56, 55, 54, 53, 52, 51, 50, 49, 48, 47, 46, 45, 44, 43, 42, 41, 40, 39, 38, 37, 36, 35, 34, 33, 32, 31, 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1,) # endif # define BOOST_PP_VARIADIC_SIZE_I(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62, e63, size, ...) size # endif # # endif ================================================ FILE: benchmarks/boost/static_assert.hpp ================================================ // (C) Copyright John Maddock 2000. // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org/libs/static_assert for documentation. /* Revision history: 02 August 2000 Initial version. */ #ifndef BOOST_STATIC_ASSERT_HPP #define BOOST_STATIC_ASSERT_HPP #include #include #if defined(__GNUC__) && !defined(__GXX_EXPERIMENTAL_CXX0X__) // // This is horrible, but it seems to be the only we can shut up the // "anonymous variadic macros were introduced in C99 [-Wvariadic-macros]" // warning that get spewed out otherwise in non-C++11 mode. // #pragma GCC system_header #endif #ifndef BOOST_NO_CXX11_STATIC_ASSERT # ifndef BOOST_NO_CXX11_VARIADIC_MACROS # define BOOST_STATIC_ASSERT_MSG( ... ) static_assert(__VA_ARGS__) # else # define BOOST_STATIC_ASSERT_MSG( B, Msg ) static_assert( B, Msg ) # endif #else # define BOOST_STATIC_ASSERT_MSG( B, Msg ) BOOST_STATIC_ASSERT( B ) #endif #ifdef __BORLANDC__ // // workaround for buggy integral-constant expression support: #define BOOST_BUGGY_INTEGRAL_CONSTANT_EXPRESSIONS #endif #if defined(__GNUC__) && (__GNUC__ == 3) && ((__GNUC_MINOR__ == 3) || (__GNUC_MINOR__ == 4)) // gcc 3.3 and 3.4 don't produce good error messages with the default version: # define BOOST_SA_GCC_WORKAROUND #endif // // If the compiler issues warnings about old C style casts, // then enable this: // #if defined(__GNUC__) && ((__GNUC__ > 3) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 4))) # ifndef BOOST_NO_CXX11_VARIADIC_MACROS # define BOOST_STATIC_ASSERT_BOOL_CAST( ... ) ((__VA_ARGS__) == 0 ? false : true) # else # define BOOST_STATIC_ASSERT_BOOL_CAST( x ) ((x) == 0 ? false : true) # endif #else # ifndef BOOST_NO_CXX11_VARIADIC_MACROS # define BOOST_STATIC_ASSERT_BOOL_CAST( ... ) (bool)(__VA_ARGS__) # else # define BOOST_STATIC_ASSERT_BOOL_CAST(x) (bool)(x) # endif #endif #ifndef BOOST_NO_CXX11_STATIC_ASSERT # ifndef BOOST_NO_CXX11_VARIADIC_MACROS # define BOOST_STATIC_ASSERT( ... ) static_assert(__VA_ARGS__, #__VA_ARGS__) # else # define BOOST_STATIC_ASSERT( B ) static_assert(B, #B) # endif #else namespace boost{ // HP aCC cannot deal with missing names for template value parameters template struct STATIC_ASSERTION_FAILURE; template <> struct STATIC_ASSERTION_FAILURE { enum { value = 1 }; }; // HP aCC cannot deal with missing names for template value parameters template struct static_assert_test{}; } // // Implicit instantiation requires that all member declarations be // instantiated, but that the definitions are *not* instantiated. // // It's not particularly clear how this applies to enum's or typedefs; // both are described as declarations [7.1.3] and [7.2] in the standard, // however some compilers use "delayed evaluation" of one or more of // these when implicitly instantiating templates. We use typedef declarations // by default, but try defining BOOST_USE_ENUM_STATIC_ASSERT if the enum // version gets better results from your compiler... // // Implementation: // Both of these versions rely on sizeof(incomplete_type) generating an error // message containing the name of the incomplete type. We use // "STATIC_ASSERTION_FAILURE" as the type name here to generate // an eye catching error message. The result of the sizeof expression is either // used as an enum initialiser, or as a template argument depending which version // is in use... // Note that the argument to the assert is explicitly cast to bool using old- // style casts: too many compilers currently have problems with static_cast // when used inside integral constant expressions. // #if !defined(BOOST_BUGGY_INTEGRAL_CONSTANT_EXPRESSIONS) #if defined(BOOST_MSVC) && defined(BOOST_NO_CXX11_VARIADIC_MACROS) #define BOOST_STATIC_ASSERT( B ) \ typedef ::boost::static_assert_test<\ sizeof(::boost::STATIC_ASSERTION_FAILURE< BOOST_STATIC_ASSERT_BOOL_CAST ( B ) >)>\ BOOST_JOIN(boost_static_assert_typedef_, __COUNTER__) #elif defined(BOOST_MSVC) #define BOOST_STATIC_ASSERT(...) \ typedef ::boost::static_assert_test<\ sizeof(::boost::STATIC_ASSERTION_FAILURE< BOOST_STATIC_ASSERT_BOOL_CAST (__VA_ARGS__) >)>\ BOOST_JOIN(boost_static_assert_typedef_, __COUNTER__) #elif (defined(BOOST_INTEL_CXX_VERSION) || defined(BOOST_SA_GCC_WORKAROUND)) && defined(BOOST_NO_CXX11_VARIADIC_MACROS) // agurt 15/sep/02: a special care is needed to force Intel C++ issue an error // instead of warning in case of failure # define BOOST_STATIC_ASSERT( B ) \ typedef char BOOST_JOIN(boost_static_assert_typedef_, __LINE__) \ [ ::boost::STATIC_ASSERTION_FAILURE< BOOST_STATIC_ASSERT_BOOL_CAST( B ) >::value ] #elif (defined(BOOST_INTEL_CXX_VERSION) || defined(BOOST_SA_GCC_WORKAROUND)) && !defined(BOOST_NO_CXX11_VARIADIC_MACROS) // agurt 15/sep/02: a special care is needed to force Intel C++ issue an error // instead of warning in case of failure # define BOOST_STATIC_ASSERT(...) \ typedef char BOOST_JOIN(boost_static_assert_typedef_, __LINE__) \ [ ::boost::STATIC_ASSERTION_FAILURE< BOOST_STATIC_ASSERT_BOOL_CAST( __VA_ARGS__ ) >::value ] #elif defined(__sgi) // special version for SGI MIPSpro compiler #define BOOST_STATIC_ASSERT( B ) \ BOOST_STATIC_CONSTANT(bool, \ BOOST_JOIN(boost_static_assert_test_, __LINE__) = ( B )); \ typedef ::boost::static_assert_test<\ sizeof(::boost::STATIC_ASSERTION_FAILURE< \ BOOST_JOIN(boost_static_assert_test_, __LINE__) >)>\ BOOST_JOIN(boost_static_assert_typedef_, __LINE__) #elif BOOST_WORKAROUND(__MWERKS__, <= 0x3003) // special version for CodeWarrior <= 8.x #define BOOST_STATIC_ASSERT( B ) \ BOOST_STATIC_CONSTANT(int, \ BOOST_JOIN(boost_static_assert_test_, __LINE__) = \ sizeof(::boost::STATIC_ASSERTION_FAILURE< BOOST_STATIC_ASSERT_BOOL_CAST( B ) >) ) #else // generic version # ifndef BOOST_NO_CXX11_VARIADIC_MACROS # define BOOST_STATIC_ASSERT( ... ) \ typedef ::boost::static_assert_test<\ sizeof(::boost::STATIC_ASSERTION_FAILURE< BOOST_STATIC_ASSERT_BOOL_CAST( __VA_ARGS__ ) >)>\ BOOST_JOIN(boost_static_assert_typedef_, __LINE__) BOOST_ATTRIBUTE_UNUSED # else # define BOOST_STATIC_ASSERT( B ) \ typedef ::boost::static_assert_test<\ sizeof(::boost::STATIC_ASSERTION_FAILURE< BOOST_STATIC_ASSERT_BOOL_CAST( B ) >)>\ BOOST_JOIN(boost_static_assert_typedef_, __LINE__) BOOST_ATTRIBUTE_UNUSED # endif #endif #else // alternative enum based implementation: # ifndef BOOST_NO_CXX11_VARIADIC_MACROS # define BOOST_STATIC_ASSERT( ... ) \ enum { BOOST_JOIN(boost_static_assert_enum_, __LINE__) \ = sizeof(::boost::STATIC_ASSERTION_FAILURE< (bool)( __VA_ARGS__ ) >) } # else # define BOOST_STATIC_ASSERT(B) \ enum { BOOST_JOIN(boost_static_assert_enum_, __LINE__) \ = sizeof(::boost::STATIC_ASSERTION_FAILURE< (bool)( B ) >) } # endif #endif #endif // defined(BOOST_NO_CXX11_STATIC_ASSERT) #endif // BOOST_STATIC_ASSERT_HPP ================================================ FILE: benchmarks/boost/swap.hpp ================================================ /* * Copyright (c) 2014 Glen Fernandes * * Distributed under the Boost Software License, Version 1.0. (See * accompanying file LICENSE_1_0.txt or copy at * http://www.boost.org/LICENSE_1_0.txt) */ #ifndef BOOST_SWAP_HPP #define BOOST_SWAP_HPP // The header file at this path is deprecated; // use boost/core/swap.hpp instead. #include #endif ================================================ FILE: benchmarks/boost/throw_exception.hpp ================================================ #ifndef UUID_AA15E74A856F11E08B8D93F24824019B #define UUID_AA15E74A856F11E08B8D93F24824019B #if (__GNUC__*100+__GNUC_MINOR__>301) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS) #pragma GCC system_header #endif #if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS) #pragma warning(push,1) #endif // MS compatible compilers support #pragma once #if defined(_MSC_VER) && (_MSC_VER >= 1020) # pragma once #endif // // boost/throw_exception.hpp // // Copyright (c) 2002 Peter Dimov and Multi Media Ltd. // Copyright (c) 2008-2009 Emil Dotchevski and Reverge Studios, Inc. // // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // http://www.boost.org/libs/utility/throw_exception.html // #include #include #include #if !defined( BOOST_EXCEPTION_DISABLE ) && defined( __BORLANDC__ ) && BOOST_WORKAROUND( __BORLANDC__, BOOST_TESTED_AT(0x593) ) # define BOOST_EXCEPTION_DISABLE #endif #if !defined( BOOST_EXCEPTION_DISABLE ) && defined( BOOST_MSVC ) && BOOST_WORKAROUND( BOOST_MSVC, < 1310 ) # define BOOST_EXCEPTION_DISABLE #endif #if !defined( BOOST_EXCEPTION_DISABLE ) # include #if !defined(BOOST_THROW_EXCEPTION_CURRENT_FUNCTION) # include # define BOOST_THROW_EXCEPTION_CURRENT_FUNCTION BOOST_CURRENT_FUNCTION #endif # define BOOST_THROW_EXCEPTION(x) ::boost::exception_detail::throw_exception_(x,BOOST_THROW_EXCEPTION_CURRENT_FUNCTION,__FILE__,__LINE__) #else # define BOOST_THROW_EXCEPTION(x) ::boost::throw_exception(x) #endif namespace boost { #ifdef BOOST_NO_EXCEPTIONS void throw_exception( std::exception const & e ); // user defined #else inline void throw_exception_assert_compatibility( std::exception const & ) { } template BOOST_NORETURN inline void throw_exception( E const & e ) { //All boost exceptions are required to derive from std::exception, //to ensure compatibility with BOOST_NO_EXCEPTIONS. throw_exception_assert_compatibility(e); #ifndef BOOST_EXCEPTION_DISABLE throw enable_current_exception(enable_error_info(e)); #else throw e; #endif } #endif #if !defined( BOOST_EXCEPTION_DISABLE ) namespace exception_detail { template BOOST_NORETURN void throw_exception_( E const & x, char const * current_function, char const * file, int line ) { boost::throw_exception( set_info( set_info( set_info( enable_error_info(x), throw_function(current_function)), throw_file(file)), throw_line(line))); } } #endif } // namespace boost #if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS) #pragma warning(pop) #endif #endif ================================================ FILE: benchmarks/boost/type_traits/add_const.hpp ================================================ // (C) Copyright Dave Abrahams, Steve Cleary, Beman Dawes, Howard // Hinnant & John Maddock 2000. // Use, modification and distribution are subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt). // // See http://www.boost.org/libs/type_traits for most recent version including documentation. #ifndef BOOST_TT_ADD_CONST_HPP_INCLUDED #define BOOST_TT_ADD_CONST_HPP_INCLUDED #include namespace boost { // * convert a type T to const type - add_const // this is not required since the result is always // the same as "T const", but it does suppress warnings // from some compilers: #if defined(BOOST_MSVC) // This bogus warning will appear when add_const is applied to a // const volatile reference because we can't detect const volatile // references with MSVC6. # pragma warning(push) # pragma warning(disable:4181) // warning C4181: qualifier applied to reference type ignored #endif template struct add_const { typedef T const type; }; #if defined(BOOST_MSVC) # pragma warning(pop) #endif template struct add_const { typedef T& type; }; } // namespace boost #endif // BOOST_TT_ADD_CONST_HPP_INCLUDED ================================================ FILE: benchmarks/boost/type_traits/add_lvalue_reference.hpp ================================================ // Copyright 2010 John Maddock // Distributed under the Boost Software License, Version 1.0. // See http://www.boost.org/LICENSE_1_0.txt #ifndef BOOST_TYPE_TRAITS_EXT_ADD_LVALUE_REFERENCE__HPP #define BOOST_TYPE_TRAITS_EXT_ADD_LVALUE_REFERENCE__HPP #include namespace boost{ template struct add_lvalue_reference { typedef typename boost::add_reference::type type; }; #ifndef BOOST_NO_CXX11_RVALUE_REFERENCES template struct add_lvalue_reference { typedef T& type; }; #endif } #endif // BOOST_TYPE_TRAITS_EXT_ADD_LVALUE_REFERENCE__HPP ================================================ FILE: benchmarks/boost/type_traits/add_reference.hpp ================================================ // (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000. // Use, modification and distribution are subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt). // // See http://www.boost.org/libs/type_traits for most recent version including documentation. #ifndef BOOST_TT_ADD_REFERENCE_HPP_INCLUDED #define BOOST_TT_ADD_REFERENCE_HPP_INCLUDED #include #include namespace boost { namespace detail { // // We can't filter out rvalue_references at the same level as // references or we get ambiguities from msvc: // template struct add_reference_impl { typedef T& type; }; #ifndef BOOST_NO_CXX11_RVALUE_REFERENCES template struct add_reference_impl { typedef T&& type; }; #endif } // namespace detail template struct add_reference { typedef typename boost::detail::add_reference_impl::type type; }; template struct add_reference { typedef T& type; }; // these full specialisations are always required: template <> struct add_reference { typedef void type; }; #ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS template <> struct add_reference { typedef void type; }; template <> struct add_reference { typedef void type; }; template <> struct add_reference { typedef void type; }; #endif } // namespace boost #endif // BOOST_TT_ADD_REFERENCE_HPP_INCLUDED ================================================ FILE: benchmarks/boost/type_traits/add_rvalue_reference.hpp ================================================ // add_rvalue_reference.hpp ---------------------------------------------------------// // Copyright 2010 Vicente J. Botet Escriba // Distributed under the Boost Software License, Version 1.0. // See http://www.boost.org/LICENSE_1_0.txt #ifndef BOOST_TYPE_TRAITS_EXT_ADD_RVALUE_REFERENCE__HPP #define BOOST_TYPE_TRAITS_EXT_ADD_RVALUE_REFERENCE__HPP #include //----------------------------------------------------------------------------// #include #include //----------------------------------------------------------------------------// // // // C++03 implementation of // // 20.9.7.2 Reference modifications [meta.trans.ref] // // Written by Vicente J. Botet Escriba // // // // If T names an object or function type then the member typedef type // shall name T&&; otherwise, type shall name T. [ Note: This rule reflects // the semantics of reference collapsing. For example, when a type T names // a type T1&, the type add_rvalue_reference::type is not an rvalue // reference. -end note ] //----------------------------------------------------------------------------// namespace boost { namespace type_traits_detail { template struct add_rvalue_reference_helper { typedef T type; }; #if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) template struct add_rvalue_reference_helper { typedef T&& type; }; #endif template struct add_rvalue_reference_imp { typedef typename boost::type_traits_detail::add_rvalue_reference_helper ::value == false && is_reference::value == false) >::type type; }; } template struct add_rvalue_reference { typedef typename boost::type_traits_detail::add_rvalue_reference_imp::type type; }; } // namespace boost #endif // BOOST_TYPE_TRAITS_EXT_ADD_RVALUE_REFERENCE__HPP ================================================ FILE: benchmarks/boost/type_traits/add_volatile.hpp ================================================ // (C) Copyright Dave Abrahams, Steve Cleary, Beman Dawes, Howard // Hinnant & John Maddock 2000. // Use, modification and distribution are subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt). // // See http://www.boost.org/libs/type_traits for most recent version including documentation. #ifndef BOOST_TT_ADD_VOLATILE_HPP_INCLUDED #define BOOST_TT_ADD_VOLATILE_HPP_INCLUDED #include namespace boost { // * convert a type T to volatile type - add_volatile // this is not required since the result is always // the same as "T volatile", but it does suppress warnings // from some compilers: #if defined(BOOST_MSVC) // This bogus warning will appear when add_volatile is applied to a // const volatile reference because we can't detect const volatile // references with MSVC6. # pragma warning(push) # pragma warning(disable:4181) // warning C4181: qualifier applied to reference type ignored #endif template struct add_volatile{ typedef T volatile type; }; #if defined(BOOST_MSVC) # pragma warning(pop) #endif template struct add_volatile{ typedef T& type; }; } // namespace boost #endif // BOOST_TT_ADD_VOLATILE_HPP_INCLUDED ================================================ FILE: benchmarks/boost/type_traits/conditional.hpp ================================================ // (C) Copyright John Maddock 2010. // Use, modification and distribution are subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt). // // See http://www.boost.org/libs/type_traits for most recent version including documentation. #ifndef BOOST_TT_CONDITIONAL_HPP_INCLUDED #define BOOST_TT_CONDITIONAL_HPP_INCLUDED namespace boost { template struct conditional { typedef T type; }; template struct conditional { typedef U type; }; } // namespace boost #endif // BOOST_TT_CONDITIONAL_HPP_INCLUDED ================================================ FILE: benchmarks/boost/type_traits/declval.hpp ================================================ // declval.hpp -------------------------------------------------------------// // Copyright 2010 Vicente J. Botet Escriba // Distributed under the Boost Software License, Version 1.0. // See http://www.boost.org/LICENSE_1_0.txt #ifndef BOOST_TYPE_TRAITS_DECLVAL_HPP_INCLUDED #define BOOST_TYPE_TRAITS_DECLVAL_HPP_INCLUDED #include //----------------------------------------------------------------------------// #include //----------------------------------------------------------------------------// // // // C++03 implementation of // // 20.2.4 Function template declval [declval] // // Written by Vicente J. Botet Escriba // // // // 1 The library provides the function template declval to simplify the // definition of expressions which occur as unevaluated operands. // 2 Remarks: If this function is used, the program is ill-formed. // 3 Remarks: The template parameter T of declval may be an incomplete type. // [ Example: // // template // decltype(static_cast(declval())) convert(From&&); // // declares a function template convert which only participates in overloading // if the type From can be explicitly converted to type To. For another example // see class template common_type (20.9.7.6). -end example ] //----------------------------------------------------------------------------// namespace boost { template typename add_rvalue_reference::type declval() BOOST_NOEXCEPT; // as unevaluated operand } // namespace boost #endif // BOOST_TYPE_TRAITS_DECLVAL_HPP_INCLUDED ================================================ FILE: benchmarks/boost/type_traits/detail/config.hpp ================================================ // (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000. // Use, modification and distribution are subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt). // // See http://www.boost.org/libs/type_traits for most recent version including documentation. #ifndef BOOST_TT_CONFIG_HPP_INCLUDED #define BOOST_TT_CONFIG_HPP_INCLUDED #ifndef BOOST_CONFIG_HPP #include #endif #include #include // // whenever we have a conversion function with ellipses // it needs to be declared __cdecl to suppress compiler // warnings from MS and Borland compilers (this *must* // appear before we include is_same.hpp below): #if defined(BOOST_MSVC) || (defined(__BORLANDC__) && !defined(BOOST_DISABLE_WIN32)) # define BOOST_TT_DECL __cdecl #else # define BOOST_TT_DECL /**/ #endif # if (BOOST_WORKAROUND(__MWERKS__, < 0x3000) \ || BOOST_WORKAROUND(__IBMCPP__, < 600 ) \ || BOOST_WORKAROUND(__BORLANDC__, < 0x5A0) \ || defined(__ghs) \ || BOOST_WORKAROUND(__HP_aCC, < 60700) \ || BOOST_WORKAROUND(MPW_CPLUS, BOOST_TESTED_AT(0x890)) \ || BOOST_WORKAROUND(__SUNPRO_CC, BOOST_TESTED_AT(0x580))) \ && defined(BOOST_NO_IS_ABSTRACT) # define BOOST_TT_NO_CONFORMING_IS_CLASS_IMPLEMENTATION 1 #endif #ifndef BOOST_TT_NO_CONFORMING_IS_CLASS_IMPLEMENTATION # define BOOST_TT_HAS_CONFORMING_IS_CLASS_IMPLEMENTATION 1 #endif // // define BOOST_TT_TEST_MS_FUNC_SIGS // when we want to test __stdcall etc function types with is_function etc // (Note, does not work with Borland, even though it does support __stdcall etc): // #if defined(_MSC_EXTENSIONS) && !defined(__BORLANDC__) # define BOOST_TT_TEST_MS_FUNC_SIGS #endif // // define BOOST_TT_NO_CV_FUNC_TEST // if tests for cv-qualified member functions don't // work in is_member_function_pointer // #if BOOST_WORKAROUND(__MWERKS__, < 0x3000) || BOOST_WORKAROUND(__IBMCPP__, <= 600) # define BOOST_TT_NO_CV_FUNC_TEST #endif // // Macros that have been deprecated, defined here for backwards compatibility: // #define BOOST_BROKEN_COMPILER_TYPE_TRAITS_SPECIALIZATION(x) #define BOOST_TT_BROKEN_COMPILER_SPEC(x) #endif // BOOST_TT_CONFIG_HPP_INCLUDED ================================================ FILE: benchmarks/boost/type_traits/detail/is_function_ptr_helper.hpp ================================================ // Copyright 2000 John Maddock (john@johnmaddock.co.uk) // Copyright 2002 Aleksey Gurtovoy (agurtovoy@meta-comm.com) // // Use, modification and distribution are subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt). // // See http://www.boost.org/libs/type_traits for most recent version including documentation. #if !defined(BOOST_PP_IS_ITERATING) ///// header body #ifndef BOOST_TT_DETAIL_IS_FUNCTION_PTR_HELPER_HPP_INCLUDED #define BOOST_TT_DETAIL_IS_FUNCTION_PTR_HELPER_HPP_INCLUDED #if defined(BOOST_TT_PREPROCESSING_MODE) // // Hide these #include from dependency analysers as // these are required in maintenance mode only: // #define PP1 #include PP1 #undef PP1 #define PP1 #include PP1 #undef PP1 #define PP1 #include PP1 #undef PP1 #endif namespace boost { namespace type_traits { template struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = false); }; #if !defined(BOOST_TT_PREPROCESSING_MODE) // preprocessor-generated part, don't edit by hand! template struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; #else #undef BOOST_STATIC_CONSTANT #define BOOST_PP_ITERATION_PARAMS_1 \ (3, (0, 25, "boost/type_traits/detail/is_function_ptr_helper.hpp")) #include BOOST_PP_ITERATE() #endif // BOOST_TT_PREPROCESSING_MODE } // namespace type_traits } // namespace boost #endif // BOOST_TT_DETAIL_IS_FUNCTION_PTR_HELPER_HPP_INCLUDED ///// iteration #else #define BOOST_PP_COUNTER BOOST_PP_FRAME_ITERATION(1) template struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; @#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template struct is_function_ptr_helper { BOOST_STATIC_CONSTANT(bool, value = true); }; @#endif #undef BOOST_PP_COUNTER #endif // BOOST_PP_IS_ITERATING ================================================ FILE: benchmarks/boost/type_traits/detail/is_function_ptr_tester.hpp ================================================ // (C) Copyright Dave Abrahams, Steve Cleary, Beman Dawes, // Aleksey Gurtovoy, Howard Hinnant & John Maddock 2000. // Use, modification and distribution are subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt). // // See http://www.boost.org/libs/type_traits for most recent version including documentation. #if !defined(BOOST_PP_IS_ITERATING) ///// header body #ifndef BOOST_TT_DETAIL_IS_FUNCTION_PTR_TESTER_HPP_INCLUDED #define BOOST_TT_DETAIL_IS_FUNCTION_PTR_TESTER_HPP_INCLUDED #include #if defined(BOOST_TT_PREPROCESSING_MODE) // // Hide include dependencies from analysers since they're // only require in maintenance mode: // #define PP1 #define PP2 #define PP3 #include PP1 #include PP2 #include PP3 #undef PP1 #undef PP2 #undef PP3 #endif namespace boost { namespace type_traits { // Note it is acceptable to use ellipsis here, since the argument will // always be a pointer type of some sort (JM 2005/06/04): no_type BOOST_TT_DECL is_function_ptr_tester(...); #if !defined(BOOST_TT_PREPROCESSING_MODE) // pre-processed code, don't edit, try GNU cpp with // cpp -I../../../ -DBOOST_TT_PREPROCESSING_MODE -x c++ -P filename template yes_type is_function_ptr_tester(R (*)()); template yes_type is_function_ptr_tester(R (*)( ...)); #ifdef BOOST_TT_TEST_MS_FUNC_SIGS template yes_type is_function_ptr_tester(R (__stdcall*)()); #ifndef _MANAGED template yes_type is_function_ptr_tester(R (__fastcall*)()); #endif template yes_type is_function_ptr_tester(R (__cdecl*)()); #endif template yes_type is_function_ptr_tester(R (*)( T0)); template yes_type is_function_ptr_tester(R (*)( T0 ...)); #ifdef BOOST_TT_TEST_MS_FUNC_SIGS template yes_type is_function_ptr_tester(R (__stdcall*)( T0)); #ifndef _MANAGED template yes_type is_function_ptr_tester(R (__fastcall*)( T0)); #endif template yes_type is_function_ptr_tester(R (__cdecl*)( T0)); #endif template yes_type is_function_ptr_tester(R (*)( T0 , T1)); template yes_type is_function_ptr_tester(R (*)( T0 , T1 ...)); #ifdef BOOST_TT_TEST_MS_FUNC_SIGS template yes_type is_function_ptr_tester(R (__stdcall*)( T0 , T1)); #ifndef _MANAGED template yes_type is_function_ptr_tester(R (__fastcall*)( T0 , T1)); #endif template yes_type is_function_ptr_tester(R (__cdecl*)( T0 , T1)); #endif template yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2)); template yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 ...)); #ifdef BOOST_TT_TEST_MS_FUNC_SIGS template yes_type is_function_ptr_tester(R (__stdcall*)( T0 , T1 , T2)); #ifndef _MANAGED template yes_type is_function_ptr_tester(R (__fastcall*)( T0 , T1 , T2)); #endif template yes_type is_function_ptr_tester(R (__cdecl*)( T0 , T1 , T2)); #endif template yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3)); template yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 ...)); #ifdef BOOST_TT_TEST_MS_FUNC_SIGS template yes_type is_function_ptr_tester(R (__stdcall*)( T0 , T1 , T2 , T3)); #ifndef _MANAGED template yes_type is_function_ptr_tester(R (__fastcall*)( T0 , T1 , T2 , T3)); #endif template yes_type is_function_ptr_tester(R (__cdecl*)( T0 , T1 , T2 , T3)); #endif template yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4)); template yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 ...)); #ifdef BOOST_TT_TEST_MS_FUNC_SIGS template yes_type is_function_ptr_tester(R (__stdcall*)( T0 , T1 , T2 , T3 , T4)); #ifndef _MANAGED template yes_type is_function_ptr_tester(R (__fastcall*)( T0 , T1 , T2 , T3 , T4)); #endif template yes_type is_function_ptr_tester(R (__cdecl*)( T0 , T1 , T2 , T3 , T4)); #endif template yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5)); template yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 ...)); #ifdef BOOST_TT_TEST_MS_FUNC_SIGS template yes_type is_function_ptr_tester(R (__stdcall*)( T0 , T1 , T2 , T3 , T4 , T5)); #ifndef _MANAGED template yes_type is_function_ptr_tester(R (__fastcall*)( T0 , T1 , T2 , T3 , T4 , T5)); #endif template yes_type is_function_ptr_tester(R (__cdecl*)( T0 , T1 , T2 , T3 , T4 , T5)); #endif template yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6)); template yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 ...)); #ifdef BOOST_TT_TEST_MS_FUNC_SIGS template yes_type is_function_ptr_tester(R (__stdcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6)); #ifndef _MANAGED template yes_type is_function_ptr_tester(R (__fastcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6)); #endif template yes_type is_function_ptr_tester(R (__cdecl*)( T0 , T1 , T2 , T3 , T4 , T5 , T6)); #endif template yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7)); template yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 ...)); #ifdef BOOST_TT_TEST_MS_FUNC_SIGS template yes_type is_function_ptr_tester(R (__stdcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7)); #ifndef _MANAGED template yes_type is_function_ptr_tester(R (__fastcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7)); #endif template yes_type is_function_ptr_tester(R (__cdecl*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7)); #endif template yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8)); template yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 ...)); #ifdef BOOST_TT_TEST_MS_FUNC_SIGS template yes_type is_function_ptr_tester(R (__stdcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8)); #ifndef _MANAGED template yes_type is_function_ptr_tester(R (__fastcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8)); #endif template yes_type is_function_ptr_tester(R (__cdecl*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8)); #endif template yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9)); template yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 ...)); #ifdef BOOST_TT_TEST_MS_FUNC_SIGS template yes_type is_function_ptr_tester(R (__stdcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9)); #ifndef _MANAGED template yes_type is_function_ptr_tester(R (__fastcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9)); #endif template yes_type is_function_ptr_tester(R (__cdecl*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9)); #endif template yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10)); template yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 ...)); #ifdef BOOST_TT_TEST_MS_FUNC_SIGS template yes_type is_function_ptr_tester(R (__stdcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10)); #ifndef _MANAGED template yes_type is_function_ptr_tester(R (__fastcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10)); #endif template yes_type is_function_ptr_tester(R (__cdecl*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10)); #endif template yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11)); template yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 ...)); #ifdef BOOST_TT_TEST_MS_FUNC_SIGS template yes_type is_function_ptr_tester(R (__stdcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11)); #ifndef _MANAGED template yes_type is_function_ptr_tester(R (__fastcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11)); #endif template yes_type is_function_ptr_tester(R (__cdecl*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11)); #endif template yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12)); template yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 ...)); #ifdef BOOST_TT_TEST_MS_FUNC_SIGS template yes_type is_function_ptr_tester(R (__stdcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12)); #ifndef _MANAGED template yes_type is_function_ptr_tester(R (__fastcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12)); #endif template yes_type is_function_ptr_tester(R (__cdecl*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12)); #endif template yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13)); template yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 ...)); #ifdef BOOST_TT_TEST_MS_FUNC_SIGS template yes_type is_function_ptr_tester(R (__stdcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13)); #ifndef _MANAGED template yes_type is_function_ptr_tester(R (__fastcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13)); #endif template yes_type is_function_ptr_tester(R (__cdecl*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13)); #endif template yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14)); template yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 ...)); #ifdef BOOST_TT_TEST_MS_FUNC_SIGS template yes_type is_function_ptr_tester(R (__stdcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14)); #ifndef _MANAGED template yes_type is_function_ptr_tester(R (__fastcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14)); #endif template yes_type is_function_ptr_tester(R (__cdecl*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14)); #endif template yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15)); template yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 ...)); #ifdef BOOST_TT_TEST_MS_FUNC_SIGS template yes_type is_function_ptr_tester(R (__stdcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15)); #ifndef _MANAGED template yes_type is_function_ptr_tester(R (__fastcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15)); #endif template yes_type is_function_ptr_tester(R (__cdecl*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15)); #endif template yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16)); template yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 ...)); #ifdef BOOST_TT_TEST_MS_FUNC_SIGS template yes_type is_function_ptr_tester(R (__stdcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16)); #ifndef _MANAGED template yes_type is_function_ptr_tester(R (__fastcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16)); #endif template yes_type is_function_ptr_tester(R (__cdecl*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16)); #endif template yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17)); template yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 ...)); #ifdef BOOST_TT_TEST_MS_FUNC_SIGS template yes_type is_function_ptr_tester(R (__stdcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17)); #ifndef _MANAGED template yes_type is_function_ptr_tester(R (__fastcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17)); #endif template yes_type is_function_ptr_tester(R (__cdecl*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17)); #endif template yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18)); template yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 ...)); #ifdef BOOST_TT_TEST_MS_FUNC_SIGS template yes_type is_function_ptr_tester(R (__stdcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18)); #ifndef _MANAGED template yes_type is_function_ptr_tester(R (__fastcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18)); #endif template yes_type is_function_ptr_tester(R (__cdecl*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18)); #endif template yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19)); template yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 ...)); #ifdef BOOST_TT_TEST_MS_FUNC_SIGS template yes_type is_function_ptr_tester(R (__stdcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19)); #ifndef _MANAGED template yes_type is_function_ptr_tester(R (__fastcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19)); #endif template yes_type is_function_ptr_tester(R (__cdecl*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19)); #endif template yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20)); template yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 ...)); #ifdef BOOST_TT_TEST_MS_FUNC_SIGS template yes_type is_function_ptr_tester(R (__stdcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20)); #ifndef _MANAGED template yes_type is_function_ptr_tester(R (__fastcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20)); #endif template yes_type is_function_ptr_tester(R (__cdecl*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20)); #endif template yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21)); template yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 ...)); #ifdef BOOST_TT_TEST_MS_FUNC_SIGS template yes_type is_function_ptr_tester(R (__stdcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21)); #ifndef _MANAGED template yes_type is_function_ptr_tester(R (__fastcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21)); #endif template yes_type is_function_ptr_tester(R (__cdecl*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21)); #endif template yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22)); template yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 ...)); #ifdef BOOST_TT_TEST_MS_FUNC_SIGS template yes_type is_function_ptr_tester(R (__stdcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22)); #ifndef _MANAGED template yes_type is_function_ptr_tester(R (__fastcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22)); #endif template yes_type is_function_ptr_tester(R (__cdecl*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22)); #endif template yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23)); template yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 ...)); #ifdef BOOST_TT_TEST_MS_FUNC_SIGS template yes_type is_function_ptr_tester(R (__stdcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23)); #ifndef _MANAGED template yes_type is_function_ptr_tester(R (__fastcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23)); #endif template yes_type is_function_ptr_tester(R (__cdecl*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23)); #endif template yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24)); template yes_type is_function_ptr_tester(R (*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 ...)); #ifdef BOOST_TT_TEST_MS_FUNC_SIGS template yes_type is_function_ptr_tester(R (__stdcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24)); #ifndef _MANAGED template yes_type is_function_ptr_tester(R (__fastcall*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24)); #endif template yes_type is_function_ptr_tester(R (__cdecl*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24)); #endif #else #define BOOST_PP_ITERATION_PARAMS_1 \ (3, (0, 25, "boost/type_traits/detail/is_function_ptr_tester.hpp")) #include BOOST_PP_ITERATE() #endif // BOOST_TT_PREPROCESSING_MODE } // namespace type_traits } // namespace boost #endif // BOOST_TT_DETAIL_IS_FUNCTION_PTR_TESTER_HPP_INCLUDED ///// iteration #else #define BOOST_PP_COUNTER BOOST_PP_FRAME_ITERATION(1) #undef __stdcall #undef __fastcall #undef __cdecl template yes_type is_function_ptr_tester(R (*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T))); @#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template yes_type is_function_ptr_tester(R (*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T) ...)); @#endif @#ifdef BOOST_TT_TEST_MS_FUNC_SIGS template yes_type is_function_ptr_tester(R (__stdcall*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T))); @#ifndef _MANAGED template yes_type is_function_ptr_tester(R (__fastcall*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T))); @#endif template yes_type is_function_ptr_tester(R (__cdecl*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T))); @#endif #undef BOOST_PP_COUNTER #endif // BOOST_PP_IS_ITERATING ================================================ FILE: benchmarks/boost/type_traits/detail/is_mem_fun_pointer_impl.hpp ================================================ // (C) Copyright Dave Abrahams, Steve Cleary, Beman Dawes, // Aleksey Gurtovoy, Howard Hinnant & John Maddock 2000. // Use, modification and distribution are subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt). // // See http://www.boost.org/libs/type_traits for most recent version including documentation. #if !defined(BOOST_PP_IS_ITERATING) ///// header body #ifndef BOOST_TT_DETAIL_IS_MEM_FUN_POINTER_IMPL_HPP_INCLUDED #define BOOST_TT_DETAIL_IS_MEM_FUN_POINTER_IMPL_HPP_INCLUDED #include #if defined(BOOST_TT_PREPROCESSING_MODE) // // Maintenance mode, hide include dependencies // from trackers: // #define PPI #include PPI #undef PPI #define PPI #include PPI #undef PPI #define PPI #include PPI #undef PPI #endif namespace boost { namespace type_traits { template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = false); }; #if !defined(BOOST_TT_PREPROCESSING_MODE) // pre-processed code, don't edit, try GNU cpp with // cpp -I../../../ -DBOOST_TT_PREPROCESSING_MODE -x c++ -P filename template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #if !defined(BOOST_TT_NO_CV_FUNC_TEST) template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #endif template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #if !defined(BOOST_TT_NO_CV_FUNC_TEST) template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #endif template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #if !defined(BOOST_TT_NO_CV_FUNC_TEST) template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #endif template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #if !defined(BOOST_TT_NO_CV_FUNC_TEST) template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #endif template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #if !defined(BOOST_TT_NO_CV_FUNC_TEST) template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #endif template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #if !defined(BOOST_TT_NO_CV_FUNC_TEST) template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #endif template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #if !defined(BOOST_TT_NO_CV_FUNC_TEST) template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #endif template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #if !defined(BOOST_TT_NO_CV_FUNC_TEST) template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #endif template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #if !defined(BOOST_TT_NO_CV_FUNC_TEST) template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #endif template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #if !defined(BOOST_TT_NO_CV_FUNC_TEST) template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #endif template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #if !defined(BOOST_TT_NO_CV_FUNC_TEST) template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #endif template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #if !defined(BOOST_TT_NO_CV_FUNC_TEST) template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #endif template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #if !defined(BOOST_TT_NO_CV_FUNC_TEST) template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #endif template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #if !defined(BOOST_TT_NO_CV_FUNC_TEST) template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #endif template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #if !defined(BOOST_TT_NO_CV_FUNC_TEST) template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #endif template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #if !defined(BOOST_TT_NO_CV_FUNC_TEST) template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #endif template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #if !defined(BOOST_TT_NO_CV_FUNC_TEST) template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #endif template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #if !defined(BOOST_TT_NO_CV_FUNC_TEST) template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #endif template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #if !defined(BOOST_TT_NO_CV_FUNC_TEST) template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #endif template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #if !defined(BOOST_TT_NO_CV_FUNC_TEST) template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #endif template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #if !defined(BOOST_TT_NO_CV_FUNC_TEST) template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #endif template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #if !defined(BOOST_TT_NO_CV_FUNC_TEST) template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #endif template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #if !defined(BOOST_TT_NO_CV_FUNC_TEST) template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #endif template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #if !defined(BOOST_TT_NO_CV_FUNC_TEST) template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #endif template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #if !defined(BOOST_TT_NO_CV_FUNC_TEST) template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #endif template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #if !defined(BOOST_TT_NO_CV_FUNC_TEST) template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; #endif #else #undef BOOST_STATIC_CONSTANT #define BOOST_PP_ITERATION_PARAMS_1 \ (3, (0, 25, "boost/type_traits/detail/is_mem_fun_pointer_impl.hpp")) #include BOOST_PP_ITERATE() #endif // BOOST_TT_PREPROCESSING_MODE } // namespace type_traits } // namespace boost #endif // BOOST_TT_DETAIL_IS_MEM_FUN_POINTER_IMPL_HPP_INCLUDED ///// iteration #else #define BOOST_PP_COUNTER BOOST_PP_FRAME_ITERATION(1) template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; @#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; @#endif @#if !defined(BOOST_TT_NO_CV_FUNC_TEST) template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; @#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_mem_fun_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = true); }; @#endif @#endif #undef BOOST_PP_COUNTER #endif // BOOST_PP_IS_ITERATING ================================================ FILE: benchmarks/boost/type_traits/detail/is_mem_fun_pointer_tester.hpp ================================================ // (C) Copyright Dave Abrahams, Steve Cleary, Beman Dawes, // Aleksey Gurtovoy, Howard Hinnant & John Maddock 2000. // Use, modification and distribution are subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt). // // See http://www.boost.org/libs/type_traits for most recent version including documentation. #if !defined(BOOST_PP_IS_ITERATING) ///// header body #ifndef BOOST_TT_DETAIL_IS_MEM_FUN_POINTER_TESTER_HPP_INCLUDED #define BOOST_TT_DETAIL_IS_MEM_FUN_POINTER_TESTER_HPP_INCLUDED #include #include #if defined(BOOST_TT_PREPROCESSING_MODE) // // Maintentance mode, hide include dependencies // from dependency trackers: // #define PPI #include PPI #undef PPI #define PPI #include PPI #undef PPI #define #include PPI #undef #endif namespace boost { namespace type_traits { no_type BOOST_TT_DECL is_mem_fun_pointer_tester(...); #if !defined(BOOST_TT_PREPROCESSING_MODE) // pre-processed code, don't edit, try GNU cpp with // cpp -I../../../ -DBOOST_TT_PREPROCESSING_MODE -x c++ -P filename template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)()); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)() const); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)() volatile); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)() const volatile); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( ...)); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( ...) const); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( ...) volatile); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( ...) const volatile); #ifdef BOOST_TT_TEST_MS_FUNC_SIGS template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)()); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)() const); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)() volatile); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)() const volatile); #ifndef _MANAGED template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)()); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)() const); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)() volatile); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)() const volatile); #endif template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)()); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)() const); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)() volatile); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)() const volatile); #endif template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0)); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0) const); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0) volatile); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0) const volatile); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 ...)); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 ...) const); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 ...) volatile); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 ...) const volatile); #ifdef BOOST_TT_TEST_MS_FUNC_SIGS template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0)); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0) const); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0) volatile); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0) const volatile); #ifndef _MANAGED template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0)); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0) const); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0) volatile); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0) const volatile); #endif template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0)); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0) const); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0) volatile); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0) const volatile); #endif template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1)); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1) const); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1) volatile); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1) const volatile); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 ...)); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 ...) const); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 ...) volatile); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 ...) const volatile); #ifdef BOOST_TT_TEST_MS_FUNC_SIGS template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1)); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1) const); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1) volatile); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1) const volatile); #ifndef _MANAGED template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1)); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1) const); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1) volatile); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1) const volatile); #endif template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1)); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1) const); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1) volatile); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1) const volatile); #endif template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2)); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2) const); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2) volatile); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2) const volatile); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 ...)); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 ...) const); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 ...) volatile); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 ...) const volatile); #ifdef BOOST_TT_TEST_MS_FUNC_SIGS template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2)); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2) const); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2) volatile); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2) const volatile); #ifndef _MANAGED template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2)); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2) const); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2) volatile); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2) const volatile); #endif template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2)); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2) const); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2) volatile); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2) const volatile); #endif template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3)); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3) const); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3) volatile); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3) const volatile); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 ...)); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 ...) const); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 ...) volatile); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 ...) const volatile); #ifdef BOOST_TT_TEST_MS_FUNC_SIGS template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3)); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3) const); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3) volatile); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3) const volatile); #ifndef _MANAGED template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3)); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3) const); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3) volatile); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3) const volatile); #endif template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3)); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3) const); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3) volatile); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3) const volatile); #endif template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4)); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4) const); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4) volatile); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4) const volatile); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 ...)); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 ...) const); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 ...) volatile); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 ...) const volatile); #ifdef BOOST_TT_TEST_MS_FUNC_SIGS template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4)); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4) const); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4) volatile); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4) const volatile); #ifndef _MANAGED template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4)); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4) const); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4) volatile); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4) const volatile); #endif template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4)); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4) const); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4) volatile); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4) const volatile); #endif template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5)); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5) const); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5) volatile); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5) const volatile); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 ...)); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 ...) const); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 ...) volatile); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 ...) const volatile); #ifdef BOOST_TT_TEST_MS_FUNC_SIGS template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5)); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5) const); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5) volatile); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5) const volatile); #ifndef _MANAGED template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5)); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5) const); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5) volatile); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5) const volatile); #endif template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5)); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5) const); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5) volatile); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5) const volatile); #endif template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6)); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6) const); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6) volatile); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6) const volatile); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 ...)); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 ...) const); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 ...) volatile); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 ...) const volatile); #ifdef BOOST_TT_TEST_MS_FUNC_SIGS template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6)); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6) const); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6) volatile); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6) const volatile); #ifndef _MANAGED template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6)); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6) const); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6) volatile); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6) const volatile); #endif template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6)); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6) const); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6) volatile); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6) const volatile); #endif template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7)); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7) const); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7) volatile); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7) const volatile); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 ...)); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 ...) const); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 ...) volatile); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 ...) const volatile); #ifdef BOOST_TT_TEST_MS_FUNC_SIGS template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7)); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7) const); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7) volatile); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7) const volatile); #ifndef _MANAGED template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7)); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7) const); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7) volatile); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7) const volatile); #endif template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7)); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7) const); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7) volatile); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7) const volatile); #endif template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8)); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8) const); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8) volatile); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8) const volatile); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 ...)); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 ...) const); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 ...) volatile); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 ...) const volatile); #ifdef BOOST_TT_TEST_MS_FUNC_SIGS template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8)); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8) const); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8) volatile); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8) const volatile); #ifndef _MANAGED template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8)); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8) const); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8) volatile); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8) const volatile); #endif template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8)); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8) const); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8) volatile); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8) const volatile); #endif template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9)); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9) const); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9) volatile); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9) const volatile); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 ...)); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 ...) const); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 ...) volatile); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 ...) const volatile); #ifdef BOOST_TT_TEST_MS_FUNC_SIGS template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9)); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9) const); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9) volatile); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9) const volatile); #ifndef _MANAGED template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9)); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9) const); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9) volatile); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9) const volatile); #endif template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9)); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9) const); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9) volatile); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9) const volatile); #endif template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10)); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10) const); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10) volatile); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10) const volatile); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 ...)); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 ...) const); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 ...) volatile); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 ...) const volatile); #ifdef BOOST_TT_TEST_MS_FUNC_SIGS template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10)); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10) const); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10) volatile); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10) const volatile); #ifndef _MANAGED template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10)); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10) const); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10) volatile); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10) const volatile); #endif template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10)); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10) const); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10) volatile); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10) const volatile); #endif template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11)); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11) const); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11) volatile); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11) const volatile); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 ...)); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 ...) const); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 ...) volatile); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 ...) const volatile); #ifdef BOOST_TT_TEST_MS_FUNC_SIGS template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11)); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11) const); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11) volatile); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11) const volatile); #ifndef _MANAGED template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11)); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11) const); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11) volatile); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11) const volatile); #endif template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11)); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11) const); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11) volatile); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11) const volatile); #endif template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12)); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12) const); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12) volatile); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12) const volatile); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 ...)); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 ...) const); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 ...) volatile); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 ...) const volatile); #ifdef BOOST_TT_TEST_MS_FUNC_SIGS template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12)); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12) const); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12) volatile); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12) const volatile); #ifndef _MANAGED template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12)); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12) const); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12) volatile); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12) const volatile); #endif template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12)); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12) const); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12) volatile); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12) const volatile); #endif template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13)); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13) const); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13) volatile); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13) const volatile); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 ...)); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 ...) const); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 ...) volatile); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 ...) const volatile); #ifdef BOOST_TT_TEST_MS_FUNC_SIGS template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13)); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13) const); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13) volatile); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13) const volatile); #ifndef _MANAGED template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13)); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13) const); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13) volatile); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13) const volatile); #endif template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13)); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13) const); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13) volatile); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13) const volatile); #endif template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14)); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14) const); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14) volatile); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14) const volatile); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 ...)); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 ...) const); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 ...) volatile); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 ...) const volatile); #ifdef BOOST_TT_TEST_MS_FUNC_SIGS template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14)); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14) const); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14) volatile); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14) const volatile); #ifndef _MANAGED template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14)); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14) const); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14) volatile); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14) const volatile); #endif template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14)); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14) const); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14) volatile); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14) const volatile); #endif template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15)); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15) const); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15) volatile); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15) const volatile); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 ...)); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 ...) const); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 ...) volatile); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 ...) const volatile); #ifdef BOOST_TT_TEST_MS_FUNC_SIGS template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15)); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15) const); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15) volatile); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15) const volatile); #ifndef _MANAGED template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15)); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15) const); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15) volatile); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15) const volatile); #endif template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15)); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15) const); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15) volatile); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15) const volatile); #endif template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16)); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16) const); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16) volatile); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16) const volatile); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 ...)); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 ...) const); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 ...) volatile); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 ...) const volatile); #ifdef BOOST_TT_TEST_MS_FUNC_SIGS template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16)); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16) const); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16) volatile); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16) const volatile); #ifndef _MANAGED template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16)); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16) const); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16) volatile); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16) const volatile); #endif template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16)); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16) const); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16) volatile); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16) const volatile); #endif template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17)); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17) const); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17) volatile); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17) const volatile); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 ...)); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 ...) const); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 ...) volatile); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 ...) const volatile); #ifdef BOOST_TT_TEST_MS_FUNC_SIGS template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17)); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17) const); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17) volatile); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17) const volatile); #ifndef _MANAGED template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17)); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17) const); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17) volatile); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17) const volatile); #endif template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17)); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17) const); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17) volatile); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17) const volatile); #endif template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18)); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18) const); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18) volatile); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18) const volatile); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 ...)); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 ...) const); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 ...) volatile); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 ...) const volatile); #ifdef BOOST_TT_TEST_MS_FUNC_SIGS template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18)); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18) const); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18) volatile); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18) const volatile); #ifndef _MANAGED template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18)); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18) const); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18) volatile); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18) const volatile); #endif template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18)); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18) const); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18) volatile); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18) const volatile); #endif template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19)); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19) const); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19) volatile); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19) const volatile); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 ...)); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 ...) const); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 ...) volatile); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 ...) const volatile); #ifdef BOOST_TT_TEST_MS_FUNC_SIGS template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19)); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19) const); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19) volatile); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19) const volatile); #ifndef _MANAGED template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19)); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19) const); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19) volatile); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19) const volatile); #endif template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19)); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19) const); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19) volatile); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19) const volatile); #endif template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20)); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20) const); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20) volatile); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20) const volatile); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 ...)); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 ...) const); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 ...) volatile); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 ...) const volatile); #ifdef BOOST_TT_TEST_MS_FUNC_SIGS template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20)); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20) const); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20) volatile); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20) const volatile); #ifndef _MANAGED template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20)); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20) const); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20) volatile); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20) const volatile); #endif template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20)); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20) const); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20) volatile); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20) const volatile); #endif template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21)); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21) const); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21) volatile); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21) const volatile); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 ...)); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 ...) const); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 ...) volatile); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 ...) const volatile); #ifdef BOOST_TT_TEST_MS_FUNC_SIGS template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21)); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21) const); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21) volatile); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21) const volatile); #ifndef _MANAGED template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21)); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21) const); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21) volatile); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21) const volatile); #endif template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21)); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21) const); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21) volatile); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21) const volatile); #endif template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22)); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22) const); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22) volatile); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22) const volatile); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 ...)); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 ...) const); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 ...) volatile); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 ...) const volatile); #ifdef BOOST_TT_TEST_MS_FUNC_SIGS template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22)); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22) const); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22) volatile); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22) const volatile); #ifndef _MANAGED template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22)); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22) const); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22) volatile); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22) const volatile); #endif template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22)); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22) const); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22) volatile); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22) const volatile); #endif template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23)); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23) const); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23) volatile); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23) const volatile); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 ...)); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 ...) const); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 ...) volatile); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 ...) const volatile); #ifdef BOOST_TT_TEST_MS_FUNC_SIGS template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23)); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23) const); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23) volatile); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23) const volatile); #ifndef _MANAGED template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23)); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23) const); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23) volatile); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23) const volatile); #endif template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23)); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23) const); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23) volatile); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23) const volatile); #endif template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24)); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24) const); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24) volatile); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24) const volatile); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 ...)); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 ...) const); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 ...) volatile); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 ...) const volatile); #ifdef BOOST_TT_TEST_MS_FUNC_SIGS template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24)); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24) const); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24) volatile); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24) const volatile); #ifndef _MANAGED template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24)); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24) const); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24) volatile); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24) const volatile); #endif template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24)); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24) const); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24) volatile); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)( T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24) const volatile); #endif #else #define BOOST_PP_ITERATION_PARAMS_1 \ (3, (0, 25, "boost/type_traits/detail/is_mem_fun_pointer_tester.hpp")) #include BOOST_PP_ITERATE() #endif // BOOST_TT_PREPROCESSING_MODE } // namespace type_traits } // namespace boost #endif // BOOST_TT_DETAIL_IS_MEM_FUN_POINTER_TESTER_HPP_INCLUDED ///// iteration #else #define BOOST_PP_COUNTER BOOST_PP_FRAME_ITERATION(1) #undef __stdcall #undef __fastcall #undef __cdecl template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T))); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T)) const); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T)) volatile); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T)) const volatile); @#ifndef BOOST_TT_NO_ELLIPSIS_IN_FUNC_TESTING template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T) ...)); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T) ...) const); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T) ...) volatile); template yes_type is_mem_fun_pointer_tester(R (T::*const volatile*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T) ...) const volatile); @#endif @#ifdef BOOST_TT_TEST_MS_FUNC_SIGS // Other calling conventions used by MS compatible compilers: template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T))); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T)) const); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T)) volatile); template yes_type is_mem_fun_pointer_tester(R (__stdcall T::*const volatile*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T)) const volatile); @#ifndef _MANAGED template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T))); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T)) const); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T)) volatile); template yes_type is_mem_fun_pointer_tester(R (__fastcall T::*const volatile*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T)) const volatile); @#endif template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T))); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T)) const); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T)) volatile); template yes_type is_mem_fun_pointer_tester(R (__cdecl T::*const volatile*)(BOOST_PP_ENUM_PARAMS(BOOST_PP_COUNTER,T)) const volatile); @#endif #undef BOOST_PP_COUNTER #endif // BOOST_PP_IS_ITERATING ================================================ FILE: benchmarks/boost/type_traits/detail/yes_no_type.hpp ================================================ // (C) Copyright John Maddock and Steve Cleary 2000. // Use, modification and distribution are subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt). // // See http://www.boost.org/libs/type_traits for most recent version including documentation. // // macros and helpers for working with integral-constant-expressions. #ifndef BOOST_TT_DETAIL_YES_NO_TYPE_HPP_INCLUDED #define BOOST_TT_DETAIL_YES_NO_TYPE_HPP_INCLUDED namespace boost { namespace type_traits { typedef char yes_type; struct no_type { char padding[8]; }; } // namespace type_traits } // namespace boost #endif // BOOST_TT_DETAIL_YES_NO_TYPE_HPP_INCLUDED ================================================ FILE: benchmarks/boost/type_traits/has_trivial_assign.hpp ================================================ // (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000. // Use, modification and distribution are subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt). // // See http://www.boost.org/libs/type_traits for most recent version including documentation. #ifndef BOOST_TT_HAS_TRIVIAL_ASSIGN_HPP_INCLUDED #define BOOST_TT_HAS_TRIVIAL_ASSIGN_HPP_INCLUDED #include #include #include #if !defined(BOOST_HAS_TRIVIAL_ASSIGN) || defined(BOOST_MSVC) || defined(__GNUC__) || defined(BOOST_INTEL) || defined(__SUNPRO_CC) || defined(__clang) #include #include #include #include #endif namespace boost { template struct has_trivial_assign : public integral_constant < bool, #ifdef BOOST_HAS_TRIVIAL_ASSIGN BOOST_HAS_TRIVIAL_ASSIGN(T) #else ::boost::is_pod::value && !::boost::is_const::value && !::boost::is_volatile::value #endif > {}; template<> struct has_trivial_assign : public false_type{}; #ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS template<> struct has_trivial_assign : public false_type{}; template<> struct has_trivial_assign : public false_type{}; template<> struct has_trivial_assign : public false_type{}; #endif template struct has_trivial_assign : public false_type{}; template struct has_trivial_assign : public false_type{}; #if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) template struct has_trivial_assign : public false_type{}; #endif // Arrays are not explictly assignable: template struct has_trivial_assign : public false_type{}; template struct has_trivial_assign : public false_type{}; } // namespace boost #endif // BOOST_TT_HAS_TRIVIAL_ASSIGN_HPP_INCLUDED ================================================ FILE: benchmarks/boost/type_traits/has_trivial_destructor.hpp ================================================ // (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000. // Use, modification and distribution are subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt). // // See http://www.boost.org/libs/type_traits for most recent version including documentation. #ifndef BOOST_TT_HAS_TRIVIAL_DESTRUCTOR_HPP_INCLUDED #define BOOST_TT_HAS_TRIVIAL_DESTRUCTOR_HPP_INCLUDED #include #include #ifdef BOOST_HAS_TRIVIAL_DESTRUCTOR #if defined(BOOST_INTEL) || defined(BOOST_MSVC) #include #endif #ifdef BOOST_HAS_SGI_TYPE_TRAITS #include #endif #if defined(__GNUC__) || defined(__clang) || defined(__SUNPRO_CC) #include #endif namespace boost { template struct has_trivial_destructor : public integral_constant{}; #else #include namespace boost{ template struct has_trivial_destructor : public integral_constant::value>{}; #endif template <> struct has_trivial_destructor : public false_type{}; #ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS template <> struct has_trivial_destructor : public false_type{}; template <> struct has_trivial_destructor : public false_type{}; template <> struct has_trivial_destructor : public false_type{}; #endif } // namespace boost #endif // BOOST_TT_HAS_TRIVIAL_DESTRUCTOR_HPP_INCLUDED ================================================ FILE: benchmarks/boost/type_traits/integral_constant.hpp ================================================ // (C) Copyright John Maddock 2015. // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_TYPE_TRAITS_INTEGRAL_CONSTANT_HPP #define BOOST_TYPE_TRAITS_INTEGRAL_CONSTANT_HPP #include #include #if (BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1400)) \ || BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x610)) \ || BOOST_WORKAROUND(__DMC__, BOOST_TESTED_AT(0x840)) \ || BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3202)) \ || BOOST_WORKAROUND(BOOST_INTEL_CXX_VERSION, BOOST_TESTED_AT(810)) ) namespace boost{ namespace mpl { template struct bool_; template struct integral_c; struct integral_c_tag; } } #else namespace mpl_{ template struct bool_; template struct integral_c; struct integral_c_tag; } namespace boost { namespace mpl { using ::mpl_::bool_; using ::mpl_::integral_c; using ::mpl_::integral_c_tag; } } #endif namespace boost{ template struct integral_constant { typedef mpl::integral_c_tag tag; typedef T value_type; typedef integral_constant type; static const T value = val; // // This helper function is just to disable type-punning // warnings from GCC: // template static U& dereference(U* p) { return *p; } operator const mpl::integral_c& ()const { static const char data[sizeof(long)] = { 0 }; return dereference(reinterpret_cast*>(&data)); } BOOST_CONSTEXPR operator T()const { return val; } }; template T const integral_constant::value; template struct integral_constant { typedef mpl::integral_c_tag tag; typedef bool value_type; typedef integral_constant type; static const bool value = val; // // This helper function is just to disable type-punning // warnings from GCC: // template static T& dereference(T* p) { return *p; } operator const mpl::bool_& ()const { static const char data = 0; return dereference(reinterpret_cast*>(&data)); } BOOST_CONSTEXPR operator bool()const { return val; } }; template bool const integral_constant::value; typedef integral_constant true_type; typedef integral_constant false_type; } #endif ================================================ FILE: benchmarks/boost/type_traits/intrinsics.hpp ================================================ // (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000. // Use, modification and distribution are subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt). // // See http://www.boost.org/libs/type_traits for most recent version including documentation. #ifndef BOOST_TT_INTRINSICS_HPP_INCLUDED #define BOOST_TT_INTRINSICS_HPP_INCLUDED #ifndef BOOST_TT_DISABLE_INTRINSICS #include #ifndef BOOST_TT_CONFIG_HPP_INCLUDED #include #endif // // Helper macros for builtin compiler support. // If your compiler has builtin support for any of the following // traits concepts, then redefine the appropriate macros to pick // up on the compiler support: // // (these should largely ignore cv-qualifiers) // BOOST_IS_UNION(T) should evaluate to true if T is a union type // BOOST_IS_POD(T) should evaluate to true if T is a POD type // BOOST_IS_EMPTY(T) should evaluate to true if T is an empty class type (and not a union) // BOOST_HAS_TRIVIAL_CONSTRUCTOR(T) should evaluate to true if "T x;" has no effect // BOOST_HAS_TRIVIAL_COPY(T) should evaluate to true if T(t) <==> memcpy // BOOST_HAS_TRIVIAL_MOVE_CONSTRUCTOR(T) should evaluate to true if T(boost::move(t)) <==> memcpy // BOOST_HAS_TRIVIAL_ASSIGN(T) should evaluate to true if t = u <==> memcpy // BOOST_HAS_TRIVIAL_MOVE_ASSIGN(T) should evaluate to true if t = boost::move(u) <==> memcpy // BOOST_HAS_TRIVIAL_DESTRUCTOR(T) should evaluate to true if ~T() has no effect // BOOST_HAS_NOTHROW_CONSTRUCTOR(T) should evaluate to true if "T x;" can not throw // BOOST_HAS_NOTHROW_COPY(T) should evaluate to true if T(t) can not throw // BOOST_HAS_NOTHROW_ASSIGN(T) should evaluate to true if t = u can not throw // BOOST_HAS_VIRTUAL_DESTRUCTOR(T) should evaluate to true T has a virtual destructor // BOOST_IS_NOTHROW_MOVE_CONSTRUCT(T) should evaluate to true if T has a non-throwing move constructor. // BOOST_IS_NOTHROW_MOVE_ASSIGN(T) should evaluate to true if T has a non-throwing move assignment operator. // // The following can also be defined: when detected our implementation is greatly simplified. // // BOOST_IS_ABSTRACT(T) true if T is an abstract type // BOOST_IS_BASE_OF(T,U) true if T is a base class of U // BOOST_IS_CLASS(T) true if T is a class type (and not a union) // BOOST_IS_CONVERTIBLE(T,U) true if T is convertible to U // BOOST_IS_ENUM(T) true is T is an enum // BOOST_IS_POLYMORPHIC(T) true if T is a polymorphic type // BOOST_ALIGNMENT_OF(T) should evaluate to the alignment requirements of type T. // // define BOOST_TT_DISABLE_INTRINSICS to prevent any intrinsics being used (mostly used when testing) // #ifdef BOOST_HAS_SGI_TYPE_TRAITS // Hook into SGI's __type_traits class, this will pick up user supplied // specializations as well as SGI - compiler supplied specializations. # include # ifdef __NetBSD__ // There are two different versions of type_traits.h on NetBSD on Spark // use an implicit include via algorithm instead, to make sure we get // the same version as the std lib: # include # else # include # endif # define BOOST_IS_POD(T) ::boost::is_same< typename ::__type_traits::is_POD_type, ::__true_type>::value # define BOOST_HAS_TRIVIAL_CONSTRUCTOR(T) ::boost::is_same< typename ::__type_traits::has_trivial_default_constructor, ::__true_type>::value # define BOOST_HAS_TRIVIAL_COPY(T) ::boost::is_same< typename ::__type_traits::has_trivial_copy_constructor, ::__true_type>::value # define BOOST_HAS_TRIVIAL_ASSIGN(T) ::boost::is_same< typename ::__type_traits::has_trivial_assignment_operator, ::__true_type>::value # define BOOST_HAS_TRIVIAL_DESTRUCTOR(T) ::boost::is_same< typename ::__type_traits::has_trivial_destructor, ::__true_type>::value # ifdef __sgi # define BOOST_HAS_TYPE_TRAITS_INTRINSICS # endif #endif #if defined(__MSL_CPP__) && (__MSL_CPP__ >= 0x8000) // Metrowerks compiler is acquiring intrinsic type traits support // post version 8. We hook into the published interface to pick up // user defined specializations as well as compiler intrinsics as // and when they become available: # include # define BOOST_IS_UNION(T) BOOST_STD_EXTENSION_NAMESPACE::is_union::value # define BOOST_IS_POD(T) BOOST_STD_EXTENSION_NAMESPACE::is_POD::value # define BOOST_HAS_TRIVIAL_CONSTRUCTOR(T) BOOST_STD_EXTENSION_NAMESPACE::has_trivial_default_ctor::value # define BOOST_HAS_TRIVIAL_COPY(T) BOOST_STD_EXTENSION_NAMESPACE::has_trivial_copy_ctor::value # define BOOST_HAS_TRIVIAL_ASSIGN(T) BOOST_STD_EXTENSION_NAMESPACE::has_trivial_assignment::value # define BOOST_HAS_TRIVIAL_DESTRUCTOR(T) BOOST_STD_EXTENSION_NAMESPACE::has_trivial_dtor::value # define BOOST_HAS_TYPE_TRAITS_INTRINSICS #endif #if (defined(BOOST_MSVC) && defined(BOOST_MSVC_FULL_VER) && (BOOST_MSVC_FULL_VER >=140050215))\ || (defined(BOOST_INTEL) && defined(_MSC_VER) && (_MSC_VER >= 1500)) // // Note that even though these intrinsics rely on other type traits classes // we do not #include those here as it produces cyclic dependencies and // can cause the intrinsics to not even be used at all! // # define BOOST_IS_UNION(T) __is_union(T) # define BOOST_IS_POD(T) (__is_pod(T) && __has_trivial_constructor(T)) # define BOOST_IS_EMPTY(T) __is_empty(T) # define BOOST_HAS_TRIVIAL_CONSTRUCTOR(T) __has_trivial_constructor(T) # define BOOST_HAS_TRIVIAL_ASSIGN(T) (__has_trivial_assign(T) || ( ::boost::is_pod::value && ! ::boost::is_const::value && !::boost::is_volatile::value)) # define BOOST_HAS_TRIVIAL_DESTRUCTOR(T) (__has_trivial_destructor(T) || ::boost::is_pod::value) # define BOOST_HAS_NOTHROW_CONSTRUCTOR(T) (__has_nothrow_constructor(T) || ::boost::has_trivial_constructor::value) #if !defined(BOOST_INTEL) # define BOOST_HAS_NOTHROW_COPY(T) ((__has_nothrow_copy(T) || ::boost::has_trivial_copy::value) && !is_array::value) # define BOOST_HAS_TRIVIAL_COPY(T) (__has_trivial_copy(T) || ::boost::is_pod::value) #elif (_MSC_VER >= 1900) # define BOOST_HAS_NOTHROW_COPY(T) ((__is_nothrow_constructible(T, typename add_lvalue_reference::type>::type)) && !is_array::value) # define BOOST_HAS_TRIVIAL_COPY(T) (__is_trivially_constructible(T, typename add_lvalue_reference::type>::type)) #endif # define BOOST_HAS_NOTHROW_ASSIGN(T) (__has_nothrow_assign(T) || ::boost::has_trivial_assign::value) # define BOOST_HAS_VIRTUAL_DESTRUCTOR(T) __has_virtual_destructor(T) # define BOOST_IS_ABSTRACT(T) __is_abstract(T) # define BOOST_IS_BASE_OF(T,U) (__is_base_of(T,U) && !is_same::value) # define BOOST_IS_CLASS(T) __is_class(T) # define BOOST_IS_CONVERTIBLE(T,U) ((__is_convertible_to(T,U) || (is_same::value && !is_function::value)) && !__is_abstract(U)) # define BOOST_IS_ENUM(T) __is_enum(T) // This one fails if the default alignment has been changed with /Zp: // # define BOOST_ALIGNMENT_OF(T) __alignof(T) # if defined(_MSC_VER) && (_MSC_VER >= 1700) # define BOOST_HAS_TRIVIAL_MOVE_CONSTRUCTOR(T) ((__has_trivial_move_constructor(T) || boost::is_pod::value) && ! ::boost::is_volatile::value && ! ::boost::is_reference::value) # define BOOST_HAS_TRIVIAL_MOVE_ASSIGN(T) ((__has_trivial_move_assign(T) || boost::is_pod::value) && ! ::boost::is_const::value && !::boost::is_volatile::value && ! ::boost::is_reference::value) # endif #ifndef BOOST_NO_CXX11_FINAL // This one doesn't quite always do the right thing on older VC++ versions // we really need it when the final keyword is supporyted though: # define BOOST_IS_POLYMORPHIC(T) __is_polymorphic(T) #endif #if _MSC_FULL_VER >= 180020827 # define BOOST_IS_NOTHROW_MOVE_ASSIGN(T) (__is_nothrow_assignable(T&, T&&)) # define BOOST_IS_NOTHROW_MOVE_CONSTRUCT(T) (__is_nothrow_constructible(T, T&&)) #endif # define BOOST_HAS_TYPE_TRAITS_INTRINSICS #endif #if defined(__DMC__) && (__DMC__ >= 0x848) // For Digital Mars C++, www.digitalmars.com # define BOOST_IS_UNION(T) (__typeinfo(T) & 0x400) # define BOOST_IS_POD(T) (__typeinfo(T) & 0x800) # define BOOST_IS_EMPTY(T) (__typeinfo(T) & 0x1000) # define BOOST_HAS_TRIVIAL_CONSTRUCTOR(T) (__typeinfo(T) & 0x10) # define BOOST_HAS_TRIVIAL_COPY(T) (__typeinfo(T) & 0x20) # define BOOST_HAS_TRIVIAL_ASSIGN(T) (__typeinfo(T) & 0x40) # define BOOST_HAS_TRIVIAL_DESTRUCTOR(T) (__typeinfo(T) & 0x8) # define BOOST_HAS_NOTHROW_CONSTRUCTOR(T) (__typeinfo(T) & 0x80) # define BOOST_HAS_NOTHROW_COPY(T) (__typeinfo(T) & 0x100) # define BOOST_HAS_NOTHROW_ASSIGN(T) (__typeinfo(T) & 0x200) # define BOOST_HAS_VIRTUAL_DESTRUCTOR(T) (__typeinfo(T) & 0x4) # define BOOST_HAS_TYPE_TRAITS_INTRINSICS #endif #if defined(BOOST_CLANG) && defined(__has_feature) && !defined(__CUDACC__) // // Note that these intrinsics are disabled for the CUDA meta-compiler as it appears // to not support them, even though the underlying clang compiler does so. // This is a rubbish fix as it basically stops type traits from working correctly, // but maybe the best we can do for now. See https://svn.boost.org/trac/boost/ticket/10694 // // // Note that even though these intrinsics rely on other type traits classes // we do not #include those here as it produces cyclic dependencies and // can cause the intrinsics to not even be used at all! // # include # if __has_feature(is_union) # define BOOST_IS_UNION(T) __is_union(T) # endif # if (!defined(__GLIBCXX__) || (__GLIBCXX__ >= 20080306 && __GLIBCXX__ != 20080519)) && __has_feature(is_pod) # define BOOST_IS_POD(T) __is_pod(T) # endif # if (!defined(__GLIBCXX__) || (__GLIBCXX__ >= 20080306 && __GLIBCXX__ != 20080519)) && __has_feature(is_empty) # define BOOST_IS_EMPTY(T) __is_empty(T) # endif # if __has_feature(has_trivial_constructor) # define BOOST_HAS_TRIVIAL_CONSTRUCTOR(T) __has_trivial_constructor(T) # endif # if __has_feature(has_trivial_copy) # define BOOST_HAS_TRIVIAL_COPY(T) (__has_trivial_copy(T) && !is_reference::value) # endif # if __has_feature(has_trivial_assign) # define BOOST_HAS_TRIVIAL_ASSIGN(T) (__has_trivial_assign(T) && !is_volatile::value && is_assignable::value) # endif # if __has_feature(has_trivial_destructor) # define BOOST_HAS_TRIVIAL_DESTRUCTOR(T) (__has_trivial_destructor(T) && is_destructible::value) # endif # if __has_feature(has_nothrow_constructor) # define BOOST_HAS_NOTHROW_CONSTRUCTOR(T) (__has_nothrow_constructor(T) && is_default_constructible::value) # endif # if __has_feature(has_nothrow_copy) # define BOOST_HAS_NOTHROW_COPY(T) (__has_nothrow_copy(T) && !is_volatile::value && !is_reference::value && is_copy_constructible::value) # endif # if __has_feature(has_nothrow_assign) # define BOOST_HAS_NOTHROW_ASSIGN(T) (__has_nothrow_assign(T) && !is_volatile::value && is_assignable::value) # endif # if __has_feature(has_virtual_destructor) # define BOOST_HAS_VIRTUAL_DESTRUCTOR(T) __has_virtual_destructor(T) # endif # if __has_feature(is_abstract) # define BOOST_IS_ABSTRACT(T) __is_abstract(T) # endif # if __has_feature(is_base_of) # define BOOST_IS_BASE_OF(T,U) (__is_base_of(T,U) && !is_same::value) # endif # if __has_feature(is_class) # define BOOST_IS_CLASS(T) __is_class(T) # endif # if __has_feature(is_convertible_to) # define BOOST_IS_CONVERTIBLE(T,U) __is_convertible_to(T,U) # endif # if __has_feature(is_enum) # define BOOST_IS_ENUM(T) __is_enum(T) # endif # if __has_feature(is_polymorphic) # define BOOST_IS_POLYMORPHIC(T) __is_polymorphic(T) # endif # if __has_feature(has_trivial_move_constructor) # define BOOST_HAS_TRIVIAL_MOVE_CONSTRUCTOR(T) (__has_trivial_move_constructor(T) && is_constructible::value && !::boost::is_volatile::value) # endif # if __has_feature(has_trivial_move_assign) # define BOOST_HAS_TRIVIAL_MOVE_ASSIGN(T) (__has_trivial_move_assign(T) && is_assignable::value && !::boost::is_volatile::value) # endif # if (!defined(unix) && !defined(__unix__)) || defined(__LP64__) || !defined(__GNUC__) // GCC sometimes lies about alignment requirements // of type double on 32-bit unix platforms, use the // old implementation instead in that case: # define BOOST_ALIGNMENT_OF(T) __alignof(T) # endif # if __has_feature(is_final) # define BOOST_IS_FINAL(T) __is_final(T) # endif # define BOOST_HAS_TYPE_TRAITS_INTRINSICS #endif #if defined(__GNUC__) && ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 3) && !defined(__GCCXML__))) && !defined(BOOST_CLANG) // // Note that even though these intrinsics rely on other type traits classes // we do not #include those here as it produces cyclic dependencies and // can cause the intrinsics to not even be used at all! // #ifdef BOOST_INTEL # define BOOST_INTEL_TT_OPTS || is_pod::value #else # define BOOST_INTEL_TT_OPTS #endif # define BOOST_IS_UNION(T) __is_union(T) # define BOOST_IS_POD(T) __is_pod(T) # define BOOST_IS_EMPTY(T) __is_empty(T) # define BOOST_HAS_TRIVIAL_CONSTRUCTOR(T) ((__has_trivial_constructor(T) BOOST_INTEL_TT_OPTS) && ! ::boost::is_volatile::value) # define BOOST_HAS_TRIVIAL_COPY(T) ((__has_trivial_copy(T) BOOST_INTEL_TT_OPTS) && !is_reference::value) #if (__GNUC__ * 100 + __GNUC_MINOR__) >= 409 # define BOOST_HAS_TRIVIAL_ASSIGN(T) ((__has_trivial_assign(T) BOOST_INTEL_TT_OPTS) && ! ::boost::is_volatile::value && ! ::boost::is_const::value && is_assignable::value) # define BOOST_HAS_TRIVIAL_DESTRUCTOR(T) (__has_trivial_destructor(T) BOOST_INTEL_TT_OPTS && is_destructible::value) # define BOOST_HAS_NOTHROW_CONSTRUCTOR(T) (__has_nothrow_constructor(T) && is_default_constructible::value BOOST_INTEL_TT_OPTS) # define BOOST_HAS_NOTHROW_COPY(T) ((__has_nothrow_copy(T) BOOST_INTEL_TT_OPTS) && !is_volatile::value && !is_reference::value && is_copy_constructible::value) # define BOOST_HAS_NOTHROW_ASSIGN(T) ((__has_nothrow_assign(T) BOOST_INTEL_TT_OPTS) && !is_volatile::value && !is_const::value && is_assignable::value) #else # define BOOST_HAS_TRIVIAL_ASSIGN(T) ((__has_trivial_assign(T) BOOST_INTEL_TT_OPTS) && ! ::boost::is_volatile::value && ! ::boost::is_const::value) # define BOOST_HAS_TRIVIAL_DESTRUCTOR(T) (__has_trivial_destructor(T) BOOST_INTEL_TT_OPTS) # define BOOST_HAS_NOTHROW_CONSTRUCTOR(T) (__has_nothrow_constructor(T) BOOST_INTEL_TT_OPTS) # define BOOST_HAS_NOTHROW_COPY(T) ((__has_nothrow_copy(T) BOOST_INTEL_TT_OPTS) && !is_volatile::value && !is_reference::value && !is_array::value) # define BOOST_HAS_NOTHROW_ASSIGN(T) ((__has_nothrow_assign(T) BOOST_INTEL_TT_OPTS) && !is_volatile::value && !is_const::value && !is_array::value) #endif # define BOOST_HAS_VIRTUAL_DESTRUCTOR(T) __has_virtual_destructor(T) # define BOOST_IS_ABSTRACT(T) __is_abstract(T) # define BOOST_IS_BASE_OF(T,U) (__is_base_of(T,U) && !is_same::value) # define BOOST_IS_CLASS(T) __is_class(T) # define BOOST_IS_ENUM(T) __is_enum(T) # define BOOST_IS_POLYMORPHIC(T) __is_polymorphic(T) # if (!defined(unix) && !defined(__unix__)) || defined(__LP64__) // GCC sometimes lies about alignment requirements // of type double on 32-bit unix platforms, use the // old implementation instead in that case: # define BOOST_ALIGNMENT_OF(T) __alignof__(T) # endif # if (__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)) # define BOOST_IS_FINAL(T) __is_final(T) # endif # if (__GNUC__ >= 5) && (__cplusplus >= 201103) # define BOOST_HAS_TRIVIAL_MOVE_ASSIGN(T) (__is_trivially_assignable(T&, T&&) && is_assignable::value && !::boost::is_volatile::value) # define BOOST_HAS_TRIVIAL_MOVE_CONSTRUCTOR(T) (__is_trivially_constructible(T, T&&) && is_constructible::value && !::boost::is_volatile::value) # endif # define BOOST_HAS_TYPE_TRAITS_INTRINSICS #endif #if defined(__SUNPRO_CC) && (__SUNPRO_CC >= 0x5130) # define BOOST_IS_UNION(T) __oracle_is_union(T) # define BOOST_IS_POD(T) (__oracle_is_pod(T) && !is_function::value) # define BOOST_IS_EMPTY(T) __oracle_is_empty(T) # define BOOST_HAS_TRIVIAL_CONSTRUCTOR(T) (__oracle_has_trivial_constructor(T) && ! ::boost::is_volatile::value) # define BOOST_HAS_TRIVIAL_COPY(T) (__oracle_has_trivial_copy(T) && !is_reference::value) # define BOOST_HAS_TRIVIAL_ASSIGN(T) ((__oracle_has_trivial_assign(T) || __oracle_is_trivial(T)) && ! ::boost::is_volatile::value && ! ::boost::is_const::value && is_assignable::value) # define BOOST_HAS_TRIVIAL_DESTRUCTOR(T) (__oracle_has_trivial_destructor(T) && is_destructible::value) # define BOOST_HAS_NOTHROW_CONSTRUCTOR(T) ((__oracle_has_nothrow_constructor(T) || __oracle_has_trivial_constructor(T) || __oracle_is_trivial(T)) && is_default_constructible::value) // __oracle_has_nothrow_copy appears to behave the same as __oracle_has_nothrow_assign, disabled for now: //# define BOOST_HAS_NOTHROW_COPY(T) ((__oracle_has_nothrow_copy(T) || __oracle_has_trivial_copy(T) || __oracle_is_trivial(T)) && !is_volatile::value && !is_reference::value && is_copy_constructible::value) # define BOOST_HAS_NOTHROW_ASSIGN(T) ((__oracle_has_nothrow_assign(T) || __oracle_has_trivial_assign(T) || __oracle_is_trivial(T)) && !is_volatile::value && !is_const::value && is_assignable::value) # define BOOST_HAS_VIRTUAL_DESTRUCTOR(T) __oracle_has_virtual_destructor(T) # define BOOST_IS_ABSTRACT(T) __oracle_is_abstract(T) //# define BOOST_IS_BASE_OF(T,U) (__is_base_of(T,U) && !is_same::value) # define BOOST_IS_CLASS(T) __oracle_is_class(T) # define BOOST_IS_ENUM(T) __oracle_is_enum(T) # define BOOST_IS_POLYMORPHIC(T) __oracle_is_polymorphic(T) # define BOOST_ALIGNMENT_OF(T) __alignof__(T) # define BOOST_IS_FINAL(T) __oracle_is_final(T) # define BOOST_HAS_TYPE_TRAITS_INTRINSICS #endif #if defined(__ghs__) && (__GHS_VERSION_NUMBER >= 600) # include # include # include # define BOOST_IS_UNION(T) __is_union(T) # define BOOST_IS_POD(T) __is_pod(T) # define BOOST_IS_EMPTY(T) __is_empty(T) # define BOOST_HAS_TRIVIAL_CONSTRUCTOR(T) __has_trivial_constructor(T) # define BOOST_HAS_TRIVIAL_COPY(T) (__has_trivial_copy(T) && !is_reference::value) # define BOOST_HAS_TRIVIAL_ASSIGN(T) (__has_trivial_assign(T) && !is_volatile::value) # define BOOST_HAS_TRIVIAL_DESTRUCTOR(T) __has_trivial_destructor(T) # define BOOST_HAS_NOTHROW_CONSTRUCTOR(T) __has_nothrow_constructor(T) # define BOOST_HAS_NOTHROW_COPY(T) (__has_nothrow_copy(T) && !is_volatile::value && !is_reference::value) # define BOOST_HAS_NOTHROW_ASSIGN(T) (__has_nothrow_assign(T) && !is_volatile::value) # define BOOST_HAS_VIRTUAL_DESTRUCTOR(T) __has_virtual_destructor(T) # define BOOST_IS_ABSTRACT(T) __is_abstract(T) # define BOOST_IS_BASE_OF(T,U) (__is_base_of(T,U) && !is_same::value) # define BOOST_IS_CLASS(T) __is_class(T) # define BOOST_IS_ENUM(T) __is_enum(T) # define BOOST_IS_POLYMORPHIC(T) __is_polymorphic(T) # define BOOST_ALIGNMENT_OF(T) __alignof__(T) # define BOOST_HAS_TYPE_TRAITS_INTRINSICS #endif # if defined(__CODEGEARC__) # include # include # include # include # define BOOST_IS_UNION(T) __is_union(T) # define BOOST_IS_POD(T) __is_pod(T) # define BOOST_IS_EMPTY(T) __is_empty(T) # define BOOST_HAS_TRIVIAL_CONSTRUCTOR(T) (__has_trivial_default_constructor(T)) # define BOOST_HAS_TRIVIAL_COPY(T) (__has_trivial_copy_constructor(T) && !is_reference::value) # define BOOST_HAS_TRIVIAL_ASSIGN(T) (__has_trivial_assign(T) && !is_volatile::value) # define BOOST_HAS_TRIVIAL_DESTRUCTOR(T) (__has_trivial_destructor(T)) # define BOOST_HAS_NOTHROW_CONSTRUCTOR(T) (__has_nothrow_default_constructor(T)) # define BOOST_HAS_NOTHROW_COPY(T) (__has_nothrow_copy_constructor(T) && !is_volatile::value && !is_reference::value) # define BOOST_HAS_NOTHROW_ASSIGN(T) (__has_nothrow_assign(T) && !is_volatile::value) # define BOOST_HAS_VIRTUAL_DESTRUCTOR(T) __has_virtual_destructor(T) # define BOOST_IS_ABSTRACT(T) __is_abstract(T) # define BOOST_IS_BASE_OF(T,U) (__is_base_of(T,U) && !is_void::value && !is_void::value) # define BOOST_IS_CLASS(T) __is_class(T) # define BOOST_IS_CONVERTIBLE(T,U) (__is_convertible(T,U) || is_void::value) # define BOOST_IS_ENUM(T) __is_enum(T) # define BOOST_IS_POLYMORPHIC(T) __is_polymorphic(T) # define BOOST_ALIGNMENT_OF(T) alignof(T) # define BOOST_HAS_TYPE_TRAITS_INTRINSICS #endif #endif // BOOST_TT_DISABLE_INTRINSICS #endif // BOOST_TT_INTRINSICS_HPP_INCLUDED ================================================ FILE: benchmarks/boost/type_traits/is_abstract.hpp ================================================ #ifndef BOOST_TT_IS_ABSTRACT_CLASS_HPP #define BOOST_TT_IS_ABSTRACT_CLASS_HPP #if defined(_MSC_VER) # pragma once #endif /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 // is_abstract_class.hpp: // // (C) Copyright 2002 Rani Sharoni (rani_sharoni@hotmail.com) and Robert Ramey // Use, modification and distribution is subject to the Boost Software // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org for updates, documentation, and revision history. // // Compile type discovery whether given type is abstract class or not. // // Requires DR 337 to be supported by compiler // (http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_active.html#337). // // // Believed (Jan 2004) to work on: // - GCC 3.4 // - VC++ 7.1 // - compilers with new EDG frontend (Intel C++ 7, Comeau 4.3.2) // // Doesn't work on: // - VC++6, VC++7.0 and less // - GCC 3.3.X and less // - Borland C++ 6 and less // // // History: // - Originally written by Rani Sharoni, see // http://groups.google.com/groups?selm=df893da6.0207110613.75b2fe90%40posting.google.com // At this time supported by EDG (Intel C++ 7, Comeau 4.3.2) and VC7.1. // - Adapted and added into Boost.Serialization library by Robert Ramey // (starting with submission #10). // - Jan 2004: GCC 3.4 fixed to support DR337 (Giovanni Bajo). // - Jan 2004: modified to be part of Boost.TypeTraits (Pavel Vozenilek). // - Nov 2004: Christoph Ludwig found that the implementation did not work with // template types and gcc-3.4 or VC7.1, fix due to Christoph Ludwig // and John Maddock. // - Dec 2004: Added new config macro BOOST_NO_IS_ABSTRACT which causes the template // to degrade gracefully, rather than trash the compiler (John Maddock). // #include #include #ifndef BOOST_IS_ABSTRACT #include #include #include #ifdef BOOST_NO_IS_ABSTRACT #include #endif #endif namespace boost { namespace detail{ #ifdef BOOST_IS_ABSTRACT template struct is_abstract_imp { BOOST_STATIC_CONSTANT(bool, value = BOOST_IS_ABSTRACT(T)); }; #elif !defined(BOOST_NO_IS_ABSTRACT) template struct is_abstract_imp2 { // Deduction fails if T is void, function type, // reference type (14.8.2/2)or an abstract class type // according to review status issue #337 // template static type_traits::no_type check_sig(U (*)[1]); template static type_traits::yes_type check_sig(...); // // T must be a complete type, further if T is a template then // it must be instantiated in order for us to get the right answer: // BOOST_STATIC_ASSERT(sizeof(T) != 0); // GCC2 won't even parse this template if we embed the computation // of s1 in the computation of value. #ifdef __GNUC__ BOOST_STATIC_CONSTANT(std::size_t, s1 = sizeof(is_abstract_imp2::template check_sig(0))); #else #if BOOST_WORKAROUND(BOOST_MSVC_FULL_VER, >= 140050000) #pragma warning(push) #pragma warning(disable:6334) #endif BOOST_STATIC_CONSTANT(std::size_t, s1 = sizeof(check_sig(0))); #if BOOST_WORKAROUND(BOOST_MSVC_FULL_VER, >= 140050000) #pragma warning(pop) #endif #endif BOOST_STATIC_CONSTANT(bool, value = (s1 == sizeof(type_traits::yes_type))); }; template struct is_abstract_select { template struct rebind { typedef is_abstract_imp2 type; }; }; template <> struct is_abstract_select { template struct rebind { typedef false_type type; }; }; template struct is_abstract_imp { typedef is_abstract_select< ::boost::is_class::value> selector; typedef typename selector::template rebind binder; typedef typename binder::type type; BOOST_STATIC_CONSTANT(bool, value = type::value); }; #endif } #ifndef BOOST_NO_IS_ABSTRACT template struct is_abstract : public integral_constant::value> {}; #else template struct is_abstract : public integral_constant::value> {}; #endif } // namespace boost #endif //BOOST_TT_IS_ABSTRACT_CLASS_HPP ================================================ FILE: benchmarks/boost/type_traits/is_arithmetic.hpp ================================================ // (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000. // Use, modification and distribution are subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt). // // See http://www.boost.org/libs/type_traits for most recent version including documentation. #ifndef BOOST_TT_IS_ARITHMETIC_HPP_INCLUDED #define BOOST_TT_IS_ARITHMETIC_HPP_INCLUDED #include #include namespace boost { template struct is_arithmetic : public integral_constant::value || is_floating_point::value> {}; } // namespace boost #endif // BOOST_TT_IS_ARITHMETIC_HPP_INCLUDED ================================================ FILE: benchmarks/boost/type_traits/is_array.hpp ================================================ // (C) Copyright Dave Abrahams, Steve Cleary, Beman Dawes, Howard // Hinnant & John Maddock 2000. // Use, modification and distribution are subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt). // // See http://www.boost.org/libs/type_traits for most recent version including documentation. // Some fixes for is_array are based on a newsgroup posting by Jonathan Lundquist. #ifndef BOOST_TT_IS_ARRAY_HPP_INCLUDED #define BOOST_TT_IS_ARRAY_HPP_INCLUDED #include #include namespace boost { #if defined( __CODEGEARC__ ) template struct is_array : public integral_constant {}; #else template struct is_array : public false_type {}; #if !defined(BOOST_NO_ARRAY_TYPE_SPECIALIZATIONS) template struct is_array : public true_type {}; template struct is_array : public true_type{}; template struct is_array : public true_type{}; template struct is_array : public true_type{}; #if !BOOST_WORKAROUND(__BORLANDC__, < 0x600) && !defined(__IBMCPP__) && !BOOST_WORKAROUND(__DMC__, BOOST_TESTED_AT(0x840)) template struct is_array : public true_type{}; template struct is_array : public true_type{}; template struct is_array : public true_type{}; template struct is_array : public true_type{}; #endif #endif #endif } // namespace boost #endif // BOOST_TT_IS_ARRAY_HPP_INCLUDED ================================================ FILE: benchmarks/boost/type_traits/is_assignable.hpp ================================================ // (C) Copyright John Maddock 2015. // Use, modification and distribution are subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt). // // See http://www.boost.org/libs/type_traits for most recent version including documentation. #ifndef BOOST_TT_IS_ASSIGNABLE_HPP_INCLUDED #define BOOST_TT_IS_ASSIGNABLE_HPP_INCLUDED #include #include namespace boost{ template struct is_assignable; } #if !defined(BOOST_NO_CXX11_DECLTYPE) && !BOOST_WORKAROUND(BOOST_MSVC, < 1800) #include #include namespace boost{ namespace detail{ struct is_assignable_imp { template() = boost::declval())> static boost::type_traits::yes_type test(int); template static boost::type_traits::no_type test(...); }; } template struct is_assignable : public integral_constant(0)) == sizeof(boost::type_traits::yes_type)>{}; template struct is_assignable : public is_assignable{}; template struct is_assignable : public is_assignable{}; template struct is_assignable : public is_assignable{}; template struct is_assignable : public is_assignable{}; template struct is_assignable : public integral_constant{}; template struct is_assignable : public integral_constant{}; template struct is_assignable : public integral_constant{}; template struct is_assignable : public integral_constant{}; #else #include #include namespace boost{ // We don't know how to implement this: template struct is_assignable : public integral_constant{}; template struct is_assignable : public integral_constant::value && is_pod::type>::value>{}; template struct is_assignable : public integral_constant{}; template struct is_assignable : public integral_constant{}; template struct is_assignable : public integral_constant{}; template struct is_assignable : public integral_constant{}; template struct is_assignable : public integral_constant{}; /* template <> struct is_assignable : public integral_constant{}; template <> struct is_assignable : public integral_constant{}; template <> struct is_assignable : public integral_constant{}; template <> struct is_assignable : public integral_constant{}; */ #endif } // namespace boost #endif // BOOST_TT_IS_ASSIGNABLE_HPP_INCLUDED ================================================ FILE: benchmarks/boost/type_traits/is_base_and_derived.hpp ================================================ // (C) Copyright Rani Sharoni 2003. // Use, modification and distribution are subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt). // // See http://www.boost.org/libs/type_traits for most recent version including documentation. #ifndef BOOST_TT_IS_BASE_AND_DERIVED_HPP_INCLUDED #define BOOST_TT_IS_BASE_AND_DERIVED_HPP_INCLUDED #include #include #ifndef BOOST_IS_BASE_OF #include #include #include #include #include #endif #include #include namespace boost { namespace detail { #ifndef BOOST_IS_BASE_OF #if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x581)) \ && !BOOST_WORKAROUND(__SUNPRO_CC , <= 0x540) \ && !BOOST_WORKAROUND(__EDG_VERSION__, <= 243) \ && !BOOST_WORKAROUND(__DMC__, BOOST_TESTED_AT(0x840)) // The EDG version number is a lower estimate. // It is not currently known which EDG version // exactly fixes the problem. /************************************************************************* This version detects ambiguous base classes and private base classes correctly, and was devised by Rani Sharoni. Explanation by Terje Slettebo and Rani Sharoni. Let's take the multiple base class below as an example, and the following will also show why there's not a problem with private or ambiguous base class: struct B {}; struct B1 : B {}; struct B2 : B {}; struct D : private B1, private B2 {}; is_base_and_derived::value; First, some terminology: SC - Standard conversion UDC - User-defined conversion A user-defined conversion sequence consists of an SC, followed by an UDC, followed by another SC. Either SC may be the identity conversion. When passing the default-constructed Host object to the overloaded check_sig() functions (initialization 8.5/14/4/3), we have several viable implicit conversion sequences: For "static no_type check_sig(B const volatile *, int)" we have the conversion sequences: C -> C const (SC - Qualification Adjustment) -> B const volatile* (UDC) C -> D const volatile* (UDC) -> B1 const volatile* / B2 const volatile* -> B const volatile* (SC - Conversion) For "static yes_type check_sig(D const volatile *, T)" we have the conversion sequence: C -> D const volatile* (UDC) According to 13.3.3.1/4, in context of user-defined conversion only the standard conversion sequence is considered when selecting the best viable function, so it only considers up to the user-defined conversion. For the first function this means choosing between C -> C const and C -> C, and it chooses the latter, because it's a proper subset (13.3.3.2/3/2) of the former. Therefore, we have: C -> D const volatile* (UDC) -> B1 const volatile* / B2 const volatile* -> B const volatile* (SC - Conversion) C -> D const volatile* (UDC) Here, the principle of the "shortest subsequence" applies again, and it chooses C -> D const volatile*. This shows that it doesn't even need to consider the multiple paths to B, or accessibility, as that possibility is eliminated before it could possibly cause ambiguity or access violation. If D is not derived from B, it has to choose between C -> C const -> B const volatile* for the first function, and C -> D const volatile* for the second function, which are just as good (both requires a UDC, 13.3.3.2), had it not been for the fact that "static no_type check_sig(B const volatile *, int)" is not templated, which makes C -> C const -> B const volatile* the best choice (13.3.3/1/4), resulting in "no". Also, if Host::operator B const volatile* hadn't been const, the two conversion sequences for "static no_type check_sig(B const volatile *, int)", in the case where D is derived from B, would have been ambiguous. See also http://groups.google.com/groups?selm=df893da6.0301280859.522081f7%40posting. google.com and links therein. *************************************************************************/ template struct bd_helper { // // This VC7.1 specific workaround stops the compiler from generating // an internal compiler error when compiling with /vmg (thanks to // Aleksey Gurtovoy for figuring out the workaround). // #if !BOOST_WORKAROUND(BOOST_MSVC, == 1310) template static type_traits::yes_type check_sig(D const volatile *, T); static type_traits::no_type check_sig(B const volatile *, int); #else static type_traits::yes_type check_sig(D const volatile *, long); static type_traits::no_type check_sig(B const volatile * const&, int); #endif }; template struct is_base_and_derived_impl2 { #if BOOST_WORKAROUND(BOOST_MSVC_FULL_VER, >= 140050000) #pragma warning(push) #pragma warning(disable:6334) #endif // // May silently do the wrong thing with incomplete types // unless we trap them here: // BOOST_STATIC_ASSERT(sizeof(B) != 0); BOOST_STATIC_ASSERT(sizeof(D) != 0); struct Host { #if !BOOST_WORKAROUND(BOOST_MSVC, == 1310) operator B const volatile *() const; #else operator B const volatile * const&() const; #endif operator D const volatile *(); }; BOOST_STATIC_CONSTANT(bool, value = sizeof(bd_helper::check_sig(Host(), 0)) == sizeof(type_traits::yes_type)); #if BOOST_WORKAROUND(BOOST_MSVC_FULL_VER, >= 140050000) #pragma warning(pop) #endif }; #else // // broken version: // template struct is_base_and_derived_impl2 { BOOST_STATIC_CONSTANT(bool, value = (::boost::is_convertible::value)); }; #define BOOST_BROKEN_IS_BASE_AND_DERIVED #endif template struct is_base_and_derived_impl3 { BOOST_STATIC_CONSTANT(bool, value = false); }; template struct is_base_and_derived_select { template struct rebind { typedef is_base_and_derived_impl3 type; }; }; template <> struct is_base_and_derived_select { template struct rebind { typedef is_base_and_derived_impl2 type; }; }; template struct is_base_and_derived_impl { typedef typename remove_cv::type ncvB; typedef typename remove_cv::type ncvD; typedef is_base_and_derived_select< ::boost::is_class::value, ::boost::is_class::value, ::boost::is_same::value> selector; typedef typename selector::template rebind binder; typedef typename binder::type bound_type; BOOST_STATIC_CONSTANT(bool, value = bound_type::value); }; #else template struct is_base_and_derived_impl { typedef typename remove_cv::type ncvB; typedef typename remove_cv::type ncvD; BOOST_STATIC_CONSTANT(bool, value = (BOOST_IS_BASE_OF(B,D) && ! ::boost::is_same::value)); }; #endif } // namespace detail template struct is_base_and_derived : public integral_constant::value)> {}; template struct is_base_and_derived : public false_type{}; template struct is_base_and_derived : public false_type{}; template struct is_base_and_derived : public false_type{}; #if BOOST_WORKAROUND(__CODEGEARC__, BOOST_TESTED_AT(0x610)) template struct is_base_and_derived : public true_type{}; #endif } // namespace boost #endif // BOOST_TT_IS_BASE_AND_DERIVED_HPP_INCLUDED ================================================ FILE: benchmarks/boost/type_traits/is_class.hpp ================================================ // (C) Copyright Dave Abrahams, Steve Cleary, Beman Dawes, Howard // Hinnant & John Maddock 2000-2003. // Use, modification and distribution are subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt). // // See http://www.boost.org/libs/type_traits for most recent version including documentation. #ifndef BOOST_TT_IS_CLASS_HPP_INCLUDED #define BOOST_TT_IS_CLASS_HPP_INCLUDED #include #include #include #ifndef BOOST_IS_CLASS # include #ifdef BOOST_TT_HAS_CONFORMING_IS_CLASS_IMPLEMENTATION # include #else # include # include # include # include # include #endif #endif // BOOST_IS_CLASS namespace boost { namespace detail { #ifndef BOOST_IS_CLASS #ifdef BOOST_TT_HAS_CONFORMING_IS_CLASS_IMPLEMENTATION // This is actually the conforming implementation which works with // abstract classes. However, enough compilers have trouble with // it that most will use the one in // boost/type_traits/object_traits.hpp. This implementation // actually works with VC7.0, but other interactions seem to fail // when we use it. // is_class<> metafunction due to Paul Mensonides // (leavings@attbi.com). For more details: // http://groups.google.com/groups?hl=en&selm=000001c1cc83%24e154d5e0%247772e50c%40c161550a&rnum=1 #if defined(__GNUC__) && !defined(__EDG_VERSION__) template ::boost::type_traits::yes_type is_class_tester(void(U::*)(void)); template ::boost::type_traits::no_type is_class_tester(...); template struct is_class_impl { BOOST_STATIC_CONSTANT(bool, value = sizeof(is_class_tester(0)) == sizeof(::boost::type_traits::yes_type) && ! ::boost::is_union::value ); }; #else template struct is_class_impl { template static ::boost::type_traits::yes_type is_class_tester(void(U::*)(void)); template static ::boost::type_traits::no_type is_class_tester(...); BOOST_STATIC_CONSTANT(bool, value = sizeof(is_class_tester(0)) == sizeof(::boost::type_traits::yes_type) && ! ::boost::is_union::value ); }; #endif #else template struct is_class_impl { BOOST_STATIC_CONSTANT(bool, value = ! ::boost::is_union::value >::value && ! ::boost::is_scalar::value && ! ::boost::is_array::value && ! ::boost::is_reference::value && ! ::boost::is_void::value && ! ::boost::is_function::value ); }; # endif // BOOST_TT_HAS_CONFORMING_IS_CLASS_IMPLEMENTATION # else // BOOST_IS_CLASS template struct is_class_impl { BOOST_STATIC_CONSTANT(bool, value = BOOST_IS_CLASS(T)); }; # endif // BOOST_IS_CLASS } // namespace detail template struct is_class : public integral_constant::value> {}; # ifdef __EDG_VERSION__ template struct is_class : public is_class{}; template struct is_class : public is_class{}; template struct is_class : public is_class{}; # endif } // namespace boost #endif // BOOST_TT_IS_CLASS_HPP_INCLUDED ================================================ FILE: benchmarks/boost/type_traits/is_const.hpp ================================================ // (C) Copyright Dave Abrahams, Steve Cleary, Beman Dawes, // Howard Hinnant and John Maddock 2000. // (C) Copyright Mat Marcus, Jesse Jones and Adobe Systems Inc 2001 // Use, modification and distribution are subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt). // // See http://www.boost.org/libs/type_traits for most recent version including documentation. // Fixed is_pointer, is_reference, is_const, is_volatile, is_same, // is_member_pointer based on the Simulated Partial Specialization work // of Mat Marcus and Jesse Jones. See http://opensource.adobe.com or // http://groups.yahoo.com/group/boost/message/5441 // Some workarounds in here use ideas suggested from "Generic: // Mappings between Types and Values" // by Andrei Alexandrescu (see http://www.cuj.com/experts/1810/alexandr.html). #ifndef BOOST_TT_IS_CONST_HPP_INCLUDED #define BOOST_TT_IS_CONST_HPP_INCLUDED #include namespace boost { #if defined( __CODEGEARC__ ) template struct is_const : public integral_constant {}; #else template struct is_const : public false_type {}; template struct is_const : public true_type{}; template struct is_const : public true_type{}; template struct is_const : public true_type{}; #endif } // namespace boost #endif // BOOST_TT_IS_CONST_HPP_INCLUDED ================================================ FILE: benchmarks/boost/type_traits/is_convertible.hpp ================================================ // Copyright 2000 John Maddock (john@johnmaddock.co.uk) // Copyright 2000 Jeremy Siek (jsiek@lsc.nd.edu) // Copyright 1999, 2000 Jaakko Jarvi (jaakko.jarvi@cs.utu.fi) // // Use, modification and distribution are subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt). // // See http://www.boost.org/libs/type_traits for most recent version including documentation. #ifndef BOOST_TT_IS_CONVERTIBLE_HPP_INCLUDED #define BOOST_TT_IS_CONVERTIBLE_HPP_INCLUDED #include #include #ifndef BOOST_IS_CONVERTIBLE #include #include #include #include #include #if !defined(BOOST_NO_IS_ABSTRACT) #include #endif #include #include #include #if defined(__MWERKS__) #include #endif #if !defined(BOOST_NO_SFINAE_EXPR) && !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) # include #endif #elif defined(BOOST_MSVC) || defined(BOOST_INTEL) #include #include #endif // BOOST_IS_CONVERTIBLE namespace boost { #ifndef BOOST_IS_CONVERTIBLE // is one type convertible to another? // // there are multiple versions of the is_convertible // template, almost every compiler seems to require its // own version. // // Thanks to Andrei Alexandrescu for the original version of the // conversion detection technique! // namespace detail { #if !defined(BOOST_NO_SFINAE_EXPR) && !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && !(defined(BOOST_GCC) && (BOOST_GCC < 40700)) // This is a C++11 conforming version, place this first and use it wherever possible: # define BOOST_TT_CXX11_IS_CONVERTIBLE template struct or_helper { static const bool value = (A::value || B::value || C::value); }; template, boost::is_function, boost::is_array >::value> struct is_convertible_basic_impl { // Nothing converts to function or array, but void converts to void: static const bool value = is_void::value; }; template class is_convertible_basic_impl { typedef char one; typedef int two; template static void test_aux(To1); template static decltype(test_aux(boost::declval()), one()) test(int); template static two test(...); public: static const bool value = sizeof(test(0)) == 1; }; #elif defined(__BORLANDC__) && (__BORLANDC__ < 0x560) // // special version for Borland compilers // this version breaks when used for some // UDT conversions: // template struct is_convertible_impl { #pragma option push -w-8074 // This workaround for Borland breaks the EDG C++ frontend, // so we only use it for Borland. template struct checker { static ::boost::type_traits::no_type BOOST_TT_DECL _m_check(...); static ::boost::type_traits::yes_type BOOST_TT_DECL _m_check(T); }; static typename add_lvalue_reference::type _m_from; static bool const value = sizeof( checker::_m_check(_m_from) ) == sizeof(::boost::type_traits::yes_type); #pragma option pop }; #elif defined(__GNUC__) || defined(__BORLANDC__) && (__BORLANDC__ < 0x600) // special version for gcc compiler + recent Borland versions // note that this does not pass UDT's through (...) struct any_conversion { template any_conversion(const volatile T&); template any_conversion(const T&); template any_conversion(volatile T&); template any_conversion(T&); }; template struct checker { static boost::type_traits::no_type _m_check(any_conversion ...); static boost::type_traits::yes_type _m_check(T, int); }; template struct is_convertible_basic_impl { typedef typename add_lvalue_reference::type lvalue_type; typedef typename add_rvalue_reference::type rvalue_type; static lvalue_type _m_from; #if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ > 6))) static bool const value = sizeof( boost::detail::checker::_m_check(static_cast(_m_from), 0) ) == sizeof(::boost::type_traits::yes_type); #else static bool const value = sizeof( boost::detail::checker::_m_check(_m_from, 0) ) == sizeof(::boost::type_traits::yes_type); #endif }; #elif (defined(__EDG_VERSION__) && (__EDG_VERSION__ >= 245) && !defined(__ICL)) \ || defined(__IBMCPP__) || defined(__HP_aCC) // // This is *almost* an ideal world implementation as it doesn't rely // on undefined behaviour by passing UDT's through (...). // Unfortunately it doesn't quite pass all the tests for most compilers (sigh...) // Enable this for your compiler if is_convertible_test.cpp will compile it... // // Note we do not enable this for VC7.1, because even though it passes all the // type_traits tests it is known to cause problems when instantiation occurs // deep within the instantiation tree :-( // struct any_conversion { template any_conversion(const volatile T&); template any_conversion(const T&); template any_conversion(volatile T&); // we need this constructor to catch references to functions // (which can not be cv-qualified): template any_conversion(T&); }; template struct is_convertible_basic_impl { static ::boost::type_traits::no_type BOOST_TT_DECL _m_check(any_conversion ...); static ::boost::type_traits::yes_type BOOST_TT_DECL _m_check(To, int); typedef typename add_lvalue_reference::type lvalue_type; typedef typename add_rvalue_reference::type rvalue_type; static lvalue_type _m_from; #ifndef BOOST_NO_CXX11_RVALUE_REFERENCES BOOST_STATIC_CONSTANT(bool, value = sizeof( _m_check(static_cast(_m_from), 0) ) == sizeof(::boost::type_traits::yes_type) ); #else BOOST_STATIC_CONSTANT(bool, value = sizeof( _m_check(_m_from, 0) ) == sizeof(::boost::type_traits::yes_type) ); #endif }; #elif defined(__DMC__) struct any_conversion { template any_conversion(const volatile T&); template any_conversion(const T&); template any_conversion(volatile T&); // we need this constructor to catch references to functions // (which can not be cv-qualified): template any_conversion(T&); }; template struct is_convertible_basic_impl { // Using '...' doesn't always work on Digital Mars. This version seems to. template static ::boost::type_traits::no_type BOOST_TT_DECL _m_check(any_conversion, float, T); static ::boost::type_traits::yes_type BOOST_TT_DECL _m_check(To, int, int); typedef typename add_lvalue_reference::type lvalue_type; typedef typename add_rvalue_reference::type rvalue_type; static lvalue_type _m_from; // Static constants sometime cause the conversion of _m_from to To to be // called. This doesn't happen with an enum. #ifndef BOOST_NO_CXX11_RVALUE_REFERENCES enum { value = sizeof( _m_check(static_cast(_m_from), 0, 0) ) == sizeof(::boost::type_traits::yes_type) }; #else enum { value = sizeof( _m_check(_m_from, 0, 0) ) == sizeof(::boost::type_traits::yes_type) }; #endif }; #elif defined(__MWERKS__) // // CW works with the technique implemented above for EDG, except when From // is a function type (or a reference to such a type), in which case // any_conversion won't be accepted as a valid conversion. We detect this // exceptional situation and channel it through an alternative algorithm. // template struct is_convertible_basic_impl_aux; struct any_conversion { template any_conversion(const volatile T&); template any_conversion(const T&); template any_conversion(volatile T&); template any_conversion(T&); }; template struct is_convertible_basic_impl_aux { static ::boost::type_traits::no_type BOOST_TT_DECL _m_check(any_conversion ...); static ::boost::type_traits::yes_type BOOST_TT_DECL _m_check(To, int); typedef typename add_lvalue_reference::type lvalue_type; typedef typename add_rvalue_reference::type rvalue_type; static lvalue_type _m_from; #ifndef BOOST_NO_CXX11_RVALUE_REFERENCES BOOST_STATIC_CONSTANT(bool, value = sizeof( _m_check(static_cast(_m_from), 0) ) == sizeof(::boost::type_traits::yes_type) ); #else BOOST_STATIC_CONSTANT(bool, value = sizeof( _m_check(_m_from, 0) ) == sizeof(::boost::type_traits::yes_type) ); #endif }; template struct is_convertible_basic_impl_aux { static ::boost::type_traits::no_type BOOST_TT_DECL _m_check(...); static ::boost::type_traits::yes_type BOOST_TT_DECL _m_check(To); typedef typename add_lvalue_reference::type lvalue_type; typedef typename add_rvalue_reference::type rvalue_type; static lvalue_type _m_from; #ifndef BOOST_NO_CXX11_RVALUE_REFERENCES BOOST_STATIC_CONSTANT(bool, value = sizeof( _m_check(static_cast(_m_from)) ) == sizeof(::boost::type_traits::yes_type) ); #else BOOST_STATIC_CONSTANT(bool, value = sizeof( _m_check(_m_from) ) == sizeof(::boost::type_traits::yes_type) ); #endif }; template struct is_convertible_basic_impl: is_convertible_basic_impl_aux< From,To, ::boost::is_function::type>::value > {}; #else // // This version seems to work pretty well for a wide spectrum of compilers, // however it does rely on undefined behaviour by passing UDT's through (...). // //Workaround for old compilers like MSVC 7.1 to avoid //forming a reference to an array of unknown bound template struct is_convertible_basic_impl_add_lvalue_reference : add_lvalue_reference {}; template struct is_convertible_basic_impl_add_lvalue_reference { typedef From type []; }; template struct is_convertible_basic_impl { static ::boost::type_traits::no_type BOOST_TT_DECL _m_check(...); static ::boost::type_traits::yes_type BOOST_TT_DECL _m_check(To); typedef typename is_convertible_basic_impl_add_lvalue_reference::type lvalue_type; static lvalue_type _m_from; #ifdef BOOST_MSVC #pragma warning(push) #pragma warning(disable:4244) #if BOOST_WORKAROUND(BOOST_MSVC_FULL_VER, >= 140050000) #pragma warning(disable:6334) #endif #endif #ifndef BOOST_NO_CXX11_RVALUE_REFERENCES typedef typename add_rvalue_reference::type rvalue_type; BOOST_STATIC_CONSTANT(bool, value = sizeof( _m_check(static_cast(_m_from)) ) == sizeof(::boost::type_traits::yes_type) ); #else BOOST_STATIC_CONSTANT(bool, value = sizeof( _m_check(_m_from) ) == sizeof(::boost::type_traits::yes_type) ); #endif #ifdef BOOST_MSVC #pragma warning(pop) #endif }; #endif // is_convertible_impl #if defined(__DMC__) // As before, a static constant sometimes causes errors on Digital Mars. template struct is_convertible_impl { enum { value = ( ::boost::detail::is_convertible_basic_impl::value && ! ::boost::is_array::value && ! ::boost::is_function::value) }; }; #elif !defined(__BORLANDC__) || __BORLANDC__ > 0x551 template struct is_convertible_impl { BOOST_STATIC_CONSTANT(bool, value = ( ::boost::detail::is_convertible_basic_impl::value && !::boost::is_array::value && !::boost::is_function::value)); }; #endif template struct is_convertible_impl_select { template struct rebind { typedef is_convertible_impl type; }; }; template <> struct is_convertible_impl_select { template struct rebind { typedef true_type type; }; }; template <> struct is_convertible_impl_select { template struct rebind { typedef false_type type; }; }; template <> struct is_convertible_impl_select { template struct rebind { typedef false_type type; }; }; template struct is_convertible_impl_dispatch_base { #if !BOOST_WORKAROUND(__HP_aCC, < 60700) typedef is_convertible_impl_select< ::boost::is_arithmetic::value, ::boost::is_arithmetic::value, #if !defined(BOOST_NO_IS_ABSTRACT) && !defined(BOOST_TT_CXX11_IS_CONVERTIBLE) // We need to filter out abstract types, only if we don't have a strictly conforming C++11 version: ::boost::is_abstract::value #else false #endif > selector; #else typedef is_convertible_impl_select selector; #endif typedef typename selector::template rebind isc_binder; typedef typename isc_binder::type type; }; template struct is_convertible_impl_dispatch : public is_convertible_impl_dispatch_base::type {}; // // Now add the full and partial specialisations // for void types, these are common to all the // implementation above: // #ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS template <> struct is_convertible_impl_dispatch : public true_type{}; template <> struct is_convertible_impl_dispatch : public true_type{}; template <> struct is_convertible_impl_dispatch : public true_type{}; template <> struct is_convertible_impl_dispatch : public true_type{}; template <> struct is_convertible_impl_dispatch : public true_type{}; template <> struct is_convertible_impl_dispatch : public true_type{}; template <> struct is_convertible_impl_dispatch : public true_type{}; template <> struct is_convertible_impl_dispatch : public true_type{}; template <> struct is_convertible_impl_dispatch : public true_type{}; template <> struct is_convertible_impl_dispatch : public true_type{}; template <> struct is_convertible_impl_dispatch : public true_type{}; template <> struct is_convertible_impl_dispatch : public true_type{}; template <> struct is_convertible_impl_dispatch : public true_type{}; template <> struct is_convertible_impl_dispatch : public true_type{}; template <> struct is_convertible_impl_dispatch : public true_type{}; template <> struct is_convertible_impl_dispatch : public true_type{}; #else template <> struct is_convertible_impl_dispatch : public true_type{}; #endif // BOOST_NO_CV_VOID_SPECIALIZATIONS template struct is_convertible_impl_dispatch : public false_type{}; template struct is_convertible_impl_dispatch : public false_type{}; #ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS template struct is_convertible_impl_dispatch : public false_type{}; template struct is_convertible_impl_dispatch : public false_type{}; template struct is_convertible_impl_dispatch : public false_type{}; template struct is_convertible_impl_dispatch : public false_type{}; template struct is_convertible_impl_dispatch : public false_type{}; template struct is_convertible_impl_dispatch : public false_type{}; #endif } // namespace detail template struct is_convertible : public integral_constant::value> {}; #else template struct is_convertible : public integral_constant {}; #endif } // namespace boost #endif // BOOST_TT_IS_CONVERTIBLE_HPP_INCLUDED ================================================ FILE: benchmarks/boost/type_traits/is_destructible.hpp ================================================ // (C) Copyright John Maddock 2015. // Use, modification and distribution are subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt). // // See http://www.boost.org/libs/type_traits for most recent version including documentation. #ifndef BOOST_TT_IS_DESTRUCTIBLE_HPP_INCLUDED #define BOOST_TT_IS_DESTRUCTIBLE_HPP_INCLUDED #include #include #if !defined(BOOST_NO_CXX11_DECLTYPE) && !BOOST_WORKAROUND(BOOST_MSVC, < 1800) #include #include namespace boost{ namespace detail{ struct is_destructible_imp { template().~T())> static boost::type_traits::yes_type test(int); template static boost::type_traits::no_type test(...); }; } template struct is_destructible : public integral_constant(0)) == sizeof(boost::type_traits::yes_type)>{}; #else #include #include namespace boost{ // We don't know how to implement this: template struct is_destructible : public integral_constant::value || is_class::value>{}; #endif template <> struct is_destructible : public false_type{}; template <> struct is_destructible : public false_type{}; template <> struct is_destructible : public false_type{}; template <> struct is_destructible : public false_type{}; template struct is_destructible : public is_destructible{}; #ifndef BOOST_NO_CXX11_RVALUE_REFERENCES template struct is_destructible : public is_destructible{}; #endif template struct is_destructible : public is_destructible{}; template struct is_destructible : public is_destructible{}; } // namespace boost #endif // BOOST_TT_IS_DESTRUCTIBLE_HPP_INCLUDED ================================================ FILE: benchmarks/boost/type_traits/is_enum.hpp ================================================ // (C) Copyright Dave Abrahams, Steve Cleary, Beman Dawes, Howard // Hinnant & John Maddock 2000. // Use, modification and distribution are subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt). // // See http://www.boost.org/libs/type_traits for most recent version including documentation. #ifndef BOOST_TT_IS_ENUM_HPP_INCLUDED #define BOOST_TT_IS_ENUM_HPP_INCLUDED #include #include #ifndef BOOST_IS_ENUM #include #include #include #include #include #ifdef __GNUC__ #include #endif #include #if defined(BOOST_TT_HAS_CONFORMING_IS_CLASS_IMPLEMENTATION) # include # include #endif #endif namespace boost { #ifndef BOOST_IS_ENUM #if !(defined(__BORLANDC__) && (__BORLANDC__ <= 0x551)) namespace detail { #if defined(BOOST_TT_HAS_CONFORMING_IS_CLASS_IMPLEMENTATION) template struct is_class_or_union { BOOST_STATIC_CONSTANT(bool, value = ::boost::is_class::value || ::boost::is_union::value); }; #else template struct is_class_or_union { # if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x581))// we simply can't detect it this way. BOOST_STATIC_CONSTANT(bool, value = false); # else template static ::boost::type_traits::yes_type is_class_or_union_tester(void(U::*)(void)); # if BOOST_WORKAROUND(__MWERKS__, <= 0x3000) // no SFINAE static ::boost::type_traits::no_type is_class_or_union_tester(...); BOOST_STATIC_CONSTANT( bool, value = sizeof(is_class_or_union_tester(0)) == sizeof(::boost::type_traits::yes_type)); # else template static ::boost::type_traits::no_type is_class_or_union_tester(...); BOOST_STATIC_CONSTANT( bool, value = sizeof(is_class_or_union_tester(0)) == sizeof(::boost::type_traits::yes_type)); # endif # endif }; #endif struct int_convertible { int_convertible(int); }; // Don't evaluate convertibility to int_convertible unless the type // is non-arithmetic. This suppresses warnings with GCC. template struct is_enum_helper { template struct type { BOOST_STATIC_CONSTANT(bool, value = false); }; }; template <> struct is_enum_helper { template struct type { static const bool value = ::boost::is_convertible::type, ::boost::detail::int_convertible>::value; }; }; template struct is_enum_impl { //typedef ::boost::add_reference ar_t; //typedef typename ar_t::type r_type; #if defined(__GNUC__) #ifdef BOOST_TT_HAS_CONFORMING_IS_CLASS_IMPLEMENTATION // We MUST check for is_class_or_union on conforming compilers in // order to correctly deduce that noncopyable types are not enums // (dwa 2002/04/15)... BOOST_STATIC_CONSTANT(bool, selector = ::boost::is_arithmetic::value || ::boost::is_reference::value || ::boost::is_function::value || is_class_or_union::value || is_array::value); #else // ...however, not checking is_class_or_union on non-conforming // compilers prevents a dependency recursion. BOOST_STATIC_CONSTANT(bool, selector = ::boost::is_arithmetic::value || ::boost::is_reference::value || ::boost::is_function::value || is_array::value); #endif // BOOST_TT_HAS_CONFORMING_IS_CLASS_IMPLEMENTATION #else // !defined(__GNUC__): BOOST_STATIC_CONSTANT(bool, selector = ::boost::is_arithmetic::value || ::boost::is_reference::value || is_class_or_union::value || is_array::value); #endif #if BOOST_WORKAROUND(__BORLANDC__, < 0x600) typedef ::boost::detail::is_enum_helper< ::boost::detail::is_enum_impl::selector > se_t; #else typedef ::boost::detail::is_enum_helper se_t; #endif typedef typename se_t::template type helper; BOOST_STATIC_CONSTANT(bool, value = helper::value); }; } // namespace detail template struct is_enum : public integral_constant::value> {}; #else // __BORLANDC__ // // buggy is_convertible prevents working // implementation of is_enum: template struct is_enum : public integral_constant {}; #endif #else // BOOST_IS_ENUM template struct is_enum : public integral_constant {}; #endif } // namespace boost #endif // BOOST_TT_IS_ENUM_HPP_INCLUDED ================================================ FILE: benchmarks/boost/type_traits/is_floating_point.hpp ================================================ // (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000-2005. // Use, modification and distribution are subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt). // // See http://www.boost.org/libs/type_traits for most recent version including documentation. #ifndef BOOST_TYPE_TRAITS_IS_FLOATING_HPP_INCLUDED #define BOOST_TYPE_TRAITS_IS_FLOATING_HPP_INCLUDED #include namespace boost { //* is a type T a floating-point type described in the standard (3.9.1p8) template struct is_floating_point : public false_type{}; template struct is_floating_point : public is_floating_point{}; template struct is_floating_point : public is_floating_point{}; template struct is_floating_point : public is_floating_point{}; template<> struct is_floating_point : public true_type{}; template<> struct is_floating_point : public true_type{}; template<> struct is_floating_point : public true_type{}; #if defined(BOOST_HAS_FLOAT128) template<> struct is_floating_point<__float128> : public true_type{}; #endif } // namespace boost #endif // BOOST_TYPE_TRAITS_IS_FLOAT_HPP_INCLUDED ================================================ FILE: benchmarks/boost/type_traits/is_function.hpp ================================================ // Copyright 2000 John Maddock (john@johnmaddock.co.uk) // Copyright 2002 Aleksey Gurtovoy (agurtovoy@meta-comm.com) // // Use, modification and distribution are subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt). // // See http://www.boost.org/libs/type_traits for most recent version including documentation. #ifndef BOOST_TT_IS_FUNCTION_HPP_INCLUDED #define BOOST_TT_IS_FUNCTION_HPP_INCLUDED #include #include #if !defined(BOOST_TT_TEST_MS_FUNC_SIGS) # include #else # include # include #endif // is a type a function? // Please note that this implementation is unnecessarily complex: // we could just use !is_convertible::value, // except that some compilers erroneously allow conversions from // function pointers to void*. namespace boost { #if !defined( __CODEGEARC__ ) namespace detail { #if !defined(BOOST_TT_TEST_MS_FUNC_SIGS) template struct is_function_chooser { template< typename T > struct result_ : public false_type {}; }; template <> struct is_function_chooser { template< typename T > struct result_ : public ::boost::type_traits::is_function_ptr_helper {}; }; template struct is_function_impl : public is_function_chooser< ::boost::is_reference::value > ::BOOST_NESTED_TEMPLATE result_ { }; #else template struct is_function_impl { #if BOOST_WORKAROUND(BOOST_MSVC_FULL_VER, >= 140050000) #pragma warning(push) #pragma warning(disable:6334) #endif static T* t; BOOST_STATIC_CONSTANT( bool, value = sizeof(::boost::type_traits::is_function_ptr_tester(t)) == sizeof(::boost::type_traits::yes_type) ); #if BOOST_WORKAROUND(BOOST_MSVC_FULL_VER, >= 140050000) #pragma warning(pop) #endif }; template struct is_function_impl : public false_type {}; #ifndef BOOST_NO_CXX11_RVALUE_REFERENCES template struct is_function_impl : public false_type {}; #endif #endif } // namespace detail #endif // !defined( __CODEGEARC__ ) #if defined( __CODEGEARC__ ) template struct is_function : integral_constant {}; #else template struct is_function : integral_constant::value> {}; #ifndef BOOST_NO_CXX11_RVALUE_REFERENCES template struct is_function : public false_type {}; #endif #endif } // namespace boost #endif // BOOST_TT_IS_FUNCTION_HPP_INCLUDED ================================================ FILE: benchmarks/boost/type_traits/is_integral.hpp ================================================ // (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000. // Use, modification and distribution are subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt). // // See http://www.boost.org/libs/type_traits for most recent version including documentation. #ifndef BOOST_TT_IS_INTEGRAL_HPP_INCLUDED #define BOOST_TT_IS_INTEGRAL_HPP_INCLUDED #include #include namespace boost { #if defined( __CODEGEARC__ ) template struct is_integral : public integral_constant {}; #else template struct is_integral : public false_type {}; template struct is_integral : public is_integral {}; template struct is_integral : public is_integral{}; template struct is_integral : public is_integral{}; //* is a type T an [cv-qualified-] integral type described in the standard (3.9.1p3) // as an extension we include long long, as this is likely to be added to the // standard at a later date template<> struct is_integral : public true_type {}; template<> struct is_integral : public true_type{}; template<> struct is_integral : public true_type{}; template<> struct is_integral : public true_type{}; template<> struct is_integral : public true_type{}; template<> struct is_integral : public true_type{}; template<> struct is_integral : public true_type{}; template<> struct is_integral : public true_type{}; template<> struct is_integral : public true_type{}; template<> struct is_integral : public true_type{}; #ifndef BOOST_NO_INTRINSIC_WCHAR_T // If the following line fails to compile and you're using the Intel // compiler, see http://lists.boost.org/MailArchives/boost-users/msg06567.php, // and define BOOST_NO_INTRINSIC_WCHAR_T on the command line. template<> struct is_integral : public true_type{}; #endif // Same set of integral types as in boost/type_traits/integral_promotion.hpp. // Please, keep in sync. -- Alexander Nasonov #if (defined(BOOST_INTEL_CXX_VERSION) && defined(_MSC_VER) && (BOOST_INTEL_CXX_VERSION <= 600)) \ || (defined(__BORLANDC__) && (__BORLANDC__ == 0x600) && (_MSC_VER < 1300)) template<> struct is_integral : public true_type{}; template<> struct is_integral : public true_type{}; template<> struct is_integral : public true_type{}; template<> struct is_integral<__int8> : public true_type{}; template<> struct is_integral<__int16> : public true_type{}; template<> struct is_integral<__int32> : public true_type{}; #ifdef __BORLANDC__ template<> struct is_integral : public true_type{}; template<> struct is_integral<__int64> : public true_type{}; #endif #endif # if defined(BOOST_HAS_LONG_LONG) template<> struct is_integral< ::boost::ulong_long_type> : public true_type{}; template<> struct is_integral< ::boost::long_long_type> : public true_type{}; #elif defined(BOOST_HAS_MS_INT64) template<> struct is_integral : public true_type{}; template<> struct is_integral<__int64> : public true_type{}; #endif #ifdef BOOST_HAS_INT128 template<> struct is_integral : public true_type{}; template<> struct is_integral : public true_type{}; #endif #ifndef BOOST_NO_CXX11_CHAR16_T template<> struct is_integral : public true_type{}; #endif #ifndef BOOST_NO_CXX11_CHAR32_T template<> struct is_integral : public true_type{}; #endif #endif // non-CodeGear implementation } // namespace boost #endif // BOOST_TT_IS_INTEGRAL_HPP_INCLUDED ================================================ FILE: benchmarks/boost/type_traits/is_lvalue_reference.hpp ================================================ // (C) Copyright Dave Abrahams, Steve Cleary, Beman Dawes, // Howard Hinnant and John Maddock 2000. // (C) Copyright Mat Marcus, Jesse Jones and Adobe Systems Inc 2001 // Use, modification and distribution are subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt). // // See http://www.boost.org/libs/type_traits for most recent version including documentation. // Fixed is_pointer, is_lvalue_reference, is_const, is_volatile, is_same, // is_member_pointer based on the Simulated Partial Specialization work // of Mat Marcus and Jesse Jones. See http://opensource.adobe.com or // http://groups.yahoo.com/group/boost/message/5441 // Some workarounds in here use ideas suggested from "Generic: // Mappings between Types and Values" // by Andrei Alexandrescu (see http://www.cuj.com/experts/1810/alexandr.html). #ifndef BOOST_TT_IS_LVALUE_REFERENCE_HPP_INCLUDED #define BOOST_TT_IS_LVALUE_REFERENCE_HPP_INCLUDED #include namespace boost { #if defined( __CODEGEARC__ ) template struct is_lvalue_reference : public integral_constant{}; #else template struct is_lvalue_reference : public false_type{}; template struct is_lvalue_reference : public true_type{}; #if defined(BOOST_ILLEGAL_CV_REFERENCES) // these are illegal specialisations; cv-qualifies applied to // references have no effect according to [8.3.2p1], // C++ Builder requires them though as it treats cv-qualified // references as distinct types... template struct is_lvalue_reference : public true_type{}; template struct is_lvalue_reference : public true_type{}; template struct is_lvalue_reference : public true_type{}; #endif #endif } // namespace boost #endif // BOOST_TT_IS_REFERENCE_HPP_INCLUDED ================================================ FILE: benchmarks/boost/type_traits/is_member_function_pointer.hpp ================================================ // (C) Copyright Dave Abrahams, Steve Cleary, Beman Dawes, Howard // Hinnant & John Maddock 2000. // Use, modification and distribution are subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt). // // See http://www.boost.org/libs/type_traits for most recent version including documentation. #ifndef BOOST_TT_IS_MEMBER_FUNCTION_POINTER_HPP_INCLUDED #define BOOST_TT_IS_MEMBER_FUNCTION_POINTER_HPP_INCLUDED #include #include #if !BOOST_WORKAROUND(__BORLANDC__, < 0x600) && !defined(BOOST_TT_TEST_MS_FUNC_SIGS) // // Note: we use the "workaround" version for MSVC because it works for // __stdcall etc function types, where as the partial specialisation // version does not do so. // # include # include # include #else # include # include # include # include #endif namespace boost { #if defined( __CODEGEARC__ ) template struct is_member_function_pointer : public integral_constant {}; #elif !BOOST_WORKAROUND(__BORLANDC__, < 0x600) && !defined(BOOST_TT_TEST_MS_FUNC_SIGS) template struct is_member_function_pointer : public ::boost::integral_constant::type>::value>{}; #else namespace detail { #ifndef __BORLANDC__ template struct is_mem_fun_pointer_select { template struct result_ : public false_type{}; }; template <> struct is_mem_fun_pointer_select { template struct result_ { #if BOOST_WORKAROUND(BOOST_MSVC_FULL_VER, >= 140050000) #pragma warning(push) #pragma warning(disable:6334) #endif static T* make_t; typedef result_ self_type; BOOST_STATIC_CONSTANT( bool, value = ( 1 == sizeof(::boost::type_traits::is_mem_fun_pointer_tester(self_type::make_t)) )); #if BOOST_WORKAROUND(BOOST_MSVC_FULL_VER, >= 140050000) #pragma warning(pop) #endif }; }; template struct is_member_function_pointer_impl : public is_mem_fun_pointer_select< ::boost::is_reference::value || ::boost::is_array::value>::template result_{}; template struct is_member_function_pointer_impl : public false_type{}; #else // Borland C++ template struct is_member_function_pointer_impl { static T* m_t; BOOST_STATIC_CONSTANT( bool, value = (1 == sizeof(type_traits::is_mem_fun_pointer_tester(m_t))) ); }; template struct is_member_function_pointer_impl { BOOST_STATIC_CONSTANT(bool, value = false); }; #endif template<> struct is_member_function_pointer_impl : public false_type{}; #ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS template<> struct is_member_function_pointer_impl : public false_type{}; template<> struct is_member_function_pointer_impl : public false_type{}; template<> struct is_member_function_pointer_impl : public false_type{}; #endif } // namespace detail template struct is_member_function_pointer : public integral_constant::value>{}; #endif } // namespace boost #endif // BOOST_TT_IS_MEMBER_FUNCTION_POINTER_HPP_INCLUDED ================================================ FILE: benchmarks/boost/type_traits/is_member_pointer.hpp ================================================ // (C) Copyright Dave Abrahams, Steve Cleary, Beman Dawes, // Howard Hinnant and John Maddock 2000. // (C) Copyright Mat Marcus, Jesse Jones and Adobe Systems Inc 2001 // Use, modification and distribution are subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt). // // See http://www.boost.org/libs/type_traits for most recent version including documentation. // Fixed is_pointer, is_reference, is_const, is_volatile, is_same, // is_member_pointer based on the Simulated Partial Specialization work // of Mat Marcus and Jesse Jones. See http://opensource.adobe.com or // http://groups.yahoo.com/group/boost/message/5441 // Some workarounds in here use ideas suggested from "Generic: // Mappings between Types and Values" // by Andrei Alexandrescu (see http://www.cuj.com/experts/1810/alexandr.html). #ifndef BOOST_TT_IS_MEMBER_POINTER_HPP_INCLUDED #define BOOST_TT_IS_MEMBER_POINTER_HPP_INCLUDED #include #include namespace boost { #if defined( __CODEGEARC__ ) template struct is_member_pointer : public integral_constant{}; #else template struct is_member_pointer : public integral_constant::value>{}; template struct is_member_pointer : public true_type{}; #if !BOOST_WORKAROUND(__MWERKS__,<=0x3003) && !BOOST_WORKAROUND(__IBMCPP__, <=600) template struct is_member_pointer : public true_type{}; template struct is_member_pointer : public true_type{}; template struct is_member_pointer : public true_type{}; #endif #endif } // namespace boost #endif // BOOST_TT_IS_MEMBER_POINTER_HPP_INCLUDED ================================================ FILE: benchmarks/boost/type_traits/is_pod.hpp ================================================ // (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000. // Use, modification and distribution are subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt). // // See http://www.boost.org/libs/type_traits for most recent version including documentation. #ifndef BOOST_TT_IS_POD_HPP_INCLUDED #define BOOST_TT_IS_POD_HPP_INCLUDED #include #include #include #include #ifdef __SUNPRO_CC #include #endif #include #ifndef BOOST_IS_POD #define BOOST_INTERNAL_IS_POD(T) false #else #define BOOST_INTERNAL_IS_POD(T) BOOST_IS_POD(T) #endif namespace boost { // forward declaration, needed by 'is_pod_array_helper' template below template< typename T > struct is_POD; template struct is_pod : public integral_constant::value || ::boost::is_void::value || BOOST_INTERNAL_IS_POD(T)> {}; #if !defined(BOOST_NO_ARRAY_TYPE_SPECIALIZATIONS) template struct is_pod : public is_pod{}; #endif // the following help compilers without partial specialization support: template<> struct is_pod : public true_type{}; #ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS template<> struct is_pod : public true_type{}; template<> struct is_pod : public true_type{}; template<> struct is_pod : public true_type{}; #endif template struct is_POD : public is_pod{}; } // namespace boost #undef BOOST_INTERNAL_IS_POD #endif // BOOST_TT_IS_POD_HPP_INCLUDED ================================================ FILE: benchmarks/boost/type_traits/is_pointer.hpp ================================================ // (C) Copyright Dave Abrahams, Steve Cleary, Beman Dawes, // Howard Hinnant and John Maddock 2000. // (C) Copyright Mat Marcus, Jesse Jones and Adobe Systems Inc 2001 // Use, modification and distribution are subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt). // // See http://www.boost.org/libs/type_traits for most recent version including documentation. // Fixed is_pointer, is_reference, is_const, is_volatile, is_same, // is_member_pointer based on the Simulated Partial Specialization work // of Mat Marcus and Jesse Jones. See http://opensource.adobe.com or // http://groups.yahoo.com/group/boost/message/5441 // Some workarounds in here use ideas suggested from "Generic: // Mappings between Types and Values" // by Andrei Alexandrescu (see http://www.cuj.com/experts/1810/alexandr.html). #ifndef BOOST_TT_IS_POINTER_HPP_INCLUDED #define BOOST_TT_IS_POINTER_HPP_INCLUDED #include namespace boost { #if defined( __CODEGEARC__ ) template struct is_pointer : public integral_constant{}; #else template struct is_pointer : public false_type{}; template struct is_pointer : public true_type{}; template struct is_pointer : public true_type{}; template struct is_pointer : public true_type{}; template struct is_pointer : public true_type{}; #ifdef BOOST_MSVC template struct is_pointer : public is_pointer{}; template struct is_pointer : public is_pointer{}; template struct is_pointer : public is_pointer{}; #endif #endif } // namespace boost #endif // BOOST_TT_IS_POINTER_HPP_INCLUDED ================================================ FILE: benchmarks/boost/type_traits/is_polymorphic.hpp ================================================ // (C) Copyright John Maddock 2000. // Use, modification and distribution are subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt). // // See http://www.boost.org/libs/type_traits for most recent version including documentation. #ifndef BOOST_TT_IS_POLYMORPHIC_HPP #define BOOST_TT_IS_POLYMORPHIC_HPP #include #include #ifndef BOOST_IS_POLYMORPHIC #include #endif #include #if defined(BOOST_MSVC) && (BOOST_MSVC >= 1700) #pragma warning(push) #pragma warning(disable:4250) #endif namespace boost{ #ifndef BOOST_IS_POLYMORPHIC namespace detail{ template struct is_polymorphic_imp1 { # if BOOST_WORKAROUND(__MWERKS__, <= 0x2407) // CWPro7 should return false always. typedef char d1, (&d2)[2]; # else struct d1 : public T { d1(); # if !defined(__GNUC__) // this raises warnings with some classes, and buys nothing with GCC ~d1()throw(); # endif char padding[256]; private: // keep some picky compilers happy: d1(const d1&); d1& operator=(const d1&); }; struct d2 : public T { d2(); virtual ~d2()throw(); # if !defined(BOOST_MSVC) && !defined(__ICL) // for some reason this messes up VC++ when T has virtual bases, // probably likewise for compilers that use the same ABI: struct unique{}; virtual void unique_name_to_boost5487629(unique*); # endif char padding[256]; private: // keep some picky compilers happy: d2(const d2&); d2& operator=(const d2&); }; # endif BOOST_STATIC_CONSTANT(bool, value = (sizeof(d2) == sizeof(d1))); }; template struct is_polymorphic_imp1 : public is_polymorphic_imp1{}; template struct is_polymorphic_imp1 : public is_polymorphic_imp1{}; template struct is_polymorphic_imp1 : public is_polymorphic_imp1{}; template struct is_polymorphic_imp2 { BOOST_STATIC_CONSTANT(bool, value = false); }; template struct is_polymorphic_selector { template struct rebind { typedef is_polymorphic_imp2 type; }; }; template <> struct is_polymorphic_selector { template struct rebind { typedef is_polymorphic_imp1 type; }; }; template struct is_polymorphic_imp { typedef is_polymorphic_selector< ::boost::is_class::value> selector; typedef typename selector::template rebind binder; typedef typename binder::type imp_type; BOOST_STATIC_CONSTANT(bool, value = imp_type::value); }; } // namespace detail template struct is_polymorphic : public integral_constant::value> {}; #else // BOOST_IS_POLYMORPHIC template struct is_polymorphic : public integral_constant {}; #endif } // namespace boost #if defined(BOOST_MSVC) && (BOOST_MSVC >= 1700) #pragma warning(pop) #endif #endif ================================================ FILE: benchmarks/boost/type_traits/is_reference.hpp ================================================ // (C) Copyright Dave Abrahams, Steve Cleary, Beman Dawes, // Howard Hinnant and John Maddock 2000, 2010. // (C) Copyright Mat Marcus, Jesse Jones and Adobe Systems Inc 2001 // Use, modification and distribution are subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt). // // See http://www.boost.org/libs/type_traits for most recent version including documentation. #ifndef BOOST_TT_IS_REFERENCE_HPP_INCLUDED #define BOOST_TT_IS_REFERENCE_HPP_INCLUDED #include #include namespace boost { template struct is_reference : public integral_constant< bool, ::boost::is_lvalue_reference::value || ::boost::is_rvalue_reference::value> {}; } // namespace boost #endif // BOOST_TT_IS_REFERENCE_HPP_INCLUDED ================================================ FILE: benchmarks/boost/type_traits/is_rvalue_reference.hpp ================================================ // (C) John Maddock 2010. // Use, modification and distribution are subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt). // // See http://www.boost.org/libs/type_traits for most recent version including documentation. #ifndef BOOST_TT_IS_RVALUE_REFERENCE_HPP_INCLUDED #define BOOST_TT_IS_RVALUE_REFERENCE_HPP_INCLUDED #include #include namespace boost { template struct is_rvalue_reference : public false_type {}; #ifndef BOOST_NO_CXX11_RVALUE_REFERENCES template struct is_rvalue_reference : public true_type {}; #endif } // namespace boost #endif // BOOST_TT_IS_REFERENCE_HPP_INCLUDED ================================================ FILE: benchmarks/boost/type_traits/is_same.hpp ================================================ // (C) Copyright Dave Abrahams, Steve Cleary, Beman Dawes, // Howard Hinnant and John Maddock 2000. // (C) Copyright Mat Marcus, Jesse Jones and Adobe Systems Inc 2001 // Use, modification and distribution are subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt). // // See http://www.boost.org/libs/type_traits for most recent version including documentation. // Fixed is_pointer, is_reference, is_const, is_volatile, is_same, // is_member_pointer based on the Simulated Partial Specialization work // of Mat Marcus and Jesse Jones. See http://opensource.adobe.com or // http://groups.yahoo.com/group/boost/message/5441 // Some workarounds in here use ideas suggested from "Generic: // Mappings between Types and Values" // by Andrei Alexandrescu (see http://www.cuj.com/experts/1810/alexandr.html). #ifndef BOOST_TT_IS_SAME_HPP_INCLUDED #define BOOST_TT_IS_SAME_HPP_INCLUDED #include namespace boost { template struct is_same : public false_type {}; template struct is_same : public true_type {}; #if BOOST_WORKAROUND(__BORLANDC__, < 0x600) // without this, Borland's compiler gives the wrong answer for // references to arrays: template struct is_same : public true_type{}; #endif } // namespace boost #endif // BOOST_TT_IS_SAME_HPP_INCLUDED ================================================ FILE: benchmarks/boost/type_traits/is_scalar.hpp ================================================ // (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000. // Use, modification and distribution are subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt). // // See http://www.boost.org/libs/type_traits for most recent version including documentation. #ifndef BOOST_TT_IS_SCALAR_HPP_INCLUDED #define BOOST_TT_IS_SCALAR_HPP_INCLUDED #include #include #include #include #include namespace boost { template struct is_scalar : public integral_constant::value || ::boost::is_enum::value || ::boost::is_pointer::value || ::boost::is_member_pointer::value> {}; } // namespace boost #endif // BOOST_TT_IS_SCALAR_HPP_INCLUDED ================================================ FILE: benchmarks/boost/type_traits/is_signed.hpp ================================================ // (C) Copyright John Maddock 2005. // Use, modification and distribution are subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt). // // See http://www.boost.org/libs/type_traits for most recent version including documentation. #ifndef BOOST_TT_IS_SIGNED_HPP_INCLUDED #define BOOST_TT_IS_SIGNED_HPP_INCLUDED #include #include #include #include namespace boost { #if !defined( __CODEGEARC__ ) #if !(defined(BOOST_MSVC) && BOOST_MSVC <= 1310) && \ !(defined(__EDG_VERSION__) && __EDG_VERSION__ <= 238) &&\ !defined(BOOST_NO_INCLASS_MEMBER_INITIALIZATION) namespace detail{ template struct is_signed_values { // // Note that we cannot use BOOST_STATIC_CONSTANT here, using enum's // rather than "real" static constants simply doesn't work or give // the correct answer. // typedef typename remove_cv::type no_cv_t; static const no_cv_t minus_one = (static_cast(-1)); static const no_cv_t zero = (static_cast(0)); }; template struct is_signed_helper { typedef typename remove_cv::type no_cv_t; BOOST_STATIC_CONSTANT(bool, value = (!(::boost::detail::is_signed_values::minus_one > boost::detail::is_signed_values::zero))); }; template struct is_signed_select_helper { template struct rebind { typedef is_signed_helper type; }; }; template <> struct is_signed_select_helper { template struct rebind { typedef false_type type; }; }; template struct is_signed_impl { typedef ::boost::detail::is_signed_select_helper< ::boost::is_integral::value || ::boost::is_enum::value> selector; typedef typename selector::template rebind binder; typedef typename binder::type type; BOOST_STATIC_CONSTANT(bool, value = type::value); }; } template struct is_signed : public integral_constant::value> {}; #else template struct is_signed : public false_type{}; #endif #else //defined( __CODEGEARC__ ) template struct is_signed : public integral_constant{}; #endif template <> struct is_signed : public true_type{}; template <> struct is_signed : public true_type{}; template <> struct is_signed : public true_type{}; template <> struct is_signed : public true_type{}; template <> struct is_signed : public true_type{}; template <> struct is_signed : public true_type{}; template <> struct is_signed : public true_type{}; template <> struct is_signed : public true_type{}; template <> struct is_signed : public true_type{}; template <> struct is_signed : public true_type{}; template <> struct is_signed : public true_type{}; template <> struct is_signed : public true_type{}; template <> struct is_signed : public true_type{}; template <> struct is_signed : public true_type{}; template <> struct is_signed : public true_type{}; template <> struct is_signed : public true_type{}; template <> struct is_signed : public false_type{}; template <> struct is_signed : public false_type{}; template <> struct is_signed : public false_type{}; template <> struct is_signed : public false_type{}; template <> struct is_signed : public false_type{}; template <> struct is_signed : public false_type{}; template <> struct is_signed : public false_type{}; template <> struct is_signed : public false_type{}; template <> struct is_signed : public false_type{}; template <> struct is_signed : public false_type{}; template <> struct is_signed : public false_type{}; template <> struct is_signed : public false_type{}; template <> struct is_signed : public false_type{}; template <> struct is_signed : public false_type{}; template <> struct is_signed : public false_type{}; template <> struct is_signed : public false_type{}; #ifdef BOOST_HAS_LONG_LONG template <> struct is_signed< ::boost::long_long_type> : public true_type{}; template <> struct is_signed : public true_type{}; template <> struct is_signed : public true_type{}; template <> struct is_signed : public true_type{}; template <> struct is_signed< ::boost::ulong_long_type> : public false_type{}; template <> struct is_signed : public false_type{}; template <> struct is_signed : public false_type{}; template <> struct is_signed : public false_type{}; #endif #if defined(CHAR_MIN) #if CHAR_MIN != 0 template <> struct is_signed : public true_type{}; template <> struct is_signed : public true_type{}; template <> struct is_signed : public true_type{}; template <> struct is_signed : public true_type{}; #else template <> struct is_signed : public false_type{}; template <> struct is_signed : public false_type{}; template <> struct is_signed : public false_type{}; template <> struct is_signed : public false_type{}; #endif #endif #if defined(WCHAR_MIN) && !defined(BOOST_NO_INTRINSIC_WCHAR_T) #if WCHAR_MIN != 0 template <> struct is_signed : public true_type{}; template <> struct is_signed : public true_type{}; template <> struct is_signed : public true_type{}; template <> struct is_signed : public true_type{}; #else template <> struct is_signed : public false_type{}; template <> struct is_signed : public false_type{}; template <> struct is_signed : public false_type{}; template <> struct is_signed : public false_type{}; #endif #endif } // namespace boost #endif // BOOST_TT_IS_MEMBER_FUNCTION_POINTER_HPP_INCLUDED ================================================ FILE: benchmarks/boost/type_traits/is_union.hpp ================================================ // (C) Copyright Dave Abrahams, Steve Cleary, Beman Dawes, Howard // Hinnant & John Maddock 2000. // Use, modification and distribution are subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt). // // See http://www.boost.org/libs/type_traits for most recent version including documentation. #ifndef BOOST_TT_IS_UNION_HPP_INCLUDED #define BOOST_TT_IS_UNION_HPP_INCLUDED #include #include namespace boost { #ifdef BOOST_IS_UNION template struct is_union : public integral_constant {}; #else template struct is_union : public integral_constant {}; #endif template struct is_union : public is_union{}; template struct is_union : public is_union{}; template struct is_union : public is_union{}; } // namespace boost #endif // BOOST_TT_IS_UNION_HPP_INCLUDED ================================================ FILE: benchmarks/boost/type_traits/is_unsigned.hpp ================================================ // (C) Copyright John Maddock 2005. // Use, modification and distribution are subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt). // // See http://www.boost.org/libs/type_traits for most recent version including documentation. #ifndef BOOST_TT_IS_UNSIGNED_HPP_INCLUDED #define BOOST_TT_IS_UNSIGNED_HPP_INCLUDED #include #include #include #include namespace boost { #if !defined( __CODEGEARC__ ) #if !(defined(BOOST_MSVC) && BOOST_MSVC <= 1310) &&\ !(defined(__EDG_VERSION__) && __EDG_VERSION__ <= 238) &&\ !defined(BOOST_NO_INCLASS_MEMBER_INITIALIZATION) namespace detail{ template struct is_unsigned_values { // // Note that we cannot use BOOST_STATIC_CONSTANT here, using enum's // rather than "real" static constants simply doesn't work or give // the correct answer. // typedef typename remove_cv::type no_cv_t; static const no_cv_t minus_one = (static_cast(-1)); static const no_cv_t zero = (static_cast(0)); }; template struct is_ununsigned_helper { BOOST_STATIC_CONSTANT(bool, value = (::boost::detail::is_unsigned_values::minus_one > ::boost::detail::is_unsigned_values::zero)); }; template struct is_unsigned_select_helper { template struct rebind { typedef is_ununsigned_helper type; }; }; template <> struct is_unsigned_select_helper { template struct rebind { typedef false_type type; }; }; template struct is_unsigned { typedef ::boost::detail::is_unsigned_select_helper< ::boost::is_integral::value || ::boost::is_enum::value > selector; typedef typename selector::template rebind binder; typedef typename binder::type type; BOOST_STATIC_CONSTANT(bool, value = type::value); }; } // namespace detail template struct is_unsigned : public integral_constant::value> {}; #else template struct is_unsigned : public false_type{}; #endif #else // defined( __CODEGEARC__ ) template struct is_unsigned : public integral_constant {}; #endif template <> struct is_unsigned : public true_type{}; template <> struct is_unsigned : public true_type{}; template <> struct is_unsigned : public true_type{}; template <> struct is_unsigned : public true_type{}; template <> struct is_unsigned : public true_type{}; template <> struct is_unsigned : public true_type{}; template <> struct is_unsigned : public true_type{}; template <> struct is_unsigned : public true_type{}; template <> struct is_unsigned : public true_type{}; template <> struct is_unsigned : public true_type{}; template <> struct is_unsigned : public true_type{}; template <> struct is_unsigned : public true_type{}; template <> struct is_unsigned : public true_type{}; template <> struct is_unsigned : public true_type{}; template <> struct is_unsigned : public true_type{}; template <> struct is_unsigned : public true_type{}; template <> struct is_unsigned : public false_type{}; template <> struct is_unsigned : public false_type{}; template <> struct is_unsigned : public false_type{}; template <> struct is_unsigned : public false_type{}; template <> struct is_unsigned< short> : public false_type{}; template <> struct is_unsigned : public false_type{}; template <> struct is_unsigned : public false_type{}; template <> struct is_unsigned : public false_type{}; template <> struct is_unsigned< int> : public false_type{}; template <> struct is_unsigned : public false_type{}; template <> struct is_unsigned : public false_type{}; template <> struct is_unsigned : public false_type{}; template <> struct is_unsigned< long> : public false_type{}; template <> struct is_unsigned : public false_type{}; template <> struct is_unsigned : public false_type{}; template <> struct is_unsigned : public false_type{}; #ifdef BOOST_HAS_LONG_LONG template <> struct is_unsigned< ::boost::ulong_long_type> : public true_type{}; template <> struct is_unsigned : public true_type{}; template <> struct is_unsigned : public true_type{}; template <> struct is_unsigned : public true_type{}; template <> struct is_unsigned< ::boost::long_long_type> : public false_type{}; template <> struct is_unsigned : public false_type{}; template <> struct is_unsigned : public false_type{}; template <> struct is_unsigned : public false_type{}; #endif #if defined(CHAR_MIN) #if CHAR_MIN == 0 template <> struct is_unsigned : public true_type{}; template <> struct is_unsigned : public true_type{}; template <> struct is_unsigned : public true_type{}; template <> struct is_unsigned : public true_type{}; #else template <> struct is_unsigned : public false_type{}; template <> struct is_unsigned : public false_type{}; template <> struct is_unsigned : public false_type{}; template <> struct is_unsigned : public false_type{}; #endif #endif #if !defined(BOOST_NO_INTRINSIC_WCHAR_T) && defined(WCHAR_MIN) #if WCHAR_MIN == 0 template <> struct is_unsigned : public true_type{}; template <> struct is_unsigned : public true_type{}; template <> struct is_unsigned : public true_type{}; template <> struct is_unsigned : public true_type{}; #else template <> struct is_unsigned : public false_type{}; template <> struct is_unsigned : public false_type{}; template <> struct is_unsigned : public false_type{}; template <> struct is_unsigned : public false_type{}; #endif #endif } // namespace boost #endif // BOOST_TT_IS_MEMBER_FUNCTION_POINTER_HPP_INCLUDED ================================================ FILE: benchmarks/boost/type_traits/is_void.hpp ================================================ // (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000. // Use, modification and distribution are subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt). // // See http://www.boost.org/libs/type_traits for most recent version including documentation. #ifndef BOOST_TT_IS_VOID_HPP_INCLUDED #define BOOST_TT_IS_VOID_HPP_INCLUDED #include namespace boost { template struct is_void : public false_type {}; template<> struct is_void : public true_type {}; template<> struct is_void : public true_type{}; template<> struct is_void : public true_type{}; template<> struct is_void : public true_type{}; } // namespace boost #endif // BOOST_TT_IS_VOID_HPP_INCLUDED ================================================ FILE: benchmarks/boost/type_traits/is_volatile.hpp ================================================ // (C) Copyright Dave Abrahams, Steve Cleary, Beman Dawes, // Howard Hinnant and John Maddock 2000. // (C) Copyright Mat Marcus, Jesse Jones and Adobe Systems Inc 2001 // Use, modification and distribution are subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt). // // See http://www.boost.org/libs/type_traits for most recent version including documentation. // Fixed is_pointer, is_reference, is_const, is_volatile, is_same, // is_member_pointer based on the Simulated Partial Specialization work // of Mat Marcus and Jesse Jones. See http://opensource.adobe.com or // http://groups.yahoo.com/group/boost/message/5441 // Some workarounds in here use ideas suggested from "Generic: // Mappings between Types and Values" // by Andrei Alexandrescu (see http://www.cuj.com/experts/1810/alexandr.html). #ifndef BOOST_TT_IS_VOLATILE_HPP_INCLUDED #define BOOST_TT_IS_VOLATILE_HPP_INCLUDED #include namespace boost { #if defined( __CODEGEARC__ ) template struct is_volatile : public integral_constant {}; #else template struct is_volatile : public false_type {}; template struct is_volatile : public true_type{}; template struct is_volatile : public true_type{}; template struct is_volatile : public true_type{}; #endif } // namespace boost #endif // BOOST_TT_IS_VOLATILE_HPP_INCLUDED ================================================ FILE: benchmarks/boost/type_traits/make_signed.hpp ================================================ // (C) Copyright John Maddock 2007. // Use, modification and distribution are subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt). // // See http://www.boost.org/libs/type_traits for most recent version including documentation. #ifndef BOOST_TT_MAKE_SIGNED_HPP_INCLUDED #define BOOST_TT_MAKE_SIGNED_HPP_INCLUDED #include #include #include #include #include #include #include #include #include #include #include #include namespace boost { template struct make_signed { private: BOOST_STATIC_ASSERT_MSG(( ::boost::is_integral::value || ::boost::is_enum::value), "The template argument to make_signed must be an integer or enum type."); BOOST_STATIC_ASSERT_MSG(!(::boost::is_same::type, bool>::value), "The template argument to make_signed must not be the type bool."); typedef typename remove_cv::type t_no_cv; typedef typename conditional< (::boost::is_signed::value && ::boost::is_integral::value && ! ::boost::is_same::value && ! ::boost::is_same::value && ! ::boost::is_same::value), T, typename conditional< (::boost::is_integral::value && ! ::boost::is_same::value && ! ::boost::is_same::value && ! ::boost::is_same::value), typename conditional< is_same::value, signed char, typename conditional< is_same::value, signed short, typename conditional< is_same::value, int, typename conditional< is_same::value, long, #if defined(BOOST_HAS_LONG_LONG) #ifdef BOOST_HAS_INT128 typename conditional< sizeof(t_no_cv) == sizeof(boost::long_long_type), boost::long_long_type, boost::int128_type >::type #else boost::long_long_type #endif #elif defined(BOOST_HAS_MS_INT64) __int64 #else long #endif >::type >::type >::type >::type, // Not a regular integer type: typename conditional< sizeof(t_no_cv) == sizeof(unsigned char), signed char, typename conditional< sizeof(t_no_cv) == sizeof(unsigned short), signed short, typename conditional< sizeof(t_no_cv) == sizeof(unsigned int), int, typename conditional< sizeof(t_no_cv) == sizeof(unsigned long), long, #if defined(BOOST_HAS_LONG_LONG) #ifdef BOOST_HAS_INT128 typename conditional< sizeof(t_no_cv) == sizeof(boost::long_long_type), boost::long_long_type, boost::int128_type >::type #else boost::long_long_type #endif #elif defined(BOOST_HAS_MS_INT64) __int64 #else long #endif >::type >::type >::type >::type >::type >::type base_integer_type; // Add back any const qualifier: typedef typename conditional< is_const::value, typename add_const::type, base_integer_type >::type const_base_integer_type; public: // Add back any volatile qualifier: typedef typename conditional< is_volatile::value, typename add_volatile::type, const_base_integer_type >::type type; }; } // namespace boost #endif // BOOST_TT_ADD_REFERENCE_HPP_INCLUDED ================================================ FILE: benchmarks/boost/type_traits/remove_const.hpp ================================================ // (C) Copyright Dave Abrahams, Steve Cleary, Beman Dawes, Howard // Hinnant & John Maddock 2000. // Use, modification and distribution are subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt). // // See http://www.boost.org/libs/type_traits for most recent version including documentation. #ifndef BOOST_TT_REMOVE_CONST_HPP_INCLUDED #define BOOST_TT_REMOVE_CONST_HPP_INCLUDED #include #include #include namespace boost { // convert a type T to a non-cv-qualified type - remove_const template struct remove_const{ typedef T type; }; template struct remove_const{ typedef T type; }; #if !defined(BOOST_NO_ARRAY_TYPE_SPECIALIZATIONS) template struct remove_const{ typedef T type[N]; }; #if !BOOST_WORKAROUND(__BORLANDC__, < 0x600) && !defined(__IBMCPP__) && !BOOST_WORKAROUND(__DMC__, BOOST_TESTED_AT(0x840)) template struct remove_const{ typedef T type[]; }; #endif #endif } // namespace boost #endif // BOOST_TT_REMOVE_CONST_HPP_INCLUDED ================================================ FILE: benchmarks/boost/type_traits/remove_cv.hpp ================================================ // (C) Copyright Dave Abrahams, Steve Cleary, Beman Dawes, Howard // Hinnant & John Maddock 2000. // Use, modification and distribution are subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt). // // See http://www.boost.org/libs/type_traits for most recent version including documentation. #ifndef BOOST_TT_REMOVE_CV_HPP_INCLUDED #define BOOST_TT_REMOVE_CV_HPP_INCLUDED #include #include #include namespace boost { // convert a type T to a non-cv-qualified type - remove_cv template struct remove_cv{ typedef T type; }; template struct remove_cv{ typedef T type; }; template struct remove_cv{ typedef T type; }; template struct remove_cv{ typedef T type; }; #if !defined(BOOST_NO_ARRAY_TYPE_SPECIALIZATIONS) template struct remove_cv{ typedef T type[N]; }; template struct remove_cv{ typedef T type[N]; }; template struct remove_cv{ typedef T type[N]; }; #if !BOOST_WORKAROUND(__BORLANDC__, < 0x600) && !defined(__IBMCPP__) && !BOOST_WORKAROUND(__DMC__, BOOST_TESTED_AT(0x840)) template struct remove_cv{ typedef T type[]; }; template struct remove_cv{ typedef T type[]; }; template struct remove_cv{ typedef T type[]; }; #endif #endif } // namespace boost #endif // BOOST_TT_REMOVE_CV_HPP_INCLUDED ================================================ FILE: benchmarks/boost/type_traits/remove_reference.hpp ================================================ // (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000. // Use, modification and distribution are subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt). // // See http://www.boost.org/libs/type_traits for most recent version including documentation. #ifndef BOOST_TT_REMOVE_REFERENCE_HPP_INCLUDED #define BOOST_TT_REMOVE_REFERENCE_HPP_INCLUDED #include #include namespace boost { namespace detail{ // // We can't filter out rvalue_references at the same level as // references or we get ambiguities from msvc: // template struct remove_rvalue_ref { typedef T type; }; #ifndef BOOST_NO_CXX11_RVALUE_REFERENCES template struct remove_rvalue_ref { typedef T type; }; #endif } // namespace detail template struct remove_reference{ typedef typename boost::detail::remove_rvalue_ref::type type; }; template struct remove_reference{ typedef T type; }; #if defined(BOOST_ILLEGAL_CV_REFERENCES) // these are illegal specialisations; cv-qualifies applied to // references have no effect according to [8.3.2p1], // C++ Builder requires them though as it treats cv-qualified // references as distinct types... template struct remove_reference{ typedef T type; }; template struct remove_reference{ typedef T type; }; template struct remove_reference{ typedef T type; }; #endif } // namespace boost #endif // BOOST_TT_REMOVE_REFERENCE_HPP_INCLUDED ================================================ FILE: benchmarks/boost/utility/declval.hpp ================================================ // declval.hpp -------------------------------------------------------------// // Copyright 2010 Vicente J. Botet Escriba // Distributed under the Boost Software License, Version 1.0. // See http://www.boost.org/LICENSE_1_0.txt #ifndef BOOST_UTILITY_DECLVAL_HPP #define BOOST_UTILITY_DECLVAL_HPP #include #endif // BOOST_UTILITY_DECLVAL_HPP ================================================ FILE: benchmarks/boost/utility/detail/result_of_iterate.hpp ================================================ // Boost result_of library // Copyright Douglas Gregor 2004. Use, modification and // distribution is subject to the Boost Software License, Version // 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // Copyright Daniel Walker, Eric Niebler, Michel Morin 2008-2012. // Use, modification and distribution is subject to the Boost Software // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or // copy at http://www.boost.org/LICENSE_1_0.txt) // For more information, see http://www.boost.org/libs/utility #if !defined(BOOST_PP_IS_ITERATING) # error Boost result_of - do not include this file! #endif // CWPro8 requires an argument in a function type specialization #if BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3002)) && BOOST_PP_ITERATION() == 0 # define BOOST_RESULT_OF_ARGS void #else # define BOOST_RESULT_OF_ARGS BOOST_PP_ENUM_PARAMS(BOOST_PP_ITERATION(),T) #endif #if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x551)) template struct tr1_result_of : mpl::if_< mpl::or_< is_pointer, is_member_function_pointer > , boost::detail::tr1_result_of_impl< typename remove_cv::type, typename remove_cv::type(BOOST_RESULT_OF_ARGS), (boost::detail::has_result_type::value)> , boost::detail::tr1_result_of_impl< F, F(BOOST_RESULT_OF_ARGS), (boost::detail::has_result_type::value)> >::type { }; #endif #ifdef BOOST_RESULT_OF_USE_DECLTYPE template struct result_of : detail::cpp0x_result_of { }; #endif // BOOST_RESULT_OF_USE_DECLTYPE #ifdef BOOST_RESULT_OF_USE_TR1_WITH_DECLTYPE_FALLBACK template struct result_of : mpl::if_, detail::has_result >, tr1_result_of, detail::cpp0x_result_of >::type { }; #endif // BOOST_RESULT_OF_USE_TR1_WITH_DECLTYPE_FALLBACK #if defined(BOOST_RESULT_OF_USE_DECLTYPE) || defined(BOOST_RESULT_OF_USE_TR1_WITH_DECLTYPE_FALLBACK) namespace detail { template struct cpp0x_result_of : mpl::if_< is_member_function_pointer , detail::tr1_result_of_impl< typename remove_cv::type, typename remove_cv::type(BOOST_PP_ENUM_PARAMS(BOOST_PP_ITERATION(),T)), false > , detail::cpp0x_result_of_impl< F(BOOST_PP_ENUM_PARAMS(BOOST_PP_ITERATION(),T)) > >::type {}; #ifdef BOOST_NO_SFINAE_EXPR template struct BOOST_PP_CAT(result_of_callable_fun_2_, BOOST_PP_ITERATION()); template struct BOOST_PP_CAT(result_of_callable_fun_2_, BOOST_PP_ITERATION()) { R operator()(BOOST_PP_ENUM_PARAMS(BOOST_PP_ITERATION(), T)) const; typedef result_of_private_type const &(*pfn_t)(...); operator pfn_t() const volatile; }; template struct BOOST_PP_CAT(result_of_callable_fun_, BOOST_PP_ITERATION()); template struct BOOST_PP_CAT(result_of_callable_fun_, BOOST_PP_ITERATION()) : BOOST_PP_CAT(result_of_callable_fun_2_, BOOST_PP_ITERATION()) {}; template struct BOOST_PP_CAT(result_of_callable_fun_, BOOST_PP_ITERATION()) : BOOST_PP_CAT(result_of_callable_fun_2_, BOOST_PP_ITERATION()) {}; template struct BOOST_PP_CAT(result_of_select_call_wrapper_type_, BOOST_PP_ITERATION()) : mpl::eval_if< is_class::type>, result_of_wrap_callable_class, mpl::identity::type> > > {}; template struct BOOST_PP_CAT(result_of_is_callable_, BOOST_PP_ITERATION()) { typedef typename BOOST_PP_CAT(result_of_select_call_wrapper_type_, BOOST_PP_ITERATION())::type wrapper_t; static const bool value = ( sizeof(result_of_no_type) == sizeof(detail::result_of_is_private_type( (boost::declval()(BOOST_PP_ENUM_BINARY_PARAMS(BOOST_PP_ITERATION(), boost::declval() BOOST_PP_INTERCEPT)), result_of_weird_type()) )) ); typedef mpl::bool_ type; }; template struct cpp0x_result_of_impl : lazy_enable_if< BOOST_PP_CAT(result_of_is_callable_, BOOST_PP_ITERATION()) , cpp0x_result_of_impl > {}; template struct cpp0x_result_of_impl { typedef decltype( boost::declval()( BOOST_PP_ENUM_BINARY_PARAMS(BOOST_PP_ITERATION(), boost::declval() BOOST_PP_INTERCEPT) ) ) type; }; #else // BOOST_NO_SFINAE_EXPR template struct cpp0x_result_of_impl()( BOOST_PP_ENUM_BINARY_PARAMS(BOOST_PP_ITERATION(), boost::declval() BOOST_PP_INTERCEPT) ) )>::type> { typedef decltype( boost::declval()( BOOST_PP_ENUM_BINARY_PARAMS(BOOST_PP_ITERATION(), boost::declval() BOOST_PP_INTERCEPT) ) ) type; }; #endif // BOOST_NO_SFINAE_EXPR } // namespace detail #else // defined(BOOST_RESULT_OF_USE_DECLTYPE) || defined(BOOST_RESULT_OF_USE_TR1_WITH_DECLTYPE_FALLBACK) #if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x551)) template struct result_of : tr1_result_of { }; #endif #endif // defined(BOOST_RESULT_OF_USE_DECLTYPE) #undef BOOST_RESULT_OF_ARGS #if BOOST_PP_ITERATION() >= 1 namespace detail { template struct tr1_result_of_impl { typedef R type; }; template struct tr1_result_of_impl { typedef R type; }; #if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x551)) template struct tr1_result_of_impl { typedef R type; }; template struct tr1_result_of_impl { typedef R type; }; template struct tr1_result_of_impl { typedef R type; }; template struct tr1_result_of_impl { typedef R type; }; #endif } #endif ================================================ FILE: benchmarks/boost/utility/enable_if.hpp ================================================ /* * Copyright (c) 2014 Glen Fernandes * * Distributed under the Boost Software License, Version 1.0. (See * accompanying file LICENSE_1_0.txt or copy at * http://www.boost.org/LICENSE_1_0.txt) */ #ifndef BOOST_UTILITY_ENABLE_IF_HPP #define BOOST_UTILITY_ENABLE_IF_HPP // The header file at this path is deprecated; // use boost/core/enable_if.hpp instead. #include #endif ================================================ FILE: benchmarks/boost/utility/result_of.hpp ================================================ // Boost result_of library // Copyright Douglas Gregor 2004. Use, modification and // distribution is subject to the Boost Software License, Version // 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // For more information, see http://www.boost.org/libs/utility #ifndef BOOST_RESULT_OF_HPP #define BOOST_RESULT_OF_HPP #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #ifndef BOOST_RESULT_OF_NUM_ARGS # define BOOST_RESULT_OF_NUM_ARGS 16 #endif // Use the decltype-based version of result_of by default if the compiler // supports N3276 . // The user can force the choice by defining BOOST_RESULT_OF_USE_DECLTYPE, // BOOST_RESULT_OF_USE_TR1, or BOOST_RESULT_OF_USE_TR1_WITH_DECLTYPE_FALLBACK but not more than one! #if (defined(BOOST_RESULT_OF_USE_DECLTYPE) && defined(BOOST_RESULT_OF_USE_TR1)) || \ (defined(BOOST_RESULT_OF_USE_DECLTYPE) && defined(BOOST_RESULT_OF_USE_TR1_WITH_DECLTYPE_FALLBACK)) || \ (defined(BOOST_RESULT_OF_USE_TR1) && defined(BOOST_RESULT_OF_USE_TR1_WITH_DECLTYPE_FALLBACK)) # error More than one of BOOST_RESULT_OF_USE_DECLTYPE, BOOST_RESULT_OF_USE_TR1 and \ BOOST_RESULT_OF_USE_TR1_WITH_DECLTYPE_FALLBACK cannot be defined at the same time. #endif #if defined(BOOST_RESULT_OF_USE_TR1_WITH_DECLTYPE_FALLBACK) && defined(BOOST_MPL_CFG_NO_HAS_XXX_TEMPLATE) # error Cannot fallback to decltype if BOOST_MPL_CFG_NO_HAS_XXX_TEMPLATE is not defined. #endif #ifndef BOOST_RESULT_OF_USE_TR1 # ifndef BOOST_RESULT_OF_USE_DECLTYPE # ifndef BOOST_RESULT_OF_USE_TR1_WITH_DECLTYPE_FALLBACK # ifndef BOOST_NO_CXX11_DECLTYPE_N3276 // this implies !defined(BOOST_NO_CXX11_DECLTYPE) # define BOOST_RESULT_OF_USE_DECLTYPE # else # define BOOST_RESULT_OF_USE_TR1 # endif # endif # endif #endif namespace boost { template struct result_of; template struct tr1_result_of; // a TR1-style implementation of result_of #if !defined(BOOST_NO_SFINAE) namespace detail { BOOST_MPL_HAS_XXX_TRAIT_DEF(result_type) // Work around a nvcc bug by only defining has_result when it's needed. #ifdef BOOST_RESULT_OF_USE_TR1_WITH_DECLTYPE_FALLBACK BOOST_MPL_HAS_XXX_TEMPLATE_DEF(result) #endif template struct tr1_result_of_impl; template struct cpp0x_result_of; #ifdef BOOST_NO_SFINAE_EXPR // There doesn't seem to be any other way to turn this off such that the presence of // the user-defined operator,() below doesn't cause spurious warning all over the place, // so unconditionally turn it off. #if BOOST_MSVC # pragma warning(disable: 4913) // user defined binary operator ',' exists but no overload could convert all operands, default built-in binary operator ',' used #endif struct result_of_private_type {}; struct result_of_weird_type { friend result_of_private_type operator,(result_of_private_type, result_of_weird_type); }; typedef char result_of_yes_type; // sizeof(result_of_yes_type) == 1 typedef char (&result_of_no_type)[2]; // sizeof(result_of_no_type) == 2 template result_of_no_type result_of_is_private_type(T const &); result_of_yes_type result_of_is_private_type(result_of_private_type); template struct result_of_callable_class : C { result_of_callable_class(); typedef result_of_private_type const &(*pfn_t)(...); operator pfn_t() const volatile; }; template struct result_of_wrap_callable_class { typedef result_of_callable_class type; }; template struct result_of_wrap_callable_class { typedef result_of_callable_class const type; }; template struct result_of_wrap_callable_class { typedef result_of_callable_class volatile type; }; template struct result_of_wrap_callable_class { typedef result_of_callable_class const volatile type; }; template struct result_of_wrap_callable_class { typedef typename result_of_wrap_callable_class::type &type; }; template struct cpp0x_result_of_impl; #else // BOOST_NO_SFINAE_EXPR template struct result_of_always_void { typedef void type; }; template struct cpp0x_result_of_impl {}; #endif // BOOST_NO_SFINAE_EXPR template struct result_of_void_impl { typedef void type; }; template struct result_of_void_impl { typedef R type; }; template struct result_of_void_impl { typedef R type; }; // Determine the return type of a function pointer or pointer to member. template struct result_of_pointer : tr1_result_of_impl::type, FArgs, false> { }; template struct tr1_result_of_impl { typedef typename F::result_type type; }; template struct is_function_with_no_args : mpl::false_ {}; template struct is_function_with_no_args : mpl::true_ {}; template struct result_of_nested_result : F::template result {}; template struct tr1_result_of_impl : mpl::if_, result_of_void_impl, result_of_nested_result >::type {}; } // end namespace detail #define BOOST_PP_ITERATION_PARAMS_1 (3,(0,BOOST_RESULT_OF_NUM_ARGS,)) #include BOOST_PP_ITERATE() #else # define BOOST_NO_RESULT_OF 1 #endif } #endif // BOOST_RESULT_OF_HPP ================================================ FILE: benchmarks/boost/version.hpp ================================================ // Boost version.hpp configuration header file ------------------------------// // (C) Copyright John maddock 1999. Distributed under the Boost // Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org/libs/config for documentation #ifndef BOOST_VERSION_HPP #define BOOST_VERSION_HPP // // Caution: this is the only Boost header that is guaranteed // to change with every Boost release. Including this header // will cause a recompile every time a new Boost version is // used. // // BOOST_VERSION % 100 is the patch level // BOOST_VERSION / 100 % 1000 is the minor version // BOOST_VERSION / 100000 is the major version #define BOOST_VERSION 106000 // // BOOST_LIB_VERSION must be defined to be the same as BOOST_VERSION // but as a *string* in the form "x_y[_z]" where x is the major version // number, y is the minor version number, and z is the patch level if not 0. // This is used by to select which library version to link to. #define BOOST_LIB_VERSION "1_60" #endif ================================================ FILE: benchmarks/boostqueue.h ================================================ #pragma once #include #include "boost/lockfree/queue.hpp" #include "wrappers.h" template struct BoostQueueWrapper { public: typedef DummyToken producer_token_t; typedef DummyToken consumer_token_t; public: BoostQueueWrapper() : q(/* starting capacity */ 16384) { } template inline bool enqueue(U&& item) { return q.push(std::forward(item)); } inline bool try_dequeue(T& item) { return q.pop(item); } // Dummy token methods (not used) bool enqueue(producer_token_t const&, T const&) { return false; } bool try_enqueue(producer_token_t, T const&) { return false; } bool try_dequeue(consumer_token_t, T& item) { return false; } template bool enqueue_bulk(It, size_t) { return false; } template bool enqueue_bulk(producer_token_t const&, It, size_t) { return false; } template size_t try_dequeue_bulk(It, size_t) { return 0; } template size_t try_dequeue_bulk(consumer_token_t, It, size_t) { return 0; } private: boost::lockfree::queue q; }; ================================================ FILE: benchmarks/contrib/benchmarks.aws-32.log ================================================ # Run on a 32-core cc2.8xlarge AWS instance --- New run (Sat Nov 8 19:43:51 2014) --- Running 64-bit benchmarks on a Intel(R) Xeon(R) CPU E5-2670 0 @ 2.60GHz (precise mode) Note that these are synthetic benchmarks. Take them with a grain of salt. Legend: 'Avg': Average time taken per operation, normalized to be per thread 'Range': The minimum and maximum times taken per operation (per thread) 'Ops/s': Overall operations per second 'Ops/s/t': Operations per second per thread (inverse of 'Avg') Operations include those that fail (e.g. because the queue is empty). Each logical enqueue/dequeue counts as an individual operation when in bulk. balanced: (Measures the average operation speed with multiple symmetrical threads under reasonable load -- small random intervals between accesses) > moodycamel::ConcurrentQueue Without tokens 2 threads: Avg: 0.9490us Range: [0.9444us, 0.9512us] Ops/s: 2.11M Ops/s/t: 1.05M 3 threads: Avg: 1.6217us Range: [1.6120us, 1.6288us] Ops/s: 1.85M Ops/s/t: 616.63k 4 threads: Avg: 2.5471us Range: [2.5150us, 2.5578us] Ops/s: 1.57M Ops/s/t: 392.60k 8 threads: Avg: 8.7667us Range: [8.7260us, 8.8109us] Ops/s: 912.54k Ops/s/t: 114.07k 12 threads: Avg: 0.0194ms Range: [0.0186ms, 0.0196ms] Ops/s: 618.06k Ops/s/t: 51.51k 16 threads: Avg: 0.0347ms Range: [0.0343ms, 0.0348ms] Ops/s: 461.73k Ops/s/t: 28.86k 32 threads: Avg: 0.1103ms Range: [0.1095ms, 0.1110ms] Ops/s: 290.14k Ops/s/t: 9.07k Operations per second per thread (weighted average): 190.15k With tokens 2 threads: Avg: 0.6626us Range: [0.6322us, 0.6736us] Ops/s: 3.02M Ops/s/t: 1.51M 3 threads: Avg: 1.1325us Range: [1.1000us, 1.1511us] Ops/s: 2.65M Ops/s/t: 882.97k 4 threads: Avg: 1.8496us Range: [1.8032us, 1.8770us] Ops/s: 2.16M Ops/s/t: 540.65k 8 threads: Avg: 6.9275us Range: [6.8699us, 6.9555us] Ops/s: 1.15M Ops/s/t: 144.35k 12 threads: Avg: 0.0152ms Range: [0.0150ms, 0.0153ms] Ops/s: 791.01k Ops/s/t: 65.92k 16 threads: Avg: 0.0252ms Range: [0.0248ms, 0.0254ms] Ops/s: 634.43k Ops/s/t: 39.65k 32 threads: Avg: 0.0634ms Range: [0.0629ms, 0.0638ms] Ops/s: 504.94k Ops/s/t: 15.78k Operations per second per thread (weighted average): 266.86k > boost::lockfree::queue 2 threads: Avg: 1.0256us Range: [0.6384us, 1.0845us] Ops/s: 1.95M Ops/s/t: 975.07k 3 threads: Avg: 1.8734us Range: [1.8230us, 1.8918us] Ops/s: 1.60M Ops/s/t: 533.80k 4 threads: Avg: 2.6625us Range: [2.4000us, 2.8020us] Ops/s: 1.50M Ops/s/t: 375.59k 8 threads: Avg: 0.0138ms Range: [0.0130ms, 0.0144ms] Ops/s: 577.73k Ops/s/t: 72.22k 12 threads: Avg: 0.0471ms Range: [0.0434ms, 0.0487ms] Ops/s: 254.73k Ops/s/t: 21.23k 16 threads: Avg: 0.1145ms Range: [0.1138ms, 0.1154ms] Ops/s: 139.74k Ops/s/t: 8.73k 32 threads: Avg: 0.4516ms Range: [0.4458ms, 0.4532ms] Ops/s: 70.85k Ops/s/t: 2.21k Operations per second per thread (weighted average): 160.22k > tbb::concurrent_queue 2 threads: Avg: 1.0053us Range: [0.9950us, 1.0112us] Ops/s: 1.99M Ops/s/t: 994.72k 3 threads: Avg: 1.5741us Range: [1.5690us, 1.5797us] Ops/s: 1.91M Ops/s/t: 635.27k 4 threads: Avg: 2.4572us Range: [2.4326us, 2.4669us] Ops/s: 1.63M Ops/s/t: 406.96k 8 threads: Avg: 7.5870us Range: [7.0968us, 7.6851us] Ops/s: 1.05M Ops/s/t: 131.80k 12 threads: Avg: 0.0156ms Range: [0.0155ms, 0.0158ms] Ops/s: 767.09k Ops/s/t: 63.92k 16 threads: Avg: 0.0265ms Range: [0.0262ms, 0.0266ms] Ops/s: 604.29k Ops/s/t: 37.77k 32 threads: Avg: 0.0928ms Range: [0.0879ms, 0.0957ms] Ops/s: 344.98k Ops/s/t: 10.78k Operations per second per thread (weighted average): 195.65k > SimpleLockFreeQueue 2 threads: Avg: 1.1227us Range: [1.0641us, 1.1357us] Ops/s: 1.78M Ops/s/t: 890.75k 3 threads: Avg: 1.6745us Range: [1.4539us, 1.9843us] Ops/s: 1.79M Ops/s/t: 597.20k 4 threads: Avg: 3.5253us Range: [3.5045us, 3.5347us] Ops/s: 1.13M Ops/s/t: 283.66k 8 threads: Avg: 0.0196ms Range: [0.0182ms, 0.0200ms] Ops/s: 408.60k Ops/s/t: 51.08k 12 threads: Avg: 0.0687ms Range: [0.0680ms, 0.0691ms] Ops/s: 174.55k Ops/s/t: 14.55k 16 threads: Avg: 0.1619ms Range: [0.1597ms, 0.1634ms] Ops/s: 98.85k Ops/s/t: 6.18k 32 threads: Avg: 0.6604ms Range: [0.5891ms, 0.6739ms] Ops/s: 48.46k Ops/s/t: 1.51k Operations per second per thread (weighted average): 146.45k > LockBasedQueue 2 threads: Avg: 1.6278us Range: [0.7309us, 1.7716us] Ops/s: 1.23M Ops/s/t: 614.31k 3 threads: Avg: 3.8231us Range: [3.7828us, 3.8525us] Ops/s: 784.71k Ops/s/t: 261.57k 4 threads: Avg: 8.2348us Range: [6.7550us, 8.7739us] Ops/s: 485.75k Ops/s/t: 121.44k 8 threads: Avg: 0.0468ms Range: [0.0459ms, 0.0474ms] Ops/s: 170.89k Ops/s/t: 21.36k 12 threads: Avg: 0.1094ms Range: [0.1087ms, 0.1099ms] Ops/s: 109.74k Ops/s/t: 9.14k 16 threads: Avg: 0.1959ms Range: [0.1928ms, 0.1980ms] Ops/s: 81.69k Ops/s/t: 5.11k 32 threads: Avg: 0.9527ms Range: [0.9363ms, 0.9593ms] Ops/s: 33.59k Ops/s/t: 1.05k Operations per second per thread (weighted average): 79.79k > std::queue (skipping, benchmark not supported...) only enqueue: (Measures the average operation speed when all threads are producers) > moodycamel::ConcurrentQueue Without tokens 1 thread: Avg: 0.0141us Range: [0.0141us, 0.0141us] Ops/s: 70.69M Ops/s/t: 70.69M 2 threads: Avg: 0.0249us Range: [0.0249us, 0.0250us] Ops/s: 80.19M Ops/s/t: 40.10M 4 threads: Avg: 0.0499us Range: [0.0498us, 0.0499us] Ops/s: 80.20M Ops/s/t: 20.05M 8 threads: Avg: 0.1010us Range: [0.1007us, 0.1011us] Ops/s: 79.21M Ops/s/t: 9.90M 12 threads: Avg: 0.1543us Range: [0.1536us, 0.1548us] Ops/s: 77.78M Ops/s/t: 6.48M 16 threads: Avg: 0.2154us Range: [0.2142us, 0.2161us] Ops/s: 74.28M Ops/s/t: 4.64M 32 threads: Avg: 0.6913us Range: [0.6885us, 0.6931us] Ops/s: 46.29M Ops/s/t: 1.45M 48 threads: Avg: 1.0539us Range: [1.0423us, 1.0712us] Ops/s: 45.55M Ops/s/t: 948.90k Operations per second per thread (weighted average): 11.32M With tokens 1 thread: Avg: 9.0936ns Range: [9.0686ns, 9.1014ns] Ops/s: 109.97M Ops/s/t: 109.97M 2 threads: Avg: 0.0208us Range: [0.0207us, 0.0208us] Ops/s: 96.32M Ops/s/t: 48.16M 4 threads: Avg: 0.0417us Range: [0.0415us, 0.0417us] Ops/s: 96.04M Ops/s/t: 24.01M 8 threads: Avg: 0.0843us Range: [0.0841us, 0.0845us] Ops/s: 94.85M Ops/s/t: 11.86M 12 threads: Avg: 0.1313us Range: [0.1308us, 0.1316us] Ops/s: 91.38M Ops/s/t: 7.62M 16 threads: Avg: 0.1812us Range: [0.1799us, 0.1820us] Ops/s: 88.28M Ops/s/t: 5.52M 32 threads: Avg: 0.5041us Range: [0.5035us, 0.5046us] Ops/s: 63.48M Ops/s/t: 1.98M 48 threads: Avg: 0.7848us Range: [0.7781us, 0.7938us] Ops/s: 61.16M Ops/s/t: 1.27M Operations per second per thread (weighted average): 14.89M > boost::lockfree::queue 1 thread: Avg: 0.0533us Range: [0.0533us, 0.0533us] Ops/s: 18.76M Ops/s/t: 18.76M 2 threads: Avg: 1.3973us Range: [1.3962us, 1.3985us] Ops/s: 1.43M Ops/s/t: 715.65k 4 threads: Avg: 7.1735us Range: [4.8830us, 7.7483us] Ops/s: 557.61k Ops/s/t: 139.40k 8 threads: Avg: 0.0413ms Range: [0.0391ms, 0.0419ms] Ops/s: 193.47k Ops/s/t: 24.18k 12 threads: Avg: 0.1030ms Range: [0.0992ms, 0.1066ms] Ops/s: 116.47k Ops/s/t: 9.71k 16 threads: Avg: 0.1928ms Range: [0.1892ms, 0.1949ms] Ops/s: 82.97k Ops/s/t: 5.19k 32 threads: Avg: 0.7135ms Range: [0.7109ms, 0.7147ms] Ops/s: 44.85k Ops/s/t: 1.40k 48 threads: Avg: 1.7082ms Range: [1.7023ms, 1.7125ms] Ops/s: 28.10k Ops/s/t: 585.42 Operations per second per thread (weighted average): 1.00M > tbb::concurrent_queue 1 thread: Avg: 0.0301us Range: [0.0301us, 0.0301us] Ops/s: 33.21M Ops/s/t: 33.21M 2 threads: Avg: 0.5175us Range: [0.5168us, 0.5178us] Ops/s: 3.86M Ops/s/t: 1.93M 4 threads: Avg: 1.9453us Range: [1.9412us, 1.9502us] Ops/s: 2.06M Ops/s/t: 514.07k 8 threads: Avg: 0.0107ms Range: [0.0106ms, 0.0107ms] Ops/s: 748.95k Ops/s/t: 93.62k 12 threads: Avg: 0.0256ms Range: [0.0233ms, 0.0261ms] Ops/s: 468.77k Ops/s/t: 39.06k 16 threads: Avg: 0.0450ms Range: [0.0447ms, 0.0451ms] Ops/s: 355.86k Ops/s/t: 22.24k 32 threads: Avg: 0.2274ms Range: [0.2266ms, 0.2281ms] Ops/s: 140.70k Ops/s/t: 4.40k 48 threads: Avg: 0.7102ms Range: [0.7052ms, 0.7157ms] Ops/s: 67.58k Ops/s/t: 1.41k Operations per second per thread (weighted average): 1.84M > SimpleLockFreeQueue 1 thread: Avg: 0.0496us Range: [0.0496us, 0.0496us] Ops/s: 20.18M Ops/s/t: 20.18M 2 threads: Avg: 1.0667us Range: [1.0643us, 1.0678us] Ops/s: 1.87M Ops/s/t: 937.43k 4 threads: Avg: 4.5046us Range: [3.9727us, 4.6711us] Ops/s: 887.98k Ops/s/t: 222.00k 8 threads: Avg: 0.0156ms Range: [0.0146ms, 0.0166ms] Ops/s: 513.34k Ops/s/t: 64.17k 12 threads: Avg: 0.0378ms Range: [0.0367ms, 0.0385ms] Ops/s: 317.46k Ops/s/t: 26.45k 16 threads: Avg: 0.0684ms Range: [0.0671ms, 0.0691ms] Ops/s: 233.94k Ops/s/t: 14.62k 32 threads: Avg: 0.1494ms Range: [0.1483ms, 0.1498ms] Ops/s: 214.18k Ops/s/t: 6.69k 48 threads: Avg: 0.3392ms Range: [0.3367ms, 0.3400ms] Ops/s: 141.51k Ops/s/t: 2.95k Operations per second per thread (weighted average): 1.14M > LockBasedQueue 1 thread: Avg: 0.0546us Range: [0.0546us, 0.0546us] Ops/s: 18.30M Ops/s/t: 18.30M 2 threads: Avg: 0.4666us Range: [0.4610us, 0.4700us] Ops/s: 4.29M Ops/s/t: 2.14M 4 threads: Avg: 5.9669us Range: [5.0405us, 6.2625us] Ops/s: 670.37k Ops/s/t: 167.59k 8 threads: Avg: 0.0217ms Range: [0.0186ms, 0.0223ms] Ops/s: 368.76k Ops/s/t: 46.09k 12 threads: Avg: 0.0395ms Range: [0.0227ms, 0.0467ms] Ops/s: 304.07k Ops/s/t: 25.34k 16 threads: Avg: 0.0775ms Range: [0.0753ms, 0.0790ms] Ops/s: 206.41k Ops/s/t: 12.90k 32 threads: Avg: 0.2710ms Range: [0.2028ms, 0.2853ms] Ops/s: 118.07k Ops/s/t: 3.69k 48 threads: Avg: 0.5390ms Range: [0.5018ms, 0.5553ms] Ops/s: 89.05k Ops/s/t: 1.86k Operations per second per thread (weighted average): 1.13M > std::queue 1 thread: Avg: 5.0901ns Range: [5.0309ns, 5.0997ns] Ops/s: 196.46M Ops/s/t: 196.46M Operations per second per thread (weighted average): 196.46M only enqueue (pre-allocated): (Measures the average operation speed when all threads are producers, and the queue has been stretched out first) > moodycamel::ConcurrentQueue Without tokens 1 thread: Avg: 0.0126us Range: [0.0126us, 0.0126us] Ops/s: 79.19M Ops/s/t: 79.19M 2 threads: Avg: 0.0337us Range: [0.0337us, 0.0337us] Ops/s: 59.37M Ops/s/t: 29.69M 4 threads: Avg: 0.1239us Range: [0.1214us, 0.1253us] Ops/s: 32.28M Ops/s/t: 8.07M 8 threads: Avg: 0.5276us Range: [0.5163us, 0.5358us] Ops/s: 15.16M Ops/s/t: 1.90M 32 threads: Avg: 0.0168ms Range: [0.0165ms, 0.0169ms] Ops/s: 1.91M Ops/s/t: 59.62k Operations per second per thread (weighted average): 11.09M With tokens 1 thread: Avg: 7.5041ns Range: [7.4886ns, 7.5103ns] Ops/s: 133.26M Ops/s/t: 133.26M 2 threads: Avg: 0.0168us Range: [0.0167us, 0.0168us] Ops/s: 119.21M Ops/s/t: 59.60M 4 threads: Avg: 0.0331us Range: [0.0330us, 0.0331us] Ops/s: 120.88M Ops/s/t: 30.22M 8 threads: Avg: 0.0661us Range: [0.0655us, 0.0665us] Ops/s: 121.05M Ops/s/t: 15.13M 32 threads: Avg: 0.3257us Range: [0.3239us, 0.3267us] Ops/s: 98.25M Ops/s/t: 3.07M Operations per second per thread (weighted average): 26.22M > boost::lockfree::queue 1 thread: Avg: 0.0358us Range: [0.0357us, 0.0358us] Ops/s: 27.96M Ops/s/t: 27.96M 2 threads: Avg: 0.2404us Range: [0.2268us, 0.2599us] Ops/s: 8.32M Ops/s/t: 4.16M 4 threads: Avg: 7.3158us Range: [6.9033us, 8.1491us] Ops/s: 546.76k Ops/s/t: 136.69k 8 threads: Avg: 0.0487ms Range: [0.0465ms, 0.0492ms] Ops/s: 164.38k Ops/s/t: 20.55k 32 threads: Avg: 0.5564ms Range: [0.5395ms, 0.5664ms] Ops/s: 57.51k Ops/s/t: 1.80k Operations per second per thread (weighted average): 2.65M > tbb::concurrent_queue 1 thread: Avg: 0.0301us Range: [0.0301us, 0.0301us] Ops/s: 33.25M Ops/s/t: 33.25M 2 threads: Avg: 0.5946us Range: [0.5919us, 0.5973us] Ops/s: 3.36M Ops/s/t: 1.68M 4 threads: Avg: 1.9060us Range: [1.9048us, 1.9069us] Ops/s: 2.10M Ops/s/t: 524.66k 8 threads: Avg: 0.0105ms Range: [0.0105ms, 0.0105ms] Ops/s: 761.71k Ops/s/t: 95.21k 32 threads: Avg: 0.2255ms Range: [0.2248ms, 0.2259ms] Ops/s: 141.91k Ops/s/t: 4.43k Operations per second per thread (weighted average): 2.87M > SimpleLockFreeQueue 1 thread: Avg: 0.0460us Range: [0.0460us, 0.0460us] Ops/s: 21.73M Ops/s/t: 21.73M 2 threads: Avg: 1.2065us Range: [1.2053us, 1.2073us] Ops/s: 1.66M Ops/s/t: 828.82k 4 threads: Avg: 4.9670us Range: [4.3212us, 5.1403us] Ops/s: 805.32k Ops/s/t: 201.33k 8 threads: Avg: 0.0192ms Range: [0.0188ms, 0.0194ms] Ops/s: 417.06k Ops/s/t: 52.13k 32 threads: Avg: 0.2600ms Range: [0.2589ms, 0.2607ms] Ops/s: 123.06k Ops/s/t: 3.85k Operations per second per thread (weighted average): 1.82M > LockBasedQueue 1 thread: Avg: 0.0553us Range: [0.0552us, 0.0553us] Ops/s: 18.09M Ops/s/t: 18.09M 2 threads: Avg: 0.4806us Range: [0.4753us, 0.4859us] Ops/s: 4.16M Ops/s/t: 2.08M 4 threads: Avg: 4.9843us Range: [4.7319us, 5.1623us] Ops/s: 802.51k Ops/s/t: 200.63k 8 threads: Avg: 0.0218ms Range: [0.0202ms, 0.0223ms] Ops/s: 366.19k Ops/s/t: 45.77k 32 threads: Avg: 0.2786ms Range: [0.2736ms, 0.2813ms] Ops/s: 114.85k Ops/s/t: 3.59k Operations per second per thread (weighted average): 1.67M > std::queue 1 thread: Avg: 5.1703ns Range: [5.1616ns, 5.1739ns] Ops/s: 193.41M Ops/s/t: 193.41M Operations per second per thread (weighted average): 193.41M only enqueue bulk: (Measures the average speed of enqueueing an item in bulk when all threads are producers) > moodycamel::ConcurrentQueue Without tokens 1 thread: Avg: 4.3278ns Range: [4.3220ns, 4.3302ns] Ops/s: 231.07M Ops/s/t: 231.07M 2 threads: Avg: 8.6521ns Range: [8.6212ns, 8.6733ns] Ops/s: 231.16M Ops/s/t: 115.58M 4 threads: Avg: 0.0175us Range: [0.0174us, 0.0175us] Ops/s: 228.85M Ops/s/t: 57.21M 8 threads: Avg: 0.0340us Range: [0.0338us, 0.0341us] Ops/s: 235.47M Ops/s/t: 29.43M 12 threads: Avg: 0.0595us Range: [0.0593us, 0.0597us] Ops/s: 201.65M Ops/s/t: 16.80M 16 threads: Avg: 0.1129us Range: [0.1018us, 0.1191us] Ops/s: 141.69M Ops/s/t: 8.86M 32 threads: Avg: 0.3418us Range: [0.3295us, 0.3519us] Ops/s: 93.62M Ops/s/t: 2.93M 48 threads: Avg: 0.5520us Range: [0.5256us, 0.5639us] Ops/s: 86.96M Ops/s/t: 1.81M Operations per second per thread (weighted average): 32.34M With tokens 1 thread: Avg: 4.0631ns Range: [4.0621ns, 4.0644ns] Ops/s: 246.12M Ops/s/t: 246.12M 2 threads: Avg: 8.6975ns Range: [8.6641ns, 8.7179ns] Ops/s: 229.95M Ops/s/t: 114.98M 4 threads: Avg: 0.0182us Range: [0.0181us, 0.0182us] Ops/s: 220.30M Ops/s/t: 55.08M 8 threads: Avg: 0.0392us Range: [0.0390us, 0.0393us] Ops/s: 203.85M Ops/s/t: 25.48M 12 threads: Avg: 0.0685us Range: [0.0682us, 0.0687us] Ops/s: 175.15M Ops/s/t: 14.60M 16 threads: Avg: 0.1134us Range: [0.1122us, 0.1142us] Ops/s: 141.05M Ops/s/t: 8.82M 32 threads: Avg: 0.3856us Range: [0.3822us, 0.3872us] Ops/s: 82.99M Ops/s/t: 2.59M 48 threads: Avg: 0.5514us Range: [0.5408us, 0.5617us] Ops/s: 87.05M Ops/s/t: 1.81M Operations per second per thread (weighted average): 32.54M > boost::lockfree::queue (skipping, benchmark not supported...) > tbb::concurrent_queue (skipping, benchmark not supported...) > SimpleLockFreeQueue (skipping, benchmark not supported...) > LockBasedQueue (skipping, benchmark not supported...) > std::queue (skipping, benchmark not supported...) only enqueue bulk (pre-allocated): (Measures the average speed of enqueueing an item in bulk when all threads are producers, and the queue has been stretched out first) > moodycamel::ConcurrentQueue Without tokens 1 thread: Avg: 4.3689ns Range: [4.3676ns, 4.3710ns] Ops/s: 228.89M Ops/s/t: 228.89M 2 threads: Avg: 8.9038ns Range: [8.8807ns, 8.9141ns] Ops/s: 224.62M Ops/s/t: 112.31M 4 threads: Avg: 0.0188us Range: [0.0188us, 0.0189us] Ops/s: 212.28M Ops/s/t: 53.07M 8 threads: Avg: 0.0411us Range: [0.0410us, 0.0413us] Ops/s: 194.54M Ops/s/t: 24.32M 32 threads: Avg: 0.4054us Range: [0.3987us, 0.4083us] Ops/s: 78.93M Ops/s/t: 2.47M Operations per second per thread (weighted average): 44.70M With tokens 1 thread: Avg: 4.0712ns Range: [4.0682ns, 4.0741ns] Ops/s: 245.63M Ops/s/t: 245.63M 2 threads: Avg: 8.9105ns Range: [8.8472ns, 8.9616ns] Ops/s: 224.46M Ops/s/t: 112.23M 4 threads: Avg: 0.0185us Range: [0.0184us, 0.0185us] Ops/s: 216.46M Ops/s/t: 54.12M 8 threads: Avg: 0.0397us Range: [0.0396us, 0.0399us] Ops/s: 201.28M Ops/s/t: 25.16M 32 threads: Avg: 0.3868us Range: [0.3856us, 0.3875us] Ops/s: 82.73M Ops/s/t: 2.59M Operations per second per thread (weighted average): 46.39M > boost::lockfree::queue (skipping, benchmark not supported...) > tbb::concurrent_queue (skipping, benchmark not supported...) > SimpleLockFreeQueue (skipping, benchmark not supported...) > LockBasedQueue (skipping, benchmark not supported...) > std::queue (skipping, benchmark not supported...) only dequeue: (Measures the average operation speed when all threads are consumers) > moodycamel::ConcurrentQueue Without tokens 1 thread: Avg: 0.0357us Range: [0.0357us, 0.0357us] Ops/s: 27.99M Ops/s/t: 27.99M 2 threads: Avg: 0.7098us Range: [0.7086us, 0.7108us] Ops/s: 2.82M Ops/s/t: 1.41M 4 threads: Avg: 2.6890us Range: [2.6831us, 2.6970us] Ops/s: 1.49M Ops/s/t: 371.89k 8 threads: Avg: 8.9909us Range: [8.5916us, 9.1297us] Ops/s: 889.79k Ops/s/t: 111.22k 12 threads: Avg: 0.0187ms Range: [0.0185ms, 0.0188ms] Ops/s: 642.71k Ops/s/t: 53.56k 16 threads: Avg: 0.0317ms Range: [0.0310ms, 0.0321ms] Ops/s: 504.92k Ops/s/t: 31.56k 32 threads: Avg: 0.0862ms Range: [0.0855ms, 0.0865ms] Ops/s: 371.38k Ops/s/t: 11.61k 48 threads: Avg: 0.2111ms Range: [0.2092ms, 0.2126ms] Ops/s: 227.42k Ops/s/t: 4.74k Operations per second per thread (weighted average): 984.16k With tokens 1 thread: Avg: 0.0312us Range: [0.0312us, 0.0312us] Ops/s: 32.04M Ops/s/t: 32.04M 2 threads: Avg: 0.0692us Range: [0.0691us, 0.0693us] Ops/s: 28.89M Ops/s/t: 14.45M 4 threads: Avg: 0.1392us Range: [0.1389us, 0.1394us] Ops/s: 28.74M Ops/s/t: 7.18M 8 threads: Avg: 0.2820us Range: [0.2804us, 0.2831us] Ops/s: 28.36M Ops/s/t: 3.55M 12 threads: Avg: 0.4334us Range: [0.4315us, 0.4349us] Ops/s: 27.69M Ops/s/t: 2.31M 16 threads: Avg: 0.5946us Range: [0.5828us, 0.6055us] Ops/s: 26.91M Ops/s/t: 1.68M 32 threads: Avg: 8.8624us Range: [7.6002us, 9.7372us] Ops/s: 3.61M Ops/s/t: 112.84k 48 threads: Avg: 0.0125ms Range: [0.0115ms, 0.0136ms] Ops/s: 3.83M Ops/s/t: 79.79k Operations per second per thread (weighted average): 3.48M > boost::lockfree::queue 1 thread: Avg: 0.0293us Range: [0.0293us, 0.0293us] Ops/s: 34.15M Ops/s/t: 34.15M 2 threads: Avg: 1.2354us Range: [1.2319us, 1.2374us] Ops/s: 1.62M Ops/s/t: 809.45k 4 threads: Avg: 4.7702us Range: [3.9572us, 4.8897us] Ops/s: 838.53k Ops/s/t: 209.63k 8 threads: Avg: 0.0188ms Range: [0.0185ms, 0.0189ms] Ops/s: 426.57k Ops/s/t: 53.32k 12 threads: Avg: 0.0436ms Range: [0.0429ms, 0.0439ms] Ops/s: 275.09k Ops/s/t: 22.92k 16 threads: Avg: 0.0829ms Range: [0.0807ms, 0.0835ms] Ops/s: 192.92k Ops/s/t: 12.06k 32 threads: Avg: 0.3059ms Range: [0.3049ms, 0.3070ms] Ops/s: 104.60k Ops/s/t: 3.27k 48 threads: Avg: 0.7265ms Range: [0.7189ms, 0.7301ms] Ops/s: 66.07k Ops/s/t: 1.38k Operations per second per thread (weighted average): 1.10M > tbb::concurrent_queue 1 thread: Avg: 0.0197us Range: [0.0197us, 0.0197us] Ops/s: 50.68M Ops/s/t: 50.68M 2 threads: Avg: 0.3747us Range: [0.2215us, 0.3976us] Ops/s: 5.34M Ops/s/t: 2.67M 4 threads: Avg: 2.1049us Range: [1.4759us, 2.1970us] Ops/s: 1.90M Ops/s/t: 475.08k 8 threads: Avg: 0.0109ms Range: [0.0107ms, 0.0111ms] Ops/s: 731.00k Ops/s/t: 91.38k 12 threads: Avg: 0.0255ms Range: [0.0254ms, 0.0255ms] Ops/s: 471.40k Ops/s/t: 39.28k 16 threads: Avg: 0.0431ms Range: [0.0386ms, 0.0456ms] Ops/s: 371.22k Ops/s/t: 23.20k 32 threads: Avg: 0.1530ms Range: [0.1520ms, 0.1536ms] Ops/s: 209.18k Ops/s/t: 6.54k 48 threads: Avg: 0.6456ms Range: [0.6427ms, 0.6491ms] Ops/s: 74.35k Ops/s/t: 1.55k Operations per second per thread (weighted average): 1.82M > SimpleLockFreeQueue 1 thread: Avg: 0.0244us Range: [0.0244us, 0.0245us] Ops/s: 40.92M Ops/s/t: 40.92M 2 threads: Avg: 1.5279us Range: [1.5107us, 1.5381us] Ops/s: 1.31M Ops/s/t: 654.49k 4 threads: Avg: 9.8623us Range: [9.7481us, 9.8987us] Ops/s: 405.59k Ops/s/t: 101.40k 8 threads: Avg: 0.0504ms Range: [0.0470ms, 0.0522ms] Ops/s: 158.77k Ops/s/t: 19.85k 12 threads: Avg: 0.1378ms Range: [0.1328ms, 0.1407ms] Ops/s: 87.11k Ops/s/t: 7.26k 16 threads: Avg: 0.2761ms Range: [0.2702ms, 0.2790ms] Ops/s: 57.96k Ops/s/t: 3.62k 32 threads: Avg: 0.9643ms Range: [0.9583ms, 0.9689ms] Ops/s: 33.18k Ops/s/t: 1.04k 48 threads: Avg: 2.1728ms Range: [2.1511ms, 2.1824ms] Ops/s: 22.09k Ops/s/t: 460.24 Operations per second per thread (weighted average): 1.28M > LockBasedQueue 1 thread: Avg: 0.0457us Range: [0.0457us, 0.0457us] Ops/s: 21.87M Ops/s/t: 21.87M 2 threads: Avg: 0.3881us Range: [0.3595us, 0.4002us] Ops/s: 5.15M Ops/s/t: 2.58M 4 threads: Avg: 8.5581us Range: [8.3268us, 8.6466us] Ops/s: 467.39k Ops/s/t: 116.85k 8 threads: Avg: 0.0367ms Range: [0.0346ms, 0.0372ms] Ops/s: 218.20k Ops/s/t: 27.27k 12 threads: Avg: 0.0824ms Range: [0.0806ms, 0.0830ms] Ops/s: 145.71k Ops/s/t: 12.14k 16 threads: Avg: 0.1363ms Range: [0.1032ms, 0.1443ms] Ops/s: 117.36k Ops/s/t: 7.34k 32 threads: Avg: 0.4370ms Range: [0.4082ms, 0.4561ms] Ops/s: 73.23k Ops/s/t: 2.29k 48 threads: Avg: 0.7839ms Range: [0.7233ms, 0.8163ms] Ops/s: 61.23k Ops/s/t: 1.28k Operations per second per thread (weighted average): 837.50k > std::queue 1 thread: Avg: 3.2964ns Range: [3.2952ns, 3.2980ns] Ops/s: 303.36M Ops/s/t: 303.36M 1 thread: Avg: 3.2976ns Range: [3.2950ns, 3.2985ns] Ops/s: 303.25M Ops/s/t: 303.25M Operations per second per thread (weighted average): 303.31M only dequeue bulk: (Measures the average speed of dequeueing an item in bulk when all threads are consumers) > moodycamel::ConcurrentQueue Without tokens 1 thread: Avg: 1.3818ns Range: [1.3812ns, 1.3828ns] Ops/s: 723.68M Ops/s/t: 723.68M 2 threads: Avg: 8.9961ns Range: [8.9915ns, 8.9977ns] Ops/s: 222.32M Ops/s/t: 111.16M 4 threads: Avg: 0.0390us Range: [0.0389us, 0.0391us] Ops/s: 102.59M Ops/s/t: 25.65M 8 threads: Avg: 0.1611us Range: [0.1607us, 0.1614us] Ops/s: 49.65M Ops/s/t: 6.21M 12 threads: Avg: 0.3702us Range: [0.3327us, 0.3803us] Ops/s: 32.42M Ops/s/t: 2.70M 16 threads: Avg: 0.6996us Range: [0.6953us, 0.7054us] Ops/s: 22.87M Ops/s/t: 1.43M 32 threads: Avg: 2.3975us Range: [2.3849us, 2.4046us] Ops/s: 13.35M Ops/s/t: 417.11k 48 threads: Avg: 5.1981us Range: [5.1573us, 5.2400us] Ops/s: 9.23M Ops/s/t: 192.38k Operations per second per thread (weighted average): 30.54M With tokens 1 thread: Avg: 1.2074ns Range: [1.2052ns, 1.2110ns] Ops/s: 828.20M Ops/s/t: 828.20M 2 threads: Avg: 2.8806ns Range: [2.8747ns, 2.8845ns] Ops/s: 694.30M Ops/s/t: 347.15M 4 threads: Avg: 5.7023ns Range: [5.6673ns, 5.7191ns] Ops/s: 701.47M Ops/s/t: 175.37M 8 threads: Avg: 0.0126us Range: [0.0126us, 0.0127us] Ops/s: 634.07M Ops/s/t: 79.26M 12 threads: Avg: 0.0213us Range: [0.0213us, 0.0213us] Ops/s: 563.18M Ops/s/t: 46.93M 16 threads: Avg: 0.0323us Range: [0.0323us, 0.0324us] Ops/s: 494.72M Ops/s/t: 30.92M 32 threads: Avg: 0.1146us Range: [0.1121us, 0.1151us] Ops/s: 279.12M Ops/s/t: 8.72M 48 threads: Avg: 0.1535us Range: [0.1530us, 0.1538us] Ops/s: 312.73M Ops/s/t: 6.52M Operations per second per thread (weighted average): 86.51M > boost::lockfree::queue (skipping, benchmark not supported...) > tbb::concurrent_queue (skipping, benchmark not supported...) > SimpleLockFreeQueue (skipping, benchmark not supported...) > LockBasedQueue (skipping, benchmark not supported...) > std::queue (skipping, benchmark not supported...) mostly enqueue: (Measures the average operation speed when most threads are enqueueing) > moodycamel::ConcurrentQueue Without tokens 2 threads: Avg: 0.1469us Range: [0.0750us, 0.1572us] Ops/s: 13.61M Ops/s/t: 6.81M 4 threads: Avg: 0.1857us Range: [0.1846us, 0.1868us] Ops/s: 21.54M Ops/s/t: 5.38M 8 threads: Avg: 0.8476us Range: [0.8309us, 0.8565us] Ops/s: 9.44M Ops/s/t: 1.18M 32 threads: Avg: 9.9740us Range: [9.8477us, 0.0101ms] Ops/s: 3.21M Ops/s/t: 100.26k Operations per second per thread (weighted average): 2.04M With tokens 2 threads: Avg: 0.0950us Range: [0.0891us, 0.0964us] Ops/s: 21.04M Ops/s/t: 10.52M 4 threads: Avg: 0.0852us Range: [0.0852us, 0.0853us] Ops/s: 46.94M Ops/s/t: 11.74M 8 threads: Avg: 0.2579us Range: [0.1719us, 0.4591us] Ops/s: 31.02M Ops/s/t: 3.88M 32 threads: Avg: 3.4474us Range: [1.9589us, 4.7942us] Ops/s: 9.28M Ops/s/t: 290.07k Operations per second per thread (weighted average): 4.28M > boost::lockfree::queue 2 threads: Avg: 0.1359us Range: [0.1334us, 0.1373us] Ops/s: 14.71M Ops/s/t: 7.36M 4 threads: Avg: 4.1708us Range: [3.5076us, 4.3484us] Ops/s: 959.05k Ops/s/t: 239.76k 8 threads: Avg: 0.0262ms Range: [0.0259ms, 0.0264ms] Ops/s: 305.26k Ops/s/t: 38.16k 32 threads: Avg: 0.4770ms Range: [0.4692ms, 0.4830ms] Ops/s: 67.08k Ops/s/t: 2.10k Operations per second per thread (weighted average): 924.62k > tbb::concurrent_queue 2 threads: Avg: 0.1219us Range: [0.1113us, 0.1395us] Ops/s: 16.41M Ops/s/t: 8.20M 4 threads: Avg: 1.5456us Range: [1.5278us, 1.5544us] Ops/s: 2.59M Ops/s/t: 647.00k 8 threads: Avg: 7.6602us Range: [7.3877us, 7.8992us] Ops/s: 1.04M Ops/s/t: 130.54k 32 threads: Avg: 0.1652ms Range: [0.1648ms, 0.1655ms] Ops/s: 193.70k Ops/s/t: 6.05k Operations per second per thread (weighted average): 1.12M > SimpleLockFreeQueue 2 threads: Avg: 0.9759us Range: [0.9742us, 0.9783us] Ops/s: 2.05M Ops/s/t: 1.02M 4 threads: Avg: 4.5384us Range: [3.3258us, 4.7206us] Ops/s: 881.38k Ops/s/t: 220.34k 8 threads: Avg: 0.0169ms Range: [0.0165ms, 0.0172ms] Ops/s: 472.04k Ops/s/t: 59.00k 32 threads: Avg: 0.2282ms Range: [0.2272ms, 0.2293ms] Ops/s: 140.23k Ops/s/t: 4.38k Operations per second per thread (weighted average): 174.92k > LockBasedQueue 2 threads: Avg: 0.2195us Range: [0.2176us, 0.2217us] Ops/s: 9.11M Ops/s/t: 4.55M 4 threads: Avg: 6.7491us Range: [4.7114us, 7.6459us] Ops/s: 592.67k Ops/s/t: 148.17k 8 threads: Avg: 0.0326ms Range: [0.0304ms, 0.0351ms] Ops/s: 245.33k Ops/s/t: 30.67k 32 threads: Avg: 0.4410ms Range: [0.3794ms, 0.4928ms] Ops/s: 72.57k Ops/s/t: 2.27k Operations per second per thread (weighted average): 574.60k > std::queue (skipping, benchmark not supported...) mostly enqueue bulk: (Measures the average speed of enqueueing an item in bulk under light contention) > moodycamel::ConcurrentQueue Without tokens 2 threads: Avg: 8.0674ns Range: [8.0590ns, 8.0748ns] Ops/s: 247.91M Ops/s/t: 123.96M 4 threads: Avg: 0.0184us Range: [0.0183us, 0.0185us] Ops/s: 217.04M Ops/s/t: 54.26M 8 threads: Avg: 0.0383us Range: [0.0380us, 0.0384us] Ops/s: 208.95M Ops/s/t: 26.12M 32 threads: Avg: 0.2972us Range: [0.2858us, 0.3040us] Ops/s: 107.67M Ops/s/t: 3.36M Operations per second per thread (weighted average): 31.66M With tokens 2 threads: Avg: 8.0878ns Range: [7.2902ns, 8.2116ns] Ops/s: 247.29M Ops/s/t: 123.64M 4 threads: Avg: 0.0143us Range: [0.0136us, 0.0146us] Ops/s: 279.47M Ops/s/t: 69.87M 8 threads: Avg: 0.0328us Range: [0.0306us, 0.0378us] Ops/s: 243.54M Ops/s/t: 30.44M 32 threads: Avg: 0.2700us Range: [0.2470us, 0.2801us] Ops/s: 118.51M Ops/s/t: 3.70M Operations per second per thread (weighted average): 35.43M > boost::lockfree::queue (skipping, benchmark not supported...) > tbb::concurrent_queue (skipping, benchmark not supported...) > SimpleLockFreeQueue (skipping, benchmark not supported...) > LockBasedQueue (skipping, benchmark not supported...) > std::queue (skipping, benchmark not supported...) mostly dequeue: (Measures the average operation speed when most threads are dequeueing) > moodycamel::ConcurrentQueue Without tokens 2 threads: Avg: 0.1215us Range: [0.1195us, 0.1224us] Ops/s: 16.46M Ops/s/t: 8.23M 4 threads: Avg: 1.6265us Range: [1.6144us, 1.6423us] Ops/s: 2.46M Ops/s/t: 614.83k 8 threads: Avg: 5.0893us Range: [5.0332us, 5.1180us] Ops/s: 1.57M Ops/s/t: 196.49k Operations per second per thread (weighted average): 2.15M With tokens 2 threads: Avg: 0.1570us Range: [0.1397us, 0.1603us] Ops/s: 12.74M Ops/s/t: 6.37M 4 threads: Avg: 1.5041us Range: [1.5001us, 1.5064us] Ops/s: 2.66M Ops/s/t: 664.87k 8 threads: Avg: 1.5055us Range: [1.4913us, 1.5111us] Ops/s: 5.31M Ops/s/t: 664.24k Operations per second per thread (weighted average): 1.96M > boost::lockfree::queue 2 threads: Avg: 0.4529us Range: [0.4522us, 0.4535us] Ops/s: 4.42M Ops/s/t: 2.21M 4 threads: Avg: 2.2630us Range: [2.0034us, 2.3220us] Ops/s: 1.77M Ops/s/t: 441.90k 8 threads: Avg: 0.0116ms Range: [0.0115ms, 0.0116ms] Ops/s: 690.84k Ops/s/t: 86.35k Operations per second per thread (weighted average): 680.85k > tbb::concurrent_queue 2 threads: Avg: 0.3612us Range: [0.3582us, 0.3629us] Ops/s: 5.54M Ops/s/t: 2.77M 4 threads: Avg: 0.9626us Range: [0.5721us, 1.1233us] Ops/s: 4.16M Ops/s/t: 1.04M 8 threads: Avg: 5.8279us Range: [5.2630us, 6.2185us] Ops/s: 1.37M Ops/s/t: 171.59k Operations per second per thread (weighted average): 1.04M > SimpleLockFreeQueue 2 threads: Avg: 1.1719us Range: [1.1633us, 1.1786us] Ops/s: 1.71M Ops/s/t: 853.34k 4 threads: Avg: 4.9511us Range: [3.2836us, 5.4309us] Ops/s: 807.90k Ops/s/t: 201.97k 8 threads: Avg: 0.0270ms Range: [0.0260ms, 0.0275ms] Ops/s: 295.91k Ops/s/t: 36.99k Operations per second per thread (weighted average): 274.78k > LockBasedQueue 2 threads: Avg: 0.3299us Range: [0.3162us, 0.3417us] Ops/s: 6.06M Ops/s/t: 3.03M 4 threads: Avg: 5.8541us Range: [5.5493us, 6.1109us] Ops/s: 683.28k Ops/s/t: 170.82k 8 threads: Avg: 0.0239ms Range: [0.0227ms, 0.0248ms] Ops/s: 334.93k Ops/s/t: 41.87k Operations per second per thread (weighted average): 760.33k > std::queue (skipping, benchmark not supported...) mostly dequeue bulk: (Measures the average speed of dequeueing an item in bulk under light contention) > moodycamel::ConcurrentQueue Without tokens 2 threads: Avg: 0.0108us Range: [0.0103us, 0.0109us] Ops/s: 185.78M Ops/s/t: 92.89M 4 threads: Avg: 0.0373us Range: [0.0372us, 0.0373us] Ops/s: 107.36M Ops/s/t: 26.84M 8 threads: Avg: 0.1495us Range: [0.1462us, 0.1561us] Ops/s: 53.52M Ops/s/t: 6.69M Operations per second per thread (weighted average): 32.67M With tokens 2 threads: Avg: 3.7186ns Range: [3.7151ns, 3.7217ns] Ops/s: 537.84M Ops/s/t: 268.92M 4 threads: Avg: 6.9914ns Range: [6.9631ns, 7.0045ns] Ops/s: 572.13M Ops/s/t: 143.03M 8 threads: Avg: 0.0141us Range: [0.0140us, 0.0143us] Ops/s: 565.65M Ops/s/t: 70.71M Operations per second per thread (weighted average): 138.78M > boost::lockfree::queue (skipping, benchmark not supported...) > tbb::concurrent_queue (skipping, benchmark not supported...) > SimpleLockFreeQueue (skipping, benchmark not supported...) > LockBasedQueue (skipping, benchmark not supported...) > std::queue (skipping, benchmark not supported...) single-producer, multi-consumer (measuring all but 1 thread): (Measures the average speed of dequeueing with only one producer, but multiple consumers) > moodycamel::ConcurrentQueue Without tokens 2 threads: Avg: 0.2405us Range: [0.2389us, 0.2410us] Ops/s: 4.16M Ops/s/t: 4.16M 4 threads: Avg: 4.2169us Range: [3.0232us, 4.7858us] Ops/s: 711.43k Ops/s/t: 237.14k 8 threads: Avg: 5.7117us Range: [4.7950us, 6.1325us] Ops/s: 1.23M Ops/s/t: 175.08k 16 threads: Avg: 8.3830us Range: [8.1155us, 8.6670us] Ops/s: 1.79M Ops/s/t: 119.29k Operations per second per thread (weighted average): 593.96k With tokens 2 threads: Avg: 0.2474us Range: [0.2461us, 0.2485us] Ops/s: 4.04M Ops/s/t: 4.04M 4 threads: Avg: 3.3233us Range: [3.1959us, 3.4740us] Ops/s: 902.71k Ops/s/t: 300.90k 8 threads: Avg: 5.0620us Range: [4.0865us, 5.8400us] Ops/s: 1.38M Ops/s/t: 197.55k 16 threads: Avg: 0.0105ms Range: [6.5440us, 0.0153ms] Ops/s: 1.42M Ops/s/t: 94.84k Operations per second per thread (weighted average): 589.43k > boost::lockfree::queue 2 threads: Avg: 0.1318us Range: [0.1267us, 0.1376us] Ops/s: 7.59M Ops/s/t: 7.59M 4 threads: Avg: 0.3896us Range: [0.3650us, 0.4586us] Ops/s: 7.70M Ops/s/t: 2.57M 8 threads: Avg: 0.8681us Range: [0.8362us, 0.9220us] Ops/s: 8.06M Ops/s/t: 1.15M 16 threads: Avg: 2.4247us Range: [2.3627us, 2.4832us] Ops/s: 6.19M Ops/s/t: 412.42k Operations per second per thread (weighted average): 1.80M > tbb::concurrent_queue 2 threads: Avg: 0.3890us Range: [0.3863us, 0.3925us] Ops/s: 2.57M Ops/s/t: 2.57M 4 threads: Avg: 0.3788us Range: [0.2911us, 1.0901us] Ops/s: 7.92M Ops/s/t: 2.64M 8 threads: Avg: 0.6557us Range: [0.5637us, 1.4010us] Ops/s: 10.67M Ops/s/t: 1.52M 16 threads: Avg: 4.2543us Range: [2.0247us, 0.0336ms] Ops/s: 3.53M Ops/s/t: 235.06k Operations per second per thread (weighted average): 1.31M > SimpleLockFreeQueue 2 threads: Avg: 0.5829us Range: [0.4318us, 0.6558us] Ops/s: 1.72M Ops/s/t: 1.72M 4 threads: Avg: 3.7357us Range: [2.8465us, 5.8089us] Ops/s: 803.07k Ops/s/t: 267.69k 8 threads: Avg: 8.7515us Range: [3.1555us, 0.0191ms] Ops/s: 799.86k Ops/s/t: 114.27k 16 threads: Avg: 0.0202ms Range: [0.0126ms, 0.0367ms] Ops/s: 742.55k Ops/s/t: 49.50k Operations per second per thread (weighted average): 288.98k > LockBasedQueue 2 threads: Avg: 0.1033us Range: [0.1021us, 0.1044us] Ops/s: 9.68M Ops/s/t: 9.68M 4 threads: Avg: 2.7103us Range: [2.6647us, 2.7505us] Ops/s: 1.11M Ops/s/t: 368.97k 8 threads: Avg: 8.2018us Range: [7.9971us, 8.4244us] Ops/s: 853.48k Ops/s/t: 121.93k 16 threads: Avg: 0.0284ms Range: [0.0277ms, 0.0289ms] Ops/s: 527.88k Ops/s/t: 35.19k Operations per second per thread (weighted average): 1.17M > std::queue (skipping, benchmark not supported...) single-producer, multi-consumer (pre-produced): (Measures the average speed of dequeueing from a queue pre-filled by one thread) > moodycamel::ConcurrentQueue Without tokens 1 thread: Avg: 0.0357us Range: [0.0357us, 0.0358us] Ops/s: 27.98M Ops/s/t: 27.98M 3 threads: Avg: 1.0896us Range: [1.0892us, 1.0903us] Ops/s: 2.75M Ops/s/t: 917.77k 7 threads: Avg: 7.4992us Range: [7.4811us, 7.5053us] Ops/s: 933.43k Ops/s/t: 133.35k 15 threads: Avg: 0.0361ms Range: [0.0359ms, 0.0362ms] Ops/s: 414.99k Ops/s/t: 27.67k Operations per second per thread (weighted average): 3.25M With tokens 1 thread: Avg: 0.0312us Range: [0.0312us, 0.0312us] Ops/s: 32.05M Ops/s/t: 32.05M 3 threads: Avg: 1.8365us Range: [1.8311us, 1.8400us] Ops/s: 1.63M Ops/s/t: 544.51k 7 threads: Avg: 8.9960us Range: [8.9815us, 9.0019us] Ops/s: 778.12k Ops/s/t: 111.16k 15 threads: Avg: 0.0384ms Range: [0.0366ms, 0.0393ms] Ops/s: 390.49k Ops/s/t: 26.03k Operations per second per thread (weighted average): 3.61M > boost::lockfree::queue 1 thread: Avg: 0.0292us Range: [0.0291us, 0.0293us] Ops/s: 34.26M Ops/s/t: 34.26M 3 threads: Avg: 2.4113us Range: [2.3990us, 2.4172us] Ops/s: 1.24M Ops/s/t: 414.71k 7 threads: Avg: 0.0127ms Range: [0.0125ms, 0.0127ms] Ops/s: 552.70k Ops/s/t: 78.96k 15 threads: Avg: 0.0676ms Range: [0.0670ms, 0.0681ms] Ops/s: 221.74k Ops/s/t: 14.78k Operations per second per thread (weighted average): 3.81M > tbb::concurrent_queue 1 thread: Avg: 0.0199us Range: [0.0199us, 0.0199us] Ops/s: 50.16M Ops/s/t: 50.16M 3 threads: Avg: 1.3713us Range: [1.3567us, 1.3797us] Ops/s: 2.19M Ops/s/t: 729.25k 7 threads: Avg: 4.9943us Range: [4.1482us, 5.3368us] Ops/s: 1.40M Ops/s/t: 200.23k 15 threads: Avg: 0.0289ms Range: [0.0224ms, 0.0332ms] Ops/s: 519.87k Ops/s/t: 34.66k Operations per second per thread (weighted average): 5.63M > SimpleLockFreeQueue 1 thread: Avg: 0.0245us Range: [0.0244us, 0.0245us] Ops/s: 40.88M Ops/s/t: 40.88M 3 threads: Avg: 3.0130us Range: [2.3021us, 3.4232us] Ops/s: 995.68k Ops/s/t: 331.89k 7 threads: Avg: 0.0293ms Range: [0.0260ms, 0.0304ms] Ops/s: 238.94k Ops/s/t: 34.13k 15 threads: Avg: 0.2168ms Range: [0.2128ms, 0.2191ms] Ops/s: 69.19k Ops/s/t: 4.61k Operations per second per thread (weighted average): 4.49M > LockBasedQueue 1 thread: Avg: 0.0458us Range: [0.0457us, 0.0458us] Ops/s: 21.85M Ops/s/t: 21.85M 3 threads: Avg: 1.5927us Range: [1.3496us, 1.9027us] Ops/s: 1.88M Ops/s/t: 627.87k 7 threads: Avg: 0.0235ms Range: [0.0226ms, 0.0239ms] Ops/s: 297.80k Ops/s/t: 42.54k 15 threads: Avg: 0.0935ms Range: [0.0502ms, 0.1009ms] Ops/s: 160.48k Ops/s/t: 10.70k Operations per second per thread (weighted average): 2.50M > std::queue (skipping, benchmark not supported...) multi-producer, single-consumer (measuring 1 thread): (Measures the average speed of dequeueing with only one consumer, but multiple producers) > moodycamel::ConcurrentQueue Without tokens 2 threads: Avg: 0.0729us Range: [0.0726us, 0.0730us] Ops/s: 13.72M Ops/s/t: 13.72M 4 threads: Avg: 0.0507us Range: [0.0506us, 0.0508us] Ops/s: 19.73M Ops/s/t: 19.73M 8 threads: Avg: 0.0844us Range: [0.0839us, 0.0849us] Ops/s: 11.85M Ops/s/t: 11.85M 16 threads: Avg: 0.2197us Range: [0.2190us, 0.2208us] Ops/s: 4.55M Ops/s/t: 4.55M Operations per second per thread (weighted average): 12.46M With tokens 2 threads: Avg: 0.0604us Range: [0.0476us, 0.0624us] Ops/s: 16.55M Ops/s/t: 16.55M 4 threads: Avg: 0.0356us Range: [0.0354us, 0.0357us] Ops/s: 28.11M Ops/s/t: 28.11M 8 threads: Avg: 0.0331us Range: [0.0330us, 0.0332us] Ops/s: 30.21M Ops/s/t: 30.21M 16 threads: Avg: 0.0326us Range: [0.0325us, 0.0326us] Ops/s: 30.70M Ops/s/t: 30.70M Operations per second per thread (weighted average): 26.39M > boost::lockfree::queue 2 threads: Avg: 0.0476us Range: [0.0460us, 0.0491us] Ops/s: 21.02M Ops/s/t: 21.02M 4 threads: Avg: 0.5888us Range: [0.4460us, 0.6260us] Ops/s: 1.70M Ops/s/t: 1.70M 8 threads: Avg: 0.2697us Range: [0.1050us, 0.7683us] Ops/s: 3.71M Ops/s/t: 3.71M 16 threads: Avg: 1.0713us Range: [1.0330us, 1.0920us] Ops/s: 933.44k Ops/s/t: 933.44k Operations per second per thread (weighted average): 6.84M > tbb::concurrent_queue 2 threads: Avg: 0.2368us Range: [0.1076us, 0.2808us] Ops/s: 4.22M Ops/s/t: 4.22M 4 threads: Avg: 0.2267us Range: [0.2262us, 0.2269us] Ops/s: 4.41M Ops/s/t: 4.41M 8 threads: Avg: 0.2114us Range: [0.2098us, 0.2120us] Ops/s: 4.73M Ops/s/t: 4.73M 16 threads: Avg: 0.2197us Range: [0.2171us, 0.2202us] Ops/s: 4.55M Ops/s/t: 4.55M Operations per second per thread (weighted average): 4.48M > SimpleLockFreeQueue 2 threads: Avg: 0.3092us Range: [0.2127us, 0.4384us] Ops/s: 3.23M Ops/s/t: 3.23M 4 threads: Avg: 0.4952us Range: [0.4757us, 0.5015us] Ops/s: 2.02M Ops/s/t: 2.02M 8 threads: Avg: 0.3858us Range: [0.3843us, 0.3862us] Ops/s: 2.59M Ops/s/t: 2.59M 16 threads: Avg: 0.3647us Range: [0.3629us, 0.3660us] Ops/s: 2.74M Ops/s/t: 2.74M Operations per second per thread (weighted average): 2.65M > LockBasedQueue 2 threads: Avg: 0.1043us Range: [0.0981us, 0.1714us] Ops/s: 9.59M Ops/s/t: 9.59M 4 threads: Avg: 0.7658us Range: [0.7038us, 0.8431us] Ops/s: 1.31M Ops/s/t: 1.31M 8 threads: Avg: 0.6372us Range: [0.6062us, 0.6615us] Ops/s: 1.57M Ops/s/t: 1.57M 16 threads: Avg: 0.5428us Range: [0.5134us, 0.5528us] Ops/s: 1.84M Ops/s/t: 1.84M Operations per second per thread (weighted average): 3.58M > std::queue (skipping, benchmark not supported...) dequeue from empty: (Measures the average speed of attempting to dequeue from an empty queue (that eight separate threads had at one point enqueued to)) > moodycamel::ConcurrentQueue Without tokens 1 thread: Avg: 0.1438us Range: [0.0266us, 0.1617us] Ops/s: 6.96M Ops/s/t: 6.96M ^ Note: No contention -- measures raw failed dequeue speed on empty queue 2 threads: Avg: 0.2659us Range: [0.0935us, 0.3182us] Ops/s: 7.52M Ops/s/t: 3.76M 8 threads: Avg: 1.4211us Range: [1.2605us, 1.5397us] Ops/s: 5.63M Ops/s/t: 703.66k 32 threads: Avg: 0.0106ms Range: [9.5731us, 0.0123ms] Ops/s: 3.02M Ops/s/t: 94.42k Operations per second per thread (weighted average): 1.36M With tokens 1 thread: Avg: 0.0609us Range: [0.0541us, 0.0784us] Ops/s: 16.42M Ops/s/t: 16.42M ^ Note: No contention -- measures raw failed dequeue speed on empty queue 2 threads: Avg: 0.1062us Range: [0.0897us, 0.1442us] Ops/s: 18.84M Ops/s/t: 9.42M 8 threads: Avg: 0.4811us Range: [0.3461us, 0.5677us] Ops/s: 16.63M Ops/s/t: 2.08M 32 threads: Avg: 5.0579us Range: [3.0195us, 7.0480us] Ops/s: 6.33M Ops/s/t: 197.71k Operations per second per thread (weighted average): 3.37M > boost::lockfree::queue 1 thread: Avg: 4.6996ns Range: [4.6987ns, 4.7002ns] Ops/s: 212.79M Ops/s/t: 212.79M ^ Note: No contention -- measures raw failed dequeue speed on empty queue 2 threads: Avg: 8.7301ns Range: [8.7266ns, 8.7359ns] Ops/s: 229.09M Ops/s/t: 114.55M 8 threads: Avg: 0.0349us Range: [0.0348us, 0.0349us] Ops/s: 229.54M Ops/s/t: 28.69M 32 threads: Avg: 0.2145us Range: [0.2145us, 0.2145us] Ops/s: 149.19M Ops/s/t: 4.66M Operations per second per thread (weighted average): 44.25M > tbb::concurrent_queue 1 thread: Avg: 3.6913ns Range: [3.6889ns, 3.6921ns] Ops/s: 270.91M Ops/s/t: 270.91M ^ Note: No contention -- measures raw failed dequeue speed on empty queue 2 threads: Avg: 7.3977ns Range: [7.3920ns, 7.4032ns] Ops/s: 270.36M Ops/s/t: 135.18M 8 threads: Avg: 0.0296us Range: [0.0296us, 0.0296us] Ops/s: 270.48M Ops/s/t: 33.81M 32 threads: Avg: 0.1744us Range: [0.1743us, 0.1745us] Ops/s: 183.45M Ops/s/t: 5.73M Operations per second per thread (weighted average): 54.14M > SimpleLockFreeQueue 1 thread: Avg: 4.8994ns Range: [4.8967ns, 4.9013ns] Ops/s: 204.11M Ops/s/t: 204.11M ^ Note: No contention -- measures raw failed dequeue speed on empty queue 2 threads: Avg: 0.0102us Range: [0.0102us, 0.0102us] Ops/s: 196.03M Ops/s/t: 98.02M 8 threads: Avg: 0.0407us Range: [0.0407us, 0.0408us] Ops/s: 196.35M Ops/s/t: 24.54M 32 threads: Avg: 0.3004us Range: [0.3000us, 0.3009us] Ops/s: 106.53M Ops/s/t: 3.33M Operations per second per thread (weighted average): 39.54M > LockBasedQueue 1 thread: Avg: 0.0251us Range: [0.0251us, 0.0251us] Ops/s: 39.89M Ops/s/t: 39.89M ^ Note: No contention -- measures raw failed dequeue speed on empty queue 2 threads: Avg: 0.1986us Range: [0.1951us, 0.2009us] Ops/s: 10.07M Ops/s/t: 5.03M 8 threads: Avg: 6.3745us Range: [5.5998us, 6.5522us] Ops/s: 1.25M Ops/s/t: 156.87k 32 threads: Avg: 0.0864ms Range: [0.0852ms, 0.0876ms] Ops/s: 370.26k Ops/s/t: 11.57k Operations per second per thread (weighted average): 4.36M > std::queue 1 thread: Avg: 0.6708ns Range: [0.6705ns, 0.6710ns] Ops/s: 1.49G Ops/s/t: 1.49G ^ Note: No contention -- measures raw failed dequeue speed on empty queue Operations per second per thread (weighted average): 1.49G enqueue-dequeue pairs: (Measures the average operation speed with each thread doing an enqueue followed by a dequeue) > moodycamel::ConcurrentQueue Without tokens 1 thread: Avg: 0.0214us Range: [0.0214us, 0.0214us] Ops/s: 46.84M Ops/s/t: 46.84M ^ Note: No contention -- measures speed of immediately dequeueing the item that was just enqueued 2 threads: Avg: 0.1197us Range: [0.0976us, 0.1773us] Ops/s: 16.71M Ops/s/t: 8.35M 4 threads: Avg: 1.3761us Range: [1.2900us, 1.4179us] Ops/s: 2.91M Ops/s/t: 726.67k 8 threads: Avg: 5.7697us Range: [5.6598us, 5.8091us] Ops/s: 1.39M Ops/s/t: 173.32k 32 threads: Avg: 0.0754ms Range: [0.0748ms, 0.0759ms] Ops/s: 424.33k Ops/s/t: 13.26k Operations per second per thread (weighted average): 4.70M With tokens 1 thread: Avg: 0.0170us Range: [0.0170us, 0.0170us] Ops/s: 58.79M Ops/s/t: 58.79M ^ Note: No contention -- measures speed of immediately dequeueing the item that was just enqueued 2 threads: Avg: 0.0498us Range: [0.0485us, 0.0505us] Ops/s: 40.12M Ops/s/t: 20.06M 4 threads: Avg: 0.1080us Range: [0.1024us, 0.1103us] Ops/s: 37.03M Ops/s/t: 9.26M 8 threads: Avg: 0.3397us Range: [0.3264us, 0.3478us] Ops/s: 23.55M Ops/s/t: 2.94M 32 threads: Avg: 9.0299us Range: [8.7799us, 9.2197us] Ops/s: 3.54M Ops/s/t: 110.74k Operations per second per thread (weighted average): 8.89M > boost::lockfree::queue 1 thread: Avg: 0.0328us Range: [0.0328us, 0.0328us] Ops/s: 30.45M Ops/s/t: 30.45M ^ Note: No contention -- measures speed of immediately dequeueing the item that was just enqueued 2 threads: Avg: 1.1448us Range: [0.4117us, 1.2515us] Ops/s: 1.75M Ops/s/t: 873.54k 4 threads: Avg: 4.6480us Range: [4.0236us, 4.8069us] Ops/s: 860.58k Ops/s/t: 215.15k 8 threads: Avg: 0.0198ms Range: [0.0190ms, 0.0208ms] Ops/s: 403.50k Ops/s/t: 50.44k 32 threads: Avg: 0.4098ms Range: [0.4018ms, 0.4142ms] Ops/s: 78.09k Ops/s/t: 2.44k Operations per second per thread (weighted average): 2.50M > tbb::concurrent_queue 1 thread: Avg: 0.0224us Range: [0.0224us, 0.0224us] Ops/s: 44.66M Ops/s/t: 44.66M ^ Note: No contention -- measures speed of immediately dequeueing the item that was just enqueued 2 threads: Avg: 0.5825us Range: [0.5799us, 0.5844us] Ops/s: 3.43M Ops/s/t: 1.72M 4 threads: Avg: 2.5531us Range: [2.1310us, 2.6899us] Ops/s: 1.57M Ops/s/t: 391.67k 8 threads: Avg: 0.0101ms Range: [0.0101ms, 0.0102ms] Ops/s: 789.08k Ops/s/t: 98.64k 32 threads: Avg: 0.1343ms Range: [0.1311ms, 0.1371ms] Ops/s: 238.28k Ops/s/t: 7.45k Operations per second per thread (weighted average): 3.74M > SimpleLockFreeQueue 1 thread: Avg: 0.0429us Range: [0.0429us, 0.0429us] Ops/s: 23.30M Ops/s/t: 23.30M ^ Note: No contention -- measures speed of immediately dequeueing the item that was just enqueued 2 threads: Avg: 0.9275us Range: [0.9030us, 0.9385us] Ops/s: 2.16M Ops/s/t: 1.08M 4 threads: Avg: 5.2883us Range: [5.2680us, 5.2959us] Ops/s: 756.39k Ops/s/t: 189.10k 8 threads: Avg: 0.0297ms Range: [0.0267ms, 0.0315ms] Ops/s: 269.42k Ops/s/t: 33.68k 32 threads: Avg: 0.6158ms Range: [0.6028ms, 0.6242ms] Ops/s: 51.96k Ops/s/t: 1.62k Operations per second per thread (weighted average): 1.96M > LockBasedQueue 1 thread: Avg: 0.0503us Range: [0.0503us, 0.0504us] Ops/s: 19.86M Ops/s/t: 19.86M ^ Note: No contention -- measures speed of immediately dequeueing the item that was just enqueued 2 threads: Avg: 0.4039us Range: [0.3996us, 0.4073us] Ops/s: 4.95M Ops/s/t: 2.48M 4 threads: Avg: 4.8038us Range: [4.0986us, 5.4712us] Ops/s: 832.68k Ops/s/t: 208.17k 8 threads: Avg: 0.0324ms Range: [0.0286ms, 0.0335ms] Ops/s: 246.75k Ops/s/t: 30.84k 32 threads: Avg: 0.3925ms Range: [0.3335ms, 0.4503ms] Ops/s: 81.52k Ops/s/t: 2.55k Operations per second per thread (weighted average): 1.85M > std::queue 1 thread: Avg: 2.7071ns Range: [2.7069ns, 2.7074ns] Ops/s: 369.39M Ops/s/t: 369.39M ^ Note: No contention -- measures speed of immediately dequeueing the item that was just enqueued Operations per second per thread (weighted average): 369.39M heavy concurrent: (Measures the average operation speed with many threads under heavy load) > moodycamel::ConcurrentQueue Without tokens 2 threads: Avg: 0.1211us Range: [0.1163us, 0.1233us] Ops/s: 16.51M Ops/s/t: 8.26M 3 threads: Avg: 0.4467us Range: [0.3247us, 0.4672us] Ops/s: 6.72M Ops/s/t: 2.24M 4 threads: Avg: 0.9646us Range: [0.8831us, 1.0081us] Ops/s: 4.15M Ops/s/t: 1.04M 8 threads: Avg: 2.3965us Range: [2.3389us, 2.4271us] Ops/s: 3.34M Ops/s/t: 417.27k 12 threads: Avg: 4.2654us Range: [4.2042us, 4.3185us] Ops/s: 2.81M Ops/s/t: 234.44k 16 threads: Avg: 6.5713us Range: [6.1844us, 6.6608us] Ops/s: 2.43M Ops/s/t: 152.18k 32 threads: Avg: 0.0330ms Range: [0.0318ms, 0.0333ms] Ops/s: 970.98k Ops/s/t: 30.34k 48 threads: Avg: 0.0612ms Range: [0.0592ms, 0.0625ms] Ops/s: 784.29k Ops/s/t: 16.34k Operations per second per thread (weighted average): 731.94k With tokens 2 threads: Avg: 0.0491us Range: [0.0434us, 0.0508us] Ops/s: 40.77M Ops/s/t: 20.39M 3 threads: Avg: 0.1539us Range: [0.1536us, 0.1541us] Ops/s: 19.50M Ops/s/t: 6.50M 4 threads: Avg: 0.4153us Range: [0.3947us, 0.4259us] Ops/s: 9.63M Ops/s/t: 2.41M 8 threads: Avg: 0.7587us Range: [0.5327us, 0.8894us] Ops/s: 10.54M Ops/s/t: 1.32M 12 threads: Avg: 1.3762us Range: [1.2403us, 1.5247us] Ops/s: 8.72M Ops/s/t: 726.65k 16 threads: Avg: 2.6196us Range: [2.2556us, 2.8414us] Ops/s: 6.11M Ops/s/t: 381.74k 32 threads: Avg: 0.0162ms Range: [9.3597us, 0.0203ms] Ops/s: 1.97M Ops/s/t: 61.66k 48 threads: Avg: 0.0143ms Range: [0.0111ms, 0.0173ms] Ops/s: 3.35M Ops/s/t: 69.85k Operations per second per thread (weighted average): 1.91M > boost::lockfree::queue 2 threads: Avg: 1.2196us Range: [1.2159us, 1.2220us] Ops/s: 1.64M Ops/s/t: 819.95k 3 threads: Avg: 2.2890us Range: [2.2667us, 2.3046us] Ops/s: 1.31M Ops/s/t: 436.88k 4 threads: Avg: 2.9693us Range: [2.9229us, 2.9822us] Ops/s: 1.35M Ops/s/t: 336.78k 8 threads: Avg: 8.9729us Range: [8.8928us, 9.0693us] Ops/s: 891.57k Ops/s/t: 111.45k 12 threads: Avg: 0.0208ms Range: [0.0205ms, 0.0209ms] Ops/s: 577.87k Ops/s/t: 48.16k 16 threads: Avg: 0.0369ms Range: [0.0355ms, 0.0376ms] Ops/s: 433.75k Ops/s/t: 27.11k 32 threads: Avg: 0.3347ms Range: [0.3205ms, 0.3437ms] Ops/s: 95.62k Ops/s/t: 2.99k 48 threads: Avg: 0.7204ms Range: [0.7067ms, 0.7367ms] Ops/s: 66.63k Ops/s/t: 1.39k Operations per second per thread (weighted average): 114.43k > tbb::concurrent_queue 2 threads: Avg: 0.5035us Range: [0.4944us, 0.5064us] Ops/s: 3.97M Ops/s/t: 1.99M 3 threads: Avg: 1.1369us Range: [1.1313us, 1.1402us] Ops/s: 2.64M Ops/s/t: 879.61k 4 threads: Avg: 1.8101us Range: [1.8060us, 1.8148us] Ops/s: 2.21M Ops/s/t: 552.45k 8 threads: Avg: 8.2873us Range: [7.6817us, 8.3997us] Ops/s: 965.34k Ops/s/t: 120.67k 12 threads: Avg: 0.0182ms Range: [0.0174ms, 0.0187ms] Ops/s: 657.96k Ops/s/t: 54.83k 16 threads: Avg: 0.0403ms Range: [0.0354ms, 0.0419ms] Ops/s: 397.38k Ops/s/t: 24.84k 32 threads: Avg: 0.1491ms Range: [0.1353ms, 0.1525ms] Ops/s: 214.58k Ops/s/t: 6.71k 48 threads: Avg: 0.3679ms Range: [0.3642ms, 0.3710ms] Ops/s: 130.46k Ops/s/t: 2.72k Operations per second per thread (weighted average): 218.55k > SimpleLockFreeQueue 2 threads: Avg: 0.8196us Range: [0.3717us, 0.8868us] Ops/s: 2.44M Ops/s/t: 1.22M 3 threads: Avg: 1.6837us Range: [1.6827us, 1.6845us] Ops/s: 1.78M Ops/s/t: 593.94k 4 threads: Avg: 4.5087us Range: [3.7115us, 4.9618us] Ops/s: 887.18k Ops/s/t: 221.79k 8 threads: Avg: 0.0222ms Range: [0.0199ms, 0.0232ms] Ops/s: 360.16k Ops/s/t: 45.02k 12 threads: Avg: 0.0532ms Range: [0.0515ms, 0.0538ms] Ops/s: 225.48k Ops/s/t: 18.79k 16 threads: Avg: 0.0920ms Range: [0.0743ms, 0.0959ms] Ops/s: 174.00k Ops/s/t: 10.88k 32 threads: Avg: 0.4328ms Range: [0.3996ms, 0.4452ms] Ops/s: 73.94k Ops/s/t: 2.31k 48 threads: Avg: 0.8777ms Range: [0.8347ms, 0.8909ms] Ops/s: 54.69k Ops/s/t: 1.14k Operations per second per thread (weighted average): 123.28k > LockBasedQueue 2 threads: Avg: 0.3872us Range: [0.3804us, 0.3916us] Ops/s: 5.17M Ops/s/t: 2.58M 3 threads: Avg: 3.1674us Range: [2.7845us, 3.3797us] Ops/s: 947.16k Ops/s/t: 315.72k 4 threads: Avg: 6.6254us Range: [6.4227us, 6.7718us] Ops/s: 603.74k Ops/s/t: 150.93k 8 threads: Avg: 0.0247ms Range: [0.0213ms, 0.0259ms] Ops/s: 323.74k Ops/s/t: 40.47k 12 threads: Avg: 0.0514ms Range: [0.0499ms, 0.0524ms] Ops/s: 233.56k Ops/s/t: 19.46k 16 threads: Avg: 0.0895ms Range: [0.0873ms, 0.0908ms] Ops/s: 178.78k Ops/s/t: 11.17k 32 threads: Avg: 0.3723ms Range: [0.3626ms, 0.3779ms] Ops/s: 85.95k Ops/s/t: 2.69k 48 threads: Avg: 0.7242ms Range: [0.7031ms, 0.7378ms] Ops/s: 66.28k Ops/s/t: 1.38k Operations per second per thread (weighted average): 169.58k > std::queue (skipping, benchmark not supported...) Overall average operations per second per thread (where higher-concurrency runs have more weight): (Take this summary with a grain of salt -- look at the individual benchmark results for a much better idea of how the queues measure up to each other): moodycamel::ConcurrentQueue (including bulk): 18.50M boost::lockfree::queue: 3.27M tbb::concurrent_queue: 4.21M SimpleLockFreeQueue: 2.90M LockBasedQueue: 1.12M std::queue (single thread only): 436.10M ================================================ FILE: benchmarks/contrib/benchmarks.aws-8.log ================================================ # Run on a 8-core c1.xlarge AWS instance --- New run (Sat Nov 8 19:47:00 2014) --- Running 64-bit benchmarks on an Intel(R) Xeon(R) CPU E5506 @ 2.13GHz (precise mode) Note that these are synthetic benchmarks. Take them with a grain of salt. Legend: 'Avg': Average time taken per operation, normalized to be per thread 'Range': The minimum and maximum times taken per operation (per thread) 'Ops/s': Overall operations per second 'Ops/s/t': Operations per second per thread (inverse of 'Avg') Operations include those that fail (e.g. because the queue is empty). Each logical enqueue/dequeue counts as an individual operation when in bulk. balanced: (Measures the average operation speed with multiple symmetrical threads under reasonable load -- small random intervals between accesses) > moodycamel::ConcurrentQueue Without tokens 2 threads: Avg: 2.1439us Range: [2.0316us, 2.1834us] Ops/s: 932.90k Ops/s/t: 466.45k 3 threads: Avg: 3.8096us Range: [3.3842us, 4.1643us] Ops/s: 787.49k Ops/s/t: 262.50k 4 threads: Avg: 5.5406us Range: [5.0081us, 5.6616us] Ops/s: 721.94k Ops/s/t: 180.48k 8 threads: Avg: 0.0120ms Range: [0.0118ms, 0.0123ms] Ops/s: 664.05k Ops/s/t: 83.01k 12 threads: Avg: 0.0189ms Range: [0.0188ms, 0.0191ms] Ops/s: 633.72k Ops/s/t: 52.81k 16 threads: Avg: 0.0246ms Range: [0.0240ms, 0.0248ms] Ops/s: 650.46k Ops/s/t: 40.65k Operations per second per thread (weighted average): 133.15k With tokens 2 threads: Avg: 2.0623us Range: [2.0364us, 2.0712us] Ops/s: 969.77k Ops/s/t: 484.88k 3 threads: Avg: 3.1724us Range: [3.1542us, 3.2327us] Ops/s: 945.67k Ops/s/t: 315.22k 4 threads: Avg: 4.4476us Range: [4.2467us, 4.6332us] Ops/s: 899.36k Ops/s/t: 224.84k 8 threads: Avg: 0.0101ms Range: [9.7889us, 0.0102ms] Ops/s: 795.01k Ops/s/t: 99.38k 12 threads: Avg: 0.0155ms Range: [0.0150ms, 0.0158ms] Ops/s: 773.39k Ops/s/t: 64.45k 16 threads: Avg: 0.0213ms Range: [0.0206ms, 0.0218ms] Ops/s: 750.30k Ops/s/t: 46.89k Operations per second per thread (weighted average): 153.72k > boost::lockfree::queue 2 threads: Avg: 2.3908us Range: [2.2293us, 2.6284us] Ops/s: 836.54k Ops/s/t: 418.27k 3 threads: Avg: 4.2701us Range: [3.5851us, 4.3783us] Ops/s: 702.55k Ops/s/t: 234.18k 4 threads: Avg: 6.0101us Range: [5.8873us, 6.0534us] Ops/s: 665.55k Ops/s/t: 166.39k 8 threads: Avg: 0.0123ms Range: [0.0120ms, 0.0125ms] Ops/s: 647.96k Ops/s/t: 81.00k 12 threads: Avg: 0.0191ms Range: [0.0189ms, 0.0193ms] Ops/s: 626.99k Ops/s/t: 52.25k 16 threads: Avg: 0.0244ms Range: [0.0234ms, 0.0248ms] Ops/s: 656.16k Ops/s/t: 41.01k Operations per second per thread (weighted average): 123.33k > tbb::concurrent_queue 2 threads: Avg: 2.2272us Range: [2.1376us, 2.3070us] Ops/s: 898.01k Ops/s/t: 449.00k 3 threads: Avg: 4.0825us Range: [4.0605us, 4.1017us] Ops/s: 734.84k Ops/s/t: 244.95k 4 threads: Avg: 5.4065us Range: [5.3347us, 5.4531us] Ops/s: 739.86k Ops/s/t: 184.96k 8 threads: Avg: 0.0115ms Range: [0.0112ms, 0.0116ms] Ops/s: 692.97k Ops/s/t: 86.62k 12 threads: Avg: 0.0171ms Range: [0.0169ms, 0.0172ms] Ops/s: 702.47k Ops/s/t: 58.54k 16 threads: Avg: 0.0228ms Range: [0.0225ms, 0.0232ms] Ops/s: 701.16k Ops/s/t: 43.82k Operations per second per thread (weighted average): 132.93k > SimpleLockFreeQueue 2 threads: Avg: 2.2096us Range: [2.2034us, 2.2123us] Ops/s: 905.15k Ops/s/t: 452.58k 3 threads: Avg: 3.9077us Range: [3.5631us, 4.2803us] Ops/s: 767.71k Ops/s/t: 255.90k 4 threads: Avg: 5.8294us Range: [5.7747us, 5.8686us] Ops/s: 686.17k Ops/s/t: 171.54k 8 threads: Avg: 0.0125ms Range: [0.0121ms, 0.0129ms] Ops/s: 641.39k Ops/s/t: 80.17k 12 threads: Avg: 0.0187ms Range: [0.0184ms, 0.0189ms] Ops/s: 640.76k Ops/s/t: 53.40k 16 threads: Avg: 0.0255ms Range: [0.0244ms, 0.0262ms] Ops/s: 626.32k Ops/s/t: 39.15k Operations per second per thread (weighted average): 129.20k > LockBasedQueue 2 threads: Avg: 2.6149us Range: [2.2393us, 2.8581us] Ops/s: 764.85k Ops/s/t: 382.43k 3 threads: Avg: 5.0743us Range: [4.9853us, 5.0976us] Ops/s: 591.21k Ops/s/t: 197.07k 4 threads: Avg: 7.6434us Range: [7.3726us, 7.7969us] Ops/s: 523.33k Ops/s/t: 130.83k 8 threads: Avg: 0.0302ms Range: [0.0269ms, 0.0328ms] Ops/s: 264.68k Ops/s/t: 33.09k 12 threads: Avg: 0.0637ms Range: [0.0509ms, 0.0682ms] Ops/s: 188.37k Ops/s/t: 15.70k 16 threads: Avg: 0.1120ms Range: [0.1001ms, 0.1184ms] Ops/s: 142.90k Ops/s/t: 8.93k Operations per second per thread (weighted average): 85.99k > std::queue (skipping, benchmark not supported...) only enqueue: (Measures the average operation speed when all threads are producers) > moodycamel::ConcurrentQueue Without tokens 1 thread: Avg: 0.0229us Range: [0.0229us, 0.0230us] Ops/s: 43.58M Ops/s/t: 43.58M 2 threads: Avg: 0.0418us Range: [0.0416us, 0.0419us] Ops/s: 47.84M Ops/s/t: 23.92M 4 threads: Avg: 0.0821us Range: [0.0821us, 0.0822us] Ops/s: 48.71M Ops/s/t: 12.18M 8 threads: Avg: 0.1621us Range: [0.1616us, 0.1625us] Ops/s: 49.35M Ops/s/t: 6.17M 12 threads: Avg: 0.2503us Range: [0.2498us, 0.2507us] Ops/s: 47.94M Ops/s/t: 3.99M 16 threads: Avg: 0.3417us Range: [0.3406us, 0.3428us] Ops/s: 46.82M Ops/s/t: 2.93M Operations per second per thread (weighted average): 12.03M With tokens 1 thread: Avg: 0.0146us Range: [0.0146us, 0.0146us] Ops/s: 68.45M Ops/s/t: 68.45M 2 threads: Avg: 0.0315us Range: [0.0313us, 0.0316us] Ops/s: 63.53M Ops/s/t: 31.77M 4 threads: Avg: 0.0614us Range: [0.0613us, 0.0615us] Ops/s: 65.10M Ops/s/t: 16.27M 8 threads: Avg: 0.1220us Range: [0.1216us, 0.1222us] Ops/s: 65.56M Ops/s/t: 8.20M 12 threads: Avg: 0.1901us Range: [0.1884us, 0.1909us] Ops/s: 63.14M Ops/s/t: 5.26M 16 threads: Avg: 0.2694us Range: [0.2658us, 0.2733us] Ops/s: 59.38M Ops/s/t: 3.71M Operations per second per thread (weighted average): 16.96M > boost::lockfree::queue 1 thread: Avg: 0.0745us Range: [0.0744us, 0.0745us] Ops/s: 13.43M Ops/s/t: 13.43M 2 threads: Avg: 0.7351us Range: [0.6376us, 0.8720us] Ops/s: 2.72M Ops/s/t: 1.36M 4 threads: Avg: 5.9754us Range: [5.5307us, 6.1937us] Ops/s: 669.41k Ops/s/t: 167.35k 8 threads: Avg: 0.0276ms Range: [0.0263ms, 0.0282ms] Ops/s: 289.71k Ops/s/t: 36.21k 12 threads: Avg: 0.0486ms Range: [0.0222ms, 0.0555ms] Ops/s: 246.97k Ops/s/t: 20.58k 16 threads: Avg: 0.1059ms Range: [0.1018ms, 0.1092ms] Ops/s: 151.02k Ops/s/t: 9.44k Operations per second per thread (weighted average): 1.45M > tbb::concurrent_queue 1 thread: Avg: 0.0443us Range: [0.0442us, 0.0443us] Ops/s: 22.60M Ops/s/t: 22.60M 2 threads: Avg: 0.3436us Range: [0.3082us, 0.3696us] Ops/s: 5.82M Ops/s/t: 2.91M 4 threads: Avg: 1.6788us Range: [1.6172us, 1.7061us] Ops/s: 2.38M Ops/s/t: 595.67k 8 threads: Avg: 8.5452us Range: [8.4615us, 8.6459us] Ops/s: 936.20k Ops/s/t: 117.03k 12 threads: Avg: 0.0475ms Range: [0.0469ms, 0.0482ms] Ops/s: 252.43k Ops/s/t: 21.04k 16 threads: Avg: 0.1398ms Range: [0.1317ms, 0.1445ms] Ops/s: 114.48k Ops/s/t: 7.16k Operations per second per thread (weighted average): 2.61M > SimpleLockFreeQueue 1 thread: Avg: 0.0739us Range: [0.0738us, 0.0739us] Ops/s: 13.54M Ops/s/t: 13.54M 2 threads: Avg: 0.4404us Range: [0.4023us, 0.4634us] Ops/s: 4.54M Ops/s/t: 2.27M 4 threads: Avg: 3.1988us Range: [3.1510us, 3.2464us] Ops/s: 1.25M Ops/s/t: 312.62k 8 threads: Avg: 0.0103ms Range: [0.0102ms, 0.0105ms] Ops/s: 774.38k Ops/s/t: 96.80k 12 threads: Avg: 0.0215ms Range: [0.0212ms, 0.0216ms] Ops/s: 557.77k Ops/s/t: 46.48k 16 threads: Avg: 0.0401ms Range: [0.0394ms, 0.0407ms] Ops/s: 398.68k Ops/s/t: 24.92k Operations per second per thread (weighted average): 1.62M > LockBasedQueue 1 thread: Avg: 0.0696us Range: [0.0696us, 0.0696us] Ops/s: 14.36M Ops/s/t: 14.36M 2 threads: Avg: 0.8199us Range: [0.6931us, 0.8818us] Ops/s: 2.44M Ops/s/t: 1.22M 4 threads: Avg: 5.0074us Range: [4.9400us, 5.0589us] Ops/s: 798.82k Ops/s/t: 199.70k 8 threads: Avg: 0.0233ms Range: [0.0220ms, 0.0240ms] Ops/s: 342.66k Ops/s/t: 42.83k 12 threads: Avg: 0.0427ms Range: [0.0218ms, 0.0492ms] Ops/s: 281.23k Ops/s/t: 23.44k 16 threads: Avg: 0.0845ms Range: [0.0782ms, 0.0872ms] Ops/s: 189.45k Ops/s/t: 11.84k Operations per second per thread (weighted average): 1.53M > std::queue 1 thread: Avg: 0.0109us Range: [0.0108us, 0.0109us] Ops/s: 92.13M Ops/s/t: 92.13M Operations per second per thread (weighted average): 92.13M only enqueue (pre-allocated): (Measures the average operation speed when all threads are producers, and the queue has been stretched out first) > moodycamel::ConcurrentQueue Without tokens 1 thread: Avg: 0.0175us Range: [0.0175us, 0.0176us] Ops/s: 56.98M Ops/s/t: 56.98M 2 threads: Avg: 0.0343us Range: [0.0337us, 0.0368us] Ops/s: 58.31M Ops/s/t: 29.15M 4 threads: Avg: 0.1314us Range: [0.1059us, 0.1515us] Ops/s: 30.43M Ops/s/t: 7.61M 8 threads: Avg: 0.5502us Range: [0.4973us, 0.5676us] Ops/s: 14.54M Ops/s/t: 1.82M Operations per second per thread (weighted average): 16.37M With tokens 1 thread: Avg: 8.0792ns Range: [8.0657ns, 8.0857ns] Ops/s: 123.77M Ops/s/t: 123.77M 2 threads: Avg: 0.0199us Range: [0.0198us, 0.0200us] Ops/s: 100.56M Ops/s/t: 50.28M 4 threads: Avg: 0.0362us Range: [0.0361us, 0.0363us] Ops/s: 110.40M Ops/s/t: 27.60M 8 threads: Avg: 0.0730us Range: [0.0724us, 0.0734us] Ops/s: 109.61M Ops/s/t: 13.70M Operations per second per thread (weighted average): 39.88M > boost::lockfree::queue 1 thread: Avg: 0.0477us Range: [0.0476us, 0.0478us] Ops/s: 20.96M Ops/s/t: 20.96M 2 threads: Avg: 0.7644us Range: [0.6611us, 0.8702us] Ops/s: 2.62M Ops/s/t: 1.31M 4 threads: Avg: 6.5308us Range: [6.0638us, 6.9217us] Ops/s: 612.48k Ops/s/t: 153.12k 8 threads: Avg: 0.0276ms Range: [0.0192ms, 0.0292ms] Ops/s: 290.08k Ops/s/t: 36.26k Operations per second per thread (weighted average): 3.21M > tbb::concurrent_queue 1 thread: Avg: 0.0440us Range: [0.0439us, 0.0440us] Ops/s: 22.75M Ops/s/t: 22.75M 2 threads: Avg: 0.2923us Range: [0.2799us, 0.3120us] Ops/s: 6.84M Ops/s/t: 3.42M 4 threads: Avg: 1.5782us Range: [1.4991us, 1.6202us] Ops/s: 2.53M Ops/s/t: 633.63k 8 threads: Avg: 8.5111us Range: [8.4543us, 8.6016us] Ops/s: 939.95k Ops/s/t: 117.49k Operations per second per thread (weighted average): 4.03M > SimpleLockFreeQueue 1 thread: Avg: 0.0563us Range: [0.0563us, 0.0564us] Ops/s: 17.76M Ops/s/t: 17.76M 2 threads: Avg: 0.6085us Range: [0.6031us, 0.6223us] Ops/s: 3.29M Ops/s/t: 1.64M 4 threads: Avg: 4.8504us Range: [3.0550us, 5.2267us] Ops/s: 824.68k Ops/s/t: 206.17k 8 threads: Avg: 0.0211ms Range: [0.0205ms, 0.0215ms] Ops/s: 378.88k Ops/s/t: 47.36k Operations per second per thread (weighted average): 2.85M > LockBasedQueue 1 thread: Avg: 0.0698us Range: [0.0698us, 0.0698us] Ops/s: 14.33M Ops/s/t: 14.33M 2 threads: Avg: 0.7667us Range: [0.7002us, 0.8237us] Ops/s: 2.61M Ops/s/t: 1.30M 4 threads: Avg: 5.0945us Range: [4.9227us, 5.1724us] Ops/s: 785.17k Ops/s/t: 196.29k 8 threads: Avg: 0.0233ms Range: [0.0224ms, 0.0241ms] Ops/s: 343.59k Ops/s/t: 42.95k Operations per second per thread (weighted average): 2.30M > std::queue 1 thread: Avg: 0.0107us Range: [0.0107us, 0.0107us] Ops/s: 93.28M Ops/s/t: 93.28M Operations per second per thread (weighted average): 93.28M only enqueue bulk: (Measures the average speed of enqueueing an item in bulk when all threads are producers) > moodycamel::ConcurrentQueue Without tokens 1 thread: Avg: 8.7326ns Range: [8.7251ns, 8.7431ns] Ops/s: 114.51M Ops/s/t: 114.51M 2 threads: Avg: 0.0174us Range: [0.0171us, 0.0176us] Ops/s: 114.97M Ops/s/t: 57.49M 4 threads: Avg: 0.0346us Range: [0.0342us, 0.0347us] Ops/s: 115.60M Ops/s/t: 28.90M 8 threads: Avg: 0.0669us Range: [0.0605us, 0.0692us] Ops/s: 119.51M Ops/s/t: 14.94M 12 threads: Avg: 0.1146us Range: [0.1120us, 0.1169us] Ops/s: 104.72M Ops/s/t: 8.73M 16 threads: Avg: 0.1741us Range: [0.1700us, 0.1769us] Ops/s: 91.92M Ops/s/t: 5.75M Operations per second per thread (weighted average): 28.44M With tokens 1 thread: Avg: 8.7317ns Range: [8.7133ns, 8.7451ns] Ops/s: 114.53M Ops/s/t: 114.53M 2 threads: Avg: 0.0186us Range: [0.0184us, 0.0187us] Ops/s: 107.81M Ops/s/t: 53.91M 4 threads: Avg: 0.0382us Range: [0.0378us, 0.0383us] Ops/s: 104.74M Ops/s/t: 26.19M 8 threads: Avg: 0.0793us Range: [0.0790us, 0.0796us] Ops/s: 100.83M Ops/s/t: 12.60M 12 threads: Avg: 0.1229us Range: [0.1217us, 0.1232us] Ops/s: 97.64M Ops/s/t: 8.14M 16 threads: Avg: 0.1745us Range: [0.1677us, 0.1802us] Ops/s: 91.69M Ops/s/t: 5.73M Operations per second per thread (weighted average): 27.74M > boost::lockfree::queue (skipping, benchmark not supported...) > tbb::concurrent_queue (skipping, benchmark not supported...) > SimpleLockFreeQueue (skipping, benchmark not supported...) > LockBasedQueue (skipping, benchmark not supported...) > std::queue (skipping, benchmark not supported...) only enqueue bulk (pre-allocated): (Measures the average speed of enqueueing an item in bulk when all threads are producers, and the queue has been stretched out first) > moodycamel::ConcurrentQueue Without tokens 1 thread: Avg: 9.0071ns Range: [8.9924ns, 9.0178ns] Ops/s: 111.02M Ops/s/t: 111.02M 2 threads: Avg: 0.0187us Range: [0.0184us, 0.0188us] Ops/s: 106.79M Ops/s/t: 53.40M 4 threads: Avg: 0.0395us Range: [0.0393us, 0.0397us] Ops/s: 101.25M Ops/s/t: 25.31M 8 threads: Avg: 0.0831us Range: [0.0823us, 0.0835us] Ops/s: 96.28M Ops/s/t: 12.04M Operations per second per thread (weighted average): 37.45M With tokens 1 thread: Avg: 8.7146ns Range: [8.7099ns, 8.7187ns] Ops/s: 114.75M Ops/s/t: 114.75M 2 threads: Avg: 0.0185us Range: [0.0181us, 0.0187us] Ops/s: 108.27M Ops/s/t: 54.14M 4 threads: Avg: 0.0383us Range: [0.0376us, 0.0384us] Ops/s: 104.54M Ops/s/t: 26.13M 8 threads: Avg: 0.0798us Range: [0.0794us, 0.0801us] Ops/s: 100.25M Ops/s/t: 12.53M Operations per second per thread (weighted average): 38.52M > boost::lockfree::queue (skipping, benchmark not supported...) > tbb::concurrent_queue (skipping, benchmark not supported...) > SimpleLockFreeQueue (skipping, benchmark not supported...) > LockBasedQueue (skipping, benchmark not supported...) > std::queue (skipping, benchmark not supported...) only dequeue: (Measures the average operation speed when all threads are consumers) > moodycamel::ConcurrentQueue Without tokens 1 thread: Avg: 0.0479us Range: [0.0478us, 0.0479us] Ops/s: 20.90M Ops/s/t: 20.90M 2 threads: Avg: 0.4099us Range: [0.3972us, 0.4170us] Ops/s: 4.88M Ops/s/t: 2.44M 4 threads: Avg: 2.7666us Range: [2.0147us, 2.8988us] Ops/s: 1.45M Ops/s/t: 361.46k 8 threads: Avg: 9.0300us Range: [8.8027us, 9.1078us] Ops/s: 885.94k Ops/s/t: 110.74k 12 threads: Avg: 0.0179ms Range: [0.0178ms, 0.0179ms] Ops/s: 672.15k Ops/s/t: 56.01k 16 threads: Avg: 0.0338ms Range: [0.0332ms, 0.0340ms] Ops/s: 473.79k Ops/s/t: 29.61k Operations per second per thread (weighted average): 1.56M With tokens 1 thread: Avg: 0.0404us Range: [0.0404us, 0.0404us] Ops/s: 24.75M Ops/s/t: 24.75M 2 threads: Avg: 0.0827us Range: [0.0826us, 0.0827us] Ops/s: 24.18M Ops/s/t: 12.09M 4 threads: Avg: 0.1745us Range: [0.1738us, 0.1748us] Ops/s: 22.92M Ops/s/t: 5.73M 8 threads: Avg: 0.3536us Range: [0.3514us, 0.3559us] Ops/s: 22.62M Ops/s/t: 2.83M 12 threads: Avg: 0.5554us Range: [0.5457us, 0.5628us] Ops/s: 21.60M Ops/s/t: 1.80M 16 threads: Avg: 0.7653us Range: [0.7439us, 0.7776us] Ops/s: 20.91M Ops/s/t: 1.31M Operations per second per thread (weighted average): 5.07M > boost::lockfree::queue 1 thread: Avg: 0.0356us Range: [0.0355us, 0.0356us] Ops/s: 28.11M Ops/s/t: 28.11M 2 threads: Avg: 0.4965us Range: [0.4550us, 0.5404us] Ops/s: 4.03M Ops/s/t: 2.01M 4 threads: Avg: 4.5768us Range: [4.4660us, 4.6482us] Ops/s: 873.96k Ops/s/t: 218.49k 8 threads: Avg: 0.0189ms Range: [0.0129ms, 0.0203ms] Ops/s: 423.34k Ops/s/t: 52.92k 12 threads: Avg: 0.0424ms Range: [0.0411ms, 0.0432ms] Ops/s: 282.73k Ops/s/t: 23.56k 16 threads: Avg: 0.0767ms Range: [0.0523ms, 0.0825ms] Ops/s: 208.48k Ops/s/t: 13.03k Operations per second per thread (weighted average): 1.85M > tbb::concurrent_queue 1 thread: Avg: 0.0290us Range: [0.0286us, 0.0292us] Ops/s: 34.47M Ops/s/t: 34.47M 2 threads: Avg: 0.2343us Range: [0.2270us, 0.2470us] Ops/s: 8.54M Ops/s/t: 4.27M 4 threads: Avg: 2.0731us Range: [1.9837us, 2.1597us] Ops/s: 1.93M Ops/s/t: 482.36k 8 threads: Avg: 0.0103ms Range: [9.5712us, 0.0106ms] Ops/s: 779.17k Ops/s/t: 97.40k 12 threads: Avg: 0.0451ms Range: [0.0433ms, 0.0480ms] Ops/s: 266.36k Ops/s/t: 22.20k 16 threads: Avg: 0.1436ms Range: [0.1360ms, 0.1520ms] Ops/s: 111.41k Ops/s/t: 6.96k Operations per second per thread (weighted average): 2.51M > SimpleLockFreeQueue 1 thread: Avg: 0.0275us Range: [0.0275us, 0.0276us] Ops/s: 36.31M Ops/s/t: 36.31M 2 threads: Avg: 0.8440us Range: [0.7192us, 0.8839us] Ops/s: 2.37M Ops/s/t: 1.18M 4 threads: Avg: 6.3769us Range: [5.6198us, 6.7313us] Ops/s: 627.27k Ops/s/t: 156.82k 8 threads: Avg: 0.0292ms Range: [0.0263ms, 0.0300ms] Ops/s: 274.34k Ops/s/t: 34.29k 12 threads: Avg: 0.0642ms Range: [0.0548ms, 0.0662ms] Ops/s: 186.79k Ops/s/t: 15.57k 16 threads: Avg: 0.1196ms Range: [0.1172ms, 0.1206ms] Ops/s: 133.76k Ops/s/t: 8.36k Operations per second per thread (weighted average): 2.22M > LockBasedQueue 1 thread: Avg: 0.0617us Range: [0.0617us, 0.0618us] Ops/s: 16.20M Ops/s/t: 16.20M 2 threads: Avg: 1.4892us Range: [1.3851us, 1.5315us] Ops/s: 1.34M Ops/s/t: 671.48k 4 threads: Avg: 8.0076us Range: [4.8463us, 8.5494us] Ops/s: 499.53k Ops/s/t: 124.88k 8 threads: Avg: 0.0295ms Range: [0.0202ms, 0.0314ms] Ops/s: 271.52k Ops/s/t: 33.94k 12 threads: Avg: 0.0594ms Range: [0.0364ms, 0.0639ms] Ops/s: 201.87k Ops/s/t: 16.82k 16 threads: Avg: 0.1049ms Range: [0.0564ms, 0.1191ms] Ops/s: 152.58k Ops/s/t: 9.54k Operations per second per thread (weighted average): 1.02M > std::queue 1 thread: Avg: 3.8947ns Range: [3.8927ns, 3.8964ns] Ops/s: 256.76M Ops/s/t: 256.76M Operations per second per thread (weighted average): 256.76M only dequeue bulk: (Measures the average speed of dequeueing an item in bulk when all threads are consumers) > moodycamel::ConcurrentQueue Without tokens 1 thread: Avg: 1.8063ns Range: [1.8008ns, 1.8111ns] Ops/s: 553.61M Ops/s/t: 553.61M 2 threads: Avg: 5.3528ns Range: [5.3256ns, 5.3836ns] Ops/s: 373.63M Ops/s/t: 186.82M 4 threads: Avg: 0.0278us Range: [0.0257us, 0.0288us] Ops/s: 143.65M Ops/s/t: 35.91M 8 threads: Avg: 0.0860us Range: [0.0839us, 0.0868us] Ops/s: 93.02M Ops/s/t: 11.63M 12 threads: Avg: 0.1500us Range: [0.1429us, 0.1535us] Ops/s: 79.98M Ops/s/t: 6.66M 16 threads: Avg: 0.2670us Range: [0.2490us, 0.2774us] Ops/s: 59.92M Ops/s/t: 3.74M Operations per second per thread (weighted average): 63.04M With tokens 1 thread: Avg: 1.6650ns Range: [1.6632ns, 1.6664ns] Ops/s: 600.59M Ops/s/t: 600.59M 2 threads: Avg: 4.6593ns Range: [4.5874ns, 4.7052ns] Ops/s: 429.25M Ops/s/t: 214.62M 4 threads: Avg: 0.0159us Range: [0.0158us, 0.0160us] Ops/s: 251.62M Ops/s/t: 62.91M 8 threads: Avg: 0.0515us Range: [0.0498us, 0.0528us] Ops/s: 155.40M Ops/s/t: 19.43M 12 threads: Avg: 0.0787us Range: [0.0764us, 0.0798us] Ops/s: 152.54M Ops/s/t: 12.71M 16 threads: Avg: 0.1374us Range: [0.1252us, 0.1435us] Ops/s: 116.47M Ops/s/t: 7.28M Operations per second per thread (weighted average): 79.24M > boost::lockfree::queue (skipping, benchmark not supported...) > tbb::concurrent_queue (skipping, benchmark not supported...) > SimpleLockFreeQueue (skipping, benchmark not supported...) > LockBasedQueue (skipping, benchmark not supported...) > std::queue (skipping, benchmark not supported...) mostly enqueue: (Measures the average operation speed when most threads are enqueueing) > moodycamel::ConcurrentQueue Without tokens 2 threads: Avg: 0.0937us Range: [0.0927us, 0.0963us] Ops/s: 21.35M Ops/s/t: 10.68M 4 threads: Avg: 0.1862us Range: [0.1816us, 0.1900us] Ops/s: 21.48M Ops/s/t: 5.37M 8 threads: Avg: 0.8762us Range: [0.7998us, 0.9349us] Ops/s: 9.13M Ops/s/t: 1.14M Operations per second per thread (weighted average): 4.66M With tokens 2 threads: Avg: 0.0843us Range: [0.0841us, 0.0847us] Ops/s: 23.72M Ops/s/t: 11.86M 4 threads: Avg: 0.1088us Range: [0.1029us, 0.1111us] Ops/s: 36.75M Ops/s/t: 9.19M 8 threads: Avg: 0.3251us Range: [0.2290us, 0.4168us] Ops/s: 24.61M Ops/s/t: 3.08M Operations per second per thread (weighted average): 7.02M > boost::lockfree::queue 2 threads: Avg: 0.1152us Range: [0.1118us, 0.1171us] Ops/s: 17.37M Ops/s/t: 8.68M 4 threads: Avg: 2.5790us Range: [1.8601us, 3.1117us] Ops/s: 1.55M Ops/s/t: 387.75k 8 threads: Avg: 0.0170ms Range: [0.0166ms, 0.0176ms] Ops/s: 469.45k Ops/s/t: 58.68k Operations per second per thread (weighted average): 2.12M > tbb::concurrent_queue 2 threads: Avg: 0.3593us Range: [0.3540us, 0.3657us] Ops/s: 5.57M Ops/s/t: 2.78M 4 threads: Avg: 1.1523us Range: [1.1393us, 1.1810us] Ops/s: 3.47M Ops/s/t: 867.86k 8 threads: Avg: 5.9296us Range: [5.4979us, 6.1961us] Ops/s: 1.35M Ops/s/t: 168.65k Operations per second per thread (weighted average): 984.95k > SimpleLockFreeQueue 2 threads: Avg: 0.2142us Range: [0.1944us, 0.2233us] Ops/s: 9.34M Ops/s/t: 4.67M 4 threads: Avg: 2.7030us Range: [2.4932us, 2.7637us] Ops/s: 1.48M Ops/s/t: 369.96k 8 threads: Avg: 0.0127ms Range: [9.8947us, 0.0138ms] Ops/s: 628.60k Ops/s/t: 78.58k Operations per second per thread (weighted average): 1.21M > LockBasedQueue 2 threads: Avg: 0.2057us Range: [0.1952us, 0.2165us] Ops/s: 9.72M Ops/s/t: 4.86M 4 threads: Avg: 6.1602us Range: [3.7945us, 7.2017us] Ops/s: 649.33k Ops/s/t: 162.33k 8 threads: Avg: 0.0375ms Range: [0.0334ms, 0.0419ms] Ops/s: 213.17k Ops/s/t: 26.65k Operations per second per thread (weighted average): 1.17M > std::queue (skipping, benchmark not supported...) mostly enqueue bulk: (Measures the average speed of enqueueing an item in bulk under light contention) > moodycamel::ConcurrentQueue Without tokens 2 threads: Avg: 0.0172us Range: [0.0172us, 0.0173us] Ops/s: 116.00M Ops/s/t: 58.00M 4 threads: Avg: 0.0366us Range: [0.0363us, 0.0369us] Ops/s: 109.38M Ops/s/t: 27.34M 8 threads: Avg: 0.0797us Range: [0.0794us, 0.0801us] Ops/s: 100.37M Ops/s/t: 12.55M Operations per second per thread (weighted average): 27.58M With tokens 2 threads: Avg: 0.0171us Range: [0.0171us, 0.0171us] Ops/s: 117.11M Ops/s/t: 58.55M 4 threads: Avg: 0.0304us Range: [0.0280us, 0.0320us] Ops/s: 131.48M Ops/s/t: 32.87M 8 threads: Avg: 0.0714us Range: [0.0612us, 0.0770us] Ops/s: 112.07M Ops/s/t: 14.01M Operations per second per thread (weighted average): 30.14M > boost::lockfree::queue (skipping, benchmark not supported...) > tbb::concurrent_queue (skipping, benchmark not supported...) > SimpleLockFreeQueue (skipping, benchmark not supported...) > LockBasedQueue (skipping, benchmark not supported...) > std::queue (skipping, benchmark not supported...) mostly dequeue: (Measures the average operation speed when most threads are dequeueing) > moodycamel::ConcurrentQueue Without tokens 2 threads: Avg: 0.1035us Range: [0.1034us, 0.1036us] Ops/s: 19.32M Ops/s/t: 9.66M 4 threads: Avg: 1.4781us Range: [1.4440us, 1.4955us] Ops/s: 2.71M Ops/s/t: 676.56k 8 threads: Avg: 3.8335us Range: [2.7691us, 4.1910us] Ops/s: 2.09M Ops/s/t: 260.86k Operations per second per thread (weighted average): 2.52M With tokens 2 threads: Avg: 0.0843us Range: [0.0842us, 0.0844us] Ops/s: 23.72M Ops/s/t: 11.86M 4 threads: Avg: 0.7221us Range: [0.6558us, 0.7557us] Ops/s: 5.54M Ops/s/t: 1.38M 8 threads: Avg: 1.0831us Range: [0.8750us, 1.2979us] Ops/s: 7.39M Ops/s/t: 923.26k Operations per second per thread (weighted average): 3.55M > boost::lockfree::queue 2 threads: Avg: 0.4447us Range: [0.3836us, 0.4890us] Ops/s: 4.50M Ops/s/t: 2.25M 4 threads: Avg: 2.3882us Range: [1.9014us, 2.7969us] Ops/s: 1.67M Ops/s/t: 418.73k 8 threads: Avg: 0.0132ms Range: [7.8331us, 0.0142ms] Ops/s: 604.38k Ops/s/t: 75.55k Operations per second per thread (weighted average): 677.76k > tbb::concurrent_queue 2 threads: Avg: 0.1613us Range: [0.1609us, 0.1618us] Ops/s: 12.40M Ops/s/t: 6.20M 4 threads: Avg: 1.6693us Range: [1.5484us, 1.7851us] Ops/s: 2.40M Ops/s/t: 599.07k 8 threads: Avg: 7.8647us Range: [7.4879us, 8.0231us] Ops/s: 1.02M Ops/s/t: 127.15k Operations per second per thread (weighted average): 1.65M > SimpleLockFreeQueue 2 threads: Avg: 0.4576us Range: [0.4205us, 0.4906us] Ops/s: 4.37M Ops/s/t: 2.19M 4 threads: Avg: 3.7064us Range: [3.5114us, 3.8460us] Ops/s: 1.08M Ops/s/t: 269.81k 8 threads: Avg: 0.0188ms Range: [0.0186ms, 0.0189ms] Ops/s: 426.30k Ops/s/t: 53.29k Operations per second per thread (weighted average): 605.60k > LockBasedQueue 2 threads: Avg: 0.7979us Range: [0.7404us, 0.8972us] Ops/s: 2.51M Ops/s/t: 1.25M 4 threads: Avg: 7.7466us Range: [7.5002us, 7.9109us] Ops/s: 516.35k Ops/s/t: 129.09k 8 threads: Avg: 0.0258ms Range: [0.0248ms, 0.0267ms] Ops/s: 310.04k Ops/s/t: 38.76k Operations per second per thread (weighted average): 342.85k > std::queue (skipping, benchmark not supported...) mostly dequeue bulk: (Measures the average speed of dequeueing an item in bulk under light contention) > moodycamel::ConcurrentQueue Without tokens 2 threads: Avg: 8.3404ns Range: [7.7191ns, 8.9024ns] Ops/s: 239.80M Ops/s/t: 119.90M 4 threads: Avg: 0.0264us Range: [0.0223us, 0.0274us] Ops/s: 151.37M Ops/s/t: 37.84M 8 threads: Avg: 0.1042us Range: [0.0994us, 0.1064us] Ops/s: 76.75M Ops/s/t: 9.59M Operations per second per thread (weighted average): 43.63M With tokens 2 threads: Avg: 4.9164ns Range: [4.8544ns, 5.0084ns] Ops/s: 406.80M Ops/s/t: 203.40M 4 threads: Avg: 0.0156us Range: [0.0155us, 0.0158us] Ops/s: 256.40M Ops/s/t: 64.10M 8 threads: Avg: 0.0518us Range: [0.0448us, 0.0607us] Ops/s: 154.57M Ops/s/t: 19.32M Operations per second per thread (weighted average): 75.37M > boost::lockfree::queue (skipping, benchmark not supported...) > tbb::concurrent_queue (skipping, benchmark not supported...) > SimpleLockFreeQueue (skipping, benchmark not supported...) > LockBasedQueue (skipping, benchmark not supported...) > std::queue (skipping, benchmark not supported...) single-producer, multi-consumer (measuring all but 1 thread): (Measures the average speed of dequeueing with only one producer, but multiple consumers) > moodycamel::ConcurrentQueue Without tokens 2 threads: Avg: 0.1041us Range: [0.0978us, 0.1122us] Ops/s: 9.60M Ops/s/t: 9.60M 4 threads: Avg: 1.9386us Range: [1.7129us, 2.3281us] Ops/s: 1.55M Ops/s/t: 515.83k 8 threads: Avg: 0.7837us Range: [0.5718us, 1.4367us] Ops/s: 8.93M Ops/s/t: 1.28M 16 threads: Avg: 0.8587us Range: [0.8096us, 1.0077us] Ops/s: 17.47M Ops/s/t: 1.16M Operations per second per thread (weighted average): 1.99M With tokens 2 threads: Avg: 0.1034us Range: [0.0984us, 0.1079us] Ops/s: 9.67M Ops/s/t: 9.67M 4 threads: Avg: 1.4904us Range: [1.3998us, 1.6162us] Ops/s: 2.01M Ops/s/t: 670.97k 8 threads: Avg: 0.9243us Range: [0.3801us, 6.2399us] Ops/s: 7.57M Ops/s/t: 1.08M 16 threads: Avg: 0.7863us Range: [0.6860us, 0.8744us] Ops/s: 19.08M Ops/s/t: 1.27M Operations per second per thread (weighted average): 2.01M > boost::lockfree::queue 2 threads: Avg: 0.1390us Range: [0.1325us, 0.1545us] Ops/s: 7.19M Ops/s/t: 7.19M 4 threads: Avg: 0.4625us Range: [0.2754us, 0.5561us] Ops/s: 6.49M Ops/s/t: 2.16M 8 threads: Avg: 0.7324us Range: [0.5028us, 1.2586us] Ops/s: 9.56M Ops/s/t: 1.37M 16 threads: Avg: 0.4086us Range: [0.3950us, 0.4355us] Ops/s: 36.71M Ops/s/t: 2.45M Operations per second per thread (weighted average): 2.60M > tbb::concurrent_queue 2 threads: Avg: 0.0396us Range: [0.0395us, 0.0396us] Ops/s: 25.27M Ops/s/t: 25.27M 4 threads: Avg: 0.4785us Range: [0.3555us, 2.2952us] Ops/s: 6.27M Ops/s/t: 2.09M 8 threads: Avg: 6.6917us Range: [2.8804us, 8.9630us] Ops/s: 1.05M Ops/s/t: 149.44k 16 threads: Avg: 6.2738us Range: [4.4906us, 0.0135ms] Ops/s: 2.39M Ops/s/t: 159.39k Operations per second per thread (weighted average): 3.23M > SimpleLockFreeQueue 2 threads: Avg: 0.1923us Range: [0.1744us, 0.2023us] Ops/s: 5.20M Ops/s/t: 5.20M 4 threads: Avg: 1.5853us Range: [0.4197us, 2.7908us] Ops/s: 1.89M Ops/s/t: 630.79k 8 threads: Avg: 1.1113us Range: [0.8406us, 1.7108us] Ops/s: 6.30M Ops/s/t: 899.83k 16 threads: Avg: 0.5356us Range: [0.5155us, 0.5548us] Ops/s: 28.01M Ops/s/t: 1.87M Operations per second per thread (weighted average): 1.72M > LockBasedQueue 2 threads: Avg: 0.1914us Range: [0.1719us, 0.2080us] Ops/s: 5.22M Ops/s/t: 5.22M 4 threads: Avg: 2.8230us Range: [2.6594us, 2.9641us] Ops/s: 1.06M Ops/s/t: 354.23k 8 threads: Avg: 8.1605us Range: [7.5421us, 9.6067us] Ops/s: 857.79k Ops/s/t: 122.54k 16 threads: Avg: 0.0330ms Range: [0.0316ms, 0.0339ms] Ops/s: 455.18k Ops/s/t: 30.35k Operations per second per thread (weighted average): 678.72k > std::queue (skipping, benchmark not supported...) single-producer, multi-consumer (pre-produced): (Measures the average speed of dequeueing from a queue pre-filled by one thread) > moodycamel::ConcurrentQueue Without tokens 1 thread: Avg: 0.0479us Range: [0.0478us, 0.0479us] Ops/s: 20.89M Ops/s/t: 20.89M 3 threads: Avg: 1.0918us Range: [0.9990us, 1.1343us] Ops/s: 2.75M Ops/s/t: 915.91k 7 threads: Avg: 6.1592us Range: [6.0475us, 6.1973us] Ops/s: 1.14M Ops/s/t: 162.36k 15 threads: Avg: 0.0243ms Range: [0.0240ms, 0.0245ms] Ops/s: 617.10k Ops/s/t: 41.14k Operations per second per thread (weighted average): 2.49M With tokens 1 thread: Avg: 0.0404us Range: [0.0404us, 0.0404us] Ops/s: 24.74M Ops/s/t: 24.74M 3 threads: Avg: 0.9008us Range: [0.8752us, 0.9113us] Ops/s: 3.33M Ops/s/t: 1.11M 7 threads: Avg: 4.7648us Range: [4.7195us, 4.8146us] Ops/s: 1.47M Ops/s/t: 209.87k 15 threads: Avg: 0.0194ms Range: [0.0191ms, 0.0196ms] Ops/s: 772.72k Ops/s/t: 51.51k Operations per second per thread (weighted average): 2.96M > boost::lockfree::queue 1 thread: Avg: 0.0356us Range: [0.0355us, 0.0357us] Ops/s: 28.11M Ops/s/t: 28.11M 3 threads: Avg: 2.1016us Range: [1.8879us, 2.2375us] Ops/s: 1.43M Ops/s/t: 475.82k 7 threads: Avg: 0.0161ms Range: [0.0149ms, 0.0163ms] Ops/s: 435.41k Ops/s/t: 62.20k 15 threads: Avg: 0.0692ms Range: [0.0458ms, 0.0738ms] Ops/s: 216.64k Ops/s/t: 14.44k Operations per second per thread (weighted average): 3.15M > tbb::concurrent_queue 1 thread: Avg: 0.0286us Range: [0.0286us, 0.0287us] Ops/s: 34.91M Ops/s/t: 34.91M 3 threads: Avg: 0.9964us Range: [0.9581us, 1.0265us] Ops/s: 3.01M Ops/s/t: 1.00M 7 threads: Avg: 5.4370us Range: [5.3420us, 5.4884us] Ops/s: 1.29M Ops/s/t: 183.93k 15 threads: Avg: 0.1103ms Range: [0.1003ms, 0.1155ms] Ops/s: 135.94k Ops/s/t: 9.06k Operations per second per thread (weighted average): 4.02M > SimpleLockFreeQueue 1 thread: Avg: 0.0275us Range: [0.0275us, 0.0275us] Ops/s: 36.31M Ops/s/t: 36.31M 3 threads: Avg: 3.3246us Range: [2.6774us, 3.5321us] Ops/s: 902.37k Ops/s/t: 300.79k 7 threads: Avg: 0.0204ms Range: [6.8770us, 0.0235ms] Ops/s: 342.89k Ops/s/t: 48.98k 15 threads: Avg: 0.0959ms Range: [0.0412ms, 0.1095ms] Ops/s: 156.35k Ops/s/t: 10.42k Operations per second per thread (weighted average): 4.00M > LockBasedQueue 1 thread: Avg: 0.0616us Range: [0.0615us, 0.0616us] Ops/s: 16.24M Ops/s/t: 16.24M 3 threads: Avg: 2.7538us Range: [2.6907us, 2.8152us] Ops/s: 1.09M Ops/s/t: 363.14k 7 threads: Avg: 0.0215ms Range: [0.0190ms, 0.0225ms] Ops/s: 325.43k Ops/s/t: 46.49k 15 threads: Avg: 0.0868ms Range: [0.0813ms, 0.0919ms] Ops/s: 172.89k Ops/s/t: 11.53k Operations per second per thread (weighted average): 1.84M > std::queue (skipping, benchmark not supported...) multi-producer, single-consumer (measuring 1 thread): (Measures the average speed of dequeueing with only one consumer, but multiple producers) > moodycamel::ConcurrentQueue Without tokens 2 threads: Avg: 0.0625us Range: [0.0624us, 0.0626us] Ops/s: 15.99M Ops/s/t: 15.99M 4 threads: Avg: 0.0639us Range: [0.0625us, 0.0644us] Ops/s: 15.66M Ops/s/t: 15.66M 8 threads: Avg: 0.0671us Range: [0.0628us, 0.0715us] Ops/s: 14.89M Ops/s/t: 14.89M 16 threads: Avg: 0.0916us Range: [0.0869us, 0.0946us] Ops/s: 10.92M Ops/s/t: 10.92M Operations per second per thread (weighted average): 14.37M With tokens 2 threads: Avg: 0.0556us Range: [0.0555us, 0.0557us] Ops/s: 17.99M Ops/s/t: 17.99M 4 threads: Avg: 0.0454us Range: [0.0452us, 0.0455us] Ops/s: 22.03M Ops/s/t: 22.03M 8 threads: Avg: 0.0410us Range: [0.0410us, 0.0411us] Ops/s: 24.37M Ops/s/t: 24.37M 16 threads: Avg: 0.0418us Range: [0.0412us, 0.0421us] Ops/s: 23.93M Ops/s/t: 23.93M Operations per second per thread (weighted average): 22.08M > boost::lockfree::queue 2 threads: Avg: 0.0444us Range: [0.0420us, 0.0516us] Ops/s: 22.53M Ops/s/t: 22.53M 4 threads: Avg: 0.2854us Range: [0.2487us, 0.4188us] Ops/s: 3.50M Ops/s/t: 3.50M 8 threads: Avg: 0.5135us Range: [0.5043us, 0.5177us] Ops/s: 1.95M Ops/s/t: 1.95M 16 threads: Avg: 0.5293us Range: [0.5162us, 0.5350us] Ops/s: 1.89M Ops/s/t: 1.89M Operations per second per thread (weighted average): 7.47M > tbb::concurrent_queue 2 threads: Avg: 0.1757us Range: [0.1333us, 0.2080us] Ops/s: 5.69M Ops/s/t: 5.69M 4 threads: Avg: 0.1487us Range: [0.1463us, 0.1507us] Ops/s: 6.72M Ops/s/t: 6.72M 8 threads: Avg: 0.1561us Range: [0.1542us, 0.1565us] Ops/s: 6.41M Ops/s/t: 6.41M 16 threads: Avg: 0.6278us Range: [0.5630us, 0.6839us] Ops/s: 1.59M Ops/s/t: 1.59M Operations per second per thread (weighted average): 5.10M > SimpleLockFreeQueue 2 threads: Avg: 0.0464us Range: [0.0392us, 0.0543us] Ops/s: 21.55M Ops/s/t: 21.55M 4 threads: Avg: 0.4172us Range: [0.3421us, 0.4385us] Ops/s: 2.40M Ops/s/t: 2.40M 8 threads: Avg: 0.2543us Range: [0.2397us, 0.2625us] Ops/s: 3.93M Ops/s/t: 3.93M 16 threads: Avg: 0.2392us Range: [0.2348us, 0.2422us] Ops/s: 4.18M Ops/s/t: 4.18M Operations per second per thread (weighted average): 8.01M > LockBasedQueue 2 threads: Avg: 0.1546us Range: [0.1125us, 0.1981us] Ops/s: 6.47M Ops/s/t: 6.47M 4 threads: Avg: 0.6662us Range: [0.5840us, 0.7603us] Ops/s: 1.50M Ops/s/t: 1.50M 8 threads: Avg: 0.7431us Range: [0.6830us, 0.7976us] Ops/s: 1.35M Ops/s/t: 1.35M 16 threads: Avg: 0.7052us Range: [0.6063us, 0.7579us] Ops/s: 1.42M Ops/s/t: 1.42M Operations per second per thread (weighted average): 2.68M > std::queue (skipping, benchmark not supported...) dequeue from empty: (Measures the average speed of attempting to dequeue from an empty queue (that eight separate threads had at one point enqueued to)) > moodycamel::ConcurrentQueue Without tokens 1 thread: Avg: 0.0409us Range: [0.0406us, 0.0416us] Ops/s: 24.45M Ops/s/t: 24.45M ^ Note: No contention -- measures raw failed dequeue speed on empty queue 2 threads: Avg: 0.0905us Range: [0.0825us, 0.0962us] Ops/s: 22.10M Ops/s/t: 11.05M 8 threads: Avg: 0.3867us Range: [0.3854us, 0.3899us] Ops/s: 20.69M Ops/s/t: 2.59M Operations per second per thread (weighted average): 9.04M With tokens 1 thread: Avg: 0.0237us Range: [0.0200us, 0.0249us] Ops/s: 42.21M Ops/s/t: 42.21M ^ Note: No contention -- measures raw failed dequeue speed on empty queue 2 threads: Avg: 0.0524us Range: [0.0500us, 0.0539us] Ops/s: 38.19M Ops/s/t: 19.09M 8 threads: Avg: 0.2339us Range: [0.1980us, 0.2642us] Ops/s: 34.21M Ops/s/t: 4.28M Operations per second per thread (weighted average): 15.51M > boost::lockfree::queue 1 thread: Avg: 6.5831ns Range: [6.5815ns, 6.5847ns] Ops/s: 151.90M Ops/s/t: 151.90M ^ Note: No contention -- measures raw failed dequeue speed on empty queue 2 threads: Avg: 0.0122us Range: [0.0122us, 0.0122us] Ops/s: 163.52M Ops/s/t: 81.76M 8 threads: Avg: 0.0488us Range: [0.0488us, 0.0489us] Ops/s: 163.91M Ops/s/t: 20.49M Operations per second per thread (weighted average): 62.08M > tbb::concurrent_queue 1 thread: Avg: 5.1712ns Range: [5.1697ns, 5.1721ns] Ops/s: 193.38M Ops/s/t: 193.38M ^ Note: No contention -- measures raw failed dequeue speed on empty queue 2 threads: Avg: 0.0104us Range: [0.0103us, 0.0104us] Ops/s: 193.18M Ops/s/t: 96.59M 8 threads: Avg: 0.0413us Range: [0.0413us, 0.0413us] Ops/s: 193.79M Ops/s/t: 24.22M Operations per second per thread (weighted average): 76.01M > SimpleLockFreeQueue 1 thread: Avg: 7.0505ns Range: [7.0486ns, 7.0525ns] Ops/s: 141.83M Ops/s/t: 141.83M ^ Note: No contention -- measures raw failed dequeue speed on empty queue 2 threads: Avg: 0.0160us Range: [0.0160us, 0.0160us] Ops/s: 125.02M Ops/s/t: 62.51M 8 threads: Avg: 0.0638us Range: [0.0638us, 0.0638us] Ops/s: 125.33M Ops/s/t: 15.67M Operations per second per thread (weighted average): 52.37M > LockBasedQueue 1 thread: Avg: 0.0291us Range: [0.0291us, 0.0291us] Ops/s: 34.32M Ops/s/t: 34.32M ^ Note: No contention -- measures raw failed dequeue speed on empty queue 2 threads: Avg: 0.2276us Range: [0.1948us, 0.2441us] Ops/s: 8.79M Ops/s/t: 4.39M 8 threads: Avg: 5.2936us Range: [2.8883us, 6.2920us] Ops/s: 1.51M Ops/s/t: 188.91k Operations per second per thread (weighted average): 7.83M > std::queue 1 thread: Avg: 0.9395ns Range: [0.9392ns, 0.9396ns] Ops/s: 1.06G Ops/s/t: 1.06G ^ Note: No contention -- measures raw failed dequeue speed on empty queue Operations per second per thread (weighted average): 1.06G enqueue-dequeue pairs: (Measures the average operation speed with each thread doing an enqueue followed by a dequeue) > moodycamel::ConcurrentQueue Without tokens 1 thread: Avg: 0.0292us Range: [0.0292us, 0.0292us] Ops/s: 34.23M Ops/s/t: 34.23M ^ Note: No contention -- measures speed of immediately dequeueing the item that was just enqueued 2 threads: Avg: 0.2037us Range: [0.1940us, 0.2153us] Ops/s: 9.82M Ops/s/t: 4.91M 4 threads: Avg: 1.7694us Range: [1.7308us, 1.7856us] Ops/s: 2.26M Ops/s/t: 565.17k 8 threads: Avg: 6.5195us Range: [6.3181us, 6.6066us] Ops/s: 1.23M Ops/s/t: 153.39k Operations per second per thread (weighted average): 5.90M With tokens 1 thread: Avg: 0.0226us Range: [0.0226us, 0.0226us] Ops/s: 44.19M Ops/s/t: 44.19M ^ Note: No contention -- measures speed of immediately dequeueing the item that was just enqueued 2 threads: Avg: 0.0487us Range: [0.0485us, 0.0488us] Ops/s: 41.10M Ops/s/t: 20.55M 4 threads: Avg: 0.1205us Range: [0.1195us, 0.1214us] Ops/s: 33.20M Ops/s/t: 8.30M 8 threads: Avg: 0.3268us Range: [0.3128us, 0.3348us] Ops/s: 24.48M Ops/s/t: 3.06M Operations per second per thread (weighted average): 13.60M > boost::lockfree::queue 1 thread: Avg: 0.0437us Range: [0.0436us, 0.0437us] Ops/s: 22.90M Ops/s/t: 22.90M ^ Note: No contention -- measures speed of immediately dequeueing the item that was just enqueued 2 threads: Avg: 0.3969us Range: [0.3245us, 0.4216us] Ops/s: 5.04M Ops/s/t: 2.52M 4 threads: Avg: 3.3639us Range: [3.2929us, 3.4045us] Ops/s: 1.19M Ops/s/t: 297.27k 8 threads: Avg: 0.0146ms Range: [0.0139ms, 0.0148ms] Ops/s: 548.28k Ops/s/t: 68.54k Operations per second per thread (weighted average): 3.76M > tbb::concurrent_queue 1 thread: Avg: 0.0288us Range: [0.0287us, 0.0289us] Ops/s: 34.72M Ops/s/t: 34.72M ^ Note: No contention -- measures speed of immediately dequeueing the item that was just enqueued 2 threads: Avg: 0.3518us Range: [0.3293us, 0.3811us] Ops/s: 5.69M Ops/s/t: 2.84M 4 threads: Avg: 2.4316us Range: [2.3749us, 2.5254us] Ops/s: 1.64M Ops/s/t: 411.24k 8 threads: Avg: 0.0119ms Range: [0.0109ms, 0.0127ms] Ops/s: 670.40k Ops/s/t: 83.80k Operations per second per thread (weighted average): 5.49M > SimpleLockFreeQueue 1 thread: Avg: 0.0477us Range: [0.0476us, 0.0477us] Ops/s: 20.99M Ops/s/t: 20.99M ^ Note: No contention -- measures speed of immediately dequeueing the item that was just enqueued 2 threads: Avg: 0.4059us Range: [0.3067us, 0.4286us] Ops/s: 4.93M Ops/s/t: 2.46M 4 threads: Avg: 3.6382us Range: [3.5906us, 3.6695us] Ops/s: 1.10M Ops/s/t: 274.86k 8 threads: Avg: 0.0152ms Range: [0.0140ms, 0.0157ms] Ops/s: 526.95k Ops/s/t: 65.87k Operations per second per thread (weighted average): 3.48M > LockBasedQueue 1 thread: Avg: 0.0646us Range: [0.0646us, 0.0646us] Ops/s: 15.48M Ops/s/t: 15.48M ^ Note: No contention -- measures speed of immediately dequeueing the item that was just enqueued 2 threads: Avg: 0.6880us Range: [0.6445us, 0.7316us] Ops/s: 2.91M Ops/s/t: 1.45M 4 threads: Avg: 6.0035us Range: [5.9227us, 6.0622us] Ops/s: 666.28k Ops/s/t: 166.57k 8 threads: Avg: 0.0200ms Range: [0.0106ms, 0.0247ms] Ops/s: 400.14k Ops/s/t: 50.02k Operations per second per thread (weighted average): 2.49M > std::queue 1 thread: Avg: 4.4183ns Range: [4.4094ns, 4.4228ns] Ops/s: 226.33M Ops/s/t: 226.33M ^ Note: No contention -- measures speed of immediately dequeueing the item that was just enqueued Operations per second per thread (weighted average): 226.33M heavy concurrent: (Measures the average operation speed with many threads under heavy load) > moodycamel::ConcurrentQueue Without tokens 2 threads: Avg: 0.2189us Range: [0.2185us, 0.2194us] Ops/s: 9.14M Ops/s/t: 4.57M 3 threads: Avg: 0.3700us Range: [0.3134us, 0.4042us] Ops/s: 8.11M Ops/s/t: 2.70M 4 threads: Avg: 1.1026us Range: [1.0439us, 1.1272us] Ops/s: 3.63M Ops/s/t: 906.94k 8 threads: Avg: 3.1887us Range: [3.0584us, 3.2292us] Ops/s: 2.51M Ops/s/t: 313.61k 12 threads: Avg: 6.0866us Range: [5.9009us, 6.2746us] Ops/s: 1.97M Ops/s/t: 164.30k 16 threads: Avg: 9.9339us Range: [9.5659us, 0.0102ms] Ops/s: 1.61M Ops/s/t: 100.67k Operations per second per thread (weighted average): 959.54k With tokens 2 threads: Avg: 0.0502us Range: [0.0475us, 0.0523us] Ops/s: 39.86M Ops/s/t: 19.93M 3 threads: Avg: 0.1121us Range: [0.1088us, 0.1140us] Ops/s: 26.76M Ops/s/t: 8.92M 4 threads: Avg: 0.4054us Range: [0.3912us, 0.4140us] Ops/s: 9.87M Ops/s/t: 2.47M 8 threads: Avg: 0.7169us Range: [0.5758us, 0.8319us] Ops/s: 11.16M Ops/s/t: 1.39M 12 threads: Avg: 1.2992us Range: [1.0963us, 1.5459us] Ops/s: 9.24M Ops/s/t: 769.70k 16 threads: Avg: 1.8166us Range: [1.4060us, 1.9616us] Ops/s: 8.81M Ops/s/t: 550.47k Operations per second per thread (weighted average): 3.72M > boost::lockfree::queue 2 threads: Avg: 0.3558us Range: [0.3235us, 0.3937us] Ops/s: 5.62M Ops/s/t: 2.81M 3 threads: Avg: 1.7224us Range: [1.5520us, 1.8241us] Ops/s: 1.74M Ops/s/t: 580.60k 4 threads: Avg: 2.2439us Range: [1.8891us, 2.4835us] Ops/s: 1.78M Ops/s/t: 445.65k 8 threads: Avg: 8.8162us Range: [8.5410us, 9.0435us] Ops/s: 907.42k Ops/s/t: 113.43k 12 threads: Avg: 0.0184ms Range: [0.0179ms, 0.0187ms] Ops/s: 653.30k Ops/s/t: 54.44k 16 threads: Avg: 0.0289ms Range: [0.0236ms, 0.0301ms] Ops/s: 554.55k Ops/s/t: 34.66k Operations per second per thread (weighted average): 422.31k > tbb::concurrent_queue 2 threads: Avg: 0.3223us Range: [0.3021us, 0.3596us] Ops/s: 6.20M Ops/s/t: 3.10M 3 threads: Avg: 0.8995us Range: [0.8900us, 0.9129us] Ops/s: 3.34M Ops/s/t: 1.11M 4 threads: Avg: 1.7776us Range: [1.6889us, 1.8523us] Ops/s: 2.25M Ops/s/t: 562.55k 8 threads: Avg: 6.1223us Range: [5.5484us, 6.5143us] Ops/s: 1.31M Ops/s/t: 163.34k 12 threads: Avg: 0.0175ms Range: [0.0137ms, 0.0198ms] Ops/s: 686.07k Ops/s/t: 57.17k 16 threads: Avg: 0.0461ms Range: [0.0382ms, 0.0519ms] Ops/s: 347.11k Ops/s/t: 21.69k Operations per second per thread (weighted average): 530.15k > SimpleLockFreeQueue 2 threads: Avg: 0.4770us Range: [0.3797us, 0.5594us] Ops/s: 4.19M Ops/s/t: 2.10M 3 threads: Avg: 1.4174us Range: [1.1771us, 1.6083us] Ops/s: 2.12M Ops/s/t: 705.51k 4 threads: Avg: 3.1814us Range: [2.8453us, 3.4126us] Ops/s: 1.26M Ops/s/t: 314.33k 8 threads: Avg: 0.0115ms Range: [7.8236us, 0.0142ms] Ops/s: 693.66k Ops/s/t: 86.71k 12 threads: Avg: 0.0136ms Range: [9.8911us, 0.0154ms] Ops/s: 879.37k Ops/s/t: 73.28k 16 threads: Avg: 0.0194ms Range: [0.0178ms, 0.0210ms] Ops/s: 823.59k Ops/s/t: 51.47k Operations per second per thread (weighted average): 357.56k > LockBasedQueue 2 threads: Avg: 0.5884us Range: [0.5593us, 0.6079us] Ops/s: 3.40M Ops/s/t: 1.70M 3 threads: Avg: 2.7292us Range: [2.5104us, 2.8136us] Ops/s: 1.10M Ops/s/t: 366.41k 4 threads: Avg: 6.0285us Range: [5.7452us, 6.1933us] Ops/s: 663.52k Ops/s/t: 165.88k 8 threads: Avg: 0.0233ms Range: [8.6898us, 0.0286ms] Ops/s: 342.92k Ops/s/t: 42.87k 12 threads: Avg: 0.0594ms Range: [0.0545ms, 0.0609ms] Ops/s: 202.13k Ops/s/t: 16.84k 16 threads: Avg: 0.1016ms Range: [0.0870ms, 0.1082ms] Ops/s: 157.46k Ops/s/t: 9.84k Operations per second per thread (weighted average): 232.46k > std::queue (skipping, benchmark not supported...) Overall average operations per second per thread (where higher-concurrency runs have more weight): (Take this summary with a grain of salt -- look at the individual benchmark results for a much better idea of how the queues measure up to each other): moodycamel::ConcurrentQueue (including bulk): 19.04M boost::lockfree::queue: 4.07M tbb::concurrent_queue: 5.09M SimpleLockFreeQueue: 3.76M LockBasedQueue: 1.36M std::queue (single thread only): 297.43M ================================================ FILE: benchmarks/cpuid.cpp ================================================ #include #include #include #include #include "cpuid.h" #ifdef _WIN32 #define WIN32_LEAN_AND_MEAN #include // See http://msdn.microsoft.com/en-us/library/windows/desktop/ms683194(v=vs.85).aspx typedef BOOL (WINAPI *LPFN_GLPI)(PSYSTEM_LOGICAL_PROCESSOR_INFORMATION, PDWORD); // Helper function to count set bits in the processor mask. int countBitsSet(ULONG_PTR bitMask) { int result = 0; while (bitMask != 0) { result += (int)(bitMask & 1); bitMask >>= 1; } return result; } bool getProcessorInfoFromOS(int& cpus, int& cores, int& logicalCores, double& clockSpeed) { cpus = 0; cores = 0; logicalCores = 0; clockSpeed = 0; // Clock speed HKEY hKey; if (RegOpenKeyEx(HKEY_LOCAL_MACHINE, TEXT("HARDWARE\\DESCRIPTION\\System\\CentralProcessor\\0"), 0, KEY_EXECUTE, &hKey) == ERROR_SUCCESS) { DWORD type = REG_DWORD; DWORD val; DWORD cbData = sizeof(val); if (RegQueryValueEx(hKey, TEXT("~MHz"), NULL, &type, (LPBYTE)&val, &cbData) == ERROR_SUCCESS) { if (type == REG_DWORD && cbData == sizeof(DWORD)) { clockSpeed = val / 1000.0; } } } if (clockSpeed == 0) { // Can't access registry, try QueryPerformanceFrequency (nearly always same speed as CPU) LARGE_INTEGER f; if (!QueryPerformanceFrequency(&f)) { return false; } clockSpeed = f.QuadPart / 1000.0 / 1000.0; } // Everything else LPFN_GLPI glpi; glpi = (LPFN_GLPI)GetProcAddress(GetModuleHandle(TEXT("kernel32")), "GetLogicalProcessorInformation"); if (glpi == NULL) { return false; } PSYSTEM_LOGICAL_PROCESSOR_INFORMATION buffer = NULL; DWORD bufferLength = 0; if (glpi(buffer, &bufferLength) == TRUE) { return false; } while (GetLastError() == ERROR_INSUFFICIENT_BUFFER) { if (buffer != NULL) { std::free(buffer); } buffer = (PSYSTEM_LOGICAL_PROCESSOR_INFORMATION)std::malloc(bufferLength); if (buffer == NULL) { return false; } if (glpi(buffer, &bufferLength) == TRUE) { if (bufferLength / sizeof(SYSTEM_LOGICAL_PROCESSOR_INFORMATION) * sizeof(SYSTEM_LOGICAL_PROCESSOR_INFORMATION) != bufferLength) { // sizeof(SYSTEM_LOGICAL_PROCESSOR_INFORMATION) must have changed (different from at compile time) std::free(buffer); return false; } auto end = (PSYSTEM_LOGICAL_PROCESSOR_INFORMATION)((char*)buffer + bufferLength); for (auto ptr = buffer; ptr != end; ++ptr) { switch (ptr->Relationship) { case RelationProcessorCore: ++cores; logicalCores += countBitsSet(ptr->ProcessorMask); break; case RelationProcessorPackage: ++cpus; break; default: break; } } std::free(buffer); return true; } } if (buffer != NULL) { std::free(buffer); } return false; } #else // TODO bool getProcessorInfoFromOS(int& cpus, int& cores, int& logicalCores, double& clockSpeed) { return false; } #endif #if defined(__x86_64__) || defined(_M_AMD64) || defined(__amd64__) || defined (_M_X64) || defined(_M_IX86) || defined(__i386__) #define MOODYCAMEL_X86_OR_X64 #endif #ifdef MOODYCAMEL_X86_OR_X64 struct CPUIDInfo { std::uint32_t data[4]; }; #ifdef _MSC_VER #include inline CPUIDInfo cpuid(std::uint32_t eax) { CPUIDInfo info; __cpuidex((int*)&info.data[0], eax, 0); return info; } #else // Assume GCC-compatible inline assembly syntax inline CPUIDInfo cpuid(std::uint32_t eax) { CPUIDInfo info; asm volatile("cpuid" : "=a" (info.data[0]), "=b" (info.data[1]), "=c" (info.data[2]), "=d" (info.data[3]) : "a" (eax), "c" (0)); return info; } #endif #endif // MOODYCAMEL_X86_OR_X64 namespace moodycamel { const char* getCPUString() { // TODO: Support non-x86/-x64 architectures #ifdef MOODYCAMEL_X86_OR_X64 static char buf[128] = { 0 }; if (buf[0] != 0) { return buf; } CPUIDInfo info = cpuid(0x80000000); std::uint32_t ex = info.data[0]; for (std::uint32_t i = 0; i + 0x80000002 <= ex && i != 3; ++i) { *(reinterpret_cast(buf) + i) = cpuid(i + 0x80000002); } if (buf[0] == 0) { strcpy(buf, UNKNOWN_CPU_STRING); return buf; } info = cpuid(0); if (info.data[0] < 1) { // cpuid(1) not supported return buf; } // Add number of CPUs, cores, HT, and GHz info = cpuid(1); bool ht = ((info.data[3] >> 28) & 1) == 1; // Note: This is also 1 on most multi-core systems, even if there's no HT int cpus, cores, logicalCores; double clockSpeed; if (!getProcessorInfoFromOS(cpus, cores, logicalCores, clockSpeed)) { return buf; } // Strip @ nGHz if any, since we re-calculate this ourselves int atIndex; for (atIndex = (int)std::strlen(buf) - 1; atIndex != -1; --atIndex) { if (buf[atIndex] == '@') { if (atIndex > 0 && buf[atIndex - 1] == ' ') { --atIndex; } buf[atIndex] = '\0'; break; } } // Strip trailing spaces if any for (char* s = buf + std::strlen(buf); s != buf && s[-1] == ' '; --s) s[-1] = '\0'; char* str = buf + std::strlen(buf); if (cpus > 1) { // Assume identical CPUs logicalCores /= cpus; cores /= cpus; std::sprintf(str, " x%d", cpus); str += strlen(str); } ht = ht && logicalCores != cores; std::sprintf(str, " with %d core%s%s @ %.1fGHz%s", cores, cores == 1 ? "" : "s", ht ? " (HyperThreaded)" : "", clockSpeed, cpus > 1 ? " each" : ""); return buf; #else return UNKNOWN_CPU_STRING; #endif } } ================================================ FILE: benchmarks/cpuid.h ================================================ #pragma once namespace moodycamel { static const char UNKNOWN_CPU_STRING[] = "unknown processor"; // Returns a string representing the system's CPU info. // Assumes an x86/x64 architecture (returns UNKNOWN_CPU_STRING otherwise). // Returned string is valid in perpetuity. // Not thread safe. const char* getCPUString(); } ================================================ FILE: benchmarks/dlib/algs.h ================================================ // Copyright (C) 2003 Davis E. King (davis@dlib.net) // License: Boost Software License See LICENSE.txt for the full license. #ifdef DLIB_ALL_SOURCE_END #include "dlib_basic_cpp_build_tutorial.txt" #endif #ifndef DLIB_ALGs_ #define DLIB_ALGs_ // this file contains miscellaneous stuff // Give people who forget the -std=c++11 option a reminder #if (defined(__GNUC__) && ((__GNUC__ >= 4 && __GNUC_MINOR__ >= 8) || (__GNUC__ > 4))) || \ (defined(__clang__) && ((__clang_major__ >= 3 && __clang_minor__ >= 4) || (__clang_major__ >= 3))) #if __cplusplus < 201103 #error "Dlib requires C++11 support. Give your compiler the -std=c++11 option to enable it." #endif #endif #if defined __NVCC__ // Disable the "statement is unreachable" message since it will go off on code that is // actually reachable but just happens to not be reachable sometimes during certain // template instantiations. #pragma diag_suppress code_is_unreachable #endif #ifdef _MSC_VER #if _MSC_VER < 1900 #error "dlib versions newer than v19.1 use C++11 and therefore require Visual Studio 2015 or newer." #endif // Disable the following warnings for Visual Studio // this is to disable the "'this' : used in base member initializer list" // warning you get from some of the GUI objects since all the objects // require that their parent class be passed into their constructor. // In this case though it is totally safe so it is ok to disable this warning. #pragma warning(disable : 4355) // This is a warning you get sometimes when Visual Studio performs a Koenig Lookup. // This is a bug in visual studio. It is a totally legitimate thing to // expect from a compiler. #pragma warning(disable : 4675) // This is a warning you get from visual studio 2005 about things in the standard C++ // library being "deprecated." I checked the C++ standard and it doesn't say jack // about any of them (I checked the searchable PDF). So this warning is total Bunk. #pragma warning(disable : 4996) // This is a warning you get from visual studio 2003: // warning C4345: behavior change: an object of POD type constructed with an initializer // of the form () will be default-initialized. // I love it when this compiler gives warnings about bugs in previous versions of itself. #pragma warning(disable : 4345) // Disable warnings about conversion from size_t to unsigned long and long. #pragma warning(disable : 4267) // Disable warnings about conversion from double to float #pragma warning(disable : 4244) #pragma warning(disable : 4305) // Disable "warning C4180: qualifier applied to function type has no meaning; ignored". // This warning happens often in generic code that works with functions and isn't useful. #pragma warning(disable : 4180) // Disable "warning C4290: C++ exception specification ignored except to indicate a function is not __declspec(nothrow)" #pragma warning(disable : 4290) // DNN module uses template-based network declaration that leads to very long // type names. Visual Studio will produce Warning C4503 in such cases. https://msdn.microsoft.com/en-us/library/074af4b6.aspx says // that correct binaries are still produced even when this warning happens, but linker errors from visual studio, if they occur could be confusing. #pragma warning( disable: 4503 ) #endif #ifdef __BORLANDC__ // Disable the following warnings for the Borland Compilers // // These warnings just say that the compiler is refusing to inline functions with // loops or try blocks in them. // #pragma option -w-8027 #pragma option -w-8026 #endif #include // for the exceptions #ifdef __CYGWIN__ namespace std { typedef std::basic_string wstring; } #endif #include "platform.h" #include "windows_magic.h" #include // for std::swap #include // for std::bad_alloc #include #include #include // for std::numeric_limits for is_finite() #include "assert.h" #include "error.h" #include "noncopyable.h" #include "enable_if.h" #include "uintn.h" #include "numeric_constants.h" #include "memory_manager_stateless/memory_manager_stateless_kernel_1.h" // for the default memory manager // ---------------------------------------------------------------------------------------- /*!A _dT !*/ template inline charT _dTcast (const char a, const wchar_t b); template <> inline char _dTcast (const char a, const wchar_t ) { return a; } template <> inline wchar_t _dTcast (const char , const wchar_t b) { return b; } template inline const charT* _dTcast ( const char* a, const wchar_t* b); template <> inline const char* _dTcast ( const char* a, const wchar_t* ) { return a; } template <> inline const wchar_t* _dTcast ( const char* , const wchar_t* b) { return b; } #define _dT(charT,str) _dTcast(str,L##str) /*! requires - charT == char or wchar_t - str == a string or character literal ensures - returns the literal in the form of a charT type literal. !*/ // ---------------------------------------------------------------------------------------- namespace dlib { // ---------------------------------------------------------------------------------------- /*!A default_memory_manager This memory manager just calls new and delete directly. !*/ typedef memory_manager_stateless_kernel_1 default_memory_manager; // ---------------------------------------------------------------------------------------- /*!A swap !*/ // make swap available in the dlib namespace using std::swap; // ---------------------------------------------------------------------------------------- /*! Here is where I define my return codes. It is important that they all be < 0. !*/ enum general_return_codes { TIMEOUT = -1, WOULDBLOCK = -2, OTHER_ERROR = -3, SHUTDOWN = -4, PORTINUSE = -5 }; // ---------------------------------------------------------------------------------------- inline unsigned long square_root ( unsigned long value ) /*! requires - value <= 2^32 - 1 ensures - returns the square root of value. if the square root is not an integer then it will be rounded up to the nearest integer. !*/ { unsigned long x; // set the initial guess for what the root is depending on // how big value is if (value < 3) return value; else if (value < 4096) // 12 x = 45; else if (value < 65536) // 16 x = 179; else if (value < 1048576) // 20 x = 717; else if (value < 16777216) // 24 x = 2867; else if (value < 268435456) // 28 x = 11469; else // 32 x = 45875; // find the root x = (x + value/x)>>1; x = (x + value/x)>>1; x = (x + value/x)>>1; x = (x + value/x)>>1; if (x*x < value) return x+1; else return x; } // ---------------------------------------------------------------------------------------- template < typename T > void median ( T& one, T& two, T& three ); /*! requires - T implements operator< - T is swappable by a global swap() ensures - #one is the median - #one, #two, and #three is some permutation of one, two, and three. !*/ template < typename T > void median ( T& one, T& two, T& three ) { using std::swap; using dlib::swap; if ( one < two ) { // one < two if ( two < three ) { // one < two < three : two swap(one,two); } else { // one < two >= three if ( one < three) { // three swap(three,one); } } } else { // one >= two if ( three < one ) { // three <= one >= two if ( three < two ) { // two swap(two,one); } else { // three swap(three,one); } } } } // ---------------------------------------------------------------------------------------- namespace relational_operators { template < typename A, typename B > constexpr bool operator> ( const A& a, const B& b ) { return b < a; } // --------------------------------- template < typename A, typename B > constexpr bool operator!= ( const A& a, const B& b ) { return !(a == b); } // --------------------------------- template < typename A, typename B > constexpr bool operator<= ( const A& a, const B& b ) { return !(b < a); } // --------------------------------- template < typename A, typename B > constexpr bool operator>= ( const A& a, const B& b ) { return !(a < b); } } // ---------------------------------------------------------------------------------------- template < typename T > void exchange ( T& a, T& b ) /*! This function does the exact same thing that global swap does and it does it by just calling swap. But a lot of compilers have problems doing a Koenig Lookup and the fact that this has a different name (global swap has the same name as the member functions called swap) makes them compile right. So this is a workaround but not too ugly of one. But hopefully I get get rid of this in a few years. So this function is already deprecated. This also means you should NOT use this function in your own code unless you have to support an old buggy compiler that benefits from this hack. !*/ { using std::swap; using dlib::swap; swap(a,b); } // ---------------------------------------------------------------------------------------- /*!A is_pointer_type This is a template where is_pointer_type::value == true when T is a pointer type and false otherwise. !*/ template < typename T > class is_pointer_type { public: enum { value = false }; private: is_pointer_type(); }; template < typename T > class is_pointer_type { public: enum { value = true }; private: is_pointer_type(); }; // ---------------------------------------------------------------------------------------- /*!A is_const_type This is a template where is_const_type::value == true when T is a const type and false otherwise. !*/ template struct is_const_type { static const bool value = false; }; template struct is_const_type { static const bool value = true; }; template struct is_const_type { static const bool value = true; }; // ---------------------------------------------------------------------------------------- /*!A is_reference_type This is a template where is_reference_type::value == true when T is a reference type and false otherwise. !*/ template struct is_reference_type { static const bool value = false; }; template struct is_reference_type { static const bool value = true; }; template struct is_reference_type { static const bool value = true; }; // ---------------------------------------------------------------------------------------- /*!A is_same_type This is a template where is_same_type::value == true when T and U are the same type and false otherwise. !*/ template < typename T, typename U > class is_same_type { public: enum {value = false}; private: is_same_type(); }; template class is_same_type { public: enum {value = true}; private: is_same_type(); }; // ---------------------------------------------------------------------------------------- /*!A is_float_type This is a template that can be used to determine if a type is one of the built int floating point types (i.e. float, double, or long double). !*/ template < typename T > struct is_float_type { const static bool value = false; }; template <> struct is_float_type { const static bool value = true; }; template <> struct is_float_type { const static bool value = true; }; template <> struct is_float_type { const static bool value = true; }; // ---------------------------------------------------------------------------------------- /*!A is_convertible This is a template that can be used to determine if one type is convertible into another type. For example: is_convertible::value == true // because ints are convertible to floats is_convertible::value == false // because int pointers are NOT convertible to floats !*/ template struct is_convertible { struct yes_type { char a; }; struct no_type { yes_type a[2]; }; static const from& from_helper(); static yes_type test(to); static no_type test(...); const static bool value = sizeof(test(from_helper())) == sizeof(yes_type); }; // ---------------------------------------------------------------------------------------- struct general_ {}; struct special_ : general_ {}; template struct int_ { typedef int type; }; // ---------------------------------------------------------------------------------------- /*!A is_same_object This is a templated function which checks if both of its arguments are actually references to the same object. It returns true if they are and false otherwise. !*/ // handle the case where T and U are unrelated types. template < typename T, typename U > typename disable_if_c::value || is_convertible::value, bool>::type is_same_object ( const T& a, const U& b ) { return ((void*)&a == (void*)&b); } // handle the case where T and U are related types because their pointers can be // implicitly converted into one or the other. E.g. a derived class and its base class. // Or where both T and U are just the same type. This way we make sure that if there is a // valid way to convert between these two pointer types then we will take that route rather // than the void* approach used otherwise. template < typename T, typename U > typename enable_if_c::value || is_convertible::value, bool>::type is_same_object ( const T& a, const U& b ) { return (&a == &b); } // ---------------------------------------------------------------------------------------- /*!A is_unsigned_type This is a template where is_unsigned_type::value == true when T is an unsigned scalar type and false when T is a signed scalar type. !*/ template < typename T > struct is_unsigned_type { static const bool value = static_cast((static_cast(0)-static_cast(1))) > 0; }; template <> struct is_unsigned_type { static const bool value = false; }; template <> struct is_unsigned_type { static const bool value = false; }; template <> struct is_unsigned_type { static const bool value = false; }; // ---------------------------------------------------------------------------------------- /*!A is_signed_type This is a template where is_signed_type::value == true when T is a signed scalar type and false when T is an unsigned scalar type. !*/ template < typename T > struct is_signed_type { static const bool value = !is_unsigned_type::value; }; // ---------------------------------------------------------------------------------------- template < typename T > class copy_functor { public: void operator() ( const T& source, T& destination ) const { destination = source; } }; // ---------------------------------------------------------------------------------------- /*!A static_switch To use this template you give it some number of boolean expressions and it tells you which one of them is true. If more than one of them is true then it causes a compile time error. for example: static_switch<1 + 1 == 2, 4 - 1 == 4>::value == 1 // because the first expression is true static_switch<1 + 1 == 3, 4 == 4>::value == 2 // because the second expression is true static_switch<1 + 1 == 3, 4 == 5>::value == 0 // 0 here because none of them are true static_switch<1 + 1 == 2, 4 == 4>::value == compiler error // because more than one expression is true !*/ template < bool v1 = 0, bool v2 = 0, bool v3 = 0, bool v4 = 0, bool v5 = 0, bool v6 = 0, bool v7 = 0, bool v8 = 0, bool v9 = 0, bool v10 = 0, bool v11 = 0, bool v12 = 0, bool v13 = 0, bool v14 = 0, bool v15 = 0 > struct static_switch; template <> struct static_switch<0,0,0,0,0,0,0,0,0,0,0,0,0,0,0> { const static int value = 0; }; template <> struct static_switch<1,0,0,0,0,0,0,0,0,0,0,0,0,0,0> { const static int value = 1; }; template <> struct static_switch<0,1,0,0,0,0,0,0,0,0,0,0,0,0,0> { const static int value = 2; }; template <> struct static_switch<0,0,1,0,0,0,0,0,0,0,0,0,0,0,0> { const static int value = 3; }; template <> struct static_switch<0,0,0,1,0,0,0,0,0,0,0,0,0,0,0> { const static int value = 4; }; template <> struct static_switch<0,0,0,0,1,0,0,0,0,0,0,0,0,0,0> { const static int value = 5; }; template <> struct static_switch<0,0,0,0,0,1,0,0,0,0,0,0,0,0,0> { const static int value = 6; }; template <> struct static_switch<0,0,0,0,0,0,1,0,0,0,0,0,0,0,0> { const static int value = 7; }; template <> struct static_switch<0,0,0,0,0,0,0,1,0,0,0,0,0,0,0> { const static int value = 8; }; template <> struct static_switch<0,0,0,0,0,0,0,0,1,0,0,0,0,0,0> { const static int value = 9; }; template <> struct static_switch<0,0,0,0,0,0,0,0,0,1,0,0,0,0,0> { const static int value = 10; }; template <> struct static_switch<0,0,0,0,0,0,0,0,0,0,1,0,0,0,0> { const static int value = 11; }; template <> struct static_switch<0,0,0,0,0,0,0,0,0,0,0,1,0,0,0> { const static int value = 12; }; template <> struct static_switch<0,0,0,0,0,0,0,0,0,0,0,0,1,0,0> { const static int value = 13; }; template <> struct static_switch<0,0,0,0,0,0,0,0,0,0,0,0,0,1,0> { const static int value = 14; }; template <> struct static_switch<0,0,0,0,0,0,0,0,0,0,0,0,0,0,1> { const static int value = 15; }; // ---------------------------------------------------------------------------------------- /*!A is_built_in_scalar_type This is a template that allows you to determine if the given type is a built in scalar type such as an int, char, float, short, etc. For example, is_built_in_scalar_type::value == true For example, is_built_in_scalar_type::value == false !*/ template struct is_built_in_scalar_type { const static bool value = false; }; template <> struct is_built_in_scalar_type { const static bool value = true; }; template <> struct is_built_in_scalar_type { const static bool value = true; }; template <> struct is_built_in_scalar_type { const static bool value = true; }; template <> struct is_built_in_scalar_type { const static bool value = true; }; template <> struct is_built_in_scalar_type { const static bool value = true; }; template <> struct is_built_in_scalar_type { const static bool value = true; }; template <> struct is_built_in_scalar_type { const static bool value = true; }; template <> struct is_built_in_scalar_type { const static bool value = true; }; template <> struct is_built_in_scalar_type { const static bool value = true; }; template <> struct is_built_in_scalar_type { const static bool value = true; }; template <> struct is_built_in_scalar_type { const static bool value = true; }; template <> struct is_built_in_scalar_type { const static bool value = true; }; template <> struct is_built_in_scalar_type { const static bool value = true; }; template <> struct is_built_in_scalar_type { const static bool value = true; }; // Don't define one for wchar_t when using a version of visual studio // older than 8.0 (visual studio 2005) since before then they improperly set // wchar_t to be a typedef rather than its own type as required by the C++ // standard. #if !defined(_MSC_VER) || _NATIVE_WCHAR_T_DEFINED template <> struct is_built_in_scalar_type { const static bool value = true; }; #endif // ---------------------------------------------------------------------------------------- template < typename T > typename enable_if,bool>::type is_finite ( const T& value ) /*! requires - value must be some kind of scalar type such as int or double ensures - returns true if value is a finite value (e.g. not infinity or NaN) and false otherwise. !*/ { if (is_float_type::value) return -std::numeric_limits::infinity() < value && value < std::numeric_limits::infinity(); else return true; } // ---------------------------------------------------------------------------------------- /*!A promote This is a template that takes one of the built in scalar types and gives you another scalar type that should be big enough to hold sums of values from the original scalar type. The new scalar type will also always be signed. For example, promote::type == int32 !*/ template struct promote; template struct promote { typedef int32 type; }; template struct promote { typedef int32 type; }; template struct promote { typedef int64 type; }; template struct promote { typedef int64 type; }; template <> struct promote { typedef double type; }; template <> struct promote { typedef double type; }; template <> struct promote { typedef long double type; }; // ---------------------------------------------------------------------------------------- /*!A assign_zero_if_built_in_scalar_type This function assigns its argument the value of 0 if it is a built in scalar type according to the is_built_in_scalar_type<> template. If it isn't a built in scalar type then it does nothing. !*/ template inline typename disable_if,void>::type assign_zero_if_built_in_scalar_type (T&){} template inline typename enable_if,void>::type assign_zero_if_built_in_scalar_type (T& a){a=0;} // ---------------------------------------------------------------------------------------- /*!A basic_type This is a template that takes a type and strips off any const, volatile, or reference qualifiers and gives you back the basic underlying type. So for example: basic_type::type == int !*/ template struct basic_type { typedef T type; }; template struct basic_type { typedef T type; }; template struct basic_type { typedef T type; }; template struct basic_type { typedef T type; }; template struct basic_type { typedef T type; }; template struct basic_type { typedef T type; }; template struct basic_type { typedef T type; }; template struct basic_type { typedef T type; }; // ---------------------------------------------------------------------------------------- template T put_in_range ( const T& a, const T& b, const T& val ) /*! requires - T is a type that looks like double, float, int, or so forth ensures - if (val is within the range [a,b]) then - returns val - else - returns the end of the range [a,b] that is closest to val !*/ { if (a < b) { if (val < a) return a; else if (val > b) return b; } else { if (val < b) return b; else if (val > a) return a; } return val; } // overload for double inline double put_in_range(const double& a, const double& b, const double& val) { return put_in_range(a,b,val); } // ---------------------------------------------------------------------------------------- /*!A tabs This is a template to compute the absolute value a number at compile time. For example, abs<-4>::value == 4 abs<4>::value == 4 !*/ template struct tabs { const static long value = x; }; template struct tabs::type> { const static long value = -x; }; // ---------------------------------------------------------------------------------------- /*!A tmax This is a template to compute the max of two values at compile time For example, abs<4,7>::value == 7 !*/ template struct tmax { const static long value = x; }; template struct tmax x)>::type> { const static long value = y; }; // ---------------------------------------------------------------------------------------- /*!A tmin This is a template to compute the min of two values at compile time For example, abs<4,7>::value == 4 !*/ template struct tmin { const static long value = x; }; template struct tmin::type> { const static long value = y; }; // ---------------------------------------------------------------------------------------- #define DLIB_MAKE_HAS_MEMBER_FUNCTION_TEST(testname, returnT, funct_name, args) \ struct _two_bytes_##testname { char a[2]; }; \ template < typename T, returnT (T::*funct)args > \ struct _helper_##testname { typedef char type; }; \ template \ static char _has_##testname##_helper( typename _helper_##testname::type ) { return 0;} \ template \ static _two_bytes_##testname _has_##testname##_helper(int) { return _two_bytes_##testname();} \ template struct _##testname##workaroundbug { \ const static unsigned long U = sizeof(_has_##testname##_helper('a')); }; \ template ::U > \ struct testname { static const bool value = false; }; \ template \ struct testname { static const bool value = true; }; /*!A DLIB_MAKE_HAS_MEMBER_FUNCTION_TEST The DLIB_MAKE_HAS_MEMBER_FUNCTION_TEST() macro is used to define traits templates that tell you if a class has a certain member function. For example, to make a test to see if a class has a public method with the signature void print(int) you would say: DLIB_MAKE_HAS_MEMBER_FUNCTION_TEST(has_print, void, print, (int)) Then you can check if a class, T, has this method by looking at the boolean value: has_print::value which will be true if the member function is in the T class. Note that you can test for member functions taking no arguments by simply passing in empty () like so: DLIB_MAKE_HAS_MEMBER_FUNCTION_TEST(has_print, void, print, ()) This would test for a member of the form: void print(). To test for const member functions you would use a statement such as this: DLIB_MAKE_HAS_MEMBER_FUNCTION_TEST(has_print, void, print, ()const) This would test for a member of the form: void print() const. To test for const templated member functions you would use a statement such as this: DLIB_MAKE_HAS_MEMBER_FUNCTION_TEST(has_print, void, template print, ()) This would test for a member of the form: template void print(). !*/ // ---------------------------------------------------------------------------------------- /*!A is_function This is a template that allows you to determine if the given type is a function. For example, void funct(); is_built_in_scalar_type::value == true is_built_in_scalar_type::value == false !*/ template struct is_function { static const bool value = false; }; template struct is_function { static const bool value = true; }; template struct is_function { static const bool value = true; }; template struct is_function { static const bool value = true; }; template struct is_function { static const bool value = true; }; template struct is_function { static const bool value = true; }; template struct is_function { static const bool value = true; }; template struct is_function { static const bool value = true; }; template struct is_function { static const bool value = true; }; template struct is_function { static const bool value = true; }; template struct is_function { static const bool value = true; }; template struct is_function { static const bool value = true; }; template class funct_wrap0 { public: funct_wrap0(T (&f_)()):f(f_){} T operator()() const { return f(); } private: T (&f)(); }; template class funct_wrap1 { public: funct_wrap1(T (&f_)(A0)):f(f_){} T operator()(A0 a0) const { return f(a0); } private: T (&f)(A0); }; template class funct_wrap2 { public: funct_wrap2(T (&f_)(A0,A1)):f(f_){} T operator()(A0 a0, A1 a1) const { return f(a0,a1); } private: T (&f)(A0,A1); }; template class funct_wrap3 { public: funct_wrap3(T (&f_)(A0,A1,A2)):f(f_){} T operator()(A0 a0, A1 a1, A2 a2) const { return f(a0,a1,a2); } private: T (&f)(A0,A1,A2); }; template class funct_wrap4 { public: funct_wrap4(T (&f_)(A0,A1,A2,A3)):f(f_){} T operator()(A0 a0, A1 a1, A2 a2, A3 a3) const { return f(a0,a1,a2,a3); } private: T (&f)(A0,A1,A2,A3); }; template class funct_wrap5 { public: funct_wrap5(T (&f_)(A0,A1,A2,A3,A4)):f(f_){} T operator()(A0 a0, A1 a1, A2 a2, A3 a3, A4 a4) const { return f(a0,a1,a2,a3,a4); } private: T (&f)(A0,A1,A2,A3,A4); }; /*!A wrap_function This is a template that allows you to turn a global function into a function object. The reason for this template's existence is so you can do stuff like this: template void call_funct(const T& funct) { cout << funct(); } std::string test() { return "asdfasf"; } int main() { call_funct(wrap_function(test)); } The above code doesn't work right on some compilers if you don't use wrap_function. !*/ template funct_wrap0 wrap_function(T (&f)()) { return funct_wrap0(f); } template funct_wrap1 wrap_function(T (&f)(A0)) { return funct_wrap1(f); } template funct_wrap2 wrap_function(T (&f)(A0, A1)) { return funct_wrap2(f); } template funct_wrap3 wrap_function(T (&f)(A0, A1, A2)) { return funct_wrap3(f); } template funct_wrap4 wrap_function(T (&f)(A0, A1, A2, A3)) { return funct_wrap4(f); } template funct_wrap5 wrap_function(T (&f)(A0, A1, A2, A3, A4)) { return funct_wrap5(f); } // ---------------------------------------------------------------------------------------- template class stack_based_memory_block : noncopyable { /*! WHAT THIS OBJECT REPRESENTS This object is a simple container for a block of memory of bSIZE bytes. This memory block is located on the stack and properly aligned to hold any kind of object. !*/ public: static const unsigned long size = bSIZE; stack_based_memory_block(): data(mem.data) {} void* get () { return data; } /*! ensures - returns a pointer to the block of memory contained in this object !*/ const void* get () const { return data; } /*! ensures - returns a pointer to the block of memory contained in this object !*/ private: // You obviously can't have a block of memory that has zero bytes in it. COMPILE_TIME_ASSERT(bSIZE > 0); union mem_block { // All of this garbage is to make sure this union is properly aligned // (a union is always aligned such that everything in it would be properly // aligned. So the assumption here is that one of these objects has // a large enough alignment requirement to satisfy any object this // block of memory might be cast into). void* void_ptr; int integer; struct { void (stack_based_memory_block::*callback)(); stack_based_memory_block* o; } stuff; long double more_stuff; uint64 var1; uint32 var2; double var3; char data[size]; } mem; // The reason for having this variable is that doing it this way avoids // warnings from gcc about violations of strict-aliasing rules. void* const data; }; // ---------------------------------------------------------------------------------------- template < typename T, typename F > auto max_scoring_element( const T& container, F score_func ) -> decltype(std::make_pair(*container.begin(), 0.0)) /*! requires - container has .begin() and .end(), allowing it to be enumerated. - score_func() is a function that takes an element of the container and returns a double. ensures - This function finds the element of container that has the largest score, according to score_func(), and returns a std::pair containing that maximal element along with the score. - If the container is empty then make_pair(a default initialized object, -infinity) is returned. !*/ { double best_score = -std::numeric_limits::infinity(); auto best_i = container.begin(); for (auto i = container.begin(); i != container.end(); ++i) { auto score = score_func(*i); if (score > best_score) { best_score = score; best_i = i; } } using item_type = typename std::remove_reference::type; if (best_i == container.end()) return std::make_pair(item_type(), best_score); else return std::make_pair(*best_i, best_score); } // ---------------------------------------------------------------------------------------- template < typename T, typename F > auto min_scoring_element( const T& container, F score_func ) -> decltype(std::make_pair(*container.begin(), 0.0)) /*! requires - container has .begin() and .end(), allowing it to be enumerated. - score_func() is a function that takes an element of the container and returns a double. ensures - This function finds the element of container that has the smallest score, according to score_func(), and returns a std::pair containing that minimal element along with the score. - If the container is empty then make_pair(a default initialized object, infinity) is returned. !*/ { double best_score = std::numeric_limits::infinity(); auto best_i = container.begin(); for (auto i = container.begin(); i != container.end(); ++i) { auto score = score_func(*i); if (score < best_score) { best_score = score; best_i = i; } } using item_type = typename std::remove_reference::type; if (best_i == container.end()) return std::make_pair(item_type(), best_score); else return std::make_pair(*best_i, best_score); } // ---------------------------------------------------------------------------------------- } #endif // DLIB_ALGs_ ================================================ FILE: benchmarks/dlib/array/array_kernel.h ================================================ // Copyright (C) 2003 Davis E. King (davis@dlib.net) // License: Boost Software License See LICENSE.txt for the full license. #ifndef DLIB_ARRAY_KERNEl_2_ #define DLIB_ARRAY_KERNEl_2_ #include "array_kernel_abstract.h" #include "../interfaces/enumerable.h" #include "../algs.h" #include "../serialize.h" #include "../sort.h" #include "../is_kind.h" namespace dlib { template < typename T, typename mem_manager = default_memory_manager > class array : public enumerable { /*! INITIAL VALUE - array_size == 0 - max_array_size == 0 - array_elements == 0 - pos == 0 - last_pos == 0 - _at_start == true CONVENTION - array_size == size() - max_array_size == max_size() - if (max_array_size > 0) - array_elements == pointer to max_array_size elements of type T - else - array_elements == 0 - if (array_size > 0) - last_pos == array_elements + array_size - 1 - else - last_pos == 0 - at_start() == _at_start - current_element_valid() == pos != 0 - if (current_element_valid()) then - *pos == element() !*/ public: // These typedefs are here for backwards compatibility with old versions of dlib. typedef array kernel_1a; typedef array kernel_1a_c; typedef array kernel_2a; typedef array kernel_2a_c; typedef array sort_1a; typedef array sort_1a_c; typedef array sort_1b; typedef array sort_1b_c; typedef array sort_2a; typedef array sort_2a_c; typedef array sort_2b; typedef array sort_2b_c; typedef array expand_1a; typedef array expand_1a_c; typedef array expand_1b; typedef array expand_1b_c; typedef array expand_1c; typedef array expand_1c_c; typedef array expand_1d; typedef array expand_1d_c; typedef T type; typedef T value_type; typedef mem_manager mem_manager_type; array ( ) : array_size(0), max_array_size(0), array_elements(0), pos(0), last_pos(0), _at_start(true) {} array(const array&) = delete; array& operator=(array&) = delete; array( array&& item ) : array() { swap(item); } array& operator=( array&& item ) { swap(item); return *this; } explicit array ( size_t new_size ) : array_size(0), max_array_size(0), array_elements(0), pos(0), last_pos(0), _at_start(true) { resize(new_size); } ~array ( ); void clear ( ); inline const T& operator[] ( size_t pos ) const; inline T& operator[] ( size_t pos ); void set_size ( size_t size ); inline size_t max_size( ) const; void set_max_size( size_t max ); void swap ( array& item ); // functions from the enumerable interface inline size_t size ( ) const; inline bool at_start ( ) const; inline void reset ( ) const; bool current_element_valid ( ) const; inline const T& element ( ) const; inline T& element ( ); bool move_next ( ) const; void sort ( ); void resize ( size_t new_size ); const T& back ( ) const; T& back ( ); void pop_back ( ); void pop_back ( T& item ); void push_back ( T& item ); void push_back ( T&& item ); typedef T* iterator; typedef const T* const_iterator; iterator begin() { return array_elements; } const_iterator begin() const { return array_elements; } iterator end() { return array_elements+array_size; } const_iterator end() const { return array_elements+array_size; } private: typename mem_manager::template rebind::other pool; // data members size_t array_size; size_t max_array_size; T* array_elements; mutable T* pos; T* last_pos; mutable bool _at_start; }; template < typename T, typename mem_manager > inline void swap ( array& a, array& b ) { a.swap(b); } // ---------------------------------------------------------------------------------------- template < typename T, typename mem_manager > void serialize ( const array& item, std::ostream& out ) { try { serialize(item.max_size(),out); serialize(item.size(),out); for (size_t i = 0; i < item.size(); ++i) serialize(item[i],out); } catch (serialization_error& e) { throw serialization_error(e.info + "\n while serializing object of type array"); } } template < typename T, typename mem_manager > void deserialize ( array& item, std::istream& in ) { try { size_t max_size, size; deserialize(max_size,in); deserialize(size,in); item.set_max_size(max_size); item.set_size(size); for (size_t i = 0; i < size; ++i) deserialize(item[i],in); } catch (serialization_error& e) { item.clear(); throw serialization_error(e.info + "\n while deserializing object of type array"); } } // ---------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------- // member function definitions // ---------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------- template < typename T, typename mem_manager > array:: ~array ( ) { if (array_elements) { pool.deallocate_array(array_elements); } } // ---------------------------------------------------------------------------------------- template < typename T, typename mem_manager > void array:: clear ( ) { reset(); last_pos = 0; array_size = 0; if (array_elements) { pool.deallocate_array(array_elements); } array_elements = 0; max_array_size = 0; } // ---------------------------------------------------------------------------------------- template < typename T, typename mem_manager > const T& array:: operator[] ( size_t pos ) const { // make sure requires clause is not broken DLIB_ASSERT( pos < this->size() , "\tconst T& array::operator[]" << "\n\tpos must < size()" << "\n\tpos: " << pos << "\n\tsize(): " << this->size() << "\n\tthis: " << this ); return array_elements[pos]; } // ---------------------------------------------------------------------------------------- template < typename T, typename mem_manager > T& array:: operator[] ( size_t pos ) { // make sure requires clause is not broken DLIB_ASSERT( pos < this->size() , "\tT& array::operator[]" << "\n\tpos must be < size()" << "\n\tpos: " << pos << "\n\tsize(): " << this->size() << "\n\tthis: " << this ); return array_elements[pos]; } // ---------------------------------------------------------------------------------------- template < typename T, typename mem_manager > void array:: set_size ( size_t size ) { // make sure requires clause is not broken DLIB_CASSERT(( size <= this->max_size() ), "\tvoid array::set_size" << "\n\tsize must be <= max_size()" << "\n\tsize: " << size << "\n\tmax size: " << this->max_size() << "\n\tthis: " << this ); reset(); array_size = size; if (size > 0) last_pos = array_elements + size - 1; else last_pos = 0; } // ---------------------------------------------------------------------------------------- template < typename T, typename mem_manager > size_t array:: size ( ) const { return array_size; } // ---------------------------------------------------------------------------------------- template < typename T, typename mem_manager > void array:: set_max_size( size_t max ) { reset(); array_size = 0; last_pos = 0; if (max != 0) { // if new max size is different if (max != max_array_size) { if (array_elements) { pool.deallocate_array(array_elements); } // try to get more memroy try { array_elements = pool.allocate_array(max); } catch (...) { array_elements = 0; max_array_size = 0; throw; } max_array_size = max; } } // if the array is being made to be zero else { if (array_elements) pool.deallocate_array(array_elements); max_array_size = 0; array_elements = 0; } } // ---------------------------------------------------------------------------------------- template < typename T, typename mem_manager > size_t array:: max_size ( ) const { return max_array_size; } // ---------------------------------------------------------------------------------------- template < typename T, typename mem_manager > void array:: swap ( array& item ) { auto array_size_temp = item.array_size; auto max_array_size_temp = item.max_array_size; T* array_elements_temp = item.array_elements; item.array_size = array_size; item.max_array_size = max_array_size; item.array_elements = array_elements; array_size = array_size_temp; max_array_size = max_array_size_temp; array_elements = array_elements_temp; exchange(_at_start,item._at_start); exchange(pos,item.pos); exchange(last_pos,item.last_pos); pool.swap(item.pool); } // ---------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------- // enumerable function definitions // ---------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------- template < typename T, typename mem_manager > bool array:: at_start ( ) const { return _at_start; } // ---------------------------------------------------------------------------------------- template < typename T, typename mem_manager > void array:: reset ( ) const { _at_start = true; pos = 0; } // ---------------------------------------------------------------------------------------- template < typename T, typename mem_manager > bool array:: current_element_valid ( ) const { return pos != 0; } // ---------------------------------------------------------------------------------------- template < typename T, typename mem_manager > const T& array:: element ( ) const { // make sure requires clause is not broken DLIB_ASSERT(this->current_element_valid(), "\tconst T& array::element()" << "\n\tThe current element must be valid if you are to access it." << "\n\tthis: " << this ); return *pos; } // ---------------------------------------------------------------------------------------- template < typename T, typename mem_manager > T& array:: element ( ) { // make sure requires clause is not broken DLIB_ASSERT(this->current_element_valid(), "\tT& array::element()" << "\n\tThe current element must be valid if you are to access it." << "\n\tthis: " << this ); return *pos; } // ---------------------------------------------------------------------------------------- template < typename T, typename mem_manager > bool array:: move_next ( ) const { if (!_at_start) { if (pos < last_pos) { ++pos; return true; } else { pos = 0; return false; } } else { _at_start = false; if (array_size > 0) { pos = array_elements; return true; } else { return false; } } } // ---------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------- // Yet more functions // ---------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------- template < typename T, typename mem_manager > void array:: sort ( ) { if (this->size() > 1) { // call the quick sort function for arrays that is in algs.h dlib::qsort_array(*this,0,this->size()-1); } this->reset(); } // ---------------------------------------------------------------------------------------- template < typename T, typename mem_manager > void array:: resize ( size_t new_size ) { if (this->max_size() < new_size) { array temp; temp.set_max_size(new_size); temp.set_size(new_size); for (size_t i = 0; i < this->size(); ++i) { exchange((*this)[i],temp[i]); } temp.swap(*this); } else { this->set_size(new_size); } } // ---------------------------------------------------------------------------------------- template < typename T, typename mem_manager > T& array:: back ( ) { // make sure requires clause is not broken DLIB_ASSERT( this->size() > 0 , "\tT& array::back()" << "\n\tsize() must be bigger than 0" << "\n\tsize(): " << this->size() << "\n\tthis: " << this ); return (*this)[this->size()-1]; } // ---------------------------------------------------------------------------------------- template < typename T, typename mem_manager > const T& array:: back ( ) const { // make sure requires clause is not broken DLIB_ASSERT( this->size() > 0 , "\tconst T& array::back()" << "\n\tsize() must be bigger than 0" << "\n\tsize(): " << this->size() << "\n\tthis: " << this ); return (*this)[this->size()-1]; } // ---------------------------------------------------------------------------------------- template < typename T, typename mem_manager > void array:: pop_back ( T& item ) { // make sure requires clause is not broken DLIB_ASSERT( this->size() > 0 , "\tvoid array::pop_back()" << "\n\tsize() must be bigger than 0" << "\n\tsize(): " << this->size() << "\n\tthis: " << this ); exchange(item,(*this)[this->size()-1]); this->set_size(this->size()-1); } // ---------------------------------------------------------------------------------------- template < typename T, typename mem_manager > void array:: pop_back ( ) { // make sure requires clause is not broken DLIB_ASSERT( this->size() > 0 , "\tvoid array::pop_back()" << "\n\tsize() must be bigger than 0" << "\n\tsize(): " << this->size() << "\n\tthis: " << this ); this->set_size(this->size()-1); } // ---------------------------------------------------------------------------------------- template < typename T, typename mem_manager > void array:: push_back ( T& item ) { if (this->max_size() == this->size()) { // double the size of the array array temp; temp.set_max_size(this->size()*2 + 1); temp.set_size(this->size()+1); for (size_t i = 0; i < this->size(); ++i) { exchange((*this)[i],temp[i]); } exchange(item,temp[temp.size()-1]); temp.swap(*this); } else { this->set_size(this->size()+1); exchange(item,(*this)[this->size()-1]); } } // ---------------------------------------------------------------------------------------- template < typename T, typename mem_manager > void array:: push_back ( T&& item ) { push_back(item); } // ---------------------------------------------------------------------------------------- template struct is_array > { const static bool value = true; }; // ---------------------------------------------------------------------------------------- } #endif // DLIB_ARRAY_KERNEl_2_ ================================================ FILE: benchmarks/dlib/array/array_kernel_abstract.h ================================================ // Copyright (C) 2003 Davis E. King (davis@dlib.net) // License: Boost Software License See LICENSE.txt for the full license. #undef DLIB_ARRAY_KERNEl_ABSTRACT_ #ifdef DLIB_ARRAY_KERNEl_ABSTRACT_ #include "../interfaces/enumerable.h" #include "../serialize.h" #include "../algs.h" namespace dlib { template < typename T, typename mem_manager = default_memory_manager > class array : public enumerable { /*! REQUIREMENTS ON T T must have a default constructor. REQUIREMENTS ON mem_manager must be an implementation of memory_manager/memory_manager_kernel_abstract.h or must be an implementation of memory_manager_global/memory_manager_global_kernel_abstract.h or must be an implementation of memory_manager_stateless/memory_manager_stateless_kernel_abstract.h mem_manager::type can be set to anything. POINTERS AND REFERENCES TO INTERNAL DATA front(), back(), swap(), max_size(), set_size(), and operator[] functions do not invalidate pointers or references to internal data. All other functions have no such guarantee. INITIAL VALUE size() == 0 max_size() == 0 ENUMERATION ORDER The enumerator will iterate over the elements of the array in the order (*this)[0], (*this)[1], (*this)[2], ... WHAT THIS OBJECT REPRESENTS This object represents an ordered 1-dimensional array of items, each item is associated with an integer value. The items are numbered from 0 though size() - 1 and the operator[] functions run in constant time. Also note that unless specified otherwise, no member functions of this object throw exceptions. !*/ public: typedef T type; typedef T value_type; typedef mem_manager mem_manager_type; array ( ); /*! ensures - #*this is properly initialized throws - std::bad_alloc or any exception thrown by T's constructor !*/ explicit array ( size_t new_size ); /*! ensures - #*this is properly initialized - #size() == new_size - #max_size() == new_size - All elements of the array will have initial values for their type. throws - std::bad_alloc or any exception thrown by T's constructor !*/ ~array ( ); /*! ensures - all memory associated with *this has been released !*/ array( array&& item ); /*! ensures - move constructs *this from item. Therefore, the state of item is moved into *this and #item has a valid but unspecified state. !*/ array& operator=( array&& item ); /*! ensures - move assigns *this from item. Therefore, the state of item is moved into *this and #item has a valid but unspecified state. - returns a reference to #*this !*/ void clear ( ); /*! ensures - #*this has its initial value throws - std::bad_alloc or any exception thrown by T's constructor if this exception is thrown then the array object is unusable until clear() is called and succeeds !*/ const T& operator[] ( size_t pos ) const; /*! requires - pos < size() ensures - returns a const reference to the element at position pos !*/ T& operator[] ( size_t pos ); /*! requires - pos < size() ensures - returns a non-const reference to the element at position pos !*/ void set_size ( size_t size ); /*! requires - size <= max_size() ensures - #size() == size - any element with index between 0 and size - 1 which was in the array before the call to set_size() retains its value and index. All other elements have undetermined (but valid for their type) values. (e.g. this object might buffer old T objects and reuse them without reinitializing them between calls to set_size()) - #at_start() == true throws - std::bad_alloc or any exception thrown by T's constructor may throw this exception if there is not enough memory and if it does throw then the call to set_size() has no effect !*/ size_t max_size( ) const; /*! ensures - returns the maximum size of *this !*/ void set_max_size( size_t max ); /*! ensures - #max_size() == max - #size() == 0 - #at_start() == true throws - std::bad_alloc or any exception thrown by T's constructor may throw this exception if there is not enough memory and if it does throw then max_size() == 0 !*/ void swap ( array& item ); /*! ensures - swaps *this and item !*/ void sort ( ); /*! requires - T must be a type with that is comparable via operator< ensures - for all elements in #*this the ith element is <= the i+1 element - #at_start() == true throws - std::bad_alloc or any exception thrown by T's constructor data may be lost if sort() throws !*/ void resize ( size_t new_size ); /*! ensures - #size() == new_size - #max_size() == max(new_size,max_size()) - for all i < size() && i < new_size: - #(*this)[i] == (*this)[i] (i.e. All the original elements of *this which were at index values less than new_size are unmodified.) - for all valid i >= size(): - #(*this)[i] has an undefined value (i.e. any new elements of the array have an undefined value) throws - std::bad_alloc or any exception thrown by T's constructor. If an exception is thrown then it has no effect on *this. !*/ const T& back ( ) const; /*! requires - size() != 0 ensures - returns a const reference to (*this)[size()-1] !*/ T& back ( ); /*! requires - size() != 0 ensures - returns a non-const reference to (*this)[size()-1] !*/ void pop_back ( T& item ); /*! requires - size() != 0 ensures - #size() == size() - 1 - swaps (*this)[size()-1] into item - All elements with an index less than size()-1 are unmodified by this operation. !*/ void pop_back ( ); /*! requires - size() != 0 ensures - #size() == size() - 1 - All elements with an index less than size()-1 are unmodified by this operation. !*/ void push_back ( T& item ); /*! ensures - #size() == size()+1 - swaps item into (*this)[#size()-1] - #back() == item - #item has some undefined value (whatever happens to get swapped out of the array) throws - std::bad_alloc or any exception thrown by T's constructor. If an exception is thrown then it has no effect on *this. !*/ void push_back (T&& item) { push_back(item); } /*! enable push_back from rvalues !*/ typedef T* iterator; typedef const T* const_iterator; iterator begin( ); /*! ensures - returns an iterator that points to the first element in this array or end() if the array is empty. !*/ const_iterator begin( ) const; /*! ensures - returns a const iterator that points to the first element in this array or end() if the array is empty. !*/ iterator end( ); /*! ensures - returns an iterator that points to one past the end of the array. !*/ const_iterator end( ) const; /*! ensures - returns a const iterator that points to one past the end of the array. !*/ private: // restricted functions array(array&); // copy constructor array& operator=(array&); // assignment operator }; template < typename T > inline void swap ( array& a, array& b ) { a.swap(b); } /*! provides a global swap function !*/ template < typename T > void serialize ( const array& item, std::ostream& out ); /*! provides serialization support !*/ template < typename T > void deserialize ( array& item, std::istream& in ); /*! provides deserialization support !*/ } #endif // DLIB_ARRAY_KERNEl_ABSTRACT_ ================================================ FILE: benchmarks/dlib/array/array_tools.h ================================================ // Copyright (C) 2013 Davis E. King (davis@dlib.net) // License: Boost Software License See LICENSE.txt for the full license. #ifndef DLIB_ARRAY_tOOLS_H_ #define DLIB_ARRAY_tOOLS_H_ #include "../assert.h" #include "array_tools_abstract.h" namespace dlib { template void split_array ( T& a, T& b, double frac ) { // make sure requires clause is not broken DLIB_ASSERT(0 <= frac && frac <= 1, "\t void split_array()" << "\n\t frac must be between 0 and 1." << "\n\t frac: " << frac ); const unsigned long asize = static_cast(a.size()*frac); const unsigned long bsize = a.size()-asize; b.resize(bsize); for (unsigned long i = 0; i < b.size(); ++i) { swap(b[i], a[i+asize]); } a.resize(asize); } } #endif // DLIB_ARRAY_tOOLS_H_ ================================================ FILE: benchmarks/dlib/array/array_tools_abstract.h ================================================ // Copyright (C) 2013 Davis E. King (davis@dlib.net) // License: Boost Software License See LICENSE.txt for the full license. #undef DLIB_ARRAY_tOOLS_ABSTRACT_H_ #ifdef DLIB_ARRAY_tOOLS_ABSTRACT_H_ #include "array_kernel_abstract.h" namespace dlib { template void split_array ( T& a, T& b, double frac ); /*! requires - 0 <= frac <= 1 - T must be an array type such as dlib::array or std::vector ensures - This function takes the elements of a and splits them into two groups. The first group remains in a and the second group is put into b. The ordering of elements in a is preserved. In particular, concatenating #a with #b will reproduce the original contents of a. - The elements in a are moved around using global swap(). So they must be swappable, but do not need to be copyable. - #a.size() == floor(a.size()*frac) - #b.size() == a.size()-#a.size() !*/ } #endif // DLIB_ARRAY_tOOLS_ABSTRACT_H_ ================================================ FILE: benchmarks/dlib/array.h ================================================ // Copyright (C) 2003 Davis E. King (davis@dlib.net) // License: Boost Software License See LICENSE.txt for the full license. #ifndef DLIB_ARRAy_ #define DLIB_ARRAy_ #include "array/array_kernel.h" #include "array/array_tools.h" #endif // DLIB_ARRAy_ ================================================ FILE: benchmarks/dlib/assert.h ================================================ // Copyright (C) 2003 Davis E. King (davis@dlib.net) // License: Boost Software License See LICENSE.txt for the full license. #ifndef DLIB_ASSERt_ #define DLIB_ASSERt_ #include "config.h" #include #include #include "error.h" // ----------------------------- // Use some stuff from boost here // (C) Copyright John Maddock 2001 - 2003. // (C) Copyright Darin Adler 2001. // (C) Copyright Peter Dimov 2001. // (C) Copyright Bill Kempf 2002. // (C) Copyright Jens Maurer 2002. // (C) Copyright David Abrahams 2002 - 2003. // (C) Copyright Gennaro Prota 2003. // (C) Copyright Eric Friedman 2003. // License: Boost Software License See LICENSE.txt for the full license. // #ifndef DLIB_BOOST_JOIN #define DLIB_BOOST_JOIN( X, Y ) DLIB_BOOST_DO_JOIN( X, Y ) #define DLIB_BOOST_DO_JOIN( X, Y ) DLIB_BOOST_DO_JOIN2(X,Y) #define DLIB_BOOST_DO_JOIN2( X, Y ) X##Y #endif // figure out if the compiler has rvalue references. #if defined(__clang__) # if __has_feature(cxx_rvalue_references) # define DLIB_HAS_RVALUE_REFERENCES # endif # if __has_feature(cxx_generalized_initializers) # define DLIB_HAS_INITIALIZER_LISTS # endif #elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ > 2)) && defined(__GXX_EXPERIMENTAL_CXX0X__) # define DLIB_HAS_RVALUE_REFERENCES # define DLIB_HAS_INITIALIZER_LISTS #elif defined(_MSC_VER) && _MSC_VER >= 1800 # define DLIB_HAS_INITIALIZER_LISTS # define DLIB_HAS_RVALUE_REFERENCES #elif defined(_MSC_VER) && _MSC_VER >= 1600 # define DLIB_HAS_RVALUE_REFERENCES #elif defined(__INTEL_COMPILER) && defined(BOOST_INTEL_STDCXX0X) # define DLIB_HAS_RVALUE_REFERENCES # define DLIB_HAS_INITIALIZER_LISTS #endif #if defined(__APPLE__) && defined(__GNUC_LIBSTD__) && ((__GNUC_LIBSTD__-0) * 100 + __GNUC_LIBSTD_MINOR__-0 <= 402) // Apple has not updated libstdc++ in some time and anything under 4.02 does not have for sure. # undef DLIB_HAS_INITIALIZER_LISTS #endif // figure out if the compiler has static_assert. #if defined(__clang__) # if __has_feature(cxx_static_assert) # define DLIB_HAS_STATIC_ASSERT # endif #elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ > 2)) && defined(__GXX_EXPERIMENTAL_CXX0X__) # define DLIB_HAS_STATIC_ASSERT #elif defined(_MSC_VER) && _MSC_VER >= 1600 # define DLIB_HAS_STATIC_ASSERT #elif defined(__INTEL_COMPILER) && defined(BOOST_INTEL_STDCXX0X) # define DLIB_HAS_STATIC_ASSERT #endif // ----------------------------- namespace dlib { template struct compile_time_assert; template <> struct compile_time_assert { enum {value=1}; }; template struct assert_are_same_type; template struct assert_are_same_type {enum{value=1};}; template struct assert_are_not_same_type {enum{value=1}; }; template struct assert_are_not_same_type {}; template struct assert_types_match {enum{value=0};}; template struct assert_types_match {enum{value=1};}; } // gcc 4.8 will warn about unused typedefs. But we use typedefs in some of the compile // time assert macros so we need to make it not complain about them "not being used". #ifdef __GNUC__ #define DLIB_NO_WARN_UNUSED __attribute__ ((unused)) #else #define DLIB_NO_WARN_UNUSED #endif // Use the newer static_assert if it's available since it produces much more readable error // messages. #ifdef DLIB_HAS_STATIC_ASSERT #define COMPILE_TIME_ASSERT(expression) static_assert(expression, "Failed assertion") #define ASSERT_ARE_SAME_TYPE(type1, type2) static_assert(::dlib::assert_types_match::value, "These types should be the same but aren't.") #define ASSERT_ARE_NOT_SAME_TYPE(type1, type2) static_assert(!::dlib::assert_types_match::value, "These types should NOT be the same.") #else #define COMPILE_TIME_ASSERT(expression) \ DLIB_NO_WARN_UNUSED typedef char DLIB_BOOST_JOIN(DLIB_CTA, __LINE__)[::dlib::compile_time_assert<(bool)(expression)>::value] #define ASSERT_ARE_SAME_TYPE(type1, type2) \ DLIB_NO_WARN_UNUSED typedef char DLIB_BOOST_JOIN(DLIB_AAST, __LINE__)[::dlib::assert_are_same_type::value] #define ASSERT_ARE_NOT_SAME_TYPE(type1, type2) \ DLIB_NO_WARN_UNUSED typedef char DLIB_BOOST_JOIN(DLIB_AANST, __LINE__)[::dlib::assert_are_not_same_type::value] #endif // ----------------------------- #if defined DLIB_DISABLE_ASSERTS // if DLIB_DISABLE_ASSERTS is on then never enable DLIB_ASSERT no matter what. #undef ENABLE_ASSERTS #endif #if !defined(DLIB_DISABLE_ASSERTS) && ( defined DEBUG || defined _DEBUG) // make sure ENABLE_ASSERTS is defined if we are indeed using them. #ifndef ENABLE_ASSERTS #define ENABLE_ASSERTS #endif #endif // ----------------------------- #ifdef __GNUC__ // There is a bug in version 4.4.5 of GCC on Ubuntu which causes GCC to segfault // when __PRETTY_FUNCTION__ is used within certain templated functions. So just // don't use it with this version of GCC. # if !(__GNUC__ == 4 && __GNUC_MINOR__ == 4 && __GNUC_PATCHLEVEL__ == 5) # define DLIB_FUNCTION_NAME __PRETTY_FUNCTION__ # else # define DLIB_FUNCTION_NAME "unknown function" # endif #elif defined(_MSC_VER) #define DLIB_FUNCTION_NAME __FUNCSIG__ #else #define DLIB_FUNCTION_NAME "unknown function" #endif #define DLIBM_CASSERT(_exp,_message) \ {if ( !(_exp) ) \ { \ dlib_assert_breakpoint(); \ std::ostringstream dlib_o_out; \ dlib_o_out << "\n\nError detected at line " << __LINE__ << ".\n"; \ dlib_o_out << "Error detected in file " << __FILE__ << ".\n"; \ dlib_o_out << "Error detected in function " << DLIB_FUNCTION_NAME << ".\n\n"; \ dlib_o_out << "Failing expression was " << #_exp << ".\n"; \ dlib_o_out << std::boolalpha << _message << "\n"; \ throw dlib::fatal_error(dlib::EBROKEN_ASSERT,dlib_o_out.str()); \ }} // This macro is not needed if you have a real C++ compiler. It's here to work around bugs in Visual Studio's preprocessor. #define DLIB_WORKAROUND_VISUAL_STUDIO_BUGS(x) x // Make it so the 2nd argument of DLIB_CASSERT is optional. That is, you can call it like // DLIB_CASSERT(exp) or DLIB_CASSERT(exp,message). #define DLIBM_CASSERT_1_ARGS(exp) DLIBM_CASSERT(exp,"") #define DLIBM_CASSERT_2_ARGS(exp,message) DLIBM_CASSERT(exp,message) #define DLIBM_GET_3TH_ARG(arg1, arg2, arg3, ...) arg3 #define DLIBM_CASSERT_CHOOSER(...) DLIB_WORKAROUND_VISUAL_STUDIO_BUGS(DLIBM_GET_3TH_ARG(__VA_ARGS__, DLIBM_CASSERT_2_ARGS, DLIBM_CASSERT_1_ARGS, DLIB_CASSERT_NEVER_USED)) #define DLIB_CASSERT(...) DLIB_WORKAROUND_VISUAL_STUDIO_BUGS(DLIBM_CASSERT_CHOOSER(__VA_ARGS__)(__VA_ARGS__)) #ifdef ENABLE_ASSERTS #define DLIB_ASSERT(...) DLIB_CASSERT(__VA_ARGS__) #define DLIB_IF_ASSERT(exp) exp #else #define DLIB_ASSERT(...) {} #define DLIB_IF_ASSERT(exp) #endif // ---------------------------------------------------------------------------------------- /*!A DLIB_ASSERT_HAS_STANDARD_LAYOUT This macro is meant to cause a compiler error if a type doesn't have a simple memory layout (like a C struct). In particular, types with simple layouts are ones which can be copied via memcpy(). This was called a POD type in C++03 and in C++0x we are looking to check if it is a "standard layout type". Once we can use C++0x we can change this macro to something that uses the std::is_standard_layout type_traits class. See: http://www2.research.att.com/~bs/C++0xFAQ.html#PODs !*/ // Use the fact that in C++03 you can't put non-PODs into a union. #define DLIB_ASSERT_HAS_STANDARD_LAYOUT(type) \ union DLIB_BOOST_JOIN(DAHSL_,__LINE__) { type TYPE_NOT_STANDARD_LAYOUT; }; \ DLIB_NO_WARN_UNUSED typedef char DLIB_BOOST_JOIN(DAHSL2_,__LINE__)[sizeof(DLIB_BOOST_JOIN(DAHSL_,__LINE__))]; // ---------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------- // breakpoints extern "C" { inline void dlib_assert_breakpoint( ) {} /*! ensures - this function does nothing It exists just so you can put breakpoints on it in a debugging tool. It is called only when an DLIB_ASSERT or DLIB_CASSERT fails and is about to throw an exception. !*/ } // ----------------------------- #include "stack_trace.h" #endif // DLIB_ASSERt_ ================================================ FILE: benchmarks/dlib/binary_search_tree/binary_search_tree_kernel_1.h ================================================ // Copyright (C) 2003 Davis E. King (davis@dlib.net) // License: Boost Software License See LICENSE.txt for the full license. #ifndef DLIB_BINARY_SEARCH_TREE_KERNEl_1_ #define DLIB_BINARY_SEARCH_TREE_KERNEl_1_ #include "binary_search_tree_kernel_abstract.h" #include "../algs.h" #include "../interfaces/map_pair.h" #include "../interfaces/enumerable.h" #include "../interfaces/remover.h" #include "../serialize.h" #include #include namespace dlib { template < typename domain, typename range, typename mem_manager, typename compare = std::less > class binary_search_tree_kernel_1 : public enumerable >, public asc_pair_remover { /*! INITIAL VALUE tree_size == 0 tree_root == 0 tree_height == 0 at_start_ == true current_element == 0 stack == array of 50 node pointers stack_pos == 0 CONVENTION tree_size == size() tree_height == height() stack[stack_pos-1] == pop() current_element_valid() == (current_element != 0) if (current_element_valid()) then element() == current_element->d and current_element->r at_start_ == at_start() if (current_element != 0 && current_element != tree_root) then stack[stack_pos-1] == the parent of the node pointed to by current_element if (tree_size != 0) tree_root == pointer to the root node of the binary search tree else tree_root == 0 for all nodes: { left points to the left subtree or 0 if there is no left subtree and right points to the right subtree or 0 if there is no right subtree and all elements in a left subtree are <= the root and all elements in a right subtree are >= the root and d is the item in the domain of *this contained in the node r is the item in the range of *this contained in the node balance: balance == 0 if both subtrees have the same height balance == -1 if the left subtree has a height that is greater than the height of the right subtree by 1 balance == 1 if the right subtree has a height that is greater than the height of the left subtree by 1 for all trees: the height of the left and right subtrees differ by at most one } !*/ class node { public: node* left; node* right; domain d; range r; signed char balance; }; class mpair : public map_pair { public: const domain* d; range* r; const domain& key( ) const { return *d; } const range& value( ) const { return *r; } range& value( ) { return *r; } }; public: typedef domain domain_type; typedef range range_type; typedef compare compare_type; typedef mem_manager mem_manager_type; binary_search_tree_kernel_1( ) : tree_size(0), tree_root(0), current_element(0), tree_height(0), at_start_(true), stack_pos(0), stack(ppool.allocate_array(50)) { } virtual ~binary_search_tree_kernel_1( ); inline void clear( ); inline short height ( ) const; inline unsigned long count ( const domain& item ) const; inline void add ( domain& d, range& r ); void remove ( const domain& d, domain& d_copy, range& r ); void destroy ( const domain& item ); inline const range* operator[] ( const domain& item ) const; inline range* operator[] ( const domain& item ); inline void swap ( binary_search_tree_kernel_1& item ); // function from the asc_pair_remover interface void remove_any ( domain& d, range& r ); // functions from the enumerable interface inline size_t size ( ) const; bool at_start ( ) const; inline void reset ( ) const; bool current_element_valid ( ) const; const map_pair& element ( ) const; map_pair& element ( ); bool move_next ( ) const; void remove_last_in_order ( domain& d, range& r ); void remove_current_element ( domain& d, range& r ); void position_enumerator ( const domain& d ) const; private: inline void rotate_left ( node*& t ); /*! requires - t->balance == 2 - t->right->balance == 0 or 1 - t == reference to the pointer in t's parent node that points to t ensures - #t is still a binary search tree - #t->balance is between 1 and -1 - #t now has a height smaller by 1 if #t->balance == 0 !*/ inline void rotate_right ( node*& t ); /*! requires - t->balance == -2 - t->left->balance == 0 or -1 - t == reference to the pointer in t's parent node that points to t ensures - #t is still a binary search tree - #t->balance is between 1 and -1 - #t now has a height smaller by 1 if #t->balance == 0 !*/ inline void double_rotate_right ( node*& t ); /*! requires - t->balance == -2 - t->left->balance == 1 - t == reference to the pointer in t's parent node that points to t ensures - #t is still a binary search tree - #t now has a balance of 0 - #t now has a height smaller by 1 !*/ inline void double_rotate_left ( node*& t ); /*! requires - t->balance == 2 - t->right->balance == -1 - t == reference to the pointer in t's parent node that points to t ensures - #t is still a binary search tree - #t now has a balance of 0 - #t now has a height smaller by 1 !*/ bool remove_biggest_element_in_tree ( node*& t, domain& d, range& r ); /*! requires - t != 0 (i.e. there must be something in the tree to remove) - t == reference to the pointer in t's parent node that points to t ensures - the biggest node in t has been removed - the biggest node domain element in t has been put into #d - the biggest node range element in t has been put into #r - #t is still a binary search tree - returns false if the height of the tree has not changed - returns true if the height of the tree has shrunk by one !*/ bool remove_least_element_in_tree ( node*& t, domain& d, range& r ); /*! requires - t != 0 (i.e. there must be something in the tree to remove) - t == reference to the pointer in t's parent node that points to t ensures - the least node in t has been removed - the least node domain element in t has been put into #d - the least node range element in t has been put into #r - #t is still a binary search tree - returns false if the height of the tree has not changed - returns true if the height of the tree has shrunk by one !*/ bool add_to_tree ( node*& t, domain& d, range& r ); /*! requires - t == reference to the pointer in t's parent node that points to t ensures - the mapping (d --> r) has been added to #t - #d and #r have initial values for their types - #t is still a binary search tree - returns false if the height of the tree has not changed - returns true if the height of the tree has grown by one !*/ bool remove_from_tree ( node*& t, const domain& d, domain& d_copy, range& r ); /*! requires - return_reference(t,d) != 0 - t == reference to the pointer in t's parent node that points to t ensures - #d_copy is equivalent to d - an element in t equivalent to d has been removed and swapped into #d_copy and its associated range object has been swapped into #r - #t is still a binary search tree - returns false if the height of the tree has not changed - returns true if the height of the tree has shrunk by one !*/ bool remove_from_tree ( node*& t, const domain& item ); /*! requires - return_reference(t,item) != 0 - t == reference to the pointer in t's parent node that points to t ensures - an element in t equivalent to item has been removed - #t is still a binary search tree - returns false if the height of the tree has not changed - returns true if the height of the tree has shrunk by one !*/ const range* return_reference ( const node* t, const domain& d ) const; /*! ensures - if (there is a domain element equivalent to d in t) then - returns a pointer to the element in the range equivalent to d - else - returns 0 !*/ range* return_reference ( node* t, const domain& d ); /*! ensures - if (there is a domain element equivalent to d in t) then - returns a pointer to the element in the range equivalent to d - else - returns 0 !*/ inline bool keep_node_balanced ( node*& t ); /*! requires - t != 0 - t == reference to the pointer in t's parent node that points to t ensures - if (t->balance is < 1 or > 1) then - keep_node_balanced() will ensure that #t->balance == 0, -1, or 1 - #t is still a binary search tree - returns true if it made the tree one height shorter - returns false if it didn't change the height !*/ unsigned long get_count ( const domain& item, node* tree_root ) const; /*! requires - tree_root == the root of a binary search tree or 0 ensures - if (tree_root == 0) then - returns 0 - else - returns the number of elements in tree_root that are equivalent to item !*/ void delete_tree ( node* t ); /*! requires - t != 0 ensures - deallocates the node pointed to by t and all of t's left and right children !*/ void push ( node* n ) const { stack[stack_pos] = n; ++stack_pos; } /*! ensures - pushes n onto the stack !*/ node* pop ( ) const { --stack_pos; return stack[stack_pos]; } /*! ensures - pops the top of the stack and returns it !*/ bool fix_stack ( node* t, unsigned char depth = 0 ); /*! requires - current_element != 0 - depth == 0 - t == tree_root ensures - makes the stack contain the correct set of parent pointers. also adjusts stack_pos so it is correct. - #t is still a binary search tree !*/ bool remove_current_element_from_tree ( node*& t, domain& d, range& r, unsigned long cur_stack_pos = 1 ); /*! requires - t == tree_root - cur_stack_pos == 1 - current_element != 0 ensures - removes the data in the node given by current_element and swaps it into #d and #r. - #t is still a binary search tree - the enumerator is advances on to the next element but its stack is potentially corrupted. so you must call fix_stack(tree_root) to fix it. - returns false if the height of the tree has not changed - returns true if the height of the tree has shrunk by one !*/ // data members mutable mpair p; unsigned long tree_size; node* tree_root; mutable node* current_element; typename mem_manager::template rebind::other pool; typename mem_manager::template rebind::other ppool; short tree_height; mutable bool at_start_; mutable unsigned char stack_pos; mutable node** stack; compare comp; // restricted functions binary_search_tree_kernel_1(binary_search_tree_kernel_1&); binary_search_tree_kernel_1& operator=(binary_search_tree_kernel_1&); }; template < typename domain, typename range, typename mem_manager, typename compare > inline void swap ( binary_search_tree_kernel_1& a, binary_search_tree_kernel_1& b ) { a.swap(b); } template < typename domain, typename range, typename mem_manager, typename compare > void deserialize ( binary_search_tree_kernel_1& item, std::istream& in ) { try { item.clear(); unsigned long size; deserialize(size,in); domain d; range r; for (unsigned long i = 0; i < size; ++i) { deserialize(d,in); deserialize(r,in); item.add(d,r); } } catch (serialization_error& e) { item.clear(); throw serialization_error(e.info + "\n while deserializing object of type binary_search_tree_kernel_1"); } } // ---------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------- // member function definitions // ---------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------- template < typename domain, typename range, typename mem_manager, typename compare > binary_search_tree_kernel_1:: ~binary_search_tree_kernel_1 ( ) { ppool.deallocate_array(stack); if (tree_size != 0) { delete_tree(tree_root); } } // ---------------------------------------------------------------------------------------- template < typename domain, typename range, typename mem_manager, typename compare > void binary_search_tree_kernel_1:: clear ( ) { if (tree_size > 0) { delete_tree(tree_root); tree_root = 0; tree_size = 0; tree_height = 0; } // reset the enumerator reset(); } // ---------------------------------------------------------------------------------------- template < typename domain, typename range, typename mem_manager, typename compare > size_t binary_search_tree_kernel_1:: size ( ) const { return tree_size; } // ---------------------------------------------------------------------------------------- template < typename domain, typename range, typename mem_manager, typename compare > short binary_search_tree_kernel_1:: height ( ) const { return tree_height; } // ---------------------------------------------------------------------------------------- template < typename domain, typename range, typename mem_manager, typename compare > unsigned long binary_search_tree_kernel_1:: count ( const domain& item ) const { return get_count(item,tree_root); } // ---------------------------------------------------------------------------------------- template < typename domain, typename range, typename mem_manager, typename compare > void binary_search_tree_kernel_1:: add ( domain& d, range& r ) { tree_height += add_to_tree(tree_root,d,r); ++tree_size; // reset the enumerator reset(); } // ---------------------------------------------------------------------------------------- template < typename domain, typename range, typename mem_manager, typename compare > void binary_search_tree_kernel_1:: remove ( const domain& d, domain& d_copy, range& r ) { tree_height -= remove_from_tree(tree_root,d,d_copy,r); --tree_size; // reset the enumerator reset(); } // ---------------------------------------------------------------------------------------- template < typename domain, typename range, typename mem_manager, typename compare > void binary_search_tree_kernel_1:: destroy ( const domain& item ) { tree_height -= remove_from_tree(tree_root,item); --tree_size; // reset the enumerator reset(); } // ---------------------------------------------------------------------------------------- template < typename domain, typename range, typename mem_manager, typename compare > void binary_search_tree_kernel_1:: remove_any ( domain& d, range& r ) { tree_height -= remove_least_element_in_tree(tree_root,d,r); --tree_size; // reset the enumerator reset(); } // ---------------------------------------------------------------------------------------- template < typename domain, typename range, typename mem_manager, typename compare > range* binary_search_tree_kernel_1:: operator[] ( const domain& item ) { return return_reference(tree_root,item); } // ---------------------------------------------------------------------------------------- template < typename domain, typename range, typename mem_manager, typename compare > const range* binary_search_tree_kernel_1:: operator[] ( const domain& item ) const { return return_reference(tree_root,item); } // ---------------------------------------------------------------------------------------- template < typename domain, typename range, typename mem_manager, typename compare > void binary_search_tree_kernel_1:: swap ( binary_search_tree_kernel_1& item ) { pool.swap(item.pool); ppool.swap(item.ppool); exchange(p,item.p); exchange(stack,item.stack); exchange(stack_pos,item.stack_pos); exchange(comp,item.comp); node* tree_root_temp = item.tree_root; unsigned long tree_size_temp = item.tree_size; short tree_height_temp = item.tree_height; node* current_element_temp = item.current_element; bool at_start_temp = item.at_start_; item.tree_root = tree_root; item.tree_size = tree_size; item.tree_height = tree_height; item.current_element = current_element; item.at_start_ = at_start_; tree_root = tree_root_temp; tree_size = tree_size_temp; tree_height = tree_height_temp; current_element = current_element_temp; at_start_ = at_start_temp; } // ---------------------------------------------------------------------------------------- template < typename domain, typename range, typename mem_manager, typename compare > void binary_search_tree_kernel_1:: remove_last_in_order ( domain& d, range& r ) { tree_height -= remove_biggest_element_in_tree(tree_root,d,r); --tree_size; // reset the enumerator reset(); } // ---------------------------------------------------------------------------------------- template < typename domain, typename range, typename mem_manager, typename compare > void binary_search_tree_kernel_1:: remove_current_element ( domain& d, range& r ) { tree_height -= remove_current_element_from_tree(tree_root,d,r); --tree_size; // fix the enumerator stack if we need to if (current_element) fix_stack(tree_root); } // ---------------------------------------------------------------------------------------- template < typename domain, typename range, typename mem_manager, typename compare > void binary_search_tree_kernel_1:: position_enumerator ( const domain& d ) const { // clear the enumerator state and make sure the stack is empty reset(); at_start_ = false; node* t = tree_root; bool went_left = false; while (t != 0) { if ( comp(d , t->d) ) { push(t); // if item is on the left then look in left t = t->left; went_left = true; } else if (comp(t->d , d)) { push(t); // if item is on the right then look in right t = t->right; went_left = false; } else { current_element = t; return; } } // if we didn't find any matches but there might be something after the // d in this tree. if (stack_pos > 0) { current_element = pop(); // if we went left from this node then this node is the next // biggest. if (went_left) { return; } else { move_next(); } } } // ---------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------- // enumerable function definitions // ---------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------- template < typename domain, typename range, typename mem_manager, typename compare > bool binary_search_tree_kernel_1:: at_start ( ) const { return at_start_; } // ---------------------------------------------------------------------------------------- template < typename domain, typename range, typename mem_manager, typename compare > void binary_search_tree_kernel_1:: reset ( ) const { at_start_ = true; current_element = 0; stack_pos = 0; } // ---------------------------------------------------------------------------------------- template < typename domain, typename range, typename mem_manager, typename compare > bool binary_search_tree_kernel_1:: current_element_valid ( ) const { return (current_element != 0); } // ---------------------------------------------------------------------------------------- template < typename domain, typename range, typename mem_manager, typename compare > const map_pair& binary_search_tree_kernel_1:: element ( ) const { p.d = &(current_element->d); p.r = &(current_element->r); return p; } // ---------------------------------------------------------------------------------------- template < typename domain, typename range, typename mem_manager, typename compare > map_pair& binary_search_tree_kernel_1:: element ( ) { p.d = &(current_element->d); p.r = &(current_element->r); return p; } // ---------------------------------------------------------------------------------------- template < typename domain, typename range, typename mem_manager, typename compare > bool binary_search_tree_kernel_1:: move_next ( ) const { // if we haven't started iterating yet if (at_start_) { at_start_ = false; if (tree_size == 0) { return false; } else { // find the first element in the tree current_element = tree_root; node* temp = current_element->left; while (temp != 0) { push(current_element); current_element = temp; temp = current_element->left; } return true; } } else { if (current_element == 0) { return false; } else { node* temp; bool went_up; // true if we went up the tree from a child node to parent bool from_left = false; // true if we went up and were coming from a left child node // find the next element in the tree if (current_element->right != 0) { // go right and down temp = current_element; push(current_element); current_element = temp->right; went_up = false; } else { // go up to the parent if we can if (current_element == tree_root) { // in this case we have iterated over all the element of the tree current_element = 0; return false; } went_up = true; node* parent = pop(); from_left = (parent->left == current_element); // go up to parent current_element = parent; } while (true) { if (went_up) { if (from_left) { // in this case we have found the next node break; } else { if (current_element == tree_root) { // in this case we have iterated over all the elements // in the tree current_element = 0; return false; } // we should go up node* parent = pop(); from_left = (parent->left == current_element); current_element = parent; } } else { // we just went down to a child node if (current_element->left != 0) { // go left went_up = false; temp = current_element; push(current_element); current_element = temp->left; } else { // if there is no left child then we have found the next node break; } } } return true; } } } // ---------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------- // private member function definitions // ---------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------- template < typename domain, typename range, typename mem_manager, typename compare > void binary_search_tree_kernel_1:: delete_tree ( node* t ) { if (t->left != 0) delete_tree(t->left); if (t->right != 0) delete_tree(t->right); pool.deallocate(t); } // ---------------------------------------------------------------------------------------- template < typename domain, typename range, typename mem_manager, typename compare > void binary_search_tree_kernel_1:: rotate_left ( node*& t ) { // set the new balance numbers if (t->right->balance == 1) { t->balance = 0; t->right->balance = 0; } else { t->balance = 1; t->right->balance = -1; } // perform the rotation node* temp = t->right; t->right = temp->left; temp->left = t; t = temp; } // ---------------------------------------------------------------------------------------- template < typename domain, typename range, typename mem_manager, typename compare > void binary_search_tree_kernel_1:: rotate_right ( node*& t ) { // set the new balance numbers if (t->left->balance == -1) { t->balance = 0; t->left->balance = 0; } else { t->balance = -1; t->left->balance = 1; } // preform the rotation node* temp = t->left; t->left = temp->right; temp->right = t; t = temp; } // ---------------------------------------------------------------------------------------- template < typename domain, typename range, typename mem_manager, typename compare > void binary_search_tree_kernel_1:: double_rotate_right ( node*& t ) { node* temp = t; t = t->left->right; temp->left->right = t->left; t->left = temp->left; temp->left = t->right; t->right = temp; if (t->balance < 0) { t->left->balance = 0; t->right->balance = 1; } else if (t->balance > 0) { t->left->balance = -1; t->right->balance = 0; } else { t->left->balance = 0; t->right->balance = 0; } t->balance = 0; } // ---------------------------------------------------------------------------------------- template < typename domain, typename range, typename mem_manager, typename compare > void binary_search_tree_kernel_1:: double_rotate_left ( node*& t ) { node* temp = t; t = t->right->left; temp->right->left = t->right; t->right = temp->right; temp->right = t->left; t->left = temp; if (t->balance < 0) { t->left->balance = 0; t->right->balance = 1; } else if (t->balance > 0) { t->left->balance = -1; t->right->balance = 0; } else { t->left->balance = 0; t->right->balance = 0; } t->balance = 0; } // ---------------------------------------------------------------------------------------- template < typename domain, typename range, typename mem_manager, typename compare > bool binary_search_tree_kernel_1:: remove_biggest_element_in_tree ( node*& t, domain& d, range& r ) { // make a reference to the current node so we don't have to dereference a // pointer a bunch of times node& tree = *t; // if the right tree is an empty tree if ( tree.right == 0) { // swap nodes domain and range elements into d and r exchange(d,tree.d); exchange(r,tree.r); // plug hole left by removing this node t = tree.left; // delete the node that was just removed pool.deallocate(&tree); // return that the height of this part of the tree has decreased return true; } else { // keep going right // if remove made the tree one height shorter if ( remove_biggest_element_in_tree(tree.right,d,r) ) { // if this caused the current tree to strink then report that if ( tree.balance == 1) { --tree.balance; return true; } else { --tree.balance; return keep_node_balanced(t); } } return false; } } // ---------------------------------------------------------------------------------------- template < typename domain, typename range, typename mem_manager, typename compare > bool binary_search_tree_kernel_1:: remove_least_element_in_tree ( node*& t, domain& d, range& r ) { // make a reference to the current node so we don't have to dereference a // pointer a bunch of times node& tree = *t; // if the left tree is an empty tree if ( tree.left == 0) { // swap nodes domain and range elements into d and r exchange(d,tree.d); exchange(r,tree.r); // plug hole left by removing this node t = tree.right; // delete the node that was just removed pool.deallocate(&tree); // return that the height of this part of the tree has decreased return true; } else { // keep going left // if remove made the tree one height shorter if ( remove_least_element_in_tree(tree.left,d,r) ) { // if this caused the current tree to strink then report that if ( tree.balance == -1) { ++tree.balance; return true; } else { ++tree.balance; return keep_node_balanced(t); } } return false; } } // ---------------------------------------------------------------------------------------- template < typename domain, typename range, typename mem_manager, typename compare > bool binary_search_tree_kernel_1:: add_to_tree ( node*& t, domain& d, range& r ) { // if found place to add if (t == 0) { // create a node to add new item into t = pool.allocate(); // make a reference to the current node so we don't have to dereference a // pointer a bunch of times node& tree = *t; // set left and right pointers to NULL to indicate that there are no // left or right subtrees tree.left = 0; tree.right = 0; tree.balance = 0; // put d and r into t exchange(tree.d,d); exchange(tree.r,r); // indicate that the height of this tree has increased return true; } else // keep looking for a place to add the new item { // make a reference to the current node so we don't have to dereference // a pointer a bunch of times node& tree = *t; signed char old_balance = tree.balance; // add the new item to whatever subtree it should go into if (comp( d , tree.d) ) tree.balance -= add_to_tree(tree.left,d,r); else tree.balance += add_to_tree(tree.right,d,r); // if the tree was balanced to start with if (old_balance == 0) { // if its not balanced anymore then it grew in height if (tree.balance != 0) return true; else return false; } else { // if the tree is now balanced then it didn't grow if (tree.balance == 0) { return false; } else { // if the tree needs to be balanced if (tree.balance != old_balance) { return !keep_node_balanced(t); } // if there has been no change in the heights else { return false; } } } } } // ---------------------------------------------------------------------------------------- template < typename domain, typename range, typename mem_manager, typename compare > bool binary_search_tree_kernel_1:: fix_stack ( node* t, unsigned char depth ) { // if we found the node we were looking for if (t == current_element) { stack_pos = depth; return true; } else if (t == 0) { return false; } if (!( comp(t->d , current_element->d))) { // go left if (fix_stack(t->left,depth+1)) { stack[depth] = t; return true; } } if (!(comp(current_element->d , t->d))) { // go right if (fix_stack(t->right,depth+1)) { stack[depth] = t; return true; } } return false; } // ---------------------------------------------------------------------------------------- template < typename domain, typename range, typename mem_manager, typename compare > bool binary_search_tree_kernel_1:: remove_current_element_from_tree ( node*& t, domain& d, range& r, unsigned long cur_stack_pos ) { // make a reference to the current node so we don't have to dereference // a pointer a bunch of times node& tree = *t; // if we found the node we were looking for if (t == current_element) { // swap nodes domain and range elements into d_copy and r exchange(d,tree.d); exchange(r,tree.r); // if there is no left node if (tree.left == 0) { // move the enumerator on to the next element before we mess with the // tree move_next(); // plug hole left by removing this node and free memory t = tree.right; // plug hole with right subtree // delete old node pool.deallocate(&tree); // indicate that the height has changed return true; } // if there is no right node else if (tree.right == 0) { // move the enumerator on to the next element before we mess with the // tree move_next(); // plug hole left by removing this node and free memory t = tree.left; // plug hole with left subtree // delete old node pool.deallocate(&tree); // indicate that the height of this tree has changed return true; } // if there are both a left and right sub node else { // in this case the next current element is going to get swapped back // into this t node. current_element = t; // get an element that can replace the one being removed and do this // if it made the right subtree shrink by one if (remove_least_element_in_tree(tree.right,tree.d,tree.r)) { // adjust the tree height --tree.balance; // if the height of the current tree has dropped by one if (tree.balance == 0) { return true; } else { return keep_node_balanced(t); } } // else this remove did not effect the height of this tree else { return false; } } } else if ( (cur_stack_pos < stack_pos && stack[cur_stack_pos] == tree.left) || tree.left == current_element ) { // go left if (tree.balance == -1) { int balance = tree.balance; balance += remove_current_element_from_tree(tree.left,d,r,cur_stack_pos+1); tree.balance = balance; return !tree.balance; } else { int balance = tree.balance; balance += remove_current_element_from_tree(tree.left,d,r,cur_stack_pos+1); tree.balance = balance; return keep_node_balanced(t); } } else if ( (cur_stack_pos < stack_pos && stack[cur_stack_pos] == tree.right) || tree.right == current_element ) { // go right if (tree.balance == 1) { int balance = tree.balance; balance -= remove_current_element_from_tree(tree.right,d,r,cur_stack_pos+1); tree.balance = balance; return !tree.balance; } else { int balance = tree.balance; balance -= remove_current_element_from_tree(tree.right,d,r,cur_stack_pos+1); tree.balance = balance; return keep_node_balanced(t); } } // this return should never happen but do it anyway to suppress compiler warnings return false; } // ---------------------------------------------------------------------------------------- template < typename domain, typename range, typename mem_manager, typename compare > bool binary_search_tree_kernel_1:: remove_from_tree ( node*& t, const domain& d, domain& d_copy, range& r ) { // make a reference to the current node so we don't have to dereference // a pointer a bunch of times node& tree = *t; // if item is on the left if (comp(d , tree.d)) { // if the left side of the tree has the greatest height if (tree.balance == -1) { int balance = tree.balance; balance += remove_from_tree(tree.left,d,d_copy,r); tree.balance = balance; return !tree.balance; } else { int balance = tree.balance; balance += remove_from_tree(tree.left,d,d_copy,r); tree.balance = balance; return keep_node_balanced(t); } } // if item is on the right else if (comp(tree.d , d)) { // if the right side of the tree has the greatest height if (tree.balance == 1) { int balance = tree.balance; balance -= remove_from_tree(tree.right,d,d_copy,r); tree.balance = balance; return !tree.balance; } else { int balance = tree.balance; balance -= remove_from_tree(tree.right,d,d_copy,r); tree.balance = balance; return keep_node_balanced(t); } } // if item is found else { // swap nodes domain and range elements into d_copy and r exchange(d_copy,tree.d); exchange(r,tree.r); // if there is no left node if (tree.left == 0) { // plug hole left by removing this node and free memory t = tree.right; // plug hole with right subtree // delete old node pool.deallocate(&tree); // indicate that the height has changed return true; } // if there is no right node else if (tree.right == 0) { // plug hole left by removing this node and free memory t = tree.left; // plug hole with left subtree // delete old node pool.deallocate(&tree); // indicate that the height of this tree has changed return true; } // if there are both a left and right sub node else { // get an element that can replace the one being removed and do this // if it made the right subtree shrink by one if (remove_least_element_in_tree(tree.right,tree.d,tree.r)) { // adjust the tree height --tree.balance; // if the height of the current tree has dropped by one if (tree.balance == 0) { return true; } else { return keep_node_balanced(t); } } // else this remove did not effect the height of this tree else { return false; } } } } // ---------------------------------------------------------------------------------------- template < typename domain, typename range, typename mem_manager, typename compare > bool binary_search_tree_kernel_1:: remove_from_tree ( node*& t, const domain& d ) { // make a reference to the current node so we don't have to dereference // a pointer a bunch of times node& tree = *t; // if item is on the left if (comp(d , tree.d)) { // if the left side of the tree has the greatest height if (tree.balance == -1) { int balance = tree.balance; balance += remove_from_tree(tree.left,d); tree.balance = balance; return !tree.balance; } else { int balance = tree.balance; balance += remove_from_tree(tree.left,d); tree.balance = balance; return keep_node_balanced(t); } } // if item is on the right else if (comp(tree.d , d)) { // if the right side of the tree has the greatest height if (tree.balance == 1) { int balance = tree.balance; balance -= remove_from_tree(tree.right,d); tree.balance = balance; return !tree.balance; } else { int balance = tree.balance; balance -= remove_from_tree(tree.right,d); tree.balance = balance; return keep_node_balanced(t); } } // if item is found else { // if there is no left node if (tree.left == 0) { // plug hole left by removing this node and free memory t = tree.right; // plug hole with right subtree // delete old node pool.deallocate(&tree); // indicate that the height has changed return true; } // if there is no right node else if (tree.right == 0) { // plug hole left by removing this node and free memory t = tree.left; // plug hole with left subtree // delete old node pool.deallocate(&tree); // indicate that the height of this tree has changed return true; } // if there are both a left and right sub node else { // get an element that can replace the one being removed and do this // if it made the right subtree shrink by one if (remove_least_element_in_tree(tree.right,tree.d,tree.r)) { // adjust the tree height --tree.balance; // if the height of the current tree has dropped by one if (tree.balance == 0) { return true; } else { return keep_node_balanced(t); } } // else this remove did not effect the height of this tree else { return false; } } } } // ---------------------------------------------------------------------------------------- template < typename domain, typename range, typename mem_manager, typename compare > range* binary_search_tree_kernel_1:: return_reference ( node* t, const domain& d ) { while (t != 0) { if ( comp(d , t->d )) { // if item is on the left then look in left t = t->left; } else if (comp(t->d , d)) { // if item is on the right then look in right t = t->right; } else { // if it's found then return a reference to it return &(t->r); } } return 0; } // ---------------------------------------------------------------------------------------- template < typename domain, typename range, typename mem_manager, typename compare > const range* binary_search_tree_kernel_1:: return_reference ( const node* t, const domain& d ) const { while (t != 0) { if ( comp(d , t->d) ) { // if item is on the left then look in left t = t->left; } else if (comp(t->d , d)) { // if item is on the right then look in right t = t->right; } else { // if it's found then return a reference to it return &(t->r); } } return 0; } // ---------------------------------------------------------------------------------------- template < typename domain, typename range, typename mem_manager, typename compare > bool binary_search_tree_kernel_1:: keep_node_balanced ( node*& t ) { // make a reference to the current node so we don't have to dereference // a pointer a bunch of times node& tree = *t; // if tree does not need to be balanced then return false if (tree.balance == 0) return false; // if tree needs to be rotated left if (tree.balance == 2) { if (tree.right->balance >= 0) rotate_left(t); else double_rotate_left(t); } // else if the tree needs to be rotated right else if (tree.balance == -2) { if (tree.left->balance <= 0) rotate_right(t); else double_rotate_right(t); } if (t->balance == 0) return true; else return false; } // ---------------------------------------------------------------------------------------- template < typename domain, typename range, typename mem_manager, typename compare > unsigned long binary_search_tree_kernel_1:: get_count ( const domain& d, node* tree_root ) const { if (tree_root != 0) { if (comp(d , tree_root->d)) { // go left return get_count(d,tree_root->left); } else if (comp(tree_root->d , d)) { // go right return get_count(d,tree_root->right); } else { // go left and right to look for more matches return get_count(d,tree_root->left) + get_count(d,tree_root->right) + 1; } } return 0; } // ---------------------------------------------------------------------------------------- } #endif // DLIB_BINARY_SEARCH_TREE_KERNEl_1_ ================================================ FILE: benchmarks/dlib/binary_search_tree/binary_search_tree_kernel_2.h ================================================ // Copyright (C) 2003 Davis E. King (davis@dlib.net) // License: Boost Software License See LICENSE.txt for the full license. #ifndef DLIB_BINARY_SEARCH_TREE_KERNEl_2_ #define DLIB_BINARY_SEARCH_TREE_KERNEl_2_ #include "binary_search_tree_kernel_abstract.h" #include "../algs.h" #include "../interfaces/map_pair.h" #include "../interfaces/enumerable.h" #include "../interfaces/remover.h" #include "../serialize.h" #include namespace dlib { template < typename domain, typename range, typename mem_manager, typename compare = std::less > class binary_search_tree_kernel_2 : public enumerable >, public asc_pair_remover { /*! INITIAL VALUE NIL == pointer to a node that represents a leaf tree_size == 0 tree_root == NIL at_start == true current_element == 0 CONVENTION current_element_valid() == (current_element != 0) if (current_element_valid()) then element() == current_element->d and current_element->r at_start_ == at_start() tree_size == size() NIL == pointer to a node that represents a leaf if (tree_size != 0) tree_root == pointer to the root node of the binary search tree else tree_root == NIL tree_root->color == black Every leaf is black and all leafs are the NIL node. The number of black nodes in any path from the root to a leaf is the same. for all nodes: { - left points to the left subtree or NIL if there is no left subtree - right points to the right subtree or NIL if there is no right subtree - parent points to the parent node or NIL if the node is the root - ordering of nodes is determined by comparing each node's d member - all elements in a left subtree are <= the node - all elements in a right subtree are >= the node - color == red or black - if (color == red) - the node's children are black } !*/ class node { public: node* left; node* right; node* parent; domain d; range r; char color; }; class mpair : public map_pair { public: const domain* d; range* r; const domain& key( ) const { return *d; } const range& value( ) const { return *r; } range& value( ) { return *r; } }; const static char red = 0; const static char black = 1; public: typedef domain domain_type; typedef range range_type; typedef compare compare_type; typedef mem_manager mem_manager_type; binary_search_tree_kernel_2( ) : NIL(pool.allocate()), tree_size(0), tree_root(NIL), current_element(0), at_start_(true) { NIL->color = black; NIL->left = 0; NIL->right = 0; NIL->parent = 0; } virtual ~binary_search_tree_kernel_2( ); inline void clear( ); inline short height ( ) const; inline unsigned long count ( const domain& d ) const; inline void add ( domain& d, range& r ); void remove ( const domain& d, domain& d_copy, range& r ); void destroy ( const domain& d ); void remove_any ( domain& d, range& r ); inline const range* operator[] ( const domain& item ) const; inline range* operator[] ( const domain& item ); inline void swap ( binary_search_tree_kernel_2& item ); // functions from the enumerable interface inline size_t size ( ) const; bool at_start ( ) const; inline void reset ( ) const; bool current_element_valid ( ) const; const map_pair& element ( ) const; map_pair& element ( ); bool move_next ( ) const; void remove_last_in_order ( domain& d, range& r ); void remove_current_element ( domain& d, range& r ); void position_enumerator ( const domain& d ) const; private: inline void rotate_left ( node* t ); /*! requires - t != NIL - t->right != NIL ensures - performs a left rotation around t and its right child !*/ inline void rotate_right ( node* t ); /*! requires - t != NIL - t->left != NIL ensures - performs a right rotation around t and its left child !*/ inline void double_rotate_right ( node* t ); /*! requires - t != NIL - t->left != NIL - t->left->right != NIL - double_rotate_right() is only called in fix_after_add() ensures - performs a left rotation around t->left - then performs a right rotation around t !*/ inline void double_rotate_left ( node* t ); /*! requires - t != NIL - t->right != NIL - t->right->left != NIL - double_rotate_left() is only called in fix_after_add() ensures - performs a right rotation around t->right - then performs a left rotation around t !*/ void remove_biggest_element_in_tree ( node* t, domain& d, range& r ); /*! requires - t != NIL (i.e. there must be something in the tree to remove) ensures - the biggest node in t has been removed - the biggest node element in t has been put into #d and #r - #t is still a binary search tree !*/ bool remove_least_element_in_tree ( node* t, domain& d, range& r ); /*! requires - t != NIL (i.e. there must be something in the tree to remove) ensures - the least node in t has been removed - the least node element in t has been put into #d and #r - #t is still a binary search tree - if (the node that was removed was the one pointed to by current_element) then - returns true - else - returns false !*/ void add_to_tree ( node* t, domain& d, range& r ); /*! requires - t != NIL ensures - d and r are now in #t - there is a mapping from d to r in #t - #d and #r have initial values for their types - #t is still a binary search tree !*/ void remove_from_tree ( node* t, const domain& d, domain& d_copy, range& r ); /*! requires - return_reference(t,d) != 0 ensures - #d_copy is equivalent to d - the first element in t equivalent to d that is encountered when searching down the tree from t has been removed and swapped into #d_copy. Also, the associated range element has been removed and swapped into #r. - if (the node that got removed wasn't current_element) then - adjusts the current_element pointer if the data in the node that it points to gets moved. - else - the value of current_element is now invalid - #t is still a binary search tree !*/ void remove_from_tree ( node* t, const domain& d ); /*! requires - return_reference(t,d) != 0 ensures - an element in t equivalent to d has been removed - #t is still a binary search tree !*/ const range* return_reference ( const node* t, const domain& d ) const; /*! ensures - if (there is a domain element equivalent to d in t) then - returns a pointer to the element in the range equivalent to d - else - returns 0 !*/ range* return_reference ( node* t, const domain& d ); /*! ensures - if (there is a domain element equivalent to d in t) then - returns a pointer to the element in the range equivalent to d - else - returns 0 !*/ void fix_after_add ( node* t ); /*! requires - t == pointer to the node just added - t->color == red - t->parent != NIL (t must not be the root) - fix_after_add() is only called after a new node has been added to t ensures - fixes any deviations from the CONVENTION caused by adding a node !*/ void fix_after_remove ( node* t ); /*! requires - t == pointer to the only child of the node that was spliced out - fix_after_remove() is only called after a node has been removed from t - the color of the spliced out node was black ensures - fixes any deviations from the CONVENTION causes by removing a node !*/ short tree_height ( node* t ) const; /*! ensures - returns the number of nodes in the longest path from the root of the tree to a leaf !*/ void delete_tree ( node* t ); /*! requires - t == root of binary search tree - t != NIL ensures - deletes all nodes in t except for NIL !*/ unsigned long get_count ( const domain& item, node* tree_root ) const; /*! requires - tree_root == the root of a binary search tree or NIL ensures - if (tree_root == NIL) then - returns 0 - else - returns the number of elements in tree_root that are equivalent to item !*/ // data members typename mem_manager::template rebind::other pool; node* NIL; unsigned long tree_size; node* tree_root; mutable node* current_element; mutable bool at_start_; mutable mpair p; compare comp; // restricted functions binary_search_tree_kernel_2(binary_search_tree_kernel_2&); binary_search_tree_kernel_2& operator=(binary_search_tree_kernel_2&); }; template < typename domain, typename range, typename mem_manager, typename compare > inline void swap ( binary_search_tree_kernel_2& a, binary_search_tree_kernel_2& b ) { a.swap(b); } template < typename domain, typename range, typename mem_manager, typename compare > void deserialize ( binary_search_tree_kernel_2& item, std::istream& in ) { try { item.clear(); unsigned long size; deserialize(size,in); domain d; range r; for (unsigned long i = 0; i < size; ++i) { deserialize(d,in); deserialize(r,in); item.add(d,r); } } catch (serialization_error& e) { item.clear(); throw serialization_error(e.info + "\n while deserializing object of type binary_search_tree_kernel_2"); } } // ---------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------- // member function definitions // ---------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------- template < typename domain, typename range, typename mem_manager, typename compare > binary_search_tree_kernel_2:: ~binary_search_tree_kernel_2 ( ) { if (tree_root != NIL) delete_tree(tree_root); pool.deallocate(NIL); } // ---------------------------------------------------------------------------------------- template < typename domain, typename range, typename mem_manager, typename compare > void binary_search_tree_kernel_2:: clear ( ) { if (tree_size > 0) { delete_tree(tree_root); tree_root = NIL; tree_size = 0; } // reset the enumerator reset(); } // ---------------------------------------------------------------------------------------- template < typename domain, typename range, typename mem_manager, typename compare > size_t binary_search_tree_kernel_2:: size ( ) const { return tree_size; } // ---------------------------------------------------------------------------------------- template < typename domain, typename range, typename mem_manager, typename compare > short binary_search_tree_kernel_2:: height ( ) const { return tree_height(tree_root); } // ---------------------------------------------------------------------------------------- template < typename domain, typename range, typename mem_manager, typename compare > unsigned long binary_search_tree_kernel_2:: count ( const domain& item ) const { return get_count(item,tree_root); } // ---------------------------------------------------------------------------------------- template < typename domain, typename range, typename mem_manager, typename compare > void binary_search_tree_kernel_2:: add ( domain& d, range& r ) { if (tree_size == 0) { tree_root = pool.allocate(); tree_root->color = black; tree_root->left = NIL; tree_root->right = NIL; tree_root->parent = NIL; exchange(tree_root->d,d); exchange(tree_root->r,r); } else { add_to_tree(tree_root,d,r); } ++tree_size; // reset the enumerator reset(); } // ---------------------------------------------------------------------------------------- template < typename domain, typename range, typename mem_manager, typename compare > void binary_search_tree_kernel_2:: remove ( const domain& d, domain& d_copy, range& r ) { remove_from_tree(tree_root,d,d_copy,r); --tree_size; // reset the enumerator reset(); } // ---------------------------------------------------------------------------------------- template < typename domain, typename range, typename mem_manager, typename compare > void binary_search_tree_kernel_2:: destroy ( const domain& item ) { remove_from_tree(tree_root,item); --tree_size; // reset the enumerator reset(); } // ---------------------------------------------------------------------------------------- template < typename domain, typename range, typename mem_manager, typename compare > void binary_search_tree_kernel_2:: remove_any ( domain& d, range& r ) { remove_least_element_in_tree(tree_root,d,r); --tree_size; // reset the enumerator reset(); } // ---------------------------------------------------------------------------------------- template < typename domain, typename range, typename mem_manager, typename compare > range* binary_search_tree_kernel_2:: operator[] ( const domain& d ) { return return_reference(tree_root,d); } // ---------------------------------------------------------------------------------------- template < typename domain, typename range, typename mem_manager, typename compare > const range* binary_search_tree_kernel_2:: operator[] ( const domain& d ) const { return return_reference(tree_root,d); } // ---------------------------------------------------------------------------------------- template < typename domain, typename range, typename mem_manager, typename compare > void binary_search_tree_kernel_2:: swap ( binary_search_tree_kernel_2& item ) { pool.swap(item.pool); exchange(p,item.p); exchange(comp,item.comp); node* tree_root_temp = item.tree_root; unsigned long tree_size_temp = item.tree_size; node* const NIL_temp = item.NIL; node* current_element_temp = item.current_element; bool at_start_temp = item.at_start_; item.tree_root = tree_root; item.tree_size = tree_size; item.NIL = NIL; item.current_element = current_element; item.at_start_ = at_start_; tree_root = tree_root_temp; tree_size = tree_size_temp; NIL = NIL_temp; current_element = current_element_temp; at_start_ = at_start_temp; } // ---------------------------------------------------------------------------------------- template < typename domain, typename range, typename mem_manager, typename compare > void binary_search_tree_kernel_2:: remove_last_in_order ( domain& d, range& r ) { remove_biggest_element_in_tree(tree_root,d,r); --tree_size; // reset the enumerator reset(); } // ---------------------------------------------------------------------------------------- template < typename domain, typename range, typename mem_manager, typename compare > void binary_search_tree_kernel_2:: remove_current_element ( domain& d, range& r ) { node* t = current_element; move_next(); remove_from_tree(t,t->d,d,r); --tree_size; } // ---------------------------------------------------------------------------------------- template < typename domain, typename range, typename mem_manager, typename compare > void binary_search_tree_kernel_2:: position_enumerator ( const domain& d ) const { // clear the enumerator state and make sure the stack is empty reset(); at_start_ = false; node* t = tree_root; node* parent = NIL; bool went_left = false; while (t != NIL) { if ( comp(d , t->d )) { // if item is on the left then look in left parent = t; t = t->left; went_left = true; } else if (comp(t->d , d)) { // if item is on the right then look in right parent = t; t = t->right; went_left = false; } else { current_element = t; return; } } // if we didn't find any matches but there might be something after the // d in this tree. if (parent != NIL) { current_element = parent; // if we went left from this node then this node is the next // biggest. if (went_left) { return; } else { move_next(); } } } // ---------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------- // enumerable function definitions // ---------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------- template < typename domain, typename range, typename mem_manager, typename compare > bool binary_search_tree_kernel_2:: at_start ( ) const { return at_start_; } // ---------------------------------------------------------------------------------------- template < typename domain, typename range, typename mem_manager, typename compare > void binary_search_tree_kernel_2:: reset ( ) const { at_start_ = true; current_element = 0; } // ---------------------------------------------------------------------------------------- template < typename domain, typename range, typename mem_manager, typename compare > bool binary_search_tree_kernel_2:: current_element_valid ( ) const { return (current_element != 0); } // ---------------------------------------------------------------------------------------- template < typename domain, typename range, typename mem_manager, typename compare > const map_pair& binary_search_tree_kernel_2:: element ( ) const { p.d = &(current_element->d); p.r = &(current_element->r); return p; } // ---------------------------------------------------------------------------------------- template < typename domain, typename range, typename mem_manager, typename compare > map_pair& binary_search_tree_kernel_2:: element ( ) { p.d = &(current_element->d); p.r = &(current_element->r); return p; } // ---------------------------------------------------------------------------------------- template < typename domain, typename range, typename mem_manager, typename compare > bool binary_search_tree_kernel_2:: move_next ( ) const { // if we haven't started iterating yet if (at_start_) { at_start_ = false; if (tree_size == 0) { return false; } else { // find the first element in the tree current_element = tree_root; node* temp = current_element->left; while (temp != NIL) { current_element = temp; temp = current_element->left; } return true; } } else { if (current_element == 0) { return false; } else { bool went_up; // true if we went up the tree from a child node to parent bool from_left = false; // true if we went up and were coming from a left child node // find the next element in the tree if (current_element->right != NIL) { // go right and down current_element = current_element->right; went_up = false; } else { went_up = true; node* parent = current_element->parent; if (parent == NIL) { // in this case we have iterated over all the element of the tree current_element = 0; return false; } from_left = (parent->left == current_element); // go up to parent current_element = parent; } while (true) { if (went_up) { if (from_left) { // in this case we have found the next node break; } else { // we should go up node* parent = current_element->parent; from_left = (parent->left == current_element); current_element = parent; if (current_element == NIL) { // in this case we have iterated over all the elements // in the tree current_element = 0; return false; } } } else { // we just went down to a child node if (current_element->left != NIL) { // go left went_up = false; current_element = current_element->left; } else { // if there is no left child then we have found the next node break; } } } return true; } } } // ---------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------- // private member function definitions // ---------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------- template < typename domain, typename range, typename mem_manager, typename compare > void binary_search_tree_kernel_2:: delete_tree ( node* t ) { if (t->left != NIL) delete_tree(t->left); if (t->right != NIL) delete_tree(t->right); pool.deallocate(t); } // ---------------------------------------------------------------------------------------- template < typename domain, typename range, typename mem_manager, typename compare > void binary_search_tree_kernel_2:: rotate_left ( node* t ) { // perform the rotation node* temp = t->right; t->right = temp->left; if (temp->left != NIL) temp->left->parent = t; temp->left = t; temp->parent = t->parent; if (t == tree_root) tree_root = temp; else { // if t was on the left if (t->parent->left == t) t->parent->left = temp; else t->parent->right = temp; } t->parent = temp; } // ---------------------------------------------------------------------------------------- template < typename domain, typename range, typename mem_manager, typename compare > void binary_search_tree_kernel_2:: rotate_right ( node* t ) { // perform the rotation node* temp = t->left; t->left = temp->right; if (temp->right != NIL) temp->right->parent = t; temp->right = t; temp->parent = t->parent; if (t == tree_root) tree_root = temp; else { // if t is a left child if (t->parent->left == t) t->parent->left = temp; else t->parent->right = temp; } t->parent = temp; } // ---------------------------------------------------------------------------------------- template < typename domain, typename range, typename mem_manager, typename compare > void binary_search_tree_kernel_2:: double_rotate_right ( node* t ) { // preform the rotation node& temp = *(t->left->right); t->left = temp.right; temp.right->parent = t; temp.left->parent = temp.parent; temp.parent->right = temp.left; temp.parent->parent = &temp; temp.right = t; temp.left = temp.parent; temp.parent = t->parent; if (tree_root == t) tree_root = &temp; else { // t is a left child if (t->parent->left == t) t->parent->left = &temp; else t->parent->right = &temp; } t->parent = &temp; } // ---------------------------------------------------------------------------------------- template < typename domain, typename range, typename mem_manager, typename compare > void binary_search_tree_kernel_2:: double_rotate_left ( node* t ) { // preform the rotation node& temp = *(t->right->left); t->right = temp.left; temp.left->parent = t; temp.right->parent = temp.parent; temp.parent->left = temp.right; temp.parent->parent = &temp; temp.left = t; temp.right = temp.parent; temp.parent = t->parent; if (tree_root == t) tree_root = &temp; else { // t is a left child if (t->parent->left == t) t->parent->left = &temp; else t->parent->right = &temp; } t->parent = &temp; } // ---------------------------------------------------------------------------------------- template < typename domain, typename range, typename mem_manager, typename compare > void binary_search_tree_kernel_2:: remove_biggest_element_in_tree ( node* t, domain& d, range& r ) { node* next = t->right; node* child; // the child node of the one we will slice out if (next == NIL) { // need to determine if t is a right or left child if (t->parent->right == t) child = t->parent->right = t->left; else child = t->parent->left = t->left; // update tree_root if necessary if (t == tree_root) tree_root = child; } else { // find the least node do { t = next; next = next->right; } while (next != NIL); // t is a right child child = t->parent->right = t->left; } // swap the item from this node into d and r exchange(d,t->d); exchange(r,t->r); // plug hole right by removing this node child->parent = t->parent; // keep the red-black properties true if (t->color == black) fix_after_remove(child); // free the memory for this removed node pool.deallocate(t); } // ---------------------------------------------------------------------------------------- template < typename domain, typename range, typename mem_manager, typename compare > bool binary_search_tree_kernel_2:: remove_least_element_in_tree ( node* t, domain& d, range& r ) { node* next = t->left; node* child; // the child node of the one we will slice out if (next == NIL) { // need to determine if t is a left or right child if (t->parent->left == t) child = t->parent->left = t->right; else child = t->parent->right = t->right; // update tree_root if necessary if (t == tree_root) tree_root = child; } else { // find the least node do { t = next; next = next->left; } while (next != NIL); // t is a left child child = t->parent->left = t->right; } // swap the item from this node into d and r exchange(d,t->d); exchange(r,t->r); // plug hole left by removing this node child->parent = t->parent; // keep the red-black properties true if (t->color == black) fix_after_remove(child); bool rvalue = (t == current_element); // free the memory for this removed node pool.deallocate(t); return rvalue; } // ---------------------------------------------------------------------------------------- template < typename domain, typename range, typename mem_manager, typename compare > void binary_search_tree_kernel_2:: add_to_tree ( node* t, domain& d, range& r ) { // parent of the current node node* parent; // find a place to add node while (true) { parent = t; // if item should be put on the left then go left if (comp(d , t->d)) { t = t->left; if (t == NIL) { t = parent->left = pool.allocate(); break; } } // if item should be put on the right then go right else { t = t->right; if (t == NIL) { t = parent->right = pool.allocate(); break; } } } // t is now the node where we will add item and // parent is the parent of t t->parent = parent; t->left = NIL; t->right = NIL; t->color = red; exchange(t->d,d); exchange(t->r,r); // keep the red-black properties true fix_after_add(t); } // ---------------------------------------------------------------------------------------- template < typename domain, typename range, typename mem_manager, typename compare > void binary_search_tree_kernel_2:: remove_from_tree ( node* t, const domain& d, domain& d_copy, range& r ) { while (true) { if ( comp(d , t->d) ) { // if item is on the left then look in left t = t->left; } else if (comp(t->d , d)) { // if item is on the right then look in right t = t->right; } else { // found the node we want to remove // swap out the item into d_copy and r exchange(d_copy,t->d); exchange(r,t->r); if (t->left == NIL) { // if there is no left subtree node* parent = t->parent; // plug hole with right subtree // if t is on the left if (parent->left == t) parent->left = t->right; else parent->right = t->right; t->right->parent = parent; // update tree_root if necessary if (t == tree_root) tree_root = t->right; if (t->color == black) fix_after_remove(t->right); // delete old node pool.deallocate(t); } else if (t->right == NIL) { // if there is no right subtree node* parent = t->parent; // plug hole with left subtree if (parent->left == t) parent->left = t->left; else parent->right = t->left; t->left->parent = parent; // update tree_root if necessary if (t == tree_root) tree_root = t->left; if (t->color == black) fix_after_remove(t->left); // delete old node pool.deallocate(t); } else { // if there is both a left and right subtree // get an element to fill this node now that its been swapped into // item_copy if (remove_least_element_in_tree(t->right,t->d,t->r)) { // the node removed was the one pointed to by current_element so we // need to update it so that it points to the right spot. current_element = t; } } // quit loop break; } } } // ---------------------------------------------------------------------------------------- template < typename domain, typename range, typename mem_manager, typename compare > void binary_search_tree_kernel_2:: remove_from_tree ( node* t, const domain& d ) { while (true) { if ( comp(d , t->d) ) { // if item is on the left then look in left t = t->left; } else if (comp(t->d , d)) { // if item is on the right then look in right t = t->right; } else { // found the node we want to remove if (t->left == NIL) { // if there is no left subtree node* parent = t->parent; // plug hole with right subtree if (parent->left == t) parent->left = t->right; else parent->right = t->right; t->right->parent = parent; // update tree_root if necessary if (t == tree_root) tree_root = t->right; if (t->color == black) fix_after_remove(t->right); // delete old node pool.deallocate(t); } else if (t->right == NIL) { // if there is no right subtree node* parent = t->parent; // plug hole with left subtree if (parent->left == t) parent->left = t->left; else parent->right = t->left; t->left->parent = parent; // update tree_root if necessary if (t == tree_root) tree_root = t->left; if (t->color == black) fix_after_remove(t->left); // delete old node pool.deallocate(t); } else { // if there is both a left and right subtree // get an element to fill this node now that its been swapped into // item_copy remove_least_element_in_tree(t->right,t->d,t->r); } // quit loop break; } } } // ---------------------------------------------------------------------------------------- template < typename domain, typename range, typename mem_manager, typename compare > range* binary_search_tree_kernel_2:: return_reference ( node* t, const domain& d ) { while (t != NIL) { if ( comp(d , t->d )) { // if item is on the left then look in left t = t->left; } else if (comp(t->d , d)) { // if item is on the right then look in right t = t->right; } else { // if it's found then return a reference to it return &(t->r); } } return 0; } // ---------------------------------------------------------------------------------------- template < typename domain, typename range, typename mem_manager, typename compare > const range* binary_search_tree_kernel_2:: return_reference ( const node* t, const domain& d ) const { while (t != NIL) { if ( comp(d , t->d) ) { // if item is on the left then look in left t = t->left; } else if (comp(t->d , d)) { // if item is on the right then look in right t = t->right; } else { // if it's found then return a reference to it return &(t->r); } } return 0; } // ---------------------------------------------------------------------------------------- template < typename domain, typename range, typename mem_manager, typename compare > void binary_search_tree_kernel_2:: fix_after_add ( node* t ) { while (t->parent->color == red) { node& grandparent = *(t->parent->parent); // if both t's parent and its sibling are red if (grandparent.left->color == grandparent.right->color) { grandparent.color = red; grandparent.left->color = black; grandparent.right->color = black; t = &grandparent; } else { // if t is a left child if (t == t->parent->left) { // if t's parent is a left child if (t->parent == grandparent.left) { grandparent.color = red; grandparent.left->color = black; rotate_right(&grandparent); } // if t's parent is a right child else { t->color = black; grandparent.color = red; double_rotate_left(&grandparent); } } // if t is a right child else { // if t's parent is a left child if (t->parent == grandparent.left) { t->color = black; grandparent.color = red; double_rotate_right(&grandparent); } // if t's parent is a right child else { grandparent.color = red; grandparent.right->color = black; rotate_left(&grandparent); } } break; } } tree_root->color = black; } // ---------------------------------------------------------------------------------------- template < typename domain, typename range, typename mem_manager, typename compare > void binary_search_tree_kernel_2:: fix_after_remove ( node* t ) { while (t != tree_root && t->color == black) { if (t->parent->left == t) { node* sibling = t->parent->right; if (sibling->color == red) { sibling->color = black; t->parent->color = red; rotate_left(t->parent); sibling = t->parent->right; } if (sibling->left->color == black && sibling->right->color == black) { sibling->color = red; t = t->parent; } else { if (sibling->right->color == black) { sibling->left->color = black; sibling->color = red; rotate_right(sibling); sibling = t->parent->right; } sibling->color = t->parent->color; t->parent->color = black; sibling->right->color = black; rotate_left(t->parent); t = tree_root; } } else { node* sibling = t->parent->left; if (sibling->color == red) { sibling->color = black; t->parent->color = red; rotate_right(t->parent); sibling = t->parent->left; } if (sibling->left->color == black && sibling->right->color == black) { sibling->color = red; t = t->parent; } else { if (sibling->left->color == black) { sibling->right->color = black; sibling->color = red; rotate_left(sibling); sibling = t->parent->left; } sibling->color = t->parent->color; t->parent->color = black; sibling->left->color = black; rotate_right(t->parent); t = tree_root; } } } t->color = black; } // ---------------------------------------------------------------------------------------- template < typename domain, typename range, typename mem_manager, typename compare > short binary_search_tree_kernel_2:: tree_height ( node* t ) const { if (t == NIL) return 0; short height1 = tree_height(t->left); short height2 = tree_height(t->right); if (height1 > height2) return height1 + 1; else return height2 + 1; } // ---------------------------------------------------------------------------------------- template < typename domain, typename range, typename mem_manager, typename compare > unsigned long binary_search_tree_kernel_2:: get_count ( const domain& d, node* tree_root ) const { if (tree_root != NIL) { if (comp(d , tree_root->d)) { // go left return get_count(d,tree_root->left); } else if (comp(tree_root->d , d)) { // go right return get_count(d,tree_root->right); } else { // go left and right to look for more matches return get_count(d,tree_root->left) + get_count(d,tree_root->right) + 1; } } return 0; } // ---------------------------------------------------------------------------------------- } #endif // DLIB_BINARY_SEARCH_TREE_KERNEl_2_ ================================================ FILE: benchmarks/dlib/binary_search_tree/binary_search_tree_kernel_abstract.h ================================================ // Copyright (C) 2003 Davis E. King (davis@dlib.net) // License: Boost Software License See LICENSE.txt for the full license. #undef DLIB_BINARY_SEARCH_TREE_KERNEl_ABSTRACT_ #ifdef DLIB_BINARY_SEARCH_TREE_KERNEl_ABSTRACT_ #include "../interfaces/map_pair.h" #include "../interfaces/enumerable.h" #include "../interfaces/remover.h" #include "../serialize.h" #include "../algs.h" #include namespace dlib { template < typename domain, typename range, typename mem_manager = default_memory_manager, typename compare = std::less > class binary_search_tree : public enumerable >, public asc_pair_remover { /*! REQUIREMENTS ON domain domain must be comparable by compare where compare is a functor compatible with std::less and domain is swappable by a global swap() and domain must have a default constructor REQUIREMENTS ON range range is swappable by a global swap() and range must have a default constructor REQUIREMENTS ON mem_manager must be an implementation of memory_manager/memory_manager_kernel_abstract.h or must be an implementation of memory_manager_global/memory_manager_global_kernel_abstract.h or must be an implementation of memory_manager_stateless/memory_manager_stateless_kernel_abstract.h mem_manager::type can be set to anything. POINTERS AND REFERENCES TO INTERNAL DATA swap(), count(), height(), and operator[] functions do not invalidate pointers or references to internal data. position_enumerator() invalidates pointers or references to data returned by element() and only by element() (i.e. pointers and references returned by operator[] are still valid). All other functions have no such guarantees. INITIAL VALUE size() == 0 height() == 0 ENUMERATION ORDER The enumerator will iterate over the domain (and each associated range element) elements in ascending order according to the compare functor. (i.e. the elements are enumerated in sorted order) WHAT THIS OBJECT REPRESENTS this object represents a data dictionary that is built on top of some kind of binary search tree. It maps objects of type domain to objects of type range. Also note that unless specified otherwise, no member functions of this object throw exceptions. NOTE: definition of equivalent: a is equivalent to b if a < b == false and b < a == false !*/ public: typedef domain domain_type; typedef range range_type; typedef compare compare_type; typedef mem_manager mem_manager_type; binary_search_tree( ); /*! ensures - #*this is properly initialized throws - std::bad_alloc or any exception thrown by domain's or range's constructor. !*/ virtual ~binary_search_tree( ); /*! ensures - all memory associated with *this has been released !*/ void clear( ); /*! ensures - #*this has its initial value throws - std::bad_alloc or any exception thrown by domain's or range's constructor. if this exception is thrown then *this is unusable until clear() is called and succeeds !*/ short height ( ) const; /*! ensures - returns the number of elements in the longest path from the root of the tree to a leaf !*/ unsigned long count ( const domain& d ) const; /*! ensures - returns the number of elements in the domain of *this that are equivalent to d !*/ void add ( domain& d, range& r ); /*! requires - &d != &r (i.e. d and r cannot be the same variable) ensures - adds a mapping between d and r to *this - if (count(d) == 0) then - #*(*this)[d] == r - else - #(*this)[d] != 0 - #d and #r have initial values for their types - #count(d) == count(d) + 1 - #at_start() == true - #size() == size() + 1 throws - std::bad_alloc or any exception thrown by domain's or range's constructor. if add() throws then it has no effect !*/ void remove ( const domain& d, domain& d_copy, range& r ); /*! requires - (*this)[d] != 0 - &d != &r (i.e. d and r cannot be the same variable) - &d != &d_copy (i.e. d and d_copy cannot be the same variable) - &r != &d_copy (i.e. r and d_copy cannot be the same variable) ensures - some element in the domain of *this that is equivalent to d has been removed and swapped into #d_copy. Additionally, its associated range element has been removed and swapped into #r. - #count(d) == count(d) - 1 - #size() == size() - 1 - #at_start() == true !*/ void destroy ( const domain& d ); /*! requires - (*this)[d] != 0 ensures - an element in the domain of *this equivalent to d has been removed. The element in the range of *this associated with d has also been removed. - #count(d) == count(d) - 1 - #size() == size() - 1 - #at_start() == true !*/ void remove_last_in_order ( domain& d, range& r ); /*! requires - size() > 0 ensures - the last/biggest (according to the compare functor) element in the domain of *this has been removed and swapped into #d. The element in the range of *this associated with #d has also been removed and swapped into #r. - #count(#d) == count(#d) - 1 - #size() == size() - 1 - #at_start() == true !*/ void remove_current_element ( domain& d, range& r ); /*! requires - current_element_valid() == true ensures - the current element given by element() has been removed and swapped into d and r. - #d == element().key() - #r == element().value() - #count(#d) == count(#d) - 1 - #size() == size() - 1 - moves the enumerator to the next element. If element() was the last element in enumeration order then #current_element_valid() == false and #at_start() == false. !*/ void position_enumerator ( const domain& d ) const; /*! ensures - #at_start() == false - if (count(d) > 0) then - #element().key() == d - else if (there are any items in the domain of *this that are bigger than d according to the compare functor) then - #element().key() == the smallest item in the domain of *this that is bigger than d according to the compare functor. - else - #current_element_valid() == false !*/ const range* operator[] ( const domain& d ) const; /*! ensures - if (there is an element in the domain equivalent to d) then - returns a pointer to an element in the range of *this that is associated with an element in the domain of *this equivalent to d. - else - returns 0 !*/ range* operator[] ( const domain& d ); /*! ensures - if (there is an element in the domain equivalent to d) then - returns a pointer to an element in the range of *this that is associated with an element in the domain of *this equivalent to d. - else - returns 0 !*/ void swap ( binary_search_tree& item ); /*! ensures - swaps *this and item !*/ private: // restricted functions binary_search_tree(binary_search_tree&); binary_search_tree& operator=(binary_search_tree&); }; template < typename domain, typename range, typename mem_manager, typename compare > inline void swap ( binary_search_tree& a, binary_search_tree& b ) { a.swap(b); } /*! provides a global swap function !*/ template < typename domain, typename range, typename mem_manager, typename compare > void deserialize ( binary_search_tree& item, std::istream& in ); /*! provides deserialization support !*/ } #endif // DLIB_BINARY_SEARCH_TREE_KERNEl_ABSTRACT_ ================================================ FILE: benchmarks/dlib/binary_search_tree/binary_search_tree_kernel_c.h ================================================ // Copyright (C) 2003 Davis E. King (davis@dlib.net) // License: Boost Software License See LICENSE.txt for the full license. #ifndef DLIB_BINARY_SEARCH_TREE_KERNEl_C_ #define DLIB_BINARY_SEARCH_TREE_KERNEl_C_ #include "../interfaces/map_pair.h" #include "binary_search_tree_kernel_abstract.h" #include "../algs.h" #include "../assert.h" namespace dlib { template < typename bst_base > class binary_search_tree_kernel_c : public bst_base { typedef typename bst_base::domain_type domain; typedef typename bst_base::range_type range; public: binary_search_tree_kernel_c () {} void remove ( const domain& d, domain& d_copy, range& r ); void destroy ( const domain& d ); void add ( domain& d, range& r ); void remove_any ( domain& d, range& r ); const map_pair& element( ) const { DLIB_CASSERT(this->current_element_valid() == true, "\tconst map_pair& binary_search_tree::element() const" << "\n\tyou can't access the current element if it doesn't exist" << "\n\tthis: " << this ); return bst_base::element(); } map_pair& element( ) { DLIB_CASSERT(this->current_element_valid() == true, "\tmap_pair& binary_search_tree::element()" << "\n\tyou can't access the current element if it doesn't exist" << "\n\tthis: " << this ); return bst_base::element(); } void remove_last_in_order ( domain& d, range& r ); void remove_current_element ( domain& d, range& r ); }; template < typename bst_base > inline void swap ( binary_search_tree_kernel_c& a, binary_search_tree_kernel_c& b ) { a.swap(b); } // ---------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------- // member function definitions // ---------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------- template < typename bst_base > void binary_search_tree_kernel_c:: add ( domain& d, range& r ) { DLIB_CASSERT( static_cast(&d) != static_cast(&r), "\tvoid binary_search_tree::add" << "\n\tyou can't call add() and give the same object to both parameters." << "\n\tthis: " << this << "\n\t&d: " << &d << "\n\t&r: " << &r << "\n\tsize(): " << this->size() ); bst_base::add(d,r); } // ---------------------------------------------------------------------------------------- template < typename bst_base > void binary_search_tree_kernel_c:: destroy ( const domain& d ) { DLIB_CASSERT(this->operator[](d) != 0, "\tvoid binary_search_tree::destroy" << "\n\tthe element must be in the tree for it to be removed" << "\n\tthis: " << this << "\n\t&d: " << &d ); bst_base::destroy(d); } // ---------------------------------------------------------------------------------------- template < typename bst_base > void binary_search_tree_kernel_c:: remove ( const domain& d, domain& d_copy, range& r ) { DLIB_CASSERT(this->operator[](d) != 0 && (static_cast(&d) != static_cast(&d_copy)) && (static_cast(&d) != static_cast(&r)) && (static_cast(&r) != static_cast(&d_copy)), "\tvoid binary_search_tree::remove" << "\n\tthe element must be in the tree for it to be removed" << "\n\tthis: " << this << "\n\t&d: " << &d << "\n\t&d_copy: " << &d_copy << "\n\t&r: " << &r ); bst_base::remove(d,d_copy,r); } // ---------------------------------------------------------------------------------------- template < typename bst_base > void binary_search_tree_kernel_c:: remove_any( domain& d, range& r ) { DLIB_CASSERT(this->size() != 0 && (static_cast(&d) != static_cast(&r)), "\tvoid binary_search_tree::remove_any" << "\n\ttree must not be empty if something is going to be removed" << "\n\tthis: " << this << "\n\t&d: " << &d << "\n\t&r: " << &r ); bst_base::remove_any(d,r); } // ---------------------------------------------------------------------------------------- template < typename bst_base > void binary_search_tree_kernel_c:: remove_last_in_order ( domain& d, range& r ) { DLIB_CASSERT(this->size() > 0, "\tvoid binary_search_tree::remove_last_in_order()" << "\n\tyou can't remove an element if it doesn't exist" << "\n\tthis: " << this ); bst_base::remove_last_in_order(d,r); } // ---------------------------------------------------------------------------------------- template < typename bst_base > void binary_search_tree_kernel_c:: remove_current_element ( domain& d, range& r ) { DLIB_CASSERT(this->current_element_valid() == true, "\tvoid binary_search_tree::remove_current_element()" << "\n\tyou can't remove the current element if it doesn't exist" << "\n\tthis: " << this ); bst_base::remove_current_element(d,r); } // ---------------------------------------------------------------------------------------- } #endif // DLIB_BINARY_SEARCH_TREE_KERNEl_C_ ================================================ FILE: benchmarks/dlib/binary_search_tree.h ================================================ // Copyright (C) 2003 Davis E. King (davis@dlib.net) // License: Boost Software License See LICENSE.txt for the full license. #ifndef DLIB_BINARY_SEARCH_TREe_ #define DLIB_BINARY_SEARCH_TREe_ #include "binary_search_tree/binary_search_tree_kernel_1.h" #include "binary_search_tree/binary_search_tree_kernel_2.h" #include "binary_search_tree/binary_search_tree_kernel_c.h" #include "algs.h" #include namespace dlib { template < typename domain, typename range, typename mem_manager = default_memory_manager, typename compare = std::less > class binary_search_tree { binary_search_tree() {} public: //----------- kernels --------------- // kernel_1a typedef binary_search_tree_kernel_1 kernel_1a; typedef binary_search_tree_kernel_c kernel_1a_c; // kernel_2a typedef binary_search_tree_kernel_2 kernel_2a; typedef binary_search_tree_kernel_c kernel_2a_c; }; } #endif // DLIB_BINARY_SEARCH_TREe_ ================================================ FILE: benchmarks/dlib/bound_function_pointer/bound_function_pointer_kernel_1.h ================================================ // Copyright (C) 2008 Davis E. King (davis@dlib.net) // License: Boost Software License See LICENSE.txt for the full license. #ifndef DLIB_BOUND_FUNCTION_POINTER_KERNEl_1_ #define DLIB_BOUND_FUNCTION_POINTER_KERNEl_1_ #include "../algs.h" #include "../member_function_pointer.h" #include "bound_function_pointer_kernel_abstract.h" namespace dlib { // ---------------------------------------------------------------------------------------- namespace bfp1_helpers { template struct strip { typedef T type; }; template struct strip { typedef T type; }; // ------------------------------------------------------------------------------------ class bound_function_helper_base_base { public: virtual ~bound_function_helper_base_base(){} virtual void call() const = 0; virtual bool is_set() const = 0; virtual void clone(void* ptr) const = 0; }; // ------------------------------------------------------------------------------------ template class bound_function_helper_base : public bound_function_helper_base_base { public: bound_function_helper_base():arg1(0), arg2(0), arg3(0), arg4(0) {} typename strip::type* arg1; typename strip::type* arg2; typename strip::type* arg3; typename strip::type* arg4; member_function_pointer mfp; }; // ---------------- template class bound_function_helper : public bound_function_helper_base { public: void call() const { (*fp)(*this->arg1, *this->arg2, *this->arg3, *this->arg4); } typename strip::type* fp; }; template class bound_function_helper : public bound_function_helper_base { public: void call() const { if (this->mfp) this->mfp(*this->arg1, *this->arg2, *this->arg3, *this->arg4); else if (fp) fp(*this->arg1, *this->arg2, *this->arg3, *this->arg4); } void (*fp)(T1, T2, T3, T4); }; // ---------------- template class bound_function_helper : public bound_function_helper_base { public: void call() const { (*fp)(); } typename strip::type* fp; }; template <> class bound_function_helper : public bound_function_helper_base { public: void call() const { if (this->mfp) this->mfp(); else if (fp) fp(); } void (*fp)(); }; // ---------------- template class bound_function_helper : public bound_function_helper_base { public: void call() const { (*fp)(*this->arg1); } typename strip::type* fp; }; template class bound_function_helper : public bound_function_helper_base { public: void call() const { if (this->mfp) this->mfp(*this->arg1); else if (fp) fp(*this->arg1); } void (*fp)(T1); }; // ---------------- template class bound_function_helper : public bound_function_helper_base { public: void call() const { (*fp)(*this->arg1, *this->arg2); } typename strip::type* fp; }; template class bound_function_helper : public bound_function_helper_base { public: void call() const { if (this->mfp) this->mfp(*this->arg1, *this->arg2); else if (fp) fp(*this->arg1, *this->arg2); } void (*fp)(T1, T2); }; // ---------------- template class bound_function_helper : public bound_function_helper_base { public: void call() const { (*fp)(*this->arg1, *this->arg2, *this->arg3); } typename strip::type* fp; }; template class bound_function_helper : public bound_function_helper_base { public: void call() const { if (this->mfp) this->mfp(*this->arg1, *this->arg2, *this->arg3); else if (fp) fp(*this->arg1, *this->arg2, *this->arg3); } void (*fp)(T1, T2, T3); }; // ------------------------------------------------------------------------------------ // ------------------------------------------------------------------------------------ template class bound_function_helper_T : public T { public: bound_function_helper_T(){ this->fp = 0;} bool is_set() const { return this->fp != 0 || this->mfp.is_set(); } template void safe_clone(stack_based_memory_block& buf) { // This is here just to validate the assumption that our block of memory we have made // in bf_memory is the right size to store the data for this object. If you // get a compiler error on this line then email me :) COMPILE_TIME_ASSERT(sizeof(bound_function_helper_T) <= mem_size); clone(buf.get()); } void clone (void* ptr) const { bound_function_helper_T* p = new(ptr) bound_function_helper_T(); p->arg1 = this->arg1; p->arg2 = this->arg2; p->arg3 = this->arg3; p->arg4 = this->arg4; p->fp = this->fp; p->mfp = this->mfp; } }; } // ---------------------------------------------------------------------------------------- class bound_function_pointer { typedef bfp1_helpers::bound_function_helper_T > bf_null_type; public: // These typedefs are here for backwards compatibility with previous versions of // dlib. typedef bound_function_pointer kernel_1a; typedef bound_function_pointer kernel_1a_c; bound_function_pointer ( ) { bf_null_type().safe_clone(bf_memory); } bound_function_pointer ( const bound_function_pointer& item ) { item.bf()->clone(bf_memory.get()); } ~bound_function_pointer() { destroy_bf_memory(); } bound_function_pointer& operator= ( const bound_function_pointer& item ) { bound_function_pointer(item).swap(*this); return *this; } void clear ( ) { bound_function_pointer().swap(*this); } bool is_set ( ) const { return bf()->is_set(); } void swap ( bound_function_pointer& item ) { // make a temp copy of item bound_function_pointer temp(item); // destory the stuff in item item.destroy_bf_memory(); // copy *this into item bf()->clone(item.bf_memory.get()); // destory the stuff in this destroy_bf_memory(); // copy temp into *this temp.bf()->clone(bf_memory.get()); } void operator() ( ) const { // make sure requires clause is not broken DLIB_ASSERT(is_set() == true , "\tvoid bound_function_pointer::operator()" << "\n\tYou must call set() before you can use this function" << "\n\tthis: " << this ); bf()->call(); } private: struct dummy{ void nonnull() {}}; typedef void (dummy::*safe_bool)(); public: operator safe_bool () const { return is_set() ? &dummy::nonnull : 0; } bool operator!() const { return !is_set(); } // ------------------------------------------- // set function object overloads // ------------------------------------------- template void set ( F& function_object ) { COMPILE_TIME_ASSERT(is_function::value == false); COMPILE_TIME_ASSERT(is_pointer_type::value == false); using namespace bfp1_helpers; destroy_bf_memory(); typedef bound_function_helper_T > bf_helper_type; bf_helper_type temp; temp.fp = &function_object; temp.safe_clone(bf_memory); } template void set ( F& function_object, A1& arg1 ) { COMPILE_TIME_ASSERT(is_function::value == false); COMPILE_TIME_ASSERT(is_pointer_type::value == false); using namespace bfp1_helpers; destroy_bf_memory(); typedef bound_function_helper_T > bf_helper_type; bf_helper_type temp; temp.arg1 = &arg1; temp.fp = &function_object; temp.safe_clone(bf_memory); } template void set ( F& function_object, A1& arg1, A2& arg2 ) { COMPILE_TIME_ASSERT(is_function::value == false); COMPILE_TIME_ASSERT(is_pointer_type::value == false); using namespace bfp1_helpers; destroy_bf_memory(); typedef bound_function_helper_T > bf_helper_type; bf_helper_type temp; temp.arg1 = &arg1; temp.arg2 = &arg2; temp.fp = &function_object; temp.safe_clone(bf_memory); } template void set ( F& function_object, A1& arg1, A2& arg2, A3& arg3 ) { COMPILE_TIME_ASSERT(is_function::value == false); COMPILE_TIME_ASSERT(is_pointer_type::value == false); using namespace bfp1_helpers; destroy_bf_memory(); typedef bound_function_helper_T > bf_helper_type; bf_helper_type temp; temp.arg1 = &arg1; temp.arg2 = &arg2; temp.arg3 = &arg3; temp.fp = &function_object; temp.safe_clone(bf_memory); } template void set ( F& function_object, A1& arg1, A2& arg2, A3& arg3, A4& arg4 ) { COMPILE_TIME_ASSERT(is_function::value == false); COMPILE_TIME_ASSERT(is_pointer_type::value == false); using namespace bfp1_helpers; destroy_bf_memory(); typedef bound_function_helper_T > bf_helper_type; bf_helper_type temp; temp.arg1 = &arg1; temp.arg2 = &arg2; temp.arg3 = &arg3; temp.arg4 = &arg4; temp.fp = &function_object; temp.safe_clone(bf_memory); } // ------------------------------------------- // set mfp overloads // ------------------------------------------- template void set ( T& object, void (T::*funct)() ) { using namespace bfp1_helpers; destroy_bf_memory(); typedef bound_function_helper_T > bf_helper_type; bf_helper_type temp; temp.mfp.set(object,funct); temp.safe_clone(bf_memory); } template void set ( const T& object, void (T::*funct)()const ) { using namespace bfp1_helpers; destroy_bf_memory(); typedef bound_function_helper_T > bf_helper_type; bf_helper_type temp; temp.mfp.set(object,funct); temp.safe_clone(bf_memory); } // ------------------------------------------- template void set ( T& object, void (T::*funct)(T1), A1& arg1 ) { using namespace bfp1_helpers; destroy_bf_memory(); typedef bound_function_helper_T > bf_helper_type; bf_helper_type temp; temp.arg1 = &arg1; temp.mfp.set(object,funct); temp.safe_clone(bf_memory); } template void set ( const T& object, void (T::*funct)(T1)const, A1& arg1 ) { using namespace bfp1_helpers; destroy_bf_memory(); typedef bound_function_helper_T > bf_helper_type; bf_helper_type temp; temp.arg1 = &arg1; temp.mfp.set(object,funct); temp.safe_clone(bf_memory); } // ---------------- template void set ( T& object, void (T::*funct)(T1, T2), A1& arg1, A2& arg2 ) { using namespace bfp1_helpers; destroy_bf_memory(); typedef bound_function_helper_T > bf_helper_type; bf_helper_type temp; temp.arg1 = &arg1; temp.arg2 = &arg2; temp.mfp.set(object,funct); temp.safe_clone(bf_memory); } template void set ( const T& object, void (T::*funct)(T1, T2)const, A1& arg1, A2& arg2 ) { using namespace bfp1_helpers; destroy_bf_memory(); typedef bound_function_helper_T > bf_helper_type; bf_helper_type temp; temp.arg1 = &arg1; temp.arg2 = &arg2; temp.mfp.set(object,funct); temp.safe_clone(bf_memory); } // ---------------- template void set ( T& object, void (T::*funct)(T1, T2, T3), A1& arg1, A2& arg2, A3& arg3 ) { using namespace bfp1_helpers; destroy_bf_memory(); typedef bound_function_helper_T > bf_helper_type; bf_helper_type temp; temp.arg1 = &arg1; temp.arg2 = &arg2; temp.arg3 = &arg3; temp.mfp.set(object,funct); temp.safe_clone(bf_memory); } template void set ( const T& object, void (T::*funct)(T1, T2, T3)const, A1& arg1, A2& arg2, A3& arg3 ) { using namespace bfp1_helpers; destroy_bf_memory(); typedef bound_function_helper_T > bf_helper_type; bf_helper_type temp; temp.arg1 = &arg1; temp.arg2 = &arg2; temp.arg3 = &arg3; temp.mfp.set(object,funct); temp.safe_clone(bf_memory); } // ---------------- template void set ( T& object, void (T::*funct)(T1, T2, T3, T4), A1& arg1, A2& arg2, A3& arg3, A4& arg4 ) { using namespace bfp1_helpers; destroy_bf_memory(); typedef bound_function_helper_T > bf_helper_type; bf_helper_type temp; temp.arg1 = &arg1; temp.arg2 = &arg2; temp.arg3 = &arg3; temp.arg4 = &arg4; temp.mfp.set(object,funct); temp.safe_clone(bf_memory); } template void set ( const T& object, void (T::*funct)(T1, T2, T3, T4)const, A1& arg1, A2& arg2, A3& arg3, A4& arg4 ) { using namespace bfp1_helpers; destroy_bf_memory(); typedef bound_function_helper_T > bf_helper_type; bf_helper_type temp; temp.arg1 = &arg1; temp.arg2 = &arg2; temp.arg3 = &arg3; temp.arg4 = &arg4; temp.mfp.set(object,funct); temp.safe_clone(bf_memory); } // ------------------------------------------- // set fp overloads // ------------------------------------------- void set ( void (*funct)() ) { using namespace bfp1_helpers; destroy_bf_memory(); typedef bound_function_helper_T > bf_helper_type; bf_helper_type temp; temp.fp = funct; temp.safe_clone(bf_memory); } template void set ( void (*funct)(T1), A1& arg1 ) { using namespace bfp1_helpers; destroy_bf_memory(); typedef bound_function_helper_T > bf_helper_type; bf_helper_type temp; temp.arg1 = &arg1; temp.fp = funct; temp.safe_clone(bf_memory); } template void set ( void (*funct)(T1, T2), A1& arg1, A2& arg2 ) { using namespace bfp1_helpers; destroy_bf_memory(); typedef bound_function_helper_T > bf_helper_type; bf_helper_type temp; temp.arg1 = &arg1; temp.arg2 = &arg2; temp.fp = funct; temp.safe_clone(bf_memory); } template void set ( void (*funct)(T1, T2, T3), A1& arg1, A2& arg2, A3& arg3 ) { using namespace bfp1_helpers; destroy_bf_memory(); typedef bound_function_helper_T > bf_helper_type; bf_helper_type temp; temp.arg1 = &arg1; temp.arg2 = &arg2; temp.arg3 = &arg3; temp.fp = funct; temp.safe_clone(bf_memory); } template void set ( void (*funct)(T1, T2, T3, T4), A1& arg1, A2& arg2, A3& arg3, A4& arg4 ) { using namespace bfp1_helpers; destroy_bf_memory(); typedef bound_function_helper_T > bf_helper_type; bf_helper_type temp; temp.arg1 = &arg1; temp.arg2 = &arg2; temp.arg3 = &arg3; temp.arg4 = &arg4; temp.fp = funct; temp.safe_clone(bf_memory); } // ------------------------------------------- private: stack_based_memory_block bf_memory; void destroy_bf_memory ( ) { // Honestly, this probably doesn't even do anything but I'm putting // it here just for good measure. bf()->~bound_function_helper_base_base(); } bfp1_helpers::bound_function_helper_base_base* bf () { return static_cast(bf_memory.get()); } const bfp1_helpers::bound_function_helper_base_base* bf () const { return static_cast(bf_memory.get()); } }; // ---------------------------------------------------------------------------------------- inline void swap ( bound_function_pointer& a, bound_function_pointer& b ) { a.swap(b); } // ---------------------------------------------------------------------------------------- } #endif // DLIB_BOUND_FUNCTION_POINTER_KERNEl_1_ ================================================ FILE: benchmarks/dlib/bound_function_pointer/bound_function_pointer_kernel_abstract.h ================================================ // Copyright (C) 2008 Davis E. King (davis@dlib.net) // License: Boost Software License See LICENSE.txt for the full license. #undef DLIB_BOUND_FUNCTION_POINTER_KERNEl_ABSTRACT_ #ifdef DLIB_BOUND_FUNCTION_POINTER_KERNEl_ABSTRACT_ namespace dlib { // ---------------------------------------------------------------------------------------- class bound_function_pointer { /*! INITIAL VALUE is_set() == false WHAT THIS OBJECT REPRESENTS This object represents a function with all its arguments bound to specific objects. For example: void test(int& var) { var = var+1; } bound_function_pointer funct; int a = 4; funct.set(test,a); // bind the variable a to the first argument of the test() function // at this point a == 4 funct(); // after funct() is called a == 5 !*/ public: bound_function_pointer ( ); /*! ensures - #*this is properly initialized !*/ bound_function_pointer( const bound_function_pointer& item ); /*! ensures - *this == item !*/ ~bound_function_pointer ( ); /*! ensures - any resources associated with *this have been released !*/ bound_function_pointer& operator=( const bound_function_pointer& item ); /*! ensures - *this == item !*/ void clear( ); /*! ensures - #*this has its initial value !*/ bool is_set ( ) const; /*! ensures - if (this->set() has been called) then - returns true - else - returns false !*/ operator some_undefined_pointer_type ( ) const; /*! ensures - if (is_set()) then - returns a non 0 value - else - returns a 0 value !*/ bool operator! ( ) const; /*! ensures - returns !is_set() !*/ void operator () ( ) const; /*! requires - is_set() == true ensures - calls the bound function on the object(s) specified by the last call to this->set() throws - any exception thrown by the function specified by the previous call to this->set(). If any of these exceptions are thrown then the call to this function will have no effect on *this. !*/ void swap ( bound_function_pointer& item ); /*! ensures - swaps *this and item !*/ // ---------------------- template void set ( F& function_object ); /*! requires - function_object() is a valid expression ensures - #is_set() == true - calls to this->operator() will call function_object() (This seems pointless but it is a useful base case) !*/ template < typename T> void set ( T& object, void (T::*funct)() ); /*! requires - funct == a valid member function pointer for class T ensures - #is_set() == true - calls to this->operator() will call (object.*funct)() !*/ template < typename T> void set ( const T& object, void (T::*funct)()const ); /*! requires - funct == a valid bound function pointer for class T ensures - #is_set() == true - calls to this->operator() will call (object.*funct)() !*/ void set ( void (*funct)() ); /*! requires - funct == a valid function pointer ensures - #is_set() == true - calls to this->operator() will call funct() !*/ // ---------------------- template void set ( F& function_object, A1& arg1 ); /*! requires - function_object(arg1) is a valid expression ensures - #is_set() == true - calls to this->operator() will call function_object(arg1) !*/ template < typename T, typename T1, typename A1 > void set ( T& object, void (T::*funct)(T1), A1& arg1 ); /*! requires - funct == a valid member function pointer for class T ensures - #is_set() == true - calls to this->operator() will call (object.*funct)(arg1) !*/ template < typename T, typename T1, typename A1 > void set ( const T& object, void (T::*funct)(T1)const, A1& arg1 ); /*! requires - funct == a valid bound function pointer for class T ensures - #is_set() == true - calls to this->operator() will call (object.*funct)(arg1) !*/ template void set ( void (*funct)(T1), A1& arg1 ); /*! requires - funct == a valid function pointer ensures - #is_set() == true - calls to this->operator() will call funct(arg1) !*/ // ---------------------- template void set ( F& function_object, A1& arg1, A2& arg2 ); /*! requires - function_object(arg1,arg2) is a valid expression ensures - #is_set() == true - calls to this->operator() will call function_object(arg1,arg2) !*/ template < typename T, typename T1, typename A1, typename T2, typename A2> void set ( T& object, void (T::*funct)(T1,T2), A1& arg1, A2& arg2 ); /*! requires - funct == a valid member function pointer for class T ensures - #is_set() == true - calls to this->operator() will call (object.*funct)(arg1,arg2) !*/ template < typename T, typename T1, typename A1, typename T2, typename A2> void set ( const T& object, void (T::*funct)(T1,T2)const, A1& arg1, A2& arg2 ); /*! requires - funct == a valid bound function pointer for class T ensures - #is_set() == true - calls to this->operator() will call (object.*funct)(arg1,arg2) !*/ template void set ( void (*funct)(T1,T2), A1& arg1, A2& arg2 ); /*! requires - funct == a valid function pointer ensures - #is_set() == true - calls to this->operator() will call funct(arg1,arg2) !*/ // ---------------------- template void set ( F& function_object, A1& arg1, A2& arg2, A3& arg3 ); /*! requires - function_object(arg1,arg2,arg3) is a valid expression ensures - #is_set() == true - calls to this->operator() will call function_object(arg1,arg2,arg3) !*/ template < typename T, typename T1, typename A1, typename T2, typename A2, typename T3, typename A3> void set ( T& object, void (T::*funct)(T1,T2,T3), A1& arg1, A2& arg2, A3& arg3 ); /*! requires - funct == a valid member function pointer for class T ensures - #is_set() == true - calls to this->operator() will call (object.*funct)(arg1,arg2,arg3) !*/ template < typename T, typename T1, typename A1, typename T2, typename A2, typename T3, typename A3> void set ( const T& object, void (T::*funct)(T1,T2,T3)const, A1& arg1, A2& arg2, A3& arg3 ); /*! requires - funct == a valid bound function pointer for class T ensures - #is_set() == true - calls to this->operator() will call (object.*funct)(arg1,arg2,arg3) !*/ template void set ( void (*funct)(T1,T2,T3), A1& arg1, A2& arg2, A3& arg3 ); /*! requires - funct == a valid function pointer ensures - #is_set() == true - calls to this->operator() will call funct(arg1,arg2,arg3) !*/ // ---------------------- template void set ( F& function_object, A1& arg1, A2& arg2, A3& arg3, A4& arg4 ); /*! requires - function_object(arg1,arg2,arg3,arg4) is a valid expression ensures - #is_set() == true - calls to this->operator() will call function_object(arg1,arg2,arg3,arg4) !*/ template < typename T, typename T1, typename A1, typename T2, typename A2, typename T3, typename A3, typename T4, typename A4> void set ( T& object, void (T::*funct)(T1,T2,T3,T4), A1& arg1, A2& arg2, A3& arg3, A4& arg4 ); /*! requires - funct == a valid member function pointer for class T ensures - #is_set() == true - calls to this->operator() will call (object.*funct)(arg1,arg2,arg3,arg4) !*/ template < typename T, typename T1, typename A1, typename T2, typename A2, typename T3, typename A3, typename T4, typename A4> void set ( const T& object, void (T::*funct)(T1,T2,T3,T4)const, A1& arg1, A2& arg2, A3& arg3, A4& arg4 ); /*! requires - funct == a valid bound function pointer for class T ensures - #is_set() == true - calls to this->operator() will call (object.*funct)(arg1,arg2,arg3,arg4) !*/ template void set ( void (*funct)(T1,T2,T3,T4), A1& arg1, A2& arg2, A3& arg3, A4& arg4 ); /*! requires - funct == a valid function pointer ensures - #is_set() == true - calls to this->operator() will call funct(arg1,arg2,arg3,arg4) !*/ }; // ---------------------------------------------------------------------------------------- inline void swap ( bound_function_pointer& a, bound_function_pointer& b ) { a.swap(b); } /*! provides a global swap function !*/ // ---------------------------------------------------------------------------------------- } #endif // DLIB_BOUND_FUNCTION_POINTER_KERNEl_ABSTRACT_ ================================================ FILE: benchmarks/dlib/bound_function_pointer.h ================================================ // Copyright (C) 2008 Davis E. King (davis@dlib.net) // License: Boost Software License See LICENSE.txt for the full license. #ifndef DLIB_BOUND_FUNCTION_POINTEr_ #define DLIB_BOUND_FUNCTION_POINTEr_ #include "bound_function_pointer/bound_function_pointer_kernel_1.h" #endif // DLIB_BOUND_FUNCTION_POINTEr_ ================================================ FILE: benchmarks/dlib/byte_orderer/byte_orderer_kernel_1.h ================================================ // Copyright (C) 2006 Davis E. King (davis@dlib.net) // License: Boost Software License See LICENSE.txt for the full license. #ifndef DLIB_BYTE_ORDEREr_KERNEL_1_ #define DLIB_BYTE_ORDEREr_KERNEL_1_ #include "byte_orderer_kernel_abstract.h" #include "../algs.h" #include "../assert.h" namespace dlib { class byte_orderer { /*! INITIAL VALUE - if (this machine is little endian) then - little_endian == true - else - little_endian == false CONVENTION - host_is_big_endian() == !little_endian - host_is_little_endian() == little_endian - if (this machine is little endian) then - little_endian == true - else - little_endian == false !*/ public: // this is here for backwards compatibility with older versions of dlib. typedef byte_orderer kernel_1a; byte_orderer ( ) { // This will probably never be false but if it is then it means chars are not 8bits // on this system. Which is a problem for this object. COMPILE_TIME_ASSERT(sizeof(short) >= 2); unsigned long temp = 1; unsigned char* ptr = reinterpret_cast(&temp); if (*ptr == 1) little_endian = true; else little_endian = false; } virtual ~byte_orderer ( ){} bool host_is_big_endian ( ) const { return !little_endian; } bool host_is_little_endian ( ) const { return little_endian; } template < typename T > inline void host_to_network ( T& item ) const { if (little_endian) flip(item); } template < typename T > inline void network_to_host ( T& item ) const { if (little_endian) flip(item); } template < typename T > void host_to_big ( T& item ) const { if (little_endian) flip(item); } template < typename T > void big_to_host ( T& item ) const { if (little_endian) flip(item); } template < typename T > void host_to_little ( T& item ) const { if (!little_endian) flip(item); } template < typename T > void little_to_host ( T& item ) const { if (!little_endian) flip(item); } private: template < typename T, size_t size > inline void flip ( T (&array)[size] ) const /*! ensures - flips the bytes in every element of this array !*/ { for (size_t i = 0; i < size; ++i) { flip(array[i]); } } template < typename T > inline void flip ( T& item ) const /*! ensures - reverses the byte ordering in item !*/ { DLIB_ASSERT_HAS_STANDARD_LAYOUT(T); T value; // If you are getting this as an error then you are probably using // this object wrong. If you think you aren't then send me (Davis) an // email and I'll either set you straight or change/remove this check so // your stuff works :) COMPILE_TIME_ASSERT(sizeof(T) <= sizeof(long double)); // If you are getting a compile error on this line then it means T is // a pointer type. It doesn't make any sense to byte swap pointers // since they have no meaning outside the context of their own process. // So you probably just forgot to dereference that pointer before passing // it to this function :) COMPILE_TIME_ASSERT(is_pointer_type::value == false); const size_t size = sizeof(T); unsigned char* const ptr = reinterpret_cast(&item); unsigned char* const ptr_temp = reinterpret_cast(&value); for (size_t i = 0; i < size; ++i) ptr_temp[size-i-1] = ptr[i]; item = value; } bool little_endian; }; // make flip not do anything at all for chars template <> inline void byte_orderer::flip ( char& ) const {} template <> inline void byte_orderer::flip ( unsigned char& ) const {} template <> inline void byte_orderer::flip ( signed char& ) const {} } #endif // DLIB_BYTE_ORDEREr_KERNEL_1_ ================================================ FILE: benchmarks/dlib/byte_orderer/byte_orderer_kernel_abstract.h ================================================ // Copyright (C) 2006 Davis E. King (davis@dlib.net) // License: Boost Software License See LICENSE.txt for the full license. #undef DLIB_BYTE_ORDEREr_ABSTRACT_ #ifdef DLIB_BYTE_ORDEREr_ABSTRACT_ #include "../algs.h" namespace dlib { class byte_orderer { /*! INITIAL VALUE This object has no state. WHAT THIS OBJECT REPRESENTS This object simply provides a mechanism to convert data from a host machine's own byte ordering to big or little endian and to also do the reverse. It also provides a pair of functions to convert to/from network byte order where network byte order is big endian byte order. This pair of functions does the exact same thing as the host_to_big() and big_to_host() functions and is provided simply so that client code can use the most self documenting name appropriate. Also note that this object is capable of correctly flipping the contents of arrays when the arrays are declared on the stack. e.g. You can say things like: int array[10]; bo.host_to_network(array); !*/ public: byte_orderer ( ); /*! ensures - #*this is properly initialized throws - std::bad_alloc !*/ virtual ~byte_orderer ( ); /*! ensures - any resources associated with *this have been released !*/ bool host_is_big_endian ( ) const; /*! ensures - if (the host computer is a big endian machine) then - returns true - else - returns false !*/ bool host_is_little_endian ( ) const; /*! ensures - if (the host computer is a little endian machine) then - returns true - else - returns false !*/ template < typename T > void host_to_network ( T& item ) const; /*! ensures - #item == the value of item converted from host byte order to network byte order. !*/ template < typename T > void network_to_host ( T& item ) const; /*! ensures - #item == the value of item converted from network byte order to host byte order. !*/ template < typename T > void host_to_big ( T& item ) const; /*! ensures - #item == the value of item converted from host byte order to big endian byte order. !*/ template < typename T > void big_to_host ( T& item ) const; /*! ensures - #item == the value of item converted from big endian byte order to host byte order. !*/ template < typename T > void host_to_little ( T& item ) const; /*! ensures - #item == the value of item converted from host byte order to little endian byte order. !*/ template < typename T > void little_to_host ( T& item ) const; /*! ensures - #item == the value of item converted from little endian byte order to host byte order. !*/ }; } #endif // DLIB_BYTE_ORDEREr_ABSTRACT_ ================================================ FILE: benchmarks/dlib/byte_orderer.h ================================================ // Copyright (C) 2006 Davis E. King (davis@dlib.net) // License: Boost Software License See LICENSE.txt for the full license. #ifndef DLIB_BYTE_ORDEREr_ #define DLIB_BYTE_ORDEREr_ #include "byte_orderer/byte_orderer_kernel_1.h" #endif // DLIB_BYTE_ORDEREr_ ================================================ FILE: benchmarks/dlib/cassert ================================================ #include "dlib_include_path_tutorial.txt" ================================================ FILE: benchmarks/dlib/config.h ================================================ // If you are compiling dlib as a shared library and installing it somewhere on your system // then it is important that any programs that use dlib agree on the state of the // DLIB_ASSERT statements (i.e. they are either always on or always off). Therefore, // uncomment one of the following lines to force all DLIB_ASSERTs to either always on or // always off. If you don't define one of these two macros then DLIB_ASSERT will toggle // automatically depending on the state of certain other macros, which is not what you want // when creating a shared library. // #define ENABLE_ASSERTS // asserts always enabled /* #undef DLIB_DISABLE_ASSERTS */ /* #undef DLIB_ISO_CPP_ONLY */ /* #undef DLIB_NO_GUI_SUPPORT */ #define DLIB_ENABLE_STACK_TRACE #define LAPACK_FORCE_UNDERSCORE /* #undef LAPACK_FORCE_NOUNDERSCORE */ // You should also consider telling dlib to link against libjpeg, libpng, libgif, fftw, CUDA, // and a BLAS and LAPACK library. To do this you need to uncomment the following #defines. #define DLIB_JPEG_SUPPORT #define DLIB_PNG_SUPPORT /* #undef DLIB_GIF_SUPPORT */ /* #undef DLIB_USE_FFTW */ #define DLIB_USE_BLAS #define DLIB_USE_LAPACK /* #undef DLIB_USE_CUDA */ /* #undef DLIB_USE_MKL_FFT */ // This variable allows dlib/test_for_odr_violations.h to catch people who mistakenly use // headers from one version of dlib with a compiled dlib binary from a different dlib version. // #define DLIB_CHECK_FOR_VERSION_MISMATCH DLIB_VERSION_MISMATCH_CHECK__EXPECTED_VERSION_19_21_99 ================================================ FILE: benchmarks/dlib/console_progress_indicator.h ================================================ // Copyright (C) 2010 Davis E. King (davis@dlib.net) // License: Boost Software License See LICENSE.txt for the full license. #ifndef DLIB_CONSOLE_PROGRESS_INDiCATOR_Hh_ #define DLIB_CONSOLE_PROGRESS_INDiCATOR_Hh_ #include #include #include #include namespace dlib { // ---------------------------------------------------------------------------------------- class console_progress_indicator { /*! WHAT THIS OBJECT REPRESENTS This object is a tool for reporting how long a task will take to complete. For example, consider the following bit of code: console_progress_indicator pbar(100) for (int i = 1; i <= 100; ++i) { pbar.print_status(i); long_running_operation(); } The above code will print a message to the console each iteration which shows how much time is remaining until the loop terminates. !*/ public: inline explicit console_progress_indicator ( double target_value ); /*! ensures - #target() == target_value !*/ inline void reset ( double target_value ); /*! ensures - #target() == target_value - performs the equivalent of: *this = console_progress_indicator(target_value) (i.e. resets this object with a new target value) !*/ inline double target ( ) const; /*! ensures - This object attempts to measure how much time is left until we reach a certain targeted value. This function returns that targeted value. !*/ inline bool print_status ( double cur, bool always_print = false ); /*! ensures - print_status() assumes it is called with values which are linearly approaching target(). It will attempt to predict how much time is remaining until cur becomes equal to target(). - prints a status message to the screen which indicates how much more time is left until cur is equal to target() - if (always_print) then - This function prints to the screen each time it is called. - else - This function throttles the printing so that at most 1 message is printed each second. Note that it won't print anything to the screen until about one second has elapsed. This means that the first call to print_status() never prints to the screen. - This function returns true if it prints to the screen and false otherwise. !*/ private: double target_val; time_t start_time; double first_val; double seen_first_val; time_t last_time; }; // ---------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------- // IMPLEMENTATION DETAILS // ---------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------- console_progress_indicator:: console_progress_indicator ( double target_value ) : target_val(target_value), start_time(0), first_val(0), seen_first_val(false), last_time(0) { } // ---------------------------------------------------------------------------------------- bool console_progress_indicator:: print_status ( double cur, bool always_print ) { const time_t cur_time = std::time(0); // if this is the first time print_status has been called // then collect some information and exit. We will print status // on the next call. if (!seen_first_val) { start_time = cur_time; last_time = cur_time; first_val = cur; seen_first_val = true; return false; } if (cur_time != last_time || always_print) { last_time = cur_time; double delta_t = static_cast(cur_time - start_time); double delta_val = std::abs(cur - first_val); // don't do anything if cur is equal to first_val if (delta_val < std::numeric_limits::epsilon()) return false; double seconds = delta_t/delta_val * std::abs(target_val - cur); std::ios::fmtflags oldflags = std::cout.flags(); std::cout.setf(std::ios::fixed,std::ios::floatfield); std::streamsize ss; if (seconds < 60) { ss = std::cout.precision(0); std::cout << "Time remaining: " << seconds << " seconds. \r" << std::flush; } else if (seconds < 60*60) { ss = std::cout.precision(2); std::cout << "Time remaining: " << seconds/60 << " minutes. \r" << std::flush; } else { ss = std::cout.precision(2); std::cout << "Time remaining: " << seconds/60/60 << " hours. \r" << std::flush; } // restore previous output flags and precision settings std::cout.flags(oldflags); std::cout.precision(ss); return true; } return false; } // ---------------------------------------------------------------------------------------- double console_progress_indicator:: target ( ) const { return target_val; } // ---------------------------------------------------------------------------------------- void console_progress_indicator:: reset ( double target_value ) { *this = console_progress_indicator(target_value); } // ---------------------------------------------------------------------------------------- } #endif // DLIB_CONSOLE_PROGRESS_INDiCATOR_Hh_ ================================================ FILE: benchmarks/dlib/cstring ================================================ #include "dlib_include_path_tutorial.txt" ================================================ FILE: benchmarks/dlib/dlib_basic_cpp_build_tutorial.txt ================================================ #error "Don't write #include in your code." /* In C++, it is generally an error to #include .cpp files. This is because it can lead to what are called multiply defined symbol errors. Therefore, you should compile dlib/all/source.cpp into your application just like you would compile any other .cpp file. If you are using Visual Studio you add .cpp files to your application using the solution explorer window. Specifically, right click on Source Files, then select Add -> Existing Item and select the .cpp files you want to add. For general information on compiling dlib see http://dlib.net/compile.html */ ================================================ FILE: benchmarks/dlib/dlib_include_path_tutorial.txt ================================================ #error "Don't put the dlib folder in your include path" /* You are getting this error because you have added the dlib folder to your compiler's include search path. You should *NOT* add the dlib folder itself to your compiler's include path. Doing so will cause the build to fail because of name collisions (such as dlib/string.h and string.h from the standard library). Instead you should add the folder that contains the dlib folder to your include search path and then use include statements of the form #include or #include "dlib/queue.h". This will ensure that everything builds correctly. XCode: The XCode IDE often puts all folders that it knows about into the compiler search path. So if you are using XCode then either don't drag the whole dlib folder into the project or alternatively modify your XCode project settings to not auto-add all folders to the include path. Instead just make sure that the dlib folder is itself inside a folder in your include path. */ ================================================ FILE: benchmarks/dlib/enable_if.h ================================================ // Copyright 2003 (C) The Trustees of Indiana University. // Use, modification, and distribution is subject to the Boost Software // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // Authors: Jaakko Jarvi (jajarvi at osl.iu.edu) // Jeremiah Willcock (jewillco at osl.iu.edu) // Andrew Lumsdaine (lums at osl.iu.edu) #ifndef DLIB_BOOST_UTILITY_ENABLE_IF_HPP #define DLIB_BOOST_UTILITY_ENABLE_IF_HPP namespace dlib { template struct enable_if_c { typedef T type; }; template struct enable_if_c {}; template struct enable_if : public enable_if_c {}; template struct lazy_enable_if_c { typedef typename T::type type; }; template struct lazy_enable_if_c {}; template struct lazy_enable_if : public lazy_enable_if_c {}; template struct disable_if_c { typedef T type; }; template struct disable_if_c {}; template struct disable_if : public disable_if_c {}; template struct lazy_disable_if_c { typedef typename T::type type; }; template struct lazy_disable_if_c {}; template struct lazy_disable_if : public lazy_disable_if_c {}; } // namespace dlib #endif // DLIB_BOOST_UTILITY_ENABLE_IF_HPP ================================================ FILE: benchmarks/dlib/error.h ================================================ // Copyright (C) 2003 Davis E. King (davis@dlib.net) // License: Boost Software License See LICENSE.txt for the full license. #ifndef DLIB_ERROr_ #define DLIB_ERROr_ #include #include // for std::bad_alloc #include #include #include #include // ------------------------------- // ------ exception classes ------ // ------------------------------- namespace dlib { // ---------------------------------------------------------------------------------------- enum error_type { EPORT_IN_USE, ETIMEOUT, ECONNECTION, ELISTENER, ERESOLVE, EMONITOR, ECREATE_THREAD, ECREATE_MUTEX, ECREATE_SIGNALER, EUNSPECIFIED, EGENERAL_TYPE1, EGENERAL_TYPE2, EGENERAL_TYPE3, EINVALID_OPTION, ETOO_FEW_ARGS, ETOO_MANY_ARGS, ESOCKET, ETHREAD, EGUI, EFATAL, EBROKEN_ASSERT, EIMAGE_LOAD, EDIR_CREATE, EINCOMPATIBLE_OPTIONS, EMISSING_REQUIRED_OPTION, EINVALID_OPTION_ARG, EMULTIPLE_OCCURANCES, ECONFIG_READER, EIMAGE_SAVE, ECAST_TO_STRING, ESTRING_CAST, EUTF8_TO_UTF32, EOPTION_PARSE }; // ---------------------------------------------------------------------------------------- // the base exception class class error : public std::exception { /*! WHAT THIS OBJECT REPRESENTS This is the base exception class for the dlib library. i.e. all exceptions in this library inherit from this class. !*/ public: error( error_type t, const std::string& a ): info(a), type(t) {} /*! ensures - #type == t - #info == a !*/ error( error_type t ): type(t) {} /*! ensures - #type == t - #info == "" !*/ error( const std::string& a ): info(a), type(EUNSPECIFIED) {} /*! ensures - #type == EUNSPECIFIED - #info == a !*/ error( ): type(EUNSPECIFIED) {} /*! ensures - #type == EUNSPECIFIED - #info == "" !*/ virtual ~error( ) throw() {} /*! ensures - does nothing !*/ const char* what( ) const throw() /*! ensures - if (info.size() != 0) then - returns info.c_str() - else - returns type_to_string(type) !*/ { if (info.size() > 0) return info.c_str(); else return type_to_string(); } const char* type_to_string ( ) const throw() /*! ensures - returns a string that names the contents of the type member. !*/ { if ( type == EPORT_IN_USE) return "EPORT_IN_USE"; else if ( type == ETIMEOUT) return "ETIMEOUT"; else if ( type == ECONNECTION) return "ECONNECTION"; else if ( type == ELISTENER) return "ELISTENER"; else if ( type == ERESOLVE) return "ERESOLVE"; else if ( type == EMONITOR) return "EMONITOR"; else if ( type == ECREATE_THREAD) return "ECREATE_THREAD"; else if ( type == ECREATE_MUTEX) return "ECREATE_MUTEX"; else if ( type == ECREATE_SIGNALER) return "ECREATE_SIGNALER"; else if ( type == EUNSPECIFIED) return "EUNSPECIFIED"; else if ( type == EGENERAL_TYPE1) return "EGENERAL_TYPE1"; else if ( type == EGENERAL_TYPE2) return "EGENERAL_TYPE2"; else if ( type == EGENERAL_TYPE3) return "EGENERAL_TYPE3"; else if ( type == EINVALID_OPTION) return "EINVALID_OPTION"; else if ( type == ETOO_FEW_ARGS) return "ETOO_FEW_ARGS"; else if ( type == ETOO_MANY_ARGS) return "ETOO_MANY_ARGS"; else if ( type == ESOCKET) return "ESOCKET"; else if ( type == ETHREAD) return "ETHREAD"; else if ( type == EGUI) return "EGUI"; else if ( type == EFATAL) return "EFATAL"; else if ( type == EBROKEN_ASSERT) return "EBROKEN_ASSERT"; else if ( type == EIMAGE_LOAD) return "EIMAGE_LOAD"; else if ( type == EDIR_CREATE) return "EDIR_CREATE"; else if ( type == EINCOMPATIBLE_OPTIONS) return "EINCOMPATIBLE_OPTIONS"; else if ( type == EMISSING_REQUIRED_OPTION) return "EMISSING_REQUIRED_OPTION"; else if ( type == EINVALID_OPTION_ARG) return "EINVALID_OPTION_ARG"; else if ( type == EMULTIPLE_OCCURANCES) return "EMULTIPLE_OCCURANCES"; else if ( type == ECONFIG_READER) return "ECONFIG_READER"; else if ( type == EIMAGE_SAVE) return "EIMAGE_SAVE"; else if ( type == ECAST_TO_STRING) return "ECAST_TO_STRING"; else if ( type == ESTRING_CAST) return "ESTRING_CAST"; else if ( type == EUTF8_TO_UTF32) return "EUTF8_TO_UTF32"; else if ( type == EOPTION_PARSE) return "EOPTION_PARSE"; else return "undefined error type"; } const std::string info; // info about the error const error_type type; // the type of the error private: const error& operator=(const error&); }; // ---------------------------------------------------------------------------------------- class fatal_error : public error { /*! WHAT THIS OBJECT REPRESENTS As the name says, this object represents some kind of fatal error. That is, it represents an unrecoverable error and any program that throws this exception is, by definition, buggy and needs to be fixed. Note that a fatal_error exception can only be thrown once. The second time an application attempts to construct a fatal_error it will be immediately aborted and an error message will be printed to std::cerr. The reason for this is because the first fatal_error was apparently ignored so the second fatal_error is going to make itself impossible to ignore by calling abort. The lesson here is that you should not try to ignore fatal errors. This is also the exception thrown by the DLIB_ASSERT and DLIB_CASSERT macros. !*/ public: fatal_error( error_type t, const std::string& a ): error(t,a) {check_for_previous_fatal_errors();} /*! ensures - #type == t - #info == a !*/ fatal_error( error_type t ): error(t) {check_for_previous_fatal_errors();} /*! ensures - #type == t - #info == "" !*/ fatal_error( const std::string& a ): error(EFATAL,a) {check_for_previous_fatal_errors();} /*! ensures - #type == EFATAL - #info == a !*/ fatal_error( ): error(EFATAL) {check_for_previous_fatal_errors();} /*! ensures - #type == EFATAL - #info == "" !*/ private: static inline char* message () { static char buf[2000]; buf[1999] = '\0'; // just to be extra safe return buf; } static inline void dlib_fatal_error_terminate ( ) { std::cerr << "\n**************************** FATAL ERROR DETECTED ****************************"; std::cerr << message() << std::endl; std::cerr << "******************************************************************************\n" << std::endl; } void check_for_previous_fatal_errors() { // If dlib is being use to create plugins for some other application, like // MATLAB, then don't do these checks since it terminates the over arching // system. Just let the errors go to the plugin handler and it will deal with // them. #if defined(MATLAB_MEX_FILE) || defined(DLIB_NO_ABORT_ON_2ND_FATAL_ERROR) return; #else static bool is_first_fatal_error = true; if (is_first_fatal_error == false) { std::cerr << "\n\n ************************** FATAL ERROR DETECTED ************************** " << std::endl; std::cerr << " ************************** FATAL ERROR DETECTED ************************** " << std::endl; std::cerr << " ************************** FATAL ERROR DETECTED ************************** \n" << std::endl; std::cerr << "Two fatal errors have been detected, the first was inappropriately ignored. \n" << "To prevent further fatal errors from being ignored this application will be \n" << "terminated immediately and you should go fix this buggy program.\n\n" << "The error message from this fatal error was:\n" << this->what() << "\n\n" << std::endl; using namespace std; assert(false); abort(); } else { // copy the message into the fixed message buffer so that it can be recalled by dlib_fatal_error_terminate // if needed. char* msg = message(); unsigned long i; for (i = 0; i < 2000-1 && i < this->info.size(); ++i) msg[i] = info[i]; msg[i] = '\0'; // set this termination handler so that if the user doesn't catch this dlib::fatal_error that is being // thrown then it will eventually be printed to standard error std::set_terminate(&dlib_fatal_error_terminate); } is_first_fatal_error = false; #endif } }; // ---------------------------------------------------------------------------------------- class gui_error : public error { public: gui_error( error_type t, const std::string& a ): error(t,a) {} /*! ensures - #type == t - #info == a !*/ gui_error( error_type t ): error(t) {} /*! ensures - #type == t - #info == "" !*/ gui_error( const std::string& a ): error(EGUI,a) {} /*! ensures - #type == EGUI - #info == a !*/ gui_error( ): error(EGUI) {} /*! ensures - #type == EGUI - #info == "" !*/ }; // ---------------------------------------------------------------------------------------- class socket_error : public error { public: socket_error( error_type t, const std::string& a ): error(t,a) {} /*! ensures - #type == t - #info == a !*/ socket_error( error_type t ): error(t) {} /*! ensures - #type == t - #info == "" !*/ socket_error( const std::string& a ): error(ESOCKET,a) {} /*! ensures - #type == ESOCKET - #info == a !*/ socket_error( ): error(ESOCKET) {} /*! ensures - #type == ESOCKET - #info == "" !*/ }; // ---------------------------------------------------------------------------------------- class thread_error : public error { public: thread_error( error_type t, const std::string& a ): error(t,a) {} /*! ensures - #type == t - #info == a !*/ thread_error( error_type t ): error(t) {} /*! ensures - #type == t - #info == "" !*/ thread_error( const std::string& a ): error(ETHREAD,a) {} /*! ensures - #type == ETHREAD - #info == a !*/ thread_error( ): error(ETHREAD) {} /*! ensures - #type == ETHREAD - #info == "" !*/ }; // ---------------------------------------------------------------------------------------- class impossible_labeling_error : public dlib::error { /*! WHAT THIS OBJECT REPRESENTS This is the exception thrown by code that trains object detectors (e.g. structural_svm_object_detection_problem) when they detect that the set of truth boxes given to the training algorithm contains some impossible to obtain outputs. This kind of problem can happen when the set of image positions scanned by the underlying object detection method doesn't include the truth rectangle as a possible output. Another possibility is when two truth boxes are very close together and hard coded non-max suppression logic would prevent two boxes in such close proximity from being output. !*/ public: impossible_labeling_error(const std::string& msg) : dlib::error(msg) {}; }; // ---------------------------------------------------------------------------------------- } #endif // DLIB_ERROr_ ================================================ FILE: benchmarks/dlib/float_details.h ================================================ // Copyright (C) 2013 Davis E. King (davis@dlib.net) // License: Boost Software License See LICENSE.txt for the full license. #ifndef DLIB_FLOAT_DEtAILS_Hh_ #define DLIB_FLOAT_DEtAILS_Hh_ #include #include "algs.h" #include namespace dlib { struct float_details { /*! WHAT THIS OBJECT REPRESENTS This object is a tool for converting floating point numbers into an explicit integer representation and then also converting back. In particular, a float_details object represents a floating point number with a 64 bit mantissa and 16 bit exponent. These are stored in the public fields of the same names. The main use of this object is to convert floating point values into a known uniform representation so they can be serialized to an output stream. This allows dlib serialization code to work on any system, regardless of the floating point representation used by the hardware. It also means that, for example, a double can be serialized and then deserialized into a float and it will perform the appropriate conversion. In more detail, this object represents a floating point value equal to mantissa*pow(2,exponent), except when exponent takes on any of the following special values: - is_inf - is_ninf - is_nan These values are used to indicate that the floating point value should be either infinity, negative infinity, or not-a-number respectively. !*/ float_details( int64 man, int16 exp ) : mantissa(man), exponent(exp) {} /*! ensures - #mantissa == man - #exponent == exp !*/ float_details() : mantissa(0), exponent(0) {} /*! ensures - this object represents a floating point value of 0 !*/ float_details ( const double& val) { *this = val; } float_details ( const float& val) { *this = val; } float_details ( const long double& val) { *this = val; } /*! ensures - converts the given value into a float_details representation. This means that converting #*this back into a floating point number should recover the input val. !*/ float_details& operator= ( const double& val) { convert_from_T(val); return *this; } float_details& operator= ( const float& val) { convert_from_T(val); return *this; } float_details& operator= ( const long double& val) { convert_from_T(val); return *this; } /*! ensures - converts the given value into a float_details representation. This means that converting #*this back into a floating point number should recover the input val. !*/ operator double () const { return convert_to_T(); } operator float () const { return convert_to_T(); } operator long double () const { return convert_to_T(); } /*! ensures - converts the contents of this float_details object into a floating point number. !*/ const static int16 is_inf = 32000; const static int16 is_ninf = 32001; const static int16 is_nan = 32002; int64 mantissa; int16 exponent; private: // ---------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------- // IMPLEMENTATION DETAILS // ---------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------- template void convert_from_T ( const T& val ) { mantissa = 0; const int digits = dlib::tmin::digits, 63>::value; if (val == std::numeric_limits::infinity()) { exponent = is_inf; } else if (val == -std::numeric_limits::infinity()) { exponent = is_ninf; } else if (val < std::numeric_limits::infinity()) { int exp; mantissa = static_cast(std::frexp(val, &exp)*(((uint64)1)<>= 8; exponent += 8; } } else { exponent = is_nan; } } template T convert_to_T ( ) const { if (exponent < is_inf) return std::ldexp((T)mantissa, exponent); else if (exponent == is_inf) return std::numeric_limits::infinity(); else if (exponent == is_ninf) return -std::numeric_limits::infinity(); else return std::numeric_limits::quiet_NaN(); } }; } #endif // DLIB_FLOAT_DEtAILS_Hh_ ================================================ FILE: benchmarks/dlib/fstream ================================================ #include "dlib_include_path_tutorial.txt" ================================================ FILE: benchmarks/dlib/hash.h ================================================ // Copyright (C) 2011 Davis E. King (davis@dlib.net) // License: Boost Software License See LICENSE.txt for the full license. #ifndef DLIB_HASh_ #define DLIB_HASh_ #include "general_hash/hash.h" #include "general_hash/random_hashing.h" #include "general_hash/count_bits.h" #endif // DLIB_HASh_ ================================================ FILE: benchmarks/dlib/interfaces/cmd_line_parser_option.h ================================================ // Copyright (C) 2003 Davis E. King (davis@dlib.net) // License: Boost Software License See LICENSE.txt for the full license. #ifndef DLIB_CMD_LINE_PARSER_OPTIOn_ #define DLIB_CMD_LINE_PARSER_OPTIOn_ #include namespace dlib { // ---------------------------------------------------------------------------------------- template < typename charT > class cmd_line_parser_option { /*! POINTERS AND REFERENCES TO INTERNAL DATA None of the functions in cmd_line_parser_option will invalidate pointers or references to internal data when called. WHAT THIS OBJECT REPRESENTS This object represents a command line option. !*/ public: typedef charT char_type; typedef std::basic_string string_type; virtual ~cmd_line_parser_option ( ) = 0; virtual const string_type& name ( ) const = 0; /*! ensures - returns the name of this option !*/ virtual const string_type& group_name ( ) const = 0; /*! ensures - returns the name of the group this option is in. If no group was set for this option then this function returns "". !*/ virtual const string_type& description ( ) const = 0; /*! ensures - returns the description for this option !*/ virtual unsigned long number_of_arguments( ) const = 0; /*! ensures - returns the number of arguments for this option !*/ virtual unsigned long count( ) const = 0; /*! ensures - returns the number of times this option appears on the command line. !*/ virtual const string_type& argument ( unsigned long arg = 0, unsigned long N = 0 ) const = 0; /*! requires - arg < number_of_arguments() - N < count() ensures - returns the arg-th argument to the Nth occurrence of this option on the command line. !*/ inline operator bool ( ) const { return count() > 0; } /*! ensures - returns true if this option appears on the command line at all !*/ protected: // restricted functions cmd_line_parser_option& operator=(const cmd_line_parser_option&){return *this;} }; // destructor does nothing template < typename charT > cmd_line_parser_option::~cmd_line_parser_option() {} // ---------------------------------------------------------------------------------------- } #endif // DLIB_CMD_LINE_PARSER_OPTIOn_ ================================================ FILE: benchmarks/dlib/interfaces/enumerable.h ================================================ // Copyright (C) 2003 Davis E. King (davis@dlib.net) // License: Boost Software License See LICENSE.txt for the full license. #ifndef DLIB_ENUMERABLe_INTERFACE_ #define DLIB_ENUMERABLe_INTERFACE_ namespace dlib { // ---------------------------------------------------------------------------------------- template < typename T > class enumerable { /*! POINTERS AND REFERENCES TO INTERNAL DATA - if (at_start()) then - all pointers and references to data returned via element() are invalid. - calling move_next() or reset() invalidates pointers and references to data returned via element() and only data returned via element(). - calling at_start(), current_element_valid(), size(), or element() does NOT invalidate pointers or references to any internal data. INITIAL VALUE current_element_valid() == false at_start() == true WHAT THIS OBJECT REPRESENTS This object represent an interface for iterating through the elements in a container. It starts out one before the first element in the container. EXAMPLE: The following loops though all elements in the container and prints them to cout. container.reset(); while(container.move_next()) { cout << container.element(); } !*/ public: typedef T type; inline virtual ~enumerable( ) = 0; virtual bool at_start ( ) const = 0; /*! ensures - returns true if *this represents one position before the first element in the container (this would also make the current element invalid) else returns false !*/ virtual void reset ( ) const = 0; /*! ensures - #current_element_valid() == false - #at_start() == true !*/ virtual bool current_element_valid ( ) const = 0; /*! ensures - returns true if we are currently at a valid element else returns false !*/ virtual const T& element ( ) const = 0; /*! requires - current_element_valid() == true ensures - returns a const reference to the current element !*/ virtual T& element ( ) = 0; /*! requires - current_element_valid() == true ensures - returns a non-const reference to the current element !*/ virtual bool move_next ( ) const = 0; /*! ensures - moves to the next element. i.e. #element() will now return the next element in the container - the return value will be equal to #current_element_valid() - #at_start() == false - returns true if there is another element - returns false if there are no more elements in the container !*/ virtual size_t size ( ) const = 0; /*! ensures - returns the number of elements in *this !*/ protected: // restricted functions enumerable& operator=(const enumerable&) {return *this;} // no assignment operator }; // destructor does nothing template enumerable::~enumerable() {} // ---------------------------------------------------------------------------------------- } #endif // DLIB_ENUMERABLe_INTERFACE_ ================================================ FILE: benchmarks/dlib/interfaces/map_pair.h ================================================ // Copyright (C) 2003 Davis E. King (davis@dlib.net) // License: Boost Software License See LICENSE.txt for the full license. #ifndef DLIB_MAP_PAIr_INTERFACE_ #define DLIB_MAP_PAIr_INTERFACE_ namespace dlib { // ---------------------------------------------------------------------------------------- template < typename T1, typename T2 > class map_pair { /*! POINTERS AND REFERENCES TO INTERNAL DATA None of the functions in map_pair will invalidate pointers or references to internal data when called. WHAT THIS OBJECT REPRESENTS this object is used to return the key/value pair used in the map and hash_map containers when using the enumerable interface. note that the enumerable interface is defined in interfaces/enumerable.h !*/ public: typedef T1 key_type; typedef T2 value_type; virtual ~map_pair( )=0; virtual const T1& key( ) const =0; /*! ensures - returns a const reference to the key !*/ virtual const T2& value( ) const =0; /*! ensures - returns a const reference to the value associated with key !*/ virtual T2& value( )=0; /*! ensures - returns a non-const reference to the value associated with key !*/ protected: // restricted functions map_pair& operator=(const map_pair&) {return *this;} // no assignment operator }; // destructor does nothing template map_pair::~map_pair () {} // ---------------------------------------------------------------------------------------- } #endif // DLIB_MAP_PAIr_INTERFACE_ ================================================ FILE: benchmarks/dlib/interfaces/remover.h ================================================ // Copyright (C) 2005 Davis E. King (davis@dlib.net) // License: Boost Software License See LICENSE.txt for the full license. #ifndef DLIB_REMOVER_KERNEl_INTERFACE_ #define DLIB_REMOVER_KERNEl_INTERFACE_ #include namespace dlib { template < typename T > class remover { /*! REQUIREMENTS ON T T is swappable by a global swap() and T must have a default constructor POINTERS AND REFERENCES TO INTERNAL DATA The size() function does not invalidate pointers or references to internal data. All other functions have no such guarantee. WHAT THIS OBJECT REPRESENTS This object represents some generalized interface for removing single items from container classes. !*/ public: typedef T type; virtual ~remover( ); /*! ensures - all resources associated with *this have been released. !*/ virtual void remove_any ( T& item ) = 0; /*! requires - size() != 0 ensures - #size() == size() - 1 - removes an element from *this and swaps it into item. - if (*this implements the enumerable interface) then - #at_start() == true !*/ virtual size_t size ( ) const = 0; /*! ensures - returns the number of elements in *this !*/ protected: // restricted functions remover& operator=(const remover&) {return *this;} // assignment operator }; // ---------------------------------------------------------------------------------------- template < typename T, typename compare > class asc_remover : public remover { /*! REQUIREMENTS ON T T is swappable by a global swap() and T must have a default constructor and T must be comparable by compare where compare is a functor compatible with std::less WHAT THIS OBJECT REPRESENTS This object represents the same thing as remover except that remove_any() will remove elements in ascending order according to the compare functor. !*/ public: typedef compare compare_type; protected: // restricted functions asc_remover& operator=(const asc_remover&) {return *this;} // assignment operator }; // ---------------------------------------------------------------------------------------- template < typename domain, typename range > class pair_remover { /*! REQUIREMENTS ON domain domain is swappable by a global swap() and domain must have a default constructor REQUIREMENTS ON range range is swappable by a global swap() and range must have a default constructor POINTERS AND REFERENCES TO INTERNAL DATA The size() function does not invalidate pointers or references to internal data. All other functions have no such guarantee. WHAT THIS OBJECT REPRESENTS This object represents some generalized interface for removing pairs from container classes which enforce some kind of pairing on the elements that they contain. !*/ public: typedef domain domain_type; typedef range range_type; virtual ~pair_remover( ); /*! ensures - all resources associated with *this have been released. !*/ virtual void remove_any ( domain& d, range& r ) = 0; /*! requires - &d != &r (i.e. d and r cannot be the same variable) - size() != 0 ensures - #size() == size() - 1 - removes an element from the domain of *this and swaps it into d. - removes the element in *this's range that is associated with #d and swaps it into r. - if (*this implements the enumerable interface) then - #at_start() == true !*/ virtual size_t size ( ) const = 0; /*! ensures - returns the number of elements in *this !*/ protected: // restricted functions pair_remover& operator=(const pair_remover&) {return *this;} // assignment operator }; // ---------------------------------------------------------------------------------------- template < typename domain, typename range, typename compare > class asc_pair_remover : public pair_remover { /*! REQUIREMENTS ON domain domain is swappable by a global swap() and domain must have a default constructor and domain must be comparable by compare where compare is a functor compatible with std::less REQUIREMENTS ON range range is swappable by a global swap() and range must have a default constructor WHAT THIS OBJECT REPRESENTS This object represents the same thing as pair_remover except that remove_any() will remove domain elements in ascending order according to the compare functor. !*/ public: typedef compare compare_type; protected: // restricted functions asc_pair_remover& operator=(const asc_pair_remover&) {return *this;} // assignment operator }; // ---------------------------------------------------------------------------------------- // destructor does nothing template remover::~remover() {} // destructor does nothing template pair_remover::~pair_remover() {} // ---------------------------------------------------------------------------------------- } #endif // DLIB_REMOVER_KERNEl_INTERFACE_ ================================================ FILE: benchmarks/dlib/iomanip ================================================ #include "dlib_include_path_tutorial.txt" ================================================ FILE: benchmarks/dlib/iosfwd ================================================ #include "dlib_include_path_tutorial.txt" ================================================ FILE: benchmarks/dlib/iostream ================================================ #include "dlib_include_path_tutorial.txt" ================================================ FILE: benchmarks/dlib/is_kind.h ================================================ // Copyright (C) 2007 Davis E. King (davis@dlib.net) // License: Boost Software License See LICENSE.txt for the full license. #ifndef DLIB_IS_KINd_H_ #define DLIB_IS_KINd_H_ #include namespace dlib { /*! This file contains a set of templates that enable you to determine if a given type implements an abstract interface defined in one of the dlib *_abstract.h files. !*/ // ---------------------------------------------------------------------------------------- struct default_is_kind_value { static const bool value = false; }; // ---------------------------------------------------------------------------------------- template struct is_graph : public default_is_kind_value { /*! - if (T is an implementation of graph/graph_kernel_abstract.h) then - is_graph::value == true - else - is_graph::value == false !*/ }; // ---------------------------------------------------------------------------------------- template struct is_directed_graph : public default_is_kind_value { /*! - if (T is an implementation of directed_graph/directed_graph_kernel_abstract.h) then - is_directed_graph::value == true - else - is_directed_graph::value == false !*/ }; // ---------------------------------------------------------------------------------------- template struct is_matrix : public default_is_kind_value { /*! - if (T is some kind of matrix expression from the matrix/matrix_exp_abstract.h component) then - is_matrix::value == true - else - is_matrix::value == false !*/ // Don't set the helper to anything. Just let it be void. ASSERT_ARE_SAME_TYPE(helper,void); }; // ---------------------------------------------------------------------------------------- template struct is_array2d : public default_is_kind_value { /*! - if (T is an implementation of array2d/array2d_kernel_abstract.h) then - is_array2d::value == true - else - is_array2d::value == false !*/ }; // ---------------------------------------------------------------------------------------- template struct is_array : public default_is_kind_value { /*! - if (T is an implementation of array/array_kernel_abstract.h) then - is_array::value == true - else - is_array::value == false !*/ }; // ---------------------------------------------------------------------------------------- template struct is_std_vector : public default_is_kind_value { /*! - if (T is an implementation of the standard C++ std::vector object) then - is_std_vector::value == true - else - is_std_vector::value == false !*/ }; // ---------------------------------------------------------------------------------------- template struct is_pair : public default_is_kind_value { /*! - if (T is a std::pair object) then - is_std_vector::value == true - else - is_std_vector::value == false !*/ }; // ---------------------------------------------------------------------------------------- template struct is_rand : public default_is_kind_value { /*! - if (T is an implementation of rand/rand_kernel_abstract.h) then - is_rand::value == true - else - is_rand::value == false !*/ }; // ---------------------------------------------------------------------------------------- template struct is_config_reader : public default_is_kind_value { /*! - if (T is an implementation of config_reader/config_reader_kernel_abstract.h) then - is_config_reader::value == true - else - is_config_reader::value == false !*/ }; // ---------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------- // Implementation details // ---------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------- template struct is_std_vector > { const static bool value = true; }; template struct is_std_vector { const static bool value = is_std_vector::value; }; template struct is_std_vector{ const static bool value = is_std_vector::value; }; template struct is_std_vector { const static bool value = is_std_vector::value; }; // ---------------------------------------------------------------------------------------- template struct is_pair > { const static bool value = true; }; // ---------------------------------------------------------------------------------------- } #endif // DLIB_IS_KINd_H_ ================================================ FILE: benchmarks/dlib/istream ================================================ #include "dlib_include_path_tutorial.txt" ================================================ FILE: benchmarks/dlib/locale ================================================ #include "dlib_include_path_tutorial.txt" ================================================ FILE: benchmarks/dlib/logger/extra_logger_headers.h ================================================ // Copyright (C) 2006 Davis E. King (davis@dlib.net) // License: Boost Software License See LICENSE.txt for the full license. #ifndef DLIB_EXTRA_LOGGER_HEADERs_ #define DLIB_EXTRA_LOGGER_HEADERs_ #include "logger_kernel_abstract.h" #include "logger_kernel_1.h" #include #include #include "../uintn.h" // ---------------------------------------------------------------------------------------- namespace dlib { void print_datetime_logger_header ( std::ostream& out, const std::string& logger_name, const log_level& l, const uint64 thread_id ); /*! requires - is not called more than once at a time (i.e. is not called from multiple threads at the same time). ensures - let DATE be the current date and time (e.g. Thu Aug 31 16:41:52 2006). - prints a string to out in the form: "l.name (DATE) [thread_id] logger_name:" !*/ } // ---------------------------------------------------------------------------------------- #ifdef NO_MAKEFILE #include "extra_logger_headers.cpp" #endif #endif // DLIB_EXTRA_LOGGER_HEADERs_ ================================================ FILE: benchmarks/dlib/logger/logger_config_file.h ================================================ // Copyright (C) 2007 Davis E. King (davis@dlib.net) // License: Boost Software License See LICENSE.txt for the full license. #ifndef DLIB_LOGGER_CONFIg_FILE_ #define DLIB_LOGGER_CONFIg_FILE_ #include "logger_kernel_abstract.h" #include "logger_kernel_1.h" #include #include "../config_reader.h" // ---------------------------------------------------------------------------------------- namespace dlib { class logger_config_file_error : public error { /*! WHAT THIS OBJECT REPRESENTS This is the exception class used by the configure_loggers_from_file() function defined below. !*/ public: logger_config_file_error(const std::string& s):error(s){} }; void configure_loggers_from_file ( const std::string& file_name ); /*! ensures - configures the loggers with the contents of the file_name file throws - dlib::logger_config_file_error this exception is thrown if there is a problem reading the config file !*/ void configure_loggers_from_file ( const config_reader& cr ); /*! ensures - configures the loggers with the contents of cr. This function is just like the above version that reads from a file except that it reads from an in-memory config_reader instead. throws - dlib::logger_config_file_error this exception is thrown if there is a problem reading the config file !*/ // ---------------------------------------------------------------------------------------- /*! # ----------------------------------------------- # ------------- EXAMPLE CONFIG FILE ------------- # ----------------------------------------------- # The overall format of the config file is the same as the one defined by # the config_reader component of this library. # This line is a comment line # The config file always has a block named logger_config. This is where all the # config data for the loggers reside. logger_config { # This sets all loggers to the level LINFO since it is just inside the # logger_config block logging_level = info # Alternatively we could specify a user defined logging level by # supplying a priority number. The following line would specify # that only logging levels at or above 100 are printed. (note that # you would have to comment out the logging_level statement above # to avoid a conflict). # logging_level = 100 parent_logger { # This sets all loggers named "parent_logger" or children of # loggers with that name to not log at all (i.e. to logging level # LNONE). logging_level = none } parent_logger2 { # set loggers named "parent_logger2" and its children loggers # to write their output to a file named out.txt output = file out.txt child_logger { # Set loggers named "parent_logger2.child_logger" and children of loggers # with this name to logging level LALL logging_level = all # Note that this logger will also log to out.txt because that is what # its parent does and we haven't overridden it here with something else. # if we wanted this logger to write to cout instead we could uncomment # the following line: # output = cout } } } # So in summary, all logger config stuff goes inside a block named logger_config. Then # inside that block all blocks must be the names of loggers. There are only two keys, # logging_level and output. # # The valid values of logging_level are: # "LALL", "LNONE", "LTRACE", "LDEBUG", "LINFO", "LWARN", "LERROR", "LFATAL", # "ALL", "NONE", "TRACE", "DEBUG", "INFO", "WARN", "ERROR", "FATAL", # "all", "none", "trace", "debug", "info", "warn", "error", "fatal", or # any integral value # # The valid values of output are: # "cout", "cerr", "clog", or a string of the form "file some_file_name" # which causes the output to be logged to the specified file. # !*/ } // ---------------------------------------------------------------------------------------- #ifdef NO_MAKEFILE #include "logger_config_file.cpp" #endif #endif // DLIB_LOGGER_CONFIg_FILE_ ================================================ FILE: benchmarks/dlib/logger/logger_kernel_1.h ================================================ // Copyright (C) 2006 Davis E. King (davis@dlib.net) // License: Boost Software License See LICENSE.txt for the full license. #ifndef DLIB_LOGGER_KERNEl_1_ #define DLIB_LOGGER_KERNEl_1_ #include #include #include #include #include #include "../threads.h" #include "../misc_api.h" #include "../set.h" #include "logger_kernel_abstract.h" #include "../algs.h" #include "../assert.h" #include "../uintn.h" #include "../map.h" #include "../member_function_pointer.h" namespace dlib { // ---------------------------------------------------------------------------------------- class log_level { public: log_level( int priority_, const char* name_ ) : priority(priority_) { strncpy(name,name_,19); name[19] = '\0'; } bool operator< (const log_level& rhs) const { return priority < rhs.priority; } bool operator<=(const log_level& rhs) const { return priority <= rhs.priority; } bool operator> (const log_level& rhs) const { return priority > rhs.priority; } bool operator>=(const log_level& rhs) const { return priority >= rhs.priority; } int priority; char name[20]; }; inline std::ostream& operator<< (std::ostream& out, const log_level& item) { out << item.name; return out; } const log_level LALL (std::numeric_limits::min(),"ALL"); const log_level LNONE (std::numeric_limits::max(),"NONE"); const log_level LTRACE(-100,"TRACE"); const log_level LDEBUG(0 ,"DEBUG"); const log_level LINFO (100,"INFO "); const log_level LWARN (200,"WARN "); const log_level LERROR(300,"ERROR"); const log_level LFATAL(400,"FATAL"); // ---------------------------------------------------------------------------------------- void set_all_logging_output_streams ( std::ostream& out ); void set_all_logging_levels ( const log_level& new_level ); typedef void (*print_header_type)( std::ostream& out, const std::string& logger_name, const log_level& l, const uint64 thread_id ); void set_all_logging_headers ( const print_header_type& new_header ); // ---------------------------------------------------------------------------------------- void print_default_logger_header ( std::ostream& out, const std::string& logger_name, const log_level& l, const uint64 thread_id ); template < typename T > void set_all_logging_output_hooks ( T& object, void (T::*hook_)(const std::string& logger_name, const log_level& l, const uint64 thread_id, const char* message_to_log) ); template < typename T > void set_all_logging_output_hooks ( T& object ) { set_all_logging_output_hooks(object, &T::log); } // ---------------------------------------------------------------------------------------- class logger { /*! INITIAL VALUE - print_header == print_default_logger_header - out.rdbuf() == std::cout.rdbuf() - cur_level == LERROR - auto_flush_enabled == true - hook.is_set() == false CONVENTION - print_header == logger_header() - if (hook.is_set() == false) then - out.rdbuf() == output_streambuf() - else - out.rdbuf() == &gd.hookbuf - output_streambuf() == 0 - cur_level == level() - logger_name == name() - auto_flush_enabled == auto_flush() - logger::gd::loggers == a set containing all currently existing loggers. - logger::gd::m == the mutex used to lock everything in the logger - logger::gd::thread_names == a map of thread ids to thread names. - logger::gd::next_thread_name == the next thread name that will be given out to a thread when we find that it isn't already in thread_names. !*/ // ------------------------------------------------------------------------------------ // ------------------------------------------------------------------------------------ class logger_stream { /*! INITIAL VALUE - been_used == false CONVENTION - enabled == is_enabled() - if (been_used) then - logger::gd::m is locked - someone has used the << operator to write something to the output stream. !*/ public: logger_stream ( const log_level& l_, logger& log_ ) : l(l_), log(log_), been_used(false), enabled (l.priority >= log.cur_level.priority) {} inline ~logger_stream( ) { if (!been_used) { return; } else { print_end_of_line(); } } bool is_enabled ( ) const { return enabled; } template inline logger_stream& operator << ( const T& item ) { if (!enabled) { return *this; } else { print_header_and_stuff(); log.out << item; return *this; } } private: void print_header_and_stuff ( ); /*! ensures - if (!been_used) then - prints the logger header - locks log.gd.m - #been_used == true !*/ void print_end_of_line ( ); /*! ensures - prints a newline to log.out - unlocks log.gd.m !*/ const log_level& l; logger& log; bool been_used; const bool enabled; }; // end of class logger_stream // ------------------------------------------------------------------------------------ // ------------------------------------------------------------------------------------ friend class logger_stream; public: typedef member_function_pointer hook_mfp; logger ( const std::string& name_ ); virtual ~logger ( ); const std::string& name ( ) const { return logger_name; } logger_stream operator << ( const log_level& l ) const { return logger_stream(l,const_cast(*this)); } bool is_child_of ( const logger& log ) const { return (name().find(log.name() + ".") == 0) || (log.name() == name()); } const log_level level ( ) const { auto_mutex M(gd.m); return log_level(cur_level); }; void set_level ( const log_level& new_level ) { auto_mutex M(gd.m); gd.loggers.reset(); while (gd.loggers.move_next()) { if (gd.loggers.element()->is_child_of(*this)) gd.loggers.element()->cur_level = new_level; } gd.set_level(logger_name, new_level); } bool auto_flush ( ) const { auto_mutex M(gd.m); return auto_flush_enabled; }; void set_auto_flush ( bool enabled ) { auto_mutex M(gd.m); gd.loggers.reset(); while (gd.loggers.move_next()) { if (gd.loggers.element()->is_child_of(*this)) gd.loggers.element()->auto_flush_enabled = enabled; } gd.set_auto_flush(logger_name, enabled); } std::streambuf* output_streambuf ( ) { auto_mutex M(gd.m); // if there is an output hook set then we are supposed to return 0. if (hook) return 0; else return out.rdbuf(); } template < typename T > void set_output_hook ( T& object, void (T::*hook_)(const std::string& logger_name, const log_level& l, const uint64 thread_id, const char* message_to_log) ) { auto_mutex M(gd.m); hook.set(object, hook_); gd.loggers.reset(); while (gd.loggers.move_next()) { if (gd.loggers.element()->is_child_of(*this)) { gd.loggers.element()->out.rdbuf(&gd.hookbuf); gd.loggers.element()->hook = hook; } } gd.set_output_hook(logger_name, hook); gd.set_output_stream(logger_name, gd.hookbuf); } void set_output_stream ( std::ostream& out_ ) { auto_mutex M(gd.m); gd.loggers.reset(); while (gd.loggers.move_next()) { if (gd.loggers.element()->is_child_of(*this)) { gd.loggers.element()->out.rdbuf(out_.rdbuf()); gd.loggers.element()->hook.clear(); } } gd.set_output_stream(logger_name, out_); hook.clear(); gd.set_output_hook(logger_name, hook); } print_header_type logger_header ( ) const { return print_header; } void set_logger_header ( print_header_type ph ) { auto_mutex M(gd.m); gd.loggers.reset(); while (gd.loggers.move_next()) { if (gd.loggers.element()->is_child_of(*this)) gd.loggers.element()->print_header = ph; } gd.set_logger_header(logger_name, ph); } private: // ------------------------------------------------------------------------------------ // ------------------------------------------------------------------------------------ struct global_data { rmutex m; set::kernel_1b loggers; map::kernel_1b thread_names; uint64 next_thread_name; // Make a very simple streambuf that writes characters into a std::vector. We can // use this as the output target for hooks. The reason we don't just use a std::ostringstream // instead is that this way we can be guaranteed that logging doesn't perform memory allocations. // This is because a std::vector never frees memory. I.e. its capacity() doesn't go down when // you resize it back to 0. It just stays the same. class hook_streambuf : public std::streambuf { public: std::vector buffer; int_type overflow ( int_type c) { if (c != EOF) buffer.push_back(static_cast(c)); return c; } std::streamsize xsputn ( const char* s, std::streamsize num) { buffer.insert(buffer.end(), s, s+num); return num; } }; hook_streambuf hookbuf; global_data ( ); ~global_data( ); uint64 get_thread_name ( ); /*! requires - m is locked ensures - returns a unique id for the calling thread. also makes the number small and nice unlike what you get from get_thread_id() !*/ void thread_end_handler ( ); /*! ensures - removes the terminated thread from thread_names !*/ struct level_container { level_container (); log_level val; map >::kernel_1b_c table; } level_table; const log_level level ( const std::string& name ) const; /*! ensures - returns the level loggers with the given name are supposed to have !*/ void set_level ( const std::string& name, const log_level& new_level ); /*! ensures - for all children C of name: - #level(C) == new_level - if name == "" then - for all loggers L: - #level(L) == new_level !*/ struct auto_flush_container { bool val; map >::kernel_1b_c table; } auto_flush_table; bool auto_flush ( const std::string& name ) const; /*! ensures - returns the auto_flush value loggers with the given name are supposed to have !*/ void set_auto_flush ( const std::string& name, bool enabled ); /*! ensures - for all children C of name: - #auto_flush_enabled(C) == enabled - if name == "" then - for all loggers L: - #auto_flush_enabled(L) == enabled !*/ struct output_streambuf_container { std::streambuf* val; map >::kernel_1b_c table; } streambuf_table; std::streambuf* output_streambuf ( const std::string& name ); /*! ensures - returns the streambuf loggers with the given name are supposed to have !*/ void set_output_stream ( const std::string& name, std::ostream& out_ ); /*! ensures - for all children C of name: - #output_streambuf(C) == out_.rdbuf() - if name == "" then - for all loggers L: - #output_streambuf(L) == out_.rdbuf() !*/ void set_output_stream ( const std::string& name, std::streambuf& buf ); /*! ensures - for all children C of name: - #output_streambuf(C) == &buf - if name == "" then - for all loggers L: - #output_streambuf(L) == &buf !*/ struct output_hook_container { hook_mfp val; map >::kernel_1b_c table; } hook_table; hook_mfp output_hook ( const std::string& name ); /*! ensures - returns the hook loggers with the given name are supposed to have !*/ void set_output_hook ( const std::string& name, const hook_mfp& hook ); /*! ensures - for all children C of name: - #output_hook(C) == hook - if name == "" then - for all loggers L: - #output_hook(L) == hook !*/ struct logger_header_container { print_header_type val; map >::kernel_1b_c table; } header_table; print_header_type logger_header ( const std::string& name ); /*! ensures - returns the header function loggers with the given name are supposed to have !*/ void set_logger_header ( const std::string& name, print_header_type ph ); /*! ensures - for all children C of name: - #logger_header(C) == ph - if name == "" then - for all loggers L: - #logger_header(L) == ph !*/ }; // end of struct global_data static global_data& get_global_data(); // ------------------------------------------------------------------------------------ // ------------------------------------------------------------------------------------ friend void set_all_logging_levels ( const log_level& new_level ); friend void set_all_logging_headers ( const print_header_type& new_header ); friend void set_all_logging_output_streams ( std::ostream& out ); template < typename T > friend void set_all_logging_output_hooks ( T& object, void (T::*hook_)(const std::string& logger_name, const log_level& l, const uint64 thread_id, const char* message_to_log) ) { logger::hook_mfp hook; // There is a bug in one of the versions (but not all apparently) of // Visual studio 2005 that causes it to error out if isn't in the // following line of code. However, there is also a bug in gcc-3.3 // that causes it to error out if is present. So this works around // this problem. #if defined(_MSC_VER) && _MSC_VER == 1400 hook.set(object, hook_); #else hook.set(object, hook_); #endif logger::global_data& gd = logger::get_global_data(); auto_mutex M(gd.m); gd.loggers.reset(); while (gd.loggers.move_next()) { gd.loggers.element()->out.rdbuf(&gd.hookbuf); gd.loggers.element()->hook = hook; } gd.set_output_stream("",gd.hookbuf); gd.set_output_hook("",hook); } // ------------------------------------------------------------------------------------ global_data& gd; const std::string logger_name; print_header_type print_header; bool auto_flush_enabled; std::ostream out; log_level cur_level; hook_mfp hook; // restricted functions logger(const logger&); // copy constructor logger& operator=(const logger&); // assignment operator }; // ---------------------------------------------------------------------------------------- } #ifdef NO_MAKEFILE #include "logger_kernel_1.cpp" #endif #endif // DLIB_LOGGER_KERNEl_1_ ================================================ FILE: benchmarks/dlib/logger/logger_kernel_abstract.h ================================================ // Copyright (C) 2006 Davis E. King (davis@dlib.net) // License: Boost Software License See LICENSE.txt for the full license. #undef DLIB_LOGGER_KERNEl_ABSTRACT_ #ifdef DLIB_LOGGER_KERNEl_ABSTRACT_ #include "../threads.h" #include #include #include #include "../uintn.h" namespace dlib { // ---------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------- class log_level { /*! WHAT THIS OBJECT REPRESENTS This object is a simple named level to log at. It contains a numeric priority and a name to use in the logging messages. !*/ public: log_level( int priority_, const char* name_ ); /*! ensures - #priority = priority_ - the first 19 characters of name_ are copied into name and name is null terminated. !*/ bool operator< (const log_level& rhs) const { return priority < rhs.priority; } bool operator<=(const log_level& rhs) const { return priority <= rhs.priority; } bool operator> (const log_level& rhs) const { return priority > rhs.priority; } bool operator>=(const log_level& rhs) const { return priority >= rhs.priority; } int priority; char name[20]; }; inline std::ostream& operator<< (std::ostream& out, const log_level& item); /*! ensures - performs out << item.name - returns out !*/ // ---------------------------------------------------------------------------------------- const log_level LALL (std::numeric_limits::min(),"ALL"); const log_level LNONE (std::numeric_limits::max(),"NONE"); const log_level LTRACE(-100,"TRACE"); const log_level LDEBUG(0 ,"DEBUG"); const log_level LINFO (100 ,"INFO "); const log_level LWARN (200 ,"WARN "); const log_level LERROR(300 ,"ERROR"); const log_level LFATAL(400 ,"FATAL"); // ---------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------- void set_all_logging_output_streams ( std::ostream& out ); /*! ensures - for all loggers L (even loggers not yet constructed): - #L.output_streambuf() == out.rdbuf() - Removes any previous output hook from L. So now the logger L will write all its messages to the given output stream. throws - std::bad_alloc !*/ // ---------------------------------------------------------------------------------------- typedef void (*print_header_type)( std::ostream& out, const std::string& logger_name, const log_level& l, const uint64 thread_id ); void set_all_logging_headers ( const print_header_type& new_header ); /*! ensures - for all loggers L (even loggers not yet constructed): - #L.logger_header() == new_header throws - std::bad_alloc !*/ // ---------------------------------------------------------------------------------------- template < typename T > void set_all_logging_output_hooks ( T& object, void (T::*hook)(const std::string& logger_name, const log_level& l, const uint64 thread_id, const char* message_to_log) ); /*! ensures - for all loggers L (even loggers not yet constructed): - #L.output_streambuf() == 0 - performs the equivalent to calling L.set_output_hook(object, hook); (i.e. sets all loggers so that they will use the given hook function) throws - std::bad_alloc !*/ template < typename T > void set_all_logging_output_hooks ( T& object ); /*! ensures - calls set_all_logging_output_hooks(object, &T::log); !*/ // ---------------------------------------------------------------------------------------- void set_all_logging_levels ( const log_level& new_level ); /*! ensures - for all loggers L (even loggers not yet constructed): - #L.level() == new_level throws - std::bad_alloc !*/ // ---------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------- void print_default_logger_header ( std::ostream& out, const std::string& logger_name, const log_level& l, const uint64 thread_id ); /*! requires - is not called more than once at a time (i.e. is not called from multiple threads at the same time). ensures - let MS be the number of milliseconds since program start. - prints a string to out in the form: "MS l.name [thread_id] logger_name:" !*/ // ---------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------- class logger { /*! INITIAL VALUE - name() == a user supplied value given to the constructor - The values of level(), output_streambuf(), logger_header(), and auto_flush() are inherited from the parent of this logger. WHAT THIS OBJECT REPRESENTS This object represents a logging output stream in the style of the log4j logger available for Java. Additionally, the logger doesn't perform any memory allocations during each logging action. It just writes directly into the user supplied output stream. Alternatively, if you use a logging output hook no memory allocations are performed either. Logging just goes straight into a memory buffer which gets passed to the user supplied logging hook. DEFAULTS If the user hasn't specified values for the four inherited values level(), output_streambuf(), logger_header(), or auto_flush() then the default values will be used. The defaults are as follows: - level() == LERROR - output_streambuf() == std::cout.rdbuf() (i.e. the default is to log to standard output). - logger_header() == print_default_logger_header - auto_flush() == true THREAD SAFETY All methods of this class are thread safe. Note that it is safe to chain calls to operator << such as: log << LINFO << "message " << variable << " more message"; The logger ensures that the entire statement executes atomically so the message won't be broken up by other loggers in other threads. !*/ class logger_stream { public: bool is_enabled ( ) const; /*! ensures - returns true if this logger stream will print out items given to it by the << operator. returns false otherwise. !*/ template logger_stream& operator << ( const T& item ); /*! ensures - if (is_enabled()) then - writes item to this output stream - returns *this !*/ }; public: logger ( const std::string& name_ ); /*! requires - name_ != "" ensures - #*this is properly initialized - #name() == name_ throws - std::bad_alloc - dlib::thread_error !*/ virtual ~logger ( ); /*! ensures - any resources associated with *this have been released !*/ const std::string& name ( ) const; /*! ensures - returns the name of this logger !*/ logger_stream operator << ( const log_level& l ) const; /*! ensures - if (l.priority >= level().priority) then - returns a logger_stream with is_enabled() == true. I.e. this returned stream will write its output to the I/O destination used by this logger object. - else - returns a logger stream with is_enabled() == false throws - std::bad_alloc !*/ bool is_child_of ( const logger& log ) const; /*! ensures - if ( (name().find(log.name() + ".") == 0) || (log.name() == name()) ) then - returns true (i.e. if log.name() + "." is a prefix of name() or if both *this and log have the same name then return true) - else - returns false !*/ const log_level level ( ) const; /*! ensures - returns the current log level of this logger. !*/ void set_level ( const log_level& new_level ); /*! ensures - for all loggers L such that L.is_child_of(*this) == true: - #L.level() == new_level throws - std::bad_alloc !*/ bool auto_flush ( ); /*! ensures - returns true if the output stream is flushed after every logged message. returns false otherwise. (Note that flushing only does anything if the logger is set to use an output stream rather than a hook) !*/ void set_auto_flush ( bool enabled ); /*! ensures - for all loggers L such that L.is_child_of(*this) == true: - #L.auto_flush() == enabled throws - std::bad_alloc !*/ template < typename T > void set_output_hook ( T& object, void (T::*hook)(const std::string& logger_name, const log_level& l, const uint64 thread_id, const char* message_to_log) ); /*! requires - hook is a valid pointer to a member function in T ensures - for all loggers L such that L.is_child_of(*this) == true: - #L.output_streambuf() == 0 - #L will not send its log messages to an ostream object anymore. Instead it will call the given hook member function (i.e. (object.*hook)(name,l,id,msg) ) for each message that needs to be logged. - The arguments to the hook function have the following meanings: - logger_name == The name of the logger that is printing the log message. - l == The level of the logger that is printing the log message. - thread_id == A number that uniquely identifies the thread trying to log the message. Note that this number is unique among all threads, past and present. Also note that this id is not the same one returned by get_thread_id(). - message_to_log == the actual text of the message the user is giving to the logger object to log. - All hook functions will also only be called one at a time. This means that hook functions don't need to be thread safe. !*/ std::streambuf* output_streambuf ( ); /*! ensures - if (an output hook isn't set) then - returns the output stream buffer that this logger writes all messages to. - else - returns 0 !*/ void set_output_stream ( std::ostream& out ); /*! ensures - for all loggers L such that L.is_child_of(*this) == true: - #L.output_streambuf() == out.rdbuf() - Removes any previous output hook from L. So now the logger L will write all its messages to the given output stream. throws - std::bad_alloc !*/ print_header_type logger_header ( ) const; /*! ensures - returns the function that is called to print the header information onto each logged message. The arguments to the function have the following meanings: - out == The output stream this function writes the header to. - logger_name == The name of the logger that is printing the log message. - l == The level of the logger that is printing the log message. - thread_id == A number that uniquely identifies the thread trying to log the message. Note that this number is unique among all threads, past and present. Also note that this id is not the same one returned by get_thread_id(). - This logger_header function will also only be called once at a time. This means the logger_header function doesn't need to be thread safe. - the logger_header function is only used when output_streambuf() != 0 !*/ void set_logger_header ( print_header_type print_header ); /*! ensures - for all loggers L such that L.is_child_of(*this) == true: - #L.logger_header() == print_header throws - std::bad_alloc !*/ private: // restricted functions logger(const logger&); // copy constructor logger& operator=(const logger&); // assignment operator }; // ---------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------- } #endif // DLIB_LOGGER_KERNEl_ABSTRACT_ ================================================ FILE: benchmarks/dlib/logger.h ================================================ // Copyright (C) 2006 Davis E. King (davis@dlib.net) // License: Boost Software License See LICENSE.txt for the full license. #ifndef DLIB_LOGGEr_ #define DLIB_LOGGEr_ #include "logger/logger_kernel_1.h" #include "logger/extra_logger_headers.h" #include "logger/logger_config_file.h" #endif // DLIB_LOGGEr_ ================================================ FILE: benchmarks/dlib/map/map_kernel_1.h ================================================ // Copyright (C) 2003 Davis E. King (davis@dlib.net) // License: Boost Software License See LICENSE.txt for the full license. #ifndef DLIB_MAP_KERNEl_1_ #define DLIB_MAP_KERNEl_1_ #include "map_kernel_abstract.h" #include "../algs.h" #include "../interfaces/enumerable.h" #include "../interfaces/map_pair.h" #include "../interfaces/remover.h" #include "../serialize.h" namespace dlib { template < typename domain, typename range, typename bst_base, typename mem_manager = default_memory_manager > class map_kernel_1 : public enumerable >, public asc_pair_remover { /*! REQUIREMENTS ON BST_BASE bst_base is instantiated with domain and range and implements binary_search_tree/binary_search_tree_kernel_abstract.h INITIAL VALUE bst has its initial value CONVENTION bst.size() == the number of elements in the map and the elements in map are stored in bst_base !*/ public: typedef domain domain_type; typedef range range_type; typedef typename bst_base::compare_type compare_type; typedef mem_manager mem_manager_type; map_kernel_1( ) {} virtual ~map_kernel_1( ) {} inline void clear( ); inline void add ( domain& d, range& r ); inline bool is_in_domain ( const domain& d ) const; inline void remove_any ( domain& d, range& r ); inline void remove ( const domain& d, domain& d_copy, range& r ); inline void destroy ( const domain& d ); inline range& operator[] ( const domain& d ); inline const range& operator[] ( const domain& d ) const; inline void swap ( map_kernel_1& item ); // functions from the enumerable interface inline size_t size ( ) const; inline bool at_start ( ) const; inline void reset ( ) const; inline bool current_element_valid ( ) const; inline const map_pair& element ( ) const; inline map_pair& element ( ); inline bool move_next ( ) const; private: bst_base bst; // restricted functions map_kernel_1(map_kernel_1&); map_kernel_1& operator= ( map_kernel_1&); }; template < typename domain, typename range, typename bst_base, typename mem_manager > inline void swap ( map_kernel_1& a, map_kernel_1& b ) { a.swap(b); } template < typename domain, typename range, typename bst_base, typename mem_manager > void deserialize ( map_kernel_1& item, std::istream& in ) { try { item.clear(); unsigned long size; deserialize(size,in); domain d; range r; for (unsigned long i = 0; i < size; ++i) { deserialize(d,in); deserialize(r,in); item.add(d,r); } } catch (serialization_error& e) { item.clear(); throw serialization_error(e.info + "\n while deserializing object of type map_kernel_1"); } } // ---------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------- // member function definitions // ---------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------- template < typename domain, typename range, typename bst_base, typename mem_manager > void map_kernel_1:: clear ( ) { bst.clear(); } // ---------------------------------------------------------------------------------------- template < typename domain, typename range, typename bst_base, typename mem_manager > void map_kernel_1:: add( domain& d, range& r ) { // try to add pair to bst_base bst.add(d,r); } // ---------------------------------------------------------------------------------------- template < typename domain, typename range, typename bst_base, typename mem_manager > bool map_kernel_1:: is_in_domain( const domain& d ) const { return (bst[d] != 0); } // ---------------------------------------------------------------------------------------- template < typename domain, typename range, typename bst_base, typename mem_manager > void map_kernel_1:: remove_any( domain& d, range& r ) { bst.remove_any(d,r); } // ---------------------------------------------------------------------------------------- template < typename domain, typename range, typename bst_base, typename mem_manager > void map_kernel_1:: remove ( const domain& d, domain& d_copy, range& r ) { bst.remove(d,d_copy,r); } // ---------------------------------------------------------------------------------------- template < typename domain, typename range, typename bst_base, typename mem_manager > void map_kernel_1:: destroy ( const domain& d ) { bst.destroy(d); } // ---------------------------------------------------------------------------------------- template < typename domain, typename range, typename bst_base, typename mem_manager > range& map_kernel_1:: operator[]( const domain& d ) { return *bst[d]; } // ---------------------------------------------------------------------------------------- template < typename domain, typename range, typename bst_base, typename mem_manager > const range& map_kernel_1:: operator[]( const domain& d ) const { return *bst[d]; } // ---------------------------------------------------------------------------------------- template < typename domain, typename range, typename bst_base, typename mem_manager > size_t map_kernel_1:: size ( ) const { return bst.size(); } // ---------------------------------------------------------------------------------------- template < typename domain, typename range, typename bst_base, typename mem_manager > void map_kernel_1:: swap ( map_kernel_1& item ) { bst.swap(item.bst); } // ---------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------- // enumerable function definitions // ---------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------- template < typename domain, typename range, typename bst_base, typename mem_manager > bool map_kernel_1:: at_start ( ) const { return bst.at_start(); } // ---------------------------------------------------------------------------------------- template < typename domain, typename range, typename bst_base, typename mem_manager > void map_kernel_1:: reset ( ) const { bst.reset(); } // ---------------------------------------------------------------------------------------- template < typename domain, typename range, typename bst_base, typename mem_manager > bool map_kernel_1:: current_element_valid ( ) const { return bst.current_element_valid(); } // ---------------------------------------------------------------------------------------- template < typename domain, typename range, typename bst_base, typename mem_manager > const map_pair& map_kernel_1:: element ( ) const { return bst.element(); } // ---------------------------------------------------------------------------------------- template < typename domain, typename range, typename bst_base, typename mem_manager > map_pair& map_kernel_1:: element ( ) { return bst.element(); } // ---------------------------------------------------------------------------------------- template < typename domain, typename range, typename bst_base, typename mem_manager > bool map_kernel_1:: move_next ( ) const { return bst.move_next(); } // ---------------------------------------------------------------------------------------- } #endif // DLIB_MAP_KERNEl_1_ ================================================ FILE: benchmarks/dlib/map/map_kernel_abstract.h ================================================ // Copyright (C) 2003 Davis E. King (davis@dlib.net) // License: Boost Software License See LICENSE.txt for the full license. #undef DLIB_MAP_KERNEl_ABSTRACT_ #ifdef DLIB_MAP_KERNEl_ABSTRACT_ #include "../interfaces/map_pair.h" #include "../interfaces/enumerable.h" #include "../interfaces/remover.h" #include "../serialize.h" #include "../algs.h" #include namespace dlib { template < typename domain, typename range, typename mem_manager = default_memory_manager, typename compare = std::less > class map : public enumerable >, public asc_pair_remover { /*! REQUIREMENTS ON domain domain must be comparable by compare where compare is a functor compatible with std::less and domain is swappable by a global swap() and domain must have a default constructor REQUIREMENTS ON range range is swappable by a global swap() and range must have a default constructor REQUIREMENTS ON mem_manager must be an implementation of memory_manager/memory_manager_kernel_abstract.h or must be an implementation of memory_manager_global/memory_manager_global_kernel_abstract.h or must be an implementation of memory_manager_stateless/memory_manager_stateless_kernel_abstract.h mem_manager::type can be set to anything. POINTERS AND REFERENCES TO INTERNAL DATA swap(), is_in_domain(), and operator[] functions do not invalidate pointers or references to internal data. All other functions have no such guarantee. INITIAL VALUE size() == 0 ENUMERATION ORDER The enumerator will iterate over the domain (and each associated range element) elements in ascending order according to the compare functor. (i.e. the elements are enumerated in sorted order) WHAT THIS OBJECT REPRESENTS map contains items of type domain and range This object is similar an array. It maps items of type domain on to items of type range. Also note that unless specified otherwise, no member functions of this object throw exceptions. definition of equivalent: a is equivalent to b if a < b == false and b < a == false !*/ public: typedef domain domain_type; typedef range range_type; typedef compare compare_type; typedef mem_manager mem_manager_type; map( ); /*! ensures - #*this is properly initialized throws - std::bad_alloc or any exception thrown by domain's or range's constructor. !*/ virtual ~map( ); /*! ensures - all memory associated with *this has been released !*/ void clear( ); /*! ensures - #*this has its initial value throws - std::bad_alloc or any exception thrown by domain's or range's constructor. if this exception is thrown then *this is unusable until clear() is called and succeeds !*/ void add ( domain& d, range& r ); /*! requires - &d != &r (i.e. d and r cannot be the same variable) - is_in_domain(d) == false ensures - #is_in_domain(d) == true - #operator[](d) == r - #d and #r have initial values for their types - #size() == size() + 1 - #at_start() == true throws - std::bad_alloc or any exception thrown by domain's or range's constructor. if add() throws then it has no effect !*/ bool is_in_domain ( const domain& d ) const; /*! ensures - returns whether or not an element equivalent to d is in the domain of *this !*/ void remove ( const domain& d, domain& d_copy, range& r ); /*! requires - &d != &r (i.e. d and r cannot be the same variable) - &d != &d_copy (i.e. d and d_copy cannot be the same variable) - &r != &d_copy (i.e. r and d_copy cannot be the same variable) - is_in_domain(d) == true ensures - #is_in_domain(d) == false - #d_copy is equivalent to d - the element in the range of *this associated with #d_copy has been swapped into #r - #size() == size() - 1 - #at_start() == true !*/ void destroy ( const domain& d ); /*! requires - is_in_domain(d) == true ensures - #is_in_domain(d) == false - #size() == size() - 1 - #at_start() == true !*/ range& operator[] ( const domain& d ); /*! requires - is_in_domain(d) == true ensures - returns a non-const reference to the element in the range of *this associated with the element equivalent to d !*/ const range& operator[] ( const domain& d ) const; /*! requires - is_in_domain(d) == true ensures - returns a const reference to the element in the range of *this associated with the element equivalent to d !*/ void swap ( map& item ); /*! ensures - swaps *this and item !*/ private: // restricted functions map(map&); // copy constructor map& operator=(map&); // assignment operator }; template < typename domain, typename range, typename mem_manager, typename compare > inline void swap ( map& a, map& b ) { a.swap(b); } /*! provides a global swap function !*/ template < typename domain, typename range, typename mem_manager, typename compare > void deserialize ( map& item, std::istream& in ); /*! provides deserialization support !*/ } #endif // DLIB_MAP_KERNEl_ABSTRACT_ ================================================ FILE: benchmarks/dlib/map/map_kernel_c.h ================================================ // Copyright (C) 2003 Davis E. King (davis@dlib.net) // License: Boost Software License See LICENSE.txt for the full license. #ifndef DLIB_MAP_KERNEl_C_ #define DLIB_MAP_KERNEl_C_ #include "map_kernel_abstract.h" #include "../algs.h" #include "../assert.h" #include "../interfaces/map_pair.h" namespace dlib { template < typename map_base > class map_kernel_c : public map_base { typedef typename map_base::domain_type domain; typedef typename map_base::range_type range; public: void add ( domain& d, range& r ); void remove_any ( domain& d, range& r ); void remove ( const domain& d, domain& d_copy, range& r ); void destroy ( const domain& d ); range& operator[] ( const domain& d ); const range& operator[] ( const domain& d ) const; const map_pair& element ( ) const { // make sure requires clause is not broken DLIB_CASSERT(this->current_element_valid() == true, "\tconst map_pair& map::element" << "\n\tyou can't access the current element if it doesn't exist" << "\n\tthis: " << this ); // call the real function return map_base::element(); } map_pair& element ( ) { // make sure requires clause is not broken DLIB_CASSERT(this->current_element_valid() == true, "\tmap_pair& map::element" << "\n\tyou can't access the current element if it doesn't exist" << "\n\tthis: " << this ); // call the real function return map_base::element(); } }; template < typename map_base > inline void swap ( map_kernel_c& a, map_kernel_c& b ) { a.swap(b); } // ---------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------- // member function definitions // ---------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------- template < typename map_base > void map_kernel_c:: add ( domain& d, range& r ) { // make sure requires clause is not broken DLIB_CASSERT( (!this->is_in_domain(d)) && (static_cast(&d) != static_cast(&r)), "\tvoid map::add" << "\n\tdomain element being added must not already be in the map" << "\n\tand d and r must not be the same variable" << "\n\tis_in_domain(d): " << (this->is_in_domain(d) ? "true" : "false") << "\n\tthis: " << this << "\n\t&d: " << static_cast(&d) << "\n\t&r: " << static_cast(&r) ); // call the real function map_base::add(d,r); } // ---------------------------------------------------------------------------------------- template < typename map_base > void map_kernel_c:: remove_any ( domain& d, range& r ) { // make sure requires clause is not broken DLIB_CASSERT( (this->size() > 0) && (static_cast(&d) != static_cast(&r)), "\tvoid map::remove_any" << "\n\tsize() must be greater than zero if something is going to be removed" << "\n\tand d and r must not be the same variable." << "\n\tsize(): " << this->size() << "\n\tthis: " << this << "\n\t&d: " << static_cast(&d) << "\n\t&r: " << static_cast(&r) ); // call the real function map_base::remove_any(d,r); } // ---------------------------------------------------------------------------------------- template < typename map_base > void map_kernel_c:: remove ( const domain& d, domain& d_copy, range& r ) { // make sure requires clause is not broken DLIB_CASSERT( (this->is_in_domain(d)) && (static_cast(&d) != static_cast(&r)) && (static_cast(&r) != static_cast(&d_copy)) && (static_cast(&d) != static_cast(&d_copy)), "\tvoid map::remove" << "\n\tcan't remove something that isn't in the map or if the paremeters actually" << "\n\tare the same variable. Either way can't remove." << "\n\tis_in_domain(d): " << (this->is_in_domain(d) ? "true" : "false") << "\n\tthis: " << this << "\n\t&d: " << static_cast(&d) << "\n\t&r: " << static_cast(&r) << "\n\t&d_copy: " << static_cast(&d_copy) ); // call the real function map_base::remove(d,d_copy,r); } // ---------------------------------------------------------------------------------------- template < typename map_base > void map_kernel_c:: destroy ( const domain& d ) { // make sure requires clause is not broken DLIB_CASSERT(this->is_in_domain(d), "\tvoid map::destroy" << "\n\tcan't remove something that isn't in the map" << "\n\tthis: " << this << "\n\t&d: " << static_cast(&d) ); // call the real function map_base::destroy(d); } // ---------------------------------------------------------------------------------------- template < typename map_base > typename map_base::range_type& map_kernel_c:: operator[] ( const domain& d ) { // make sure requires clause is not broken DLIB_CASSERT( this->is_in_domain(d), "\trange& map::operator[]" << "\n\td must be in the domain of the map" << "\n\tthis: " << this ); // call the real function return map_base::operator[](d); } // ---------------------------------------------------------------------------------------- template < typename map_base > const typename map_base::range_type& map_kernel_c:: operator[] ( const domain& d ) const { // make sure requires clause is not broken DLIB_CASSERT( this->is_in_domain(d), "\tconst range& map::operator[]" << "\n\td must be in the domain of the map" << "\n\tthis: " << this ); // call the real function return map_base::operator[](d); } // ---------------------------------------------------------------------------------------- } #endif // DLIB_MAP_KERNEl_C_ ================================================ FILE: benchmarks/dlib/map.h ================================================ // Copyright (C) 2003 Davis E. King (davis@dlib.net) // License: Boost Software License See LICENSE.txt for the full license. #ifndef DLIB_MAp_ #define DLIB_MAp_ #include "map/map_kernel_1.h" #include "map/map_kernel_c.h" #include "binary_search_tree.h" #include "algs.h" #include namespace dlib { template < typename domain, typename range, typename mem_manager = default_memory_manager, typename compare = std::less > class map { map() {} // a typedef for the binary search tree used by kernel_2 typedef typename binary_search_tree::kernel_1a binary_search_tree_1; // a typedef for the binary search tree used by kernel_2 typedef typename binary_search_tree::kernel_2a binary_search_tree_2; public: //----------- kernels --------------- // kernel_1a typedef map_kernel_1 kernel_1a; typedef map_kernel_c kernel_1a_c; // kernel_1b typedef map_kernel_1 kernel_1b; typedef map_kernel_c kernel_1b_c; }; } #endif // DLIB_MAp_ ================================================ FILE: benchmarks/dlib/member_function_pointer/make_mfp.h ================================================ // Copyright (C) 2011 Davis E. King (davis@dlib.net) // License: Boost Software License See LICENSE.txt for the full license. #ifndef DLIB_MAKE_MFp_H_ #define DLIB_MAKE_MFp_H_ #include "member_function_pointer_kernel_1.h" #include "make_mfp_abstract.h" namespace dlib { // ---------------------------------------------------------------------------------------- template < typename T > member_function_pointer<> make_mfp ( T& object, void (T::*cb)() ) { member_function_pointer<> temp; temp.set(object, cb); return temp; } template < typename T > member_function_pointer<> make_mfp ( const T& object, void (T::*cb)()const ) { member_function_pointer<> temp; temp.set(object, cb); return temp; } // ---------------------------------------------------------------------------------------- template < typename T, typename A1 > member_function_pointer make_mfp ( T& object, void (T::*cb)(A1) ) { member_function_pointer temp; temp.set(object, cb); return temp; } template < typename T, typename A1 > member_function_pointer make_mfp ( const T& object, void (T::*cb)(A1)const ) { member_function_pointer temp; temp.set(object, cb); return temp; } // ---------------------------------------------------------------------------------------- template < typename T, typename A1, typename A2 > member_function_pointer make_mfp ( T& object, void (T::*cb)(A1,A2) ) { member_function_pointer temp; temp.set(object, cb); return temp; } template < typename T, typename A1, typename A2 > member_function_pointer make_mfp ( const T& object, void (T::*cb)(A1,A2)const ) { member_function_pointer temp; temp.set(object, cb); return temp; } // ---------------------------------------------------------------------------------------- template < typename T, typename A1, typename A2, typename A3 > member_function_pointer make_mfp ( T& object, void (T::*cb)(A1,A2,A3) ) { member_function_pointer temp; temp.set(object, cb); return temp; } template < typename T, typename A1, typename A2, typename A3 > member_function_pointer make_mfp ( const T& object, void (T::*cb)(A1,A2,A3)const ) { member_function_pointer temp; temp.set(object, cb); return temp; } // ---------------------------------------------------------------------------------------- template < typename T, typename A1, typename A2, typename A3, typename A4 > member_function_pointer make_mfp ( T& object, void (T::*cb)(A1,A2,A3,A4) ) { member_function_pointer temp; temp.set(object, cb); return temp; } template < typename T, typename A1, typename A2, typename A3, typename A4 > member_function_pointer make_mfp ( const T& object, void (T::*cb)(A1,A2,A3,A4)const ) { member_function_pointer temp; temp.set(object, cb); return temp; } // ---------------------------------------------------------------------------------------- } #endif // DLIB_MAKE_MFp_H_ ================================================ FILE: benchmarks/dlib/member_function_pointer/make_mfp_abstract.h ================================================ // Copyright (C) 2011 Davis E. King (davis@dlib.net) // License: Boost Software License See LICENSE.txt for the full license. #undef DLIB_MAKE_MFp_ABSTRACT_ #ifdef DLIB_MAKE_MFp_ABSTRACT_ #include "member_function_pointer_kernel_abstract.h" namespace dlib { // ---------------------------------------------------------------------------------------- template < typename T > member_function_pointer<> make_mfp ( T& object, void (T::*cb)() ); /*! requires - cb == a valid member function pointer for class T ensures - returns a member function pointer object MFP such that: - MFP.is_set() == true - calls to MFP() will call (object.*cb)() !*/ template < typename T > member_function_pointer<> make_mfp ( const T& object, void (T::*cb)()const ); /*! requires - cb == a valid member function pointer for class T ensures - returns a member function pointer object MFP such that: - MFP.is_set() == true - calls to MFP() will call (object.*cb)() !*/ // ---------------------------------------------------------------------------------------- template < typename T, typename A1 > member_function_pointer make_mfp ( T& object, void (T::*cb)(A1 a1) ); /*! requires - cb == a valid member function pointer for class T ensures - returns a member function pointer object MFP such that: - MFP.is_set() == true - calls to MFP(a1) will call (object.*cb)(a1) !*/ template < typename T, typename A1 > member_function_pointer make_mfp ( const T& object, void (T::*cb)(A1 a1)const ); /*! requires - cb == a valid member function pointer for class T ensures - returns a member function pointer object MFP such that: - MFP.is_set() == true - calls to MFP(a1) will call (object.*cb)(a1) !*/ // ---------------------------------------------------------------------------------------- template < typename T, typename A1, typename A2 > member_function_pointer make_mfp ( T& object, void (T::*cb)(A1 a1, A2 a2) ); /*! requires - cb == a valid member function pointer for class T ensures - returns a member function pointer object MFP such that: - MFP.is_set() == true - calls to MFP(a1,a2) will call (object.*cb)(a1,a2) !*/ template < typename T, typename A1, typename A2 > member_function_pointer make_mfp ( const T& object, void (T::*cb)(A1 a1, A2 a2)const ); /*! requires - cb == a valid member function pointer for class T ensures - returns a member function pointer object MFP such that: - MFP.is_set() == true - calls to MFP(a1,a2) will call (object.*cb)(a1,a2) !*/ // ---------------------------------------------------------------------------------------- template < typename T, typename A1, typename A2, typename A3 > member_function_pointer make_mfp ( T& object, void (T::*cb)(A1 a1, A2 a2, A3 a3) ); /*! requires - cb == a valid member function pointer for class T ensures - returns a member function pointer object MFP such that: - MFP.is_set() == true - calls to MFP(a1,a2,a3) will call (object.*cb)(a1,a2,a3) !*/ template < typename T, typename A1, typename A2, typename A3 > member_function_pointer make_mfp ( const T& object, void (T::*cb)(A1 a1, A2 a2, A3 a3)const ); /*! requires - cb == a valid member function pointer for class T ensures - returns a member function pointer object MFP such that: - MFP.is_set() == true - calls to MFP(a1,a2,a3) will call (object.*cb)(a1,a2,a3) !*/ // ---------------------------------------------------------------------------------------- template < typename T, typename A1, typename A2, typename A3, typename A4 > member_function_pointer make_mfp ( T& object, void (T::*cb)(A1 a1, A2 a2, A3 a3, A4 a4) ); /*! requires - cb == a valid member function pointer for class T ensures - returns a member function pointer object MFP such that: - MFP.is_set() == true - calls to MFP(a1,a2,a3,a4) will call (object.*cb)(a1,a2,a3,a4) !*/ template < typename T, typename A1, typename A2, typename A3, typename A4 > member_function_pointer make_mfp ( const T& object, void (T::*cb)(A1 a1, A2 a2, A3 a3, A4 a4)const ); /*! requires - cb == a valid member function pointer for class T ensures - returns a member function pointer object MFP such that: - MFP.is_set() == true - calls to MFP(a1,a2,a3,a4) will call (object.*cb)(a1,a2,a3,a4) !*/ // ---------------------------------------------------------------------------------------- } #endif // DLIB_MAKE_MFp_ABSTRACT_ ================================================ FILE: benchmarks/dlib/member_function_pointer/member_function_pointer_kernel_1.h ================================================ // Copyright (C) 2005 Davis E. King (davis@dlib.net) // License: Boost Software License See LICENSE.txt for the full license. #ifndef DLIB_MEMBER_FUNCTION_POINTER_KERNEl_1_ #define DLIB_MEMBER_FUNCTION_POINTER_KERNEl_1_ #include "../algs.h" #include "member_function_pointer_kernel_abstract.h" #include "../enable_if.h" #include namespace dlib { // ---------------------------------------------------------------------------------------- template < typename PARAM1 = void, typename PARAM2 = void, typename PARAM3 = void, typename PARAM4 = void > class member_function_pointer; // ---------------------------------------------------------------------------------------- #define DLIB_MFP_SC DLIB_ASSERT(cb != 0, \ "\tvoid member_function_pointer::set" \ << "\n\tthe member function pointer can't be null" \ << "\n\tthis: " << this ); #define DLIB_MFP_OC DLIB_ASSERT(this->is_set() == true , \ "\tvoid member_function_pointer::operator()" \ << "\n\tYou must call set() before you can use this function" \ << "\n\tthis: " << this); // ---------------------------------------------------------------------------------------- template class mfp_kernel_1_base_class { /* All member function pointer classes inherit from this class. This is where most of the things in a member function pointer are defined. The reason for the num_args template argument to this class is to prevent any sort of implicit casting between derived member function pointer classes that take different numbers of arguments. */ protected: enum mfp_type { mfp_nonconst, mfp_const, mfp_null}; class mp_base_base { public: mp_base_base(void* ptr, mfp_type type_) : o(ptr),type(type_) {} virtual ~mp_base_base(){} virtual void clone(void* ptr) const = 0; virtual bool is_same (const mp_base_base* item) const = 0; bool is_set () const { return o!=0; } void* const o; const mfp_type type; }; template class mp_null : public mp_base_base { public: typedef void (T::*mfp_pointer_type)() ; mp_null (void* , mfp_pointer_type ) : mp_base_base(0,mfp_null), callback(0) {} mp_null () : mp_base_base(0,mfp_null), callback(0) {} const mfp_pointer_type callback; }; template class mp_impl_T : public mp_impl { /* This class supplies the implementations clone() and is_same() for any classes that inherit from mp_base_base. It does this in a very roundabout way... */ public: typedef typename mp_impl::mfp_pointer_type mfp_pointer_type; mp_impl_T() : mp_impl(0,0) {} mp_impl_T(void* ptr, mfp_pointer_type cb) : mp_impl(ptr,cb) {} template void safe_clone(stack_based_memory_block& buf) { // This is here just to validate the assumption that our block of memory we have made // in mp_memory is the right size to store the data for this object. If you // get a compiler error on this line then email me :) COMPILE_TIME_ASSERT(sizeof(mp_impl_T) <= mem_size); clone(buf.get()); } void clone (void* ptr) const { new(ptr) mp_impl_T(this->o,this->callback); } bool is_same (const mp_base_base* item) const { if (item->o == 0 && this->o == 0) { return true; } else if (item->o == this->o && this->type == item->type) { const mp_impl* i = reinterpret_cast(item); return (i->callback == this->callback); } return false; } }; // MSVC with the /vms option, we get C2287 since the dummy class requires virtual // inheritance. Adding the __virtual_inheritance specifier explicitly fixes the issue, // but then Clang-CL no longer accepts it. #if defined(_MSC_VER) && !defined(__clang__) #define DLIB_MSVC_INHERITANCE_VIRTUAL __virtual_inheritance #else #define DLIB_MSVC_INHERITANCE_VIRTUAL #endif struct dummy_base { virtual void nonnull() {}; virtual ~dummy_base(){}; int a; }; struct DLIB_MSVC_INHERITANCE_VIRTUAL dummy : virtual public dummy_base{ void nonnull() {}; }; #undef DLIB_MSVC_INHERITANCE_VIRTUAL typedef mp_impl_T > mp_null_impl; public: mfp_kernel_1_base_class ( const mfp_kernel_1_base_class& item ) { item.mp()->clone(mp_memory.get()); } mfp_kernel_1_base_class ( ) { mp_null_impl().safe_clone(mp_memory); } bool operator == ( const mfp_kernel_1_base_class& item ) const { return mp()->is_same(item.mp()); } bool operator != ( const mfp_kernel_1_base_class& item ) const { return !(*this == item); } mfp_kernel_1_base_class& operator= ( const mfp_kernel_1_base_class& item ) { mfp_kernel_1_base_class(item).swap(*this); return *this; } ~mfp_kernel_1_base_class ( ) { destroy_mp_memory(); } void clear( ) { mfp_kernel_1_base_class().swap(*this); } bool is_set ( ) const { return mp()->is_set(); } private: typedef void (dummy::*safe_bool)(); public: operator safe_bool () const { return is_set() ? &dummy::nonnull : 0; } bool operator!() const { return !is_set(); } void swap ( mfp_kernel_1_base_class& item ) { // make a temp copy of item mfp_kernel_1_base_class temp(item); // destory the stuff in item item.destroy_mp_memory(); // copy *this into item mp()->clone(item.mp_memory.get()); // destory the stuff in this destroy_mp_memory(); // copy temp into *this temp.mp()->clone(mp_memory.get()); } protected: // The reason for adding 1 here is because visual studio 2003 will sometimes // try to compile this code with sizeof(mp_null_impl) == 0 (which is a bug in visual studio). // Fortunately, no actual real instances of this template seem to end up with that screwed up // value so everything works fine if we just add 1 so that this degenerate case doesn't cause // trouble. Note that we know it all works fine because safe_clone() checks the size of this // memory block whenever the member function pointer is used. stack_based_memory_block mp_memory; void destroy_mp_memory ( ) { // Honestly this probably doesn't even do anything but I'm putting // it here just for good measure. mp()->~mp_base_base(); } mp_base_base* mp () { return static_cast(mp_memory.get()); } const mp_base_base* mp () const { return static_cast(mp_memory.get()); } }; // ---------------------------------------------------------------------------------------- template <> class member_function_pointer : public mfp_kernel_1_base_class<0> { class mp_base : public mp_base_base { public: mp_base(void* ptr, mfp_type type_) : mp_base_base(ptr,type_) {} virtual void call() const = 0; }; template class mp_impl : public mp_base { public: typedef void (T::*mfp_pointer_type)() ; void call () const { (static_cast(this->o)->*callback)(); } mp_impl ( void* object, mfp_pointer_type cb) : mp_base(object, mfp_nonconst), callback(cb) {} const mfp_pointer_type callback; }; template class mp_impl_const : public mp_base { public: typedef void ((T::*mfp_pointer_type)()const); void call () const { (static_cast(this->o)->*callback)(); } mp_impl_const ( void* object, mfp_pointer_type cb) : mp_base(object,mfp_const), callback(cb) {} const mfp_pointer_type callback; }; public: typedef void param1_type; typedef void param2_type; typedef void param3_type; typedef void param4_type; // These two typedefs are here for backwards compatibility with previous versions // of dlib. typedef member_function_pointer kernel_1a; typedef member_function_pointer kernel_1a_c; void operator() () const { DLIB_MFP_OC; static_cast(mp_memory.get())->call(); } // the reason for putting disable_if on this function is that it avoids an overload // resolution bug in visual studio. template typename disable_if,void>::type set(T& object, typename mp_impl::mfp_pointer_type cb) { DLIB_MFP_SC; destroy_mp_memory(); mp_impl_T >(&object,cb).safe_clone(mp_memory); } template void set(const T& object, typename mp_impl_const::mfp_pointer_type cb) { DLIB_MFP_SC; destroy_mp_memory(); mp_impl_T >((void*)&object,cb).safe_clone(mp_memory); } }; // ---------------------------------------------------------------------------------------- template < typename PARAM1 > class member_function_pointer : public mfp_kernel_1_base_class<1> { class mp_base : public mp_base_base { public: mp_base(void* ptr, mfp_type type_) : mp_base_base(ptr,type_) {} virtual void call(PARAM1) const = 0; }; template class mp_impl : public mp_base { public: typedef void (T::*mfp_pointer_type)(PARAM1) ; void call (PARAM1 p1) const { (static_cast(this->o)->*callback)(p1); } mp_impl ( void* object, mfp_pointer_type cb) : mp_base(object, mfp_nonconst), callback(cb) {} const mfp_pointer_type callback; }; template class mp_impl_const : public mp_base { public: typedef void ((T::*mfp_pointer_type)(PARAM1)const); void call (PARAM1 p1) const { (static_cast(this->o)->*callback)(p1); } mp_impl_const ( void* object, mfp_pointer_type cb) : mp_base(object,mfp_const), callback(cb) {} const mfp_pointer_type callback; }; public: typedef PARAM1 param1_type; typedef void param2_type; typedef void param3_type; typedef void param4_type; // These two typedefs are here for backwards compatibility with previous versions // of dlib. typedef member_function_pointer kernel_1a; typedef member_function_pointer kernel_1a_c; void operator() (PARAM1 p1) const { DLIB_MFP_OC; static_cast(mp_memory.get())->call(p1); } // the reason for putting disable_if on this function is that it avoids an overload // resolution bug in visual studio. template typename disable_if,void>::type set(T& object, typename mp_impl::mfp_pointer_type cb) { DLIB_MFP_SC; destroy_mp_memory(); mp_impl_T >(&object,cb).safe_clone(mp_memory); } template void set(const T& object, typename mp_impl_const::mfp_pointer_type cb) { DLIB_MFP_SC; destroy_mp_memory(); mp_impl_T >((void*)&object,cb).safe_clone(mp_memory); } }; // ---------------------------------------------------------------------------------------- template < typename PARAM1, typename PARAM2 > class member_function_pointer : public mfp_kernel_1_base_class<2> { class mp_base : public mp_base_base { public: mp_base(void* ptr, mfp_type type_) : mp_base_base(ptr,type_) {} virtual void call(PARAM1,PARAM2) const = 0; }; template class mp_impl : public mp_base { public: typedef void (T::*mfp_pointer_type)(PARAM1,PARAM2) ; void call (PARAM1 p1, PARAM2 p2) const { (static_cast(this->o)->*callback)(p1,p2); } mp_impl ( void* object, mfp_pointer_type cb) : mp_base(object, mfp_nonconst), callback(cb) {} const mfp_pointer_type callback; }; template class mp_impl_const : public mp_base { public: typedef void ((T::*mfp_pointer_type)(PARAM1,PARAM2)const); void call (PARAM1 p1, PARAM2 p2) const { (static_cast(this->o)->*callback)(p1,p2); } mp_impl_const ( void* object, mfp_pointer_type cb) : mp_base(object,mfp_const), callback(cb) {} const mfp_pointer_type callback; }; public: typedef PARAM1 param1_type; typedef PARAM2 param2_type; typedef void param3_type; typedef void param4_type; // These two typedefs are here for backwards compatibility with previous versions // of dlib. typedef member_function_pointer kernel_1a; typedef member_function_pointer kernel_1a_c; void operator() (PARAM1 p1, PARAM2 p2) const { DLIB_MFP_OC; static_cast(mp_memory.get())->call(p1,p2); } // the reason for putting disable_if on this function is that it avoids an overload // resolution bug in visual studio. template typename disable_if,void>::type set(T& object, typename mp_impl::mfp_pointer_type cb) { DLIB_MFP_SC; destroy_mp_memory(); mp_impl_T >(&object,cb).safe_clone(mp_memory); } template void set(const T& object, typename mp_impl_const::mfp_pointer_type cb) { DLIB_MFP_SC; destroy_mp_memory(); mp_impl_T >((void*)&object,cb).safe_clone(mp_memory); } }; // ---------------------------------------------------------------------------------------- template < typename PARAM1, typename PARAM2, typename PARAM3 > class member_function_pointer : public mfp_kernel_1_base_class<3> { class mp_base : public mp_base_base { public: mp_base(void* ptr, mfp_type type_) : mp_base_base(ptr,type_) {} virtual void call(PARAM1,PARAM2,PARAM3) const = 0; }; template class mp_impl : public mp_base { public: typedef void (T::*mfp_pointer_type)(PARAM1,PARAM2,PARAM3) ; void call (PARAM1 p1, PARAM2 p2, PARAM3 p3) const { (static_cast(this->o)->*callback)(p1,p2,p3); } mp_impl ( void* object, mfp_pointer_type cb) : mp_base(object, mfp_nonconst), callback(cb) {} const mfp_pointer_type callback; }; template class mp_impl_const : public mp_base { public: typedef void ((T::*mfp_pointer_type)(PARAM1,PARAM2,PARAM3)const); void call (PARAM1 p1, PARAM2 p2, PARAM3 p3) const { (static_cast(this->o)->*callback)(p1,p2,p3); } mp_impl_const ( void* object, mfp_pointer_type cb) : mp_base(object,mfp_const), callback(cb) {} const mfp_pointer_type callback; }; public: typedef PARAM1 param1_type; typedef PARAM2 param2_type; typedef PARAM3 param3_type; typedef void param4_type; // These two typedefs are here for backwards compatibility with previous versions // of dlib. typedef member_function_pointer kernel_1a; typedef member_function_pointer kernel_1a_c; void operator() (PARAM1 p1, PARAM2 p2, PARAM3 p3) const { DLIB_MFP_OC; static_cast(mp_memory.get())->call(p1,p2,p3); } // the reason for putting disable_if on this function is that it avoids an overload // resolution bug in visual studio. template typename disable_if,void>::type set(T& object, typename mp_impl::mfp_pointer_type cb) { DLIB_MFP_SC; destroy_mp_memory(); mp_impl_T >(&object,cb).safe_clone(mp_memory); } template void set(const T& object, typename mp_impl_const::mfp_pointer_type cb) { DLIB_MFP_SC; destroy_mp_memory(); mp_impl_T >((void*)&object,cb).safe_clone(mp_memory); } }; // ---------------------------------------------------------------------------------------- template < typename PARAM1, typename PARAM2, typename PARAM3, typename PARAM4 > class member_function_pointer : public mfp_kernel_1_base_class<4> { class mp_base : public mp_base_base { public: mp_base(void* ptr, mfp_type type_) : mp_base_base(ptr,type_) {} virtual void call(PARAM1,PARAM2,PARAM3,PARAM4) const = 0; }; template class mp_impl : public mp_base { public: typedef void (T::*mfp_pointer_type)(PARAM1,PARAM2,PARAM3, PARAM4) ; void call (PARAM1 p1, PARAM2 p2, PARAM3 p3, PARAM4 p4) const { (static_cast(this->o)->*callback)(p1,p2,p3,p4); } mp_impl ( void* object, mfp_pointer_type cb) : mp_base(object, mfp_nonconst), callback(cb) {} const mfp_pointer_type callback; }; template class mp_impl_const : public mp_base { public: typedef void ((T::*mfp_pointer_type)(PARAM1,PARAM2,PARAM3,PARAM4)const); void call (PARAM1 p1, PARAM2 p2, PARAM3 p3, PARAM4 p4) const { (static_cast(this->o)->*callback)(p1,p2,p3,p4); } mp_impl_const ( void* object, mfp_pointer_type cb) : mp_base(object,mfp_const), callback(cb) {} const mfp_pointer_type callback; }; public: typedef PARAM1 param1_type; typedef PARAM2 param2_type; typedef PARAM3 param3_type; typedef PARAM4 param4_type; // These two typedefs are here for backwards compatibility with previous versions // of dlib. typedef member_function_pointer kernel_1a; typedef member_function_pointer kernel_1a_c; void operator() (PARAM1 p1, PARAM2 p2, PARAM3 p3, PARAM4 p4) const { DLIB_MFP_OC; static_cast(mp_memory.get())->call(p1,p2,p3,p4); } // the reason for putting disable_if on this function is that it avoids an overload // resolution bug in visual studio. template typename disable_if,void>::type set(T& object, typename mp_impl::mfp_pointer_type cb) { DLIB_MFP_SC; destroy_mp_memory(); mp_impl_T >(&object,cb).safe_clone(mp_memory); } template void set(const T& object, typename mp_impl_const::mfp_pointer_type cb) { DLIB_MFP_SC; destroy_mp_memory(); mp_impl_T >((void*)&object,cb).safe_clone(mp_memory); } }; // ---------------------------------------------------------------------------------------- } #endif // DLIB_MEMBER_FUNCTION_POINTER_KERNEl_1_ ================================================ FILE: benchmarks/dlib/member_function_pointer/member_function_pointer_kernel_abstract.h ================================================ // Copyright (C) 2005 Davis E. King (davis@dlib.net) // License: Boost Software License See LICENSE.txt for the full license. #undef DLIB_MEMBER_FUNCTION_POINTER_KERNEl_ABSTRACT_ #ifdef DLIB_MEMBER_FUNCTION_POINTER_KERNEl_ABSTRACT_ namespace dlib { // ---------------------------------------------------------------------------------------- template < typename PARAM1 = void, typename PARAM2 = void, typename PARAM3 = void, typename PARAM4 = void > class member_function_pointer; // ---------------------------------------------------------------------------------------- template <> class member_function_pointer { /*! INITIAL VALUE is_set() == false WHAT THIS OBJECT REPRESENTS This object represents a member function pointer. It is useful because instances of this object can be created without needing to know the type of object whose member function we will be calling. There are five template specializations of this object. The first represents a pointer to a member function taking no parameters, the second represents a pointer to a member function taking one parameter, the third to one taking two parameters, and so on. You specify the parameters to your member function pointer by filling in the PARAM template parameters. For example: To use a pointer to a function with no parameters you would say: member_function_pointer<> my_pointer; To use a pointer to a function that takes a single int you would say: member_function_pointer my_pointer; To use a pointer to a function that takes an int and then a reference to a string you would say: member_function_pointer my_pointer; Also note that the formal comments are only present for the first template specialization. They are all exactly the same except for the number of parameters each takes in its member function pointer. !*/ public: typedef void param1_type; typedef void param2_type; typedef void param3_type; typedef void param4_type; member_function_pointer ( ); /*! ensures - #*this is properly initialized !*/ member_function_pointer( const member_function_pointer& item ); /*! ensures - *this == item !*/ ~member_function_pointer ( ); /*! ensures - any resources associated with *this have been released !*/ member_function_pointer& operator=( const member_function_pointer& item ); /*! ensures - *this == item !*/ bool operator == ( const member_function_pointer& item ) const; /*! ensures - if (is_set() == false && item.is_set() == false) then - returns true - else if (both *this and item point to the same member function in the same object instance) then - returns true - else - returns false !*/ bool operator != ( const member_function_pointer& item ) const; /*! ensures - returns !(*this == item) !*/ void clear( ); /*! ensures - #*this has its initial value !*/ bool is_set ( ) const; /*! ensures - if (this->set() has been called) then - returns true - else - returns false !*/ template < typename T > void set ( T& object, void (T::*cb)() ); /*! requires - cb == a valid member function pointer for class T ensures - #is_set() == true - calls to this->operator() will call (object.*cb)() !*/ template < typename T > void set ( const T& object, void (T::*cb)()const ); /*! requires - cb == a valid member function pointer for class T ensures - #is_set() == true - calls to this->operator() will call (object.*cb)() !*/ operator some_undefined_pointer_type ( ) const; /*! ensures - if (is_set()) then - returns a non 0 value - else - returns a 0 value !*/ bool operator! ( ) const; /*! ensures - returns !is_set() !*/ void operator () ( ) const; /*! requires - is_set() == true ensures - calls the member function on the object specified by the last call to this->set() throws - any exception thrown by the member function specified by the previous call to this->set(). If any of these exceptions are thrown then the call to this function will have no effect on *this. !*/ void swap ( member_function_pointer& item ); /*! ensures - swaps *this and item !*/ }; // ---------------------------------------------------------------------------------------- template < typename PARAM1 > class member_function_pointer { public: typedef PARAM1 param1_type; typedef void param2_type; typedef void param3_type; typedef void param4_type; member_function_pointer (); member_function_pointer( const member_function_pointer& item ); ~member_function_pointer ( ); member_function_pointer& operator=( const member_function_pointer& item ); bool operator == ( const member_function_pointer& item ) const; bool operator != ( const member_function_pointer& item ) const; void clear(); bool is_set () const; template void set ( T& object, void (T::*cb)(PARAM1) ); template void set ( const T& object, void (T::*cb)(PARAM1)const ); operator some_undefined_pointer_type ( ) const; bool operator! ( ) const; void operator () ( PARAM1 param1 ) const; void swap ( member_function_pointer& item ); }; // ---------------------------------------------------------------------------------------- template < typename PARAM1, typename PARAM2 > class member_function_pointer { public: typedef PARAM1 param1_type; typedef PARAM2 param2_type; typedef void param3_type; typedef void param4_type; member_function_pointer (); member_function_pointer( const member_function_pointer& item ); ~member_function_pointer ( ); member_function_pointer& operator=( const member_function_pointer& item ); bool operator == ( const member_function_pointer& item ) const; bool operator != ( const member_function_pointer& item ) const; void clear(); bool is_set () const; template void set ( T& object, void (T::*cb)(PARAM1,PARAM2) ); template void set ( const T& object, void (T::*cb)(PARAM1,PARAM2)const ); operator some_undefined_pointer_type ( ) const; bool operator! ( ) const; void operator () ( PARAM1 param1, PARAM2 param2 ) const; void swap ( member_function_pointer& item ); }; // ---------------------------------------------------------------------------------------- template < typename PARAM1, typename PARAM2, typename PARAM3 > class member_function_pointer { public: typedef PARAM1 param1_type; typedef PARAM2 param2_type; typedef PARAM3 param3_type; typedef void param4_type; member_function_pointer (); member_function_pointer( const member_function_pointer& item ); ~member_function_pointer ( ); member_function_pointer& operator=( const member_function_pointer& item ); bool operator == ( const member_function_pointer& item ) const; bool operator != ( const member_function_pointer& item ) const; void clear(); bool is_set () const; template void set ( T& object, void (T::*cb)(PARAM1,PARAM2,PARAM3) ); template void set ( const T& object, void (T::*cb)(PARAM1,PARAM2,PARAM3)const ); operator some_undefined_pointer_type ( ) const; bool operator! ( ) const; void operator () ( PARAM1 param1, PARAM2 param2, PARAM2 param3 ) const; void swap ( member_function_pointer& item ); }; // ---------------------------------------------------------------------------------------- template < typename PARAM1, typename PARAM2, typename PARAM3, typename PARAM4 > class member_function_pointer { public: typedef PARAM1 param1_type; typedef PARAM2 param2_type; typedef PARAM3 param3_type; typedef PARAM4 param4_type; member_function_pointer (); member_function_pointer( const member_function_pointer& item ); ~member_function_pointer ( ); member_function_pointer& operator=( const member_function_pointer& item ); bool operator == ( const member_function_pointer& item ) const; bool operator != ( const member_function_pointer& item ) const; void clear(); bool is_set () const; template void set ( T& object, void (T::*cb)(PARAM1,PARAM2,PARAM3,PARAM4) ); template void set ( const T& object, void (T::*cb)(PARAM1,PARAM2,PARAM3,PARAM4)const ); operator some_undefined_pointer_type ( ) const; bool operator! ( ) const; void operator () ( PARAM1 param1, PARAM2 param2, PARAM2 param3, PARAM2 param4 ) const; void swap ( member_function_pointer& item ); }; // ---------------------------------------------------------------------------------------- } #endif // DLIB_MEMBER_FUNCTION_POINTER_KERNEl_ABSTRACT_ ================================================ FILE: benchmarks/dlib/member_function_pointer.h ================================================ // Copyright (C) 2005 Davis E. King (davis@dlib.net) // License: Boost Software License See LICENSE.txt for the full license. #ifndef DLIB_MEMBER_FUNCTION_POINTEr_ #define DLIB_MEMBER_FUNCTION_POINTEr_ #include "member_function_pointer/member_function_pointer_kernel_1.h" #include "member_function_pointer/make_mfp.h" #endif // DLIB_MEMBER_FUNCTION_POINTEr_ ================================================ FILE: benchmarks/dlib/memory_manager/memory_manager_kernel_1.h ================================================ // Copyright (C) 2004 Davis E. King (davis@dlib.net) // License: Boost Software License See LICENSE.txt for the full license. #ifndef DLIB_MEMORY_MANAGER_KERNEl_1_ #define DLIB_MEMORY_MANAGER_KERNEl_1_ #include "../algs.h" #include "memory_manager_kernel_abstract.h" #include "../assert.h" #include namespace dlib { template < typename T, size_t max_pool_size > class memory_manager_kernel_1 { /*! INITIAL VALUE allocations == 0 next == 0 pool_size == 0 REQUIREMENTS ON max_pool_size max_pool_size is the maximum number of nodes we will keep in our linked list at once. So you can put any value in for this argument. CONVENTION This memory manager implementation allocates T objects one at a time when there are allocation requests. Then when there is a deallocate request the returning T object is place into a list of free blocks if that list has less than max_pool_size blocks in it. subsequent allocation requests will be serviced by drawing from the free list whenever it isn't empty. allocations == get_number_of_allocations() - if (next != 0) then - next == the next pointer to return from allocate() and next == pointer to the first node in a linked list. each node is one item in the memory pool. - the last node in the linked list has next set to 0 - pool_size == the number of nodes in the linked list - pool_size <= max_pool_size - else - we need to call new to get the next pointer to return from allocate() !*/ union node { node* next; char item[sizeof(T)]; }; public: typedef T type; template struct rebind { typedef memory_manager_kernel_1 other; }; memory_manager_kernel_1( ) : allocations(0), next(0), pool_size(0) { } virtual ~memory_manager_kernel_1( ) { while (next != 0) { node* temp = next; next = next->next; ::operator delete ( static_cast(temp)); } } size_t get_number_of_allocations ( ) const { return allocations; } T* allocate_array ( size_t size ) { T* temp = new T[size]; ++allocations; return temp; } void deallocate_array ( T* item ) { --allocations; delete [] item; } T* allocate ( ) { T* temp; if (next != 0) { temp = reinterpret_cast(next); node* n = next->next; try { // construct this new T object with placement new. new (static_cast(temp))T(); } catch (...) { next->next = n; throw; } next = n; --pool_size; } else { temp = static_cast(::operator new(sizeof(node))); try { // construct this new T object with placement new. new (static_cast(temp))T(); } catch (...) { // construction of the new object threw so delete the block of memory ::operator delete ( static_cast(temp)); throw; } } ++allocations; return temp; } void deallocate ( T* item ) { --allocations; item->~T(); if (pool_size >= max_pool_size) { ::operator delete ( static_cast(item)); return; } // add this memory chunk into our linked list. node* temp = reinterpret_cast(item); temp->next = next; next = temp; ++pool_size; } void swap ( memory_manager_kernel_1& item ) { exchange(allocations,item.allocations); exchange(next,item.next); exchange(pool_size,item.pool_size); } private: // data members size_t allocations; node* next; size_t pool_size; // restricted functions memory_manager_kernel_1(memory_manager_kernel_1&); // copy constructor memory_manager_kernel_1& operator=(memory_manager_kernel_1&); // assignment operator }; // ---------------------------------------------------------------------------------------- template < typename T > class memory_manager_kernel_1 { /*! INITIAL VALUE allocations == 0 CONVENTION This memory manager just calls new and delete directly so it doesn't really do anything. allocations == get_number_of_allocations() !*/ public: typedef T type; template struct rebind { typedef memory_manager_kernel_1 other; }; memory_manager_kernel_1( ) : allocations(0) { } virtual ~memory_manager_kernel_1( ) { } size_t get_number_of_allocations ( ) const { return allocations; } T* allocate_array ( size_t size ) { T* temp = new T[size]; ++allocations; return temp; } void deallocate_array ( T* item ) { --allocations; delete [] item; } T* allocate ( ) { T* temp = new T; ++allocations; return temp; } void deallocate ( T* item ) { delete item; --allocations; } void swap ( memory_manager_kernel_1& item ) { exchange(allocations,item.allocations); } private: // data members size_t allocations; // restricted functions memory_manager_kernel_1(memory_manager_kernel_1&); // copy constructor memory_manager_kernel_1& operator=(memory_manager_kernel_1&); // assignment operator }; // ---------------------------------------------------------------------------------------- template < typename T, size_t max_pool_size > inline void swap ( memory_manager_kernel_1& a, memory_manager_kernel_1& b ) { a.swap(b); } // ---------------------------------------------------------------------------------------- } #endif // DLIB_MEMORY_MANAGER_KERNEl_1_ ================================================ FILE: benchmarks/dlib/memory_manager/memory_manager_kernel_2.h ================================================ // Copyright (C) 2004 Davis E. King (davis@dlib.net) // License: Boost Software License See LICENSE.txt for the full license. #ifndef DLIB_MEMORY_MANAGER_KERNEl_2_ #define DLIB_MEMORY_MANAGER_KERNEl_2_ #include "../algs.h" #include "memory_manager_kernel_abstract.h" #include "../assert.h" #include namespace dlib { template < typename T, size_t chunk_size > class memory_manager_kernel_2 { /*! INITIAL VALUE allocations == 0 next == 0 first_chunk == 0 REQUIREMENTS ON chunk_size chunk_size is the number of items of type T we will allocate at a time. so it must be > 0. CONVENTION This memory manager implementation allocates memory in blocks of chunk_size*sizeof(T) bytes. All the sizeof(T) subblocks are kept in a linked list of free memory blocks and are given out whenever an allocation request occurs. Also, memory is not freed until this object is destructed. Note that array allocations are not memory managed. allocations == get_number_of_allocations() - if (next != 0) then - next == the next pointer to return from allocate() and next == pointer to the first node in a linked list. each node is one item in the memory pool. - the last node in the linked list has next set to 0 - else - we need to call new to get the next pointer to return from allocate() - if (first_chunk != 0) then - first_chunk == the first node in a linked list that contains pointers to all the chunks we have ever allocated. The last link in the list has its next pointer set to 0. !*/ union node { node* next; char item[sizeof(T)]; }; struct chunk_node { node* chunk; chunk_node* next; }; public: typedef T type; template struct rebind { typedef memory_manager_kernel_2 other; }; memory_manager_kernel_2( ) : allocations(0), next(0), first_chunk(0) { // You FOOL! You can't have a zero chunk_size. COMPILE_TIME_ASSERT(chunk_size > 0); } virtual ~memory_manager_kernel_2( ) { if (allocations == 0) { while (first_chunk != 0) { chunk_node* temp = first_chunk; first_chunk = first_chunk->next; // delete the memory chunk ::operator delete ( static_cast(temp->chunk)); // delete the chunk_node delete temp; } } } size_t get_number_of_allocations ( ) const { return allocations; } T* allocate_array ( size_t size ) { T* temp = new T[size]; ++allocations; return temp; } void deallocate_array ( T* item ) { --allocations; delete [] item; } T* allocate ( ) { T* temp = 0; if (next != 0) { temp = reinterpret_cast(next); node* n = next->next; try { // construct this new T object with placement new. new (static_cast(temp))T(); } catch (...) { next->next = n; throw; } next = n; } else { // the linked list is empty so we need to allocate some more memory node* block = 0; block = static_cast(::operator new (sizeof(node)*chunk_size)); // the first part of this block can be our new object temp = reinterpret_cast(block); try { // construct this new T object with placement new. new (static_cast(temp))T(); } catch (...) { // construction of the new object threw so delete the block of memory ::operator delete ( static_cast(block)); throw; } // allocate a new chunk_node chunk_node* chunk; try {chunk = new chunk_node; } catch (...) { temp->~T(); ::operator delete ( static_cast(block)); throw; } // add this block into the chunk list chunk->chunk = block; chunk->next = first_chunk; first_chunk = chunk; ++block; // now add the rest of the block into the linked list of free nodes. for (size_t i = 0; i < chunk_size-1; ++i) { block->next = next; next = block; ++block; } } ++allocations; return temp; } void deallocate ( T* item ) { --allocations; item->~T(); // add this memory into our linked list. node* temp = reinterpret_cast(item); temp->next = next; next = temp; } void swap ( memory_manager_kernel_2& item ) { exchange(allocations,item.allocations); exchange(next,item.next); exchange(first_chunk,item.first_chunk); } private: // data members size_t allocations; node* next; chunk_node* first_chunk; // restricted functions memory_manager_kernel_2(memory_manager_kernel_2&); // copy constructor memory_manager_kernel_2& operator=(memory_manager_kernel_2&); // assignment operator }; template < typename T, size_t chunk_size > inline void swap ( memory_manager_kernel_2& a, memory_manager_kernel_2& b ) { a.swap(b); } // ---------------------------------------------------------------------------------------- } #endif // DLIB_MEMORY_MANAGER_KERNEl_2_ ================================================ FILE: benchmarks/dlib/memory_manager/memory_manager_kernel_3.h ================================================ // Copyright (C) 2004 Davis E. King (davis@dlib.net) // License: Boost Software License See LICENSE.txt for the full license. #ifndef DLIB_MEMORY_MANAGER_KERNEl_3_ #define DLIB_MEMORY_MANAGER_KERNEl_3_ #include "../algs.h" #include "memory_manager_kernel_abstract.h" #include "../assert.h" #include #include "memory_manager_kernel_2.h" #include "../binary_search_tree/binary_search_tree_kernel_2.h" namespace dlib { template < typename T, size_t chunk_size > class memory_manager_kernel_3 { /*! INITIAL VALUE allocations == 0 next == 0 first_chunk == 0 bst_of_arrays == 0 REQUIREMENTS ON chunk_size chunk_size is the number of items of type T we will allocate at a time. so it must be > 0. CONVENTION This memory manager implementation allocates memory in blocks of chunk_size*sizeof(T) bytes. All the sizeof(T) subblocks are kept in a linked list of free memory blocks and are given out whenever an allocation request occurs. Also, memory is not freed until this object is destructed. allocations == get_number_of_allocations() - if (next != 0) then - next == the next pointer to return from allocate() and next == pointer to the first node in a linked list. each node is one item in the memory pool. - the last node in the linked list has next set to 0 - else - we need to call new to get the next pointer to return from allocate() - if (arrays != 0) then - someone has called allocate_array() - (*arrays)[size] == an array of size bytes of memory - if (first_chunk != 0) then - first_chunk == the first node in a linked list that contains pointers to all the chunks we have ever allocated. The last link in the list has its next pointer set to 0. !*/ union node { node* next; char item[sizeof(T)]; }; struct chunk_node { node* chunk; chunk_node* next; }; typedef binary_search_tree_kernel_2< size_t, char*, memory_manager_kernel_2 > bst_of_arrays; public: typedef T type; template struct rebind { typedef memory_manager_kernel_3 other; }; memory_manager_kernel_3( ) : allocations(0), next(0), first_chunk(0), arrays(0) { // You FOOL! You can't have a zero chunk_size. COMPILE_TIME_ASSERT(chunk_size > 0); } virtual ~memory_manager_kernel_3( ) { if (allocations == 0) { while (first_chunk != 0) { chunk_node* temp = first_chunk; first_chunk = first_chunk->next; // delete the memory chunk ::operator delete ( static_cast(temp->chunk)); // delete the chunk_node delete temp; } } if (arrays) { arrays->reset(); while (arrays->move_next()) { ::operator delete (arrays->element().value()); } delete arrays; } } size_t get_number_of_allocations ( ) const { return allocations; } T* allocate_array ( size_t size ) { size_t block_size = sizeof(T)*size + sizeof(size_t)*2; // make sure we have initialized the arrays object. if (arrays == 0) { arrays = new bst_of_arrays; } char* temp; // see if we have a suitable block of memory already. arrays->position_enumerator(block_size); if (arrays->current_element_valid()) { // we have a suitable block of memory already so use that one. arrays->remove_current_element(block_size,temp); } else { temp = static_cast(::operator new(block_size)); } reinterpret_cast(temp)[0] = block_size; reinterpret_cast(temp)[1] = size; temp += sizeof(size_t)*2; try { initialize_array(reinterpret_cast(temp),size); } catch (...) { // something was thrown while we were initializing the array so // stick our memory block into arrays and rethrow the exception temp -= sizeof(size_t)*2; arrays->add(block_size,temp); throw; } ++allocations; return reinterpret_cast(temp); } void deallocate_array ( T* item ) { char* temp = reinterpret_cast(item); temp -= sizeof(size_t)*2; size_t block_size = reinterpret_cast(temp)[0]; size_t size = reinterpret_cast(temp)[1]; deinitialize_array(item,size); arrays->add(block_size,temp); --allocations; } T* allocate ( ) { T* temp; if (next != 0) { temp = reinterpret_cast(next); node* n = next->next; try { // construct this new T object with placement new. new (static_cast(temp))T(); } catch (...) { next->next = n; throw; } next = n; } else { // the linked list is empty so we need to allocate some more memory node* block = static_cast(::operator new (sizeof(node)*chunk_size)); // the first part of this block can be our new object temp = reinterpret_cast(block); try { // construct this new T object with placement new. new (static_cast(temp))T(); } catch (...) { // construction of the new object threw so delete the block of memory ::operator delete ( static_cast(block)); throw; } // allocate a new chunk_node chunk_node* chunk; try {chunk = new chunk_node; } catch (...) { temp->~T(); ::operator delete ( static_cast(block)); throw; } // add this block into the chunk list chunk->chunk = block; chunk->next = first_chunk; first_chunk = chunk; ++block; // now add the rest of the block into the linked list of free nodes. for (size_t i = 0; i < chunk_size-1; ++i) { block->next = next; next = block; ++block; } } ++allocations; return temp; } void deallocate ( T* item ) { --allocations; item->~T(); // add this memory into our linked list. node* temp = reinterpret_cast(item); temp->next = next; next = temp; } void swap ( memory_manager_kernel_3& item ) { exchange(allocations,item.allocations); exchange(next,item.next); exchange(first_chunk,item.first_chunk); exchange(arrays,item.arrays); } private: // data members size_t allocations; node* next; chunk_node* first_chunk; bst_of_arrays* arrays; void initialize_array ( T* array, size_t size ) const { size_t i; try { for (i = 0; i < size; ++i) { // construct this new T object with placement new. new (static_cast(array+i))T(); } } catch (...) { // Catch any exceptions thrown during the construction process // and then destruct any T objects that actually were successfully // constructed. for (size_t j = 0; j < i; ++j) { array[i].~T(); } throw; } } void deinitialize_array ( T* array, size_t size ) const { for (size_t i = 0; i < size; ++i) { array[i].~T(); } } // don't do any initialization for the built in types void initialize_array(unsigned char*, size_t) {} void deinitialize_array(unsigned char*, size_t) {} void initialize_array(signed char*, size_t) {} void deinitialize_array(signed char*, size_t) {} void initialize_array(char*, size_t) {} void deinitialize_array(char*, size_t) {} void initialize_array(int*, size_t) {} void deinitialize_array(int*, size_t) {} void initialize_array(unsigned int*, size_t) {} void deinitialize_array(unsigned int*, size_t) {} void initialize_array(unsigned long*, size_t) {} void deinitialize_array(unsigned long*, size_t) {} void initialize_array(long*, size_t) {} void deinitialize_array(long*, size_t) {} void initialize_array(float*, size_t) {} void deinitialize_array(float*, size_t) {} void initialize_array(double*, size_t) {} void deinitialize_array(double*, size_t) {} void initialize_array(short*, size_t) {} void deinitialize_array(short*, size_t) {} void initialize_array(unsigned short*, size_t) {} void deinitialize_array(unsigned short*, size_t) {} // restricted functions memory_manager_kernel_3(memory_manager_kernel_3&); // copy constructor memory_manager_kernel_3& operator=(memory_manager_kernel_3&); // assignment operator }; template < typename T, size_t chunk_size > inline void swap ( memory_manager_kernel_3& a, memory_manager_kernel_3& b ) { a.swap(b); } // ---------------------------------------------------------------------------------------- } #endif // DLIB_MEMORY_MANAGER_KERNEl_3_ ================================================ FILE: benchmarks/dlib/memory_manager/memory_manager_kernel_abstract.h ================================================ // Copyright (C) 2004 Davis E. King (davis@dlib.net) // License: Boost Software License See LICENSE.txt for the full license. #undef DLIB_MEMORY_MANAGER_KERNEl_ABSTRACT_ #ifdef DLIB_MEMORY_MANAGER_KERNEl_ABSTRACT_ #include "../algs.h" namespace dlib { template < typename T > class memory_manager { /*! REQUIREMENTS ON T T must have a default constructor. INITIAL VALUE get_number_of_allocations() == 0 WHAT THIS OBJECT REPRESENTS This object represents some kind of memory manager or memory pool. !*/ public: typedef T type; template struct rebind { typedef memory_manager other; }; memory_manager( ); /*! ensures - #*this is properly initialized throws - std::bad_alloc !*/ virtual ~memory_manager( ); /*! ensures - if (get_number_of_allocations() == 0) then - all resources associated with *this have been released. - else - The memory still allocated will not be deleted and this causes a memory leak. !*/ size_t get_number_of_allocations ( ) const; /*! ensures - returns the current number of outstanding allocations !*/ T* allocate ( ); /*! ensures - allocates a new object of type T and returns a pointer to it. - #get_number_of_allocations() == get_number_of_allocations() + 1 throws - std::bad_alloc or any exception thrown by T's constructor. If this exception is thrown then the call to allocate() has no effect on #*this. !*/ void deallocate ( T* item ); /*! requires - item == is a pointer to memory that was obtained from a call to this->allocate(). (i.e. you can't deallocate a pointer you got from a different memory_manager instance.) - the memory pointed to by item hasn't already been deallocated. ensures - deallocates the object pointed to by item - #get_number_of_allocations() == get_number_of_allocations() - 1 !*/ T* allocate_array ( size_t size ); /*! ensures - allocates a new array of size objects of type T and returns a pointer to it. - #get_number_of_allocations() == get_number_of_allocations() + 1 throws - std::bad_alloc or any exception thrown by T's constructor. If this exception is thrown then the call to allocate() has no effect on #*this. !*/ void deallocate_array ( T* item ); /*! requires - item == is a pointer to memory that was obtained from a call to this->allocate_array(). (i.e. you can't deallocate a pointer you got from a different memory_manager instance and it must be an array.) - the memory pointed to by item hasn't already been deallocated. ensures - deallocates the array pointed to by item - #get_number_of_allocations() == get_number_of_allocations() - 1 !*/ void swap ( memory_manager& item ); /*! ensures - swaps *this and item !*/ private: // restricted functions memory_manager(memory_manager&); // copy constructor memory_manager& operator=(memory_manager&); // assignment operator }; template < typename T > inline void swap ( memory_manager& a, memory_manager& b ) { a.swap(b); } /*! provides a global swap function !*/ } #endif // DLIB_MEMORY_MANAGER_KERNEl_ABSTRACT_ ================================================ FILE: benchmarks/dlib/memory_manager.h ================================================ // Copyright (C) 2003 Davis E. King (davis@dlib.net) // License: Boost Software License See LICENSE.txt for the full license. #ifndef DLIB_MEMORY_MANAGEr_ #define DLIB_MEMORY_MANAGEr_ #include "memory_manager/memory_manager_kernel_1.h" #include "memory_manager/memory_manager_kernel_2.h" #include "memory_manager/memory_manager_kernel_3.h" namespace dlib { template < typename T > class memory_manager { memory_manager() {} public: //----------- kernels --------------- // kernel_1 typedef memory_manager_kernel_1 kernel_1a; typedef memory_manager_kernel_1 kernel_1b; typedef memory_manager_kernel_1 kernel_1c; typedef memory_manager_kernel_1 kernel_1d; typedef memory_manager_kernel_1 kernel_1e; typedef memory_manager_kernel_1 kernel_1f; // kernel_2 typedef memory_manager_kernel_2 kernel_2a; typedef memory_manager_kernel_2 kernel_2b; typedef memory_manager_kernel_2 kernel_2c; typedef memory_manager_kernel_2 kernel_2d; typedef memory_manager_kernel_2 kernel_2e; // kernel_3 typedef memory_manager_kernel_3 kernel_3a; typedef memory_manager_kernel_3 kernel_3b; typedef memory_manager_kernel_3 kernel_3c; typedef memory_manager_kernel_3 kernel_3d; typedef memory_manager_kernel_3 kernel_3e; }; } #endif // DLIB_MEMORY_MANAGEr_ ================================================ FILE: benchmarks/dlib/memory_manager_global/memory_manager_global_kernel_1.h ================================================ // Copyright (C) 2006 Davis E. King (davis@dlib.net) // License: Boost Software License See LICENSE.txt for the full license. #ifndef DLIB_MEMORY_MANAGER_GLOBAl_1_ #define DLIB_MEMORY_MANAGER_GLOBAl_1_ #include "../algs.h" #include "../memory_manager/memory_manager_kernel_abstract.h" #include "memory_manager_global_kernel_abstract.h" namespace dlib { template < typename T, typename factory > class memory_manager_global_kernel_1 { /*! INITIAL VALUE - *global_mm == get_global_memory_manager() CONVENTION - global_mm->get_number_of_allocations() == get_number_of_allocations() - *global_mm == get_global_memory_manager() !*/ public: typedef typename factory::template return_type::type mm_global_type; typedef T type; template struct rebind { typedef memory_manager_global_kernel_1 other; }; memory_manager_global_kernel_1( ) : global_mm(factory::template get_instance()) {} virtual ~memory_manager_global_kernel_1( ) {} size_t get_number_of_allocations ( ) const { return global_mm->get_number_of_allocations(); } mm_global_type& get_global_memory_manager ( ) { return *global_mm; } T* allocate ( ) { return global_mm->allocate(); } void deallocate ( T* item ) { global_mm->deallocate(item); } T* allocate_array ( size_t size ) { return global_mm->allocate_array(size); } void deallocate_array ( T* item ) { global_mm->deallocate_array(item); } void swap ( memory_manager_global_kernel_1& item ) { exchange(item.global_mm, global_mm); } private: mm_global_type* global_mm; // restricted functions memory_manager_global_kernel_1(memory_manager_global_kernel_1&); // copy constructor memory_manager_global_kernel_1& operator=(memory_manager_global_kernel_1&); // assignment operator }; template < typename T, typename factory > inline void swap ( memory_manager_global_kernel_1& a, memory_manager_global_kernel_1& b ) { a.swap(b); } /*! provides a global swap function !*/ } #endif // DLIB_MEMORY_MANAGER_GLOBAl_1_ ================================================ FILE: benchmarks/dlib/memory_manager_global/memory_manager_global_kernel_abstract.h ================================================ // Copyright (C) 2006 Davis E. King (davis@dlib.net) // License: Boost Software License See LICENSE.txt for the full license. #undef DLIB_MEMORY_MANAGER_GLOBAl_ABSTRACT_ #ifdef DLIB_MEMORY_MANAGER_GLOBAl_ABSTRACT_ #include "../algs.h" #include "../memory_manager/memory_manager_kernel_abstract.h" namespace dlib { template < typename T, typename factory > class memory_manager_global { /*! REQUIREMENTS ON T T must have a default constructor. REQUIREMENTS ON factory factory must be defined as follows: struct factory { template struct return_type { typedef typename memory_manager_type type; }; template static typename return_type::type* get_instance ( ); / *! ensures - returns a pointer to an instance of a memory_manager object where memory_manager_type implements the interface defined by dlib/memory_manager/memory_manager_kernel_abstract.h !* / }; WHAT THIS OBJECT REPRESENTS This object represents some kind of global memory manager or memory pool. It is identical to the memory_manager object except that it gets all of its allocations from a global instance of a memory_manager object which is provided by the factory object's static member get_instance(). THREAD SAFETY This object is, by itself, threadsafe. However, if you want to use this object in multiple threads then you must ensure that your factory is threadsafe. This means its factory::get_instance() method should be threadsafe and the memory_manager object it returns must also be threadsafe. !*/ public: typedef typename factory::template return_type::type mm_global_type; typedef T type; template struct rebind { typedef memory_manager_global other; }; memory_manager_global( ); /*! ensures - #*this is properly initialized - #get_global_memory_manager() == the memory manager that was returned by a call to factory::get_instance() throws - std::bad_alloc !*/ virtual ~memory_manager_global( ); /*! ensures - This destructor has no effect on the global memory_manager get_global_memory_manager(). !*/ size_t get_number_of_allocations ( ) const; /*! ensures - returns get_global_memory_manager().get_number_of_allocations() !*/ mm_global_type& get_global_memory_manager ( ); /*! ensures - returns a reference to the global memory manager instance being used by *this. !*/ T* allocate ( ); /*! ensures - #get_number_of_allocations() == get_number_of_allocations() + 1 - returns get_global_memory_manager().allocate() throws - std::bad_alloc or any exception thrown by T's constructor. If this exception is thrown then the call to allocate() has no effect on #*this. !*/ void deallocate ( T* item ); /*! requires - item == is a pointer to memory that was obtained from a call to the get_global_memory_manager() object's allocate() method. - the memory pointed to by item hasn't already been deallocated. ensures - calls get_global_memory_manager().deallocate(item) - #get_number_of_allocations() == get_number_of_allocations() - 1 !*/ T* allocate_array ( size_t size ); /*! ensures - #get_number_of_allocations() == get_number_of_allocations() + 1 - returns get_global_memory_manager().allocate_array() throws - std::bad_alloc or any exception thrown by T's constructor. If this exception is thrown then the call to allocate_array() has no effect on #*this. !*/ void deallocate_array ( T* item ); /*! requires - item == is a pointer to memory that was obtained from a call to the get_global_memory_manager() object's allocate_array() method. - the memory pointed to by item hasn't already been deallocated. ensures - calls get_global_memory_manager().deallocate_array(item) - #get_number_of_allocations() == get_number_of_allocations() - 1 !*/ void swap ( memory_manager_global& item ); /*! ensures - swaps *this and item !*/ private: // restricted functions memory_manager_global(memory_manager_global&); // copy constructor memory_manager_global& operator=(memory_manager_global&); // assignment operator }; template < typename T, typename factory > inline void swap ( memory_manager_global& a, memory_manager_global& b ) { a.swap(b); } /*! provides a global swap function !*/ } #endif // DLIB_MEMORY_MANAGER_GLOBAl_ABSTRACT_ ================================================ FILE: benchmarks/dlib/memory_manager_global.h ================================================ // Copyright (C) 2006 Davis E. King (davis@dlib.net) // License: Boost Software License See LICENSE.txt for the full license. #ifndef DLIB_MEMORY_MANAGER_GLOBAl_ #define DLIB_MEMORY_MANAGER_GLOBAl_ #include "memory_manager_global/memory_manager_global_kernel_1.h" #include "memory_manager.h" namespace dlib { template < typename T, typename factory > class memory_manager_global { memory_manager_global() {} public: //----------- kernels --------------- // kernel_1 typedef memory_manager_global_kernel_1 kernel_1a; }; } #endif // DLIB_MEMORY_MANAGER_GLOBAl_ ================================================ FILE: benchmarks/dlib/memory_manager_stateless/memory_manager_stateless_kernel_1.h ================================================ // Copyright (C) 2006 Davis E. King (davis@dlib.net) // License: Boost Software License See LICENSE.txt for the full license. #ifndef DLIB_MEMORY_MANAGER_STATELESs_1_ #define DLIB_MEMORY_MANAGER_STATELESs_1_ #include "memory_manager_stateless_kernel_abstract.h" #include namespace dlib { template < typename T > class memory_manager_stateless_kernel_1 { /*! this implementation just calls new and delete directly !*/ public: typedef T type; const static bool is_stateless = true; template struct rebind { typedef memory_manager_stateless_kernel_1 other; }; memory_manager_stateless_kernel_1( ) {} virtual ~memory_manager_stateless_kernel_1( ) {} T* allocate ( ) { return new T; } void deallocate ( T* item ) { delete item; } T* allocate_array ( size_t size ) { return new T[size]; } void deallocate_array ( T* item ) { delete [] item; } void swap (memory_manager_stateless_kernel_1&) {} std::unique_ptr extract( T* item ) { return std::unique_ptr(item); } std::unique_ptr extract_array( T* item ) { return std::unique_ptr(item); } private: // restricted functions memory_manager_stateless_kernel_1(memory_manager_stateless_kernel_1&); // copy constructor memory_manager_stateless_kernel_1& operator=(memory_manager_stateless_kernel_1&); // assignment operator }; template < typename T > inline void swap ( memory_manager_stateless_kernel_1& a, memory_manager_stateless_kernel_1& b ) { a.swap(b); } } #endif // DLIB_MEMORY_MANAGER_STATELESs_1_ ================================================ FILE: benchmarks/dlib/memory_manager_stateless/memory_manager_stateless_kernel_2.h ================================================ // Copyright (C) 2006 Davis E. King (davis@dlib.net) // License: Boost Software License See LICENSE.txt for the full license. #ifndef DLIB_MEMORY_MANAGER_STATELESs_2_ #define DLIB_MEMORY_MANAGER_STATELESs_2_ #include "../algs.h" #include "memory_manager_stateless_kernel_abstract.h" #include "../threads.h" namespace dlib { template < typename T, typename mem_manager > class memory_manager_stateless_kernel_2 { /*! REQUIREMENTS ON mem_manager mem_manager must be an implementation of memory_manager/memory_manager_kernel_abstract.h CONVENTION this object has a single global instance of mem_manager !*/ public: typedef T type; const static bool is_stateless = true; template struct rebind { typedef memory_manager_stateless_kernel_2 other; }; memory_manager_stateless_kernel_2( ) { // call this just to make sure the mutex is is initialized before // multiple threads start calling the member functions. global_mutex(); } virtual ~memory_manager_stateless_kernel_2( ) {} T* allocate ( ) { auto_mutex M(global_mutex()); return global_mm().allocate(); } void deallocate ( T* item ) { auto_mutex M(global_mutex()); return global_mm().deallocate(item); } T* allocate_array ( size_t size ) { auto_mutex M(global_mutex()); return global_mm().allocate_array(size); } void deallocate_array ( T* item ) { auto_mutex M(global_mutex()); return global_mm().deallocate_array(item); } void swap (memory_manager_stateless_kernel_2&) {} private: static mutex& global_mutex ( ) { static mutex lock; return lock; } typedef typename mem_manager::template rebind::other rebound_mm_type; static rebound_mm_type& global_mm ( ) { static rebound_mm_type mm; return mm; } // restricted functions memory_manager_stateless_kernel_2(memory_manager_stateless_kernel_2&); // copy constructor memory_manager_stateless_kernel_2& operator=(memory_manager_stateless_kernel_2&); // assignment operator }; template < typename T, typename mem_manager > inline void swap ( memory_manager_stateless_kernel_2& a, memory_manager_stateless_kernel_2& b ) { a.swap(b); } } #endif // DLIB_MEMORY_MANAGER_STATELESs_2_ ================================================ FILE: benchmarks/dlib/memory_manager_stateless/memory_manager_stateless_kernel_abstract.h ================================================ // Copyright (C) 2006 Davis E. King (davis@dlib.net) // License: Boost Software License See LICENSE.txt for the full license. #undef DLIB_MEMORY_MANAGER_STATELESs_ABSTRACT_ #ifdef DLIB_MEMORY_MANAGER_STATELESs_ABSTRACT_ #include "../algs.h" #include namespace dlib { template < typename T > class memory_manager_stateless { /*! REQUIREMENTS ON T T must have a default constructor. WHAT THIS OBJECT REPRESENTS This object represents some kind of stateless memory manager or memory pool. Stateless means that all instances (instances of the same kernel implementation that is) of this object are identical and can be used interchangeably. Note that implementations are allowed to have some shared global state such as a global memory pool. THREAD SAFETY This object is thread safe. You may access it from any thread at any time without synchronizing access. !*/ public: typedef T type; const static bool is_stateless = true; template struct rebind { typedef memory_manager_stateless other; }; memory_manager_stateless( ); /*! ensures - #*this is properly initialized throws - std::bad_alloc !*/ virtual ~memory_manager_stateless( ); /*! ensures - frees any resources used by *this but has no effect on any shared global resources used by the implementation. !*/ T* allocate ( ); /*! ensures - allocates a new object of type T and returns a pointer to it. throws - std::bad_alloc or any exception thrown by T's constructor. If this exception is thrown then the call to allocate() has no effect on #*this. !*/ void deallocate ( T* item ); /*! requires - item == is a pointer to memory that was obtained from a call to allocate(). (i.e. The pointer you are deallocating must have come from the same implementation of memory_manager_stateless that is trying to deallocate it.) - the memory pointed to by item hasn't already been deallocated. ensures - deallocates the object pointed to by item !*/ T* allocate_array ( size_t size ); /*! ensures - allocates a new array of size objects of type T and returns a pointer to it. throws - std::bad_alloc or any exception thrown by T's constructor. If this exception is thrown then the call to allocate() has no effect on #*this. !*/ void deallocate_array ( T* item ); /*! requires - item == is a pointer to memory that was obtained from a call to allocate_array(). (i.e. The pointer you are deallocating must have come from the same implementation of memory_manager_stateless that is trying to deallocate it.) - the memory pointed to by item hasn't already been deallocated. ensures - deallocates the array pointed to by item !*/ void swap ( memory_manager_stateless& item ); /*! ensures - this function has no effect on *this or item. It is just provided to make this object's interface more compatible with the other memory managers. !*/ std::unique_ptr extract( T* item ); /*! requires - item == is a pointer to memory that was obtained from a call to allocate(). ensures - returns a unique_ptr that owns item. That is, if the returned ptr is PTR then PTR.get() == item. Therefore, this function extracts item from the memory manager's internal pool. Therefore, you shouldn't call deallocate(item) after this. - Note that not all memory managers implement extract(). !*/ std::unique_ptr extract_array( T* item ); /*! requires - item == is a pointer to memory that was obtained from a call to allocate_array(). ensures - returns a unique_ptr that owns item. That is, if the returned ptr is PTR then PTR.get() == item. Therefore, this function extracts item from the memory manager's internal pool. Therefore, you shouldn't call deallocate_array(item) after this. - Note that not all memory managers implement extract(). !*/ private: // restricted functions memory_manager_stateless(memory_manager_stateless&); // copy constructor memory_manager_stateless& operator=(memory_manager_stateless&); // assignment operator }; template < typename T > inline void swap ( memory_manager_stateless& a, memory_manager_stateless& b ) { a.swap(b); } /*! provides a global swap function !*/ } #endif // DLIB_MEMORY_MANAGER_STATELESs_ABSTRACT_ ================================================ FILE: benchmarks/dlib/memory_manager_stateless.h ================================================ // Copyright (C) 2006 Davis E. King (davis@dlib.net) // License: Boost Software License See LICENSE.txt for the full license. #ifndef DLIB_MEMORY_MANAGER_STATELESs_ #define DLIB_MEMORY_MANAGER_STATELESs_ #include "memory_manager_stateless/memory_manager_stateless_kernel_1.h" #include "memory_manager_stateless/memory_manager_stateless_kernel_2.h" #include "memory_manager.h" namespace dlib { template < typename T > class memory_manager_stateless { memory_manager_stateless() {} public: //----------- kernels --------------- // kernel_1 typedef memory_manager_stateless_kernel_1 kernel_1a; // kernel_2 typedef memory_manager_stateless_kernel_2::kernel_1a> kernel_2_1a; typedef memory_manager_stateless_kernel_2::kernel_1b> kernel_2_1b; typedef memory_manager_stateless_kernel_2::kernel_1c> kernel_2_1c; typedef memory_manager_stateless_kernel_2::kernel_1d> kernel_2_1d; typedef memory_manager_stateless_kernel_2::kernel_1e> kernel_2_1e; typedef memory_manager_stateless_kernel_2::kernel_1f> kernel_2_1f; typedef memory_manager_stateless_kernel_2::kernel_2a> kernel_2_2a; typedef memory_manager_stateless_kernel_2::kernel_2b> kernel_2_2b; typedef memory_manager_stateless_kernel_2::kernel_2c> kernel_2_2c; typedef memory_manager_stateless_kernel_2::kernel_2d> kernel_2_2d; typedef memory_manager_stateless_kernel_2::kernel_2e> kernel_2_2e; typedef memory_manager_stateless_kernel_2::kernel_3a> kernel_2_3a; typedef memory_manager_stateless_kernel_2::kernel_3b> kernel_2_3b; typedef memory_manager_stateless_kernel_2::kernel_3c> kernel_2_3c; typedef memory_manager_stateless_kernel_2::kernel_3d> kernel_2_3d; typedef memory_manager_stateless_kernel_2::kernel_3e> kernel_2_3e; }; } #endif // DLIB_MEMORY_MANAGER_STATELESs_ ================================================ FILE: benchmarks/dlib/metaprogramming.h ================================================ // Copyright (C) 2017 Davis E. King (davis@dlib.net) // License: Boost Software License See LICENSE.txt for the full license. #ifndef DLIB_METApROGRAMMING_Hh_ #define DLIB_METApROGRAMMING_Hh_ #include "algs.h" namespace dlib { // ---------------------------------------------------------------------------------------- template struct compile_time_integer_list { /*! WHAT THIS OBJECT REPRESENTS The point of this type is to, as the name suggests, hold a compile time list of integers. As an example, here is something simple you could do with it: template void print_compile_time_ints ( compile_time_integer_list ) { print(ints...); } int main() { print_compile_time_ints(compile_time_integer_list<0,4,9>()); } Which just calls: print(0,4,9); This is a simple example, but this kind of thing is useful in larger and more complex template metaprogramming constructs. !*/ template struct push_back { typedef compile_time_integer_list type; }; }; // ---------------------------------------------------------------------------------------- template struct make_compile_time_integer_range { /*! WHAT THIS OBJECT REPRESENTS This object makes a compile_time_integer_list containing the integers in the range [1,max] inclusive. For example: make_compile_time_integer_range<4>::type evaluates to: compile_time_integer_list<1,2,3,4> !*/ typedef typename make_compile_time_integer_range::type::template push_back::type type; }; // base case template <> struct make_compile_time_integer_range<0> { typedef compile_time_integer_list<> type; }; // ---------------------------------------------------------------------------------------- namespace impl { template < typename Funct, typename... Args, typename int_()(std::declval()...))>::type = 0 > bool call_if_valid ( special_, Funct&& f, Args&&... args ) { f(std::forward(args)...); return true; } template < typename Funct, typename... Args > bool call_if_valid ( general_, Funct&& /*f*/, Args&&... /*args*/ ) { return false; } } template bool call_if_valid(Funct&& f, Args&&... args) /*! ensures - if f(std::forward(args)...) is a valid expression then we evaluate it and return true. Otherwise we do nothing and return false. !*/ { return impl::call_if_valid(special_(), f, std::forward(args)...); } // ---------------------------------------------------------------------------------------- } #endif // DLIB_METApROGRAMMING_Hh_ ================================================ FILE: benchmarks/dlib/misc_api/misc_api_kernel_1.h ================================================ // Copyright (C) 2004 Davis E. King (davis@dlib.net) // License: Boost Software License See LICENSE.txt for the full license. #ifndef DLIB_MISC_API_KERNEl_1_ #define DLIB_MISC_API_KERNEl_1_ #ifdef DLIB_ISO_CPP_ONLY #error "DLIB_ISO_CPP_ONLY is defined so you can't use this OS dependent code. Turn DLIB_ISO_CPP_ONLY off if you want to use it." #endif #include "misc_api_kernel_abstract.h" #include "../algs.h" #include #include "../uintn.h" namespace dlib { // ---------------------------------------------------------------------------------------- void sleep ( unsigned long milliseconds ); // ---------------------------------------------------------------------------------------- std::string get_current_dir ( ); // ---------------------------------------------------------------------------------------- class set_current_dir_error : public error { public: set_current_dir_error( const std::string& a ): error(a) {} }; void set_current_dir ( const std::string& new_dir ); // ---------------------------------------------------------------------------------------- class timestamper { /*! INITIAL VALUE - last_time == 0 - offset == 0 - dword_max == 2^32 CONVENTION - last_time == the time returned by GetTickCount() the last time we called it. - offset == the number of microseconds we should add to the result of GetTickCount() so that it is correct. - dword_max == 2^32. This is the number of values representable by a DWORD. !*/ mutable unsigned long last_time; mutable uint64 offset; mutable uint64 dword_max; public: timestamper( ) : last_time(0), offset(0) { dword_max = 0xFFFFFFFF; ++dword_max; } uint64 get_timestamp ( ) const; }; // ---------------------------------------------------------------------------------------- class dir_create_error : public error { public: dir_create_error( const std::string& dir_name ) : error(EDIR_CREATE,"Error creating directory '" + dir_name + "'."), name(dir_name) {} ~dir_create_error() throw() {} const std::string name; }; void create_directory ( const std::string& dir ); // ---------------------------------------------------------------------------------------- } #ifdef NO_MAKEFILE #include "misc_api_kernel_1.cpp" #endif #endif // DLIB_MISC_API_KERNEl_1_ ================================================ FILE: benchmarks/dlib/misc_api/misc_api_kernel_2.h ================================================ // Copyright (C) 2004 Davis E. King (davis@dlib.net) // License: Boost Software License See LICENSE.txt for the full license. #ifndef DLIB_MISC_API_KERNEl_2_ #define DLIB_MISC_API_KERNEl_2_ #ifdef DLIB_ISO_CPP_ONLY #error "DLIB_ISO_CPP_ONLY is defined so you can't use this OS dependent code. Turn DLIB_ISO_CPP_ONLY off if you want to use it." #endif #include "misc_api_kernel_abstract.h" #include "../algs.h" #include #include "../uintn.h" namespace dlib { // ---------------------------------------------------------------------------------------- void sleep ( unsigned long milliseconds ); // ---------------------------------------------------------------------------------------- std::string get_current_dir ( ); // ---------------------------------------------------------------------------------------- class set_current_dir_error : public error { public: set_current_dir_error( const std::string& a ): error(a) {} }; void set_current_dir ( const std::string& new_dir ); // ---------------------------------------------------------------------------------------- class timestamper { public: uint64 get_timestamp ( ) const; }; // ---------------------------------------------------------------------------------------- class dir_create_error : public error { public: dir_create_error( const std::string& dir_name ) : error(EDIR_CREATE,"Error creating directory '" + dir_name + "'."), name(dir_name) {} const std::string& name; }; void create_directory ( const std::string& dir ); // ---------------------------------------------------------------------------------------- } #ifdef NO_MAKEFILE #include "misc_api_kernel_2.cpp" #endif #endif // DLIB_MISC_API_KERNEl_2_ ================================================ FILE: benchmarks/dlib/misc_api/misc_api_kernel_abstract.h ================================================ // Copyright (C) 2004 Davis E. King (davis@dlib.net) // License: Boost Software License See LICENSE.txt for the full license. #undef DLIB_MISC_API_KERNEl_ABSTRACT_ #ifdef DLIB_MISC_API_KERNEl_ABSTRACT_ #include #include "../uintn.h" #include "../algs.h" namespace dlib { // ---------------------------------------------------------------------------------------- /*! GENERAL COMMENTS This file just contains miscellaneous api functions !*/ // ---------------------------------------------------------------------------------------- void sleep ( unsigned long milliseconds ); /*! ensures - causes the calling thread to sleep for the given number of milliseconds. !*/ // ---------------------------------------------------------------------------------------- std::string get_current_dir ( ); /*! ensures - if (no errors occur) then - returns the path to the current working directory - else - returns "" throws - std::bad_alloc !*/ // ---------------------------------------------------------------------------------------- class set_current_dir_error : public error; void set_current_dir ( const std::string& new_dir ); /*! ensures - sets the current working directory to new_dir throws - std::bad_alloc - set_current_dir_error This exception is thrown if there is an error when attempting to change the current working directory. !*/ // ---------------------------------------------------------------------------------------- class locally_change_current_dir : noncopyable { /*! WHAT THIS OBJECT REPRESENTS This object is a RAII tool for safely switching the current directory to a new directory and then automatically switching back to the original directory upon this object's destruction. !*/ public: explicit locally_change_current_dir ( const std::string& new_dir ); /*! ensures - calls set_current_dir(new_dir) - #old_dir() == The value of get_current_dir() prior to switching to new_dir. !*/ const std::string& old_dir ( ) const; /*! ensures - returns the directory we switch back to once this object is destructed. !*/ ~locally_change_current_dir( ); /*! ensures - if (revert() hasn't already been called) then - calls set_current_dir(old_dir()) !*/ void revert ( ); /*! ensures - if (revert() hasn't already been called) then - calls set_current_dir(old_dir()) !*/ }; // ---------------------------------------------------------------------------------------- class dir_create_error : public error { public: const std::string name }; void create_directory ( const std::string& dir ); /*! ensures - if (dir does not already exist) then - creates the given directory. - else - the call to create_directory() has no effect. throws - dir_create_error This exception is thrown if we were unable to create the requested directory and it didn't already exist. The type member of the exception will bet set to EDIR_CREATE and the name member will be set to dir. !*/ // ---------------------------------------------------------------------------------------- class timestamper { /*! WHAT THIS OBJECT REPRESENTS This object represents a timer that is capable of returning timestamps. Note that the time is measured in microseconds but you are not guaranteed to have that level of resolution. The actual resolution is implementation dependent. !*/ public: uint64 get_timestamp ( ) const; /*! ensures - returns a timestamp that measures the time in microseconds since an arbitrary point in the past. Note that this arbitrary point remains the same between all calls to get_timestamp(). !*/ }; // ---------------------------------------------------------------------------------------- } #endif // DLIB_MISC_API_KERNEl_ABSTRACT_ ================================================ FILE: benchmarks/dlib/misc_api/misc_api_shared.h ================================================ // Copyright (C) 2014 Davis E. King (davis@dlib.net) // License: Boost Software License See LICENSE.txt for the full license. #ifndef DLIB_MISC_API_ShARED_Hh_ #define DLIB_MISC_API_ShARED_Hh_ #include #include "../noncopyable.h" namespace dlib { // ---------------------------------------------------------------------------------------- class locally_change_current_dir : noncopyable { public: explicit locally_change_current_dir ( const std::string& new_dir ) { reverted = false; _old_dir = get_current_dir(); set_current_dir(new_dir); } ~locally_change_current_dir() { revert(); } const std::string& old_dir ( ) const { return _old_dir; } void revert ( ) { if (!reverted) { set_current_dir(_old_dir); reverted = true; } } private: bool reverted; std::string _old_dir; }; // ---------------------------------------------------------------------------------------- } #endif // DLIB_MISC_API_ShARED_Hh_ ================================================ FILE: benchmarks/dlib/misc_api/posix.h ================================================ // Copyright (C) 2004 Davis E. King (davis@dlib.net) // License: Boost Software License See LICENSE.txt for the full license. #ifndef DLIB_MISC_API_KERNEl_1_ #include "misc_api_kernel_2.h" #endif ================================================ FILE: benchmarks/dlib/misc_api/windows.h ================================================ // Copyright (C) 2004 Davis E. King (davis@dlib.net) // License: Boost Software License See LICENSE.txt for the full license. #ifndef DLIB_MISC_API_KERNEl_2_ #include "misc_api_kernel_1.h" #endif ================================================ FILE: benchmarks/dlib/misc_api.h ================================================ // Copyright (C) 2004 Davis E. King (davis@dlib.net) // License: Boost Software License See LICENSE.txt for the full license. #ifndef DLIB_MISC_APi_ #define DLIB_MISC_APi_ #include "platform.h" #ifdef WIN32 #include "misc_api/windows.h" #endif #ifndef WIN32 #include "misc_api/posix.h" #endif #include "misc_api/misc_api_shared.h" #endif // DLIB_MISC_APi_ ================================================ FILE: benchmarks/dlib/noncopyable.h ================================================ // (C) Copyright Beman Dawes 1999-2003. Distributed under the Boost // Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // Contributed by Dave Abrahams // See http://www.boost.org/libs/utility for documentation. #ifndef DLIB_BOOST_NONCOPYABLE_HPP_INCLUDED #define DLIB_BOOST_NONCOPYABLE_HPP_INCLUDED namespace dlib { class noncopyable { /*! This class makes it easier to declare a class as non-copyable. If you want to make an object that can't be copied just inherit from this object. !*/ protected: noncopyable() = default; ~noncopyable() = default; private: // emphasize the following members are private noncopyable(const noncopyable&); const noncopyable& operator=(const noncopyable&); }; } #endif // DLIB_BOOST_NONCOPYABLE_HPP_INCLUDED ================================================ FILE: benchmarks/dlib/numeric_constants.h ================================================ //Copyright (C) 2013 Steve Taylor (steve98654@gmail.com), Davis E. King //License: Boost Software License. See LICENSE.txt for full license. #ifndef DLIB_NUMERIC_CONSTANTs_H_ #define DLIB_NUMERIC_CONSTANTs_H_ namespace dlib { // pi -- Pi const double pi = 3.1415926535897932385; // e -- Euler's Constant const double e = 2.7182818284590452354; // sqrt_2 -- The square root of 2 const double sqrt_2 = 1.4142135623730950488; // sqrt_3 -- The square root of 3 const double sqrt_3 = 1.7320508075688772935; // log10_2 -- The logarithm base 10 of two const double log10_2 = 0.30102999566398119521; // light_spd -- The speed of light in vacuum in meters per second const double light_spd = 2.99792458e8; // newton_G -- Newton's gravitational constant (in metric units of m^3/(kg*s^2)) const double newton_G = 6.67384e-11; // planck_cst -- Planck's constant (in units of Joules * seconds) const double planck_cst = 6.62606957e-34; // golden_ratio -- The Golden Ratio const double golden_ratio = 1.6180339887498948482; // euler_gamma -- The Euler Mascheroni Constant const double euler_gamma = 0.5772156649015328606065; // catalan -- Catalan's Constant const double catalan = 0.91596559417721901505; // glaisher -- Glaisher Kinkelin constant const double glaisher = 1.2824271291006226369; // khinchin -- Khinchin's constant const double khinchin = 2.6854520010653064453; // apery -- Apery's constant const double apery = 1.2020569031595942854; } #endif //DLIB_NUMERIC_CONSTANTs_H_ ================================================ FILE: benchmarks/dlib/numerical_integration/integrate_function_adapt_simpson.h ================================================ // Copyright (C) 2013 Steve Taylor (steve98654@gmail.com) // License: Boost Software License See LICENSE.txt for full license #ifndef DLIB_INTEGRATE_FUNCTION_ADAPT_SIMPSONh_ #define DLIB_INTEGRATE_FUNCTION_ADAPT_SIMPSONh_ #include "integrate_function_adapt_simpson_abstract.h" #include "../assert.h" // ---------------------------------------------------------------------------------------- namespace dlib { template T impl_adapt_simp_stop(const funct& f, T a, T b, T fa, T fm, T fb, T is, int cnt) { const int maxint = 500; T m = (a + b)/2.0; T h = (b - a)/4.0; T fml = f(a + h); T fmr = f(b - h); T i1 = h/1.5*(fa+4.0*fm+fb); T i2 = h/3.0*(fa+4.0*(fml+fmr)+2.0*fm+fb); i1 = (16.0*i2 - i1)/15.0; T Q = 0; if ((std::abs(i1-i2) <= std::abs(is)) || (m <= a) || (b <= m)) { Q = i1; } else { if(cnt < maxint) { cnt = cnt + 1; Q = impl_adapt_simp_stop(f,a,m,fa,fml,fm,is,cnt) + impl_adapt_simp_stop(f,m,b,fm,fmr,fb,is,cnt); } } return Q; } // ---------------------------------------------------------------------------------------- template T integrate_function_adapt_simp( const funct& f, T a, T b, T tol = 1e-10 ) { // make sure requires clause is not broken DLIB_ASSERT(b > a && tol > 0, "\t T integrate_function_adapt_simp()" << "\n\t Invalid arguments were given to this function." << "\n\t a: " << a << "\n\t b: " << b << "\n\t tol: " << tol ); T eps = std::numeric_limits::epsilon(); if(tol < eps) { tol = eps; } const T ba = b-a; const T fa = f(a); const T fb = f(b); const T fm = f((a+b)/2); T is = ba/8*(fa+fb+fm+ f(a + 0.9501*ba) + f(a + 0.2311*ba) + f(a + 0.6068*ba) + f(a + 0.4860*ba) + f(a + 0.8913*ba)); if(is == 0) { is = b-a; } is = is*tol; int cnt = 0; return impl_adapt_simp_stop(f, a, b, fa, fm, fb, is, cnt); } } // ---------------------------------------------------------------------------------------- #endif // DLIB_INTEGRATE_FUNCTION_ADAPT_SIMPSONh_ ================================================ FILE: benchmarks/dlib/numerical_integration/integrate_function_adapt_simpson_abstract.h ================================================ // Copyright (C) 2013 Steve Taylor (steve98654@gmail.com) // License: Boost Software License See LICENSE.txt for the full license. #undef DLIB_INTEGRATE_FUNCTION_ADAPT_SIMPSON_ABSTRACTh_ #ifdef DLIB_INTEGRATE_FUNCTION_ADAPT_SIMPSON_ABSTRACTh_ namespace dlib { template T integrate_function_adapt_simp( const funct& f, T a, T b, T tol = 1e-10 ); /*! requires - b > a - tol > 0 - T should be either float, double, or long double - The expression f(a) should be a valid expression that evaluates to a T. I.e. f() should be a real valued function of a single variable. ensures - returns an approximation of the integral of f over the domain [a,b] using the adaptive Simpson method outlined in Gander, W. and W. Gautshi, "Adaptive Quadrature -- Revisited" BIT, Vol. 40, (2000), pp.84-101 - tol is a tolerance parameter that determines the overall accuracy of approximated integral. We suggest a default value of 1e-10 for tol. !*/ } #endif // DLIB_INTEGRATE_FUNCTION_ADAPT_SIMPSON_ABSTRACTh_ ================================================ FILE: benchmarks/dlib/numerical_integration.h ================================================ // Copyright (C) 2013 Steve Taylor (steve98654@gmail.com) // License: Boost Software License See LICENSE.txt for the full license. #ifndef DLIB_INTEGRATE_FUNCTION_ADAPT_SIMPSON_HEADER #define DLIB_INTEGRATE_FUNCTION_ADAPT_SIMPSON_HEADER #include "numerical_integration/integrate_function_adapt_simpson.h" #endif // DLIB_INTEGRATE_FUNCTION_ADAPT_SIMPSON_HEADER ================================================ FILE: benchmarks/dlib/ostream ================================================ #include "dlib_include_path_tutorial.txt" ================================================ FILE: benchmarks/dlib/pipe/pipe_kernel_1.h ================================================ // Copyright (C) 2006 Davis E. King (davis@dlib.net) // License: Boost Software License See LICENSE.txt for the full license. #ifndef DLIB_PIPE_KERNEl_1_ #define DLIB_PIPE_KERNEl_1_ #include "../algs.h" #include "../threads.h" #include "pipe_kernel_abstract.h" namespace dlib { template < typename T > class pipe { /*! INITIAL VALUE - pipe_size == 0 - pipe_max_size == defined by constructor - enabled == true - data == a pointer to an array of ((pipe_max_size>0)?pipe_max_size:1) T objects. - dequeue_waiters == 0 - enqueue_waiters == 0 - first == 1 - last == 1 - unblock_sig_waiters == 0 CONVENTION - size() == pipe_size - max_size() == pipe_max_size - is_enabled() == enabled - m == the mutex used to lock access to all the members of this class - dequeue_waiters == the number of threads blocked on calls to dequeue() - enqueue_waiters == the number of threads blocked on calls to enqueue() and wait_until_empty() - unblock_sig_waiters == the number of threads blocked on calls to wait_for_num_blocked_dequeues() and the destructor. (i.e. the number of blocking calls to unblock_sig.wait()) - dequeue_sig == the signaler that threads blocked on calls to dequeue() wait on - enqueue_sig == the signaler that threads blocked on calls to enqueue() or wait_until_empty() wait on. - unblock_sig == the signaler that is signaled when a thread stops blocking on a call to enqueue() or dequeue(). It is also signaled when a dequeue that will probably block is called. The destructor and wait_for_num_blocked_dequeues are the only things that will wait on this signaler. - if (pipe_size > 0) then - data[first] == the next item to dequeue - data[last] == the item most recently added via enqueue, so the last to dequeue. - else if (pipe_max_size == 0) - if (first == 0 && last == 0) then - data[0] == the next item to dequeue - else if (first == 0 && last == 1) then - data[0] has been taken out already by a dequeue !*/ public: // this is here for backwards compatibility with older versions of dlib. typedef pipe kernel_1a; typedef T type; explicit pipe ( size_t maximum_size ); virtual ~pipe ( ); void empty ( ); void wait_until_empty ( ) const; void wait_for_num_blocked_dequeues ( unsigned long num )const; void enable ( ); void disable ( ); bool is_enqueue_enabled ( ) const; void disable_enqueue ( ); void enable_enqueue ( ); bool is_dequeue_enabled ( ) const; void disable_dequeue ( ); void enable_dequeue ( ); bool is_enabled ( ) const; size_t max_size ( ) const; size_t size ( ) const; bool enqueue ( T& item ); bool enqueue ( T&& item ) { return enqueue(item); } bool dequeue ( T& item ); bool enqueue_or_timeout ( T& item, unsigned long timeout ); bool enqueue_or_timeout ( T&& item, unsigned long timeout ) { return enqueue_or_timeout(item,timeout); } bool dequeue_or_timeout ( T& item, unsigned long timeout ); private: size_t pipe_size; const size_t pipe_max_size; bool enabled; T* const data; size_t first; size_t last; mutex m; signaler dequeue_sig; signaler enqueue_sig; signaler unblock_sig; unsigned long dequeue_waiters; mutable unsigned long enqueue_waiters; mutable unsigned long unblock_sig_waiters; bool enqueue_enabled; bool dequeue_enabled; // restricted functions pipe(const pipe&); // copy constructor pipe& operator=(const pipe&); // assignment operator }; // ---------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------- // member function definitions // ---------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------- template < typename T > pipe:: pipe ( size_t maximum_size ) : pipe_size(0), pipe_max_size(maximum_size), enabled(true), data(new T[(maximum_size>0) ? maximum_size : 1]), first(1), last(1), dequeue_sig(m), enqueue_sig(m), unblock_sig(m), dequeue_waiters(0), enqueue_waiters(0), unblock_sig_waiters(0), enqueue_enabled(true), dequeue_enabled(true) { } // ---------------------------------------------------------------------------------------- template < typename T > pipe:: ~pipe ( ) { auto_mutex M(m); ++unblock_sig_waiters; // first make sure no one is blocked on any calls to enqueue() or dequeue() enabled = false; dequeue_sig.broadcast(); enqueue_sig.broadcast(); unblock_sig.broadcast(); // wait for all threads to unblock while (dequeue_waiters > 0 || enqueue_waiters > 0 || unblock_sig_waiters > 1) unblock_sig.wait(); delete [] data; --unblock_sig_waiters; } // ---------------------------------------------------------------------------------------- template < typename T > void pipe:: empty ( ) { auto_mutex M(m); pipe_size = 0; // let any calls to enqueue() know that the pipe is now empty if (enqueue_waiters > 0) enqueue_sig.broadcast(); } // ---------------------------------------------------------------------------------------- template < typename T > void pipe:: wait_until_empty ( ) const { auto_mutex M(m); // this function is sort of like a call to enqueue so treat it like that ++enqueue_waiters; while (pipe_size > 0 && enabled && dequeue_enabled ) enqueue_sig.wait(); // let the destructor know we are ending if it is blocked waiting if (enabled == false) unblock_sig.broadcast(); --enqueue_waiters; } // ---------------------------------------------------------------------------------------- template < typename T > void pipe:: enable ( ) { auto_mutex M(m); enabled = true; } // ---------------------------------------------------------------------------------------- template < typename T > void pipe:: disable ( ) { auto_mutex M(m); enabled = false; dequeue_sig.broadcast(); enqueue_sig.broadcast(); unblock_sig.broadcast(); } // ---------------------------------------------------------------------------------------- template < typename T > bool pipe:: is_enabled ( ) const { auto_mutex M(m); return enabled; } // ---------------------------------------------------------------------------------------- template < typename T > size_t pipe:: max_size ( ) const { auto_mutex M(m); return pipe_max_size; } // ---------------------------------------------------------------------------------------- template < typename T > size_t pipe:: size ( ) const { auto_mutex M(m); return pipe_size; } // ---------------------------------------------------------------------------------------- template < typename T > bool pipe:: enqueue ( T& item ) { auto_mutex M(m); ++enqueue_waiters; // wait until there is room or we are disabled while (pipe_size == pipe_max_size && enabled && enqueue_enabled && !(pipe_max_size == 0 && first == 1) ) enqueue_sig.wait(); if (enabled == false || enqueue_enabled == false) { --enqueue_waiters; // let the destructor know we are unblocking unblock_sig.broadcast(); return false; } // set the appropriate values for first and last if (pipe_size == 0) { first = 0; last = 0; } else { last = (last+1)%pipe_max_size; } exchange(item,data[last]); // wake up a call to dequeue() if there are any currently blocked if (dequeue_waiters > 0) dequeue_sig.signal(); if (pipe_max_size > 0) { ++pipe_size; } else { // wait for a dequeue to take the item out while (last == 0 && enabled && enqueue_enabled) enqueue_sig.wait(); if (last == 0 && (enabled == false || enqueue_enabled == false)) { last = 1; first = 1; // no one dequeued this object to put it back into item exchange(item,data[0]); --enqueue_waiters; // let the destructor know we are unblocking if (unblock_sig_waiters > 0) unblock_sig.broadcast(); return false; } last = 1; first = 1; // tell any waiting calls to enqueue() that one of them can proceed if (enqueue_waiters > 1) enqueue_sig.broadcast(); // let the destructor know we are unblocking if (enabled == false && unblock_sig_waiters > 0) unblock_sig.broadcast(); } --enqueue_waiters; return true; } // ---------------------------------------------------------------------------------------- template < typename T > bool pipe:: dequeue ( T& item ) { auto_mutex M(m); ++dequeue_waiters; if (pipe_size == 0) { // notify wait_for_num_blocked_dequeues() if (unblock_sig_waiters > 0) unblock_sig.broadcast(); // notify any blocked enqueue_or_timeout() calls if (enqueue_waiters > 0) enqueue_sig.broadcast(); } // wait until there is something in the pipe or we are disabled while (pipe_size == 0 && enabled && dequeue_enabled && !(pipe_max_size == 0 && first == 0 && last == 0) ) dequeue_sig.wait(); if (enabled == false || dequeue_enabled == false) { --dequeue_waiters; // let the destructor know we are unblocking unblock_sig.broadcast(); return false; } exchange(item,data[first]); if (pipe_max_size > 0) { // set the appropriate values for first first = (first+1)%pipe_max_size; --pipe_size; } else { // let the enqueue waiting on us know that we took the // item out already. last = 1; } // wake up a call to enqueue() if there are any currently blocked if (enqueue_waiters > 0) enqueue_sig.broadcast(); --dequeue_waiters; return true; } // ---------------------------------------------------------------------------------------- template < typename T > bool pipe:: enqueue_or_timeout ( T& item, unsigned long timeout ) { auto_mutex M(m); ++enqueue_waiters; // wait until there is room or we are disabled or // we run out of time. bool timed_out = false; while (pipe_size == pipe_max_size && enabled && enqueue_enabled && !(pipe_max_size == 0 && dequeue_waiters > 0 && first == 1) ) { if (timeout == 0 || enqueue_sig.wait_or_timeout(timeout) == false) { timed_out = true; break; } } if (enabled == false || timed_out || enqueue_enabled == false) { --enqueue_waiters; // let the destructor know we are unblocking unblock_sig.broadcast(); return false; } // set the appropriate values for first and last if (pipe_size == 0) { first = 0; last = 0; } else { last = (last+1)%pipe_max_size; } exchange(item,data[last]); // wake up a call to dequeue() if there are any currently blocked if (dequeue_waiters > 0) dequeue_sig.signal(); if (pipe_max_size > 0) { ++pipe_size; } else { // wait for a dequeue to take the item out while (last == 0 && enabled && enqueue_enabled) enqueue_sig.wait(); if (last == 0 && (enabled == false || enqueue_enabled == false)) { last = 1; first = 1; // no one dequeued this object to put it back into item exchange(item,data[0]); --enqueue_waiters; // let the destructor know we are unblocking if (unblock_sig_waiters > 0) unblock_sig.broadcast(); return false; } last = 1; first = 1; // tell any waiting calls to enqueue() that one of them can proceed if (enqueue_waiters > 1) enqueue_sig.broadcast(); // let the destructor know we are unblocking if (enabled == false && unblock_sig_waiters > 0) unblock_sig.broadcast(); } --enqueue_waiters; return true; } // ---------------------------------------------------------------------------------------- template < typename T > bool pipe:: dequeue_or_timeout ( T& item, unsigned long timeout ) { auto_mutex M(m); ++dequeue_waiters; if (pipe_size == 0) { // notify wait_for_num_blocked_dequeues() if (unblock_sig_waiters > 0) unblock_sig.broadcast(); // notify any blocked enqueue_or_timeout() calls if (enqueue_waiters > 0) enqueue_sig.broadcast(); } bool timed_out = false; // wait until there is something in the pipe or we are disabled or we timeout. while (pipe_size == 0 && enabled && dequeue_enabled && !(pipe_max_size == 0 && first == 0 && last == 0) ) { if (timeout == 0 || dequeue_sig.wait_or_timeout(timeout) == false) { timed_out = true; break; } } if (enabled == false || timed_out || dequeue_enabled == false) { --dequeue_waiters; // let the destructor know we are unblocking unblock_sig.broadcast(); return false; } exchange(item,data[first]); if (pipe_max_size > 0) { // set the appropriate values for first first = (first+1)%pipe_max_size; --pipe_size; } else { // let the enqueue waiting on us know that we took the // item out already. last = 1; } // wake up a call to enqueue() if there are any currently blocked if (enqueue_waiters > 0) enqueue_sig.broadcast(); --dequeue_waiters; return true; } // ---------------------------------------------------------------------------------------- template < typename T > void pipe:: wait_for_num_blocked_dequeues ( unsigned long num )const { auto_mutex M(m); ++unblock_sig_waiters; while ( (dequeue_waiters < num || pipe_size != 0) && enabled && dequeue_enabled) unblock_sig.wait(); // let the destructor know we are ending if it is blocked waiting if (enabled == false) unblock_sig.broadcast(); --unblock_sig_waiters; } // ---------------------------------------------------------------------------------------- template < typename T > bool pipe:: is_enqueue_enabled ( ) const { auto_mutex M(m); return enqueue_enabled; } // ---------------------------------------------------------------------------------------- template < typename T > void pipe:: disable_enqueue ( ) { auto_mutex M(m); enqueue_enabled = false; enqueue_sig.broadcast(); } // ---------------------------------------------------------------------------------------- template < typename T > void pipe:: enable_enqueue ( ) { auto_mutex M(m); enqueue_enabled = true; } // ---------------------------------------------------------------------------------------- template < typename T > bool pipe:: is_dequeue_enabled ( ) const { auto_mutex M(m); return dequeue_enabled; } // ---------------------------------------------------------------------------------------- template < typename T > void pipe:: disable_dequeue ( ) { auto_mutex M(m); dequeue_enabled = false; dequeue_sig.broadcast(); } // ---------------------------------------------------------------------------------------- template < typename T > void pipe:: enable_dequeue ( ) { auto_mutex M(m); dequeue_enabled = true; } // ---------------------------------------------------------------------------------------- } #endif // DLIB_PIPE_KERNEl_1_ ================================================ FILE: benchmarks/dlib/pipe/pipe_kernel_abstract.h ================================================ // Copyright (C) 2006 Davis E. King (davis@dlib.net) // License: Boost Software License See LICENSE.txt for the full license. #undef DLIB_PIPE_KERNEl_ABSTRACT_ #ifdef DLIB_PIPE_KERNEl_ABSTRACT_ #include "../threads.h" namespace dlib { template < typename T > class pipe { /*! REQUIREMENTS ON T T must be swappable by a global swap() T must have a default constructor INITIAL VALUE size() == 0 is_enabled() == true is_enqueue_enabled() == true is_dequeue_enabled() == true WHAT THIS OBJECT REPRESENTS This is a first in first out queue with a fixed maximum size containing items of type T. It is suitable for passing objects between threads. THREAD SAFETY All methods of this class are thread safe. You may call them from any thread and any number of threads my call them at once. !*/ public: typedef T type; explicit pipe ( size_t maximum_size ); /*! ensures - #*this is properly initialized - #max_size() == maximum_size throws - std::bad_alloc - dlib::thread_error !*/ virtual ~pipe ( ); /*! ensures - any resources associated with *this have been released - disables (i.e. sets is_enabled() == false) this object so that all calls currently blocking on it will return immediately. !*/ void enable ( ); /*! ensures - #is_enabled() == true !*/ void disable ( ); /*! ensures - #is_enabled() == false - causes all current and future calls to enqueue(), dequeue(), enqueue_or_timeout() and dequeue_or_timeout() to not block but to return false immediately until enable() is called. - causes all current and future calls to wait_until_empty() and wait_for_num_blocked_dequeues() to not block but return immediately until enable() is called. !*/ bool is_enabled ( ) const; /*! ensures - returns true if this pipe is currently enabled, false otherwise. !*/ void empty ( ); /*! ensures - #size() == 0 !*/ void wait_until_empty ( ) const; /*! ensures - blocks until one of the following is the case: - size() == 0 - is_enabled() == false - is_dequeue_enabled() == false !*/ void wait_for_num_blocked_dequeues ( unsigned long num ) const; /*! ensures - blocks until one of the following is the case: - size() == 0 and the number of threads blocked on calls to dequeue() and dequeue_or_timeout() is greater than or equal to num. - is_enabled() == false - is_dequeue_enabled() == false !*/ bool is_enqueue_enabled ( ) const; /*! ensures - returns true if the enqueue() and enqueue_or_timeout() functions are currently enabled, returns false otherwise. (note that the higher level is_enabled() function can overrule this one. So if is_enabled() == false then enqueue functions are still disabled even if is_enqueue_enabled() returns true. But if is_enqueue_enabled() == false then enqueue functions are always disabled no matter the state of is_enabled()) !*/ void disable_enqueue ( ); /*! ensures - #is_enqueue_enabled() == false - causes all current and future calls to enqueue() and enqueue_or_timeout() to not block but to return false immediately until enable_enqueue() is called. !*/ void enable_enqueue ( ); /*! ensures - #is_enqueue_enabled() == true !*/ bool is_dequeue_enabled ( ) const; /*! ensures - returns true if the dequeue() and dequeue_or_timeout() functions are currently enabled, returns false otherwise. (note that the higher level is_enabled() function can overrule this one. So if is_enabled() == false then dequeue functions are still disabled even if is_dequeue_enabled() returns true. But if is_dequeue_enabled() == false then dequeue functions are always disabled no matter the state of is_enabled()) !*/ void disable_dequeue ( ); /*! ensures - #is_dequeue_enabled() == false - causes all current and future calls to dequeue() and dequeue_or_timeout() to not block but to return false immediately until enable_dequeue() is called. !*/ void enable_dequeue ( ); /*! ensures - #is_dequeue_enabled() == true !*/ size_t max_size ( ) const; /*! ensures - returns the maximum number of objects of type T that this pipe can contain. !*/ size_t size ( ) const; /*! ensures - returns the number of objects of type T that this object currently contains. !*/ bool enqueue ( T& item ); /*! ensures - if (size() == max_size()) then - this call to enqueue() blocks until one of the following is the case: - there is room in the pipe for another item - max_size() == 0 and another thread is trying to dequeue from this pipe and we can pass our item object directly to that thread. - someone calls disable() - someone calls disable_enqueue() - else - this call does not block. - if (this call to enqueue() returns true) then - #is_enabled() == true - #is_enqueue_enabled() == true - if (max_size() == 0) then - using global swap, item was passed directly to a thread attempting to dequeue from this pipe - else - using global swap, item was added into this pipe. - #item is in an undefined but valid state for its type - else - item was NOT added into the pipe - #item == item (i.e. the value of item is unchanged) !*/ bool enqueue (T&& item) { return enqueue(item); } /*! enable enqueueing from rvalues !*/ bool enqueue_or_timeout ( T& item, unsigned long timeout ); /*! ensures - if (size() == max_size() && timeout > 0) then - this call to enqueue_or_timeout() blocks until one of the following is the case: - there is room in the pipe to add another item - max_size() == 0 and another thread is trying to dequeue from this pipe and we can pass our item object directly to that thread. - someone calls disable() - someone calls disable_enqueue() - timeout milliseconds passes - else - this call does not block. - if (this call to enqueue() returns true) then - #is_enabled() == true - #is_enqueue_enabled() == true - if (max_size() == 0) then - using global swap, item was passed directly to a thread attempting to dequeue from this pipe - else - using global swap, item was added into this pipe. - #item is in an undefined but valid state for its type - else - item was NOT added into the pipe - #item == item (i.e. the value of item is unchanged) !*/ bool enqueue_or_timeout (T&& item, unsigned long timeout) { return enqueue_or_timeout(item,timeout); } /*! enable enqueueing from rvalues !*/ bool dequeue ( T& item ); /*! ensures - if (size() == 0) then - this call to dequeue() blocks until one of the following is the case: - there is something in the pipe we can dequeue - max_size() == 0 and another thread is trying to enqueue an item onto this pipe and we can receive our item directly from that thread. - someone calls disable() - someone calls disable_dequeue() - else - this call does not block. - if (this call to dequeue() returns true) then - #is_enabled() == true - #is_dequeue_enabled() == true - the oldest item that was enqueued into this pipe has been swapped into #item. - else - nothing was dequeued from this pipe. - #item == item (i.e. the value of item is unchanged) !*/ bool dequeue_or_timeout ( T& item, unsigned long timeout ); /*! ensures - if (size() == 0 && timeout > 0) then - this call to dequeue_or_timeout() blocks until one of the following is the case: - there is something in the pipe we can dequeue - max_size() == 0 and another thread is trying to enqueue an item onto this pipe and we can receive our item directly from that thread. - someone calls disable() - someone calls disable_dequeue() - timeout milliseconds passes - else - this call does not block. - if (this call to dequeue_or_timeout() returns true) then - #is_enabled() == true - #is_dequeue_enabled() == true - the oldest item that was enqueued into this pipe has been swapped into #item. - else - nothing was dequeued from this pipe. - #item == item (i.e. the value of item is unchanged) !*/ private: // restricted functions pipe(const pipe&); // copy constructor pipe& operator=(const pipe&); // assignment operator }; } #endif // DLIB_PIPE_KERNEl_ABSTRACT_ ================================================ FILE: benchmarks/dlib/pipe.h ================================================ // Copyright (C) 2006 Davis E. King (davis@dlib.net) // License: Boost Software License See LICENSE.txt for the full license. #ifndef DLIB_PIPe_ #define DLIB_PIPe_ #include "pipe/pipe_kernel_1.h" #endif // DLIB_PIPe_ ================================================ FILE: benchmarks/dlib/platform.h ================================================ // Copyright (C) 2006 Davis E. King (davis@dlib.net) // License: Boost Software License See LICENSE.txt for the full license. #ifdef DLIB_ALL_SOURCE_END #include "dlib_basic_cpp_build_tutorial.txt" #endif #ifndef DLIB_PLATFORm_ #define DLIB_PLATFORm_ /*! This file ensures that: - if (we are compiling under a posix platform) then - DLIB_POSIX will be defined - if (this is also Mac OS X) then - MACOSX will be defined - if (this is also HP-UX) then - HPUX will be defined - if (we are compiling under an MS Windows platform) then - WIN32 will be defined !*/ /* A good reference for this sort of information is http://predef.sourceforge.net/ */ // Define WIN32 if this is MS Windows #ifndef WIN32 #if defined( _MSC_VER) || defined(__BORLANDC__) || defined(_WIN32) || defined(__WIN32__) || defined(__TOS_WIN__) #define WIN32 #endif #endif #ifndef WIN32 // since this is the only other platform the library currently supports // just assume it is DLIB_POSIX if it isn't WIN32 #ifndef DLIB_POSIX #define DLIB_POSIX #endif #ifndef HPUX #if defined(__hpux ) || defined(hpux) || defined (_hpux) #define HPUX #endif #endif #ifndef MACOSX #ifdef __MACOSX__ #define MACOSX #endif #ifdef __APPLE__ #define MACOSX #endif #endif #endif #endif // DLIB_PLATFORm_ ================================================ FILE: benchmarks/dlib/queue/queue_kernel_1.h ================================================ // Copyright (C) 2003 Davis E. King (davis@dlib.net) // License: Boost Software License See LICENSE.txt for the full license. #ifndef DLIB_QUEUE_KERNEl_1_ #define DLIB_QUEUE_KERNEl_1_ #include "queue_kernel_abstract.h" #include "../algs.h" #include "../interfaces/enumerable.h" #include "../interfaces/remover.h" #include "../serialize.h" namespace dlib { template < typename T, typename mem_manager = default_memory_manager > class queue_kernel_1 : public enumerable, public remover { /*! INITIAL VALUE queue_size == 0 current_element == 0 at_start_ == true CONVENTION queue_size == the number of elements in the queue at_start() == at_start_ current_element_valid() == (current_element != 0) element() == current_element->item if (queue_size > 0) { in points to the last element to be inserted into the queue out points to the next element to be dequeued each node points to the node inserted after it except for the most recently inserted node current_element == 0 } !*/ struct node { node* last; T item; }; public: typedef T type; typedef mem_manager mem_manager_type; queue_kernel_1 ( ) : in(0), out(0), queue_size(0), current_element(0), at_start_(true) { } virtual ~queue_kernel_1 ( ); inline void clear( ); void enqueue ( T& item ); void dequeue ( T& item ); void cat ( queue_kernel_1& item ); T& current ( ); const T& current ( ) const; void swap ( queue_kernel_1& item ); // functions from the remover interface inline void remove_any ( T& item ); // functions from the enumerable interface inline size_t size ( ) const; inline bool at_start ( ) const; inline void reset ( ) const; bool current_element_valid ( ) const; inline const T& element ( ) const; inline T& element ( ); bool move_next ( ) const; private: void delete_nodes ( node* start, unsigned long length ); /*! requires - start points to a node in a singly linked list - start->last points to the next node in the list - there are at least length nodes in the list beginning with start ensures - length nodes have been deleted starting with the node pointed to by start !*/ // data members node* in; node* out; unsigned long queue_size; mutable node* current_element; mutable bool at_start_; // restricted functions queue_kernel_1(queue_kernel_1&); // copy constructor queue_kernel_1& operator=(queue_kernel_1&); // assignment operator }; template < typename T, typename mem_manager > inline void swap ( queue_kernel_1& a, queue_kernel_1& b ) { a.swap(b); } template < typename T, typename mem_manager > void deserialize ( queue_kernel_1& item, std::istream& in ) { try { item.clear(); unsigned long size; deserialize(size,in); T temp; for (unsigned long i = 0; i < size; ++i) { deserialize(temp,in); item.enqueue(temp); } } catch (serialization_error& e) { item.clear(); throw serialization_error(e.info + "\n while deserializing object of type queue_kernel_1"); } } // ---------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------- // member function definitions // ---------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------- template < typename T, typename mem_manager > queue_kernel_1:: ~queue_kernel_1 ( ) { delete_nodes(out,queue_size); } // ---------------------------------------------------------------------------------------- template < typename T, typename mem_manager > void queue_kernel_1:: clear ( ) { delete_nodes(out,queue_size); queue_size = 0; // put the enumerator at the start reset(); } // ---------------------------------------------------------------------------------------- template < typename T, typename mem_manager > void queue_kernel_1:: enqueue ( T& item ) { // make new node node* temp = new node; // swap item into new node exchange(item,temp->item); if (queue_size == 0) out = temp; else in->last = temp; // make in point to the new node in = temp; ++queue_size; // put the enumerator at the start reset(); } // ---------------------------------------------------------------------------------------- template < typename T, typename mem_manager > void queue_kernel_1:: dequeue ( T& item ) { // swap out into item exchange(item,out->item); --queue_size; if (queue_size == 0) { delete out; } else { node* temp = out; // move out pointer to the next element in the queue out = out->last; // delete old node delete temp; } // put the enumerator at the start reset(); } // ---------------------------------------------------------------------------------------- template < typename T, typename mem_manager > void queue_kernel_1:: cat ( queue_kernel_1& item ) { if (item.queue_size > 0) { if (queue_size > 0) { in->last = item.out; } else { out = item.out; } in = item.in; queue_size += item.queue_size; item.queue_size = 0; } // put the enumerator at the start reset(); } // ---------------------------------------------------------------------------------------- template < typename T, typename mem_manager > T& queue_kernel_1:: current ( ) { return out->item; } // ---------------------------------------------------------------------------------------- template < typename T, typename mem_manager > const T& queue_kernel_1:: current ( ) const { return out->item; } // ---------------------------------------------------------------------------------------- template < typename T, typename mem_manager > void queue_kernel_1:: swap ( queue_kernel_1& item ) { node* in_temp = in; node* out_temp = out; unsigned long queue_size_temp = queue_size; node* current_element_temp = current_element; bool at_start_temp = at_start_; in = item.in; out = item.out; queue_size = item.queue_size; current_element = item.current_element; at_start_ = item.at_start_; item.in = in_temp; item.out = out_temp; item.queue_size = queue_size_temp; item.current_element = current_element_temp; item.at_start_ = at_start_temp; } // ---------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------- // enumerable function definitions // ---------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------- template < typename T, typename mem_manager > bool queue_kernel_1:: at_start ( ) const { return at_start_; } // ---------------------------------------------------------------------------------------- template < typename T, typename mem_manager > size_t queue_kernel_1:: size ( ) const { return queue_size; } // ---------------------------------------------------------------------------------------- template < typename T, typename mem_manager > void queue_kernel_1:: reset ( ) const { at_start_ = true; current_element = 0; } // ---------------------------------------------------------------------------------------- template < typename T, typename mem_manager > bool queue_kernel_1:: current_element_valid ( ) const { return (current_element != 0); } // ---------------------------------------------------------------------------------------- template < typename T, typename mem_manager > const T& queue_kernel_1:: element ( ) const { return current_element->item; } // ---------------------------------------------------------------------------------------- template < typename T, typename mem_manager > T& queue_kernel_1:: element ( ) { return current_element->item; } // ---------------------------------------------------------------------------------------- template < typename T, typename mem_manager > bool queue_kernel_1:: move_next ( ) const { if (at_start_) { at_start_ = false; // if the queue is empty then there is nothing to do if (queue_size == 0) { return false; } else { current_element = out; return true; } } else { // if we are at the last element then the enumeration has finished if (current_element == in || current_element == 0) { current_element = 0; return false; } else { current_element = current_element->last; return true; } } } // ---------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------- // remover function definitions // ---------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------- template < typename T, typename mem_manager > void queue_kernel_1:: remove_any ( T& item ) { dequeue(item); } // ---------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------- // private member function definitions // ---------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------- template < typename T, typename mem_manager > void queue_kernel_1:: delete_nodes ( node* start, unsigned long length ) { node* temp; while (length) { temp = start->last; delete start; start = temp; --length; } } // ---------------------------------------------------------------------------------------- } #endif // DLIB_QUEUE_KERNEl_1_ ================================================ FILE: benchmarks/dlib/queue/queue_kernel_2.h ================================================ // Copyright (C) 2004 Davis E. King (davis@dlib.net) // License: Boost Software License See LICENSE.txt for the full license. #ifndef DLIB_QUEUE_KERNEl_2_ #define DLIB_QUEUE_KERNEl_2_ #include "queue_kernel_abstract.h" #include "../algs.h" #include "../assert.h" #include "../interfaces/enumerable.h" #include "../interfaces/remover.h" #include "../serialize.h" namespace dlib { template < typename T, unsigned long block_size, typename mem_manager = default_memory_manager > class queue_kernel_2 : public enumerable, public remover { /*! REQUIREMENTS ON block_size 0 < block_size < 2000000000 INITIAL VALUE queue_size == 0 current_element == 0 at_start_ == true CONVENTION queue_size == the number of elements in the queue at_start() == at_start_ current_element_valid() == (current_element != 0) if (current_element_valid()) then element() == current_element->item[current_element_pos] if (queue_size > 0) { in->item[in_pos] == the spot where we will put the next item added into the queue out->item[out_pos] == current() when enqueuing elements inside each node item[0] is filled first, then item[1], then item[2], etc. each node points to the node inserted after it except for the most recently inserted node. } !*/ struct node { node* next; T item[block_size]; }; public: typedef T type; typedef mem_manager mem_manager_type; queue_kernel_2 ( ) : in(0), out(0), queue_size(0), current_element(0), at_start_(true) { } virtual ~queue_kernel_2 ( ); inline void clear( ); void enqueue ( T& item ); void dequeue ( T& item ); void cat ( queue_kernel_2& item ); T& current ( ); const T& current ( ) const; void swap ( queue_kernel_2& item ); // functions from the remover interface inline void remove_any ( T& item ); // functions from the enumerable interface inline size_t size ( ) const; inline bool at_start ( ) const; inline void reset ( ) const; bool current_element_valid ( ) const; inline const T& element ( ) const; inline T& element ( ); bool move_next ( ) const; private: void delete_nodes ( node* start, node* end ); /*! requires - start points to a node in a singly linked list - start->next points to the next node in the list - by following the next pointers you eventually hit the node pointed to by end ensures - calls delete on the start node, the end node, and all nodes in between !*/ // data members typename mem_manager::template rebind::other pool; node* in; node* out; size_t queue_size; size_t in_pos; size_t out_pos; mutable node* current_element; mutable size_t current_element_pos; mutable bool at_start_; // restricted functions queue_kernel_2(queue_kernel_2&); // copy constructor queue_kernel_2& operator=(queue_kernel_2&); // assignment operator }; template < typename T, unsigned long block_size, typename mem_manager > inline void swap ( queue_kernel_2& a, queue_kernel_2& b ) { a.swap(b); } template < typename T, unsigned long block_size, typename mem_manager > void deserialize ( queue_kernel_2& item, std::istream& in ) { try { item.clear(); unsigned long size; deserialize(size,in); T temp; for (unsigned long i = 0; i < size; ++i) { deserialize(temp,in); item.enqueue(temp); } } catch (serialization_error& e) { item.clear(); throw serialization_error(e.info + "\n while deserializing object of type queue_kernel_2"); } } // ---------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------- // member function definitions // ---------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------- template < typename T, unsigned long block_size, typename mem_manager > queue_kernel_2:: ~queue_kernel_2 ( ) { COMPILE_TIME_ASSERT(0 < block_size && block_size < (unsigned long)(2000000000)); if (queue_size > 0) delete_nodes(out,in); } // ---------------------------------------------------------------------------------------- template < typename T, unsigned long block_size, typename mem_manager > void queue_kernel_2:: clear ( ) { if (queue_size > 0) { delete_nodes(out,in); queue_size = 0; } // put the enumerator at the start reset(); } // ---------------------------------------------------------------------------------------- template < typename T, unsigned long block_size, typename mem_manager > void queue_kernel_2:: enqueue ( T& item ) { if (queue_size == 0) { out = in = pool.allocate(); in_pos = 0; out_pos = 0; } else if (in_pos >= block_size) { in->next = pool.allocate(); in_pos = 0; in = in->next; } exchange(item,in->item[in_pos]); ++in_pos; ++queue_size; // put the enumerator at the start reset(); } // ---------------------------------------------------------------------------------------- template < typename T, unsigned long block_size, typename mem_manager > void queue_kernel_2:: dequeue ( T& item ) { // swap out into item exchange(item,out->item[out_pos]); ++out_pos; --queue_size; // if this was the last element in this node then remove this node if (out_pos == block_size) { out_pos = 0; node* temp = out; out = out->next; pool.deallocate(temp); } else if (queue_size == 0) { pool.deallocate(out); } // put the enumerator at the start reset(); } // ---------------------------------------------------------------------------------------- template < typename T, unsigned long block_size, typename mem_manager > void queue_kernel_2:: cat ( queue_kernel_2& item ) { if (queue_size > 0) { T temp; assign_zero_if_built_in_scalar_type(temp); while (item.size() > 0) { item.dequeue(temp); enqueue(temp); } } else { in = item.in; out = item.out; out_pos = item.out_pos; in_pos = item.in_pos; queue_size = item.queue_size; item.queue_size = 0; // put the enumerator at the start reset(); } } // ---------------------------------------------------------------------------------------- template < typename T, unsigned long block_size, typename mem_manager > T& queue_kernel_2:: current ( ) { return out->item[out_pos]; } // ---------------------------------------------------------------------------------------- template < typename T, unsigned long block_size, typename mem_manager > const T& queue_kernel_2:: current ( ) const { return out->item[out_pos]; } // ---------------------------------------------------------------------------------------- template < typename T, unsigned long block_size, typename mem_manager > void queue_kernel_2:: swap ( queue_kernel_2& item ) { exchange(in,item.in); exchange(out,item.out); exchange(queue_size,item.queue_size); exchange(in_pos,item.in_pos); exchange(out_pos,item.out_pos); exchange(current_element,item.current_element); exchange(current_element_pos,item.current_element_pos); exchange(at_start_,item.at_start_); pool.swap(item.pool); } // ---------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------- // enumerable function definitions // ---------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------- template < typename T, unsigned long block_size, typename mem_manager > size_t queue_kernel_2:: size ( ) const { return queue_size; } // ---------------------------------------------------------------------------------------- template < typename T, unsigned long block_size, typename mem_manager > bool queue_kernel_2:: at_start ( ) const { return at_start_; } // ---------------------------------------------------------------------------------------- template < typename T, unsigned long block_size, typename mem_manager > void queue_kernel_2:: reset ( ) const { at_start_ = true; current_element = 0; } // ---------------------------------------------------------------------------------------- template < typename T, unsigned long block_size, typename mem_manager > bool queue_kernel_2:: current_element_valid ( ) const { return (current_element != 0); } // ---------------------------------------------------------------------------------------- template < typename T, unsigned long block_size, typename mem_manager > const T& queue_kernel_2:: element ( ) const { return current_element->item[current_element_pos]; } // ---------------------------------------------------------------------------------------- template < typename T, unsigned long block_size, typename mem_manager > T& queue_kernel_2:: element ( ) { return current_element->item[current_element_pos]; } // ---------------------------------------------------------------------------------------- template < typename T, unsigned long block_size, typename mem_manager > bool queue_kernel_2:: move_next ( ) const { if (at_start_) { at_start_ = false; // if the queue is empty then there is nothing to do if (queue_size == 0) { return false; } else { current_element = out; current_element_pos = out_pos; return true; } } else if (current_element == 0) { return false; } else { ++current_element_pos; // if we are at the last element then the enumeration has finished if (current_element == in && current_element_pos == in_pos ) { current_element = 0; return false; } else if (current_element_pos == block_size) { current_element_pos = 0; current_element = current_element->next; } return true; } } // ---------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------- // remover function definitions // ---------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------- template < typename T, unsigned long block_size, typename mem_manager > void queue_kernel_2:: remove_any ( T& item ) { dequeue(item); } // ---------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------- // private member function definitions // ---------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------- template < typename T, unsigned long block_size, typename mem_manager > void queue_kernel_2:: delete_nodes ( node* start, node* end ) { node* temp; while (start != end) { temp = start; start = start->next; pool.deallocate(temp); } pool.deallocate(start); } // ---------------------------------------------------------------------------------------- } #endif // DLIB_QUEUE_KERNEl_2_ ================================================ FILE: benchmarks/dlib/queue/queue_kernel_abstract.h ================================================ // Copyright (C) 2003 Davis E. King (davis@dlib.net) // License: Boost Software License See LICENSE.txt for the full license. #undef DLIB_QUEUE_KERNEl_ABSTRACT_ #ifdef DLIB_QUEUE_KERNEl_ABSTRACT_ #include "../interfaces/enumerable.h" #include "../interfaces/remover.h" #include "../serialize.h" #include "../algs.h" namespace dlib { template < typename T, typename mem_manager = default_memory_manager > class queue : public enumerable, public remover { /*! REQUIREMENTS ON T T must be swappable by a global swap() T must have a default constructor REQUIREMENTS ON mem_manager must be an implementation of memory_manager/memory_manager_kernel_abstract.h or must be an implementation of memory_manager_global/memory_manager_global_kernel_abstract.h or must be an implementation of memory_manager_stateless/memory_manager_stateless_kernel_abstract.h mem_manager::type can be set to anything. POINTERS AND REFERENCES TO INTERNAL DATA swap() and current() functions do not invalidate pointers or references to internal data. All other functions have no such guarantee. INITIAL VALUE size() == 0 ENUMERATION ORDER The enumerator will iterate over the elements in the queue in the same order they would be removed by repeated calls to dequeue(). (e.g. current() would be the first element enumerated) WHAT THIS OBJECT REPRESENTS This is a first in first out queue containing items of type T e.g. if the queue is {b,c,d,e} and then 'a' is enqueued the queue becomes {a,b,c,d,e} and then calling dequeue takes e out making the queue {a,b,c,d} Also note that unless specified otherwise, no member functions of this object throw exceptions. !*/ public: typedef T type; typedef mem_manager mem_manager_type; queue ( ); /*! ensures - #*this is properly initialized throws - std::bad_alloc or any exception thrown by T's constructor !*/ virtual ~queue ( ); /*! ensures - all memory associated with *this has been released !*/ void clear( ); /*! ensures - #*this has its initial value throws - std::bad_alloc or any exception thrown by T's constructor if this exception is thrown then *this is unusable until clear() is called and succeeds !*/ void enqueue ( T& item ); /*! ensures - item is now at the left end of #*this - #item has an initial value for its type - #size() == size() + 1 - #at_start() == true throws - std::bad_alloc or any exception thrown by T's constructor if enqueue() throws then it has no effect !*/ void dequeue ( T& item ); /*! requires - size() != 0 ensures - #size() == size() - 1 - the far right element of *this has been removed and swapped into #item - #at_start() == true !*/ void cat ( queue& item ); /*! ensures - item has been concatenated onto the left end of *this. i.e. item.current() is attached onto the left end of *this and the left most element in item will also be the left most item in #*this - #size() == size() + item.size() - #item has its initial value - #at_start() == true throws - std::bad_alloc or any exception thrown by T's constructor if cat() throws then the state of #item and *this is undefined until clear() is successfully called on them. !*/ T& current ( ); /*! requires - size() != 0 ensures - returns a const reference to the next element to be dequeued. i.e. the right most element. !*/ const T& current ( ) const; /*! requires - size() != 0 ensures - returns a non-const reference to the next element to be dequeued. i.e. the right most element. !*/ void swap ( queue& item ); /*! ensures - swaps *this and item !*/ private: // restricted functions queue(queue&); // copy constructor queue& operator=(queue&); // assignment operator }; template < typename T, typename mem_manager > inline void swap ( queue& a, queue& b ) { a.swap(b); } /*! provides a global swap function !*/ template < typename T, typename mem_manager > void deserialize ( queue& item, std::istream& in ); /*! provides deserialization support !*/ } #endif // DLIB_QUEUE_KERNEl_ABSTRACT_ ================================================ FILE: benchmarks/dlib/queue/queue_kernel_c.h ================================================ // Copyright (C) 2003 Davis E. King (davis@dlib.net) // License: Boost Software License See LICENSE.txt for the full license. #ifndef DLIB_QUEUE_KERNEl_C_ #define DLIB_QUEUE_KERNEl_C_ #include "queue_kernel_abstract.h" #include "../algs.h" #include "../assert.h" namespace dlib { template < typename queue_base // is an implementation of queue_kernel_abstract.h > class queue_kernel_c : public queue_base { typedef typename queue_base::type T; public: void dequeue ( T& item ); T& current ( ); const T& current ( ) const; const T& element ( ) const; T& element ( ); void remove_any ( T& item ); }; template < typename queue_base > inline void swap ( queue_kernel_c& a, queue_kernel_c& b ) { a.swap(b); } // ---------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------- // member function definitions // ---------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------- template < typename queue_base > void queue_kernel_c:: dequeue ( T& item ) { // make sure requires clause is not broken DLIB_CASSERT(this->size() != 0, "\tvoid queue::dequeue" << "\n\tsize of queue should not be zero" << "\n\tthis: " << this ); // call the real function queue_base::dequeue(item); } // ---------------------------------------------------------------------------------------- template < typename queue_base > const typename queue_base::type& queue_kernel_c:: current ( ) const { // make sure requires clause is not broken DLIB_CASSERT(this->size() != 0, "\tconst T& queue::current" << "\n\tsize of queue should not be zero" << "\n\tthis: " << this ); // call the real function return queue_base::current(); } // ---------------------------------------------------------------------------------------- template < typename queue_base > typename queue_base::type& queue_kernel_c:: current ( ) { // make sure requires clause is not broken DLIB_CASSERT(this->size() != 0, "\tT& queue::current" << "\n\tsize of queue should not be zero" << "\n\tthis: " << this ); // call the real function return queue_base::current(); } // ---------------------------------------------------------------------------------------- template < typename queue_base > const typename queue_base::type& queue_kernel_c:: element ( ) const { // make sure requires clause is not broken DLIB_CASSERT(this->current_element_valid() == true, "\tconst T& queue::element" << "\n\tyou can't access the current element if it doesn't exist" << "\n\tthis: " << this ); // call the real function return queue_base::element(); } // ---------------------------------------------------------------------------------------- template < typename queue_base > typename queue_base::type& queue_kernel_c:: element ( ) { // make sure requires clause is not broken DLIB_CASSERT(this->current_element_valid() == true, "\tT& queue::element" << "\n\tyou can't access the current element if it doesn't exist" << "\n\tthis: " << this ); // call the real function return queue_base::element(); } // ---------------------------------------------------------------------------------------- template < typename queue_base > void queue_kernel_c:: remove_any ( T& item ) { // make sure requires clause is not broken DLIB_CASSERT( (this->size() > 0), "\tvoid queue::remove_any" << "\n\tsize() must be greater than zero if something is going to be removed" << "\n\tsize(): " << this->size() << "\n\tthis: " << this ); // call the real function queue_base::remove_any(item); } // ---------------------------------------------------------------------------------------- } #endif // DLIB_QUEUE_KERNEl_C_ ================================================ FILE: benchmarks/dlib/queue/queue_sort_1.h ================================================ // Copyright (C) 2003 Davis E. King (davis@dlib.net) // License: Boost Software License See LICENSE.txt for the full license. #ifndef DLIB_QUEUE_SORt_1_ #define DLIB_QUEUE_SORt_1_ #include "queue_sort_abstract.h" #include "../algs.h" #include #include "../sort.h" namespace dlib { template < typename queue_base > class queue_sort_1 : public queue_base { typedef typename queue_base::type T; public: /*! This implementation uses the QuickSort algorithm and when the quicksort depth goes too high it uses the dlib::qsort_array() function on the data. !*/ void sort ( ); template void sort ( const compare_type& compare ) { if (this->size() > 1) { sort_this_queue(*this,0,compare); } } private: template void sort_this_queue ( queue_base& queue, long depth, const compare_type& compare ) /*! ensures each element in the queue is < the element behind it according to compare !*/ { if (queue.size() <= 1) { // already sorted } else if (queue.size() <= 29) { T vect[29]; const unsigned long size = queue.size(); for (unsigned long i = 0; i < size; ++i) { queue.dequeue(vect[i]); } isort_array(vect,0,size-1,compare); for (unsigned long i = 0; i < size; ++i) { queue.enqueue(vect[i]); } } else if (depth > 50) { std::vector vect(queue.size()); for (unsigned long i = 0; i < vect.size(); ++i) { queue.dequeue(vect[i]); } hsort_array(vect,0,vect.size()-1,compare); for (unsigned long i = 0; i < vect.size(); ++i) { queue.enqueue(vect[i]); } } else { queue_base left, right; T partition_element; T temp; // do this just to avoid a compiler warning assign_zero_if_built_in_scalar_type(temp); assign_zero_if_built_in_scalar_type(partition_element); queue.dequeue(partition_element); // partition queue into left and right while (queue.size() > 0) { queue.dequeue(temp); if (compare(temp , partition_element)) { left.enqueue(temp); } else { right.enqueue(temp); } } long ratio; if (left.size() > right.size()) ratio = left.size()/(right.size()+1); // add 1 so we can't divide by zero else ratio = right.size()/(left.size()+1); sort_this_queue(left,ratio+depth,compare); sort_this_queue(right,ratio+depth,compare); // combine the two queues left.swap(queue); queue.enqueue(partition_element); queue.cat(right); } } }; template < typename queue_base > inline void swap ( queue_sort_1& a, queue_sort_1& b ) { a.swap(b); } // ---------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------- // member function definitions // ---------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------- template < typename queue_base > void queue_sort_1:: sort ( ) { if (this->size() > 1) { sort_this_queue(*this,0,std::less()); } } // ---------------------------------------------------------------------------------------- } #endif // DLIB_QUEUE_SORt_1_ ================================================ FILE: benchmarks/dlib/queue/queue_sort_abstract.h ================================================ // Copyright (C) 2003 Davis E. King (davis@dlib.net) // License: Boost Software License See LICENSE.txt for the full license. #undef DLIB_QUEUE_SORt_ABSTRACT_ #ifdef DLIB_QUEUE_SORt_ABSTRACT_ #include "queue_kernel_abstract.h" namespace dlib { template < typename queue_base > class queue_sort : public queue_base { /*! REQUIREMENTS ON QUEUE_BASE - is an implementation of queue/queue_kernel_abstract.h - queue_base::type must be a type with that is comparable via operator< POINTERS AND REFERENCES TO INTERNAL DATA sort() may invalidate pointers and references to internal data. WHAT THIS EXTENSION DOES FOR QUEUE This gives a queue the ability to sort its contents by calling sort(). !*/ public: void sort ( ); /*! ensures - for all elements in #*this the ith element is <= the i+1 element - #at_start() == true throws - std::bad_alloc or any exception thrown by T's constructor data may be lost if sort() throws !*/ template void sort ( const compare_type& compare ); /*! ensures - for all elements in #*this the ith element is <= the i+1 element - uses compare(a,b) as the < operator. So if compare(a,b) == true then a comes before b in the resulting ordering. - #at_start() == true throws - std::bad_alloc or any exception thrown by T's constructor data may be lost if sort() throws !*/ }; template < template queue_base > inline void swap ( queue_sort& a, queue_sort& b ) { a.swap(b); } /*! provides a global swap function !*/ } #endif // DLIB_QUEUE_SORt_ABSTRACT_ ================================================ FILE: benchmarks/dlib/queue.h ================================================ // Copyright (C) 2003 Davis E. King (davis@dlib.net) // License: Boost Software License See LICENSE.txt for the full license. #ifndef DLIB_QUEUe_ #define DLIB_QUEUe_ #include "queue/queue_kernel_1.h" #include "queue/queue_kernel_2.h" #include "queue/queue_kernel_c.h" #include "queue/queue_sort_1.h" #include "algs.h" namespace dlib { template < typename T, typename mem_manager = default_memory_manager > class queue { queue() {} public: //----------- kernels --------------- // kernel_1a typedef queue_kernel_1 kernel_1a; typedef queue_kernel_c kernel_1a_c; // kernel_2a typedef queue_kernel_2 kernel_2a; typedef queue_kernel_c kernel_2a_c; // kernel_2b typedef queue_kernel_2 kernel_2b; typedef queue_kernel_c kernel_2b_c; //---------- extensions ------------ // sort_1 extend kernel_1a typedef queue_sort_1 sort_1a; typedef queue_sort_1 sort_1a_c; // sort_1 extend kernel_2a typedef queue_sort_1 sort_1b; typedef queue_sort_1 sort_1b_c; // sort_1 extend kernel_2b typedef queue_sort_1 sort_1c; typedef queue_sort_1 sort_1c_c; }; } #endif // DLIB_QUEUe_ ================================================ FILE: benchmarks/dlib/ref.h ================================================ // Copyright (C) 2010 Davis E. King (davis@dlib.net) // License: Boost Software License See LICENSE.txt for the full license. #ifndef DLIB_REFERENCE_WRAPpER_H_ #define DLIB_REFERENCE_WRAPpER_H_ namespace dlib { // ---------------------------------------------------------------------------------------- template< typename T > class reference_wrapper { /*! WHAT THIS OBJECT REPRESENTS This is a simple object that just holds a reference to another object. It is useful because it can serve as a kind of "copyable reference". !*/ public: typedef T type; explicit reference_wrapper(T& o) : obj(&o) {} operator T&() const { return *obj; } T& get() const { return *obj; } private: T* obj; }; // ---------------------------------------------------------------------------------------- template reference_wrapper ref( T& obj ) { return reference_wrapper(obj); } /*! ensures - returns a reference_wrapper that contains a reference to obj. !*/ // ---------------------------------------------------------------------------------------- template reference_wrapper ref( reference_wrapper obj ) { return obj; } /*! ensures - returns the given reference_wrapper object without modification !*/ // ---------------------------------------------------------------------------------------- template reference_wrapper cref( const T& obj ) { return reference_wrapper(obj); } /*! ensures - returns a reference_wrapper that contains a constant reference to obj. !*/ // ---------------------------------------------------------------------------------------- template reference_wrapper cref( reference_wrapper obj ) { return cref(obj.get()); } /*! ensures - converts the given reference_wrapper into a reference_wrapper that contains a constant reference. !*/ // ---------------------------------------------------------------------------------------- } #endif // DLIB_REFERENCE_WRAPpER_H_ ================================================ FILE: benchmarks/dlib/revision.h ================================================ #ifndef DLIB_REVISION_H #define DLIB_MAJOR_VERSION 19 #define DLIB_MINOR_VERSION 21 #define DLIB_PATCH_VERSION 99 #endif ================================================ FILE: benchmarks/dlib/serialize.h ================================================ // Copyright (C) 2005 Davis E. King (davis@dlib.net) // License: Boost Software License See LICENSE.txt for the full license. #ifndef DLIB_SERIALIZe_ #define DLIB_SERIALIZe_ /*! There are two global functions in the dlib namespace that provide serialization and deserialization support. Their signatures and specifications are as follows: void serialize ( const serializable_type& item, std::ostream& out ); /!* ensures - writes the state of item to the output stream out - if (serializable_type implements the enumerable interface) then - item.at_start() == true throws - serialization_error This exception is thrown if there is some problem which prevents us from successfully writing item to the output stream. - any other exception *!/ void deserialize ( serializable_type& item, std::istream& in ); /!* ensures - #item == a deserialized copy of the serializable_type that was in the input stream in. - Reads all the bytes associated with the serialized serializable_type contained inside the input stream and no more. This means you can serialize multiple objects to an output stream and then read them all back in, one after another, using deserialize(). - if (serializable_type implements the enumerable interface) then - item.at_start() == true throws - serialization_error This exception is thrown if there is some problem which prevents us from successfully deserializing item from the input stream. If this exception is thrown then item will have an initial value for its type. - any other exception *!/ For convenience, you can also serialize to a file using this syntax: serialize("your_file.dat") << some_object << another_object; // or to a memory buffer. std::vector memory_buffer; serialize(memory_buffer) << some_object << another_object; // or some other stream std::ostringstream memory_buffer2; serialize(memory_buffer2) << some_object << another_object; That overwrites the contents of your_file.dat with the serialized data from some_object and another_object. Then to recall the objects from the file you can do: deserialize("your_file.dat") >> some_object >> another_object; // or from a memory buffer or another stream called memory_buffer. deserialize(memory_buffer) >> some_object >> another_object; Finally, you can chain as many objects together using the << and >> operators as you like. This file provides serialization support to the following object types: - The C++ base types (NOT including raw pointer) - std::string - std::wstring - std::vector - std::list - std::forward_list - std::array - std::deque - std::map - std::unordered_map - std::multimap - std::unordered_multimap - std::set - std::unordered_set - std::multiset - std::unordered_multiset - std::pair - std::tuple - std::complex - std::unique_ptr - std::shared_ptr - dlib::uint64 - dlib::int64 - float_details - enumerable where T is a serializable type - map_pair where D and R are both serializable types. - C style arrays of serializable types - Google protocol buffer objects. This file provides deserialization support to the following object types: - The C++ base types (NOT including raw pointers) - std::string - std::wstring - std::vector - std::list - std::forward_list - std::array - std::deque - std::map - std::unordered_map - std::multimap - std::unordered_multimap - std::set - std::unordered_set - std::multiset - std::unordered_multiset - std::pair - std::tuple - std::complex - std::unique_ptr - std::shared_ptr - dlib::uint64 - dlib::int64 - float_details - C style arrays of serializable types - Google protocol buffer objects. Support for deserialization of objects which implement the enumerable or map_pair interfaces is the responsibility of those objects. Note that you can deserialize an integer value to any integral type (except for a char type) if its value will fit into the target integer type. I.e. the types short, int, long, unsigned short, unsigned int, unsigned long, and dlib::uint64 can all receive serialized data from each other so long as the actual serialized value fits within the receiving integral type's range. Also note that for any container to be serializable the type of object it contains must be serializable. FILE STREAMS If you are serializing to and from file streams it is important to remember to set the file streams to binary mode using the std::ios::binary flag. INTEGRAL SERIALIZATION FORMAT All C++ integral types (except the char types) are serialized to the following format: The first byte is a control byte. It tells you if the serialized number is positive or negative and also tells you how many of the following bytes are part of the number. The absolute value of the number is stored in little endian byte order and follows the control byte. The control byte: The high order bit of the control byte is a flag that tells you if the encoded number is negative or not. It is set to 1 when the number is negative and 0 otherwise. The 4 low order bits of the control byte represent an unsigned number and tells you how many of the following bytes are part of the encoded number. bool SERIALIZATION FORMAT A bool value is serialized as the single byte character '1' or '0' in ASCII. Where '1' indicates true and '0' indicates false. FLOATING POINT SERIALIZATION FORMAT To serialize a floating point value we convert it into a float_details object and then serialize the exponent and mantissa values using dlib's integral serialization format. Therefore, the output is first the exponent and then the mantissa. Note that the mantissa is a signed integer (i.e. there is not a separate sign bit). MAKING YOUR OWN CUSTOM OBJECTS SERIALIZABLE Suppose you create your own type, my_custom_type, and you want it to be serializable. I.e. you want to be able to use the tools above to save and load it. E.g. maybe you have a std::vector you wish to save. To make my_custom_type properly serializable all you have to do is define global serialize and deserialize functions **IN THE SAME NAMESPACE AS MY_CUSTOM_TYPE**. You must define them in your namespace so that argument dependent lookup will be able to find them. So your code might look like this: namespace your_namespace { struct my_custom_type { int a; float b; std::vector c; }; void serialize (const my_custom_type& item, std::ostream& out); void deserialize (my_custom_type& item, std::istream& in); } That's all you need to do. You may optionally avail yourself of the DLIB_DEFINE_DEFAULT_SERIALIZATION macro, which generates global friend serialize and deserialize functions for you. In that case you would do this instead: namespace your_namespace { struct my_custom_type { int a; float b; std::vector c; DLIB_DEFINE_DEFAULT_SERIALIZATION(my_custom_type, a, b, c); }; } !*/ #include "algs.h" #include "assert.h" #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "uintn.h" #include "interfaces/enumerable.h" #include "interfaces/map_pair.h" #include "enable_if.h" #include "unicode.h" #include "byte_orderer.h" #include "float_details.h" #include "vectorstream.h" namespace dlib { // ---------------------------------------------------------------------------------------- class serialization_error : public error { /*! WHAT THIS OBJECT REPRESENTS This is the exception object. It is thrown if serialization or deserialization fails. !*/ public: serialization_error(const std::string& e):error(e) {} }; void check_serialized_version( const std::string& expected_version, std::istream& in ); /*! ensures - Deserializes a string from in and if it doesn't match expected_version we throw serialization_error. !*/ // ---------------------------------------------------------------------------------------- /*!A ramdump information !*/ template struct ramdump_t { /*! WHAT THIS OBJECT REPRESENTS This is a type decoration used to indicate that serialization should be done by simply dumping the memory of some object to disk as fast as possible without any sort of conversions. This means that the data written will be "non-portable" in the sense that the format output by a RAM dump may depend on things like the endianness of your CPU or settings of certain compiler switches. You use this object like this: serialize("yourfile.dat") << ramdump(yourobject); deserialize("yourfile.dat") >> ramdump(yourobject); or serialize(ramdump(yourobject), out); deserialize(ramdump(yourobject), in); Also, not all objects have a ramdump mode. If you try to use ramdump on an object that does not define a serialization dump for ramdump you will get a compiler error. !*/ ramdump_t(T& item_) : item(item_) {} T& item; }; // This function just makes a ramdump that wraps an object. template ramdump_t::type> ramdump(T&& item) { return ramdump_t::type>(item); } template < typename T > void serialize ( const ramdump_t& item_, std::ostream& out ) { // Move the const from inside the ramdump_t template to outside so we can bind // against a serialize() call that takes just a const ramdump_t. Doing this // saves you from needing to write multiple overloads of serialize() to handle // these different const placement cases. const auto temp = ramdump(const_cast(item_.item)); serialize(temp, out); } // ---------------------------------------------------------------------------------------- namespace ser_helper { template < typename T > typename enable_if_c::is_signed,bool>::type pack_int ( T item, std::ostream& out ) /*! requires - T is a signed integral type ensures - if (no problems occur serializing item) then - writes item to out - returns false - else - returns true !*/ { COMPILE_TIME_ASSERT(sizeof(T) <= 8); unsigned char buf[9]; unsigned char size = sizeof(T); unsigned char neg; if (item < 0) { neg = 0x80; item *= -1; } else { neg = 0; } for (unsigned char i = 1; i <= sizeof(T); ++i) { buf[i] = static_cast(item&0xFF); item >>= 8; if (item == 0) { size = i; break; } } std::streambuf* sbuf = out.rdbuf(); buf[0] = size|neg; if (sbuf->sputn(reinterpret_cast(buf),size+1) != size+1) { out.setstate(std::ios::eofbit | std::ios::badbit); return true; } return false; } // ------------------------------------------------------------------------------------ template < typename T > typename enable_if_c::is_signed,bool>::type unpack_int ( T& item, std::istream& in ) /*! requires - T is a signed integral type ensures - if (there are no problems deserializing item) then - returns false - #item == the value stored in in - else - returns true !*/ { COMPILE_TIME_ASSERT(sizeof(T) <= 8); unsigned char buf[8]; unsigned char size; bool is_negative; std::streambuf* sbuf = in.rdbuf(); item = 0; int ch = sbuf->sbumpc(); if (ch != EOF) { size = static_cast(ch); } else { in.setstate(std::ios::badbit); return true; } if (size&0x80) is_negative = true; else is_negative = false; size &= 0x0F; // check if the serialized object is too big if (size > (unsigned long)tmin::value || size == 0) { return true; } if (sbuf->sgetn(reinterpret_cast(&buf),size) != size) { in.setstate(std::ios::badbit); return true; } for (unsigned char i = size-1; true; --i) { item <<= 8; item |= buf[i]; if (i == 0) break; } if (is_negative) item *= -1; return false; } // ------------------------------------------------------------------------------------ template < typename T > typename disable_if_c::is_signed,bool>::type pack_int ( T item, std::ostream& out ) /*! requires - T is an unsigned integral type ensures - if (no problems occur serializing item) then - writes item to out - returns false - else - returns true !*/ { COMPILE_TIME_ASSERT(sizeof(T) <= 8); unsigned char buf[9]; unsigned char size = sizeof(T); for (unsigned char i = 1; i <= sizeof(T); ++i) { buf[i] = static_cast(item&0xFF); item >>= 8; if (item == 0) { size = i; break; } } std::streambuf* sbuf = out.rdbuf(); buf[0] = size; if (sbuf->sputn(reinterpret_cast(buf),size+1) != size+1) { out.setstate(std::ios::eofbit | std::ios::badbit); return true; } return false; } // ------------------------------------------------------------------------------------ template < typename T > typename disable_if_c::is_signed,bool>::type unpack_int ( T& item, std::istream& in ) /*! requires - T is an unsigned integral type ensures - if (there are no problems deserializing item) then - returns false - #item == the value stored in in - else - returns true !*/ { COMPILE_TIME_ASSERT(sizeof(T) <= 8); unsigned char buf[8]; unsigned char size; item = 0; std::streambuf* sbuf = in.rdbuf(); int ch = sbuf->sbumpc(); if (ch != EOF) { size = static_cast(ch); } else { in.setstate(std::ios::badbit); return true; } // mask out the 3 reserved bits size &= 0x8F; // check if an error occurred if (size > (unsigned long)tmin::value || size == 0) return true; if (sbuf->sgetn(reinterpret_cast(&buf),size) != size) { in.setstate(std::ios::badbit); return true; } for (unsigned char i = size-1; true; --i) { item <<= 8; item |= buf[i]; if (i == 0) break; } return false; } } // ---------------------------------------------------------------------------------------- #define USE_DEFAULT_INT_SERIALIZATION_FOR(T) \ inline void serialize (const T& item, std::ostream& out) \ { if (ser_helper::pack_int(item,out)) throw serialization_error("Error serializing object of type " + std::string(#T)); } \ inline void deserialize (T& item, std::istream& in) \ { if (ser_helper::unpack_int(item,in)) throw serialization_error("Error deserializing object of type " + std::string(#T)); } template inline bool pack_byte ( const T& ch, std::ostream& out ) { std::streambuf* sbuf = out.rdbuf(); return (sbuf->sputc((char)ch) == EOF); } template inline bool unpack_byte ( T& ch, std::istream& in ) { std::streambuf* sbuf = in.rdbuf(); int temp = sbuf->sbumpc(); if (temp != EOF) { ch = static_cast(temp); return false; } else { return true; } } #define USE_DEFAULT_BYTE_SERIALIZATION_FOR(T) \ inline void serialize (const T& item,std::ostream& out) \ { if (pack_byte(item,out)) throw serialization_error("Error serializing object of type " + std::string(#T)); } \ inline void deserialize (T& item, std::istream& in) \ { if (unpack_byte(item,in)) throw serialization_error("Error deserializing object of type " + std::string(#T)); } // ---------------------------------------------------------------------------------------- USE_DEFAULT_INT_SERIALIZATION_FOR(short) USE_DEFAULT_INT_SERIALIZATION_FOR(int) USE_DEFAULT_INT_SERIALIZATION_FOR(long) USE_DEFAULT_INT_SERIALIZATION_FOR(unsigned short) USE_DEFAULT_INT_SERIALIZATION_FOR(unsigned int) USE_DEFAULT_INT_SERIALIZATION_FOR(unsigned long) USE_DEFAULT_INT_SERIALIZATION_FOR(uint64) USE_DEFAULT_INT_SERIALIZATION_FOR(int64) USE_DEFAULT_BYTE_SERIALIZATION_FOR(char) USE_DEFAULT_BYTE_SERIALIZATION_FOR(signed char) USE_DEFAULT_BYTE_SERIALIZATION_FOR(unsigned char) // Don't define serialization for wchar_t when using visual studio and // _NATIVE_WCHAR_T_DEFINED isn't defined since if it isn't they improperly set // wchar_t to be a typedef rather than its own type as required by the C++ // standard. #if !defined(_MSC_VER) || _NATIVE_WCHAR_T_DEFINED USE_DEFAULT_INT_SERIALIZATION_FOR(wchar_t) #endif // ---------------------------------------------------------------------------------------- inline void serialize( const float_details& item, std::ostream& out ) { serialize(item.mantissa, out); serialize(item.exponent, out); } inline void deserialize( float_details& item, std::istream& in ) { deserialize(item.mantissa, in); deserialize(item.exponent, in); } // ---------------------------------------------------------------------------------------- template inline void serialize_floating_point ( const T& item, std::ostream& out ) { try { float_details temp = item; serialize(temp, out); } catch (serialization_error& e) { throw serialization_error(e.info + "\n while serializing a floating point number."); } } template inline bool old_deserialize_floating_point ( T& item, std::istream& in ) { std::ios::fmtflags oldflags = in.flags(); in.flags(static_cast(0)); std::streamsize ss = in.precision(35); if (in.peek() == 'i') { item = std::numeric_limits::infinity(); in.get(); in.get(); in.get(); } else if (in.peek() == 'n') { item = -std::numeric_limits::infinity(); in.get(); in.get(); in.get(); in.get(); } else if (in.peek() == 'N') { item = std::numeric_limits::quiet_NaN(); in.get(); in.get(); in.get(); } else { in >> item; } in.flags(oldflags); in.precision(ss); return (in.get() != ' '); } template inline void deserialize_floating_point ( T& item, std::istream& in ) { // check if the serialized data uses the older ASCII based format. We can check // this easily because the new format starts with the integer control byte which // always has 0 bits in the positions corresponding to the bitmask 0x70. Moreover, // since the previous format used ASCII numbers we know that no valid bytes can // have bit values of one in the positions indicated 0x70. So this test looks at // the first byte and checks if the serialized data uses the old format or the new // format. if ((in.rdbuf()->sgetc()&0x70) == 0) { try { // Use the fast and compact binary serialization format. float_details temp; deserialize(temp, in); item = temp; } catch (serialization_error& e) { throw serialization_error(e.info + "\n while deserializing a floating point number."); } } else { if (old_deserialize_floating_point(item, in)) throw serialization_error("Error deserializing a floating point number."); } } inline void serialize ( const float& item, std::ostream& out) { serialize_floating_point(item,out); } inline void deserialize (float& item, std::istream& in) { deserialize_floating_point(item,in); } inline void serialize ( const double& item, std::ostream& out) { serialize_floating_point(item,out); } inline void deserialize (double& item, std::istream& in) { deserialize_floating_point(item,in); } inline void serialize ( const long double& item, std::ostream& out) { serialize_floating_point(item,out); } inline void deserialize ( long double& item, std::istream& in) { deserialize_floating_point(item,in); } // ---------------------------------------------------------------------------------------- // prototypes template void serialize ( const std::map& item, std::ostream& out ); template void deserialize ( std::map& item, std::istream& in ); template void serialize ( const std::unordered_map& item, std::ostream& out ); template void deserialize ( std::unordered_map& item, std::istream& in ); template void serialize ( const std::multimap& item, std::ostream& out ); template void deserialize ( std::multimap& item, std::istream& in ); template void serialize ( const std::unordered_multimap& item, std::ostream& out ); template void deserialize ( std::unordered_multimap& item, std::istream& in ); template void serialize ( const std::set& item, std::ostream& out ); template void deserialize ( std::set& item, std::istream& in ); template void serialize ( const std::unordered_set& item, std::ostream& out ); template void deserialize ( std::unordered_set& item, std::istream& in ); template void serialize ( const std::multiset& item, std::ostream& out ); template void deserialize ( std::multiset& item, std::istream& in ); template void serialize ( const std::unordered_multiset& item, std::ostream& out ); template void deserialize ( std::unordered_multiset& item, std::istream& in ); template void serialize ( const std::vector& item, std::ostream& out ); template void deserialize ( std::vector& item, std::istream& in ); template void serialize ( const std::list& item, std::ostream& out ); template void deserialize ( std::list& item, std::istream& in ); template void serialize ( const std::forward_list& item, std::ostream& out ); template void deserialize ( std::forward_list& item, std::istream& in ); template void serialize ( const std::deque& item, std::ostream& out ); template void deserialize ( std::deque& item, std::istream& in ); template void serialize ( const std::tuple& item, std::ostream& out ); template void deserialize ( std::tuple& item, std::istream& in ); template void serialize ( const std::unique_ptr& item, std::ostream& out ); template void deserialize ( std::unique_ptr& item, std::istream& in ); template void serialize ( const std::shared_ptr& item, std::ostream& out ); template void deserialize ( std::shared_ptr& item, std::istream& in ); inline void serialize ( const std::string& item, std::ostream& out ); inline void deserialize ( std::string& item, std::istream& in ); inline void serialize ( const std::wstring& item, std::ostream& out ); inline void deserialize ( std::wstring& item, std::istream& in ); inline void serialize ( const ustring& item, std::ostream& out ); inline void deserialize ( ustring& item, std::istream& in ); template < typename T > inline void serialize ( const enumerable& item, std::ostream& out ); template < typename domain, typename range > inline void serialize ( const map_pair& item, std::ostream& out ); template < typename T, size_t length > inline void serialize ( const T (&array)[length], std::ostream& out ); template < typename T, size_t length > inline void deserialize ( T (&array)[length], std::istream& in ); // ---------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------- inline void serialize ( bool item, std::ostream& out ) { if (item) out << '1'; else out << '0'; if (!out) throw serialization_error("Error serializing object of type bool"); } inline void deserialize ( bool& item, std::istream& in ) { int ch = in.get(); if (ch != EOF) { if (ch == '1') item = true; else if (ch == '0') item = false; else throw serialization_error("Error deserializing object of type bool"); } else { throw serialization_error("Error deserializing object of type bool"); } } // ---------------------------------------------------------------------------------------- template void serialize ( const std::pair& item, std::ostream& out ) { try { serialize(item.first,out); serialize(item.second,out); } catch (serialization_error& e) { throw serialization_error(e.info + "\n while serializing object of type std::pair"); } } template void deserialize ( std::pair& item, std::istream& in ) { try { deserialize(item.first,in); deserialize(item.second,in); } catch (serialization_error& e) { throw serialization_error(e.info + "\n while deserializing object of type std::pair"); } } // ---------------------------------------------------------------------------------------- template inline typename std::enable_if::type for_each_in_tuple(std::tuple&, FuncT) {} template inline typename std::enable_if::type for_each_in_tuple(std::tuple& t, FuncT f) { f(std::get(t)); for_each_in_tuple(t, f); } template inline typename std::enable_if::type for_each_in_tuple(const std::tuple&, FuncT) {} template inline typename std::enable_if::type for_each_in_tuple(const std::tuple& t, FuncT f) { f(std::get(t)); for_each_in_tuple(t, f); } struct serialize_tuple_helper { serialize_tuple_helper(std::ostream& out_) : out(out_) {} template void operator()(const T& item) { serialize(item, out); } std::ostream& out; }; struct deserialize_tuple_helper { deserialize_tuple_helper(std::istream& in_) : in(in_) {} template void operator()(T& item) { deserialize(item, in); } std::istream& in; }; template void serialize ( const std::tuple& item, std::ostream& out ) { try { for_each_in_tuple(item, serialize_tuple_helper(out)); } catch (serialization_error& e) { throw serialization_error(e.info + "\n while serializing object of type std::tuple"); } } template void deserialize ( std::tuple& item, std::istream& in ) { try { for_each_in_tuple(item, deserialize_tuple_helper(in)); } catch (serialization_error& e) { throw serialization_error(e.info + "\n while deserializing object of type std::tuple"); } } // ---------------------------------------------------------------------------------------- template void serialize ( const std::map& item, std::ostream& out ) { try { const unsigned long size = static_cast(item.size()); serialize(size,out); typename std::map::const_iterator i; for (i = item.begin(); i != item.end(); ++i) { serialize(i->first,out); serialize(i->second,out); } } catch (serialization_error& e) { throw serialization_error(e.info + "\n while serializing object of type std::map"); } } template void deserialize ( std::map& item, std::istream& in ) { try { item.clear(); unsigned long size; deserialize(size,in); domain d; range r; for (unsigned long i = 0; i < size; ++i) { deserialize(d,in); deserialize(r,in); item[d] = r; } } catch (serialization_error& e) { throw serialization_error(e.info + "\n while deserializing object of type std::map"); } } // ---------------------------------------------------------------------------------------- template void serialize ( const std::unordered_map& item, std::ostream& out ) { try { serialize(item.size(),out); for (const auto& x : item) { serialize(x.first,out); serialize(x.second,out); } } catch (serialization_error& e) { throw serialization_error(e.info + "\n while serializing object of type std::unordered_map"); } } template void deserialize ( std::unordered_map& item, std::istream& in ) { try { item.clear(); std::size_t size; deserialize(size,in); domain d; range r; for (unsigned long i = 0; i < size; ++i) { deserialize(d,in); deserialize(r,in); item[d] = r; } } catch (serialization_error& e) { throw serialization_error(e.info + "\n while deserializing object of type std::unordered_map"); } } // ---------------------------------------------------------------------------------------- template void serialize ( const std::multimap& item, std::ostream& out ) { try { serialize(item.size(),out); for (const auto& x : item) { serialize(x.first,out); serialize(x.second,out); } } catch (serialization_error& e) { throw serialization_error(e.info + "\n while serializing object of type std::multimap"); } } template void deserialize ( std::multimap& item, std::istream& in ) { try { item.clear(); std::size_t size; deserialize(size,in); domain d; range r; for (unsigned long i = 0; i < size; ++i) { deserialize(d,in); deserialize(r,in); item.insert({d,r}); } } catch (serialization_error& e) { throw serialization_error(e.info + "\n while deserializing object of type std::multimap"); } } // ---------------------------------------------------------------------------------------- template void serialize ( const std::unordered_multimap& item, std::ostream& out ) { try { serialize(item.size(),out); for (const auto& x : item) { serialize(x.first,out); serialize(x.second,out); } } catch (serialization_error& e) { throw serialization_error(e.info + "\n while serializing object of type std::unordered_multimap"); } } template void deserialize ( std::unordered_multimap& item, std::istream& in ) { try { item.clear(); std::size_t size; deserialize(size,in); domain d; range r; for (unsigned long i = 0; i < size; ++i) { deserialize(d,in); deserialize(r,in); item.insert({d,r}); } } catch (serialization_error& e) { throw serialization_error(e.info + "\n while deserializing object of type std::unordered_multimap"); } } // ---------------------------------------------------------------------------------------- template void serialize ( const std::set& item, std::ostream& out ) { try { const unsigned long size = static_cast(item.size()); serialize(size,out); typename std::set::const_iterator i; for (i = item.begin(); i != item.end(); ++i) { serialize(*i,out); } } catch (serialization_error& e) { throw serialization_error(e.info + "\n while serializing object of type std::set"); } } template void deserialize ( std::set& item, std::istream& in ) { try { item.clear(); unsigned long size; deserialize(size,in); domain d; for (unsigned long i = 0; i < size; ++i) { deserialize(d,in); item.insert(d); } } catch (serialization_error& e) { throw serialization_error(e.info + "\n while deserializing object of type std::set"); } } // ---------------------------------------------------------------------------------------- template void serialize ( const std::unordered_set& item, std::ostream& out ) { try { serialize(item.size(),out); for (const auto& x : item) serialize(x,out); } catch (serialization_error& e) { throw serialization_error(e.info + "\n while serializing object of type std::unordered_set"); } } template void deserialize ( std::unordered_set& item, std::istream& in ) { try { item.clear(); std::size_t size; deserialize(size,in); domain d; for (unsigned long i = 0; i < size; ++i) { deserialize(d,in); item.insert(d); } } catch (serialization_error& e) { throw serialization_error(e.info + "\n while deserializing object of type std::unordered_set"); } } // ---------------------------------------------------------------------------------------- template void serialize ( const std::multiset& item, std::ostream& out ) { try { serialize(item.size(),out); for (const auto& x : item) serialize(x,out); } catch (serialization_error& e) { throw serialization_error(e.info + "\n while serializing object of type std::multiset"); } } template void deserialize ( std::multiset& item, std::istream& in ) { try { item.clear(); std::size_t size; deserialize(size,in); domain d; for (unsigned long i = 0; i < size; ++i) { deserialize(d,in); item.insert(d); } } catch (serialization_error& e) { throw serialization_error(e.info + "\n while deserializing object of type std::multiset"); } } // ---------------------------------------------------------------------------------------- template void serialize ( const std::unordered_multiset& item, std::ostream& out ) { try { serialize(item.size(),out); for (const auto& x : item) serialize(x,out); } catch (serialization_error& e) { throw serialization_error(e.info + "\n while serializing object of type std::unordered_multiset"); } } template void deserialize ( std::unordered_multiset& item, std::istream& in ) { try { item.clear(); std::size_t size; deserialize(size,in); domain d; for (unsigned long i = 0; i < size; ++i) { deserialize(d,in); item.insert(d); } } catch (serialization_error& e) { throw serialization_error(e.info + "\n while deserializing object of type std::unordered_multiset"); } } // ---------------------------------------------------------------------------------------- template void serialize ( const std::vector& item, std::ostream& out ) { std::vector temp(item.size()); for (unsigned long i = 0; i < item.size(); ++i) { if (item[i]) temp[i] = '1'; else temp[i] = '0'; } serialize(temp, out); } template void deserialize ( std::vector& item, std::istream& in ) { std::vector temp; deserialize(temp, in); item.resize(temp.size()); for (unsigned long i = 0; i < temp.size(); ++i) { if (temp[i] == '1') item[i] = true; else item[i] = false; } } // ---------------------------------------------------------------------------------------- template void serialize ( const std::vector& item, std::ostream& out ) { try { const unsigned long size = static_cast(item.size()); serialize(size,out); for (unsigned long i = 0; i < item.size(); ++i) serialize(item[i],out); } catch (serialization_error& e) { throw serialization_error(e.info + "\n while serializing object of type std::vector"); } } template void deserialize ( std::vector& item, std::istream& in ) { try { unsigned long size; deserialize(size,in); item.resize(size); for (unsigned long i = 0; i < size; ++i) deserialize(item[i],in); } catch (serialization_error& e) { throw serialization_error(e.info + "\n while deserializing object of type std::vector"); } } // ---------------------------------------------------------------------------------------- template void serialize ( const std::vector& item, std::ostream& out ) { try { const unsigned long size = static_cast(item.size()); serialize(size,out); if (item.size() != 0) out.write(&item[0], item.size()); } catch (serialization_error& e) { throw serialization_error(e.info + "\n while serializing object of type std::vector"); } } template void deserialize ( std::vector& item, std::istream& in ) { try { unsigned long size; deserialize(size,in); item.resize(size); if (item.size() != 0) in.read(&item[0], item.size()); } catch (serialization_error& e) { throw serialization_error(e.info + "\n while deserializing object of type std::vector"); } } // ---------------------------------------------------------------------------------------- template void serialize ( const std::vector& item, std::ostream& out ) { try { const unsigned long size = static_cast(item.size()); serialize(size,out); if (item.size() != 0) out.write((char*)&item[0], item.size()); } catch (serialization_error& e) { throw serialization_error(e.info + "\n while serializing object of type std::vector"); } } template void deserialize ( std::vector& item, std::istream& in ) { try { unsigned long size; deserialize(size,in); item.resize(size); if (item.size() != 0) in.read((char*)&item[0], item.size()); } catch (serialization_error& e) { throw serialization_error(e.info + "\n while deserializing object of type std::vector"); } } // ---------------------------------------------------------------------------------------- template void serialize ( const std::list& item, std::ostream& out ) { try { const unsigned long size = static_cast(item.size()); serialize(size,out); for (const auto& x : item) serialize(x, out); } catch (serialization_error& e) { throw serialization_error(e.info + "\n while serializing object of type std::list"); } } template void deserialize ( std::list& item, std::istream& in ) { try { unsigned long size; deserialize(size, in); item.resize(size); for (auto& x : item) deserialize(x, in); } catch (serialization_error& e) { throw serialization_error(e.info + "\n while deserializing object of type std::list"); } } // ---------------------------------------------------------------------------------------- template void serialize ( const std::forward_list& item, std::ostream& out ) { try { const unsigned long size = std::distance(item.begin(), item.end()); serialize(size,out); for (const auto& x : item) serialize(x, out); } catch (serialization_error& e) { throw serialization_error(e.info + "\n while serializing object of type std::forward_list"); } } template void deserialize ( std::forward_list& item, std::istream& in ) { try { unsigned long size; deserialize(size,in); item.resize(size); for (auto& x : item) deserialize(x,in); } catch (serialization_error& e) { throw serialization_error(e.info + "\n while deserializing object of type std::forward_list"); } } // ---------------------------------------------------------------------------------------- template void serialize ( const std::deque& item, std::ostream& out ) { try { const unsigned long size = static_cast(item.size()); serialize(size,out); for (unsigned long i = 0; i < item.size(); ++i) serialize(item[i],out); } catch (serialization_error& e) { throw serialization_error(e.info + "\n while serializing object of type std::deque"); } } template void deserialize ( std::deque& item, std::istream& in ) { try { unsigned long size; deserialize(size,in); item.resize(size); for (unsigned long i = 0; i < size; ++i) deserialize(item[i],in); } catch (serialization_error& e) { throw serialization_error(e.info + "\n while deserializing object of type std::deque"); } } // ---------------------------------------------------------------------------------------- inline void serialize ( const std::string& item, std::ostream& out ) { const unsigned long size = static_cast(item.size()); try{ serialize(size,out); } catch (serialization_error& e) { throw serialization_error(e.info + "\n while serializing object of type std::string"); } out.write(item.c_str(),size); if (!out) throw serialization_error("Error serializing object of type std::string"); } inline void deserialize ( std::string& item, std::istream& in ) { unsigned long size; try { deserialize(size,in); } catch (serialization_error& e) { throw serialization_error(e.info + "\n while deserializing object of type std::string"); } item.resize(size); if (size != 0) { in.read(&item[0],size); if (!in) throw serialization_error("Error deserializing object of type std::string"); } } // ---------------------------------------------------------------------------------------- inline void serialize ( const std::wstring& item, std::ostream& out ) { const unsigned long size = static_cast(item.size()); try{ serialize(size,out); } catch (serialization_error& e) { throw serialization_error(e.info + "\n while serializing object of type std::wstring"); } for (unsigned long i = 0; i < item.size(); ++i) serialize(item[i], out); if (!out) throw serialization_error("Error serializing object of type std::wstring"); } inline void deserialize ( std::wstring& item, std::istream& in ) { unsigned long size; try { deserialize(size,in); } catch (serialization_error& e) { throw serialization_error(e.info + "\n while deserializing object of type std::wstring"); } item.resize(size); for (unsigned long i = 0; i < item.size(); ++i) deserialize(item[i],in); if (!in) throw serialization_error("Error deserializing object of type std::wstring"); } // ---------------------------------------------------------------------------------------- inline void serialize ( const ustring& item, std::ostream& out ) { const unsigned long size = static_cast(item.size()); try{ serialize(size,out); } catch (serialization_error& e) { throw serialization_error(e.info + "\n while serializing object of type ustring"); } for (unsigned long i = 0; i < item.size(); ++i) serialize(item[i], out); if (!out) throw serialization_error("Error serializing object of type ustring"); } inline void deserialize ( ustring& item, std::istream& in ) { unsigned long size; try { deserialize(size,in); } catch (serialization_error& e) { throw serialization_error(e.info + "\n while deserializing object of type ustring"); } item.resize(size); for (unsigned long i = 0; i < item.size(); ++i) deserialize(item[i],in); if (!in) throw serialization_error("Error deserializing object of type ustring"); } // ---------------------------------------------------------------------------------------- template < typename T > inline void serialize ( const enumerable& item, std::ostream& out ) { try { item.reset(); serialize(item.size(),out); while (item.move_next()) serialize(item.element(),out); item.reset(); } catch (serialization_error& e) { throw serialization_error(e.info + "\n while serializing object of type enumerable"); } } // ---------------------------------------------------------------------------------------- template < typename domain, typename range > inline void serialize ( const map_pair& item, std::ostream& out ) { try { serialize(item.key(),out); serialize(item.value(),out); } catch (serialization_error& e) { throw serialization_error(e.info + "\n while serializing object of type map_pair"); } } // ---------------------------------------------------------------------------------------- template < typename T, size_t length > inline void serialize ( const T (&array)[length], std::ostream& out ) { try { serialize(length,out); for (size_t i = 0; i < length; ++i) serialize(array[i],out); } catch (serialization_error& e) { throw serialization_error(e.info + "\n while serializing a C style array"); } } template < size_t length > inline void serialize ( const char (&array)[length], std::ostream& out ) { if (length != 0 && array[length-1] == '\0') { // If this is a null terminated string then don't serialize the trailing null. // We do this so that the serialization format for C-strings is the same as // std::string. serialize(length-1, out); out.write(array, length-1); if (!out) throw serialization_error("Error serializing a C-style string"); } else { try { serialize(length,out); } catch (serialization_error& e) { throw serialization_error(e.info + "\n while serializing a C style array"); } if (length != 0) out.write(array, length); if (!out) throw serialization_error("Error serializing a C-style string"); } } // ---------------------------------------------------------------------------------------- template < typename T, size_t length > inline void deserialize ( T (&array)[length], std::istream& in ) { size_t size; try { deserialize(size,in); if (size == length) { for (size_t i = 0; i < length; ++i) deserialize(array[i],in); } } catch (serialization_error& e) { throw serialization_error(e.info + "\n while deserializing a C style array"); } if (size != length) throw serialization_error("Error deserializing a C style array, lengths do not match"); } template < size_t length > inline void deserialize ( char (&array)[length], std::istream& in ) { size_t size; try { deserialize(size,in); } catch (serialization_error& e) { throw serialization_error(e.info + "\n while deserializing a C style array"); } if (size == length) { in.read(array, size); if (!in) throw serialization_error("Error deserializing a C-style array"); } else if (size+1 == length) { // In this case we are deserializing a C-style array so we need to add the null // terminator. in.read(array, size); array[size] = '\0'; if (!in) throw serialization_error("Error deserializing a C-style string"); } else { throw serialization_error("Error deserializing a C style array, lengths do not match"); } } // ---------------------------------------------------------------------------------------- template < typename T, size_t N > inline void serialize ( const std::array& array, std::ostream& out ) { typedef T c_array_type[N]; serialize(*(const c_array_type*)array.data(), out); } template < typename T, size_t N > inline void deserialize ( std::array& array, std::istream& in ) { typedef T c_array_type[N]; deserialize(*(c_array_type*)array.data(), in); } template < typename T > inline void serialize ( const std::array& /*array*/, std::ostream& out ) { size_t N = 0; serialize(N, out); } template < typename T > inline void deserialize ( std::array& /*array*/, std::istream& in ) { size_t N; deserialize(N, in); if (N != 0) { std::ostringstream sout; sout << "Expected std::array of size 0 but found a size of " << N; throw serialization_error(sout.str()); } } // ---------------------------------------------------------------------------------------- template < typename T > inline void serialize ( const std::complex& item, std::ostream& out ) { try { serialize(item.real(),out); serialize(item.imag(),out); } catch (serialization_error& e) { throw serialization_error(e.info + "\n while serializing an object of type std::complex"); } } // ---------------------------------------------------------------------------------------- template < typename T > inline void deserialize ( std::complex& item, std::istream& in ) { try { T real, imag; deserialize(real,in); deserialize(imag,in); item = std::complex(real,imag); } catch (serialization_error& e) { throw serialization_error(e.info + "\n while deserializing an object of type std::complex"); } } // ---------------------------------------------------------------------------------------- template void serialize ( const std::unique_ptr& item, std::ostream& out ) { try { bool is_non_empty = item != nullptr; serialize(is_non_empty, out); if (is_non_empty) serialize(*item, out); } catch (serialization_error& e) { throw serialization_error(e.info + "\n while serializing an object of type std::unique_ptr"); } } template void deserialize ( std::unique_ptr& item, std::istream& in ) { try { //when deserializing unique_ptr, this is fresh state, so reset the pointers, even if item is non-empty bool is_non_empty; deserialize(is_non_empty, in); item.reset(is_non_empty ? new T() : nullptr); //can't use make_unique since dlib does not use C++14 as a minimum requirement. if (is_non_empty) deserialize(*item, in); } catch (serialization_error& e) { throw serialization_error(e.info + "\n while deserializing an object of type std::unique_ptr"); } } // ---------------------------------------------------------------------------------------- template void serialize ( const std::shared_ptr& item, std::ostream& out ) { try { bool is_non_empty = item != nullptr; serialize(is_non_empty, out); if (is_non_empty) serialize(*item, out); } catch (serialization_error& e) { throw serialization_error(e.info + "\n while serializing an object of type std::shared_ptr"); } } template void deserialize ( std::shared_ptr& item, std::istream& in ) { try { //when deserializing shared_ptr, this is fresh state, so reset the pointers, even if item is non-empty bool is_non_empty; deserialize(is_non_empty, in); item = is_non_empty ? std::make_shared() : nullptr; if (is_non_empty) deserialize(*item, in); } catch (serialization_error& e) { throw serialization_error(e.info + "\n while deserializing an object of type std::shared_ptr"); } } // ---------------------------------------------------------------------------------------- class proxy_serialize { public: explicit proxy_serialize ( const std::string& filename ) : fout_optional_owning_ptr(new std::ofstream(filename.c_str(), std::ios::binary)), fout(*fout_optional_owning_ptr) { if (!fout) throw serialization_error("Unable to open " + filename + " for writing."); } explicit proxy_serialize ( std::vector& buf ) : fout_optional_owning_ptr(new vectorstream(buf)), fout(*fout_optional_owning_ptr) { } explicit proxy_serialize ( std::ostream& ss ) : fout_optional_owning_ptr(nullptr), fout(ss) {} template inline proxy_serialize& operator<<(const T& item) { serialize(item, fout); return *this; } private: std::unique_ptr fout_optional_owning_ptr; std::ostream& fout; }; class proxy_deserialize { public: explicit proxy_deserialize ( const std::string& filename_ ) : filename(filename_), fin_optional_owning_ptr(new std::ifstream(filename.c_str(), std::ios::binary)), fin(*fin_optional_owning_ptr) { if (!fin) throw serialization_error("Unable to open " + filename + " for reading."); init(); } explicit proxy_deserialize ( std::vector& buf ) : fin_optional_owning_ptr(new vectorstream(buf)), fin(*fin_optional_owning_ptr) { init(); } explicit proxy_deserialize ( std::istream& ss ) : fin_optional_owning_ptr(nullptr), fin(ss) { init(); } template inline proxy_deserialize& operator>>(T& item) { return doit(item); } template inline proxy_deserialize& operator>>(ramdump_t&& item) { return doit(std::move(item)); } private: void init() { // read the file header into a buffer and then seek back to the start of the // file. fin.read(file_header,4); fin.clear(); fin.seekg(0); } private: template inline proxy_deserialize& doit(T&& item) { try { if (fin.peek() == EOF) throw serialization_error("No more objects were in the stream!"); deserialize(std::forward(item), fin); } catch (serialization_error& e) { std::string suffix; if (looks_like_a_compressed_file()) suffix = "\n *** THIS LOOKS LIKE A COMPRESSED FILE. DID YOU FORGET TO DECOMPRESS IT? *** \n"; const std::string stream_description = filename.empty() ? "stream" : "file '" + filename + "'"; if (objects_read == 0) { throw serialization_error("An error occurred while trying to read the first" " object from the " + stream_description + ".\nERROR: " + e.info + "\n" + suffix); } else if (objects_read == 1) { throw serialization_error("An error occurred while trying to read the second" " object from the " + stream_description + ".\nERROR: " + e.info + "\n" + suffix); } else if (objects_read == 2) { throw serialization_error("An error occurred while trying to read the third" " object from the " + stream_description + ".\nERROR: " + e.info + "\n" + suffix); } else { throw serialization_error("An error occurred while trying to read the " + std::to_string(objects_read+1) + "th object from the " + stream_description + ".\nERROR: " + e.info + "\n" + suffix); } } ++objects_read; return *this; } int objects_read = 0; const std::string filename = ""; std::unique_ptr fin_optional_owning_ptr; std::istream& fin; // We don't need to look at the file header. However, it's here because people // keep posting questions to the dlib forums asking why they get file load errors. // Then it turns out that the problem is they have a compressed file that NEEDS TO // BE DECOMPRESSED by bzip2 or whatever and the reason they are getting // deserialization errors is because they didn't decompress the file. So we are // going to check if this file looks like a compressed file and if so then emit an // error message telling them to unzip the file. :( char file_header[4] = {0,0,0,0}; bool looks_like_a_compressed_file( ) const { if (file_header[0] == 'B' && file_header[1] == 'Z' && file_header[2] == 'h' && ('0' <= file_header[3] && file_header[3] <= '9') ) { return true; } return false; } }; inline proxy_serialize serialize(const std::string& filename) { return proxy_serialize(filename); } inline proxy_serialize serialize(std::ostream& ss) { return proxy_serialize(ss); } inline proxy_serialize serialize(std::vector& buf) { return proxy_serialize(buf); } inline proxy_deserialize deserialize(const std::string& filename) { return proxy_deserialize(filename); } inline proxy_deserialize deserialize(std::istream& ss) { return proxy_deserialize(ss); } inline proxy_deserialize deserialize(std::vector& buf) { return proxy_deserialize(buf); } // ---------------------------------------------------------------------------------------- } // forward declare the MessageLite object so we can reference it below. namespace google { namespace protobuf { class MessageLite; } } namespace dlib { /*!A is_protocol_buffer This is a template that tells you if a type is a Google protocol buffer object. !*/ template struct is_protocol_buffer { static const bool value = false; }; template struct is_protocol_buffer >::type > { static const bool value = true; }; template typename enable_if >::type serialize(const T& item, std::ostream& out) { // Note that Google protocol buffer messages are not self delimiting // (see https://developers.google.com/protocol-buffers/docs/techniques) // This means they don't record their length or where they end, so we have // to record this information ourselves. So we save the size as a little endian 32bit // integer prefixed onto the front of the message. byte_orderer bo; // serialize into temp string std::string temp; if (!item.SerializeToString(&temp)) throw dlib::serialization_error("Error while serializing a Google Protocol Buffer object."); if (temp.size() > std::numeric_limits::max()) throw dlib::serialization_error("Error while serializing a Google Protocol Buffer object, message too large."); // write temp to the output stream uint32 size = static_cast(temp.size()); bo.host_to_little(size); out.write((char*)&size, sizeof(size)); out.write(temp.c_str(), temp.size()); } template typename enable_if >::type deserialize(T& item, std::istream& in) { // Note that Google protocol buffer messages are not self delimiting // (see https://developers.google.com/protocol-buffers/docs/techniques) // This means they don't record their length or where they end, so we have // to record this information ourselves. So we save the size as a little endian 32bit // integer prefixed onto the front of the message. byte_orderer bo; uint32 size = 0; // read the size in.read((char*)&size, sizeof(size)); bo.little_to_host(size); if (!in || size == 0) throw dlib::serialization_error("Error while deserializing a Google Protocol Buffer object."); // read the bytes into temp std::string temp; temp.resize(size); in.read(&temp[0], size); // parse temp into item if (!in || !item.ParseFromString(temp)) { throw dlib::serialization_error("Error while deserializing a Google Protocol Buffer object."); } } // ---------------------------------------------------------------------------------------- inline void check_serialized_version(const std::string& expected_version, std::istream& in) { std::string version; deserialize(version, in); if (version != expected_version) { throw serialization_error("Unexpected version '"+version+ "' found while deserializing object. Expected version to be '"+expected_version+"'."); } } // ---------------------------------------------------------------------------------------- template inline void serialize_these(std::ostream& out, const T& x) { using dlib::serialize; serialize(x, out); } template inline void serialize_these(std::ostream& out, const T& x, const Rest& ... rest) { serialize_these(out, x); serialize_these(out, rest...); } template inline void deserialize_these(std::istream& in, T& x) { using dlib::deserialize; deserialize(x, in); } template inline void deserialize_these(std::istream& in, T& x, Rest& ... rest) { deserialize_these(in, x); deserialize_these(in, rest...); } #define DLIB_DEFINE_DEFAULT_SERIALIZATION(Type, ...) \ void serialize_to(std::ostream& out) const \ { \ using dlib::serialize; \ using dlib::serialize_these; \ try \ { \ /* Write a version header so that if, at a later time, */ \ /* you realize you need to change the serialization */ \ /* format you can identify which version of the format */ \ /* you are encountering when reading old files. */ \ int version = 1; \ serialize(version, out); \ serialize_these(out, __VA_ARGS__); \ } \ catch (dlib::serialization_error& e) \ { \ throw dlib::serialization_error(e.info + "\n while serializing object of type " #Type); \ } \ } \ \ void deserialize_from(std::istream& in) \ { \ using dlib::deserialize; \ using dlib::deserialize_these; \ try \ { \ int version = 0; \ deserialize(version, in); \ if (version != 1) \ throw dlib::serialization_error("Unexpected version found while deserializing " #Type); \ deserialize_these(in, __VA_ARGS__); \ } \ catch (dlib::serialization_error& e) \ { \ throw dlib::serialization_error(e.info + "\n while deserializing object of type " #Type); \ } \ } \ inline friend void serialize(const Type& item, std::ostream& out) \ { \ item.serialize_to(out); \ } \ inline friend void deserialize(Type& item, std::istream& in) \ { \ item.deserialize_from(in); \ } } #endif // DLIB_SERIALIZe_ ================================================ FILE: benchmarks/dlib/set/set_compare_1.h ================================================ // Copyright (C) 2005 Davis E. King (davis@dlib.net) // License: Boost Software License See LICENSE.txt for the full license. #ifndef DLIB_SET_COMPARe_1_ #define DLIB_SET_COMPARe_1_ #include "set_compare_abstract.h" #include "../algs.h" namespace dlib { template < typename set_base > class set_compare_1 : public set_base { public: bool operator< ( const set_compare_1& rhs ) const; bool operator== ( const set_compare_1& rhs ) const; }; template < typename set_base > inline void swap ( set_compare_1& a, set_compare_1& b ) { a.swap(b); } // ---------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------- // member function definitions // ---------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------- template < typename set_base > bool set_compare_1:: operator< ( const set_compare_1& rhs ) const { bool result = false; if (set_base::size() < rhs.size()) result = true; if (set_base::size() == rhs.size()) { rhs.reset(); set_base::reset(); while (rhs.move_next()) { set_base::move_next(); if (set_base::element() < rhs.element()) { result = true; break; } else if (rhs.element() < set_base::element()) { break; } } } set_base::reset(); rhs.reset(); return result; } // ---------------------------------------------------------------------------------------- template < typename set_base > bool set_compare_1:: operator== ( const set_compare_1& rhs ) const { bool result = true; if (set_base::size() != rhs.size()) result = false; rhs.reset(); set_base::reset(); while (rhs.move_next() && set_base::move_next()) { if (!(rhs.element() == set_base::element())) { result = false; break; } } set_base::reset(); rhs.reset(); return result; } // ---------------------------------------------------------------------------------------- } #endif // DLIB_SET_COMPARe_1_ ================================================ FILE: benchmarks/dlib/set/set_compare_abstract.h ================================================ // Copyright (C) 2005 Davis E. King (davis@dlib.net) // License: Boost Software License See LICENSE.txt for the full license. #undef DLIB_SET_COMPARe_ABSTRACT_ #ifdef DLIB_SET_COMPARe_ABSTRACT_ #include "set_kernel_abstract.h" #include "../algs.h" namespace dlib { template < typename set_base > class set_compare : public set_base { /*! REQUIREMENTS ON set_base must be an implementation of set/set_kernel_abstract.h POINTERS AND REFERENCES TO INTERNAL DATA operator== and operator< invalidate pointers or references to data members. WHAT THIS EXTENSION DOES FOR set This gives a set the ability to compare itself to other sets using the < and == operators. The < operator is conceptually weird for sets. It is useful though because it allows you to make sets of sets since sets require that their containing type implement operator<. Also note that it is the case that for any two sets a and b if (a rhs.size()) then - returns false - else - returns true if there exists an integer j such that 0 <= j < size() and for all integers i such that 0 <= i < j where it is true that (*this)[i] == rhs[i] and (*this)[j] < rhs[j] - returns false if there is no j that will satisfy the above conditions. !*/ bool operator== ( const set_compare& rhs ) const; /*! ensures - #at_start() == true - returns true if *this and rhs contain the same elements. returns false otherwise. !*/ }; template < typename set_base > inline void swap ( set_compare& a, set_compare& b ) { a.swap(b); } /*! provides a global swap function !*/ } #endif // DLIB_SET_COMPARe_ABSTRACT_ ================================================ FILE: benchmarks/dlib/set/set_kernel_1.h ================================================ // Copyright (C) 2003 Davis E. King (davis@dlib.net) // License: Boost Software License See LICENSE.txt for the full license. #ifndef DLIB_SET_KERNEl_1_ #define DLIB_SET_KERNEl_1_ #include "set_kernel_abstract.h" #include "../algs.h" #include "../interfaces/enumerable.h" #include "../interfaces/remover.h" #include "../serialize.h" namespace dlib { template < typename T, typename bst_base, typename mem_manager = default_memory_manager > class set_kernel_1 : public enumerable, public asc_remover { /*! REQUIREMENTS ON bst_base bst_base is instantiated with and implements binray_search_tree/binary_search_tree_kernel_abstract.h INITIAL VALUE bst has its initial value CONVENTION bst.size() == the number of elements in the set and the elements in the set are stored in bst !*/ public: typedef T type; typedef typename bst_base::compare_type compare_type; typedef mem_manager mem_manager_type; set_kernel_1( ) { } virtual ~set_kernel_1( ) {} inline void clear( ); inline void add ( T& item ); inline bool is_member ( const T& item ) const; inline void remove ( const T& item, T& item_copy ); inline void destroy ( const T& item ); inline void swap ( set_kernel_1& item ); // functions from the remover interface inline void remove_any ( T& item ); // functions from the enumerable interface inline size_t size ( ) const; inline bool at_start ( ) const; inline void reset ( ) const; inline bool current_element_valid ( ) const; inline const T& element ( ) const; inline const T& element ( ); inline bool move_next ( ) const; private: bst_base bst; char junk; // restricted functions set_kernel_1(set_kernel_1&); set_kernel_1& operator=(set_kernel_1&); }; template < typename T, typename bst_base, typename mem_manager > inline void swap ( set_kernel_1& a, set_kernel_1& b ) { a.swap(b); } template < typename T, typename bst_base, typename mem_manager > void deserialize ( set_kernel_1& item, std::istream& in ) { try { item.clear(); unsigned long size; deserialize(size,in); T temp; for (unsigned long i = 0; i < size; ++i) { deserialize(temp,in); item.add(temp); } } catch (serialization_error& e) { item.clear(); throw serialization_error(e.info + "\n while deserializing object of type set_kernel_1"); } } // ---------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------- // member function definitions // ---------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------- template < typename T, typename bst_base, typename mem_manager > void set_kernel_1:: clear ( ) { bst.clear(); } // ---------------------------------------------------------------------------------------- template < typename T, typename bst_base, typename mem_manager > void set_kernel_1:: add ( T& item ) { bst.add(item,junk); } // ---------------------------------------------------------------------------------------- template < typename T, typename bst_base, typename mem_manager > bool set_kernel_1:: is_member( const T& item ) const { return (bst[item] != 0); } // ---------------------------------------------------------------------------------------- template < typename T, typename bst_base, typename mem_manager > void set_kernel_1:: remove_any ( T& item ) { bst.remove_any(item,junk); } // ---------------------------------------------------------------------------------------- template < typename T, typename bst_base, typename mem_manager > void set_kernel_1:: remove( const T& item, T& item_copy ) { bst.remove(item,item_copy,junk); } // ---------------------------------------------------------------------------------------- template < typename T, typename bst_base, typename mem_manager > void set_kernel_1:: destroy( const T& item ) { bst.destroy(item); } // ---------------------------------------------------------------------------------------- template < typename T, typename bst_base, typename mem_manager > size_t set_kernel_1:: size ( ) const { return bst.size(); } // ---------------------------------------------------------------------------------------- template < typename T, typename bst_base, typename mem_manager > void set_kernel_1:: swap ( set_kernel_1& item ) { bst.swap(item.bst); } // ---------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------- // enumerable function definitions // ---------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------- template < typename T, typename bst_base, typename mem_manager > bool set_kernel_1:: at_start ( ) const { return bst.at_start(); } // ---------------------------------------------------------------------------------------- template < typename T, typename bst_base, typename mem_manager > void set_kernel_1:: reset ( ) const { bst.reset(); } // ---------------------------------------------------------------------------------------- template < typename T, typename bst_base, typename mem_manager > bool set_kernel_1:: current_element_valid ( ) const { return bst.current_element_valid(); } // ---------------------------------------------------------------------------------------- template < typename T, typename bst_base, typename mem_manager > const T& set_kernel_1:: element ( ) const { return bst.element().key(); } // ---------------------------------------------------------------------------------------- template < typename T, typename bst_base, typename mem_manager > const T& set_kernel_1:: element ( ) { return bst.element().key(); } // ---------------------------------------------------------------------------------------- template < typename T, typename bst_base, typename mem_manager > bool set_kernel_1:: move_next ( ) const { return bst.move_next(); } // ---------------------------------------------------------------------------------------- } #endif // DLIB_SET_KERNEl_1_ ================================================ FILE: benchmarks/dlib/set/set_kernel_abstract.h ================================================ // Copyright (C) 2003 Davis E. King (davis@dlib.net) // License: Boost Software License See LICENSE.txt for the full license. #undef DLIB_SET_KERNEl_ABSTRACT_ #ifdef DLIB_SET_KERNEl_ABSTRACT_ #include "../interfaces/enumerable.h" #include "../interfaces/remover.h" #include "../serialize.h" #include "../algs.h" #include namespace dlib { template < typename T, typename mem_manager = default_memory_manager, typename compare = std::less > class set : public enumerable, public asc_remover { /*! REQUIREMENTS ON T T must be comparable by compare where compare is a functor compatible with std::less and T must be swappable by a global swap() and T must have a default constructor REQUIREMENTS ON mem_manager must be an implementation of memory_manager/memory_manager_kernel_abstract.h or must be an implementation of memory_manager_global/memory_manager_global_kernel_abstract.h or must be an implementation of memory_manager_stateless/memory_manager_stateless_kernel_abstract.h mem_manager::type can be set to anything. POINTERS AND REFERENCES TO INTERNAL DATA swap() and is_member() functions do not invalidate pointers or references to internal data. All other functions have no such guarantee. INITIAL VALUE size() == 0 ENUMERATION ORDER The enumerator will iterate over the elements in the set in ascending order according to the compare functor. (i.e. the elements are enumerated in sorted order) WHAT THIS OBJECT REPRESENTS set contains items of type T This object represents an unaddressed collection of items. Every element in a set is unique. definition of equivalent: a is equivalent to b if a < b == false and b < a == false !*/ public: typedef T type; typedef compare compare_type; typedef mem_manager mem_manager_type; set( ); /*! ensures - #*this is properly initialized throws - std::bad_alloc or any exception thrown by T's constructor !*/ virtual ~set( ); /*! ensures - all memory associated with *this has been released !*/ void clear( ); /*! ensures - #*this has its initial value throws - std::bad_alloc or any exception thrown by T's constructor if this exception is thrown then *this is unusable until clear() is called and succeeds !*/ void add ( T& item ); /*! requires - is_member(item) == false ensures - #is_member(item) == true - #item has an initial value for its type - #size() == size() + 1 - #at_start() == true throws - std::bad_alloc or any exception thrown by T's constructor if add() throws then it has no effect !*/ bool is_member ( const T& item ) const; /*! ensures - returns whether or not there is an element in *this equivalent to item !*/ void remove ( const T& item, T& item_copy ); /*! requires - is_member(item) == true - &item != &item_copy (i.e. item and item_copy cannot be the same variable) ensures - #is_member(item) == false - the element in *this equivalent to item has been removed and swapped into #item_copy - #size() == size() - 1 - #at_start() == true !*/ void destroy ( const T& item ); /*! requires - is_member(item) == true ensures - #is_member(item) == false - #size() == size() - 1 - #at_start() == true !*/ void swap ( set& item ); /*! ensures - swaps *this and item !*/ private: // restricted functions set(set&); // copy constructor set& operator=(set&); // assignment operator }; template < typename T, typename mem_manager, typename compare > inline void swap ( set& a, set& b ) { a.swap(b); } /*! provides a global swap function !*/ template < typename T, typename mem_manager, typename compare > void deserialize ( set& item, std::istream& in ); /*! provides deserialization support !*/ } #endif // DLIB_SET_KERNEl_ABSTRACT_ ================================================ FILE: benchmarks/dlib/set/set_kernel_c.h ================================================ // Copyright (C) 2003 Davis E. King (davis@dlib.net) // License: Boost Software License See LICENSE.txt for the full license. #ifndef DLIB_SET_KERNEl_C_ #define DLIB_SET_KERNEl_C_ #include "set_kernel_abstract.h" #include "../algs.h" #include "../assert.h" namespace dlib { template < typename set_base > class set_kernel_c : public set_base { typedef typename set_base::type T; public: void add ( T& item ); void remove_any ( T& item ); void remove ( const T& item, T& item_copy ); void destroy ( const T& item ); const T& element ( ); const T& element ( ) const; }; template < typename set_base > inline void swap ( set_kernel_c& a, set_kernel_c& b ) { a.swap(b); } // ---------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------- // member function definitions // ---------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------- template < typename set_base > void set_kernel_c:: add( T& item ) { // make sure requires clause is not broken DLIB_CASSERT( !this->is_member(item), "\tvoid set::add" << "\n\titem being added must not already be in the set" << "\n\tthis: " << this ); // call the real function set_base::add(item); } // ---------------------------------------------------------------------------------------- template < typename set_base > void set_kernel_c:: remove ( const T& item, T& item_copy ) { // make sure requires clause is not broken DLIB_CASSERT( this->is_member(item) && (static_cast(&item) != static_cast(&item_copy)), "\tvoid set::remove" << "\n\titem should be in the set if it's going to be removed" << "\n\tthis: " << this << "\n\t&item: " << &item << "\n\t&item_copy: " << &item_copy << "\n\tis_member(item): " << (this->is_member(item)?"true":"false") ); // call the real function set_base::remove(item,item_copy); } // ---------------------------------------------------------------------------------------- template < typename set_base > void set_kernel_c:: destroy ( const T& item ) { // make sure requires clause is not broken DLIB_CASSERT( this->is_member(item), "\tvoid set::destroy" << "\n\titem should be in the set if it's going to be removed" << "\n\tthis: " << this << "\n\t&item: " << &item ); // call the real function set_base::destroy(item); } // ---------------------------------------------------------------------------------------- template < typename set_base > void set_kernel_c:: remove_any ( T& item ) { // make sure requires clause is not broken DLIB_CASSERT( this->size() != 0, "\tvoid set::remove_any" << "\n\tsize must be greater than zero if an item is to be removed" << "\n\tthis: " << this ); // call the real function set_base::remove_any(item); } // ---------------------------------------------------------------------------------------- template < typename set_base > const typename set_base::type& set_kernel_c:: element ( ) const { // make sure requires clause is not broken DLIB_CASSERT(this->current_element_valid() == true, "\tconst T& set::element() const" << "\n\tyou can't access the current element if it doesn't exist" << "\n\tthis: " << this ); // call the real function return set_base::element(); } // ---------------------------------------------------------------------------------------- template < typename set_base > const typename set_base::type& set_kernel_c:: element ( ) { // make sure requires clause is not broken DLIB_CASSERT(this->current_element_valid() == true, "\tconst T& set::element" << "\n\tyou can't access the current element if it doesn't exist" << "\n\tthis: " << this ); // call the real function return set_base::element(); } // ---------------------------------------------------------------------------------------- } #endif // DLIB_SET_KERNEl_C_ ================================================ FILE: benchmarks/dlib/set.h ================================================ // Copyright (C) 2003 Davis E. King (davis@dlib.net) // License: Boost Software License See LICENSE.txt for the full license. #ifndef DLIB_SEt_ #define DLIB_SEt_ #include "set/set_kernel_1.h" #include "set/set_kernel_c.h" #include "binary_search_tree.h" #include "set/set_compare_1.h" #include "algs.h" #include namespace dlib { template < typename T, typename mem_manager = default_memory_manager, typename compare = std::less > class set { set() {} typedef typename binary_search_tree::kernel_1a binary_search_tree_1; typedef typename binary_search_tree::kernel_2a binary_search_tree_2; public: //----------- kernels --------------- // kernel_1a typedef set_kernel_1 kernel_1a; typedef set_kernel_c kernel_1a_c; // kernel_1b typedef set_kernel_1 kernel_1b; typedef set_kernel_c kernel_1b_c; //---------- extensions ------------ // compare extensions typedef set_compare_1 compare_1a; typedef set_compare_1 compare_1a_c; typedef set_compare_1 compare_1b; typedef set_compare_1 compare_1b_c; }; } #endif // DLIB_SEt_ ================================================ FILE: benchmarks/dlib/sliding_buffer/circular_buffer.h ================================================ // Copyright (C) 2012 Davis E. King (davis@dlib.net) // License: Boost Software License See LICENSE.txt for the full license. #ifndef DLIB_CIRCULAR_BuFFER_Hh_ #define DLIB_CIRCULAR_BuFFER_Hh_ #include "circular_buffer_abstract.h" #include #include "../algs.h" #include "../serialize.h" #include "../matrix/matrix_mat.h" namespace dlib { // ---------------------------------------------------------------------------------------- template < typename T > class circular_buffer { public: typedef default_memory_manager mem_manager_type; typedef T value_type; typedef T type; circular_buffer() { } explicit circular_buffer(unsigned long s) { resize(s); } void clear ( ) { offset = 0; data.clear(); } T& operator[] ( unsigned long i) { DLIB_ASSERT(i < size(), "\t T& circular_buffer::operator[](i)" << "\n\t You have supplied an invalid index" << "\n\t this: " << this << "\n\t i: " << i << "\n\t size(): " << size() ); return data[(i+offset)%data.size()]; } const T& operator[] ( unsigned long i) const { DLIB_ASSERT(i < size(), "\t const T& circular_buffer::operator[](i)" << "\n\t You have supplied an invalid index" << "\n\t this: " << this << "\n\t i: " << i << "\n\t size(): " << size() ); return data[(i+offset)%data.size()]; } void resize(unsigned long size) { offset = 0; data.resize(size); } void assign( unsigned long size, const T& value ) { offset = 0; data.assign(size,value); } unsigned long size() const { return data.size(); } void push_front(const T& value) { if (data.size() != 0) { offset = (offset - 1 + data.size())%data.size(); data[offset] = value; } } void push_back(const T& value) { if (data.size() != 0) { data[offset] = value; offset = (offset + 1 + data.size())%data.size(); } } T& front( ) { DLIB_CASSERT(size() > 0, "\t T& circular_buffer::front()" << "\n\t You can't call front() on an empty circular_buffer" << "\n\t this: " << this ); return (*this)[0]; } const T& front( ) const { DLIB_CASSERT(size() > 0, "\t const T& circular_buffer::front()" << "\n\t You can't call front() on an empty circular_buffer" << "\n\t this: " << this ); return (*this)[0]; } T& back( ) { DLIB_CASSERT(size() > 0, "\t T& circular_buffer::back()" << "\n\t You can't call back() on an empty circular_buffer" << "\n\t this: " << this ); return (*this)[size()-1]; } const T& back( ) const { DLIB_CASSERT(size() > 0, "\t const T& circular_buffer::back()" << "\n\t You can't call back() on an empty circular_buffer" << "\n\t this: " << this ); return (*this)[size()-1]; } void swap( circular_buffer& item) { std::swap(item.offset, offset); data.swap(item.data); } private: std::vector data; unsigned long offset = 0; }; // ---------------------------------------------------------------------------------------- template < typename T > void swap ( circular_buffer& a, circular_buffer& b ) { a.swap(b); } // ---------------------------------------------------------------------------------------- template < typename T > void serialize ( const circular_buffer& item, std::ostream& out ) { try { serialize(item.size(),out); for (unsigned long i = 0; i < item.size(); ++i) serialize(item[i],out); } catch (serialization_error& e) { throw serialization_error(e.info + "\n while serializing object of type circular_buffer"); } } // ---------------------------------------------------------------------------------------- template < typename T > void deserialize ( circular_buffer& item, std::istream& in ) { try { unsigned long size; deserialize(size,in); item.resize(size); for (unsigned long i = 0; i < size; ++i) deserialize(item[i],in); } catch (serialization_error& e) { item.clear(); throw serialization_error(e.info + "\n while deserializing object of type circular_buffer"); } } // ---------------------------------------------------------------------------------------- template < typename T > const matrix_op > > mat ( const circular_buffer& m ) { typedef op_array_to_mat > op; return matrix_op(op(m)); } // ---------------------------------------------------------------------------------------- } #endif // DLIB_CIRCULAR_BuFFER_Hh_ ================================================ FILE: benchmarks/dlib/sliding_buffer/circular_buffer_abstract.h ================================================ // Copyright (C) 2012 Davis E. King (davis@dlib.net) // License: Boost Software License See LICENSE.txt for the full license. #undef DLIB_CIRCULAR_BuFFER_ABSTRACT_Hh_ #ifdef DLIB_CIRCULAR_BuFFER_ABSTRACT_Hh_ #include "../algs.h" #include "../serialize.h" namespace dlib { // ---------------------------------------------------------------------------------------- template < typename T > class circular_buffer { /*! REQUIREMENTS ON T T must have a default constructor and be copyable. POINTERS AND REFERENCES TO INTERNAL DATA swap(), size(), front(), back(), and operator[] functions do not invalidate pointers or references to internal data. All other functions have no such guarantee. INITIAL VALUE - size() == 0 WHAT THIS OBJECT REPRESENTS This object is a circular buffer of objects of type T. This means that when objects are pushed onto one of its ends it does not grow in size. Instead, it shifts all elements over one to make room for the new element and the element at the opposing end falls off the buffer and is lost. !*/ public: typedef default_memory_manager mem_manager_type; typedef T value_type; typedef T type; circular_buffer( ); /*! ensures - #size() == 0 - this object is properly initialized !*/ explicit circular_buffer( unsigned long s ); /*! ensures - #size() == s - this object is properly initialized !*/ void clear ( ); /*! ensures - this object has its initial value - #size() == 0 !*/ T& operator[] ( unsigned long i ) const; /*! requires - i < size() ensures - returns a non-const reference to the i-th element of this circular buffer !*/ const T& operator[] ( unsigned long i ) const; /*! requires - i < size() ensures - returns a const reference to the i-th element of this circular buffer !*/ void resize( unsigned long new_size ); /*! ensures - #size() == new_size !*/ void assign( unsigned long new_size, const T& value ); /*! ensures - #size() == new_size - for all valid i: - (*this)[i] == value !*/ unsigned long size( ) const; /*! ensures - returns the number of elements in this circular buffer !*/ T& front( ); /*! requires - size() > 0 ensures - returns a reference to (*this)[0] !*/ const T& front( ) const; /*! requires - size() > 0 ensures - returns a const reference to (*this)[0] !*/ T& back( ); /*! requires - size() > 0 ensures - returns a reference to (*this)[size()-1] !*/ const T& back( ) const; /*! requires - size() > 0 ensures - returns a const reference to (*this)[size()-1] !*/ void push_front( const T& value ); /*! ensures - #size() == size() (i.e. the size of this object does not change) - if (size() != 0) then - #front() == value - all items are shifted over such that, - #(*this)[1] == (*this)[0] - #(*this)[2] == (*this)[1] - #(*this)[3] == (*this)[2] - etc. - back() is shifted out of the circular buffer - else - This function has no effect on this object !*/ void push_back( const T& value ); /*! ensures - #size() == size() (i.e. the size of this object does not change) - if (size() != 0) then - #back() == value - all items are shifted over such that, - front() is shifted out of the circular buffer - #(*this)[0] == (*this)[1] - #(*this)[1] == (*this)[2] - #(*this)[2] == (*this)[3] - etc. - else - This function has no effect on this object !*/ void swap ( circular_buffer& item ); /*! ensures - swaps *this with item !*/ }; // ---------------------------------------------------------------------------------------- template < typename T > void swap ( circular_buffer& a, circular_buffer& b ) { a.swap(b); } /*! provides a global swap function !*/ template < typename T > void serialize ( const circular_buffer& item, std::ostream& out ); /*! provides serialization support !*/ template < typename T > void deserialize ( circular_buffer& item, std::istream& in ); /*! provides deserialization support !*/ // ---------------------------------------------------------------------------------------- template < typename T > const matrix_exp mat ( const circular_buffer& m ); /*! ensures - returns a matrix R such that: - is_col_vector(R) == true - R.size() == m.size() - for all valid r: R(r) == m[r] !*/ // ---------------------------------------------------------------------------------------- } #endif // DLIB_CIRCULAR_BuFFER_ABSTRACT_Hh_ ================================================ FILE: benchmarks/dlib/sliding_buffer/sliding_buffer_kernel_1.h ================================================ // Copyright (C) 2004 Davis E. King (davis@dlib.net) // License: Boost Software License See LICENSE.txt for the full license. #ifndef DLIB_SLIDING_BUFFER_KERNEl_1_ #define DLIB_SLIDING_BUFFER_KERNEl_1_ #include "sliding_buffer_kernel_abstract.h" #include "../algs.h" #include "../interfaces/enumerable.h" #include "../serialize.h" namespace dlib { template < typename T > class sliding_buffer_kernel_1 : public enumerable { /*! INITIAL VALUE - buffer_size == 0 - buffer == 0 - buffer_start == 0 - current == 0 - at_start_ == true CONVENTION - buffer_size == size() - element() == (*this)[current] - current_element_valid() == (current < buffer_size) && at_start_ == false - at_start() == at_start_ - if (buffer_size != 0) then - buffer[(buffer_start+i)&(mask)] == operator[](i) - mask == buffer_size-1 - else - buffer == 0 - buffer_size == 0 !*/ public: typedef T type; sliding_buffer_kernel_1 ( ) : buffer_start(0), buffer_size(0), buffer(0), current(0), at_start_(true) {} virtual ~sliding_buffer_kernel_1 ( ) { if (buffer) delete [] buffer; } void clear( ) { buffer_size = 0; if (buffer) delete [] buffer; buffer = 0; at_start_ = true; current = 0; } void set_size ( unsigned long exp_size ) { at_start_ = true; if (buffer) delete [] buffer; buffer_size = 1; while (exp_size != 0) { --exp_size; buffer_size <<= 1; } mask = buffer_size-1; try { buffer = new T[buffer_size]; } catch (...) { buffer = 0; buffer_size = 0; throw; } } size_t size ( ) const { return buffer_size; } void rotate_left ( unsigned long amount ) { buffer_start = ((buffer_start-amount)&mask); at_start_ = true; } void rotate_right ( unsigned long amount ) { buffer_start = ((buffer_start+amount)&mask); at_start_ = true;} const T& operator[] ( unsigned long index ) const { return buffer[(buffer_start+index)&mask]; } T& operator[] ( unsigned long index ) { return buffer[(buffer_start+index)&mask]; } unsigned long get_element_id( unsigned long index ) const { return ((buffer_start+index)&mask); } unsigned long get_element_index ( unsigned long element_id ) const { return ((element_id-buffer_start)&mask);} void swap ( sliding_buffer_kernel_1& item ) { exchange(buffer_start,item.buffer_start); exchange(buffer_size,item.buffer_size); exchange(buffer,item.buffer); exchange(mask,item.mask); exchange(current,item.current); exchange(at_start_,item.at_start_); } bool at_start ( ) const { return at_start_; } void reset ( ) const { at_start_ = true; } bool current_element_valid ( ) const { return (current < buffer_size) && (at_start_ == false); } const T& element ( ) const { return (*this)[current]; } T& element ( ) { return (*this)[current]; } bool move_next ( ) const { if (at_start_ == false) { if (current+1 < buffer_size) { ++current; return true; } else { current = buffer_size; return false; } } else { at_start_ = false; current = 0; return (buffer_size != 0); } } private: // data members unsigned long buffer_start; unsigned long buffer_size; T* buffer; unsigned long mask; mutable unsigned long current; mutable bool at_start_; // restricted functions sliding_buffer_kernel_1(sliding_buffer_kernel_1&); // copy constructor sliding_buffer_kernel_1& operator=(sliding_buffer_kernel_1&); // assignment operator }; template < typename T > inline void swap ( sliding_buffer_kernel_1& a, sliding_buffer_kernel_1& b ) { a.swap(b); } template < typename T > void deserialize ( sliding_buffer_kernel_1& item, std::istream& in ) { try { item.clear(); unsigned long size; deserialize(size,in); if (size > 0) { int count = 0; while (size != 1) { size /= 2; ++count; } item.set_size(count); for (unsigned long i = 0; i < item.size(); ++i) deserialize(item[i],in); } } catch (serialization_error& e) { item.clear(); throw serialization_error(e.info + "\n while deserializing object of type sliding_buffer_kernel_1"); } } } #endif // DLIB_SLIDING_BUFFER_KERNEl_1_ ================================================ FILE: benchmarks/dlib/sliding_buffer/sliding_buffer_kernel_abstract.h ================================================ // Copyright (C) 2004 Davis E. King (davis@dlib.net) // License: Boost Software License See LICENSE.txt for the full license. #undef DLIB_SLIDING_BUFFER_KERNEl_ABSTRACT_ #ifdef DLIB_SLIDING_BUFFER_KERNEl_ABSTRACT_ #include "../algs.h" #include "../interfaces/enumerable.h" #include "../serialize.h" namespace dlib { template < typename T > class sliding_buffer : public enumerable { /*! REQUIREMENTS ON T T must have a default constructor INITIAL VALUE size() == 0 ENUMERATION ORDER The enumerator will iterate over the elements of the sliding_buffer in the order (*this)[0], (*this)[1], (*this)[2], ... WHAT THIS OBJECT REPRESENTS This object represents an array of T objects. The main feature of this object is its ability to rotate its contents left or right. An example will make it clear. suppose we have the following buffer (assuming T is a char): "some data!" <-- the data in the buffer 9876543210 <-- the index numbers associated with each character applying rotate_left(2) to this buffer would give us "me data!so" 9876543210 if instead of calling rotate_left we call rotate_right(3) instead we would have "ta!some da" 9876543210 Also note that unless specified otherwise, no member functions of this object throw exceptions. !*/ public: typedef T type; sliding_buffer ( ); /*! ensures - #*this is properly initialized throws - std::bad_alloc or any exception thrown by T's constructor. !*/ virtual ~sliding_buffer ( ); /*! ensures - any resources associated with *this have been released !*/ void clear( ); /*! ensures - #*this has its initial value throws - std::bad_alloc or any exception thrown by T's constructor. if this exception is thrown then #*this is unusable until clear() is called and succeeds !*/ void set_size ( unsigned long exp_size ); /*! requires - 0 < exp_size < 32 ensures - #size() == 2^exp_size - the value of all elements in the buffer are undefined - #at_start() == true throws - std::bad_alloc or any exception thrown by T's constructor. if this exception is thrown then #size() == 0 !*/ void rotate_left ( unsigned long amount ); /*! ensures - for all i where 0 <= i < size(): (#*this)[i] == (*this)[(i-amount)&(size()-1)] i.e. rotates the contents of *this left by amount spaces - #at_start() == true !*/ void rotate_right ( unsigned long amount ); /*! ensures - for all i where 0 <= i < size(): (#*this)[i] == (*this)[(i+amount)&(size()-1)] i.e. rotates the contents of *this right by amount spaces - #at_start() == true !*/ unsigned long get_element_id ( unsigned long index ) const; /*! requires - index < size() ensures - returns an element id number that uniquely references the element at the given index. (you can use this id to locate the new position of an element after the buffer has been rotated) - returned value is < size() !*/ unsigned long get_element_index ( unsigned long element_id ) const; /*! require - element_id < size() ensures - returns the index of the element with the given element_id. ( (*this)[get_element_index(element_id)] will always refer to the same element no matter where it has been rotated to) - returned value is < size() !*/ const T& operator[] ( unsigned long index ) const; /*! requires - index < size() ensures - returns a const reference to the element in *this at position index !*/ T& operator[] ( unsigned long index ); /*! requires - index < size() ensures - returns a reference to the element in *this at position index !*/ void swap ( sliding_buffer& item ); /*! ensures - swaps *this and item !*/ private: // restricted functions sliding_buffer(sliding_buffer&); // copy constructor sliding_buffer& operator=(sliding_buffer&); // assignment operator }; template < typename T > void swap ( sliding_buffer& a, sliding_buffer& b ) { a.swap(b); } /*! provides a global swap function !*/ template < typename T > void deserialize ( sliding_buffer& item, std::istream& in ); /*! provides deserialization support !*/ } #endif // DLIB_SLIDING_BUFFER_KERNEl_ABSTRACT_ ================================================ FILE: benchmarks/dlib/sliding_buffer/sliding_buffer_kernel_c.h ================================================ // Copyright (C) 2003 Davis E. King (davis@dlib.net) // License: Boost Software License See LICENSE.txt for the full license. #ifndef DLIB_SLIDING_BUFFER_KERNEl_C_ #define DLIB_SLIDING_BUFFER_KERNEl_C_ #include "sliding_buffer_kernel_abstract.h" #include "../algs.h" #include "../assert.h" #include namespace dlib { template < typename sb_base > class sliding_buffer_kernel_c : public sb_base { typedef typename sb_base::type T; public: void set_size ( unsigned long exp_size ); const T& operator[] ( unsigned long index ) const; T& operator[] ( unsigned long index ); unsigned long get_element_id ( unsigned long index ) const; unsigned long get_element_index ( unsigned long element_id ) const; const T& element ( ) const; T& element ( ); }; template < typename sb_base > inline void swap ( sliding_buffer_kernel_c& a, sliding_buffer_kernel_c& b ) { a.swap(b); } // ---------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------- // member function definitions // ---------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------- template < typename sb_base > void sliding_buffer_kernel_c:: set_size ( unsigned long exp_size ) { // make sure requires clause is not broken DLIB_CASSERT( 0 < exp_size && exp_size < 32, "\tvoid sliding_buffer::set_size(unsigned long)" << "\n\texp_size must be some number between 1 and 31" << "\n\tthis: " << this << "\n\texp_size: " << exp_size ); // call the real function sb_base::set_size(exp_size); } // ---------------------------------------------------------------------------------------- template < typename sb_base > unsigned long sliding_buffer_kernel_c:: get_element_id ( unsigned long index ) const { // make sure requires clause is not broken DLIB_CASSERT( index < this->size(), "\tunsigned long sliding_buffer::get_element_id(unsigned long) const" << "\n\tindex must be in the range 0 to size()-1" << "\n\tthis: " << this << "\n\tsize(): " << this->size() << "\n\tindex: " << index ); // call the real function return sb_base::get_element_id(index); } // ---------------------------------------------------------------------------------------- template < typename sb_base > unsigned long sliding_buffer_kernel_c:: get_element_index ( unsigned long element_id ) const { // make sure requires clause is not broken DLIB_CASSERT( element_id < this->size(), "\tunsigned long sliding_buffer::get_element_index(unsigned long) const" << "\n\tid must be in the range 0 to size()-1" << "\n\tthis: " << this << "\n\tsize(): " << this->size() << "\n\tid: " << element_id ); // call the real function return sb_base::get_element_index(element_id); } // ---------------------------------------------------------------------------------------- template < typename sb_base > const typename sb_base::type& sliding_buffer_kernel_c:: operator[] ( unsigned long index ) const { // make sure requires clause is not broken DLIB_CASSERT( index < this->size(), "\tconst T& sliding_buffer::operator[](unsigned long) const" << "\n\tindex must be in the range 0 to size()-1" << "\n\tthis: " << this << "\n\tsize(): " << this->size() << "\n\tindex: " << index ); // call the real function return sb_base::operator[](index); } // ---------------------------------------------------------------------------------------- template < typename sb_base > typename sb_base::type& sliding_buffer_kernel_c:: operator[] ( unsigned long index ) { // make sure requires clause is not broken DLIB_CASSERT( index < this->size(), "\tT& sliding_buffer::operator[](unsigned long)" << "\n\tindex must be in the range 0 to size()-1" << "\n\tthis: " << this << "\n\tsize(): " << this->size() << "\n\tindex: " << index ); // call the real function return sb_base::operator[](index); } // ---------------------------------------------------------------------------------------- template < typename sb_base > const typename sb_base::type& sliding_buffer_kernel_c:: element ( ) const { // make sure requires clause is not broken DLIB_CASSERT(this->current_element_valid() == true, "\tconst T& sliding_buffer::element" << "\n\tyou can't access the current element if it doesn't exist" << "\n\tthis: " << this ); // call the real function return sb_base::element(); } // ---------------------------------------------------------------------------------------- template < typename sb_base > typename sb_base::type& sliding_buffer_kernel_c:: element ( ) { // make sure requires clause is not broken DLIB_CASSERT(this->current_element_valid() == true, "\tT& sliding_buffer::element" << "\n\tyou can't access the current element if it doesn't exist" << "\n\tthis: " << this ); // call the real function return sb_base::element(); } // ---------------------------------------------------------------------------------------- } #endif // DLIB_SLIDING_BUFFER_KERNEl_C_ ================================================ FILE: benchmarks/dlib/sliding_buffer.h ================================================ // Copyright (C) 2004 Davis E. King (davis@dlib.net) // License: Boost Software License See LICENSE.txt for the full license. #ifndef DLIB_SLIDING_BUFFEr_ #define DLIB_SLIDING_BUFFEr_ #include "sliding_buffer/sliding_buffer_kernel_1.h" #include "sliding_buffer/sliding_buffer_kernel_c.h" #include "sliding_buffer/circular_buffer.h" namespace dlib { template < typename T > class sliding_buffer { sliding_buffer() {} public: //----------- kernels --------------- // kernel_1a typedef sliding_buffer_kernel_1 kernel_1a; typedef sliding_buffer_kernel_c kernel_1a_c; }; } #endif // DLIB_SLIDING_BUFFEr_ ================================================ FILE: benchmarks/dlib/sockets/posix.h ================================================ // Copyright (C) 2003 Davis E. King (davis@dlib.net) // License: Boost Software License See LICENSE.txt for the full license. #ifndef DLIB_SOCKETS_KERNEl_1_ #include "sockets_kernel_2.h" #endif ================================================ FILE: benchmarks/dlib/sockets/sockets_extensions.h ================================================ // Copyright (C) 2006 Davis E. King (davis@dlib.net) // License: Boost Software License See LICENSE.txt for the full license. #ifndef DLIB_SOCKETS_EXTENSIONs_ #define DLIB_SOCKETS_EXTENSIONs_ #include #include #include #include "../sockets.h" #include "../smart_pointers/scoped_ptr.h" #include "sockets_extensions_abstract.h" namespace dlib { // ---------------------------------------------------------------------------------------- class invalid_network_address : public dlib::error { public: invalid_network_address(const std::string& msg) : dlib::error(msg) {}; }; // ---------------------------------------------------------------------------------------- struct network_address { network_address() : port(0){} network_address( const std::string& full_address ); network_address ( const char* full_address ) { *this = network_address(std::string(full_address)); } network_address( const std::string& host_address_, const unsigned short port_ ) : host_address(host_address_), port(port_) {} std::string host_address; unsigned short port; }; // ---------------------------------------------------------------------------------------- inline bool operator < ( const network_address& a, const network_address& b ) { if (a.host_address < b.host_address) return true; else if (a.host_address > b.host_address) return false; else if (a.port < b.port) return true; else return false; } inline bool operator== ( const network_address& a, const network_address& b ) { return a.host_address == b.host_address && a.port == b.port; } inline bool operator != ( const network_address& a, const network_address& b ) { return !(a == b); } // ---------------------------------------------------------------------------------------- void serialize( const network_address& item, std::ostream& out ); void deserialize( network_address& item, std::istream& in ); std::ostream& operator<< ( std::ostream& out, const network_address& item ); std::istream& operator>> ( std::istream& in, network_address& item ); // ---------------------------------------------------------------------------------------- connection* connect ( const std::string& host_or_ip, unsigned short port ); // ---------------------------------------------------------------------------------------- connection* connect ( const network_address& addr ); // ---------------------------------------------------------------------------------------- connection* connect ( const std::string& host_or_ip, unsigned short port, unsigned long timeout ); // ---------------------------------------------------------------------------------------- bool is_ip_address ( std::string ip ); // ---------------------------------------------------------------------------------------- void close_gracefully ( connection* con, unsigned long timeout = 500 ); // ---------------------------------------------------------------------------------------- void close_gracefully ( std::unique_ptr& con, unsigned long timeout = 500 ); // ---------------------------------------------------------------------------------------- } #ifdef NO_MAKEFILE #include "sockets_extensions.cpp" #endif #endif // DLIB_SOCKETS_EXTENSIONs_ ================================================ FILE: benchmarks/dlib/sockets/sockets_extensions_abstract.h ================================================ // Copyright (C) 2006 Davis E. King (davis@dlib.net) // License: Boost Software License See LICENSE.txt for the full license. #undef DLIB_SOCKETS_EXTENSIONs_ABSTRACT_ #ifdef DLIB_SOCKETS_EXTENSIONs_ABSTRACT_ #include #include #include "sockets_kernel_abstract.h" #include "../error.h" namespace dlib { // ---------------------------------------------------------------------------------------- class invalid_network_address : public dlib::error { /*! WHAT THIS OBJECT REPRESENTS This is the exception thrown by network_address's constructor if the input is invalid. !*/ }; // ---------------------------------------------------------------------------------------- struct network_address { /*! WHAT THIS OBJECT REPRESENTS This object is simply a container for two things: - A host machine address which is either an IP address or DNS name for a machine. - A port number. Together, these things define a machine and port on that machine. !*/ network_address( ); /*! ensures - host_address == "" - #port == 0 !*/ network_address( const std::string& full_address ); /*! ensures - interprets full_address as a network address of the form: host_address:port and assigns each part into #host_address and #port. For example, network_address("localhost:80") would result in a network_address object where host_address was "localhost" and port was 80. throws - invalid_network_address This exception is thrown if the full_address string can't be interpreted as a valid network address. !*/ network_address ( const char* full_address ); /*! requires - full_address == a valid pointer to a null terminated string ensures - Invoking this constructor is equivalent to performing network_address(std::string(full_address)) !*/ network_address( const std::string& host_address_, const unsigned short port_ ); /*! ensures - #host_address == host_address_ - #port == port_ !*/ std::string host_address; unsigned short port; }; // ---------------------------------------------------------------------------------------- inline bool operator < ( const network_address& a, const network_address& b ); /*! ensures - provides a total ordering over network_address objects so you can use them in the standard associative containers. The ordering is defined such that if you sorted network addresses they would sort first on the host_address string and then, for network_address objects with equal host_address, they would sort on the port number !*/ inline bool operator== ( const network_address& a, const network_address& b ); /*! ensures - returns true if a and b contain exactly the same address and false otherwise. That is, the following must be true for this function to return true: - a.host_address == b.host_address - a.port == b.port Note that this means that two addresses which are logically equivalent but written differently will not compare equal. For example, suppose example.com has the IP address 10.1.1.1. Then network_address("10.1.1.1:80") and network_address("example.com:80") really refer to the same network resource but will nevertheless not compare equal since. !*/ inline bool operator != ( const network_address& a, const network_address& b ); /*! ensures - returns !(a == b) !*/ // ---------------------------------------------------------------------------------------- void serialize( const network_address& item, std::ostream& out ); /*! ensures - provides serialization support !*/ void deserialize( network_address& item, std::istream& in ); /*! ensures - provides deserialization support !*/ std::ostream& operator<< ( std::ostream& out, const network_address& item ); /*! ensures - writes the given network_address to the output stream. The format is the host_address, then a colon, then the port number. So for example: cout << network_address("localhost", 80); would print: localhost:80 - returns #out !*/ std::istream& operator>> ( std::istream& in, network_address& item ); /*! ensures - reads a network_address from the given input stream. The expected format is the same as the one used to print them by the above operator<<() routine. - returns #in - if (there is an error reading the network_address) then - #in.good() == false !*/ // ---------------------------------------------------------------------------------------- connection* connect ( const std::string& host_or_ip, unsigned short port ); /*! ensures - returns a connection object that is connected to the given host at the given port throws - dlib::socket_error This exception is thrown if there is some problem that prevents us from creating the connection - std::bad_alloc !*/ // ---------------------------------------------------------------------------------------- connection* connect ( const network_address& addr ); /*! ensures - returns connect(addr.host_address, addr_port); !*/ // ---------------------------------------------------------------------------------------- connection* connect ( const std::string& host_or_ip, unsigned short port, unsigned long timeout ); /*! ensures - returns a connection object that is connected to the given host at the given port. - blocks for at most timeout milliseconds throws - dlib::socket_error This exception is thrown if there is some problem that prevents us from creating the connection or if timeout milliseconds elapses before the connect is successful. - std::bad_alloc !*/ // ---------------------------------------------------------------------------------------- bool is_ip_address ( std::string ip ); /*! ensures - if (ip is a valid ip address) then - returns true - else - returns false !*/ // ---------------------------------------------------------------------------------------- void close_gracefully ( connection* con, unsigned long timeout = 500 ); /*! requires - con == a valid pointer to a connection object or 0 ensures - This function does nothing if con == 0, otherwise it performs the following: - performs a graceful close of the given connection and if it takes longer than timeout milliseconds to complete then forces the connection closed. - Specifically, a graceful close means that the outgoing part of con is closed (a FIN is sent) and then we wait for the other end to to close their end of the connection. This way any data still on its way to the other end of the connection will be received properly. - This function will block until the graceful close is completed or we timeout. - calls "delete con;". Thus con is no longer a valid pointer after this function has finished. throws - std::bad_alloc or dlib::thread_error If either of these exceptions are thrown con will still be closed via "delete con;" !*/ // ---------------------------------------------------------------------------------------- void close_gracefully ( std::unique_ptr& con, unsigned long timeout = 500 ); /*! requires - con == a valid pointer to a connection object or con.get() == 0 ensures - This function does nothing if con.get() == 0, otherwise it performs the following: - performs a graceful close of the given connection and if it takes longer than timeout milliseconds to complete then forces the connection closed. - Specifically, a graceful close means that the outgoing part of con is closed (a FIN is sent) and then we wait for the other end to to close their end of the connection. This way any data still on its way to the other end of the connection will be received properly. - This function will block until the graceful close is completed or we timeout. - #con.get() == 0. Thus con is no longer a valid pointer after this function has finished. throws - std::bad_alloc or dlib::thread_error If either of these exceptions are thrown con will still be closed and deleted (i.e. #con.get() == 0). !*/ // ---------------------------------------------------------------------------------------- } #endif // DLIB_SOCKETS_EXTENSIONs_ABSTRACT_ ================================================ FILE: benchmarks/dlib/sockets/sockets_kernel_1.h ================================================ // Copyright (C) 2003 Davis E. King (davis@dlib.net), Miguel Grinberg // License: Boost Software License See LICENSE.txt for the full license. #ifndef DLIB_SOCKETS_KERNEl_1_ #define DLIB_SOCKETS_KERNEl_1_ #ifdef DLIB_ISO_CPP_ONLY #error "DLIB_ISO_CPP_ONLY is defined so you can't use this OS dependent code. Turn DLIB_ISO_CPP_ONLY off if you want to use it." #endif #include "sockets_kernel_abstract.h" #include #include #include "../algs.h" #include "../threads.h" #include "../uintn.h" namespace dlib { // ---------------------------------------------------------------------------------------- // forward declarations class socket_factory; class listener; class SOCKET_container; // ---------------------------------------------------------------------------------------- // lookup functions int get_local_hostname ( std::string& hostname ); // ----------------- int hostname_to_ip ( const std::string& hostname, std::string& ip, int n = 0 ); // ----------------- int ip_to_hostname ( const std::string& ip, std::string& hostname ); // ---------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------- // connection object // ---------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------- class connection { /*! INITIAL_VALUE - sd == false - sdo == false - sdr == 0 CONVENTION - connection_socket == the socket handle for this connection. - connection_foreign_port == the port that foreign host is using for this connection. - connection_foreign_ip == a string containing the IP address of the foreign host. - connection_local_port == the port that the local host is using for this connection. - connection_local_ip == a string containing the IP address of the local interface being used by this connection. - sd == if shutdown() has been called then true else false. - sdo == if shutdown_outgoing() has been called then true else false. - sdr == the return value of shutdown() if it has been called. if it hasn't been called then 0. !*/ friend class listener; // make listener a friend of connection // make create_connection a friend of connection friend int create_connection ( connection*& new_connection, unsigned short foreign_port, const std::string& foreign_ip, unsigned short local_port, const std::string& local_ip ); public: ~connection ( ); void* user_data; long write ( const char* buf, long num ); long read ( char* buf, long num ); long read ( char* buf, long num, unsigned long timeout ); unsigned short get_local_port ( ) const { return connection_local_port; } unsigned short get_foreign_port ( ) const { return connection_foreign_port; } const std::string& get_local_ip ( ) const { return connection_local_ip; } const std::string& get_foreign_ip ( ) const { return connection_foreign_ip; } int shutdown_outgoing ( ); int shutdown ( ); // I would use SOCKET here but I don't want to include the windows // header files since they bring in a bunch of unpleasantness. So // I'm doing this instead which should ultimately be the same type // as the SOCKET win the windows API. typedef unsigned_type::type socket_descriptor_type; int disable_nagle( ); socket_descriptor_type get_socket_descriptor ( ) const; private: bool readable ( unsigned long timeout ) const; /*! requires - timeout < 2000000 ensures - returns true if a read call on this connection will not block. - returns false if a read call on this connection will block or if there was an error. !*/ bool sd_called ( )const /*! ensures - returns true if shutdown() has been called else returns false !*/ { sd_mutex.lock(); bool temp = sd; sd_mutex.unlock(); return temp; } bool sdo_called ( )const /*! ensures - returns true if shutdown_outgoing() or shutdown() has been called else returns false !*/ { sd_mutex.lock(); bool temp = false; if (sdo || sd) temp = true; sd_mutex.unlock(); return temp; } // data members SOCKET_container& connection_socket; const unsigned short connection_foreign_port; const std::string connection_foreign_ip; const unsigned short connection_local_port; const std::string connection_local_ip; bool sd; // called shutdown bool sdo; // called shutdown_outgoing int sdr; // return value for shutdown mutex sd_mutex; // a lock for the three above vars connection( SOCKET_container sock, unsigned short foreign_port, const std::string& foreign_ip, unsigned short local_port, const std::string& local_ip ); /*! requires sock is a socket handle and sock is the handle for the connection between foreign_ip:foreign_port and local_ip:local_port ensures *this is initialized correctly with the above parameters !*/ // restricted functions connection(connection&); // copy constructor connection& operator=(connection&); // assignment operator }; // ---------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------- // listener object // ---------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------- class listener { /*! CONVENTION if (inaddr_any == false) { listening_ip == a string containing the address the listener is listening on } else { the listener is listening on all interfaces } listening_port == the port the listener is listening on listening_socket == the listening socket handle for this object !*/ // make the create_listener a friend of listener friend int create_listener ( listener*& new_listener, unsigned short port, const std::string& ip ); public: ~listener ( ); int accept ( connection*& new_connection, unsigned long timeout = 0 ); int accept ( std::unique_ptr& new_connection, unsigned long timeout = 0 ); unsigned short get_listening_port ( ) { return listening_port; } const std::string& get_listening_ip ( ) { return listening_ip; } private: // data members SOCKET_container& listening_socket; const unsigned short listening_port; const std::string listening_ip; const bool inaddr_any; listener( SOCKET_container sock, unsigned short port, const std::string& ip ); /*! requires sock is a socket handle and sock is listening on the port and ip(may be "") indicated in the above parameters ensures *this is initialized correctly with the above parameters !*/ // restricted functions listener(listener&); // copy constructor listener& operator=(listener&); // assignment operator }; // ---------------------------------------------------------------------------------------- int create_listener ( listener*& new_listener, unsigned short port, const std::string& ip = "" ); int create_connection ( connection*& new_connection, unsigned short foreign_port, const std::string& foreign_ip, unsigned short local_port = 0, const std::string& local_ip = "" ); int create_listener ( std::unique_ptr& new_listener, unsigned short port, const std::string& ip = "" ); int create_connection ( std::unique_ptr& new_connection, unsigned short foreign_port, const std::string& foreign_ip, unsigned short local_port = 0, const std::string& local_ip = "" ); // ---------------------------------------------------------------------------------------- } #ifdef NO_MAKEFILE #include "sockets_kernel_1.cpp" #endif #endif // DLIB_SOCKETS_KERNEl_1_ ================================================ FILE: benchmarks/dlib/sockets/sockets_kernel_2.h ================================================ // Copyright (C) 2003 Davis E. King (davis@dlib.net), Miguel Grinberg // License: Boost Software License See LICENSE.txt for the full license. #ifndef DLIB_SOCKETS_KERNEl_2_ #define DLIB_SOCKETS_KERNEl_2_ #ifdef DLIB_ISO_CPP_ONLY #error "DLIB_ISO_CPP_ONLY is defined so you can't use this OS dependent code. Turn DLIB_ISO_CPP_ONLY off if you want to use it." #endif #include "../platform.h" #include "sockets_kernel_abstract.h" #define _BSD_SOCKLEN_T_ #include #include #include #include #include #include #ifndef HPUX #include #endif #include #include #include #include #include #include #include #include "../threads.h" #include "../algs.h" namespace dlib { // ---------------------------------------------------------------------------------------- // forward declarations class socket_factory; class listener; // ---------------------------------------------------------------------------------------- // lookup functions int get_local_hostname ( std::string& hostname ); // ----------------- int hostname_to_ip ( const std::string& hostname, std::string& ip, int n = 0 ); // ----------------- int ip_to_hostname ( const std::string& ip, std::string& hostname ); // ---------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------- // connection object // ---------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------- class connection { /*! INITIAL_VALUE sd == false sdo == false sdr == 0 CONVENTION connection_socket == the socket handle for this connection. connection_foreign_port == the port that foreign host is using for this connection connection_foreign_ip == a string containing the IP address of the foreign host connection_local_port == the port that the local host is using for this connection connection_local_ip == a string containing the IP address of the local interface being used by this connection sd == if shutdown() has been called then true else false sdo == if shutdown_outgoing() has been called then true else false sdr == the return value of shutdown() if it has been called. if it hasn't been called then 0 !*/ friend class listener; // make listener a friend of connection // make create_connection a friend of connection friend int create_connection ( connection*& new_connection, unsigned short foreign_port, const std::string& foreign_ip, unsigned short local_port, const std::string& local_ip ); public: ~connection(); void* user_data; long write ( const char* buf, long num ); long read ( char* buf, long num ); long read ( char* buf, long num, unsigned long timeout ); int get_local_port ( ) const { return connection_local_port; } int get_foreign_port ( ) const { return connection_foreign_port; } const std::string& get_local_ip ( ) const { return connection_local_ip; } const std::string& get_foreign_ip ( ) const { return connection_foreign_ip; } int shutdown_outgoing ( ) { sd_mutex.lock(); if (sdo || sd) { sd_mutex.unlock(); return sdr; } sdo = true; sdr = ::shutdown(connection_socket,SHUT_WR); int temp = sdr; sd_mutex.unlock(); return temp; } int shutdown ( ) { sd_mutex.lock(); if (sd) { sd_mutex.unlock(); return sdr; } sd = true; sdr = ::shutdown(connection_socket,SHUT_RDWR); int temp = sdr; sd_mutex.unlock(); return temp; } int disable_nagle( ); typedef int socket_descriptor_type; socket_descriptor_type get_socket_descriptor ( ) const { return connection_socket; } private: bool readable ( unsigned long timeout ) const; /*! requires - timeout < 2000000 ensures - returns true if a read call on this connection will not block. - returns false if a read call on this connection will block or if there was an error. !*/ bool sd_called ( )const /*! ensures - returns true if shutdown() has been called else - returns false !*/ { sd_mutex.lock(); bool temp = sd; sd_mutex.unlock(); return temp; } bool sdo_called ( )const /*! ensures - returns true if shutdown_outgoing() or shutdown() has been called else returns false !*/ { sd_mutex.lock(); bool temp = false; if (sdo || sd) temp = true; sd_mutex.unlock(); return temp; } // data members int connection_socket; const int connection_foreign_port; const std::string connection_foreign_ip; const int connection_local_port; const std::string connection_local_ip; bool sd; // called shutdown bool sdo; // called shutdown_outgoing int sdr; // return value for shutdown mutex sd_mutex; // a lock for the three above vars connection( int sock, int foreign_port, const std::string& foreign_ip, int local_port, const std::string& local_ip ); /*! requires - sock is a socket handle - sock is the handle for the connection between foreign_ip:foreign_port and local_ip:local_port ensures - *this is initialized correctly with the above parameters !*/ // restricted functions connection(); connection(connection&); // copy constructor connection& operator=(connection&); // assignement opertor }; // ---------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------- // listener object // ---------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------- class listener { /*! CONVENTION if (inaddr_any == false) { listening_ip == a string containing the address the listener is listening on } else { the listener is listening on all interfaces } listening_port == the port the listener is listening on listening_socket == the listening socket handle for this object !*/ // make the create_listener a friend of listener friend int create_listener ( listener*& new_listener, unsigned short port, const std::string& ip ); public: ~listener(); int accept ( connection*& new_connection, unsigned long timeout = 0 ); int accept ( std::unique_ptr& new_connection, unsigned long timeout = 0 ); int get_listening_port ( ) const { return listening_port; } const std::string& get_listening_ip ( ) const { return listening_ip; } private: // data members int listening_socket; const int listening_port; const std::string listening_ip; const bool inaddr_any; listener( int sock, int port, const std::string& ip ); /*! requires - sock is a socket handle - sock is listening on the port and ip(may be "") indicated in the above parameters ensures - *this is initialized correctly with the above parameters !*/ // restricted functions listener(); listener(listener&); // copy constructor listener& operator=(listener&); // assignement opertor }; // ---------------------------------------------------------------------------------------- int create_listener ( listener*& new_listener, unsigned short port, const std::string& ip = "" ); int create_connection ( connection*& new_connection, unsigned short foreign_port, const std::string& foreign_ip, unsigned short local_port = 0, const std::string& local_ip = "" ); int create_listener ( std::unique_ptr& new_listener, unsigned short port, const std::string& ip = "" ); int create_connection ( std::unique_ptr& new_connection, unsigned short foreign_port, const std::string& foreign_ip, unsigned short local_port = 0, const std::string& local_ip = "" ); // ---------------------------------------------------------------------------------------- } #ifdef NO_MAKEFILE #include "sockets_kernel_2.cpp" #endif #endif // DLIB_SOCKETS_KERNEl_2_ ================================================ FILE: benchmarks/dlib/sockets/sockets_kernel_abstract.h ================================================ // Copyright (C) 2003 Davis E. King (davis@dlib.net) // License: Boost Software License See LICENSE.txt for the full license. #undef DLIB_SOCKETS_KERNEl_ABSTRACT_ #ifdef DLIB_SOCKETS_KERNEl_ABSTRACT_ #include #include "../threads.h" namespace dlib { // ---------------------------------------------------------------------------------------- /*! GENERAL COMMENTS: Nothing in here will throw exceptions. All ip address strings in this file refer to IPv4 addresses. For example "192.168.1.1" Timeouts: All timeout values are measured in milliseconds but you are not guaranteed to have that level of resolution. The actual resolution is implementation defined. GENERAL WARNING Don't call any of these functions or make any of these objects before main() has been entered. EXCEPTIONS Unless specified otherwise, nothing in this file throws exceptions. !*/ // ---------------------------------------------------------------------------------------- // LOOKUP FUNCTIONS // all lookup functions are thread-safe int get_local_hostname ( std::string& hostname ); /*! ensures - if (#get_local_hostname() == 0) then - #hostname == a string containing the hostname of the local computer - returns 0 upon success - returns OTHER_ERROR upon failure and in this case #hostname's value is undefined !*/ // ----------------- int hostname_to_ip ( const std::string& hostname, std::string& ip, int n = 0 ); /*! requires - n >= 0 ensures - if (#hostname_to_ip() == 0) then - #ip == string containing the nth ip address associated with the hostname - returns 0 upon success - returns OTHER_ERROR upon failure !*/ // ----------------- int ip_to_hostname ( const std::string& ip, std::string& hostname ); /*! ensures - if (#ip_to_hostname() == 0) then - #hostname == string containing the hostname associated with ip - returns 0 upon success - returns OTHER_ERROR upon failure !*/ // ---------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------- // // socket creation functions // // The following functions are guaranteed to be thread-safe // // ---------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------- int create_listener ( listener*& new_listener, unsigned short port, const std::string& ip = "" ); /*! requires - 0 <= port <= 65535 ensures - if (#create_listener() == 0) then - #new_listener == a pointer to a listener object that is listening on the specified port and ip for an incoming connection - if (ip == "") then - the new listener will be listening on all interfaces - if (port == 0) then - the operating system will assign a free port to listen on - returns 0 if create_listener was successful - returns PORTINUSE if the specified local port was already in use - returns OTHER_ERROR if some other error occurred !*/ int create_listener ( std::unique_ptr& new_listener, unsigned short port, const std::string& ip = "" ); /*! This function is just an overload of the above function but it gives you a std::unique_ptr smart pointer instead of a C pointer. !*/ int create_connection ( connection*& new_connection, unsigned short foreign_port, const std::string& foreign_ip, unsigned short local_port = 0, const std::string& local_ip = "" ); /*! requires - 0 < foreign_port <= 65535 - 0 <= local_port <= 65535 ensures - if (#create_connection() == 0) then - #new_connection == a pointer to a connection object that is connected to foreign_ip on port foreign_port and is using the local interface local_ip and local port local_port - #new_connection->user_data == 0 - if (local_ip == "") then - the operating system will chose this for you - if (local_port == 0) then - the operating system will chose this for you - returns 0 if create_connection was successful - returns PORTINUSE if the specified local port was already in use - returns OTHER_ERROR if some other error occurred !*/ int create_connection ( std::unique_ptr& new_connection, unsigned short foreign_port, const std::string& foreign_ip, unsigned short local_port = 0, const std::string& local_ip = "" ); /*! This function is just an overload of the above function but it gives you a std::unique_ptr smart pointer instead of a C pointer. !*/ // ---------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------- // connection object // ---------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------- class connection { /*! WHAT THIS OBJECT REPRESENTS This object represents a TCP connection. Instances of this class can only be created by using the create_connection function or listener class defined below. NOTE: A connection object must ALWAYS be closed (delete the pointer to the connection) or it will cause a resource leak. Note also that all errors indicated by a return code of OTHER_ERROR are fatal so if one occurs the connection should just be closed. CLOSING A CONNECTION Note that if ~connection() or shutdown() is called before the remote client has received all sent data it is possible that the data will be lost. To avoid this you should call the close_gracefully() function to close your connections (unless you actually do want to immediately dispose of a connection and don't care about the data). (example: close_gracefully(con); // close con gracefully but force it closed // if it takes more than 500 milliseconds.) THREAD SAFETY - It is always safe to call shutdown() or shutdown_outgoing(). - you may NOT call any function more than once at a time (except the shutdown functions). - do not call read() more than once at a time - do not call write() more than once at a time - You can safely call shutdown or shutdown_outgoing in conjunction with the read/write functions. This is helpful if you want to unblock another thread that is blocking on a read/write operation. Shutting down the connection will cause the read/write functions to return a value of SHUTDOWN. OUT-OF-BAND DATA: All out-of-band data will be put inline into the normal data stream. This means that you can read any out-of-band data via calls to read(). (i.e. the SO_OOBINLINE socket option will be set) !*/ public: ~connection ( ); /*! requires - no other threads are using this connection object ensures - closes the connection (this is an abrupt non-graceful close) - frees the resources used by this object !*/ void* user_data; /*! This pointer is provided so that the client programmer may easily associate some data with a connection object. You can really do whatever you want with it. Initially user_data is 0. !*/ long write ( const char* buf, long num ); /*! requires - num > 0 - buf points to an array of at least num bytes ensures - will block until ONE of the following occurs: - num bytes from buf have been written to the connection - an error has occurred - the outgoing channel of the connection has been shutdown locally - returns num if write succeeded - returns OTHER_ERROR if there was an error (this could be due to a connection close) - returns SHUTDOWN if the outgoing channel of the connection has been shutdown locally !*/ long read ( char* buf, long num ); /*! requires - num > 0 - buf points to an array of at least num bytes ensures - read() will not read more than num bytes of data into #buf - read blocks until ONE of the following happens: - there is some data available and it has been written into #buf - the remote end of the connection is closed - an error has occurred - the connection has been shutdown locally - returns the number of bytes read into #buf if there was any data. - returns 0 if the connection has ended/terminated and there is no more data. - returns OTHER_ERROR if there was an error. - returns SHUTDOWN if the connection has been shutdown locally !*/ long read ( char* buf, long num, unsigned long timeout ); /*! requires - num > 0 - buf points to an array of at least num bytes - timeout < 2000000 ensures - read() will not read more than num bytes of data into #buf - if (timeout > 0) then read() blocks until ONE of the following happens: - there is some data available and it has been written into #buf - the remote end of the connection is closed - an error has occurred - the connection has been shutdown locally - timeout milliseconds has elapsed - else - read() does not block - returns the number of bytes read into #buf if there was any data. - returns 0 if the connection has ended/terminated and there is no more data. - returns TIMEOUT if timeout milliseconds elapsed before we got any data. - returns OTHER_ERROR if there was an error. - returns SHUTDOWN if the connection has been shutdown locally !*/ unsigned short get_local_port ( ) const; /*! ensures - returns the local port number for this connection !*/ unsigned short get_foreign_port ( ) const; /*! ensures - returns the foreign port number for this connection !*/ const std::string& get_local_ip ( ) const; /*! ensures - returns the IP of the local interface this connection is using !*/ const std::string& get_foreign_ip ( ) const; /*! ensures - returns the IP of the foreign host for this connection !*/ int shutdown ( ); /*! ensures - if (#shutdown() == 0 && connection was still open) then - terminates the connection but does not free the resources for the connection object - any read() or write() calls on this connection will return immediately with the code SHUTDOWN. - returns 0 upon success - returns OTHER_ERROR if there was an error !*/ int shutdown_outgoing ( ); /*! ensures - if (#shutdown_outgoing() == 0 && outgoing channel was still open) then - sends a FIN to indicate that no more data will be sent on this connection but leaves the receive half of the connection open to receive more data from the other host - any calls to write() will return immediately with the code SHUTDOWN. - returns 0 upon success - returns OTHER_ERROR if there was an error !*/ int disable_nagle( ); /*! ensures - Sets the TCP_NODELAY socket option to disable Nagle's algorithm. This can sometimes reduce transmission latency, however, in almost all normal cases you don't want to mess with this as the default setting is usually appropriate. - returns 0 upon success - returns OTHER_ERROR if there was an error !*/ typedef platform_specific_type socket_descriptor_type; socket_descriptor_type get_socket_descriptor ( ) const; /*! ensures - returns the underlying socket descriptor for this connection object. The reason you might want access to this is to pass it to some other library that requires a socket file descriptor. However, if you do this then you probably shouldn't use the dlib::connection read() and write() anymore since whatever you are doing with the socket descriptor is probably doing I/O with the socket. !*/ private: // restricted functions connection(); connection(connection&); // copy constructor connection& operator=(connection&); // assignment operator }; // ---------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------- // listener object // ---------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------- class listener { /*! WHAT THIS OBJECT REPRESENTS This object represents a TCP socket waiting for incoming connections. Calling accept returns a pointer to any new incoming connections on its port. Instances of this class can only be created by using the create_listener function defined below. NOTE: A listener object must ALWAYS be closed (delete the pointer to it) or it will cause a resource leak. Note also that all errors indicated by a return code of OTHER_ERROR are fatal so if one occurs the listener should be closed. THREAD SAFETY None of the functions in this object are guaranteed to be thread-safe. This means that you must serialize all access to this object. !*/ public: ~listener ( ); /*! requires - no other threads are using this listener object ensures - closes the listener - frees the resources used by this object !*/ int accept ( connection*& new_connection, unsigned long timeout = 0 ); /*! requires - timeout < 2000000 ensures - blocks until a new connection is ready or timeout milliseconds have elapsed. - #new_connection == a pointer to the new connection object - #new_connection->user_data == 0 - if (timeout == 0) then - the timeout argument is ignored - returns 0 if accept() was successful - returns TIMEOUT if timeout milliseconds have elapsed - returns OTHER_ERROR if an error has occurred !*/ int accept ( std::unique_ptr& new_connection, unsigned long timeout = 0 ); /*! This function is just an overload of the above function but it gives you a std::unique_ptr smart pointer instead of a C pointer. !*/ unsigned short get_listening_port ( ) const; /*! ensures - returns the port number that this object is listening on !*/ const std::string& get_listening_ip ( ) const; /*! ensures - returns a string containing the IP (e.g. "127.0.0.1") of the interface this object is listening on - returns "" if it is accepting connections on all interfaces !*/ private: // restricted functions listener(); listener(listener&); // copy constructor listener& operator=(listener&); // assignment operator }; } #endif // DLIB_SOCKETS_KERNEl_ABSTRACT_ ================================================ FILE: benchmarks/dlib/sockets/windows.h ================================================ // Copyright (C) 2003 Davis E. King (davis@dlib.net) // License: Boost Software License See LICENSE.txt for the full license. #ifndef DLIB_SOCKETS_KERNEl_2_ #include "sockets_kernel_1.h" #endif ================================================ FILE: benchmarks/dlib/sockets.h ================================================ // Copyright (C) 2003 Davis E. King (davis@dlib.net) // License: Boost Software License See LICENSE.txt for the full license. #ifndef DLIB_SOCKETs_ #define DLIB_SOCKETs_ #include "platform.h" #ifdef WIN32 #include "sockets/windows.h" #endif #ifndef WIN32 #include "sockets/posix.h" #endif #include "sockets/sockets_extensions.h" #endif // DLIB_SOCKETs_ ================================================ FILE: benchmarks/dlib/sort.h ================================================ // Copyright (C) 2005 Davis E. King (davis@dlib.net) // License: Boost Software License See LICENSE.txt for the full license. #ifndef DLIB_SORt_ #define DLIB_SORt_ #include "algs.h" #include namespace dlib { // ---------------------------------------------------------------------------------------- template < typename T, typename compare > inline void qsort_array ( T& array, unsigned long left, unsigned long right, const compare& comp ); /*! requires - T implements operator[] - the items in array must be comparable by comp where comp is a function object with the same syntax as std::less<> - the items in array must be swappable by a global swap() - left and right are within the bounds of array i.e. array[left] and array[right] are valid elements - left <= right ensures - for all elements in #array between and including left and right the ith element is < the i+1 element - sorts using a quick sort algorithm !*/ // ---------------------------------------------------------------------------------------- template < typename T, typename compare > void hsort_array ( T& array, unsigned long left, unsigned long right, const compare& comp ); /*! requires - T implements operator[] - the items in array must be comparable by comp where comp is a function object with the same syntax as std::less<> - the items in array must be swappable by a global swap() - left and right are within the bounds of array i.e. array[left] and array[right] are valid elements - left <= right ensures - for all elements in #array between and including left and right the ith element is < the i+1 element - sorts using a heapsort algorithm !*/ // ---------------------------------------------------------------------------------------- template < typename T, typename compare > void isort_array ( T& array, unsigned long left, unsigned long right, const compare& comp ); /*! requires - T implements operator[] - the items in array must be comparable by comp where comp is a function object with the same syntax as std::less<> - the items in array must be swappable by a global swap() - left and right are within the bounds of array i.e. array[left] and array[right] are valid elements - left <= right ensures - for all elements in #array between and including left and right the ith element is < the i+1 element - sorts using an insertion sort algorithm !*/ // ---------------------------------------------------------------------------------------- template < typename T > inline void qsort_array ( T& array, unsigned long left, unsigned long right ); /*! requires - T implements operator[] - the items in array must be comparable by std::less - the items in array must be swappable by a global swap() - left and right are within the bounds of array i.e. array[left] and array[right] are valid elements - left <= right ensures - for all elements in #array between and including left and right the ith element is < the i+1 element - sorts using a quick sort algorithm !*/ // ---------------------------------------------------------------------------------------- template < typename T > void hsort_array ( T& array, unsigned long left, unsigned long right ); /*! requires - T implements operator[] - the items in array must be comparable by std::less - the items in array must be swappable by a global swap() - left and right are within the bounds of array i.e. array[left] and array[right] are valid elements - left <= right ensures - for all elements in #array between and including left and right the ith element is < the i+1 element - sorts using a heapsort algorithm !*/ // ---------------------------------------------------------------------------------------- template < typename T > void isort_array ( T& array, unsigned long left, unsigned long right ); /*! requires - T implements operator[] - the items in array must be comparable by std::less - the items in array must be swappable by a global swap() - left and right are within the bounds of array i.e. array[left] and array[right] are valid elements - left <= right ensures - for all elements in #array between and including left and right the ith element is < the i+1 element - sorts using an insertion sort algorithm !*/ // ---------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------- // IMPLEMENTATION DETAILS // ---------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------- namespace sort_helpers { template inline const std::less comp (const T&) { return std::less(); } template < typename T, typename Y, typename compare > inline unsigned long qsort_partition ( T& array, Y& pivot, const unsigned long left, const unsigned long right, const compare& comp ) /*! requires - &pivot == &array[right] - T implements operator[] - the items in array must be comparable by comp - left and right are within the bounts of the array - left < right ensures - returns a number called partition_element such that: - left <= partition_element <= right - all elements in #array < #array[partition_element] have indices >= left and < partition_element - all elements in #array > #array[partition_element] have indices > partition_element and <= right !*/ { DLIB_ASSERT (&pivot == &array[right] && left < right, "\tunsigned long qsort_partition()" << "\n\t&pivot: " << &pivot << "\n\t&array[right]: " << &array[right] << "\n\tleft: " << left << "\n\tright: " << right ); exchange(array[(right-left)/2 +left],pivot); unsigned long i = left; for (unsigned long j = left; j < right; ++j) { if (comp(array[j] , pivot)) { swap(array[i],array[j]); ++i; } } exchange(array[i],pivot); return i; } // ---------------------------------------------------------------------------------------- template < typename T, typename compare > void qsort_array_main ( T& array, const unsigned long left, const unsigned long right, unsigned long depth_check, const compare& comp ) /*! requires - T implements operator[] - the items in array must be comparable by comp - the items in array must be swappable by a global swap() - left and right are within the bounds of array i.e. array[left] and array[right] are valid elements ensures - for all elements in #array between and including left and right the ith element is < the i+1 element - will only recurse about as deep as log(depth_check) calls - sorts using a quick sort algorithm !*/ { if ( left < right) { if (right-left < 30 || depth_check == 0) { hsort_array(array,left,right,comp); } else { // The idea here is to only let quick sort go about log(N) // calls deep before it kicks into something else. depth_check >>= 1; depth_check += (depth_check>>4); unsigned long partition_element = qsort_partition(array,array[right],left,right,comp); if (partition_element > 0) qsort_array_main(array,left,partition_element-1,depth_check,comp); qsort_array_main(array,partition_element+1,right,depth_check,comp); } } } // ---------------------------------------------------------------------------------------- template < typename T, typename compare > void heapify ( T& array, const unsigned long start, const unsigned long end, unsigned long i, const compare& comp ) /*! requires - T implements operator[] - the items in array must be comparable by comp - the items in array must be swappable by a global swap() - start, end, and i are within the bounds of array i.e. array[start], array[end], and array[i] are valid elements - start <= i <= end - array[i/2] is a max heap - array[i/2+1] is a max heap - start and end specify the range of the array we are working with. ensures - array[i] is now a max heap !*/ { DLIB_ASSERT (start <= i && i <= end, "\tvoid heapify()" << "\n\tstart: " << start << "\n\tend: " << end << "\n\ti: " << i ); bool keep_going = true; unsigned long left; unsigned long right; unsigned long largest; while (keep_going) { keep_going = false; left = (i<<1)+1-start; right = left+1; if (left <= end && comp(array[i] , array[left])) largest = left; else largest = i; if (right <= end && comp(array[largest] , array[right])) largest = right; if (largest != i) { exchange(array[i],array[largest]); i = largest; keep_going = true; } } } // ---------------------------------------------------------------------------------------- } // ---------------------------------------------------------------------------------------- template < typename T > inline void qsort_array ( T& array, unsigned long left, unsigned long right ) { using namespace sort_helpers; qsort_array(array,left,right,comp(array[left])); } // ---------------------------------------------------------------------------------------- template < typename T > void hsort_array ( T& array, unsigned long left, unsigned long right ) { using namespace sort_helpers; hsort_array(array,left,right,comp(array[left])); } // ---------------------------------------------------------------------------------------- template < typename T > void isort_array ( T& array, unsigned long left, unsigned long right ) { using namespace sort_helpers; isort_array(array,left,right,comp(array[left])); } // ---------------------------------------------------------------------------------------- template < typename T, typename compare > void isort_array ( T& array, const unsigned long left, const unsigned long right, const compare& comp ) { DLIB_ASSERT (left <= right, "\tvoid isort_array()" << "\n\tleft: " << left << "\n\tright: " << right ); using namespace sort_helpers; unsigned long pos; for (unsigned long i = left+1; i <= right; ++i) { // everything from left to i-1 is sorted. pos = i; for (unsigned long j = i-1; comp(array[pos] , array[j]); --j) { exchange(array[pos],array[j]); pos = j; if (j == left) break; } } } // ---------------------------------------------------------------------------------------- template < typename T, typename compare > void qsort_array ( T& array, const unsigned long left, const unsigned long right, const compare& comp ) { DLIB_ASSERT (left <= right, "\tvoid qsort_array()" << "\n\tleft: " << left << "\n\tright: " << right ); sort_helpers::qsort_array_main(array,left,right,right-left,comp); } // ---------------------------------------------------------------------------------------- template < typename T, typename compare > void hsort_array ( T& array, const unsigned long left, const unsigned long right, const compare& comp ) { DLIB_ASSERT (left <= right, "\tvoid hsort_array()" << "\n\tleft: " << left << "\n\tright: " << right ); if (right-left < 30) { isort_array(array,left,right,comp); return; } // turn array into a max heap for (unsigned long i = left+((right-left)>>1);; --i) { sort_helpers::heapify(array,left,right,i,comp); if (i == left) break; } // now sort the array for (unsigned long i = right; i > left;) { exchange(array[i],array[left]); sort_helpers::heapify(array,left,--i,left,comp); } } // ---------------------------------------------------------------------------------------- } #endif // DLIB_SORt_ ================================================ FILE: benchmarks/dlib/sparse_vector.h ================================================ // Copyright (C) 2012 Davis E. King (davis@dlib.net) // License: Boost Software License See LICENSE.txt for the full license. #ifndef DLIB_SPaRSE_VECTOR_Hh_ #define DLIB_SPaRSE_VECTOR_Hh_ #include "svm/sparse_vector.h" #endif // DLIB_SPaRSE_VECTOR_Hh_ ================================================ FILE: benchmarks/dlib/sstream ================================================ #include "dlib_include_path_tutorial.txt" ================================================ FILE: benchmarks/dlib/stack/stack_kernel_1.h ================================================ // Copyright (C) 2003 Davis E. King (davis@dlib.net) // License: Boost Software License See LICENSE.txt for the full license. #ifndef DLIB_STACK_KERNEl_1_ #define DLIB_STACK_KERNEl_1_ #include "stack_kernel_abstract.h" #include "../algs.h" #include "../interfaces/enumerable.h" #include "../interfaces/remover.h" #include "../serialize.h" namespace dlib { template < typename T, typename mem_manager = default_memory_manager > class stack_kernel_1 : public enumerable, public remover { /*! INITIAL VALUE stack_size == 0 top == 0 current_element == 0 _at_start == true CONVENTION at_start() == _at_start current_element_valid() == (current_element != 0) if (current_element != 0) then element() == current_element->item stack_size == the number of elements in the stack. Each node points to the next node to be poped off the stack. The last node in the list has its next pointer is set to 0. if (size == 0) { top == 0 } else { top == pointer to the last element added to the stack } !*/ struct node { node* next; T item; }; public: typedef T type; typedef mem_manager mem_manager_type; stack_kernel_1( ): top(0), stack_size(0), current_element(0), _at_start(true) {} virtual ~stack_kernel_1( ); inline void clear( ); inline void push( T& item ); void pop( T& item ); T& current( ); const T& current( ) const; inline void swap ( stack_kernel_1& item ); // functions from the remover interface inline void remove_any ( T& item ); // functions from the enumerable interface inline size_t size ( ) const; inline bool at_start ( ) const; inline void reset ( ) const; bool current_element_valid ( ) const; inline const T& element ( ) const; inline T& element ( ); bool move_next ( ) const; private: void delete_elements_in_stack( node*& top ); /*! requires - top points to the top of the stack ensures - all memory has been freed - #top = 0 !*/ // data members typename mem_manager::template rebind::other pool; node* top; unsigned long stack_size; mutable node* current_element; mutable bool _at_start; // restricted functions stack_kernel_1(stack_kernel_1&); // copy constructor stack_kernel_1& operator=(stack_kernel_1&); // assignment operator }; template < typename T, typename mem_manager > inline void swap ( stack_kernel_1& a, stack_kernel_1& b ) { a.swap(b); } template < typename T, typename mem_manager > void deserialize ( stack_kernel_1& item, std::istream& in ) { try { item.clear(); unsigned long size; deserialize(size,in); T temp = T(); stack_kernel_1 temp_stack; for (unsigned long i = 0; i < size; ++i) { deserialize(temp,in); temp_stack.push(temp); } while (temp_stack.size() > 0) { temp_stack.pop(temp); item.push(temp); } } catch (serialization_error& e) { item.clear(); throw serialization_error(e.info + "\n while deserializing object of type stack_kernel_1"); } } // ---------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------- // member function definitions // ---------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------- template < typename T, typename mem_manager > stack_kernel_1:: ~stack_kernel_1( ) { delete_elements_in_stack(top); } // ---------------------------------------------------------------------------------------- template < typename T, typename mem_manager > void stack_kernel_1:: clear( ) { if (stack_size != 0) { delete_elements_in_stack(top); stack_size = 0; } reset(); } // ---------------------------------------------------------------------------------------- template < typename T, typename mem_manager > T& stack_kernel_1:: current( ) { return top->item; } // ---------------------------------------------------------------------------------------- template < typename T, typename mem_manager > const T& stack_kernel_1:: current( ) const { return top->item; } // ---------------------------------------------------------------------------------------- template < typename T, typename mem_manager > void stack_kernel_1:: swap( stack_kernel_1& item ) { pool.swap(item.pool); // declare temp variables node* top_temp; unsigned long stack_size_temp; // swap stack_size variables stack_size_temp = item.stack_size; item.stack_size = stack_size; stack_size = stack_size_temp; // swap top pointers top_temp = item.top; item.top = top; top = top_temp; exchange(current_element,item.current_element); exchange(_at_start,item._at_start); } // ---------------------------------------------------------------------------------------- template < typename T, typename mem_manager > void stack_kernel_1:: push( T& item ) { // allocate memory for new node node* new_node = pool.allocate(); // swap item into new_node exchange(new_node->item,item); // put new_node into stack new_node->next = top; top = new_node; ++stack_size; reset(); } // ---------------------------------------------------------------------------------------- template < typename T, typename mem_manager > void stack_kernel_1:: pop( T& item ) { node* old_node = top; top = top->next; // swap the item from the stack into item exchange(old_node->item,item); // free the memory pool.deallocate(old_node); --stack_size; reset(); } // ---------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------- // private member function definitions // ---------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------- template < typename T, typename mem_manager > void stack_kernel_1:: delete_elements_in_stack( node*& top ) { node* temp; while (top != 0) { temp = top->next; pool.deallocate(top); top = temp; } } // ---------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------- // enumerable function definitions // ---------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------- template < typename T, typename mem_manager > size_t stack_kernel_1:: size ( ) const { return stack_size; } // ---------------------------------------------------------------------------------------- template < typename T, typename mem_manager > bool stack_kernel_1:: at_start ( ) const { return _at_start; } // ---------------------------------------------------------------------------------------- template < typename T, typename mem_manager > void stack_kernel_1:: reset ( ) const { _at_start = true; current_element = 0; } // ---------------------------------------------------------------------------------------- template < typename T, typename mem_manager > bool stack_kernel_1:: current_element_valid ( ) const { return current_element != 0; } // ---------------------------------------------------------------------------------------- template < typename T, typename mem_manager > const T& stack_kernel_1:: element ( ) const { return current_element->item; } // ---------------------------------------------------------------------------------------- template < typename T, typename mem_manager > T& stack_kernel_1:: element ( ) { return current_element->item; } // ---------------------------------------------------------------------------------------- template < typename T, typename mem_manager > bool stack_kernel_1:: move_next ( ) const { if (!_at_start) { if (current_element) { current_element = current_element->next; if (current_element) return true; else return false; } else { return false; } } else { _at_start = false; if (stack_size) { current_element = top; return true; } else { return false; } } } // ---------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------- // remover function definitions // ---------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------- template < typename T, typename mem_manager > void stack_kernel_1:: remove_any ( T& item ) { pop(item); } // ---------------------------------------------------------------------------------------- } #endif // DLIB_STACK_KERNEl_1_ ================================================ FILE: benchmarks/dlib/stack/stack_kernel_abstract.h ================================================ // Copyright (C) 2003 Davis E. King (davis@dlib.net) // License: Boost Software License See LICENSE.txt for the full license. #undef DLIB_STACK_KERNEl_ABSTRACT_ #ifdef DLIB_STACK_KERNEl_ABSTRACT_ #include "../interfaces/enumerable.h" #include "../interfaces/remover.h" #include "../serialize.h" #include "../algs.h" namespace dlib { template < typename T, typename mem_manager = default_memory_manager > class stack : public enumerable, public remover { /*! REQUIREMENTS ON T T must be swappable by a global swap() and T must have a default constructor REQUIREMENTS ON mem_manager must be an implementation of memory_manager/memory_manager_kernel_abstract.h or must be an implementation of memory_manager_global/memory_manager_global_kernel_abstract.h or must be an implementation of memory_manager_stateless/memory_manager_stateless_kernel_abstract.h mem_manager::type can be set to anything. POINTERS AND REFERENCES TO INTERNAL DATA swap() and current() functions do not invalidate pointers or references to internal data. All other functions have no such guarantee. INITIAL VALUE size() == 0 ENUMERATION ORDER The enumerator will iterate over the elements in the stack in the same order they would be removed in by repeated calls to pop(). (e.g. current() would be the first element enumerated) WHAT THIS OBJECT REPRESENTS This is a last in first out stack containing items of type T. e.g. if the stack is {b,c,d,e} then a is put in the stack becomes {a,b,c,d,e} and then pop takes a back out returning the stack to {b,c,d,e} Also note that unless specified otherwise, no member functions of this object throw exceptions. !*/ public: typedef T type; typedef mem_manager mem_manager_type; stack ( ); /*! ensures - #*this is properly initialized throws - std::bad_alloc or any exception thrown by T's constructor !*/ virtual ~stack ( ); /*! ensures - all memory associated with *this has been released !*/ void clear( ); /*! ensures - #*this has its initial value throws - std::bad_alloc or any exception thrown by T's constructor if this exception is thrown then *this is unusable until clear() is called and succeeds !*/ void push ( T& item ); /*! ensures - item has been swapped onto the top of the stack - #current() == item - #item has an initial value for its type - #size() == size() + 1 - #at_start() == true throws - std::bad_alloc or any exception thrown by T's constructor if push() throws then it has no effect !*/ void pop ( T& item ); /*! requires - size() != 0 ensures - #size() == size() - 1 - #item == current() i.e. the top element of *this has been removed and swapped into #item - #at_start() == true !*/ T& current ( ); /*! requires - size() != 0 ensures - returns a const reference to the element at the top of *this !*/ const T& current ( ) const; /*! requires - size() != 0 ensures - returns a non-const reference to the element at the top of *this !*/ void swap ( stack& item ); /*! ensures - swaps *this and item !*/ private: // restricted functions stack(stack&); // copy constructor stack& operator=(stack&); // assignment operator }; template < typename T, typename mem_manager > inline void swap ( stack& a, stack& b ) { a.swap(b); } /*! provides a global swap function !*/ template < typename T, typename mem_manager > void deserialize ( stack& item, std::istream& in ); /*! provides deserialization support !*/ } #endif // DLIB_STACK_KERNEl_ABSTRACT_ ================================================ FILE: benchmarks/dlib/stack/stack_kernel_c.h ================================================ // Copyright (C) 2003 Davis E. King (davis@dlib.net) // License: Boost Software License See LICENSE.txt for the full license. #ifndef DLIB_STACK_KERNEl_C_ #define DLIB_STACK_KERNEl_C_ #include "stack_kernel_abstract.h" #include "../algs.h" #include "../assert.h" namespace dlib { template < typename stack_base > class stack_kernel_c : public stack_base { typedef typename stack_base::type T; public: void pop( T& item ); T& current( ); const T& current( ) const; const T& element( ) const; T& element( ); void remove_any ( T& item ); }; template < typename stack_base > inline void swap ( stack_kernel_c& a, stack_kernel_c& b ) { a.swap(b); } // ---------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------- // member function definitions // ---------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------- template < typename stack_base > void stack_kernel_c:: pop( T& item ) { // make sure requires clause is not broken DLIB_CASSERT(this->size() != 0, "\tvoid stack::pop" << "\n\tsize of stack should not be zero" << "\n\tthis: " << this ); // call the real function stack_base::pop(item); } // ---------------------------------------------------------------------------------------- template < typename stack_base > const typename stack_base::type& stack_kernel_c:: current( ) const { // make sure requires clause is not broken DLIB_CASSERT(this->size() != 0, "\tconst T& stack::current" << "\n\tsize of stack should not be zero" << "\n\tthis: " << this ); // call the real function return stack_base::current(); } // ---------------------------------------------------------------------------------------- template < typename stack_base > typename stack_base::type& stack_kernel_c:: current( ) { // make sure requires clause is not broken DLIB_CASSERT(this->size() != 0, "\tT& stack::current" << "\n\tsize of stack should not be zero" << "\n\tthis: " << this ); // call the real function return stack_base::current(); } // ---------------------------------------------------------------------------------------- template < typename stack_base > typename stack_base::type& stack_kernel_c:: element( ) { // make sure requires clause is not broken DLIB_CASSERT(this->current_element_valid(), "\tT& stack::element" << "\n\tThe current element must be valid if you are to access it." << "\n\tthis: " << this ); // call the real function return stack_base::element(); } // ---------------------------------------------------------------------------------------- template < typename stack_base > const typename stack_base::type& stack_kernel_c:: element( ) const { // make sure requires clause is not broken DLIB_CASSERT(this->current_element_valid(), "\tconst T& stack::element" << "\n\tThe current element must be valid if you are to access it." << "\n\tthis: " << this ); // call the real function return stack_base::element(); } // ---------------------------------------------------------------------------------------- template < typename stack_base > void stack_kernel_c:: remove_any ( T& item ) { // make sure requires clause is not broken DLIB_CASSERT( (this->size() > 0), "\tvoid stack::remove_any" << "\n\tsize() must be greater than zero if something is going to be removed" << "\n\tsize(): " << this->size() << "\n\tthis: " << this ); // call the real function stack_base::remove_any(item); } // ---------------------------------------------------------------------------------------- } #endif // DLIB_STACK_KERNEl_C_ ================================================ FILE: benchmarks/dlib/stack.h ================================================ // Copyright (C) 2003 Davis E. King (davis@dlib.net) // License: Boost Software License See LICENSE.txt for the full license. #ifndef DLIB_STACk_ #define DLIB_STACk_ #include "stack/stack_kernel_1.h" #include "stack/stack_kernel_c.h" #include "algs.h" namespace dlib { template < typename T, typename mem_manager = default_memory_manager > class stack { stack() {} public: //----------- kernels --------------- // kernel_1a typedef stack_kernel_1 kernel_1a; typedef stack_kernel_c kernel_1a_c; }; } #endif // DLIB_STACk_ ================================================ FILE: benchmarks/dlib/stack_trace.h ================================================ // Copyright (C) 2008 Davis E. King (davis@dlib.net) // License: Boost Software License See LICENSE.txt for the full license. #ifndef DLIB_STACK_TRACe_ #define DLIB_STACK_TRACe_ /*! This file defines 3 things. Two of them are preprocessor macros that enable you to tag functions with the dlib stack trace watcher. The third thing is a function named get_stack_trace() which returns the current stack trace in std::string form. To enable the stack trace you must #define DLIB_ENABLE_STACK_TRACE. When this #define isn't set then the 3 things described above still exist but they don't do anything. Also note that when the stack trace is enabled it changes the DLIB_ASSERT and DLIB_CASSERT macros so that they print stack traces when an assert fails. See the following example program for details: #include #include void funct2() { // put this macro at the top of each function you would // like to appear in stack traces DLIB_STACK_TRACE; // you may print the current stack trace as follows. std::cout << dlib::get_stack_trace() << endl; } void funct() { // This alternate form of DLIB_STACK_TRACE allows you to specify // the string used to name the current function. The other form // will usually output an appropriate function name automatically // so this may not be needed. DLIB_STACK_TRACE_NAMED("funct"); funct2(); } int main() { funct(); } !*/ #include #include "assert.h" // only setup the stack trace stuff if the asserts are enabled (which happens in debug mode // basically). Also, this stuff doesn't work if you use NO_MAKEFILE #if defined(DLIB_ENABLE_STACK_TRACE) #ifdef NO_MAKEFILE #error "You can't use the dlib stack trace stuff and NO_MAKEFILE at the same time" #endif namespace dlib { const std::string get_stack_trace(); } // redefine the DLIB_CASSERT macro to include the stack trace #undef DLIBM_CASSERT #define DLIBM_CASSERT(_exp,_message) \ {if ( !(_exp) ) \ { \ std::ostringstream dlib_o_out; \ dlib_o_out << "\n\nError occurred at line " << __LINE__ << ".\n"; \ dlib_o_out << "Error occurred in file " << __FILE__ << ".\n"; \ dlib_o_out << "Error occurred in function " << DLIB_FUNCTION_NAME << ".\n\n"; \ dlib_o_out << "Failing expression was " << #_exp << ".\n"; \ dlib_o_out << _message << "\n\n"; \ dlib_o_out << "Stack Trace: \n" << dlib::get_stack_trace() << "\n"; \ dlib_assert_breakpoint(); \ throw dlib::fatal_error(dlib::EBROKEN_ASSERT,dlib_o_out.str()); \ }} namespace dlib { class stack_tracer { public: stack_tracer ( const char* funct_name, const char* file_name, const int line_number ); ~stack_tracer(); }; } #define DLIB_STACK_TRACE_NAMED(x) dlib::stack_tracer dlib_stack_tracer_object(x,__FILE__,__LINE__) #define DLIB_STACK_TRACE dlib::stack_tracer dlib_stack_tracer_object(DLIB_FUNCTION_NAME,__FILE__,__LINE__) #else // don't do anything if ENABLE_ASSERTS isn't defined #define DLIB_STACK_TRACE_NAMED(x) #define DLIB_STACK_TRACE namespace dlib { inline const std::string get_stack_trace() { return std::string("stack trace not enabled");} } #endif #endif // DLIB_STACK_TRACe_ ================================================ FILE: benchmarks/dlib/std_allocator.h ================================================ // Copyright (C) 2007 Davis E. King (davis@dlib.net) // License: Boost Software License See LICENSE.txt for the full license. #ifndef DLIB_STD_ALLOc_H_ #define DLIB_STD_ALLOc_H_ #include #include #include "enable_if.h" #include "algs.h" namespace dlib { // ---------------------------------------------------------------------------------------- template < typename T, typename M > class std_allocator { /*! REQUIREMENTS ON M must be an implementation of memory_manager/memory_manager_kernel_abstract.h or must be an implementation of memory_manager_global/memory_manager_global_kernel_abstract.h or must be an implementation of memory_manager_stateless/memory_manager_stateless_kernel_abstract.h M::type can be set to anything. WHAT THIS OBJECT REPRESENTS This object is an implementation of an allocator that conforms to the C++ standard requirements for allocator objects. The M template argument is one of the dlib memory manager objects and this allocator implementation will do all of its memory allocations using whatever dlib memory manager you supply. Thus, using this allocator object you can use any of the dlib memory manager objects with the containers in the STL or with any other object that requires a C++ allocator object. It is important to note that many STL implementations make the assumption that the memory allocated by one allocator can be freed by another. This effectively means that you should only use a global or stateless memory manager with the std_allocator. Either that or you have to verify that your version of the STL isn't going to try and allocate and deallocate memory with different allocators. !*/ public: //type definitions typedef std::size_t size_type; typedef std::ptrdiff_t difference_type; typedef T* pointer; typedef const T* const_pointer; typedef T& reference; typedef const T& const_reference; typedef T value_type; //rebind std_allocator to type U template struct rebind { typedef std_allocator other; }; //return address of values pointer address (reference value) const { return &value; } const_pointer address (const_reference value) const { return &value; } /*constructors and destructor *-nothing to do because the std_allocator has no state */ std_allocator() throw() { } std_allocator(const std_allocator&) throw() { } template std_allocator (const std_allocator&) throw() { } ~std_allocator() throw() { } //return maximum number of elements that can be allocated size_type max_size () const throw() { //for numeric_limits see Section 4.3, page 59 return std::numeric_limits::max() / sizeof(T); } //allocate but don't initialize num elements of type T pointer allocate ( size_type num, typename std_allocator::const_pointer = 0 ) { return (pointer) pool.allocate_array(num*sizeof(T)); } // This function is not required by the C++ standard but some versions of the STL // distributed with gcc erroneously require it. See the bug report for further // details: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51626 void construct(pointer p) { return construct(p, value_type()); } //initialize elements of allocated storage p with value value void construct (pointer p, const T& value) { //initialize memory with placement new new((void*)p)T(value); } //destroy elements of initialized storage p void destroy (pointer p) { // destroy objects by calling their destructor p->~T(); } //deallocate storage p of deleted elements void deallocate (pointer p, size_type ) { pool.deallocate_array((char*)p); } void swap ( std_allocator& item ) { pool.swap(item.pool); } std_allocator& operator= (const std_allocator&) { return *this;} private: typename M::template rebind::other pool; }; // ---------------------------------------------------------------------------------------- template < typename M > class std_allocator { public: //type definitions typedef std::size_t size_type; typedef std::ptrdiff_t difference_type; typedef void* pointer; typedef const void* const_pointer; typedef void value_type; //rebind std_allocator to type U template struct rebind { typedef std_allocator other; }; }; // ---------------------------------------------------------------------------------------- template struct std_alloc_compare { const static bool are_interchangeable = false; }; template struct std_alloc_compare >::type> { const static bool are_interchangeable = true; }; template struct std_alloc_compare::type> { const static bool are_interchangeable = true; }; //return that all specializations of this std_allocator are interchangeable if they use memory_manager_global // instances with the same mm_global_type template bool operator== ( const std_allocator&, const std_allocator& ) throw() { return std_alloc_compare::are_interchangeable; } template bool operator!= ( const std_allocator&, const std_allocator& ) throw() { return !std_alloc_compare::are_interchangeable; } // ---------------------------------------------------------------------------------------- template void swap ( std_allocator& a, std_allocator& b ) { a.swap(b); } // ---------------------------------------------------------------------------------------- } #endif // DLIB_STD_ALLOc_H_ ================================================ FILE: benchmarks/dlib/stl_checked/std_vector_c.h ================================================ // Copyright (C) 2008 Davis E. King (davis@dlib.net) // License: Boost Software License See LICENSE.txt for the full license. #ifndef DLIB_STD_VECTOr_C_H_ #define DLIB_STD_VECTOr_C_H_ #include #include #include "../assert.h" #include "std_vector_c_abstract.h" #include "../serialize.h" #include "../is_kind.h" namespace dlib { template < typename T, typename Allocator = std::allocator > class std_vector_c : public std::vector { typedef typename std::vector base_type; public: // types: typedef typename Allocator::reference reference; typedef typename Allocator::const_reference const_reference; typedef typename base_type::iterator iterator; // See 23.1 typedef typename base_type::const_iterator const_iterator; // See 23.1 typedef typename base_type::size_type size_type; // See 23.1 typedef typename base_type::difference_type difference_type;// See 23.1 typedef T value_type; typedef Allocator allocator_type; typedef typename Allocator::pointer pointer; typedef typename Allocator::const_pointer const_pointer; typedef std::reverse_iterator reverse_iterator; typedef std::reverse_iterator const_reverse_iterator; // 23.2.4.1 construct/copy/destroy: explicit std_vector_c(const Allocator& alloc= Allocator()) : base_type(alloc) {} explicit std_vector_c(size_type n, const T& value = T(), const Allocator& alloc= Allocator()) : base_type(n, value, alloc) {} template std_vector_c(InputIterator first, InputIterator last, const Allocator& alloc= Allocator()) : base_type(first,last,alloc) {} std_vector_c(const std::vector& x) : base_type(x) {} std_vector_c& operator=(const std::vector& x) { static_cast(*this) = x; return *this; } template void assign(InputIterator first, InputIterator last) { base_type::assign(first,last); } void assign(size_type n, const T& u) { base_type::assign(n,u); } allocator_type get_allocator() const { return base_type::get_allocator(); } // iterators: iterator begin() { return base_type::begin(); } const_iterator begin() const { return base_type::begin(); } iterator end() { return base_type::end(); } const_iterator end() const { return base_type::end(); } reverse_iterator rbegin() { return base_type::rbegin(); } const_reverse_iterator rbegin() const { return base_type::rbegin(); } reverse_iterator rend() { return base_type::rend(); } const_reverse_iterator rend() const { return base_type::rend(); } // 23.2.4.2 capacity: size_type size() const { return base_type::size(); } size_type max_size() const { return base_type::max_size(); } void resize(size_type sz, T c = T()) { base_type::resize(sz,c); } size_type capacity() const { return base_type::capacity(); } bool empty() const { return base_type::empty(); } void reserve(size_type n) { base_type::reserve(n); } // element access: const_reference at(size_type n) const { return base_type::at(n); } reference at(size_type n) { return base_type::at(n); } // 23.2.4.3 modifiers: void push_back(const T& x) { base_type::push_back(x); } void swap(std_vector_c& x) { base_type::swap(x); } void clear() { base_type::clear(); } // ------------------------------------------------------ // Things that have preconditions that should be checked. // ------------------------------------------------------ reference operator[]( size_type n ) { DLIB_CASSERT(n < size(), "\treference std_vector_c::operator[](n)" << "\n\tYou have supplied an invalid index" << "\n\tthis: " << this << "\n\tn: " << n << "\n\tsize(): " << size() ); return static_cast(*this)[n]; } // ------------------------------------------------------ const_reference operator[]( size_type n ) const { DLIB_CASSERT(n < size(), "\tconst_reference std_vector_c::operator[](n)" << "\n\tYou have supplied an invalid index" << "\n\tthis: " << this << "\n\tn: " << n << "\n\tsize(): " << size() ); return static_cast(*this)[n]; } // ------------------------------------------------------ reference front( ) { DLIB_CASSERT(size() > 0, "\treference std_vector_c::front()" << "\n\tYou can't call front() on an empty vector" << "\n\tthis: " << this ); return base_type::front(); } // ------------------------------------------------------ const_reference front( ) const { DLIB_CASSERT(size() > 0, "\tconst_reference std_vector_c::front()" << "\n\tYou can't call front() on an empty vector" << "\n\tthis: " << this ); return base_type::front(); } // ------------------------------------------------------ reference back( ) { DLIB_CASSERT(size() > 0, "\treference std_vector_c::back()" << "\n\tYou can't call back() on an empty vector" << "\n\tthis: " << this ); return base_type::back(); } // ------------------------------------------------------ const_reference back( ) const { DLIB_CASSERT(size() > 0, "\tconst_reference std_vector_c::back()" << "\n\tYou can't call back() on an empty vector" << "\n\tthis: " << this ); return base_type::back(); } // ------------------------------------------------------ void pop_back( ) { DLIB_CASSERT(size() > 0, "\tconst_reference std_vector_c::pop_back()" << "\n\tYou can't call pop_back() on an empty vector" << "\n\tthis: " << this ); base_type::pop_back(); } // ------------------------------------------------------ iterator insert( iterator position, const T& x ) { DLIB_CASSERT( begin() <= position && position <= end(), "\titerator std_vector_c::insert(position,x)" << "\n\tYou have called insert() with an invalid position" << "\n\tthis: " << this ); return base_type::insert(position, x); } // ------------------------------------------------------ void insert( iterator position, size_type n, const T& x ) { DLIB_CASSERT( begin() <= position && position <= end(), "\tvoid std_vector_c::insert(position,n,x)" << "\n\tYou have called insert() with an invalid position" << "\n\tthis: " << this ); base_type::insert(position, n, x); } // ------------------------------------------------------ template void insert( iterator position, InputIterator first, InputIterator last ) { DLIB_CASSERT( begin() <= position && position <= end(), "\tvoid std_vector_c::insert(position,first,last)" << "\n\tYou have called insert() with an invalid position" << "\n\tthis: " << this ); base_type::insert(position, first, last); } // ------------------------------------------------------ iterator erase( iterator position ) { DLIB_CASSERT( begin() <= position && position < end(), "\titerator std_vector_c::erase(position)" << "\n\tYou have called erase() with an invalid position" << "\n\tthis: " << this ); return base_type::erase(position); } // ------------------------------------------------------ iterator erase( iterator first, iterator last ) { DLIB_CASSERT( begin() <= first && first <= last && last <= end(), "\titerator std_vector_c::erase(first,last)" << "\n\tYou have called erase() with an invalid range of iterators" << "\n\tthis: " << this ); return base_type::erase(first,last); } // ------------------------------------------------------ }; // ---------------------------------------------------------------------------------------- // Add these swaps just to make absolutely sure the specialized swap always gets called even // if the compiler is crappy and would otherwise mess it up. template void swap(std_vector_c& x, std_vector_c& y) { x.swap(y); } template void swap(std::vector& x, std_vector_c& y) { x.swap(y); } template void swap(std_vector_c& x, std::vector& y) { y.swap(x); } // ---------------------------------------------------------------------------------------- template void serialize ( const std_vector_c& item, std::ostream& out ) { try { const unsigned long size = static_cast(item.size()); serialize(size,out); for (unsigned long i = 0; i < item.size(); ++i) serialize(item[i],out); } catch (serialization_error& e) { throw serialization_error(e.info + "\n while serializing object of type std_vector_c"); } } // ---------------------------------------------------------------------------------------- template void deserialize ( std_vector_c& item, std::istream& in ) { try { unsigned long size; deserialize(size,in); item.resize(size); for (unsigned long i = 0; i < size; ++i) deserialize(item[i],in); } catch (serialization_error& e) { throw serialization_error(e.info + "\n while deserializing object of type std_vector_c"); } } // ---------------------------------------------------------------------------------------- template struct is_std_vector > { const static bool value = true; }; // ---------------------------------------------------------------------------------------- } #endif // DLIB_STD_VECTOr_C_H_ ================================================ FILE: benchmarks/dlib/stl_checked/std_vector_c_abstract.h ================================================ // Copyright (C) 2008 Davis E. King (davis@dlib.net) // License: Boost Software License See LICENSE.txt for the full license. #undef DLIB_STD_VECTOr_C_ABSTRACT_H_ #ifdef DLIB_STD_VECTOr_C_ABSTRACT_H_ #include #include #include "../assert.h" namespace dlib { template < typename T, typename Allocator = std::allocator > class std_vector_c : public std::vector { /*! WHAT THIS OBJECT REPRESENTS This object is a simple wrapper around the std::vector object. It provides an identical interface but also checks the preconditions of each member function. That is, if you violate a requires clause the dlib::fatal_error exception is thrown. !*/ typedef typename std::vector base_type; public: typedef typename Allocator::reference reference; typedef typename Allocator::const_reference const_reference; typedef typename base_type::iterator iterator; typedef typename base_type::const_iterator const_iterator; typedef typename base_type::size_type size_type; typedef typename base_type::difference_type difference_type; typedef T value_type; typedef Allocator allocator_type; typedef typename Allocator::pointer pointer; typedef typename Allocator::const_pointer const_pointer; typedef std::reverse_iterator reverse_iterator; typedef std::reverse_iterator const_reverse_iterator; explicit std_vector_c( const Allocator& alloc = Allocator() ); /*! ensures - #get_allocator() == alloc - #size() == 0 !*/ explicit std_vector_c ( size_type n, const T& value = T(), const Allocator& alloc = Allocator() ); /*! ensures - #size() == n - #get_allocator() == alloc - for all valid i: - (*this)[i] == value !*/ template std_vector_c ( InputIterator first, InputIterator last, const Allocator& alloc = Allocator() ); /*! ensures - #size() == std::distance(first,last) - #get_allocator() == alloc - std::equal(first, last, begin()) == true !*/ std_vector_c( const std::vector& x ); /*! ensures - #*this == x !*/ std_vector_c& operator= ( const std::vector& x ); /*! ensures - #*this == x - returns #*this !*/ template void assign( InputIterator first, InputIterator last ); /*! ensures - #size() == std::distance(first,last) - std::equal(first, last, begin()) == true !*/ void assign( size_type n, const T& value ); /*! ensures - #size() == n - for all valid i: - (*this)[i] == value !*/ allocator_type get_allocator( ) const; /*! ensures - returns the allocator used by this vector !*/ iterator begin( ); /*! ensures - if (size() > 0) then - returns an iterator referring to the first element in this container. - else - returns end() !*/ const_iterator begin( ) const; /*! ensures - if (size() > 0) then - returns a const_iterator referring to the first element in this container. - else - returns end() !*/ iterator end( ); /*! ensures - returns an iterator that represents one past the end of this container !*/ const_iterator end( ) const; /*! ensures - returns an iterator that represents one past the end of this container !*/ reverse_iterator rbegin( ); /*! ensures - returns std::reverse_iterator(end()) !*/ const_reverse_iterator rbegin( ) const; /*! ensures - returns std::reverse_iterator(end()) !*/ reverse_iterator rend( ); /*! ensures - returns std::reverse_iterator(begin()) !*/ const_reverse_iterator rend( ) const; /*! ensures - returns std::reverse_iterator(begin()) !*/ size_type size( ) const; /*! ensures - returns end()-begin() (i.e. returns the number of elements in this container) !*/ size_type max_size( ) const; /*! ensures - returns the maximum number of elements this vector can contain !*/ void resize( size_type sz, T c = T() ); /*! ensures - #size() == sz - any element with index between 0 and sz - 1 which was in the vector before the call to resize() retains its value and index. All other elements have a value given by c. !*/ size_type capacity( ) const; /*! ensures - returns the total number of elements that the vector can hold without requiring reallocation. !*/ bool empty( ) const; /*! ensures - if (size() == 0) then - returns true - else - returns false !*/ void reserve( size_type n ); /*! ensures - #capacity() >= n !*/ const_reference at( size_type n ) const; /*! ensures - if (n < size()) then - returns a const reference to (*this)[n] - else - throws std::out_of_range !*/ reference at( size_type n ); /*! ensures - if (n < size()) then - returns a reference to (*this)[n] - else - throws std::out_of_range !*/ void push_back( const T& x ); /*! ensures - #size() == size() + 1 - #back() == x !*/ void swap( std_vector_c& x ); /*! ensures - swaps the state of *this and x !*/ void clear( ); /*! ensures - #size() == 0 !*/ reference operator[]( size_type n ); /*! requires - n < size() ensures - returns a reference to the nth element of this container !*/ const_reference operator[]( size_type n ) const; /*! requires - n < size() ensures - returns a const reference to the nth element of this container !*/ reference front( ); /*! requires - size() > 0 ensures - returns a reference to (*this)[0] !*/ const_reference front( ) const; /*! requires - size() > 0 ensures - returns a const reference to (*this)[0] !*/ reference back( ); /*! requires - size() > 0 ensures - returns a reference to (*this)[size()-1] !*/ const_reference back( ) const; /*! requires - size() > 0 ensures - returns a const reference to (*this)[size()-1] !*/ void pop_back( ); /*! requires - size() > 0 ensures - #size() == size() - 1 - removes the last element in the vector but leaves the others unmodified. !*/ iterator insert( iterator position, const T& x ); /*! requires - begin() <= position && position <= end() (i.e. position references an element in this vector object) ensures - #size() == size() + 1 - inserts a copy of x into *this before the given position - returns an iterator that points to the copy of x inserted into *this !*/ void insert( iterator position, size_type n, const T& x ); /*! requires - begin() <= position && position <= end() (i.e. position references an element in this vector object) ensures - #size() == size() + n - inserts n copies of x into *this before the given position !*/ template void insert( iterator position, InputIterator first, InputIterator last ); /*! requires - begin() <= position && position <= end() (i.e. position references an element in this vector object) - first and last are not iterators into *this ensures - #size() == size() + std::distance(last,first) - inserts copies of the range of elements [first,last) into *this before the given position !*/ iterator erase( iterator position ); /*! requires - begin() <= position && position < end() (i.e. position references an element in this vector object) ensures - #size() == size() - 1 - removes the element in this vector referenced by position but leaves all other elements in this vector unmodified. - if (position < end()-1) then - returns an iterator referencing the element immediately following *position prior to the erase. - else - returns end() !*/ iterator erase( iterator first, iterator last ); /*! requires - begin() <= first && first <= last && last <= end() (i.e. the range [first,last) must be inside this container ) ensures - #size() == size() - (last-first) - removes the elements in this vector referenced by the iterator range [first,last) but leaves all other elements in this vector unmodified. - if (last < end()-1) then - returns an iterator referencing the element immediately following *last prior to the erase. - else - returns end() !*/ }; // ---------------------------------------------------------------------------------------- template void serialize ( const std_vector_c& item, std::ostream& out ); /*! provides serialization support !*/ // ---------------------------------------------------------------------------------------- template void deserialize ( std_vector_c& item, std::istream& in ); /*! provides deserialization support !*/ // ---------------------------------------------------------------------------------------- } #endif // DLIB_STD_VECTOr_C_ABSTRACT_H_ ================================================ FILE: benchmarks/dlib/stl_checked.h ================================================ // Copyright (C) 2008 Davis E. King (davis@dlib.net) // License: Boost Software License See LICENSE.txt for the full license. #ifndef DLIB_STL_CHECKEd_HEADER #define DLIB_STL_CHECKEd_HEADER #include "stl_checked/std_vector_c.h" #endif // DLIB_STL_CHECKEd_HEADER ================================================ FILE: benchmarks/dlib/string/cassert ================================================ #include "../dlib_include_path_tutorial.txt" ================================================ FILE: benchmarks/dlib/string/iomanip ================================================ #include "../dlib_include_path_tutorial.txt" ================================================ FILE: benchmarks/dlib/string/iosfwd ================================================ #include "../dlib_include_path_tutorial.txt" ================================================ FILE: benchmarks/dlib/string/iostream ================================================ #include "../dlib_include_path_tutorial.txt" ================================================ FILE: benchmarks/dlib/string/locale ================================================ #include "../dlib_include_path_tutorial.txt" ================================================ FILE: benchmarks/dlib/string/string.h ================================================ // Copyright (C) 2006 Davis E. King (davis@dlib.net) // License: Boost Software License See LICENSE.txt for the full license. #ifndef DLIB_STRINg_ #define DLIB_STRINg_ #include "string_abstract.h" #include #include "../algs.h" #include #include #include #include "../error.h" #include "../assert.h" #include "../uintn.h" #include #include #include #include "../enable_if.h" namespace dlib { // ---------------------------------------------------------------------------------------- template < typename charT, typename traits, typename alloc > inline const typename disable_if,std::string>::type narrow ( const std::basic_string& str ) { std::string temp; temp.reserve(str.size()); std::string::size_type i; for (i = 0; i < str.size(); ++i) { if (zero_extend_cast(str[i]) > 255) temp += ' '; else temp += zero_extend_cast(str[i]); } return temp; } template < typename charT, typename traits, typename alloc > inline const typename enable_if,std::string>::type narrow ( const std::basic_string& str ) { return str; } // ---------------------------------------------------------------------------------------- template < typename traits, typename alloc > const std::basic_string tolower ( const std::basic_string& str ) { std::basic_string temp; temp.resize(str.size()); for (typename std::basic_string::size_type i = 0; i < str.size(); ++i) temp[i] = (char)std::tolower(str[i]); return temp; } // ---------------------------------------------------------------------------------------- template < typename traits, typename alloc > const std::basic_string toupper ( const std::basic_string& str ) { std::basic_string temp; temp.resize(str.size()); for (typename std::basic_string::size_type i = 0; i < str.size(); ++i) temp[i] = (char)std::toupper(str[i]); return temp; } // ---------------------------------------------------------------------------------------- template < typename traits, typename alloc > bool strings_equal_ignore_case ( const std::basic_string& str1, const std::basic_string& str2 ) { if (str1.size() != str2.size()) return false; for (typename std::basic_string::size_type i = 0; i < str1.size(); ++i) { if (std::tolower(str1[i]) != std::tolower(str2[i])) return false; } return true; } template < typename traits, typename alloc > bool strings_equal_ignore_case ( const std::basic_string& str1, const char* str2 ) { typename std::basic_string::size_type i; for (i = 0; i < str1.size(); ++i) { // if we hit the end of str2 then the strings aren't the same length if (str2[i] == '\0') return false; if (std::tolower(str1[i]) != std::tolower(str2[i])) return false; } // This happens when str2 is longer than str1 if (str2[i] != '\0') return false; return true; } template < typename traits, typename alloc > bool strings_equal_ignore_case ( const char* str1, const std::basic_string& str2 ) { return strings_equal_ignore_case(str2, str1); } // ---------------------------------------------------------------------------------------- template < typename traits, typename alloc > bool strings_equal_ignore_case ( const std::basic_string& str1, const std::basic_string& str2, unsigned long num ) { if (str1.size() != str2.size() && (str1.size() < num || str2.size() < num)) return false; for (typename std::basic_string::size_type i = 0; i < str1.size() && i < num; ++i) { if (std::tolower(str1[i]) != std::tolower(str2[i])) return false; } return true; } template < typename traits, typename alloc > bool strings_equal_ignore_case ( const std::basic_string& str1, const char* str2, unsigned long num ) { typename std::basic_string::size_type i; for (i = 0; i < str1.size() && i < num; ++i) { // if we hit the end of str2 then the strings aren't the same length if (str2[i] == '\0') return false; if (std::tolower(str1[i]) != std::tolower(str2[i])) return false; } return true; } template < typename traits, typename alloc > bool strings_equal_ignore_case ( const char* str1, const std::basic_string& str2, unsigned long num ) { return strings_equal_ignore_case(str2, str1, num); } // ---------------------------------------------------------------------------------------- class cast_to_string_error : public error { public: cast_to_string_error():error(ECAST_TO_STRING) {} }; template < typename T > const std::string cast_to_string ( const T& item ) { std::ostringstream sout; sout << item; if (!sout) throw cast_to_string_error(); return sout.str(); } // don't declare this if we are using mingw because it apparently doesn't // support iostreams with wchar_t? #if !(defined(__MINGW32__) && (__GNUC__ < 4)) template < typename T > const std::wstring cast_to_wstring ( const T& item ) { std::basic_ostringstream sout; sout << item; if (!sout) throw cast_to_string_error(); return sout.str(); } #endif // ---------------------------------------------------------------------------------------- inline std::string pad_int_with_zeros ( int i, unsigned long width = 6 ) { std::ostringstream sout; sout << std::setw(width) << std::setfill('0') << i; return sout.str(); } // ---------------------------------------------------------------------------------------- class string_cast_error : public error { public: string_cast_error(const std::string& str): error(ESTRING_CAST,"string cast error: invalid string = '" + str + "'") {} }; template < typename T > struct string_cast_helper { template < typename charT, typename traits, typename alloc > static const T cast ( const std::basic_string& str ) { using namespace std; basic_istringstream sin(str); T temp; sin >> temp; if (!sin) throw string_cast_error(narrow(str)); if (sin.get() != std::char_traits::eof()) throw string_cast_error(narrow(str)); return temp; } }; template struct string_cast_helper > { template < typename charT, typename traits, typename alloc > static const std::basic_string cast ( const std::basic_string& str ) { std::basic_string temp; temp.resize(str.size()); for (unsigned long i = 0; i < str.size(); ++i) temp[i] = zero_extend_cast(str[i]); return temp; } }; template <> struct string_cast_helper { template < typename charT, typename traits, typename alloc > static bool cast ( const std::basic_string& str ) { using namespace std; if (str.size() == 1 && str[0] == '1') return true; if (str.size() == 1 && str[0] == '0') return false; if (tolower(narrow(str)) == "true") return true; if (tolower(narrow(str)) == "false") return false; throw string_cast_error(narrow(str)); } }; #define DLIB_STRING_CAST_INTEGRAL(type) \ template <> \ struct string_cast_helper \ { \ template < typename charT, typename traits, typename alloc> \ static type cast ( \ const std::basic_string& str \ ) \ { \ using namespace std; \ basic_istringstream sin(str); \ type temp; \ if (str.size() > 2 && str[0] == _dT(charT,'0') && str[1] == _dT(charT,'x')) \ sin >> hex >> temp; \ else \ sin >> temp; \ if (!sin) throw string_cast_error(narrow(str)); \ if (sin.get() != std::char_traits::eof()) throw string_cast_error(narrow(str)); \ return temp; \ } \ }; DLIB_STRING_CAST_INTEGRAL(unsigned short) DLIB_STRING_CAST_INTEGRAL(short) DLIB_STRING_CAST_INTEGRAL(unsigned int) DLIB_STRING_CAST_INTEGRAL(int) DLIB_STRING_CAST_INTEGRAL(unsigned long) DLIB_STRING_CAST_INTEGRAL(long) DLIB_STRING_CAST_INTEGRAL(uint64) template < typename T, typename charT, typename traits, typename alloc > inline const T string_cast ( const std::basic_string& str ) { COMPILE_TIME_ASSERT(is_pointer_type::value == false); return string_cast_helper::cast(str); } template inline const T string_cast (const char* str){ return string_cast(std::string(str)); } template inline const T string_cast (const wchar_t* str){ return string_cast(std::wstring(str)); } // ---------------------------------------------------------------------------------------- class string_assign { template < typename charT, typename traits, typename alloc > class string_assign_helper { public: string_assign_helper ( const std::basic_string& str_ ) : str(str_) {} template operator T () const { return string_cast(str); } private: const std::basic_string& str; }; // ------------- class char_assign_helper { public: char_assign_helper ( const char* str_ ) : str(str_) {} template operator T () const { return string_cast(str); } private: const char* str; }; // ------------- class wchar_t_assign_helper { public: wchar_t_assign_helper ( const wchar_t* str_ ) : str(str_) {} template operator T () const { return string_cast(str); } private: const wchar_t* str; }; // ------------- public: template < typename charT, typename traits, typename alloc > string_assign_helper operator=( const std::basic_string& str ) const { return string_assign_helper(str); } char_assign_helper operator= ( const char* str ) const { return char_assign_helper(str); } wchar_t_assign_helper operator= ( const wchar_t* str ) const { return wchar_t_assign_helper(str); } }; const string_assign sa = string_assign(); // ---------------------------------------------------------------------------------------- template < typename charT, typename traits, typename alloc > const std::basic_string wrap_string ( const std::basic_string& str, const unsigned long first_pad = 0, const unsigned long rest_pad = 0, const unsigned long max_per_line = 79 ) { DLIB_ASSERT ( first_pad < max_per_line && rest_pad < max_per_line && rest_pad >= first_pad, "\tconst std::basic_string wrap_string()" << "\n\tfirst_pad: " << first_pad << "\n\trest_pad: " << rest_pad << "\n\tmax_per_line: " << max_per_line ); using namespace std; basic_ostringstream sout; basic_istringstream sin(str); for (unsigned long i = 0; i < rest_pad; ++i) sout << _dT(charT," "); const basic_string pad(sout.str()); sout.str(_dT(charT,"")); for (unsigned long i = 0; i < first_pad; ++i) sout << _dT(charT," "); typename basic_string::size_type remaining = max_per_line - rest_pad; basic_string temp; sin >> temp; while (sin) { if (temp.size() > remaining) { if (temp.size() + rest_pad >= max_per_line) { string::size_type i = 0; for (; i < temp.size(); ++i) { sout << temp[i]; --remaining; if (remaining == 0) { sout << _dT(charT,"\n") << pad; remaining = max_per_line - rest_pad; } } } else { sout << _dT(charT,"\n") << pad << temp; remaining = max_per_line - rest_pad - temp.size(); } } else if (temp.size() == remaining) { sout << temp; remaining = 0; } else { sout << temp; remaining -= temp.size(); } sin >> temp; if (remaining == 0 && sin) { sout << _dT(charT,"\n") << pad; remaining = max_per_line - rest_pad; } else { sout << _dT(charT," "); --remaining; } } return sout.str(); } template < typename charT > const std::basic_string wrap_string ( const charT* str, const unsigned long first_pad = 0, const unsigned long rest_pad = 0, const unsigned long max_per_line = 79 ) { return wrap_string(std::basic_string(str),first_pad,rest_pad,max_per_line); } // ---------------------------------------------------------------------------------------- template < typename charT, typename traits, typename alloc > const std::basic_string ltrim ( const std::basic_string& str, const std::basic_string& trim_chars ) { typedef std::basic_string string; typename string::size_type pos = str.find_first_not_of(trim_chars); if (pos != string::npos) return str.substr(pos); else return std::basic_string(); } template < typename charT, typename traits, typename alloc > const std::basic_string ltrim ( const std::basic_string& str, const charT* trim_chars = _dT(charT," \t\r\n") ) { return ltrim(str,std::basic_string(trim_chars)); } // ---------------------------------------------------------------------------------------- template < typename charT, typename traits, typename alloc > const std::basic_string rtrim ( const std::basic_string& str, const std::basic_string& trim_chars ) { typedef std::basic_string string; typename string::size_type pos = str.find_last_not_of(trim_chars); if (pos != string::npos) return str.substr(0,pos+1); else return std::basic_string(); } template < typename charT, typename traits, typename alloc > const std::basic_string rtrim ( const std::basic_string& str, const charT* trim_chars = _dT(charT," \t\r\n") ) { return rtrim(str,std::basic_string(trim_chars)); } // ---------------------------------------------------------------------------------------- template < typename charT, typename traits, typename alloc > const std::basic_string trim ( const std::basic_string& str, const std::basic_string& trim_chars ) { typedef std::basic_string string; typename string::size_type lpos = str.find_first_not_of(trim_chars); if (lpos != string::npos) { typename string::size_type rpos = str.find_last_not_of(trim_chars); return str.substr(lpos,rpos-lpos+1); } else { return std::basic_string(); } } template < typename charT, typename traits, typename alloc > const std::basic_string trim ( const std::basic_string& str, const charT* trim_chars = _dT(charT," \t\r\n") ) { return trim(str,std::basic_string(trim_chars)); } // ---------------------------------------------------------------------------------------- template < typename charT, typename traits, typename alloc > const std::basic_string rpad ( const std::basic_string& str, long pad_length, const std::basic_string& pad_string ) { typedef std::basic_string string; // if str is too big then just return str if (pad_length <= static_cast(str.size())) return str; // make the string we will padd onto the string string P; while (P.size() < pad_length - str.size()) P += pad_string; P = P.substr(0,pad_length - str.size()); // return the padded string return str + P; } template < typename charT, typename traits, typename alloc > const std::basic_string rpad ( const std::basic_string& str, long pad_length, const charT* pad_string = _dT(charT," ") ) { return rpad(str,pad_length,std::basic_string(pad_string)); } // ---------------------------------------------------------------------------------------- template < typename charT, typename traits, typename alloc > const std::basic_string lpad ( const std::basic_string& str, long pad_length, const std::basic_string& pad_string ) { typedef std::basic_string string; // if str is too big then just return str if (pad_length <= static_cast(str.size())) return str; // make the string we will padd onto the string string P; while (P.size() < pad_length - str.size()) P += pad_string; P = P.substr(0,pad_length - str.size()); // return the padded string return P + str; } template < typename charT, typename traits, typename alloc > const std::basic_string lpad ( const std::basic_string& str, long pad_length, const charT* pad_string = _dT(charT," ") ) { return lpad(str,pad_length,std::basic_string(pad_string)); } // ---------------------------------------------------------------------------------------- template < typename charT, typename traits, typename alloc > const std::basic_string pad ( const std::basic_string& str, long pad_length, const std::basic_string& pad_string ) { const long str_size = static_cast(str.size()); return rpad(lpad(str,(pad_length-str_size)/2 + str_size,pad_string), pad_length, pad_string); } template < typename charT, typename traits, typename alloc > const std::basic_string pad ( const std::basic_string& str, long pad_length, const charT* pad_string = _dT(charT," ") ) { return pad(str,pad_length,std::basic_string(pad_string)); } // ---------------------------------------------------------------------------------------- template < typename charT, typename traits, typename alloc > const std::basic_string left_substr ( const std::basic_string& str, const std::basic_string& delim ) { return str.substr(0,str.find_first_of(delim)); } template < typename charT, typename traits, typename alloc > const std::basic_string left_substr ( const std::basic_string& str, const charT* delim = _dT(charT," \n\r\t") ) { return str.substr(0,str.find_first_of(delim)); } // ---------------------------------------------------------------------------------------- template < typename charT, typename traits, typename alloc > const std::basic_string right_substr ( const std::basic_string& str, const std::basic_string& delim ) { typename std::basic_string::size_type delim_pos = str.find_last_of(delim); if (delim_pos != std::basic_string::npos) return str.substr(delim_pos+1); else return _dT(charT,""); } template < typename charT, typename traits, typename alloc > const std::basic_string right_substr ( const std::basic_string& str, const charT* delim = _dT(charT," \n\r\t") ) { typename std::basic_string::size_type delim_pos = str.find_last_of(delim); if (delim_pos != std::basic_string::npos) return str.substr(delim_pos+1); else return _dT(charT,""); } // ---------------------------------------------------------------------------------------- template < typename charT, typename traits, typename alloc > std::pair, std::basic_string > split_on_first ( const std::basic_string& str, const charT* delim = _dT(charT," \n\r\t") ) { typename std::basic_string::size_type delim_pos = str.find_first_of(delim); if (delim_pos != std::basic_string::npos) return std::make_pair(str.substr(0, delim_pos), str.substr(delim_pos+1)); else return std::make_pair(str, _dT(charT,"")); } template < typename charT, typename traits, typename alloc > inline std::pair, std::basic_string > split_on_first ( const std::basic_string& str, const std::basic_string& delim ) { return split_on_first(str, delim.c_str()); } // ---------------------------------------------------------------------------------------- template < typename charT, typename traits, typename alloc > std::pair, std::basic_string > split_on_last ( const std::basic_string& str, const charT* delim = _dT(charT," \n\r\t") ) { typename std::basic_string::size_type delim_pos = str.find_last_of(delim); if (delim_pos != std::basic_string::npos) return std::make_pair(str.substr(0, delim_pos), str.substr(delim_pos+1)); else return std::make_pair(str, _dT(charT,"")); } template < typename charT, typename traits, typename alloc > inline std::pair, std::basic_string > split_on_last ( const std::basic_string& str, const std::basic_string& delim ) { return split_on_last(str, delim.c_str()); } // ---------------------------------------------------------------------------------------- template < typename charT, typename traits, typename alloc > const std::vector > split ( const std::basic_string& str, const charT* delim = _dT(charT," \n\r\t") ) { std::basic_string temp; std::vector > res; for (unsigned long i = 0; i < str.size(); ++i) { // check if delim contains the character str[i] bool hit = false; const charT* d = delim; while (*d != '\0') { if (str[i] == *d) { hit = true; break; } ++d; } if (hit) { if (temp.size() != 0) { res.push_back(temp); temp.clear(); } } else { temp.push_back(str[i]); } } if (temp.size() != 0) res.push_back(temp); return res; } template < typename charT, typename traits, typename alloc > const std::vector > split ( const std::basic_string& str, const std::basic_string& delim ) { return split(str,delim.c_str()); } inline const std::vector split ( const char* str, const char* delim = " \n\r\t" ) { return split(std::string(str),delim); } // ---------------------------------------------------------------------------------------- } #endif // DLIB_STRINg_ ================================================ FILE: benchmarks/dlib/string/string_abstract.h ================================================ // Copyright (C) 2006 Davis E. King (davis@dlib.net) // License: Boost Software License See LICENSE.txt for the full license. #undef DLIB_STRINg_ABSTRACT_ #ifdef DLIB_STRINg_ABSTRACT_ #include #include #include #include "../error.h" namespace dlib { // ---------------------------------------------------------------------------------------- class string_cast_error : public error { public: string_cast_error():error(ECAST_TO_STRING) {} }; template < typename T, typename charT, typename traits, typename alloc > const T string_cast ( const std::basic_string& str ); /*! requires - T is not a pointer type ensures - returns str converted to T throws - string_cast_error This exception is thrown if string_cast() is unable to convert str into a T. Also, string_cast_error::info == str !*/ // ---------------------------------------------------------------------------------------- class string_assign { /*! WHAT THIS OBJECT REPRESENTS This is a simple tool which provides an alternative syntax for using the string_cast() function. It can be understood by considering the following example: string_assign sa; int val; double dval; val = sa = "1234"; // executes: val = string_cast("1234"); dval = sa = "3.141"; // executes: val = string_cast("3.141"); After executing, val will be equal to 1234 and dval will be 3.141. Note that you can use string_assign to assign to any type which you could use with string_cast(), except for std::basic_string, assigning to this type is ambiguous for boring technical reasons. But there isn't much point in using this tool to assign from one string to another so it doesn't matter. Additionally, note that there is a global instance of this object, dlib::sa. So you never have to create a string_assign object yourself. Finally, this object is totally stateless and threadsafe. !*/ }; const string_assign sa = string_assign(); // ---------------------------------------------------------------------------------------- class cast_to_string_error : public error { public: cast_to_string_error():error(ECAST_TO_STRING) {} }; template < typename T > const std::string cast_to_string ( const T& item ); /*! requires - T is not a pointer type ensures - returns item converted to std::string throws - cast_to_string_error This exception is thrown if cast_to_string() is unable to convert item into a std::string. !*/ template < typename T > const std::wstring cast_to_wstring ( const T& item ); /*! requires - T is not a pointer type ensures - returns item converted to std::wstring throws - cast_to_string_error This exception is thrown if cast_to_string() is unable to convert item into a std::string. !*/ // ---------------------------------------------------------------------------------------- std::string pad_int_with_zeros ( int i, unsigned long width = 6 ); /*! ensures - converts i into a string of at least width characters in length. If necessary, the string will be padded with leading zeros to get to width characters. !*/ // ---------------------------------------------------------------------------------------- template < typename charT, typename traits, typename alloc > const std::string narrow ( const std::basic_string& str ); /*! ensures - returns str as a std::string by converting every character in it to a char. Note that any characters that do not have a mapping to type char will be converted to a space. !*/ // ---------------------------------------------------------------------------------------- template < typename charT, typename traits, typename alloc > const std::basic_string wrap_string ( const std::basic_string& str, const unsigned long first_pad = 0, const unsigned long rest_pad = 0, const unsigned long max_per_line = 79 ); /*! requires - first_pad < max_per_line - rest_pad < max_per_line - rest_pad >= first_pad ensures - returns a copy of str S such that: - S is broken up into lines separated by the \n character. - The first line starts with first_pad space characters. - The second and all subsequent lines start with rest_pad space characters. - The first line is no longer than max_per_line - (rest_pad-first_pad) characters. - The second and all subsequent lines are no longer than max_per_line characters. !*/ // ---------------------------------------------------------------------------------------- template < typename traits typename alloc > const std::basic_string tolower ( const std::basic_string& str ); /*! ensures - returns a copy of str S such that: - #S.size() == str.size() - #S[i] == std::tolower(str[i]) !*/ // ---------------------------------------------------------------------------------------- template < typename traits, typename alloc > const std::basic_string toupper ( const std::basic_string& str ); /*! ensures - returns a copy of str S such that: - #S.size() == str.size() - #S[i] == std::toupper(str[i]) !*/ // ---------------------------------------------------------------------------------------- template < typename traits, typename alloc > bool strings_equal_ignore_case ( const std::basic_string& str1, const std::basic_string& str2 ); /*! ensures - returns tolower(str1) == tolower(str2) !*/ // ---------------------------------------------------------------------------------------- template < typename traits, typename alloc > bool strings_equal_ignore_case ( const std::basic_string& str1, const std::basic_string& str2, unsigned long num ); /*! ensures - returns tolower(str1.substr(0,num)) == tolower(str2.substr(0,num)) (i.e. only compares the first num characters) !*/ // ---------------------------------------------------------------------------------------- template < typename charT, typename traits, typename alloc > const std::basic_string ltrim ( const std::basic_string& str, const std::basic_string& trim_chars ); /*! ensures - returns a copy of str with any leading trim_chars from the left side of the string removed. !*/ template < typename charT, typename traits, typename alloc > const std::basic_string ltrim ( const std::basic_string& str, const charT* trim_chars = _dT(charT," \t\r\n") ); /*! requires - trim_chars == a valid null-terminated C string ensures - returns ltrim(str, std::basic_string(trim_chars)) !*/ // ---------------------------------------------------------------------------------------- template < typename charT, typename traits, typename alloc > const std::basic_string rtrim ( const std::basic_string& str, const std::basic_string& trim_chars ); /*! ensures - returns a copy of str with any trailing trim_chars from the right side of the string removed. !*/ template < typename charT, typename traits, typename alloc > const std::basic_string rtrim ( const std::basic_string& str, const charT* trim_chars = _dT(charT," \t\r\n") ); /*! requires - trim_chars == a valid null-terminated C string ensures - returns rtrim(str, std::basic_string(trim_chars)) !*/ // ---------------------------------------------------------------------------------------- template < typename charT, typename traits, typename alloc > const std::basic_string trim ( const std::basic_string& str, const std::basic_string& trim_chars ); /*! ensures - returns a copy of str with any leading or trailing trim_chars from the ends of the string removed. !*/ template < typename charT, typename traits, typename alloc > const std::basic_string trim ( const std::basic_string& str, const charT* trim_chars = _dT(charT," \t\r\n") ); /*! requires - trim_chars == a valid null-terminated C string ensures - returns trim(str, std::basic_string(trim_chars)) !*/ // ---------------------------------------------------------------------------------------- template < typename charT, typename traits, typename alloc > const std::basic_string rpad ( const std::basic_string& str, long pad_length, const std::basic_string& pad_string ); /*! ensures - if (pad_length <= str.size()) then - returns str - else - let P be a string defined as follows: - P.size() == pad_length - str.size() - P == (pad_string + pad_string + ... + pad_string).substr(0,pad_length - str.size()) (i.e. P == a string with the above specified size that contains just repitions of the pad_string) - returns the string str + P !*/ template < typename charT, typename traits, typename alloc > const std::basic_string rpad ( const std::basic_string& str, long pad_length, const charT* pad_string = _dT(charT," ") ); /*! requires - pad_string == a valid null-terminated C string ensures - returns rpad(str, pad_length, std::basic_string(pad_string)) !*/ // ---------------------------------------------------------------------------------------- template < typename charT, typename traits, typename alloc > const std::basic_string lpad ( const std::basic_string& str, long pad_length, const std::basic_string& pad_string ); /*! ensures - if (pad_length <= str.size()) then - returns str - else - let P be a string defined as follows: - P.size() == pad_length - str.size() - P == (pad_string + pad_string + ... + pad_string).substr(0,pad_length - str.size()) (i.e. P == a string with the above specified size that contains just repitions of the pad_string) - returns the string P + str !*/ template < typename charT, typename traits, typename alloc > const std::basic_string lpad ( const std::basic_string& str, long pad_length, const charT* pad_string = _dT(charT," ") ); /*! requires - pad_string == a valid null-terminated C string ensures - returns lpad(str, pad_length, std::basic_string(pad_string)) !*/ // ---------------------------------------------------------------------------------------- template < typename charT, typename traits, typename alloc > const std::basic_string pad ( const std::basic_string& str, long pad_length, const std::basic_string& pad_string ); /*! ensures - let str_size == static_cast(str.size()) - returns rpad( lpad(str, (pad_length-str_size)/2 + str_size, pad_string), pad_length, pad_string); !*/ template < typename charT, typename traits, typename alloc > const std::basic_string pad ( const std::basic_string& str, long pad_length, const charT* pad_string = _dT(charT," ") ); /*! requires - pad_string == a valid null-terminated C string ensures - returns pad(str, pad_length, std::basic_string(pad_string)) !*/ // ---------------------------------------------------------------------------------------- template < typename charT, typename traits, typename alloc > const std::basic_string left_substr ( const std::basic_string& str, const std::basic_string& delim ); /*! ensures - let delim_pos = str.find_first_of(delim) - returns str.substr(0,delim_pos) !*/ template < typename charT, typename traits, typename alloc > const std::basic_string left_substr ( const std::basic_string& str, const charT* delim = _dT(charT," \n\r\t") ); /*! requires - delim == a valid null-terminated C string ensures - returns left_substr(str, std::basic_string(delim)) !*/ // ---------------------------------------------------------------------------------------- template < typename charT, typename traits, typename alloc > const std::basic_string right_substr ( const std::basic_string& str, const std::basic_string& delim ); /*! ensures - let delim_pos = str.find_last_of(delim) - if (delim_pos == std::string::npos) then - returns "" - else - returns str.substr(delim_pos+1) !*/ template < typename charT, typename traits typename alloc > const std::basic_string right_substr ( const std::basic_string& str, const charT* delim = _dT(charT," \n\r\t") ); /*! requires - delim == a valid null-terminated C string ensures - returns right_substr(str, std::basic_string(delim)) !*/ // ---------------------------------------------------------------------------------------- template < typename charT, typename traits, typename alloc > std::pair, std::basic_string > split_on_first ( const std::basic_string& str, const charT* delim = _dT(charT, " \n\r\t") ); /*! ensures - This function splits string into two parts, the split is based on the first occurrence of any character from delim. - let delim_pos = str.find_first_of(delim) - if (delim_pos == std::string::npos) then - returns make_pair(str,"") - else - return make_pair(str.substr(0, delim_pos), str.substr(delim_pos+1)); !*/ template < typename charT, typename traits, typename alloc > std::pair, std::basic_string > split_on_first ( const std::basic_string& str, const std::basic_string& delim ); /*! requires - delim == a valid null-terminated C string ensures - returns split_on_first(str, delim.c_str()) !*/ // ---------------------------------------------------------------------------------------- template < typename charT, typename traits, typename alloc > std::pair, std::basic_string > split_on_last ( const std::basic_string& str, const charT* delim = _dT(charT, " \n\r\t") ); /*! ensures - This function splits string into two parts, the split is based on the last occurrence of any character from delim. - let delim_pos = str.find_last_of(delim) - if (delim_pos == std::string::npos) then - returns make_pair(str,"") - else - return make_pair(str.substr(0, delim_pos), str.substr(delim_pos+1)); !*/ template < typename charT, typename traits, typename alloc > std::pair, std::basic_string > split_on_last ( const std::basic_string& str, const std::basic_string& delim ); /*! requires - delim == a valid null-terminated C string ensures - returns split_on_last(str, delim.c_str()) !*/ // ---------------------------------------------------------------------------------------- template < typename charT, typename traits, typename alloc > const std::vector > split ( const std::basic_string& str, const std::basic_string& delim ); /*! ensures - Breaks the given string str into a sequence of substrings delimited by characters in delim and returns the results. - returns a vector V such that: - V.size() == the number of substrings found in str. - for all i: V[i] == The ith substring. Note that it will not contain any delimiter characters (i.e. characters in delim). It will also never be an empty string. - V contains the substrings in the order in which they appear in str. That is, V[0] contains the first substring, V[1] the second, and so on. !*/ template < typename charT, typename traits, typename alloc > const std::vector > split ( const std::basic_string& str, const charT* delim = _dT(charT," \n\r\t") ); /*! requires - trim_chars == a valid null-terminated C string ensures - returns split(str, std::basic_string(delim)) !*/ // ---------------------------------------------------------------------------------------- } #endif // DLIB_STRINg_ABSTRACT_ ================================================ FILE: benchmarks/dlib/string.h ================================================ // Copyright (C) 2006 Davis E. King (davis@dlib.net) // License: Boost Software License See LICENSE.txt for the full license. #ifndef DLIB_STRINg_TOP_ #define DLIB_STRINg_TOP_ #include "string/string.h" #endif // DLIB_STRINg_TOP_ ================================================ FILE: benchmarks/dlib/test_for_odr_violations.cpp ================================================ // Copyright (C) 2014 Davis E. King (davis@dlib.net) // License: Boost Software License See LICENSE.txt for the full license. #ifndef DLIB_TEST_FOR_ODR_VIOLATIONS_CPp_ #define DLIB_TEST_FOR_ODR_VIOLATIONS_CPp_ #include "test_for_odr_violations.h" extern "C" { // The point of this block of code is to cause a link time error that will prevent a user // from compiling part of their application with DLIB_ASSERT enabled and part with them // disabled since doing that would be a violation of C++'s one definition rule. #ifdef ENABLE_ASSERTS const int USER_ERROR__inconsistent_build_configuration__see_dlib_faq_1 = 0; #else const int USER_ERROR__inconsistent_build_configuration__see_dlib_faq_1_ = 0; #endif // The point of this block of code is to cause a link time error if someone builds dlib via // cmake as a separately installable library, and therefore generates a dlib/config.h from // cmake, but then proceeds to use the default unconfigured dlib/config.h from version // control. It should be obvious why this is bad, if it isn't you need to read a book // about C++. Moreover, it can only happen if someone manually copies files around and // messes things up. If instead they run `make install` or `cmake --build . --target // install` things will be setup correctly, which is what they should do. To summarize: DO // NOT BUILD A STANDALONE DLIB AND THEN GO CHERRY PICKING FILES FROM THE BUILD FOLDER AND // MIXING THEM WITH THE SOURCE FROM GITHUB. USE CMAKE'S INSTALL SCRIPTS TO INSTALL DLIB. // Or even better, don't install dlib at all and instead build your program as shown in // examples/CMakeLists.txt #if defined(DLIB_NOT_CONFIGURED) && !defined(DLIB__CMAKE_GENERATED_A_CONFIG_H_FILE) const int USER_ERROR__inconsistent_build_configuration__see_dlib_faq_2 = 0; #endif #ifdef DLIB_CHECK_FOR_VERSION_MISMATCH const int DLIB_CHECK_FOR_VERSION_MISMATCH = 0; #endif } #endif // DLIB_TEST_FOR_ODR_VIOLATIONS_CPp_ ================================================ FILE: benchmarks/dlib/test_for_odr_violations.h ================================================ // Copyright (C) 2014 Davis E. King (davis@dlib.net) // License: Boost Software License See LICENSE.txt for the full license. #ifndef DLIB_TEST_FOR_ODR_VIOLATIONS_H_ #define DLIB_TEST_FOR_ODR_VIOLATIONS_H_ #include "assert.h" #include "config.h" extern "C" { // =========================>>> WHY YOU ARE GETTING AN ERROR HERE <<<========================= // The point of this block of code is to cause a link time error that will prevent a user // from compiling part of their application with DLIB_ASSERT enabled and part with it // disabled since doing that would be a violation of C++'s one definition rule. So if you // are getting an error here then you are either not enabling DLIB_ASSERT consistently // (e.g. by compiling part of your program in a debug mode and part in a release mode) or // you have simply forgotten to compile dlib/all/source.cpp into your application. // =========================>>> WHY YOU ARE GETTING AN ERROR HERE <<<========================= #ifdef ENABLE_ASSERTS const extern int USER_ERROR__inconsistent_build_configuration__see_dlib_faq_1; const int DLIB_NO_WARN_UNUSED dlib_check_assert_helper_variable = USER_ERROR__inconsistent_build_configuration__see_dlib_faq_1; #endif // The point of this block of code is to cause a link time error if someone builds dlib via // cmake as a separately installable library, and therefore generates a dlib/config.h from // cmake, but then proceeds to use the default unconfigured dlib/config.h from version // control. It should be obvious why this is bad, if it isn't you need to read a book // about C++. Moreover, it can only happen if someone manually copies files around and // messes things up. If instead they run `make install` or `cmake --build . --target // install` things will be setup correctly, which is what they should do. To summarize: DO // NOT BUILD A STANDALONE DLIB AND THEN GO CHERRY PICKING FILES FROM THE BUILD FOLDER AND // MIXING THEM WITH THE SOURCE FROM GITHUB. USE CMAKE'S INSTALL SCRIPTS TO INSTALL DLIB. // Or even better, don't install dlib at all and instead build your program as shown in // examples/CMakeLists.txt #if defined(DLIB_NOT_CONFIGURED) && !defined(DLIB__CMAKE_GENERATED_A_CONFIG_H_FILE) const extern int USER_ERROR__inconsistent_build_configuration__see_dlib_faq_2; const int DLIB_NO_WARN_UNUSED dlib_check_not_configured_helper_variable = USER_ERROR__inconsistent_build_configuration__see_dlib_faq_2; #endif // Cause the user to get a linker error if they try to use header files from one version of // dlib with the compiled binary from a different version of dlib. #ifdef DLIB_CHECK_FOR_VERSION_MISMATCH const extern int DLIB_CHECK_FOR_VERSION_MISMATCH; const int DLIB_NO_WARN_UNUSED dlib_check_for_version_mismatch = DLIB_CHECK_FOR_VERSION_MISMATCH; #endif } #endif // DLIB_TEST_FOR_ODR_VIOLATIONS_H_ ================================================ FILE: benchmarks/dlib/threads/async.h ================================================ // Copyright (C) 2016 Davis E. King (davis@dlib.net) // License: Boost Software License See LICENSE.txt for the full license. #ifndef DLIB_AsYNC_Hh_ #define DLIB_AsYNC_Hh_ // C++11 things don't work in old versions of visual studio #if !defined( _MSC_VER) || _MSC_VER >= 1900 #include "async_abstract.h" #include "thread_pool_extension.h" #include #include namespace dlib { // ---------------------------------------------------------------------------------------- namespace impl { template struct selector {}; template void call_prom_set_value( T& prom, U& fun, selector ) { prom.set_value(fun()); } template void call_prom_set_value( T& prom, U& fun, selector ) { fun(); prom.set_value(); } template struct result_of; #if (__cplusplus >= 201703L || \ (defined(_MSVC_LANG) && _MSVC_LANG >= 201703L)) && \ __cpp_lib_is_invocable >= 201703L template struct result_of : std::invoke_result {}; #else template struct result_of : std::result_of {}; #endif } // ---------------------------------------------------------------------------------------- thread_pool& default_thread_pool(); // ---------------------------------------------------------------------------------------- template < typename Function, typename ...Args > std::future::type> async( thread_pool& tp, Function&& f, Args&&... args ) { auto prom = std::make_shared::type>>(); std::future::type> ret = prom->get_future(); using bind_t = decltype(std::bind(std::forward(f), std::forward(args)...)); auto fun = std::make_shared(std::bind(std::forward(f), std::forward(args)...)); tp.add_task_by_value([fun, prom]() { try { impl::call_prom_set_value(*prom, *fun, impl::selector::type>()); } catch(...) { prom->set_exception(std::current_exception()); } }); return ret; } // ---------------------------------------------------------------------------------------- template < typename Function, typename ...Args > std::future::type> async( Function&& f, Args&&... args ) { return async(default_thread_pool(), std::forward(f), std::forward(args)...); } } // ---------------------------------------------------------------------------------------- #ifdef NO_MAKEFILE #include "async.cpp" #endif #endif #endif // DLIB_AsYNC_Hh_ ================================================ FILE: benchmarks/dlib/threads/async_abstract.h ================================================ // Copyright (C) 2016 Davis E. King (davis@dlib.net) // License: Boost Software License See LICENSE.txt for the full license. #undef DLIB_AsYNC_ABSTRACT_Hh_ #ifdef DLIB_AsYNC_ABSTRACT_Hh_ #include "thread_pool_extension_abstract.h" #include #include namespace dlib { // ---------------------------------------------------------------------------------------- thread_pool& default_thread_pool( ); /*! ensures - returns a reference to a global thread_pool. If the DLIB_NUM_THREADS environment variable is set to an integer then the thread pool will contain DLIB_NUM_THREADS threads, otherwise it will contain std::thread::hardware_concurrency() threads. !*/ // ---------------------------------------------------------------------------------------- template < typename Function, typename ...Args > std::future::type> async( thread_pool& tp, Function&& f, Args&&... args ); /*! requires - f must be a function and f(args...) must be a valid expression. ensures - This function behaves just like std::async(std::launch::async, f, args) except that instead of spawning a new thread to process each task it submits the task to the provided dlib::thread_pool. Therefore, dlib::async() is guaranteed to use a bounded number of threads unlike std::async(). This also means that calls to dlib::async() will block if there aren't any free threads in the thread pool. !*/ // ---------------------------------------------------------------------------------------- template < typename Function, typename ...Args > std::future::type> async( Function&& f, Args&&... args ); /*! ensures - Calling this function is equivalent to directly calling async(default_thread_pool(), f, args...) !*/ } // ---------------------------------------------------------------------------------------- #endif // DLIB_AsYNC_ABSTRACT_Hh_ ================================================ FILE: benchmarks/dlib/threads/auto_mutex_extension.h ================================================ // Copyright (C) 2005 Davis E. King (davis@dlib.net) // License: Boost Software License See LICENSE.txt for the full license. #ifndef DLIB_AUTO_MUTEX_EXTENSIOn_ #define DLIB_AUTO_MUTEX_EXTENSIOn_ #include "threads_kernel.h" #include "rmutex_extension.h" #include "read_write_mutex_extension.h" #include "auto_mutex_extension_abstract.h" namespace dlib { // ---------------------------------------------------------------------------------------- class auto_mutex { /*! INITIAL VALUE - if (m != 0) then - the mutex pointed to by m is locked - if (r != 0) then - the mutex pointed to by r is locked - if (rw != 0) then - the mutex pointed to by rw is locked - exactly one of r, m, or rw is not 0. CONVENTION - if (m != 0) then - the mutex pointed to by m is locked - if (r != 0) then - the mutex pointed to by r is locked - if (rw != 0) then - the mutex pointed to by rw is locked - exactly one of r, m, or rw is not 0. !*/ public: explicit auto_mutex ( const mutex& m_ ) : m(&m_), r(0), rw(0) { m->lock(); } explicit auto_mutex ( const rmutex& r_ ) : m(0), r(&r_), rw(0) { r->lock(); } explicit auto_mutex ( const read_write_mutex& rw_ ) : m(0), r(0), rw(&rw_) { rw->lock(); } void unlock() { if (m != 0) { m->unlock(); m = 0; } else if (r != 0) { r->unlock(); r = 0; } else if (rw != 0) { rw->unlock(); rw = 0; } } ~auto_mutex ( ) { unlock(); } private: const mutex* m; const rmutex* r; const read_write_mutex* rw; // restricted functions auto_mutex(auto_mutex&); // copy constructor auto_mutex& operator=(auto_mutex&); // assignment operator }; // ---------------------------------------------------------------------------------------- class auto_mutex_readonly { public: explicit auto_mutex_readonly ( const read_write_mutex& rw_ ) : rw(rw_), _has_write_lock(false), _has_read_lock(true) { rw.lock_readonly(); } ~auto_mutex_readonly ( ) { unlock(); } void lock_readonly ( ) { if (!_has_read_lock) { unlock(); rw.lock_readonly(); _has_read_lock = true; } } void lock_write ( ) { if (!_has_write_lock) { unlock(); rw.lock(); _has_write_lock = true; } } void unlock ( ) { if (_has_write_lock) { rw.unlock(); _has_write_lock = false; } else if (_has_read_lock) { rw.unlock_readonly(); _has_read_lock = false; } } bool has_read_lock ( ) { return _has_read_lock; } bool has_write_lock ( ) { return _has_write_lock; } private: const read_write_mutex& rw; bool _has_write_lock; bool _has_read_lock; // restricted functions auto_mutex_readonly(auto_mutex_readonly&); // copy constructor auto_mutex_readonly& operator=(auto_mutex_readonly&); // assignment operator }; // ---------------------------------------------------------------------------------------- } #endif // DLIB_AUTO_MUTEX_EXTENSIOn_ ================================================ FILE: benchmarks/dlib/threads/auto_mutex_extension_abstract.h ================================================ // Copyright (C) 2005 Davis E. King (davis@dlib.net) // License: Boost Software License See LICENSE.txt for the full license. #undef DLIB_AUTO_MUTEX_EXTENSIOn_ABSTRACT_ #ifdef DLIB_AUTO_MUTEX_EXTENSIOn_ABSTRACT_ #include "threads_kernel_abstract.h" #include "rmutex_extension_abstract.h" #include "read_write_mutex_extension_abstract.h" namespace dlib { // ---------------------------------------------------------------------------------------- class auto_mutex { /*! INITIAL VALUE The mutex given in the constructor is locked and associated with this object. WHAT THIS OBJECT REPRESENTS This object represents a mechanism for automatically locking and unlocking a mutex object. !*/ public: explicit auto_mutex ( const mutex& m ); /*! ensures - #*this is properly initialized - m will be locked !*/ explicit auto_mutex ( const rmutex& m ); /*! ensures - #*this is properly initialized - m will be locked !*/ explicit auto_mutex ( const read_write_mutex& m ); /*! ensures - #*this is properly initialized - m will be locked via m.lock() (i.e. a write lock will be obtained) !*/ void unlock( ); /*! ensures - if (unlock() has not already been called) then - The mutex associated with *this has been unlocked. This is useful if you want to unlock a mutex before the auto_mutex destructor executes. !*/ ~auto_mutex ( ); /*! ensures - all resources allocated by *this have been freed - calls unlock() !*/ private: // restricted functions auto_mutex(auto_mutex&); // copy constructor auto_mutex& operator=(auto_mutex&); // assignment operator }; // ---------------------------------------------------------------------------------------- class auto_mutex_readonly { /*! INITIAL VALUE The mutex given in the constructor is locked using a read-only lock and associated with this object. WHAT THIS OBJECT REPRESENTS This object represents a mechanism for automatically locking and unlocking a read_write_mutex object. In particular, a readonly lock is used. !*/ public: explicit auto_mutex_readonly ( const read_write_mutex& m ); /*! ensures - #*this is properly initialized - a readonly lock will be obtained on m using m.lock_readonly() - #has_read_lock() == true !*/ ~auto_mutex_readonly ( ); /*! ensures - all resources allocated by *this have been freed - the mutex associated with *this has been unlocked !*/ bool has_read_lock ( ); /*! ensures - returns true if this object has called read_write_mutex::lock_readonly() on its associated mutex and has yet to release that lock. !*/ bool has_write_lock ( ); /*! ensures - returns true if this object has called read_write_mutex::lock() on its associated mutex and has yet to release that lock. !*/ void lock_readonly ( ); /*! ensures - This function converts the lock on the associated mutex into a readonly lock. Specifically: if (!has_read_lock()) then - if (has_write_lock()) then - unlocks the associated mutex and then relocks it by calling read_write_mutex::lock_readonly() - else - locks the associated mutex by calling read_write_mutex::lock_readonly() - #has_read_lock() == true - Note that the lock switch is not atomic. This means that whatever resource is protected by the mutex might have been modified during the call to lock_readonly(). !*/ void lock_write ( ); /*! ensures - This function converts the lock on the associated mutex into a write lock. Specifically: if (!has_write_lock()) then - if (has_read_lock()) then - unlocks the associated mutex and then relocks it by calling read_write_mutex::lock() - else - locks the associated mutex by calling read_write_mutex::lock() - #has_write_lock() == true - Note that the lock switch is not atomic. This means that whatever resource is protected by the mutex might have been modified during the call to lock_write(). !*/ void unlock ( ); /*! ensures - if (has_read_lock() || has_write_lock()) then - unlocks the associated mutex. This is useful if you want to unlock a mutex before the auto_mutex_readonly destructor executes. - #has_read_lock() == false - #has_write_lock() == false !*/ private: // restricted functions auto_mutex_readonly(auto_mutex_readonly&); // copy constructor auto_mutex_readonly& operator=(auto_mutex_readonly&); // assignment operator }; // ---------------------------------------------------------------------------------------- } #endif // DLIB_AUTO_MUTEX_EXTENSIOn_ABSTRACT_ ================================================ FILE: benchmarks/dlib/threads/auto_unlock_extension.h ================================================ // Copyright (C) 2006 Davis E. King (davis@dlib.net) // License: Boost Software License See LICENSE.txt for the full license. #ifndef DLIB_AUTO_UNLOCK_EXTENSIOn_ #define DLIB_AUTO_UNLOCK_EXTENSIOn_ #include "threads_kernel.h" #include "rmutex_extension.h" #include "read_write_mutex_extension.h" #include "auto_unlock_extension_abstract.h" namespace dlib { // ---------------------------------------------------------------------------------------- class auto_unlock { /*! INITIAL VALUE - if (m != 0) then - the mutex pointed to by m is locked - if (r != 0) then - the mutex pointed to by r is locked - if (rw != 0) then - the mutex pointed to by rw is locked - exactly one of r, m, or rw is not 0. CONVENTION - if (m != 0) then - the mutex pointed to by m is locked - if (r != 0) then - the mutex pointed to by r is locked - if (rw != 0) then - the mutex pointed to by rw is locked - exactly one of r, m, or rw is not 0. !*/ public: explicit auto_unlock ( const mutex& m_ ) : m(&m_), r(0), rw(0) {} explicit auto_unlock ( const rmutex& r_ ) : m(0), r(&r_), rw(0) {} explicit auto_unlock ( const read_write_mutex& rw_ ) : m(0), r(0), rw(&rw_) {} ~auto_unlock ( ) { if (m != 0) m->unlock(); else if (r != 0) r->unlock(); else rw->unlock(); } private: const mutex* m; const rmutex* r; const read_write_mutex* rw; // restricted functions auto_unlock(auto_unlock&); // copy constructor auto_unlock& operator=(auto_unlock&); // assignment operator }; // ---------------------------------------------------------------------------------------- class auto_unlock_readonly { public: explicit auto_unlock_readonly ( const read_write_mutex& rw_ ) : rw(rw_) {} ~auto_unlock_readonly ( ) { rw.unlock_readonly(); } private: const read_write_mutex& rw; // restricted functions auto_unlock_readonly(auto_unlock_readonly&); // copy constructor auto_unlock_readonly& operator=(auto_unlock_readonly&); // assignment operator }; // ---------------------------------------------------------------------------------------- } #endif // DLIB_AUTO_UNLOCK_EXTENSIOn_ ================================================ FILE: benchmarks/dlib/threads/auto_unlock_extension_abstract.h ================================================ // Copyright (C) 2006 Davis E. King (davis@dlib.net) // License: Boost Software License See LICENSE.txt for the full license. #undef DLIB_AUTO_UNLOCK_EXTENSIOn_ABSTRACT_ #ifdef DLIB_AUTO_UNLOCK_EXTENSIOn_ABSTRACT_ #include "threads_kernel_abstract.h" #include "rmutex_extension_abstract.h" #include "read_write_mutex_extension_abstract.h" namespace dlib { // ---------------------------------------------------------------------------------------- class auto_unlock { /*! INITIAL VALUE The mutex given in the constructor is associated with this object. WHAT THIS OBJECT REPRESENTS This object represents a mechanism for automatically unlocking a mutex object. It is useful when you already have a locked mutex and want to make sure it gets unlocked even if an exception is thrown or you quit the function at a weird spot. !*/ public: explicit auto_unlock ( const mutex& m ); /*! ensures - #*this is properly initialized - does not modify m in any way !*/ explicit auto_unlock ( const rmutex& m ); /*! ensures - #*this is properly initialized - does not modify m in any way !*/ explicit auto_unlock ( const read_write_mutex& m ); /*! ensures - #*this is properly initialized - does not modify m in any way !*/ ~auto_unlock ( ); /*! ensures - all resources allocated by *this have been freed - calls unlock() on the mutex associated with *this !*/ private: // restricted functions auto_unlock(auto_unlock&); // copy constructor auto_unlock& operator=(auto_unlock&); // assignment operator }; // ---------------------------------------------------------------------------------------- class auto_unlock_readonly { /*! INITIAL VALUE The mutex given in the constructor is associated with this object. WHAT THIS OBJECT REPRESENTS This object represents a mechanism for automatically unlocking a read_write_mutex object. It is useful when you already have a locked mutex and want to make sure it gets unlocked even if an exception is thrown or you quit the function at a weird spot. Note that the mutex is unlocked by calling unlock_readonly() on it. !*/ public: explicit auto_unlock_readonly ( const read_write_mutex& m ); /*! ensures - #*this is properly initialized - does not modify m in any way !*/ ~auto_unlock_readonly ( ); /*! ensures - all resources allocated by *this have been freed - calls unlock_readonly() on the mutex associated with *this !*/ private: // restricted functions auto_unlock_readonly(auto_unlock_readonly&); // copy constructor auto_unlock_readonly& operator=(auto_unlock_readonly&); // assignment operator }; // ---------------------------------------------------------------------------------------- } #endif // DLIB_AUTO_UNLOCK_EXTENSIOn_ABSTRACT_ ================================================ FILE: benchmarks/dlib/threads/create_new_thread_extension.h ================================================ // Copyright (C) 2006 Davis E. King (davis@dlib.net) // License: Boost Software License See LICENSE.txt for the full license. #ifndef DLIB_CREATE_NEW_THREAD_EXTENSIOn_ #define DLIB_CREATE_NEW_THREAD_EXTENSIOn_ #include "threads_kernel_abstract.h" #include "create_new_thread_extension_abstract.h" #include "../threads.h" namespace dlib { // ---------------------------------------------------------------------------------------- template < typename T, void (T::*funct)() > inline void dlib_create_new_thread_helper ( void* obj ) { T* o = static_cast(obj); (o->*funct)(); } // ---------------------------------------------------------------------------------------- template < typename T, void (T::*funct)() > inline bool create_new_thread ( T& obj ) { return create_new_thread(dlib_create_new_thread_helper,&obj); } // ---------------------------------------------------------------------------------------- } #endif // DLIB_CREATE_NEW_THREAD_EXTENSIOn_ ================================================ FILE: benchmarks/dlib/threads/create_new_thread_extension_abstract.h ================================================ // Copyright (C) 2006 Davis E. King (davis@dlib.net) // License: Boost Software License See LICENSE.txt for the full license. #undef DLIB_CREATE_NEW_THREAD_EXTENSIOn_ABSTRACT_ #ifdef DLIB_CREATE_NEW_THREAD_EXTENSIOn_ABSTRACT_ #include "threads_kernel_abstract.h" namespace dlib { // ---------------------------------------------------------------------------------------- template < typename T, void (T::*funct)() > bool create_new_thread ( T& obj ); /*! ensures - creates a new thread and calls obj.*funct() from it. - returns true upon success and false upon failure to create the new thread. !*/ // ---------------------------------------------------------------------------------------- } #endif // DLIB_CREATE_NEW_THREAD_EXTENSIOn_ABSTRACT_ ================================================ FILE: benchmarks/dlib/threads/multithreaded_object_extension.h ================================================ // Copyright (C) 2007 Davis E. King (davis@dlib.net) // License: Boost Software License See LICENSE.txt for the full license. #ifndef DLIB_MULTITHREADED_OBJECT_EXTENSIOn_ #define DLIB_MULTITHREADED_OBJECT_EXTENSIOn_ #include "multithreaded_object_extension_abstract.h" #include "threads_kernel.h" #include "auto_mutex_extension.h" #include "rmutex_extension.h" #include "rsignaler_extension.h" #include "../algs.h" #include "../assert.h" #include "../map.h" #include "../member_function_pointer.h" namespace dlib { // ---------------------------------------------------------------------------------------- class multithreaded_object { /*! INITIAL VALUE - is_running_ == false - should_stop_ == false - thread_ids.size() == 0 - dead_threads.size() == 0 - threads_started == 0 CONVENTION - number_of_threads_registered() == thread_ids.size() + dead_threads.size() - number_of_threads_alive() == threads_started - is_running() == is_running_ - should_stop() == should_stop_ - thread_ids == a map of current thread ids to the member function pointers that that thread runs. - threads_started == the number of threads that have been spawned to run thread_helper but haven't ended yet. - dead_threads == a queue that contains all the member function pointers for threads that are currently registered but not running - m_ == the mutex used to protect all our variables - s == the signaler for m_ !*/ public: multithreaded_object ( ); virtual ~multithreaded_object ( ) = 0; void clear ( ); bool is_running ( ) const; unsigned long number_of_threads_alive ( ) const; unsigned long number_of_threads_registered ( ) const; void wait ( ) const; void start ( ); void pause ( ); void stop ( ); protected: bool should_stop ( ) const; template < typename T > void register_thread ( T& object, void (T::*thread)() ) { auto_mutex M(m_); try { mfp mf; mf.set(object,thread); dead_threads.enqueue(mf); if (is_running_) start(); } catch (...) { is_running_ = false; should_stop_ = true; s.broadcast(); throw; } } private: class raii_thread_helper { public: raii_thread_helper(multithreaded_object& self_, thread_id_type id_); ~raii_thread_helper(); multithreaded_object& self; thread_id_type id; }; void thread_helper( ); typedef member_function_pointer<> mfp; rmutex m_; rsignaler s; map::kernel_2a>::kernel_1a thread_ids; queue::kernel_2a>::kernel_1a dead_threads; bool is_running_; bool should_stop_; unsigned long threads_started; // restricted functions multithreaded_object(multithreaded_object&); // copy constructor multithreaded_object& operator=(multithreaded_object&); // assignment operator }; // ---------------------------------------------------------------------------------------- } #ifdef NO_MAKEFILE #include "multithreaded_object_extension.cpp" #endif #endif // DLIB_MULTITHREADED_OBJECT_EXTENSIOn_ ================================================ FILE: benchmarks/dlib/threads/multithreaded_object_extension_abstract.h ================================================ // Copyright (C) 2007 Davis E. King (davis@dlib.net) // License: Boost Software License See LICENSE.txt for the full license. #undef DLIB_MULTITHREADED_OBJECT_EXTENSIOn_ABSTRACT_ #ifdef DLIB_MULTITHREADED_OBJECT_EXTENSIOn_ABSTRACT_ #include "threads_kernel_abstract.h" namespace dlib { // ---------------------------------------------------------------------------------------- class multithreaded_object { /*! INITIAL VALUE - is_running() == false - number_of_threads_alive() == 0 - number_of_threads_registered() == 0 WHAT THIS OBJECT REPRESENTS This object represents a multithreaded object. It is similar to the threaded_object except it allows you to have many threads in a single object rather than just one. To use it you inherit from it and register the member functions in your new class that you want to run in their own threads by calling register_thread(). Then when you call start() it will spawn all the registered functions in their own threads. !*/ public: multithreaded_object ( ); /*! ensures - #*this is properly initialized throws - std::bad_alloc - dlib::thread_error the constructor may throw this exception if there is a problem gathering resources to create threading objects. !*/ virtual ~multithreaded_object ( ) = 0; /*! requires - number_of_threads_alive() == 0 (i.e. in the destructor for the object you derive from this one you must wait for all the threads to end.) ensures - all resources allocated by *this have been freed. !*/ void clear( ); /*! ensures - #*this has its initial value - blocks until all threads have terminated throws - std::bad_alloc or dlib::thread_error if an exception is thrown then *this is unusable until clear() is called and succeeds !*/ bool is_running ( ) const; /*! ensures - if (number_of_threads_alive() > 0 && the threads are currently supposed to be executing) then - returns true - else - returns false !*/ unsigned long number_of_threads_alive ( ) const; /*! ensures - returns the number of threads that are currently alive (i.e. the number of threads that have started but not yet terminated) !*/ unsigned long number_of_threads_registered ( ) const; /*! ensures - returns the number of threads that have been registered by calls to register_thread() !*/ void wait ( ) const; /*! requires - is not called from one of this object's threads ensures - if (number_of_threads_alive() > 0) then - blocks until all the threads in this object have terminated (i.e. blocks until number_of_threads_alive() == 0) !*/ void start ( ); /*! ensures - #number_of_threads_alive() == number_of_threads_registered() - #is_running() == true - #should_stop() == false - all the threads registered are up and running. throws - std::bad_alloc or dlib::thread_error If either of these exceptions are thrown then #is_running() == false and should_stop() == true !*/ void pause ( ); /*! ensures - #is_running() == false !*/ void stop ( ); /*! ensures - #should_stop() == true - #is_running() == false !*/ protected: template < typename T > void register_thread ( T& object, void (T::*thread)() ); /*! requires - (object.*thread)() forms a valid function call - the thread function does not throw ensures - registers the member function pointed to by thread as one of the threads that runs when is_running() == true - #number_of_threads_registered() == number_of_threads_registered() + 1 - if (is_running() == true) - spawns this new member function in its own thread - #number_of_threads_alive() += number_of_threads_alive() + 1 throws - std::bad_alloc or dlib::thread_error If either of these exceptions are thrown then #is_running() == false and should_stop() == true !*/ bool should_stop ( ) const; /*! requires - is only called from one of the registered threads in this object ensures - if (is_running() == false && should_stop() == false) then - blocks until (#is_running() == true || #should_stop() == true) - if (this thread is supposed to terminate) then - returns true - else - returns false !*/ private: // restricted functions multithreaded_object(multithreaded_object&); // copy constructor multithreaded_object& operator=(multithreaded_object&); // assignment operator }; // ---------------------------------------------------------------------------------------- } #endif // DLIB_MULTITHREADED_OBJECT_EXTENSIOn_ABSTRACT_ ================================================ FILE: benchmarks/dlib/threads/parallel_for_extension.h ================================================ // Copyright (C) 2013 Davis E. King (davis@dlib.net) // License: Boost Software License See LICENSE.txt for the full license. #ifndef DLIB_PARALLEL_FoR_Hh_ #define DLIB_PARALLEL_FoR_Hh_ #include "parallel_for_extension_abstract.h" #include "thread_pool_extension.h" #include "../console_progress_indicator.h" #include "async.h" namespace dlib { // ---------------------------------------------------------------------------------------- namespace impl { template class helper_parallel_for { public: helper_parallel_for ( T& obj_, void (T::*funct_)(long) ) : obj(obj_), funct(funct_) {} T& obj; void (T::*funct)(long); void process_block (long begin, long end) { for (long i = begin; i < end; ++i) (obj.*funct)(i); } }; template class helper_parallel_for_funct { public: helper_parallel_for_funct ( const T& funct_ ) : funct(funct_) {} const T& funct; void run(long i) { funct(i); } }; template class helper_parallel_for_funct2 { public: helper_parallel_for_funct2 ( const T& funct_ ) : funct(funct_) {} const T& funct; void run(long begin, long end) { funct(begin, end); } }; } // ---------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------- template void parallel_for_blocked ( thread_pool& tp, long begin, long end, T& obj, void (T::*funct)(long, long), long chunks_per_thread = 8 ) { // make sure requires clause is not broken DLIB_ASSERT(begin <= end && chunks_per_thread > 0, "\t void parallel_for_blocked()" << "\n\t Invalid inputs were given to this function" << "\n\t begin: " << begin << "\n\t end: " << end << "\n\t chunks_per_thread: " << chunks_per_thread ); if (tp.num_threads_in_pool() != 0) { const long num = end-begin; const long num_workers = static_cast(tp.num_threads_in_pool()); // How many samples to process in a single task (aim for chunks_per_thread jobs per worker) const long block_size = std::max(1L, num/(num_workers*chunks_per_thread)); for (long i = 0; i < num; i+=block_size) { tp.add_task(obj, funct, begin+i, begin+std::min(i+block_size, num)); } tp.wait_for_all_tasks(); } else { // Since there aren't any threads in the pool we might as well just invoke // the function directly since that's all the thread_pool object would do. // But doing it ourselves skips a mutex lock. (obj.*funct)(begin, end); } } // ---------------------------------------------------------------------------------------- template void parallel_for_blocked ( unsigned long num_threads, long begin, long end, T& obj, void (T::*funct)(long, long), long chunks_per_thread = 8 ) { // make sure requires clause is not broken DLIB_ASSERT(begin <= end && chunks_per_thread > 0, "\t void parallel_for_blocked()" << "\n\t Invalid inputs were given to this function" << "\n\t begin: " << begin << "\n\t end: " << end << "\n\t chunks_per_thread: " << chunks_per_thread ); thread_pool tp(num_threads); parallel_for_blocked(tp, begin, end, obj, funct, chunks_per_thread); } // ---------------------------------------------------------------------------------------- template void parallel_for_blocked ( thread_pool& tp, long begin, long end, const T& funct, long chunks_per_thread = 8 ) { // make sure requires clause is not broken DLIB_ASSERT(begin <= end && chunks_per_thread > 0, "\t void parallel_for_blocked()" << "\n\t Invalid inputs were given to this function" << "\n\t begin: " << begin << "\n\t end: " << end << "\n\t chunks_per_thread: " << chunks_per_thread ); impl::helper_parallel_for_funct2 helper(funct); parallel_for_blocked(tp, begin, end, helper, &impl::helper_parallel_for_funct2::run, chunks_per_thread); } // ---------------------------------------------------------------------------------------- template void parallel_for_blocked ( unsigned long num_threads, long begin, long end, const T& funct, long chunks_per_thread = 8 ) { // make sure requires clause is not broken DLIB_ASSERT(begin <= end && chunks_per_thread > 0, "\t void parallel_for_blocked()" << "\n\t Invalid inputs were given to this function" << "\n\t begin: " << begin << "\n\t end: " << end << "\n\t chunks_per_thread: " << chunks_per_thread ); thread_pool tp(num_threads); parallel_for_blocked(tp, begin, end, funct, chunks_per_thread); } template void parallel_for_blocked ( long begin, long end, const T& funct, long chunks_per_thread = 8 ) { parallel_for_blocked(default_thread_pool(), begin, end, funct, chunks_per_thread); } // ---------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------- template void parallel_for ( thread_pool& tp, long begin, long end, T& obj, void (T::*funct)(long), long chunks_per_thread = 8 ) { // make sure requires clause is not broken DLIB_ASSERT(begin <= end && chunks_per_thread > 0, "\t void parallel_for()" << "\n\t Invalid inputs were given to this function" << "\n\t begin: " << begin << "\n\t end: " << end << "\n\t chunks_per_thread: " << chunks_per_thread ); impl::helper_parallel_for helper(obj, funct); parallel_for_blocked(tp, begin, end, helper, &impl::helper_parallel_for::process_block, chunks_per_thread); } // ---------------------------------------------------------------------------------------- template void parallel_for ( unsigned long num_threads, long begin, long end, T& obj, void (T::*funct)(long), long chunks_per_thread = 8 ) { // make sure requires clause is not broken DLIB_ASSERT(begin <= end && chunks_per_thread > 0, "\t void parallel_for()" << "\n\t Invalid inputs were given to this function" << "\n\t begin: " << begin << "\n\t end: " << end << "\n\t chunks_per_thread: " << chunks_per_thread ); thread_pool tp(num_threads); parallel_for(tp, begin, end, obj, funct, chunks_per_thread); } // ---------------------------------------------------------------------------------------- template void parallel_for ( thread_pool& tp, long begin, long end, const T& funct, long chunks_per_thread = 8 ) { // make sure requires clause is not broken DLIB_ASSERT(begin <= end && chunks_per_thread > 0, "\t void parallel_for()" << "\n\t Invalid inputs were given to this function" << "\n\t begin: " << begin << "\n\t end: " << end << "\n\t chunks_per_thread: " << chunks_per_thread ); impl::helper_parallel_for_funct helper(funct); parallel_for(tp, begin, end, helper, &impl::helper_parallel_for_funct::run, chunks_per_thread); } // ---------------------------------------------------------------------------------------- template void parallel_for ( unsigned long num_threads, long begin, long end, const T& funct, long chunks_per_thread = 8 ) { // make sure requires clause is not broken DLIB_ASSERT(begin <= end && chunks_per_thread > 0, "\t void parallel_for()" << "\n\t Invalid inputs were given to this function" << "\n\t begin: " << begin << "\n\t end: " << end << "\n\t chunks_per_thread: " << chunks_per_thread ); thread_pool tp(num_threads); parallel_for(tp, begin, end, funct, chunks_per_thread); } // ---------------------------------------------------------------------------------------- template void parallel_for ( long begin, long end, const T& funct, long chunks_per_thread = 8 ) { parallel_for(default_thread_pool(), begin, end, funct, chunks_per_thread); } // ---------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------- namespace impl { template class parfor_verbose_helper { public: parfor_verbose_helper(T& obj_, void (T::*funct_)(long), long begin, long end) : obj(obj_), funct(funct_), pbar(end-begin) { count = 0; wrote_to_screen = pbar.print_status(0); } ~parfor_verbose_helper() { if (wrote_to_screen) std::cout << std::endl; } mutable long count; T& obj; void (T::*funct)(long); mutable console_progress_indicator pbar; mutable bool wrote_to_screen; mutex m; void operator()(long i) const { (obj.*funct)(i); { auto_mutex lock(m); wrote_to_screen = pbar.print_status(++count) || wrote_to_screen; } } }; template class parfor_verbose_helper3 { public: parfor_verbose_helper3(T& obj_, void (T::*funct_)(long,long), long begin, long end) : obj(obj_), funct(funct_), pbar(end-begin) { count = 0; wrote_to_screen = pbar.print_status(0); } ~parfor_verbose_helper3() { if (wrote_to_screen) std::cout << std::endl; } mutable long count; T& obj; void (T::*funct)(long,long); mutable console_progress_indicator pbar; mutable bool wrote_to_screen; mutex m; void operator()(long begin, long end) const { (obj.*funct)(begin, end); { auto_mutex lock(m); count += end-begin; wrote_to_screen = pbar.print_status(count) || wrote_to_screen; } } }; template class parfor_verbose_helper2 { public: parfor_verbose_helper2(const T& obj_, long begin, long end) : obj(obj_), pbar(end-begin) { count = 0; wrote_to_screen = pbar.print_status(0); } ~parfor_verbose_helper2() { if (wrote_to_screen) std::cout << std::endl; } mutable long count; const T& obj; mutable console_progress_indicator pbar; mutable bool wrote_to_screen; mutex m; void operator()(long i) const { obj(i); { auto_mutex lock(m); wrote_to_screen = pbar.print_status(++count) || wrote_to_screen; } } void operator()(long begin, long end) const { obj(begin, end); { auto_mutex lock(m); count += end-begin; wrote_to_screen = pbar.print_status(count) || wrote_to_screen; } } }; } template void parallel_for_verbose ( thread_pool& tp, long begin, long end, T& obj, void (T::*funct)(long), long chunks_per_thread = 8 ) { // make sure requires clause is not broken DLIB_ASSERT(begin <= end && chunks_per_thread > 0, "\t void parallel_for_verbose()" << "\n\t Invalid inputs were given to this function" << "\n\t begin: " << begin << "\n\t end: " << end << "\n\t chunks_per_thread: " << chunks_per_thread ); impl::parfor_verbose_helper helper(obj, funct, begin, end); parallel_for(tp, begin, end, helper, chunks_per_thread); } // ---------------------------------------------------------------------------------------- template void parallel_for_verbose ( unsigned long num_threads, long begin, long end, T& obj, void (T::*funct)(long), long chunks_per_thread = 8 ) { // make sure requires clause is not broken DLIB_ASSERT(begin <= end && chunks_per_thread > 0, "\t void parallel_for_verbose()" << "\n\t Invalid inputs were given to this function" << "\n\t begin: " << begin << "\n\t end: " << end << "\n\t chunks_per_thread: " << chunks_per_thread ); impl::parfor_verbose_helper helper(obj, funct, begin, end); parallel_for(num_threads, begin, end, helper, chunks_per_thread); } // ---------------------------------------------------------------------------------------- template void parallel_for_verbose ( thread_pool& tp, long begin, long end, const T& funct, long chunks_per_thread = 8 ) { // make sure requires clause is not broken DLIB_ASSERT(begin <= end && chunks_per_thread > 0, "\t void parallel_for_verbose()" << "\n\t Invalid inputs were given to this function" << "\n\t begin: " << begin << "\n\t end: " << end << "\n\t chunks_per_thread: " << chunks_per_thread ); impl::parfor_verbose_helper2 helper(funct, begin, end); parallel_for(tp, begin, end, helper, chunks_per_thread); } // ---------------------------------------------------------------------------------------- template void parallel_for_verbose ( unsigned long num_threads, long begin, long end, const T& funct, long chunks_per_thread = 8 ) { // make sure requires clause is not broken DLIB_ASSERT(begin <= end && chunks_per_thread > 0, "\t void parallel_for_verbose()" << "\n\t Invalid inputs were given to this function" << "\n\t begin: " << begin << "\n\t end: " << end << "\n\t chunks_per_thread: " << chunks_per_thread ); impl::parfor_verbose_helper2 helper(funct, begin, end); parallel_for(num_threads, begin, end, helper, chunks_per_thread); } // ---------------------------------------------------------------------------------------- template void parallel_for_verbose ( long begin, long end, const T& funct, long chunks_per_thread = 8 ) { // make sure requires clause is not broken DLIB_ASSERT(begin <= end && chunks_per_thread > 0, "\t void parallel_for_verbose()" << "\n\t Invalid inputs were given to this function" << "\n\t begin: " << begin << "\n\t end: " << end << "\n\t chunks_per_thread: " << chunks_per_thread ); impl::parfor_verbose_helper2 helper(funct, begin, end); parallel_for(begin, end, helper, chunks_per_thread); } // ---------------------------------------------------------------------------------------- template void parallel_for_blocked_verbose ( thread_pool& tp, long begin, long end, T& obj, void (T::*funct)(long,long), long chunks_per_thread = 8 ) { // make sure requires clause is not broken DLIB_ASSERT(begin <= end && chunks_per_thread > 0, "\t void parallel_for_blocked_verbose()" << "\n\t Invalid inputs were given to this function" << "\n\t begin: " << begin << "\n\t end: " << end << "\n\t chunks_per_thread: " << chunks_per_thread ); impl::parfor_verbose_helper3 helper(obj, funct, begin, end); parallel_for_blocked(tp, begin, end, helper, chunks_per_thread); } // ---------------------------------------------------------------------------------------- template void parallel_for_blocked_verbose ( unsigned long num_threads, long begin, long end, T& obj, void (T::*funct)(long,long), long chunks_per_thread = 8 ) { // make sure requires clause is not broken DLIB_ASSERT(begin <= end && chunks_per_thread > 0, "\t void parallel_for_blocked_verbose()" << "\n\t Invalid inputs were given to this function" << "\n\t begin: " << begin << "\n\t end: " << end << "\n\t chunks_per_thread: " << chunks_per_thread ); impl::parfor_verbose_helper3 helper(obj, funct, begin, end); parallel_for_blocked(num_threads, begin, end, helper, chunks_per_thread); } // ---------------------------------------------------------------------------------------- template void parallel_for_blocked_verbose ( thread_pool& tp, long begin, long end, const T& funct, long chunks_per_thread = 8 ) { // make sure requires clause is not broken DLIB_ASSERT(begin <= end && chunks_per_thread > 0, "\t void parallel_for_blocked_verbose()" << "\n\t Invalid inputs were given to this function" << "\n\t begin: " << begin << "\n\t end: " << end << "\n\t chunks_per_thread: " << chunks_per_thread ); impl::parfor_verbose_helper2 helper(funct, begin, end); parallel_for_blocked(tp, begin, end, helper, chunks_per_thread); } // ---------------------------------------------------------------------------------------- template void parallel_for_blocked_verbose ( unsigned long num_threads, long begin, long end, const T& funct, long chunks_per_thread = 8 ) { // make sure requires clause is not broken DLIB_ASSERT(begin <= end && chunks_per_thread > 0, "\t void parallel_for_blocked_verbose()" << "\n\t Invalid inputs were given to this function" << "\n\t begin: " << begin << "\n\t end: " << end << "\n\t chunks_per_thread: " << chunks_per_thread ); impl::parfor_verbose_helper2 helper(funct, begin, end); parallel_for_blocked(num_threads, begin, end, helper, chunks_per_thread); } // ---------------------------------------------------------------------------------------- template void parallel_for_blocked_verbose ( long begin, long end, const T& funct, long chunks_per_thread = 8 ) { // make sure requires clause is not broken DLIB_ASSERT(begin <= end && chunks_per_thread > 0, "\t void parallel_for_blocked_verbose()" << "\n\t Invalid inputs were given to this function" << "\n\t begin: " << begin << "\n\t end: " << end << "\n\t chunks_per_thread: " << chunks_per_thread ); impl::parfor_verbose_helper2 helper(funct, begin, end); parallel_for_blocked(begin, end, helper, chunks_per_thread); } // ---------------------------------------------------------------------------------------- } #endif // DLIB_PARALLEL_FoR_Hh_ ================================================ FILE: benchmarks/dlib/threads/parallel_for_extension_abstract.h ================================================ // Copyright (C) 2013 Davis E. King (davis@dlib.net) // License: Boost Software License See LICENSE.txt for the full license. #undef DLIB_PARALLEL_FoR_ABSTRACT_Hh_ #ifdef DLIB_PARALLEL_FoR_ABSTRACT_Hh_ #include "thread_pool_extension_abstract.h" #include "async_abstract.h" namespace dlib { // ---------------------------------------------------------------------------------------- template void parallel_for_blocked ( thread_pool& tp, long begin, long end, T& obj, void (T::*funct)(long, long), long chunks_per_thread = 8 ); /*! requires - begin <= end - chunks_per_thread > 0 ensures - This is a convenience function for submitting a block of jobs to a thread_pool. In particular, given the half open range [begin, end), this function will split the range into approximately tp.num_threads_in_pool()*chunks_per_thread blocks, which it will then submit to the thread_pool. The given thread_pool will then call (obj.*funct)() on each of the subranges. - To be precise, suppose we have broken the range [begin, end) into the following subranges: - [begin[0], end[0]) - [begin[1], end[1]) - [begin[2], end[2]) ... - [begin[n], end[n]) Then parallel_for_blocked() submits each of these subranges to tp for processing such that (obj.*funct)(begin[i], end[i]) is invoked for all valid values of i. Moreover, the subranges are non-overlapping and completely cover the total range of [begin, end). - This function will not perform any memory allocations or create any system resources such as mutex objects. !*/ // ---------------------------------------------------------------------------------------- template void parallel_for_blocked ( unsigned long num_threads, long begin, long end, T& obj, void (T::*funct)(long, long), long chunks_per_thread = 8 ); /*! requires - begin <= end - chunks_per_thread > 0 ensures - This function is equivalent to the following block of code: thread_pool tp(num_threads); parallel_for_blocked(tp, begin, end, obj, funct, chunks_per_thread); !*/ // ---------------------------------------------------------------------------------------- template void parallel_for_blocked ( thread_pool& tp, long begin, long end, const T& funct, long chunks_per_thread = 8 ); /*! requires - chunks_per_thread > 0 - begin <= end ensures - This is a convenience function for submitting a block of jobs to a thread_pool. In particular, given the range [begin, end), this function will split the range into approximately tp.num_threads_in_pool()*chunks_per_thread blocks, which it will then submit to the thread_pool. The given thread_pool will then call funct() on each of the subranges. - To be precise, suppose we have broken the range [begin, end) into the following subranges: - [begin[0], end[0]) - [begin[1], end[1]) - [begin[2], end[2]) ... - [begin[n], end[n]) Then parallel_for_blocked() submits each of these subranges to tp for processing such that funct(begin[i], end[i]) is invoked for all valid values of i. - This function will not perform any memory allocations or create any system resources such as mutex objects. !*/ // ---------------------------------------------------------------------------------------- template void parallel_for_blocked ( unsigned long num_threads, long begin, long end, const T& funct, long chunks_per_thread = 8 ); /*! requires - begin <= end - chunks_per_thread > 0 ensures - This function is equivalent to the following block of code: thread_pool tp(num_threads); parallel_for_blocked(tp, begin, end, funct, chunks_per_thread); !*/ // ---------------------------------------------------------------------------------------- template void parallel_for_blocked ( long begin, long end, const T& funct, long chunks_per_thread = 8 ); /*! requires - begin <= end - chunks_per_thread > 0 ensures - This function is equivalent to the following block of code: parallel_for_blocked(default_thread_pool(), begin, end, funct, chunks_per_thread); !*/ // ---------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------- template void parallel_for ( thread_pool& tp, long begin, long end, T& obj, void (T::*funct)(long), long chunks_per_thread = 8 ); /*! requires - begin <= end - chunks_per_thread > 0 ensures - This function is equivalent to the following function call: parallel_for_blocked(tp, begin, end, [&](long begin_sub, long end_sub) { for (long i = begin_sub; i < end_sub; ++i) (obj.*funct)(i); }, chunks_per_thread); - Therefore, this routine invokes (obj.*funct)(i) for all i in the range [begin, end). However, it does so using tp.num_threads_in_pool() parallel threads. - This function will not perform any memory allocations or create any system resources such as mutex objects. !*/ // ---------------------------------------------------------------------------------------- template void parallel_for ( unsigned long num_threads, long begin, long end, T& obj, void (T::*funct)(long), long chunks_per_thread = 8 ); /*! requires - begin <= end - chunks_per_thread > 0 ensures - This function is equivalent to the following block of code: thread_pool tp(num_threads); parallel_for(tp, begin, end, obj, funct, chunks_per_thread); !*/ // ---------------------------------------------------------------------------------------- template void parallel_for ( thread_pool& tp, long begin, long end, const T& funct, long chunks_per_thread = 8 ); /*! requires - begin <= end - chunks_per_thread > 0 ensures - This function is equivalent to the following function call: parallel_for_blocked(tp, begin, end, [&](long begin_sub, long end_sub) { for (long i = begin_sub; i < end_sub; ++i) funct(i); }, chunks_per_thread); - Therefore, this routine invokes funct(i) for all i in the range [begin, end). However, it does so using tp.num_threads_in_pool() parallel threads. - This function will not perform any memory allocations or create any system resources such as mutex objects. !*/ // ---------------------------------------------------------------------------------------- template void parallel_for ( unsigned long num_threads, long begin, long end, const T& funct, long chunks_per_thread = 8 ); /*! requires - begin <= end - chunks_per_thread > 0 ensures - This function is equivalent to the following block of code: thread_pool tp(num_threads); parallel_for(tp, begin, end, funct, chunks_per_thread); !*/ // ---------------------------------------------------------------------------------------- template void parallel_for ( long begin, long end, const T& funct, long chunks_per_thread = 8 ); /*! requires - begin <= end - chunks_per_thread > 0 ensures - This function is equivalent to the following block of code: parallel_for(default_thread_pool(), begin, end, funct, chunks_per_thread); !*/ // ---------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------- template void parallel_for_verbose ( thread_pool& tp, long begin, long end, T& obj, void (T::*funct)(long), long chunks_per_thread = 8 ); /*! requires - begin <= end - chunks_per_thread > 0 ensures - This function is identical to the parallel_for() routine defined above except that it will print messages to cout showing the progress in executing the parallel for loop. !*/ // ---------------------------------------------------------------------------------------- template void parallel_for_verbose ( unsigned long num_threads, long begin, long end, T& obj, void (T::*funct)(long), long chunks_per_thread = 8 ); /*! requires - begin <= end - chunks_per_thread > 0 ensures - This function is identical to the parallel_for() routine defined above except that it will print messages to cout showing the progress in executing the parallel for loop. !*/ // ---------------------------------------------------------------------------------------- template void parallel_for_verbose ( thread_pool& tp, long begin, long end, const T& funct, long chunks_per_thread = 8 ); /*! requires - begin <= end - chunks_per_thread > 0 ensures - This function is identical to the parallel_for() routine defined above except that it will print messages to cout showing the progress in executing the parallel for loop. !*/ // ---------------------------------------------------------------------------------------- template void parallel_for_verbose ( unsigned long num_threads, long begin, long end, const T& funct, long chunks_per_thread = 8 ); /*! requires - begin <= end - chunks_per_thread > 0 ensures - This function is identical to the parallel_for() routine defined above except that it will print messages to cout showing the progress in executing the parallel for loop. !*/ // ---------------------------------------------------------------------------------------- template void parallel_for_verbose ( long begin, long end, const T& funct, long chunks_per_thread = 8 ); /*! requires - begin <= end - chunks_per_thread > 0 ensures - This function is identical to the parallel_for() routine defined above except that it will print messages to cout showing the progress in executing the parallel for loop. - It will also use the default_thread_pool(). !*/ // ---------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------- template void parallel_for_blocked_verbose ( thread_pool& tp, long begin, long end, T& obj, void (T::*funct)(long,long), long chunks_per_thread = 8 ); /*! requires - begin <= end - chunks_per_thread > 0 ensures - This function is identical to the parallel_for_blocked() routine defined above except that it will print messages to cout showing the progress in executing the parallel for loop. !*/ // ---------------------------------------------------------------------------------------- template void parallel_for_blocked_verbose ( unsigned long num_threads, long begin, long end, T& obj, void (T::*funct)(long,long), long chunks_per_thread = 8 ); /*! requires - begin <= end - chunks_per_thread > 0 ensures - This function is identical to the parallel_for_blocked() routine defined above except that it will print messages to cout showing the progress in executing the parallel for loop. !*/ // ---------------------------------------------------------------------------------------- template void parallel_for_blocked_verbose ( thread_pool& tp, long begin, long end, const T& funct, long chunks_per_thread = 8 ); /*! requires - begin <= end - chunks_per_thread > 0 ensures - This function is identical to the parallel_for_blocked() routine defined above except that it will print messages to cout showing the progress in executing the parallel for loop. !*/ // ---------------------------------------------------------------------------------------- template void parallel_for_blocked_verbose ( unsigned long num_threads, long begin, long end, const T& funct, long chunks_per_thread = 8 ); /*! requires - begin <= end - chunks_per_thread > 0 ensures - This function is identical to the parallel_for_blocked() routine defined above except that it will print messages to cout showing the progress in executing the parallel for loop. !*/ // ---------------------------------------------------------------------------------------- template void parallel_for_blocked_verbose ( long begin, long end, const T& funct, long chunks_per_thread = 8 ); /*! requires - begin <= end - chunks_per_thread > 0 ensures - This function is identical to the parallel_for_blocked() routine defined above except that it will print messages to cout showing the progress in executing the parallel for loop. - It will also use the default_thread_pool() !*/ // ---------------------------------------------------------------------------------------- } #endif // DLIB_PARALLEL_FoR_ABSTRACT_Hh_ ================================================ FILE: benchmarks/dlib/threads/posix.h ================================================ // Copyright (C) 2003 Davis E. King (davis@dlib.net) // License: Boost Software License See LICENSE.txt for the full license. #ifndef DLIB_THREADS_KERNEl_1_ #include "threads_kernel_2.h" #endif ================================================ FILE: benchmarks/dlib/threads/read_write_mutex_extension.h ================================================ // Copyright (C) 2010 Davis E. King (davis@dlib.net) // License: Boost Software License See LICENSE.txt for the full license. #ifndef DLIB_READ_WRITE_MUTEX_EXTENSIOn_ #define DLIB_READ_WRITE_MUTEX_EXTENSIOn_ #include "threads_kernel.h" #include "read_write_mutex_extension_abstract.h" namespace dlib { // ---------------------------------------------------------------------------------------- class read_write_mutex { /*! INITIAL VALUE - max_locks == defined by constructor - available_locks == max_locks - write_lock_in_progress == false - write_lock_active == false CONVENTION - Each time someone gets a read only lock they take one of the "available locks" and each write lock takes all possible locks (i.e. max_locks). The number of available locks is recorded in available_locks. Any time you try to lock this object and there aren't available locks you have to wait. - max_locks == max_readonly_locks() - if (some thread is on the process of obtaining a write lock) then - write_lock_in_progress == true - else - write_lock_in_progress == false - if (some thread currently has a write lock on this mutex) then - write_lock_active == true - else - write_lock_active == false !*/ public: read_write_mutex ( ) : s(m), max_locks(0xFFFFFFFF), available_locks(max_locks), write_lock_in_progress(false), write_lock_active(false) {} explicit read_write_mutex ( unsigned long max_locks_ ) : s(m), max_locks(max_locks_), available_locks(max_locks_), write_lock_in_progress(false), write_lock_active(false) { // make sure requires clause is not broken DLIB_ASSERT(max_locks > 0, "\t read_write_mutex::read_write_mutex(max_locks)" << "\n\t You must give a non-zero value for max_locks" << "\n\t this: " << this ); } ~read_write_mutex ( ) {} void lock ( ) const { m.lock(); // If another write lock is already in progress then wait for it to finish // before we start trying to grab all the available locks. This way we // don't end up fighting over the locks. while (write_lock_in_progress) s.wait(); // grab the right to perform a write lock write_lock_in_progress = true; // now start grabbing all the locks unsigned long locks_obtained = available_locks; available_locks = 0; while (locks_obtained != max_locks) { s.wait(); locks_obtained += available_locks; available_locks = 0; } write_lock_in_progress = false; write_lock_active = true; m.unlock(); } void unlock ( ) const { m.lock(); // only do something if there really was a lock in place if (write_lock_active) { available_locks = max_locks; write_lock_active = false; s.broadcast(); } m.unlock(); } void lock_readonly ( ) const { m.lock(); while (available_locks == 0) s.wait(); --available_locks; m.unlock(); } void unlock_readonly ( ) const { m.lock(); // If this condition is false then it means there are no more readonly locks // to free. So we don't do anything. if (available_locks != max_locks && !write_lock_active) { ++available_locks; // only perform broadcast when there is another thread that might be listening if (available_locks == 1 || write_lock_in_progress) { s.broadcast(); } } m.unlock(); } unsigned long max_readonly_locks ( ) const { return max_locks; } private: mutex m; signaler s; const unsigned long max_locks; mutable unsigned long available_locks; mutable bool write_lock_in_progress; mutable bool write_lock_active; // restricted functions read_write_mutex(read_write_mutex&); // copy constructor read_write_mutex& operator=(read_write_mutex&); // assignment operator }; // ---------------------------------------------------------------------------------------- } #endif // DLIB_READ_WRITE_MUTEX_EXTENSIOn_ ================================================ FILE: benchmarks/dlib/threads/read_write_mutex_extension_abstract.h ================================================ // Copyright (C) 2010 Davis E. King (davis@dlib.net) // License: Boost Software License See LICENSE.txt for the full license. #undef DLIB_READWRITE_MUTEX_EXTENSIOn_ABSTRACT_ #ifdef DLIB_READWRITE_MUTEX_EXTENSIOn_ABSTRACT_ #include "threads_kernel_abstract.h" namespace dlib { // ---------------------------------------------------------------------------------------- class read_write_mutex { /*! INITIAL VALUE read_write_mutex is in the fully unlocked state WHAT THIS OBJECT REPRESENTS This object represents a mutex intended to be used for synchronous thread control of shared data. When a thread wants to access some shared data it locks out other threads by calling lock() and calls unlock() when it is finished. This mutex also has the additional ability to distinguish between a lock for the purposes of modifying some shared data, a write lock, and a lock for the purposes of only reading shared data, a readonly lock. The lock() and unlock() functions are used for write locks while the lock_readonly() and unlock_readonly() are for readonly locks. The difference between a readonly and write lock can be understood as follows. The read_write_mutex will allow many threads to obtain simultaneous readonly locks but will only allow a single thread to obtain a write lock. Moreover, while the write lock is obtained no other threads are allowed to have readonly locks. !*/ public: read_write_mutex ( ); /*! ensures - #*this is properly initialized - max_readonly_locks() == 0xFFFFFFFF (i.e. about 4 billion) throws - dlib::thread_error the constructor may throw this exception if there is a problem gathering resources to create the read_write_mutex. !*/ explicit read_write_mutex ( unsigned long max_locks ); /*! requires - max_locks > 0 ensures - #*this is properly initialized - max_readonly_locks() == max_locks throws - dlib::thread_error the constructor may throw this exception if there is a problem gathering resources to create the read_write_mutex. !*/ ~read_write_mutex ( ); /*! requires - *this is not locked ensures - all resources allocated by *this have been freed !*/ void lock ( ) const; /*! requires - The thread calling this function does not have any kind of lock on this object ensures - if (there is any kind of lock on *this) then - the calling thread is put to sleep until a write lock becomes available. Once available, a write lock is obtained on this mutex and this function terminates. - else - a write lock is obtained on this mutex and the calling thread is not put to sleep !*/ void unlock ( ) const; /*! ensures - if (there is a write lock on *this) then - #*this is unlocked (i.e. other threads may now lock this object) - else - the call to unlock() has no effect !*/ unsigned long max_readonly_locks ( ) const; /*! ensures - returns the maximum number of concurrent readonly locks this object will allow. !*/ void lock_readonly ( ) const; /*! requires - The thread calling this function does not already have a write lock on this object ensures - if (there is a write lock on *this or there are no free readonly locks) then - the calling thread is put to sleep until there is no longer a write lock and a free readonly lock is available. Once this is the case, a readonly lock is obtained and this function terminates. - else - a readonly lock is obtained on *this and the calling thread is not put to sleep. Note that multiple readonly locks can be obtained at once. !*/ void unlock_readonly ( ) const; /*! ensures - if (there is a readonly lock on *this) then - one readonly lock is removed from *this. - else - the call to unlock_readonly() has no effect. !*/ private: // restricted functions read_write_mutex(read_write_mutex&); // copy constructor read_write_mutex& operator=(read_write_mutex&); // assignment operator }; // ---------------------------------------------------------------------------------------- } #endif // DLIB_READWRITE_MUTEX_EXTENSIOn_ABSTRACT_ ================================================ FILE: benchmarks/dlib/threads/rmutex_extension.h ================================================ // Copyright (C) 2005 Davis E. King (davis@dlib.net) // License: Boost Software License See LICENSE.txt for the full license. #ifndef DLIB_RMUTEX_EXTENSIOn_ #define DLIB_RMUTEX_EXTENSIOn_ #include "threads_kernel.h" #include "rmutex_extension_abstract.h" namespace dlib { // ---------------------------------------------------------------------------------------- class rmutex { /*! INITIAL VALUE count == 0 thread_id == 0 CONVENTION - count == lock_count() - if (no thread currently has a lock on this mutex) then - count == 0 - else - count == the number of times the thread that owns this mutex has called lock() - thread_id == the id of this thread. !*/ public: rmutex ( ) : s(m), thread_id(0), count(0) {} ~rmutex ( ) {} unsigned long lock_count ( ) const { return count; } void lock ( unsigned long times = 1 ) const { const thread_id_type current_thread_id = get_thread_id(); m.lock(); if (thread_id == current_thread_id) { // we already own this mutex in this case count += times; } else { // wait for our turn to claim this rmutex while (count != 0) s.wait(); count = times; thread_id = current_thread_id; } m.unlock(); } void unlock ( unsigned long times = 1 ) const { const thread_id_type current_thread_id = get_thread_id(); m.lock(); if (thread_id == current_thread_id) { if (count <= times) { count = 0; s.signal(); } else { count -= times; } } m.unlock(); } private: mutex m; signaler s; mutable thread_id_type thread_id; mutable unsigned long count; // restricted functions rmutex(rmutex&); // copy constructor rmutex& operator=(rmutex&); // assignment operator }; // ---------------------------------------------------------------------------------------- } #endif // DLIB_RMUTEX_EXTENSIOn_ ================================================ FILE: benchmarks/dlib/threads/rmutex_extension_abstract.h ================================================ // Copyright (C) 2005 Davis E. King (davis@dlib.net) // License: Boost Software License See LICENSE.txt for the full license. #undef DLIB_RMUTEX_EXTENSIOn_ABSTRACT_ #ifdef DLIB_RMUTEX_EXTENSIOn_ABSTRACT_ #include "threads_kernel_abstract.h" namespace dlib { // ---------------------------------------------------------------------------------------- class rmutex { /*! INITIAL VALUE rmutex is in the unlocked state WHAT THIS OBJECT REPRESENTS This object represents a recursive mutex intended to be used for synchronous thread control of shared data. When a thread wants to access some shared data it locks out other threads by calling lock() and calls unlock() when it is finished. The difference between this and the normal mutex object is that it is safe to call lock() from a thread that already has a lock on this mutex. Doing so just increments a counter but otherwise has no effect on the mutex. Note that unlock() must be called for each call to lock() to release the mutex. !*/ public: rmutex ( ); /*! ensures - #*this is properly initialized throws - dlib::thread_error the constructor may throw this exception if there is a problem gathering resources to create the rmutex. !*/ ~rmutex ( ); /*! requires - *this is not locked ensures - all resources allocated by *this have been freed !*/ unsigned long lock_count ( ) const; /*! requires - the calling thread has a lock on this mutex ensures - returns the number of times the thread has called lock() !*/ void lock ( unsigned long times = 1 ) const; /*! ensures - if (*this is currently locked by another thread) then - the thread that called lock() on *this is put to sleep until it becomes available. - #lock_count() == times - if (*this is currently unlocked) then - #*this becomes locked and the current thread is NOT put to sleep but now "owns" #*this - #lock_count() == times - if (*this is locked and owned by the current thread) then - the calling thread retains its lock on *this and isn't put to sleep. - #lock_count() == lock_count() + times !*/ void unlock ( unsigned long times = 1 ) const; /*! ensures - if (*this is currently locked and owned by the thread calling unlock) then - if (lock_count() <= times ) then - #*this is unlocked (i.e. other threads may now lock this object) - else - #*this will remain locked - #lock_count() == lock_count() - times - else - the call to unlock() has no effect !*/ private: // restricted functions rmutex(rmutex&); // copy constructor rmutex& operator=(rmutex&); // assignment operator }; // ---------------------------------------------------------------------------------------- } #endif // DLIB_RMUTEX_EXTENSIOn_ABSTRACT_ ================================================ FILE: benchmarks/dlib/threads/rsignaler_extension.h ================================================ // Copyright (C) 2006 Davis E. King (davis@dlib.net) // License: Boost Software License See LICENSE.txt for the full license. #ifndef DLIB_RSIGNALER_EXTENSIOn_ #define DLIB_RSIGNALER_EXTENSIOn_ #include "rsignaler_extension_abstract.h" #include "rmutex_extension.h" namespace dlib { // ---------------------------------------------------------------------------------------- class rsignaler { public: rsignaler ( const rmutex& associated_mutex ) : assoc_mutex(associated_mutex), s(m) {} ~rsignaler ( ) {} void wait ( ) const { m.lock(); const unsigned long lock_count = assoc_mutex.lock_count(); assoc_mutex.unlock(lock_count); s.wait(); m.unlock(); assoc_mutex.lock(lock_count); } bool wait_or_timeout ( unsigned long milliseconds ) const { m.lock(); const unsigned long lock_count = assoc_mutex.lock_count(); assoc_mutex.unlock(lock_count); bool res = s.wait_or_timeout(milliseconds); m.unlock(); assoc_mutex.lock(lock_count); return res; } void signal ( ) const { m.lock(); s.signal(); m.unlock(); } void broadcast ( ) const { m.lock(); s.broadcast(); m.unlock(); } const rmutex& get_mutex ( ) const { return assoc_mutex; } private: const rmutex& assoc_mutex; mutex m; signaler s; // restricted functions rsignaler(rsignaler&); // copy constructor rsignaler& operator=(rsignaler&); // assignment operator }; // ---------------------------------------------------------------------------------------- } #endif // DLIB_RSIGNALER_EXTENSIOn_ ================================================ FILE: benchmarks/dlib/threads/rsignaler_extension_abstract.h ================================================ // Copyright (C) 2006 Davis E. King (davis@dlib.net) // License: Boost Software License See LICENSE.txt for the full license. #undef DLIB_RSIGNALER_EXTENSIOn_ABSTRACT_ #ifdef DLIB_RSIGNALER_EXTENSIOn_ABSTRACT_ #include "threads_kernel_abstract.h" #include "rmutex_extension_abstract.h" namespace dlib { // ---------------------------------------------------------------------------------------- class rsignaler { /*! WHAT THIS OBJECT REPRESENTS This object represents an event signaling system for threads. It gives a thread the ability to wake up other threads that are waiting for a particular signal. Each rsignaler object is associated with one and only one rmutex object. More than one rsignaler object may be associated with a single rmutex but a signaler object may only be associated with a single rmutex. NOTE: You must guard against spurious wakeups. This means that a thread might return from a call to wait even if no other thread called signal. This is rare but must be guarded against. Also note that this object is identical to the signaler object except that it works with rmutex objects rather than mutex objects. !*/ public: rsignaler ( const rmutex& associated_mutex ); /*! ensures - #*this is properly initialized - #get_mutex() == associated_mutex throws - dlib::thread_error the constructor may throw this exception if there is a problem gathering resources to create the signaler. !*/ ~rsignaler ( ); /*! ensures - all resources allocated by *this have been freed !*/ void wait ( ) const; /*! requires - get_mutex() is locked and owned by the calling thread ensures - atomically unlocks get_mutex() and blocks the calling thread - calling thread may wake if another thread calls signal() or broadcast() on *this - when wait() returns the calling thread again has a lock on get_mutex() !*/ bool wait_or_timeout ( unsigned long milliseconds ) const; /*! requires - get_mutex() is locked and owned by the calling thread ensures - atomically unlocks get_mutex() and blocks the calling thread - calling thread may wake if another thread calls signal() or broadcast() on *this - after the specified number of milliseconds has elapsed the calling thread will wake once get_mutex() is free - when wait returns the calling thread again has a lock on get_mutex() - returns false if the call to wait_or_timeout timed out - returns true if the call did not time out !*/ void signal ( ) const; /*! ensures - if (at least one thread is waiting on *this) then - at least one of the waiting threads will wake !*/ void broadcast ( ) const; /*! ensures - any and all threads waiting on *this will wake !*/ const rmutex& get_mutex ( ) const; /*! ensures - returns a const reference to the rmutex associated with *this !*/ private: // restricted functions rsignaler(rsignaler&); // copy constructor rsignaler& operator=(rsignaler&); // assignment operator }; // ---------------------------------------------------------------------------------------- } #endif // DLIB_RSIGNALER_EXTENSIOn_ABSTRACT_ ================================================ FILE: benchmarks/dlib/threads/thread_function_extension.h ================================================ // Copyright (C) 2007 Davis E. King (davis@dlib.net) // License: Boost Software License See LICENSE.txt for the full license. #ifndef DLIB_THREAD_FUNCTIOn_ #define DLIB_THREAD_FUNCTIOn_ #include #include "thread_function_extension_abstract.h" #include "threads_kernel.h" #include "auto_mutex_extension.h" #include "threaded_object_extension.h" namespace dlib { // ---------------------------------------------------------------------------------------- class thread_function : private threaded_object { class base_funct { public: virtual void go() = 0; virtual ~base_funct() {} }; template class super_funct_4 : public base_funct { public: super_funct_4 ( F funct, T1 arg1, T2 arg2, T3 arg3, T4 arg4) : f(funct), a1(arg1), a2(arg2), a3(arg3), a4(arg4) { } void go() { f(a1, a2, a3, a4); } F f; T1 a1; T2 a2; T3 a3; T4 a4; }; template class super_funct_3 : public base_funct { public: super_funct_3 ( F funct, T1 arg1, T2 arg2, T3 arg3): f(funct), a1(arg1), a2(arg2), a3(arg3) { } void go() { f(a1, a2, a3); } F f; T1 a1; T2 a2; T3 a3; }; template class super_funct_2 : public base_funct { public: super_funct_2 ( F funct, T1 arg1, T2 arg2) : f(funct), a1(arg1), a2(arg2) { } void go() { f(a1, a2); } F f; T1 a1; T2 a2; }; template class super_funct_1 : public base_funct { public: super_funct_1 ( F funct, T arg) : f(funct), a(arg) { } void go() { f(a); } F f; T a; }; template class super_funct_0 : public base_funct { public: super_funct_0 ( F funct) : f(funct) { } void go() { f(); } F f; }; public: template thread_function ( F funct ) { f.reset(new super_funct_0(funct)); start(); } template thread_function ( F funct, T arg ) { f.reset(new super_funct_1(funct,arg)); start(); } template thread_function ( F funct, T1 arg1, T2 arg2 ) { f.reset(new super_funct_2(funct, arg1, arg2)); start(); } template thread_function ( F funct, T1 arg1, T2 arg2, T3 arg3 ) { f.reset(new super_funct_3(funct, arg1, arg2, arg3)); start(); } template thread_function ( F funct, T1 arg1, T2 arg2, T3 arg3, T4 arg4 ) { f.reset(new super_funct_4(funct, arg1, arg2, arg3, arg4)); start(); } ~thread_function ( ) { threaded_object::wait(); } bool is_alive ( ) const { return threaded_object::is_alive(); } void wait ( ) const { threaded_object::wait(); } private: void thread () { f->go(); } std::unique_ptr f; // restricted functions thread_function(thread_function&); // copy constructor thread_function& operator=(thread_function&); // assignment operator }; // ---------------------------------------------------------------------------------------- } #endif // DLIB_THREAD_FUNCTIOn_ ================================================ FILE: benchmarks/dlib/threads/thread_function_extension_abstract.h ================================================ // Copyright (C) 2007 Davis E. King (davis@dlib.net) // License: Boost Software License See LICENSE.txt for the full license. #undef DLIB_THREAD_FUNCTIOn_ABSTRACT_ #ifdef DLIB_THREAD_FUNCTIOn_ABSTRACT_ #include "threads_kernel_abstract.h" namespace dlib { // ---------------------------------------------------------------------------------------- class thread_function { /*! WHAT THIS OBJECT REPRESENTS This object represents a thread on a global C++ function or function object. That is, it allows you to run a function in its own thread. !*/ public: template thread_function ( F funct ); /*! ensures - #*this is properly initialized - the function funct has been started in its own thread throws - std::bad_alloc - dlib::thread_error the constructor may throw this exception if there is a problem gathering resources to create threading objects. !*/ template thread_function ( F funct, T1 arg1 ); /*! ensures - #*this is properly initialized - A thread has been created and it will call funct(arg1) throws - std::bad_alloc - dlib::thread_error the constructor may throw this exception if there is a problem gathering resources to create threading objects. !*/ template thread_function ( F funct, T1 arg1, T2 arg2 ); /*! ensures - #*this is properly initialized - A thread has been created and it will call funct(arg1, arg2) throws - std::bad_alloc - dlib::thread_error the constructor may throw this exception if there is a problem gathering resources to create threading objects. !*/ template thread_function ( F funct, T1 arg1, T2 arg2, T3 arg3 ); /*! ensures - #*this is properly initialized - A thread has been created and it will call funct(arg1, arg2, arg3) throws - std::bad_alloc - dlib::thread_error the constructor may throw this exception if there is a problem gathering resources to create threading objects. !*/ template thread_function ( F funct, T1 arg1, T2 arg2, T3 arg3, T4 arg4 ); /*! ensures - #*this is properly initialized - A thread has been created and it will call funct(arg1, arg2, arg3, arg4) throws - std::bad_alloc - dlib::thread_error the constructor may throw this exception if there is a problem gathering resources to create threading objects. !*/ ~thread_function ( ); /*! ensures - all resources allocated by *this have been freed. - blocks until is_alive() == false !*/ bool is_alive ( ) const; /*! ensures - if (this object's thread has yet to terminate) then - returns true - else - returns false !*/ void wait ( ) const; /*! ensures - if (is_alive() == true) then - blocks until this object's thread terminates !*/ private: // restricted functions thread_function(thread_function&); // copy constructor thread_function& operator=(thread_function&); // assignment operator }; // ---------------------------------------------------------------------------------------- } #endif // DLIB_THREAD_FUNCTIOn_ABSTRACT_ ================================================ FILE: benchmarks/dlib/threads/thread_pool_extension.h ================================================ // Copyright (C) 2008 Davis E. King (davis@dlib.net) // License: Boost Software License See LICENSE.txt for the full license. #ifndef DLIB_THREAD_POOl_Hh_ #define DLIB_THREAD_POOl_Hh_ #include #include #include #include "thread_pool_extension_abstract.h" #include "multithreaded_object_extension.h" #include "../member_function_pointer.h" #include "../bound_function_pointer.h" #include "threads_kernel.h" #include "auto_mutex_extension.h" #include "../uintn.h" #include "../array.h" namespace dlib { // ---------------------------------------------------------------------------------------- class thread_pool_implementation; template < typename T > class future { /*! INITIAL VALUE - task_id == 0 - tp.get() == 0 CONVENTION - is_ready() == (tp.get() == 0) - get() == var - if (tp.get() != 0) - tp == a pointer to the thread_pool_implementation that is using this future object - task_id == the task id of the task in the thread pool tp that is using this future object. !*/ public: future ( ) : task_id(0) {} future ( const T& item ) : task_id(0), var(item) {} future ( const future& item ) :task_id(0), var(item.get()) {} ~future ( ) { wait(); } future& operator=( const T& item ) { get() = item; return *this; } future& operator=( const future& item ) { get() = item.get(); return *this; } operator T& ( ) { return get(); } operator const T& ( ) const { return get(); } T& get ( ) { wait(); return var; } const T& get ( ) const { wait(); return var; } bool is_ready ( ) const { return tp.get() == 0; } private: friend class thread_pool; inline void wait () const; mutable uint64 task_id; mutable std::shared_ptr tp; T var; }; // ---------------------------------------------------------------------------------------- template inline void swap ( future& a, future& b ) { dlib::exchange(a.get(), b.get()); } // Note that dlib::exchange() just calls std::swap. I'm only using it because // this works around some bugs in certain compilers. // ---------------------------------------------------------------------------------------- template bool operator== (const future& a, const future& b) { return a.get() == b.get(); } template bool operator!= (const future& a, const future& b) { return a.get() != b.get(); } template bool operator<= (const future& a, const future& b) { return a.get() <= b.get(); } template bool operator>= (const future& a, const future& b) { return a.get() >= b.get(); } template bool operator< (const future& a, const future& b) { return a.get() < b.get(); } template bool operator> (const future& a, const future& b) { return a.get() > b.get(); } template bool operator== (const future& a, const T& b) { return a.get() == b; } template bool operator== (const T& a, const future& b) { return a == b.get(); } template bool operator!= (const future& a, const T& b) { return a.get() != b; } template bool operator!= (const T& a, const future& b) { return a != b.get(); } template bool operator<= (const future& a, const T& b) { return a.get() <= b; } template bool operator<= (const T& a, const future& b) { return a <= b.get(); } template bool operator>= (const future& a, const T& b) { return a.get() >= b; } template bool operator>= (const T& a, const future& b) { return a >= b.get(); } template bool operator< (const future& a, const T& b) { return a.get() < b; } template bool operator< (const T& a, const future& b) { return a < b.get(); } template bool operator> (const future& a, const T& b) { return a.get() > b; } template bool operator> (const T& a, const future& b) { return a > b.get(); } // ---------------------------------------------------------------------------------------- class thread_pool_implementation { /*! CONVENTION - num_threads_in_pool() == tasks.size() - if (the destructor has been called) then - we_are_destructing == true - else - we_are_destructing == false - is_task_thread() == is_worker_thread(get_thread_id()) - m == the mutex used to protect everything in this object - worker_thread_ids == an array that contains the thread ids for all the threads in the thread pool !*/ typedef bound_function_pointer::kernel_1a_c bfp_type; friend class thread_pool; explicit thread_pool_implementation ( unsigned long num_threads ); public: ~thread_pool_implementation( ); void wait_for_task ( uint64 task_id ) const; unsigned long num_threads_in_pool ( ) const; void wait_for_all_tasks ( ) const; bool is_task_thread ( ) const; template uint64 add_task ( T& obj, void (T::*funct)() ) { auto_mutex M(m); const thread_id_type my_thread_id = get_thread_id(); // find a thread that isn't doing anything long idx = find_empty_task_slot(); if (idx == -1 && is_worker_thread(my_thread_id)) { // this function is being called from within a worker thread and there // aren't any other worker threads free so just perform the task right // here M.unlock(); (obj.*funct)(); // return a task id that is both non-zero and also one // that is never normally returned. This way calls // to wait_for_task() will never block given this id. return 1; } // wait until there is a thread that isn't doing anything while (idx == -1) { task_done_signaler.wait(); idx = find_empty_task_slot(); } tasks[idx].thread_id = my_thread_id; tasks[idx].task_id = make_next_task_id(idx); tasks[idx].mfp0.set(obj,funct); task_ready_signaler.signal(); return tasks[idx].task_id; } template uint64 add_task ( T& obj, void (T::*funct)(long), long arg1 ) { auto_mutex M(m); const thread_id_type my_thread_id = get_thread_id(); // find a thread that isn't doing anything long idx = find_empty_task_slot(); if (idx == -1 && is_worker_thread(my_thread_id)) { // this function is being called from within a worker thread and there // aren't any other worker threads free so just perform the task right // here M.unlock(); (obj.*funct)(arg1); // return a task id that is both non-zero and also one // that is never normally returned. This way calls // to wait_for_task() will never block given this id. return 1; } // wait until there is a thread that isn't doing anything while (idx == -1) { task_done_signaler.wait(); idx = find_empty_task_slot(); } tasks[idx].thread_id = my_thread_id; tasks[idx].task_id = make_next_task_id(idx); tasks[idx].mfp1.set(obj,funct); tasks[idx].arg1 = arg1; task_ready_signaler.signal(); return tasks[idx].task_id; } template uint64 add_task ( T& obj, void (T::*funct)(long,long), long arg1, long arg2 ) { auto_mutex M(m); const thread_id_type my_thread_id = get_thread_id(); // find a thread that isn't doing anything long idx = find_empty_task_slot(); if (idx == -1 && is_worker_thread(my_thread_id)) { // this function is being called from within a worker thread and there // aren't any other worker threads free so just perform the task right // here M.unlock(); (obj.*funct)(arg1, arg2); // return a task id that is both non-zero and also one // that is never normally returned. This way calls // to wait_for_task() will never block given this id. return 1; } // wait until there is a thread that isn't doing anything while (idx == -1) { task_done_signaler.wait(); idx = find_empty_task_slot(); } tasks[idx].thread_id = my_thread_id; tasks[idx].task_id = make_next_task_id(idx); tasks[idx].mfp2.set(obj,funct); tasks[idx].arg1 = arg1; tasks[idx].arg2 = arg2; task_ready_signaler.signal(); return tasks[idx].task_id; } struct function_object_copy { virtual ~function_object_copy(){} }; template struct function_object_copy_instance : function_object_copy { function_object_copy_instance(const T& item_) : item(item_) {} T item; virtual ~function_object_copy_instance(){} }; uint64 add_task_internal ( const bfp_type& bfp, std::shared_ptr& item ); /*! ensures - adds a task to call the given bfp object. - swaps item into the internal task object which will have a lifetime at least as long as the running task. - returns the task id for this new task !*/ uint64 add_task_internal ( const bfp_type& bfp ) { std::shared_ptr temp; return add_task_internal(bfp, temp); } /*! ensures - adds a task to call the given bfp object. - returns the task id for this new task !*/ void shutdown_pool ( ); /*! ensures - causes all threads to terminate and blocks the caller until this happens. !*/ private: bool is_worker_thread ( const thread_id_type id ) const; /*! requires - m is locked ensures - if (thread with given id is one of the thread pool's worker threads or num_threads_in_pool() == 0) then - returns true - else - returns false !*/ void thread ( ); /*! this is the function that executes the threads in the thread pool !*/ long find_empty_task_slot ( ) const; /*! requires - m is locked ensures - if (there is currently a empty task slot) then - returns the index of that task slot in tasks - there is a task slot - else - returns -1 !*/ long find_ready_task ( ) const; /*! requires - m is locked ensures - if (there is currently a task to do) then - returns the index of that task in tasks - else - returns -1 !*/ uint64 make_next_task_id ( long idx ); /*! requires - m is locked - 0 <= idx < tasks.size() ensures - returns the next index to be used for tasks that are placed in tasks[idx] !*/ unsigned long task_id_to_index ( uint64 id ) const; /*! requires - m is locked - num_threads_in_pool() != 0 ensures - returns the index in tasks corresponding to the given id !*/ struct task_state_type { task_state_type() : is_being_processed(false), task_id(0), next_task_id(2), arg1(0), arg2(0), eptr(nullptr) {} bool is_ready () const /*! ensures - if (is_empty() == false && no thread is currently processing this task) then - returns true - else - returns false !*/ { return !is_being_processed && !is_empty(); } bool is_empty () const /*! ensures - if (this task state is empty. i.e. it doesn't contain a task to be processed) then - returns true - else - returns false !*/ { return task_id == 0; } bool is_being_processed; // true when a thread is working on this task uint64 task_id; // the id of this task. 0 means this task is empty thread_id_type thread_id; // the id of the thread that requested this task uint64 next_task_id; long arg1; long arg2; member_function_pointer<> mfp0; member_function_pointer mfp1; member_function_pointer mfp2; bfp_type bfp; std::shared_ptr function_copy; mutable std::exception_ptr eptr; // non-null if the task threw an exception void propagate_exception() const { if (eptr) { auto tmp = eptr; eptr = nullptr; std::rethrow_exception(tmp); } } }; array tasks; array worker_thread_ids; mutex m; signaler task_done_signaler; signaler task_ready_signaler; bool we_are_destructing; std::vector threads; // restricted functions thread_pool_implementation(thread_pool_implementation&); // copy constructor thread_pool_implementation& operator=(thread_pool_implementation&); // assignment operator }; // ---------------------------------------------------------------------------------------- class thread_pool { /*! This object is just a shell that holds a std::shared_ptr to the real thread_pool_implementation object. The reason for doing it this way is so that we can allow any mixture of destruction orders between thread_pool objects and futures. Whoever gets destroyed last cleans up the thread_pool_implementation resources. !*/ typedef bound_function_pointer::kernel_1a_c bfp_type; public: explicit thread_pool ( unsigned long num_threads ) { impl.reset(new thread_pool_implementation(num_threads)); } ~thread_pool ( ) { try { impl->shutdown_pool(); } catch (std::exception& e) { std::cerr << "An unhandled exception was inside a dlib::thread_pool when it was destructed." << std::endl; std::cerr << "It's what string is: \n" << e.what() << std::endl; using namespace std; assert(false); abort(); } catch (...) { std::cerr << "An unhandled exception was inside a dlib::thread_pool when it was destructed." << std::endl; using namespace std; assert(false); abort(); } } void wait_for_task ( uint64 task_id ) const { impl->wait_for_task(task_id); } unsigned long num_threads_in_pool ( ) const { return impl->num_threads_in_pool(); } void wait_for_all_tasks ( ) const { impl->wait_for_all_tasks(); } bool is_task_thread ( ) const { return impl->is_task_thread(); } template uint64 add_task ( T& obj, void (T::*funct)() ) { return impl->add_task(obj, funct); } template uint64 add_task ( T& obj, void (T::*funct)(long), long arg1 ) { return impl->add_task(obj, funct, arg1); } template uint64 add_task ( T& obj, void (T::*funct)(long,long), long arg1, long arg2 ) { return impl->add_task(obj, funct, arg1, arg2); } // -------------------- template uint64 add_task ( F& function_object ) { COMPILE_TIME_ASSERT(is_function::value == false); COMPILE_TIME_ASSERT(is_pointer_type::value == false); bfp_type temp; temp.set(function_object); uint64 id = impl->add_task_internal(temp); return id; } template uint64 add_task_by_value ( const F& function_object ) { thread_pool_implementation::function_object_copy_instance* ptr = 0; ptr = new thread_pool_implementation::function_object_copy_instance(function_object); std::shared_ptr function_copy(ptr); bfp_type temp; temp.set(ptr->item); uint64 id = impl->add_task_internal(temp, function_copy); return id; } template uint64 add_task ( const T& obj, void (T::*funct)() const ) { bfp_type temp; temp.set(obj,funct); uint64 id = impl->add_task_internal(temp); return id; } template uint64 add_task_by_value ( const T& obj, void (T::*funct)() const ) { thread_pool_implementation::function_object_copy_instance* ptr = 0; ptr = new thread_pool_implementation::function_object_copy_instance(obj); std::shared_ptr function_copy(ptr); bfp_type temp; temp.set(ptr->item,funct); uint64 id = impl->add_task_internal(temp, function_copy); return id; } template uint64 add_task_by_value ( const T& obj, void (T::*funct)() ) { thread_pool_implementation::function_object_copy_instance* ptr = 0; ptr = new thread_pool_implementation::function_object_copy_instance(obj); std::shared_ptr function_copy(ptr); bfp_type temp; temp.set(ptr->item,funct); uint64 id = impl->add_task_internal(temp, function_copy); return id; } uint64 add_task ( void (*funct)() ) { bfp_type temp; temp.set(funct); uint64 id = impl->add_task_internal(temp); return id; } // -------------------- template uint64 add_task ( F& function_object, future& arg1 ) { COMPILE_TIME_ASSERT(is_function::value == false); COMPILE_TIME_ASSERT(is_pointer_type::value == false); bfp_type temp; temp.set(function_object,arg1.get()); uint64 id = impl->add_task_internal(temp); // tie the future to this task arg1.task_id = id; arg1.tp = impl; return id; } template uint64 add_task_by_value ( const F& function_object, future& arg1 ) { thread_pool_implementation::function_object_copy_instance* ptr = 0; ptr = new thread_pool_implementation::function_object_copy_instance(function_object); std::shared_ptr function_copy(ptr); bfp_type temp; temp.set(ptr->item, arg1.get()); uint64 id = impl->add_task_internal(temp, function_copy); // tie the future to this task arg1.task_id = id; arg1.tp = impl; return id; } template uint64 add_task ( T& obj, void (T::*funct)(T1), future& arg1 ) { bfp_type temp; temp.set(obj,funct,arg1.get()); uint64 id = impl->add_task_internal(temp); // tie the future to this task arg1.task_id = id; arg1.tp = impl; return id; } template uint64 add_task_by_value ( const T& obj, void (T::*funct)(T1), future& arg1 ) { thread_pool_implementation::function_object_copy_instance* ptr = 0; ptr = new thread_pool_implementation::function_object_copy_instance(obj); std::shared_ptr function_copy(ptr); bfp_type temp; temp.set(ptr->item,funct,arg1.get()); uint64 id = impl->add_task_internal(temp, function_copy); // tie the future to this task arg1.task_id = id; arg1.tp = impl; return id; } template uint64 add_task ( const T& obj, void (T::*funct)(T1) const, future& arg1 ) { bfp_type temp; temp.set(obj,funct,arg1.get()); uint64 id = impl->add_task_internal(temp); // tie the future to this task arg1.task_id = id; arg1.tp = impl; return id; } template uint64 add_task_by_value ( const T& obj, void (T::*funct)(T1) const, future& arg1 ) { thread_pool_implementation::function_object_copy_instance* ptr = 0; ptr = new thread_pool_implementation::function_object_copy_instance(obj); std::shared_ptr function_copy(ptr); bfp_type temp; temp.set(ptr->item,funct,arg1.get()); uint64 id = impl->add_task_internal(temp, function_copy); // tie the future to this task arg1.task_id = id; arg1.tp = impl; return id; } template uint64 add_task ( void (*funct)(T1), future& arg1 ) { bfp_type temp; temp.set(funct,arg1.get()); uint64 id = impl->add_task_internal(temp); // tie the future to this task arg1.task_id = id; arg1.tp = impl; return id; } // -------------------- template uint64 add_task ( F& function_object, future& arg1, future& arg2 ) { COMPILE_TIME_ASSERT(is_function::value == false); COMPILE_TIME_ASSERT(is_pointer_type::value == false); bfp_type temp; temp.set(function_object, arg1.get(), arg2.get()); uint64 id = impl->add_task_internal(temp); // tie the future to this task arg1.task_id = id; arg1.tp = impl; arg2.task_id = id; arg2.tp = impl; return id; } template uint64 add_task_by_value ( const F& function_object, future& arg1, future& arg2 ) { thread_pool_implementation::function_object_copy_instance* ptr = 0; ptr = new thread_pool_implementation::function_object_copy_instance(function_object); std::shared_ptr function_copy(ptr); bfp_type temp; temp.set(ptr->item, arg1.get(), arg2.get()); uint64 id = impl->add_task_internal(temp, function_copy); // tie the future to this task arg1.task_id = id; arg1.tp = impl; arg2.task_id = id; arg2.tp = impl; return id; } template uint64 add_task ( T& obj, void (T::*funct)(T1,T2), future& arg1, future& arg2 ) { bfp_type temp; temp.set(obj, funct, arg1.get(), arg2.get()); uint64 id = impl->add_task_internal(temp); // tie the futures to this task arg1.task_id = id; arg1.tp = impl; arg2.task_id = id; arg2.tp = impl; return id; } template uint64 add_task_by_value ( const T& obj, void (T::*funct)(T1,T2), future& arg1, future& arg2 ) { thread_pool_implementation::function_object_copy_instance* ptr = 0; ptr = new thread_pool_implementation::function_object_copy_instance(obj); std::shared_ptr function_copy(ptr); bfp_type temp; temp.set(ptr->item, funct, arg1.get(), arg2.get()); uint64 id = impl->add_task_internal(temp, function_copy); // tie the futures to this task arg1.task_id = id; arg1.tp = impl; arg2.task_id = id; arg2.tp = impl; return id; } template uint64 add_task ( const T& obj, void (T::*funct)(T1,T2) const, future& arg1, future& arg2 ) { bfp_type temp; temp.set(obj, funct, arg1.get(), arg2.get()); uint64 id = impl->add_task_internal(temp); // tie the futures to this task arg1.task_id = id; arg1.tp = impl; arg2.task_id = id; arg2.tp = impl; return id; } template uint64 add_task_by_value ( const T& obj, void (T::*funct)(T1,T2) const, future& arg1, future& arg2 ) { thread_pool_implementation::function_object_copy_instance* ptr = 0; ptr = new thread_pool_implementation::function_object_copy_instance(obj); std::shared_ptr function_copy(ptr); bfp_type temp; temp.set(ptr->item, funct, arg1.get(), arg2.get()); uint64 id = impl->add_task_internal(temp, function_copy); // tie the futures to this task arg1.task_id = id; arg1.tp = impl; arg2.task_id = id; arg2.tp = impl; return id; } template uint64 add_task ( void (*funct)(T1,T2), future& arg1, future& arg2 ) { bfp_type temp; temp.set(funct, arg1.get(), arg2.get()); uint64 id = impl->add_task_internal(temp); // tie the futures to this task arg1.task_id = id; arg1.tp = impl; arg2.task_id = id; arg2.tp = impl; return id; } // -------------------- template uint64 add_task ( F& function_object, future& arg1, future& arg2, future& arg3 ) { COMPILE_TIME_ASSERT(is_function::value == false); COMPILE_TIME_ASSERT(is_pointer_type::value == false); bfp_type temp; temp.set(function_object, arg1.get(), arg2.get(), arg3.get()); uint64 id = impl->add_task_internal(temp); // tie the future to this task arg1.task_id = id; arg1.tp = impl; arg2.task_id = id; arg2.tp = impl; arg3.task_id = id; arg3.tp = impl; return id; } template uint64 add_task_by_value ( const F& function_object, future& arg1, future& arg2, future& arg3 ) { thread_pool_implementation::function_object_copy_instance* ptr = 0; ptr = new thread_pool_implementation::function_object_copy_instance(function_object); std::shared_ptr function_copy(ptr); bfp_type temp; temp.set(ptr->item, arg1.get(), arg2.get(), arg3.get()); uint64 id = impl->add_task_internal(temp, function_copy); // tie the future to this task arg1.task_id = id; arg1.tp = impl; arg2.task_id = id; arg2.tp = impl; arg3.task_id = id; arg3.tp = impl; return id; } template uint64 add_task ( T& obj, void (T::*funct)(T1,T2,T3), future& arg1, future& arg2, future& arg3 ) { bfp_type temp; temp.set(obj, funct, arg1.get(), arg2.get(), arg3.get()); uint64 id = impl->add_task_internal(temp); // tie the futures to this task arg1.task_id = id; arg1.tp = impl; arg2.task_id = id; arg2.tp = impl; arg3.task_id = id; arg3.tp = impl; return id; } template uint64 add_task_by_value ( const T& obj, void (T::*funct)(T1,T2,T3), future& arg1, future& arg2, future& arg3 ) { thread_pool_implementation::function_object_copy_instance* ptr = 0; ptr = new thread_pool_implementation::function_object_copy_instance(obj); std::shared_ptr function_copy(ptr); bfp_type temp; temp.set(ptr->item, funct, arg1.get(), arg2.get(), arg3.get()); uint64 id = impl->add_task_internal(temp, function_copy); // tie the futures to this task arg1.task_id = id; arg1.tp = impl; arg2.task_id = id; arg2.tp = impl; arg3.task_id = id; arg3.tp = impl; return id; } template uint64 add_task ( const T& obj, void (T::*funct)(T1,T2,T3) const, future& arg1, future& arg2, future& arg3 ) { bfp_type temp; temp.set(obj, funct, arg1.get(), arg2.get(), arg3.get()); uint64 id = impl->add_task_internal(temp); // tie the futures to this task arg1.task_id = id; arg1.tp = impl; arg2.task_id = id; arg2.tp = impl; arg3.task_id = id; arg3.tp = impl; return id; } template uint64 add_task_by_value ( const T& obj, void (T::*funct)(T1,T2,T3) const, future& arg1, future& arg2, future& arg3 ) { thread_pool_implementation::function_object_copy_instance* ptr = 0; ptr = new thread_pool_implementation::function_object_copy_instance(obj); std::shared_ptr function_copy(ptr); bfp_type temp; temp.set(ptr->item, funct, arg1.get(), arg2.get(), arg3.get()); uint64 id = impl->add_task_internal(temp, function_copy); // tie the futures to this task arg1.task_id = id; arg1.tp = impl; arg2.task_id = id; arg2.tp = impl; arg3.task_id = id; arg3.tp = impl; return id; } template uint64 add_task ( void (*funct)(T1,T2,T3), future& arg1, future& arg2, future& arg3 ) { bfp_type temp; temp.set(funct, arg1.get(), arg2.get(), arg3.get()); uint64 id = impl->add_task_internal(temp); // tie the futures to this task arg1.task_id = id; arg1.tp = impl; arg2.task_id = id; arg2.tp = impl; arg3.task_id = id; arg3.tp = impl; return id; } // -------------------- template uint64 add_task ( F& function_object, future& arg1, future& arg2, future& arg3, future& arg4 ) { COMPILE_TIME_ASSERT(is_function::value == false); COMPILE_TIME_ASSERT(is_pointer_type::value == false); bfp_type temp; temp.set(function_object, arg1.get(), arg2.get(), arg3.get(), arg4.get()); uint64 id = impl->add_task_internal(temp); // tie the future to this task arg1.task_id = id; arg1.tp = impl; arg2.task_id = id; arg2.tp = impl; arg3.task_id = id; arg3.tp = impl; arg4.task_id = id; arg4.tp = impl; return id; } template uint64 add_task_by_value ( const F& function_object, future& arg1, future& arg2, future& arg3, future& arg4 ) { thread_pool_implementation::function_object_copy_instance* ptr = 0; ptr = new thread_pool_implementation::function_object_copy_instance(function_object); std::shared_ptr function_copy(ptr); bfp_type temp; temp.set(ptr->item, arg1.get(), arg2.get(), arg3.get(), arg4.get()); uint64 id = impl->add_task_internal(temp, function_copy); // tie the future to this task arg1.task_id = id; arg1.tp = impl; arg2.task_id = id; arg2.tp = impl; arg3.task_id = id; arg3.tp = impl; arg4.task_id = id; arg4.tp = impl; return id; } template uint64 add_task ( T& obj, void (T::*funct)(T1,T2,T3,T4), future& arg1, future& arg2, future& arg3, future& arg4 ) { bfp_type temp; temp.set(obj, funct, arg1.get(), arg2.get(), arg3.get(), arg4.get()); uint64 id = impl->add_task_internal(temp); // tie the futures to this task arg1.task_id = id; arg1.tp = impl; arg2.task_id = id; arg2.tp = impl; arg3.task_id = id; arg3.tp = impl; arg4.task_id = id; arg4.tp = impl; return id; } template uint64 add_task_by_value ( const T& obj, void (T::*funct)(T1,T2,T3,T4), future& arg1, future& arg2, future& arg3, future& arg4 ) { thread_pool_implementation::function_object_copy_instance* ptr = 0; ptr = new thread_pool_implementation::function_object_copy_instance(obj); std::shared_ptr function_copy(ptr); bfp_type temp; temp.set(ptr->item, funct, arg1.get(), arg2.get(), arg3.get(), arg4.get()); uint64 id = impl->add_task_internal(temp, function_copy); // tie the futures to this task arg1.task_id = id; arg1.tp = impl; arg2.task_id = id; arg2.tp = impl; arg3.task_id = id; arg3.tp = impl; arg4.task_id = id; arg4.tp = impl; return id; } template uint64 add_task ( const T& obj, void (T::*funct)(T1,T2,T3,T4) const, future& arg1, future& arg2, future& arg3, future& arg4 ) { bfp_type temp; temp.set(obj, funct, arg1.get(), arg2.get(), arg3.get(), arg4.get()); uint64 id = impl->add_task_internal(temp); // tie the futures to this task arg1.task_id = id; arg1.tp = impl; arg2.task_id = id; arg2.tp = impl; arg3.task_id = id; arg3.tp = impl; arg4.task_id = id; arg4.tp = impl; return id; } template uint64 add_task_by_value ( const T& obj, void (T::*funct)(T1,T2,T3,T4) const, future& arg1, future& arg2, future& arg3, future& arg4 ) { thread_pool_implementation::function_object_copy_instance* ptr = 0; ptr = new thread_pool_implementation::function_object_copy_instance(obj); std::shared_ptr function_copy(ptr); bfp_type temp; temp.set(ptr->item, funct, arg1.get(), arg2.get(), arg3.get(), arg4.get()); uint64 id = impl->add_task_internal(temp, function_copy); // tie the futures to this task arg1.task_id = id; arg1.tp = impl; arg2.task_id = id; arg2.tp = impl; arg3.task_id = id; arg3.tp = impl; arg4.task_id = id; arg4.tp = impl; return id; } template uint64 add_task ( void (*funct)(T1,T2,T3,T4), future& arg1, future& arg2, future& arg3, future& arg4 ) { bfp_type temp; temp.set(funct, arg1.get(), arg2.get(), arg3.get(), arg4.get()); uint64 id = impl->add_task_internal(temp); // tie the futures to this task arg1.task_id = id; arg1.tp = impl; arg2.task_id = id; arg2.tp = impl; arg3.task_id = id; arg3.tp = impl; arg4.task_id = id; arg4.tp = impl; return id; } private: std::shared_ptr impl; // restricted functions thread_pool(thread_pool&); // copy constructor thread_pool& operator=(thread_pool&); // assignment operator }; // ---------------------------------------------------------------------------------------- template void future:: wait ( ) const { if (tp) { tp->wait_for_task(task_id); tp.reset(); task_id = 0; } } } // ---------------------------------------------------------------------------------------- #ifdef NO_MAKEFILE #include "thread_pool_extension.cpp" #endif #endif // DLIB_THREAD_POOl_Hh_ ================================================ FILE: benchmarks/dlib/threads/thread_pool_extension_abstract.h ================================================ // Copyright (C) 2008 Davis E. King (davis@dlib.net) // License: Boost Software License See LICENSE.txt for the full license. #undef DLIB_THREAD_POOl_ABSTRACT_Hh_ #ifdef DLIB_THREAD_POOl_ABSTRACT_Hh_ #include "threads_kernel_abstract.h" #include "../uintn.h" namespace dlib { // ---------------------------------------------------------------------------------------- template < typename T > class future { /*! INITIAL VALUE - is_ready() == true WHAT THIS OBJECT REPRESENTS This object represents a container that allows you to safely pass objects into the tasks performed by the thread_pool object defined below. An example will make it clear: // Suppose you have a global function defined as follows void add (int a, int b, int& result) { result = a + b; } // Also suppose you have a thread_pool named tp defined somewhere. // Then you could do the following. future a, b, result; a = 3; b = 4; // this function call causes another thread to execute a call to the add() function // and passes in the int objects contained in a, b, and result tp.add_task(add,a,b,result); // This line will wait for the task in the thread pool to finish and then print the // value in the result integer. So it will print a 7. cout << result << endl; !*/ public: future ( ); /*! ensures - The object of type T contained in this future has an initial value for its type. - #is_ready() == true !*/ future ( const T& item ); /*! ensures - #get() == item - #is_ready() == true !*/ future ( const future& item ); /*! ensures - if (item.is_ready() == false) then - the call to this function blocks until the thread processing the task related to the item future has finished. - #is_ready() == true - #item.is_ready() == true - #get() == item.get() !*/ ~future ( ); /*! ensures - if (is_ready() == false) then - the call to this function blocks until the thread processing the task related to this future has finished. !*/ bool is_ready ( ) const; /*! ensures - if (the value of this future may not yet be ready to be accessed because it is in use by a task in a thread_pool) then - returns false - else - returns true !*/ future& operator=( const T& item ); /*! ensures - if (is_ready() == false) then - the call to this function blocks until the thread processing the task related to this future has finished. - #is_ready() == true - #get() == item - returns *this !*/ future& operator=( const future& item ); /*! ensures - if (is_ready() == false || item.is_ready() == false) then - the call to this function blocks until the threads processing the tasks related to this future and the item future have finished. - #is_ready() == true - #item.is_ready() == true - #get() == item.get() - returns *this !*/ operator T& ( ); /*! ensures - if (is_ready() == false) then - the call to this function blocks until the thread processing the task related to this future has finished. - #is_ready() == true - returns get() !*/ operator const T& ( ) const; /*! ensures - if (is_ready() == false) then - the call to this function blocks until the thread processing the task related to this future has finished. - #is_ready() == true - returns get() !*/ T& get ( ); /*! ensures - if (is_ready() == false) then - the call to this function blocks until the thread processing the task related to this future has finished. - #is_ready() == true - returns a non-const reference to the object of type T contained inside this future !*/ const T& get ( ) const; /*! ensures - if (is_ready() == false) then - the call to this function blocks until the thread processing the task related to this future has finished. - #is_ready() == true - returns a const reference to the object of type T contained inside this future !*/ }; // ---------------------------------------------------------------------------------------- template inline void swap ( future& a, future& b ) { std::swap(a.get(), b.get()); } /*! provides a global swap function !*/ // ---------------------------------------------------------------------------------------- // The future object comes with overloads for all the usual comparison operators. template bool operator== (const future& a, const future& b) { return a.get() == b.get(); } template bool operator!= (const future& a, const future& b) { return a.get() != b.get(); } template bool operator<= (const future& a, const future& b) { return a.get() <= b.get(); } template bool operator>= (const future& a, const future& b) { return a.get() >= b.get(); } template bool operator< (const future& a, const future& b) { return a.get() < b.get(); } template bool operator> (const future& a, const future& b) { return a.get() > b.get(); } template bool operator== (const future& a, const T& b) { return a.get() == b; } template bool operator== (const T& a, const future& b) { return a == b.get(); } template bool operator!= (const future& a, const T& b) { return a.get() != b; } template bool operator!= (const T& a, const future& b) { return a != b.get(); } template bool operator<= (const future& a, const T& b) { return a.get() <= b; } template bool operator<= (const T& a, const future& b) { return a <= b.get(); } template bool operator>= (const future& a, const T& b) { return a.get() >= b; } template bool operator>= (const T& a, const future& b) { return a >= b.get(); } template bool operator< (const future& a, const T& b) { return a.get() < b; } template bool operator< (const T& a, const future& b) { return a < b.get(); } template bool operator> (const future& a, const T& b) { return a.get() > b; } template bool operator> (const T& a, const future& b) { return a > b.get(); } // ---------------------------------------------------------------------------------------- class thread_pool { /*! WHAT THIS OBJECT REPRESENTS This object represents a fixed size group of threads which you can submit tasks to and then wait for those tasks to be completed. Note that setting the number of threads to 0 is a valid way to use this object. It causes it to not contain any threads at all. When tasks are submitted to the object in this mode the tasks are processed within the calling thread. So in this mode any thread that calls add_task() is considered to be a thread_pool thread capable of executing tasks. This object is also implemented such that no memory allocations occur after the thread_pool has been constructed so long as the user doesn't call any of the add_task_by_value() routines. The future object also doesn't perform any memory allocations or contain any system resources such as mutex objects. EXCEPTIONS Note that if an exception is thrown inside a task thread and is not caught then the exception will be trapped inside the thread pool and rethrown at a later time when someone calls one of the add task or wait member functions of the thread pool. This allows exceptions to propagate out of task threads and into the calling code where they can be handled. !*/ public: explicit thread_pool ( unsigned long num_threads ); /*! ensures - #num_threads_in_pool() == num_threads throws - std::bad_alloc - dlib::thread_error the constructor may throw this exception if there is a problem gathering resources to create threading objects. !*/ ~thread_pool( ); /*! ensures - blocks until all tasks in the pool have finished. - If one of the threads has generated an exception but it hasn't yet been rethrown to the caller (e.g. by calling wait_for_all_tasks()) then the program will be terminated. So make sure you handle all the possible exceptions from your tasks. !*/ bool is_task_thread ( ) const; /*! ensures - if (the thread calling this function is one of the threads in this thread pool or num_threads_in_pool() == 0) then - returns true - else - returns false !*/ unsigned long num_threads_in_pool ( ) const; /*! ensures - returns the number of threads contained in this thread pool. That is, returns the maximum number of tasks that this object will process concurrently. !*/ template uint64 add_task_by_value ( const F& function_object ); /*! requires - function_object() is a valid expression ensures - makes a copy of function_object, call it FCOPY. - if (is_task_thread() == true and there aren't any free threads available) then - calls FCOPY() within the calling thread and returns when it finishes - else - the call to this function blocks until there is a free thread in the pool to process this new task. Once a free thread is available the task is handed off to that thread which then calls FCOPY(). - returns a task id that can be used by this->wait_for_task() to wait for the submitted task to finish. !*/ template uint64 add_task ( T& obj, void (T::*funct)() ); /*! requires - funct == a valid member function pointer for class T - obj will not go out of scope until after the task has completed (i.e. this function passes obj to the task by reference. If you want to avoid this restriction then use add_task_by_value()) ensures - if (is_task_thread() == true and there aren't any free threads available) then - calls (obj.*funct)() within the calling thread and returns when it finishes. - else - the call to this function blocks until there is a free thread in the pool to process this new task. Once a free thread is available the task is handed off to that thread which then calls (obj.*funct)() - returns a task id that can be used by this->wait_for_task() to wait for the submitted task to finish. !*/ template uint64 add_task_by_value ( const T& obj, void (T::*funct)() ); /*! requires - funct == a valid member function pointer for class T ensures - makes a copy of obj, call it OBJ_COPY. - if (is_task_thread() == true and there aren't any free threads available) then - calls (OBJ_COPY.*funct)() within the calling thread and returns when it finishes. - else - the call to this function blocks until there is a free thread in the pool to process this new task. Once a free thread is available the task is handed off to that thread which then calls (OBJ_COPY.*funct)(). - returns a task id that can be used by this->wait_for_task() to wait for the submitted task to finish. !*/ template uint64 add_task ( T& obj, void (T::*funct)(long), long arg1 ); /*! requires - funct == a valid member function pointer for class T - obj will not go out of scope until after the task has completed (i.e. this function passes obj to the task by reference. If you want to avoid this restriction then use add_task_by_value()) ensures - if (is_task_thread() == true and there aren't any free threads available) then - calls (obj.*funct)(arg1) within the calling thread and returns when it finishes - else - the call to this function blocks until there is a free thread in the pool to process this new task. Once a free thread is available the task is handed off to that thread which then calls (obj.*funct)(arg1) - returns a task id that can be used by this->wait_for_task() to wait for the submitted task to finish. !*/ template uint64 add_task ( T& obj, void (T::*funct)(long,long), long arg1, long arg2 ); /*! requires - funct == a valid member function pointer for class T - obj will not go out of scope until after the task has completed (i.e. this function passes obj to the task by reference. If you want to avoid this restriction then use add_task_by_value()) ensures - if (is_task_thread() == true and there aren't any free threads available) then - calls (obj.*funct)(arg1,arg2) within the calling thread and returns when it finishes - else - the call to this function blocks until there is a free thread in the pool to process this new task. Once a free thread is available the task is handed off to that thread which then calls (obj.*funct)(arg1,arg2) - returns a task id that can be used by this->wait_for_task() to wait for the submitted task to finish. !*/ void wait_for_task ( uint64 task_id ) const; /*! ensures - if (there is currently a task with the given id being executed in the thread pool) then - the call to this function blocks until the task with the given id is complete - else - the call to this function returns immediately !*/ void wait_for_all_tasks ( ) const; /*! ensures - the call to this function blocks until all tasks which were submitted to the thread pool by the thread that is calling this function have finished. !*/ // -------------------- template uint64 add_task ( F& function_object, future& arg1 ); /*! requires - function_object(arg1.get()) is a valid expression (i.e. The A1 type stored in the future must be a type that can be passed into the given function object) - function_object will not go out of scope until after the task has completed (i.e. this function passes function_object to the task by reference. If you want to avoid this restriction then use add_task_by_value()) ensures - if (is_task_thread() == true and there aren't any free threads available) then - calls function_object(arg1.get()) within the calling thread and returns when it finishes - else - the call to this function blocks until there is a free thread in the pool to process this new task. Once a free thread is available the task is handed off to that thread which then calls function_object(arg1.get()). - #arg1.is_ready() == false - returns a task id that can be used by this->wait_for_task() to wait for the submitted task to finish. !*/ template uint64 add_task_by_value ( const F& function_object, future& arg1 ); /*! requires - function_object(arg1.get()) is a valid expression (i.e. The A1 type stored in the future must be a type that can be passed into the given function object) ensures - makes a copy of function_object, call it FCOPY. - if (is_task_thread() == true and there aren't any free threads available) then - calls FCOPY(arg1.get()) within the calling thread and returns when it finishes - else - the call to this function blocks until there is a free thread in the pool to process this new task. Once a free thread is available the task is handed off to that thread which then calls FCOPY(arg1.get()). - #arg1.is_ready() == false - returns a task id that can be used by this->wait_for_task() to wait for the submitted task to finish. !*/ template uint64 add_task ( T& obj, void (T::*funct)(T1), future& arg1 ); /*! requires - funct == a valid member function pointer for class T - (obj.*funct)(arg1.get()) must be a valid expression. (i.e. The A1 type stored in the future must be a type that can be passed into the given function) - obj will not go out of scope until after the task has completed (i.e. this function passes obj to the task by reference. If you want to avoid this restriction then use add_task_by_value()) ensures - if (is_task_thread() == true and there aren't any free threads available) then - calls (obj.*funct)(arg1.get()) within the calling thread and returns when it finishes - else - the call to this function blocks until there is a free thread in the pool to process this new task. Once a free thread is available the task is handed off to that thread which then calls (obj.*funct)(arg1.get()). - #arg1.is_ready() == false - returns a task id that can be used by this->wait_for_task() to wait for the submitted task to finish. !*/ template uint64 add_task_by_value ( const T& obj, void (T::*funct)(T1), future& arg1 ); /*! requires - funct == a valid member function pointer for class T - (obj.*funct)(arg1.get()) must be a valid expression. (i.e. The A1 type stored in the future must be a type that can be passed into the given function) ensures - makes a copy of obj, call it OBJ_COPY. - if (is_task_thread() == true and there aren't any free threads available) then - calls (OBJ_COPY.*funct)(arg1.get()) within the calling thread and returns when it finishes. - else - the call to this function blocks until there is a free thread in the pool to process this new task. Once a free thread is available the task is handed off to that thread which then calls (OBJ_COPY.*funct)(arg1.get()). - returns a task id that can be used by this->wait_for_task() to wait for the submitted task to finish. !*/ template uint64 add_task ( const T& obj, void (T::*funct)(T1) const, future& arg1 ); /*! requires - funct == a valid member function pointer for class T - (obj.*funct)(arg1.get()) must be a valid expression. (i.e. The A1 type stored in the future must be a type that can be passed into the given function) - obj will not go out of scope until after the task has completed (i.e. this function passes obj to the task by reference. If you want to avoid this restriction then use add_task_by_value()) ensures - if (is_task_thread() == true and there aren't any free threads available) then - calls (obj.*funct)(arg1.get()) within the calling thread and returns when it finishes - else - the call to this function blocks until there is a free thread in the pool to process this new task. Once a free thread is available the task is handed off to that thread which then calls (obj.*funct)(arg1.get()). - #arg1.is_ready() == false - returns a task id that can be used by this->wait_for_task() to wait for the submitted task to finish. !*/ template uint64 add_task_by_value ( const T& obj, void (T::*funct)(T1) const, future& arg1 ); /*! requires - funct == a valid member function pointer for class T - (obj.*funct)(arg1.get()) must be a valid expression. (i.e. The A1 type stored in the future must be a type that can be passed into the given function) ensures - makes a copy of obj, call it OBJ_COPY. - if (is_task_thread() == true and there aren't any free threads available) then - calls (OBJ_COPY.*funct)(arg1.get()) within the calling thread and returns when it finishes. - else - the call to this function blocks until there is a free thread in the pool to process this new task. Once a free thread is available the task is handed off to that thread which then calls (OBJ_COPY.*funct)(arg1.get()). - returns a task id that can be used by this->wait_for_task() to wait for the submitted task to finish. !*/ template uint64 add_task ( void (*funct)(T1), future& arg1 ); /*! requires - funct == a valid function pointer - (funct)(arg1.get()) must be a valid expression. (i.e. The A1 type stored in the future must be a type that can be passed into the given function) ensures - if (is_task_thread() == true and there aren't any free threads available) then - calls funct(arg1.get()) within the calling thread and returns when it finishes - else - the call to this function blocks until there is a free thread in the pool to process this new task. Once a free thread is available the task is handed off to that thread which then calls funct(arg1.get()). - #arg1.is_ready() == false - returns a task id that can be used by this->wait_for_task() to wait for the submitted task to finish. !*/ // -------------------------------------------------------------------------------- // The remainder of this class just contains overloads for add_task() and add_task_by_value() // that take up to 4 futures (as well as 0 futures). Their behavior is identical to the above // add_task() and add_task_by_value() functions. // -------------------------------------------------------------------------------- template uint64 add_task ( F& function_object, future& arg1, future& arg2 ); template uint64 add_task_by_value ( const F& function_object, future& arg1, future& arg2 ); template uint64 add_task ( T& obj, void (T::*funct)(T1,T2), future& arg1, future& arg2 ); uint64 add_task_by_value ( const T& obj, void (T::*funct)(T1,T2), future& arg1, future& arg2 ); template uint64 add_task ( const T& obj, void (T::*funct)(T1,T2) const, future& arg1, future& arg2 ); template uint64 add_task_by_value ( const T& obj, void (T::*funct)(T1,T2) const, future& arg1, future& arg2 ); template uint64 add_task ( void (*funct)(T1,T2), future& arg1, future& arg2 ); // -------------------- template uint64 add_task ( F& function_object, future& arg1, future& arg2, future& arg3 ); template uint64 add_task_by_value ( const F& function_object, future& arg1, future& arg2, future& arg3 ); template uint64 add_task ( T& obj, void (T::*funct)(T1,T2,T3), future& arg1, future& arg2, future& arg3 ); template uint64 add_task_by_value ( const T& obj, void (T::*funct)(T1,T2,T3), future& arg1, future& arg2, future& arg3 ); template uint64 add_task ( const T& obj, void (T::*funct)(T1,T2,T3) const, future& arg1, future& arg2, future& arg3 ); template uint64 add_task_by_value ( const T& obj, void (T::*funct)(T1,T2,T3) const, future& arg1, future& arg2, future& arg3 ); template uint64 add_task ( void (*funct)(T1,T2,T3), future& arg1, future& arg2, future& arg3 ); // -------------------- template uint64 add_task ( F& function_object, future& arg1, future& arg2, future& arg3, future& arg4 ); template uint64 add_task_by_value ( const F& function_object, future& arg1, future& arg2, future& arg3, future& arg4 ); template uint64 add_task ( T& obj, void (T::*funct)(T1,T2,T3,T4), future& arg1, future& arg2, future& arg3, future& arg4 ); template uint64 add_task_by_value ( const T& obj, void (T::*funct)(T1,T2,T3,T4), future& arg1, future& arg2, future& arg3, future& arg4 ); template uint64 add_task ( const T& obj, void (T::*funct)(T1,T2,T3,T4) const, future& arg1, future& arg2, future& arg3, future& arg4 ); template uint64 add_task_by_value ( const T& obj, void (T::*funct)(T1,T2,T3,T4) const, future& arg1, future& arg2, future& arg3, future& arg4 ); template uint64 add_task ( void (*funct)(T1,T2,T3,T4), future& arg1, future& arg2, future& arg3, future& arg4 ); // -------------------- template uint64 add_task ( F& function_object ); template uint64 add_task ( const T& obj, void (T::*funct)() const, ); template uint64 add_task_by_value ( const T& obj, void (T::*funct)() const ); uint64 add_task ( void (*funct)() ); // -------------------- private: // restricted functions thread_pool(thread_pool&); // copy constructor thread_pool& operator=(thread_pool&); // assignment operator }; } // ---------------------------------------------------------------------------------------- #endif // DLIB_THREAD_POOl_ABSTRACT_Hh_ ================================================ FILE: benchmarks/dlib/threads/thread_specific_data_extension.h ================================================ // Copyright (C) 2006 Davis E. King (davis@dlib.net) // License: Boost Software License See LICENSE.txt for the full license. #ifndef DLIB_THREAD_SPECIFIC_DATA_EXTENSIOn_ #define DLIB_THREAD_SPECIFIC_DATA_EXTENSIOn_ #include "thread_specific_data_extension_abstract.h" #include "threads_kernel_abstract.h" #include "../binary_search_tree.h" #include "auto_mutex_extension.h" namespace dlib { // ---------------------------------------------------------------------------------------- template < typename T > class thread_specific_data { /*! CONVENTION - for all valid ID: (*items[ID]) == pointer to the data for thread with id ID !*/ public: thread_specific_data ( ) { thread_end_handler_calls_left = 0; } ~thread_specific_data ( ) { // We should only call the unregister_thread_end_handler function if there are // some outstanding callbacks we expect to get. Otherwise lets avoid calling it // since the dlib state that maintains the registered thread end handlers may have // been destructed already (since the program might be in the process of terminating). bool call_unregister = false; m.lock(); if (thread_end_handler_calls_left > 0) call_unregister = true; m.unlock(); if (call_unregister) unregister_thread_end_handler(const_cast(*this),&thread_specific_data::thread_end_handler); auto_mutex M(m); items.reset(); while (items.move_next()) { delete items.element().value(); } } inline T& data ( ) { return get_data(); } inline const T& data ( ) const { return get_data(); } private: T& get_data ( ) const { thread_id_type id = get_thread_id(); auto_mutex M(m); T** item = items[id]; if (item) { return **item; } else { // register an end handler for this thread so long as it is a dlib created thread. T* new_item = new T; bool in_tree = false; try { T* temp_item = new_item; thread_id_type temp_id = id; items.add(temp_id,temp_item); in_tree = true; if (is_dlib_thread(id)) { register_thread_end_handler(const_cast(*this),&thread_specific_data::thread_end_handler); ++thread_end_handler_calls_left; } } catch (...) { if (in_tree) { items.destroy(id); } delete new_item; throw; } return *new_item; } } void thread_end_handler ( ) { const thread_id_type id = get_thread_id(); thread_id_type junk = 0; T* item = 0; auto_mutex M(m); --thread_end_handler_calls_left; if (items[id]) { items.remove(id,junk,item); delete item; } } mutable typename binary_search_tree::kernel_2a items; mutex m; mutable long thread_end_handler_calls_left; // restricted functions thread_specific_data(thread_specific_data&); // copy constructor thread_specific_data& operator=(thread_specific_data&); // assignment operator }; // ---------------------------------------------------------------------------------------- } #endif // DLIB_THREAD_SPECIFIC_DATA_EXTENSIOn_ ================================================ FILE: benchmarks/dlib/threads/thread_specific_data_extension_abstract.h ================================================ // Copyright (C) 2006 Davis E. King (davis@dlib.net) // License: Boost Software License See LICENSE.txt for the full license. #undef DLIB_THREAD_SPECIFIC_DATA_EXTENSIOn_ABSTRACT_ #ifdef DLIB_THREAD_SPECIFIC_DATA_EXTENSIOn_ABSTRACT_ #include "threads_kernel_abstract.h" namespace dlib { // ---------------------------------------------------------------------------------------- template < typename T > class thread_specific_data { /*! WHAT THIS OBJECT REPRESENTS This object represents a container of thread specific data. When a thread calls the data() member function it gets a reference to a T object that is specific to its own thread. Each subsequent call to data() from that thread returns the same instance. Also note that when a thread ends the instance of its data() object gets destroyed and freed (if the thread was created by the dlib library). So any pointers or references to the object will be invalid after the thread has ended. !*/ public: thread_specific_data ( ); /*! ensures - #*this is properly initialized !*/ ~thread_specific_data ( ); /*! ensures - all resources allocated by *this have been freed. This includes all the thread specific data returned by the data() functions. !*/ T& data ( ); /*! ensures - if (the calling thread has NOT called this->data() before) then - constructs an instance of T that is specific to the calling thread. - returns a reference to the T instance that was constructed for the calling thread. throws - std::bad_alloc or any exception thrown by T's constructor If an exception is thrown then the call to data() will have no effect on *this. !*/ const T& data ( ) const; /*! ensures - if (the calling thread has NOT called this->data() before) then - constructs an instance of T that is specific to the calling thread. - returns a const reference to the T instance that was constructed for the calling thread. throws - std::bad_alloc or any exception thrown by T's constructor If an exception is thrown then the call to data() will have no effect on *this. !*/ private: // restricted functions thread_specific_data(thread_specific_data&); // copy constructor thread_specific_data& operator=(thread_specific_data&); // assignment operator }; // ---------------------------------------------------------------------------------------- } #endif // DLIB_THREAD_SPECIFIC_DATA_EXTENSIOn_ABSTRACT_ ================================================ FILE: benchmarks/dlib/threads/threaded_object_extension.h ================================================ // Copyright (C) 2007 Davis E. King (davis@dlib.net) // License: Boost Software License See LICENSE.txt for the full license. #ifndef DLIB_THREADED_OBJECT_EXTENSIOn_ #define DLIB_THREADED_OBJECT_EXTENSIOn_ #include "threaded_object_extension_abstract.h" #include "threads_kernel.h" #include "auto_mutex_extension.h" #include "../algs.h" #include "../assert.h" namespace dlib { // ---------------------------------------------------------------------------------------- class threaded_object { /*! INITIAL VALUE - is_running_ == false - is_alive_ == false - should_stop_ == false - should_respawn_ == false #ifdef ENABLE_ASSERTS - id_valid == false - id1 == get_main_thread_id() #endif CONVENTION - is_running() == is_running_ - is_alive() == is_alive_ - should_stop() == should_stop_ - should_respawn() == should_respawn_ #ifdef ENABLE_ASSERTS - if (when thread() is executing) then - id1 == the id of the running thread - id_valid == true - else - id1 == an undefined value - id_valid == false #endif - m_ == the mutex used to protect all our variables - s == the signaler for m_ !*/ public: threaded_object ( ); virtual ~threaded_object ( ); bool is_running ( ) const; bool is_alive ( ) const; void wait ( ) const; void start ( ); void restart ( ); void set_respawn ( ); bool should_respawn ( ) const; void pause ( ); void stop ( ); protected: bool should_stop ( ) const; private: void thread_helper( ); virtual void thread ( ) = 0; mutex m_; signaler s; thread_id_type id1; bool is_running_; bool is_alive_; bool should_stop_; bool should_respawn_; bool id_valid; // restricted functions threaded_object(threaded_object&); // copy constructor threaded_object& operator=(threaded_object&); // assignment operator }; // ---------------------------------------------------------------------------------------- } #ifdef NO_MAKEFILE #include "threaded_object_extension.cpp" #endif #endif // DLIB_THREADED_OBJECT_EXTENSIOn_ ================================================ FILE: benchmarks/dlib/threads/threaded_object_extension_abstract.h ================================================ // Copyright (C) 2007 Davis E. King (davis@dlib.net) // License: Boost Software License See LICENSE.txt for the full license. #undef DLIB_THREADED_OBJECT_EXTENSIOn_ABSTRACT_ #ifdef DLIB_THREADED_OBJECT_EXTENSIOn_ABSTRACT_ #include "threads_kernel_abstract.h" namespace dlib { // ---------------------------------------------------------------------------------------- class threaded_object { /*! INITIAL VALUE - is_running() == false - is_alive() == false - should_respawn() == false WHAT THIS OBJECT REPRESENTS This object represents a simple threaded object. To use it you inherit from it and define the thread() function. Then when you call start() it will spawn a thread that calls this->thread(). !*/ public: threaded_object ( ); /*! ensures - #*this is properly initialized throws - std::bad_alloc - dlib::thread_error the constructor may throw this exception if there is a problem gathering resources to create threading objects. !*/ virtual ~threaded_object ( ); /*! requires - is_alive() == false (i.e. in the destructor for the object you derive from this one you must wait for this->thread() to end.) ensures - all resources allocated by *this have been freed. !*/ bool is_running ( ) const; /*! requires - is not called from this->thread() ensures - if (is_alive() && this->thread() is currently supposed to be executing) then - returns true - else - returns false !*/ bool is_alive ( ) const; /*! requires - is not called from this->thread() ensures - if (this->thread() has been called by some thread and has yet to terminate) then - returns true - else - returns false !*/ void wait ( ) const; /*! requires - is not called from this->thread() ensures - if (is_alive() == true) then - blocks until this->thread() terminates !*/ void start ( ); /*! requires - is not called from this->thread() ensures - #is_alive() == true - #is_running() == true - #should_stop() == false throws - std::bad_alloc or dlib::thread_error If either of these exceptions are thrown then #is_alive() == false and #is_running() == false !*/ void set_respawn ( ); /*! requires - is not called from this->thread() ensures - #should_respawn() == true !*/ bool should_respawn ( ) const; /*! requires - is not called from this->thread() ensures - returns true if the thread will automatically restart upon termination and false otherwise. Note that every time a thread starts it sets should_respawn() back to false. Therefore, a single call to set_respawn() can cause at most one respawn to occur. !*/ void restart ( ); /*! requires - is not called from this->thread() ensures - This function atomically executes set_respawn() and start(). The precise meaning of this is defined below. - if (is_alive()) then - #should_respawn() == true - else - #should_respawn() == false - #is_alive() == true - #is_running() == true - #should_stop() == false throws - std::bad_alloc or dlib::thread_error If either of these exceptions are thrown then #is_alive() == false and #is_running() == false !*/ void pause ( ); /*! requires - is not called from this->thread() ensures - #is_running() == false !*/ void stop ( ); /*! requires - is not called from this->thread() ensures - #should_stop() == true - #is_running() == false - #should_respawn() == false !*/ protected: bool should_stop ( ) const; /*! requires - is only called from the thread that executes this->thread() ensures - calls to this function block until (#is_running() == true || #should_stop() == true) - if (this thread is supposed to terminate) then - returns true - else - returns false !*/ private: virtual void thread ( ) = 0; /*! requires - is executed in its own thread - is only executed in one thread at a time throws - does not throw any exceptions !*/ // restricted functions threaded_object(threaded_object&); // copy constructor threaded_object& operator=(threaded_object&); // assignment operator }; // ---------------------------------------------------------------------------------------- } #endif // DLIB_THREADED_OBJECT_EXTENSIOn_ABSTRACT_ ================================================ FILE: benchmarks/dlib/threads/threads_kernel.h ================================================ // Copyright (C) 2006 Davis E. King (davis@dlib.net) // License: Boost Software License See LICENSE.txt for the full license. #ifndef DLIB_THREADs_KERNEL_ #define DLIB_THREADs_KERNEL_ #include "../platform.h" #ifdef WIN32 #include "windows.h" #endif #ifndef WIN32 #include "posix.h" #endif #endif // DLIB_THREADs_KERNEL_ ================================================ FILE: benchmarks/dlib/threads/threads_kernel_1.h ================================================ // Copyright (C) 2003 Davis E. King (davis@dlib.net) // License: Boost Software License See LICENSE.txt for the full license. #ifndef DLIB_THREADS_KERNEl_1_ #define DLIB_THREADS_KERNEl_1_ #ifdef DLIB_ISO_CPP_ONLY #error "DLIB_ISO_CPP_ONLY is defined so you can't use this OS dependent code. Turn DLIB_ISO_CPP_ONLY off if you want to use it." #endif #include "threads_kernel_abstract.h" #include "../windows_magic.h" #include #include "../algs.h" #include #include #include namespace dlib { // ---------------------------------------------------------------------------------------- typedef DWORD thread_id_type; inline thread_id_type get_thread_id ( ) { return GetCurrentThreadId(); } // ---------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------- // mutex object // ---------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------- // forward declaration of signaler class signaler; class mutex { public: mutex ( ) { } ~mutex ( ) { } void lock ( ) const { cs.lock(); } void unlock ( ) const { cs.unlock(); } private: friend class signaler; mutable std::mutex cs; // restricted functions mutex(mutex&); // copy constructor mutex& operator=(mutex&); // assignment operator }; // ---------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------- // signaler object // ---------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------- class signaler { public: signaler ( const mutex& associated_mutex ) : m(associated_mutex) { } ~signaler ( ) { } void wait ( ) const { std::unique_lock cs(m.cs, std::defer_lock); cv.wait(cs); } bool wait_or_timeout ( unsigned long milliseconds ) const { std::unique_lock cs(m.cs, std::defer_lock); auto status = cv.wait_until(cs, std::chrono::system_clock::now() + std::chrono::milliseconds(milliseconds)); return status == std::cv_status::no_timeout; } void signal ( ) const { cv.notify_one(); } void broadcast ( ) const { cv.notify_all(); } const mutex& get_mutex ( ) const { return m; } private: mutable std::condition_variable cv; const mutex& m; // restricted functions signaler(signaler&); // copy constructor signaler& operator=(signaler&); // assignment operator }; // ---------------------------------------------------------------------------------------- namespace threads_kernel_shared_helpers { bool spawn_thread ( void (*funct)(void*), void* param ); /*! is identical to create_new_thread() but just doesn't use any thread pooling. !*/ } // ---------------------------------------------------------------------------------------- } #include "threads_kernel_shared.h" #ifdef NO_MAKEFILE #include "threads_kernel_1.cpp" #endif #endif // DLIB_THREADS_KERNEl_1_ ================================================ FILE: benchmarks/dlib/threads/threads_kernel_2.h ================================================ // Copyright (C) 2003 Davis E. King (davis@dlib.net) // License: Boost Software License See LICENSE.txt for the full license. #ifndef DLIB_THREADS_KERNEl_2_ #define DLIB_THREADS_KERNEl_2_ #ifdef DLIB_ISO_CPP_ONLY #error "DLIB_ISO_CPP_ONLY is defined so you can't use this OS dependent code. Turn DLIB_ISO_CPP_ONLY off if you want to use it." #endif #include "threads_kernel_abstract.h" #include #include #include #include "../algs.h" namespace dlib { // ---------------------------------------------------------------------------------------- typedef pthread_t thread_id_type; inline thread_id_type get_thread_id ( ) { return pthread_self(); } // ---------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------- // mutex object // ---------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------- // forward declaration of signaler class signaler; class mutex { // give signaler access to hMutex friend class signaler; public: mutex ( ) { if (pthread_mutex_init(&myMutex,0)) { throw dlib::thread_error(ECREATE_MUTEX, "in function mutex::mutex() an error occurred making the mutex" ); } } ~mutex ( ) { pthread_mutex_destroy(&myMutex); } void lock ( ) const { pthread_mutex_lock(&myMutex); } void unlock ( ) const { pthread_mutex_unlock(&myMutex); } private: mutable pthread_mutex_t myMutex; // restricted functions mutex(mutex&); // copy constructor mutex& operator=(mutex&); // assignement opertor }; // ---------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------- // signaler object // ---------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------- class signaler { public: signaler ( const mutex& assoc_mutex ) : associated_mutex(&assoc_mutex.myMutex), m(assoc_mutex) { if (pthread_cond_init(&cond,0)) { throw dlib::thread_error(ECREATE_SIGNALER, "in function signaler::signaler() an error occurred making the signaler" ); } } ~signaler ( ) { pthread_cond_destroy(&cond); } void wait ( ) const { pthread_cond_wait(&cond,associated_mutex); } bool wait_or_timeout ( unsigned long milliseconds ) const { timespec time_to_wait; timeval curtime; gettimeofday(&curtime,0); // get the time and adjust the timespec object by the appropriate amount time_to_wait.tv_sec = milliseconds/1000 + curtime.tv_sec; time_to_wait.tv_nsec = curtime.tv_usec; time_to_wait.tv_nsec *= 1000; time_to_wait.tv_nsec += (milliseconds%1000)*1000000; time_to_wait.tv_sec += time_to_wait.tv_nsec/1000000000; time_to_wait.tv_nsec = time_to_wait.tv_nsec%1000000000; if ( pthread_cond_timedwait(&cond,associated_mutex,&time_to_wait) == ETIMEDOUT) { return false; } else { return true; } } void signal ( ) const { pthread_cond_signal(&cond); } void broadcast ( ) const { pthread_cond_broadcast(&cond); } const mutex& get_mutex ( ) const { return m; } private: pthread_mutex_t* const associated_mutex; mutable pthread_cond_t cond; const mutex& m; // restricted functions signaler(signaler&); // copy constructor signaler& operator=(signaler&); // assignement opertor }; // ---------------------------------------------------------------------------------------- namespace threads_kernel_shared_helpers { bool spawn_thread ( void (*funct)(void*), void* param ); /*! is identical to create_new_thread() but just doesn't use any thread pooling. !*/ } // ---------------------------------------------------------------------------------------- } #include "threads_kernel_shared.h" #ifdef NO_MAKEFILE #include "threads_kernel_2.cpp" #endif #endif // DLIB_THREADS_KERNEl_2_ ================================================ FILE: benchmarks/dlib/threads/threads_kernel_abstract.h ================================================ // Copyright (C) 2003 Davis E. King (davis@dlib.net) // License: Boost Software License See LICENSE.txt for the full license. #undef DLIB_THREADS_KERNEl_ABSTRACT_ #ifdef DLIB_THREADS_KERNEl_ABSTRACT_ namespace dlib { // ---------------------------------------------------------------------------------------- /*! THREAD POOLING When threads end they go into a global thread pool and each waits there for 30 seconds before timing out and having its resources returned to the operating system. When create_new_thread() is called it first looks in the thread pool to see if there are any threads it can snatch from the pool, if not then it makes a new one. Note that whenever I say something happens when a thread "terminates" or "ends" I mean "when it returns to the thread pool." From the client programmer point of view a thread terminates/ends when it returns to the dlib thread pool and you shouldn't and indeed don't need to know when it actually gets its resources reclaimed by the operating system. If you want to change the timeout to a different value you can #define DLIB_THREAD_POOL_TIMEOUT to whatever value (in milliseconds) that you like. EXCEPTIONS Unless specified otherwise, nothing in this file throws exceptions. !*/ // ---------------------------------------------------------------------------------------- thread_id_type get_thread_id ( ); /*! ensures - returns a unique id for the calling thread. Note that while the id is unique among all currently existing threads it may have been used by a previous thread that has terminated. !*/ // ---------------------------------------------------------------------------------------- bool is_dlib_thread ( thread_id_type id = get_thread_id() ); /*! ensures - if (the thread with the given id was spawned by a call to dlib::create_new_thread) then - returns true - else - returns false !*/ // ---------------------------------------------------------------------------------------- template < typename T > void register_thread_end_handler ( T& obj, void (T::*handler)() ); /*! requires - handler == a valid member function pointer for class T - handler does not throw - handler does not call register_thread_end_handler() - handler does not block - is_dlib_thread() == true (i.e. the calling thread was spawned by dlib::create_new_thread()) ensures - let ID == the thread id for the thread calling register_thread_end_handler() - (obj.*handler)() will be called when the thread with thread id ID is terminating and it will be called from within that terminating thread. (i.e. inside the handler function get_thread_id() == ID == the id of the thread that is terminating. ) - each call to this function adds another handler that will be called when the given thread terminates. This means that if you call it a bunch of times then you will end up registering multiple handlers (or single handlers multiple times) that will be called when the thread ends. throws - std::bad_alloc If this exception is thrown then the call to this function had no effect. !*/ // ---------------------------------------------------------------------------------------- template < typename T > void unregister_thread_end_handler ( T& obj, void (T::*handler)() ); /*! requires - handler == a valid member function pointer for class T ensures - Undoes all previous calls to register_thread_end_handler(obj,handler). So the given handler won't be called when any threads end. throws - std::bad_alloc If this exception is thrown then the call to this function had no effect. !*/ // ---------------------------------------------------------------------------------------- bool create_new_thread ( void (*funct)(void*), void* param ); /*! ensures - creates a new thread for the function pointed to by funct - passes it param as its parameter. (i.e. calls funct(param) from the new thread) - returns true upon success and false upon failure to create the new thread !*/ // ---------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------- // mutex object // ---------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------- class mutex { /*! INITIAL VALUE mutex is in the unlocked state WHAT THIS OBJECT REPRESENTS This object represents a mutex intended to be used for synchronous thread control of shared data. When a thread wants to access some shared data it locks out other threads by calling lock() and calls unlock() when it is finished. !*/ public: mutex ( ); /*! ensures - #*this is properly initialized throws - dlib::thread_error the constructor may throw this exception if there is a problem gathering resources to create the mutex. !*/ ~mutex ( ); /*! requires - *this is not locked ensures - all resources allocated by *this have been freed !*/ void lock ( ) const; /*! requires - the thread calling lock() does not already have a lock on *this ensures - if (*this is currently locked by another thread) then - the thread that called lock() on *this is put to sleep until it becomes available - if (*this is currently unlocked) then - #*this becomes locked and the current thread is NOT put to sleep but now "owns" #*this !*/ void unlock ( ) const; /*! requires - the thread calling unlock() already has a lock on *this ensures - #*this is unlocked (i.e. other threads may now lock this object) !*/ private: // restricted functions mutex(mutex&); // copy constructor mutex& operator=(mutex&); // assignment operator }; // ---------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------- // signaler object // ---------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------- class signaler { /*! WHAT THIS OBJECT REPRESENTS This object represents an event signaling system for threads. It gives a thread the ability to wake up other threads that are waiting for a particular signal. Each signaler object is associated with one and only one mutex object. More than one signaler object may be associated with a single mutex but a signaler object may only be associated with a single mutex. NOTE: You must guard against spurious wakeups. This means that a thread might return from a call to wait even if no other thread called signal. This is rare but must be guarded against. !*/ public: signaler ( const mutex& associated_mutex ); /*! ensures - #*this is properly initialized - #get_mutex() == associated_mutex throws - dlib::thread_error the constructor may throw this exception if there is a problem gathering resources to create the signaler. !*/ ~signaler ( ); /*! ensures - all resources allocated by *this have been freed !*/ void wait ( ) const; /*! requires - get_mutex() is locked and owned by the calling thread ensures - atomically unlocks get_mutex() and blocks the calling thread - calling thread may wake if another thread calls signal() or broadcast() on *this - when wait() returns the calling thread again has a lock on get_mutex() !*/ bool wait_or_timeout ( unsigned long milliseconds ) const; /*! requires - get_mutex() is locked and owned by the calling thread ensures - atomically unlocks get_mutex() and blocks the calling thread - calling thread may wake if another thread calls signal() or broadcast() on *this - after the specified number of milliseconds has elapsed the calling thread will wake once get_mutex() is free - when wait returns the calling thread again has a lock on get_mutex() - returns false if the call to wait_or_timeout timed out - returns true if the call did not time out !*/ void signal ( ) const; /*! ensures - if (at least one thread is waiting on *this) then - at least one of the waiting threads will wake !*/ void broadcast ( ) const; /*! ensures - any and all threads waiting on *this will wake !*/ const mutex& get_mutex ( ) const; /*! ensures - returns a const reference to the mutex associated with *this !*/ private: // restricted functions signaler(signaler&); // copy constructor signaler& operator=(signaler&); // assignment operator }; // ---------------------------------------------------------------------------------------- } #endif // DLIB_THREADS_KERNEl_ABSTRACT_ ================================================ FILE: benchmarks/dlib/threads/threads_kernel_shared.h ================================================ // Copyright (C) 2003 Davis E. King (davis@dlib.net) // License: Boost Software License See LICENSE.txt for the full license. #ifndef DLIB_THREADS_KERNEl_SHARED_ #define DLIB_THREADS_KERNEl_SHARED_ // this file should be included at the bottom of one of the thread kernel headers for a // specific platform. //#include "../threads.h" #include "auto_mutex_extension.h" #include "../binary_search_tree.h" #include "../member_function_pointer.h" #include "../memory_manager.h" #include "../queue.h" #include "../set.h" #include "../test_for_odr_violations.h" namespace dlib { // ---------------------------------------------------------------------------------------- namespace threads_kernel_shared { void thread_starter ( void* ); class threader { /*! INITIAL VALUE - pool_count == 0 and - data_ready is associated with the mutex data_mutex - data_empty is associated with the mutex data_mutex - destructed is associated with the mutex data_mutex - destruct == false - total_count == 0 - function_pointer == 0 - do_not_ever_destruct == false CONVENTION - data_ready is associated with the mutex data_mutex - data_empty is associated with the mutex data_mutex - data_ready == a signaler used signal when there is new data waiting to start a thread with. - data_empty == a signaler used to signal when the data is now empty - pool_count == the number of suspended threads in the thread pool - total_count == the number of threads that are executing anywhere. i.e. pool_count + the ones that are currently running some user function. - if (function_pointer != 0) then - parameter == a void pointer pointing to the parameter which should be used to start the next thread - function_pointer == a pointer to the next function to make a new thread with - if (the destructor is running) then - destruct == true - else - destruct == false - thread_ids is locked by the data_mutex - thread_ids == a set that contains the thread id for each thread spawned by this object. !*/ public: threader ( ); ~threader ( ); void destruct_if_ready ( ); /*! ensures - if (there are no threads currently running and we haven't set do_not_ever_destruct) then - calls delete this - else - does nothing !*/ bool create_new_thread ( void (*funct)(void*), void* param ); template < typename T > void unregister_thread_end_handler ( T& obj, void (T::*handler)() ) { member_function_pointer<> mfp, junk_mfp; mfp.set(obj,handler); thread_id_type junk_id; // find any member function pointers in the registry that point to the same // thing as mfp and remove them auto_mutex M(reg.m); reg.reg.reset(); while (reg.reg.move_next()) { while (reg.reg.current_element_valid() && reg.reg.element().value() == mfp) { reg.reg.remove_current_element(junk_id, junk_mfp); } } } template < typename T > void register_thread_end_handler ( T& obj, void (T::*handler)() ) { thread_id_type id = get_thread_id(); member_function_pointer<> mfp; mfp.set(obj,handler); auto_mutex M(reg.m); reg.reg.add(id,mfp); } bool is_dlib_thread ( thread_id_type id ); private: friend void thread_starter ( void* ); void call_end_handlers ( ); /*! ensures - calls the registered end handlers for the calling thread and then removes them from reg.reg !*/ // private data set::kernel_2b>::kernel_1b_c thread_ids; unsigned long total_count; void* parameter; void (*function_pointer)(void*); unsigned long pool_count; mutex data_mutex; // mutex to protect the above data signaler data_ready; // signaler to signal when there is new data signaler data_empty; // signaler to signal when the data is empty bool destruct; signaler destructed; // signaler to signal when a thread has ended bool do_not_ever_destruct; struct registry_type { mutex m; binary_search_tree< thread_id_type, member_function_pointer<>, memory_manager::kernel_2a >::kernel_2a_c reg; }; // stuff for the register_thread_end_handler registry_type reg; // restricted functions threader(threader&); // copy constructor threader& operator=(threader&); // assignement opertor }; // ------------------------------------------------------------------------------------ threader& thread_pool ( ); /*! ensures - returns a reference to the global threader object !*/ // ------------------------------------------------------------------------------------ extern bool thread_pool_has_been_destroyed; } bool is_dlib_thread ( thread_id_type id ); bool is_dlib_thread ( ); // ---------------------------------------------------------------------------------------- inline bool create_new_thread ( void (*funct)(void*), void* param ) { try { // now make this thread return threads_kernel_shared::thread_pool().create_new_thread(funct,param); } catch (std::bad_alloc&) { return false; } } // ---------------------------------------------------------------------------------------- template < typename T > inline void register_thread_end_handler ( T& obj, void (T::*handler)() ) { DLIB_ASSERT(is_dlib_thread(), "\tvoid register_thread_end_handler" << "\n\tYou can't register a thread end handler for a thread dlib didn't spawn." ); threads_kernel_shared::thread_pool().register_thread_end_handler(obj,handler); } // ---------------------------------------------------------------------------------------- template < typename T > inline void unregister_thread_end_handler ( T& obj, void (T::*handler)() ) { // Check if the thread pool has been destroyed and if it has then don't do anything. // This bool here is always true except when the program has started to terminate and // the thread pool object has been destroyed. This if is here to catch other global // objects that have destructors that try to call unregister_thread_end_handler(). // Without this check we get into trouble if the thread pool is destroyed before these // objects. if (threads_kernel_shared::thread_pool_has_been_destroyed == false) threads_kernel_shared::thread_pool().unregister_thread_end_handler(obj,handler); } // ---------------------------------------------------------------------------------------- } #ifdef NO_MAKEFILE #include "threads_kernel_shared.cpp" #endif #endif // DLIB_THREADS_KERNEl_SHARED_ ================================================ FILE: benchmarks/dlib/threads/windows.h ================================================ // Copyright (C) 2003 Davis E. King (davis@dlib.net) // License: Boost Software License See LICENSE.txt for the full license. #ifndef DLIB_THREADS_KERNEl_2_ #include "threads_kernel_1.h" #endif ================================================ FILE: benchmarks/dlib/threads.h ================================================ // Copyright (C) 2003 Davis E. King (davis@dlib.net) // License: Boost Software License See LICENSE.txt for the full license. #ifdef DLIB_ALL_SOURCE_END #include "dlib_basic_cpp_build_tutorial.txt" #endif #ifndef DLIB_THREADs_ #define DLIB_THREADs_ #include "threads/threads_kernel.h" #include "threads/auto_mutex_extension.h" #include "threads/auto_unlock_extension.h" #include "threads/create_new_thread_extension.h" #include "threads/multithreaded_object_extension.h" #include "threads/rmutex_extension.h" #include "threads/rsignaler_extension.h" #include "threads/threaded_object_extension.h" #include "threads/thread_specific_data_extension.h" #include "threads/thread_function_extension.h" #include "threads/thread_pool_extension.h" #include "threads/read_write_mutex_extension.h" #include "threads/parallel_for_extension.h" #include "threads/async.h" #endif // DLIB_THREADs_ ================================================ FILE: benchmarks/dlib/time_this.h ================================================ // Copyright (C) 2003 Davis E. King (davis@dlib.net) // License: Boost Software License See LICENSE.txt for the full license. #ifndef DLIB_TIME_THIs_ #define DLIB_TIME_THIs_ #include // ---------------------------------------------------------------------------------------- #define TIME_THIS_TO(_tt_op,_tt_out) \ { \ auto _tt_start = std::chrono::high_resolution_clock::now(); \ {_tt_op;} \ auto _tt_stop = std::chrono::high_resolution_clock::now(); \ auto _tt_thetime = _tt_stop-_tt_start; \ using std::chrono::duration_cast; \ using std::chrono::duration; \ if (_tt_thetime >= std::chrono::minutes(1)) \ _tt_out << "\ntime: " << duration_cast>>(_tt_thetime).count() << "min\n"; \ else if (_tt_thetime >= std::chrono::seconds(1)) \ _tt_out << "\ntime: " << duration_cast>(_tt_thetime).count() << "sec\n"; \ else if (_tt_thetime >= std::chrono::milliseconds(1)) \ _tt_out << "\ntime: " << duration_cast>(_tt_thetime).count() << "ms\n"; \ else if (_tt_thetime >= std::chrono::microseconds(1)) \ _tt_out << "\ntime: " << duration_cast>(_tt_thetime).count() << "us\n"; \ else \ _tt_out << "\ntime: " << duration_cast>(_tt_thetime).count() << "ns\n"; \ } #define TIME_THIS(_tt_op) TIME_THIS_TO(_tt_op,std::cout) // ---------------------------------------------------------------------------------------- #endif // DLIB_TIME_THIs_ ================================================ FILE: benchmarks/dlib/timeout/timeout.h ================================================ // Copyright (C) 2007 Davis E. King (davis@dlib.net) // License: Boost Software License See LICENSE.txt for the full license. #ifndef DLIB_TIMEOUT_KERNEl_1_ #define DLIB_TIMEOUT_KERNEl_1_ #include "../threads.h" #include "../algs.h" #include "../misc_api.h" #include "timeout_abstract.h" #include "../uintn.h" #include "../timer.h" #ifdef _MSC_VER // this is to disable the "'this' : used in base member initializer list" // warning you get from some of the GUI objects since all the objects // require that their parent class be passed into their constructor. // In this case though it is totally safe so it is ok to disable this warning. #pragma warning(disable : 4355) #endif // _MSC_VER namespace dlib { // ---------------------------------------------------------------------------------------- class timeout { /*! INITIAL VALUE - b == a pointer to some kind of bind object CONVENTION - b == a pointer to some kind of bind object !*/ class bind { public: virtual void go() = 0; virtual ~bind() {} }; template class functor : public bind { public: functor(const T& f) : function(f) {} T function; void go() { function(); } }; template class zero : public bind { public: T* object; R (T::*callback_function)(); void go() { (object->*callback_function)(); } }; template class one : public bind { public: T* object; R (T::*callback_function)(U); U val; void go() { (object->*callback_function)(val); } }; public: // This typedef is here for backwards compatibility with previous versions of dlib. typedef timeout kernel_1a; template < typename T > timeout ( T callback_function, unsigned long ms_to_timeout ) : t(*this,&timeout::trigger_timeout) { b = new functor(callback_function); t.set_delay_time(ms_to_timeout); t.start(); } template < typename T > timeout ( T& object, void (T::*callback_function)(), unsigned long ms_to_timeout ): t(*this,&timeout::trigger_timeout) { zero* B = new zero; b = B; B->object = &object; B->callback_function = callback_function; t.set_delay_time(ms_to_timeout); t.start(); } template < typename T, typename U > timeout ( T& object, void (T::*callback_function)(U callback_function_argument), unsigned long ms_to_timeout, U callback_function_argument ): t(*this,&timeout::trigger_timeout) { one* B = new one; b = B; B->object = &object; B->callback_function = callback_function; B->val = callback_function_argument; t.set_delay_time(ms_to_timeout); t.start(); } template < typename T > timeout ( T& object, int (T::*callback_function)(), unsigned long ms_to_timeout ): t(*this,&timeout::trigger_timeout) { zero* B = new zero; b = B; B->object = &object; B->callback_function = callback_function; t.set_delay_time(ms_to_timeout); t.start(); } template < typename T, typename U > timeout ( T& object, int (T::*callback_function)(U callback_function_argument), unsigned long ms_to_timeout, U callback_function_argument ): t(*this,&timeout::trigger_timeout) { one* B = new one; b = B; B->object = &object; B->callback_function = callback_function; B->val = callback_function_argument; t.set_delay_time(ms_to_timeout); t.start(); } virtual ~timeout ( ) { t.stop_and_wait(); delete b; } private: void trigger_timeout () { b->go(); t.stop(); } dlib::timer t; bind* b; // restricted functions timeout(const timeout&); // copy constructor timeout& operator=(const timeout&); // assignment operator }; // ---------------------------------------------------------------------------------------- } #endif // DLIB_TIMEOUT_KERNEl_1_ ================================================ FILE: benchmarks/dlib/timeout/timeout_abstract.h ================================================ // Copyright (C) 2007 Davis E. King (davis@dlib.net) // License: Boost Software License See LICENSE.txt for the full license. #undef DLIB_TIMEOUT_KERNEl_ABSTRACT_ #ifdef DLIB_TIMEOUT_KERNEl_ABSTRACT_ #include "../threads.h" namespace dlib { class timeout { /*! WHAT THIS OBJECT REPRESENTS This object provides a simple way to implement a timeout. An example will make its use clear. Suppose we want to read from a socket but we want to terminate the connection if the read takes longer than 10 seconds. This could be accomplished as follows: connection* con = a connection from somewhere; { // setup a timer that will call con->shutdown() in 10 seconds timeout t(*con,&connection::shutdown,10000); // Now call read on the connection. If this call to read() takes more // than 10 seconds then the t timeout will trigger and shutdown the // connection. If read completes in less than 10 seconds then the t // object will be destructed on the next line due to the } and then the // timeout won't trigger. con->read(buf,100); } Alternatively, if you have a compiler capable of using C++11 lambda functions, you can use a syntax like this: { timeout t([con](){ con->shutdown(); }, 10000); con->read(buf,100); } More generally, you can use this with things other than sockets. For example, the following statement will print "Hello world!" after 1000ms: timeout t([](){ cout << "Hello world!" << endl; }, 1000); THREAD SAFETY All methods of this class are thread safe. !*/ public: template < typename T > timeout ( T callback_function, unsigned long ms_to_timeout ); /*! requires - callback_function does not throw ensures - does not block. - #*this is properly initialized - if (this object isn't destructed in ms_to_timeout milliseconds) then - callback_function() will be called in ms_to_timeout milliseconds. throws - std::bad_alloc - dlib::thread_error !*/ template < typename T > timeout ( T& object, void (T::*callback_function)(), unsigned long ms_to_timeout ); /*! requires - callback_function does not throw ensures - does not block. - #*this is properly initialized - if (this object isn't destructed in ms_to_timeout milliseconds) then - (object.*callback_function)() will be called in ms_to_timeout milliseconds. throws - std::bad_alloc - dlib::thread_error !*/ template < typename T, typename U > timeout ( T& object, void (T::*callback_function)(U callback_function_argument), unsigned long ms_to_timeout, U callback_function_argument ); /*! requires - callback_function does not throw ensures - does not block. - #*this is properly initialized - if (this object isn't destructed in ms_to_timeout milliseconds) then - (object.*callback_function)(callback_function_argument) will be called in ms_to_timeout milliseconds. throws - std::bad_alloc - dlib::thread_error !*/ template < typename T > timeout ( T& object, int (T::*callback_function)(), unsigned long ms_to_timeout ); /*! requires - callback_function does not throw ensures - does not block. - #*this is properly initialized - if (this object isn't destructed in ms_to_timeout milliseconds) then - (object.*callback_function)() will be called in ms_to_timeout milliseconds. throws - std::bad_alloc - dlib::thread_error !*/ template < typename T, typename U > timeout ( T& object, int (T::*callback_function)(U callback_function_argument), unsigned long ms_to_timeout, U callback_function_argument ); /*! requires - callback_function does not throw ensures - does not block. - #*this is properly initialized - if (this object isn't destructed in ms_to_timeout milliseconds) then - (object.*callback_function)(callback_function_argument) will be called in ms_to_timeout milliseconds. throws - std::bad_alloc - dlib::thread_error !*/ virtual ~timeout ( ); /*! requires - is not called from inside the callback_function given to the constructor. ensures - any resources associated with *this have been released - if (the callback_function hasn't been called yet) then - the callback_function specified in the constructor will not be called !*/ private: // restricted functions timeout(const timeout&); // copy constructor timeout& operator=(const timeout&); // assignment operator }; } #endif // DLIB_TIMEOUT_KERNEl_ABSTRACT_ ================================================ FILE: benchmarks/dlib/timeout.h ================================================ // Copyright (C) 2007 Davis E. King (davis@dlib.net) // License: Boost Software License See LICENSE.txt for the full license. #ifndef DLIB_TIMEOUt_ #define DLIB_TIMEOUt_ #include "timeout/timeout.h" #endif // DLIB_TIMEOUt_ ================================================ FILE: benchmarks/dlib/timer/timer.h ================================================ // Copyright (C) 2007 Davis E. King (davis@dlib.net) // License: Boost Software License See LICENSE.txt for the full license. #ifndef DLIB_TIMEr_Hh_ #define DLIB_TIMEr_Hh_ #include #include "../threads.h" #include "../algs.h" #include "../misc_api.h" #include "timer_abstract.h" #include "../uintn.h" #include "../binary_search_tree.h" #include "timer_heavy.h" namespace dlib { struct timer_base : public threaded_object { /*! WHAT THIS OBJECT REPRESENTS This object contains the base members of the timer object. It exists so that we can access them from outside any templated functions. !*/ unsigned long delay; // these are only modified by the global_clock uint64 next_time_to_run; timestamper ts; bool running; bool in_global_clock; }; // ---------------------------------------------------------------------------------------- class timer_global_clock : private threaded_object { /*! This object sets up a timer that triggers the action function for timer objects that are tracked inside this object. INITIAL VALUE - shutdown == false - running == false CONVENTION - if (shutdown) then - thread() should terminate - else (running) then - thread() is running - tm[time] == pointer to a timer_base object !*/ typedef binary_search_tree::kernel_2b>::kernel_2a_c time_map; public: ~timer_global_clock(); void add ( timer_base* r ); /*! requires - m is locked ensures - starts the thread if it isn't already started - adds r to tm - #r->in_global_clock == true - updates r->next_time_to_run appropriately according to r->delay !*/ void remove ( timer_base* r ); /*! requires - m is locked ensures - if (r is in tm) then - removes r from tm - #r->in_global_clock == false !*/ void adjust_delay ( timer_base* r, unsigned long new_delay ); /*! requires - m is locked ensures - #r->delay == new_delay - if (r->in_global_clock) then - the time to the next event will have been appropriately adjusted !*/ mutex m; friend std::shared_ptr get_global_clock(); private: timer_global_clock(); time_map tm; signaler s; bool shutdown; bool running; timestamper ts; void thread(); /*! ensures - spawns timer tasks as is appropriate !*/ }; std::shared_ptr get_global_clock(); /*! ensures - returns the global instance of the timer_global_clock object !*/ // ---------------------------------------------------------------------------------------- template < typename T > class timer : private timer_base { /*! INITIAL VALUE - running == false - delay == 1000 - ao == a pointer to the action_object() - af == a pointer to the action_function() - in_global_clock == false - next_time_to_run == 0 - gc == get_global_clock() CONVENTION - the mutex used to lock everything is gc->m - running == is_running() - delay == delay_time() - *ao == action_object() - af == action_function() - if (!running) then - in_global_clock == false - else - next_time_to_run == the next time this timer should run according to the timestamper in the global_clock !*/ public: // These typedefs are here for backwards compatibility with previous versions of // dlib. typedef timer_heavy kernel_1a; typedef timer kernel_2a; typedef void (T::*af_type)(); timer( T& ao_, af_type af_ ); virtual ~timer( ); void clear( ); af_type action_function ( ) const; const T& action_object ( ) const; T& action_object ( ); bool is_running ( ) const; unsigned long delay_time ( ) const; void set_delay_time ( unsigned long milliseconds ); void start ( ); void stop ( ); void stop_and_wait ( ); private: void thread ( ); /*! ensures - calls the action function !*/ // data members T& ao; const af_type af; std::shared_ptr gc; // restricted functions timer(const timer&); // copy constructor timer& operator=(const timer&); // assignment operator }; // ---------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------- // member function definitions // ---------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------- template < typename T > timer:: timer( T& ao_, af_type af_ ) : ao(ao_), af(af_), gc(get_global_clock()) { delay = 1000; next_time_to_run = 0; running = false; in_global_clock = false; } // ---------------------------------------------------------------------------------------- template < typename T > timer:: ~timer( ) { clear(); wait(); } // ---------------------------------------------------------------------------------------- template < typename T > void timer:: clear( ) { auto_mutex M(gc->m); running = false; gc->remove(this); delay = 1000; next_time_to_run = 0; } // ---------------------------------------------------------------------------------------- template < typename T > typename timer::af_type timer:: action_function ( ) const { return af; } // ---------------------------------------------------------------------------------------- template < typename T > const T& timer:: action_object ( ) const { return ao; } // ---------------------------------------------------------------------------------------- template < typename T > T& timer:: action_object ( ) { return ao; } // ---------------------------------------------------------------------------------------- template < typename T > bool timer:: is_running ( ) const { auto_mutex M(gc->m); return running; } // ---------------------------------------------------------------------------------------- template < typename T > unsigned long timer:: delay_time ( ) const { auto_mutex M(gc->m); return delay; } // ---------------------------------------------------------------------------------------- template < typename T > void timer:: set_delay_time ( unsigned long milliseconds ) { auto_mutex M(gc->m); gc->adjust_delay(this,milliseconds); } // ---------------------------------------------------------------------------------------- template < typename T > void timer:: start ( ) { auto_mutex M(gc->m); if (!running) { gc->add(this); running = true; } } // ---------------------------------------------------------------------------------------- template < typename T > void timer:: stop ( ) { gc->m.lock(); running = false; gc->remove(this); gc->m.unlock(); } // ---------------------------------------------------------------------------------------- template < typename T > void timer:: thread ( ) { // call the action function (ao.*af)(); auto_mutex M(gc->m); if (running) { gc->remove(this); gc->add(this); } } // ---------------------------------------------------------------------------------------- template < typename T > void timer:: stop_and_wait ( ) { gc->m.lock(); running = false; gc->remove(this); gc->m.unlock(); wait(); } // ---------------------------------------------------------------------------------------- } #ifdef NO_MAKEFILE #include "timer.cpp" #endif #endif // DLIB_TIMEr_Hh_ ================================================ FILE: benchmarks/dlib/timer/timer_abstract.h ================================================ // Copyright (C) 2005 Davis E. King (davis@dlib.net) // License: Boost Software License See LICENSE.txt for the full license. #undef DLIB_TIMER_KERNEl_ABSTRACT_ #ifdef DLIB_TIMER_KERNEl_ABSTRACT_ #include "../threads.h" namespace dlib { template < typename T > class timer { /*! INITIAL VALUE is_running() == false delay_time() == 1000 action_object() == The object that is passed into the constructor action_function() == The member function pointer that is passed to the constructor. WHAT THIS OBJECT REPRESENTS This object represents a timer that will call a given member function (the action function) repeatedly at regular intervals and in its own thread. Note that the delay_time() is measured in milliseconds but you are not guaranteed to have that level of resolution. The actual resolution is implementation dependent. THREAD SAFETY All methods of this class are thread safe. !*/ public: typedef void (T::*af_type)(); timer ( T& ao, af_type af ); /*! requires - af does not throw ensures - does not block. - #*this is properly initialized - #action_object() == ao - #action_function() == af (af is a member function pointer to a member in the class T) throws - std::bad_alloc - dlib::thread_error !*/ virtual ~timer ( ); /*! requires - is not called from inside the action_function() ensures - any resources associated with *this have been released - will not call the action_function() anymore. - if (the action function is currently executing) then - blocks until it finishes !*/ void clear( ); /*! ensures - #*this has its initial value - does not block throws - std::bad_alloc or dlib::thread_error If either of these exceptions are thrown then #*this is unusable until clear() is called and succeeds. !*/ af_type action_function ( ) const; /*! ensures - does not block. - returns a pointer to the member function of action_object() that is called by *this. !*/ const T& action_object ( ) const; /*! ensures - does not block. - returns a const reference to the object used to call the member function pointer action_function() !*/ T& action_object ( ); /*! ensures - does not block. - returns a non-const reference to the object used to call the member function pointer action_function() !*/ bool is_running ( ) const; /*! ensures - does not block. - if (*this is currently scheduled to call the action_function()) then - returns true - else - returns false !*/ unsigned long delay_time ( ) const; /*! ensures - does not block. - returns the amount of time, in milliseconds, that *this will wait between the return of one call to the action_function() and the beginning of the next call to the action_function(). !*/ void set_delay_time ( unsigned long milliseconds ); /*! ensures - does not block. - #delay_time() == milliseconds throws - std::bad_alloc or dlib::thread_error If either of these exceptions are thrown then #is_running() == false but otherwise this function succeeds !*/ void start ( ); /*! ensures - does not block. - if (is_running() == false) then - #is_running() == true - The action_function() will run in another thread. - The first call to the action_function() will occur in roughly delay_time() milliseconds. - else - this call to start() has no effect throws - dlib::thread_error or std::bad_alloc If this exception is thrown then #is_running() == false but otherwise this call to start() has no effect. !*/ void stop ( ); /*! ensures - #is_running() == false - does not block. !*/ void stop_and_wait ( ); /*! ensures - #is_running() == false - if (the action function is currently executing) then - blocks until it finishes !*/ private: // restricted functions timer(const timer&); // copy constructor timer& operator=(const timer&); // assignment operator }; } #endif // DLIB_TIMER_KERNEl_ABSTRACT_ ================================================ FILE: benchmarks/dlib/timer/timer_heavy.h ================================================ // Copyright (C) 2005 Davis E. King (davis@dlib.net) // License: Boost Software License See LICENSE.txt for the full license. #ifndef DLIB_TIMER_KERNEl_1_ #define DLIB_TIMER_KERNEl_1_ #include "../threads.h" #include "../algs.h" #include "../misc_api.h" #include "timer_abstract.h" namespace dlib { template < typename T > class timer_heavy { /*! WHAT THIS OBJECT REPRESENTS This is an implementation of the timer_abstract.h interface. It is very simple and uses only one thread which is always alive in a timer_heavy. The reason this object exists is for historical reasons. Originally, the dlib::timer was a multi-implementation component and the timer_heavy was its first implementation. It was superseded later by the more efficient dlib::timer. However, timer_heavy is still around so that dlib::timer::kernel_1a has something to refer to. This way, old client code which somehow depends on the same thread always calling a timer action function isn't going to be disrupted. INITIAL VALUE - running == false - delay == 1000 - ao == a pointer to the action_object() - af == a pointer to the action_function() - m == a mutex that locks everything in this class - s == a signaler for mutex m - stop_running == false CONVENTION - running && !stop_running == is_running() - delay == delay_time() - *ao == action_object() - af == action_function() - if (running) then - there is a thread running - if (is_running()) then - next_time_to_run == the time when the next execution of the action function should occur. (the time is given by ts.get_timestamp()) - stop_running is used to tell the thread to quit. If it is set to true then the thread should end. !*/ public: typedef void (T::*af_type)(); timer_heavy( T& ao_, af_type af_ ); virtual ~timer_heavy( ); void clear( ); af_type action_function ( ) const; const T& action_object ( ) const; T& action_object ( ); bool is_running ( ) const; unsigned long delay_time ( ) const; void set_delay_time ( unsigned long milliseconds ); void start ( ); void stop ( ); void stop_and_wait ( ); private: void thread ( ); /*! requires - is run in its own thread ensures - calls the action function for the given timer object in the manner specified by timer_kernel_abstract.h !*/ // data members T& ao; const af_type af; unsigned long delay; mutex m; signaler s; bool running; bool stop_running; timestamper ts; uint64 next_time_to_run; // restricted functions timer_heavy(const timer_heavy&); // copy constructor timer_heavy& operator=(const timer_heavy&); // assignment operator }; // ---------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------- // member function definitions // ---------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------- template < typename T > timer_heavy:: timer_heavy( T& ao_, af_type af_ ) : ao(ao_), af(af_), delay(1000), s(m), running(false), stop_running(false) { } // ---------------------------------------------------------------------------------------- template < typename T > timer_heavy:: ~timer_heavy( ) { stop_and_wait(); } // ---------------------------------------------------------------------------------------- template < typename T > void timer_heavy:: clear( ) { m.lock(); stop_running = true; delay = 1000; s.broadcast(); m.unlock(); } // ---------------------------------------------------------------------------------------- template < typename T > typename timer_heavy::af_type timer_heavy:: action_function ( ) const { return af; } // ---------------------------------------------------------------------------------------- template < typename T > const T& timer_heavy:: action_object ( ) const { return ao; } // ---------------------------------------------------------------------------------------- template < typename T > T& timer_heavy:: action_object ( ) { return ao; } // ---------------------------------------------------------------------------------------- template < typename T > bool timer_heavy:: is_running ( ) const { auto_mutex M(m); return running && !stop_running; } // ---------------------------------------------------------------------------------------- template < typename T > unsigned long timer_heavy:: delay_time ( ) const { auto_mutex M(m); return delay; } // ---------------------------------------------------------------------------------------- template < typename T > void timer_heavy:: set_delay_time ( unsigned long milliseconds ) { m.lock(); // if (is_running()) then we should adjust next_time_to_run if (running && !stop_running) { next_time_to_run -= delay*1000; next_time_to_run += milliseconds*1000; } delay = milliseconds; s.broadcast(); m.unlock(); } // ---------------------------------------------------------------------------------------- template < typename T > void timer_heavy:: start ( ) { auto_mutex M(m); // if (is_running() == false) then reset the countdown to the next call // to the action_function() if ( (running && !stop_running) == false) next_time_to_run = ts.get_timestamp() + delay*1000; stop_running = false; if (running == false) { running = true; // start the thread if (create_new_thread(*this) == false) { running = false; throw dlib::thread_error("error creating new thread in timer_heavy::start"); } } } // ---------------------------------------------------------------------------------------- template < typename T > void timer_heavy:: stop ( ) { m.lock(); stop_running = true; s.broadcast(); m.unlock(); } // ---------------------------------------------------------------------------------------- template < typename T > void timer_heavy:: thread ( ) { auto_mutex M(m); unsigned long delay_remaining; uint64 current_time = ts.get_timestamp(); if (current_time < next_time_to_run) delay_remaining = static_cast((next_time_to_run-current_time)/1000); else delay_remaining = 0; while (stop_running == false) { if (delay_remaining > 0) s.wait_or_timeout(delay_remaining); if (stop_running) break; current_time = ts.get_timestamp(); if (current_time < next_time_to_run) { // then we woke up too early so we should keep waiting delay_remaining = static_cast((next_time_to_run-current_time)/1000); // rounding might make this be zero anyway. So if it is // then we will say we have hit the next time to run. if (delay_remaining > 0) continue; } // call the action function m.unlock(); (ao.*af)(); m.lock(); current_time = ts.get_timestamp(); next_time_to_run = current_time + delay*1000; delay_remaining = delay; } running = false; stop_running = false; s.broadcast(); } // ---------------------------------------------------------------------------------------- template < typename T > void timer_heavy:: stop_and_wait ( ) { m.lock(); if (running) { // make the running thread terminate stop_running = true; s.broadcast(); // wait for the thread to quit while (running) s.wait(); } m.unlock(); } // ---------------------------------------------------------------------------------------- } #endif // DLIB_TIMER_KERNEl_1_ ================================================ FILE: benchmarks/dlib/timer.h ================================================ // Copyright (C) 2005 Davis E. King (davis@dlib.net) // License: Boost Software License See LICENSE.txt for the full license. #ifndef DLIB_TIMEr_ #define DLIB_TIMEr_ #include "timer/timer.h" #include "timer/timer_heavy.h" #endif // DLIB_TIMEr_ ================================================ FILE: benchmarks/dlib/timing.h ================================================ // Copyright (C) 2011 Davis E. King (davis@dlib.net) // License: Boost Software License See LICENSE.txt for the full license. #ifndef DLIB_TImING_Hh_ #define DLIB_TImING_Hh_ #include #include #include #include "string.h" #include // ---------------------------------------------------------------------------------------- /*!A timing This set of functions is useful for determining how much time is spent executing blocks of code. Consider the following example: int main() { using namespace dlib::timing; for (int i = 0; i < 10; ++i) { // timing block #1 start(1,"block #1"); dlib::sleep(500); stop(1); // timing block #2 start(2,"block #2"); dlib::sleep(1000); stop(2); } print(); } This program would output: Timing report: block #1: 5.0 seconds block #2: 10.0 seconds So we spent 5 seconds in block #1 and 10 seconds in block #2 Additionally, note that you can use an RAII style timing block object. For example, if we wanted to find out how much time we spent in a loop a convenient way to do this would be as follows: int main() { using namespace dlib::timing; for (int i = 0; i < 10; ++i) { block tb(1, "main loop"); dlib::sleep(1500); } print(); } This program would output: Timing report: block main loop: 15.0 seconds !*/ // ---------------------------------------------------------------------------------------- namespace dlib { namespace timing { const int TIME_SLOTS = 500; const int NAME_LENGTH = 40; inline std::atomic* time_buf() { static std::atomic buf[TIME_SLOTS]; return buf; } inline char* name_buf(int i, const char* name) { static char buf[TIME_SLOTS][NAME_LENGTH] = {{0}}; // if this name buffer is empty then copy name into it if (buf[i][0] == '\0') { using namespace std; strncpy(buf[i], name, NAME_LENGTH-1); buf[i][NAME_LENGTH-1] = '\0'; } // return the name buffer return buf[i]; } inline uint64_t ts() { using namespace std::chrono; return duration_cast>(high_resolution_clock::now().time_since_epoch()).count(); } inline void start(int i) { time_buf()[i] -= ts(); } inline void start(int i, const char* name) { time_buf()[i] -= ts(); name_buf(i,name); } inline void stop(int i) { time_buf()[i] += ts(); } inline void print() { using namespace std; cout << "Timing report: " << endl; // figure out how long the longest name is going to be. unsigned long max_name_length = 0; for (int i = 0; i < TIME_SLOTS; ++i) { string name; // Check if the name buffer is empty. Use the name it contains if it isn't. if (name_buf(i,"")[0] != '\0') name = cast_to_string(i) + ": " + name_buf(i,""); else name = cast_to_string(i); max_name_length = std::max(max_name_length, name.size()); } for (int i = 0; i < TIME_SLOTS; ++i) { if (time_buf()[i] != 0) { double time = time_buf()[i]/1000.0/1000.0; string name; // Check if the name buffer is empty. Use the name it contains if it isn't. if (name_buf(i,"")[0] != '\0') name = cast_to_string(i) + ": " + name_buf(i,""); else name = cast_to_string(i); // make sure the name is always the same length. Do so by padding with spaces if (name.size() < max_name_length) name += string(max_name_length-name.size(),' '); if (time < 1000) cout << " " << name << ": " << time << " milliseconds" << endl; else if (time < 1000*60) cout << " " << name << ": " << time/1000.0 << " seconds" << endl; else if (time < 1000*60*60) cout << " " << name << ": " << time/1000.0/60.0 << " minutes" << endl; else cout << " " << name << ": " << time/1000.0/60.0/60.0 << " hours" << endl; } } } inline void clear() { for (int i = 0; i < TIME_SLOTS; ++i) { // clear timing buffer time_buf()[i] = 0; // clear name buffer name_buf(i,"")[0] = '\0'; } } struct block { /*! WHAT THIS OBJECT REPRESENTS This is an RAII tool for calling start() and stop() !*/ block(int i):idx(i) {start(idx);} block(int i, const char* str):idx(i) {start(idx,str);} ~block() { stop(idx); } const int idx; }; } } #endif // DLIB_TImING_Hh_ ================================================ FILE: benchmarks/dlib/tokenizer/tokenizer_kernel_1.h ================================================ // Copyright (C) 2005 Davis E. King (davis@dlib.net) // License: Boost Software License See LICENSE.txt for the full license. #ifndef DLIB_TOKENIZER_KERNEl_1_ #define DLIB_TOKENIZER_KERNEl_1_ #include #include #include #include "../algs.h" #include "tokenizer_kernel_abstract.h" namespace dlib { class tokenizer_kernel_1 { /*! INITIAL VALUE - in == 0 - streambuf == 0 - have_peeked == false - head == "_" + lowercase_letters() + uppercase_letters() - body == "_" + lowercase_letters() + uppercase_letters() + numbers() - headset == pointer to an array of UCHAR_MAX bools and set according to the CONVENTION. - bodyset == pointer to an array of UCHAR_MAX bools and set according to the CONVENTION. CONVENTION - if (stream_is_set()) then - get_stream() == *in - streambuf == in->rdbuf() - else - in == 0 - streambuf == 0 - body == get_identifier_body() - head == get_identifier_head() - if (the char x appears in head) then - headset[static_cast(x)] == true - else - headset[static_cast(x)] == false - if (the char x appears in body) then - bodyset[static_cast(x)] == true - else - bodyset[static_cast(x)] == false - if (have_peeked) then - next_token == the next token to be returned from get_token() - next_type == the type of token in peek_token !*/ public: // The name of this enum is irrelevant but on some compilers (gcc on MAC OS X) not having it named // causes an error for whatever reason enum some_random_name { END_OF_LINE, END_OF_FILE, IDENTIFIER, CHAR, NUMBER, WHITE_SPACE }; tokenizer_kernel_1 ( ); virtual ~tokenizer_kernel_1 ( ); void clear( ); void set_stream ( std::istream& in ); bool stream_is_set ( ) const; std::istream& get_stream ( ) const; void get_token ( int& type, std::string& token ); void swap ( tokenizer_kernel_1& item ); void set_identifier_token ( const std::string& head, const std::string& body ); int peek_type ( ) const; const std::string& peek_token ( ) const; const std::string get_identifier_head ( ) const; const std::string get_identifier_body ( ) const; const std::string lowercase_letters ( ) const; const std::string uppercase_letters ( ) const; const std::string numbers ( ) const; private: // restricted functions tokenizer_kernel_1(const tokenizer_kernel_1&); // copy constructor tokenizer_kernel_1& operator=(const tokenizer_kernel_1&); // assignment operator // data members std::istream* in; std::streambuf* streambuf; std::string head; std::string body; bool* headset; bool* bodyset; mutable std::string next_token; mutable int next_type; mutable bool have_peeked; }; inline void swap ( tokenizer_kernel_1& a, tokenizer_kernel_1& b ) { a.swap(b); } } #ifdef NO_MAKEFILE #include "tokenizer_kernel_1.cpp" #endif #endif // DLIB_TOKENIZER_KERNEl_1 ================================================ FILE: benchmarks/dlib/tokenizer/tokenizer_kernel_abstract.h ================================================ // Copyright (C) 2005 Davis E. King (davis@dlib.net) // License: Boost Software License See LICENSE.txt for the full license. #undef DLIB_TOKENIZER_KERNEl_ABSTRACT_ #ifdef DLIB_TOKENIZER_KERNEl_ABSTRACT_ #include #include namespace dlib { class tokenizer { /*! INITIAL VALUE stream_is_set() == false get_identifier_head() == "_" + lowercase_letters() + uppercase_letters() get_identifier_body() == "_" + lowercase_letters() + uppercase_letters() + numbers() WHAT THIS OBJECT REPRESENTS This object represents a simple tokenizer for textual data. BUFFERING This object is allowed to buffer data from the input stream. Thus if you clear it or switch streams (via calling set_stream()) any buffered data will be lost. TOKENS When picking out tokens the tokenizer will always extract the longest token it can. For example, if faced with the string "555" it will consider the three 5s to be a single NUMBER token not three smaller NUMBER tokens. Also note that no characters in the input stream are discarded. They will all be returned in the text of some token. Additionally, each character will never be returned more than once. This means that if you concatenated all returned tokens it would exactly reproduce the contents of the input stream. The tokens are defined as follows: END_OF_LINE This is a single character token and is always the '\n' character. END_OF_FILE This token represents the end of file. It doesn't have any actual characters associated with it. IDENTIFIER This is a multi-character token. It is defined as a string that begins with a character from get_identifier_head() and is followed by any number of characters from get_identifier_body(). NUMBER This is a multi-character token. It is defined as a sequence of numbers. WHITE_SPACE This is a multi character token. It is defined as a sequence of one or more spaces, carrage returns, and tabs. I.e. It is composed of characters from the following string " \r\t". CHAR This is a single character token. It matches anything that isn't part of one of the above tokens. !*/ public: enum { END_OF_LINE, END_OF_FILE, IDENTIFIER, CHAR, NUMBER, WHITE_SPACE }; tokenizer ( ); /*! ensures - #*this is properly initialized throws - std::bad_alloc !*/ virtual ~tokenizer ( ); /*! ensures - any resources associated with *this have been released !*/ void clear( ); /*! ensures - #*this has its initial value throws - std::bad_alloc If this exception is thrown then #*this is unusable until clear() is called and succeeds. !*/ void set_stream ( std::istream& in ); /*! ensures - #*this will read data from in and tokenize it - #stream_is_set() == true - #get_stream() == in !*/ bool stream_is_set ( ) const; /*! ensures - returns true if a stream has been associated with *this by calling set_stream() !*/ std::istream& get_stream ( ) const; /*! requires - stream_is_set() == true ensures - returns a reference to the istream object that *this is reading from. !*/ void get_token ( int& type, std::string& token ); /*! requires - stream_is_set() == true ensures - #token == the next token from the input stream get_stream() - #type == the type of the token in #token throws - bad_alloc If this exception is thrown then the call to this function will have no effect on *this but the values of #type and #token will be undefined. Additionally, some characters may have been read from the stream get_stream() and lost. !*/ int peek_type ( ) const; /*! requires - stream_is_set() == true ensures - returns the type of the token that will be returned from the next call to get_token() throws - bad_alloc If this exception is thrown then the call to this function will have no effect on *this. However, some characters may have been read from the stream get_stream() and lost. !*/ const std::string& peek_token ( ) const; /*! requires - stream_is_set() == true ensures - returns the text of the token that will be returned from the next call to get_token() throws - bad_alloc If this exception is thrown then the call to this function will have no effect on *this. However, some characters may have been read from the stream get_stream() and lost. !*/ void set_identifier_token ( const std::string& head, const std::string& body ); /*! requires - head.find_first_of(" \r\t\n0123456789") == std::string::npos (i.e. head doesn't contain any characters from the string " \r\t\n0123456789"). - body.find_frst_of(" \r\t\n") == std::string::npos (i.e. body doesn't contain any characters from the string " \r\t\n"). ensures - #get_identifier_head() == head - #get_identifier_body() == body throws - std::bad_alloc If this exception is thrown then #*this is unusable until clear() is called and succeeds. !*/ const std::string get_identifier_head ( ) const; /*! ensures - returns a string containing the characters that can be the start of an IDENTIFIER token. throws - std::bad_alloc If this exception is thrown then the call to this function has no effect. !*/ const std::string get_identifier_body ( ) const; /*! ensures - returns a string containing the characters that can appear in the body of an IDENTIFIER token. throws - std::bad_alloc If this exception is thrown then the call to this function has no effect. !*/ const std::string lowercase_letters ( ) const; /*! ensures - returns "abcdefghijklmnopqrstuvwxyz" throws - std::bad_alloc If this exception is thrown then the call to this function has no effect. !*/ const std::string uppercase_letters ( ) const; /*! ensures - returns "ABCDEFGHIJKLMNOPQRSTUVWXYZ" throws - std::bad_alloc If this exception is thrown then the call to this function has no effect. !*/ const std::string numbers ( ) const; /*! ensures - returns "0123456789" throws - std::bad_alloc If this exception is thrown then the call to this function has no effect. !*/ void swap ( tokenizer& item ); /*! ensures - swaps *this and item !*/ private: // restricted functions tokenizer(const tokenizer&); // copy constructor tokenizer& operator=(const tokenizer&); // assignment operator }; inline void swap ( tokenizer& a, tokenizer& b ) { a.swap(b); } /*! provides a global swap function !*/ } #endif // DLIB_TOKENIZER_KERNEl_ABSTRACT_ ================================================ FILE: benchmarks/dlib/tokenizer/tokenizer_kernel_c.h ================================================ // Copyright (C) 2003 Davis E. King (davis@dlib.net) // License: Boost Software License See LICENSE.txt for the full license. #ifndef DLIB_TOKENIZER_KERNEl_C_ #define DLIB_TOKENIZER_KERNEl_C_ #include "tokenizer_kernel_abstract.h" #include "../assert.h" #include #include namespace dlib { template < typename tokenizer > class tokenizer_kernel_c : public tokenizer { public: std::istream& get_stream ( ) const; void get_token ( int& type, std::string& token ); void set_identifier_token ( const std::string& head, const std::string& body ); int peek_type ( ) const; const std::string& peek_token ( ) const; }; template < typename tokenizer > inline void swap ( tokenizer_kernel_c& a, tokenizer_kernel_c& b ) { a.swap(b); } // ---------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------- // member function definitions // ---------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------- template < typename tokenizer > void tokenizer_kernel_c:: set_identifier_token ( const std::string& head, const std::string& body ) { using namespace std; // make sure requires clause is not broken DLIB_CASSERT( head.find_first_of(" \r\t\n0123456789") == string::npos && body.find_first_of(" \r\t\n") == string::npos , "\tvoid tokenizer::set_identifier_token()" << "\n\tyou can't define the IDENTIFIER token this way." << "\n\thead: " << head << "\n\tbody: " << body << "\n\tthis: " << this ); // call the real function tokenizer::set_identifier_token(head,body); } // ---------------------------------------------------------------------------------------- template < typename tokenizer > std::istream& tokenizer_kernel_c:: get_stream ( ) const { // make sure requires clause is not broken DLIB_CASSERT( this->stream_is_set() == true, "\tstd::istream& tokenizer::get_stream()" << "\n\tyou must set a stream for this object before you can get it" << "\n\tthis: " << this ); // call the real function return tokenizer::get_stream(); } // ---------------------------------------------------------------------------------------- template < typename tokenizer > int tokenizer_kernel_c:: peek_type ( ) const { // make sure requires clause is not broken DLIB_CASSERT( this->stream_is_set() == true, "\tint tokenizer::peek_type()" << "\n\tyou must set a stream for this object before you peek at what it contains" << "\n\tthis: " << this ); // call the real function return tokenizer::peek_type(); } // ---------------------------------------------------------------------------------------- template < typename tokenizer > const std::string& tokenizer_kernel_c:: peek_token ( ) const { // make sure requires clause is not broken DLIB_CASSERT( this->stream_is_set() == true, "\tint tokenizer::peek_token()" << "\n\tyou must set a stream for this object before you peek at what it contains" << "\n\tthis: " << this ); // call the real function return tokenizer::peek_token(); } // ---------------------------------------------------------------------------------------- template < typename tokenizer > void tokenizer_kernel_c:: get_token ( int& type, std::string& token ) { // make sure requires clause is not broken DLIB_CASSERT( this->stream_is_set() == true, "\tvoid tokenizer::get_token()" << "\n\tyou must set a stream for this object before you can get tokens from it." << "\n\tthis: " << this ); // call the real function tokenizer::get_token(type,token); } // ---------------------------------------------------------------------------------------- } #endif // DLIB_TOKENIZER_KERNEl_C_ ================================================ FILE: benchmarks/dlib/tokenizer.h ================================================ // Copyright (C) 2005 Davis E. King (davis@dlib.net) // License: Boost Software License See LICENSE.txt for the full license. #ifndef DLIB_TOKENIZEr_ #define DLIB_TOKENIZEr_ #include "tokenizer/tokenizer_kernel_1.h" #include "tokenizer/tokenizer_kernel_c.h" namespace dlib { class tokenizer { tokenizer() {} public: //----------- kernels --------------- // kernel_1a typedef tokenizer_kernel_1 kernel_1a; typedef tokenizer_kernel_c kernel_1a_c; }; } #endif // DLIB_TOKENIZEr_ ================================================ FILE: benchmarks/dlib/uintn.h ================================================ // Copyright (C) 2005 Davis E. King (davis@dlib.net) // License: Boost Software License See LICENSE.txt for the full license. #ifndef DLIB_UINtn_ #define DLIB_UINtn_ #include "assert.h" namespace dlib { /*! uint64 is a typedef for an unsigned integer that is exactly 64 bits wide. uint32 is a typedef for an unsigned integer that is exactly 32 bits wide. uint16 is a typedef for an unsigned integer that is exactly 16 bits wide. uint8 is a typedef for an unsigned integer that is exactly 8 bits wide. int64 is a typedef for an integer that is exactly 64 bits wide. int32 is a typedef for an integer that is exactly 32 bits wide. int16 is a typedef for an integer that is exactly 16 bits wide. int8 is a typedef for an integer that is exactly 8 bits wide. !*/ #ifdef __GNUC__ typedef unsigned long long uint64; typedef long long int64; #elif defined(__BORLANDC__) typedef unsigned __int64 uint64; typedef __int64 int64; #elif defined(_MSC_VER) typedef unsigned __int64 uint64; typedef __int64 int64; #else typedef unsigned long long uint64; typedef long long int64; #endif typedef unsigned short uint16; typedef unsigned int uint32; typedef unsigned char uint8; typedef short int16; typedef int int32; typedef char int8; // make sure these types have the right sizes on this platform COMPILE_TIME_ASSERT(sizeof(uint8) == 1); COMPILE_TIME_ASSERT(sizeof(uint16) == 2); COMPILE_TIME_ASSERT(sizeof(uint32) == 4); COMPILE_TIME_ASSERT(sizeof(uint64) == 8); COMPILE_TIME_ASSERT(sizeof(int8) == 1); COMPILE_TIME_ASSERT(sizeof(int16) == 2); COMPILE_TIME_ASSERT(sizeof(int32) == 4); COMPILE_TIME_ASSERT(sizeof(int64) == 8); template struct unsigned_type; template struct unsigned_type { typedef uint8 type; }; template struct unsigned_type { typedef uint16 type; }; template struct unsigned_type { typedef uint32 type; }; template struct unsigned_type { typedef uint64 type; }; /*! ensures - sizeof(unsigned_type::type) == sizeof(T) - unsigned_type::type is an unsigned integral type !*/ template T zero_extend_cast( const U val ) /*! requires - U and T are integral types ensures - let ut be a typedef for unsigned_type::type - return static_cast(static_cast(val)); !*/ { typedef typename unsigned_type::type ut; return static_cast(static_cast(val)); } } #endif // DLIB_UINtn_ ================================================ FILE: benchmarks/dlib/unicode/unicode.h ================================================ // Copyright (C) 2007 Davis E. King (davis@dlib.net), and Nils Labugt // License: Boost Software License See LICENSE.txt for the full license. #ifndef DLIB_UNICODe_H_ #define DLIB_UNICODe_H_ #include "../uintn.h" #include "../algs.h" #include "unicode_abstract.h" #include #include #include namespace dlib { // ---------------------------------------------------------------------------------------- typedef uint32 unichar; #if defined(__GNUC__) && __GNUC__ < 4 && __GNUC_MINOR__ < 4 struct unichar_traits { typedef dlib::unichar char_type; typedef dlib::unichar int_type; typedef std::streamoff off_type; typedef std::streampos pos_type; typedef std::mbstate_t state_type; static void assign(char_type& c1, const char_type& c2) { c1 = c2; } static bool eq(const char_type& c1, const char_type& c2) { return c1 == c2; } static bool lt(const char_type& c1, const char_type& c2) { return c1 < c2; } static int compare(const char_type* s1, const char_type* s2, size_t n) { for (size_t i = 0; i < n; ++i) { if (s1[i] < s2[i]) return -1; else if (s1[i] > s2[i]) return 1; } return 0; } static size_t length(const char_type* s) { size_t i = 0; while (s[i] != 0) ++i; return i; } static const char_type* find(const char_type* s, size_t n, const char_type& a) { for (size_t i = 0; i < n; ++i) { if (s[i] == a) { return s+i; } } return 0; } static char_type* move(char_type* s1, const char_type* s2, size_t n) { return static_cast(std::memmove(s1, s2, sizeof(char_type)*n)); } static char_type* copy(char_type* s1, const char_type* s2, size_t n) { for (size_t i = 0; i < n; ++i) s1[i] = s2[i]; return s1; } static char_type* assign(char_type* s, size_t n, char_type a) { for (size_t i = 0; i < n; ++i) s[i] = a; return s; } static int_type not_eof(const int_type& c) { if (!eq_int_type(c,eof())) return to_int_type(c); else return 0; } static char_type to_char_type(const int_type& c) { return static_cast(c); } static int_type to_int_type(const char_type& c) { return zero_extend_cast(c); } static bool eq_int_type(const int_type& c1, const int_type& c2) { return c1 == c2; } static int_type eof() { return static_cast(EOF); } }; typedef std::basic_string ustring; #else typedef std::basic_string ustring; #endif // ---------------------------------------------------------------------------------------- namespace unicode_helpers { template < typename charT > int u8_to_u32( charT& result, std::istream& in ) /*! ensures - if (there just wasn't any more data and we hit EOF) then - returns 0 - else if (we decoded another character without error) then - #result == the decoded character - returns the number of bytes consumed to make this character - else - some error occurred - returns -1 !*/ { int val = in.get(); if (val == EOF) return 0; unichar ch[4]; ch[0] = zero_extend_cast(val); if ( ch[0] < 0x80 ) { result = static_cast(ch[0]); return 1; } if ( ( ch[0] & ~0x3F ) == 0x80 ) { // invalid leading byte return -1; } if ( ( ch[0] & ~0x1F ) == 0xC0 ) { val = in.get(); if ( val == EOF ) return -1; ch[1] = zero_extend_cast(val); if ( ( ch[1] & ~0x3F ) != 0x80 ) return -1; // invalid tail if ( ( ch[0] & ~0x01 ) == 0xC0 ) return -1; // overlong form ch[0] &= 0x1F; ch[1] &= 0x3F; result = static_cast(( ch[0] << 6 ) | ch[1]); return 2; } if ( ( ch[0] & ~0x0F ) == 0xE0 ) { for ( unsigned n = 1;n < 3;n++ ) { val = in.get(); if ( val == EOF ) return -1; ch[n] = zero_extend_cast(val); if ( ( ch[n] & ~0x3F ) != 0x80 ) return -1; // invalid tail ch[n] &= 0x3F; } ch[0] &= 0x0F; result = static_cast(( ch[0] << 12 ) | ( ch[1] << 6 ) | ch[2]); if ( result < 0x0800 ) return -1; // overlong form if ( result >= 0xD800 && result < 0xE000 ) return -1; // invalid character (UTF-16 surrogate pairs) if ( result >= 0xFDD0 && result <= 0xFDEF ) return -1; // noncharacter if ( result >= 0xFFFE ) return -1; // noncharacter return 3; } if ( ( ch[0] & ~0x07 ) == 0xF0 ) { for ( unsigned n = 1;n < 4;n++ ) { val = in.get(); if ( val == EOF ) return -1; ch[n] = zero_extend_cast(val); if ( ( ch[n] & ~0x3F ) != 0x80 ) return -1; // invalid tail ch[n] &= 0x3F; } if ( ( ch[0] ^ 0xF6 ) < 4 ) return -1; ch[0] &= 0x07; result = static_cast(( ch[0] << 18 ) | ( ch[1] << 12 ) | ( ch[2] << 6 ) | ch[3]); if ( result < 0x10000 ) return -1; // overlong form if ( (result & 0xFFFF) >= 0xFFFE ) return -1; // noncharacter return 4; } return -1; } // ------------------------------------------------------------------------------------ template class basic_utf8_streambuf : public std::basic_streambuf { public: basic_utf8_streambuf ( std::ifstream& fin_ ) : fin(fin_) { this->setg(in_buffer+max_putback, in_buffer+max_putback, in_buffer+max_putback); } protected: typedef typename std::basic_streambuf::int_type int_type; // input functions int_type underflow( ) { if (this->gptr() < this->egptr()) { return zero_extend_cast(*this->gptr()); } int num_put_back = static_cast(this->gptr() - this->eback()); if (num_put_back > max_putback) { num_put_back = max_putback; } // copy the putback characters into the putback end of the in_buffer std::memmove(in_buffer+(max_putback-num_put_back), this->gptr()-num_put_back, num_put_back); // fill the buffer with characters int n = in_buffer_size-max_putback; int i; for (i = 0; i < n; ++i) { charT ch; if (unicode_helpers::u8_to_u32(ch,fin) > 0) { (in_buffer+max_putback)[i] = ch; } else { break; } } if (i == 0) { // an error occurred or we hit EOF return EOF; } // reset in_buffer pointers this->setg (in_buffer+(max_putback-num_put_back), in_buffer+max_putback, in_buffer+max_putback+i); return zero_extend_cast(*this->gptr()); } private: std::ifstream& fin; static const int max_putback = 4; static const int in_buffer_size = 10; charT in_buffer[in_buffer_size]; }; } // ---------------------------------------------------------------------------------------- #if defined(__GNUC__) && __GNUC__ >= 6 #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wmisleading-indentation" #endif template bool is_combining_char( const T ch_ ) { const unichar ch = zero_extend_cast(ch_); if ( ch < 0x300 ) return false; if ( ch < 0x370 ) return true; if ( ch < 0x800 ) { if ( ch < 0x483 )return false;if ( ch < 0x48A )return true; if ( ch < 0x591 )return false;if ( ch < 0x5D0 ) { if ( ch == 0x5C0 )return false; if ( ch == 0x5C3 )return false; if ( ch == 0x5C6 )return false; return true; } if ( ch < 0x610 )return false;if ( ch < 0x616 )return true; if ( ch < 0x64B )return false;if ( ch < 0x660 )return true; if ( ch == 0x670 )return true; if ( ch < 0x6D6 )return false;if ( ch < 0x6EE ) { if ( ch == 0x6DD )return false; if ( ch == 0x6E5 )return false; if ( ch == 0x6E6 )return false; if ( ch == 0x6E9 )return false; return true; } if ( ch == 0x711 )return true; if ( ch < 0x730 )return false;if ( ch < 0x74B )return true; if ( ch < 0x7A6 )return false;if ( ch < 0x7B1 )return true; if ( ch < 0x7EB )return false;if ( ch < 0x7F4 )return true; return false; } if ( ch < 0xA00 ) { if ( ch < 0x901 )return false;if ( ch < 0x904 )return true; if ( ch < 0x93C )return false;if ( ch < 0x955 ) { if ( ch == 0x93D )return false; if ( ch == 0x950 )return false; return true; } if ( ch < 0x962 )return false;if ( ch < 0x964 )return true; if ( ch < 0x981 )return false;if ( ch < 0x984 )return true; if ( ch < 0x9BC )return false;if ( ch < 0x9D8 ) { if ( ch == 0x9BD )return false; if ( ch == 0x9CE )return false; return true; } if ( ch < 0x9E2 )return false;if ( ch < 0x9E4 )return true; return false; } if ( ch < 0xC00 ) { if ( ch < 0xA01 )return false;if ( ch < 0xA04 )return true; if ( ch < 0xA3C )return false;if ( ch < 0xA4E )return true; if ( ch < 0xA70 )return false;if ( ch < 0xA72 )return true; if ( ch < 0xA81 )return false;if ( ch < 0xA84 )return true; if ( ch < 0xABC )return false;if ( ch < 0xACE ) { if ( ch == 0xABD )return false; return true; } if ( ch < 0xAE2 )return false;if ( ch < 0xAE4 )return true; if ( ch < 0xB01 )return false;if ( ch < 0xB04 )return true; if ( ch < 0xB3C )return false;if ( ch < 0xB58 ) { if ( ch == 0xB3D )return false; return true; } if ( ch == 0xB82 )return true; if ( ch < 0xBBE )return false;if ( ch < 0xBD8 )return true; if ( ch == 0xBF4 )return true; if ( ch == 0xBF8 )return true; return false; } if(ch < 0xE00) { if ( ch < 0xC01 )return false;if ( ch < 0xC04 )return true; if ( ch < 0xC3E )return false;if ( ch < 0xC57 )return true; if ( ch < 0xC82 )return false;if ( ch < 0xC84 )return true; if ( ch < 0xCBC )return false;if ( ch < 0xCD7 ) { if ( ch == 0xCBD )return false; return true; } if ( ch < 0xCE2 )return false;if ( ch < 0xCE4 )return true; if ( ch < 0xD02 )return false;if ( ch < 0xD04 )return true; if ( ch < 0xD3E )return false;if ( ch < 0xD58 )return true; if ( ch < 0xD82 )return false;if ( ch < 0xD84 )return true; if ( ch < 0xDCA )return false;if ( ch < 0xDF4 )return true; return false; } if(ch < 0x1000) { if ( ch == 0xE31 )return true; if ( ch < 0xE34 )return false;if ( ch < 0xE3B )return true; if ( ch < 0xE47 )return false;if ( ch < 0xE4F )return true; if ( ch == 0xEB1 )return true; if ( ch < 0xEB4 )return false;if ( ch < 0xEBD )return true; if ( ch < 0xEC8 )return false;if ( ch < 0xECE )return true; if ( ch < 0xF18 )return false;if ( ch < 0xF1A )return true; if ( ch == 0xF35 )return true; if ( ch == 0xF37 )return true; if ( ch == 0xF39 )return true; if ( ch < 0xF3E )return false;if ( ch < 0xF40 )return true; if ( ch < 0xF71 )return false;if ( ch < 0xF88 ) { if ( ch == 0xF85 )return false; return true; } if ( ch < 0xF90 )return false;if ( ch < 0xFBD )return true; if ( ch == 0xFC6 )return true; return false; } if ( ch < 0x1800 ) { if ( ch < 0x102C )return false;if ( ch < 0x1040 )return true; if ( ch < 0x1056 )return false;if ( ch < 0x105A )return true; if ( ch == 0x135F )return true; if ( ch < 0x1712 )return false;if ( ch < 0x1715 )return true; if ( ch < 0x1732 )return false;if ( ch < 0x1735 )return true; if ( ch < 0x1752 )return false;if ( ch < 0x1754 )return true; if ( ch < 0x1772 )return false;if ( ch < 0x1774 )return true; if ( ch < 0x17B6 )return false;if ( ch < 0x17D4 )return true; if ( ch == 0x17DD )return true; return false; } if(ch < 0x2000) { if ( ch < 0x180B )return false;if ( ch < 0x180E )return true; if ( ch == 0x18A9 )return true; if ( ch < 0x1920 )return false;if ( ch < 0x193C )return true; if ( ch < 0x19B0 )return false;if ( ch < 0x19C1 )return true; if ( ch < 0x19C8 )return false;if ( ch < 0x19CA )return true; if ( ch < 0x1A17 )return false;if ( ch < 0x1A1C )return true; if ( ch < 0x1B00 )return false;if ( ch < 0x1B05 )return true; if ( ch < 0x1B34 )return false;if ( ch < 0x1B45 )return true; if ( ch < 0x1B6B )return false;if ( ch < 0x1B74 )return true; if ( ch < 0x1DC0 )return false;if ( ch < 0x1E00 )return true; return false; } if ( ch < 0x20D0 )return false;if ( ch < 0x2100 )return true; if ( ch < 0x302A )return false;if ( ch < 0x3030 )return true; if ( ch < 0x3099 )return false;if ( ch < 0x309B )return true; if ( ch == 0xA802 )return true; if ( ch == 0xA806 )return true; if ( ch == 0xA80B )return true; if ( ch < 0xA823 )return false;if ( ch < 0xA828 )return true; if ( ch == 0xFB1E )return true; if ( ch < 0xFE00 )return false;if ( ch < 0xFE10 )return true; if ( ch < 0xFE20 )return false;if ( ch < 0xFE30 )return true; if ( ch < 0x10A01 )return false;if ( ch < 0x10A10 )return true; if ( ch < 0x10A38 )return false;if ( ch < 0x10A40 )return true; if ( ch < 0x1D165 )return false;if ( ch < 0x1D16A )return true; if ( ch < 0x1D16D )return false;if ( ch < 0x1D173 )return true; if ( ch < 0x1D17B )return false;if ( ch < 0x1D183 )return true; if ( ch < 0x1D185 )return false;if ( ch < 0x1D18C )return true; if ( ch < 0x1D1AA )return false;if ( ch < 0x1D1AE )return true; if ( ch < 0x1D242 )return false;if ( ch < 0x1D245 )return true; if ( ch < 0xE0100 )return false;if ( ch < 0xE01F0 )return true; return false; } #if defined(__GNUC__) && __GNUC__ >= 6 #pragma GCC diagnostic pop #endif // ---------------------------------------------------------------------------------------- class invalid_utf8_error : public error { public: invalid_utf8_error():error(EUTF8_TO_UTF32) {} }; inline const ustring convert_utf8_to_utf32 ( const std::string& str ) { using namespace unicode_helpers; ustring temp; std::istringstream sin(str); temp.reserve(str.size()); int status; unichar ch; while ( (status = u8_to_u32(ch,sin)) > 0) temp.push_back(ch); if (status < 0) throw invalid_utf8_error(); return temp; } // ---------------------------------------------------------------------------------------- bool is_surrogate(unichar ch); unichar surrogate_pair_to_unichar(unichar first, unichar second); void unichar_to_surrogate_pair(unichar unicode, unichar &first, unichar &second); const ustring convert_wstring_to_utf32 ( const std::wstring &wstr ); const std::wstring convert_utf32_to_wstring ( const ustring &src ); const std::wstring convert_mbstring_to_wstring ( const std::string &src ); const std::string convert_wstring_to_mbstring( const std::wstring &src ); // ---------------------------------------------------------------------------------------- template class basic_utf8_ifstream : public std::basic_istream { public: basic_utf8_ifstream ( ) : std::basic_istream(&buf), buf(fin) {} basic_utf8_ifstream ( const char* file_name, std::ios_base::openmode mode = std::ios::in ) : std::basic_istream(&buf), buf(fin) { fin.open(file_name,mode); // make this have the same error state as fin this->clear(fin.rdstate()); } basic_utf8_ifstream ( const std::string& file_name, std::ios_base::openmode mode = std::ios::in ) : std::basic_istream(&buf), buf(fin) { fin.open(file_name.c_str(),mode); // make this have the same error state as fin this->clear(fin.rdstate()); } void open( const std::string& file_name, std::ios_base::openmode mode = std::ios::in ) { open(file_name.c_str(),mode); } void open ( const char* file_name, std::ios_base::openmode mode = std::ios::in ) { fin.close(); fin.clear(); fin.open(file_name,mode); // make this have the same error state as fin this->clear(fin.rdstate()); } void close ( ) { fin.close(); // make this have the same error state as fin this->clear(fin.rdstate()); } private: std::ifstream fin; unicode_helpers::basic_utf8_streambuf buf; }; typedef basic_utf8_ifstream utf8_uifstream; typedef basic_utf8_ifstream utf8_wifstream; // ---------------------------------------------------------------------------------------- } #ifdef NO_MAKEFILE #include "unicode.cpp" #endif #endif // DLIB_UNICODe_H_ ================================================ FILE: benchmarks/dlib/unicode/unicode_abstract.h ================================================ // Copyright (C) 2007 Davis E. King (davis@dlib.net), and Nils Labugt // License: Boost Software License See LICENSE.txt for the full license. #undef DLIB_UNICODe_ABSTRACT_H_ #ifdef DLIB_UNICODe_ABSTRACT_H_ #include "../uintn.h" #include "../error.h" #include #include namespace dlib { // ---------------------------------------------------------------------------------------- // a typedef for an unsigned 32bit integer to hold our UNICODE characters typedef uint32 unichar; // a typedef for a string object to hold our UNICODE strings typedef std::basic_string ustring; // ---------------------------------------------------------------------------------------- template bool is_combining_char( const T ch_ ); /*! ensures - if (ch_ is a unicode combining character) then - returns true - else - returns false !*/ bool is_surrogate( unichar ch ); /*! ensures - if (ch is a unicode surrogate character) then - returns true - else - returns false !*/ unichar surrogate_pair_to_unichar( unichar first, unichar second ); /*! requires - 0xD800 <= first < 0xDC00 - 0xDC00 <= second < 0xE000 - is_surrogate(first) == true - is_surrogate(second) == true ensures - converts two surrogates into one unicode character !*/ void unichar_to_surrogate_pair( unichar ch, unichar& first, unichar& second ); /*! requires - ch >= 0x10000 (i.e. is not in Basic Multilingual Plane) ensures - surrogate_pair_to_unichar(#first,#second) == ch (i.e. converts ch into two surrogate characters) !*/ // ---------------------------------------------------------------------------------------- class invalid_utf8_error : public error { public: invalid_utf8_error():error(EUTF8_TO_UTF32) {} }; const ustring convert_utf8_to_utf32 ( const std::string& str ); /*! ensures - if (str is a valid UTF-8 encoded string) then - returns a copy of str that has been converted into a unichar string - else - throws invalid_utf8_error !*/ // ---------------------------------------------------------------------------------------- const ustring convert_wstring_to_utf32 ( const std::wstring &wstr ); /*! requires - wstr is a valid UTF-16 string when sizeof(wchar_t) == 2 - wstr is a valid UTF-32 string when sizeof(wchar_t) == 4 ensures - converts wstr into UTF-32 string !*/ // ---------------------------------------------------------------------------------------- const std::wstring convert_utf32_to_wstring ( const ustring &str ); /*! requires - str is a valid UTF-32 encoded string ensures - converts str into wstring whose encoding is UTF-16 when sizeof(wchar_t) == 2 - converts str into wstring whose encoding is UTF-32 when sizeof(wchar_t) == 4 !*/ // ---------------------------------------------------------------------------------------- const std::wstring convert_mbstring_to_wstring ( const std::string &str ); /*! requires - str is a valid multibyte string whose encoding is same as current locale setting ensures - converts str into wstring whose encoding is UTF-16 when sizeof(wchar_t) == 2 - converts str into wstring whose encoding is UTF-32 when sizeof(wchar_t) == 4 !*/ // ---------------------------------------------------------------------------------------- const std::string convert_wstring_to_mbstring ( const std::wstring &src ); /*! requires - str is a valid wide character string string whose encoding is same as current locale setting ensures - returns a multibyte encoded version of the given string !*/ // ---------------------------------------------------------------------------------------- template < typename charT > class basic_utf8_ifstream : public std::basic_istream { /*! WHAT THIS OBJECT REPRESENTS This object represents an input file stream much like the normal std::ifstream except that it knows how to read UTF-8 data. So when you read characters out of this stream it will automatically convert them from the UTF-8 multibyte encoding into a fixed width wide character encoding. !*/ public: basic_utf8_ifstream ( ); /*! ensures - constructs an input stream that isn't yet associated with a file. !*/ basic_utf8_ifstream ( const char* file_name, std::ios_base::openmode mode = std::ios::in ); /*! ensures - tries to open the given file for reading by this stream - mode is interpreted exactly the same was as the open mode argument used by std::ifstream. !*/ basic_utf8_ifstream ( const std::string& file_name, std::ios_base::openmode mode = std::ios::in ); /*! ensures - tries to open the given file for reading by this stream - mode is interpreted exactly the same was as the open mode argument used by std::ifstream. !*/ void open( const std::string& file_name, std::ios_base::openmode mode = std::ios::in ); /*! ensures - tries to open the given file for reading by this stream - mode is interpreted exactly the same was as the open mode argument used by std::ifstream. !*/ void open ( const char* file_name, std::ios_base::openmode mode = std::ios::in ); /*! ensures - tries to open the given file for reading by this stream - mode is interpreted exactly the same was as the open mode argument used by std::ifstream. !*/ void close ( ); /*! ensures - any file opened by this stream has been closed !*/ }; typedef basic_utf8_ifstream utf8_uifstream; typedef basic_utf8_ifstream utf8_wifstream; // ---------------------------------------------------------------------------------------- } #endif // DLIB_UNICODe_ABSTRACT_H_ ================================================ FILE: benchmarks/dlib/unicode.h ================================================ // Copyright (C) 2007 Davis E. King (davis@dlib.net) // License: Boost Software License See LICENSE.txt for the full license. #ifndef DLIB_UNICODe_TOP_ #define DLIB_UNICODe_TOP_ #include "unicode/unicode.h" #endif // DLIB_UNICODe_TOP_ ================================================ FILE: benchmarks/dlib/unordered_pair.h ================================================ // Copyright (C) 2010 Davis E. King (davis@dlib.net) // License: Boost Software License See LICENSE.txt for the full license. #ifndef DLIB_UNORDERED_PAiR_Hh_ #define DLIB_UNORDERED_PAiR_Hh_ #include "serialize.h" namespace dlib { // ---------------------------------------------------------------------------------------- template < typename T > struct unordered_pair { /*! REQUIREMENTS ON T T must be default constructable, copyable, and comparable using operator < and == WHAT THIS OBJECT REPRESENTS This object is very similar to the std::pair struct except unordered_pair is only capable of representing an unordered set of two items rather than an ordered list of two items like std::pair. This is best illustrated by example. Suppose we have the following five variables: std::pair p1(1, 5), p2(5,1); unordered_pair up1(1,5), up2(5,1), up3(6,7); Then it is the case that: up1 == up2 up1 != up3 p1 != p2 So the unordered_pair doesn't care about the order of the arguments. In this case, up1 and up2 are both equivalent. !*/ typedef T type; typedef T first_type; typedef T second_type; const T first; const T second; unordered_pair() : first(), second() /*! ensures - #first and #second are default initialized !*/ {} unordered_pair( const T& a, const T& b ) : first( a < b ? a : b), second(a < b ? b : a) /*! ensures - #first <= #second - #first and #second contain copies of the items a and b. !*/ {} template unordered_pair ( const unordered_pair & p ) : first(p.first), second(p.second) /*! ensures - #*this is a copy of p !*/ {} unordered_pair& operator= ( const unordered_pair& item ) /*! ensures - #*this == item !*/ { const_cast(first) = item.first; const_cast(second) = item.second; return *this; } }; // ---------------------------------------------------------------------------------------- template bool operator==(const unordered_pair& a, const unordered_pair & b) { return a.first == b.first && a.second == b.second; } template bool operator!=(const unordered_pair& a, const unordered_pair & b) { return !(a == b); } template bool operator<(const unordered_pair& a, const unordered_pair& b) { return (a.first < b.first || (!(b.first < a.first) && a.second < b.second)); } template bool operator>(const unordered_pair& a, const unordered_pair & b) { return b < a; } template bool operator<=(const unordered_pair& a, const unordered_pair & b) { return !(b < a); } template bool operator>=(const unordered_pair& a, const unordered_pair & b) { return !(a < b); } template unordered_pair make_unordered_pair (const T& a, const T& b) { return unordered_pair(a,b); } // ---------------------------------------------------------------------------------------- template void serialize ( const unordered_pair& item, std::ostream& out ) { try { serialize(item.first,out); serialize(item.second,out); } catch (serialization_error& e) { throw serialization_error(e.info + "\n while serializing object of type unordered_pair"); } } template void deserialize ( unordered_pair& item, std::istream& in ) { try { T a, b; deserialize(a,in); deserialize(b,in); item = make_unordered_pair(a,b); } catch (serialization_error& e) { throw serialization_error(e.info + "\n while deserializing object of type unordered_pair"); } } // ---------------------------------------------------------------------------------------- } #endif // DLIB_UNORDERED_PAiR_Hh_ ================================================ FILE: benchmarks/dlib/vectorstream/unserialize.h ================================================ // Copyright (C) 2016 Davis E. King (davis@dlib.net) // License: Boost Software License See LICENSE.txt for the full license. #ifndef DLIB_uNSERIALIZE_Hh_ #define DLIB_uNSERIALIZE_Hh_ #include "unserialize_abstract.h" #include "../serialize.h" #include "../algs.h" #include "vectorstream.h" namespace dlib { class unserialize : public std::istream { class mystreambuf : public std::streambuf { typedef std::vector::size_type size_type; size_type read_pos; // buffer[read_pos] == next byte to read from buffer public: std::vector buffer; std::istream& str; template mystreambuf( const T& item, std::istream& str_ ) : read_pos(0), str(str_) { // put the item into our buffer. vectorstream vstr(buffer); serialize(item, vstr); } // ------------------------ INPUT FUNCTIONS ------------------------ int_type underflow( ) { if (read_pos < buffer.size()) return static_cast(buffer[read_pos]); else return str.peek(); } int_type uflow( ) { if (read_pos < buffer.size()) return static_cast(buffer[read_pos++]); else return str.get(); } std::streamsize xsgetn ( char* s, std::streamsize n ) { if (read_pos < buffer.size()) { const size_type num = std::min(n, buffer.size()-read_pos); std::memcpy(s, &buffer[read_pos], num); read_pos += num; return num; } else { return str.rdbuf()->sgetn(s,n); } return 0; } }; public: template unserialize ( const T& item, std::istream& str ) : std::istream(&buf), buf(item, str) {} private: mystreambuf buf; }; } #endif // DLIB_uNSERIALIZE_Hh_ ================================================ FILE: benchmarks/dlib/vectorstream/unserialize_abstract.h ================================================ // Copyright (C) 2016 Davis E. King (davis@dlib.net) // License: Boost Software License See LICENSE.txt for the full license. #undef DLIB_uNSERIALIZE_ABSTRACT_Hh_ #ifdef DLIB_uNSERIALIZE_ABSTRACT_Hh_ #include "../serialize.h" #include namespace dlib { class unserialize : public std::istream { /*! WHAT THIS OBJECT REPRESENTS This is a tool that allows you to effectively put an object you just deserialized from a stream back into the stream. Its use is best illustrated via an example. void example(std::istream& in) { // Suppose that in contains serialized copies of three "some_type" // objects. You could read them as follows: some_type obj1, obj2, obj3; deserialize(obj1, in); // reads obj1 from stream. deserialize(obj2, in); // reads obj2 from stream. unserialize in2(obj2, in); // make the in2 stream that has obj2 at its front. deserialize(obj2, in2); // reads obj2 from stream again. deserialize(obj3, in2); // reads obj3 from stream. } The reason unserialize is useful is because it allows you to peek at the next object in a stream and potentially do something different based on what object is coming next, but still allowing subsequent deserialize() statements to be undisturbed by the fact that you peeked at the data. !*/ public: template unserialize ( const T& item, std::istream& in ); /*! requires - T must be serializable ensures - The bytes in this stream begin with a serialized copy of item followed immediately by the bytes in the given istream. !*/ }; } #endif // DLIB_uNSERIALIZE_ABSTRACT_Hh_ ================================================ FILE: benchmarks/dlib/vectorstream/vectorstream.h ================================================ // Copyright (C) 2012 Davis E. King (davis@dlib.net) // License: Boost Software License See LICENSE.txt for the full license. #ifndef DLIB_VECTORStREAM_Hh_ #define DLIB_VECTORStREAM_Hh_ #include "vectorstream_abstract.h" #include #include #include #include #include #include "../algs.h" #include "../assert.h" #ifdef _MSC_VER // Disable the warning about inheriting from std::iostream 'via dominance' since this warning is a warning about // visual studio conforming to the standard and is ignorable. See http://connect.microsoft.com/VisualStudio/feedback/details/733720/inheriting-from-std-fstream-produces-c4250-warning // for further details if interested. #pragma warning(disable : 4250) #endif // _MSC_VER namespace dlib { class vectorstream : public std::iostream { class vector_streambuf : public std::streambuf { typedef std::vector::size_type size_type; size_type read_pos; // buffer[read_pos] == next byte to read from buffer public: std::vector& buffer; vector_streambuf( std::vector& buffer_ ) : read_pos(0), buffer(buffer_) {} void seekg(size_type pos) { read_pos = pos; } pos_type seekpos(pos_type pos, std::ios_base::openmode mode = std::ios_base::in | std::ios_base::out) { return seekoff(pos - pos_type(off_type(0)), std::ios_base::beg, mode); } pos_type seekoff(off_type off, std::ios_base::seekdir dir, std::ios_base::openmode mode = std::ios_base::in | std::ios_base::out ) { DLIB_CASSERT(mode == std::ios_base::in, "vectorstream does not support std::ios_base::out"); switch (dir) { case std::ios_base::beg: read_pos = off; break; case std::ios_base::cur: read_pos += off; break; case std::ios_base::end: read_pos = buffer.size() + off; break; default: break; } return pos_type(read_pos); } // ------------------------ OUTPUT FUNCTIONS ------------------------ int_type overflow ( int_type c) { if (c != EOF) buffer.push_back(static_cast(c)); return c; } std::streamsize xsputn ( const char* s, std::streamsize num) { buffer.insert(buffer.end(), s, s+num); return num; } // ------------------------ INPUT FUNCTIONS ------------------------ int_type underflow( ) { if (read_pos < buffer.size()) return static_cast(buffer[read_pos]); else return EOF; } int_type uflow( ) { if (read_pos < buffer.size()) return static_cast(buffer[read_pos++]); else return EOF; } int_type pbackfail( int_type c ) { // if they are trying to push back a character that they didn't read last // that is an error const unsigned long prev = read_pos-1; if (c != EOF && prev < buffer.size() && c != static_cast(buffer[prev])) { return EOF; } read_pos = prev; return 1; } std::streamsize xsgetn ( char* s, std::streamsize n ) { if (read_pos < buffer.size()) { const size_type num = std::min(n, buffer.size()-read_pos); std::memcpy(s, &buffer[read_pos], num); read_pos += num; return num; } return 0; } }; public: vectorstream ( std::vector& buffer ) : std::iostream(&buf), buf(buffer) {} vectorstream(const vectorstream& ori) = delete; vectorstream(vectorstream&& item) = delete; private: vector_streambuf buf; }; } #endif // DLIB_VECTORStREAM_Hh_ ================================================ FILE: benchmarks/dlib/vectorstream/vectorstream_abstract.h ================================================ // Copyright (C) 2012 Davis E. King (davis@dlib.net) // License: Boost Software License See LICENSE.txt for the full license. #undef DLIB_VECTORStREAM_ABSTRACT_Hh_ #ifdef DLIB_VECTORStREAM_ABSTRACT_Hh_ #include #include namespace dlib { class vectorstream : public std::iostream { /*! WHAT THIS OBJECT REPRESENTS This is an iostream object that reads and writes from an in-memory buffer. It functions very much the same way as the std::stringstream object. However, while the std::stringstream holds its buffer internally and it can only be accessed by copying it out, the vectorstream uses an external std::vector as its buffer. That is, it holds a reference to an external vector and does not contain any internal buffers of its own. This object is useful as a slightly more efficient alternative to the std::stringstream since you can avoid the overhead of copying buffer contents to and from the stream. This is particularly useful when used as a source or target for serialization routines. !*/ public: vectorstream ( std::vector& buffer ); /*! ensures - This object will use the given vector as its read/write buffer. That is: - Any data written to this stream will be appended to the given buffer - Any data read from this stream is read from the given buffer, starting with buffer[0], then buffer[1], and so on. Just like std::stringstream, writes to the stream do not move the position of the next byte that will be read from the buffer. - This constructor does not copy the buffer. Only a reference to it will be used. Therefore, any time data is written to this stream it will immediately show up in the buffer. !*/ std::istream& seekg ( std::streampos pos ); /*! ensures - The next read from this object will read from the position buffer[pos], where buffer is the std::vector given to this object's constructor. Note that if pos >= buffer.size() then the next read will simply return EOF. - returns *this !*/ }; } #endif // DLIB_VECTORStREAM_ABSTRACT_Hh_ ================================================ FILE: benchmarks/dlib/vectorstream.h ================================================ // Copyright (C) 2012 Davis E. King (davis@dlib.net) // License: Boost Software License See LICENSE.txt for the full license. #ifndef DLIB_VECTORSTReAMh_ #define DLIB_VECTORSTReAMh_ #include "vectorstream/vectorstream.h" #include "vectorstream/unserialize.h" #endif // DLIB_VECTORSTReAMh_ ================================================ FILE: benchmarks/dlib/windows_magic.h ================================================ // Copyright (C) 2006 Davis E. King (davis@dlib.net) // License: Boost Software License See LICENSE.txt for the full license. #ifndef DLIB_WINDOWS_MAGIc_ #define DLIB_WINDOWS_MAGIc_ #include "platform.h" #ifdef WIN32 // This file contains all the magical #defines you have to setup before you // include the windows header files. #ifndef NOMINMAX #define NOMINMAX // prevent windows from messing with std::min and std::max #endif // Prevent windows from #defining IN or OUT #ifndef _NO_W32_PSEUDO_MODIFIERS #define _NO_W32_PSEUDO_MODIFIERS #endif // now just for good measure undefine min and max if they are defined #ifdef min #undef min #endif #ifdef max #undef max #endif #ifdef NO_MAKEFILE // only define this if all the cpp files are going to be sucked into the headers // because otherwise we don't need it since everything is isolated in the sockets // cpp file and this declaration for _WINSOCKAPI_ appears there also. #ifndef _WINSOCKAPI_ #define _WINSOCKAPI_ /* Prevent inclusion of winsock.h in windows.h */ #endif #endif // This is something stupid you have to do to make visual studio include the right // stuff. I don't really know what the deal is with this. #if _WIN32_WINNT < 0x0500 #undef _WIN32_WINNT #define _WIN32_WINNT 0x0500 #endif #endif // WIN32 #endif // DLIB_WINDOWS_MAGIc_ ================================================ FILE: benchmarks/dlibqueue.h ================================================ #pragma once #include #include "dlib/pipe.h" #include "wrappers.h" template struct DlibQueueWrapper { public: typedef DummyToken producer_token_t; typedef DummyToken consumer_token_t; public: DlibQueueWrapper() : q(1024*1024*1024) { } template inline bool enqueue(U&& item) { return q.enqueue(std::forward(item)); } inline bool try_dequeue(T& item) { return q.dequeue_or_timeout(item, 0); } // Dummy token methods (not used) bool enqueue(producer_token_t const&, T const&) { return false; } bool try_enqueue(producer_token_t, T const&) { return false; } bool try_dequeue(consumer_token_t, T& item) { return false; } template bool enqueue_bulk(It, size_t) { return false; } template bool enqueue_bulk(producer_token_t const&, It, size_t) { return false; } template size_t try_dequeue_bulk(It, size_t) { return 0; } template size_t try_dequeue_bulk(consumer_token_t, It, size_t) { return 0; } private: dlib::pipe q; }; ================================================ FILE: benchmarks/extract_graph_data.py ================================================ #!/usr/bin/python # A simple script that reads the last run from the benchmark log file, # and creates two CSV files containing the data required to make pretty # performance graphs for enqueuing and dequeueing. # The x-axis of the graph is meant to be the number of threads (first column), with # the y-axis representing thousands of operations/second/thread (one column per queue). import sys import re def extract(bench, log, data, hasBulk = True): # data = { thread_count: [ locked, boost, tbb, moodycamel, moodycamel_tok, moodycamel_bulk ], ... } def do_extract(bench, queue_header): block = re.search(r'^' + bench + r':.*?' + queue_header + r'\s*(.*?)\s*^\s*Operations per second', log, re.S | re.M | re.I).group(1) for threads, opsst in re.findall(r'^\s*(\d+)\s+thread.*?([0-9\.]+[kMG]?\s*$)', block, re.M | re.I): threads = int(threads) multiplier = 1 if opsst[-1] in 'kMG': multiplier = { 'k': 1000, 'M': 1000000, 'G': 1000000000 }[opsst[-1]] opsst = opsst[:-1] opsst = int(float(opsst) * multiplier) if threads not in data: data[threads] = [] data[threads].append(opsst) do_extract(bench, 'LockBasedQueue') do_extract(bench, 'boost::lockfree::queue') do_extract(bench, 'tbb::concurrent_queue') do_extract(bench, 'Without tokens') do_extract(bench, 'With tokens') if hasBulk: do_extract(bench + ' bulk', 'With tokens') def write_csv(data, path, hasBulk = True): with open(path, 'w') as f: f.write('threads,"std::queue + std::mutex","boost::lockfree::queue","tbb::concurrent_queue","moodycamel::ConcurrentQueue (no tokens)","moodycamel::ConcurrentQueue",' + ('"moodycamel::ConcurrentQueue (bulk)"' if hasBulk else '') + '\n') for threads in sorted(data.keys()): f.write(str(threads)) for opsst in data[threads]: f.write(',' + str(opsst)) f.write('\n') try: filename = 'benchmarks.log' if len(sys.argv) < 2 else sys.argv[1] with open(filename, 'r') as f: pieces = f.read().split('--- New run') log = pieces[-1] enq_data = { } extract('only enqueue', log, enq_data) deq_data = { } extract('only dequeue', log, deq_data) heavy_data = { } extract('heavy concurrent', log, heavy_data, False) write_csv(enq_data, 'enqueue.csv') write_csv(deq_data, 'dequeue.csv') write_csv(heavy_data, 'heavy.csv', False) except IOError: print('Usage: ' + sys.argv[0] + ' path/to/benchmarks.log') ================================================ FILE: benchmarks/lockbasedqueue.h ================================================ // ©2013-2014 Cameron Desrochers. // Distributed under the simplified BSD license (see the LICENSE file that // should have come with this file). #pragma once #include "wrappers.h" #include // Naïve implementation of a simple lock-based queue. A std::mutex is obtained for every // method. Note that while the queue size is not fixed, each enqueue operation allocates // memory, and each dequeue frees memory. template class LockBasedQueue { public: typedef DummyToken producer_token_t; typedef DummyToken consumer_token_t; public: LockBasedQueue() { tail = nullptr; head = nullptr; } ~LockBasedQueue() { while (head != nullptr) { Node* next = head->next; delete head; head = next; } } template inline bool enqueue(U&& item) { Node* node = new Node(item); std::lock_guard guard(mutex); if (tail == nullptr) { head = tail = node; } else { tail->next = node; tail = node; } return true; } inline bool try_dequeue(T& item) { std::lock_guard guard(mutex); if (head == nullptr) { return false; } else { item = std::move(head->item); Node* next = head->next; delete head; head = next; if (head == nullptr) { tail = nullptr; } return true; } } // Dummy token methods (not used) bool enqueue(producer_token_t const&, T const&) { return false; } bool try_enqueue(producer_token_t, T const&) { return false; } bool try_dequeue(consumer_token_t, T& item) { return false; } template bool enqueue_bulk(It, size_t) { return false; } template bool enqueue_bulk(producer_token_t const&, It, size_t) { return false; } template size_t try_dequeue_bulk(It, size_t) { return 0; } template size_t try_dequeue_bulk(consumer_token_t, It, size_t) { return 0; } private: struct Node { T item; Node* next; template Node(U&& item) : item(std::forward(item)), next(nullptr) { } }; std::mutex mutex; Node* head; Node* tail; }; ================================================ FILE: benchmarks/makefile ================================================ # ©2013-2014 Cameron Desrochers include ../build/makefile.inc default: $(MAKE) -C ../build bin/benchmarks$(EXT) run: default ../build/bin/benchmarks$(EXT) ================================================ FILE: benchmarks/simplelockfree.h ================================================ // ©2013-2014 Cameron Desrochers. // Distributed under the simplified BSD license (see the LICENSE file that // should have come with this file). #pragma once #include "wrappers.h" #include #include #if defined(_MSC_VER) && _MSC_VER < 1900 #define alignas(T) #endif // Fairly simple, yet correct, implementation of a simple lock-free queue based on linked pointers with CAS template class SimpleLockFreeQueue { public: typedef DummyToken producer_token_t; typedef DummyToken consumer_token_t; // Total maximum capacity: 2**39 (half a terabyte's worth -- off-by-one aligned indices) static const int UBER_BLOCKS = 256; static const int UBER_BLOCK_SIZE = 256; static const int ULTRA_BLOCK_SIZE = 256; static const int SUPER_BLOCK_SIZE = 256; static const int BLOCK_SIZE = 128; private: static const uint64_t VERSION_MASK = 0xFFFFFF0000000000ULL; static const uint64_t VERSION_INCR = 0x0000010000000000ULL; static const uint64_t UBER_BLOCK_IDX_MASK = 0xFF00000000ULL; static const uint64_t UBER_BLOCK_MASK = 0x00FF000000ULL; static const uint64_t ULTRA_BLOCK_MASK = 0x0000FF0000ULL; static const uint64_t SUPER_BLOCK_MASK = 0x000000FF00ULL; static const uint64_t BLOCK_MASK = 0x00000000FEULL; static const uint64_t UBER_BLOCK_IDX_SHIFT = 32; static const uint64_t UBER_BLOCK_SHIFT = 24; static const uint64_t ULTRA_BLOCK_SHIFT = 16; static const uint64_t SUPER_BLOCK_SHIFT = 8; static const uint64_t BLOCK_SHIFT = 1; typedef std::uint64_t idx_t; public: SimpleLockFreeQueue() : nextNodeIdx(2), freeListHead(0) { // Invariants: Head and tail are never null auto initialNode = allocate_blank_node(); head.store(set_consumed_flag(initialNode), std::memory_order_relaxed); tail.store(initialNode, std::memory_order_relaxed); std::atomic_thread_fence(std::memory_order_seq_cst); } ~SimpleLockFreeQueue() { std::atomic_thread_fence(std::memory_order_seq_cst); idx_t idx = head.load(std::memory_order_relaxed); if (is_consumed(idx)) { idx = clear_consumed_flag(idx); auto node = get_node_at(idx); auto next = node->next.load(std::memory_order_relaxed); node->~Node(); idx = next; } while (idx != 0) { auto node = get_node_at(idx); auto next = node->next.load(std::memory_order_relaxed); node->item()->~T(); node->~Node(); idx = next; } idx = freeListHead.load(std::memory_order_relaxed); while (idx != 0) { auto node = get_node_at(idx); auto next = node->next.load(std::memory_order_relaxed); node->~Node(); idx = next; } } template inline bool enqueue(U&& item) { idx_t nodeIdx = allocate_node_for(std::forward(item)); auto tail_ = tail.load(std::memory_order_relaxed); while (!tail.compare_exchange_weak(tail_, nodeIdx, std::memory_order_release, std::memory_order_relaxed)) continue; get_node_at(tail_)->next.store(nodeIdx, std::memory_order_release); return true; } inline bool try_dequeue(T& item) { while (true) { auto rawHead_ = head.load(std::memory_order_acquire); auto head_ = clear_consumed_flag(rawHead_); auto headNode = get_node_at(head_); auto next = headNode->next.load(std::memory_order_relaxed); if (next == 0) { // Can't move head (that would make head null), but can try to dequeue the node at head anyway if (is_consumed(rawHead_)) { return false; } if (head.compare_exchange_strong(head_, set_consumed_flag(head_), std::memory_order_release, std::memory_order_relaxed)) { // Whee, we own the right to dequeue this item item = std::move(*headNode->item()); headNode->item()->~T(); return true; } } else { // Remove node whether it's already been consumed or not; if it hasn't been consumed, consume it! // head_->next can't possibly change, since once it's not null nobody writes to it (and ABA is avoided with versioning) if (head.compare_exchange_weak(rawHead_, next, std::memory_order_acq_rel, std::memory_order_relaxed)) { // Aha, we successfully moved the head. But does it have anything in it? if (!is_consumed(rawHead_)) { item = std::move(*headNode->item()); headNode->item()->~T(); } add_node_to_free_list(head_, headNode); if (!is_consumed(rawHead_)) { return true; } } } } } // Dummy token methods (not used) bool enqueue(producer_token_t const&, T const&) { return false; } bool try_enqueue(producer_token_t, T const&) { return false; } bool try_dequeue(consumer_token_t, T& item) { return false; } template bool enqueue_bulk(It, size_t) { return false; } template bool enqueue_bulk(producer_token_t const&, It, size_t) { return false; } template size_t try_dequeue_bulk(It, size_t) { return 0; } template size_t try_dequeue_bulk(consumer_token_t, It, size_t) { return 0; } private: struct Node { std::atomic next; alignas(T) char rawItem[sizeof(T)]; template Node(U&& item) : next(0) { new (this->item()) T(std::forward(item)); } Node() : next(0) { } inline T* item() { return reinterpret_cast(rawItem); } }; struct Block { alignas(Node) char nodes[sizeof(Node) * BLOCK_SIZE]; inline char* node_pos(idx_t idx) { return nodes + ((idx & BLOCK_MASK) >> BLOCK_SHIFT) * sizeof(Node); } }; template struct HigherOrderBlock { std::atomic subblocks[BlockSize]; HigherOrderBlock() { for (int i = 0; i != BlockSize; ++i) { subblocks[i].store(nullptr, std::memory_order_release); } } ~HigherOrderBlock() { for (int i = 0; i != BlockSize; ++i) { if (subblocks[i].load(std::memory_order_relaxed) != nullptr) { delete subblocks[i].load(std::memory_order_relaxed); } } } }; typedef HigherOrderBlock SuperBlock; typedef HigherOrderBlock UltraBlock; typedef HigherOrderBlock UberBlock; typedef HigherOrderBlock UberBlockContainer; private: inline idx_t set_consumed_flag(idx_t idx) { return idx | (idx_t)1; } inline idx_t clear_consumed_flag(idx_t idx) { return idx & ~(idx_t)1; } inline bool is_consumed(idx_t idx) { return (idx & 1) != 0; } inline void add_node_to_free_list(idx_t idx, Node* node) { auto head = freeListHead.load(std::memory_order_relaxed); do { node->next.store(head, std::memory_order_relaxed); } while (!freeListHead.compare_exchange_weak(head, idx, std::memory_order_release, std::memory_order_relaxed)); } inline idx_t try_get_node_from_free_list() { auto head = freeListHead.load(std::memory_order_acquire); while (head != 0 && !freeListHead.compare_exchange_weak(head, get_node_at(head)->next.load(std::memory_order_relaxed), std::memory_order_acquire)) { continue; } if (head != 0) { // Increment version head = (head & ~VERSION_MASK) | ((head + VERSION_INCR) & VERSION_MASK); } return head; } inline Node* get_node_at(idx_t idx) { auto uberBlock = uberBlockContainer.subblocks[(idx & UBER_BLOCK_IDX_MASK) >> UBER_BLOCK_IDX_SHIFT].load(std::memory_order_relaxed); auto ultraBlock = uberBlock->subblocks[(idx & UBER_BLOCK_MASK) >> UBER_BLOCK_SHIFT].load(std::memory_order_relaxed); auto superBlock = ultraBlock->subblocks[(idx & ULTRA_BLOCK_MASK) >> ULTRA_BLOCK_SHIFT].load(std::memory_order_relaxed); auto block = superBlock->subblocks[(idx & SUPER_BLOCK_MASK) >> SUPER_BLOCK_SHIFT].load(std::memory_order_relaxed); return reinterpret_cast(block->node_pos(idx)); } template inline idx_t allocate_node_for(U&& item) { auto idx = try_get_node_from_free_list(); if (idx != 0) { auto node = get_node_at(idx); node->next.store(0, std::memory_order_relaxed); new (node->item()) T(std::forward(item)); return idx; } new (new_node_address(idx)) Node(std::forward(item)); return idx; } inline idx_t allocate_blank_node() { idx_t idx; new (new_node_address(idx)) Node(); return idx; } inline char* new_node_address(idx_t& idx) { idx = nextNodeIdx.fetch_add(static_cast(1) << BLOCK_SHIFT, std::memory_order_relaxed); std::size_t uberBlockContainerIdx = (idx & UBER_BLOCK_IDX_MASK) >> UBER_BLOCK_IDX_SHIFT; std::size_t uberBlockIdx = (idx & UBER_BLOCK_MASK) >> UBER_BLOCK_SHIFT; std::size_t ultraBlockIdx = (idx & ULTRA_BLOCK_MASK) >> ULTRA_BLOCK_SHIFT; std::size_t superBlockIdx = (idx & SUPER_BLOCK_MASK) >> SUPER_BLOCK_SHIFT; auto uberBlock = lookup_subblock(&uberBlockContainer, uberBlockContainerIdx); auto ultraBlock = lookup_subblock(uberBlock, uberBlockIdx); auto superBlock = lookup_subblock(ultraBlock, ultraBlockIdx); auto block = lookup_subblock(superBlock, superBlockIdx); return block->node_pos(idx); } template inline TSubBlock* lookup_subblock(TBlock* block, std::size_t idx) { auto ptr = block->subblocks[idx].load(std::memory_order_acquire); if (ptr == nullptr) { auto newBlock = new TSubBlock(); if (!block->subblocks[idx].compare_exchange_strong(ptr, newBlock, std::memory_order_release, std::memory_order_acquire)) { delete newBlock; } else { ptr = newBlock; } } return ptr; } private: std::atomic nextNodeIdx; std::atomic head; std::atomic tail; std::atomic freeListHead; UberBlockContainer uberBlockContainer; }; ================================================ FILE: benchmarks/stdqueue.h ================================================ // ©2014 Cameron Desrochers. #pragma once #include #include "wrappers.h" // Simple wrapper around std::queue (not thread safe) template class StdQueueWrapper { public: typedef DummyToken producer_token_t; typedef DummyToken consumer_token_t; public: template inline bool enqueue(U&& item) { q.push(std::forward(item)); return true; } inline bool try_dequeue(T& item) { if (q.empty()) { return false; } item = std::move(q.front()); q.pop(); return true; } // Dummy token methods (not used) bool enqueue(producer_token_t const&, T const&) { return false; } bool try_enqueue(producer_token_t, T const&) { return false; } bool try_dequeue(consumer_token_t, T& item) { return false; } template bool enqueue_bulk(It, size_t) { return false; } template bool enqueue_bulk(producer_token_t const&, It, size_t) { return false; } template size_t try_dequeue_bulk(It, size_t) { return 0; } template size_t try_dequeue_bulk(consumer_token_t, It, size_t) { return 0; } private: std::queue q; }; ================================================ FILE: benchmarks/tbb/COPYING ================================================ GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Lesser General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. ---------------- END OF Gnu General Public License ---------------- The source code of Threading Building Blocks is distributed under version 2 of the GNU General Public License, with the so-called "runtime exception," as follows (or see any header or implementation file): As a special exception, you may use this file as part of a free software library without restriction. Specifically, if other files instantiate templates or use macros or inline functions from this file, or you compile this file and link it with other files to produce an executable, this file does not by itself cause the resulting executable to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the executable file might be covered by the GNU General Public License. ================================================ FILE: benchmarks/tbb/README.txt ================================================ This is a partial copy of the Intel TBB open source version. The version taken is 4.3, obtained from https://www.threadingbuildingblocks.org/download The files in this directory consist of the files taken from src/tbb and include/tbb ================================================ FILE: benchmarks/tbb/aggregator.h ================================================ /* Copyright 2005-2014 Intel Corporation. All Rights Reserved. This file is part of Threading Building Blocks. Threading Building Blocks is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. Threading Building Blocks is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Threading Building Blocks; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA As a special exception, you may use this file as part of a free software library without restriction. Specifically, if other files instantiate templates or use macros or inline functions from this file, or you compile this file and link it with other files to produce an executable, this file does not by itself cause the resulting executable to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the executable file might be covered by the GNU General Public License. */ #ifndef __TBB__aggregator_H #define __TBB__aggregator_H #if !TBB_PREVIEW_AGGREGATOR #error Set TBB_PREVIEW_AGGREGATOR before including aggregator.h #endif #include "atomic.h" #include "tbb_profiling.h" namespace tbb { namespace interface6 { using namespace tbb::internal; class aggregator_operation { template friend class aggregator_ext; uintptr_t status; aggregator_operation* my_next; public: enum aggregator_operation_status { agg_waiting=0, agg_finished }; aggregator_operation() : status(agg_waiting), my_next(NULL) {} /// Call start before handling this operation void start() { call_itt_notify(acquired, &status); } /// Call finish when done handling this operation /** The operation will be released to its originating thread, and possibly deleted. */ void finish() { itt_store_word_with_release(status, uintptr_t(agg_finished)); } aggregator_operation* next() { return itt_hide_load_word(my_next);} void set_next(aggregator_operation* n) { itt_hide_store_word(my_next, n); } }; namespace internal { class basic_operation_base : public aggregator_operation { friend class basic_handler; virtual void apply_body() = 0; public: basic_operation_base() : aggregator_operation() {} virtual ~basic_operation_base() {} }; template class basic_operation : public basic_operation_base, no_assign { const Body& my_body; /*override*/ void apply_body() { my_body(); } public: basic_operation(const Body& b) : basic_operation_base(), my_body(b) {} }; class basic_handler { public: basic_handler() {} void operator()(aggregator_operation* op_list) const { while (op_list) { // ITT note: &(op_list->status) tag is used to cover accesses to the operation data. // The executing thread "acquires" the tag (see start()) and then performs // the associated operation w/o triggering a race condition diagnostics. // A thread that created the operation is waiting for its status (see execute_impl()), // so when this thread is done with the operation, it will "release" the tag // and update the status (see finish()) to give control back to the waiting thread. basic_operation_base& request = static_cast(*op_list); // IMPORTANT: need to advance op_list to op_list->next() before calling request.finish() op_list = op_list->next(); request.start(); request.apply_body(); request.finish(); } } }; } // namespace internal //! Aggregator base class and expert interface /** An aggregator for collecting operations coming from multiple sources and executing them serially on a single thread. */ template class aggregator_ext : tbb::internal::no_copy { public: aggregator_ext(const handler_type& h) : handler_busy(0), handle_operations(h) { mailbox = NULL; } //! EXPERT INTERFACE: Enter a user-made operation into the aggregator's mailbox. /** Details of user-made operations must be handled by user-provided handler */ void process(aggregator_operation *op) { execute_impl(*op); } protected: /** Place operation in mailbox, then either handle mailbox or wait for the operation to be completed by a different thread. */ void execute_impl(aggregator_operation& op) { aggregator_operation* res; // ITT note: &(op.status) tag is used to cover accesses to this operation. This // thread has created the operation, and now releases it so that the handler // thread may handle the associated operation w/o triggering a race condition; // thus this tag will be acquired just before the operation is handled in the // handle_operations functor. call_itt_notify(releasing, &(op.status)); // insert the operation in the queue do { // ITT may flag the following line as a race; it is a false positive: // This is an atomic read; we don't provide itt_hide_load_word for atomics op.my_next = res = mailbox; // NOT A RACE } while (mailbox.compare_and_swap(&op, res) != res); if (!res) { // first in the list; handle the operations // ITT note: &mailbox tag covers access to the handler_busy flag, which this // waiting handler thread will try to set before entering handle_operations. call_itt_notify(acquired, &mailbox); start_handle_operations(); __TBB_ASSERT(op.status, NULL); } else { // not first; wait for op to be ready call_itt_notify(prepare, &(op.status)); spin_wait_while_eq(op.status, uintptr_t(aggregator_operation::agg_waiting)); itt_load_word_with_acquire(op.status); } } private: //! An atomically updated list (aka mailbox) of aggregator_operations atomic mailbox; //! Controls thread access to handle_operations /** Behaves as boolean flag where 0=false, 1=true */ uintptr_t handler_busy; handler_type handle_operations; //! Trigger the handling of operations when the handler is free void start_handle_operations() { aggregator_operation *pending_operations; // ITT note: &handler_busy tag covers access to mailbox as it is passed // between active and waiting handlers. Below, the waiting handler waits until // the active handler releases, and the waiting handler acquires &handler_busy as // it becomes the active_handler. The release point is at the end of this // function, when all operations in mailbox have been handled by the // owner of this aggregator. call_itt_notify(prepare, &handler_busy); // get handler_busy: only one thread can possibly spin here at a time spin_wait_until_eq(handler_busy, uintptr_t(0)); call_itt_notify(acquired, &handler_busy); // acquire fence not necessary here due to causality rule and surrounding atomics __TBB_store_with_release(handler_busy, uintptr_t(1)); // ITT note: &mailbox tag covers access to the handler_busy flag itself. // Capturing the state of the mailbox signifies that handler_busy has been // set and a new active handler will now process that list's operations. call_itt_notify(releasing, &mailbox); // grab pending_operations pending_operations = mailbox.fetch_and_store(NULL); // handle all the operations handle_operations(pending_operations); // release the handler itt_store_word_with_release(handler_busy, uintptr_t(0)); } }; //! Basic aggregator interface class aggregator : private aggregator_ext { public: aggregator() : aggregator_ext(internal::basic_handler()) {} //! BASIC INTERFACE: Enter a function for exclusive execution by the aggregator. /** The calling thread stores the function object in a basic_operation and places the operation in the aggregator's mailbox */ template void execute(const Body& b) { internal::basic_operation op(b); this->execute_impl(op); } }; } // namespace interface6 using interface6::aggregator; using interface6::aggregator_ext; using interface6::aggregator_operation; } // namespace tbb #endif // __TBB__aggregator_H ================================================ FILE: benchmarks/tbb/aligned_space.h ================================================ /* Copyright 2005-2014 Intel Corporation. All Rights Reserved. This file is part of Threading Building Blocks. Threading Building Blocks is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. Threading Building Blocks is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Threading Building Blocks; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA As a special exception, you may use this file as part of a free software library without restriction. Specifically, if other files instantiate templates or use macros or inline functions from this file, or you compile this file and link it with other files to produce an executable, this file does not by itself cause the resulting executable to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the executable file might be covered by the GNU General Public License. */ #ifndef __TBB_aligned_space_H #define __TBB_aligned_space_H #include "tbb_stddef.h" #include "tbb_machine.h" namespace tbb { //! Block of space aligned sufficiently to construct an array T with N elements. /** The elements are not constructed or destroyed by this class. @ingroup memory_allocation */ template class aligned_space { private: typedef __TBB_TypeWithAlignmentAtLeastAsStrict(T) element_type; element_type array[(sizeof(T)*N+sizeof(element_type)-1)/sizeof(element_type)]; public: //! Pointer to beginning of array T* begin() {return internal::punned_cast(this);} //! Pointer to one past last element in array. T* end() {return begin()+N;} }; } // namespace tbb #endif /* __TBB_aligned_space_H */ ================================================ FILE: benchmarks/tbb/arena.cpp ================================================ /* Copyright 2005-2014 Intel Corporation. All Rights Reserved. This file is part of Threading Building Blocks. Threading Building Blocks is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. Threading Building Blocks is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Threading Building Blocks; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA As a special exception, you may use this file as part of a free software library without restriction. Specifically, if other files instantiate templates or use macros or inline functions from this file, or you compile this file and link it with other files to produce an executable, this file does not by itself cause the resulting executable to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the executable file might be covered by the GNU General Public License. */ #include "scheduler.h" #include "governor.h" #include "arena.h" #include "itt_notify.h" #include "semaphore.h" #include #if __TBB_STATISTICS_STDOUT #include #endif namespace tbb { namespace internal { void arena::process( generic_scheduler& s ) { __TBB_ASSERT( is_alive(my_guard), NULL ); __TBB_ASSERT( governor::is_set(&s), NULL ); __TBB_ASSERT( !s.my_innermost_running_task, NULL ); __TBB_ASSERT( !s.my_dispatching_task, NULL ); __TBB_ASSERT( my_num_slots != 1, NULL ); // Start search for an empty slot from the one we occupied the last time unsigned index = s.my_arena_index < my_num_slots ? s.my_arena_index : s.my_random.get() % (my_num_slots - 1) + 1, end = index; __TBB_ASSERT( index != 0, "A worker cannot occupy slot 0" ); __TBB_ASSERT( index < my_num_slots, NULL ); // Find a vacant slot for ( ;; ) { if ( !my_slots[index].my_scheduler && as_atomic(my_slots[index].my_scheduler).compare_and_swap(&s, NULL ) == NULL ) break; if ( ++index == my_num_slots ) index = 1; if ( index == end ) { // Likely this arena is already saturated goto quit; } } ITT_NOTIFY(sync_acquired, my_slots + index); s.my_arena = this; s.my_arena_index = index; s.my_arena_slot = my_slots + index; #if __TBB_TASK_PRIORITY s.my_local_reload_epoch = *s.my_ref_reload_epoch; __TBB_ASSERT( !s.my_offloaded_tasks, NULL ); #endif /* __TBB_TASK_PRIORITY */ s.attach_mailbox( affinity_id(index+1) ); s.my_arena_slot->hint_for_pop = index; // initial value for round-robin #if !__TBB_FP_CONTEXT my_cpu_ctl_env.set_env(); #endif #if __TBB_SCHEDULER_OBSERVER __TBB_ASSERT( !s.my_last_local_observer, "There cannot be notified local observers when entering arena" ); my_observers.notify_entry_observers( s.my_last_local_observer, /*worker=*/true ); #endif /* __TBB_SCHEDULER_OBSERVER */ atomic_update( my_limit, index + 1, std::less() ); for ( ;; ) { // Try to steal a task. // Passing reference count is technically unnecessary in this context, // but omitting it here would add checks inside the function. __TBB_ASSERT( is_alive(my_guard), NULL ); task* t = s.receive_or_steal_task( s.my_dummy_task->prefix().ref_count, /*return_if_no_work=*/true ); if (t) { // A side effect of receive_or_steal_task is that my_innermost_running_task can be set. // But for the outermost dispatch loop of a worker it has to be NULL. s.my_innermost_running_task = NULL; __TBB_ASSERT( !s.my_dispatching_task, NULL ); s.local_wait_for_all(*s.my_dummy_task,t); } __TBB_ASSERT ( __TBB_load_relaxed(s.my_arena_slot->head) == __TBB_load_relaxed(s.my_arena_slot->tail), "Worker cannot leave arena while its task pool is not empty" ); __TBB_ASSERT( s.my_arena_slot->task_pool == EmptyTaskPool, "Empty task pool is not marked appropriately" ); // This check prevents relinquishing more than necessary workers because // of the non-atomicity of the decision making procedure if (num_workers_active() > my_num_workers_allotted) break; } #if __TBB_SCHEDULER_OBSERVER my_observers.notify_exit_observers( s.my_last_local_observer, /*worker=*/true ); s.my_last_local_observer = NULL; #endif /* __TBB_SCHEDULER_OBSERVER */ #if __TBB_TASK_PRIORITY if ( s.my_offloaded_tasks ) orphan_offloaded_tasks( s ); #endif /* __TBB_TASK_PRIORITY */ #if __TBB_STATISTICS ++s.my_counters.arena_roundtrips; *my_slots[index].my_counters += s.my_counters; s.my_counters.reset(); #endif /* __TBB_STATISTICS */ __TBB_store_with_release( my_slots[index].my_scheduler, (generic_scheduler*)NULL ); s.my_arena_slot = 0; // detached from slot s.my_inbox.detach(); __TBB_ASSERT( s.my_inbox.is_idle_state(true), NULL ); __TBB_ASSERT( !s.my_innermost_running_task, NULL ); __TBB_ASSERT( !s.my_dispatching_task, NULL ); __TBB_ASSERT( is_alive(my_guard), NULL ); quit: // In contrast to earlier versions of TBB (before 3.0 U5) now it is possible // that arena may be temporarily left unpopulated by threads. See comments in // arena::on_thread_leaving() for more details. #if !__TBB_TRACK_PRIORITY_LEVEL_SATURATION on_thread_leaving(); #endif /* !__TBB_TRACK_PRIORITY_LEVEL_SATURATION */ } arena::arena ( market& m, unsigned max_num_workers ) { __TBB_ASSERT( !my_guard, "improperly allocated arena?" ); __TBB_ASSERT( sizeof(my_slots[0]) % NFS_GetLineSize()==0, "arena::slot size not multiple of cache line size" ); __TBB_ASSERT( (uintptr_t)this % NFS_GetLineSize()==0, "arena misaligned" ); #if __TBB_TASK_PRIORITY __TBB_ASSERT( !my_reload_epoch && !my_orphaned_tasks && !my_skipped_fifo_priority, "New arena object is not zeroed" ); #endif /* __TBB_TASK_PRIORITY */ my_market = &m; my_limit = 1; // Two slots are mandatory: for the master, and for 1 worker (required to support starvation resistant tasks). my_num_slots = num_slots_to_reserve(max_num_workers); my_max_num_workers = max_num_workers; my_references = 1; // accounts for the master #if __TBB_TASK_PRIORITY my_bottom_priority = my_top_priority = normalized_normal_priority; #endif /* __TBB_TASK_PRIORITY */ my_aba_epoch = m.my_arenas_aba_epoch; #if __TBB_SCHEDULER_OBSERVER my_observers.my_arena = this; #endif /* __TBB_SCHEDULER_OBSERVER */ __TBB_ASSERT ( my_max_num_workers < my_num_slots, NULL ); // Construct slots. Mark internal synchronization elements for the tools. for( unsigned i = 0; i < my_num_slots; ++i ) { __TBB_ASSERT( !my_slots[i].my_scheduler && !my_slots[i].task_pool, NULL ); __TBB_ASSERT( !my_slots[i].task_pool_ptr, NULL ); __TBB_ASSERT( !my_slots[i].my_task_pool_size, NULL ); ITT_SYNC_CREATE(my_slots + i, SyncType_Scheduler, SyncObj_WorkerTaskPool); mailbox(i+1).construct(); ITT_SYNC_CREATE(&mailbox(i+1), SyncType_Scheduler, SyncObj_Mailbox); my_slots[i].hint_for_pop = i; #if __TBB_STATISTICS my_slots[i].my_counters = new ( NFS_Allocate(1, sizeof(statistics_counters), NULL) ) statistics_counters; #endif /* __TBB_STATISTICS */ } #if __TBB_TASK_PRIORITY for ( intptr_t i = 0; i < num_priority_levels; ++i ) { my_task_stream[i].initialize(my_num_slots); ITT_SYNC_CREATE(my_task_stream + i, SyncType_Scheduler, SyncObj_TaskStream); } #else /* !__TBB_TASK_PRIORITY */ my_task_stream.initialize(my_num_slots); ITT_SYNC_CREATE(&my_task_stream, SyncType_Scheduler, SyncObj_TaskStream); #endif /* !__TBB_TASK_PRIORITY */ my_mandatory_concurrency = false; #if __TBB_TASK_GROUP_CONTEXT // Context to be used by root tasks by default (if the user has not specified one). // The arena's context should not capture fp settings for the sake of backward compatibility. my_default_ctx = new ( NFS_Allocate(1, sizeof(task_group_context), NULL) ) task_group_context(task_group_context::isolated, task_group_context::default_traits); #endif /* __TBB_TASK_GROUP_CONTEXT */ #if __TBB_FP_CONTEXT my_default_ctx->capture_fp_settings(); #else my_cpu_ctl_env.get_env(); #endif } arena& arena::allocate_arena( market& m, unsigned max_num_workers ) { __TBB_ASSERT( sizeof(base_type) + sizeof(arena_slot) == sizeof(arena), "All arena data fields must go to arena_base" ); __TBB_ASSERT( sizeof(base_type) % NFS_GetLineSize() == 0, "arena slots area misaligned: wrong padding" ); __TBB_ASSERT( sizeof(mail_outbox) == NFS_MaxLineSize, "Mailbox padding is wrong" ); size_t n = allocation_size(max_num_workers); unsigned char* storage = (unsigned char*)NFS_Allocate( 1, n, NULL ); // Zero all slots to indicate that they are empty memset( storage, 0, n ); return *new( storage + num_slots_to_reserve(max_num_workers) * sizeof(mail_outbox) ) arena(m, max_num_workers); } void arena::free_arena () { __TBB_ASSERT( is_alive(my_guard), NULL ); __TBB_ASSERT( !my_references, "There are threads in the dying arena" ); __TBB_ASSERT( !my_num_workers_requested && !my_num_workers_allotted, "Dying arena requests workers" ); __TBB_ASSERT( my_pool_state == SNAPSHOT_EMPTY || !my_max_num_workers, "Inconsistent state of a dying arena" ); #if !__TBB_STATISTICS_EARLY_DUMP GATHER_STATISTIC( dump_arena_statistics() ); #endif poison_value( my_guard ); intptr_t drained = 0; for ( unsigned i = 0; i < my_num_slots; ++i ) { __TBB_ASSERT( !my_slots[i].my_scheduler, "arena slot is not empty" ); #if !__TBB_TASK_ARENA __TBB_ASSERT( my_slots[i].task_pool == EmptyTaskPool, NULL ); #else //TODO: understand the assertion and modify #endif __TBB_ASSERT( my_slots[i].head == my_slots[i].tail, NULL ); // TODO: replace by is_quiescent_local_task_pool_empty my_slots[i].free_task_pool(); #if __TBB_STATISTICS NFS_Free( my_slots[i].my_counters ); #endif /* __TBB_STATISTICS */ drained += mailbox(i+1).drain(); } #if __TBB_TASK_PRIORITY && TBB_USE_ASSERT for ( intptr_t i = 0; i < num_priority_levels; ++i ) __TBB_ASSERT(my_task_stream[i].empty() && my_task_stream[i].drain()==0, "Not all enqueued tasks were executed"); #elif !__TBB_TASK_PRIORITY __TBB_ASSERT(my_task_stream.empty() && my_task_stream.drain()==0, "Not all enqueued tasks were executed"); #endif /* !__TBB_TASK_PRIORITY */ #if __TBB_COUNT_TASK_NODES my_market->update_task_node_count( -drained ); #endif /* __TBB_COUNT_TASK_NODES */ my_market->release(); #if __TBB_TASK_GROUP_CONTEXT __TBB_ASSERT( my_default_ctx, "Master thread never entered the arena?" ); my_default_ctx->~task_group_context(); NFS_Free(my_default_ctx); #endif /* __TBB_TASK_GROUP_CONTEXT */ #if __TBB_SCHEDULER_OBSERVER if ( !my_observers.empty() ) my_observers.clear(); #endif /* __TBB_SCHEDULER_OBSERVER */ void* storage = &mailbox(my_num_slots); __TBB_ASSERT( my_references == 0, NULL ); __TBB_ASSERT( my_pool_state == SNAPSHOT_EMPTY || !my_max_num_workers, NULL ); this->~arena(); #if TBB_USE_ASSERT > 1 memset( storage, 0, allocation_size(my_max_num_workers) ); #endif /* TBB_USE_ASSERT */ NFS_Free( storage ); } #if __TBB_STATISTICS void arena::dump_arena_statistics () { statistics_counters total; for( unsigned i = 0; i < my_num_slots; ++i ) { #if __TBB_STATISTICS_EARLY_DUMP generic_scheduler* s = my_slots[i].my_scheduler; if ( s ) *my_slots[i].my_counters += s->my_counters; #else __TBB_ASSERT( !my_slots[i].my_scheduler, NULL ); #endif if ( i != 0 ) { total += *my_slots[i].my_counters; dump_statistics( *my_slots[i].my_counters, i ); } } dump_statistics( *my_slots[0].my_counters, 0 ); #if __TBB_STATISTICS_STDOUT #if !__TBB_STATISTICS_TOTALS_ONLY printf( "----------------------------------------------\n" ); #endif dump_statistics( total, workers_counters_total ); total += *my_slots[0].my_counters; dump_statistics( total, arena_counters_total ); #if !__TBB_STATISTICS_TOTALS_ONLY printf( "==============================================\n" ); #endif #endif /* __TBB_STATISTICS_STDOUT */ } #endif /* __TBB_STATISTICS */ #if __TBB_TASK_PRIORITY // The method inspects a scheduler to determine: // 1. if it has tasks that can be retrieved and executed (via the return value); // 2. if it has any tasks at all, including those of lower priority (via tasks_present); // 3. if it is able to work with enqueued tasks (via dequeuing_possible). inline bool arena::may_have_tasks ( generic_scheduler* s, bool& tasks_present, bool& dequeuing_possible ) { if ( !s #if __TBB_TASK_ARENA || s->my_arena != this #endif ) return false; dequeuing_possible |= s->worker_outermost_level(); if ( s->my_pool_reshuffling_pending ) { // This primary task pool is nonempty and may contain tasks at the current // priority level. Its owner is winnowing lower priority tasks at the moment. tasks_present = true; return true; } if ( s->my_offloaded_tasks ) { tasks_present = true; if ( s->my_local_reload_epoch < *s->my_ref_reload_epoch ) { // This scheduler's offload area is nonempty and may contain tasks at the // current priority level. return true; } } return false; } void arena::orphan_offloaded_tasks(generic_scheduler& s) { __TBB_ASSERT( s.my_offloaded_tasks, NULL ); GATHER_STATISTIC( ++s.my_counters.prio_orphanings ); ++my_abandonment_epoch; __TBB_ASSERT( s.my_offloaded_task_list_tail_link && !*s.my_offloaded_task_list_tail_link, NULL ); task* orphans; do { orphans = const_cast(my_orphaned_tasks); *s.my_offloaded_task_list_tail_link = orphans; } while ( as_atomic(my_orphaned_tasks).compare_and_swap(s.my_offloaded_tasks, orphans) != orphans ); s.my_offloaded_tasks = NULL; #if TBB_USE_ASSERT s.my_offloaded_task_list_tail_link = NULL; #endif /* TBB_USE_ASSERT */ } #endif /* __TBB_TASK_PRIORITY */ bool arena::is_out_of_work() { // TODO: rework it to return at least a hint about where a task was found; better if the task itself. for(;;) { pool_state_t snapshot = my_pool_state; switch( snapshot ) { case SNAPSHOT_EMPTY: return true; case SNAPSHOT_FULL: { // Use unique id for "busy" in order to avoid ABA problems. const pool_state_t busy = pool_state_t(&busy); // Request permission to take snapshot if( my_pool_state.compare_and_swap( busy, SNAPSHOT_FULL )==SNAPSHOT_FULL ) { // Got permission. Take the snapshot. // NOTE: This is not a lock, as the state can be set to FULL at // any moment by a thread that spawns/enqueues new task. size_t n = my_limit; // Make local copies of volatile parameters. Their change during // snapshot taking procedure invalidates the attempt, and returns // this thread into the dispatch loop. #if __TBB_TASK_PRIORITY intptr_t top_priority = my_top_priority; uintptr_t reload_epoch = my_reload_epoch; // Inspect primary task pools first #endif /* __TBB_TASK_PRIORITY */ size_t k; for( k=0; kmy_arenas_list_mutex.lock(); generic_scheduler *s = my_slots[0].my_scheduler; if ( s && as_atomic(my_slots[0].my_scheduler).compare_and_swap(LockedMaster, s) == s ) { //TODO: remove need to lock __TBB_ASSERT( my_slots[0].my_scheduler == LockedMaster && s != LockedMaster, NULL ); work_absent = !may_have_tasks( s, tasks_present, dequeuing_possible ); __TBB_store_with_release( my_slots[0].my_scheduler, s ); } my_market->my_arenas_list_mutex.unlock(); // The following loop is subject to data races. While k-th slot's // scheduler is being examined, corresponding worker can either // leave to RML or migrate to another arena. // But the races are not prevented because all of them are benign. // First, the code relies on the fact that worker thread's scheduler // object persists until the whole library is deinitialized. // Second, in the worst case the races can only cause another // round of stealing attempts to be undertaken. Introducing complex // synchronization into this coldest part of the scheduler's control // flow does not seem to make sense because it both is unlikely to // ever have any observable performance effect, and will require // additional synchronization code on the hotter paths. for( k = 1; work_absent && k < n; ++k ) { if( my_pool_state!=busy ) return false; // the work was published work_absent = !may_have_tasks( my_slots[k].my_scheduler, tasks_present, dequeuing_possible ); } // Preclude premature switching arena off because of a race in the previous loop. work_absent = work_absent && !__TBB_load_with_acquire(my_orphaned_tasks) && abandonment_epoch == my_abandonment_epoch; } #endif /* __TBB_TASK_PRIORITY */ // Test and test-and-set. if( my_pool_state==busy ) { #if __TBB_TASK_PRIORITY bool no_fifo_tasks = my_task_stream[top_priority].empty(); work_absent = work_absent && (!dequeuing_possible || no_fifo_tasks) && top_priority == my_top_priority && reload_epoch == my_reload_epoch; #else bool no_fifo_tasks = my_task_stream.empty(); work_absent = work_absent && no_fifo_tasks; #endif /* __TBB_TASK_PRIORITY */ if( work_absent ) { #if __TBB_TASK_PRIORITY if ( top_priority > my_bottom_priority ) { if ( my_market->lower_arena_priority(*this, top_priority - 1, reload_epoch) && !my_task_stream[top_priority].empty() ) { atomic_update( my_skipped_fifo_priority, top_priority, std::less()); } } else if ( !tasks_present && !my_orphaned_tasks && no_fifo_tasks ) { #endif /* __TBB_TASK_PRIORITY */ // save current demand value before setting SNAPSHOT_EMPTY, // to avoid race with advertise_new_work. int current_demand = (int)my_max_num_workers; if( my_pool_state.compare_and_swap( SNAPSHOT_EMPTY, busy )==busy ) { // This thread transitioned pool to empty state, and thus is // responsible for telling RML that there is no other work to do. my_market->adjust_demand( *this, -current_demand ); #if __TBB_TASK_PRIORITY // Check for the presence of enqueued tasks "lost" on some of // priority levels because updating arena priority and switching // arena into "populated" (FULL) state happen non-atomically. // Imposing atomicity would require task::enqueue() to use a lock, // which is unacceptable. bool switch_back = false; for ( int p = 0; p < num_priority_levels; ++p ) { if ( !my_task_stream[p].empty() ) { switch_back = true; if ( p < my_bottom_priority || p > my_top_priority ) my_market->update_arena_priority(*this, p); } } if ( switch_back ) advertise_new_work(); #endif /* __TBB_TASK_PRIORITY */ return true; } return false; #if __TBB_TASK_PRIORITY } #endif /* __TBB_TASK_PRIORITY */ } // Undo previous transition SNAPSHOT_FULL-->busy, unless another thread undid it. my_pool_state.compare_and_swap( SNAPSHOT_FULL, busy ); } } return false; } default: // Another thread is taking a snapshot. return false; } } } #if __TBB_COUNT_TASK_NODES intptr_t arena::workers_task_node_count() { intptr_t result = 0; for( unsigned i = 1; i < my_num_slots; ++i ) { generic_scheduler* s = my_slots[i].my_scheduler; if( s ) result += s->my_task_node_count; } return result; } #endif /* __TBB_COUNT_TASK_NODES */ void arena::enqueue_task( task& t, intptr_t prio, FastRandom &random ) { #if __TBB_RECYCLE_TO_ENQUEUE __TBB_ASSERT( t.state()==task::allocated || t.state()==task::to_enqueue, "attempt to enqueue task with inappropriate state" ); #else __TBB_ASSERT( t.state()==task::allocated, "attempt to enqueue task that is not in 'allocated' state" ); #endif t.prefix().state = task::ready; t.prefix().extra_state |= es_task_enqueued; // enqueued task marker #if TBB_USE_ASSERT if( task* parent = t.parent() ) { internal::reference_count ref_count = parent->prefix().ref_count; __TBB_ASSERT( ref_count!=0, "attempt to enqueue task whose parent has a ref_count==0 (forgot to set_ref_count?)" ); __TBB_ASSERT( ref_count>0, "attempt to enqueue task whose parent has a ref_count<0" ); parent->prefix().extra_state |= es_ref_count_active; } __TBB_ASSERT(t.prefix().affinity==affinity_id(0), "affinity is ignored for enqueued tasks"); #endif /* TBB_USE_ASSERT */ #if __TBB_TASK_PRIORITY intptr_t p = prio ? normalize_priority(priority_t(prio)) : normalized_normal_priority; assert_priority_valid(p); task_stream &ts = my_task_stream[p]; #else /* !__TBB_TASK_PRIORITY */ __TBB_ASSERT_EX(prio == 0, "the library is not configured to respect the task priority"); task_stream &ts = my_task_stream; #endif /* !__TBB_TASK_PRIORITY */ ITT_NOTIFY(sync_releasing, &ts); ts.push( &t, random ); #if __TBB_TASK_PRIORITY if ( p != my_top_priority ) my_market->update_arena_priority( *this, p ); #endif /* __TBB_TASK_PRIORITY */ advertise_new_work< /*Spawned=*/ false >(); #if __TBB_TASK_PRIORITY if ( p != my_top_priority ) my_market->update_arena_priority( *this, p ); #endif /* __TBB_TASK_PRIORITY */ } #if __TBB_TASK_ARENA struct nested_arena_context : no_copy { generic_scheduler &my_scheduler; scheduler_state const my_orig_state; void *my_orig_ptr; bool my_adjusting; nested_arena_context(generic_scheduler *s, arena* a, bool needs_adjusting, bool as_worker = false) : my_scheduler(*s), my_orig_state(*s), my_orig_ptr(NULL), my_adjusting(needs_adjusting) { s->nested_arena_entry(a, *this, as_worker); } ~nested_arena_context() { my_scheduler.nested_arena_exit(*this); (scheduler_state&)my_scheduler = my_orig_state; // restore arena settings } }; void generic_scheduler::nested_arena_entry(arena* a, nested_arena_context& c, bool as_worker) { if( a == my_arena ) { #if __TBB_TASK_GROUP_CONTEXT c.my_orig_ptr = my_innermost_running_task = new(&allocate_task(sizeof(empty_task), NULL, a->my_default_ctx)) empty_task; #endif return; } __TBB_ASSERT( is_alive(a->my_guard), NULL ); // overwrite arena settings #if __TBB_TASK_PRIORITY if ( my_offloaded_tasks ) my_arena->orphan_offloaded_tasks( *this ); my_ref_top_priority = &a->my_top_priority; my_ref_reload_epoch = &a->my_reload_epoch; my_local_reload_epoch = a->my_reload_epoch; #endif /* __TBB_TASK_PRIORITY */ my_arena = a; my_arena_index = 0; my_arena_slot = my_arena->my_slots + my_arena_index; my_inbox.detach(); // TODO: mailboxes were not designed for switching, add copy constructor? attach_mailbox( affinity_id(my_arena_index+1) ); my_innermost_running_task = my_dispatching_task = as_worker? NULL : my_dummy_task; #if __TBB_TASK_GROUP_CONTEXT // save dummy's context and replace it by arena's context c.my_orig_ptr = my_dummy_task->prefix().context; my_dummy_task->prefix().context = a->my_default_ctx; #endif #if __TBB_ARENA_OBSERVER my_last_local_observer = 0; // TODO: try optimize number of calls my_arena->my_observers.notify_entry_observers( my_last_local_observer, /*worker=*/false ); #endif // TODO? ITT_NOTIFY(sync_acquired, a->my_slots + index); // TODO: it requires market to have P workers (not P-1) // TODO: it still allows temporary oversubscription by 1 worker (due to my_max_num_workers) // TODO: a preempted worker should be excluded from assignment to other arenas e.g. my_slack-- if( c.my_adjusting ) my_arena->my_market->adjust_demand(*my_arena, -1); } void generic_scheduler::nested_arena_exit(nested_arena_context& c) { if( my_arena == c.my_orig_state.my_arena ) { #if __TBB_TASK_GROUP_CONTEXT free_task(*(task*)c.my_orig_ptr); // TODO: use scoped_task instead? #endif return; } if( c.my_adjusting ) my_arena->my_market->adjust_demand(*my_arena, 1); #if __TBB_ARENA_OBSERVER my_arena->my_observers.notify_exit_observers( my_last_local_observer, /*worker=*/false ); #endif /* __TBB_SCHEDULER_OBSERVER */ #if __TBB_TASK_PRIORITY if ( my_offloaded_tasks ) my_arena->orphan_offloaded_tasks( *this ); my_local_reload_epoch = *c.my_orig_state.my_ref_reload_epoch; while ( as_atomic(my_arena->my_slots[0].my_scheduler).compare_and_swap( NULL, this) != this ) __TBB_Yield(); // TODO: task priority can use master slot for locking while accessing the scheduler #else // Free the master slot. TODO: support multiple masters __TBB_store_with_release(my_arena->my_slots[0].my_scheduler, (generic_scheduler*)NULL); #endif my_arena->my_exit_monitors.notify_all_relaxed(); // TODO: fix concurrent monitor to use notify_one (test MultipleMastersPart4 fails) #if __TBB_TASK_GROUP_CONTEXT // restore context of dummy task my_dummy_task->prefix().context = (task_group_context*)c.my_orig_ptr; #endif } void generic_scheduler::wait_until_empty() { my_dummy_task->prefix().ref_count++; // prevents exit from local_wait_for_all when local work is done enforcing the stealing while( my_arena->my_pool_state != arena::SNAPSHOT_EMPTY ) local_wait_for_all(*my_dummy_task, NULL); my_dummy_task->prefix().ref_count--; } #endif /* __TBB_TASK_ARENA */ } // namespace internal } // namespace tbb #if __TBB_TASK_ARENA #include "scheduler_utility.h" namespace tbb { namespace interface7 { namespace internal { void task_arena_base::internal_initialize( ) { __TBB_ASSERT( my_master_slots <= 1, "Number of slots reserved for master can be only [0,1]"); if( my_master_slots > 1 ) my_master_slots = 1; // TODO: make more masters if( my_max_concurrency < 1 ) my_max_concurrency = (int)governor::default_num_threads(); // TODO: reimplement in an efficient way. We need a scheduler instance in this thread // but the scheduler is only required for task allocation and fifo random seeds until // master wants to join the arena. (Idea - to create a restricted specialization) // It is excessive to create an implicit arena for master here anyway. But scheduler // instance implies master thread to be always connected with arena. // browse recursively into init_scheduler and arena::process for details if( !governor::local_scheduler_if_initialized() ) governor::init_scheduler( (unsigned)my_max_concurrency - my_master_slots + 1/*TODO: address in market instead*/, 0, true ); // TODO: we will need to introduce a mechanism for global settings, including stack size, used by all arenas arena* new_arena = &market::create_arena( my_max_concurrency - my_master_slots/*it's +1 slot for num_masters=0*/, ThreadStackSize ); if(as_atomic(my_arena).compare_and_swap(new_arena, NULL) != NULL) { // there is a race possible on my_initialized __TBB_ASSERT(my_arena, NULL); // other thread was the first new_arena->on_thread_leaving(); // deallocate new arena } #if __TBB_TASK_GROUP_CONTEXT else { my_context = new_arena->my_default_ctx; my_context->my_version_and_traits |= my_version_and_traits & exact_exception_flag; } #endif } void task_arena_base::internal_terminate( ) { if( my_arena ) {// task_arena was initialized #if __TBB_STATISTICS_EARLY_DUMP GATHER_STATISTIC( my_arena->dump_arena_statistics() ); #endif my_arena->on_thread_leaving(); my_arena = 0; #if __TBB_TASK_GROUP_CONTEXT my_context = 0; #endif } } void task_arena_base::internal_enqueue( task& t, intptr_t prio ) const { __TBB_ASSERT(my_arena, NULL); generic_scheduler* s = governor::local_scheduler_if_initialized(); __TBB_ASSERT(s, "Scheduler is not initialized"); // we allocated a task so can expect the scheduler #if __TBB_TASK_GROUP_CONTEXT __TBB_ASSERT(my_arena->my_default_ctx == t.prefix().context, NULL); __TBB_ASSERT(!my_arena->my_default_ctx->is_group_execution_cancelled(), // TODO: any better idea? "The task will not be executed because default task_group_context of task_arena is cancelled. Has previously enqueued task thrown an exception?"); #endif my_arena->enqueue_task( t, prio, s->my_random ); } class delegated_task : public task { internal::delegate_base & my_delegate; concurrent_monitor & my_monitor; task * my_root; /*override*/ task* execute() { generic_scheduler& s = *(generic_scheduler*)prefix().owner; __TBB_ASSERT(s.worker_outermost_level() || s.master_outermost_level(), "expected to be enqueued and received on the outermost level"); // but this task can mimics outermost level, detect it if( s.master_outermost_level() && s.my_dummy_task->state() == task::executing ) { #if TBB_USE_EXCEPTIONS // RTTI is available, check whether the cast is valid __TBB_ASSERT(dynamic_cast(s.my_dummy_task), 0); #endif set_ref_count(1); // required by the semantics of recycle_to_enqueue() recycle_to_enqueue(); return NULL; } struct outermost_context : internal::no_copy { delegated_task * t; generic_scheduler & s; task * orig_dummy; task_group_context * orig_ctx; outermost_context(delegated_task *_t, generic_scheduler &_s) : t(_t), s(_s) { orig_dummy = s.my_dummy_task; #if __TBB_TASK_GROUP_CONTEXT orig_ctx = t->prefix().context; t->prefix().context = s.my_arena->my_default_ctx; #endif s.my_dummy_task = t; // mimics outermost master __TBB_ASSERT(s.my_innermost_running_task == t, NULL); } ~outermost_context() { s.my_dummy_task = orig_dummy; #if TBB_USE_EXCEPTIONS // restore context for sake of registering potential exception t->prefix().context = orig_ctx; #endif } } scope(this, s); my_delegate(); return NULL; } ~delegated_task() { // potential exception was already registered. It must happen before the notification __TBB_ASSERT(my_root->ref_count()==2, NULL); __TBB_store_with_release(my_root->prefix().ref_count, 1); // must precede the wakeup my_monitor.notify_relaxed(*this); } public: delegated_task( internal::delegate_base & d, concurrent_monitor & s, task * t ) : my_delegate(d), my_monitor(s), my_root(t) {} // predicate for concurrent_monitor notification bool operator()(uintptr_t ctx) const { return (void*)ctx == (void*)&my_delegate; } }; void task_arena_base::internal_execute( internal::delegate_base& d) const { __TBB_ASSERT(my_arena, NULL); generic_scheduler* s = governor::local_scheduler(); __TBB_ASSERT(s, "Scheduler is not initialized"); // TODO: is it safe to assign slot to a scheduler which is not yet switched? // TODO TEMP: one master, make more masters if( s->my_arena == my_arena || (!__TBB_load_with_acquire(my_arena->my_slots[0].my_scheduler) && as_atomic(my_arena->my_slots[0].my_scheduler).compare_and_swap(s, NULL ) == NULL) ) { cpu_ctl_env_helper cpu_ctl_helper; cpu_ctl_helper.set_env( __TBB_CONTEXT_ARG1(my_context) ); #if TBB_USE_EXCEPTIONS try { #endif //TODO: replace dummy tasks for workers as well to avoid using of the_dummy_context nested_arena_context scope(s, my_arena, !my_master_slots); d(); #if TBB_USE_EXCEPTIONS } catch(...) { cpu_ctl_helper.restore_default(); // TODO: is it needed on Windows? if( my_version_and_traits & exact_exception_flag ) throw; else { task_group_context exception_container( task_group_context::isolated, task_group_context::default_traits & ~task_group_context::exact_exception ); exception_container.register_pending_exception(); __TBB_ASSERT(exception_container.my_exception, NULL); exception_container.my_exception->throw_self(); } } #endif } else { concurrent_monitor::thread_context waiter; #if __TBB_TASK_GROUP_CONTEXT task_group_context exec_context( task_group_context::isolated, my_version_and_traits & exact_exception_flag ); #if __TBB_FP_CONTEXT exec_context.copy_fp_settings( *my_context ); #endif #endif auto_empty_task root(__TBB_CONTEXT_ARG(s, &exec_context)); root.prefix().ref_count = 2; my_arena->enqueue_task( *new( task::allocate_root(__TBB_CONTEXT_ARG1(exec_context)) ) delegated_task(d, my_arena->my_exit_monitors, &root), 0, s->my_random ); // TODO: priority? do { my_arena->my_exit_monitors.prepare_wait(waiter, (uintptr_t)&d); if( __TBB_load_with_acquire(root.prefix().ref_count) < 2 ) { my_arena->my_exit_monitors.cancel_wait(waiter); break; } else if( !__TBB_load_with_acquire(my_arena->my_slots[0].my_scheduler) // TODO: refactor into a function? && as_atomic(my_arena->my_slots[0].my_scheduler).compare_and_swap(s, NULL ) == NULL ) { my_arena->my_exit_monitors.cancel_wait(waiter); nested_arena_context scope(s, my_arena, !my_master_slots); s->local_wait_for_all(root, NULL); #if TBB_USE_EXCEPTIONS __TBB_ASSERT( !exec_context.my_exception, NULL ); // exception can be thrown above, not deferred #endif __TBB_ASSERT( root.prefix().ref_count == 0, NULL ); break; } else { my_arena->my_exit_monitors.commit_wait(waiter); } } while( __TBB_load_with_acquire(root.prefix().ref_count) == 2 ); #if TBB_USE_EXCEPTIONS // process possible exception if( task_group_context::exception_container_type *pe = exec_context.my_exception ) pe->throw_self(); #endif } } // this wait task is a temporary approach to wait for arena emptiness for masters without slots // TODO: it will be rather reworked for one source of notification from is_out_of_work class wait_task : public task { binary_semaphore & my_signal; /*override*/ task* execute() { generic_scheduler* s = governor::local_scheduler_if_initialized(); __TBB_ASSERT( s, NULL ); if( s->my_arena_index && s->worker_outermost_level() ) {// on outermost level of workers only s->local_wait_for_all( *s->my_dummy_task, NULL ); // run remaining tasks } else s->my_arena->is_out_of_work(); // avoids starvation of internal_wait: issuing this task makes arena full my_signal.V(); return NULL; } public: wait_task ( binary_semaphore & sema ) : my_signal(sema) {} }; void task_arena_base::internal_wait() const { __TBB_ASSERT(my_arena, NULL); generic_scheduler* s = governor::local_scheduler(); __TBB_ASSERT(s, "Scheduler is not initialized"); __TBB_ASSERT(s->my_arena != my_arena || s->my_arena_index == 0, "task_arena::wait_until_empty() is not supported within a worker context" ); if( s->my_arena == my_arena ) { //unsupported, but try do something for outermost master __TBB_ASSERT(s->master_outermost_level(), "unsupported"); if( !s->my_arena_index ) while( my_arena->num_workers_active() ) s->wait_until_empty(); } else for(;;) { while( my_arena->my_pool_state != arena::SNAPSHOT_EMPTY ) { if( !__TBB_load_with_acquire(my_arena->my_slots[0].my_scheduler) // TODO TEMP: one master, make more masters && as_atomic(my_arena->my_slots[0].my_scheduler).compare_and_swap(s, NULL) == NULL ) { nested_arena_context a(s, my_arena, !my_master_slots, true); s->wait_until_empty(); } else { binary_semaphore waiter; // TODO: replace by a single event notification from is_out_of_work internal_enqueue( *new( task::allocate_root(__TBB_CONTEXT_ARG1(*my_context)) ) wait_task(waiter), 0 ); // TODO: priority? waiter.P(); // TODO: concurrent_monitor } } if( !my_arena->num_workers_active() && !my_arena->my_slots[0].my_scheduler) // no activity break; // spin until workers active but avoid spinning in a worker __TBB_Yield(); // wait until workers and master leave } } /*static*/ int task_arena_base::internal_current_slot() { generic_scheduler* s = governor::local_scheduler_if_initialized(); return s? int(s->my_arena_index) : -1; } } // tbb::interfaceX::internal } // tbb::interfaceX } // tbb #endif /* __TBB_TASK_ARENA */ ================================================ FILE: benchmarks/tbb/arena.h ================================================ /* Copyright 2005-2014 Intel Corporation. All Rights Reserved. This file is part of Threading Building Blocks. Threading Building Blocks is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. Threading Building Blocks is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Threading Building Blocks; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA As a special exception, you may use this file as part of a free software library without restriction. Specifically, if other files instantiate templates or use macros or inline functions from this file, or you compile this file and link it with other files to produce an executable, this file does not by itself cause the resulting executable to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the executable file might be covered by the GNU General Public License. */ #ifndef _TBB_arena_H #define _TBB_arena_H #include "tbb/tbb_stddef.h" #include "tbb/atomic.h" #include "tbb/tbb_machine.h" #include "scheduler_common.h" #include "intrusive_list.h" #include "task_stream.h" #include "../rml/include/rml_tbb.h" #include "mailbox.h" #include "observer_proxy.h" #include "market.h" #include "governor.h" #if __TBB_TASK_ARENA #include "concurrent_monitor.h" #endif namespace tbb { class task_group_context; class allocate_root_with_context_proxy; namespace internal { //! arena data except the array of slots /** Separated in order to simplify padding. Intrusive list node base class is used by market to form a list of arenas. **/ struct arena_base : padded { //! Number of workers that have been marked out by the resource manager to service the arena unsigned my_num_workers_allotted; // heavy use in stealing loop //! References of the arena /** Counts workers and master references separately. Bit 0 indicates reference from implicit master or explicit task_arena; the next bits contain number of workers servicing the arena.*/ atomic my_references; // heavy use in stealing loop #if __TBB_TASK_PRIORITY //! Highest priority of recently spawned or enqueued tasks. volatile intptr_t my_top_priority; // heavy use in stealing loop //! Maximal currently busy slot. atomic my_limit; // heavy use in stealing loop //! Task pool for the tasks scheduled via task::enqueue() method /** Such scheduling guarantees eventual execution even if - new tasks are constantly coming (by extracting scheduled tasks in relaxed FIFO order); - the enqueuing thread does not call any of wait_for_all methods. **/ task_stream my_task_stream[num_priority_levels]; // heavy use in stealing loop #else /* !__TBB_TASK_PRIORITY */ //! Task pool for the tasks scheduled via task::enqueue() method /** Such scheduling guarantees eventual execution even if - new tasks are constantly coming (by extracting scheduled tasks in relaxed FIFO order); - the enqueuing thread does not call any of wait_for_all methods. **/ task_stream my_task_stream; // heavy use in stealing loop //! Maximal currently busy slot. atomic my_limit; // heavy use in stealing loop #endif /* !__TBB_TASK_PRIORITY */ //! Number of workers that are currently requested from the resource manager int my_num_workers_requested; //! Number of slots in the arena unsigned my_num_slots; //! Number of workers requested by the master thread owning the arena unsigned my_max_num_workers; //! Market owning this arena market* my_market; //! ABA prevention marker uintptr_t my_aba_epoch; #if !__TBB_FP_CONTEXT //! FPU control settings of arena's master thread captured at the moment of arena instantiation. __TBB_cpu_ctl_env_t my_cpu_ctl_env; #endif #if __TBB_TRACK_PRIORITY_LEVEL_SATURATION int my_num_workers_present; #endif /* __TBB_TRACK_PRIORITY_LEVEL_SATURATION */ //! Current task pool state and estimate of available tasks amount. /** The estimate is either 0 (SNAPSHOT_EMPTY) or infinity (SNAPSHOT_FULL). Special state is "busy" (any other unsigned value). Note that the implementation of arena::is_busy_or_empty() requires my_pool_state to be unsigned. */ tbb::atomic my_pool_state; #if __TBB_TASK_GROUP_CONTEXT //! Default task group context. /** Used by root tasks allocated directly by the master thread (not from inside a TBB task) without explicit context specification. **/ task_group_context* my_default_ctx; #endif /* __TBB_TASK_GROUP_CONTEXT */ #if __TBB_SCHEDULER_OBSERVER //! List of local observers attached to this arena. observer_list my_observers; #endif /* __TBB_SCHEDULER_OBSERVER */ #if __TBB_TASK_PRIORITY //! Lowest normalized priority of available spawned or enqueued tasks. intptr_t my_bottom_priority; //! Tracks events that may bring tasks in offload areas to the top priority level. /** Incremented when arena top priority changes or a task group priority is elevated to the current arena's top level. **/ uintptr_t my_reload_epoch; //! List of offloaded tasks abandoned by workers revoked by the market task* my_orphaned_tasks; //! Counter used to track the occurrence of recent orphaning and re-sharing operations. tbb::atomic my_abandonment_epoch; //! Highest priority level containing enqueued tasks /** It being greater than 0 means that high priority enqueued tasks had to be bypassed because all workers were blocked in nested dispatch loops and were unable to progress at then current priority level. **/ tbb::atomic my_skipped_fifo_priority; #endif /* !__TBB_TASK_PRIORITY */ //! Indicates if there is an oversubscribing worker created to service enqueued tasks. bool my_mandatory_concurrency; #if __TBB_TASK_ARENA //! exit notifications after arena slot is released concurrent_monitor my_exit_monitors; #endif #if TBB_USE_ASSERT //! Used to trap accesses to the object after its destruction. uintptr_t my_guard; #endif /* TBB_USE_ASSERT */ }; // struct arena_base class arena #if (__GNUC__<4 || __GNUC__==4 && __GNUC_MINOR__==0) && !__INTEL_COMPILER : public padded #else : private padded #endif { private: friend class generic_scheduler; template friend class custom_scheduler; friend class governor; friend class task_scheduler_observer_v3; friend class market; friend class tbb::task; friend class tbb::task_group_context; friend class allocate_root_with_context_proxy; friend class intrusive_list; friend class interface7::internal::task_arena_base; // declared in scheduler_common.h friend class interface7::internal::delegated_task; friend class interface7::internal::wait_task; typedef padded base_type; //! Constructor arena ( market&, unsigned max_num_workers ); //! Allocate an instance of arena. static arena& allocate_arena( market&, unsigned max_num_workers ); static int unsigned num_slots_to_reserve ( unsigned max_num_workers ) { return max(2u, max_num_workers + 1); } static int allocation_size ( unsigned max_num_workers ) { return sizeof(base_type) + num_slots_to_reserve(max_num_workers) * (sizeof(mail_outbox) + sizeof(arena_slot)); } #if __TBB_TASK_GROUP_CONTEXT //! Finds all contexts affected by the state change and propagates the new state to them. /** The propagation is relayed to the market because tasks created by one master thread can be passed to and executed by other masters. This means that context trees can span several arenas at once and thus state change propagation cannot be generally localized to one arena only. **/ template bool propagate_task_group_state ( T task_group_context::*mptr_state, task_group_context& src, T new_state ); #endif /* __TBB_TASK_GROUP_CONTEXT */ //! Get reference to mailbox corresponding to given affinity_id. mail_outbox& mailbox( affinity_id id ) { __TBB_ASSERT( 0> 1; } //! If necessary, raise a flag that there is new job in arena. template void advertise_new_work(); //! Check if there is job anywhere in arena. /** Return true if no job or if arena is being cleaned up. */ bool is_out_of_work(); //! enqueue a task into starvation-resistance queue void enqueue_task( task&, intptr_t, FastRandom & ); //! Registers the worker with the arena and enters TBB scheduler dispatch loop void process( generic_scheduler& ); //! Notification that worker or master leaves its arena template inline void on_thread_leaving ( ); #if __TBB_STATISTICS //! Outputs internal statistics accumulated by the arena void dump_arena_statistics (); #endif /* __TBB_STATISTICS */ #if __TBB_TASK_PRIORITY //! Check if recent priority changes may bring some tasks to the current priority level soon /** /param tasks_present indicates presence of tasks at any priority level. **/ inline bool may_have_tasks ( generic_scheduler*, bool& tasks_present, bool& dequeuing_possible ); //! Puts offloaded tasks into global list of orphaned tasks void orphan_offloaded_tasks ( generic_scheduler& s ); #endif /* __TBB_TASK_PRIORITY */ #if __TBB_COUNT_TASK_NODES //! Returns the number of task objects "living" in worker threads intptr_t workers_task_node_count(); #endif /** Must be the last data field */ arena_slot my_slots[1]; }; // class arena template inline void arena::on_thread_leaving ( ) { // // Implementation of arena destruction synchronization logic contained various // bugs/flaws at the different stages of its evolution, so below is a detailed // description of the issues taken into consideration in the framework of the // current design. // // In case of using fire-and-forget tasks (scheduled via task::enqueue()) // master thread is allowed to leave its arena before all its work is executed, // and market may temporarily revoke all workers from this arena. Since revoked // workers never attempt to reset arena state to EMPTY and cancel its request // to RML for threads, the arena object is destroyed only when both the last // thread is leaving it and arena's state is EMPTY (that is its master thread // left and it does not contain any work). // // A worker that checks for work presence and transitions arena to the EMPTY // state (in snapshot taking procedure arena::is_out_of_work()) updates // arena::my_pool_state first and only then arena::my_num_workers_requested. // So the check for work absence must be done against the latter field. // // In a time window between decrementing the active threads count and checking // if there is an outstanding request for workers. New worker thread may arrive, // finish remaining work, set arena state to empty, and leave decrementing its // refcount and destroying. Then the current thread will destroy the arena // the second time. To preclude it a local copy of the outstanding request // value can be stored before decrementing active threads count. // // But this technique may cause two other problem. When the stored request is // zero, it is possible that arena still has threads and they can generate new // tasks and thus re-establish non-zero requests. Then all the threads can be // revoked (as described above) leaving this thread the last one, and causing // it to destroy non-empty arena. // // The other problem takes place when the stored request is non-zero. Another // thread may complete the work, set arena state to empty, and leave without // arena destruction before this thread decrements the refcount. This thread // cannot destroy the arena either. Thus the arena may be "orphaned". // // In both cases we cannot dereference arena pointer after the refcount is // decremented, as our arena may already be destroyed. // // If this is the master thread, market can be concurrently destroyed. // In case of workers market's liveness is ensured by the RML connection // rundown protocol, according to which the client (i.e. the market) lives // until RML server notifies it about connection termination, and this // notification is fired only after all workers return into RML. // // Thus if we decremented refcount to zero we ask the market to check arena // state (including the fact if it is alive) under the lock. // uintptr_t aba_epoch = my_aba_epoch; market* m = my_market; __TBB_ASSERT(my_references > int(!is_master), "broken arena reference counter"); if ( (my_references -= is_master? 1:2 ) == 0 ) // worker's counter starts from bit 1 market::try_destroy_arena( m, this, aba_epoch, is_master ); } template void arena::advertise_new_work() { if( !Spawned ) { // i.e. the work was enqueued if( my_max_num_workers==0 ) { my_max_num_workers = 1; __TBB_ASSERT(!my_mandatory_concurrency, ""); my_mandatory_concurrency = true; __TBB_ASSERT(!num_workers_active(), ""); my_pool_state = SNAPSHOT_FULL; my_market->adjust_demand( *this, 1 ); return; } // Local memory fence is required to avoid missed wakeups; see the comment below. // Starvation resistant tasks require mandatory concurrency, so missed wakeups are unacceptable. atomic_fence(); } // Double-check idiom that, in case of spawning, is deliberately sloppy about memory fences. // Technically, to avoid missed wakeups, there should be a full memory fence between the point we // released the task pool (i.e. spawned task) and read the arena's state. However, adding such a // fence might hurt overall performance more than it helps, because the fence would be executed // on every task pool release, even when stealing does not occur. Since TBB allows parallelism, // but never promises parallelism, the missed wakeup is not a correctness problem. pool_state_t snapshot = my_pool_state; if( is_busy_or_empty(snapshot) ) { // Attempt to mark as full. The compare_and_swap below is a little unusual because the // result is compared to a value that can be different than the comparand argument. if( my_pool_state.compare_and_swap( SNAPSHOT_FULL, snapshot )==SNAPSHOT_EMPTY ) { if( snapshot!=SNAPSHOT_EMPTY ) { // This thread read "busy" into snapshot, and then another thread transitioned // my_pool_state to "empty" in the meantime, which caused the compare_and_swap above // to fail. Attempt to transition my_pool_state from "empty" to "full". if( my_pool_state.compare_and_swap( SNAPSHOT_FULL, SNAPSHOT_EMPTY )!=SNAPSHOT_EMPTY ) { // Some other thread transitioned my_pool_state from "empty", and hence became // responsible for waking up workers. return; } } // This thread transitioned pool from empty to full state, and thus is responsible for // telling RML that there is work to do. if( Spawned ) { if( my_mandatory_concurrency ) { __TBB_ASSERT(my_max_num_workers==1, ""); __TBB_ASSERT(!governor::local_scheduler()->is_worker(), ""); // There was deliberate oversubscription on 1 core for sake of starvation-resistant tasks. // Now a single active thread (must be the master) supposedly starts a new parallel region // with relaxed sequential semantics, and oversubscription should be avoided. // Demand for workers has been decreased to 0 during SNAPSHOT_EMPTY, so just keep it. my_max_num_workers = 0; my_mandatory_concurrency = false; return; } } my_market->adjust_demand( *this, my_max_num_workers ); } } } } // namespace internal } // namespace tbb #endif /* _TBB_arena_H */ ================================================ FILE: benchmarks/tbb/atomic.h ================================================ /* Copyright 2005-2014 Intel Corporation. All Rights Reserved. This file is part of Threading Building Blocks. Threading Building Blocks is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. Threading Building Blocks is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Threading Building Blocks; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA As a special exception, you may use this file as part of a free software library without restriction. Specifically, if other files instantiate templates or use macros or inline functions from this file, or you compile this file and link it with other files to produce an executable, this file does not by itself cause the resulting executable to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the executable file might be covered by the GNU General Public License. */ #ifndef __TBB_atomic_H #define __TBB_atomic_H #include #if _MSC_VER #define __TBB_LONG_LONG __int64 #else #define __TBB_LONG_LONG long long #endif /* _MSC_VER */ #include "tbb_machine.h" #if defined(_MSC_VER) && !defined(__INTEL_COMPILER) // Workaround for overzealous compiler warnings #pragma warning (push) #pragma warning (disable: 4244 4267 4512) #endif namespace tbb { //! Specifies memory semantics. enum memory_semantics { //! Sequential consistency full_fence, //! Acquire acquire, //! Release release, //! No ordering relaxed }; //! @cond INTERNAL namespace internal { #if __TBB_ATTRIBUTE_ALIGNED_PRESENT #define __TBB_DECL_ATOMIC_FIELD(t,f,a) t f __attribute__ ((aligned(a))); #elif __TBB_DECLSPEC_ALIGN_PRESENT #define __TBB_DECL_ATOMIC_FIELD(t,f,a) __declspec(align(a)) t f; #else #error Do not know syntax for forcing alignment. #endif template struct atomic_rep; // Primary template declared, but never defined. template<> struct atomic_rep<1> { // Specialization typedef int8_t word; }; template<> struct atomic_rep<2> { // Specialization typedef int16_t word; }; template<> struct atomic_rep<4> { // Specialization #if _MSC_VER && !_WIN64 // Work-around that avoids spurious /Wp64 warnings typedef intptr_t word; #else typedef int32_t word; #endif }; #if __TBB_64BIT_ATOMICS template<> struct atomic_rep<8> { // Specialization typedef int64_t word; }; #endif template struct aligned_storage; //the specializations are needed to please MSVC syntax of __declspec(align()) which accept _literal_ constants only #if __TBB_ATOMIC_CTORS #define ATOMIC_STORAGE_PARTIAL_SPECIALIZATION(S) \ template \ struct aligned_storage { \ __TBB_DECL_ATOMIC_FIELD(value_type,my_value,S) \ aligned_storage() = default ; \ constexpr aligned_storage(value_type value):my_value(value){} \ }; \ #else #define ATOMIC_STORAGE_PARTIAL_SPECIALIZATION(S) \ template \ struct aligned_storage { \ __TBB_DECL_ATOMIC_FIELD(value_type,my_value,S) \ }; \ #endif template struct aligned_storage { value_type my_value; #if __TBB_ATOMIC_CTORS aligned_storage() = default ; constexpr aligned_storage(value_type value):my_value(value){} #endif }; ATOMIC_STORAGE_PARTIAL_SPECIALIZATION(2) ATOMIC_STORAGE_PARTIAL_SPECIALIZATION(4) #if __TBB_64BIT_ATOMICS ATOMIC_STORAGE_PARTIAL_SPECIALIZATION(8) #endif template struct atomic_traits; // Primary template declared, but not defined. #define __TBB_DECL_FENCED_ATOMIC_PRIMITIVES(S,M) \ template<> struct atomic_traits { \ typedef atomic_rep::word word; \ inline static word compare_and_swap( volatile void* location, word new_value, word comparand ) { \ return __TBB_machine_cmpswp##S##M(location,new_value,comparand); \ } \ inline static word fetch_and_add( volatile void* location, word addend ) { \ return __TBB_machine_fetchadd##S##M(location,addend); \ } \ inline static word fetch_and_store( volatile void* location, word value ) { \ return __TBB_machine_fetchstore##S##M(location,value); \ } \ }; #define __TBB_DECL_ATOMIC_PRIMITIVES(S) \ template \ struct atomic_traits { \ typedef atomic_rep::word word; \ inline static word compare_and_swap( volatile void* location, word new_value, word comparand ) { \ return __TBB_machine_cmpswp##S(location,new_value,comparand); \ } \ inline static word fetch_and_add( volatile void* location, word addend ) { \ return __TBB_machine_fetchadd##S(location,addend); \ } \ inline static word fetch_and_store( volatile void* location, word value ) { \ return __TBB_machine_fetchstore##S(location,value); \ } \ }; template struct atomic_load_store_traits; // Primary template declaration #define __TBB_DECL_ATOMIC_LOAD_STORE_PRIMITIVES(M) \ template<> struct atomic_load_store_traits { \ template \ inline static T load( const volatile T& location ) { \ return __TBB_load_##M( location ); \ } \ template \ inline static void store( volatile T& location, T value ) { \ __TBB_store_##M( location, value ); \ } \ } #if __TBB_USE_FENCED_ATOMICS __TBB_DECL_FENCED_ATOMIC_PRIMITIVES(1,full_fence) __TBB_DECL_FENCED_ATOMIC_PRIMITIVES(2,full_fence) __TBB_DECL_FENCED_ATOMIC_PRIMITIVES(4,full_fence) __TBB_DECL_FENCED_ATOMIC_PRIMITIVES(1,acquire) __TBB_DECL_FENCED_ATOMIC_PRIMITIVES(2,acquire) __TBB_DECL_FENCED_ATOMIC_PRIMITIVES(4,acquire) __TBB_DECL_FENCED_ATOMIC_PRIMITIVES(1,release) __TBB_DECL_FENCED_ATOMIC_PRIMITIVES(2,release) __TBB_DECL_FENCED_ATOMIC_PRIMITIVES(4,release) __TBB_DECL_FENCED_ATOMIC_PRIMITIVES(1,relaxed) __TBB_DECL_FENCED_ATOMIC_PRIMITIVES(2,relaxed) __TBB_DECL_FENCED_ATOMIC_PRIMITIVES(4,relaxed) #if __TBB_64BIT_ATOMICS __TBB_DECL_FENCED_ATOMIC_PRIMITIVES(8,full_fence) __TBB_DECL_FENCED_ATOMIC_PRIMITIVES(8,acquire) __TBB_DECL_FENCED_ATOMIC_PRIMITIVES(8,release) __TBB_DECL_FENCED_ATOMIC_PRIMITIVES(8,relaxed) #endif #else /* !__TBB_USE_FENCED_ATOMICS */ __TBB_DECL_ATOMIC_PRIMITIVES(1) __TBB_DECL_ATOMIC_PRIMITIVES(2) __TBB_DECL_ATOMIC_PRIMITIVES(4) #if __TBB_64BIT_ATOMICS __TBB_DECL_ATOMIC_PRIMITIVES(8) #endif #endif /* !__TBB_USE_FENCED_ATOMICS */ __TBB_DECL_ATOMIC_LOAD_STORE_PRIMITIVES(full_fence); __TBB_DECL_ATOMIC_LOAD_STORE_PRIMITIVES(acquire); __TBB_DECL_ATOMIC_LOAD_STORE_PRIMITIVES(release); __TBB_DECL_ATOMIC_LOAD_STORE_PRIMITIVES(relaxed); //! Additive inverse of 1 for type T. /** Various compilers issue various warnings if -1 is used with various integer types. The baroque expression below avoids all the warnings (we hope). */ #define __TBB_MINUS_ONE(T) (T(T(0)-T(1))) //! Base class that provides basic functionality for atomic without fetch_and_add. /** Works for any type T that has the same size as an integral type, has a trivial constructor/destructor, and can be copied/compared by memcpy/memcmp. */ template struct atomic_impl { protected: aligned_storage my_storage; private: //TODO: rechecks on recent versions of gcc if union is still the _only_ way to do a conversion without warnings //! Union type used to convert type T to underlying integral type. template union converter { typedef typename atomic_rep::word bits_type; converter(){} converter(value_type a_value) : value(a_value) {} value_type value; bits_type bits; }; template static typename converter::bits_type to_bits(value_t value){ return converter(value).bits; } template static value_t to_value(typename converter::bits_type bits){ converter u; u.bits = bits; return u.value; } template union ptr_converter; //Primary template declared, but never defined. template union ptr_converter { ptr_converter(){} ptr_converter(value_t* a_value) : value(a_value) {} value_t* value; uintptr_t bits; }; //TODO: check if making to_bits accepting reference (thus unifying it with to_bits_ref) //does not hurt performance template static typename converter::bits_type & to_bits_ref(value_t& value){ //TODO: this #ifdef is temporary workaround, as union conversion seems to fail //on suncc for 64 bit types for 32 bit target #if !__SUNPRO_CC return *(typename converter::bits_type*)ptr_converter(&value).bits; #else return *(typename converter::bits_type*)(&value); #endif } public: typedef T value_type; #if __TBB_ATOMIC_CTORS atomic_impl() = default ; constexpr atomic_impl(value_type value):my_storage(value){} #endif template value_type fetch_and_store( value_type value ) { return to_value( internal::atomic_traits::fetch_and_store( &my_storage.my_value, to_bits(value) ) ); } value_type fetch_and_store( value_type value ) { return fetch_and_store(value); } template value_type compare_and_swap( value_type value, value_type comparand ) { return to_value( internal::atomic_traits::compare_and_swap( &my_storage.my_value, to_bits(value), to_bits(comparand) ) ); } value_type compare_and_swap( value_type value, value_type comparand ) { return compare_and_swap(value,comparand); } operator value_type() const volatile { // volatile qualifier here for backwards compatibility return to_value( __TBB_load_with_acquire( to_bits_ref(my_storage.my_value) ) ); } template value_type load () const { return to_value( internal::atomic_load_store_traits::load( to_bits_ref(my_storage.my_value) ) ); } value_type load () const { return load(); } template void store ( value_type value ) { internal::atomic_load_store_traits::store( to_bits_ref(my_storage.my_value), to_bits(value)); } void store ( value_type value ) { store( value ); } protected: value_type store_with_release( value_type rhs ) { //TODO: unify with store __TBB_store_with_release( to_bits_ref(my_storage.my_value), to_bits(rhs) ); return rhs; } }; //! Base class that provides basic functionality for atomic with fetch_and_add. /** I is the underlying type. D is the difference type. StepType should be char if I is an integral type, and T if I is a T*. */ template struct atomic_impl_with_arithmetic: atomic_impl { public: typedef I value_type; #if __TBB_ATOMIC_CTORS atomic_impl_with_arithmetic() = default ; constexpr atomic_impl_with_arithmetic(value_type value): atomic_impl(value){} #endif template value_type fetch_and_add( D addend ) { return value_type(internal::atomic_traits::fetch_and_add( &this->my_storage.my_value, addend*sizeof(StepType) )); } value_type fetch_and_add( D addend ) { return fetch_and_add(addend); } template value_type fetch_and_increment() { return fetch_and_add(1); } value_type fetch_and_increment() { return fetch_and_add(1); } template value_type fetch_and_decrement() { return fetch_and_add(__TBB_MINUS_ONE(D)); } value_type fetch_and_decrement() { return fetch_and_add(__TBB_MINUS_ONE(D)); } public: value_type operator+=( D value ) { return fetch_and_add(value)+value; } value_type operator-=( D value ) { // Additive inverse of value computed using binary minus, // instead of unary minus, for sake of avoiding compiler warnings. return operator+=(D(0)-value); } value_type operator++() { return fetch_and_add(1)+1; } value_type operator--() { return fetch_and_add(__TBB_MINUS_ONE(D))-1; } value_type operator++(int) { return fetch_and_add(1); } value_type operator--(int) { return fetch_and_add(__TBB_MINUS_ONE(D)); } }; } /* Internal */ //! @endcond //! Primary template for atomic. /** See the Reference for details. @ingroup synchronization */ template struct atomic: internal::atomic_impl { #if __TBB_ATOMIC_CTORS atomic() = default; constexpr atomic(T arg): internal::atomic_impl(arg) {} #endif T operator=( T rhs ) { // "this" required here in strict ISO C++ because store_with_release is a dependent name return this->store_with_release(rhs); } atomic& operator=( const atomic& rhs ) {this->store_with_release(rhs); return *this;} }; #if __TBB_ATOMIC_CTORS #define __TBB_DECL_ATOMIC(T) \ template<> struct atomic: internal::atomic_impl_with_arithmetic { \ atomic() = default; \ constexpr atomic(T arg): internal::atomic_impl_with_arithmetic(arg) {} \ \ T operator=( T rhs ) {return store_with_release(rhs);} \ atomic& operator=( const atomic& rhs ) {store_with_release(rhs); return *this;} \ }; #else #define __TBB_DECL_ATOMIC(T) \ template<> struct atomic: internal::atomic_impl_with_arithmetic { \ T operator=( T rhs ) {return store_with_release(rhs);} \ atomic& operator=( const atomic& rhs ) {store_with_release(rhs); return *this;} \ }; #endif #if __TBB_64BIT_ATOMICS //TODO: consider adding non-default (and atomic) copy constructor for 32bit platform __TBB_DECL_ATOMIC(__TBB_LONG_LONG) __TBB_DECL_ATOMIC(unsigned __TBB_LONG_LONG) #else // test_atomic will verify that sizeof(long long)==8 #endif __TBB_DECL_ATOMIC(long) __TBB_DECL_ATOMIC(unsigned long) #if _MSC_VER && !_WIN64 #if __TBB_ATOMIC_CTORS /* Special version of __TBB_DECL_ATOMIC that avoids gratuitous warnings from cl /Wp64 option. It is identical to __TBB_DECL_ATOMIC(unsigned) except that it replaces operator=(T) with an operator=(U) that explicitly converts the U to a T. Types T and U should be type synonyms on the platform. Type U should be the wider variant of T from the perspective of /Wp64. */ #define __TBB_DECL_ATOMIC_ALT(T,U) \ template<> struct atomic: internal::atomic_impl_with_arithmetic { \ atomic() = default ; \ constexpr atomic(T arg): internal::atomic_impl_with_arithmetic(arg) {} \ T operator=( U rhs ) {return store_with_release(T(rhs));} \ atomic& operator=( const atomic& rhs ) {store_with_release(rhs); return *this;} \ }; #else #define __TBB_DECL_ATOMIC_ALT(T,U) \ template<> struct atomic: internal::atomic_impl_with_arithmetic { \ T operator=( U rhs ) {return store_with_release(T(rhs));} \ atomic& operator=( const atomic& rhs ) {store_with_release(rhs); return *this;} \ }; #endif __TBB_DECL_ATOMIC_ALT(unsigned,size_t) __TBB_DECL_ATOMIC_ALT(int,ptrdiff_t) #else __TBB_DECL_ATOMIC(unsigned) __TBB_DECL_ATOMIC(int) #endif /* _MSC_VER && !_WIN64 */ __TBB_DECL_ATOMIC(unsigned short) __TBB_DECL_ATOMIC(short) __TBB_DECL_ATOMIC(char) __TBB_DECL_ATOMIC(signed char) __TBB_DECL_ATOMIC(unsigned char) #if !_MSC_VER || defined(_NATIVE_WCHAR_T_DEFINED) __TBB_DECL_ATOMIC(wchar_t) #endif /* _MSC_VER||!defined(_NATIVE_WCHAR_T_DEFINED) */ //! Specialization for atomic with arithmetic and operator->. template struct atomic: internal::atomic_impl_with_arithmetic { #if __TBB_ATOMIC_CTORS atomic() = default ; constexpr atomic(T* arg): internal::atomic_impl_with_arithmetic(arg) {} #endif T* operator=( T* rhs ) { // "this" required here in strict ISO C++ because store_with_release is a dependent name return this->store_with_release(rhs); } atomic& operator=( const atomic& rhs ) { this->store_with_release(rhs); return *this; } T* operator->() const { return (*this); } }; //! Specialization for atomic, for sake of not allowing arithmetic or operator->. template<> struct atomic: internal::atomic_impl { #if __TBB_ATOMIC_CTORS atomic() = default ; constexpr atomic(void* arg): internal::atomic_impl(arg) {} #endif void* operator=( void* rhs ) { // "this" required here in strict ISO C++ because store_with_release is a dependent name return this->store_with_release(rhs); } atomic& operator=( const atomic& rhs ) { this->store_with_release(rhs); return *this; } }; // Helpers to workaround ugly syntax of calling template member function of a // template class with template argument dependent on template parameters. template T load ( const atomic& a ) { return a.template load(); } template void store ( atomic& a, T value ) { a.template store(value); } namespace interface6{ //! Make an atomic for use in an initialization (list), as an alternative to zero-initialization or normal assignment. template atomic make_atomic(T t) { atomic a; store(a,t); return a; } } using interface6::make_atomic; namespace internal { template void swap(atomic & lhs, atomic & rhs){ T tmp = load(lhs); store(lhs,load(rhs)); store(rhs,tmp); } // only to aid in the gradual conversion of ordinary variables to proper atomics template inline atomic& as_atomic( T& t ) { return (atomic&)t; } } // namespace tbb::internal } // namespace tbb #if _MSC_VER && !__INTEL_COMPILER #pragma warning (pop) #endif // warnings 4244, 4267 are back #endif /* __TBB_atomic_H */ ================================================ FILE: benchmarks/tbb/blocked_range.h ================================================ /* Copyright 2005-2014 Intel Corporation. All Rights Reserved. This file is part of Threading Building Blocks. Threading Building Blocks is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. Threading Building Blocks is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Threading Building Blocks; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA As a special exception, you may use this file as part of a free software library without restriction. Specifically, if other files instantiate templates or use macros or inline functions from this file, or you compile this file and link it with other files to produce an executable, this file does not by itself cause the resulting executable to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the executable file might be covered by the GNU General Public License. */ #ifndef __TBB_blocked_range_H #define __TBB_blocked_range_H #include "tbb_stddef.h" namespace tbb { /** \page range_req Requirements on range concept Class \c R implementing the concept of range must define: - \code R::R( const R& ); \endcode Copy constructor - \code R::~R(); \endcode Destructor - \code bool R::is_divisible() const; \endcode True if range can be partitioned into two subranges - \code bool R::empty() const; \endcode True if range is empty - \code R::R( R& r, split ); \endcode Split range \c r into two subranges. **/ //! A range over which to iterate. /** @ingroup algorithms */ template class blocked_range { public: //! Type of a value /** Called a const_iterator for sake of algorithms that need to treat a blocked_range as an STL container. */ typedef Value const_iterator; //! Type for size of a range typedef std::size_t size_type; //! Construct range with default-constructed values for begin and end. /** Requires that Value have a default constructor. */ blocked_range() : my_end(), my_begin() {} //! Construct range over half-open interval [begin,end), with the given grainsize. blocked_range( Value begin_, Value end_, size_type grainsize_=1 ) : my_end(end_), my_begin(begin_), my_grainsize(grainsize_) { __TBB_ASSERT( my_grainsize>0, "grainsize must be positive" ); } //! Beginning of range. const_iterator begin() const {return my_begin;} //! One past last value in range. const_iterator end() const {return my_end;} //! Size of the range /** Unspecified if end() friend class blocked_range2d; template friend class blocked_range3d; }; } // namespace tbb #endif /* __TBB_blocked_range_H */ ================================================ FILE: benchmarks/tbb/blocked_range2d.h ================================================ /* Copyright 2005-2014 Intel Corporation. All Rights Reserved. This file is part of Threading Building Blocks. Threading Building Blocks is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. Threading Building Blocks is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Threading Building Blocks; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA As a special exception, you may use this file as part of a free software library without restriction. Specifically, if other files instantiate templates or use macros or inline functions from this file, or you compile this file and link it with other files to produce an executable, this file does not by itself cause the resulting executable to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the executable file might be covered by the GNU General Public License. */ #ifndef __TBB_blocked_range2d_H #define __TBB_blocked_range2d_H #include "tbb_stddef.h" #include "blocked_range.h" namespace tbb { //! A 2-dimensional range that models the Range concept. /** @ingroup algorithms */ template class blocked_range2d { public: //! Type for size of an iteration range typedef blocked_range row_range_type; typedef blocked_range col_range_type; private: row_range_type my_rows; col_range_type my_cols; public: blocked_range2d( RowValue row_begin, RowValue row_end, typename row_range_type::size_type row_grainsize, ColValue col_begin, ColValue col_end, typename col_range_type::size_type col_grainsize ) : my_rows(row_begin,row_end,row_grainsize), my_cols(col_begin,col_end,col_grainsize) { } blocked_range2d( RowValue row_begin, RowValue row_end, ColValue col_begin, ColValue col_end ) : my_rows(row_begin,row_end), my_cols(col_begin,col_end) { } //! True if range is empty bool empty() const { // Yes, it is a logical OR here, not AND. return my_rows.empty() || my_cols.empty(); } //! True if range is divisible into two pieces. bool is_divisible() const { return my_rows.is_divisible() || my_cols.is_divisible(); } blocked_range2d( blocked_range2d& r, split ) : my_rows(r.my_rows), my_cols(r.my_cols) { split split_obj; do_split(r, split_obj); } #if __TBB_USE_PROPORTIONAL_SPLIT_IN_BLOCKED_RANGES //! Static field to support proportional split static const bool is_divisible_in_proportion = true; blocked_range2d( blocked_range2d& r, proportional_split& proportion ) : my_rows(r.my_rows), my_cols(r.my_cols) { do_split(r, proportion); } #endif /* __TBB_USE_PROPORTIONAL_SPLIT_IN_BLOCKED_RANGES */ template void do_split( blocked_range2d& r, Split& split_obj ) { if( my_rows.size()*double(my_cols.grainsize()) < my_cols.size()*double(my_rows.grainsize()) ) { my_cols.my_begin = col_range_type::do_split(r.my_cols, split_obj); } else { my_rows.my_begin = row_range_type::do_split(r.my_rows, split_obj); } } //! The rows of the iteration space const row_range_type& rows() const {return my_rows;} //! The columns of the iteration space const col_range_type& cols() const {return my_cols;} }; } // namespace tbb #endif /* __TBB_blocked_range2d_H */ ================================================ FILE: benchmarks/tbb/blocked_range3d.h ================================================ /* Copyright 2005-2014 Intel Corporation. All Rights Reserved. This file is part of Threading Building Blocks. Threading Building Blocks is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. Threading Building Blocks is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Threading Building Blocks; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA As a special exception, you may use this file as part of a free software library without restriction. Specifically, if other files instantiate templates or use macros or inline functions from this file, or you compile this file and link it with other files to produce an executable, this file does not by itself cause the resulting executable to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the executable file might be covered by the GNU General Public License. */ #ifndef __TBB_blocked_range3d_H #define __TBB_blocked_range3d_H #include "tbb_stddef.h" #include "blocked_range.h" namespace tbb { //! A 3-dimensional range that models the Range concept. /** @ingroup algorithms */ template class blocked_range3d { public: //! Type for size of an iteration range typedef blocked_range page_range_type; typedef blocked_range row_range_type; typedef blocked_range col_range_type; private: page_range_type my_pages; row_range_type my_rows; col_range_type my_cols; public: blocked_range3d( PageValue page_begin, PageValue page_end, RowValue row_begin, RowValue row_end, ColValue col_begin, ColValue col_end ) : my_pages(page_begin,page_end), my_rows(row_begin,row_end), my_cols(col_begin,col_end) { } blocked_range3d( PageValue page_begin, PageValue page_end, typename page_range_type::size_type page_grainsize, RowValue row_begin, RowValue row_end, typename row_range_type::size_type row_grainsize, ColValue col_begin, ColValue col_end, typename col_range_type::size_type col_grainsize ) : my_pages(page_begin,page_end,page_grainsize), my_rows(row_begin,row_end,row_grainsize), my_cols(col_begin,col_end,col_grainsize) { } //! True if range is empty bool empty() const { // Yes, it is a logical OR here, not AND. return my_pages.empty() || my_rows.empty() || my_cols.empty(); } //! True if range is divisible into two pieces. bool is_divisible() const { return my_pages.is_divisible() || my_rows.is_divisible() || my_cols.is_divisible(); } blocked_range3d( blocked_range3d& r, split ) : my_pages(r.my_pages), my_rows(r.my_rows), my_cols(r.my_cols) { split split_obj; do_split(r, split_obj); } #if __TBB_USE_PROPORTIONAL_SPLIT_IN_BLOCKED_RANGES //! Static field to support proportional split static const bool is_divisible_in_proportion = true; blocked_range3d( blocked_range3d& r, proportional_split& proportion ) : my_pages(r.my_pages), my_rows(r.my_rows), my_cols(r.my_cols) { do_split(r, proportion); } #endif /* __TBB_USE_PROPORTIONAL_SPLIT_IN_BLOCKED_RANGES */ template void do_split( blocked_range3d& r, Split& split_obj) { if ( my_pages.size()*double(my_rows.grainsize()) < my_rows.size()*double(my_pages.grainsize()) ) { if ( my_rows.size()*double(my_cols.grainsize()) < my_cols.size()*double(my_rows.grainsize()) ) { my_cols.my_begin = col_range_type::do_split(r.my_cols, split_obj); } else { my_rows.my_begin = row_range_type::do_split(r.my_rows, split_obj); } } else { if ( my_pages.size()*double(my_cols.grainsize()) < my_cols.size()*double(my_pages.grainsize()) ) { my_cols.my_begin = col_range_type::do_split(r.my_cols, split_obj); } else { my_pages.my_begin = page_range_type::do_split(r.my_pages, split_obj); } } } //! The pages of the iteration space const page_range_type& pages() const {return my_pages;} //! The rows of the iteration space const row_range_type& rows() const {return my_rows;} //! The columns of the iteration space const col_range_type& cols() const {return my_cols;} }; } // namespace tbb #endif /* __TBB_blocked_range3d_H */ ================================================ FILE: benchmarks/tbb/cache_aligned_allocator.cpp ================================================ /* Copyright 2005-2014 Intel Corporation. All Rights Reserved. This file is part of Threading Building Blocks. Threading Building Blocks is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. Threading Building Blocks is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Threading Building Blocks; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA As a special exception, you may use this file as part of a free software library without restriction. Specifically, if other files instantiate templates or use macros or inline functions from this file, or you compile this file and link it with other files to produce an executable, this file does not by itself cause the resulting executable to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the executable file might be covered by the GNU General Public License. */ #include "tbb/tbb_config.h" #include "tbb/cache_aligned_allocator.h" #include "tbb/tbb_allocator.h" #include "tbb/tbb_exception.h" #include "tbb_misc.h" #include "dynamic_link.h" #include #if _WIN32||_WIN64 #include "tbb/machine/windows_api.h" #else #include #endif /* _WIN32||_WIN64 */ using namespace std; #if __TBB_WEAK_SYMBOLS_PRESENT #pragma weak scalable_malloc #pragma weak scalable_free #pragma weak scalable_aligned_malloc #pragma weak scalable_aligned_free extern "C" { void* scalable_malloc( size_t ); void scalable_free( void* ); void* scalable_aligned_malloc( size_t, size_t ); void scalable_aligned_free( void* ); } #endif /* __TBB_WEAK_SYMBOLS_PRESENT */ namespace tbb { namespace internal { //! Dummy routine used for first indirect call via MallocHandler. static void* DummyMalloc( size_t size ); //! Dummy routine used for first indirect call via FreeHandler. static void DummyFree( void * ptr ); //! Handler for memory allocation static void* (*MallocHandler)( size_t size ) = &DummyMalloc; //! Handler for memory deallocation static void (*FreeHandler)( void* pointer ) = &DummyFree; //! Dummy routine used for first indirect call via padded_allocate_handler. static void* dummy_padded_allocate( size_t bytes, size_t alignment ); //! Dummy routine used for first indirect call via padded_free_handler. static void dummy_padded_free( void * ptr ); // ! Allocates memory using standard malloc. It is used when scalable_allocator is not available static void* padded_allocate( size_t bytes, size_t alignment ); // ! Allocates memory using standard free. It is used when scalable_allocator is not available static void padded_free( void* p ); //! Handler for padded memory allocation static void* (*padded_allocate_handler)( size_t bytes, size_t alignment ) = &dummy_padded_allocate; //! Handler for padded memory deallocation static void (*padded_free_handler)( void* p ) = &dummy_padded_free; //! Table describing how to link the handlers. static const dynamic_link_descriptor MallocLinkTable[] = { DLD(scalable_malloc, MallocHandler), DLD(scalable_free, FreeHandler), DLD(scalable_aligned_malloc, padded_allocate_handler), DLD(scalable_aligned_free, padded_free_handler), }; #if TBB_USE_DEBUG #define DEBUG_SUFFIX "_debug" #else #define DEBUG_SUFFIX #endif /* TBB_USE_DEBUG */ // MALLOCLIB_NAME is the name of the TBB memory allocator library. #if _WIN32||_WIN64 #define MALLOCLIB_NAME "tbbmalloc" DEBUG_SUFFIX ".dll" #elif __APPLE__ #define MALLOCLIB_NAME "libtbbmalloc" DEBUG_SUFFIX ".dylib" #elif __FreeBSD__ || __NetBSD__ || __sun || _AIX || __ANDROID__ #define MALLOCLIB_NAME "libtbbmalloc" DEBUG_SUFFIX ".so" #elif __linux__ // Note that order of these #elif's is important! #define MALLOCLIB_NAME "libtbbmalloc" DEBUG_SUFFIX __TBB_STRING(.so.TBB_COMPATIBLE_INTERFACE_VERSION) #else #error Unknown OS #endif //! Initialize the allocation/free handler pointers. /** Caller is responsible for ensuring this routine is called exactly once. The routine attempts to dynamically link with the TBB memory allocator. If that allocator is not found, it links to malloc and free. */ void initialize_handler_pointers() { __TBB_ASSERT( MallocHandler==&DummyMalloc, NULL ); bool success = dynamic_link( MALLOCLIB_NAME, MallocLinkTable, 4 ); if( !success ) { // If unsuccessful, set the handlers to the default routines. // This must be done now, and not before FillDynamicLinks runs, because if other // threads call the handlers, we want them to go through the DoOneTimeInitializations logic, // which forces them to wait. FreeHandler = &free; MallocHandler = &malloc; padded_allocate_handler = &padded_allocate; padded_free_handler = &padded_free; } #if !__TBB_RML_STATIC PrintExtraVersionInfo( "ALLOCATOR", success?"scalable_malloc":"malloc" ); #endif } static tbb::atomic initialization_state; void initialize_cache_aligned_allocator() { atomic_do_once( &initialize_handler_pointers, initialization_state ); } //! Executed on very first call through MallocHandler static void* DummyMalloc( size_t size ) { initialize_cache_aligned_allocator(); __TBB_ASSERT( MallocHandler!=&DummyMalloc, NULL ); return (*MallocHandler)( size ); } //! Executed on very first call through FreeHandler static void DummyFree( void * ptr ) { initialize_cache_aligned_allocator(); __TBB_ASSERT( FreeHandler!=&DummyFree, NULL ); (*FreeHandler)( ptr ); } //! Executed on very first call through padded_allocate_handler static void* dummy_padded_allocate( size_t bytes, size_t alignment ) { initialize_cache_aligned_allocator(); __TBB_ASSERT( padded_allocate_handler!=&dummy_padded_allocate, NULL ); return (*padded_allocate_handler)(bytes, alignment); } //! Executed on very first call through padded_free_handler static void dummy_padded_free( void * ptr ) { initialize_cache_aligned_allocator(); __TBB_ASSERT( padded_free_handler!=&dummy_padded_free, NULL ); (*padded_free_handler)( ptr ); } static size_t NFS_LineSize = 128; size_t NFS_GetLineSize() { return NFS_LineSize; } #if _MSC_VER && !defined(__INTEL_COMPILER) // unary minus operator applied to unsigned type, result still unsigned #pragma warning( disable: 4146 4706 ) #endif void* NFS_Allocate( size_t n, size_t element_size, void* /*hint*/ ) { size_t m = NFS_LineSize; __TBB_ASSERT( m<=NFS_MaxLineSize, "illegal value for NFS_LineSize" ); __TBB_ASSERT( (m & (m-1))==0, "must be power of two" ); size_t bytes = n*element_size; if (bytes=0x4096, "attempt to free block not obtained from cache_aligned_allocator" ); // Recover where block actually starts unsigned char* base = ((unsigned char**)p)[-1]; __TBB_ASSERT( (void*)((uintptr_t)(base+NFS_LineSize)&-NFS_LineSize)==p, "not allocated by NFS_Allocate?" ); free(base); } } void* __TBB_EXPORTED_FUNC allocate_via_handler_v3( size_t n ) { void* result = (*MallocHandler) (n); if (!result) { throw_exception(eid_bad_alloc); } return result; } void __TBB_EXPORTED_FUNC deallocate_via_handler_v3( void *p ) { if( p ) { (*FreeHandler)( p ); } } bool __TBB_EXPORTED_FUNC is_malloc_used_v3() { if (MallocHandler == &DummyMalloc) { void* void_ptr = (*MallocHandler)(1); (*FreeHandler)(void_ptr); } __TBB_ASSERT( MallocHandler!=&DummyMalloc && FreeHandler!=&DummyFree, NULL ); // Cast to void avoids type mismatch errors on some compilers (e.g. __IBMCPP__) __TBB_ASSERT( !(((void*)MallocHandler==(void*)&malloc) ^ ((void*)FreeHandler==(void*)&free)), "Both shim pointers must refer to routines from the same package (either TBB or CRT)" ); return (void*)MallocHandler == (void*)&malloc; } } // namespace internal } // namespace tbb ================================================ FILE: benchmarks/tbb/cache_aligned_allocator.h ================================================ /* Copyright 2005-2014 Intel Corporation. All Rights Reserved. This file is part of Threading Building Blocks. Threading Building Blocks is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. Threading Building Blocks is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Threading Building Blocks; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA As a special exception, you may use this file as part of a free software library without restriction. Specifically, if other files instantiate templates or use macros or inline functions from this file, or you compile this file and link it with other files to produce an executable, this file does not by itself cause the resulting executable to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the executable file might be covered by the GNU General Public License. */ #ifndef __TBB_cache_aligned_allocator_H #define __TBB_cache_aligned_allocator_H #include #include "tbb_stddef.h" #if __TBB_ALLOCATOR_CONSTRUCT_VARIADIC #include // std::forward #endif namespace tbb { //! @cond INTERNAL namespace internal { //! Cache/sector line size. /** @ingroup memory_allocation */ size_t __TBB_EXPORTED_FUNC NFS_GetLineSize(); //! Allocate memory on cache/sector line boundary. /** @ingroup memory_allocation */ void* __TBB_EXPORTED_FUNC NFS_Allocate( size_t n_element, size_t element_size, void* hint ); //! Free memory allocated by NFS_Allocate. /** Freeing a NULL pointer is allowed, but has no effect. @ingroup memory_allocation */ void __TBB_EXPORTED_FUNC NFS_Free( void* ); } //! @endcond #if _MSC_VER && !defined(__INTEL_COMPILER) // Workaround for erroneous "unreferenced parameter" warning in method destroy. #pragma warning (push) #pragma warning (disable: 4100) #endif //! Meets "allocator" requirements of ISO C++ Standard, Section 20.1.5 /** The members are ordered the same way they are in section 20.4.1 of the ISO C++ standard. @ingroup memory_allocation */ template class cache_aligned_allocator { public: typedef typename internal::allocator_type::value_type value_type; typedef value_type* pointer; typedef const value_type* const_pointer; typedef value_type& reference; typedef const value_type& const_reference; typedef size_t size_type; typedef ptrdiff_t difference_type; template struct rebind { typedef cache_aligned_allocator other; }; cache_aligned_allocator() throw() {} cache_aligned_allocator( const cache_aligned_allocator& ) throw() {} template cache_aligned_allocator(const cache_aligned_allocator&) throw() {} pointer address(reference x) const {return &x;} const_pointer address(const_reference x) const {return &x;} //! Allocate space for n objects, starting on a cache/sector line. pointer allocate( size_type n, const void* hint=0 ) { // The "hint" argument is always ignored in NFS_Allocate thus const_cast shouldn't hurt return pointer(internal::NFS_Allocate( n, sizeof(value_type), const_cast(hint) )); } //! Free block of memory that starts on a cache line void deallocate( pointer p, size_type ) { internal::NFS_Free(p); } //! Largest value for which method allocate might succeed. size_type max_size() const throw() { return (~size_t(0)-internal::NFS_MaxLineSize)/sizeof(value_type); } //! Copy-construct value at location pointed to by p. #if __TBB_ALLOCATOR_CONSTRUCT_VARIADIC template void construct(U *p, Args&&... args) { ::new((void *)p) U(std::forward(args)...); } #else // __TBB_ALLOCATOR_CONSTRUCT_VARIADIC #if __TBB_CPP11_RVALUE_REF_PRESENT void construct( pointer p, value_type&& value ) {::new((void*)(p)) value_type(std::move(value));} #endif void construct( pointer p, const value_type& value ) {::new((void*)(p)) value_type(value);} #endif // __TBB_ALLOCATOR_CONSTRUCT_VARIADIC //! Destroy value at location pointed to by p. void destroy( pointer p ) {p->~value_type();} }; #if _MSC_VER && !defined(__INTEL_COMPILER) #pragma warning (pop) #endif // warning 4100 is back //! Analogous to std::allocator, as defined in ISO C++ Standard, Section 20.4.1 /** @ingroup memory_allocation */ template<> class cache_aligned_allocator { public: typedef void* pointer; typedef const void* const_pointer; typedef void value_type; template struct rebind { typedef cache_aligned_allocator other; }; }; template inline bool operator==( const cache_aligned_allocator&, const cache_aligned_allocator& ) {return true;} template inline bool operator!=( const cache_aligned_allocator&, const cache_aligned_allocator& ) {return false;} } // namespace tbb #endif /* __TBB_cache_aligned_allocator_H */ ================================================ FILE: benchmarks/tbb/cilk-tbb-interop.h ================================================ /* Copyright 2005-2014 Intel Corporation. All Rights Reserved. This file is part of Threading Building Blocks. Threading Building Blocks is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. Threading Building Blocks is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Threading Building Blocks; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA As a special exception, you may use this file as part of a free software library without restriction. Specifically, if other files instantiate templates or use macros or inline functions from this file, or you compile this file and link it with other files to produce an executable, this file does not by itself cause the resulting executable to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the executable file might be covered by the GNU General Public License. */ /* The API to enable interoperability between Intel(R) Cilk(TM) Plus and Intel(R) Threading Building Blocks. */ #ifndef CILK_TBB_INTEROP_H #define CILK_TBB_INTEROP_H #ifndef _WIN32 #ifdef IN_CILK_RUNTIME #define CILK_EXPORT __attribute__((visibility("protected"))) #else #define CILK_EXPORT /* nothing */ #endif #else #ifdef IN_CILK_RUNTIME #define CILK_EXPORT __declspec(dllexport) #else #define CILK_EXPORT __declspec(dllimport) #endif // IN_CILK_RUNTIME #endif // _WIN32 #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ /* A return code. 0 indicates success */ typedef int __cilk_tbb_retcode; enum __cilk_tbb_stack_op { CILK_TBB_STACK_ORPHAN, // disconnecting stack from a thread CILK_TBB_STACK_ADOPT, // reconnecting orphaned stack to a trhead CILK_TBB_STACK_RELEASE // releasing stack }; typedef __cilk_tbb_retcode (*__cilk_tbb_pfn_stack_op)(enum __cilk_tbb_stack_op, void* data); typedef __cilk_tbb_retcode (*__cilk_tbb_pfn_unwatch_stacks)(void *data); /* Each thunk structure has two pointers: "routine" and "data". The caller of the thunk invokes *routine, passing "data" as the void* parameter. */ /* Thunk invoked by Intel Cilk Plus runtime (cilkrts) when it changes the relationship between a stack and a thread. It does not matter what stack the thunk runs on. The thread (not fiber) on which the thunk runs is important. CILK_TBB_STACK_ORPHAN The thunk must be invoked on the thread disconnecting itself from the stack. Must "happen before" the stack is adopted elsewhere. CILK_TBB_STACK_ADOPT The thunk must be invoked on the thread adopting the stack. CILK_TBB_STACK_RELEASE The thunk must be invoked on the thread doing the releasing, Must "happen before" the stack is used elsewhere. When a non-empty stack is transfered between threads, the first thread must orphan it and the second thread must adopt it. An empty stack can be transfered similarly, or simply released by the first thread. Here is a summary of the actions as transitions on a state machine. watch ORPHAN -->--> -->-- / \ / \ (freed empty stack) (TBB sees stack running on thread) (stack in limbo) | \ / \ / | | --<-- --<-- | ^ RELEASE or ADOPT V \ unwatch / \ / --------------------------<--------------------------- RELEASE */ struct __cilk_tbb_stack_op_thunk { __cilk_tbb_pfn_stack_op routine; void* data; /* Set by TBB */ }; /* Thunk invoked by TBB when it is no longer interested in watching the stack bound to the current thread. */ struct __cilk_tbb_unwatch_thunk { __cilk_tbb_pfn_unwatch_stacks routine; void* data; }; /* Defined by cilkrts, called by TBB. Requests that cilkrts invoke __cilk_tbb_stack_op_thunk when it orphans a stack. cilkrts sets *u to a thunk that TBB should call when it is no longer interested in watching the stack. */ CILK_EXPORT __cilk_tbb_retcode __cilkrts_watch_stack(struct __cilk_tbb_unwatch_thunk* u, struct __cilk_tbb_stack_op_thunk o); #ifdef __cplusplus } #endif /* __cplusplus */ #endif // CILK_TBB_INTEROP_H ================================================ FILE: benchmarks/tbb/combinable.h ================================================ /* Copyright 2005-2014 Intel Corporation. All Rights Reserved. This file is part of Threading Building Blocks. Threading Building Blocks is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. Threading Building Blocks is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Threading Building Blocks; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA As a special exception, you may use this file as part of a free software library without restriction. Specifically, if other files instantiate templates or use macros or inline functions from this file, or you compile this file and link it with other files to produce an executable, this file does not by itself cause the resulting executable to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the executable file might be covered by the GNU General Public License. */ #ifndef __TBB_combinable_H #define __TBB_combinable_H #include "enumerable_thread_specific.h" #include "cache_aligned_allocator.h" namespace tbb { /** \name combinable **/ //@{ //! Thread-local storage with optional reduction /** @ingroup containers */ template class combinable { private: typedef typename tbb::cache_aligned_allocator my_alloc; typedef typename tbb::enumerable_thread_specific my_ets_type; my_ets_type my_ets; public: combinable() { } template combinable( finit _finit) : my_ets(_finit) { } //! destructor ~combinable() { } combinable(const combinable& other) : my_ets(other.my_ets) { } combinable & operator=( const combinable & other) { my_ets = other.my_ets; return *this; } void clear() { my_ets.clear(); } T& local() { return my_ets.local(); } T& local(bool & exists) { return my_ets.local(exists); } // combine_func_t has signature T(T,T) or T(const T&, const T&) template T combine(combine_func_t f_combine) { return my_ets.combine(f_combine); } // combine_func_t has signature void(T) or void(const T&) template void combine_each(combine_func_t f_combine) { my_ets.combine_each(f_combine); } }; } // namespace tbb #endif /* __TBB_combinable_H */ ================================================ FILE: benchmarks/tbb/compat/condition_variable ================================================ /* Copyright 2005-2014 Intel Corporation. All Rights Reserved. This file is part of Threading Building Blocks. Threading Building Blocks is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. Threading Building Blocks is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Threading Building Blocks; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA As a special exception, you may use this file as part of a free software library without restriction. Specifically, if other files instantiate templates or use macros or inline functions from this file, or you compile this file and link it with other files to produce an executable, this file does not by itself cause the resulting executable to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the executable file might be covered by the GNU General Public License. */ #ifndef __TBB_condition_variable_H #define __TBB_condition_variable_H #if _WIN32||_WIN64 #include "../machine/windows_api.h" namespace tbb { namespace interface5 { namespace internal { struct condition_variable_using_event { //! Event for blocking waiting threads. HANDLE event; //! Protects invariants involving n_waiters, release_count, and epoch. CRITICAL_SECTION mutex; //! Number of threads waiting on this condition variable int n_waiters; //! Number of threads remaining that should no longer wait on this condition variable. int release_count; //! To keep threads from waking up prematurely with earlier signals. unsigned epoch; }; }}} // namespace tbb::interface5::internal #ifndef CONDITION_VARIABLE_INIT typedef void* CONDITION_VARIABLE; typedef CONDITION_VARIABLE* PCONDITION_VARIABLE; #endif #else /* if not _WIN32||_WIN64 */ #include // some systems need it for ETIMEDOUT #include #if __linux__ #include #else /* generic Unix */ #include #endif #endif /* _WIN32||_WIN64 */ #include "../tbb_stddef.h" #include "../mutex.h" #include "../tbb_thread.h" #include "../tbb_exception.h" #include "../tbb_profiling.h" namespace tbb { namespace interface5 { // C++0x standard working draft 30.4.3 // Lock tag types struct defer_lock_t { }; //! do not acquire ownership of the mutex struct try_to_lock_t { }; //! try to acquire ownership of the mutex without blocking struct adopt_lock_t { }; //! assume the calling thread has already const defer_lock_t defer_lock = {}; const try_to_lock_t try_to_lock = {}; const adopt_lock_t adopt_lock = {}; // C++0x standard working draft 30.4.3.1 //! lock_guard template class lock_guard : tbb::internal::no_copy { public: //! mutex type typedef M mutex_type; //! Constructor /** precondition: If mutex_type is not a recursive mutex, the calling thread does not own the mutex m. */ explicit lock_guard(mutex_type& m) : pm(m) {m.lock();} //! Adopt_lock constructor /** precondition: the calling thread owns the mutex m. */ lock_guard(mutex_type& m, adopt_lock_t) : pm(m) {} //! Destructor ~lock_guard() { pm.unlock(); } private: mutex_type& pm; }; // C++0x standard working draft 30.4.3.2 //! unique_lock template class unique_lock : tbb::internal::no_copy { friend class condition_variable; public: typedef M mutex_type; // 30.4.3.2.1 construct/copy/destroy // NB: Without constructors that take an r-value reference to a unique_lock, the following constructor is of little use. //! Constructor /** postcondition: pm==0 && owns==false */ unique_lock() : pm(NULL), owns(false) {} //! Constructor /** precondition: if mutex_type is not a recursive mutex, the calling thread does not own the mutex m. If the precondition is not met, a deadlock occurs. postcondition: pm==&m and owns==true */ explicit unique_lock(mutex_type& m) : pm(&m) {m.lock(); owns=true;} //! Defer_lock constructor /** postcondition: pm==&m and owns==false */ unique_lock(mutex_type& m, defer_lock_t) : pm(&m), owns(false) {} //! Try_to_lock constructor /** precondition: if mutex_type is not a recursive mutex, the calling thread does not own the mutex m. If the precondition is not met, a deadlock occurs. postcondition: pm==&m and owns==res where res is the value returned by the call to m.try_lock(). */ unique_lock(mutex_type& m, try_to_lock_t) : pm(&m) {owns = m.try_lock();} //! Adopt_lock constructor /** precondition: the calling thread owns the mutex. If it does not, mutex->unlock() would fail. postcondition: pm==&m and owns==true */ unique_lock(mutex_type& m, adopt_lock_t) : pm(&m), owns(true) {} //! Timed unique_lock acquisition. /** To avoid requiring support for namespace chrono, this method deviates from the working draft in that it uses tbb::tick_count::interval_t to specify the time duration. */ unique_lock(mutex_type& m, const tick_count::interval_t &i) : pm(&m) {owns = try_lock_for( i );} //! Destructor ~unique_lock() { if( owns ) pm->unlock(); } // 30.4.3.2.2 locking //! Lock the mutex and own it. void lock() { if( pm ) { if( !owns ) { pm->lock(); owns = true; } else throw_exception_v4( tbb::internal::eid_possible_deadlock ); } else throw_exception_v4( tbb::internal::eid_operation_not_permitted ); __TBB_ASSERT( owns, NULL ); } //! Try to lock the mutex. /** If successful, note that this lock owns it. Otherwise, set it false. */ bool try_lock() { if( pm ) { if( !owns ) owns = pm->try_lock(); else throw_exception_v4( tbb::internal::eid_possible_deadlock ); } else throw_exception_v4( tbb::internal::eid_operation_not_permitted ); return owns; } //! Try to lock the mutex. bool try_lock_for( const tick_count::interval_t &i ); //! Unlock the mutex /** And note that this lock no longer owns it. */ void unlock() { if( owns ) { pm->unlock(); owns = false; } else throw_exception_v4( tbb::internal::eid_operation_not_permitted ); __TBB_ASSERT( !owns, NULL ); } // 30.4.3.2.3 modifiers //! Swap the two unique locks void swap(unique_lock& u) { mutex_type* t_pm = u.pm; u.pm = pm; pm = t_pm; bool t_owns = u.owns; u.owns = owns; owns = t_owns; } //! Release control over the mutex. mutex_type* release() { mutex_type* o_pm = pm; pm = NULL; owns = false; return o_pm; } // 30.4.3.2.4 observers //! Does this lock own the mutex? bool owns_lock() const { return owns; } // TODO: Un-comment 'explicit' when the last non-C++0x compiler support is dropped //! Does this lock own the mutex? /*explicit*/ operator bool() const { return owns; } //! Return the mutex that this lock currently has. mutex_type* mutex() const { return pm; } private: mutex_type* pm; bool owns; }; template bool unique_lock::try_lock_for( const tick_count::interval_t &i) { const int unique_lock_tick = 100; /* microseconds; 0.1 milliseconds */ // the smallest wait-time is 0.1 milliseconds. bool res = pm->try_lock(); int duration_in_micro; if( !res && (duration_in_micro=int(i.seconds()*1e6))>unique_lock_tick ) { tick_count::interval_t i_100( double(unique_lock_tick)/1e6 /* seconds */); // 100 microseconds = 0.1*10E-3 do { this_tbb_thread::sleep(i_100); // sleep for 100 micro seconds duration_in_micro -= unique_lock_tick; res = pm->try_lock(); } while( !res && duration_in_micro>unique_lock_tick ); } return (owns=res); } //! Swap the two unique locks that have the mutexes of same type template void swap(unique_lock& x, unique_lock& y) { x.swap( y ); } namespace internal { #if _WIN32||_WIN64 union condvar_impl_t { condition_variable_using_event cv_event; CONDITION_VARIABLE cv_native; }; void __TBB_EXPORTED_FUNC internal_initialize_condition_variable( condvar_impl_t& cv ); void __TBB_EXPORTED_FUNC internal_destroy_condition_variable( condvar_impl_t& cv ); void __TBB_EXPORTED_FUNC internal_condition_variable_notify_one( condvar_impl_t& cv ); void __TBB_EXPORTED_FUNC internal_condition_variable_notify_all( condvar_impl_t& cv ); bool __TBB_EXPORTED_FUNC internal_condition_variable_wait( condvar_impl_t& cv, mutex* mtx, const tick_count::interval_t* i = NULL ); #else /* if !(_WIN32||_WIN64), i.e., POSIX threads */ typedef pthread_cond_t condvar_impl_t; #endif } // namespace internal //! cv_status /** C++0x standard working draft 30.5 */ enum cv_status { no_timeout, timeout }; //! condition variable /** C++0x standard working draft 30.5.1 @ingroup synchronization */ class condition_variable : tbb::internal::no_copy { public: //! Constructor condition_variable() { #if _WIN32||_WIN64 internal_initialize_condition_variable( my_cv ); #else pthread_cond_init( &my_cv, NULL ); #endif } //! Destructor ~condition_variable() { //precondition: There shall be no thread blocked on *this. #if _WIN32||_WIN64 internal_destroy_condition_variable( my_cv ); #else pthread_cond_destroy( &my_cv ); #endif } //! Notify one thread and wake it up void notify_one() { #if _WIN32||_WIN64 internal_condition_variable_notify_one( my_cv ); #else pthread_cond_signal( &my_cv ); #endif } //! Notify all threads void notify_all() { #if _WIN32||_WIN64 internal_condition_variable_notify_all( my_cv ); #else pthread_cond_broadcast( &my_cv ); #endif } //! Release the mutex associated with the lock and wait on this condition variable void wait(unique_lock& lock); //! Wait on this condition variable while pred is false template void wait(unique_lock& lock, Predicate pred) { while( !pred() ) wait( lock ); } //! Timed version of wait() cv_status wait_for(unique_lock& lock, const tick_count::interval_t &i ); //! Timed version of the predicated wait /** The loop terminates when pred() returns true or when the time duration specified by rel_time (i) has elapsed. */ template bool wait_for(unique_lock& lock, const tick_count::interval_t &i, Predicate pred) { while( !pred() ) { cv_status st = wait_for( lock, i ); if( st==timeout ) return pred(); } return true; } // C++0x standard working draft. 30.2.3 typedef internal::condvar_impl_t* native_handle_type; native_handle_type native_handle() { return (native_handle_type) &my_cv; } private: internal::condvar_impl_t my_cv; }; #if _WIN32||_WIN64 inline void condition_variable::wait( unique_lock& lock ) { __TBB_ASSERT( lock.owns, NULL ); lock.owns = false; if( !internal_condition_variable_wait( my_cv, lock.mutex() ) ) { int ec = GetLastError(); // on Windows 7, SleepConditionVariableCS() may return ERROR_TIMEOUT while the doc says it returns WAIT_TIMEOUT __TBB_ASSERT_EX( ec!=WAIT_TIMEOUT&&ec!=ERROR_TIMEOUT, NULL ); lock.owns = true; throw_exception_v4( tbb::internal::eid_condvar_wait_failed ); } lock.owns = true; } inline cv_status condition_variable::wait_for( unique_lock& lock, const tick_count::interval_t& i ) { cv_status rc = no_timeout; __TBB_ASSERT( lock.owns, NULL ); lock.owns = false; // condvar_wait could be SleepConditionVariableCS (or SleepConditionVariableSRW) or our own pre-vista cond_var_wait() if( !internal_condition_variable_wait( my_cv, lock.mutex(), &i ) ) { int ec = GetLastError(); if( ec==WAIT_TIMEOUT || ec==ERROR_TIMEOUT ) rc = timeout; else { lock.owns = true; throw_exception_v4( tbb::internal::eid_condvar_wait_failed ); } } lock.owns = true; return rc; } #else /* !(_WIN32||_WIN64) */ inline void condition_variable::wait( unique_lock& lock ) { __TBB_ASSERT( lock.owns, NULL ); lock.owns = false; if( pthread_cond_wait( &my_cv, lock.mutex()->native_handle() ) ) { lock.owns = true; throw_exception_v4( tbb::internal::eid_condvar_wait_failed ); } // upon successful return, the mutex has been locked and is owned by the calling thread. lock.owns = true; } inline cv_status condition_variable::wait_for( unique_lock& lock, const tick_count::interval_t& i ) { #if __linux__ struct timespec req; double sec = i.seconds(); clock_gettime( CLOCK_REALTIME, &req ); req.tv_sec += static_cast(sec); req.tv_nsec += static_cast( (sec - static_cast(sec))*1e9 ); #else /* generic Unix */ struct timeval tv; struct timespec req; double sec = i.seconds(); int status = gettimeofday(&tv, NULL); __TBB_ASSERT_EX( status==0, "gettimeofday failed" ); req.tv_sec = tv.tv_sec + static_cast(sec); req.tv_nsec = tv.tv_usec*1000 + static_cast( (sec - static_cast(sec))*1e9 ); #endif /*(choice of OS) */ if( req.tv_nsec>=1e9 ) { req.tv_sec += 1; req.tv_nsec -= static_cast(1e9); } __TBB_ASSERT( 0<=req.tv_nsec && req.tv_nsec<1e9, NULL ); int ec; cv_status rc = no_timeout; __TBB_ASSERT( lock.owns, NULL ); lock.owns = false; if( ( ec=pthread_cond_timedwait( &my_cv, lock.mutex()->native_handle(), &req ) ) ) { if( ec==ETIMEDOUT ) rc = timeout; else { __TBB_ASSERT( lock.try_lock()==false, NULL ); lock.owns = true; throw_exception_v4( tbb::internal::eid_condvar_wait_failed ); } } lock.owns = true; return rc; } #endif /* !(_WIN32||_WIN64) */ } // namespace interface5 __TBB_DEFINE_PROFILING_SET_NAME(interface5::condition_variable) } // namespace tbb #if TBB_IMPLEMENT_CPP0X namespace std { using tbb::interface5::defer_lock_t; using tbb::interface5::try_to_lock_t; using tbb::interface5::adopt_lock_t; using tbb::interface5::defer_lock; using tbb::interface5::try_to_lock; using tbb::interface5::adopt_lock; using tbb::interface5::lock_guard; using tbb::interface5::unique_lock; using tbb::interface5::swap; /* this is for void std::swap(unique_lock&,unique_lock&) */ using tbb::interface5::condition_variable; using tbb::interface5::cv_status; using tbb::interface5::timeout; using tbb::interface5::no_timeout; } // namespace std #endif /* TBB_IMPLEMENT_CPP0X */ #endif /* __TBB_condition_variable_H */ ================================================ FILE: benchmarks/tbb/compat/ppl.h ================================================ /* Copyright 2005-2014 Intel Corporation. All Rights Reserved. This file is part of Threading Building Blocks. Threading Building Blocks is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. Threading Building Blocks is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Threading Building Blocks; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA As a special exception, you may use this file as part of a free software library without restriction. Specifically, if other files instantiate templates or use macros or inline functions from this file, or you compile this file and link it with other files to produce an executable, this file does not by itself cause the resulting executable to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the executable file might be covered by the GNU General Public License. */ #ifndef __TBB_compat_ppl_H #define __TBB_compat_ppl_H #include "../task_group.h" #include "../parallel_invoke.h" #include "../parallel_for_each.h" #include "../parallel_for.h" #include "../tbb_exception.h" #include "../critical_section.h" #include "../reader_writer_lock.h" #include "../combinable.h" namespace Concurrency { #if __TBB_TASK_GROUP_CONTEXT using tbb::task_handle; using tbb::task_group_status; using tbb::task_group; using tbb::structured_task_group; using tbb::invalid_multiple_scheduling; using tbb::missing_wait; using tbb::make_task; using tbb::not_complete; using tbb::complete; using tbb::canceled; using tbb::is_current_task_group_canceling; #endif /* __TBB_TASK_GROUP_CONTEXT */ using tbb::parallel_invoke; using tbb::strict_ppl::parallel_for; using tbb::parallel_for_each; using tbb::critical_section; using tbb::reader_writer_lock; using tbb::combinable; using tbb::improper_lock; } // namespace Concurrency #endif /* __TBB_compat_ppl_H */ ================================================ FILE: benchmarks/tbb/compat/thread ================================================ /* Copyright 2005-2014 Intel Corporation. All Rights Reserved. This file is part of Threading Building Blocks. Threading Building Blocks is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. Threading Building Blocks is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Threading Building Blocks; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA As a special exception, you may use this file as part of a free software library without restriction. Specifically, if other files instantiate templates or use macros or inline functions from this file, or you compile this file and link it with other files to produce an executable, this file does not by itself cause the resulting executable to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the executable file might be covered by the GNU General Public License. */ #ifndef __TBB_thread_H #define __TBB_thread_H #include "../tbb_thread.h" #if TBB_IMPLEMENT_CPP0X namespace std { typedef tbb::tbb_thread thread; namespace this_thread { using tbb::this_tbb_thread::get_id; using tbb::this_tbb_thread::yield; inline void sleep_for(const tbb::tick_count::interval_t& rel_time) { tbb::internal::thread_sleep_v3( rel_time ); } } } #endif /* TBB_IMPLEMENT_CPP0X */ #endif /* __TBB_thread_H */ ================================================ FILE: benchmarks/tbb/compat/tuple ================================================ /* Copyright 2005-2014 Intel Corporation. All Rights Reserved. This file is part of Threading Building Blocks. Threading Building Blocks is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. Threading Building Blocks is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Threading Building Blocks; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA As a special exception, you may use this file as part of a free software library without restriction. Specifically, if other files instantiate templates or use macros or inline functions from this file, or you compile this file and link it with other files to produce an executable, this file does not by itself cause the resulting executable to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the executable file might be covered by the GNU General Public License. */ #ifndef __TBB_tuple_H #define __TBB_tuple_H #include #include "../tbb_stddef.h" // build preprocessor variables for varying number of arguments // Need the leading comma so the empty __TBB_T_PACK will not cause a syntax error. #if __TBB_VARIADIC_MAX <= 5 #define __TBB_T_PACK #define __TBB_U_PACK #define __TBB_TYPENAME_T_PACK #define __TBB_TYPENAME_U_PACK #define __TBB_NULL_TYPE_PACK #define __TBB_REF_T_PARAM_PACK #define __TBB_CONST_REF_T_PARAM_PACK #define __TBB_T_PARAM_LIST_PACK #define __TBB_CONST_NULL_REF_PACK // #elif __TBB_VARIADIC_MAX == 6 #define __TBB_T_PACK ,__T5 #define __TBB_U_PACK ,__U5 #define __TBB_TYPENAME_T_PACK , typename __T5 #define __TBB_TYPENAME_U_PACK , typename __U5 #define __TBB_NULL_TYPE_PACK , null_type #define __TBB_REF_T_PARAM_PACK ,__T5& t5 #define __TBB_CONST_REF_T_PARAM_PACK ,const __T5& t5 #define __TBB_T_PARAM_LIST_PACK ,t5 #define __TBB_CONST_NULL_REF_PACK , const null_type& // #elif __TBB_VARIADIC_MAX == 7 #define __TBB_T_PACK ,__T5, __T6 #define __TBB_U_PACK ,__U5, __U6 #define __TBB_TYPENAME_T_PACK , typename __T5 , typename __T6 #define __TBB_TYPENAME_U_PACK , typename __U5 , typename __U6 #define __TBB_NULL_TYPE_PACK , null_type, null_type #define __TBB_REF_T_PARAM_PACK ,__T5& t5, __T6& t6 #define __TBB_CONST_REF_T_PARAM_PACK ,const __T5& t5, const __T6& t6 #define __TBB_T_PARAM_LIST_PACK ,t5 ,t6 #define __TBB_CONST_NULL_REF_PACK , const null_type&, const null_type& // #elif __TBB_VARIADIC_MAX == 8 #define __TBB_T_PACK ,__T5, __T6, __T7 #define __TBB_U_PACK ,__U5, __U6, __U7 #define __TBB_TYPENAME_T_PACK , typename __T5 , typename __T6, typename __T7 #define __TBB_TYPENAME_U_PACK , typename __U5 , typename __U6, typename __U7 #define __TBB_NULL_TYPE_PACK , null_type, null_type, null_type #define __TBB_REF_T_PARAM_PACK ,__T5& t5, __T6& t6, __T7& t7 #define __TBB_CONST_REF_T_PARAM_PACK , const __T5& t5, const __T6& t6, const __T7& t7 #define __TBB_T_PARAM_LIST_PACK ,t5 ,t6 ,t7 #define __TBB_CONST_NULL_REF_PACK , const null_type&, const null_type&, const null_type& // #elif __TBB_VARIADIC_MAX == 9 #define __TBB_T_PACK ,__T5, __T6, __T7, __T8 #define __TBB_U_PACK ,__U5, __U6, __U7, __U8 #define __TBB_TYPENAME_T_PACK , typename __T5, typename __T6, typename __T7, typename __T8 #define __TBB_TYPENAME_U_PACK , typename __U5, typename __U6, typename __U7, typename __U8 #define __TBB_NULL_TYPE_PACK , null_type, null_type, null_type, null_type #define __TBB_REF_T_PARAM_PACK ,__T5& t5, __T6& t6, __T7& t7, __T8& t8 #define __TBB_CONST_REF_T_PARAM_PACK , const __T5& t5, const __T6& t6, const __T7& t7, const __T8& t8 #define __TBB_T_PARAM_LIST_PACK ,t5 ,t6 ,t7 ,t8 #define __TBB_CONST_NULL_REF_PACK , const null_type&, const null_type&, const null_type&, const null_type& // #elif __TBB_VARIADIC_MAX >= 10 #define __TBB_T_PACK ,__T5, __T6, __T7, __T8, __T9 #define __TBB_U_PACK ,__U5, __U6, __U7, __U8, __U9 #define __TBB_TYPENAME_T_PACK , typename __T5, typename __T6, typename __T7, typename __T8, typename __T9 #define __TBB_TYPENAME_U_PACK , typename __U5, typename __U6, typename __U7, typename __U8, typename __U9 #define __TBB_NULL_TYPE_PACK , null_type, null_type, null_type, null_type, null_type #define __TBB_REF_T_PARAM_PACK ,__T5& t5, __T6& t6, __T7& t7, __T8& t8, __T9& t9 #define __TBB_CONST_REF_T_PARAM_PACK , const __T5& t5, const __T6& t6, const __T7& t7, const __T8& t8, const __T9& t9 #define __TBB_T_PARAM_LIST_PACK ,t5 ,t6 ,t7 ,t8 ,t9 #define __TBB_CONST_NULL_REF_PACK , const null_type&, const null_type&, const null_type&, const null_type&, const null_type& #endif namespace tbb { namespace interface5 { namespace internal { struct null_type { }; } using internal::null_type; // tuple forward declaration template = 6 , typename __T5=null_type #if __TBB_VARIADIC_MAX >= 7 , typename __T6=null_type #if __TBB_VARIADIC_MAX >= 8 , typename __T7=null_type #if __TBB_VARIADIC_MAX >= 9 , typename __T8=null_type #if __TBB_VARIADIC_MAX >= 10 , typename __T9=null_type #endif #endif #endif #endif #endif > class tuple; namespace internal { // const null_type temp inline const null_type cnull() { return null_type(); } // cons forward declaration template struct cons; // type of a component of the cons template struct component { typedef typename __T::tail_type next; typedef typename component<__N-1,next>::type type; }; template struct component<0,__T> { typedef typename __T::head_type type; }; template<> struct component<0,null_type> { typedef null_type type; }; // const version of component template struct component<__N, const __T> { typedef typename __T::tail_type next; typedef const typename component<__N-1,next>::type type; }; template struct component<0, const __T> { typedef const typename __T::head_type type; }; // helper class for getting components of cons template< int __N> struct get_helper { template inline static typename component<__N, cons<__HT,__TT> >::type& get(cons<__HT,__TT>& ti) { return get_helper<__N-1>::get(ti.tail); } template inline static typename component<__N, cons<__HT,__TT> >::type const& get(const cons<__HT,__TT>& ti) { return get_helper<__N-1>::get(ti.tail); } }; template<> struct get_helper<0> { template inline static typename component<0, cons<__HT,__TT> >::type& get(cons<__HT,__TT>& ti) { return ti.head; } template inline static typename component<0, cons<__HT,__TT> >::type const& get(const cons<__HT,__TT>& ti) { return ti.head; } }; // traits adaptor template struct tuple_traits { typedef cons <__T0, typename tuple_traits<__T1, __T2, __T3, __T4 __TBB_T_PACK , null_type>::U > U; }; template struct tuple_traits<__T0, null_type, null_type, null_type, null_type __TBB_NULL_TYPE_PACK > { typedef cons<__T0, null_type> U; }; template<> struct tuple_traits { typedef null_type U; }; // core cons defs template struct cons{ typedef __HT head_type; typedef __TT tail_type; head_type head; tail_type tail; static const int length = 1 + tail_type::length; // default constructors explicit cons() : head(), tail() { } // non-default constructors cons(head_type& h, const tail_type& t) : head(h), tail(t) { } template cons(const __T0& t0, const __T1& t1, const __T2& t2, const __T3& t3, const __T4& t4 __TBB_CONST_REF_T_PARAM_PACK) : head(t0), tail(t1, t2, t3, t4 __TBB_T_PARAM_LIST_PACK, cnull()) { } template cons(__T0& t0, __T1& t1, __T2& t2, __T3& t3, __T4& t4 __TBB_REF_T_PARAM_PACK) : head(t0), tail(t1, t2, t3, t4 __TBB_T_PARAM_LIST_PACK , cnull()) { } template cons(const cons<__HT1,__TT1>& other) : head(other.head), tail(other.tail) { } cons& operator=(const cons& other) { head = other.head; tail = other.tail; return *this; } friend bool operator==(const cons& me, const cons& other) { return me.head == other.head && me.tail == other.tail; } friend bool operator<(const cons& me, const cons& other) { return me.head < other.head || (!(other.head < me.head) && me.tail < other.tail); } friend bool operator>(const cons& me, const cons& other) { return other=(const cons& me, const cons& other) { return !(meother); } template friend bool operator==(const cons<__HT,__TT>& me, const cons<__HT1,__TT1>& other) { return me.head == other.head && me.tail == other.tail; } template friend bool operator<(const cons<__HT,__TT>& me, const cons<__HT1,__TT1>& other) { return me.head < other.head || (!(other.head < me.head) && me.tail < other.tail); } template friend bool operator>(const cons<__HT,__TT>& me, const cons<__HT1,__TT1>& other) { return other friend bool operator!=(const cons<__HT,__TT>& me, const cons<__HT1,__TT1>& other) { return !(me==other); } template friend bool operator>=(const cons<__HT,__TT>& me, const cons<__HT1,__TT1>& other) { return !(me friend bool operator<=(const cons<__HT,__TT>& me, const cons<__HT1,__TT1>& other) { return !(me>other); } }; // cons template struct cons<__HT,null_type> { typedef __HT head_type; typedef null_type tail_type; head_type head; static const int length = 1; // default constructor cons() : head() { /*std::cout << "default constructor 1\n";*/ } cons(const null_type&, const null_type&, const null_type&, const null_type&, const null_type& __TBB_CONST_NULL_REF_PACK) : head() { /*std::cout << "default constructor 2\n";*/ } // non-default constructor template cons(__T1& t1, const null_type&, const null_type&, const null_type&, const null_type& __TBB_CONST_NULL_REF_PACK) : head(t1) { /*std::cout << "non-default a1, t1== " << t1 << "\n";*/} cons(head_type& h, const null_type& = null_type() ) : head(h) { } cons(const head_type& t0, const null_type&, const null_type&, const null_type&, const null_type& __TBB_CONST_NULL_REF_PACK) : head(t0) { } // converting constructor template cons(__HT1 h1, const null_type&, const null_type&, const null_type&, const null_type& __TBB_CONST_NULL_REF_PACK) : head(h1) { } // copy constructor template cons( const cons<__HT1, null_type>& other) : head(other.head) { } // assignment operator cons& operator=(const cons& other) { head = other.head; return *this; } friend bool operator==(const cons& me, const cons& other) { return me.head == other.head; } friend bool operator<(const cons& me, const cons& other) { return me.head < other.head; } friend bool operator>(const cons& me, const cons& other) { return otherother); } friend bool operator>=(const cons& me, const cons& other) {return !(me friend bool operator==(const cons<__HT,null_type>& me, const cons<__HT1,null_type>& other) { return me.head == other.head; } template friend bool operator<(const cons<__HT,null_type>& me, const cons<__HT1,null_type>& other) { return me.head < other.head; } template friend bool operator>(const cons<__HT,null_type>& me, const cons<__HT1,null_type>& other) { return other friend bool operator!=(const cons<__HT,null_type>& me, const cons<__HT1,null_type>& other) { return !(me==other); } template friend bool operator<=(const cons<__HT,null_type>& me, const cons<__HT1,null_type>& other) { return !(me>other); } template friend bool operator>=(const cons<__HT,null_type>& me, const cons<__HT1,null_type>& other) { return !(me struct cons { typedef null_type tail_type; static const int length = 0; }; // wrapper for default constructor template inline const __T wrap_dcons(__T*) { return __T(); } } // namespace internal // tuple definition template class tuple : public internal::tuple_traits<__T0, __T1, __T2, __T3, __T4 __TBB_T_PACK >::U { // friends template friend class tuple_size; template friend struct tuple_element; // stl components typedef tuple<__T0,__T1,__T2,__T3,__T4 __TBB_T_PACK > value_type; typedef value_type *pointer; typedef const value_type *const_pointer; typedef value_type &reference; typedef const value_type &const_reference; typedef size_t size_type; typedef typename internal::tuple_traits<__T0,__T1,__T2,__T3, __T4 __TBB_T_PACK >::U my_cons; public: tuple(const __T0& t0=internal::wrap_dcons((__T0*)NULL) ,const __T1& t1=internal::wrap_dcons((__T1*)NULL) ,const __T2& t2=internal::wrap_dcons((__T2*)NULL) ,const __T3& t3=internal::wrap_dcons((__T3*)NULL) ,const __T4& t4=internal::wrap_dcons((__T4*)NULL) #if __TBB_VARIADIC_MAX >= 6 ,const __T5& t5=internal::wrap_dcons((__T5*)NULL) #if __TBB_VARIADIC_MAX >= 7 ,const __T6& t6=internal::wrap_dcons((__T6*)NULL) #if __TBB_VARIADIC_MAX >= 8 ,const __T7& t7=internal::wrap_dcons((__T7*)NULL) #if __TBB_VARIADIC_MAX >= 9 ,const __T8& t8=internal::wrap_dcons((__T8*)NULL) #if __TBB_VARIADIC_MAX >= 10 ,const __T9& t9=internal::wrap_dcons((__T9*)NULL) #endif #endif #endif #endif #endif ) : my_cons(t0,t1,t2,t3,t4 __TBB_T_PARAM_LIST_PACK) { } template struct internal_tuple_element { typedef typename internal::component<__N,my_cons>::type type; }; template typename internal_tuple_element<__N>::type& get() { return internal::get_helper<__N>::get(*this); } template typename internal_tuple_element<__N>::type const& get() const { return internal::get_helper<__N>::get(*this); } template tuple& operator=(const internal::cons<__U1,__U2>& other) { my_cons::operator=(other); return *this; } template tuple& operator=(const std::pair<__U1,__U2>& other) { // __TBB_ASSERT(tuple_size::value == 2, "Invalid size for pair to tuple assignment"); this->head = other.first; this->tail.head = other.second; return *this; } friend bool operator==(const tuple& me, const tuple& other) {return static_cast(me)==(other);} friend bool operator<(const tuple& me, const tuple& other) {return static_cast(me)<(other);} friend bool operator>(const tuple& me, const tuple& other) {return static_cast(me)>(other);} friend bool operator!=(const tuple& me, const tuple& other) {return static_cast(me)!=(other);} friend bool operator>=(const tuple& me, const tuple& other) {return static_cast(me)>=(other);} friend bool operator<=(const tuple& me, const tuple& other) {return static_cast(me)<=(other);} }; // tuple // empty tuple template<> class tuple : public null_type { }; // helper classes template < typename __T> class tuple_size { public: static const size_t value = 1 + tuple_size::value; }; template <> class tuple_size > { public: static const size_t value = 0; }; template <> class tuple_size { public: static const size_t value = 0; }; template struct tuple_element { typedef typename internal::component<__N, typename __T::my_cons>::type type; }; template inline static typename tuple_element<__N,tuple<__T0,__T1,__T2,__T3,__T4 __TBB_T_PACK > >::type& get(tuple<__T0,__T1,__T2,__T3,__T4 __TBB_T_PACK >& t) { return internal::get_helper<__N>::get(t); } template inline static typename tuple_element<__N,tuple<__T0,__T1,__T2,__T3,__T4 __TBB_T_PACK > >::type const& get(const tuple<__T0,__T1,__T2,__T3,__T4 __TBB_T_PACK >& t) { return internal::get_helper<__N>::get(t); } } // interface5 } // tbb #if !__TBB_CPP11_TUPLE_PRESENT namespace tbb { namespace flow { using tbb::interface5::tuple; using tbb::interface5::tuple_size; using tbb::interface5::tuple_element; using tbb::interface5::get; } } #endif #undef __TBB_T_PACK #undef __TBB_U_PACK #undef __TBB_TYPENAME_T_PACK #undef __TBB_TYPENAME_U_PACK #undef __TBB_NULL_TYPE_PACK #undef __TBB_REF_T_PARAM_PACK #undef __TBB_CONST_REF_T_PARAM_PACK #undef __TBB_T_PARAM_LIST_PACK #undef __TBB_CONST_NULL_REF_PACK #endif /* __TBB_tuple_H */ ================================================ FILE: benchmarks/tbb/concurrent_hash_map.cpp ================================================ /* Copyright 2005-2014 Intel Corporation. All Rights Reserved. This file is part of Threading Building Blocks. Threading Building Blocks is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. Threading Building Blocks is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Threading Building Blocks; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA As a special exception, you may use this file as part of a free software library without restriction. Specifically, if other files instantiate templates or use macros or inline functions from this file, or you compile this file and link it with other files to produce an executable, this file does not by itself cause the resulting executable to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the executable file might be covered by the GNU General Public License. */ #include "tbb/concurrent_hash_map.h" namespace tbb { namespace internal { #if !TBB_NO_LEGACY struct hash_map_segment_base { typedef spin_rw_mutex segment_mutex_t; //! Type of a hash code. typedef size_t hashcode_t; //! Log2 of n_segment static const size_t n_segment_bits = 6; //! Maximum size of array of chains static const size_t max_physical_size = size_t(1)<<(8*sizeof(hashcode_t)-n_segment_bits); //! Mutex that protects this segment segment_mutex_t my_mutex; // Number of nodes atomic my_logical_size; // Size of chains /** Always zero or a power of two */ size_t my_physical_size; //! True if my_logical_size>=my_physical_size. /** Used to support Intel(R) Thread Checker. */ bool __TBB_EXPORTED_METHOD internal_grow_predicate() const; }; bool hash_map_segment_base::internal_grow_predicate() const { // Intel(R) Thread Checker considers the following reads to be races, so we hide them in the // library so that Intel(R) Thread Checker will ignore them. The reads are used in a double-check // context, so the program is nonetheless correct despite the race. return my_logical_size >= my_physical_size && my_physical_size < max_physical_size; } #endif//!TBB_NO_LEGACY } // namespace internal } // namespace tbb ================================================ FILE: benchmarks/tbb/concurrent_hash_map.h ================================================ /* Copyright 2005-2014 Intel Corporation. All Rights Reserved. This file is part of Threading Building Blocks. Threading Building Blocks is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. Threading Building Blocks is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Threading Building Blocks; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA As a special exception, you may use this file as part of a free software library without restriction. Specifically, if other files instantiate templates or use macros or inline functions from this file, or you compile this file and link it with other files to produce an executable, this file does not by itself cause the resulting executable to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the executable file might be covered by the GNU General Public License. */ #ifndef __TBB_concurrent_hash_map_H #define __TBB_concurrent_hash_map_H #include "tbb_stddef.h" #if !TBB_USE_EXCEPTIONS && _MSC_VER // Suppress "C++ exception handler used, but unwind semantics are not enabled" warning in STL headers #pragma warning (push) #pragma warning (disable: 4530) #endif #include #include // Need std::pair #include // Need std::memset #if !TBB_USE_EXCEPTIONS && _MSC_VER #pragma warning (pop) #endif #include "cache_aligned_allocator.h" #include "tbb_allocator.h" #include "spin_rw_mutex.h" #include "atomic.h" #include "tbb_exception.h" #include "tbb_profiling.h" #include "internal/_concurrent_unordered_impl.h" // Need tbb_hasher #if __TBB_INITIALIZER_LISTS_PRESENT #include #endif #if TBB_USE_PERFORMANCE_WARNINGS || __TBB_STATISTICS #include #endif #if __TBB_STATISTICS #include #endif namespace tbb { //! hash_compare that is default argument for concurrent_hash_map template struct tbb_hash_compare { static size_t hash( const Key& a ) { return tbb_hasher(a); } static bool equal( const Key& a, const Key& b ) { return a == b; } }; namespace interface5 { template, typename A = tbb_allocator > > class concurrent_hash_map; //! @cond INTERNAL namespace internal { using namespace tbb::internal; //! Type of a hash code. typedef size_t hashcode_t; //! Node base type struct hash_map_node_base : tbb::internal::no_copy { //! Mutex type typedef spin_rw_mutex mutex_t; //! Scoped lock type for mutex typedef mutex_t::scoped_lock scoped_t; //! Next node in chain hash_map_node_base *next; mutex_t mutex; }; //! Incompleteness flag value static hash_map_node_base *const rehash_req = reinterpret_cast(size_t(3)); //! Rehashed empty bucket flag static hash_map_node_base *const empty_rehashed = reinterpret_cast(size_t(0)); //! base class of concurrent_hash_map class hash_map_base { public: //! Size type typedef size_t size_type; //! Type of a hash code. typedef size_t hashcode_t; //! Segment index type typedef size_t segment_index_t; //! Node base type typedef hash_map_node_base node_base; //! Bucket type struct bucket : tbb::internal::no_copy { //! Mutex type for buckets typedef spin_rw_mutex mutex_t; //! Scoped lock type for mutex typedef mutex_t::scoped_lock scoped_t; mutex_t mutex; node_base *node_list; }; //! Count of segments in the first block static size_type const embedded_block = 1; //! Count of segments in the first block static size_type const embedded_buckets = 1< my_mask; //! Segment pointers table. Also prevents false sharing between my_mask and my_size segments_table_t my_table; //! Size of container in stored items atomic my_size; // It must be in separate cache line from my_mask due to performance effects //! Zero segment bucket my_embedded_segment[embedded_buckets]; #if __TBB_STATISTICS atomic my_info_resizes; // concurrent ones mutable atomic my_info_restarts; // race collisions atomic my_info_rehashes; // invocations of rehash_bucket #endif //! Constructor hash_map_base() { std::memset( this, 0, pointers_per_table*sizeof(segment_ptr_t) // 32*4=128 or 64*8=512 + sizeof(my_size) + sizeof(my_mask) // 4+4 or 8+8 + embedded_buckets*sizeof(bucket) ); // n*8 or n*16 for( size_type i = 0; i < embedded_block; i++ ) // fill the table my_table[i] = my_embedded_segment + segment_base(i); my_mask = embedded_buckets - 1; __TBB_ASSERT( embedded_block <= first_block, "The first block number must include embedded blocks"); #if __TBB_STATISTICS my_info_resizes = 0; // concurrent ones my_info_restarts = 0; // race collisions my_info_rehashes = 0; // invocations of rehash_bucket #endif } //! @return segment index of given index in the array static segment_index_t segment_index_of( size_type index ) { return segment_index_t( __TBB_Log2( index|1 ) ); } //! @return the first array index of given segment static segment_index_t segment_base( segment_index_t k ) { return (segment_index_t(1)<(ptr) > uintptr_t(63); } //! Initialize buckets static void init_buckets( segment_ptr_t ptr, size_type sz, bool is_initial ) { if( is_initial ) std::memset(ptr, 0, sz*sizeof(bucket) ); else for(size_type i = 0; i < sz; i++, ptr++) { *reinterpret_cast(&ptr->mutex) = 0; ptr->node_list = rehash_req; } } //! Add node @arg n to bucket @arg b static void add_to_bucket( bucket *b, node_base *n ) { __TBB_ASSERT(b->node_list != rehash_req, NULL); n->next = b->node_list; b->node_list = n; // its under lock and flag is set } //! Exception safety helper struct enable_segment_failsafe : tbb::internal::no_copy { segment_ptr_t *my_segment_ptr; enable_segment_failsafe(segments_table_t &table, segment_index_t k) : my_segment_ptr(&table[k]) {} ~enable_segment_failsafe() { if( my_segment_ptr ) *my_segment_ptr = 0; // indicate no allocation in progress } }; //! Enable segment void enable_segment( segment_index_t k, bool is_initial = false ) { __TBB_ASSERT( k, "Zero segment must be embedded" ); enable_segment_failsafe watchdog( my_table, k ); cache_aligned_allocator alloc; size_type sz; __TBB_ASSERT( !is_valid(my_table[k]), "Wrong concurrent assignment"); if( k >= first_block ) { sz = segment_size( k ); segment_ptr_t ptr = alloc.allocate( sz ); init_buckets( ptr, sz, is_initial ); itt_hide_store_word( my_table[k], ptr ); sz <<= 1;// double it to get entire capacity of the container } else { // the first block __TBB_ASSERT( k == embedded_block, "Wrong segment index" ); sz = segment_size( first_block ); segment_ptr_t ptr = alloc.allocate( sz - embedded_buckets ); init_buckets( ptr, sz - embedded_buckets, is_initial ); ptr -= segment_base(embedded_block); for(segment_index_t i = embedded_block; i < first_block; i++) // calc the offsets itt_hide_store_word( my_table[i], ptr + segment_base(i) ); } itt_store_word_with_release( my_mask, sz-1 ); watchdog.my_segment_ptr = 0; } //! Get bucket by (masked) hashcode bucket *get_bucket( hashcode_t h ) const throw() { // TODO: add throw() everywhere? segment_index_t s = segment_index_of( h ); h -= segment_base(s); segment_ptr_t seg = my_table[s]; __TBB_ASSERT( is_valid(seg), "hashcode must be cut by valid mask for allocated segments" ); return &seg[h]; } // internal serial rehashing helper void mark_rehashed_levels( hashcode_t h ) throw () { segment_index_t s = segment_index_of( h ); while( segment_ptr_t seg = my_table[++s] ) if( seg[h].node_list == rehash_req ) { seg[h].node_list = empty_rehashed; mark_rehashed_levels( h + ((hashcode_t)1<node_list) != rehash_req ) { #if __TBB_STATISTICS my_info_restarts++; // race collisions #endif return true; } } return false; } //! Insert a node and check for load factor. @return segment index to enable. segment_index_t insert_new_node( bucket *b, node_base *n, hashcode_t mask ) { size_type sz = ++my_size; // prefix form is to enforce allocation after the first item inserted add_to_bucket( b, n ); // check load factor if( sz >= mask ) { // TODO: add custom load_factor segment_index_t new_seg = __TBB_Log2( mask+1 ); //optimized segment_index_of __TBB_ASSERT( is_valid(my_table[new_seg-1]), "new allocations must not publish new mask until segment has allocated"); static const segment_ptr_t is_allocating = (segment_ptr_t)2; if( !itt_hide_load_word(my_table[new_seg]) && as_atomic(my_table[new_seg]).compare_and_swap(is_allocating, NULL) == NULL ) return new_seg; // The value must be processed } return 0; } //! Prepare enough segments for number of buckets void reserve(size_type buckets) { if( !buckets-- ) return; bool is_initial = !my_size; for( size_type m = my_mask; buckets > m; m = my_mask ) enable_segment( segment_index_of( m+1 ), is_initial ); } //! Swap hash_map_bases void internal_swap(hash_map_base &table) { using std::swap; swap(this->my_mask, table.my_mask); swap(this->my_size, table.my_size); for(size_type i = 0; i < embedded_buckets; i++) swap(this->my_embedded_segment[i].node_list, table.my_embedded_segment[i].node_list); for(size_type i = embedded_block; i < pointers_per_table; i++) swap(this->my_table[i], table.my_table[i]); } }; template class hash_map_range; //! Meets requirements of a forward iterator for STL */ /** Value is either the T or const T type of the container. @ingroup containers */ template class hash_map_iterator : public std::iterator { typedef Container map_type; typedef typename Container::node node; typedef hash_map_base::node_base node_base; typedef hash_map_base::bucket bucket; template friend bool operator==( const hash_map_iterator& i, const hash_map_iterator& j ); template friend bool operator!=( const hash_map_iterator& i, const hash_map_iterator& j ); template friend ptrdiff_t operator-( const hash_map_iterator& i, const hash_map_iterator& j ); template friend class hash_map_iterator; template friend class hash_map_range; void advance_to_next_bucket() { // TODO?: refactor to iterator_base class size_t k = my_index+1; while( my_bucket && k <= my_map->my_mask ) { // Following test uses 2's-complement wizardry if( k& (k-2) ) // not the beginning of a segment ++my_bucket; else my_bucket = my_map->get_bucket( k ); my_node = static_cast( my_bucket->node_list ); if( hash_map_base::is_valid(my_node) ) { my_index = k; return; } ++k; } my_bucket = 0; my_node = 0; my_index = k; // the end } #if !defined(_MSC_VER) || defined(__INTEL_COMPILER) template friend class interface5::concurrent_hash_map; #else public: // workaround #endif //! concurrent_hash_map over which we are iterating. const Container *my_map; //! Index in hash table for current item size_t my_index; //! Pointer to bucket const bucket *my_bucket; //! Pointer to node that has current item node *my_node; hash_map_iterator( const Container &map, size_t index, const bucket *b, node_base *n ); public: //! Construct undefined iterator hash_map_iterator() {} hash_map_iterator( const hash_map_iterator &other ) : my_map(other.my_map), my_index(other.my_index), my_bucket(other.my_bucket), my_node(other.my_node) {} Value& operator*() const { __TBB_ASSERT( hash_map_base::is_valid(my_node), "iterator uninitialized or at end of container?" ); return my_node->item; } Value* operator->() const {return &operator*();} hash_map_iterator& operator++(); //! Post increment hash_map_iterator operator++(int) { hash_map_iterator old(*this); operator++(); return old; } }; template hash_map_iterator::hash_map_iterator( const Container &map, size_t index, const bucket *b, node_base *n ) : my_map(&map), my_index(index), my_bucket(b), my_node( static_cast(n) ) { if( b && !hash_map_base::is_valid(n) ) advance_to_next_bucket(); } template hash_map_iterator& hash_map_iterator::operator++() { my_node = static_cast( my_node->next ); if( !my_node ) advance_to_next_bucket(); return *this; } template bool operator==( const hash_map_iterator& i, const hash_map_iterator& j ) { return i.my_node == j.my_node && i.my_map == j.my_map; } template bool operator!=( const hash_map_iterator& i, const hash_map_iterator& j ) { return i.my_node != j.my_node || i.my_map != j.my_map; } //! Range class used with concurrent_hash_map /** @ingroup containers */ template class hash_map_range { typedef typename Iterator::map_type map_type; Iterator my_begin; Iterator my_end; mutable Iterator my_midpoint; size_t my_grainsize; //! Set my_midpoint to point approximately half way between my_begin and my_end. void set_midpoint() const; template friend class hash_map_range; public: //! Type for size of a range typedef std::size_t size_type; typedef typename Iterator::value_type value_type; typedef typename Iterator::reference reference; typedef typename Iterator::difference_type difference_type; typedef Iterator iterator; //! True if range is empty. bool empty() const {return my_begin==my_end;} //! True if range can be partitioned into two subranges. bool is_divisible() const { return my_midpoint!=my_end; } //! Split range. hash_map_range( hash_map_range& r, split ) : my_end(r.my_end), my_grainsize(r.my_grainsize) { r.my_end = my_begin = r.my_midpoint; __TBB_ASSERT( !empty(), "Splitting despite the range is not divisible" ); __TBB_ASSERT( !r.empty(), "Splitting despite the range is not divisible" ); set_midpoint(); r.set_midpoint(); } //! type conversion template hash_map_range( hash_map_range& r) : my_begin(r.my_begin), my_end(r.my_end), my_midpoint(r.my_midpoint), my_grainsize(r.my_grainsize) {} //! Init range with container and grainsize specified hash_map_range( const map_type &map, size_type grainsize_ = 1 ) : my_begin( Iterator( map, 0, map.my_embedded_segment, map.my_embedded_segment->node_list ) ), my_end( Iterator( map, map.my_mask + 1, 0, 0 ) ), my_grainsize( grainsize_ ) { __TBB_ASSERT( grainsize_>0, "grainsize must be positive" ); set_midpoint(); } const Iterator& begin() const {return my_begin;} const Iterator& end() const {return my_end;} //! The grain size for this range. size_type grainsize() const {return my_grainsize;} }; template void hash_map_range::set_midpoint() const { // Split by groups of nodes size_t m = my_end.my_index-my_begin.my_index; if( m > my_grainsize ) { m = my_begin.my_index + m/2u; hash_map_base::bucket *b = my_begin.my_map->get_bucket(m); my_midpoint = Iterator(*my_begin.my_map,m,b,b->node_list); } else { my_midpoint = my_end; } __TBB_ASSERT( my_begin.my_index <= my_midpoint.my_index, "my_begin is after my_midpoint" ); __TBB_ASSERT( my_midpoint.my_index <= my_end.my_index, "my_midpoint is after my_end" ); __TBB_ASSERT( my_begin != my_midpoint || my_begin == my_end, "[my_begin, my_midpoint) range should not be empty" ); } } // internal //! @endcond #if _MSC_VER && !defined(__INTEL_COMPILER) // Suppress "conditional expression is constant" warning. #pragma warning( push ) #pragma warning( disable: 4127 ) #endif //! Unordered map from Key to T. /** concurrent_hash_map is associative container with concurrent access. @par Compatibility The class meets all Container Requirements from C++ Standard (See ISO/IEC 14882:2003(E), clause 23.1). @par Exception Safety - Hash function is not permitted to throw an exception. User-defined types Key and T are forbidden from throwing an exception in destructors. - If exception happens during insert() operations, it has no effect (unless exception raised by HashCompare::hash() function during grow_segment). - If exception happens during operator=() operation, the container can have a part of source items, and methods size() and empty() can return wrong results. @par Changes since TBB 2.1 - Replaced internal algorithm and data structure. Patent is pending. - Added buckets number argument for constructor @par Changes since TBB 2.0 - Fixed exception-safety - Added template argument for allocator - Added allocator argument in constructors - Added constructor from a range of iterators - Added several new overloaded insert() methods - Added get_allocator() - Added swap() - Added count() - Added overloaded erase(accessor &) and erase(const_accessor&) - Added equal_range() [const] - Added [const_]pointer, [const_]reference, and allocator_type types - Added global functions: operator==(), operator!=(), and swap() @ingroup containers */ template class concurrent_hash_map : protected internal::hash_map_base { template friend class internal::hash_map_iterator; template friend class internal::hash_map_range; public: typedef Key key_type; typedef T mapped_type; typedef std::pair value_type; typedef hash_map_base::size_type size_type; typedef ptrdiff_t difference_type; typedef value_type *pointer; typedef const value_type *const_pointer; typedef value_type &reference; typedef const value_type &const_reference; typedef internal::hash_map_iterator iterator; typedef internal::hash_map_iterator const_iterator; typedef internal::hash_map_range range_type; typedef internal::hash_map_range const_range_type; typedef Allocator allocator_type; protected: friend class const_accessor; struct node; typedef typename Allocator::template rebind::other node_allocator_type; node_allocator_type my_allocator; HashCompare my_hash_compare; struct node : public node_base { value_type item; node( const Key &key ) : item(key, T()) {} node( const Key &key, const T &t ) : item(key, t) {} #if __TBB_CPP11_RVALUE_REF_PRESENT node( value_type&& i ) : item(std::move(i)){} #endif //__TBB_CPP11_RVALUE_REF_PRESENT node( const value_type& i ) : item(i) {} // exception-safe allocation, see C++ Standard 2003, clause 5.3.4p17 void *operator new( size_t /*size*/, node_allocator_type &a ) { void *ptr = a.allocate(1); if(!ptr) tbb::internal::throw_exception(tbb::internal::eid_bad_alloc); return ptr; } // match placement-new form above to be called if exception thrown in constructor void operator delete( void *ptr, node_allocator_type &a ) { a.deallocate(static_cast(ptr),1); } }; void delete_node( node_base *n ) { my_allocator.destroy( static_cast(n) ); my_allocator.deallocate( static_cast(n), 1); } static node* allocate_node_copy_construct(node_allocator_type& allocator, const Key &key, const T * t){ return new( allocator ) node(key, *t); } static node* allocate_node_default_construct(node_allocator_type& allocator, const Key &key, const T * ){ return new( allocator ) node(key); } static node* do_not_allocate_node(node_allocator_type& , const Key &, const T * ){ __TBB_ASSERT(false,"this dummy function should not be called"); return NULL; } node *search_bucket( const key_type &key, bucket *b ) const { node *n = static_cast( b->node_list ); while( is_valid(n) && !my_hash_compare.equal(key, n->item.first) ) n = static_cast( n->next ); __TBB_ASSERT(n != internal::rehash_req, "Search can be executed only for rehashed bucket"); return n; } //! bucket accessor is to find, rehash, acquire a lock, and access a bucket class bucket_accessor : public bucket::scoped_t { bucket *my_b; public: bucket_accessor( concurrent_hash_map *base, const hashcode_t h, bool writer = false ) { acquire( base, h, writer ); } //! find a bucket by masked hashcode, optionally rehash, and acquire the lock inline void acquire( concurrent_hash_map *base, const hashcode_t h, bool writer = false ) { my_b = base->get_bucket( h ); // TODO: actually, notification is unnecessary here, just hiding double-check if( itt_load_word_with_acquire(my_b->node_list) == internal::rehash_req && try_acquire( my_b->mutex, /*write=*/true ) ) { if( my_b->node_list == internal::rehash_req ) base->rehash_bucket( my_b, h ); //recursive rehashing } else bucket::scoped_t::acquire( my_b->mutex, writer ); __TBB_ASSERT( my_b->node_list != internal::rehash_req, NULL); } //! check whether bucket is locked for write bool is_writer() { return bucket::scoped_t::is_writer; } //! get bucket pointer bucket *operator() () { return my_b; } }; // TODO refactor to hash_base void rehash_bucket( bucket *b_new, const hashcode_t h ) { __TBB_ASSERT( *(intptr_t*)(&b_new->mutex), "b_new must be locked (for write)"); __TBB_ASSERT( h > 1, "The lowermost buckets can't be rehashed" ); __TBB_store_with_release(b_new->node_list, internal::empty_rehashed); // mark rehashed hashcode_t mask = ( 1u<<__TBB_Log2( h ) ) - 1; // get parent mask from the topmost bit #if __TBB_STATISTICS my_info_rehashes++; // invocations of rehash_bucket #endif bucket_accessor b_old( this, h & mask ); mask = (mask<<1) | 1; // get full mask for new bucket __TBB_ASSERT( (mask&(mask+1))==0 && (h & mask) == h, NULL ); restart: for( node_base **p = &b_old()->node_list, *n = __TBB_load_with_acquire(*p); is_valid(n); n = *p ) { hashcode_t c = my_hash_compare.hash( static_cast(n)->item.first ); #if TBB_USE_ASSERT hashcode_t bmask = h & (mask>>1); bmask = bmask==0? 1 : ( 1u<<(__TBB_Log2( bmask )+1 ) ) - 1; // minimal mask of parent bucket __TBB_ASSERT( (c & bmask) == (h & bmask), "hash() function changed for key in table" ); #endif if( (c & mask) == h ) { if( !b_old.is_writer() ) if( !b_old.upgrade_to_writer() ) { goto restart; // node ptr can be invalid due to concurrent erase } *p = n->next; // exclude from b_old add_to_bucket( b_new, n ); } else p = &n->next; // iterate to next item } } struct call_clear_on_leave { concurrent_hash_map* my_ch_map; call_clear_on_leave( concurrent_hash_map* a_ch_map ) : my_ch_map(a_ch_map) {} void dismiss() {my_ch_map = 0;} ~call_clear_on_leave(){ if (my_ch_map){ my_ch_map->clear(); } } }; public: class accessor; //! Combines data access, locking, and garbage collection. class const_accessor : private node::scoped_t /*which derived from no_copy*/ { friend class concurrent_hash_map; friend class accessor; public: //! Type of value typedef const typename concurrent_hash_map::value_type value_type; //! True if result is empty. bool empty() const { return !my_node; } //! Set to null void release() { if( my_node ) { node::scoped_t::release(); my_node = 0; } } //! Return reference to associated value in hash table. const_reference operator*() const { __TBB_ASSERT( my_node, "attempt to dereference empty accessor" ); return my_node->item; } //! Return pointer to associated value in hash table. const_pointer operator->() const { return &operator*(); } //! Create empty result const_accessor() : my_node(NULL) {} //! Destroy result after releasing the underlying reference. ~const_accessor() { my_node = NULL; // scoped lock's release() is called in its destructor } protected: bool is_writer() { return node::scoped_t::is_writer; } node *my_node; hashcode_t my_hash; }; //! Allows write access to elements and combines data access, locking, and garbage collection. class accessor: public const_accessor { public: //! Type of value typedef typename concurrent_hash_map::value_type value_type; //! Return reference to associated value in hash table. reference operator*() const { __TBB_ASSERT( this->my_node, "attempt to dereference empty accessor" ); return this->my_node->item; } //! Return pointer to associated value in hash table. pointer operator->() const { return &operator*(); } }; //! Construct empty table. concurrent_hash_map( const allocator_type &a = allocator_type() ) : internal::hash_map_base(), my_allocator(a) {} //! Construct empty table with n preallocated buckets. This number serves also as initial concurrency level. concurrent_hash_map( size_type n, const allocator_type &a = allocator_type() ) : my_allocator(a) { reserve( n ); } //! Copy constructor concurrent_hash_map( const concurrent_hash_map &table, const allocator_type &a = allocator_type() ) : internal::hash_map_base(), my_allocator(a) { internal_copy(table); } #if __TBB_CPP11_RVALUE_REF_PRESENT //! Move constructor concurrent_hash_map( concurrent_hash_map &&table ) : internal::hash_map_base(), my_allocator(std::move(table.get_allocator())) { swap(table); } //! Move constructor concurrent_hash_map( concurrent_hash_map &&table, const allocator_type &a ) : internal::hash_map_base(), my_allocator(a) { if (a == table.get_allocator()){ this->swap(table); }else{ call_clear_on_leave scope_guard(this); internal_copy(std::make_move_iterator(table.begin()), std::make_move_iterator(table.end())); scope_guard.dismiss(); } } #endif //__TBB_CPP11_RVALUE_REF_PRESENT //! Construction with copying iteration range and given allocator instance template concurrent_hash_map( I first, I last, const allocator_type &a = allocator_type() ) : my_allocator(a) { reserve( std::distance(first, last) ); // TODO: load_factor? internal_copy(first, last); } #if __TBB_INITIALIZER_LISTS_PRESENT //! Construct empty table with n preallocated buckets. This number serves also as initial concurrency level. concurrent_hash_map( std::initializer_list il, const allocator_type &a = allocator_type() ) : my_allocator(a) { reserve(il.size()); internal_copy(il.begin(), il.end()); } #endif //__TBB_INITIALIZER_LISTS_PRESENT //! Assignment concurrent_hash_map& operator=( const concurrent_hash_map &table ) { if( this!=&table ) { clear(); internal_copy(table); } return *this; } #if __TBB_CPP11_RVALUE_REF_PRESENT //! Move Assignment concurrent_hash_map& operator=( concurrent_hash_map &&table ) { if(this != &table){ typedef typename tbb::internal::allocator_traits::propagate_on_container_move_assignment pocma_t; if(pocma_t::value || this->my_allocator == table.my_allocator) { concurrent_hash_map trash (std::move(*this)); //TODO: swapping allocators here may be a problem, replace with single direction moving iff pocma is set this->swap(table); } else { //do per element move concurrent_hash_map moved_copy(std::move(table), this->my_allocator); this->swap(moved_copy); } } return *this; } #endif //__TBB_CPP11_RVALUE_REF_PRESENT #if __TBB_INITIALIZER_LISTS_PRESENT //! Assignment concurrent_hash_map& operator=( std::initializer_list il ) { clear(); reserve(il.size()); internal_copy(il.begin(), il.end()); return *this; } #endif //__TBB_INITIALIZER_LISTS_PRESENT //! Rehashes and optionally resizes the whole table. /** Useful to optimize performance before or after concurrent operations. Also enables using of find() and count() concurrent methods in serial context. */ void rehash(size_type n = 0); //! Clear table void clear(); //! Clear table and destroy it. ~concurrent_hash_map() { clear(); } //------------------------------------------------------------------------ // Parallel algorithm support //------------------------------------------------------------------------ range_type range( size_type grainsize=1 ) { return range_type( *this, grainsize ); } const_range_type range( size_type grainsize=1 ) const { return const_range_type( *this, grainsize ); } //------------------------------------------------------------------------ // STL support - not thread-safe methods //------------------------------------------------------------------------ iterator begin() { return iterator( *this, 0, my_embedded_segment, my_embedded_segment->node_list ); } iterator end() { return iterator( *this, 0, 0, 0 ); } const_iterator begin() const { return const_iterator( *this, 0, my_embedded_segment, my_embedded_segment->node_list ); } const_iterator end() const { return const_iterator( *this, 0, 0, 0 ); } std::pair equal_range( const Key& key ) { return internal_equal_range( key, end() ); } std::pair equal_range( const Key& key ) const { return internal_equal_range( key, end() ); } //! Number of items in table. size_type size() const { return my_size; } //! True if size()==0. bool empty() const { return my_size == 0; } //! Upper bound on size. size_type max_size() const {return (~size_type(0))/sizeof(node);} //! Returns the current number of buckets size_type bucket_count() const { return my_mask+1; } //! return allocator object allocator_type get_allocator() const { return this->my_allocator; } //! swap two instances. Iterators are invalidated void swap( concurrent_hash_map &table ); //------------------------------------------------------------------------ // concurrent map operations //------------------------------------------------------------------------ //! Return count of items (0 or 1) size_type count( const Key &key ) const { return const_cast(this)->lookup(/*insert*/false, key, NULL, NULL, /*write=*/false, &do_not_allocate_node ); } //! Find item and acquire a read lock on the item. /** Return true if item is found, false otherwise. */ bool find( const_accessor &result, const Key &key ) const { result.release(); return const_cast(this)->lookup(/*insert*/false, key, NULL, &result, /*write=*/false, &do_not_allocate_node ); } //! Find item and acquire a write lock on the item. /** Return true if item is found, false otherwise. */ bool find( accessor &result, const Key &key ) { result.release(); return lookup(/*insert*/false, key, NULL, &result, /*write=*/true, &do_not_allocate_node ); } //! Insert item (if not already present) and acquire a read lock on the item. /** Returns true if item is new. */ bool insert( const_accessor &result, const Key &key ) { result.release(); return lookup(/*insert*/true, key, NULL, &result, /*write=*/false, &allocate_node_default_construct ); } //! Insert item (if not already present) and acquire a write lock on the item. /** Returns true if item is new. */ bool insert( accessor &result, const Key &key ) { result.release(); return lookup(/*insert*/true, key, NULL, &result, /*write=*/true, &allocate_node_default_construct ); } //! Insert item by copying if there is no such key present already and acquire a read lock on the item. /** Returns true if item is new. */ bool insert( const_accessor &result, const value_type &value ) { result.release(); return lookup(/*insert*/true, value.first, &value.second, &result, /*write=*/false, &allocate_node_copy_construct ); } //! Insert item by copying if there is no such key present already and acquire a write lock on the item. /** Returns true if item is new. */ bool insert( accessor &result, const value_type &value ) { result.release(); return lookup(/*insert*/true, value.first, &value.second, &result, /*write=*/true, &allocate_node_copy_construct ); } //! Insert item by copying if there is no such key present already /** Returns true if item is inserted. */ bool insert( const value_type &value ) { return lookup(/*insert*/true, value.first, &value.second, NULL, /*write=*/false, &allocate_node_copy_construct ); } //! Insert range [first, last) template void insert( I first, I last ) { for ( ; first != last; ++first ) insert( *first ); } #if __TBB_INITIALIZER_LISTS_PRESENT //! Insert initializer list void insert( std::initializer_list il ) { insert( il.begin(), il.end() ); } #endif //__TBB_INITIALIZER_LISTS_PRESENT //! Erase item. /** Return true if item was erased by particularly this call. */ bool erase( const Key& key ); //! Erase item by const_accessor. /** Return true if item was erased by particularly this call. */ bool erase( const_accessor& item_accessor ) { return exclude( item_accessor ); } //! Erase item by accessor. /** Return true if item was erased by particularly this call. */ bool erase( accessor& item_accessor ) { return exclude( item_accessor ); } protected: //! Insert or find item and optionally acquire a lock on the item. bool lookup(bool op_insert, const Key &key, const T *t, const_accessor *result, bool write, node* (*allocate_node)(node_allocator_type& , const Key &, const T * ) ) ; //! delete item by accessor bool exclude( const_accessor &item_accessor ); //! Returns an iterator for an item defined by the key, or for the next item after it (if upper==true) template std::pair internal_equal_range( const Key& key, I end ) const; //! Copy "source" to *this, where *this must start out empty. void internal_copy( const concurrent_hash_map& source ); template void internal_copy( I first, I last ); //! Fast find when no concurrent erasure is used. For internal use inside TBB only! /** Return pointer to item with given key, or NULL if no such item exists. Must not be called concurrently with erasure operations. */ const_pointer internal_fast_find( const Key& key ) const { hashcode_t h = my_hash_compare.hash( key ); hashcode_t m = (hashcode_t) itt_load_word_with_acquire( my_mask ); node *n; restart: __TBB_ASSERT((m&(m+1))==0, "data structure is invalid"); bucket *b = get_bucket( h & m ); // TODO: actually, notification is unnecessary here, just hiding double-check if( itt_load_word_with_acquire(b->node_list) == internal::rehash_req ) { bucket::scoped_t lock; if( lock.try_acquire( b->mutex, /*write=*/true ) ) { if( b->node_list == internal::rehash_req) const_cast(this)->rehash_bucket( b, h & m ); //recursive rehashing } else lock.acquire( b->mutex, /*write=*/false ); __TBB_ASSERT(b->node_list!=internal::rehash_req,NULL); } n = search_bucket( key, b ); if( n ) return &n->item; else if( check_mask_race( h, m ) ) goto restart; return 0; } }; template bool concurrent_hash_map::lookup( bool op_insert, const Key &key, const T *t, const_accessor *result, bool write, node* (*allocate_node)(node_allocator_type& , const Key&, const T*) ) { __TBB_ASSERT( !result || !result->my_node, NULL ); bool return_value; hashcode_t const h = my_hash_compare.hash( key ); hashcode_t m = (hashcode_t) itt_load_word_with_acquire( my_mask ); segment_index_t grow_segment = 0; node *n, *tmp_n = 0; restart: {//lock scope __TBB_ASSERT((m&(m+1))==0, "data structure is invalid"); return_value = false; // get bucket bucket_accessor b( this, h & m ); // find a node n = search_bucket( key, b() ); if( op_insert ) { // [opt] insert a key if( !n ) { if( !tmp_n ) { tmp_n = allocate_node(my_allocator, key, t); } if( !b.is_writer() && !b.upgrade_to_writer() ) { // TODO: improved insertion // Rerun search_list, in case another thread inserted the item during the upgrade. n = search_bucket( key, b() ); if( is_valid(n) ) { // unfortunately, it did b.downgrade_to_reader(); goto exists; } } if( check_mask_race(h, m) ) goto restart; // b.release() is done in ~b(). // insert and set flag to grow the container grow_segment = insert_new_node( b(), n = tmp_n, m ); tmp_n = 0; return_value = true; } } else { // find or count if( !n ) { if( check_mask_race( h, m ) ) goto restart; // b.release() is done in ~b(). TODO: replace by continue return false; } return_value = true; } exists: if( !result ) goto check_growth; // TODO: the following seems as generic/regular operation // acquire the item if( !result->try_acquire( n->mutex, write ) ) { for( tbb::internal::atomic_backoff backoff(true);; ) { if( result->try_acquire( n->mutex, write ) ) break; if( !backoff.bounded_pause() ) { // the wait takes really long, restart the operation b.release(); __TBB_ASSERT( !op_insert || !return_value, "Can't acquire new item in locked bucket?" ); __TBB_Yield(); m = (hashcode_t) itt_load_word_with_acquire( my_mask ); goto restart; } } } }//lock scope result->my_node = n; result->my_hash = h; check_growth: // [opt] grow the container if( grow_segment ) { #if __TBB_STATISTICS my_info_resizes++; // concurrent ones #endif enable_segment( grow_segment ); } if( tmp_n ) // if op_insert only delete_node( tmp_n ); return return_value; } template template std::pair concurrent_hash_map::internal_equal_range( const Key& key, I end_ ) const { hashcode_t h = my_hash_compare.hash( key ); hashcode_t m = my_mask; __TBB_ASSERT((m&(m+1))==0, "data structure is invalid"); h &= m; bucket *b = get_bucket( h ); while( b->node_list == internal::rehash_req ) { m = ( 1u<<__TBB_Log2( h ) ) - 1; // get parent mask from the topmost bit b = get_bucket( h &= m ); } node *n = search_bucket( key, b ); if( !n ) return std::make_pair(end_, end_); iterator lower(*this, h, b, n), upper(lower); return std::make_pair(lower, ++upper); } template bool concurrent_hash_map::exclude( const_accessor &item_accessor ) { __TBB_ASSERT( item_accessor.my_node, NULL ); node_base *const n = item_accessor.my_node; hashcode_t const h = item_accessor.my_hash; hashcode_t m = (hashcode_t) itt_load_word_with_acquire( my_mask ); do { // get bucket bucket_accessor b( this, h & m, /*writer=*/true ); node_base **p = &b()->node_list; while( *p && *p != n ) p = &(*p)->next; if( !*p ) { // someone else was first if( check_mask_race( h, m ) ) continue; item_accessor.release(); return false; } __TBB_ASSERT( *p == n, NULL ); *p = n->next; // remove from container my_size--; break; } while(true); if( !item_accessor.is_writer() ) // need to get exclusive lock item_accessor.upgrade_to_writer(); // return value means nothing here item_accessor.release(); delete_node( n ); // Only one thread can delete it return true; } template bool concurrent_hash_map::erase( const Key &key ) { node_base *n; hashcode_t const h = my_hash_compare.hash( key ); hashcode_t m = (hashcode_t) itt_load_word_with_acquire( my_mask ); restart: {//lock scope // get bucket bucket_accessor b( this, h & m ); search: node_base **p = &b()->node_list; n = *p; while( is_valid(n) && !my_hash_compare.equal(key, static_cast(n)->item.first ) ) { p = &n->next; n = *p; } if( !n ) { // not found, but mask could be changed if( check_mask_race( h, m ) ) goto restart; return false; } else if( !b.is_writer() && !b.upgrade_to_writer() ) { if( check_mask_race( h, m ) ) // contended upgrade, check mask goto restart; goto search; } *p = n->next; my_size--; } { typename node::scoped_t item_locker( n->mutex, /*write=*/true ); } // note: there should be no threads pretending to acquire this mutex again, do not try to upgrade const_accessor! delete_node( n ); // Only one thread can delete it due to write lock on the bucket return true; } template void concurrent_hash_map::swap(concurrent_hash_map &table) { //TODO: respect C++11 allocator_traits::propogate_on_constainer_swap using std::swap; swap(this->my_allocator, table.my_allocator); swap(this->my_hash_compare, table.my_hash_compare); internal_swap(table); } template void concurrent_hash_map::rehash(size_type sz) { reserve( sz ); // TODO: add reduction of number of buckets as well hashcode_t mask = my_mask; hashcode_t b = (mask+1)>>1; // size or first index of the last segment __TBB_ASSERT((b&(b-1))==0, NULL); // zero or power of 2 bucket *bp = get_bucket( b ); // only the last segment should be scanned for rehashing for(; b <= mask; b++, bp++ ) { node_base *n = bp->node_list; __TBB_ASSERT( is_valid(n) || n == internal::empty_rehashed || n == internal::rehash_req, "Broken internal structure" ); __TBB_ASSERT( *reinterpret_cast(&bp->mutex) == 0, "concurrent or unexpectedly terminated operation during rehash() execution" ); if( n == internal::rehash_req ) { // rehash bucket, conditional because rehashing of a previous bucket may affect this one hashcode_t h = b; bucket *b_old = bp; do { __TBB_ASSERT( h > 1, "The lowermost buckets can't be rehashed" ); hashcode_t m = ( 1u<<__TBB_Log2( h ) ) - 1; // get parent mask from the topmost bit b_old = get_bucket( h &= m ); } while( b_old->node_list == internal::rehash_req ); // now h - is index of the root rehashed bucket b_old mark_rehashed_levels( h ); // mark all non-rehashed children recursively across all segments for( node_base **p = &b_old->node_list, *q = *p; is_valid(q); q = *p ) { hashcode_t c = my_hash_compare.hash( static_cast(q)->item.first ); if( (c & mask) != h ) { // should be rehashed *p = q->next; // exclude from b_old bucket *b_new = get_bucket( c & mask ); __TBB_ASSERT( b_new->node_list != internal::rehash_req, "hash() function changed for key in table or internal error" ); add_to_bucket( b_new, q ); } else p = &q->next; // iterate to next item } } } #if TBB_USE_PERFORMANCE_WARNINGS int current_size = int(my_size), buckets = int(mask)+1, empty_buckets = 0, overpopulated_buckets = 0; // usage statistics static bool reported = false; #endif #if TBB_USE_ASSERT || TBB_USE_PERFORMANCE_WARNINGS for( b = 0; b <= mask; b++ ) {// only last segment should be scanned for rehashing if( b & (b-2) ) ++bp; // not the beginning of a segment else bp = get_bucket( b ); node_base *n = bp->node_list; __TBB_ASSERT( *reinterpret_cast(&bp->mutex) == 0, "concurrent or unexpectedly terminated operation during rehash() execution" ); __TBB_ASSERT( is_valid(n) || n == internal::empty_rehashed, "Broken internal structure" ); #if TBB_USE_PERFORMANCE_WARNINGS if( n == internal::empty_rehashed ) empty_buckets++; else if( n->next ) overpopulated_buckets++; #endif #if TBB_USE_ASSERT for( ; is_valid(n); n = n->next ) { hashcode_t h = my_hash_compare.hash( static_cast(n)->item.first ) & mask; __TBB_ASSERT( h == b, "hash() function changed for key in table or internal error" ); } #endif } #endif // TBB_USE_ASSERT || TBB_USE_PERFORMANCE_WARNINGS #if TBB_USE_PERFORMANCE_WARNINGS if( buckets > current_size) empty_buckets -= buckets - current_size; else overpopulated_buckets -= current_size - buckets; // TODO: load_factor? if( !reported && buckets >= 512 && ( 2*empty_buckets > current_size || 2*overpopulated_buckets > current_size ) ) { tbb::internal::runtime_warning( "Performance is not optimal because the hash function produces bad randomness in lower bits in %s.\nSize: %d Empties: %d Overlaps: %d", typeid(*this).name(), current_size, empty_buckets, overpopulated_buckets ); reported = true; } #endif } template void concurrent_hash_map::clear() { hashcode_t m = my_mask; __TBB_ASSERT((m&(m+1))==0, "data structure is invalid"); #if TBB_USE_ASSERT || TBB_USE_PERFORMANCE_WARNINGS || __TBB_STATISTICS #if TBB_USE_PERFORMANCE_WARNINGS || __TBB_STATISTICS int current_size = int(my_size), buckets = int(m)+1, empty_buckets = 0, overpopulated_buckets = 0; // usage statistics static bool reported = false; #endif bucket *bp = 0; // check consistency for( segment_index_t b = 0; b <= m; b++ ) { if( b & (b-2) ) ++bp; // not the beginning of a segment else bp = get_bucket( b ); node_base *n = bp->node_list; __TBB_ASSERT( is_valid(n) || n == internal::empty_rehashed || n == internal::rehash_req, "Broken internal structure" ); __TBB_ASSERT( *reinterpret_cast(&bp->mutex) == 0, "concurrent or unexpectedly terminated operation during clear() execution" ); #if TBB_USE_PERFORMANCE_WARNINGS || __TBB_STATISTICS if( n == internal::empty_rehashed ) empty_buckets++; else if( n == internal::rehash_req ) buckets--; else if( n->next ) overpopulated_buckets++; #endif #if __TBB_EXTRA_DEBUG for(; is_valid(n); n = n->next ) { hashcode_t h = my_hash_compare.hash( static_cast(n)->item.first ); h &= m; __TBB_ASSERT( h == b || get_bucket(h)->node_list == internal::rehash_req, "hash() function changed for key in table or internal error" ); } #endif } #if TBB_USE_PERFORMANCE_WARNINGS || __TBB_STATISTICS #if __TBB_STATISTICS printf( "items=%d buckets: capacity=%d rehashed=%d empty=%d overpopulated=%d" " concurrent: resizes=%u rehashes=%u restarts=%u\n", current_size, int(m+1), buckets, empty_buckets, overpopulated_buckets, unsigned(my_info_resizes), unsigned(my_info_rehashes), unsigned(my_info_restarts) ); my_info_resizes = 0; // concurrent ones my_info_restarts = 0; // race collisions my_info_rehashes = 0; // invocations of rehash_bucket #endif if( buckets > current_size) empty_buckets -= buckets - current_size; else overpopulated_buckets -= current_size - buckets; // TODO: load_factor? if( !reported && buckets >= 512 && ( 2*empty_buckets > current_size || 2*overpopulated_buckets > current_size ) ) { tbb::internal::runtime_warning( "Performance is not optimal because the hash function produces bad randomness in lower bits in %s.\nSize: %d Empties: %d Overlaps: %d", typeid(*this).name(), current_size, empty_buckets, overpopulated_buckets ); reported = true; } #endif #endif//TBB_USE_ASSERT || TBB_USE_PERFORMANCE_WARNINGS || __TBB_STATISTICS my_size = 0; segment_index_t s = segment_index_of( m ); __TBB_ASSERT( s+1 == pointers_per_table || !my_table[s+1], "wrong mask or concurrent grow" ); cache_aligned_allocator alloc; do { __TBB_ASSERT( is_valid( my_table[s] ), "wrong mask or concurrent grow" ); segment_ptr_t buckets_ptr = my_table[s]; size_type sz = segment_size( s ? s : 1 ); for( segment_index_t i = 0; i < sz; i++ ) for( node_base *n = buckets_ptr[i].node_list; is_valid(n); n = buckets_ptr[i].node_list ) { buckets_ptr[i].node_list = n->next; delete_node( n ); } if( s >= first_block) // the first segment or the next alloc.deallocate( buckets_ptr, sz ); else if( s == embedded_block && embedded_block != first_block ) alloc.deallocate( buckets_ptr, segment_size(first_block)-embedded_buckets ); if( s >= embedded_block ) my_table[s] = 0; } while(s-- > 0); my_mask = embedded_buckets - 1; } template void concurrent_hash_map::internal_copy( const concurrent_hash_map& source ) { reserve( source.my_size ); // TODO: load_factor? hashcode_t mask = source.my_mask; if( my_mask == mask ) { // optimized version bucket *dst = 0, *src = 0; bool rehash_required = false; for( hashcode_t k = 0; k <= mask; k++ ) { if( k & (k-2) ) ++dst,src++; // not the beginning of a segment else { dst = get_bucket( k ); src = source.get_bucket( k ); } __TBB_ASSERT( dst->node_list != internal::rehash_req, "Invalid bucket in destination table"); node *n = static_cast( src->node_list ); if( n == internal::rehash_req ) { // source is not rehashed, items are in previous buckets rehash_required = true; dst->node_list = internal::rehash_req; } else for(; n; n = static_cast( n->next ) ) { add_to_bucket( dst, new( my_allocator ) node(n->item.first, n->item.second) ); ++my_size; // TODO: replace by non-atomic op } } if( rehash_required ) rehash(); } else internal_copy( source.begin(), source.end() ); } template template void concurrent_hash_map::internal_copy(I first, I last) { hashcode_t m = my_mask; for(; first != last; ++first) { hashcode_t h = my_hash_compare.hash( (*first).first ); bucket *b = get_bucket( h & m ); __TBB_ASSERT( b->node_list != internal::rehash_req, "Invalid bucket in destination table"); node *n = new( my_allocator ) node(*first); add_to_bucket( b, n ); ++my_size; // TODO: replace by non-atomic op } } } // namespace interface5 using interface5::concurrent_hash_map; template inline bool operator==(const concurrent_hash_map &a, const concurrent_hash_map &b) { if(a.size() != b.size()) return false; typename concurrent_hash_map::const_iterator i(a.begin()), i_end(a.end()); typename concurrent_hash_map::const_iterator j, j_end(b.end()); for(; i != i_end; ++i) { j = b.equal_range(i->first).first; if( j == j_end || !(i->second == j->second) ) return false; } return true; } template inline bool operator!=(const concurrent_hash_map &a, const concurrent_hash_map &b) { return !(a == b); } template inline void swap(concurrent_hash_map &a, concurrent_hash_map &b) { a.swap( b ); } #if _MSC_VER && !defined(__INTEL_COMPILER) #pragma warning( pop ) #endif // warning 4127 is back } // namespace tbb #endif /* __TBB_concurrent_hash_map_H */ ================================================ FILE: benchmarks/tbb/concurrent_lru_cache.h ================================================ /* Copyright 2005-2014 Intel Corporation. All Rights Reserved. This file is part of Threading Building Blocks. Threading Building Blocks is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. Threading Building Blocks is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Threading Building Blocks; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA As a special exception, you may use this file as part of a free software library without restriction. Specifically, if other files instantiate templates or use macros or inline functions from this file, or you compile this file and link it with other files to produce an executable, this file does not by itself cause the resulting executable to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the executable file might be covered by the GNU General Public License. */ #ifndef __TBB_concurrent_lru_cache_H #define __TBB_concurrent_lru_cache_H #if ! TBB_PREVIEW_CONCURRENT_LRU_CACHE #error Set TBB_PREVIEW_CONCURRENT_LRU_CACHE to include concurrent_lru_cache.h #endif #include #include #include "tbb_stddef.h" #include "atomic.h" #include "internal/_aggregator_impl.h" namespace tbb{ namespace interface6 { template class concurrent_lru_cache : internal::no_assign{ private: typedef concurrent_lru_cache self_type; typedef value_functor_type value_function_type; typedef std::size_t ref_counter_type; struct map_value_type; typedef std::map map_storage_type; typedef std::list lru_list_type; struct map_value_type { value_type my_value; ref_counter_type my_ref_counter; typename lru_list_type::iterator my_lru_list_iterator; bool my_is_ready; map_value_type (value_type const& a_value, ref_counter_type a_ref_counter, typename lru_list_type::iterator a_lru_list_iterator, bool a_is_ready) : my_value(a_value), my_ref_counter(a_ref_counter), my_lru_list_iterator (a_lru_list_iterator), my_is_ready(a_is_ready) {} }; class handle_object; struct aggregator_operation; typedef aggregator_operation aggregated_operation_type; typedef tbb::internal::aggregating_functor aggregator_function_type; friend class tbb::internal::aggregating_functor; typedef tbb::internal::aggregator aggregator_type; private: value_function_type my_value_function; std::size_t const my_number_of_lru_history_items; map_storage_type my_map_storage; lru_list_type my_lru_list; aggregator_type my_aggregator; public: typedef handle_object handle; public: concurrent_lru_cache(value_function_type f, std::size_t number_of_lru_history_items) : my_value_function(f),my_number_of_lru_history_items(number_of_lru_history_items) { my_aggregator.initialize_handler(aggregator_function_type(this)); } handle_object operator[](key_type k){ retrieve_aggregator_operation op(k); my_aggregator.execute(&op); if (op.is_new_value_needed()){ op.result().second.my_value = my_value_function(k); __TBB_store_with_release(op.result().second.my_is_ready, true); }else{ tbb::internal::spin_wait_while_eq(op.result().second.my_is_ready,false); } return handle_object(*this,op.result()); } private: void signal_end_of_usage(typename map_storage_type::reference value_ref){ signal_end_of_usage_aggregator_operation op(value_ref); my_aggregator.execute(&op); } private: struct handle_move_t:no_assign{ concurrent_lru_cache & my_cache_ref; typename map_storage_type::reference my_map_record_ref; handle_move_t(concurrent_lru_cache & cache_ref, typename map_storage_type::reference value_ref):my_cache_ref(cache_ref),my_map_record_ref(value_ref) {}; }; class handle_object { concurrent_lru_cache * my_cache_pointer; typename map_storage_type::reference my_map_record_ref; public: handle_object(concurrent_lru_cache & cache_ref, typename map_storage_type::reference value_ref):my_cache_pointer(&cache_ref), my_map_record_ref(value_ref) {} handle_object(handle_move_t m):my_cache_pointer(&m.my_cache_ref), my_map_record_ref(m.my_map_record_ref){} operator handle_move_t(){ return move(*this);} value_type& value(){ __TBB_ASSERT(my_cache_pointer,"get value from moved from object?"); return my_map_record_ref.second.my_value; } ~handle_object(){ if (my_cache_pointer){ my_cache_pointer->signal_end_of_usage(my_map_record_ref); } } private: friend handle_move_t move(handle_object& h){ return handle_object::move(h); } static handle_move_t move(handle_object& h){ __TBB_ASSERT(h.my_cache_pointer,"move from the same object twice ?"); concurrent_lru_cache * cache_pointer = NULL; std::swap(cache_pointer,h.my_cache_pointer); return handle_move_t(*cache_pointer,h.my_map_record_ref); } private: void operator=(handle_object&); #if __SUNPRO_CC // Presumably due to a compiler error, private copy constructor // breaks expressions like handle h = cache[key]; public: #endif handle_object(handle_object &); }; private: //TODO: looks like aggregator_operation is a perfect match for statically typed variant type struct aggregator_operation : tbb::internal::aggregated_operation{ enum e_op_type {op_retive, op_signal_end_of_usage}; //TODO: try to use pointer to function apply_visitor here //TODO: try virtual functions and measure the difference e_op_type my_operation_type; aggregator_operation(e_op_type operation_type): my_operation_type(operation_type) {} void cast_and_handle(self_type& container ){ if (my_operation_type==op_retive){ static_cast(this)->handle(container); }else{ static_cast(this)->handle(container); } } }; struct retrieve_aggregator_operation : aggregator_operation, private internal::no_assign { key_type my_key; typename map_storage_type::pointer my_result_map_record_pointer; bool my_is_new_value_needed; retrieve_aggregator_operation(key_type key):aggregator_operation(aggregator_operation::op_retive),my_key(key),my_is_new_value_needed(false){} void handle(self_type& container ){ my_result_map_record_pointer = & container.retrieve_serial(my_key,my_is_new_value_needed); } typename map_storage_type::reference result(){ return * my_result_map_record_pointer; } bool is_new_value_needed(){return my_is_new_value_needed;} }; struct signal_end_of_usage_aggregator_operation : aggregator_operation, private internal::no_assign { typename map_storage_type::reference my_map_record_ref; signal_end_of_usage_aggregator_operation(typename map_storage_type::reference map_record_ref):aggregator_operation(aggregator_operation::op_signal_end_of_usage),my_map_record_ref(map_record_ref){} void handle(self_type& container ){ container.signal_end_of_usage_serial(my_map_record_ref); } }; private: void handle_operations(aggregator_operation* op_list){ while(op_list){ op_list->cast_and_handle(*this); aggregator_operation* tmp = op_list; op_list=op_list->next; tbb::internal::itt_store_word_with_release(tmp->status, uintptr_t(1)); } } private: typename map_storage_type::reference retrieve_serial(key_type k, bool& is_new_value_needed){ typename map_storage_type::iterator it = my_map_storage.find(k); if (it == my_map_storage.end()){ it = my_map_storage.insert(it,std::make_pair(k,map_value_type(value_type(),0,my_lru_list.end(),false))); is_new_value_needed = true; }else { typename lru_list_type::iterator list_it = it->second.my_lru_list_iterator; if (list_it!=my_lru_list.end()) { __TBB_ASSERT(!it->second.my_ref_counter,"item to be evicted should not have a live references"); //item is going to be used. Therefore it is not a subject for eviction //so - remove it from LRU history. my_lru_list.erase(list_it); it->second.my_lru_list_iterator= my_lru_list.end(); } } ++(it->second.my_ref_counter); return *it; } void signal_end_of_usage_serial(typename map_storage_type::reference map_record_ref){ typename map_storage_type::iterator it = my_map_storage.find(map_record_ref.first); __TBB_ASSERT(it!=my_map_storage.end(),"cache should not return past-end iterators to outer world"); __TBB_ASSERT(&(*it) == &map_record_ref,"dangling reference has been returned to outside world? data race ?"); __TBB_ASSERT( my_lru_list.end()== std::find(my_lru_list.begin(),my_lru_list.end(),it), "object in use should not be in list of unused objects "); if (! --(it->second.my_ref_counter)){ //it was the last reference so put it to the LRU history if (my_lru_list.size()>=my_number_of_lru_history_items){ //evict items in order to get a space size_t number_of_elements_to_evict = 1 + my_lru_list.size() - my_number_of_lru_history_items; for (size_t i=0; isecond.my_ref_counter,"item to be evicted should not have a live references"); my_lru_list.pop_back(); my_map_storage.erase(it_to_evict); } } my_lru_list.push_front(it); it->second.my_lru_list_iterator = my_lru_list.begin(); } } }; } // namespace interface6 using interface6::concurrent_lru_cache; } // namespace tbb #endif //__TBB_concurrent_lru_cache_H ================================================ FILE: benchmarks/tbb/concurrent_monitor.cpp ================================================ /* Copyright 2005-2014 Intel Corporation. All Rights Reserved. This file is part of Threading Building Blocks. Threading Building Blocks is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. Threading Building Blocks is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Threading Building Blocks; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA As a special exception, you may use this file as part of a free software library without restriction. Specifically, if other files instantiate templates or use macros or inline functions from this file, or you compile this file and link it with other files to produce an executable, this file does not by itself cause the resulting executable to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the executable file might be covered by the GNU General Public License. */ #include "concurrent_monitor.h" namespace tbb { namespace internal { void concurrent_monitor::thread_context::init() { new (sema.begin()) binary_semaphore; ready = true; } concurrent_monitor::~concurrent_monitor() { abort_all(); __TBB_ASSERT( waitset_ec.empty(), "waitset not empty?" ); } void concurrent_monitor::prepare_wait( thread_context& thr, uintptr_t ctx ) { if( !thr.ready ) thr.init(); // this is good place to pump previous spurious wakeup else if( thr.spurious ) { thr.spurious = false; thr.semaphore().P(); } thr.context = ctx; thr.in_waitset = true; { tbb::spin_mutex::scoped_lock l( mutex_ec ); __TBB_store_relaxed( thr.epoch, __TBB_load_relaxed(epoch) ); waitset_ec.add( (waitset_t::node_t*)&thr ); } atomic_fence(); } void concurrent_monitor::cancel_wait( thread_context& thr ) { // spurious wakeup will be pumped in the following prepare_wait() thr.spurious = true; // try to remove node from waitset bool th_in_waitset = thr.in_waitset; if( th_in_waitset ) { tbb::spin_mutex::scoped_lock l( mutex_ec ); if (thr.in_waitset) { // successfully removed from waitset, // so there will be no spurious wakeup thr.in_waitset = false; thr.spurious = false; waitset_ec.remove( (waitset_t::node_t&)thr ); } } } void concurrent_monitor::notify_one_relaxed() { if( waitset_ec.empty() ) return; waitset_node_t* n; const waitset_node_t* end = waitset_ec.end(); { tbb::spin_mutex::scoped_lock l( mutex_ec ); __TBB_store_relaxed( epoch, __TBB_load_relaxed(epoch) + 1 ); n = waitset_ec.front(); if( n!=end ) { waitset_ec.remove( *n ); to_thread_context(n)->in_waitset = false; } } if( n!=end ) to_thread_context(n)->semaphore().V(); } void concurrent_monitor::notify_all_relaxed() { if( waitset_ec.empty() ) return; dllist_t temp; const waitset_node_t* end; { tbb::spin_mutex::scoped_lock l( mutex_ec ); __TBB_store_relaxed( epoch, __TBB_load_relaxed(epoch) + 1 ); waitset_ec.flush_to( temp ); end = temp.end(); for( waitset_node_t* n=temp.front(); n!=end; n=n->next ) to_thread_context(n)->in_waitset = false; } waitset_node_t* nxt; for( waitset_node_t* n=temp.front(); n!=end; n=nxt ) { nxt = n->next; to_thread_context(n)->semaphore().V(); } #if TBB_USE_ASSERT temp.clear(); #endif } void concurrent_monitor::abort_all_relaxed() { if( waitset_ec.empty() ) return; dllist_t temp; const waitset_node_t* end; { tbb::spin_mutex::scoped_lock l( mutex_ec ); __TBB_store_relaxed( epoch, __TBB_load_relaxed(epoch) + 1 ); waitset_ec.flush_to( temp ); end = temp.end(); for( waitset_node_t* n=temp.front(); n!=end; n=n->next ) to_thread_context(n)->in_waitset = false; } waitset_node_t* nxt; for( waitset_node_t* n=temp.front(); n!=end; n=nxt ) { nxt = n->next; to_thread_context(n)->aborted = true; to_thread_context(n)->semaphore().V(); } #if TBB_USE_ASSERT temp.clear(); #endif } } // namespace internal } // namespace tbb ================================================ FILE: benchmarks/tbb/concurrent_monitor.h ================================================ /* Copyright 2005-2014 Intel Corporation. All Rights Reserved. This file is part of Threading Building Blocks. Threading Building Blocks is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. Threading Building Blocks is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Threading Building Blocks; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA As a special exception, you may use this file as part of a free software library without restriction. Specifically, if other files instantiate templates or use macros or inline functions from this file, or you compile this file and link it with other files to produce an executable, this file does not by itself cause the resulting executable to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the executable file might be covered by the GNU General Public License. */ #ifndef __TBB_concurrent_monitor_H #define __TBB_concurrent_monitor_H #include "tbb/tbb_stddef.h" #include "tbb/atomic.h" #include "tbb/spin_mutex.h" #include "tbb/tbb_exception.h" #include "tbb/aligned_space.h" #include "semaphore.h" namespace tbb { namespace internal { //! Circular doubly-linked list with sentinel /** head.next points to the front and head.prev points to the back */ class circular_doubly_linked_list_with_sentinel : no_copy { public: struct node_t { node_t* next; node_t* prev; explicit node_t() : next((node_t*)(uintptr_t)0xcdcdcdcd), prev((node_t*)(uintptr_t)0xcdcdcdcd) {} }; // ctor circular_doubly_linked_list_with_sentinel() {clear();} // dtor ~circular_doubly_linked_list_with_sentinel() {__TBB_ASSERT( head.next==&head && head.prev==&head, "the list is not empty" );} inline size_t size() const {return count;} inline bool empty() const {return size()==0;} inline node_t* front() const {return head.next;} inline node_t* last() const {return head.prev;} inline node_t* begin() const {return front();} inline const node_t* end() const {return &head;} //! add to the back of the list inline void add( node_t* n ) { __TBB_store_relaxed(count, __TBB_load_relaxed(count) + 1); n->prev = head.prev; n->next = &head; head.prev->next = n; head.prev = n; } //! remove node 'n' inline void remove( node_t& n ) { __TBB_store_relaxed(count, __TBB_load_relaxed(count) - 1); n.prev->next = n.next; n.next->prev = n.prev; } //! move all elements to 'lst' and initialize the 'this' list inline void flush_to( circular_doubly_linked_list_with_sentinel& lst ) { if( const size_t l_count = __TBB_load_relaxed(count) ) { __TBB_store_relaxed(lst.count, l_count); lst.head.next = head.next; lst.head.prev = head.prev; head.next->prev = &lst.head; head.prev->next = &lst.head; clear(); } } void clear() {head.next = head.prev = &head; __TBB_store_relaxed(count, 0);} private: __TBB_atomic size_t count; node_t head; }; typedef circular_doubly_linked_list_with_sentinel waitset_t; typedef circular_doubly_linked_list_with_sentinel dllist_t; typedef circular_doubly_linked_list_with_sentinel::node_t waitset_node_t; //! concurrent_monitor /** fine-grained concurrent_monitor implementation */ class concurrent_monitor : no_copy { public: /** per-thread descriptor for concurrent_monitor */ class thread_context : waitset_node_t, no_copy { friend class concurrent_monitor; public: thread_context() : spurious(false), aborted(false), ready(false), context(0) { epoch = 0; in_waitset = false; } ~thread_context() { if (ready) { if( spurious ) semaphore().P(); semaphore().~binary_semaphore(); } } binary_semaphore& semaphore() { return *sema.begin(); } private: //! The method for lazy initialization of the thread_context's semaphore. // Inlining of the method is undesirable, due to extra instructions for // exception support added at caller side. __TBB_NOINLINE( void init() ); tbb::aligned_space sema; __TBB_atomic unsigned epoch; tbb::atomic in_waitset; bool spurious; bool aborted; bool ready; uintptr_t context; }; //! ctor concurrent_monitor() {__TBB_store_relaxed(epoch, 0);} //! dtor ~concurrent_monitor() ; //! prepare wait by inserting 'thr' into the wait queue void prepare_wait( thread_context& thr, uintptr_t ctx = 0 ); //! Commit wait if event count has not changed; otherwise, cancel wait. /** Returns true if committed, false if canceled. */ inline bool commit_wait( thread_context& thr ) { const bool do_it = thr.epoch == __TBB_load_relaxed(epoch); // this check is just an optimization if( do_it ) { __TBB_ASSERT( thr.ready, "use of commit_wait() without prior prepare_wait()"); thr.semaphore().P(); __TBB_ASSERT( !thr.in_waitset, "still in the queue?" ); if( thr.aborted ) throw_exception( eid_user_abort ); } else { cancel_wait( thr ); } return do_it; } //! Cancel the wait. Removes the thread from the wait queue if not removed yet. void cancel_wait( thread_context& thr ); //! Wait for a condition to be satisfied with waiting-on context template void wait( WaitUntil until, Context on ); //! Notify one thread about the event void notify_one() {atomic_fence(); notify_one_relaxed();} //! Notify one thread about the event. Relaxed version. void notify_one_relaxed(); //! Notify all waiting threads of the event void notify_all() {atomic_fence(); notify_all_relaxed();} //! Notify all waiting threads of the event; Relaxed version void notify_all_relaxed(); //! Notify waiting threads of the event that satisfies the given predicate template void notify( const P& predicate ) {atomic_fence(); notify_relaxed( predicate );} //! Notify waiting threads of the event that satisfies the given predicate; Relaxed version template void notify_relaxed( const P& predicate ); //! Abort any sleeping threads at the time of the call void abort_all() {atomic_fence(); abort_all_relaxed(); } //! Abort any sleeping threads at the time of the call; Relaxed version void abort_all_relaxed(); private: tbb::spin_mutex mutex_ec; waitset_t waitset_ec; __TBB_atomic unsigned epoch; thread_context* to_thread_context( waitset_node_t* n ) { return static_cast(n); } }; template void concurrent_monitor::wait( WaitUntil until, Context on ) { bool slept = false; thread_context thr_ctx; prepare_wait( thr_ctx, on() ); while( !until() ) { if( (slept = commit_wait( thr_ctx ) )==true ) if( until() ) break; slept = false; prepare_wait( thr_ctx, on() ); } if( !slept ) cancel_wait( thr_ctx ); } template void concurrent_monitor::notify_relaxed( const P& predicate ) { if( waitset_ec.empty() ) return; dllist_t temp; waitset_node_t* nxt; const waitset_node_t* end = waitset_ec.end(); { tbb::spin_mutex::scoped_lock l( mutex_ec ); __TBB_store_relaxed(epoch, __TBB_load_relaxed(epoch) + 1); for( waitset_node_t* n=waitset_ec.last(); n!=end; n=nxt ) { nxt = n->prev; thread_context* thr = to_thread_context( n ); if( predicate( thr->context ) ) { waitset_ec.remove( *n ); thr->in_waitset = false; temp.add( n ); } } } end = temp.end(); for( waitset_node_t* n=temp.front(); n!=end; n=nxt ) { nxt = n->next; to_thread_context(n)->semaphore().V(); } #if TBB_USE_ASSERT temp.clear(); #endif } } // namespace internal } // namespace tbb #endif /* __TBB_concurrent_monitor_H */ ================================================ FILE: benchmarks/tbb/concurrent_priority_queue.h ================================================ /* Copyright 2005-2014 Intel Corporation. All Rights Reserved. This file is part of Threading Building Blocks. Threading Building Blocks is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. Threading Building Blocks is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Threading Building Blocks; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA As a special exception, you may use this file as part of a free software library without restriction. Specifically, if other files instantiate templates or use macros or inline functions from this file, or you compile this file and link it with other files to produce an executable, this file does not by itself cause the resulting executable to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the executable file might be covered by the GNU General Public License. */ #ifndef __TBB_concurrent_priority_queue_H #define __TBB_concurrent_priority_queue_H #include "atomic.h" #include "cache_aligned_allocator.h" #include "tbb_exception.h" #include "tbb_stddef.h" #include "tbb_profiling.h" #include "internal/_aggregator_impl.h" #include #include #include #if __TBB_INITIALIZER_LISTS_PRESENT #include #endif namespace tbb { namespace interface5 { using namespace tbb::internal; //! Concurrent priority queue template , typename A=cache_aligned_allocator > class concurrent_priority_queue { public: //! Element type in the queue. typedef T value_type; //! Reference type typedef T& reference; //! Const reference type typedef const T& const_reference; //! Integral type for representing size of the queue. typedef size_t size_type; //! Difference type for iterator typedef ptrdiff_t difference_type; //! Allocator type typedef A allocator_type; //! Constructs a new concurrent_priority_queue with default capacity explicit concurrent_priority_queue(const allocator_type& a = allocator_type()) : mark(0), my_size(0), data(a) { my_aggregator.initialize_handler(my_functor_t(this)); } //! Constructs a new concurrent_priority_queue with init_sz capacity explicit concurrent_priority_queue(size_type init_capacity, const allocator_type& a = allocator_type()) : mark(0), my_size(0), data(a) { data.reserve(init_capacity); my_aggregator.initialize_handler(my_functor_t(this)); } //! [begin,end) constructor template concurrent_priority_queue(InputIterator begin, InputIterator end, const allocator_type& a = allocator_type()) : mark(0), data(begin, end, a) { my_aggregator.initialize_handler(my_functor_t(this)); heapify(); my_size = data.size(); } #if __TBB_INITIALIZER_LISTS_PRESENT //! Constructor from std::initializer_list concurrent_priority_queue(std::initializer_list init_list, const allocator_type &a = allocator_type()) : mark(0),data(init_list.begin(), init_list.end(), a) { my_aggregator.initialize_handler(my_functor_t(this)); heapify(); my_size = data.size(); } #endif //# __TBB_INITIALIZER_LISTS_PRESENT //! Copy constructor /** This operation is unsafe if there are pending concurrent operations on the src queue. */ explicit concurrent_priority_queue(const concurrent_priority_queue& src) : mark(src.mark), my_size(src.my_size), data(src.data.begin(), src.data.end(), src.data.get_allocator()) { my_aggregator.initialize_handler(my_functor_t(this)); heapify(); } //! Copy constructor with specific allocator /** This operation is unsafe if there are pending concurrent operations on the src queue. */ concurrent_priority_queue(const concurrent_priority_queue& src, const allocator_type& a) : mark(src.mark), my_size(src.my_size), data(src.data.begin(), src.data.end(), a) { my_aggregator.initialize_handler(my_functor_t(this)); heapify(); } //! Assignment operator /** This operation is unsafe if there are pending concurrent operations on the src queue. */ concurrent_priority_queue& operator=(const concurrent_priority_queue& src) { if (this != &src) { vector_t(src.data.begin(), src.data.end(), src.data.get_allocator()).swap(data); mark = src.mark; my_size = src.my_size; } return *this; } #if __TBB_CPP11_RVALUE_REF_PRESENT //! Move constructor /** This operation is unsafe if there are pending concurrent operations on the src queue. */ concurrent_priority_queue(concurrent_priority_queue&& src) : mark(src.mark), my_size(src.my_size), data(std::move(src.data)) { my_aggregator.initialize_handler(my_functor_t(this)); } //! Move constructor with specific allocator /** This operation is unsafe if there are pending concurrent operations on the src queue. */ concurrent_priority_queue(concurrent_priority_queue&& src, const allocator_type& a) : mark(src.mark), my_size(src.my_size), #if __TBB_ALLOCATOR_TRAITS_PRESENT data(std::move(src.data), a) #else // Some early version of C++11 STL vector does not have a constructor of vector(vector&& , allocator). // It seems that the reason is absence of support of allocator_traits (stateful allocators). data(a) #endif //__TBB_ALLOCATOR_TRAITS_PRESENT { my_aggregator.initialize_handler(my_functor_t(this)); #if !__TBB_ALLOCATOR_TRAITS_PRESENT if (a != src.data.get_allocator()){ data.reserve(src.data.size()); data.assign(std::make_move_iterator(src.data.begin()), std::make_move_iterator(src.data.end())); }else{ data = std::move(src.data); } #endif //!__TBB_ALLOCATOR_TRAITS_PRESENT } //! Move assignment operator /** This operation is unsafe if there are pending concurrent operations on the src queue. */ concurrent_priority_queue& operator=( concurrent_priority_queue&& src) { if (this != &src) { mark = src.mark; my_size = src.my_size; #if !__TBB_ALLOCATOR_TRAITS_PRESENT if (data.get_allocator() != src.data.get_allocator()){ vector_t(std::make_move_iterator(src.data.begin()), std::make_move_iterator(src.data.end()), data.get_allocator()).swap(data); }else #endif //!__TBB_ALLOCATOR_TRAITS_PRESENT { data = std::move(src.data); } } return *this; } #endif //__TBB_CPP11_RVALUE_REF_PRESENT //! Assign the queue from [begin,end) range, not thread-safe template void assign(InputIterator begin, InputIterator end) { vector_t(begin, end, data.get_allocator()).swap(data); mark = 0; my_size = data.size(); heapify(); } #if __TBB_INITIALIZER_LISTS_PRESENT //! Assign the queue from std::initializer_list, not thread-safe void assign(std::initializer_list il) { this->assign(il.begin(), il.end()); } //! Assign from std::initializer_list, not thread-safe concurrent_priority_queue& operator=(std::initializer_list il) { this->assign(il.begin(), il.end()); return *this; } #endif //# __TBB_INITIALIZER_LISTS_PRESENT //! Returns true if empty, false otherwise /** Returned value may not reflect results of pending operations. This operation reads shared data and will trigger a race condition. */ bool empty() const { return size()==0; } //! Returns the current number of elements contained in the queue /** Returned value may not reflect results of pending operations. This operation reads shared data and will trigger a race condition. */ size_type size() const { return __TBB_load_with_acquire(my_size); } //! Pushes elem onto the queue, increasing capacity of queue if necessary /** This operation can be safely used concurrently with other push, try_pop or emplace operations. */ void push(const_reference elem) { cpq_operation op_data(elem, PUSH_OP); my_aggregator.execute(&op_data); if (op_data.status == FAILED) // exception thrown throw_exception(eid_bad_alloc); } #if __TBB_CPP11_RVALUE_REF_PRESENT //! Pushes elem onto the queue, increasing capacity of queue if necessary /** This operation can be safely used concurrently with other push, try_pop or emplace operations. */ void push(value_type &&elem) { cpq_operation op_data(elem, PUSH_RVALUE_OP); my_aggregator.execute(&op_data); if (op_data.status == FAILED) // exception thrown throw_exception(eid_bad_alloc); } #if __TBB_CPP11_VARIADIC_TEMPLATES_PRESENT //! Constructs a new element using args as the arguments for its construction and pushes it onto the queue */ /** This operation can be safely used concurrently with other push, try_pop or emplace operations. */ template void emplace(Args&&... args) { push(value_type(std::forward(args)...)); } #endif /* __TBB_CPP11_VARIADIC_TEMPLATES_PRESENT */ #endif /* __TBB_CPP11_RVALUE_REF_PRESENT */ //! Gets a reference to and removes highest priority element /** If a highest priority element was found, sets elem and returns true, otherwise returns false. This operation can be safely used concurrently with other push, try_pop or emplace operations. */ bool try_pop(reference elem) { cpq_operation op_data(POP_OP); op_data.elem = &elem; my_aggregator.execute(&op_data); return op_data.status==SUCCEEDED; } //! Clear the queue; not thread-safe /** This operation is unsafe if there are pending concurrent operations on the queue. Resets size, effectively emptying queue; does not free space. May not clear elements added in pending operations. */ void clear() { data.clear(); mark = 0; my_size = 0; } //! Swap this queue with another; not thread-safe /** This operation is unsafe if there are pending concurrent operations on the queue. */ void swap(concurrent_priority_queue& q) { using std::swap; data.swap(q.data); swap(mark, q.mark); swap(my_size, q.my_size); } //! Return allocator object allocator_type get_allocator() const { return data.get_allocator(); } private: enum operation_type {INVALID_OP, PUSH_OP, POP_OP, PUSH_RVALUE_OP}; enum operation_status { WAIT=0, SUCCEEDED, FAILED }; class cpq_operation : public aggregated_operation { public: operation_type type; union { value_type *elem; size_type sz; }; cpq_operation(const_reference e, operation_type t) : type(t), elem(const_cast(&e)) {} cpq_operation(operation_type t) : type(t) {} }; class my_functor_t { concurrent_priority_queue *cpq; public: my_functor_t() {} my_functor_t(concurrent_priority_queue *cpq_) : cpq(cpq_) {} void operator()(cpq_operation* op_list) { cpq->handle_operations(op_list); } }; typedef tbb::internal::aggregator< my_functor_t, cpq_operation > aggregator_t; aggregator_t my_aggregator; //! Padding added to avoid false sharing char padding1[NFS_MaxLineSize - sizeof(aggregator_t)]; //! The point at which unsorted elements begin size_type mark; __TBB_atomic size_type my_size; Compare compare; //! Padding added to avoid false sharing char padding2[NFS_MaxLineSize - (2*sizeof(size_type)) - sizeof(Compare)]; //! Storage for the heap of elements in queue, plus unheapified elements /** data has the following structure: binary unheapified heap elements ____|_______|____ | | | v v v [_|...|_|_|...|_| |...| ] 0 ^ ^ ^ | | |__capacity | |__my_size |__mark Thus, data stores the binary heap starting at position 0 through mark-1 (it may be empty). Then there are 0 or more elements that have not yet been inserted into the heap, in positions mark through my_size-1. */ typedef std::vector vector_t; vector_t data; void handle_operations(cpq_operation *op_list) { cpq_operation *tmp, *pop_list=NULL; __TBB_ASSERT(mark == data.size(), NULL); // First pass processes all constant (amortized; reallocation may happen) time pushes and pops. while (op_list) { // ITT note: &(op_list->status) tag is used to cover accesses to op_list // node. This thread is going to handle the operation, and so will acquire it // and perform the associated operation w/o triggering a race condition; the // thread that created the operation is waiting on the status field, so when // this thread is done with the operation, it will perform a // store_with_release to give control back to the waiting thread in // aggregator::insert_operation. call_itt_notify(acquired, &(op_list->status)); __TBB_ASSERT(op_list->type != INVALID_OP, NULL); tmp = op_list; op_list = itt_hide_load_word(op_list->next); if (tmp->type == POP_OP) { if (mark < data.size() && compare(data[0], data[data.size()-1])) { // there are newly pushed elems and the last one // is higher than top *(tmp->elem) = move(data[data.size()-1]); __TBB_store_with_release(my_size, my_size-1); itt_store_word_with_release(tmp->status, uintptr_t(SUCCEEDED)); data.pop_back(); __TBB_ASSERT(mark<=data.size(), NULL); } else { // no convenient item to pop; postpone itt_hide_store_word(tmp->next, pop_list); pop_list = tmp; } } else { // PUSH_OP or PUSH_RVALUE_OP __TBB_ASSERT(tmp->type == PUSH_OP || tmp->type == PUSH_RVALUE_OP, "Unknown operation" ); __TBB_TRY{ if (tmp->type == PUSH_OP) { data.push_back(*(tmp->elem)); } else { data.push_back(move(*(tmp->elem))); } __TBB_store_with_release(my_size, my_size + 1); itt_store_word_with_release(tmp->status, uintptr_t(SUCCEEDED)); } __TBB_CATCH(...) { itt_store_word_with_release(tmp->status, uintptr_t(FAILED)); } } } // second pass processes pop operations while (pop_list) { tmp = pop_list; pop_list = itt_hide_load_word(pop_list->next); __TBB_ASSERT(tmp->type == POP_OP, NULL); if (data.empty()) { itt_store_word_with_release(tmp->status, uintptr_t(FAILED)); } else { __TBB_ASSERT(mark<=data.size(), NULL); if (mark < data.size() && compare(data[0], data[data.size()-1])) { // there are newly pushed elems and the last one is // higher than top *(tmp->elem) = move(data[data.size()-1]); __TBB_store_with_release(my_size, my_size-1); itt_store_word_with_release(tmp->status, uintptr_t(SUCCEEDED)); data.pop_back(); } else { // extract top and push last element down heap *(tmp->elem) = move(data[0]); __TBB_store_with_release(my_size, my_size-1); itt_store_word_with_release(tmp->status, uintptr_t(SUCCEEDED)); reheap(); } } } // heapify any leftover pushed elements before doing the next // batch of operations if (mark0) mark = 1; for (; mark>1; if (!compare(data[parent], to_place)) break; data[cur_pos] = move(data[parent]); cur_pos = parent; } while( cur_pos ); data[cur_pos] = move(to_place); } } //! Re-heapify after an extraction /** Re-heapify by pushing last element down the heap from the root. */ void reheap() { size_type cur_pos=0, child=1; while (child < mark) { size_type target = child; if (child+1 < mark && compare(data[child], data[child+1])) ++target; // target now has the higher priority child if (compare(data[target], data[data.size()-1])) break; data[cur_pos] = move(data[target]); cur_pos = target; child = (cur_pos<<1)+1; } if (cur_pos != data.size()-1) data[cur_pos] = move(data[data.size()-1]); data.pop_back(); if (mark > data.size()) mark = data.size(); } }; } // namespace interface5 using interface5::concurrent_priority_queue; } // namespace tbb #endif /* __TBB_concurrent_priority_queue_H */ ================================================ FILE: benchmarks/tbb/concurrent_queue.cpp ================================================ /* Copyright 2005-2014 Intel Corporation. All Rights Reserved. This file is part of Threading Building Blocks. Threading Building Blocks is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. Threading Building Blocks is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Threading Building Blocks; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA As a special exception, you may use this file as part of a free software library without restriction. Specifically, if other files instantiate templates or use macros or inline functions from this file, or you compile this file and link it with other files to produce an executable, this file does not by itself cause the resulting executable to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the executable file might be covered by the GNU General Public License. */ #include "tbb/tbb_stddef.h" #include "tbb/tbb_machine.h" #include "tbb/tbb_exception.h" // Define required to satisfy test in internal file. #define __TBB_concurrent_queue_H #include "tbb/internal/_concurrent_queue_impl.h" #include "concurrent_monitor.h" #include "itt_notify.h" #include #if !TBB_USE_EXCEPTIONS && _MSC_VER // Suppress "C++ exception handler used, but unwind semantics are not enabled" warning in STL headers #pragma warning (push) #pragma warning (disable: 4530) #endif #include // for memset() #if !TBB_USE_EXCEPTIONS && _MSC_VER #pragma warning (pop) #endif using namespace std; #if defined(_MSC_VER) && defined(_Wp64) // Workaround for overzealous compiler warnings in /Wp64 mode #pragma warning (disable: 4267) #endif #define RECORD_EVENTS 0 namespace tbb { namespace internal { typedef concurrent_queue_base_v3 concurrent_queue_base; typedef size_t ticket; //! A queue using simple locking. /** For efficiency, this class has no constructor. The caller is expected to zero-initialize it. */ struct micro_queue { typedef concurrent_queue_base::page page; friend class micro_queue_pop_finalizer; atomic head_page; atomic head_counter; atomic tail_page; atomic tail_counter; spin_mutex page_mutex; void push( const void* item, ticket k, concurrent_queue_base& base, concurrent_queue_base::copy_specifics op_type ); void abort_push( ticket k, concurrent_queue_base& base ); bool pop( void* dst, ticket k, concurrent_queue_base& base ); micro_queue& assign( const micro_queue& src, concurrent_queue_base& base, concurrent_queue_base::copy_specifics op_type ); page* make_copy ( concurrent_queue_base& base, const page* src_page, size_t begin_in_page, size_t end_in_page, ticket& g_index, concurrent_queue_base::copy_specifics op_type ) ; void make_invalid( ticket k ); }; // we need to yank it out of micro_queue because of concurrent_queue_base::deallocate_page being virtual. class micro_queue_pop_finalizer: no_copy { typedef concurrent_queue_base::page page; ticket my_ticket; micro_queue& my_queue; page* my_page; concurrent_queue_base &base; public: micro_queue_pop_finalizer( micro_queue& queue, concurrent_queue_base& b, ticket k, page* p ) : my_ticket(k), my_queue(queue), my_page(p), base(b) {} ~micro_queue_pop_finalizer() { page* p = my_page; if( p ) { spin_mutex::scoped_lock lock( my_queue.page_mutex ); page* q = p->next; my_queue.head_page = q; if( !q ) { my_queue.tail_page = NULL; } } my_queue.head_counter = my_ticket; if( p ) base.deallocate_page( p ); } }; struct predicate_leq { ticket t; predicate_leq( ticket t_ ) : t(t_) {} bool operator() ( uintptr_t p ) const {return (ticket)p<=t;} }; //! Internal representation of a ConcurrentQueue. /** For efficiency, this class has no constructor. The caller is expected to zero-initialize it. */ class concurrent_queue_rep { public: private: friend struct micro_queue; //! Approximately n_queue/golden ratio static const size_t phi = 3; public: //! Must be power of 2 static const size_t n_queue = 8; //! Map ticket to an array index static size_t index( ticket k ) { return k*phi%n_queue; } atomic head_counter; concurrent_monitor items_avail; atomic n_invalid_entries; char pad1[NFS_MaxLineSize-((sizeof(atomic)+sizeof(concurrent_monitor)+sizeof(atomic))&(NFS_MaxLineSize-1))]; atomic tail_counter; concurrent_monitor slots_avail; char pad2[NFS_MaxLineSize-((sizeof(atomic)+sizeof(concurrent_monitor))&(NFS_MaxLineSize-1))]; micro_queue array[n_queue]; micro_queue& choose( ticket k ) { // The formula here approximates LRU in a cache-oblivious way. return array[index(k)]; } //! Value for effective_capacity that denotes unbounded queue. static const ptrdiff_t infinite_capacity = ptrdiff_t(~size_t(0)/2); }; #if _MSC_VER && !defined(__INTEL_COMPILER) // unary minus operator applied to unsigned type, result still unsigned #pragma warning( push ) #pragma warning( disable: 4146 ) #endif static void* invalid_page; //------------------------------------------------------------------------ // micro_queue //------------------------------------------------------------------------ void micro_queue::push( const void* item, ticket k, concurrent_queue_base& base, concurrent_queue_base::copy_specifics op_type ) { k &= -concurrent_queue_rep::n_queue; page* p = NULL; // find index on page where we would put the data size_t index = modulo_power_of_two( k/concurrent_queue_rep::n_queue, base.items_per_page ); if( !index ) { // make a new page __TBB_TRY { p = base.allocate_page(); } __TBB_CATCH(...) { ++base.my_rep->n_invalid_entries; make_invalid( k ); } p->mask = 0; p->next = NULL; } // wait for my turn if( tail_counter!=k ) // The developer insisted on keeping first check out of the backoff loop for( atomic_backoff b(true);;b.pause() ) { ticket tail = tail_counter; if( tail==k ) break; else if( tail&0x1 ) { // no memory. throws an exception; assumes concurrent_queue_rep::n_queue>1 ++base.my_rep->n_invalid_entries; throw_exception( eid_bad_last_alloc ); } } if( p ) { // page is newly allocated; insert in micro_queue spin_mutex::scoped_lock lock( page_mutex ); if( page* q = tail_page ) q->next = p; else head_page = p; tail_page = p; } if (item) { p = tail_page; ITT_NOTIFY( sync_acquired, p ); __TBB_TRY { if( concurrent_queue_base::copy == op_type ) { base.copy_item( *p, index, item ); } else { __TBB_ASSERT( concurrent_queue_base::move == op_type, NULL ); static_cast(base).move_item( *p, index, item ); } } __TBB_CATCH(...) { ++base.my_rep->n_invalid_entries; tail_counter += concurrent_queue_rep::n_queue; __TBB_RETHROW(); } ITT_NOTIFY( sync_releasing, p ); // If no exception was thrown, mark item as present. p->mask |= uintptr_t(1)<n_invalid_entries; tail_counter += concurrent_queue_rep::n_queue; } void micro_queue::abort_push( ticket k, concurrent_queue_base& base ) { push(NULL, k, base, concurrent_queue_base::copy); } bool micro_queue::pop( void* dst, ticket k, concurrent_queue_base& base ) { k &= -concurrent_queue_rep::n_queue; spin_wait_until_eq( head_counter, k ); spin_wait_while_eq( tail_counter, k ); page& p = *head_page; __TBB_ASSERT( &p, NULL ); size_t index = modulo_power_of_two( k/concurrent_queue_rep::n_queue, base.items_per_page ); bool success = false; { micro_queue_pop_finalizer finalizer( *this, base, k+concurrent_queue_rep::n_queue, index==base.items_per_page-1 ? &p : NULL ); if( p.mask & uintptr_t(1)<n_invalid_entries; } } return success; } micro_queue& micro_queue::assign( const micro_queue& src, concurrent_queue_base& base, concurrent_queue_base::copy_specifics op_type ) { head_counter = src.head_counter; tail_counter = src.tail_counter; const page* srcp = src.head_page; if( srcp ) { ticket g_index = head_counter; __TBB_TRY { size_t n_items = (tail_counter-head_counter)/concurrent_queue_rep::n_queue; size_t index = modulo_power_of_two( head_counter/concurrent_queue_rep::n_queue, base.items_per_page ); size_t end_in_first_page = (index+n_itemsnext; srcp!=src.tail_page; srcp=srcp->next ) { cur_page->next = make_copy( base, srcp, 0, base.items_per_page, g_index, op_type ); cur_page = cur_page->next; } __TBB_ASSERT( srcp==src.tail_page, NULL ); size_t last_index = modulo_power_of_two( tail_counter/concurrent_queue_rep::n_queue, base.items_per_page ); if( last_index==0 ) last_index = base.items_per_page; cur_page->next = make_copy( base, srcp, 0, last_index, g_index, op_type ); cur_page = cur_page->next; } tail_page = cur_page; } __TBB_CATCH(...) { make_invalid( g_index ); } } else { head_page = tail_page = NULL; } return *this; } concurrent_queue_base::page* micro_queue::make_copy( concurrent_queue_base& base, const concurrent_queue_base::page* src_page, size_t begin_in_page, size_t end_in_page, ticket& g_index, concurrent_queue_base::copy_specifics op_type ) { page* new_page = base.allocate_page(); new_page->next = NULL; new_page->mask = src_page->mask; for( ; begin_in_page!=end_in_page; ++begin_in_page, ++g_index ) if( new_page->mask & uintptr_t(1)<(base).move_page_item( *new_page, begin_in_page, *src_page, begin_in_page ); } return new_page; } void micro_queue::make_invalid( ticket k ) { static concurrent_queue_base::page dummy = {static_cast((void*)1), 0}; // mark it so that no more pushes are allowed. invalid_page = &dummy; { spin_mutex::scoped_lock lock( page_mutex ); tail_counter = k+concurrent_queue_rep::n_queue+1; if( page* q = tail_page ) q->next = static_cast(invalid_page); else head_page = static_cast(invalid_page); tail_page = static_cast(invalid_page); } __TBB_RETHROW(); } #if _MSC_VER && !defined(__INTEL_COMPILER) #pragma warning( pop ) #endif // warning 4146 is back //------------------------------------------------------------------------ // concurrent_queue_base //------------------------------------------------------------------------ concurrent_queue_base_v3::concurrent_queue_base_v3( size_t item_sz ) { items_per_page = item_sz<= 8 ? 32 : item_sz<= 16 ? 16 : item_sz<= 32 ? 8 : item_sz<= 64 ? 4 : item_sz<=128 ? 2 : 1; my_capacity = size_t(-1)/(item_sz>1 ? item_sz : 2); my_rep = cache_aligned_allocator().allocate(1); __TBB_ASSERT( (size_t)my_rep % NFS_GetLineSize()==0, "alignment error" ); __TBB_ASSERT( (size_t)&my_rep->head_counter % NFS_GetLineSize()==0, "alignment error" ); __TBB_ASSERT( (size_t)&my_rep->tail_counter % NFS_GetLineSize()==0, "alignment error" ); __TBB_ASSERT( (size_t)&my_rep->array % NFS_GetLineSize()==0, "alignment error" ); memset(my_rep,0,sizeof(concurrent_queue_rep)); new ( &my_rep->items_avail ) concurrent_monitor(); new ( &my_rep->slots_avail ) concurrent_monitor(); this->item_size = item_sz; } concurrent_queue_base_v3::~concurrent_queue_base_v3() { size_t nq = my_rep->n_queue; for( size_t i=0; iarray[i].tail_page==NULL, "pages were not freed properly" ); cache_aligned_allocator().deallocate(my_rep,1); } void concurrent_queue_base_v3::internal_push( const void* src ) { internal_insert_item( src, copy ); } void concurrent_queue_base_v8::internal_push_move( const void* src ) { internal_insert_item( src, move ); } void concurrent_queue_base_v3::internal_insert_item( const void* src, copy_specifics op_type ) { concurrent_queue_rep& r = *my_rep; ticket k = r.tail_counter++; ptrdiff_t e = my_capacity; #if DO_ITT_NOTIFY bool sync_prepare_done = false; #endif if( (ptrdiff_t)(k-r.head_counter)>=e ) { // queue is full #if DO_ITT_NOTIFY if( !sync_prepare_done ) { ITT_NOTIFY( sync_prepare, &sync_prepare_done ); sync_prepare_done = true; } #endif bool slept = false; concurrent_monitor::thread_context thr_ctx; r.slots_avail.prepare_wait( thr_ctx, ((ptrdiff_t)(k-e)) ); while( (ptrdiff_t)(k-r.head_counter)>=const_cast(e = my_capacity) ) { __TBB_TRY { slept = r.slots_avail.commit_wait( thr_ctx ); } __TBB_CATCH( tbb::user_abort& ) { r.choose(k).abort_push(k, *this); __TBB_RETHROW(); } __TBB_CATCH(...) { __TBB_RETHROW(); } if (slept == true) break; r.slots_avail.prepare_wait( thr_ctx, ((ptrdiff_t)(k-e)) ); } if( !slept ) r.slots_avail.cancel_wait( thr_ctx ); } ITT_NOTIFY( sync_acquired, &sync_prepare_done ); __TBB_ASSERT( (ptrdiff_t)(k-r.head_counter)0, NULL); } while( !r.choose(k).pop(dst,k,*this) ); // wake up a producer.. r.slots_avail.notify( predicate_leq(k) ); } void concurrent_queue_base_v3::internal_abort() { concurrent_queue_rep& r = *my_rep; r.items_avail.abort_all(); r.slots_avail.abort_all(); } bool concurrent_queue_base_v3::internal_pop_if_present( void* dst ) { concurrent_queue_rep& r = *my_rep; ticket k; do { k = r.head_counter; for(;;) { if( (ptrdiff_t)(r.tail_counter-k)<=0 ) { // Queue is empty return false; } // Queue had item with ticket k when we looked. Attempt to get that item. ticket tk=k; k = r.head_counter.compare_and_swap( tk+1, tk ); if( k==tk ) break; // Another thread snatched the item, retry. } } while( !r.choose( k ).pop( dst, k, *this ) ); r.slots_avail.notify( predicate_leq(k) ); return true; } bool concurrent_queue_base_v3::internal_push_if_not_full( const void* src ) { return internal_insert_if_not_full( src, copy ); } bool concurrent_queue_base_v8::internal_push_move_if_not_full( const void* src ) { return internal_insert_if_not_full( src, move ); } bool concurrent_queue_base_v3::internal_insert_if_not_full( const void* src, copy_specifics op_type ) { concurrent_queue_rep& r = *my_rep; ticket k = r.tail_counter; for(;;) { if( (ptrdiff_t)(k-r.head_counter)>=my_capacity ) { // Queue is full return false; } // Queue had empty slot with ticket k when we looked. Attempt to claim that slot. ticket tk=k; k = r.tail_counter.compare_and_swap( tk+1, tk ); if( k==tk ) break; // Another thread claimed the slot, so retry. } r.choose(k).push(src, k, *this, op_type); r.items_avail.notify( predicate_leq(k) ); return true; } ptrdiff_t concurrent_queue_base_v3::internal_size() const { __TBB_ASSERT( sizeof(ptrdiff_t)<=sizeof(size_t), NULL ); return ptrdiff_t(my_rep->tail_counter-my_rep->head_counter-my_rep->n_invalid_entries); } bool concurrent_queue_base_v3::internal_empty() const { ticket tc = my_rep->tail_counter; ticket hc = my_rep->head_counter; // if tc!=r.tail_counter, the queue was not empty at some point between the two reads. return ( tc==my_rep->tail_counter && ptrdiff_t(tc-hc-my_rep->n_invalid_entries)<=0 ); } void concurrent_queue_base_v3::internal_set_capacity( ptrdiff_t capacity, size_t /*item_sz*/ ) { my_capacity = capacity<0 ? concurrent_queue_rep::infinite_capacity : capacity; } void concurrent_queue_base_v3::internal_finish_clear() { size_t nq = my_rep->n_queue; for( size_t i=0; iarray[i].tail_page; __TBB_ASSERT( my_rep->array[i].head_page==tp, "at most one page should remain" ); if( tp!=NULL) { if( tp!=invalid_page ) deallocate_page( tp ); my_rep->array[i].tail_page = NULL; } } } void concurrent_queue_base_v3::internal_throw_exception() const { throw_exception( eid_bad_alloc ); } void concurrent_queue_base_v3::internal_assign( const concurrent_queue_base& src, copy_specifics op_type ) { items_per_page = src.items_per_page; my_capacity = src.my_capacity; // copy concurrent_queue_rep. my_rep->head_counter = src.my_rep->head_counter; my_rep->tail_counter = src.my_rep->tail_counter; my_rep->n_invalid_entries = src.my_rep->n_invalid_entries; // copy micro_queues for( size_t i = 0; in_queue; ++i ) my_rep->array[i].assign( src.my_rep->array[i], *this, op_type ); __TBB_ASSERT( my_rep->head_counter==src.my_rep->head_counter && my_rep->tail_counter==src.my_rep->tail_counter, "the source concurrent queue should not be concurrently modified." ); } void concurrent_queue_base_v3::assign( const concurrent_queue_base& src ) { internal_assign( src, copy ); } void concurrent_queue_base_v8::move_content( concurrent_queue_base_v8& src ) { internal_assign( src, move ); } //------------------------------------------------------------------------ // concurrent_queue_iterator_rep //------------------------------------------------------------------------ class concurrent_queue_iterator_rep: no_assign { public: ticket head_counter; const concurrent_queue_base& my_queue; const size_t offset_of_last; concurrent_queue_base::page* array[concurrent_queue_rep::n_queue]; concurrent_queue_iterator_rep( const concurrent_queue_base& queue, size_t offset_of_last_ ) : head_counter(queue.my_rep->head_counter), my_queue(queue), offset_of_last(offset_of_last_) { const concurrent_queue_rep& rep = *queue.my_rep; for( size_t k=0; ktail_counter ) { item = NULL; return true; } else { concurrent_queue_base::page* p = array[concurrent_queue_rep::index(k)]; __TBB_ASSERT(p,NULL); size_t i = modulo_power_of_two( k/concurrent_queue_rep::n_queue, my_queue.items_per_page ); item = static_cast(static_cast(p)) + offset_of_last + my_queue.item_size*i; return (p->mask & uintptr_t(1)<().allocate(1); new( my_rep ) concurrent_queue_iterator_rep(queue,offset_of_last); size_t k = my_rep->head_counter; if( !my_rep->get_item(my_item, k) ) advance(); } concurrent_queue_iterator_base_v3::concurrent_queue_iterator_base_v3( const concurrent_queue_base& queue ) { initialize(queue,0); } concurrent_queue_iterator_base_v3::concurrent_queue_iterator_base_v3( const concurrent_queue_base& queue, size_t offset_of_last ) { initialize(queue,offset_of_last); } void concurrent_queue_iterator_base_v3::assign( const concurrent_queue_iterator_base& other ) { if( my_rep!=other.my_rep ) { if( my_rep ) { cache_aligned_allocator().deallocate(my_rep, 1); my_rep = NULL; } if( other.my_rep ) { my_rep = cache_aligned_allocator().allocate(1); new( my_rep ) concurrent_queue_iterator_rep( *other.my_rep ); } } my_item = other.my_item; } void concurrent_queue_iterator_base_v3::advance() { __TBB_ASSERT( my_item, "attempt to increment iterator past end of queue" ); size_t k = my_rep->head_counter; const concurrent_queue_base& queue = my_rep->my_queue; #if TBB_USE_ASSERT void* tmp; my_rep->get_item(tmp,k); __TBB_ASSERT( my_item==tmp, NULL ); #endif /* TBB_USE_ASSERT */ size_t i = modulo_power_of_two( k/concurrent_queue_rep::n_queue, queue.items_per_page ); if( i==queue.items_per_page-1 ) { concurrent_queue_base::page*& root = my_rep->array[concurrent_queue_rep::index(k)]; root = root->next; } // advance k my_rep->head_counter = ++k; if( !my_rep->get_item(my_item, k) ) advance(); } concurrent_queue_iterator_base_v3::~concurrent_queue_iterator_base_v3() { //delete my_rep; cache_aligned_allocator().deallocate(my_rep, 1); my_rep = NULL; } } // namespace internal } // namespace tbb ================================================ FILE: benchmarks/tbb/concurrent_queue.h ================================================ /* Copyright 2005-2014 Intel Corporation. All Rights Reserved. This file is part of Threading Building Blocks. Threading Building Blocks is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. Threading Building Blocks is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Threading Building Blocks; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA As a special exception, you may use this file as part of a free software library without restriction. Specifically, if other files instantiate templates or use macros or inline functions from this file, or you compile this file and link it with other files to produce an executable, this file does not by itself cause the resulting executable to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the executable file might be covered by the GNU General Public License. */ #ifndef __TBB_concurrent_queue_H #define __TBB_concurrent_queue_H #include "internal/_concurrent_queue_impl.h" namespace tbb { namespace strict_ppl { //! A high-performance thread-safe non-blocking concurrent queue. /** Multiple threads may each push and pop concurrently. Assignment construction is not allowed. @ingroup containers */ template > class concurrent_queue: public internal::concurrent_queue_base_v3 { template friend class internal::concurrent_queue_iterator; //! Allocator type typedef typename A::template rebind::other page_allocator_type; page_allocator_type my_allocator; //! Allocates a block of size n (bytes) /*override*/ virtual void *allocate_block( size_t n ) { void *b = reinterpret_cast(my_allocator.allocate( n )); if( !b ) internal::throw_exception(internal::eid_bad_alloc); return b; } //! Deallocates block created by allocate_block. /*override*/ virtual void deallocate_block( void *b, size_t n ) { my_allocator.deallocate( reinterpret_cast(b), n ); } static void copy_construct_item(T* location, const void* src){ new (location) T(*static_cast(src)); } #if __TBB_CPP11_RVALUE_REF_PRESENT static void move_construct_item(T* location, const void* src) { new (location) T( std::move(*static_cast(const_cast(src))) ); } #endif /* __TBB_CPP11_RVALUE_REF_PRESENT */ public: //! Element type in the queue. typedef T value_type; //! Reference type typedef T& reference; //! Const reference type typedef const T& const_reference; //! Integral type for representing size of the queue. typedef size_t size_type; //! Difference type for iterator typedef ptrdiff_t difference_type; //! Allocator type typedef A allocator_type; //! Construct empty queue explicit concurrent_queue(const allocator_type& a = allocator_type()) : my_allocator( a ) { } //! [begin,end) constructor template concurrent_queue( InputIterator begin, InputIterator end, const allocator_type& a = allocator_type()) : my_allocator( a ) { for( ; begin != end; ++begin ) this->push(*begin); } //! Copy constructor concurrent_queue( const concurrent_queue& src, const allocator_type& a = allocator_type()) : internal::concurrent_queue_base_v3(), my_allocator( a ) { this->assign( src, copy_construct_item ); } #if __TBB_CPP11_RVALUE_REF_PRESENT //! Move constructors concurrent_queue( concurrent_queue&& src ) : internal::concurrent_queue_base_v3(), my_allocator( std::move(src.my_allocator) ) { this->internal_swap( src ); } concurrent_queue( concurrent_queue&& src, const allocator_type& a ) : internal::concurrent_queue_base_v3(), my_allocator( a ) { // checking that memory allocated by one instance of allocator can be deallocated // with another if( my_allocator == src.my_allocator) { this->internal_swap( src ); } else { // allocators are different => performing per-element move this->assign( src, move_construct_item ); src.clear(); } } #endif /* __TBB_CPP11_RVALUE_REF_PRESENT */ //! Destroy queue ~concurrent_queue(); //! Enqueue an item at tail of queue. void push( const T& source ) { this->internal_push( &source, copy_construct_item ); } #if __TBB_CPP11_RVALUE_REF_PRESENT void push( T&& source ) { this->internal_push( &source, move_construct_item ); } #if __TBB_CPP11_VARIADIC_TEMPLATES_PRESENT template void emplace( Arguments&&... args ) { push( T(std::forward( args )...) ); } #endif //__TBB_CPP11_VARIADIC_TEMPLATES_PRESENT #endif /* __TBB_CPP11_RVALUE_REF_PRESENT */ //! Attempt to dequeue an item from head of queue. /** Does not wait for item to become available. Returns true if successful; false otherwise. */ bool try_pop( T& result ) { return this->internal_try_pop( &result ); } //! Return the number of items in the queue; thread unsafe size_type unsafe_size() const {return this->internal_size();} //! Equivalent to size()==0. bool empty() const {return this->internal_empty();} //! Clear the queue. not thread-safe. void clear() ; //! Return allocator object allocator_type get_allocator() const { return this->my_allocator; } typedef internal::concurrent_queue_iterator iterator; typedef internal::concurrent_queue_iterator const_iterator; //------------------------------------------------------------------------ // The iterators are intended only for debugging. They are slow and not thread safe. //------------------------------------------------------------------------ iterator unsafe_begin() {return iterator(*this);} iterator unsafe_end() {return iterator();} const_iterator unsafe_begin() const {return const_iterator(*this);} const_iterator unsafe_end() const {return const_iterator();} } ; template concurrent_queue::~concurrent_queue() { clear(); this->internal_finish_clear(); } template void concurrent_queue::clear() { while( !empty() ) { T value; this->internal_try_pop(&value); } } } // namespace strict_ppl //! A high-performance thread-safe blocking concurrent bounded queue. /** This is the pre-PPL TBB concurrent queue which supports boundedness and blocking semantics. Note that method names agree with the PPL-style concurrent queue. Multiple threads may each push and pop concurrently. Assignment construction is not allowed. @ingroup containers */ template > class concurrent_bounded_queue: public internal::concurrent_queue_base_v8 { template friend class internal::concurrent_queue_iterator; //! Allocator type typedef typename A::template rebind::other page_allocator_type; page_allocator_type my_allocator; typedef typename concurrent_queue_base_v3::padded_page padded_page; typedef typename concurrent_queue_base_v3::copy_specifics copy_specifics; //! Class used to ensure exception-safety of method "pop" class destroyer: internal::no_copy { T& my_value; public: destroyer( T& value ) : my_value(value) {} ~destroyer() {my_value.~T();} }; T& get_ref( page& p, size_t index ) { __TBB_ASSERT( index(static_cast(&p))->last)[index]; } /*override*/ virtual void copy_item( page& dst, size_t index, const void* src ) { new( &get_ref(dst,index) ) T(*static_cast(src)); } #if __TBB_CPP11_RVALUE_REF_PRESENT /*override*/ virtual void move_item( page& dst, size_t index, const void* src ) { new( &get_ref(dst,index) ) T( std::move(*static_cast(const_cast(src))) ); } #else /*override*/ virtual void move_item( page&, size_t, const void* ) { __TBB_ASSERT( false, "Unreachable code" ); } #endif /*override*/ virtual void copy_page_item( page& dst, size_t dindex, const page& src, size_t sindex ) { new( &get_ref(dst,dindex) ) T( get_ref( const_cast(src), sindex ) ); } #if __TBB_CPP11_RVALUE_REF_PRESENT /*override*/ virtual void move_page_item( page& dst, size_t dindex, const page& src, size_t sindex ) { new( &get_ref(dst,dindex) ) T( std::move(get_ref( const_cast(src), sindex )) ); } #else /*override*/ virtual void move_page_item( page&, size_t, const page&, size_t ) { __TBB_ASSERT( false, "Unreachable code" ); } #endif /*override*/ virtual void assign_and_destroy_item( void* dst, page& src, size_t index ) { T& from = get_ref(src,index); destroyer d(from); *static_cast(dst) = tbb::internal::move( from ); } /*override*/ virtual page *allocate_page() { size_t n = sizeof(padded_page) + (items_per_page-1)*sizeof(T); page *p = reinterpret_cast(my_allocator.allocate( n )); if( !p ) internal::throw_exception(internal::eid_bad_alloc); return p; } /*override*/ virtual void deallocate_page( page *p ) { size_t n = sizeof(padded_page) + (items_per_page-1)*sizeof(T); my_allocator.deallocate( reinterpret_cast(p), n ); } public: //! Element type in the queue. typedef T value_type; //! Allocator type typedef A allocator_type; //! Reference type typedef T& reference; //! Const reference type typedef const T& const_reference; //! Integral type for representing size of the queue. /** Note that the size_type is a signed integral type. This is because the size can be negative if there are pending pops without corresponding pushes. */ typedef std::ptrdiff_t size_type; //! Difference type for iterator typedef std::ptrdiff_t difference_type; //! Construct empty queue explicit concurrent_bounded_queue(const allocator_type& a = allocator_type()) : concurrent_queue_base_v8( sizeof(T) ), my_allocator( a ) { } //! Copy constructor concurrent_bounded_queue( const concurrent_bounded_queue& src, const allocator_type& a = allocator_type()) : concurrent_queue_base_v8( sizeof(T) ), my_allocator( a ) { assign( src ); } #if __TBB_CPP11_RVALUE_REF_PRESENT //! Move constructors concurrent_bounded_queue( concurrent_bounded_queue&& src ) : concurrent_queue_base_v8( sizeof(T) ), my_allocator( std::move(src.my_allocator) ) { internal_swap( src ); } concurrent_bounded_queue( concurrent_bounded_queue&& src, const allocator_type& a ) : concurrent_queue_base_v8( sizeof(T) ), my_allocator( a ) { // checking that memory allocated by one instance of allocator can be deallocated // with another if( my_allocator == src.my_allocator) { this->internal_swap( src ); } else { // allocators are different => performing per-element move this->move_content( src ); src.clear(); } } #endif /* __TBB_CPP11_RVALUE_REF_PRESENT */ //! [begin,end) constructor template concurrent_bounded_queue( InputIterator begin, InputIterator end, const allocator_type& a = allocator_type()) : concurrent_queue_base_v8( sizeof(T) ), my_allocator( a ) { for( ; begin != end; ++begin ) internal_push_if_not_full(&*begin); } //! Destroy queue ~concurrent_bounded_queue(); //! Enqueue an item at tail of queue. void push( const T& source ) { internal_push( &source ); } #if __TBB_CPP11_RVALUE_REF_PRESENT //! Move an item at tail of queue. void push( T&& source ) { internal_push_move( &source ); } #if __TBB_CPP11_VARIADIC_TEMPLATES_PRESENT template void emplace( Arguments&&... args ) { push( T(std::forward( args )...) ); } #endif /* __TBB_CPP11_VARIADIC_TEMPLATES_PRESENT */ #endif /* __TBB_CPP11_RVALUE_REF_PRESENT */ //! Dequeue item from head of queue. /** Block until an item becomes available, and then dequeue it. */ void pop( T& destination ) { internal_pop( &destination ); } #if TBB_USE_EXCEPTIONS //! Abort all pending queue operations void abort() { internal_abort(); } #endif //! Enqueue an item at tail of queue if queue is not already full. /** Does not wait for queue to become not full. Returns true if item is pushed; false if queue was already full. */ bool try_push( const T& source ) { return internal_push_if_not_full( &source ); } #if __TBB_CPP11_RVALUE_REF_PRESENT //! Move an item at tail of queue if queue is not already full. /** Does not wait for queue to become not full. Returns true if item is pushed; false if queue was already full. */ bool try_push( T&& source ) { return internal_push_move_if_not_full( &source ); } #if __TBB_CPP11_VARIADIC_TEMPLATES_PRESENT template bool try_emplace( Arguments&&... args ) { return try_push( T(std::forward( args )...) ); } #endif /* __TBB_CPP11_VARIADIC_TEMPLATES_PRESENT */ #endif /* __TBB_CPP11_RVALUE_REF_PRESENT */ //! Attempt to dequeue an item from head of queue. /** Does not wait for item to become available. Returns true if successful; false otherwise. */ bool try_pop( T& destination ) { return internal_pop_if_present( &destination ); } //! Return number of pushes minus number of pops. /** Note that the result can be negative if there are pops waiting for the corresponding pushes. The result can also exceed capacity() if there are push operations in flight. */ size_type size() const {return internal_size();} //! Equivalent to size()<=0. bool empty() const {return internal_empty();} //! Maximum number of allowed elements size_type capacity() const { return my_capacity; } //! Set the capacity /** Setting the capacity to 0 causes subsequent try_push operations to always fail, and subsequent push operations to block forever. */ void set_capacity( size_type new_capacity ) { internal_set_capacity( new_capacity, sizeof(T) ); } //! return allocator object allocator_type get_allocator() const { return this->my_allocator; } //! clear the queue. not thread-safe. void clear() ; typedef internal::concurrent_queue_iterator iterator; typedef internal::concurrent_queue_iterator const_iterator; //------------------------------------------------------------------------ // The iterators are intended only for debugging. They are slow and not thread safe. //------------------------------------------------------------------------ iterator unsafe_begin() {return iterator(*this);} iterator unsafe_end() {return iterator();} const_iterator unsafe_begin() const {return const_iterator(*this);} const_iterator unsafe_end() const {return const_iterator();} }; template concurrent_bounded_queue::~concurrent_bounded_queue() { clear(); internal_finish_clear(); } template void concurrent_bounded_queue::clear() { while( !empty() ) { T value; internal_pop_if_present(&value); } } using strict_ppl::concurrent_queue; } // namespace tbb #endif /* __TBB_concurrent_queue_H */ ================================================ FILE: benchmarks/tbb/concurrent_unordered_map.h ================================================ /* Copyright 2005-2014 Intel Corporation. All Rights Reserved. This file is part of Threading Building Blocks. Threading Building Blocks is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. Threading Building Blocks is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Threading Building Blocks; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA As a special exception, you may use this file as part of a free software library without restriction. Specifically, if other files instantiate templates or use macros or inline functions from this file, or you compile this file and link it with other files to produce an executable, this file does not by itself cause the resulting executable to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the executable file might be covered by the GNU General Public License. */ /* Container implementations in this header are based on PPL implementations provided by Microsoft. */ #ifndef __TBB_concurrent_unordered_map_H #define __TBB_concurrent_unordered_map_H #include "internal/_concurrent_unordered_impl.h" namespace tbb { namespace interface5 { // Template class for hash map traits template class concurrent_unordered_map_traits { protected: typedef std::pair value_type; typedef Key key_type; typedef Hash_compare hash_compare; typedef typename Allocator::template rebind::other allocator_type; enum { allow_multimapping = Allow_multimapping }; concurrent_unordered_map_traits() : my_hash_compare() {} concurrent_unordered_map_traits(const hash_compare& hc) : my_hash_compare(hc) {} class value_compare : public std::binary_function { friend class concurrent_unordered_map_traits; public: bool operator()(const value_type& left, const value_type& right) const { return (my_hash_compare(left.first, right.first)); } value_compare(const hash_compare& comparator) : my_hash_compare(comparator) {} protected: hash_compare my_hash_compare; // the comparator predicate for keys }; template static const Key& get_key(const std::pair& value) { return (value.first); } hash_compare my_hash_compare; // the comparator predicate for keys }; template , typename Key_equality = std::equal_to, typename Allocator = tbb::tbb_allocator > > class concurrent_unordered_map : public internal::concurrent_unordered_base< concurrent_unordered_map_traits, Allocator, false> > { // Base type definitions typedef internal::hash_compare hash_compare; typedef concurrent_unordered_map_traits traits_type; typedef internal::concurrent_unordered_base< traits_type > base_type; #if __TBB_EXTRA_DEBUG public: #endif using traits_type::allow_multimapping; public: using base_type::end; using base_type::find; using base_type::insert; // Type definitions typedef Key key_type; typedef typename base_type::value_type value_type; typedef T mapped_type; typedef Hasher hasher; typedef Key_equality key_equal; typedef hash_compare key_compare; typedef typename base_type::allocator_type allocator_type; typedef typename base_type::pointer pointer; typedef typename base_type::const_pointer const_pointer; typedef typename base_type::reference reference; typedef typename base_type::const_reference const_reference; typedef typename base_type::size_type size_type; typedef typename base_type::difference_type difference_type; typedef typename base_type::iterator iterator; typedef typename base_type::const_iterator const_iterator; typedef typename base_type::iterator local_iterator; typedef typename base_type::const_iterator const_local_iterator; // Construction/destruction/copying explicit concurrent_unordered_map(size_type n_of_buckets = base_type::initial_bucket_number, const hasher& _Hasher = hasher(), const key_equal& _Key_equality = key_equal(), const allocator_type& a = allocator_type()) : base_type(n_of_buckets, key_compare(_Hasher, _Key_equality), a) { } concurrent_unordered_map(const Allocator& a) : base_type(base_type::initial_bucket_number, key_compare(), a) { } template concurrent_unordered_map(Iterator first, Iterator last, size_type n_of_buckets = base_type::initial_bucket_number, const hasher& _Hasher = hasher(), const key_equal& _Key_equality = key_equal(), const allocator_type& a = allocator_type()) : base_type(n_of_buckets, key_compare(_Hasher, _Key_equality), a) { insert(first, last); } #if __TBB_INITIALIZER_LISTS_PRESENT //! Constructor from initializer_list concurrent_unordered_map(std::initializer_list il, size_type n_of_buckets = base_type::initial_bucket_number, const hasher& _Hasher = hasher(), const key_equal& _Key_equality = key_equal(), const allocator_type& a = allocator_type()) : base_type(n_of_buckets, key_compare(_Hasher, _Key_equality), a) { this->insert(il.begin(),il.end()); } #endif //# __TBB_INITIALIZER_LISTS_PRESENT #if __TBB_CPP11_RVALUE_REF_PRESENT && __TBB_CPP11_IMPLICIT_MOVE_MEMBERS_GENERATION_FOR_DERIVED_BROKEN concurrent_unordered_map(const concurrent_unordered_map& table) : base_type(table) { } concurrent_unordered_map& operator=(const concurrent_unordered_map& table) { return static_cast(base_type::operator=(table)); } concurrent_unordered_map(concurrent_unordered_map&& table) : base_type(std::move(table)) { } concurrent_unordered_map& operator=(concurrent_unordered_map&& table) { return static_cast(base_type::operator=(std::move(table))); } #endif //__TBB_CPP11_IMPLICIT_MOVE_MEMBERS_GENERATION_FOR_DERIVED_BROKEN concurrent_unordered_map(const concurrent_unordered_map& table, const Allocator& a) : base_type(table, a) { } #if __TBB_CPP11_RVALUE_REF_PRESENT concurrent_unordered_map(concurrent_unordered_map&& table, const Allocator& a) : base_type(std::move(table), a) { } #endif // Observers mapped_type& operator[](const key_type& key) { iterator where = find(key); if (where == end()) { where = insert(std::pair(key, mapped_type())).first; } return ((*where).second); } mapped_type& at(const key_type& key) { iterator where = find(key); if (where == end()) { tbb::internal::throw_exception(tbb::internal::eid_invalid_key); } return ((*where).second); } const mapped_type& at(const key_type& key) const { const_iterator where = find(key); if (where == end()) { tbb::internal::throw_exception(tbb::internal::eid_invalid_key); } return ((*where).second); } }; template < typename Key, typename T, typename Hasher = tbb::tbb_hash, typename Key_equality = std::equal_to, typename Allocator = tbb::tbb_allocator > > class concurrent_unordered_multimap : public internal::concurrent_unordered_base< concurrent_unordered_map_traits< Key, T, internal::hash_compare, Allocator, true> > { // Base type definitions typedef internal::hash_compare hash_compare; typedef concurrent_unordered_map_traits traits_type; typedef internal::concurrent_unordered_base base_type; #if __TBB_EXTRA_DEBUG public: #endif using traits_type::allow_multimapping; public: using base_type::insert; // Type definitions typedef Key key_type; typedef typename base_type::value_type value_type; typedef T mapped_type; typedef Hasher hasher; typedef Key_equality key_equal; typedef hash_compare key_compare; typedef typename base_type::allocator_type allocator_type; typedef typename base_type::pointer pointer; typedef typename base_type::const_pointer const_pointer; typedef typename base_type::reference reference; typedef typename base_type::const_reference const_reference; typedef typename base_type::size_type size_type; typedef typename base_type::difference_type difference_type; typedef typename base_type::iterator iterator; typedef typename base_type::const_iterator const_iterator; typedef typename base_type::iterator local_iterator; typedef typename base_type::const_iterator const_local_iterator; // Construction/destruction/copying explicit concurrent_unordered_multimap(size_type n_of_buckets = base_type::initial_bucket_number, const hasher& _Hasher = hasher(), const key_equal& _Key_equality = key_equal(), const allocator_type& a = allocator_type()) : base_type(n_of_buckets, key_compare(_Hasher, _Key_equality), a) { } concurrent_unordered_multimap(const Allocator& a) : base_type(base_type::initial_bucket_number, key_compare(), a) { } template concurrent_unordered_multimap(Iterator first, Iterator last, size_type n_of_buckets = base_type::initial_bucket_number, const hasher& _Hasher = hasher(), const key_equal& _Key_equality = key_equal(), const allocator_type& a = allocator_type()) : base_type(n_of_buckets,key_compare(_Hasher,_Key_equality), a) { insert(first, last); } #if __TBB_INITIALIZER_LISTS_PRESENT //! Constructor from initializer_list concurrent_unordered_multimap(std::initializer_list il, size_type n_of_buckets = base_type::initial_bucket_number, const hasher& _Hasher = hasher(), const key_equal& _Key_equality = key_equal(), const allocator_type& a = allocator_type()) : base_type(n_of_buckets, key_compare(_Hasher, _Key_equality), a) { this->insert(il.begin(),il.end()); } #endif //# __TBB_INITIALIZER_LISTS_PRESENT #if __TBB_CPP11_RVALUE_REF_PRESENT && __TBB_CPP11_IMPLICIT_MOVE_MEMBERS_GENERATION_FOR_DERIVED_BROKEN concurrent_unordered_multimap(const concurrent_unordered_multimap& table) : base_type(table) { } concurrent_unordered_multimap& operator=(const concurrent_unordered_multimap& table) { return static_cast(base_type::operator=(table)); } concurrent_unordered_multimap(concurrent_unordered_multimap&& table) : base_type(std::move(table)) { } concurrent_unordered_multimap& operator=(concurrent_unordered_multimap&& table) { return static_cast(base_type::operator=(std::move(table))); } #endif //__TBB_CPP11_IMPLICIT_MOVE_MEMBERS_GENERATION_FOR_DERIVED_BROKEN concurrent_unordered_multimap(const concurrent_unordered_multimap& table, const Allocator& a) : base_type(table, a) { } #if __TBB_CPP11_RVALUE_REF_PRESENT concurrent_unordered_multimap(concurrent_unordered_multimap&& table, const Allocator& a) : base_type(std::move(table), a) { } #endif }; } // namespace interface5 using interface5::concurrent_unordered_map; using interface5::concurrent_unordered_multimap; } // namespace tbb #endif// __TBB_concurrent_unordered_map_H ================================================ FILE: benchmarks/tbb/concurrent_unordered_set.h ================================================ /* Copyright 2005-2014 Intel Corporation. All Rights Reserved. This file is part of Threading Building Blocks. Threading Building Blocks is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. Threading Building Blocks is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Threading Building Blocks; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA As a special exception, you may use this file as part of a free software library without restriction. Specifically, if other files instantiate templates or use macros or inline functions from this file, or you compile this file and link it with other files to produce an executable, this file does not by itself cause the resulting executable to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the executable file might be covered by the GNU General Public License. */ /* Container implementations in this header are based on PPL implementations provided by Microsoft. */ #ifndef __TBB_concurrent_unordered_set_H #define __TBB_concurrent_unordered_set_H #include "internal/_concurrent_unordered_impl.h" namespace tbb { namespace interface5 { // Template class for hash set traits template class concurrent_unordered_set_traits { protected: typedef Key value_type; typedef Key key_type; typedef Hash_compare hash_compare; typedef typename Allocator::template rebind::other allocator_type; enum { allow_multimapping = Allow_multimapping }; concurrent_unordered_set_traits() : my_hash_compare() {} concurrent_unordered_set_traits(const hash_compare& hc) : my_hash_compare(hc) {} typedef hash_compare value_compare; static const Key& get_key(const value_type& value) { return value; } hash_compare my_hash_compare; // the comparator predicate for keys }; template , typename Key_equality = std::equal_to, typename Allocator = tbb::tbb_allocator > class concurrent_unordered_set : public internal::concurrent_unordered_base< concurrent_unordered_set_traits, Allocator, false> > { // Base type definitions typedef internal::hash_compare hash_compare; typedef internal::concurrent_unordered_base< concurrent_unordered_set_traits > base_type; typedef concurrent_unordered_set_traits, Allocator, false> traits_type; #if __TBB_EXTRA_DEBUG public: #endif using traits_type::allow_multimapping; public: using base_type::insert; // Type definitions typedef Key key_type; typedef typename base_type::value_type value_type; typedef Key mapped_type; typedef Hasher hasher; typedef Key_equality key_equal; typedef hash_compare key_compare; typedef typename base_type::allocator_type allocator_type; typedef typename base_type::pointer pointer; typedef typename base_type::const_pointer const_pointer; typedef typename base_type::reference reference; typedef typename base_type::const_reference const_reference; typedef typename base_type::size_type size_type; typedef typename base_type::difference_type difference_type; typedef typename base_type::iterator iterator; typedef typename base_type::const_iterator const_iterator; typedef typename base_type::iterator local_iterator; typedef typename base_type::const_iterator const_local_iterator; // Construction/destruction/copying explicit concurrent_unordered_set(size_type n_of_buckets = base_type::initial_bucket_number, const hasher& a_hasher = hasher(), const key_equal& a_keyeq = key_equal(), const allocator_type& a = allocator_type()) : base_type(n_of_buckets, key_compare(a_hasher, a_keyeq), a) { } concurrent_unordered_set(const Allocator& a) : base_type(base_type::initial_bucket_number, key_compare(), a) { } template concurrent_unordered_set(Iterator first, Iterator last, size_type n_of_buckets = base_type::initial_bucket_number, const hasher& a_hasher = hasher(), const key_equal& a_keyeq = key_equal(), const allocator_type& a = allocator_type()) : base_type(n_of_buckets, key_compare(a_hasher, a_keyeq), a) { insert(first, last); } #if __TBB_INITIALIZER_LISTS_PRESENT //! Constructor from initializer_list concurrent_unordered_set(std::initializer_list il, size_type n_of_buckets = base_type::initial_bucket_number, const hasher& a_hasher = hasher(), const key_equal& a_keyeq = key_equal(), const allocator_type& a = allocator_type()) : base_type(n_of_buckets, key_compare(a_hasher, a_keyeq), a) { this->insert(il.begin(),il.end()); } #endif //# __TBB_INITIALIZER_LISTS_PRESENT #if __TBB_CPP11_RVALUE_REF_PRESENT && __TBB_CPP11_IMPLICIT_MOVE_MEMBERS_GENERATION_FOR_DERIVED_BROKEN concurrent_unordered_set(const concurrent_unordered_set& table) : base_type(table) { } concurrent_unordered_set& operator=(const concurrent_unordered_set& table) { return static_cast(base_type::operator=(table)); } concurrent_unordered_set(concurrent_unordered_set&& table) : base_type(std::move(table)) { } concurrent_unordered_set& operator=(concurrent_unordered_set&& table) { return static_cast(base_type::operator=(std::move(table))); } #endif //__TBB_CPP11_IMPLICIT_MOVE_MEMBERS_GENERATION_FOR_DERIVED_BROKEN concurrent_unordered_set(const concurrent_unordered_set& table, const Allocator& a) : base_type(table, a) { } #if __TBB_CPP11_RVALUE_REF_PRESENT concurrent_unordered_set(concurrent_unordered_set&& table, const Allocator& a) : base_type(std::move(table), a) { } #endif //__TBB_CPP11_RVALUE_REF_PRESENT }; template , typename Key_equality = std::equal_to, typename Allocator = tbb::tbb_allocator > class concurrent_unordered_multiset : public internal::concurrent_unordered_base< concurrent_unordered_set_traits, Allocator, true> > { // Base type definitions typedef internal::hash_compare hash_compare; typedef concurrent_unordered_set_traits traits_type; typedef internal::concurrent_unordered_base< traits_type > base_type; #if __TBB_EXTRA_DEBUG public: #endif using traits_type::allow_multimapping; public: using base_type::insert; // Type definitions typedef Key key_type; typedef typename base_type::value_type value_type; typedef Key mapped_type; typedef Hasher hasher; typedef Key_equality key_equal; typedef hash_compare key_compare; typedef typename base_type::allocator_type allocator_type; typedef typename base_type::pointer pointer; typedef typename base_type::const_pointer const_pointer; typedef typename base_type::reference reference; typedef typename base_type::const_reference const_reference; typedef typename base_type::size_type size_type; typedef typename base_type::difference_type difference_type; typedef typename base_type::iterator iterator; typedef typename base_type::const_iterator const_iterator; typedef typename base_type::iterator local_iterator; typedef typename base_type::const_iterator const_local_iterator; // Construction/destruction/copying explicit concurrent_unordered_multiset(size_type n_of_buckets = base_type::initial_bucket_number, const hasher& _Hasher = hasher(), const key_equal& _Key_equality = key_equal(), const allocator_type& a = allocator_type()) : base_type(n_of_buckets, key_compare(_Hasher, _Key_equality), a) { } concurrent_unordered_multiset(const Allocator& a) : base_type(base_type::initial_bucket_number, key_compare(), a) { } template concurrent_unordered_multiset(Iterator first, Iterator last, size_type n_of_buckets = base_type::initial_bucket_number, const hasher& _Hasher = hasher(), const key_equal& _Key_equality = key_equal(), const allocator_type& a = allocator_type()) : base_type(n_of_buckets, key_compare(_Hasher, _Key_equality), a) { insert(first, last); } #if __TBB_INITIALIZER_LISTS_PRESENT //! Constructor from initializer_list concurrent_unordered_multiset(std::initializer_list il, size_type n_of_buckets = base_type::initial_bucket_number, const hasher& a_hasher = hasher(), const key_equal& a_keyeq = key_equal(), const allocator_type& a = allocator_type()) : base_type(n_of_buckets, key_compare(a_hasher, a_keyeq), a) { this->insert(il.begin(),il.end()); } #endif //# __TBB_INITIALIZER_LISTS_PRESENT #if __TBB_CPP11_RVALUE_REF_PRESENT && __TBB_CPP11_IMPLICIT_MOVE_MEMBERS_GENERATION_FOR_DERIVED_BROKEN concurrent_unordered_multiset(const concurrent_unordered_multiset& table) : base_type(table) { } concurrent_unordered_multiset& operator=(const concurrent_unordered_multiset& table) { return static_cast(base_type::operator=(table)); } concurrent_unordered_multiset(concurrent_unordered_multiset&& table) : base_type(std::move(table)) { } concurrent_unordered_multiset& operator=(concurrent_unordered_multiset&& table) { return static_cast(base_type::operator=(std::move(table))); } #endif //__TBB_CPP11_IMPLICIT_MOVE_MEMBERS_GENERATION_FOR_DERIVED_BROKEN concurrent_unordered_multiset(const concurrent_unordered_multiset& table, const Allocator& a) : base_type(table, a) { } #if __TBB_CPP11_RVALUE_REF_PRESENT concurrent_unordered_multiset(concurrent_unordered_multiset&& table, const Allocator& a) : base_type(std::move(table), a) { } #endif //__TBB_CPP11_RVALUE_REF_PRESENT }; } // namespace interface5 using interface5::concurrent_unordered_set; using interface5::concurrent_unordered_multiset; } // namespace tbb #endif// __TBB_concurrent_unordered_set_H ================================================ FILE: benchmarks/tbb/concurrent_vector.cpp ================================================ /* Copyright 2005-2014 Intel Corporation. All Rights Reserved. This file is part of Threading Building Blocks. Threading Building Blocks is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. Threading Building Blocks is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Threading Building Blocks; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA As a special exception, you may use this file as part of a free software library without restriction. Specifically, if other files instantiate templates or use macros or inline functions from this file, or you compile this file and link it with other files to produce an executable, this file does not by itself cause the resulting executable to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the executable file might be covered by the GNU General Public License. */ #if (_MSC_VER) //MSVC 10 "deprecated" application of some std:: algorithms to raw pointers as not safe. //The reason is that destination is not checked against bounds/having enough place. #define _SCL_SECURE_NO_WARNINGS #endif #include "tbb/concurrent_vector.h" #include "tbb/cache_aligned_allocator.h" #include "tbb/tbb_exception.h" #include "tbb_misc.h" #include "itt_notify.h" #if !TBB_USE_EXCEPTIONS && _MSC_VER // Suppress "C++ exception handler used, but unwind semantics are not enabled" warning in STL headers #pragma warning (push) #pragma warning (disable: 4530) #endif #include #include //for uninitialized_fill_n #if !TBB_USE_EXCEPTIONS && _MSC_VER #pragma warning (pop) #endif #if defined(_MSC_VER) && defined(_Wp64) // Workaround for overzealous compiler warnings in /Wp64 mode #pragma warning (disable: 4267) #endif using namespace std; namespace tbb { namespace internal { class concurrent_vector_base_v3::helper :no_assign { public: //! memory page size static const size_type page_size = 4096; inline static bool incompact_predicate(size_type size) { // assert size != 0, see source/test/test_vector_layout.cpp return size < page_size || ((size-1)%page_size < page_size/2 && size < page_size * 128); // for more details } inline static size_type find_segment_end(const concurrent_vector_base_v3 &v) { segment_t *s = v.my_segment; segment_index_t u = s==v.my_storage? pointers_per_short_table : pointers_per_long_table; segment_index_t k = 0; while( k < u && (s[k].load()==segment_allocated() )) ++k; return k; } // TODO: optimize accesses to my_first_block //! assign first segment size. k - is index of last segment to be allocated, not a count of segments inline static void assign_first_segment_if_necessary(concurrent_vector_base_v3 &v, segment_index_t k) { if( !v.my_first_block ) { /* There was a suggestion to set first segment according to incompact_predicate: while( k && !helper::incompact_predicate(segment_size( k ) * element_size) ) --k; // while previous vector size is compact, decrement // reasons to not do it: // * constructor(n) is not ready to accept fragmented segments // * backward compatibility due to that constructor // * current version gives additional guarantee and faster init. // * two calls to reserve() will give the same effect. */ v.my_first_block.compare_and_swap(k+1, 0); // store number of segments } } inline static void *allocate_segment(concurrent_vector_base_v3 &v, size_type n) { void *ptr = v.vector_allocator_ptr(v, n); if(!ptr) throw_exception(eid_bad_alloc); // check for bad allocation, throw exception return ptr; } //! Publish segment so other threads can see it. template inline static void publish_segment( segment_t& s, argument_type rhs ) { // see also itt_store_pointer_with_release_v3() ITT_NOTIFY( sync_releasing, &s ); s.store(rhs); } static size_type enable_segment(concurrent_vector_base_v3 &v, size_type k, size_type element_size, bool mark_as_not_used_on_failure = false); // TODO: rename as get_segments_table() and return segment pointer inline static void extend_table_if_necessary(concurrent_vector_base_v3 &v, size_type k, size_type start ) { if(k >= pointers_per_short_table && v.my_segment == v.my_storage) extend_segment_table(v, start ); } static void extend_segment_table(concurrent_vector_base_v3 &v, size_type start); struct segment_not_used_predicate: no_assign { segment_t &s; segment_not_used_predicate(segment_t &segment) : s(segment) {} bool operator()() const { return s.load() == segment_not_used ();} }; inline static segment_t& acquire_segment(concurrent_vector_base_v3 &v, size_type index, size_type element_size, bool owner) { segment_t &s = v.my_segment[index]; // TODO: pass v.my_segment as argument if( s.load() == segment_not_used() ) { // do not check for segment_allocation_failed state if( owner ) { enable_segment( v, index, element_size ); } else { ITT_NOTIFY(sync_prepare, &s); spin_wait_while(segment_not_used_predicate(s)); ITT_NOTIFY(sync_acquired, &s); } } else { ITT_NOTIFY(sync_acquired, &s); } if(s.load() != segment_allocated()) throw_exception(eid_bad_last_alloc); // throw custom exception, because it's hard to recover correctly after segment_allocation_failed state return s; } ///// non-static fields of helper for exception-safe iteration across segments segment_t *table;// TODO: review all segment_index_t as just short type size_type first_block, k, sz, start, finish, element_size; helper(segment_t *segments, size_type fb, size_type esize, size_type index, size_type s, size_type f) throw() : table(segments), first_block(fb), k(index), sz(0), start(s), finish(f), element_size(esize) {} inline void first_segment() throw() { __TBB_ASSERT( start <= finish, NULL ); __TBB_ASSERT( first_block || !finish, NULL ); if( k < first_block ) k = 0; // process solid segment at a time size_type base = segment_base( k ); __TBB_ASSERT( base <= start, NULL ); finish -= base; start -= base; // rebase as offsets from segment k sz = k ? base : segment_size( first_block ); // sz==base for k>0 } inline void next_segment() throw() { finish -= sz; start = 0; // offsets from next segment if( !k ) k = first_block; else { ++k; sz = segment_size( k ); } } template inline size_type apply(const F &func) { first_segment(); while( sz < finish ) { // work for more than one segment //TODO: remove extra load() of table[k] inside func func( table[k], table[k].load().pointer() + element_size*start, sz - start ); next_segment(); } func( table[k], table[k].load().pointer() + element_size*start, finish - start ); return k; } inline segment_value_t get_segment_value(size_type index, bool wait) { segment_t &s = table[index]; if( wait && (s.load() == segment_not_used()) ) { ITT_NOTIFY(sync_prepare, &s); spin_wait_while(segment_not_used_predicate(s)); ITT_NOTIFY(sync_acquired, &s); } return s.load(); } ~helper() { if( sz >= finish ) return; // the work is done correctly cleanup(); } //! Out of line code to assists destructor in infrequent cases. void cleanup(); /// TODO: turn into lambda functions when available struct init_body { internal_array_op2 func; const void *arg; init_body(internal_array_op2 init, const void *src) : func(init), arg(src) {} void operator()(segment_t &, void *begin, size_type n) const { func( begin, arg, n ); } }; struct safe_init_body { internal_array_op2 func; const void *arg; safe_init_body(internal_array_op2 init, const void *src) : func(init), arg(src) {} void operator()(segment_t &s, void *begin, size_type n) const { if(s.load() != segment_allocated()) throw_exception(eid_bad_last_alloc); // throw custom exception func( begin, arg, n ); } }; struct destroy_body { internal_array_op1 func; destroy_body(internal_array_op1 destroy) : func(destroy) {} void operator()(segment_t &s, void *begin, size_type n) const { if(s.load() == segment_allocated()) func( begin, n ); } }; }; void concurrent_vector_base_v3::helper::extend_segment_table(concurrent_vector_base_v3 &v, concurrent_vector_base_v3::size_type start) { if( start > segment_size(pointers_per_short_table) ) start = segment_size(pointers_per_short_table); // If other threads are trying to set pointers in the short segment, wait for them to finish their // assignments before we copy the short segment to the long segment. Note: grow_to_at_least depends on it for( segment_index_t i = 0; segment_base(i) < start && v.my_segment == v.my_storage; i++ ){ if(v.my_storage[i].load() == segment_not_used()) { ITT_NOTIFY(sync_prepare, &v.my_storage[i]); atomic_backoff backoff(true); while( v.my_segment == v.my_storage && (v.my_storage[i].load() == segment_not_used()) ) backoff.pause(); ITT_NOTIFY(sync_acquired, &v.my_storage[i]); } } if( v.my_segment != v.my_storage ) return; segment_t* new_segment_table = (segment_t*)NFS_Allocate( pointers_per_long_table, sizeof(segment_t), NULL ); __TBB_ASSERT(new_segment_table, "NFS_Allocate should throws exception if it cannot allocate the requested storage, and not returns zero pointer" ); std::uninitialized_fill_n(new_segment_table,size_t(pointers_per_long_table),segment_t()); //init newly allocated table //TODO: replace with static assert __TBB_STATIC_ASSERT(pointers_per_long_table >= pointers_per_short_table, "size of the big table should be not lesser than of the small one, as we copy values to it" ); std::copy(v.my_storage, v.my_storage+pointers_per_short_table, new_segment_table);//copy values from old table, here operator= of segment_t is used if( v.my_segment.compare_and_swap( new_segment_table, v.my_storage ) != v.my_storage ) NFS_Free( new_segment_table ); // else TODO: add ITT_NOTIFY signals for v.my_segment? } concurrent_vector_base_v3::size_type concurrent_vector_base_v3::helper::enable_segment(concurrent_vector_base_v3 &v, concurrent_vector_base_v3::size_type k, concurrent_vector_base_v3::size_type element_size, bool mark_as_not_used_on_failure ) { struct segment_scope_guard : no_copy{ segment_t* my_segment_ptr; bool my_mark_as_not_used; segment_scope_guard(segment_t& segment, bool mark_as_not_used) : my_segment_ptr(&segment), my_mark_as_not_used(mark_as_not_used){} void dismiss(){ my_segment_ptr = 0;} ~segment_scope_guard(){ if (my_segment_ptr){ if (!my_mark_as_not_used){ publish_segment(*my_segment_ptr, segment_allocation_failed()); }else{ publish_segment(*my_segment_ptr, segment_not_used()); } } } }; segment_t* s = v.my_segment; // TODO: optimize out as argument? Optimize accesses to my_first_block __TBB_ASSERT(s[k].load() != segment_allocated(), "concurrent operation during growth?"); size_type size_of_enabled_segment = segment_size(k); size_type size_to_allocate = size_of_enabled_segment; if( !k ) { assign_first_segment_if_necessary(v, default_initial_segments-1); size_of_enabled_segment = 2 ; size_to_allocate = segment_size(v.my_first_block); } else { spin_wait_while_eq( v.my_first_block, segment_index_t(0) ); } if( k && (k < v.my_first_block)){ //no need to allocate anything // s[0].array is changed only once ( 0 -> !0 ) and points to uninitialized memory segment_value_t array0 = s[0].load(); if(array0 == segment_not_used()){ // sync_prepare called only if there is a wait ITT_NOTIFY(sync_prepare, &s[0]); spin_wait_while( segment_not_used_predicate(s[0])); array0 = s[0].load(); } ITT_NOTIFY(sync_acquired, &s[0]); if(array0 != segment_allocated()) { // check for segment_allocation_failed state of initial segment publish_segment(s[k], segment_allocation_failed()); // and assign segment_allocation_failed state here throw_exception(eid_bad_last_alloc); // throw custom exception } publish_segment( s[k], static_cast(array0.pointer() + segment_base(k)*element_size ) ); } else { segment_scope_guard k_segment_guard(s[k], mark_as_not_used_on_failure); publish_segment(s[k], allocate_segment(v, size_to_allocate)); k_segment_guard.dismiss(); } return size_of_enabled_segment; } void concurrent_vector_base_v3::helper::cleanup() { if( !sz ) { // allocation failed, restore the table segment_index_t k_start = k, k_end = segment_index_of(finish-1); if( segment_base( k_start ) < start ) get_segment_value(k_start++, true); // wait if( k_start < first_block ) { segment_value_t segment0 = get_segment_value(0, start>0); // wait if necessary if((segment0 != segment_not_used()) && !k_start ) ++k_start; if(segment0 != segment_allocated()) for(; k_start < first_block && k_start <= k_end; ++k_start ) publish_segment(table[k_start], segment_allocation_failed()); else for(; k_start < first_block && k_start <= k_end; ++k_start ) publish_segment(table[k_start], static_cast( (segment0.pointer()) + segment_base(k_start)*element_size) ); } for(; k_start <= k_end; ++k_start ) // not in first block if(table[k_start].load() == segment_not_used()) publish_segment(table[k_start], segment_allocation_failed()); // fill allocated items first_segment(); goto recover; } while( sz <= finish ) { // there is still work for at least one segment next_segment(); recover: segment_value_t array = table[k].load(); if(array == segment_allocated()) std::memset( (array.pointer()) + element_size*start, 0, ((sz() != segment_allocated(), "Segment should have been freed. Please recompile with new TBB before using exceptions."); #endif my_segment = my_storage; NFS_Free( s ); } } concurrent_vector_base_v3::size_type concurrent_vector_base_v3::internal_capacity() const { return segment_base( helper::find_segment_end(*this) ); } void concurrent_vector_base_v3::internal_throw_exception(size_type t) const { switch(t) { case 0: throw_exception(eid_out_of_range); case 1: throw_exception(eid_segment_range_error); case 2: throw_exception(eid_index_range_error); } } void concurrent_vector_base_v3::internal_reserve( size_type n, size_type element_size, size_type max_size ) { if( n>max_size ) throw_exception(eid_reservation_length_error); __TBB_ASSERT( n, NULL ); helper::assign_first_segment_if_necessary(*this, segment_index_of(n-1)); segment_index_t k = helper::find_segment_end(*this); for( ; segment_base(k)() != segment_allocated()) helper::enable_segment(*this, k, element_size, true ); //in case of failure mark segments as not used } } //TODO: Looks like atomic loads can be done relaxed here, as the only place this method is called from //is the constructor, which does not require synchronization (for more details see comment in the // concurrent_vector_base constructor). void concurrent_vector_base_v3::internal_copy( const concurrent_vector_base_v3& src, size_type element_size, internal_array_op2 copy ) { size_type n = src.my_early_size; __TBB_ASSERT( my_segment == my_storage, NULL); if( n ) { helper::assign_first_segment_if_necessary(*this, segment_index_of(n-1)); size_type b; for( segment_index_t k=0; (b=segment_base(k))() == src.my_storage && k >= pointers_per_short_table) || (src.my_segment[k].load() != segment_allocated())) { my_early_size = b; break; } helper::extend_table_if_necessary(*this, k, 0); size_type m = helper::enable_segment(*this, k, element_size); if( m > n-b ) m = n-b; my_early_size = b+m; copy( my_segment[k].load().pointer(), src.my_segment[k].load().pointer(), m ); } } } void concurrent_vector_base_v3::internal_assign( const concurrent_vector_base_v3& src, size_type element_size, internal_array_op1 destroy, internal_array_op2 assign, internal_array_op2 copy ) { size_type n = src.my_early_size; while( my_early_size>n ) { // TODO: improve segment_index_t k = segment_index_of( my_early_size-1 ); size_type b=segment_base(k); size_type new_end = b>=n ? b : n; __TBB_ASSERT( my_early_size>new_end, NULL ); if( my_segment[k].load() != segment_allocated()) // check vector was broken before throw_exception(eid_bad_last_alloc); // throw custom exception // destructors are supposed to not throw any exceptions destroy( my_segment[k].load().pointer() + element_size*(new_end-b), my_early_size-new_end ); my_early_size = new_end; } size_type dst_initialized_size = my_early_size; my_early_size = n; helper::assign_first_segment_if_necessary(*this, segment_index_of(n)); size_type b; for( segment_index_t k=0; (b=segment_base(k))() == src.my_storage && k >= pointers_per_short_table) || src.my_segment[k].load() != segment_allocated() ) { // if source is damaged my_early_size = b; break; // TODO: it may cause undestructed items } helper::extend_table_if_necessary(*this, k, 0); if( my_segment[k].load() == segment_not_used()) helper::enable_segment(*this, k, element_size); else if( my_segment[k].load() != segment_allocated() ) throw_exception(eid_bad_last_alloc); // throw custom exception size_type m = k? segment_size(k) : 2; if( m > n-b ) m = n-b; size_type a = 0; if( dst_initialized_size>b ) { a = dst_initialized_size-b; if( a>m ) a = m; assign( my_segment[k].load().pointer(), src.my_segment[k].load().pointer(), a ); m -= a; a *= element_size; } if( m>0 ) copy( my_segment[k].load().pointer() + a, src.my_segment[k].load().pointer() + a, m ); } __TBB_ASSERT( src.my_early_size==n, "detected use of concurrent_vector::operator= with right side that was concurrently modified" ); } void* concurrent_vector_base_v3::internal_push_back( size_type element_size, size_type& index ) { __TBB_ASSERT( sizeof(my_early_size)==sizeof(uintptr_t), NULL ); size_type tmp = my_early_size.fetch_and_increment(); index = tmp; segment_index_t k_old = segment_index_of( tmp ); size_type base = segment_base(k_old); helper::extend_table_if_necessary(*this, k_old, tmp); segment_t& s = helper::acquire_segment(*this, k_old, element_size, base==tmp); size_type j_begin = tmp-base; return (void*)(s.load().pointer() + element_size*j_begin); } void concurrent_vector_base_v3::internal_grow_to_at_least( size_type new_size, size_type element_size, internal_array_op2 init, const void *src ) { internal_grow_to_at_least_with_result( new_size, element_size, init, src ); } concurrent_vector_base_v3::size_type concurrent_vector_base_v3::internal_grow_to_at_least_with_result( size_type new_size, size_type element_size, internal_array_op2 init, const void *src ) { size_type e = my_early_size; while( e= pointers_per_short_table && my_segment == my_storage ) { spin_wait_while_eq( my_segment, my_storage ); } for( i = 0; i <= k_old; ++i ) { segment_t &s = my_segment[i]; if(s.load() == segment_not_used()) { ITT_NOTIFY(sync_prepare, &s); atomic_backoff backoff(true); while( my_segment[i].load() == segment_not_used() ) // my_segment may change concurrently backoff.pause(); ITT_NOTIFY(sync_acquired, &s); } if( my_segment[i].load() != segment_allocated() ) throw_exception(eid_bad_last_alloc); } #if TBB_USE_DEBUG size_type capacity = internal_capacity(); __TBB_ASSERT( capacity >= new_size, NULL); #endif return e; } concurrent_vector_base_v3::size_type concurrent_vector_base_v3::internal_grow_by( size_type delta, size_type element_size, internal_array_op2 init, const void *src ) { size_type result = my_early_size.fetch_and_add(delta); internal_grow( result, result+delta, element_size, init, src ); return result; } void concurrent_vector_base_v3::internal_grow( const size_type start, size_type finish, size_type element_size, internal_array_op2 init, const void *src ) { __TBB_ASSERT( start k_start && k_end >= range.first_block; --k_end ) // allocate segments in reverse order helper::acquire_segment(*this, k_end, element_size, true/*for k_end>k_start*/); for(; k_start <= k_end; ++k_start ) // but allocate first block in straight order helper::acquire_segment(*this, k_start, element_size, segment_base( k_start ) >= start ); range.apply( helper::init_body(init, src) ); } void concurrent_vector_base_v3::internal_resize( size_type n, size_type element_size, size_type max_size, const void *src, internal_array_op1 destroy, internal_array_op2 init ) { size_type j = my_early_size; if( n > j ) { // construct items internal_reserve(n, element_size, max_size); my_early_size = n; helper for_each(my_segment, my_first_block, element_size, segment_index_of(j), j, n); for_each.apply( helper::safe_init_body(init, src) ); } else { my_early_size = n; helper for_each(my_segment, my_first_block, element_size, segment_index_of(n), n, j); for_each.apply( helper::destroy_body(destroy) ); } } concurrent_vector_base_v3::segment_index_t concurrent_vector_base_v3::internal_clear( internal_array_op1 destroy ) { __TBB_ASSERT( my_segment, NULL ); size_type j = my_early_size; my_early_size = 0; helper for_each(my_segment, my_first_block, 0, 0, 0, j); // element_size is safe to be zero if 'start' is zero j = for_each.apply( helper::destroy_body(destroy) ); size_type i = helper::find_segment_end(*this); return j < i? i : j+1; } void *concurrent_vector_base_v3::internal_compact( size_type element_size, void *table, internal_array_op1 destroy, internal_array_op2 copy ) { const size_type my_size = my_early_size; const segment_index_t k_end = helper::find_segment_end(*this); // allocated segments const segment_index_t k_stop = my_size? segment_index_of(my_size-1) + 1 : 0; // number of segments to store existing items: 0=>0; 1,2=>1; 3,4=>2; [5-8]=>3;.. const segment_index_t first_block = my_first_block; // number of merged segments, getting values from atomics segment_index_t k = first_block; if(k_stop < first_block) k = k_stop; else while (k < k_stop && helper::incompact_predicate(segment_size( k ) * element_size) ) k++; if(k_stop == k_end && k == first_block) return NULL; segment_t *const segment_table = my_segment; internal_segments_table &old = *static_cast( table ); //this call is left here for sake of backward compatibility, and as a placeholder for table initialization std::fill_n(old.table,sizeof(old.table)/sizeof(old.table[0]),segment_t()); old.first_block=0; if ( k != first_block && k ) // first segment optimization { // exception can occur here void *seg = helper::allocate_segment(*this, segment_size(k)); old.table[0].store(seg); old.first_block = k; // fill info for freeing new segment if exception occurs // copy items to the new segment size_type my_segment_size = segment_size( first_block ); for (segment_index_t i = 0, j = 0; i < k && j < my_size; j = my_segment_size) { __TBB_ASSERT( segment_table[i].load() == segment_allocated(), NULL); void *s = static_cast( static_cast(seg) + segment_base(i)*element_size ); //TODO: refactor to use std::min if(j + my_segment_size >= my_size) my_segment_size = my_size - j; __TBB_TRY { // exception can occur here copy( s, segment_table[i].load().pointer(), my_segment_size ); } __TBB_CATCH(...) { // destroy all the already copied items helper for_each(&old.table[0], old.first_block, element_size, 0, 0, segment_base(i)+ my_segment_size); for_each.apply( helper::destroy_body(destroy) ); __TBB_RETHROW(); } my_segment_size = i? segment_size( ++i ) : segment_size( i = first_block ); } // commit the changes std::copy(segment_table,segment_table + k,old.table); for (segment_index_t i = 0; i < k; i++) { segment_table[i].store(static_cast( static_cast(seg) + segment_base(i)*element_size )); } old.first_block = first_block; my_first_block = k; // now, first_block != my_first_block // destroy original copies my_segment_size = segment_size( first_block ); // old.first_block actually for (segment_index_t i = 0, j = 0; i < k && j < my_size; j = my_segment_size) { if(j + my_segment_size >= my_size) my_segment_size = my_size - j; // destructors are supposed to not throw any exceptions destroy( old.table[i].load().pointer(), my_segment_size ); my_segment_size = i? segment_size( ++i ) : segment_size( i = first_block ); } } // free unnecessary segments allocated by reserve() call if ( k_stop < k_end ) { old.first_block = first_block; std::copy(segment_table+k_stop, segment_table+k_end, old.table+k_stop ); std::fill_n(segment_table+k_stop, (k_end-k_stop), segment_t()); if( !k ) my_first_block = 0; } return table; } void concurrent_vector_base_v3::internal_swap(concurrent_vector_base_v3& v) { size_type my_sz = my_early_size.load(); size_type v_sz = v.my_early_size.load(); if(!my_sz && !v_sz) return; bool my_was_short = (my_segment.load() == my_storage); bool v_was_short = (v.my_segment.load() == v.my_storage); //In C++11, this would be: swap(my_storage, v.my_storage); for (int i=0; i < pointers_per_short_table; ++i){ swap(my_storage[i], v.my_storage[i]); } tbb::internal::swap(my_first_block, v.my_first_block); tbb::internal::swap(my_segment, v.my_segment); if (my_was_short){ v.my_segment.store(v.my_storage); } if(v_was_short){ my_segment.store(my_storage); } my_early_size.store(v_sz); v.my_early_size.store(my_sz); } } // namespace internal } // tbb ================================================ FILE: benchmarks/tbb/concurrent_vector.h ================================================ /* Copyright 2005-2014 Intel Corporation. All Rights Reserved. This file is part of Threading Building Blocks. Threading Building Blocks is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. Threading Building Blocks is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Threading Building Blocks; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA As a special exception, you may use this file as part of a free software library without restriction. Specifically, if other files instantiate templates or use macros or inline functions from this file, or you compile this file and link it with other files to produce an executable, this file does not by itself cause the resulting executable to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the executable file might be covered by the GNU General Public License. */ #ifndef __TBB_concurrent_vector_H #define __TBB_concurrent_vector_H #include "tbb_stddef.h" #include "tbb_exception.h" #include "atomic.h" #include "cache_aligned_allocator.h" #include "blocked_range.h" #include "tbb_machine.h" #include "tbb_profiling.h" #include #include // for memset() #if !TBB_USE_EXCEPTIONS && _MSC_VER // Suppress "C++ exception handler used, but unwind semantics are not enabled" warning in STL headers #pragma warning (push) #pragma warning (disable: 4530) #endif #include #include #if !TBB_USE_EXCEPTIONS && _MSC_VER #pragma warning (pop) #endif #if _MSC_VER==1500 && !__INTEL_COMPILER // VS2008/VC9 seems to have an issue; limits pull in math.h #pragma warning( push ) #pragma warning( disable: 4985 ) #endif #include /* std::numeric_limits */ #if _MSC_VER==1500 && !__INTEL_COMPILER #pragma warning( pop ) #endif #if __TBB_INITIALIZER_LISTS_PRESENT #include #endif #if defined(_MSC_VER) && !defined(__INTEL_COMPILER) // Workaround for overzealous compiler warnings in /Wp64 mode #pragma warning (push) #if defined(_Wp64) #pragma warning (disable: 4267) #endif #pragma warning (disable: 4127) //warning C4127: conditional expression is constant #endif namespace tbb { template > class concurrent_vector; template class vector_iterator; //! @cond INTERNAL namespace internal { //! Bad allocation marker static void *const vector_allocation_error_flag = reinterpret_cast(size_t(63)); //! Exception helper function template void handle_unconstructed_elements(T* array, size_t n_of_elements){ std::memset(array, 0, n_of_elements * sizeof(T)); } //! Base class of concurrent vector implementation. /** @ingroup containers */ class concurrent_vector_base_v3 { protected: // Basic types declarations typedef size_t segment_index_t; typedef size_t size_type; // Using enumerations due to Mac linking problems of static const variables enum { // Size constants default_initial_segments = 1, // 2 initial items //! Number of slots for segment pointers inside the class pointers_per_short_table = 3, // to fit into 8 words of entire structure pointers_per_long_table = sizeof(segment_index_t) * 8 // one segment per bit }; struct segment_not_used {}; struct segment_allocated {}; struct segment_allocation_failed {}; class segment_t; class segment_value_t { void* array; private: //TODO: More elegant way to grant access to selected functions _only_? friend class segment_t; explicit segment_value_t(void* an_array):array(an_array) {} public: friend bool operator==(segment_value_t const& lhs, segment_not_used ) { return lhs.array == 0;} friend bool operator==(segment_value_t const& lhs, segment_allocated) { return lhs.array > internal::vector_allocation_error_flag;} friend bool operator==(segment_value_t const& lhs, segment_allocation_failed) { return lhs.array == internal::vector_allocation_error_flag;} template friend bool operator!=(segment_value_t const& lhs, argument_type arg) { return ! (lhs == arg);} template T* pointer() const { return static_cast(const_cast(array)); } }; // Segment pointer. class segment_t { atomic array; public: segment_t(){ store(segment_not_used());} //Copy ctor and assignment operator are defined to ease using of stl algorithms. //These algorithms usually not a synchronization point, so, semantic is //intentionally relaxed here. segment_t(segment_t const& rhs ){ array.store(rhs.array.load());} void swap(segment_t & rhs ){ tbb::internal::swap(array, rhs.array); } segment_t& operator=(segment_t const& rhs ){ array.store(rhs.array.load()); return *this; } template segment_value_t load() const { return segment_value_t(array.load());} template void store(segment_not_used) { array.store(0); } template void store(segment_allocation_failed) { __TBB_ASSERT(load() != segment_allocated(),"transition from \"allocated\" to \"allocation failed\" state looks non-logical"); array.store(internal::vector_allocation_error_flag); } template void store(void* allocated_segment_pointer) __TBB_NOEXCEPT(true) { __TBB_ASSERT(segment_value_t(allocated_segment_pointer) == segment_allocated(), "other overloads of store should be used for marking segment as not_used or allocation_failed" ); array.store(allocated_segment_pointer); } #if TBB_USE_ASSERT ~segment_t() { __TBB_ASSERT(load() != segment_allocated(), "should have been freed by clear" ); } #endif /* TBB_USE_ASSERT */ }; friend void swap(segment_t & , segment_t & ) __TBB_NOEXCEPT(true); // Data fields //! allocator function pointer void* (*vector_allocator_ptr)(concurrent_vector_base_v3 &, size_t); //! count of segments in the first block atomic my_first_block; //! Requested size of vector atomic my_early_size; //! Pointer to the segments table atomic my_segment; //! embedded storage of segment pointers segment_t my_storage[pointers_per_short_table]; // Methods concurrent_vector_base_v3() { //Here the semantic is intentionally relaxed. //The reason this is next: //Object that is in middle of construction (i.e. its constructor is not yet finished) //cannot be used concurrently until the construction is finished. //Thus to flag other threads that construction is finished, some synchronization with //acquire-release semantic should be done by the (external) code that uses the vector. //So, no need to do the synchronization inside the vector. my_early_size.store(0); my_first_block.store(0); // here is not default_initial_segments my_segment.store(my_storage); } __TBB_EXPORTED_METHOD ~concurrent_vector_base_v3(); //these helpers methods use the fact that segments are allocated so //that every segment size is a (increasing) power of 2. //with one exception 0 segment has size of 2 as well segment 1; //e.g. size of segment with index of 3 is 2^3=8; static segment_index_t segment_index_of( size_type index ) { return segment_index_t( __TBB_Log2( index|1 ) ); } static segment_index_t segment_base( segment_index_t k ) { return (segment_index_t(1)< friend class vector_iterator; }; inline void swap(concurrent_vector_base_v3::segment_t & lhs, concurrent_vector_base_v3::segment_t & rhs) __TBB_NOEXCEPT(true) { lhs.swap(rhs); } typedef concurrent_vector_base_v3 concurrent_vector_base; //! Meets requirements of a forward iterator for STL and a Value for a blocked_range.*/ /** Value is either the T or const T type of the container. @ingroup containers */ template class vector_iterator { //! concurrent_vector over which we are iterating. Container* my_vector; //! Index into the vector size_t my_index; //! Caches my_vector->internal_subscript(my_index) /** NULL if cached value is not available */ mutable Value* my_item; template friend vector_iterator operator+( ptrdiff_t offset, const vector_iterator& v ); template friend bool operator==( const vector_iterator& i, const vector_iterator& j ); template friend bool operator<( const vector_iterator& i, const vector_iterator& j ); template friend ptrdiff_t operator-( const vector_iterator& i, const vector_iterator& j ); template friend class internal::vector_iterator; #if !defined(_MSC_VER) || defined(__INTEL_COMPILER) template friend class tbb::concurrent_vector; #else public: // workaround for MSVC #endif vector_iterator( const Container& vector, size_t index, void *ptr = 0 ) : my_vector(const_cast(&vector)), my_index(index), my_item(static_cast(ptr)) {} public: //! Default constructor vector_iterator() : my_vector(NULL), my_index(~size_t(0)), my_item(NULL) {} vector_iterator( const vector_iterator& other ) : my_vector(other.my_vector), my_index(other.my_index), my_item(other.my_item) {} vector_iterator operator+( ptrdiff_t offset ) const { return vector_iterator( *my_vector, my_index+offset ); } vector_iterator &operator+=( ptrdiff_t offset ) { my_index+=offset; my_item = NULL; return *this; } vector_iterator operator-( ptrdiff_t offset ) const { return vector_iterator( *my_vector, my_index-offset ); } vector_iterator &operator-=( ptrdiff_t offset ) { my_index-=offset; my_item = NULL; return *this; } Value& operator*() const { Value* item = my_item; if( !item ) { item = my_item = &my_vector->internal_subscript(my_index); } __TBB_ASSERT( item==&my_vector->internal_subscript(my_index), "corrupt cache" ); return *item; } Value& operator[]( ptrdiff_t k ) const { return my_vector->internal_subscript(my_index+k); } Value* operator->() const {return &operator*();} //! Pre increment vector_iterator& operator++() { size_t element_index = ++my_index; if( my_item ) { //TODO: consider using of knowledge about "first_block optimization" here as well? if( concurrent_vector_base::is_first_element_in_segment(element_index)) { //if the iterator crosses a segment boundary, the pointer become invalid //as possibly next segment is in another memory location my_item= NULL; } else { ++my_item; } } return *this; } //! Pre decrement vector_iterator& operator--() { __TBB_ASSERT( my_index>0, "operator--() applied to iterator already at beginning of concurrent_vector" ); size_t element_index = my_index--; if( my_item ) { if(concurrent_vector_base::is_first_element_in_segment(element_index)) { //if the iterator crosses a segment boundary, the pointer become invalid //as possibly next segment is in another memory location my_item= NULL; } else { --my_item; } } return *this; } //! Post increment vector_iterator operator++(int) { vector_iterator result = *this; operator++(); return result; } //! Post decrement vector_iterator operator--(int) { vector_iterator result = *this; operator--(); return result; } // STL support typedef ptrdiff_t difference_type; typedef Value value_type; typedef Value* pointer; typedef Value& reference; typedef std::random_access_iterator_tag iterator_category; }; template vector_iterator operator+( ptrdiff_t offset, const vector_iterator& v ) { return vector_iterator( *v.my_vector, v.my_index+offset ); } template bool operator==( const vector_iterator& i, const vector_iterator& j ) { return i.my_index==j.my_index && i.my_vector == j.my_vector; } template bool operator!=( const vector_iterator& i, const vector_iterator& j ) { return !(i==j); } template bool operator<( const vector_iterator& i, const vector_iterator& j ) { return i.my_index bool operator>( const vector_iterator& i, const vector_iterator& j ) { return j bool operator>=( const vector_iterator& i, const vector_iterator& j ) { return !(i bool operator<=( const vector_iterator& i, const vector_iterator& j ) { return !(j ptrdiff_t operator-( const vector_iterator& i, const vector_iterator& j ) { return ptrdiff_t(i.my_index)-ptrdiff_t(j.my_index); } template class allocator_base { public: typedef typename A::template rebind::other allocator_type; allocator_type my_allocator; allocator_base(const allocator_type &a = allocator_type() ) : my_allocator(a) {} }; } // namespace internal //! @endcond //! Concurrent vector container /** concurrent_vector is a container having the following main properties: - It provides random indexed access to its elements. The index of the first element is 0. - It ensures safe concurrent growing its size (different threads can safely append new elements). - Adding new elements does not invalidate existing iterators and does not change indices of existing items. @par Compatibility The class meets all Container Requirements and Reversible Container Requirements from C++ Standard (See ISO/IEC 14882:2003(E), clause 23.1). But it doesn't meet Sequence Requirements due to absence of insert() and erase() methods. @par Exception Safety Methods working with memory allocation and/or new elements construction can throw an exception if allocator fails to allocate memory or element's default constructor throws one. Concurrent vector's element of type T must conform to the following requirements: - Throwing an exception is forbidden for destructor of T. - Default constructor of T must not throw an exception OR its non-virtual destructor must safely work when its object memory is zero-initialized. . Otherwise, the program's behavior is undefined. @par If an exception happens inside growth or assignment operation, an instance of the vector becomes invalid unless it is stated otherwise in the method documentation. Invalid state means: - There are no guarantees that all items were initialized by a constructor. The rest of items is zero-filled, including item where exception happens. - An invalid vector instance cannot be repaired; it is unable to grow anymore. - Size and capacity reported by the vector are incorrect, and calculated as if the failed operation were successful. - Attempt to access not allocated elements using operator[] or iterators results in access violation or segmentation fault exception, and in case of using at() method a C++ exception is thrown. . If a concurrent grow operation successfully completes, all the elements it has added to the vector will remain valid and accessible even if one of subsequent grow operations fails. @par Fragmentation Unlike an STL vector, a concurrent_vector does not move existing elements if it needs to allocate more memory. The container is divided into a series of contiguous arrays of elements. The first reservation, growth, or assignment operation determines the size of the first array. Using small number of elements as initial size incurs fragmentation that may increase element access time. Internal layout can be optimized by method compact() that merges several smaller arrays into one solid. @par Changes since TBB 2.1 - Fixed guarantees of concurrent_vector::size() and grow_to_at_least() methods to assure elements are allocated. - Methods end()/rbegin()/back() are partly thread-safe since they use size() to get the end of vector - Added resize() methods (not thread-safe) - Added cbegin/cend/crbegin/crend methods - Changed return type of methods grow* and push_back to iterator @par Changes since TBB 2.0 - Implemented exception-safety guarantees - Added template argument for allocator - Added allocator argument in constructors - Faster index calculation - First growth call specifies a number of segments to be merged in the first allocation. - Fixed memory blow up for swarm of vector's instances of small size - Added grow_by(size_type n, const_reference t) growth using copying constructor to init new items. - Added STL-like constructors. - Added operators ==, < and derivatives - Added at() method, approved for using after an exception was thrown inside the vector - Added get_allocator() method. - Added assign() methods - Added compact() method to defragment first segments - Added swap() method - range() defaults on grainsize = 1 supporting auto grainsize algorithms. @ingroup containers */ template class concurrent_vector: protected internal::allocator_base, private internal::concurrent_vector_base { private: template class generic_range_type: public blocked_range { public: typedef T value_type; typedef T& reference; typedef const T& const_reference; typedef I iterator; typedef ptrdiff_t difference_type; generic_range_type( I begin_, I end_, size_t grainsize_ = 1) : blocked_range(begin_,end_,grainsize_) {} template generic_range_type( const generic_range_type& r) : blocked_range(r.begin(),r.end(),r.grainsize()) {} generic_range_type( generic_range_type& r, split ) : blocked_range(r,split()) {} }; template friend class internal::vector_iterator; public: //------------------------------------------------------------------------ // STL compatible types //------------------------------------------------------------------------ typedef internal::concurrent_vector_base_v3::size_type size_type; typedef typename internal::allocator_base::allocator_type allocator_type; typedef T value_type; typedef ptrdiff_t difference_type; typedef T& reference; typedef const T& const_reference; typedef T *pointer; typedef const T *const_pointer; typedef internal::vector_iterator iterator; typedef internal::vector_iterator const_iterator; #if !defined(_MSC_VER) || _CPPLIB_VER>=300 // Assume ISO standard definition of std::reverse_iterator typedef std::reverse_iterator reverse_iterator; typedef std::reverse_iterator const_reverse_iterator; #else // Use non-standard std::reverse_iterator typedef std::reverse_iterator reverse_iterator; typedef std::reverse_iterator const_reverse_iterator; #endif /* defined(_MSC_VER) && (_MSC_VER<1300) */ //------------------------------------------------------------------------ // Parallel algorithm support //------------------------------------------------------------------------ typedef generic_range_type range_type; typedef generic_range_type const_range_type; //------------------------------------------------------------------------ // STL compatible constructors & destructors //------------------------------------------------------------------------ //! Construct empty vector. explicit concurrent_vector(const allocator_type &a = allocator_type()) : internal::allocator_base(a), internal::concurrent_vector_base() { vector_allocator_ptr = &internal_allocator; } //Constructors are not required to have synchronization //(for more details see comment in the concurrent_vector_base constructor). #if __TBB_INITIALIZER_LISTS_PRESENT //! Constructor from initializer_list concurrent_vector(std::initializer_list init_list, const allocator_type &a = allocator_type()) : internal::allocator_base(a), internal::concurrent_vector_base() { vector_allocator_ptr = &internal_allocator; __TBB_TRY { internal_assign_iterators(init_list.begin(), init_list.end()); } __TBB_CATCH(...) { segment_t *table = my_segment.load();; internal_free_segments( table, internal_clear(&destroy_array), my_first_block.load()); __TBB_RETHROW(); } } #endif //# __TBB_INITIALIZER_LISTS_PRESENT //! Copying constructor concurrent_vector( const concurrent_vector& vector, const allocator_type& a = allocator_type() ) : internal::allocator_base(a), internal::concurrent_vector_base() { vector_allocator_ptr = &internal_allocator; __TBB_TRY { internal_copy(vector, sizeof(T), ©_array); } __TBB_CATCH(...) { segment_t *table = my_segment.load(); internal_free_segments( table, internal_clear(&destroy_array), my_first_block.load()); __TBB_RETHROW(); } } #if __TBB_CPP11_RVALUE_REF_PRESENT //! Move constructor //TODO add __TBB_NOEXCEPT(true) and static_assert(std::has_nothrow_move_constructor::value) concurrent_vector( concurrent_vector&& source) : internal::allocator_base(std::move(source)), internal::concurrent_vector_base() { vector_allocator_ptr = &internal_allocator; concurrent_vector_base_v3::internal_swap(source); } concurrent_vector( concurrent_vector&& source, const allocator_type& a) : internal::allocator_base(a), internal::concurrent_vector_base() { vector_allocator_ptr = &internal_allocator; //C++ standard requires instances of an allocator being compared for equality, //which means that memory allocated by one instance is possible to deallocate with the other one. if (a == source.my_allocator) { concurrent_vector_base_v3::internal_swap(source); } else { __TBB_TRY { internal_copy(source, sizeof(T), &move_array); } __TBB_CATCH(...) { segment_t *table = my_segment.load(); internal_free_segments( table, internal_clear(&destroy_array), my_first_block.load()); __TBB_RETHROW(); } } } #endif //! Copying constructor for vector with different allocator type template concurrent_vector( const concurrent_vector& vector, const allocator_type& a = allocator_type() ) : internal::allocator_base(a), internal::concurrent_vector_base() { vector_allocator_ptr = &internal_allocator; __TBB_TRY { internal_copy(vector.internal_vector_base(), sizeof(T), ©_array); } __TBB_CATCH(...) { segment_t *table = my_segment.load(); internal_free_segments( table, internal_clear(&destroy_array), my_first_block.load() ); __TBB_RETHROW(); } } //! Construction with initial size specified by argument n explicit concurrent_vector(size_type n) { vector_allocator_ptr = &internal_allocator; __TBB_TRY { internal_resize( n, sizeof(T), max_size(), NULL, &destroy_array, &initialize_array ); } __TBB_CATCH(...) { segment_t *table = my_segment.load(); internal_free_segments( table, internal_clear(&destroy_array), my_first_block.load() ); __TBB_RETHROW(); } } //! Construction with initial size specified by argument n, initialization by copying of t, and given allocator instance concurrent_vector(size_type n, const_reference t, const allocator_type& a = allocator_type()) : internal::allocator_base(a) { vector_allocator_ptr = &internal_allocator; __TBB_TRY { internal_resize( n, sizeof(T), max_size(), static_cast(&t), &destroy_array, &initialize_array_by ); } __TBB_CATCH(...) { segment_t *table = my_segment.load(); internal_free_segments( table, internal_clear(&destroy_array), my_first_block.load() ); __TBB_RETHROW(); } } //! Construction with copying iteration range and given allocator instance template concurrent_vector(I first, I last, const allocator_type &a = allocator_type()) : internal::allocator_base(a) { vector_allocator_ptr = &internal_allocator; __TBB_TRY { internal_assign_range(first, last, static_cast::is_integer> *>(0) ); } __TBB_CATCH(...) { segment_t *table = my_segment.load(); internal_free_segments( table, internal_clear(&destroy_array), my_first_block.load() ); __TBB_RETHROW(); } } //! Assignment concurrent_vector& operator=( const concurrent_vector& vector ) { if( this != &vector ) internal_assign(vector, sizeof(T), &destroy_array, &assign_array, ©_array); return *this; } #if __TBB_CPP11_RVALUE_REF_PRESENT //TODO: add __TBB_NOEXCEPT() //! Move assignment concurrent_vector& operator=( concurrent_vector&& other ) { __TBB_ASSERT(this != &other, "Move assignment to itself is prohibited "); typedef typename tbb::internal::allocator_traits::propagate_on_container_move_assignment pocma_t; if(pocma_t::value || this->my_allocator == other.my_allocator) { concurrent_vector trash (std::move(*this)); internal_swap(other); if (pocma_t::value) { this->my_allocator = std::move(other.my_allocator); } } else { internal_assign(other, sizeof(T), &destroy_array, &move_assign_array, &move_array); } return *this; } #endif //TODO: add an template assignment operator? (i.e. with different element type) //! Assignment for vector with different allocator type template concurrent_vector& operator=( const concurrent_vector& vector ) { if( static_cast( this ) != static_cast( &vector ) ) internal_assign(vector.internal_vector_base(), sizeof(T), &destroy_array, &assign_array, ©_array); return *this; } #if __TBB_INITIALIZER_LISTS_PRESENT //! Assignment for initializer_list concurrent_vector& operator=( std::initializer_list init_list ) { internal_clear(&destroy_array); internal_assign_iterators(init_list.begin(), init_list.end()); return *this; } #endif //#if __TBB_INITIALIZER_LISTS_PRESENT //------------------------------------------------------------------------ // Concurrent operations //------------------------------------------------------------------------ //! Grow by "delta" elements. /** Returns iterator pointing to the first new element. */ iterator grow_by( size_type delta ) { return iterator(*this, delta ? internal_grow_by( delta, sizeof(T), &initialize_array, NULL ) : my_early_size.load()); } //! Grow by "delta" elements using copying constructor. /** Returns iterator pointing to the first new element. */ iterator grow_by( size_type delta, const_reference t ) { return iterator(*this, delta ? internal_grow_by( delta, sizeof(T), &initialize_array_by, static_cast(&t) ) : my_early_size.load()); } /** Returns iterator pointing to the first new element. */ template iterator grow_by( I first, I last ) { typename std::iterator_traits::difference_type delta = std::distance(first, last); __TBB_ASSERT( delta >= 0, NULL); return iterator(*this, delta ? internal_grow_by(delta, sizeof(T), ©_range, static_cast(&first)) : my_early_size.load()); } #if __TBB_INITIALIZER_LISTS_PRESENT /** Returns iterator pointing to the first new element. */ iterator grow_by( std::initializer_list init_list ) { return grow_by( init_list.begin(), init_list.end() ); } #endif //#if __TBB_INITIALIZER_LISTS_PRESENT //! Append minimal sequence of elements such that size()>=n. /** The new elements are default constructed. Blocks until all elements in range [0..n) are allocated. May return while other elements are being constructed by other threads. Returns iterator that points to beginning of appended sequence. If no elements were appended, returns iterator pointing to nth element. */ iterator grow_to_at_least( size_type n ) { size_type m=0; if( n ) { m = internal_grow_to_at_least_with_result( n, sizeof(T), &initialize_array, NULL ); if( m>n ) m=n; } return iterator(*this, m); }; /** Analogous to grow_to_at_least( size_type n ) with exception that the new elements are initialized by copying of t instead of default construction. */ iterator grow_to_at_least( size_type n, const_reference t ) { size_type m=0; if( n ) { m = internal_grow_to_at_least_with_result( n, sizeof(T), &initialize_array_by, &t); if( m>n ) m=n; } return iterator(*this, m); }; //! Push item /** Returns iterator pointing to the new element. */ iterator push_back( const_reference item ) { size_type k; T* ptr = static_cast(internal_push_back(sizeof(T),k)); element_construction_guard g(ptr); new(ptr) T(item); g.dismiss(); return iterator(*this, k, ptr); } #if __TBB_CPP11_RVALUE_REF_PRESENT //! Push item, move-aware /** Returns iterator pointing to the new element. */ iterator push_back( T&& item ) { size_type k; T* ptr = static_cast(internal_push_back(sizeof(T),k)); element_construction_guard g(ptr); new(ptr) T(std::move(item)); g.dismiss(); return iterator(*this, k, ptr); } #if __TBB_CPP11_VARIADIC_TEMPLATES_PRESENT //! Push item, create item "in place" with provided arguments /** Returns iterator pointing to the new element. */ template iterator emplace_back( Args&&... args) { size_type k; T* ptr = static_cast(internal_push_back(sizeof(T),k)); element_construction_guard g(ptr); new(ptr) T( std::forward(args)...); g.dismiss(); return iterator(*this, k, ptr); } #endif //__TBB_CPP11_VARIADIC_TEMPLATES_PRESENT #endif //__TBB_CPP11_RVALUE_REF_PRESENT //! Get reference to element at given index. /** This method is thread-safe for concurrent reads, and also while growing the vector, as long as the calling thread has checked that index < size(). */ reference operator[]( size_type index ) { return internal_subscript(index); } //! Get const reference to element at given index. const_reference operator[]( size_type index ) const { return internal_subscript(index); } //! Get reference to element at given index. Throws exceptions on errors. reference at( size_type index ) { return internal_subscript_with_exceptions(index); } //! Get const reference to element at given index. Throws exceptions on errors. const_reference at( size_type index ) const { return internal_subscript_with_exceptions(index); } //! Get range for iterating with parallel algorithms range_type range( size_t grainsize = 1 ) { return range_type( begin(), end(), grainsize ); } //! Get const range for iterating with parallel algorithms const_range_type range( size_t grainsize = 1 ) const { return const_range_type( begin(), end(), grainsize ); } //------------------------------------------------------------------------ // Capacity //------------------------------------------------------------------------ //! Return size of vector. It may include elements under construction size_type size() const { size_type sz = my_early_size, cp = internal_capacity(); return cp < sz ? cp : sz; } //! Return false if vector is not empty or has elements under construction at least. bool empty() const {return !my_early_size;} //! Maximum size to which array can grow without allocating more memory. Concurrent allocations are not included in the value. size_type capacity() const {return internal_capacity();} //! Allocate enough space to grow to size n without having to allocate more memory later. /** Like most of the methods provided for STL compatibility, this method is *not* thread safe. The capacity afterwards may be bigger than the requested reservation. */ void reserve( size_type n ) { if( n ) internal_reserve(n, sizeof(T), max_size()); } //! Resize the vector. Not thread-safe. void resize( size_type n ) { internal_resize( n, sizeof(T), max_size(), NULL, &destroy_array, &initialize_array ); } //! Resize the vector, copy t for new elements. Not thread-safe. void resize( size_type n, const_reference t ) { internal_resize( n, sizeof(T), max_size(), static_cast(&t), &destroy_array, &initialize_array_by ); } //! Optimize memory usage and fragmentation. void shrink_to_fit(); //! Upper bound on argument to reserve. size_type max_size() const {return (~size_type(0))/sizeof(T);} //------------------------------------------------------------------------ // STL support //------------------------------------------------------------------------ //! start iterator iterator begin() {return iterator(*this,0);} //! end iterator iterator end() {return iterator(*this,size());} //! start const iterator const_iterator begin() const {return const_iterator(*this,0);} //! end const iterator const_iterator end() const {return const_iterator(*this,size());} //! start const iterator const_iterator cbegin() const {return const_iterator(*this,0);} //! end const iterator const_iterator cend() const {return const_iterator(*this,size());} //! reverse start iterator reverse_iterator rbegin() {return reverse_iterator(end());} //! reverse end iterator reverse_iterator rend() {return reverse_iterator(begin());} //! reverse start const iterator const_reverse_iterator rbegin() const {return const_reverse_iterator(end());} //! reverse end const iterator const_reverse_iterator rend() const {return const_reverse_iterator(begin());} //! reverse start const iterator const_reverse_iterator crbegin() const {return const_reverse_iterator(end());} //! reverse end const iterator const_reverse_iterator crend() const {return const_reverse_iterator(begin());} //! the first item reference front() { __TBB_ASSERT( size()>0, NULL); return (my_segment[0].template load().template pointer())[0]; } //! the first item const const_reference front() const { __TBB_ASSERT( size()>0, NULL); return static_cast(my_segment[0].array)[0]; } //! the last item reference back() { __TBB_ASSERT( size()>0, NULL); return internal_subscript( size()-1 ); } //! the last item const const_reference back() const { __TBB_ASSERT( size()>0, NULL); return internal_subscript( size()-1 ); } //! return allocator object allocator_type get_allocator() const { return this->my_allocator; } //! assign n items by copying t item void assign(size_type n, const_reference t) { clear(); internal_resize( n, sizeof(T), max_size(), static_cast(&t), &destroy_array, &initialize_array_by ); } //! assign range [first, last) template void assign(I first, I last) { clear(); internal_assign_range( first, last, static_cast::is_integer> *>(0) ); } #if __TBB_INITIALIZER_LISTS_PRESENT //! assigns an initializer list void assign(std::initializer_list init_list) { clear(); internal_assign_iterators( init_list.begin(), init_list.end()); } #endif //# __TBB_INITIALIZER_LISTS_PRESENT //! swap two instances void swap(concurrent_vector &vector) { using std::swap; if( this != &vector ) { concurrent_vector_base_v3::internal_swap(static_cast(vector)); swap(this->my_allocator, vector.my_allocator); } } //! Clear container while keeping memory allocated. /** To free up the memory, use in conjunction with method compact(). Not thread safe **/ void clear() { internal_clear(&destroy_array); } //! Clear and destroy vector. ~concurrent_vector() { segment_t *table = my_segment.load(); internal_free_segments( table, internal_clear(&destroy_array), my_first_block.load() ); // base class destructor call should be then } const internal::concurrent_vector_base_v3 &internal_vector_base() const { return *this; } private: //! Allocate k items static void *internal_allocator(internal::concurrent_vector_base_v3 &vb, size_t k) { return static_cast&>(vb).my_allocator.allocate(k); } //! Free k segments from table void internal_free_segments(segment_t table[], segment_index_t k, segment_index_t first_block); //! Get reference to element at given index. T& internal_subscript( size_type index ) const; //! Get reference to element at given index with errors checks T& internal_subscript_with_exceptions( size_type index ) const; //! assign n items by copying t void internal_assign_n(size_type n, const_pointer p) { internal_resize( n, sizeof(T), max_size(), static_cast(p), &destroy_array, p? &initialize_array_by : &initialize_array ); } //! helper class template class is_integer_tag; //! assign integer items by copying when arguments are treated as iterators. See C++ Standard 2003 23.1.1p9 template void internal_assign_range(I first, I last, is_integer_tag *) { internal_assign_n(static_cast(first), &static_cast(last)); } //! inline proxy assign by iterators template void internal_assign_range(I first, I last, is_integer_tag *) { internal_assign_iterators(first, last); } //! assign by iterators template void internal_assign_iterators(I first, I last); //these functions are marked __TBB_EXPORTED_FUNC as they are called from within the library //! Construct n instances of T, starting at "begin". static void __TBB_EXPORTED_FUNC initialize_array( void* begin, const void*, size_type n ); //! Copy-construct n instances of T, starting at "begin". static void __TBB_EXPORTED_FUNC initialize_array_by( void* begin, const void* src, size_type n ); //! Copy-construct n instances of T by copying single element pointed to by src, starting at "dst". static void __TBB_EXPORTED_FUNC copy_array( void* dst, const void* src, size_type n ); #if __TBB_CPP11_RVALUE_REF_PRESENT //! Move-construct n instances of T, starting at "dst" by copying according element of src array. static void __TBB_EXPORTED_FUNC move_array( void* dst, const void* src, size_type n ); //! Move-assign (using operator=) n instances of T, starting at "dst" by assigning according element of src array. static void __TBB_EXPORTED_FUNC move_assign_array( void* dst, const void* src, size_type n ); #endif //! Copy-construct n instances of T, starting at "dst" by iterator range of [p_type_erased_iterator, p_type_erased_iterator+n). template static void __TBB_EXPORTED_FUNC copy_range( void* dst, const void* p_type_erased_iterator, size_type n ); //! Assign (using operator=) n instances of T, starting at "dst" by assigning according element of src array. static void __TBB_EXPORTED_FUNC assign_array( void* dst, const void* src, size_type n ); //! Destroy n instances of T, starting at "begin". static void __TBB_EXPORTED_FUNC destroy_array( void* begin, size_type n ); //! Exception-aware helper class for filling a segment by exception-danger operators of user class class internal_loop_guide : internal::no_copy { public: const pointer array; const size_type n; size_type i; static const T* as_const_pointer(const void *ptr) { return static_cast(ptr); } static T* as_pointer(const void *src) { return static_cast(const_cast(src)); } internal_loop_guide(size_type ntrials, void *ptr) : array(as_pointer(ptr)), n(ntrials), i(0) {} void init() { for(; i < n; ++i) new( &array[i] ) T(); } void init(const void *src) { for(; i < n; ++i) new( &array[i] ) T(*as_const_pointer(src)); } void copy(const void *src) { for(; i < n; ++i) new( &array[i] ) T(as_const_pointer(src)[i]); } void assign(const void *src) { for(; i < n; ++i) array[i] = as_const_pointer(src)[i]; } #if __TBB_CPP11_RVALUE_REF_PRESENT void move_assign(const void *src) { for(; i < n; ++i) array[i] = std::move(as_pointer(src)[i]); } void move_construct(const void *src) { for(; i < n; ++i) new( &array[i] ) T( std::move(as_pointer(src)[i]) ); } #endif //TODO: rename to construct_range template void iterate(I &src) { for(; i < n; ++i, ++src) new( &array[i] ) T( *src ); } ~internal_loop_guide() { if(i < n) {// if an exception was raised, fill the rest of items with zeros internal::handle_unconstructed_elements(array+i, n-i); } } }; class element_construction_guard : internal::no_copy{ pointer element; public: element_construction_guard(pointer an_element) : element (an_element){} void dismiss(){ element = NULL; } ~element_construction_guard(){ if (element){ internal::handle_unconstructed_elements(element, 1); } } }; }; #if defined(_MSC_VER) && !defined(__INTEL_COMPILER) #pragma warning (push) #pragma warning (disable: 4701) // potentially uninitialized local variable "old" #endif template void concurrent_vector::shrink_to_fit() { internal_segments_table old; __TBB_TRY { if( internal_compact( sizeof(T), &old, &destroy_array, ©_array ) ) internal_free_segments( old.table, pointers_per_long_table, old.first_block ); // free joined and unnecessary segments } __TBB_CATCH(...) { if( old.first_block ) // free segment allocated for compacting. Only for support of exceptions in ctor of user T[ype] internal_free_segments( old.table, 1, old.first_block ); __TBB_RETHROW(); } } #if defined(_MSC_VER) && !defined(__INTEL_COMPILER) #pragma warning (pop) #endif // warning 4701 is back template void concurrent_vector::internal_free_segments(segment_t table[], segment_index_t k, segment_index_t first_block) { // Free the arrays while( k > first_block ) { --k; segment_value_t segment_value = table[k].load(); table[k].store(segment_not_used()); if( segment_value == segment_allocated() ) // check for correct segment pointer this->my_allocator.deallocate( (segment_value.pointer()), segment_size(k) ); } segment_value_t segment_value = table[0].load(); if( segment_value == segment_allocated() ) { __TBB_ASSERT( first_block > 0, NULL ); while(k > 0) table[--k].store(segment_not_used()); this->my_allocator.deallocate( (segment_value.pointer()), segment_size(first_block) ); } } template T& concurrent_vector::internal_subscript( size_type index ) const { //TODO: unify both versions of internal_subscript __TBB_ASSERT( index < my_early_size, "index out of bounds" ); size_type j = index; segment_index_t k = segment_base_index_of( j ); __TBB_ASSERT( my_segment.load() != my_storage || k < pointers_per_short_table, "index is being allocated" ); //no need in load with acquire (load) since thread works in own space or gets //the information about added elements via some form of external synchronization //TODO: why not make a load of my_segment relaxed as well ? //TODO: add an assertion that my_segment[k] is properly aligned to please ITT segment_value_t segment_value = my_segment[k].template load(); __TBB_ASSERT( segment_value != segment_allocation_failed(), "the instance is broken by bad allocation. Use at() instead" ); __TBB_ASSERT( segment_value != segment_not_used(), "index is being allocated" ); return (( segment_value.pointer()))[j]; } template T& concurrent_vector::internal_subscript_with_exceptions( size_type index ) const { if( index >= my_early_size ) internal::throw_exception(internal::eid_out_of_range); // throw std::out_of_range size_type j = index; segment_index_t k = segment_base_index_of( j ); //TODO: refactor this condition into separate helper function, e.g. fits_into_small_table if( my_segment.load() == my_storage && k >= pointers_per_short_table ) internal::throw_exception(internal::eid_segment_range_error); // throw std::range_error // no need in load with acquire (load) since thread works in own space or gets //the information about added elements via some form of external synchronization //TODO: why not make a load of my_segment relaxed as well ? //TODO: add an assertion that my_segment[k] is properly aligned to please ITT segment_value_t segment_value = my_segment[k].template load(); if( segment_value != segment_allocated() ) // check for correct segment pointer internal::throw_exception(internal::eid_index_range_error); // throw std::range_error return (segment_value.pointer())[j]; } template template void concurrent_vector::internal_assign_iterators(I first, I last) { __TBB_ASSERT(my_early_size == 0, NULL); size_type n = std::distance(first, last); if( !n ) return; internal_reserve(n, sizeof(T), max_size()); my_early_size = n; segment_index_t k = 0; //TODO: unify segment iteration code with concurrent_base_v3::helper size_type sz = segment_size( my_first_block ); while( sz < n ) { internal_loop_guide loop(sz, my_segment[k].template load().template pointer()); loop.iterate(first); n -= sz; if( !k ) k = my_first_block; else { ++k; sz <<= 1; } } internal_loop_guide loop(n, my_segment[k].template load().template pointer()); loop.iterate(first); } template void concurrent_vector::initialize_array( void* begin, const void *, size_type n ) { internal_loop_guide loop(n, begin); loop.init(); } template void concurrent_vector::initialize_array_by( void* begin, const void *src, size_type n ) { internal_loop_guide loop(n, begin); loop.init(src); } template void concurrent_vector::copy_array( void* dst, const void* src, size_type n ) { internal_loop_guide loop(n, dst); loop.copy(src); } #if __TBB_CPP11_RVALUE_REF_PRESENT template void concurrent_vector::move_array( void* dst, const void* src, size_type n ) { internal_loop_guide loop(n, dst); loop.move_construct(src); } template void concurrent_vector::move_assign_array( void* dst, const void* src, size_type n ) { internal_loop_guide loop(n, dst); loop.move_assign(src); } #endif template template void concurrent_vector::copy_range( void* dst, const void* p_type_erased_iterator, size_type n ){ I & iterator ((*const_cast(static_cast(p_type_erased_iterator)))); internal_loop_guide loop(n, dst); loop.iterate(iterator); } template void concurrent_vector::assign_array( void* dst, const void* src, size_type n ) { internal_loop_guide loop(n, dst); loop.assign(src); } #if defined(_MSC_VER) && !defined(__INTEL_COMPILER) // Workaround for overzealous compiler warning #pragma warning (push) #pragma warning (disable: 4189) #endif template void concurrent_vector::destroy_array( void* begin, size_type n ) { T* array = static_cast(begin); for( size_type j=n; j>0; --j ) array[j-1].~T(); // destructors are supposed to not throw any exceptions } #if defined(_MSC_VER) && !defined(__INTEL_COMPILER) #pragma warning (pop) #endif // warning 4189 is back // concurrent_vector's template functions template inline bool operator==(const concurrent_vector &a, const concurrent_vector &b) { //TODO: call size() only once per vector (in operator==) // Simply: return a.size() == b.size() && std::equal(a.begin(), a.end(), b.begin()); if(a.size() != b.size()) return false; typename concurrent_vector::const_iterator i(a.begin()); typename concurrent_vector::const_iterator j(b.begin()); for(; i != a.end(); ++i, ++j) if( !(*i == *j) ) return false; return true; } template inline bool operator!=(const concurrent_vector &a, const concurrent_vector &b) { return !(a == b); } template inline bool operator<(const concurrent_vector &a, const concurrent_vector &b) { return (std::lexicographical_compare(a.begin(), a.end(), b.begin(), b.end())); } template inline bool operator>(const concurrent_vector &a, const concurrent_vector &b) { return b < a; } template inline bool operator<=(const concurrent_vector &a, const concurrent_vector &b) { return !(b < a); } template inline bool operator>=(const concurrent_vector &a, const concurrent_vector &b) { return !(a < b); } template inline void swap(concurrent_vector &a, concurrent_vector &b) { a.swap( b ); } } // namespace tbb #if defined(_MSC_VER) && !defined(__INTEL_COMPILER) #pragma warning (pop) #endif // warning 4267,4127 are back #endif /* __TBB_concurrent_vector_H */ ================================================ FILE: benchmarks/tbb/condition_variable.cpp ================================================ /* Copyright 2005-2014 Intel Corporation. All Rights Reserved. This file is part of Threading Building Blocks. Threading Building Blocks is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. Threading Building Blocks is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Threading Building Blocks; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA As a special exception, you may use this file as part of a free software library without restriction. Specifically, if other files instantiate templates or use macros or inline functions from this file, or you compile this file and link it with other files to produce an executable, this file does not by itself cause the resulting executable to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the executable file might be covered by the GNU General Public License. */ #include "tbb/tbb_config.h" #include "tbb/compat/condition_variable" #include "tbb/atomic.h" #include "tbb_misc.h" #include "dynamic_link.h" #include "itt_notify.h" namespace tbb { namespace internal { //condition_variable #if _WIN32||_WIN64 using tbb::interface5::internal::condition_variable_using_event; static atomic condvar_api_state; void WINAPI init_condvar_using_event( condition_variable_using_event* cv_event ) { // TODO: For Metro port, we can always use the API for condition variables, without dynamic_link etc. cv_event->event = CreateEventEx(NULL, NULL, 0x1 /*CREATE_EVENT_MANUAL_RESET*/, EVENT_ALL_ACCESS ); InitializeCriticalSectionEx( &cv_event->mutex, 4000, 0 ); cv_event->n_waiters = 0; cv_event->release_count = 0; cv_event->epoch = 0; } BOOL WINAPI sleep_condition_variable_cs_using_event( condition_variable_using_event* cv_event, LPCRITICAL_SECTION cs, DWORD dwMilliseconds ) { EnterCriticalSection( &cv_event->mutex ); ++cv_event->n_waiters; unsigned my_generation = cv_event->epoch; LeaveCriticalSection( &cv_event->mutex ); LeaveCriticalSection( cs ); for (;;) { // should come here at least once DWORD rc = WaitForSingleObjectEx( cv_event->event, dwMilliseconds, FALSE ); EnterCriticalSection( &cv_event->mutex ); if( rc!=WAIT_OBJECT_0 ) { --cv_event->n_waiters; LeaveCriticalSection( &cv_event->mutex ); if( rc==WAIT_TIMEOUT ) { SetLastError( WAIT_TIMEOUT ); EnterCriticalSection( cs ); } return false; } __TBB_ASSERT( rc==WAIT_OBJECT_0, NULL ); if( cv_event->release_count>0 && cv_event->epoch!=my_generation ) break; LeaveCriticalSection( &cv_event->mutex ); } // still in the critical section --cv_event->n_waiters; int count = --cv_event->release_count; LeaveCriticalSection( &cv_event->mutex ); if( count==0 ) { __TBB_ASSERT( cv_event->event, "Premature destruction of condition variable?" ); ResetEvent( cv_event->event ); } EnterCriticalSection( cs ); return true; } void WINAPI wake_condition_variable_using_event( condition_variable_using_event* cv_event ) { EnterCriticalSection( &cv_event->mutex ); if( cv_event->n_waiters>cv_event->release_count ) { SetEvent( cv_event->event ); // Signal the manual-reset event. ++cv_event->release_count; ++cv_event->epoch; } LeaveCriticalSection( &cv_event->mutex ); } void WINAPI wake_all_condition_variable_using_event( condition_variable_using_event* cv_event ) { EnterCriticalSection( &cv_event->mutex ); if( cv_event->n_waiters>0 ) { SetEvent( cv_event->event ); cv_event->release_count = cv_event->n_waiters; ++cv_event->epoch; } LeaveCriticalSection( &cv_event->mutex ); } void WINAPI destroy_condvar_using_event( condition_variable_using_event* cv_event ) { HANDLE my_event = cv_event->event; EnterCriticalSection( &cv_event->mutex ); // NULL is an invalid HANDLE value cv_event->event = NULL; if( cv_event->n_waiters>0 ) { LeaveCriticalSection( &cv_event->mutex ); spin_wait_until_eq( cv_event->n_waiters, 0 ); // make sure the last thread completes its access to cv EnterCriticalSection( &cv_event->mutex ); } LeaveCriticalSection( &cv_event->mutex ); CloseHandle( my_event ); } void WINAPI destroy_condvar_noop( CONDITION_VARIABLE* /*cv*/ ) { /*no op*/ } static void (WINAPI *__TBB_init_condvar)( PCONDITION_VARIABLE ) = (void (WINAPI *)(PCONDITION_VARIABLE))&init_condvar_using_event; static BOOL (WINAPI *__TBB_condvar_wait)( PCONDITION_VARIABLE, LPCRITICAL_SECTION, DWORD ) = (BOOL (WINAPI *)(PCONDITION_VARIABLE,LPCRITICAL_SECTION, DWORD))&sleep_condition_variable_cs_using_event; static void (WINAPI *__TBB_condvar_notify_one)( PCONDITION_VARIABLE ) = (void (WINAPI *)(PCONDITION_VARIABLE))&wake_condition_variable_using_event; static void (WINAPI *__TBB_condvar_notify_all)( PCONDITION_VARIABLE ) = (void (WINAPI *)(PCONDITION_VARIABLE))&wake_all_condition_variable_using_event; static void (WINAPI *__TBB_destroy_condvar)( PCONDITION_VARIABLE ) = (void (WINAPI *)(PCONDITION_VARIABLE))&destroy_condvar_using_event; //! Table describing how to link the handlers. static const dynamic_link_descriptor CondVarLinkTable[] = { DLD(InitializeConditionVariable, __TBB_init_condvar), DLD(SleepConditionVariableCS, __TBB_condvar_wait), DLD(WakeConditionVariable, __TBB_condvar_notify_one), DLD(WakeAllConditionVariable, __TBB_condvar_notify_all) }; void init_condvar_module() { __TBB_ASSERT( (uintptr_t)__TBB_init_condvar==(uintptr_t)&init_condvar_using_event, NULL ); if( dynamic_link( "Kernel32.dll", CondVarLinkTable, 4 ) ) __TBB_destroy_condvar = (void (WINAPI *)(PCONDITION_VARIABLE))&destroy_condvar_noop; } #endif /* _WIN32||_WIN64 */ } // namespace internal #if _WIN32||_WIN64 namespace interface5 { namespace internal { using tbb::internal::condvar_api_state; using tbb::internal::__TBB_init_condvar; using tbb::internal::__TBB_condvar_wait; using tbb::internal::__TBB_condvar_notify_one; using tbb::internal::__TBB_condvar_notify_all; using tbb::internal::__TBB_destroy_condvar; using tbb::internal::init_condvar_module; void internal_initialize_condition_variable( condvar_impl_t& cv ) { atomic_do_once( &init_condvar_module, condvar_api_state ); __TBB_init_condvar( &cv.cv_native ); } void internal_destroy_condition_variable( condvar_impl_t& cv ) { __TBB_destroy_condvar( &cv.cv_native ); } void internal_condition_variable_notify_one( condvar_impl_t& cv ) { __TBB_condvar_notify_one ( &cv.cv_native ); } void internal_condition_variable_notify_all( condvar_impl_t& cv ) { __TBB_condvar_notify_all( &cv.cv_native ); } bool internal_condition_variable_wait( condvar_impl_t& cv, mutex* mtx, const tick_count::interval_t* i ) { DWORD duration = i ? DWORD((i->seconds()*1000)) : INFINITE; mtx->set_state( mutex::INITIALIZED ); BOOL res = __TBB_condvar_wait( &cv.cv_native, mtx->native_handle(), duration ); mtx->set_state( mutex::HELD ); return res?true:false; } } // namespace internal } // nameespace interface5 #endif /* _WIN32||_WIN64 */ } // namespace tbb ================================================ FILE: benchmarks/tbb/critical_section.cpp ================================================ /* Copyright 2005-2014 Intel Corporation. All Rights Reserved. This file is part of Threading Building Blocks. Threading Building Blocks is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. Threading Building Blocks is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Threading Building Blocks; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA As a special exception, you may use this file as part of a free software library without restriction. Specifically, if other files instantiate templates or use macros or inline functions from this file, or you compile this file and link it with other files to produce an executable, this file does not by itself cause the resulting executable to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the executable file might be covered by the GNU General Public License. */ #include "tbb/critical_section.h" #include "itt_notify.h" namespace tbb { namespace internal { void critical_section_v4::internal_construct() { ITT_SYNC_CREATE(&my_impl, _T("ppl::critical_section"), _T("")); } } // namespace internal } // namespace tbb ================================================ FILE: benchmarks/tbb/critical_section.h ================================================ /* Copyright 2005-2014 Intel Corporation. All Rights Reserved. This file is part of Threading Building Blocks. Threading Building Blocks is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. Threading Building Blocks is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Threading Building Blocks; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA As a special exception, you may use this file as part of a free software library without restriction. Specifically, if other files instantiate templates or use macros or inline functions from this file, or you compile this file and link it with other files to produce an executable, this file does not by itself cause the resulting executable to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the executable file might be covered by the GNU General Public License. */ #ifndef _TBB_CRITICAL_SECTION_H_ #define _TBB_CRITICAL_SECTION_H_ #if _WIN32||_WIN64 #include "machine/windows_api.h" #else #include #include #endif // _WIN32||WIN64 #include "tbb_stddef.h" #include "tbb_thread.h" #include "tbb_exception.h" #include "tbb_profiling.h" namespace tbb { namespace internal { class critical_section_v4 : internal::no_copy { #if _WIN32||_WIN64 CRITICAL_SECTION my_impl; #else pthread_mutex_t my_impl; #endif tbb_thread::id my_tid; public: void __TBB_EXPORTED_METHOD internal_construct(); critical_section_v4() { #if _WIN32||_WIN64 InitializeCriticalSectionEx( &my_impl, 4000, 0 ); #else pthread_mutex_init(&my_impl, NULL); #endif internal_construct(); } ~critical_section_v4() { __TBB_ASSERT(my_tid == tbb_thread::id(), "Destroying a still-held critical section"); #if _WIN32||_WIN64 DeleteCriticalSection(&my_impl); #else pthread_mutex_destroy(&my_impl); #endif } class scoped_lock : internal::no_copy { private: critical_section_v4 &my_crit; public: scoped_lock( critical_section_v4& lock_me) :my_crit(lock_me) { my_crit.lock(); } ~scoped_lock() { my_crit.unlock(); } }; void lock() { tbb_thread::id local_tid = this_tbb_thread::get_id(); if(local_tid == my_tid) throw_exception( eid_improper_lock ); #if _WIN32||_WIN64 EnterCriticalSection( &my_impl ); #else int rval = pthread_mutex_lock(&my_impl); __TBB_ASSERT_EX(!rval, "critical_section::lock: pthread_mutex_lock failed"); #endif __TBB_ASSERT(my_tid == tbb_thread::id(), NULL); my_tid = local_tid; } bool try_lock() { bool gotlock; tbb_thread::id local_tid = this_tbb_thread::get_id(); if(local_tid == my_tid) return false; #if _WIN32||_WIN64 gotlock = TryEnterCriticalSection( &my_impl ) != 0; #else int rval = pthread_mutex_trylock(&my_impl); // valid returns are 0 (locked) and [EBUSY] __TBB_ASSERT(rval == 0 || rval == EBUSY, "critical_section::trylock: pthread_mutex_trylock failed"); gotlock = rval == 0; #endif if(gotlock) { my_tid = local_tid; } return gotlock; } void unlock() { __TBB_ASSERT(this_tbb_thread::get_id() == my_tid, "thread unlocking critical_section is not thread that locked it"); my_tid = tbb_thread::id(); #if _WIN32||_WIN64 LeaveCriticalSection( &my_impl ); #else int rval = pthread_mutex_unlock(&my_impl); __TBB_ASSERT_EX(!rval, "critical_section::unlock: pthread_mutex_unlock failed"); #endif } static const bool is_rw_mutex = false; static const bool is_recursive_mutex = false; static const bool is_fair_mutex = true; }; // critical_section_v4 } // namespace internal typedef internal::critical_section_v4 critical_section; __TBB_DEFINE_PROFILING_SET_NAME(critical_section) } // namespace tbb #endif // _TBB_CRITICAL_SECTION_H_ ================================================ FILE: benchmarks/tbb/custom_scheduler.h ================================================ /* Copyright 2005-2014 Intel Corporation. All Rights Reserved. This file is part of Threading Building Blocks. Threading Building Blocks is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. Threading Building Blocks is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Threading Building Blocks; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA As a special exception, you may use this file as part of a free software library without restriction. Specifically, if other files instantiate templates or use macros or inline functions from this file, or you compile this file and link it with other files to produce an executable, this file does not by itself cause the resulting executable to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the executable file might be covered by the GNU General Public License. */ #ifndef _TBB_custom_scheduler_H #define _TBB_custom_scheduler_H #include "scheduler.h" #include "observer_proxy.h" #include "itt_notify.h" namespace tbb { namespace internal { //! Amount of time to pause between steals. /** The default values below were found to be best empirically for K-Means on the 32-way Altix and 4-way (*2 for HT) fxqlin04. */ #ifdef __TBB_STEALING_PAUSE static const long PauseTime = __TBB_STEALING_PAUSE; #elif __TBB_ipf static const long PauseTime = 1500; #else static const long PauseTime = 80; #endif //------------------------------------------------------------------------ //! Traits classes for scheduler //------------------------------------------------------------------------ struct DefaultSchedulerTraits { static const bool itt_possible = true; static const bool has_slow_atomic = false; }; struct IntelSchedulerTraits { static const bool itt_possible = false; #if __TBB_x86_32||__TBB_x86_64 static const bool has_slow_atomic = true; #else static const bool has_slow_atomic = false; #endif /* __TBB_x86_32||__TBB_x86_64 */ }; //------------------------------------------------------------------------ // custom_scheduler //------------------------------------------------------------------------ //! A scheduler with a customized evaluation loop. /** The customization can use SchedulerTraits to make decisions without needing a run-time check. */ template class custom_scheduler: private generic_scheduler { typedef custom_scheduler scheduler_type; //! Scheduler loop that dispatches tasks. /** If child is non-NULL, it is dispatched first. Then, until "parent" has a reference count of 1, other task are dispatched or stolen. */ /*override*/ void local_wait_for_all( task& parent, task* child ); //! Entry point from client code to the scheduler loop that dispatches tasks. /** The method is virtual, but the *this object is used only for sake of dispatching on the correct vtable, not necessarily the correct *this object. The correct *this object is looked up in TLS. */ /*override*/ void wait_for_all( task& parent, task* child ) { static_cast(governor::local_scheduler())->scheduler_type::local_wait_for_all( parent, child ); } //! Construct a custom_scheduler custom_scheduler( arena* a, size_t index ) : generic_scheduler(a, index) {} //! Decrements ref_count of a predecessor. /** If it achieves 0, the predecessor is scheduled for execution. When changing, remember that this is a hot path function. */ void tally_completion_of_predecessor( task& s, task*& bypass_slot ) { task_prefix& p = s.prefix(); if( SchedulerTraits::itt_possible ) ITT_NOTIFY(sync_releasing, &p.ref_count); if( SchedulerTraits::has_slow_atomic && p.ref_count==1 ) p.ref_count=0; else if( __TBB_FetchAndDecrementWrelease(&p.ref_count) > 1 ) {// more references exist // '__TBB_cl_evict(&p)' degraded performance of parallel_preorder example return; } // Ordering on p.ref_count (superfluous if SchedulerTraits::has_slow_atomic) __TBB_control_consistency_helper(); __TBB_ASSERT(p.ref_count==0, "completion of task caused predecessor's reference count to underflow"); if( SchedulerTraits::itt_possible ) ITT_NOTIFY(sync_acquired, &p.ref_count); #if TBB_USE_ASSERT p.extra_state &= ~es_ref_count_active; #endif /* TBB_USE_ASSERT */ #if __TBB_RECYCLE_TO_ENQUEUE if (p.state==task::to_enqueue) { // related to __TBB_TASK_ARENA TODO: try keep priority of the task // e.g. rework task_prefix to remember priority of received task and use here my_arena->enqueue_task(s, 0, my_random ); } else #endif /*__TBB_RECYCLE_TO_ENQUEUE*/ if( bypass_slot==NULL ) bypass_slot = &s; else local_spawn( s, s.prefix().next ); } public: static generic_scheduler* allocate_scheduler( arena* a, size_t index ) { scheduler_type* s = (scheduler_type*)NFS_Allocate(1,sizeof(scheduler_type),NULL); new( s ) scheduler_type( a, index ); s->assert_task_pool_valid(); ITT_SYNC_CREATE(s, SyncType_Scheduler, SyncObj_TaskPoolSpinning); return s; } //! Try getting a task from the mailbox or stealing from another scheduler. /** Returns the stolen task or NULL if all attempts fail. */ /* override */ task* receive_or_steal_task( __TBB_atomic reference_count& completion_ref_count, bool return_if_no_work ); }; // class custom_scheduler<> //------------------------------------------------------------------------ // custom_scheduler methods //------------------------------------------------------------------------ template task* custom_scheduler::receive_or_steal_task( __TBB_atomic reference_count& completion_ref_count, bool return_if_no_work ) { task* t = NULL; bool outermost_dispatch_level = return_if_no_work || master_outermost_level(); bool can_steal_here = can_steal(); my_inbox.set_is_idle( true ); #if __TBB_HOARD_NONLOCAL_TASKS __TBB_ASSERT(!my_nonlocal_free_list, NULL); #endif #if __TBB_TASK_PRIORITY if ( return_if_no_work && my_arena->my_skipped_fifo_priority ) { // This thread can dequeue FIFO tasks, and some priority levels of // FIFO tasks have been bypassed (to prevent deadlock caused by // dynamic priority changes in nested task group hierarchy). intptr_t skipped_priority = my_arena->my_skipped_fifo_priority; if ( my_arena->my_skipped_fifo_priority.compare_and_swap(0, skipped_priority) == skipped_priority && skipped_priority > my_arena->my_top_priority ) { my_market->update_arena_priority( *my_arena, skipped_priority ); } } task_stream *ts; #else /* !__TBB_TASK_PRIORITY */ task_stream *ts = &my_arena->my_task_stream; #endif /* !__TBB_TASK_PRIORITY */ // TODO: Try to find a place to reset my_limit (under market's lock) // The number of slots potentially used in the arena. Updated once in a while, as my_limit changes rarely. size_t n = my_arena->my_limit-1; int yield_count = 0; // The state "failure_count==-1" is used only when itt_possible is true, // and denotes that a sync_prepare has not yet been issued. for( int failure_count = -static_cast(SchedulerTraits::itt_possible);; ++failure_count) { __TBB_ASSERT( my_arena->my_limit > 0, NULL ); __TBB_ASSERT( my_arena_index <= n, NULL ); if( completion_ref_count==1 ) { if( SchedulerTraits::itt_possible ) { if( failure_count!=-1 ) { ITT_NOTIFY(sync_prepare, &completion_ref_count); // Notify Intel(R) Thread Profiler that thread has stopped spinning. ITT_NOTIFY(sync_acquired, this); } ITT_NOTIFY(sync_acquired, &completion_ref_count); } __TBB_ASSERT( !t, NULL ); __TBB_control_consistency_helper(); // on ref_count break; // exit stealing loop and return; } // Check if the resource manager requires our arena to relinquish some threads if ( return_if_no_work && my_arena->my_num_workers_allotted < my_arena->num_workers_active() ) { #if !__TBB_TASK_ARENA __TBB_ASSERT( is_worker(), NULL ); #endif if( SchedulerTraits::itt_possible && failure_count != -1 ) ITT_NOTIFY(sync_cancel, this); return NULL; } #if __TBB_TASK_PRIORITY ts = &my_arena->my_task_stream[my_arena->my_top_priority]; #endif // Check if there are tasks mailed to this thread via task-to-thread affinity mechanism. __TBB_ASSERT(my_affinity_id, NULL); if ( n && !my_inbox.empty() && (t = get_mailbox_task()) ) { GATHER_STATISTIC( ++my_counters.mails_received ); } // Check if there are tasks in starvation-resistant stream. // Only allowed for workers with empty stack, which is identified by return_if_no_work. else if ( outermost_dispatch_level && !ts->empty() && (t = ts->pop( my_arena_slot->hint_for_pop)) ) { ITT_NOTIFY(sync_acquired, ts); // just proceed with the obtained task } #if __TBB_TASK_PRIORITY // Check if any earlier offloaded non-top priority tasks become returned to the top level else if ( my_offloaded_tasks && (t=reload_tasks()) ) { // just proceed with the obtained task } #endif /* __TBB_TASK_PRIORITY */ else if ( can_steal_here && n ) { // Try to steal a task from a random victim. size_t k = my_random.get() % n; arena_slot* victim = &my_arena->my_slots[k]; // The following condition excludes the master that might have // already taken our previous place in the arena from the list . // of potential victims. But since such a situation can take // place only in case of significant oversubscription, keeping // the checks simple seems to be preferable to complicating the code. if( k >= my_arena_index ) ++victim; // Adjusts random distribution to exclude self task **pool = victim->task_pool; if( pool == EmptyTaskPool || !(t = steal_task( *victim )) ) goto fail; if( is_proxy(*t) ) { task_proxy &tp = *(task_proxy*)t; t = tp.extract_task(); if ( !t ) { // Proxy was empty, so it's our responsibility to free it free_task(tp); goto fail; } GATHER_STATISTIC( ++my_counters.proxies_stolen ); } t->prefix().extra_state |= es_task_is_stolen; if( is_version_3_task(*t) ) { my_innermost_running_task = t; t->prefix().owner = this; t->note_affinity( my_affinity_id ); } GATHER_STATISTIC( ++my_counters.steals_committed ); } // end of stealing branch else goto fail; // A task was successfully obtained somewhere __TBB_ASSERT(t,NULL); #if __TBB_SCHEDULER_OBSERVER my_arena->my_observers.notify_entry_observers( my_last_local_observer, is_worker() ); the_global_observer_list.notify_entry_observers( my_last_global_observer, is_worker() ); #endif /* __TBB_SCHEDULER_OBSERVER */ if ( SchedulerTraits::itt_possible && failure_count != -1 ) { // FIXME - might be victim, or might be selected from a mailbox // Notify Intel(R) Thread Profiler that thread has stopped spinning. ITT_NOTIFY(sync_acquired, this); } break; // exit stealing loop and return fail: GATHER_STATISTIC( ++my_counters.steals_failed ); if( SchedulerTraits::itt_possible && failure_count==-1 ) { // The first attempt to steal work failed, so notify Intel(R) Thread Profiler that // the thread has started spinning. Ideally, we would do this notification // *before* the first failed attempt to steal, but at that point we do not // know that the steal will fail. ITT_NOTIFY(sync_prepare, this); failure_count = 0; } // Pause, even if we are going to yield, because the yield might return immediately. __TBB_Pause(PauseTime); const int failure_threshold = 2*int(n+1); if( failure_count>=failure_threshold ) { #if __TBB_YIELD2P failure_count = 0; #else failure_count = failure_threshold; #endif __TBB_Yield(); #if __TBB_TASK_PRIORITY // Check if there are tasks abandoned by other workers if ( my_arena->my_orphaned_tasks ) { // Epoch must be advanced before seizing the list pointer ++my_arena->my_abandonment_epoch; task* orphans = (task*)__TBB_FetchAndStoreW( &my_arena->my_orphaned_tasks, 0 ); if ( orphans ) { task** link = NULL; // Get local counter out of the way (we've just brought in external tasks) my_local_reload_epoch--; t = reload_tasks( orphans, link, effective_reference_priority() ); if ( orphans ) { *link = my_offloaded_tasks; if ( !my_offloaded_tasks ) my_offloaded_task_list_tail_link = link; my_offloaded_tasks = orphans; } __TBB_ASSERT( !my_offloaded_tasks == !my_offloaded_task_list_tail_link, NULL ); if ( t ) { if( SchedulerTraits::itt_possible ) ITT_NOTIFY(sync_cancel, this); break; // exit stealing loop and return } } } #endif /* __TBB_TASK_PRIORITY */ const int yield_threshold = 100; if( yield_count++ >= yield_threshold ) { // When a worker thread has nothing to do, return it to RML. // For purposes of affinity support, the thread is considered idle while in RML. #if __TBB_TASK_PRIORITY if( return_if_no_work || my_arena->my_top_priority > my_arena->my_bottom_priority ) { if ( my_arena->is_out_of_work() && return_if_no_work ) { #else /* !__TBB_TASK_PRIORITY */ if ( return_if_no_work && my_arena->is_out_of_work() ) { #endif /* !__TBB_TASK_PRIORITY */ if( SchedulerTraits::itt_possible ) ITT_NOTIFY(sync_cancel, this); return NULL; } #if __TBB_TASK_PRIORITY } if ( my_offloaded_tasks ) { // Safeguard against any sloppiness in managing reload epoch // counter (e.g. on the hot path because of performance reasons). my_local_reload_epoch--; // Break the deadlock caused by a higher priority dispatch loop // stealing and offloading a lower priority task. Priority check // at the stealing moment cannot completely preclude such cases // because priorities can changes dynamically. if ( !return_if_no_work && *my_ref_top_priority > my_arena->my_top_priority ) { GATHER_STATISTIC( ++my_counters.prio_ref_fixups ); my_ref_top_priority = &my_arena->my_top_priority; // it's expected that only outermost workers can use global reload epoch __TBB_ASSERT(!worker_outermost_level(), NULL); __TBB_ASSERT(my_ref_reload_epoch == &my_arena->my_reload_epoch, NULL); } } #endif /* __TBB_TASK_PRIORITY */ } // end of arena snapshot branch // If several attempts did not find work, re-read the arena limit. n = my_arena->my_limit-1; } // end of yielding branch } // end of nonlocal task retrieval loop my_inbox.set_is_idle( false ); return t; } template void custom_scheduler::local_wait_for_all( task& parent, task* child ) { __TBB_ASSERT( governor::is_set(this), NULL ); __TBB_ASSERT( parent.ref_count() >= (child && child->parent() == &parent ? 2 : 1), "ref_count is too small" ); assert_task_pool_valid(); // Using parent's refcount in sync_prepare (in the stealing loop below) is // a workaround for TP. We need to name it here to display correctly in Ampl. if( SchedulerTraits::itt_possible ) ITT_SYNC_CREATE(&parent.prefix().ref_count, SyncType_Scheduler, SyncObj_TaskStealingLoop); #if __TBB_TASK_GROUP_CONTEXT __TBB_ASSERT( parent.prefix().context || (is_worker() && &parent == my_dummy_task), "parent task does not have context" ); #endif /* __TBB_TASK_GROUP_CONTEXT */ task* t = child; // Constant all_local_work_done is an unreachable refcount value that prevents // early quitting the dispatch loop. It is defined to be in the middle of the range // of negative values representable by the reference_count type. static const reference_count // For normal dispatch loops parents_work_done = 1, // For termination dispatch loops in masters all_local_work_done = (reference_count)3 << (sizeof(reference_count) * 8 - 2); reference_count quit_point; #if __TBB_TASK_PRIORITY __TBB_ASSERT( (uintptr_t)*my_ref_top_priority < (uintptr_t)num_priority_levels, NULL ); volatile intptr_t *old_ref_top_priority = my_ref_top_priority; // When entering nested parallelism level market level counter // must be replaced with the one local to this arena. volatile uintptr_t *old_ref_reload_epoch = my_ref_reload_epoch; #endif /* __TBB_TASK_PRIORITY */ task* old_dispatching_task = my_dispatching_task; my_dispatching_task = my_innermost_running_task; if( master_outermost_level() ) { // We are in the outermost task dispatch loop of a master thread or a worker which mimics master __TBB_ASSERT( !is_worker() || my_dispatching_task != old_dispatching_task, NULL ); quit_point = &parent == my_dummy_task ? all_local_work_done : parents_work_done; } else { quit_point = parents_work_done; #if __TBB_TASK_PRIORITY if ( &parent != my_dummy_task ) { // We are in a nested dispatch loop. // Market or arena priority must not prevent child tasks from being // executed so that dynamic priority changes did not cause deadlock. my_ref_top_priority = &parent.prefix().context->my_priority; my_ref_reload_epoch = &my_arena->my_reload_epoch; if(my_ref_reload_epoch != old_ref_reload_epoch) my_local_reload_epoch = *my_ref_reload_epoch-1; } #endif /* __TBB_TASK_PRIORITY */ } cpu_ctl_env_helper cpu_ctl_helper; if ( t ) cpu_ctl_helper.set_env( __TBB_CONTEXT_ARG1(t->prefix().context) ); #if TBB_USE_EXCEPTIONS // Infinite safeguard EH loop for (;;) { try { #endif /* TBB_USE_EXCEPTIONS */ // Outer loop receives tasks from global environment (via mailbox, FIFO queue(s), // and by stealing from other threads' task pools). // All exit points from the dispatch loop are located in its immediate scope. for(;;) { // Middle loop retrieves tasks from the local task pool. for(;;) { // Inner loop evaluates tasks coming from nesting loops and those returned // by just executed tasks (bypassing spawn or enqueue calls). while(t) { __TBB_ASSERT( my_inbox.is_idle_state(false), NULL ); __TBB_ASSERT(!is_proxy(*t),"unexpected proxy"); __TBB_ASSERT( t->prefix().owner, NULL ); assert_task_valid(*t); #if __TBB_TASK_GROUP_CONTEXT && TBB_USE_ASSERT assert_context_valid(t->prefix().context); if ( !t->prefix().context->my_cancellation_requested ) #endif __TBB_ASSERT( 1L<state() & (1L<prefix().extra_state & es_task_enqueued) == 0) { assert_priority_valid(p); if ( p != my_arena->my_top_priority ) { my_market->update_arena_priority( *my_arena, p ); } if ( p < effective_reference_priority() ) { if ( !my_offloaded_tasks ) { my_offloaded_task_list_tail_link = &t->prefix().next_offloaded; // Erase possible reference to the owner scheduler (next_offloaded is a union member) *my_offloaded_task_list_tail_link = NULL; } offload_task( *t, p ); if ( in_arena() ) { t = winnow_task_pool(); if ( t ) continue; } else { // Mark arena as full to unlock arena priority level adjustment // by arena::is_out_of_work(), and ensure worker's presence. my_arena->advertise_new_work(); } goto stealing_ground; } } #endif /* __TBB_TASK_PRIORITY */ task* t_next = NULL; my_innermost_running_task = t; t->prefix().owner = this; t->prefix().state = task::executing; #if __TBB_TASK_GROUP_CONTEXT if ( !t->prefix().context->my_cancellation_requested ) #endif { GATHER_STATISTIC( ++my_counters.tasks_executed ); GATHER_STATISTIC( my_counters.avg_arena_concurrency += my_arena->num_workers_active() ); GATHER_STATISTIC( my_counters.avg_assigned_workers += my_arena->my_num_workers_allotted ); #if __TBB_TASK_PRIORITY GATHER_STATISTIC( my_counters.avg_arena_prio += p ); GATHER_STATISTIC( my_counters.avg_market_prio += my_market->my_global_top_priority ); #endif /* __TBB_TASK_PRIORITY */ ITT_STACK(SchedulerTraits::itt_possible, callee_enter, t->prefix().context->itt_caller); t_next = t->execute(); ITT_STACK(SchedulerTraits::itt_possible, callee_leave, t->prefix().context->itt_caller); if (t_next) { __TBB_ASSERT( t_next->state()==task::allocated, "if task::execute() returns task, it must be marked as allocated" ); reset_extra_state(t_next); #if TBB_USE_ASSERT affinity_id next_affinity=t_next->prefix().affinity; if (next_affinity != 0 && next_affinity != my_affinity_id) GATHER_STATISTIC( ++my_counters.affinity_ignored ); #endif } } assert_task_pool_valid(); switch( t->state() ) { case task::executing: { task* s = t->parent(); __TBB_ASSERT( my_innermost_running_task==t, NULL ); __TBB_ASSERT( t->prefix().ref_count==0, "Task still has children after it has been executed" ); t->~task(); if( s ) tally_completion_of_predecessor(*s, t_next); free_task( *t ); assert_task_pool_valid(); break; } case task::recycle: // set by recycle_as_safe_continuation() t->prefix().state = task::allocated; #if __TBB_RECYCLE_TO_ENQUEUE case task::to_enqueue: // set by recycle_to_enqueue() #endif __TBB_ASSERT( t_next != t, "a task returned from method execute() can not be recycled in another way" ); reset_extra_state(t); // for safe continuation, need atomically decrement ref_count; tally_completion_of_predecessor(*t, t_next); assert_task_pool_valid(); break; case task::reexecute: // set by recycle_to_reexecute() __TBB_ASSERT( t_next, "reexecution requires that method execute() return another task" ); __TBB_ASSERT( t_next != t, "a task returned from method execute() can not be recycled in another way" ); t->prefix().state = task::allocated; reset_extra_state(t); local_spawn( *t, t->prefix().next ); assert_task_pool_valid(); break; case task::allocated: reset_extra_state(t); break; #if TBB_USE_ASSERT case task::ready: __TBB_ASSERT( false, "task is in READY state upon return from method execute()" ); break; default: __TBB_ASSERT( false, "illegal state" ); #else default: // just to shut up some compilation warnings break; #endif /* TBB_USE_ASSERT */ } GATHER_STATISTIC( t_next ? ++my_counters.spawns_bypassed : 0 ); t = t_next; } // end of scheduler bypass loop assert_task_pool_valid(); if ( parent.prefix().ref_count == quit_point ) { __TBB_ASSERT( quit_point != all_local_work_done, NULL ); __TBB_control_consistency_helper(); // on ref_count ITT_NOTIFY(sync_acquired, &parent.prefix().ref_count); goto done; } if ( in_arena() ) { t = get_task(); } else { __TBB_ASSERT( is_quiescent_local_task_pool_reset(), NULL ); break; } __TBB_ASSERT(!t || !is_proxy(*t),"unexpected proxy"); assert_task_pool_valid(); if ( !t ) break; cpu_ctl_helper.set_env( __TBB_CONTEXT_ARG1(t->prefix().context) ); }; // end of local task pool retrieval loop #if __TBB_TASK_PRIORITY stealing_ground: #endif /* __TBB_TASK_PRIORITY */ #if __TBB_HOARD_NONLOCAL_TASKS // before stealing, previously stolen task objects are returned for (; my_nonlocal_free_list; my_nonlocal_free_list = t ) { t = my_nonlocal_free_list->prefix().next; free_nonlocal_small_task( *my_nonlocal_free_list ); } #endif if ( quit_point == all_local_work_done ) { __TBB_ASSERT( !in_arena() && is_quiescent_local_task_pool_reset(), NULL ); __TBB_ASSERT( !worker_outermost_level(), NULL ); my_innermost_running_task = my_dispatching_task; my_dispatching_task = old_dispatching_task; #if __TBB_TASK_PRIORITY my_ref_top_priority = old_ref_top_priority; if(my_ref_reload_epoch != old_ref_reload_epoch) my_local_reload_epoch = *old_ref_reload_epoch-1; my_ref_reload_epoch = old_ref_reload_epoch; #endif /* __TBB_TASK_PRIORITY */ return; } // The following assertion may be falsely triggered in the presence of enqueued tasks //__TBB_ASSERT( my_arena->my_max_num_workers > 0 || my_market->my_ref_count > 1 // || parent.prefix().ref_count == 1, "deadlock detected" ); // Dispatching task pointer is NULL *iff* this is a worker thread in its outermost // dispatch loop (i.e. its execution stack is empty). In this case it should exit it // either when there is no more work in the current arena, or when revoked by the market. t = receive_or_steal_task( parent.prefix().ref_count, worker_outermost_level() ); if ( !t ) goto done; __TBB_ASSERT(!is_proxy(*t),"unexpected proxy"); // The user can capture another the FPU settings to the context so the // cached data in the helper can be out-of-date and we cannot do fast // check. cpu_ctl_helper.set_env( __TBB_CONTEXT_ARG1(t->prefix().context) ); } // end of infinite stealing loop #if TBB_USE_EXCEPTIONS __TBB_ASSERT( false, "Must never get here" ); } // end of try-block TbbCatchAll( t->prefix().context ); // Complete post-processing ... if( t->state() == task::recycle #if __TBB_RECYCLE_TO_ENQUEUE // TODO: the enqueue semantics gets lost below, consider reimplementing || t->state() == task::to_enqueue #endif ) { // ... for recycled tasks to atomically decrement ref_count t->prefix().state = task::allocated; if( SchedulerTraits::itt_possible ) ITT_NOTIFY(sync_releasing, &t->prefix().ref_count); if( __TBB_FetchAndDecrementWrelease(&t->prefix().ref_count)==1 ) { if( SchedulerTraits::itt_possible ) ITT_NOTIFY(sync_acquired, &t->prefix().ref_count); }else{ t = NULL; } } } // end of infinite EH loop __TBB_ASSERT( false, "Must never get here too" ); #endif /* TBB_USE_EXCEPTIONS */ done: my_innermost_running_task = my_dispatching_task; my_dispatching_task = old_dispatching_task; #if __TBB_TASK_PRIORITY my_ref_top_priority = old_ref_top_priority; if(my_ref_reload_epoch != old_ref_reload_epoch) my_local_reload_epoch = *old_ref_reload_epoch-1; my_ref_reload_epoch = old_ref_reload_epoch; #endif /* __TBB_TASK_PRIORITY */ if ( !ConcurrentWaitsEnabled(parent) ) { if ( parent.prefix().ref_count != parents_work_done ) { // This is a worker that was revoked by the market. #if __TBB_TASK_ARENA __TBB_ASSERT( worker_outermost_level(), "Worker thread exits nested dispatch loop prematurely" ); #else __TBB_ASSERT( is_worker() && worker_outermost_level(), "Worker thread exits nested dispatch loop prematurely" ); #endif return; } parent.prefix().ref_count = 0; } #if TBB_USE_ASSERT parent.prefix().extra_state &= ~es_ref_count_active; #endif /* TBB_USE_ASSERT */ #if __TBB_TASK_GROUP_CONTEXT __TBB_ASSERT(parent.prefix().context && default_context(), NULL); task_group_context* parent_ctx = parent.prefix().context; if ( parent_ctx->my_cancellation_requested ) { task_group_context::exception_container_type *pe = parent_ctx->my_exception; if ( master_outermost_level() && parent_ctx == default_context() ) { // We are in the outermost task dispatch loop of a master thread, and // the whole task tree has been collapsed. So we may clear cancellation data. parent_ctx->my_cancellation_requested = 0; // TODO: Add assertion that master's dummy task context does not have children parent_ctx->my_state &= ~(uintptr_t)task_group_context::may_have_children; } if ( pe ) { // On Windows, FPU control settings changed in the helper destructor are not visible // outside a catch block. So restore the default settings manually before rethrowing // the exception. cpu_ctl_helper.restore_default(); pe->throw_self(); } } __TBB_ASSERT(!is_worker() || !CancellationInfoPresent(*my_dummy_task), "Worker's dummy task context modified"); __TBB_ASSERT(!master_outermost_level() || !CancellationInfoPresent(*my_dummy_task), "Unexpected exception or cancellation data in the master's dummy task"); #endif /* __TBB_TASK_GROUP_CONTEXT */ assert_task_pool_valid(); } } // namespace internal } // namespace tbb #endif /* _TBB_custom_scheduler_H */ ================================================ FILE: benchmarks/tbb/dynamic_link.cpp ================================================ /* Copyright 2005-2014 Intel Corporation. All Rights Reserved. This file is part of Threading Building Blocks. Threading Building Blocks is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. Threading Building Blocks is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Threading Building Blocks; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA As a special exception, you may use this file as part of a free software library without restriction. Specifically, if other files instantiate templates or use macros or inline functions from this file, or you compile this file and link it with other files to produce an executable, this file does not by itself cause the resulting executable to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the executable file might be covered by the GNU General Public License. */ #include "dynamic_link.h" #include "tbb/tbb_config.h" /* This file is used by both TBB and OpenMP RTL. Do not use __TBB_ASSERT() macro and runtime_warning() function because they are not available in OpenMP. Use LIBRARY_ASSERT and DYNAMIC_LINK_WARNING instead. */ #include // va_list etc. #if _WIN32 #include // Unify system calls #define dlopen( name, flags ) LoadLibraryA( name ) #define dlsym( handle, name ) GetProcAddress( handle, name ) #define dlclose( handle ) ( ! FreeLibrary( handle ) ) #define dlerror() GetLastError() #ifndef PATH_MAX #define PATH_MAX MAX_PATH #endif #else /* _WIN32 */ #include #include #include #include #include #endif /* _WIN32 */ #if __TBB_WEAK_SYMBOLS_PRESENT //TODO: use function attribute for weak symbols instead of the pragma. #pragma weak dlopen #pragma weak dlsym #pragma weak dlclose #pragma weak dlerror #pragma weak dladdr #endif /* __TBB_WEAK_SYMBOLS_PRESENT */ #include "tbb/tbb_misc.h" #define __USE_TBB_ATOMICS ( !(__linux__&&__ia64__) || __TBB_BUILD ) #define __USE_STATIC_DL_INIT (!__ANDROID__) #if !__USE_TBB_ATOMICS #include #endif /* dynamic_link is a common interface for searching for required symbols in an executable and dynamic libraries. dynamic_link provides certain guarantees: 1. Either all or none of the requested symbols are resolved. Moreover, if symbols are not resolved, the dynamic_link_descriptor table is not modified; 2. All returned symbols have secured life time: this means that none of them can be invalidated until dynamic_unlink is called; 3. Any loaded library is loaded only via the full path. The full path is that from which the runtime itself was loaded. (This is done to avoid security issues caused by loading libraries from insecure paths). dynamic_link searches for the requested symbols in three stages, stopping as soon as all of the symbols have been resolved. 1. Search the global scope: a. On Windows: dynamic_link tries to obtain the handle of the requested library and if it succeeds it resolves the symbols via that handle. b. On Linux: dynamic_link tries to search for the symbols in the global scope via the main program handle. If the symbols are present in the global scope their life time is not guaranteed (since dynamic_link does not know anything about the library from which they are exported). Therefore it tries to "pin" the symbols by obtaining the library name and reopening it. dlopen may fail to reopen the library in two cases: i. The symbols are exported from the executable. Currently dynamic _link cannot handle this situation, so it will not find these symbols in this step. ii. The necessary library has been unloaded and cannot be reloaded. It seems there is nothing that can be done in this case. No symbols are returned. 2. Dynamic load: an attempt is made to load the requested library via the full path. The full path used is that from which the runtime itself was loaded. If the library can be loaded, then an attempt is made to resolve the requested symbols in the newly loaded library. If the symbols are not found the library is unloaded. 3. Weak symbols: if weak symbols are available they are returned. */ OPEN_INTERNAL_NAMESPACE #if __TBB_WEAK_SYMBOLS_PRESENT || __TBB_DYNAMIC_LOAD_ENABLED #if !defined(DYNAMIC_LINK_WARNING) && !__TBB_WIN8UI_SUPPORT // Report runtime errors and continue. #define DYNAMIC_LINK_WARNING dynamic_link_warning static void dynamic_link_warning( dynamic_link_error_t code, ... ) { (void) code; } // library_warning #endif /* DYNAMIC_LINK_WARNING */ static bool resolve_symbols( dynamic_link_handle module, const dynamic_link_descriptor descriptors[], size_t required ) { LIBRARY_ASSERT( module != NULL, "Module handle is NULL" ); if ( module == NULL ) return false; #if __TBB_WEAK_SYMBOLS_PRESENT if ( !dlsym ) return false; #endif /* __TBB_WEAK_SYMBOLS_PRESENT */ const size_t n_desc=20; // Usually we don't have more than 20 descriptors per library LIBRARY_ASSERT( required <= n_desc, "Too many descriptors is required" ); if ( required > n_desc ) return false; pointer_to_handler h[n_desc]; for ( size_t k = 0; k < required; ++k ) { dynamic_link_descriptor const & desc = descriptors[k]; pointer_to_handler addr = (pointer_to_handler)dlsym( module, desc.name ); if ( !addr ) { return false; } h[k] = addr; } // Commit the entry points. // Cannot use memset here, because the writes must be atomic. for( size_t k = 0; k < required; ++k ) *descriptors[k].handler = h[k]; return true; } #if __TBB_WIN8UI_SUPPORT bool dynamic_link( const char* library, const dynamic_link_descriptor descriptors[], size_t required, dynamic_link_handle*, int flags ) { dynamic_link_handle tmp_handle = NULL; TCHAR wlibrary[256]; if ( MultiByteToWideChar(CP_UTF8, 0, library, -1, wlibrary, 255) == 0 ) return false; if ( flags & DYNAMIC_LINK_LOAD ) tmp_handle = LoadPackagedLibrary( wlibrary, 0 ); if (tmp_handle != NULL){ return resolve_symbols(tmp_handle, descriptors, required); }else{ return false; } } void dynamic_unlink( dynamic_link_handle ) { } void dynamic_unlink_all() { } #else /* There is a security issue on Windows: LoadLibrary() may load and execute malicious code. See http://www.microsoft.com/technet/security/advisory/2269637.mspx for details. To avoid the issue, we have to pass full path (not just library name) to LoadLibrary. This function constructs full path to the specified library (it is assumed the library located side-by-side with the tbb.dll. The function constructs absolute path for given relative path. Important: Base directory is not current one, it is the directory tbb.dll loaded from. Example: Let us assume "tbb.dll" is located in "c:\program files\common\intel\" directory, e. g. absolute path of tbb library is "c:\program files\common\intel\tbb.dll". Absolute path for "tbbmalloc.dll" would be "c:\program files\common\intel\tbbmalloc.dll". Absolute path for "malloc\tbbmalloc.dll" would be "c:\program files\common\intel\malloc\tbbmalloc.dll". */ // Struct handle_storage is used by dynamic_link routine to store handles of // all loaded or pinned dynamic libraries. When TBB is shut down, it calls // dynamic_unlink_all() that unloads modules referenced by handle_storage. // This struct should not have any constructors since it may be used before // the constructor is called. #define MAX_LOADED_MODULES 8 // The number of maximum possible modules which can be loaded struct handle_storage { #if __USE_TBB_ATOMICS ::tbb::atomic my_size; #else size_t my_size; pthread_spinlock_t my_lock; #endif dynamic_link_handle my_handles[MAX_LOADED_MODULES]; void add_handle(const dynamic_link_handle &handle) { #if !__USE_TBB_ATOMICS int res = pthread_spin_lock( &my_lock ); LIBRARY_ASSERT( res==0, "pthread_spin_lock failed" ); #endif const size_t ind = my_size++; #if !__USE_TBB_ATOMICS res = pthread_spin_unlock( &my_lock ); LIBRARY_ASSERT( res==0, "pthread_spin_unlock failed" ); #endif LIBRARY_ASSERT( ind < MAX_LOADED_MODULES, "Too many modules are loaded" ); my_handles[ind] = handle; } void free_handles() { const size_t size = my_size; for (size_t i=0; i &once_state ) { tbb::internal::atomic_do_once( func, once_state ); } #define ATOMIC_ONCE_DECL( var ) tbb::atomic< tbb::internal::do_once_state > var #else static void atomic_once ( void (*func) (), pthread_once_t &once_state ) { pthread_once( &once_state, func ); } #define ATOMIC_ONCE_DECL( var ) pthread_once_t var = PTHREAD_ONCE_INIT #endif ATOMIC_ONCE_DECL( init_dl_data_state ); static struct _ap_data { char _path[PATH_MAX+1]; size_t _len; } ap_data; static void init_ap_data() { #if _WIN32 // Get handle of our DLL first. HMODULE handle; BOOL brc = GetModuleHandleExA( GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS | GET_MODULE_HANDLE_EX_FLAG_UNCHANGED_REFCOUNT, (LPSTR)( & dynamic_link ), // any function inside the library can be used for the address & handle ); if ( !brc ) { // Error occurred. int err = GetLastError(); DYNAMIC_LINK_WARNING( dl_sys_fail, "GetModuleHandleEx", err ); return; } // Now get path to our DLL. DWORD drc = GetModuleFileNameA( handle, ap_data._path, static_cast< DWORD >( PATH_MAX ) ); if ( drc == 0 ) { // Error occurred. int err = GetLastError(); DYNAMIC_LINK_WARNING( dl_sys_fail, "GetModuleFileName", err ); return; } if ( drc >= PATH_MAX ) { // Buffer too short. DYNAMIC_LINK_WARNING( dl_buff_too_small ); return; } // Find the position of the last backslash. char *backslash = strrchr( ap_data._path, '\\' ); if ( !backslash ) { // Backslash not found. LIBRARY_ASSERT( backslash!=NULL, "Unbelievable."); return; } LIBRARY_ASSERT( backslash >= ap_data._path, "Unbelievable."); ap_data._len = (size_t)(backslash - ap_data._path) + 1; *(backslash+1) = 0; #else // Get the library path #if __TBB_WEAK_SYMBOLS_PRESENT if ( !dladdr || !dlerror ) return; #endif /* __TBB_WEAK_SYMBOLS_PRESENT */ Dl_info dlinfo; int res = dladdr( (void*)&dynamic_link, &dlinfo ); // any function inside the library can be used for the address if ( !res ) { char const * err = dlerror(); DYNAMIC_LINK_WARNING( dl_sys_fail, "dladdr", err ); return; } else { LIBRARY_ASSERT( dlinfo.dli_fname!=NULL, "Unbelievable." ); } char const *slash = strrchr( dlinfo.dli_fname, '/' ); size_t fname_len=0; if ( slash ) { LIBRARY_ASSERT( slash >= dlinfo.dli_fname, "Unbelievable."); fname_len = (size_t)(slash - dlinfo.dli_fname) + 1; } size_t rc; if ( dlinfo.dli_fname[0]=='/' ) { // The library path is absolute rc = 0; ap_data._len = 0; } else { // The library path is relative so get the current working directory if ( !getcwd( ap_data._path, sizeof(ap_data._path)/sizeof(ap_data._path[0]) ) ) { DYNAMIC_LINK_WARNING( dl_buff_too_small ); return; } ap_data._len = strlen( ap_data._path ); ap_data._path[ap_data._len++]='/'; rc = ap_data._len; } if ( fname_len>0 ) { if ( ap_data._len>PATH_MAX ) { DYNAMIC_LINK_WARNING( dl_buff_too_small ); ap_data._len=0; return; } strncpy( ap_data._path+rc, dlinfo.dli_fname, fname_len ); ap_data._len += fname_len; ap_data._path[ap_data._len]=0; } #endif /* _WIN32 */ } static void init_dl_data() { init_ap_data(); #if !__USE_TBB_ATOMICS int res; res = pthread_spin_init( &handles.my_lock, PTHREAD_PROCESS_SHARED ); LIBRARY_ASSERT( res==0, "pthread_spin_init failed" ); #endif } // ap_data structure is initialized with current directory on Linux. // So it should be initialized as soon as possible since the current directory may be changed. // static_init_ap_data object provides this initialization during library loading. static class _static_init_dl_data { public: _static_init_dl_data() { #if __USE_STATIC_DL_INIT atomic_once( &init_dl_data, init_dl_data_state ); #endif } #if !__USE_TBB_ATOMICS ~_static_init_dl_data() { int res; res = pthread_spin_destroy( &handles.my_lock ); LIBRARY_ASSERT( res==0, "pthread_spin_destroy failed" ); } #endif } static_init_dl_data; /* The function constructs absolute path for given relative path. Important: Base directory is not current one, it is the directory libtbb.so loaded from. Arguments: in name -- Name of a file (may be with relative path; it must not be an absolute one). out path -- Buffer to save result (absolute path) to. in len -- Size of buffer. ret -- 0 -- Error occurred. > len -- Buffer too short, required size returned. otherwise -- Ok, number of characters (not counting terminating null) written to buffer. */ #if __TBB_DYNAMIC_LOAD_ENABLED static size_t abs_path( char const * name, char * path, size_t len ) { atomic_once( &init_dl_data, init_dl_data_state ); if ( !ap_data._len ) return 0; size_t name_len = strlen( name ); size_t full_len = name_len+ap_data._len; if ( full_len < len ) { strncpy( path, ap_data._path, ap_data._len ); strncpy( path+ap_data._len, name, name_len ); path[full_len] = 0; } return full_len; } #endif // __TBB_DYNAMIC_LOAD_ENABLED #if __TBB_WEAK_SYMBOLS_PRESENT static bool weak_symbol_link( const dynamic_link_descriptor descriptors[], size_t required ) { // Check if the required entries are present in what was loaded into our process. for ( size_t k = 0; k < required; ++k ) if ( !descriptors[k].ptr ) return false; // Commit the entry points. for ( size_t k = 0; k < required; ++k ) *descriptors[k].handler = (pointer_to_handler) descriptors[k].ptr; return true; } #else static bool weak_symbol_link( const dynamic_link_descriptor[], size_t ) { return false; } #endif /* __TBB_WEAK_SYMBOLS_PRESENT */ void dynamic_unlink( dynamic_link_handle handle ) { if ( handle ) { #if __TBB_WEAK_SYMBOLS_PRESENT LIBRARY_ASSERT( dlclose != NULL, "dlopen is present but dlclose is NOT present!?" ); #endif /* __TBB_WEAK_SYMBOLS_PRESENT */ #if __TBB_DYNAMIC_LOAD_ENABLED dlclose( handle ); #endif /* __TBB_DYNAMIC_LOAD_ENABLED */ } } void dynamic_unlink_all() { handles.free_handles(); } #if _WIN32 static dynamic_link_handle global_symbols_link( const char* library, const dynamic_link_descriptor descriptors[], size_t required ) { dynamic_link_handle library_handle; if ( GetModuleHandleExA( 0, library, &library_handle ) ) { if ( resolve_symbols( library_handle, descriptors, required ) ) return library_handle; else FreeLibrary( library_handle ); } return 0; } #else /* _WIN32 */ // It is supposed that all symbols are from the only one library static dynamic_link_handle pin_symbols( dynamic_link_descriptor desc, const dynamic_link_descriptor descriptors[], size_t required ) { // The library has been loaded by another module and contains at least one requested symbol. // But after we obtained the symbol the library can be unloaded by another thread // invalidating our symbol. Therefore we need to pin the library in memory. dynamic_link_handle library_handle; Dl_info info; // Get library's name from earlier found symbol if ( dladdr( (void*)*desc.handler, &info ) ) { // Pin the library library_handle = dlopen( info.dli_fname, RTLD_LAZY ); if ( library_handle ) { // If original library was unloaded before we pinned it // and then another module loaded in its place, the earlier // found symbol would become invalid. So revalidate them. if ( !resolve_symbols( library_handle, descriptors, required ) ) { // Wrong library. dynamic_unlink(library_handle); library_handle = 0; } } else { char const * err = dlerror(); DYNAMIC_LINK_WARNING( dl_lib_not_found, info.dli_fname, err ); } } else { // The library have been unloaded by another thread library_handle = 0; } return library_handle; } static dynamic_link_handle global_symbols_link( const char*, const dynamic_link_descriptor descriptors[], size_t required ) { #if __TBB_WEAK_SYMBOLS_PRESENT if ( !dlopen ) return 0; #endif /* __TBB_WEAK_SYMBOLS_PRESENT */ dynamic_link_handle library_handle = dlopen( NULL, RTLD_LAZY ); #if __ANDROID__ // On Android dlopen( NULL ) returns NULL if it is called during dynamic module initialization. if ( !library_handle ) return 0; #endif // Check existence of only the first symbol, then use it to find the library and load all necessary symbols pointer_to_handler handler; dynamic_link_descriptor desc = { descriptors[0].name, &handler }; if ( resolve_symbols( library_handle, &desc, 1 ) ) return pin_symbols( desc, descriptors, required ); return 0; } #endif /* _WIN32 */ static void save_library_handle( dynamic_link_handle src, dynamic_link_handle *dst ) { if ( dst ) *dst = src; else handles.add_handle( src ); } dynamic_link_handle dynamic_load( const char* library, const dynamic_link_descriptor descriptors[], size_t required ) { #if __TBB_DYNAMIC_LOAD_ENABLED #if _XBOX return LoadLibrary (library); #else /* _XBOX */ size_t const len = PATH_MAX + 1; char path[ len ]; size_t rc = abs_path( library, path, len ); if ( 0 < rc && rc < len ) { #if _WIN32 // Prevent Windows from displaying silly message boxes if it fails to load library // (e.g. because of MS runtime problems - one of those crazy manifest related ones) UINT prev_mode = SetErrorMode (SEM_FAILCRITICALERRORS); #endif /* _WIN32 */ #if __TBB_WEAK_SYMBOLS_PRESENT if ( !dlopen ) return 0; #endif /* __TBB_WEAK_SYMBOLS_PRESENT */ dynamic_link_handle library_handle = dlopen( path, RTLD_LAZY ); #if _WIN32 SetErrorMode (prev_mode); #endif /* _WIN32 */ if( library_handle ) { if( !resolve_symbols( library_handle, descriptors, required ) ) { // The loaded library does not contain all the expected entry points dynamic_unlink( library_handle ); library_handle = NULL; } } else DYNAMIC_LINK_WARNING( dl_lib_not_found, path, dlerror() ); return library_handle; } else if ( rc>=len ) DYNAMIC_LINK_WARNING( dl_buff_too_small ); // rc == 0 means failing of init_ap_data so the warning has already been issued. #endif /* _XBOX */ #endif /* __TBB_DYNAMIC_LOAD_ENABLED */ return 0; } bool dynamic_link( const char* library, const dynamic_link_descriptor descriptors[], size_t required, dynamic_link_handle *handle, int flags ) { // TODO: May global_symbols_link find weak symbols? dynamic_link_handle library_handle = ( flags & DYNAMIC_LINK_GLOBAL ) ? global_symbols_link( library, descriptors, required ) : 0; if ( !library_handle && ( flags & DYNAMIC_LINK_LOAD ) ) library_handle = dynamic_load( library, descriptors, required ); if ( !library_handle && ( flags & DYNAMIC_LINK_WEAK ) ) return weak_symbol_link( descriptors, required ); save_library_handle( library_handle, handle ); return true; } #endif /*__TBB_WIN8UI_SUPPORT*/ #else /* __TBB_WEAK_SYMBOLS_PRESENT || __TBB_DYNAMIC_LOAD_ENABLED */ bool dynamic_link( const char*, const dynamic_link_descriptor*, size_t, dynamic_link_handle *handle, int ) { if ( handle ) *handle=0; return false; } void dynamic_unlink( dynamic_link_handle ) { } void dynamic_unlink_all() { } #endif /* __TBB_WEAK_SYMBOLS_PRESENT || __TBB_DYNAMIC_LOAD_ENABLED */ CLOSE_INTERNAL_NAMESPACE ================================================ FILE: benchmarks/tbb/dynamic_link.h ================================================ /* Copyright 2005-2014 Intel Corporation. All Rights Reserved. This file is part of Threading Building Blocks. Threading Building Blocks is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. Threading Building Blocks is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Threading Building Blocks; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA As a special exception, you may use this file as part of a free software library without restriction. Specifically, if other files instantiate templates or use macros or inline functions from this file, or you compile this file and link it with other files to produce an executable, this file does not by itself cause the resulting executable to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the executable file might be covered by the GNU General Public License. */ #ifndef __TBB_dynamic_link #define __TBB_dynamic_link // Support for dynamic loading entry points from other shared libraries. #include "tbb/tbb_stddef.h" #ifdef LIBRARY_ASSERT #undef __TBB_ASSERT #define __TBB_ASSERT(x,y) LIBRARY_ASSERT(x,y) #else #define LIBRARY_ASSERT(x,y) __TBB_ASSERT_EX(x,y) #endif /* !LIBRARY_ASSERT */ /** By default, symbols declared and defined here go into namespace tbb::internal. To put them in other namespace, define macros OPEN_INTERNAL_NAMESPACE and CLOSE_INTERNAL_NAMESPACE to override the following default definitions. **/ #ifndef OPEN_INTERNAL_NAMESPACE #define OPEN_INTERNAL_NAMESPACE namespace tbb { namespace internal { #define CLOSE_INTERNAL_NAMESPACE }} #endif /* OPEN_INTERNAL_NAMESPACE */ #include #if _WIN32 #include "tbb/machine/windows_api.h" #endif /* _WIN32 */ OPEN_INTERNAL_NAMESPACE //! Type definition for a pointer to a void somefunc(void) typedef void (*pointer_to_handler)(); //! The helper to construct dynamic_link_descriptor structure // Double cast through the void* in DLD macro is necessary to // prevent warnings from some compilers (g++ 4.1) #if __TBB_WEAK_SYMBOLS_PRESENT #define DLD(s,h) {#s, (pointer_to_handler*)(void*)(&h), (pointer_to_handler)&s} #else #define DLD(s,h) {#s, (pointer_to_handler*)(void*)(&h)} #endif /* __TBB_WEAK_SYMBOLS_PRESENT */ //! Association between a handler name and location of pointer to it. struct dynamic_link_descriptor { //! Name of the handler const char* name; //! Pointer to the handler pointer_to_handler* handler; #if __TBB_WEAK_SYMBOLS_PRESENT //! Weak symbol pointer_to_handler ptr; #endif }; #if _WIN32 typedef HMODULE dynamic_link_handle; #else typedef void* dynamic_link_handle; #endif /* _WIN32 */ const int DYNAMIC_LINK_GLOBAL = 0x01; const int DYNAMIC_LINK_LOAD = 0x02; const int DYNAMIC_LINK_WEAK = 0x04; const int DYNAMIC_LINK_ALL = DYNAMIC_LINK_GLOBAL | DYNAMIC_LINK_LOAD | DYNAMIC_LINK_WEAK; //! Fill in dynamically linked handlers. /** 'library' is the name of the requested library. It should not contain a full path since dynamic_link adds the full path (from which the runtime itself was loaded) to the library name. 'required' is the number of the initial entries in the array descriptors[] that have to be found in order for the call to succeed. If the library and all the required handlers are found, then the corresponding handler pointers are set, and the return value is true. Otherwise the original array of descriptors is left untouched and the return value is false. 'required' is limited by 20 (exceeding of this value will result in failure to load the symbols and the return value will be false). 'handle' is the handle of the library if it is loaded. Otherwise it is left untouched. 'flags' is the set of DYNAMIC_LINK_* flags. Each of the DYNAMIC_LINK_* flags allows its corresponding linking stage. **/ bool dynamic_link( const char* library, const dynamic_link_descriptor descriptors[], size_t required, dynamic_link_handle* handle = 0, int flags = DYNAMIC_LINK_ALL ); void dynamic_unlink( dynamic_link_handle handle ); void dynamic_unlink_all(); enum dynamic_link_error_t { dl_success = 0, dl_lib_not_found, // char const * lib, dlerr_t err dl_sym_not_found, // char const * sym, dlerr_t err // Note: dlerr_t depends on OS: it is char const * on Linux* and OS X*, int on Windows*. dl_sys_fail, // char const * func, int err dl_buff_too_small // none }; // dynamic_link_error_t CLOSE_INTERNAL_NAMESPACE #endif /* __TBB_dynamic_link */ ================================================ FILE: benchmarks/tbb/enumerable_thread_specific.h ================================================ /* Copyright 2005-2014 Intel Corporation. All Rights Reserved. This file is part of Threading Building Blocks. Threading Building Blocks is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. Threading Building Blocks is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Threading Building Blocks; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA As a special exception, you may use this file as part of a free software library without restriction. Specifically, if other files instantiate templates or use macros or inline functions from this file, or you compile this file and link it with other files to produce an executable, this file does not by itself cause the resulting executable to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the executable file might be covered by the GNU General Public License. */ #ifndef __TBB_enumerable_thread_specific_H #define __TBB_enumerable_thread_specific_H #include "concurrent_vector.h" #include "tbb_thread.h" #include "tbb_allocator.h" #include "tbb_profiling.h" #include "cache_aligned_allocator.h" #include "aligned_space.h" #include // for memcpy #if _WIN32||_WIN64 #include "machine/windows_api.h" #else #include #endif namespace tbb { //! enum for selecting between single key and key-per-instance versions enum ets_key_usage_type { ets_key_per_instance, ets_no_key }; namespace interface6 { //! @cond namespace internal { using namespace tbb::internal; template class ets_base: tbb::internal::no_copy { protected: #if _WIN32||_WIN64 typedef DWORD key_type; #else typedef pthread_t key_type; #endif #if __TBB_PROTECTED_NESTED_CLASS_BROKEN public: #endif struct slot; struct array { array* next; size_t lg_size; slot& at( size_t k ) { return ((slot*)(void*)(this+1))[k]; } size_t size() const {return (size_t)1<>(8*sizeof(size_t)-lg_size); } }; struct slot { key_type key; void* ptr; bool empty() const {return !key;} bool match( key_type k ) const {return key==k;} bool claim( key_type k ) { __TBB_ASSERT(sizeof(tbb::atomic)==sizeof(key_type), NULL); return tbb::internal::punned_cast*>(&key)->compare_and_swap(k,0)==0; } }; #if __TBB_PROTECTED_NESTED_CLASS_BROKEN protected: #endif static key_type key_of_current_thread() { tbb::tbb_thread::id id = tbb::this_tbb_thread::get_id(); key_type k; memcpy( &k, &id, sizeof(k) ); return k; } //! Root of linked list of arrays of decreasing size. /** NULL if and only if my_count==0. Each array in the list is half the size of its predecessor. */ atomic my_root; atomic my_count; virtual void* create_local() = 0; virtual void* create_array(size_t _size) = 0; // _size in bytes virtual void free_array(void* ptr, size_t _size) = 0; // _size in bytes array* allocate( size_t lg_size ) { size_t n = 1<(create_array( sizeof(array)+n*sizeof(slot) )); a->lg_size = lg_size; std::memset( a+1, 0, n*sizeof(slot) ); return a; } void free(array* a) { size_t n = 1<<(a->lg_size); free_array( (void *)a, size_t(sizeof(array)+n*sizeof(slot)) ); } static size_t hash( key_type k ) { // Multiplicative hashing. Client should use *upper* bits. // casts required for Mac gcc4.* compiler return uintptr_t(k)*tbb::internal::select_size_t_constant<0x9E3779B9,0x9E3779B97F4A7C15ULL>::value; } ets_base() {my_root=NULL; my_count=0;} virtual ~ets_base(); // g++ complains if this is not virtual... void* table_lookup( bool& exists ); void table_clear(); // table_find is used in copying ETS, so is not used in concurrent context. So // we don't need itt annotations for it. slot& table_find( key_type k ) { size_t h = hash(k); array* r = my_root; size_t mask = r->mask(); for(size_t i = r->start(h);;i=(i+1)&mask) { slot& s = r->at(i); if( s.empty() || s.match(k) ) return s; } } void table_reserve_for_copy( const ets_base& other ) { __TBB_ASSERT(!my_root,NULL); __TBB_ASSERT(!my_count,NULL); if( other.my_root ) { array* a = allocate(other.my_root->lg_size); a->next = NULL; my_root = a; my_count = other.my_count; } } }; template ets_base::~ets_base() { __TBB_ASSERT(!my_root, NULL); } template void ets_base::table_clear() { while( array* r = my_root ) { my_root = r->next; free(r); } my_count = 0; } template void* ets_base::table_lookup( bool& exists ) { const key_type k = key_of_current_thread(); __TBB_ASSERT(k!=0,NULL); void* found; size_t h = hash(k); for( array* r=my_root; r; r=r->next ) { call_itt_notify(acquired,r); size_t mask=r->mask(); for(size_t i = r->start(h); ;i=(i+1)&mask) { slot& s = r->at(i); if( s.empty() ) break; if( s.match(k) ) { if( r==my_root ) { // Success at top level exists = true; return s.ptr; } else { // Success at some other level. Need to insert at top level. exists = true; found = s.ptr; goto insert; } } } } // Key does not yet exist. The density of slots in the table does not exceed 0.5, // for if this will occur a new table is allocated with double the current table // size, which is swapped in as the new root table. So an empty slot is guaranteed. exists = false; found = create_local(); { size_t c = ++my_count; array* r = my_root; call_itt_notify(acquired,r); if( !r || c>r->size()/2 ) { size_t s = r ? r->lg_size : 2; while( c>size_t(1)<<(s-1) ) ++s; array* a = allocate(s); for(;;) { a->next = r; call_itt_notify(releasing,a); array* new_r = my_root.compare_and_swap(a,r); if( new_r==r ) break; call_itt_notify(acquired, new_r); if( new_r->lg_size>=s ) { // Another thread inserted an equal or bigger array, so our array is superfluous. free(a); break; } r = new_r; } } } insert: // Whether a slot has been found in an older table, or if it has been inserted at this level, // it has already been accounted for in the total. Guaranteed to be room for it, and it is // not present, so search for empty slot and use it. array* ir = my_root; call_itt_notify(acquired, ir); size_t mask = ir->mask(); for(size_t i = ir->start(h);;i=(i+1)&mask) { slot& s = ir->at(i); if( s.empty() ) { if( s.claim(k) ) { s.ptr = found; return found; } } } } //! Specialization that exploits native TLS template <> class ets_base: protected ets_base { typedef ets_base super; #if _WIN32||_WIN64 #if __TBB_WIN8UI_SUPPORT typedef DWORD tls_key_t; void create_key() { my_key = FlsAlloc(NULL); } void destroy_key() { FlsFree(my_key); } void set_tls(void * value) { FlsSetValue(my_key, (LPVOID)value); } void* get_tls() { return (void *)FlsGetValue(my_key); } #else typedef DWORD tls_key_t; void create_key() { my_key = TlsAlloc(); } void destroy_key() { TlsFree(my_key); } void set_tls(void * value) { TlsSetValue(my_key, (LPVOID)value); } void* get_tls() { return (void *)TlsGetValue(my_key); } #endif #else typedef pthread_key_t tls_key_t; void create_key() { pthread_key_create(&my_key, NULL); } void destroy_key() { pthread_key_delete(my_key); } void set_tls( void * value ) const { pthread_setspecific(my_key, value); } void* get_tls() const { return pthread_getspecific(my_key); } #endif tls_key_t my_key; virtual void* create_local() = 0; virtual void* create_array(size_t _size) = 0; // _size in bytes virtual void free_array(void* ptr, size_t _size) = 0; // size in bytes public: ets_base() {create_key();} ~ets_base() {destroy_key();} void* table_lookup( bool& exists ) { void* found = get_tls(); if( found ) { exists=true; } else { found = super::table_lookup(exists); set_tls(found); } return found; } void table_clear() { destroy_key(); create_key(); super::table_clear(); } }; //! Random access iterator for traversing the thread local copies. template< typename Container, typename Value > class enumerable_thread_specific_iterator #if defined(_WIN64) && defined(_MSC_VER) // Ensure that Microsoft's internal template function _Val_type works correctly. : public std::iterator #endif /* defined(_WIN64) && defined(_MSC_VER) */ { //! current position in the concurrent_vector Container *my_container; typename Container::size_type my_index; mutable Value *my_value; template friend enumerable_thread_specific_iterator operator+( ptrdiff_t offset, const enumerable_thread_specific_iterator& v ); template friend bool operator==( const enumerable_thread_specific_iterator& i, const enumerable_thread_specific_iterator& j ); template friend bool operator<( const enumerable_thread_specific_iterator& i, const enumerable_thread_specific_iterator& j ); template friend ptrdiff_t operator-( const enumerable_thread_specific_iterator& i, const enumerable_thread_specific_iterator& j ); template friend class enumerable_thread_specific_iterator; public: enumerable_thread_specific_iterator( const Container &container, typename Container::size_type index ) : my_container(&const_cast(container)), my_index(index), my_value(NULL) {} //! Default constructor enumerable_thread_specific_iterator() : my_container(NULL), my_index(0), my_value(NULL) {} template enumerable_thread_specific_iterator( const enumerable_thread_specific_iterator& other ) : my_container( other.my_container ), my_index( other.my_index), my_value( const_cast(other.my_value) ) {} enumerable_thread_specific_iterator operator+( ptrdiff_t offset ) const { return enumerable_thread_specific_iterator(*my_container, my_index + offset); } enumerable_thread_specific_iterator &operator+=( ptrdiff_t offset ) { my_index += offset; my_value = NULL; return *this; } enumerable_thread_specific_iterator operator-( ptrdiff_t offset ) const { return enumerable_thread_specific_iterator( *my_container, my_index-offset ); } enumerable_thread_specific_iterator &operator-=( ptrdiff_t offset ) { my_index -= offset; my_value = NULL; return *this; } Value& operator*() const { Value* value = my_value; if( !value ) { value = my_value = reinterpret_cast(&(*my_container)[my_index].value); } __TBB_ASSERT( value==reinterpret_cast(&(*my_container)[my_index].value), "corrupt cache" ); return *value; } Value& operator[]( ptrdiff_t k ) const { return (*my_container)[my_index + k].value; } Value* operator->() const {return &operator*();} enumerable_thread_specific_iterator& operator++() { ++my_index; my_value = NULL; return *this; } enumerable_thread_specific_iterator& operator--() { --my_index; my_value = NULL; return *this; } //! Post increment enumerable_thread_specific_iterator operator++(int) { enumerable_thread_specific_iterator result = *this; ++my_index; my_value = NULL; return result; } //! Post decrement enumerable_thread_specific_iterator operator--(int) { enumerable_thread_specific_iterator result = *this; --my_index; my_value = NULL; return result; } // STL support typedef ptrdiff_t difference_type; typedef Value value_type; typedef Value* pointer; typedef Value& reference; typedef std::random_access_iterator_tag iterator_category; }; template enumerable_thread_specific_iterator operator+( ptrdiff_t offset, const enumerable_thread_specific_iterator& v ) { return enumerable_thread_specific_iterator( v.my_container, v.my_index + offset ); } template bool operator==( const enumerable_thread_specific_iterator& i, const enumerable_thread_specific_iterator& j ) { return i.my_index==j.my_index && i.my_container == j.my_container; } template bool operator!=( const enumerable_thread_specific_iterator& i, const enumerable_thread_specific_iterator& j ) { return !(i==j); } template bool operator<( const enumerable_thread_specific_iterator& i, const enumerable_thread_specific_iterator& j ) { return i.my_index bool operator>( const enumerable_thread_specific_iterator& i, const enumerable_thread_specific_iterator& j ) { return j bool operator>=( const enumerable_thread_specific_iterator& i, const enumerable_thread_specific_iterator& j ) { return !(i bool operator<=( const enumerable_thread_specific_iterator& i, const enumerable_thread_specific_iterator& j ) { return !(j ptrdiff_t operator-( const enumerable_thread_specific_iterator& i, const enumerable_thread_specific_iterator& j ) { return i.my_index-j.my_index; } template class segmented_iterator #if defined(_WIN64) && defined(_MSC_VER) : public std::iterator #endif { template friend bool operator==(const segmented_iterator& i, const segmented_iterator& j); template friend bool operator!=(const segmented_iterator& i, const segmented_iterator& j); template friend class segmented_iterator; public: segmented_iterator() {my_segcont = NULL;} segmented_iterator( const SegmentedContainer& _segmented_container ) : my_segcont(const_cast(&_segmented_container)), outer_iter(my_segcont->end()) { } ~segmented_iterator() {} typedef typename SegmentedContainer::iterator outer_iterator; typedef typename SegmentedContainer::value_type InnerContainer; typedef typename InnerContainer::iterator inner_iterator; // STL support typedef ptrdiff_t difference_type; typedef Value value_type; typedef typename SegmentedContainer::size_type size_type; typedef Value* pointer; typedef Value& reference; typedef std::input_iterator_tag iterator_category; // Copy Constructor template segmented_iterator(const segmented_iterator& other) : my_segcont(other.my_segcont), outer_iter(other.outer_iter), // can we assign a default-constructed iterator to inner if we're at the end? inner_iter(other.inner_iter) {} // assignment template segmented_iterator& operator=( const segmented_iterator& other) { if(this != &other) { my_segcont = other.my_segcont; outer_iter = other.outer_iter; if(outer_iter != my_segcont->end()) inner_iter = other.inner_iter; } return *this; } // allow assignment of outer iterator to segmented iterator. Once it is // assigned, move forward until a non-empty inner container is found or // the end of the outer container is reached. segmented_iterator& operator=(const outer_iterator& new_outer_iter) { __TBB_ASSERT(my_segcont != NULL, NULL); // check that this iterator points to something inside the segmented container for(outer_iter = new_outer_iter ;outer_iter!=my_segcont->end(); ++outer_iter) { if( !outer_iter->empty() ) { inner_iter = outer_iter->begin(); break; } } return *this; } // pre-increment segmented_iterator& operator++() { advance_me(); return *this; } // post-increment segmented_iterator operator++(int) { segmented_iterator tmp = *this; operator++(); return tmp; } bool operator==(const outer_iterator& other_outer) const { __TBB_ASSERT(my_segcont != NULL, NULL); return (outer_iter == other_outer && (outer_iter == my_segcont->end() || inner_iter == outer_iter->begin())); } bool operator!=(const outer_iterator& other_outer) const { return !operator==(other_outer); } // (i)* RHS reference operator*() const { __TBB_ASSERT(my_segcont != NULL, NULL); __TBB_ASSERT(outer_iter != my_segcont->end(), "Dereferencing a pointer at end of container"); __TBB_ASSERT(inner_iter != outer_iter->end(), NULL); // should never happen return *inner_iter; } // i-> pointer operator->() const { return &operator*();} private: SegmentedContainer* my_segcont; outer_iterator outer_iter; inner_iterator inner_iter; void advance_me() { __TBB_ASSERT(my_segcont != NULL, NULL); __TBB_ASSERT(outer_iter != my_segcont->end(), NULL); // not true if there are no inner containers __TBB_ASSERT(inner_iter != outer_iter->end(), NULL); // not true if the inner containers are all empty. ++inner_iter; while(inner_iter == outer_iter->end() && ++outer_iter != my_segcont->end()) { inner_iter = outer_iter->begin(); } } }; // segmented_iterator template bool operator==( const segmented_iterator& i, const segmented_iterator& j ) { if(i.my_segcont != j.my_segcont) return false; if(i.my_segcont == NULL) return true; if(i.outer_iter != j.outer_iter) return false; if(i.outer_iter == i.my_segcont->end()) return true; return i.inner_iter == j.inner_iter; } // != template bool operator!=( const segmented_iterator& i, const segmented_iterator& j ) { return !(i==j); } template struct destruct_only: tbb::internal::no_copy { tbb::aligned_space value; ~destruct_only() {value.begin()[0].~T();} }; template struct construct_by_default: tbb::internal::no_assign { void construct(void*where) {new(where) T();} // C++ note: the () in T() ensure zero initialization. construct_by_default( int ) {} }; template struct construct_by_exemplar: tbb::internal::no_assign { const T exemplar; void construct(void*where) {new(where) T(exemplar);} construct_by_exemplar( const T& t ) : exemplar(t) {} }; template struct construct_by_finit: tbb::internal::no_assign { Finit f; void construct(void* where) {new(where) T(f());} construct_by_finit( const Finit& f_ ) : f(f_) {} }; // storage for initialization function pointer template class callback_base { public: // Clone *this virtual callback_base* clone() = 0; // Destruct and free *this virtual void destroy() = 0; // Need virtual destructor to satisfy GCC compiler warning virtual ~callback_base() { } // Construct T at where virtual void construct(void* where) = 0; }; template class callback_leaf: public callback_base, Constructor { template callback_leaf( const X& x ) : Constructor(x) {} typedef typename tbb::tbb_allocator my_allocator_type; /*override*/ callback_base* clone() { void* where = my_allocator_type().allocate(1); return new(where) callback_leaf(*this); } /*override*/ void destroy() { my_allocator_type().destroy(this); my_allocator_type().deallocate(this,1); } /*override*/ void construct(void* where) { Constructor::construct(where); } public: template static callback_base* make( const X& x ) { void* where = my_allocator_type().allocate(1); return new(where) callback_leaf(x); } }; //! Template for adding padding in order to avoid false sharing /** ModularSize should be sizeof(U) modulo the cache line size. All maintenance of the space will be done explicitly on push_back, and all thread local copies must be destroyed before the concurrent vector is deleted. */ template struct ets_element { ets_element() { /* avoid cl warning C4345 about default initialization of POD types */ } char value[ModularSize==0 ? sizeof(U) : sizeof(U)+(tbb::internal::NFS_MaxLineSize-ModularSize)]; void unconstruct() { tbb::internal::punned_cast(&value)->~U(); } }; } // namespace internal //! @endcond //! The enumerable_thread_specific container /** enumerable_thread_specific has the following properties: - thread-local copies are lazily created, with default, exemplar or function initialization. - thread-local copies do not move (during lifetime, and excepting clear()) so the address of a copy is invariant. - the contained objects need not have operator=() defined if combine is not used. - enumerable_thread_specific containers may be copy-constructed or assigned. - thread-local copies can be managed by hash-table, or can be accessed via TLS storage for speed. - outside of parallel contexts, the contents of all thread-local copies are accessible by iterator or using combine or combine_each methods @par Segmented iterator When the thread-local objects are containers with input_iterators defined, a segmented iterator may be used to iterate over all the elements of all thread-local copies. @par combine and combine_each - Both methods are defined for enumerable_thread_specific. - combine() requires the the type T have operator=() defined. - neither method modifies the contents of the object (though there is no guarantee that the applied methods do not modify the object.) - Both are evaluated in serial context (the methods are assumed to be non-benign.) @ingroup containers */ template , ets_key_usage_type ETS_key_type=ets_no_key > class enumerable_thread_specific: internal::ets_base { template friend class enumerable_thread_specific; typedef internal::ets_element padded_element; //! A generic range, used to create range objects from the iterators template class generic_range_type: public blocked_range { public: typedef T value_type; typedef T& reference; typedef const T& const_reference; typedef I iterator; typedef ptrdiff_t difference_type; generic_range_type( I begin_, I end_, size_t grainsize_ = 1) : blocked_range(begin_,end_,grainsize_) {} template generic_range_type( const generic_range_type& r) : blocked_range(r.begin(),r.end(),r.grainsize()) {} generic_range_type( generic_range_type& r, split ) : blocked_range(r,split()) {} }; typedef typename Allocator::template rebind< padded_element >::other padded_allocator_type; typedef tbb::concurrent_vector< padded_element, padded_allocator_type > internal_collection_type; internal::callback_base *my_construct_callback; internal_collection_type my_locals; /*override*/ void* create_local() { void* lref = &*my_locals.grow_by(1); my_construct_callback->construct(lref); return lref; } void unconstruct_locals() { for(typename internal_collection_type::iterator cvi = my_locals.begin(); cvi != my_locals.end(); ++cvi) { cvi->unconstruct(); } } typedef typename Allocator::template rebind< uintptr_t >::other array_allocator_type; // _size is in bytes /*override*/ void* create_array(size_t _size) { size_t nelements = (_size + sizeof(uintptr_t) -1) / sizeof(uintptr_t); return array_allocator_type().allocate(nelements); } /*override*/ void free_array( void* _ptr, size_t _size) { size_t nelements = (_size + sizeof(uintptr_t) -1) / sizeof(uintptr_t); array_allocator_type().deallocate( reinterpret_cast(_ptr),nelements); } public: //! Basic types typedef Allocator allocator_type; typedef T value_type; typedef T& reference; typedef const T& const_reference; typedef T* pointer; typedef const T* const_pointer; typedef typename internal_collection_type::size_type size_type; typedef typename internal_collection_type::difference_type difference_type; // Iterator types typedef typename internal::enumerable_thread_specific_iterator< internal_collection_type, value_type > iterator; typedef typename internal::enumerable_thread_specific_iterator< internal_collection_type, const value_type > const_iterator; // Parallel range types typedef generic_range_type< iterator > range_type; typedef generic_range_type< const_iterator > const_range_type; //! Default constructor. Each local instance of T is default constructed. enumerable_thread_specific() : my_construct_callback( internal::callback_leaf >::make(/*dummy argument*/0) ) {} //! Constructor with initializer functor. Each local instance of T is constructed by T(finit()). template enumerable_thread_specific( Finit finit ) : my_construct_callback( internal::callback_leaf >::make( finit ) ) {} //! Constructor with exemplar. Each local instance of T is copied-constructed from the exemplar. enumerable_thread_specific(const T& exemplar) : my_construct_callback( internal::callback_leaf >::make( exemplar ) ) {} //! Destructor ~enumerable_thread_specific() { my_construct_callback->destroy(); this->clear(); // deallocation before the derived class is finished destructing // So free(array *) is still accessible } //! returns reference to local, discarding exists reference local() { bool exists; return local(exists); } //! Returns reference to calling thread's local copy, creating one if necessary reference local(bool& exists) { void* ptr = this->table_lookup(exists); return *(T*)ptr; } //! Get the number of local copies size_type size() const { return my_locals.size(); } //! true if there have been no local copies created bool empty() const { return my_locals.empty(); } //! begin iterator iterator begin() { return iterator( my_locals, 0 ); } //! end iterator iterator end() { return iterator(my_locals, my_locals.size() ); } //! begin const iterator const_iterator begin() const { return const_iterator(my_locals, 0); } //! end const iterator const_iterator end() const { return const_iterator(my_locals, my_locals.size()); } //! Get range for parallel algorithms range_type range( size_t grainsize=1 ) { return range_type( begin(), end(), grainsize ); } //! Get const range for parallel algorithms const_range_type range( size_t grainsize=1 ) const { return const_range_type( begin(), end(), grainsize ); } //! Destroys local copies void clear() { unconstruct_locals(); my_locals.clear(); this->table_clear(); // callback is not destroyed // exemplar is not destroyed } private: template void internal_copy( const enumerable_thread_specific& other); public: template enumerable_thread_specific( const enumerable_thread_specific& other ) : internal::ets_base () { internal_copy(other); } enumerable_thread_specific( const enumerable_thread_specific& other ) : internal::ets_base () { internal_copy(other); } private: template enumerable_thread_specific & internal_assign(const enumerable_thread_specific& other) { if(static_cast( this ) != static_cast( &other )) { this->clear(); my_construct_callback->destroy(); my_construct_callback = 0; internal_copy( other ); } return *this; } public: // assignment enumerable_thread_specific& operator=(const enumerable_thread_specific& other) { return internal_assign(other); } template enumerable_thread_specific& operator=(const enumerable_thread_specific& other) { return internal_assign(other); } // combine_func_t has signature T(T,T) or T(const T&, const T&) template T combine(combine_func_t f_combine) { if(begin() == end()) { internal::destruct_only location; my_construct_callback->construct(location.value.begin()); return *location.value.begin(); } const_iterator ci = begin(); T my_result = *ci; while(++ci != end()) my_result = f_combine( my_result, *ci ); return my_result; } // combine_func_t has signature void(T) or void(const T&) template void combine_each(combine_func_t f_combine) { for(const_iterator ci = begin(); ci != end(); ++ci) { f_combine( *ci ); } } }; // enumerable_thread_specific template template void enumerable_thread_specific::internal_copy( const enumerable_thread_specific& other) { // Initialize my_construct_callback first, so that it is valid even if rest of this routine throws an exception. my_construct_callback = other.my_construct_callback->clone(); typedef internal::ets_base base; __TBB_ASSERT(my_locals.size()==0,NULL); this->table_reserve_for_copy( other ); for( base::array* r=other.my_root; r; r=r->next ) { for( size_t i=0; isize(); ++i ) { base::slot& s1 = r->at(i); if( !s1.empty() ) { base::slot& s2 = this->table_find(s1.key); if( s2.empty() ) { void* lref = &*my_locals.grow_by(1); s2.ptr = new(lref) T(*(U*)s1.ptr); s2.key = s1.key; } else { // Skip the duplicate } } } } } template< typename Container > class flattened2d { // This intermediate typedef is to address issues with VC7.1 compilers typedef typename Container::value_type conval_type; public: //! Basic types typedef typename conval_type::size_type size_type; typedef typename conval_type::difference_type difference_type; typedef typename conval_type::allocator_type allocator_type; typedef typename conval_type::value_type value_type; typedef typename conval_type::reference reference; typedef typename conval_type::const_reference const_reference; typedef typename conval_type::pointer pointer; typedef typename conval_type::const_pointer const_pointer; typedef typename internal::segmented_iterator iterator; typedef typename internal::segmented_iterator const_iterator; flattened2d( const Container &c, typename Container::const_iterator b, typename Container::const_iterator e ) : my_container(const_cast(&c)), my_begin(b), my_end(e) { } flattened2d( const Container &c ) : my_container(const_cast(&c)), my_begin(c.begin()), my_end(c.end()) { } iterator begin() { return iterator(*my_container) = my_begin; } iterator end() { return iterator(*my_container) = my_end; } const_iterator begin() const { return const_iterator(*my_container) = my_begin; } const_iterator end() const { return const_iterator(*my_container) = my_end; } size_type size() const { size_type tot_size = 0; for(typename Container::const_iterator i = my_begin; i != my_end; ++i) { tot_size += i->size(); } return tot_size; } private: Container *my_container; typename Container::const_iterator my_begin; typename Container::const_iterator my_end; }; template flattened2d flatten2d(const Container &c, const typename Container::const_iterator b, const typename Container::const_iterator e) { return flattened2d(c, b, e); } template flattened2d flatten2d(const Container &c) { return flattened2d(c); } } // interface6 namespace internal { using interface6::internal::segmented_iterator; } using interface6::enumerable_thread_specific; using interface6::flattened2d; using interface6::flatten2d; } // namespace tbb #endif ================================================ FILE: benchmarks/tbb/flow_graph.h ================================================ /* Copyright 2005-2014 Intel Corporation. All Rights Reserved. This file is part of Threading Building Blocks. Threading Building Blocks is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. Threading Building Blocks is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Threading Building Blocks; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA As a special exception, you may use this file as part of a free software library without restriction. Specifically, if other files instantiate templates or use macros or inline functions from this file, or you compile this file and link it with other files to produce an executable, this file does not by itself cause the resulting executable to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the executable file might be covered by the GNU General Public License. */ #ifndef __TBB_flow_graph_H #define __TBB_flow_graph_H #include "tbb_stddef.h" #include "atomic.h" #include "spin_mutex.h" #include "null_mutex.h" #include "spin_rw_mutex.h" #include "null_rw_mutex.h" #include "task.h" #include "cache_aligned_allocator.h" #include "tbb_exception.h" #include "internal/_aggregator_impl.h" #include "tbb_profiling.h" #if TBB_DEPRECATED_FLOW_ENQUEUE #define FLOW_SPAWN(a) tbb::task::enqueue((a)) #else #define FLOW_SPAWN(a) tbb::task::spawn((a)) #endif // use the VC10 or gcc version of tuple if it is available. #if __TBB_CPP11_TUPLE_PRESENT #include namespace tbb { namespace flow { using std::tuple; using std::tuple_size; using std::tuple_element; using std::get; } } #else #include "compat/tuple" #endif #include #include /** @file \brief The graph related classes and functions There are some applications that best express dependencies as messages passed between nodes in a graph. These messages may contain data or simply act as signals that a predecessors has completed. The graph class and its associated node classes can be used to express such applications. */ namespace tbb { namespace flow { //! An enumeration the provides the two most common concurrency levels: unlimited and serial enum concurrency { unlimited = 0, serial = 1 }; namespace interface7 { namespace internal { template class successor_cache; template class broadcast_cache; template class round_robin_cache; } //! An empty class used for messages that mean "I'm done" class continue_msg {}; template< typename T > class sender; template< typename T > class receiver; class continue_receiver; //! Pure virtual template class that defines a sender of messages of type T template< typename T > class sender { public: //! The output type of this sender typedef T output_type; //! The successor type for this node typedef receiver successor_type; virtual ~sender() {} //! Add a new successor to this node virtual bool register_successor( successor_type &r ) = 0; //! Removes a successor from this node virtual bool remove_successor( successor_type &r ) = 0; //! Request an item from the sender virtual bool try_get( T & ) { return false; } //! Reserves an item in the sender virtual bool try_reserve( T & ) { return false; } //! Releases the reserved item virtual bool try_release( ) { return false; } //! Consumes the reserved item virtual bool try_consume( ) { return false; } #if TBB_PREVIEW_FLOW_GRAPH_FEATURES //! interface to record edges for traversal & deletion virtual void internal_add_built_successor( successor_type & ) = 0; virtual void internal_delete_built_successor( successor_type & ) = 0; virtual void copy_successors( std::vector &) = 0; virtual size_t successor_count() = 0; #endif }; template< typename T > class limiter_node; // needed for resetting decrementer template< typename R, typename B > class run_and_put_task; static tbb::task * const SUCCESSFULLY_ENQUEUED = (task *)-1; #if TBB_PREVIEW_FLOW_GRAPH_FEATURES // flags to modify the behavior of the graph reset(). Can be combined. enum reset_flags { rf_reset_protocol = 0, rf_reset_bodies = 1<<0, // delete the current node body, reset to a copy of the initial node body. rf_extract = 1<<1 // delete edges (extract() for single node, reset() for graph.) }; #define __TBB_PFG_RESET_ARG(exp) exp #define __TBB_COMMA , #else #define __TBB_PFG_RESET_ARG(exp) /* nothing */ #define __TBB_COMMA /* nothing */ #endif // enqueue left task if necessary. Returns the non-enqueued task if there is one. static inline tbb::task *combine_tasks( tbb::task * left, tbb::task * right) { // if no RHS task, don't change left. if(right == NULL) return left; // right != NULL if(left == NULL) return right; if(left == SUCCESSFULLY_ENQUEUED) return right; // left contains a task if(right != SUCCESSFULLY_ENQUEUED) { // both are valid tasks FLOW_SPAWN(*left); return right; } return left; } //! Pure virtual template class that defines a receiver of messages of type T template< typename T > class receiver { public: //! The input type of this receiver typedef T input_type; //! The predecessor type for this node typedef sender predecessor_type; //! Destructor virtual ~receiver() {} //! Put an item to the receiver bool try_put( const T& t ) { task *res = try_put_task(t); if(!res) return false; if (res != SUCCESSFULLY_ENQUEUED) FLOW_SPAWN(*res); return true; } //! put item to successor; return task to run the successor if possible. protected: template< typename R, typename B > friend class run_and_put_task; template friend class internal::broadcast_cache; template friend class internal::round_robin_cache; virtual task *try_put_task(const T& t) = 0; public: //! Add a predecessor to the node virtual bool register_predecessor( predecessor_type & ) { return false; } //! Remove a predecessor from the node virtual bool remove_predecessor( predecessor_type & ) { return false; } #if TBB_PREVIEW_FLOW_GRAPH_FEATURES virtual void internal_add_built_predecessor( predecessor_type & ) = 0; virtual void internal_delete_built_predecessor( predecessor_type & ) = 0; virtual void copy_predecessors( std::vector & ) = 0; virtual size_t predecessor_count() = 0; #endif protected: //! put receiver back in initial state template friend class limiter_node; virtual void reset_receiver(__TBB_PFG_RESET_ARG(reset_flags f = rf_reset_protocol ) ) = 0; template friend class internal::successor_cache; virtual bool is_continue_receiver() { return false; } }; #if TBB_PREVIEW_FLOW_GRAPH_FEATURES //* holder of edges both for caches and for those nodes which do not have predecessor caches. // C == receiver< ... > or sender< ... >, depending. template class edge_container { public: typedef std::vector edge_vector; void add_edge( C &s) { built_edges.push_back( &s ); } void delete_edge( C &s) { for ( typename edge_vector::iterator i = built_edges.begin(); i != built_edges.end(); ++i ) { if ( *i == &s ) { (void)built_edges.erase(i); return; // only remove one predecessor per request } } } void copy_edges( edge_vector &v) { v = built_edges; } size_t edge_count() { return (size_t)(built_edges.size()); } void clear() { built_edges.clear(); } template< typename S > void sender_extract( S &s ); template< typename R > void receiver_extract( R &r ); private: edge_vector built_edges; }; #endif /* TBB_PREVIEW_FLOW_GRAPH_FEATURES */ //! Base class for receivers of completion messages /** These receivers automatically reset, but cannot be explicitly waited on */ class continue_receiver : public receiver< continue_msg > { public: //! The input type typedef continue_msg input_type; //! The predecessor type for this node typedef sender< continue_msg > predecessor_type; //! Constructor continue_receiver( int number_of_predecessors = 0 ) { my_predecessor_count = my_initial_predecessor_count = number_of_predecessors; my_current_count = 0; } //! Copy constructor continue_receiver( const continue_receiver& src ) : receiver() { my_predecessor_count = my_initial_predecessor_count = src.my_initial_predecessor_count; my_current_count = 0; } //! Destructor virtual ~continue_receiver() { } //! Increments the trigger threshold /* override */ bool register_predecessor( predecessor_type & ) { spin_mutex::scoped_lock l(my_mutex); ++my_predecessor_count; return true; } //! Decrements the trigger threshold /** Does not check to see if the removal of the predecessor now makes the current count exceed the new threshold. So removing a predecessor while the graph is active can cause unexpected results. */ /* override */ bool remove_predecessor( predecessor_type & ) { spin_mutex::scoped_lock l(my_mutex); --my_predecessor_count; return true; } #if TBB_PREVIEW_FLOW_GRAPH_FEATURES typedef std::vector predecessor_vector_type; /*override*/ void internal_add_built_predecessor( predecessor_type &s) { spin_mutex::scoped_lock l(my_mutex); my_built_predecessors.add_edge( s ); } /*override*/ void internal_delete_built_predecessor( predecessor_type &s) { spin_mutex::scoped_lock l(my_mutex); my_built_predecessors.delete_edge(s); } /*override*/ void copy_predecessors( predecessor_vector_type &v) { spin_mutex::scoped_lock l(my_mutex); my_built_predecessors.copy_edges(v); } /*override*/ size_t predecessor_count() { spin_mutex::scoped_lock l(my_mutex); return my_built_predecessors.edge_count(); } #endif /* TBB_PREVIEW_FLOW_GRAPH_FEATURES */ protected: template< typename R, typename B > friend class run_and_put_task; template friend class internal::broadcast_cache; template friend class internal::round_robin_cache; // execute body is supposed to be too small to create a task for. /* override */ task *try_put_task( const input_type & ) { { spin_mutex::scoped_lock l(my_mutex); if ( ++my_current_count < my_predecessor_count ) return SUCCESSFULLY_ENQUEUED; else my_current_count = 0; } task * res = execute(); if(!res) return SUCCESSFULLY_ENQUEUED; return res; } #if TBB_PREVIEW_FLOW_GRAPH_FEATURES edge_container my_built_predecessors; #endif spin_mutex my_mutex; int my_predecessor_count; int my_current_count; int my_initial_predecessor_count; // the friend declaration in the base class did not eliminate the "protected class" // error in gcc 4.1.2 template friend class limiter_node; /*override*/void reset_receiver( __TBB_PFG_RESET_ARG(reset_flags f) ) { my_current_count = 0; #if TBB_PREVIEW_FLOW_GRAPH_FEATURES if(f & rf_extract) { my_built_predecessors.receiver_extract(*this); my_predecessor_count = my_initial_predecessor_count; } #endif } //! Does whatever should happen when the threshold is reached /** This should be very fast or else spawn a task. This is called while the sender is blocked in the try_put(). */ virtual task * execute() = 0; template friend class internal::successor_cache; /*override*/ bool is_continue_receiver() { return true; } }; } // interface7 } // flow } // tbb #include "internal/_flow_graph_trace_impl.h" namespace tbb { namespace flow { namespace interface7 { #include "internal/_flow_graph_types_impl.h" #include "internal/_flow_graph_impl.h" using namespace internal::graph_policy_namespace; class graph; class graph_node; template class graph_iterator { friend class graph; friend class graph_node; public: typedef size_t size_type; typedef GraphNodeType value_type; typedef GraphNodeType* pointer; typedef GraphNodeType& reference; typedef const GraphNodeType& const_reference; typedef std::forward_iterator_tag iterator_category; //! Default constructor graph_iterator() : my_graph(NULL), current_node(NULL) {} //! Copy constructor graph_iterator(const graph_iterator& other) : my_graph(other.my_graph), current_node(other.current_node) {} //! Assignment graph_iterator& operator=(const graph_iterator& other) { if (this != &other) { my_graph = other.my_graph; current_node = other.current_node; } return *this; } //! Dereference reference operator*() const; //! Dereference pointer operator->() const; //! Equality bool operator==(const graph_iterator& other) const { return ((my_graph == other.my_graph) && (current_node == other.current_node)); } //! Inequality bool operator!=(const graph_iterator& other) const { return !(operator==(other)); } //! Pre-increment graph_iterator& operator++() { internal_forward(); return *this; } //! Post-increment graph_iterator operator++(int) { graph_iterator result = *this; operator++(); return result; } private: // the graph over which we are iterating GraphContainerType *my_graph; // pointer into my_graph's my_nodes list pointer current_node; //! Private initializing constructor for begin() and end() iterators graph_iterator(GraphContainerType *g, bool begin); void internal_forward(); }; //! The graph class /** This class serves as a handle to the graph */ class graph : tbb::internal::no_copy { friend class graph_node; template< typename Body > class run_task : public task { public: run_task( Body& body ) : my_body(body) {} task *execute() { my_body(); return NULL; } private: Body my_body; }; template< typename Receiver, typename Body > class run_and_put_task : public task { public: run_and_put_task( Receiver &r, Body& body ) : my_receiver(r), my_body(body) {} task *execute() { task *res = my_receiver.try_put_task( my_body() ); if(res == SUCCESSFULLY_ENQUEUED) res = NULL; return res; } private: Receiver &my_receiver; Body my_body; }; public: //! Constructs a graph with isolated task_group_context explicit graph() : my_nodes(NULL), my_nodes_last(NULL) { own_context = true; cancelled = false; caught_exception = false; my_context = new task_group_context(); my_root_task = ( new ( task::allocate_root(*my_context) ) empty_task ); my_root_task->set_ref_count(1); tbb::internal::fgt_graph( this ); #if TBB_PREVIEW_FLOW_GRAPH_FEATURES my_is_active = true; #endif } //! Constructs a graph with use_this_context as context explicit graph(task_group_context& use_this_context) : my_context(&use_this_context), my_nodes(NULL), my_nodes_last(NULL) { own_context = false; my_root_task = ( new ( task::allocate_root(*my_context) ) empty_task ); my_root_task->set_ref_count(1); tbb::internal::fgt_graph( this ); #if TBB_PREVIEW_FLOW_GRAPH_FEATURES my_is_active = true; #endif } //! Destroys the graph. /** Calls wait_for_all, then destroys the root task and context. */ ~graph() { wait_for_all(); my_root_task->set_ref_count(0); task::destroy( *my_root_task ); if (own_context) delete my_context; } #if TBB_PREVIEW_FLOW_GRAPH_TRACE void set_name( const char *name ) { tbb::internal::fgt_graph_desc( this, name ); } #endif //! Used to register that an external entity may still interact with the graph. /** The graph will not return from wait_for_all until a matching number of decrement_wait_count calls is made. */ void increment_wait_count() { if (my_root_task) my_root_task->increment_ref_count(); } //! Deregisters an external entity that may have interacted with the graph. /** The graph will not return from wait_for_all until all the number of decrement_wait_count calls matches the number of increment_wait_count calls. */ void decrement_wait_count() { if (my_root_task) my_root_task->decrement_ref_count(); } //! Spawns a task that runs a body and puts its output to a specific receiver /** The task is spawned as a child of the graph. This is useful for running tasks that need to block a wait_for_all() on the graph. For example a one-off source. */ template< typename Receiver, typename Body > void run( Receiver &r, Body body ) { FLOW_SPAWN( (* new ( task::allocate_additional_child_of( *my_root_task ) ) run_and_put_task< Receiver, Body >( r, body )) ); } //! Spawns a task that runs a function object /** The task is spawned as a child of the graph. This is useful for running tasks that need to block a wait_for_all() on the graph. For example a one-off source. */ template< typename Body > void run( Body body ) { FLOW_SPAWN( * new ( task::allocate_additional_child_of( *my_root_task ) ) run_task< Body >( body ) ); } //! Wait until graph is idle and decrement_wait_count calls equals increment_wait_count calls. /** The waiting thread will go off and steal work while it is block in the wait_for_all. */ void wait_for_all() { cancelled = false; caught_exception = false; if (my_root_task) { #if TBB_USE_EXCEPTIONS try { #endif my_root_task->wait_for_all(); cancelled = my_context->is_group_execution_cancelled(); #if TBB_USE_EXCEPTIONS } catch(...) { my_root_task->set_ref_count(1); my_context->reset(); caught_exception = true; cancelled = true; throw; } #endif my_context->reset(); // consistent with behavior in catch() my_root_task->set_ref_count(1); } } //! Returns the root task of the graph task * root_task() { #if TBB_PREVIEW_FLOW_GRAPH_FEATURES if (!my_is_active) return NULL; else #endif return my_root_task; } #if TBB_PREVIEW_FLOW_GRAPH_FEATURES void set_active(bool a = true) { my_is_active = a; } bool is_active() { return my_is_active; } #endif // ITERATORS template friend class graph_iterator; // Graph iterator typedefs typedef graph_iterator iterator; typedef graph_iterator const_iterator; // Graph iterator constructors //! start iterator iterator begin() { return iterator(this, true); } //! end iterator iterator end() { return iterator(this, false); } //! start const iterator const_iterator begin() const { return const_iterator(this, true); } //! end const iterator const_iterator end() const { return const_iterator(this, false); } //! start const iterator const_iterator cbegin() const { return const_iterator(this, true); } //! end const iterator const_iterator cend() const { return const_iterator(this, false); } //! return status of graph execution bool is_cancelled() { return cancelled; } bool exception_thrown() { return caught_exception; } // thread-unsafe state reset. void reset(__TBB_PFG_RESET_ARG(reset_flags f = rf_reset_protocol)); private: task *my_root_task; task_group_context *my_context; bool own_context; bool cancelled; bool caught_exception; #if TBB_PREVIEW_FLOW_GRAPH_FEATURES bool my_is_active; #endif graph_node *my_nodes, *my_nodes_last; spin_mutex nodelist_mutex; void register_node(graph_node *n); void remove_node(graph_node *n); }; // class graph template graph_iterator::graph_iterator(C *g, bool begin) : my_graph(g), current_node(NULL) { if (begin) current_node = my_graph->my_nodes; //else it is an end iterator by default } template typename graph_iterator::reference graph_iterator::operator*() const { __TBB_ASSERT(current_node, "graph_iterator at end"); return *operator->(); } template typename graph_iterator::pointer graph_iterator::operator->() const { return current_node; } template void graph_iterator::internal_forward() { if (current_node) current_node = current_node->next; } //! The base of all graph nodes. class graph_node : tbb::internal::no_assign { friend class graph; template friend class graph_iterator; protected: graph& my_graph; graph_node *next, *prev; public: graph_node(graph& g) : my_graph(g) { my_graph.register_node(this); } virtual ~graph_node() { my_graph.remove_node(this); } #if TBB_PREVIEW_FLOW_GRAPH_TRACE virtual void set_name( const char *name ) = 0; #endif #if TBB_PREVIEW_FLOW_GRAPH_FEATURES virtual void extract( reset_flags f=rf_extract ) { bool a = my_graph.is_active(); my_graph.set_active(false); reset((reset_flags)(f|rf_extract)); my_graph.set_active(a); } #endif protected: virtual void reset(__TBB_PFG_RESET_ARG(reset_flags f=rf_reset_protocol)) = 0; }; inline void graph::register_node(graph_node *n) { n->next = NULL; { spin_mutex::scoped_lock lock(nodelist_mutex); n->prev = my_nodes_last; if (my_nodes_last) my_nodes_last->next = n; my_nodes_last = n; if (!my_nodes) my_nodes = n; } } inline void graph::remove_node(graph_node *n) { { spin_mutex::scoped_lock lock(nodelist_mutex); __TBB_ASSERT(my_nodes && my_nodes_last, "graph::remove_node: Error: no registered nodes"); if (n->prev) n->prev->next = n->next; if (n->next) n->next->prev = n->prev; if (my_nodes_last == n) my_nodes_last = n->prev; if (my_nodes == n) my_nodes = n->next; } n->prev = n->next = NULL; } inline void graph::reset( __TBB_PFG_RESET_ARG( reset_flags f )) { // reset context task *saved_my_root_task = my_root_task; my_root_task = NULL; if(my_context) my_context->reset(); cancelled = false; caught_exception = false; // reset all the nodes comprising the graph for(iterator ii = begin(); ii != end(); ++ii) { graph_node *my_p = &(*ii); my_p->reset(__TBB_PFG_RESET_ARG(f)); } my_root_task = saved_my_root_task; } #include "internal/_flow_graph_node_impl.h" //! An executable node that acts as a source, i.e. it has no predecessors template < typename Output > class source_node : public graph_node, public sender< Output > { protected: using graph_node::my_graph; public: //! The type of the output message, which is complete typedef Output output_type; //! The type of successors of this node typedef receiver< Output > successor_type; #if TBB_PREVIEW_FLOW_GRAPH_FEATURES typedef std::vector successor_vector_type; #endif //! Constructor for a node with a successor template< typename Body > source_node( graph &g, Body body, bool is_active = true ) : graph_node(g), my_active(is_active), init_my_active(is_active), my_body( new internal::source_body_leaf< output_type, Body>(body) ), my_reserved(false), my_has_cached_item(false) { my_successors.set_owner(this); tbb::internal::fgt_node_with_body( tbb::internal::FLOW_SOURCE_NODE, &this->my_graph, static_cast *>(this), this->my_body ); } //! Copy constructor source_node( const source_node& src ) : graph_node(src.my_graph), sender(), my_active(src.init_my_active), init_my_active(src.init_my_active), my_body( src.my_body->clone() ), my_reserved(false), my_has_cached_item(false) { my_successors.set_owner(this); tbb::internal::fgt_node_with_body( tbb::internal::FLOW_SOURCE_NODE, &this->my_graph, static_cast *>(this), this->my_body ); } //! The destructor ~source_node() { delete my_body; } #if TBB_PREVIEW_FLOW_GRAPH_TRACE /* override */ void set_name( const char *name ) { tbb::internal::fgt_node_desc( this, name ); } #endif //! Add a new successor to this node /* override */ bool register_successor( successor_type &r ) { spin_mutex::scoped_lock lock(my_mutex); my_successors.register_successor(r); if ( my_active ) spawn_put(); return true; } //! Removes a successor from this node /* override */ bool remove_successor( successor_type &r ) { spin_mutex::scoped_lock lock(my_mutex); my_successors.remove_successor(r); return true; } #if TBB_PREVIEW_FLOW_GRAPH_FEATURES /*override*/void internal_add_built_successor( successor_type &r) { spin_mutex::scoped_lock lock(my_mutex); my_successors.internal_add_built_successor(r); } /*override*/void internal_delete_built_successor( successor_type &r) { spin_mutex::scoped_lock lock(my_mutex); my_successors.internal_delete_built_successor(r); } /*override*/size_t successor_count() { spin_mutex::scoped_lock lock(my_mutex); return my_successors.successor_count(); } /*override*/void copy_successors(successor_vector_type &v) { spin_mutex::scoped_lock l(my_mutex); my_successors.copy_successors(v); } #endif /* TBB_PREVIEW_FLOW_GRAPH_FEATURES */ //! Request an item from the node /*override */ bool try_get( output_type &v ) { spin_mutex::scoped_lock lock(my_mutex); if ( my_reserved ) return false; if ( my_has_cached_item ) { v = my_cached_item; my_has_cached_item = false; return true; } // we've been asked to provide an item, but we have none. enqueue a task to // provide one. spawn_put(); return false; } //! Reserves an item. /* override */ bool try_reserve( output_type &v ) { spin_mutex::scoped_lock lock(my_mutex); if ( my_reserved ) { return false; } if ( my_has_cached_item ) { v = my_cached_item; my_reserved = true; return true; } else { return false; } } //! Release a reserved item. /** true = item has been released and so remains in sender, dest must request or reserve future items */ /* override */ bool try_release( ) { spin_mutex::scoped_lock lock(my_mutex); __TBB_ASSERT( my_reserved && my_has_cached_item, "releasing non-existent reservation" ); my_reserved = false; if(!my_successors.empty()) spawn_put(); return true; } //! Consumes a reserved item /* override */ bool try_consume( ) { spin_mutex::scoped_lock lock(my_mutex); __TBB_ASSERT( my_reserved && my_has_cached_item, "consuming non-existent reservation" ); my_reserved = false; my_has_cached_item = false; if ( !my_successors.empty() ) { spawn_put(); } return true; } //! Activates a node that was created in the inactive state void activate() { spin_mutex::scoped_lock lock(my_mutex); my_active = true; if ( !my_successors.empty() ) spawn_put(); } template Body copy_function_object() { internal::source_body &body_ref = *this->my_body; return dynamic_cast< internal::source_body_leaf & >(body_ref).get_body(); } protected: //! resets the source_node to its initial state void reset( __TBB_PFG_RESET_ARG(reset_flags f)) { my_active = init_my_active; my_reserved =false; if(my_has_cached_item) { my_has_cached_item = false; } #if TBB_PREVIEW_FLOW_GRAPH_FEATURES my_successors.reset(f); if(f & rf_reset_bodies) my_body->reset_body(); #endif } private: spin_mutex my_mutex; bool my_active; bool init_my_active; internal::source_body *my_body; internal::broadcast_cache< output_type > my_successors; bool my_reserved; bool my_has_cached_item; output_type my_cached_item; // used by apply_body, can invoke body of node. bool try_reserve_apply_body(output_type &v) { spin_mutex::scoped_lock lock(my_mutex); if ( my_reserved ) { return false; } if ( !my_has_cached_item ) { tbb::internal::fgt_begin_body( my_body ); bool r = (*my_body)(my_cached_item); tbb::internal::fgt_end_body( my_body ); if (r) { my_has_cached_item = true; } } if ( my_has_cached_item ) { v = my_cached_item; my_reserved = true; return true; } else { return false; } } //! Spawns a task that applies the body /* override */ void spawn_put( ) { task* tp = this->my_graph.root_task(); if(tp) { FLOW_SPAWN( (* new ( task::allocate_additional_child_of( *tp ) ) internal:: source_task_bypass < source_node< output_type > >( *this ) ) ); } } friend class internal::source_task_bypass< source_node< output_type > >; //! Applies the body. Returning SUCCESSFULLY_ENQUEUED okay; forward_task_bypass will handle it. /* override */ task * apply_body_bypass( ) { output_type v; if ( !try_reserve_apply_body(v) ) return NULL; task *last_task = my_successors.try_put_task(v); if ( last_task ) try_consume(); else try_release(); return last_task; } }; // source_node //! Implements a function node that supports Input -> Output template < typename Input, typename Output = continue_msg, graph_buffer_policy = queueing, typename Allocator=cache_aligned_allocator > class function_node : public graph_node, public internal::function_input, public internal::function_output { protected: using graph_node::my_graph; public: typedef Input input_type; typedef Output output_type; typedef sender< input_type > predecessor_type; typedef receiver< output_type > successor_type; typedef internal::function_input fInput_type; typedef internal::function_output fOutput_type; #if TBB_PREVIEW_FLOW_GRAPH_FEAURES typedef std::vector predecessor_vector_type; typedef std::vector successor_vector_type; #endif //! Constructor template< typename Body > function_node( graph &g, size_t concurrency, Body body ) : graph_node(g), internal::function_input(g, concurrency, body) { tbb::internal::fgt_node_with_body( tbb::internal::FLOW_FUNCTION_NODE, &this->graph_node::my_graph, static_cast *>(this), static_cast *>(this), this->my_body ); } //! Copy constructor function_node( const function_node& src ) : graph_node(src.my_graph), internal::function_input( src ), fOutput_type() { tbb::internal::fgt_node_with_body( tbb::internal::FLOW_FUNCTION_NODE, &this->my_graph, static_cast *>(this), static_cast *>(this), this->my_body ); } #if TBB_PREVIEW_FLOW_GRAPH_TRACE /* override */ void set_name( const char *name ) { tbb::internal::fgt_node_desc( this, name ); } #endif protected: template< typename R, typename B > friend class run_and_put_task; template friend class internal::broadcast_cache; template friend class internal::round_robin_cache; using fInput_type::try_put_task; // override of graph_node's reset. /*override*/void reset(__TBB_PFG_RESET_ARG(reset_flags f)) { fInput_type::reset_function_input(__TBB_PFG_RESET_ARG(f)); #if TBB_PREVIEW_FLOW_GRAPH_FEATURES successors().reset(f); __TBB_ASSERT(!(f & rf_extract) || successors().empty(), "function_node successors not empty"); __TBB_ASSERT(this->my_predecessors.empty(), "function_node predecessors not empty"); #endif } /* override */ internal::broadcast_cache &successors () { return fOutput_type::my_successors; } }; //! Implements a function node that supports Input -> Output template < typename Input, typename Output, typename Allocator > class function_node : public graph_node, public internal::function_input, public internal::function_output { protected: using graph_node::my_graph; public: typedef Input input_type; typedef Output output_type; typedef sender< input_type > predecessor_type; typedef receiver< output_type > successor_type; typedef internal::function_input fInput_type; typedef internal::function_input_queue queue_type; typedef internal::function_output fOutput_type; #if TBB_PREVIEW_FLOW_GRAPH_FEATURES typedef std::vector predecessor_vector_type; typedef std::vector successor_vector_type; #endif //! Constructor template< typename Body > function_node( graph &g, size_t concurrency, Body body ) : graph_node(g), fInput_type( g, concurrency, body, new queue_type() ) { tbb::internal::fgt_node_with_body( tbb::internal::FLOW_FUNCTION_NODE, &this->graph_node::my_graph, static_cast *>(this), static_cast *>(this), this->my_body ); } //! Copy constructor function_node( const function_node& src ) : graph_node(src.graph_node::my_graph), fInput_type( src, new queue_type() ), fOutput_type() { tbb::internal::fgt_node_with_body( tbb::internal::FLOW_FUNCTION_NODE, &this->graph_node::my_graph, static_cast *>(this), static_cast *>(this), this->my_body ); } #if TBB_PREVIEW_FLOW_GRAPH_TRACE /* override */ void set_name( const char *name ) { tbb::internal::fgt_node_desc( this, name ); } #endif protected: template< typename R, typename B > friend class run_and_put_task; template friend class internal::broadcast_cache; template friend class internal::round_robin_cache; using fInput_type::try_put_task; /*override*/void reset( __TBB_PFG_RESET_ARG(reset_flags f)) { fInput_type::reset_function_input(__TBB_PFG_RESET_ARG(f)); #if TBB_PREVIEW_FLOW_GRAPH_FEATURES successors().reset(f); __TBB_ASSERT(!(f & rf_extract) || successors().empty(), "function_node successors not empty"); __TBB_ASSERT(!(f & rf_extract) || this->my_predecessors.empty(), "function_node predecessors not empty"); #endif } /* override */ internal::broadcast_cache &successors () { return fOutput_type::my_successors; } }; //! implements a function node that supports Input -> (set of outputs) // Output is a tuple of output types. template < typename Input, typename Output, graph_buffer_policy = queueing, typename Allocator=cache_aligned_allocator > class multifunction_node : public graph_node, public internal::multifunction_input < Input, typename internal::wrap_tuple_elements< tbb::flow::tuple_size::value, // #elements in tuple internal::multifunction_output, // wrap this around each element Output // the tuple providing the types >::type, Allocator > { protected: using graph_node::my_graph; private: static const int N = tbb::flow::tuple_size::value; public: typedef Input input_type; typedef typename internal::wrap_tuple_elements::type output_ports_type; private: typedef typename internal::multifunction_input base_type; typedef typename internal::function_input_queue queue_type; public: template multifunction_node( graph &g, size_t concurrency, Body body ) : graph_node(g), base_type(g,concurrency, body) { tbb::internal::fgt_multioutput_node_with_body( tbb::internal::FLOW_MULTIFUNCTION_NODE, &this->graph_node::my_graph, static_cast *>(this), this->output_ports(), this->my_body ); } multifunction_node( const multifunction_node &other) : graph_node(other.graph_node::my_graph), base_type(other) { tbb::internal::fgt_multioutput_node_with_body( tbb::internal::FLOW_MULTIFUNCTION_NODE, &this->graph_node::my_graph, static_cast *>(this), this->output_ports(), this->my_body ); } #if TBB_PREVIEW_FLOW_GRAPH_TRACE /* override */ void set_name( const char *name ) { tbb::internal::fgt_multioutput_node_desc( this, name ); } #endif // all the guts are in multifunction_input... protected: /*override*/void reset(__TBB_PFG_RESET_ARG(reset_flags f)) { base_type::reset(__TBB_PFG_RESET_ARG(f)); } }; // multifunction_node template < typename Input, typename Output, typename Allocator > class multifunction_node : public graph_node, public internal::multifunction_input::value, internal::multifunction_output, Output>::type, Allocator> { protected: using graph_node::my_graph; static const int N = tbb::flow::tuple_size::value; public: typedef Input input_type; typedef typename internal::wrap_tuple_elements::type output_ports_type; private: typedef typename internal::multifunction_input base_type; typedef typename internal::function_input_queue queue_type; public: template multifunction_node( graph &g, size_t concurrency, Body body) : graph_node(g), base_type(g,concurrency, body, new queue_type()) { tbb::internal::fgt_multioutput_node_with_body( tbb::internal::FLOW_MULTIFUNCTION_NODE, &this->graph_node::my_graph, static_cast *>(this), this->output_ports(), this->my_body ); } multifunction_node( const multifunction_node &other) : graph_node(other.graph_node::my_graph), base_type(other, new queue_type()) { tbb::internal::fgt_multioutput_node_with_body( tbb::internal::FLOW_MULTIFUNCTION_NODE, &this->graph_node::my_graph, static_cast *>(this), this->output_ports(), this->my_body ); } #if TBB_PREVIEW_FLOW_GRAPH_TRACE /* override */ void set_name( const char *name ) { tbb::internal::fgt_multioutput_node_desc( this, name ); } #endif // all the guts are in multifunction_input... protected: /*override*/void reset(__TBB_PFG_RESET_ARG(reset_flags f)) { base_type::reset(__TBB_PFG_RESET_ARG(f)); } }; // multifunction_node //! split_node: accepts a tuple as input, forwards each element of the tuple to its // successors. The node has unlimited concurrency, so though it is marked as // "rejecting" it does not reject inputs. template > class split_node : public multifunction_node { static const int N = tbb::flow::tuple_size::value; typedef multifunction_node base_type; public: typedef typename base_type::output_ports_type output_ports_type; private: struct splitting_body { void operator()(const TupleType& t, output_ports_type &p) { internal::emit_element::emit_this(t, p); } }; public: typedef TupleType input_type; typedef Allocator allocator_type; split_node(graph &g) : base_type(g, unlimited, splitting_body()) { tbb::internal::fgt_multioutput_node( tbb::internal::FLOW_SPLIT_NODE, &this->graph_node::my_graph, static_cast *>(this), this->output_ports() ); } split_node( const split_node & other) : base_type(other) { tbb::internal::fgt_multioutput_node( tbb::internal::FLOW_SPLIT_NODE, &this->graph_node::my_graph, static_cast *>(this), this->output_ports() ); } #if TBB_PREVIEW_FLOW_GRAPH_TRACE /* override */ void set_name( const char *name ) { tbb::internal::fgt_multioutput_node_desc( this, name ); } #endif }; //! Implements an executable node that supports continue_msg -> Output template class continue_node : public graph_node, public internal::continue_input, public internal::function_output { protected: using graph_node::my_graph; public: typedef continue_msg input_type; typedef Output output_type; typedef sender< input_type > predecessor_type; typedef receiver< output_type > successor_type; typedef internal::continue_input fInput_type; typedef internal::function_output fOutput_type; //! Constructor for executable node with continue_msg -> Output template continue_node( graph &g, Body body ) : graph_node(g), internal::continue_input( g, body ) { tbb::internal::fgt_node_with_body( tbb::internal::FLOW_CONTINUE_NODE, &this->my_graph, static_cast *>(this), static_cast *>(this), this->my_body ); } //! Constructor for executable node with continue_msg -> Output template continue_node( graph &g, int number_of_predecessors, Body body ) : graph_node(g), internal::continue_input( g, number_of_predecessors, body ) { tbb::internal::fgt_node_with_body( tbb::internal::FLOW_CONTINUE_NODE, &this->my_graph, static_cast *>(this), static_cast *>(this), this->my_body ); } //! Copy constructor continue_node( const continue_node& src ) : graph_node(src.graph_node::my_graph), internal::continue_input(src), internal::function_output() { tbb::internal::fgt_node_with_body( tbb::internal::FLOW_CONTINUE_NODE, &this->my_graph, static_cast *>(this), static_cast *>(this), this->my_body ); } #if TBB_PREVIEW_FLOW_GRAPH_TRACE /* override */ void set_name( const char *name ) { tbb::internal::fgt_node_desc( this, name ); } #endif protected: template< typename R, typename B > friend class run_and_put_task; template friend class internal::broadcast_cache; template friend class internal::round_robin_cache; using fInput_type::try_put_task; /*override*/void reset(__TBB_PFG_RESET_ARG(reset_flags f)) { fInput_type::reset_receiver(__TBB_PFG_RESET_ARG(f)); #if TBB_PREVIEW_FLOW_GRAPH_FEATURES successors().reset(f); __TBB_ASSERT(!(f & rf_extract) || successors().empty(), "continue_node not reset"); #endif } /* override */ internal::broadcast_cache &successors () { return fOutput_type::my_successors; } }; // continue_node template< typename T > class overwrite_node : public graph_node, public receiver, public sender { protected: using graph_node::my_graph; public: typedef T input_type; typedef T output_type; typedef sender< input_type > predecessor_type; typedef receiver< output_type > successor_type; #if TBB_PREVIEW_FLOW_GRAPH_FEATURES typedef std::vector predecessor_vector_type; typedef std::vector successor_vector_type; #endif overwrite_node(graph &g) : graph_node(g), my_buffer_is_valid(false) { my_successors.set_owner( this ); tbb::internal::fgt_node( tbb::internal::FLOW_OVERWRITE_NODE, &this->my_graph, static_cast *>(this), static_cast *>(this) ); } // Copy constructor; doesn't take anything from src; default won't work overwrite_node( const overwrite_node& src ) : graph_node(src.my_graph), receiver(), sender(), my_buffer_is_valid(false) { my_successors.set_owner( this ); tbb::internal::fgt_node( tbb::internal::FLOW_OVERWRITE_NODE, &this->my_graph, static_cast *>(this), static_cast *>(this) ); } ~overwrite_node() {} #if TBB_PREVIEW_FLOW_GRAPH_TRACE /* override */ void set_name( const char *name ) { tbb::internal::fgt_node_desc( this, name ); } #endif /* override */ bool register_successor( successor_type &s ) { spin_mutex::scoped_lock l( my_mutex ); task* tp = this->my_graph.root_task(); // just to test if we are resetting if (my_buffer_is_valid && tp) { // We have a valid value that must be forwarded immediately. if ( s.try_put( my_buffer ) || !s.register_predecessor( *this ) ) { // We add the successor: it accepted our put or it rejected it but won't let us become a predecessor my_successors.register_successor( s ); } else { // We don't add the successor: it rejected our put and we became its predecessor instead return false; } } else { // No valid value yet, just add as successor my_successors.register_successor( s ); } return true; } /* override */ bool remove_successor( successor_type &s ) { spin_mutex::scoped_lock l( my_mutex ); my_successors.remove_successor(s); return true; } #if TBB_PREVIEW_FLOW_GRAPH_FEATURES /*override*/void internal_add_built_successor( successor_type &s) { spin_mutex::scoped_lock l( my_mutex ); my_successors.internal_add_built_successor(s); } /*override*/void internal_delete_built_successor( successor_type &s) { spin_mutex::scoped_lock l( my_mutex ); my_successors.internal_delete_built_successor(s); } /*override*/size_t successor_count() { spin_mutex::scoped_lock l( my_mutex ); return my_successors.successor_count(); } /*override*/ void copy_successors(successor_vector_type &v) { spin_mutex::scoped_lock l( my_mutex ); my_successors.copy_successors(v); } /*override*/ void internal_add_built_predecessor( predecessor_type &p) { spin_mutex::scoped_lock l( my_mutex ); my_built_predecessors.add_edge(p); } /*override*/ void internal_delete_built_predecessor( predecessor_type &p) { spin_mutex::scoped_lock l( my_mutex ); my_built_predecessors.delete_edge(p); } /*override*/size_t predecessor_count() { spin_mutex::scoped_lock l( my_mutex ); return my_built_predecessors.edge_count(); } /*override*/void copy_predecessors(predecessor_vector_type &v) { spin_mutex::scoped_lock l( my_mutex ); my_built_predecessors.copy_edges(v); } #endif /* TBB_PREVIEW_FLOW_GRAPH_FEATURES */ /* override */ bool try_get( input_type &v ) { spin_mutex::scoped_lock l( my_mutex ); if ( my_buffer_is_valid ) { v = my_buffer; return true; } return false; } bool is_valid() { spin_mutex::scoped_lock l( my_mutex ); return my_buffer_is_valid; } void clear() { spin_mutex::scoped_lock l( my_mutex ); my_buffer_is_valid = false; } protected: template< typename R, typename B > friend class run_and_put_task; template friend class internal::broadcast_cache; template friend class internal::round_robin_cache; /* override */ task * try_put_task( const input_type &v ) { spin_mutex::scoped_lock l( my_mutex ); my_buffer = v; my_buffer_is_valid = true; task * rtask = my_successors.try_put_task(v); if(!rtask) rtask = SUCCESSFULLY_ENQUEUED; return rtask; } /*override*/void reset( __TBB_PFG_RESET_ARG(reset_flags f)) { my_buffer_is_valid = false; #if TBB_PREVIEW_FLOW_GRAPH_FEATURES my_successors.reset(f); if (f&rf_extract) { my_built_predecessors.receiver_extract(*this); } #endif } spin_mutex my_mutex; internal::broadcast_cache< input_type, null_rw_mutex > my_successors; #if TBB_PREVIEW_FLOW_GRAPH_FEATURES edge_container > my_built_predecessors; #endif input_type my_buffer; bool my_buffer_is_valid; /*override*/void reset_receiver(__TBB_PFG_RESET_ARG(reset_flags /*f*/)) {} }; // overwrite_node template< typename T > class write_once_node : public overwrite_node { public: typedef T input_type; typedef T output_type; typedef sender< input_type > predecessor_type; typedef receiver< output_type > successor_type; //! Constructor write_once_node(graph& g) : overwrite_node(g) { tbb::internal::fgt_node( tbb::internal::FLOW_WRITE_ONCE_NODE, &(this->my_graph), static_cast *>(this), static_cast *>(this) ); } //! Copy constructor: call base class copy constructor write_once_node( const write_once_node& src ) : overwrite_node(src) { tbb::internal::fgt_node( tbb::internal::FLOW_WRITE_ONCE_NODE, &(this->my_graph), static_cast *>(this), static_cast *>(this) ); } #if TBB_PREVIEW_FLOW_GRAPH_TRACE /* override */ void set_name( const char *name ) { tbb::internal::fgt_node_desc( this, name ); } #endif protected: template< typename R, typename B > friend class run_and_put_task; template friend class internal::broadcast_cache; template friend class internal::round_robin_cache; /* override */ task *try_put_task( const T &v ) { spin_mutex::scoped_lock l( this->my_mutex ); if ( this->my_buffer_is_valid ) { return NULL; } else { this->my_buffer = v; this->my_buffer_is_valid = true; task *res = this->my_successors.try_put_task(v); if(!res) res = SUCCESSFULLY_ENQUEUED; return res; } } }; //! Forwards messages of type T to all successors template class broadcast_node : public graph_node, public receiver, public sender { protected: using graph_node::my_graph; public: typedef T input_type; typedef T output_type; typedef sender< input_type > predecessor_type; typedef receiver< output_type > successor_type; #if TBB_PREVIEW_FLOW_GRAPH_FEATURES typedef std::vector predecessor_vector_type; typedef std::vector successor_vector_type; #endif private: internal::broadcast_cache my_successors; #if TBB_PREVIEW_FLOW_GRAPH_FEATURES edge_container my_built_predecessors; spin_mutex pred_mutex; #endif public: broadcast_node(graph& g) : graph_node(g) { my_successors.set_owner( this ); tbb::internal::fgt_node( tbb::internal::FLOW_BROADCAST_NODE, &this->my_graph, static_cast *>(this), static_cast *>(this) ); } // Copy constructor broadcast_node( const broadcast_node& src ) : graph_node(src.my_graph), receiver(), sender() { my_successors.set_owner( this ); tbb::internal::fgt_node( tbb::internal::FLOW_BROADCAST_NODE, &this->my_graph, static_cast *>(this), static_cast *>(this) ); } #if TBB_PREVIEW_FLOW_GRAPH_TRACE /* override */ void set_name( const char *name ) { tbb::internal::fgt_node_desc( this, name ); } #endif //! Adds a successor virtual bool register_successor( receiver &r ) { my_successors.register_successor( r ); return true; } //! Removes s as a successor virtual bool remove_successor( receiver &r ) { my_successors.remove_successor( r ); return true; } #if TBB_PREVIEW_FLOW_GRAPH_FEATURES /*override*/ void internal_add_built_successor(successor_type &r) { my_successors.internal_add_built_successor(r); } /*override*/ void internal_delete_built_successor(successor_type &r) { my_successors.internal_delete_built_successor(r); } /*override*/ size_t successor_count() { return my_successors.successor_count(); } /*override*/ void copy_successors(successor_vector_type &v) { my_successors.copy_successors(v); } /*override*/ void internal_add_built_predecessor( predecessor_type &p) { my_built_predecessors.add_edge(p); } /*override*/ void internal_delete_built_predecessor( predecessor_type &p) { my_built_predecessors.delete_edge(p); } /*override*/ size_t predecessor_count() { return my_built_predecessors.edge_count(); } /*override*/ void copy_predecessors(predecessor_vector_type &v) { my_built_predecessors.copy_edges(v); } #endif /* TBB_PREVIEW_FLOW_GRAPH_FEATURES */ protected: template< typename R, typename B > friend class run_and_put_task; template friend class internal::broadcast_cache; template friend class internal::round_robin_cache; //! build a task to run the successor if possible. Default is old behavior. /*override*/ task *try_put_task(const T& t) { task *new_task = my_successors.try_put_task(t); if(!new_task) new_task = SUCCESSFULLY_ENQUEUED; return new_task; } /*override*/void reset(__TBB_PFG_RESET_ARG(reset_flags f)) { #if TBB_PREVIEW_FLOW_GRAPH_FEATURES my_successors.reset(f); if (f&rf_extract) { my_built_predecessors.receiver_extract(*this); } __TBB_ASSERT(!(f & rf_extract) || my_successors.empty(), "Error resetting broadcast_node"); #endif } /*override*/void reset_receiver(__TBB_PFG_RESET_ARG(reset_flags /*f*/)) {} }; // broadcast_node //! Forwards messages in arbitrary order template > class buffer_node : public graph_node, public internal::reservable_item_buffer, public receiver, public sender { protected: using graph_node::my_graph; public: typedef T input_type; typedef T output_type; typedef sender< input_type > predecessor_type; typedef receiver< output_type > successor_type; typedef buffer_node my_class; #if TBB_PREVIEW_FLOW_GRAPH_FEATURES typedef std::vector predecessor_vector_type; typedef std::vector successor_vector_type; #endif protected: typedef size_t size_type; internal::round_robin_cache< T, null_rw_mutex > my_successors; #if TBB_PREVIEW_FLOW_GRAPH_FEATURES edge_container my_built_predecessors; #endif friend class internal::forward_task_bypass< buffer_node< T, A > >; enum op_type {reg_succ, rem_succ, req_item, res_item, rel_res, con_res, put_item, try_fwd_task #if TBB_PREVIEW_FLOW_GRAPH_FEATURES , add_blt_succ, del_blt_succ, add_blt_pred, del_blt_pred, blt_succ_cnt, blt_pred_cnt, blt_succ_cpy, blt_pred_cpy // create vector copies of preds and succs #endif }; enum op_stat {WAIT=0, SUCCEEDED, FAILED}; // implements the aggregator_operation concept class buffer_operation : public internal::aggregated_operation< buffer_operation > { public: char type; #if TBB_PREVIEW_FLOW_GRAPH_FEATURES task * ltask; union { input_type *elem; successor_type *r; predecessor_type *p; size_t cnt_val; successor_vector_type *svec; predecessor_vector_type *pvec; }; #else T *elem; task * ltask; successor_type *r; #endif buffer_operation(const T& e, op_type t) : type(char(t)) #if TBB_PREVIEW_FLOW_GRAPH_FEATURES , ltask(NULL), elem(const_cast(&e)) #else , elem(const_cast(&e)) , ltask(NULL) #endif {} buffer_operation(op_type t) : type(char(t)), ltask(NULL) {} }; bool forwarder_busy; typedef internal::aggregating_functor my_handler; friend class internal::aggregating_functor; internal::aggregator< my_handler, buffer_operation> my_aggregator; virtual void handle_operations(buffer_operation *op_list) { buffer_operation *tmp = NULL; bool try_forwarding=false; while (op_list) { tmp = op_list; op_list = op_list->next; switch (tmp->type) { case reg_succ: internal_reg_succ(tmp); try_forwarding = true; break; case rem_succ: internal_rem_succ(tmp); break; case req_item: internal_pop(tmp); break; case res_item: internal_reserve(tmp); break; case rel_res: internal_release(tmp); try_forwarding = true; break; case con_res: internal_consume(tmp); try_forwarding = true; break; case put_item: internal_push(tmp); try_forwarding = (tmp->status == SUCCEEDED); break; case try_fwd_task: internal_forward_task(tmp); break; #if TBB_PREVIEW_FLOW_GRAPH_FEATURES // edge recording case add_blt_succ: internal_add_built_succ(tmp); break; case del_blt_succ: internal_del_built_succ(tmp); break; case add_blt_pred: internal_add_built_pred(tmp); break; case del_blt_pred: internal_del_built_pred(tmp); break; case blt_succ_cnt: internal_succ_cnt(tmp); break; case blt_pred_cnt: internal_pred_cnt(tmp); break; case blt_succ_cpy: internal_copy_succs(tmp); break; case blt_pred_cpy: internal_copy_preds(tmp); break; #endif } } if (try_forwarding && !forwarder_busy) { task* tp = this->my_graph.root_task(); if(tp) { forwarder_busy = true; task *new_task = new(task::allocate_additional_child_of(*tp)) internal:: forward_task_bypass < buffer_node >(*this); // tmp should point to the last item handled by the aggregator. This is the operation // the handling thread enqueued. So modifying that record will be okay. tbb::task *z = tmp->ltask; tmp->ltask = combine_tasks(z, new_task); // in case the op generated a task } } } inline task *grab_forwarding_task( buffer_operation &op_data) { return op_data.ltask; } inline bool enqueue_forwarding_task(buffer_operation &op_data) { task *ft = grab_forwarding_task(op_data); if(ft) { FLOW_SPAWN(*ft); return true; } return false; } //! This is executed by an enqueued task, the "forwarder" virtual task *forward_task() { buffer_operation op_data(try_fwd_task); task *last_task = NULL; do { op_data.status = WAIT; op_data.ltask = NULL; my_aggregator.execute(&op_data); tbb::task *xtask = op_data.ltask; last_task = combine_tasks(last_task, xtask); } while (op_data.status == SUCCEEDED); return last_task; } //! Register successor virtual void internal_reg_succ(buffer_operation *op) { my_successors.register_successor(*(op->r)); __TBB_store_with_release(op->status, SUCCEEDED); } //! Remove successor virtual void internal_rem_succ(buffer_operation *op) { my_successors.remove_successor(*(op->r)); __TBB_store_with_release(op->status, SUCCEEDED); } #if TBB_PREVIEW_FLOW_GRAPH_FEATURES virtual void internal_add_built_succ(buffer_operation *op) { my_successors.internal_add_built_successor(*(op->r)); __TBB_store_with_release(op->status, SUCCEEDED); } virtual void internal_del_built_succ(buffer_operation *op) { my_successors.internal_delete_built_successor(*(op->r)); __TBB_store_with_release(op->status, SUCCEEDED); } virtual void internal_add_built_pred(buffer_operation *op) { my_built_predecessors.add_edge(*(op->p)); __TBB_store_with_release(op->status, SUCCEEDED); } virtual void internal_del_built_pred(buffer_operation *op) { my_built_predecessors.delete_edge(*(op->p)); __TBB_store_with_release(op->status, SUCCEEDED); } virtual void internal_succ_cnt(buffer_operation *op) { op->cnt_val = my_successors.successor_count(); __TBB_store_with_release(op->status, SUCCEEDED); } virtual void internal_pred_cnt(buffer_operation *op) { op->cnt_val = my_built_predecessors.edge_count(); __TBB_store_with_release(op->status, SUCCEEDED); } virtual void internal_copy_succs(buffer_operation *op) { my_successors.copy_successors(*(op->svec)); __TBB_store_with_release(op->status, SUCCEEDED); } virtual void internal_copy_preds(buffer_operation *op) { my_built_predecessors.copy_edges(*(op->pvec)); __TBB_store_with_release(op->status, SUCCEEDED); } #endif /* TBB_PREVIEW_FLOW_GRAPH_FEATURES */ //! Tries to forward valid items to successors virtual void internal_forward_task(buffer_operation *op) { if (this->my_reserved || !this->my_item_valid(this->my_tail-1)) { __TBB_store_with_release(op->status, FAILED); this->forwarder_busy = false; return; } T i_copy; task * last_task = NULL; size_type counter = my_successors.size(); // Try forwarding, giving each successor a chance while (counter>0 && !this->buffer_empty() && this->my_item_valid(this->my_tail-1)) { this->copy_back(i_copy); task *new_task = my_successors.try_put_task(i_copy); if(new_task) { last_task = combine_tasks(last_task, new_task); this->destroy_back(); } --counter; } op->ltask = last_task; // return task if (last_task && !counter) { __TBB_store_with_release(op->status, SUCCEEDED); } else { __TBB_store_with_release(op->status, FAILED); forwarder_busy = false; } } virtual void internal_push(buffer_operation *op) { this->push_back(*(op->elem)); __TBB_store_with_release(op->status, SUCCEEDED); } virtual void internal_pop(buffer_operation *op) { if(this->pop_back(*(op->elem))) { __TBB_store_with_release(op->status, SUCCEEDED); } else { __TBB_store_with_release(op->status, FAILED); } } virtual void internal_reserve(buffer_operation *op) { if(this->reserve_front(*(op->elem))) { __TBB_store_with_release(op->status, SUCCEEDED); } else { __TBB_store_with_release(op->status, FAILED); } } virtual void internal_consume(buffer_operation *op) { this->consume_front(); __TBB_store_with_release(op->status, SUCCEEDED); } virtual void internal_release(buffer_operation *op) { this->release_front(); __TBB_store_with_release(op->status, SUCCEEDED); } public: //! Constructor buffer_node( graph &g ) : graph_node(g), internal::reservable_item_buffer(), forwarder_busy(false) { my_successors.set_owner(this); my_aggregator.initialize_handler(my_handler(this)); tbb::internal::fgt_node( tbb::internal::FLOW_BUFFER_NODE, &this->my_graph, static_cast *>(this), static_cast *>(this) ); } //! Copy constructor buffer_node( const buffer_node& src ) : graph_node(src.my_graph), internal::reservable_item_buffer(), receiver(), sender() { forwarder_busy = false; my_successors.set_owner(this); my_aggregator.initialize_handler(my_handler(this)); tbb::internal::fgt_node( tbb::internal::FLOW_BUFFER_NODE, &this->my_graph, static_cast *>(this), static_cast *>(this) ); } virtual ~buffer_node() {} #if TBB_PREVIEW_FLOW_GRAPH_TRACE /* override */ void set_name( const char *name ) { tbb::internal::fgt_node_desc( this, name ); } #endif // // message sender implementation // //! Adds a new successor. /** Adds successor r to the list of successors; may forward tasks. */ /* override */ bool register_successor( successor_type &r ) { buffer_operation op_data(reg_succ); op_data.r = &r; my_aggregator.execute(&op_data); (void)enqueue_forwarding_task(op_data); return true; } #if TBB_PREVIEW_FLOW_GRAPH_FEATURES /*override*/ void internal_add_built_successor( successor_type &r) { buffer_operation op_data(add_blt_succ); op_data.r = &r; my_aggregator.execute(&op_data); } /*override*/ void internal_delete_built_successor( successor_type &r) { buffer_operation op_data(del_blt_succ); op_data.r = &r; my_aggregator.execute(&op_data); } /*override*/ void internal_add_built_predecessor( predecessor_type &p) { buffer_operation op_data(add_blt_pred); op_data.p = &p; my_aggregator.execute(&op_data); } /*override*/ void internal_delete_built_predecessor( predecessor_type &p) { buffer_operation op_data(del_blt_pred); op_data.p = &p; my_aggregator.execute(&op_data); } /*override*/ size_t predecessor_count() { buffer_operation op_data(blt_pred_cnt); my_aggregator.execute(&op_data); return op_data.cnt_val; } /*override*/ size_t successor_count() { buffer_operation op_data(blt_succ_cnt); my_aggregator.execute(&op_data); return op_data.cnt_val; } /*override*/ void copy_predecessors( predecessor_vector_type &v ) { buffer_operation op_data(blt_pred_cpy); op_data.pvec = &v; my_aggregator.execute(&op_data); } /*override*/ void copy_successors( successor_vector_type &v ) { buffer_operation op_data(blt_succ_cpy); op_data.svec = &v; my_aggregator.execute(&op_data); } #endif //! Removes a successor. /** Removes successor r from the list of successors. It also calls r.remove_predecessor(*this) to remove this node as a predecessor. */ /* override */ bool remove_successor( successor_type &r ) { r.remove_predecessor(*this); buffer_operation op_data(rem_succ); op_data.r = &r; my_aggregator.execute(&op_data); // even though this operation does not cause a forward, if we are the handler, and // a forward is scheduled, we may be the first to reach this point after the aggregator, // and so should check for the task. (void)enqueue_forwarding_task(op_data); return true; } //! Request an item from the buffer_node /** true = v contains the returned item
false = no item has been returned */ /* override */ bool try_get( T &v ) { buffer_operation op_data(req_item); op_data.elem = &v; my_aggregator.execute(&op_data); (void)enqueue_forwarding_task(op_data); return (op_data.status==SUCCEEDED); } //! Reserves an item. /** false = no item can be reserved
true = an item is reserved */ /* override */ bool try_reserve( T &v ) { buffer_operation op_data(res_item); op_data.elem = &v; my_aggregator.execute(&op_data); (void)enqueue_forwarding_task(op_data); return (op_data.status==SUCCEEDED); } //! Release a reserved item. /** true = item has been released and so remains in sender */ /* override */ bool try_release() { buffer_operation op_data(rel_res); my_aggregator.execute(&op_data); (void)enqueue_forwarding_task(op_data); return true; } //! Consumes a reserved item. /** true = item is removed from sender and reservation removed */ /* override */ bool try_consume() { buffer_operation op_data(con_res); my_aggregator.execute(&op_data); (void)enqueue_forwarding_task(op_data); return true; } protected: template< typename R, typename B > friend class run_and_put_task; template friend class internal::broadcast_cache; template friend class internal::round_robin_cache; //! receive an item, return a task *if possible /* override */ task *try_put_task(const T &t) { buffer_operation op_data(t, put_item); my_aggregator.execute(&op_data); task *ft = grab_forwarding_task(op_data); // sequencer_nodes can return failure (if an item has been previously inserted) // We have to spawn the returned task if our own operation fails. if(ft && op_data.status == FAILED) { // we haven't succeeded queueing the item, but for some reason the // call returned a task (if another request resulted in a successful // forward this could happen.) Queue the task and reset the pointer. FLOW_SPAWN(*ft); ft = NULL; } else if(!ft && op_data.status == SUCCEEDED) { ft = SUCCESSFULLY_ENQUEUED; } return ft; } /*override*/void reset( __TBB_PFG_RESET_ARG(reset_flags f)) { internal::reservable_item_buffer::reset(); #if TBB_PREVIEW_FLOW_GRAPH_FEATURES my_successors.reset(f); if (f&rf_extract) { my_built_predecessors.receiver_extract(*this); } #endif forwarder_busy = false; } /*override*/void reset_receiver(__TBB_PFG_RESET_ARG(reset_flags /*f*/)) { } }; // buffer_node //! Forwards messages in FIFO order template > class queue_node : public buffer_node { protected: typedef buffer_node base_type; typedef typename base_type::size_type size_type; typedef typename base_type::buffer_operation queue_operation; enum op_stat {WAIT=0, SUCCEEDED, FAILED}; /* override */ void internal_forward_task(queue_operation *op) { if (this->my_reserved || !this->my_item_valid(this->my_head)) { __TBB_store_with_release(op->status, FAILED); this->forwarder_busy = false; return; } T i_copy; task *last_task = NULL; size_type counter = this->my_successors.size(); // Keep trying to send items while there is at least one accepting successor while (counter>0 && this->my_item_valid(this->my_head)) { this->copy_front(i_copy); task *new_task = this->my_successors.try_put_task(i_copy); if(new_task) { this->destroy_front(); last_task = combine_tasks(last_task, new_task); } --counter; } op->ltask = last_task; if (last_task && !counter) __TBB_store_with_release(op->status, SUCCEEDED); else { __TBB_store_with_release(op->status, FAILED); this->forwarder_busy = false; } } /* override */ void internal_pop(queue_operation *op) { if ( this->my_reserved || !this->my_item_valid(this->my_head)){ __TBB_store_with_release(op->status, FAILED); } else { this->pop_front(*(op->elem)); __TBB_store_with_release(op->status, SUCCEEDED); } } /* override */ void internal_reserve(queue_operation *op) { if (this->my_reserved || !this->my_item_valid(this->my_head)) { __TBB_store_with_release(op->status, FAILED); } else { this->reserve_front(*(op->elem)); __TBB_store_with_release(op->status, SUCCEEDED); } } /* override */ void internal_consume(queue_operation *op) { this->consume_front(); __TBB_store_with_release(op->status, SUCCEEDED); } public: typedef T input_type; typedef T output_type; typedef sender< input_type > predecessor_type; typedef receiver< output_type > successor_type; //! Constructor queue_node( graph &g ) : base_type(g) { tbb::internal::fgt_node( tbb::internal::FLOW_QUEUE_NODE, &(this->my_graph), static_cast *>(this), static_cast *>(this) ); } //! Copy constructor queue_node( const queue_node& src) : base_type(src) { tbb::internal::fgt_node( tbb::internal::FLOW_QUEUE_NODE, &(this->my_graph), static_cast *>(this), static_cast *>(this) ); } #if TBB_PREVIEW_FLOW_GRAPH_TRACE /* override */ void set_name( const char *name ) { tbb::internal::fgt_node_desc( this, name ); } #endif /*override*/void reset( __TBB_PFG_RESET_ARG(reset_flags f)) { base_type::reset(__TBB_PFG_RESET_ARG(f)); } }; // queue_node //! Forwards messages in sequence order template< typename T, typename A=cache_aligned_allocator > class sequencer_node : public queue_node { internal::function_body< T, size_t > *my_sequencer; // my_sequencer should be a benign function and must be callable // from a parallel context. Does this mean it needn't be reset? public: typedef T input_type; typedef T output_type; typedef sender< input_type > predecessor_type; typedef receiver< output_type > successor_type; //! Constructor template< typename Sequencer > sequencer_node( graph &g, const Sequencer& s ) : queue_node(g), my_sequencer(new internal::function_body_leaf< T, size_t, Sequencer>(s) ) { tbb::internal::fgt_node( tbb::internal::FLOW_SEQUENCER_NODE, &(this->my_graph), static_cast *>(this), static_cast *>(this) ); } //! Copy constructor sequencer_node( const sequencer_node& src ) : queue_node(src), my_sequencer( src.my_sequencer->clone() ) { tbb::internal::fgt_node( tbb::internal::FLOW_SEQUENCER_NODE, &(this->my_graph), static_cast *>(this), static_cast *>(this) ); } //! Destructor ~sequencer_node() { delete my_sequencer; } #if TBB_PREVIEW_FLOW_GRAPH_TRACE /* override */ void set_name( const char *name ) { tbb::internal::fgt_node_desc( this, name ); } #endif protected: typedef typename buffer_node::size_type size_type; typedef typename buffer_node::buffer_operation sequencer_operation; enum op_stat {WAIT=0, SUCCEEDED, FAILED}; private: /* override */ void internal_push(sequencer_operation *op) { size_type tag = (*my_sequencer)(*(op->elem)); #if !TBB_DEPRECATED_SEQUENCER_DUPLICATES if(tag < this->my_head) { // have already emitted a message with this tag __TBB_store_with_release(op->status, FAILED); return; } #endif // cannot modify this->my_tail now; the buffer would be inconsistent. size_t new_tail = (tag+1 > this->my_tail) ? tag+1 : this->my_tail; if(this->size(new_tail) > this->capacity()) { this->grow_my_array(this->size(new_tail)); } this->my_tail = new_tail; if(this->place_item(tag,*(op->elem))) { __TBB_store_with_release(op->status, SUCCEEDED); } else { // already have a message with this tag __TBB_store_with_release(op->status, FAILED); } } }; // sequencer_node //! Forwards messages in priority order template< typename T, typename Compare = std::less, typename A=cache_aligned_allocator > class priority_queue_node : public buffer_node { public: typedef T input_type; typedef T output_type; typedef buffer_node base_type; typedef sender< input_type > predecessor_type; typedef receiver< output_type > successor_type; //! Constructor priority_queue_node( graph &g ) : buffer_node(g), mark(0) { tbb::internal::fgt_node( tbb::internal::FLOW_PRIORITY_QUEUE_NODE, &(this->my_graph), static_cast *>(this), static_cast *>(this) ); } //! Copy constructor priority_queue_node( const priority_queue_node &src ) : buffer_node(src), mark(0) { tbb::internal::fgt_node( tbb::internal::FLOW_PRIORITY_QUEUE_NODE, &(this->my_graph), static_cast *>(this), static_cast *>(this) ); } #if TBB_PREVIEW_FLOW_GRAPH_TRACE /* override */ void set_name( const char *name ) { tbb::internal::fgt_node_desc( this, name ); } #endif protected: /*override*/void reset( __TBB_PFG_RESET_ARG(reset_flags f)) { mark = 0; base_type::reset(__TBB_PFG_RESET_ARG(f)); } typedef typename buffer_node::size_type size_type; typedef typename buffer_node::item_type item_type; typedef typename buffer_node::buffer_operation prio_operation; enum op_stat {WAIT=0, SUCCEEDED, FAILED}; /* override */ void handle_operations(prio_operation *op_list) { prio_operation *tmp = op_list /*, *pop_list*/ ; bool try_forwarding=false; while (op_list) { tmp = op_list; op_list = op_list->next; switch (tmp->type) { case buffer_node::reg_succ: this->internal_reg_succ(tmp); try_forwarding = true; break; case buffer_node::rem_succ: this->internal_rem_succ(tmp); break; case buffer_node::put_item: internal_push(tmp); try_forwarding = true; break; case buffer_node::try_fwd_task: internal_forward_task(tmp); break; case buffer_node::rel_res: internal_release(tmp); try_forwarding = true; break; case buffer_node::con_res: internal_consume(tmp); try_forwarding = true; break; case buffer_node::req_item: internal_pop(tmp); break; case buffer_node::res_item: internal_reserve(tmp); break; #if TBB_PREVIEW_FLOW_GRAPH_FEATURES case buffer_node::add_blt_succ: this->internal_add_built_succ(tmp); break; case buffer_node::del_blt_succ: this->internal_del_built_succ(tmp); break; case buffer_node::add_blt_pred: this->internal_add_built_pred(tmp); break; case buffer_node::del_blt_pred: this->internal_del_built_pred(tmp); break; case buffer_node::blt_succ_cnt: this->internal_succ_cnt(tmp); break; case buffer_node::blt_pred_cnt: this->internal_pred_cnt(tmp); break; case buffer_node::blt_succ_cpy: this->internal_copy_succs(tmp); break; case buffer_node::blt_pred_cpy: this->internal_copy_preds(tmp); break; #endif } } // process pops! for now, no special pop processing if (markmy_tail) heapify(); if (try_forwarding && !this->forwarder_busy) { task* tp = this->my_graph.root_task(); if(tp) { this->forwarder_busy = true; task *new_task = new(task::allocate_additional_child_of(*tp)) internal:: forward_task_bypass < buffer_node >(*this); // tmp should point to the last item handled by the aggregator. This is the operation // the handling thread enqueued. So modifying that record will be okay. tbb::task *tmp1 = tmp->ltask; tmp->ltask = combine_tasks(tmp1, new_task); } } } //! Tries to forward valid items to successors /* override */ void internal_forward_task(prio_operation *op) { T i_copy; task * last_task = NULL; // flagged when a successor accepts size_type counter = this->my_successors.size(); if (this->my_reserved || this->my_tail == 0) { __TBB_store_with_release(op->status, FAILED); this->forwarder_busy = false; return; } // Keep trying to send while there exists an accepting successor while (counter>0 && this->my_tail > 0) { i_copy = this->get_my_item(0); task * new_task = this->my_successors.try_put_task(i_copy); if ( new_task ) { last_task = combine_tasks(last_task, new_task); this->destroy_item(0); // we've forwarded this item if (mark == this->my_tail) --mark; if(--(this->my_tail)) { // didn't consume last item on heap this->move_item(0,this->my_tail); } if (this->my_tail > 1) // don't reheap for heap of size 1 reheap(); } --counter; } op->ltask = last_task; if (last_task && !counter) __TBB_store_with_release(op->status, SUCCEEDED); else { __TBB_store_with_release(op->status, FAILED); this->forwarder_busy = false; } } /* override */ void internal_push(prio_operation *op) { if ( this->my_tail >= this->my_array_size ) this->grow_my_array( this->my_tail + 1 ); (void) this->place_item(this->my_tail, *(op->elem)); ++(this->my_tail); __TBB_store_with_release(op->status, SUCCEEDED); } /* override */ void internal_pop(prio_operation *op) { // if empty or already reserved, don't pop if ( this->my_reserved == true || this->my_tail == 0 ) { __TBB_store_with_release(op->status, FAILED); return; } if (markmy_tail && // item pushed, no re-heap compare(this->get_my_item(0), this->get_my_item(this->my_tail-1))) { // there are newly pushed elems; last one higher than top // copy the data this->fetch_item(this->my_tail-1, *(op->elem)); __TBB_store_with_release(op->status, SUCCEEDED); --(this->my_tail); return; } // extract and push the last element down heap *(op->elem) = this->get_my_item(0); // copy the data, item 0 still valid __TBB_store_with_release(op->status, SUCCEEDED); if (mark == this->my_tail) --mark; __TBB_ASSERT(this->my_item_valid(this->my_tail - 1), NULL); if(--(this->my_tail)) { // there were two or more items in heap. Move the // last item to the top of the heap this->set_my_item(0,this->get_my_item(this->my_tail)); } this->destroy_item(this->my_tail); if (this->my_tail > 1) // don't reheap for heap of size 1 reheap(); } /* override */ void internal_reserve(prio_operation *op) { if (this->my_reserved == true || this->my_tail == 0) { __TBB_store_with_release(op->status, FAILED); return; } this->my_reserved = true; *(op->elem) = reserved_item = this->get_my_item(0); if (mark == this->my_tail) --mark; --(this->my_tail); __TBB_store_with_release(op->status, SUCCEEDED); this->set_my_item(0, this->get_my_item(this->my_tail)); this->destroy_item(this->my_tail); if (this->my_tail > 1) reheap(); } /* override */ void internal_consume(prio_operation *op) { this->my_reserved = false; __TBB_store_with_release(op->status, SUCCEEDED); } /* override */ void internal_release(prio_operation *op) { if (this->my_tail >= this->my_array_size) this->grow_my_array( this->my_tail + 1 ); this->set_my_item(this->my_tail, reserved_item); ++(this->my_tail); this->my_reserved = false; __TBB_store_with_release(op->status, SUCCEEDED); heapify(); } private: Compare compare; size_type mark; input_type reserved_item; // turn array into heap void heapify() { if (!mark) mark = 1; for (; markmy_tail; ++mark) { // for each unheaped element size_type cur_pos = mark; input_type to_place; this->fetch_item(mark,to_place); do { // push to_place up the heap size_type parent = (cur_pos-1)>>1; if (!compare(this->get_my_item(parent), to_place)) break; this->move_item(cur_pos, parent); cur_pos = parent; } while( cur_pos ); (void) this->place_item(cur_pos, to_place); } } // otherwise heapified array with new root element; rearrange to heap void reheap() { size_type cur_pos=0, child=1; while (child < mark) { size_type target = child; if (child+1get_my_item(child), this->get_my_item(child+1))) ++target; // target now has the higher priority child if (compare(this->get_my_item(target), this->get_my_item(cur_pos))) break; // swap this->swap_items(cur_pos, target); cur_pos = target; child = (cur_pos<<1)+1; } } }; // priority_queue_node //! Forwards messages only if the threshold has not been reached /** This node forwards items until its threshold is reached. It contains no buffering. If the downstream node rejects, the message is dropped. */ template< typename T > class limiter_node : public graph_node, public receiver< T >, public sender< T > { protected: using graph_node::my_graph; public: typedef T input_type; typedef T output_type; typedef sender< input_type > predecessor_type; typedef receiver< output_type > successor_type; #if TBB_PREVIEW_FLOW_GRAPH_FEATURES typedef std::vector successor_vector_type; typedef std::vector predecessor_vector_type; #endif private: size_t my_threshold; size_t my_count; //number of successful puts size_t my_tries; //number of active put attempts internal::reservable_predecessor_cache< T, spin_mutex > my_predecessors; spin_mutex my_mutex; internal::broadcast_cache< T > my_successors; int init_decrement_predecessors; friend class internal::forward_task_bypass< limiter_node >; // Let decrementer call decrement_counter() friend class internal::decrementer< limiter_node >; bool check_conditions() { // always called under lock return ( my_count + my_tries < my_threshold && !my_predecessors.empty() && !my_successors.empty() ); } // only returns a valid task pointer or NULL, never SUCCESSFULLY_ENQUEUED task *forward_task() { input_type v; task *rval = NULL; bool reserved = false; { spin_mutex::scoped_lock lock(my_mutex); if ( check_conditions() ) ++my_tries; else return NULL; } //SUCCESS // if we can reserve and can put, we consume the reservation // we increment the count and decrement the tries if ( (my_predecessors.try_reserve(v)) == true ){ reserved=true; if ( (rval = my_successors.try_put_task(v)) != NULL ){ { spin_mutex::scoped_lock lock(my_mutex); ++my_count; --my_tries; my_predecessors.try_consume(); if ( check_conditions() ) { task* tp = this->my_graph.root_task(); if ( tp ) { task *rtask = new ( task::allocate_additional_child_of( *tp ) ) internal::forward_task_bypass< limiter_node >( *this ); FLOW_SPAWN (*rtask); } } } return rval; } } //FAILURE //if we can't reserve, we decrement the tries //if we can reserve but can't put, we decrement the tries and release the reservation { spin_mutex::scoped_lock lock(my_mutex); --my_tries; if (reserved) my_predecessors.try_release(); if ( check_conditions() ) { task* tp = this->my_graph.root_task(); if ( tp ) { task *rtask = new ( task::allocate_additional_child_of( *tp ) ) internal::forward_task_bypass< limiter_node >( *this ); __TBB_ASSERT(!rval, "Have two tasks to handle"); return rtask; } } return rval; } } void forward() { __TBB_ASSERT(false, "Should never be called"); return; } task * decrement_counter() { { spin_mutex::scoped_lock lock(my_mutex); if(my_count) --my_count; } return forward_task(); } public: //! The internal receiver< continue_msg > that decrements the count internal::decrementer< limiter_node > decrement; //! Constructor limiter_node(graph &g, size_t threshold, int num_decrement_predecessors=0) : graph_node(g), my_threshold(threshold), my_count(0), my_tries(0), init_decrement_predecessors(num_decrement_predecessors), decrement(num_decrement_predecessors) { my_predecessors.set_owner(this); my_successors.set_owner(this); decrement.set_owner(this); tbb::internal::fgt_node( tbb::internal::FLOW_LIMITER_NODE, &this->my_graph, static_cast *>(this), static_cast *>(&decrement), static_cast *>(this) ); } //! Copy constructor limiter_node( const limiter_node& src ) : graph_node(src.my_graph), receiver(), sender(), my_threshold(src.my_threshold), my_count(0), my_tries(0), init_decrement_predecessors(src.init_decrement_predecessors), decrement(src.init_decrement_predecessors) { my_predecessors.set_owner(this); my_successors.set_owner(this); decrement.set_owner(this); tbb::internal::fgt_node( tbb::internal::FLOW_LIMITER_NODE, &this->my_graph, static_cast *>(this), static_cast *>(&decrement), static_cast *>(this) ); } #if TBB_PREVIEW_FLOW_GRAPH_TRACE /* override */ void set_name( const char *name ) { tbb::internal::fgt_node_desc( this, name ); } #endif //! Replace the current successor with this new successor /* override */ bool register_successor( receiver &r ) { spin_mutex::scoped_lock lock(my_mutex); bool was_empty = my_successors.empty(); my_successors.register_successor(r); //spawn a forward task if this is the only successor if ( was_empty && !my_predecessors.empty() && my_count + my_tries < my_threshold ) { task* tp = this->my_graph.root_task(); if ( tp ) { FLOW_SPAWN( (* new ( task::allocate_additional_child_of( *tp ) ) internal::forward_task_bypass < limiter_node >( *this ) ) ); } } return true; } //! Removes a successor from this node /** r.remove_predecessor(*this) is also called. */ /* override */ bool remove_successor( receiver &r ) { r.remove_predecessor(*this); my_successors.remove_successor(r); return true; } #if TBB_PREVIEW_FLOW_GRAPH_FEATURES /*override*/void internal_add_built_successor(receiver &src) { my_successors.internal_add_built_successor(src); } /*override*/void internal_delete_built_successor(receiver &src) { my_successors.internal_delete_built_successor(src); } /*override*/size_t successor_count() { return my_successors.successor_count(); } /*override*/ void copy_successors(successor_vector_type &v) { my_successors.copy_successors(v); } /*override*/void internal_add_built_predecessor(sender &src) { my_predecessors.internal_add_built_predecessor(src); } /*override*/void internal_delete_built_predecessor(sender &src) { my_predecessors.internal_delete_built_predecessor(src); } /*override*/size_t predecessor_count() { return my_predecessors.predecessor_count(); } /*override*/ void copy_predecessors(predecessor_vector_type &v) { my_predecessors.copy_predecessors(v); } #endif /* TBB_PREVIEW_FLOW_GRAPH_FEATURES */ //! Adds src to the list of cached predecessors. /* override */ bool register_predecessor( predecessor_type &src ) { spin_mutex::scoped_lock lock(my_mutex); my_predecessors.add( src ); task* tp = this->my_graph.root_task(); if ( my_count + my_tries < my_threshold && !my_successors.empty() && tp ) { FLOW_SPAWN( (* new ( task::allocate_additional_child_of( *tp ) ) internal::forward_task_bypass < limiter_node >( *this ) ) ); } return true; } //! Removes src from the list of cached predecessors. /* override */ bool remove_predecessor( predecessor_type &src ) { my_predecessors.remove( src ); return true; } protected: template< typename R, typename B > friend class run_and_put_task; template friend class internal::broadcast_cache; template friend class internal::round_robin_cache; //! Puts an item to this receiver /* override */ task *try_put_task( const T &t ) { { spin_mutex::scoped_lock lock(my_mutex); if ( my_count + my_tries >= my_threshold ) return NULL; else ++my_tries; } task * rtask = my_successors.try_put_task(t); if ( !rtask ) { // try_put_task failed. spin_mutex::scoped_lock lock(my_mutex); --my_tries; task* tp = this->my_graph.root_task(); if ( check_conditions() && tp ) { rtask = new ( task::allocate_additional_child_of( *tp ) ) internal::forward_task_bypass< limiter_node >( *this ); } } else { spin_mutex::scoped_lock lock(my_mutex); ++my_count; --my_tries; } return rtask; } /*override*/void reset( __TBB_PFG_RESET_ARG(reset_flags f)) { my_count = 0; my_predecessors.reset(__TBB_PFG_RESET_ARG(f)); decrement.reset_receiver(__TBB_PFG_RESET_ARG(f)); #if TBB_PREVIEW_FLOW_GRAPH_FEATURES my_successors.reset(f); #endif } /*override*/void reset_receiver(__TBB_PFG_RESET_ARG(reset_flags f)) { my_predecessors.reset(__TBB_PFG_RESET_ARG(f)); } }; // limiter_node #include "internal/_flow_graph_join_impl.h" using internal::reserving_port; using internal::queueing_port; using internal::tag_matching_port; using internal::input_port; using internal::tag_value; using internal::NO_TAG; template class join_node; template class join_node: public internal::unfolded_join_node::value, reserving_port, OutputTuple, reserving> { private: static const int N = tbb::flow::tuple_size::value; typedef typename internal::unfolded_join_node unfolded_type; public: typedef OutputTuple output_type; typedef typename unfolded_type::input_ports_type input_ports_type; join_node(graph &g) : unfolded_type(g) { tbb::internal::fgt_multiinput_node( tbb::internal::FLOW_JOIN_NODE_RESERVING, &this->my_graph, this->input_ports(), static_cast< sender< output_type > *>(this) ); } join_node(const join_node &other) : unfolded_type(other) { tbb::internal::fgt_multiinput_node( tbb::internal::FLOW_JOIN_NODE_RESERVING, &this->my_graph, this->input_ports(), static_cast< sender< output_type > *>(this) ); } #if TBB_PREVIEW_FLOW_GRAPH_TRACE /* override */ void set_name( const char *name ) { tbb::internal::fgt_node_desc( this, name ); } #endif }; template class join_node: public internal::unfolded_join_node::value, queueing_port, OutputTuple, queueing> { private: static const int N = tbb::flow::tuple_size::value; typedef typename internal::unfolded_join_node unfolded_type; public: typedef OutputTuple output_type; typedef typename unfolded_type::input_ports_type input_ports_type; join_node(graph &g) : unfolded_type(g) { tbb::internal::fgt_multiinput_node( tbb::internal::FLOW_JOIN_NODE_QUEUEING, &this->my_graph, this->input_ports(), static_cast< sender< output_type > *>(this) ); } join_node(const join_node &other) : unfolded_type(other) { tbb::internal::fgt_multiinput_node( tbb::internal::FLOW_JOIN_NODE_QUEUEING, &this->my_graph, this->input_ports(), static_cast< sender< output_type > *>(this) ); } #if TBB_PREVIEW_FLOW_GRAPH_TRACE /* override */ void set_name( const char *name ) { tbb::internal::fgt_node_desc( this, name ); } #endif }; // template for tag_matching join_node template class join_node : public internal::unfolded_join_node::value, tag_matching_port, OutputTuple, tag_matching> { private: static const int N = tbb::flow::tuple_size::value; typedef typename internal::unfolded_join_node unfolded_type; public: typedef OutputTuple output_type; typedef typename unfolded_type::input_ports_type input_ports_type; template join_node(graph &g, __TBB_B0 b0, __TBB_B1 b1) : unfolded_type(g, b0, b1) { tbb::internal::fgt_multiinput_node( tbb::internal::FLOW_JOIN_NODE_TAG_MATCHING, &this->my_graph, this->input_ports(), static_cast< sender< output_type > *>(this) ); } template join_node(graph &g, __TBB_B0 b0, __TBB_B1 b1, __TBB_B2 b2) : unfolded_type(g, b0, b1, b2) { tbb::internal::fgt_multiinput_node( tbb::internal::FLOW_JOIN_NODE_TAG_MATCHING, &this->my_graph, this->input_ports(), static_cast< sender< output_type > *>(this) ); } template join_node(graph &g, __TBB_B0 b0, __TBB_B1 b1, __TBB_B2 b2, __TBB_B3 b3) : unfolded_type(g, b0, b1, b2, b3) { tbb::internal::fgt_multiinput_node( tbb::internal::FLOW_JOIN_NODE_TAG_MATCHING, &this->my_graph, this->input_ports(), static_cast< sender< output_type > *>(this) ); } template join_node(graph &g, __TBB_B0 b0, __TBB_B1 b1, __TBB_B2 b2, __TBB_B3 b3, __TBB_B4 b4) : unfolded_type(g, b0, b1, b2, b3, b4) { tbb::internal::fgt_multiinput_node( tbb::internal::FLOW_JOIN_NODE_TAG_MATCHING, &this->my_graph, this->input_ports(), static_cast< sender< output_type > *>(this) ); } #if __TBB_VARIADIC_MAX >= 6 template join_node(graph &g, __TBB_B0 b0, __TBB_B1 b1, __TBB_B2 b2, __TBB_B3 b3, __TBB_B4 b4, __TBB_B5 b5) : unfolded_type(g, b0, b1, b2, b3, b4, b5) { tbb::internal::fgt_multiinput_node( tbb::internal::FLOW_JOIN_NODE_TAG_MATCHING, &this->my_graph, this->input_ports(), static_cast< sender< output_type > *>(this) ); } #endif #if __TBB_VARIADIC_MAX >= 7 template join_node(graph &g, __TBB_B0 b0, __TBB_B1 b1, __TBB_B2 b2, __TBB_B3 b3, __TBB_B4 b4, __TBB_B5 b5, __TBB_B6 b6) : unfolded_type(g, b0, b1, b2, b3, b4, b5, b6) { tbb::internal::fgt_multiinput_node( tbb::internal::FLOW_JOIN_NODE_TAG_MATCHING, &this->my_graph, this->input_ports(), static_cast< sender< output_type > *>(this) ); } #endif #if __TBB_VARIADIC_MAX >= 8 template join_node(graph &g, __TBB_B0 b0, __TBB_B1 b1, __TBB_B2 b2, __TBB_B3 b3, __TBB_B4 b4, __TBB_B5 b5, __TBB_B6 b6, __TBB_B7 b7) : unfolded_type(g, b0, b1, b2, b3, b4, b5, b6, b7) { tbb::internal::fgt_multiinput_node( tbb::internal::FLOW_JOIN_NODE_TAG_MATCHING, &this->my_graph, this->input_ports(), static_cast< sender< output_type > *>(this) ); } #endif #if __TBB_VARIADIC_MAX >= 9 template join_node(graph &g, __TBB_B0 b0, __TBB_B1 b1, __TBB_B2 b2, __TBB_B3 b3, __TBB_B4 b4, __TBB_B5 b5, __TBB_B6 b6, __TBB_B7 b7, __TBB_B8 b8) : unfolded_type(g, b0, b1, b2, b3, b4, b5, b6, b7, b8) { tbb::internal::fgt_multiinput_node( tbb::internal::FLOW_JOIN_NODE_TAG_MATCHING, &this->my_graph, this->input_ports(), static_cast< sender< output_type > *>(this) ); } #endif #if __TBB_VARIADIC_MAX >= 10 template join_node(graph &g, __TBB_B0 b0, __TBB_B1 b1, __TBB_B2 b2, __TBB_B3 b3, __TBB_B4 b4, __TBB_B5 b5, __TBB_B6 b6, __TBB_B7 b7, __TBB_B8 b8, __TBB_B9 b9) : unfolded_type(g, b0, b1, b2, b3, b4, b5, b6, b7, b8, b9) { tbb::internal::fgt_multiinput_node( tbb::internal::FLOW_JOIN_NODE_TAG_MATCHING, &this->my_graph, this->input_ports(), static_cast< sender< output_type > *>(this) ); } #endif join_node(const join_node &other) : unfolded_type(other) { tbb::internal::fgt_multiinput_node( tbb::internal::FLOW_JOIN_NODE_TAG_MATCHING, &this->my_graph, this->input_ports(), static_cast< sender< output_type > *>(this) ); } #if TBB_PREVIEW_FLOW_GRAPH_TRACE /* override */ void set_name( const char *name ) { tbb::internal::fgt_node_desc( this, name ); } #endif }; // indexer node #include "internal/_flow_graph_indexer_impl.h" struct indexer_null_type {}; template class indexer_node; //indexer node specializations template class indexer_node : public internal::unfolded_indexer_node > { private: static const int N = 1; public: typedef tuple InputTuple; typedef typename internal::tagged_msg output_type; typedef typename internal::unfolded_indexer_node unfolded_type; indexer_node(graph& g) : unfolded_type(g) { tbb::internal::fgt_multiinput_node( tbb::internal::FLOW_INDEXER_NODE, &this->my_graph, this->input_ports(), static_cast< sender< output_type > *>(this) ); } // Copy constructor indexer_node( const indexer_node& other ) : unfolded_type(other) { tbb::internal::fgt_multiinput_node( tbb::internal::FLOW_INDEXER_NODE, &this->my_graph, this->input_ports(), static_cast< sender< output_type > *>(this) ); } #if TBB_PREVIEW_FLOW_GRAPH_TRACE void set_name( const char *name ) { tbb::internal::fgt_node_desc( this, name ); } #endif }; template class indexer_node : public internal::unfolded_indexer_node > { private: static const int N = 2; public: typedef tuple InputTuple; typedef typename internal::tagged_msg output_type; typedef typename internal::unfolded_indexer_node unfolded_type; indexer_node(graph& g) : unfolded_type(g) { tbb::internal::fgt_multiinput_node( tbb::internal::FLOW_INDEXER_NODE, &this->my_graph, this->input_ports(), static_cast< sender< output_type > *>(this) ); } // Copy constructor indexer_node( const indexer_node& other ) : unfolded_type(other) { tbb::internal::fgt_multiinput_node( tbb::internal::FLOW_INDEXER_NODE, &this->my_graph, this->input_ports(), static_cast< sender< output_type > *>(this) ); } #if TBB_PREVIEW_FLOW_GRAPH_TRACE void set_name( const char *name ) { tbb::internal::fgt_node_desc( this, name ); } #endif }; template class indexer_node : public internal::unfolded_indexer_node > { private: static const int N = 3; public: typedef tuple InputTuple; typedef typename internal::tagged_msg output_type; typedef typename internal::unfolded_indexer_node unfolded_type; indexer_node(graph& g) : unfolded_type(g) { tbb::internal::fgt_multiinput_node( tbb::internal::FLOW_INDEXER_NODE, &this->my_graph, this->input_ports(), static_cast< sender< output_type > *>(this) ); } // Copy constructor indexer_node( const indexer_node& other ) : unfolded_type(other) { tbb::internal::fgt_multiinput_node( tbb::internal::FLOW_INDEXER_NODE, &this->my_graph, this->input_ports(), static_cast< sender< output_type > *>(this) ); } #if TBB_PREVIEW_FLOW_GRAPH_TRACE void set_name( const char *name ) { tbb::internal::fgt_node_desc( this, name ); } #endif }; template class indexer_node : public internal::unfolded_indexer_node > { private: static const int N = 4; public: typedef tuple InputTuple; typedef typename internal::tagged_msg output_type; typedef typename internal::unfolded_indexer_node unfolded_type; indexer_node(graph& g) : unfolded_type(g) { tbb::internal::fgt_multiinput_node( tbb::internal::FLOW_INDEXER_NODE, &this->my_graph, this->input_ports(), static_cast< sender< output_type > *>(this) ); } // Copy constructor indexer_node( const indexer_node& other ) : unfolded_type(other) { tbb::internal::fgt_multiinput_node( tbb::internal::FLOW_INDEXER_NODE, &this->my_graph, this->input_ports(), static_cast< sender< output_type > *>(this) ); } #if TBB_PREVIEW_FLOW_GRAPH_TRACE /* override */ void set_name( const char *name ) { tbb::internal::fgt_node_desc( this, name ); } #endif }; template class indexer_node : public internal::unfolded_indexer_node > { private: static const int N = 5; public: typedef tuple InputTuple; typedef typename internal::tagged_msg output_type; typedef typename internal::unfolded_indexer_node unfolded_type; indexer_node(graph& g) : unfolded_type(g) { tbb::internal::fgt_multiinput_node( tbb::internal::FLOW_INDEXER_NODE, &this->my_graph, this->input_ports(), static_cast< sender< output_type > *>(this) ); } // Copy constructor indexer_node( const indexer_node& other ) : unfolded_type(other) { tbb::internal::fgt_multiinput_node( tbb::internal::FLOW_INDEXER_NODE, &this->my_graph, this->input_ports(), static_cast< sender< output_type > *>(this) ); } #if TBB_PREVIEW_FLOW_GRAPH_TRACE /* override */ void set_name( const char *name ) { tbb::internal::fgt_node_desc( this, name ); } #endif }; #if __TBB_VARIADIC_MAX >= 6 template class indexer_node : public internal::unfolded_indexer_node > { private: static const int N = 6; public: typedef tuple InputTuple; typedef typename internal::tagged_msg output_type; typedef typename internal::unfolded_indexer_node unfolded_type; indexer_node(graph& g) : unfolded_type(g) { tbb::internal::fgt_multiinput_node( tbb::internal::FLOW_INDEXER_NODE, &this->my_graph, this->input_ports(), static_cast< sender< output_type > *>(this) ); } // Copy constructor indexer_node( const indexer_node& other ) : unfolded_type(other) { tbb::internal::fgt_multiinput_node( tbb::internal::FLOW_INDEXER_NODE, &this->my_graph, this->input_ports(), static_cast< sender< output_type > *>(this) ); } #if TBB_PREVIEW_FLOW_GRAPH_TRACE /* override */ void set_name( const char *name ) { tbb::internal::fgt_node_desc( this, name ); } #endif }; #endif //variadic max 6 #if __TBB_VARIADIC_MAX >= 7 template class indexer_node : public internal::unfolded_indexer_node > { private: static const int N = 7; public: typedef tuple InputTuple; typedef typename internal::tagged_msg output_type; typedef typename internal::unfolded_indexer_node unfolded_type; indexer_node(graph& g) : unfolded_type(g) { tbb::internal::fgt_multiinput_node( tbb::internal::FLOW_INDEXER_NODE, &this->my_graph, this->input_ports(), static_cast< sender< output_type > *>(this) ); } // Copy constructor indexer_node( const indexer_node& other ) : unfolded_type(other) { tbb::internal::fgt_multiinput_node( tbb::internal::FLOW_INDEXER_NODE, &this->my_graph, this->input_ports(), static_cast< sender< output_type > *>(this) ); } #if TBB_PREVIEW_FLOW_GRAPH_TRACE /* override */ void set_name( const char *name ) { tbb::internal::fgt_node_desc( this, name ); } #endif }; #endif //variadic max 7 #if __TBB_VARIADIC_MAX >= 8 template class indexer_node : public internal::unfolded_indexer_node > { private: static const int N = 8; public: typedef tuple InputTuple; typedef typename internal::tagged_msg output_type; typedef typename internal::unfolded_indexer_node unfolded_type; indexer_node(graph& g) : unfolded_type(g) { tbb::internal::fgt_multiinput_node( tbb::internal::FLOW_INDEXER_NODE, &this->my_graph, this->input_ports(), static_cast< sender< output_type > *>(this) ); } // Copy constructor indexer_node( const indexer_node& other ) : unfolded_type(other) { tbb::internal::fgt_multiinput_node( tbb::internal::FLOW_INDEXER_NODE, &this->my_graph, this->input_ports(), static_cast< sender< output_type > *>(this) ); } #if TBB_PREVIEW_FLOW_GRAPH_TRACE /* override */ void set_name( const char *name ) { tbb::internal::fgt_node_desc( this, name ); } #endif }; #endif //variadic max 8 #if __TBB_VARIADIC_MAX >= 9 template class indexer_node : public internal::unfolded_indexer_node > { private: static const int N = 9; public: typedef tuple InputTuple; typedef typename internal::tagged_msg output_type; typedef typename internal::unfolded_indexer_node unfolded_type; indexer_node(graph& g) : unfolded_type(g) { tbb::internal::fgt_multiinput_node( tbb::internal::FLOW_INDEXER_NODE, &this->my_graph, this->input_ports(), static_cast< sender< output_type > *>(this) ); } // Copy constructor indexer_node( const indexer_node& other ) : unfolded_type(other) { tbb::internal::fgt_multiinput_node( tbb::internal::FLOW_INDEXER_NODE, &this->my_graph, this->input_ports(), static_cast< sender< output_type > *>(this) ); } #if TBB_PREVIEW_FLOW_GRAPH_TRACE /* override */ void set_name( const char *name ) { tbb::internal::fgt_node_desc( this, name ); } #endif }; #endif //variadic max 9 #if __TBB_VARIADIC_MAX >= 10 template class indexer_node/*default*/ : public internal::unfolded_indexer_node > { private: static const int N = 10; public: typedef tuple InputTuple; typedef typename internal::tagged_msg output_type; typedef typename internal::unfolded_indexer_node unfolded_type; indexer_node(graph& g) : unfolded_type(g) { tbb::internal::fgt_multiinput_node( tbb::internal::FLOW_INDEXER_NODE, &this->my_graph, this->input_ports(), static_cast< sender< output_type > *>(this) ); } // Copy constructor indexer_node( const indexer_node& other ) : unfolded_type(other) { tbb::internal::fgt_multiinput_node( tbb::internal::FLOW_INDEXER_NODE, &this->my_graph, this->input_ports(), static_cast< sender< output_type > *>(this) ); } #if TBB_PREVIEW_FLOW_GRAPH_TRACE /* override */ void set_name( const char *name ) { tbb::internal::fgt_node_desc( this, name ); } #endif }; #endif //variadic max 10 //! Makes an edge between a single predecessor and a single successor template< typename T > inline void make_edge( sender &p, receiver &s ) { #if TBB_PREVIEW_FLOW_GRAPH_FEATURES s.internal_add_built_predecessor(p); p.internal_add_built_successor(s); #endif p.register_successor( s ); tbb::internal::fgt_make_edge( &p, &s ); } //! Makes an edge between a single predecessor and a single successor template< typename T > inline void remove_edge( sender &p, receiver &s ) { p.remove_successor( s ); #if TBB_PREVIEW_FLOW_GRAPH_FEATURES // TODO: should we try to remove p from the predecessor list of s, in case the edge is reversed? p.internal_delete_built_successor(s); s.internal_delete_built_predecessor(p); #endif tbb::internal::fgt_remove_edge( &p, &s ); } #if TBB_PREVIEW_FLOW_GRAPH_FEATURES template template< typename S > void edge_container::sender_extract( S &s ) { edge_vector e = built_edges; for ( typename edge_vector::iterator i = e.begin(); i != e.end(); ++i ) { remove_edge(s, **i); } } template template< typename R > void edge_container::receiver_extract( R &r ) { edge_vector e = built_edges; for ( typename edge_vector::iterator i = e.begin(); i != e.end(); ++i ) { remove_edge(**i, r); } } #endif //! Returns a copy of the body from a function or continue node template< typename Body, typename Node > Body copy_body( Node &n ) { return n.template copy_function_object(); } } // interface7 #if TBB_PREVIEW_FLOW_GRAPH_FEATURES using interface7::reset_flags; using interface7::rf_reset_protocol; using interface7::rf_reset_bodies; using interface7::rf_extract; #endif using interface7::graph; using interface7::graph_node; using interface7::continue_msg; using interface7::sender; using interface7::receiver; using interface7::continue_receiver; using interface7::source_node; using interface7::function_node; using interface7::multifunction_node; using interface7::split_node; using interface7::internal::output_port; using interface7::indexer_node; using interface7::internal::tagged_msg; using interface7::internal::cast_to; using interface7::internal::is_a; using interface7::continue_node; using interface7::overwrite_node; using interface7::write_once_node; using interface7::broadcast_node; using interface7::buffer_node; using interface7::queue_node; using interface7::sequencer_node; using interface7::priority_queue_node; using interface7::limiter_node; using namespace interface7::internal::graph_policy_namespace; using interface7::join_node; using interface7::input_port; using interface7::copy_body; using interface7::make_edge; using interface7::remove_edge; using interface7::internal::NO_TAG; using interface7::internal::tag_value; } // flow } // tbb #undef __TBB_PFG_RESET_ARG #undef __TBB_COMMA #endif // __TBB_flow_graph_H ================================================ FILE: benchmarks/tbb/governor.cpp ================================================ /* Copyright 2005-2014 Intel Corporation. All Rights Reserved. This file is part of Threading Building Blocks. Threading Building Blocks is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. Threading Building Blocks is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Threading Building Blocks; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA As a special exception, you may use this file as part of a free software library without restriction. Specifically, if other files instantiate templates or use macros or inline functions from this file, or you compile this file and link it with other files to produce an executable, this file does not by itself cause the resulting executable to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the executable file might be covered by the GNU General Public License. */ #include #include #include "governor.h" #include "tbb_main.h" #include "scheduler.h" #include "market.h" #include "arena.h" #include "tbb/task_scheduler_init.h" #include "dynamic_link.h" namespace tbb { namespace internal { //------------------------------------------------------------------------ // governor //------------------------------------------------------------------------ #if __TBB_SURVIVE_THREAD_SWITCH // Support for interoperability with Intel(R) Cilk(TM) Plus. #if _WIN32 #define CILKLIB_NAME "cilkrts20.dll" #else #define CILKLIB_NAME "libcilkrts.so" #endif //! Handler for interoperation with cilkrts library. static __cilk_tbb_retcode (*watch_stack_handler)(struct __cilk_tbb_unwatch_thunk* u, struct __cilk_tbb_stack_op_thunk o); //! Table describing how to link the handlers. static const dynamic_link_descriptor CilkLinkTable[] = { { "__cilkrts_watch_stack", (pointer_to_handler*)(void*)(&watch_stack_handler) } }; static atomic cilkrts_load_state; bool initialize_cilk_interop() { // Pinning can fail. This is a normal situation, and means that the current // thread does not use cilkrts and consequently does not need interop. return dynamic_link( CILKLIB_NAME, CilkLinkTable, 1, /*handle=*/0, DYNAMIC_LINK_GLOBAL ); } #endif /* __TBB_SURVIVE_THREAD_SWITCH */ namespace rml { tbb_server* make_private_server( tbb_client& client ); } void governor::acquire_resources () { #if USE_PTHREAD int status = theTLS.create(auto_terminate); #else int status = theTLS.create(); #endif if( status ) handle_perror(status, "TBB failed to initialize task scheduler TLS\n"); is_speculation_enabled = cpu_has_speculation(); } void governor::release_resources () { theRMLServerFactory.close(); #if TBB_USE_ASSERT if( __TBB_InitOnce::initialization_done() && theTLS.get() ) runtime_warning( "TBB is unloaded while tbb::task_scheduler_init object is alive?" ); #endif int status = theTLS.destroy(); if( status ) runtime_warning("failed to destroy task scheduler TLS: %s", strerror(status)); dynamic_unlink_all(); } rml::tbb_server* governor::create_rml_server ( rml::tbb_client& client ) { rml::tbb_server* server = NULL; if( !UsePrivateRML ) { ::rml::factory::status_type status = theRMLServerFactory.make_server( server, client ); if( status != ::rml::factory::st_success ) { UsePrivateRML = true; runtime_warning( "rml::tbb_factory::make_server failed with status %x, falling back on private rml", status ); } } if ( !server ) { __TBB_ASSERT( UsePrivateRML, NULL ); server = rml::make_private_server( client ); } __TBB_ASSERT( server, "Failed to create RML server" ); return server; } void governor::sign_on(generic_scheduler* s) { __TBB_ASSERT( !theTLS.get(), NULL ); theTLS.set(s); #if __TBB_SURVIVE_THREAD_SWITCH if( watch_stack_handler ) { __cilk_tbb_stack_op_thunk o; o.routine = &stack_op_handler; o.data = s; if( (*watch_stack_handler)(&s->my_cilk_unwatch_thunk, o) ) { // Failed to register with cilkrts, make sure we are clean s->my_cilk_unwatch_thunk.routine = NULL; } #if TBB_USE_ASSERT else s->my_cilk_state = generic_scheduler::cs_running; #endif /* TBB_USE_ASSERT */ } #endif /* __TBB_SURVIVE_THREAD_SWITCH */ } void governor::sign_off(generic_scheduler* s) { suppress_unused_warning(s); __TBB_ASSERT( theTLS.get()==s, "attempt to unregister a wrong scheduler instance" ); theTLS.set(NULL); #if __TBB_SURVIVE_THREAD_SWITCH __cilk_tbb_unwatch_thunk &ut = s->my_cilk_unwatch_thunk; if ( ut.routine ) (*ut.routine)(ut.data); #endif /* __TBB_SURVIVE_THREAD_SWITCH */ } void governor::setBlockingTerminate(const task_scheduler_init *tsi) { __TBB_ASSERT(!IsBlockingTerminationInProgress, "It's impossible to create task_scheduler_init while blocking termination is in progress."); if (BlockingTSI) throw_exception(eid_blocking_sch_init); BlockingTSI = tsi; } generic_scheduler* governor::init_scheduler( unsigned num_threads, stack_size_type stack_size, bool auto_init ) { if( !__TBB_InitOnce::initialization_done() ) DoOneTimeInitializations(); generic_scheduler* s = theTLS.get(); if( s ) { s->my_ref_count += 1; return s; } #if __TBB_SURVIVE_THREAD_SWITCH atomic_do_once( &initialize_cilk_interop, cilkrts_load_state ); #endif /* __TBB_SURVIVE_THREAD_SWITCH */ if( (int)num_threads == task_scheduler_init::automatic ) num_threads = default_num_threads(); s = generic_scheduler::create_master( market::create_arena( num_threads - 1, stack_size ? stack_size : ThreadStackSize ) ); __TBB_ASSERT(s, "Somehow a local scheduler creation for a master thread failed"); s->my_auto_initialized = auto_init; return s; } void governor::terminate_scheduler( generic_scheduler* s, const task_scheduler_init* tsi_ptr ) { __TBB_ASSERT( s == theTLS.get(), "Attempt to terminate non-local scheduler instance" ); if (--(s->my_ref_count)) { if (BlockingTSI && BlockingTSI==tsi_ptr) { // can't throw exception, because this is on dtor's call chain fprintf(stderr, "Attempt to terminate nested scheduler in blocking mode\n"); exit(1); } } else { #if TBB_USE_ASSERT if (BlockingTSI) { __TBB_ASSERT( BlockingTSI == tsi_ptr, "For blocking termination last terminate_scheduler must be blocking." ); IsBlockingTerminationInProgress = true; } #endif s->cleanup_master(); BlockingTSI = NULL; #if TBB_USE_ASSERT IsBlockingTerminationInProgress = false; #endif } } void governor::auto_terminate(void* arg){ generic_scheduler* s = static_cast(arg); if( s && s->my_auto_initialized ) { if( !--(s->my_ref_count) ) { __TBB_ASSERT( !BlockingTSI, "Blocking auto-terminate is not supported." ); // If the TLS slot is already cleared by OS or underlying concurrency // runtime, restore its value. if ( !theTLS.get() ) theTLS.set(s); else __TBB_ASSERT( s == theTLS.get(), NULL ); s->cleanup_master(); __TBB_ASSERT( !theTLS.get(), "cleanup_master has not cleared its TLS slot" ); } } } void governor::print_version_info () { if ( UsePrivateRML ) PrintExtraVersionInfo( "RML", "private" ); else { PrintExtraVersionInfo( "RML", "shared" ); theRMLServerFactory.call_with_server_info( PrintRMLVersionInfo, (void*)"" ); } #if __TBB_SURVIVE_THREAD_SWITCH if( watch_stack_handler ) PrintExtraVersionInfo( "CILK", CILKLIB_NAME ); #endif /* __TBB_SURVIVE_THREAD_SWITCH */ } void governor::initialize_rml_factory () { ::rml::factory::status_type res = theRMLServerFactory.open(); UsePrivateRML = res != ::rml::factory::st_success; } #if __TBB_SURVIVE_THREAD_SWITCH __cilk_tbb_retcode governor::stack_op_handler( __cilk_tbb_stack_op op, void* data ) { __TBB_ASSERT(data,NULL); generic_scheduler* s = static_cast(data); #if TBB_USE_ASSERT void* current = theTLS.get(); #if _WIN32||_WIN64 uintptr_t thread_id = GetCurrentThreadId(); #else uintptr_t thread_id = uintptr_t(pthread_self()); #endif #endif /* TBB_USE_ASSERT */ switch( op ) { default: __TBB_ASSERT( 0, "invalid op" ); case CILK_TBB_STACK_ADOPT: { __TBB_ASSERT( !current && s->my_cilk_state==generic_scheduler::cs_limbo || current==s && s->my_cilk_state==generic_scheduler::cs_running, "invalid adoption" ); #if TBB_USE_ASSERT if( current==s ) runtime_warning( "redundant adoption of %p by thread %p\n", s, (void*)thread_id ); s->my_cilk_state = generic_scheduler::cs_running; #endif /* TBB_USE_ASSERT */ theTLS.set(s); break; } case CILK_TBB_STACK_ORPHAN: { __TBB_ASSERT( current==s && s->my_cilk_state==generic_scheduler::cs_running, "invalid orphaning" ); #if TBB_USE_ASSERT s->my_cilk_state = generic_scheduler::cs_limbo; #endif /* TBB_USE_ASSERT */ theTLS.set(NULL); break; } case CILK_TBB_STACK_RELEASE: { __TBB_ASSERT( !current && s->my_cilk_state==generic_scheduler::cs_limbo || current==s && s->my_cilk_state==generic_scheduler::cs_running, "invalid release" ); #if TBB_USE_ASSERT s->my_cilk_state = generic_scheduler::cs_freed; #endif /* TBB_USE_ASSERT */ s->my_cilk_unwatch_thunk.routine = NULL; auto_terminate( s ); } } return 0; } #endif /* __TBB_SURVIVE_THREAD_SWITCH */ } // namespace internal //------------------------------------------------------------------------ // task_scheduler_init //------------------------------------------------------------------------ using namespace internal; /** Left out-of-line for the sake of the backward binary compatibility **/ void task_scheduler_init::initialize( int number_of_threads ) { initialize( number_of_threads, 0 ); } void task_scheduler_init::initialize( int number_of_threads, stack_size_type thread_stack_size ) { #if __TBB_TASK_GROUP_CONTEXT && TBB_USE_EXCEPTIONS uintptr_t new_mode = thread_stack_size & propagation_mode_mask; #endif thread_stack_size &= ~(stack_size_type)propagation_mode_mask; if( number_of_threads!=deferred ) { bool blocking_terminate = false; if (my_scheduler == (scheduler*)wait_workers_in_terminate_flag) { blocking_terminate = true; my_scheduler = NULL; } __TBB_ASSERT( !my_scheduler, "task_scheduler_init already initialized" ); __TBB_ASSERT( number_of_threads==-1 || number_of_threads>=1, "number_of_threads for task_scheduler_init must be -1 or positive" ); if (blocking_terminate) governor::setBlockingTerminate(this); internal::generic_scheduler *s = governor::init_scheduler( number_of_threads, thread_stack_size, /*auto_init=*/false ); #if __TBB_TASK_GROUP_CONTEXT && TBB_USE_EXCEPTIONS if ( s->master_outermost_level() ) { uintptr_t &vt = s->default_context()->my_version_and_traits; uintptr_t prev_mode = vt & task_group_context::exact_exception ? propagation_mode_exact : 0; vt = new_mode & propagation_mode_exact ? vt | task_group_context::exact_exception : new_mode & propagation_mode_captured ? vt & ~task_group_context::exact_exception : vt; // Use least significant bit of the scheduler pointer to store previous mode. // This is necessary when components compiled with different compilers and/or // TBB versions initialize the my_scheduler = static_cast((generic_scheduler*)((uintptr_t)s | prev_mode)); } else #endif /* __TBB_TASK_GROUP_CONTEXT && TBB_USE_EXCEPTIONS */ my_scheduler = s; } else { __TBB_ASSERT( !thread_stack_size, "deferred initialization ignores stack size setting" ); } } void task_scheduler_init::terminate() { #if __TBB_TASK_GROUP_CONTEXT && TBB_USE_EXCEPTIONS uintptr_t prev_mode = (uintptr_t)my_scheduler & propagation_mode_exact; my_scheduler = (scheduler*)((uintptr_t)my_scheduler & ~(uintptr_t)propagation_mode_exact); #endif /* __TBB_TASK_GROUP_CONTEXT && TBB_USE_EXCEPTIONS */ generic_scheduler* s = static_cast(my_scheduler); my_scheduler = NULL; __TBB_ASSERT( s, "task_scheduler_init::terminate without corresponding task_scheduler_init::initialize()"); #if __TBB_TASK_GROUP_CONTEXT && TBB_USE_EXCEPTIONS if ( s->master_outermost_level() ) { uintptr_t &vt = s->default_context()->my_version_and_traits; vt = prev_mode & propagation_mode_exact ? vt | task_group_context::exact_exception : vt & ~task_group_context::exact_exception; } #endif /* __TBB_TASK_GROUP_CONTEXT && TBB_USE_EXCEPTIONS */ governor::terminate_scheduler(s, this); } int task_scheduler_init::default_num_threads() { return governor::default_num_threads(); } } // namespace tbb ================================================ FILE: benchmarks/tbb/governor.h ================================================ /* Copyright 2005-2014 Intel Corporation. All Rights Reserved. This file is part of Threading Building Blocks. Threading Building Blocks is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. Threading Building Blocks is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Threading Building Blocks; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA As a special exception, you may use this file as part of a free software library without restriction. Specifically, if other files instantiate templates or use macros or inline functions from this file, or you compile this file and link it with other files to produce an executable, this file does not by itself cause the resulting executable to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the executable file might be covered by the GNU General Public License. */ #ifndef _TBB_governor_H #define _TBB_governor_H #include "tbb/task_scheduler_init.h" #include "../rml/include/rml_tbb.h" #include "tbb_misc.h" // for AvailableHwConcurrency and ThreadStackSize #include "tls.h" #if __TBB_SURVIVE_THREAD_SWITCH #include "cilk-tbb-interop.h" #endif /* __TBB_SURVIVE_THREAD_SWITCH */ namespace tbb { namespace internal { class market; class generic_scheduler; class __TBB_InitOnce; //------------------------------------------------------------------------ // Class governor //------------------------------------------------------------------------ //! The class handles access to the single instance of market, and to TLS to keep scheduler instances. /** It also supports automatic on-demand initialization of the TBB scheduler. The class contains only static data members and methods.*/ class governor { friend class __TBB_InitOnce; friend class market; //! TLS for scheduler instances associated with individual threads static basic_tls theTLS; //! Caches the maximal level of parallelism supported by the hardware static unsigned DefaultNumberOfThreads; static rml::tbb_factory theRMLServerFactory; static bool UsePrivateRML; //! Instance of task_scheduler_init that requested blocking termination. static const task_scheduler_init *BlockingTSI; #if TBB_USE_ASSERT static bool IsBlockingTerminationInProgress; #endif static bool is_speculation_enabled; //! Create key for thread-local storage and initialize RML. static void acquire_resources (); //! Destroy the thread-local storage key and deinitialize RML. static void release_resources (); static rml::tbb_server* create_rml_server ( rml::tbb_client& ); //! The internal routine to undo automatic initialization. /** The signature is written with void* so that the routine can be the destructor argument to pthread_key_create. */ static void auto_terminate(void* scheduler); public: static unsigned default_num_threads () { // No memory fence required, because at worst each invoking thread calls AvailableHwConcurrency once. return DefaultNumberOfThreads ? DefaultNumberOfThreads : DefaultNumberOfThreads = AvailableHwConcurrency(); } //! Processes scheduler initialization request (possibly nested) in a master thread /** If necessary creates new instance of arena and/or local scheduler. The auto_init argument specifies if the call is due to automatic initialization. **/ static generic_scheduler* init_scheduler( unsigned num_threads, stack_size_type stack_size, bool auto_init = false ); //! Processes scheduler termination request (possibly nested) in a master thread static void terminate_scheduler( generic_scheduler* s, const task_scheduler_init *tsi_ptr ); //! Register TBB scheduler instance in thread-local storage. static void sign_on(generic_scheduler* s); //! Unregister TBB scheduler instance from thread-local storage. static void sign_off(generic_scheduler* s); //! Used to check validity of the local scheduler TLS contents. static bool is_set ( generic_scheduler* s ) { return theTLS.get() == s; } //! Temporarily set TLS slot to the given scheduler static void assume_scheduler( generic_scheduler* s ) { theTLS.set( s ); } //! Obtain the thread-local instance of the TBB scheduler. /** If the scheduler has not been initialized yet, initialization is done automatically. Note that auto-initialized scheduler instance is destroyed only when its thread terminates. **/ static generic_scheduler* local_scheduler () { generic_scheduler* s = theTLS.get(); return s ? s : init_scheduler( (unsigned)task_scheduler_init::automatic, 0, true ); } static generic_scheduler* local_scheduler_if_initialized () { return theTLS.get(); } //! Undo automatic initialization if necessary; call when a thread exits. static void terminate_auto_initialized_scheduler() { auto_terminate( theTLS.get() ); } static void print_version_info (); static void initialize_rml_factory (); static bool needsWaitWorkers () { return BlockingTSI!=NULL; } //! Must be called before init_scheduler static void setBlockingTerminate(const task_scheduler_init *tsi); #if __TBB_SURVIVE_THREAD_SWITCH static __cilk_tbb_retcode stack_op_handler( __cilk_tbb_stack_op op, void* ); #endif /* __TBB_SURVIVE_THREAD_SWITCH */ static bool speculation_enabled() { return is_speculation_enabled; } }; // class governor } // namespace internal } // namespace tbb #endif /* _TBB_governor_H */ ================================================ FILE: benchmarks/tbb/ia32-masm/atomic_support.asm ================================================ ; Copyright 2005-2014 Intel Corporation. All Rights Reserved. ; ; This file is part of Threading Building Blocks. Threading Building Blocks is free software; ; you can redistribute it and/or modify it under the terms of the GNU General Public License ; version 2 as published by the Free Software Foundation. Threading Building Blocks is ; distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the ; implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. ; See the GNU General Public License for more details. You should have received a copy of ; the GNU General Public License along with Threading Building Blocks; if not, write to the ; Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA ; ; As a special exception, you may use this file as part of a free software library without ; restriction. Specifically, if other files instantiate templates or use macros or inline ; functions from this file, or you compile this file and link it with other files to produce ; an executable, this file does not by itself cause the resulting executable to be covered ; by the GNU General Public License. This exception does not however invalidate any other ; reasons why the executable file might be covered by the GNU General Public License. .686 .model flat,c .code ALIGN 4 PUBLIC c __TBB_machine_fetchadd1 __TBB_machine_fetchadd1: mov edx,4[esp] mov eax,8[esp] lock xadd [edx],al ret .code ALIGN 4 PUBLIC c __TBB_machine_fetchstore1 __TBB_machine_fetchstore1: mov edx,4[esp] mov eax,8[esp] lock xchg [edx],al ret .code ALIGN 4 PUBLIC c __TBB_machine_cmpswp1 __TBB_machine_cmpswp1: mov edx,4[esp] mov ecx,8[esp] mov eax,12[esp] lock cmpxchg [edx],cl ret .code ALIGN 4 PUBLIC c __TBB_machine_fetchadd2 __TBB_machine_fetchadd2: mov edx,4[esp] mov eax,8[esp] lock xadd [edx],ax ret .code ALIGN 4 PUBLIC c __TBB_machine_fetchstore2 __TBB_machine_fetchstore2: mov edx,4[esp] mov eax,8[esp] lock xchg [edx],ax ret .code ALIGN 4 PUBLIC c __TBB_machine_cmpswp2 __TBB_machine_cmpswp2: mov edx,4[esp] mov ecx,8[esp] mov eax,12[esp] lock cmpxchg [edx],cx ret .code ALIGN 4 PUBLIC c __TBB_machine_fetchadd4 __TBB_machine_fetchadd4: mov edx,4[esp] mov eax,8[esp] lock xadd [edx],eax ret .code ALIGN 4 PUBLIC c __TBB_machine_fetchstore4 __TBB_machine_fetchstore4: mov edx,4[esp] mov eax,8[esp] lock xchg [edx],eax ret .code ALIGN 4 PUBLIC c __TBB_machine_cmpswp4 __TBB_machine_cmpswp4: mov edx,4[esp] mov ecx,8[esp] mov eax,12[esp] lock cmpxchg [edx],ecx ret .code ALIGN 4 PUBLIC c __TBB_machine_fetchadd8 __TBB_machine_fetchadd8: push ebx push edi mov edi,12[esp] mov eax,[edi] mov edx,4[edi] __TBB_machine_fetchadd8_loop: mov ebx,16[esp] mov ecx,20[esp] add ebx,eax adc ecx,edx lock cmpxchg8b qword ptr [edi] jnz __TBB_machine_fetchadd8_loop pop edi pop ebx ret .code ALIGN 4 PUBLIC c __TBB_machine_fetchstore8 __TBB_machine_fetchstore8: push ebx push edi mov edi,12[esp] mov ebx,16[esp] mov ecx,20[esp] mov eax,[edi] mov edx,4[edi] __TBB_machine_fetchstore8_loop: lock cmpxchg8b qword ptr [edi] jnz __TBB_machine_fetchstore8_loop pop edi pop ebx ret .code ALIGN 4 PUBLIC c __TBB_machine_cmpswp8 __TBB_machine_cmpswp8: push ebx push edi mov edi,12[esp] mov ebx,16[esp] mov ecx,20[esp] mov eax,24[esp] mov edx,28[esp] lock cmpxchg8b qword ptr [edi] pop edi pop ebx ret .code ALIGN 4 PUBLIC c __TBB_machine_load8 __TBB_machine_Load8: ; If location is on stack, compiler may have failed to align it correctly, so we do dynamic check. mov ecx,4[esp] test ecx,7 jne load_slow ; Load within a cache line sub esp,12 fild qword ptr [ecx] fistp qword ptr [esp] mov eax,[esp] mov edx,4[esp] add esp,12 ret load_slow: ; Load is misaligned. Use cmpxchg8b. push ebx push edi mov edi,ecx xor eax,eax xor ebx,ebx xor ecx,ecx xor edx,edx lock cmpxchg8b qword ptr [edi] pop edi pop ebx ret EXTRN __TBB_machine_store8_slow:PROC .code ALIGN 4 PUBLIC c __TBB_machine_store8 __TBB_machine_Store8: ; If location is on stack, compiler may have failed to align it correctly, so we do dynamic check. mov ecx,4[esp] test ecx,7 jne __TBB_machine_store8_slow ;; tail call to tbb_misc.cpp fild qword ptr 8[esp] fistp qword ptr [ecx] ret end ================================================ FILE: benchmarks/tbb/ia32-masm/itsx.asm ================================================ ; Copyright 2005-2014 Intel Corporation. All Rights Reserved. ; ; This file is part of Threading Building Blocks. Threading Building Blocks is free software; ; you can redistribute it and/or modify it under the terms of the GNU General Public License ; version 2 as published by the Free Software Foundation. Threading Building Blocks is ; distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the ; implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. ; See the GNU General Public License for more details. You should have received a copy of ; the GNU General Public License along with Threading Building Blocks; if not, write to the ; Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA ; ; As a special exception, you may use this file as part of a free software library without ; restriction. Specifically, if other files instantiate templates or use macros or inline ; functions from this file, or you compile this file and link it with other files to produce ; an executable, this file does not by itself cause the resulting executable to be covered ; by the GNU General Public License. This exception does not however invalidate any other ; reasons why the executable file might be covered by the GNU General Public License. .686 .model flat,c .code ALIGN 4 PUBLIC c __TBB_machine_try_lock_elided __TBB_machine_try_lock_elided: mov ecx, 4[esp] xor eax, eax mov al, 1 BYTE 0F2H xchg al, byte ptr [ecx] xor al, 1 ret .code ALIGN 4 PUBLIC c __TBB_machine_unlock_elided __TBB_machine_unlock_elided: mov ecx, 4[esp] BYTE 0F3H mov byte ptr [ecx], 0 ret .code ALIGN 4 PUBLIC c __TBB_machine_begin_transaction __TBB_machine_begin_transaction: mov eax, -1 BYTE 0C7H BYTE 0F8H BYTE 000H BYTE 000H BYTE 000H BYTE 000H ret .code ALIGN 4 PUBLIC c __TBB_machine_end_transaction __TBB_machine_end_transaction: BYTE 00FH BYTE 001H BYTE 0D5H ret .code ALIGN 4 PUBLIC c __TBB_machine_transaction_conflict_abort __TBB_machine_transaction_conflict_abort: BYTE 0C6H BYTE 0F8H BYTE 0FFH ; 12.4.5 Abort argument: lock not free when tested ret .code ALIGN 4 PUBLIC c __TBB_machine_is_in_transaction __TBB_machine_is_in_transaction: xor eax, eax BYTE 00FH BYTE 001H BYTE 0D6H JZ rset MOV al,1 rset: RET end ================================================ FILE: benchmarks/tbb/ia32-masm/lock_byte.asm ================================================ ; Copyright 2005-2014 Intel Corporation. All Rights Reserved. ; ; This file is part of Threading Building Blocks. Threading Building Blocks is free software; ; you can redistribute it and/or modify it under the terms of the GNU General Public License ; version 2 as published by the Free Software Foundation. Threading Building Blocks is ; distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the ; implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. ; See the GNU General Public License for more details. You should have received a copy of ; the GNU General Public License along with Threading Building Blocks; if not, write to the ; Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA ; ; As a special exception, you may use this file as part of a free software library without ; restriction. Specifically, if other files instantiate templates or use macros or inline ; functions from this file, or you compile this file and link it with other files to produce ; an executable, this file does not by itself cause the resulting executable to be covered ; by the GNU General Public License. This exception does not however invalidate any other ; reasons why the executable file might be covered by the GNU General Public License. ; DO NOT EDIT - AUTOMATICALLY GENERATED FROM .s FILE .686 .model flat,c .code ALIGN 4 PUBLIC c __TBB_machine_trylockbyte __TBB_machine_trylockbyte: mov edx,4[esp] mov al,[edx] mov cl,1 test al,1 jnz __TBB_machine_trylockbyte_contended lock cmpxchg [edx],cl jne __TBB_machine_trylockbyte_contended mov eax,1 ret __TBB_machine_trylockbyte_contended: xor eax,eax ret end ================================================ FILE: benchmarks/tbb/ia64-gas/atomic_support.s ================================================ // Copyright 2005-2014 Intel Corporation. All Rights Reserved. // // This file is part of Threading Building Blocks. Threading Building Blocks is free software; // you can redistribute it and/or modify it under the terms of the GNU General Public License // version 2 as published by the Free Software Foundation. Threading Building Blocks is // distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the // implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. // See the GNU General Public License for more details. You should have received a copy of // the GNU General Public License along with Threading Building Blocks; if not, write to the // Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA // // As a special exception, you may use this file as part of a free software library without // restriction. Specifically, if other files instantiate templates or use macros or inline // functions from this file, or you compile this file and link it with other files to produce // an executable, this file does not by itself cause the resulting executable to be covered // by the GNU General Public License. This exception does not however invalidate any other // reasons why the executable file might be covered by the GNU General Public License. // DO NOT EDIT - AUTOMATICALLY GENERATED FROM tools/generate_atomic/ipf_generate.sh # 1 "" # 1 "" # 1 "" # 1 "" .section .text .align 16 .proc __TBB_machine_fetchadd1__TBB_full_fence# .global __TBB_machine_fetchadd1__TBB_full_fence# __TBB_machine_fetchadd1__TBB_full_fence: { mf br __TBB_machine_fetchadd1acquire } .endp __TBB_machine_fetchadd1__TBB_full_fence# .proc __TBB_machine_fetchadd1acquire# .global __TBB_machine_fetchadd1acquire# __TBB_machine_fetchadd1acquire: ld1 r9=[r32] ;; Retry_1acquire: mov ar.ccv=r9 mov r8=r9; add r10=r9,r33 ;; cmpxchg1.acq r9=[r32],r10,ar.ccv ;; cmp.ne p7,p0=r8,r9 (p7) br.cond.dpnt Retry_1acquire br.ret.sptk.many b0 # 49 "" .endp __TBB_machine_fetchadd1acquire# # 62 "" .section .text .align 16 .proc __TBB_machine_fetchstore1__TBB_full_fence# .global __TBB_machine_fetchstore1__TBB_full_fence# __TBB_machine_fetchstore1__TBB_full_fence: mf ;; xchg1 r8=[r32],r33 br.ret.sptk.many b0 .endp __TBB_machine_fetchstore1__TBB_full_fence# .proc __TBB_machine_fetchstore1acquire# .global __TBB_machine_fetchstore1acquire# __TBB_machine_fetchstore1acquire: xchg1 r8=[r32],r33 br.ret.sptk.many b0 .endp __TBB_machine_fetchstore1acquire# # 88 "" .section .text .align 16 .proc __TBB_machine_cmpswp1__TBB_full_fence# .global __TBB_machine_cmpswp1__TBB_full_fence# __TBB_machine_cmpswp1__TBB_full_fence: { mf br __TBB_machine_cmpswp1acquire } .endp __TBB_machine_cmpswp1__TBB_full_fence# .proc __TBB_machine_cmpswp1acquire# .global __TBB_machine_cmpswp1acquire# __TBB_machine_cmpswp1acquire: zxt1 r34=r34 ;; mov ar.ccv=r34 ;; cmpxchg1.acq r8=[r32],r33,ar.ccv br.ret.sptk.many b0 .endp __TBB_machine_cmpswp1acquire# // DO NOT EDIT - AUTOMATICALLY GENERATED FROM tools/generate_atomic/ipf_generate.sh # 1 "" # 1 "" # 1 "" # 1 "" .section .text .align 16 .proc __TBB_machine_fetchadd2__TBB_full_fence# .global __TBB_machine_fetchadd2__TBB_full_fence# __TBB_machine_fetchadd2__TBB_full_fence: { mf br __TBB_machine_fetchadd2acquire } .endp __TBB_machine_fetchadd2__TBB_full_fence# .proc __TBB_machine_fetchadd2acquire# .global __TBB_machine_fetchadd2acquire# __TBB_machine_fetchadd2acquire: ld2 r9=[r32] ;; Retry_2acquire: mov ar.ccv=r9 mov r8=r9; add r10=r9,r33 ;; cmpxchg2.acq r9=[r32],r10,ar.ccv ;; cmp.ne p7,p0=r8,r9 (p7) br.cond.dpnt Retry_2acquire br.ret.sptk.many b0 # 49 "" .endp __TBB_machine_fetchadd2acquire# # 62 "" .section .text .align 16 .proc __TBB_machine_fetchstore2__TBB_full_fence# .global __TBB_machine_fetchstore2__TBB_full_fence# __TBB_machine_fetchstore2__TBB_full_fence: mf ;; xchg2 r8=[r32],r33 br.ret.sptk.many b0 .endp __TBB_machine_fetchstore2__TBB_full_fence# .proc __TBB_machine_fetchstore2acquire# .global __TBB_machine_fetchstore2acquire# __TBB_machine_fetchstore2acquire: xchg2 r8=[r32],r33 br.ret.sptk.many b0 .endp __TBB_machine_fetchstore2acquire# # 88 "" .section .text .align 16 .proc __TBB_machine_cmpswp2__TBB_full_fence# .global __TBB_machine_cmpswp2__TBB_full_fence# __TBB_machine_cmpswp2__TBB_full_fence: { mf br __TBB_machine_cmpswp2acquire } .endp __TBB_machine_cmpswp2__TBB_full_fence# .proc __TBB_machine_cmpswp2acquire# .global __TBB_machine_cmpswp2acquire# __TBB_machine_cmpswp2acquire: zxt2 r34=r34 ;; mov ar.ccv=r34 ;; cmpxchg2.acq r8=[r32],r33,ar.ccv br.ret.sptk.many b0 .endp __TBB_machine_cmpswp2acquire# // DO NOT EDIT - AUTOMATICALLY GENERATED FROM tools/generate_atomic/ipf_generate.sh # 1 "" # 1 "" # 1 "" # 1 "" .section .text .align 16 .proc __TBB_machine_fetchadd4__TBB_full_fence# .global __TBB_machine_fetchadd4__TBB_full_fence# __TBB_machine_fetchadd4__TBB_full_fence: { mf br __TBB_machine_fetchadd4acquire } .endp __TBB_machine_fetchadd4__TBB_full_fence# .proc __TBB_machine_fetchadd4acquire# .global __TBB_machine_fetchadd4acquire# __TBB_machine_fetchadd4acquire: cmp.eq p6,p0=1,r33 cmp.eq p8,p0=-1,r33 (p6) br.cond.dptk Inc_4acquire (p8) br.cond.dpnt Dec_4acquire ;; ld4 r9=[r32] ;; Retry_4acquire: mov ar.ccv=r9 mov r8=r9; add r10=r9,r33 ;; cmpxchg4.acq r9=[r32],r10,ar.ccv ;; cmp.ne p7,p0=r8,r9 (p7) br.cond.dpnt Retry_4acquire br.ret.sptk.many b0 Inc_4acquire: fetchadd4.acq r8=[r32],1 br.ret.sptk.many b0 Dec_4acquire: fetchadd4.acq r8=[r32],-1 br.ret.sptk.many b0 .endp __TBB_machine_fetchadd4acquire# # 62 "" .section .text .align 16 .proc __TBB_machine_fetchstore4__TBB_full_fence# .global __TBB_machine_fetchstore4__TBB_full_fence# __TBB_machine_fetchstore4__TBB_full_fence: mf ;; xchg4 r8=[r32],r33 br.ret.sptk.many b0 .endp __TBB_machine_fetchstore4__TBB_full_fence# .proc __TBB_machine_fetchstore4acquire# .global __TBB_machine_fetchstore4acquire# __TBB_machine_fetchstore4acquire: xchg4 r8=[r32],r33 br.ret.sptk.many b0 .endp __TBB_machine_fetchstore4acquire# # 88 "" .section .text .align 16 .proc __TBB_machine_cmpswp4__TBB_full_fence# .global __TBB_machine_cmpswp4__TBB_full_fence# __TBB_machine_cmpswp4__TBB_full_fence: { mf br __TBB_machine_cmpswp4acquire } .endp __TBB_machine_cmpswp4__TBB_full_fence# .proc __TBB_machine_cmpswp4acquire# .global __TBB_machine_cmpswp4acquire# __TBB_machine_cmpswp4acquire: zxt4 r34=r34 ;; mov ar.ccv=r34 ;; cmpxchg4.acq r8=[r32],r33,ar.ccv br.ret.sptk.many b0 .endp __TBB_machine_cmpswp4acquire# // DO NOT EDIT - AUTOMATICALLY GENERATED FROM tools/generate_atomic/ipf_generate.sh # 1 "" # 1 "" # 1 "" # 1 "" .section .text .align 16 .proc __TBB_machine_fetchadd8__TBB_full_fence# .global __TBB_machine_fetchadd8__TBB_full_fence# __TBB_machine_fetchadd8__TBB_full_fence: { mf br __TBB_machine_fetchadd8acquire } .endp __TBB_machine_fetchadd8__TBB_full_fence# .proc __TBB_machine_fetchadd8acquire# .global __TBB_machine_fetchadd8acquire# __TBB_machine_fetchadd8acquire: cmp.eq p6,p0=1,r33 cmp.eq p8,p0=-1,r33 (p6) br.cond.dptk Inc_8acquire (p8) br.cond.dpnt Dec_8acquire ;; ld8 r9=[r32] ;; Retry_8acquire: mov ar.ccv=r9 mov r8=r9; add r10=r9,r33 ;; cmpxchg8.acq r9=[r32],r10,ar.ccv ;; cmp.ne p7,p0=r8,r9 (p7) br.cond.dpnt Retry_8acquire br.ret.sptk.many b0 Inc_8acquire: fetchadd8.acq r8=[r32],1 br.ret.sptk.many b0 Dec_8acquire: fetchadd8.acq r8=[r32],-1 br.ret.sptk.many b0 .endp __TBB_machine_fetchadd8acquire# # 62 "" .section .text .align 16 .proc __TBB_machine_fetchstore8__TBB_full_fence# .global __TBB_machine_fetchstore8__TBB_full_fence# __TBB_machine_fetchstore8__TBB_full_fence: mf ;; xchg8 r8=[r32],r33 br.ret.sptk.many b0 .endp __TBB_machine_fetchstore8__TBB_full_fence# .proc __TBB_machine_fetchstore8acquire# .global __TBB_machine_fetchstore8acquire# __TBB_machine_fetchstore8acquire: xchg8 r8=[r32],r33 br.ret.sptk.many b0 .endp __TBB_machine_fetchstore8acquire# # 88 "" .section .text .align 16 .proc __TBB_machine_cmpswp8__TBB_full_fence# .global __TBB_machine_cmpswp8__TBB_full_fence# __TBB_machine_cmpswp8__TBB_full_fence: { mf br __TBB_machine_cmpswp8acquire } .endp __TBB_machine_cmpswp8__TBB_full_fence# .proc __TBB_machine_cmpswp8acquire# .global __TBB_machine_cmpswp8acquire# __TBB_machine_cmpswp8acquire: mov ar.ccv=r34 ;; cmpxchg8.acq r8=[r32],r33,ar.ccv br.ret.sptk.many b0 .endp __TBB_machine_cmpswp8acquire# // DO NOT EDIT - AUTOMATICALLY GENERATED FROM tools/generate_atomic/ipf_generate.sh # 1 "" # 1 "" # 1 "" # 1 "" .section .text .align 16 # 19 "" .proc __TBB_machine_fetchadd1release# .global __TBB_machine_fetchadd1release# __TBB_machine_fetchadd1release: ld1 r9=[r32] ;; Retry_1release: mov ar.ccv=r9 mov r8=r9; add r10=r9,r33 ;; cmpxchg1.rel r9=[r32],r10,ar.ccv ;; cmp.ne p7,p0=r8,r9 (p7) br.cond.dpnt Retry_1release br.ret.sptk.many b0 # 49 "" .endp __TBB_machine_fetchadd1release# # 62 "" .section .text .align 16 .proc __TBB_machine_fetchstore1release# .global __TBB_machine_fetchstore1release# __TBB_machine_fetchstore1release: mf ;; xchg1 r8=[r32],r33 br.ret.sptk.many b0 .endp __TBB_machine_fetchstore1release# # 88 "" .section .text .align 16 # 101 "" .proc __TBB_machine_cmpswp1release# .global __TBB_machine_cmpswp1release# __TBB_machine_cmpswp1release: zxt1 r34=r34 ;; mov ar.ccv=r34 ;; cmpxchg1.rel r8=[r32],r33,ar.ccv br.ret.sptk.many b0 .endp __TBB_machine_cmpswp1release# // DO NOT EDIT - AUTOMATICALLY GENERATED FROM tools/generate_atomic/ipf_generate.sh # 1 "" # 1 "" # 1 "" # 1 "" .section .text .align 16 # 19 "" .proc __TBB_machine_fetchadd2release# .global __TBB_machine_fetchadd2release# __TBB_machine_fetchadd2release: ld2 r9=[r32] ;; Retry_2release: mov ar.ccv=r9 mov r8=r9; add r10=r9,r33 ;; cmpxchg2.rel r9=[r32],r10,ar.ccv ;; cmp.ne p7,p0=r8,r9 (p7) br.cond.dpnt Retry_2release br.ret.sptk.many b0 # 49 "" .endp __TBB_machine_fetchadd2release# # 62 "" .section .text .align 16 .proc __TBB_machine_fetchstore2release# .global __TBB_machine_fetchstore2release# __TBB_machine_fetchstore2release: mf ;; xchg2 r8=[r32],r33 br.ret.sptk.many b0 .endp __TBB_machine_fetchstore2release# # 88 "" .section .text .align 16 # 101 "" .proc __TBB_machine_cmpswp2release# .global __TBB_machine_cmpswp2release# __TBB_machine_cmpswp2release: zxt2 r34=r34 ;; mov ar.ccv=r34 ;; cmpxchg2.rel r8=[r32],r33,ar.ccv br.ret.sptk.many b0 .endp __TBB_machine_cmpswp2release# // DO NOT EDIT - AUTOMATICALLY GENERATED FROM tools/generate_atomic/ipf_generate.sh # 1 "" # 1 "" # 1 "" # 1 "" .section .text .align 16 # 19 "" .proc __TBB_machine_fetchadd4release# .global __TBB_machine_fetchadd4release# __TBB_machine_fetchadd4release: cmp.eq p6,p0=1,r33 cmp.eq p8,p0=-1,r33 (p6) br.cond.dptk Inc_4release (p8) br.cond.dpnt Dec_4release ;; ld4 r9=[r32] ;; Retry_4release: mov ar.ccv=r9 mov r8=r9; add r10=r9,r33 ;; cmpxchg4.rel r9=[r32],r10,ar.ccv ;; cmp.ne p7,p0=r8,r9 (p7) br.cond.dpnt Retry_4release br.ret.sptk.many b0 Inc_4release: fetchadd4.rel r8=[r32],1 br.ret.sptk.many b0 Dec_4release: fetchadd4.rel r8=[r32],-1 br.ret.sptk.many b0 .endp __TBB_machine_fetchadd4release# # 62 "" .section .text .align 16 .proc __TBB_machine_fetchstore4release# .global __TBB_machine_fetchstore4release# __TBB_machine_fetchstore4release: mf ;; xchg4 r8=[r32],r33 br.ret.sptk.many b0 .endp __TBB_machine_fetchstore4release# # 88 "" .section .text .align 16 # 101 "" .proc __TBB_machine_cmpswp4release# .global __TBB_machine_cmpswp4release# __TBB_machine_cmpswp4release: zxt4 r34=r34 ;; mov ar.ccv=r34 ;; cmpxchg4.rel r8=[r32],r33,ar.ccv br.ret.sptk.many b0 .endp __TBB_machine_cmpswp4release# // DO NOT EDIT - AUTOMATICALLY GENERATED FROM tools/generate_atomic/ipf_generate.sh # 1 "" # 1 "" # 1 "" # 1 "" .section .text .align 16 # 19 "" .proc __TBB_machine_fetchadd8release# .global __TBB_machine_fetchadd8release# __TBB_machine_fetchadd8release: cmp.eq p6,p0=1,r33 cmp.eq p8,p0=-1,r33 (p6) br.cond.dptk Inc_8release (p8) br.cond.dpnt Dec_8release ;; ld8 r9=[r32] ;; Retry_8release: mov ar.ccv=r9 mov r8=r9; add r10=r9,r33 ;; cmpxchg8.rel r9=[r32],r10,ar.ccv ;; cmp.ne p7,p0=r8,r9 (p7) br.cond.dpnt Retry_8release br.ret.sptk.many b0 Inc_8release: fetchadd8.rel r8=[r32],1 br.ret.sptk.many b0 Dec_8release: fetchadd8.rel r8=[r32],-1 br.ret.sptk.many b0 .endp __TBB_machine_fetchadd8release# # 62 "" .section .text .align 16 .proc __TBB_machine_fetchstore8release# .global __TBB_machine_fetchstore8release# __TBB_machine_fetchstore8release: mf ;; xchg8 r8=[r32],r33 br.ret.sptk.many b0 .endp __TBB_machine_fetchstore8release# # 88 "" .section .text .align 16 # 101 "" .proc __TBB_machine_cmpswp8release# .global __TBB_machine_cmpswp8release# __TBB_machine_cmpswp8release: mov ar.ccv=r34 ;; cmpxchg8.rel r8=[r32],r33,ar.ccv br.ret.sptk.many b0 .endp __TBB_machine_cmpswp8release# ================================================ FILE: benchmarks/tbb/ia64-gas/ia64_misc.s ================================================ // Copyright 2005-2014 Intel Corporation. All Rights Reserved. // // This file is part of Threading Building Blocks. Threading Building Blocks is free software; // you can redistribute it and/or modify it under the terms of the GNU General Public License // version 2 as published by the Free Software Foundation. Threading Building Blocks is // distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the // implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. // See the GNU General Public License for more details. You should have received a copy of // the GNU General Public License along with Threading Building Blocks; if not, write to the // Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA // // As a special exception, you may use this file as part of a free software library without // restriction. Specifically, if other files instantiate templates or use macros or inline // functions from this file, or you compile this file and link it with other files to produce // an executable, this file does not by itself cause the resulting executable to be covered // by the GNU General Public License. This exception does not however invalidate any other // reasons why the executable file might be covered by the GNU General Public License. // RSE backing store pointer retrieval .section .text .align 16 .proc __TBB_get_bsp# .global __TBB_get_bsp# __TBB_get_bsp: mov r8=ar.bsp br.ret.sptk.many b0 .endp __TBB_get_bsp# .section .text .align 16 .proc __TBB_machine_load8_relaxed# .global __TBB_machine_load8_relaxed# __TBB_machine_load8_relaxed: ld8 r8=[r32] br.ret.sptk.many b0 .endp __TBB_machine_load8_relaxed# .section .text .align 16 .proc __TBB_machine_store8_relaxed# .global __TBB_machine_store8_relaxed# __TBB_machine_store8_relaxed: st8 [r32]=r33 br.ret.sptk.many b0 .endp __TBB_machine_store8_relaxed# .section .text .align 16 .proc __TBB_machine_load4_relaxed# .global __TBB_machine_load4_relaxed# __TBB_machine_load4_relaxed: ld4 r8=[r32] br.ret.sptk.many b0 .endp __TBB_machine_load4_relaxed# .section .text .align 16 .proc __TBB_machine_store4_relaxed# .global __TBB_machine_store4_relaxed# __TBB_machine_store4_relaxed: st4 [r32]=r33 br.ret.sptk.many b0 .endp __TBB_machine_store4_relaxed# .section .text .align 16 .proc __TBB_machine_load2_relaxed# .global __TBB_machine_load2_relaxed# __TBB_machine_load2_relaxed: ld2 r8=[r32] br.ret.sptk.many b0 .endp __TBB_machine_load2_relaxed# .section .text .align 16 .proc __TBB_machine_store2_relaxed# .global __TBB_machine_store2_relaxed# __TBB_machine_store2_relaxed: st2 [r32]=r33 br.ret.sptk.many b0 .endp __TBB_machine_store2_relaxed# .section .text .align 16 .proc __TBB_machine_load1_relaxed# .global __TBB_machine_load1_relaxed# __TBB_machine_load1_relaxed: ld1 r8=[r32] br.ret.sptk.many b0 .endp __TBB_machine_load1_relaxed# .section .text .align 16 .proc __TBB_machine_store1_relaxed# .global __TBB_machine_store1_relaxed# __TBB_machine_store1_relaxed: st1 [r32]=r33 br.ret.sptk.many b0 .endp __TBB_machine_store1_relaxed# ================================================ FILE: benchmarks/tbb/ia64-gas/lock_byte.s ================================================ // Copyright 2005-2014 Intel Corporation. All Rights Reserved. // // This file is part of Threading Building Blocks. Threading Building Blocks is free software; // you can redistribute it and/or modify it under the terms of the GNU General Public License // version 2 as published by the Free Software Foundation. Threading Building Blocks is // distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the // implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. // See the GNU General Public License for more details. You should have received a copy of // the GNU General Public License along with Threading Building Blocks; if not, write to the // Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA // // As a special exception, you may use this file as part of a free software library without // restriction. Specifically, if other files instantiate templates or use macros or inline // functions from this file, or you compile this file and link it with other files to produce // an executable, this file does not by itself cause the resulting executable to be covered // by the GNU General Public License. This exception does not however invalidate any other // reasons why the executable file might be covered by the GNU General Public License. // Support for class TinyLock .section .text .align 16 // unsigned int __TBB_machine_trylockbyte( byte& flag ); // r32 = address of flag .proc __TBB_machine_trylockbyte# .global __TBB_machine_trylockbyte# ADDRESS_OF_FLAG=r32 RETCODE=r8 FLAG=r9 BUSY=r10 SCRATCH=r11 __TBB_machine_trylockbyte: ld1.acq FLAG=[ADDRESS_OF_FLAG] mov BUSY=1 mov RETCODE=0 ;; cmp.ne p6,p0=0,FLAG mov ar.ccv=r0 (p6) br.ret.sptk.many b0 ;; cmpxchg1.acq SCRATCH=[ADDRESS_OF_FLAG],BUSY,ar.ccv // Try to acquire lock ;; cmp.eq p6,p0=0,SCRATCH ;; (p6) mov RETCODE=1 br.ret.sptk.many b0 .endp __TBB_machine_trylockbyte# ================================================ FILE: benchmarks/tbb/ia64-gas/log2.s ================================================ // Copyright 2005-2014 Intel Corporation. All Rights Reserved. // // This file is part of Threading Building Blocks. Threading Building Blocks is free software; // you can redistribute it and/or modify it under the terms of the GNU General Public License // version 2 as published by the Free Software Foundation. Threading Building Blocks is // distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the // implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. // See the GNU General Public License for more details. You should have received a copy of // the GNU General Public License along with Threading Building Blocks; if not, write to the // Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA // // As a special exception, you may use this file as part of a free software library without // restriction. Specifically, if other files instantiate templates or use macros or inline // functions from this file, or you compile this file and link it with other files to produce // an executable, this file does not by itself cause the resulting executable to be covered // by the GNU General Public License. This exception does not however invalidate any other // reasons why the executable file might be covered by the GNU General Public License. .section .text .align 16 // unsigned long __TBB_machine_lg( unsigned long x ); // r32 = x .proc __TBB_machine_lg# .global __TBB_machine_lg# __TBB_machine_lg: shr r16=r32,1 // .x ;; shr r17=r32,2 // ..x or r32=r32,r16 // xx ;; shr r16=r32,3 // ...xx or r32=r32,r17 // xxx ;; shr r17=r32,5 // .....xxx or r32=r32,r16 // xxxxx ;; shr r16=r32,8 // ........xxxxx or r32=r32,r17 // xxxxxxxx ;; shr r17=r32,13 or r32=r32,r16 // 13x ;; shr r16=r32,21 or r32=r32,r17 // 21x ;; shr r17=r32,34 or r32=r32,r16 // 34x ;; shr r16=r32,55 or r32=r32,r17 // 55x ;; or r32=r32,r16 // 64x ;; popcnt r8=r32 ;; add r8=-1,r8 br.ret.sptk.many b0 .endp __TBB_machine_lg# ================================================ FILE: benchmarks/tbb/ia64-gas/pause.s ================================================ // Copyright 2005-2014 Intel Corporation. All Rights Reserved. // // This file is part of Threading Building Blocks. Threading Building Blocks is free software; // you can redistribute it and/or modify it under the terms of the GNU General Public License // version 2 as published by the Free Software Foundation. Threading Building Blocks is // distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the // implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. // See the GNU General Public License for more details. You should have received a copy of // the GNU General Public License along with Threading Building Blocks; if not, write to the // Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA // // As a special exception, you may use this file as part of a free software library without // restriction. Specifically, if other files instantiate templates or use macros or inline // functions from this file, or you compile this file and link it with other files to produce // an executable, this file does not by itself cause the resulting executable to be covered // by the GNU General Public License. This exception does not however invalidate any other // reasons why the executable file might be covered by the GNU General Public License. .section .text .align 16 // void __TBB_machine_pause( long count ); // r32 = count .proc __TBB_machine_pause# .global __TBB_machine_pause# count = r32 __TBB_machine_pause: hint.m 0 add count=-1,count ;; cmp.eq p6,p7=0,count (p7) br.cond.dpnt __TBB_machine_pause (p6) br.ret.sptk.many b0 .endp __TBB_machine_pause# ================================================ FILE: benchmarks/tbb/ibm_aix51/atomic_support.c ================================================ /* Copyright 2005-2014 Intel Corporation. All Rights Reserved. This file is part of Threading Building Blocks. Threading Building Blocks is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. Threading Building Blocks is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Threading Building Blocks; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA As a special exception, you may use this file as part of a free software library without restriction. Specifically, if other files instantiate templates or use macros or inline functions from this file, or you compile this file and link it with other files to produce an executable, this file does not by itself cause the resulting executable to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the executable file might be covered by the GNU General Public License. */ #include #include /* This file must be compiled with gcc. The IBM compiler doesn't seem to support inline assembly statements (October 2007). */ #ifdef __GNUC__ int32_t __TBB_machine_cas_32 (volatile void* ptr, int32_t value, int32_t comparand) { __asm__ __volatile__ ("sync\n"); /* memory release operation */ compare_and_swap ((atomic_p) ptr, &comparand, value); __asm__ __volatile__ ("isync\n"); /* memory acquire operation */ return comparand; } int64_t __TBB_machine_cas_64 (volatile void* ptr, int64_t value, int64_t comparand) { __asm__ __volatile__ ("sync\n"); /* memory release operation */ compare_and_swaplp ((atomic_l) ptr, &comparand, value); __asm__ __volatile__ ("isync\n"); /* memory acquire operation */ return comparand; } void __TBB_machine_flush () { __asm__ __volatile__ ("sync\n"); } void __TBB_machine_lwsync () { __asm__ __volatile__ ("lwsync\n"); } void __TBB_machine_isync () { __asm__ __volatile__ ("isync\n"); } #endif /* __GNUC__ */ ================================================ FILE: benchmarks/tbb/intel64-masm/atomic_support.asm ================================================ ; Copyright 2005-2014 Intel Corporation. All Rights Reserved. ; ; This file is part of Threading Building Blocks. Threading Building Blocks is free software; ; you can redistribute it and/or modify it under the terms of the GNU General Public License ; version 2 as published by the Free Software Foundation. Threading Building Blocks is ; distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the ; implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. ; See the GNU General Public License for more details. You should have received a copy of ; the GNU General Public License along with Threading Building Blocks; if not, write to the ; Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA ; ; As a special exception, you may use this file as part of a free software library without ; restriction. Specifically, if other files instantiate templates or use macros or inline ; functions from this file, or you compile this file and link it with other files to produce ; an executable, this file does not by itself cause the resulting executable to be covered ; by the GNU General Public License. This exception does not however invalidate any other ; reasons why the executable file might be covered by the GNU General Public License. ; DO NOT EDIT - AUTOMATICALLY GENERATED FROM .s FILE .code ALIGN 8 PUBLIC __TBB_machine_fetchadd1 __TBB_machine_fetchadd1: mov rax,rdx lock xadd [rcx],al ret .code ALIGN 8 PUBLIC __TBB_machine_fetchstore1 __TBB_machine_fetchstore1: mov rax,rdx lock xchg [rcx],al ret .code ALIGN 8 PUBLIC __TBB_machine_cmpswp1 __TBB_machine_cmpswp1: mov rax,r8 lock cmpxchg [rcx],dl ret .code ALIGN 8 PUBLIC __TBB_machine_fetchadd2 __TBB_machine_fetchadd2: mov rax,rdx lock xadd [rcx],ax ret .code ALIGN 8 PUBLIC __TBB_machine_fetchstore2 __TBB_machine_fetchstore2: mov rax,rdx lock xchg [rcx],ax ret .code ALIGN 8 PUBLIC __TBB_machine_cmpswp2 __TBB_machine_cmpswp2: mov rax,r8 lock cmpxchg [rcx],dx ret .code ALIGN 8 PUBLIC __TBB_machine_pause __TBB_machine_pause: L1: dw 090f3H; pause add ecx,-1 jne L1 ret end ================================================ FILE: benchmarks/tbb/intel64-masm/intel64_misc.asm ================================================ ; Copyright 2005-2014 Intel Corporation. All Rights Reserved. ; ; This file is part of Threading Building Blocks. Threading Building Blocks is free software; ; you can redistribute it and/or modify it under the terms of the GNU General Public License ; version 2 as published by the Free Software Foundation. Threading Building Blocks is ; distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the ; implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. ; See the GNU General Public License for more details. You should have received a copy of ; the GNU General Public License along with Threading Building Blocks; if not, write to the ; Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA ; ; As a special exception, you may use this file as part of a free software library without ; restriction. Specifically, if other files instantiate templates or use macros or inline ; functions from this file, or you compile this file and link it with other files to produce ; an executable, this file does not by itself cause the resulting executable to be covered ; by the GNU General Public License. This exception does not however invalidate any other ; reasons why the executable file might be covered by the GNU General Public License. .code ALIGN 8 PUBLIC __TBB_get_cpu_ctl_env __TBB_get_cpu_ctl_env: stmxcsr [rcx] fstcw [rcx+4] ret .code ALIGN 8 PUBLIC __TBB_set_cpu_ctl_env __TBB_set_cpu_ctl_env: ldmxcsr [rcx] fldcw [rcx+4] ret end ================================================ FILE: benchmarks/tbb/intel64-masm/itsx.asm ================================================ ; Copyright 2005-2014 Intel Corporation. All Rights Reserved. ; ; This file is part of Threading Building Blocks. Threading Building Blocks is free software; ; you can redistribute it and/or modify it under the terms of the GNU General Public License ; version 2 as published by the Free Software Foundation. Threading Building Blocks is ; distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the ; implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. ; See the GNU General Public License for more details. You should have received a copy of ; the GNU General Public License along with Threading Building Blocks; if not, write to the ; Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA ; ; As a special exception, you may use this file as part of a free software library without ; restriction. Specifically, if other files instantiate templates or use macros or inline ; functions from this file, or you compile this file and link it with other files to produce ; an executable, this file does not by itself cause the resulting executable to be covered ; by the GNU General Public License. This exception does not however invalidate any other ; reasons why the executable file might be covered by the GNU General Public License. .code ALIGN 8 PUBLIC __TBB_machine_try_lock_elided __TBB_machine_try_lock_elided: xor rax, rax mov al, 1 BYTE 0F2H xchg al, byte ptr [rcx] xor al, 1 ret .code ALIGN 8 PUBLIC __TBB_machine_unlock_elided __TBB_machine_unlock_elided: BYTE 0F3H mov byte ptr [rcx], 0 ret .code ALIGN 8 PUBLIC __TBB_machine_begin_transaction __TBB_machine_begin_transaction: mov eax, -1 BYTE 0C7H BYTE 0F8H BYTE 000H BYTE 000H BYTE 000H BYTE 000H ret .code ALIGN 8 PUBLIC __TBB_machine_end_transaction __TBB_machine_end_transaction: BYTE 00FH BYTE 001H BYTE 0D5H ret .code ALIGN 8 PUBLIC __TBB_machine_transaction_conflict_abort __TBB_machine_transaction_conflict_abort: BYTE 0C6H BYTE 0F8H BYTE 0FFH ; 12.4.5 Abort argument: lock not free when tested ret .code ALIGN 8 PUBLIC __TBB_machine_is_in_transaction __TBB_machine_is_in_transaction: xor eax, eax BYTE 00FH ; _xtest sets or clears ZF BYTE 001H BYTE 0D6H jz rset mov al,1 rset: ret end ================================================ FILE: benchmarks/tbb/internal/_aggregator_impl.h ================================================ /* Copyright 2005-2014 Intel Corporation. All Rights Reserved. This file is part of Threading Building Blocks. Threading Building Blocks is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. Threading Building Blocks is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Threading Building Blocks; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA As a special exception, you may use this file as part of a free software library without restriction. Specifically, if other files instantiate templates or use macros or inline functions from this file, or you compile this file and link it with other files to produce an executable, this file does not by itself cause the resulting executable to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the executable file might be covered by the GNU General Public License. */ #ifndef __TBB__aggregator_impl_H #define __TBB__aggregator_impl_H #include "../atomic.h" #if !__TBBMALLOC_BUILD #include "../tbb_profiling.h" #endif namespace tbb { namespace interface6 { namespace internal { using namespace tbb::internal; //! aggregated_operation base class template class aggregated_operation { public: uintptr_t status; Derived *next; aggregated_operation() : status(0), next(NULL) {} }; //! Aggregator base class /** An aggregator for collecting operations coming from multiple sources and executing them serially on a single thread. operation_type must be derived from aggregated_operation. The parameter handler_type is a functor that will be passed the list of operations and is expected to handle each operation appropriately, setting the status of each operation to non-zero.*/ template < typename operation_type > class aggregator_generic { public: aggregator_generic() : handler_busy(false) { pending_operations = NULL; } //! Place operation in list /** Place operation in list and either handle list or wait for operation to complete. long_life_time specifies life time of an operation inserting in an aggregator. "Long" (long_life_time == true) life time operation can be accessed even after executing it. "Short" (long_life_time == false) life time operations can be destroyed during executing so any access to it after executing is invalid.*/ template < typename handler_type > void execute(operation_type *op, handler_type &handle_operations, bool long_life_time = true) { operation_type *res; // op->status should be read before inserting the operation in the // aggregator queue since it can become invalid after executing a // handler (if the operation has 'short' life time.) const uintptr_t status = op->status; // ITT note: &(op->status) tag is used to cover accesses to this op node. This // thread has created the operation, and now releases it so that the handler // thread may handle the associated operation w/o triggering a race condition; // thus this tag will be acquired just before the operation is handled in the // handle_operations functor. call_itt_notify(releasing, &(op->status)); // insert the operation in the queue. do { // ITT may flag the following line as a race; it is a false positive: // This is an atomic read; we don't provide itt_hide_load_word for atomics op->next = res = pending_operations; // NOT A RACE } while (pending_operations.compare_and_swap(op, res) != res); if (!res) { // first in the list; handle the operations. // ITT note: &pending_operations tag covers access to the handler_busy flag, // which this waiting handler thread will try to set before entering // handle_operations. call_itt_notify(acquired, &pending_operations); start_handle_operations(handle_operations); // The operation with 'short' life time can already be destroyed. if (long_life_time) __TBB_ASSERT(op->status, NULL); } // not first; wait for op to be ready. else if (!status) { // operation is blocking here. __TBB_ASSERT(long_life_time, "The blocking operation cannot have 'short' life time. Since it can already be destroyed."); call_itt_notify(prepare, &(op->status)); spin_wait_while_eq(op->status, uintptr_t(0)); itt_load_word_with_acquire(op->status); } } private: //! An atomically updated list (aka mailbox) of pending operations atomic pending_operations; //! Controls thread access to handle_operations uintptr_t handler_busy; //! Trigger the handling of operations when the handler is free template < typename handler_type > void start_handle_operations( handler_type &handle_operations ) { operation_type *op_list; // ITT note: &handler_busy tag covers access to pending_operations as it is passed // between active and waiting handlers. Below, the waiting handler waits until // the active handler releases, and the waiting handler acquires &handler_busy as // it becomes the active_handler. The release point is at the end of this // function, when all operations in pending_operations have been handled by the // owner of this aggregator. call_itt_notify(prepare, &handler_busy); // get the handler_busy: // only one thread can possibly spin here at a time spin_wait_until_eq(handler_busy, uintptr_t(0)); call_itt_notify(acquired, &handler_busy); // acquire fence not necessary here due to causality rule and surrounding atomics __TBB_store_with_release(handler_busy, uintptr_t(1)); // ITT note: &pending_operations tag covers access to the handler_busy flag // itself. Capturing the state of the pending_operations signifies that // handler_busy has been set and a new active handler will now process that list's // operations. call_itt_notify(releasing, &pending_operations); // grab pending_operations op_list = pending_operations.fetch_and_store(NULL); // handle all the operations handle_operations(op_list); // release the handler itt_store_word_with_release(handler_busy, uintptr_t(0)); } }; template < typename handler_type, typename operation_type > class aggregator : public aggregator_generic { handler_type handle_operations; public: aggregator() {} explicit aggregator(handler_type h) : handle_operations(h) {} void initialize_handler(handler_type h) { handle_operations = h; } void execute(operation_type *op) { aggregator_generic::execute(op, handle_operations); } }; // the most-compatible friend declaration (vs, gcc, icc) is // template friend class aggregating_functor; template class aggregating_functor { aggregating_class *fi; public: aggregating_functor() {} aggregating_functor(aggregating_class *fi_) : fi(fi_) {} void operator()(operation_list* op_list) { fi->handle_operations(op_list); } }; } // namespace internal } // namespace interface6 namespace internal { using interface6::internal::aggregated_operation; using interface6::internal::aggregator_generic; using interface6::internal::aggregator; using interface6::internal::aggregating_functor; } // namespace internal } // namespace tbb #endif // __TBB__aggregator_impl_H ================================================ FILE: benchmarks/tbb/internal/_concurrent_queue_impl.h ================================================ /* Copyright 2005-2014 Intel Corporation. All Rights Reserved. This file is part of Threading Building Blocks. Threading Building Blocks is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. Threading Building Blocks is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Threading Building Blocks; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA As a special exception, you may use this file as part of a free software library without restriction. Specifically, if other files instantiate templates or use macros or inline functions from this file, or you compile this file and link it with other files to produce an executable, this file does not by itself cause the resulting executable to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the executable file might be covered by the GNU General Public License. */ #ifndef __TBB__concurrent_queue_impl_H #define __TBB__concurrent_queue_impl_H #ifndef __TBB_concurrent_queue_H #error Do not #include this internal file directly; use public TBB headers instead. #endif #include "../tbb_stddef.h" #include "../tbb_machine.h" #include "../atomic.h" #include "../spin_mutex.h" #include "../cache_aligned_allocator.h" #include "../tbb_exception.h" #include "../tbb_profiling.h" #include #include #if !TBB_USE_EXCEPTIONS && _MSC_VER // Suppress "C++ exception handler used, but unwind semantics are not enabled" warning in STL headers #pragma warning (push) #pragma warning (disable: 4530) #endif #include #if !TBB_USE_EXCEPTIONS && _MSC_VER #pragma warning (pop) #endif namespace tbb { #if !__TBB_TEMPLATE_FRIENDS_BROKEN // forward declaration namespace strict_ppl { template class concurrent_queue; } template class concurrent_bounded_queue; #endif //! For internal use only. namespace strict_ppl { //! @cond INTERNAL namespace internal { using namespace tbb::internal; typedef size_t ticket; template class micro_queue ; template class micro_queue_pop_finalizer ; template class concurrent_queue_base_v3; template struct concurrent_queue_rep; //! parts of concurrent_queue_rep that do not have references to micro_queue /** * For internal use only. */ struct concurrent_queue_rep_base : no_copy { template friend class micro_queue; template friend class concurrent_queue_base_v3; protected: //! Approximately n_queue/golden ratio static const size_t phi = 3; public: // must be power of 2 static const size_t n_queue = 8; //! Prefix on a page struct page { page* next; uintptr_t mask; }; atomic head_counter; char pad1[NFS_MaxLineSize-sizeof(atomic)]; atomic tail_counter; char pad2[NFS_MaxLineSize-sizeof(atomic)]; //! Always a power of 2 size_t items_per_page; //! Size of an item size_t item_size; //! number of invalid entries in the queue atomic n_invalid_entries; char pad3[NFS_MaxLineSize-sizeof(size_t)-sizeof(size_t)-sizeof(atomic)]; } ; inline bool is_valid_page(const concurrent_queue_rep_base::page* p) { return uintptr_t(p)>1; } //! Abstract class to define interface for page allocation/deallocation /** * For internal use only. */ class concurrent_queue_page_allocator { template friend class micro_queue ; template friend class micro_queue_pop_finalizer ; protected: virtual ~concurrent_queue_page_allocator() {} private: virtual concurrent_queue_rep_base::page* allocate_page() = 0; virtual void deallocate_page( concurrent_queue_rep_base::page* p ) = 0; } ; #if _MSC_VER && !defined(__INTEL_COMPILER) // unary minus operator applied to unsigned type, result still unsigned #pragma warning( push ) #pragma warning( disable: 4146 ) #endif //! A queue using simple locking. /** For efficiency, this class has no constructor. The caller is expected to zero-initialize it. */ template class micro_queue : no_copy { public: typedef void (*item_constructor_t)(T* location, const void* src); private: typedef concurrent_queue_rep_base::page page; //! Class used to ensure exception-safety of method "pop" class destroyer: no_copy { T& my_value; public: destroyer( T& value ) : my_value(value) {} ~destroyer() {my_value.~T();} }; void copy_item( page& dst, size_t dindex, const void* src, item_constructor_t construct_item ) { construct_item( &get_ref(dst, dindex), src ); } void copy_item( page& dst, size_t dindex, const page& src, size_t sindex, item_constructor_t construct_item ) { T& src_item = get_ref( const_cast(src), sindex ); construct_item( &get_ref(dst, dindex), static_cast(&src_item) ); } void assign_and_destroy_item( void* dst, page& src, size_t index ) { T& from = get_ref(src,index); destroyer d(from); *static_cast(dst) = tbb::internal::move( from ); } void spin_wait_until_my_turn( atomic& counter, ticket k, concurrent_queue_rep_base& rb ) const ; public: friend class micro_queue_pop_finalizer; struct padded_page: page { //! Not defined anywhere - exists to quiet warnings. padded_page(); //! Not defined anywhere - exists to quiet warnings. void operator=( const padded_page& ); //! Must be last field. T last; }; static T& get_ref( page& p, size_t index ) { return (&static_cast(static_cast(&p))->last)[index]; } atomic head_page; atomic head_counter; atomic tail_page; atomic tail_counter; spin_mutex page_mutex; void push( const void* item, ticket k, concurrent_queue_base_v3& base, item_constructor_t construct_item ) ; bool pop( void* dst, ticket k, concurrent_queue_base_v3& base ) ; micro_queue& assign( const micro_queue& src, concurrent_queue_base_v3& base, item_constructor_t construct_item ) ; page* make_copy( concurrent_queue_base_v3& base, const page* src_page, size_t begin_in_page, size_t end_in_page, ticket& g_index, item_constructor_t construct_item ) ; void invalidate_page_and_rethrow( ticket k ) ; }; template void micro_queue::spin_wait_until_my_turn( atomic& counter, ticket k, concurrent_queue_rep_base& rb ) const { for( atomic_backoff b(true);;b.pause() ) { ticket c = counter; if( c==k ) return; else if( c&1 ) { ++rb.n_invalid_entries; throw_exception( eid_bad_last_alloc ); } } } template void micro_queue::push( const void* item, ticket k, concurrent_queue_base_v3& base, item_constructor_t construct_item ) { k &= -concurrent_queue_rep_base::n_queue; page* p = NULL; size_t index = modulo_power_of_two( k/concurrent_queue_rep_base::n_queue, base.my_rep->items_per_page); if( !index ) { __TBB_TRY { concurrent_queue_page_allocator& pa = base; p = pa.allocate_page(); } __TBB_CATCH (...) { ++base.my_rep->n_invalid_entries; invalidate_page_and_rethrow( k ); } p->mask = 0; p->next = NULL; } if( tail_counter != k ) spin_wait_until_my_turn( tail_counter, k, *base.my_rep ); call_itt_notify(acquired, &tail_counter); if( p ) { spin_mutex::scoped_lock lock( page_mutex ); page* q = tail_page; if( is_valid_page(q) ) q->next = p; else head_page = p; tail_page = p; } else { p = tail_page; } __TBB_TRY { copy_item( *p, index, item, construct_item ); // If no exception was thrown, mark item as present. itt_hide_store_word(p->mask, p->mask | uintptr_t(1)<n_invalid_entries; call_itt_notify(releasing, &tail_counter); tail_counter += concurrent_queue_rep_base::n_queue; __TBB_RETHROW(); } } template bool micro_queue::pop( void* dst, ticket k, concurrent_queue_base_v3& base ) { k &= -concurrent_queue_rep_base::n_queue; if( head_counter!=k ) spin_wait_until_eq( head_counter, k ); call_itt_notify(acquired, &head_counter); if( tail_counter==k ) spin_wait_while_eq( tail_counter, k ); call_itt_notify(acquired, &tail_counter); page& p = *head_page; __TBB_ASSERT( &p, NULL ); size_t index = modulo_power_of_two( k/concurrent_queue_rep_base::n_queue, base.my_rep->items_per_page ); bool success = false; { micro_queue_pop_finalizer finalizer( *this, base, k+concurrent_queue_rep_base::n_queue, index==base.my_rep->items_per_page-1 ? &p : NULL ); if( p.mask & uintptr_t(1)<n_invalid_entries; } } return success; } template micro_queue& micro_queue::assign( const micro_queue& src, concurrent_queue_base_v3& base, item_constructor_t construct_item ) { head_counter = src.head_counter; tail_counter = src.tail_counter; const page* srcp = src.head_page; if( is_valid_page(srcp) ) { ticket g_index = head_counter; __TBB_TRY { size_t n_items = (tail_counter-head_counter)/concurrent_queue_rep_base::n_queue; size_t index = modulo_power_of_two( head_counter/concurrent_queue_rep_base::n_queue, base.my_rep->items_per_page ); size_t end_in_first_page = (index+n_itemsitems_per_page)?(index+n_items):base.my_rep->items_per_page; head_page = make_copy( base, srcp, index, end_in_first_page, g_index, construct_item ); page* cur_page = head_page; if( srcp != src.tail_page ) { for( srcp = srcp->next; srcp!=src.tail_page; srcp=srcp->next ) { cur_page->next = make_copy( base, srcp, 0, base.my_rep->items_per_page, g_index, construct_item ); cur_page = cur_page->next; } __TBB_ASSERT( srcp==src.tail_page, NULL ); size_t last_index = modulo_power_of_two( tail_counter/concurrent_queue_rep_base::n_queue, base.my_rep->items_per_page ); if( last_index==0 ) last_index = base.my_rep->items_per_page; cur_page->next = make_copy( base, srcp, 0, last_index, g_index, construct_item ); cur_page = cur_page->next; } tail_page = cur_page; } __TBB_CATCH (...) { invalidate_page_and_rethrow( g_index ); } } else { head_page = tail_page = NULL; } return *this; } template void micro_queue::invalidate_page_and_rethrow( ticket k ) { // Append an invalid page at address 1 so that no more pushes are allowed. page* invalid_page = (page*)uintptr_t(1); { spin_mutex::scoped_lock lock( page_mutex ); itt_store_word_with_release(tail_counter, k+concurrent_queue_rep_base::n_queue+1); page* q = tail_page; if( is_valid_page(q) ) q->next = invalid_page; else head_page = invalid_page; tail_page = invalid_page; } __TBB_RETHROW(); } template concurrent_queue_rep_base::page* micro_queue::make_copy( concurrent_queue_base_v3& base, const concurrent_queue_rep_base::page* src_page, size_t begin_in_page, size_t end_in_page, ticket& g_index, item_constructor_t construct_item ) { concurrent_queue_page_allocator& pa = base; page* new_page = pa.allocate_page(); new_page->next = NULL; new_page->mask = src_page->mask; for( ; begin_in_page!=end_in_page; ++begin_in_page, ++g_index ) if( new_page->mask & uintptr_t(1)< class micro_queue_pop_finalizer: no_copy { typedef concurrent_queue_rep_base::page page; ticket my_ticket; micro_queue& my_queue; page* my_page; concurrent_queue_page_allocator& allocator; public: micro_queue_pop_finalizer( micro_queue& queue, concurrent_queue_base_v3& b, ticket k, page* p ) : my_ticket(k), my_queue(queue), my_page(p), allocator(b) {} ~micro_queue_pop_finalizer() ; }; template micro_queue_pop_finalizer::~micro_queue_pop_finalizer() { page* p = my_page; if( is_valid_page(p) ) { spin_mutex::scoped_lock lock( my_queue.page_mutex ); page* q = p->next; my_queue.head_page = q; if( !is_valid_page(q) ) { my_queue.tail_page = NULL; } } itt_store_word_with_release(my_queue.head_counter, my_ticket); if( is_valid_page(p) ) { allocator.deallocate_page( p ); } } #if _MSC_VER && !defined(__INTEL_COMPILER) #pragma warning( pop ) #endif // warning 4146 is back template class concurrent_queue_iterator_rep ; template class concurrent_queue_iterator_base_v3; //! representation of concurrent_queue_base /** * the class inherits from concurrent_queue_rep_base and defines an array of micro_queue's */ template struct concurrent_queue_rep : public concurrent_queue_rep_base { micro_queue array[n_queue]; //! Map ticket to an array index static size_t index( ticket k ) { return k*phi%n_queue; } micro_queue& choose( ticket k ) { // The formula here approximates LRU in a cache-oblivious way. return array[index(k)]; } }; //! base class of concurrent_queue /** * The class implements the interface defined by concurrent_queue_page_allocator * and has a pointer to an instance of concurrent_queue_rep. */ template class concurrent_queue_base_v3: public concurrent_queue_page_allocator { //! Internal representation concurrent_queue_rep* my_rep; friend struct concurrent_queue_rep; friend class micro_queue; friend class concurrent_queue_iterator_rep; friend class concurrent_queue_iterator_base_v3; protected: typedef typename concurrent_queue_rep::page page; private: typedef typename micro_queue::padded_page padded_page; typedef typename micro_queue::item_constructor_t item_constructor_t; /* override */ virtual page *allocate_page() { concurrent_queue_rep& r = *my_rep; size_t n = sizeof(padded_page) + (r.items_per_page-1)*sizeof(T); return reinterpret_cast(allocate_block ( n )); } /* override */ virtual void deallocate_page( concurrent_queue_rep_base::page *p ) { concurrent_queue_rep& r = *my_rep; size_t n = sizeof(padded_page) + (r.items_per_page-1)*sizeof(T); deallocate_block( reinterpret_cast(p), n ); } //! custom allocator virtual void *allocate_block( size_t n ) = 0; //! custom de-allocator virtual void deallocate_block( void *p, size_t n ) = 0; protected: concurrent_queue_base_v3(); /* override */ virtual ~concurrent_queue_base_v3() { #if TBB_USE_ASSERT size_t nq = my_rep->n_queue; for( size_t i=0; iarray[i].tail_page==NULL, "pages were not freed properly" ); #endif /* TBB_USE_ASSERT */ cache_aligned_allocator >().deallocate(my_rep,1); } //! Enqueue item at tail of queue void internal_push( const void* src, item_constructor_t construct_item ) { concurrent_queue_rep& r = *my_rep; ticket k = r.tail_counter++; r.choose(k).push( src, k, *this, construct_item ); } //! Attempt to dequeue item from queue. /** NULL if there was no item to dequeue. */ bool internal_try_pop( void* dst ) ; //! Get size of queue; result may be invalid if queue is modified concurrently size_t internal_size() const ; //! check if the queue is empty; thread safe bool internal_empty() const ; //! free any remaining pages /* note that the name may be misleading, but it remains so due to a historical accident. */ void internal_finish_clear() ; //! Obsolete void internal_throw_exception() const { throw_exception( eid_bad_alloc ); } //! copy or move internal representation void assign( const concurrent_queue_base_v3& src, item_constructor_t construct_item ) ; #if __TBB_CPP11_RVALUE_REF_PRESENT //! swap internal representation void internal_swap( concurrent_queue_base_v3& src ) { std::swap( my_rep, src.my_rep ); } #endif /* __TBB_CPP11_RVALUE_REF_PRESENT */ }; template concurrent_queue_base_v3::concurrent_queue_base_v3() { const size_t item_size = sizeof(T); my_rep = cache_aligned_allocator >().allocate(1); __TBB_ASSERT( (size_t)my_rep % NFS_GetLineSize()==0, "alignment error" ); __TBB_ASSERT( (size_t)&my_rep->head_counter % NFS_GetLineSize()==0, "alignment error" ); __TBB_ASSERT( (size_t)&my_rep->tail_counter % NFS_GetLineSize()==0, "alignment error" ); __TBB_ASSERT( (size_t)&my_rep->array % NFS_GetLineSize()==0, "alignment error" ); memset(my_rep,0,sizeof(concurrent_queue_rep)); my_rep->item_size = item_size; my_rep->items_per_page = item_size<= 8 ? 32 : item_size<= 16 ? 16 : item_size<= 32 ? 8 : item_size<= 64 ? 4 : item_size<=128 ? 2 : 1; } template bool concurrent_queue_base_v3::internal_try_pop( void* dst ) { concurrent_queue_rep& r = *my_rep; ticket k; do { k = r.head_counter; for(;;) { if( (ptrdiff_t)(r.tail_counter-k)<=0 ) { // Queue is empty return false; } // Queue had item with ticket k when we looked. Attempt to get that item. ticket tk=k; #if defined(_MSC_VER) && defined(_Wp64) #pragma warning (push) #pragma warning (disable: 4267) #endif k = r.head_counter.compare_and_swap( tk+1, tk ); #if defined(_MSC_VER) && defined(_Wp64) #pragma warning (pop) #endif if( k==tk ) break; // Another thread snatched the item, retry. } } while( !r.choose( k ).pop( dst, k, *this ) ); return true; } template size_t concurrent_queue_base_v3::internal_size() const { concurrent_queue_rep& r = *my_rep; __TBB_ASSERT( sizeof(ptrdiff_t)<=sizeof(size_t), NULL ); ticket hc = r.head_counter; size_t nie = r.n_invalid_entries; ticket tc = r.tail_counter; __TBB_ASSERT( hc!=tc || !nie, NULL ); ptrdiff_t sz = tc-hc-nie; return sz<0 ? 0 : size_t(sz); } template bool concurrent_queue_base_v3::internal_empty() const { concurrent_queue_rep& r = *my_rep; ticket tc = r.tail_counter; ticket hc = r.head_counter; // if tc!=r.tail_counter, the queue was not empty at some point between the two reads. return tc==r.tail_counter && tc==hc+r.n_invalid_entries ; } template void concurrent_queue_base_v3::internal_finish_clear() { concurrent_queue_rep& r = *my_rep; size_t nq = r.n_queue; for( size_t i=0; i void concurrent_queue_base_v3::assign( const concurrent_queue_base_v3& src, item_constructor_t construct_item ) { concurrent_queue_rep& r = *my_rep; r.items_per_page = src.my_rep->items_per_page; // copy concurrent_queue_rep data r.head_counter = src.my_rep->head_counter; r.tail_counter = src.my_rep->tail_counter; r.n_invalid_entries = src.my_rep->n_invalid_entries; // copy or move micro_queues for( size_t i = 0; i < r.n_queue; ++i ) r.array[i].assign( src.my_rep->array[i], *this, construct_item); __TBB_ASSERT( r.head_counter==src.my_rep->head_counter && r.tail_counter==src.my_rep->tail_counter, "the source concurrent queue should not be concurrently modified." ); } template class concurrent_queue_iterator; template class concurrent_queue_iterator_rep: no_assign { typedef typename micro_queue::padded_page padded_page; public: ticket head_counter; const concurrent_queue_base_v3& my_queue; typename concurrent_queue_base_v3::page* array[concurrent_queue_rep::n_queue]; concurrent_queue_iterator_rep( const concurrent_queue_base_v3& queue ) : head_counter(queue.my_rep->head_counter), my_queue(queue) { for( size_t k=0; k::n_queue; ++k ) array[k] = queue.my_rep->array[k].head_page; } //! Set item to point to kth element. Return true if at end of queue or item is marked valid; false otherwise. bool get_item( T*& item, size_t k ) ; }; template bool concurrent_queue_iterator_rep::get_item( T*& item, size_t k ) { if( k==my_queue.my_rep->tail_counter ) { item = NULL; return true; } else { typename concurrent_queue_base_v3::page* p = array[concurrent_queue_rep::index(k)]; __TBB_ASSERT(p,NULL); size_t i = modulo_power_of_two( k/concurrent_queue_rep::n_queue, my_queue.my_rep->items_per_page ); item = µ_queue::get_ref(*p,i); return (p->mask & uintptr_t(1)< class concurrent_queue_iterator_base_v3 : no_assign { //! Represents concurrent_queue over which we are iterating. /** NULL if one past last element in queue. */ concurrent_queue_iterator_rep* my_rep; template friend bool operator==( const concurrent_queue_iterator& i, const concurrent_queue_iterator& j ); template friend bool operator!=( const concurrent_queue_iterator& i, const concurrent_queue_iterator& j ); protected: //! Pointer to current item Value* my_item; //! Default constructor concurrent_queue_iterator_base_v3() : my_rep(NULL), my_item(NULL) { #if __TBB_GCC_OPTIMIZER_ORDERING_BROKEN __TBB_compiler_fence(); #endif } //! Copy constructor concurrent_queue_iterator_base_v3( const concurrent_queue_iterator_base_v3& i ) : no_assign(), my_rep(NULL), my_item(NULL) { assign(i); } //! Construct iterator pointing to head of queue. concurrent_queue_iterator_base_v3( const concurrent_queue_base_v3& queue ) ; //! Assignment void assign( const concurrent_queue_iterator_base_v3& other ) ; //! Advance iterator one step towards tail of queue. void advance() ; //! Destructor ~concurrent_queue_iterator_base_v3() { cache_aligned_allocator >().deallocate(my_rep, 1); my_rep = NULL; } }; template concurrent_queue_iterator_base_v3::concurrent_queue_iterator_base_v3( const concurrent_queue_base_v3& queue ) { my_rep = cache_aligned_allocator >().allocate(1); new( my_rep ) concurrent_queue_iterator_rep(queue); size_t k = my_rep->head_counter; if( !my_rep->get_item(my_item, k) ) advance(); } template void concurrent_queue_iterator_base_v3::assign( const concurrent_queue_iterator_base_v3& other ) { if( my_rep!=other.my_rep ) { if( my_rep ) { cache_aligned_allocator >().deallocate(my_rep, 1); my_rep = NULL; } if( other.my_rep ) { my_rep = cache_aligned_allocator >().allocate(1); new( my_rep ) concurrent_queue_iterator_rep( *other.my_rep ); } } my_item = other.my_item; } template void concurrent_queue_iterator_base_v3::advance() { __TBB_ASSERT( my_item, "attempt to increment iterator past end of queue" ); size_t k = my_rep->head_counter; const concurrent_queue_base_v3& queue = my_rep->my_queue; #if TBB_USE_ASSERT Value* tmp; my_rep->get_item(tmp,k); __TBB_ASSERT( my_item==tmp, NULL ); #endif /* TBB_USE_ASSERT */ size_t i = modulo_power_of_two( k/concurrent_queue_rep::n_queue, queue.my_rep->items_per_page ); if( i==queue.my_rep->items_per_page-1 ) { typename concurrent_queue_base_v3::page*& root = my_rep->array[concurrent_queue_rep::index(k)]; root = root->next; } // advance k my_rep->head_counter = ++k; if( !my_rep->get_item(my_item, k) ) advance(); } //! Similar to C++0x std::remove_cv /** "tbb_" prefix added to avoid overload confusion with C++0x implementations. */ template struct tbb_remove_cv {typedef T type;}; template struct tbb_remove_cv {typedef T type;}; template struct tbb_remove_cv {typedef T type;}; template struct tbb_remove_cv {typedef T type;}; //! Meets requirements of a forward iterator for STL. /** Value is either the T or const T type of the container. @ingroup containers */ template class concurrent_queue_iterator: public concurrent_queue_iterator_base_v3::type>, public std::iterator { #if !__TBB_TEMPLATE_FRIENDS_BROKEN template friend class ::tbb::strict_ppl::concurrent_queue; #else public: // workaround for MSVC #endif //! Construct iterator pointing to head of queue. concurrent_queue_iterator( const concurrent_queue_base_v3& queue ) : concurrent_queue_iterator_base_v3::type>(queue) { } public: concurrent_queue_iterator() {} concurrent_queue_iterator( const concurrent_queue_iterator& other ) : concurrent_queue_iterator_base_v3::type>(other) {} //! Iterator assignment concurrent_queue_iterator& operator=( const concurrent_queue_iterator& other ) { this->assign(other); return *this; } //! Reference to current item Value& operator*() const { return *static_cast(this->my_item); } Value* operator->() const {return &operator*();} //! Advance to next item in queue concurrent_queue_iterator& operator++() { this->advance(); return *this; } //! Post increment Value* operator++(int) { Value* result = &operator*(); operator++(); return result; } }; // concurrent_queue_iterator template bool operator==( const concurrent_queue_iterator& i, const concurrent_queue_iterator& j ) { return i.my_item==j.my_item; } template bool operator!=( const concurrent_queue_iterator& i, const concurrent_queue_iterator& j ) { return i.my_item!=j.my_item; } } // namespace internal //! @endcond } // namespace strict_ppl //! @cond INTERNAL namespace internal { class concurrent_queue_rep; class concurrent_queue_iterator_rep; class concurrent_queue_iterator_base_v3; template class concurrent_queue_iterator; //! For internal use only. /** Type-independent portion of concurrent_queue. @ingroup containers */ class concurrent_queue_base_v3: no_copy { //! Internal representation concurrent_queue_rep* my_rep; friend class concurrent_queue_rep; friend struct micro_queue; friend class micro_queue_pop_finalizer; friend class concurrent_queue_iterator_rep; friend class concurrent_queue_iterator_base_v3; protected: //! Prefix on a page struct page { page* next; uintptr_t mask; }; //! Capacity of the queue ptrdiff_t my_capacity; //! Always a power of 2 size_t items_per_page; //! Size of an item size_t item_size; enum copy_specifics { copy, move }; #if __TBB_PROTECTED_NESTED_CLASS_BROKEN public: #endif template struct padded_page: page { //! Not defined anywhere - exists to quiet warnings. padded_page(); //! Not defined anywhere - exists to quiet warnings. void operator=( const padded_page& ); //! Must be last field. T last; }; private: virtual void copy_item( page& dst, size_t index, const void* src ) = 0; virtual void assign_and_destroy_item( void* dst, page& src, size_t index ) = 0; protected: __TBB_EXPORTED_METHOD concurrent_queue_base_v3( size_t item_size ); virtual __TBB_EXPORTED_METHOD ~concurrent_queue_base_v3(); //! Enqueue item at tail of queue using copy operation void __TBB_EXPORTED_METHOD internal_push( const void* src ); //! Dequeue item from head of queue void __TBB_EXPORTED_METHOD internal_pop( void* dst ); //! Abort all pending queue operations void __TBB_EXPORTED_METHOD internal_abort(); //! Attempt to enqueue item onto queue using copy operation bool __TBB_EXPORTED_METHOD internal_push_if_not_full( const void* src ); //! Attempt to dequeue item from queue. /** NULL if there was no item to dequeue. */ bool __TBB_EXPORTED_METHOD internal_pop_if_present( void* dst ); //! Get size of queue ptrdiff_t __TBB_EXPORTED_METHOD internal_size() const; //! Check if the queue is emtpy bool __TBB_EXPORTED_METHOD internal_empty() const; //! Set the queue capacity void __TBB_EXPORTED_METHOD internal_set_capacity( ptrdiff_t capacity, size_t element_size ); //! custom allocator virtual page *allocate_page() = 0; //! custom de-allocator virtual void deallocate_page( page *p ) = 0; //! free any remaining pages /* note that the name may be misleading, but it remains so due to a historical accident. */ void __TBB_EXPORTED_METHOD internal_finish_clear() ; //! throw an exception void __TBB_EXPORTED_METHOD internal_throw_exception() const; //! copy internal representation void __TBB_EXPORTED_METHOD assign( const concurrent_queue_base_v3& src ) ; #if __TBB_CPP11_RVALUE_REF_PRESENT //! swap queues void internal_swap( concurrent_queue_base_v3& src ) { std::swap( my_capacity, src.my_capacity ); std::swap( items_per_page, src.items_per_page ); std::swap( item_size, src.item_size ); std::swap( my_rep, src.my_rep ); } #endif /* __TBB_CPP11_RVALUE_REF_PRESENT */ //! Enqueues item at tail of queue using specified operation (copy or move) void internal_insert_item( const void* src, copy_specifics op_type ); //! Attempts to enqueue at tail of queue using specified operation (copy or move) bool internal_insert_if_not_full( const void* src, copy_specifics op_type ); //! Assigns one queue to another using specified operation (copy or move) void internal_assign( const concurrent_queue_base_v3& src, copy_specifics op_type ); private: virtual void copy_page_item( page& dst, size_t dindex, const page& src, size_t sindex ) = 0; }; //! For internal use only. /** Backward compatible modification of concurrent_queue_base_v3 @ingroup containers */ class concurrent_queue_base_v8: public concurrent_queue_base_v3 { protected: concurrent_queue_base_v8( size_t item_sz ) : concurrent_queue_base_v3( item_sz ) {} //! move items void __TBB_EXPORTED_METHOD move_content( concurrent_queue_base_v8& src ) ; //! Attempt to enqueue item onto queue using move operation bool __TBB_EXPORTED_METHOD internal_push_move_if_not_full( const void* src ); //! Enqueue item at tail of queue using move operation void __TBB_EXPORTED_METHOD internal_push_move( const void* src ); private: friend struct micro_queue; virtual void move_page_item( page& dst, size_t dindex, const page& src, size_t sindex ) = 0; virtual void move_item( page& dst, size_t index, const void* src ) = 0; }; //! Type-independent portion of concurrent_queue_iterator. /** @ingroup containers */ class concurrent_queue_iterator_base_v3 { //! concurrent_queue over which we are iterating. /** NULL if one past last element in queue. */ concurrent_queue_iterator_rep* my_rep; template friend bool operator==( const concurrent_queue_iterator& i, const concurrent_queue_iterator& j ); template friend bool operator!=( const concurrent_queue_iterator& i, const concurrent_queue_iterator& j ); void initialize( const concurrent_queue_base_v3& queue, size_t offset_of_data ); protected: //! Pointer to current item void* my_item; //! Default constructor concurrent_queue_iterator_base_v3() : my_rep(NULL), my_item(NULL) {} //! Copy constructor concurrent_queue_iterator_base_v3( const concurrent_queue_iterator_base_v3& i ) : my_rep(NULL), my_item(NULL) { assign(i); } //! Obsolete entry point for constructing iterator pointing to head of queue. /** Does not work correctly for SSE types. */ __TBB_EXPORTED_METHOD concurrent_queue_iterator_base_v3( const concurrent_queue_base_v3& queue ); //! Construct iterator pointing to head of queue. __TBB_EXPORTED_METHOD concurrent_queue_iterator_base_v3( const concurrent_queue_base_v3& queue, size_t offset_of_data ); //! Assignment void __TBB_EXPORTED_METHOD assign( const concurrent_queue_iterator_base_v3& i ); //! Advance iterator one step towards tail of queue. void __TBB_EXPORTED_METHOD advance(); //! Destructor __TBB_EXPORTED_METHOD ~concurrent_queue_iterator_base_v3(); }; typedef concurrent_queue_iterator_base_v3 concurrent_queue_iterator_base; //! Meets requirements of a forward iterator for STL. /** Value is either the T or const T type of the container. @ingroup containers */ template class concurrent_queue_iterator: public concurrent_queue_iterator_base, public std::iterator { #if !defined(_MSC_VER) || defined(__INTEL_COMPILER) template friend class ::tbb::concurrent_bounded_queue; #else public: // workaround for MSVC #endif //! Construct iterator pointing to head of queue. concurrent_queue_iterator( const concurrent_queue_base_v3& queue ) : concurrent_queue_iterator_base_v3(queue,__TBB_offsetof(concurrent_queue_base_v3::padded_page,last)) { } public: concurrent_queue_iterator() {} /** If Value==Container::value_type, then this routine is the copy constructor. If Value==const Container::value_type, then this routine is a conversion constructor. */ concurrent_queue_iterator( const concurrent_queue_iterator& other ) : concurrent_queue_iterator_base_v3(other) {} //! Iterator assignment concurrent_queue_iterator& operator=( const concurrent_queue_iterator& other ) { assign(other); return *this; } //! Reference to current item Value& operator*() const { return *static_cast(my_item); } Value* operator->() const {return &operator*();} //! Advance to next item in queue concurrent_queue_iterator& operator++() { advance(); return *this; } //! Post increment Value* operator++(int) { Value* result = &operator*(); operator++(); return result; } }; // concurrent_queue_iterator template bool operator==( const concurrent_queue_iterator& i, const concurrent_queue_iterator& j ) { return i.my_item==j.my_item; } template bool operator!=( const concurrent_queue_iterator& i, const concurrent_queue_iterator& j ) { return i.my_item!=j.my_item; } } // namespace internal; //! @endcond } // namespace tbb #endif /* __TBB__concurrent_queue_impl_H */ ================================================ FILE: benchmarks/tbb/internal/_concurrent_unordered_impl.h ================================================ /* Copyright 2005-2014 Intel Corporation. All Rights Reserved. This file is part of Threading Building Blocks. Threading Building Blocks is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. Threading Building Blocks is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Threading Building Blocks; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA As a special exception, you may use this file as part of a free software library without restriction. Specifically, if other files instantiate templates or use macros or inline functions from this file, or you compile this file and link it with other files to produce an executable, this file does not by itself cause the resulting executable to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the executable file might be covered by the GNU General Public License. */ /* Container implementations in this header are based on PPL implementations provided by Microsoft. */ #ifndef __TBB__concurrent_unordered_impl_H #define __TBB__concurrent_unordered_impl_H #if !defined(__TBB_concurrent_unordered_map_H) && !defined(__TBB_concurrent_unordered_set_H) && !defined(__TBB_concurrent_hash_map_H) #error Do not #include this internal file directly; use public TBB headers instead. #endif #include "../tbb_stddef.h" #if !TBB_USE_EXCEPTIONS && _MSC_VER // Suppress "C++ exception handler used, but unwind semantics are not enabled" warning in STL headers #pragma warning (push) #pragma warning (disable: 4530) #endif #include #include // Need std::pair #include // Need std::equal_to (in ../concurrent_unordered_*.h) #include // For tbb_hasher #include // Need std::memset #if !TBB_USE_EXCEPTIONS && _MSC_VER #pragma warning (pop) #endif #include "../atomic.h" #include "../tbb_exception.h" #include "../tbb_allocator.h" #if __TBB_INITIALIZER_LISTS_PRESENT #include #endif namespace tbb { namespace interface5 { //! @cond INTERNAL namespace internal { template class split_ordered_list; template class concurrent_unordered_base; // Forward list iterators (without skipping dummy elements) template class flist_iterator : public std::iterator { template friend class split_ordered_list; template friend class concurrent_unordered_base; template friend class flist_iterator; typedef typename Solist::nodeptr_t nodeptr_t; public: typedef typename Solist::value_type value_type; typedef typename Solist::difference_type difference_type; typedef typename Solist::pointer pointer; typedef typename Solist::reference reference; flist_iterator() : my_node_ptr(0) {} flist_iterator( const flist_iterator &other ) : my_node_ptr(other.my_node_ptr) {} reference operator*() const { return my_node_ptr->my_element; } pointer operator->() const { return &**this; } flist_iterator& operator++() { my_node_ptr = my_node_ptr->my_next; return *this; } flist_iterator operator++(int) { flist_iterator tmp = *this; ++*this; return tmp; } protected: flist_iterator(nodeptr_t pnode) : my_node_ptr(pnode) {} nodeptr_t get_node_ptr() const { return my_node_ptr; } nodeptr_t my_node_ptr; template friend bool operator==( const flist_iterator &i, const flist_iterator &j ); template friend bool operator!=( const flist_iterator& i, const flist_iterator& j ); }; template bool operator==( const flist_iterator &i, const flist_iterator &j ) { return i.my_node_ptr == j.my_node_ptr; } template bool operator!=( const flist_iterator& i, const flist_iterator& j ) { return i.my_node_ptr != j.my_node_ptr; } // Split-order list iterators, needed to skip dummy elements template class solist_iterator : public flist_iterator { typedef flist_iterator base_type; typedef typename Solist::nodeptr_t nodeptr_t; using base_type::get_node_ptr; template friend class split_ordered_list; template friend class solist_iterator; template friend bool operator==( const solist_iterator &i, const solist_iterator &j ); template friend bool operator!=( const solist_iterator& i, const solist_iterator& j ); const Solist *my_list_ptr; solist_iterator(nodeptr_t pnode, const Solist *plist) : base_type(pnode), my_list_ptr(plist) {} public: typedef typename Solist::value_type value_type; typedef typename Solist::difference_type difference_type; typedef typename Solist::pointer pointer; typedef typename Solist::reference reference; solist_iterator() {} solist_iterator(const solist_iterator &other ) : base_type(other), my_list_ptr(other.my_list_ptr) {} reference operator*() const { return this->base_type::operator*(); } pointer operator->() const { return (&**this); } solist_iterator& operator++() { do ++(*(base_type *)this); while (get_node_ptr() != NULL && get_node_ptr()->is_dummy()); return (*this); } solist_iterator operator++(int) { solist_iterator tmp = *this; do ++*this; while (get_node_ptr() != NULL && get_node_ptr()->is_dummy()); return (tmp); } }; template bool operator==( const solist_iterator &i, const solist_iterator &j ) { return i.my_node_ptr == j.my_node_ptr && i.my_list_ptr == j.my_list_ptr; } template bool operator!=( const solist_iterator& i, const solist_iterator& j ) { return i.my_node_ptr != j.my_node_ptr || i.my_list_ptr != j.my_list_ptr; } // Forward type and class definitions typedef size_t sokey_t; // Forward list in which elements are sorted in a split-order template class split_ordered_list { public: typedef split_ordered_list self_type; typedef typename Allocator::template rebind::other allocator_type; struct node; typedef node *nodeptr_t; typedef typename allocator_type::size_type size_type; typedef typename allocator_type::difference_type difference_type; typedef typename allocator_type::pointer pointer; typedef typename allocator_type::const_pointer const_pointer; typedef typename allocator_type::reference reference; typedef typename allocator_type::const_reference const_reference; typedef typename allocator_type::value_type value_type; typedef solist_iterator const_iterator; typedef solist_iterator iterator; typedef flist_iterator raw_const_iterator; typedef flist_iterator raw_iterator; // Node that holds the element in a split-ordered list struct node : tbb::internal::no_assign { private: // for compilers that try to generate default constructors though they are not needed. node(); // VS 2008, 2010, 2012 public: // Initialize the node with the given order key void init(sokey_t order_key) { my_order_key = order_key; my_next = NULL; } // Return the order key (needed for hashing) sokey_t get_order_key() const { // TODO: remove return my_order_key; } // Inserts the new element in the list in an atomic fashion nodeptr_t atomic_set_next(nodeptr_t new_node, nodeptr_t current_node) { // Try to change the next pointer on the current element to a new element, only if it still points to the cached next nodeptr_t exchange_node = tbb::internal::as_atomic(my_next).compare_and_swap(new_node, current_node); if (exchange_node == current_node) // TODO: why this branch? { // Operation succeeded, return the new node return new_node; } else { // Operation failed, return the "interfering" node return exchange_node; } } // Checks if this element in the list is a dummy, order enforcing node. Dummy nodes are used by buckets // in the hash table to quickly index into the right subsection of the split-ordered list. bool is_dummy() const { return (my_order_key & 0x1) == 0; } nodeptr_t my_next; // Next element in the list value_type my_element; // Element storage sokey_t my_order_key; // Order key for this element }; // Allocate a new node with the given order key and value nodeptr_t create_node(sokey_t order_key, const T &value) { nodeptr_t pnode = my_node_allocator.allocate(1); __TBB_TRY { new(static_cast(&pnode->my_element)) T(value); pnode->init(order_key); } __TBB_CATCH(...) { my_node_allocator.deallocate(pnode, 1); __TBB_RETHROW(); } return (pnode); } #if __TBB_CPP11_RVALUE_REF_PRESENT //TODO: try to combine both implementations using poor man forward //TODO: use RAII scoped guard instead of explicit catch // Allocate a new node with the given order key and value nodeptr_t create_node(sokey_t order_key, T &&value) { nodeptr_t pnode = my_node_allocator.allocate(1); __TBB_TRY { new(static_cast(&pnode->my_element)) T(std::move(value)); pnode->init(order_key); } __TBB_CATCH(...) { my_node_allocator.deallocate(pnode, 1); __TBB_RETHROW(); } return (pnode); } #endif //__TBB_CPP11_RVALUE_REF_PRESENT // Allocate a new node with the given order key; used to allocate dummy nodes nodeptr_t create_node(sokey_t order_key) { nodeptr_t pnode = my_node_allocator.allocate(1); pnode->init(order_key); return (pnode); } split_ordered_list(allocator_type a = allocator_type()) : my_node_allocator(a), my_element_count(0) { // Immediately allocate a dummy node with order key of 0. This node // will always be the head of the list. my_head = create_node(0); } ~split_ordered_list() { // Clear the list clear(); // Remove the head element which is not cleared by clear() nodeptr_t pnode = my_head; my_head = NULL; __TBB_ASSERT(pnode != NULL && pnode->my_next == NULL, "Invalid head list node"); destroy_node(pnode); } // Common forward list functions allocator_type get_allocator() const { return (my_node_allocator); } void clear() { nodeptr_t pnext; nodeptr_t pnode = my_head; __TBB_ASSERT(my_head != NULL, "Invalid head list node"); pnext = pnode->my_next; pnode->my_next = NULL; pnode = pnext; while (pnode != NULL) { pnext = pnode->my_next; destroy_node(pnode); pnode = pnext; } my_element_count = 0; } // Returns a first non-dummy element in the SOL iterator begin() { return first_real_iterator(raw_begin()); } // Returns a first non-dummy element in the SOL const_iterator begin() const { return first_real_iterator(raw_begin()); } iterator end() { return (iterator(0, this)); } const_iterator end() const { return (const_iterator(0, this)); } const_iterator cbegin() const { return (((const self_type *)this)->begin()); } const_iterator cend() const { return (((const self_type *)this)->end()); } // Checks if the number of elements (non-dummy) is 0 bool empty() const { return (my_element_count == 0); } // Returns the number of non-dummy elements in the list size_type size() const { return my_element_count; } // Returns the maximum size of the list, determined by the allocator size_type max_size() const { return my_node_allocator.max_size(); } // Swaps 'this' list with the passed in one void swap(self_type& other) { if (this == &other) { // Nothing to do return; } std::swap(my_element_count, other.my_element_count); std::swap(my_head, other.my_head); } // Split-order list functions // Returns a first element in the SOL, which is always a dummy raw_iterator raw_begin() { return raw_iterator(my_head); } // Returns a first element in the SOL, which is always a dummy raw_const_iterator raw_begin() const { return raw_const_iterator(my_head); } raw_iterator raw_end() { return raw_iterator(0); } raw_const_iterator raw_end() const { return raw_const_iterator(0); } static sokey_t get_order_key(const raw_const_iterator& it) { return it.get_node_ptr()->get_order_key(); } static sokey_t get_safe_order_key(const raw_const_iterator& it) { if( !it.get_node_ptr() ) return ~sokey_t(0); return it.get_node_ptr()->get_order_key(); } // Returns a public iterator version of the internal iterator. Public iterator must not // be a dummy private iterator. iterator get_iterator(raw_iterator it) { __TBB_ASSERT(it.get_node_ptr() == NULL || !it.get_node_ptr()->is_dummy(), "Invalid user node (dummy)"); return iterator(it.get_node_ptr(), this); } // Returns a public iterator version of the internal iterator. Public iterator must not // be a dummy private iterator. const_iterator get_iterator(raw_const_iterator it) const { __TBB_ASSERT(it.get_node_ptr() == NULL || !it.get_node_ptr()->is_dummy(), "Invalid user node (dummy)"); return const_iterator(it.get_node_ptr(), this); } // Returns a non-const version of the raw_iterator raw_iterator get_iterator(raw_const_iterator it) { return raw_iterator(it.get_node_ptr()); } // Returns a non-const version of the iterator static iterator get_iterator(const_iterator it) { return iterator(it.my_node_ptr, it.my_list_ptr); } // Returns a public iterator version of a first non-dummy internal iterator at or after // the passed in internal iterator. iterator first_real_iterator(raw_iterator it) { // Skip all dummy, internal only iterators while (it != raw_end() && it.get_node_ptr()->is_dummy()) ++it; return iterator(it.get_node_ptr(), this); } // Returns a public iterator version of a first non-dummy internal iterator at or after // the passed in internal iterator. const_iterator first_real_iterator(raw_const_iterator it) const { // Skip all dummy, internal only iterators while (it != raw_end() && it.get_node_ptr()->is_dummy()) ++it; return const_iterator(it.get_node_ptr(), this); } // Erase an element using the allocator void destroy_node(nodeptr_t pnode) { if (!pnode->is_dummy()) my_node_allocator.destroy(pnode); my_node_allocator.deallocate(pnode, 1); } // Try to insert a new element in the list. If insert fails, return the node that // was inserted instead. nodeptr_t try_insert(nodeptr_t previous, nodeptr_t new_node, nodeptr_t current_node) { new_node->my_next = current_node; return previous->atomic_set_next(new_node, current_node); } // Insert a new element between passed in iterators std::pair try_insert(raw_iterator it, raw_iterator next, const value_type &value, sokey_t order_key, size_type *new_count) { nodeptr_t pnode = create_node(order_key, value); nodeptr_t inserted_node = try_insert(it.get_node_ptr(), pnode, next.get_node_ptr()); if (inserted_node == pnode) { // If the insert succeeded, check that the order is correct and increment the element count check_range(); *new_count = __TBB_FetchAndAddW((uintptr_t*)&my_element_count, uintptr_t(1)); return std::pair(iterator(pnode, this), true); } else { // If the insert failed (element already there), then delete the new one destroy_node(pnode); return std::pair(end(), false); } } // Insert a new dummy element, starting search at a parent dummy element raw_iterator insert_dummy(raw_iterator it, sokey_t order_key) { raw_iterator last = raw_end(); raw_iterator where = it; __TBB_ASSERT(where != last, "Invalid head node"); ++where; // Create a dummy element up front, even though it may be discarded (due to concurrent insertion) nodeptr_t dummy_node = create_node(order_key); for (;;) { __TBB_ASSERT(it != last, "Invalid head list node"); // If the head iterator is at the end of the list, or past the point where this dummy // node needs to be inserted, then try to insert it. if (where == last || get_order_key(where) > order_key) { __TBB_ASSERT(get_order_key(it) < order_key, "Invalid node order in the list"); // Try to insert it in the right place nodeptr_t inserted_node = try_insert(it.get_node_ptr(), dummy_node, where.get_node_ptr()); if (inserted_node == dummy_node) { // Insertion succeeded, check the list for order violations check_range(); return raw_iterator(dummy_node); } else { // Insertion failed: either dummy node was inserted by another thread, or // a real element was inserted at exactly the same place as dummy node. // Proceed with the search from the previous location where order key was // known to be larger (note: this is legal only because there is no safe // concurrent erase operation supported). where = it; ++where; continue; } } else if (get_order_key(where) == order_key) { // Another dummy node with the same value found, discard the new one. destroy_node(dummy_node); return where; } // Move the iterator forward it = where; ++where; } } // This erase function can handle both real and dummy nodes void erase_node(raw_iterator previous, raw_const_iterator& where) { nodeptr_t pnode = (where++).get_node_ptr(); nodeptr_t prevnode = previous.get_node_ptr(); __TBB_ASSERT(prevnode->my_next == pnode, "Erase must take consecutive iterators"); prevnode->my_next = pnode->my_next; destroy_node(pnode); } // Erase the element (previous node needs to be passed because this is a forward only list) iterator erase_node(raw_iterator previous, const_iterator where) { raw_const_iterator it = where; erase_node(previous, it); my_element_count--; return get_iterator(first_real_iterator(it)); } // Move all elements from the passed in split-ordered list to this one void move_all(self_type& source) { raw_const_iterator first = source.raw_begin(); raw_const_iterator last = source.raw_end(); if (first == last) return; nodeptr_t previous_node = my_head; raw_const_iterator begin_iterator = first++; // Move all elements one by one, including dummy ones for (raw_const_iterator it = first; it != last;) { nodeptr_t pnode = it.get_node_ptr(); nodeptr_t dummy_node = pnode->is_dummy() ? create_node(pnode->get_order_key()) : create_node(pnode->get_order_key(), pnode->my_element); previous_node = try_insert(previous_node, dummy_node, NULL); __TBB_ASSERT(previous_node != NULL, "Insertion must succeed"); raw_const_iterator where = it++; source.erase_node(get_iterator(begin_iterator), where); } check_range(); } private: //Need to setup private fields of split_ordered_list in move constructor and assignment of concurrent_unordered_base template friend class concurrent_unordered_base; // Check the list for order violations void check_range() { #if TBB_USE_ASSERT for (raw_iterator it = raw_begin(); it != raw_end(); ++it) { raw_iterator next_iterator = it; ++next_iterator; __TBB_ASSERT(next_iterator == end() || next_iterator.get_node_ptr()->get_order_key() >= it.get_node_ptr()->get_order_key(), "!!! List order inconsistency !!!"); } #endif } typename allocator_type::template rebind::other my_node_allocator; // allocator object for nodes size_type my_element_count; // Total item count, not counting dummy nodes nodeptr_t my_head; // pointer to head node }; // Template class for hash compare template class hash_compare { public: typedef Hasher hasher; typedef Key_equality key_equal; hash_compare() {} hash_compare(Hasher a_hasher) : my_hash_object(a_hasher) {} hash_compare(Hasher a_hasher, Key_equality a_keyeq) : my_hash_object(a_hasher), my_key_compare_object(a_keyeq) {} size_t operator()(const Key& key) const { return ((size_t)my_hash_object(key)); } bool operator()(const Key& key1, const Key& key2) const { return (!my_key_compare_object(key1, key2)); } Hasher my_hash_object; // The hash object Key_equality my_key_compare_object; // The equality comparator object }; #if defined(_MSC_VER) && !defined(__INTEL_COMPILER) #pragma warning(push) #pragma warning(disable: 4127) // warning C4127: conditional expression is constant #endif template class concurrent_unordered_base : public Traits { protected: // Type definitions typedef concurrent_unordered_base self_type; typedef typename Traits::value_type value_type; typedef typename Traits::key_type key_type; typedef typename Traits::hash_compare hash_compare; typedef typename Traits::value_compare value_compare; typedef typename Traits::allocator_type allocator_type; typedef typename hash_compare::hasher hasher; typedef typename hash_compare::key_equal key_equal; typedef typename allocator_type::pointer pointer; typedef typename allocator_type::const_pointer const_pointer; typedef typename allocator_type::reference reference; typedef typename allocator_type::const_reference const_reference; typedef typename allocator_type::size_type size_type; typedef typename allocator_type::difference_type difference_type; typedef split_ordered_list solist_t; typedef typename solist_t::nodeptr_t nodeptr_t; // Iterators that walk the entire split-order list, including dummy nodes typedef typename solist_t::raw_iterator raw_iterator; typedef typename solist_t::raw_const_iterator raw_const_iterator; typedef typename solist_t::iterator iterator; // TODO: restore const iterator for unordered_sets typedef typename solist_t::const_iterator const_iterator; typedef iterator local_iterator; typedef const_iterator const_local_iterator; using Traits::my_hash_compare; using Traits::get_key; using Traits::allow_multimapping; static const size_type initial_bucket_number = 8; // Initial number of buckets private: typedef std::pair pairii_t; typedef std::pair paircc_t; static size_type const pointers_per_table = sizeof(size_type) * 8; // One bucket segment per bit static const size_type initial_bucket_load = 4; // Initial maximum number of elements per bucket struct call_internal_clear_on_exit{ concurrent_unordered_base* my_instance; call_internal_clear_on_exit(concurrent_unordered_base* instance) : my_instance(instance) {} void dismiss(){ my_instance = NULL;} ~call_internal_clear_on_exit(){ if (my_instance){ my_instance->internal_clear(); } } }; protected: // Constructors/Destructors concurrent_unordered_base(size_type n_of_buckets = initial_bucket_number, const hash_compare& hc = hash_compare(), const allocator_type& a = allocator_type()) : Traits(hc), my_solist(a), my_allocator(a), my_maximum_bucket_size((float) initial_bucket_load) { if( n_of_buckets == 0) ++n_of_buckets; my_number_of_buckets = 1<<__TBB_Log2((uintptr_t)n_of_buckets*2-1); // round up to power of 2 internal_init(); } concurrent_unordered_base(const concurrent_unordered_base& right, const allocator_type& a) : Traits(right.my_hash_compare), my_solist(a), my_allocator(a) { internal_init(); internal_copy(right); } concurrent_unordered_base(const concurrent_unordered_base& right) : Traits(right.my_hash_compare), my_solist(right.get_allocator()), my_allocator(right.get_allocator()) { //FIXME:exception safety seems to be broken here internal_init(); internal_copy(right); } #if __TBB_CPP11_RVALUE_REF_PRESENT concurrent_unordered_base(concurrent_unordered_base&& right) : Traits(right.my_hash_compare), my_solist(right.get_allocator()), my_allocator(right.get_allocator()) { internal_init(); swap(right); } concurrent_unordered_base(concurrent_unordered_base&& right, const allocator_type& a) : Traits(right.my_hash_compare), my_solist(a), my_allocator(a) { call_internal_clear_on_exit clear_buckets_on_exception(this); internal_init(); if (a == right.get_allocator()){ this->swap(right); }else{ my_maximum_bucket_size = right.my_maximum_bucket_size; my_number_of_buckets = right.my_number_of_buckets; my_solist.my_element_count = right.my_solist.my_element_count; if (! right.my_solist.empty()){ nodeptr_t previous_node = my_solist.my_head; // Move all elements one by one, including dummy ones for (raw_const_iterator it = ++(right.my_solist.raw_begin()), last = right.my_solist.raw_end(); it != last; ++it) { const nodeptr_t pnode = it.get_node_ptr(); nodeptr_t node; if (pnode->is_dummy()) { node = my_solist.create_node(pnode->get_order_key()); size_type bucket = __TBB_ReverseBits(pnode->get_order_key()) % my_number_of_buckets; set_bucket(bucket, node); }else{ node = my_solist.create_node(pnode->get_order_key(), std::move(pnode->my_element)); } previous_node = my_solist.try_insert(previous_node, node, NULL); __TBB_ASSERT(previous_node != NULL, "Insertion of node failed. Concurrent inserts in constructor ?"); } my_solist.check_range(); } } clear_buckets_on_exception.dismiss(); } #endif //__TBB_CPP11_RVALUE_REF_PRESENT concurrent_unordered_base& operator=(const concurrent_unordered_base& right) { if (this != &right) internal_copy(right); return (*this); } #if __TBB_CPP11_RVALUE_REF_PRESENT concurrent_unordered_base& operator=(concurrent_unordered_base&& other) { if(this != &other){ typedef typename tbb::internal::allocator_traits::propagate_on_container_move_assignment pocma_t; if(pocma_t::value || this->my_allocator == other.my_allocator) { concurrent_unordered_base trash (std::move(*this)); swap(other); if (pocma_t::value) { using std::swap; //TODO: swapping allocators here may be a problem, replace with single direction moving swap(this->my_solist.my_node_allocator, other.my_solist.my_node_allocator); swap(this->my_allocator, other.my_allocator); } } else { concurrent_unordered_base moved_copy(std::move(other),this->my_allocator); this->swap(moved_copy); } } return *this; } #endif //__TBB_CPP11_RVALUE_REF_PRESENT #if __TBB_INITIALIZER_LISTS_PRESENT //! assignment operator from initializer_list concurrent_unordered_base& operator=(std::initializer_list il) { this->clear(); this->insert(il.begin(),il.end()); return (*this); } #endif //# __TBB_INITIALIZER_LISTS_PRESENT ~concurrent_unordered_base() { // Delete all node segments internal_clear(); } public: allocator_type get_allocator() const { return my_solist.get_allocator(); } // Size and capacity function bool empty() const { return my_solist.empty(); } size_type size() const { return my_solist.size(); } size_type max_size() const { return my_solist.max_size(); } // Iterators iterator begin() { return my_solist.begin(); } const_iterator begin() const { return my_solist.begin(); } iterator end() { return my_solist.end(); } const_iterator end() const { return my_solist.end(); } const_iterator cbegin() const { return my_solist.cbegin(); } const_iterator cend() const { return my_solist.cend(); } // Parallel traversal support class const_range_type : tbb::internal::no_assign { const concurrent_unordered_base &my_table; raw_const_iterator my_begin_node; raw_const_iterator my_end_node; mutable raw_const_iterator my_midpoint_node; public: //! Type for size of a range typedef typename concurrent_unordered_base::size_type size_type; typedef typename concurrent_unordered_base::value_type value_type; typedef typename concurrent_unordered_base::reference reference; typedef typename concurrent_unordered_base::difference_type difference_type; typedef typename concurrent_unordered_base::const_iterator iterator; //! True if range is empty. bool empty() const {return my_begin_node == my_end_node;} //! True if range can be partitioned into two subranges. bool is_divisible() const { return my_midpoint_node != my_end_node; } //! Split range. const_range_type( const_range_type &r, split ) : my_table(r.my_table), my_end_node(r.my_end_node) { r.my_end_node = my_begin_node = r.my_midpoint_node; __TBB_ASSERT( !empty(), "Splitting despite the range is not divisible" ); __TBB_ASSERT( !r.empty(), "Splitting despite the range is not divisible" ); set_midpoint(); r.set_midpoint(); } //! Init range with container and grainsize specified const_range_type( const concurrent_unordered_base &a_table ) : my_table(a_table), my_begin_node(a_table.my_solist.begin()), my_end_node(a_table.my_solist.end()) { set_midpoint(); } iterator begin() const { return my_table.my_solist.get_iterator(my_begin_node); } iterator end() const { return my_table.my_solist.get_iterator(my_end_node); } //! The grain size for this range. size_type grainsize() const { return 1; } //! Set my_midpoint_node to point approximately half way between my_begin_node and my_end_node. void set_midpoint() const { if( my_begin_node == my_end_node ) // not divisible my_midpoint_node = my_end_node; else { sokey_t begin_key = solist_t::get_safe_order_key(my_begin_node); sokey_t end_key = solist_t::get_safe_order_key(my_end_node); size_t mid_bucket = __TBB_ReverseBits( begin_key + (end_key-begin_key)/2 ) % my_table.my_number_of_buckets; while ( !my_table.is_initialized(mid_bucket) ) mid_bucket = my_table.get_parent(mid_bucket); if(__TBB_ReverseBits(mid_bucket) > begin_key) { // found a dummy_node between begin and end my_midpoint_node = my_table.my_solist.first_real_iterator(my_table.get_bucket( mid_bucket )); } else { // didn't find a dummy node between begin and end. my_midpoint_node = my_end_node; } #if TBB_USE_ASSERT { sokey_t mid_key = solist_t::get_safe_order_key(my_midpoint_node); __TBB_ASSERT( begin_key < mid_key, "my_begin_node is after my_midpoint_node" ); __TBB_ASSERT( mid_key <= end_key, "my_midpoint_node is after my_end_node" ); } #endif // TBB_USE_ASSERT } } }; class range_type : public const_range_type { public: typedef typename concurrent_unordered_base::iterator iterator; //! Split range. range_type( range_type &r, split ) : const_range_type( r, split() ) {} //! Init range with container and grainsize specified range_type( const concurrent_unordered_base &a_table ) : const_range_type(a_table) {} iterator begin() const { return solist_t::get_iterator( const_range_type::begin() ); } iterator end() const { return solist_t::get_iterator( const_range_type::end() ); } }; range_type range() { return range_type( *this ); } const_range_type range() const { return const_range_type( *this ); } // Modifiers std::pair insert(const value_type& value) { return internal_insert(value); } iterator insert(const_iterator, const value_type& value) { // Ignore hint return insert(value).first; } template void insert(Iterator first, Iterator last) { for (Iterator it = first; it != last; ++it) insert(*it); } #if __TBB_INITIALIZER_LISTS_PRESENT //! Insert initializer list void insert(std::initializer_list il) { insert(il.begin(), il.end()); } #endif iterator unsafe_erase(const_iterator where) { return internal_erase(where); } iterator unsafe_erase(const_iterator first, const_iterator last) { while (first != last) unsafe_erase(first++); return my_solist.get_iterator(first); } size_type unsafe_erase(const key_type& key) { pairii_t where = equal_range(key); size_type item_count = internal_distance(where.first, where.second); unsafe_erase(where.first, where.second); return item_count; } void swap(concurrent_unordered_base& right) { if (this != &right) { std::swap(my_hash_compare, right.my_hash_compare); // TODO: check what ADL meant here my_solist.swap(right.my_solist); internal_swap_buckets(right); std::swap(my_number_of_buckets, right.my_number_of_buckets); std::swap(my_maximum_bucket_size, right.my_maximum_bucket_size); } } // Observers hasher hash_function() const { return my_hash_compare.my_hash_object; } key_equal key_eq() const { return my_hash_compare.my_key_compare_object; } void clear() { // Clear list my_solist.clear(); // Clear buckets internal_clear(); // Initialize bucket 0 __TBB_ASSERT(my_buckets[0] == NULL, NULL); raw_iterator dummy_node = my_solist.raw_begin(); set_bucket(0, dummy_node); } // Lookup iterator find(const key_type& key) { return internal_find(key); } const_iterator find(const key_type& key) const { return const_cast(this)->internal_find(key); } size_type count(const key_type& key) const { if(allow_multimapping) { paircc_t answer = equal_range(key); size_type item_count = internal_distance(answer.first, answer.second); return item_count; } else { return const_cast(this)->internal_find(key) == end()?0:1; } } std::pair equal_range(const key_type& key) { return internal_equal_range(key); } std::pair equal_range(const key_type& key) const { return const_cast(this)->internal_equal_range(key); } // Bucket interface - for debugging size_type unsafe_bucket_count() const { return my_number_of_buckets; } size_type unsafe_max_bucket_count() const { return segment_size(pointers_per_table-1); } size_type unsafe_bucket_size(size_type bucket) { size_type item_count = 0; if (is_initialized(bucket)) { raw_iterator it = get_bucket(bucket); ++it; for (; it != my_solist.raw_end() && !it.get_node_ptr()->is_dummy(); ++it) ++item_count; } return item_count; } size_type unsafe_bucket(const key_type& key) const { sokey_t order_key = (sokey_t) my_hash_compare(key); size_type bucket = order_key % my_number_of_buckets; return bucket; } // If the bucket is initialized, return a first non-dummy element in it local_iterator unsafe_begin(size_type bucket) { if (!is_initialized(bucket)) return end(); raw_iterator it = get_bucket(bucket); return my_solist.first_real_iterator(it); } // If the bucket is initialized, return a first non-dummy element in it const_local_iterator unsafe_begin(size_type bucket) const { if (!is_initialized(bucket)) return end(); raw_const_iterator it = get_bucket(bucket); return my_solist.first_real_iterator(it); } // @REVIEW: Takes O(n) // Returns the iterator after the last non-dummy element in the bucket local_iterator unsafe_end(size_type bucket) { if (!is_initialized(bucket)) return end(); raw_iterator it = get_bucket(bucket); // Find the end of the bucket, denoted by the dummy element do ++it; while(it != my_solist.raw_end() && !it.get_node_ptr()->is_dummy()); // Return the first real element past the end of the bucket return my_solist.first_real_iterator(it); } // @REVIEW: Takes O(n) // Returns the iterator after the last non-dummy element in the bucket const_local_iterator unsafe_end(size_type bucket) const { if (!is_initialized(bucket)) return end(); raw_const_iterator it = get_bucket(bucket); // Find the end of the bucket, denoted by the dummy element do ++it; while(it != my_solist.raw_end() && !it.get_node_ptr()->is_dummy()); // Return the first real element past the end of the bucket return my_solist.first_real_iterator(it); } const_local_iterator unsafe_cbegin(size_type bucket) const { return ((const self_type *) this)->unsafe_begin(bucket); } const_local_iterator unsafe_cend(size_type bucket) const { return ((const self_type *) this)->unsafe_end(bucket); } // Hash policy float load_factor() const { return (float) size() / (float) unsafe_bucket_count(); } float max_load_factor() const { return my_maximum_bucket_size; } void max_load_factor(float newmax) { if (newmax != newmax || newmax < 0) tbb::internal::throw_exception(tbb::internal::eid_invalid_load_factor); my_maximum_bucket_size = newmax; } // This function is a noop, because the underlying split-ordered list // is already sorted, so an increase in the bucket number will be // reflected next time this bucket is touched. void rehash(size_type buckets) { size_type current_buckets = my_number_of_buckets; if (current_buckets >= buckets) return; my_number_of_buckets = 1<<__TBB_Log2((uintptr_t)buckets*2-1); // round up to power of 2 } private: // Initialize the hash and keep the first bucket open void internal_init() { // Allocate an array of segment pointers memset(my_buckets, 0, pointers_per_table * sizeof(void *)); // Initialize bucket 0 raw_iterator dummy_node = my_solist.raw_begin(); set_bucket(0, dummy_node); } void internal_clear() { for (size_type index = 0; index < pointers_per_table; ++index) { if (my_buckets[index] != NULL) { size_type sz = segment_size(index); for (size_type index2 = 0; index2 < sz; ++index2) my_allocator.destroy(&my_buckets[index][index2]); my_allocator.deallocate(my_buckets[index], sz); my_buckets[index] = 0; } } } void internal_copy(const self_type& right) { clear(); my_maximum_bucket_size = right.my_maximum_bucket_size; my_number_of_buckets = right.my_number_of_buckets; __TBB_TRY { insert(right.begin(), right.end()); my_hash_compare = right.my_hash_compare; } __TBB_CATCH(...) { my_solist.clear(); __TBB_RETHROW(); } } void internal_swap_buckets(concurrent_unordered_base& right) { // Swap all node segments for (size_type index = 0; index < pointers_per_table; ++index) { raw_iterator * iterator_pointer = my_buckets[index]; my_buckets[index] = right.my_buckets[index]; right.my_buckets[index] = iterator_pointer; } } //TODO: why not use std::distance? // Hash APIs size_type internal_distance(const_iterator first, const_iterator last) const { size_type num = 0; for (const_iterator it = first; it != last; ++it) ++num; return num; } // Insert an element in the hash given its value std::pair internal_insert(const value_type& value) { sokey_t order_key = (sokey_t) my_hash_compare(get_key(value)); size_type bucket = order_key % my_number_of_buckets; // If bucket is empty, initialize it first if (!is_initialized(bucket)) init_bucket(bucket); size_type new_count = 0; order_key = split_order_key_regular(order_key); raw_iterator it = get_bucket(bucket); raw_iterator last = my_solist.raw_end(); raw_iterator where = it; __TBB_ASSERT(where != last, "Invalid head node"); // First node is a dummy node ++where; for (;;) { if (where == last || solist_t::get_order_key(where) > order_key) { // Try to insert it in the right place std::pair result = my_solist.try_insert(it, where, value, order_key, &new_count); if (result.second) { // Insertion succeeded, adjust the table size, if needed adjust_table_size(new_count, my_number_of_buckets); return result; } else { // Insertion failed: either the same node was inserted by another thread, or // another element was inserted at exactly the same place as this node. // Proceed with the search from the previous location where order key was // known to be larger (note: this is legal only because there is no safe // concurrent erase operation supported). where = it; ++where; continue; } } else if (!allow_multimapping && solist_t::get_order_key(where) == order_key && my_hash_compare(get_key(*where), get_key(value)) == 0) { // Element already in the list, return it return std::pair(my_solist.get_iterator(where), false); } // Move the iterator forward it = where; ++where; } } // Find the element in the split-ordered list iterator internal_find(const key_type& key) { sokey_t order_key = (sokey_t) my_hash_compare(key); size_type bucket = order_key % my_number_of_buckets; // If bucket is empty, initialize it first if (!is_initialized(bucket)) init_bucket(bucket); order_key = split_order_key_regular(order_key); raw_iterator last = my_solist.raw_end(); for (raw_iterator it = get_bucket(bucket); it != last; ++it) { if (solist_t::get_order_key(it) > order_key) { // If the order key is smaller than the current order key, the element // is not in the hash. return end(); } else if (solist_t::get_order_key(it) == order_key) { // The fact that order keys match does not mean that the element is found. // Key function comparison has to be performed to check whether this is the // right element. If not, keep searching while order key is the same. if (!my_hash_compare(get_key(*it), key)) return my_solist.get_iterator(it); } } return end(); } // Erase an element from the list. This is not a concurrency safe function. iterator internal_erase(const_iterator it) { key_type key = get_key(*it); sokey_t order_key = (sokey_t) my_hash_compare(key); size_type bucket = order_key % my_number_of_buckets; // If bucket is empty, initialize it first if (!is_initialized(bucket)) init_bucket(bucket); order_key = split_order_key_regular(order_key); raw_iterator previous = get_bucket(bucket); raw_iterator last = my_solist.raw_end(); raw_iterator where = previous; __TBB_ASSERT(where != last, "Invalid head node"); // First node is a dummy node ++where; for (;;) { if (where == last) return end(); else if (my_solist.get_iterator(where) == it) return my_solist.erase_node(previous, it); // Move the iterator forward previous = where; ++where; } } // Return the [begin, end) pair of iterators with the same key values. // This operation makes sense only if mapping is many-to-one. pairii_t internal_equal_range(const key_type& key) { sokey_t order_key = (sokey_t) my_hash_compare(key); size_type bucket = order_key % my_number_of_buckets; // If bucket is empty, initialize it first if (!is_initialized(bucket)) init_bucket(bucket); order_key = split_order_key_regular(order_key); raw_iterator end_it = my_solist.raw_end(); for (raw_iterator it = get_bucket(bucket); it != end_it; ++it) { if (solist_t::get_order_key(it) > order_key) { // There is no element with the given key return pairii_t(end(), end()); } else if (solist_t::get_order_key(it) == order_key && !my_hash_compare(get_key(*it), key)) { iterator first = my_solist.get_iterator(it); iterator last = first; do ++last; while( allow_multimapping && last != end() && !my_hash_compare(get_key(*last), key) ); return pairii_t(first, last); } } return pairii_t(end(), end()); } // Bucket APIs void init_bucket(size_type bucket) { // Bucket 0 has no parent. __TBB_ASSERT( bucket != 0, "The first bucket must always be initialized"); size_type parent_bucket = get_parent(bucket); // All parent_bucket buckets have to be initialized before this bucket is if (!is_initialized(parent_bucket)) init_bucket(parent_bucket); raw_iterator parent = get_bucket(parent_bucket); // Create a dummy first node in this bucket raw_iterator dummy_node = my_solist.insert_dummy(parent, split_order_key_dummy(bucket)); set_bucket(bucket, dummy_node); } void adjust_table_size(size_type total_elements, size_type current_size) { // Grow the table by a factor of 2 if possible and needed if ( ((float) total_elements / (float) current_size) > my_maximum_bucket_size ) { // Double the size of the hash only if size has not changed in between loads my_number_of_buckets.compare_and_swap(2u*current_size, current_size); //Simple "my_number_of_buckets.compare_and_swap( current_size<<1, current_size );" does not work for VC8 //due to overzealous compiler warnings in /Wp64 mode } } size_type get_parent(size_type bucket) const { // Unsets bucket's most significant turned-on bit size_type msb = __TBB_Log2((uintptr_t)bucket); return bucket & ~(size_type(1) << msb); } // Dynamic sized array (segments) //! @return segment index of given index in the array static size_type segment_index_of( size_type index ) { return size_type( __TBB_Log2( uintptr_t(index|1) ) ); } //! @return the first array index of given segment static size_type segment_base( size_type k ) { return (size_type(1)< my_number_of_buckets; // Current table size solist_t my_solist; // List where all the elements are kept typename allocator_type::template rebind::other my_allocator; // Allocator object for segments float my_maximum_bucket_size; // Maximum size of the bucket atomic my_buckets[pointers_per_table]; // The segment table }; #if defined(_MSC_VER) && !defined(__INTEL_COMPILER) #pragma warning(pop) // warning 4127 is back #endif //! Hash multiplier static const size_t hash_multiplier = tbb::internal::select_size_t_constant<2654435769U, 11400714819323198485ULL>::value; } // namespace internal //! @endcond //! Hasher functions template inline size_t tbb_hasher( const T& t ) { return static_cast( t ) * internal::hash_multiplier; } template inline size_t tbb_hasher( P* ptr ) { size_t const h = reinterpret_cast( ptr ); return (h >> 3) ^ h; } template inline size_t tbb_hasher( const std::basic_string& s ) { size_t h = 0; for( const E* c = s.c_str(); *c; ++c ) h = static_cast(*c) ^ (h * internal::hash_multiplier); return h; } template inline size_t tbb_hasher( const std::pair& p ) { return tbb_hasher(p.first) ^ tbb_hasher(p.second); } } // namespace interface5 using interface5::tbb_hasher; // Template class for hash compare template class tbb_hash { public: tbb_hash() {} size_t operator()(const Key& key) const { return tbb_hasher(key); } }; } // namespace tbb #endif// __TBB__concurrent_unordered_impl_H ================================================ FILE: benchmarks/tbb/internal/_flow_graph_impl.h ================================================ /* Copyright 2005-2014 Intel Corporation. All Rights Reserved. This file is part of Threading Building Blocks. Threading Building Blocks is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. Threading Building Blocks is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Threading Building Blocks; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA As a special exception, you may use this file as part of a free software library without restriction. Specifically, if other files instantiate templates or use macros or inline functions from this file, or you compile this file and link it with other files to produce an executable, this file does not by itself cause the resulting executable to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the executable file might be covered by the GNU General Public License. */ #ifndef __TBB__flow_graph_impl_H #define __TBB__flow_graph_impl_H #ifndef __TBB_flow_graph_H #error Do not #include this internal file directly; use public TBB headers instead. #endif namespace internal { namespace graph_policy_namespace { enum graph_buffer_policy { rejecting, reserving, queueing, tag_matching }; } // -------------- function_body containers ---------------------- //! A functor that takes no input and generates a value of type Output template< typename Output > class source_body : tbb::internal::no_assign { public: virtual ~source_body() {} virtual bool operator()(Output &output) = 0; virtual source_body* clone() = 0; #if TBB_PREVIEW_FLOW_GRAPH_FEATURES virtual void reset_body() = 0; #endif }; //! The leaf for source_body template< typename Output, typename Body> class source_body_leaf : public source_body { public: source_body_leaf( const Body &_body ) : body(_body), init_body(_body) { } /*override*/ bool operator()(Output &output) { return body( output ); } /*override*/ source_body_leaf* clone() { return new source_body_leaf< Output, Body >(init_body); } #if TBB_PREVIEW_FLOW_GRAPH_FEATURES /*override*/ void reset_body() { body = init_body; } #endif Body get_body() { return body; } private: Body body; Body init_body; }; //! A functor that takes an Input and generates an Output template< typename Input, typename Output > class function_body : tbb::internal::no_assign { public: virtual ~function_body() {} virtual Output operator()(const Input &input) = 0; virtual function_body* clone() = 0; #if TBB_PREVIEW_FLOW_GRAPH_FEATURES virtual void reset_body() = 0; #endif }; //! the leaf for function_body template class function_body_leaf : public function_body< Input, Output > { public: function_body_leaf( const B &_body ) : body(_body), init_body(_body) { } Output operator()(const Input &i) { return body(i); } #if TBB_PREVIEW_FLOW_GRAPH_FEATURES /*override*/ void reset_body() { body = init_body; } #endif B get_body() { return body; } /*override*/ function_body_leaf* clone() { return new function_body_leaf< Input, Output, B >(init_body); } private: B body; B init_body; }; //! the leaf for function_body specialized for Input and output of continue_msg template class function_body_leaf< continue_msg, continue_msg, B> : public function_body< continue_msg, continue_msg > { public: function_body_leaf( const B &_body ) : body(_body), init_body(_body) { } continue_msg operator()( const continue_msg &i ) { body(i); return i; } #if TBB_PREVIEW_FLOW_GRAPH_FEATURES /*override*/ void reset_body() { body = init_body; } #endif B get_body() { return body; } /*override*/ function_body_leaf* clone() { return new function_body_leaf< continue_msg, continue_msg, B >(init_body); } private: B body; B init_body; }; //! the leaf for function_body specialized for Output of continue_msg template class function_body_leaf< Input, continue_msg, B> : public function_body< Input, continue_msg > { public: function_body_leaf( const B &_body ) : body(_body), init_body(_body) { } continue_msg operator()(const Input &i) { body(i); return continue_msg(); } #if TBB_PREVIEW_FLOW_GRAPH_FEATURES /*override*/ void reset_body() { body = init_body; } #endif B get_body() { return body; } /*override*/ function_body_leaf* clone() { return new function_body_leaf< Input, continue_msg, B >(init_body); } private: B body; B init_body; }; //! the leaf for function_body specialized for Input of continue_msg template class function_body_leaf< continue_msg, Output, B > : public function_body< continue_msg, Output > { public: function_body_leaf( const B &_body ) : body(_body), init_body(_body) { } Output operator()(const continue_msg &i) { return body(i); } #if TBB_PREVIEW_FLOW_GRAPH_FEATURES /*override*/ void reset_body() { body = init_body; } #endif B get_body() { return body; } /*override*/ function_body_leaf* clone() { return new function_body_leaf< continue_msg, Output, B >(init_body); } private: B body; B init_body; }; //! function_body that takes an Input and a set of output ports template class multifunction_body : tbb::internal::no_assign { public: virtual ~multifunction_body () {} virtual void operator()(const Input &/* input*/, OutputSet &/*oset*/) = 0; virtual multifunction_body* clone() = 0; #if TBB_PREVIEW_FLOW_GRAPH_FEATURES virtual void reset_body() = 0; #endif }; //! leaf for multifunction. OutputSet can be a std::tuple or a vector. template class multifunction_body_leaf : public multifunction_body { public: multifunction_body_leaf(const B &_body) : body(_body), init_body(_body) { } void operator()(const Input &input, OutputSet &oset) { body(input, oset); // body may explicitly put() to one or more of oset. } #if TBB_PREVIEW_FLOW_GRAPH_FEATURES /*override*/ void reset_body() { body = init_body; } #endif B get_body() { return body; } /*override*/ multifunction_body_leaf* clone() { return new multifunction_body_leaf(init_body); } private: B body; B init_body; }; // --------------------------- end of function_body containers ------------------------ // --------------------------- node task bodies --------------------------------------- //! A task that calls a node's forward_task function template< typename NodeType > class forward_task_bypass : public task { NodeType &my_node; public: forward_task_bypass( NodeType &n ) : my_node(n) {} task *execute() { task * new_task = my_node.forward_task(); if (new_task == SUCCESSFULLY_ENQUEUED) new_task = NULL; return new_task; } }; //! A task that calls a node's apply_body_bypass function, passing in an input of type Input // return the task* unless it is SUCCESSFULLY_ENQUEUED, in which case return NULL template< typename NodeType, typename Input > class apply_body_task_bypass : public task { NodeType &my_node; Input my_input; public: apply_body_task_bypass( NodeType &n, const Input &i ) : my_node(n), my_input(i) {} task *execute() { task * next_task = my_node.apply_body_bypass( my_input ); if(next_task == SUCCESSFULLY_ENQUEUED) next_task = NULL; return next_task; } }; //! A task that calls a node's apply_body function with no input template< typename NodeType > class source_task_bypass : public task { NodeType &my_node; public: source_task_bypass( NodeType &n ) : my_node(n) {} task *execute() { task *new_task = my_node.apply_body_bypass( ); if(new_task == SUCCESSFULLY_ENQUEUED) return NULL; return new_task; } }; // ------------------------ end of node task bodies ----------------------------------- //! An empty functor that takes an Input and returns a default constructed Output template< typename Input, typename Output > struct empty_body { Output operator()( const Input & ) const { return Output(); } }; //! A node_cache maintains a std::queue of elements of type T. Each operation is protected by a lock. template< typename T, typename M=spin_mutex > class node_cache { public: typedef size_t size_type; bool empty() { typename my_mutex_type::scoped_lock lock( my_mutex ); return internal_empty(); } void add( T &n ) { typename my_mutex_type::scoped_lock lock( my_mutex ); internal_push(n); } void remove( T &n ) { typename my_mutex_type::scoped_lock lock( my_mutex ); for ( size_t i = internal_size(); i != 0; --i ) { T &s = internal_pop(); if ( &s == &n ) return; // only remove one predecessor per request internal_push(s); } } #if TBB_PREVIEW_FLOW_GRAPH_FEATURES typedef std::vector predecessor_vector_type; void internal_add_built_predecessor( T &n ) { typename my_mutex_type::scoped_lock lock( my_mutex ); my_built_predecessors.add_edge(n); } void internal_delete_built_predecessor( T &n ) { typename my_mutex_type::scoped_lock lock( my_mutex ); my_built_predecessors.delete_edge(n); } void copy_predecessors( predecessor_vector_type &v) { typename my_mutex_type::scoped_lock lock( my_mutex ); my_built_predecessors.copy_edges(v); } size_t predecessor_count() { typename my_mutex_type::scoped_lock lock(my_mutex); return (size_t)(my_built_predecessors.edge_count()); } #endif /* TBB_PREVIEW_FLOW_GRAPH_FEATURES */ protected: typedef M my_mutex_type; my_mutex_type my_mutex; std::queue< T * > my_q; #if TBB_PREVIEW_FLOW_GRAPH_FEATURES edge_container my_built_predecessors; #endif // Assumes lock is held inline bool internal_empty( ) { return my_q.empty(); } // Assumes lock is held inline size_type internal_size( ) { return my_q.size(); } // Assumes lock is held inline void internal_push( T &n ) { my_q.push(&n); } // Assumes lock is held inline T &internal_pop() { T *v = my_q.front(); my_q.pop(); return *v; } }; //! A cache of predecessors that only supports try_get template< typename T, typename M=spin_mutex > class predecessor_cache : public node_cache< sender, M > { public: typedef M my_mutex_type; typedef T output_type; typedef sender predecessor_type; typedef receiver successor_type; predecessor_cache( ) : my_owner( NULL ) { } void set_owner( successor_type *owner ) { my_owner = owner; } bool get_item( output_type &v ) { bool msg = false; do { predecessor_type *src; { typename my_mutex_type::scoped_lock lock(this->my_mutex); if ( this->internal_empty() ) { break; } src = &this->internal_pop(); } // Try to get from this sender msg = src->try_get( v ); if (msg == false) { // Relinquish ownership of the edge if ( my_owner) src->register_successor( *my_owner ); } else { // Retain ownership of the edge this->add(*src); } } while ( msg == false ); return msg; } void reset( __TBB_PFG_RESET_ARG(reset_flags f)) { if(my_owner) { for(;;) { predecessor_type *src; { if(this->internal_empty()) break; src = &this->internal_pop(); } src->register_successor( *my_owner); } } #if TBB_PREVIEW_FLOW_GRAPH_FEATURES if (f&rf_extract && my_owner) my_built_predecessors.receiver_extract(*my_owner); __TBB_ASSERT(!(f&rf_extract) || this->internal_empty(), "predecessor cache not empty"); #endif } protected: #if TBB_PREVIEW_FLOW_GRAPH_FEATURES using node_cache< sender, M >::my_built_predecessors; #endif successor_type *my_owner; }; //! An cache of predecessors that supports requests and reservations template< typename T, typename M=spin_mutex > class reservable_predecessor_cache : public predecessor_cache< T, M > { public: typedef M my_mutex_type; typedef T output_type; typedef sender predecessor_type; typedef receiver successor_type; reservable_predecessor_cache( ) : reserved_src(NULL) { } bool try_reserve( output_type &v ) { bool msg = false; do { { typename my_mutex_type::scoped_lock lock(this->my_mutex); if ( reserved_src || this->internal_empty() ) return false; reserved_src = &this->internal_pop(); } // Try to get from this sender msg = reserved_src->try_reserve( v ); if (msg == false) { typename my_mutex_type::scoped_lock lock(this->my_mutex); // Relinquish ownership of the edge reserved_src->register_successor( *this->my_owner ); reserved_src = NULL; } else { // Retain ownership of the edge this->add( *reserved_src ); } } while ( msg == false ); return msg; } bool try_release( ) { reserved_src->try_release( ); reserved_src = NULL; return true; } bool try_consume( ) { reserved_src->try_consume( ); reserved_src = NULL; return true; } void reset( __TBB_PFG_RESET_ARG(reset_flags f)) { reserved_src = NULL; predecessor_cache::reset(__TBB_PFG_RESET_ARG(f)); } private: predecessor_type *reserved_src; }; //! An abstract cache of successors template class successor_cache : tbb::internal::no_copy { protected: typedef M my_mutex_type; my_mutex_type my_mutex; typedef receiver *pointer_type; typedef std::list< pointer_type > my_successors_type; #if TBB_PREVIEW_FLOW_GRAPH_FEATURES edge_container > my_built_successors; #endif my_successors_type my_successors; sender *my_owner; public: #if TBB_PREVIEW_FLOW_GRAPH_FEATURES typedef std::vector successor_vector_type; void internal_add_built_successor( receiver &r) { typename my_mutex_type::scoped_lock l(my_mutex, true); my_built_successors.add_edge( r ); } void internal_delete_built_successor( receiver &r) { typename my_mutex_type::scoped_lock l(my_mutex, true); my_built_successors.delete_edge(r); } void copy_successors( successor_vector_type &v) { typename my_mutex_type::scoped_lock l(my_mutex, false); my_built_successors.copy_edges(v); } size_t successor_count() { typename my_mutex_type::scoped_lock l(my_mutex,false); return my_built_successors.edge_count(); } void reset( __TBB_PFG_RESET_ARG(reset_flags f)) { if (f&rf_extract && my_owner) my_built_successors.sender_extract(*my_owner); } #endif /* TBB_PREVIEW_FLOW_GRAPH_FEATURES */ successor_cache( ) : my_owner(NULL) {} void set_owner( sender *owner ) { my_owner = owner; } virtual ~successor_cache() {} void register_successor( receiver &r ) { typename my_mutex_type::scoped_lock l(my_mutex, true); my_successors.push_back( &r ); } void remove_successor( receiver &r ) { typename my_mutex_type::scoped_lock l(my_mutex, true); for ( typename my_successors_type::iterator i = my_successors.begin(); i != my_successors.end(); ++i ) { if ( *i == & r ) { my_successors.erase(i); break; } } } bool empty() { typename my_mutex_type::scoped_lock l(my_mutex, false); return my_successors.empty(); } void clear() { my_successors.clear(); #if TBB_PREVIEW_FLOW_GRAPH_FEATURES my_built_successors.clear(); #endif } virtual task * try_put_task( const T &t ) = 0; }; //! An abstract cache of successors, specialized to continue_msg template<> class successor_cache< continue_msg > : tbb::internal::no_copy { protected: typedef spin_rw_mutex my_mutex_type; my_mutex_type my_mutex; typedef receiver *pointer_type; typedef std::list< pointer_type > my_successors_type; my_successors_type my_successors; #if TBB_PREVIEW_FLOW_GRAPH_FEATURES edge_container > my_built_successors; #endif sender *my_owner; public: #if TBB_PREVIEW_FLOW_GRAPH_FEATURES typedef std::vector successor_vector_type; void internal_add_built_successor( receiver &r) { my_mutex_type::scoped_lock l(my_mutex, true); my_built_successors.add_edge( r ); } void internal_delete_built_successor( receiver &r) { my_mutex_type::scoped_lock l(my_mutex, true); my_built_successors.delete_edge(r); } void copy_successors( successor_vector_type &v) { my_mutex_type::scoped_lock l(my_mutex, false); my_built_successors.copy_edges(v); } size_t successor_count() { my_mutex_type::scoped_lock l(my_mutex,false); return my_built_successors.edge_count(); } void reset( __TBB_PFG_RESET_ARG(reset_flags f)) { if (f&rf_extract && my_owner) my_built_successors.sender_extract(*my_owner); } #endif /* TBB_PREVIEW_FLOW_GRAPH_FEATURES */ successor_cache( ) : my_owner(NULL) {} void set_owner( sender *owner ) { my_owner = owner; } virtual ~successor_cache() {} void register_successor( receiver &r ) { my_mutex_type::scoped_lock l(my_mutex, true); my_successors.push_back( &r ); if ( my_owner && r.is_continue_receiver() ) { r.register_predecessor( *my_owner ); } } void remove_successor( receiver &r ) { my_mutex_type::scoped_lock l(my_mutex, true); for ( my_successors_type::iterator i = my_successors.begin(); i != my_successors.end(); ++i ) { if ( *i == & r ) { // TODO: Check if we need to test for continue_receiver before // removing from r. if ( my_owner ) r.remove_predecessor( *my_owner ); my_successors.erase(i); break; } } } bool empty() { my_mutex_type::scoped_lock l(my_mutex, false); return my_successors.empty(); } void clear() { my_successors.clear(); #if TBB_PREVIEW_FLOW_GRAPH_FEATURES my_built_successors.clear(); #endif } virtual task * try_put_task( const continue_msg &t ) = 0; }; //! A cache of successors that are broadcast to template class broadcast_cache : public successor_cache { typedef M my_mutex_type; typedef std::list< receiver * > my_successors_type; public: broadcast_cache( ) {} // as above, but call try_put_task instead, and return the last task we received (if any) /*override*/ task * try_put_task( const T &t ) { task * last_task = NULL; bool upgraded = true; typename my_mutex_type::scoped_lock l(this->my_mutex, upgraded); typename my_successors_type::iterator i = this->my_successors.begin(); while ( i != this->my_successors.end() ) { task *new_task = (*i)->try_put_task(t); last_task = combine_tasks(last_task, new_task); // enqueue if necessary if(new_task) { ++i; } else { // failed if ( (*i)->register_predecessor(*this->my_owner) ) { if (!upgraded) { l.upgrade_to_writer(); upgraded = true; } i = this->my_successors.erase(i); } else { ++i; } } } return last_task; } }; //! A cache of successors that are put in a round-robin fashion template class round_robin_cache : public successor_cache { typedef size_t size_type; typedef M my_mutex_type; typedef std::list< receiver * > my_successors_type; public: round_robin_cache( ) {} size_type size() { typename my_mutex_type::scoped_lock l(this->my_mutex, false); return this->my_successors.size(); } /*override*/task *try_put_task( const T &t ) { bool upgraded = true; typename my_mutex_type::scoped_lock l(this->my_mutex, upgraded); typename my_successors_type::iterator i = this->my_successors.begin(); while ( i != this->my_successors.end() ) { task *new_task = (*i)->try_put_task(t); if ( new_task ) { return new_task; } else { if ( (*i)->register_predecessor(*this->my_owner) ) { if (!upgraded) { l.upgrade_to_writer(); upgraded = true; } i = this->my_successors.erase(i); } else { ++i; } } } return NULL; } }; template class decrementer : public continue_receiver, tbb::internal::no_copy { T *my_node; task *execute() { return my_node->decrement_counter(); } public: typedef continue_msg input_type; typedef continue_msg output_type; decrementer( int number_of_predecessors = 0 ) : continue_receiver( number_of_predecessors ) { } void set_owner( T *node ) { my_node = node; } }; } #endif // __TBB__flow_graph_impl_H ================================================ FILE: benchmarks/tbb/internal/_flow_graph_indexer_impl.h ================================================ /* Copyright 2005-2014 Intel Corporation. All Rights Reserved. This file is part of Threading Building Blocks. Threading Building Blocks is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. Threading Building Blocks is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Threading Building Blocks; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA As a special exception, you may use this file as part of a free software library without restriction. Specifically, if other files instantiate templates or use macros or inline functions from this file, or you compile this file and link it with other files to produce an executable, this file does not by itself cause the resulting executable to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the executable file might be covered by the GNU General Public License. */ #ifndef __TBB__flow_graph_indexer_impl_H #define __TBB__flow_graph_indexer_impl_H #ifndef __TBB_flow_graph_H #error Do not #include this internal file directly; use public TBB headers instead. #endif #include "tbb/internal/_flow_graph_types_impl.h" namespace internal { // Output of the indexer_node is a tbb::flow::tagged_msg, and will be of // the form tagged_msg // where the value of tag will indicate which result was put to the // successor. template task* do_try_put(const T &v, void *p) { typename IndexerNodeBaseType::output_type o(K, v); return reinterpret_cast(p)->try_put_task(&o); } template struct indexer_helper { template static inline void set_indexer_node_pointer(PortTuple &my_input, IndexerNodeBaseType *p) { typedef typename tuple_element::type T; task *(*indexer_node_put_task)(const T&, void *) = do_try_put; tbb::flow::get(my_input).set_up(p, indexer_node_put_task); indexer_helper::template set_indexer_node_pointer(my_input, p); } #if TBB_PREVIEW_FLOW_GRAPH_FEATURES template static inline void reset_inputs(InputTuple &my_input, reset_flags f) { join_helper::reset_inputs(my_input, f); tbb::flow::get(my_input).reset_receiver(f); } #endif }; template struct indexer_helper { template static inline void set_indexer_node_pointer(PortTuple &my_input, IndexerNodeBaseType *p) { typedef typename tuple_element<0, TupleTypes>::type T; task *(*indexer_node_put_task)(const T&, void *) = do_try_put; tbb::flow::get<0>(my_input).set_up(p, indexer_node_put_task); } #if TBB_PREVIEW_FLOW_GRAPH_FEATURES template static inline void reset_inputs(InputTuple &my_input, reset_flags f) { tbb::flow::get<0>(my_input).reset_receiver(f); } #endif }; template class indexer_input_port : public receiver { private: void* my_indexer_ptr; typedef task* (* forward_function_ptr)(T const &, void* ); forward_function_ptr my_try_put_task; #if TBB_PREVIEW_FLOW_GRAPH_FEATURES spin_mutex my_pred_mutex; edge_container > my_built_predecessors; #endif /* TBB_PREVIEW_FLOW_GRAPH_FEATURES */ public: #if TBB_PREVIEW_FLOW_GRAPH_FEATURES indexer_input_port() : my_pred_mutex() {} indexer_input_port( const indexer_input_port & /*other*/ ) : receiver(), my_pred_mutex() { } #endif /* TBB_PREVIEW_FLOW_GRAPH_FEATURES */ void set_up(void *p, forward_function_ptr f) { my_indexer_ptr = p; my_try_put_task = f; } #if TBB_PREVIEW_FLOW_GRAPH_FEATURES typedef std::vector *> predecessor_vector_type; /*override*/size_t predecessor_count() { spin_mutex::scoped_lock l(my_pred_mutex); return my_built_predecessors.edge_count(); } /*override*/void internal_add_built_predecessor(sender &p) { spin_mutex::scoped_lock l(my_pred_mutex); my_built_predecessors.add_edge(p); } /*override*/void internal_delete_built_predecessor(sender &p) { spin_mutex::scoped_lock l(my_pred_mutex); my_built_predecessors.delete_edge(p); } /*override*/void copy_predecessors( predecessor_vector_type &v) { spin_mutex::scoped_lock l(my_pred_mutex); return my_built_predecessors.copy_edges(v); } #endif /* TBB_PREVIEW_FLOW_GRAPH_FEATURES */ protected: template< typename R, typename B > friend class run_and_put_task; template friend class internal::broadcast_cache; template friend class internal::round_robin_cache; task *try_put_task(const T &v) { return my_try_put_task(v, my_indexer_ptr); } #if TBB_PREVIEW_FLOW_GRAPH_FEATURES public: /*override*/void reset_receiver(__TBB_PFG_RESET_ARG(reset_flags f)) { if(f&rf_extract) my_built_predecessors.receiver_extract(*this); } #else /*override*/void reset_receiver(__TBB_PFG_RESET_ARG(reset_flags /*f*/)) { } #endif }; template class indexer_node_FE { public: static const int N = tbb::flow::tuple_size::value; typedef OutputType output_type; typedef InputTuple input_type; input_type &input_ports() { return my_inputs; } protected: input_type my_inputs; }; //! indexer_node_base template class indexer_node_base : public graph_node, public indexer_node_FE, public sender { protected: using graph_node::my_graph; public: static const size_t N = tbb::flow::tuple_size::value; typedef OutputType output_type; typedef StructTypes tuple_types; typedef receiver successor_type; typedef indexer_node_FE input_ports_type; #if TBB_PREVIEW_FLOW_GRAPH_FEATURES typedef std::vector successor_vector_type; #endif private: // ----------- Aggregator ------------ enum op_type { reg_succ, rem_succ, try__put_task #if TBB_PREVIEW_FLOW_GRAPH_FEATURES , add_blt_succ, del_blt_succ, blt_succ_cnt, blt_succ_cpy #endif }; enum op_stat {WAIT=0, SUCCEEDED, FAILED}; typedef indexer_node_base my_class; class indexer_node_base_operation : public aggregated_operation { public: char type; union { output_type const *my_arg; successor_type *my_succ; task *bypass_t; #if TBB_PREVIEW_FLOW_GRAPH_FEATURES size_t cnt_val; successor_vector_type *succv; #endif }; indexer_node_base_operation(const output_type* e, op_type t) : type(char(t)), my_arg(e) {} indexer_node_base_operation(const successor_type &s, op_type t) : type(char(t)), my_succ(const_cast(&s)) {} indexer_node_base_operation(op_type t) : type(char(t)) {} }; typedef internal::aggregating_functor my_handler; friend class internal::aggregating_functor; aggregator my_aggregator; void handle_operations(indexer_node_base_operation* op_list) { indexer_node_base_operation *current; while(op_list) { current = op_list; op_list = op_list->next; switch(current->type) { case reg_succ: my_successors.register_successor(*(current->my_succ)); __TBB_store_with_release(current->status, SUCCEEDED); break; case rem_succ: my_successors.remove_successor(*(current->my_succ)); __TBB_store_with_release(current->status, SUCCEEDED); break; case try__put_task: { current->bypass_t = my_successors.try_put_task(*(current->my_arg)); __TBB_store_with_release(current->status, SUCCEEDED); // return of try_put_task actual return value } break; #if TBB_PREVIEW_FLOW_GRAPH_FEATURES case add_blt_succ: my_successors.internal_add_built_successor(*(current->my_succ)); __TBB_store_with_release(current->status, SUCCEEDED); break; case del_blt_succ: my_successors.internal_delete_built_successor(*(current->my_succ)); __TBB_store_with_release(current->status, SUCCEEDED); break; case blt_succ_cnt: current->cnt_val = my_successors.successor_count(); __TBB_store_with_release(current->status, SUCCEEDED); break; case blt_succ_cpy: my_successors.copy_successors(*(current->succv)); __TBB_store_with_release(current->status, SUCCEEDED); break; #endif /* TBB_PREVIEW_FLOW_GRAPH_FEATURES */ } } } // ---------- end aggregator ----------- public: indexer_node_base(graph& g) : graph_node(g), input_ports_type() { indexer_helper::set_indexer_node_pointer(this->my_inputs, this); my_successors.set_owner(this); my_aggregator.initialize_handler(my_handler(this)); } indexer_node_base(const indexer_node_base& other) : graph_node(other.my_graph), input_ports_type(), sender() { indexer_helper::set_indexer_node_pointer(this->my_inputs, this); my_successors.set_owner(this); my_aggregator.initialize_handler(my_handler(this)); } bool register_successor(successor_type &r) { indexer_node_base_operation op_data(r, reg_succ); my_aggregator.execute(&op_data); return op_data.status == SUCCEEDED; } bool remove_successor( successor_type &r) { indexer_node_base_operation op_data(r, rem_succ); my_aggregator.execute(&op_data); return op_data.status == SUCCEEDED; } task * try_put_task(output_type const *v) { indexer_node_base_operation op_data(v, try__put_task); my_aggregator.execute(&op_data); return op_data.bypass_t; } #if TBB_PREVIEW_FLOW_GRAPH_FEATURES void internal_add_built_successor( successor_type &r) { indexer_node_base_operation op_data(r, add_blt_succ); my_aggregator.execute(&op_data); } void internal_delete_built_successor( successor_type &r) { indexer_node_base_operation op_data(r, del_blt_succ); my_aggregator.execute(&op_data); } size_t successor_count() { indexer_node_base_operation op_data(blt_succ_cnt); my_aggregator.execute(&op_data); return op_data.cnt_val; } void copy_successors( successor_vector_type &v) { indexer_node_base_operation op_data(blt_succ_cpy); op_data.succv = &v; my_aggregator.execute(&op_data); } #endif /* TBB_PREVIEW_FLOW_GRAPH_FEATURES */ protected: /*override*/void reset(__TBB_PFG_RESET_ARG(reset_flags f)) { #if TBB_PREVIEW_FLOW_GRAPH_FEATURES my_successors.reset(f); indexer_helper::reset_inputs(this->my_inputs, f); #endif } private: broadcast_cache my_successors; }; //indexer_node_base template struct input_types; template struct input_types<1, InputTuple> { typedef typename tuple_element<0, InputTuple>::type first_type; typedef typename internal::tagged_msg type; }; template struct input_types<2, InputTuple> { typedef typename tuple_element<0, InputTuple>::type first_type; typedef typename tuple_element<1, InputTuple>::type second_type; typedef typename internal::tagged_msg type; }; template struct input_types<3, InputTuple> { typedef typename tuple_element<0, InputTuple>::type first_type; typedef typename tuple_element<1, InputTuple>::type second_type; typedef typename tuple_element<2, InputTuple>::type third_type; typedef typename internal::tagged_msg type; }; template struct input_types<4, InputTuple> { typedef typename tuple_element<0, InputTuple>::type first_type; typedef typename tuple_element<1, InputTuple>::type second_type; typedef typename tuple_element<2, InputTuple>::type third_type; typedef typename tuple_element<3, InputTuple>::type fourth_type; typedef typename internal::tagged_msg type; }; template struct input_types<5, InputTuple> { typedef typename tuple_element<0, InputTuple>::type first_type; typedef typename tuple_element<1, InputTuple>::type second_type; typedef typename tuple_element<2, InputTuple>::type third_type; typedef typename tuple_element<3, InputTuple>::type fourth_type; typedef typename tuple_element<4, InputTuple>::type fifth_type; typedef typename internal::tagged_msg type; }; template struct input_types<6, InputTuple> { typedef typename tuple_element<0, InputTuple>::type first_type; typedef typename tuple_element<1, InputTuple>::type second_type; typedef typename tuple_element<2, InputTuple>::type third_type; typedef typename tuple_element<3, InputTuple>::type fourth_type; typedef typename tuple_element<4, InputTuple>::type fifth_type; typedef typename tuple_element<5, InputTuple>::type sixth_type; typedef typename internal::tagged_msg type; }; template struct input_types<7, InputTuple> { typedef typename tuple_element<0, InputTuple>::type first_type; typedef typename tuple_element<1, InputTuple>::type second_type; typedef typename tuple_element<2, InputTuple>::type third_type; typedef typename tuple_element<3, InputTuple>::type fourth_type; typedef typename tuple_element<4, InputTuple>::type fifth_type; typedef typename tuple_element<5, InputTuple>::type sixth_type; typedef typename tuple_element<6, InputTuple>::type seventh_type; typedef typename internal::tagged_msg type; }; template struct input_types<8, InputTuple> { typedef typename tuple_element<0, InputTuple>::type first_type; typedef typename tuple_element<1, InputTuple>::type second_type; typedef typename tuple_element<2, InputTuple>::type third_type; typedef typename tuple_element<3, InputTuple>::type fourth_type; typedef typename tuple_element<4, InputTuple>::type fifth_type; typedef typename tuple_element<5, InputTuple>::type sixth_type; typedef typename tuple_element<6, InputTuple>::type seventh_type; typedef typename tuple_element<7, InputTuple>::type eighth_type; typedef typename internal::tagged_msg type; }; template struct input_types<9, InputTuple> { typedef typename tuple_element<0, InputTuple>::type first_type; typedef typename tuple_element<1, InputTuple>::type second_type; typedef typename tuple_element<2, InputTuple>::type third_type; typedef typename tuple_element<3, InputTuple>::type fourth_type; typedef typename tuple_element<4, InputTuple>::type fifth_type; typedef typename tuple_element<5, InputTuple>::type sixth_type; typedef typename tuple_element<6, InputTuple>::type seventh_type; typedef typename tuple_element<7, InputTuple>::type eighth_type; typedef typename tuple_element<8, InputTuple>::type nineth_type; typedef typename internal::tagged_msg type; }; template struct input_types<10, InputTuple> { typedef typename tuple_element<0, InputTuple>::type first_type; typedef typename tuple_element<1, InputTuple>::type second_type; typedef typename tuple_element<2, InputTuple>::type third_type; typedef typename tuple_element<3, InputTuple>::type fourth_type; typedef typename tuple_element<4, InputTuple>::type fifth_type; typedef typename tuple_element<5, InputTuple>::type sixth_type; typedef typename tuple_element<6, InputTuple>::type seventh_type; typedef typename tuple_element<7, InputTuple>::type eighth_type; typedef typename tuple_element<8, InputTuple>::type nineth_type; typedef typename tuple_element<9, InputTuple>::type tenth_type; typedef typename internal::tagged_msg type; }; // type generators template struct indexer_types : public input_types::value, OutputTuple> { static const int N = tbb::flow::tuple_size::value; typedef typename input_types::type output_type; typedef typename wrap_tuple_elements::type input_ports_type; typedef internal::indexer_node_FE indexer_FE_type; typedef internal::indexer_node_base indexer_base_type; }; template class unfolded_indexer_node : public indexer_types::indexer_base_type { public: typedef typename indexer_types::input_ports_type input_ports_type; typedef OutputTuple tuple_types; typedef typename indexer_types::output_type output_type; private: typedef typename indexer_types::indexer_base_type base_type; public: unfolded_indexer_node(graph& g) : base_type(g) {} unfolded_indexer_node(const unfolded_indexer_node &other) : base_type(other) {} }; } /* namespace internal */ #endif /* __TBB__flow_graph_indexer_impl_H */ ================================================ FILE: benchmarks/tbb/internal/_flow_graph_item_buffer_impl.h ================================================ /* Copyright 2005-2014 Intel Corporation. All Rights Reserved. This file is part of Threading Building Blocks. Threading Building Blocks is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. Threading Building Blocks is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Threading Building Blocks; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA As a special exception, you may use this file as part of a free software library without restriction. Specifically, if other files instantiate templates or use macros or inline functions from this file, or you compile this file and link it with other files to produce an executable, this file does not by itself cause the resulting executable to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the executable file might be covered by the GNU General Public License. */ #ifndef __TBB__flow_graph_item_buffer_impl_H #define __TBB__flow_graph_item_buffer_impl_H #ifndef __TBB_flow_graph_H #error Do not #include this internal file directly; use public TBB headers instead. #endif #include "tbb/internal/_flow_graph_types_impl.h" // for aligned_pair // in namespace tbb::flow::interface7 (included in _flow_graph_node_impl.h) //! Expandable buffer of items. The possible operations are push, pop, //* tests for empty and so forth. No mutual exclusion is built in. //* objects are constructed into and explicitly-destroyed. get_my_item gives // a read-only reference to the item in the buffer. set_my_item may be called // with either an empty or occupied slot. using internal::aligned_pair; using internal::alignment_of; namespace internal { template > class item_buffer { public: typedef T item_type; enum buffer_item_state { no_item=0, has_item=1, reserved_item=2 }; protected: typedef size_t size_type; typedef typename aligned_pair::type buffer_item_type; typedef typename A::template rebind::other allocator_type; buffer_item_type *my_array; size_type my_array_size; static const size_type initial_buffer_size = 4; size_type my_head; size_type my_tail; bool buffer_empty() { return my_head == my_tail; } buffer_item_type &item(size_type i) { __TBB_ASSERT(!(size_type(&(my_array[i&(my_array_size-1)].second))%alignment_of::value),NULL); __TBB_ASSERT(!(size_type(&(my_array[i&(my_array_size-1)].first))%alignment_of::value), NULL); return my_array[i & (my_array_size - 1) ]; } bool my_item_valid(size_type i) { return item(i).second != no_item; } bool my_item_reserved(size_type i) { return item(i).second == reserved_item; } // object management in buffer const item_type &get_my_item(size_t i) { __TBB_ASSERT(my_item_valid(i),"attempt to get invalid item"); item_type *itm = (tbb::internal::punned_cast(&(item(i).first))); return *(const item_type *)itm; } // may be called with an empty slot or a slot that has already been constructed into. void set_my_item(size_t i, const item_type &o) { if(item(i).second != no_item) { destroy_item(i); } new(&(item(i).first)) item_type(o); item(i).second = has_item; } // destructively-fetch an object from the buffer void fetch_item(size_t i, item_type &o) { __TBB_ASSERT(my_item_valid(i), "Trying to fetch an empty slot"); o = get_my_item(i); // could have std::move assign semantics destroy_item(i); } // move an existing item from one slot to another. The moved-to slot must be unoccupied, // the moved-from slot must exist and not be reserved. The after, from will be empty, // to will be occupied but not reserved void move_item(size_t to, size_t from) { __TBB_ASSERT(!my_item_valid(to), "Trying to move to a non-empty slot"); __TBB_ASSERT(my_item_valid(from), "Trying to move from an empty slot"); set_my_item(to, get_my_item(from)); // could have std::move semantics destroy_item(from); } // put an item in an empty slot. Return true if successful, else false bool place_item(size_t here, const item_type &me) { #if !TBB_DEPRECATED_SEQUENCER_DUPLICATES if(my_item_valid(here)) return false; #endif set_my_item(here, me); return true; } // could be implemented with std::move semantics void swap_items(size_t i, size_t j) { __TBB_ASSERT(my_item_valid(i) && my_item_valid(j), "attempt to swap invalid item(s)"); item_type temp = get_my_item(i); set_my_item(i, get_my_item(j)); set_my_item(j, temp); } void destroy_item(size_type i) { __TBB_ASSERT(my_item_valid(i), "destruction of invalid item"); (tbb::internal::punned_cast(&(item(i).first)))->~item_type(); item(i).second = no_item; } // returns a copy of the front void copy_front(item_type &v) { __TBB_ASSERT(my_item_valid(my_head), "attempt to fetch head non-item"); v = get_my_item(my_head); } // returns a copy of the back void copy_back(item_type &v) { __TBB_ASSERT(my_item_valid(my_tail-1), "attempt to fetch head non-item"); v = get_my_item(my_tail-1); } // following methods are for reservation of the front of a bufffer. void reserve_item(size_type i) { __TBB_ASSERT(my_item_valid(i) && !my_item_reserved(i), "item cannot be reserved"); item(i).second = reserved_item; } void release_item(size_type i) { __TBB_ASSERT(my_item_reserved(i), "item is not reserved"); item(i).second = has_item; } void destroy_front() { destroy_item(my_head); ++my_head; } void destroy_back() { destroy_item(my_tail-1); --my_tail; } // we have to be able to test against a new tail value without changing my_tail // grow_array doesn't work if we change my_tail when the old array is too small size_type size(size_t new_tail = 0) { return (new_tail ? new_tail : my_tail) - my_head; } size_type capacity() { return my_array_size; } // sequencer_node does not use this method, so we don't // need a version that passes in the new_tail value. bool buffer_full() { return size() >= capacity(); } //! Grows the internal array. void grow_my_array( size_t minimum_size ) { // test that we haven't made the structure inconsistent. __TBB_ASSERT(capacity() >= my_tail - my_head, "total items exceed capacity"); size_type new_size = my_array_size ? 2*my_array_size : initial_buffer_size; while( new_size > class reservable_item_buffer : public item_buffer { protected: using item_buffer::my_item_valid; using item_buffer::my_head; public: reservable_item_buffer() : item_buffer(), my_reserved(false) {} void reset() {my_reserved = false; item_buffer::reset(); } protected: bool reserve_front(T &v) { if(my_reserved || !my_item_valid(my_head)) return false; my_reserved = true; // reserving the head this->copy_front(v); this->reserve_item(this->my_head); return true; } void consume_front() { __TBB_ASSERT(my_reserved, "Attempt to consume a non-reserved item"); this->destroy_front(); my_reserved = false; } void release_front() { __TBB_ASSERT(my_reserved, "Attempt to release a non-reserved item"); this->release_item(this->my_head); my_reserved = false; } bool my_reserved; }; } // namespace internal #endif // __TBB__flow_graph_item_buffer_impl_H ================================================ FILE: benchmarks/tbb/internal/_flow_graph_join_impl.h ================================================ /* Copyright 2005-2014 Intel Corporation. All Rights Reserved. This file is part of Threading Building Blocks. Threading Building Blocks is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. Threading Building Blocks is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Threading Building Blocks; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA As a special exception, you may use this file as part of a free software library without restriction. Specifically, if other files instantiate templates or use macros or inline functions from this file, or you compile this file and link it with other files to produce an executable, this file does not by itself cause the resulting executable to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the executable file might be covered by the GNU General Public License. */ #ifndef __TBB__flow_graph_join_impl_H #define __TBB__flow_graph_join_impl_H #ifndef __TBB_flow_graph_H #error Do not #include this internal file directly; use public TBB headers instead. #endif #include "_flow_graph_types_impl.h" namespace internal { typedef size_t tag_value; static const tag_value NO_TAG = tag_value(-1); struct forwarding_base { forwarding_base(graph &g) : my_graph_ptr(&g), current_tag(NO_TAG) {} virtual ~forwarding_base() {} // decrement_port_count may create a forwarding task. If we cannot handle the task // ourselves, ask decrement_port_count to deal with it. virtual task * decrement_port_count(bool handle_task) = 0; virtual void increment_port_count() = 0; virtual task * increment_tag_count(tag_value /*t*/, bool /*handle_task*/) {return NULL;} // moved here so input ports can queue tasks graph* my_graph_ptr; tag_value current_tag; // so ports can refer to FE's desired items }; template< int N > struct join_helper { template< typename TupleType, typename PortType > static inline void set_join_node_pointer(TupleType &my_input, PortType *port) { tbb::flow::get( my_input ).set_join_node_pointer(port); join_helper::set_join_node_pointer( my_input, port ); } template< typename TupleType > static inline void consume_reservations( TupleType &my_input ) { tbb::flow::get( my_input ).consume(); join_helper::consume_reservations( my_input ); } template< typename TupleType > static inline void release_my_reservation( TupleType &my_input ) { tbb::flow::get( my_input ).release(); } template static inline void release_reservations( TupleType &my_input) { join_helper::release_reservations(my_input); release_my_reservation(my_input); } template< typename InputTuple, typename OutputTuple > static inline bool reserve( InputTuple &my_input, OutputTuple &out) { if ( !tbb::flow::get( my_input ).reserve( tbb::flow::get( out ) ) ) return false; if ( !join_helper::reserve( my_input, out ) ) { release_my_reservation( my_input ); return false; } return true; } template static inline bool get_my_item( InputTuple &my_input, OutputTuple &out) { bool res = tbb::flow::get(my_input).get_item(tbb::flow::get(out) ); // may fail return join_helper::get_my_item(my_input, out) && res; // do get on other inputs before returning } template static inline bool get_items(InputTuple &my_input, OutputTuple &out) { return get_my_item(my_input, out); } template static inline void reset_my_port(InputTuple &my_input) { join_helper::reset_my_port(my_input); tbb::flow::get(my_input).reset_port(); } template static inline void reset_ports(InputTuple& my_input) { reset_my_port(my_input); } template static inline void set_tag_func(InputTuple &my_input, TagFuncTuple &my_tag_funcs) { tbb::flow::get(my_input).set_my_original_tag_func(tbb::flow::get(my_tag_funcs)); tbb::flow::get(my_input).set_my_tag_func(tbb::flow::get(my_input).my_original_func()->clone()); tbb::flow::get(my_tag_funcs) = NULL; join_helper::set_tag_func(my_input, my_tag_funcs); } template< typename TagFuncTuple1, typename TagFuncTuple2> static inline void copy_tag_functors(TagFuncTuple1 &my_inputs, TagFuncTuple2 &other_inputs) { if(tbb::flow::get(other_inputs).my_original_func()) { tbb::flow::get(my_inputs).set_my_tag_func(tbb::flow::get(other_inputs).my_original_func()->clone()); tbb::flow::get(my_inputs).set_my_original_tag_func(tbb::flow::get(other_inputs).my_original_func()->clone()); } join_helper::copy_tag_functors(my_inputs, other_inputs); } template static inline void reset_inputs(InputTuple &my_input __TBB_PFG_RESET_ARG(__TBB_COMMA reset_flags f)) { join_helper::reset_inputs(my_input __TBB_PFG_RESET_ARG(__TBB_COMMA f)); tbb::flow::get(my_input).reset_receiver(__TBB_PFG_RESET_ARG(f)); } }; template< > struct join_helper<1> { template< typename TupleType, typename PortType > static inline void set_join_node_pointer(TupleType &my_input, PortType *port) { tbb::flow::get<0>( my_input ).set_join_node_pointer(port); } template< typename TupleType > static inline void consume_reservations( TupleType &my_input ) { tbb::flow::get<0>( my_input ).consume(); } template< typename TupleType > static inline void release_my_reservation( TupleType &my_input ) { tbb::flow::get<0>( my_input ).release(); } template static inline void release_reservations( TupleType &my_input) { release_my_reservation(my_input); } template< typename InputTuple, typename OutputTuple > static inline bool reserve( InputTuple &my_input, OutputTuple &out) { return tbb::flow::get<0>( my_input ).reserve( tbb::flow::get<0>( out ) ); } template static inline bool get_my_item( InputTuple &my_input, OutputTuple &out) { return tbb::flow::get<0>(my_input).get_item(tbb::flow::get<0>(out)); } template static inline bool get_items(InputTuple &my_input, OutputTuple &out) { return get_my_item(my_input, out); } template static inline void reset_my_port(InputTuple &my_input) { tbb::flow::get<0>(my_input).reset_port(); } template static inline void reset_ports(InputTuple& my_input) { reset_my_port(my_input); } template static inline void set_tag_func(InputTuple &my_input, TagFuncTuple &my_tag_funcs) { tbb::flow::get<0>(my_input).set_my_original_tag_func(tbb::flow::get<0>(my_tag_funcs)); tbb::flow::get<0>(my_input).set_my_tag_func(tbb::flow::get<0>(my_input).my_original_func()->clone()); tbb::flow::get<0>(my_tag_funcs) = NULL; } template< typename TagFuncTuple1, typename TagFuncTuple2> static inline void copy_tag_functors(TagFuncTuple1 &my_inputs, TagFuncTuple2 &other_inputs) { if(tbb::flow::get<0>(other_inputs).my_original_func()) { tbb::flow::get<0>(my_inputs).set_my_tag_func(tbb::flow::get<0>(other_inputs).my_original_func()->clone()); tbb::flow::get<0>(my_inputs).set_my_original_tag_func(tbb::flow::get<0>(other_inputs).my_original_func()->clone()); } } template static inline void reset_inputs(InputTuple &my_input __TBB_PFG_RESET_ARG(__TBB_COMMA reset_flags f)) { tbb::flow::get<0>(my_input).reset_receiver(__TBB_PFG_RESET_ARG(f)); } }; //! The two-phase join port template< typename T > class reserving_port : public receiver { public: typedef T input_type; typedef sender predecessor_type; #if TBB_PREVIEW_FLOW_GRAPH_FEATURES typedef std::vector predecessor_vector_type; #endif private: // ----------- Aggregator ------------ enum op_type { reg_pred, rem_pred, res_item, rel_res, con_res #if TBB_PREVIEW_FLOW_GRAPH_FEATURES , add_blt_pred, del_blt_pred, blt_pred_cnt, blt_pred_cpy #endif }; enum op_stat {WAIT=0, SUCCEEDED, FAILED}; typedef reserving_port my_class; class reserving_port_operation : public aggregated_operation { public: char type; union { T *my_arg; predecessor_type *my_pred; #if TBB_PREVIEW_FLOW_GRAPH_FEATURES size_t cnt_val; predecessor_vector_type *pvec; #endif }; reserving_port_operation(const T& e, op_type t) : type(char(t)), my_arg(const_cast(&e)) {} reserving_port_operation(const predecessor_type &s, op_type t) : type(char(t)), my_pred(const_cast(&s)) {} reserving_port_operation(op_type t) : type(char(t)) {} }; typedef internal::aggregating_functor my_handler; friend class internal::aggregating_functor; aggregator my_aggregator; void handle_operations(reserving_port_operation* op_list) { reserving_port_operation *current; bool no_predecessors; while(op_list) { current = op_list; op_list = op_list->next; switch(current->type) { case reg_pred: no_predecessors = my_predecessors.empty(); my_predecessors.add(*(current->my_pred)); if ( no_predecessors ) { (void) my_join->decrement_port_count(true); // may try to forward } __TBB_store_with_release(current->status, SUCCEEDED); break; case rem_pred: my_predecessors.remove(*(current->my_pred)); if(my_predecessors.empty()) my_join->increment_port_count(); __TBB_store_with_release(current->status, SUCCEEDED); break; case res_item: if ( reserved ) { __TBB_store_with_release(current->status, FAILED); } else if ( my_predecessors.try_reserve( *(current->my_arg) ) ) { reserved = true; __TBB_store_with_release(current->status, SUCCEEDED); } else { if ( my_predecessors.empty() ) { my_join->increment_port_count(); } __TBB_store_with_release(current->status, FAILED); } break; case rel_res: reserved = false; my_predecessors.try_release( ); __TBB_store_with_release(current->status, SUCCEEDED); break; case con_res: reserved = false; my_predecessors.try_consume( ); __TBB_store_with_release(current->status, SUCCEEDED); break; #if TBB_PREVIEW_FLOW_GRAPH_FEATURES case add_blt_pred: my_predecessors.internal_add_built_predecessor(*(current->my_pred)); __TBB_store_with_release(current->status, SUCCEEDED); break; case del_blt_pred: my_predecessors.internal_delete_built_predecessor(*(current->my_pred)); __TBB_store_with_release(current->status, SUCCEEDED); break; case blt_pred_cnt: current->cnt_val = my_predecessors.predecessor_count(); __TBB_store_with_release(current->status, SUCCEEDED); break; case blt_pred_cpy: my_predecessors.copy_predecessors(*(current->pvec)); __TBB_store_with_release(current->status, SUCCEEDED); break; #endif /* TBB_PREVIEW_FLOW_GRAPH_FEATURES */ } } } protected: template< typename R, typename B > friend class run_and_put_task; template friend class internal::broadcast_cache; template friend class internal::round_robin_cache; task *try_put_task( const T & ) { return NULL; } public: //! Constructor reserving_port() : reserved(false) { my_join = NULL; my_predecessors.set_owner( this ); my_aggregator.initialize_handler(my_handler(this)); } // copy constructor reserving_port(const reserving_port& /* other */) : receiver() { reserved = false; my_join = NULL; my_predecessors.set_owner( this ); my_aggregator.initialize_handler(my_handler(this)); } void set_join_node_pointer(forwarding_base *join) { my_join = join; } //! Add a predecessor bool register_predecessor( sender &src ) { reserving_port_operation op_data(src, reg_pred); my_aggregator.execute(&op_data); return op_data.status == SUCCEEDED; } //! Remove a predecessor bool remove_predecessor( sender &src ) { reserving_port_operation op_data(src, rem_pred); my_aggregator.execute(&op_data); return op_data.status == SUCCEEDED; } //! Reserve an item from the port bool reserve( T &v ) { reserving_port_operation op_data(v, res_item); my_aggregator.execute(&op_data); return op_data.status == SUCCEEDED; } //! Release the port void release( ) { reserving_port_operation op_data(rel_res); my_aggregator.execute(&op_data); } //! Complete use of the port void consume( ) { reserving_port_operation op_data(con_res); my_aggregator.execute(&op_data); } #if TBB_PREVIEW_FLOW_GRAPH_FEATURES /*override*/void internal_add_built_predecessor(predecessor_type &src) { reserving_port_operation op_data(src, add_blt_pred); my_aggregator.execute(&op_data); } /*override*/void internal_delete_built_predecessor(predecessor_type &src) { reserving_port_operation op_data(src, del_blt_pred); my_aggregator.execute(&op_data); } /*override*/size_t predecessor_count() { reserving_port_operation op_data(blt_pred_cnt); my_aggregator.execute(&op_data); return op_data.cnt_val; } /*override*/void copy_predecessors(predecessor_vector_type &v) { reserving_port_operation op_data(blt_pred_cpy); op_data.pvec = &v; my_aggregator.execute(&op_data); } #endif /* TBB_PREVIEW_FLOW_GRAPH_FEATURES */ /*override*/void reset_receiver( __TBB_PFG_RESET_ARG(reset_flags f)) { my_predecessors.reset(__TBB_PFG_RESET_ARG(f)); reserved = false; #if TBB_PREVIEW_FLOW_GRAPH_FEATURES __TBB_ASSERT(!(f&rf_extract) || my_predecessors.empty(), "port edges not removed"); #endif } private: forwarding_base *my_join; reservable_predecessor_cache< T, null_mutex > my_predecessors; bool reserved; }; //! queueing join_port template class queueing_port : public receiver, public item_buffer { public: typedef T input_type; typedef sender predecessor_type; typedef queueing_port my_node_type; #if TBB_PREVIEW_FLOW_GRAPH_FEATURES typedef std::vector predecessor_vector_type; #endif // ----------- Aggregator ------------ private: enum op_type { get__item, res_port, try__put_task #if TBB_PREVIEW_FLOW_GRAPH_FEATURES , add_blt_pred, del_blt_pred, blt_pred_cnt, blt_pred_cpy #endif }; enum op_stat {WAIT=0, SUCCEEDED, FAILED}; typedef queueing_port my_class; class queueing_port_operation : public aggregated_operation { public: char type; T my_val; T *my_arg; #if TBB_PREVIEW_FLOW_GRAPH_FEATURES sender *pred; size_t cnt_val; predecessor_vector_type *pvec; #endif task * bypass_t; // constructor for value parameter queueing_port_operation(const T& e, op_type t) : type(char(t)), my_val(e) , bypass_t(NULL) {} // constructor for pointer parameter queueing_port_operation(const T* p, op_type t) : type(char(t)), my_arg(const_cast(p)) , bypass_t(NULL) {} // constructor with no parameter queueing_port_operation(op_type t) : type(char(t)) , bypass_t(NULL) {} }; typedef internal::aggregating_functor my_handler; friend class internal::aggregating_functor; aggregator my_aggregator; void handle_operations(queueing_port_operation* op_list) { queueing_port_operation *current; bool was_empty; while(op_list) { current = op_list; op_list = op_list->next; switch(current->type) { case try__put_task: { task *rtask = NULL; was_empty = this->buffer_empty(); this->push_back(current->my_val); if (was_empty) rtask = my_join->decrement_port_count(false); else rtask = SUCCESSFULLY_ENQUEUED; current->bypass_t = rtask; __TBB_store_with_release(current->status, SUCCEEDED); } break; case get__item: if(!this->buffer_empty()) { this->copy_front(*(current->my_arg)); __TBB_store_with_release(current->status, SUCCEEDED); } else { __TBB_store_with_release(current->status, FAILED); } break; case res_port: __TBB_ASSERT(this->my_item_valid(this->my_head), "No item to reset"); this->destroy_front(); if(this->my_item_valid(this->my_head)) { (void)my_join->decrement_port_count(true); } __TBB_store_with_release(current->status, SUCCEEDED); break; #if TBB_PREVIEW_FLOW_GRAPH_FEATURES case add_blt_pred: my_built_predecessors.add_edge(*(current->pred)); __TBB_store_with_release(current->status, SUCCEEDED); break; case del_blt_pred: my_built_predecessors.delete_edge(*(current->pred)); __TBB_store_with_release(current->status, SUCCEEDED); break; case blt_pred_cnt: current->cnt_val = my_built_predecessors.edge_count(); __TBB_store_with_release(current->status, SUCCEEDED); break; case blt_pred_cpy: my_built_predecessors.copy_edges(*(current->pvec)); __TBB_store_with_release(current->status, SUCCEEDED); break; #endif /* TBB_PREVIEW_FLOW_GRAPH_FEATURES */ } } } // ------------ End Aggregator --------------- protected: template< typename R, typename B > friend class run_and_put_task; template friend class internal::broadcast_cache; template friend class internal::round_robin_cache; /*override*/task *try_put_task(const T &v) { queueing_port_operation op_data(v, try__put_task); my_aggregator.execute(&op_data); __TBB_ASSERT(op_data.status == SUCCEEDED || !op_data.bypass_t, "inconsistent return from aggregator"); if(!op_data.bypass_t) return SUCCESSFULLY_ENQUEUED; return op_data.bypass_t; } public: //! Constructor queueing_port() : item_buffer() { my_join = NULL; my_aggregator.initialize_handler(my_handler(this)); } //! copy constructor queueing_port(const queueing_port& /* other */) : receiver(), item_buffer() { my_join = NULL; my_aggregator.initialize_handler(my_handler(this)); } //! record parent for tallying available items void set_join_node_pointer(forwarding_base *join) { my_join = join; } bool get_item( T &v ) { queueing_port_operation op_data(&v, get__item); my_aggregator.execute(&op_data); return op_data.status == SUCCEEDED; } // reset_port is called when item is accepted by successor, but // is initiated by join_node. void reset_port() { queueing_port_operation op_data(res_port); my_aggregator.execute(&op_data); return; } #if TBB_PREVIEW_FLOW_GRAPH_FEATURES /*override*/void internal_add_built_predecessor(sender &p) { queueing_port_operation op_data(add_blt_pred); op_data.pred = &p; my_aggregator.execute(&op_data); } /*override*/void internal_delete_built_predecessor(sender &p) { queueing_port_operation op_data(del_blt_pred); op_data.pred = &p; my_aggregator.execute(&op_data); } /*override*/size_t predecessor_count() { queueing_port_operation op_data(blt_pred_cnt); my_aggregator.execute(&op_data); return op_data.cnt_val; } /*override*/void copy_predecessors(predecessor_vector_type &v) { queueing_port_operation op_data(blt_pred_cpy); op_data.pvec = &v; my_aggregator.execute(&op_data); } /*override*/void reset_receiver(__TBB_PFG_RESET_ARG(reset_flags f)) { item_buffer::reset(); if (f & rf_extract) my_built_predecessors.receiver_extract(*this); } #else /*override*/void reset_receiver(__TBB_PFG_RESET_ARG(reset_flags /*f*/)) { item_buffer::reset(); } #endif /* TBB_PREVIEW_FLOW_GRAPH_FEATURES */ private: forwarding_base *my_join; #if TBB_PREVIEW_FLOW_GRAPH_FEATURES edge_container > my_built_predecessors; #endif }; #include "_flow_graph_tagged_buffer_impl.h" template< typename T > class tag_matching_port : public receiver, public tagged_buffer< tag_value, T, NO_TAG > { public: typedef T input_type; typedef sender predecessor_type; typedef tag_matching_port my_node_type; // for forwarding, if needed typedef function_body my_tag_func_type; typedef tagged_buffer my_buffer_type; #if TBB_PREVIEW_FLOW_GRAPH_FEATURES typedef std::vector predecessor_vector_type; #endif private: // ----------- Aggregator ------------ private: enum op_type { try__put, get__item, res_port, add_blt_pred, del_blt_pred, blt_pred_cnt, blt_pred_cpy }; enum op_stat {WAIT=0, SUCCEEDED, FAILED}; typedef tag_matching_port my_class; class tag_matching_port_operation : public aggregated_operation { public: char type; T my_val; T *my_arg; #if TBB_PREVIEW_FLOW_GRAPH_FEATURES predecessor_type *pred; size_t cnt_val; predecessor_vector_type *pvec; #endif tag_value my_tag_value; // constructor for value parameter tag_matching_port_operation(const T& e, op_type t) : type(char(t)), my_val(e) {} // constructor for pointer parameter tag_matching_port_operation(const T* p, op_type t) : type(char(t)), my_arg(const_cast(p)) {} // constructor with no parameter tag_matching_port_operation(op_type t) : type(char(t)) {} }; typedef internal::aggregating_functor my_handler; friend class internal::aggregating_functor; aggregator my_aggregator; void handle_operations(tag_matching_port_operation* op_list) { tag_matching_port_operation *current; while(op_list) { current = op_list; op_list = op_list->next; switch(current->type) { case try__put: { bool was_inserted = this->tagged_insert(current->my_tag_value, current->my_val); // return failure if a duplicate insertion occurs __TBB_store_with_release(current->status, was_inserted ? SUCCEEDED : FAILED); } break; case get__item: // use current_tag from FE for item if(!this->tagged_find(my_join->current_tag, *(current->my_arg))) { __TBB_ASSERT(false, "Failed to find item corresponding to current_tag."); } __TBB_store_with_release(current->status, SUCCEEDED); break; case res_port: // use current_tag from FE for item this->tagged_delete(my_join->current_tag); __TBB_store_with_release(current->status, SUCCEEDED); break; #if TBB_PREVIEW_FLOW_GRAPH_FEATURES case add_blt_pred: my_built_predecessors.add_edge(*(current->pred)); __TBB_store_with_release(current->status, SUCCEEDED); break; case del_blt_pred: my_built_predecessors.delete_edge(*(current->pred)); __TBB_store_with_release(current->status, SUCCEEDED); break; case blt_pred_cnt: current->cnt_val = my_built_predecessors.edge_count(); __TBB_store_with_release(current->status, SUCCEEDED); break; case blt_pred_cpy: my_built_predecessors.copy_edges(*(current->pvec)); __TBB_store_with_release(current->status, SUCCEEDED); break; #endif } } } // ------------ End Aggregator --------------- protected: template< typename R, typename B > friend class run_and_put_task; template friend class internal::broadcast_cache; template friend class internal::round_robin_cache; /*override*/task *try_put_task(const T& v) { tag_matching_port_operation op_data(v, try__put); op_data.my_tag_value = (*my_tag_func)(v); task *rtask = NULL; my_aggregator.execute(&op_data); if(op_data.status == SUCCEEDED) { rtask = my_join->increment_tag_count(op_data.my_tag_value, false); // may spawn // rtask has to reflect the return status of the try_put if(!rtask) rtask = SUCCESSFULLY_ENQUEUED; } return rtask; } public: tag_matching_port() : receiver(), tagged_buffer() { my_join = NULL; my_tag_func = NULL; my_original_tag_func = NULL; my_aggregator.initialize_handler(my_handler(this)); } // copy constructor tag_matching_port(const tag_matching_port& /*other*/) : receiver(), tagged_buffer() { my_join = NULL; // setting the tag methods is done in the copy-constructor for the front-end. my_tag_func = NULL; my_original_tag_func = NULL; my_aggregator.initialize_handler(my_handler(this)); } ~tag_matching_port() { if (my_tag_func) delete my_tag_func; if (my_original_tag_func) delete my_original_tag_func; } void set_join_node_pointer(forwarding_base *join) { my_join = join; } void set_my_original_tag_func(my_tag_func_type *f) { my_original_tag_func = f; } void set_my_tag_func(my_tag_func_type *f) { my_tag_func = f; } bool get_item( T &v ) { tag_matching_port_operation op_data(&v, get__item); my_aggregator.execute(&op_data); return op_data.status == SUCCEEDED; } #if TBB_PREVIEW_FLOW_GRAPH_FEATURES /*override*/void internal_add_built_predecessor(sender &p) { tag_matching_port_operation op_data(add_blt_pred); op_data.pred = &p; my_aggregator.execute(&op_data); } /*override*/void internal_delete_built_predecessor(sender &p) { tag_matching_port_operation op_data(del_blt_pred); op_data.pred = &p; my_aggregator.execute(&op_data); } /*override*/size_t predecessor_count() { tag_matching_port_operation op_data(blt_pred_cnt); my_aggregator.execute(&op_data); return op_data.cnt_val; } /*override*/void copy_predecessors(predecessor_vector_type &v) { tag_matching_port_operation op_data(blt_pred_cpy); op_data.pvec = &v; my_aggregator.execute(&op_data); } #endif // reset_port is called when item is accepted by successor, but // is initiated by join_node. void reset_port() { tag_matching_port_operation op_data(res_port); my_aggregator.execute(&op_data); return; } my_tag_func_type *my_func() { return my_tag_func; } my_tag_func_type *my_original_func() { return my_original_tag_func; } #if TBB_PREVIEW_FLOW_GRAPH_FEATURES /*override*/void reset_receiver(__TBB_PFG_RESET_ARG(reset_flags f)) { my_buffer_type::reset(); if (f & rf_extract) my_built_predecessors.receiver_extract(*this); } #else /*override*/void reset_receiver(__TBB_PFG_RESET_ARG(reset_flags /*f*/)) { my_buffer_type::reset(); } #endif private: // need map of tags to values forwarding_base *my_join; #if TBB_PREVIEW_FLOW_GRAPH_FEATURES edge_container my_built_predecessors; #endif my_tag_func_type *my_tag_func; my_tag_func_type *my_original_tag_func; }; // tag_matching_port using namespace graph_policy_namespace; template class join_node_base; //! join_node_FE : implements input port policy template class join_node_FE; template class join_node_FE : public forwarding_base { public: static const int N = tbb::flow::tuple_size::value; typedef OutputTuple output_type; typedef InputTuple input_type; typedef join_node_base my_node_type; // for forwarding join_node_FE(graph &g) : forwarding_base(g), my_node(NULL) { ports_with_no_inputs = N; join_helper::set_join_node_pointer(my_inputs, this); } join_node_FE(const join_node_FE& other) : forwarding_base(*(other.forwarding_base::my_graph_ptr)), my_node(NULL) { ports_with_no_inputs = N; join_helper::set_join_node_pointer(my_inputs, this); } void set_my_node(my_node_type *new_my_node) { my_node = new_my_node; } void increment_port_count() { ++ports_with_no_inputs; } // if all input_ports have predecessors, spawn forward to try and consume tuples task * decrement_port_count(bool handle_task) { if(ports_with_no_inputs.fetch_and_decrement() == 1) { task* tp = this->my_graph_ptr->root_task(); if(tp) { task *rtask = new ( task::allocate_additional_child_of( *tp ) ) forward_task_bypass(*my_node); if(!handle_task) return rtask; FLOW_SPAWN(*rtask); } } return NULL; } input_type &input_ports() { return my_inputs; } protected: void reset( __TBB_PFG_RESET_ARG( reset_flags f)) { // called outside of parallel contexts ports_with_no_inputs = N; join_helper::reset_inputs(my_inputs __TBB_PFG_RESET_ARG( __TBB_COMMA f)); } // all methods on input ports should be called under mutual exclusion from join_node_base. bool tuple_build_may_succeed() { return !ports_with_no_inputs; } bool try_to_make_tuple(output_type &out) { if(ports_with_no_inputs) return false; return join_helper::reserve(my_inputs, out); } void tuple_accepted() { join_helper::consume_reservations(my_inputs); } void tuple_rejected() { join_helper::release_reservations(my_inputs); } input_type my_inputs; my_node_type *my_node; atomic ports_with_no_inputs; }; template class join_node_FE : public forwarding_base { public: static const int N = tbb::flow::tuple_size::value; typedef OutputTuple output_type; typedef InputTuple input_type; typedef join_node_base my_node_type; // for forwarding join_node_FE(graph &g) : forwarding_base(g), my_node(NULL) { ports_with_no_items = N; join_helper::set_join_node_pointer(my_inputs, this); } join_node_FE(const join_node_FE& other) : forwarding_base(*(other.forwarding_base::my_graph_ptr)), my_node(NULL) { ports_with_no_items = N; join_helper::set_join_node_pointer(my_inputs, this); } // needed for forwarding void set_my_node(my_node_type *new_my_node) { my_node = new_my_node; } void reset_port_count() { ports_with_no_items = N; } // if all input_ports have items, spawn forward to try and consume tuples task * decrement_port_count(bool handle_task) { if(ports_with_no_items.fetch_and_decrement() == 1) { task* tp = this->my_graph_ptr->root_task(); if(tp) { task *rtask = new ( task::allocate_additional_child_of( *tp ) ) forward_task_bypass (*my_node); if(!handle_task) return rtask; FLOW_SPAWN( *rtask); } } return NULL; } void increment_port_count() { __TBB_ASSERT(false, NULL); } // should never be called input_type &input_ports() { return my_inputs; } protected: void reset( __TBB_PFG_RESET_ARG( reset_flags f)) { reset_port_count(); join_helper::reset_inputs(my_inputs __TBB_PFG_RESET_ARG( __TBB_COMMA f) ); } // all methods on input ports should be called under mutual exclusion from join_node_base. bool tuple_build_may_succeed() { return !ports_with_no_items; } bool try_to_make_tuple(output_type &out) { if(ports_with_no_items) return false; return join_helper::get_items(my_inputs, out); } void tuple_accepted() { reset_port_count(); join_helper::reset_ports(my_inputs); } void tuple_rejected() { // nothing to do. } input_type my_inputs; my_node_type *my_node; atomic ports_with_no_items; }; // tag_matching join input port. template class join_node_FE : public forwarding_base, // buffer of tag value counts buffer of output items public tagged_buffer, public item_buffer { public: static const int N = tbb::flow::tuple_size::value; typedef OutputTuple output_type; typedef InputTuple input_type; typedef tagged_buffer my_tag_buffer; typedef item_buffer output_buffer_type; typedef join_node_base my_node_type; // for forwarding // ----------- Aggregator ------------ // the aggregator is only needed to serialize the access to the hash table. // and the output_buffer_type base class private: enum op_type { res_count, inc_count, may_succeed, try_make }; enum op_stat {WAIT=0, SUCCEEDED, FAILED}; typedef join_node_FE my_class; class tag_matching_FE_operation : public aggregated_operation { public: char type; union { tag_value my_val; output_type* my_output; }; task *bypass_t; bool enqueue_task; // constructor for value parameter tag_matching_FE_operation(const tag_value& e , bool q_task , op_type t) : type(char(t)), my_val(e), bypass_t(NULL), enqueue_task(q_task) {} tag_matching_FE_operation(output_type *p, op_type t) : type(char(t)), my_output(p), bypass_t(NULL), enqueue_task(true) {} // constructor with no parameter tag_matching_FE_operation(op_type t) : type(char(t)), bypass_t(NULL), enqueue_task(true) {} }; typedef internal::aggregating_functor my_handler; friend class internal::aggregating_functor; aggregator my_aggregator; // called from aggregator, so serialized // construct as many output objects as possible. // returns a task pointer if the a task would have been enqueued but we asked that // it be returned. Otherwise returns NULL. task * fill_output_buffer(tag_value t, bool should_enqueue, bool handle_task) { output_type l_out; task *rtask = NULL; task* tp = this->my_graph_ptr->root_task(); bool do_fwd = should_enqueue && this->buffer_empty() && tp; this->current_tag = t; this->tagged_delete(this->current_tag); // remove the tag if(join_helper::get_items(my_inputs, l_out)) { // <== call back this->push_back(l_out); if(do_fwd) { // we enqueue if receiving an item from predecessor, not if successor asks for item rtask = new ( task::allocate_additional_child_of( *tp ) ) forward_task_bypass(*my_node); if(handle_task) { FLOW_SPAWN(*rtask); rtask = NULL; } do_fwd = false; } // retire the input values join_helper::reset_ports(my_inputs); // <== call back this->current_tag = NO_TAG; } else { __TBB_ASSERT(false, "should have had something to push"); } return rtask; } void handle_operations(tag_matching_FE_operation* op_list) { tag_matching_FE_operation *current; while(op_list) { current = op_list; op_list = op_list->next; switch(current->type) { case res_count: // called from BE { this->destroy_front(); __TBB_store_with_release(current->status, SUCCEEDED); } break; case inc_count: { // called from input ports size_t *p = 0; tag_value t = current->my_val; bool do_enqueue = current->enqueue_task; if(!(this->tagged_find_ref(t,p))) { this->tagged_insert(t, 0); if(!(this->tagged_find_ref(t,p))) { __TBB_ASSERT(false, "should find tag after inserting it"); } } if(++(*p) == size_t(N)) { task *rtask = fill_output_buffer(t, true, do_enqueue); __TBB_ASSERT(!rtask || !do_enqueue, "task should not be returned"); current->bypass_t = rtask; } } __TBB_store_with_release(current->status, SUCCEEDED); break; case may_succeed: // called from BE __TBB_store_with_release(current->status, this->buffer_empty() ? FAILED : SUCCEEDED); break; case try_make: // called from BE if(this->buffer_empty()) { __TBB_store_with_release(current->status, FAILED); } else { this->copy_front(*(current->my_output)); __TBB_store_with_release(current->status, SUCCEEDED); } break; } } } // ------------ End Aggregator --------------- public: template join_node_FE(graph &g, FunctionTuple tag_funcs) : forwarding_base(g), my_node(NULL) { join_helper::set_join_node_pointer(my_inputs, this); join_helper::set_tag_func(my_inputs, tag_funcs); my_aggregator.initialize_handler(my_handler(this)); } join_node_FE(const join_node_FE& other) : forwarding_base(*(other.forwarding_base::my_graph_ptr)), my_tag_buffer(), output_buffer_type() { my_node = NULL; join_helper::set_join_node_pointer(my_inputs, this); join_helper::copy_tag_functors(my_inputs, const_cast(other.my_inputs)); my_aggregator.initialize_handler(my_handler(this)); } // needed for forwarding void set_my_node(my_node_type *new_my_node) { my_node = new_my_node; } void reset_port_count() { // called from BE tag_matching_FE_operation op_data(res_count); my_aggregator.execute(&op_data); return; } // if all input_ports have items, spawn forward to try and consume tuples // return a task if we are asked and did create one. task *increment_tag_count(tag_value t, bool handle_task) { // called from input_ports tag_matching_FE_operation op_data(t, handle_task, inc_count); my_aggregator.execute(&op_data); return op_data.bypass_t; } /*override*/ task *decrement_port_count(bool /*handle_task*/) { __TBB_ASSERT(false, NULL); return NULL; } void increment_port_count() { __TBB_ASSERT(false, NULL); } // should never be called input_type &input_ports() { return my_inputs; } protected: void reset( __TBB_PFG_RESET_ARG( reset_flags f )) { // called outside of parallel contexts join_helper::reset_inputs(my_inputs __TBB_PFG_RESET_ARG( __TBB_COMMA f)); my_tag_buffer::reset(); // have to reset the tag counts output_buffer_type::reset(); // also the queue of outputs my_node->current_tag = NO_TAG; } // all methods on input ports should be called under mutual exclusion from join_node_base. bool tuple_build_may_succeed() { // called from back-end tag_matching_FE_operation op_data(may_succeed); my_aggregator.execute(&op_data); return op_data.status == SUCCEEDED; } // cannot lock while calling back to input_ports. current_tag will only be set // and reset under the aggregator, so it will remain consistent. bool try_to_make_tuple(output_type &out) { tag_matching_FE_operation op_data(&out,try_make); my_aggregator.execute(&op_data); return op_data.status == SUCCEEDED; } void tuple_accepted() { reset_port_count(); // reset current_tag after ports reset. } void tuple_rejected() { // nothing to do. } input_type my_inputs; // input ports my_node_type *my_node; }; // join_node_FE //! join_node_base template class join_node_base : public graph_node, public join_node_FE, public sender { protected: using graph_node::my_graph; public: typedef OutputTuple output_type; typedef receiver successor_type; typedef join_node_FE input_ports_type; using input_ports_type::tuple_build_may_succeed; using input_ports_type::try_to_make_tuple; using input_ports_type::tuple_accepted; using input_ports_type::tuple_rejected; #if TBB_PREVIEW_FLOW_GRAPH_FEATURES typedef std::vector successor_vector_type; #endif private: // ----------- Aggregator ------------ enum op_type { reg_succ, rem_succ, try__get, do_fwrd, do_fwrd_bypass #if TBB_PREVIEW_FLOW_GRAPH_FEATURES , add_blt_succ, del_blt_succ, blt_succ_cnt, blt_succ_cpy #endif }; enum op_stat {WAIT=0, SUCCEEDED, FAILED}; typedef join_node_base my_class; class join_node_base_operation : public aggregated_operation { public: char type; union { output_type *my_arg; successor_type *my_succ; #if TBB_PREVIEW_FLOW_GRAPH_FEATURES size_t cnt_val; successor_vector_type *svec; #endif }; task *bypass_t; join_node_base_operation(const output_type& e, op_type t) : type(char(t)), my_arg(const_cast(&e)), bypass_t(NULL) {} join_node_base_operation(const successor_type &s, op_type t) : type(char(t)), my_succ(const_cast(&s)), bypass_t(NULL) {} join_node_base_operation(op_type t) : type(char(t)), bypass_t(NULL) {} }; typedef internal::aggregating_functor my_handler; friend class internal::aggregating_functor; bool forwarder_busy; aggregator my_aggregator; void handle_operations(join_node_base_operation* op_list) { join_node_base_operation *current; while(op_list) { current = op_list; op_list = op_list->next; switch(current->type) { case reg_succ: { my_successors.register_successor(*(current->my_succ)); task* tp = this->graph_node::my_graph.root_task(); if(tuple_build_may_succeed() && !forwarder_busy && tp) { task *rtask = new ( task::allocate_additional_child_of(*tp) ) forward_task_bypass >(*this); FLOW_SPAWN(*rtask); forwarder_busy = true; } __TBB_store_with_release(current->status, SUCCEEDED); } break; case rem_succ: my_successors.remove_successor(*(current->my_succ)); __TBB_store_with_release(current->status, SUCCEEDED); break; case try__get: if(tuple_build_may_succeed()) { if(try_to_make_tuple(*(current->my_arg))) { tuple_accepted(); __TBB_store_with_release(current->status, SUCCEEDED); } else __TBB_store_with_release(current->status, FAILED); } else __TBB_store_with_release(current->status, FAILED); break; case do_fwrd_bypass: { bool build_succeeded; task *last_task = NULL; output_type out; if(tuple_build_may_succeed()) { do { build_succeeded = try_to_make_tuple(out); if(build_succeeded) { task *new_task = my_successors.try_put_task(out); last_task = combine_tasks(last_task, new_task); if(new_task) { tuple_accepted(); } else { tuple_rejected(); build_succeeded = false; } } } while(build_succeeded); } current->bypass_t = last_task; __TBB_store_with_release(current->status, SUCCEEDED); forwarder_busy = false; } break; #if TBB_PREVIEW_FLOW_GRAPH_FEATURES case add_blt_succ: my_successors.internal_add_built_successor(*(current->my_succ)); __TBB_store_with_release(current->status, SUCCEEDED); break; case del_blt_succ: my_successors.internal_delete_built_successor(*(current->my_succ)); __TBB_store_with_release(current->status, SUCCEEDED); break; case blt_succ_cnt: current->cnt_val = my_successors.successor_count(); __TBB_store_with_release(current->status, SUCCEEDED); break; case blt_succ_cpy: my_successors.copy_successors(*(current->svec)); __TBB_store_with_release(current->status, SUCCEEDED); break; #endif /* TBB_PREVIEW_FLOW_GRAPH_FEATURES */ } } } // ---------- end aggregator ----------- public: join_node_base(graph &g) : graph_node(g), input_ports_type(g), forwarder_busy(false) { my_successors.set_owner(this); input_ports_type::set_my_node(this); my_aggregator.initialize_handler(my_handler(this)); } join_node_base(const join_node_base& other) : graph_node(other.graph_node::my_graph), input_ports_type(other), sender(), forwarder_busy(false), my_successors() { my_successors.set_owner(this); input_ports_type::set_my_node(this); my_aggregator.initialize_handler(my_handler(this)); } template join_node_base(graph &g, FunctionTuple f) : graph_node(g), input_ports_type(g, f), forwarder_busy(false) { my_successors.set_owner(this); input_ports_type::set_my_node(this); my_aggregator.initialize_handler(my_handler(this)); } bool register_successor(successor_type &r) { join_node_base_operation op_data(r, reg_succ); my_aggregator.execute(&op_data); return op_data.status == SUCCEEDED; } bool remove_successor( successor_type &r) { join_node_base_operation op_data(r, rem_succ); my_aggregator.execute(&op_data); return op_data.status == SUCCEEDED; } bool try_get( output_type &v) { join_node_base_operation op_data(v, try__get); my_aggregator.execute(&op_data); return op_data.status == SUCCEEDED; } #if TBB_PREVIEW_FLOW_GRAPH_FEATURES /*override*/void internal_add_built_successor( successor_type &r) { join_node_base_operation op_data(r, add_blt_succ); my_aggregator.execute(&op_data); } /*override*/void internal_delete_built_successor( successor_type &r) { join_node_base_operation op_data(r, del_blt_succ); my_aggregator.execute(&op_data); } /*override*/size_t successor_count() { join_node_base_operation op_data(blt_succ_cnt); my_aggregator.execute(&op_data); return op_data.cnt_val; } /*override*/ void copy_successors(successor_vector_type &v) { join_node_base_operation op_data(blt_succ_cpy); op_data.svec = &v; my_aggregator.execute(&op_data); } #endif /* TBB_PREVIEW_FLOW_GRAPH_FEATURES */ protected: /*override*/void reset(__TBB_PFG_RESET_ARG(reset_flags f)) { input_ports_type::reset(__TBB_PFG_RESET_ARG(f)); #if TBB_PREVIEW_FLOW_GRAPH_FEATURES my_successors.reset(f); #endif } private: broadcast_cache my_successors; friend class forward_task_bypass< join_node_base >; task *forward_task() { join_node_base_operation op_data(do_fwrd_bypass); my_aggregator.execute(&op_data); return op_data.bypass_t; } }; // join base class type generator template class PT, typename OutputTuple, graph_buffer_policy JP> struct join_base { typedef typename internal::join_node_base::type, OutputTuple> type; }; //! unfolded_join_node : passes input_ports_type to join_node_base. We build the input port type // using tuple_element. The class PT is the port type (reserving_port, queueing_port, tag_matching_port) // and should match the graph_buffer_policy. template class PT, typename OutputTuple, graph_buffer_policy JP> class unfolded_join_node : public join_base::type { public: typedef typename wrap_tuple_elements::type input_ports_type; typedef OutputTuple output_type; private: typedef join_node_base base_type; public: unfolded_join_node(graph &g) : base_type(g) {} unfolded_join_node(const unfolded_join_node &other) : base_type(other) {} }; // tag_matching unfolded_join_node. This must be a separate specialization because the constructors // differ. template class unfolded_join_node<2,tag_matching_port,OutputTuple,tag_matching> : public join_base<2,tag_matching_port,OutputTuple,tag_matching>::type { typedef typename tbb::flow::tuple_element<0, OutputTuple>::type T0; typedef typename tbb::flow::tuple_element<1, OutputTuple>::type T1; public: typedef typename wrap_tuple_elements<2,tag_matching_port,OutputTuple>::type input_ports_type; typedef OutputTuple output_type; private: typedef join_node_base base_type; typedef typename internal::function_body *f0_p; typedef typename internal::function_body *f1_p; typedef typename tbb::flow::tuple< f0_p, f1_p > func_initializer_type; public: template unfolded_join_node(graph &g, B0 b0, B1 b1) : base_type(g, func_initializer_type( new internal::function_body_leaf(b0), new internal::function_body_leaf(b1) ) ) {} unfolded_join_node(const unfolded_join_node &other) : base_type(other) {} }; template class unfolded_join_node<3,tag_matching_port,OutputTuple,tag_matching> : public join_base<3,tag_matching_port,OutputTuple,tag_matching>::type { typedef typename tbb::flow::tuple_element<0, OutputTuple>::type T0; typedef typename tbb::flow::tuple_element<1, OutputTuple>::type T1; typedef typename tbb::flow::tuple_element<2, OutputTuple>::type T2; public: typedef typename wrap_tuple_elements<3, tag_matching_port, OutputTuple>::type input_ports_type; typedef OutputTuple output_type; private: typedef join_node_base base_type; typedef typename internal::function_body *f0_p; typedef typename internal::function_body *f1_p; typedef typename internal::function_body *f2_p; typedef typename tbb::flow::tuple< f0_p, f1_p, f2_p > func_initializer_type; public: template unfolded_join_node(graph &g, B0 b0, B1 b1, B2 b2) : base_type(g, func_initializer_type( new internal::function_body_leaf(b0), new internal::function_body_leaf(b1), new internal::function_body_leaf(b2) ) ) {} unfolded_join_node(const unfolded_join_node &other) : base_type(other) {} }; template class unfolded_join_node<4,tag_matching_port,OutputTuple,tag_matching> : public join_base<4,tag_matching_port,OutputTuple,tag_matching>::type { typedef typename tbb::flow::tuple_element<0, OutputTuple>::type T0; typedef typename tbb::flow::tuple_element<1, OutputTuple>::type T1; typedef typename tbb::flow::tuple_element<2, OutputTuple>::type T2; typedef typename tbb::flow::tuple_element<3, OutputTuple>::type T3; public: typedef typename wrap_tuple_elements<4, tag_matching_port, OutputTuple>::type input_ports_type; typedef OutputTuple output_type; private: typedef join_node_base base_type; typedef typename internal::function_body *f0_p; typedef typename internal::function_body *f1_p; typedef typename internal::function_body *f2_p; typedef typename internal::function_body *f3_p; typedef typename tbb::flow::tuple< f0_p, f1_p, f2_p, f3_p > func_initializer_type; public: template unfolded_join_node(graph &g, B0 b0, B1 b1, B2 b2, B3 b3) : base_type(g, func_initializer_type( new internal::function_body_leaf(b0), new internal::function_body_leaf(b1), new internal::function_body_leaf(b2), new internal::function_body_leaf(b3) ) ) {} unfolded_join_node(const unfolded_join_node &other) : base_type(other) {} }; template class unfolded_join_node<5,tag_matching_port,OutputTuple,tag_matching> : public join_base<5,tag_matching_port,OutputTuple,tag_matching>::type { typedef typename tbb::flow::tuple_element<0, OutputTuple>::type T0; typedef typename tbb::flow::tuple_element<1, OutputTuple>::type T1; typedef typename tbb::flow::tuple_element<2, OutputTuple>::type T2; typedef typename tbb::flow::tuple_element<3, OutputTuple>::type T3; typedef typename tbb::flow::tuple_element<4, OutputTuple>::type T4; public: typedef typename wrap_tuple_elements<5, tag_matching_port, OutputTuple>::type input_ports_type; typedef OutputTuple output_type; private: typedef join_node_base base_type; typedef typename internal::function_body *f0_p; typedef typename internal::function_body *f1_p; typedef typename internal::function_body *f2_p; typedef typename internal::function_body *f3_p; typedef typename internal::function_body *f4_p; typedef typename tbb::flow::tuple< f0_p, f1_p, f2_p, f3_p, f4_p > func_initializer_type; public: template unfolded_join_node(graph &g, B0 b0, B1 b1, B2 b2, B3 b3, B4 b4) : base_type(g, func_initializer_type( new internal::function_body_leaf(b0), new internal::function_body_leaf(b1), new internal::function_body_leaf(b2), new internal::function_body_leaf(b3), new internal::function_body_leaf(b4) ) ) {} unfolded_join_node(const unfolded_join_node &other) : base_type(other) {} }; #if __TBB_VARIADIC_MAX >= 6 template class unfolded_join_node<6,tag_matching_port,OutputTuple,tag_matching> : public join_base<6,tag_matching_port,OutputTuple,tag_matching>::type { typedef typename tbb::flow::tuple_element<0, OutputTuple>::type T0; typedef typename tbb::flow::tuple_element<1, OutputTuple>::type T1; typedef typename tbb::flow::tuple_element<2, OutputTuple>::type T2; typedef typename tbb::flow::tuple_element<3, OutputTuple>::type T3; typedef typename tbb::flow::tuple_element<4, OutputTuple>::type T4; typedef typename tbb::flow::tuple_element<5, OutputTuple>::type T5; public: typedef typename wrap_tuple_elements<6, tag_matching_port, OutputTuple>::type input_ports_type; typedef OutputTuple output_type; private: typedef join_node_base base_type; typedef typename internal::function_body *f0_p; typedef typename internal::function_body *f1_p; typedef typename internal::function_body *f2_p; typedef typename internal::function_body *f3_p; typedef typename internal::function_body *f4_p; typedef typename internal::function_body *f5_p; typedef typename tbb::flow::tuple< f0_p, f1_p, f2_p, f3_p, f4_p, f5_p > func_initializer_type; public: template unfolded_join_node(graph &g, B0 b0, B1 b1, B2 b2, B3 b3, B4 b4, B5 b5) : base_type(g, func_initializer_type( new internal::function_body_leaf(b0), new internal::function_body_leaf(b1), new internal::function_body_leaf(b2), new internal::function_body_leaf(b3), new internal::function_body_leaf(b4), new internal::function_body_leaf(b5) ) ) {} unfolded_join_node(const unfolded_join_node &other) : base_type(other) {} }; #endif #if __TBB_VARIADIC_MAX >= 7 template class unfolded_join_node<7,tag_matching_port,OutputTuple,tag_matching> : public join_base<7,tag_matching_port,OutputTuple,tag_matching>::type { typedef typename tbb::flow::tuple_element<0, OutputTuple>::type T0; typedef typename tbb::flow::tuple_element<1, OutputTuple>::type T1; typedef typename tbb::flow::tuple_element<2, OutputTuple>::type T2; typedef typename tbb::flow::tuple_element<3, OutputTuple>::type T3; typedef typename tbb::flow::tuple_element<4, OutputTuple>::type T4; typedef typename tbb::flow::tuple_element<5, OutputTuple>::type T5; typedef typename tbb::flow::tuple_element<6, OutputTuple>::type T6; public: typedef typename wrap_tuple_elements<7, tag_matching_port, OutputTuple>::type input_ports_type; typedef OutputTuple output_type; private: typedef join_node_base base_type; typedef typename internal::function_body *f0_p; typedef typename internal::function_body *f1_p; typedef typename internal::function_body *f2_p; typedef typename internal::function_body *f3_p; typedef typename internal::function_body *f4_p; typedef typename internal::function_body *f5_p; typedef typename internal::function_body *f6_p; typedef typename tbb::flow::tuple< f0_p, f1_p, f2_p, f3_p, f4_p, f5_p, f6_p > func_initializer_type; public: template unfolded_join_node(graph &g, B0 b0, B1 b1, B2 b2, B3 b3, B4 b4, B5 b5, B6 b6) : base_type(g, func_initializer_type( new internal::function_body_leaf(b0), new internal::function_body_leaf(b1), new internal::function_body_leaf(b2), new internal::function_body_leaf(b3), new internal::function_body_leaf(b4), new internal::function_body_leaf(b5), new internal::function_body_leaf(b6) ) ) {} unfolded_join_node(const unfolded_join_node &other) : base_type(other) {} }; #endif #if __TBB_VARIADIC_MAX >= 8 template class unfolded_join_node<8,tag_matching_port,OutputTuple,tag_matching> : public join_base<8,tag_matching_port,OutputTuple,tag_matching>::type { typedef typename tbb::flow::tuple_element<0, OutputTuple>::type T0; typedef typename tbb::flow::tuple_element<1, OutputTuple>::type T1; typedef typename tbb::flow::tuple_element<2, OutputTuple>::type T2; typedef typename tbb::flow::tuple_element<3, OutputTuple>::type T3; typedef typename tbb::flow::tuple_element<4, OutputTuple>::type T4; typedef typename tbb::flow::tuple_element<5, OutputTuple>::type T5; typedef typename tbb::flow::tuple_element<6, OutputTuple>::type T6; typedef typename tbb::flow::tuple_element<7, OutputTuple>::type T7; public: typedef typename wrap_tuple_elements<8, tag_matching_port, OutputTuple>::type input_ports_type; typedef OutputTuple output_type; private: typedef join_node_base base_type; typedef typename internal::function_body *f0_p; typedef typename internal::function_body *f1_p; typedef typename internal::function_body *f2_p; typedef typename internal::function_body *f3_p; typedef typename internal::function_body *f4_p; typedef typename internal::function_body *f5_p; typedef typename internal::function_body *f6_p; typedef typename internal::function_body *f7_p; typedef typename tbb::flow::tuple< f0_p, f1_p, f2_p, f3_p, f4_p, f5_p, f6_p, f7_p > func_initializer_type; public: template unfolded_join_node(graph &g, B0 b0, B1 b1, B2 b2, B3 b3, B4 b4, B5 b5, B6 b6, B7 b7) : base_type(g, func_initializer_type( new internal::function_body_leaf(b0), new internal::function_body_leaf(b1), new internal::function_body_leaf(b2), new internal::function_body_leaf(b3), new internal::function_body_leaf(b4), new internal::function_body_leaf(b5), new internal::function_body_leaf(b6), new internal::function_body_leaf(b7) ) ) {} unfolded_join_node(const unfolded_join_node &other) : base_type(other) {} }; #endif #if __TBB_VARIADIC_MAX >= 9 template class unfolded_join_node<9,tag_matching_port,OutputTuple,tag_matching> : public join_base<9,tag_matching_port,OutputTuple,tag_matching>::type { typedef typename tbb::flow::tuple_element<0, OutputTuple>::type T0; typedef typename tbb::flow::tuple_element<1, OutputTuple>::type T1; typedef typename tbb::flow::tuple_element<2, OutputTuple>::type T2; typedef typename tbb::flow::tuple_element<3, OutputTuple>::type T3; typedef typename tbb::flow::tuple_element<4, OutputTuple>::type T4; typedef typename tbb::flow::tuple_element<5, OutputTuple>::type T5; typedef typename tbb::flow::tuple_element<6, OutputTuple>::type T6; typedef typename tbb::flow::tuple_element<7, OutputTuple>::type T7; typedef typename tbb::flow::tuple_element<8, OutputTuple>::type T8; public: typedef typename wrap_tuple_elements<9, tag_matching_port, OutputTuple>::type input_ports_type; typedef OutputTuple output_type; private: typedef join_node_base base_type; typedef typename internal::function_body *f0_p; typedef typename internal::function_body *f1_p; typedef typename internal::function_body *f2_p; typedef typename internal::function_body *f3_p; typedef typename internal::function_body *f4_p; typedef typename internal::function_body *f5_p; typedef typename internal::function_body *f6_p; typedef typename internal::function_body *f7_p; typedef typename internal::function_body *f8_p; typedef typename tbb::flow::tuple< f0_p, f1_p, f2_p, f3_p, f4_p, f5_p, f6_p, f7_p, f8_p > func_initializer_type; public: template unfolded_join_node(graph &g, B0 b0, B1 b1, B2 b2, B3 b3, B4 b4, B5 b5, B6 b6, B7 b7, B8 b8) : base_type(g, func_initializer_type( new internal::function_body_leaf(b0), new internal::function_body_leaf(b1), new internal::function_body_leaf(b2), new internal::function_body_leaf(b3), new internal::function_body_leaf(b4), new internal::function_body_leaf(b5), new internal::function_body_leaf(b6), new internal::function_body_leaf(b7), new internal::function_body_leaf(b8) ) ) {} unfolded_join_node(const unfolded_join_node &other) : base_type(other) {} }; #endif #if __TBB_VARIADIC_MAX >= 10 template class unfolded_join_node<10,tag_matching_port,OutputTuple,tag_matching> : public join_base<10,tag_matching_port,OutputTuple,tag_matching>::type { typedef typename tbb::flow::tuple_element<0, OutputTuple>::type T0; typedef typename tbb::flow::tuple_element<1, OutputTuple>::type T1; typedef typename tbb::flow::tuple_element<2, OutputTuple>::type T2; typedef typename tbb::flow::tuple_element<3, OutputTuple>::type T3; typedef typename tbb::flow::tuple_element<4, OutputTuple>::type T4; typedef typename tbb::flow::tuple_element<5, OutputTuple>::type T5; typedef typename tbb::flow::tuple_element<6, OutputTuple>::type T6; typedef typename tbb::flow::tuple_element<7, OutputTuple>::type T7; typedef typename tbb::flow::tuple_element<8, OutputTuple>::type T8; typedef typename tbb::flow::tuple_element<9, OutputTuple>::type T9; public: typedef typename wrap_tuple_elements<10, tag_matching_port, OutputTuple>::type input_ports_type; typedef OutputTuple output_type; private: typedef join_node_base base_type; typedef typename internal::function_body *f0_p; typedef typename internal::function_body *f1_p; typedef typename internal::function_body *f2_p; typedef typename internal::function_body *f3_p; typedef typename internal::function_body *f4_p; typedef typename internal::function_body *f5_p; typedef typename internal::function_body *f6_p; typedef typename internal::function_body *f7_p; typedef typename internal::function_body *f8_p; typedef typename internal::function_body *f9_p; typedef typename tbb::flow::tuple< f0_p, f1_p, f2_p, f3_p, f4_p, f5_p, f6_p, f7_p, f8_p, f9_p > func_initializer_type; public: template unfolded_join_node(graph &g, B0 b0, B1 b1, B2 b2, B3 b3, B4 b4, B5 b5, B6 b6, B7 b7, B8 b8, B9 b9) : base_type(g, func_initializer_type( new internal::function_body_leaf(b0), new internal::function_body_leaf(b1), new internal::function_body_leaf(b2), new internal::function_body_leaf(b3), new internal::function_body_leaf(b4), new internal::function_body_leaf(b5), new internal::function_body_leaf(b6), new internal::function_body_leaf(b7), new internal::function_body_leaf(b8), new internal::function_body_leaf(b9) ) ) {} unfolded_join_node(const unfolded_join_node &other) : base_type(other) {} }; #endif //! templated function to refer to input ports of the join node template typename tbb::flow::tuple_element::type &input_port(JNT &jn) { return tbb::flow::get(jn.input_ports()); } } #endif // __TBB__flow_graph_join_impl_H ================================================ FILE: benchmarks/tbb/internal/_flow_graph_node_impl.h ================================================ /* Copyright 2005-2014 Intel Corporation. All Rights Reserved. This file is part of Threading Building Blocks. Threading Building Blocks is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. Threading Building Blocks is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Threading Building Blocks; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA As a special exception, you may use this file as part of a free software library without restriction. Specifically, if other files instantiate templates or use macros or inline functions from this file, or you compile this file and link it with other files to produce an executable, this file does not by itself cause the resulting executable to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the executable file might be covered by the GNU General Public License. */ #ifndef __TBB__flow_graph_node_impl_H #define __TBB__flow_graph_node_impl_H #ifndef __TBB_flow_graph_H #error Do not #include this internal file directly; use public TBB headers instead. #endif #include "_flow_graph_item_buffer_impl.h" //! @cond INTERNAL namespace internal { using tbb::internal::aggregated_operation; using tbb::internal::aggregating_functor; using tbb::internal::aggregator; template< typename T, typename A > class function_input_queue : public item_buffer { public: bool pop( T& t ) { return this->pop_front( t ); } bool push( T& t ) { return this->push_back( t ); } }; //! Input and scheduling for a function node that takes a type Input as input // The only up-ref is apply_body_impl, which should implement the function // call and any handling of the result. template< typename Input, typename A, typename ImplType > class function_input_base : public receiver, tbb::internal::no_assign { enum op_stat {WAIT=0, SUCCEEDED, FAILED}; enum op_type {reg_pred, rem_pred, app_body, try_fwd, tryput_bypass, app_body_bypass #if TBB_PREVIEW_FLOW_GRAPH_FEATURES , add_blt_pred, del_blt_pred, blt_pred_cnt, blt_pred_cpy // create vector copies of preds and succs #endif }; typedef function_input_base my_class; public: //! The input type of this receiver typedef Input input_type; typedef sender predecessor_type; #if TBB_PREVIEW_FLOW_GRAPH_FEATURES typedef std::vector predecessor_vector_type; #endif //! Constructor for function_input_base function_input_base( graph &g, size_t max_concurrency, function_input_queue *q = NULL ) : my_graph(g), my_max_concurrency(max_concurrency), my_concurrency(0), my_queue(q), forwarder_busy(false) { my_predecessors.set_owner(this); my_aggregator.initialize_handler(my_handler(this)); } //! Copy constructor function_input_base( const function_input_base& src, function_input_queue *q = NULL ) : receiver(), tbb::internal::no_assign(), my_graph(src.my_graph), my_max_concurrency(src.my_max_concurrency), my_concurrency(0), my_queue(q), forwarder_busy(false) { my_predecessors.set_owner(this); my_aggregator.initialize_handler(my_handler(this)); } //! Destructor virtual ~function_input_base() { if ( my_queue ) delete my_queue; } //! Put to the node, returning a task if available virtual task * try_put_task( const input_type &t ) { if ( my_max_concurrency == 0 ) { return create_body_task( t ); } else { my_operation op_data(t, tryput_bypass); my_aggregator.execute(&op_data); if(op_data.status == SUCCEEDED ) { return op_data.bypass_t; } return NULL; } } //! Adds src to the list of cached predecessors. /* override */ bool register_predecessor( predecessor_type &src ) { my_operation op_data(reg_pred); op_data.r = &src; my_aggregator.execute(&op_data); return true; } //! Removes src from the list of cached predecessors. /* override */ bool remove_predecessor( predecessor_type &src ) { my_operation op_data(rem_pred); op_data.r = &src; my_aggregator.execute(&op_data); return true; } #if TBB_PREVIEW_FLOW_GRAPH_FEATURES //! Adds to list of predecessors added by make_edge /*override*/ void internal_add_built_predecessor( predecessor_type &src) { my_operation op_data(add_blt_pred); op_data.r = &src; my_aggregator.execute(&op_data); } //! removes from to list of predecessors (used by remove_edge) /*override*/ void internal_delete_built_predecessor( predecessor_type &src) { my_operation op_data(del_blt_pred); op_data.r = &src; my_aggregator.execute(&op_data); } /*override*/ size_t predecessor_count() { my_operation op_data(blt_pred_cnt); my_aggregator.execute(&op_data); return op_data.cnt_val; } /*override*/ void copy_predecessors(predecessor_vector_type &v) { my_operation op_data(blt_pred_cpy); op_data.predv = &v; my_aggregator.execute(&op_data); } #endif /* TBB_PREVIEW_FLOW_GRAPH_FEATURES */ protected: void reset_function_input_base( __TBB_PFG_RESET_ARG(reset_flags f)) { my_concurrency = 0; if(my_queue) { my_queue->reset(); } reset_receiver(__TBB_PFG_RESET_ARG(f)); forwarder_busy = false; } graph& my_graph; const size_t my_max_concurrency; size_t my_concurrency; function_input_queue *my_queue; predecessor_cache my_predecessors; /*override*/void reset_receiver( __TBB_PFG_RESET_ARG(reset_flags f)) { my_predecessors.reset(__TBB_PFG_RESET_ARG(f)); #if TBB_PREVIEW_FLOW_GRAPH_FEATURES __TBB_ASSERT(!(f & rf_extract) || my_predecessors.empty(), "function_input_base reset failed"); #endif } private: friend class apply_body_task_bypass< my_class, input_type >; friend class forward_task_bypass< my_class >; class my_operation : public aggregated_operation< my_operation > { public: char type; union { input_type *elem; predecessor_type *r; #if TBB_PREVIEW_FLOW_GRAPH_FEATURES size_t cnt_val; predecessor_vector_type *predv; #endif /* TBB_PREVIEW_FLOW_GRAPH_FEATURES */ }; tbb::task *bypass_t; my_operation(const input_type& e, op_type t) : type(char(t)), elem(const_cast(&e)) {} my_operation(op_type t) : type(char(t)), r(NULL) {} }; bool forwarder_busy; typedef internal::aggregating_functor my_handler; friend class internal::aggregating_functor; aggregator< my_handler, my_operation > my_aggregator; void handle_operations(my_operation *op_list) { my_operation *tmp; while (op_list) { tmp = op_list; op_list = op_list->next; switch (tmp->type) { case reg_pred: my_predecessors.add(*(tmp->r)); __TBB_store_with_release(tmp->status, SUCCEEDED); if (!forwarder_busy) { forwarder_busy = true; spawn_forward_task(); } break; case rem_pred: my_predecessors.remove(*(tmp->r)); __TBB_store_with_release(tmp->status, SUCCEEDED); break; case app_body: __TBB_ASSERT(my_max_concurrency != 0, NULL); --my_concurrency; __TBB_store_with_release(tmp->status, SUCCEEDED); if (my_concurrencypop(i); else item_was_retrieved = my_predecessors.get_item(i); if (item_was_retrieved) { ++my_concurrency; spawn_body_task(i); } } break; case app_body_bypass: { task * new_task = NULL; __TBB_ASSERT(my_max_concurrency != 0, NULL); --my_concurrency; if (my_concurrencypop(i); else item_was_retrieved = my_predecessors.get_item(i); if (item_was_retrieved) { ++my_concurrency; new_task = create_body_task(i); } } tmp->bypass_t = new_task; __TBB_store_with_release(tmp->status, SUCCEEDED); } break; case tryput_bypass: internal_try_put_task(tmp); break; case try_fwd: internal_forward(tmp); break; #if TBB_PREVIEW_FLOW_GRAPH_FEATURES case add_blt_pred: { my_predecessors.internal_add_built_predecessor(*(tmp->r)); __TBB_store_with_release(tmp->status, SUCCEEDED); } break; case del_blt_pred: my_predecessors.internal_delete_built_predecessor(*(tmp->r)); __TBB_store_with_release(tmp->status, SUCCEEDED); break; case blt_pred_cnt: tmp->cnt_val = my_predecessors.predecessor_count(); __TBB_store_with_release(tmp->status, SUCCEEDED); break; case blt_pred_cpy: my_predecessors.copy_predecessors( *(tmp->predv) ); __TBB_store_with_release(tmp->status, SUCCEEDED); break; #endif /* TBB_PREVIEW_FLOW_GRAPH_FEATURES */ } } } //! Put to the node, but return the task instead of enqueueing it void internal_try_put_task(my_operation *op) { __TBB_ASSERT(my_max_concurrency != 0, NULL); if (my_concurrency < my_max_concurrency) { ++my_concurrency; task * new_task = create_body_task(*(op->elem)); op->bypass_t = new_task; __TBB_store_with_release(op->status, SUCCEEDED); } else if ( my_queue && my_queue->push(*(op->elem)) ) { op->bypass_t = SUCCESSFULLY_ENQUEUED; __TBB_store_with_release(op->status, SUCCEEDED); } else { op->bypass_t = NULL; __TBB_store_with_release(op->status, FAILED); } } //! Tries to spawn bodies if available and if concurrency allows void internal_forward(my_operation *op) { op->bypass_t = NULL; if (my_concurrencypop(i); else item_was_retrieved = my_predecessors.get_item(i); if (item_was_retrieved) { ++my_concurrency; op->bypass_t = create_body_task(i); __TBB_store_with_release(op->status, SUCCEEDED); return; } } __TBB_store_with_release(op->status, FAILED); forwarder_busy = false; } //! Applies the body to the provided input // then decides if more work is available void apply_body( input_type &i ) { task *new_task = apply_body_bypass(i); if(!new_task) return; if(new_task == SUCCESSFULLY_ENQUEUED) return; FLOW_SPAWN(*new_task); return; } //! Applies the body to the provided input // then decides if more work is available task * apply_body_bypass( input_type &i ) { task * new_task = static_cast(this)->apply_body_impl_bypass(i); if ( my_max_concurrency != 0 ) { my_operation op_data(app_body_bypass); // tries to pop an item or get_item, enqueues another apply_body my_aggregator.execute(&op_data); tbb::task *ttask = op_data.bypass_t; new_task = combine_tasks(new_task, ttask); } return new_task; } //! allocates a task to call apply_body( input ) inline task * create_body_task( const input_type &input ) { task* tp = my_graph.root_task(); return (tp) ? new(task::allocate_additional_child_of(*tp)) apply_body_task_bypass < my_class, input_type >(*this, input) : NULL; } //! Spawns a task that calls apply_body( input ) inline void spawn_body_task( const input_type &input ) { task* tp = create_body_task(input); // tp == NULL => g.reset(), which shouldn't occur in concurrent context if(tp) { FLOW_SPAWN(*tp); } } //! This is executed by an enqueued task, the "forwarder" task *forward_task() { my_operation op_data(try_fwd); task *rval = NULL; do { op_data.status = WAIT; my_aggregator.execute(&op_data); if(op_data.status == SUCCEEDED) { tbb::task *ttask = op_data.bypass_t; rval = combine_tasks(rval, ttask); } } while (op_data.status == SUCCEEDED); return rval; } inline task *create_forward_task() { task* tp = my_graph.root_task(); return (tp) ? new(task::allocate_additional_child_of(*tp)) forward_task_bypass< my_class >(*this) : NULL; } //! Spawns a task that calls forward() inline void spawn_forward_task() { task* tp = create_forward_task(); if(tp) { FLOW_SPAWN(*tp); } } }; // function_input_base //! Implements methods for a function node that takes a type Input as input and sends // a type Output to its successors. template< typename Input, typename Output, typename A> class function_input : public function_input_base > { public: typedef Input input_type; typedef Output output_type; typedef function_input my_class; typedef function_input_base base_type; typedef function_input_queue input_queue_type; // constructor template function_input( graph &g, size_t max_concurrency, Body& body, function_input_queue *q = NULL ) : base_type(g, max_concurrency, q), my_body( new internal::function_body_leaf< input_type, output_type, Body>(body) ) { } //! Copy constructor function_input( const function_input& src, input_queue_type *q = NULL ) : base_type(src, q), my_body( src.my_body->clone() ) { } ~function_input() { delete my_body; } template< typename Body > Body copy_function_object() { internal::function_body &body_ref = *this->my_body; return dynamic_cast< internal::function_body_leaf & >(body_ref).get_body(); } task * apply_body_impl_bypass( const input_type &i) { #if TBB_PREVIEW_FLOW_GRAPH_TRACE // There is an extra copied needed to capture the // body execution without the try_put tbb::internal::fgt_begin_body( my_body ); output_type v = (*my_body)(i); tbb::internal::fgt_end_body( my_body ); task * new_task = successors().try_put_task( v ); #else task * new_task = successors().try_put_task( (*my_body)(i) ); #endif return new_task; } protected: void reset_function_input(__TBB_PFG_RESET_ARG(reset_flags f)) { base_type::reset_function_input_base(__TBB_PFG_RESET_ARG(f)); #if TBB_PREVIEW_FLOW_GRAPH_FEATURES if(f & rf_reset_bodies) my_body->reset_body(); #endif } function_body *my_body; virtual broadcast_cache &successors() = 0; }; // function_input #if TBB_PREVIEW_FLOW_GRAPH_FEATURES // helper templates to reset the successor edges of the output ports of an multifunction_node template struct reset_element { template static void reset_this(P &p, reset_flags f) { (void)tbb::flow::get(p).successors().reset(f); reset_element::reset_this(p, f); } template static bool this_empty(P &p) { if(tbb::flow::get(p).successors().empty()) return reset_element::this_empty(p); return false; } }; template<> struct reset_element<1> { template static void reset_this(P &p, reset_flags f) { (void)tbb::flow::get<0>(p).successors().reset(f); } template static bool this_empty(P &p) { return tbb::flow::get<0>(p).successors().empty(); } }; #endif //! Implements methods for a function node that takes a type Input as input // and has a tuple of output ports specified. template< typename Input, typename OutputPortSet, typename A> class multifunction_input : public function_input_base > { public: static const int N = tbb::flow::tuple_size::value; typedef Input input_type; typedef OutputPortSet output_ports_type; typedef multifunction_input my_class; typedef function_input_base base_type; typedef function_input_queue input_queue_type; // constructor template multifunction_input( graph &g, size_t max_concurrency, Body& body, function_input_queue *q = NULL ) : base_type(g, max_concurrency, q), my_body( new internal::multifunction_body_leaf(body) ) { } //! Copy constructor multifunction_input( const multifunction_input& src, input_queue_type *q = NULL ) : base_type(src, q), my_body( src.my_body->clone() ) { } ~multifunction_input() { delete my_body; } template< typename Body > Body copy_function_object() { internal::multifunction_body &body_ref = *this->my_body; return dynamic_cast< internal::multifunction_body_leaf & >(body_ref).get_body(); } // for multifunction nodes we do not have a single successor as such. So we just tell // the task we were successful. task * apply_body_impl_bypass( const input_type &i) { tbb::internal::fgt_begin_body( my_body ); (*my_body)(i, my_output_ports); tbb::internal::fgt_end_body( my_body ); task * new_task = SUCCESSFULLY_ENQUEUED; return new_task; } output_ports_type &output_ports(){ return my_output_ports; } protected: /*override*/void reset(__TBB_PFG_RESET_ARG(reset_flags f)) { base_type::reset_function_input_base(__TBB_PFG_RESET_ARG(f)); #if TBB_PREVIEW_FLOW_GRAPH_FEATURES reset_element::reset_this(my_output_ports, f); if(f & rf_reset_bodies) my_body->reset_body(); __TBB_ASSERT(!(f & rf_extract) || reset_element::this_empty(my_output_ports), "multifunction_node reset failed"); #endif } multifunction_body *my_body; output_ports_type my_output_ports; }; // multifunction_input // template to refer to an output port of a multifunction_node template typename tbb::flow::tuple_element::type &output_port(MOP &op) { return tbb::flow::get(op.output_ports()); } // helper structs for split_node template struct emit_element { template static void emit_this(const T &t, P &p) { (void)tbb::flow::get(p).try_put(tbb::flow::get(t)); emit_element::emit_this(t,p); } }; template<> struct emit_element<1> { template static void emit_this(const T &t, P &p) { (void)tbb::flow::get<0>(p).try_put(tbb::flow::get<0>(t)); } }; //! Implements methods for an executable node that takes continue_msg as input template< typename Output > class continue_input : public continue_receiver { public: //! The input type of this receiver typedef continue_msg input_type; //! The output type of this receiver typedef Output output_type; template< typename Body > continue_input( graph &g, Body& body ) : my_graph_ptr(&g), my_body( new internal::function_body_leaf< input_type, output_type, Body>(body) ) { } template< typename Body > continue_input( graph &g, int number_of_predecessors, Body& body ) : continue_receiver( number_of_predecessors ), my_graph_ptr(&g), my_body( new internal::function_body_leaf< input_type, output_type, Body>(body) ) { } continue_input( const continue_input& src ) : continue_receiver(src), my_graph_ptr(src.my_graph_ptr), my_body( src.my_body->clone() ) {} ~continue_input() { delete my_body; } template< typename Body > Body copy_function_object() { internal::function_body &body_ref = *my_body; return dynamic_cast< internal::function_body_leaf & >(body_ref).get_body(); } /*override*/void reset_receiver( __TBB_PFG_RESET_ARG(reset_flags f)) { continue_receiver::reset_receiver(__TBB_PFG_RESET_ARG(f)); #if TBB_PREVIEW_FLOW_GRAPH_FEATURES if(f & rf_reset_bodies) my_body->reset_body(); #endif } protected: graph* my_graph_ptr; function_body *my_body; virtual broadcast_cache &successors() = 0; friend class apply_body_task_bypass< continue_input< Output >, continue_msg >; //! Applies the body to the provided input /* override */ task *apply_body_bypass( input_type ) { #if TBB_PREVIEW_FLOW_GRAPH_TRACE // There is an extra copied needed to capture the // body execution without the try_put tbb::internal::fgt_begin_body( my_body ); output_type v = (*my_body)( continue_msg() ); tbb::internal::fgt_end_body( my_body ); return successors().try_put_task( v ); #else return successors().try_put_task( (*my_body)( continue_msg() ) ); #endif } //! Spawns a task that applies the body /* override */ task *execute( ) { task* tp = my_graph_ptr->root_task(); return (tp) ? new ( task::allocate_additional_child_of( *tp ) ) apply_body_task_bypass< continue_input< Output >, continue_msg >( *this, continue_msg() ) : NULL; } }; // continue_input //! Implements methods for both executable and function nodes that puts Output to its successors template< typename Output > class function_output : public sender { public: #if TBB_PREVIEW_FLOW_GRAPH_FEATURES template friend struct reset_element; #endif typedef Output output_type; typedef receiver successor_type; typedef broadcast_cache broadcast_cache_type; #if TBB_PREVIEW_FLOW_GRAPH_FEATURES typedef std::vector successor_vector_type; #endif function_output() { my_successors.set_owner(this); } function_output(const function_output & /*other*/) : sender() { my_successors.set_owner(this); } //! Adds a new successor to this node /* override */ bool register_successor( receiver &r ) { successors().register_successor( r ); return true; } //! Removes a successor from this node /* override */ bool remove_successor( receiver &r ) { successors().remove_successor( r ); return true; } #if TBB_PREVIEW_FLOW_GRAPH_FEATURES /*override*/ void internal_add_built_successor( receiver &r) { successors().internal_add_built_successor( r ); } /*override*/ void internal_delete_built_successor( receiver &r) { successors().internal_delete_built_successor( r ); } /*override*/ size_t successor_count() { return successors().successor_count(); } /*override*/ void copy_successors( successor_vector_type &v) { successors().copy_successors(v); } #endif /* TBB_PREVIEW_FLOW_GRAPH_FEATURES */ // for multifunction_node. The function_body that implements // the node will have an input and an output tuple of ports. To put // an item to a successor, the body should // // get(output_ports).try_put(output_value); // // return value will be bool returned from successors.try_put. task *try_put_task(const output_type &i) { return my_successors.try_put_task(i); } protected: broadcast_cache_type my_successors; broadcast_cache_type &successors() { return my_successors; } }; // function_output template< typename Output > class multifunction_output : public function_output { public: typedef Output output_type; typedef function_output base_type; using base_type::my_successors; multifunction_output() : base_type() {my_successors.set_owner(this);} multifunction_output( const multifunction_output &/*other*/) : base_type() { my_successors.set_owner(this); } bool try_put(const output_type &i) { task *res = my_successors.try_put_task(i); if(!res) return false; if(res != SUCCESSFULLY_ENQUEUED) FLOW_SPAWN(*res); return true; } }; // multifunction_output } // internal #endif // __TBB__flow_graph_node_impl_H ================================================ FILE: benchmarks/tbb/internal/_flow_graph_tagged_buffer_impl.h ================================================ /* Copyright 2005-2014 Intel Corporation. All Rights Reserved. This file is part of Threading Building Blocks. Threading Building Blocks is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. Threading Building Blocks is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Threading Building Blocks; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA As a special exception, you may use this file as part of a free software library without restriction. Specifically, if other files instantiate templates or use macros or inline functions from this file, or you compile this file and link it with other files to produce an executable, this file does not by itself cause the resulting executable to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the executable file might be covered by the GNU General Public License. */ // tagged buffer that can expand, and can support as many deletions as additions // list-based, with elements of list held in array (for destruction management), // multiplicative hashing (like ets). No synchronization built-in. // #ifndef __TBB__flow_graph_tagged_buffer_impl_H #define __TBB__flow_graph_tagged_buffer_impl_H #ifndef __TBB_flow_graph_H #error Do not #include this internal file directly; use public TBB headers instead. #endif // included in namespace tbb::flow::interface7::internal template struct otherData { T t; U next; otherData() : t(NoTagMark), next(NULL) {} }; template struct buffer_element_type { // the second parameter below is void * because we can't forward-declare the type // itself, so we just reinterpret_cast below. typedef typename aligned_pair >::type type; }; template < typename TagType, typename ValueType, size_t NoTagMark = 0, typename Allocator=tbb::cache_aligned_allocator< typename buffer_element_type::type > > class tagged_buffer { public: static const size_t INITIAL_SIZE = 8; // initial size of the hash pointer table static const TagType NO_TAG = TagType(NoTagMark); typedef ValueType value_type; typedef typename buffer_element_type::type element_type; typedef value_type *pointer_type; typedef element_type *list_array_type; // array we manage manually typedef list_array_type *pointer_array_type; typedef typename Allocator::template rebind::other pointer_array_allocator_type; typedef typename Allocator::template rebind::other elements_array_allocator; private: size_t my_size; size_t nelements; pointer_array_type pointer_array; // pointer_array[my_size] list_array_type elements_array; // elements_array[my_size / 2] element_type* free_list; size_t mask() { return my_size - 1; } static size_t hash(TagType t) { return uintptr_t(t)*tbb::internal::select_size_t_constant<0x9E3779B9,0x9E3779B97F4A7C15ULL>::value; } void set_up_free_list( element_type **p_free_list, list_array_type la, size_t sz) { for(size_t i=0; i < sz - 1; ++i ) { // construct free list la[i].second.next = &(la[i+1]); la[i].second.t = NO_TAG; } la[sz-1].second.next = NULL; *p_free_list = &(la[0]); } // cleanup for exceptions struct DoCleanup { pointer_array_type *my_pa; list_array_type *my_elements; size_t my_size; DoCleanup(pointer_array_type &pa, list_array_type &my_els, size_t sz) : my_pa(&pa), my_elements(&my_els), my_size(sz) { } ~DoCleanup() { if(my_pa) { size_t dont_care = 0; internal_free_buffer(*my_pa, *my_elements, my_size, dont_care); } } }; // exception-safety requires we do all the potentially-throwing operations first void grow_array() { size_t new_size = my_size*2; size_t new_nelements = nelements; // internal_free_buffer zeroes this list_array_type new_elements_array = NULL; pointer_array_type new_pointer_array = NULL; list_array_type new_free_list = NULL; { DoCleanup my_cleanup(new_pointer_array, new_elements_array, new_size); new_elements_array = elements_array_allocator().allocate(my_size); new_pointer_array = pointer_array_allocator_type().allocate(new_size); for(size_t i=0; i < new_size; ++i) new_pointer_array[i] = NULL; set_up_free_list(&new_free_list, new_elements_array, my_size ); for(size_t i=0; i < my_size; ++i) { for( element_type* op = pointer_array[i]; op; op = (element_type *)(op->second.next)) { value_type *ov = reinterpret_cast(&(op->first)); // could have std::move semantics internal_tagged_insert(new_pointer_array, new_size, new_free_list, op->second.t, *ov); } } my_cleanup.my_pa = NULL; my_cleanup.my_elements = NULL; } internal_free_buffer(pointer_array, elements_array, my_size, nelements); free_list = new_free_list; pointer_array = new_pointer_array; elements_array = new_elements_array; my_size = new_size; nelements = new_nelements; } // v should have perfect forwarding if std::move implemented. // we use this method to move elements in grow_array, so can't use class fields void internal_tagged_insert( element_type **p_pointer_array, size_t p_sz, list_array_type &p_free_list, const TagType t, const value_type &v) { size_t l_mask = p_sz-1; size_t h = hash(t) & l_mask; __TBB_ASSERT(p_free_list, "Error: free list not set up."); element_type* my_elem = p_free_list; p_free_list = (element_type *)(p_free_list->second.next); my_elem->second.t = t; (void) new(&(my_elem->first)) value_type(v); my_elem->second.next = p_pointer_array[h]; p_pointer_array[h] = my_elem; } void internal_initialize_buffer() { pointer_array = pointer_array_allocator_type().allocate(my_size); for(size_t i = 0; i < my_size; ++i) pointer_array[i] = NULL; elements_array = elements_array_allocator().allocate(my_size / 2); set_up_free_list(&free_list, elements_array, my_size / 2); } // made static so an enclosed class can use to properly dispose of the internals static void internal_free_buffer( pointer_array_type &pa, list_array_type &el, size_t &sz, size_t &ne ) { if(pa) { for(size_t i = 0; i < sz; ++i ) { element_type *p_next; for( element_type *p = pa[i]; p; p = p_next) { p_next = (element_type *)p->second.next; value_type *vp = reinterpret_cast(&(p->first)); vp->~value_type(); } } pointer_array_allocator_type().deallocate(pa, sz); pa = NULL; } // Separate test (if allocation of pa throws, el may be allocated. // but no elements will be constructed.) if(el) { elements_array_allocator().deallocate(el, sz / 2); el = NULL; } sz = INITIAL_SIZE; ne = 0; } public: tagged_buffer() : my_size(INITIAL_SIZE), nelements(0) { internal_initialize_buffer(); } ~tagged_buffer() { internal_free_buffer(pointer_array, elements_array, my_size, nelements); } void reset() { internal_free_buffer(pointer_array, elements_array, my_size, nelements); internal_initialize_buffer(); } bool tagged_insert(const TagType t, const value_type &v) { pointer_type p; if(tagged_find_ref(t, p)) { p->~value_type(); (void) new(p) value_type(v); // copy-construct into the space return false; } ++nelements; if(nelements*2 > my_size) grow_array(); internal_tagged_insert(pointer_array, my_size, free_list, t, v); return true; } // returns reference to array element.v bool tagged_find_ref(const TagType t, pointer_type &v) { size_t i = hash(t) & mask(); for(element_type* p = pointer_array[i]; p; p = (element_type *)(p->second.next)) { if(p->second.t == t) { v = reinterpret_cast(&(p->first)); return true; } } return false; } bool tagged_find( const TagType t, value_type &v) { value_type *p; if(tagged_find_ref(t, p)) { v = *p; return true; } else return false; } void tagged_delete(const TagType t) { size_t h = hash(t) & mask(); element_type* prev = NULL; for(element_type* p = pointer_array[h]; p; prev = p, p = (element_type *)(p->second.next)) { if(p->second.t == t) { value_type *vp = reinterpret_cast(&(p->first)); vp->~value_type(); p->second.t = NO_TAG; if(prev) prev->second.next = p->second.next; else pointer_array[h] = (element_type *)(p->second.next); p->second.next = free_list; free_list = p; --nelements; return; } } __TBB_ASSERT(false, "tag not found for delete"); } }; #endif // __TBB__flow_graph_tagged_buffer_impl_H ================================================ FILE: benchmarks/tbb/internal/_flow_graph_trace_impl.h ================================================ /* Copyright 2005-2014 Intel Corporation. All Rights Reserved. This file is part of Threading Building Blocks. Threading Building Blocks is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. Threading Building Blocks is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Threading Building Blocks; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA As a special exception, you may use this file as part of a free software library without restriction. Specifically, if other files instantiate templates or use macros or inline functions from this file, or you compile this file and link it with other files to produce an executable, this file does not by itself cause the resulting executable to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the executable file might be covered by the GNU General Public License. */ #ifndef _FGT_GRAPH_TRACE_IMPL_H #define _FGT_GRAPH_TRACE_IMPL_H #include "../tbb_profiling.h" namespace tbb { namespace internal { #if TBB_PREVIEW_FLOW_GRAPH_TRACE static inline void fgt_internal_create_input_port( void *node, void *p, string_index name_index ) { itt_make_task_group( ITT_DOMAIN_FLOW, p, FLOW_INPUT_PORT, node, FLOW_NODE, name_index ); } static inline void fgt_internal_create_output_port( void *node, void *p, string_index name_index ) { itt_make_task_group( ITT_DOMAIN_FLOW, p, FLOW_OUTPUT_PORT, node, FLOW_NODE, name_index ); } template < typename TypesTuple, typename PortsTuple, int N > struct fgt_internal_input_helper { static void register_port( void *node, PortsTuple &ports ) { fgt_internal_create_input_port( node, (void*)static_cast< tbb::flow::interface7::receiver< typename tbb::flow::tuple_element::type > * >(&(tbb::flow::get(ports))), static_cast(FLOW_INPUT_PORT_0 + N - 1) ); fgt_internal_input_helper::register_port( node, ports ); } }; template < typename TypesTuple, typename PortsTuple > struct fgt_internal_input_helper { static void register_port( void *node, PortsTuple &ports ) { fgt_internal_create_input_port( node, (void*)static_cast< tbb::flow::interface7::receiver< typename tbb::flow::tuple_element<0,TypesTuple>::type > * >(&(tbb::flow::get<0>(ports))), FLOW_INPUT_PORT_0 ); } }; template < typename TypesTuple, typename PortsTuple, int N > struct fgt_internal_output_helper { static void register_port( void *node, PortsTuple &ports ) { fgt_internal_create_output_port( node, (void*)static_cast< tbb::flow::interface7::sender< typename tbb::flow::tuple_element::type > * >(&(tbb::flow::get(ports))), static_cast(FLOW_OUTPUT_PORT_0 + N - 1) ); fgt_internal_output_helper::register_port( node, ports ); } }; template < typename TypesTuple, typename PortsTuple > struct fgt_internal_output_helper { static void register_port( void *node, PortsTuple &ports ) { fgt_internal_create_output_port( node, (void*)static_cast< tbb::flow::interface7::sender< typename tbb::flow::tuple_element<0,TypesTuple>::type > * >(&(tbb::flow::get<0>(ports))), FLOW_OUTPUT_PORT_0 ); } }; template< typename NodeType > void fgt_multioutput_node_desc( const NodeType *node, const char *desc ) { void *addr = (void *)( static_cast< tbb::flow::interface7::receiver< typename NodeType::input_type > * >(const_cast< NodeType *>(node)) ); itt_metadata_str_add( ITT_DOMAIN_FLOW, addr, FLOW_NODE, FLOW_OBJECT_NAME, desc ); } template< typename NodeType > static inline void fgt_node_desc( const NodeType *node, const char *desc ) { void *addr = (void *)( static_cast< tbb::flow::interface7::sender< typename NodeType::output_type > * >(const_cast< NodeType *>(node)) ); itt_metadata_str_add( ITT_DOMAIN_FLOW, addr, FLOW_NODE, FLOW_OBJECT_NAME, desc ); } static inline void fgt_graph_desc( void *g, const char *desc ) { itt_metadata_str_add( ITT_DOMAIN_FLOW, g, FLOW_GRAPH, FLOW_OBJECT_NAME, desc ); } static inline void fgt_body( void *node, void *body ) { itt_relation_add( ITT_DOMAIN_FLOW, body, FLOW_BODY, __itt_relation_is_child_of, node, FLOW_NODE ); } template< typename OutputTuple, int N, typename PortsTuple > static inline void fgt_multioutput_node( string_index t, void *g, void *input_port, PortsTuple &ports ) { itt_make_task_group( ITT_DOMAIN_FLOW, input_port, FLOW_NODE, g, FLOW_GRAPH, t ); fgt_internal_create_input_port( input_port, input_port, FLOW_INPUT_PORT_0 ); fgt_internal_output_helper::register_port( input_port, ports ); } template< typename OutputTuple, int N, typename PortsTuple > static inline void fgt_multioutput_node_with_body( string_index t, void *g, void *input_port, PortsTuple &ports, void *body ) { itt_make_task_group( ITT_DOMAIN_FLOW, input_port, FLOW_NODE, g, FLOW_GRAPH, t ); fgt_internal_create_input_port( input_port, input_port, FLOW_INPUT_PORT_0 ); fgt_internal_output_helper::register_port( input_port, ports ); fgt_body( input_port, body ); } template< typename InputTuple, int N, typename PortsTuple > static inline void fgt_multiinput_node( string_index t, void *g, PortsTuple &ports, void *output_port) { itt_make_task_group( ITT_DOMAIN_FLOW, output_port, FLOW_NODE, g, FLOW_GRAPH, t ); fgt_internal_create_output_port( output_port, output_port, FLOW_OUTPUT_PORT_0 ); fgt_internal_input_helper::register_port( output_port, ports ); } static inline void fgt_node( string_index t, void *g, void *output_port ) { itt_make_task_group( ITT_DOMAIN_FLOW, output_port, FLOW_NODE, g, FLOW_GRAPH, t ); fgt_internal_create_output_port( output_port, output_port, FLOW_OUTPUT_PORT_0 ); } static inline void fgt_node_with_body( string_index t, void *g, void *output_port, void *body ) { itt_make_task_group( ITT_DOMAIN_FLOW, output_port, FLOW_NODE, g, FLOW_GRAPH, t ); fgt_internal_create_output_port( output_port, output_port, FLOW_OUTPUT_PORT_0 ); fgt_body( output_port, body ); } static inline void fgt_node( string_index t, void *g, void *input_port, void *output_port ) { fgt_node( t, g, output_port ); fgt_internal_create_input_port( output_port, input_port, FLOW_INPUT_PORT_0 ); } static inline void fgt_node_with_body( string_index t, void *g, void *input_port, void *output_port, void *body ) { fgt_node_with_body( t, g, output_port, body ); fgt_internal_create_input_port( output_port, input_port, FLOW_INPUT_PORT_0 ); } static inline void fgt_node( string_index t, void *g, void *input_port, void *decrement_port, void *output_port ) { fgt_node( t, g, input_port, output_port ); fgt_internal_create_input_port( output_port, decrement_port, FLOW_INPUT_PORT_1 ); } static inline void fgt_make_edge( void *output_port, void *input_port ) { itt_relation_add( ITT_DOMAIN_FLOW, output_port, FLOW_OUTPUT_PORT, __itt_relation_is_predecessor_to, input_port, FLOW_INPUT_PORT); } static inline void fgt_remove_edge( void *output_port, void *input_port ) { itt_relation_add( ITT_DOMAIN_FLOW, output_port, FLOW_OUTPUT_PORT, __itt_relation_is_sibling_of, input_port, FLOW_INPUT_PORT); } static inline void fgt_graph( void *g ) { itt_make_task_group( ITT_DOMAIN_FLOW, g, FLOW_GRAPH, NULL, FLOW_NULL, FLOW_GRAPH ); } static inline void fgt_begin_body( void *body ) { itt_task_begin( ITT_DOMAIN_FLOW, body, FLOW_BODY, NULL, FLOW_NULL, FLOW_NULL ); } static inline void fgt_end_body( void * ) { itt_task_end( ITT_DOMAIN_FLOW ); } #else // TBB_PREVIEW_FLOW_GRAPH_TRACE static inline void fgt_graph( void * /*g*/ ) { } template< typename NodeType > static inline void fgt_multioutput_node_desc( const NodeType * /*node*/, const char * /*desc*/ ) { } template< typename NodeType > static inline void fgt_node_desc( const NodeType * /*node*/, const char * /*desc*/ ) { } static inline void fgt_graph_desc( void * /*g*/, const char * /*desc*/ ) { } static inline void fgt_body( void * /*node*/, void * /*body*/ ) { } template< typename OutputTuple, int N, typename PortsTuple > static inline void fgt_multioutput_node( string_index /*t*/, void * /*g*/, void * /*input_port*/, PortsTuple & /*ports*/ ) { } template< typename OutputTuple, int N, typename PortsTuple > static inline void fgt_multioutput_node_with_body( string_index /*t*/, void * /*g*/, void * /*input_port*/, PortsTuple & /*ports*/, void * /*body*/ ) { } template< typename InputTuple, int N, typename PortsTuple > static inline void fgt_multiinput_node( string_index /*t*/, void * /*g*/, PortsTuple & /*ports*/, void * /*output_port*/ ) { } static inline void fgt_node( string_index /*t*/, void * /*g*/, void * /*output_port*/ ) { } static inline void fgt_node( string_index /*t*/, void * /*g*/, void * /*input_port*/, void * /*output_port*/ ) { } static inline void fgt_node( string_index /*t*/, void * /*g*/, void * /*input_port*/, void * /*decrement_port*/, void * /*output_port*/ ) { } static inline void fgt_node_with_body( string_index /*t*/, void * /*g*/, void * /*output_port*/, void * /*body*/ ) { } static inline void fgt_node_with_body( string_index /*t*/, void * /*g*/, void * /*input_port*/, void * /*output_port*/, void * /*body*/ ) { } static inline void fgt_make_edge( void * /*output_port*/, void * /*input_port*/ ) { } static inline void fgt_remove_edge( void * /*output_port*/, void * /*input_port*/ ) { } static inline void fgt_begin_body( void * /*body*/ ) { } static inline void fgt_end_body( void * /*body*/) { } #endif // TBB_PREVIEW_FLOW_GRAPH_TRACE } // namespace internal } // namespace tbb #endif ================================================ FILE: benchmarks/tbb/internal/_flow_graph_types_impl.h ================================================ /* Copyright 2005-2014 Intel Corporation. All Rights Reserved. This file is part of Threading Building Blocks. Threading Building Blocks is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. Threading Building Blocks is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Threading Building Blocks; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA As a special exception, you may use this file as part of a free software library without restriction. Specifically, if other files instantiate templates or use macros or inline functions from this file, or you compile this file and link it with other files to produce an executable, this file does not by itself cause the resulting executable to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the executable file might be covered by the GNU General Public License. */ #ifndef __TBB__flow_graph_types_impl_H #define __TBB__flow_graph_types_impl_H #ifndef __TBB_flow_graph_H #error Do not #include this internal file directly; use public TBB headers instead. #endif // included in namespace tbb::flow::interface7 namespace internal { // wrap each element of a tuple in a template, and make a tuple of the result. template class PT, typename TypeTuple> struct wrap_tuple_elements; template class PT, typename TypeTuple> struct wrap_tuple_elements<1, PT, TypeTuple> { typedef typename tbb::flow::tuple< PT::type> > type; }; template class PT, typename TypeTuple> struct wrap_tuple_elements<2, PT, TypeTuple> { typedef typename tbb::flow::tuple< PT::type>, PT::type> > type; }; template class PT, typename TypeTuple> struct wrap_tuple_elements<3, PT, TypeTuple> { typedef typename tbb::flow::tuple< PT::type>, PT::type>, PT::type> > type; }; template class PT, typename TypeTuple> struct wrap_tuple_elements<4, PT, TypeTuple> { typedef typename tbb::flow::tuple< PT::type>, PT::type>, PT::type>, PT::type> > type; }; template class PT, typename TypeTuple> struct wrap_tuple_elements<5, PT, TypeTuple> { typedef typename tbb::flow::tuple< PT::type>, PT::type>, PT::type>, PT::type>, PT::type> > type; }; #if __TBB_VARIADIC_MAX >= 6 template class PT, typename TypeTuple> struct wrap_tuple_elements<6, PT, TypeTuple> { typedef typename tbb::flow::tuple< PT::type>, PT::type>, PT::type>, PT::type>, PT::type>, PT::type> > type; }; #endif #if __TBB_VARIADIC_MAX >= 7 template class PT, typename TypeTuple> struct wrap_tuple_elements<7, PT, TypeTuple> { typedef typename tbb::flow::tuple< PT::type>, PT::type>, PT::type>, PT::type>, PT::type>, PT::type>, PT::type> > type; }; #endif #if __TBB_VARIADIC_MAX >= 8 template class PT, typename TypeTuple> struct wrap_tuple_elements<8, PT, TypeTuple> { typedef typename tbb::flow::tuple< PT::type>, PT::type>, PT::type>, PT::type>, PT::type>, PT::type>, PT::type>, PT::type> > type; }; #endif #if __TBB_VARIADIC_MAX >= 9 template class PT, typename TypeTuple> struct wrap_tuple_elements<9, PT, TypeTuple> { typedef typename tbb::flow::tuple< PT::type>, PT::type>, PT::type>, PT::type>, PT::type>, PT::type>, PT::type>, PT::type>, PT::type> > type; }; #endif #if __TBB_VARIADIC_MAX >= 10 template class PT, typename TypeTuple> struct wrap_tuple_elements<10, PT, TypeTuple> { typedef typename tbb::flow::tuple< PT::type>, PT::type>, PT::type>, PT::type>, PT::type>, PT::type>, PT::type>, PT::type>, PT::type>, PT::type> > type; }; #endif //! type mimicking std::pair but with trailing fill to ensure each element of an array //* will have the correct alignment template struct type_plus_align { char first[sizeof(T1)]; T2 second; char fill1[REM]; }; template struct type_plus_align { char first[sizeof(T1)]; T2 second; }; template struct alignment_of { typedef struct { char t; U padded; } test_alignment; static const size_t value = sizeof(test_alignment) - sizeof(U); }; // T1, T2 are actual types stored. The space defined for T1 in the type returned // is a char array of the correct size. Type T2 should be trivially-constructible, // T1 must be explicitly managed. template struct aligned_pair { static const size_t t1_align = alignment_of::value; static const size_t t2_align = alignment_of::value; typedef type_plus_align just_pair; static const size_t max_align = t1_align < t2_align ? t2_align : t1_align; static const size_t extra_bytes = sizeof(just_pair) % max_align; static const size_t remainder = extra_bytes ? max_align - extra_bytes : 0; public: typedef type_plus_align type; }; // aligned_pair // support for variant type // type we use when we're not storing a value struct default_constructed { }; // type which contains another type, tests for what type is contained, and references to it. // internal::Wrapper // void CopyTo( void *newSpace) : builds a Wrapper copy of itself in newSpace // struct to allow us to copy and test the type of objects struct WrapperBase { virtual ~WrapperBase() {} virtual void CopyTo(void* /*newSpace*/) const { } }; // Wrapper contains a T, with the ability to test what T is. The Wrapper can be // constructed from a T, can be copy-constructed from another Wrapper, and can be // examined via value(), but not modified. template struct Wrapper: public WrapperBase { typedef T value_type; typedef T* pointer_type; private: T value_space; public: const value_type &value() const { return value_space; } private: Wrapper(); // on exception will ensure the Wrapper will contain only a trivially-constructed object struct _unwind_space { pointer_type space; _unwind_space(pointer_type p) : space(p) {} ~_unwind_space() { if(space) (void) new (space) Wrapper(default_constructed()); } }; public: explicit Wrapper( const T& other ) : value_space(other) { } explicit Wrapper(const Wrapper& other) : value_space(other.value_space) { } /*override*/void CopyTo(void* newSpace) const { _unwind_space guard((pointer_type)newSpace); (void) new(newSpace) Wrapper(value_space); guard.space = NULL; } /*override*/~Wrapper() { } }; // specialization for array objects template struct Wrapper : public WrapperBase { typedef T value_type; typedef T* pointer_type; // space must be untyped. typedef T ArrayType[N]; private: // The space is not of type T[N] because when copy-constructing, it would be // default-initialized and then copied to in some fashion, resulting in two // constructions and one destruction per element. If the type is char[ ], we // placement new into each element, resulting in one construction per element. static const size_t space_size = sizeof(ArrayType) / sizeof(char); char value_space[space_size]; // on exception will ensure the already-built objects will be destructed // (the value_space is a char array, so it is already trivially-destructible.) struct _unwind_class { pointer_type space; int already_built; _unwind_class(pointer_type p) : space(p), already_built(0) {} ~_unwind_class() { if(space) { for(size_t i = already_built; i > 0 ; --i ) space[i-1].~value_type(); (void) new(space) Wrapper(default_constructed()); } } }; public: const ArrayType &value() const { char *vp = const_cast(value_space); return reinterpret_cast(*vp); } private: Wrapper(); public: // have to explicitly construct because other decays to a const value_type* explicit Wrapper(const ArrayType& other) { _unwind_class guard((pointer_type)value_space); pointer_type vp = reinterpret_cast(&value_space); for(size_t i = 0; i < N; ++i ) { (void) new(vp++) value_type(other[i]); ++(guard.already_built); } guard.space = NULL; } explicit Wrapper(const Wrapper& other) : WrapperBase() { // we have to do the heavy lifting to copy contents _unwind_class guard((pointer_type)value_space); pointer_type dp = reinterpret_cast(value_space); pointer_type sp = reinterpret_cast(const_cast(other.value_space)); for(size_t i = 0; i < N; ++i, ++dp, ++sp) { (void) new(dp) value_type(*sp); ++(guard.already_built); } guard.space = NULL; } /*override*/void CopyTo(void* newSpace) const { (void) new(newSpace) Wrapper(*this); // exceptions handled in copy constructor } /*override*/~Wrapper() { // have to destroy explicitly in reverse order pointer_type vp = reinterpret_cast(&value_space); for(size_t i = N; i > 0 ; --i ) vp[i-1].~value_type(); } }; // given a tuple, return the type of the element that has the maximum alignment requirement. // Given a tuple and that type, return the number of elements of the object with the max // alignment requirement that is at least as big as the largest object in the tuple. template struct pick_one; template struct pick_one { typedef T1 type; }; template struct pick_one { typedef T2 type; }; template< template class Selector, typename T1, typename T2 > struct pick_max { typedef typename pick_one< (Selector::value > Selector::value), T1, T2 >::type type; }; template struct size_of { static const int value = sizeof(T); }; template< size_t N, class Tuple, template class Selector > struct pick_tuple_max { typedef typename pick_tuple_max::type LeftMaxType; typedef typename tbb::flow::tuple_element::type ThisType; typedef typename pick_max::type type; }; template< class Tuple, template class Selector > struct pick_tuple_max<0, Tuple, Selector> { typedef typename tbb::flow::tuple_element<0, Tuple>::type type; }; // is the specified type included in a tuple? template struct is_same_type { static const bool value = false; }; template struct is_same_type { static const bool value = true; }; template struct is_element_of { typedef typename tbb::flow::tuple_element::type T_i; static const bool value = is_same_type::value || is_element_of::value; }; template struct is_element_of { typedef typename tbb::flow::tuple_element<0, Tuple>::type T_i; static const bool value = is_same_type::value; }; // allow the construction of types that are listed tuple. If a disallowed type // construction is written, a method involving this type is created. The // type has no definition, so a syntax error is generated. template struct ERROR_Type_Not_allowed_In_Tagged_Msg_Not_Member_Of_Tuple; template struct do_if; template struct do_if { static void construct(void *mySpace, const T& x) { (void) new(mySpace) Wrapper(x); } }; template struct do_if { static void construct(void * /*mySpace*/, const T& x) { // This method is instantiated when the type T does not match any of the // element types in the Tuple in variant. ERROR_Type_Not_allowed_In_Tagged_Msg_Not_Member_Of_Tuple::bad_type(x); } }; // Tuple tells us the allowed types that variant can hold. It determines the alignment of the space in // Wrapper, and how big Wrapper is. // // the object can only be tested for type, and a read-only reference can be fetched by cast_to(). using tbb::internal::punned_cast; struct tagged_null_type {}; template class tagged_msg { typedef tbb::flow::tuple= 6 , T5 #endif #if __TBB_VARIADIC_MAX >= 7 , T6 #endif #if __TBB_VARIADIC_MAX >= 8 , T7 #endif #if __TBB_VARIADIC_MAX >= 9 , T8 #endif #if __TBB_VARIADIC_MAX >= 10 , T9 #endif > Tuple; private: class variant { static const size_t N = tbb::flow::tuple_size::value; typedef typename pick_tuple_max::type AlignType; typedef typename pick_tuple_max::type MaxSizeType; static const size_t MaxNBytes = (sizeof(Wrapper)+sizeof(AlignType)-1); static const size_t MaxNElements = MaxNBytes/sizeof(AlignType); typedef typename tbb::aligned_space SpaceType; SpaceType my_space; static const size_t MaxSize = sizeof(SpaceType); public: variant() { (void) new(&my_space) Wrapper(default_constructed()); } template variant( const T& x ) { do_if::value>::construct(&my_space,x); } variant(const variant& other) { const WrapperBase * h = punned_cast(&(other.my_space)); h->CopyTo(&my_space); } // assignment must destroy and re-create the Wrapper type, as there is no way // to create a Wrapper-to-Wrapper assign even if we find they agree in type. void operator=( const variant& rhs ) { if(&rhs != this) { WrapperBase *h = punned_cast(&my_space); h->~WrapperBase(); const WrapperBase *ch = punned_cast(&(rhs.my_space)); ch->CopyTo(&my_space); } } template const U& variant_cast_to() const { const Wrapper *h = dynamic_cast*>(punned_cast(&my_space)); if(!h) { tbb::internal::throw_exception(tbb::internal::eid_bad_tagged_msg_cast); } return h->value(); } template bool variant_is_a() const { return dynamic_cast*>(punned_cast(&my_space)) != NULL; } bool variant_is_default_constructed() const {return variant_is_a();} ~variant() { WrapperBase *h = punned_cast(&my_space); h->~WrapperBase(); } }; //class variant TagType my_tag; variant my_msg; public: tagged_msg(): my_tag(TagType(~0)), my_msg(){} template tagged_msg(T const &index, R const &value) : my_tag(index), my_msg(value) {} #if __TBB_CONST_REF_TO_ARRAY_TEMPLATE_PARAM_BROKEN template tagged_msg(T const &index, R (&value)[N]) : my_tag(index), my_msg(value) {} #endif void set_tag(TagType const &index) {my_tag = index;} TagType tag() const {return my_tag;} template const V& cast_to() const {return my_msg.template variant_cast_to();} template bool is_a() const {return my_msg.template variant_is_a();} bool is_default_constructed() const {return my_msg.variant_is_default_constructed();} }; //class tagged_msg // template to simplify cast and test for tagged_msg in template contexts template const T& cast_to(V const &v) { return v.template cast_to(); } template bool is_a(V const &v) { return v.template is_a(); } } // namespace internal #endif /* __TBB__flow_graph_types_impl_H */ ================================================ FILE: benchmarks/tbb/internal/_mutex_padding.h ================================================ /* Copyright 2005-2014 Intel Corporation. All Rights Reserved. This file is part of Threading Building Blocks. Threading Building Blocks is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. Threading Building Blocks is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Threading Building Blocks; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA As a special exception, you may use this file as part of a free software library without restriction. Specifically, if other files instantiate templates or use macros or inline functions from this file, or you compile this file and link it with other files to produce an executable, this file does not by itself cause the resulting executable to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the executable file might be covered by the GNU General Public License. */ #ifndef __TBB_mutex_padding_H #define __TBB_mutex_padding_H // wrapper for padding mutexes to be alone on a cache line, without requiring they be allocated // from a pool. Because we allow them to be defined anywhere they must be two cache lines in size. namespace tbb { namespace interface7 { namespace internal { static const size_t cache_line_size = 64; // Pad a mutex to occupy a number of full cache lines sufficient to avoid false sharing // with other data; space overhead is up to 2*cache_line_size-1. template class padded_mutex; template class padded_mutex : tbb::internal::mutex_copy_deprecated_and_disabled { typedef long pad_type; pad_type my_pad[((sizeof(Mutex)+cache_line_size-1)/cache_line_size+1)*cache_line_size/sizeof(pad_type)]; Mutex *impl() { return (Mutex *)((uintptr_t(this)|(cache_line_size-1))+1);} public: static const bool is_rw_mutex = Mutex::is_rw_mutex; static const bool is_recursive_mutex = Mutex::is_recursive_mutex; static const bool is_fair_mutex = Mutex::is_fair_mutex; padded_mutex() { new(impl()) Mutex(); } ~padded_mutex() { impl()->~Mutex(); } //! Represents acquisition of a mutex. class scoped_lock : tbb::internal::no_copy { typename Mutex::scoped_lock my_scoped_lock; public: scoped_lock() : my_scoped_lock() {} scoped_lock( padded_mutex& m ) : my_scoped_lock(*m.impl()) { } ~scoped_lock() { } void acquire( padded_mutex& m ) { my_scoped_lock.acquire(*m.impl()); } bool try_acquire( padded_mutex& m ) { return my_scoped_lock.try_acquire(*m.impl()); } void release() { my_scoped_lock.release(); } }; }; template class padded_mutex : tbb::internal::mutex_copy_deprecated_and_disabled { typedef long pad_type; pad_type my_pad[((sizeof(Mutex)+cache_line_size-1)/cache_line_size+1)*cache_line_size/sizeof(pad_type)]; Mutex *impl() { return (Mutex *)((uintptr_t(this)|(cache_line_size-1))+1);} public: static const bool is_rw_mutex = Mutex::is_rw_mutex; static const bool is_recursive_mutex = Mutex::is_recursive_mutex; static const bool is_fair_mutex = Mutex::is_fair_mutex; padded_mutex() { new(impl()) Mutex(); } ~padded_mutex() { impl()->~Mutex(); } //! Represents acquisition of a mutex. class scoped_lock : tbb::internal::no_copy { typename Mutex::scoped_lock my_scoped_lock; public: scoped_lock() : my_scoped_lock() {} scoped_lock( padded_mutex& m, bool write = true ) : my_scoped_lock(*m.impl(),write) { } ~scoped_lock() { } void acquire( padded_mutex& m, bool write = true ) { my_scoped_lock.acquire(*m.impl(),write); } bool try_acquire( padded_mutex& m, bool write = true ) { return my_scoped_lock.try_acquire(*m.impl(),write); } bool upgrade_to_writer() { return my_scoped_lock.upgrade_to_writer(); } bool downgrade_to_reader() { return my_scoped_lock.downgrade_to_reader(); } void release() { my_scoped_lock.release(); } }; }; } // namespace internal } // namespace interface7 } // namespace tbb #endif /* __TBB_mutex_padding_H */ ================================================ FILE: benchmarks/tbb/internal/_range_iterator.h ================================================ /* Copyright 2005-2014 Intel Corporation. All Rights Reserved. This file is part of Threading Building Blocks. Threading Building Blocks is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. Threading Building Blocks is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Threading Building Blocks; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA As a special exception, you may use this file as part of a free software library without restriction. Specifically, if other files instantiate templates or use macros or inline functions from this file, or you compile this file and link it with other files to produce an executable, this file does not by itself cause the resulting executable to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the executable file might be covered by the GNU General Public License. */ #ifndef __TBB_range_iterator_H #define __TBB_range_iterator_H #include "../tbb_stddef.h" #if __TBB_CPP11_STD_BEGIN_END_PRESENT && __TBB_CPP11_AUTO_PRESENT && __TBB_CPP11_DECLTYPE_PRESENT #include #endif namespace tbb { // iterators to first and last elements of container namespace internal { #if __TBB_CPP11_STD_BEGIN_END_PRESENT && __TBB_CPP11_AUTO_PRESENT && __TBB_CPP11_DECLTYPE_PRESENT using std::begin; using std::end; template auto first(Container& c)-> decltype(begin(c)) {return begin(c);} template auto first(const Container& c)-> decltype(begin(c)) {return begin(c);} template auto last(Container& c)-> decltype(begin(c)) {return end(c);} template auto last(const Container& c)-> decltype(begin(c)) {return end(c);} #else template typename Container::iterator first(Container& c) {return c.begin();} template typename Container::const_iterator first(const Container& c) {return c.begin();} template typename Container::iterator last(Container& c) {return c.end();} template typename Container::const_iterator last(const Container& c) {return c.end();} #endif template T* first(T (&arr) [size]) {return arr;} template T* last(T (&arr) [size]) {return arr + size;} } //namespace internal } //namespace tbb #endif // __TBB_range_iterator_H ================================================ FILE: benchmarks/tbb/internal/_tbb_strings.h ================================================ /* Copyright 2005-2014 Intel Corporation. All Rights Reserved. This file is part of Threading Building Blocks. Threading Building Blocks is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. Threading Building Blocks is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Threading Building Blocks; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA As a special exception, you may use this file as part of a free software library without restriction. Specifically, if other files instantiate templates or use macros or inline functions from this file, or you compile this file and link it with other files to produce an executable, this file does not by itself cause the resulting executable to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the executable file might be covered by the GNU General Public License. */ TBB_STRING_RESOURCE(FLOW_BROADCAST_NODE, "broadcast_node") TBB_STRING_RESOURCE(FLOW_BUFFER_NODE, "buffer_node") TBB_STRING_RESOURCE(FLOW_CONTINUE_NODE, "continue_node") TBB_STRING_RESOURCE(FLOW_FUNCTION_NODE, "function_node") TBB_STRING_RESOURCE(FLOW_JOIN_NODE_QUEUEING, "join_node (queueing)") TBB_STRING_RESOURCE(FLOW_JOIN_NODE_RESERVING, "join_node (reserving)") TBB_STRING_RESOURCE(FLOW_JOIN_NODE_TAG_MATCHING, "join_node (tag_matching)") TBB_STRING_RESOURCE(FLOW_LIMITER_NODE, "limiter_node") TBB_STRING_RESOURCE(FLOW_MULTIFUNCTION_NODE, "multifunction_node") TBB_STRING_RESOURCE(FLOW_OR_NODE, "or_node") //no longer in use, kept for backward compatibilty TBB_STRING_RESOURCE(FLOW_OVERWRITE_NODE, "overwrite_node") TBB_STRING_RESOURCE(FLOW_PRIORITY_QUEUE_NODE, "priority_queue_node") TBB_STRING_RESOURCE(FLOW_QUEUE_NODE, "queue_node") TBB_STRING_RESOURCE(FLOW_SEQUENCER_NODE, "sequencer_node") TBB_STRING_RESOURCE(FLOW_SOURCE_NODE, "source_node") TBB_STRING_RESOURCE(FLOW_SPLIT_NODE, "split_node") TBB_STRING_RESOURCE(FLOW_WRITE_ONCE_NODE, "write_once_node") TBB_STRING_RESOURCE(FLOW_BODY, "body") TBB_STRING_RESOURCE(FLOW_GRAPH, "graph") TBB_STRING_RESOURCE(FLOW_NODE, "node") TBB_STRING_RESOURCE(FLOW_INPUT_PORT, "input_port") TBB_STRING_RESOURCE(FLOW_INPUT_PORT_0, "input_port_0") TBB_STRING_RESOURCE(FLOW_INPUT_PORT_1, "input_port_1") TBB_STRING_RESOURCE(FLOW_INPUT_PORT_2, "input_port_2") TBB_STRING_RESOURCE(FLOW_INPUT_PORT_3, "input_port_3") TBB_STRING_RESOURCE(FLOW_INPUT_PORT_4, "input_port_4") TBB_STRING_RESOURCE(FLOW_INPUT_PORT_5, "input_port_5") TBB_STRING_RESOURCE(FLOW_INPUT_PORT_6, "input_port_6") TBB_STRING_RESOURCE(FLOW_INPUT_PORT_7, "input_port_7") TBB_STRING_RESOURCE(FLOW_INPUT_PORT_8, "input_port_8") TBB_STRING_RESOURCE(FLOW_INPUT_PORT_9, "input_port_9") TBB_STRING_RESOURCE(FLOW_OUTPUT_PORT, "output_port") TBB_STRING_RESOURCE(FLOW_OUTPUT_PORT_0, "output_port_0") TBB_STRING_RESOURCE(FLOW_OUTPUT_PORT_1, "output_port_1") TBB_STRING_RESOURCE(FLOW_OUTPUT_PORT_2, "output_port_2") TBB_STRING_RESOURCE(FLOW_OUTPUT_PORT_3, "output_port_3") TBB_STRING_RESOURCE(FLOW_OUTPUT_PORT_4, "output_port_4") TBB_STRING_RESOURCE(FLOW_OUTPUT_PORT_5, "output_port_5") TBB_STRING_RESOURCE(FLOW_OUTPUT_PORT_6, "output_port_6") TBB_STRING_RESOURCE(FLOW_OUTPUT_PORT_7, "output_port_7") TBB_STRING_RESOURCE(FLOW_OUTPUT_PORT_8, "output_port_8") TBB_STRING_RESOURCE(FLOW_OUTPUT_PORT_9, "output_port_9") TBB_STRING_RESOURCE(FLOW_OBJECT_NAME, "object_name") TBB_STRING_RESOURCE(FLOW_NULL, "null") TBB_STRING_RESOURCE(FLOW_INDEXER_NODE, "indexer_node") ================================================ FILE: benchmarks/tbb/internal/_tbb_windef.h ================================================ /* Copyright 2005-2014 Intel Corporation. All Rights Reserved. This file is part of Threading Building Blocks. Threading Building Blocks is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. Threading Building Blocks is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Threading Building Blocks; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA As a special exception, you may use this file as part of a free software library without restriction. Specifically, if other files instantiate templates or use macros or inline functions from this file, or you compile this file and link it with other files to produce an executable, this file does not by itself cause the resulting executable to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the executable file might be covered by the GNU General Public License. */ #ifndef __TBB_tbb_windef_H #error Do not #include this internal file directly; use public TBB headers instead. #endif /* __TBB_tbb_windef_H */ // Check that the target Windows version has all API calls requried for TBB. // Do not increase the version in condition beyond 0x0500 without prior discussion! #if defined(_WIN32_WINNT) && _WIN32_WINNT<0x0501 #error TBB is unable to run on old Windows versions; _WIN32_WINNT must be 0x0501 or greater. #endif #if !defined(_MT) #error TBB requires linkage with multithreaded C/C++ runtime library. \ Choose multithreaded DLL runtime in project settings, or use /MD[d] compiler switch. #endif // Workaround for the problem with MVSC headers failing to define namespace std namespace std { using ::size_t; using ::ptrdiff_t; } #define __TBB_STRING_AUX(x) #x #define __TBB_STRING(x) __TBB_STRING_AUX(x) // Default setting of TBB_USE_DEBUG #ifdef TBB_USE_DEBUG # if TBB_USE_DEBUG # if !defined(_DEBUG) # pragma message(__FILE__ "(" __TBB_STRING(__LINE__) ") : Warning: Recommend using /MDd if compiling with TBB_USE_DEBUG!=0") # endif # else # if defined(_DEBUG) # pragma message(__FILE__ "(" __TBB_STRING(__LINE__) ") : Warning: Recommend using /MD if compiling with TBB_USE_DEBUG==0") # endif # endif #endif #if (__TBB_BUILD || __TBBMALLOC_BUILD) && !defined(__TBB_NO_IMPLICIT_LINKAGE) #define __TBB_NO_IMPLICIT_LINKAGE 1 #endif #if _MSC_VER #if !__TBB_NO_IMPLICIT_LINKAGE #ifdef __TBB_LIB_NAME #pragma comment(lib, __TBB_STRING(__TBB_LIB_NAME)) #else #ifdef _DEBUG #pragma comment(lib, "tbb_debug.lib") #else #pragma comment(lib, "tbb.lib") #endif #endif #endif #endif ================================================ FILE: benchmarks/tbb/internal/_x86_eliding_mutex_impl.h ================================================ /* Copyright 2005-2014 Intel Corporation. All Rights Reserved. This file is part of Threading Building Blocks. Threading Building Blocks is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. Threading Building Blocks is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Threading Building Blocks; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA As a special exception, you may use this file as part of a free software library without restriction. Specifically, if other files instantiate templates or use macros or inline functions from this file, or you compile this file and link it with other files to produce an executable, this file does not by itself cause the resulting executable to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the executable file might be covered by the GNU General Public License. */ #ifndef __TBB__x86_eliding_mutex_impl_H #define __TBB__x86_eliding_mutex_impl_H #ifndef __TBB_spin_mutex_H #error Do not #include this internal file directly; use public TBB headers instead. #endif #if ( __TBB_x86_32 || __TBB_x86_64 ) namespace tbb { namespace interface7 { namespace internal { template class padded_mutex; //! An eliding lock that occupies a single byte. /** A x86_eliding_mutex is an HLE-enabled spin mutex. It is recommended to put the mutex on a cache line that is not shared by the data it protects. It should be used for locking short critical sections where the lock is contended but the data it protects are not. If zero-initialized, the mutex is considered unheld. @ingroup synchronization */ class x86_eliding_mutex : tbb::internal::mutex_copy_deprecated_and_disabled { //! 0 if lock is released, 1 if lock is acquired. __TBB_atomic_flag flag; friend class padded_mutex; public: //! Construct unacquired lock. /** Equivalent to zero-initialization of *this. */ x86_eliding_mutex() : flag(0) {} // bug in gcc 3.x.x causes syntax error in spite of the friend declaration above. // Make the scoped_lock public in that case. #if __TBB_USE_X86_ELIDING_MUTEX || __TBB_GCC_VERSION < 40000 #else // by default we will not provide the scoped_lock interface. The user // should use the padded version of the mutex. scoped_lock is used in // padded_mutex template. private: #endif // scoped_lock in padded_mutex<> is the interface to use. //! Represents acquisition of a mutex. class scoped_lock : tbb::internal::no_copy { private: //! Points to currently held mutex, or NULL if no lock is held. x86_eliding_mutex* my_mutex; public: //! Construct without acquiring a mutex. scoped_lock() : my_mutex(NULL) {} //! Construct and acquire lock on a mutex. scoped_lock( x86_eliding_mutex& m ) : my_mutex(NULL) { acquire(m); } //! Acquire lock. void acquire( x86_eliding_mutex& m ) { __TBB_ASSERT( !my_mutex, "already holding a lock" ); my_mutex=&m; my_mutex->lock(); } //! Try acquiring lock (non-blocking) /** Return true if lock acquired; false otherwise. */ bool try_acquire( x86_eliding_mutex& m ) { __TBB_ASSERT( !my_mutex, "already holding a lock" ); bool result = m.try_lock(); if( result ) { my_mutex = &m; } return result; } //! Release lock void release() { __TBB_ASSERT( my_mutex, "release on scoped_lock that is not holding a lock" ); my_mutex->unlock(); my_mutex = NULL; } //! Destroy lock. If holding a lock, releases the lock first. ~scoped_lock() { if( my_mutex ) { release(); } } }; #if __TBB_USE_X86_ELIDING_MUTEX || __TBB_GCC_VERSION < 40000 #else public: #endif /* __TBB_USE_X86_ELIDING_MUTEX */ // Mutex traits static const bool is_rw_mutex = false; static const bool is_recursive_mutex = false; static const bool is_fair_mutex = false; // ISO C++0x compatibility methods //! Acquire lock void lock() { __TBB_LockByteElided(flag); } //! Try acquiring lock (non-blocking) /** Return true if lock acquired; false otherwise. */ bool try_lock() { return __TBB_TryLockByteElided(flag); } //! Release lock void unlock() { __TBB_UnlockByteElided( flag ); } }; // end of x86_eliding_mutex } // namespace internal } // namespace interface7 } // namespace tbb #endif /* ( __TBB_x86_32 || __TBB_x86_64 ) */ #endif /* __TBB__x86_eliding_mutex_impl_H */ ================================================ FILE: benchmarks/tbb/internal/_x86_rtm_rw_mutex_impl.h ================================================ /* Copyright 2005-2014 Intel Corporation. All Rights Reserved. This file is part of Threading Building Blocks. Threading Building Blocks is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. Threading Building Blocks is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Threading Building Blocks; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA As a special exception, you may use this file as part of a free software library without restriction. Specifically, if other files instantiate templates or use macros or inline functions from this file, or you compile this file and link it with other files to produce an executable, this file does not by itself cause the resulting executable to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the executable file might be covered by the GNU General Public License. */ #ifndef __TBB__x86_rtm_rw_mutex_impl_H #define __TBB__x86_rtm_rw_mutex_impl_H #ifndef __TBB_spin_rw_mutex_H #error Do not #include this internal file directly; use public TBB headers instead. #endif #if __TBB_TSX_AVAILABLE #include "../tbb_stddef.h" #include "../tbb_machine.h" #include "../tbb_profiling.h" #include "../spin_rw_mutex.h" namespace tbb { namespace interface8 { namespace internal { enum RTM_type { RTM_not_in_mutex, RTM_transacting_reader, RTM_transacting_writer, RTM_real_reader, RTM_real_writer }; static const unsigned long speculation_granularity = 64; //! Fast, unfair, spinning speculation-enabled reader-writer lock with backoff and // writer-preference /** @ingroup synchronization */ class x86_rtm_rw_mutex: private spin_rw_mutex { #if __TBB_USE_X86_RTM_RW_MUTEX || __TBB_GCC_VERSION < 40000 // bug in gcc 3.x.x causes syntax error in spite of the friend declaration below. // Make the scoped_lock public in that case. public: #else private: #endif friend class interface7::internal::padded_mutex; class scoped_lock; // should be private friend class scoped_lock; private: //! @cond INTERNAL //! Internal construct unacquired mutex. void __TBB_EXPORTED_METHOD internal_construct(); //! Internal acquire write lock. // only_speculate == true if we're doing a try_lock, else false. void __TBB_EXPORTED_METHOD internal_acquire_writer(x86_rtm_rw_mutex::scoped_lock&, bool only_speculate=false); //! Internal acquire read lock. // only_speculate == true if we're doing a try_lock, else false. void __TBB_EXPORTED_METHOD internal_acquire_reader(x86_rtm_rw_mutex::scoped_lock&, bool only_speculate=false); //! Internal upgrade reader to become a writer. bool __TBB_EXPORTED_METHOD internal_upgrade( x86_rtm_rw_mutex::scoped_lock& ); //! Out of line code for downgrading a writer to a reader. bool __TBB_EXPORTED_METHOD internal_downgrade( x86_rtm_rw_mutex::scoped_lock& ); //! Internal try_acquire write lock. bool __TBB_EXPORTED_METHOD internal_try_acquire_writer( x86_rtm_rw_mutex::scoped_lock& ); //! Internal release lock. void __TBB_EXPORTED_METHOD internal_release( x86_rtm_rw_mutex::scoped_lock& ); static x86_rtm_rw_mutex* internal_get_mutex( const spin_rw_mutex::scoped_lock& lock ) { return static_cast( lock.internal_get_mutex() ); } static void internal_set_mutex( spin_rw_mutex::scoped_lock& lock, spin_rw_mutex* mtx ) { lock.internal_set_mutex( mtx ); } //! @endcond public: //! Construct unacquired mutex. x86_rtm_rw_mutex() { w_flag = false; #if TBB_USE_THREADING_TOOLS internal_construct(); #endif } #if TBB_USE_ASSERT //! Empty destructor. ~x86_rtm_rw_mutex() {} #endif /* TBB_USE_ASSERT */ // Mutex traits static const bool is_rw_mutex = true; static const bool is_recursive_mutex = false; static const bool is_fair_mutex = false; #if __TBB_USE_X86_RTM_RW_MUTEX || __TBB_GCC_VERSION < 40000 #else // by default we will not provide the scoped_lock interface. The user // should use the padded version of the mutex. scoped_lock is used in // padded_mutex template. private: #endif //! The scoped locking pattern /** It helps to avoid the common problem of forgetting to release lock. It also nicely provides the "node" for queuing locks. */ // Speculation-enabled scoped lock for spin_rw_mutex // The idea is to be able to reuse the acquire/release methods of spin_rw_mutex // and its scoped lock wherever possible. The only way to use a speculative lock is to use // a scoped_lock. (because transaction_state must be local) class scoped_lock : tbb::internal::no_copy { friend class x86_rtm_rw_mutex; spin_rw_mutex::scoped_lock my_scoped_lock; RTM_type transaction_state; public: //! Construct lock that has not acquired a mutex. /** Equivalent to zero-initialization of *this. */ scoped_lock() : my_scoped_lock(), transaction_state(RTM_not_in_mutex) { } //! Acquire lock on given mutex. scoped_lock( x86_rtm_rw_mutex& m, bool write = true ) : my_scoped_lock(), transaction_state(RTM_not_in_mutex) { acquire(m, write); } //! Release lock (if lock is held). ~scoped_lock() { if(transaction_state != RTM_not_in_mutex) release(); } //! Acquire lock on given mutex. void acquire( x86_rtm_rw_mutex& m, bool write = true ) { if( write ) m.internal_acquire_writer(*this); else m.internal_acquire_reader(*this); } //! Release lock void release() { x86_rtm_rw_mutex* mutex = x86_rtm_rw_mutex::internal_get_mutex(my_scoped_lock); __TBB_ASSERT( mutex, "lock is not acquired" ); __TBB_ASSERT( transaction_state!=RTM_not_in_mutex, "lock is not acquired" ); return mutex->internal_release(*this); } //! Upgrade reader to become a writer. /** Returns whether the upgrade happened without releasing and re-acquiring the lock */ bool upgrade_to_writer() { x86_rtm_rw_mutex* mutex = x86_rtm_rw_mutex::internal_get_mutex(my_scoped_lock); __TBB_ASSERT( mutex, "lock is not acquired" ); __TBB_ASSERT( transaction_state==RTM_transacting_reader || transaction_state==RTM_real_reader, "Invalid state for upgrade" ); return mutex->internal_upgrade(*this); } //! Downgrade writer to become a reader. /** Returns whether the downgrade happened without releasing and re-acquiring the lock */ bool downgrade_to_reader() { x86_rtm_rw_mutex* mutex = x86_rtm_rw_mutex::internal_get_mutex(my_scoped_lock); __TBB_ASSERT( mutex, "lock is not acquired" ); __TBB_ASSERT( transaction_state==RTM_transacting_writer || transaction_state==RTM_real_writer, "Invalid state for downgrade" ); return mutex->internal_downgrade(*this); } //! Attempt to acquire mutex. /** returns true if successful. */ bool try_acquire( x86_rtm_rw_mutex& m, bool write = true ) { #if TBB_USE_ASSERT x86_rtm_rw_mutex* mutex = x86_rtm_rw_mutex::internal_get_mutex(my_scoped_lock); __TBB_ASSERT( !mutex, "lock is already acquired" ); #endif // have to assign m to our mutex. // cannot set the mutex, because try_acquire in spin_rw_mutex depends on it being NULL. if(write) return m.internal_try_acquire_writer(*this); // speculatively acquire the lock. If this fails, do try_acquire on the spin_rw_mutex. m.internal_acquire_reader(*this, /*only_speculate=*/true); if(transaction_state == RTM_transacting_reader) return true; if( my_scoped_lock.try_acquire(m, false)) { transaction_state = RTM_real_reader; return true; } return false; } }; // class x86_rtm_rw_mutex::scoped_lock // ISO C++0x compatibility methods not provided because we cannot maintain // state about whether a thread is in a transaction. private: char pad[speculation_granularity-sizeof(spin_rw_mutex)]; // padding // If true, writer holds the spin_rw_mutex. tbb::atomic w_flag; // want this on a separate cache line }; // x86_rtm_rw_mutex } // namespace internal } // namespace interface8 } // namespace tbb #endif /* __TBB_TSX_AVAILABLE */ #endif /* __TBB__x86_rtm_rw_mutex_impl_H */ ================================================ FILE: benchmarks/tbb/intrusive_list.h ================================================ /* Copyright 2005-2014 Intel Corporation. All Rights Reserved. This file is part of Threading Building Blocks. Threading Building Blocks is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. Threading Building Blocks is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Threading Building Blocks; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA As a special exception, you may use this file as part of a free software library without restriction. Specifically, if other files instantiate templates or use macros or inline functions from this file, or you compile this file and link it with other files to produce an executable, this file does not by itself cause the resulting executable to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the executable file might be covered by the GNU General Public License. */ #ifndef _TBB_intrusive_list_H #define _TBB_intrusive_list_H #include "tbb/tbb_stddef.h" namespace tbb { namespace internal { //! Data structure to be inherited by the types that can form intrusive lists. /** Intrusive list is formed by means of the member_intrusive_list template class. Note that type T must derive from intrusive_list_node either publicly or declare instantiation member_intrusive_list as a friend. This class implements a limited subset of std::list interface. **/ struct intrusive_list_node { intrusive_list_node *my_prev_node, *my_next_node; #if TBB_USE_ASSERT intrusive_list_node () { my_prev_node = my_next_node = this; } #endif /* TBB_USE_ASSERT */ }; //! List of element of type T, where T is derived from intrusive_list_node /** The class is not thread safe. **/ template class intrusive_list_base { //! Pointer to the head node intrusive_list_node my_head; //! Number of list elements size_t my_size; static intrusive_list_node& node ( T& item ) { return List::node(item); } static T& item ( intrusive_list_node* node ) { return List::item(node); } template class iterator_impl { Iterator& self () { return *static_cast(this); } //! Node the iterator points to at the moment intrusive_list_node *my_pos; protected: iterator_impl (intrusive_list_node* pos ) : my_pos(pos) {} T& item () const { return intrusive_list_base::item(my_pos); } public: iterator_impl () : my_pos(NULL) {} Iterator& operator = ( const Iterator& it ) { return my_pos = it.my_pos; } Iterator& operator = ( const T& val ) { return my_pos = &node(val); } bool operator == ( const Iterator& it ) const { return my_pos == it.my_pos; } bool operator != ( const Iterator& it ) const { return my_pos != it.my_pos; } Iterator& operator++ () { my_pos = my_pos->my_next_node; return self(); } Iterator& operator-- () { my_pos = my_pos->my_prev_node; return self(); } Iterator operator++ ( int ) { Iterator result = self(); ++(*this); return result; } Iterator operator-- ( int ) { Iterator result = self(); --(*this); return result; } }; // intrusive_list_base::iterator_impl void assert_ok () const { __TBB_ASSERT( (my_head.my_prev_node == &my_head && !my_size) || (my_head.my_next_node != &my_head && my_size >0), "intrusive_list_base corrupted" ); #if TBB_USE_ASSERT >= 2 size_t i = 0; for ( intrusive_list_node *n = my_head.my_next_node; n != &my_head; n = n->my_next_node ) ++i; __TBB_ASSERT( my_size == i, "Wrong size" ); #endif /* TBB_USE_ASSERT >= 2 */ } public: class iterator : public iterator_impl { template friend class intrusive_list_base; public: iterator (intrusive_list_node* pos ) : iterator_impl(pos ) {} iterator () {} T* operator-> () const { return &this->item(); } T& operator* () const { return this->item(); } }; // class iterator class const_iterator : public iterator_impl { template friend class intrusive_list_base; public: const_iterator (const intrusive_list_node* pos ) : iterator_impl(const_cast(pos) ) {} const_iterator () {} const T* operator-> () const { return &this->item(); } const T& operator* () const { return this->item(); } }; // class iterator intrusive_list_base () : my_size(0) { my_head.my_prev_node = &my_head; my_head.my_next_node = &my_head; } bool empty () const { return my_head.my_next_node == &my_head; } size_t size () const { return my_size; } iterator begin () { return iterator(my_head.my_next_node); } iterator end () { return iterator(&my_head); } const_iterator begin () const { return const_iterator(my_head.my_next_node); } const_iterator end () const { return const_iterator(&my_head); } void push_front ( T& val ) { __TBB_ASSERT( node(val).my_prev_node == &node(val) && node(val).my_next_node == &node(val), "Object with intrusive list node can be part of only one intrusive list simultaneously" ); // An object can be part of only one intrusive list at the given moment via the given node member node(val).my_prev_node = &my_head; node(val).my_next_node = my_head.my_next_node; my_head.my_next_node->my_prev_node = &node(val); my_head.my_next_node = &node(val); ++my_size; assert_ok(); } void remove( T& val ) { __TBB_ASSERT( node(val).my_prev_node != &node(val) && node(val).my_next_node != &node(val), "Element to remove is not in the list" ); __TBB_ASSERT( node(val).my_prev_node->my_next_node == &node(val) && node(val).my_next_node->my_prev_node == &node(val), "Element to remove is not in the list" ); --my_size; node(val).my_next_node->my_prev_node = node(val).my_prev_node; node(val).my_prev_node->my_next_node = node(val).my_next_node; #if TBB_USE_ASSERT node(val).my_prev_node = node(val).my_next_node = &node(val); #endif assert_ok(); } iterator erase ( iterator it ) { T& val = *it; ++it; remove( val ); return it; } }; // intrusive_list_base //! Double linked list of items of type T containing a member of type intrusive_list_node. /** NodePtr is a member pointer to the node data field. Class U is either T or a base class of T containing the node member. Default values exist for the sake of a partial specialization working with inheritance case. The list does not have ownership of its items. Its purpose is to avoid dynamic memory allocation when forming lists of existing objects. The class is not thread safe. **/ template class memptr_intrusive_list : public intrusive_list_base, T> { friend class intrusive_list_base, T>; static intrusive_list_node& node ( T& val ) { return val.*NodePtr; } static T& item ( intrusive_list_node* node ) { // Cannot use __TBB_offsetof (and consequently __TBB_get_object_ref) macro // with *NodePtr argument because gcc refuses to interpret pasted "->" and "*" // as member pointer dereferencing operator, and explicit usage of ## in // __TBB_offsetof implementation breaks operations with normal member names. return *reinterpret_cast((char*)node - ((ptrdiff_t)&(reinterpret_cast(0x1000)->*NodePtr) - 0x1000)); } }; // intrusive_list //! Double linked list of items of type T that is derived from intrusive_list_node class. /** The list does not have ownership of its items. Its purpose is to avoid dynamic memory allocation when forming lists of existing objects. The class is not thread safe. **/ template class intrusive_list : public intrusive_list_base, T> { friend class intrusive_list_base, T>; static intrusive_list_node& node ( T& val ) { return val; } static T& item ( intrusive_list_node* node ) { return *static_cast(node); } }; // intrusive_list } // namespace internal } // namespace tbb #endif /* _TBB_intrusive_list_H */ ================================================ FILE: benchmarks/tbb/itt_notify.cpp ================================================ /* Copyright 2005-2014 Intel Corporation. All Rights Reserved. This file is part of Threading Building Blocks. Threading Building Blocks is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. Threading Building Blocks is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Threading Building Blocks; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA As a special exception, you may use this file as part of a free software library without restriction. Specifically, if other files instantiate templates or use macros or inline functions from this file, or you compile this file and link it with other files to produce an executable, this file does not by itself cause the resulting executable to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the executable file might be covered by the GNU General Public License. */ #if DO_ITT_NOTIFY #if _WIN32||_WIN64 #ifndef UNICODE #define UNICODE #endif #else #pragma weak dlopen #pragma weak dlsym #pragma weak dlerror #endif /* WIN */ #if __TBB_BUILD extern "C" void ITT_DoOneTimeInitialization(); #define __itt_init_ittlib_name(x,y) (ITT_DoOneTimeInitialization(), true) #elif __TBBMALLOC_BUILD extern "C" void MallocInitializeITT(); #define __itt_init_ittlib_name(x,y) (MallocInitializeITT(), true) #else #error This file is expected to be used for either TBB or TBB allocator build. #endif // __TBB_BUILD #include "tools_api/ittnotify_static.c" namespace tbb { namespace internal { int __TBB_load_ittnotify() { return __itt_init_ittlib(NULL, // groups for: (__itt_group_id)(__itt_group_sync // prepare/cancel/acquired/releasing | __itt_group_thread // name threads | __itt_group_stitch // stack stitching #if __TBB_CPF_BUILD | __itt_group_structure #endif )); } }} // namespaces #endif /* DO_ITT_NOTIFY */ #define __TBB_NO_IMPLICIT_LINKAGE 1 #include "itt_notify.h" namespace tbb { #if DO_ITT_NOTIFY const tchar *SyncType_GlobalLock = _T("TbbGlobalLock"), *SyncType_Scheduler = _T("%Constant") ; const tchar *SyncObj_SchedulerInitialization = _T("TbbSchedulerInitialization"), *SyncObj_SchedulersList = _T("TbbSchedulersList"), *SyncObj_WorkerLifeCycleMgmt = _T("TBB Scheduler"), *SyncObj_TaskStealingLoop = _T("TBB Scheduler"), *SyncObj_WorkerTaskPool = _T("TBB Scheduler"), *SyncObj_MasterTaskPool = _T("TBB Scheduler"), *SyncObj_TaskPoolSpinning = _T("TBB Scheduler"), *SyncObj_Mailbox = _T("TBB Scheduler"), *SyncObj_TaskReturnList = _T("TBB Scheduler"), *SyncObj_TaskStream = _T("TBB Scheduler"), *SyncObj_ContextsList = _T("TBB Scheduler") ; #endif /* DO_ITT_NOTIFY */ } // namespace tbb ================================================ FILE: benchmarks/tbb/itt_notify.h ================================================ /* Copyright 2005-2014 Intel Corporation. All Rights Reserved. This file is part of Threading Building Blocks. Threading Building Blocks is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. Threading Building Blocks is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Threading Building Blocks; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA As a special exception, you may use this file as part of a free software library without restriction. Specifically, if other files instantiate templates or use macros or inline functions from this file, or you compile this file and link it with other files to produce an executable, this file does not by itself cause the resulting executable to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the executable file might be covered by the GNU General Public License. */ #ifndef _TBB_ITT_NOTIFY #define _TBB_ITT_NOTIFY #include "tbb/tbb_stddef.h" #if DO_ITT_NOTIFY #if _WIN32||_WIN64 #ifndef UNICODE #define UNICODE #endif #endif /* WIN */ #ifndef INTEL_ITTNOTIFY_API_PRIVATE #define INTEL_ITTNOTIFY_API_PRIVATE #endif #include "tools_api/ittnotify.h" #include "tools_api/legacy/ittnotify.h" extern "C" void __itt_fini_ittlib(void); #if _WIN32||_WIN64 #undef _T #undef __itt_event_create #define __itt_event_create __itt_event_createA #endif /* WIN */ #endif /* DO_ITT_NOTIFY */ #if !ITT_CALLER_NULL #define ITT_CALLER_NULL ((__itt_caller)0) #endif namespace tbb { //! Unicode support #if (_WIN32||_WIN64) && !__MINGW32__ //! Unicode character type. Always wchar_t on Windows. /** We do not use typedefs from Windows TCHAR family to keep consistence of TBB coding style. **/ typedef wchar_t tchar; //! Standard Windows macro to markup the string literals. #define _T(string_literal) L ## string_literal #else /* !WIN */ typedef char tchar; //! Standard Windows style macro to markup the string literals. #define _T(string_literal) string_literal #endif /* !WIN */ } // namespace tbb #if DO_ITT_NOTIFY namespace tbb { //! Display names of internal synchronization types extern const tchar *SyncType_GlobalLock, *SyncType_Scheduler; //! Display names of internal synchronization components/scenarios extern const tchar *SyncObj_SchedulerInitialization, *SyncObj_SchedulersList, *SyncObj_WorkerLifeCycleMgmt, *SyncObj_TaskStealingLoop, *SyncObj_WorkerTaskPool, *SyncObj_MasterTaskPool, *SyncObj_TaskPoolSpinning, *SyncObj_Mailbox, *SyncObj_TaskReturnList, *SyncObj_TaskStream, *SyncObj_ContextsList ; namespace internal { void __TBB_EXPORTED_FUNC itt_set_sync_name_v3( void* obj, const tchar* name); } // namespace internal } // namespace tbb // const_cast() is necessary to cast off volatility #define ITT_NOTIFY(name,obj) __itt_notify_##name(const_cast(static_cast(obj))) #define ITT_THREAD_SET_NAME(name) __itt_thread_set_name(name) #define ITT_FINI_ITTLIB() __itt_fini_ittlib() #define ITT_SYNC_CREATE(obj, type, name) __itt_sync_create((void*)(obj), type, name, 2) #define ITT_SYNC_RENAME(obj, name) __itt_sync_rename(obj, name) #define ITT_STACK_CREATE(obj) obj = __itt_stack_caller_create() #if __TBB_TASK_GROUP_CONTEXT #define ITT_STACK(precond, name, obj) (precond) ? __itt_stack_##name(obj) : ((void)0); #else #define ITT_STACK(precond, name, obj) ((void)0) #endif /* !__TBB_TASK_GROUP_CONTEXT */ #else /* !DO_ITT_NOTIFY */ #define ITT_NOTIFY(name,obj) ((void)0) #define ITT_THREAD_SET_NAME(name) ((void)0) #define ITT_FINI_ITTLIB() ((void)0) #define ITT_SYNC_CREATE(obj, type, name) ((void)0) #define ITT_SYNC_RENAME(obj, name) ((void)0) #define ITT_STACK_CREATE(obj) ((void)0) #define ITT_STACK(precond, name, obj) ((void)0) #endif /* !DO_ITT_NOTIFY */ namespace tbb { namespace internal { int __TBB_load_ittnotify(); }} #endif /* _TBB_ITT_NOTIFY */ ================================================ FILE: benchmarks/tbb/lin32-tbb-export.def ================================================ /* Copyright 2005-2014 Intel Corporation. All Rights Reserved. This file is part of Threading Building Blocks. Threading Building Blocks is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. Threading Building Blocks is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Threading Building Blocks; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA As a special exception, you may use this file as part of a free software library without restriction. Specifically, if other files instantiate templates or use macros or inline functions from this file, or you compile this file and link it with other files to produce an executable, this file does not by itself cause the resulting executable to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the executable file might be covered by the GNU General Public License. */ { global: #define __TBB_SYMBOL( sym ) sym; #include "lin32-tbb-export.lst" local: /* TBB symbols */ *3tbb*; *__TBB*; /* ITT symbols */ __itt_*; /* Intel Compiler (libirc) symbols */ __intel_*; _intel_*; get_memcpy_largest_cachelinesize; get_memcpy_largest_cache_size; get_mem_ops_method; init_mem_ops_method; irc__get_msg; irc__print; override_mem_ops_method; set_memcpy_largest_cachelinesize; set_memcpy_largest_cache_size; }; ================================================ FILE: benchmarks/tbb/lin32-tbb-export.lst ================================================ /* Copyright 2005-2014 Intel Corporation. All Rights Reserved. This file is part of Threading Building Blocks. Threading Building Blocks is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. Threading Building Blocks is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Threading Building Blocks; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA As a special exception, you may use this file as part of a free software library without restriction. Specifically, if other files instantiate templates or use macros or inline functions from this file, or you compile this file and link it with other files to produce an executable, this file does not by itself cause the resulting executable to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the executable file might be covered by the GNU General Public License. */ #include "tbb/tbb_config.h" /* cache_aligned_allocator.cpp */ __TBB_SYMBOL( _ZN3tbb8internal12NFS_AllocateEjjPv ) __TBB_SYMBOL( _ZN3tbb8internal15NFS_GetLineSizeEv ) __TBB_SYMBOL( _ZN3tbb8internal8NFS_FreeEPv ) __TBB_SYMBOL( _ZN3tbb8internal23allocate_via_handler_v3Ej ) __TBB_SYMBOL( _ZN3tbb8internal25deallocate_via_handler_v3EPv ) __TBB_SYMBOL( _ZN3tbb8internal17is_malloc_used_v3Ev ) /* task.cpp v3 */ __TBB_SYMBOL( _ZN3tbb4task13note_affinityEt ) __TBB_SYMBOL( _ZN3tbb4task22internal_set_ref_countEi ) __TBB_SYMBOL( _ZN3tbb4task28internal_decrement_ref_countEv ) __TBB_SYMBOL( _ZN3tbb4task22spawn_and_wait_for_allERNS_9task_listE ) __TBB_SYMBOL( _ZN3tbb4task4selfEv ) __TBB_SYMBOL( _ZN3tbb10interface58internal9task_base7destroyERNS_4taskE ) __TBB_SYMBOL( _ZNK3tbb4task26is_owned_by_current_threadEv ) __TBB_SYMBOL( _ZN3tbb8internal19allocate_root_proxy4freeERNS_4taskE ) __TBB_SYMBOL( _ZN3tbb8internal19allocate_root_proxy8allocateEj ) __TBB_SYMBOL( _ZN3tbb8internal28affinity_partitioner_base_v36resizeEj ) __TBB_SYMBOL( _ZNK3tbb8internal20allocate_child_proxy4freeERNS_4taskE ) __TBB_SYMBOL( _ZNK3tbb8internal20allocate_child_proxy8allocateEj ) __TBB_SYMBOL( _ZNK3tbb8internal27allocate_continuation_proxy4freeERNS_4taskE ) __TBB_SYMBOL( _ZNK3tbb8internal27allocate_continuation_proxy8allocateEj ) __TBB_SYMBOL( _ZNK3tbb8internal34allocate_additional_child_of_proxy4freeERNS_4taskE ) __TBB_SYMBOL( _ZNK3tbb8internal34allocate_additional_child_of_proxy8allocateEj ) __TBB_SYMBOL( _ZTIN3tbb4taskE ) __TBB_SYMBOL( _ZTSN3tbb4taskE ) __TBB_SYMBOL( _ZTVN3tbb4taskE ) __TBB_SYMBOL( _ZN3tbb19task_scheduler_init19default_num_threadsEv ) __TBB_SYMBOL( _ZN3tbb19task_scheduler_init10initializeEij ) __TBB_SYMBOL( _ZN3tbb19task_scheduler_init10initializeEi ) __TBB_SYMBOL( _ZN3tbb19task_scheduler_init9terminateEv ) #if __TBB_SCHEDULER_OBSERVER __TBB_SYMBOL( _ZN3tbb8internal26task_scheduler_observer_v37observeEb ) #endif /* __TBB_SCHEDULER_OBSERVER */ __TBB_SYMBOL( _ZN3tbb10empty_task7executeEv ) __TBB_SYMBOL( _ZN3tbb10empty_taskD0Ev ) __TBB_SYMBOL( _ZN3tbb10empty_taskD1Ev ) __TBB_SYMBOL( _ZTIN3tbb10empty_taskE ) __TBB_SYMBOL( _ZTSN3tbb10empty_taskE ) __TBB_SYMBOL( _ZTVN3tbb10empty_taskE ) #if __TBB_TASK_ARENA /* arena.cpp */ __TBB_SYMBOL( _ZN3tbb10interface78internal15task_arena_base19internal_initializeEv ) __TBB_SYMBOL( _ZN3tbb10interface78internal15task_arena_base18internal_terminateEv ) __TBB_SYMBOL( _ZNK3tbb10interface78internal15task_arena_base16internal_enqueueERNS_4taskEi ) __TBB_SYMBOL( _ZNK3tbb10interface78internal15task_arena_base16internal_executeERNS1_13delegate_baseE ) __TBB_SYMBOL( _ZNK3tbb10interface78internal15task_arena_base13internal_waitEv ) __TBB_SYMBOL( _ZN3tbb10interface78internal15task_arena_base21internal_current_slotEv ) #endif /* __TBB_TASK_ARENA */ #if !TBB_NO_LEGACY /* task_v2.cpp */ __TBB_SYMBOL( _ZN3tbb4task7destroyERS0_ ) #endif /* !TBB_NO_LEGACY */ /* Exception handling in task scheduler */ #if __TBB_TASK_GROUP_CONTEXT __TBB_SYMBOL( _ZNK3tbb8internal32allocate_root_with_context_proxy8allocateEj ) __TBB_SYMBOL( _ZNK3tbb8internal32allocate_root_with_context_proxy4freeERNS_4taskE ) __TBB_SYMBOL( _ZN3tbb4task12change_groupERNS_18task_group_contextE ) __TBB_SYMBOL( _ZNK3tbb18task_group_context28is_group_execution_cancelledEv ) __TBB_SYMBOL( _ZN3tbb18task_group_context22cancel_group_executionEv ) __TBB_SYMBOL( _ZN3tbb18task_group_context26register_pending_exceptionEv ) __TBB_SYMBOL( _ZN3tbb18task_group_context5resetEv ) __TBB_SYMBOL( _ZN3tbb18task_group_context19capture_fp_settingsEv ) __TBB_SYMBOL( _ZN3tbb18task_group_context4initEv ) __TBB_SYMBOL( _ZN3tbb18task_group_contextD1Ev ) __TBB_SYMBOL( _ZN3tbb18task_group_contextD2Ev ) #if __TBB_TASK_PRIORITY __TBB_SYMBOL( _ZN3tbb18task_group_context12set_priorityENS_10priority_tE ) __TBB_SYMBOL( _ZNK3tbb18task_group_context8priorityEv ) #endif /* __TBB_TASK_PRIORITY */ __TBB_SYMBOL( _ZNK3tbb18captured_exception4nameEv ) __TBB_SYMBOL( _ZNK3tbb18captured_exception4whatEv ) __TBB_SYMBOL( _ZN3tbb18captured_exception10throw_selfEv ) __TBB_SYMBOL( _ZN3tbb18captured_exception3setEPKcS2_ ) __TBB_SYMBOL( _ZN3tbb18captured_exception4moveEv ) __TBB_SYMBOL( _ZN3tbb18captured_exception5clearEv ) __TBB_SYMBOL( _ZN3tbb18captured_exception7destroyEv ) __TBB_SYMBOL( _ZN3tbb18captured_exception8allocateEPKcS2_ ) __TBB_SYMBOL( _ZN3tbb18captured_exceptionD0Ev ) __TBB_SYMBOL( _ZN3tbb18captured_exceptionD1Ev ) __TBB_SYMBOL( _ZN3tbb18captured_exceptionD2Ev ) __TBB_SYMBOL( _ZTIN3tbb18captured_exceptionE ) __TBB_SYMBOL( _ZTSN3tbb18captured_exceptionE ) __TBB_SYMBOL( _ZTVN3tbb18captured_exceptionE ) __TBB_SYMBOL( _ZN3tbb13tbb_exceptionD2Ev ) __TBB_SYMBOL( _ZTIN3tbb13tbb_exceptionE ) __TBB_SYMBOL( _ZTSN3tbb13tbb_exceptionE ) __TBB_SYMBOL( _ZTVN3tbb13tbb_exceptionE ) #endif /* __TBB_TASK_GROUP_CONTEXT */ /* Symbols for exceptions thrown from TBB */ __TBB_SYMBOL( _ZN3tbb8internal33throw_bad_last_alloc_exception_v4Ev ) __TBB_SYMBOL( _ZN3tbb8internal18throw_exception_v4ENS0_12exception_idE ) __TBB_SYMBOL( _ZN3tbb14bad_last_allocD0Ev ) __TBB_SYMBOL( _ZN3tbb14bad_last_allocD1Ev ) __TBB_SYMBOL( _ZNK3tbb14bad_last_alloc4whatEv ) __TBB_SYMBOL( _ZTIN3tbb14bad_last_allocE ) __TBB_SYMBOL( _ZTSN3tbb14bad_last_allocE ) __TBB_SYMBOL( _ZTVN3tbb14bad_last_allocE ) __TBB_SYMBOL( _ZN3tbb12missing_waitD0Ev ) __TBB_SYMBOL( _ZN3tbb12missing_waitD1Ev ) __TBB_SYMBOL( _ZNK3tbb12missing_wait4whatEv ) __TBB_SYMBOL( _ZTIN3tbb12missing_waitE ) __TBB_SYMBOL( _ZTSN3tbb12missing_waitE ) __TBB_SYMBOL( _ZTVN3tbb12missing_waitE ) __TBB_SYMBOL( _ZN3tbb27invalid_multiple_schedulingD0Ev ) __TBB_SYMBOL( _ZN3tbb27invalid_multiple_schedulingD1Ev ) __TBB_SYMBOL( _ZNK3tbb27invalid_multiple_scheduling4whatEv ) __TBB_SYMBOL( _ZTIN3tbb27invalid_multiple_schedulingE ) __TBB_SYMBOL( _ZTSN3tbb27invalid_multiple_schedulingE ) __TBB_SYMBOL( _ZTVN3tbb27invalid_multiple_schedulingE ) __TBB_SYMBOL( _ZN3tbb13improper_lockD0Ev ) __TBB_SYMBOL( _ZN3tbb13improper_lockD1Ev ) __TBB_SYMBOL( _ZNK3tbb13improper_lock4whatEv ) __TBB_SYMBOL( _ZTIN3tbb13improper_lockE ) __TBB_SYMBOL( _ZTSN3tbb13improper_lockE ) __TBB_SYMBOL( _ZTVN3tbb13improper_lockE ) __TBB_SYMBOL( _ZN3tbb10user_abortD0Ev ) __TBB_SYMBOL( _ZN3tbb10user_abortD1Ev ) __TBB_SYMBOL( _ZNK3tbb10user_abort4whatEv ) __TBB_SYMBOL( _ZTIN3tbb10user_abortE ) __TBB_SYMBOL( _ZTSN3tbb10user_abortE ) __TBB_SYMBOL( _ZTVN3tbb10user_abortE ) /* tbb_misc.cpp */ __TBB_SYMBOL( _ZN3tbb17assertion_failureEPKciS1_S1_ ) __TBB_SYMBOL( _ZN3tbb21set_assertion_handlerEPFvPKciS1_S1_E ) __TBB_SYMBOL( _ZN3tbb8internal36get_initial_auto_partitioner_divisorEv ) __TBB_SYMBOL( _ZN3tbb8internal13handle_perrorEiPKc ) __TBB_SYMBOL( _ZN3tbb8internal15runtime_warningEPKcz ) #if __TBB_x86_32 __TBB_SYMBOL( __TBB_machine_store8_slow_perf_warning ) __TBB_SYMBOL( __TBB_machine_store8_slow ) #endif __TBB_SYMBOL( TBB_runtime_interface_version ) /* tbb_main.cpp */ __TBB_SYMBOL( _ZN3tbb8internal32itt_load_pointer_with_acquire_v3EPKv ) __TBB_SYMBOL( _ZN3tbb8internal33itt_store_pointer_with_release_v3EPvS1_ ) __TBB_SYMBOL( _ZN3tbb8internal18call_itt_notify_v5EiPv ) __TBB_SYMBOL( _ZN3tbb8internal20itt_set_sync_name_v3EPvPKc ) __TBB_SYMBOL( _ZN3tbb8internal19itt_load_pointer_v3EPKv ) #if __TBB_ITT_STRUCTURE_API __TBB_SYMBOL( _ZN3tbb8internal22itt_make_task_group_v7ENS0_15itt_domain_enumEPvyS2_yNS0_12string_indexE ) __TBB_SYMBOL( _ZN3tbb8internal23itt_metadata_str_add_v7ENS0_15itt_domain_enumEPvyNS0_12string_indexEPKc ) __TBB_SYMBOL( _ZN3tbb8internal19itt_relation_add_v7ENS0_15itt_domain_enumEPvyNS0_12itt_relationES2_y ) __TBB_SYMBOL( _ZN3tbb8internal17itt_task_begin_v7ENS0_15itt_domain_enumEPvyS2_yNS0_12string_indexE ) __TBB_SYMBOL( _ZN3tbb8internal15itt_task_end_v7ENS0_15itt_domain_enumE ) #endif /* pipeline.cpp */ __TBB_SYMBOL( _ZTIN3tbb6filterE ) __TBB_SYMBOL( _ZTSN3tbb6filterE ) __TBB_SYMBOL( _ZTVN3tbb6filterE ) __TBB_SYMBOL( _ZN3tbb6filterD2Ev ) __TBB_SYMBOL( _ZN3tbb8pipeline10add_filterERNS_6filterE ) __TBB_SYMBOL( _ZN3tbb8pipeline12inject_tokenERNS_4taskE ) __TBB_SYMBOL( _ZN3tbb8pipeline13remove_filterERNS_6filterE ) __TBB_SYMBOL( _ZN3tbb8pipeline3runEj ) #if __TBB_TASK_GROUP_CONTEXT __TBB_SYMBOL( _ZN3tbb8pipeline3runEjRNS_18task_group_contextE ) #endif __TBB_SYMBOL( _ZN3tbb8pipeline5clearEv ) __TBB_SYMBOL( _ZN3tbb19thread_bound_filter12process_itemEv ) __TBB_SYMBOL( _ZN3tbb19thread_bound_filter16try_process_itemEv ) __TBB_SYMBOL( _ZTIN3tbb8pipelineE ) __TBB_SYMBOL( _ZTSN3tbb8pipelineE ) __TBB_SYMBOL( _ZTVN3tbb8pipelineE ) __TBB_SYMBOL( _ZN3tbb8pipelineC1Ev ) __TBB_SYMBOL( _ZN3tbb8pipelineC2Ev ) __TBB_SYMBOL( _ZN3tbb8pipelineD0Ev ) __TBB_SYMBOL( _ZN3tbb8pipelineD1Ev ) __TBB_SYMBOL( _ZN3tbb8pipelineD2Ev ) __TBB_SYMBOL( _ZN3tbb6filter16set_end_of_inputEv ) /* queuing_rw_mutex.cpp */ __TBB_SYMBOL( _ZN3tbb16queuing_rw_mutex18internal_constructEv ) __TBB_SYMBOL( _ZN3tbb16queuing_rw_mutex11scoped_lock17upgrade_to_writerEv ) __TBB_SYMBOL( _ZN3tbb16queuing_rw_mutex11scoped_lock19downgrade_to_readerEv ) __TBB_SYMBOL( _ZN3tbb16queuing_rw_mutex11scoped_lock7acquireERS0_b ) __TBB_SYMBOL( _ZN3tbb16queuing_rw_mutex11scoped_lock7releaseEv ) __TBB_SYMBOL( _ZN3tbb16queuing_rw_mutex11scoped_lock11try_acquireERS0_b ) /* reader_writer_lock.cpp */ __TBB_SYMBOL( _ZN3tbb10interface518reader_writer_lock11scoped_lock16internal_destroyEv ) __TBB_SYMBOL( _ZN3tbb10interface518reader_writer_lock11scoped_lock18internal_constructERS1_ ) __TBB_SYMBOL( _ZN3tbb10interface518reader_writer_lock13try_lock_readEv ) __TBB_SYMBOL( _ZN3tbb10interface518reader_writer_lock16scoped_lock_read16internal_destroyEv ) __TBB_SYMBOL( _ZN3tbb10interface518reader_writer_lock16scoped_lock_read18internal_constructERS1_ ) __TBB_SYMBOL( _ZN3tbb10interface518reader_writer_lock16internal_destroyEv ) __TBB_SYMBOL( _ZN3tbb10interface518reader_writer_lock18internal_constructEv ) __TBB_SYMBOL( _ZN3tbb10interface518reader_writer_lock4lockEv ) __TBB_SYMBOL( _ZN3tbb10interface518reader_writer_lock6unlockEv ) __TBB_SYMBOL( _ZN3tbb10interface518reader_writer_lock8try_lockEv ) __TBB_SYMBOL( _ZN3tbb10interface518reader_writer_lock9lock_readEv ) #if !TBB_NO_LEGACY /* spin_rw_mutex.cpp v2 */ __TBB_SYMBOL( _ZN3tbb13spin_rw_mutex16internal_upgradeEPS0_ ) __TBB_SYMBOL( _ZN3tbb13spin_rw_mutex22internal_itt_releasingEPS0_ ) __TBB_SYMBOL( _ZN3tbb13spin_rw_mutex23internal_acquire_readerEPS0_ ) __TBB_SYMBOL( _ZN3tbb13spin_rw_mutex23internal_acquire_writerEPS0_ ) __TBB_SYMBOL( _ZN3tbb13spin_rw_mutex18internal_downgradeEPS0_ ) __TBB_SYMBOL( _ZN3tbb13spin_rw_mutex23internal_release_readerEPS0_ ) __TBB_SYMBOL( _ZN3tbb13spin_rw_mutex23internal_release_writerEPS0_ ) __TBB_SYMBOL( _ZN3tbb13spin_rw_mutex27internal_try_acquire_readerEPS0_ ) __TBB_SYMBOL( _ZN3tbb13spin_rw_mutex27internal_try_acquire_writerEPS0_ ) #endif /* spin_rw_mutex v3 */ __TBB_SYMBOL( _ZN3tbb16spin_rw_mutex_v318internal_constructEv ) __TBB_SYMBOL( _ZN3tbb16spin_rw_mutex_v316internal_upgradeEv ) __TBB_SYMBOL( _ZN3tbb16spin_rw_mutex_v318internal_downgradeEv ) __TBB_SYMBOL( _ZN3tbb16spin_rw_mutex_v323internal_acquire_readerEv ) __TBB_SYMBOL( _ZN3tbb16spin_rw_mutex_v323internal_acquire_writerEv ) __TBB_SYMBOL( _ZN3tbb16spin_rw_mutex_v323internal_release_readerEv ) __TBB_SYMBOL( _ZN3tbb16spin_rw_mutex_v323internal_release_writerEv ) __TBB_SYMBOL( _ZN3tbb16spin_rw_mutex_v327internal_try_acquire_readerEv ) __TBB_SYMBOL( _ZN3tbb16spin_rw_mutex_v327internal_try_acquire_writerEv ) // x86_rtm_rw_mutex.cpp __TBB_SYMBOL( _ZN3tbb10interface88internal16x86_rtm_rw_mutex16internal_releaseERNS2_11scoped_lockE ) __TBB_SYMBOL( _ZN3tbb10interface88internal16x86_rtm_rw_mutex18internal_constructEv ) __TBB_SYMBOL( _ZN3tbb10interface88internal16x86_rtm_rw_mutex23internal_acquire_readerERNS2_11scoped_lockEb ) __TBB_SYMBOL( _ZN3tbb10interface88internal16x86_rtm_rw_mutex23internal_acquire_writerERNS2_11scoped_lockEb ) __TBB_SYMBOL( _ZN3tbb10interface88internal16x86_rtm_rw_mutex16internal_upgradeERNS2_11scoped_lockE ) __TBB_SYMBOL( _ZN3tbb10interface88internal16x86_rtm_rw_mutex18internal_downgradeERNS2_11scoped_lockE ) __TBB_SYMBOL( _ZN3tbb10interface88internal16x86_rtm_rw_mutex27internal_try_acquire_writerERNS2_11scoped_lockE ) /* spin_mutex.cpp */ __TBB_SYMBOL( _ZN3tbb10spin_mutex18internal_constructEv ) __TBB_SYMBOL( _ZN3tbb10spin_mutex11scoped_lock16internal_acquireERS0_ ) __TBB_SYMBOL( _ZN3tbb10spin_mutex11scoped_lock16internal_releaseEv ) __TBB_SYMBOL( _ZN3tbb10spin_mutex11scoped_lock20internal_try_acquireERS0_ ) /* mutex.cpp */ __TBB_SYMBOL( _ZN3tbb5mutex11scoped_lock16internal_acquireERS0_ ) __TBB_SYMBOL( _ZN3tbb5mutex11scoped_lock16internal_releaseEv ) __TBB_SYMBOL( _ZN3tbb5mutex11scoped_lock20internal_try_acquireERS0_ ) __TBB_SYMBOL( _ZN3tbb5mutex16internal_destroyEv ) __TBB_SYMBOL( _ZN3tbb5mutex18internal_constructEv ) /* recursive_mutex.cpp */ __TBB_SYMBOL( _ZN3tbb15recursive_mutex11scoped_lock16internal_acquireERS0_ ) __TBB_SYMBOL( _ZN3tbb15recursive_mutex11scoped_lock16internal_releaseEv ) __TBB_SYMBOL( _ZN3tbb15recursive_mutex11scoped_lock20internal_try_acquireERS0_ ) __TBB_SYMBOL( _ZN3tbb15recursive_mutex16internal_destroyEv ) __TBB_SYMBOL( _ZN3tbb15recursive_mutex18internal_constructEv ) /* QueuingMutex.cpp */ __TBB_SYMBOL( _ZN3tbb13queuing_mutex18internal_constructEv ) __TBB_SYMBOL( _ZN3tbb13queuing_mutex11scoped_lock7acquireERS0_ ) __TBB_SYMBOL( _ZN3tbb13queuing_mutex11scoped_lock7releaseEv ) __TBB_SYMBOL( _ZN3tbb13queuing_mutex11scoped_lock11try_acquireERS0_ ) /* critical_section.cpp */ __TBB_SYMBOL( _ZN3tbb8internal19critical_section_v418internal_constructEv ) #if !TBB_NO_LEGACY /* concurrent_hash_map */ __TBB_SYMBOL( _ZNK3tbb8internal21hash_map_segment_base23internal_grow_predicateEv ) /* concurrent_queue.cpp v2 */ __TBB_SYMBOL( _ZN3tbb8internal21concurrent_queue_base12internal_popEPv ) __TBB_SYMBOL( _ZN3tbb8internal21concurrent_queue_base13internal_pushEPKv ) __TBB_SYMBOL( _ZN3tbb8internal21concurrent_queue_base21internal_set_capacityEij ) __TBB_SYMBOL( _ZN3tbb8internal21concurrent_queue_base23internal_pop_if_presentEPv ) __TBB_SYMBOL( _ZN3tbb8internal21concurrent_queue_base25internal_push_if_not_fullEPKv ) __TBB_SYMBOL( _ZN3tbb8internal21concurrent_queue_baseC2Ej ) __TBB_SYMBOL( _ZN3tbb8internal21concurrent_queue_baseD2Ev ) __TBB_SYMBOL( _ZTIN3tbb8internal21concurrent_queue_baseE ) __TBB_SYMBOL( _ZTSN3tbb8internal21concurrent_queue_baseE ) __TBB_SYMBOL( _ZTVN3tbb8internal21concurrent_queue_baseE ) __TBB_SYMBOL( _ZN3tbb8internal30concurrent_queue_iterator_base6assignERKS1_ ) __TBB_SYMBOL( _ZN3tbb8internal30concurrent_queue_iterator_base7advanceEv ) __TBB_SYMBOL( _ZN3tbb8internal30concurrent_queue_iterator_baseC2ERKNS0_21concurrent_queue_baseE ) __TBB_SYMBOL( _ZN3tbb8internal30concurrent_queue_iterator_baseD2Ev ) __TBB_SYMBOL( _ZNK3tbb8internal21concurrent_queue_base13internal_sizeEv ) #endif /* concurrent_queue v3 */ /* constructors */ __TBB_SYMBOL( _ZN3tbb8internal24concurrent_queue_base_v3C2Ej ) __TBB_SYMBOL( _ZN3tbb8internal33concurrent_queue_iterator_base_v3C2ERKNS0_24concurrent_queue_base_v3E ) __TBB_SYMBOL( _ZN3tbb8internal33concurrent_queue_iterator_base_v3C2ERKNS0_24concurrent_queue_base_v3Ej ) /* destructors */ __TBB_SYMBOL( _ZN3tbb8internal24concurrent_queue_base_v3D2Ev ) __TBB_SYMBOL( _ZN3tbb8internal33concurrent_queue_iterator_base_v3D2Ev ) /* typeinfo */ __TBB_SYMBOL( _ZTIN3tbb8internal24concurrent_queue_base_v3E ) __TBB_SYMBOL( _ZTSN3tbb8internal24concurrent_queue_base_v3E ) /* vtable */ __TBB_SYMBOL( _ZTVN3tbb8internal24concurrent_queue_base_v3E ) /* methods */ __TBB_SYMBOL( _ZN3tbb8internal33concurrent_queue_iterator_base_v37advanceEv ) __TBB_SYMBOL( _ZN3tbb8internal33concurrent_queue_iterator_base_v36assignERKS1_ ) __TBB_SYMBOL( _ZN3tbb8internal24concurrent_queue_base_v313internal_pushEPKv ) __TBB_SYMBOL( _ZN3tbb8internal24concurrent_queue_base_v818internal_push_moveEPKv ) __TBB_SYMBOL( _ZN3tbb8internal24concurrent_queue_base_v325internal_push_if_not_fullEPKv ) __TBB_SYMBOL( _ZN3tbb8internal24concurrent_queue_base_v830internal_push_move_if_not_fullEPKv ) __TBB_SYMBOL( _ZN3tbb8internal24concurrent_queue_base_v312internal_popEPv ) __TBB_SYMBOL( _ZN3tbb8internal24concurrent_queue_base_v323internal_pop_if_presentEPv ) __TBB_SYMBOL( _ZN3tbb8internal24concurrent_queue_base_v314internal_abortEv ) __TBB_SYMBOL( _ZN3tbb8internal24concurrent_queue_base_v321internal_set_capacityEij ) __TBB_SYMBOL( _ZNK3tbb8internal24concurrent_queue_base_v313internal_sizeEv ) __TBB_SYMBOL( _ZNK3tbb8internal24concurrent_queue_base_v314internal_emptyEv ) __TBB_SYMBOL( _ZN3tbb8internal24concurrent_queue_base_v321internal_finish_clearEv ) __TBB_SYMBOL( _ZNK3tbb8internal24concurrent_queue_base_v324internal_throw_exceptionEv ) __TBB_SYMBOL( _ZN3tbb8internal24concurrent_queue_base_v36assignERKS1_ ) __TBB_SYMBOL( _ZN3tbb8internal24concurrent_queue_base_v812move_contentERS1_ ) #if !TBB_NO_LEGACY /* concurrent_vector.cpp v2 */ __TBB_SYMBOL( _ZN3tbb8internal22concurrent_vector_base13internal_copyERKS1_jPFvPvPKvjE ) __TBB_SYMBOL( _ZN3tbb8internal22concurrent_vector_base14internal_clearEPFvPvjEb ) __TBB_SYMBOL( _ZN3tbb8internal22concurrent_vector_base15internal_assignERKS1_jPFvPvjEPFvS4_PKvjESA_ ) __TBB_SYMBOL( _ZN3tbb8internal22concurrent_vector_base16internal_grow_byEjjPFvPvjE ) __TBB_SYMBOL( _ZN3tbb8internal22concurrent_vector_base16internal_reserveEjjj ) __TBB_SYMBOL( _ZN3tbb8internal22concurrent_vector_base18internal_push_backEjRj ) __TBB_SYMBOL( _ZN3tbb8internal22concurrent_vector_base25internal_grow_to_at_leastEjjPFvPvjE ) __TBB_SYMBOL( _ZNK3tbb8internal22concurrent_vector_base17internal_capacityEv ) #endif /* concurrent_vector v3 */ __TBB_SYMBOL( _ZN3tbb8internal25concurrent_vector_base_v313internal_copyERKS1_jPFvPvPKvjE ) __TBB_SYMBOL( _ZN3tbb8internal25concurrent_vector_base_v314internal_clearEPFvPvjE ) __TBB_SYMBOL( _ZN3tbb8internal25concurrent_vector_base_v315internal_assignERKS1_jPFvPvjEPFvS4_PKvjESA_ ) __TBB_SYMBOL( _ZN3tbb8internal25concurrent_vector_base_v316internal_grow_byEjjPFvPvPKvjES4_ ) __TBB_SYMBOL( _ZN3tbb8internal25concurrent_vector_base_v316internal_reserveEjjj ) __TBB_SYMBOL( _ZN3tbb8internal25concurrent_vector_base_v318internal_push_backEjRj ) __TBB_SYMBOL( _ZN3tbb8internal25concurrent_vector_base_v325internal_grow_to_at_leastEjjPFvPvPKvjES4_ ) __TBB_SYMBOL( _ZNK3tbb8internal25concurrent_vector_base_v317internal_capacityEv ) __TBB_SYMBOL( _ZN3tbb8internal25concurrent_vector_base_v316internal_compactEjPvPFvS2_jEPFvS2_PKvjE ) __TBB_SYMBOL( _ZN3tbb8internal25concurrent_vector_base_v313internal_swapERS1_ ) __TBB_SYMBOL( _ZNK3tbb8internal25concurrent_vector_base_v324internal_throw_exceptionEj ) __TBB_SYMBOL( _ZN3tbb8internal25concurrent_vector_base_v3D2Ev ) __TBB_SYMBOL( _ZN3tbb8internal25concurrent_vector_base_v315internal_resizeEjjjPKvPFvPvjEPFvS4_S3_jE ) __TBB_SYMBOL( _ZN3tbb8internal25concurrent_vector_base_v337internal_grow_to_at_least_with_resultEjjPFvPvPKvjES4_ ) /* tbb_thread */ #if __MINGW32__ __TBB_SYMBOL( _ZN3tbb8internal13tbb_thread_v314internal_startEPFjPvES2_ ) #else __TBB_SYMBOL( _ZN3tbb8internal13tbb_thread_v314internal_startEPFPvS2_ES2_ ) #endif __TBB_SYMBOL( _ZN3tbb8internal13tbb_thread_v320hardware_concurrencyEv ) __TBB_SYMBOL( _ZN3tbb8internal13tbb_thread_v34joinEv ) __TBB_SYMBOL( _ZN3tbb8internal13tbb_thread_v36detachEv ) __TBB_SYMBOL( _ZN3tbb8internal15free_closure_v3EPv ) __TBB_SYMBOL( _ZN3tbb8internal15thread_sleep_v3ERKNS_10tick_count10interval_tE ) __TBB_SYMBOL( _ZN3tbb8internal15thread_yield_v3Ev ) __TBB_SYMBOL( _ZN3tbb8internal16thread_get_id_v3Ev ) __TBB_SYMBOL( _ZN3tbb8internal19allocate_closure_v3Ej ) __TBB_SYMBOL( _ZN3tbb8internal7move_v3ERNS0_13tbb_thread_v3ES2_ ) #if __MINGW32__ /* condition_variable */ __TBB_SYMBOL( _ZN3tbb10interface58internal32internal_condition_variable_waitERNS1_14condvar_impl_tEPNS_5mutexEPKNS_10tick_count10interval_tE ) __TBB_SYMBOL( _ZN3tbb10interface58internal35internal_destroy_condition_variableERNS1_14condvar_impl_tE ) __TBB_SYMBOL( _ZN3tbb10interface58internal38internal_condition_variable_notify_allERNS1_14condvar_impl_tE ) __TBB_SYMBOL( _ZN3tbb10interface58internal38internal_condition_variable_notify_oneERNS1_14condvar_impl_tE ) __TBB_SYMBOL( _ZN3tbb10interface58internal38internal_initialize_condition_variableERNS1_14condvar_impl_tE ) #endif #undef __TBB_SYMBOL ================================================ FILE: benchmarks/tbb/lin64-tbb-export.def ================================================ /* Copyright 2005-2014 Intel Corporation. All Rights Reserved. This file is part of Threading Building Blocks. Threading Building Blocks is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. Threading Building Blocks is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Threading Building Blocks; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA As a special exception, you may use this file as part of a free software library without restriction. Specifically, if other files instantiate templates or use macros or inline functions from this file, or you compile this file and link it with other files to produce an executable, this file does not by itself cause the resulting executable to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the executable file might be covered by the GNU General Public License. */ { global: #define __TBB_SYMBOL( sym ) sym; #include "lin64-tbb-export.lst" local: /* TBB symbols */ *3tbb*; *__TBB*; /* ITT symbols */ __itt_*; /* Intel Compiler (libirc) symbols */ __intel_*; _intel_*; get_msg_buf; get_text_buf; message_catalog; print_buf; irc__get_msg; irc__print; }; ================================================ FILE: benchmarks/tbb/lin64-tbb-export.lst ================================================ /* Copyright 2005-2014 Intel Corporation. All Rights Reserved. This file is part of Threading Building Blocks. Threading Building Blocks is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. Threading Building Blocks is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Threading Building Blocks; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA As a special exception, you may use this file as part of a free software library without restriction. Specifically, if other files instantiate templates or use macros or inline functions from this file, or you compile this file and link it with other files to produce an executable, this file does not by itself cause the resulting executable to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the executable file might be covered by the GNU General Public License. */ #include "tbb/tbb_config.h" /* cache_aligned_allocator.cpp */ __TBB_SYMBOL( _ZN3tbb8internal12NFS_AllocateEmmPv ) __TBB_SYMBOL( _ZN3tbb8internal15NFS_GetLineSizeEv ) __TBB_SYMBOL( _ZN3tbb8internal8NFS_FreeEPv ) __TBB_SYMBOL( _ZN3tbb8internal23allocate_via_handler_v3Em ) __TBB_SYMBOL( _ZN3tbb8internal25deallocate_via_handler_v3EPv ) __TBB_SYMBOL( _ZN3tbb8internal17is_malloc_used_v3Ev ) /* task.cpp v3 */ __TBB_SYMBOL( _ZN3tbb4task13note_affinityEt ) __TBB_SYMBOL( _ZN3tbb4task22internal_set_ref_countEi ) __TBB_SYMBOL( _ZN3tbb4task28internal_decrement_ref_countEv ) __TBB_SYMBOL( _ZN3tbb4task22spawn_and_wait_for_allERNS_9task_listE ) __TBB_SYMBOL( _ZN3tbb4task4selfEv ) __TBB_SYMBOL( _ZN3tbb10interface58internal9task_base7destroyERNS_4taskE ) __TBB_SYMBOL( _ZNK3tbb4task26is_owned_by_current_threadEv ) __TBB_SYMBOL( _ZN3tbb8internal19allocate_root_proxy4freeERNS_4taskE ) __TBB_SYMBOL( _ZN3tbb8internal19allocate_root_proxy8allocateEm ) __TBB_SYMBOL( _ZN3tbb8internal28affinity_partitioner_base_v36resizeEj ) __TBB_SYMBOL( _ZNK3tbb8internal20allocate_child_proxy4freeERNS_4taskE ) __TBB_SYMBOL( _ZNK3tbb8internal20allocate_child_proxy8allocateEm ) __TBB_SYMBOL( _ZNK3tbb8internal27allocate_continuation_proxy4freeERNS_4taskE ) __TBB_SYMBOL( _ZNK3tbb8internal27allocate_continuation_proxy8allocateEm ) __TBB_SYMBOL( _ZNK3tbb8internal34allocate_additional_child_of_proxy4freeERNS_4taskE ) __TBB_SYMBOL( _ZNK3tbb8internal34allocate_additional_child_of_proxy8allocateEm ) __TBB_SYMBOL( _ZTIN3tbb4taskE ) __TBB_SYMBOL( _ZTSN3tbb4taskE ) __TBB_SYMBOL( _ZTVN3tbb4taskE ) __TBB_SYMBOL( _ZN3tbb19task_scheduler_init19default_num_threadsEv ) __TBB_SYMBOL( _ZN3tbb19task_scheduler_init10initializeEim ) __TBB_SYMBOL( _ZN3tbb19task_scheduler_init10initializeEi ) __TBB_SYMBOL( _ZN3tbb19task_scheduler_init9terminateEv ) #if __TBB_SCHEDULER_OBSERVER __TBB_SYMBOL( _ZN3tbb8internal26task_scheduler_observer_v37observeEb ) #endif /* __TBB_SCHEDULER_OBSERVER */ __TBB_SYMBOL( _ZN3tbb10empty_task7executeEv ) __TBB_SYMBOL( _ZN3tbb10empty_taskD0Ev ) __TBB_SYMBOL( _ZN3tbb10empty_taskD1Ev ) __TBB_SYMBOL( _ZTIN3tbb10empty_taskE ) __TBB_SYMBOL( _ZTSN3tbb10empty_taskE ) __TBB_SYMBOL( _ZTVN3tbb10empty_taskE ) #if __TBB_TASK_ARENA /* arena.cpp */ __TBB_SYMBOL( _ZN3tbb10interface78internal15task_arena_base19internal_initializeEv ) __TBB_SYMBOL( _ZN3tbb10interface78internal15task_arena_base18internal_terminateEv ) __TBB_SYMBOL( _ZNK3tbb10interface78internal15task_arena_base16internal_enqueueERNS_4taskEl ) __TBB_SYMBOL( _ZNK3tbb10interface78internal15task_arena_base16internal_executeERNS1_13delegate_baseE ) __TBB_SYMBOL( _ZNK3tbb10interface78internal15task_arena_base13internal_waitEv ) __TBB_SYMBOL( _ZN3tbb10interface78internal15task_arena_base21internal_current_slotEv ) #endif /* __TBB_TASK_ARENA */ #if !TBB_NO_LEGACY /* task_v2.cpp */ __TBB_SYMBOL( _ZN3tbb4task7destroyERS0_ ) #endif /* !TBB_NO_LEGACY */ /* Exception handling in task scheduler */ #if __TBB_TASK_GROUP_CONTEXT __TBB_SYMBOL( _ZNK3tbb8internal32allocate_root_with_context_proxy8allocateEm ) __TBB_SYMBOL( _ZNK3tbb8internal32allocate_root_with_context_proxy4freeERNS_4taskE ) __TBB_SYMBOL( _ZN3tbb4task12change_groupERNS_18task_group_contextE ) __TBB_SYMBOL( _ZNK3tbb18task_group_context28is_group_execution_cancelledEv ) __TBB_SYMBOL( _ZN3tbb18task_group_context22cancel_group_executionEv ) __TBB_SYMBOL( _ZN3tbb18task_group_context26register_pending_exceptionEv ) __TBB_SYMBOL( _ZN3tbb18task_group_context5resetEv ) __TBB_SYMBOL( _ZN3tbb18task_group_context19capture_fp_settingsEv ) __TBB_SYMBOL( _ZN3tbb18task_group_context4initEv ) __TBB_SYMBOL( _ZN3tbb18task_group_contextD1Ev ) __TBB_SYMBOL( _ZN3tbb18task_group_contextD2Ev ) #if __TBB_TASK_PRIORITY __TBB_SYMBOL( _ZN3tbb18task_group_context12set_priorityENS_10priority_tE ) __TBB_SYMBOL( _ZNK3tbb18task_group_context8priorityEv ) #endif /* __TBB_TASK_PRIORITY */ __TBB_SYMBOL( _ZNK3tbb18captured_exception4nameEv ) __TBB_SYMBOL( _ZNK3tbb18captured_exception4whatEv ) __TBB_SYMBOL( _ZN3tbb18captured_exception10throw_selfEv ) __TBB_SYMBOL( _ZN3tbb18captured_exception3setEPKcS2_ ) __TBB_SYMBOL( _ZN3tbb18captured_exception4moveEv ) __TBB_SYMBOL( _ZN3tbb18captured_exception5clearEv ) __TBB_SYMBOL( _ZN3tbb18captured_exception7destroyEv ) __TBB_SYMBOL( _ZN3tbb18captured_exception8allocateEPKcS2_ ) __TBB_SYMBOL( _ZN3tbb18captured_exceptionD0Ev ) __TBB_SYMBOL( _ZN3tbb18captured_exceptionD1Ev ) __TBB_SYMBOL( _ZN3tbb18captured_exceptionD2Ev ) __TBB_SYMBOL( _ZTIN3tbb18captured_exceptionE ) __TBB_SYMBOL( _ZTSN3tbb18captured_exceptionE ) __TBB_SYMBOL( _ZTVN3tbb18captured_exceptionE ) __TBB_SYMBOL( _ZN3tbb13tbb_exceptionD2Ev ) __TBB_SYMBOL( _ZTIN3tbb13tbb_exceptionE ) __TBB_SYMBOL( _ZTSN3tbb13tbb_exceptionE ) __TBB_SYMBOL( _ZTVN3tbb13tbb_exceptionE ) #endif /* __TBB_TASK_GROUP_CONTEXT */ /* Symbols for exceptions thrown from TBB */ __TBB_SYMBOL( _ZN3tbb8internal33throw_bad_last_alloc_exception_v4Ev ) __TBB_SYMBOL( _ZN3tbb8internal18throw_exception_v4ENS0_12exception_idE ) __TBB_SYMBOL( _ZN3tbb14bad_last_allocD0Ev ) __TBB_SYMBOL( _ZN3tbb14bad_last_allocD1Ev ) __TBB_SYMBOL( _ZNK3tbb14bad_last_alloc4whatEv ) __TBB_SYMBOL( _ZTIN3tbb14bad_last_allocE ) __TBB_SYMBOL( _ZTSN3tbb14bad_last_allocE ) __TBB_SYMBOL( _ZTVN3tbb14bad_last_allocE ) __TBB_SYMBOL( _ZN3tbb12missing_waitD0Ev ) __TBB_SYMBOL( _ZN3tbb12missing_waitD1Ev ) __TBB_SYMBOL( _ZNK3tbb12missing_wait4whatEv ) __TBB_SYMBOL( _ZTIN3tbb12missing_waitE ) __TBB_SYMBOL( _ZTSN3tbb12missing_waitE ) __TBB_SYMBOL( _ZTVN3tbb12missing_waitE ) __TBB_SYMBOL( _ZN3tbb27invalid_multiple_schedulingD0Ev ) __TBB_SYMBOL( _ZN3tbb27invalid_multiple_schedulingD1Ev ) __TBB_SYMBOL( _ZNK3tbb27invalid_multiple_scheduling4whatEv ) __TBB_SYMBOL( _ZTIN3tbb27invalid_multiple_schedulingE ) __TBB_SYMBOL( _ZTSN3tbb27invalid_multiple_schedulingE ) __TBB_SYMBOL( _ZTVN3tbb27invalid_multiple_schedulingE ) __TBB_SYMBOL( _ZN3tbb13improper_lockD0Ev ) __TBB_SYMBOL( _ZN3tbb13improper_lockD1Ev ) __TBB_SYMBOL( _ZNK3tbb13improper_lock4whatEv ) __TBB_SYMBOL( _ZTIN3tbb13improper_lockE ) __TBB_SYMBOL( _ZTSN3tbb13improper_lockE ) __TBB_SYMBOL( _ZTVN3tbb13improper_lockE ) __TBB_SYMBOL( _ZN3tbb10user_abortD0Ev ) __TBB_SYMBOL( _ZN3tbb10user_abortD1Ev ) __TBB_SYMBOL( _ZNK3tbb10user_abort4whatEv ) __TBB_SYMBOL( _ZTIN3tbb10user_abortE ) __TBB_SYMBOL( _ZTSN3tbb10user_abortE ) __TBB_SYMBOL( _ZTVN3tbb10user_abortE ) /* tbb_misc.cpp */ __TBB_SYMBOL( _ZN3tbb17assertion_failureEPKciS1_S1_ ) __TBB_SYMBOL( _ZN3tbb21set_assertion_handlerEPFvPKciS1_S1_E ) __TBB_SYMBOL( _ZN3tbb8internal36get_initial_auto_partitioner_divisorEv ) __TBB_SYMBOL( _ZN3tbb8internal13handle_perrorEiPKc ) __TBB_SYMBOL( _ZN3tbb8internal15runtime_warningEPKcz ) __TBB_SYMBOL( TBB_runtime_interface_version ) /* tbb_main.cpp */ __TBB_SYMBOL( _ZN3tbb8internal32itt_load_pointer_with_acquire_v3EPKv ) __TBB_SYMBOL( _ZN3tbb8internal33itt_store_pointer_with_release_v3EPvS1_ ) __TBB_SYMBOL( _ZN3tbb8internal18call_itt_notify_v5EiPv ) __TBB_SYMBOL( _ZN3tbb8internal20itt_set_sync_name_v3EPvPKc ) __TBB_SYMBOL( _ZN3tbb8internal19itt_load_pointer_v3EPKv ) #if __TBB_ITT_STRUCTURE_API __TBB_SYMBOL( _ZN3tbb8internal23itt_metadata_str_add_v7ENS0_15itt_domain_enumEPvyNS0_12string_indexEPKc ) __TBB_SYMBOL( _ZN3tbb8internal22itt_make_task_group_v7ENS0_15itt_domain_enumEPvyS2_yNS0_12string_indexE ) __TBB_SYMBOL( _ZN3tbb8internal17itt_task_begin_v7ENS0_15itt_domain_enumEPvyS2_yNS0_12string_indexE ) __TBB_SYMBOL( _ZN3tbb8internal19itt_relation_add_v7ENS0_15itt_domain_enumEPvyNS0_12itt_relationES2_y ) __TBB_SYMBOL( _ZN3tbb8internal15itt_task_end_v7ENS0_15itt_domain_enumE ) #endif /* pipeline.cpp */ __TBB_SYMBOL( _ZTIN3tbb6filterE ) __TBB_SYMBOL( _ZTSN3tbb6filterE ) __TBB_SYMBOL( _ZTVN3tbb6filterE ) __TBB_SYMBOL( _ZN3tbb6filterD2Ev ) __TBB_SYMBOL( _ZN3tbb8pipeline10add_filterERNS_6filterE ) __TBB_SYMBOL( _ZN3tbb8pipeline12inject_tokenERNS_4taskE ) __TBB_SYMBOL( _ZN3tbb8pipeline13remove_filterERNS_6filterE ) __TBB_SYMBOL( _ZN3tbb8pipeline3runEm ) #if __TBB_TASK_GROUP_CONTEXT __TBB_SYMBOL( _ZN3tbb8pipeline3runEmRNS_18task_group_contextE ) #endif __TBB_SYMBOL( _ZN3tbb8pipeline5clearEv ) __TBB_SYMBOL( _ZN3tbb19thread_bound_filter12process_itemEv ) __TBB_SYMBOL( _ZN3tbb19thread_bound_filter16try_process_itemEv ) __TBB_SYMBOL( _ZTIN3tbb8pipelineE ) __TBB_SYMBOL( _ZTSN3tbb8pipelineE ) __TBB_SYMBOL( _ZTVN3tbb8pipelineE ) __TBB_SYMBOL( _ZN3tbb8pipelineC1Ev ) __TBB_SYMBOL( _ZN3tbb8pipelineC2Ev ) __TBB_SYMBOL( _ZN3tbb8pipelineD0Ev ) __TBB_SYMBOL( _ZN3tbb8pipelineD1Ev ) __TBB_SYMBOL( _ZN3tbb8pipelineD2Ev ) __TBB_SYMBOL( _ZN3tbb6filter16set_end_of_inputEv ) /* queuing_rw_mutex.cpp */ __TBB_SYMBOL( _ZN3tbb16queuing_rw_mutex18internal_constructEv ) __TBB_SYMBOL( _ZN3tbb16queuing_rw_mutex11scoped_lock17upgrade_to_writerEv ) __TBB_SYMBOL( _ZN3tbb16queuing_rw_mutex11scoped_lock19downgrade_to_readerEv ) __TBB_SYMBOL( _ZN3tbb16queuing_rw_mutex11scoped_lock7acquireERS0_b ) __TBB_SYMBOL( _ZN3tbb16queuing_rw_mutex11scoped_lock7releaseEv ) __TBB_SYMBOL( _ZN3tbb16queuing_rw_mutex11scoped_lock11try_acquireERS0_b ) /* reader_writer_lock.cpp */ __TBB_SYMBOL( _ZN3tbb10interface518reader_writer_lock11scoped_lock16internal_destroyEv ) __TBB_SYMBOL( _ZN3tbb10interface518reader_writer_lock11scoped_lock18internal_constructERS1_ ) __TBB_SYMBOL( _ZN3tbb10interface518reader_writer_lock13try_lock_readEv ) __TBB_SYMBOL( _ZN3tbb10interface518reader_writer_lock16scoped_lock_read16internal_destroyEv ) __TBB_SYMBOL( _ZN3tbb10interface518reader_writer_lock16scoped_lock_read18internal_constructERS1_ ) __TBB_SYMBOL( _ZN3tbb10interface518reader_writer_lock16internal_destroyEv ) __TBB_SYMBOL( _ZN3tbb10interface518reader_writer_lock18internal_constructEv ) __TBB_SYMBOL( _ZN3tbb10interface518reader_writer_lock4lockEv ) __TBB_SYMBOL( _ZN3tbb10interface518reader_writer_lock6unlockEv ) __TBB_SYMBOL( _ZN3tbb10interface518reader_writer_lock8try_lockEv ) __TBB_SYMBOL( _ZN3tbb10interface518reader_writer_lock9lock_readEv ) #if !TBB_NO_LEGACY /* spin_rw_mutex.cpp v2 */ __TBB_SYMBOL( _ZN3tbb13spin_rw_mutex16internal_upgradeEPS0_ ) __TBB_SYMBOL( _ZN3tbb13spin_rw_mutex22internal_itt_releasingEPS0_ ) __TBB_SYMBOL( _ZN3tbb13spin_rw_mutex23internal_acquire_readerEPS0_ ) __TBB_SYMBOL( _ZN3tbb13spin_rw_mutex23internal_acquire_writerEPS0_ ) __TBB_SYMBOL( _ZN3tbb13spin_rw_mutex18internal_downgradeEPS0_ ) __TBB_SYMBOL( _ZN3tbb13spin_rw_mutex23internal_release_readerEPS0_ ) __TBB_SYMBOL( _ZN3tbb13spin_rw_mutex23internal_release_writerEPS0_ ) __TBB_SYMBOL( _ZN3tbb13spin_rw_mutex27internal_try_acquire_readerEPS0_ ) __TBB_SYMBOL( _ZN3tbb13spin_rw_mutex27internal_try_acquire_writerEPS0_ ) #endif // x86_rtm_rw_mutex.cpp __TBB_SYMBOL( _ZN3tbb10interface88internal16x86_rtm_rw_mutex18internal_constructEv ) __TBB_SYMBOL( _ZN3tbb10interface88internal16x86_rtm_rw_mutex23internal_acquire_writerERNS2_11scoped_lockEb ) __TBB_SYMBOL( _ZN3tbb10interface88internal16x86_rtm_rw_mutex27internal_try_acquire_writerERNS2_11scoped_lockE ) __TBB_SYMBOL( _ZN3tbb10interface88internal16x86_rtm_rw_mutex23internal_acquire_readerERNS2_11scoped_lockEb ) __TBB_SYMBOL( _ZN3tbb10interface88internal16x86_rtm_rw_mutex16internal_releaseERNS2_11scoped_lockE ) __TBB_SYMBOL( _ZN3tbb10interface88internal16x86_rtm_rw_mutex16internal_upgradeERNS2_11scoped_lockE ) __TBB_SYMBOL( _ZN3tbb10interface88internal16x86_rtm_rw_mutex18internal_downgradeERNS2_11scoped_lockE ) /* spin_rw_mutex v3 */ __TBB_SYMBOL( _ZN3tbb16spin_rw_mutex_v318internal_constructEv ) __TBB_SYMBOL( _ZN3tbb16spin_rw_mutex_v316internal_upgradeEv ) __TBB_SYMBOL( _ZN3tbb16spin_rw_mutex_v318internal_downgradeEv ) __TBB_SYMBOL( _ZN3tbb16spin_rw_mutex_v323internal_acquire_readerEv ) __TBB_SYMBOL( _ZN3tbb16spin_rw_mutex_v323internal_acquire_writerEv ) __TBB_SYMBOL( _ZN3tbb16spin_rw_mutex_v323internal_release_readerEv ) __TBB_SYMBOL( _ZN3tbb16spin_rw_mutex_v323internal_release_writerEv ) __TBB_SYMBOL( _ZN3tbb16spin_rw_mutex_v327internal_try_acquire_readerEv ) __TBB_SYMBOL( _ZN3tbb16spin_rw_mutex_v327internal_try_acquire_writerEv ) /* spin_mutex.cpp */ __TBB_SYMBOL( _ZN3tbb10spin_mutex11scoped_lock16internal_acquireERS0_ ) __TBB_SYMBOL( _ZN3tbb10spin_mutex11scoped_lock16internal_releaseEv ) __TBB_SYMBOL( _ZN3tbb10spin_mutex11scoped_lock20internal_try_acquireERS0_ ) __TBB_SYMBOL( _ZN3tbb10spin_mutex18internal_constructEv ) /* mutex.cpp */ __TBB_SYMBOL( _ZN3tbb5mutex11scoped_lock16internal_acquireERS0_ ) __TBB_SYMBOL( _ZN3tbb5mutex11scoped_lock16internal_releaseEv ) __TBB_SYMBOL( _ZN3tbb5mutex11scoped_lock20internal_try_acquireERS0_ ) __TBB_SYMBOL( _ZN3tbb5mutex16internal_destroyEv ) __TBB_SYMBOL( _ZN3tbb5mutex18internal_constructEv ) /* recursive_mutex.cpp */ __TBB_SYMBOL( _ZN3tbb15recursive_mutex11scoped_lock16internal_acquireERS0_ ) __TBB_SYMBOL( _ZN3tbb15recursive_mutex11scoped_lock16internal_releaseEv ) __TBB_SYMBOL( _ZN3tbb15recursive_mutex11scoped_lock20internal_try_acquireERS0_ ) __TBB_SYMBOL( _ZN3tbb15recursive_mutex16internal_destroyEv ) __TBB_SYMBOL( _ZN3tbb15recursive_mutex18internal_constructEv ) /* QueuingMutex.cpp */ __TBB_SYMBOL( _ZN3tbb13queuing_mutex18internal_constructEv ) __TBB_SYMBOL( _ZN3tbb13queuing_mutex11scoped_lock7acquireERS0_ ) __TBB_SYMBOL( _ZN3tbb13queuing_mutex11scoped_lock7releaseEv ) __TBB_SYMBOL( _ZN3tbb13queuing_mutex11scoped_lock11try_acquireERS0_ ) /* critical_section.cpp */ __TBB_SYMBOL( _ZN3tbb8internal19critical_section_v418internal_constructEv ) #if !TBB_NO_LEGACY /* concurrent_hash_map */ __TBB_SYMBOL( _ZNK3tbb8internal21hash_map_segment_base23internal_grow_predicateEv ) /* concurrent_queue.cpp v2 */ __TBB_SYMBOL( _ZN3tbb8internal21concurrent_queue_base12internal_popEPv ) __TBB_SYMBOL( _ZN3tbb8internal21concurrent_queue_base13internal_pushEPKv ) __TBB_SYMBOL( _ZN3tbb8internal21concurrent_queue_base21internal_set_capacityElm ) __TBB_SYMBOL( _ZN3tbb8internal21concurrent_queue_base23internal_pop_if_presentEPv ) __TBB_SYMBOL( _ZN3tbb8internal21concurrent_queue_base25internal_push_if_not_fullEPKv ) __TBB_SYMBOL( _ZN3tbb8internal21concurrent_queue_baseC2Em ) __TBB_SYMBOL( _ZN3tbb8internal21concurrent_queue_baseD2Ev ) __TBB_SYMBOL( _ZTIN3tbb8internal21concurrent_queue_baseE ) __TBB_SYMBOL( _ZTSN3tbb8internal21concurrent_queue_baseE ) __TBB_SYMBOL( _ZTVN3tbb8internal21concurrent_queue_baseE ) __TBB_SYMBOL( _ZN3tbb8internal30concurrent_queue_iterator_base6assignERKS1_ ) __TBB_SYMBOL( _ZN3tbb8internal30concurrent_queue_iterator_base7advanceEv ) __TBB_SYMBOL( _ZN3tbb8internal30concurrent_queue_iterator_baseC2ERKNS0_21concurrent_queue_baseE ) __TBB_SYMBOL( _ZN3tbb8internal30concurrent_queue_iterator_baseD2Ev ) __TBB_SYMBOL( _ZNK3tbb8internal21concurrent_queue_base13internal_sizeEv ) #endif /* concurrent_queue v3 */ /* constructors */ __TBB_SYMBOL( _ZN3tbb8internal24concurrent_queue_base_v3C2Em ) __TBB_SYMBOL( _ZN3tbb8internal33concurrent_queue_iterator_base_v3C2ERKNS0_24concurrent_queue_base_v3E ) __TBB_SYMBOL( _ZN3tbb8internal33concurrent_queue_iterator_base_v3C2ERKNS0_24concurrent_queue_base_v3Em ) /* destructors */ __TBB_SYMBOL( _ZN3tbb8internal24concurrent_queue_base_v3D2Ev ) __TBB_SYMBOL( _ZN3tbb8internal33concurrent_queue_iterator_base_v3D2Ev ) /* typeinfo */ __TBB_SYMBOL( _ZTIN3tbb8internal24concurrent_queue_base_v3E ) __TBB_SYMBOL( _ZTSN3tbb8internal24concurrent_queue_base_v3E ) /* vtable */ __TBB_SYMBOL( _ZTVN3tbb8internal24concurrent_queue_base_v3E ) /* methods */ __TBB_SYMBOL( _ZN3tbb8internal33concurrent_queue_iterator_base_v36assignERKS1_ ) __TBB_SYMBOL( _ZN3tbb8internal33concurrent_queue_iterator_base_v37advanceEv ) __TBB_SYMBOL( _ZN3tbb8internal24concurrent_queue_base_v313internal_pushEPKv ) __TBB_SYMBOL( _ZN3tbb8internal24concurrent_queue_base_v818internal_push_moveEPKv ) __TBB_SYMBOL( _ZN3tbb8internal24concurrent_queue_base_v325internal_push_if_not_fullEPKv ) __TBB_SYMBOL( _ZN3tbb8internal24concurrent_queue_base_v830internal_push_move_if_not_fullEPKv ) __TBB_SYMBOL( _ZN3tbb8internal24concurrent_queue_base_v312internal_popEPv ) __TBB_SYMBOL( _ZN3tbb8internal24concurrent_queue_base_v323internal_pop_if_presentEPv ) __TBB_SYMBOL( _ZN3tbb8internal24concurrent_queue_base_v314internal_abortEv ) __TBB_SYMBOL( _ZN3tbb8internal24concurrent_queue_base_v321internal_finish_clearEv ) __TBB_SYMBOL( _ZN3tbb8internal24concurrent_queue_base_v321internal_set_capacityElm ) __TBB_SYMBOL( _ZNK3tbb8internal24concurrent_queue_base_v313internal_sizeEv ) __TBB_SYMBOL( _ZNK3tbb8internal24concurrent_queue_base_v314internal_emptyEv ) __TBB_SYMBOL( _ZNK3tbb8internal24concurrent_queue_base_v324internal_throw_exceptionEv ) __TBB_SYMBOL( _ZN3tbb8internal24concurrent_queue_base_v36assignERKS1_ ) __TBB_SYMBOL( _ZN3tbb8internal24concurrent_queue_base_v812move_contentERS1_ ) #if !TBB_NO_LEGACY /* concurrent_vector.cpp v2 */ __TBB_SYMBOL( _ZN3tbb8internal22concurrent_vector_base13internal_copyERKS1_mPFvPvPKvmE ) __TBB_SYMBOL( _ZN3tbb8internal22concurrent_vector_base14internal_clearEPFvPvmEb ) __TBB_SYMBOL( _ZN3tbb8internal22concurrent_vector_base15internal_assignERKS1_mPFvPvmEPFvS4_PKvmESA_ ) __TBB_SYMBOL( _ZN3tbb8internal22concurrent_vector_base16internal_grow_byEmmPFvPvmE ) __TBB_SYMBOL( _ZN3tbb8internal22concurrent_vector_base16internal_reserveEmmm ) __TBB_SYMBOL( _ZN3tbb8internal22concurrent_vector_base18internal_push_backEmRm ) __TBB_SYMBOL( _ZN3tbb8internal22concurrent_vector_base25internal_grow_to_at_leastEmmPFvPvmE ) __TBB_SYMBOL( _ZNK3tbb8internal22concurrent_vector_base17internal_capacityEv ) #endif /* concurrent_vector v3 */ __TBB_SYMBOL( _ZN3tbb8internal25concurrent_vector_base_v313internal_copyERKS1_mPFvPvPKvmE ) __TBB_SYMBOL( _ZN3tbb8internal25concurrent_vector_base_v314internal_clearEPFvPvmE ) __TBB_SYMBOL( _ZN3tbb8internal25concurrent_vector_base_v315internal_assignERKS1_mPFvPvmEPFvS4_PKvmESA_ ) __TBB_SYMBOL( _ZN3tbb8internal25concurrent_vector_base_v316internal_grow_byEmmPFvPvPKvmES4_ ) __TBB_SYMBOL( _ZN3tbb8internal25concurrent_vector_base_v316internal_reserveEmmm ) __TBB_SYMBOL( _ZN3tbb8internal25concurrent_vector_base_v318internal_push_backEmRm ) __TBB_SYMBOL( _ZN3tbb8internal25concurrent_vector_base_v325internal_grow_to_at_leastEmmPFvPvPKvmES4_ ) __TBB_SYMBOL( _ZNK3tbb8internal25concurrent_vector_base_v317internal_capacityEv ) __TBB_SYMBOL( _ZN3tbb8internal25concurrent_vector_base_v316internal_compactEmPvPFvS2_mEPFvS2_PKvmE ) __TBB_SYMBOL( _ZN3tbb8internal25concurrent_vector_base_v313internal_swapERS1_ ) __TBB_SYMBOL( _ZNK3tbb8internal25concurrent_vector_base_v324internal_throw_exceptionEm ) __TBB_SYMBOL( _ZN3tbb8internal25concurrent_vector_base_v3D2Ev ) __TBB_SYMBOL( _ZN3tbb8internal25concurrent_vector_base_v315internal_resizeEmmmPKvPFvPvmEPFvS4_S3_mE ) __TBB_SYMBOL( _ZN3tbb8internal25concurrent_vector_base_v337internal_grow_to_at_least_with_resultEmmPFvPvPKvmES4_ ) /* tbb_thread */ __TBB_SYMBOL( _ZN3tbb8internal13tbb_thread_v320hardware_concurrencyEv ) __TBB_SYMBOL( _ZN3tbb8internal13tbb_thread_v36detachEv ) __TBB_SYMBOL( _ZN3tbb8internal16thread_get_id_v3Ev ) __TBB_SYMBOL( _ZN3tbb8internal15free_closure_v3EPv ) __TBB_SYMBOL( _ZN3tbb8internal13tbb_thread_v34joinEv ) __TBB_SYMBOL( _ZN3tbb8internal13tbb_thread_v314internal_startEPFPvS2_ES2_ ) __TBB_SYMBOL( _ZN3tbb8internal19allocate_closure_v3Em ) __TBB_SYMBOL( _ZN3tbb8internal7move_v3ERNS0_13tbb_thread_v3ES2_ ) __TBB_SYMBOL( _ZN3tbb8internal15thread_yield_v3Ev ) __TBB_SYMBOL( _ZN3tbb8internal15thread_sleep_v3ERKNS_10tick_count10interval_tE ) #undef __TBB_SYMBOL ================================================ FILE: benchmarks/tbb/lin64ipf-tbb-export.def ================================================ /* Copyright 2005-2014 Intel Corporation. All Rights Reserved. This file is part of Threading Building Blocks. Threading Building Blocks is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. Threading Building Blocks is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Threading Building Blocks; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA As a special exception, you may use this file as part of a free software library without restriction. Specifically, if other files instantiate templates or use macros or inline functions from this file, or you compile this file and link it with other files to produce an executable, this file does not by itself cause the resulting executable to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the executable file might be covered by the GNU General Public License. */ { global: #define __TBB_SYMBOL( sym ) sym; #include "lin64ipf-tbb-export.lst" local: /* TBB symbols */ *3tbb*; *__TBB*; /* ITT symbols */ __itt_*; /* Intel Compiler (libirc) symbols */ __intel_*; _intel_*; ?0_memcopyA; ?0_memcopyDu; ?0_memcpyD; ?1__memcpy; ?1__memmove; ?1__serial_memmove; memcpy; memset; }; ================================================ FILE: benchmarks/tbb/lin64ipf-tbb-export.lst ================================================ /* Copyright 2005-2014 Intel Corporation. All Rights Reserved. This file is part of Threading Building Blocks. Threading Building Blocks is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. Threading Building Blocks is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Threading Building Blocks; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA As a special exception, you may use this file as part of a free software library without restriction. Specifically, if other files instantiate templates or use macros or inline functions from this file, or you compile this file and link it with other files to produce an executable, this file does not by itself cause the resulting executable to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the executable file might be covered by the GNU General Public License. */ #include "tbb/tbb_config.h" /* cache_aligned_allocator.cpp */ __TBB_SYMBOL( _ZN3tbb8internal12NFS_AllocateEmmPv ) __TBB_SYMBOL( _ZN3tbb8internal15NFS_GetLineSizeEv ) __TBB_SYMBOL( _ZN3tbb8internal8NFS_FreeEPv ) __TBB_SYMBOL( _ZN3tbb8internal23allocate_via_handler_v3Em ) __TBB_SYMBOL( _ZN3tbb8internal25deallocate_via_handler_v3EPv ) __TBB_SYMBOL( _ZN3tbb8internal17is_malloc_used_v3Ev ) /* task.cpp v3 */ __TBB_SYMBOL( _ZN3tbb4task13note_affinityEt ) __TBB_SYMBOL( _ZN3tbb4task22internal_set_ref_countEi ) __TBB_SYMBOL( _ZN3tbb4task28internal_decrement_ref_countEv ) __TBB_SYMBOL( _ZN3tbb4task22spawn_and_wait_for_allERNS_9task_listE ) __TBB_SYMBOL( _ZN3tbb4task4selfEv ) __TBB_SYMBOL( _ZN3tbb10interface58internal9task_base7destroyERNS_4taskE ) __TBB_SYMBOL( _ZNK3tbb4task26is_owned_by_current_threadEv ) __TBB_SYMBOL( _ZN3tbb8internal19allocate_root_proxy4freeERNS_4taskE ) __TBB_SYMBOL( _ZN3tbb8internal19allocate_root_proxy8allocateEm ) __TBB_SYMBOL( _ZN3tbb8internal28affinity_partitioner_base_v36resizeEj ) __TBB_SYMBOL( _ZNK3tbb8internal20allocate_child_proxy4freeERNS_4taskE ) __TBB_SYMBOL( _ZNK3tbb8internal20allocate_child_proxy8allocateEm ) __TBB_SYMBOL( _ZNK3tbb8internal27allocate_continuation_proxy4freeERNS_4taskE ) __TBB_SYMBOL( _ZNK3tbb8internal27allocate_continuation_proxy8allocateEm ) __TBB_SYMBOL( _ZNK3tbb8internal34allocate_additional_child_of_proxy4freeERNS_4taskE ) __TBB_SYMBOL( _ZNK3tbb8internal34allocate_additional_child_of_proxy8allocateEm ) __TBB_SYMBOL( _ZTIN3tbb4taskE ) __TBB_SYMBOL( _ZTSN3tbb4taskE ) __TBB_SYMBOL( _ZTVN3tbb4taskE ) __TBB_SYMBOL( _ZN3tbb19task_scheduler_init19default_num_threadsEv ) __TBB_SYMBOL( _ZN3tbb19task_scheduler_init10initializeEim ) __TBB_SYMBOL( _ZN3tbb19task_scheduler_init10initializeEi ) __TBB_SYMBOL( _ZN3tbb19task_scheduler_init9terminateEv ) #if __TBB_SCHEDULER_OBSERVER __TBB_SYMBOL( _ZN3tbb8internal26task_scheduler_observer_v37observeEb ) #endif /* __TBB_SCHEDULER_OBSERVER */ __TBB_SYMBOL( _ZN3tbb10empty_task7executeEv ) __TBB_SYMBOL( _ZN3tbb10empty_taskD0Ev ) __TBB_SYMBOL( _ZN3tbb10empty_taskD1Ev ) __TBB_SYMBOL( _ZTIN3tbb10empty_taskE ) __TBB_SYMBOL( _ZTSN3tbb10empty_taskE ) __TBB_SYMBOL( _ZTVN3tbb10empty_taskE ) #if __TBB_TASK_ARENA /* arena.cpp */ __TBB_SYMBOL( _ZN3tbb10interface78internal15task_arena_base19internal_initializeEv ) __TBB_SYMBOL( _ZN3tbb10interface78internal15task_arena_base18internal_terminateEv ) __TBB_SYMBOL( _ZNK3tbb10interface78internal15task_arena_base16internal_enqueueERNS_4taskEl ) __TBB_SYMBOL( _ZNK3tbb10interface78internal15task_arena_base16internal_executeERNS1_13delegate_baseE ) __TBB_SYMBOL( _ZNK3tbb10interface78internal15task_arena_base13internal_waitEv ) __TBB_SYMBOL( _ZN3tbb10interface78internal15task_arena_base21internal_current_slotEv ) #endif /* __TBB_TASK_ARENA */ #if !TBB_NO_LEGACY /* task_v2.cpp */ __TBB_SYMBOL( _ZN3tbb4task7destroyERS0_ ) #endif /* !TBB_NO_LEGACY */ /* Exception handling in task scheduler */ #if __TBB_TASK_GROUP_CONTEXT __TBB_SYMBOL( _ZNK3tbb8internal32allocate_root_with_context_proxy8allocateEm ) __TBB_SYMBOL( _ZNK3tbb8internal32allocate_root_with_context_proxy4freeERNS_4taskE ) __TBB_SYMBOL( _ZN3tbb4task12change_groupERNS_18task_group_contextE ) __TBB_SYMBOL( _ZNK3tbb18task_group_context28is_group_execution_cancelledEv ) __TBB_SYMBOL( _ZN3tbb18task_group_context22cancel_group_executionEv ) __TBB_SYMBOL( _ZN3tbb18task_group_context26register_pending_exceptionEv ) __TBB_SYMBOL( _ZN3tbb18task_group_context5resetEv ) __TBB_SYMBOL( _ZN3tbb18task_group_context19capture_fp_settingsEv ) __TBB_SYMBOL( _ZN3tbb18task_group_context4initEv ) __TBB_SYMBOL( _ZN3tbb18task_group_contextD1Ev ) __TBB_SYMBOL( _ZN3tbb18task_group_contextD2Ev ) #if __TBB_TASK_PRIORITY __TBB_SYMBOL( _ZN3tbb18task_group_context12set_priorityENS_10priority_tE ) __TBB_SYMBOL( _ZNK3tbb18task_group_context8priorityEv ) #endif /* __TBB_TASK_PRIORITY */ __TBB_SYMBOL( _ZNK3tbb18captured_exception4nameEv ) __TBB_SYMBOL( _ZNK3tbb18captured_exception4whatEv ) __TBB_SYMBOL( _ZN3tbb18captured_exception10throw_selfEv ) __TBB_SYMBOL( _ZN3tbb18captured_exception3setEPKcS2_ ) __TBB_SYMBOL( _ZN3tbb18captured_exception4moveEv ) __TBB_SYMBOL( _ZN3tbb18captured_exception5clearEv ) __TBB_SYMBOL( _ZN3tbb18captured_exception7destroyEv ) __TBB_SYMBOL( _ZN3tbb18captured_exception8allocateEPKcS2_ ) __TBB_SYMBOL( _ZN3tbb18captured_exceptionD0Ev ) __TBB_SYMBOL( _ZN3tbb18captured_exceptionD1Ev ) __TBB_SYMBOL( _ZN3tbb18captured_exceptionD2Ev ) __TBB_SYMBOL( _ZTIN3tbb18captured_exceptionE ) __TBB_SYMBOL( _ZTSN3tbb18captured_exceptionE ) __TBB_SYMBOL( _ZTVN3tbb18captured_exceptionE ) __TBB_SYMBOL( _ZN3tbb13tbb_exceptionD2Ev ) __TBB_SYMBOL( _ZTIN3tbb13tbb_exceptionE ) __TBB_SYMBOL( _ZTSN3tbb13tbb_exceptionE ) __TBB_SYMBOL( _ZTVN3tbb13tbb_exceptionE ) #endif /* __TBB_TASK_GROUP_CONTEXT */ /* Symbols for exceptions thrown from TBB */ __TBB_SYMBOL( _ZN3tbb8internal33throw_bad_last_alloc_exception_v4Ev ) __TBB_SYMBOL( _ZN3tbb8internal18throw_exception_v4ENS0_12exception_idE ) __TBB_SYMBOL( _ZN3tbb14bad_last_allocD0Ev ) __TBB_SYMBOL( _ZN3tbb14bad_last_allocD1Ev ) __TBB_SYMBOL( _ZNK3tbb14bad_last_alloc4whatEv ) __TBB_SYMBOL( _ZTIN3tbb14bad_last_allocE ) __TBB_SYMBOL( _ZTSN3tbb14bad_last_allocE ) __TBB_SYMBOL( _ZTVN3tbb14bad_last_allocE ) __TBB_SYMBOL( _ZN3tbb12missing_waitD0Ev ) __TBB_SYMBOL( _ZN3tbb12missing_waitD1Ev ) __TBB_SYMBOL( _ZNK3tbb12missing_wait4whatEv ) __TBB_SYMBOL( _ZTIN3tbb12missing_waitE ) __TBB_SYMBOL( _ZTSN3tbb12missing_waitE ) __TBB_SYMBOL( _ZTVN3tbb12missing_waitE ) __TBB_SYMBOL( _ZN3tbb27invalid_multiple_schedulingD0Ev ) __TBB_SYMBOL( _ZN3tbb27invalid_multiple_schedulingD1Ev ) __TBB_SYMBOL( _ZNK3tbb27invalid_multiple_scheduling4whatEv ) __TBB_SYMBOL( _ZTIN3tbb27invalid_multiple_schedulingE ) __TBB_SYMBOL( _ZTSN3tbb27invalid_multiple_schedulingE ) __TBB_SYMBOL( _ZTVN3tbb27invalid_multiple_schedulingE ) __TBB_SYMBOL( _ZN3tbb13improper_lockD0Ev ) __TBB_SYMBOL( _ZN3tbb13improper_lockD1Ev ) __TBB_SYMBOL( _ZNK3tbb13improper_lock4whatEv ) __TBB_SYMBOL( _ZTIN3tbb13improper_lockE ) __TBB_SYMBOL( _ZTSN3tbb13improper_lockE ) __TBB_SYMBOL( _ZTVN3tbb13improper_lockE ) __TBB_SYMBOL( _ZN3tbb10user_abortD0Ev ) __TBB_SYMBOL( _ZN3tbb10user_abortD1Ev ) __TBB_SYMBOL( _ZNK3tbb10user_abort4whatEv ) __TBB_SYMBOL( _ZTIN3tbb10user_abortE ) __TBB_SYMBOL( _ZTSN3tbb10user_abortE ) __TBB_SYMBOL( _ZTVN3tbb10user_abortE ) /* tbb_misc.cpp */ __TBB_SYMBOL( _ZN3tbb17assertion_failureEPKciS1_S1_ ) __TBB_SYMBOL( _ZN3tbb21set_assertion_handlerEPFvPKciS1_S1_E ) __TBB_SYMBOL( _ZN3tbb8internal36get_initial_auto_partitioner_divisorEv ) __TBB_SYMBOL( _ZN3tbb8internal13handle_perrorEiPKc ) __TBB_SYMBOL( _ZN3tbb8internal15runtime_warningEPKcz ) __TBB_SYMBOL( TBB_runtime_interface_version ) /* tbb_main.cpp */ __TBB_SYMBOL( _ZN3tbb8internal32itt_load_pointer_with_acquire_v3EPKv ) __TBB_SYMBOL( _ZN3tbb8internal33itt_store_pointer_with_release_v3EPvS1_ ) __TBB_SYMBOL( _ZN3tbb8internal18call_itt_notify_v5EiPv ) __TBB_SYMBOL( _ZN3tbb8internal20itt_set_sync_name_v3EPvPKc ) __TBB_SYMBOL( _ZN3tbb8internal19itt_load_pointer_v3EPKv ) /* pipeline.cpp */ __TBB_SYMBOL( _ZTIN3tbb6filterE ) __TBB_SYMBOL( _ZTSN3tbb6filterE ) __TBB_SYMBOL( _ZTVN3tbb6filterE ) __TBB_SYMBOL( _ZN3tbb6filterD2Ev ) __TBB_SYMBOL( _ZN3tbb8pipeline10add_filterERNS_6filterE ) __TBB_SYMBOL( _ZN3tbb8pipeline12inject_tokenERNS_4taskE ) __TBB_SYMBOL( _ZN3tbb8pipeline13remove_filterERNS_6filterE ) __TBB_SYMBOL( _ZN3tbb8pipeline3runEm ) #if __TBB_TASK_GROUP_CONTEXT __TBB_SYMBOL( _ZN3tbb8pipeline3runEmRNS_18task_group_contextE ) #endif __TBB_SYMBOL( _ZN3tbb8pipeline5clearEv ) __TBB_SYMBOL( _ZN3tbb19thread_bound_filter12process_itemEv ) __TBB_SYMBOL( _ZN3tbb19thread_bound_filter16try_process_itemEv ) __TBB_SYMBOL( _ZTIN3tbb8pipelineE ) __TBB_SYMBOL( _ZTSN3tbb8pipelineE ) __TBB_SYMBOL( _ZTVN3tbb8pipelineE ) __TBB_SYMBOL( _ZN3tbb8pipelineC1Ev ) __TBB_SYMBOL( _ZN3tbb8pipelineC2Ev ) __TBB_SYMBOL( _ZN3tbb8pipelineD0Ev ) __TBB_SYMBOL( _ZN3tbb8pipelineD1Ev ) __TBB_SYMBOL( _ZN3tbb8pipelineD2Ev ) __TBB_SYMBOL( _ZN3tbb6filter16set_end_of_inputEv ) /* queuing_rw_mutex.cpp */ __TBB_SYMBOL( _ZN3tbb16queuing_rw_mutex18internal_constructEv ) __TBB_SYMBOL( _ZN3tbb16queuing_rw_mutex11scoped_lock17upgrade_to_writerEv ) __TBB_SYMBOL( _ZN3tbb16queuing_rw_mutex11scoped_lock19downgrade_to_readerEv ) __TBB_SYMBOL( _ZN3tbb16queuing_rw_mutex11scoped_lock7acquireERS0_b ) __TBB_SYMBOL( _ZN3tbb16queuing_rw_mutex11scoped_lock7releaseEv ) __TBB_SYMBOL( _ZN3tbb16queuing_rw_mutex11scoped_lock11try_acquireERS0_b ) /* reader_writer_lock.cpp */ __TBB_SYMBOL( _ZN3tbb10interface518reader_writer_lock11scoped_lock16internal_destroyEv ) __TBB_SYMBOL( _ZN3tbb10interface518reader_writer_lock11scoped_lock18internal_constructERS1_ ) __TBB_SYMBOL( _ZN3tbb10interface518reader_writer_lock13try_lock_readEv ) __TBB_SYMBOL( _ZN3tbb10interface518reader_writer_lock16scoped_lock_read16internal_destroyEv ) __TBB_SYMBOL( _ZN3tbb10interface518reader_writer_lock16scoped_lock_read18internal_constructERS1_ ) __TBB_SYMBOL( _ZN3tbb10interface518reader_writer_lock16internal_destroyEv ) __TBB_SYMBOL( _ZN3tbb10interface518reader_writer_lock18internal_constructEv ) __TBB_SYMBOL( _ZN3tbb10interface518reader_writer_lock4lockEv ) __TBB_SYMBOL( _ZN3tbb10interface518reader_writer_lock6unlockEv ) __TBB_SYMBOL( _ZN3tbb10interface518reader_writer_lock8try_lockEv ) __TBB_SYMBOL( _ZN3tbb10interface518reader_writer_lock9lock_readEv ) #if !TBB_NO_LEGACY /* spin_rw_mutex.cpp v2 */ __TBB_SYMBOL( _ZN3tbb13spin_rw_mutex16internal_upgradeEPS0_ ) __TBB_SYMBOL( _ZN3tbb13spin_rw_mutex22internal_itt_releasingEPS0_ ) __TBB_SYMBOL( _ZN3tbb13spin_rw_mutex23internal_acquire_readerEPS0_ ) __TBB_SYMBOL( _ZN3tbb13spin_rw_mutex23internal_acquire_writerEPS0_ ) __TBB_SYMBOL( _ZN3tbb13spin_rw_mutex18internal_downgradeEPS0_ ) __TBB_SYMBOL( _ZN3tbb13spin_rw_mutex23internal_release_readerEPS0_ ) __TBB_SYMBOL( _ZN3tbb13spin_rw_mutex23internal_release_writerEPS0_ ) __TBB_SYMBOL( _ZN3tbb13spin_rw_mutex27internal_try_acquire_readerEPS0_ ) __TBB_SYMBOL( _ZN3tbb13spin_rw_mutex27internal_try_acquire_writerEPS0_ ) #endif /* spin_rw_mutex v3 */ __TBB_SYMBOL( _ZN3tbb16spin_rw_mutex_v318internal_constructEv ) __TBB_SYMBOL( _ZN3tbb16spin_rw_mutex_v316internal_upgradeEv ) __TBB_SYMBOL( _ZN3tbb16spin_rw_mutex_v318internal_downgradeEv ) __TBB_SYMBOL( _ZN3tbb16spin_rw_mutex_v323internal_acquire_readerEv ) __TBB_SYMBOL( _ZN3tbb16spin_rw_mutex_v323internal_acquire_writerEv ) __TBB_SYMBOL( _ZN3tbb16spin_rw_mutex_v323internal_release_readerEv ) __TBB_SYMBOL( _ZN3tbb16spin_rw_mutex_v323internal_release_writerEv ) __TBB_SYMBOL( _ZN3tbb16spin_rw_mutex_v327internal_try_acquire_readerEv ) __TBB_SYMBOL( _ZN3tbb16spin_rw_mutex_v327internal_try_acquire_writerEv ) /* spin_mutex.cpp */ __TBB_SYMBOL( _ZN3tbb10spin_mutex18internal_constructEv ) __TBB_SYMBOL( _ZN3tbb10spin_mutex11scoped_lock16internal_acquireERS0_ ) __TBB_SYMBOL( _ZN3tbb10spin_mutex11scoped_lock16internal_releaseEv ) __TBB_SYMBOL( _ZN3tbb10spin_mutex11scoped_lock20internal_try_acquireERS0_ ) /* mutex.cpp */ __TBB_SYMBOL( _ZN3tbb5mutex11scoped_lock16internal_acquireERS0_ ) __TBB_SYMBOL( _ZN3tbb5mutex11scoped_lock16internal_releaseEv ) __TBB_SYMBOL( _ZN3tbb5mutex11scoped_lock20internal_try_acquireERS0_ ) __TBB_SYMBOL( _ZN3tbb5mutex16internal_destroyEv ) __TBB_SYMBOL( _ZN3tbb5mutex18internal_constructEv ) /* recursive_mutex.cpp */ __TBB_SYMBOL( _ZN3tbb15recursive_mutex11scoped_lock16internal_acquireERS0_ ) __TBB_SYMBOL( _ZN3tbb15recursive_mutex11scoped_lock16internal_releaseEv ) __TBB_SYMBOL( _ZN3tbb15recursive_mutex11scoped_lock20internal_try_acquireERS0_ ) __TBB_SYMBOL( _ZN3tbb15recursive_mutex16internal_destroyEv ) __TBB_SYMBOL( _ZN3tbb15recursive_mutex18internal_constructEv ) /* QueuingMutex.cpp */ __TBB_SYMBOL( _ZN3tbb13queuing_mutex18internal_constructEv ) __TBB_SYMBOL( _ZN3tbb13queuing_mutex11scoped_lock7acquireERS0_ ) __TBB_SYMBOL( _ZN3tbb13queuing_mutex11scoped_lock7releaseEv ) __TBB_SYMBOL( _ZN3tbb13queuing_mutex11scoped_lock11try_acquireERS0_ ) /* critical_section.cpp */ __TBB_SYMBOL( _ZN3tbb8internal19critical_section_v418internal_constructEv ) #if !TBB_NO_LEGACY /* concurrent_hash_map */ __TBB_SYMBOL( _ZNK3tbb8internal21hash_map_segment_base23internal_grow_predicateEv ) /* concurrent_queue.cpp v2 */ __TBB_SYMBOL( _ZN3tbb8internal21concurrent_queue_base12internal_popEPv ) __TBB_SYMBOL( _ZN3tbb8internal21concurrent_queue_base13internal_pushEPKv ) __TBB_SYMBOL( _ZN3tbb8internal21concurrent_queue_base21internal_set_capacityElm ) __TBB_SYMBOL( _ZN3tbb8internal21concurrent_queue_base23internal_pop_if_presentEPv ) __TBB_SYMBOL( _ZN3tbb8internal21concurrent_queue_base25internal_push_if_not_fullEPKv ) __TBB_SYMBOL( _ZN3tbb8internal21concurrent_queue_baseC2Em ) __TBB_SYMBOL( _ZN3tbb8internal21concurrent_queue_baseD2Ev ) __TBB_SYMBOL( _ZTIN3tbb8internal21concurrent_queue_baseE ) __TBB_SYMBOL( _ZTSN3tbb8internal21concurrent_queue_baseE ) __TBB_SYMBOL( _ZTVN3tbb8internal21concurrent_queue_baseE ) __TBB_SYMBOL( _ZN3tbb8internal30concurrent_queue_iterator_base6assignERKS1_ ) __TBB_SYMBOL( _ZN3tbb8internal30concurrent_queue_iterator_base7advanceEv ) __TBB_SYMBOL( _ZN3tbb8internal30concurrent_queue_iterator_baseC2ERKNS0_21concurrent_queue_baseE ) __TBB_SYMBOL( _ZN3tbb8internal30concurrent_queue_iterator_baseD2Ev ) __TBB_SYMBOL( _ZNK3tbb8internal21concurrent_queue_base13internal_sizeEv ) #endif /* concurrent_queue v3 */ /* constructors */ __TBB_SYMBOL( _ZN3tbb8internal24concurrent_queue_base_v3C2Em ) __TBB_SYMBOL( _ZN3tbb8internal33concurrent_queue_iterator_base_v3C2ERKNS0_24concurrent_queue_base_v3E ) __TBB_SYMBOL( _ZN3tbb8internal33concurrent_queue_iterator_base_v3C2ERKNS0_24concurrent_queue_base_v3Em ) /* destructors */ __TBB_SYMBOL( _ZN3tbb8internal24concurrent_queue_base_v3D2Ev ) __TBB_SYMBOL( _ZN3tbb8internal33concurrent_queue_iterator_base_v3D2Ev ) /* typeinfo */ __TBB_SYMBOL( _ZTIN3tbb8internal24concurrent_queue_base_v3E ) __TBB_SYMBOL( _ZTSN3tbb8internal24concurrent_queue_base_v3E ) /* vtable */ __TBB_SYMBOL( _ZTVN3tbb8internal24concurrent_queue_base_v3E ) /* methods */ __TBB_SYMBOL( _ZN3tbb8internal33concurrent_queue_iterator_base_v36assignERKS1_ ) __TBB_SYMBOL( _ZN3tbb8internal33concurrent_queue_iterator_base_v37advanceEv ) __TBB_SYMBOL( _ZN3tbb8internal24concurrent_queue_base_v313internal_pushEPKv ) __TBB_SYMBOL( _ZN3tbb8internal24concurrent_queue_base_v818internal_push_moveEPKv ) __TBB_SYMBOL( _ZN3tbb8internal24concurrent_queue_base_v325internal_push_if_not_fullEPKv ) __TBB_SYMBOL( _ZN3tbb8internal24concurrent_queue_base_v830internal_push_move_if_not_fullEPKv ) __TBB_SYMBOL( _ZN3tbb8internal24concurrent_queue_base_v312internal_popEPv ) __TBB_SYMBOL( _ZN3tbb8internal24concurrent_queue_base_v323internal_pop_if_presentEPv ) __TBB_SYMBOL( _ZN3tbb8internal24concurrent_queue_base_v314internal_abortEv ) __TBB_SYMBOL( _ZN3tbb8internal24concurrent_queue_base_v321internal_finish_clearEv ) __TBB_SYMBOL( _ZN3tbb8internal24concurrent_queue_base_v321internal_set_capacityElm ) __TBB_SYMBOL( _ZNK3tbb8internal24concurrent_queue_base_v313internal_sizeEv ) __TBB_SYMBOL( _ZNK3tbb8internal24concurrent_queue_base_v314internal_emptyEv ) __TBB_SYMBOL( _ZNK3tbb8internal24concurrent_queue_base_v324internal_throw_exceptionEv ) __TBB_SYMBOL( _ZN3tbb8internal24concurrent_queue_base_v36assignERKS1_ ) __TBB_SYMBOL( _ZN3tbb8internal24concurrent_queue_base_v812move_contentERS1_ ) #if !TBB_NO_LEGACY /* concurrent_vector.cpp v2 */ __TBB_SYMBOL( _ZN3tbb8internal22concurrent_vector_base13internal_copyERKS1_mPFvPvPKvmE ) __TBB_SYMBOL( _ZN3tbb8internal22concurrent_vector_base14internal_clearEPFvPvmEb ) __TBB_SYMBOL( _ZN3tbb8internal22concurrent_vector_base15internal_assignERKS1_mPFvPvmEPFvS4_PKvmESA_ ) __TBB_SYMBOL( _ZN3tbb8internal22concurrent_vector_base16internal_grow_byEmmPFvPvmE ) __TBB_SYMBOL( _ZN3tbb8internal22concurrent_vector_base16internal_reserveEmmm ) __TBB_SYMBOL( _ZN3tbb8internal22concurrent_vector_base18internal_push_backEmRm ) __TBB_SYMBOL( _ZN3tbb8internal22concurrent_vector_base25internal_grow_to_at_leastEmmPFvPvmE ) __TBB_SYMBOL( _ZNK3tbb8internal22concurrent_vector_base17internal_capacityEv ) #endif /* concurrent_vector v3 */ __TBB_SYMBOL( _ZN3tbb8internal25concurrent_vector_base_v313internal_copyERKS1_mPFvPvPKvmE ) __TBB_SYMBOL( _ZN3tbb8internal25concurrent_vector_base_v314internal_clearEPFvPvmE ) __TBB_SYMBOL( _ZN3tbb8internal25concurrent_vector_base_v315internal_assignERKS1_mPFvPvmEPFvS4_PKvmESA_ ) __TBB_SYMBOL( _ZN3tbb8internal25concurrent_vector_base_v316internal_grow_byEmmPFvPvPKvmES4_ ) __TBB_SYMBOL( _ZN3tbb8internal25concurrent_vector_base_v316internal_reserveEmmm ) __TBB_SYMBOL( _ZN3tbb8internal25concurrent_vector_base_v318internal_push_backEmRm ) __TBB_SYMBOL( _ZN3tbb8internal25concurrent_vector_base_v325internal_grow_to_at_leastEmmPFvPvPKvmES4_ ) __TBB_SYMBOL( _ZNK3tbb8internal25concurrent_vector_base_v317internal_capacityEv ) __TBB_SYMBOL( _ZN3tbb8internal25concurrent_vector_base_v316internal_compactEmPvPFvS2_mEPFvS2_PKvmE ) __TBB_SYMBOL( _ZN3tbb8internal25concurrent_vector_base_v313internal_swapERS1_ ) __TBB_SYMBOL( _ZNK3tbb8internal25concurrent_vector_base_v324internal_throw_exceptionEm ) __TBB_SYMBOL( _ZN3tbb8internal25concurrent_vector_base_v3D2Ev ) __TBB_SYMBOL( _ZN3tbb8internal25concurrent_vector_base_v315internal_resizeEmmmPKvPFvPvmEPFvS4_S3_mE ) __TBB_SYMBOL( _ZN3tbb8internal25concurrent_vector_base_v337internal_grow_to_at_least_with_resultEmmPFvPvPKvmES4_ ) /* tbb_thread */ __TBB_SYMBOL( _ZN3tbb8internal13tbb_thread_v320hardware_concurrencyEv ) __TBB_SYMBOL( _ZN3tbb8internal13tbb_thread_v36detachEv ) __TBB_SYMBOL( _ZN3tbb8internal16thread_get_id_v3Ev ) __TBB_SYMBOL( _ZN3tbb8internal15free_closure_v3EPv ) __TBB_SYMBOL( _ZN3tbb8internal13tbb_thread_v34joinEv ) __TBB_SYMBOL( _ZN3tbb8internal13tbb_thread_v314internal_startEPFPvS2_ES2_ ) __TBB_SYMBOL( _ZN3tbb8internal19allocate_closure_v3Em ) __TBB_SYMBOL( _ZN3tbb8internal7move_v3ERNS0_13tbb_thread_v3ES2_ ) __TBB_SYMBOL( _ZN3tbb8internal15thread_yield_v3Ev ) __TBB_SYMBOL( _ZN3tbb8internal15thread_sleep_v3ERKNS_10tick_count10interval_tE ) /* asm functions */ __TBB_SYMBOL( __TBB_machine_fetchadd1__TBB_full_fence ) __TBB_SYMBOL( __TBB_machine_fetchadd2__TBB_full_fence ) __TBB_SYMBOL( __TBB_machine_fetchadd4__TBB_full_fence ) __TBB_SYMBOL( __TBB_machine_fetchadd8__TBB_full_fence ) __TBB_SYMBOL( __TBB_machine_fetchstore1__TBB_full_fence ) __TBB_SYMBOL( __TBB_machine_fetchstore2__TBB_full_fence ) __TBB_SYMBOL( __TBB_machine_fetchstore4__TBB_full_fence ) __TBB_SYMBOL( __TBB_machine_fetchstore8__TBB_full_fence ) __TBB_SYMBOL( __TBB_machine_fetchadd1acquire ) __TBB_SYMBOL( __TBB_machine_fetchadd1release ) __TBB_SYMBOL( __TBB_machine_fetchadd2acquire ) __TBB_SYMBOL( __TBB_machine_fetchadd2release ) __TBB_SYMBOL( __TBB_machine_fetchadd4acquire ) __TBB_SYMBOL( __TBB_machine_fetchadd4release ) __TBB_SYMBOL( __TBB_machine_fetchadd8acquire ) __TBB_SYMBOL( __TBB_machine_fetchadd8release ) __TBB_SYMBOL( __TBB_machine_fetchstore1acquire ) __TBB_SYMBOL( __TBB_machine_fetchstore1release ) __TBB_SYMBOL( __TBB_machine_fetchstore2acquire ) __TBB_SYMBOL( __TBB_machine_fetchstore2release ) __TBB_SYMBOL( __TBB_machine_fetchstore4acquire ) __TBB_SYMBOL( __TBB_machine_fetchstore4release ) __TBB_SYMBOL( __TBB_machine_fetchstore8acquire ) __TBB_SYMBOL( __TBB_machine_fetchstore8release ) __TBB_SYMBOL( __TBB_machine_cmpswp1acquire ) __TBB_SYMBOL( __TBB_machine_cmpswp1release ) __TBB_SYMBOL( __TBB_machine_cmpswp1__TBB_full_fence ) __TBB_SYMBOL( __TBB_machine_cmpswp2acquire ) __TBB_SYMBOL( __TBB_machine_cmpswp2release ) __TBB_SYMBOL( __TBB_machine_cmpswp2__TBB_full_fence ) __TBB_SYMBOL( __TBB_machine_cmpswp4acquire ) __TBB_SYMBOL( __TBB_machine_cmpswp4release ) __TBB_SYMBOL( __TBB_machine_cmpswp4__TBB_full_fence ) __TBB_SYMBOL( __TBB_machine_cmpswp8acquire ) __TBB_SYMBOL( __TBB_machine_cmpswp8release ) __TBB_SYMBOL( __TBB_machine_cmpswp8__TBB_full_fence ) __TBB_SYMBOL( __TBB_machine_lg ) __TBB_SYMBOL( __TBB_machine_lockbyte ) __TBB_SYMBOL( __TBB_machine_pause ) __TBB_SYMBOL( __TBB_machine_trylockbyte ) __TBB_SYMBOL( __TBB_machine_load8_relaxed ) __TBB_SYMBOL( __TBB_machine_store8_relaxed ) __TBB_SYMBOL( __TBB_machine_load4_relaxed ) __TBB_SYMBOL( __TBB_machine_store4_relaxed ) __TBB_SYMBOL( __TBB_machine_load2_relaxed ) __TBB_SYMBOL( __TBB_machine_store2_relaxed ) __TBB_SYMBOL( __TBB_machine_load1_relaxed ) __TBB_SYMBOL( __TBB_machine_store1_relaxed ) #undef __TBB_SYMBOL ================================================ FILE: benchmarks/tbb/mac32-tbb-export.def ================================================ /* Copyright 2005-2014 Intel Corporation. All Rights Reserved. This file is part of Threading Building Blocks. Threading Building Blocks is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. Threading Building Blocks is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Threading Building Blocks; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA As a special exception, you may use this file as part of a free software library without restriction. Specifically, if other files instantiate templates or use macros or inline functions from this file, or you compile this file and link it with other files to produce an executable, this file does not by itself cause the resulting executable to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the executable file might be covered by the GNU General Public License. */ #define __TBB_SYMBOL( sym ) _##sym #include "mac32-tbb-export.lst" ================================================ FILE: benchmarks/tbb/mac32-tbb-export.lst ================================================ /* Copyright 2005-2014 Intel Corporation. All Rights Reserved. This file is part of Threading Building Blocks. Threading Building Blocks is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. Threading Building Blocks is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Threading Building Blocks; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA As a special exception, you may use this file as part of a free software library without restriction. Specifically, if other files instantiate templates or use macros or inline functions from this file, or you compile this file and link it with other files to produce an executable, this file does not by itself cause the resulting executable to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the executable file might be covered by the GNU General Public License. */ #include "tbb/tbb_config.h" /* Sometimes OS X* requires leading underscore (e. g. in export list file), but sometimes not (e. g. when searching symbol in a dynamic library via dlsym()). Symbols in this file SHOULD be listed WITHOUT one leading underscore. __TBB_SYMBOL macro should add underscore when necessary, depending on the indended usage. */ // cache_aligned_allocator.cpp __TBB_SYMBOL( _ZN3tbb8internal12NFS_AllocateEmmPv ) __TBB_SYMBOL( _ZN3tbb8internal15NFS_GetLineSizeEv ) __TBB_SYMBOL( _ZN3tbb8internal8NFS_FreeEPv ) __TBB_SYMBOL( _ZN3tbb8internal23allocate_via_handler_v3Em ) __TBB_SYMBOL( _ZN3tbb8internal25deallocate_via_handler_v3EPv ) __TBB_SYMBOL( _ZN3tbb8internal17is_malloc_used_v3Ev ) // task.cpp v3 __TBB_SYMBOL( _ZN3tbb4task13note_affinityEt ) __TBB_SYMBOL( _ZN3tbb4task22internal_set_ref_countEi ) __TBB_SYMBOL( _ZN3tbb4task28internal_decrement_ref_countEv ) __TBB_SYMBOL( _ZN3tbb4task22spawn_and_wait_for_allERNS_9task_listE ) __TBB_SYMBOL( _ZN3tbb4task4selfEv ) __TBB_SYMBOL( _ZN3tbb10interface58internal9task_base7destroyERNS_4taskE ) __TBB_SYMBOL( _ZNK3tbb4task26is_owned_by_current_threadEv ) __TBB_SYMBOL( _ZN3tbb8internal19allocate_root_proxy4freeERNS_4taskE ) __TBB_SYMBOL( _ZN3tbb8internal19allocate_root_proxy8allocateEm ) __TBB_SYMBOL( _ZN3tbb8internal28affinity_partitioner_base_v36resizeEj ) __TBB_SYMBOL( _ZN3tbb8internal36get_initial_auto_partitioner_divisorEv ) __TBB_SYMBOL( _ZNK3tbb8internal20allocate_child_proxy4freeERNS_4taskE ) __TBB_SYMBOL( _ZNK3tbb8internal20allocate_child_proxy8allocateEm ) __TBB_SYMBOL( _ZNK3tbb8internal27allocate_continuation_proxy4freeERNS_4taskE ) __TBB_SYMBOL( _ZNK3tbb8internal27allocate_continuation_proxy8allocateEm ) __TBB_SYMBOL( _ZNK3tbb8internal34allocate_additional_child_of_proxy4freeERNS_4taskE ) __TBB_SYMBOL( _ZNK3tbb8internal34allocate_additional_child_of_proxy8allocateEm ) __TBB_SYMBOL( _ZTIN3tbb4taskE ) __TBB_SYMBOL( _ZTSN3tbb4taskE ) __TBB_SYMBOL( _ZTVN3tbb4taskE ) __TBB_SYMBOL( _ZN3tbb19task_scheduler_init19default_num_threadsEv ) __TBB_SYMBOL( _ZN3tbb19task_scheduler_init10initializeEim ) __TBB_SYMBOL( _ZN3tbb19task_scheduler_init10initializeEi ) __TBB_SYMBOL( _ZN3tbb19task_scheduler_init9terminateEv ) #if __TBB_SCHEDULER_OBSERVER __TBB_SYMBOL( _ZN3tbb8internal26task_scheduler_observer_v37observeEb ) #endif /* __TBB_SCHEDULER_OBSERVER */ __TBB_SYMBOL( _ZN3tbb10empty_task7executeEv ) __TBB_SYMBOL( _ZN3tbb10empty_taskD0Ev ) __TBB_SYMBOL( _ZN3tbb10empty_taskD1Ev ) __TBB_SYMBOL( _ZTIN3tbb10empty_taskE ) __TBB_SYMBOL( _ZTSN3tbb10empty_taskE ) __TBB_SYMBOL( _ZTVN3tbb10empty_taskE ) #if __TBB_TASK_ARENA /* arena.cpp */ __TBB_SYMBOL( _ZN3tbb10interface78internal15task_arena_base19internal_initializeEv ) __TBB_SYMBOL( _ZN3tbb10interface78internal15task_arena_base18internal_terminateEv ) __TBB_SYMBOL( _ZNK3tbb10interface78internal15task_arena_base16internal_enqueueERNS_4taskEl ) __TBB_SYMBOL( _ZNK3tbb10interface78internal15task_arena_base16internal_executeERNS1_13delegate_baseE ) __TBB_SYMBOL( _ZNK3tbb10interface78internal15task_arena_base13internal_waitEv ) __TBB_SYMBOL( _ZN3tbb10interface78internal15task_arena_base21internal_current_slotEv ) #endif /* __TBB_TASK_ARENA */ #if !TBB_NO_LEGACY // task_v2.cpp __TBB_SYMBOL( _ZN3tbb4task7destroyERS0_ ) #endif // Exception handling in task scheduler #if __TBB_TASK_GROUP_CONTEXT __TBB_SYMBOL( _ZNK3tbb8internal32allocate_root_with_context_proxy8allocateEm ) __TBB_SYMBOL( _ZNK3tbb8internal32allocate_root_with_context_proxy4freeERNS_4taskE ) __TBB_SYMBOL( _ZN3tbb4task12change_groupERNS_18task_group_contextE ) __TBB_SYMBOL( _ZNK3tbb18task_group_context28is_group_execution_cancelledEv ) __TBB_SYMBOL( _ZN3tbb18task_group_context22cancel_group_executionEv ) __TBB_SYMBOL( _ZN3tbb18task_group_context26register_pending_exceptionEv ) __TBB_SYMBOL( _ZN3tbb18task_group_context5resetEv ) __TBB_SYMBOL( _ZN3tbb18task_group_context19capture_fp_settingsEv ) __TBB_SYMBOL( _ZN3tbb18task_group_context4initEv ) __TBB_SYMBOL( _ZN3tbb18task_group_contextD1Ev ) __TBB_SYMBOL( _ZN3tbb18task_group_contextD2Ev ) #if __TBB_TASK_PRIORITY __TBB_SYMBOL( _ZN3tbb18task_group_context12set_priorityENS_10priority_tE ) __TBB_SYMBOL( _ZNK3tbb18task_group_context8priorityEv ) #endif /* __TBB_TASK_PRIORITY */ __TBB_SYMBOL( _ZNK3tbb18captured_exception4nameEv ) __TBB_SYMBOL( _ZNK3tbb18captured_exception4whatEv ) __TBB_SYMBOL( _ZN3tbb18captured_exception10throw_selfEv ) __TBB_SYMBOL( _ZN3tbb18captured_exception3setEPKcS2_ ) __TBB_SYMBOL( _ZN3tbb18captured_exception4moveEv ) __TBB_SYMBOL( _ZN3tbb18captured_exception5clearEv ) __TBB_SYMBOL( _ZN3tbb18captured_exception7destroyEv ) __TBB_SYMBOL( _ZN3tbb18captured_exception8allocateEPKcS2_ ) __TBB_SYMBOL( _ZN3tbb18captured_exceptionD0Ev ) __TBB_SYMBOL( _ZN3tbb18captured_exceptionD1Ev ) __TBB_SYMBOL( _ZN3tbb18captured_exceptionD2Ev ) __TBB_SYMBOL( _ZTIN3tbb18captured_exceptionE ) __TBB_SYMBOL( _ZTSN3tbb18captured_exceptionE ) __TBB_SYMBOL( _ZTVN3tbb18captured_exceptionE ) __TBB_SYMBOL( _ZTIN3tbb13tbb_exceptionE ) __TBB_SYMBOL( _ZTSN3tbb13tbb_exceptionE ) __TBB_SYMBOL( _ZTVN3tbb13tbb_exceptionE ) #endif /* __TBB_TASK_GROUP_CONTEXT */ // Symbols for exceptions thrown from TBB __TBB_SYMBOL( _ZN3tbb8internal33throw_bad_last_alloc_exception_v4Ev ) __TBB_SYMBOL( _ZN3tbb8internal18throw_exception_v4ENS0_12exception_idE ) __TBB_SYMBOL( _ZNSt13runtime_errorD1Ev ) __TBB_SYMBOL( _ZTISt13runtime_error ) __TBB_SYMBOL( _ZTSSt13runtime_error ) __TBB_SYMBOL( _ZNSt16invalid_argumentD1Ev ) __TBB_SYMBOL( _ZTISt16invalid_argument ) __TBB_SYMBOL( _ZTSSt16invalid_argument ) __TBB_SYMBOL( _ZNSt11range_errorD1Ev ) __TBB_SYMBOL( _ZTISt11range_error ) __TBB_SYMBOL( _ZTSSt11range_error ) __TBB_SYMBOL( _ZNSt12length_errorD1Ev ) __TBB_SYMBOL( _ZTISt12length_error ) __TBB_SYMBOL( _ZTSSt12length_error ) __TBB_SYMBOL( _ZNSt12out_of_rangeD1Ev ) __TBB_SYMBOL( _ZTISt12out_of_range ) __TBB_SYMBOL( _ZTSSt12out_of_range ) __TBB_SYMBOL( _ZN3tbb14bad_last_allocD0Ev ) __TBB_SYMBOL( _ZN3tbb14bad_last_allocD1Ev ) __TBB_SYMBOL( _ZNK3tbb14bad_last_alloc4whatEv ) __TBB_SYMBOL( _ZTIN3tbb14bad_last_allocE ) __TBB_SYMBOL( _ZTSN3tbb14bad_last_allocE ) __TBB_SYMBOL( _ZTVN3tbb14bad_last_allocE ) __TBB_SYMBOL( _ZN3tbb12missing_waitD0Ev ) __TBB_SYMBOL( _ZN3tbb12missing_waitD1Ev ) __TBB_SYMBOL( _ZNK3tbb12missing_wait4whatEv ) __TBB_SYMBOL( _ZTIN3tbb12missing_waitE ) __TBB_SYMBOL( _ZTSN3tbb12missing_waitE ) __TBB_SYMBOL( _ZTVN3tbb12missing_waitE ) __TBB_SYMBOL( _ZN3tbb27invalid_multiple_schedulingD0Ev ) __TBB_SYMBOL( _ZN3tbb27invalid_multiple_schedulingD1Ev ) __TBB_SYMBOL( _ZNK3tbb27invalid_multiple_scheduling4whatEv ) __TBB_SYMBOL( _ZTIN3tbb27invalid_multiple_schedulingE ) __TBB_SYMBOL( _ZTSN3tbb27invalid_multiple_schedulingE ) __TBB_SYMBOL( _ZTVN3tbb27invalid_multiple_schedulingE ) __TBB_SYMBOL( _ZN3tbb13improper_lockD0Ev ) __TBB_SYMBOL( _ZN3tbb13improper_lockD1Ev ) __TBB_SYMBOL( _ZNK3tbb13improper_lock4whatEv ) __TBB_SYMBOL( _ZTIN3tbb13improper_lockE ) __TBB_SYMBOL( _ZTSN3tbb13improper_lockE ) __TBB_SYMBOL( _ZTVN3tbb13improper_lockE ) __TBB_SYMBOL( _ZN3tbb10user_abortD0Ev ) __TBB_SYMBOL( _ZN3tbb10user_abortD1Ev ) __TBB_SYMBOL( _ZNK3tbb10user_abort4whatEv ) __TBB_SYMBOL( _ZTIN3tbb10user_abortE ) __TBB_SYMBOL( _ZTSN3tbb10user_abortE ) __TBB_SYMBOL( _ZTVN3tbb10user_abortE ) // tbb_misc.cpp __TBB_SYMBOL( _ZN3tbb17assertion_failureEPKciS1_S1_ ) __TBB_SYMBOL( _ZN3tbb21set_assertion_handlerEPFvPKciS1_S1_E ) __TBB_SYMBOL( _ZN3tbb8internal13handle_perrorEiPKc ) __TBB_SYMBOL( _ZN3tbb8internal15runtime_warningEPKcz ) #if __TBB_x86_32 __TBB_SYMBOL( __TBB_machine_store8_slow_perf_warning ) __TBB_SYMBOL( __TBB_machine_store8_slow ) #endif __TBB_SYMBOL( TBB_runtime_interface_version ) // tbb_main.cpp __TBB_SYMBOL( _ZN3tbb8internal32itt_load_pointer_with_acquire_v3EPKv ) __TBB_SYMBOL( _ZN3tbb8internal33itt_store_pointer_with_release_v3EPvS1_ ) __TBB_SYMBOL( _ZN3tbb8internal18call_itt_notify_v5EiPv ) __TBB_SYMBOL( _ZN3tbb8internal19itt_load_pointer_v3EPKv ) __TBB_SYMBOL( _ZN3tbb8internal20itt_set_sync_name_v3EPvPKc ) // pipeline.cpp __TBB_SYMBOL( _ZTIN3tbb6filterE ) __TBB_SYMBOL( _ZTSN3tbb6filterE ) __TBB_SYMBOL( _ZTVN3tbb6filterE ) __TBB_SYMBOL( _ZN3tbb6filterD2Ev ) __TBB_SYMBOL( _ZN3tbb8pipeline10add_filterERNS_6filterE ) __TBB_SYMBOL( _ZN3tbb8pipeline12inject_tokenERNS_4taskE ) __TBB_SYMBOL( _ZN3tbb8pipeline13remove_filterERNS_6filterE ) __TBB_SYMBOL( _ZN3tbb8pipeline3runEm ) #if __TBB_TASK_GROUP_CONTEXT __TBB_SYMBOL( _ZN3tbb8pipeline3runEmRNS_18task_group_contextE ) #endif __TBB_SYMBOL( _ZN3tbb8pipeline5clearEv ) __TBB_SYMBOL( _ZN3tbb19thread_bound_filter12process_itemEv ) __TBB_SYMBOL( _ZN3tbb19thread_bound_filter16try_process_itemEv ) __TBB_SYMBOL( _ZN3tbb8pipelineC1Ev ) __TBB_SYMBOL( _ZN3tbb8pipelineC2Ev ) __TBB_SYMBOL( _ZN3tbb8pipelineD0Ev ) __TBB_SYMBOL( _ZN3tbb8pipelineD1Ev ) __TBB_SYMBOL( _ZN3tbb8pipelineD2Ev ) __TBB_SYMBOL( _ZTIN3tbb8pipelineE ) __TBB_SYMBOL( _ZTSN3tbb8pipelineE ) __TBB_SYMBOL( _ZTVN3tbb8pipelineE ) __TBB_SYMBOL( _ZN3tbb6filter16set_end_of_inputEv ) // queuing_rw_mutex.cpp __TBB_SYMBOL( _ZN3tbb16queuing_rw_mutex11scoped_lock17upgrade_to_writerEv ) __TBB_SYMBOL( _ZN3tbb16queuing_rw_mutex11scoped_lock19downgrade_to_readerEv ) __TBB_SYMBOL( _ZN3tbb16queuing_rw_mutex11scoped_lock7acquireERS0_b ) __TBB_SYMBOL( _ZN3tbb16queuing_rw_mutex11scoped_lock7releaseEv ) __TBB_SYMBOL( _ZN3tbb16queuing_rw_mutex11scoped_lock11try_acquireERS0_b ) __TBB_SYMBOL( _ZN3tbb16queuing_rw_mutex18internal_constructEv ) // reader_writer_lock.cpp __TBB_SYMBOL( _ZN3tbb10interface518reader_writer_lock11scoped_lock16internal_destroyEv ) __TBB_SYMBOL( _ZN3tbb10interface518reader_writer_lock11scoped_lock18internal_constructERS1_ ) __TBB_SYMBOL( _ZN3tbb10interface518reader_writer_lock13try_lock_readEv ) __TBB_SYMBOL( _ZN3tbb10interface518reader_writer_lock16scoped_lock_read16internal_destroyEv ) __TBB_SYMBOL( _ZN3tbb10interface518reader_writer_lock16scoped_lock_read18internal_constructERS1_ ) __TBB_SYMBOL( _ZN3tbb10interface518reader_writer_lock16internal_destroyEv ) __TBB_SYMBOL( _ZN3tbb10interface518reader_writer_lock18internal_constructEv ) __TBB_SYMBOL( _ZN3tbb10interface518reader_writer_lock4lockEv ) __TBB_SYMBOL( _ZN3tbb10interface518reader_writer_lock6unlockEv ) __TBB_SYMBOL( _ZN3tbb10interface518reader_writer_lock8try_lockEv ) __TBB_SYMBOL( _ZN3tbb10interface518reader_writer_lock9lock_readEv ) #if !TBB_NO_LEGACY // spin_rw_mutex.cpp v2 __TBB_SYMBOL( _ZN3tbb13spin_rw_mutex16internal_upgradeEPS0_ ) __TBB_SYMBOL( _ZN3tbb13spin_rw_mutex22internal_itt_releasingEPS0_ ) __TBB_SYMBOL( _ZN3tbb13spin_rw_mutex23internal_acquire_readerEPS0_ ) __TBB_SYMBOL( _ZN3tbb13spin_rw_mutex23internal_acquire_writerEPS0_ ) __TBB_SYMBOL( _ZN3tbb13spin_rw_mutex18internal_downgradeEPS0_ ) __TBB_SYMBOL( _ZN3tbb13spin_rw_mutex23internal_release_readerEPS0_ ) __TBB_SYMBOL( _ZN3tbb13spin_rw_mutex23internal_release_writerEPS0_ ) __TBB_SYMBOL( _ZN3tbb13spin_rw_mutex27internal_try_acquire_readerEPS0_ ) __TBB_SYMBOL( _ZN3tbb13spin_rw_mutex27internal_try_acquire_writerEPS0_ ) #endif // spin_rw_mutex v3 __TBB_SYMBOL( _ZN3tbb16spin_rw_mutex_v316internal_upgradeEv ) __TBB_SYMBOL( _ZN3tbb16spin_rw_mutex_v318internal_downgradeEv ) __TBB_SYMBOL( _ZN3tbb16spin_rw_mutex_v323internal_acquire_readerEv ) __TBB_SYMBOL( _ZN3tbb16spin_rw_mutex_v323internal_acquire_writerEv ) __TBB_SYMBOL( _ZN3tbb16spin_rw_mutex_v323internal_release_readerEv ) __TBB_SYMBOL( _ZN3tbb16spin_rw_mutex_v323internal_release_writerEv ) __TBB_SYMBOL( _ZN3tbb16spin_rw_mutex_v327internal_try_acquire_readerEv ) __TBB_SYMBOL( _ZN3tbb16spin_rw_mutex_v327internal_try_acquire_writerEv ) __TBB_SYMBOL( _ZN3tbb16spin_rw_mutex_v318internal_constructEv ) // x86_rtm_rw_mutex.cpp __TBB_SYMBOL( _ZN3tbb10interface88internal16x86_rtm_rw_mutex16internal_releaseERNS2_11scoped_lockE ) __TBB_SYMBOL( _ZN3tbb10interface88internal16x86_rtm_rw_mutex16internal_upgradeERNS2_11scoped_lockE ) __TBB_SYMBOL( _ZN3tbb10interface88internal16x86_rtm_rw_mutex18internal_constructEv ) __TBB_SYMBOL( _ZN3tbb10interface88internal16x86_rtm_rw_mutex18internal_downgradeERNS2_11scoped_lockE ) __TBB_SYMBOL( _ZN3tbb10interface88internal16x86_rtm_rw_mutex23internal_acquire_readerERNS2_11scoped_lockEb ) __TBB_SYMBOL( _ZN3tbb10interface88internal16x86_rtm_rw_mutex23internal_acquire_writerERNS2_11scoped_lockEb ) __TBB_SYMBOL( _ZN3tbb10interface88internal16x86_rtm_rw_mutex27internal_try_acquire_writerERNS2_11scoped_lockE ) // spin_mutex.cpp __TBB_SYMBOL( _ZN3tbb10spin_mutex11scoped_lock16internal_acquireERS0_ ) __TBB_SYMBOL( _ZN3tbb10spin_mutex11scoped_lock16internal_releaseEv ) __TBB_SYMBOL( _ZN3tbb10spin_mutex11scoped_lock20internal_try_acquireERS0_ ) __TBB_SYMBOL( _ZN3tbb10spin_mutex18internal_constructEv ) // mutex.cpp __TBB_SYMBOL( _ZN3tbb5mutex11scoped_lock16internal_acquireERS0_ ) __TBB_SYMBOL( _ZN3tbb5mutex11scoped_lock16internal_releaseEv ) __TBB_SYMBOL( _ZN3tbb5mutex11scoped_lock20internal_try_acquireERS0_ ) __TBB_SYMBOL( _ZN3tbb5mutex16internal_destroyEv ) __TBB_SYMBOL( _ZN3tbb5mutex18internal_constructEv ) // recursive_mutex.cpp __TBB_SYMBOL( _ZN3tbb15recursive_mutex11scoped_lock16internal_acquireERS0_ ) __TBB_SYMBOL( _ZN3tbb15recursive_mutex11scoped_lock16internal_releaseEv ) __TBB_SYMBOL( _ZN3tbb15recursive_mutex11scoped_lock20internal_try_acquireERS0_ ) __TBB_SYMBOL( _ZN3tbb15recursive_mutex16internal_destroyEv ) __TBB_SYMBOL( _ZN3tbb15recursive_mutex18internal_constructEv ) // queuing_mutex.cpp __TBB_SYMBOL( _ZN3tbb13queuing_mutex11scoped_lock7acquireERS0_ ) __TBB_SYMBOL( _ZN3tbb13queuing_mutex11scoped_lock7releaseEv ) __TBB_SYMBOL( _ZN3tbb13queuing_mutex11scoped_lock11try_acquireERS0_ ) __TBB_SYMBOL( _ZN3tbb13queuing_mutex18internal_constructEv ) // critical_section.cpp __TBB_SYMBOL( _ZN3tbb8internal19critical_section_v418internal_constructEv ) #if !TBB_NO_LEGACY // concurrent_hash_map __TBB_SYMBOL( _ZNK3tbb8internal21hash_map_segment_base23internal_grow_predicateEv ) // concurrent_queue.cpp v2 __TBB_SYMBOL( _ZN3tbb8internal21concurrent_queue_base12internal_popEPv ) __TBB_SYMBOL( _ZN3tbb8internal21concurrent_queue_base13internal_pushEPKv ) __TBB_SYMBOL( _ZN3tbb8internal21concurrent_queue_base21internal_set_capacityEim ) __TBB_SYMBOL( _ZN3tbb8internal21concurrent_queue_base23internal_pop_if_presentEPv ) __TBB_SYMBOL( _ZN3tbb8internal21concurrent_queue_base25internal_push_if_not_fullEPKv ) __TBB_SYMBOL( _ZN3tbb8internal21concurrent_queue_baseC2Em ) __TBB_SYMBOL( _ZN3tbb8internal21concurrent_queue_baseD2Ev ) __TBB_SYMBOL( _ZTIN3tbb8internal21concurrent_queue_baseE ) __TBB_SYMBOL( _ZTSN3tbb8internal21concurrent_queue_baseE ) __TBB_SYMBOL( _ZTVN3tbb8internal21concurrent_queue_baseE ) __TBB_SYMBOL( _ZN3tbb8internal30concurrent_queue_iterator_base6assignERKS1_ ) __TBB_SYMBOL( _ZN3tbb8internal30concurrent_queue_iterator_base7advanceEv ) __TBB_SYMBOL( _ZN3tbb8internal30concurrent_queue_iterator_baseC2ERKNS0_21concurrent_queue_baseE ) __TBB_SYMBOL( _ZN3tbb8internal30concurrent_queue_iterator_baseD2Ev ) __TBB_SYMBOL( _ZNK3tbb8internal21concurrent_queue_base13internal_sizeEv ) #endif // concurrent_queue v3 // constructors __TBB_SYMBOL( _ZN3tbb8internal33concurrent_queue_iterator_base_v3C2ERKNS0_24concurrent_queue_base_v3E ) __TBB_SYMBOL( _ZN3tbb8internal33concurrent_queue_iterator_base_v3C2ERKNS0_24concurrent_queue_base_v3Em ) __TBB_SYMBOL( _ZN3tbb8internal24concurrent_queue_base_v3C2Em ) // destructors __TBB_SYMBOL( _ZN3tbb8internal33concurrent_queue_iterator_base_v3D2Ev ) __TBB_SYMBOL( _ZN3tbb8internal24concurrent_queue_base_v3D2Ev ) // typeinfo __TBB_SYMBOL( _ZTIN3tbb8internal24concurrent_queue_base_v3E ) __TBB_SYMBOL( _ZTSN3tbb8internal24concurrent_queue_base_v3E ) // vtable __TBB_SYMBOL( _ZTVN3tbb8internal24concurrent_queue_base_v3E ) // methods __TBB_SYMBOL( _ZN3tbb8internal33concurrent_queue_iterator_base_v37advanceEv ) __TBB_SYMBOL( _ZN3tbb8internal33concurrent_queue_iterator_base_v36assignERKS1_ ) __TBB_SYMBOL( _ZN3tbb8internal24concurrent_queue_base_v313internal_pushEPKv ) __TBB_SYMBOL( _ZN3tbb8internal24concurrent_queue_base_v818internal_push_moveEPKv ) __TBB_SYMBOL( _ZN3tbb8internal24concurrent_queue_base_v325internal_push_if_not_fullEPKv ) __TBB_SYMBOL( _ZN3tbb8internal24concurrent_queue_base_v830internal_push_move_if_not_fullEPKv ) __TBB_SYMBOL( _ZN3tbb8internal24concurrent_queue_base_v312internal_popEPv ) __TBB_SYMBOL( _ZN3tbb8internal24concurrent_queue_base_v323internal_pop_if_presentEPv ) __TBB_SYMBOL( _ZN3tbb8internal24concurrent_queue_base_v314internal_abortEv ) __TBB_SYMBOL( _ZN3tbb8internal24concurrent_queue_base_v321internal_set_capacityEim ) __TBB_SYMBOL( _ZNK3tbb8internal24concurrent_queue_base_v313internal_sizeEv ) __TBB_SYMBOL( _ZNK3tbb8internal24concurrent_queue_base_v314internal_emptyEv ) __TBB_SYMBOL( _ZN3tbb8internal24concurrent_queue_base_v321internal_finish_clearEv ) __TBB_SYMBOL( _ZNK3tbb8internal24concurrent_queue_base_v324internal_throw_exceptionEv ) __TBB_SYMBOL( _ZN3tbb8internal24concurrent_queue_base_v36assignERKS1_ ) __TBB_SYMBOL( _ZN3tbb8internal24concurrent_queue_base_v812move_contentERS1_ ) #if !TBB_NO_LEGACY // concurrent_vector.cpp v2 __TBB_SYMBOL( _ZN3tbb8internal22concurrent_vector_base13internal_copyERKS1_mPFvPvPKvmE ) __TBB_SYMBOL( _ZN3tbb8internal22concurrent_vector_base14internal_clearEPFvPvmEb ) __TBB_SYMBOL( _ZN3tbb8internal22concurrent_vector_base15internal_assignERKS1_mPFvPvmEPFvS4_PKvmESA_ ) __TBB_SYMBOL( _ZN3tbb8internal22concurrent_vector_base16internal_grow_byEmmPFvPvmE ) __TBB_SYMBOL( _ZN3tbb8internal22concurrent_vector_base16internal_reserveEmmm ) __TBB_SYMBOL( _ZN3tbb8internal22concurrent_vector_base18internal_push_backEmRm ) __TBB_SYMBOL( _ZN3tbb8internal22concurrent_vector_base25internal_grow_to_at_leastEmmPFvPvmE ) __TBB_SYMBOL( _ZNK3tbb8internal22concurrent_vector_base17internal_capacityEv ) #endif // concurrent_vector v3 __TBB_SYMBOL( _ZN3tbb8internal25concurrent_vector_base_v313internal_copyERKS1_mPFvPvPKvmE ) __TBB_SYMBOL( _ZN3tbb8internal25concurrent_vector_base_v314internal_clearEPFvPvmE ) __TBB_SYMBOL( _ZN3tbb8internal25concurrent_vector_base_v315internal_assignERKS1_mPFvPvmEPFvS4_PKvmESA_ ) __TBB_SYMBOL( _ZN3tbb8internal25concurrent_vector_base_v316internal_grow_byEmmPFvPvPKvmES4_ ) __TBB_SYMBOL( _ZN3tbb8internal25concurrent_vector_base_v316internal_reserveEmmm ) __TBB_SYMBOL( _ZN3tbb8internal25concurrent_vector_base_v318internal_push_backEmRm ) __TBB_SYMBOL( _ZN3tbb8internal25concurrent_vector_base_v325internal_grow_to_at_leastEmmPFvPvPKvmES4_ ) __TBB_SYMBOL( _ZNK3tbb8internal25concurrent_vector_base_v317internal_capacityEv ) __TBB_SYMBOL( _ZN3tbb8internal25concurrent_vector_base_v316internal_compactEmPvPFvS2_mEPFvS2_PKvmE ) __TBB_SYMBOL( _ZN3tbb8internal25concurrent_vector_base_v313internal_swapERS1_ ) __TBB_SYMBOL( _ZNK3tbb8internal25concurrent_vector_base_v324internal_throw_exceptionEm ) __TBB_SYMBOL( _ZN3tbb8internal25concurrent_vector_base_v3D2Ev ) __TBB_SYMBOL( _ZN3tbb8internal25concurrent_vector_base_v315internal_resizeEmmmPKvPFvPvmEPFvS4_S3_mE ) __TBB_SYMBOL( _ZN3tbb8internal25concurrent_vector_base_v337internal_grow_to_at_least_with_resultEmmPFvPvPKvmES4_ ) // tbb_thread __TBB_SYMBOL( _ZN3tbb8internal13tbb_thread_v314internal_startEPFPvS2_ES2_ ) __TBB_SYMBOL( _ZN3tbb8internal13tbb_thread_v320hardware_concurrencyEv ) __TBB_SYMBOL( _ZN3tbb8internal13tbb_thread_v34joinEv ) __TBB_SYMBOL( _ZN3tbb8internal13tbb_thread_v36detachEv ) __TBB_SYMBOL( _ZN3tbb8internal15free_closure_v3EPv ) __TBB_SYMBOL( _ZN3tbb8internal15thread_sleep_v3ERKNS_10tick_count10interval_tE ) __TBB_SYMBOL( _ZN3tbb8internal15thread_yield_v3Ev ) __TBB_SYMBOL( _ZN3tbb8internal16thread_get_id_v3Ev ) __TBB_SYMBOL( _ZN3tbb8internal19allocate_closure_v3Em ) __TBB_SYMBOL( _ZN3tbb8internal7move_v3ERNS0_13tbb_thread_v3ES2_ ) #undef __TBB_SYMBOL ================================================ FILE: benchmarks/tbb/mac64-tbb-export.def ================================================ /* Copyright 2005-2014 Intel Corporation. All Rights Reserved. This file is part of Threading Building Blocks. Threading Building Blocks is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. Threading Building Blocks is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Threading Building Blocks; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA As a special exception, you may use this file as part of a free software library without restriction. Specifically, if other files instantiate templates or use macros or inline functions from this file, or you compile this file and link it with other files to produce an executable, this file does not by itself cause the resulting executable to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the executable file might be covered by the GNU General Public License. */ #define __TBB_SYMBOL( sym ) _##sym #include "mac64-tbb-export.lst" ================================================ FILE: benchmarks/tbb/mac64-tbb-export.lst ================================================ /* Copyright 2005-2014 Intel Corporation. All Rights Reserved. This file is part of Threading Building Blocks. Threading Building Blocks is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. Threading Building Blocks is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Threading Building Blocks; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA As a special exception, you may use this file as part of a free software library without restriction. Specifically, if other files instantiate templates or use macros or inline functions from this file, or you compile this file and link it with other files to produce an executable, this file does not by itself cause the resulting executable to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the executable file might be covered by the GNU General Public License. */ #include "tbb/tbb_config.h" /* Sometimes OS X* requires leading underscore (e. g. in export list file), but sometimes not (e. g. when searching symbol in a dynamic library via dlsym()). Symbols in this file SHOULD be listed WITHOUT one leading underscore. __TBB_SYMBOL macro should add underscore when necessary, depending on the indended usage. */ // cache_aligned_allocator.cpp __TBB_SYMBOL( _ZN3tbb8internal12NFS_AllocateEmmPv ) __TBB_SYMBOL( _ZN3tbb8internal15NFS_GetLineSizeEv ) __TBB_SYMBOL( _ZN3tbb8internal8NFS_FreeEPv ) __TBB_SYMBOL( _ZN3tbb8internal23allocate_via_handler_v3Em ) __TBB_SYMBOL( _ZN3tbb8internal25deallocate_via_handler_v3EPv ) __TBB_SYMBOL( _ZN3tbb8internal17is_malloc_used_v3Ev ) // task.cpp v3 __TBB_SYMBOL( _ZN3tbb4task13note_affinityEt ) __TBB_SYMBOL( _ZN3tbb4task22internal_set_ref_countEi ) __TBB_SYMBOL( _ZN3tbb4task28internal_decrement_ref_countEv ) __TBB_SYMBOL( _ZN3tbb4task22spawn_and_wait_for_allERNS_9task_listE ) __TBB_SYMBOL( _ZN3tbb4task4selfEv ) __TBB_SYMBOL( _ZN3tbb10interface58internal9task_base7destroyERNS_4taskE ) __TBB_SYMBOL( _ZNK3tbb4task26is_owned_by_current_threadEv ) __TBB_SYMBOL( _ZN3tbb8internal19allocate_root_proxy4freeERNS_4taskE ) __TBB_SYMBOL( _ZN3tbb8internal19allocate_root_proxy8allocateEm ) __TBB_SYMBOL( _ZN3tbb8internal28affinity_partitioner_base_v36resizeEj ) __TBB_SYMBOL( _ZN3tbb8internal36get_initial_auto_partitioner_divisorEv ) __TBB_SYMBOL( _ZNK3tbb8internal20allocate_child_proxy4freeERNS_4taskE ) __TBB_SYMBOL( _ZNK3tbb8internal20allocate_child_proxy8allocateEm ) __TBB_SYMBOL( _ZNK3tbb8internal27allocate_continuation_proxy4freeERNS_4taskE ) __TBB_SYMBOL( _ZNK3tbb8internal27allocate_continuation_proxy8allocateEm ) __TBB_SYMBOL( _ZNK3tbb8internal34allocate_additional_child_of_proxy4freeERNS_4taskE ) __TBB_SYMBOL( _ZNK3tbb8internal34allocate_additional_child_of_proxy8allocateEm ) __TBB_SYMBOL( _ZTIN3tbb4taskE ) __TBB_SYMBOL( _ZTSN3tbb4taskE ) __TBB_SYMBOL( _ZTVN3tbb4taskE ) __TBB_SYMBOL( _ZN3tbb19task_scheduler_init19default_num_threadsEv ) __TBB_SYMBOL( _ZN3tbb19task_scheduler_init10initializeEim ) __TBB_SYMBOL( _ZN3tbb19task_scheduler_init10initializeEi ) __TBB_SYMBOL( _ZN3tbb19task_scheduler_init9terminateEv ) #if __TBB_SCHEDULER_OBSERVER __TBB_SYMBOL( _ZN3tbb8internal26task_scheduler_observer_v37observeEb ) #endif /* __TBB_SCHEDULER_OBSERVER */ __TBB_SYMBOL( _ZN3tbb10empty_task7executeEv ) __TBB_SYMBOL( _ZN3tbb10empty_taskD0Ev ) __TBB_SYMBOL( _ZN3tbb10empty_taskD1Ev ) __TBB_SYMBOL( _ZTIN3tbb10empty_taskE ) __TBB_SYMBOL( _ZTSN3tbb10empty_taskE ) __TBB_SYMBOL( _ZTVN3tbb10empty_taskE ) #if __TBB_TASK_ARENA /* arena.cpp */ __TBB_SYMBOL( _ZN3tbb10interface78internal15task_arena_base19internal_initializeEv ) __TBB_SYMBOL( _ZN3tbb10interface78internal15task_arena_base18internal_terminateEv ) __TBB_SYMBOL( _ZNK3tbb10interface78internal15task_arena_base16internal_enqueueERNS_4taskEl ) __TBB_SYMBOL( _ZNK3tbb10interface78internal15task_arena_base16internal_executeERNS1_13delegate_baseE ) __TBB_SYMBOL( _ZNK3tbb10interface78internal15task_arena_base13internal_waitEv ) __TBB_SYMBOL( _ZN3tbb10interface78internal15task_arena_base21internal_current_slotEv ) #endif /* __TBB_TASK_ARENA */ #if !TBB_NO_LEGACY // task_v2.cpp __TBB_SYMBOL( _ZN3tbb4task7destroyERS0_ ) #endif // Exception handling in task scheduler #if __TBB_TASK_GROUP_CONTEXT __TBB_SYMBOL( _ZNK3tbb8internal32allocate_root_with_context_proxy8allocateEm ) __TBB_SYMBOL( _ZNK3tbb8internal32allocate_root_with_context_proxy4freeERNS_4taskE ) __TBB_SYMBOL( _ZN3tbb4task12change_groupERNS_18task_group_contextE ) __TBB_SYMBOL( _ZNK3tbb18task_group_context28is_group_execution_cancelledEv ) __TBB_SYMBOL( _ZN3tbb18task_group_context22cancel_group_executionEv ) __TBB_SYMBOL( _ZN3tbb18task_group_context26register_pending_exceptionEv ) __TBB_SYMBOL( _ZN3tbb18task_group_context5resetEv ) __TBB_SYMBOL( _ZN3tbb18task_group_context19capture_fp_settingsEv ) __TBB_SYMBOL( _ZN3tbb18task_group_context4initEv ) __TBB_SYMBOL( _ZN3tbb18task_group_contextD1Ev ) __TBB_SYMBOL( _ZN3tbb18task_group_contextD2Ev ) #if __TBB_TASK_PRIORITY __TBB_SYMBOL( _ZN3tbb18task_group_context12set_priorityENS_10priority_tE ) __TBB_SYMBOL( _ZNK3tbb18task_group_context8priorityEv ) #endif /* __TBB_TASK_PRIORITY */ __TBB_SYMBOL( _ZNK3tbb18captured_exception4nameEv ) __TBB_SYMBOL( _ZNK3tbb18captured_exception4whatEv ) __TBB_SYMBOL( _ZN3tbb18captured_exception10throw_selfEv ) __TBB_SYMBOL( _ZN3tbb18captured_exception3setEPKcS2_ ) __TBB_SYMBOL( _ZN3tbb18captured_exception4moveEv ) __TBB_SYMBOL( _ZN3tbb18captured_exception5clearEv ) __TBB_SYMBOL( _ZN3tbb18captured_exception7destroyEv ) __TBB_SYMBOL( _ZN3tbb18captured_exception8allocateEPKcS2_ ) __TBB_SYMBOL( _ZN3tbb18captured_exceptionD0Ev ) __TBB_SYMBOL( _ZN3tbb18captured_exceptionD1Ev ) __TBB_SYMBOL( _ZN3tbb18captured_exceptionD2Ev ) __TBB_SYMBOL( _ZTIN3tbb18captured_exceptionE ) __TBB_SYMBOL( _ZTSN3tbb18captured_exceptionE ) __TBB_SYMBOL( _ZTVN3tbb18captured_exceptionE ) __TBB_SYMBOL( _ZTIN3tbb13tbb_exceptionE ) __TBB_SYMBOL( _ZTSN3tbb13tbb_exceptionE ) __TBB_SYMBOL( _ZTVN3tbb13tbb_exceptionE ) #endif /* __TBB_TASK_GROUP_CONTEXT */ // Symbols for exceptions thrown from TBB __TBB_SYMBOL( _ZN3tbb8internal33throw_bad_last_alloc_exception_v4Ev ) __TBB_SYMBOL( _ZN3tbb8internal18throw_exception_v4ENS0_12exception_idE ) __TBB_SYMBOL( _ZNSt13runtime_errorD1Ev ) __TBB_SYMBOL( _ZTISt13runtime_error ) __TBB_SYMBOL( _ZTSSt13runtime_error ) __TBB_SYMBOL( _ZNSt16invalid_argumentD1Ev ) __TBB_SYMBOL( _ZTISt16invalid_argument ) __TBB_SYMBOL( _ZTSSt16invalid_argument ) __TBB_SYMBOL( _ZNSt11range_errorD1Ev ) __TBB_SYMBOL( _ZTISt11range_error ) __TBB_SYMBOL( _ZTSSt11range_error ) __TBB_SYMBOL( _ZNSt12length_errorD1Ev ) __TBB_SYMBOL( _ZTISt12length_error ) __TBB_SYMBOL( _ZTSSt12length_error ) __TBB_SYMBOL( _ZNSt12out_of_rangeD1Ev ) __TBB_SYMBOL( _ZTISt12out_of_range ) __TBB_SYMBOL( _ZTSSt12out_of_range ) __TBB_SYMBOL( _ZN3tbb14bad_last_allocD0Ev ) __TBB_SYMBOL( _ZN3tbb14bad_last_allocD1Ev ) __TBB_SYMBOL( _ZNK3tbb14bad_last_alloc4whatEv ) __TBB_SYMBOL( _ZTIN3tbb14bad_last_allocE ) __TBB_SYMBOL( _ZTSN3tbb14bad_last_allocE ) __TBB_SYMBOL( _ZTVN3tbb14bad_last_allocE ) __TBB_SYMBOL( _ZN3tbb12missing_waitD0Ev ) __TBB_SYMBOL( _ZN3tbb12missing_waitD1Ev ) __TBB_SYMBOL( _ZNK3tbb12missing_wait4whatEv ) __TBB_SYMBOL( _ZTIN3tbb12missing_waitE ) __TBB_SYMBOL( _ZTSN3tbb12missing_waitE ) __TBB_SYMBOL( _ZTVN3tbb12missing_waitE ) __TBB_SYMBOL( _ZN3tbb27invalid_multiple_schedulingD0Ev ) __TBB_SYMBOL( _ZN3tbb27invalid_multiple_schedulingD1Ev ) __TBB_SYMBOL( _ZNK3tbb27invalid_multiple_scheduling4whatEv ) __TBB_SYMBOL( _ZTIN3tbb27invalid_multiple_schedulingE ) __TBB_SYMBOL( _ZTSN3tbb27invalid_multiple_schedulingE ) __TBB_SYMBOL( _ZTVN3tbb27invalid_multiple_schedulingE ) __TBB_SYMBOL( _ZN3tbb13improper_lockD0Ev ) __TBB_SYMBOL( _ZN3tbb13improper_lockD1Ev ) __TBB_SYMBOL( _ZNK3tbb13improper_lock4whatEv ) __TBB_SYMBOL( _ZTIN3tbb13improper_lockE ) __TBB_SYMBOL( _ZTSN3tbb13improper_lockE ) __TBB_SYMBOL( _ZTVN3tbb13improper_lockE ) __TBB_SYMBOL( _ZN3tbb10user_abortD0Ev ) __TBB_SYMBOL( _ZN3tbb10user_abortD1Ev ) __TBB_SYMBOL( _ZNK3tbb10user_abort4whatEv ) __TBB_SYMBOL( _ZTIN3tbb10user_abortE ) __TBB_SYMBOL( _ZTSN3tbb10user_abortE ) __TBB_SYMBOL( _ZTVN3tbb10user_abortE ) // tbb_misc.cpp __TBB_SYMBOL( _ZN3tbb17assertion_failureEPKciS1_S1_ ) __TBB_SYMBOL( _ZN3tbb21set_assertion_handlerEPFvPKciS1_S1_E ) __TBB_SYMBOL( _ZN3tbb8internal13handle_perrorEiPKc ) __TBB_SYMBOL( _ZN3tbb8internal15runtime_warningEPKcz ) __TBB_SYMBOL( TBB_runtime_interface_version ) // tbb_main.cpp __TBB_SYMBOL( _ZN3tbb8internal32itt_load_pointer_with_acquire_v3EPKv ) __TBB_SYMBOL( _ZN3tbb8internal33itt_store_pointer_with_release_v3EPvS1_ ) __TBB_SYMBOL( _ZN3tbb8internal18call_itt_notify_v5EiPv ) __TBB_SYMBOL( _ZN3tbb8internal19itt_load_pointer_v3EPKv ) __TBB_SYMBOL( _ZN3tbb8internal20itt_set_sync_name_v3EPvPKc ) // pipeline.cpp __TBB_SYMBOL( _ZTIN3tbb6filterE ) __TBB_SYMBOL( _ZTSN3tbb6filterE ) __TBB_SYMBOL( _ZTVN3tbb6filterE ) __TBB_SYMBOL( _ZN3tbb6filterD2Ev ) __TBB_SYMBOL( _ZN3tbb8pipeline10add_filterERNS_6filterE ) __TBB_SYMBOL( _ZN3tbb8pipeline12inject_tokenERNS_4taskE ) __TBB_SYMBOL( _ZN3tbb8pipeline13remove_filterERNS_6filterE ) __TBB_SYMBOL( _ZN3tbb8pipeline3runEm ) #if __TBB_TASK_GROUP_CONTEXT __TBB_SYMBOL( _ZN3tbb8pipeline3runEmRNS_18task_group_contextE ) #endif __TBB_SYMBOL( _ZN3tbb8pipeline5clearEv ) __TBB_SYMBOL( _ZN3tbb19thread_bound_filter12process_itemEv ) __TBB_SYMBOL( _ZN3tbb19thread_bound_filter16try_process_itemEv ) __TBB_SYMBOL( _ZN3tbb8pipelineC1Ev ) __TBB_SYMBOL( _ZN3tbb8pipelineC2Ev ) __TBB_SYMBOL( _ZN3tbb8pipelineD0Ev ) __TBB_SYMBOL( _ZN3tbb8pipelineD1Ev ) __TBB_SYMBOL( _ZN3tbb8pipelineD2Ev ) __TBB_SYMBOL( _ZTIN3tbb8pipelineE ) __TBB_SYMBOL( _ZTSN3tbb8pipelineE ) __TBB_SYMBOL( _ZTVN3tbb8pipelineE ) __TBB_SYMBOL( _ZN3tbb6filter16set_end_of_inputEv ) // queuing_rw_mutex.cpp __TBB_SYMBOL( _ZN3tbb16queuing_rw_mutex11scoped_lock17upgrade_to_writerEv ) __TBB_SYMBOL( _ZN3tbb16queuing_rw_mutex11scoped_lock19downgrade_to_readerEv ) __TBB_SYMBOL( _ZN3tbb16queuing_rw_mutex11scoped_lock7acquireERS0_b ) __TBB_SYMBOL( _ZN3tbb16queuing_rw_mutex11scoped_lock7releaseEv ) __TBB_SYMBOL( _ZN3tbb16queuing_rw_mutex11scoped_lock11try_acquireERS0_b ) __TBB_SYMBOL( _ZN3tbb16queuing_rw_mutex18internal_constructEv ) // reader_writer_lock.cpp __TBB_SYMBOL( _ZN3tbb10interface518reader_writer_lock11scoped_lock16internal_destroyEv ) __TBB_SYMBOL( _ZN3tbb10interface518reader_writer_lock11scoped_lock18internal_constructERS1_ ) __TBB_SYMBOL( _ZN3tbb10interface518reader_writer_lock13try_lock_readEv ) __TBB_SYMBOL( _ZN3tbb10interface518reader_writer_lock16scoped_lock_read16internal_destroyEv ) __TBB_SYMBOL( _ZN3tbb10interface518reader_writer_lock16scoped_lock_read18internal_constructERS1_ ) __TBB_SYMBOL( _ZN3tbb10interface518reader_writer_lock16internal_destroyEv ) __TBB_SYMBOL( _ZN3tbb10interface518reader_writer_lock18internal_constructEv ) __TBB_SYMBOL( _ZN3tbb10interface518reader_writer_lock4lockEv ) __TBB_SYMBOL( _ZN3tbb10interface518reader_writer_lock6unlockEv ) __TBB_SYMBOL( _ZN3tbb10interface518reader_writer_lock8try_lockEv ) __TBB_SYMBOL( _ZN3tbb10interface518reader_writer_lock9lock_readEv ) #if !TBB_NO_LEGACY // spin_rw_mutex.cpp v2 __TBB_SYMBOL( _ZN3tbb13spin_rw_mutex16internal_upgradeEPS0_ ) __TBB_SYMBOL( _ZN3tbb13spin_rw_mutex22internal_itt_releasingEPS0_ ) __TBB_SYMBOL( _ZN3tbb13spin_rw_mutex23internal_acquire_readerEPS0_ ) __TBB_SYMBOL( _ZN3tbb13spin_rw_mutex23internal_acquire_writerEPS0_ ) __TBB_SYMBOL( _ZN3tbb13spin_rw_mutex18internal_downgradeEPS0_ ) __TBB_SYMBOL( _ZN3tbb13spin_rw_mutex23internal_release_readerEPS0_ ) __TBB_SYMBOL( _ZN3tbb13spin_rw_mutex23internal_release_writerEPS0_ ) __TBB_SYMBOL( _ZN3tbb13spin_rw_mutex27internal_try_acquire_readerEPS0_ ) __TBB_SYMBOL( _ZN3tbb13spin_rw_mutex27internal_try_acquire_writerEPS0_ ) #endif // spin_rw_mutex v3 __TBB_SYMBOL( _ZN3tbb16spin_rw_mutex_v316internal_upgradeEv ) __TBB_SYMBOL( _ZN3tbb16spin_rw_mutex_v318internal_downgradeEv ) __TBB_SYMBOL( _ZN3tbb16spin_rw_mutex_v323internal_acquire_readerEv ) __TBB_SYMBOL( _ZN3tbb16spin_rw_mutex_v323internal_acquire_writerEv ) __TBB_SYMBOL( _ZN3tbb16spin_rw_mutex_v323internal_release_readerEv ) __TBB_SYMBOL( _ZN3tbb16spin_rw_mutex_v323internal_release_writerEv ) __TBB_SYMBOL( _ZN3tbb16spin_rw_mutex_v327internal_try_acquire_readerEv ) __TBB_SYMBOL( _ZN3tbb16spin_rw_mutex_v327internal_try_acquire_writerEv ) __TBB_SYMBOL( _ZN3tbb16spin_rw_mutex_v318internal_constructEv ) // x86_rtm_rw_mutex.cpp __TBB_SYMBOL( _ZN3tbb10interface88internal16x86_rtm_rw_mutex16internal_releaseERNS2_11scoped_lockE ) __TBB_SYMBOL( _ZN3tbb10interface88internal16x86_rtm_rw_mutex16internal_upgradeERNS2_11scoped_lockE ) __TBB_SYMBOL( _ZN3tbb10interface88internal16x86_rtm_rw_mutex18internal_constructEv ) __TBB_SYMBOL( _ZN3tbb10interface88internal16x86_rtm_rw_mutex18internal_downgradeERNS2_11scoped_lockE ) __TBB_SYMBOL( _ZN3tbb10interface88internal16x86_rtm_rw_mutex23internal_acquire_readerERNS2_11scoped_lockEb ) __TBB_SYMBOL( _ZN3tbb10interface88internal16x86_rtm_rw_mutex23internal_acquire_writerERNS2_11scoped_lockEb ) __TBB_SYMBOL( _ZN3tbb10interface88internal16x86_rtm_rw_mutex27internal_try_acquire_writerERNS2_11scoped_lockE ) // spin_mutex.cpp __TBB_SYMBOL( _ZN3tbb10spin_mutex11scoped_lock16internal_acquireERS0_ ) __TBB_SYMBOL( _ZN3tbb10spin_mutex11scoped_lock16internal_releaseEv ) __TBB_SYMBOL( _ZN3tbb10spin_mutex11scoped_lock20internal_try_acquireERS0_ ) __TBB_SYMBOL( _ZN3tbb10spin_mutex18internal_constructEv ) // mutex.cpp __TBB_SYMBOL( _ZN3tbb5mutex11scoped_lock16internal_acquireERS0_ ) __TBB_SYMBOL( _ZN3tbb5mutex11scoped_lock16internal_releaseEv ) __TBB_SYMBOL( _ZN3tbb5mutex11scoped_lock20internal_try_acquireERS0_ ) __TBB_SYMBOL( _ZN3tbb5mutex16internal_destroyEv ) __TBB_SYMBOL( _ZN3tbb5mutex18internal_constructEv ) // recursive_mutex.cpp __TBB_SYMBOL( _ZN3tbb15recursive_mutex11scoped_lock16internal_acquireERS0_ ) __TBB_SYMBOL( _ZN3tbb15recursive_mutex11scoped_lock16internal_releaseEv ) __TBB_SYMBOL( _ZN3tbb15recursive_mutex11scoped_lock20internal_try_acquireERS0_ ) __TBB_SYMBOL( _ZN3tbb15recursive_mutex16internal_destroyEv ) __TBB_SYMBOL( _ZN3tbb15recursive_mutex18internal_constructEv ) // queuing_mutex.cpp __TBB_SYMBOL( _ZN3tbb13queuing_mutex11scoped_lock7acquireERS0_ ) __TBB_SYMBOL( _ZN3tbb13queuing_mutex11scoped_lock7releaseEv ) __TBB_SYMBOL( _ZN3tbb13queuing_mutex11scoped_lock11try_acquireERS0_ ) __TBB_SYMBOL( _ZN3tbb13queuing_mutex18internal_constructEv ) // critical_section.cpp __TBB_SYMBOL( _ZN3tbb8internal19critical_section_v418internal_constructEv ) #if !TBB_NO_LEGACY // concurrent_hash_map __TBB_SYMBOL( _ZNK3tbb8internal21hash_map_segment_base23internal_grow_predicateEv ) // concurrent_queue.cpp v2 __TBB_SYMBOL( _ZN3tbb8internal21concurrent_queue_base12internal_popEPv ) __TBB_SYMBOL( _ZN3tbb8internal21concurrent_queue_base13internal_pushEPKv ) __TBB_SYMBOL( _ZN3tbb8internal21concurrent_queue_base21internal_set_capacityElm ) __TBB_SYMBOL( _ZN3tbb8internal21concurrent_queue_base23internal_pop_if_presentEPv ) __TBB_SYMBOL( _ZN3tbb8internal21concurrent_queue_base25internal_push_if_not_fullEPKv ) __TBB_SYMBOL( _ZN3tbb8internal21concurrent_queue_baseC2Em ) __TBB_SYMBOL( _ZN3tbb8internal21concurrent_queue_baseD2Ev ) __TBB_SYMBOL( _ZTIN3tbb8internal21concurrent_queue_baseE ) __TBB_SYMBOL( _ZTSN3tbb8internal21concurrent_queue_baseE ) __TBB_SYMBOL( _ZTVN3tbb8internal21concurrent_queue_baseE ) __TBB_SYMBOL( _ZN3tbb8internal30concurrent_queue_iterator_base6assignERKS1_ ) __TBB_SYMBOL( _ZN3tbb8internal30concurrent_queue_iterator_base7advanceEv ) __TBB_SYMBOL( _ZN3tbb8internal30concurrent_queue_iterator_baseC2ERKNS0_21concurrent_queue_baseE ) __TBB_SYMBOL( _ZN3tbb8internal30concurrent_queue_iterator_baseD2Ev ) __TBB_SYMBOL( _ZNK3tbb8internal21concurrent_queue_base13internal_sizeEv ) #endif // concurrent_queue v3 // constructors __TBB_SYMBOL( _ZN3tbb8internal33concurrent_queue_iterator_base_v3C2ERKNS0_24concurrent_queue_base_v3E ) __TBB_SYMBOL( _ZN3tbb8internal33concurrent_queue_iterator_base_v3C2ERKNS0_24concurrent_queue_base_v3Em ) __TBB_SYMBOL( _ZN3tbb8internal24concurrent_queue_base_v3C2Em ) // destructors __TBB_SYMBOL( _ZN3tbb8internal33concurrent_queue_iterator_base_v3D2Ev ) __TBB_SYMBOL( _ZN3tbb8internal24concurrent_queue_base_v3D2Ev ) // typeinfo __TBB_SYMBOL( _ZTIN3tbb8internal24concurrent_queue_base_v3E ) __TBB_SYMBOL( _ZTSN3tbb8internal24concurrent_queue_base_v3E ) // vtable __TBB_SYMBOL( _ZTVN3tbb8internal24concurrent_queue_base_v3E ) // methods __TBB_SYMBOL( _ZN3tbb8internal33concurrent_queue_iterator_base_v36assignERKS1_ ) __TBB_SYMBOL( _ZN3tbb8internal33concurrent_queue_iterator_base_v37advanceEv ) __TBB_SYMBOL( _ZN3tbb8internal24concurrent_queue_base_v313internal_pushEPKv ) __TBB_SYMBOL( _ZN3tbb8internal24concurrent_queue_base_v818internal_push_moveEPKv ) __TBB_SYMBOL( _ZN3tbb8internal24concurrent_queue_base_v325internal_push_if_not_fullEPKv ) __TBB_SYMBOL( _ZN3tbb8internal24concurrent_queue_base_v830internal_push_move_if_not_fullEPKv ) __TBB_SYMBOL( _ZN3tbb8internal24concurrent_queue_base_v312internal_popEPv ) __TBB_SYMBOL( _ZN3tbb8internal24concurrent_queue_base_v323internal_pop_if_presentEPv ) __TBB_SYMBOL( _ZN3tbb8internal24concurrent_queue_base_v314internal_abortEv ) __TBB_SYMBOL( _ZN3tbb8internal24concurrent_queue_base_v321internal_finish_clearEv ) __TBB_SYMBOL( _ZN3tbb8internal24concurrent_queue_base_v321internal_set_capacityElm ) __TBB_SYMBOL( _ZNK3tbb8internal24concurrent_queue_base_v313internal_sizeEv ) __TBB_SYMBOL( _ZNK3tbb8internal24concurrent_queue_base_v314internal_emptyEv ) __TBB_SYMBOL( _ZNK3tbb8internal24concurrent_queue_base_v324internal_throw_exceptionEv ) __TBB_SYMBOL( _ZN3tbb8internal24concurrent_queue_base_v36assignERKS1_ ) __TBB_SYMBOL( _ZN3tbb8internal24concurrent_queue_base_v812move_contentERS1_ ) #if !TBB_NO_LEGACY // concurrent_vector.cpp v2 __TBB_SYMBOL( _ZN3tbb8internal22concurrent_vector_base13internal_copyERKS1_mPFvPvPKvmE ) __TBB_SYMBOL( _ZN3tbb8internal22concurrent_vector_base14internal_clearEPFvPvmEb ) __TBB_SYMBOL( _ZN3tbb8internal22concurrent_vector_base15internal_assignERKS1_mPFvPvmEPFvS4_PKvmESA_ ) __TBB_SYMBOL( _ZN3tbb8internal22concurrent_vector_base16internal_grow_byEmmPFvPvmE ) __TBB_SYMBOL( _ZN3tbb8internal22concurrent_vector_base16internal_reserveEmmm ) __TBB_SYMBOL( _ZN3tbb8internal22concurrent_vector_base18internal_push_backEmRm ) __TBB_SYMBOL( _ZN3tbb8internal22concurrent_vector_base25internal_grow_to_at_leastEmmPFvPvmE ) __TBB_SYMBOL( _ZNK3tbb8internal22concurrent_vector_base17internal_capacityEv ) #endif // concurrent_vector v3 __TBB_SYMBOL( _ZN3tbb8internal25concurrent_vector_base_v313internal_copyERKS1_mPFvPvPKvmE ) __TBB_SYMBOL( _ZN3tbb8internal25concurrent_vector_base_v314internal_clearEPFvPvmE ) __TBB_SYMBOL( _ZN3tbb8internal25concurrent_vector_base_v315internal_assignERKS1_mPFvPvmEPFvS4_PKvmESA_ ) __TBB_SYMBOL( _ZN3tbb8internal25concurrent_vector_base_v316internal_grow_byEmmPFvPvPKvmES4_ ) __TBB_SYMBOL( _ZN3tbb8internal25concurrent_vector_base_v316internal_reserveEmmm ) __TBB_SYMBOL( _ZN3tbb8internal25concurrent_vector_base_v318internal_push_backEmRm ) __TBB_SYMBOL( _ZN3tbb8internal25concurrent_vector_base_v325internal_grow_to_at_leastEmmPFvPvPKvmES4_ ) __TBB_SYMBOL( _ZNK3tbb8internal25concurrent_vector_base_v317internal_capacityEv ) __TBB_SYMBOL( _ZN3tbb8internal25concurrent_vector_base_v316internal_compactEmPvPFvS2_mEPFvS2_PKvmE ) __TBB_SYMBOL( _ZN3tbb8internal25concurrent_vector_base_v313internal_swapERS1_ ) __TBB_SYMBOL( _ZNK3tbb8internal25concurrent_vector_base_v324internal_throw_exceptionEm ) __TBB_SYMBOL( _ZN3tbb8internal25concurrent_vector_base_v3D2Ev ) __TBB_SYMBOL( _ZN3tbb8internal25concurrent_vector_base_v315internal_resizeEmmmPKvPFvPvmEPFvS4_S3_mE ) __TBB_SYMBOL( _ZN3tbb8internal25concurrent_vector_base_v337internal_grow_to_at_least_with_resultEmmPFvPvPKvmES4_ ) // tbb_thread __TBB_SYMBOL( _ZN3tbb8internal13tbb_thread_v320hardware_concurrencyEv ) __TBB_SYMBOL( _ZN3tbb8internal13tbb_thread_v36detachEv ) __TBB_SYMBOL( _ZN3tbb8internal16thread_get_id_v3Ev ) __TBB_SYMBOL( _ZN3tbb8internal15free_closure_v3EPv ) __TBB_SYMBOL( _ZN3tbb8internal13tbb_thread_v34joinEv ) __TBB_SYMBOL( _ZN3tbb8internal13tbb_thread_v314internal_startEPFPvS2_ES2_ ) __TBB_SYMBOL( _ZN3tbb8internal19allocate_closure_v3Em ) __TBB_SYMBOL( _ZN3tbb8internal7move_v3ERNS0_13tbb_thread_v3ES2_ ) __TBB_SYMBOL( _ZN3tbb8internal15thread_yield_v3Ev ) __TBB_SYMBOL( _ZN3tbb8internal15thread_sleep_v3ERKNS_10tick_count10interval_tE ) #undef __TBB_SYMBOL ================================================ FILE: benchmarks/tbb/machine/gcc_armv7.h ================================================ /* Copyright 2005-2014 Intel Corporation. All Rights Reserved. This file is part of Threading Building Blocks. Threading Building Blocks is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. Threading Building Blocks is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Threading Building Blocks; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA As a special exception, you may use this file as part of a free software library without restriction. Specifically, if other files instantiate templates or use macros or inline functions from this file, or you compile this file and link it with other files to produce an executable, this file does not by itself cause the resulting executable to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the executable file might be covered by the GNU General Public License. */ /* Platform isolation layer for the ARMv7-a architecture. */ #ifndef __TBB_machine_H #error Do not include this file directly; include tbb_machine.h instead #endif //TODO: is ARMv7 is the only version ever to support? #if !(__ARM_ARCH_7A__) #error compilation requires an ARMv7-a architecture. #endif #include #include #define __TBB_WORDSIZE 4 // Traditionally ARM is little-endian. // Note that, since only the layout of aligned 32-bit words is of interest, // any apparent PDP-endianness of 32-bit words at half-word alignment or // any little-endian ordering of big-endian 32-bit words in 64-bit quantities // may be disregarded for this setting. #if __BIG_ENDIAN__ || (defined(__BYTE_ORDER__) && __BYTE_ORDER__==__ORDER_BIG_ENDIAN__) #define __TBB_ENDIANNESS __TBB_ENDIAN_BIG #elif __LITTLE_ENDIAN__ || (defined(__BYTE_ORDER__) && __BYTE_ORDER__==__ORDER_LITTLE_ENDIAN__) #define __TBB_ENDIANNESS __TBB_ENDIAN_LITTLE #elif defined(__BYTE_ORDER__) #define __TBB_ENDIANNESS __TBB_ENDIAN_UNSUPPORTED #else #define __TBB_ENDIANNESS __TBB_ENDIAN_DETECT #endif #define __TBB_compiler_fence() __asm__ __volatile__("": : :"memory") #define __TBB_full_memory_fence() __asm__ __volatile__("dmb ish": : :"memory") #define __TBB_control_consistency_helper() __TBB_full_memory_fence() #define __TBB_acquire_consistency_helper() __TBB_full_memory_fence() #define __TBB_release_consistency_helper() __TBB_full_memory_fence() //-------------------------------------------------- // Compare and swap //-------------------------------------------------- /** * Atomic CAS for 32 bit values, if *ptr==comparand, then *ptr=value, returns *ptr * @param ptr pointer to value in memory to be swapped with value if *ptr==comparand * @param value value to assign *ptr to if *ptr==comparand * @param comparand value to compare with *ptr * @return value originally in memory at ptr, regardless of success */ static inline int32_t __TBB_machine_cmpswp4(volatile void *ptr, int32_t value, int32_t comparand ) { int32_t oldval, res; __TBB_full_memory_fence(); do { __asm__ __volatile__( "ldrex %1, [%3]\n" "mov %0, #0\n" "cmp %1, %4\n" "it eq\n" "strexeq %0, %5, [%3]\n" : "=&r" (res), "=&r" (oldval), "+Qo" (*(volatile int32_t*)ptr) : "r" ((int32_t *)ptr), "Ir" (comparand), "r" (value) : "cc"); } while (res); __TBB_full_memory_fence(); return oldval; } /** * Atomic CAS for 64 bit values, if *ptr==comparand, then *ptr=value, returns *ptr * @param ptr pointer to value in memory to be swapped with value if *ptr==comparand * @param value value to assign *ptr to if *ptr==comparand * @param comparand value to compare with *ptr * @return value originally in memory at ptr, regardless of success */ static inline int64_t __TBB_machine_cmpswp8(volatile void *ptr, int64_t value, int64_t comparand ) { int64_t oldval; int32_t res; __TBB_full_memory_fence(); do { __asm__ __volatile__( "mov %0, #0\n" "ldrexd %1, %H1, [%3]\n" "cmp %1, %4\n" "it eq\n" "cmpeq %H1, %H4\n" "it eq\n" "strexdeq %0, %5, %H5, [%3]" : "=&r" (res), "=&r" (oldval), "+Qo" (*(volatile int64_t*)ptr) : "r" ((int64_t *)ptr), "r" (comparand), "r" (value) : "cc"); } while (res); __TBB_full_memory_fence(); return oldval; } static inline int32_t __TBB_machine_fetchadd4(volatile void* ptr, int32_t addend) { unsigned long tmp; int32_t result, tmp2; __TBB_full_memory_fence(); __asm__ __volatile__( "1: ldrex %0, [%4]\n" " add %3, %0, %5\n" " strex %1, %3, [%4]\n" " cmp %1, #0\n" " bne 1b\n" : "=&r" (result), "=&r" (tmp), "+Qo" (*(volatile int32_t*)ptr), "=&r"(tmp2) : "r" ((int32_t *)ptr), "Ir" (addend) : "cc"); __TBB_full_memory_fence(); return result; } static inline int64_t __TBB_machine_fetchadd8(volatile void *ptr, int64_t addend) { unsigned long tmp; int64_t result, tmp2; __TBB_full_memory_fence(); __asm__ __volatile__( "1: ldrexd %0, %H0, [%4]\n" " adds %3, %0, %5\n" " adc %H3, %H0, %H5\n" " strexd %1, %3, %H3, [%4]\n" " cmp %1, #0\n" " bne 1b" : "=&r" (result), "=&r" (tmp), "+Qo" (*(volatile int64_t*)ptr), "=&r"(tmp2) : "r" ((int64_t *)ptr), "r" (addend) : "cc"); __TBB_full_memory_fence(); return result; } inline void __TBB_machine_pause (int32_t delay ) { while(delay>0) { __TBB_compiler_fence(); delay--; } } namespace tbb { namespace internal { template struct machine_load_store_relaxed { static inline T load ( const volatile T& location ) { const T value = location; /* * An extra memory barrier is required for errata #761319 * Please see http://infocenter.arm.com/help/topic/com.arm.doc.uan0004a */ __TBB_acquire_consistency_helper(); return value; } static inline void store ( volatile T& location, T value ) { location = value; } }; }} // namespaces internal, tbb // Machine specific atomic operations #define __TBB_CompareAndSwap4(P,V,C) __TBB_machine_cmpswp4(P,V,C) #define __TBB_CompareAndSwap8(P,V,C) __TBB_machine_cmpswp8(P,V,C) #define __TBB_Pause(V) __TBB_machine_pause(V) // Use generics for some things #define __TBB_USE_GENERIC_PART_WORD_CAS 1 #define __TBB_USE_GENERIC_PART_WORD_FETCH_ADD 1 #define __TBB_USE_GENERIC_PART_WORD_FETCH_STORE 1 #define __TBB_USE_GENERIC_FETCH_STORE 1 #define __TBB_USE_GENERIC_HALF_FENCED_LOAD_STORE 1 #define __TBB_USE_GENERIC_DWORD_LOAD_STORE 1 #define __TBB_USE_GENERIC_SEQUENTIAL_CONSISTENCY_LOAD_STORE 1 ================================================ FILE: benchmarks/tbb/machine/gcc_generic.h ================================================ /* Copyright 2005-2014 Intel Corporation. All Rights Reserved. This file is part of Threading Building Blocks. Threading Building Blocks is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. Threading Building Blocks is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Threading Building Blocks; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA As a special exception, you may use this file as part of a free software library without restriction. Specifically, if other files instantiate templates or use macros or inline functions from this file, or you compile this file and link it with other files to produce an executable, this file does not by itself cause the resulting executable to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the executable file might be covered by the GNU General Public License. */ #if !defined(__TBB_machine_H) || defined(__TBB_machine_gcc_generic_H) #error Do not #include this internal file directly; use public TBB headers instead. #endif #define __TBB_machine_gcc_generic_H #include #include #define __TBB_WORDSIZE __SIZEOF_POINTER__ #if __TBB_GCC_64BIT_ATOMIC_BUILTINS_BROKEN #define __TBB_64BIT_ATOMICS 0 #endif /** FPU control setting not available for non-Intel architectures on Android **/ #if __ANDROID__ && __TBB_generic_arch #define __TBB_CPU_CTL_ENV_PRESENT 0 #endif // __BYTE_ORDER__ is used in accordance with http://gcc.gnu.org/onlinedocs/cpp/Common-Predefined-Macros.html, // but __BIG_ENDIAN__ or __LITTLE_ENDIAN__ may be more commonly found instead. #if __BIG_ENDIAN__ || (defined(__BYTE_ORDER__) && __BYTE_ORDER__==__ORDER_BIG_ENDIAN__) #define __TBB_ENDIANNESS __TBB_ENDIAN_BIG #elif __LITTLE_ENDIAN__ || (defined(__BYTE_ORDER__) && __BYTE_ORDER__==__ORDER_LITTLE_ENDIAN__) #define __TBB_ENDIANNESS __TBB_ENDIAN_LITTLE #elif defined(__BYTE_ORDER__) #define __TBB_ENDIANNESS __TBB_ENDIAN_UNSUPPORTED #else #define __TBB_ENDIANNESS __TBB_ENDIAN_DETECT #endif /** As this generic implementation has absolutely no information about underlying hardware, its performance most likely will be sub-optimal because of full memory fence usages where a more lightweight synchronization means (or none at all) could suffice. Thus if you use this header to enable TBB on a new platform, consider forking it and relaxing below helpers as appropriate. **/ #define __TBB_acquire_consistency_helper() __sync_synchronize() #define __TBB_release_consistency_helper() __sync_synchronize() #define __TBB_full_memory_fence() __sync_synchronize() #define __TBB_control_consistency_helper() __sync_synchronize() #define __TBB_MACHINE_DEFINE_ATOMICS(S,T) \ inline T __TBB_machine_cmpswp##S( volatile void *ptr, T value, T comparand ) { \ return __sync_val_compare_and_swap(reinterpret_cast(ptr),comparand,value); \ } \ \ inline T __TBB_machine_fetchadd##S( volatile void *ptr, T value ) { \ return __sync_fetch_and_add(reinterpret_cast(ptr),value); \ } \ __TBB_MACHINE_DEFINE_ATOMICS(1,int8_t) __TBB_MACHINE_DEFINE_ATOMICS(2,int16_t) __TBB_MACHINE_DEFINE_ATOMICS(4,int32_t) __TBB_MACHINE_DEFINE_ATOMICS(8,int64_t) #undef __TBB_MACHINE_DEFINE_ATOMICS namespace tbb{ namespace internal { namespace gcc_builtins { inline int clz(unsigned int x){ return __builtin_clz(x);} inline int clz(unsigned long int x){ return __builtin_clzl(x);} inline int clz(unsigned long long int x){ return __builtin_clzll(x);} }}} //gcc __builtin_clz builtin count _number_ of leading zeroes static inline intptr_t __TBB_machine_lg( uintptr_t x ) { return sizeof(x)*8 - tbb::internal::gcc_builtins::clz(x) -1 ; } static inline void __TBB_machine_or( volatile void *ptr, uintptr_t addend ) { __sync_fetch_and_or(reinterpret_cast(ptr),addend); } static inline void __TBB_machine_and( volatile void *ptr, uintptr_t addend ) { __sync_fetch_and_and(reinterpret_cast(ptr),addend); } typedef unsigned char __TBB_Flag; typedef __TBB_atomic __TBB_Flag __TBB_atomic_flag; inline bool __TBB_machine_try_lock_byte( __TBB_atomic_flag &flag ) { return __sync_lock_test_and_set(&flag,1)==0; } inline void __TBB_machine_unlock_byte( __TBB_atomic_flag &flag ) { __sync_lock_release(&flag); } // Machine specific atomic operations #define __TBB_AtomicOR(P,V) __TBB_machine_or(P,V) #define __TBB_AtomicAND(P,V) __TBB_machine_and(P,V) #define __TBB_TryLockByte __TBB_machine_try_lock_byte #define __TBB_UnlockByte __TBB_machine_unlock_byte // Definition of other functions #define __TBB_Log2(V) __TBB_machine_lg(V) #define __TBB_USE_GENERIC_FETCH_STORE 1 #define __TBB_USE_GENERIC_HALF_FENCED_LOAD_STORE 1 #define __TBB_USE_GENERIC_RELAXED_LOAD_STORE 1 #define __TBB_USE_GENERIC_SEQUENTIAL_CONSISTENCY_LOAD_STORE 1 #if __TBB_WORDSIZE==4 #define __TBB_USE_GENERIC_DWORD_LOAD_STORE 1 #endif #if __TBB_x86_32 || __TBB_x86_64 #include "gcc_itsx.h" #endif ================================================ FILE: benchmarks/tbb/machine/gcc_ia32_common.h ================================================ /* Copyright 2005-2014 Intel Corporation. All Rights Reserved. This file is part of Threading Building Blocks. Threading Building Blocks is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. Threading Building Blocks is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Threading Building Blocks; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA As a special exception, you may use this file as part of a free software library without restriction. Specifically, if other files instantiate templates or use macros or inline functions from this file, or you compile this file and link it with other files to produce an executable, this file does not by itself cause the resulting executable to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the executable file might be covered by the GNU General Public License. */ #ifndef __TBB_machine_gcc_ia32_common_H #define __TBB_machine_gcc_ia32_common_H //TODO: Add a higher-level function, e.g. tbb::interal::log2(), into tbb_stddef.h, which //uses __TBB_Log2 and contains the assert and remove the assert from here and all other //platform-specific headers. //TODO: Check if use of gcc intrinsic gives a better chance for cross call optimizations template static inline intptr_t __TBB_machine_lg( T x ) { __TBB_ASSERT(x>0, "The logarithm of a non-positive value is undefined."); uintptr_t j; __asm__("bsr %1,%0" : "=r"(j) : "r"((uintptr_t)x)); return j; } #define __TBB_Log2(V) __TBB_machine_lg(V) #ifndef __TBB_Pause //TODO: check if raising a ratio of pause instructions to loop control instructions //(via e.g. loop unrolling) gives any benefit for HT. E.g, the current implementation //does about 2 CPU-consuming instructions for every pause instruction. Perhaps for //high pause counts it should use an unrolled loop to raise the ratio, and thus free //up more integer cycles for the other hyperthread. On the other hand, if the loop is //unrolled too far, it won't fit in the core's loop cache, and thus take away //instruction decode slots from the other hyperthread. //TODO: check if use of gcc __builtin_ia32_pause intrinsic gives a "some how" better performing code static inline void __TBB_machine_pause( int32_t delay ) { for (int32_t i = 0; i < delay; i++) { __asm__ __volatile__("pause;"); } return; } #define __TBB_Pause(V) __TBB_machine_pause(V) #endif /* !__TBB_Pause */ // API to retrieve/update FPU control setting #ifndef __TBB_CPU_CTL_ENV_PRESENT #define __TBB_CPU_CTL_ENV_PRESENT 1 namespace tbb { namespace internal { class cpu_ctl_env { private: int mxcsr; short x87cw; static const int MXCSR_CONTROL_MASK = ~0x3f; /* all except last six status bits */ public: bool operator!=( const cpu_ctl_env& ctl ) const { return mxcsr != ctl.mxcsr || x87cw != ctl.x87cw; } void get_env() { #if __TBB_ICC_12_0_INL_ASM_FSTCW_BROKEN cpu_ctl_env loc_ctl; __asm__ __volatile__ ( "stmxcsr %0\n\t" "fstcw %1" : "=m"(loc_ctl.mxcsr), "=m"(loc_ctl.x87cw) ); *this = loc_ctl; #else __asm__ __volatile__ ( "stmxcsr %0\n\t" "fstcw %1" : "=m"(mxcsr), "=m"(x87cw) ); #endif mxcsr &= MXCSR_CONTROL_MASK; } void set_env() const { __asm__ __volatile__ ( "ldmxcsr %0\n\t" "fldcw %1" : : "m"(mxcsr), "m"(x87cw) ); } }; } // namespace internal } // namespace tbb #endif /* !__TBB_CPU_CTL_ENV_PRESENT */ #include "gcc_itsx.h" #endif /* __TBB_machine_gcc_ia32_common_H */ ================================================ FILE: benchmarks/tbb/machine/gcc_itsx.h ================================================ /* Copyright 2005-2014 Intel Corporation. All Rights Reserved. This file is part of Threading Building Blocks. Threading Building Blocks is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. Threading Building Blocks is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Threading Building Blocks; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA As a special exception, you may use this file as part of a free software library without restriction. Specifically, if other files instantiate templates or use macros or inline functions from this file, or you compile this file and link it with other files to produce an executable, this file does not by itself cause the resulting executable to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the executable file might be covered by the GNU General Public License. */ #if !defined(__TBB_machine_H) || defined(__TBB_machine_gcc_itsx_H) #error Do not #include this internal file directly; use public TBB headers instead. #endif #define __TBB_machine_gcc_itsx_H #define __TBB_OP_XACQUIRE 0xF2 #define __TBB_OP_XRELEASE 0xF3 #define __TBB_OP_LOCK 0xF0 #define __TBB_STRINGIZE_INTERNAL(arg) #arg #define __TBB_STRINGIZE(arg) __TBB_STRINGIZE_INTERNAL(arg) #ifdef __TBB_x86_64 #define __TBB_r_out "=r" #else #define __TBB_r_out "=q" #endif inline static uint8_t __TBB_machine_try_lock_elided( volatile uint8_t* lk ) { uint8_t value = 1; __asm__ volatile (".byte " __TBB_STRINGIZE(__TBB_OP_XACQUIRE)"; lock; xchgb %0, %1;" : __TBB_r_out(value), "=m"(*lk) : "0"(value), "m"(*lk) : "memory" ); return uint8_t(value^1); } inline static void __TBB_machine_try_lock_elided_cancel() { // 'pause' instruction aborts HLE/RTM transactions __asm__ volatile ("pause\n" : : : "memory" ); } inline static void __TBB_machine_unlock_elided( volatile uint8_t* lk ) { __asm__ volatile (".byte " __TBB_STRINGIZE(__TBB_OP_XRELEASE)"; movb $0, %0" : "=m"(*lk) : "m"(*lk) : "memory" ); } #if __TBB_TSX_INTRINSICS_PRESENT #include #define __TBB_machine_is_in_transaction _xtest #define __TBB_machine_begin_transaction _xbegin #define __TBB_machine_end_transaction _xend #define __TBB_machine_transaction_conflict_abort() _xabort(0xff) #else /*! * Check if the instruction is executed in a transaction or not */ inline static bool __TBB_machine_is_in_transaction() { int8_t res = 0; #if __TBB_x86_32 __asm__ volatile (".byte 0x0F; .byte 0x01; .byte 0xD6;\n" "setz %0" : "=q"(res) : : "memory" ); #else __asm__ volatile (".byte 0x0F; .byte 0x01; .byte 0xD6;\n" "setz %0" : "=r"(res) : : "memory" ); #endif return res==0; } /*! * Enter speculative execution mode. * @return -1 on success * abort cause ( or 0 ) on abort */ inline static uint32_t __TBB_machine_begin_transaction() { uint32_t res = ~uint32_t(0); // success value __asm__ volatile ("1: .byte 0xC7; .byte 0xF8;\n" // XBEGIN " .long 2f-1b-6\n" // 2f-1b == difference in addresses of start // of XBEGIN and the MOVL // 2f - 1b - 6 == that difference minus the size of the // XBEGIN instruction. This is the abort offset to // 2: below. " jmp 3f\n" // success (leave -1 in res) "2: movl %%eax,%0\n" // store failure code in res "3:" :"=r"(res):"0"(res):"memory","%eax"); return res; } /*! * Attempt to commit/end transaction */ inline static void __TBB_machine_end_transaction() { __asm__ volatile (".byte 0x0F; .byte 0x01; .byte 0xD5" :::"memory"); // XEND } /* * aborts with code 0xFF (lock already held) */ inline static void __TBB_machine_transaction_conflict_abort() { __asm__ volatile (".byte 0xC6; .byte 0xF8; .byte 0xFF" :::"memory"); } #endif /* __TBB_TSX_INTRINSICS_PRESENT */ ================================================ FILE: benchmarks/tbb/machine/ibm_aix51.h ================================================ /* Copyright 2005-2014 Intel Corporation. All Rights Reserved. This file is part of Threading Building Blocks. Threading Building Blocks is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. Threading Building Blocks is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Threading Building Blocks; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA As a special exception, you may use this file as part of a free software library without restriction. Specifically, if other files instantiate templates or use macros or inline functions from this file, or you compile this file and link it with other files to produce an executable, this file does not by itself cause the resulting executable to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the executable file might be covered by the GNU General Public License. */ // TODO: revise by comparing with mac_ppc.h #if !defined(__TBB_machine_H) || defined(__TBB_machine_ibm_aix51_H) #error Do not #include this internal file directly; use public TBB headers instead. #endif #define __TBB_machine_ibm_aix51_H #define __TBB_WORDSIZE 8 #define __TBB_ENDIANNESS __TBB_ENDIAN_BIG // assumption based on operating system #include #include #include extern "C" { int32_t __TBB_machine_cas_32 (volatile void* ptr, int32_t value, int32_t comparand); int64_t __TBB_machine_cas_64 (volatile void* ptr, int64_t value, int64_t comparand); void __TBB_machine_flush (); void __TBB_machine_lwsync (); void __TBB_machine_isync (); } // Mapping of old entry point names retained for the sake of backward binary compatibility #define __TBB_machine_cmpswp4 __TBB_machine_cas_32 #define __TBB_machine_cmpswp8 __TBB_machine_cas_64 #define __TBB_Yield() sched_yield() #define __TBB_USE_GENERIC_PART_WORD_CAS 1 #define __TBB_USE_GENERIC_FETCH_ADD 1 #define __TBB_USE_GENERIC_FETCH_STORE 1 #define __TBB_USE_GENERIC_HALF_FENCED_LOAD_STORE 1 #define __TBB_USE_GENERIC_RELAXED_LOAD_STORE 1 #define __TBB_USE_GENERIC_SEQUENTIAL_CONSISTENCY_LOAD_STORE 1 #if __GNUC__ #define __TBB_control_consistency_helper() __asm__ __volatile__( "isync": : :"memory") #define __TBB_acquire_consistency_helper() __asm__ __volatile__("lwsync": : :"memory") #define __TBB_release_consistency_helper() __asm__ __volatile__("lwsync": : :"memory") #define __TBB_full_memory_fence() __asm__ __volatile__( "sync": : :"memory") #else // IBM C++ Compiler does not support inline assembly // TODO: Since XL 9.0 or earlier GCC syntax is supported. Replace with more // lightweight implementation (like in mac_ppc.h) #define __TBB_control_consistency_helper() __TBB_machine_isync () #define __TBB_acquire_consistency_helper() __TBB_machine_lwsync () #define __TBB_release_consistency_helper() __TBB_machine_lwsync () #define __TBB_full_memory_fence() __TBB_machine_flush () #endif ================================================ FILE: benchmarks/tbb/machine/icc_generic.h ================================================ /* Copyright 2005-2014 Intel Corporation. All Rights Reserved. This file is part of Threading Building Blocks. Threading Building Blocks is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. Threading Building Blocks is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Threading Building Blocks; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA As a special exception, you may use this file as part of a free software library without restriction. Specifically, if other files instantiate templates or use macros or inline functions from this file, or you compile this file and link it with other files to produce an executable, this file does not by itself cause the resulting executable to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the executable file might be covered by the GNU General Public License. */ #if !defined(__TBB_machine_H) || defined(__TBB_machine_icc_generic_H) #error Do not #include this internal file directly; use public TBB headers instead. #endif #if ! __TBB_ICC_BUILTIN_ATOMICS_PRESENT #error "Intel C++ Compiler of at least 12.0 version is needed to use ICC intrinsics port" #endif #define __TBB_machine_icc_generic_H //ICC mimics the "native" target compiler #if _MSC_VER #include "msvc_ia32_common.h" #else #include "gcc_ia32_common.h" #endif //TODO: Make __TBB_WORDSIZE macro optional for ICC intrinsics port. //As compiler intrinsics are used for all the operations it is possible to do. #if __TBB_x86_32 #define __TBB_WORDSIZE 4 #else #define __TBB_WORDSIZE 8 #endif #define __TBB_ENDIANNESS __TBB_ENDIAN_LITTLE //__TBB_compiler_fence() defined just in case, as it seems not to be used on its own anywhere else #if _MSC_VER //TODO: any way to use same intrinsics on windows and linux? #pragma intrinsic(_ReadWriteBarrier) #define __TBB_compiler_fence() _ReadWriteBarrier() #else #define __TBB_compiler_fence() __asm__ __volatile__("": : :"memory") #endif #ifndef __TBB_full_memory_fence #if _MSC_VER //TODO: any way to use same intrinsics on windows and linux? #pragma intrinsic(_mm_mfence) #define __TBB_full_memory_fence() _mm_mfence() #else #define __TBB_full_memory_fence() __asm__ __volatile__("mfence": : :"memory") #endif #endif #define __TBB_control_consistency_helper() __TBB_compiler_fence() namespace tbb { namespace internal { //TODO: is there any way to reuse definition of memory_order enum from ICC instead of copy paste. //however it seems unlikely that ICC will silently change exact enum values, as they are defined //in the ISO exactly like this. //TODO: add test that exact values of the enum are same as in the ISO C++11 typedef enum memory_order { memory_order_relaxed, memory_order_consume, memory_order_acquire, memory_order_release, memory_order_acq_rel, memory_order_seq_cst } memory_order; namespace icc_intrinsics_port { template T convert_argument(T value){ return value; } //The overload below is needed to have explicit conversion of pointer to void* in argument list. //compiler bug? //TODO: add according broken macro and recheck with ICC 13.0 if the overload is still needed template void* convert_argument(T* value){ return (void*)value; } } //TODO: code below is a bit repetitive, consider simplifying it template struct machine_load_store { static T load_with_acquire ( const volatile T& location ) { return __atomic_load_explicit(&location, memory_order_acquire); } static void store_with_release ( volatile T &location, T value ) { __atomic_store_explicit(&location, icc_intrinsics_port::convert_argument(value), memory_order_release); } }; template struct machine_load_store_relaxed { static inline T load ( const T& location ) { return __atomic_load_explicit(&location, memory_order_relaxed); } static inline void store ( T& location, T value ) { __atomic_store_explicit(&location, icc_intrinsics_port::convert_argument(value), memory_order_relaxed); } }; template struct machine_load_store_seq_cst { static T load ( const volatile T& location ) { return __atomic_load_explicit(&location, memory_order_seq_cst); } static void store ( volatile T &location, T value ) { __atomic_store_explicit(&location, value, memory_order_seq_cst); } }; }} // namespace tbb::internal namespace tbb{ namespace internal { namespace icc_intrinsics_port{ typedef enum memory_order_map { relaxed = memory_order_relaxed, acquire = memory_order_acquire, release = memory_order_release, full_fence= memory_order_seq_cst } memory_order_map; }}}// namespace tbb::internal #define __TBB_MACHINE_DEFINE_ATOMICS(S,T,M) \ inline T __TBB_machine_cmpswp##S##M( volatile void *ptr, T value, T comparand ) { \ __atomic_compare_exchange_strong_explicit( \ (T*)ptr \ ,&comparand \ ,value \ , tbb::internal::icc_intrinsics_port::M \ , tbb::internal::icc_intrinsics_port::M); \ return comparand; \ } \ \ inline T __TBB_machine_fetchstore##S##M(volatile void *ptr, T value) { \ return __atomic_exchange_explicit((T*)ptr, value, tbb::internal::icc_intrinsics_port::M); \ } \ \ inline T __TBB_machine_fetchadd##S##M(volatile void *ptr, T value) { \ return __atomic_fetch_add_explicit((T*)ptr, value, tbb::internal::icc_intrinsics_port::M); \ } \ __TBB_MACHINE_DEFINE_ATOMICS(1,tbb::internal::int8_t, full_fence) __TBB_MACHINE_DEFINE_ATOMICS(1,tbb::internal::int8_t, acquire) __TBB_MACHINE_DEFINE_ATOMICS(1,tbb::internal::int8_t, release) __TBB_MACHINE_DEFINE_ATOMICS(1,tbb::internal::int8_t, relaxed) __TBB_MACHINE_DEFINE_ATOMICS(2,tbb::internal::int16_t, full_fence) __TBB_MACHINE_DEFINE_ATOMICS(2,tbb::internal::int16_t, acquire) __TBB_MACHINE_DEFINE_ATOMICS(2,tbb::internal::int16_t, release) __TBB_MACHINE_DEFINE_ATOMICS(2,tbb::internal::int16_t, relaxed) __TBB_MACHINE_DEFINE_ATOMICS(4,tbb::internal::int32_t, full_fence) __TBB_MACHINE_DEFINE_ATOMICS(4,tbb::internal::int32_t, acquire) __TBB_MACHINE_DEFINE_ATOMICS(4,tbb::internal::int32_t, release) __TBB_MACHINE_DEFINE_ATOMICS(4,tbb::internal::int32_t, relaxed) __TBB_MACHINE_DEFINE_ATOMICS(8,tbb::internal::int64_t, full_fence) __TBB_MACHINE_DEFINE_ATOMICS(8,tbb::internal::int64_t, acquire) __TBB_MACHINE_DEFINE_ATOMICS(8,tbb::internal::int64_t, release) __TBB_MACHINE_DEFINE_ATOMICS(8,tbb::internal::int64_t, relaxed) #undef __TBB_MACHINE_DEFINE_ATOMICS #define __TBB_USE_FENCED_ATOMICS 1 namespace tbb { namespace internal { #if __TBB_FORCE_64BIT_ALIGNMENT_BROKEN __TBB_MACHINE_DEFINE_LOAD8_GENERIC_FENCED(full_fence) __TBB_MACHINE_DEFINE_STORE8_GENERIC_FENCED(full_fence) __TBB_MACHINE_DEFINE_LOAD8_GENERIC_FENCED(acquire) __TBB_MACHINE_DEFINE_STORE8_GENERIC_FENCED(release) __TBB_MACHINE_DEFINE_LOAD8_GENERIC_FENCED(relaxed) __TBB_MACHINE_DEFINE_STORE8_GENERIC_FENCED(relaxed) template struct machine_load_store { static T load_with_acquire ( const volatile T& location ) { if( tbb::internal::is_aligned(&location,8)) { return __atomic_load_explicit(&location, memory_order_acquire); } else { return __TBB_machine_generic_load8acquire(&location); } } static void store_with_release ( volatile T &location, T value ) { if( tbb::internal::is_aligned(&location,8)) { __atomic_store_explicit(&location, icc_intrinsics_port::convert_argument(value), memory_order_release); } else { return __TBB_machine_generic_store8release(&location,value); } } }; template struct machine_load_store_relaxed { static T load( const volatile T& location ) { if( tbb::internal::is_aligned(&location,8)) { return __atomic_load_explicit(&location, memory_order_relaxed); } else { return __TBB_machine_generic_load8relaxed(&location); } } static void store( volatile T &location, T value ) { if( tbb::internal::is_aligned(&location,8)) { __atomic_store_explicit(&location, icc_intrinsics_port::convert_argument(value), memory_order_relaxed); } else { return __TBB_machine_generic_store8relaxed(&location,value); } } }; template struct machine_load_store_seq_cst { static T load ( const volatile T& location ) { if( tbb::internal::is_aligned(&location,8)) { return __atomic_load_explicit(&location, memory_order_seq_cst); } else { return __TBB_machine_generic_load8full_fence(&location); } } static void store ( volatile T &location, T value ) { if( tbb::internal::is_aligned(&location,8)) { __atomic_store_explicit(&location, value, memory_order_seq_cst); } else { return __TBB_machine_generic_store8full_fence(&location,value); } } }; #endif }} // namespace tbb::internal template inline void __TBB_machine_OR( T *operand, T addend ) { __atomic_fetch_or_explicit(operand, addend, tbb::internal::memory_order_seq_cst); } template inline void __TBB_machine_AND( T *operand, T addend ) { __atomic_fetch_and_explicit(operand, addend, tbb::internal::memory_order_seq_cst); } ================================================ FILE: benchmarks/tbb/machine/linux_common.h ================================================ /* Copyright 2005-2014 Intel Corporation. All Rights Reserved. This file is part of Threading Building Blocks. Threading Building Blocks is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. Threading Building Blocks is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Threading Building Blocks; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA As a special exception, you may use this file as part of a free software library without restriction. Specifically, if other files instantiate templates or use macros or inline functions from this file, or you compile this file and link it with other files to produce an executable, this file does not by itself cause the resulting executable to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the executable file might be covered by the GNU General Public License. */ #ifndef __TBB_machine_H #error Do not #include this internal file directly; use public TBB headers instead. #endif #include #define __TBB_Yield() sched_yield() #include /* Futex definitions */ #include #if defined(SYS_futex) #define __TBB_USE_FUTEX 1 #include #include // Unfortunately, some versions of Linux do not have a header that defines FUTEX_WAIT and FUTEX_WAKE. #ifdef FUTEX_WAIT #define __TBB_FUTEX_WAIT FUTEX_WAIT #else #define __TBB_FUTEX_WAIT 0 #endif #ifdef FUTEX_WAKE #define __TBB_FUTEX_WAKE FUTEX_WAKE #else #define __TBB_FUTEX_WAKE 1 #endif #ifndef __TBB_ASSERT #error machine specific headers must be included after tbb_stddef.h #endif namespace tbb { namespace internal { inline int futex_wait( void *futex, int comparand ) { int r = syscall( SYS_futex,futex,__TBB_FUTEX_WAIT,comparand,NULL,NULL,0 ); #if TBB_USE_ASSERT int e = errno; __TBB_ASSERT( r==0||r==EWOULDBLOCK||(r==-1&&(e==EAGAIN||e==EINTR)), "futex_wait failed." ); #endif /* TBB_USE_ASSERT */ return r; } inline int futex_wakeup_one( void *futex ) { int r = ::syscall( SYS_futex,futex,__TBB_FUTEX_WAKE,1,NULL,NULL,0 ); __TBB_ASSERT( r==0||r==1, "futex_wakeup_one: more than one thread woken up?" ); return r; } inline int futex_wakeup_all( void *futex ) { int r = ::syscall( SYS_futex,futex,__TBB_FUTEX_WAKE,INT_MAX,NULL,NULL,0 ); __TBB_ASSERT( r>=0, "futex_wakeup_all: error in waking up threads" ); return r; } } /* namespace internal */ } /* namespace tbb */ #endif /* SYS_futex */ ================================================ FILE: benchmarks/tbb/machine/linux_ia32.h ================================================ /* Copyright 2005-2014 Intel Corporation. All Rights Reserved. This file is part of Threading Building Blocks. Threading Building Blocks is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. Threading Building Blocks is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Threading Building Blocks; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA As a special exception, you may use this file as part of a free software library without restriction. Specifically, if other files instantiate templates or use macros or inline functions from this file, or you compile this file and link it with other files to produce an executable, this file does not by itself cause the resulting executable to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the executable file might be covered by the GNU General Public License. */ #if !defined(__TBB_machine_H) || defined(__TBB_machine_linux_ia32_H) #error Do not #include this internal file directly; use public TBB headers instead. #endif #define __TBB_machine_linux_ia32_H #include #include "gcc_ia32_common.h" #define __TBB_WORDSIZE 4 #define __TBB_ENDIANNESS __TBB_ENDIAN_LITTLE #define __TBB_compiler_fence() __asm__ __volatile__("": : :"memory") #define __TBB_control_consistency_helper() __TBB_compiler_fence() #define __TBB_acquire_consistency_helper() __TBB_compiler_fence() #define __TBB_release_consistency_helper() __TBB_compiler_fence() #define __TBB_full_memory_fence() __asm__ __volatile__("mfence": : :"memory") #if __TBB_ICC_ASM_VOLATILE_BROKEN #define __TBB_VOLATILE #else #define __TBB_VOLATILE volatile #endif #define __TBB_MACHINE_DEFINE_ATOMICS(S,T,X,R) \ static inline T __TBB_machine_cmpswp##S (volatile void *ptr, T value, T comparand ) \ { \ T result; \ \ __asm__ __volatile__("lock\ncmpxchg" X " %2,%1" \ : "=a"(result), "=m"(*(__TBB_VOLATILE T*)ptr) \ : "q"(value), "0"(comparand), "m"(*(__TBB_VOLATILE T*)ptr) \ : "memory"); \ return result; \ } \ \ static inline T __TBB_machine_fetchadd##S(volatile void *ptr, T addend) \ { \ T result; \ __asm__ __volatile__("lock\nxadd" X " %0,%1" \ : R (result), "=m"(*(__TBB_VOLATILE T*)ptr) \ : "0"(addend), "m"(*(__TBB_VOLATILE T*)ptr) \ : "memory"); \ return result; \ } \ \ static inline T __TBB_machine_fetchstore##S(volatile void *ptr, T value) \ { \ T result; \ __asm__ __volatile__("lock\nxchg" X " %0,%1" \ : R (result), "=m"(*(__TBB_VOLATILE T*)ptr) \ : "0"(value), "m"(*(__TBB_VOLATILE T*)ptr) \ : "memory"); \ return result; \ } \ __TBB_MACHINE_DEFINE_ATOMICS(1,int8_t,"","=q") __TBB_MACHINE_DEFINE_ATOMICS(2,int16_t,"","=r") __TBB_MACHINE_DEFINE_ATOMICS(4,int32_t,"l","=r") #if __INTEL_COMPILER #pragma warning( push ) // reference to EBX in a function requiring stack alignment #pragma warning( disable: 998 ) #endif #if __TBB_GCC_CAS8_BUILTIN_INLINING_BROKEN #define __TBB_IA32_CAS8_NOINLINE __attribute__ ((noinline)) #else #define __TBB_IA32_CAS8_NOINLINE #endif static inline __TBB_IA32_CAS8_NOINLINE int64_t __TBB_machine_cmpswp8 (volatile void *ptr, int64_t value, int64_t comparand ) { //TODO: remove the extra part of condition once __TBB_GCC_BUILTIN_ATOMICS_PRESENT is lowered to gcc version 4.1.2 #if (__TBB_GCC_BUILTIN_ATOMICS_PRESENT || (__TBB_GCC_VERSION >= 40102)) && !__TBB_GCC_64BIT_ATOMIC_BUILTINS_BROKEN return __sync_val_compare_and_swap( reinterpret_cast(ptr), comparand, value ); #else /* !__TBB_GCC_BUILTIN_ATOMICS_PRESENT */ //TODO: look like ICC 13.0 has some issues with this code, investigate it more deeply int64_t result; union { int64_t i64; int32_t i32[2]; }; i64 = value; #if __PIC__ /* compiling position-independent code */ // EBX register preserved for compliance with position-independent code rules on IA32 int32_t tmp; __asm__ __volatile__ ( "movl %%ebx,%2\n\t" "movl %5,%%ebx\n\t" #if __GNUC__==3 "lock\n\t cmpxchg8b %1\n\t" #else "lock\n\t cmpxchg8b (%3)\n\t" #endif "movl %2,%%ebx" : "=A"(result) , "=m"(*(__TBB_VOLATILE int64_t *)ptr) , "=m"(tmp) #if __GNUC__==3 : "m"(*(__TBB_VOLATILE int64_t *)ptr) #else : "SD"(ptr) #endif , "0"(comparand) , "m"(i32[0]), "c"(i32[1]) : "memory" #if __INTEL_COMPILER ,"ebx" #endif ); #else /* !__PIC__ */ __asm__ __volatile__ ( "lock\n\t cmpxchg8b %1\n\t" : "=A"(result), "=m"(*(__TBB_VOLATILE int64_t *)ptr) : "m"(*(__TBB_VOLATILE int64_t *)ptr) , "0"(comparand) , "b"(i32[0]), "c"(i32[1]) : "memory" ); #endif /* __PIC__ */ return result; #endif /* !__TBB_GCC_BUILTIN_ATOMICS_PRESENT */ } #undef __TBB_IA32_CAS8_NOINLINE #if __INTEL_COMPILER #pragma warning( pop ) #endif // warning 998 is back static inline void __TBB_machine_or( volatile void *ptr, uint32_t addend ) { __asm__ __volatile__("lock\norl %1,%0" : "=m"(*(__TBB_VOLATILE uint32_t *)ptr) : "r"(addend), "m"(*(__TBB_VOLATILE uint32_t *)ptr) : "memory"); } static inline void __TBB_machine_and( volatile void *ptr, uint32_t addend ) { __asm__ __volatile__("lock\nandl %1,%0" : "=m"(*(__TBB_VOLATILE uint32_t *)ptr) : "r"(addend), "m"(*(__TBB_VOLATILE uint32_t *)ptr) : "memory"); } //TODO: Check if it possible and profitable for IA-32 architecture on (Linux* and Windows*) //to use of 64-bit load/store via floating point registers together with full fence //for sequentially consistent load/store, instead of CAS. #if __clang__ #define __TBB_fildq "fildll" #define __TBB_fistpq "fistpll" #else #define __TBB_fildq "fildq" #define __TBB_fistpq "fistpq" #endif static inline int64_t __TBB_machine_aligned_load8 (const volatile void *ptr) { __TBB_ASSERT(tbb::internal::is_aligned(ptr,8),"__TBB_machine_aligned_load8 should be used with 8 byte aligned locations only \n"); int64_t result; __asm__ __volatile__ ( __TBB_fildq " %1\n\t" __TBB_fistpq " %0" : "=m"(result) : "m"(*(const __TBB_VOLATILE uint64_t*)ptr) : "memory" ); return result; } static inline void __TBB_machine_aligned_store8 (volatile void *ptr, int64_t value ) { __TBB_ASSERT(tbb::internal::is_aligned(ptr,8),"__TBB_machine_aligned_store8 should be used with 8 byte aligned locations only \n"); // Aligned store __asm__ __volatile__ ( __TBB_fildq " %1\n\t" __TBB_fistpq " %0" : "=m"(*(__TBB_VOLATILE int64_t*)ptr) : "m"(value) : "memory" ); } static inline int64_t __TBB_machine_load8 (const volatile void *ptr) { #if __TBB_FORCE_64BIT_ALIGNMENT_BROKEN if( tbb::internal::is_aligned(ptr,8)) { #endif return __TBB_machine_aligned_load8(ptr); #if __TBB_FORCE_64BIT_ALIGNMENT_BROKEN } else { // Unaligned load return __TBB_machine_cmpswp8(const_cast(ptr),0,0); } #endif } //! Handles misaligned 8-byte store /** Defined in tbb_misc.cpp */ extern "C" void __TBB_machine_store8_slow( volatile void *ptr, int64_t value ); extern "C" void __TBB_machine_store8_slow_perf_warning( volatile void *ptr ); static inline void __TBB_machine_store8(volatile void *ptr, int64_t value) { #if __TBB_FORCE_64BIT_ALIGNMENT_BROKEN if( tbb::internal::is_aligned(ptr,8)) { #endif __TBB_machine_aligned_store8(ptr,value); #if __TBB_FORCE_64BIT_ALIGNMENT_BROKEN } else { // Unaligned store #if TBB_USE_PERFORMANCE_WARNINGS __TBB_machine_store8_slow_perf_warning(ptr); #endif /* TBB_USE_PERFORMANCE_WARNINGS */ __TBB_machine_store8_slow(ptr,value); } #endif } // Machine specific atomic operations #define __TBB_AtomicOR(P,V) __TBB_machine_or(P,V) #define __TBB_AtomicAND(P,V) __TBB_machine_and(P,V) #define __TBB_USE_GENERIC_DWORD_FETCH_ADD 1 #define __TBB_USE_GENERIC_DWORD_FETCH_STORE 1 #define __TBB_USE_FETCHSTORE_AS_FULL_FENCED_STORE 1 #define __TBB_USE_GENERIC_HALF_FENCED_LOAD_STORE 1 #define __TBB_USE_GENERIC_RELAXED_LOAD_STORE 1 #define __TBB_USE_GENERIC_SEQUENTIAL_CONSISTENCY_LOAD_STORE 1 ================================================ FILE: benchmarks/tbb/machine/linux_ia64.h ================================================ /* Copyright 2005-2014 Intel Corporation. All Rights Reserved. This file is part of Threading Building Blocks. Threading Building Blocks is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. Threading Building Blocks is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Threading Building Blocks; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA As a special exception, you may use this file as part of a free software library without restriction. Specifically, if other files instantiate templates or use macros or inline functions from this file, or you compile this file and link it with other files to produce an executable, this file does not by itself cause the resulting executable to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the executable file might be covered by the GNU General Public License. */ #if !defined(__TBB_machine_H) || defined(__TBB_machine_linux_ia64_H) #error Do not #include this internal file directly; use public TBB headers instead. #endif #define __TBB_machine_linux_ia64_H #include #include #define __TBB_WORDSIZE 8 #define __TBB_ENDIANNESS __TBB_ENDIAN_LITTLE #if __INTEL_COMPILER #define __TBB_compiler_fence() #define __TBB_control_consistency_helper() __TBB_compiler_fence() #define __TBB_acquire_consistency_helper() #define __TBB_release_consistency_helper() #define __TBB_full_memory_fence() __mf() #else #define __TBB_compiler_fence() __asm__ __volatile__("": : :"memory") #define __TBB_control_consistency_helper() __TBB_compiler_fence() // Even though GCC imbues volatile loads with acquire semantics, it sometimes moves // loads over the acquire fence. The following helpers stop such incorrect code motion. #define __TBB_acquire_consistency_helper() __TBB_compiler_fence() #define __TBB_release_consistency_helper() __TBB_compiler_fence() #define __TBB_full_memory_fence() __asm__ __volatile__("mf": : :"memory") #endif /* !__INTEL_COMPILER */ // Most of the functions will be in a .s file // TODO: revise dynamic_link, memory pools and etc. if the library dependency is removed. extern "C" { int8_t __TBB_machine_fetchadd1__TBB_full_fence (volatile void *ptr, int8_t addend); int8_t __TBB_machine_fetchadd1acquire(volatile void *ptr, int8_t addend); int8_t __TBB_machine_fetchadd1release(volatile void *ptr, int8_t addend); int16_t __TBB_machine_fetchadd2__TBB_full_fence (volatile void *ptr, int16_t addend); int16_t __TBB_machine_fetchadd2acquire(volatile void *ptr, int16_t addend); int16_t __TBB_machine_fetchadd2release(volatile void *ptr, int16_t addend); int32_t __TBB_machine_fetchadd4__TBB_full_fence (volatile void *ptr, int32_t value); int32_t __TBB_machine_fetchadd4acquire(volatile void *ptr, int32_t addend); int32_t __TBB_machine_fetchadd4release(volatile void *ptr, int32_t addend); int64_t __TBB_machine_fetchadd8__TBB_full_fence (volatile void *ptr, int64_t value); int64_t __TBB_machine_fetchadd8acquire(volatile void *ptr, int64_t addend); int64_t __TBB_machine_fetchadd8release(volatile void *ptr, int64_t addend); int8_t __TBB_machine_fetchstore1__TBB_full_fence (volatile void *ptr, int8_t value); int8_t __TBB_machine_fetchstore1acquire(volatile void *ptr, int8_t value); int8_t __TBB_machine_fetchstore1release(volatile void *ptr, int8_t value); int16_t __TBB_machine_fetchstore2__TBB_full_fence (volatile void *ptr, int16_t value); int16_t __TBB_machine_fetchstore2acquire(volatile void *ptr, int16_t value); int16_t __TBB_machine_fetchstore2release(volatile void *ptr, int16_t value); int32_t __TBB_machine_fetchstore4__TBB_full_fence (volatile void *ptr, int32_t value); int32_t __TBB_machine_fetchstore4acquire(volatile void *ptr, int32_t value); int32_t __TBB_machine_fetchstore4release(volatile void *ptr, int32_t value); int64_t __TBB_machine_fetchstore8__TBB_full_fence (volatile void *ptr, int64_t value); int64_t __TBB_machine_fetchstore8acquire(volatile void *ptr, int64_t value); int64_t __TBB_machine_fetchstore8release(volatile void *ptr, int64_t value); int8_t __TBB_machine_cmpswp1__TBB_full_fence (volatile void *ptr, int8_t value, int8_t comparand); int8_t __TBB_machine_cmpswp1acquire(volatile void *ptr, int8_t value, int8_t comparand); int8_t __TBB_machine_cmpswp1release(volatile void *ptr, int8_t value, int8_t comparand); int16_t __TBB_machine_cmpswp2__TBB_full_fence (volatile void *ptr, int16_t value, int16_t comparand); int16_t __TBB_machine_cmpswp2acquire(volatile void *ptr, int16_t value, int16_t comparand); int16_t __TBB_machine_cmpswp2release(volatile void *ptr, int16_t value, int16_t comparand); int32_t __TBB_machine_cmpswp4__TBB_full_fence (volatile void *ptr, int32_t value, int32_t comparand); int32_t __TBB_machine_cmpswp4acquire(volatile void *ptr, int32_t value, int32_t comparand); int32_t __TBB_machine_cmpswp4release(volatile void *ptr, int32_t value, int32_t comparand); int64_t __TBB_machine_cmpswp8__TBB_full_fence (volatile void *ptr, int64_t value, int64_t comparand); int64_t __TBB_machine_cmpswp8acquire(volatile void *ptr, int64_t value, int64_t comparand); int64_t __TBB_machine_cmpswp8release(volatile void *ptr, int64_t value, int64_t comparand); int64_t __TBB_machine_lg(uint64_t value); void __TBB_machine_pause(int32_t delay); bool __TBB_machine_trylockbyte( volatile unsigned char &ptr ); int64_t __TBB_machine_lockbyte( volatile unsigned char &ptr ); //! Retrieves the current RSE backing store pointer. IA64 specific. void* __TBB_get_bsp(); int32_t __TBB_machine_load1_relaxed(const void *ptr); int32_t __TBB_machine_load2_relaxed(const void *ptr); int32_t __TBB_machine_load4_relaxed(const void *ptr); int64_t __TBB_machine_load8_relaxed(const void *ptr); void __TBB_machine_store1_relaxed(void *ptr, int32_t value); void __TBB_machine_store2_relaxed(void *ptr, int32_t value); void __TBB_machine_store4_relaxed(void *ptr, int32_t value); void __TBB_machine_store8_relaxed(void *ptr, int64_t value); } // extern "C" // Mapping old entry points to the names corresponding to the new full_fence identifier. #define __TBB_machine_fetchadd1full_fence __TBB_machine_fetchadd1__TBB_full_fence #define __TBB_machine_fetchadd2full_fence __TBB_machine_fetchadd2__TBB_full_fence #define __TBB_machine_fetchadd4full_fence __TBB_machine_fetchadd4__TBB_full_fence #define __TBB_machine_fetchadd8full_fence __TBB_machine_fetchadd8__TBB_full_fence #define __TBB_machine_fetchstore1full_fence __TBB_machine_fetchstore1__TBB_full_fence #define __TBB_machine_fetchstore2full_fence __TBB_machine_fetchstore2__TBB_full_fence #define __TBB_machine_fetchstore4full_fence __TBB_machine_fetchstore4__TBB_full_fence #define __TBB_machine_fetchstore8full_fence __TBB_machine_fetchstore8__TBB_full_fence #define __TBB_machine_cmpswp1full_fence __TBB_machine_cmpswp1__TBB_full_fence #define __TBB_machine_cmpswp2full_fence __TBB_machine_cmpswp2__TBB_full_fence #define __TBB_machine_cmpswp4full_fence __TBB_machine_cmpswp4__TBB_full_fence #define __TBB_machine_cmpswp8full_fence __TBB_machine_cmpswp8__TBB_full_fence // Mapping relaxed operations to the entry points implementing them. /** On IA64 RMW operations implicitly have acquire semantics. Thus one cannot actually have completely relaxed RMW operation here. **/ #define __TBB_machine_fetchadd1relaxed __TBB_machine_fetchadd1acquire #define __TBB_machine_fetchadd2relaxed __TBB_machine_fetchadd2acquire #define __TBB_machine_fetchadd4relaxed __TBB_machine_fetchadd4acquire #define __TBB_machine_fetchadd8relaxed __TBB_machine_fetchadd8acquire #define __TBB_machine_fetchstore1relaxed __TBB_machine_fetchstore1acquire #define __TBB_machine_fetchstore2relaxed __TBB_machine_fetchstore2acquire #define __TBB_machine_fetchstore4relaxed __TBB_machine_fetchstore4acquire #define __TBB_machine_fetchstore8relaxed __TBB_machine_fetchstore8acquire #define __TBB_machine_cmpswp1relaxed __TBB_machine_cmpswp1acquire #define __TBB_machine_cmpswp2relaxed __TBB_machine_cmpswp2acquire #define __TBB_machine_cmpswp4relaxed __TBB_machine_cmpswp4acquire #define __TBB_machine_cmpswp8relaxed __TBB_machine_cmpswp8acquire #define __TBB_MACHINE_DEFINE_ATOMICS(S,V) \ template \ struct machine_load_store_relaxed { \ static inline T load ( const T& location ) { \ return (T)__TBB_machine_load##S##_relaxed(&location); \ } \ static inline void store ( T& location, T value ) { \ __TBB_machine_store##S##_relaxed(&location, (V)value); \ } \ } namespace tbb { namespace internal { __TBB_MACHINE_DEFINE_ATOMICS(1,int8_t); __TBB_MACHINE_DEFINE_ATOMICS(2,int16_t); __TBB_MACHINE_DEFINE_ATOMICS(4,int32_t); __TBB_MACHINE_DEFINE_ATOMICS(8,int64_t); }} // namespaces internal, tbb #undef __TBB_MACHINE_DEFINE_ATOMICS #define __TBB_USE_FENCED_ATOMICS 1 #define __TBB_USE_GENERIC_HALF_FENCED_LOAD_STORE 1 #define __TBB_USE_GENERIC_SEQUENTIAL_CONSISTENCY_LOAD_STORE 1 // Definition of Lock functions #define __TBB_TryLockByte(P) __TBB_machine_trylockbyte(P) #define __TBB_LockByte(P) __TBB_machine_lockbyte(P) // Definition of other utility functions #define __TBB_Pause(V) __TBB_machine_pause(V) #define __TBB_Log2(V) __TBB_machine_lg(V) ================================================ FILE: benchmarks/tbb/machine/linux_intel64.h ================================================ /* Copyright 2005-2014 Intel Corporation. All Rights Reserved. This file is part of Threading Building Blocks. Threading Building Blocks is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. Threading Building Blocks is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Threading Building Blocks; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA As a special exception, you may use this file as part of a free software library without restriction. Specifically, if other files instantiate templates or use macros or inline functions from this file, or you compile this file and link it with other files to produce an executable, this file does not by itself cause the resulting executable to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the executable file might be covered by the GNU General Public License. */ #if !defined(__TBB_machine_H) || defined(__TBB_machine_linux_intel64_H) #error Do not #include this internal file directly; use public TBB headers instead. #endif #define __TBB_machine_linux_intel64_H #include #include "gcc_ia32_common.h" #define __TBB_WORDSIZE 8 #define __TBB_ENDIANNESS __TBB_ENDIAN_LITTLE #define __TBB_compiler_fence() __asm__ __volatile__("": : :"memory") #define __TBB_control_consistency_helper() __TBB_compiler_fence() #define __TBB_acquire_consistency_helper() __TBB_compiler_fence() #define __TBB_release_consistency_helper() __TBB_compiler_fence() #ifndef __TBB_full_memory_fence #define __TBB_full_memory_fence() __asm__ __volatile__("mfence": : :"memory") #endif #define __TBB_MACHINE_DEFINE_ATOMICS(S,T,X) \ static inline T __TBB_machine_cmpswp##S (volatile void *ptr, T value, T comparand ) \ { \ T result; \ \ __asm__ __volatile__("lock\ncmpxchg" X " %2,%1" \ : "=a"(result), "=m"(*(volatile T*)ptr) \ : "q"(value), "0"(comparand), "m"(*(volatile T*)ptr) \ : "memory"); \ return result; \ } \ \ static inline T __TBB_machine_fetchadd##S(volatile void *ptr, T addend) \ { \ T result; \ __asm__ __volatile__("lock\nxadd" X " %0,%1" \ : "=r"(result),"=m"(*(volatile T*)ptr) \ : "0"(addend), "m"(*(volatile T*)ptr) \ : "memory"); \ return result; \ } \ \ static inline T __TBB_machine_fetchstore##S(volatile void *ptr, T value) \ { \ T result; \ __asm__ __volatile__("lock\nxchg" X " %0,%1" \ : "=r"(result),"=m"(*(volatile T*)ptr) \ : "0"(value), "m"(*(volatile T*)ptr) \ : "memory"); \ return result; \ } \ __TBB_MACHINE_DEFINE_ATOMICS(1,int8_t,"") __TBB_MACHINE_DEFINE_ATOMICS(2,int16_t,"") __TBB_MACHINE_DEFINE_ATOMICS(4,int32_t,"") __TBB_MACHINE_DEFINE_ATOMICS(8,int64_t,"q") #undef __TBB_MACHINE_DEFINE_ATOMICS static inline void __TBB_machine_or( volatile void *ptr, uint64_t value ) { __asm__ __volatile__("lock\norq %1,%0" : "=m"(*(volatile uint64_t*)ptr) : "r"(value), "m"(*(volatile uint64_t*)ptr) : "memory"); } static inline void __TBB_machine_and( volatile void *ptr, uint64_t value ) { __asm__ __volatile__("lock\nandq %1,%0" : "=m"(*(volatile uint64_t*)ptr) : "r"(value), "m"(*(volatile uint64_t*)ptr) : "memory"); } #define __TBB_AtomicOR(P,V) __TBB_machine_or(P,V) #define __TBB_AtomicAND(P,V) __TBB_machine_and(P,V) #define __TBB_USE_FETCHSTORE_AS_FULL_FENCED_STORE 1 #define __TBB_USE_GENERIC_HALF_FENCED_LOAD_STORE 1 #define __TBB_USE_GENERIC_RELAXED_LOAD_STORE 1 #define __TBB_USE_GENERIC_SEQUENTIAL_CONSISTENCY_LOAD_STORE 1 ================================================ FILE: benchmarks/tbb/machine/mac_ppc.h ================================================ /* Copyright 2005-2014 Intel Corporation. All Rights Reserved. This file is part of Threading Building Blocks. Threading Building Blocks is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. Threading Building Blocks is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Threading Building Blocks; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA As a special exception, you may use this file as part of a free software library without restriction. Specifically, if other files instantiate templates or use macros or inline functions from this file, or you compile this file and link it with other files to produce an executable, this file does not by itself cause the resulting executable to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the executable file might be covered by the GNU General Public License. */ #if !defined(__TBB_machine_H) || defined(__TBB_machine_gcc_power_H) #error Do not #include this internal file directly; use public TBB headers instead. #endif #define __TBB_machine_gcc_power_H #include #include // TODO: rename to gcc_power.h? // This file is for Power Architecture with compilers supporting GNU inline-assembler syntax (currently GNU g++ and IBM XL). // Note that XL V9.0 (sometimes?) has trouble dealing with empty input and/or clobber lists, so they should be avoided. #if __powerpc64__ || __ppc64__ // IBM XL documents __powerpc64__ (and __PPC64__). // Apple documents __ppc64__ (with __ppc__ only on 32-bit). #define __TBB_WORDSIZE 8 #else #define __TBB_WORDSIZE 4 #endif // Traditionally Power Architecture is big-endian. // Little-endian could be just an address manipulation (compatibility with TBB not verified), // or normal little-endian (on more recent systems). Embedded PowerPC systems may support // page-specific endianness, but then one endianness must be hidden from TBB so that it still sees only one. #if __BIG_ENDIAN__ || (defined(__BYTE_ORDER__) && __BYTE_ORDER__==__ORDER_BIG_ENDIAN__) #define __TBB_ENDIANNESS __TBB_ENDIAN_BIG #elif __LITTLE_ENDIAN__ || (defined(__BYTE_ORDER__) && __BYTE_ORDER__==__ORDER_LITTLE_ENDIAN__) #define __TBB_ENDIANNESS __TBB_ENDIAN_LITTLE #elif defined(__BYTE_ORDER__) #define __TBB_ENDIANNESS __TBB_ENDIAN_UNSUPPORTED #else #define __TBB_ENDIANNESS __TBB_ENDIAN_DETECT #endif // On Power Architecture, (lock-free) 64-bit atomics require 64-bit hardware: #if __TBB_WORDSIZE==8 // Do not change the following definition, because TBB itself will use 64-bit atomics in 64-bit builds. #define __TBB_64BIT_ATOMICS 1 #elif __bgp__ // Do not change the following definition, because this is known 32-bit hardware. #define __TBB_64BIT_ATOMICS 0 #else // To enable 64-bit atomics in 32-bit builds, set the value below to 1 instead of 0. // You must make certain that the program will only use them on actual 64-bit hardware // (which typically means that the entire program is only executed on such hardware), // because their implementation involves machine instructions that are illegal elsewhere. // The setting can be chosen independently per compilation unit, // which also means that TBB itself does not need to be rebuilt. // Alternatively (but only for the current architecture and TBB version), // override the default as a predefined macro when invoking the compiler. #ifndef __TBB_64BIT_ATOMICS #define __TBB_64BIT_ATOMICS 0 #endif #endif inline int32_t __TBB_machine_cmpswp4 (volatile void *ptr, int32_t value, int32_t comparand ) { int32_t result; __asm__ __volatile__("sync\n" "0:\n\t" "lwarx %[res],0,%[ptr]\n\t" /* load w/ reservation */ "cmpw %[res],%[cmp]\n\t" /* compare against comparand */ "bne- 1f\n\t" /* exit if not same */ "stwcx. %[val],0,%[ptr]\n\t" /* store new value */ "bne- 0b\n" /* retry if reservation lost */ "1:\n\t" /* the exit */ "isync" : [res]"=&r"(result) , "+m"(* (int32_t*) ptr) /* redundant with "memory" */ : [ptr]"r"(ptr) , [val]"r"(value) , [cmp]"r"(comparand) : "memory" /* compiler full fence */ , "cr0" /* clobbered by cmp and/or stwcx. */ ); return result; } #if __TBB_WORDSIZE==8 inline int64_t __TBB_machine_cmpswp8 (volatile void *ptr, int64_t value, int64_t comparand ) { int64_t result; __asm__ __volatile__("sync\n" "0:\n\t" "ldarx %[res],0,%[ptr]\n\t" /* load w/ reservation */ "cmpd %[res],%[cmp]\n\t" /* compare against comparand */ "bne- 1f\n\t" /* exit if not same */ "stdcx. %[val],0,%[ptr]\n\t" /* store new value */ "bne- 0b\n" /* retry if reservation lost */ "1:\n\t" /* the exit */ "isync" : [res]"=&r"(result) , "+m"(* (int64_t*) ptr) /* redundant with "memory" */ : [ptr]"r"(ptr) , [val]"r"(value) , [cmp]"r"(comparand) : "memory" /* compiler full fence */ , "cr0" /* clobbered by cmp and/or stdcx. */ ); return result; } #elif __TBB_64BIT_ATOMICS /* && __TBB_WORDSIZE==4 */ inline int64_t __TBB_machine_cmpswp8 (volatile void *ptr, int64_t value, int64_t comparand ) { int64_t result; int64_t value_register, comparand_register, result_register; // dummy variables to allocate registers __asm__ __volatile__("sync\n\t" "ld %[val],%[valm]\n\t" "ld %[cmp],%[cmpm]\n" "0:\n\t" "ldarx %[res],0,%[ptr]\n\t" /* load w/ reservation */ "cmpd %[res],%[cmp]\n\t" /* compare against comparand */ "bne- 1f\n\t" /* exit if not same */ "stdcx. %[val],0,%[ptr]\n\t" /* store new value */ "bne- 0b\n" /* retry if reservation lost */ "1:\n\t" /* the exit */ "std %[res],%[resm]\n\t" "isync" : [resm]"=m"(result) , [res] "=&r"( result_register) , [val] "=&r"( value_register) , [cmp] "=&r"(comparand_register) , "+m"(* (int64_t*) ptr) /* redundant with "memory" */ : [ptr] "r"(ptr) , [valm]"m"(value) , [cmpm]"m"(comparand) : "memory" /* compiler full fence */ , "cr0" /* clobbered by cmpd and/or stdcx. */ ); return result; } #endif /* __TBB_WORDSIZE==4 && __TBB_64BIT_ATOMICS */ #define __TBB_MACHINE_DEFINE_LOAD_STORE(S,ldx,stx,cmpx) \ template \ struct machine_load_store { \ static inline T load_with_acquire(const volatile T& location) { \ T result; \ __asm__ __volatile__(ldx " %[res],0(%[ptr])\n" \ "0:\n\t" \ cmpx " %[res],%[res]\n\t" \ "bne- 0b\n\t" \ "isync" \ : [res]"=r"(result) \ : [ptr]"b"(&location) /* cannot use register 0 here */ \ , "m"(location) /* redundant with "memory" */ \ : "memory" /* compiler acquire fence */ \ , "cr0" /* clobbered by cmpw/cmpd */); \ return result; \ } \ static inline void store_with_release(volatile T &location, T value) { \ __asm__ __volatile__("lwsync\n\t" \ stx " %[val],0(%[ptr])" \ : "=m"(location) /* redundant with "memory" */ \ : [ptr]"b"(&location) /* cannot use register 0 here */ \ , [val]"r"(value) \ : "memory"/*compiler release fence*/ /*(cr0 not affected)*/); \ } \ }; \ \ template \ struct machine_load_store_relaxed { \ static inline T load (const __TBB_atomic T& location) { \ T result; \ __asm__ __volatile__(ldx " %[res],0(%[ptr])" \ : [res]"=r"(result) \ : [ptr]"b"(&location) /* cannot use register 0 here */ \ , "m"(location) \ ); /*(no compiler fence)*/ /*(cr0 not affected)*/ \ return result; \ } \ static inline void store (__TBB_atomic T &location, T value) { \ __asm__ __volatile__(stx " %[val],0(%[ptr])" \ : "=m"(location) \ : [ptr]"b"(&location) /* cannot use register 0 here */ \ , [val]"r"(value) \ ); /*(no compiler fence)*/ /*(cr0 not affected)*/ \ } \ }; namespace tbb { namespace internal { __TBB_MACHINE_DEFINE_LOAD_STORE(1,"lbz","stb","cmpw") __TBB_MACHINE_DEFINE_LOAD_STORE(2,"lhz","sth","cmpw") __TBB_MACHINE_DEFINE_LOAD_STORE(4,"lwz","stw","cmpw") #if __TBB_WORDSIZE==8 __TBB_MACHINE_DEFINE_LOAD_STORE(8,"ld" ,"std","cmpd") #elif __TBB_64BIT_ATOMICS /* && __TBB_WORDSIZE==4 */ template struct machine_load_store { static inline T load_with_acquire(const volatile T& location) { T result; T result_register; // dummy variable to allocate a register __asm__ __volatile__("ld %[res],0(%[ptr])\n\t" "std %[res],%[resm]\n" "0:\n\t" "cmpd %[res],%[res]\n\t" "bne- 0b\n\t" "isync" : [resm]"=m"(result) , [res]"=&r"(result_register) : [ptr]"b"(&location) /* cannot use register 0 here */ , "m"(location) /* redundant with "memory" */ : "memory" /* compiler acquire fence */ , "cr0" /* clobbered by cmpd */); return result; } static inline void store_with_release(volatile T &location, T value) { T value_register; // dummy variable to allocate a register __asm__ __volatile__("lwsync\n\t" "ld %[val],%[valm]\n\t" "std %[val],0(%[ptr])" : "=m"(location) /* redundant with "memory" */ , [val]"=&r"(value_register) : [ptr]"b"(&location) /* cannot use register 0 here */ , [valm]"m"(value) : "memory"/*compiler release fence*/ /*(cr0 not affected)*/); } }; struct machine_load_store_relaxed { static inline T load (const volatile T& location) { T result; T result_register; // dummy variable to allocate a register __asm__ __volatile__("ld %[res],0(%[ptr])\n\t" "std %[res],%[resm]" : [resm]"=m"(result) , [res]"=&r"(result_register) : [ptr]"b"(&location) /* cannot use register 0 here */ , "m"(location) ); /*(no compiler fence)*/ /*(cr0 not affected)*/ return result; } static inline void store (volatile T &location, T value) { T value_register; // dummy variable to allocate a register __asm__ __volatile__("ld %[val],%[valm]\n\t" "std %[val],0(%[ptr])" : "=m"(location) , [val]"=&r"(value_register) : [ptr]"b"(&location) /* cannot use register 0 here */ , [valm]"m"(value) ); /*(no compiler fence)*/ /*(cr0 not affected)*/ } }; #define __TBB_machine_load_store_relaxed_8 #endif /* __TBB_WORDSIZE==4 && __TBB_64BIT_ATOMICS */ }} // namespaces internal, tbb #undef __TBB_MACHINE_DEFINE_LOAD_STORE #define __TBB_USE_GENERIC_PART_WORD_CAS 1 #define __TBB_USE_GENERIC_FETCH_ADD 1 #define __TBB_USE_GENERIC_FETCH_STORE 1 #define __TBB_USE_GENERIC_SEQUENTIAL_CONSISTENCY_LOAD_STORE 1 #define __TBB_control_consistency_helper() __asm__ __volatile__("isync": : :"memory") #define __TBB_full_memory_fence() __asm__ __volatile__( "sync": : :"memory") static inline intptr_t __TBB_machine_lg( uintptr_t x ) { __TBB_ASSERT(x, "__TBB_Log2(0) undefined"); // cntlzd/cntlzw starts counting at 2^63/2^31 (ignoring any higher-order bits), and does not affect cr0 #if __TBB_WORDSIZE==8 __asm__ __volatile__ ("cntlzd %0,%0" : "+r"(x)); return 63-static_cast(x); #else __asm__ __volatile__ ("cntlzw %0,%0" : "+r"(x)); return 31-static_cast(x); #endif } #define __TBB_Log2(V) __TBB_machine_lg(V) // Assumes implicit alignment for any 32-bit value typedef uint32_t __TBB_Flag; #define __TBB_Flag __TBB_Flag inline bool __TBB_machine_trylockbyte( __TBB_atomic __TBB_Flag &flag ) { return __TBB_machine_cmpswp4(&flag,1,0)==0; } #define __TBB_TryLockByte(P) __TBB_machine_trylockbyte(P) ================================================ FILE: benchmarks/tbb/machine/macos_common.h ================================================ /* Copyright 2005-2014 Intel Corporation. All Rights Reserved. This file is part of Threading Building Blocks. Threading Building Blocks is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. Threading Building Blocks is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Threading Building Blocks; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA As a special exception, you may use this file as part of a free software library without restriction. Specifically, if other files instantiate templates or use macros or inline functions from this file, or you compile this file and link it with other files to produce an executable, this file does not by itself cause the resulting executable to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the executable file might be covered by the GNU General Public License. */ #if !defined(__TBB_machine_H) || defined(__TBB_machine_macos_common_H) #error Do not #include this internal file directly; use public TBB headers instead. #endif #define __TBB_machine_macos_common_H #include #define __TBB_Yield() sched_yield() // __TBB_HardwareConcurrency #include #include static inline int __TBB_macos_available_cpu() { int name[2] = {CTL_HW, HW_AVAILCPU}; int ncpu; size_t size = sizeof(ncpu); sysctl( name, 2, &ncpu, &size, NULL, 0 ); return ncpu; } #define __TBB_HardwareConcurrency() __TBB_macos_available_cpu() #ifndef __TBB_full_memory_fence // TBB has not recognized the architecture (none of the architecture abstraction // headers was included). #define __TBB_UnknownArchitecture 1 #endif #if __TBB_UnknownArchitecture // Implementation of atomic operations based on OS provided primitives #include static inline int64_t __TBB_machine_cmpswp8_OsX(volatile void *ptr, int64_t value, int64_t comparand) { __TBB_ASSERT( tbb::internal::is_aligned(ptr,8), "address not properly aligned for OS X* atomics"); int64_t* address = (int64_t*)ptr; while( !OSAtomicCompareAndSwap64Barrier(comparand, value, address) ){ #if __TBB_WORDSIZE==8 int64_t snapshot = *address; #else int64_t snapshot = OSAtomicAdd64( 0, address ); #endif if( snapshot!=comparand ) return snapshot; } return comparand; } #define __TBB_machine_cmpswp8 __TBB_machine_cmpswp8_OsX #endif /* __TBB_UnknownArchitecture */ #if __TBB_UnknownArchitecture #ifndef __TBB_WORDSIZE #define __TBB_WORDSIZE 4 #endif #ifdef __TBB_ENDIANNESS // Already determined based on hardware architecture. #elif __BIG_ENDIAN__ #define __TBB_ENDIANNESS __TBB_ENDIAN_BIG #elif __LITTLE_ENDIAN__ #define __TBB_ENDIANNESS __TBB_ENDIAN_LITTLE #else #define __TBB_ENDIANNESS __TBB_ENDIAN_UNSUPPORTED #endif /** As this generic implementation has absolutely no information about underlying hardware, its performance most likely will be sub-optimal because of full memory fence usages where a more lightweight synchronization means (or none at all) could suffice. Thus if you use this header to enable TBB on a new platform, consider forking it and relaxing below helpers as appropriate. **/ #define __TBB_control_consistency_helper() OSMemoryBarrier() #define __TBB_acquire_consistency_helper() OSMemoryBarrier() #define __TBB_release_consistency_helper() OSMemoryBarrier() #define __TBB_full_memory_fence() OSMemoryBarrier() static inline int32_t __TBB_machine_cmpswp4(volatile void *ptr, int32_t value, int32_t comparand) { __TBB_ASSERT( tbb::internal::is_aligned(ptr,4), "address not properly aligned for OS X* atomics"); int32_t* address = (int32_t*)ptr; while( !OSAtomicCompareAndSwap32Barrier(comparand, value, address) ){ int32_t snapshot = *address; if( snapshot!=comparand ) return snapshot; } return comparand; } static inline int32_t __TBB_machine_fetchadd4(volatile void *ptr, int32_t addend) { __TBB_ASSERT( tbb::internal::is_aligned(ptr,4), "address not properly aligned for OS X* atomics"); return OSAtomicAdd32Barrier(addend, (int32_t*)ptr) - addend; } static inline int64_t __TBB_machine_fetchadd8(volatile void *ptr, int64_t addend) { __TBB_ASSERT( tbb::internal::is_aligned(ptr,8), "address not properly aligned for OS X* atomics"); return OSAtomicAdd64Barrier(addend, (int64_t*)ptr) - addend; } #define __TBB_USE_GENERIC_PART_WORD_CAS 1 #define __TBB_USE_GENERIC_PART_WORD_FETCH_ADD 1 #define __TBB_USE_GENERIC_FETCH_STORE 1 #define __TBB_USE_GENERIC_HALF_FENCED_LOAD_STORE 1 #define __TBB_USE_GENERIC_RELAXED_LOAD_STORE 1 #if __TBB_WORDSIZE == 4 #define __TBB_USE_GENERIC_DWORD_LOAD_STORE 1 #endif #define __TBB_USE_GENERIC_SEQUENTIAL_CONSISTENCY_LOAD_STORE 1 #endif /* __TBB_UnknownArchitecture */ ================================================ FILE: benchmarks/tbb/machine/mic_common.h ================================================ /* Copyright 2005-2014 Intel Corporation. All Rights Reserved. This file is part of Threading Building Blocks. Threading Building Blocks is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. Threading Building Blocks is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Threading Building Blocks; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA As a special exception, you may use this file as part of a free software library without restriction. Specifically, if other files instantiate templates or use macros or inline functions from this file, or you compile this file and link it with other files to produce an executable, this file does not by itself cause the resulting executable to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the executable file might be covered by the GNU General Public License. */ #ifndef __TBB_mic_common_H #define __TBB_mic_common_H #ifndef __TBB_machine_H #error Do not #include this internal file directly; use public TBB headers instead. #endif #if ! __TBB_DEFINE_MIC #error mic_common.h should be included only when building for Intel(R) Many Integrated Core Architecture #endif #ifndef __TBB_PREFETCHING #define __TBB_PREFETCHING 1 #endif #if __TBB_PREFETCHING #include #define __TBB_cl_prefetch(p) _mm_prefetch((const char*)p, _MM_HINT_T1) #define __TBB_cl_evict(p) _mm_clevict(p, _MM_HINT_T1) #endif /** Intel(R) Many Integrated Core Architecture does not support mfence and pause instructions **/ #define __TBB_full_memory_fence() __asm__ __volatile__("lock; addl $0,(%%rsp)":::"memory") #define __TBB_Pause(x) _mm_delay_32(16*(x)) #define __TBB_STEALING_PAUSE 1500/16 #include #define __TBB_Yield() sched_yield() // low-level timing intrinsic and its type #define __TBB_machine_time_stamp() _rdtsc() typedef uint64_t machine_tsc_t; /** Specifics **/ #define __TBB_STEALING_ABORT_ON_CONTENTION 1 #define __TBB_YIELD2P 1 #define __TBB_HOARD_NONLOCAL_TASKS 1 #if ! ( __FreeBSD__ || __linux__ ) #error Intel(R) Many Integrated Core Compiler does not define __FreeBSD__ or __linux__ anymore. Check for the __TBB_XXX_BROKEN defined under __FreeBSD__ or __linux__. #endif /* ! ( __FreeBSD__ || __linux__ ) */ #endif /* __TBB_mic_common_H */ ================================================ FILE: benchmarks/tbb/machine/msvc_armv7.h ================================================ /* Copyright 2005-2014 Intel Corporation. All Rights Reserved. This file is part of Threading Building Blocks. Threading Building Blocks is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. Threading Building Blocks is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Threading Building Blocks; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA As a special exception, you may use this file as part of a free software library without restriction. Specifically, if other files instantiate templates or use macros or inline functions from this file, or you compile this file and link it with other files to produce an executable, this file does not by itself cause the resulting executable to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the executable file might be covered by the GNU General Public License. */ #if !defined(__TBB_machine_H) || defined(__TBB_msvc_armv7_H) #error Do not #include this internal file directly; use public TBB headers instead. #endif #define __TBB_msvc_armv7_H #include #include #define __TBB_WORDSIZE 4 #define __TBB_ENDIANNESS __TBB_ENDIAN_UNSUPPORTED #if defined(TBB_WIN32_USE_CL_BUILTINS) // We can test this on _M_IX86 #pragma intrinsic(_ReadWriteBarrier) #pragma intrinsic(_mm_mfence) #define __TBB_compiler_fence() _ReadWriteBarrier() #define __TBB_full_memory_fence() _mm_mfence() #define __TBB_control_consistency_helper() __TBB_compiler_fence() #define __TBB_acquire_consistency_helper() __TBB_compiler_fence() #define __TBB_release_consistency_helper() __TBB_compiler_fence() #else //Now __dmb(_ARM_BARRIER_SY) is used for both compiler and memory fences //This might be changed later after testing #define __TBB_compiler_fence() __dmb(_ARM_BARRIER_SY) #define __TBB_full_memory_fence() __dmb(_ARM_BARRIER_SY) #define __TBB_control_consistency_helper() __TBB_compiler_fence() #define __TBB_acquire_consistency_helper() __TBB_full_memory_fence() #define __TBB_release_consistency_helper() __TBB_full_memory_fence() #endif //-------------------------------------------------- // Compare and swap //-------------------------------------------------- /** * Atomic CAS for 32 bit values, if *ptr==comparand, then *ptr=value, returns *ptr * @param ptr pointer to value in memory to be swapped with value if *ptr==comparand * @param value value to assign *ptr to if *ptr==comparand * @param comparand value to compare with *ptr * @return value originally in memory at ptr, regardless of success */ #define __TBB_MACHINE_DEFINE_ATOMICS_CMPSWP(S,T,F) \ inline T __TBB_machine_cmpswp##S( volatile void *ptr, T value, T comparand ) { \ return _InterlockedCompareExchange##F(reinterpret_cast(ptr),value,comparand); \ } \ #define __TBB_MACHINE_DEFINE_ATOMICS_FETCHADD(S,T,F) \ inline T __TBB_machine_fetchadd##S( volatile void *ptr, T value ) { \ return _InterlockedExchangeAdd##F(reinterpret_cast(ptr),value); \ } \ __TBB_MACHINE_DEFINE_ATOMICS_CMPSWP(1,char,8) __TBB_MACHINE_DEFINE_ATOMICS_CMPSWP(2,short,16) __TBB_MACHINE_DEFINE_ATOMICS_CMPSWP(4,long,) __TBB_MACHINE_DEFINE_ATOMICS_CMPSWP(8,__int64,64) __TBB_MACHINE_DEFINE_ATOMICS_FETCHADD(4,long,) #if defined(TBB_WIN32_USE_CL_BUILTINS) // No _InterlockedExchangeAdd64 intrinsic on _M_IX86 #define __TBB_64BIT_ATOMICS 0 #else __TBB_MACHINE_DEFINE_ATOMICS_FETCHADD(8,__int64,64) #endif inline void __TBB_machine_pause (int32_t delay ) { while(delay>0) { __TBB_compiler_fence(); delay--; } } // API to retrieve/update FPU control setting #define __TBB_CPU_CTL_ENV_PRESENT 1 namespace tbb { namespace internal { template struct machine_load_store_relaxed { static inline T load ( const volatile T& location ) { const T value = location; /* * An extra memory barrier is required for errata #761319 * Please see http://infocenter.arm.com/help/topic/com.arm.doc.uan0004a */ __TBB_acquire_consistency_helper(); return value; } static inline void store ( volatile T& location, T value ) { location = value; } }; class cpu_ctl_env { private: unsigned int my_ctl; public: bool operator!=( const cpu_ctl_env& ctl ) const { return my_ctl != ctl.my_ctl; } void get_env() { my_ctl = _control87(0, 0); } void set_env() const { _control87( my_ctl, ~0U ); } }; } // namespace internal } // namespaces tbb // Machine specific atomic operations #define __TBB_CompareAndSwap4(P,V,C) __TBB_machine_cmpswp4(P,V,C) #define __TBB_CompareAndSwap8(P,V,C) __TBB_machine_cmpswp8(P,V,C) #define __TBB_Pause(V) __TBB_machine_pause(V) // Use generics for some things #define __TBB_USE_FETCHSTORE_AS_FULL_FENCED_STORE 1 #define __TBB_USE_GENERIC_HALF_FENCED_LOAD_STORE 1 #define __TBB_USE_GENERIC_PART_WORD_FETCH_ADD 1 #define __TBB_USE_GENERIC_PART_WORD_FETCH_STORE 1 #define __TBB_USE_GENERIC_FETCH_STORE 1 #define __TBB_USE_GENERIC_DWORD_LOAD_STORE 1 #define __TBB_USE_GENERIC_SEQUENTIAL_CONSISTENCY_LOAD_STORE 1 #if defined(TBB_WIN32_USE_CL_BUILTINS) #if !__TBB_WIN8UI_SUPPORT extern "C" __declspec(dllimport) int __stdcall SwitchToThread( void ); #define __TBB_Yield() SwitchToThread() #else #include #define __TBB_Yield() std::this_thread::yield() #endif #else #define __TBB_Yield() __yield() #endif // Machine specific atomic operations #define __TBB_AtomicOR(P,V) __TBB_machine_OR(P,V) #define __TBB_AtomicAND(P,V) __TBB_machine_AND(P,V) template inline void __TBB_machine_OR( T1 *operand, T2 addend ) { _InterlockedOr((long volatile *)operand, (long)addend); } template inline void __TBB_machine_AND( T1 *operand, T2 addend ) { _InterlockedAnd((long volatile *)operand, (long)addend); } ================================================ FILE: benchmarks/tbb/machine/msvc_ia32_common.h ================================================ /* Copyright 2005-2014 Intel Corporation. All Rights Reserved. This file is part of Threading Building Blocks. Threading Building Blocks is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. Threading Building Blocks is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Threading Building Blocks; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA As a special exception, you may use this file as part of a free software library without restriction. Specifically, if other files instantiate templates or use macros or inline functions from this file, or you compile this file and link it with other files to produce an executable, this file does not by itself cause the resulting executable to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the executable file might be covered by the GNU General Public License. */ #ifndef __TBB_machine_msvc_ia32_common_H #define __TBB_machine_msvc_ia32_common_H #include //TODO: consider moving this macro to tbb_config.h and used there MSVC asm is used #if !_M_X64 || __INTEL_COMPILER #define __TBB_X86_MSVC_INLINE_ASM_AVAILABLE 1 #if _M_X64 #define __TBB_r(reg_name) r##reg_name #else #define __TBB_r(reg_name) e##reg_name #endif #else //MSVC in x64 mode does not accept inline assembler #define __TBB_X86_MSVC_INLINE_ASM_AVAILABLE 0 #endif #define __TBB_NO_X86_MSVC_INLINE_ASM_MSG "The compiler being used is not supported (outdated?)" #if (_MSC_VER >= 1300) || (__INTEL_COMPILER) //Use compiler intrinsic when available #define __TBB_PAUSE_USE_INTRINSIC 1 #pragma intrinsic(_mm_pause) namespace tbb { namespace internal { namespace intrinsics { namespace msvc { static inline void __TBB_machine_pause (uintptr_t delay ) { for (;delay>0; --delay ) _mm_pause(); } }}}} #else #if !__TBB_X86_MSVC_INLINE_ASM_AVAILABLE #error __TBB_NO_X86_MSVC_INLINE_ASM_MSG #endif namespace tbb { namespace internal { namespace inline_asm { namespace msvc { static inline void __TBB_machine_pause (uintptr_t delay ) { _asm { mov __TBB_r(ax), delay __TBB_L1: pause add __TBB_r(ax), -1 jne __TBB_L1 } return; } }}}} #endif static inline void __TBB_machine_pause (uintptr_t delay ){ #if __TBB_PAUSE_USE_INTRINSIC tbb::internal::intrinsics::msvc::__TBB_machine_pause(delay); #else tbb::internal::inline_asm::msvc::__TBB_machine_pause(delay); #endif } //TODO: move this function to windows_api.h or to place where it is used #if (_MSC_VER<1400) && (!_WIN64) && (__TBB_X86_MSVC_INLINE_ASM_AVAILABLE) static inline void* __TBB_machine_get_current_teb () { void* pteb; __asm mov eax, fs:[0x18] __asm mov pteb, eax return pteb; } #endif #if ( _MSC_VER>=1400 && !defined(__INTEL_COMPILER) ) || (__INTEL_COMPILER>=1200) // MSVC did not have this intrinsic prior to VC8. // ICL 11.1 fails to compile a TBB example if __TBB_Log2 uses the intrinsic. #define __TBB_LOG2_USE_BSR_INTRINSIC 1 #if _M_X64 #define __TBB_BSR_INTRINSIC _BitScanReverse64 #else #define __TBB_BSR_INTRINSIC _BitScanReverse #endif #pragma intrinsic(__TBB_BSR_INTRINSIC) namespace tbb { namespace internal { namespace intrinsics { namespace msvc { inline uintptr_t __TBB_machine_lg( uintptr_t i ){ unsigned long j; __TBB_BSR_INTRINSIC( &j, i ); return j; } }}}} #else #if !__TBB_X86_MSVC_INLINE_ASM_AVAILABLE #error __TBB_NO_X86_MSVC_INLINE_ASM_MSG #endif namespace tbb { namespace internal { namespace inline_asm { namespace msvc { inline uintptr_t __TBB_machine_lg( uintptr_t i ){ uintptr_t j; __asm { bsr __TBB_r(ax), i mov j, __TBB_r(ax) } return j; } }}}} #endif static inline intptr_t __TBB_machine_lg( uintptr_t i ) { #if __TBB_LOG2_USE_BSR_INTRINSIC return tbb::internal::intrinsics::msvc::__TBB_machine_lg(i); #else return tbb::internal::inline_asm::msvc::__TBB_machine_lg(i); #endif } // API to retrieve/update FPU control setting #define __TBB_CPU_CTL_ENV_PRESENT 1 namespace tbb { namespace internal { class cpu_ctl_env; } } #if __TBB_X86_MSVC_INLINE_ASM_AVAILABLE inline void __TBB_get_cpu_ctl_env ( tbb::internal::cpu_ctl_env* ctl ) { __asm { __asm mov __TBB_r(ax), ctl __asm stmxcsr [__TBB_r(ax)] __asm fstcw [__TBB_r(ax)+4] } } inline void __TBB_set_cpu_ctl_env ( const tbb::internal::cpu_ctl_env* ctl ) { __asm { __asm mov __TBB_r(ax), ctl __asm ldmxcsr [__TBB_r(ax)] __asm fldcw [__TBB_r(ax)+4] } } #else extern "C" { void __TBB_EXPORTED_FUNC __TBB_get_cpu_ctl_env ( tbb::internal::cpu_ctl_env* ); void __TBB_EXPORTED_FUNC __TBB_set_cpu_ctl_env ( const tbb::internal::cpu_ctl_env* ); } #endif namespace tbb { namespace internal { class cpu_ctl_env { private: int mxcsr; short x87cw; static const int MXCSR_CONTROL_MASK = ~0x3f; /* all except last six status bits */ public: bool operator!=( const cpu_ctl_env& ctl ) const { return mxcsr != ctl.mxcsr || x87cw != ctl.x87cw; } void get_env() { __TBB_get_cpu_ctl_env( this ); mxcsr &= MXCSR_CONTROL_MASK; } void set_env() const { __TBB_set_cpu_ctl_env( this ); } }; } // namespace internal } // namespace tbb #if !__TBB_WIN8UI_SUPPORT extern "C" __declspec(dllimport) int __stdcall SwitchToThread( void ); #define __TBB_Yield() SwitchToThread() #else #include #define __TBB_Yield() std::this_thread::yield() #endif #define __TBB_Pause(V) __TBB_machine_pause(V) #define __TBB_Log2(V) __TBB_machine_lg(V) #undef __TBB_r extern "C" { __int8 __TBB_EXPORTED_FUNC __TBB_machine_try_lock_elided (volatile void* ptr); void __TBB_EXPORTED_FUNC __TBB_machine_unlock_elided (volatile void* ptr); // 'pause' instruction aborts HLE/RTM transactions #if __TBB_PAUSE_USE_INTRINSIC inline static void __TBB_machine_try_lock_elided_cancel() { _mm_pause(); } #else inline static void __TBB_machine_try_lock_elided_cancel() { _asm pause; } #endif #if __TBB_TSX_INTRINSICS_PRESENT #define __TBB_machine_is_in_transaction _xtest #define __TBB_machine_begin_transaction _xbegin #define __TBB_machine_end_transaction _xend // The value (0xFF) below comes from the // Intel(R) 64 and IA-32 Architectures Optimization Reference Manual 12.4.5 lock not free #define __TBB_machine_transaction_conflict_abort() _xabort(0xFF) #else __int8 __TBB_EXPORTED_FUNC __TBB_machine_is_in_transaction(); unsigned __int32 __TBB_EXPORTED_FUNC __TBB_machine_begin_transaction(); void __TBB_EXPORTED_FUNC __TBB_machine_end_transaction(); void __TBB_EXPORTED_FUNC __TBB_machine_transaction_conflict_abort(); #endif /* __TBB_TSX_INTRINSICS_PRESENT */ } #endif /* __TBB_machine_msvc_ia32_common_H */ ================================================ FILE: benchmarks/tbb/machine/sunos_sparc.h ================================================ /* Copyright 2005-2014 Intel Corporation. All Rights Reserved. This file is part of Threading Building Blocks. Threading Building Blocks is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. Threading Building Blocks is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Threading Building Blocks; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA As a special exception, you may use this file as part of a free software library without restriction. Specifically, if other files instantiate templates or use macros or inline functions from this file, or you compile this file and link it with other files to produce an executable, this file does not by itself cause the resulting executable to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the executable file might be covered by the GNU General Public License. */ #if !defined(__TBB_machine_H) || defined(__TBB_machine_sunos_sparc_H) #error Do not #include this internal file directly; use public TBB headers instead. #endif #define __TBB_machine_sunos_sparc_H #include #include #define __TBB_WORDSIZE 8 // Big endian is assumed for SPARC. // While hardware may support page-specific bi-endianness, only big endian pages may be exposed to TBB #define __TBB_ENDIANNESS __TBB_ENDIAN_BIG /** To those working on SPARC hardware. Consider relaxing acquire and release consistency helpers to no-op (as this port covers TSO mode only). **/ #define __TBB_compiler_fence() __asm__ __volatile__ ("": : :"memory") #define __TBB_control_consistency_helper() __TBB_compiler_fence() #define __TBB_acquire_consistency_helper() __TBB_compiler_fence() #define __TBB_release_consistency_helper() __TBB_compiler_fence() #define __TBB_full_memory_fence() __asm__ __volatile__("membar #LoadLoad|#LoadStore|#StoreStore|#StoreLoad": : : "memory") //-------------------------------------------------- // Compare and swap //-------------------------------------------------- /** * Atomic CAS for 32 bit values, if *ptr==comparand, then *ptr=value, returns *ptr * @param ptr pointer to value in memory to be swapped with value if *ptr==comparand * @param value value to assign *ptr to if *ptr==comparand * @param comparand value to compare with *ptr ( @return value originally in memory at ptr, regardless of success */ static inline int32_t __TBB_machine_cmpswp4(volatile void *ptr, int32_t value, int32_t comparand ){ int32_t result; __asm__ __volatile__( "cas\t[%5],%4,%1" : "=m"(*(int32_t *)ptr), "=r"(result) : "m"(*(int32_t *)ptr), "1"(value), "r"(comparand), "r"(ptr) : "memory"); return result; } /** * Atomic CAS for 64 bit values, if *ptr==comparand, then *ptr=value, returns *ptr * @param ptr pointer to value in memory to be swapped with value if *ptr==comparand * @param value value to assign *ptr to if *ptr==comparand * @param comparand value to compare with *ptr ( @return value originally in memory at ptr, regardless of success */ static inline int64_t __TBB_machine_cmpswp8(volatile void *ptr, int64_t value, int64_t comparand ){ int64_t result; __asm__ __volatile__( "casx\t[%5],%4,%1" : "=m"(*(int64_t *)ptr), "=r"(result) : "m"(*(int64_t *)ptr), "1"(value), "r"(comparand), "r"(ptr) : "memory"); return result; } //--------------------------------------------------- // Fetch and add //--------------------------------------------------- /** * Atomic fetch and add for 32 bit values, in this case implemented by continuously checking success of atomicity * @param ptr pointer to value to add addend to * @param addened value to add to *ptr * @return value at ptr before addened was added */ static inline int32_t __TBB_machine_fetchadd4(volatile void *ptr, int32_t addend){ int32_t result; __asm__ __volatile__ ( "0:\t add\t %3, %4, %0\n" // do addition "\t cas\t [%2], %3, %0\n" // cas to store result in memory "\t cmp\t %3, %0\n" // check if value from memory is original "\t bne,a,pn\t %%icc, 0b\n" // if not try again "\t mov %0, %3\n" // use branch delay slot to move new value in memory to be added : "=&r"(result), "=m"(*(int32_t *)ptr) : "r"(ptr), "r"(*(int32_t *)ptr), "r"(addend), "m"(*(int32_t *)ptr) : "ccr", "memory"); return result; } /** * Atomic fetch and add for 64 bit values, in this case implemented by continuously checking success of atomicity * @param ptr pointer to value to add addend to * @param addened value to add to *ptr * @return value at ptr before addened was added */ static inline int64_t __TBB_machine_fetchadd8(volatile void *ptr, int64_t addend){ int64_t result; __asm__ __volatile__ ( "0:\t add\t %3, %4, %0\n" // do addition "\t casx\t [%2], %3, %0\n" // cas to store result in memory "\t cmp\t %3, %0\n" // check if value from memory is original "\t bne,a,pn\t %%xcc, 0b\n" // if not try again "\t mov %0, %3\n" // use branch delay slot to move new value in memory to be added : "=&r"(result), "=m"(*(int64_t *)ptr) : "r"(ptr), "r"(*(int64_t *)ptr), "r"(addend), "m"(*(int64_t *)ptr) : "ccr", "memory"); return result; } //-------------------------------------------------------- // Logarithm (base two, integer) //-------------------------------------------------------- static inline int64_t __TBB_machine_lg( uint64_t x ) { __TBB_ASSERT(x, "__TBB_Log2(0) undefined"); uint64_t count; // one hot encode x |= (x >> 1); x |= (x >> 2); x |= (x >> 4); x |= (x >> 8); x |= (x >> 16); x |= (x >> 32); // count 1's __asm__ ("popc %1, %0" : "=r"(count) : "r"(x) ); return count-1; } //-------------------------------------------------------- static inline void __TBB_machine_or( volatile void *ptr, uint64_t value ) { __asm__ __volatile__ ( "0:\t or\t %2, %3, %%g1\n" // do operation "\t casx\t [%1], %2, %%g1\n" // cas to store result in memory "\t cmp\t %2, %%g1\n" // check if value from memory is original "\t bne,a,pn\t %%xcc, 0b\n" // if not try again "\t mov %%g1, %2\n" // use branch delay slot to move new value in memory to be added : "=m"(*(int64_t *)ptr) : "r"(ptr), "r"(*(int64_t *)ptr), "r"(value), "m"(*(int64_t *)ptr) : "ccr", "g1", "memory"); } static inline void __TBB_machine_and( volatile void *ptr, uint64_t value ) { __asm__ __volatile__ ( "0:\t and\t %2, %3, %%g1\n" // do operation "\t casx\t [%1], %2, %%g1\n" // cas to store result in memory "\t cmp\t %2, %%g1\n" // check if value from memory is original "\t bne,a,pn\t %%xcc, 0b\n" // if not try again "\t mov %%g1, %2\n" // use branch delay slot to move new value in memory to be added : "=m"(*(int64_t *)ptr) : "r"(ptr), "r"(*(int64_t *)ptr), "r"(value), "m"(*(int64_t *)ptr) : "ccr", "g1", "memory"); } static inline void __TBB_machine_pause( int32_t delay ) { // do nothing, inlined, doesn't matter } // put 0xff in memory location, return memory value, // generic trylockbyte puts 0x01, however this is fine // because all that matters is that 0 is unlocked static inline bool __TBB_machine_trylockbyte(unsigned char &flag){ unsigned char result; __asm__ __volatile__ ( "ldstub\t [%2], %0\n" : "=r"(result), "=m"(flag) : "r"(&flag), "m"(flag) : "memory"); return result == 0; } #define __TBB_USE_GENERIC_PART_WORD_CAS 1 #define __TBB_USE_GENERIC_PART_WORD_FETCH_ADD 1 #define __TBB_USE_GENERIC_FETCH_STORE 1 #define __TBB_USE_GENERIC_HALF_FENCED_LOAD_STORE 1 #define __TBB_USE_GENERIC_RELAXED_LOAD_STORE 1 #define __TBB_USE_GENERIC_SEQUENTIAL_CONSISTENCY_LOAD_STORE 1 #define __TBB_AtomicOR(P,V) __TBB_machine_or(P,V) #define __TBB_AtomicAND(P,V) __TBB_machine_and(P,V) // Definition of other functions #define __TBB_Pause(V) __TBB_machine_pause(V) #define __TBB_Log2(V) __TBB_machine_lg(V) #define __TBB_TryLockByte(P) __TBB_machine_trylockbyte(P) ================================================ FILE: benchmarks/tbb/machine/windows_api.h ================================================ /* Copyright 2005-2014 Intel Corporation. All Rights Reserved. This file is part of Threading Building Blocks. Threading Building Blocks is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. Threading Building Blocks is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Threading Building Blocks; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA As a special exception, you may use this file as part of a free software library without restriction. Specifically, if other files instantiate templates or use macros or inline functions from this file, or you compile this file and link it with other files to produce an executable, this file does not by itself cause the resulting executable to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the executable file might be covered by the GNU General Public License. */ #ifndef __TBB_machine_windows_api_H #define __TBB_machine_windows_api_H #if _WIN32 || _WIN64 #if _XBOX #define NONET #define NOD3D #include #else // Assume "usual" Windows #include #endif // _XBOX #if _WIN32_WINNT < 0x0600 // The following Windows API function is declared explicitly; // otherwise it fails to compile by VS2005. #if !defined(WINBASEAPI) || (_WIN32_WINNT < 0x0501 && _MSC_VER == 1400) #define __TBB_WINBASEAPI extern "C" #else #define __TBB_WINBASEAPI WINBASEAPI #endif __TBB_WINBASEAPI BOOL WINAPI TryEnterCriticalSection( LPCRITICAL_SECTION ); __TBB_WINBASEAPI BOOL WINAPI InitializeCriticalSectionAndSpinCount( LPCRITICAL_SECTION, DWORD ); // Overloading WINBASEAPI macro and using local functions missing in Windows XP/2003 #define InitializeCriticalSectionEx inlineInitializeCriticalSectionEx #define CreateSemaphoreEx inlineCreateSemaphoreEx #define CreateEventEx inlineCreateEventEx inline BOOL WINAPI inlineInitializeCriticalSectionEx( LPCRITICAL_SECTION lpCriticalSection, DWORD dwSpinCount, DWORD ) { return InitializeCriticalSectionAndSpinCount( lpCriticalSection, dwSpinCount ); } inline HANDLE WINAPI inlineCreateSemaphoreEx( LPSECURITY_ATTRIBUTES lpSemaphoreAttributes, LONG lInitialCount, LONG lMaximumCount, LPCTSTR lpName, DWORD, DWORD ) { return CreateSemaphore( lpSemaphoreAttributes, lInitialCount, lMaximumCount, lpName ); } inline HANDLE WINAPI inlineCreateEventEx( LPSECURITY_ATTRIBUTES lpEventAttributes, LPCTSTR lpName, DWORD dwFlags, DWORD ) { BOOL manual_reset = dwFlags&0x00000001 ? TRUE : FALSE; // CREATE_EVENT_MANUAL_RESET BOOL initial_set = dwFlags&0x00000002 ? TRUE : FALSE; // CREATE_EVENT_INITIAL_SET return CreateEvent( lpEventAttributes, manual_reset, initial_set, lpName ); } #endif #if defined(RTL_SRWLOCK_INIT) #ifndef __TBB_USE_SRWLOCK // TODO: turn it on when bug 1952 will be fixed #define __TBB_USE_SRWLOCK 0 #endif #endif #else #error tbb/machine/windows_api.h should only be used for Windows based platforms #endif // _WIN32 || _WIN64 #endif // __TBB_machine_windows_api_H ================================================ FILE: benchmarks/tbb/machine/windows_ia32.h ================================================ /* Copyright 2005-2014 Intel Corporation. All Rights Reserved. This file is part of Threading Building Blocks. Threading Building Blocks is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. Threading Building Blocks is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Threading Building Blocks; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA As a special exception, you may use this file as part of a free software library without restriction. Specifically, if other files instantiate templates or use macros or inline functions from this file, or you compile this file and link it with other files to produce an executable, this file does not by itself cause the resulting executable to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the executable file might be covered by the GNU General Public License. */ #if !defined(__TBB_machine_H) || defined(__TBB_machine_windows_ia32_H) #error Do not #include this internal file directly; use public TBB headers instead. #endif #define __TBB_machine_windows_ia32_H #include "msvc_ia32_common.h" #define __TBB_WORDSIZE 4 #define __TBB_ENDIANNESS __TBB_ENDIAN_LITTLE #if __INTEL_COMPILER && (__INTEL_COMPILER < 1100) #define __TBB_compiler_fence() __asm { __asm nop } #define __TBB_full_memory_fence() __asm { __asm mfence } #elif _MSC_VER >= 1300 || __INTEL_COMPILER #pragma intrinsic(_ReadWriteBarrier) #pragma intrinsic(_mm_mfence) #define __TBB_compiler_fence() _ReadWriteBarrier() #define __TBB_full_memory_fence() _mm_mfence() #else #error Unsupported compiler - need to define __TBB_{control,acquire,release}_consistency_helper to support it #endif #define __TBB_control_consistency_helper() __TBB_compiler_fence() #define __TBB_acquire_consistency_helper() __TBB_compiler_fence() #define __TBB_release_consistency_helper() __TBB_compiler_fence() #if defined(_MSC_VER) && !defined(__INTEL_COMPILER) // Workaround for overzealous compiler warnings in /Wp64 mode #pragma warning (push) #pragma warning (disable: 4244 4267) #endif extern "C" { __int64 __TBB_EXPORTED_FUNC __TBB_machine_cmpswp8 (volatile void *ptr, __int64 value, __int64 comparand ); __int64 __TBB_EXPORTED_FUNC __TBB_machine_fetchadd8 (volatile void *ptr, __int64 addend ); __int64 __TBB_EXPORTED_FUNC __TBB_machine_fetchstore8 (volatile void *ptr, __int64 value ); void __TBB_EXPORTED_FUNC __TBB_machine_store8 (volatile void *ptr, __int64 value ); __int64 __TBB_EXPORTED_FUNC __TBB_machine_load8 (const volatile void *ptr); } //TODO: use _InterlockedXXX intrinsics as they available since VC 2005 #define __TBB_MACHINE_DEFINE_ATOMICS(S,T,U,A,C) \ static inline T __TBB_machine_cmpswp##S ( volatile void * ptr, U value, U comparand ) { \ T result; \ volatile T *p = (T *)ptr; \ __asm \ { \ __asm mov edx, p \ __asm mov C , value \ __asm mov A , comparand \ __asm lock cmpxchg [edx], C \ __asm mov result, A \ } \ return result; \ } \ \ static inline T __TBB_machine_fetchadd##S ( volatile void * ptr, U addend ) { \ T result; \ volatile T *p = (T *)ptr; \ __asm \ { \ __asm mov edx, p \ __asm mov A, addend \ __asm lock xadd [edx], A \ __asm mov result, A \ } \ return result; \ }\ \ static inline T __TBB_machine_fetchstore##S ( volatile void * ptr, U value ) { \ T result; \ volatile T *p = (T *)ptr; \ __asm \ { \ __asm mov edx, p \ __asm mov A, value \ __asm lock xchg [edx], A \ __asm mov result, A \ } \ return result; \ } __TBB_MACHINE_DEFINE_ATOMICS(1, __int8, __int8, al, cl) __TBB_MACHINE_DEFINE_ATOMICS(2, __int16, __int16, ax, cx) __TBB_MACHINE_DEFINE_ATOMICS(4, ptrdiff_t, ptrdiff_t, eax, ecx) #undef __TBB_MACHINE_DEFINE_ATOMICS static inline void __TBB_machine_OR( volatile void *operand, __int32 addend ) { __asm { mov eax, addend mov edx, [operand] lock or [edx], eax } } static inline void __TBB_machine_AND( volatile void *operand, __int32 addend ) { __asm { mov eax, addend mov edx, [operand] lock and [edx], eax } } #define __TBB_AtomicOR(P,V) __TBB_machine_OR(P,V) #define __TBB_AtomicAND(P,V) __TBB_machine_AND(P,V) //TODO: Check if it possible and profitable for IA-32 architecture on (Linux and Windows) //to use of 64-bit load/store via floating point registers together with full fence //for sequentially consistent load/store, instead of CAS. #define __TBB_USE_FETCHSTORE_AS_FULL_FENCED_STORE 1 #define __TBB_USE_GENERIC_HALF_FENCED_LOAD_STORE 1 #define __TBB_USE_GENERIC_RELAXED_LOAD_STORE 1 #define __TBB_USE_GENERIC_SEQUENTIAL_CONSISTENCY_LOAD_STORE 1 #if defined(_MSC_VER) && !defined(__INTEL_COMPILER) #pragma warning (pop) #endif // warnings 4244, 4267 are back ================================================ FILE: benchmarks/tbb/machine/windows_intel64.h ================================================ /* Copyright 2005-2014 Intel Corporation. All Rights Reserved. This file is part of Threading Building Blocks. Threading Building Blocks is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. Threading Building Blocks is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Threading Building Blocks; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA As a special exception, you may use this file as part of a free software library without restriction. Specifically, if other files instantiate templates or use macros or inline functions from this file, or you compile this file and link it with other files to produce an executable, this file does not by itself cause the resulting executable to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the executable file might be covered by the GNU General Public License. */ #if !defined(__TBB_machine_H) || defined(__TBB_machine_windows_intel64_H) #error Do not #include this internal file directly; use public TBB headers instead. #endif #define __TBB_machine_windows_intel64_H #define __TBB_WORDSIZE 8 #define __TBB_ENDIANNESS __TBB_ENDIAN_LITTLE #include #include "msvc_ia32_common.h" //TODO: Use _InterlockedXXX16 intrinsics for 2 byte operations #if !__INTEL_COMPILER #pragma intrinsic(_InterlockedOr64) #pragma intrinsic(_InterlockedAnd64) #pragma intrinsic(_InterlockedCompareExchange) #pragma intrinsic(_InterlockedCompareExchange64) #pragma intrinsic(_InterlockedExchangeAdd) #pragma intrinsic(_InterlockedExchangeAdd64) #pragma intrinsic(_InterlockedExchange) #pragma intrinsic(_InterlockedExchange64) #endif /* !(__INTEL_COMPILER) */ #if __INTEL_COMPILER && (__INTEL_COMPILER < 1100) #define __TBB_compiler_fence() __asm { __asm nop } #define __TBB_full_memory_fence() __asm { __asm mfence } #elif _MSC_VER >= 1300 || __INTEL_COMPILER #pragma intrinsic(_ReadWriteBarrier) #pragma intrinsic(_mm_mfence) #define __TBB_compiler_fence() _ReadWriteBarrier() #define __TBB_full_memory_fence() _mm_mfence() #endif #define __TBB_control_consistency_helper() __TBB_compiler_fence() #define __TBB_acquire_consistency_helper() __TBB_compiler_fence() #define __TBB_release_consistency_helper() __TBB_compiler_fence() // ATTENTION: if you ever change argument types in machine-specific primitives, // please take care of atomic_word<> specializations in tbb/atomic.h extern "C" { __int8 __TBB_EXPORTED_FUNC __TBB_machine_cmpswp1 (volatile void *ptr, __int8 value, __int8 comparand ); __int8 __TBB_EXPORTED_FUNC __TBB_machine_fetchadd1 (volatile void *ptr, __int8 addend ); __int8 __TBB_EXPORTED_FUNC __TBB_machine_fetchstore1 (volatile void *ptr, __int8 value ); __int16 __TBB_EXPORTED_FUNC __TBB_machine_cmpswp2 (volatile void *ptr, __int16 value, __int16 comparand ); __int16 __TBB_EXPORTED_FUNC __TBB_machine_fetchadd2 (volatile void *ptr, __int16 addend ); __int16 __TBB_EXPORTED_FUNC __TBB_machine_fetchstore2 (volatile void *ptr, __int16 value ); } inline long __TBB_machine_cmpswp4 (volatile void *ptr, __int32 value, __int32 comparand ) { return _InterlockedCompareExchange( (long*)ptr, value, comparand ); } inline long __TBB_machine_fetchadd4 (volatile void *ptr, __int32 addend ) { return _InterlockedExchangeAdd( (long*)ptr, addend ); } inline long __TBB_machine_fetchstore4 (volatile void *ptr, __int32 value ) { return _InterlockedExchange( (long*)ptr, value ); } inline __int64 __TBB_machine_cmpswp8 (volatile void *ptr, __int64 value, __int64 comparand ) { return _InterlockedCompareExchange64( (__int64*)ptr, value, comparand ); } inline __int64 __TBB_machine_fetchadd8 (volatile void *ptr, __int64 addend ) { return _InterlockedExchangeAdd64( (__int64*)ptr, addend ); } inline __int64 __TBB_machine_fetchstore8 (volatile void *ptr, __int64 value ) { return _InterlockedExchange64( (__int64*)ptr, value ); } #define __TBB_USE_FETCHSTORE_AS_FULL_FENCED_STORE 1 #define __TBB_USE_GENERIC_HALF_FENCED_LOAD_STORE 1 #define __TBB_USE_GENERIC_RELAXED_LOAD_STORE 1 #define __TBB_USE_GENERIC_SEQUENTIAL_CONSISTENCY_LOAD_STORE 1 inline void __TBB_machine_OR( volatile void *operand, intptr_t addend ) { _InterlockedOr64((__int64*)operand, addend); } inline void __TBB_machine_AND( volatile void *operand, intptr_t addend ) { _InterlockedAnd64((__int64*)operand, addend); } #define __TBB_AtomicOR(P,V) __TBB_machine_OR(P,V) #define __TBB_AtomicAND(P,V) __TBB_machine_AND(P,V) ================================================ FILE: benchmarks/tbb/machine/xbox360_ppc.h ================================================ /* Copyright 2005-2014 Intel Corporation. All Rights Reserved. This file is part of Threading Building Blocks. Threading Building Blocks is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. Threading Building Blocks is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Threading Building Blocks; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA As a special exception, you may use this file as part of a free software library without restriction. Specifically, if other files instantiate templates or use macros or inline functions from this file, or you compile this file and link it with other files to produce an executable, this file does not by itself cause the resulting executable to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the executable file might be covered by the GNU General Public License. */ // TODO: revise by comparing with mac_ppc.h #if !defined(__TBB_machine_H) || defined(__TBB_machine_xbox360_ppc_H) #error Do not #include this internal file directly; use public TBB headers instead. #endif #define __TBB_machine_xbox360_ppc_H #define NONET #define NOD3D #include "xtl.h" #include "ppcintrinsics.h" #if _MSC_VER >= 1300 extern "C" void _MemoryBarrier(); #pragma intrinsic(_MemoryBarrier) #define __TBB_control_consistency_helper() __isync() #define __TBB_acquire_consistency_helper() _MemoryBarrier() #define __TBB_release_consistency_helper() _MemoryBarrier() #endif #define __TBB_full_memory_fence() __sync() #define __TBB_WORDSIZE 4 #define __TBB_ENDIANNESS __TBB_ENDIAN_BIG //todo: define __TBB_USE_FENCED_ATOMICS and define acquire/release primitives to maximize performance inline __int32 __TBB_machine_cmpswp4(volatile void *ptr, __int32 value, __int32 comparand ) { __sync(); __int32 result = InterlockedCompareExchange((volatile LONG*)ptr, value, comparand); __isync(); return result; } inline __int64 __TBB_machine_cmpswp8(volatile void *ptr, __int64 value, __int64 comparand ) { __sync(); __int64 result = InterlockedCompareExchange64((volatile LONG64*)ptr, value, comparand); __isync(); return result; } #define __TBB_USE_GENERIC_PART_WORD_CAS 1 #define __TBB_USE_GENERIC_FETCH_ADD 1 #define __TBB_USE_GENERIC_FETCH_STORE 1 #define __TBB_USE_GENERIC_HALF_FENCED_LOAD_STORE 1 #define __TBB_USE_GENERIC_RELAXED_LOAD_STORE 1 #define __TBB_USE_GENERIC_DWORD_LOAD_STORE 1 #define __TBB_USE_GENERIC_SEQUENTIAL_CONSISTENCY_LOAD_STORE 1 #pragma optimize( "", off ) inline void __TBB_machine_pause (__int32 delay ) { for (__int32 i=0; i> 0) & 1) + ((__TBB_XBOX360_HARDWARE_THREAD_MASK >> 1) & 1) + ((__TBB_XBOX360_HARDWARE_THREAD_MASK >> 2) & 1) + ((__TBB_XBOX360_HARDWARE_THREAD_MASK >> 3) & 1) + ((__TBB_XBOX360_HARDWARE_THREAD_MASK >> 4) & 1) + ((__TBB_XBOX360_HARDWARE_THREAD_MASK >> 5) & 1) + 1; // +1 accomodates for the master thread } static inline int __TBB_XBOX360_GetHardwareThreadIndex(int workerThreadIndex) { workerThreadIndex %= __TBB_XBOX360_DetectNumberOfWorkers()-1; int m = __TBB_XBOX360_HARDWARE_THREAD_MASK; int index = 0; int skipcount = workerThreadIndex; while (true) { if ((m & 1)!=0) { if (skipcount==0) break; skipcount--; } m >>= 1; index++; } return index; } #define __TBB_HardwareConcurrency() __TBB_XBOX360_DetectNumberOfWorkers() ================================================ FILE: benchmarks/tbb/mailbox.h ================================================ /* Copyright 2005-2014 Intel Corporation. All Rights Reserved. This file is part of Threading Building Blocks. Threading Building Blocks is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. Threading Building Blocks is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Threading Building Blocks; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA As a special exception, you may use this file as part of a free software library without restriction. Specifically, if other files instantiate templates or use macros or inline functions from this file, or you compile this file and link it with other files to produce an executable, this file does not by itself cause the resulting executable to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the executable file might be covered by the GNU General Public License. */ #ifndef _TBB_mailbox_H #define _TBB_mailbox_H #include "tbb/tbb_stddef.h" #include "tbb/cache_aligned_allocator.h" #include "scheduler_common.h" #include "tbb/atomic.h" namespace tbb { namespace internal { struct task_proxy : public task { static const intptr_t pool_bit = 1<<0; static const intptr_t mailbox_bit = 1<<1; static const intptr_t location_mask = pool_bit | mailbox_bit; /* All but two low-order bits represent a (task*). Two low-order bits mean: 1 = proxy is/was/will be in task pool 2 = proxy is/was/will be in mailbox */ intptr_t task_and_tag; //! Pointer to next task_proxy in a mailbox task_proxy *__TBB_atomic next_in_mailbox; //! Mailbox to which this was mailed. mail_outbox* outbox; //! True if the proxy is stored both in its sender's pool and in the destination mailbox. static bool is_shared ( intptr_t tat ) { return (tat & location_mask) == location_mask; } //! Returns a pointer to the encapsulated task or NULL. static task* task_ptr ( intptr_t tat ) { return (task*)(tat & ~location_mask); } //! Returns a pointer to the encapsulated task or NULL, and frees proxy if necessary. template inline task* extract_task () { __TBB_ASSERT( prefix().extra_state == es_task_proxy, "Normal task misinterpreted as a proxy?" ); intptr_t tat = __TBB_load_with_acquire(task_and_tag); __TBB_ASSERT( tat == from_bit || (is_shared(tat) && task_ptr(tat)), "Proxy's tag cannot specify both locations if the proxy " "was retrieved from one of its original locations" ); if ( tat != from_bit ) { const intptr_t cleaner_bit = location_mask & ~from_bit; // Attempt to transition the proxy to the "empty" state with // cleaner_bit specifying entity responsible for its eventual freeing. // Explicit cast to void* is to work around a seeming ICC 11.1 bug. if ( as_atomic(task_and_tag).compare_and_swap(cleaner_bit, tat) == tat ) { // Successfully grabbed the task, and left new owner with the job of freeing the proxy return task_ptr(tat); } } // Proxied task has already been claimed from another proxy location. __TBB_ASSERT( task_and_tag == from_bit, "Empty proxy cannot contain non-zero task pointer" ); poison_pointer(outbox); poison_pointer(next_in_mailbox); poison_value(task_and_tag); return NULL; } }; // struct task_proxy //! Internal representation of mail_outbox, without padding. class unpadded_mail_outbox { protected: typedef task_proxy*__TBB_atomic proxy_ptr; //! Pointer to first task_proxy in mailbox, or NULL if box is empty. proxy_ptr my_first; //! Pointer to pointer that will point to next item in the queue. Never NULL. proxy_ptr* __TBB_atomic my_last; //! Owner of mailbox is not executing a task, and has drained its own task pool. bool my_is_idle; }; //! Class representing where mail is put. /** Padded to occupy a cache line. */ class mail_outbox : padded { task_proxy* internal_pop() { task_proxy* const first = __TBB_load_relaxed(my_first); if( !first ) return NULL; __TBB_control_consistency_helper(); // on my_first // There is a first item in the mailbox. See if there is a second. if( task_proxy* second = first->next_in_mailbox ) { // There are at least two items, so first item can be popped easily. my_first = second; } else { // There is only one item. Some care is required to pop it. my_first = NULL; if( as_atomic(my_last).compare_and_swap(&my_first,&first->next_in_mailbox) == &first->next_in_mailbox ) { // Successfully transitioned mailbox from having one item to having none. __TBB_ASSERT(!first->next_in_mailbox,NULL); } else { // Some other thread updated my_last but has not filled in first->next_in_mailbox // Wait until first item points to second item. atomic_backoff backoff; while( !(second = first->next_in_mailbox) ) backoff.pause(); my_first = second; } } return first; } public: friend class mail_inbox; //! Push task_proxy onto the mailbox queue of another thread. /** Implementation is wait-free. */ void push( task_proxy& t ) { __TBB_ASSERT(&t, NULL); t.next_in_mailbox = NULL; proxy_ptr * const link = (proxy_ptr *)__TBB_FetchAndStoreW(&my_last,(intptr_t)&t.next_in_mailbox); // No release fence required for the next store, because there are no memory operations // between the previous fully fenced atomic operation and the store. __TBB_store_relaxed(*link, &t); } //! Return true if mailbox is empty bool empty() { return __TBB_load_relaxed(my_first) == NULL; } //! Construct *this as a mailbox from zeroed memory. /** Raise assertion if *this is not previously zeroed, or sizeof(this) is wrong. This method is provided instead of a full constructor since we know the object will be constructed in zeroed memory. */ void construct() { __TBB_ASSERT( sizeof(*this)==NFS_MaxLineSize, NULL ); __TBB_ASSERT( !my_first, NULL ); __TBB_ASSERT( !my_last, NULL ); __TBB_ASSERT( !my_is_idle, NULL ); my_last=&my_first; suppress_unused_warning(pad); } //! Drain the mailbox intptr_t drain() { intptr_t k = 0; // No fences here because other threads have already quit. for( ; task_proxy* t = my_first; ++k ) { my_first = t->next_in_mailbox; NFS_Free((char*)t - task_prefix_reservation_size); } return k; } //! True if thread that owns this mailbox is looking for work. bool recipient_is_idle() { return my_is_idle; } }; // class mail_outbox //! Class representing source of mail. class mail_inbox { //! Corresponding sink where mail that we receive will be put. mail_outbox* my_putter; public: //! Construct unattached inbox mail_inbox() : my_putter(NULL) {} //! Attach inbox to a corresponding outbox. void attach( mail_outbox& putter ) { __TBB_ASSERT(!my_putter,"already attached"); my_putter = &putter; } //! Detach inbox from its outbox void detach() { __TBB_ASSERT(my_putter,"not attached"); my_putter = NULL; } //! Get next piece of mail, or NULL if mailbox is empty. task_proxy* pop() { return my_putter->internal_pop(); } //! Return true if mailbox is empty bool empty() { return my_putter->empty(); } //! Indicate whether thread that reads this mailbox is idle. /** Raises assertion failure if mailbox is redundantly marked as not idle. */ void set_is_idle( bool value ) { if( my_putter ) { __TBB_ASSERT( my_putter->my_is_idle || value, "attempt to redundantly mark mailbox as not idle" ); my_putter->my_is_idle = value; } } //! Indicate whether thread that reads this mailbox is idle. bool is_idle_state ( bool value ) const { return !my_putter || my_putter->my_is_idle == value; } #if DO_ITT_NOTIFY //! Get pointer to corresponding outbox used for ITT_NOTIFY calls. void* outbox() const {return my_putter;} #endif /* DO_ITT_NOTIFY */ }; // class mail_inbox } // namespace internal } // namespace tbb #endif /* _TBB_mailbox_H */ ================================================ FILE: benchmarks/tbb/market.cpp ================================================ /* Copyright 2005-2014 Intel Corporation. All Rights Reserved. This file is part of Threading Building Blocks. Threading Building Blocks is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. Threading Building Blocks is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Threading Building Blocks; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA As a special exception, you may use this file as part of a free software library without restriction. Specifically, if other files instantiate templates or use macros or inline functions from this file, or you compile this file and link it with other files to produce an executable, this file does not by itself cause the resulting executable to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the executable file might be covered by the GNU General Public License. */ #include "tbb/tbb_stddef.h" #include "market.h" #include "tbb_main.h" #include "governor.h" #include "scheduler.h" #include "itt_notify.h" namespace tbb { namespace internal { void market::insert_arena_into_list ( arena& a ) { #if __TBB_TASK_PRIORITY arena_list_type &arenas = my_priority_levels[a.my_top_priority].arenas; arena *&next = my_priority_levels[a.my_top_priority].next_arena; #else /* !__TBB_TASK_PRIORITY */ arena_list_type &arenas = my_arenas; arena *&next = my_next_arena; #endif /* !__TBB_TASK_PRIORITY */ arenas.push_front( a ); if ( arenas.size() == 1 ) next = &*arenas.begin(); } void market::remove_arena_from_list ( arena& a ) { #if __TBB_TASK_PRIORITY arena_list_type &arenas = my_priority_levels[a.my_top_priority].arenas; arena *&next = my_priority_levels[a.my_top_priority].next_arena; #else /* !__TBB_TASK_PRIORITY */ arena_list_type &arenas = my_arenas; arena *&next = my_next_arena; #endif /* !__TBB_TASK_PRIORITY */ arena_list_type::iterator it = next; __TBB_ASSERT( it != arenas.end(), NULL ); if ( next == &a ) { if ( ++it == arenas.end() && arenas.size() > 1 ) it = arenas.begin(); next = &*it; } arenas.remove( a ); } //------------------------------------------------------------------------ // market //------------------------------------------------------------------------ market::market ( unsigned max_num_workers, size_t stack_size ) : my_ref_count(1) , my_stack_size(stack_size) , my_max_num_workers(max_num_workers) #if __TBB_TASK_PRIORITY , my_global_top_priority(normalized_normal_priority) , my_global_bottom_priority(normalized_normal_priority) #if __TBB_TRACK_PRIORITY_LEVEL_SATURATION , my_lowest_populated_level(normalized_normal_priority) #endif /* __TBB_TRACK_PRIORITY_LEVEL_SATURATION */ #endif /* __TBB_TASK_PRIORITY */ { #if __TBB_TASK_PRIORITY __TBB_ASSERT( my_global_reload_epoch == 0, NULL ); my_priority_levels[normalized_normal_priority].workers_available = max_num_workers; #endif /* __TBB_TASK_PRIORITY */ // Once created RML server will start initializing workers that will need // global market instance to get worker stack size my_server = governor::create_rml_server( *this ); __TBB_ASSERT( my_server, "Failed to create RML server" ); } market& market::global_market ( unsigned max_num_workers, size_t stack_size ) { global_market_mutex_type::scoped_lock lock( theMarketMutex ); market *m = theMarket; if ( m ) { ++m->my_ref_count; if ( m->my_stack_size < stack_size ) runtime_warning( "Newer master request for larger stack cannot be satisfied\n" ); } else { max_num_workers = max( governor::default_num_threads() - 1, max_num_workers ); // at least 1 worker is required to support starvation resistant tasks if( max_num_workers==0 ) max_num_workers = 1; // Create the global market instance size_t size = sizeof(market); #if __TBB_TASK_GROUP_CONTEXT __TBB_ASSERT( __TBB_offsetof(market, my_workers) + sizeof(generic_scheduler*) == sizeof(market), "my_workers must be the last data field of the market class"); size += sizeof(generic_scheduler*) * (max_num_workers - 1); #endif /* __TBB_TASK_GROUP_CONTEXT */ __TBB_InitOnce::add_ref(); void* storage = NFS_Allocate(1, size, NULL); memset( storage, 0, size ); // Initialize and publish global market m = new (storage) market( max_num_workers, stack_size ); theMarket = m; } return *m; } void market::destroy () { #if __TBB_COUNT_TASK_NODES if ( my_task_node_count ) runtime_warning( "Leaked %ld task objects\n", (long)my_task_node_count ); #endif /* __TBB_COUNT_TASK_NODES */ this->~market(); NFS_Free( this ); __TBB_InitOnce::remove_ref(); } void market::release () { __TBB_ASSERT( theMarket == this, "Global market instance was destroyed prematurely?" ); bool do_release = false; { global_market_mutex_type::scoped_lock lock(theMarketMutex); if ( --my_ref_count == 0 ) { do_release = true; theMarket = NULL; } } if( do_release ) my_server->request_close_connection(); } void market::wait_workers () { // usable for this kind of scheduler only __TBB_ASSERT(governor::needsWaitWorkers(), NULL); // wait till terminating last worker decresed my_ref_count while (__TBB_load_with_acquire(my_ref_count) > 1) __TBB_Yield(); __TBB_ASSERT(1 == my_ref_count, NULL); release(); } arena& market::create_arena ( unsigned max_num_workers, size_t stack_size ) { market &m = global_market( max_num_workers, stack_size ); // increases market's ref count #if __TBB_TASK_ARENA // Prevent cutting an extra slot for task_arena(p,0) with default market (p-1 workers). // This is a temporary workaround for 1968 until (TODO:) master slot reservation is reworked arena& a = arena::allocate_arena( m, min(max_num_workers, m.my_max_num_workers+1) ); #else arena& a = arena::allocate_arena( m, min(max_num_workers, m.my_max_num_workers) ); #endif // Add newly created arena into the existing market's list. arenas_list_mutex_type::scoped_lock lock(m.my_arenas_list_mutex); m.insert_arena_into_list(a); return a; } /** This method must be invoked under my_arenas_list_mutex. **/ void market::detach_arena ( arena& a ) { __TBB_ASSERT( theMarket == this, "Global market instance was destroyed prematurely?" ); #if __TBB_TRACK_PRIORITY_LEVEL_SATURATION __TBB_ASSERT( !a.my_num_workers_present, NULL ); #endif /* __TBB_TRACK_PRIORITY_LEVEL_SATURATION */ __TBB_ASSERT( !a.my_slots[0].my_scheduler, NULL ); remove_arena_from_list(a); if ( a.my_aba_epoch == my_arenas_aba_epoch ) ++my_arenas_aba_epoch; } void market::try_destroy_arena ( arena* a, uintptr_t aba_epoch ) { __TBB_ASSERT ( a, NULL ); arenas_list_mutex_type::scoped_lock lock(my_arenas_list_mutex); assert_market_valid(); #if __TBB_TASK_PRIORITY for ( int p = my_global_top_priority; p >= my_global_bottom_priority; --p ) { priority_level_info &pl = my_priority_levels[p]; arena_list_type &my_arenas = pl.arenas; #endif /* __TBB_TASK_PRIORITY */ arena_list_type::iterator it = my_arenas.begin(); for ( ; it != my_arenas.end(); ++it ) { if ( a == &*it ) { if ( it->my_aba_epoch == aba_epoch ) { // Arena is alive if ( !a->my_num_workers_requested && !a->my_references ) { __TBB_ASSERT( !a->my_num_workers_allotted && (a->my_pool_state == arena::SNAPSHOT_EMPTY || !a->my_max_num_workers), "Inconsistent arena state" ); // Arena is abandoned. Destroy it. detach_arena( *a ); lock.release(); a->free_arena(); } } return; } } #if __TBB_TASK_PRIORITY } #endif /* __TBB_TASK_PRIORITY */ } void market::try_destroy_arena ( market* m, arena* a, uintptr_t aba_epoch, bool master ) { // Arena may have been orphaned. Or it may have been destroyed. // Thus we cannot dereference the pointer to it until its liveness is verified. // Arena is alive if it is found in the market's list. if ( m != theMarket ) { // The market has already been emptied. return; } else if ( master ) { // If this is a master thread, market can be destroyed at any moment. // So protect it with an extra refcount. global_market_mutex_type::scoped_lock lock(theMarketMutex); if ( m != theMarket ) return; ++m->my_ref_count; } m->try_destroy_arena( a, aba_epoch ); if ( master ) m->release(); } /** This method must be invoked under my_arenas_list_mutex. **/ arena* market::arena_in_need ( arena_list_type &arenas, arena *&next ) { if ( arenas.empty() ) return NULL; arena_list_type::iterator it = next; __TBB_ASSERT( it != arenas.end(), NULL ); do { arena& a = *it; if ( ++it == arenas.end() ) it = arenas.begin(); if ( a.num_workers_active() < a.my_num_workers_allotted ) { a.my_references += 2; // add a worker #if __TBB_TRACK_PRIORITY_LEVEL_SATURATION ++a.my_num_workers_present; ++my_priority_levels[a.my_top_priority].workers_present; #endif /* __TBB_TRACK_PRIORITY_LEVEL_SATURATION */ as_atomic(next) = &*it; // a subject for innocent data race under the reader lock // TODO: rework global round robin policy to local or random to avoid this write return &a; } } while ( it != next ); return NULL; } void market::update_allotment ( arena_list_type& arenas, int workers_demand, int max_workers ) { __TBB_ASSERT( workers_demand, NULL ); max_workers = min(workers_demand, max_workers); int carry = 0; #if TBB_USE_ASSERT int assigned = 0; #endif /* TBB_USE_ASSERT */ arena_list_type::iterator it = arenas.begin(); for ( ; it != arenas.end(); ++it ) { arena& a = *it; if ( a.my_num_workers_requested <= 0 ) { __TBB_ASSERT( !a.my_num_workers_allotted, NULL ); continue; } int tmp = a.my_num_workers_requested * max_workers + carry; int allotted = tmp / workers_demand; carry = tmp % workers_demand; // a.my_num_workers_requested may temporarily exceed a.my_max_num_workers a.my_num_workers_allotted = min( allotted, (int)a.my_max_num_workers ); #if TBB_USE_ASSERT assigned += a.my_num_workers_allotted; #endif /* TBB_USE_ASSERT */ } __TBB_ASSERT( assigned <= workers_demand, NULL ); } #if __TBB_TASK_PRIORITY inline void market::update_global_top_priority ( intptr_t newPriority ) { GATHER_STATISTIC( ++governor::local_scheduler_if_initialized()->my_counters.market_prio_switches ); my_global_top_priority = newPriority; my_priority_levels[newPriority].workers_available = my_max_num_workers; advance_global_reload_epoch(); } inline void market::reset_global_priority () { my_global_bottom_priority = normalized_normal_priority; update_global_top_priority(normalized_normal_priority); #if __TBB_TRACK_PRIORITY_LEVEL_SATURATION my_lowest_populated_level = normalized_normal_priority; #endif /* __TBB_TRACK_PRIORITY_LEVEL_SATURATION */ } arena* market::arena_in_need ( arena* prev_arena ) { if( !has_any_demand() ) return NULL; arenas_list_mutex_type::scoped_lock lock(my_arenas_list_mutex, /*is_writer=*/false); assert_market_valid(); #if __TBB_TRACK_PRIORITY_LEVEL_SATURATION if ( prev_arena ) { priority_level_info &pl = my_priority_levels[prev_arena->my_top_priority]; --prev_arena->my_num_workers_present; --pl.workers_present; if ( !--prev_arena->my_references && !prev_arena->my_num_workers_requested ) { detach_arena( *a ); lock.release(); a->free_arena(); lock.acquire(); } } #else suppress_unused_warning(prev_arena); #endif /* __TBB_TRACK_PRIORITY_LEVEL_SATURATION */ int p = my_global_top_priority; arena *a = NULL; do { priority_level_info &pl = my_priority_levels[p]; #if __TBB_TRACK_PRIORITY_LEVEL_SATURATION __TBB_ASSERT( p >= my_lowest_populated_level, NULL ); if ( pl.workers_present >= pl.workers_requested ) continue; #endif /* __TBB_TRACK_PRIORITY_LEVEL_SATURATION */ a = arena_in_need( pl.arenas, pl.next_arena ); } while ( !a && --p >= my_global_bottom_priority ); return a; } void market::update_allotment ( intptr_t highest_affected_priority ) { intptr_t i = highest_affected_priority; int available = my_priority_levels[i].workers_available; #if __TBB_TRACK_PRIORITY_LEVEL_SATURATION my_lowest_populated_level = my_global_bottom_priority; #endif /* __TBB_TRACK_PRIORITY_LEVEL_SATURATION */ for ( ; i >= my_global_bottom_priority; --i ) { priority_level_info &pl = my_priority_levels[i]; pl.workers_available = available; if ( pl.workers_requested ) { update_allotment( pl.arenas, pl.workers_requested, available ); available -= pl.workers_requested; if ( available < 0 ) { available = 0; #if __TBB_TRACK_PRIORITY_LEVEL_SATURATION my_lowest_populated_level = i; #endif /* __TBB_TRACK_PRIORITY_LEVEL_SATURATION */ break; } } } __TBB_ASSERT( i <= my_global_bottom_priority || !available, NULL ); for ( --i; i >= my_global_bottom_priority; --i ) { priority_level_info &pl = my_priority_levels[i]; pl.workers_available = 0; arena_list_type::iterator it = pl.arenas.begin(); for ( ; it != pl.arenas.end(); ++it ) { __TBB_ASSERT( it->my_num_workers_requested || !it->my_num_workers_allotted, NULL ); it->my_num_workers_allotted = 0; } } } #endif /* __TBB_TASK_PRIORITY */ void market::adjust_demand ( arena& a, int delta ) { __TBB_ASSERT( theMarket, "market instance was destroyed prematurely?" ); if ( !delta ) return; my_arenas_list_mutex.lock(); int prev_req = a.my_num_workers_requested; a.my_num_workers_requested += delta; if ( a.my_num_workers_requested <= 0 ) { a.my_num_workers_allotted = 0; if ( prev_req <= 0 ) { my_arenas_list_mutex.unlock(); return; } delta = -prev_req; } #if __TBB_TASK_ARENA else if ( prev_req < 0 ) { delta = a.my_num_workers_requested; } #else /* __TBB_TASK_ARENA */ __TBB_ASSERT( prev_req >= 0, "Part-size request to RML?" ); #endif /* __TBB_TASK_ARENA */ #if __TBB_TASK_PRIORITY intptr_t p = a.my_top_priority; priority_level_info &pl = my_priority_levels[p]; pl.workers_requested += delta; __TBB_ASSERT( pl.workers_requested >= 0, NULL ); #if !__TBB_TASK_ARENA __TBB_ASSERT( a.my_num_workers_requested >= 0, NULL ); #else //TODO: understand the assertion and modify #endif if ( a.my_num_workers_requested <= 0 ) { if ( a.my_top_priority != normalized_normal_priority ) { GATHER_STATISTIC( ++governor::local_scheduler_if_initialized()->my_counters.arena_prio_resets ); update_arena_top_priority( a, normalized_normal_priority ); } a.my_bottom_priority = normalized_normal_priority; } if ( p == my_global_top_priority ) { if ( !pl.workers_requested ) { while ( --p >= my_global_bottom_priority && !my_priority_levels[p].workers_requested ) continue; if ( p < my_global_bottom_priority ) reset_global_priority(); else update_global_top_priority(p); } update_allotment( my_global_top_priority ); } else if ( p > my_global_top_priority ) { #if !__TBB_TASK_ARENA __TBB_ASSERT( pl.workers_requested > 0, NULL ); #else //TODO: understand the assertion and modify #endif update_global_top_priority(p); a.my_num_workers_allotted = min( (int)my_max_num_workers, a.my_num_workers_requested ); my_priority_levels[p - 1].workers_available = my_max_num_workers - a.my_num_workers_allotted; update_allotment( p - 1 ); } else if ( p == my_global_bottom_priority ) { if ( !pl.workers_requested ) { while ( ++p <= my_global_top_priority && !my_priority_levels[p].workers_requested ) continue; if ( p > my_global_top_priority ) reset_global_priority(); else { my_global_bottom_priority = p; #if __TBB_TRACK_PRIORITY_LEVEL_SATURATION my_lowest_populated_level = max( my_lowest_populated_level, p ); #endif /* __TBB_TRACK_PRIORITY_LEVEL_SATURATION */ } } else update_allotment( p ); } else if ( p < my_global_bottom_priority ) { __TBB_ASSERT( a.my_num_workers_requested > 0, NULL ); int prev_bottom = my_global_bottom_priority; my_global_bottom_priority = p; update_allotment( prev_bottom ); } else { __TBB_ASSERT( my_global_bottom_priority < p && p < my_global_top_priority, NULL ); update_allotment( p ); } __TBB_ASSERT( my_global_top_priority >= a.my_top_priority || a.my_num_workers_requested<=0, NULL ); assert_market_valid(); #else /* !__TBB_TASK_PRIORITY */ my_total_demand += delta; update_allotment(); #endif /* !__TBB_TASK_PRIORITY */ my_arenas_list_mutex.unlock(); // Must be called outside of any locks my_server->adjust_job_count_estimate( delta ); GATHER_STATISTIC( governor::local_scheduler_if_initialized() ? ++governor::local_scheduler_if_initialized()->my_counters.gate_switches : 0 ); } void market::process( job& j ) { generic_scheduler& s = static_cast(j); arena *a = NULL; __TBB_ASSERT( governor::is_set(&s), NULL ); #if !__TBB_SLEEP_PERMISSION while ( (a = arena_in_need(a)) ) a->process(s); #else//__TBB_SLEEP_PERMISSION enum { query_interval = 1000, first_interval = 1, pause_time = 100 // similar to PauseTime used for the stealing loop }; for(int i = first_interval; ; i--) { while ( (a = arena_in_need(a)) ) { a->process(s); i = first_interval; } if( i == 0 ) { #if __TBB_TASK_PRIORITY arena_list_type &al = my_priority_levels[my_global_top_priority].arenas; #else /* __TBB_TASK_PRIORITY */ arena_list_type &al = my_arenas; #endif /* __TBB_TASK_PRIORITY */ if( al.empty() ) // races if any are innocent TODO: replace by an RML query interface break; // no arenas left, perhaps going to shut down if( the_global_observer_list.ask_permission_to_leave() ) break; // go sleep __TBB_Yield(); i = query_interval; } else __TBB_Pause(pause_time); } #endif//__TBB_SLEEP_PERMISSION GATHER_STATISTIC( ++s.my_counters.market_roundtrips ); } void market::cleanup( job& j ) { __TBB_ASSERT( theMarket != this, NULL ); generic_scheduler& s = static_cast(j); generic_scheduler* mine = governor::local_scheduler_if_initialized(); __TBB_ASSERT( !mine || mine->my_arena_index!=0, NULL ); if( mine!=&s ) { governor::assume_scheduler( &s ); generic_scheduler::cleanup_worker( &s, mine!=NULL ); governor::assume_scheduler( mine ); } else { generic_scheduler::cleanup_worker( &s, true ); } } void market::acknowledge_close_connection() { destroy(); } ::rml::job* market::create_one_job() { unsigned index = ++my_num_workers; __TBB_ASSERT( index > 0, NULL ); ITT_THREAD_SET_NAME(_T("TBB Worker Thread")); // index serves as a hint decreasing conflicts between workers when they migrate between arenas generic_scheduler* s = generic_scheduler::create_worker( *this, index ); #if __TBB_TASK_GROUP_CONTEXT __TBB_ASSERT( index <= my_max_num_workers, NULL ); __TBB_ASSERT( !my_workers[index - 1], NULL ); my_workers[index - 1] = s; #endif /* __TBB_TASK_GROUP_CONTEXT */ governor::sign_on(s); return s; } #if __TBB_TASK_PRIORITY void market::update_arena_top_priority ( arena& a, intptr_t new_priority ) { GATHER_STATISTIC( ++governor::local_scheduler_if_initialized()->my_counters.arena_prio_switches ); __TBB_ASSERT( a.my_top_priority != new_priority, NULL ); priority_level_info &prev_level = my_priority_levels[a.my_top_priority], &new_level = my_priority_levels[new_priority]; remove_arena_from_list(a); a.my_top_priority = new_priority; insert_arena_into_list(a); ++a.my_reload_epoch; // TODO: synch with global reload epoch in order to optimize usage of local reload epoch #if __TBB_TRACK_PRIORITY_LEVEL_SATURATION // Arena's my_num_workers_present may remain positive for some time after its // my_num_workers_requested becomes zero. Thus the following two lines are // executed unconditionally. prev_level.workers_present -= a.my_num_workers_present; new_level.workers_present += a.my_num_workers_present; #endif /* __TBB_TRACK_PRIORITY_LEVEL_SATURATION */ prev_level.workers_requested -= a.my_num_workers_requested; new_level.workers_requested += a.my_num_workers_requested; __TBB_ASSERT( prev_level.workers_requested >= 0 && new_level.workers_requested >= 0, NULL ); } bool market::lower_arena_priority ( arena& a, intptr_t new_priority, uintptr_t old_reload_epoch ) { // TODO: replace the lock with a try_lock loop which performs a double check of the epoch arenas_list_mutex_type::scoped_lock lock(my_arenas_list_mutex); if ( a.my_reload_epoch != old_reload_epoch ) { assert_market_valid(); return false; } __TBB_ASSERT( a.my_top_priority > new_priority, NULL ); __TBB_ASSERT( my_global_top_priority >= a.my_top_priority, NULL ); intptr_t p = a.my_top_priority; update_arena_top_priority( a, new_priority ); if ( a.my_num_workers_requested > 0 ) { if ( my_global_bottom_priority > new_priority ) { my_global_bottom_priority = new_priority; } if ( p == my_global_top_priority && !my_priority_levels[p].workers_requested ) { // Global top level became empty for ( --p; !my_priority_levels[p].workers_requested; --p ) continue; __TBB_ASSERT( p >= my_global_bottom_priority, NULL ); update_global_top_priority(p); } update_allotment( p ); } __TBB_ASSERT( my_global_top_priority >= a.my_top_priority, NULL ); assert_market_valid(); return true; } bool market::update_arena_priority ( arena& a, intptr_t new_priority ) { arenas_list_mutex_type::scoped_lock lock(my_arenas_list_mutex); __TBB_ASSERT( my_global_top_priority >= a.my_top_priority || a.my_num_workers_requested <= 0, NULL ); assert_market_valid(); if ( a.my_top_priority == new_priority ) { return false; } else if ( a.my_top_priority > new_priority ) { if ( a.my_bottom_priority > new_priority ) a.my_bottom_priority = new_priority; return false; } else if ( a.my_num_workers_requested <= 0 ) { return false; } __TBB_ASSERT( my_global_top_priority >= a.my_top_priority, NULL ); intptr_t p = a.my_top_priority; intptr_t highest_affected_level = max(p, new_priority); update_arena_top_priority( a, new_priority ); if ( my_global_top_priority < new_priority ) { update_global_top_priority(new_priority); } else if ( my_global_top_priority == new_priority ) { advance_global_reload_epoch(); } else { __TBB_ASSERT( new_priority < my_global_top_priority, NULL ); __TBB_ASSERT( new_priority > my_global_bottom_priority, NULL ); if ( p == my_global_top_priority && !my_priority_levels[p].workers_requested ) { // Global top level became empty __TBB_ASSERT( my_global_bottom_priority < p, NULL ); for ( --p; !my_priority_levels[p].workers_requested; --p ) continue; __TBB_ASSERT( p >= new_priority, NULL ); update_global_top_priority(p); highest_affected_level = p; } } if ( p == my_global_bottom_priority ) { // Arena priority was increased from the global bottom level. __TBB_ASSERT( p < new_priority, NULL ); // n __TBB_ASSERT( new_priority <= my_global_top_priority, NULL ); while ( !my_priority_levels[my_global_bottom_priority].workers_requested ) ++my_global_bottom_priority; __TBB_ASSERT( my_global_bottom_priority <= new_priority, NULL ); __TBB_ASSERT( my_priority_levels[my_global_bottom_priority].workers_requested > 0, NULL ); } update_allotment( highest_affected_level ); __TBB_ASSERT( my_global_top_priority >= a.my_top_priority, NULL ); assert_market_valid(); return true; } #endif /* __TBB_TASK_PRIORITY */ #if __TBB_COUNT_TASK_NODES intptr_t market::workers_task_node_count() { intptr_t result = 0; ForEachArena(a) { result += a.workers_task_node_count(); } EndForEach(); return result; } #endif /* __TBB_COUNT_TASK_NODES */ } // namespace internal } // namespace tbb ================================================ FILE: benchmarks/tbb/market.h ================================================ /* Copyright 2005-2014 Intel Corporation. All Rights Reserved. This file is part of Threading Building Blocks. Threading Building Blocks is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. Threading Building Blocks is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Threading Building Blocks; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA As a special exception, you may use this file as part of a free software library without restriction. Specifically, if other files instantiate templates or use macros or inline functions from this file, or you compile this file and link it with other files to produce an executable, this file does not by itself cause the resulting executable to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the executable file might be covered by the GNU General Public License. */ #ifndef _TBB_market_H #define _TBB_market_H #include "tbb/tbb_stddef.h" #include "scheduler_common.h" #include "tbb/atomic.h" #include "tbb/spin_rw_mutex.h" #include "../rml/include/rml_tbb.h" #include "intrusive_list.h" #if defined(_MSC_VER) && defined(_Wp64) // Workaround for overzealous compiler warnings in /Wp64 mode #pragma warning (push) #pragma warning (disable: 4244) #endif namespace tbb { class task_group_context; namespace internal { //------------------------------------------------------------------------ // Class market //------------------------------------------------------------------------ class market : no_copy, rml::tbb_client { friend class generic_scheduler; friend class arena; template friend class custom_scheduler; friend class tbb::task_group_context; private: friend void ITT_DoUnsafeOneTimeInitialization (); typedef intrusive_list arena_list_type; //! Currently active global market static market* theMarket; typedef scheduler_mutex_type global_market_mutex_type; //! Mutex guarding creation/destruction of theMarket, insertions/deletions in my_arenas, and cancellation propagation static global_market_mutex_type theMarketMutex; //! Reference count controlling market object lifetime intptr_t my_ref_count; //! Lightweight mutex guarding accounting operations with arenas list typedef spin_rw_mutex arenas_list_mutex_type; arenas_list_mutex_type my_arenas_list_mutex; //! Pointer to the RML server object that services this TBB instance. rml::tbb_server* my_server; //! Stack size of worker threads size_t my_stack_size; //! Number of workers requested from the underlying resource manager unsigned my_max_num_workers; //! Number of workers that have been delivered by RML /** Used to assign indices to the new workers coming from RML, and busy part of my_workers array. **/ atomic my_num_workers; #if __TBB_TASK_PRIORITY //! Highest priority among active arenas in the market. /** Arena priority level is its tasks highest priority (specified by arena's my_top_priority member). Arena is active when it has outstanding request for workers. Note that inactive arena may have workers lingering there for some time. **/ intptr_t my_global_top_priority; //! Lowest priority among active arenas in the market. /** See also my_global_top_priority **/ intptr_t my_global_bottom_priority; //! Tracks events that may bring tasks in offload areas to the top priority level. /** Incremented when global top priority is decremented or a task group priority is elevated to the current top level. **/ uintptr_t my_global_reload_epoch; //! Information about arenas at a particular priority level struct priority_level_info { //! List of arenas at this priority level arena_list_type arenas; //! The first arena to be checked when idle worker seeks for an arena to enter /** The check happens in round-robin fashion. **/ arena *next_arena; //! Total amount of workers requested by arenas at this priority level. int workers_requested; //! Maximal amount of workers the market can tell off to this priority level. int workers_available; #if __TBB_TRACK_PRIORITY_LEVEL_SATURATION //! Total amount of workers that are in arenas at this priority level. int workers_present; #endif /* __TBB_TRACK_PRIORITY_LEVEL_SATURATION */ }; // struct priority_level_info //! Information about arenas at different priority levels priority_level_info my_priority_levels[num_priority_levels]; #if __TBB_TRACK_PRIORITY_LEVEL_SATURATION //! Lowest priority level having workers available. intptr_t my_lowest_populated_level; #endif /* __TBB_TRACK_PRIORITY_LEVEL_SATURATION */ #else /* !__TBB_TASK_PRIORITY */ //! List of registered arenas arena_list_type my_arenas; //! The first arena to be checked when idle worker seeks for an arena to enter /** The check happens in round-robin fashion. **/ arena *my_next_arena; //! Number of workers that were requested by all arenas int my_total_demand; #endif /* !__TBB_TASK_PRIORITY */ //! ABA prevention marker to assign to newly created arenas uintptr_t my_arenas_aba_epoch; #if __TBB_COUNT_TASK_NODES //! Net number of nodes that have been allocated from heap. /** Updated each time a scheduler or arena is destroyed. */ atomic my_task_node_count; #endif /* __TBB_COUNT_TASK_NODES */ //! Constructor market ( unsigned max_num_workers, size_t stack_size ); //! Factory method creating new market object static market& global_market ( unsigned max_num_workers, size_t stack_size ); //! Destroys and deallocates market object created by market::create() void destroy (); void try_destroy_arena ( arena*, uintptr_t aba_epoch ); #if __TBB_TASK_PRIORITY //! Returns next arena that needs more workers, or NULL. arena* arena_in_need ( arena* prev_arena ); //! Recalculates the number of workers assigned to each arena at and below the specified priority. /** The actual number of workers servicing a particular arena may temporarily deviate from the calculated value. **/ void update_allotment ( intptr_t highest_affected_priority ); //! Changes arena's top priority and updates affected priority levels info in the market. void update_arena_top_priority ( arena& a, intptr_t newPriority ); //! Changes market's global top priority and related settings. inline void update_global_top_priority ( intptr_t newPriority ); //! Resets empty market's global top and bottom priority to the normal level. inline void reset_global_priority (); inline void advance_global_reload_epoch () { __TBB_store_with_release( my_global_reload_epoch, my_global_reload_epoch + 1 ); } void assert_market_valid () const { __TBB_ASSERT( (my_priority_levels[my_global_top_priority].workers_requested > 0 && !my_priority_levels[my_global_top_priority].arenas.empty()) || (my_global_top_priority == my_global_bottom_priority && my_global_top_priority == normalized_normal_priority), NULL ); } bool has_any_demand() const { for(int p = 0; p < num_priority_levels; p++) if( __TBB_load_with_acquire(my_priority_levels[p].workers_requested) > 0 ) // TODO: use as_atomic here and below return true; return false; } #else /* !__TBB_TASK_PRIORITY */ //! Recalculates the number of workers assigned to each arena in the list. /** The actual number of workers servicing a particular arena may temporarily deviate from the calculated value. **/ void update_allotment () { if ( my_total_demand ) update_allotment( my_arenas, my_total_demand, (int)my_max_num_workers ); } //! Returns next arena that needs more workers, or NULL. arena* arena_in_need (arena*) { if(__TBB_load_with_acquire(my_total_demand) <= 0) return NULL; arenas_list_mutex_type::scoped_lock lock(my_arenas_list_mutex, /*is_writer=*/false); return arena_in_need(my_arenas, my_next_arena); } void assert_market_valid () const {} #endif /* !__TBB_TASK_PRIORITY */ //! Returns number of masters doing computational (CPU-intensive) work int num_active_masters () { return 1; } // APM TODO: replace with a real mechanism //////////////////////////////////////////////////////////////////////////////// // Helpers to unify code branches dependent on priority feature presence void insert_arena_into_list ( arena& a ); void remove_arena_from_list ( arena& a ); arena* arena_in_need ( arena_list_type &arenas, arena *&next ); static void update_allotment ( arena_list_type& arenas, int total_demand, int max_workers ); //////////////////////////////////////////////////////////////////////////////// // Implementation of rml::tbb_client interface methods /*override*/ version_type version () const { return 0; } /*override*/ unsigned max_job_count () const { return my_max_num_workers; } /*override*/ size_t min_stack_size () const { return worker_stack_size(); } /*override*/ policy_type policy () const { return throughput; } /*override*/ job* create_one_job (); /*override*/ void cleanup( job& j ); /*override*/ void acknowledge_close_connection (); /*override*/ void process( job& j ); public: //! Creates an arena object /** If necessary, also creates global market instance, and boosts its ref count. Each call to create_arena() must be matched by the call to arena::free_arena(). **/ static arena& create_arena ( unsigned max_num_workers, size_t stack_size ); //! Removes the arena from the market's list static void try_destroy_arena ( market*, arena*, uintptr_t aba_epoch, bool master ); //! Removes the arena from the market's list void detach_arena ( arena& ); //! Decrements market's refcount and destroys it in the end void release (); //! Request that arena's need in workers should be adjusted. /** Concurrent invocations are possible only on behalf of different arenas. **/ void adjust_demand ( arena&, int delta ); //! Guarantee that request_close_connection() is called by master, not some worker /** Must be called before arena::on_thread_leaving() **/ void prepare_wait_workers() { ++my_ref_count; } //! Wait workers termination void wait_workers (); //! Returns the requested stack size of worker threads. size_t worker_stack_size () const { return my_stack_size; } #if _WIN32||_WIN64 //! register master with the resource manager void register_master( ::rml::server::execution_resource_t& rsc_handle ) { __TBB_ASSERT( my_server, "RML server not defined?" ); // the server may ignore registration and set master_exec_resource to NULL. my_server->register_master( rsc_handle ); } //! unregister master with the resource manager void unregister_master( ::rml::server::execution_resource_t& rsc_handle ) const { my_server->unregister_master( rsc_handle ); } #endif /* WIN */ #if __TBB_TASK_GROUP_CONTEXT //! Finds all contexts affected by the state change and propagates the new state to them. template bool propagate_task_group_state ( T task_group_context::*mptr_state, task_group_context& src, T new_state ); #endif /* __TBB_TASK_GROUP_CONTEXT */ #if __TBB_TASK_PRIORITY //! Lowers arena's priority is not higher than newPriority /** Returns true if arena priority was actually elevated. **/ bool lower_arena_priority ( arena& a, intptr_t new_priority, uintptr_t old_reload_epoch ); //! Makes sure arena's priority is not lower than newPriority /** Returns true if arena priority was elevated. Also updates arena's bottom priority boundary if necessary. This method is called whenever a user changes priority, because whether it was hiked or sunk can be determined for sure only under the lock used by this function. **/ bool update_arena_priority ( arena& a, intptr_t new_priority ); #endif /* __TBB_TASK_PRIORITY */ #if __TBB_COUNT_TASK_NODES //! Returns the number of task objects "living" in worker threads intptr_t workers_task_node_count(); //! Net number of nodes that have been allocated from heap. /** Updated each time a scheduler or arena is destroyed. */ void update_task_node_count( intptr_t delta ) { my_task_node_count += delta; } #endif /* __TBB_COUNT_TASK_NODES */ #if __TBB_TASK_GROUP_CONTEXT //! Array of pointers to the registered workers /** Used by cancellation propagation mechanism. Must be the last data member of the class market. **/ generic_scheduler* my_workers[1]; #endif /* __TBB_TASK_GROUP_CONTEXT */ }; // class market #if __TBB_TASK_PRIORITY #define BeginForEachArena(a) \ arenas_list_mutex_type::scoped_lock arena_list_lock(my_arenas_list_mutex); \ for ( intptr_t i = my_global_top_priority; i >= my_global_bottom_priority; --i ) { \ /*arenas_list_mutex_type::scoped_lock arena_list_lock(my_priority_levels[i].my_arenas_list_mutex);*/ \ arena_list_type &arenas = my_priority_levels[i].arenas; #else /* !__TBB_TASK_PRIORITY */ #define BeginForEachArena(a) \ arena_list_type &arenas = my_arenas; { #endif /* !__TBB_TASK_PRIORITY */ #define ForEachArena(a) \ BeginForEachArena(a) \ arena_list_type::iterator it = arenas.begin(); \ for ( ; it != arenas.end(); ++it ) { \ arena &a = *it; #define EndForEach() }} } // namespace internal } // namespace tbb #if defined(_MSC_VER) && defined(_Wp64) // Workaround for overzealous compiler warnings in /Wp64 mode #pragma warning (pop) #endif // warning 4244 is back #endif /* _TBB_market_H */ ================================================ FILE: benchmarks/tbb/memory_pool.h ================================================ /* Copyright 2005-2014 Intel Corporation. All Rights Reserved. This file is part of Threading Building Blocks. Threading Building Blocks is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. Threading Building Blocks is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Threading Building Blocks; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA As a special exception, you may use this file as part of a free software library without restriction. Specifically, if other files instantiate templates or use macros or inline functions from this file, or you compile this file and link it with other files to produce an executable, this file does not by itself cause the resulting executable to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the executable file might be covered by the GNU General Public License. */ #ifndef __TBB_memory_pool_H #define __TBB_memory_pool_H #if !TBB_PREVIEW_MEMORY_POOL #error Set TBB_PREVIEW_MEMORY_POOL to include memory_pool.h #endif /** @file */ #include "scalable_allocator.h" #include // std::bad_alloc #if __TBB_ALLOCATOR_CONSTRUCT_VARIADIC #include // std::forward #endif #if __TBB_EXTRA_DEBUG #define __TBBMALLOC_ASSERT ASSERT #else #define __TBBMALLOC_ASSERT(a,b) ((void)0) #endif namespace tbb { namespace interface6 { //! @cond INTERNAL namespace internal { //! Base of thread-safe pool allocator for variable-size requests class pool_base : tbb::internal::no_copy { // Pool interface is separate from standard allocator classes because it has // to maintain internal state, no copy or assignment. Move and swap are possible. public: //! Reset pool to reuse its memory (free all objects at once) void recycle() { rml::pool_reset(my_pool); } //! The "malloc" analogue to allocate block of memory of size bytes void *malloc(size_t size) { return rml::pool_malloc(my_pool, size); } //! The "free" analogue to discard a previously allocated piece of memory. void free(void* ptr) { rml::pool_free(my_pool, ptr); } //! The "realloc" analogue complementing pool_malloc. // Enables some low-level optimization possibilities void *realloc(void* ptr, size_t size) { return rml::pool_realloc(my_pool, ptr, size); } protected: //! destroy pool - must be called in a child class void destroy() { rml::pool_destroy(my_pool); } rml::MemoryPool *my_pool; }; } // namespace internal //! @endcond #if _MSC_VER && !defined(__INTEL_COMPILER) // Workaround for erroneous "unreferenced parameter" warning in method destroy. #pragma warning (push) #pragma warning (disable: 4100) #endif //! Meets "allocator" requirements of ISO C++ Standard, Section 20.1.5 /** @ingroup memory_allocation */ template class memory_pool_allocator { protected: typedef P pool_type; pool_type *my_pool; template friend class memory_pool_allocator; template friend bool operator==( const memory_pool_allocator& a, const memory_pool_allocator& b); template friend bool operator!=( const memory_pool_allocator& a, const memory_pool_allocator& b); public: typedef typename tbb::internal::allocator_type::value_type value_type; typedef value_type* pointer; typedef const value_type* const_pointer; typedef value_type& reference; typedef const value_type& const_reference; typedef size_t size_type; typedef ptrdiff_t difference_type; template struct rebind { typedef memory_pool_allocator other; }; memory_pool_allocator(pool_type &pool) throw() : my_pool(&pool) {} memory_pool_allocator(const memory_pool_allocator& src) throw() : my_pool(src.my_pool) {} template memory_pool_allocator(const memory_pool_allocator& src) throw() : my_pool(src.my_pool) {} pointer address(reference x) const { return &x; } const_pointer address(const_reference x) const { return &x; } //! Allocate space for n objects. pointer allocate( size_type n, const void* /*hint*/ = 0) { return static_cast( my_pool->malloc( n*sizeof(value_type) ) ); } //! Free previously allocated block of memory. void deallocate( pointer p, size_type ) { my_pool->free(p); } //! Largest value for which method allocate might succeed. size_type max_size() const throw() { size_type max = static_cast(-1) / sizeof (value_type); return (max > 0 ? max : 1); } //! Copy-construct value at location pointed to by p. #if __TBB_ALLOCATOR_CONSTRUCT_VARIADIC template void construct(U *p, Args&&... args) { ::new((void *)p) U(std::forward(args)...); } #else // __TBB_ALLOCATOR_CONSTRUCT_VARIADIC #if __TBB_CPP11_RVALUE_REF_PRESENT void construct( pointer p, value_type&& value ) {::new((void*)(p)) value_type(std::move(value));} #endif void construct( pointer p, const value_type& value ) { ::new((void*)(p)) value_type(value); } #endif // __TBB_ALLOCATOR_CONSTRUCT_VARIADIC //! Destroy value at location pointed to by p. void destroy( pointer p ) { p->~value_type(); } }; #if _MSC_VER && !defined(__INTEL_COMPILER) #pragma warning (pop) #endif // warning 4100 is back //! Analogous to std::allocator, as defined in ISO C++ Standard, Section 20.4.1 /** @ingroup memory_allocation */ template class memory_pool_allocator { public: typedef P pool_type; typedef void* pointer; typedef const void* const_pointer; typedef void value_type; template struct rebind { typedef memory_pool_allocator other; }; memory_pool_allocator( pool_type &pool) throw() : my_pool(&pool) {} memory_pool_allocator( const memory_pool_allocator& src) throw() : my_pool(src.my_pool) {} template memory_pool_allocator(const memory_pool_allocator& src) throw() : my_pool(src.my_pool) {} protected: pool_type *my_pool; template friend class memory_pool_allocator; template friend bool operator==( const memory_pool_allocator& a, const memory_pool_allocator& b); template friend bool operator!=( const memory_pool_allocator& a, const memory_pool_allocator& b); }; template inline bool operator==( const memory_pool_allocator& a, const memory_pool_allocator& b) {return a.my_pool==b.my_pool;} template inline bool operator!=( const memory_pool_allocator& a, const memory_pool_allocator& b) {return a.my_pool!=b.my_pool;} //! Thread-safe growable pool allocator for variable-size requests template class memory_pool : public internal::pool_base { Alloc my_alloc; // TODO: base-class optimization static void *allocate_request(intptr_t pool_id, size_t & bytes); static int deallocate_request(intptr_t pool_id, void*, size_t raw_bytes); public: //! construct pool with underlying allocator memory_pool(const Alloc &src = Alloc()); //! destroy pool ~memory_pool() { destroy(); } // call the callbacks first and destroy my_alloc latter }; class fixed_pool : public internal::pool_base { void *my_buffer; size_t my_size; inline static void *allocate_request(intptr_t pool_id, size_t & bytes); public: //! construct pool with underlying allocator inline fixed_pool(void *buf, size_t size); //! destroy pool ~fixed_pool() { destroy(); } }; //////////////// Implementation /////////////// template memory_pool::memory_pool(const Alloc &src) : my_alloc(src) { rml::MemPoolPolicy args(allocate_request, deallocate_request, sizeof(typename Alloc::value_type)); rml::MemPoolError res = rml::pool_create_v1(intptr_t(this), &args, &my_pool); if( res!=rml::POOL_OK ) __TBB_THROW(std::bad_alloc()); } template void *memory_pool::allocate_request(intptr_t pool_id, size_t & bytes) { memory_pool &self = *reinterpret_cast*>(pool_id); const size_t unit_size = sizeof(typename Alloc::value_type); __TBBMALLOC_ASSERT( 0 == bytes%unit_size, NULL); void *ptr; __TBB_TRY { ptr = self.my_alloc.allocate( bytes/unit_size ); } __TBB_CATCH(...) { return 0; } return ptr; } #if __TBB_MSVC_UNREACHABLE_CODE_IGNORED // Workaround for erroneous "unreachable code" warning in the template below. // Specific for VC++ 17-18 compiler #pragma warning (push) #pragma warning (disable: 4702) #endif template int memory_pool::deallocate_request(intptr_t pool_id, void* raw_ptr, size_t raw_bytes) { memory_pool &self = *reinterpret_cast*>(pool_id); const size_t unit_size = sizeof(typename Alloc::value_type); __TBBMALLOC_ASSERT( 0 == raw_bytes%unit_size, NULL); self.my_alloc.deallocate( static_cast(raw_ptr), raw_bytes/unit_size ); return 0; } #if __TBB_MSVC_UNREACHABLE_CODE_IGNORED #pragma warning (pop) #endif inline fixed_pool::fixed_pool(void *buf, size_t size) : my_buffer(buf), my_size(size) { if( !buf || !size ) __TBB_THROW(std::bad_alloc()); rml::MemPoolPolicy args(allocate_request, 0, size, /*fixedPool=*/true); rml::MemPoolError res = rml::pool_create_v1(intptr_t(this), &args, &my_pool); if( res!=rml::POOL_OK ) __TBB_THROW(std::bad_alloc()); } inline void *fixed_pool::allocate_request(intptr_t pool_id, size_t & bytes) { fixed_pool &self = *reinterpret_cast(pool_id); __TBBMALLOC_ASSERT(0 != self.my_size, "The buffer must not be used twice."); bytes = self.my_size; self.my_size = 0; // remember that buffer has been used return self.my_buffer; } } //namespace interface6 using interface6::memory_pool_allocator; using interface6::memory_pool; using interface6::fixed_pool; } //namespace tbb #undef __TBBMALLOC_ASSERT #endif// __TBB_memory_pool_H ================================================ FILE: benchmarks/tbb/mutex.cpp ================================================ /* Copyright 2005-2014 Intel Corporation. All Rights Reserved. This file is part of Threading Building Blocks. Threading Building Blocks is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. Threading Building Blocks is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Threading Building Blocks; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA As a special exception, you may use this file as part of a free software library without restriction. Specifically, if other files instantiate templates or use macros or inline functions from this file, or you compile this file and link it with other files to produce an executable, this file does not by itself cause the resulting executable to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the executable file might be covered by the GNU General Public License. */ #if _WIN32||_WIN64 #include // EDEADLK #endif #include "tbb/mutex.h" #include "itt_notify.h" namespace tbb { void mutex::scoped_lock::internal_acquire( mutex& m ) { #if _WIN32||_WIN64 switch( m.state ) { case INITIALIZED: case HELD: EnterCriticalSection( &m.impl ); // If a thread comes here, and another thread holds the lock, it will block // in EnterCriticalSection. When it returns from EnterCriticalSection, // m.state must be set to INITIALIZED. If the same thread tries to acquire a lock it // aleady holds, the lock is in HELD state, thus will cause throwing the exception. if (m.state==HELD) tbb::internal::handle_perror(EDEADLK,"mutex::scoped_lock: deadlock caused by attempt to reacquire held mutex"); m.state = HELD; break; case DESTROYED: __TBB_ASSERT(false,"mutex::scoped_lock: mutex already destroyed"); break; default: __TBB_ASSERT(false,"mutex::scoped_lock: illegal mutex state"); break; } #else int error_code = pthread_mutex_lock(&m.impl); if( error_code ) tbb::internal::handle_perror(error_code,"mutex::scoped_lock: pthread_mutex_lock failed"); #endif /* _WIN32||_WIN64 */ my_mutex = &m; } void mutex::scoped_lock::internal_release() { __TBB_ASSERT( my_mutex, "mutex::scoped_lock: not holding a mutex" ); #if _WIN32||_WIN64 switch( my_mutex->state ) { case INITIALIZED: __TBB_ASSERT(false,"mutex::scoped_lock: try to release the lock without acquisition"); break; case HELD: my_mutex->state = INITIALIZED; LeaveCriticalSection(&my_mutex->impl); break; case DESTROYED: __TBB_ASSERT(false,"mutex::scoped_lock: mutex already destroyed"); break; default: __TBB_ASSERT(false,"mutex::scoped_lock: illegal mutex state"); break; } #else int error_code = pthread_mutex_unlock(&my_mutex->impl); __TBB_ASSERT_EX(!error_code, "mutex::scoped_lock: pthread_mutex_unlock failed"); #endif /* _WIN32||_WIN64 */ my_mutex = NULL; } bool mutex::scoped_lock::internal_try_acquire( mutex& m ) { #if _WIN32||_WIN64 switch( m.state ) { case INITIALIZED: case HELD: break; case DESTROYED: __TBB_ASSERT(false,"mutex::scoped_lock: mutex already destroyed"); break; default: __TBB_ASSERT(false,"mutex::scoped_lock: illegal mutex state"); break; } #endif /* _WIN32||_WIN64 */ bool result; #if _WIN32||_WIN64 result = TryEnterCriticalSection(&m.impl)!=0; if( result ) { __TBB_ASSERT(m.state!=HELD, "mutex::scoped_lock: deadlock caused by attempt to reacquire held mutex"); m.state = HELD; } #else result = pthread_mutex_trylock(&m.impl)==0; #endif /* _WIN32||_WIN64 */ if( result ) my_mutex = &m; return result; } void mutex::internal_construct() { #if _WIN32||_WIN64 InitializeCriticalSectionEx(&impl, 4000, 0); state = INITIALIZED; #else int error_code = pthread_mutex_init(&impl,NULL); if( error_code ) tbb::internal::handle_perror(error_code,"mutex: pthread_mutex_init failed"); #endif /* _WIN32||_WIN64*/ ITT_SYNC_CREATE(&impl, _T("tbb::mutex"), _T("")); } void mutex::internal_destroy() { #if _WIN32||_WIN64 switch( state ) { case INITIALIZED: DeleteCriticalSection(&impl); break; case DESTROYED: __TBB_ASSERT(false,"mutex: already destroyed"); break; default: __TBB_ASSERT(false,"mutex: illegal state for destruction"); break; } state = DESTROYED; #else int error_code = pthread_mutex_destroy(&impl); __TBB_ASSERT_EX(!error_code,"mutex: pthread_mutex_destroy failed"); #endif /* _WIN32||_WIN64 */ } } // namespace tbb ================================================ FILE: benchmarks/tbb/mutex.h ================================================ /* Copyright 2005-2014 Intel Corporation. All Rights Reserved. This file is part of Threading Building Blocks. Threading Building Blocks is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. Threading Building Blocks is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Threading Building Blocks; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA As a special exception, you may use this file as part of a free software library without restriction. Specifically, if other files instantiate templates or use macros or inline functions from this file, or you compile this file and link it with other files to produce an executable, this file does not by itself cause the resulting executable to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the executable file might be covered by the GNU General Public License. */ #ifndef __TBB_mutex_H #define __TBB_mutex_H #if _WIN32||_WIN64 #include "machine/windows_api.h" #else #include #endif /* _WIN32||_WIN64 */ #include #include "aligned_space.h" #include "tbb_stddef.h" #include "tbb_profiling.h" namespace tbb { //! Wrapper around the platform's native reader-writer lock. /** For testing purposes only. @ingroup synchronization */ class mutex : internal::mutex_copy_deprecated_and_disabled { public: //! Construct unacquired mutex. mutex() { #if TBB_USE_ASSERT || TBB_USE_THREADING_TOOLS internal_construct(); #else #if _WIN32||_WIN64 InitializeCriticalSectionEx(&impl, 4000, 0); #else int error_code = pthread_mutex_init(&impl,NULL); if( error_code ) tbb::internal::handle_perror(error_code,"mutex: pthread_mutex_init failed"); #endif /* _WIN32||_WIN64*/ #endif /* TBB_USE_ASSERT */ }; ~mutex() { #if TBB_USE_ASSERT internal_destroy(); #else #if _WIN32||_WIN64 DeleteCriticalSection(&impl); #else pthread_mutex_destroy(&impl); #endif /* _WIN32||_WIN64 */ #endif /* TBB_USE_ASSERT */ }; class scoped_lock; friend class scoped_lock; //! The scoped locking pattern /** It helps to avoid the common problem of forgetting to release lock. It also nicely provides the "node" for queuing locks. */ class scoped_lock : internal::no_copy { public: //! Construct lock that has not acquired a mutex. scoped_lock() : my_mutex(NULL) {}; //! Acquire lock on given mutex. scoped_lock( mutex& mutex ) { acquire( mutex ); } //! Release lock (if lock is held). ~scoped_lock() { if( my_mutex ) release(); } //! Acquire lock on given mutex. void acquire( mutex& mutex ) { #if TBB_USE_ASSERT internal_acquire(mutex); #else mutex.lock(); my_mutex = &mutex; #endif /* TBB_USE_ASSERT */ } //! Try acquire lock on given mutex. bool try_acquire( mutex& mutex ) { #if TBB_USE_ASSERT return internal_try_acquire (mutex); #else bool result = mutex.try_lock(); if( result ) my_mutex = &mutex; return result; #endif /* TBB_USE_ASSERT */ } //! Release lock void release() { #if TBB_USE_ASSERT internal_release (); #else my_mutex->unlock(); my_mutex = NULL; #endif /* TBB_USE_ASSERT */ } private: //! The pointer to the current mutex to work mutex* my_mutex; //! All checks from acquire using mutex.state were moved here void __TBB_EXPORTED_METHOD internal_acquire( mutex& m ); //! All checks from try_acquire using mutex.state were moved here bool __TBB_EXPORTED_METHOD internal_try_acquire( mutex& m ); //! All checks from release using mutex.state were moved here void __TBB_EXPORTED_METHOD internal_release(); friend class mutex; }; // Mutex traits static const bool is_rw_mutex = false; static const bool is_recursive_mutex = false; static const bool is_fair_mutex = false; // ISO C++0x compatibility methods //! Acquire lock void lock() { #if TBB_USE_ASSERT aligned_space tmp; new(tmp.begin()) scoped_lock(*this); #else #if _WIN32||_WIN64 EnterCriticalSection(&impl); #else int error_code = pthread_mutex_lock(&impl); if( error_code ) tbb::internal::handle_perror(error_code,"mutex: pthread_mutex_lock failed"); #endif /* _WIN32||_WIN64 */ #endif /* TBB_USE_ASSERT */ } //! Try acquiring lock (non-blocking) /** Return true if lock acquired; false otherwise. */ bool try_lock() { #if TBB_USE_ASSERT aligned_space tmp; scoped_lock& s = *tmp.begin(); s.my_mutex = NULL; return s.internal_try_acquire(*this); #else #if _WIN32||_WIN64 return TryEnterCriticalSection(&impl)!=0; #else return pthread_mutex_trylock(&impl)==0; #endif /* _WIN32||_WIN64 */ #endif /* TBB_USE_ASSERT */ } //! Release lock void unlock() { #if TBB_USE_ASSERT aligned_space tmp; scoped_lock& s = *tmp.begin(); s.my_mutex = this; s.internal_release(); #else #if _WIN32||_WIN64 LeaveCriticalSection(&impl); #else pthread_mutex_unlock(&impl); #endif /* _WIN32||_WIN64 */ #endif /* TBB_USE_ASSERT */ } //! Return native_handle #if _WIN32||_WIN64 typedef LPCRITICAL_SECTION native_handle_type; #else typedef pthread_mutex_t* native_handle_type; #endif native_handle_type native_handle() { return (native_handle_type) &impl; } enum state_t { INITIALIZED=0x1234, DESTROYED=0x789A, HELD=0x56CD }; private: #if _WIN32||_WIN64 CRITICAL_SECTION impl; enum state_t state; #else pthread_mutex_t impl; #endif /* _WIN32||_WIN64 */ //! All checks from mutex constructor using mutex.state were moved here void __TBB_EXPORTED_METHOD internal_construct(); //! All checks from mutex destructor using mutex.state were moved here void __TBB_EXPORTED_METHOD internal_destroy(); #if _WIN32||_WIN64 public: //! Set the internal state void set_state( state_t to ) { state = to; } #endif }; __TBB_DEFINE_PROFILING_SET_NAME(mutex) } // namespace tbb #endif /* __TBB_mutex_H */ ================================================ FILE: benchmarks/tbb/null_mutex.h ================================================ /* Copyright 2005-2014 Intel Corporation. All Rights Reserved. This file is part of Threading Building Blocks. Threading Building Blocks is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. Threading Building Blocks is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Threading Building Blocks; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA As a special exception, you may use this file as part of a free software library without restriction. Specifically, if other files instantiate templates or use macros or inline functions from this file, or you compile this file and link it with other files to produce an executable, this file does not by itself cause the resulting executable to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the executable file might be covered by the GNU General Public License. */ #ifndef __TBB_null_mutex_H #define __TBB_null_mutex_H #include "tbb_stddef.h" namespace tbb { //! A mutex which does nothing /** A null_mutex does no operation and simulates success. @ingroup synchronization */ class null_mutex : internal::mutex_copy_deprecated_and_disabled { public: //! Represents acquisition of a mutex. class scoped_lock : internal::no_copy { public: scoped_lock() {} scoped_lock( null_mutex& ) {} ~scoped_lock() {} void acquire( null_mutex& ) {} bool try_acquire( null_mutex& ) { return true; } void release() {} }; null_mutex() {} // Mutex traits static const bool is_rw_mutex = false; static const bool is_recursive_mutex = true; static const bool is_fair_mutex = true; }; } #endif /* __TBB_null_mutex_H */ ================================================ FILE: benchmarks/tbb/null_rw_mutex.h ================================================ /* Copyright 2005-2014 Intel Corporation. All Rights Reserved. This file is part of Threading Building Blocks. Threading Building Blocks is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. Threading Building Blocks is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Threading Building Blocks; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA As a special exception, you may use this file as part of a free software library without restriction. Specifically, if other files instantiate templates or use macros or inline functions from this file, or you compile this file and link it with other files to produce an executable, this file does not by itself cause the resulting executable to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the executable file might be covered by the GNU General Public License. */ #ifndef __TBB_null_rw_mutex_H #define __TBB_null_rw_mutex_H #include "tbb_stddef.h" namespace tbb { //! A rw mutex which does nothing /** A null_rw_mutex is a rw mutex that does nothing and simulates successful operation. @ingroup synchronization */ class null_rw_mutex : internal::mutex_copy_deprecated_and_disabled { public: //! Represents acquisition of a mutex. class scoped_lock : internal::no_copy { public: scoped_lock() {} scoped_lock( null_rw_mutex& , bool = true ) {} ~scoped_lock() {} void acquire( null_rw_mutex& , bool = true ) {} bool upgrade_to_writer() { return true; } bool downgrade_to_reader() { return true; } bool try_acquire( null_rw_mutex& , bool = true ) { return true; } void release() {} }; null_rw_mutex() {} // Mutex traits static const bool is_rw_mutex = true; static const bool is_recursive_mutex = true; static const bool is_fair_mutex = true; }; } #endif /* __TBB_null_rw_mutex_H */ ================================================ FILE: benchmarks/tbb/observer_proxy.cpp ================================================ /* Copyright 2005-2014 Intel Corporation. All Rights Reserved. This file is part of Threading Building Blocks. Threading Building Blocks is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. Threading Building Blocks is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Threading Building Blocks; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA As a special exception, you may use this file as part of a free software library without restriction. Specifically, if other files instantiate templates or use macros or inline functions from this file, or you compile this file and link it with other files to produce an executable, this file does not by itself cause the resulting executable to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the executable file might be covered by the GNU General Public License. */ #include "tbb/tbb_config.h" #if !__TBB_ARENA_OBSERVER #error __TBB_ARENA_OBSERVER must be defined #endif #if __TBB_SCHEDULER_OBSERVER #include "observer_proxy.h" #include "tbb_main.h" #include "governor.h" #include "scheduler.h" #include "arena.h" namespace tbb { namespace internal { padded the_global_observer_list; #if TBB_USE_ASSERT static atomic observer_proxy_count; struct check_observer_proxy_count { ~check_observer_proxy_count() { if( observer_proxy_count!=0 ) { runtime_warning( "Leaked %ld observer_proxy objects\n", long(observer_proxy_count) ); } } }; static check_observer_proxy_count the_check_observer_proxy_count; #endif /* TBB_USE_ASSERT */ interface6::task_scheduler_observer* observer_proxy::get_v6_observer() { if(my_version != 6) return NULL; return static_cast(my_observer); } bool observer_proxy::is_global() { return !get_v6_observer() || get_v6_observer()->my_context_tag == interface6::task_scheduler_observer::global_tag; } observer_proxy::observer_proxy( task_scheduler_observer_v3& tso ) : my_list(NULL), my_next(NULL), my_prev(NULL), my_observer(&tso) { #if TBB_USE_ASSERT ++observer_proxy_count; #endif /* TBB_USE_ASSERT */ // 1 for observer my_ref_count = 1; my_version = load(my_observer->my_busy_count) == interface6::task_scheduler_observer::v6_trait ? 6 : 0; __TBB_ASSERT( my_version >= 6 || !load(my_observer->my_busy_count), NULL ); } #if TBB_USE_ASSERT observer_proxy::~observer_proxy () { __TBB_ASSERT( !my_ref_count, "Attempt to destroy proxy still in use" ); poison_value(my_ref_count); poison_pointer(my_prev); poison_pointer(my_next); --observer_proxy_count; } #endif /* TBB_USE_ASSERT */ template T atomic_fetch_and_store ( T* addr, const V& val ) { return (T)atomic_traits::fetch_and_store( addr, (T)val ); } void observer_list::clear () { __TBB_ASSERT( this != &the_global_observer_list, "Method clear() cannot be used on the list of global observers" ); // Though the method will work fine for the empty list, we require the caller // to check for the list emptiness before invoking it to avoid extra overhead. __TBB_ASSERT( !empty(), NULL ); { scoped_lock lock(mutex(), /*is_writer=*/true); observer_proxy *next = my_head; while ( observer_proxy *p = next ) { __TBB_ASSERT( p->my_version >= 6, NULL ); next = p->my_next; // Both proxy p and observer p->my_observer (if non-null) are guaranteed // to be alive while the list is locked. task_scheduler_observer_v3 *obs = p->my_observer; // Make sure that possible concurrent observer destruction does not // conflict with the proxy list cleanup. if ( !obs || !(p = (observer_proxy*)__TBB_FetchAndStoreW(&obs->my_proxy, 0)) ) continue; // accessing 'obs' after detaching of obs->my_proxy leads to the race with observer destruction __TBB_ASSERT( !next || p == next->my_prev, NULL ); __TBB_ASSERT( is_alive(p->my_ref_count), "Observer's proxy died prematurely" ); __TBB_ASSERT( p->my_ref_count == 1, "Reference for observer is missing" ); #if TBB_USE_ASSERT p->my_observer = NULL; p->my_ref_count = 0; #endif /* TBB_USE_ASSERT */ remove(p); delete p; } } while( my_head ) __TBB_Yield(); } void observer_list::insert ( observer_proxy* p ) { scoped_lock lock(mutex(), /*is_writer=*/true); if ( my_head ) { p->my_prev = my_tail; my_tail->my_next = p; } else my_head = p; my_tail = p; } void observer_list::remove ( observer_proxy* p ) { __TBB_ASSERT( my_head, "Attempt to remove an item from an empty list" ); __TBB_ASSERT( !my_tail->my_next, "Last item's my_next must be NULL" ); if( p == my_tail ) { __TBB_ASSERT( !p->my_next, NULL ); my_tail = p->my_prev; } else { __TBB_ASSERT( p->my_next, NULL ); p->my_next->my_prev = p->my_prev; } if ( p == my_head ) { __TBB_ASSERT( !p->my_prev, NULL ); my_head = p->my_next; } else { __TBB_ASSERT( p->my_prev, NULL ); p->my_prev->my_next = p->my_next; } __TBB_ASSERT( (my_head && my_tail) || (!my_head && !my_tail), NULL ); } void observer_list::remove_ref( observer_proxy* p ) { int r = p->my_ref_count; __TBB_ASSERT( is_alive(r), NULL ); while(r>1) { __TBB_ASSERT( r!=0, NULL ); int r_old = p->my_ref_count.compare_and_swap(r-1,r); if( r_old==r ) { // Successfully decremented count. return; } r = r_old; } __TBB_ASSERT( r==1, NULL ); // Reference count might go to zero { // Use lock to avoid resurrection by a thread concurrently walking the list observer_list::scoped_lock lock(mutex(), /*is_writer=*/true); r = --p->my_ref_count; if( !r ) remove(p); } __TBB_ASSERT( r || !p->my_ref_count, NULL ); if( !r ) delete p; } void observer_list::do_notify_entry_observers( observer_proxy*& last, bool worker ) { // Pointer p marches though the list from last (exclusively) to the end. observer_proxy *p = last, *prev = p; for(;;) { task_scheduler_observer_v3* tso=NULL; // Hold lock on list only long enough to advance to the next proxy in the list. { scoped_lock lock(mutex(), /*is_writer=*/false); do { if( p ) { // We were already processing the list. if( observer_proxy* q = p->my_next ) { if( p == prev ) remove_ref_fast(prev); // sets prev to NULL if successful p = q; } else { // Reached the end of the list. if( p == prev ) { // Keep the reference as we store the 'last' pointer in scheduler __TBB_ASSERT(p->my_ref_count >= 1 + (p->my_observer?1:0), NULL); } else { // The last few proxies were empty __TBB_ASSERT(p->my_ref_count, NULL); ++p->my_ref_count; if( prev ) { lock.release(); remove_ref(prev); } } last = p; return; } } else { // Starting pass through the list p = my_head; if( !p ) return; } tso = p->my_observer; } while( !tso ); ++p->my_ref_count; ++tso->my_busy_count; } __TBB_ASSERT( !prev || p!=prev, NULL ); // Release the proxy pinned before p if( prev ) remove_ref(prev); // Do not hold any locks on the list while calling user's code. // Do not intercept any exceptions that may escape the callback so that // they are either handled by the TBB scheduler or passed to the debugger. tso->on_scheduler_entry(worker); __TBB_ASSERT(p->my_ref_count, NULL); intptr_t bc = --tso->my_busy_count; __TBB_ASSERT_EX( bc>=0, "my_busy_count underflowed" ); prev = p; } } void observer_list::do_notify_exit_observers( observer_proxy* last, bool worker ) { // Pointer p marches though the list from the beginning to last (inclusively). observer_proxy *p = NULL, *prev = NULL; for(;;) { task_scheduler_observer_v3* tso=NULL; // Hold lock on list only long enough to advance to the next proxy in the list. { scoped_lock lock(mutex(), /*is_writer=*/false); do { if( p ) { // We were already processing the list. if( p != last ) { __TBB_ASSERT( p->my_next, "List items before 'last' must have valid my_next pointer" ); if( p == prev ) remove_ref_fast(prev); // sets prev to NULL if successful p = p->my_next; } else { // remove the reference from the last item remove_ref_fast(p); if( p ) { lock.release(); remove_ref(p); } return; } } else { // Starting pass through the list p = my_head; __TBB_ASSERT( p, "Nonzero 'last' must guarantee that the global list is non-empty" ); } tso = p->my_observer; } while( !tso ); // The item is already refcounted if ( p != last ) // the last is already referenced since entry notification ++p->my_ref_count; ++tso->my_busy_count; } __TBB_ASSERT( !prev || p!=prev, NULL ); if( prev ) remove_ref(prev); // Do not hold any locks on the list while calling user's code. // Do not intercept any exceptions that may escape the callback so that // they are either handled by the TBB scheduler or passed to the debugger. tso->on_scheduler_exit(worker); __TBB_ASSERT(p->my_ref_count || p == last, NULL); intptr_t bc = --tso->my_busy_count; __TBB_ASSERT_EX( bc>=0, "my_busy_count underflowed" ); prev = p; } } #if __TBB_SLEEP_PERMISSION bool observer_list::ask_permission_to_leave() { __TBB_ASSERT( this == &the_global_observer_list, "This method cannot be used on lists of arena observers" ); if( !my_head ) return true; // Pointer p marches though the list observer_proxy *p = NULL, *prev = NULL; bool result = true; while( result ) { task_scheduler_observer* tso = NULL; // Hold lock on list only long enough to advance to the next proxy in the list. { scoped_lock lock(mutex(), /*is_writer=*/false); do { if( p ) { // We were already processing the list. observer_proxy* q = p->my_next; // read next, remove the previous reference if( p == prev ) remove_ref_fast(prev); // sets prev to NULL if successful if( q ) p = q; else { // Reached the end of the list. if( prev ) { lock.release(); remove_ref(prev); } return result; } } else { // Starting pass through the list p = my_head; if( !p ) return result; } tso = p->get_v6_observer(); } while( !tso ); ++p->my_ref_count; ++tso->my_busy_count; } __TBB_ASSERT( !prev || p!=prev, NULL ); // Release the proxy pinned before p if( prev ) remove_ref(prev); // Do not hold any locks on the list while calling user's code. // Do not intercept any exceptions that may escape the callback so that // they are either handled by the TBB scheduler or passed to the debugger. result = tso->may_sleep(); __TBB_ASSERT(p->my_ref_count, NULL); intptr_t bc = --tso->my_busy_count; __TBB_ASSERT_EX( bc>=0, "my_busy_count underflowed" ); prev = p; } if( prev ) remove_ref(prev); return result; } #endif//__TBB_SLEEP_PERMISSION void task_scheduler_observer_v3::observe( bool enable ) { if( enable ) { if( !my_proxy ) { my_proxy = new observer_proxy( *this ); my_busy_count = 0; // proxy stores versioning information, clear it if ( !my_proxy->is_global() ) { // Local observer activation generic_scheduler* s = governor::local_scheduler_if_initialized(); #if __TBB_TASK_ARENA __TBB_ASSERT( my_proxy->get_v6_observer(), NULL ); intptr_t tag = my_proxy->get_v6_observer()->my_context_tag; if( tag != interface6::task_scheduler_observer::implicit_tag ) { // explicit arena task_arena *a = reinterpret_cast(tag); a->initialize(); my_proxy->my_list = &a->my_arena->my_observers; } else #endif { if( !s ) s = governor::init_scheduler( (unsigned)task_scheduler_init::automatic, 0, true ); __TBB_ASSERT( __TBB_InitOnce::initialization_done(), NULL ); __TBB_ASSERT( s && s->my_arena, NULL ); my_proxy->my_list = &s->my_arena->my_observers; } my_proxy->my_list->insert(my_proxy); // Notify newly activated observer and other pending ones if it belongs to current arena if(s && &s->my_arena->my_observers == my_proxy->my_list ) my_proxy->my_list->notify_entry_observers( s->my_last_local_observer, s->is_worker() ); } else { // Obsolete. Global observer activation if( !__TBB_InitOnce::initialization_done() ) DoOneTimeInitializations(); my_proxy->my_list = &the_global_observer_list; my_proxy->my_list->insert(my_proxy); if( generic_scheduler* s = governor::local_scheduler_if_initialized() ) { // Notify newly created observer of its own thread. // Any other pending observers are notified too. the_global_observer_list.notify_entry_observers( s->my_last_global_observer, s->is_worker() ); } } } } else { // Make sure that possible concurrent proxy list cleanup does not conflict // with the observer destruction here. if ( observer_proxy* proxy = (observer_proxy*)__TBB_FetchAndStoreW(&my_proxy, 0) ) { // List destruction should not touch this proxy after we've won the above interlocked exchange. __TBB_ASSERT( proxy->my_observer == this, NULL ); __TBB_ASSERT( is_alive(proxy->my_ref_count), "Observer's proxy died prematurely" ); __TBB_ASSERT( proxy->my_ref_count >= 1, "reference for observer missing" ); observer_list &list = *proxy->my_list; { // Ensure that none of the list walkers relies on observer pointer validity observer_list::scoped_lock lock(list.mutex(), /*is_writer=*/true); proxy->my_observer = NULL; // Proxy may still be held by other threads (to track the last notified observer) if( !--proxy->my_ref_count ) {// nobody can increase it under exclusive lock list.remove(proxy); __TBB_ASSERT( !proxy->my_ref_count, NULL ); delete proxy; } } while( my_busy_count ) // other threads are still accessing the callback __TBB_Yield(); } } } } // namespace internal } // namespace tbb #endif /* __TBB_SCHEDULER_OBSERVER */ ================================================ FILE: benchmarks/tbb/observer_proxy.h ================================================ /* Copyright 2005-2014 Intel Corporation. All Rights Reserved. This file is part of Threading Building Blocks. Threading Building Blocks is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. Threading Building Blocks is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Threading Building Blocks; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA As a special exception, you may use this file as part of a free software library without restriction. Specifically, if other files instantiate templates or use macros or inline functions from this file, or you compile this file and link it with other files to produce an executable, this file does not by itself cause the resulting executable to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the executable file might be covered by the GNU General Public License. */ #ifndef _TBB_observer_proxy_H #define _TBB_observer_proxy_H #if __TBB_SCHEDULER_OBSERVER #include "scheduler_common.h" // to include task.h #include "tbb/task_scheduler_observer.h" #include "tbb/spin_rw_mutex.h" #include "tbb/aligned_space.h" namespace tbb { namespace internal { class observer_list { friend class arena; // Mutex is wrapped with aligned_space to shut up warnings when its destructor // is called while threads are still using it. typedef aligned_space my_mutex_type; //! Pointer to the head of this list. observer_proxy* my_head; //! Pointer to the tail of this list. observer_proxy* my_tail; //! Mutex protecting this list. my_mutex_type my_mutex; //! Back-pointer to the arena this list belongs to. arena* my_arena; //! Decrement refcount of the proxy p if there are other outstanding references. /** In case of success sets p to NULL. Must be invoked from under the list lock. **/ inline static void remove_ref_fast( observer_proxy*& p ); //! Implements notify_entry_observers functionality. void do_notify_entry_observers( observer_proxy*& last, bool worker ); //! Implements notify_exit_observers functionality. void do_notify_exit_observers( observer_proxy* last, bool worker ); public: observer_list () : my_head(NULL), my_tail(NULL) {} //! Removes and destroys all observer proxies from the list. /** Cannot be used concurrently with other methods. **/ void clear (); //! Add observer proxy to the tail of the list. void insert ( observer_proxy* p ); //! Remove observer proxy from the list. void remove ( observer_proxy* p ); //! Decrement refcount of the proxy and destroy it if necessary. /** When refcount reaches zero removes the proxy from the list and destructs it. **/ void remove_ref( observer_proxy* p ); //! Type of the scoped lock for the reader-writer mutex associated with the list. typedef spin_rw_mutex::scoped_lock scoped_lock; //! Accessor to the reader-writer mutex associated with the list. spin_rw_mutex& mutex () { return my_mutex.begin()[0]; } bool empty () const { return my_head == NULL; } //! Call entry notifications on observers added after last was notified. /** Updates last to become the last notified observer proxy (in the global list) or leaves it to be NULL. The proxy has its refcount incremented. **/ inline void notify_entry_observers( observer_proxy*& last, bool worker ); //! Call exit notifications on last and observers added before it. inline void notify_exit_observers( observer_proxy*& last, bool worker ); //! Call may_sleep callbacks to ask for permission for a worker thread to leave market bool ask_permission_to_leave(); }; // class observer_list //! Wrapper for an observer object /** To maintain shared lists of observers the scheduler first wraps each observer object into a proxy so that a list item remained valid even after the corresponding proxy object is destroyed by the user code. **/ class observer_proxy { friend class task_scheduler_observer_v3; friend class observer_list; //! Reference count used for garbage collection. /** 1 for reference from my task_scheduler_observer. 1 for each task dispatcher's last observer pointer. No accounting for neighbors in the shared list. */ atomic my_ref_count; //! Reference to the list this observer belongs to. observer_list* my_list; //! Pointer to next observer in the list specified by my_head. /** NULL for the last item in the list. **/ observer_proxy* my_next; //! Pointer to the previous observer in the list specified by my_head. /** For the head of the list points to the last item. **/ observer_proxy* my_prev; //! Associated observer task_scheduler_observer_v3* my_observer; //! Version char my_version; interface6::task_scheduler_observer* get_v6_observer(); bool is_global(); //TODO: move them back inline when un-CPF'ing //! Constructs proxy for the given observer and adds it to the specified list. observer_proxy( task_scheduler_observer_v3& ); #if TBB_USE_ASSERT ~observer_proxy(); #endif /* TBB_USE_ASSERT */ //! Shut up the warning observer_proxy& operator = ( const observer_proxy& ); }; // class observer_proxy inline void observer_list::remove_ref_fast( observer_proxy*& p ) { if( p->my_observer ) { // Can decrement refcount quickly, as it cannot drop to zero while under the lock. int r = --p->my_ref_count; __TBB_ASSERT_EX( r, NULL ); p = NULL; } else { // Use slow form of refcount decrementing, after the lock is released. } } inline void observer_list::notify_entry_observers( observer_proxy*& last, bool worker ) { if ( last == my_tail ) return; do_notify_entry_observers( last, worker ); } inline void observer_list::notify_exit_observers( observer_proxy*& last, bool worker ) { if ( !last ) return; __TBB_ASSERT(is_alive((uintptr_t)last), NULL); do_notify_exit_observers( last, worker ); __TBB_ASSERT(last, NULL); poison_value(last); } extern padded the_global_observer_list; } // namespace internal } // namespace tbb #endif /* __TBB_SCHEDULER_OBSERVER */ #endif /* _TBB_observer_proxy_H */ ================================================ FILE: benchmarks/tbb/parallel_do.h ================================================ /* Copyright 2005-2014 Intel Corporation. All Rights Reserved. This file is part of Threading Building Blocks. Threading Building Blocks is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. Threading Building Blocks is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Threading Building Blocks; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA As a special exception, you may use this file as part of a free software library without restriction. Specifically, if other files instantiate templates or use macros or inline functions from this file, or you compile this file and link it with other files to produce an executable, this file does not by itself cause the resulting executable to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the executable file might be covered by the GNU General Public License. */ #ifndef __TBB_parallel_do_H #define __TBB_parallel_do_H #include "internal/_range_iterator.h" #include "task.h" #include "aligned_space.h" #include namespace tbb { //! @cond INTERNAL namespace internal { template class parallel_do_feeder_impl; template class do_group_task; //! Strips its template type argument from 'cv' and '&' qualifiers template struct strip { typedef T type; }; template struct strip { typedef T type; }; template struct strip { typedef T type; }; template struct strip { typedef T type; }; template struct strip { typedef T type; }; // Most of the compilers remove cv-qualifiers from non-reference function argument types. // But unfortunately there are those that don't. template struct strip { typedef T type; }; template struct strip { typedef T type; }; template struct strip { typedef T type; }; } // namespace internal //! @endcond //! Class the user supplied algorithm body uses to add new tasks /** \param Item Work item type **/ template class parallel_do_feeder: internal::no_copy { parallel_do_feeder() {} virtual ~parallel_do_feeder () {} virtual void internal_add( const Item& item ) = 0; template friend class internal::parallel_do_feeder_impl; public: //! Add a work item to a running parallel_do. void add( const Item& item ) {internal_add(item);} }; //! @cond INTERNAL namespace internal { //! For internal use only. /** Selects one of the two possible forms of function call member operator. @ingroup algorithms **/ template class parallel_do_operator_selector { typedef parallel_do_feeder Feeder; template static void internal_call( const Body& obj, A1& arg1, A2&, void (Body::*)(CvItem) const ) { obj(arg1); } template static void internal_call( const Body& obj, A1& arg1, A2& arg2, void (Body::*)(CvItem, parallel_do_feeder&) const ) { obj(arg1, arg2); } public: template static void call( const Body& obj, A1& arg1, A2& arg2 ) { internal_call( obj, arg1, arg2, &Body::operator() ); } }; //! For internal use only. /** Executes one iteration of a do. @ingroup algorithms */ template class do_iteration_task: public task { typedef parallel_do_feeder_impl feeder_type; Item my_value; feeder_type& my_feeder; do_iteration_task( const Item& value, feeder_type& feeder ) : my_value(value), my_feeder(feeder) {} /*override*/ task* execute() { parallel_do_operator_selector::call(*my_feeder.my_body, my_value, my_feeder); return NULL; } template friend class parallel_do_feeder_impl; }; // class do_iteration_task template class do_iteration_task_iter: public task { typedef parallel_do_feeder_impl feeder_type; Iterator my_iter; feeder_type& my_feeder; do_iteration_task_iter( const Iterator& iter, feeder_type& feeder ) : my_iter(iter), my_feeder(feeder) {} /*override*/ task* execute() { parallel_do_operator_selector::call(*my_feeder.my_body, *my_iter, my_feeder); return NULL; } template friend class do_group_task_forward; template friend class do_group_task_input; template friend class do_task_iter; }; // class do_iteration_task_iter //! For internal use only. /** Implements new task adding procedure. @ingroup algorithms **/ template class parallel_do_feeder_impl : public parallel_do_feeder { /*override*/ void internal_add( const Item& item ) { typedef do_iteration_task iteration_type; iteration_type& t = *new (task::allocate_additional_child_of(*my_barrier)) iteration_type(item, *this); t.spawn( t ); } public: const Body* my_body; empty_task* my_barrier; parallel_do_feeder_impl() { my_barrier = new( task::allocate_root() ) empty_task(); __TBB_ASSERT(my_barrier, "root task allocation failed"); } #if __TBB_TASK_GROUP_CONTEXT parallel_do_feeder_impl(tbb::task_group_context &context) { my_barrier = new( task::allocate_root(context) ) empty_task(); __TBB_ASSERT(my_barrier, "root task allocation failed"); } #endif ~parallel_do_feeder_impl() { my_barrier->destroy(*my_barrier); } }; // class parallel_do_feeder_impl //! For internal use only /** Unpacks a block of iterations. @ingroup algorithms */ template class do_group_task_forward: public task { static const size_t max_arg_size = 4; typedef parallel_do_feeder_impl feeder_type; feeder_type& my_feeder; Iterator my_first; size_t my_size; do_group_task_forward( Iterator first, size_t size, feeder_type& feeder ) : my_feeder(feeder), my_first(first), my_size(size) {} /*override*/ task* execute() { typedef do_iteration_task_iter iteration_type; __TBB_ASSERT( my_size>0, NULL ); task_list list; task* t; size_t k=0; for(;;) { t = new( allocate_child() ) iteration_type( my_first, my_feeder ); ++my_first; if( ++k==my_size ) break; list.push_back(*t); } set_ref_count(int(k+1)); spawn(list); spawn_and_wait_for_all(*t); return NULL; } template friend class do_task_iter; }; // class do_group_task_forward template class do_group_task_input: public task { static const size_t max_arg_size = 4; typedef parallel_do_feeder_impl feeder_type; feeder_type& my_feeder; size_t my_size; aligned_space my_arg; do_group_task_input( feeder_type& feeder ) : my_feeder(feeder), my_size(0) {} /*override*/ task* execute() { typedef do_iteration_task_iter iteration_type; __TBB_ASSERT( my_size>0, NULL ); task_list list; task* t; size_t k=0; for(;;) { t = new( allocate_child() ) iteration_type( my_arg.begin() + k, my_feeder ); if( ++k==my_size ) break; list.push_back(*t); } set_ref_count(int(k+1)); spawn(list); spawn_and_wait_for_all(*t); return NULL; } ~do_group_task_input(){ for( size_t k=0; k~Item(); } template friend class do_task_iter; }; // class do_group_task_input //! For internal use only. /** Gets block of iterations and packages them into a do_group_task. @ingroup algorithms */ template class do_task_iter: public task { typedef parallel_do_feeder_impl feeder_type; public: do_task_iter( Iterator first, Iterator last , feeder_type& feeder ) : my_first(first), my_last(last), my_feeder(feeder) {} private: Iterator my_first; Iterator my_last; feeder_type& my_feeder; /* Do not merge run(xxx) and run_xxx() methods. They are separated in order to make sure that compilers will eliminate unused argument of type xxx (that is will not put it on stack). The sole purpose of this argument is overload resolution. An alternative could be using template functions, but explicit specialization of member function templates is not supported for non specialized class templates. Besides template functions would always fall back to the least efficient variant (the one for input iterators) in case of iterators having custom tags derived from basic ones. */ /*override*/ task* execute() { typedef typename std::iterator_traits::iterator_category iterator_tag; return run( (iterator_tag*)NULL ); } /** This is the most restricted variant that operates on input iterators or iterators with unknown tags (tags not derived from the standard ones). **/ inline task* run( void* ) { return run_for_input_iterator(); } task* run_for_input_iterator() { typedef do_group_task_input block_type; block_type& t = *new( allocate_additional_child_of(*my_feeder.my_barrier) ) block_type(my_feeder); size_t k=0; while( !(my_first == my_last) ) { new (t.my_arg.begin() + k) Item(*my_first); ++my_first; if( ++k==block_type::max_arg_size ) { if ( !(my_first == my_last) ) recycle_to_reexecute(); break; } } if( k==0 ) { destroy(t); return NULL; } else { t.my_size = k; return &t; } } inline task* run( std::forward_iterator_tag* ) { return run_for_forward_iterator(); } task* run_for_forward_iterator() { typedef do_group_task_forward block_type; Iterator first = my_first; size_t k=0; while( !(my_first==my_last) ) { ++my_first; if( ++k==block_type::max_arg_size ) { if ( !(my_first==my_last) ) recycle_to_reexecute(); break; } } return k==0 ? NULL : new( allocate_additional_child_of(*my_feeder.my_barrier) ) block_type(first, k, my_feeder); } inline task* run( std::random_access_iterator_tag* ) { return run_for_random_access_iterator(); } task* run_for_random_access_iterator() { typedef do_group_task_forward block_type; typedef do_iteration_task_iter iteration_type; size_t k = static_cast(my_last-my_first); if( k > block_type::max_arg_size ) { Iterator middle = my_first + k/2; empty_task& c = *new( allocate_continuation() ) empty_task; do_task_iter& b = *new( c.allocate_child() ) do_task_iter(middle, my_last, my_feeder); recycle_as_child_of(c); my_last = middle; c.set_ref_count(2); c.spawn(b); return this; }else if( k != 0 ) { task_list list; task* t; size_t k1=0; for(;;) { t = new( allocate_child() ) iteration_type(my_first, my_feeder); ++my_first; if( ++k1==k ) break; list.push_back(*t); } set_ref_count(int(k+1)); spawn(list); spawn_and_wait_for_all(*t); } return NULL; } }; // class do_task_iter //! For internal use only. /** Implements parallel iteration over a range. @ingroup algorithms */ template void run_parallel_do( Iterator first, Iterator last, const Body& body #if __TBB_TASK_GROUP_CONTEXT , task_group_context& context #endif ) { typedef do_task_iter root_iteration_task; #if __TBB_TASK_GROUP_CONTEXT parallel_do_feeder_impl feeder(context); #else parallel_do_feeder_impl feeder; #endif feeder.my_body = &body; root_iteration_task &t = *new( feeder.my_barrier->allocate_child() ) root_iteration_task(first, last, feeder); feeder.my_barrier->set_ref_count(2); feeder.my_barrier->spawn_and_wait_for_all(t); } //! For internal use only. /** Detects types of Body's operator function arguments. @ingroup algorithms **/ template void select_parallel_do( Iterator first, Iterator last, const Body& body, void (Body::*)(Item) const #if __TBB_TASK_GROUP_CONTEXT , task_group_context& context #endif // __TBB_TASK_GROUP_CONTEXT ) { run_parallel_do::type>( first, last, body #if __TBB_TASK_GROUP_CONTEXT , context #endif // __TBB_TASK_GROUP_CONTEXT ); } //! For internal use only. /** Detects types of Body's operator function arguments. @ingroup algorithms **/ template void select_parallel_do( Iterator first, Iterator last, const Body& body, void (Body::*)(Item, parallel_do_feeder<_Item>&) const #if __TBB_TASK_GROUP_CONTEXT , task_group_context& context #endif // __TBB_TASK_GROUP_CONTEXT ) { run_parallel_do::type>( first, last, body #if __TBB_TASK_GROUP_CONTEXT , context #endif // __TBB_TASK_GROUP_CONTEXT ); } } // namespace internal //! @endcond /** \page parallel_do_body_req Requirements on parallel_do body Class \c Body implementing the concept of parallel_do body must define: - \code B::operator()( cv_item_type item, parallel_do_feeder& feeder ) const OR B::operator()( cv_item_type& item ) const \endcode Process item. May be invoked concurrently for the same \c this but different \c item. - \code item_type( const item_type& ) \endcode Copy a work item. - \code ~item_type() \endcode Destroy a work item **/ /** \name parallel_do See also requirements on \ref parallel_do_body_req "parallel_do Body". **/ //@{ //! Parallel iteration over a range, with optional addition of more work. /** @ingroup algorithms */ template void parallel_do( Iterator first, Iterator last, const Body& body ) { if ( first == last ) return; #if __TBB_TASK_GROUP_CONTEXT task_group_context context; #endif // __TBB_TASK_GROUP_CONTEXT internal::select_parallel_do( first, last, body, &Body::operator() #if __TBB_TASK_GROUP_CONTEXT , context #endif // __TBB_TASK_GROUP_CONTEXT ); } template void parallel_do(Range& rng, const Body& body) { parallel_do(tbb::internal::first(rng), tbb::internal::last(rng), body); } template void parallel_do(const Range& rng, const Body& body) { parallel_do(tbb::internal::first(rng), tbb::internal::last(rng), body); } #if __TBB_TASK_GROUP_CONTEXT //! Parallel iteration over a range, with optional addition of more work and user-supplied context /** @ingroup algorithms */ template void parallel_do( Iterator first, Iterator last, const Body& body, task_group_context& context ) { if ( first == last ) return; internal::select_parallel_do( first, last, body, &Body::operator(), context ); } template void parallel_do(Range& rng, const Body& body, task_group_context& context) { parallel_do(tbb::internal::first(rng), tbb::internal::last(rng), body, context); } template void parallel_do(const Range& rng, const Body& body, task_group_context& context) { parallel_do(tbb::internal::first(rng), tbb::internal::last(rng), body, context); } #endif // __TBB_TASK_GROUP_CONTEXT //@} } // namespace #endif /* __TBB_parallel_do_H */ ================================================ FILE: benchmarks/tbb/parallel_for.h ================================================ /* Copyright 2005-2014 Intel Corporation. All Rights Reserved. This file is part of Threading Building Blocks. Threading Building Blocks is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. Threading Building Blocks is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Threading Building Blocks; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA As a special exception, you may use this file as part of a free software library without restriction. Specifically, if other files instantiate templates or use macros or inline functions from this file, or you compile this file and link it with other files to produce an executable, this file does not by itself cause the resulting executable to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the executable file might be covered by the GNU General Public License. */ #ifndef __TBB_parallel_for_H #define __TBB_parallel_for_H #include #include "task.h" #include "partitioner.h" #include "blocked_range.h" #include "tbb_exception.h" namespace tbb { namespace interface7 { //! @cond INTERNAL namespace internal { //! allocate right task with new parent void* allocate_sibling(task* start_for_task, size_t bytes); //! Task type used in parallel_for /** @ingroup algorithms */ template class start_for: public task { Range my_range; const Body my_body; typename Partitioner::task_partition_type my_partition; /*override*/ task* execute(); //! Update affinity info, if any. /*override*/ void note_affinity( affinity_id id ) { my_partition.note_affinity( id ); } public: //! Constructor for root task. start_for( const Range& range, const Body& body, Partitioner& partitioner ) : my_range(range), my_body(body), my_partition(partitioner) { } //! Splitting constructor used to generate children. /** parent_ becomes left child. Newly constructed object is right child. */ start_for( start_for& parent_, typename Partitioner::split_type& split_obj) : my_range(parent_.my_range, split_obj), my_body(parent_.my_body), my_partition(parent_.my_partition, split_obj) { my_partition.set_affinity(*this); } //! Construct right child from the given range as response to the demand. /** parent_ remains left child. Newly constructed object is right child. */ start_for( start_for& parent_, const Range& r, depth_t d ) : my_range(r), my_body(parent_.my_body), my_partition(parent_.my_partition, split()) { my_partition.set_affinity(*this); my_partition.align_depth( d ); } static void run( const Range& range, const Body& body, Partitioner& partitioner ) { if( !range.empty() ) { #if !__TBB_TASK_GROUP_CONTEXT || TBB_JOIN_OUTER_TASK_GROUP start_for& a = *new(task::allocate_root()) start_for(range,body,partitioner); #else // Bound context prevents exceptions from body to affect nesting or sibling algorithms, // and allows users to handle exceptions safely by wrapping parallel_for in the try-block. task_group_context context; start_for& a = *new(task::allocate_root(context)) start_for(range,body,partitioner); #endif /* __TBB_TASK_GROUP_CONTEXT && !TBB_JOIN_OUTER_TASK_GROUP */ task::spawn_root_and_wait(a); } } #if __TBB_TASK_GROUP_CONTEXT static void run( const Range& range, const Body& body, Partitioner& partitioner, task_group_context& context ) { if( !range.empty() ) { start_for& a = *new(task::allocate_root(context)) start_for(range,body,partitioner); task::spawn_root_and_wait(a); } } #endif /* __TBB_TASK_GROUP_CONTEXT */ //! Run body for range, serves as callback for partitioner void run_body( Range &r ) { my_body( r ); } //! spawn right task, serves as callback for partitioner void offer_work(typename Partitioner::split_type& split_obj) { spawn( *new( allocate_sibling(static_cast(this), sizeof(start_for)) ) start_for(*this, split_obj) ); } //! spawn right task, serves as callback for partitioner void offer_work(const Range& r, depth_t d = 0) { spawn( *new( allocate_sibling(static_cast(this), sizeof(start_for)) ) start_for(*this, r, d) ); } }; //! allocate right task with new parent // TODO: 'inline' here is to avoid multiple definition error but for sake of code size this should not be inlined inline void* allocate_sibling(task* start_for_task, size_t bytes) { task* parent_ptr = new( start_for_task->allocate_continuation() ) flag_task(); start_for_task->set_parent(parent_ptr); parent_ptr->set_ref_count(2); return &parent_ptr->allocate_child().allocate(bytes); } //! execute task for parallel_for template task* start_for::execute() { my_partition.check_being_stolen( *this ); my_partition.execute(*this, my_range); return NULL; } } // namespace internal //! @endcond } // namespace interfaceX //! @cond INTERNAL namespace internal { using interface7::internal::start_for; //! Calls the function with values from range [begin, end) with a step provided template class parallel_for_body : internal::no_assign { const Function &my_func; const Index my_begin; const Index my_step; public: parallel_for_body( const Function& _func, Index& _begin, Index& _step ) : my_func(_func), my_begin(_begin), my_step(_step) {} void operator()( const tbb::blocked_range& r ) const { // A set of local variables to help the compiler with vectorization of the following loop. Index b = r.begin(); Index e = r.end(); Index ms = my_step; Index k = my_begin + b*ms; #if __INTEL_COMPILER #pragma ivdep #if __TBB_ASSERT_ON_VECTORIZATION_FAILURE #pragma vector always assert #endif #endif for ( Index i = b; i < e; ++i, k += ms ) { my_func( k ); } } }; } // namespace internal //! @endcond // Requirements on Range concept are documented in blocked_range.h /** \page parallel_for_body_req Requirements on parallel_for body Class \c Body implementing the concept of parallel_for body must define: - \code Body::Body( const Body& ); \endcode Copy constructor - \code Body::~Body(); \endcode Destructor - \code void Body::operator()( Range& r ) const; \endcode Function call operator applying the body to range \c r. **/ /** \name parallel_for See also requirements on \ref range_req "Range" and \ref parallel_for_body_req "parallel_for Body". **/ //@{ //! Parallel iteration over range with default partitioner. /** @ingroup algorithms **/ template void parallel_for( const Range& range, const Body& body ) { internal::start_for::run(range,body,__TBB_DEFAULT_PARTITIONER()); } //! Parallel iteration over range with simple partitioner. /** @ingroup algorithms **/ template void parallel_for( const Range& range, const Body& body, const simple_partitioner& partitioner ) { internal::start_for::run(range,body,partitioner); } //! Parallel iteration over range with auto_partitioner. /** @ingroup algorithms **/ template void parallel_for( const Range& range, const Body& body, const auto_partitioner& partitioner ) { internal::start_for::run(range,body,partitioner); } //! Parallel iteration over range with affinity_partitioner. /** @ingroup algorithms **/ template void parallel_for( const Range& range, const Body& body, affinity_partitioner& partitioner ) { internal::start_for::run(range,body,partitioner); } #if __TBB_TASK_GROUP_CONTEXT //! Parallel iteration over range with default partitioner and user-supplied context. /** @ingroup algorithms **/ template void parallel_for( const Range& range, const Body& body, task_group_context& context ) { internal::start_for::run(range, body, __TBB_DEFAULT_PARTITIONER(), context); } //! Parallel iteration over range with simple partitioner and user-supplied context. /** @ingroup algorithms **/ template void parallel_for( const Range& range, const Body& body, const simple_partitioner& partitioner, task_group_context& context ) { internal::start_for::run(range, body, partitioner, context); } //! Parallel iteration over range with auto_partitioner and user-supplied context. /** @ingroup algorithms **/ template void parallel_for( const Range& range, const Body& body, const auto_partitioner& partitioner, task_group_context& context ) { internal::start_for::run(range, body, partitioner, context); } //! Parallel iteration over range with affinity_partitioner and user-supplied context. /** @ingroup algorithms **/ template void parallel_for( const Range& range, const Body& body, affinity_partitioner& partitioner, task_group_context& context ) { internal::start_for::run(range,body,partitioner, context); } #endif /* __TBB_TASK_GROUP_CONTEXT */ //@} namespace strict_ppl { //@{ //! Implementation of parallel iteration over stepped range of integers with explicit step and partitioner template void parallel_for_impl(Index first, Index last, Index step, const Function& f, Partitioner& partitioner) { if (step <= 0 ) internal::throw_exception(internal::eid_nonpositive_step); // throws std::invalid_argument else if (last > first) { // Above "else" avoids "potential divide by zero" warning on some platforms Index end = (last - first - Index(1)) / step + Index(1); tbb::blocked_range range(static_cast(0), end); internal::parallel_for_body body(f, first, step); tbb::parallel_for(range, body, partitioner); } } //! Parallel iteration over a range of integers with a step provided and default partitioner template void parallel_for(Index first, Index last, Index step, const Function& f) { parallel_for_impl(first, last, step, f, auto_partitioner()); } //! Parallel iteration over a range of integers with a step provided and simple partitioner template void parallel_for(Index first, Index last, Index step, const Function& f, const simple_partitioner& partitioner) { parallel_for_impl(first, last, step, f, partitioner); } //! Parallel iteration over a range of integers with a step provided and auto partitioner template void parallel_for(Index first, Index last, Index step, const Function& f, const auto_partitioner& partitioner) { parallel_for_impl(first, last, step, f, partitioner); } //! Parallel iteration over a range of integers with a step provided and affinity partitioner template void parallel_for(Index first, Index last, Index step, const Function& f, affinity_partitioner& partitioner) { parallel_for_impl(first, last, step, f, partitioner); } //! Parallel iteration over a range of integers with a default step value and default partitioner template void parallel_for(Index first, Index last, const Function& f) { parallel_for_impl(first, last, static_cast(1), f, auto_partitioner()); } //! Parallel iteration over a range of integers with a default step value and simple partitioner template void parallel_for(Index first, Index last, const Function& f, const simple_partitioner& partitioner) { parallel_for_impl(first, last, static_cast(1), f, partitioner); } //! Parallel iteration over a range of integers with a default step value and auto partitioner template void parallel_for(Index first, Index last, const Function& f, const auto_partitioner& partitioner) { parallel_for_impl(first, last, static_cast(1), f, partitioner); } //! Parallel iteration over a range of integers with a default step value and affinity partitioner template void parallel_for(Index first, Index last, const Function& f, affinity_partitioner& partitioner) { parallel_for_impl(first, last, static_cast(1), f, partitioner); } #if __TBB_TASK_GROUP_CONTEXT //! Implementation of parallel iteration over stepped range of integers with explicit step, task group context, and partitioner template void parallel_for_impl(Index first, Index last, Index step, const Function& f, Partitioner& partitioner, tbb::task_group_context &context) { if (step <= 0 ) internal::throw_exception(internal::eid_nonpositive_step); // throws std::invalid_argument else if (last > first) { // Above "else" avoids "potential divide by zero" warning on some platforms Index end = (last - first - Index(1)) / step + Index(1); tbb::blocked_range range(static_cast(0), end); internal::parallel_for_body body(f, first, step); tbb::parallel_for(range, body, partitioner, context); } } //! Parallel iteration over a range of integers with explicit step, task group context, and default partitioner template void parallel_for(Index first, Index last, Index step, const Function& f, tbb::task_group_context &context) { parallel_for_impl(first, last, step, f, auto_partitioner(), context); } //! Parallel iteration over a range of integers with explicit step, task group context, and simple partitioner template void parallel_for(Index first, Index last, Index step, const Function& f, const simple_partitioner& partitioner, tbb::task_group_context &context) { parallel_for_impl(first, last, step, f, partitioner, context); } //! Parallel iteration over a range of integers with explicit step, task group context, and auto partitioner template void parallel_for(Index first, Index last, Index step, const Function& f, const auto_partitioner& partitioner, tbb::task_group_context &context) { parallel_for_impl(first, last, step, f, partitioner, context); } //! Parallel iteration over a range of integers with explicit step, task group context, and affinity partitioner template void parallel_for(Index first, Index last, Index step, const Function& f, affinity_partitioner& partitioner, tbb::task_group_context &context) { parallel_for_impl(first, last, step, f, partitioner, context); } //! Parallel iteration over a range of integers with a default step value, explicit task group context, and default partitioner template void parallel_for(Index first, Index last, const Function& f, tbb::task_group_context &context) { parallel_for_impl(first, last, static_cast(1), f, auto_partitioner(), context); } //! Parallel iteration over a range of integers with a default step value, explicit task group context, and simple partitioner template void parallel_for(Index first, Index last, const Function& f, const simple_partitioner& partitioner, tbb::task_group_context &context) { parallel_for_impl(first, last, static_cast(1), f, partitioner, context); } //! Parallel iteration over a range of integers with a default step value, explicit task group context, and auto partitioner template void parallel_for(Index first, Index last, const Function& f, const auto_partitioner& partitioner, tbb::task_group_context &context) { parallel_for_impl(first, last, static_cast(1), f, partitioner, context); } //! Parallel iteration over a range of integers with a default step value, explicit task group context, and affinity_partitioner template void parallel_for(Index first, Index last, const Function& f, affinity_partitioner& partitioner, tbb::task_group_context &context) { parallel_for_impl(first, last, static_cast(1), f, partitioner, context); } #endif /* __TBB_TASK_GROUP_CONTEXT */ //@} } // namespace strict_ppl using strict_ppl::parallel_for; } // namespace tbb #if TBB_PREVIEW_SERIAL_SUBSET #define __TBB_NORMAL_EXECUTION #include "../serial/tbb/parallel_for.h" #undef __TBB_NORMAL_EXECUTION #endif #endif /* __TBB_parallel_for_H */ ================================================ FILE: benchmarks/tbb/parallel_for_each.h ================================================ /* Copyright 2005-2014 Intel Corporation. All Rights Reserved. This file is part of Threading Building Blocks. Threading Building Blocks is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. Threading Building Blocks is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Threading Building Blocks; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA As a special exception, you may use this file as part of a free software library without restriction. Specifically, if other files instantiate templates or use macros or inline functions from this file, or you compile this file and link it with other files to produce an executable, this file does not by itself cause the resulting executable to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the executable file might be covered by the GNU General Public License. */ #ifndef __TBB_parallel_for_each_H #define __TBB_parallel_for_each_H #include "parallel_do.h" namespace tbb { //! @cond INTERNAL namespace internal { // The class calls user function in operator() template class parallel_for_each_body : internal::no_assign { const Function &my_func; public: parallel_for_each_body(const Function &_func) : my_func(_func) {} parallel_for_each_body(const parallel_for_each_body &_caller) : my_func(_caller.my_func) {} void operator() ( typename std::iterator_traits::reference value ) const { my_func(value); } }; } // namespace internal //! @endcond /** \name parallel_for_each **/ //@{ //! Calls function f for all items from [first, last) interval using user-supplied context /** @ingroup algorithms */ #if __TBB_TASK_GROUP_CONTEXT template void parallel_for_each(InputIterator first, InputIterator last, const Function& f, task_group_context &context) { internal::parallel_for_each_body body(f); tbb::parallel_do (first, last, body, context); } //! Calls function f for all items from rng using user-supplied context /** @ingroup algorithms */ template void parallel_for_each(Range& rng, const Function& f, task_group_context& context) { parallel_for_each(tbb::internal::first(rng), tbb::internal::last(rng), f, context); } //! Calls function f for all items from const rng user-supplied context /** @ingroup algorithms */ template void parallel_for_each(const Range& rng, const Function& f, task_group_context& context) { parallel_for_each(tbb::internal::first(rng), tbb::internal::last(rng), f, context); } #endif /* __TBB_TASK_GROUP_CONTEXT */ //! Uses default context template void parallel_for_each(InputIterator first, InputIterator last, const Function& f) { internal::parallel_for_each_body body(f); tbb::parallel_do (first, last, body); } //! Uses default context template void parallel_for_each(Range& rng, const Function& f) { parallel_for_each(tbb::internal::first(rng), tbb::internal::last(rng), f); } //! Uses default context template void parallel_for_each(const Range& rng, const Function& f) { parallel_for_each(tbb::internal::first(rng), tbb::internal::last(rng), f); } //@} } // namespace #endif /* __TBB_parallel_for_each_H */ ================================================ FILE: benchmarks/tbb/parallel_invoke.h ================================================ /* Copyright 2005-2014 Intel Corporation. All Rights Reserved. This file is part of Threading Building Blocks. Threading Building Blocks is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. Threading Building Blocks is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Threading Building Blocks; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA As a special exception, you may use this file as part of a free software library without restriction. Specifically, if other files instantiate templates or use macros or inline functions from this file, or you compile this file and link it with other files to produce an executable, this file does not by itself cause the resulting executable to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the executable file might be covered by the GNU General Public License. */ #ifndef __TBB_parallel_invoke_H #define __TBB_parallel_invoke_H #include "task.h" #if __TBB_VARIADIC_PARALLEL_INVOKE #include #endif namespace tbb { #if !__TBB_TASK_GROUP_CONTEXT /** Dummy to avoid cluttering the bulk of the header with enormous amount of ifdefs. **/ struct task_group_context {}; #endif /* __TBB_TASK_GROUP_CONTEXT */ //! @cond INTERNAL namespace internal { // Simple task object, executing user method template class function_invoker : public task{ public: function_invoker(const function& _function) : my_function(_function) {} private: const function &my_function; /*override*/ task* execute() { my_function(); return NULL; } }; // The class spawns two or three child tasks template class spawner : public task { private: const function1& my_func1; const function2& my_func2; const function3& my_func3; bool is_recycled; task* execute (){ if(is_recycled){ return NULL; }else{ __TBB_ASSERT(N==2 || N==3, "Number of arguments passed to spawner is wrong"); set_ref_count(N); recycle_as_safe_continuation(); internal::function_invoker* invoker2 = new (allocate_child()) internal::function_invoker(my_func2); __TBB_ASSERT(invoker2, "Child task allocation failed"); spawn(*invoker2); size_t n = N; // To prevent compiler warnings if (n>2) { internal::function_invoker* invoker3 = new (allocate_child()) internal::function_invoker(my_func3); __TBB_ASSERT(invoker3, "Child task allocation failed"); spawn(*invoker3); } my_func1(); is_recycled = true; return NULL; } } // execute public: spawner(const function1& _func1, const function2& _func2, const function3& _func3) : my_func1(_func1), my_func2(_func2), my_func3(_func3), is_recycled(false) {} }; // Creates and spawns child tasks class parallel_invoke_helper : public empty_task { public: // Dummy functor class class parallel_invoke_noop { public: void operator() () const {} }; // Creates a helper object with user-defined number of children expected parallel_invoke_helper(int number_of_children) { set_ref_count(number_of_children + 1); } #if __TBB_VARIADIC_PARALLEL_INVOKE void add_children() {} void add_children(tbb::task_group_context&) {} template void add_children(function&& _func) { internal::function_invoker* invoker = new (allocate_child()) internal::function_invoker(std::forward(_func)); __TBB_ASSERT(invoker, "Child task allocation failed"); spawn(*invoker); } template void add_children(function&& _func, tbb::task_group_context&) { add_children(std::forward(_func)); } // Adds child(ren) task(s) and spawns them template void add_children(function1&& _func1, function2&& _func2, function&&... _func) { // The third argument is dummy, it is ignored actually. parallel_invoke_noop noop; typedef internal::spawner<2, function1, function2, parallel_invoke_noop> spawner_type; spawner_type & sub_root = *new(allocate_child()) spawner_type(std::forward(_func1), std::forward(_func2), noop); spawn(sub_root); add_children(std::forward(_func)...); } #else // Adds child task and spawns it template void add_children (const function &_func) { internal::function_invoker* invoker = new (allocate_child()) internal::function_invoker(_func); __TBB_ASSERT(invoker, "Child task allocation failed"); spawn(*invoker); } // Adds a task with multiple child tasks and spawns it // two arguments template void add_children (const function1& _func1, const function2& _func2) { // The third argument is dummy, it is ignored actually. parallel_invoke_noop noop; internal::spawner<2, function1, function2, parallel_invoke_noop>& sub_root = *new(allocate_child())internal::spawner<2, function1, function2, parallel_invoke_noop>(_func1, _func2, noop); spawn(sub_root); } // three arguments template void add_children (const function1& _func1, const function2& _func2, const function3& _func3) { internal::spawner<3, function1, function2, function3>& sub_root = *new(allocate_child())internal::spawner<3, function1, function2, function3>(_func1, _func2, _func3); spawn(sub_root); } #endif // __TBB_VARIADIC_PARALLEL_INVOKE // Waits for all child tasks template void run_and_finish(const F0& f0) { internal::function_invoker* invoker = new (allocate_child()) internal::function_invoker(f0); __TBB_ASSERT(invoker, "Child task allocation failed"); spawn_and_wait_for_all(*invoker); } }; // The class destroys root if exception occurred as well as in normal case class parallel_invoke_cleaner: internal::no_copy { public: #if __TBB_TASK_GROUP_CONTEXT parallel_invoke_cleaner(int number_of_children, tbb::task_group_context& context) : root(*new(task::allocate_root(context)) internal::parallel_invoke_helper(number_of_children)) #else parallel_invoke_cleaner(int number_of_children, tbb::task_group_context&) : root(*new(task::allocate_root()) internal::parallel_invoke_helper(number_of_children)) #endif /* !__TBB_TASK_GROUP_CONTEXT */ {} ~parallel_invoke_cleaner(){ root.destroy(root); } internal::parallel_invoke_helper& root; }; #if __TBB_VARIADIC_PARALLEL_INVOKE // Determine whether the last parameter in a pack is task_group_context template struct impl_selector; // to workaround a GCC bug template struct impl_selector { typedef typename impl_selector::type type; }; template struct impl_selector { typedef false_type type; }; template<> struct impl_selector { typedef true_type type; }; // Select task_group_context parameter from the back of a pack task_group_context& get_context( task_group_context& tgc ) { return tgc; } template task_group_context& get_context( T1&& /*ignored*/, T&&... t ) { return get_context( std::forward(t)... ); } // task_group_context is known to be at the back of the parameter pack template void parallel_invoke_impl(true_type, F0&& f0, F1&& f1, F&&... f) { __TBB_STATIC_ASSERT(sizeof...(F)>0, "Variadic parallel_invoke implementation broken?"); // # of child tasks: f0, f1, and a task for each two elements of the pack except the last const size_t number_of_children = 2 + sizeof...(F)/2; parallel_invoke_cleaner cleaner(number_of_children, get_context(std::forward(f)...)); parallel_invoke_helper& root = cleaner.root; root.add_children(std::forward(f)...); root.add_children(std::forward(f1)); root.run_and_finish(std::forward(f0)); } // task_group_context is not in the pack, needs to be added template void parallel_invoke_impl(false_type, F0&& f0, F1&& f1, F&&... f) { tbb::task_group_context context; // Add context to the arguments, and redirect to the other overload parallel_invoke_impl(true_type(), std::forward(f0), std::forward(f1), std::forward(f)..., context); } #endif } // namespace internal //! @endcond /** \name parallel_invoke **/ //@{ //! Executes a list of tasks in parallel and waits for all tasks to complete. /** @ingroup algorithms */ #if __TBB_VARIADIC_PARALLEL_INVOKE // parallel_invoke for two or more arguments via variadic templates // presence of task_group_context is defined automatically template void parallel_invoke(F0&& f0, F1&& f1, F&&... f) { typedef typename internal::impl_selector::type selector_type; internal::parallel_invoke_impl(selector_type(), std::forward(f0), std::forward(f1), std::forward(f)...); } #else // parallel_invoke with user-defined context // two arguments template void parallel_invoke(const F0& f0, const F1& f1, tbb::task_group_context& context) { internal::parallel_invoke_cleaner cleaner(2, context); internal::parallel_invoke_helper& root = cleaner.root; root.add_children(f1); root.run_and_finish(f0); } // three arguments template void parallel_invoke(const F0& f0, const F1& f1, const F2& f2, tbb::task_group_context& context) { internal::parallel_invoke_cleaner cleaner(3, context); internal::parallel_invoke_helper& root = cleaner.root; root.add_children(f2); root.add_children(f1); root.run_and_finish(f0); } // four arguments template void parallel_invoke(const F0& f0, const F1& f1, const F2& f2, const F3& f3, tbb::task_group_context& context) { internal::parallel_invoke_cleaner cleaner(4, context); internal::parallel_invoke_helper& root = cleaner.root; root.add_children(f3); root.add_children(f2); root.add_children(f1); root.run_and_finish(f0); } // five arguments template void parallel_invoke(const F0& f0, const F1& f1, const F2& f2, const F3& f3, const F4& f4, tbb::task_group_context& context) { internal::parallel_invoke_cleaner cleaner(3, context); internal::parallel_invoke_helper& root = cleaner.root; root.add_children(f4, f3); root.add_children(f2, f1); root.run_and_finish(f0); } // six arguments template void parallel_invoke(const F0& f0, const F1& f1, const F2& f2, const F3& f3, const F4& f4, const F5& f5, tbb::task_group_context& context) { internal::parallel_invoke_cleaner cleaner(3, context); internal::parallel_invoke_helper& root = cleaner.root; root.add_children(f5, f4, f3); root.add_children(f2, f1); root.run_and_finish(f0); } // seven arguments template void parallel_invoke(const F0& f0, const F1& f1, const F2& f2, const F3& f3, const F4& f4, const F5& f5, const F6& f6, tbb::task_group_context& context) { internal::parallel_invoke_cleaner cleaner(3, context); internal::parallel_invoke_helper& root = cleaner.root; root.add_children(f6, f5, f4); root.add_children(f3, f2, f1); root.run_and_finish(f0); } // eight arguments template void parallel_invoke(const F0& f0, const F1& f1, const F2& f2, const F3& f3, const F4& f4, const F5& f5, const F6& f6, const F7& f7, tbb::task_group_context& context) { internal::parallel_invoke_cleaner cleaner(4, context); internal::parallel_invoke_helper& root = cleaner.root; root.add_children(f7, f6, f5); root.add_children(f4, f3); root.add_children(f2, f1); root.run_and_finish(f0); } // nine arguments template void parallel_invoke(const F0& f0, const F1& f1, const F2& f2, const F3& f3, const F4& f4, const F5& f5, const F6& f6, const F7& f7, const F8& f8, tbb::task_group_context& context) { internal::parallel_invoke_cleaner cleaner(4, context); internal::parallel_invoke_helper& root = cleaner.root; root.add_children(f8, f7, f6); root.add_children(f5, f4, f3); root.add_children(f2, f1); root.run_and_finish(f0); } // ten arguments template void parallel_invoke(const F0& f0, const F1& f1, const F2& f2, const F3& f3, const F4& f4, const F5& f5, const F6& f6, const F7& f7, const F8& f8, const F9& f9, tbb::task_group_context& context) { internal::parallel_invoke_cleaner cleaner(4, context); internal::parallel_invoke_helper& root = cleaner.root; root.add_children(f9, f8, f7); root.add_children(f6, f5, f4); root.add_children(f3, f2, f1); root.run_and_finish(f0); } // two arguments template void parallel_invoke(const F0& f0, const F1& f1) { task_group_context context; parallel_invoke(f0, f1, context); } // three arguments template void parallel_invoke(const F0& f0, const F1& f1, const F2& f2) { task_group_context context; parallel_invoke(f0, f1, f2, context); } // four arguments template void parallel_invoke(const F0& f0, const F1& f1, const F2& f2, const F3& f3) { task_group_context context; parallel_invoke(f0, f1, f2, f3, context); } // five arguments template void parallel_invoke(const F0& f0, const F1& f1, const F2& f2, const F3& f3, const F4& f4) { task_group_context context; parallel_invoke(f0, f1, f2, f3, f4, context); } // six arguments template void parallel_invoke(const F0& f0, const F1& f1, const F2& f2, const F3& f3, const F4& f4, const F5& f5) { task_group_context context; parallel_invoke(f0, f1, f2, f3, f4, f5, context); } // seven arguments template void parallel_invoke(const F0& f0, const F1& f1, const F2& f2, const F3& f3, const F4& f4, const F5& f5, const F6& f6) { task_group_context context; parallel_invoke(f0, f1, f2, f3, f4, f5, f6, context); } // eight arguments template void parallel_invoke(const F0& f0, const F1& f1, const F2& f2, const F3& f3, const F4& f4, const F5& f5, const F6& f6, const F7& f7) { task_group_context context; parallel_invoke(f0, f1, f2, f3, f4, f5, f6, f7, context); } // nine arguments template void parallel_invoke(const F0& f0, const F1& f1, const F2& f2, const F3& f3, const F4& f4, const F5& f5, const F6& f6, const F7& f7, const F8& f8) { task_group_context context; parallel_invoke(f0, f1, f2, f3, f4, f5, f6, f7, f8, context); } // ten arguments template void parallel_invoke(const F0& f0, const F1& f1, const F2& f2, const F3& f3, const F4& f4, const F5& f5, const F6& f6, const F7& f7, const F8& f8, const F9& f9) { task_group_context context; parallel_invoke(f0, f1, f2, f3, f4, f5, f6, f7, f8, f9, context); } #endif // __TBB_VARIADIC_PARALLEL_INVOKE //@} } // namespace #endif /* __TBB_parallel_invoke_H */ ================================================ FILE: benchmarks/tbb/parallel_reduce.h ================================================ /* Copyright 2005-2014 Intel Corporation. All Rights Reserved. This file is part of Threading Building Blocks. Threading Building Blocks is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. Threading Building Blocks is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Threading Building Blocks; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA As a special exception, you may use this file as part of a free software library without restriction. Specifically, if other files instantiate templates or use macros or inline functions from this file, or you compile this file and link it with other files to produce an executable, this file does not by itself cause the resulting executable to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the executable file might be covered by the GNU General Public License. */ #ifndef __TBB_parallel_reduce_H #define __TBB_parallel_reduce_H #include #include "task.h" #include "aligned_space.h" #include "partitioner.h" #include "tbb_profiling.h" namespace tbb { namespace interface7 { //! @cond INTERNAL namespace internal { using namespace tbb::internal; /** Values for reduction_context. */ enum { root_task, left_child, right_child }; /** Represented as a char, not enum, for compactness. */ typedef char reduction_context; //! Task type used to combine the partial results of parallel_reduce. /** @ingroup algorithms */ template class finish_reduce: public flag_task { //! Pointer to body, or NULL if the left child has not yet finished. bool has_right_zombie; const reduction_context my_context; Body* my_body; aligned_space zombie_space; finish_reduce( reduction_context context_ ) : has_right_zombie(false), // TODO: substitute by flag_task::child_stolen? my_context(context_), my_body(NULL) { } ~finish_reduce() { if( has_right_zombie ) zombie_space.begin()->~Body(); } task* execute() { if( has_right_zombie ) { // Right child was stolen. Body* s = zombie_space.begin(); my_body->join( *s ); // Body::join() won't be called if canceled. Defer destruction to destructor } if( my_context==left_child ) itt_store_word_with_release( static_cast(parent())->my_body, my_body ); return NULL; } template friend class start_reduce; }; //! allocate right task with new parent void allocate_sibling(task* start_reduce_task, task *tasks[], size_t start_bytes, size_t finish_bytes); //! Task type used to split the work of parallel_reduce. /** @ingroup algorithms */ template class start_reduce: public task { typedef finish_reduce finish_type; Body* my_body; Range my_range; typename Partitioner::task_partition_type my_partition; reduction_context my_context; /*override*/ task* execute(); //! Update affinity info, if any /*override*/ void note_affinity( affinity_id id ) { my_partition.note_affinity( id ); } template friend class finish_reduce; public: //! Constructor used for root task start_reduce( const Range& range, Body* body, Partitioner& partitioner ) : my_body(body), my_range(range), my_partition(partitioner), my_context(root_task) { } //! Splitting constructor used to generate children. /** parent_ becomes left child. Newly constructed object is right child. */ start_reduce( start_reduce& parent_, typename Partitioner::split_type& split_obj ) : my_body(parent_.my_body), my_range(parent_.my_range, split_obj), my_partition(parent_.my_partition, split_obj), my_context(right_child) { my_partition.set_affinity(*this); parent_.my_context = left_child; } //! Construct right child from the given range as response to the demand. /** parent_ remains left child. Newly constructed object is right child. */ start_reduce( start_reduce& parent_, const Range& r, depth_t d ) : my_body(parent_.my_body), my_range(r), my_partition(parent_.my_partition, split()), my_context(right_child) { my_partition.set_affinity(*this); my_partition.align_depth( d ); // TODO: move into constructor of partitioner parent_.my_context = left_child; } static void run( const Range& range, Body& body, Partitioner& partitioner ) { if( !range.empty() ) { #if !__TBB_TASK_GROUP_CONTEXT || TBB_JOIN_OUTER_TASK_GROUP task::spawn_root_and_wait( *new(task::allocate_root()) start_reduce(range,&body,partitioner) ); #else // Bound context prevents exceptions from body to affect nesting or sibling algorithms, // and allows users to handle exceptions safely by wrapping parallel_for in the try-block. task_group_context context; task::spawn_root_and_wait( *new(task::allocate_root(context)) start_reduce(range,&body,partitioner) ); #endif /* __TBB_TASK_GROUP_CONTEXT && !TBB_JOIN_OUTER_TASK_GROUP */ } } #if __TBB_TASK_GROUP_CONTEXT static void run( const Range& range, Body& body, Partitioner& partitioner, task_group_context& context ) { if( !range.empty() ) task::spawn_root_and_wait( *new(task::allocate_root(context)) start_reduce(range,&body,partitioner) ); } #endif /* __TBB_TASK_GROUP_CONTEXT */ //! Run body for range void run_body( Range &r ) { (*my_body)( r ); } //! spawn right task, serves as callback for partitioner // TODO: remove code duplication from 'offer_work' methods void offer_work(typename Partitioner::split_type& split_obj) { task *tasks[2]; allocate_sibling(static_cast(this), tasks, sizeof(start_reduce), sizeof(finish_type)); new((void*)tasks[0]) finish_type(my_context); new((void*)tasks[1]) start_reduce(*this, split_obj); spawn(*tasks[1]); } //! spawn right task, serves as callback for partitioner void offer_work(const Range& r, depth_t d = 0) { task *tasks[2]; allocate_sibling(static_cast(this), tasks, sizeof(start_reduce), sizeof(finish_type)); new((void*)tasks[0]) finish_type(my_context); new((void*)tasks[1]) start_reduce(*this, r, d); spawn(*tasks[1]); } }; //! allocate right task with new parent // TODO: 'inline' here is to avoid multiple definition error but for sake of code size this should not be inlined inline void allocate_sibling(task* start_reduce_task, task *tasks[], size_t start_bytes, size_t finish_bytes) { tasks[0] = &start_reduce_task->allocate_continuation().allocate(finish_bytes); start_reduce_task->set_parent(tasks[0]); tasks[0]->set_ref_count(2); tasks[1] = &tasks[0]->allocate_child().allocate(start_bytes); } template task* start_reduce::execute() { my_partition.check_being_stolen( *this ); if( my_context==right_child ) { finish_type* parent_ptr = static_cast(parent()); if( !itt_load_word_with_acquire(parent_ptr->my_body) ) { // TODO: replace by is_stolen_task() or by parent_ptr->ref_count() == 2??? my_body = new( parent_ptr->zombie_space.begin() ) Body(*my_body,split()); parent_ptr->has_right_zombie = true; } } else __TBB_ASSERT(my_context==root_task,NULL);// because left leaf spawns right leafs without recycling my_partition.execute(*this, my_range); if( my_context==left_child ) { finish_type* parent_ptr = static_cast(parent()); __TBB_ASSERT(my_body!=parent_ptr->zombie_space.begin(),NULL); itt_store_word_with_release(parent_ptr->my_body, my_body ); } return NULL; } //! Task type used to combine the partial results of parallel_deterministic_reduce. /** @ingroup algorithms */ template class finish_deterministic_reduce: public task { Body &my_left_body; Body my_right_body; finish_deterministic_reduce( Body &body ) : my_left_body( body ), my_right_body( body, split() ) { } task* execute() { my_left_body.join( my_right_body ); return NULL; } template friend class start_deterministic_reduce; }; //! Task type used to split the work of parallel_deterministic_reduce. /** @ingroup algorithms */ template class start_deterministic_reduce: public task { typedef finish_deterministic_reduce finish_type; Body &my_body; Range my_range; /*override*/ task* execute(); //! Constructor used for root task start_deterministic_reduce( const Range& range, Body& body ) : my_body( body ), my_range( range ) { } //! Splitting constructor used to generate children. /** parent_ becomes left child. Newly constructed object is right child. */ start_deterministic_reduce( start_deterministic_reduce& parent_, finish_type& c ) : my_body( c.my_right_body ), my_range( parent_.my_range, split() ) { } public: static void run( const Range& range, Body& body ) { if( !range.empty() ) { #if !__TBB_TASK_GROUP_CONTEXT || TBB_JOIN_OUTER_TASK_GROUP task::spawn_root_and_wait( *new(task::allocate_root()) start_deterministic_reduce(range,&body) ); #else // Bound context prevents exceptions from body to affect nesting or sibling algorithms, // and allows users to handle exceptions safely by wrapping parallel_for in the try-block. task_group_context context; task::spawn_root_and_wait( *new(task::allocate_root(context)) start_deterministic_reduce(range,body) ); #endif /* __TBB_TASK_GROUP_CONTEXT && !TBB_JOIN_OUTER_TASK_GROUP */ } } #if __TBB_TASK_GROUP_CONTEXT static void run( const Range& range, Body& body, task_group_context& context ) { if( !range.empty() ) task::spawn_root_and_wait( *new(task::allocate_root(context)) start_deterministic_reduce(range,body) ); } #endif /* __TBB_TASK_GROUP_CONTEXT */ }; template task* start_deterministic_reduce::execute() { if( !my_range.is_divisible() ) { my_body( my_range ); return NULL; } else { finish_type& c = *new( allocate_continuation() ) finish_type( my_body ); recycle_as_child_of(c); c.set_ref_count(2); start_deterministic_reduce& b = *new( c.allocate_child() ) start_deterministic_reduce( *this, c ); task::spawn(b); return this; } } } // namespace internal //! @endcond } //namespace interfaceX //! @cond INTERNAL namespace internal { using interface7::internal::start_reduce; using interface7::internal::start_deterministic_reduce; //! Auxiliary class for parallel_reduce; for internal use only. /** The adaptor class that implements \ref parallel_reduce_body_req "parallel_reduce Body" using given \ref parallel_reduce_lambda_req "anonymous function objects". **/ /** @ingroup algorithms */ template class lambda_reduce_body { //FIXME: decide if my_real_body, my_reduction, and identity_element should be copied or referenced // (might require some performance measurements) const Value& identity_element; const RealBody& my_real_body; const Reduction& my_reduction; Value my_value; lambda_reduce_body& operator= ( const lambda_reduce_body& other ); public: lambda_reduce_body( const Value& identity, const RealBody& body, const Reduction& reduction ) : identity_element(identity) , my_real_body(body) , my_reduction(reduction) , my_value(identity) { } lambda_reduce_body( const lambda_reduce_body& other ) : identity_element(other.identity_element) , my_real_body(other.my_real_body) , my_reduction(other.my_reduction) , my_value(other.my_value) { } lambda_reduce_body( lambda_reduce_body& other, tbb::split ) : identity_element(other.identity_element) , my_real_body(other.my_real_body) , my_reduction(other.my_reduction) , my_value(other.identity_element) { } void operator()(Range& range) { my_value = my_real_body(range, const_cast(my_value)); } void join( lambda_reduce_body& rhs ) { my_value = my_reduction(const_cast(my_value), const_cast(rhs.my_value)); } Value result() const { return my_value; } }; } // namespace internal //! @endcond // Requirements on Range concept are documented in blocked_range.h /** \page parallel_reduce_body_req Requirements on parallel_reduce body Class \c Body implementing the concept of parallel_reduce body must define: - \code Body::Body( Body&, split ); \endcode Splitting constructor. Must be able to run concurrently with operator() and method \c join - \code Body::~Body(); \endcode Destructor - \code void Body::operator()( Range& r ); \endcode Function call operator applying body to range \c r and accumulating the result - \code void Body::join( Body& b ); \endcode Join results. The result in \c b should be merged into the result of \c this **/ /** \page parallel_reduce_lambda_req Requirements on parallel_reduce anonymous function objects (lambda functions) TO BE DOCUMENTED **/ /** \name parallel_reduce See also requirements on \ref range_req "Range" and \ref parallel_reduce_body_req "parallel_reduce Body". **/ //@{ //! Parallel iteration with reduction and default partitioner. /** @ingroup algorithms **/ template void parallel_reduce( const Range& range, Body& body ) { internal::start_reduce::run( range, body, __TBB_DEFAULT_PARTITIONER() ); } //! Parallel iteration with reduction and simple_partitioner /** @ingroup algorithms **/ template void parallel_reduce( const Range& range, Body& body, const simple_partitioner& partitioner ) { internal::start_reduce::run( range, body, partitioner ); } //! Parallel iteration with reduction and auto_partitioner /** @ingroup algorithms **/ template void parallel_reduce( const Range& range, Body& body, const auto_partitioner& partitioner ) { internal::start_reduce::run( range, body, partitioner ); } //! Parallel iteration with reduction and affinity_partitioner /** @ingroup algorithms **/ template void parallel_reduce( const Range& range, Body& body, affinity_partitioner& partitioner ) { internal::start_reduce::run( range, body, partitioner ); } #if __TBB_TASK_GROUP_CONTEXT //! Parallel iteration with reduction, simple partitioner and user-supplied context. /** @ingroup algorithms **/ template void parallel_reduce( const Range& range, Body& body, const simple_partitioner& partitioner, task_group_context& context ) { internal::start_reduce::run( range, body, partitioner, context ); } //! Parallel iteration with reduction, auto_partitioner and user-supplied context /** @ingroup algorithms **/ template void parallel_reduce( const Range& range, Body& body, const auto_partitioner& partitioner, task_group_context& context ) { internal::start_reduce::run( range, body, partitioner, context ); } //! Parallel iteration with reduction, affinity_partitioner and user-supplied context /** @ingroup algorithms **/ template void parallel_reduce( const Range& range, Body& body, affinity_partitioner& partitioner, task_group_context& context ) { internal::start_reduce::run( range, body, partitioner, context ); } #endif /* __TBB_TASK_GROUP_CONTEXT */ /** parallel_reduce overloads that work with anonymous function objects (see also \ref parallel_reduce_lambda_req "requirements on parallel_reduce anonymous function objects"). **/ //! Parallel iteration with reduction and default partitioner. /** @ingroup algorithms **/ template Value parallel_reduce( const Range& range, const Value& identity, const RealBody& real_body, const Reduction& reduction ) { internal::lambda_reduce_body body(identity, real_body, reduction); internal::start_reduce,const __TBB_DEFAULT_PARTITIONER> ::run(range, body, __TBB_DEFAULT_PARTITIONER() ); return body.result(); } //! Parallel iteration with reduction and simple_partitioner. /** @ingroup algorithms **/ template Value parallel_reduce( const Range& range, const Value& identity, const RealBody& real_body, const Reduction& reduction, const simple_partitioner& partitioner ) { internal::lambda_reduce_body body(identity, real_body, reduction); internal::start_reduce,const simple_partitioner> ::run(range, body, partitioner ); return body.result(); } //! Parallel iteration with reduction and auto_partitioner /** @ingroup algorithms **/ template Value parallel_reduce( const Range& range, const Value& identity, const RealBody& real_body, const Reduction& reduction, const auto_partitioner& partitioner ) { internal::lambda_reduce_body body(identity, real_body, reduction); internal::start_reduce,const auto_partitioner> ::run( range, body, partitioner ); return body.result(); } //! Parallel iteration with reduction and affinity_partitioner /** @ingroup algorithms **/ template Value parallel_reduce( const Range& range, const Value& identity, const RealBody& real_body, const Reduction& reduction, affinity_partitioner& partitioner ) { internal::lambda_reduce_body body(identity, real_body, reduction); internal::start_reduce,affinity_partitioner> ::run( range, body, partitioner ); return body.result(); } #if __TBB_TASK_GROUP_CONTEXT //! Parallel iteration with reduction, simple partitioner and user-supplied context. /** @ingroup algorithms **/ template Value parallel_reduce( const Range& range, const Value& identity, const RealBody& real_body, const Reduction& reduction, const simple_partitioner& partitioner, task_group_context& context ) { internal::lambda_reduce_body body(identity, real_body, reduction); internal::start_reduce,const simple_partitioner> ::run( range, body, partitioner, context ); return body.result(); } //! Parallel iteration with reduction, auto_partitioner and user-supplied context /** @ingroup algorithms **/ template Value parallel_reduce( const Range& range, const Value& identity, const RealBody& real_body, const Reduction& reduction, const auto_partitioner& partitioner, task_group_context& context ) { internal::lambda_reduce_body body(identity, real_body, reduction); internal::start_reduce,const auto_partitioner> ::run( range, body, partitioner, context ); return body.result(); } //! Parallel iteration with reduction, affinity_partitioner and user-supplied context /** @ingroup algorithms **/ template Value parallel_reduce( const Range& range, const Value& identity, const RealBody& real_body, const Reduction& reduction, affinity_partitioner& partitioner, task_group_context& context ) { internal::lambda_reduce_body body(identity, real_body, reduction); internal::start_reduce,affinity_partitioner> ::run( range, body, partitioner, context ); return body.result(); } #endif /* __TBB_TASK_GROUP_CONTEXT */ //! Parallel iteration with deterministic reduction and default partitioner. /** @ingroup algorithms **/ template void parallel_deterministic_reduce( const Range& range, Body& body ) { internal::start_deterministic_reduce::run( range, body ); } #if __TBB_TASK_GROUP_CONTEXT //! Parallel iteration with deterministic reduction, simple partitioner and user-supplied context. /** @ingroup algorithms **/ template void parallel_deterministic_reduce( const Range& range, Body& body, task_group_context& context ) { internal::start_deterministic_reduce::run( range, body, context ); } #endif /* __TBB_TASK_GROUP_CONTEXT */ /** parallel_reduce overloads that work with anonymous function objects (see also \ref parallel_reduce_lambda_req "requirements on parallel_reduce anonymous function objects"). **/ //! Parallel iteration with deterministic reduction and default partitioner. /** @ingroup algorithms **/ template Value parallel_deterministic_reduce( const Range& range, const Value& identity, const RealBody& real_body, const Reduction& reduction ) { internal::lambda_reduce_body body(identity, real_body, reduction); internal::start_deterministic_reduce > ::run(range, body); return body.result(); } #if __TBB_TASK_GROUP_CONTEXT //! Parallel iteration with deterministic reduction, simple partitioner and user-supplied context. /** @ingroup algorithms **/ template Value parallel_deterministic_reduce( const Range& range, const Value& identity, const RealBody& real_body, const Reduction& reduction, task_group_context& context ) { internal::lambda_reduce_body body(identity, real_body, reduction); internal::start_deterministic_reduce > ::run( range, body, context ); return body.result(); } #endif /* __TBB_TASK_GROUP_CONTEXT */ //@} } // namespace tbb #endif /* __TBB_parallel_reduce_H */ ================================================ FILE: benchmarks/tbb/parallel_scan.h ================================================ /* Copyright 2005-2014 Intel Corporation. All Rights Reserved. This file is part of Threading Building Blocks. Threading Building Blocks is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. Threading Building Blocks is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Threading Building Blocks; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA As a special exception, you may use this file as part of a free software library without restriction. Specifically, if other files instantiate templates or use macros or inline functions from this file, or you compile this file and link it with other files to produce an executable, this file does not by itself cause the resulting executable to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the executable file might be covered by the GNU General Public License. */ #ifndef __TBB_parallel_scan_H #define __TBB_parallel_scan_H #include "task.h" #include "aligned_space.h" #include #include "partitioner.h" namespace tbb { //! Used to indicate that the initial scan is being performed. /** @ingroup algorithms */ struct pre_scan_tag { static bool is_final_scan() {return false;} }; //! Used to indicate that the final scan is being performed. /** @ingroup algorithms */ struct final_scan_tag { static bool is_final_scan() {return true;} }; //! @cond INTERNAL namespace internal { //! Performs final scan for a leaf /** @ingroup algorithms */ template class final_sum: public task { public: Body my_body; private: aligned_space my_range; //! Where to put result of last subrange, or NULL if not last subrange. Body* my_stuff_last; public: final_sum( Body& body_ ) : my_body(body_,split()) { poison_pointer(my_stuff_last); } ~final_sum() { my_range.begin()->~Range(); } void finish_construction( const Range& range_, Body* stuff_last_ ) { new( my_range.begin() ) Range(range_); my_stuff_last = stuff_last_; } private: /*override*/ task* execute() { my_body( *my_range.begin(), final_scan_tag() ); if( my_stuff_last ) my_stuff_last->assign(my_body); return NULL; } }; //! Split work to be done in the scan. /** @ingroup algorithms */ template class sum_node: public task { typedef final_sum final_sum_type; public: final_sum_type *my_incoming; final_sum_type *my_body; Body *my_stuff_last; private: final_sum_type *my_left_sum; sum_node *my_left; sum_node *my_right; bool my_left_is_final; Range my_range; sum_node( const Range range_, bool left_is_final_ ) : my_left_sum(NULL), my_left(NULL), my_right(NULL), my_left_is_final(left_is_final_), my_range(range_) { // Poison fields that will be set by second pass. poison_pointer(my_body); poison_pointer(my_incoming); } task* create_child( const Range& range_, final_sum_type& f, sum_node* n, final_sum_type* incoming_, Body* stuff_last_ ) { if( !n ) { f.recycle_as_child_of( *this ); f.finish_construction( range_, stuff_last_ ); return &f; } else { n->my_body = &f; n->my_incoming = incoming_; n->my_stuff_last = stuff_last_; return n; } } /*override*/ task* execute() { if( my_body ) { if( my_incoming ) my_left_sum->my_body.reverse_join( my_incoming->my_body ); recycle_as_continuation(); sum_node& c = *this; task* b = c.create_child(Range(my_range,split()),*my_left_sum,my_right,my_left_sum,my_stuff_last); task* a = my_left_is_final ? NULL : c.create_child(my_range,*my_body,my_left,my_incoming,NULL); set_ref_count( (a!=NULL)+(b!=NULL) ); my_body = NULL; if( a ) spawn(*b); else a = b; return a; } else { return NULL; } } template friend class start_scan; template friend class finish_scan; }; //! Combine partial results /** @ingroup algorithms */ template class finish_scan: public task { typedef sum_node sum_node_type; typedef final_sum final_sum_type; final_sum_type** const my_sum; sum_node_type*& my_return_slot; public: final_sum_type* my_right_zombie; sum_node_type& my_result; /*override*/ task* execute() { __TBB_ASSERT( my_result.ref_count()==(my_result.my_left!=NULL)+(my_result.my_right!=NULL), NULL ); if( my_result.my_left ) my_result.my_left_is_final = false; if( my_right_zombie && my_sum ) ((*my_sum)->my_body).reverse_join(my_result.my_left_sum->my_body); __TBB_ASSERT( !my_return_slot, NULL ); if( my_right_zombie || my_result.my_right ) { my_return_slot = &my_result; } else { destroy( my_result ); } if( my_right_zombie && !my_sum && !my_result.my_right ) { destroy(*my_right_zombie); my_right_zombie = NULL; } return NULL; } finish_scan( sum_node_type*& return_slot_, final_sum_type** sum_, sum_node_type& result_ ) : my_sum(sum_), my_return_slot(return_slot_), my_right_zombie(NULL), my_result(result_) { __TBB_ASSERT( !my_return_slot, NULL ); } }; //! Initial task to split the work /** @ingroup algorithms */ template class start_scan: public task { typedef sum_node sum_node_type; typedef final_sum final_sum_type; final_sum_type* my_body; /** Non-null if caller is requesting total. */ final_sum_type** my_sum; sum_node_type** my_return_slot; /** Null if computing root. */ sum_node_type* my_parent_sum; bool my_is_final; bool my_is_right_child; Range my_range; typename Partitioner::partition_type my_partition; /*override*/ task* execute(); public: start_scan( sum_node_type*& return_slot_, start_scan& parent_, sum_node_type* parent_sum_ ) : my_body(parent_.my_body), my_sum(parent_.my_sum), my_return_slot(&return_slot_), my_parent_sum(parent_sum_), my_is_final(parent_.my_is_final), my_is_right_child(false), my_range(parent_.my_range,split()), my_partition(parent_.my_partition,split()) { __TBB_ASSERT( !*my_return_slot, NULL ); } start_scan( sum_node_type*& return_slot_, const Range& range_, final_sum_type& body_, const Partitioner& partitioner_) : my_body(&body_), my_sum(NULL), my_return_slot(&return_slot_), my_parent_sum(NULL), my_is_final(true), my_is_right_child(false), my_range(range_), my_partition(partitioner_) { __TBB_ASSERT( !*my_return_slot, NULL ); } static void run( const Range& range_, Body& body_, const Partitioner& partitioner_ ) { if( !range_.empty() ) { typedef internal::start_scan start_pass1_type; internal::sum_node* root = NULL; typedef internal::final_sum final_sum_type; final_sum_type* temp_body = new(task::allocate_root()) final_sum_type( body_ ); start_pass1_type& pass1 = *new(task::allocate_root()) start_pass1_type( /*my_return_slot=*/root, range_, *temp_body, partitioner_ ); task::spawn_root_and_wait( pass1 ); if( root ) { root->my_body = temp_body; root->my_incoming = NULL; root->my_stuff_last = &body_; task::spawn_root_and_wait( *root ); } else { body_.assign(temp_body->my_body); temp_body->finish_construction( range_, NULL ); temp_body->destroy(*temp_body); } } } }; template task* start_scan::execute() { typedef internal::finish_scan finish_pass1_type; finish_pass1_type* p = my_parent_sum ? static_cast( parent() ) : NULL; // Inspecting p->result.left_sum would ordinarily be a race condition. // But we inspect it only if we are not a stolen task, in which case we // know that task assigning to p->result.left_sum has completed. bool treat_as_stolen = my_is_right_child && (is_stolen_task() || my_body!=p->my_result.my_left_sum); if( treat_as_stolen ) { // Invocation is for right child that has been really stolen or needs to be virtually stolen p->my_right_zombie = my_body = new( allocate_root() ) final_sum_type(my_body->my_body); my_is_final = false; } task* next_task = NULL; if( (my_is_right_child && !treat_as_stolen) || !my_range.is_divisible() || my_partition.should_execute_range(*this) ) { if( my_is_final ) (my_body->my_body)( my_range, final_scan_tag() ); else if( my_sum ) (my_body->my_body)( my_range, pre_scan_tag() ); if( my_sum ) *my_sum = my_body; __TBB_ASSERT( !*my_return_slot, NULL ); } else { sum_node_type* result; if( my_parent_sum ) result = new(allocate_additional_child_of(*my_parent_sum)) sum_node_type(my_range,/*my_left_is_final=*/my_is_final); else result = new(task::allocate_root()) sum_node_type(my_range,/*my_left_is_final=*/my_is_final); finish_pass1_type& c = *new( allocate_continuation()) finish_pass1_type(*my_return_slot,my_sum,*result); // Split off right child start_scan& b = *new( c.allocate_child() ) start_scan( /*my_return_slot=*/result->my_right, *this, result ); b.my_is_right_child = true; // Left child is recycling of *this. Must recycle this before spawning b, // otherwise b might complete and decrement c.ref_count() to zero, which // would cause c.execute() to run prematurely. recycle_as_child_of(c); c.set_ref_count(2); c.spawn(b); my_sum = &result->my_left_sum; my_return_slot = &result->my_left; my_is_right_child = false; next_task = this; my_parent_sum = result; __TBB_ASSERT( !*my_return_slot, NULL ); } return next_task; } } // namespace internal //! @endcond // Requirements on Range concept are documented in blocked_range.h /** \page parallel_scan_body_req Requirements on parallel_scan body Class \c Body implementing the concept of parallel_scan body must define: - \code Body::Body( Body&, split ); \endcode Splitting constructor. Split \c b so that \c this and \c b can accumulate separately - \code Body::~Body(); \endcode Destructor - \code void Body::operator()( const Range& r, pre_scan_tag ); \endcode Preprocess iterations for range \c r - \code void Body::operator()( const Range& r, final_scan_tag ); \endcode Do final processing for iterations of range \c r - \code void Body::reverse_join( Body& a ); \endcode Merge preprocessing state of \c a into \c this, where \c a was created earlier from \c b by b's splitting constructor **/ /** \name parallel_scan See also requirements on \ref range_req "Range" and \ref parallel_scan_body_req "parallel_scan Body". **/ //@{ //! Parallel prefix with default partitioner /** @ingroup algorithms **/ template void parallel_scan( const Range& range, Body& body ) { internal::start_scan::run(range,body,__TBB_DEFAULT_PARTITIONER()); } //! Parallel prefix with simple_partitioner /** @ingroup algorithms **/ template void parallel_scan( const Range& range, Body& body, const simple_partitioner& partitioner ) { internal::start_scan::run(range,body,partitioner); } //! Parallel prefix with auto_partitioner /** @ingroup algorithms **/ template void parallel_scan( const Range& range, Body& body, const auto_partitioner& partitioner ) { internal::start_scan::run(range,body,partitioner); } //@} } // namespace tbb #endif /* __TBB_parallel_scan_H */ ================================================ FILE: benchmarks/tbb/parallel_sort.h ================================================ /* Copyright 2005-2014 Intel Corporation. All Rights Reserved. This file is part of Threading Building Blocks. Threading Building Blocks is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. Threading Building Blocks is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Threading Building Blocks; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA As a special exception, you may use this file as part of a free software library without restriction. Specifically, if other files instantiate templates or use macros or inline functions from this file, or you compile this file and link it with other files to produce an executable, this file does not by itself cause the resulting executable to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the executable file might be covered by the GNU General Public License. */ #ifndef __TBB_parallel_sort_H #define __TBB_parallel_sort_H #include "parallel_for.h" #include "blocked_range.h" #include "internal/_range_iterator.h" #include #include #include namespace tbb { //! @cond INTERNAL namespace internal { //! Range used in quicksort to split elements into subranges based on a value. /** The split operation selects a splitter and places all elements less than or equal to the value in the first range and the remaining elements in the second range. @ingroup algorithms */ template class quick_sort_range: private no_assign { inline size_t median_of_three(const RandomAccessIterator &array, size_t l, size_t m, size_t r) const { return comp(array[l], array[m]) ? ( comp(array[m], array[r]) ? m : ( comp( array[l], array[r]) ? r : l ) ) : ( comp(array[r], array[m]) ? m : ( comp( array[r], array[l] ) ? r : l ) ); } inline size_t pseudo_median_of_nine( const RandomAccessIterator &array, const quick_sort_range &range ) const { size_t offset = range.size/8u; return median_of_three(array, median_of_three(array, 0, offset, offset*2), median_of_three(array, offset*3, offset*4, offset*5), median_of_three(array, offset*6, offset*7, range.size - 1) ); } public: static const size_t grainsize = 500; const Compare ∁ RandomAccessIterator begin; size_t size; quick_sort_range( RandomAccessIterator begin_, size_t size_, const Compare &comp_ ) : comp(comp_), begin(begin_), size(size_) {} bool empty() const {return size==0;} bool is_divisible() const {return size>=grainsize;} quick_sort_range( quick_sort_range& range, split ) : comp(range.comp) { using std::swap; RandomAccessIterator array = range.begin; RandomAccessIterator key0 = range.begin; size_t m = pseudo_median_of_nine(array, range); if (m) swap ( array[0], array[m] ); size_t i=0; size_t j=range.size; // Partition interval [i+1,j-1] with key *key0. for(;;) { __TBB_ASSERT( i class quick_sort_pretest_body : internal::no_assign { const Compare ∁ public: quick_sort_pretest_body(const Compare &_comp) : comp(_comp) {} void operator()( const blocked_range& range ) const { task &my_task = task::self(); RandomAccessIterator my_end = range.end(); int i = 0; for (RandomAccessIterator k = range.begin(); k != my_end; ++k, ++i) { if ( i%64 == 0 && my_task.is_cancelled() ) break; // The k-1 is never out-of-range because the first chunk starts at begin+serial_cutoff+1 if ( comp( *(k), *(k-1) ) ) { my_task.cancel_group_execution(); break; } } } }; #endif /* __TBB_TASK_GROUP_CONTEXT */ //! Body class used to sort elements in a range that is smaller than the grainsize. /** @ingroup algorithms */ template struct quick_sort_body { void operator()( const quick_sort_range& range ) const { //SerialQuickSort( range.begin, range.size, range.comp ); std::sort( range.begin, range.begin + range.size, range.comp ); } }; //! Wrapper method to initiate the sort by calling parallel_for. /** @ingroup algorithms */ template void parallel_quick_sort( RandomAccessIterator begin, RandomAccessIterator end, const Compare& comp ) { #if __TBB_TASK_GROUP_CONTEXT task_group_context my_context; const int serial_cutoff = 9; __TBB_ASSERT( begin + serial_cutoff < end, "min_parallel_size is smaller than serial cutoff?" ); RandomAccessIterator k; for ( k = begin ; k != begin + serial_cutoff; ++k ) { if ( comp( *(k+1), *k ) ) { goto do_parallel_quick_sort; } } parallel_for( blocked_range(k+1, end), quick_sort_pretest_body(comp), auto_partitioner(), my_context); if (my_context.is_group_execution_cancelled()) do_parallel_quick_sort: #endif /* __TBB_TASK_GROUP_CONTEXT */ parallel_for( quick_sort_range(begin, end-begin, comp ), quick_sort_body(), auto_partitioner() ); } } // namespace internal //! @endcond /** \page parallel_sort_iter_req Requirements on iterators for parallel_sort Requirements on value type \c T of \c RandomAccessIterator for \c parallel_sort: - \code void swap( T& x, T& y ) \endcode Swaps \c x and \c y - \code bool Compare::operator()( const T& x, const T& y ) \endcode True if x comes before y; **/ /** \name parallel_sort See also requirements on \ref parallel_sort_iter_req "iterators for parallel_sort". **/ //@{ //! Sorts the data in [begin,end) using the given comparator /** The compare function object is used for all comparisons between elements during sorting. The compare object must define a bool operator() function. @ingroup algorithms **/ template void parallel_sort( RandomAccessIterator begin, RandomAccessIterator end, const Compare& comp) { const int min_parallel_size = 500; if( end > begin ) { if (end - begin < min_parallel_size) { std::sort(begin, end, comp); } else { internal::parallel_quick_sort(begin, end, comp); } } } //! Sorts the data in [begin,end) with a default comparator \c std::less /** @ingroup algorithms **/ template inline void parallel_sort( RandomAccessIterator begin, RandomAccessIterator end ) { parallel_sort( begin, end, std::less< typename std::iterator_traits::value_type >() ); } //! Sorts the data in rng using the given comparator /** @ingroup algorithms **/ template void parallel_sort(Range& rng, const Compare& comp) { parallel_sort(tbb::internal::first(rng), tbb::internal::last(rng), comp); } //! Sorts the data in const rng using the given comparator /** @ingroup algorithms **/ template void parallel_sort(const Range& rng, const Compare& comp) { parallel_sort(tbb::internal::first(rng), tbb::internal::last(rng), comp); } //! Sorts the data in rng with a default comparator \c std::less /** @ingroup algorithms **/ template void parallel_sort(Range& rng) { parallel_sort(tbb::internal::first(rng), tbb::internal::last(rng)); } //! Sorts the data in const rng with a default comparator \c std::less /** @ingroup algorithms **/ template void parallel_sort(const Range& rng) { parallel_sort(tbb::internal::first(rng), tbb::internal::last(rng)); } //! Sorts the data in the range \c [begin,end) with a default comparator \c std::less /** @ingroup algorithms **/ template inline void parallel_sort( T * begin, T * end ) { parallel_sort( begin, end, std::less< T >() ); } //@} } // namespace tbb #endif ================================================ FILE: benchmarks/tbb/parallel_while.h ================================================ /* Copyright 2005-2014 Intel Corporation. All Rights Reserved. This file is part of Threading Building Blocks. Threading Building Blocks is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. Threading Building Blocks is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Threading Building Blocks; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA As a special exception, you may use this file as part of a free software library without restriction. Specifically, if other files instantiate templates or use macros or inline functions from this file, or you compile this file and link it with other files to produce an executable, this file does not by itself cause the resulting executable to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the executable file might be covered by the GNU General Public License. */ #ifndef __TBB_parallel_while #define __TBB_parallel_while #include "task.h" #include namespace tbb { template class parallel_while; //! @cond INTERNAL namespace internal { template class while_task; //! For internal use only. /** Executes one iteration of a while. @ingroup algorithms */ template class while_iteration_task: public task { const Body& my_body; typename Body::argument_type my_value; /*override*/ task* execute() { my_body(my_value); return NULL; } while_iteration_task( const typename Body::argument_type& value, const Body& body ) : my_body(body), my_value(value) {} template friend class while_group_task; friend class tbb::parallel_while; }; //! For internal use only /** Unpacks a block of iterations. @ingroup algorithms */ template class while_group_task: public task { static const size_t max_arg_size = 4; const Body& my_body; size_t size; typename Body::argument_type my_arg[max_arg_size]; while_group_task( const Body& body ) : my_body(body), size(0) {} /*override*/ task* execute() { typedef while_iteration_task iteration_type; __TBB_ASSERT( size>0, NULL ); task_list list; task* t; size_t k=0; for(;;) { t = new( allocate_child() ) iteration_type(my_arg[k],my_body); if( ++k==size ) break; list.push_back(*t); } set_ref_count(int(k+1)); spawn(list); spawn_and_wait_for_all(*t); return NULL; } template friend class while_task; }; //! For internal use only. /** Gets block of iterations from a stream and packages them into a while_group_task. @ingroup algorithms */ template class while_task: public task { Stream& my_stream; const Body& my_body; empty_task& my_barrier; /*override*/ task* execute() { typedef while_group_task block_type; block_type& t = *new( allocate_additional_child_of(my_barrier) ) block_type(my_body); size_t k=0; while( my_stream.pop_if_present(t.my_arg[k]) ) { if( ++k==block_type::max_arg_size ) { // There might be more iterations. recycle_to_reexecute(); break; } } if( k==0 ) { destroy(t); return NULL; } else { t.size = k; return &t; } } while_task( Stream& stream, const Body& body, empty_task& barrier ) : my_stream(stream), my_body(body), my_barrier(barrier) {} friend class tbb::parallel_while; }; } // namespace internal //! @endcond //! Parallel iteration over a stream, with optional addition of more work. /** The Body b has the requirement: \n "b(v)" \n "b.argument_type" \n where v is an argument_type @ingroup algorithms */ template class parallel_while: internal::no_copy { public: //! Construct empty non-running parallel while. parallel_while() : my_body(NULL), my_barrier(NULL) {} //! Destructor cleans up data members before returning. ~parallel_while() { if( my_barrier ) { my_barrier->destroy(*my_barrier); my_barrier = NULL; } } //! Type of items typedef typename Body::argument_type value_type; //! Apply body.apply to each item in the stream. /** A Stream s has the requirements \n "S::value_type" \n "s.pop_if_present(value) is convertible to bool */ template void run( Stream& stream, const Body& body ); //! Add a work item while running. /** Should be executed only by body.apply or a thread spawned therefrom. */ void add( const value_type& item ); private: const Body* my_body; empty_task* my_barrier; }; template template void parallel_while::run( Stream& stream, const Body& body ) { using namespace internal; empty_task& barrier = *new( task::allocate_root() ) empty_task(); my_body = &body; my_barrier = &barrier; my_barrier->set_ref_count(2); while_task& w = *new( my_barrier->allocate_child() ) while_task( stream, body, barrier ); my_barrier->spawn_and_wait_for_all(w); my_barrier->destroy(*my_barrier); my_barrier = NULL; my_body = NULL; } template void parallel_while::add( const value_type& item ) { __TBB_ASSERT(my_barrier,"attempt to add to parallel_while that is not running"); typedef internal::while_iteration_task iteration_type; iteration_type& i = *new( task::allocate_additional_child_of(*my_barrier) ) iteration_type(item,*my_body); task::self().spawn( i ); } } // namespace #endif /* __TBB_parallel_while */ ================================================ FILE: benchmarks/tbb/partitioner.h ================================================ /* Copyright 2005-2014 Intel Corporation. All Rights Reserved. This file is part of Threading Building Blocks. Threading Building Blocks is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. Threading Building Blocks is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Threading Building Blocks; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA As a special exception, you may use this file as part of a free software library without restriction. Specifically, if other files instantiate templates or use macros or inline functions from this file, or you compile this file and link it with other files to produce an executable, this file does not by itself cause the resulting executable to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the executable file might be covered by the GNU General Public License. */ #ifndef __TBB_partitioner_H #define __TBB_partitioner_H #ifndef __TBB_INITIAL_CHUNKS // initial task divisions per thread #define __TBB_INITIAL_CHUNKS 2 #endif #ifndef __TBB_RANGE_POOL_CAPACITY // maximum number of elements in range pool #define __TBB_RANGE_POOL_CAPACITY 8 #endif #ifndef __TBB_INIT_DEPTH // initial value for depth of range pool #define __TBB_INIT_DEPTH 5 #endif #ifndef __TBB_DEMAND_DEPTH_ADD // when imbalance is found range splits this value times more #define __TBB_DEMAND_DEPTH_ADD 2 #endif #ifndef __TBB_STATIC_THRESHOLD // necessary number of clocks for the work to be distributed among all tasks #define __TBB_STATIC_THRESHOLD 40000 #endif #if __TBB_DEFINE_MIC #define __TBB_NONUNIFORM_TASK_CREATION 1 #ifdef __TBB_machine_time_stamp #define __TBB_USE_MACHINE_TIME_STAMPS 1 #define __TBB_task_duration() __TBB_STATIC_THRESHOLD #endif // __TBB_machine_time_stamp #endif // __TBB_DEFINE_MIC #include "task.h" #include "aligned_space.h" #include "atomic.h" #if defined(_MSC_VER) && !defined(__INTEL_COMPILER) // Workaround for overzealous compiler warnings #pragma warning (push) #pragma warning (disable: 4244) #endif namespace tbb { class auto_partitioner; class simple_partitioner; class affinity_partitioner; namespace interface7 { namespace internal { class affinity_partition_type; } } namespace internal { //< @cond INTERNAL size_t __TBB_EXPORTED_FUNC get_initial_auto_partitioner_divisor(); //! Defines entry point for affinity partitioner into tbb run-time library. class affinity_partitioner_base_v3: no_copy { friend class tbb::affinity_partitioner; friend class tbb::interface7::internal::affinity_partition_type; //! Array that remembers affinities of tree positions to affinity_id. /** NULL if my_size==0. */ affinity_id* my_array; //! Number of elements in my_array. size_t my_size; //! Zeros the fields. affinity_partitioner_base_v3() : my_array(NULL), my_size(0) {} //! Deallocates my_array. ~affinity_partitioner_base_v3() {resize(0);} //! Resize my_array. /** Retains values if resulting size is the same. */ void __TBB_EXPORTED_METHOD resize( unsigned factor ); }; //! Provides backward-compatible methods for partition objects without affinity. class partition_type_base { public: void set_affinity( task & ) {} void note_affinity( task::affinity_id ) {} task* continue_after_execute_range() {return NULL;} bool decide_whether_to_delay() {return false;} void spawn_or_delay( bool, task& b ) { task::spawn(b); } }; template class start_scan; } //< namespace internal @endcond namespace serial { namespace interface7 { template class start_for; } } namespace interface7 { //! @cond INTERNAL namespace internal { using namespace tbb::internal; template class start_for; template class start_reduce; //! Join task node that contains shared flag for stealing feedback class flag_task: public task { public: tbb::atomic my_child_stolen; flag_task() { my_child_stolen = false; } task* execute() { return NULL; } static void mark_task_stolen(task &t) { tbb::atomic &flag = static_cast(t.parent())->my_child_stolen; #if TBB_USE_THREADING_TOOLS // Threading tools respect lock prefix but report false-positive data-race via plain store flag.fetch_and_store(true); #else flag = true; #endif //TBB_USE_THREADING_TOOLS } static bool is_peer_stolen(task &t) { return static_cast(t.parent())->my_child_stolen; } }; //! Depth is a relative depth of recursive division inside a range pool. Relative depth allows //! infinite absolute depth of the recursion for heavily unbalanced workloads with range represented //! by a number that cannot fit into machine word. typedef unsigned char depth_t; //! Range pool stores ranges of type T in a circular buffer with MaxCapacity template class range_vector { depth_t my_head; depth_t my_tail; depth_t my_size; depth_t my_depth[MaxCapacity]; // relative depths of stored ranges tbb::aligned_space my_pool; public: //! initialize via first range in pool range_vector(const T& elem) : my_head(0), my_tail(0), my_size(1) { my_depth[0] = 0; new( static_cast(my_pool.begin()) ) T(elem);//TODO: std::move? } ~range_vector() { while( !empty() ) pop_back(); } bool empty() const { return my_size == 0; } depth_t size() const { return my_size; } //! Populates range pool via ranges up to max depth or while divisible //! max_depth starts from 0, e.g. value 2 makes 3 ranges in the pool up to two 1/4 pieces void split_to_fill(depth_t max_depth) { while( my_size < MaxCapacity && is_divisible(max_depth) ) { depth_t prev = my_head; my_head = (my_head + 1) % MaxCapacity; new(my_pool.begin()+my_head) T(my_pool.begin()[prev]); // copy TODO: std::move? my_pool.begin()[prev].~T(); // instead of assignment new(my_pool.begin()+prev) T(my_pool.begin()[my_head], split()); // do 'inverse' split my_depth[my_head] = ++my_depth[prev]; my_size++; } } void pop_back() { __TBB_ASSERT(my_size > 0, "range_vector::pop_back() with empty size"); my_pool.begin()[my_head].~T(); my_size--; my_head = (my_head + MaxCapacity - 1) % MaxCapacity; } void pop_front() { __TBB_ASSERT(my_size > 0, "range_vector::pop_front() with empty size"); my_pool.begin()[my_tail].~T(); my_size--; my_tail = (my_tail + 1) % MaxCapacity; } T& back() { __TBB_ASSERT(my_size > 0, "range_vector::back() with empty size"); return my_pool.begin()[my_head]; } T& front() { __TBB_ASSERT(my_size > 0, "range_vector::front() with empty size"); return my_pool.begin()[my_tail]; } //! similarly to front(), returns depth of the first range in the pool depth_t front_depth() { __TBB_ASSERT(my_size > 0, "range_vector::front_depth() with empty size"); return my_depth[my_tail]; } depth_t back_depth() { __TBB_ASSERT(my_size > 0, "range_vector::back_depth() with empty size"); return my_depth[my_head]; } bool is_divisible(depth_t max_depth) { return back_depth() < max_depth && back().is_divisible(); } }; //! Provides default methods for partition objects and common algorithm blocks. template struct partition_type_base { typedef split split_type; // decision makers void set_affinity( task & ) {} void note_affinity( task::affinity_id ) {} bool check_being_stolen(task &) { return false; } // part of old should_execute_range() bool check_for_demand(task &) { return false; } bool is_divisible() { return true; } // part of old should_execute_range() depth_t max_depth() { return 0; } void align_depth(depth_t) { } template split_type get_split() { return split(); } // common function blocks Partition& self() { return *static_cast(this); } // CRTP helper template void execute(StartType &start, Range &range) { // The algorithm in a few words ([]-denotes calls to decision methods of partitioner): // [If this task is stolen, adjust depth and divisions if necessary, set flag]. // If range is divisible { // Spread the work while [initial divisions left]; // Create trap task [if necessary]; // } // If not divisible or [max depth is reached], execute, else do the range pool part if ( range.is_divisible() ) { if ( self().is_divisible() ) { do { // split until is divisible typename Partition::split_type split_obj = self().template get_split(); start.offer_work( split_obj ); } while ( range.is_divisible() && self().is_divisible() ); } } if( !range.is_divisible() || !self().max_depth() ) start.run_body( range ); // simple partitioner goes always here else { // do range pool internal::range_vector range_pool(range); do { range_pool.split_to_fill(self().max_depth()); // fill range pool if( self().check_for_demand( start ) ) { if( range_pool.size() > 1 ) { start.offer_work( range_pool.front(), range_pool.front_depth() ); range_pool.pop_front(); continue; } if( range_pool.is_divisible(self().max_depth()) ) // was not enough depth to fork a task continue; // note: next split_to_fill() should split range at least once } start.run_body( range_pool.back() ); range_pool.pop_back(); } while( !range_pool.empty() && !start.is_cancelled() ); } } }; //! Provides default methods for auto (adaptive) partition objects. template struct adaptive_partition_type_base : partition_type_base { size_t my_divisor; depth_t my_max_depth; adaptive_partition_type_base() : my_max_depth(__TBB_INIT_DEPTH) { my_divisor = tbb::internal::get_initial_auto_partitioner_divisor() / 4; __TBB_ASSERT(my_divisor, "initial value of get_initial_auto_partitioner_divisor() is not valid"); } adaptive_partition_type_base(adaptive_partition_type_base &src, split) { my_max_depth = src.my_max_depth; #if TBB_USE_ASSERT size_t old_divisor = src.my_divisor; #endif #if __TBB_INITIAL_TASK_IMBALANCE if( src.my_divisor <= 1 ) my_divisor = 0; else my_divisor = src.my_divisor = (src.my_divisor + 1u) / 2u; #else my_divisor = src.my_divisor / 2u; src.my_divisor = src.my_divisor - my_divisor; // TODO: check the effect separately if (my_divisor) src.my_max_depth += static_cast(__TBB_Log2(src.my_divisor / my_divisor)); #endif // For affinity_partitioner, my_divisor indicates the number of affinity array indices the task reserves. // A task which has only one index must produce the right split without reserved index in order to avoid // it to be overwritten in note_affinity() of the created (right) task. // I.e. a task created deeper than the affinity array can remember must not save its affinity (LIFO order) __TBB_ASSERT( (old_divisor <= 1 && my_divisor == 0) || (old_divisor > 1 && my_divisor != 0), NULL); } adaptive_partition_type_base(adaptive_partition_type_base &src, const proportional_split& split_obj) { my_max_depth = src.my_max_depth; my_divisor = size_t(float(src.my_divisor) * float(split_obj.right()) / float(split_obj.left() + split_obj.right())); src.my_divisor -= my_divisor; } bool check_being_stolen( task &t) { // part of old should_execute_range() if( !my_divisor ) { // if not from the top P tasks of binary tree my_divisor = 1; // TODO: replace by on-stack flag (partition_state's member)? if( t.is_stolen_task() && t.parent()->ref_count() >= 2 ) { // runs concurrently with the left task #if TBB_USE_EXCEPTIONS // RTTI is available, check whether the cast is valid __TBB_ASSERT(dynamic_cast(t.parent()), 0); // correctness of the cast relies on avoiding the root task for which: // - initial value of my_divisor != 0 (protected by separate assertion) // - is_stolen_task() always returns false for the root task. #endif flag_task::mark_task_stolen(t); if( !my_max_depth ) my_max_depth++; my_max_depth += __TBB_DEMAND_DEPTH_ADD; return true; } } return false; } void align_depth(depth_t base) { __TBB_ASSERT(base <= my_max_depth, 0); my_max_depth -= base; } depth_t max_depth() { return my_max_depth; } }; //! Helper that enables one or the other code branches (see example in is_range_divisible_in_proportion) template struct enable_if { typedef T type; }; template struct enable_if { }; //! Class determines whether template parameter has static boolean //! constant 'is_divisible_in_proportion' initialized with value of //! 'true' or not. /** If template parameter has such field that has been initialized * with non-zero value then class field will be set to 'true', * otherwise - 'false' */ template class is_range_divisible_in_proportion { private: typedef char yes[1]; typedef char no [2]; template static yes& decide(typename enable_if::type *); template static no& decide(...); public: // equals to 'true' if and only if static const variable 'is_divisible_in_proportion' of template parameter // initialized with the value of 'true' static const bool value = (sizeof(decide(0)) == sizeof(yes)); }; //! Provides default methods for affinity (adaptive) partition objects. class affinity_partition_type : public adaptive_partition_type_base { static const unsigned factor_power = 4; static const unsigned factor = 1<(), my_delay(start) #ifdef __TBB_USE_MACHINE_TIME_STAMPS , my_dst_tsc(0) #endif { __TBB_ASSERT( (factor&(factor-1))==0, "factor must be power of two" ); my_divisor *= factor; ap.resize(factor); my_array = ap.my_array; my_begin = 0; my_max_depth = factor_power + 1; // the first factor_power ranges will be spawned, and >=1 ranges should be left __TBB_ASSERT( my_max_depth < __TBB_RANGE_POOL_CAPACITY, 0 ); } affinity_partition_type(affinity_partition_type& p, split) : adaptive_partition_type_base(p, split()), my_delay(pass), #ifdef __TBB_USE_MACHINE_TIME_STAMPS my_dst_tsc(0), #endif my_array(p.my_array) { // the sum of the divisors represents original value of p.my_divisor before split __TBB_ASSERT(my_divisor + p.my_divisor <= factor, NULL); my_begin = p.my_begin + p.my_divisor; } affinity_partition_type(affinity_partition_type& p, const proportional_split& split_obj) : adaptive_partition_type_base(p, split_obj), my_delay(start), #ifdef __TBB_USE_MACHINE_TIME_STAMPS my_dst_tsc(0), #endif my_array(p.my_array) { size_t total_divisor = my_divisor + p.my_divisor; __TBB_ASSERT(total_divisor % factor == 0, NULL); my_divisor = (my_divisor + factor/2) & (0u - factor); if (!my_divisor) my_divisor = factor; else if (my_divisor == total_divisor) my_divisor = total_divisor - factor; p.my_divisor = total_divisor - my_divisor; __TBB_ASSERT(my_divisor && p.my_divisor, NULL); my_begin = p.my_begin + p.my_divisor; } void set_affinity( task &t ) { if( my_divisor ) { if( !my_array[my_begin] ) { // TODO: consider code reuse for static_paritioner my_array[my_begin] = affinity_id(my_begin / factor + 1); } t.set_affinity( my_array[my_begin] ); } } void note_affinity( task::affinity_id id ) { if( my_divisor ) my_array[my_begin] = id; } bool check_for_demand( task &t ) { if( pass == my_delay ) { if( my_divisor > 1 ) // produce affinitized tasks while they have slot in array return true; // do not do my_max_depth++ here, but be sure range_pool is splittable once more else if( my_divisor && my_max_depth ) { // make balancing task my_divisor = 0; // once for each task; depth will be decreased in align_depth() return true; } else if( flag_task::is_peer_stolen(t) ) { my_max_depth += __TBB_DEMAND_DEPTH_ADD; return true; } } else if( start == my_delay ) { #ifndef __TBB_USE_MACHINE_TIME_STAMPS my_delay = pass; #else my_dst_tsc = __TBB_machine_time_stamp() + __TBB_task_duration(); my_delay = run; } else if( run == my_delay ) { if( __TBB_machine_time_stamp() < my_dst_tsc ) { __TBB_ASSERT(my_max_depth > 0, NULL); return false; } my_delay = pass; return true; #endif // __TBB_USE_MACHINE_TIME_STAMPS } return false; } bool is_divisible() { // part of old should_execute_range() return my_divisor > factor; } #if _MSC_VER && !defined(__INTEL_COMPILER) // Suppress "conditional expression is constant" warning. #pragma warning( push ) #pragma warning( disable: 4127 ) #endif template split_type get_split() { if (is_range_divisible_in_proportion::value) { size_t size = my_divisor / factor; #if __TBB_NONUNIFORM_TASK_CREATION size_t right = (size + 2) / 3; #else size_t right = size / 2; #endif size_t left = size - right; return split_type(left, right); } else { return split_type(1, 1); } } #if _MSC_VER && !defined(__INTEL_COMPILER) #pragma warning( pop ) #endif // warning 4127 is back static const unsigned range_pool_size = __TBB_RANGE_POOL_CAPACITY; }; class auto_partition_type: public adaptive_partition_type_base { public: auto_partition_type( const auto_partitioner& ) { my_divisor *= __TBB_INITIAL_CHUNKS; } auto_partition_type( auto_partition_type& src, split) : adaptive_partition_type_base(src, split()) {} bool is_divisible() { // part of old should_execute_range() if( my_divisor > 1 ) return true; if( my_divisor && my_max_depth ) { // can split the task. TODO: on-stack flag instead // keep same fragmentation while splitting for the local task pool my_max_depth--; my_divisor = 0; // decrease max_depth once per task return true; } else return false; } bool check_for_demand(task &t) { if( flag_task::is_peer_stolen(t) ) { my_max_depth += __TBB_DEMAND_DEPTH_ADD; return true; } else return false; } static const unsigned range_pool_size = __TBB_RANGE_POOL_CAPACITY; }; class simple_partition_type: public partition_type_base { public: simple_partition_type( const simple_partitioner& ) {} simple_partition_type( const simple_partition_type&, split ) {} //! simplified algorithm template void execute(StartType &start, Range &range) { split_type split_obj = split(); // start.offer_work accepts split_type as reference while( range.is_divisible() ) start.offer_work( split_obj ); start.run_body( range ); } //static const unsigned range_pool_size = 1; - not necessary because execute() is overridden }; //! Backward-compatible partition for auto and affinity partition objects. class old_auto_partition_type: public tbb::internal::partition_type_base { size_t num_chunks; static const size_t VICTIM_CHUNKS = 4; public: bool should_execute_range(const task &t) { if( num_chunks friend class serial::interface7::start_for; template friend class interface7::internal::start_for; template friend class interface7::internal::start_reduce; template friend class internal::start_scan; // backward compatibility class partition_type: public internal::partition_type_base { public: bool should_execute_range(const task& ) {return false;} partition_type( const simple_partitioner& ) {} partition_type( const partition_type&, split ) {} }; // new implementation just extends existing interface typedef interface7::internal::simple_partition_type task_partition_type; // TODO: consider to make split_type public typedef interface7::internal::simple_partition_type::split_type split_type; }; //! An auto partitioner /** The range is initial divided into several large chunks. Chunks are further subdivided into smaller pieces if demand detected and they are divisible. @ingroup algorithms */ class auto_partitioner { public: auto_partitioner() {} private: template friend class serial::interface7::start_for; template friend class interface7::internal::start_for; template friend class interface7::internal::start_reduce; template friend class internal::start_scan; // backward compatibility typedef interface7::internal::old_auto_partition_type partition_type; // new implementation just extends existing interface typedef interface7::internal::auto_partition_type task_partition_type; // TODO: consider to make split_type public typedef interface7::internal::auto_partition_type::split_type split_type; }; //! An affinity partitioner class affinity_partitioner: internal::affinity_partitioner_base_v3 { public: affinity_partitioner() {} private: template friend class serial::interface7::start_for; template friend class interface7::internal::start_for; template friend class interface7::internal::start_reduce; template friend class internal::start_scan; // backward compatibility - for parallel_scan only typedef interface7::internal::old_auto_partition_type partition_type; // new implementation just extends existing interface typedef interface7::internal::affinity_partition_type task_partition_type; // TODO: consider to make split_type public typedef interface7::internal::affinity_partition_type::split_type split_type; }; } // namespace tbb #if defined(_MSC_VER) && !defined(__INTEL_COMPILER) #pragma warning (pop) #endif // warning 4244 is back #undef __TBB_INITIAL_CHUNKS #undef __TBB_RANGE_POOL_CAPACITY #undef __TBB_INIT_DEPTH #endif /* __TBB_partitioner_H */ ================================================ FILE: benchmarks/tbb/pipeline.cpp ================================================ /* Copyright 2005-2014 Intel Corporation. All Rights Reserved. This file is part of Threading Building Blocks. Threading Building Blocks is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. Threading Building Blocks is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Threading Building Blocks; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA As a special exception, you may use this file as part of a free software library without restriction. Specifically, if other files instantiate templates or use macros or inline functions from this file, or you compile this file and link it with other files to produce an executable, this file does not by itself cause the resulting executable to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the executable file might be covered by the GNU General Public License. */ #include "tbb/pipeline.h" #include "tbb/spin_mutex.h" #include "tbb/cache_aligned_allocator.h" #include "itt_notify.h" #include "semaphore.h" #include "tls.h" // for parallel filters that do not use NULL as end_of_input namespace tbb { namespace internal { //! This structure is used to store task information in a input buffer struct task_info { void* my_object; //! Invalid unless a task went through an ordered stage. Token my_token; //! False until my_token is set. bool my_token_ready; //! True if my_object is valid. bool is_valid; //! Set to initial state (no object, no token) void reset() { my_object = NULL; my_token = 0; my_token_ready = false; is_valid = false; } }; //! A buffer of input items for a filter. /** Each item is a task_info, inserted into a position in the buffer corresponding to a Token. */ class input_buffer : no_copy { friend class tbb::internal::pipeline_root_task; friend class tbb::filter; friend class tbb::thread_bound_filter; friend class tbb::internal::stage_task; friend class tbb::pipeline; typedef Token size_type; //! Array of deferred tasks that cannot yet start executing. task_info* array; //! for thread-bound filter, semaphore for waiting, NULL otherwise. semaphore* my_sem; //! Size of array /** Always 0 or a power of 2 */ size_type array_size; //! Lowest token that can start executing. /** All prior Token have already been seen. */ Token low_token; //! Serializes updates. spin_mutex array_mutex; //! Resize "array". /** Caller is responsible to acquiring a lock on "array_mutex". */ void grow( size_type minimum_size ); //! Initial size for "array" /** Must be a power of 2 */ static const size_type initial_buffer_size = 4; //! Used for out of order buffer, and for assigning my_token if is_ordered and my_token not already assigned Token high_token; //! True for ordered filter, false otherwise. bool is_ordered; //! True for thread-bound filter, false otherwise. bool is_bound; //! for parallel filters that accepts NULLs, thread-local flag for reaching end_of_input typedef basic_tls end_of_input_tls_t; end_of_input_tls_t end_of_input_tls; bool end_of_input_tls_allocated; // no way to test pthread creation of TLS void create_sema(size_t initial_tokens) { __TBB_ASSERT(!my_sem,NULL); my_sem = new internal::semaphore(initial_tokens); } void free_sema() { __TBB_ASSERT(my_sem,NULL); delete my_sem; } void sema_P() { __TBB_ASSERT(my_sem,NULL); my_sem->P(); } void sema_V() { __TBB_ASSERT(my_sem,NULL); my_sem->V(); } public: //! Construct empty buffer. input_buffer( bool is_ordered_, bool is_bound_ ) : array(NULL), my_sem(NULL), array_size(0), low_token(0), high_token(0), is_ordered(is_ordered_), is_bound(is_bound_), end_of_input_tls_allocated(false) { grow(initial_buffer_size); __TBB_ASSERT( array, NULL ); if(is_bound) create_sema(0); } //! Destroy the buffer. ~input_buffer() { __TBB_ASSERT( array, NULL ); cache_aligned_allocator().deallocate(array,array_size); poison_pointer( array ); if(my_sem) { free_sema(); } if(end_of_input_tls_allocated) { destroy_my_tls(); } } //! Put a token into the buffer. /** If task information was placed into buffer, returns true; otherwise returns false, informing the caller to create and spawn a task. If input buffer owned by thread-bound filter and the item at low_token was not valid, issue a V() If the input_buffer is owned by a successor to a thread-bound filter, the force_put parameter should be true to ensure the token is inserted in the buffer. */ bool put_token( task_info& info_, bool force_put = false ) { { info_.is_valid = true; spin_mutex::scoped_lock lock( array_mutex ); Token token; bool was_empty = !array[low_token&(array_size-1)].is_valid; if( is_ordered ) { if( !info_.my_token_ready ) { info_.my_token = high_token++; info_.my_token_ready = true; } token = info_.my_token; } else token = high_token++; __TBB_ASSERT( (tokendiff_t)(token-low_token)>=0, NULL ); if( token!=low_token || is_bound || force_put ) { // Trying to put token that is beyond low_token. // Need to wait until low_token catches up before dispatching. if( token-low_token>=array_size ) grow( token-low_token+1 ); ITT_NOTIFY( sync_releasing, this ); array[token&(array_size-1)] = info_; if(was_empty && is_bound) { sema_V(); } return true; } } return false; } //! Note that processing of a token is finished. /** Fires up processing of the next token, if processing was deferred. */ // Using template to avoid explicit dependency on stage_task // this is only called for serial filters, and is the reason for the // advance parameter in return_item (we're incrementing low_token here.) // Non-TBF serial stages don't advance the token at the start because the presence // of the current token in the buffer keeps another stage from being spawned. template void note_done( Token token, StageTask& spawner ) { task_info wakee; wakee.reset(); { spin_mutex::scoped_lock lock( array_mutex ); if( !is_ordered || token==low_token ) { // Wake the next task task_info& item = array[++low_token & (array_size-1)]; ITT_NOTIFY( sync_acquired, this ); wakee = item; item.is_valid = false; } } if( wakee.is_valid ) spawner.spawn_stage_task(wakee); } #if __TBB_TASK_GROUP_CONTEXT //! The method destroys all data in filters to prevent memory leaks void clear( filter* my_filter ) { long t=low_token; for( size_type i=0; ifinalize(temp.my_object); temp.is_valid = false; } } } #endif //! return an item, invalidate the queued item, but only advance if advance // advance == true for parallel filters. If the filter is serial, leave the // item in the buffer to keep another stage from being spawned. bool return_item(task_info& info, bool advance) { spin_mutex::scoped_lock lock( array_mutex ); task_info& item = array[low_token&(array_size-1)]; ITT_NOTIFY( sync_acquired, this ); if( item.is_valid ) { info = item; item.is_valid = false; if (advance) low_token++; return true; } return false; } //! true if the current low_token is valid. bool has_item() { spin_mutex::scoped_lock lock(array_mutex); return array[low_token&(array_size -1)].is_valid; } // end_of_input signal for parallel_pipeline, parallel input filters with 0 tokens allowed. void create_my_tls() { int status = end_of_input_tls.create(); if(status) handle_perror(status, "TLS not allocated for filter"); end_of_input_tls_allocated = true; } void destroy_my_tls() { int status = end_of_input_tls.destroy(); if(status) handle_perror(status, "Failed to destroy filter TLS"); } bool my_tls_end_of_input() { return end_of_input_tls.get() != 0; } void set_my_tls_end_of_input() { end_of_input_tls.set(1); } }; void input_buffer::grow( size_type minimum_size ) { size_type old_size = array_size; size_type new_size = old_size ? 2*old_size : initial_buffer_size; while( new_size().allocate(new_size); task_info* old_array = array; for( size_type i=0; i().deallocate(old_array,old_size); } class stage_task: public task, public task_info { private: friend class tbb::pipeline; pipeline& my_pipeline; filter* my_filter; //! True if this task has not yet read the input. bool my_at_start; public: //! Construct stage_task for first stage in a pipeline. /** Such a stage has not read any input yet. */ stage_task( pipeline& pipeline ) : my_pipeline(pipeline), my_filter(pipeline.filter_list), my_at_start(true) { task_info::reset(); } //! Construct stage_task for a subsequent stage in a pipeline. stage_task( pipeline& pipeline, filter* filter_, const task_info& info ) : task_info(info), my_pipeline(pipeline), my_filter(filter_), my_at_start(false) {} //! Roughly equivalent to the constructor of input stage task void reset() { task_info::reset(); my_filter = my_pipeline.filter_list; my_at_start = true; } //! The virtual task execution method /*override*/ task* execute(); #if __TBB_TASK_GROUP_CONTEXT ~stage_task() { if (my_filter && my_object && (my_filter->my_filter_mode & filter::version_mask) >= __TBB_PIPELINE_VERSION(4)) { __TBB_ASSERT(is_cancelled(), "Trying to finalize the task that wasn't cancelled"); my_filter->finalize(my_object); my_object = NULL; } } #endif // __TBB_TASK_GROUP_CONTEXT //! Creates and spawns stage_task from task_info void spawn_stage_task(const task_info& info) { stage_task* clone = new (allocate_additional_child_of(*parent())) stage_task( my_pipeline, my_filter, info ); spawn(*clone); } }; task* stage_task::execute() { __TBB_ASSERT( !my_at_start || !my_object, NULL ); __TBB_ASSERT( !my_filter->is_bound(), NULL ); if( my_at_start ) { if( my_filter->is_serial() ) { my_object = (*my_filter)(my_object); if( my_object || ( my_filter->object_may_be_null() && !my_pipeline.end_of_input) ) { if( my_filter->is_ordered() ) { my_token = my_pipeline.token_counter++; // ideally, with relaxed semantics my_token_ready = true; } else if( (my_filter->my_filter_mode & my_filter->version_mask) >= __TBB_PIPELINE_VERSION(5) ) { if( my_pipeline.has_thread_bound_filters ) my_pipeline.token_counter++; // ideally, with relaxed semantics } if( !my_filter->next_filter_in_pipeline ) { // we're only filter in pipeline reset(); goto process_another_stage; } else { ITT_NOTIFY( sync_releasing, &my_pipeline.input_tokens ); if( --my_pipeline.input_tokens>0 ) spawn( *new( allocate_additional_child_of(*parent()) ) stage_task( my_pipeline ) ); } } else { my_pipeline.end_of_input = true; return NULL; } } else /*not is_serial*/ { if( my_pipeline.end_of_input ) return NULL; if( (my_filter->my_filter_mode & my_filter->version_mask) >= __TBB_PIPELINE_VERSION(5) ) { if( my_pipeline.has_thread_bound_filters ) my_pipeline.token_counter++; } ITT_NOTIFY( sync_releasing, &my_pipeline.input_tokens ); if( --my_pipeline.input_tokens>0 ) spawn( *new( allocate_additional_child_of(*parent()) ) stage_task( my_pipeline ) ); my_object = (*my_filter)(my_object); if( !my_object && (!my_filter->object_may_be_null() || my_filter->my_input_buffer->my_tls_end_of_input()) ) { my_pipeline.end_of_input = true; if( (my_filter->my_filter_mode & my_filter->version_mask) >= __TBB_PIPELINE_VERSION(5) ) { if( my_pipeline.has_thread_bound_filters ) my_pipeline.token_counter--; // fix token_counter } return NULL; } } my_at_start = false; } else { my_object = (*my_filter)(my_object); if( my_filter->is_serial() ) my_filter->my_input_buffer->note_done(my_token, *this); } my_filter = my_filter->next_filter_in_pipeline; if( my_filter ) { // There is another filter to execute. if( my_filter->is_serial() ) { // The next filter must execute tokens in order if( my_filter->my_input_buffer->put_token(*this) ){ // Can't proceed with the same item if( my_filter->is_bound() ) { // Find the next non-thread-bound filter do { my_filter = my_filter->next_filter_in_pipeline; } while( my_filter && my_filter->is_bound() ); // Check if there is an item ready to process if( my_filter && my_filter->my_input_buffer->return_item(*this, !my_filter->is_serial())) goto process_another_stage; } my_filter = NULL; // To prevent deleting my_object twice if exception occurs return NULL; } } } else { // Reached end of the pipe. size_t ntokens_avail = ++my_pipeline.input_tokens; if(my_pipeline.filter_list->is_bound() ) { if(ntokens_avail == 1) { my_pipeline.filter_list->my_input_buffer->sema_V(); } return NULL; } if( ntokens_avail>1 // Only recycle if there is one available token || my_pipeline.end_of_input ) { return NULL; // No need to recycle for new input } ITT_NOTIFY( sync_acquired, &my_pipeline.input_tokens ); // Recycle as an input stage task. reset(); } process_another_stage: /* A semi-hackish way to reexecute the same task object immediately without spawning. recycle_as_continuation marks the task for future execution, and then 'this' pointer is returned to bypass spawning. */ recycle_as_continuation(); return this; } class pipeline_root_task: public task { pipeline& my_pipeline; bool do_segment_scanning; /*override*/ task* execute() { if( !my_pipeline.end_of_input ) if( !my_pipeline.filter_list->is_bound() ) if( my_pipeline.input_tokens > 0 ) { recycle_as_continuation(); set_ref_count(1); return new( allocate_child() ) stage_task( my_pipeline ); } if( do_segment_scanning ) { filter* current_filter = my_pipeline.filter_list->next_segment; /* first non-thread-bound filter that follows thread-bound one and may have valid items to process */ filter* first_suitable_filter = current_filter; while( current_filter ) { __TBB_ASSERT( !current_filter->is_bound(), "filter is thread-bound?" ); __TBB_ASSERT( current_filter->prev_filter_in_pipeline->is_bound(), "previous filter is not thread-bound?" ); if( !my_pipeline.end_of_input || current_filter->has_more_work()) { task_info info; info.reset(); if( current_filter->my_input_buffer->return_item(info, !current_filter->is_serial()) ) { set_ref_count(1); recycle_as_continuation(); return new( allocate_child() ) stage_task( my_pipeline, current_filter, info); } current_filter = current_filter->next_segment; if( !current_filter ) { if( !my_pipeline.end_of_input ) { recycle_as_continuation(); return this; } current_filter = first_suitable_filter; __TBB_Yield(); } } else { /* The preceding pipeline segment is empty. Fast-forward to the next post-TBF segment. */ first_suitable_filter = first_suitable_filter->next_segment; current_filter = first_suitable_filter; } } /* while( current_filter ) */ return NULL; } else { if( !my_pipeline.end_of_input ) { recycle_as_continuation(); return this; } return NULL; } } public: pipeline_root_task( pipeline& pipeline ): my_pipeline(pipeline), do_segment_scanning(false) { __TBB_ASSERT( my_pipeline.filter_list, NULL ); filter* first = my_pipeline.filter_list; if( (first->my_filter_mode & first->version_mask) >= __TBB_PIPELINE_VERSION(5) ) { // Scanning the pipeline for segments filter* head_of_previous_segment = first; for( filter* subfilter=first->next_filter_in_pipeline; subfilter!=NULL; subfilter=subfilter->next_filter_in_pipeline ) { if( subfilter->prev_filter_in_pipeline->is_bound() && !subfilter->is_bound() ) { do_segment_scanning = true; head_of_previous_segment->next_segment = subfilter; head_of_previous_segment = subfilter; } } } } }; #if _MSC_VER && !defined(__INTEL_COMPILER) // Workaround for overzealous compiler warnings // Suppress compiler warning about constant conditional expression #pragma warning (disable: 4127) #endif // The class destroys end_counter and clears all input buffers if pipeline was cancelled. class pipeline_cleaner: internal::no_copy { pipeline& my_pipeline; public: pipeline_cleaner(pipeline& _pipeline) : my_pipeline(_pipeline) {} ~pipeline_cleaner(){ #if __TBB_TASK_GROUP_CONTEXT if (my_pipeline.end_counter->is_cancelled()) // Pipeline was cancelled my_pipeline.clear_filters(); #endif my_pipeline.end_counter = NULL; } }; } // namespace internal void pipeline::inject_token( task& ) { __TBB_ASSERT(false,"illegal call to inject_token"); } #if __TBB_TASK_GROUP_CONTEXT void pipeline::clear_filters() { for( filter* f = filter_list; f; f = f->next_filter_in_pipeline ) { if ((f->my_filter_mode & filter::version_mask) >= __TBB_PIPELINE_VERSION(4)) if( internal::input_buffer* b = f->my_input_buffer ) b->clear(f); } } #endif pipeline::pipeline() : filter_list(NULL), filter_end(NULL), end_counter(NULL), end_of_input(false), has_thread_bound_filters(false) { token_counter = 0; input_tokens = 0; } pipeline::~pipeline() { clear(); } void pipeline::clear() { filter* next; for( filter* f = filter_list; f; f=next ) { if( internal::input_buffer* b = f->my_input_buffer ) { delete b; f->my_input_buffer = NULL; } next=f->next_filter_in_pipeline; f->next_filter_in_pipeline = filter::not_in_pipeline(); if ( (f->my_filter_mode & filter::version_mask) >= __TBB_PIPELINE_VERSION(3) ) { f->prev_filter_in_pipeline = filter::not_in_pipeline(); f->my_pipeline = NULL; } if ( (f->my_filter_mode & filter::version_mask) >= __TBB_PIPELINE_VERSION(5) ) f->next_segment = NULL; } filter_list = filter_end = NULL; } void pipeline::add_filter( filter& filter_ ) { #if TBB_USE_ASSERT if ( (filter_.my_filter_mode & filter::version_mask) >= __TBB_PIPELINE_VERSION(3) ) __TBB_ASSERT( filter_.prev_filter_in_pipeline==filter::not_in_pipeline(), "filter already part of pipeline?" ); __TBB_ASSERT( filter_.next_filter_in_pipeline==filter::not_in_pipeline(), "filter already part of pipeline?" ); __TBB_ASSERT( !end_counter, "invocation of add_filter on running pipeline" ); #endif if ( (filter_.my_filter_mode & filter::version_mask) >= __TBB_PIPELINE_VERSION(3) ) { filter_.my_pipeline = this; filter_.prev_filter_in_pipeline = filter_end; if ( filter_list == NULL) filter_list = &filter_; else filter_end->next_filter_in_pipeline = &filter_; filter_.next_filter_in_pipeline = NULL; filter_end = &filter_; } else { if( !filter_end ) filter_end = reinterpret_cast(&filter_list); *reinterpret_cast(filter_end) = &filter_; filter_end = reinterpret_cast(&filter_.next_filter_in_pipeline); *reinterpret_cast(filter_end) = NULL; } if( (filter_.my_filter_mode & filter_.version_mask) >= __TBB_PIPELINE_VERSION(5) ) { if( filter_.is_serial() ) { if( filter_.is_bound() ) has_thread_bound_filters = true; filter_.my_input_buffer = new internal::input_buffer( filter_.is_ordered(), filter_.is_bound() ); } else { if(filter_.prev_filter_in_pipeline) { if(filter_.prev_filter_in_pipeline->is_bound()) { // successors to bound filters must have an input_buffer filter_.my_input_buffer = new internal::input_buffer( /*is_ordered*/false, false ); } } else { // input filter if(filter_.object_may_be_null() ) { //TODO: buffer only needed to hold TLS; could improve filter_.my_input_buffer = new internal::input_buffer( /*is_ordered*/false, false ); filter_.my_input_buffer->create_my_tls(); } } } } else { if( filter_.is_serial() ) { filter_.my_input_buffer = new internal::input_buffer( filter_.is_ordered(), false ); } } } void pipeline::remove_filter( filter& filter_ ) { __TBB_ASSERT( filter_.prev_filter_in_pipeline!=filter::not_in_pipeline(), "filter not part of pipeline" ); __TBB_ASSERT( filter_.next_filter_in_pipeline!=filter::not_in_pipeline(), "filter not part of pipeline" ); __TBB_ASSERT( !end_counter, "invocation of remove_filter on running pipeline" ); if (&filter_ == filter_list) filter_list = filter_.next_filter_in_pipeline; else { __TBB_ASSERT( filter_.prev_filter_in_pipeline, "filter list broken?" ); filter_.prev_filter_in_pipeline->next_filter_in_pipeline = filter_.next_filter_in_pipeline; } if (&filter_ == filter_end) filter_end = filter_.prev_filter_in_pipeline; else { __TBB_ASSERT( filter_.next_filter_in_pipeline, "filter list broken?" ); filter_.next_filter_in_pipeline->prev_filter_in_pipeline = filter_.prev_filter_in_pipeline; } if( internal::input_buffer* b = filter_.my_input_buffer ) { delete b; filter_.my_input_buffer = NULL; } filter_.next_filter_in_pipeline = filter_.prev_filter_in_pipeline = filter::not_in_pipeline(); if ( (filter_.my_filter_mode & filter::version_mask) >= __TBB_PIPELINE_VERSION(5) ) filter_.next_segment = NULL; filter_.my_pipeline = NULL; } void pipeline::run( size_t max_number_of_live_tokens #if __TBB_TASK_GROUP_CONTEXT , tbb::task_group_context& context #endif ) { __TBB_ASSERT( max_number_of_live_tokens>0, "pipeline::run must have at least one token" ); __TBB_ASSERT( !end_counter, "pipeline already running?" ); if( filter_list ) { internal::pipeline_cleaner my_pipeline_cleaner(*this); end_of_input = false; input_tokens = internal::Token(max_number_of_live_tokens); if(has_thread_bound_filters) { // release input filter if thread-bound if(filter_list->is_bound()) { filter_list->my_input_buffer->sema_V(); } } #if __TBB_TASK_GROUP_CONTEXT end_counter = new( task::allocate_root(context) ) internal::pipeline_root_task( *this ); #else end_counter = new( task::allocate_root() ) internal::pipeline_root_task( *this ); #endif // Start execution of tasks task::spawn_root_and_wait( *end_counter ); if(has_thread_bound_filters) { for(filter* f = filter_list->next_filter_in_pipeline; f; f=f->next_filter_in_pipeline) { if(f->is_bound()) { f->my_input_buffer->sema_V(); // wake to end } } } } } #if __TBB_TASK_GROUP_CONTEXT void pipeline::run( size_t max_number_of_live_tokens ) { if( filter_list ) { // Construct task group context with the exception propagation mode expected // by the pipeline caller. uintptr_t ctx_traits = filter_list->my_filter_mode & filter::exact_exception_propagation ? task_group_context::default_traits : task_group_context::default_traits & ~task_group_context::exact_exception; task_group_context context(task_group_context::bound, ctx_traits); run(max_number_of_live_tokens, context); } } #endif // __TBB_TASK_GROUP_CONTEXT bool filter::has_more_work() { __TBB_ASSERT(my_pipeline, NULL); __TBB_ASSERT(my_input_buffer, "has_more_work() called for filter with no input buffer"); return (internal::tokendiff_t)(my_pipeline->token_counter - my_input_buffer->low_token) != 0; } filter::~filter() { if ( (my_filter_mode & version_mask) >= __TBB_PIPELINE_VERSION(3) ) { if ( next_filter_in_pipeline != filter::not_in_pipeline() ) my_pipeline->remove_filter(*this); else __TBB_ASSERT( prev_filter_in_pipeline == filter::not_in_pipeline(), "probably filter list is broken" ); } else { __TBB_ASSERT( next_filter_in_pipeline==filter::not_in_pipeline(), "cannot destroy filter that is part of pipeline" ); } } void filter::set_end_of_input() { __TBB_ASSERT(my_input_buffer, NULL); __TBB_ASSERT(object_may_be_null(), NULL); if(is_serial()) { my_pipeline->end_of_input = true; } else { __TBB_ASSERT(my_input_buffer->end_of_input_tls_allocated, NULL); my_input_buffer->set_my_tls_end_of_input(); } } thread_bound_filter::result_type thread_bound_filter::process_item() { return internal_process_item(true); } thread_bound_filter::result_type thread_bound_filter::try_process_item() { return internal_process_item(false); } thread_bound_filter::result_type thread_bound_filter::internal_process_item(bool is_blocking) { __TBB_ASSERT(my_pipeline != NULL,"It's not supposed that process_item is called for a filter that is not in a pipeline."); internal::task_info info; info.reset(); if( my_pipeline->end_of_input && !has_more_work() ) return end_of_stream; if( !prev_filter_in_pipeline ) { if( my_pipeline->end_of_input ) return end_of_stream; while( my_pipeline->input_tokens == 0 ) { if( !is_blocking ) return item_not_available; my_input_buffer->sema_P(); } info.my_object = (*this)(info.my_object); if( info.my_object ) { __TBB_ASSERT(my_pipeline->input_tokens > 0, "Token failed in thread-bound filter"); my_pipeline->input_tokens--; if( is_ordered() ) { info.my_token = my_pipeline->token_counter; info.my_token_ready = true; } my_pipeline->token_counter++; // ideally, with relaxed semantics } else { my_pipeline->end_of_input = true; return end_of_stream; } } else { /* this is not an input filter */ while( !my_input_buffer->has_item() ) { if( !is_blocking ) { return item_not_available; } my_input_buffer->sema_P(); if( my_pipeline->end_of_input && !has_more_work() ) { return end_of_stream; } } if( !my_input_buffer->return_item(info, /*advance*/true) ) { __TBB_ASSERT(false,"return_item failed"); } info.my_object = (*this)(info.my_object); } if( next_filter_in_pipeline ) { if ( !next_filter_in_pipeline->my_input_buffer->put_token(info,/*force_put=*/true) ) { __TBB_ASSERT(false, "Couldn't put token after thread-bound buffer"); } } else { size_t ntokens_avail = ++(my_pipeline->input_tokens); if( my_pipeline->filter_list->is_bound() ) { if( ntokens_avail == 1 ) { my_pipeline->filter_list->my_input_buffer->sema_V(); } } } return success; } } // tbb ================================================ FILE: benchmarks/tbb/pipeline.h ================================================ /* Copyright 2005-2014 Intel Corporation. All Rights Reserved. This file is part of Threading Building Blocks. Threading Building Blocks is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. Threading Building Blocks is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Threading Building Blocks; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA As a special exception, you may use this file as part of a free software library without restriction. Specifically, if other files instantiate templates or use macros or inline functions from this file, or you compile this file and link it with other files to produce an executable, this file does not by itself cause the resulting executable to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the executable file might be covered by the GNU General Public License. */ #ifndef __TBB_pipeline_H #define __TBB_pipeline_H #include "atomic.h" #include "task.h" #include "tbb_allocator.h" #include #if __TBB_CPP11_TYPE_PROPERTIES_PRESENT || __TBB_TR1_TYPE_PROPERTIES_IN_STD_PRESENT #include #endif namespace tbb { class pipeline; class filter; //! @cond INTERNAL namespace internal { // The argument for PIPELINE_VERSION should be an integer between 2 and 9 #define __TBB_PIPELINE_VERSION(x) ((unsigned char)(x-2)<<1) typedef unsigned long Token; typedef long tokendiff_t; class stage_task; class input_buffer; class pipeline_root_task; class pipeline_cleaner; } // namespace internal namespace interface6 { template class filter_t; namespace internal { class pipeline_proxy; } } //! @endcond //! A stage in a pipeline. /** @ingroup algorithms */ class filter: internal::no_copy { private: //! Value used to mark "not in pipeline" static filter* not_in_pipeline() {return reinterpret_cast(intptr_t(-1));} protected: //! The lowest bit 0 is for parallel vs. serial static const unsigned char filter_is_serial = 0x1; //! 4th bit distinguishes ordered vs unordered filters. /** The bit was not set for parallel filters in TBB 2.1 and earlier, but is_ordered() function always treats parallel filters as out of order. */ static const unsigned char filter_is_out_of_order = 0x1<<4; //! 5th bit distinguishes thread-bound and regular filters. static const unsigned char filter_is_bound = 0x1<<5; //! 6th bit marks input filters emitting small objects static const unsigned char filter_may_emit_null = 0x1<<6; //! 7th bit defines exception propagation mode expected by the application. static const unsigned char exact_exception_propagation = #if TBB_USE_CAPTURED_EXCEPTION 0x0; #else 0x1<<7; #endif /* TBB_USE_CAPTURED_EXCEPTION */ static const unsigned char current_version = __TBB_PIPELINE_VERSION(5); static const unsigned char version_mask = 0x7<<1; // bits 1-3 are for version public: enum mode { //! processes multiple items in parallel and in no particular order parallel = current_version | filter_is_out_of_order, //! processes items one at a time; all such filters process items in the same order serial_in_order = current_version | filter_is_serial, //! processes items one at a time and in no particular order serial_out_of_order = current_version | filter_is_serial | filter_is_out_of_order, //! @deprecated use serial_in_order instead serial = serial_in_order }; protected: filter( bool is_serial_ ) : next_filter_in_pipeline(not_in_pipeline()), my_input_buffer(NULL), my_filter_mode(static_cast((is_serial_ ? serial : parallel) | exact_exception_propagation)), prev_filter_in_pipeline(not_in_pipeline()), my_pipeline(NULL), next_segment(NULL) {} filter( mode filter_mode ) : next_filter_in_pipeline(not_in_pipeline()), my_input_buffer(NULL), my_filter_mode(static_cast(filter_mode | exact_exception_propagation)), prev_filter_in_pipeline(not_in_pipeline()), my_pipeline(NULL), next_segment(NULL) {} // signal end-of-input for concrete_filters void __TBB_EXPORTED_METHOD set_end_of_input(); public: //! True if filter is serial. bool is_serial() const { return bool( my_filter_mode & filter_is_serial ); } //! True if filter must receive stream in order. bool is_ordered() const { return (my_filter_mode & (filter_is_out_of_order|filter_is_serial))==filter_is_serial; } //! True if filter is thread-bound. bool is_bound() const { return ( my_filter_mode & filter_is_bound )==filter_is_bound; } //! true if an input filter can emit null bool object_may_be_null() { return ( my_filter_mode & filter_may_emit_null ) == filter_may_emit_null; } //! Operate on an item from the input stream, and return item for output stream. /** Returns NULL if filter is a sink. */ virtual void* operator()( void* item ) = 0; //! Destroy filter. /** If the filter was added to a pipeline, the pipeline must be destroyed first. */ virtual __TBB_EXPORTED_METHOD ~filter(); #if __TBB_TASK_GROUP_CONTEXT //! Destroys item if pipeline was cancelled. /** Required to prevent memory leaks. Note it can be called concurrently even for serial filters.*/ virtual void finalize( void* /*item*/ ) {}; #endif private: //! Pointer to next filter in the pipeline. filter* next_filter_in_pipeline; //! has the filter not yet processed all the tokens it will ever see? // (pipeline has not yet reached end_of_input or this filter has not yet // seen the last token produced by input_filter) bool has_more_work(); //! Buffer for incoming tokens, or NULL if not required. /** The buffer is required if the filter is serial or follows a thread-bound one. */ internal::input_buffer* my_input_buffer; friend class internal::stage_task; friend class internal::pipeline_root_task; friend class pipeline; friend class thread_bound_filter; //! Storage for filter mode and dynamically checked implementation version. const unsigned char my_filter_mode; //! Pointer to previous filter in the pipeline. filter* prev_filter_in_pipeline; //! Pointer to the pipeline. pipeline* my_pipeline; //! Pointer to the next "segment" of filters, or NULL if not required. /** In each segment, the first filter is not thread-bound but follows a thread-bound one. */ filter* next_segment; }; //! A stage in a pipeline served by a user thread. /** @ingroup algorithms */ class thread_bound_filter: public filter { public: enum result_type { // item was processed success, // item is currently not available item_not_available, // there are no more items to process end_of_stream }; protected: thread_bound_filter(mode filter_mode): filter(static_cast(filter_mode | filter::filter_is_bound)) { __TBB_ASSERT(filter_mode & filter::filter_is_serial, "thread-bound filters must be serial"); } public: //! If a data item is available, invoke operator() on that item. /** This interface is non-blocking. Returns 'success' if an item was processed. Returns 'item_not_available' if no item can be processed now but more may arrive in the future, or if token limit is reached. Returns 'end_of_stream' if there are no more items to process. */ result_type __TBB_EXPORTED_METHOD try_process_item(); //! Wait until a data item becomes available, and invoke operator() on that item. /** This interface is blocking. Returns 'success' if an item was processed. Returns 'end_of_stream' if there are no more items to process. Never returns 'item_not_available', as it blocks until another return condition applies. */ result_type __TBB_EXPORTED_METHOD process_item(); private: //! Internal routine for item processing result_type internal_process_item(bool is_blocking); }; //! A processing pipeline that applies filters to items. /** @ingroup algorithms */ class pipeline { public: //! Construct empty pipeline. __TBB_EXPORTED_METHOD pipeline(); /** Though the current implementation declares the destructor virtual, do not rely on this detail. The virtualness is deprecated and may disappear in future versions of TBB. */ virtual __TBB_EXPORTED_METHOD ~pipeline(); //! Add filter to end of pipeline. void __TBB_EXPORTED_METHOD add_filter( filter& filter_ ); //! Run the pipeline to completion. void __TBB_EXPORTED_METHOD run( size_t max_number_of_live_tokens ); #if __TBB_TASK_GROUP_CONTEXT //! Run the pipeline to completion with user-supplied context. void __TBB_EXPORTED_METHOD run( size_t max_number_of_live_tokens, tbb::task_group_context& context ); #endif //! Remove all filters from the pipeline. void __TBB_EXPORTED_METHOD clear(); private: friend class internal::stage_task; friend class internal::pipeline_root_task; friend class filter; friend class thread_bound_filter; friend class internal::pipeline_cleaner; friend class tbb::interface6::internal::pipeline_proxy; //! Pointer to first filter in the pipeline. filter* filter_list; //! Pointer to location where address of next filter to be added should be stored. filter* filter_end; //! task who's reference count is used to determine when all stages are done. task* end_counter; //! Number of idle tokens waiting for input stage. atomic input_tokens; //! Global counter of tokens atomic token_counter; //! False until fetch_input returns NULL. bool end_of_input; //! True if the pipeline contains a thread-bound filter; false otherwise. bool has_thread_bound_filters; //! Remove filter from pipeline. void remove_filter( filter& filter_ ); //! Not used, but retained to satisfy old export files. void __TBB_EXPORTED_METHOD inject_token( task& self ); #if __TBB_TASK_GROUP_CONTEXT //! Does clean up if pipeline is cancelled or exception occurred void clear_filters(); #endif }; //------------------------------------------------------------------------ // Support for lambda-friendly parallel_pipeline interface //------------------------------------------------------------------------ namespace interface6 { namespace internal { template class concrete_filter; } //! input_filter control to signal end-of-input for parallel_pipeline class flow_control { bool is_pipeline_stopped; flow_control() { is_pipeline_stopped = false; } template friend class internal::concrete_filter; public: void stop() { is_pipeline_stopped = true; } }; //! @cond INTERNAL namespace internal { template struct tbb_large_object {enum { value = sizeof(T) > sizeof(void *) }; }; // Obtain type properties in one or another way #if __TBB_CPP11_TYPE_PROPERTIES_PRESENT template struct tbb_trivially_copyable { enum { value = std::is_trivially_copyable::value }; }; #elif __TBB_TR1_TYPE_PROPERTIES_IN_STD_PRESENT template struct tbb_trivially_copyable { enum { value = std::has_trivial_copy_constructor::value }; }; #else // Explicitly list the types we wish to be placed as-is in the pipeline input_buffers. template struct tbb_trivially_copyable { enum { value = false }; }; template struct tbb_trivially_copyable { enum { value = true }; }; template<> struct tbb_trivially_copyable { enum { value = true }; }; template<> struct tbb_trivially_copyable { enum { value = true }; }; template<> struct tbb_trivially_copyable { enum { value = !tbb_large_object::value }; }; template<> struct tbb_trivially_copyable { enum { value = !tbb_large_object::value }; }; template<> struct tbb_trivially_copyable { enum { value = !tbb_large_object::value }; }; template<> struct tbb_trivially_copyable { enum { value = !tbb_large_object::value }; }; template<> struct tbb_trivially_copyable { enum { value = !tbb_large_object::value }; }; template<> struct tbb_trivially_copyable { enum { value = !tbb_large_object::value }; }; #endif // Obtaining type properties template struct is_large_object {enum { value = tbb_large_object::value || !tbb_trivially_copyable::value }; }; template class token_helper; // large object helper (uses tbb_allocator) template class token_helper { public: typedef typename tbb::tbb_allocator allocator; typedef T* pointer; typedef T value_type; static pointer create_token(const value_type & source) { pointer output_t = allocator().allocate(1); return new (output_t) T(source); } static value_type & token(pointer & t) { return *t;} static void * cast_to_void_ptr(pointer ref) { return (void *) ref; } static pointer cast_from_void_ptr(void * ref) { return (pointer)ref; } static void destroy_token(pointer token) { allocator().destroy(token); allocator().deallocate(token,1); } }; // pointer specialization template class token_helper { public: typedef T* pointer; typedef T* value_type; static pointer create_token(const value_type & source) { return source; } static value_type & token(pointer & t) { return t;} static void * cast_to_void_ptr(pointer ref) { return (void *)ref; } static pointer cast_from_void_ptr(void * ref) { return (pointer)ref; } static void destroy_token( pointer /*token*/) {} }; // small object specialization (converts void* to the correct type, passes objects directly.) template class token_helper { typedef union { T actual_value; void * void_overlay; } type_to_void_ptr_map; public: typedef T pointer; // not really a pointer in this case. typedef T value_type; static pointer create_token(const value_type & source) { return source; } static value_type & token(pointer & t) { return t;} static void * cast_to_void_ptr(pointer ref) { type_to_void_ptr_map mymap; mymap.void_overlay = NULL; mymap.actual_value = ref; return mymap.void_overlay; } static pointer cast_from_void_ptr(void * ref) { type_to_void_ptr_map mymap; mymap.void_overlay = ref; return mymap.actual_value; } static void destroy_token( pointer /*token*/) {} }; template class concrete_filter: public tbb::filter { const Body& my_body; typedef token_helper::value > t_helper; typedef typename t_helper::pointer t_pointer; typedef token_helper::value > u_helper; typedef typename u_helper::pointer u_pointer; /*override*/ void* operator()(void* input) { t_pointer temp_input = t_helper::cast_from_void_ptr(input); u_pointer output_u = u_helper::create_token(my_body(t_helper::token(temp_input))); t_helper::destroy_token(temp_input); return u_helper::cast_to_void_ptr(output_u); } /*override*/ void finalize(void * input) { t_pointer temp_input = t_helper::cast_from_void_ptr(input); t_helper::destroy_token(temp_input); } public: concrete_filter(tbb::filter::mode filter_mode, const Body& body) : filter(filter_mode), my_body(body) {} }; // input template class concrete_filter: public filter { const Body& my_body; typedef token_helper::value > u_helper; typedef typename u_helper::pointer u_pointer; /*override*/void* operator()(void*) { flow_control control; u_pointer output_u = u_helper::create_token(my_body(control)); if(control.is_pipeline_stopped) { u_helper::destroy_token(output_u); set_end_of_input(); return NULL; } return u_helper::cast_to_void_ptr(output_u); } public: concrete_filter(tbb::filter::mode filter_mode, const Body& body) : filter(static_cast(filter_mode | filter_may_emit_null)), my_body(body) {} }; template class concrete_filter: public filter { const Body& my_body; typedef token_helper::value > t_helper; typedef typename t_helper::pointer t_pointer; /*override*/ void* operator()(void* input) { t_pointer temp_input = t_helper::cast_from_void_ptr(input); my_body(t_helper::token(temp_input)); t_helper::destroy_token(temp_input); return NULL; } /*override*/ void finalize(void* input) { t_pointer temp_input = t_helper::cast_from_void_ptr(input); t_helper::destroy_token(temp_input); } public: concrete_filter(tbb::filter::mode filter_mode, const Body& body) : filter(filter_mode), my_body(body) {} }; template class concrete_filter: public filter { const Body& my_body; /** Override privately because it is always called virtually */ /*override*/ void* operator()(void*) { flow_control control; my_body(control); void* output = control.is_pipeline_stopped ? NULL : (void*)(intptr_t)-1; return output; } public: concrete_filter(filter::mode filter_mode, const Body& body) : filter(filter_mode), my_body(body) {} }; //! The class that represents an object of the pipeline for parallel_pipeline(). /** It primarily serves as RAII class that deletes heap-allocated filter instances. */ class pipeline_proxy { tbb::pipeline my_pipe; public: pipeline_proxy( const filter_t& filter_chain ); ~pipeline_proxy() { while( filter* f = my_pipe.filter_list ) delete f; // filter destructor removes it from the pipeline } tbb::pipeline* operator->() { return &my_pipe; } }; //! Abstract base class that represents a node in a parse tree underlying a filter_t. /** These nodes are always heap-allocated and can be shared by filter_t objects. */ class filter_node: tbb::internal::no_copy { /** Count must be atomic because it is hidden state for user, but might be shared by threads. */ tbb::atomic ref_count; protected: filter_node() { ref_count = 0; #ifdef __TBB_TEST_FILTER_NODE_COUNT ++(__TBB_TEST_FILTER_NODE_COUNT); #endif } public: //! Add concrete_filter to pipeline virtual void add_to( pipeline& ) = 0; //! Increment reference count void add_ref() {++ref_count;} //! Decrement reference count and delete if it becomes zero. void remove_ref() { __TBB_ASSERT(ref_count>0,"ref_count underflow"); if( --ref_count==0 ) delete this; } virtual ~filter_node() { #ifdef __TBB_TEST_FILTER_NODE_COUNT --(__TBB_TEST_FILTER_NODE_COUNT); #endif } }; //! Node in parse tree representing result of make_filter. template class filter_node_leaf: public filter_node { const tbb::filter::mode mode; const Body body; /*override*/void add_to( pipeline& p ) { concrete_filter* f = new concrete_filter(mode,body); p.add_filter( *f ); } public: filter_node_leaf( tbb::filter::mode m, const Body& b ) : mode(m), body(b) {} }; //! Node in parse tree representing join of two filters. class filter_node_join: public filter_node { friend class filter_node; // to suppress GCC 3.2 warnings filter_node& left; filter_node& right; /*override*/~filter_node_join() { left.remove_ref(); right.remove_ref(); } /*override*/void add_to( pipeline& p ) { left.add_to(p); right.add_to(p); } public: filter_node_join( filter_node& x, filter_node& y ) : left(x), right(y) { left.add_ref(); right.add_ref(); } }; } // namespace internal //! @endcond //! Create a filter to participate in parallel_pipeline template filter_t make_filter(tbb::filter::mode mode, const Body& body) { return new internal::filter_node_leaf(mode, body); } template filter_t operator& (const filter_t& left, const filter_t& right) { __TBB_ASSERT(left.root,"cannot use default-constructed filter_t as left argument of '&'"); __TBB_ASSERT(right.root,"cannot use default-constructed filter_t as right argument of '&'"); return new internal::filter_node_join(*left.root,*right.root); } //! Class representing a chain of type-safe pipeline filters template class filter_t { typedef internal::filter_node filter_node; filter_node* root; filter_t( filter_node* root_ ) : root(root_) { root->add_ref(); } friend class internal::pipeline_proxy; template friend filter_t make_filter(tbb::filter::mode, const Body& ); template friend filter_t operator& (const filter_t& , const filter_t& ); public: filter_t() : root(NULL) {} filter_t( const filter_t& rhs ) : root(rhs.root) { if( root ) root->add_ref(); } template filter_t( tbb::filter::mode mode, const Body& body ) : root( new internal::filter_node_leaf(mode, body) ) { root->add_ref(); } void operator=( const filter_t& rhs ) { // Order of operations below carefully chosen so that reference counts remain correct // in unlikely event that remove_ref throws exception. filter_node* old = root; root = rhs.root; if( root ) root->add_ref(); if( old ) old->remove_ref(); } ~filter_t() { if( root ) root->remove_ref(); } void clear() { // Like operator= with filter_t() on right side. if( root ) { filter_node* old = root; root = NULL; old->remove_ref(); } } }; inline internal::pipeline_proxy::pipeline_proxy( const filter_t& filter_chain ) : my_pipe() { __TBB_ASSERT( filter_chain.root, "cannot apply parallel_pipeline to default-constructed filter_t" ); filter_chain.root->add_to(my_pipe); } inline void parallel_pipeline(size_t max_number_of_live_tokens, const filter_t& filter_chain #if __TBB_TASK_GROUP_CONTEXT , tbb::task_group_context& context #endif ) { internal::pipeline_proxy pipe(filter_chain); // tbb::pipeline::run() is called via the proxy pipe->run(max_number_of_live_tokens #if __TBB_TASK_GROUP_CONTEXT , context #endif ); } #if __TBB_TASK_GROUP_CONTEXT inline void parallel_pipeline(size_t max_number_of_live_tokens, const filter_t& filter_chain) { tbb::task_group_context context; parallel_pipeline(max_number_of_live_tokens, filter_chain, context); } #endif // __TBB_TASK_GROUP_CONTEXT } // interface6 using interface6::flow_control; using interface6::filter_t; using interface6::make_filter; using interface6::parallel_pipeline; } // tbb #endif /* __TBB_pipeline_H */ ================================================ FILE: benchmarks/tbb/private_server.cpp ================================================ /* Copyright 2005-2014 Intel Corporation. All Rights Reserved. This file is part of Threading Building Blocks. Threading Building Blocks is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. Threading Building Blocks is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Threading Building Blocks; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA As a special exception, you may use this file as part of a free software library without restriction. Specifically, if other files instantiate templates or use macros or inline functions from this file, or you compile this file and link it with other files to produce an executable, this file does not by itself cause the resulting executable to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the executable file might be covered by the GNU General Public License. */ #include "rml_tbb.h" #include "../server/thread_monitor.h" #include "tbb/atomic.h" #include "tbb/cache_aligned_allocator.h" #include "scheduler_common.h" #include "governor.h" #include "tbb_misc.h" using rml::internal::thread_monitor; namespace tbb { namespace internal { namespace rml { typedef thread_monitor::handle_type thread_handle; class private_server; class private_worker: no_copy { //! State in finite-state machine that controls the worker. /** State diagram: init --> starting --> normal | | | | V | \------> quit <------/ */ enum state_t { //! *this is initialized st_init, //! *this has associated thread that is starting up. st_starting, //! Associated thread is doing normal life sequence. st_normal, //! Associated thread has ended normal life sequence and promises to never touch *this again. st_quit }; atomic my_state; //! Associated server private_server& my_server; //! Associated client tbb_client& my_client; //! index used for avoiding the 64K aliasing problem const size_t my_index; //! Monitor for sleeping when there is no work to do. /** The invariant that holds for sleeping workers is: "my_slack<=0 && my_state==st_normal && I am on server's list of asleep threads" */ thread_monitor my_thread_monitor; //! Handle of the OS thread associated with this worker thread_handle my_handle; //! Link for list of workers that are sleeping or have no associated thread. private_worker* my_next; friend class private_server; //! Actions executed by the associated thread void run(); //! Wake up associated thread (or launch a thread if there is none) void wake_or_launch(); //! Called by a thread (usually not the associated thread) to commence termination. void start_shutdown(); static __RML_DECL_THREAD_ROUTINE thread_routine( void* arg ); static void release_handle(thread_handle my_handle); protected: private_worker( private_server& server, tbb_client& client, const size_t i ) : my_server(server), my_client(client), my_index(i) { my_state = st_init; } }; static const size_t cache_line_size = tbb::internal::NFS_MaxLineSize; #if _MSC_VER && !defined(__INTEL_COMPILER) // Suppress overzealous compiler warnings about uninstantiable class #pragma warning(push) #pragma warning(disable:4510 4610) #endif class padded_private_worker: public private_worker { char pad[cache_line_size - sizeof(private_worker)%cache_line_size]; public: padded_private_worker( private_server& server, tbb_client& client, const size_t i ) : private_worker(server,client,i) { suppress_unused_warning(pad); } }; #if _MSC_VER && !defined(__INTEL_COMPILER) #pragma warning(pop) #endif class private_server: public tbb_server, no_copy { tbb_client& my_client; //! Maximum number of threads to be created. /** Threads are created lazily, so maximum might not actually be reached. */ const tbb_client::size_type my_n_thread; //! Stack size for each thread. */ const size_t my_stack_size; //! Number of jobs that could use their associated thread minus number of active threads. /** If negative, indicates oversubscription. If positive, indicates that more threads should run. Can be lowered asynchronously, but must be raised only while holding my_asleep_list_mutex, because raising it impacts the invariant for sleeping threads. */ atomic my_slack; //! Counter used to determine when to delete this. atomic my_ref_count; padded_private_worker* my_thread_array; //! List of workers that are asleep or committed to sleeping until notified by another thread. tbb::atomic my_asleep_list_root; //! Protects my_asleep_list_root typedef scheduler_mutex_type asleep_list_mutex_type; asleep_list_mutex_type my_asleep_list_mutex; #if TBB_USE_ASSERT atomic my_net_slack_requests; #endif /* TBB_USE_ASSERT */ //! Wake up to two sleeping workers, if there are any sleeping. /** The call is used to propagate a chain reaction where each thread wakes up two threads, which in turn each wake up two threads, etc. */ void propagate_chain_reaction() { // First test of a double-check idiom. Second test is inside wake_some(0). if( my_asleep_list_root ) wake_some(0); } //! Try to add t to list of sleeping workers bool try_insert_in_asleep_list( private_worker& t ); //! Equivalent of adding additional_slack to my_slack and waking up to 2 threads if my_slack permits. void wake_some( int additional_slack ); virtual ~private_server(); void remove_server_ref() { if( --my_ref_count==0 ) { my_client.acknowledge_close_connection(); this->~private_server(); tbb::cache_aligned_allocator().deallocate( this, 1 ); } } friend class private_worker; public: private_server( tbb_client& client ); /*override*/ version_type version() const { return 0; } /*override*/ void request_close_connection( bool /*exiting*/ ) { for( size_t i=0; i=2 && !__MINGW64__ // ensure that stack is properly aligned for TBB threads __attribute__((force_align_arg_pointer)) #endif __RML_DECL_THREAD_ROUTINE private_worker::thread_routine( void* arg ) { private_worker* self = static_cast(arg); AVOID_64K_ALIASING( self->my_index ); #if _XBOX int HWThreadIndex = __TBB_XBOX360_GetHardwareThreadIndex(i); XSetThreadProcessor(GetCurrentThread(), HWThreadIndex); #endif self->run(); return 0; } #if _MSC_VER && !defined(__INTEL_COMPILER) #pragma warning(pop) #endif void private_worker::release_handle(thread_handle handle) { if (governor::needsWaitWorkers()) thread_monitor::join(handle); else thread_monitor::detach_thread(handle); } void private_worker::start_shutdown() { state_t s; do { s = my_state; __TBB_ASSERT( s!=st_quit, NULL ); } while( my_state.compare_and_swap( st_quit, s )!=s ); if( s==st_normal || s==st_starting ) { // May have invalidated invariant for sleeping, so wake up the thread. // Note that the notify() here occurs without maintaining invariants for my_slack. // It does not matter, because my_state==st_quit overrides checking of my_slack. my_thread_monitor.notify(); // Do not need release handle in st_init state, // because in this case the thread wasn't started yet. // For st_starting release is done at launch site. if (s==st_normal) release_handle(my_handle); } else if( s==st_init ) { // Perform action that otherwise would be performed by associated thread when it quits. my_server.remove_server_ref(); } } void private_worker::run() { my_server.propagate_chain_reaction(); // Transiting to st_normal here would require setting my_handle, // which would create race with the launching thread and // complications in handle management on Windows. ::rml::job& j = *my_client.create_one_job(); while( my_state!=st_quit ) { if( my_server.my_slack>=0 ) { my_client.process(j); } else { thread_monitor::cookie c; // Prepare to wait my_thread_monitor.prepare_wait(c); // Check/set the invariant for sleeping if( my_state!=st_quit && my_server.try_insert_in_asleep_list(*this) ) { my_thread_monitor.commit_wait(c); my_server.propagate_chain_reaction(); } else { // Invariant broken my_thread_monitor.cancel_wait(); } } } my_client.cleanup(j); ++my_server.my_slack; my_server.remove_server_ref(); } inline void private_worker::wake_or_launch() { if( my_state==st_init && my_state.compare_and_swap( st_starting, st_init )==st_init ) { // after this point, remove_server_ref() must be done by created thread #if USE_WINTHREAD my_handle = thread_monitor::launch( thread_routine, this, my_server.my_stack_size, &this->my_index ); #elif USE_PTHREAD { affinity_helper fpa; fpa.protect_affinity_mask(); my_handle = thread_monitor::launch( thread_routine, this, my_server.my_stack_size ); // Implicit destruction of fpa resets original affinity mask. } #endif /* USE_PTHREAD */ state_t s = my_state.compare_and_swap( st_normal, st_starting ); if (st_starting != s) { // Do shutdown during startup. my_handle can't be released // by start_shutdown, because my_handle value might be not set yet // at time of transition from st_starting to st_quit. __TBB_ASSERT( s==st_quit, NULL ); release_handle(my_handle); } } else my_thread_monitor.notify(); } //------------------------------------------------------------------------ // Methods of private_server //------------------------------------------------------------------------ private_server::private_server( tbb_client& client ) : my_client(client), my_n_thread(client.max_job_count()), my_stack_size(client.min_stack_size()), my_thread_array(NULL) { my_ref_count = my_n_thread+1; my_slack = 0; #if TBB_USE_ASSERT my_net_slack_requests = 0; #endif /* TBB_USE_ASSERT */ my_asleep_list_root = NULL; my_thread_array = tbb::cache_aligned_allocator().allocate( my_n_thread ); memset( my_thread_array, 0, sizeof(private_worker)*my_n_thread ); for( size_t i=0; imy_next = my_asleep_list_root; my_asleep_list_root = t; } } private_server::~private_server() { __TBB_ASSERT( my_net_slack_requests==0, NULL ); for( size_t i=my_n_thread; i--; ) my_thread_array[i].~padded_private_worker(); tbb::cache_aligned_allocator().deallocate( my_thread_array, my_n_thread ); tbb::internal::poison_pointer( my_thread_array ); } inline bool private_server::try_insert_in_asleep_list( private_worker& t ) { asleep_list_mutex_type::scoped_lock lock; if( !lock.try_acquire(my_asleep_list_mutex) ) return false; // Contribute to slack under lock so that if another takes that unit of slack, // it sees us sleeping on the list and wakes us up. int k = ++my_slack; if( k<=0 ) { t.my_next = my_asleep_list_root; my_asleep_list_root = &t; return true; } else { --my_slack; return false; } } void private_server::wake_some( int additional_slack ) { __TBB_ASSERT( additional_slack>=0, NULL ); private_worker* wakee[2]; private_worker**w = wakee; { asleep_list_mutex_type::scoped_lock lock(my_asleep_list_mutex); while( my_asleep_list_root && w0 ) { if (additional_slack+my_slack<=0) // additional demand does not exceed surplus supply break; --additional_slack; } else { // Chain reaction; Try to claim unit of slack int old; do { old = my_slack; if( old<=0 ) goto done; } while( my_slack.compare_and_swap(old-1,old)!=old ); } // Pop sleeping worker to combine with claimed unit of slack my_asleep_list_root = (*w++ = my_asleep_list_root)->my_next; } if( additional_slack ) { // Contribute our unused slack to my_slack. my_slack += additional_slack; } } done: while( w>wakee ) (*--w)->wake_or_launch(); } void private_server::adjust_job_count_estimate( int delta ) { #if TBB_USE_ASSERT my_net_slack_requests+=delta; #endif /* TBB_USE_ASSERT */ if( delta<0 ) { my_slack+=delta; } else if( delta>0 ) { wake_some( delta ); } } //! Factory method called from task.cpp to create a private_server. tbb_server* make_private_server( tbb_client& client ) { return new( tbb::cache_aligned_allocator().allocate(1) ) private_server(client); } } // namespace rml } // namespace internal } // namespace tbb ================================================ FILE: benchmarks/tbb/queuing_mutex.cpp ================================================ /* Copyright 2005-2014 Intel Corporation. All Rights Reserved. This file is part of Threading Building Blocks. Threading Building Blocks is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. Threading Building Blocks is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Threading Building Blocks; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA As a special exception, you may use this file as part of a free software library without restriction. Specifically, if other files instantiate templates or use macros or inline functions from this file, or you compile this file and link it with other files to produce an executable, this file does not by itself cause the resulting executable to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the executable file might be covered by the GNU General Public License. */ #include "tbb/queuing_mutex.h" #include "tbb/tbb_machine.h" #include "tbb/tbb_stddef.h" #include "tbb_misc.h" #include "itt_notify.h" namespace tbb { using namespace internal; //! A method to acquire queuing_mutex lock void queuing_mutex::scoped_lock::acquire( queuing_mutex& m ) { __TBB_ASSERT( !this->mutex, "scoped_lock is already holding a mutex"); // Must set all fields before the fetch_and_store, because once the // fetch_and_store executes, *this becomes accessible to other threads. mutex = &m; next = NULL; going = 0; // The fetch_and_store must have release semantics, because we are // "sending" the fields initialized above to other processors. scoped_lock* pred = m.q_tail.fetch_and_store(this); if( pred ) { ITT_NOTIFY(sync_prepare, mutex); #if TBB_USE_ASSERT __TBB_control_consistency_helper(); // on "m.q_tail" __TBB_ASSERT( !pred->next, "the predecessor has another successor!"); #endif pred->next = this; spin_wait_while_eq( going, 0ul ); } ITT_NOTIFY(sync_acquired, mutex); // Force acquire so that user's critical section receives correct values // from processor that was previously in the user's critical section. __TBB_load_with_acquire(going); } //! A method to acquire queuing_mutex if it is free bool queuing_mutex::scoped_lock::try_acquire( queuing_mutex& m ) { __TBB_ASSERT( !this->mutex, "scoped_lock is already holding a mutex"); // Must set all fields before the fetch_and_store, because once the // fetch_and_store executes, *this becomes accessible to other threads. next = NULL; going = 0; // The CAS must have release semantics, because we are // "sending" the fields initialized above to other processors. if( m.q_tail.compare_and_swap(this, NULL) ) return false; // Force acquire so that user's critical section receives correct values // from processor that was previously in the user's critical section. // try_acquire should always have acquire semantic, even if failed. __TBB_load_with_acquire(going); mutex = &m; ITT_NOTIFY(sync_acquired, mutex); return true; } //! A method to release queuing_mutex lock void queuing_mutex::scoped_lock::release( ) { __TBB_ASSERT(this->mutex!=NULL, "no lock acquired"); ITT_NOTIFY(sync_releasing, mutex); if( !next ) { if( this == mutex->q_tail.compare_and_swap(NULL, this) ) { // this was the only item in the queue, and the queue is now empty. goto done; } // Someone in the queue spin_wait_while_eq( next, (scoped_lock*)0 ); } __TBB_ASSERT(next,NULL); __TBB_store_with_release(next->going, 1); done: initialize(); } void queuing_mutex::internal_construct() { ITT_SYNC_CREATE(this, _T("tbb::queuing_mutex"), _T("")); } } // namespace tbb ================================================ FILE: benchmarks/tbb/queuing_mutex.h ================================================ /* Copyright 2005-2014 Intel Corporation. All Rights Reserved. This file is part of Threading Building Blocks. Threading Building Blocks is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. Threading Building Blocks is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Threading Building Blocks; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA As a special exception, you may use this file as part of a free software library without restriction. Specifically, if other files instantiate templates or use macros or inline functions from this file, or you compile this file and link it with other files to produce an executable, this file does not by itself cause the resulting executable to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the executable file might be covered by the GNU General Public License. */ #ifndef __TBB_queuing_mutex_H #define __TBB_queuing_mutex_H #include "tbb_config.h" #if !TBB_USE_EXCEPTIONS && _MSC_VER // Suppress "C++ exception handler used, but unwind semantics are not enabled" warning in STL headers #pragma warning (push) #pragma warning (disable: 4530) #endif #include #if !TBB_USE_EXCEPTIONS && _MSC_VER #pragma warning (pop) #endif #include "atomic.h" #include "tbb_profiling.h" namespace tbb { //! Queuing mutex with local-only spinning. /** @ingroup synchronization */ class queuing_mutex : internal::mutex_copy_deprecated_and_disabled { public: //! Construct unacquired mutex. queuing_mutex() { q_tail = NULL; #if TBB_USE_THREADING_TOOLS internal_construct(); #endif } //! The scoped locking pattern /** It helps to avoid the common problem of forgetting to release lock. It also nicely provides the "node" for queuing locks. */ class scoped_lock: internal::no_copy { //! Initialize fields to mean "no lock held". void initialize() { mutex = NULL; #if TBB_USE_ASSERT internal::poison_pointer(next); #endif /* TBB_USE_ASSERT */ } public: //! Construct lock that has not acquired a mutex. /** Equivalent to zero-initialization of *this. */ scoped_lock() {initialize();} //! Acquire lock on given mutex. scoped_lock( queuing_mutex& m ) { initialize(); acquire(m); } //! Release lock (if lock is held). ~scoped_lock() { if( mutex ) release(); } //! Acquire lock on given mutex. void __TBB_EXPORTED_METHOD acquire( queuing_mutex& m ); //! Acquire lock on given mutex if free (i.e. non-blocking) bool __TBB_EXPORTED_METHOD try_acquire( queuing_mutex& m ); //! Release lock. void __TBB_EXPORTED_METHOD release(); private: //! The pointer to the mutex owned, or NULL if not holding a mutex. queuing_mutex* mutex; //! The pointer to the next competitor for a mutex scoped_lock *next; //! The local spin-wait variable /** Inverted (0 - blocked, 1 - acquired the mutex) for the sake of zero-initialization. Defining it as an entire word instead of a byte seems to help performance slightly. */ uintptr_t going; }; void __TBB_EXPORTED_METHOD internal_construct(); // Mutex traits static const bool is_rw_mutex = false; static const bool is_recursive_mutex = false; static const bool is_fair_mutex = true; private: //! The last competitor requesting the lock atomic q_tail; }; __TBB_DEFINE_PROFILING_SET_NAME(queuing_mutex) } // namespace tbb #endif /* __TBB_queuing_mutex_H */ ================================================ FILE: benchmarks/tbb/queuing_rw_mutex.cpp ================================================ /* Copyright 2005-2014 Intel Corporation. All Rights Reserved. This file is part of Threading Building Blocks. Threading Building Blocks is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. Threading Building Blocks is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Threading Building Blocks; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA As a special exception, you may use this file as part of a free software library without restriction. Specifically, if other files instantiate templates or use macros or inline functions from this file, or you compile this file and link it with other files to produce an executable, this file does not by itself cause the resulting executable to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the executable file might be covered by the GNU General Public License. */ /** Before making any changes in the implementation, please emulate algorithmic changes with SPIN tool using /tools/spin_models/ReaderWriterMutex.pml. There could be some code looking as "can be restructured" but its structure does matter! */ #include "tbb/queuing_rw_mutex.h" #include "tbb/tbb_machine.h" #include "tbb/tbb_stddef.h" #include "tbb/tbb_machine.h" #include "itt_notify.h" namespace tbb { using namespace internal; //! Flag bits in a state_t that specify information about a locking request. enum state_t_flags { STATE_NONE = 0, STATE_WRITER = 1<<0, STATE_READER = 1<<1, STATE_READER_UNBLOCKNEXT = 1<<2, STATE_ACTIVEREADER = 1<<3, STATE_UPGRADE_REQUESTED = 1<<4, STATE_UPGRADE_WAITING = 1<<5, STATE_UPGRADE_LOSER = 1<<6, STATE_COMBINED_WAITINGREADER = STATE_READER | STATE_READER_UNBLOCKNEXT, STATE_COMBINED_READER = STATE_COMBINED_WAITINGREADER | STATE_ACTIVEREADER, STATE_COMBINED_UPGRADING = STATE_UPGRADE_WAITING | STATE_UPGRADE_LOSER }; const unsigned char RELEASED = 0; const unsigned char ACQUIRED = 1; inline bool queuing_rw_mutex::scoped_lock::try_acquire_internal_lock() { return as_atomic(my_internal_lock).compare_and_swap(ACQUIRED,RELEASED) == RELEASED; } inline void queuing_rw_mutex::scoped_lock::acquire_internal_lock() { // Usually, we would use the test-test-and-set idiom here, with exponential backoff. // But so far, experiments indicate there is no value in doing so here. while( !try_acquire_internal_lock() ) { __TBB_Pause(1); } } inline void queuing_rw_mutex::scoped_lock::release_internal_lock() { __TBB_store_with_release(my_internal_lock,RELEASED); } inline void queuing_rw_mutex::scoped_lock::wait_for_release_of_internal_lock() { spin_wait_until_eq(my_internal_lock, RELEASED); } inline void queuing_rw_mutex::scoped_lock::unblock_or_wait_on_internal_lock( uintptr_t flag ) { if( flag ) wait_for_release_of_internal_lock(); else release_internal_lock(); } #if defined(_MSC_VER) && !defined(__INTEL_COMPILER) // Workaround for overzealous compiler warnings #pragma warning (push) #pragma warning (disable: 4311 4312) #endif //! A view of a T* with additional functionality for twiddling low-order bits. template class tricky_atomic_pointer: no_copy { public: typedef typename atomic_selector::word word; template static T* fetch_and_add( T* volatile * location, word addend ) { return reinterpret_cast( atomic_traits::fetch_and_add(location, addend) ); } template static T* fetch_and_store( T* volatile * location, T* value ) { return reinterpret_cast( atomic_traits::fetch_and_store(location, reinterpret_cast(value)) ); } template static T* compare_and_swap( T* volatile * location, T* value, T* comparand ) { return reinterpret_cast( atomic_traits::compare_and_swap(location, reinterpret_cast(value), reinterpret_cast(comparand)) ); } T* & ref; tricky_atomic_pointer( T*& original ) : ref(original) {}; tricky_atomic_pointer( T* volatile & original ) : ref(original) {}; T* operator&( word operand2 ) const { return reinterpret_cast( reinterpret_cast(ref) & operand2 ); } T* operator|( word operand2 ) const { return reinterpret_cast( reinterpret_cast(ref) | operand2 ); } }; typedef tricky_atomic_pointer tricky_pointer; #if defined(_MSC_VER) && !defined(__INTEL_COMPILER) // Workaround for overzealous compiler warnings #pragma warning (pop) #endif //! Mask for low order bit of a pointer. static const tricky_pointer::word FLAG = 0x1; inline uintptr_t get_flag( queuing_rw_mutex::scoped_lock* ptr ) { return uintptr_t(ptr) & FLAG; } //------------------------------------------------------------------------ // Methods of queuing_rw_mutex::scoped_lock //------------------------------------------------------------------------ //! A method to acquire queuing_rw_mutex lock void queuing_rw_mutex::scoped_lock::acquire( queuing_rw_mutex& m, bool write ) { __TBB_ASSERT( !my_mutex, "scoped_lock is already holding a mutex"); // Must set all fields before the fetch_and_store, because once the // fetch_and_store executes, *this becomes accessible to other threads. my_mutex = &m; __TBB_store_relaxed(my_prev , (scoped_lock*)0); __TBB_store_relaxed(my_next , (scoped_lock*)0); __TBB_store_relaxed(my_going, 0); my_state = state_t(write ? STATE_WRITER : STATE_READER); my_internal_lock = RELEASED; queuing_rw_mutex::scoped_lock* pred = m.q_tail.fetch_and_store(this); if( write ) { // Acquiring for write if( pred ) { ITT_NOTIFY(sync_prepare, my_mutex); pred = tricky_pointer(pred) & ~FLAG; __TBB_ASSERT( !( uintptr_t(pred) & FLAG ), "use of corrupted pointer!" ); #if TBB_USE_ASSERT __TBB_control_consistency_helper(); // on "m.q_tail" __TBB_ASSERT( !__TBB_load_relaxed(pred->my_next), "the predecessor has another successor!"); #endif __TBB_store_with_release(pred->my_next,this); spin_wait_until_eq(my_going, 1); } } else { // Acquiring for read #if DO_ITT_NOTIFY bool sync_prepare_done = false; #endif if( pred ) { unsigned short pred_state; __TBB_ASSERT( !__TBB_load_relaxed(my_prev), "the predecessor is already set" ); if( uintptr_t(pred) & FLAG ) { /* this is only possible if pred is an upgrading reader and it signals us to wait */ pred_state = STATE_UPGRADE_WAITING; pred = tricky_pointer(pred) & ~FLAG; } else { // Load pred->my_state now, because once pred->my_next becomes // non-NULL, we must assume that *pred might be destroyed. pred_state = pred->my_state.compare_and_swap(STATE_READER_UNBLOCKNEXT, STATE_READER); } __TBB_store_relaxed(my_prev, pred); __TBB_ASSERT( !( uintptr_t(pred) & FLAG ), "use of corrupted pointer!" ); #if TBB_USE_ASSERT __TBB_control_consistency_helper(); // on "m.q_tail" __TBB_ASSERT( !__TBB_load_relaxed(pred->my_next), "the predecessor has another successor!"); #endif __TBB_store_with_release(pred->my_next,this); if( pred_state != STATE_ACTIVEREADER ) { #if DO_ITT_NOTIFY sync_prepare_done = true; ITT_NOTIFY(sync_prepare, my_mutex); #endif spin_wait_until_eq(my_going, 1); } } // The protected state must have been acquired here before it can be further released to any other reader(s): unsigned short old_state = my_state.compare_and_swap(STATE_ACTIVEREADER, STATE_READER); if( old_state!=STATE_READER ) { #if DO_ITT_NOTIFY if( !sync_prepare_done ) ITT_NOTIFY(sync_prepare, my_mutex); #endif // Failed to become active reader -> need to unblock the next waiting reader first __TBB_ASSERT( my_state==STATE_READER_UNBLOCKNEXT, "unexpected state" ); spin_wait_while_eq(my_next, (scoped_lock*)NULL); /* my_state should be changed before unblocking the next otherwise it might finish and another thread can get our old state and left blocked */ my_state = STATE_ACTIVEREADER; __TBB_store_with_release(my_next->my_going,1); } } ITT_NOTIFY(sync_acquired, my_mutex); // Force acquire so that user's critical section receives correct values // from processor that was previously in the user's critical section. __TBB_load_with_acquire(my_going); } //! A method to acquire queuing_rw_mutex if it is free bool queuing_rw_mutex::scoped_lock::try_acquire( queuing_rw_mutex& m, bool write ) { __TBB_ASSERT( !my_mutex, "scoped_lock is already holding a mutex"); if( load(m.q_tail) ) return false; // Someone already took the lock // Must set all fields before the fetch_and_store, because once the // fetch_and_store executes, *this becomes accessible to other threads. __TBB_store_relaxed(my_prev, (scoped_lock*)0); __TBB_store_relaxed(my_next, (scoped_lock*)0); __TBB_store_relaxed(my_going, 0); // TODO: remove dead assignment? my_state = state_t(write ? STATE_WRITER : STATE_ACTIVEREADER); my_internal_lock = RELEASED; // The CAS must have release semantics, because we are // "sending" the fields initialized above to other processors. if( m.q_tail.compare_and_swap(this, NULL) ) return false; // Someone already took the lock // Force acquire so that user's critical section receives correct values // from processor that was previously in the user's critical section. // try_acquire should always have acquire semantic, even if failed. __TBB_load_with_acquire(my_going); my_mutex = &m; ITT_NOTIFY(sync_acquired, my_mutex); return true; } //! A method to release queuing_rw_mutex lock void queuing_rw_mutex::scoped_lock::release( ) { __TBB_ASSERT(my_mutex!=NULL, "no lock acquired"); ITT_NOTIFY(sync_releasing, my_mutex); if( my_state == STATE_WRITER ) { // Acquired for write // The logic below is the same as "writerUnlock", but elides // "return" from the middle of the routine. // In the statement below, acquire semantics of reading my_next is required // so that following operations with fields of my_next are safe. scoped_lock* n = __TBB_load_with_acquire(my_next); if( !n ) { if( this == my_mutex->q_tail.compare_and_swap(NULL, this) ) { // this was the only item in the queue, and the queue is now empty. goto done; } spin_wait_while_eq( my_next, (scoped_lock*)NULL ); n = __TBB_load_with_acquire(my_next); } __TBB_store_relaxed(n->my_going, 2); // protect next queue node from being destroyed too early if( n->my_state==STATE_UPGRADE_WAITING ) { // the next waiting for upgrade means this writer was upgraded before. acquire_internal_lock(); queuing_rw_mutex::scoped_lock* tmp = tricky_pointer::fetch_and_store(&(n->my_prev), NULL); n->my_state = STATE_UPGRADE_LOSER; __TBB_store_with_release(n->my_going,1); unblock_or_wait_on_internal_lock(get_flag(tmp)); } else { __TBB_ASSERT( my_state & (STATE_COMBINED_WAITINGREADER | STATE_WRITER), "unexpected state" ); __TBB_ASSERT( !( uintptr_t(__TBB_load_relaxed(n->my_prev)) & FLAG ), "use of corrupted pointer!" ); __TBB_store_relaxed(n->my_prev, (scoped_lock*)0); __TBB_store_with_release(n->my_going,1); } } else { // Acquired for read queuing_rw_mutex::scoped_lock *tmp = NULL; retry: // Addition to the original paper: Mark my_prev as in use queuing_rw_mutex::scoped_lock *pred = tricky_pointer::fetch_and_add(&my_prev, FLAG); if( pred ) { if( !(pred->try_acquire_internal_lock()) ) { // Failed to acquire the lock on pred. The predecessor either unlinks or upgrades. // In the second case, it could or could not know my "in use" flag - need to check tmp = tricky_pointer::compare_and_swap(&my_prev, pred, tricky_pointer(pred) | FLAG ); if( !(uintptr_t(tmp) & FLAG) ) { // Wait for the predecessor to change my_prev (e.g. during unlink) spin_wait_while_eq( my_prev, tricky_pointer(pred)|FLAG ); // Now owner of pred is waiting for _us_ to release its lock pred->release_internal_lock(); } // else the "in use" flag is back -> the predecessor didn't get it and will release itself; nothing to do tmp = NULL; goto retry; } __TBB_ASSERT(pred && pred->my_internal_lock==ACQUIRED, "predecessor's lock is not acquired"); __TBB_store_relaxed(my_prev, pred); acquire_internal_lock(); __TBB_store_with_release(pred->my_next,reinterpret_cast(NULL)); if( !__TBB_load_relaxed(my_next) && this != my_mutex->q_tail.compare_and_swap(pred, this) ) { spin_wait_while_eq( my_next, (void*)NULL ); } __TBB_ASSERT( !get_flag(__TBB_load_relaxed(my_next)), "use of corrupted pointer" ); // ensure acquire semantics of reading 'my_next' if( scoped_lock *const l_next = __TBB_load_with_acquire(my_next) ) { // I->next != nil, TODO: rename to n after clearing up and adapting the n in the comment two lines below // Equivalent to I->next->prev = I->prev but protected against (prev[n]&FLAG)!=0 tmp = tricky_pointer::fetch_and_store(&(l_next->my_prev), pred); // I->prev->next = I->next; __TBB_ASSERT(__TBB_load_relaxed(my_prev)==pred, NULL); __TBB_store_with_release(pred->my_next, my_next); } // Safe to release in the order opposite to acquiring which makes the code simpler pred->release_internal_lock(); } else { // No predecessor when we looked acquire_internal_lock(); // "exclusiveLock(&I->EL)" scoped_lock* n = __TBB_load_with_acquire(my_next); if( !n ) { if( this != my_mutex->q_tail.compare_and_swap(NULL, this) ) { spin_wait_while_eq( my_next, (scoped_lock*)NULL ); n = __TBB_load_relaxed(my_next); } else { goto unlock_self; } } __TBB_store_relaxed(n->my_going, 2); // protect next queue node from being destroyed too early tmp = tricky_pointer::fetch_and_store(&(n->my_prev), NULL); __TBB_store_with_release(n->my_going,1); } unlock_self: unblock_or_wait_on_internal_lock(get_flag(tmp)); } done: spin_wait_while_eq( my_going, 2 ); initialize(); } bool queuing_rw_mutex::scoped_lock::downgrade_to_reader() { __TBB_ASSERT( my_state==STATE_WRITER, "no sense to downgrade a reader" ); ITT_NOTIFY(sync_releasing, my_mutex); if( ! __TBB_load_with_acquire(my_next) ) { my_state = STATE_READER; if( this==my_mutex->q_tail ) { unsigned short old_state = my_state.compare_and_swap(STATE_ACTIVEREADER, STATE_READER); if( old_state==STATE_READER ) { // Downgrade completed return true; } } /* wait for the next to register */ spin_wait_while_eq( my_next, (void*)NULL ); } scoped_lock *const n = __TBB_load_relaxed(my_next); __TBB_ASSERT( n, "still no successor at this point!" ); if( n->my_state & STATE_COMBINED_WAITINGREADER ) __TBB_store_with_release(n->my_going,1); else if( n->my_state==STATE_UPGRADE_WAITING ) // the next waiting for upgrade means this writer was upgraded before. n->my_state = STATE_UPGRADE_LOSER; my_state = STATE_ACTIVEREADER; return true; } bool queuing_rw_mutex::scoped_lock::upgrade_to_writer() { __TBB_ASSERT( my_state==STATE_ACTIVEREADER, "only active reader can be upgraded" ); queuing_rw_mutex::scoped_lock * tmp; queuing_rw_mutex::scoped_lock * me = this; ITT_NOTIFY(sync_releasing, my_mutex); my_state = STATE_UPGRADE_REQUESTED; requested: __TBB_ASSERT( !(uintptr_t(__TBB_load_relaxed(my_next)) & FLAG), "use of corrupted pointer!" ); acquire_internal_lock(); if( this != my_mutex->q_tail.compare_and_swap(tricky_pointer(me)|FLAG, this) ) { spin_wait_while_eq( my_next, (void*)NULL ); queuing_rw_mutex::scoped_lock * n; n = tricky_pointer::fetch_and_add(&my_next, FLAG); unsigned short n_state = n->my_state; /* the next reader can be blocked by our state. the best thing to do is to unblock it */ if( n_state & STATE_COMBINED_WAITINGREADER ) __TBB_store_with_release(n->my_going,1); tmp = tricky_pointer::fetch_and_store(&(n->my_prev), this); unblock_or_wait_on_internal_lock(get_flag(tmp)); if( n_state & (STATE_COMBINED_READER | STATE_UPGRADE_REQUESTED) ) { // save n|FLAG for simplicity of following comparisons tmp = tricky_pointer(n)|FLAG; for( atomic_backoff b; __TBB_load_relaxed(my_next)==tmp; b.pause() ) { if( my_state & STATE_COMBINED_UPGRADING ) { if( __TBB_load_with_acquire(my_next)==tmp ) __TBB_store_relaxed(my_next, n); goto waiting; } } __TBB_ASSERT(__TBB_load_relaxed(my_next) != (tricky_pointer(n)|FLAG), NULL); goto requested; } else { __TBB_ASSERT( n_state & (STATE_WRITER | STATE_UPGRADE_WAITING), "unexpected state"); __TBB_ASSERT( (tricky_pointer(n)|FLAG) == __TBB_load_relaxed(my_next), NULL); __TBB_store_relaxed(my_next, n); } } else { /* We are in the tail; whoever comes next is blocked by q_tail&FLAG */ release_internal_lock(); } // if( this != my_mutex->q_tail... ) my_state.compare_and_swap(STATE_UPGRADE_WAITING, STATE_UPGRADE_REQUESTED); waiting: __TBB_ASSERT( !( intptr_t(__TBB_load_relaxed(my_next)) & FLAG ), "use of corrupted pointer!" ); __TBB_ASSERT( my_state & STATE_COMBINED_UPGRADING, "wrong state at upgrade waiting_retry" ); __TBB_ASSERT( me==this, NULL ); ITT_NOTIFY(sync_prepare, my_mutex); /* if no one was blocked by the "corrupted" q_tail, turn it back */ my_mutex->q_tail.compare_and_swap( this, tricky_pointer(me)|FLAG ); queuing_rw_mutex::scoped_lock * pred; pred = tricky_pointer::fetch_and_add(&my_prev, FLAG); if( pred ) { bool success = pred->try_acquire_internal_lock(); pred->my_state.compare_and_swap(STATE_UPGRADE_WAITING, STATE_UPGRADE_REQUESTED); if( !success ) { tmp = tricky_pointer::compare_and_swap(&my_prev, pred, tricky_pointer(pred)|FLAG ); if( uintptr_t(tmp) & FLAG ) { spin_wait_while_eq(my_prev, pred); pred = __TBB_load_relaxed(my_prev); } else { spin_wait_while_eq( my_prev, tricky_pointer(pred)|FLAG ); pred->release_internal_lock(); } } else { __TBB_store_relaxed(my_prev, pred); pred->release_internal_lock(); spin_wait_while_eq(my_prev, pred); pred = __TBB_load_relaxed(my_prev); } if( pred ) goto waiting; } else { // restore the corrupted my_prev field for possible further use (e.g. if downgrade back to reader) __TBB_store_relaxed(my_prev, pred); } __TBB_ASSERT( !pred && !__TBB_load_relaxed(my_prev), NULL ); // additional lifetime issue prevention checks // wait for the successor to finish working with my fields wait_for_release_of_internal_lock(); // now wait for the predecessor to finish working with my fields spin_wait_while_eq( my_going, 2 ); // Acquire critical section indirectly from previous owner or directly from predecessor (TODO: not clear). __TBB_control_consistency_helper(); // on either "my_mutex->q_tail" or "my_going" (TODO: not clear) bool result = ( my_state != STATE_UPGRADE_LOSER ); my_state = STATE_WRITER; __TBB_store_relaxed(my_going, 1); ITT_NOTIFY(sync_acquired, my_mutex); return result; } void queuing_rw_mutex::internal_construct() { ITT_SYNC_CREATE(this, _T("tbb::queuing_rw_mutex"), _T("")); } } // namespace tbb ================================================ FILE: benchmarks/tbb/queuing_rw_mutex.h ================================================ /* Copyright 2005-2014 Intel Corporation. All Rights Reserved. This file is part of Threading Building Blocks. Threading Building Blocks is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. Threading Building Blocks is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Threading Building Blocks; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA As a special exception, you may use this file as part of a free software library without restriction. Specifically, if other files instantiate templates or use macros or inline functions from this file, or you compile this file and link it with other files to produce an executable, this file does not by itself cause the resulting executable to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the executable file might be covered by the GNU General Public License. */ #ifndef __TBB_queuing_rw_mutex_H #define __TBB_queuing_rw_mutex_H #include "tbb_config.h" #if !TBB_USE_EXCEPTIONS && _MSC_VER // Suppress "C++ exception handler used, but unwind semantics are not enabled" warning in STL headers #pragma warning (push) #pragma warning (disable: 4530) #endif #include #if !TBB_USE_EXCEPTIONS && _MSC_VER #pragma warning (pop) #endif #include "atomic.h" #include "tbb_profiling.h" namespace tbb { //! Queuing reader-writer mutex with local-only spinning. /** Adapted from Krieger, Stumm, et al. pseudocode at http://www.eecg.toronto.edu/parallel/pubs_abs.html#Krieger_etal_ICPP93 @ingroup synchronization */ class queuing_rw_mutex : internal::mutex_copy_deprecated_and_disabled { public: //! Construct unacquired mutex. queuing_rw_mutex() { q_tail = NULL; #if TBB_USE_THREADING_TOOLS internal_construct(); #endif } //! Destructor asserts if the mutex is acquired, i.e. q_tail is non-NULL ~queuing_rw_mutex() { #if TBB_USE_ASSERT __TBB_ASSERT( !q_tail, "destruction of an acquired mutex"); #endif } //! The scoped locking pattern /** It helps to avoid the common problem of forgetting to release lock. It also nicely provides the "node" for queuing locks. */ class scoped_lock: internal::no_copy { //! Initialize fields to mean "no lock held". void initialize() { my_mutex = NULL; #if TBB_USE_ASSERT my_state = 0xFF; // Set to invalid state internal::poison_pointer(my_next); internal::poison_pointer(my_prev); #endif /* TBB_USE_ASSERT */ } public: //! Construct lock that has not acquired a mutex. /** Equivalent to zero-initialization of *this. */ scoped_lock() {initialize();} //! Acquire lock on given mutex. scoped_lock( queuing_rw_mutex& m, bool write=true ) { initialize(); acquire(m,write); } //! Release lock (if lock is held). ~scoped_lock() { if( my_mutex ) release(); } //! Acquire lock on given mutex. void acquire( queuing_rw_mutex& m, bool write=true ); //! Acquire lock on given mutex if free (i.e. non-blocking) bool try_acquire( queuing_rw_mutex& m, bool write=true ); //! Release lock. void release(); //! Upgrade reader to become a writer. /** Returns whether the upgrade happened without releasing and re-acquiring the lock */ bool upgrade_to_writer(); //! Downgrade writer to become a reader. bool downgrade_to_reader(); private: //! The pointer to the mutex owned, or NULL if not holding a mutex. queuing_rw_mutex* my_mutex; //! The pointer to the previous and next competitors for a mutex scoped_lock *__TBB_atomic my_prev, *__TBB_atomic my_next; typedef unsigned char state_t; //! State of the request: reader, writer, active reader, other service states atomic my_state; //! The local spin-wait variable /** Corresponds to "spin" in the pseudocode but inverted for the sake of zero-initialization */ unsigned char __TBB_atomic my_going; //! A tiny internal lock unsigned char my_internal_lock; //! Acquire the internal lock void acquire_internal_lock(); //! Try to acquire the internal lock /** Returns true if lock was successfully acquired. */ bool try_acquire_internal_lock(); //! Release the internal lock void release_internal_lock(); //! Wait for internal lock to be released void wait_for_release_of_internal_lock(); //! A helper function void unblock_or_wait_on_internal_lock( uintptr_t ); }; void __TBB_EXPORTED_METHOD internal_construct(); // Mutex traits static const bool is_rw_mutex = true; static const bool is_recursive_mutex = false; static const bool is_fair_mutex = true; private: //! The last competitor requesting the lock atomic q_tail; }; __TBB_DEFINE_PROFILING_SET_NAME(queuing_rw_mutex) } // namespace tbb #endif /* __TBB_queuing_rw_mutex_H */ ================================================ FILE: benchmarks/tbb/reader_writer_lock.cpp ================================================ /* Copyright 2005-2014 Intel Corporation. All Rights Reserved. This file is part of Threading Building Blocks. Threading Building Blocks is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. Threading Building Blocks is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Threading Building Blocks; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA As a special exception, you may use this file as part of a free software library without restriction. Specifically, if other files instantiate templates or use macros or inline functions from this file, or you compile this file and link it with other files to produce an executable, this file does not by itself cause the resulting executable to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the executable file might be covered by the GNU General Public License. */ #include "tbb/reader_writer_lock.h" #include "tbb/tbb_machine.h" #include "tbb/tbb_exception.h" #include "itt_notify.h" #if defined(_MSC_VER) && defined(_Wp64) // Workaround for overzealous compiler warnings in /Wp64 mode #pragma warning (disable: 4244) #endif namespace tbb { namespace interface5 { const uintptr_t WFLAG1 = 0x1; // writer interested or active const uintptr_t WFLAG2 = 0x2; // writers interested, no entering readers const uintptr_t RFLAG = 0x4; // reader interested but not active const uintptr_t RC_INCR = 0x8; // to adjust reader count // Perform an atomic bitwise-OR on the operand, and return its previous value. inline uintptr_t fetch_and_or(atomic& operand, uintptr_t value) { for (tbb::internal::atomic_backoff b;;b.pause()) { uintptr_t old = operand; uintptr_t result = operand.compare_and_swap(old|value, old); if (result==old) return result; } } // Perform an atomic bitwise-AND on the operand, and return its previous value. inline uintptr_t fetch_and_and(atomic& operand, uintptr_t value) { for (tbb::internal::atomic_backoff b;;b.pause()) { uintptr_t old = operand; uintptr_t result = operand.compare_and_swap(old&value, old); if (result==old) return result; } } //! Spin WHILE the value at the location is greater than or equal to a given value /** T and U should be comparable types. */ template void spin_wait_while_geq( const volatile T& location, U value ) { tbb::internal::atomic_backoff backoff; while( location>=value ) backoff.pause(); } //! Spin UNTIL (location & value) is true. /** T and U should be comparable types. */ template void spin_wait_until_and( const volatile T& location, U value ) { tbb::internal::atomic_backoff backoff; while( !(location & value) ) backoff.pause(); } void reader_writer_lock::internal_construct() { reader_head = NULL; writer_head = NULL; writer_tail = NULL; rdr_count_and_flags = 0; my_current_writer = tbb_thread::id(); #if TBB_USE_THREADING_TOOLS ITT_SYNC_CREATE(this, _T("tbb::reader_writer_lock"), _T("")); #endif /* TBB_USE_THREADING_TOOLS */ } void reader_writer_lock::internal_destroy() { __TBB_ASSERT(rdr_count_and_flags==0, "reader_writer_lock destroyed with pending readers/writers."); __TBB_ASSERT(reader_head==NULL, "reader_writer_lock destroyed with pending readers."); __TBB_ASSERT(writer_tail==NULL, "reader_writer_lock destroyed with pending writers."); __TBB_ASSERT(writer_head==NULL, "reader_writer_lock destroyed with pending/active writers."); } // Acquires the reader_writer_lock for write. If the lock is currently held in write // mode by another context, the writer will block by spinning on a local variable. // Throws exception improper_lock if the context tries to acquire a // reader_writer_lock that it already has write ownership of. void reader_writer_lock::lock() { if (is_current_writer()) { // recursive lock attempt // we don't support recursive writer locks; throw exception tbb::internal::throw_exception(tbb::internal::eid_improper_lock); } else { scoped_lock *a_writer_lock = new scoped_lock(); (void) start_write(a_writer_lock); } } // Tries to acquire the reader_writer_lock for write. This function does not block. // Return Value: True or false, depending on whether the lock is acquired or not. // If the lock is already held by this acquiring context, try_lock() returns false. bool reader_writer_lock::try_lock() { if (is_current_writer()) { // recursive lock attempt return false; } else { scoped_lock *a_writer_lock = new scoped_lock(); a_writer_lock->status = waiting_nonblocking; return start_write(a_writer_lock); } } bool reader_writer_lock::start_write(scoped_lock *I) { tbb_thread::id id = this_tbb_thread::get_id(); scoped_lock *pred = NULL; if (I->status == waiting_nonblocking) { if ((pred = writer_tail.compare_and_swap(I, NULL)) != NULL) { delete I; return false; } } else { ITT_NOTIFY(sync_prepare, this); pred = writer_tail.fetch_and_store(I); } if (pred) pred->next = I; else { set_next_writer(I); if (I->status == waiting_nonblocking) { if (I->next) { // potentially more writers set_next_writer(I->next); } else { // no more writers writer_head.fetch_and_store(NULL); if (I != writer_tail.compare_and_swap(NULL, I)) { // an incoming writer is in the process of being added spin_wait_while_eq(I->next, (scoped_lock *)NULL); // wait for new writer to be added __TBB_ASSERT(I->next, "There should be a node following the last writer."); set_next_writer(I->next); } } delete I; return false; } } spin_wait_while_eq(I->status, waiting); ITT_NOTIFY(sync_acquired, this); my_current_writer = id; return true; } void reader_writer_lock::set_next_writer(scoped_lock *W) { writer_head = W; if (W->status == waiting_nonblocking) { if (rdr_count_and_flags.compare_and_swap(WFLAG1+WFLAG2, 0) == 0) { W->status = active; } } else { if (fetch_and_or(rdr_count_and_flags, WFLAG1) & RFLAG) { // reader present spin_wait_until_and(rdr_count_and_flags, WFLAG2); // block until readers set WFLAG2 } else { // no reader in timing window __TBB_AtomicOR(&rdr_count_and_flags, WFLAG2); } spin_wait_while_geq(rdr_count_and_flags, RC_INCR); // block until readers finish W->status = active; } } // Acquires the reader_writer_lock for read. If the lock is currently held by a writer, // this reader will block and wait until the writers are done. // Throws exception improper_lock when the context tries to acquire a reader_writer_lock // that it already has write ownership of. void reader_writer_lock::lock_read() { if (is_current_writer()) { // recursive lock attempt // we don't support writer->reader downgrade; throw exception tbb::internal::throw_exception(tbb::internal::eid_improper_lock); } else { scoped_lock_read a_reader_lock; start_read(&a_reader_lock); } } // Tries to acquire the reader_writer_lock for read. This function does not block. // Return Value: True or false, depending on whether the lock is acquired or not. bool reader_writer_lock::try_lock_read() { if (is_current_writer()) { // recursive lock attempt return false; } else { if (rdr_count_and_flags.fetch_and_add(RC_INCR) & (WFLAG1+WFLAG2)) { // writers present rdr_count_and_flags -= RC_INCR; return false; } else { // no writers ITT_NOTIFY(sync_acquired, this); return true; } } } void reader_writer_lock::start_read(scoped_lock_read *I) { ITT_NOTIFY(sync_prepare, this); I->next = reader_head.fetch_and_store(I); if (!I->next) { // first arriving reader in my group; set RFLAG, test writer flags // unblock and/or update statuses of non-blocking readers if (!(fetch_and_or(rdr_count_and_flags, RFLAG) & (WFLAG1+WFLAG2))) { // no writers unblock_readers(); } } __TBB_ASSERT(I->status == waiting || I->status == active, "Lock requests should be waiting or active before blocking."); spin_wait_while_eq(I->status, waiting); // block if (I->next) { __TBB_ASSERT(I->next->status == waiting, NULL); rdr_count_and_flags += RC_INCR; I->next->status = active; // wake successor } ITT_NOTIFY(sync_acquired, this); } void reader_writer_lock::unblock_readers() { // clear rdr interest flag, increment rdr count __TBB_ASSERT(rdr_count_and_flags&RFLAG, NULL); rdr_count_and_flags += RC_INCR-RFLAG; __TBB_ASSERT(rdr_count_and_flags >= RC_INCR, NULL); // indicate clear of window if (rdr_count_and_flags & WFLAG1 && !(rdr_count_and_flags & WFLAG2)) { __TBB_AtomicOR(&rdr_count_and_flags, WFLAG2); } // unblock waiting readers scoped_lock_read *head = reader_head.fetch_and_store(NULL); __TBB_ASSERT(head, NULL); __TBB_ASSERT(head->status == waiting, NULL); head->status = active; } // Releases the reader_writer_lock void reader_writer_lock::unlock() { if( my_current_writer!=tbb_thread::id() ) { // A writer owns the lock __TBB_ASSERT(is_current_writer(), "caller of reader_writer_lock::unlock() does not own the lock."); __TBB_ASSERT(writer_head, NULL); __TBB_ASSERT(writer_head->status==active, NULL); scoped_lock *a_writer_lock = writer_head; end_write(a_writer_lock); __TBB_ASSERT(a_writer_lock != writer_head, "Internal error: About to turn writer_head into dangling reference."); delete a_writer_lock; } else { end_read(); } } void reader_writer_lock::end_write(scoped_lock *I) { __TBB_ASSERT(I==writer_head, "Internal error: can't unlock a thread that is not holding the lock."); my_current_writer = tbb_thread::id(); ITT_NOTIFY(sync_releasing, this); if (I->next) { // potentially more writers writer_head = I->next; writer_head->status = active; } else { // No more writers; clear writer flag, test reader interest flag __TBB_ASSERT(writer_head, NULL); if (fetch_and_and(rdr_count_and_flags, ~(WFLAG1+WFLAG2)) & RFLAG) { unblock_readers(); } writer_head.fetch_and_store(NULL); if (I != writer_tail.compare_and_swap(NULL, I)) { // an incoming writer is in the process of being added spin_wait_while_eq(I->next, (scoped_lock *)NULL); // wait for new writer to be added __TBB_ASSERT(I->next, "There should be a node following the last writer."); set_next_writer(I->next); } } } void reader_writer_lock::end_read() { ITT_NOTIFY(sync_releasing, this); __TBB_ASSERT(rdr_count_and_flags >= RC_INCR, "unlock() called but no readers hold the lock."); rdr_count_and_flags -= RC_INCR; } inline bool reader_writer_lock::is_current_writer() { return my_current_writer==this_tbb_thread::get_id(); } // Construct with a blocking attempt to acquire a write lock on the passed reader_writer_lock void reader_writer_lock::scoped_lock::internal_construct (reader_writer_lock& lock) { mutex = &lock; next = NULL; status = waiting; if (mutex->is_current_writer()) { // recursive lock attempt // we don't support recursive writer locks; throw exception tbb::internal::throw_exception(tbb::internal::eid_improper_lock); } else { // this thread holds no locks (void) mutex->start_write(this); } } inline reader_writer_lock::scoped_lock::scoped_lock() : mutex(NULL), next(NULL) { status = waiting; } // Construct with a blocking attempt to acquire a write lock on the passed reader_writer_lock void reader_writer_lock::scoped_lock_read::internal_construct (reader_writer_lock& lock) { mutex = &lock; next = NULL; status = waiting; if (mutex->is_current_writer()) { // recursive lock attempt // we don't support writer->reader downgrade; throw exception tbb::internal::throw_exception(tbb::internal::eid_improper_lock); } else { // this thread holds no locks mutex->start_read(this); } } inline reader_writer_lock::scoped_lock_read::scoped_lock_read() : mutex(NULL), next(NULL) { status = waiting; } void reader_writer_lock::scoped_lock::internal_destroy() { if (mutex) { __TBB_ASSERT(mutex->is_current_writer(), "~scoped_lock() destroyed by thread different than thread that holds lock."); mutex->end_write(this); } status = invalid; } void reader_writer_lock::scoped_lock_read::internal_destroy() { if (mutex) mutex->end_read(); status = invalid; } } // namespace interface5 } // namespace tbb ================================================ FILE: benchmarks/tbb/reader_writer_lock.h ================================================ /* Copyright 2005-2014 Intel Corporation. All Rights Reserved. This file is part of Threading Building Blocks. Threading Building Blocks is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. Threading Building Blocks is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Threading Building Blocks; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA As a special exception, you may use this file as part of a free software library without restriction. Specifically, if other files instantiate templates or use macros or inline functions from this file, or you compile this file and link it with other files to produce an executable, this file does not by itself cause the resulting executable to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the executable file might be covered by the GNU General Public License. */ #ifndef __TBB_reader_writer_lock_H #define __TBB_reader_writer_lock_H #include "tbb_thread.h" #include "tbb_allocator.h" #include "atomic.h" namespace tbb { namespace interface5 { //! Writer-preference reader-writer lock with local-only spinning on readers. /** Loosely adapted from Mellor-Crummey and Scott pseudocode at http://www.cs.rochester.edu/research/synchronization/pseudocode/rw.html#s_wp @ingroup synchronization */ class reader_writer_lock : tbb::internal::no_copy { public: friend class scoped_lock; friend class scoped_lock_read; //! Status type for nodes associated with lock instances /** waiting_nonblocking: the wait state for nonblocking lock instances; for writes, these transition straight to active states; for reads, these are unused. waiting: the start and spin state for all lock instances; these will transition to active state when appropriate. Non-blocking write locks transition from this state to waiting_nonblocking immediately. active: the active state means that the lock instance holds the lock; it will transition to invalid state during node deletion invalid: the end state for all nodes; this is set in the destructor so if we encounter this state, we are looking at memory that has already been freed The state diagrams below describe the status transitions. Single arrows indicate that the thread that owns the node is responsible for the transition; double arrows indicate that any thread could make the transition. State diagram for scoped_lock status: waiting ----------> waiting_nonblocking | _____________/ | V V V active -----------------> invalid State diagram for scoped_lock_read status: waiting | V active ----------------->invalid */ enum status_t { waiting_nonblocking, waiting, active, invalid }; //! Constructs a new reader_writer_lock reader_writer_lock() { internal_construct(); } //! Destructs a reader_writer_lock object ~reader_writer_lock() { internal_destroy(); } //! The scoped lock pattern for write locks /** Scoped locks help avoid the common problem of forgetting to release the lock. This type also serves as the node for queuing locks. */ class scoped_lock : tbb::internal::no_copy { public: friend class reader_writer_lock; //! Construct with blocking attempt to acquire write lock on the passed-in lock scoped_lock(reader_writer_lock& lock) { internal_construct(lock); } //! Destructor, releases the write lock ~scoped_lock() { internal_destroy(); } void* operator new(size_t s) { return tbb::internal::allocate_via_handler_v3(s); } void operator delete(void* p) { tbb::internal::deallocate_via_handler_v3(p); } private: //! The pointer to the mutex to lock reader_writer_lock *mutex; //! The next queued competitor for the mutex scoped_lock* next; //! Status flag of the thread associated with this node atomic status; //! Construct scoped_lock that is not holding lock scoped_lock(); void __TBB_EXPORTED_METHOD internal_construct(reader_writer_lock&); void __TBB_EXPORTED_METHOD internal_destroy(); }; //! The scoped lock pattern for read locks class scoped_lock_read : tbb::internal::no_copy { public: friend class reader_writer_lock; //! Construct with blocking attempt to acquire read lock on the passed-in lock scoped_lock_read(reader_writer_lock& lock) { internal_construct(lock); } //! Destructor, releases the read lock ~scoped_lock_read() { internal_destroy(); } void* operator new(size_t s) { return tbb::internal::allocate_via_handler_v3(s); } void operator delete(void* p) { tbb::internal::deallocate_via_handler_v3(p); } private: //! The pointer to the mutex to lock reader_writer_lock *mutex; //! The next queued competitor for the mutex scoped_lock_read *next; //! Status flag of the thread associated with this node atomic status; //! Construct scoped_lock_read that is not holding lock scoped_lock_read(); void __TBB_EXPORTED_METHOD internal_construct(reader_writer_lock&); void __TBB_EXPORTED_METHOD internal_destroy(); }; //! Acquires the reader_writer_lock for write. /** If the lock is currently held in write mode by another context, the writer will block by spinning on a local variable. Exceptions thrown: improper_lock The context tries to acquire a reader_writer_lock that it already has write ownership of.*/ void __TBB_EXPORTED_METHOD lock(); //! Tries to acquire the reader_writer_lock for write. /** This function does not block. Return Value: True or false, depending on whether the lock is acquired or not. If the lock is already held by this acquiring context, try_lock() returns false. */ bool __TBB_EXPORTED_METHOD try_lock(); //! Acquires the reader_writer_lock for read. /** If the lock is currently held by a writer, this reader will block and wait until the writers are done. Exceptions thrown: improper_lock The context tries to acquire a reader_writer_lock that it already has write ownership of. */ void __TBB_EXPORTED_METHOD lock_read(); //! Tries to acquire the reader_writer_lock for read. /** This function does not block. Return Value: True or false, depending on whether the lock is acquired or not. */ bool __TBB_EXPORTED_METHOD try_lock_read(); //! Releases the reader_writer_lock void __TBB_EXPORTED_METHOD unlock(); private: void __TBB_EXPORTED_METHOD internal_construct(); void __TBB_EXPORTED_METHOD internal_destroy(); //! Attempts to acquire write lock /** If unavailable, spins in blocking case, returns false in non-blocking case. */ bool start_write(scoped_lock *); //! Sets writer_head to w and attempts to unblock void set_next_writer(scoped_lock *w); //! Relinquishes write lock to next waiting writer or group of readers void end_write(scoped_lock *); //! Checks if current thread holds write lock bool is_current_writer(); //! Attempts to acquire read lock /** If unavailable, spins in blocking case, returns false in non-blocking case. */ void start_read(scoped_lock_read *); //! Unblocks pending readers void unblock_readers(); //! Relinquishes read lock by decrementing counter; last reader wakes pending writer void end_read(); //! The list of pending readers atomic reader_head; //! The list of pending writers atomic writer_head; //! The last node in the list of pending writers atomic writer_tail; //! Writer that owns the mutex; tbb_thread::id() otherwise. tbb_thread::id my_current_writer; //! Status of mutex atomic rdr_count_and_flags; // used with __TBB_AtomicOR, which assumes uintptr_t }; } // namespace interface5 using interface5::reader_writer_lock; } // namespace tbb #endif /* __TBB_reader_writer_lock_H */ ================================================ FILE: benchmarks/tbb/recursive_mutex.cpp ================================================ /* Copyright 2005-2014 Intel Corporation. All Rights Reserved. This file is part of Threading Building Blocks. Threading Building Blocks is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. Threading Building Blocks is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Threading Building Blocks; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA As a special exception, you may use this file as part of a free software library without restriction. Specifically, if other files instantiate templates or use macros or inline functions from this file, or you compile this file and link it with other files to produce an executable, this file does not by itself cause the resulting executable to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the executable file might be covered by the GNU General Public License. */ #include "tbb/recursive_mutex.h" #include "itt_notify.h" namespace tbb { void recursive_mutex::scoped_lock::internal_acquire( recursive_mutex& m ) { #if _WIN32||_WIN64 switch( m.state ) { case INITIALIZED: // since we cannot look into the internal of the CriticalSection object // we won't know how many times the lock has been acquired, and thus // we won't know when we may safely set the state back to INITIALIZED // if we change the state to HELD as in mutex.cpp. thus, we won't change // the state for recursive_mutex EnterCriticalSection( &m.impl ); break; case DESTROYED: __TBB_ASSERT(false,"recursive_mutex::scoped_lock: mutex already destroyed"); break; default: __TBB_ASSERT(false,"recursive_mutex::scoped_lock: illegal mutex state"); break; } #else int error_code = pthread_mutex_lock(&m.impl); if( error_code ) tbb::internal::handle_perror(error_code,"recursive_mutex::scoped_lock: pthread_mutex_lock failed"); #endif /* _WIN32||_WIN64 */ my_mutex = &m; } void recursive_mutex::scoped_lock::internal_release() { __TBB_ASSERT( my_mutex, "recursive_mutex::scoped_lock: not holding a mutex" ); #if _WIN32||_WIN64 switch( my_mutex->state ) { case INITIALIZED: LeaveCriticalSection( &my_mutex->impl ); break; case DESTROYED: __TBB_ASSERT(false,"recursive_mutex::scoped_lock: mutex already destroyed"); break; default: __TBB_ASSERT(false,"recursive_mutex::scoped_lock: illegal mutex state"); break; } #else int error_code = pthread_mutex_unlock(&my_mutex->impl); __TBB_ASSERT_EX(!error_code, "recursive_mutex::scoped_lock: pthread_mutex_unlock failed"); #endif /* _WIN32||_WIN64 */ my_mutex = NULL; } bool recursive_mutex::scoped_lock::internal_try_acquire( recursive_mutex& m ) { #if _WIN32||_WIN64 switch( m.state ) { case INITIALIZED: break; case DESTROYED: __TBB_ASSERT(false,"recursive_mutex::scoped_lock: mutex already destroyed"); break; default: __TBB_ASSERT(false,"recursive_mutex::scoped_lock: illegal mutex state"); break; } #endif /* _WIN32||_WIN64 */ bool result; #if _WIN32||_WIN64 result = TryEnterCriticalSection(&m.impl)!=0; #else result = pthread_mutex_trylock(&m.impl)==0; #endif /* _WIN32||_WIN64 */ if( result ) my_mutex = &m; return result; } void recursive_mutex::internal_construct() { #if _WIN32||_WIN64 InitializeCriticalSectionEx(&impl, 4000, 0); state = INITIALIZED; #else pthread_mutexattr_t mtx_attr; int error_code = pthread_mutexattr_init( &mtx_attr ); if( error_code ) tbb::internal::handle_perror(error_code,"recursive_mutex: pthread_mutexattr_init failed"); pthread_mutexattr_settype( &mtx_attr, PTHREAD_MUTEX_RECURSIVE ); error_code = pthread_mutex_init( &impl, &mtx_attr ); if( error_code ) tbb::internal::handle_perror(error_code,"recursive_mutex: pthread_mutex_init failed"); pthread_mutexattr_destroy( &mtx_attr ); #endif /* _WIN32||_WIN64*/ ITT_SYNC_CREATE(&impl, _T("tbb::recursive_mutex"), _T("")); } void recursive_mutex::internal_destroy() { #if _WIN32||_WIN64 switch( state ) { case INITIALIZED: DeleteCriticalSection(&impl); break; case DESTROYED: __TBB_ASSERT(false,"recursive_mutex: already destroyed"); break; default: __TBB_ASSERT(false,"recursive_mutex: illegal state for destruction"); break; } state = DESTROYED; #else int error_code = pthread_mutex_destroy(&impl); __TBB_ASSERT_EX(!error_code,"recursive_mutex: pthread_mutex_destroy failed"); #endif /* _WIN32||_WIN64 */ } } // namespace tbb ================================================ FILE: benchmarks/tbb/recursive_mutex.h ================================================ /* Copyright 2005-2014 Intel Corporation. All Rights Reserved. This file is part of Threading Building Blocks. Threading Building Blocks is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. Threading Building Blocks is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Threading Building Blocks; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA As a special exception, you may use this file as part of a free software library without restriction. Specifically, if other files instantiate templates or use macros or inline functions from this file, or you compile this file and link it with other files to produce an executable, this file does not by itself cause the resulting executable to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the executable file might be covered by the GNU General Public License. */ #ifndef __TBB_recursive_mutex_H #define __TBB_recursive_mutex_H #if _WIN32||_WIN64 #include "machine/windows_api.h" #else #include #endif /* _WIN32||_WIN64 */ #include #include "aligned_space.h" #include "tbb_stddef.h" #include "tbb_profiling.h" namespace tbb { //! Mutex that allows recursive mutex acquisition. /** Mutex that allows recursive mutex acquisition. @ingroup synchronization */ class recursive_mutex : internal::mutex_copy_deprecated_and_disabled { public: //! Construct unacquired recursive_mutex. recursive_mutex() { #if TBB_USE_ASSERT || TBB_USE_THREADING_TOOLS internal_construct(); #else #if _WIN32||_WIN64 InitializeCriticalSectionEx(&impl, 4000, 0); #else pthread_mutexattr_t mtx_attr; int error_code = pthread_mutexattr_init( &mtx_attr ); if( error_code ) tbb::internal::handle_perror(error_code,"recursive_mutex: pthread_mutexattr_init failed"); pthread_mutexattr_settype( &mtx_attr, PTHREAD_MUTEX_RECURSIVE ); error_code = pthread_mutex_init( &impl, &mtx_attr ); if( error_code ) tbb::internal::handle_perror(error_code,"recursive_mutex: pthread_mutex_init failed"); pthread_mutexattr_destroy( &mtx_attr ); #endif /* _WIN32||_WIN64*/ #endif /* TBB_USE_ASSERT */ }; ~recursive_mutex() { #if TBB_USE_ASSERT internal_destroy(); #else #if _WIN32||_WIN64 DeleteCriticalSection(&impl); #else pthread_mutex_destroy(&impl); #endif /* _WIN32||_WIN64 */ #endif /* TBB_USE_ASSERT */ }; class scoped_lock; friend class scoped_lock; //! The scoped locking pattern /** It helps to avoid the common problem of forgetting to release lock. It also nicely provides the "node" for queuing locks. */ class scoped_lock: internal::no_copy { public: //! Construct lock that has not acquired a recursive_mutex. scoped_lock() : my_mutex(NULL) {}; //! Acquire lock on given mutex. scoped_lock( recursive_mutex& mutex ) { #if TBB_USE_ASSERT my_mutex = &mutex; #endif /* TBB_USE_ASSERT */ acquire( mutex ); } //! Release lock (if lock is held). ~scoped_lock() { if( my_mutex ) release(); } //! Acquire lock on given mutex. void acquire( recursive_mutex& mutex ) { #if TBB_USE_ASSERT internal_acquire( mutex ); #else my_mutex = &mutex; mutex.lock(); #endif /* TBB_USE_ASSERT */ } //! Try acquire lock on given recursive_mutex. bool try_acquire( recursive_mutex& mutex ) { #if TBB_USE_ASSERT return internal_try_acquire( mutex ); #else bool result = mutex.try_lock(); if( result ) my_mutex = &mutex; return result; #endif /* TBB_USE_ASSERT */ } //! Release lock void release() { #if TBB_USE_ASSERT internal_release(); #else my_mutex->unlock(); my_mutex = NULL; #endif /* TBB_USE_ASSERT */ } private: //! The pointer to the current recursive_mutex to work recursive_mutex* my_mutex; //! All checks from acquire using mutex.state were moved here void __TBB_EXPORTED_METHOD internal_acquire( recursive_mutex& m ); //! All checks from try_acquire using mutex.state were moved here bool __TBB_EXPORTED_METHOD internal_try_acquire( recursive_mutex& m ); //! All checks from release using mutex.state were moved here void __TBB_EXPORTED_METHOD internal_release(); friend class recursive_mutex; }; // Mutex traits static const bool is_rw_mutex = false; static const bool is_recursive_mutex = true; static const bool is_fair_mutex = false; // C++0x compatibility interface //! Acquire lock void lock() { #if TBB_USE_ASSERT aligned_space tmp; new(tmp.begin()) scoped_lock(*this); #else #if _WIN32||_WIN64 EnterCriticalSection(&impl); #else int error_code = pthread_mutex_lock(&impl); if( error_code ) tbb::internal::handle_perror(error_code,"recursive_mutex: pthread_mutex_lock failed"); #endif /* _WIN32||_WIN64 */ #endif /* TBB_USE_ASSERT */ } //! Try acquiring lock (non-blocking) /** Return true if lock acquired; false otherwise. */ bool try_lock() { #if TBB_USE_ASSERT aligned_space tmp; return (new(tmp.begin()) scoped_lock)->internal_try_acquire(*this); #else #if _WIN32||_WIN64 return TryEnterCriticalSection(&impl)!=0; #else return pthread_mutex_trylock(&impl)==0; #endif /* _WIN32||_WIN64 */ #endif /* TBB_USE_ASSERT */ } //! Release lock void unlock() { #if TBB_USE_ASSERT aligned_space tmp; scoped_lock& s = *tmp.begin(); s.my_mutex = this; s.internal_release(); #else #if _WIN32||_WIN64 LeaveCriticalSection(&impl); #else pthread_mutex_unlock(&impl); #endif /* _WIN32||_WIN64 */ #endif /* TBB_USE_ASSERT */ } //! Return native_handle #if _WIN32||_WIN64 typedef LPCRITICAL_SECTION native_handle_type; #else typedef pthread_mutex_t* native_handle_type; #endif native_handle_type native_handle() { return (native_handle_type) &impl; } private: #if _WIN32||_WIN64 CRITICAL_SECTION impl; enum state_t { INITIALIZED=0x1234, DESTROYED=0x789A, } state; #else pthread_mutex_t impl; #endif /* _WIN32||_WIN64 */ //! All checks from mutex constructor using mutex.state were moved here void __TBB_EXPORTED_METHOD internal_construct(); //! All checks from mutex destructor using mutex.state were moved here void __TBB_EXPORTED_METHOD internal_destroy(); }; __TBB_DEFINE_PROFILING_SET_NAME(recursive_mutex) } // namespace tbb #endif /* __TBB_recursive_mutex_H */ ================================================ FILE: benchmarks/tbb/runtime_loader.h ================================================ /* Copyright 2005-2014 Intel Corporation. All Rights Reserved. This file is part of Threading Building Blocks. Threading Building Blocks is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. Threading Building Blocks is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Threading Building Blocks; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA As a special exception, you may use this file as part of a free software library without restriction. Specifically, if other files instantiate templates or use macros or inline functions from this file, or you compile this file and link it with other files to produce an executable, this file does not by itself cause the resulting executable to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the executable file might be covered by the GNU General Public License. */ #ifndef __TBB_runtime_loader_H #define __TBB_runtime_loader_H #if ! TBB_PREVIEW_RUNTIME_LOADER #error Set TBB_PREVIEW_RUNTIME_LOADER to include runtime_loader.h #endif #include "tbb_stddef.h" #include #if _MSC_VER #if ! __TBB_NO_IMPLICIT_LINKAGE #ifdef _DEBUG #pragma comment( linker, "/nodefaultlib:tbb_debug.lib" ) #pragma comment( linker, "/defaultlib:tbbproxy_debug.lib" ) #else #pragma comment( linker, "/nodefaultlib:tbb.lib" ) #pragma comment( linker, "/defaultlib:tbbproxy.lib" ) #endif #endif #endif namespace tbb { namespace interface6 { //! Load TBB at runtime. /*! \b Usage: In source code: \code #include "tbb/runtime_loader.h" char const * path[] = { "/lib/ia32", NULL }; tbb::runtime_loader loader( path ); // Now use TBB. \endcode Link with \c tbbproxy.lib (or \c libtbbproxy.a) instead of \c tbb.lib (\c libtbb.dylib, \c libtbb.so). TBB library will be loaded at runtime from \c /lib/ia32 directory. \b Attention: All \c runtime_loader objects (in the same module, i.e. exe or dll) share some global state. The most noticeable piece of global state is loaded TBB library. There are some implications: - Only one TBB library can be loaded per module. - If one object has already loaded TBB library, another object will not load TBB. If the loaded TBB library is suitable for the second object, both will use TBB cooperatively, otherwise the second object will report an error. - \c runtime_loader objects will not work (correctly) in parallel due to absence of synchronization. */ class runtime_loader : tbb::internal::no_copy { public: //! Error mode constants. enum error_mode { em_status, //!< Save status of operation and continue. em_throw, //!< Throw an exception of tbb::runtime_loader::error_code type. em_abort //!< Print message to \c stderr and call \c abort(). }; // error_mode //! Error codes. enum error_code { ec_ok, //!< No errors. ec_bad_call, //!< Invalid function call (e. g. load() called when TBB is already loaded). ec_bad_arg, //!< Invalid argument passed. ec_bad_lib, //!< Invalid library found (e. g. \c TBB_runtime_version symbol not found). ec_bad_ver, //!< TBB found but version is not suitable. ec_no_lib //!< No suitable TBB library found. }; // error_code //! Initialize object but do not load TBB. runtime_loader( error_mode mode = em_abort ); //! Initialize object and load TBB. /*! See load() for details. If error mode is \c em_status, call status() to check whether TBB was loaded or not. */ runtime_loader( char const * path[], //!< List of directories to search TBB in. int min_ver = TBB_INTERFACE_VERSION, //!< Minimal suitable version of TBB. int max_ver = INT_MAX, //!< Maximal suitable version of TBB. error_mode mode = em_abort //!< Error mode for this object. ); //! Destroy object. ~runtime_loader(); //! Load TBB. /*! The method searches the directories specified in \c path[] array for the TBB library. When the library is found, it is loaded and its version is checked. If the version is not suitable, the library is unloaded, and the search continues. \b Note: For security reasons, avoid using relative directory names. For example, never load TBB from current (\c "."), parent (\c "..") or any other relative directory (like \c "lib" ). Use only absolute directory names (e. g. "/usr/local/lib"). For the same security reasons, avoid using system default directories (\c "") on Windows. (See http://www.microsoft.com/technet/security/advisory/2269637.mspx for details.) Neglecting these rules may cause your program to execute 3-rd party malicious code. \b Errors: - \c ec_bad_call - TBB already loaded by this object. - \c ec_bad_arg - \p min_ver and/or \p max_ver negative or zero, or \p min_ver > \p max_ver. - \c ec_bad_ver - TBB of unsuitable version already loaded by another object. - \c ec_no_lib - No suitable library found. */ error_code load( char const * path[], //!< List of directories to search TBB in. int min_ver = TBB_INTERFACE_VERSION, //!< Minimal suitable version of TBB. int max_ver = INT_MAX //!< Maximal suitable version of TBB. ); //! Report status. /*! If error mode is \c em_status, the function returns status of the last operation. */ error_code status(); private: error_mode const my_mode; error_code my_status; bool my_loaded; }; // class runtime_loader } // namespace interface6 using interface6::runtime_loader; } // namespace tbb #endif /* __TBB_runtime_loader_H */ ================================================ FILE: benchmarks/tbb/scalable_allocator.h ================================================ /* Copyright 2005-2014 Intel Corporation. All Rights Reserved. This file is part of Threading Building Blocks. Threading Building Blocks is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. Threading Building Blocks is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Threading Building Blocks; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA As a special exception, you may use this file as part of a free software library without restriction. Specifically, if other files instantiate templates or use macros or inline functions from this file, or you compile this file and link it with other files to produce an executable, this file does not by itself cause the resulting executable to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the executable file might be covered by the GNU General Public License. */ #ifndef __TBB_scalable_allocator_H #define __TBB_scalable_allocator_H /** @file */ #include /* Need ptrdiff_t and size_t from here. */ #if !_MSC_VER #include /* Need intptr_t from here. */ #endif #if !defined(__cplusplus) && __ICC==1100 #pragma warning (push) #pragma warning (disable: 991) #endif #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ #if _MSC_VER >= 1400 #define __TBB_EXPORTED_FUNC __cdecl #else #define __TBB_EXPORTED_FUNC #endif /** The "malloc" analogue to allocate block of memory of size bytes. * @ingroup memory_allocation */ void * __TBB_EXPORTED_FUNC scalable_malloc (size_t size); /** The "free" analogue to discard a previously allocated piece of memory. @ingroup memory_allocation */ void __TBB_EXPORTED_FUNC scalable_free (void* ptr); /** The "realloc" analogue complementing scalable_malloc. @ingroup memory_allocation */ void * __TBB_EXPORTED_FUNC scalable_realloc (void* ptr, size_t size); /** The "calloc" analogue complementing scalable_malloc. @ingroup memory_allocation */ void * __TBB_EXPORTED_FUNC scalable_calloc (size_t nobj, size_t size); /** The "posix_memalign" analogue. @ingroup memory_allocation */ int __TBB_EXPORTED_FUNC scalable_posix_memalign (void** memptr, size_t alignment, size_t size); /** The "_aligned_malloc" analogue. @ingroup memory_allocation */ void * __TBB_EXPORTED_FUNC scalable_aligned_malloc (size_t size, size_t alignment); /** The "_aligned_realloc" analogue. @ingroup memory_allocation */ void * __TBB_EXPORTED_FUNC scalable_aligned_realloc (void* ptr, size_t size, size_t alignment); /** The "_aligned_free" analogue. @ingroup memory_allocation */ void __TBB_EXPORTED_FUNC scalable_aligned_free (void* ptr); /** The analogue of _msize/malloc_size/malloc_usable_size. Returns the usable size of a memory block previously allocated by scalable_*, or 0 (zero) if ptr does not point to such a block. @ingroup memory_allocation */ size_t __TBB_EXPORTED_FUNC scalable_msize (void* ptr); /* Results for scalable_allocation_* functions */ typedef enum { TBBMALLOC_OK, TBBMALLOC_INVALID_PARAM, TBBMALLOC_UNSUPPORTED, TBBMALLOC_NO_MEMORY, TBBMALLOC_NO_EFFECT } ScalableAllocationResult; /* Setting TBB_MALLOC_USE_HUGE_PAGES environment variable to 1 enables huge pages. scalable_allocation_mode call has priority over environment variable. */ typedef enum { TBBMALLOC_USE_HUGE_PAGES, /* value turns using huge pages on and off */ /* deprecated, kept for backward compatibility only */ USE_HUGE_PAGES = TBBMALLOC_USE_HUGE_PAGES, /* try to limit memory consumption value Bytes, clean internal buffers if limit is exceeded, but not prevents from requesting memory from OS */ TBBMALLOC_SET_SOFT_HEAP_LIMIT } AllocationModeParam; /** Set TBB allocator-specific allocation modes. @ingroup memory_allocation */ int __TBB_EXPORTED_FUNC scalable_allocation_mode(int param, intptr_t value); typedef enum { /* Clean internal allocator buffers for all threads. Returns TBBMALLOC_NO_EFFECT if no buffers cleaned, TBBMALLOC_OK if some memory released from buffers. */ TBBMALLOC_CLEAN_ALL_BUFFERS, /* Clean internal allocator buffer for current thread only. Return values same as for TBBMALLOC_CLEAN_ALL_BUFFERS. */ TBBMALLOC_CLEAN_THREAD_BUFFERS } ScalableAllocationCmd; /** Call TBB allocator-specific commands. @ingroup memory_allocation */ int __TBB_EXPORTED_FUNC scalable_allocation_command(int cmd, void *param); #ifdef __cplusplus } /* extern "C" */ #endif /* __cplusplus */ #ifdef __cplusplus //! The namespace rml contains components of low-level memory pool interface. namespace rml { class MemoryPool; typedef void *(*rawAllocType)(intptr_t pool_id, size_t &bytes); typedef int (*rawFreeType)(intptr_t pool_id, void* raw_ptr, size_t raw_bytes); /* MemPoolPolicy extension must be compatible with such structure fields layout struct MemPoolPolicy { rawAllocType pAlloc; rawFreeType pFree; size_t granularity; // granularity of pAlloc allocations }; */ struct MemPoolPolicy { enum { TBBMALLOC_POOL_VERSION = 1 }; rawAllocType pAlloc; rawFreeType pFree; // granularity of pAlloc allocations. 0 means default used. size_t granularity; int version; // all memory consumed at 1st pAlloc call and never returned, // no more pAlloc calls after 1st unsigned fixedPool : 1, // memory consumed but returned only at pool termination keepAllMemory : 1, reserved : 30; MemPoolPolicy(rawAllocType pAlloc_, rawFreeType pFree_, size_t granularity_ = 0, bool fixedPool_ = false, bool keepAllMemory_ = false) : pAlloc(pAlloc_), pFree(pFree_), granularity(granularity_), version(TBBMALLOC_POOL_VERSION), fixedPool(fixedPool_), keepAllMemory(keepAllMemory_), reserved(0) {} }; // enums have same values as appropriate enums from ScalableAllocationResult // TODO: use ScalableAllocationResult in pool_create directly enum MemPoolError { // pool created successfully POOL_OK = TBBMALLOC_OK, // invalid policy parameters found INVALID_POLICY = TBBMALLOC_INVALID_PARAM, // requested pool policy is not supported by allocator library UNSUPPORTED_POLICY = TBBMALLOC_UNSUPPORTED, // lack of memory during pool creation NO_MEMORY = TBBMALLOC_NO_MEMORY, // action takes no effect NO_EFFECT = TBBMALLOC_NO_EFFECT }; MemPoolError pool_create_v1(intptr_t pool_id, const MemPoolPolicy *policy, rml::MemoryPool **pool); bool pool_destroy(MemoryPool* memPool); void *pool_malloc(MemoryPool* memPool, size_t size); void *pool_realloc(MemoryPool* memPool, void *object, size_t size); void *pool_aligned_malloc(MemoryPool* mPool, size_t size, size_t alignment); void *pool_aligned_realloc(MemoryPool* mPool, void *ptr, size_t size, size_t alignment); bool pool_reset(MemoryPool* memPool); bool pool_free(MemoryPool *memPool, void *object); } #include /* To use new with the placement argument */ /* Ensure that including this header does not cause implicit linkage with TBB */ #ifndef __TBB_NO_IMPLICIT_LINKAGE #define __TBB_NO_IMPLICIT_LINKAGE 1 #include "tbb_stddef.h" #undef __TBB_NO_IMPLICIT_LINKAGE #else #include "tbb_stddef.h" #endif #if __TBB_ALLOCATOR_CONSTRUCT_VARIADIC #include // std::forward #endif namespace tbb { #if _MSC_VER && !defined(__INTEL_COMPILER) // Workaround for erroneous "unreferenced parameter" warning in method destroy. #pragma warning (push) #pragma warning (disable: 4100) #endif //! Meets "allocator" requirements of ISO C++ Standard, Section 20.1.5 /** The members are ordered the same way they are in section 20.4.1 of the ISO C++ standard. @ingroup memory_allocation */ template class scalable_allocator { public: typedef typename internal::allocator_type::value_type value_type; typedef value_type* pointer; typedef const value_type* const_pointer; typedef value_type& reference; typedef const value_type& const_reference; typedef size_t size_type; typedef ptrdiff_t difference_type; template struct rebind { typedef scalable_allocator other; }; scalable_allocator() throw() {} scalable_allocator( const scalable_allocator& ) throw() {} template scalable_allocator(const scalable_allocator&) throw() {} pointer address(reference x) const {return &x;} const_pointer address(const_reference x) const {return &x;} //! Allocate space for n objects. pointer allocate( size_type n, const void* /*hint*/ =0 ) { return static_cast( scalable_malloc( n * sizeof(value_type) ) ); } //! Free previously allocated block of memory void deallocate( pointer p, size_type ) { scalable_free( p ); } //! Largest value for which method allocate might succeed. size_type max_size() const throw() { size_type absolutemax = static_cast(-1) / sizeof (value_type); return (absolutemax > 0 ? absolutemax : 1); } #if __TBB_ALLOCATOR_CONSTRUCT_VARIADIC template void construct(U *p, Args&&... args) { ::new((void *)p) U(std::forward(args)...); } #else // __TBB_ALLOCATOR_CONSTRUCT_VARIADIC #if __TBB_CPP11_RVALUE_REF_PRESENT void construct( pointer p, value_type&& value ) { ::new((void*)(p)) value_type( std::move( value ) ); } #endif void construct( pointer p, const value_type& value ) {::new((void*)(p)) value_type(value);} #endif // __TBB_ALLOCATOR_CONSTRUCT_VARIADIC void destroy( pointer p ) {p->~value_type();} }; #if _MSC_VER && !defined(__INTEL_COMPILER) #pragma warning (pop) #endif // warning 4100 is back //! Analogous to std::allocator, as defined in ISO C++ Standard, Section 20.4.1 /** @ingroup memory_allocation */ template<> class scalable_allocator { public: typedef void* pointer; typedef const void* const_pointer; typedef void value_type; template struct rebind { typedef scalable_allocator other; }; }; template inline bool operator==( const scalable_allocator&, const scalable_allocator& ) {return true;} template inline bool operator!=( const scalable_allocator&, const scalable_allocator& ) {return false;} } // namespace tbb #if _MSC_VER #if (__TBB_BUILD || __TBBMALLOC_BUILD) && !defined(__TBBMALLOC_NO_IMPLICIT_LINKAGE) #define __TBBMALLOC_NO_IMPLICIT_LINKAGE 1 #endif #if !__TBBMALLOC_NO_IMPLICIT_LINKAGE #ifdef _DEBUG #pragma comment(lib, "tbbmalloc_debug.lib") #else #pragma comment(lib, "tbbmalloc.lib") #endif #endif #endif #endif /* __cplusplus */ #if !defined(__cplusplus) && __ICC==1100 #pragma warning (pop) #endif // ICC 11.0 warning 991 is back #endif /* __TBB_scalable_allocator_H */ ================================================ FILE: benchmarks/tbb/scheduler.cpp ================================================ /* Copyright 2005-2014 Intel Corporation. All Rights Reserved. This file is part of Threading Building Blocks. Threading Building Blocks is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. Threading Building Blocks is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Threading Building Blocks; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA As a special exception, you may use this file as part of a free software library without restriction. Specifically, if other files instantiate templates or use macros or inline functions from this file, or you compile this file and link it with other files to produce an executable, this file does not by itself cause the resulting executable to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the executable file might be covered by the GNU General Public License. */ #include "custom_scheduler.h" #include "scheduler_utility.h" #include "governor.h" #include "market.h" #include "arena.h" #include "mailbox.h" #include "observer_proxy.h" #include "tbb/tbb_machine.h" #include "tbb/atomic.h" namespace tbb { namespace internal { //------------------------------------------------------------------------ // Library initialization //------------------------------------------------------------------------ /** Defined in tbb_main.cpp **/ extern generic_scheduler* (*AllocateSchedulerPtr)( arena*, size_t index ); inline generic_scheduler* allocate_scheduler ( arena* a, size_t index ) { return AllocateSchedulerPtr(a, index); } #if __TBB_TASK_GROUP_CONTEXT context_state_propagation_mutex_type the_context_state_propagation_mutex; uintptr_t the_context_state_propagation_epoch = 0; //! Context to be associated with dummy tasks of worker threads schedulers. /** It is never used for its direct purpose, and is introduced solely for the sake of avoiding one extra conditional branch in the end of wait_for_all method. **/ static task_group_context the_dummy_context(task_group_context::isolated); #endif /* __TBB_TASK_GROUP_CONTEXT */ void Scheduler_OneTimeInitialization ( bool itt_present ) { AllocateSchedulerPtr = itt_present ? &custom_scheduler::allocate_scheduler : &custom_scheduler::allocate_scheduler; #if __TBB_TASK_GROUP_CONTEXT // There must be no tasks belonging to this fake task group. Mark invalid for the assert __TBB_ASSERT(!(task_group_context::low_unused_state_bit & (task_group_context::low_unused_state_bit-1)), NULL); the_dummy_context.my_state = task_group_context::low_unused_state_bit; #if __TBB_TASK_PRIORITY // It should never prevent tasks from being passed to execution. the_dummy_context.my_priority = num_priority_levels - 1; #endif /* __TBB_TASK_PRIORITY */ #endif /* __TBB_TASK_GROUP_CONTEXT */ } //------------------------------------------------------------------------ // scheduler interface //------------------------------------------------------------------------ // A pure virtual destructor should still have a body // so the one for tbb::internal::scheduler::~scheduler() is provided here scheduler::~scheduler( ) {} //------------------------------------------------------------------------ // generic_scheduler //------------------------------------------------------------------------ #if _MSC_VER && !defined(__INTEL_COMPILER) // Suppress overzealous compiler warning about using 'this' in base initializer list. #pragma warning(push) #pragma warning(disable:4355) #endif generic_scheduler::generic_scheduler( arena* a, size_t index ) : my_stealing_threshold(0) , my_market(NULL) , my_random( this ) , my_free_list(NULL) #if __TBB_HOARD_NONLOCAL_TASKS , my_nonlocal_free_list(NULL) #endif , my_dummy_task(NULL) , my_ref_count(1) , my_auto_initialized(false) #if __TBB_COUNT_TASK_NODES , my_task_node_count(0) #endif /* __TBB_COUNT_TASK_NODES */ , my_small_task_count(1) // Extra 1 is a guard reference , my_return_list(NULL) #if __TBB_TASK_GROUP_CONTEXT , my_local_ctx_list_update(make_atomic(uintptr_t(0))) #endif /* __TBB_TASK_GROUP_CONTEXT */ #if __TBB_TASK_PRIORITY , my_offloaded_tasks(NULL) , my_offloaded_task_list_tail_link(NULL) , my_local_reload_epoch(0) , my_pool_reshuffling_pending(false) #endif /* __TBB_TASK_PRIORITY */ #if __TBB_TASK_GROUP_CONTEXT , my_nonlocal_ctx_list_update(make_atomic(uintptr_t(0))) #endif /* __TBB_TASK_GROUP_CONTEXT */ #if __TBB_SURVIVE_THREAD_SWITCH && TBB_USE_ASSERT , my_cilk_state(cs_none) #endif /* __TBB_SURVIVE_THREAD_SWITCH && TBB_USE_ASSERT */ { my_arena_index = index; my_arena_slot = 0; my_arena = a; my_innermost_running_task = NULL; my_dispatching_task = NULL; my_affinity_id = 0; #if __TBB_SCHEDULER_OBSERVER my_last_global_observer = NULL; my_last_local_observer = NULL; #endif /* __TBB_SCHEDULER_OBSERVER */ #if __TBB_TASK_PRIORITY my_ref_top_priority = NULL; my_ref_reload_epoch = NULL; #endif /* __TBB_TASK_PRIORITY */ my_dummy_task = &allocate_task( sizeof(task), __TBB_CONTEXT_ARG(NULL, NULL) ); #if __TBB_TASK_GROUP_CONTEXT my_context_list_head.my_prev = &my_context_list_head; my_context_list_head.my_next = &my_context_list_head; ITT_SYNC_CREATE(&my_context_list_mutex, SyncType_Scheduler, SyncObj_ContextsList); #endif /* __TBB_TASK_GROUP_CONTEXT */ my_dummy_task->prefix().ref_count = 2; ITT_SYNC_CREATE(&my_dummy_task->prefix().ref_count, SyncType_Scheduler, SyncObj_WorkerLifeCycleMgmt); ITT_SYNC_CREATE(&my_return_list, SyncType_Scheduler, SyncObj_TaskReturnList); assert_task_pool_valid(); #if __TBB_SURVIVE_THREAD_SWITCH my_cilk_unwatch_thunk.routine = NULL; #endif /* __TBB_SURVIVE_THREAD_SWITCH */ } #if _MSC_VER && !defined(__INTEL_COMPILER) #pragma warning(pop) #endif // warning 4355 is back #if TBB_USE_ASSERT > 1 void generic_scheduler::assert_task_pool_valid() const { acquire_task_pool(); task** tp = my_arena_slot->task_pool_ptr; __TBB_ASSERT( my_arena_slot->my_task_pool_size >= min_task_pool_size, NULL ); const size_t H = __TBB_load_relaxed(my_arena_slot->head); // mirror const size_t T = __TBB_load_relaxed(my_arena_slot->tail); // mirror __TBB_ASSERT( H <= T, NULL ); for ( size_t i = 0; i < H; ++i ) __TBB_ASSERT( tp[i] == poisoned_ptr, "Task pool corrupted" ); for ( size_t i = H; i < T; ++i ) { __TBB_ASSERT( (uintptr_t)tp[i] + 1 > 1u, "nil or invalid task pointer in the deque" ); __TBB_ASSERT( tp[i]->prefix().state == task::ready || tp[i]->prefix().extra_state == es_task_proxy, "task in the deque has invalid state" ); } for ( size_t i = T; i < my_arena_slot->my_task_pool_size; ++i ) __TBB_ASSERT( tp[i] == poisoned_ptr, "Task pool corrupted" ); release_task_pool(); } #endif /* TBB_USE_ASSERT > 1 */ void generic_scheduler::init_stack_info () { // Stacks are growing top-down. Highest address is called "stack base", // and the lowest is "stack limit". __TBB_ASSERT( !my_stealing_threshold, "Stealing threshold has already been calculated" ); size_t stack_size = my_market->worker_stack_size(); #if USE_WINTHREAD #if defined(_MSC_VER)&&_MSC_VER<1400 && !_WIN64 NT_TIB *pteb = (NT_TIB*)__TBB_machine_get_current_teb(); #else NT_TIB *pteb = (NT_TIB*)NtCurrentTeb(); #endif __TBB_ASSERT( &pteb < pteb->StackBase && &pteb > pteb->StackLimit, "invalid stack info in TEB" ); __TBB_ASSERT( stack_size >0, "stack_size not initialized?" ); // When a thread is created with the attribute STACK_SIZE_PARAM_IS_A_RESERVATION, stack limit // in the TIB points to the committed part of the stack only. This renders the expression // "(uintptr_t)pteb->StackBase / 2 + (uintptr_t)pteb->StackLimit / 2" virtually useless. // Thus for worker threads we use the explicit stack size we used while creating them. // And for master threads we rely on the following fact and assumption: // - the default stack size of a master thread on Windows is 1M; // - if it was explicitly set by the application it is at least as large as the size of a worker stack. if ( is_worker() || stack_size < MByte ) my_stealing_threshold = (uintptr_t)pteb->StackBase - stack_size / 2; else my_stealing_threshold = (uintptr_t)pteb->StackBase - MByte / 2; #else /* USE_PTHREAD */ // There is no portable way to get stack base address in Posix, so we use // non-portable method (on all modern Linux) or the simplified approach // based on the common sense assumptions. The most important assumption // is that the main thread's stack size is not less than that of other threads. // See also comment 3 at the end of this file void *stack_base = &stack_size; #if __linux__ && !__bg__ #if __TBB_ipf void *rsb_base = __TBB_get_bsp(); #endif size_t np_stack_size = 0; void *stack_limit = NULL; pthread_attr_t np_attr_stack; if( 0 == pthread_getattr_np(pthread_self(), &np_attr_stack) ) { if ( 0 == pthread_attr_getstack(&np_attr_stack, &stack_limit, &np_stack_size) ) { #if __TBB_ipf pthread_attr_t attr_stack; if ( 0 == pthread_attr_init(&attr_stack) ) { if ( 0 == pthread_attr_getstacksize(&attr_stack, &stack_size) ) { if ( np_stack_size < stack_size ) { // We are in a secondary thread. Use reliable data. // IA-64 architecture stack is split into RSE backup and memory parts rsb_base = stack_limit; stack_size = np_stack_size/2; // Limit of the memory part of the stack stack_limit = (char*)stack_limit + stack_size; } // We are either in the main thread or this thread stack // is bigger that that of the main one. As we cannot discern // these cases we fall back to the default (heuristic) values. } pthread_attr_destroy(&attr_stack); } // IA-64 architecture stack is split into RSE backup and memory parts my_rsb_stealing_threshold = (uintptr_t)((char*)rsb_base + stack_size/2); #endif /* __TBB_ipf */ // Size of the stack free part stack_size = size_t((char*)stack_base - (char*)stack_limit); } pthread_attr_destroy(&np_attr_stack); } #endif /* __linux__ */ __TBB_ASSERT( stack_size>0, "stack size must be positive" ); my_stealing_threshold = (uintptr_t)((char*)stack_base - stack_size/2); #endif /* USE_PTHREAD */ } #if __TBB_TASK_GROUP_CONTEXT /** The function uses synchronization scheme similar to the one in the destructor of task_group_context augmented with interlocked state change of each context object. The purpose of this algo is to prevent threads doing nonlocal context destruction from accessing destroyed owner-scheduler instance still pointed to by the context object. **/ void generic_scheduler::cleanup_local_context_list () { // Detach contexts remaining in the local list bool wait_for_concurrent_destroyers_to_leave = false; uintptr_t local_count_snapshot = my_context_state_propagation_epoch; my_local_ctx_list_update.store(1); { // This is just a definition. Actual lock is acquired only in case of conflict. spin_mutex::scoped_lock lock; // Full fence prevents reordering of store to my_local_ctx_list_update with // load from my_nonlocal_ctx_list_update. atomic_fence(); // Check for the conflict with concurrent destroyer or cancellation propagator if ( my_nonlocal_ctx_list_update.load() || local_count_snapshot != the_context_state_propagation_epoch ) lock.acquire(my_context_list_mutex); // No acquire fence is necessary for loading my_context_list_head.my_next, // as the list can be updated by this thread only. context_list_node_t *node = my_context_list_head.my_next; while ( node != &my_context_list_head ) { task_group_context &ctx = __TBB_get_object_ref(task_group_context, my_node, node); __TBB_ASSERT( __TBB_load_relaxed(ctx.my_kind) != task_group_context::binding_required, "Only a context bound to a root task can be detached" ); node = node->my_next; __TBB_ASSERT( is_alive(ctx.my_version_and_traits), "Walked into a destroyed context while detaching contexts from the local list" ); // Synchronizes with ~task_group_context(). TODO: evaluate and perhaps relax if ( internal::as_atomic(ctx.my_kind).fetch_and_store(task_group_context::detached) == task_group_context::dying ) wait_for_concurrent_destroyers_to_leave = true; } } my_local_ctx_list_update.store(0); // Wait until other threads referencing this scheduler object finish with it if ( wait_for_concurrent_destroyers_to_leave ) spin_wait_until_eq( my_nonlocal_ctx_list_update, 0u ); } #endif /* __TBB_TASK_GROUP_CONTEXT */ void generic_scheduler::free_scheduler() { __TBB_ASSERT( !my_arena_slot, NULL ); #if __TBB_TASK_GROUP_CONTEXT cleanup_local_context_list(); #endif /* __TBB_TASK_GROUP_CONTEXT */ free_task( *my_dummy_task ); #if __TBB_HOARD_NONLOCAL_TASKS while( task* t = my_nonlocal_free_list ) { task_prefix& p = t->prefix(); my_nonlocal_free_list = p.next; __TBB_ASSERT( p.origin && p.origin!=this, NULL ); free_nonlocal_small_task(*t); } #endif // k accounts for a guard reference and each task that we deallocate. intptr_t k = 1; for(;;) { while( task* t = my_free_list ) { my_free_list = t->prefix().next; deallocate_task(*t); ++k; } if( my_return_list==plugged_return_list() ) break; my_free_list = (task*)__TBB_FetchAndStoreW( &my_return_list, (intptr_t)plugged_return_list() ); } #if __TBB_COUNT_TASK_NODES my_market->update_task_node_count( my_task_node_count ); #endif /* __TBB_COUNT_TASK_NODES */ // Update my_small_task_count last. Doing so sooner might cause another thread to free *this. __TBB_ASSERT( my_small_task_count>=k, "my_small_task_count corrupted" ); governor::sign_off(this); if( __TBB_FetchAndAddW( &my_small_task_count, -k )==k ) NFS_Free( this ); } task& generic_scheduler::allocate_task( size_t number_of_bytes, __TBB_CONTEXT_ARG(task* parent, task_group_context* context) ) { GATHER_STATISTIC(++my_counters.active_tasks); task *t; if( number_of_bytes<=quick_task_size ) { #if __TBB_HOARD_NONLOCAL_TASKS if( (t = my_nonlocal_free_list) ) { GATHER_STATISTIC(--my_counters.free_list_length); __TBB_ASSERT( t->state()==task::freed, "free list of tasks is corrupted" ); my_nonlocal_free_list = t->prefix().next; } else #endif if( (t = my_free_list) ) { GATHER_STATISTIC(--my_counters.free_list_length); __TBB_ASSERT( t->state()==task::freed, "free list of tasks is corrupted" ); my_free_list = t->prefix().next; } else if( my_return_list ) { // No fence required for read of my_return_list above, because __TBB_FetchAndStoreW has a fence. t = (task*)__TBB_FetchAndStoreW( &my_return_list, 0 ); // with acquire __TBB_ASSERT( t, "another thread emptied the my_return_list" ); __TBB_ASSERT( t->prefix().origin==this, "task returned to wrong my_return_list" ); ITT_NOTIFY( sync_acquired, &my_return_list ); my_free_list = t->prefix().next; } else { t = (task*)((char*)NFS_Allocate( 1, task_prefix_reservation_size+quick_task_size, NULL ) + task_prefix_reservation_size ); #if __TBB_COUNT_TASK_NODES ++my_task_node_count; #endif /* __TBB_COUNT_TASK_NODES */ t->prefix().origin = this; t->prefix().next = 0; ++my_small_task_count; } #if __TBB_PREFETCHING task *t_next = t->prefix().next; if( !t_next ) { // the task was last in the list #if __TBB_HOARD_NONLOCAL_TASKS if( my_free_list ) t_next = my_free_list; else #endif if( my_return_list ) // enable prefetching, gives speedup t_next = my_free_list = (task*)__TBB_FetchAndStoreW( &my_return_list, 0 ); } if( t_next ) { // gives speedup for both cache lines __TBB_cl_prefetch(t_next); __TBB_cl_prefetch(&t_next->prefix()); } #endif /* __TBB_PREFETCHING */ } else { GATHER_STATISTIC(++my_counters.big_tasks); t = (task*)((char*)NFS_Allocate( 1, task_prefix_reservation_size+number_of_bytes, NULL ) + task_prefix_reservation_size ); #if __TBB_COUNT_TASK_NODES ++my_task_node_count; #endif /* __TBB_COUNT_TASK_NODES */ t->prefix().origin = NULL; } task_prefix& p = t->prefix(); #if __TBB_TASK_GROUP_CONTEXT p.context = context; #endif /* __TBB_TASK_GROUP_CONTEXT */ // Obsolete. But still in use, so has to be assigned correct value here. p.owner = this; p.ref_count = 0; // Obsolete. Assign some not outrageously out-of-place value for a while. p.depth = 0; p.parent = parent; // In TBB 2.1 and later, the constructor for task sets extra_state to indicate the version of the tbb/task.h header. // In TBB 2.0 and earlier, the constructor leaves extra_state as zero. p.extra_state = 0; p.affinity = 0; p.state = task::allocated; return *t; } void generic_scheduler::free_nonlocal_small_task( task& t ) { __TBB_ASSERT( t.state()==task::freed, NULL ); generic_scheduler& s = *static_cast(t.prefix().origin); __TBB_ASSERT( &s!=this, NULL ); for(;;) { task* old = s.my_return_list; if( old==plugged_return_list() ) break; // Atomically insert t at head of s.my_return_list t.prefix().next = old; ITT_NOTIFY( sync_releasing, &s.my_return_list ); if( as_atomic(s.my_return_list).compare_and_swap(&t, old )==old ) { #if __TBB_PREFETCHING __TBB_cl_evict(&t.prefix()); __TBB_cl_evict(&t); #endif return; } } deallocate_task(t); if( __TBB_FetchAndDecrementWrelease( &s.my_small_task_count )==1 ) { // We freed the last task allocated by scheduler s, so it's our responsibility // to free the scheduler. NFS_Free( &s ); } } size_t generic_scheduler::prepare_task_pool ( size_t num_tasks ) { size_t T = __TBB_load_relaxed(my_arena_slot->tail); // mirror if ( T + num_tasks <= my_arena_slot->my_task_pool_size ) return T; acquire_task_pool(); size_t H = __TBB_load_relaxed(my_arena_slot->head); // mirror T -= H; size_t new_size = T + num_tasks; __TBB_ASSERT(!my_arena_slot->my_task_pool_size || my_arena_slot->my_task_pool_size >= min_task_pool_size, NULL); if( !my_arena_slot->my_task_pool_size ) { __TBB_ASSERT( !in_arena() && !my_arena_slot->task_pool_ptr, NULL ); if( new_size < min_task_pool_size ) new_size = min_task_pool_size; my_arena_slot->allocate_task_pool( new_size ); } // If the free space at the beginning of the task pool is too short, we // are likely facing a pathological single-producer-multiple-consumers // scenario, and thus it's better to expand the task pool else if ( new_size <= my_arena_slot->my_task_pool_size - min_task_pool_size/4 ) { // Relocate the busy part to the beginning of the deque memmove( my_arena_slot->task_pool_ptr, my_arena_slot->task_pool_ptr + H, T * sizeof(task*) ); my_arena_slot->fill_with_canary_pattern( T, my_arena_slot->tail ); commit_relocated_tasks(T); } else { // Grow task pool. As this operation is rare, and its cost is asymptotically // amortizable, we can tolerate new task pool allocation done under the lock. if ( new_size < 2 * my_arena_slot->my_task_pool_size ) new_size = 2 * my_arena_slot->my_task_pool_size; task** old_pool = my_arena_slot->task_pool_ptr; my_arena_slot->allocate_task_pool( new_size ); // updates my_task_pool_size __TBB_ASSERT( T <= my_arena_slot->my_task_pool_size, "new task pool is too short" ); memcpy( my_arena_slot->task_pool_ptr, old_pool + H, T * sizeof(task*) ); commit_relocated_tasks(T); __TBB_ASSERT( old_pool, "attempt to free NULL TaskPool" ); NFS_Free( old_pool ); } assert_task_pool_valid(); return T; } /** ATTENTION: This method is mostly the same as generic_scheduler::lock_task_pool(), with a little different logic of slot state checks (slot is either locked or points to our task pool). Thus if either of them is changed, consider changing the counterpart as well. **/ inline void generic_scheduler::acquire_task_pool() const { if ( !in_arena() ) return; // we are not in arena - nothing to lock bool sync_prepare_done = false; for( atomic_backoff b;;b.pause() ) { #if TBB_USE_ASSERT __TBB_ASSERT( my_arena_slot == my_arena->my_slots + my_arena_index, "invalid arena slot index" ); // Local copy of the arena slot task pool pointer is necessary for the next // assertion to work correctly to exclude asynchronous state transition effect. task** tp = my_arena_slot->task_pool; __TBB_ASSERT( tp == LockedTaskPool || tp == my_arena_slot->task_pool_ptr, "slot ownership corrupt?" ); #endif if( my_arena_slot->task_pool != LockedTaskPool && as_atomic(my_arena_slot->task_pool).compare_and_swap(LockedTaskPool, my_arena_slot->task_pool_ptr ) == my_arena_slot->task_pool_ptr ) { // We acquired our own slot ITT_NOTIFY(sync_acquired, my_arena_slot); break; } else if( !sync_prepare_done ) { // Start waiting ITT_NOTIFY(sync_prepare, my_arena_slot); sync_prepare_done = true; } // Someone else acquired a lock, so pause and do exponential backoff. } __TBB_ASSERT( my_arena_slot->task_pool == LockedTaskPool, "not really acquired task pool" ); } // generic_scheduler::acquire_task_pool inline void generic_scheduler::release_task_pool() const { if ( !in_arena() ) return; // we are not in arena - nothing to unlock __TBB_ASSERT( my_arena_slot, "we are not in arena" ); __TBB_ASSERT( my_arena_slot->task_pool == LockedTaskPool, "arena slot is not locked" ); ITT_NOTIFY(sync_releasing, my_arena_slot); __TBB_store_with_release( my_arena_slot->task_pool, my_arena_slot->task_pool_ptr ); } /** ATTENTION: This method is mostly the same as generic_scheduler::acquire_task_pool(), with a little different logic of slot state checks (slot can be empty, locked or point to any task pool other than ours, and asynchronous transitions between all these states are possible). Thus if any of them is changed, consider changing the counterpart as well **/ inline task** generic_scheduler::lock_task_pool( arena_slot* victim_arena_slot ) const { task** victim_task_pool; bool sync_prepare_done = false; for( atomic_backoff backoff;; /*backoff pause embedded in the loop*/) { victim_task_pool = victim_arena_slot->task_pool; // NOTE: Do not use comparison of head and tail indices to check for // the presence of work in the victim's task pool, as they may give // incorrect indication because of task pool relocations and resizes. if ( victim_task_pool == EmptyTaskPool ) { // The victim thread emptied its task pool - nothing to lock if( sync_prepare_done ) ITT_NOTIFY(sync_cancel, victim_arena_slot); break; } if( victim_task_pool != LockedTaskPool && as_atomic(victim_arena_slot->task_pool).compare_and_swap(LockedTaskPool, victim_task_pool ) == victim_task_pool ) { // We've locked victim's task pool ITT_NOTIFY(sync_acquired, victim_arena_slot); break; } else if( !sync_prepare_done ) { // Start waiting ITT_NOTIFY(sync_prepare, victim_arena_slot); sync_prepare_done = true; } GATHER_STATISTIC( ++my_counters.thieves_conflicts ); // Someone else acquired a lock, so pause and do exponential backoff. #if __TBB_STEALING_ABORT_ON_CONTENTION if(!backoff.bounded_pause()) { // the 16 was acquired empirically and a theory behind it supposes // that number of threads becomes much bigger than number of // tasks which can be spawned by one thread causing excessive contention. // TODO: However even small arenas can benefit from the abort on contention // if preemption of a thief is a problem if(my_arena->my_limit >= 16) return EmptyTaskPool; __TBB_Yield(); } #else backoff.pause(); #endif } __TBB_ASSERT( victim_task_pool == EmptyTaskPool || (victim_arena_slot->task_pool == LockedTaskPool && victim_task_pool != LockedTaskPool), "not really locked victim's task pool?" ); return victim_task_pool; } // generic_scheduler::lock_task_pool inline void generic_scheduler::unlock_task_pool( arena_slot* victim_arena_slot, task** victim_task_pool ) const { __TBB_ASSERT( victim_arena_slot, "empty victim arena slot pointer" ); __TBB_ASSERT( victim_arena_slot->task_pool == LockedTaskPool, "victim arena slot is not locked" ); ITT_NOTIFY(sync_releasing, victim_arena_slot); __TBB_store_with_release( victim_arena_slot->task_pool, victim_task_pool ); } inline task* generic_scheduler::prepare_for_spawning( task* t ) { __TBB_ASSERT( t->state()==task::allocated, "attempt to spawn task that is not in 'allocated' state" ); t->prefix().state = task::ready; #if TBB_USE_ASSERT if( task* parent = t->parent() ) { internal::reference_count ref_count = parent->prefix().ref_count; __TBB_ASSERT( ref_count>=0, "attempt to spawn task whose parent has a ref_count<0" ); __TBB_ASSERT( ref_count!=0, "attempt to spawn task whose parent has a ref_count==0 (forgot to set_ref_count?)" ); parent->prefix().extra_state |= es_ref_count_active; } #endif /* TBB_USE_ASSERT */ affinity_id dst_thread = t->prefix().affinity; __TBB_ASSERT( dst_thread == 0 || is_version_3_task(*t), "backwards compatibility to TBB 2.0 tasks is broken" ); if( dst_thread != 0 && dst_thread != my_affinity_id ) { task_proxy& proxy = (task_proxy&)allocate_task( sizeof(task_proxy), __TBB_CONTEXT_ARG(NULL, NULL) ); // Mark as a proxy proxy.prefix().extra_state = es_task_proxy; proxy.outbox = &my_arena->mailbox(dst_thread); // Mark proxy as present in both locations (sender's task pool and destination mailbox) proxy.task_and_tag = intptr_t(t) | task_proxy::location_mask; #if __TBB_TASK_PRIORITY proxy.prefix().context = t->prefix().context; #endif /* __TBB_TASK_PRIORITY */ ITT_NOTIFY( sync_releasing, proxy.outbox ); // Mail the proxy - after this point t may be destroyed by another thread at any moment. proxy.outbox->push(proxy); return &proxy; } return t; } /** Conceptually, this method should be a member of class scheduler. But doing so would force us to publish class scheduler in the headers. */ void generic_scheduler::local_spawn( task& first, task*& next ) { __TBB_ASSERT( governor::is_set(this), NULL ); if ( &first.prefix().next == &next ) { // Single task is being spawned size_t T = prepare_task_pool( 1 ); my_arena_slot->task_pool_ptr[T] = prepare_for_spawning( &first ); commit_spawned_tasks( T + 1 ); } else { // Task list is being spawned task *arr[min_task_pool_size]; fast_reverse_vector tasks(arr, min_task_pool_size); task *t_next = NULL; for( task* t = &first; ; t = t_next ) { // If t is affinitized to another thread, it may already be executed // and destroyed by the time prepare_for_spawning returns. // So milk it while it is alive. bool end = &t->prefix().next == &next; t_next = t->prefix().next; tasks.push_back( prepare_for_spawning(t) ); if( end ) break; } size_t num_tasks = tasks.size(); size_t T = prepare_task_pool( num_tasks ); tasks.copy_memory( my_arena_slot->task_pool_ptr + T ); commit_spawned_tasks( T + num_tasks ); } if ( !in_arena() ) enter_arena(); my_arena->advertise_new_work(); assert_task_pool_valid(); } void generic_scheduler::local_spawn_root_and_wait( task& first, task*& next ) { __TBB_ASSERT( governor::is_set(this), NULL ); __TBB_ASSERT( &first, NULL ); auto_empty_task dummy( __TBB_CONTEXT_ARG(this, first.prefix().context) ); internal::reference_count n = 0; for( task* t=&first; ; t=t->prefix().next ) { ++n; __TBB_ASSERT( !t->prefix().parent, "not a root task, or already running" ); t->prefix().parent = &dummy; if( &t->prefix().next==&next ) break; #if __TBB_TASK_GROUP_CONTEXT __TBB_ASSERT( t->prefix().context == t->prefix().next->prefix().context, "all the root tasks in list must share the same context"); #endif /* __TBB_TASK_GROUP_CONTEXT */ } dummy.prefix().ref_count = n+1; if( n>1 ) local_spawn( *first.prefix().next, next ); local_wait_for_all( dummy, &first ); } void tbb::internal::generic_scheduler::spawn( task& first, task*& next ) { governor::local_scheduler()->local_spawn( first, next ); } void tbb::internal::generic_scheduler::spawn_root_and_wait( task& first, task*& next ) { governor::local_scheduler()->local_spawn_root_and_wait( first, next ); } void tbb::internal::generic_scheduler::enqueue( task& t, void* prio ) { generic_scheduler *s = governor::local_scheduler(); // these redirections are due to bw-compatibility, consider reworking some day __TBB_ASSERT( s->my_arena, "thread is not in any arena" ); s->my_arena->enqueue_task(t, (intptr_t)prio, s->my_random ); } #if __TBB_TASK_PRIORITY class auto_indicator : no_copy { volatile bool& my_indicator; public: auto_indicator ( volatile bool& indicator ) : my_indicator(indicator) { my_indicator = true ;} ~auto_indicator () { my_indicator = false; } }; task* generic_scheduler::winnow_task_pool () { GATHER_STATISTIC( ++my_counters.prio_winnowings ); __TBB_ASSERT( in_arena(), NULL ); __TBB_ASSERT( my_offloaded_tasks, "At least one task is expected to be already offloaded" ); // To eliminate possible sinking of the store to the indicator below the subsequent // store to my_arena_slot->tail, the stores should have either been separated // by full fence or both use release fences. And resetting indicator should have // been done with release fence. But since this is just an optimization, and // the corresponding checking sequence in arena::is_out_of_work() is not atomic // anyway, fences aren't used, so that not to penalize warmer path. auto_indicator indicator(my_pool_reshuffling_pending); // The purpose of the synchronization algorithm here is for the owner thread // to avoid locking task pool most of the time. size_t T0 = __TBB_load_relaxed(my_arena_slot->tail); __TBB_store_relaxed( my_arena_slot->tail, __TBB_load_relaxed(my_arena_slot->head) - 1 ); atomic_fence(); size_t H = __TBB_load_relaxed(my_arena_slot->head); size_t T = __TBB_load_relaxed(my_arena_slot->tail); __TBB_ASSERT( (intptr_t)T <= (intptr_t)T0, NULL); __TBB_ASSERT( (intptr_t)H >= (intptr_t)T || (H == T0 && T == T0), NULL ); bool acquired = false; if ( H == T ) { // Either no contention with thieves during arbitration protocol execution or ... if ( H >= T0 ) { // ... the task pool got empty reset_deque_and_leave_arena( /*locked=*/false ); return NULL; } } else { // Contention with thieves detected. Now without taking lock it is impossible // to define the current head value because of its jitter caused by continuing // stealing attempts (the pool is not locked so far). acquired = true; acquire_task_pool(); H = __TBB_load_relaxed(my_arena_slot->head); if ( H >= T0 ) { reset_deque_and_leave_arena( /*locked=*/true ); return NULL; } } size_t src, dst = T0; // Find the first task to offload. for ( src = H; src < T0; ++src ) { task &t = *my_arena_slot->task_pool_ptr[src]; intptr_t p = priority(t); if ( p < *my_ref_top_priority ) { // Position of the first offloaded task will be the starting point // for relocation of subsequent tasks that survive winnowing. dst = src; offload_task( t, p ); break; } } for ( ++src; src < T0; ++src ) { task &t = *my_arena_slot->task_pool_ptr[src]; intptr_t p = priority(t); if ( p < *my_ref_top_priority ) offload_task( t, p ); else my_arena_slot->task_pool_ptr[dst++] = &t; } __TBB_ASSERT( T0 >= dst, NULL ); task *t = H < dst ? my_arena_slot->task_pool_ptr[--dst] : NULL; if ( H == dst ) { // No tasks remain the primary pool reset_deque_and_leave_arena( acquired ); } else if ( acquired ) { __TBB_ASSERT( !is_poisoned(my_arena_slot->task_pool_ptr[H]), NULL ); __TBB_store_relaxed( my_arena_slot->tail, dst ); release_task_pool(); } else { __TBB_ASSERT( !is_poisoned(my_arena_slot->task_pool_ptr[H]), NULL ); // Release fence is necessary to make sure possibly relocated task pointers // become visible to potential thieves __TBB_store_with_release( my_arena_slot->tail, dst ); } my_arena_slot->fill_with_canary_pattern( dst, T0 ); assert_task_pool_valid(); return t; } task* generic_scheduler::reload_tasks ( task*& offloaded_tasks, task**& offloaded_task_list_link, intptr_t top_priority ) { GATHER_STATISTIC( ++my_counters.prio_reloads ); __TBB_ASSERT( !in_arena(), NULL ); task *arr[min_task_pool_size]; fast_reverse_vector tasks(arr, min_task_pool_size); task **link = &offloaded_tasks; task *t; while ( (t = *link) ) { task** next_ptr = &t->prefix().next_offloaded; if ( priority(*t) >= top_priority ) { tasks.push_back( t ); // Note that owner is an alias of next_offloaded. Thus the following // assignment overwrites *next_ptr task* next = *next_ptr; t->prefix().owner = this; __TBB_ASSERT( t->prefix().state == task::ready || t->prefix().extra_state == es_task_proxy, NULL ); *link = next; } else { link = next_ptr; } } if ( link == &offloaded_tasks ) { offloaded_tasks = NULL; #if TBB_USE_ASSERT offloaded_task_list_link = NULL; #endif /* TBB_USE_ASSERT */ } else { __TBB_ASSERT( link, NULL ); // Mark end of list *link = NULL; offloaded_task_list_link = link; } __TBB_ASSERT( link, NULL ); size_t num_tasks = tasks.size(); if ( num_tasks ) { GATHER_STATISTIC( ++my_counters.prio_tasks_reloaded ); size_t T = prepare_task_pool( num_tasks ); tasks.copy_memory( my_arena_slot->task_pool_ptr + T ); if ( --num_tasks ) { commit_spawned_tasks( T += num_tasks ); enter_arena(); my_arena->advertise_new_work(); } __TBB_ASSERT( T == __TBB_load_relaxed(my_arena_slot->tail), NULL ); __TBB_ASSERT( T < my_arena_slot->my_task_pool_size, NULL ); t = my_arena_slot->task_pool_ptr[T]; poison_pointer(my_arena_slot->task_pool_ptr[T]); assert_task_pool_valid(); } return t; } task* generic_scheduler::reload_tasks () { uintptr_t reload_epoch = *my_ref_reload_epoch; __TBB_ASSERT( my_offloaded_tasks, NULL ); __TBB_ASSERT( my_local_reload_epoch <= reload_epoch || my_local_reload_epoch - reload_epoch > uintptr_t(-1)/2, "Reload epoch counter overflow?" ); if ( my_local_reload_epoch == reload_epoch ) return NULL; __TBB_ASSERT( my_offloaded_tasks, NULL ); intptr_t top_priority = effective_reference_priority(); __TBB_ASSERT( (uintptr_t)top_priority < (uintptr_t)num_priority_levels, NULL ); task *t = reload_tasks( my_offloaded_tasks, my_offloaded_task_list_tail_link, top_priority ); if ( my_offloaded_tasks && (my_arena->my_bottom_priority >= top_priority || !my_arena->my_num_workers_requested) ) { // Safeguard against deliberately relaxed synchronization while checking // for the presence of work in arena (so that not to impact hot paths). // Arena may be reset to empty state when offloaded low priority tasks // are still present. This results in both bottom and top priority bounds // becoming 'normal', which makes offloaded low priority tasks unreachable. // Update arena's bottom priority to accommodate them. // First indicate the presence of lower-priority tasks my_market->update_arena_priority( *my_arena, priority(*my_offloaded_tasks) ); // Then mark arena as full to unlock arena priority level adjustment // by arena::is_out_of_work(), and ensure worker's presence my_arena->advertise_new_work(); } my_local_reload_epoch = reload_epoch; return t; } #endif /* __TBB_TASK_PRIORITY */ inline task* generic_scheduler::get_task() { __TBB_ASSERT( in_arena(), NULL ); task* result = NULL; size_t T = __TBB_load_relaxed(my_arena_slot->tail); // mirror retry: __TBB_store_relaxed(my_arena_slot->tail, --T); atomic_fence(); if ( (intptr_t)__TBB_load_relaxed(my_arena_slot->head) > (intptr_t)T ) { acquire_task_pool(); size_t H = __TBB_load_relaxed(my_arena_slot->head); // mirror if ( (intptr_t)H <= (intptr_t)T ) { // The thief backed off - grab the task result = my_arena_slot->task_pool_ptr[T]; __TBB_ASSERT( !is_poisoned(result), NULL ); poison_pointer( my_arena_slot->task_pool_ptr[T] ); } else { __TBB_ASSERT ( H == __TBB_load_relaxed(my_arena_slot->head) && T == __TBB_load_relaxed(my_arena_slot->tail) && H == T + 1, "victim/thief arbitration algorithm failure" ); } if ( (intptr_t)H < (intptr_t)T ) release_task_pool(); else reset_deque_and_leave_arena( /*locked=*/true ); } else { __TBB_control_consistency_helper(); // on my_arena_slot->head result = my_arena_slot->task_pool_ptr[T]; __TBB_ASSERT( !is_poisoned(result), NULL ); poison_pointer( my_arena_slot->task_pool_ptr[T] ); } if( result && is_proxy(*result) ) { task_proxy &tp = *(task_proxy*)result; result = tp.extract_task(); if( !result ) { // Proxy was empty, so it's our responsibility to free it free_task(tp); if ( in_arena() ) goto retry; __TBB_ASSERT( is_quiescent_local_task_pool_reset(), NULL ); return NULL; } GATHER_STATISTIC( ++my_counters.proxies_executed ); // Following assertion should be true because TBB 2.0 tasks never specify affinity, and hence are not proxied. __TBB_ASSERT( is_version_3_task(*result), "backwards compatibility with TBB 2.0 broken" ); // Task affinity has changed. my_innermost_running_task = result; result->note_affinity(my_affinity_id); } __TBB_ASSERT( result || is_quiescent_local_task_pool_reset(), NULL ); return result; } // generic_scheduler::get_task task* generic_scheduler::steal_task( arena_slot& victim_slot ) { task** victim_pool = lock_task_pool( &victim_slot ); if ( !victim_pool ) return NULL; task* result = NULL; size_t H = __TBB_load_relaxed(victim_slot.head); // mirror const size_t H0 = H; int skip_and_bump = 0; // +1 for skipped task and +1 for bumped head&tail retry: __TBB_store_relaxed( victim_slot.head, ++H ); atomic_fence(); if ( (intptr_t)H > (intptr_t)__TBB_load_relaxed(victim_slot.tail) ) { // Stealing attempt failed, deque contents has not been changed by us GATHER_STATISTIC( ++my_counters.thief_backoffs ); __TBB_store_relaxed( victim_slot.head, /*dead: H = */ H0 ); skip_and_bump++; // trigger that we bumped head and tail __TBB_ASSERT ( !result, NULL ); } else { __TBB_control_consistency_helper(); // on victim_slot.tail result = victim_pool[H-1]; __TBB_ASSERT( !is_poisoned(result), NULL ); if( is_proxy(*result) ) { task_proxy& tp = *static_cast(result); // If mailed task is likely to be grabbed by its destination thread, skip it. if ( task_proxy::is_shared(tp.task_and_tag) && tp.outbox->recipient_is_idle() ) { GATHER_STATISTIC( ++my_counters.proxies_bypassed ); result = NULL; __TBB_ASSERT( skip_and_bump < 2, NULL ); skip_and_bump = 1; // note we skipped a task goto retry; } } __TBB_ASSERT( result, NULL ); // emit "task was consumed" signal ITT_NOTIFY(sync_acquired, (void*)((uintptr_t)&victim_slot+sizeof(uintptr_t))); const size_t H1 = H0 + 1; if ( H1 < H ) { // Some proxies in the task pool have been bypassed. Need to close // the hole left by the stolen task. The following variant: // victim_pool[H-1] = victim_pool[H0]; // is of constant time, but creates a potential for degrading stealing // mechanism efficiency and growing owner's stack size too much because // of moving earlier split off (and thus larger) chunks closer to owner's // end of the deque (tail). // So we use linear time variant that is likely to be amortized to be // near-constant time, though, and preserves stealing efficiency premises. // These changes in the deque must be released to the owner. memmove( victim_pool + H1, victim_pool + H0, (H - H1) * sizeof(task*) ); __TBB_store_with_release( victim_slot.head, /*dead: H = */ H1 ); if ( (intptr_t)H >= (intptr_t)__TBB_load_relaxed(victim_slot.tail) ) skip_and_bump++; // trigger that we bumped head and tail } poison_pointer( victim_pool[H0] ); } unlock_task_pool( &victim_slot, victim_pool ); __TBB_ASSERT( skip_and_bump <= 2, NULL ); #if __TBB_PREFETCHING __TBB_cl_evict(&victim_slot.head); __TBB_cl_evict(&victim_slot.tail); #endif if( --skip_and_bump > 0 ) { // if both: task skipped and head&tail bumped // Synchronize with snapshot as we bumped head and tail which can falsely trigger EMPTY state atomic_fence(); my_arena->advertise_new_work(); } return result; } task* generic_scheduler::get_mailbox_task() { __TBB_ASSERT( my_affinity_id>0, "not in arena" ); while ( task_proxy* const tp = my_inbox.pop() ) { if ( task* result = tp->extract_task() ) { ITT_NOTIFY( sync_acquired, my_inbox.outbox() ); result->prefix().extra_state |= es_task_is_stolen; return result; } // We have exclusive access to the proxy, and can destroy it. free_task(*tp); } return NULL; } // TODO: Rename to publish_task_pool void generic_scheduler::enter_arena() { __TBB_ASSERT ( my_arena, "no arena: initialization not completed?" ); __TBB_ASSERT ( my_arena_index < my_arena->my_num_slots, "arena slot index is out-of-bound" ); __TBB_ASSERT ( my_arena_slot == &my_arena->my_slots[my_arena_index], NULL); __TBB_ASSERT ( my_arena_slot->task_pool == EmptyTaskPool, "someone else grabbed my arena slot?" ); __TBB_ASSERT ( __TBB_load_relaxed(my_arena_slot->head) < __TBB_load_relaxed(my_arena_slot->tail), "entering arena without tasks to share" ); // Release signal on behalf of previously spawned tasks (when this thread was not in arena yet) ITT_NOTIFY(sync_releasing, my_arena_slot); __TBB_store_with_release( my_arena_slot->task_pool, my_arena_slot->task_pool_ptr ); } void generic_scheduler::leave_arena() { __TBB_ASSERT( in_arena(), "Not in arena" ); // Do not reset my_arena_index. It will be used to (attempt to) re-acquire the slot next time __TBB_ASSERT( &my_arena->my_slots[my_arena_index] == my_arena_slot, "arena slot and slot index mismatch" ); __TBB_ASSERT ( my_arena_slot->task_pool == LockedTaskPool, "Task pool must be locked when leaving arena" ); __TBB_ASSERT ( is_quiescent_local_task_pool_empty(), "Cannot leave arena when the task pool is not empty" ); ITT_NOTIFY(sync_releasing, &my_arena->my_slots[my_arena_index]); // No release fence is necessary here as this assignment precludes external // accesses to the local task pool when becomes visible. Thus it is harmless // if it gets hoisted above preceding local bookkeeping manipulations. __TBB_store_relaxed( my_arena_slot->task_pool, EmptyTaskPool ); } generic_scheduler* generic_scheduler::create_worker( market& m, size_t index ) { generic_scheduler* s = allocate_scheduler( NULL, index ); // index is not a real slot in arena #if __TBB_TASK_GROUP_CONTEXT s->my_dummy_task->prefix().context = &the_dummy_context; // Sync up the local cancellation state with the global one. No need for fence here. s->my_context_state_propagation_epoch = the_context_state_propagation_epoch; #endif /* __TBB_TASK_GROUP_CONTEXT */ s->my_market = &m; s->init_stack_info(); #if __TBB_TASK_PRIORITY s->my_ref_top_priority = &s->my_market->my_global_top_priority; s->my_ref_reload_epoch = &s->my_market->my_global_reload_epoch; #endif /* __TBB_TASK_PRIORITY */ return s; } // TODO: make it a member method generic_scheduler* generic_scheduler::create_master( arena& a ) { generic_scheduler* s = allocate_scheduler( &a, 0 /*Master thread always occupies the first slot*/ ); task& t = *s->my_dummy_task; s->my_innermost_running_task = &t; s->my_dispatching_task = &t; t.prefix().ref_count = 1; governor::sign_on(s); __TBB_ASSERT( &task::self()==&t, "governor::sign_on failed?" ); #if __TBB_TASK_GROUP_CONTEXT // Context to be used by root tasks by default (if the user has not specified one). // Allocation is done by NFS allocator because we cannot reuse memory allocated // for task objects since the free list is empty at the moment. t.prefix().context = a.my_default_ctx; #endif /* __TBB_TASK_GROUP_CONTEXT */ s->my_market = a.my_market; __TBB_ASSERT( s->my_arena_index == 0, "Master thread must occupy the first slot in its arena" ); s->attach_mailbox(1); s->my_arena_slot = a.my_slots + 0; s->my_arena_slot->my_scheduler = s; #if _WIN32||_WIN64 __TBB_ASSERT( s->my_market, NULL ); s->my_market->register_master( s->master_exec_resource ); #endif /* _WIN32||_WIN64 */ s->init_stack_info(); #if __TBB_TASK_GROUP_CONTEXT // Sync up the local cancellation state with the global one. No need for fence here. s->my_context_state_propagation_epoch = the_context_state_propagation_epoch; #endif #if __TBB_TASK_PRIORITY // In the current implementation master threads continue processing even when // there are other masters with higher priority. Only TBB worker threads are // redistributed between arenas based on the latters' priority. Thus master // threads use arena's top priority as a reference point (in contrast to workers // that use my_market->my_global_top_priority). s->my_ref_top_priority = &s->my_arena->my_top_priority; s->my_ref_reload_epoch = &s->my_arena->my_reload_epoch; #endif /* __TBB_TASK_PRIORITY */ #if __TBB_SCHEDULER_OBSERVER // Process any existing observers. __TBB_ASSERT( a.my_observers.empty(), "Just created arena cannot have any observers associated with it" ); the_global_observer_list.notify_entry_observers( s->my_last_global_observer, /*worker=*/false ); #endif /* __TBB_SCHEDULER_OBSERVER */ return s; } void generic_scheduler::cleanup_worker( void* arg, bool worker ) { generic_scheduler& s = *(generic_scheduler*)arg; __TBB_ASSERT( !s.my_arena_slot, "cleaning up attached worker" ); #if __TBB_SCHEDULER_OBSERVER if ( worker ) // can be called by master for worker, do not notify master twice the_global_observer_list.notify_exit_observers( s.my_last_global_observer, /*worker=*/true ); #endif /* __TBB_SCHEDULER_OBSERVER */ s.free_scheduler(); } void generic_scheduler::cleanup_master() { generic_scheduler& s = *this; // for similarity with cleanup_worker __TBB_ASSERT( s.my_arena_slot, NULL); #if __TBB_SCHEDULER_OBSERVER s.my_arena->my_observers.notify_exit_observers( s.my_last_local_observer, /*worker=*/false ); the_global_observer_list.notify_exit_observers( s.my_last_global_observer, /*worker=*/false ); #endif /* __TBB_SCHEDULER_OBSERVER */ if( in_arena() ) { acquire_task_pool(); if ( my_arena_slot->task_pool == EmptyTaskPool || __TBB_load_relaxed(my_arena_slot->head) >= __TBB_load_relaxed(my_arena_slot->tail) ) { // Local task pool is empty leave_arena(); } else { // Master's local task pool may e.g. contain proxies of affinitized tasks. release_task_pool(); __TBB_ASSERT ( governor::is_set(this), "TLS slot is cleared before the task pool cleanup" ); s.local_wait_for_all( *s.my_dummy_task, NULL ); __TBB_ASSERT( !in_arena(), NULL ); __TBB_ASSERT ( governor::is_set(this), "Other thread reused our TLS key during the task pool cleanup" ); } } __TBB_ASSERT( s.my_market, NULL ); market *my_market = s.my_market; #if _WIN32||_WIN64 s.my_market->unregister_master( s.master_exec_resource ); #endif /* _WIN32||_WIN64 */ arena* a = s.my_arena; __TBB_ASSERT(a->my_slots+0 == my_arena_slot, NULL); #if __TBB_STATISTICS *my_arena_slot->my_counters += s.my_counters; #endif /* __TBB_STATISTICS */ #if __TBB_TASK_PRIORITY __TBB_ASSERT( my_arena_slot->my_scheduler, NULL ); // Master's scheduler may be locked by a worker taking arena snapshot or by // a thread propagating task group state change across the context tree. while ( as_atomic(my_arena_slot->my_scheduler).compare_and_swap(NULL, this) != this ) __TBB_Yield(); __TBB_ASSERT( !my_arena_slot->my_scheduler, NULL ); #else /* !__TBB_TASK_PRIORITY */ __TBB_store_with_release(my_arena_slot->my_scheduler, (generic_scheduler*)NULL); #endif /* __TBB_TASK_PRIORITY */ my_arena_slot = NULL; // detached from slot s.free_scheduler(); // Resetting arena to EMPTY state (as earlier TBB versions did) should not be // done here (or anywhere else in the master thread to that matter) because // after introducing arena-per-master logic and fire-and-forget tasks doing // so can result either in arena's premature destruction (at least without // additional costly checks in workers) or in unnecessary arena state changes // (and ensuing workers migration). #if __TBB_STATISTICS_EARLY_DUMP GATHER_STATISTIC( a->dump_arena_statistics() ); #endif if (governor::needsWaitWorkers()) my_market->prepare_wait_workers(); a->on_thread_leaving(); if (governor::needsWaitWorkers()) my_market->wait_workers(); } } // namespace internal } // namespace tbb /* Comments: 1. The premise of the cancellation support implementation is that cancellations are not part of the hot path of the program execution. Therefore all changes in its implementation in order to reduce the overhead of the cancellation control flow should be done only in ways that do not increase overhead of the normal execution. In general contexts are used by all threads and their descendants are created in different threads as well. In order to minimize impact of the cross-thread tree maintenance (first of all because of the synchronization), the tree of contexts is split into pieces, each of which is handled by the only thread. Such pieces are represented as lists of contexts, members of which are contexts that were bound to their parents in the given thread. The context tree maintenance and cancellation propagation algorithms is designed in such a manner that cross-thread access to a context list will take place only when cancellation signal is sent (by user or when an exception happens), and synchronization is necessary only then. Thus the normal execution flow (without exceptions and cancellation) remains free from any synchronization done on behalf of exception handling and cancellation support. 2. Consider parallel cancellations at the different levels of the context tree: Ctx1 <- Cancelled by Thread1 |- Thread2 started processing | | Ctx2 |- Thread1 started processing | T1 |- Thread2 finishes and syncs up local counters Ctx3 <- Cancelled by Thread2 | | |- Ctx5 is bound to Ctx2 Ctx4 | T2 |- Thread1 reaches Ctx2 Thread-propagator of each cancellation increments global counter. However the thread propagating the cancellation from the outermost context (Thread1) may be the last to finish. Which means that the local counters may be synchronized earlier (by Thread2, at Time1) than it propagated cancellation into Ctx2 (at time Time2). If a new context (Ctx5) is created and bound to Ctx2 between Time1 and Time2, checking its parent only (Ctx2) may result in cancellation request being lost. This issue is solved by doing the whole propagation under the lock. If we need more concurrency while processing parallel cancellations, we could try the following modification of the propagation algorithm: advance global counter and remember it for each thread: scan thread's list of contexts for each thread: sync up its local counter only if the global counter has not been changed However this version of the algorithm requires more analysis and verification. 3. There is no portable way to get stack base address in Posix, however the modern Linux versions provide pthread_attr_np API that can be used to obtain thread's stack size and base address. Unfortunately even this function does not provide enough information for the main thread on IA-64 architecture (RSE spill area and memory stack are allocated as two separate discontinuous chunks of memory), and there is no portable way to discern the main and the secondary threads. Thus for OS X* and IA-64 Linux architecture we use the TBB worker stack size for all threads and use the current stack top as the stack base. This simplified approach is based on the following assumptions: 1) If the default stack size is insufficient for the user app needs, the required amount will be explicitly specified by the user at the point of the TBB scheduler initialization (as an argument to tbb::task_scheduler_init constructor). 2) When a master thread initializes the scheduler, it has enough space on its stack. Here "enough" means "at least as much as worker threads have". 3) If the user app strives to conserve the memory by cutting stack size, it should do this for TBB workers too (as in the #1). */ ================================================ FILE: benchmarks/tbb/scheduler.h ================================================ /* Copyright 2005-2014 Intel Corporation. All Rights Reserved. This file is part of Threading Building Blocks. Threading Building Blocks is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. Threading Building Blocks is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Threading Building Blocks; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA As a special exception, you may use this file as part of a free software library without restriction. Specifically, if other files instantiate templates or use macros or inline functions from this file, or you compile this file and link it with other files to produce an executable, this file does not by itself cause the resulting executable to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the executable file might be covered by the GNU General Public License. */ #ifndef _TBB_scheduler_H #define _TBB_scheduler_H #include "scheduler_common.h" #include "tbb/spin_mutex.h" #include "mailbox.h" #include "tbb_misc.h" // for FastRandom #include "itt_notify.h" #include "../rml/include/rml_tbb.h" #if __TBB_SURVIVE_THREAD_SWITCH #include "cilk-tbb-interop.h" #endif /* __TBB_SURVIVE_THREAD_SWITCH */ namespace tbb { namespace internal { template class custom_scheduler; struct nested_arena_context; //------------------------------------------------------------------------ // generic_scheduler //------------------------------------------------------------------------ #if __TBB_TASK_GROUP_CONTEXT struct scheduler_list_node_t { scheduler_list_node_t *my_prev, *my_next; }; #endif /* __TBB_TASK_GROUP_CONTEXT */ #define EmptyTaskPool ((task**)0) #define LockedTaskPool ((task**)~(intptr_t)0) #define LockedMaster ((generic_scheduler*)~(intptr_t)0) struct scheduler_state { //! Index of the arena slot the scheduler occupies now, or occupied last time. size_t my_arena_index; // TODO: make it unsigned and pair with my_affinity_id to fit into cache line //! Pointer to the slot in the arena we own at the moment. arena_slot* my_arena_slot; //! The arena that I own (if master) or am servicing at the moment (if worker) arena* my_arena; //! Innermost task whose task::execute() is running. task* my_innermost_running_task; //! Task, in the context of which the current TBB dispatch loop is running. /** Outside of or in the outermost dispatch loop (not in a nested call to wait_for_all) it is my_dummy_task for master threads, and NULL for workers. **/ task* my_dispatching_task; mail_inbox my_inbox; //! The mailbox id assigned to this scheduler. /** The id is assigned upon first entry into the arena. TODO: how are id's being garbage collected? TODO: master thread may enter arena and leave and then reenter. We want to give it the same affinity_id upon reentry, if practical. */ affinity_id my_affinity_id; #if __TBB_SCHEDULER_OBSERVER //! Last observer in the global observers list processed by this scheduler observer_proxy* my_last_global_observer; //! Last observer in the local observers list processed by this scheduler observer_proxy* my_last_local_observer; #endif /* __TBB_SCHEDULER_OBSERVER */ #if __TBB_TASK_PRIORITY //! Latest known highest priority of tasks in the market or arena. /** Master threads currently tracks only tasks in their arenas, while workers take into account global top priority (among all arenas in the market). **/ volatile intptr_t *my_ref_top_priority; //! Pointer to market's (for workers) or current arena's (for the master) reload epoch counter. volatile uintptr_t *my_ref_reload_epoch; #endif /* __TBB_TASK_PRIORITY */ }; //! Work stealing task scheduler. /** None of the fields here are ever read or written by threads other than the thread that creates the instance. Class generic_scheduler is an abstract base class that contains most of the scheduler, except for tweaks specific to processors and tools (e.g. VTune). The derived template class custom_scheduler fills in the tweaks. */ class generic_scheduler: public scheduler, public ::rml::job, public scheduler_state { public: // almost every class in TBB uses generic_scheduler //! If sizeof(task) is <=quick_task_size, it is handled on a free list instead of malloc'd. static const size_t quick_task_size = 256-task_prefix_reservation_size; static bool is_version_3_task( task& t ) { return (t.prefix().extra_state & 0x0F)>=0x1; } //! Position in the call stack specifying its maximal filling when stealing is still allowed uintptr_t my_stealing_threshold; #if __TBB_ipf //! Position in the RSE backup area specifying its maximal filling when stealing is still allowed uintptr_t my_rsb_stealing_threshold; #endif static const size_t null_arena_index = ~size_t(0); // TODO: Rename into is_task_pool_published() inline bool in_arena () const; inline bool is_local_task_pool_quiescent () const; inline bool is_quiescent_local_task_pool_empty () const; inline bool is_quiescent_local_task_pool_reset () const; //! The market I am in market* my_market; //! Random number generator used for picking a random victim from which to steal. FastRandom my_random; //! Free list of small tasks that can be reused. task* my_free_list; #if __TBB_HOARD_NONLOCAL_TASKS //! Free list of small non-local tasks that should be returned or can be reused. task* my_nonlocal_free_list; #endif //! Fake root task created by slave threads. /** The task is used as the "parent" argument to method wait_for_all. */ task* my_dummy_task; //! Reference count for scheduler /** Number of task_scheduler_init objects that point to this scheduler */ long my_ref_count; inline void attach_mailbox( affinity_id id ); /* A couple of bools can be located here because space is otherwise just padding after my_affinity_id. */ //! True if *this was created by automatic TBB initialization bool my_auto_initialized; #if __TBB_COUNT_TASK_NODES //! Net number of big task objects that have been allocated but not yet freed. intptr_t my_task_node_count; #endif /* __TBB_COUNT_TASK_NODES */ //! Sets up the data necessary for the stealing limiting heuristics void init_stack_info (); //! Returns true if stealing is allowed bool can_steal () { int anchor; // TODO IDEA: Add performance warning? #if __TBB_ipf return my_stealing_threshold < (uintptr_t)&anchor && (uintptr_t)__TBB_get_bsp() < my_rsb_stealing_threshold; #else return my_stealing_threshold < (uintptr_t)&anchor; #endif } //! Actions common to enter_arena and try_enter_arena void do_enter_arena(); //! Used by workers to enter the arena /** Does not lock the task pool in case if arena slot has been successfully grabbed. **/ void enter_arena(); //! Leave the arena /** Leaving arena automatically releases the task pool if it is locked. **/ void leave_arena(); //! Resets head and tail indices to 0, and leaves arena /** Argument specifies whether the task pool is currently locked by the owner (via acquire_task_pool).**/ inline void reset_deque_and_leave_arena ( bool locked ); //! Locks victim's task pool, and returns pointer to it. The pointer can be NULL. /** Garbles victim_arena_slot->task_pool for the duration of the lock. **/ task** lock_task_pool( arena_slot* victim_arena_slot ) const; //! Unlocks victim's task pool /** Restores victim_arena_slot->task_pool munged by lock_task_pool. **/ void unlock_task_pool( arena_slot* victim_arena_slot, task** victim_task_pool ) const; //! Locks the local task pool /** Garbles my_arena_slot->task_pool for the duration of the lock. Requires correctly set my_arena_slot->task_pool_ptr. **/ void acquire_task_pool() const; //! Unlocks the local task pool /** Restores my_arena_slot->task_pool munged by acquire_task_pool. Requires correctly set my_arena_slot->task_pool_ptr. **/ void release_task_pool() const; //! Checks if t is affinitized to another thread, and if so, bundles it as proxy. /** Returns either t or proxy containing t. **/ task* prepare_for_spawning( task* t ); //! Makes newly spawned tasks visible to thieves inline void commit_spawned_tasks( size_t new_tail ); //! Makes relocated tasks visible to thieves and releases the local task pool. /** Obviously, the task pool must be locked when calling this method. **/ inline void commit_relocated_tasks( size_t new_tail ); //! Get a task from the local pool. /** Called only by the pool owner. Returns the pointer to the task or NULL if the pool is empty. In the latter case compacts the pool. **/ task* get_task(); //! Attempt to get a task from the mailbox. /** Gets a task only if it has not been executed by its sender or a thief that has stolen it from the sender's task pool. Otherwise returns NULL. This method is intended to be used only by the thread extracting the proxy from its mailbox. (In contrast to local task pool, mailbox can be read only by its owner). **/ task* get_mailbox_task(); //! True if t is a task_proxy static bool is_proxy( const task& t ) { return t.prefix().extra_state==es_task_proxy; } //! Steal task from another scheduler's ready pool. task* steal_task( arena_slot& victim_arena_slot ); /** Initial size of the task deque sufficient to serve without reallocation 4 nested parallel_for calls with iteration space of 65535 grains each. **/ static const size_t min_task_pool_size = 64; //! Makes sure that the task pool can accommodate at least n more elements /** If necessary relocates existing task pointers or grows the ready task deque. Returns (possible updated) tail index (not accounting for n). **/ size_t prepare_task_pool( size_t n ); //! Initialize a scheduler for a master thread. static generic_scheduler* create_master( arena& a ); //! Perform necessary cleanup when a master thread stops using TBB. void cleanup_master(); //! Initialize a scheduler for a worker thread. static generic_scheduler* create_worker( market& m, size_t index ); //! Perform necessary cleanup when a worker thread finishes. static void cleanup_worker( void* arg, bool worker ); protected: template friend class custom_scheduler; generic_scheduler( arena*, size_t index ); public: #if TBB_USE_ASSERT > 1 //! Check that internal data structures are in consistent state. /** Raises __TBB_ASSERT failure if inconsistency is found. */ void assert_task_pool_valid () const; #else void assert_task_pool_valid() const {} #endif /* TBB_USE_ASSERT <= 1 */ #if __TBB_TASK_ARENA void nested_arena_entry(arena*, nested_arena_context &, bool); void nested_arena_exit(nested_arena_context &); void wait_until_empty(); #endif /*override*/ void spawn( task& first, task*& next ); /*override*/ void spawn_root_and_wait( task& first, task*& next ); /*override*/ void enqueue( task&, void* reserved ); void local_spawn( task& first, task*& next ); void local_spawn_root_and_wait( task& first, task*& next ); virtual void local_wait_for_all( task& parent, task* child ) = 0; //! Destroy and deallocate this scheduler object void free_scheduler(); //! Allocate task object, either from the heap or a free list. /** Returns uninitialized task object with initialized prefix. */ task& allocate_task( size_t number_of_bytes, __TBB_CONTEXT_ARG(task* parent, task_group_context* context) ); //! Put task on free list. /** Does not call destructor. */ template void free_task( task& t ); //! Return task object to the memory allocator. inline void deallocate_task( task& t ); //! True if running on a worker thread, false otherwise. inline bool is_worker(); //! True if the scheduler is on the outermost dispatch level in a master thread. /** Returns true when this scheduler instance is associated with an application thread, and is not executing any TBB task. This includes being in a TBB dispatch loop (one of wait_for_all methods) invoked directly from that thread. **/ inline bool master_outermost_level () const; //! True if the scheduler is on the outermost dispatch level in a worker thread. inline bool worker_outermost_level () const; #if __TBB_TASK_GROUP_CONTEXT //! Returns task group context used by this scheduler instance. /** This context is associated with root tasks created by a master thread without explicitly specified context object outside of any running task. Note that the default context of a worker thread is never accessed by user code (directly or indirectly). **/ inline task_group_context* default_context (); #endif /* __TBB_TASK_GROUP_CONTEXT */ //! Returns number of worker threads in the arena this thread belongs to. unsigned number_of_workers_in_my_arena(); #if __TBB_COUNT_TASK_NODES intptr_t get_task_node_count( bool count_arena_workers = false ); #endif /* __TBB_COUNT_TASK_NODES */ //! Special value used to mark my_return_list as not taking any more entries. static task* plugged_return_list() {return (task*)(intptr_t)(-1);} //! Number of small tasks that have been allocated by this scheduler. intptr_t my_small_task_count; //! List of small tasks that have been returned to this scheduler by other schedulers. task* my_return_list; //! Try getting a task from other threads (via mailbox, stealing, FIFO queue, orphans adoption). /** Returns obtained task or NULL if all attempts fail. */ virtual task* receive_or_steal_task( __TBB_atomic reference_count& completion_ref_count, bool return_if_no_work ) = 0; //! Free a small task t that that was allocated by a different scheduler void free_nonlocal_small_task( task& t ); #if __TBB_TASK_GROUP_CONTEXT //! Padding isolating thread-local members from members that can be written to by other threads. char _padding1[NFS_MaxLineSize - sizeof(context_list_node_t)]; //! Head of the thread specific list of task group contexts. context_list_node_t my_context_list_head; //! Mutex protecting access to the list of task group contexts. // TODO: check whether it can be deadly preempted and replace by spinning/sleeping mutex spin_mutex my_context_list_mutex; //! Last state propagation epoch known to this thread /** Together with the_context_state_propagation_epoch constitute synchronization protocol that keeps hot path of task group context construction destruction mostly lock-free. When local epoch equals the global one, the state of task group contexts registered with this thread is consistent with that of the task group trees they belong to. **/ uintptr_t my_context_state_propagation_epoch; //! Flag indicating that a context is being destructed by its owner thread /** Together with my_nonlocal_ctx_list_update constitute synchronization protocol that keeps hot path of context destruction (by the owner thread) mostly lock-free. **/ tbb::atomic my_local_ctx_list_update; #if __TBB_TASK_PRIORITY //! Returns reference priority used to decide whether a task should be offloaded. inline intptr_t effective_reference_priority () const; // TODO: move into slots and fix is_out_of_work //! Task pool for offloading tasks with priorities lower than the current top priority. task* my_offloaded_tasks; //! Points to the last offloaded task in the my_offloaded_tasks list. task** my_offloaded_task_list_tail_link; //! Indicator of how recently the offload area was checked for the presence of top priority tasks. uintptr_t my_local_reload_epoch; //! Indicates that the pool is likely non-empty even if appears so from outside volatile bool my_pool_reshuffling_pending; //! Searches offload area for top priority tasks and reloads found ones into primary task pool. /** Returns one of the found tasks or NULL. **/ task* reload_tasks (); task* reload_tasks ( task*& offloaded_tasks, task**& offloaded_task_list_link, intptr_t top_priority ); //! Moves tasks with priority below the top one from primary task pool into offload area. /** Returns the next execution candidate task or NULL. **/ task* winnow_task_pool (); //! Unconditionally moves the task into offload area. inline void offload_task ( task& t, intptr_t task_priority ); #endif /* __TBB_TASK_PRIORITY */ //! Detaches abandoned contexts /** These contexts must be destroyed by other threads. **/ void cleanup_local_context_list (); //! Finds all contexts registered by this scheduler affected by the state change //! and propagates the new state to them. template void propagate_task_group_state ( T task_group_context::*mptr_state, task_group_context& src, T new_state ); // check consistency static void assert_context_valid(const task_group_context *tgc) { suppress_unused_warning(tgc); #if TBB_USE_ASSERT __TBB_ASSERT(tgc, NULL); uintptr_t ctx = tgc->my_version_and_traits; __TBB_ASSERT(is_alive(ctx), "referenced task_group_context was destroyed"); static const char *msg = "task_group_context is invalid"; __TBB_ASSERT(!(ctx&~(3|(7<my_kind < task_group_context::dying, msg); __TBB_ASSERT(tgc->my_cancellation_requested == 0 || tgc->my_cancellation_requested == 1, msg); __TBB_ASSERT(tgc->my_state < task_group_context::low_unused_state_bit, msg); if(tgc->my_kind != task_group_context::isolated) { __TBB_ASSERT(tgc->my_owner, msg); __TBB_ASSERT(tgc->my_node.my_next && tgc->my_node.my_prev, msg); } #if __TBB_TASK_PRIORITY assert_priority_valid(tgc->my_priority); #endif if(tgc->my_parent) #if TBB_USE_ASSERT > 1 assert_context_valid(tgc->my_parent); #else __TBB_ASSERT(is_alive(tgc->my_parent->my_version_and_traits), msg); #endif #endif } #endif /* __TBB_TASK_GROUP_CONTEXT */ #if _WIN32||_WIN64 private: //! Handle returned by RML when registering a master with RML ::rml::server::execution_resource_t master_exec_resource; public: #endif /* _WIN32||_WIN64 */ #if __TBB_TASK_GROUP_CONTEXT //! Flag indicating that a context is being destructed by non-owner thread. /** See also my_local_ctx_list_update. **/ tbb::atomic my_nonlocal_ctx_list_update; #endif /* __TBB_TASK_GROUP_CONTEXT */ #if __TBB_SURVIVE_THREAD_SWITCH __cilk_tbb_unwatch_thunk my_cilk_unwatch_thunk; #if TBB_USE_ASSERT //! State values used to check interface contract with cilkrts. /** Names of cs_running...cs_freed derived from state machine diagram in cilk-tbb-interop.h */ enum cilk_state_t { cs_none=0xF000, // Start at nonzero value so that we can detect use of zeroed memory. cs_running, cs_limbo, cs_freed }; cilk_state_t my_cilk_state; #endif /* TBB_USE_ASSERT */ #endif /* __TBB_SURVIVE_THREAD_SWITCH */ #if __TBB_STATISTICS //! Set of counters to track internal statistics on per thread basis /** Placed at the end of the class definition to minimize the disturbance of the core logic memory operations. **/ mutable statistics_counters my_counters; #endif /* __TBB_STATISTICS */ }; // class generic_scheduler } // namespace internal } // namespace tbb #include "arena.h" #include "governor.h" namespace tbb { namespace internal { inline bool generic_scheduler::in_arena () const { __TBB_ASSERT(my_arena_slot, 0); return my_arena_slot->task_pool != EmptyTaskPool; } inline bool generic_scheduler::is_local_task_pool_quiescent () const { __TBB_ASSERT(my_arena_slot, 0); task** tp = my_arena_slot->task_pool; return tp == EmptyTaskPool || tp == LockedTaskPool; } inline bool generic_scheduler::is_quiescent_local_task_pool_empty () const { __TBB_ASSERT( is_local_task_pool_quiescent(), "Task pool is not quiescent" ); return __TBB_load_relaxed(my_arena_slot->head) == __TBB_load_relaxed(my_arena_slot->tail); } inline bool generic_scheduler::is_quiescent_local_task_pool_reset () const { __TBB_ASSERT( is_local_task_pool_quiescent(), "Task pool is not quiescent" ); return __TBB_load_relaxed(my_arena_slot->head) == 0 && __TBB_load_relaxed(my_arena_slot->tail) == 0; } inline bool generic_scheduler::master_outermost_level () const { return my_dispatching_task == my_dummy_task; } inline bool generic_scheduler::worker_outermost_level () const { return !my_dispatching_task; } #if __TBB_TASK_GROUP_CONTEXT inline task_group_context* generic_scheduler::default_context () { return my_dummy_task->prefix().context; } #endif /* __TBB_TASK_GROUP_CONTEXT */ inline void generic_scheduler::attach_mailbox( affinity_id id ) { __TBB_ASSERT(id>0,NULL); my_inbox.attach( my_arena->mailbox(id) ); my_affinity_id = id; } inline bool generic_scheduler::is_worker() { return my_arena_index != 0; //TODO: rework for multiple master } inline unsigned generic_scheduler::number_of_workers_in_my_arena() { return my_arena->my_max_num_workers; } //! Return task object to the memory allocator. inline void generic_scheduler::deallocate_task( task& t ) { #if TBB_USE_ASSERT task_prefix& p = t.prefix(); p.state = 0xFF; p.extra_state = 0xFF; poison_pointer(p.next); #endif /* TBB_USE_ASSERT */ NFS_Free((char*)&t-task_prefix_reservation_size); #if __TBB_COUNT_TASK_NODES --my_task_node_count; #endif /* __TBB_COUNT_TASK_NODES */ } #if __TBB_COUNT_TASK_NODES inline intptr_t generic_scheduler::get_task_node_count( bool count_arena_workers ) { return my_task_node_count + (count_arena_workers? my_arena->workers_task_node_count(): 0); } #endif /* __TBB_COUNT_TASK_NODES */ inline void generic_scheduler::reset_deque_and_leave_arena ( bool locked ) { if ( !locked ) acquire_task_pool(); __TBB_store_relaxed( my_arena_slot->tail, 0 ); __TBB_store_relaxed( my_arena_slot->head, 0 ); leave_arena(); } //TODO: move to arena_slot inline void generic_scheduler::commit_spawned_tasks( size_t new_tail ) { __TBB_ASSERT ( new_tail <= my_arena_slot->my_task_pool_size, "task deque end was overwritten" ); // emit "task was released" signal ITT_NOTIFY(sync_releasing, (void*)((uintptr_t)my_arena_slot+sizeof(uintptr_t))); // Release fence is necessary to make sure that previously stored task pointers // are visible to thieves. __TBB_store_with_release( my_arena_slot->tail, new_tail ); } void generic_scheduler::commit_relocated_tasks ( size_t new_tail ) { __TBB_ASSERT( is_local_task_pool_quiescent(), "Task pool must be locked when calling commit_relocated_tasks()" ); __TBB_store_relaxed( my_arena_slot->head, 0 ); // Tail is updated last to minimize probability of a thread making arena // snapshot being misguided into thinking that this task pool is empty. __TBB_store_relaxed( my_arena_slot->tail, new_tail ); release_task_pool(); } template void generic_scheduler::free_task( task& t ) { #if __TBB_HOARD_NONLOCAL_TASKS static const int h = hint&(~local_task); #else static const free_task_hint h = hint; #endif GATHER_STATISTIC(--my_counters.active_tasks); task_prefix& p = t.prefix(); // Verify that optimization hints are correct. __TBB_ASSERT( h!=small_local_task || p.origin==this, NULL ); __TBB_ASSERT( !(h&small_task) || p.origin, NULL ); __TBB_ASSERT( !(h&local_task) || (!p.origin || uintptr_t(p.origin) > uintptr_t(4096)), "local_task means allocated"); poison_value(p.depth); poison_value(p.ref_count); poison_pointer(p.owner); __TBB_ASSERT( 1L<my_num_workers_allotted < my_arena->num_workers_active() ? *my_ref_top_priority : my_arena->my_top_priority; } inline void generic_scheduler::offload_task ( task& t, intptr_t /*priority*/ ) { GATHER_STATISTIC( ++my_counters.prio_tasks_offloaded ); __TBB_ASSERT( my_offloaded_task_list_tail_link && !*my_offloaded_task_list_tail_link, NULL ); #if TBB_USE_ASSERT t.prefix().state = task::ready; #endif /* TBB_USE_ASSERT */ t.prefix().next_offloaded = my_offloaded_tasks; my_offloaded_tasks = &t; } #endif /* __TBB_TASK_PRIORITY */ #if __TBB_FP_CONTEXT class cpu_ctl_env_helper { cpu_ctl_env guard_cpu_ctl_env; cpu_ctl_env curr_cpu_ctl_env; public: cpu_ctl_env_helper() { guard_cpu_ctl_env.get_env(); curr_cpu_ctl_env = guard_cpu_ctl_env; } ~cpu_ctl_env_helper() { if ( curr_cpu_ctl_env != guard_cpu_ctl_env ) guard_cpu_ctl_env.set_env(); } void set_env( const task_group_context *ctx ) { generic_scheduler::assert_context_valid(ctx); const cpu_ctl_env &ctl = *punned_cast(&ctx->my_cpu_ctl_env); if ( ctl != curr_cpu_ctl_env ) { curr_cpu_ctl_env = ctl; curr_cpu_ctl_env.set_env(); } } void restore_default() { if ( curr_cpu_ctl_env != guard_cpu_ctl_env ) { guard_cpu_ctl_env.set_env(); curr_cpu_ctl_env = guard_cpu_ctl_env; } } }; #else struct cpu_ctl_env_helper { void set_env( __TBB_CONTEXT_ARG1(task_group_context *) ) {} void restore_default() {} }; #endif /* __TBB_FP_CONTEXT */ } // namespace internal } // namespace tbb #endif /* _TBB_scheduler_H */ ================================================ FILE: benchmarks/tbb/scheduler_common.h ================================================ /* Copyright 2005-2014 Intel Corporation. All Rights Reserved. This file is part of Threading Building Blocks. Threading Building Blocks is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. Threading Building Blocks is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Threading Building Blocks; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA As a special exception, you may use this file as part of a free software library without restriction. Specifically, if other files instantiate templates or use macros or inline functions from this file, or you compile this file and link it with other files to produce an executable, this file does not by itself cause the resulting executable to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the executable file might be covered by the GNU General Public License. */ #ifndef _TBB_scheduler_common_H #define _TBB_scheduler_common_H #include "tbb/tbb_machine.h" #include "tbb/cache_aligned_allocator.h" #include // for memset, memcpy, memmove #include "tbb_statistics.h" #if TBB_USE_ASSERT > 1 #include #endif /* TBB_USE_ASSERT > 1 */ /* Temporarily change "private" to "public" while including "tbb/task.h". This hack allows us to avoid publishing internal types and methods in the public header files just for sake of friend declarations. */ #ifndef private #define private public #define undef_private #endif #include "tbb/task.h" #include "tbb/tbb_exception.h" #ifdef undef_private #undef private #endif #ifndef __TBB_SCHEDULER_MUTEX_TYPE #define __TBB_SCHEDULER_MUTEX_TYPE tbb::spin_mutex #endif // TODO: add conditional inclusion based on specified type #include "tbb/spin_mutex.h" // This macro is an attempt to get rid of ugly ifdefs in the shared parts of the code. // It drops the second argument depending on whether the controlling macro is defined. // The first argument is just a convenience allowing to keep comma before the macro usage. #if __TBB_TASK_GROUP_CONTEXT #define __TBB_CONTEXT_ARG1(context) context #define __TBB_CONTEXT_ARG(arg1, context) arg1, context #else /* !__TBB_TASK_GROUP_CONTEXT */ #define __TBB_CONTEXT_ARG1(context) #define __TBB_CONTEXT_ARG(arg1, context) arg1 #endif /* !__TBB_TASK_GROUP_CONTEXT */ #if DO_TBB_TRACE #include #define TBB_TRACE(x) ((void)std::printf x) #else #define TBB_TRACE(x) ((void)(0)) #endif /* DO_TBB_TRACE */ #if !__TBB_CPU_CTL_ENV_PRESENT #include #endif #if _MSC_VER && !defined(__INTEL_COMPILER) // Workaround for overzealous compiler warnings // These particular warnings are so ubiquitous that no attempt is made to narrow // the scope of the warnings. #pragma warning (disable: 4100 4127 4312 4244 4267 4706) #endif namespace tbb { namespace interface7 { namespace internal { class task_arena_base; class delegated_task; class wait_task; }} namespace internal { using namespace interface7::internal; class arena; template class custom_scheduler; class generic_scheduler; class governor; class mail_outbox; class market; class observer_proxy; class task_scheduler_observer_v3; #if __TBB_TASK_PRIORITY static const intptr_t num_priority_levels = 3; static const intptr_t normalized_normal_priority = (num_priority_levels - 1) / 2; inline intptr_t normalize_priority ( priority_t p ) { return intptr_t(p - priority_low) / priority_stride_v4; } static const priority_t priority_from_normalized_rep[num_priority_levels] = { priority_low, priority_normal, priority_high }; inline void assert_priority_valid ( intptr_t p ) { __TBB_ASSERT_EX( p >= 0 && p < num_priority_levels, NULL ); } inline intptr_t& priority ( task& t ) { return t.prefix().context->my_priority; } #endif /* __TBB_TASK_PRIORITY */ //! Mutex type for global locks in the scheduler typedef __TBB_SCHEDULER_MUTEX_TYPE scheduler_mutex_type; #if __TBB_TASK_GROUP_CONTEXT //! Task group state change propagation global epoch /** Together with generic_scheduler::my_context_state_propagation_epoch forms cross-thread signaling mechanism that allows to avoid locking at the hot path of normal execution flow. When a descendant task group context is registered or unregistered, the global and local epochs are compared. If they differ, a state change is being propagated, and thus registration/deregistration routines take slower branch that may block (at most one thread of the pool can be blocked at any moment). Otherwise the control path is lock-free and fast. **/ extern uintptr_t the_context_state_propagation_epoch; //! Mutex guarding state change propagation across task groups forest. /** Also protects modification of related data structures. **/ typedef scheduler_mutex_type context_state_propagation_mutex_type; extern context_state_propagation_mutex_type the_context_state_propagation_mutex; #endif /* __TBB_TASK_GROUP_CONTEXT */ //! Alignment for a task object const size_t task_alignment = 32; //! Number of bytes reserved for a task prefix /** If not exactly sizeof(task_prefix), the extra bytes *precede* the task_prefix. */ const size_t task_prefix_reservation_size = ((sizeof(internal::task_prefix)-1)/task_alignment+1)*task_alignment; //! Definitions for bits in task_prefix::extra_state enum task_extra_state { //! Tag for v1 tasks (i.e. tasks in TBB 1.0 and 2.0) es_version_1_task = 0, //! Tag for v3 tasks (i.e. tasks in TBB 2.1-2.2) es_version_3_task = 1, //! Tag for enqueued tasks es_task_enqueued = 0x10, //! Tag for v3 task_proxy. es_task_proxy = 0x20, //! Set if ref_count might be changed by another thread. Used for debugging. es_ref_count_active = 0x40, //! Set if the task has been stolen es_task_is_stolen = 0x80 }; inline void reset_extra_state ( task *t ) { t->prefix().extra_state &= ~(es_task_is_stolen | es_task_enqueued); } //! Optimization hint to free_task that enables it omit unnecessary tests and code. enum free_task_hint { //! No hint no_hint=0, //! Task is known to have been allocated by this scheduler local_task=1, //! Task is known to be a small task. /** Task should be returned to the free list of *some* scheduler, possibly not this scheduler. */ small_task=2, //! Bitwise-OR of local_task and small_task. /** Task should be returned to free list of this scheduler. */ small_local_task=3, //! Disable caching for a small task. no_cache = 4, //! Task is known to be a small task and must not be cached. no_cache_small_task = no_cache | small_task }; //------------------------------------------------------------------------ // Debugging support //------------------------------------------------------------------------ #if TBB_USE_ASSERT static const uintptr_t venom = tbb::internal::select_size_t_constant<0xDEADBEEFU,0xDDEEAADDDEADBEEFULL>::value; template void poison_value ( T& val ) { val = * punned_cast(&venom); } /** Expected to be used in assertions only, thus no empty form is defined. **/ inline bool is_alive( uintptr_t v ) { return v != venom; } /** Logically, this method should be a member of class task. But we do not want to publish it, so it is here instead. */ inline void assert_task_valid( const task& task ) { __TBB_ASSERT( &task!=NULL, NULL ); __TBB_ASSERT( !is_poisoned(&task), NULL ); __TBB_ASSERT( (uintptr_t)&task % task_alignment == 0, "misaligned task" ); #if __TBB_RECYCLE_TO_ENQUEUE __TBB_ASSERT( (unsigned)task.state()<=(unsigned)task::to_enqueue, "corrupt task (invalid state)" ); #else __TBB_ASSERT( (unsigned)task.state()<=(unsigned)task::recycle, "corrupt task (invalid state)" ); #endif } #else /* !TBB_USE_ASSERT */ /** In contrast to debug version poison_value() is a macro here because the variable used as its argument may be undefined in release builds. **/ #define poison_value(g) ((void)0) inline void assert_task_valid( const task& ) {} #endif /* !TBB_USE_ASSERT */ //------------------------------------------------------------------------ // Helpers //------------------------------------------------------------------------ #if __TBB_TASK_GROUP_CONTEXT inline bool ConcurrentWaitsEnabled ( task& t ) { return (t.prefix().context->my_version_and_traits & task_group_context::concurrent_wait) != 0; } inline bool CancellationInfoPresent ( task& t ) { return t.prefix().context->my_cancellation_requested != 0; } #if TBB_USE_CAPTURED_EXCEPTION inline tbb_exception* TbbCurrentException( task_group_context*, tbb_exception* src) { return src->move(); } inline tbb_exception* TbbCurrentException( task_group_context*, captured_exception* src) { return src; } #else // Using macro instead of an inline function here allows to avoid evaluation of the // TbbCapturedException expression when exact propagation is enabled for the context. #define TbbCurrentException(context, TbbCapturedException) \ context->my_version_and_traits & task_group_context::exact_exception \ ? tbb_exception_ptr::allocate() \ : tbb_exception_ptr::allocate( *(TbbCapturedException) ); #endif /* !TBB_USE_CAPTURED_EXCEPTION */ #define TbbRegisterCurrentException(context, TbbCapturedException) \ if ( context->cancel_group_execution() ) { \ /* We are the first to signal cancellation, so store the exception that caused it. */ \ context->my_exception = TbbCurrentException( context, TbbCapturedException ); \ } #define TbbCatchAll(context) \ catch ( tbb_exception& exc ) { \ TbbRegisterCurrentException( context, &exc ); \ } catch ( std::exception& exc ) { \ TbbRegisterCurrentException( context, captured_exception::allocate(typeid(exc).name(), exc.what()) ); \ } catch ( ... ) { \ TbbRegisterCurrentException( context, captured_exception::allocate("...", "Unidentified exception") );\ } #else /* !__TBB_TASK_GROUP_CONTEXT */ inline bool ConcurrentWaitsEnabled ( task& t ) { return false; } #endif /* __TBB_TASK_GROUP_CONTEXT */ //------------------------------------------------------------------------ // arena_slot //------------------------------------------------------------------------ struct arena_slot_line1 { //TODO: make this tbb:atomic<>. //! Scheduler of the thread attached to the slot /** Marks the slot as busy, and is used to iterate through the schedulers belonging to this arena **/ generic_scheduler* my_scheduler; // Synchronization of access to Task pool /** Also is used to specify if the slot is empty or locked: 0 - empty -1 - locked **/ task* *__TBB_atomic task_pool; //! Index of the first ready task in the deque. /** Modified by thieves, and by the owner during compaction/reallocation **/ __TBB_atomic size_t head; }; struct arena_slot_line2 { //! Hint provided for operations with the container of starvation-resistant tasks. /** Modified by the owner thread (during these operations). **/ unsigned hint_for_pop; //! Index of the element following the last ready task in the deque. /** Modified by the owner thread. **/ __TBB_atomic size_t tail; //! Capacity of the primary task pool (number of elements - pointers to task). size_t my_task_pool_size; // Task pool of the scheduler that owns this slot task* *__TBB_atomic task_pool_ptr; #if __TBB_STATISTICS //! Set of counters to accumulate internal statistics related to this arena statistics_counters *my_counters; #endif /* __TBB_STATISTICS */ }; struct arena_slot : padded, padded { #if TBB_USE_ASSERT void fill_with_canary_pattern ( size_t first, size_t last ) { for ( size_t i = first; i < last; ++i ) poison_pointer(task_pool_ptr[i]); } #else void fill_with_canary_pattern ( size_t, size_t ) {} #endif /* TBB_USE_ASSERT */ void allocate_task_pool( size_t n ) { size_t byte_size = ((n * sizeof(task*) + NFS_MaxLineSize - 1) / NFS_MaxLineSize) * NFS_MaxLineSize; my_task_pool_size = byte_size / sizeof(task*); task_pool_ptr = (task**)NFS_Allocate( 1, byte_size, NULL ); // No need to clear the fresh deque since valid items are designated by the head and tail members. // But fill it with a canary pattern in the high vigilance debug mode. fill_with_canary_pattern( 0, my_task_pool_size ); } //! Deallocate task pool that was allocated by means of allocate_task_pool. void free_task_pool( ) { #if !__TBB_TASK_ARENA __TBB_ASSERT( !task_pool /*TODO: == EmptyTaskPool*/, NULL); #else //TODO: understand the assertion and modify #endif if( task_pool_ptr ) { __TBB_ASSERT( my_task_pool_size, NULL); NFS_Free( task_pool_ptr ); task_pool_ptr = NULL; my_task_pool_size = 0; } } }; #if !__TBB_CPU_CTL_ENV_PRESENT class cpu_ctl_env { fenv_t *my_fenv_ptr; public: cpu_ctl_env() : my_fenv_ptr(NULL) {} ~cpu_ctl_env() { if ( my_fenv_ptr ) tbb::internal::NFS_Free( (void*)my_fenv_ptr ); } // It is possible not to copy memory but just to copy pointers but the following issues should be addressed: // 1. The arena lifetime and the context lifetime are independent; // 2. The user is allowed to recapture different FPU settings to context so 'current FPU settings' inside // dispatch loop may become invalid. // But do we really want to improve the fenv implementation? It seems to be better to replace the fenv implementation // with a platform specific implementation. cpu_ctl_env( const cpu_ctl_env &src ) : my_fenv_ptr(NULL) { *this = src; } cpu_ctl_env& operator=( const cpu_ctl_env &src ) { __TBB_ASSERT( src.my_fenv_ptr, NULL ); if ( !my_fenv_ptr ) my_fenv_ptr = (fenv_t*)tbb::internal::NFS_Allocate(1, sizeof(fenv_t), NULL); *my_fenv_ptr = *src.my_fenv_ptr; return *this; } bool operator!=( const cpu_ctl_env &ctl ) const { __TBB_ASSERT( my_fenv_ptr, "cpu_ctl_env is not initialized." ); __TBB_ASSERT( ctl.my_fenv_ptr, "cpu_ctl_env is not initialized." ); return memcmp( (void*)my_fenv_ptr, (void*)ctl.my_fenv_ptr, sizeof(fenv_t) ); } void get_env () { if ( !my_fenv_ptr ) my_fenv_ptr = (fenv_t*)tbb::internal::NFS_Allocate(1, sizeof(fenv_t), NULL); fegetenv( my_fenv_ptr ); } const cpu_ctl_env& set_env () const { __TBB_ASSERT( my_fenv_ptr, "cpu_ctl_env is not initialized." ); fesetenv( my_fenv_ptr ); return *this; } }; #endif /* !__TBB_CPU_CTL_ENV_PRESENT */ } // namespace internal } // namespace tbb #endif /* _TBB_scheduler_common_H */ ================================================ FILE: benchmarks/tbb/scheduler_utility.h ================================================ /* Copyright 2005-2014 Intel Corporation. All Rights Reserved. This file is part of Threading Building Blocks. Threading Building Blocks is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. Threading Building Blocks is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Threading Building Blocks; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA As a special exception, you may use this file as part of a free software library without restriction. Specifically, if other files instantiate templates or use macros or inline functions from this file, or you compile this file and link it with other files to produce an executable, this file does not by itself cause the resulting executable to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the executable file might be covered by the GNU General Public License. */ #ifndef _TBB_scheduler_utility_H #define _TBB_scheduler_utility_H #include "scheduler.h" namespace tbb { namespace internal { //------------------------------------------------------------------------ // auto_empty_task //------------------------------------------------------------------------ //! Smart holder for the empty task class with automatic destruction class auto_empty_task { task* my_task; generic_scheduler* my_scheduler; public: auto_empty_task ( __TBB_CONTEXT_ARG(generic_scheduler *s, task_group_context* context) ) : my_task( new(&s->allocate_task(sizeof(empty_task), __TBB_CONTEXT_ARG(NULL, context))) empty_task ) , my_scheduler(s) {} // empty_task has trivial destructor, so there's no need to call it. ~auto_empty_task () { my_scheduler->free_task(*my_task); } operator task& () { return *my_task; } task* operator & () { return my_task; } task_prefix& prefix () { return my_task->prefix(); } }; // class auto_empty_task //------------------------------------------------------------------------ // fast_reverse_vector //------------------------------------------------------------------------ //! Vector that grows without reallocations, and stores items in the reverse order. /** Requires to initialize its first segment with a preallocated memory chunk (usually it is static array or an array allocated on the stack). The second template parameter specifies maximal number of segments. Each next segment is twice as large as the previous one. **/ template class fast_reverse_vector { public: fast_reverse_vector ( T* initial_segment, size_t segment_size ) : m_cur_segment(initial_segment) , m_cur_segment_size(segment_size) , m_pos(segment_size) , m_num_segments(0) , m_size(0) { __TBB_ASSERT ( initial_segment && segment_size, "Nonempty initial segment must be supplied"); } ~fast_reverse_vector () { for ( size_t i = 1; i < m_num_segments; ++i ) NFS_Free( m_segments[i] ); } size_t size () const { return m_size + m_cur_segment_size - m_pos; } void push_back ( const T& val ) { if ( !m_pos ) { if ( !m_num_segments ) m_segments[m_num_segments++] = m_cur_segment; m_size += m_cur_segment_size; m_cur_segment_size *= 2; m_pos = m_cur_segment_size; m_segments[m_num_segments++] = m_cur_segment = (T*)NFS_Allocate( m_cur_segment_size, sizeof(T), NULL ); __TBB_ASSERT ( m_num_segments < max_segments, "Maximal capacity exceeded" ); } m_cur_segment[--m_pos] = val; } //! Copies the contents of the vector into the dst array. /** Can only be used when T is a POD type, as copying does not invoke copy constructors. **/ void copy_memory ( T* dst ) const { size_t sz = m_cur_segment_size - m_pos; memcpy( dst, m_cur_segment + m_pos, sz * sizeof(T) ); dst += sz; sz = m_cur_segment_size / 2; for ( long i = (long)m_num_segments - 2; i >= 0; --i ) { memcpy( dst, m_segments[i], sz * sizeof(T) ); dst += sz; sz /= 2; } } protected: //! The current (not completely filled) segment T *m_cur_segment; //! Capacity of m_cur_segment size_t m_cur_segment_size; //! Insertion position in m_cur_segment size_t m_pos; //! Array of segments (has fixed size specified by the second template parameter) T *m_segments[max_segments]; //! Number of segments (the size of m_segments) size_t m_num_segments; //! Number of items in the segments in m_segments size_t m_size; }; // class fast_reverse_vector } // namespace internal } // namespace tbb #endif /* _TBB_scheduler_utility_H */ ================================================ FILE: benchmarks/tbb/semaphore.cpp ================================================ /* Copyright 2005-2014 Intel Corporation. All Rights Reserved. This file is part of Threading Building Blocks. Threading Building Blocks is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. Threading Building Blocks is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Threading Building Blocks; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA As a special exception, you may use this file as part of a free software library without restriction. Specifically, if other files instantiate templates or use macros or inline functions from this file, or you compile this file and link it with other files to produce an executable, this file does not by itself cause the resulting executable to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the executable file might be covered by the GNU General Public License. */ #include "semaphore.h" #if __TBB_USE_SRWLOCK #include "dynamic_link.h" // Refers to src/tbb, not include/tbb #include "tbb_misc.h" #endif namespace tbb { namespace internal { // TODO: For new win UI port, we can use SRWLock API without dynamic_link etc. #if __TBB_USE_SRWLOCK static atomic concmon_module_inited; void WINAPI init_binsem_using_event( SRWLOCK* h_ ) { srwl_or_handle* shptr = (srwl_or_handle*) h_; shptr->h = CreateEventEx( NULL, NULL, 0, EVENT_ALL_ACCESS|SEMAPHORE_ALL_ACCESS ); } void WINAPI acquire_binsem_using_event( SRWLOCK* h_ ) { srwl_or_handle* shptr = (srwl_or_handle*) h_; WaitForSingleObjectEx( shptr->h, INFINITE, FALSE ); } void WINAPI release_binsem_using_event( SRWLOCK* h_ ) { srwl_or_handle* shptr = (srwl_or_handle*) h_; SetEvent( shptr->h ); } static void (WINAPI *__TBB_init_binsem)( SRWLOCK* ) = (void (WINAPI *)(SRWLOCK*))&init_binsem_using_event; static void (WINAPI *__TBB_acquire_binsem)( SRWLOCK* ) = (void (WINAPI *)(SRWLOCK*))&acquire_binsem_using_event; static void (WINAPI *__TBB_release_binsem)( SRWLOCK* ) = (void (WINAPI *)(SRWLOCK*))&release_binsem_using_event; //! Table describing the how to link the handlers. static const dynamic_link_descriptor SRWLLinkTable[] = { DLD(InitializeSRWLock, __TBB_init_binsem), DLD(AcquireSRWLockExclusive, __TBB_acquire_binsem), DLD(ReleaseSRWLockExclusive, __TBB_release_binsem) }; inline void init_concmon_module() { __TBB_ASSERT( (uintptr_t)__TBB_init_binsem==(uintptr_t)&init_binsem_using_event, NULL ); if( dynamic_link( "Kernel32.dll", SRWLLinkTable, sizeof(SRWLLinkTable)/sizeof(dynamic_link_descriptor) ) ) { __TBB_ASSERT( (uintptr_t)__TBB_init_binsem!=(uintptr_t)&init_binsem_using_event, NULL ); __TBB_ASSERT( (uintptr_t)__TBB_acquire_binsem!=(uintptr_t)&acquire_binsem_using_event, NULL ); __TBB_ASSERT( (uintptr_t)__TBB_release_binsem!=(uintptr_t)&release_binsem_using_event, NULL ); } } binary_semaphore::binary_semaphore() { atomic_do_once( &init_concmon_module, concmon_module_inited ); __TBB_init_binsem( &my_sem.lock ); if( (uintptr_t)__TBB_init_binsem!=(uintptr_t)&init_binsem_using_event ) P(); } binary_semaphore::~binary_semaphore() { if( (uintptr_t)__TBB_init_binsem==(uintptr_t)&init_binsem_using_event ) CloseHandle( my_sem.h ); } void binary_semaphore::P() { __TBB_acquire_binsem( &my_sem.lock ); } void binary_semaphore::V() { __TBB_release_binsem( &my_sem.lock ); } #endif /* __TBB_USE_SRWLOCK */ } // namespace internal } // namespace tbb ================================================ FILE: benchmarks/tbb/semaphore.h ================================================ /* Copyright 2005-2014 Intel Corporation. All Rights Reserved. This file is part of Threading Building Blocks. Threading Building Blocks is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. Threading Building Blocks is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Threading Building Blocks; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA As a special exception, you may use this file as part of a free software library without restriction. Specifically, if other files instantiate templates or use macros or inline functions from this file, or you compile this file and link it with other files to produce an executable, this file does not by itself cause the resulting executable to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the executable file might be covered by the GNU General Public License. */ #ifndef __TBB_tbb_semaphore_H #define __TBB_tbb_semaphore_H #include "tbb/tbb_stddef.h" #if _WIN32||_WIN64 #include "tbb/machine/windows_api.h" #elif __APPLE__ #include #include #include #include #else #include #ifdef TBB_USE_DEBUG #include #endif #endif /*_WIN32||_WIN64*/ namespace tbb { namespace internal { #if _WIN32||_WIN64 typedef LONG sem_count_t; //! Edsger Dijkstra's counting semaphore class semaphore : no_copy { static const int max_semaphore_cnt = MAXLONG; public: //! ctor semaphore(size_t start_cnt_ = 0) {init_semaphore(start_cnt_);} //! dtor ~semaphore() {CloseHandle( sem );} //! wait/acquire void P() {WaitForSingleObjectEx( sem, INFINITE, FALSE );} //! post/release void V() {ReleaseSemaphore( sem, 1, NULL );} private: HANDLE sem; void init_semaphore(size_t start_cnt_) { sem = CreateSemaphoreEx( NULL, LONG(start_cnt_), max_semaphore_cnt, NULL, 0, SEMAPHORE_ALL_ACCESS ); } }; #elif __APPLE__ //! Edsger Dijkstra's counting semaphore class semaphore : no_copy { public: //! ctor semaphore(int start_cnt_ = 0) : sem(start_cnt_) { init_semaphore(start_cnt_); } //! dtor ~semaphore() { kern_return_t ret = semaphore_destroy( mach_task_self(), sem ); __TBB_ASSERT_EX( ret==err_none, NULL ); } //! wait/acquire void P() { int ret; do { ret = semaphore_wait( sem ); } while( ret==KERN_ABORTED ); __TBB_ASSERT( ret==KERN_SUCCESS, "semaphore_wait() failed" ); } //! post/release void V() { semaphore_signal( sem ); } private: semaphore_t sem; void init_semaphore(int start_cnt_) { kern_return_t ret = semaphore_create( mach_task_self(), &sem, SYNC_POLICY_FIFO, start_cnt_ ); __TBB_ASSERT_EX( ret==err_none, "failed to create a semaphore" ); } }; #else /* Linux/Unix */ typedef uint32_t sem_count_t; //! Edsger Dijkstra's counting semaphore class semaphore : no_copy { public: //! ctor semaphore(int start_cnt_ = 0 ) { init_semaphore( start_cnt_ ); } //! dtor ~semaphore() { int ret = sem_destroy( &sem ); __TBB_ASSERT_EX( !ret, NULL ); } //! wait/acquire void P() { while( sem_wait( &sem )!=0 ) __TBB_ASSERT( errno==EINTR, NULL ); } //! post/release void V() { sem_post( &sem ); } private: sem_t sem; void init_semaphore(int start_cnt_) { int ret = sem_init( &sem, /*shared among threads*/ 0, start_cnt_ ); __TBB_ASSERT_EX( !ret, NULL ); } }; #endif /* _WIN32||_WIN64 */ //! for performance reasons, we want specialized binary_semaphore #if _WIN32||_WIN64 #if !__TBB_USE_SRWLOCK //! binary_semaphore for concurrent_monitor class binary_semaphore : no_copy { public: //! ctor binary_semaphore() { my_sem = CreateEventEx( NULL, NULL, 0, EVENT_ALL_ACCESS ); } //! dtor ~binary_semaphore() { CloseHandle( my_sem ); } //! wait/acquire void P() { WaitForSingleObjectEx( my_sem, INFINITE, FALSE ); } //! post/release void V() { SetEvent( my_sem ); } private: HANDLE my_sem; }; #else /* __TBB_USE_SRWLOCK */ union srwl_or_handle { SRWLOCK lock; HANDLE h; }; //! binary_semaphore for concurrent_monitor class binary_semaphore : no_copy { public: //! ctor binary_semaphore(); //! dtor ~binary_semaphore(); //! wait/acquire void P(); //! post/release void V(); private: srwl_or_handle my_sem; }; #endif /* !__TBB_USE_SRWLOCK */ #elif __APPLE__ //! binary_semaphore for concurrent monitor class binary_semaphore : no_copy { public: //! ctor binary_semaphore() : my_sem(0) { kern_return_t ret = semaphore_create( mach_task_self(), &my_sem, SYNC_POLICY_FIFO, 0 ); __TBB_ASSERT_EX( ret==err_none, "failed to create a semaphore" ); } //! dtor ~binary_semaphore() { kern_return_t ret = semaphore_destroy( mach_task_self(), my_sem ); __TBB_ASSERT_EX( ret==err_none, NULL ); } //! wait/acquire void P() { int ret; do { ret = semaphore_wait( my_sem ); } while( ret==KERN_ABORTED ); __TBB_ASSERT( ret==KERN_SUCCESS, "semaphore_wait() failed" ); } //! post/release void V() { semaphore_signal( my_sem ); } private: semaphore_t my_sem; }; #else /* Linux/Unix */ #if __TBB_USE_FUTEX class binary_semaphore : no_copy { public: //! ctor binary_semaphore() { my_sem = 1; } //! dtor ~binary_semaphore() {} //! wait/acquire void P() { int s; if( (s = my_sem.compare_and_swap( 1, 0 ))!=0 ) { if( s!=2 ) s = my_sem.fetch_and_store( 2 ); while( s!=0 ) { futex_wait( &my_sem, 2 ); s = my_sem.fetch_and_store( 2 ); } } } //! post/release void V() { __TBB_ASSERT( my_sem>=1, "multiple V()'s in a row?" ); if( my_sem--!=1 ) { //if old value was 2 my_sem = 0; futex_wakeup_one( &my_sem ); } } private: atomic my_sem; }; #else typedef uint32_t sem_count_t; //! binary_semaphore for concurrent monitor class binary_semaphore : no_copy { public: //! ctor binary_semaphore() { int ret = sem_init( &my_sem, /*shared among threads*/ 0, 0 ); __TBB_ASSERT_EX( !ret, NULL ); } //! dtor ~binary_semaphore() { int ret = sem_destroy( &my_sem ); __TBB_ASSERT_EX( !ret, NULL ); } //! wait/acquire void P() { while( sem_wait( &my_sem )!=0 ) __TBB_ASSERT( errno==EINTR, NULL ); } //! post/release void V() { sem_post( &my_sem ); } private: sem_t my_sem; }; #endif /* __TBB_USE_FUTEX */ #endif /* _WIN32||_WIN64 */ } // namespace internal } // namespace tbb #endif /* __TBB_tbb_semaphore_H */ ================================================ FILE: benchmarks/tbb/spin_mutex.cpp ================================================ /* Copyright 2005-2014 Intel Corporation. All Rights Reserved. This file is part of Threading Building Blocks. Threading Building Blocks is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. Threading Building Blocks is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Threading Building Blocks; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA As a special exception, you may use this file as part of a free software library without restriction. Specifically, if other files instantiate templates or use macros or inline functions from this file, or you compile this file and link it with other files to produce an executable, this file does not by itself cause the resulting executable to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the executable file might be covered by the GNU General Public License. */ #include "tbb/tbb_machine.h" #include "tbb/spin_mutex.h" #include "itt_notify.h" #include "tbb_misc.h" namespace tbb { void spin_mutex::scoped_lock::internal_acquire( spin_mutex& m ) { __TBB_ASSERT( !my_mutex, "already holding a lock on a spin_mutex" ); ITT_NOTIFY(sync_prepare, &m); __TBB_LockByte(m.flag); my_mutex = &m; ITT_NOTIFY(sync_acquired, &m); } void spin_mutex::scoped_lock::internal_release() { __TBB_ASSERT( my_mutex, "release on spin_mutex::scoped_lock that is not holding a lock" ); ITT_NOTIFY(sync_releasing, my_mutex); __TBB_UnlockByte(my_mutex->flag); my_mutex = NULL; } bool spin_mutex::scoped_lock::internal_try_acquire( spin_mutex& m ) { __TBB_ASSERT( !my_mutex, "already holding a lock on a spin_mutex" ); bool result = bool( __TBB_TryLockByte(m.flag) ); if( result ) { my_mutex = &m; ITT_NOTIFY(sync_acquired, &m); } return result; } void spin_mutex::internal_construct() { ITT_SYNC_CREATE(this, _T("tbb::spin_mutex"), _T("")); } } // namespace tbb ================================================ FILE: benchmarks/tbb/spin_mutex.h ================================================ /* Copyright 2005-2014 Intel Corporation. All Rights Reserved. This file is part of Threading Building Blocks. Threading Building Blocks is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. Threading Building Blocks is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Threading Building Blocks; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA As a special exception, you may use this file as part of a free software library without restriction. Specifically, if other files instantiate templates or use macros or inline functions from this file, or you compile this file and link it with other files to produce an executable, this file does not by itself cause the resulting executable to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the executable file might be covered by the GNU General Public License. */ #ifndef __TBB_spin_mutex_H #define __TBB_spin_mutex_H #include #include #include "aligned_space.h" #include "tbb_stddef.h" #include "tbb_machine.h" #include "tbb_profiling.h" #include "internal/_mutex_padding.h" namespace tbb { //! A lock that occupies a single byte. /** A spin_mutex is a spin mutex that fits in a single byte. It should be used only for locking short critical sections (typically less than 20 instructions) when fairness is not an issue. If zero-initialized, the mutex is considered unheld. @ingroup synchronization */ class spin_mutex : internal::mutex_copy_deprecated_and_disabled { //! 0 if lock is released, 1 if lock is acquired. __TBB_atomic_flag flag; public: //! Construct unacquired lock. /** Equivalent to zero-initialization of *this. */ spin_mutex() : flag(0) { #if TBB_USE_THREADING_TOOLS internal_construct(); #endif } //! Represents acquisition of a mutex. class scoped_lock : internal::no_copy { private: //! Points to currently held mutex, or NULL if no lock is held. spin_mutex* my_mutex; //! Value to store into spin_mutex::flag to unlock the mutex. /** This variable is no longer used. Instead, 0 and 1 are used to represent that the lock is free and acquired, respectively. We keep the member variable here to ensure backward compatibility */ __TBB_Flag my_unlock_value; //! Like acquire, but with ITT instrumentation. void __TBB_EXPORTED_METHOD internal_acquire( spin_mutex& m ); //! Like try_acquire, but with ITT instrumentation. bool __TBB_EXPORTED_METHOD internal_try_acquire( spin_mutex& m ); //! Like release, but with ITT instrumentation. void __TBB_EXPORTED_METHOD internal_release(); friend class spin_mutex; public: //! Construct without acquiring a mutex. scoped_lock() : my_mutex(NULL), my_unlock_value(0) {} //! Construct and acquire lock on a mutex. scoped_lock( spin_mutex& m ) : my_unlock_value(0) { internal::suppress_unused_warning(my_unlock_value); #if TBB_USE_THREADING_TOOLS||TBB_USE_ASSERT my_mutex=NULL; internal_acquire(m); #else my_mutex=&m; __TBB_LockByte(m.flag); #endif /* TBB_USE_THREADING_TOOLS||TBB_USE_ASSERT*/ } //! Acquire lock. void acquire( spin_mutex& m ) { #if TBB_USE_THREADING_TOOLS||TBB_USE_ASSERT internal_acquire(m); #else my_mutex = &m; __TBB_LockByte(m.flag); #endif /* TBB_USE_THREADING_TOOLS||TBB_USE_ASSERT*/ } //! Try acquiring lock (non-blocking) /** Return true if lock acquired; false otherwise. */ bool try_acquire( spin_mutex& m ) { #if TBB_USE_THREADING_TOOLS||TBB_USE_ASSERT return internal_try_acquire(m); #else bool result = __TBB_TryLockByte(m.flag); if( result ) my_mutex = &m; return result; #endif /* TBB_USE_THREADING_TOOLS||TBB_USE_ASSERT*/ } //! Release lock void release() { #if TBB_USE_THREADING_TOOLS||TBB_USE_ASSERT internal_release(); #else __TBB_UnlockByte(my_mutex->flag); my_mutex = NULL; #endif /* TBB_USE_THREADING_TOOLS||TBB_USE_ASSERT */ } //! Destroy lock. If holding a lock, releases the lock first. ~scoped_lock() { if( my_mutex ) { #if TBB_USE_THREADING_TOOLS||TBB_USE_ASSERT internal_release(); #else __TBB_UnlockByte(my_mutex->flag); #endif /* TBB_USE_THREADING_TOOLS||TBB_USE_ASSERT */ } } }; //! Internal constructor with ITT instrumentation. void __TBB_EXPORTED_METHOD internal_construct(); // Mutex traits static const bool is_rw_mutex = false; static const bool is_recursive_mutex = false; static const bool is_fair_mutex = false; // ISO C++0x compatibility methods //! Acquire lock void lock() { #if TBB_USE_THREADING_TOOLS aligned_space tmp; new(tmp.begin()) scoped_lock(*this); #else __TBB_LockByte(flag); #endif /* TBB_USE_THREADING_TOOLS*/ } //! Try acquiring lock (non-blocking) /** Return true if lock acquired; false otherwise. */ bool try_lock() { #if TBB_USE_THREADING_TOOLS aligned_space tmp; return (new(tmp.begin()) scoped_lock)->internal_try_acquire(*this); #else return __TBB_TryLockByte(flag); #endif /* TBB_USE_THREADING_TOOLS*/ } //! Release lock void unlock() { #if TBB_USE_THREADING_TOOLS aligned_space tmp; scoped_lock& s = *tmp.begin(); s.my_mutex = this; s.internal_release(); #else __TBB_store_with_release(flag, 0); #endif /* TBB_USE_THREADING_TOOLS */ } friend class scoped_lock; }; // end of spin_mutex __TBB_DEFINE_PROFILING_SET_NAME(spin_mutex) } // namespace tbb #if ( __TBB_x86_32 || __TBB_x86_64 ) #include "internal/_x86_eliding_mutex_impl.h" #endif namespace tbb { //! A cross-platform spin mutex with speculative lock acquisition. /** On platforms with proper HW support, this lock may speculatively execute its critical sections, using HW mechanisms to detect real data races and ensure atomicity of the critical sections. In particular, it uses Intel(R) Transactional Synchronization Extensions (Intel(R) TSX). Without such HW support, it behaves like a spin_mutex. It should be used for locking short critical sections where the lock is contended but the data it protects are not. If zero-initialized, the mutex is considered unheld. @ingroup synchronization */ #if ( __TBB_x86_32 || __TBB_x86_64 ) typedef interface7::internal::padded_mutex speculative_spin_mutex; #else typedef interface7::internal::padded_mutex speculative_spin_mutex; #endif __TBB_DEFINE_PROFILING_SET_NAME(speculative_spin_mutex) } // namespace tbb #endif /* __TBB_spin_mutex_H */ ================================================ FILE: benchmarks/tbb/spin_rw_mutex.cpp ================================================ /* Copyright 2005-2014 Intel Corporation. All Rights Reserved. This file is part of Threading Building Blocks. Threading Building Blocks is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. Threading Building Blocks is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Threading Building Blocks; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA As a special exception, you may use this file as part of a free software library without restriction. Specifically, if other files instantiate templates or use macros or inline functions from this file, or you compile this file and link it with other files to produce an executable, this file does not by itself cause the resulting executable to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the executable file might be covered by the GNU General Public License. */ #include "tbb/spin_rw_mutex.h" #include "tbb/tbb_machine.h" #include "tbb/atomic.h" #include "itt_notify.h" #if defined(_MSC_VER) && defined(_Wp64) // Workaround for overzealous compiler warnings in /Wp64 mode #pragma warning (disable: 4244) #endif namespace tbb { template // a template can work with private spin_rw_mutex::state_t static inline T CAS(volatile T &addr, T newv, T oldv) { // ICC (9.1 and 10.1 tried) unable to do implicit conversion // from "volatile T*" to "volatile void*", so explicit cast added. return tbb::internal::as_atomic(addr).compare_and_swap( newv, oldv ); } //! Acquire write lock on the given mutex. bool spin_rw_mutex_v3::internal_acquire_writer() { ITT_NOTIFY(sync_prepare, this); for( internal::atomic_backoff backoff;;backoff.pause() ){ state_t s = const_cast(state); // ensure reloading if( !(s & BUSY) ) { // no readers, no writers if( CAS(state, WRITER, s)==s ) break; // successfully stored writer flag backoff.reset(); // we could be very close to complete op. } else if( !(s & WRITER_PENDING) ) { // no pending writers __TBB_AtomicOR(&state, WRITER_PENDING); } } ITT_NOTIFY(sync_acquired, this); return false; } //! Release writer lock on the given mutex void spin_rw_mutex_v3::internal_release_writer() { ITT_NOTIFY(sync_releasing, this); __TBB_AtomicAND( &state, READERS ); } //! Acquire read lock on given mutex. void spin_rw_mutex_v3::internal_acquire_reader() { ITT_NOTIFY(sync_prepare, this); for( internal::atomic_backoff b;;b.pause() ){ state_t s = const_cast(state); // ensure reloading if( !(s & (WRITER|WRITER_PENDING)) ) { // no writer or write requests state_t t = (state_t)__TBB_FetchAndAddW( &state, (intptr_t) ONE_READER ); if( !( t&WRITER )) break; // successfully stored increased number of readers // writer got there first, undo the increment __TBB_FetchAndAddW( &state, -(intptr_t)ONE_READER ); } } ITT_NOTIFY(sync_acquired, this); __TBB_ASSERT( state & READERS, "invalid state of a read lock: no readers" ); } //! Upgrade reader to become a writer. /** Returns whether the upgrade happened without releasing and re-acquiring the lock */ bool spin_rw_mutex_v3::internal_upgrade() { state_t s = state; __TBB_ASSERT( s & READERS, "invalid state before upgrade: no readers " ); // check and set writer-pending flag // required conditions: either no pending writers, or we are the only reader // (with multiple readers and pending writer, another upgrade could have been requested) while( (s & READERS)==ONE_READER || !(s & WRITER_PENDING) ) { state_t old_s = s; if( (s=CAS(state, s | WRITER | WRITER_PENDING, s))==old_s ) { ITT_NOTIFY(sync_prepare, this); internal::atomic_backoff backoff; while( (state & READERS) != ONE_READER ) backoff.pause(); __TBB_ASSERT((state&(WRITER_PENDING|WRITER))==(WRITER_PENDING|WRITER),"invalid state when upgrading to writer"); // both new readers and writers are blocked at this time __TBB_FetchAndAddW( &state, - (intptr_t)(ONE_READER+WRITER_PENDING)); ITT_NOTIFY(sync_acquired, this); return true; // successfully upgraded } } // slow reacquire internal_release_reader(); return internal_acquire_writer(); // always returns false } //! Downgrade writer to a reader void spin_rw_mutex_v3::internal_downgrade() { ITT_NOTIFY(sync_releasing, this); __TBB_FetchAndAddW( &state, (intptr_t)(ONE_READER-WRITER)); __TBB_ASSERT( state & READERS, "invalid state after downgrade: no readers" ); } //! Release read lock on the given mutex void spin_rw_mutex_v3::internal_release_reader() { __TBB_ASSERT( state & READERS, "invalid state of a read lock: no readers" ); ITT_NOTIFY(sync_releasing, this); // release reader __TBB_FetchAndAddWrelease( &state,-(intptr_t)ONE_READER); } //! Try to acquire write lock on the given mutex bool spin_rw_mutex_v3::internal_try_acquire_writer() { // for a writer: only possible to acquire if no active readers or writers state_t s = state; if( !(s & BUSY) ) // no readers, no writers; mask is 1..1101 if( CAS(state, WRITER, s)==s ) { ITT_NOTIFY(sync_acquired, this); return true; // successfully stored writer flag } return false; } //! Try to acquire read lock on the given mutex bool spin_rw_mutex_v3::internal_try_acquire_reader() { // for a reader: acquire if no active or waiting writers state_t s = state; if( !(s & (WRITER|WRITER_PENDING)) ) { // no writers state_t t = (state_t)__TBB_FetchAndAddW( &state, (intptr_t) ONE_READER ); if( !( t&WRITER )) { // got the lock ITT_NOTIFY(sync_acquired, this); return true; // successfully stored increased number of readers } // writer got there first, undo the increment __TBB_FetchAndAddW( &state, -(intptr_t)ONE_READER ); } return false; } void spin_rw_mutex_v3::internal_construct() { ITT_SYNC_CREATE(this, _T("tbb::spin_rw_mutex"), _T("")); } } // namespace tbb ================================================ FILE: benchmarks/tbb/spin_rw_mutex.h ================================================ /* Copyright 2005-2014 Intel Corporation. All Rights Reserved. This file is part of Threading Building Blocks. Threading Building Blocks is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. Threading Building Blocks is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Threading Building Blocks; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA As a special exception, you may use this file as part of a free software library without restriction. Specifically, if other files instantiate templates or use macros or inline functions from this file, or you compile this file and link it with other files to produce an executable, this file does not by itself cause the resulting executable to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the executable file might be covered by the GNU General Public License. */ #ifndef __TBB_spin_rw_mutex_H #define __TBB_spin_rw_mutex_H #include "tbb_stddef.h" #include "tbb_machine.h" #include "tbb_profiling.h" #include "internal/_mutex_padding.h" namespace tbb { #if __TBB_TSX_AVAILABLE namespace interface8 { namespace internal { class x86_rtm_rw_mutex; }} #endif class spin_rw_mutex_v3; typedef spin_rw_mutex_v3 spin_rw_mutex; //! Fast, unfair, spinning reader-writer lock with backoff and writer-preference /** @ingroup synchronization */ class spin_rw_mutex_v3 : internal::mutex_copy_deprecated_and_disabled { //! @cond INTERNAL //! Internal acquire write lock. bool __TBB_EXPORTED_METHOD internal_acquire_writer(); //! Out of line code for releasing a write lock. /** This code has debug checking and instrumentation for Intel(R) Thread Checker and Intel(R) Thread Profiler. */ void __TBB_EXPORTED_METHOD internal_release_writer(); //! Internal acquire read lock. void __TBB_EXPORTED_METHOD internal_acquire_reader(); //! Internal upgrade reader to become a writer. bool __TBB_EXPORTED_METHOD internal_upgrade(); //! Out of line code for downgrading a writer to a reader. /** This code has debug checking and instrumentation for Intel(R) Thread Checker and Intel(R) Thread Profiler. */ void __TBB_EXPORTED_METHOD internal_downgrade(); //! Internal release read lock. void __TBB_EXPORTED_METHOD internal_release_reader(); //! Internal try_acquire write lock. bool __TBB_EXPORTED_METHOD internal_try_acquire_writer(); //! Internal try_acquire read lock. bool __TBB_EXPORTED_METHOD internal_try_acquire_reader(); //! @endcond public: //! Construct unacquired mutex. spin_rw_mutex_v3() : state(0) { #if TBB_USE_THREADING_TOOLS internal_construct(); #endif } #if TBB_USE_ASSERT //! Destructor asserts if the mutex is acquired, i.e. state is zero. ~spin_rw_mutex_v3() { __TBB_ASSERT( !state, "destruction of an acquired mutex"); }; #endif /* TBB_USE_ASSERT */ //! The scoped locking pattern /** It helps to avoid the common problem of forgetting to release lock. It also nicely provides the "node" for queuing locks. */ class scoped_lock : internal::no_copy { #if __TBB_TSX_AVAILABLE friend class tbb::interface8::internal::x86_rtm_rw_mutex; // helper methods for x86_rtm_rw_mutex spin_rw_mutex *internal_get_mutex() const { return mutex; } void internal_set_mutex(spin_rw_mutex* m) { mutex = m; } #endif public: //! Construct lock that has not acquired a mutex. /** Equivalent to zero-initialization of *this. */ scoped_lock() : mutex(NULL), is_writer(false) {} //! Acquire lock on given mutex. scoped_lock( spin_rw_mutex& m, bool write = true ) : mutex(NULL) { acquire(m, write); } //! Release lock (if lock is held). ~scoped_lock() { if( mutex ) release(); } //! Acquire lock on given mutex. void acquire( spin_rw_mutex& m, bool write = true ) { __TBB_ASSERT( !mutex, "holding mutex already" ); is_writer = write; mutex = &m; if( write ) mutex->internal_acquire_writer(); else mutex->internal_acquire_reader(); } //! Upgrade reader to become a writer. /** Returns whether the upgrade happened without releasing and re-acquiring the lock */ bool upgrade_to_writer() { __TBB_ASSERT( mutex, "lock is not acquired" ); __TBB_ASSERT( !is_writer, "not a reader" ); is_writer = true; return mutex->internal_upgrade(); } //! Release lock. void release() { __TBB_ASSERT( mutex, "lock is not acquired" ); spin_rw_mutex *m = mutex; mutex = NULL; #if TBB_USE_THREADING_TOOLS||TBB_USE_ASSERT if( is_writer ) m->internal_release_writer(); else m->internal_release_reader(); #else if( is_writer ) __TBB_AtomicAND( &m->state, READERS ); else __TBB_FetchAndAddWrelease( &m->state, -(intptr_t)ONE_READER); #endif /* TBB_USE_THREADING_TOOLS||TBB_USE_ASSERT */ } //! Downgrade writer to become a reader. bool downgrade_to_reader() { __TBB_ASSERT( mutex, "lock is not acquired" ); __TBB_ASSERT( is_writer, "not a writer" ); #if TBB_USE_THREADING_TOOLS||TBB_USE_ASSERT mutex->internal_downgrade(); #else __TBB_FetchAndAddW( &mutex->state, ((intptr_t)ONE_READER-WRITER)); #endif /* TBB_USE_THREADING_TOOLS||TBB_USE_ASSERT */ is_writer = false; return true; } //! Try acquire lock on given mutex. bool try_acquire( spin_rw_mutex& m, bool write = true ) { __TBB_ASSERT( !mutex, "holding mutex already" ); bool result; is_writer = write; result = write? m.internal_try_acquire_writer() : m.internal_try_acquire_reader(); if( result ) mutex = &m; return result; } protected: //! The pointer to the current mutex that is held, or NULL if no mutex is held. spin_rw_mutex* mutex; //! If mutex!=NULL, then is_writer is true if holding a writer lock, false if holding a reader lock. /** Not defined if not holding a lock. */ bool is_writer; }; // Mutex traits static const bool is_rw_mutex = true; static const bool is_recursive_mutex = false; static const bool is_fair_mutex = false; // ISO C++0x compatibility methods //! Acquire writer lock void lock() {internal_acquire_writer();} //! Try acquiring writer lock (non-blocking) /** Return true if lock acquired; false otherwise. */ bool try_lock() {return internal_try_acquire_writer();} //! Release lock void unlock() { #if TBB_USE_THREADING_TOOLS||TBB_USE_ASSERT if( state&WRITER ) internal_release_writer(); else internal_release_reader(); #else if( state&WRITER ) __TBB_AtomicAND( &state, READERS ); else __TBB_FetchAndAddWrelease( &state, -(intptr_t)ONE_READER); #endif /* TBB_USE_THREADING_TOOLS||TBB_USE_ASSERT */ } // Methods for reader locks that resemble ISO C++0x compatibility methods. //! Acquire reader lock void lock_read() {internal_acquire_reader();} //! Try acquiring reader lock (non-blocking) /** Return true if reader lock acquired; false otherwise. */ bool try_lock_read() {return internal_try_acquire_reader();} protected: typedef intptr_t state_t; static const state_t WRITER = 1; static const state_t WRITER_PENDING = 2; static const state_t READERS = ~(WRITER | WRITER_PENDING); static const state_t ONE_READER = 4; static const state_t BUSY = WRITER | READERS; //! State of lock /** Bit 0 = writer is holding lock Bit 1 = request by a writer to acquire lock (hint to readers to wait) Bit 2..N = number of readers holding lock */ state_t state; private: void __TBB_EXPORTED_METHOD internal_construct(); }; __TBB_DEFINE_PROFILING_SET_NAME(spin_rw_mutex) } // namespace tbb #if __TBB_TSX_AVAILABLE #include "internal/_x86_rtm_rw_mutex_impl.h" #endif namespace tbb { namespace interface8 { //! A cross-platform spin reader/writer mutex with speculative lock acquisition. /** On platforms with proper HW support, this lock may speculatively execute its critical sections, using HW mechanisms to detect real data races and ensure atomicity of the critical sections. In particular, it uses Intel(R) Transactional Synchronization Extensions (Intel(R) TSX). Without such HW support, it behaves like a spin_rw_mutex. It should be used for locking short critical sections where the lock is contended but the data it protects are not. @ingroup synchronization */ #if __TBB_TSX_AVAILABLE typedef interface7::internal::padded_mutex speculative_spin_rw_mutex; #else typedef interface7::internal::padded_mutex speculative_spin_rw_mutex; #endif } // namespace interface8 using interface8::speculative_spin_rw_mutex; __TBB_DEFINE_PROFILING_SET_NAME(speculative_spin_rw_mutex) } // namespace tbb #endif /* __TBB_spin_rw_mutex_H */ ================================================ FILE: benchmarks/tbb/task.cpp ================================================ /* Copyright 2005-2014 Intel Corporation. All Rights Reserved. This file is part of Threading Building Blocks. Threading Building Blocks is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. Threading Building Blocks is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Threading Building Blocks; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA As a special exception, you may use this file as part of a free software library without restriction. Specifically, if other files instantiate templates or use macros or inline functions from this file, or you compile this file and link it with other files to produce an executable, this file does not by itself cause the resulting executable to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the executable file might be covered by the GNU General Public License. */ // Do not include task.h directly. Use scheduler_common.h instead #include "scheduler_common.h" #include "governor.h" #include "scheduler.h" #include "itt_notify.h" #include "tbb/cache_aligned_allocator.h" #include "tbb/partitioner.h" #include namespace tbb { using namespace std; namespace internal { //------------------------------------------------------------------------ // Methods of allocate_root_proxy //------------------------------------------------------------------------ task& allocate_root_proxy::allocate( size_t size ) { internal::generic_scheduler* v = governor::local_scheduler(); __TBB_ASSERT( v, "thread did not activate a task_scheduler_init object?" ); #if __TBB_TASK_GROUP_CONTEXT task_prefix& p = v->my_innermost_running_task->prefix(); ITT_STACK_CREATE(p.context->itt_caller); #endif // New root task becomes part of the currently running task's cancellation context return v->allocate_task( size, __TBB_CONTEXT_ARG(NULL, p.context) ); } void allocate_root_proxy::free( task& task ) { internal::generic_scheduler* v = governor::local_scheduler(); __TBB_ASSERT( v, "thread does not have initialized task_scheduler_init object?" ); #if __TBB_TASK_GROUP_CONTEXT // No need to do anything here as long as there is no context -> task connection #endif /* __TBB_TASK_GROUP_CONTEXT */ v->free_task( task ); } #if __TBB_TASK_GROUP_CONTEXT //------------------------------------------------------------------------ // Methods of allocate_root_with_context_proxy //------------------------------------------------------------------------ task& allocate_root_with_context_proxy::allocate( size_t size ) const { internal::generic_scheduler* s = governor::local_scheduler(); __TBB_ASSERT( s, "Scheduler auto-initialization failed?" ); task& t = s->allocate_task( size, NULL, &my_context ); // Supported usage model prohibits concurrent initial binding. Thus we do not // need interlocked operations or fences to manipulate with my_context.my_kind if ( __TBB_load_relaxed(my_context.my_kind) == task_group_context::binding_required ) { // If we are in the outermost task dispatch loop of a master thread, then // there is nothing to bind this context to, and we skip the binding part // treating the context as isolated. if ( s->my_innermost_running_task == s->my_dummy_task ) __TBB_store_relaxed(my_context.my_kind, task_group_context::isolated); else my_context.bind_to( s ); } #if __TBB_FP_CONTEXT if ( __TBB_load_relaxed(my_context.my_kind) == task_group_context::isolated && !(my_context.my_version_and_traits & task_group_context::fp_settings) ) my_context.copy_fp_settings( *s->my_arena->my_default_ctx ); #endif ITT_STACK_CREATE(my_context.itt_caller); return t; } void allocate_root_with_context_proxy::free( task& task ) const { internal::generic_scheduler* v = governor::local_scheduler(); __TBB_ASSERT( v, "thread does not have initialized task_scheduler_init object?" ); // No need to do anything here as long as unbinding is performed by context destructor only. v->free_task( task ); } #endif /* __TBB_TASK_GROUP_CONTEXT */ //------------------------------------------------------------------------ // Methods of allocate_continuation_proxy //------------------------------------------------------------------------ task& allocate_continuation_proxy::allocate( size_t size ) const { task& t = *((task*)this); assert_task_valid(t); generic_scheduler* s = governor::local_scheduler(); task* parent = t.parent(); t.prefix().parent = NULL; return s->allocate_task( size, __TBB_CONTEXT_ARG(parent, t.prefix().context) ); } void allocate_continuation_proxy::free( task& mytask ) const { // Restore the parent as it was before the corresponding allocate was called. ((task*)this)->prefix().parent = mytask.parent(); governor::local_scheduler()->free_task(mytask); } //------------------------------------------------------------------------ // Methods of allocate_child_proxy //------------------------------------------------------------------------ task& allocate_child_proxy::allocate( size_t size ) const { task& t = *((task*)this); assert_task_valid(t); generic_scheduler* s = governor::local_scheduler(); return s->allocate_task( size, __TBB_CONTEXT_ARG(&t, t.prefix().context) ); } void allocate_child_proxy::free( task& mytask ) const { governor::local_scheduler()->free_task(mytask); } //------------------------------------------------------------------------ // Methods of allocate_additional_child_of_proxy //------------------------------------------------------------------------ task& allocate_additional_child_of_proxy::allocate( size_t size ) const { parent.increment_ref_count(); generic_scheduler* s = governor::local_scheduler(); return s->allocate_task( size, __TBB_CONTEXT_ARG(&parent, parent.prefix().context) ); } void allocate_additional_child_of_proxy::free( task& task ) const { // Undo the increment. We do not check the result of the fetch-and-decrement. // We could consider be spawning the task if the fetch-and-decrement returns 1. // But we do not know that was the programmer's intention. // Furthermore, if it was the programmer's intention, the program has a fundamental // race condition (that we warn about in Reference manual), because the // reference count might have become zero before the corresponding call to // allocate_additional_child_of_proxy::allocate. parent.internal_decrement_ref_count(); governor::local_scheduler()->free_task(task); } //------------------------------------------------------------------------ // Support for auto_partitioner //------------------------------------------------------------------------ size_t get_initial_auto_partitioner_divisor() { const size_t X_FACTOR = 4; return X_FACTOR * (1+governor::local_scheduler()->number_of_workers_in_my_arena()); } //------------------------------------------------------------------------ // Methods of affinity_partitioner_base_v3 //------------------------------------------------------------------------ void affinity_partitioner_base_v3::resize( unsigned factor ) { // Check factor to avoid asking for number of workers while there might be no arena. size_t new_size = factor ? factor*(1+governor::local_scheduler()->number_of_workers_in_my_arena()) : 0; if( new_size!=my_size ) { if( my_array ) { NFS_Free( my_array ); // Following two assignments must be done here for sake of exception safety. my_array = NULL; my_size = 0; } if( new_size ) { my_array = static_cast(NFS_Allocate(new_size,sizeof(affinity_id), NULL )); memset( my_array, 0, sizeof(affinity_id)*new_size ); my_size = new_size; } } } } // namespace internal using namespace tbb::internal; //------------------------------------------------------------------------ // task //------------------------------------------------------------------------ void task::internal_set_ref_count( int count ) { __TBB_ASSERT( count>=0, "count must not be negative" ); task_prefix &p = prefix(); __TBB_ASSERT(p.ref_count==1 && p.state==allocated && self().parent()==this || !(p.extra_state & es_ref_count_active), "ref_count race detected"); ITT_NOTIFY(sync_releasing, &p.ref_count); p.ref_count = count; } internal::reference_count task::internal_decrement_ref_count() { ITT_NOTIFY( sync_releasing, &prefix().ref_count ); internal::reference_count k = __TBB_FetchAndDecrementWrelease( &prefix().ref_count ); __TBB_ASSERT( k>=1, "task's reference count underflowed" ); if( k==1 ) ITT_NOTIFY( sync_acquired, &prefix().ref_count ); return k-1; } task& task::self() { generic_scheduler *v = governor::local_scheduler(); v->assert_task_pool_valid(); __TBB_ASSERT( v->my_innermost_running_task, NULL ); return *v->my_innermost_running_task; } bool task::is_owned_by_current_thread() const { return true; } void interface5::internal::task_base::destroy( task& victim ) { // 1 may be a guard reference for wait_for_all, which was not reset because // of concurrent_wait mode or because prepared root task was not actually used // for spawning tasks (as in structured_task_group). __TBB_ASSERT( (intptr_t)victim.prefix().ref_count <= 1, "Task being destroyed must not have children" ); __TBB_ASSERT( victim.state()==task::allocated, "illegal state for victim task" ); task* parent = victim.parent(); victim.~task(); if( parent ) { __TBB_ASSERT( parent->state()!=task::freed && parent->state()!=task::ready, "attempt to destroy child of running or corrupted parent?" ); // 'reexecute' and 'executing' are also signs of a race condition, since most tasks // set their ref_count upon entry but "es_ref_count_active" should detect this parent->internal_decrement_ref_count(); // Even if the last reference to *parent is removed, it should not be spawned (documented behavior). } governor::local_scheduler()->free_task( victim ); } void task::spawn_and_wait_for_all( task_list& list ) { generic_scheduler* s = governor::local_scheduler(); task* t = list.first; if( t ) { if( &t->prefix().next!=list.next_ptr ) s->local_spawn( *t->prefix().next, *list.next_ptr ); list.clear(); } s->local_wait_for_all( *this, t ); } /** Defined out of line so that compiler does not replicate task's vtable. It's pointless to define it inline anyway, because all call sites to it are virtual calls that the compiler is unlikely to optimize. */ void task::note_affinity( affinity_id ) { } #if __TBB_TASK_GROUP_CONTEXT void task::change_group ( task_group_context& ctx ) { prefix().context = &ctx; internal::generic_scheduler* s = governor::local_scheduler(); if ( __TBB_load_relaxed(ctx.my_kind) == task_group_context::binding_required ) { // If we are in the outermost task dispatch loop of a master thread, then // there is nothing to bind this context to, and we skip the binding part // treating the context as isolated. if ( s->my_innermost_running_task == s->my_dummy_task ) __TBB_store_relaxed(ctx.my_kind, task_group_context::isolated); else ctx.bind_to( s ); } #if __TBB_FP_CONTEXT if ( __TBB_load_relaxed(ctx.my_kind) == task_group_context::isolated && !(ctx.my_version_and_traits & task_group_context::fp_settings) ) ctx.copy_fp_settings( *s->my_arena->my_default_ctx ); #endif ITT_STACK_CREATE(ctx.itt_caller); } #endif /* __TBB_TASK_GROUP_CONTEXT */ } // namespace tbb ================================================ FILE: benchmarks/tbb/task.h ================================================ /* Copyright 2005-2014 Intel Corporation. All Rights Reserved. This file is part of Threading Building Blocks. Threading Building Blocks is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. Threading Building Blocks is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Threading Building Blocks; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA As a special exception, you may use this file as part of a free software library without restriction. Specifically, if other files instantiate templates or use macros or inline functions from this file, or you compile this file and link it with other files to produce an executable, this file does not by itself cause the resulting executable to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the executable file might be covered by the GNU General Public License. */ #ifndef __TBB_task_H #define __TBB_task_H #include "tbb_stddef.h" #include "tbb_machine.h" #include typedef struct ___itt_caller *__itt_caller; namespace tbb { class task; class task_list; class task_group_context; // MSVC does not allow taking the address of a member that was defined // privately in task_base and made public in class task via a using declaration. #if _MSC_VER || (__GNUC__==3 && __GNUC_MINOR__<3) #define __TBB_TASK_BASE_ACCESS public #else #define __TBB_TASK_BASE_ACCESS private #endif namespace internal { //< @cond INTERNAL class allocate_additional_child_of_proxy: no_assign { //! No longer used, but retained for binary layout compatibility. Always NULL. task* self; task& parent; public: explicit allocate_additional_child_of_proxy( task& parent_ ) : self(NULL), parent(parent_) {} task& __TBB_EXPORTED_METHOD allocate( size_t size ) const; void __TBB_EXPORTED_METHOD free( task& ) const; }; struct cpu_ctl_env_space { int space[sizeof(internal::uint64_t)/sizeof(int)]; }; } //< namespace internal @endcond namespace interface5 { namespace internal { //! Base class for methods that became static in TBB 3.0. /** TBB's evolution caused the "this" argument for several methods to become obsolete. However, for backwards binary compatibility, the new methods need distinct names, otherwise the One Definition Rule would be broken. Hence the new methods are defined in this private base class, and then exposed in class task via using declarations. */ class task_base: tbb::internal::no_copy { __TBB_TASK_BASE_ACCESS: friend class tbb::task; //! Schedule task for execution when a worker becomes available. static void spawn( task& t ); //! Spawn multiple tasks and clear list. static void spawn( task_list& list ); //! Like allocate_child, except that task's parent becomes "t", not this. /** Typically used in conjunction with schedule_to_reexecute to implement while loops. Atomically increments the reference count of t.parent() */ static tbb::internal::allocate_additional_child_of_proxy allocate_additional_child_of( task& t ) { return tbb::internal::allocate_additional_child_of_proxy(t); } //! Destroy a task. /** Usually, calling this method is unnecessary, because a task is implicitly deleted after its execute() method runs. However, sometimes a task needs to be explicitly deallocated, such as when a root task is used as the parent in spawn_and_wait_for_all. */ static void __TBB_EXPORTED_FUNC destroy( task& victim ); }; } // internal } // interface5 //! @cond INTERNAL namespace internal { class scheduler: no_copy { public: //! For internal use only virtual void spawn( task& first, task*& next ) = 0; //! For internal use only virtual void wait_for_all( task& parent, task* child ) = 0; //! For internal use only virtual void spawn_root_and_wait( task& first, task*& next ) = 0; //! Pure virtual destructor; // Have to have it just to shut up overzealous compilation warnings virtual ~scheduler() = 0; //! For internal use only virtual void enqueue( task& t, void* reserved ) = 0; }; //! A reference count /** Should always be non-negative. A signed type is used so that underflow can be detected. */ typedef intptr_t reference_count; //! An id as used for specifying affinity. typedef unsigned short affinity_id; #if __TBB_TASK_GROUP_CONTEXT class generic_scheduler; struct context_list_node_t { context_list_node_t *my_prev, *my_next; }; class allocate_root_with_context_proxy: no_assign { task_group_context& my_context; public: allocate_root_with_context_proxy ( task_group_context& ctx ) : my_context(ctx) {} task& __TBB_EXPORTED_METHOD allocate( size_t size ) const; void __TBB_EXPORTED_METHOD free( task& ) const; }; #endif /* __TBB_TASK_GROUP_CONTEXT */ class allocate_root_proxy: no_assign { public: static task& __TBB_EXPORTED_FUNC allocate( size_t size ); static void __TBB_EXPORTED_FUNC free( task& ); }; class allocate_continuation_proxy: no_assign { public: task& __TBB_EXPORTED_METHOD allocate( size_t size ) const; void __TBB_EXPORTED_METHOD free( task& ) const; }; class allocate_child_proxy: no_assign { public: task& __TBB_EXPORTED_METHOD allocate( size_t size ) const; void __TBB_EXPORTED_METHOD free( task& ) const; }; //! Memory prefix to a task object. /** This class is internal to the library. Do not reference it directly, except within the library itself. Fields are ordered in way that preserves backwards compatibility and yields good packing on typical 32-bit and 64-bit platforms. In case task prefix size exceeds 32 or 64 bytes on IA32 and Intel64 architectures correspondingly, consider dynamic setting of task_alignment and task_prefix_reservation_size based on the maximal operand size supported by the current CPU. @ingroup task_scheduling */ class task_prefix { private: friend class tbb::task; friend class tbb::interface5::internal::task_base; friend class tbb::task_list; friend class internal::scheduler; friend class internal::allocate_root_proxy; friend class internal::allocate_child_proxy; friend class internal::allocate_continuation_proxy; friend class internal::allocate_additional_child_of_proxy; #if __TBB_TASK_GROUP_CONTEXT //! Shared context that is used to communicate asynchronous state changes /** Currently it is used to broadcast cancellation requests generated both by users and as the result of unhandled exceptions in the task::execute() methods. */ task_group_context *context; #endif /* __TBB_TASK_GROUP_CONTEXT */ //! The scheduler that allocated the task, or NULL if the task is big. /** Small tasks are pooled by the scheduler that allocated the task. If a scheduler needs to free a small task allocated by another scheduler, it returns the task to that other scheduler. This policy avoids memory space blowup issues for memory allocators that allocate from thread-specific pools. */ scheduler* origin; #if __TBB_TASK_PRIORITY union { #endif /* __TBB_TASK_PRIORITY */ //! Obsolete. The scheduler that owns the task. /** Retained only for the sake of backward binary compatibility. Still used by inline methods in the task.h header. **/ scheduler* owner; #if __TBB_TASK_PRIORITY //! Pointer to the next offloaded lower priority task. /** Used to maintain a list of offloaded tasks inside the scheduler. **/ task* next_offloaded; }; #endif /* __TBB_TASK_PRIORITY */ //! The task whose reference count includes me. /** In the "blocking style" of programming, this field points to the parent task. In the "continuation-passing style" of programming, this field points to the continuation of the parent. */ tbb::task* parent; //! Reference count used for synchronization. /** In the "continuation-passing style" of programming, this field is the difference of the number of allocated children minus the number of children that have completed. In the "blocking style" of programming, this field is one more than the difference. */ __TBB_atomic reference_count ref_count; //! Obsolete. Used to be scheduling depth before TBB 2.2 /** Retained only for the sake of backward binary compatibility. Not used by TBB anymore. **/ int depth; //! A task::state_type, stored as a byte for compactness. /** This state is exposed to users via method task::state(). */ unsigned char state; //! Miscellaneous state that is not directly visible to users, stored as a byte for compactness. /** 0x0 -> version 1.0 task 0x1 -> version >=2.1 task 0x10 -> task was enqueued 0x20 -> task_proxy 0x40 -> task has live ref_count 0x80 -> a stolen task */ unsigned char extra_state; affinity_id affinity; //! "next" field for list of task tbb::task* next; //! The task corresponding to this task_prefix. tbb::task& task() {return *reinterpret_cast(this+1);} }; } // namespace internal //! @endcond #if __TBB_TASK_GROUP_CONTEXT #if __TBB_TASK_PRIORITY namespace internal { static const int priority_stride_v4 = INT_MAX / 4; } enum priority_t { priority_normal = internal::priority_stride_v4 * 2, priority_low = priority_normal - internal::priority_stride_v4, priority_high = priority_normal + internal::priority_stride_v4 }; #endif /* __TBB_TASK_PRIORITY */ #if TBB_USE_CAPTURED_EXCEPTION class tbb_exception; #else namespace internal { class tbb_exception_ptr; } #endif /* !TBB_USE_CAPTURED_EXCEPTION */ class task_scheduler_init; namespace interface7 { class task_arena; } //! Used to form groups of tasks /** @ingroup task_scheduling The context services explicit cancellation requests from user code, and unhandled exceptions intercepted during tasks execution. Intercepting an exception results in generating internal cancellation requests (which is processed in exactly the same way as external ones). The context is associated with one or more root tasks and defines the cancellation group that includes all the descendants of the corresponding root task(s). Association is established when a context object is passed as an argument to the task::allocate_root() method. See task_group_context::task_group_context for more details. The context can be bound to another one, and other contexts can be bound to it, forming a tree-like structure: parent -> this -> children. Arrows here designate cancellation propagation direction. If a task in a cancellation group is cancelled all the other tasks in this group and groups bound to it (as children) get cancelled too. IMPLEMENTATION NOTE: When adding new members to task_group_context or changing types of existing ones, update the size of both padding buffers (_leading_padding and _trailing_padding) appropriately. See also VERSIONING NOTE at the constructor definition below. **/ class task_group_context : internal::no_copy { private: friend class internal::generic_scheduler; friend class task_scheduler_init; friend class interface7::task_arena; #if TBB_USE_CAPTURED_EXCEPTION typedef tbb_exception exception_container_type; #else typedef internal::tbb_exception_ptr exception_container_type; #endif enum version_traits_word_layout { traits_offset = 16, version_mask = 0xFFFF, traits_mask = 0xFFFFul << traits_offset }; public: enum kind_type { isolated, bound }; enum traits_type { exact_exception = 0x0001ul << traits_offset, #if __TBB_FP_CONTEXT fp_settings = 0x0002ul << traits_offset, #endif concurrent_wait = 0x0004ul << traits_offset, #if TBB_USE_CAPTURED_EXCEPTION default_traits = 0 #else default_traits = exact_exception #endif /* !TBB_USE_CAPTURED_EXCEPTION */ }; private: enum state { may_have_children = 1, // the following enumerations must be the last, new 2^x values must go above next_state_value, low_unused_state_bit = (next_state_value-1)*2 }; union { //! Flavor of this context: bound or isolated. // TODO: describe asynchronous use, and whether any memory semantics are needed __TBB_atomic kind_type my_kind; uintptr_t _my_kind_aligner; }; //! Pointer to the context of the parent cancellation group. NULL for isolated contexts. task_group_context *my_parent; //! Used to form the thread specific list of contexts without additional memory allocation. /** A context is included into the list of the current thread when its binding to its parent happens. Any context can be present in the list of one thread only. **/ internal::context_list_node_t my_node; //! Used to set and maintain stack stitching point for Intel Performance Tools. __itt_caller itt_caller; //! Leading padding protecting accesses to frequently used members from false sharing. /** Read accesses to the field my_cancellation_requested are on the hot path inside the scheduler. This padding ensures that this field never shares the same cache line with a local variable that is frequently written to. **/ char _leading_padding[internal::NFS_MaxLineSize - 2 * sizeof(uintptr_t)- sizeof(void*) - sizeof(internal::context_list_node_t) - sizeof(__itt_caller) #if __TBB_FP_CONTEXT - sizeof(internal::cpu_ctl_env_space) #endif ]; #if __TBB_FP_CONTEXT //! Space for platform-specific FPU settings. /** Must only be accessed inside TBB binaries, and never directly in user code or inline methods. */ internal::cpu_ctl_env_space my_cpu_ctl_env; #endif //! Specifies whether cancellation was requested for this task group. uintptr_t my_cancellation_requested; //! Version for run-time checks and behavioral traits of the context. /** Version occupies low 16 bits, and traits (zero or more ORed enumerators from the traits_type enumerations) take the next 16 bits. Original (zeroth) version of the context did not support any traits. **/ uintptr_t my_version_and_traits; //! Pointer to the container storing exception being propagated across this task group. exception_container_type *my_exception; //! Scheduler instance that registered this context in its thread specific list. internal::generic_scheduler *my_owner; //! Internal state (combination of state flags, currently only may_have_children). uintptr_t my_state; #if __TBB_TASK_PRIORITY //! Priority level of the task group (in normalized representation) intptr_t my_priority; #endif /* __TBB_TASK_PRIORITY */ //! Trailing padding protecting accesses to frequently used members from false sharing /** \sa _leading_padding **/ char _trailing_padding[internal::NFS_MaxLineSize - 2 * sizeof(uintptr_t) - 2 * sizeof(void*) #if __TBB_TASK_PRIORITY - sizeof(intptr_t) #endif /* __TBB_TASK_PRIORITY */ ]; public: //! Default & binding constructor. /** By default a bound context is created. That is this context will be bound (as child) to the context of the task calling task::allocate_root(this_context) method. Cancellation requests passed to the parent context are propagated to all the contexts bound to it. Similarly priority change is propagated from the parent context to its children. If task_group_context::isolated is used as the argument, then the tasks associated with this context will never be affected by events in any other context. Creating isolated contexts involve much less overhead, but they have limited utility. Normally when an exception occurs in an algorithm that has nested ones running, it is desirably to have all the nested algorithms cancelled as well. Such a behavior requires nested algorithms to use bound contexts. There is one good place where using isolated algorithms is beneficial. It is a master thread. That is if a particular algorithm is invoked directly from the master thread (not from a TBB task), supplying it with explicitly created isolated context will result in a faster algorithm startup. VERSIONING NOTE: Implementation(s) of task_group_context constructor(s) cannot be made entirely out-of-line because the run-time version must be set by the user code. This will become critically important for binary compatibility, if we ever have to change the size of the context object. Boosting the runtime version will also be necessary if new data fields are introduced in the currently unused padding areas and these fields are updated by inline methods. **/ task_group_context ( kind_type relation_with_parent = bound, uintptr_t traits = default_traits ) : my_kind(relation_with_parent) , my_version_and_traits(2 | traits) { init(); } // Do not introduce standalone unbind method since it will break state propagation assumptions __TBB_EXPORTED_METHOD ~task_group_context (); //! Forcefully reinitializes the context after the task tree it was associated with is completed. /** Because the method assumes that all the tasks that used to be associated with this context have already finished, calling it while the context is still in use somewhere in the task hierarchy leads to undefined behavior. IMPORTANT: This method is not thread safe! The method does not change the context's parent if it is set. **/ void __TBB_EXPORTED_METHOD reset (); //! Initiates cancellation of all tasks in this cancellation group and its subordinate groups. /** \return false if cancellation has already been requested, true otherwise. Note that canceling never fails. When false is returned, it just means that another thread (or this one) has already sent cancellation request to this context or to one of its ancestors (if this context is bound). It is guaranteed that when this method is concurrently called on the same not yet cancelled context, true will be returned by one and only one invocation. **/ bool __TBB_EXPORTED_METHOD cancel_group_execution (); //! Returns true if the context received cancellation request. bool __TBB_EXPORTED_METHOD is_group_execution_cancelled () const; //! Records the pending exception, and cancels the task group. /** May be called only from inside a catch-block. If the context is already cancelled, does nothing. The method brings the task group associated with this context exactly into the state it would be in, if one of its tasks threw the currently pending exception during its execution. In other words, it emulates the actions of the scheduler's dispatch loop exception handler. **/ void __TBB_EXPORTED_METHOD register_pending_exception (); #if __TBB_FP_CONTEXT //! Captures the current FPU control settings to the context. /** Because the method assumes that all the tasks that used to be associated with this context have already finished, calling it while the context is still in use somewhere in the task hierarchy leads to undefined behavior. IMPORTANT: This method is not thread safe! The method does not change the FPU control settings of the context's parent. **/ void __TBB_EXPORTED_METHOD capture_fp_settings (); #endif #if __TBB_TASK_PRIORITY //! Changes priority of the task group void set_priority ( priority_t ); //! Retrieves current priority of the current task group priority_t priority () const; #endif /* __TBB_TASK_PRIORITY */ protected: //! Out-of-line part of the constructor. /** Singled out to ensure backward binary compatibility of the future versions. **/ void __TBB_EXPORTED_METHOD init (); private: friend class task; friend class internal::allocate_root_with_context_proxy; static const kind_type binding_required = bound; static const kind_type binding_completed = kind_type(bound+1); static const kind_type detached = kind_type(binding_completed+1); static const kind_type dying = kind_type(detached+1); //! Propagates any state change detected to *this, and as an optimisation possibly also upward along the heritage line. template void propagate_task_group_state ( T task_group_context::*mptr_state, task_group_context& src, T new_state ); //! Registers this context with the local scheduler and binds it to its parent context void bind_to ( internal::generic_scheduler *local_sched ); //! Registers this context with the local scheduler void register_with ( internal::generic_scheduler *local_sched ); #if __TBB_FP_CONTEXT //! Copies FPU control setting from another context // TODO: Consider adding #else stub in order to omit #if sections in other code void copy_fp_settings( const task_group_context &src ); #endif /* __TBB_FP_CONTEXT */ }; // class task_group_context #endif /* __TBB_TASK_GROUP_CONTEXT */ //! Base class for user-defined tasks. /** @ingroup task_scheduling */ class task: __TBB_TASK_BASE_ACCESS interface5::internal::task_base { //! Set reference count void __TBB_EXPORTED_METHOD internal_set_ref_count( int count ); //! Decrement reference count and return its new value. internal::reference_count __TBB_EXPORTED_METHOD internal_decrement_ref_count(); protected: //! Default constructor. task() {prefix().extra_state=1;} public: //! Destructor. virtual ~task() {} //! Should be overridden by derived classes. virtual task* execute() = 0; //! Enumeration of task states that the scheduler considers. enum state_type { //! task is running, and will be destroyed after method execute() completes. executing, //! task to be rescheduled. reexecute, //! task is in ready pool, or is going to be put there, or was just taken off. ready, //! task object is freshly allocated or recycled. allocated, //! task object is on free list, or is going to be put there, or was just taken off. freed, //! task to be recycled as continuation recycle #if __TBB_RECYCLE_TO_ENQUEUE //! task to be scheduled for starvation-resistant execution ,to_enqueue #endif }; //------------------------------------------------------------------------ // Allocating tasks //------------------------------------------------------------------------ //! Returns proxy for overloaded new that allocates a root task. static internal::allocate_root_proxy allocate_root() { return internal::allocate_root_proxy(); } #if __TBB_TASK_GROUP_CONTEXT //! Returns proxy for overloaded new that allocates a root task associated with user supplied context. static internal::allocate_root_with_context_proxy allocate_root( task_group_context& ctx ) { return internal::allocate_root_with_context_proxy(ctx); } #endif /* __TBB_TASK_GROUP_CONTEXT */ //! Returns proxy for overloaded new that allocates a continuation task of *this. /** The continuation's parent becomes the parent of *this. */ internal::allocate_continuation_proxy& allocate_continuation() { return *reinterpret_cast(this); } //! Returns proxy for overloaded new that allocates a child task of *this. internal::allocate_child_proxy& allocate_child() { return *reinterpret_cast(this); } //! Define recommended static form via import from base class. using task_base::allocate_additional_child_of; #if __TBB_DEPRECATED_TASK_INTERFACE //! Destroy a task. /** Usually, calling this method is unnecessary, because a task is implicitly deleted after its execute() method runs. However, sometimes a task needs to be explicitly deallocated, such as when a root task is used as the parent in spawn_and_wait_for_all. */ void __TBB_EXPORTED_METHOD destroy( task& t ); #else /* !__TBB_DEPRECATED_TASK_INTERFACE */ //! Define recommended static form via import from base class. using task_base::destroy; #endif /* !__TBB_DEPRECATED_TASK_INTERFACE */ //------------------------------------------------------------------------ // Recycling of tasks //------------------------------------------------------------------------ //! Change this to be a continuation of its former self. /** The caller must guarantee that the task's refcount does not become zero until after the method execute() returns. Typically, this is done by having method execute() return a pointer to a child of the task. If the guarantee cannot be made, use method recycle_as_safe_continuation instead. Because of the hazard, this method may be deprecated in the future. */ void recycle_as_continuation() { __TBB_ASSERT( prefix().state==executing, "execute not running?" ); prefix().state = allocated; } //! Recommended to use, safe variant of recycle_as_continuation /** For safety, it requires additional increment of ref_count. With no descendants and ref_count of 1, it has the semantics of recycle_to_reexecute. */ void recycle_as_safe_continuation() { __TBB_ASSERT( prefix().state==executing, "execute not running?" ); prefix().state = recycle; } //! Change this to be a child of new_parent. void recycle_as_child_of( task& new_parent ) { internal::task_prefix& p = prefix(); __TBB_ASSERT( prefix().state==executing||prefix().state==allocated, "execute not running, or already recycled" ); __TBB_ASSERT( prefix().ref_count==0, "no child tasks allowed when recycled as a child" ); __TBB_ASSERT( p.parent==NULL, "parent must be null" ); __TBB_ASSERT( new_parent.prefix().state<=recycle, "corrupt parent's state" ); __TBB_ASSERT( new_parent.prefix().state!=freed, "parent already freed" ); p.state = allocated; p.parent = &new_parent; #if __TBB_TASK_GROUP_CONTEXT p.context = new_parent.prefix().context; #endif /* __TBB_TASK_GROUP_CONTEXT */ } //! Schedule this for reexecution after current execute() returns. /** Made obsolete by recycle_as_safe_continuation; may become deprecated. */ void recycle_to_reexecute() { __TBB_ASSERT( prefix().state==executing, "execute not running, or already recycled" ); __TBB_ASSERT( prefix().ref_count==0, "no child tasks allowed when recycled for reexecution" ); prefix().state = reexecute; } #if __TBB_RECYCLE_TO_ENQUEUE //! Schedule this to enqueue after descendant tasks complete. /** Save enqueue/spawn difference, it has the semantics of recycle_as_safe_continuation. */ void recycle_to_enqueue() { __TBB_ASSERT( prefix().state==executing, "execute not running, or already recycled" ); prefix().state = to_enqueue; } #endif /* __TBB_RECYCLE_TO_ENQUEUE */ //------------------------------------------------------------------------ // Spawning and blocking //------------------------------------------------------------------------ //! Set reference count void set_ref_count( int count ) { #if TBB_USE_THREADING_TOOLS||TBB_USE_ASSERT internal_set_ref_count(count); #else prefix().ref_count = count; #endif /* TBB_USE_THREADING_TOOLS||TBB_USE_ASSERT */ } //! Atomically increment reference count and returns its old value. /** Has acquire semantics */ void increment_ref_count() { __TBB_FetchAndIncrementWacquire( &prefix().ref_count ); } //! Atomically decrement reference count and returns its new value. /** Has release semantics. */ int decrement_ref_count() { #if TBB_USE_THREADING_TOOLS||TBB_USE_ASSERT return int(internal_decrement_ref_count()); #else return int(__TBB_FetchAndDecrementWrelease( &prefix().ref_count ))-1; #endif /* TBB_USE_THREADING_TOOLS||TBB_USE_ASSERT */ } //! Define recommended static forms via import from base class. using task_base::spawn; //! Similar to spawn followed by wait_for_all, but more efficient. void spawn_and_wait_for_all( task& child ) { prefix().owner->wait_for_all( *this, &child ); } //! Similar to spawn followed by wait_for_all, but more efficient. void __TBB_EXPORTED_METHOD spawn_and_wait_for_all( task_list& list ); //! Spawn task allocated by allocate_root, wait for it to complete, and deallocate it. static void spawn_root_and_wait( task& root ) { root.prefix().owner->spawn_root_and_wait( root, root.prefix().next ); } //! Spawn root tasks on list and wait for all of them to finish. /** If there are more tasks than worker threads, the tasks are spawned in order of front to back. */ static void spawn_root_and_wait( task_list& root_list ); //! Wait for reference count to become one, and set reference count to zero. /** Works on tasks while waiting. */ void wait_for_all() { prefix().owner->wait_for_all( *this, NULL ); } //! Enqueue task for starvation-resistant execution. #if __TBB_TASK_PRIORITY /** The task will be enqueued on the normal priority level disregarding the priority of its task group. The rationale of such semantics is that priority of an enqueued task is statically fixed at the moment of its enqueuing, while task group priority is dynamic. Thus automatic priority inheritance would be generally a subject to the race, which may result in unexpected behavior. Use enqueue() overload with explicit priority value and task::group_priority() method to implement such priority inheritance when it is really necessary. **/ #endif /* __TBB_TASK_PRIORITY */ static void enqueue( task& t ) { t.prefix().owner->enqueue( t, NULL ); } #if __TBB_TASK_PRIORITY //! Enqueue task for starvation-resistant execution on the specified priority level. static void enqueue( task& t, priority_t p ) { __TBB_ASSERT( p == priority_low || p == priority_normal || p == priority_high, "Invalid priority level value" ); t.prefix().owner->enqueue( t, (void*)p ); } #endif /* __TBB_TASK_PRIORITY */ //! The innermost task being executed or destroyed by the current thread at the moment. static task& __TBB_EXPORTED_FUNC self(); //! task on whose behalf this task is working, or NULL if this is a root. task* parent() const {return prefix().parent;} //! sets parent task pointer to specified value void set_parent(task* p) { #if __TBB_TASK_GROUP_CONTEXT __TBB_ASSERT(prefix().context == p->prefix().context, "The tasks must be in the same context"); #endif prefix().parent = p; } #if __TBB_TASK_GROUP_CONTEXT //! This method is deprecated and will be removed in the future. /** Use method group() instead. **/ task_group_context* context() {return prefix().context;} //! Pointer to the task group descriptor. task_group_context* group () { return prefix().context; } #endif /* __TBB_TASK_GROUP_CONTEXT */ //! True if task was stolen from the task pool of another thread. bool is_stolen_task() const { return (prefix().extra_state & 0x80)!=0; } //------------------------------------------------------------------------ // Debugging //------------------------------------------------------------------------ //! Current execution state state_type state() const {return state_type(prefix().state);} //! The internal reference count. int ref_count() const { #if TBB_USE_ASSERT internal::reference_count ref_count_ = prefix().ref_count; __TBB_ASSERT( ref_count_==int(ref_count_), "integer overflow error"); #endif return int(prefix().ref_count); } //! Obsolete, and only retained for the sake of backward compatibility. Always returns true. bool __TBB_EXPORTED_METHOD is_owned_by_current_thread() const; //------------------------------------------------------------------------ // Affinity //------------------------------------------------------------------------ //! An id as used for specifying affinity. /** Guaranteed to be integral type. Value of 0 means no affinity. */ typedef internal::affinity_id affinity_id; //! Set affinity for this task. void set_affinity( affinity_id id ) {prefix().affinity = id;} //! Current affinity of this task affinity_id affinity() const {return prefix().affinity;} //! Invoked by scheduler to notify task that it ran on unexpected thread. /** Invoked before method execute() runs, if task is stolen, or task has affinity but will be executed on another thread. The default action does nothing. */ virtual void __TBB_EXPORTED_METHOD note_affinity( affinity_id id ); #if __TBB_TASK_GROUP_CONTEXT //! Moves this task from its current group into another one. /** Argument ctx specifies the new group. The primary purpose of this method is to associate unique task group context with a task allocated for subsequent enqueuing. In contrast to spawned tasks enqueued ones normally outlive the scope where they were created. This makes traditional usage model where task group context are allocated locally on the stack inapplicable. Dynamic allocation of context objects is performance inefficient. Method change_group() allows to make task group context object a member of the task class, and then associate it with its containing task object in the latter's constructor. **/ void __TBB_EXPORTED_METHOD change_group ( task_group_context& ctx ); //! Initiates cancellation of all tasks in this cancellation group and its subordinate groups. /** \return false if cancellation has already been requested, true otherwise. **/ bool cancel_group_execution () { return prefix().context->cancel_group_execution(); } //! Returns true if the context has received cancellation request. bool is_cancelled () const { return prefix().context->is_group_execution_cancelled(); } #else bool is_cancelled () const { return false; } #endif /* __TBB_TASK_GROUP_CONTEXT */ #if __TBB_TASK_PRIORITY //! Changes priority of the task group this task belongs to. void set_group_priority ( priority_t p ) { prefix().context->set_priority(p); } //! Retrieves current priority of the task group this task belongs to. priority_t group_priority () const { return prefix().context->priority(); } #endif /* __TBB_TASK_PRIORITY */ private: friend class interface5::internal::task_base; friend class task_list; friend class internal::scheduler; friend class internal::allocate_root_proxy; #if __TBB_TASK_GROUP_CONTEXT friend class internal::allocate_root_with_context_proxy; #endif /* __TBB_TASK_GROUP_CONTEXT */ friend class internal::allocate_continuation_proxy; friend class internal::allocate_child_proxy; friend class internal::allocate_additional_child_of_proxy; //! Get reference to corresponding task_prefix. /** Version tag prevents loader on Linux from using the wrong symbol in debug builds. **/ internal::task_prefix& prefix( internal::version_tag* = NULL ) const { return reinterpret_cast(const_cast(this))[-1]; } }; // class task //! task that does nothing. Useful for synchronization. /** @ingroup task_scheduling */ class empty_task: public task { /*override*/ task* execute() { return NULL; } }; //! @cond INTERNAL namespace internal { template class function_task : public task { F my_func; /*override*/ task* execute() { my_func(); return NULL; } public: function_task( const F& f ) : my_func(f) {} }; } // namespace internal //! @endcond //! A list of children. /** Used for method task::spawn_children @ingroup task_scheduling */ class task_list: internal::no_copy { private: task* first; task** next_ptr; friend class task; friend class interface5::internal::task_base; public: //! Construct empty list task_list() : first(NULL), next_ptr(&first) {} //! Destroys the list, but does not destroy the task objects. ~task_list() {} //! True if list if empty; false otherwise. bool empty() const {return !first;} //! Push task onto back of list. void push_back( task& task ) { task.prefix().next = NULL; *next_ptr = &task; next_ptr = &task.prefix().next; } //! Pop the front task from the list. task& pop_front() { __TBB_ASSERT( !empty(), "attempt to pop item from empty task_list" ); task* result = first; first = result->prefix().next; if( !first ) next_ptr = &first; return *result; } //! Clear the list void clear() { first=NULL; next_ptr=&first; } }; inline void interface5::internal::task_base::spawn( task& t ) { t.prefix().owner->spawn( t, t.prefix().next ); } inline void interface5::internal::task_base::spawn( task_list& list ) { if( task* t = list.first ) { t->prefix().owner->spawn( *t, *list.next_ptr ); list.clear(); } } inline void task::spawn_root_and_wait( task_list& root_list ) { if( task* t = root_list.first ) { t->prefix().owner->spawn_root_and_wait( *t, *root_list.next_ptr ); root_list.clear(); } } } // namespace tbb inline void *operator new( size_t bytes, const tbb::internal::allocate_root_proxy& ) { return &tbb::internal::allocate_root_proxy::allocate(bytes); } inline void operator delete( void* task, const tbb::internal::allocate_root_proxy& ) { tbb::internal::allocate_root_proxy::free( *static_cast(task) ); } #if __TBB_TASK_GROUP_CONTEXT inline void *operator new( size_t bytes, const tbb::internal::allocate_root_with_context_proxy& p ) { return &p.allocate(bytes); } inline void operator delete( void* task, const tbb::internal::allocate_root_with_context_proxy& p ) { p.free( *static_cast(task) ); } #endif /* __TBB_TASK_GROUP_CONTEXT */ inline void *operator new( size_t bytes, const tbb::internal::allocate_continuation_proxy& p ) { return &p.allocate(bytes); } inline void operator delete( void* task, const tbb::internal::allocate_continuation_proxy& p ) { p.free( *static_cast(task) ); } inline void *operator new( size_t bytes, const tbb::internal::allocate_child_proxy& p ) { return &p.allocate(bytes); } inline void operator delete( void* task, const tbb::internal::allocate_child_proxy& p ) { p.free( *static_cast(task) ); } inline void *operator new( size_t bytes, const tbb::internal::allocate_additional_child_of_proxy& p ) { return &p.allocate(bytes); } inline void operator delete( void* task, const tbb::internal::allocate_additional_child_of_proxy& p ) { p.free( *static_cast(task) ); } #endif /* __TBB_task_H */ ================================================ FILE: benchmarks/tbb/task_arena.h ================================================ /* Copyright 2005-2014 Intel Corporation. All Rights Reserved. This file is part of Threading Building Blocks. Threading Building Blocks is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. Threading Building Blocks is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Threading Building Blocks; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA As a special exception, you may use this file as part of a free software library without restriction. Specifically, if other files instantiate templates or use macros or inline functions from this file, or you compile this file and link it with other files to produce an executable, this file does not by itself cause the resulting executable to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the executable file might be covered by the GNU General Public License. */ #ifndef __TBB_task_arena_H #define __TBB_task_arena_H #include "task.h" #include "tbb_exception.h" #if TBB_USE_THREADING_TOOLS #include "atomic.h" // for as_atomic #endif #if __TBB_TASK_ARENA namespace tbb { //! @cond INTERNAL namespace internal { //! Internal to library. Should not be used by clients. /** @ingroup task_scheduling */ class arena; class task_scheduler_observer_v3; } // namespace internal //! @endcond namespace interface7 { //! @cond INTERNAL namespace internal { using namespace tbb::internal; //e.g. function_task from task.h class delegate_base : no_assign { public: virtual void operator()() const = 0; virtual ~delegate_base() {} }; template class delegated_function : public delegate_base { F &my_func; /*override*/ void operator()() const { my_func(); } public: delegated_function ( F& f ) : my_func(f) {} }; class task_arena_base { protected: //! NULL if not currently initialized. internal::arena* my_arena; #if __TBB_TASK_GROUP_CONTEXT //! default context of the arena task_group_context *my_context; #endif //! Concurrency level for deferred initialization int my_max_concurrency; //! Reserved master slots unsigned my_master_slots; //! Special settings intptr_t my_version_and_traits; enum { default_flags = 0 #if __TBB_TASK_GROUP_CONTEXT | (task_group_context::default_traits & task_group_context::exact_exception) // 0 or 1 << 16 , exact_exception_flag = task_group_context::exact_exception // used to specify flag for context directly #endif }; task_arena_base(int max_concurrency, unsigned reserved_for_masters) : my_arena(0) #if __TBB_TASK_GROUP_CONTEXT , my_context(0) #endif , my_max_concurrency(max_concurrency) , my_master_slots(reserved_for_masters) , my_version_and_traits(default_flags) {} void __TBB_EXPORTED_METHOD internal_initialize( ); void __TBB_EXPORTED_METHOD internal_terminate( ); void __TBB_EXPORTED_METHOD internal_enqueue( task&, intptr_t ) const; void __TBB_EXPORTED_METHOD internal_execute( delegate_base& ) const; void __TBB_EXPORTED_METHOD internal_wait() const; static int __TBB_EXPORTED_FUNC internal_current_slot(); public: //! Typedef for number of threads that is automatic. static const int automatic = -1; // any value < 1 means 'automatic' }; } // namespace internal //! @endcond /** 1-to-1 proxy representation class of scheduler's arena * Constructors set up settings only, real construction is deferred till the first method invocation * Destructor only removes one of the references to the inner arena representation. * Final destruction happens when all the references (and the work) are gone. */ class task_arena : public internal::task_arena_base { friend class tbb::internal::task_scheduler_observer_v3; bool my_initialized; public: //! Creates task_arena with certain concurrency limits /** Sets up settings only, real construction is deferred till the first method invocation * @arg max_concurrency specifies total number of slots in arena where threads work * @arg reserved_for_masters specifies number of slots to be used by master threads only. * Value of 1 is default and reflects behavior of implicit arenas. **/ task_arena(int max_concurrency = automatic, unsigned reserved_for_masters = 1) : task_arena_base(max_concurrency, reserved_for_masters) , my_initialized(false) {} //! Copies settings from another task_arena task_arena(const task_arena &s) // copy settings but not the reference or instance : task_arena_base(s.my_max_concurrency, s.my_master_slots) , my_initialized(false) {} //! Forces allocation of the resources for the task_arena as specified in constructor arguments inline void initialize() { if( !my_initialized ) { internal_initialize(); #if TBB_USE_THREADING_TOOLS // Threading tools respect lock prefix but report false-positive data-race via plain store internal::as_atomic(my_initialized).fetch_and_store(true); #else my_initialized = true; #endif //TBB_USE_THREADING_TOOLS } } //! Overrides concurrency level and forces initialization of internal representation inline void initialize(int max_concurrency, unsigned reserved_for_masters = 1) { __TBB_ASSERT( !my_arena, "Impossible to modify settings of an already initialized task_arena"); if( !my_initialized ) { my_max_concurrency = max_concurrency; my_master_slots = reserved_for_masters; initialize(); } } //! Removes the reference to the internal arena representation. //! Not thread safe wrt concurrent invocations of other methods. inline void terminate() { if( my_initialized ) { internal_terminate(); my_initialized = false; } } //! Removes the reference to the internal arena representation, and destroys the external object. //! Not thread safe wrt concurrent invocations of other methods. ~task_arena() { terminate(); } //! Returns true if the arena is active (initialized); false otherwise. //! The name was chosen to match a task_scheduler_init method with the same semantics. bool is_active() const { return my_initialized; } //! Enqueues a task into the arena to process a functor, and immediately returns. //! Does not require the calling thread to join the arena template void enqueue( const F& f ) { initialize(); #if __TBB_TASK_GROUP_CONTEXT internal_enqueue( *new( task::allocate_root(*my_context) ) internal::function_task(f), 0 ); #else internal_enqueue( *new( task::allocate_root() ) internal::function_task(f), 0 ); #endif } #if __TBB_TASK_PRIORITY //! Enqueues a task with priority p into the arena to process a functor f, and immediately returns. //! Does not require the calling thread to join the arena template void enqueue( const F& f, priority_t p ) { __TBB_ASSERT( p == priority_low || p == priority_normal || p == priority_high, "Invalid priority level value" ); initialize(); #if __TBB_TASK_GROUP_CONTEXT internal_enqueue( *new( task::allocate_root(*my_context) ) internal::function_task(f), (intptr_t)p ); #else internal_enqueue( *new( task::allocate_root() ) internal::function_task(f), (intptr_t)p ); #endif } #endif// __TBB_TASK_PRIORITY //! Joins the arena and executes a functor, then returns //! If not possible to join, wraps the functor into a task, enqueues it and waits for task completion //! Can decrement the arena demand for workers, causing a worker to leave and free a slot to the calling thread template void execute(F& f) { initialize(); internal::delegated_function d(f); internal_execute( d ); } //! Joins the arena and executes a functor, then returns //! If not possible to join, wraps the functor into a task, enqueues it and waits for task completion //! Can decrement the arena demand for workers, causing a worker to leave and free a slot to the calling thread template void execute(const F& f) { initialize(); internal::delegated_function d(f); internal_execute( d ); } #if __TBB_EXTRA_DEBUG //! Wait for all work in the arena to be completed //! Even submitted by other application threads //! Joins arena if/when possible (in the same way as execute()) void debug_wait_until_empty() { initialize(); internal_wait(); } #endif //__TBB_EXTRA_DEBUG //! Returns the index, aka slot number, of the calling thread in its current arena inline static int current_thread_index() { return internal_current_slot(); } }; } // namespace interfaceX using interface7::task_arena; } // namespace tbb #endif /* __TBB_TASK_ARENA */ #endif /* __TBB_task_arena_H */ ================================================ FILE: benchmarks/tbb/task_group.h ================================================ /* Copyright 2005-2014 Intel Corporation. All Rights Reserved. This file is part of Threading Building Blocks. Threading Building Blocks is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. Threading Building Blocks is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Threading Building Blocks; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA As a special exception, you may use this file as part of a free software library without restriction. Specifically, if other files instantiate templates or use macros or inline functions from this file, or you compile this file and link it with other files to produce an executable, this file does not by itself cause the resulting executable to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the executable file might be covered by the GNU General Public License. */ #ifndef __TBB_task_group_H #define __TBB_task_group_H #include "task.h" #include "tbb_exception.h" #if __TBB_TASK_GROUP_CONTEXT namespace tbb { namespace internal { template class task_handle_task; } class task_group; class structured_task_group; template class task_handle : internal::no_assign { template friend class internal::task_handle_task; friend class task_group; friend class structured_task_group; static const intptr_t scheduled = 0x1; F my_func; intptr_t my_state; void mark_scheduled () { // The check here is intentionally lax to avoid the impact of interlocked operation if ( my_state & scheduled ) internal::throw_exception( internal::eid_invalid_multiple_scheduling ); my_state |= scheduled; } public: task_handle( const F& f ) : my_func(f), my_state(0) {} void operator() () const { my_func(); } }; enum task_group_status { not_complete, complete, canceled }; namespace internal { template class task_handle_task : public task { task_handle& my_handle; /*override*/ task* execute() { my_handle(); return NULL; } public: task_handle_task( task_handle& h ) : my_handle(h) { h.mark_scheduled(); } }; class task_group_base : internal::no_copy { protected: empty_task* my_root; task_group_context my_context; task& owner () { return *my_root; } template task_group_status internal_run_and_wait( F& f ) { __TBB_TRY { if ( !my_context.is_group_execution_cancelled() ) f(); } __TBB_CATCH( ... ) { my_context.register_pending_exception(); } return wait(); } template void internal_run( F& f ) { owner().spawn( *new( owner().allocate_additional_child_of(*my_root) ) Task(f) ); } public: task_group_base( uintptr_t traits = 0 ) : my_context(task_group_context::bound, task_group_context::default_traits | traits) { my_root = new( task::allocate_root(my_context) ) empty_task; my_root->set_ref_count(1); } ~task_group_base() __TBB_NOEXCEPT(false) { if( my_root->ref_count() > 1 ) { bool stack_unwinding_in_progress = std::uncaught_exception(); // Always attempt to do proper cleanup to avoid inevitable memory corruption // in case of missing wait (for the sake of better testability & debuggability) if ( !is_canceling() ) cancel(); __TBB_TRY { my_root->wait_for_all(); } __TBB_CATCH (...) { task::destroy(*my_root); __TBB_RETHROW(); } task::destroy(*my_root); if ( !stack_unwinding_in_progress ) internal::throw_exception( internal::eid_missing_wait ); } else { task::destroy(*my_root); } } template void run( task_handle& h ) { internal_run< task_handle, internal::task_handle_task >( h ); } task_group_status wait() { __TBB_TRY { my_root->wait_for_all(); } __TBB_CATCH( ... ) { my_context.reset(); __TBB_RETHROW(); } if ( my_context.is_group_execution_cancelled() ) { my_context.reset(); return canceled; } return complete; } bool is_canceling() { return my_context.is_group_execution_cancelled(); } void cancel() { my_context.cancel_group_execution(); } }; // class task_group_base } // namespace internal class task_group : public internal::task_group_base { public: task_group () : task_group_base( task_group_context::concurrent_wait ) {} #if __SUNPRO_CC template void run( task_handle& h ) { internal_run< task_handle, internal::task_handle_task >( h ); } #else using task_group_base::run; #endif template void run( const F& f ) { internal_run< const F, internal::function_task >( f ); } template task_group_status run_and_wait( const F& f ) { return internal_run_and_wait( f ); } template task_group_status run_and_wait( task_handle& h ) { h.mark_scheduled(); return internal_run_and_wait< task_handle >( h ); } }; // class task_group class structured_task_group : public internal::task_group_base { public: template task_group_status run_and_wait ( task_handle& h ) { h.mark_scheduled(); return internal_run_and_wait< task_handle >( h ); } task_group_status wait() { task_group_status res = task_group_base::wait(); my_root->set_ref_count(1); return res; } }; // class structured_task_group inline bool is_current_task_group_canceling() { return task::self().is_cancelled(); } template task_handle make_task( const F& f ) { return task_handle( f ); } } // namespace tbb #endif /* __TBB_TASK_GROUP_CONTEXT */ #endif /* __TBB_task_group_H */ ================================================ FILE: benchmarks/tbb/task_group_context.cpp ================================================ /* Copyright 2005-2014 Intel Corporation. All Rights Reserved. This file is part of Threading Building Blocks. Threading Building Blocks is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. Threading Building Blocks is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Threading Building Blocks; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA As a special exception, you may use this file as part of a free software library without restriction. Specifically, if other files instantiate templates or use macros or inline functions from this file, or you compile this file and link it with other files to produce an executable, this file does not by itself cause the resulting executable to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the executable file might be covered by the GNU General Public License. */ #include "scheduler.h" #include "itt_notify.h" namespace tbb { #if __TBB_TASK_GROUP_CONTEXT using namespace internal; //------------------------------------------------------------------------ // captured_exception //------------------------------------------------------------------------ inline char* duplicate_string ( const char* src ) { char* dst = NULL; if ( src ) { size_t len = strlen(src) + 1; dst = (char*)allocate_via_handler_v3(len); strncpy (dst, src, len); } return dst; } captured_exception::~captured_exception () throw() { clear(); } void captured_exception::set ( const char* a_name, const char* info ) throw() { my_exception_name = duplicate_string( a_name ); my_exception_info = duplicate_string( info ); } void captured_exception::clear () throw() { deallocate_via_handler_v3 (const_cast(my_exception_name)); deallocate_via_handler_v3 (const_cast(my_exception_info)); } captured_exception* captured_exception::move () throw() { captured_exception *e = (captured_exception*)allocate_via_handler_v3(sizeof(captured_exception)); if ( e ) { ::new (e) captured_exception(); e->my_exception_name = my_exception_name; e->my_exception_info = my_exception_info; e->my_dynamic = true; my_exception_name = my_exception_info = NULL; } return e; } void captured_exception::destroy () throw() { __TBB_ASSERT ( my_dynamic, "Method destroy can be used only on objects created by clone or allocate" ); if ( my_dynamic ) { this->captured_exception::~captured_exception(); deallocate_via_handler_v3 (this); } } captured_exception* captured_exception::allocate ( const char* a_name, const char* info ) { captured_exception *e = (captured_exception*)allocate_via_handler_v3( sizeof(captured_exception) ); if ( e ) { ::new (e) captured_exception(a_name, info); e->my_dynamic = true; } return e; } const char* captured_exception::name() const throw() { return my_exception_name; } const char* captured_exception::what() const throw() { return my_exception_info; } //------------------------------------------------------------------------ // tbb_exception_ptr //------------------------------------------------------------------------ #if !TBB_USE_CAPTURED_EXCEPTION namespace internal { template tbb_exception_ptr* AllocateExceptionContainer( const T& src ) { tbb_exception_ptr *eptr = (tbb_exception_ptr*)allocate_via_handler_v3( sizeof(tbb_exception_ptr) ); if ( eptr ) new (eptr) tbb_exception_ptr(src); return eptr; } tbb_exception_ptr* tbb_exception_ptr::allocate () { return AllocateExceptionContainer( std::current_exception() ); } tbb_exception_ptr* tbb_exception_ptr::allocate ( const tbb_exception& ) { return AllocateExceptionContainer( std::current_exception() ); } tbb_exception_ptr* tbb_exception_ptr::allocate ( captured_exception& src ) { tbb_exception_ptr *res = AllocateExceptionContainer( src ); src.destroy(); return res; } void tbb_exception_ptr::destroy () throw() { this->tbb_exception_ptr::~tbb_exception_ptr(); deallocate_via_handler_v3 (this); } } // namespace internal #endif /* !TBB_USE_CAPTURED_EXCEPTION */ //------------------------------------------------------------------------ // task_group_context //------------------------------------------------------------------------ task_group_context::~task_group_context () { if ( __TBB_load_relaxed(my_kind) == binding_completed ) { if ( governor::is_set(my_owner) ) { // Local update of the context list uintptr_t local_count_snapshot = my_owner->my_context_state_propagation_epoch; my_owner->my_local_ctx_list_update.store(1); // Prevent load of nonlocal update flag from being hoisted before the // store to local update flag. atomic_fence(); if ( my_owner->my_nonlocal_ctx_list_update.load() ) { spin_mutex::scoped_lock lock(my_owner->my_context_list_mutex); my_node.my_prev->my_next = my_node.my_next; my_node.my_next->my_prev = my_node.my_prev; my_owner->my_local_ctx_list_update.store(0); } else { my_node.my_prev->my_next = my_node.my_next; my_node.my_next->my_prev = my_node.my_prev; // Release fence is necessary so that update of our neighbors in // the context list was committed when possible concurrent destroyer // proceeds after local update flag is reset by the following store. my_owner->my_local_ctx_list_update.store(0); if ( local_count_snapshot != the_context_state_propagation_epoch ) { // Another thread was propagating cancellation request when we removed // ourselves from the list. We must ensure that it is not accessing us // when this destructor finishes. We'll be able to acquire the lock // below only after the other thread finishes with us. spin_mutex::scoped_lock lock(my_owner->my_context_list_mutex); } } } else { // Nonlocal update of the context list // Synchronizes with generic_scheduler::cleanup_local_context_list() // TODO: evaluate and perhaps relax, or add some lock instead if ( internal::as_atomic(my_kind).fetch_and_store(dying) == detached ) { my_node.my_prev->my_next = my_node.my_next; my_node.my_next->my_prev = my_node.my_prev; } else { //TODO: evaluate and perhaps relax my_owner->my_nonlocal_ctx_list_update.fetch_and_increment(); //TODO: evaluate and perhaps remove spin_wait_until_eq( my_owner->my_local_ctx_list_update, 0u ); my_owner->my_context_list_mutex.lock(); my_node.my_prev->my_next = my_node.my_next; my_node.my_next->my_prev = my_node.my_prev; my_owner->my_context_list_mutex.unlock(); //TODO: evaluate and perhaps relax my_owner->my_nonlocal_ctx_list_update.fetch_and_decrement(); } } } #if __TBB_FP_CONTEXT internal::punned_cast(&my_cpu_ctl_env)->~cpu_ctl_env(); #endif poison_value(my_version_and_traits); if ( my_exception ) my_exception->destroy(); ITT_STACK(itt_caller != ITT_CALLER_NULL, caller_destroy, itt_caller); } void task_group_context::init () { __TBB_STATIC_ASSERT ( sizeof(my_version_and_traits) >= 4, "Layout of my_version_and_traits must be reconsidered on this platform" ); __TBB_STATIC_ASSERT ( sizeof(task_group_context) == 2 * NFS_MaxLineSize, "Context class has wrong size - check padding and members alignment" ); __TBB_ASSERT ( (uintptr_t(this) & (sizeof(my_cancellation_requested) - 1)) == 0, "Context is improperly aligned" ); __TBB_ASSERT ( __TBB_load_relaxed(my_kind) == isolated || __TBB_load_relaxed(my_kind) == bound, "Context can be created only as isolated or bound" ); my_parent = NULL; my_cancellation_requested = 0; my_exception = NULL; my_owner = NULL; my_state = 0; itt_caller = ITT_CALLER_NULL; #if __TBB_TASK_PRIORITY my_priority = normalized_normal_priority; #endif /* __TBB_TASK_PRIORITY */ #if __TBB_FP_CONTEXT __TBB_STATIC_ASSERT( sizeof(my_cpu_ctl_env) == sizeof(internal::uint64_t), "The reserved space for FPU settings are not equal sizeof(uint64_t)" ); __TBB_STATIC_ASSERT( sizeof(cpu_ctl_env) <= sizeof(my_cpu_ctl_env), "FPU settings storage does not fit to uint64_t" ); suppress_unused_warning( my_cpu_ctl_env.space ); cpu_ctl_env &ctl = *internal::punned_cast(&my_cpu_ctl_env); new ( &ctl ) cpu_ctl_env; if ( my_version_and_traits & fp_settings ) ctl.get_env(); #endif } void task_group_context::register_with ( generic_scheduler *local_sched ) { __TBB_ASSERT( local_sched, NULL ); my_owner = local_sched; // state propagation logic assumes new contexts are bound to head of the list my_node.my_prev = &local_sched->my_context_list_head; // Notify threads that may be concurrently destroying contexts registered // in this scheduler's list that local list update is underway. local_sched->my_local_ctx_list_update.store(1); // Prevent load of global propagation epoch counter from being hoisted before // speculative stores above, as well as load of nonlocal update flag from // being hoisted before the store to local update flag. atomic_fence(); // Finalize local context list update if ( local_sched->my_nonlocal_ctx_list_update.load() ) { spin_mutex::scoped_lock lock(my_owner->my_context_list_mutex); local_sched->my_context_list_head.my_next->my_prev = &my_node; my_node.my_next = local_sched->my_context_list_head.my_next; my_owner->my_local_ctx_list_update.store(0); local_sched->my_context_list_head.my_next = &my_node; } else { local_sched->my_context_list_head.my_next->my_prev = &my_node; my_node.my_next = local_sched->my_context_list_head.my_next; my_owner->my_local_ctx_list_update.store(0); // Thread-local list of contexts allows concurrent traversal by another thread // while propagating state change. To ensure visibility of my_node's members // to the concurrently traversing thread, the list's head is updated by means // of store-with-release. __TBB_store_with_release(local_sched->my_context_list_head.my_next, &my_node); } } void task_group_context::bind_to ( generic_scheduler *local_sched ) { __TBB_ASSERT ( __TBB_load_relaxed(my_kind) == binding_required, "Already bound or isolated?" ); __TBB_ASSERT ( !my_parent, "Parent is set before initial binding" ); my_parent = local_sched->my_innermost_running_task->prefix().context; #if __TBB_FP_CONTEXT // Inherit FPU settings only if the context has not captured FPU settings yet. if ( !(my_version_and_traits & fp_settings) ) copy_fp_settings(*my_parent); #endif // Condition below prevents unnecessary thrashing parent context's cache line if ( !(my_parent->my_state & may_have_children) ) my_parent->my_state |= may_have_children; // full fence is below if ( my_parent->my_parent ) { // Even if this context were made accessible for state change propagation // (by placing __TBB_store_with_release(s->my_context_list_head.my_next, &my_node) // above), it still could be missed if state propagation from a grand-ancestor // was underway concurrently with binding. // Speculative propagation from the parent together with epoch counters // detecting possibility of such a race allow to avoid taking locks when // there is no contention. // Acquire fence is necessary to prevent reordering subsequent speculative // loads of parent state data out of the scope where epoch counters comparison // can reliably validate it. uintptr_t local_count_snapshot = __TBB_load_with_acquire( my_parent->my_owner->my_context_state_propagation_epoch ); // Speculative propagation of parent's state. The speculation will be // validated by the epoch counters check further on. my_cancellation_requested = my_parent->my_cancellation_requested; #if __TBB_TASK_PRIORITY my_priority = my_parent->my_priority; #endif /* __TBB_TASK_PRIORITY */ register_with( local_sched ); // Issues full fence // If no state propagation was detected by the following condition, the above // full fence guarantees that the parent had correct state during speculative // propagation before the fence. Otherwise the propagation from parent is // repeated under the lock. if ( local_count_snapshot != the_context_state_propagation_epoch ) { // Another thread may be propagating state change right now. So resort to lock. context_state_propagation_mutex_type::scoped_lock lock(the_context_state_propagation_mutex); my_cancellation_requested = my_parent->my_cancellation_requested; #if __TBB_TASK_PRIORITY my_priority = my_parent->my_priority; #endif /* __TBB_TASK_PRIORITY */ } } else { register_with( local_sched ); // Issues full fence // As we do not have grand-ancestors, concurrent state propagation (if any) // may originate only from the parent context, and thus it is safe to directly // copy the state from it. my_cancellation_requested = my_parent->my_cancellation_requested; #if __TBB_TASK_PRIORITY my_priority = my_parent->my_priority; #endif /* __TBB_TASK_PRIORITY */ } __TBB_store_relaxed(my_kind, binding_completed); } #if __TBB_TASK_GROUP_CONTEXT template void task_group_context::propagate_task_group_state ( T task_group_context::*mptr_state, task_group_context& src, T new_state ) { if (this->*mptr_state == new_state) { // Nothing to do, whether descending from "src" or not, so no need to scan. // Hopefully this happens often thanks to earlier invocations. // This optimization is enabled by LIFO order in the context lists: // - new contexts are bound to the beginning of lists; // - descendants are newer than ancestors; // - earlier invocations are therefore likely to "paint" long chains. } else if (this == &src) { // This clause is disjunct from the traversal below, which skips src entirely. // Note that src.*mptr_state is not necessarily still equal to new_state (another thread may have changed it again). // Such interference is probably not frequent enough to aim for optimisation by writing new_state again (to make the other thread back down). // Letting the other thread prevail may also be fairer. } else { for ( task_group_context *ancestor = my_parent; ancestor != NULL; ancestor = ancestor->my_parent ) { __TBB_ASSERT(internal::is_alive(ancestor->my_version_and_traits), "context tree was corrupted"); if ( ancestor == &src ) { for ( task_group_context *ctx = this; ctx != ancestor; ctx = ctx->my_parent ) ctx->*mptr_state = new_state; break; } } } } template void generic_scheduler::propagate_task_group_state ( T task_group_context::*mptr_state, task_group_context& src, T new_state ) { spin_mutex::scoped_lock lock(my_context_list_mutex); // Acquire fence is necessary to ensure that the subsequent node->my_next load // returned the correct value in case it was just inserted in another thread. // The fence also ensures visibility of the correct my_parent value. context_list_node_t *node = __TBB_load_with_acquire(my_context_list_head.my_next); while ( node != &my_context_list_head ) { task_group_context &ctx = __TBB_get_object_ref(task_group_context, my_node, node); if ( ctx.*mptr_state != new_state ) ctx.propagate_task_group_state( mptr_state, src, new_state ); node = node->my_next; __TBB_ASSERT( is_alive(ctx.my_version_and_traits), "Local context list contains destroyed object" ); } // Sync up local propagation epoch with the global one. Release fence prevents // reordering of possible store to *mptr_state after the sync point. __TBB_store_with_release(my_context_state_propagation_epoch, the_context_state_propagation_epoch); } template bool market::propagate_task_group_state ( T task_group_context::*mptr_state, task_group_context& src, T new_state ) { if ( !(src.my_state & task_group_context::may_have_children) ) return true; // The whole propagation algorithm is under the lock in order to ensure correctness // in case of concurrent state changes at the different levels of the context tree. // See comment at the bottom of scheduler.cpp context_state_propagation_mutex_type::scoped_lock lock(the_context_state_propagation_mutex); if ( src.*mptr_state != new_state ) // Another thread has concurrently changed the state. Back down. return false; // Advance global state propagation epoch __TBB_FetchAndAddWrelease(&the_context_state_propagation_epoch, 1); // Propagate to all workers and masters and sync up their local epochs with the global one unsigned num_workers = my_num_workers; for ( unsigned i = 0; i < num_workers; ++i ) { generic_scheduler *s = my_workers[i]; // If the worker is only about to be registered, skip it. if ( s ) s->propagate_task_group_state( mptr_state, src, new_state ); } // Propagate to all master threads (under my_arenas_list_mutex lock) ForEachArena(a) { // uses lock on my_arenas_list_mutex arena_slot &slot = a.my_slots[0]; generic_scheduler *s = slot.my_scheduler; // If the master is under construction, skip it. Otherwise make sure that it does not // leave its arena and its scheduler get destroyed while we accessing its data. if ( s && as_atomic(slot.my_scheduler).compare_and_swap(LockedMaster, s) == s ) { //TODO: remove need in lock __TBB_ASSERT( slot.my_scheduler == LockedMaster, NULL ); // The whole propagation sequence is locked, thus no contention is expected __TBB_ASSERT( s != LockedMaster, NULL ); s->propagate_task_group_state( mptr_state, src, new_state ); __TBB_store_with_release( slot.my_scheduler, s ); } } EndForEach(); return true; } template bool arena::propagate_task_group_state ( T task_group_context::*mptr_state, task_group_context& src, T new_state ) { return my_market->propagate_task_group_state( mptr_state, src, new_state ); } #endif /* __TBB_TASK_GROUP_CONTEXT */ bool task_group_context::cancel_group_execution () { __TBB_ASSERT ( my_cancellation_requested == 0 || my_cancellation_requested == 1, "Invalid cancellation state"); if ( my_cancellation_requested || as_atomic(my_cancellation_requested).compare_and_swap(1, 0) ) { // This task group and any descendants have already been canceled. // (A newly added descendant would inherit its parent's my_cancellation_requested, // not missing out on any cancellation still being propagated, and a context cannot be uncanceled.) return false; } governor::local_scheduler()->my_arena->propagate_task_group_state( &task_group_context::my_cancellation_requested, *this, (uintptr_t)1 ); return true; } bool task_group_context::is_group_execution_cancelled () const { return my_cancellation_requested != 0; } // IMPORTANT: It is assumed that this method is not used concurrently! void task_group_context::reset () { //! TODO: Add assertion that this context does not have children // No fences are necessary since this context can be accessed from another thread // only after stealing happened (which means necessary fences were used). if ( my_exception ) { my_exception->destroy(); my_exception = NULL; } my_cancellation_requested = 0; } #if __TBB_FP_CONTEXT // IMPORTANT: It is assumed that this method is not used concurrently! void task_group_context::capture_fp_settings () { //! TODO: Add assertion that this context does not have children // No fences are necessary since this context can be accessed from another thread // only after stealing happened (which means necessary fences were used). cpu_ctl_env &ctl = *internal::punned_cast(&my_cpu_ctl_env); if ( !(my_version_and_traits & fp_settings) ) { new ( &ctl ) cpu_ctl_env; my_version_and_traits |= fp_settings; } ctl.get_env(); } void task_group_context::copy_fp_settings( const task_group_context &src ) { __TBB_ASSERT( !(my_version_and_traits & fp_settings), "The context already has FPU settings." ); __TBB_ASSERT( src.my_version_and_traits & fp_settings, "The source context does not have FPU settings." ); cpu_ctl_env &ctl = *internal::punned_cast(&my_cpu_ctl_env); cpu_ctl_env &src_ctl = *internal::punned_cast(&src.my_cpu_ctl_env); new (&ctl) cpu_ctl_env( src_ctl ); my_version_and_traits |= fp_settings; } #endif /* __TBB_FP_CONTEXT */ void task_group_context::register_pending_exception () { if ( my_cancellation_requested ) return; #if TBB_USE_EXCEPTIONS try { throw; } TbbCatchAll( this ); #endif /* TBB_USE_EXCEPTIONS */ } #if __TBB_TASK_PRIORITY void task_group_context::set_priority ( priority_t prio ) { __TBB_ASSERT( prio == priority_low || prio == priority_normal || prio == priority_high, "Invalid priority level value" ); intptr_t p = normalize_priority(prio); if ( my_priority == p && !(my_state & task_group_context::may_have_children)) return; my_priority = p; internal::generic_scheduler* s = governor::local_scheduler_if_initialized(); if ( !s || !s->my_arena->propagate_task_group_state(&task_group_context::my_priority, *this, p) ) return; // Updating arena priority here does not eliminate necessity of checking each // task priority and updating arena priority if necessary before the task execution. // These checks will be necessary because: // a) set_priority() may be invoked before any tasks from this task group are spawned; // b) all spawned tasks from this task group are retrieved from the task pools. // These cases create a time window when arena priority may be lowered. s->my_market->update_arena_priority( *s->my_arena, p ); } priority_t task_group_context::priority () const { return static_cast(priority_from_normalized_rep[my_priority]); } #endif /* __TBB_TASK_PRIORITY */ #endif /* __TBB_TASK_GROUP_CONTEXT */ } // namespace tbb ================================================ FILE: benchmarks/tbb/task_scheduler_init.h ================================================ /* Copyright 2005-2014 Intel Corporation. All Rights Reserved. This file is part of Threading Building Blocks. Threading Building Blocks is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. Threading Building Blocks is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Threading Building Blocks; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA As a special exception, you may use this file as part of a free software library without restriction. Specifically, if other files instantiate templates or use macros or inline functions from this file, or you compile this file and link it with other files to produce an executable, this file does not by itself cause the resulting executable to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the executable file might be covered by the GNU General Public License. */ #ifndef __TBB_task_scheduler_init_H #define __TBB_task_scheduler_init_H #include "tbb_stddef.h" #include "limits.h" namespace tbb { typedef std::size_t stack_size_type; //! @cond INTERNAL namespace internal { //! Internal to library. Should not be used by clients. /** @ingroup task_scheduling */ class scheduler; } // namespace internal //! @endcond //! Class delimiting the scope of task scheduler activity. /** A thread can construct a task_scheduler_init object and keep it alive while it uses TBB's tasking subsystem (including parallel algorithms). This class allows to customize properties of the TBB task pool to some extent. For example it can limit concurrency level of parallel work initiated by the given thread. It also can be used to specify stack size of the TBB worker threads, though this setting is not effective if the thread pool has already been created. If a parallel construct is used without task_scheduler_init object previously created, the scheduler will be initialized automatically with default settings, and will persist until this thread exits. Default concurrency level is defined as described in task_scheduler_init::initialize(). @ingroup task_scheduling */ class task_scheduler_init: internal::no_copy { enum ExceptionPropagationMode { propagation_mode_exact = 1u, propagation_mode_captured = 2u, propagation_mode_mask = propagation_mode_exact | propagation_mode_captured }; #if __TBB_SUPPORTS_WORKERS_WAITING_IN_TERMINATE enum { wait_workers_in_terminate_flag = 128u }; #endif /** NULL if not currently initialized. */ internal::scheduler* my_scheduler; public: //! Typedef for number of threads that is automatic. static const int automatic = -1; //! Argument to initialize() or constructor that causes initialization to be deferred. static const int deferred = -2; //! Ensure that scheduler exists for this thread /** A value of -1 lets TBB decide on the number of threads, which is usually maximal hardware concurrency for this process, that is the number of logical CPUs on the machine (possibly limited by the processor affinity mask of this process (Windows) or of this thread (Linux, FreeBSD). It is preferable option for production code because it helps to avoid nasty surprises when several TBB based components run side-by-side or in a nested fashion inside the same process. The number_of_threads is ignored if any other task_scheduler_inits currently exist. A thread may construct multiple task_scheduler_inits. Doing so does no harm because the underlying scheduler is reference counted. */ void __TBB_EXPORTED_METHOD initialize( int number_of_threads=automatic ); //! The overloaded method with stack size parameter /** Overloading is necessary to preserve ABI compatibility */ void __TBB_EXPORTED_METHOD initialize( int number_of_threads, stack_size_type thread_stack_size ); //! Inverse of method initialize. void __TBB_EXPORTED_METHOD terminate(); //! Shorthand for default constructor followed by call to initialize(number_of_threads). #if __TBB_SUPPORTS_WORKERS_WAITING_IN_TERMINATE task_scheduler_init( int number_of_threads=automatic, stack_size_type thread_stack_size=0, bool wait_workers_in_terminate = false ) : my_scheduler(NULL) #else task_scheduler_init( int number_of_threads=automatic, stack_size_type thread_stack_size=0 ) : my_scheduler(NULL) #endif { // Two lowest order bits of the stack size argument may be taken to communicate // default exception propagation mode of the client to be used when the // client manually creates tasks in the master thread and does not use // explicit task group context object. This is necessary because newer // TBB binaries with exact propagation enabled by default may be used // by older clients that expect tbb::captured_exception wrapper. // All zeros mean old client - no preference. __TBB_ASSERT( !(thread_stack_size & propagation_mode_mask), "Requested stack size is not aligned" ); #if TBB_USE_EXCEPTIONS thread_stack_size |= TBB_USE_CAPTURED_EXCEPTION ? propagation_mode_captured : propagation_mode_exact; #endif /* TBB_USE_EXCEPTIONS */ #if __TBB_SUPPORTS_WORKERS_WAITING_IN_TERMINATE if (wait_workers_in_terminate) my_scheduler = (internal::scheduler*)wait_workers_in_terminate_flag; #endif initialize( number_of_threads, thread_stack_size ); } //! Destroy scheduler for this thread if thread has no other live task_scheduler_inits. ~task_scheduler_init() { if( my_scheduler ) terminate(); internal::poison_pointer( my_scheduler ); } //! Returns the number of threads TBB scheduler would create if initialized by default. /** Result returned by this method does not depend on whether the scheduler has already been initialized. Because tbb 2.0 does not support blocking tasks yet, you may use this method to boost the number of threads in the tbb's internal pool, if your tasks are doing I/O operations. The optimal number of additional threads depends on how much time your tasks spend in the blocked state. Before TBB 3.0 U4 this method returned the number of logical CPU in the system. Currently on Windows, Linux and FreeBSD it returns the number of logical CPUs available to the current process in accordance with its affinity mask. NOTE: The return value of this method never changes after its first invocation. This means that changes in the process affinity mask that took place after this method was first invoked will not affect the number of worker threads in the TBB worker threads pool. */ static int __TBB_EXPORTED_FUNC default_num_threads (); //! Returns true if scheduler is active (initialized); false otherwise bool is_active() const { return my_scheduler != NULL; } }; } // namespace tbb #endif /* __TBB_task_scheduler_init_H */ ================================================ FILE: benchmarks/tbb/task_scheduler_observer.h ================================================ /* Copyright 2005-2014 Intel Corporation. All Rights Reserved. This file is part of Threading Building Blocks. Threading Building Blocks is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. Threading Building Blocks is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Threading Building Blocks; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA As a special exception, you may use this file as part of a free software library without restriction. Specifically, if other files instantiate templates or use macros or inline functions from this file, or you compile this file and link it with other files to produce an executable, this file does not by itself cause the resulting executable to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the executable file might be covered by the GNU General Public License. */ #ifndef __TBB_task_scheduler_observer_H #define __TBB_task_scheduler_observer_H #include "atomic.h" #if __TBB_TASK_ARENA #include "task_arena.h" #endif //__TBB_TASK_ARENA #if __TBB_SCHEDULER_OBSERVER namespace tbb { namespace interface6 { class task_scheduler_observer; } namespace internal { class observer_proxy; class observer_list; class task_scheduler_observer_v3 { friend class observer_proxy; friend class observer_list; friend class interface6::task_scheduler_observer; //! Pointer to the proxy holding this observer. /** Observers are proxied by the scheduler to maintain persistent lists of them. **/ observer_proxy* my_proxy; //! Counter preventing the observer from being destroyed while in use by the scheduler. /** Valid only when observation is on. **/ atomic my_busy_count; public: //! Enable or disable observation /** For local observers the method can be used only when the current thread has the task scheduler initialized or is attached to an arena. Repeated calls with the same state are no-ops. **/ void __TBB_EXPORTED_METHOD observe( bool state=true ); //! Returns true if observation is enabled, false otherwise. bool is_observing() const {return my_proxy!=NULL;} //! Construct observer with observation disabled. task_scheduler_observer_v3() : my_proxy(NULL) { my_busy_count.store(0); } //! Entry notification /** Invoked from inside observe(true) call and whenever a worker enters the arena this observer is associated with. If a thread is already in the arena when the observer is activated, the entry notification is called before it executes the first stolen task. Obsolete semantics. For global observers it is called by a thread before the first steal since observation became enabled. **/ virtual void on_scheduler_entry( bool /*is_worker*/ ) {} //! Exit notification /** Invoked from inside observe(false) call and whenever a worker leaves the arena this observer is associated with. Obsolete semantics. For global observers it is called by a thread before the first steal since observation became enabled. **/ virtual void on_scheduler_exit( bool /*is_worker*/ ) {} //! Destructor automatically switches observation off if it is enabled. virtual ~task_scheduler_observer_v3() { if(my_proxy) observe(false);} }; } // namespace internal #if __TBB_ARENA_OBSERVER namespace interface6 { class task_scheduler_observer : public internal::task_scheduler_observer_v3 { friend class internal::task_scheduler_observer_v3; friend class internal::observer_proxy; friend class internal::observer_list; /** Negative numbers with the largest absolute value to minimize probability of coincidence in case of a bug in busy count usage. **/ // TODO: take more high bits for version number static const intptr_t v6_trait = (intptr_t)((~(uintptr_t)0 >> 1) + 1); //! contains task_arena pointer or tag indicating local or global semantics of the observer intptr_t my_context_tag; enum { global_tag = 0, implicit_tag = 1 }; public: //! Construct local or global observer in inactive state (observation disabled). /** For a local observer entry/exit notifications are invoked whenever a worker thread joins/leaves the arena of the observer's owner thread. If a thread is already in the arena when the observer is activated, the entry notification is called before it executes the first stolen task. **/ /** TODO: Obsolete. Global observer semantics is obsolete as it violates master thread isolation guarantees and is not composable. Thus the current default behavior of the constructor is obsolete too and will be changed in one of the future versions of the library. **/ task_scheduler_observer( bool local = false ) { my_context_tag = local? implicit_tag : global_tag; } #if __TBB_TASK_ARENA //! Construct local observer for a given arena in inactive state (observation disabled). /** entry/exit notifications are invoked whenever a thread joins/leaves arena. If a thread is already in the arena when the observer is activated, the entry notification is called before it executes the first stolen task. **/ task_scheduler_observer( task_arena & a) { my_context_tag = (intptr_t)&a; } #endif //__TBB_TASK_ARENA /** Destructor protects instance of the observer from concurrent notification. It is recommended to disable observation before destructor of a derived class starts, otherwise it can lead to concurrent notification callback on partly destroyed object **/ virtual ~task_scheduler_observer() { if(my_proxy) observe(false); } //! Enable or disable observation /** Warning: concurrent invocations of this method are not safe. Repeated calls with the same state are no-ops. **/ void observe( bool state=true ) { if( state && !my_proxy ) { __TBB_ASSERT( !my_busy_count, "Inconsistent state of task_scheduler_observer instance"); my_busy_count.store(v6_trait); } internal::task_scheduler_observer_v3::observe(state); } //! Return commands for may_sleep() enum { keep_awake = false, allow_sleep = true }; //! The callback can be invoked by a worker thread before it goes to sleep. /** If it returns false ('keep_awake'), the thread will keep spinning and looking for work. It will not be called for master threads. **/ virtual bool may_sleep() { return allow_sleep; } }; } //namespace interface6 using interface6::task_scheduler_observer; #else /*__TBB_ARENA_OBSERVER*/ typedef tbb::internal::task_scheduler_observer_v3 task_scheduler_observer; #endif /*__TBB_ARENA_OBSERVER*/ } // namespace tbb #endif /* __TBB_SCHEDULER_OBSERVER */ #endif /* __TBB_task_scheduler_observer_H */ ================================================ FILE: benchmarks/tbb/task_stream.h ================================================ /* Copyright 2005-2014 Intel Corporation. All Rights Reserved. This file is part of Threading Building Blocks. Threading Building Blocks is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. Threading Building Blocks is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Threading Building Blocks; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA As a special exception, you may use this file as part of a free software library without restriction. Specifically, if other files instantiate templates or use macros or inline functions from this file, or you compile this file and link it with other files to produce an executable, this file does not by itself cause the resulting executable to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the executable file might be covered by the GNU General Public License. */ #ifndef _TBB_task_stream_H #define _TBB_task_stream_H #include "tbb/tbb_stddef.h" #include #include #include "tbb/atomic.h" // for __TBB_Atomic* #include "tbb/spin_mutex.h" #include "tbb/tbb_allocator.h" #include "scheduler_common.h" #include "tbb_misc.h" // for FastRandom namespace tbb { namespace internal { //! Essentially, this is just a pair of a queue and a mutex to protect the queue. /** The reason std::pair is not used is that the code would look less clean if field names were replaced with 'first' and 'second'. **/ template< typename T, typename mutex_t > struct queue_and_mutex { typedef std::deque< T, tbb_allocator > queue_base_t; queue_base_t my_queue; mutex_t my_mutex; queue_and_mutex () : my_queue(), my_mutex() {} ~queue_and_mutex () {} }; const uintptr_t one = 1; inline void set_one_bit( uintptr_t& dest, int pos ) { __TBB_ASSERT( pos>=0, NULL ); __TBB_ASSERT( pos<32, NULL ); __TBB_AtomicOR( &dest, one<=0, NULL ); __TBB_ASSERT( pos<32, NULL ); __TBB_AtomicAND( &dest, ~(one<=0, NULL ); __TBB_ASSERT( pos<32, NULL ); return (val & (one< lane_t; uintptr_t population; padded* lanes; unsigned N; public: task_stream() : population(), lanes() { } void initialize( unsigned n_lanes ) { const unsigned max_lanes = #if __TBB_MORE_FIFO_LANES sizeof(population) * CHAR_BIT; #else 32; #endif N = n_lanes>=max_lanes ? max_lanes : n_lanes>2 ? 1<<(__TBB_Log2(n_lanes-1)+1) : 2; __TBB_ASSERT( N==max_lanes || N>=n_lanes && ((N-1)&N)==0, "number of lanes miscalculated"); __TBB_ASSERT( N <= sizeof(population) * CHAR_BIT, NULL ); lanes = new padded[N]; __TBB_ASSERT( !population, NULL ); } ~task_stream() { if (lanes) delete[] lanes; } //! Push a task into a lane. void push( task* source, FastRandom& random ) { // Lane selection is random. Each thread should keep a separate seed value. unsigned idx; for( ; ; ) { idx = random.get() & (N-1); spin_mutex::scoped_lock lock; if( lock.try_acquire(lanes[idx].my_mutex) ) { lanes[idx].my_queue.push_back(source); set_one_bit( population, idx ); //TODO: avoid atomic op if the bit is already set break; } } } //! Try finding and popping a task. task* pop( unsigned& last_used_lane ) { task* result = NULL; // Lane selection is round-robin. Each thread should keep its last used lane. unsigned idx = (last_used_lane+1)&(N-1); for( ; population; idx=(idx+1)&(N-1) ) { if( is_bit_set( population, idx ) ) { lane_t& lane = lanes[idx]; spin_mutex::scoped_lock lock; if( lock.try_acquire(lane.my_mutex) && !lane.my_queue.empty() ) { result = lane.my_queue.front(); lane.my_queue.pop_front(); if( lane.my_queue.empty() ) clear_one_bit( population, idx ); break; } } } last_used_lane = idx; return result; } //! Checks existence of a task. bool empty() { return !population; } //! Destroys all remaining tasks in every lane. Returns the number of destroyed tasks. /** Tasks are not executed, because it would potentially create more tasks at a late stage. The scheduler is really expected to execute all tasks before task_stream destruction. */ intptr_t drain() { intptr_t result = 0; for(unsigned i=0; i #if __TBB_ALLOCATOR_CONSTRUCT_VARIADIC #include // std::forward #endif #if !TBB_USE_EXCEPTIONS && _MSC_VER // Suppress "C++ exception handler used, but unwind semantics are not enabled" warning in STL headers #pragma warning (push) #pragma warning (disable: 4530) #endif #include #if !TBB_USE_EXCEPTIONS && _MSC_VER #pragma warning (pop) #endif namespace tbb { //! @cond INTERNAL namespace internal { //! Deallocates memory using FreeHandler /** The function uses scalable_free if scalable allocator is available and free if not*/ void __TBB_EXPORTED_FUNC deallocate_via_handler_v3( void *p ); //! Allocates memory using MallocHandler /** The function uses scalable_malloc if scalable allocator is available and malloc if not*/ void* __TBB_EXPORTED_FUNC allocate_via_handler_v3( size_t n ); //! Returns true if standard malloc/free are used to work with memory. bool __TBB_EXPORTED_FUNC is_malloc_used_v3(); } //! @endcond #if _MSC_VER && !defined(__INTEL_COMPILER) // Workaround for erroneous "unreferenced parameter" warning in method destroy. #pragma warning (push) #pragma warning (disable: 4100) #endif //! Meets "allocator" requirements of ISO C++ Standard, Section 20.1.5 /** The class selects the best memory allocation mechanism available from scalable_malloc and standard malloc. The members are ordered the same way they are in section 20.4.1 of the ISO C++ standard. @ingroup memory_allocation */ template class tbb_allocator { public: typedef typename internal::allocator_type::value_type value_type; typedef value_type* pointer; typedef const value_type* const_pointer; typedef value_type& reference; typedef const value_type& const_reference; typedef size_t size_type; typedef ptrdiff_t difference_type; template struct rebind { typedef tbb_allocator other; }; //! Specifies current allocator enum malloc_type { scalable, standard }; tbb_allocator() throw() {} tbb_allocator( const tbb_allocator& ) throw() {} template tbb_allocator(const tbb_allocator&) throw() {} pointer address(reference x) const {return &x;} const_pointer address(const_reference x) const {return &x;} //! Allocate space for n objects. pointer allocate( size_type n, const void* /*hint*/ = 0) { return pointer(internal::allocate_via_handler_v3( n * sizeof(value_type) )); } //! Free previously allocated block of memory. void deallocate( pointer p, size_type ) { internal::deallocate_via_handler_v3(p); } //! Largest value for which method allocate might succeed. size_type max_size() const throw() { size_type max = static_cast(-1) / sizeof (value_type); return (max > 0 ? max : 1); } //! Copy-construct value at location pointed to by p. #if __TBB_ALLOCATOR_CONSTRUCT_VARIADIC template void construct(U *p, Args&&... args) { ::new((void *)p) U(std::forward(args)...); } #else // __TBB_ALLOCATOR_CONSTRUCT_VARIADIC #if __TBB_CPP11_RVALUE_REF_PRESENT void construct( pointer p, value_type&& value ) {::new((void*)(p)) value_type(std::move(value));} #endif void construct( pointer p, const value_type& value ) {::new((void*)(p)) value_type(value);} #endif // __TBB_ALLOCATOR_CONSTRUCT_VARIADIC //! Destroy value at location pointed to by p. void destroy( pointer p ) {p->~value_type();} //! Returns current allocator static malloc_type allocator_type() { return internal::is_malloc_used_v3() ? standard : scalable; } }; #if _MSC_VER && !defined(__INTEL_COMPILER) #pragma warning (pop) #endif // warning 4100 is back //! Analogous to std::allocator, as defined in ISO C++ Standard, Section 20.4.1 /** @ingroup memory_allocation */ template<> class tbb_allocator { public: typedef void* pointer; typedef const void* const_pointer; typedef void value_type; template struct rebind { typedef tbb_allocator other; }; }; template inline bool operator==( const tbb_allocator&, const tbb_allocator& ) {return true;} template inline bool operator!=( const tbb_allocator&, const tbb_allocator& ) {return false;} //! Meets "allocator" requirements of ISO C++ Standard, Section 20.1.5 /** The class is an adapter over an actual allocator that fills the allocation using memset function with template argument C as the value. The members are ordered the same way they are in section 20.4.1 of the ISO C++ standard. @ingroup memory_allocation */ template class Allocator = tbb_allocator> class zero_allocator : public Allocator { public: typedef Allocator base_allocator_type; typedef typename base_allocator_type::value_type value_type; typedef typename base_allocator_type::pointer pointer; typedef typename base_allocator_type::const_pointer const_pointer; typedef typename base_allocator_type::reference reference; typedef typename base_allocator_type::const_reference const_reference; typedef typename base_allocator_type::size_type size_type; typedef typename base_allocator_type::difference_type difference_type; template struct rebind { typedef zero_allocator other; }; zero_allocator() throw() { } zero_allocator(const zero_allocator &a) throw() : base_allocator_type( a ) { } template zero_allocator(const zero_allocator &a) throw() : base_allocator_type( Allocator( a ) ) { } pointer allocate(const size_type n, const void *hint = 0 ) { pointer ptr = base_allocator_type::allocate( n, hint ); std::memset( ptr, 0, n * sizeof(value_type) ); return ptr; } }; //! Analogous to std::allocator, as defined in ISO C++ Standard, Section 20.4.1 /** @ingroup memory_allocation */ template class Allocator> class zero_allocator : public Allocator { public: typedef Allocator base_allocator_type; typedef typename base_allocator_type::value_type value_type; typedef typename base_allocator_type::pointer pointer; typedef typename base_allocator_type::const_pointer const_pointer; template struct rebind { typedef zero_allocator other; }; }; template class B1, typename T2, template class B2> inline bool operator==( const zero_allocator &a, const zero_allocator &b) { return static_cast< B1 >(a) == static_cast< B2 >(b); } template class B1, typename T2, template class B2> inline bool operator!=( const zero_allocator &a, const zero_allocator &b) { return static_cast< B1 >(a) != static_cast< B2 >(b); } } // namespace tbb #endif /* __TBB_tbb_allocator_H */ ================================================ FILE: benchmarks/tbb/tbb_assert_impl.h ================================================ /* Copyright 2005-2014 Intel Corporation. All Rights Reserved. This file is part of Threading Building Blocks. Threading Building Blocks is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. Threading Building Blocks is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Threading Building Blocks; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA As a special exception, you may use this file as part of a free software library without restriction. Specifically, if other files instantiate templates or use macros or inline functions from this file, or you compile this file and link it with other files to produce an executable, this file does not by itself cause the resulting executable to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the executable file might be covered by the GNU General Public License. */ // IMPORTANT: To use assertion handling in TBB, exactly one of the TBB source files // should #include tbb_assert_impl.h thus instantiating assertion handling routines. // The intent of putting it to a separate file is to allow some tests to use it // as well in order to avoid dependency on the library. // include headers for required function declarations #include #include #include #include #if _MSC_VER #include #endif #if _MSC_VER >= 1400 #define __TBB_EXPORTED_FUNC __cdecl #else #define __TBB_EXPORTED_FUNC #endif using namespace std; #if __TBBMALLOC_BUILD namespace rml { namespace internal { #else namespace tbb { #endif //! Type for an assertion handler typedef void(*assertion_handler_type)( const char* filename, int line, const char* expression, const char * comment ); static assertion_handler_type assertion_handler; assertion_handler_type __TBB_EXPORTED_FUNC set_assertion_handler( assertion_handler_type new_handler ) { assertion_handler_type old_handler = assertion_handler; assertion_handler = new_handler; return old_handler; } void __TBB_EXPORTED_FUNC assertion_failure( const char* filename, int line, const char* expression, const char* comment ) { if( assertion_handler_type a = assertion_handler ) { (*a)(filename,line,expression,comment); } else { static bool already_failed; if( !already_failed ) { already_failed = true; fprintf( stderr, "Assertion %s failed on line %d of file %s\n", expression, line, filename ); if( comment ) fprintf( stderr, "Detailed description: %s\n", comment ); #if _MSC_VER && _DEBUG if(1 == _CrtDbgReport(_CRT_ASSERT, filename, line, "tbb_debug.dll", "%s\r\n%s", expression, comment?comment:"")) _CrtDbgBreak(); #else fflush(stderr); abort(); #endif } } } #if defined(_MSC_VER)&&_MSC_VER<1400 # define vsnprintf _vsnprintf #endif #if !__TBBMALLOC_BUILD namespace internal { //! Report a runtime warning. void __TBB_EXPORTED_FUNC runtime_warning( const char* format, ... ) { char str[1024]; memset(str, 0, 1024); va_list args; va_start(args, format); vsnprintf( str, 1024-1, format, args); va_end(args); fprintf( stderr, "TBB Warning: %s\n", str); } } // namespace internal #endif #if __TBBMALLOC_BUILD }} // namespaces rml::internal #else } // namespace tbb #endif ================================================ FILE: benchmarks/tbb/tbb_config.h ================================================ /* Copyright 2005-2014 Intel Corporation. All Rights Reserved. This file is part of Threading Building Blocks. Threading Building Blocks is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. Threading Building Blocks is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Threading Building Blocks; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA As a special exception, you may use this file as part of a free software library without restriction. Specifically, if other files instantiate templates or use macros or inline functions from this file, or you compile this file and link it with other files to produce an executable, this file does not by itself cause the resulting executable to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the executable file might be covered by the GNU General Public License. */ #ifndef __TBB_tbb_config_H #define __TBB_tbb_config_H /** This header is supposed to contain macro definitions and C style comments only. The macros defined here are intended to control such aspects of TBB build as - presence of compiler features - compilation modes - feature sets - known compiler/platform issues **/ /*Check which standard library we use on OS X.*/ /*__TBB_SYMBOL is defined only while processing exported symbols list where C++ is not allowed.*/ #if !defined(__TBB_SYMBOL) && __APPLE__ #include #endif // note that when ICC is in use __TBB_GCC_VERSION might not closely match GCC version on the machine #define __TBB_GCC_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) #if __clang__ /**according to clang documentation version can be vendor specific **/ #define __TBB_CLANG_VERSION (__clang_major__ * 10000 + __clang_minor__ * 100 + __clang_patchlevel__) #endif /** Preprocessor symbols to determine HW architecture **/ #if _WIN32||_WIN64 # if defined(_M_X64)||defined(__x86_64__) // the latter for MinGW support # define __TBB_x86_64 1 # elif defined(_M_IA64) # define __TBB_ipf 1 # elif defined(_M_IX86)||defined(__i386__) // the latter for MinGW support # define __TBB_x86_32 1 # else # define __TBB_generic_arch 1 # endif #else /* Assume generic Unix */ # if !__linux__ && !__APPLE__ # define __TBB_generic_os 1 # endif # if __x86_64__ # define __TBB_x86_64 1 # elif __ia64__ # define __TBB_ipf 1 # elif __i386__||__i386 // __i386 is for Sun OS # define __TBB_x86_32 1 # else # define __TBB_generic_arch 1 # endif #endif #if __MIC__ || __MIC2__ #define __TBB_DEFINE_MIC 1 #endif #define __TBB_TSX_AVAILABLE (__TBB_x86_32 || __TBB_x86_64) && !__TBB_DEFINE_MIC /** Presence of compiler features **/ #if __INTEL_COMPILER == 9999 && __INTEL_COMPILER_BUILD_DATE == 20110811 /* Intel(R) Composer XE 2011 Update 6 incorrectly sets __INTEL_COMPILER. Fix it. */ #undef __INTEL_COMPILER #define __INTEL_COMPILER 1210 #endif #if __TBB_GCC_VERSION >= 40400 && !defined(__INTEL_COMPILER) /** warning suppression pragmas available in GCC since 4.4 **/ #define __TBB_GCC_WARNING_SUPPRESSION_PRESENT 1 #endif /* Select particular features of C++11 based on compiler version. ICC 12.1 (Linux), GCC 4.3 and higher, clang 2.9 and higher set __GXX_EXPERIMENTAL_CXX0X__ in c++11 mode. Compilers that mimics other compilers (ICC, clang) must be processed before compilers they mimic (GCC, MSVC). TODO: The following conditions should be extended when new compilers/runtimes support added. */ #if __INTEL_COMPILER /** C++11 mode detection macros for Intel C++ compiler (enabled by -std=c++0x option): __INTEL_CXX11_MODE__ for version >=13.0 __STDC_HOSTED__ for version >=12.0 on Windows, __GXX_EXPERIMENTAL_CXX0X__ for version >=12.0 on Linux and OS X. **/ // On Windows, C++11 features supported by Visual Studio 2010 and higher are enabled by default #ifndef __INTEL_CXX11_MODE__ #define __INTEL_CXX11_MODE__ ((_MSC_VER && __STDC_HOSTED__) || __GXX_EXPERIMENTAL_CXX0X__) // TODO: check if more conditions can be simplified with the above macro #endif #define __TBB_CPP11_VARIADIC_TEMPLATES_PRESENT (__INTEL_CXX11_MODE__ && __VARIADIC_TEMPLATES) // Both r-value reference support in compiler and std::move/std::forward // presence in C++ standard library is checked. #define __TBB_CPP11_RVALUE_REF_PRESENT ((__GXX_EXPERIMENTAL_CXX0X__ && (__TBB_GCC_VERSION >= 40300 || _LIBCPP_VERSION) || _MSC_VER >= 1600) && __INTEL_COMPILER >= 1200) #if _MSC_VER >= 1600 #define __TBB_EXCEPTION_PTR_PRESENT ( __INTEL_COMPILER > 1300 \ /*ICC 12.1 Upd 10 and 13 beta Upd 2 fixed exception_ptr linking issue*/ \ || (__INTEL_COMPILER == 1300 && __INTEL_COMPILER_BUILD_DATE >= 20120530) \ || (__INTEL_COMPILER == 1210 && __INTEL_COMPILER_BUILD_DATE >= 20120410) ) /** libstdc++ that comes with GCC 4.6 use C++11 features not supported by ICC 12.1. * Because of that ICC 12.1 does not support C++11 mode with with gcc 4.6 (or higher), * and therefore does not define __GXX_EXPERIMENTAL_CXX0X__ macro **/ #elif __TBB_GCC_VERSION >= 40404 && __TBB_GCC_VERSION < 40600 #define __TBB_EXCEPTION_PTR_PRESENT (__GXX_EXPERIMENTAL_CXX0X__ && __INTEL_COMPILER >= 1200) #elif __TBB_GCC_VERSION >= 40600 #define __TBB_EXCEPTION_PTR_PRESENT (__GXX_EXPERIMENTAL_CXX0X__ && __INTEL_COMPILER >= 1300) #else #define __TBB_EXCEPTION_PTR_PRESENT 0 #endif #define __TBB_MAKE_EXCEPTION_PTR_PRESENT (_MSC_VER >= 1700 || (__GXX_EXPERIMENTAL_CXX0X__ && __TBB_GCC_VERSION >= 40600)) #define __TBB_STATIC_ASSERT_PRESENT (__INTEL_CXX11_MODE__ || _MSC_VER >= 1600) #define __TBB_CPP11_TUPLE_PRESENT (_MSC_VER >= 1600 || (__GXX_EXPERIMENTAL_CXX0X__ && __TBB_GCC_VERSION >= 40300)) /**Intel C++ compiler 14.0 crashes on using __has_include. When it fixed, condition will need to be updated. **/ #if (__clang__ && __INTEL_COMPILER > 1400) #if (__has_feature(__cxx_generalized_initializers__) && __has_include()) #define __TBB_INITIALIZER_LISTS_PRESENT 1 #endif #else /** TODO: when MSVC2013 is supported by Intel C++ compiler, it will be enabled silently by compiler, so rule will need to be updated.**/ #define __TBB_INITIALIZER_LISTS_PRESENT __INTEL_CXX11_MODE__ && __INTEL_COMPILER >= 1400 && (_MSC_VER >= 1800 || __TBB_GCC_VERSION >= 40400 || _LIBCPP_VERSION) #endif #define __TBB_CONSTEXPR_PRESENT __INTEL_CXX11_MODE__ && __INTEL_COMPILER >= 1400 #define __TBB_DEFAULTED_AND_DELETED_FUNC_PRESENT __INTEL_CXX11_MODE__ && __INTEL_COMPILER >= 1200 /** ICC seems to disable support of noexcept event in c++11 when compiling in compatibility mode for gcc <4.6 **/ #define __TBB_NOEXCEPT_PRESENT __INTEL_CXX11_MODE__ && __INTEL_COMPILER >= 1300 && (__TBB_GCC_VERSION >= 40600 || _LIBCPP_VERSION || _MSC_VER) #define __TBB_CPP11_STD_BEGIN_END_PRESENT (_MSC_VER >= 1700 || __GXX_EXPERIMENTAL_CXX0X__ && __INTEL_COMPILER >= 1310 && (__TBB_GCC_VERSION >= 40600 || _LIBCPP_VERSION)) #define __TBB_CPP11_AUTO_PRESENT (_MSC_VER >= 1600 || __GXX_EXPERIMENTAL_CXX0X__ && __INTEL_COMPILER >= 1210) #define __TBB_CPP11_DECLTYPE_PRESENT (_MSC_VER >= 1600 || __GXX_EXPERIMENTAL_CXX0X__ && __INTEL_COMPILER >= 1210) #elif __clang__ //TODO: these options need to be rechecked /** on OS X* the only way to get C++11 is to use clang. For library features (e.g. exception_ptr) libc++ is also * required. So there is no need to check GCC version for clang**/ #define __TBB_CPP11_VARIADIC_TEMPLATES_PRESENT (__has_feature(__cxx_variadic_templates__)) #define __TBB_CPP11_RVALUE_REF_PRESENT (__has_feature(__cxx_rvalue_references__) && (__TBB_GCC_VERSION >= 40300 || _LIBCPP_VERSION)) /** TODO: extend exception_ptr related conditions to cover libstdc++ **/ #define __TBB_EXCEPTION_PTR_PRESENT (__cplusplus >= 201103L && _LIBCPP_VERSION) #define __TBB_MAKE_EXCEPTION_PTR_PRESENT (__cplusplus >= 201103L && _LIBCPP_VERSION) #define __TBB_STATIC_ASSERT_PRESENT __has_feature(__cxx_static_assert__) /**Clang (preprocessor) has problems with dealing with expression having __has_include in #ifs * used inside C++ code. (At least version that comes with OS X 10.8 : Apple LLVM version 4.2 (clang-425.0.28) (based on LLVM 3.2svn)) **/ #if (__GXX_EXPERIMENTAL_CXX0X__ && __has_include()) #define __TBB_CPP11_TUPLE_PRESENT 1 #endif #if (__has_feature(__cxx_generalized_initializers__) && __has_include()) #define __TBB_INITIALIZER_LISTS_PRESENT 1 #endif #define __TBB_CONSTEXPR_PRESENT __has_feature(__cxx_constexpr__) #define __TBB_DEFAULTED_AND_DELETED_FUNC_PRESENT (__has_feature(__cxx_defaulted_functions__) && __has_feature(__cxx_deleted_functions__)) /**For some unknown reason __has_feature(__cxx_noexcept) does not yield true for all cases. Compiler bug ? **/ #define __TBB_NOEXCEPT_PRESENT (__cplusplus >= 201103L) #define __TBB_CPP11_STD_BEGIN_END_PRESENT (__has_feature(__cxx_range_for__) && _LIBCPP_VERSION) #define __TBB_CPP11_AUTO_PRESENT __has_feature(__cxx_auto_type__) #define __TBB_CPP11_DECLTYPE_PRESENT __has_feature(__cxx_decltype__) #elif __GNUC__ #define __TBB_CPP11_VARIADIC_TEMPLATES_PRESENT __GXX_EXPERIMENTAL_CXX0X__ #define __TBB_CPP11_RVALUE_REF_PRESENT __GXX_EXPERIMENTAL_CXX0X__ /** __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 here is a substitution for _GLIBCXX_ATOMIC_BUILTINS_4, which is a prerequisite for exception_ptr but cannot be used in this file because it is defined in a header, not by the compiler. If the compiler has no atomic intrinsics, the C++ library should not expect those as well. **/ #define __TBB_EXCEPTION_PTR_PRESENT (__GXX_EXPERIMENTAL_CXX0X__ && __TBB_GCC_VERSION >= 40404 && __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4) #define __TBB_MAKE_EXCEPTION_PTR_PRESENT (__GXX_EXPERIMENTAL_CXX0X__ && __TBB_GCC_VERSION >= 40600) #define __TBB_STATIC_ASSERT_PRESENT (__GXX_EXPERIMENTAL_CXX0X__ && __TBB_GCC_VERSION >= 40300) #define __TBB_CPP11_TUPLE_PRESENT (__GXX_EXPERIMENTAL_CXX0X__ && __TBB_GCC_VERSION >= 40300) #define __TBB_INITIALIZER_LISTS_PRESENT (__GXX_EXPERIMENTAL_CXX0X__ && __TBB_GCC_VERSION >= 40400) /** gcc seems have to support constexpr from 4.4 but tests in (test_atomic) seeming reasonable fail to compile prior 4.6**/ #define __TBB_CONSTEXPR_PRESENT (__GXX_EXPERIMENTAL_CXX0X__ && __TBB_GCC_VERSION >= 40400) #define __TBB_DEFAULTED_AND_DELETED_FUNC_PRESENT (__GXX_EXPERIMENTAL_CXX0X__ && __TBB_GCC_VERSION >= 40400) #define __TBB_NOEXCEPT_PRESENT (__GXX_EXPERIMENTAL_CXX0X__ && __TBB_GCC_VERSION >= 40600) #define __TBB_CPP11_STD_BEGIN_END_PRESENT (__GXX_EXPERIMENTAL_CXX0X__ && __TBB_GCC_VERSION >= 40600) #define __TBB_CPP11_AUTO_PRESENT (__GXX_EXPERIMENTAL_CXX0X__ && __TBB_GCC_VERSION >= 40400) #define __TBB_CPP11_DECLTYPE_PRESENT (__GXX_EXPERIMENTAL_CXX0X__ && __TBB_GCC_VERSION >= 40400) #elif _MSC_VER #define __TBB_CPP11_VARIADIC_TEMPLATES_PRESENT (_MSC_VER >= 1800) #define __TBB_CPP11_RVALUE_REF_PRESENT (_MSC_VER >= 1600) #define __TBB_EXCEPTION_PTR_PRESENT (_MSC_VER >= 1600) #define __TBB_STATIC_ASSERT_PRESENT (_MSC_VER >= 1600) #define __TBB_MAKE_EXCEPTION_PTR_PRESENT (_MSC_VER >= 1700) #define __TBB_CPP11_TUPLE_PRESENT (_MSC_VER >= 1600) #define __TBB_INITIALIZER_LISTS_PRESENT (_MSC_VER >= 1800) #define __TBB_CONSTEXPR_PRESENT 0 #define __TBB_DEFAULTED_AND_DELETED_FUNC_PRESENT (_MSC_VER >= 1800) #define __TBB_NOEXCEPT_PRESENT 0 /*for _MSC_VER == 1800*/ #define __TBB_CPP11_STD_BEGIN_END_PRESENT (_MSC_VER >= 1700) #define __TBB_CPP11_AUTO_PRESENT (_MSC_VER >= 1600) #define __TBB_CPP11_DECLTYPE_PRESENT (_MSC_VER >= 1600) #else #define __TBB_CPP11_VARIADIC_TEMPLATES_PRESENT 0 #define __TBB_CPP11_RVALUE_REF_PRESENT 0 #define __TBB_EXCEPTION_PTR_PRESENT 0 #define __TBB_STATIC_ASSERT_PRESENT 0 #define __TBB_MAKE_EXCEPTION_PTR_PRESENT 0 #define __TBB_CPP11_TUPLE_PRESENT 0 #define __TBB_INITIALIZER_LISTS_PRESENT 0 #define __TBB_CONSTEXPR_PRESENT 0 #define __TBB_DEFAULTED_AND_DELETED_FUNC_PRESENT 0 #define __TBB_NOEXCEPT_PRESENT 0 #define __TBB_CPP11_STD_BEGIN_END_PRESENT 0 #define __TBB_CPP11_AUTO_PRESENT 0 #define __TBB_CPP11_DECLTYPE_PRESENT 0 #endif // C++11 standard library features #define __TBB_CPP11_TYPE_PROPERTIES_PRESENT (_LIBCPP_VERSION || _MSC_VER >= 1700) #define __TBB_TR1_TYPE_PROPERTIES_IN_STD_PRESENT (__GXX_EXPERIMENTAL_CXX0X__ && __TBB_GCC_VERSION >= 40300 || _MSC_VER >= 1600) //TODO: Probably more accurate way is to analyze version of stdlibc++ via__GLIBCXX__ instead of __TBB_GCC_VERSION #define __TBB_ALLOCATOR_TRAITS_PRESENT (__cplusplus >= 201103L && _LIBCPP_VERSION || _MSC_VER >= 1700 || \ __GXX_EXPERIMENTAL_CXX0X__ && __TBB_GCC_VERSION >= 40700 && !(__TBB_GCC_VERSION == 40700 && __TBB_DEFINE_MIC) \ ) //TODO: not clear how exactly this macro affects exception_ptr - investigate // On linux ICC fails to find existing std::exception_ptr in libstdc++ without this define #if __INTEL_COMPILER && __GNUC__ && __TBB_EXCEPTION_PTR_PRESENT && !defined(__GCC_HAVE_SYNC_COMPARE_AND_SWAP_4) #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 1 #endif // Work around a bug in MinGW32 #if __MINGW32__ && __TBB_EXCEPTION_PTR_PRESENT && !defined(_GLIBCXX_ATOMIC_BUILTINS_4) #define _GLIBCXX_ATOMIC_BUILTINS_4 #endif #if __GNUC__ || __SUNPRO_CC || __IBMCPP__ /* ICC defines __GNUC__ and so is covered */ #define __TBB_ATTRIBUTE_ALIGNED_PRESENT 1 #elif _MSC_VER && (_MSC_VER >= 1300 || __INTEL_COMPILER) #define __TBB_DECLSPEC_ALIGN_PRESENT 1 #endif /* Actually ICC supports gcc __sync_* intrinsics starting 11.1, * but 64 bit support for 32 bit target comes in later ones*/ /* TODO: change the version back to 4.1.2 once macro __TBB_WORD_SIZE become optional */ #if __TBB_GCC_VERSION >= 40306 || __INTEL_COMPILER >= 1200 /** built-in atomics available in GCC since 4.1.2 **/ #define __TBB_GCC_BUILTIN_ATOMICS_PRESENT 1 #endif #if __INTEL_COMPILER >= 1200 /** built-in C++11 style atomics available in ICC since 12.0 **/ #define __TBB_ICC_BUILTIN_ATOMICS_PRESENT 1 #endif #define __TBB_TSX_INTRINSICS_PRESENT ((__RTM__ || _MSC_VER>=1700 || __INTEL_COMPILER>=1300) && !__TBB_DEFINE_MIC && !__ANDROID__) /** User controlled TBB features & modes **/ #ifndef TBB_USE_DEBUG #ifdef _DEBUG #define TBB_USE_DEBUG _DEBUG #else #define TBB_USE_DEBUG 0 #endif #endif /* TBB_USE_DEBUG */ #ifndef TBB_USE_ASSERT #define TBB_USE_ASSERT TBB_USE_DEBUG #endif /* TBB_USE_ASSERT */ #ifndef TBB_USE_THREADING_TOOLS #define TBB_USE_THREADING_TOOLS TBB_USE_DEBUG #endif /* TBB_USE_THREADING_TOOLS */ #ifndef TBB_USE_PERFORMANCE_WARNINGS #ifdef TBB_PERFORMANCE_WARNINGS #define TBB_USE_PERFORMANCE_WARNINGS TBB_PERFORMANCE_WARNINGS #else #define TBB_USE_PERFORMANCE_WARNINGS TBB_USE_DEBUG #endif /* TBB_PEFORMANCE_WARNINGS */ #endif /* TBB_USE_PERFORMANCE_WARNINGS */ #if !defined(__EXCEPTIONS) && !defined(_CPPUNWIND) && !defined(__SUNPRO_CC) || defined(_XBOX) #if TBB_USE_EXCEPTIONS #error Compilation settings do not support exception handling. Please do not set TBB_USE_EXCEPTIONS macro or set it to 0. #elif !defined(TBB_USE_EXCEPTIONS) #define TBB_USE_EXCEPTIONS 0 #endif #elif !defined(TBB_USE_EXCEPTIONS) #if __TBB_DEFINE_MIC #define TBB_USE_EXCEPTIONS 0 #else #define TBB_USE_EXCEPTIONS 1 #endif #elif TBB_USE_EXCEPTIONS && __TBB_DEFINE_MIC #error Please do not set TBB_USE_EXCEPTIONS macro or set it to 0. #endif #ifndef TBB_IMPLEMENT_CPP0X /** By default, use C++11 classes if available **/ #if __GNUC__==4 && __GNUC_MINOR__>=4 && __GXX_EXPERIMENTAL_CXX0X__ #define TBB_IMPLEMENT_CPP0X 0 #elif __clang__ && __cplusplus >= 201103L //TODO: consider introducing separate macros for each file? //prevent injection of corresponding tbb names into std:: namespace if native headers are present #if __has_include() || __has_include() #define TBB_IMPLEMENT_CPP0X 0 #else #define TBB_IMPLEMENT_CPP0X 1 #endif #elif _MSC_VER>=1700 #define TBB_IMPLEMENT_CPP0X 0 #elif __STDCPP_THREADS__ #define TBB_IMPLEMENT_CPP0X 0 #else #define TBB_IMPLEMENT_CPP0X 1 #endif #endif /* TBB_IMPLEMENT_CPP0X */ /* TBB_USE_CAPTURED_EXCEPTION should be explicitly set to either 0 or 1, as it is used as C++ const */ #ifndef TBB_USE_CAPTURED_EXCEPTION /** IA-64 architecture pre-built TBB binaries do not support exception_ptr. **/ #if __TBB_EXCEPTION_PTR_PRESENT && !defined(__ia64__) #define TBB_USE_CAPTURED_EXCEPTION 0 #else #define TBB_USE_CAPTURED_EXCEPTION 1 #endif #else /* defined TBB_USE_CAPTURED_EXCEPTION */ #if !TBB_USE_CAPTURED_EXCEPTION && !__TBB_EXCEPTION_PTR_PRESENT #error Current runtime does not support std::exception_ptr. Set TBB_USE_CAPTURED_EXCEPTION and make sure that your code is ready to catch tbb::captured_exception. #endif #endif /* defined TBB_USE_CAPTURED_EXCEPTION */ /** Check whether the request to use GCC atomics can be satisfied **/ #if TBB_USE_GCC_BUILTINS && !__TBB_GCC_BUILTIN_ATOMICS_PRESENT #error "GCC atomic built-ins are not supported." #endif /** Internal TBB features & modes **/ /** __TBB_WEAK_SYMBOLS_PRESENT denotes that the system supports the weak symbol mechanism **/ #ifndef __TBB_WEAK_SYMBOLS_PRESENT #define __TBB_WEAK_SYMBOLS_PRESENT ( !_WIN32 && !__APPLE__ && !__sun && (__TBB_GCC_VERSION >= 40000 || __INTEL_COMPILER ) ) #endif /** __TBB_DYNAMIC_LOAD_ENABLED describes the system possibility to load shared libraries at run time **/ #ifndef __TBB_DYNAMIC_LOAD_ENABLED #define __TBB_DYNAMIC_LOAD_ENABLED 1 #endif /** __TBB_SOURCE_DIRECTLY_INCLUDED is a mode used in whitebox testing when it's necessary to test internal functions not exported from TBB DLLs **/ #if (_WIN32||_WIN64) && (__TBB_SOURCE_DIRECTLY_INCLUDED || TBB_USE_PREVIEW_BINARY) #define __TBB_NO_IMPLICIT_LINKAGE 1 #define __TBBMALLOC_NO_IMPLICIT_LINKAGE 1 #endif #ifndef __TBB_COUNT_TASK_NODES #define __TBB_COUNT_TASK_NODES TBB_USE_ASSERT #endif #ifndef __TBB_TASK_GROUP_CONTEXT #define __TBB_TASK_GROUP_CONTEXT 1 #endif /* __TBB_TASK_GROUP_CONTEXT */ #ifndef __TBB_SCHEDULER_OBSERVER #define __TBB_SCHEDULER_OBSERVER 1 #endif /* __TBB_SCHEDULER_OBSERVER */ #ifndef __TBB_FP_CONTEXT #define __TBB_FP_CONTEXT __TBB_TASK_GROUP_CONTEXT #endif /* __TBB_FP_CONTEXT */ #if __TBB_FP_CONTEXT && !__TBB_TASK_GROUP_CONTEXT #error __TBB_FP_CONTEXT requires __TBB_TASK_GROUP_CONTEXT to be enabled #endif #ifndef __TBB_TASK_ARENA #define __TBB_TASK_ARENA 1 #endif /* __TBB_TASK_ARENA */ #if __TBB_TASK_ARENA #define __TBB_RECYCLE_TO_ENQUEUE __TBB_BUILD // keep non-official #if !__TBB_SCHEDULER_OBSERVER #error __TBB_TASK_ARENA requires __TBB_SCHEDULER_OBSERVER to be enabled #endif #endif /* __TBB_TASK_ARENA */ #ifndef __TBB_ARENA_OBSERVER #define __TBB_ARENA_OBSERVER ((__TBB_BUILD||TBB_PREVIEW_LOCAL_OBSERVER)&& __TBB_SCHEDULER_OBSERVER) #endif /* __TBB_ARENA_OBSERVER */ #ifndef __TBB_SLEEP_PERMISSION #define __TBB_SLEEP_PERMISSION ((__TBB_CPF_BUILD||TBB_PREVIEW_LOCAL_OBSERVER)&& __TBB_SCHEDULER_OBSERVER) #endif /* __TBB_SLEEP_PERMISSION */ #if TBB_PREVIEW_FLOW_GRAPH_TRACE #define __TBB_NO_IMPLICIT_LINKAGE 1 #endif /* TBB_PREVIEW_FLOW_GRAPH_TRACE */ #ifndef __TBB_ITT_STRUCTURE_API #define __TBB_ITT_STRUCTURE_API ( !__TBB_DEFINE_MIC && (__TBB_CPF_BUILD || TBB_PREVIEW_FLOW_GRAPH_TRACE) ) #endif #if TBB_USE_EXCEPTIONS && !__TBB_TASK_GROUP_CONTEXT #error TBB_USE_EXCEPTIONS requires __TBB_TASK_GROUP_CONTEXT to be enabled #endif #ifndef __TBB_TASK_PRIORITY #define __TBB_TASK_PRIORITY (!(__TBB_CPF_BUILD||TBB_USE_PREVIEW_BINARY)&&__TBB_TASK_GROUP_CONTEXT) // TODO: it will be enabled for CPF in the next versions #endif /* __TBB_TASK_PRIORITY */ #if __TBB_TASK_PRIORITY && !__TBB_TASK_GROUP_CONTEXT #error __TBB_TASK_PRIORITY requires __TBB_TASK_GROUP_CONTEXT to be enabled #endif #if TBB_PREVIEW_WAITING_FOR_WORKERS || __TBB_BUILD #define __TBB_SUPPORTS_WORKERS_WAITING_IN_TERMINATE 1 #endif #if !defined(__TBB_SURVIVE_THREAD_SWITCH) && \ (_WIN32 || _WIN64 || __APPLE__ || (__linux__ && !__ANDROID__)) #define __TBB_SURVIVE_THREAD_SWITCH 1 #endif /* __TBB_SURVIVE_THREAD_SWITCH */ #ifndef __TBB_DEFAULT_PARTITIONER #if TBB_DEPRECATED /** Default partitioner for parallel loop templates in TBB 1.0-2.1 */ #define __TBB_DEFAULT_PARTITIONER tbb::simple_partitioner #else /** Default partitioner for parallel loop templates since TBB 2.2 */ #define __TBB_DEFAULT_PARTITIONER tbb::auto_partitioner #endif /* TBB_DEPRECATED */ #endif /* !defined(__TBB_DEFAULT_PARTITIONER */ #ifndef __TBB_USE_PROPORTIONAL_SPLIT_IN_BLOCKED_RANGES #define __TBB_USE_PROPORTIONAL_SPLIT_IN_BLOCKED_RANGES 1 #endif #ifdef _VARIADIC_MAX #define __TBB_VARIADIC_MAX _VARIADIC_MAX #else #if _MSC_VER >= 1700 #define __TBB_VARIADIC_MAX 5 /* current VS11 setting, may change. */ #else #define __TBB_VARIADIC_MAX 10 #endif #endif /** __TBB_WIN8UI_SUPPORT enables support of New Windows*8 Store Apps and limit a possibility to load shared libraries at run time only from application container **/ #if defined(WINAPI_FAMILY) && WINAPI_FAMILY == WINAPI_FAMILY_APP #define __TBB_WIN8UI_SUPPORT 1 #else #define __TBB_WIN8UI_SUPPORT 0 #endif /** Macros of the form __TBB_XXX_BROKEN denote known issues that are caused by the bugs in compilers, standard or OS specific libraries. They should be removed as soon as the corresponding bugs are fixed or the buggy OS/compiler versions go out of the support list. **/ #if __ANDROID__ && __TBB_GCC_VERSION <= 40403 && !__GCC_HAVE_SYNC_COMPARE_AND_SWAP_8 /** Necessary because on Android 8-byte CAS and F&A are not available for some processor architectures, but no mandatory warning message appears from GCC 4.4.3. Instead, only a linkage error occurs when these atomic operations are used (such as in unit test test_atomic.exe). **/ #define __TBB_GCC_64BIT_ATOMIC_BUILTINS_BROKEN 1 #elif __TBB_x86_32 && __TBB_GCC_VERSION == 40102 && ! __GNUC_RH_RELEASE__ /** GCC 4.1.2 erroneously emit call to external function for 64 bit sync_ intrinsics. However these functions are not defined anywhere. It seems that this problem was fixed later on and RHEL got an updated version of gcc 4.1.2. **/ #define __TBB_GCC_64BIT_ATOMIC_BUILTINS_BROKEN 1 #endif #if __GNUC__ && __TBB_x86_64 && __INTEL_COMPILER == 1200 #define __TBB_ICC_12_0_INL_ASM_FSTCW_BROKEN 1 #endif #if _MSC_VER && __INTEL_COMPILER && (__INTEL_COMPILER<1110 || __INTEL_COMPILER==1110 && __INTEL_COMPILER_BUILD_DATE < 20091012) /** Necessary to avoid ICL error (or warning in non-strict mode): "exception specification for implicitly declared virtual destructor is incompatible with that of overridden one". **/ #define __TBB_DEFAULT_DTOR_THROW_SPEC_BROKEN 1 #endif #if defined(_MSC_VER) && _MSC_VER < 1500 && !defined(__INTEL_COMPILER) /** VS2005 and earlier do not allow declaring template class as a friend of classes defined in other namespaces. **/ #define __TBB_TEMPLATE_FRIENDS_BROKEN 1 #endif //TODO: recheck for different clang versions #if __GLIBC__==2 && __GLIBC_MINOR__==3 || (__APPLE__ && ( __INTEL_COMPILER==1200 && !TBB_USE_DEBUG)) /** Macro controlling EH usages in TBB tests. Some older versions of glibc crash when exception handling happens concurrently. **/ #define __TBB_THROW_ACROSS_MODULE_BOUNDARY_BROKEN 1 #else #define __TBB_THROW_ACROSS_MODULE_BOUNDARY_BROKEN 0 #endif #if (_WIN32||_WIN64) && __INTEL_COMPILER == 1110 /** That's a bug in Intel compiler 11.1.044/IA-32/Windows, that leads to a worker thread crash on the thread's startup. **/ #define __TBB_ICL_11_1_CODE_GEN_BROKEN 1 #endif #if __clang__ || (__GNUC__==3 && __GNUC_MINOR__==3 && !defined(__INTEL_COMPILER)) /** Bugs with access to nested classes declared in protected area */ #define __TBB_PROTECTED_NESTED_CLASS_BROKEN 1 #endif #if __MINGW32__ && __TBB_GCC_VERSION < 40200 /** MinGW has a bug with stack alignment for routines invoked from MS RTLs. Since GCC 4.2, the bug can be worked around via a special attribute. **/ #define __TBB_SSE_STACK_ALIGNMENT_BROKEN 1 #else #define __TBB_SSE_STACK_ALIGNMENT_BROKEN 0 #endif #if __GNUC__==4 && __GNUC_MINOR__==3 && __GNUC_PATCHLEVEL__==0 /* GCC of this version may rashly ignore control dependencies */ #define __TBB_GCC_OPTIMIZER_ORDERING_BROKEN 1 #endif #if __FreeBSD__ /** A bug in FreeBSD 8.0 results in kernel panic when there is contention on a mutex created with this attribute. **/ #define __TBB_PRIO_INHERIT_BROKEN 1 /** A bug in FreeBSD 8.0 results in test hanging when an exception occurs during (concurrent?) object construction by means of placement new operator. **/ #define __TBB_PLACEMENT_NEW_EXCEPTION_SAFETY_BROKEN 1 #endif /* __FreeBSD__ */ #if (__linux__ || __APPLE__) && __i386__ && defined(__INTEL_COMPILER) /** The Intel compiler for IA-32 (Linux|OS X) crashes or generates incorrect code when __asm__ arguments have a cast to volatile. **/ #define __TBB_ICC_ASM_VOLATILE_BROKEN 1 #endif #if !__INTEL_COMPILER && (_MSC_VER || __GNUC__==3 && __GNUC_MINOR__<=2) /** Bug in GCC 3.2 and MSVC compilers that sometimes return 0 for __alignof(T) when T has not yet been instantiated. **/ #define __TBB_ALIGNOF_NOT_INSTANTIATED_TYPES_BROKEN 1 #endif #if __TBB_DEFINE_MIC /** Main thread and user's thread have different default thread affinity masks. **/ #define __TBB_MAIN_THREAD_AFFINITY_BROKEN 1 #endif #if __GXX_EXPERIMENTAL_CXX0X__ && !defined(__EXCEPTIONS) && \ ((!__INTEL_COMPILER && !__clang__ && (__TBB_GCC_VERSION>=40400 && __TBB_GCC_VERSION<40600)) || \ (__INTEL_COMPILER<=1400 && (__TBB_GCC_VERSION>=40400 && __TBB_GCC_VERSION<=40801))) /* There is an issue for specific GCC toolchain when C++11 is enabled and exceptions are disabled: exceprion_ptr.h/nested_exception.h use throw unconditionally. GCC can ignore 'throw' since 4.6; but with ICC the issue still exists. */ #define __TBB_LIBSTDCPP_EXCEPTION_HEADERS_BROKEN 1 #else #define __TBB_LIBSTDCPP_EXCEPTION_HEADERS_BROKEN 0 #endif #if __INTEL_COMPILER==1300 && __TBB_GCC_VERSION>=40700 && defined(__GXX_EXPERIMENTAL_CXX0X__) /* Some C++11 features used inside libstdc++ are not supported by Intel compiler. * Checking version of gcc instead of libstdc++ because * - they are directly connected, * - for now it is not possible to check version of any standard library in this file */ #define __TBB_ICC_13_0_CPP11_STDLIB_SUPPORT_BROKEN 1 #else #define __TBB_ICC_13_0_CPP11_STDLIB_SUPPORT_BROKEN 0 #endif #if (__GNUC__==4 && __GNUC_MINOR__==4 ) && !defined(__INTEL_COMPILER) && !defined(__clang__) /** excessive warnings related to strict aliasing rules in GCC 4.4 **/ #define __TBB_GCC_STRICT_ALIASING_BROKEN 1 /* topical remedy: #pragma GCC diagnostic ignored "-Wstrict-aliasing" */ #if !__TBB_GCC_WARNING_SUPPRESSION_PRESENT #error Warning suppression is not supported, while should. #endif #endif /*In a PIC mode some versions of GCC 4.1.2 generate incorrect inlined code for 8 byte __sync_val_compare_and_swap intrinsic */ #if __TBB_GCC_VERSION == 40102 && __PIC__ && !defined(__INTEL_COMPILER) && !defined(__clang__) #define __TBB_GCC_CAS8_BUILTIN_INLINING_BROKEN 1 #endif #if __TBB_x86_32 && (__linux__ || __APPLE__ || _WIN32 || __sun || __ANDROID__) && (__INTEL_COMPILER || (__GNUC__==3 && __GNUC_MINOR__==3 ) || __SUNPRO_CC) // Some compilers for IA-32 fail to provide 8-byte alignment of objects on the stack, // even if the object specifies 8-byte alignment. On such platforms, the IA-32 implementation // of 64 bit atomics (e.g. atomic) use different tactics depending upon // whether the object is properly aligned or not. #define __TBB_FORCE_64BIT_ALIGNMENT_BROKEN 1 #else #define __TBB_FORCE_64BIT_ALIGNMENT_BROKEN 0 #endif #if __TBB_DEFAULTED_AND_DELETED_FUNC_PRESENT && __TBB_GCC_VERSION < 40700 && !defined(__INTEL_COMPILER) && !defined (__clang__) #define __TBB_ZERO_INIT_WITH_DEFAULTED_CTOR_BROKEN 1 #endif #if _MSC_VER && _MSC_VER <= 1800 && !__INTEL_COMPILER // With MSVC, when an array is passed by const reference to a template function, // constness from the function parameter may get propagated to the template parameter. #define __TBB_CONST_REF_TO_ARRAY_TEMPLATE_PARAM_BROKEN 1 #endif // A compiler bug: a disabled copy constructor prevents use of the moving constructor #define __TBB_IF_NO_COPY_CTOR_MOVE_SEMANTICS_BROKEN (_MSC_VER && (__INTEL_COMPILER >= 1300 && __INTEL_COMPILER <= 1310) && !__INTEL_CXX11_MODE__) // MSVC 2013 and ICC 15 seems do not generate implicit move constructor for empty derived class while should #define __TBB_CPP11_IMPLICIT_MOVE_MEMBERS_GENERATION_FOR_DERIVED_BROKEN (__TBB_CPP11_RVALUE_REF_PRESENT && \ ( !__INTEL_COMPILER && _MSC_VER && _MSC_VER <=1800 || __INTEL_COMPILER && __INTEL_COMPILER <= 1500 )) /** End of __TBB_XXX_BROKEN macro section **/ #if defined(_MSC_VER) && _MSC_VER>=1500 && !defined(__INTEL_COMPILER) // A macro to suppress erroneous or benign "unreachable code" MSVC warning (4702) #define __TBB_MSVC_UNREACHABLE_CODE_IGNORED 1 #endif #define __TBB_ATOMIC_CTORS (__TBB_CONSTEXPR_PRESENT && __TBB_DEFAULTED_AND_DELETED_FUNC_PRESENT && (!__TBB_ZERO_INIT_WITH_DEFAULTED_CTOR_BROKEN)) #define __TBB_ALLOCATOR_CONSTRUCT_VARIADIC (__TBB_CPP11_VARIADIC_TEMPLATES_PRESENT && __TBB_CPP11_RVALUE_REF_PRESENT) #define __TBB_VARIADIC_PARALLEL_INVOKE (TBB_PREVIEW_VARIADIC_PARALLEL_INVOKE && __TBB_CPP11_VARIADIC_TEMPLATES_PRESENT && __TBB_CPP11_RVALUE_REF_PRESENT) #endif /* __TBB_tbb_config_H */ ================================================ FILE: benchmarks/tbb/tbb_exception.h ================================================ /* Copyright 2005-2014 Intel Corporation. All Rights Reserved. This file is part of Threading Building Blocks. Threading Building Blocks is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. Threading Building Blocks is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Threading Building Blocks; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA As a special exception, you may use this file as part of a free software library without restriction. Specifically, if other files instantiate templates or use macros or inline functions from this file, or you compile this file and link it with other files to produce an executable, this file does not by itself cause the resulting executable to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the executable file might be covered by the GNU General Public License. */ #ifndef __TBB_exception_H #define __TBB_exception_H #include "tbb_stddef.h" #if !TBB_USE_EXCEPTIONS && _MSC_VER // Suppress "C++ exception handler used, but unwind semantics are not enabled" warning in STL headers #pragma warning (push) #pragma warning (disable: 4530) #endif #include #include //required for bad_alloc definition, operators new #include // required to construct std exception classes #if !TBB_USE_EXCEPTIONS && _MSC_VER #pragma warning (pop) #endif namespace tbb { //! Exception for concurrent containers class bad_last_alloc : public std::bad_alloc { public: /*override*/ const char* what() const throw(); #if __TBB_DEFAULT_DTOR_THROW_SPEC_BROKEN /*override*/ ~bad_last_alloc() throw() {} #endif }; //! Exception for PPL locks class improper_lock : public std::exception { public: /*override*/ const char* what() const throw(); }; //! Exception for user-initiated abort class user_abort : public std::exception { public: /*override*/ const char* what() const throw(); }; //! Exception for missing wait on structured_task_group class missing_wait : public std::exception { public: /*override*/ const char* what() const throw(); }; //! Exception for repeated scheduling of the same task_handle class invalid_multiple_scheduling : public std::exception { public: /*override*/ const char* what() const throw(); }; namespace internal { //! Obsolete void __TBB_EXPORTED_FUNC throw_bad_last_alloc_exception_v4(); enum exception_id { eid_bad_alloc = 1, eid_bad_last_alloc, eid_nonpositive_step, eid_out_of_range, eid_segment_range_error, eid_index_range_error, eid_missing_wait, eid_invalid_multiple_scheduling, eid_improper_lock, eid_possible_deadlock, eid_operation_not_permitted, eid_condvar_wait_failed, eid_invalid_load_factor, eid_reserved, // free slot for backward compatibility, can be reused. eid_invalid_swap, eid_reservation_length_error, eid_invalid_key, eid_user_abort, eid_reserved1, #if __TBB_SUPPORTS_WORKERS_WAITING_IN_TERMINATE // This id is used only inside library and only for support of CPF functionality. // So, if we drop the functionality, eid_reserved1 can be safely renamed and reused. eid_blocking_sch_init = eid_reserved1, #endif eid_bad_tagged_msg_cast, //! The last enumerator tracks the number of defined IDs. It must remain the last one. /** When adding new IDs, place them immediately _before_ this comment (that is _after_ all the existing IDs. NEVER insert new IDs between the existing ones. **/ eid_max }; //! Gathers all throw operators in one place. /** Its purpose is to minimize code bloat that can be caused by throw operators scattered in multiple places, especially in templates. **/ void __TBB_EXPORTED_FUNC throw_exception_v4 ( exception_id ); //! Versionless convenience wrapper for throw_exception_v4() inline void throw_exception ( exception_id eid ) { throw_exception_v4(eid); } } // namespace internal } // namespace tbb #if __TBB_TASK_GROUP_CONTEXT #include "tbb_allocator.h" #include //for typeid namespace tbb { //! Interface to be implemented by all exceptions TBB recognizes and propagates across the threads. /** If an unhandled exception of the type derived from tbb::tbb_exception is intercepted by the TBB scheduler in one of the worker threads, it is delivered to and re-thrown in the root thread. The root thread is the thread that has started the outermost algorithm or root task sharing the same task_group_context with the guilty algorithm/task (the one that threw the exception first). Note: when documentation mentions workers with respect to exception handling, masters are implied as well, because they are completely equivalent in this context. Consequently a root thread can be master or worker thread. NOTE: In case of nested algorithms or complex task hierarchies when the nested levels share (explicitly or by means of implicit inheritance) the task group context of the outermost level, the exception may be (re-)thrown multiple times (ultimately - in each worker on each nesting level) before reaching the root thread at the outermost level. IMPORTANT: if you intercept an exception derived from this class on a nested level, you must re-throw it in the catch block by means of the "throw;" operator. TBB provides two implementations of this interface: tbb::captured_exception and template class tbb::movable_exception. See their declarations for more info. **/ class tbb_exception : public std::exception { /** No operator new is provided because the TBB usage model assumes dynamic creation of the TBB exception objects only by means of applying move() operation on an exception thrown out of TBB scheduler. **/ void* operator new ( size_t ); public: #if __clang__ // At -O3 or even -O2 optimization level, Clang may fully throw away an empty destructor // of tbb_exception from destructors of derived classes. As a result, it does not create // vtable for tbb_exception, which is a required part of TBB binary interface. // Making the destructor non-empty (with just a semicolon) prevents that optimization. ~tbb_exception() throw() { /* keep the semicolon! */ ; } #endif //! Creates and returns pointer to the deep copy of this exception object. /** Move semantics is allowed. **/ virtual tbb_exception* move () throw() = 0; //! Destroys objects created by the move() method. /** Frees memory and calls destructor for this exception object. Can and must be used only on objects created by the move method. **/ virtual void destroy () throw() = 0; //! Throws this exception object. /** Make sure that if you have several levels of derivation from this interface you implement or override this method on the most derived level. The implementation is as simple as "throw *this;". Failure to do this will result in exception of a base class type being thrown. **/ virtual void throw_self () = 0; //! Returns RTTI name of the originally intercepted exception virtual const char* name() const throw() = 0; //! Returns the result of originally intercepted exception's what() method. virtual const char* what() const throw() = 0; /** Operator delete is provided only to allow using existing smart pointers with TBB exception objects obtained as the result of applying move() operation on an exception thrown out of TBB scheduler. When overriding method move() make sure to override operator delete as well if memory is allocated not by TBB's scalable allocator. **/ void operator delete ( void* p ) { internal::deallocate_via_handler_v3(p); } }; //! This class is used by TBB to propagate information about unhandled exceptions into the root thread. /** Exception of this type is thrown by TBB in the root thread (thread that started a parallel algorithm ) if an unhandled exception was intercepted during the algorithm execution in one of the workers. \sa tbb::tbb_exception **/ class captured_exception : public tbb_exception { public: captured_exception ( const captured_exception& src ) : tbb_exception(src), my_dynamic(false) { set(src.my_exception_name, src.my_exception_info); } captured_exception ( const char* name_, const char* info ) : my_dynamic(false) { set(name_, info); } __TBB_EXPORTED_METHOD ~captured_exception () throw(); captured_exception& operator= ( const captured_exception& src ) { if ( this != &src ) { clear(); set(src.my_exception_name, src.my_exception_info); } return *this; } /*override*/ captured_exception* __TBB_EXPORTED_METHOD move () throw(); /*override*/ void __TBB_EXPORTED_METHOD destroy () throw(); /*override*/ void throw_self () { __TBB_THROW(*this); } /*override*/ const char* __TBB_EXPORTED_METHOD name() const throw(); /*override*/ const char* __TBB_EXPORTED_METHOD what() const throw(); void __TBB_EXPORTED_METHOD set ( const char* name, const char* info ) throw(); void __TBB_EXPORTED_METHOD clear () throw(); private: //! Used only by method clone(). captured_exception() {} //! Functionally equivalent to {captured_exception e(name,info); return e.clone();} static captured_exception* allocate ( const char* name, const char* info ); bool my_dynamic; const char* my_exception_name; const char* my_exception_info; }; //! Template that can be used to implement exception that transfers arbitrary ExceptionData to the root thread /** Code using TBB can instantiate this template with an arbitrary ExceptionData type and throw this exception object. Such exceptions are intercepted by the TBB scheduler and delivered to the root thread (). \sa tbb::tbb_exception **/ template class movable_exception : public tbb_exception { typedef movable_exception self_type; public: movable_exception ( const ExceptionData& data_ ) : my_exception_data(data_) , my_dynamic(false) , my_exception_name( #if TBB_USE_EXCEPTIONS typeid(self_type).name() #else /* !TBB_USE_EXCEPTIONS */ "movable_exception" #endif /* !TBB_USE_EXCEPTIONS */ ) {} movable_exception ( const movable_exception& src ) throw () : tbb_exception(src) , my_exception_data(src.my_exception_data) , my_dynamic(false) , my_exception_name(src.my_exception_name) {} ~movable_exception () throw() {} const movable_exception& operator= ( const movable_exception& src ) { if ( this != &src ) { my_exception_data = src.my_exception_data; my_exception_name = src.my_exception_name; } return *this; } ExceptionData& data () throw() { return my_exception_data; } const ExceptionData& data () const throw() { return my_exception_data; } /*override*/ const char* name () const throw() { return my_exception_name; } /*override*/ const char* what () const throw() { return "tbb::movable_exception"; } /*override*/ movable_exception* move () throw() { void* e = internal::allocate_via_handler_v3(sizeof(movable_exception)); if ( e ) { ::new (e) movable_exception(*this); ((movable_exception*)e)->my_dynamic = true; } return (movable_exception*)e; } /*override*/ void destroy () throw() { __TBB_ASSERT ( my_dynamic, "Method destroy can be called only on dynamically allocated movable_exceptions" ); if ( my_dynamic ) { this->~movable_exception(); internal::deallocate_via_handler_v3(this); } } /*override*/ void throw_self () { __TBB_THROW( *this ); } protected: //! User data ExceptionData my_exception_data; private: //! Flag specifying whether this object has been dynamically allocated (by the move method) bool my_dynamic; //! RTTI name of this class /** We rely on the fact that RTTI names are static string constants. **/ const char* my_exception_name; }; #if !TBB_USE_CAPTURED_EXCEPTION namespace internal { //! Exception container that preserves the exact copy of the original exception /** This class can be used only when the appropriate runtime support (mandated by C++0x) is present **/ class tbb_exception_ptr { std::exception_ptr my_ptr; public: static tbb_exception_ptr* allocate (); static tbb_exception_ptr* allocate ( const tbb_exception& tag ); //! This overload uses move semantics (i.e. it empties src) static tbb_exception_ptr* allocate ( captured_exception& src ); //! Destroys this objects /** Note that objects of this type can be created only by the allocate() method. **/ void destroy () throw(); //! Throws the contained exception . void throw_self () { std::rethrow_exception(my_ptr); } private: tbb_exception_ptr ( const std::exception_ptr& src ) : my_ptr(src) {} tbb_exception_ptr ( const captured_exception& src ) : #if __TBB_MAKE_EXCEPTION_PTR_PRESENT my_ptr(std::make_exception_ptr(src)) // the final function name in C++11 #else my_ptr(std::copy_exception(src)) // early C++0x drafts name #endif {} }; // class tbb::internal::tbb_exception_ptr } // namespace internal #endif /* !TBB_USE_CAPTURED_EXCEPTION */ } // namespace tbb #endif /* __TBB_TASK_GROUP_CONTEXT */ #endif /* __TBB_exception_H */ ================================================ FILE: benchmarks/tbb/tbb_machine.h ================================================ /* Copyright 2005-2014 Intel Corporation. All Rights Reserved. This file is part of Threading Building Blocks. Threading Building Blocks is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. Threading Building Blocks is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Threading Building Blocks; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA As a special exception, you may use this file as part of a free software library without restriction. Specifically, if other files instantiate templates or use macros or inline functions from this file, or you compile this file and link it with other files to produce an executable, this file does not by itself cause the resulting executable to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the executable file might be covered by the GNU General Public License. */ #ifndef __TBB_machine_H #define __TBB_machine_H /** This header provides basic platform abstraction layer by hooking up appropriate architecture/OS/compiler specific headers from the /include/tbb/machine directory. If a plug-in header does not implement all the required APIs, it must specify the missing ones by setting one or more of the following macros: __TBB_USE_GENERIC_PART_WORD_CAS __TBB_USE_GENERIC_PART_WORD_FETCH_ADD __TBB_USE_GENERIC_PART_WORD_FETCH_STORE __TBB_USE_GENERIC_FETCH_ADD __TBB_USE_GENERIC_FETCH_STORE __TBB_USE_GENERIC_DWORD_FETCH_ADD __TBB_USE_GENERIC_DWORD_FETCH_STORE __TBB_USE_GENERIC_HALF_FENCED_LOAD_STORE __TBB_USE_GENERIC_FULL_FENCED_LOAD_STORE __TBB_USE_GENERIC_RELAXED_LOAD_STORE __TBB_USE_FETCHSTORE_AS_FULL_FENCED_STORE In this case tbb_machine.h will add missing functionality based on a minimal set of APIs that are required to be implemented by all plug-n headers as described further. Note that these generic implementations may be sub-optimal for a particular architecture, and thus should be relied upon only after careful evaluation or as the last resort. Additionally __TBB_64BIT_ATOMICS can be set to 0 on a 32-bit architecture to indicate that the port is not going to support double word atomics. It may also be set to 1 explicitly, though normally this is not necessary as tbb_machine.h will set it automatically. __TBB_ENDIANNESS macro can be defined by the implementation as well. It is used only if __TBB_USE_GENERIC_PART_WORD_CAS is set (or for testing), and must specify the layout of aligned 16-bit and 32-bit data anywhere within a process (while the details of unaligned 16-bit or 32-bit data or of 64-bit data are irrelevant). The layout must be the same at all relevant memory locations within the current process; in case of page-specific endianness, one endianness must be kept "out of sight". Possible settings, reflecting hardware and possibly O.S. convention, are: - __TBB_ENDIAN_BIG for big-endian data, - __TBB_ENDIAN_LITTLE for little-endian data, - __TBB_ENDIAN_DETECT for run-time detection iff exactly one of the above, - __TBB_ENDIAN_UNSUPPORTED to prevent undefined behavior if none of the above. Prerequisites for each architecture port ---------------------------------------- The following functions and macros have no generic implementation. Therefore they must be implemented in each machine architecture specific header either as a conventional function or as a functional macro. __TBB_WORDSIZE This is the size of machine word in bytes, i.e. for 32 bit systems it should be defined to 4. __TBB_Yield() Signals OS that the current thread is willing to relinquish the remainder of its time quantum. __TBB_full_memory_fence() Must prevent all memory operations from being reordered across it (both by hardware and compiler). All such fences must be totally ordered (or sequentially consistent). __TBB_machine_cmpswp4( volatile void *ptr, int32_t value, int32_t comparand ) Must be provided if __TBB_USE_FENCED_ATOMICS is not set. __TBB_machine_cmpswp8( volatile void *ptr, int32_t value, int64_t comparand ) Must be provided for 64-bit architectures if __TBB_USE_FENCED_ATOMICS is not set, and for 32-bit architectures if __TBB_64BIT_ATOMICS is set __TBB_machine_(...), where = {cmpswp, fetchadd, fetchstore} = {1, 2, 4, 8} = {full_fence, acquire, release, relaxed} Must be provided if __TBB_USE_FENCED_ATOMICS is set. __TBB_control_consistency_helper() Bridges the memory-semantics gap between architectures providing only implicit C++0x "consume" semantics (like Power Architecture) and those also implicitly obeying control dependencies (like IA-64 architecture). It must be used only in conditional code where the condition is itself data-dependent, and will then make subsequent code behave as if the original data dependency were acquired. It needs only a compiler fence where implied by the architecture either specifically (like IA-64 architecture) or because generally stronger "acquire" semantics are enforced (like x86). It is always valid, though potentially suboptimal, to replace control with acquire on the load and then remove the helper. __TBB_acquire_consistency_helper(), __TBB_release_consistency_helper() Must be provided if __TBB_USE_GENERIC_HALF_FENCED_LOAD_STORE is set. Enforce acquire and release semantics in generic implementations of fenced store and load operations. Depending on the particular architecture/compiler combination they may be a hardware fence, a compiler fence, both or nothing. **/ #include "tbb_stddef.h" namespace tbb { namespace internal { //< @cond INTERNAL //////////////////////////////////////////////////////////////////////////////// // Overridable helpers declarations // // A machine/*.h file may choose to define these templates, otherwise it must // request default implementation by setting appropriate __TBB_USE_GENERIC_XXX macro(s). // template struct machine_load_store; template struct machine_load_store_relaxed; template struct machine_load_store_seq_cst; // // End of overridable helpers declarations //////////////////////////////////////////////////////////////////////////////// template struct atomic_selector; template<> struct atomic_selector<1> { typedef int8_t word; inline static word fetch_store ( volatile void* location, word value ); }; template<> struct atomic_selector<2> { typedef int16_t word; inline static word fetch_store ( volatile void* location, word value ); }; template<> struct atomic_selector<4> { #if _MSC_VER && !_WIN64 // Work-around that avoids spurious /Wp64 warnings typedef intptr_t word; #else typedef int32_t word; #endif inline static word fetch_store ( volatile void* location, word value ); }; template<> struct atomic_selector<8> { typedef int64_t word; inline static word fetch_store ( volatile void* location, word value ); }; }} //< namespaces internal @endcond, tbb #define __TBB_MACHINE_DEFINE_STORE8_GENERIC_FENCED(M) \ inline void __TBB_machine_generic_store8##M(volatile void *ptr, int64_t value) { \ for(;;) { \ int64_t result = *(volatile int64_t *)ptr; \ if( __TBB_machine_cmpswp8##M(ptr,value,result)==result ) break; \ } \ } \ #define __TBB_MACHINE_DEFINE_LOAD8_GENERIC_FENCED(M) \ inline int64_t __TBB_machine_generic_load8##M(const volatile void *ptr) { \ /* Comparand and new value may be anything, they only must be equal, and */ \ /* the value should have a low probability to be actually found in 'location'.*/ \ const int64_t anyvalue = 2305843009213693951LL; \ return __TBB_machine_cmpswp8##M(const_cast(ptr),anyvalue,anyvalue); \ } \ // The set of allowed values for __TBB_ENDIANNESS (see above for details) #define __TBB_ENDIAN_UNSUPPORTED -1 #define __TBB_ENDIAN_LITTLE 0 #define __TBB_ENDIAN_BIG 1 #define __TBB_ENDIAN_DETECT 2 #if _WIN32||_WIN64 #ifdef _MANAGED #pragma managed(push, off) #endif #if __MINGW64__ || __MINGW32__ extern "C" __declspec(dllimport) int __stdcall SwitchToThread( void ); #define __TBB_Yield() SwitchToThread() #if (TBB_USE_GCC_BUILTINS && __TBB_GCC_BUILTIN_ATOMICS_PRESENT) #include "machine/gcc_generic.h" #elif __MINGW64__ #include "machine/linux_intel64.h" #elif __MINGW32__ #include "machine/linux_ia32.h" #endif #elif (TBB_USE_ICC_BUILTINS && __TBB_ICC_BUILTIN_ATOMICS_PRESENT) #include "machine/icc_generic.h" #elif defined(_M_IX86) && !defined(__TBB_WIN32_USE_CL_BUILTINS) #include "machine/windows_ia32.h" #elif defined(_M_X64) #include "machine/windows_intel64.h" #elif defined(_XBOX) #include "machine/xbox360_ppc.h" #elif defined(_M_ARM) || defined(__TBB_WIN32_USE_CL_BUILTINS) #include "machine/msvc_armv7.h" #endif #ifdef _MANAGED #pragma managed(pop) #endif #elif __TBB_DEFINE_MIC #include "machine/mic_common.h" #if (TBB_USE_ICC_BUILTINS && __TBB_ICC_BUILTIN_ATOMICS_PRESENT) #include "machine/icc_generic.h" #else #include "machine/linux_intel64.h" #endif #elif __linux__ || __FreeBSD__ || __NetBSD__ #if (TBB_USE_GCC_BUILTINS && __TBB_GCC_BUILTIN_ATOMICS_PRESENT) #include "machine/gcc_generic.h" #elif (TBB_USE_ICC_BUILTINS && __TBB_ICC_BUILTIN_ATOMICS_PRESENT) #include "machine/icc_generic.h" #elif __i386__ #include "machine/linux_ia32.h" #elif __x86_64__ #include "machine/linux_intel64.h" #elif __ia64__ #include "machine/linux_ia64.h" #elif __powerpc__ #include "machine/mac_ppc.h" #elif __arm__ #include "machine/gcc_armv7.h" #elif __TBB_GCC_BUILTIN_ATOMICS_PRESENT #include "machine/gcc_generic.h" #endif #include "machine/linux_common.h" #elif __APPLE__ //TODO: TBB_USE_GCC_BUILTINS is not used for Mac, Sun, Aix #if (TBB_USE_ICC_BUILTINS && __TBB_ICC_BUILTIN_ATOMICS_PRESENT) #include "machine/icc_generic.h" #elif __i386__ #include "machine/linux_ia32.h" #elif __x86_64__ #include "machine/linux_intel64.h" #elif __POWERPC__ #include "machine/mac_ppc.h" #endif #include "machine/macos_common.h" #elif _AIX #include "machine/ibm_aix51.h" #elif __sun || __SUNPRO_CC #define __asm__ asm #define __volatile__ volatile #if __i386 || __i386__ #include "machine/linux_ia32.h" #elif __x86_64__ #include "machine/linux_intel64.h" #elif __sparc #include "machine/sunos_sparc.h" #endif #include #define __TBB_Yield() sched_yield() #endif /* OS selection */ #ifndef __TBB_64BIT_ATOMICS #define __TBB_64BIT_ATOMICS 1 #endif //TODO: replace usage of these functions with usage of tbb::atomic, and then remove them //TODO: map functions with W suffix to use cast to tbb::atomic and according op, i.e. as_atomic().op() // Special atomic functions #if __TBB_USE_FENCED_ATOMICS #define __TBB_machine_cmpswp1 __TBB_machine_cmpswp1full_fence #define __TBB_machine_cmpswp2 __TBB_machine_cmpswp2full_fence #define __TBB_machine_cmpswp4 __TBB_machine_cmpswp4full_fence #define __TBB_machine_cmpswp8 __TBB_machine_cmpswp8full_fence #if __TBB_WORDSIZE==8 #define __TBB_machine_fetchadd8 __TBB_machine_fetchadd8full_fence #define __TBB_machine_fetchstore8 __TBB_machine_fetchstore8full_fence #define __TBB_FetchAndAddWrelease(P,V) __TBB_machine_fetchadd8release(P,V) #define __TBB_FetchAndIncrementWacquire(P) __TBB_machine_fetchadd8acquire(P,1) #define __TBB_FetchAndDecrementWrelease(P) __TBB_machine_fetchadd8release(P,(-1)) #else #define __TBB_machine_fetchadd4 __TBB_machine_fetchadd4full_fence #define __TBB_machine_fetchstore4 __TBB_machine_fetchstore4full_fence #define __TBB_FetchAndAddWrelease(P,V) __TBB_machine_fetchadd4release(P,V) #define __TBB_FetchAndIncrementWacquire(P) __TBB_machine_fetchadd4acquire(P,1) #define __TBB_FetchAndDecrementWrelease(P) __TBB_machine_fetchadd4release(P,(-1)) #endif /* __TBB_WORDSIZE==4 */ #else /* !__TBB_USE_FENCED_ATOMICS */ #define __TBB_FetchAndAddWrelease(P,V) __TBB_FetchAndAddW(P,V) #define __TBB_FetchAndIncrementWacquire(P) __TBB_FetchAndAddW(P,1) #define __TBB_FetchAndDecrementWrelease(P) __TBB_FetchAndAddW(P,(-1)) #endif /* !__TBB_USE_FENCED_ATOMICS */ #if __TBB_WORDSIZE==4 #define __TBB_CompareAndSwapW(P,V,C) __TBB_machine_cmpswp4(P,V,C) #define __TBB_FetchAndAddW(P,V) __TBB_machine_fetchadd4(P,V) #define __TBB_FetchAndStoreW(P,V) __TBB_machine_fetchstore4(P,V) #elif __TBB_WORDSIZE==8 #if __TBB_USE_GENERIC_DWORD_LOAD_STORE || __TBB_USE_GENERIC_DWORD_FETCH_ADD || __TBB_USE_GENERIC_DWORD_FETCH_STORE #error These macros should only be used on 32-bit platforms. #endif #define __TBB_CompareAndSwapW(P,V,C) __TBB_machine_cmpswp8(P,V,C) #define __TBB_FetchAndAddW(P,V) __TBB_machine_fetchadd8(P,V) #define __TBB_FetchAndStoreW(P,V) __TBB_machine_fetchstore8(P,V) #else /* __TBB_WORDSIZE != 8 */ #error Unsupported machine word size. #endif /* __TBB_WORDSIZE */ #ifndef __TBB_Pause inline void __TBB_Pause(int32_t) { __TBB_Yield(); } #endif namespace tbb { //! Sequentially consistent full memory fence. inline void atomic_fence () { __TBB_full_memory_fence(); } namespace internal { //< @cond INTERNAL //! Class that implements exponential backoff. /** See implementation of spin_wait_while_eq for an example. */ class atomic_backoff : no_copy { //! Time delay, in units of "pause" instructions. /** Should be equal to approximately the number of "pause" instructions that take the same time as an context switch. */ static const int32_t LOOPS_BEFORE_YIELD = 16; int32_t count; public: // In many cases, an object of this type is initialized eagerly on hot path, // as in for(atomic_backoff b; ; b.pause()) { /*loop body*/ } // For this reason, the construction cost must be very small! atomic_backoff() : count(1) {} // This constructor pauses immediately; do not use on hot paths! atomic_backoff( bool ) : count(1) { pause(); } //! Pause for a while. void pause() { if( count<=LOOPS_BEFORE_YIELD ) { __TBB_Pause(count); // Pause twice as long the next time. count*=2; } else { // Pause is so long that we might as well yield CPU to scheduler. __TBB_Yield(); } } // pause for a few times and then return false immediately. bool bounded_pause() { if( count<=LOOPS_BEFORE_YIELD ) { __TBB_Pause(count); // Pause twice as long the next time. count*=2; return true; } else { return false; } } void reset() { count = 1; } }; //! Spin WHILE the value of the variable is equal to a given value /** T and U should be comparable types. */ template void spin_wait_while_eq( const volatile T& location, U value ) { atomic_backoff backoff; while( location==value ) backoff.pause(); } //! Spin UNTIL the value of the variable is equal to a given value /** T and U should be comparable types. */ template void spin_wait_until_eq( const volatile T& location, const U value ) { atomic_backoff backoff; while( location!=value ) backoff.pause(); } template void spin_wait_while(predicate_type condition){ atomic_backoff backoff; while( condition() ) backoff.pause(); } //////////////////////////////////////////////////////////////////////////////// // Generic compare-and-swap applied to only a part of a machine word. // #ifndef __TBB_ENDIANNESS #define __TBB_ENDIANNESS __TBB_ENDIAN_DETECT #endif #if __TBB_USE_GENERIC_PART_WORD_CAS && __TBB_ENDIANNESS==__TBB_ENDIAN_UNSUPPORTED #error Generic implementation of part-word CAS may not be used with __TBB_ENDIAN_UNSUPPORTED #endif #if __TBB_ENDIANNESS!=__TBB_ENDIAN_UNSUPPORTED // // This function is the only use of __TBB_ENDIANNESS. // The following restrictions/limitations apply for this operation: // - T must be an integer type of at most 4 bytes for the casts and calculations to work // - T must also be less than 4 bytes to avoid compiler warnings when computing mask // (and for the operation to be useful at all, so no workaround is applied) // - the architecture must consistently use either little-endian or big-endian (same for all locations) // // TODO: static_assert for the type requirements stated above template inline T __TBB_MaskedCompareAndSwap (volatile T * const ptr, const T value, const T comparand ) { struct endianness{ static bool is_big_endian(){ #if __TBB_ENDIANNESS==__TBB_ENDIAN_DETECT const uint32_t probe = 0x03020100; return (((const char*)(&probe))[0]==0x03); #elif __TBB_ENDIANNESS==__TBB_ENDIAN_BIG || __TBB_ENDIANNESS==__TBB_ENDIAN_LITTLE return __TBB_ENDIANNESS==__TBB_ENDIAN_BIG; #else #error Unexpected value of __TBB_ENDIANNESS #endif }}; const uint32_t byte_offset = (uint32_t) ((uintptr_t)ptr & 0x3); volatile uint32_t * const aligned_ptr = (uint32_t*)((uintptr_t)ptr - byte_offset ); // location of T within uint32_t for a C++ shift operation const uint32_t bits_to_shift = 8*(endianness::is_big_endian() ? (4 - sizeof(T) - (byte_offset)) : byte_offset); const uint32_t mask = (((uint32_t)1<<(sizeof(T)*8)) - 1 )<> bits_to_shift); } else continue; // CAS failed but the bits of interest were not changed } } #endif // __TBB_ENDIANNESS!=__TBB_ENDIAN_UNSUPPORTED //////////////////////////////////////////////////////////////////////////////// template inline T __TBB_CompareAndSwapGeneric (volatile void *ptr, T value, T comparand ); template<> inline int8_t __TBB_CompareAndSwapGeneric <1,int8_t> (volatile void *ptr, int8_t value, int8_t comparand ) { #if __TBB_USE_GENERIC_PART_WORD_CAS return __TBB_MaskedCompareAndSwap((volatile int8_t *)ptr,value,comparand); #else return __TBB_machine_cmpswp1(ptr,value,comparand); #endif } template<> inline int16_t __TBB_CompareAndSwapGeneric <2,int16_t> (volatile void *ptr, int16_t value, int16_t comparand ) { #if __TBB_USE_GENERIC_PART_WORD_CAS return __TBB_MaskedCompareAndSwap((volatile int16_t *)ptr,value,comparand); #else return __TBB_machine_cmpswp2(ptr,value,comparand); #endif } template<> inline int32_t __TBB_CompareAndSwapGeneric <4,int32_t> (volatile void *ptr, int32_t value, int32_t comparand ) { // Cast shuts up /Wp64 warning return (int32_t)__TBB_machine_cmpswp4(ptr,value,comparand); } #if __TBB_64BIT_ATOMICS template<> inline int64_t __TBB_CompareAndSwapGeneric <8,int64_t> (volatile void *ptr, int64_t value, int64_t comparand ) { return __TBB_machine_cmpswp8(ptr,value,comparand); } #endif template inline T __TBB_FetchAndAddGeneric (volatile void *ptr, T addend) { T result; for( atomic_backoff b;;b.pause() ) { result = *reinterpret_cast(ptr); // __TBB_CompareAndSwapGeneric presumed to have full fence. if( __TBB_CompareAndSwapGeneric ( ptr, result+addend, result )==result ) break; } return result; } template inline T __TBB_FetchAndStoreGeneric (volatile void *ptr, T value) { T result; for( atomic_backoff b;;b.pause() ) { result = *reinterpret_cast(ptr); // __TBB_CompareAndSwapGeneric presumed to have full fence. if( __TBB_CompareAndSwapGeneric ( ptr, value, result )==result ) break; } return result; } #if __TBB_USE_GENERIC_PART_WORD_CAS #define __TBB_machine_cmpswp1 tbb::internal::__TBB_CompareAndSwapGeneric<1,int8_t> #define __TBB_machine_cmpswp2 tbb::internal::__TBB_CompareAndSwapGeneric<2,int16_t> #endif #if __TBB_USE_GENERIC_FETCH_ADD || __TBB_USE_GENERIC_PART_WORD_FETCH_ADD #define __TBB_machine_fetchadd1 tbb::internal::__TBB_FetchAndAddGeneric<1,int8_t> #define __TBB_machine_fetchadd2 tbb::internal::__TBB_FetchAndAddGeneric<2,int16_t> #endif #if __TBB_USE_GENERIC_FETCH_ADD #define __TBB_machine_fetchadd4 tbb::internal::__TBB_FetchAndAddGeneric<4,int32_t> #endif #if __TBB_USE_GENERIC_FETCH_ADD || __TBB_USE_GENERIC_DWORD_FETCH_ADD #define __TBB_machine_fetchadd8 tbb::internal::__TBB_FetchAndAddGeneric<8,int64_t> #endif #if __TBB_USE_GENERIC_FETCH_STORE || __TBB_USE_GENERIC_PART_WORD_FETCH_STORE #define __TBB_machine_fetchstore1 tbb::internal::__TBB_FetchAndStoreGeneric<1,int8_t> #define __TBB_machine_fetchstore2 tbb::internal::__TBB_FetchAndStoreGeneric<2,int16_t> #endif #if __TBB_USE_GENERIC_FETCH_STORE #define __TBB_machine_fetchstore4 tbb::internal::__TBB_FetchAndStoreGeneric<4,int32_t> #endif #if __TBB_USE_GENERIC_FETCH_STORE || __TBB_USE_GENERIC_DWORD_FETCH_STORE #define __TBB_machine_fetchstore8 tbb::internal::__TBB_FetchAndStoreGeneric<8,int64_t> #endif #if __TBB_USE_FETCHSTORE_AS_FULL_FENCED_STORE #define __TBB_MACHINE_DEFINE_ATOMIC_SELECTOR_FETCH_STORE(S) \ atomic_selector::word atomic_selector::fetch_store ( volatile void* location, word value ) { \ return __TBB_machine_fetchstore##S( location, value ); \ } __TBB_MACHINE_DEFINE_ATOMIC_SELECTOR_FETCH_STORE(1) __TBB_MACHINE_DEFINE_ATOMIC_SELECTOR_FETCH_STORE(2) __TBB_MACHINE_DEFINE_ATOMIC_SELECTOR_FETCH_STORE(4) __TBB_MACHINE_DEFINE_ATOMIC_SELECTOR_FETCH_STORE(8) #undef __TBB_MACHINE_DEFINE_ATOMIC_SELECTOR_FETCH_STORE #endif /* __TBB_USE_FETCHSTORE_AS_FULL_FENCED_STORE */ #if __TBB_USE_GENERIC_DWORD_LOAD_STORE /*TODO: find a more elegant way to handle function names difference*/ #if ! __TBB_USE_FENCED_ATOMICS /* This name forwarding is needed for generic implementation of * load8/store8 defined below (via macro) to pick the right CAS function*/ #define __TBB_machine_cmpswp8full_fence __TBB_machine_cmpswp8 #endif __TBB_MACHINE_DEFINE_LOAD8_GENERIC_FENCED(full_fence) __TBB_MACHINE_DEFINE_STORE8_GENERIC_FENCED(full_fence) #if ! __TBB_USE_FENCED_ATOMICS #undef __TBB_machine_cmpswp8full_fence #endif #define __TBB_machine_store8 tbb::internal::__TBB_machine_generic_store8full_fence #define __TBB_machine_load8 tbb::internal::__TBB_machine_generic_load8full_fence #endif /* __TBB_USE_GENERIC_DWORD_LOAD_STORE */ #if __TBB_USE_GENERIC_HALF_FENCED_LOAD_STORE /** Fenced operations use volatile qualifier to prevent compiler from optimizing them out, and on architectures with weak memory ordering to induce compiler to generate code with appropriate acquire/release semantics. On architectures like IA32, Intel64 (and likely Sparc TSO) volatile has no effect on code gen, and consistency helpers serve as a compiler fence (the latter being true for IA64/gcc as well to fix a bug in some gcc versions). This code assumes that the generated instructions will operate atomically, which typically requires a type that can be moved in a single instruction, cooperation from the compiler for effective use of such an instruction, and appropriate alignment of the data. **/ template struct machine_load_store { static T load_with_acquire ( const volatile T& location ) { T to_return = location; __TBB_acquire_consistency_helper(); return to_return; } static void store_with_release ( volatile T &location, T value ) { __TBB_release_consistency_helper(); location = value; } }; //in general, plain load and store of 32bit compiler is not atomic for 64bit types #if __TBB_WORDSIZE==4 && __TBB_64BIT_ATOMICS template struct machine_load_store { static T load_with_acquire ( const volatile T& location ) { return (T)__TBB_machine_load8( (const volatile void*)&location ); } static void store_with_release ( volatile T& location, T value ) { __TBB_machine_store8( (volatile void*)&location, (int64_t)value ); } }; #endif /* __TBB_WORDSIZE==4 && __TBB_64BIT_ATOMICS */ #endif /* __TBB_USE_GENERIC_HALF_FENCED_LOAD_STORE */ #if __TBB_USE_GENERIC_SEQUENTIAL_CONSISTENCY_LOAD_STORE template struct machine_load_store_seq_cst { static T load ( const volatile T& location ) { __TBB_full_memory_fence(); return machine_load_store::load_with_acquire( location ); } #if __TBB_USE_FETCHSTORE_AS_FULL_FENCED_STORE static void store ( volatile T &location, T value ) { atomic_selector::fetch_store( (volatile void*)&location, (typename atomic_selector::word)value ); } #else /* !__TBB_USE_FETCHSTORE_AS_FULL_FENCED_STORE */ static void store ( volatile T &location, T value ) { machine_load_store::store_with_release( location, value ); __TBB_full_memory_fence(); } #endif /* !__TBB_USE_FETCHSTORE_AS_FULL_FENCED_STORE */ }; #if __TBB_WORDSIZE==4 && __TBB_64BIT_ATOMICS /** The implementation does not use functions __TBB_machine_load8/store8 as they are not required to be sequentially consistent. **/ template struct machine_load_store_seq_cst { static T load ( const volatile T& location ) { // Comparand and new value may be anything, they only must be equal, and // the value should have a low probability to be actually found in 'location'. const int64_t anyvalue = 2305843009213693951LL; return __TBB_machine_cmpswp8( (volatile void*)const_cast(&location), anyvalue, anyvalue ); } static void store ( volatile T &location, T value ) { int64_t result = (volatile int64_t&)location; while ( __TBB_machine_cmpswp8((volatile void*)&location, (int64_t)value, result) != result ) result = (volatile int64_t&)location; } }; #endif /* __TBB_WORDSIZE==4 && __TBB_64BIT_ATOMICS */ #endif /*__TBB_USE_GENERIC_SEQUENTIAL_CONSISTENCY_LOAD_STORE */ #if __TBB_USE_GENERIC_RELAXED_LOAD_STORE // Relaxed operations add volatile qualifier to prevent compiler from optimizing them out. /** Volatile should not incur any additional cost on IA32, Intel64, and Sparc TSO architectures. However on architectures with weak memory ordering compiler may generate code with acquire/release semantics for operations on volatile data. **/ template struct machine_load_store_relaxed { static inline T load ( const volatile T& location ) { return location; } static inline void store ( volatile T& location, T value ) { location = value; } }; #if __TBB_WORDSIZE==4 && __TBB_64BIT_ATOMICS template struct machine_load_store_relaxed { static inline T load ( const volatile T& location ) { return (T)__TBB_machine_load8( (const volatile void*)&location ); } static inline void store ( volatile T& location, T value ) { __TBB_machine_store8( (volatile void*)&location, (int64_t)value ); } }; #endif /* __TBB_WORDSIZE==4 && __TBB_64BIT_ATOMICS */ #endif /* __TBB_USE_GENERIC_RELAXED_LOAD_STORE */ #undef __TBB_WORDSIZE //this macro is forbidden to use outside of atomic machinery template inline T __TBB_load_with_acquire(const volatile T &location) { return machine_load_store::load_with_acquire( location ); } template inline void __TBB_store_with_release(volatile T& location, V value) { machine_load_store::store_with_release( location, T(value) ); } //! Overload that exists solely to avoid /Wp64 warnings. inline void __TBB_store_with_release(volatile size_t& location, size_t value) { machine_load_store::store_with_release( location, value ); } template inline T __TBB_load_full_fence(const volatile T &location) { return machine_load_store_seq_cst::load( location ); } template inline void __TBB_store_full_fence(volatile T& location, V value) { machine_load_store_seq_cst::store( location, T(value) ); } //! Overload that exists solely to avoid /Wp64 warnings. inline void __TBB_store_full_fence(volatile size_t& location, size_t value) { machine_load_store_seq_cst::store( location, value ); } template inline T __TBB_load_relaxed (const volatile T& location) { return machine_load_store_relaxed::load( const_cast(location) ); } template inline void __TBB_store_relaxed ( volatile T& location, V value ) { machine_load_store_relaxed::store( const_cast(location), T(value) ); } //! Overload that exists solely to avoid /Wp64 warnings. inline void __TBB_store_relaxed ( volatile size_t& location, size_t value ) { machine_load_store_relaxed::store( const_cast(location), value ); } // Macro __TBB_TypeWithAlignmentAtLeastAsStrict(T) should be a type with alignment at least as // strict as type T. The type should have a trivial default constructor and destructor, so that // arrays of that type can be declared without initializers. // It is correct (but perhaps a waste of space) if __TBB_TypeWithAlignmentAtLeastAsStrict(T) expands // to a type bigger than T. // The default definition here works on machines where integers are naturally aligned and the // strictest alignment is 64. #ifndef __TBB_TypeWithAlignmentAtLeastAsStrict #if __TBB_ATTRIBUTE_ALIGNED_PRESENT #define __TBB_DefineTypeWithAlignment(PowerOf2) \ struct __TBB_machine_type_with_alignment_##PowerOf2 { \ uint32_t member[PowerOf2/sizeof(uint32_t)]; \ } __attribute__((aligned(PowerOf2))); #define __TBB_alignof(T) __alignof__(T) #elif __TBB_DECLSPEC_ALIGN_PRESENT #define __TBB_DefineTypeWithAlignment(PowerOf2) \ __declspec(align(PowerOf2)) \ struct __TBB_machine_type_with_alignment_##PowerOf2 { \ uint32_t member[PowerOf2/sizeof(uint32_t)]; \ }; #define __TBB_alignof(T) __alignof(T) #else /* A compiler with unknown syntax for data alignment */ #error Must define __TBB_TypeWithAlignmentAtLeastAsStrict(T) #endif /* Now declare types aligned to useful powers of two */ // TODO: Is __TBB_DefineTypeWithAlignment(8) needed on 32 bit platforms? __TBB_DefineTypeWithAlignment(16) __TBB_DefineTypeWithAlignment(32) __TBB_DefineTypeWithAlignment(64) typedef __TBB_machine_type_with_alignment_64 __TBB_machine_type_with_strictest_alignment; // Primary template is a declaration of incomplete type so that it fails with unknown alignments template struct type_with_alignment; // Specializations for allowed alignments template<> struct type_with_alignment<1> { char member; }; template<> struct type_with_alignment<2> { uint16_t member; }; template<> struct type_with_alignment<4> { uint32_t member; }; template<> struct type_with_alignment<8> { uint64_t member; }; template<> struct type_with_alignment<16> {__TBB_machine_type_with_alignment_16 member; }; template<> struct type_with_alignment<32> {__TBB_machine_type_with_alignment_32 member; }; template<> struct type_with_alignment<64> {__TBB_machine_type_with_alignment_64 member; }; #if __TBB_ALIGNOF_NOT_INSTANTIATED_TYPES_BROKEN //! Work around for bug in GNU 3.2 and MSVC compilers. /** Bug is that compiler sometimes returns 0 for __alignof(T) when T has not yet been instantiated. The work-around forces instantiation by forcing computation of sizeof(T) before __alignof(T). */ template struct work_around_alignment_bug { static const size_t alignment = __TBB_alignof(T); }; #define __TBB_TypeWithAlignmentAtLeastAsStrict(T) tbb::internal::type_with_alignment::alignment> #else #define __TBB_TypeWithAlignmentAtLeastAsStrict(T) tbb::internal::type_with_alignment<__TBB_alignof(T)> #endif /* __TBB_ALIGNOF_NOT_INSTANTIATED_TYPES_BROKEN */ #endif /* __TBB_TypeWithAlignmentAtLeastAsStrict */ // Template class here is to avoid instantiation of the static data for modules that don't use it template struct reverse { static const T byte_table[256]; }; // An efficient implementation of the reverse function utilizes a 2^8 lookup table holding the bit-reversed // values of [0..2^8 - 1]. Those values can also be computed on the fly at a slightly higher cost. template const T reverse::byte_table[256] = { 0x00, 0x80, 0x40, 0xC0, 0x20, 0xA0, 0x60, 0xE0, 0x10, 0x90, 0x50, 0xD0, 0x30, 0xB0, 0x70, 0xF0, 0x08, 0x88, 0x48, 0xC8, 0x28, 0xA8, 0x68, 0xE8, 0x18, 0x98, 0x58, 0xD8, 0x38, 0xB8, 0x78, 0xF8, 0x04, 0x84, 0x44, 0xC4, 0x24, 0xA4, 0x64, 0xE4, 0x14, 0x94, 0x54, 0xD4, 0x34, 0xB4, 0x74, 0xF4, 0x0C, 0x8C, 0x4C, 0xCC, 0x2C, 0xAC, 0x6C, 0xEC, 0x1C, 0x9C, 0x5C, 0xDC, 0x3C, 0xBC, 0x7C, 0xFC, 0x02, 0x82, 0x42, 0xC2, 0x22, 0xA2, 0x62, 0xE2, 0x12, 0x92, 0x52, 0xD2, 0x32, 0xB2, 0x72, 0xF2, 0x0A, 0x8A, 0x4A, 0xCA, 0x2A, 0xAA, 0x6A, 0xEA, 0x1A, 0x9A, 0x5A, 0xDA, 0x3A, 0xBA, 0x7A, 0xFA, 0x06, 0x86, 0x46, 0xC6, 0x26, 0xA6, 0x66, 0xE6, 0x16, 0x96, 0x56, 0xD6, 0x36, 0xB6, 0x76, 0xF6, 0x0E, 0x8E, 0x4E, 0xCE, 0x2E, 0xAE, 0x6E, 0xEE, 0x1E, 0x9E, 0x5E, 0xDE, 0x3E, 0xBE, 0x7E, 0xFE, 0x01, 0x81, 0x41, 0xC1, 0x21, 0xA1, 0x61, 0xE1, 0x11, 0x91, 0x51, 0xD1, 0x31, 0xB1, 0x71, 0xF1, 0x09, 0x89, 0x49, 0xC9, 0x29, 0xA9, 0x69, 0xE9, 0x19, 0x99, 0x59, 0xD9, 0x39, 0xB9, 0x79, 0xF9, 0x05, 0x85, 0x45, 0xC5, 0x25, 0xA5, 0x65, 0xE5, 0x15, 0x95, 0x55, 0xD5, 0x35, 0xB5, 0x75, 0xF5, 0x0D, 0x8D, 0x4D, 0xCD, 0x2D, 0xAD, 0x6D, 0xED, 0x1D, 0x9D, 0x5D, 0xDD, 0x3D, 0xBD, 0x7D, 0xFD, 0x03, 0x83, 0x43, 0xC3, 0x23, 0xA3, 0x63, 0xE3, 0x13, 0x93, 0x53, 0xD3, 0x33, 0xB3, 0x73, 0xF3, 0x0B, 0x8B, 0x4B, 0xCB, 0x2B, 0xAB, 0x6B, 0xEB, 0x1B, 0x9B, 0x5B, 0xDB, 0x3B, 0xBB, 0x7B, 0xFB, 0x07, 0x87, 0x47, 0xC7, 0x27, 0xA7, 0x67, 0xE7, 0x17, 0x97, 0x57, 0xD7, 0x37, 0xB7, 0x77, 0xF7, 0x0F, 0x8F, 0x4F, 0xCF, 0x2F, 0xAF, 0x6F, 0xEF, 0x1F, 0x9F, 0x5F, 0xDF, 0x3F, 0xBF, 0x7F, 0xFF }; } // namespace internal @endcond } // namespace tbb // Preserving access to legacy APIs using tbb::internal::__TBB_load_with_acquire; using tbb::internal::__TBB_store_with_release; // Mapping historically used names to the ones expected by atomic_load_store_traits #define __TBB_load_acquire __TBB_load_with_acquire #define __TBB_store_release __TBB_store_with_release #ifndef __TBB_Log2 inline intptr_t __TBB_Log2( uintptr_t x ) { if( x==0 ) return -1; intptr_t result = 0; #if !defined(_M_ARM) uintptr_t tmp; if( sizeof(x)>4 && (tmp = ((uint64_t)x)>>32) ) { x=tmp; result += 32; } #endif if( uintptr_t tmp = x>>16 ) { x=tmp; result += 16; } if( uintptr_t tmp = x>>8 ) { x=tmp; result += 8; } if( uintptr_t tmp = x>>4 ) { x=tmp; result += 4; } if( uintptr_t tmp = x>>2 ) { x=tmp; result += 2; } return (x&2)? result+1: result; } #endif #ifndef __TBB_AtomicOR inline void __TBB_AtomicOR( volatile void *operand, uintptr_t addend ) { for( tbb::internal::atomic_backoff b;;b.pause() ) { uintptr_t tmp = *(volatile uintptr_t *)operand; uintptr_t result = __TBB_CompareAndSwapW(operand, tmp|addend, tmp); if( result==tmp ) break; } } #endif #ifndef __TBB_AtomicAND inline void __TBB_AtomicAND( volatile void *operand, uintptr_t addend ) { for( tbb::internal::atomic_backoff b;;b.pause() ) { uintptr_t tmp = *(volatile uintptr_t *)operand; uintptr_t result = __TBB_CompareAndSwapW(operand, tmp&addend, tmp); if( result==tmp ) break; } } #endif #if __TBB_PREFETCHING #ifndef __TBB_cl_prefetch #error This platform does not define cache management primitives required for __TBB_PREFETCHING #endif #ifndef __TBB_cl_evict #define __TBB_cl_evict(p) #endif #endif #ifndef __TBB_Flag typedef unsigned char __TBB_Flag; #endif typedef __TBB_atomic __TBB_Flag __TBB_atomic_flag; #ifndef __TBB_TryLockByte inline bool __TBB_TryLockByte( __TBB_atomic_flag &flag ) { return __TBB_machine_cmpswp1(&flag,1,0)==0; } #endif #ifndef __TBB_LockByte inline __TBB_Flag __TBB_LockByte( __TBB_atomic_flag& flag ) { tbb::internal::atomic_backoff backoff; while( !__TBB_TryLockByte(flag) ) backoff.pause(); return 0; } #endif #ifndef __TBB_UnlockByte #define __TBB_UnlockByte(addr) __TBB_store_with_release((addr),0) #endif // lock primitives with TSX #if ( __TBB_x86_32 || __TBB_x86_64 ) /* only on ia32/intel64 */ inline void __TBB_TryLockByteElidedCancel() { __TBB_machine_try_lock_elided_cancel(); } inline bool __TBB_TryLockByteElided( __TBB_atomic_flag& flag ) { bool res = __TBB_machine_try_lock_elided( &flag )!=0; // to avoid the "lemming" effect, we need to abort the transaction // if __TBB_machine_try_lock_elided returns false (i.e., someone else // has acquired the mutex non-speculatively). if( !res ) __TBB_TryLockByteElidedCancel(); return res; } inline void __TBB_LockByteElided( __TBB_atomic_flag& flag ) { for(;;) { tbb::internal::spin_wait_while_eq( flag, 1 ); if( __TBB_machine_try_lock_elided( &flag ) ) return; // Another thread acquired the lock "for real". // To avoid the "lemming" effect, we abort the transaction. __TBB_TryLockByteElidedCancel(); } } inline void __TBB_UnlockByteElided( __TBB_atomic_flag& flag ) { __TBB_machine_unlock_elided( &flag ); } #endif #ifndef __TBB_ReverseByte inline unsigned char __TBB_ReverseByte(unsigned char src) { return tbb::internal::reverse::byte_table[src]; } #endif template T __TBB_ReverseBits(T src) { T dst; unsigned char *original = (unsigned char *) &src; unsigned char *reversed = (unsigned char *) &dst; for( int i = sizeof(T)-1; i >= 0; i-- ) reversed[i] = __TBB_ReverseByte( original[sizeof(T)-i-1] ); return dst; } #endif /* __TBB_machine_H */ ================================================ FILE: benchmarks/tbb/tbb_main.cpp ================================================ /* Copyright 2005-2014 Intel Corporation. All Rights Reserved. This file is part of Threading Building Blocks. Threading Building Blocks is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. Threading Building Blocks is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Threading Building Blocks; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA As a special exception, you may use this file as part of a free software library without restriction. Specifically, if other files instantiate templates or use macros or inline functions from this file, or you compile this file and link it with other files to produce an executable, this file does not by itself cause the resulting executable to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the executable file might be covered by the GNU General Public License. */ #include "tbb/tbb_config.h" #include "tbb_main.h" #include "governor.h" #include "market.h" #include "tbb_misc.h" #include "itt_notify.h" namespace tbb { namespace internal { //------------------------------------------------------------------------ // Begin shared data layout. // The following global data items are mostly read-only after initialization. //------------------------------------------------------------------------ //! Padding in order to prevent false sharing. static const char _pad[NFS_MaxLineSize - sizeof(int)] = {}; //------------------------------------------------------------------------ // governor data basic_tls governor::theTLS; unsigned governor::DefaultNumberOfThreads; rml::tbb_factory governor::theRMLServerFactory; bool governor::UsePrivateRML; const task_scheduler_init *governor::BlockingTSI; #if TBB_USE_ASSERT bool governor::IsBlockingTerminationInProgress; #endif bool governor::is_speculation_enabled; //------------------------------------------------------------------------ // market data market* market::theMarket; market::global_market_mutex_type market::theMarketMutex; //------------------------------------------------------------------------ // One time initialization data //! Counter of references to global shared resources such as TLS. atomic __TBB_InitOnce::count; __TBB_atomic_flag __TBB_InitOnce::InitializationLock; //! Flag that is set to true after one-time initializations are done. bool __TBB_InitOnce::InitializationDone; #if DO_ITT_NOTIFY static bool ITT_Present; static bool ITT_InitializationDone; #endif #if !(_WIN32||_WIN64) || __TBB_SOURCE_DIRECTLY_INCLUDED static __TBB_InitOnce __TBB_InitOnceHiddenInstance; #endif //------------------------------------------------------------------------ // generic_scheduler data //! Pointer to the scheduler factory function generic_scheduler* (*AllocateSchedulerPtr)( arena*, size_t index ); #if __TBB_OLD_PRIMES_RNG //! Table of primes used by fast random-number generator (FastRandom). /** Also serves to keep anything else from being placed in the same cache line as the global data items preceding it. */ static const unsigned Primes[] = { 0x9e3779b1, 0xffe6cc59, 0x2109f6dd, 0x43977ab5, 0xba5703f5, 0xb495a877, 0xe1626741, 0x79695e6b, 0xbc98c09f, 0xd5bee2b3, 0x287488f9, 0x3af18231, 0x9677cd4d, 0xbe3a6929, 0xadc6a877, 0xdcf0674b, 0xbe4d6fe9, 0x5f15e201, 0x99afc3fd, 0xf3f16801, 0xe222cfff, 0x24ba5fdb, 0x0620452d, 0x79f149e3, 0xc8b93f49, 0x972702cd, 0xb07dd827, 0x6c97d5ed, 0x085a3d61, 0x46eb5ea7, 0x3d9910ed, 0x2e687b5b, 0x29609227, 0x6eb081f1, 0x0954c4e1, 0x9d114db9, 0x542acfa9, 0xb3e6bd7b, 0x0742d917, 0xe9f3ffa7, 0x54581edb, 0xf2480f45, 0x0bb9288f, 0xef1affc7, 0x85fa0ca7, 0x3ccc14db, 0xe6baf34b, 0x343377f7, 0x5ca19031, 0xe6d9293b, 0xf0a9f391, 0x5d2e980b, 0xfc411073, 0xc3749363, 0xb892d829, 0x3549366b, 0x629750ad, 0xb98294e5, 0x892d9483, 0xc235baf3, 0x3d2402a3, 0x6bdef3c9, 0xbec333cd, 0x40c9520f }; //------------------------------------------------------------------------ // End of shared data layout //------------------------------------------------------------------------ //------------------------------------------------------------------------ // Shared data accessors //------------------------------------------------------------------------ unsigned GetPrime ( unsigned seed ) { return Primes[seed%(sizeof(Primes)/sizeof(Primes[0]))]; } #endif //__TBB_OLD_PRIMES_RNG //------------------------------------------------------------------------ // __TBB_InitOnce //------------------------------------------------------------------------ void __TBB_InitOnce::add_ref() { if( ++count==1 ) governor::acquire_resources(); } void __TBB_InitOnce::remove_ref() { int k = --count; __TBB_ASSERT(k>=0,"removed __TBB_InitOnce ref that was not added?"); if( k==0 ) { governor::release_resources(); ITT_FINI_ITTLIB(); } } //------------------------------------------------------------------------ // One-time Initializations //------------------------------------------------------------------------ //! Defined in cache_aligned_allocator.cpp void initialize_cache_aligned_allocator(); //! Defined in scheduler.cpp void Scheduler_OneTimeInitialization ( bool itt_present ); #if DO_ITT_NOTIFY #if __TBB_ITT_STRUCTURE_API static __itt_domain *fgt_domain = NULL; struct resource_string { const char *str; __itt_string_handle *itt_str_handle; }; // // populate resource strings // #define TBB_STRING_RESOURCE( index_name, str ) { str, NULL }, static resource_string strings_for_itt[] = { #include "tbb/internal/_tbb_strings.h" { "num_resource_strings", NULL } }; #undef TBB_STRING_RESOURCE static __itt_string_handle *ITT_get_string_handle(int idx) { __TBB_ASSERT(idx >= 0, NULL); return idx < NUM_STRINGS ? strings_for_itt[idx].itt_str_handle : NULL; } static void ITT_init_domains() { fgt_domain = __itt_domain_create( _T("tbb.flow") ); fgt_domain->flags = 1; } static void ITT_init_strings() { for ( int i = 0; i < NUM_STRINGS; ++i ) { #if _WIN32||_WIN64 strings_for_itt[i].itt_str_handle = __itt_string_handle_createA( strings_for_itt[i].str ); #else strings_for_itt[i].itt_str_handle = __itt_string_handle_create( strings_for_itt[i].str ); #endif } } static void ITT_init() { ITT_init_domains(); ITT_init_strings(); } #endif // __TBB_ITT_STRUCTURE_API /** Thread-unsafe lazy one-time initialization of tools interop. Used by both dummy handlers and general TBB one-time initialization routine. **/ void ITT_DoUnsafeOneTimeInitialization () { if ( !ITT_InitializationDone ) { ITT_Present = (__TBB_load_ittnotify()!=0); #if __TBB_ITT_STRUCTURE_API if (ITT_Present) ITT_init(); #endif ITT_InitializationDone = true; ITT_SYNC_CREATE(&market::theMarketMutex, SyncType_GlobalLock, SyncObj_SchedulerInitialization); } } /** Thread-safe lazy one-time initialization of tools interop. Used by dummy handlers only. **/ extern "C" void ITT_DoOneTimeInitialization() { __TBB_InitOnce::lock(); ITT_DoUnsafeOneTimeInitialization(); __TBB_InitOnce::unlock(); } #endif /* DO_ITT_NOTIFY */ //! Performs thread-safe lazy one-time general TBB initialization. void DoOneTimeInitializations() { suppress_unused_warning(_pad); __TBB_InitOnce::lock(); // No fence required for load of InitializationDone, because we are inside a critical section. if( !__TBB_InitOnce::InitializationDone ) { __TBB_InitOnce::add_ref(); if( GetBoolEnvironmentVariable("TBB_VERSION") ) PrintVersion(); bool itt_present = false; #if DO_ITT_NOTIFY ITT_DoUnsafeOneTimeInitialization(); itt_present = ITT_Present; #endif /* DO_ITT_NOTIFY */ initialize_cache_aligned_allocator(); governor::initialize_rml_factory(); Scheduler_OneTimeInitialization( itt_present ); // Force processor groups support detection governor::default_num_threads(); // Dump version data governor::print_version_info(); PrintExtraVersionInfo( "Tools support", itt_present ? "enabled" : "disabled" ); __TBB_InitOnce::InitializationDone = true; } __TBB_InitOnce::unlock(); } #if (_WIN32||_WIN64) && !__TBB_SOURCE_DIRECTLY_INCLUDED //! Windows "DllMain" that handles startup and shutdown of dynamic library. extern "C" bool WINAPI DllMain( HANDLE /*hinstDLL*/, DWORD reason, LPVOID /*lpvReserved*/ ) { switch( reason ) { case DLL_PROCESS_ATTACH: __TBB_InitOnce::add_ref(); break; case DLL_PROCESS_DETACH: __TBB_InitOnce::remove_ref(); // It is assumed that InitializationDone is not set after DLL_PROCESS_DETACH, // and thus no race on InitializationDone is possible. if( __TBB_InitOnce::initialization_done() ) { // Remove reference that we added in DoOneTimeInitializations. __TBB_InitOnce::remove_ref(); } break; case DLL_THREAD_DETACH: governor::terminate_auto_initialized_scheduler(); break; } return true; } #endif /* (_WIN32||_WIN64) && !__TBB_SOURCE_DIRECTLY_INCLUDED */ void itt_store_pointer_with_release_v3( void* dst, void* src ) { ITT_NOTIFY(sync_releasing, dst); __TBB_store_with_release(*static_cast(dst),src); } void* itt_load_pointer_with_acquire_v3( const void* src ) { void* result = __TBB_load_with_acquire(*static_cast(src)); ITT_NOTIFY(sync_acquired, const_cast(src)); return result; } #if DO_ITT_NOTIFY void call_itt_notify_v5(int t, void *ptr) { switch (t) { case 0: ITT_NOTIFY(sync_prepare, ptr); break; case 1: ITT_NOTIFY(sync_cancel, ptr); break; case 2: ITT_NOTIFY(sync_acquired, ptr); break; case 3: ITT_NOTIFY(sync_releasing, ptr); break; } } #else void call_itt_notify_v5(int /*t*/, void* /*ptr*/) {} #endif #if __TBB_ITT_STRUCTURE_API #if DO_ITT_NOTIFY const __itt_id itt_null_id = {0, 0, 0}; static inline __itt_domain* get_itt_domain( itt_domain_enum idx ) { return ( idx == ITT_DOMAIN_FLOW ) ? fgt_domain : NULL; } static inline void itt_id_make(__itt_id *id, void* addr, unsigned long long extra) { *id = __itt_id_make(addr, extra); } static inline void itt_id_create(const __itt_domain *domain, __itt_id id) { ITTNOTIFY_VOID_D1(id_create, domain, id); } void itt_make_task_group_v7( itt_domain_enum domain, void *group, unsigned long long group_extra, void *parent, unsigned long long parent_extra, string_index name_index ) { if ( __itt_domain *d = get_itt_domain( domain ) ) { __itt_id group_id = itt_null_id; __itt_id parent_id = itt_null_id; itt_id_make( &group_id, group, group_extra ); itt_id_create( d, group_id ); if ( parent ) { itt_id_make( &parent_id, parent, parent_extra ); } __itt_string_handle *n = ITT_get_string_handle(name_index); ITTNOTIFY_VOID_D3(task_group, d, group_id, parent_id, n); } } void itt_metadata_str_add_v7( itt_domain_enum domain, void *addr, unsigned long long addr_extra, string_index key, const char *value ) { if ( __itt_domain *d = get_itt_domain( domain ) ) { __itt_id id = itt_null_id; itt_id_make( &id, addr, addr_extra ); __itt_string_handle *k = ITT_get_string_handle(key); size_t value_length = strlen( value ); #if _WIN32||_WIN64 ITTNOTIFY_VOID_D4(metadata_str_addA, d, id, k, value, value_length); #else ITTNOTIFY_VOID_D4(metadata_str_add, d, id, k, value, value_length); #endif } } void itt_relation_add_v7( itt_domain_enum domain, void *addr0, unsigned long long addr0_extra, itt_relation relation, void *addr1, unsigned long long addr1_extra ) { if ( __itt_domain *d = get_itt_domain( domain ) ) { __itt_id id0 = itt_null_id; __itt_id id1 = itt_null_id; itt_id_make( &id0, addr0, addr0_extra ); itt_id_make( &id1, addr1, addr1_extra ); ITTNOTIFY_VOID_D3(relation_add, d, id0, (__itt_relation)relation, id1); } } void itt_task_begin_v7( itt_domain_enum domain, void *task, unsigned long long task_extra, void *parent, unsigned long long parent_extra, string_index /* name_index */ ) { if ( __itt_domain *d = get_itt_domain( domain ) ) { __itt_id task_id = itt_null_id; __itt_id parent_id = itt_null_id; itt_id_make( &task_id, task, task_extra ); if ( parent ) { itt_id_make( &parent_id, parent, parent_extra ); } ITTNOTIFY_VOID_D3(task_begin, d, task_id, parent_id, NULL ); } } void itt_task_end_v7( itt_domain_enum domain ) { if ( __itt_domain *d = get_itt_domain( domain ) ) { ITTNOTIFY_VOID_D0(task_end, d); } } #else // DO_ITT_NOTIFY void itt_make_task_group_v7( itt_domain_enum domain, void *group, unsigned long long group_extra, void *parent, unsigned long long parent_extra, string_index name_index ) { } void itt_metadata_str_add_v7( itt_domain_enum domain, void *addr, unsigned long long addr_extra, string_index key, const char *value ) { } void itt_relation_add_v7( itt_domain_enum domain, void *addr0, unsigned long long addr0_extra, itt_relation relation, void *addr1, unsigned long long addr1_extra ) { } void itt_task_begin_v7( itt_domain_enum domain, void *task, unsigned long long task_extra, void * /*parent*/, unsigned long long /* parent_extra */, string_index /* name_index */ ) { } void itt_task_end_v7( itt_domain_enum domain ) { } #endif // DO_ITT_NOTIFY #endif // __TBB_ITT_STRUCTURE_API void* itt_load_pointer_v3( const void* src ) { //TODO: replace this with __TBB_load_relaxed void* result = *static_cast(src); return result; } void itt_set_sync_name_v3( void* obj, const tchar* name) { ITT_SYNC_RENAME(obj, name); suppress_unused_warning(obj && name); } } // namespace internal } // namespace tbb ================================================ FILE: benchmarks/tbb/tbb_main.h ================================================ /* Copyright 2005-2014 Intel Corporation. All Rights Reserved. This file is part of Threading Building Blocks. Threading Building Blocks is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. Threading Building Blocks is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Threading Building Blocks; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA As a special exception, you may use this file as part of a free software library without restriction. Specifically, if other files instantiate templates or use macros or inline functions from this file, or you compile this file and link it with other files to produce an executable, this file does not by itself cause the resulting executable to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the executable file might be covered by the GNU General Public License. */ #ifndef _TBB_tbb_main_H #define _TBB_tbb_main_H #include "tbb/atomic.h" namespace tbb { namespace internal { void DoOneTimeInitializations (); //------------------------------------------------------------------------ // __TBB_InitOnce //------------------------------------------------------------------------ //! Class that supports TBB initialization. /** It handles acquisition and release of global resources (e.g. TLS) during startup and shutdown, as well as synchronization for DoOneTimeInitializations. */ class __TBB_InitOnce { friend void DoOneTimeInitializations(); friend void ITT_DoUnsafeOneTimeInitialization (); static atomic count; //! Platform specific code to acquire resources. static void acquire_resources(); //! Platform specific code to release resources. static void release_resources(); //! Specifies if the one-time initializations has been done. static bool InitializationDone; //! Global initialization lock /** Scenarios are possible when tools interop has to be initialized before the TBB itself. This imposes a requirement that the global initialization lock has to support valid static initialization, and does not issue any tool notifications in any build mode. **/ static __TBB_atomic_flag InitializationLock; public: static void lock() { __TBB_LockByte( InitializationLock ); } static void unlock() { __TBB_UnlockByte( InitializationLock ); } static bool initialization_done() { return __TBB_load_with_acquire(InitializationDone); } //! Add initial reference to resources. /** We assume that dynamic loading of the library prevents any other threads from entering the library until this constructor has finished running. **/ __TBB_InitOnce() { add_ref(); } //! Remove the initial reference to resources. /** This is not necessarily the last reference if other threads are still running. **/ ~__TBB_InitOnce() { remove_ref(); // We assume that InitializationDone is not set after file-scope destructors // start running, and thus no race on InitializationDone is possible. if( initialization_done() ) { // Remove an extra reference that was added in DoOneTimeInitializations. remove_ref(); } } //! Add reference to resources. If first reference added, acquire the resources. static void add_ref(); //! Remove reference to resources. If last reference removed, release the resources. static void remove_ref(); }; // class __TBB_InitOnce } // namespace internal } // namespace tbb #endif /* _TBB_tbb_main_H */ ================================================ FILE: benchmarks/tbb/tbb_misc.cpp ================================================ /* Copyright 2005-2014 Intel Corporation. All Rights Reserved. This file is part of Threading Building Blocks. Threading Building Blocks is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. Threading Building Blocks is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Threading Building Blocks; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA As a special exception, you may use this file as part of a free software library without restriction. Specifically, if other files instantiate templates or use macros or inline functions from this file, or you compile this file and link it with other files to produce an executable, this file does not by itself cause the resulting executable to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the executable file might be covered by the GNU General Public License. */ // Source file for miscellaneous entities that are infrequently referenced by // an executing program. #include "tbb/tbb_stddef.h" #include "tbb_assert_impl.h" // Out-of-line TBB assertion handling routines are instantiated here. #include "tbb/tbb_exception.h" #include "tbb/tbb_machine.h" #include "tbb_misc.h" #include #include #include #if _WIN32||_WIN64 #include "tbb/machine/windows_api.h" #endif #if !TBB_USE_EXCEPTIONS && _MSC_VER // Suppress "C++ exception handler used, but unwind semantics are not enabled" warning in STL headers #pragma warning (push) #pragma warning (disable: 4530) #endif #include #if !TBB_USE_EXCEPTIONS && _MSC_VER #pragma warning (pop) #endif using namespace std; namespace tbb { const char* bad_last_alloc::what() const throw() { return "bad allocation in previous or concurrent attempt"; } const char* improper_lock::what() const throw() { return "attempted recursive lock on critical section or non-recursive mutex"; } const char* user_abort::what() const throw() { return "User-initiated abort has terminated this operation"; } const char* invalid_multiple_scheduling::what() const throw() { return "The same task_handle object cannot be executed more than once"; } const char* missing_wait::what() const throw() { return "wait() was not called on the structured_task_group"; } namespace internal { #if TBB_USE_EXCEPTIONS #define DO_THROW(exc, init_args) throw exc init_args; #else /* !TBB_USE_EXCEPTIONS */ #define PRINT_ERROR_AND_ABORT(exc_name, msg) \ fprintf (stderr, "Exception %s with message %s would've been thrown, " \ "if exception handling were not disabled. Aborting.\n", exc_name, msg); \ fflush(stderr); \ abort(); #define DO_THROW(exc, init_args) PRINT_ERROR_AND_ABORT(#exc, #init_args) #endif /* !TBB_USE_EXCEPTIONS */ /* The "what" should be fairly short, not more than about 128 characters. Because we control all the call sites to handle_perror, it is pointless to bullet-proof it for very long strings. Design note: ADR put this routine off to the side in tbb_misc.cpp instead of Task.cpp because the throw generates a pathetic lot of code, and ADR wanted this large chunk of code to be placed on a cold page. */ void handle_perror( int error_code, const char* what ) { char buf[256]; #if _MSC_VER #define snprintf _snprintf #endif int written = snprintf(buf, sizeof(buf), "%s: %s", what, strerror( error_code )); // On overflow, the returned value exceeds sizeof(buf) (for GLIBC) or is negative (for MSVC). __TBB_ASSERT_EX( written>0 && written<(int)sizeof(buf), "Error description is too long" ); // Ensure that buffer ends in terminator. buf[sizeof(buf)-1] = 0; #if TBB_USE_EXCEPTIONS throw runtime_error(buf); #else PRINT_ERROR_AND_ABORT( "runtime_error", buf); #endif /* !TBB_USE_EXCEPTIONS */ } #if _WIN32||_WIN64 void handle_win_error( int error_code ) { char buf[512]; #if !__TBB_WIN8UI_SUPPORT FormatMessageA( FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, NULL, error_code, 0, buf, sizeof(buf), NULL ); #else //TODO: update with right replacement for FormatMessageA sprintf_s((char*)&buf, 512, "error code %d", error_code); #endif #if TBB_USE_EXCEPTIONS throw runtime_error(buf); #else PRINT_ERROR_AND_ABORT( "runtime_error", buf); #endif /* !TBB_USE_EXCEPTIONS */ } #endif // _WIN32||_WIN64 void throw_bad_last_alloc_exception_v4() { throw_exception_v4(eid_bad_last_alloc); } void throw_exception_v4 ( exception_id eid ) { __TBB_ASSERT ( eid > 0 && eid < eid_max, "Unknown exception ID" ); switch ( eid ) { case eid_bad_alloc: DO_THROW( bad_alloc, () ); case eid_bad_last_alloc: DO_THROW( bad_last_alloc, () ); case eid_nonpositive_step: DO_THROW( invalid_argument, ("Step must be positive") ); case eid_out_of_range: DO_THROW( out_of_range, ("Index out of requested size range") ); case eid_segment_range_error: DO_THROW( range_error, ("Index out of allocated segment slots") ); case eid_index_range_error: DO_THROW( range_error, ("Index is not allocated") ); case eid_missing_wait: DO_THROW( missing_wait, () ); case eid_invalid_multiple_scheduling: DO_THROW( invalid_multiple_scheduling, () ); case eid_improper_lock: DO_THROW( improper_lock, () ); case eid_possible_deadlock: DO_THROW( runtime_error, ("Resource deadlock would occur") ); case eid_operation_not_permitted: DO_THROW( runtime_error, ("Operation not permitted") ); case eid_condvar_wait_failed: DO_THROW( runtime_error, ("Wait on condition variable failed") ); case eid_invalid_load_factor: DO_THROW( out_of_range, ("Invalid hash load factor") ); case eid_reserved: DO_THROW( out_of_range, ("[backward compatibility] Invalid number of buckets") ); case eid_invalid_swap: DO_THROW( invalid_argument, ("swap() is invalid on non-equal allocators") ); case eid_reservation_length_error: DO_THROW( length_error, ("reservation size exceeds permitted max size") ); case eid_invalid_key: DO_THROW( out_of_range, ("invalid key") ); case eid_user_abort: DO_THROW( user_abort, () ); case eid_bad_tagged_msg_cast: DO_THROW( runtime_error, ("Illegal tagged_msg cast") ); #if __TBB_SUPPORTS_WORKERS_WAITING_IN_TERMINATE case eid_blocking_sch_init: DO_THROW( runtime_error, ("Nesting of blocking termination is impossible") ); #endif default: break; } #if !TBB_USE_EXCEPTIONS && __APPLE__ out_of_range e1(""); length_error e2(""); range_error e3(""); invalid_argument e4(""); #endif /* !TBB_USE_EXCEPTIONS && __APPLE__ */ } #if _XBOX || __TBB_WIN8UI_SUPPORT bool GetBoolEnvironmentVariable( const char * ) { return false;} #else /* _XBOX || __TBB_WIN8UI_SUPPORT */ bool GetBoolEnvironmentVariable( const char * name ) { if( const char* s = getenv(name) ) return strcmp(s,"0") != 0; return false; } #endif /* _XBOX || __TBB_WIN8UI_SUPPORT */ #include "tbb_version.h" /** The leading "\0" is here so that applying "strings" to the binary delivers a clean result. */ static const char VersionString[] = "\0" TBB_VERSION_STRINGS; static bool PrintVersionFlag = false; void PrintVersion() { PrintVersionFlag = true; fputs(VersionString+1,stderr); } void PrintExtraVersionInfo( const char* category, const char* format, ... ) { if( PrintVersionFlag ) { char str[1024]; memset(str, 0, 1024); va_list args; va_start(args, format); // Note: correct vsnprintf definition obtained from tbb_assert_impl.h vsnprintf( str, 1024-1, format, args); va_end(args); fprintf(stderr, "TBB: %s\t%s\n", category, str ); } } void PrintRMLVersionInfo( void* arg, const char* server_info ) { PrintExtraVersionInfo( server_info, (const char *)arg ); } //! check for transaction support. #if _MSC_VER #include // for __cpuid #endif bool cpu_has_speculation() { #if __TBB_TSX_AVAILABLE #if (__INTEL_COMPILER || __GNUC__ || _MSC_VER || __SUNPRO_CC) bool result = false; const int hle_ebx_mask = 1<<4; #if _MSC_VER int info[4] = {0,0,0,0}; const int reg_ebx = 1; __cpuidex(info, 7, 0); result = (info[reg_ebx] & hle_ebx_mask)!=0; #elif __GNUC__ || __SUNPRO_CC int32_t reg_ebx = 0; int32_t reg_eax = 7; int32_t reg_ecx = 0; __asm__ __volatile__ ( "movl %%ebx, %%esi\n" "cpuid\n" "movl %%ebx, %0\n" "movl %%esi, %%ebx\n" : "=a"(reg_ebx) : "0" (reg_eax), "c" (reg_ecx) : "esi", #if __TBB_x86_64 "ebx", #endif "edx" ); result = (reg_ebx & hle_ebx_mask)!=0 ; #endif return result; #else #error Speculation detection not enabled for compiler #endif /* __INTEL_COMPILER || __GNUC__ || _MSC_VER */ #else /* __TBB_TSX_AVAILABLE */ return false; #endif /* __TBB_TSX_AVAILABLE */ } } // namespace internal extern "C" int TBB_runtime_interface_version() { return TBB_INTERFACE_VERSION; } } // namespace tbb #if !__TBB_RML_STATIC #if __TBB_x86_32 #include "tbb/atomic.h" // in MSVC environment, int64_t defined in tbb::internal namespace only (see tbb_stddef.h) #if _MSC_VER using tbb::internal::int64_t; #endif //! Warn about 8-byte store that crosses a cache line. extern "C" void __TBB_machine_store8_slow_perf_warning( volatile void *ptr ) { // Report run-time warning unless we have already recently reported warning for that address. const unsigned n = 4; static tbb::atomic cache[n]; static tbb::atomic k; for( unsigned i=0; i(ptr); tbb::internal::runtime_warning( "atomic store on misaligned 8-byte location %p is slow", ptr ); done:; } //! Handle 8-byte store that crosses a cache line. extern "C" void __TBB_machine_store8_slow( volatile void *ptr, int64_t value ) { for( tbb::internal::atomic_backoff b;;b.pause() ) { int64_t tmp = *(int64_t*)ptr; if( __TBB_machine_cmpswp8(ptr,value,tmp)==tmp ) break; } } #endif /* __TBB_x86_32 */ #endif /* !__TBB_RML_STATIC */ #if __TBB_ipf /* It was found that on IA-64 architecture inlining of __TBB_machine_lockbyte leads to serious performance regression with ICC. So keep it out-of-line. */ extern "C" intptr_t __TBB_machine_lockbyte( volatile unsigned char& flag ) { tbb::internal::atomic_backoff backoff; while( !__TBB_TryLockByte(flag) ) backoff.pause(); return 0; } #endif ================================================ FILE: benchmarks/tbb/tbb_misc.h ================================================ /* Copyright 2005-2014 Intel Corporation. All Rights Reserved. This file is part of Threading Building Blocks. Threading Building Blocks is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. Threading Building Blocks is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Threading Building Blocks; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA As a special exception, you may use this file as part of a free software library without restriction. Specifically, if other files instantiate templates or use macros or inline functions from this file, or you compile this file and link it with other files to produce an executable, this file does not by itself cause the resulting executable to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the executable file might be covered by the GNU General Public License. */ #ifndef _TBB_tbb_misc_H #define _TBB_tbb_misc_H #include "tbb/tbb_stddef.h" #include "tbb/tbb_machine.h" #include "tbb/atomic.h" // For atomic_xxx definitions #if __linux__ || __FreeBSD__ #include // __FreeBSD_version #if __FreeBSD_version >= 701000 #include #endif #endif // Does the operating system have a system call to pin a thread to a set of OS processors? #define __TBB_OS_AFFINITY_SYSCALL_PRESENT ((__linux__ && !__ANDROID__) || (__FreeBSD_version >= 701000)) // On IBM* Blue Gene* CNK nodes, the affinity API has restrictions that prevent its usability for TBB, // and also sysconf(_SC_NPROCESSORS_ONLN) already takes process affinity into account. #define __TBB_USE_OS_AFFINITY_SYSCALL (__TBB_OS_AFFINITY_SYSCALL_PRESENT && !__bg__) namespace tbb { namespace internal { const size_t MByte = 1024*1024; #if __TBB_WIN8UI_SUPPORT // In Win8UI mode, TBB uses a thread creation API that does not allow to specify the stack size. // Still, the thread stack size value, either explicit or default, is used by the scheduler. // So here we set the default value to match the platform's default of 1MB. const size_t ThreadStackSize = 1*MByte; #else const size_t ThreadStackSize = (sizeof(uintptr_t) <= 4 ? 2 : 4 )*MByte; #endif #ifndef __TBB_HardwareConcurrency //! Returns maximal parallelism level supported by the current OS configuration. int AvailableHwConcurrency(); #else inline int AvailableHwConcurrency() { int n = __TBB_HardwareConcurrency(); return n > 0 ? n : 1; // Fail safety strap } #endif /* __TBB_HardwareConcurrency */ #if _WIN32||_WIN64 //! Returns number of processor groups in the current OS configuration. /** AvailableHwConcurrency must be called at least once before calling this method. **/ int NumberOfProcessorGroups(); //! Retrieves index of processor group containing processor with the given index int FindProcessorGroupIndex ( int processorIndex ); //! Affinitizes the thread to the specified processor group void MoveThreadIntoProcessorGroup( void* hThread, int groupIndex ); #endif /* _WIN32||_WIN64 */ //! Throws std::runtime_error with what() returning error_code description prefixed with aux_info void handle_win_error( int error_code ); //! True if environment variable with given name is set and not 0; otherwise false. bool GetBoolEnvironmentVariable( const char * name ); //! Prints TBB version information on stderr void PrintVersion(); //! Prints arbitrary extra TBB version information on stderr void PrintExtraVersionInfo( const char* category, const char* format, ... ); //! A callback routine to print RML version information on stderr void PrintRMLVersionInfo( void* arg, const char* server_info ); // For TBB compilation only; not to be used in public headers #if defined(min) || defined(max) #undef min #undef max #endif //! Utility template function returning lesser of the two values. /** Provided here to avoid including not strict safe .\n In case operands cause signed/unsigned or size mismatch warnings it is caller's responsibility to do the appropriate cast before calling the function. **/ template T1 min ( const T1& val1, const T2& val2 ) { return val1 < val2 ? val1 : val2; } //! Utility template function returning greater of the two values. /** Provided here to avoid including not strict safe .\n In case operands cause signed/unsigned or size mismatch warnings it is caller's responsibility to do the appropriate cast before calling the function. **/ template T1 max ( const T1& val1, const T2& val2 ) { return val1 < val2 ? val2 : val1; } //! Utility helper structure to ease overload resolution template struct int_to_type {}; //------------------------------------------------------------------------ // FastRandom //------------------------------------------------------------------------ /** Defined in tbb_main.cpp **/ unsigned GetPrime ( unsigned seed ); //! A fast random number generator. /** Uses linear congruential method. */ class FastRandom { private: #if __TBB_OLD_PRIMES_RNG unsigned x, a; static const unsigned c = 1; #else unsigned x, c; static const unsigned a = 0x9e3779b1; // a big prime number #endif //__TBB_OLD_PRIMES_RNG public: //! Get a random number. unsigned short get() { return get(x); } //! Get a random number for the given seed; update the seed for next use. unsigned short get( unsigned& seed ) { unsigned short r = (unsigned short)(seed>>16); __TBB_ASSERT(c&1, "c must be odd for big rng period"); seed = seed*a+c; return r; } //! Construct a random number generator. FastRandom( void* unique_ptr ) { init(uintptr_t(unique_ptr)); } FastRandom( uint32_t seed) { init(seed); } FastRandom( uint64_t seed) { init(seed); } template void init( T seed ) { init(seed,int_to_type()); } void init( uint64_t seed , int_to_type<8> ) { init(uint32_t((seed>>32)+seed), int_to_type<4>()); } void init( uint32_t seed, int_to_type<4> ) { #if __TBB_OLD_PRIMES_RNG x = seed; a = GetPrime( seed ); #else // threads use different seeds for unique sequences c = (seed|1)*0xba5703f5; // c must be odd, shuffle by a prime number x = c^(seed>>1); // also shuffle x for the first get() invocation #endif } }; //------------------------------------------------------------------------ // Atomic extensions //------------------------------------------------------------------------ //! Atomically replaces value of dst with newValue if they satisfy condition of compare predicate /** Return value semantics is the same as for CAS. **/ template T1 atomic_update ( tbb::atomic& dst, T2 newValue, Pred compare ) { T1 oldValue = dst; while ( compare(oldValue, newValue) ) { if ( dst.compare_and_swap((T1)newValue, oldValue) == oldValue ) break; oldValue = dst; } return oldValue; } //! One-time initialization states enum do_once_state { do_once_uninitialized = 0, ///< No execution attempts have been undertaken yet do_once_pending, ///< A thread is executing associated do-once routine do_once_executed, ///< Do-once routine has been executed initialization_complete = do_once_executed ///< Convenience alias }; //! One-time initialization function /** /param initializer Pointer to function without arguments The variant that returns bool is used for cases when initialization can fail and it is OK to continue execution, but the state should be reset so that the initialization attempt was repeated the next time. /param state Shared state associated with initializer that specifies its initialization state. Must be initially set to #uninitialized value (e.g. by means of default static zero initialization). **/ template void atomic_do_once ( const F& initializer, atomic& state ) { // tbb::atomic provides necessary acquire and release fences. // The loop in the implementation is necessary to avoid race when thread T2 // that arrived in the middle of initialization attempt by another thread T1 // has just made initialization possible. // In such a case T2 has to rely on T1 to initialize, but T1 may already be past // the point where it can recognize the changed conditions. while ( state != do_once_executed ) { if( state == do_once_uninitialized ) { if( state.compare_and_swap( do_once_pending, do_once_uninitialized ) == do_once_uninitialized ) { run_initializer( initializer, state ); break; } } spin_wait_while_eq( state, do_once_pending ); } } // Run the initializer which can not fail inline void run_initializer( void (*f)(), atomic& state ) { f(); state = do_once_executed; } // Run the initializer which can require repeated call inline void run_initializer( bool (*f)(), atomic& state ) { state = f() ? do_once_executed : do_once_uninitialized; } #if __TBB_USE_OS_AFFINITY_SYSCALL #if __linux__ typedef cpu_set_t basic_mask_t; #elif __FreeBSD_version >= 701000 typedef cpuset_t basic_mask_t; #else #error affinity_helper is not implemented in this OS #endif class affinity_helper : no_copy { basic_mask_t* threadMask; int is_changed; public: affinity_helper() : threadMask(NULL), is_changed(0) {} ~affinity_helper(); void protect_affinity_mask(); }; #else class affinity_helper : no_copy { public: void protect_affinity_mask() {} }; #endif /* __TBB_USE_OS_AFFINITY_SYSCALL */ extern bool cpu_has_speculation(); } // namespace internal } // namespace tbb #endif /* _TBB_tbb_misc_H */ ================================================ FILE: benchmarks/tbb/tbb_misc_ex.cpp ================================================ /* Copyright 2005-2014 Intel Corporation. All Rights Reserved. This file is part of Threading Building Blocks. Threading Building Blocks is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. Threading Building Blocks is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Threading Building Blocks; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA As a special exception, you may use this file as part of a free software library without restriction. Specifically, if other files instantiate templates or use macros or inline functions from this file, or you compile this file and link it with other files to produce an executable, this file does not by itself cause the resulting executable to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the executable file might be covered by the GNU General Public License. */ // Source file for miscellaneous entities that are infrequently referenced by // an executing program, and implementation of which requires dynamic linking. #include "tbb_misc.h" #if !defined(__TBB_HardwareConcurrency) #include "dynamic_link.h" #include #include #if _WIN32||_WIN64 #include "tbb/machine/windows_api.h" #if __TBB_WIN8UI_SUPPORT #include #endif #else #include #if __linux__ #include #include #include #include #elif __sun #include #elif __FreeBSD__ #include #include #include // Required by #include #endif #endif namespace tbb { namespace internal { #if __TBB_USE_OS_AFFINITY_SYSCALL static void set_affinity_mask( size_t maskSize, const basic_mask_t* threadMask ) { #if __linux__ if( sched_setaffinity( 0, maskSize, threadMask ) ) #else /* FreeBSD */ if( cpuset_setaffinity( CPU_LEVEL_WHICH, CPU_WHICH_TID, -1, maskSize, threadMask ) ) #endif runtime_warning( "setaffinity syscall failed" ); } static void get_affinity_mask( size_t maskSize, basic_mask_t* threadMask ) { #if __linux__ if( sched_getaffinity( 0, maskSize, threadMask ) ) #else /* FreeBSD */ if( cpuset_getaffinity( CPU_LEVEL_WHICH, CPU_WHICH_TID, -1, maskSize, threadMask ) ) #endif runtime_warning( "getaffinity syscall failed" ); } static basic_mask_t* process_mask; static int num_masks; struct process_mask_cleanup_helper { ~process_mask_cleanup_helper() { if( process_mask ) { delete [] process_mask; } } }; static process_mask_cleanup_helper process_mask_cleanup; #define curMaskSize sizeof(basic_mask_t) * num_masks affinity_helper::~affinity_helper() { if( threadMask ) { if( is_changed ) { set_affinity_mask( curMaskSize, threadMask ); } delete [] threadMask; } } void affinity_helper::protect_affinity_mask() { if( threadMask == NULL && num_masks && process_mask ) { threadMask = new basic_mask_t [num_masks]; memset( threadMask, 0, curMaskSize ); get_affinity_mask( curMaskSize, threadMask ); is_changed = memcmp( process_mask, threadMask, curMaskSize ); if( is_changed ) { set_affinity_mask( curMaskSize, process_mask ); } } } #undef curMaskSize static atomic hardware_concurrency_info; static int theNumProcs; static void initialize_hardware_concurrency_info () { int err; int availableProcs = 0; int numMasks = 1; #if __linux__ #if __TBB_MAIN_THREAD_AFFINITY_BROKEN int maxProcs = INT_MAX; // To check the entire mask. int pid = 0; // Get the mask of the calling thread. #else int maxProcs = sysconf(_SC_NPROCESSORS_ONLN); int pid = getpid(); #endif cpu_set_t *processMask; const size_t BasicMaskSize = sizeof(cpu_set_t); for (;;) { int curMaskSize = BasicMaskSize * numMasks; processMask = new cpu_set_t[numMasks]; memset( processMask, 0, curMaskSize ); err = sched_getaffinity( pid, curMaskSize, processMask ); if ( !err || errno != EINVAL || curMaskSize * CHAR_BIT >= 256 * 1024 ) break; delete[] processMask; numMasks <<= 1; } #else /* FreeBSD >= 7.1 */ int maxProcs = sysconf(_SC_NPROCESSORS_ONLN); cpuset_t *processMask; const size_t BasicMaskSize = sizeof(cpuset_t); for (;;) { int curMaskSize = BasicMaskSize * numMasks; processMask = new cpuset_t[numMasks]; memset( processMask, 0, curMaskSize ); // CPU_LEVEL_WHICH - anonymous (current) mask, CPU_LEVEL_CPUSET - assigned mask #if __TBB_MAIN_THREAD_AFFINITY_BROKEN err = cpuset_getaffinity( CPU_LEVEL_WHICH, CPU_WHICH_TID, -1, curMaskSize, processMask ); #else err = cpuset_getaffinity( CPU_LEVEL_WHICH, CPU_WHICH_PID, -1, curMaskSize, processMask ); #endif if ( !err || errno != ERANGE || curMaskSize * CHAR_BIT >= 16 * 1024 ) break; delete[] processMask; numMasks <<= 1; } #endif /* FreeBSD >= 7.1 */ if ( !err ) { for ( int m = 0; availableProcs < maxProcs && m < numMasks; ++m ) { for ( size_t i = 0; (availableProcs < maxProcs) && (i < BasicMaskSize * CHAR_BIT); ++i ) { if ( CPU_ISSET( i, processMask + m ) ) ++availableProcs; } } num_masks = numMasks; process_mask = processMask; } else { availableProcs = (maxProcs == INT_MAX) ? sysconf(_SC_NPROCESSORS_ONLN) : maxProcs; delete[] processMask; } theNumProcs = availableProcs > 0 ? availableProcs : 1; // Fail safety strap __TBB_ASSERT( theNumProcs <= sysconf(_SC_NPROCESSORS_ONLN), NULL ); } int AvailableHwConcurrency() { atomic_do_once( &initialize_hardware_concurrency_info, hardware_concurrency_info ); return theNumProcs; } #elif __ANDROID__ // Work-around for Android that reads the correct number of available CPUs since system calls are unreliable. // Format of "present" file is: ([-|],)+ int AvailableHwConcurrency() { FILE *fp = fopen("/sys/devices/system/cpu/present", "r"); if (fp == NULL) return 1; int num_args, lower, upper, num_cpus=0; while ((num_args = fscanf(fp, "%u-%u", &lower, &upper)) != EOF) { switch(num_args) { case 2: num_cpus += upper - lower + 1; break; case 1: num_cpus += 1; break; } fscanf(fp, ","); } return (num_cpus > 0) ? num_cpus : 1; } #elif defined(_SC_NPROCESSORS_ONLN) int AvailableHwConcurrency() { int n = sysconf(_SC_NPROCESSORS_ONLN); return (n > 0) ? n : 1; } #elif _WIN32||_WIN64 static atomic hardware_concurrency_info; static const WORD TBB_ALL_PROCESSOR_GROUPS = 0xffff; // Statically allocate an array for processor group information. // Windows 7 supports maximum 4 groups, but let's look ahead a little. static const WORD MaxProcessorGroups = 64; struct ProcessorGroupInfo { DWORD_PTR mask; ///< Affinity mask covering the whole group int numProcs; ///< Number of processors in the group int numProcsRunningTotal; ///< Subtotal of processors in this and preceding groups //! Total number of processor groups in the system static int NumGroups; //! Index of the group with a slot reserved for the first master thread /** In the context of multiple processor groups support current implementation defines "the first master thread" as the first thread to invoke AvailableHwConcurrency(). TODO: Implement a dynamic scheme remapping workers depending on the pending master threads affinity. **/ static int HoleIndex; }; int ProcessorGroupInfo::NumGroups = 1; int ProcessorGroupInfo::HoleIndex = 0; ProcessorGroupInfo theProcessorGroups[MaxProcessorGroups]; struct TBB_GROUP_AFFINITY { DWORD_PTR Mask; WORD Group; WORD Reserved[3]; }; static DWORD (WINAPI *TBB_GetActiveProcessorCount)( WORD groupIndex ) = NULL; static WORD (WINAPI *TBB_GetActiveProcessorGroupCount)() = NULL; static BOOL (WINAPI *TBB_SetThreadGroupAffinity)( HANDLE hThread, const TBB_GROUP_AFFINITY* newAff, TBB_GROUP_AFFINITY *prevAff ); static BOOL (WINAPI *TBB_GetThreadGroupAffinity)( HANDLE hThread, TBB_GROUP_AFFINITY* ); static const dynamic_link_descriptor ProcessorGroupsApiLinkTable[] = { DLD(GetActiveProcessorCount, TBB_GetActiveProcessorCount) , DLD(GetActiveProcessorGroupCount, TBB_GetActiveProcessorGroupCount) , DLD(SetThreadGroupAffinity, TBB_SetThreadGroupAffinity) , DLD(GetThreadGroupAffinity, TBB_GetThreadGroupAffinity) }; static void initialize_hardware_concurrency_info () { #if __TBB_WIN8UI_SUPPORT // For these applications processor groups info is unavailable // Setting up a number of processors for one processor group theProcessorGroups[0].numProcs = theProcessorGroups[0].numProcsRunningTotal = std::thread::hardware_concurrency(); #else /* __TBB_WIN8UI_SUPPORT */ dynamic_link( "Kernel32.dll", ProcessorGroupsApiLinkTable, sizeof(ProcessorGroupsApiLinkTable)/sizeof(dynamic_link_descriptor) ); SYSTEM_INFO si; GetNativeSystemInfo(&si); DWORD_PTR pam, sam, m = 1; GetProcessAffinityMask( GetCurrentProcess(), &pam, &sam ); int nproc = 0; for ( size_t i = 0; i < sizeof(DWORD_PTR) * CHAR_BIT; ++i, m <<= 1 ) { if ( pam & m ) ++nproc; } __TBB_ASSERT( nproc <= (int)si.dwNumberOfProcessors, NULL ); // By default setting up a number of processors for one processor group theProcessorGroups[0].numProcs = theProcessorGroups[0].numProcsRunningTotal = nproc; // Setting up processor groups in case the process does not restrict affinity mask and more than one processor group is present if ( nproc == (int)si.dwNumberOfProcessors && TBB_GetActiveProcessorCount ) { // The process does not have restricting affinity mask and multiple processor groups are possible ProcessorGroupInfo::NumGroups = (int)TBB_GetActiveProcessorGroupCount(); __TBB_ASSERT( ProcessorGroupInfo::NumGroups <= MaxProcessorGroups, NULL ); // Fail safety bootstrap. Release versions will limit available concurrency // level, while debug ones would assert. if ( ProcessorGroupInfo::NumGroups > MaxProcessorGroups ) ProcessorGroupInfo::NumGroups = MaxProcessorGroups; if ( ProcessorGroupInfo::NumGroups > 1 ) { TBB_GROUP_AFFINITY ga; if ( TBB_GetThreadGroupAffinity( GetCurrentThread(), &ga ) ) ProcessorGroupInfo::HoleIndex = ga.Group; int nprocs = 0; for ( WORD i = 0; i < ProcessorGroupInfo::NumGroups; ++i ) { ProcessorGroupInfo &pgi = theProcessorGroups[i]; pgi.numProcs = (int)TBB_GetActiveProcessorCount(i); __TBB_ASSERT( pgi.numProcs <= (int)sizeof(DWORD_PTR) * CHAR_BIT, NULL ); pgi.mask = pgi.numProcs == sizeof(DWORD_PTR) * CHAR_BIT ? ~(DWORD_PTR)0 : (DWORD_PTR(1) << pgi.numProcs) - 1; pgi.numProcsRunningTotal = nprocs += pgi.numProcs; } __TBB_ASSERT( nprocs == (int)TBB_GetActiveProcessorCount( TBB_ALL_PROCESSOR_GROUPS ), NULL ); } } #endif /* __TBB_WIN8UI_SUPPORT */ PrintExtraVersionInfo("Processor groups", "%d", ProcessorGroupInfo::NumGroups); if (ProcessorGroupInfo::NumGroups>1) for (int i=0; i= numProcs - 1 ) { holeIdx = INT_MAX; procIdx = (procIdx - numProcs + 1) % numProcs; } else holeIdx = ProcessorGroupInfo::HoleIndex; __TBB_ASSERT( hardware_concurrency_info == initialization_complete, "FindProcessorGroupIndex is used before AvailableHwConcurrency" ); // Approximate the likely group index assuming all groups are of the same size int i = procIdx / theProcessorGroups[0].numProcs; // Make sure the approximation is a valid group index if (i >= ProcessorGroupInfo::NumGroups) i = ProcessorGroupInfo::NumGroups-1; // Now adjust the approximation up or down if ( theProcessorGroups[i].numProcsRunningTotal > HoleAdjusted(procIdx, i) ) { while ( theProcessorGroups[i].numProcsRunningTotal - theProcessorGroups[i].numProcs > HoleAdjusted(procIdx, i) ) { __TBB_ASSERT( i > 0, NULL ); --i; } } else { do { ++i; } while ( theProcessorGroups[i].numProcsRunningTotal <= HoleAdjusted(procIdx, i) ); } __TBB_ASSERT( i < ProcessorGroupInfo::NumGroups, NULL ); return i; } void MoveThreadIntoProcessorGroup( void* hThread, int groupIndex ) { __TBB_ASSERT( hardware_concurrency_info == initialization_complete, "MoveThreadIntoProcessorGroup is used before AvailableHwConcurrency" ); if ( !TBB_SetThreadGroupAffinity ) return; TBB_GROUP_AFFINITY ga = { theProcessorGroups[groupIndex].mask, (WORD)groupIndex, {0,0,0} }; TBB_SetThreadGroupAffinity( hThread, &ga, NULL ); } #else #error AvailableHwConcurrency is not implemented in this OS #endif /* OS */ } // namespace internal } // namespace tbb #endif /* !__TBB_HardwareConcurrency */ ================================================ FILE: benchmarks/tbb/tbb_profiling.h ================================================ /* Copyright 2005-2014 Intel Corporation. All Rights Reserved. This file is part of Threading Building Blocks. Threading Building Blocks is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. Threading Building Blocks is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Threading Building Blocks; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA As a special exception, you may use this file as part of a free software library without restriction. Specifically, if other files instantiate templates or use macros or inline functions from this file, or you compile this file and link it with other files to produce an executable, this file does not by itself cause the resulting executable to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the executable file might be covered by the GNU General Public License. */ #ifndef __TBB_profiling_H #define __TBB_profiling_H namespace tbb { namespace internal { // // This is not under __TBB_ITT_STRUCTURE_API because these values are used directly in flow_graph.h. // // include list of index names #define TBB_STRING_RESOURCE(index_name,str) index_name, enum string_index { #include "internal/_tbb_strings.h" NUM_STRINGS }; #undef TBB_STRING_RESOURCE enum itt_relation { __itt_relation_is_unknown = 0, __itt_relation_is_dependent_on, /**< "A is dependent on B" means that A cannot start until B completes */ __itt_relation_is_sibling_of, /**< "A is sibling of B" means that A and B were created as a group */ __itt_relation_is_parent_of, /**< "A is parent of B" means that A created B */ __itt_relation_is_continuation_of, /**< "A is continuation of B" means that A assumes the dependencies of B */ __itt_relation_is_child_of, /**< "A is child of B" means that A was created by B (inverse of is_parent_of) */ __itt_relation_is_continued_by, /**< "A is continued by B" means that B assumes the dependencies of A (inverse of is_continuation_of) */ __itt_relation_is_predecessor_to /**< "A is predecessor to B" means that B cannot start until A completes (inverse of is_dependent_on) */ }; } } // Check if the tools support is enabled #if (_WIN32||_WIN64||__linux__) && !__MINGW32__ && TBB_USE_THREADING_TOOLS #if _WIN32||_WIN64 #include /* mbstowcs_s */ #endif #include "tbb_stddef.h" namespace tbb { namespace internal { #if _WIN32||_WIN64 void __TBB_EXPORTED_FUNC itt_set_sync_name_v3( void *obj, const wchar_t* name ); inline size_t multibyte_to_widechar( wchar_t* wcs, const char* mbs, size_t bufsize) { #if _MSC_VER>=1400 size_t len; mbstowcs_s( &len, wcs, bufsize, mbs, _TRUNCATE ); return len; // mbstowcs_s counts null terminator #else size_t len = mbstowcs( wcs, mbs, bufsize ); if(wcs && len!=size_t(-1) ) wcs[len inline void itt_store_word_with_release(tbb::atomic& dst, U src) { #if TBB_USE_THREADING_TOOLS // This assertion should be replaced with static_assert __TBB_ASSERT(sizeof(T) == sizeof(void *), "Type must be word-sized."); itt_store_pointer_with_release_v3(&dst, (void *)uintptr_t(src)); #else dst = src; #endif // TBB_USE_THREADING_TOOLS } template inline T itt_load_word_with_acquire(const tbb::atomic& src) { #if TBB_USE_THREADING_TOOLS // This assertion should be replaced with static_assert __TBB_ASSERT(sizeof(T) == sizeof(void *), "Type must be word-sized."); #if defined(_MSC_VER) && !defined(__INTEL_COMPILER) // Workaround for overzealous compiler warnings #pragma warning (push) #pragma warning (disable: 4311) #endif T result = (T)itt_load_pointer_with_acquire_v3(&src); #if defined(_MSC_VER) && !defined(__INTEL_COMPILER) #pragma warning (pop) #endif return result; #else return src; #endif // TBB_USE_THREADING_TOOLS } template inline void itt_store_word_with_release(T& dst, T src) { #if TBB_USE_THREADING_TOOLS // This assertion should be replaced with static_assert __TBB_ASSERT(sizeof(T) == sizeof(void *), "Type must be word-sized."); itt_store_pointer_with_release_v3(&dst, (void *)src); #else __TBB_store_with_release(dst, src); #endif // TBB_USE_THREADING_TOOLS } template inline T itt_load_word_with_acquire(const T& src) { #if TBB_USE_THREADING_TOOLS // This assertion should be replaced with static_assert __TBB_ASSERT(sizeof(T) == sizeof(void *), "Type must be word-sized"); return (T)itt_load_pointer_with_acquire_v3(&src); #else return __TBB_load_with_acquire(src); #endif // TBB_USE_THREADING_TOOLS } template inline void itt_hide_store_word(T& dst, T src) { #if TBB_USE_THREADING_TOOLS //TODO: This assertion should be replaced with static_assert __TBB_ASSERT(sizeof(T) == sizeof(void *), "Type must be word-sized"); itt_store_pointer_with_release_v3(&dst, (void *)src); #else dst = src; #endif } //TODO: rename to itt_hide_load_word_relaxed template inline T itt_hide_load_word(const T& src) { #if TBB_USE_THREADING_TOOLS //TODO: This assertion should be replaced with static_assert __TBB_ASSERT(sizeof(T) == sizeof(void *), "Type must be word-sized."); return (T)itt_load_pointer_v3(&src); #else return src; #endif } #if TBB_USE_THREADING_TOOLS inline void call_itt_notify(notify_type t, void *ptr) { call_itt_notify_v5((int)t, ptr); } #else inline void call_itt_notify(notify_type /*t*/, void * /*ptr*/) {} #endif // TBB_USE_THREADING_TOOLS #if __TBB_ITT_STRUCTURE_API inline void itt_make_task_group( itt_domain_enum domain, void *group, unsigned long long group_extra, void *parent, unsigned long long parent_extra, string_index name_index ) { itt_make_task_group_v7( domain, group, group_extra, parent, parent_extra, name_index ); } inline void itt_metadata_str_add( itt_domain_enum domain, void *addr, unsigned long long addr_extra, string_index key, const char *value ) { itt_metadata_str_add_v7( domain, addr, addr_extra, key, value ); } inline void itt_relation_add( itt_domain_enum domain, void *addr0, unsigned long long addr0_extra, itt_relation relation, void *addr1, unsigned long long addr1_extra ) { itt_relation_add_v7( domain, addr0, addr0_extra, relation, addr1, addr1_extra ); } inline void itt_task_begin( itt_domain_enum domain, void *task, unsigned long long task_extra, void *parent, unsigned long long parent_extra, string_index name_index ) { itt_task_begin_v7( domain, task, task_extra, parent, parent_extra, name_index ); } inline void itt_task_end( itt_domain_enum domain ) { itt_task_end_v7( domain ); } #endif // __TBB_ITT_STRUCTURE_API } // namespace internal } // namespace tbb #endif /* __TBB_profiling_H */ ================================================ FILE: benchmarks/tbb/tbb_resource.rc ================================================ // Copyright 2005-2014 Intel Corporation. All Rights Reserved. // // This file is part of Threading Building Blocks. Threading Building Blocks is free software; // you can redistribute it and/or modify it under the terms of the GNU General Public License // version 2 as published by the Free Software Foundation. Threading Building Blocks is // distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the // implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. // See the GNU General Public License for more details. You should have received a copy of // the GNU General Public License along with Threading Building Blocks; if not, write to the // Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA // // As a special exception, you may use this file as part of a free software library without // restriction. Specifically, if other files instantiate templates or use macros or inline // functions from this file, or you compile this file and link it with other files to produce // an executable, this file does not by itself cause the resulting executable to be covered // by the GNU General Public License. This exception does not however invalidate any other // reasons why the executable file might be covered by the GNU General Public License. // Microsoft Visual C++ generated resource script. // #ifdef APSTUDIO_INVOKED #ifndef APSTUDIO_READONLY_SYMBOLS #define _APS_NO_MFC 1 #define _APS_NEXT_RESOURCE_VALUE 102 #define _APS_NEXT_COMMAND_VALUE 40001 #define _APS_NEXT_CONTROL_VALUE 1001 #define _APS_NEXT_SYMED_VALUE 101 #endif #endif #define APSTUDIO_READONLY_SYMBOLS ///////////////////////////////////////////////////////////////////////////// // // Generated from the TEXTINCLUDE 2 resource. // #include #define ENDL "\r\n" #include "tbb_version.h" ///////////////////////////////////////////////////////////////////////////// #undef APSTUDIO_READONLY_SYMBOLS ///////////////////////////////////////////////////////////////////////////// // Neutral resources //#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_NEU) #ifdef _WIN32 LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL #pragma code_page(1252) #endif //_WIN32 ///////////////////////////////////////////////////////////////////////////// // manifest integration #ifdef TBB_MANIFEST #include "winuser.h" 2 RT_MANIFEST tbbmanifest.exe.manifest #endif ///////////////////////////////////////////////////////////////////////////// // // Version // VS_VERSION_INFO VERSIONINFO FILEVERSION TBB_VERNUMBERS PRODUCTVERSION TBB_VERNUMBERS FILEFLAGSMASK 0x17L #ifdef _DEBUG FILEFLAGS 0x1L #else FILEFLAGS 0x0L #endif FILEOS 0x40004L FILETYPE 0x2L FILESUBTYPE 0x0L BEGIN BLOCK "StringFileInfo" BEGIN BLOCK "000004b0" BEGIN VALUE "CompanyName", "Intel Corporation\0" VALUE "FileDescription", "Intel(R) Threading Building Blocks library\0" VALUE "FileVersion", TBB_VERSION "\0" VALUE "LegalCopyright", "Copyright 2005-2014 Intel Corporation. All Rights Reserved.\0" VALUE "LegalTrademarks", "\0" #ifndef TBB_USE_DEBUG VALUE "OriginalFilename", "tbb.dll\0" #else VALUE "OriginalFilename", "tbb_debug.dll\0" #endif VALUE "ProductName", "Intel(R) Threading Building Blocks for Windows\0" VALUE "ProductVersion", TBB_VERSION "\0" VALUE "PrivateBuild", "\0" VALUE "SpecialBuild", "\0" END END BLOCK "VarFileInfo" BEGIN VALUE "Translation", 0x0, 1200 END END //#endif // Neutral resources ///////////////////////////////////////////////////////////////////////////// #ifndef APSTUDIO_INVOKED ///////////////////////////////////////////////////////////////////////////// // // Generated from the TEXTINCLUDE 3 resource. // ///////////////////////////////////////////////////////////////////////////// #endif // not APSTUDIO_INVOKED ================================================ FILE: benchmarks/tbb/tbb_statistics.cpp ================================================ /* Copyright 2005-2014 Intel Corporation. All Rights Reserved. This file is part of Threading Building Blocks. Threading Building Blocks is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. Threading Building Blocks is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Threading Building Blocks; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA As a special exception, you may use this file as part of a free software library without restriction. Specifically, if other files instantiate templates or use macros or inline functions from this file, or you compile this file and link it with other files to produce an executable, this file does not by itself cause the resulting executable to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the executable file might be covered by the GNU General Public License. */ #include "tbb_statistics.h" #if __TBB_STATISTICS #include #include #if __TBB_STATISTICS_STDOUT #include #endif #include "tbb/spin_mutex.h" namespace tbb { namespace internal { //! Human readable titles of statistics groups defined by statistics_groups enum. /** The order of this vector elements must correspond to the statistics_counters structure layout. **/ const char* StatGroupTitles[] = { "task objects", "tasks executed", "stealing attempts", "task proxies", "arena", "market", "priority ops", "prio ops details" }; //! Human readable titles of statistics elements defined by statistics_counters struct. /** The order of this vector elements must correspond to the statistics_counters structure layout (with NULLs interspersed to separate groups). **/ const char* StatFieldTitles[] = { /*task objects*/ "active", "freed", "big", NULL, /*tasks executed*/ "total", "w/o spawn", NULL, /*stealing attempts*/ "succeeded", "failed", "conflicts", "backoffs", NULL, /*task proxies*/ "mailed", "revoked", "stolen", "bypassed", "ignored", NULL, /*arena*/ "switches", "roundtrips", "avg.conc", "avg.allot", NULL, /*market*/ "roundtrips", NULL, /*priority ops*/ "ar.switch", "mkt.switch", "ar.reset", "ref.fixup", "avg.ar.pr", "avg.mkt.pr", NULL, /*prio ops details*/ "winnows", "reloads", "orphaned", "winnowed", "reloaded", NULL }; //! Class for logging statistics /** There should be only one instance of this class. Results are written to a file "statistics.txt" in tab-separated format. */ class statistics_logger { public: statistics_logger () { __TBB_ASSERT( sg_end - 1 == 1 << (sizeof(StatGroupTitles)/sizeof(*StatGroupTitles) - 1), NULL ); my_file = fopen("statistics.txt","w"); if( !my_file ) perror("fopen(\"statistics.txt\"\")"); // Initialize groups dump layout info group_start_field[0] = 0; for ( size_t i = 0, j = 0; i < NumGroups; ++i, ++j ) { __TBB_ASSERT( StatFieldTitles[j], "Empty group occurred" ); while ( StatFieldTitles[j] ) ++j; group_start_field[i + 1] = j - i; // -i accounts for preceding NULL separators } __TBB_ASSERT( group_start_field[NumGroups] == statistics_counters::size(), "Wrong number of elements in StatFieldTitles" ); dump( "%-*s", IDColumnWidth, ""); process_groups( &statistics_logger::print_group_title ); dump( "%-*s", IDColumnWidth, "ID"); process_groups( &statistics_logger::print_field_titles ); } ~statistics_logger () { fclose(my_file); } void record( const statistics_counters& c, size_t id ) { spin_mutex::scoped_lock lock(my_mutex); counters_to_dump = &c; #if __TBB_STATISTICS_TOTALS_ONLY if ( id == arena_counters_total ) { dump( "%-*s", IDColumnWidth, "Tot" ); process_groups( &statistics_logger::print_field_values ); } #else /* !__TBB_STATISTICS_TOTALS_ONLY */ const char* idString = NULL; switch ( id ) { case 0: idString = "M"; break; case workers_counters_total: idString = "Wtot"; break; case arena_counters_total: idString = "Tot"; break; default: dump( "W%-*u", IDColumnWidth - 1, id ); } if ( idString ) dump( "%-*s", IDColumnWidth, idString ); process_groups( &statistics_logger::print_field_values ); #endif /* !__TBB_STATISTICS_TOTALS_ONLY */ } private: static const size_t IDColumnWidth = 5; static const size_t StatisticsColumnWidth = 10; static const size_t NumGroups = sizeof(StatGroupTitles)/sizeof(char*); //! File into which statistics are written. FILE* my_file; //! Mutex that serializes accesses to my_file spin_mutex my_mutex; //! Indices of the each group's first field in statistics_counters struct. /** An extra element is used to track the total number of statistics fields. **/ size_t group_start_field[NumGroups + 1]; //! Currently processed set of counters. const statistics_counters* counters_to_dump; static const size_t NumFields = sizeof(StatFieldTitles)/sizeof(*StatFieldTitles) - NumGroups; bool averages_fields[NumFields]; void dump ( char const* fmt, ... ) { va_list args; if ( my_file ) { va_start( args, fmt ); vfprintf( my_file, fmt, args ); va_end( args ); } #if __TBB_STATISTICS_STDOUT va_start( args, fmt ); vprintf( fmt, args ); va_end( args ); #endif } void process_groups ( void (statistics_logger::*per_group_action)(size_t group_idx) ) { for ( size_t i = 0, group_flag = 1; i < NumGroups; ++i, group_flag <<= 1 ) { __TBB_ASSERT( group_flag < sg_end, "StatGroupTitles contents is incompatible with statistics_groups definition" ); if ( __TBB_ActiveStatisticsGroups & group_flag ) (this->*per_group_action)( i ); } dump( "\n" ); } void print_group_title ( size_t group_idx ) { dump( "%-*s", (group_start_field[group_idx + 1] - group_start_field[group_idx]) * (StatisticsColumnWidth + 1), StatGroupTitles[group_idx] ); } void print_field_titles ( size_t group_idx ) { // +group_idx accounts for preceding NULL separators size_t i = group_start_field[group_idx] + group_idx; while ( StatFieldTitles[i] ) { averages_fields[i - group_idx] = strncmp(StatFieldTitles[i], "avg.", 4) == 0; dump( "%-*s ", StatisticsColumnWidth, StatFieldTitles[i++] ); } } void print_field_values ( size_t group_idx ) { size_t begin = group_start_field[group_idx], end = group_start_field[group_idx + 1]; for ( size_t i = begin; i < end; ++i ) { if ( averages_fields[i] ) dump( "%-*.2f ", StatisticsColumnWidth, (double)counters_to_dump->field(i)/counters_to_dump->tasks_executed ); else dump( "%-*ld ", StatisticsColumnWidth, counters_to_dump->field(i) ); } } }; // class statistics_logger static statistics_logger the_statistics; void dump_statistics ( const statistics_counters& c, size_t id ) { the_statistics.record(c, id); } } // namespace internal } // namespace tbb #endif /* __TBB_STATISTICS */ ================================================ FILE: benchmarks/tbb/tbb_statistics.h ================================================ /* Copyright 2005-2014 Intel Corporation. All Rights Reserved. This file is part of Threading Building Blocks. Threading Building Blocks is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. Threading Building Blocks is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Threading Building Blocks; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA As a special exception, you may use this file as part of a free software library without restriction. Specifically, if other files instantiate templates or use macros or inline functions from this file, or you compile this file and link it with other files to produce an executable, this file does not by itself cause the resulting executable to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the executable file might be covered by the GNU General Public License. */ #ifndef _TBB_tbb_statistics_H #define _TBB_tbb_statistics_H /** This file defines parameters of the internal statistics collected by the TBB library (currently by the task scheduler only). Statistics is accumulated separately in each thread and is dumped when the scheduler instance associated with the given thread is destroyed. For apps with multiple master threads or with the same master repeatedly initializing and then deinitializing task scheduler this results in TBB workers statistics getting inseparably mixed. Therefore statistics is accumulated in arena slots, and should be dumped when arena is destroyed. This separates statistics collected for each scheduler activity region in each master thread. With the current RML implementation (TBB 2.2, 3.0) to avoid complete loss of statistics data during app shutdown (because of lazy workers deinitialization logic) set __TBB_STATISTICS_EARLY_DUMP macro to write the statistics at the moment a master thread deinitializes its scheduler. This may happen a little earlier than the moment of arena destruction resulting in the following undesired (though usually tolerable) effects: - a few events related to unsuccessful stealing or thread pool activity may be lost, - statistics may be substantially incomplete in case of FIFO tasks used in the FAF mode. Macro __TBB_STATISTICS_STDOUT and global variable __TBB_ActiveStatisticsGroups defined below can be used to configure the statistics output. To add new counter: 1) Insert it into the appropriate group range in statistics_counters; 2) Insert the corresponding field title into StatFieldTitles (preserving relative order of the fields). To add new counters group: 1) Insert new group bit flag into statistics_groups; 2) Insert the new group title into StatGroupTitles (preserving relative order of the groups). 3) Add counter belonging to the new group as described above **/ #include "tbb/tbb_stddef.h" #ifndef __TBB_STATISTICS #define __TBB_STATISTICS 0 #endif /* __TBB_STATISTICS */ #if __TBB_STATISTICS #include // for memset //! Dump counters into stdout as well. /** By default statistics counters are written to the file "statistics.txt" only. **/ #define __TBB_STATISTICS_STDOUT 1 //! Dump only totals for all threads in the given arena /** By default statistics counters for each arena slot are dumped separately, as well as the subtotal for workers. **/ #define __TBB_STATISTICS_TOTALS_ONLY 1 //! Dump statistics for an arena when its master completes /** By default (when this macro is not set) the statistics is sent to output when arena object is destroyed. But with the current lazy workers termination logic default behavior may result in loosing all statistics output. **/ #define __TBB_STATISTICS_EARLY_DUMP 1 #define GATHER_STATISTIC(x) (x) namespace tbb { namespace internal { //! Groups of statistics counters. /** The order of enumerators must be the same as the order of the corresponding field groups in the statistics_counters structure. **/ enum statistics_groups { sg_task_allocation = 0x01, sg_task_execution = 0x02, sg_stealing = 0x04, sg_affinity = 0x08, sg_arena = 0x10, sg_market = 0x20, sg_prio = 0x40, sg_prio_ex = 0x80, // List end marker. Insert new groups only before it. sg_end }; //! Groups of counters to output const uintptr_t __TBB_ActiveStatisticsGroups = sg_task_execution | sg_stealing | sg_affinity | sg_arena | sg_market; //! A set of various statistics counters that are updated by the library on per thread basis. /** All the fields must be of the same type (statistics_counters::counter_type). This is necessary to allow reinterpreting this structure as an array. **/ struct statistics_counters { typedef long counter_type; // Group: sg_task_allocation // Counters in this group can have negative values as the tasks migrate across // threads while the associated counters are updated in the current thread only // to avoid data races //! Number of tasks allocated and not yet destroyed counter_type active_tasks; //! Number of task corpses stored for future reuse counter_type free_list_length; //! Number of big tasks allocated during the run /** To find total number of tasks malloc'd, compute (big_tasks+my_small_task_count) */ counter_type big_tasks; // Group: sg_task_execution //! Number of tasks executed counter_type tasks_executed; //! Number of elided spawns counter_type spawns_bypassed; // Group: sg_stealing //! Number of tasks successfully stolen counter_type steals_committed; //! Number of failed stealing attempts counter_type steals_failed; //! Number of failed attempts to lock victim's task pool counter_type thieves_conflicts; //! Number of times thief backed off because of the collision with the owner counter_type thief_backoffs; // Group: sg_affinity //! Number of tasks received from mailbox counter_type mails_received; //! Number of affinitized tasks executed by the owner /** Goes as "revoked" in statistics printout. **/ counter_type proxies_executed; //! Number of affinitized tasks intercepted by thieves counter_type proxies_stolen; //! Number of proxy bypasses by thieves during stealing counter_type proxies_bypassed; //! Number of affinitized tasks executed by the owner via scheduler bypass mechanism counter_type affinity_ignored; // Group: sg_arena //! Number of times the state of arena switched between "full" and "empty" counter_type gate_switches; //! Number of times workers left an arena and returned into the market counter_type arena_roundtrips; // !Average concurrency level of this arena counter_type avg_arena_concurrency; //! Average assigned priority counter_type avg_assigned_workers; // Group: sg_market //! Number of times workers left the market and returned into RML counter_type market_roundtrips; // Group; sg_prio //! Number of arena priority switches counter_type arena_prio_switches; //! Number of market priority switches counter_type market_prio_switches; //! Number of arena priority switches counter_type arena_prio_resets; //! Number of reference priority source fixups to avoid deadlock counter_type prio_ref_fixups; //! Average arena priority counter_type avg_arena_prio; //! Average market priority counter_type avg_market_prio; // Group; sg_prio_ex //! Number of times local task pools were winnowed counter_type prio_winnowings; //! Number of times secondary task pools were searched for top priority tasks counter_type prio_reloads; //! Number of times secondary task pools were abandoned by quitting workers counter_type prio_orphanings; //! Number of tasks offloaded into secondary task pools counter_type prio_tasks_offloaded; //! Number of tasks reloaded from secondary task pools counter_type prio_tasks_reloaded; // Constructor and helpers statistics_counters() { reset(); } void reset () { memset( this, 0, sizeof(statistics_counters) ); } counter_type& field ( size_t index ) { return reinterpret_cast(this)[index]; } const counter_type& field ( size_t index ) const { return reinterpret_cast(this)[index]; } static size_t size () { return sizeof(statistics_counters) / sizeof(counter_type); } const statistics_counters& operator += ( const statistics_counters& rhs ) { for ( size_t i = 0; i < size(); ++i ) field(i) += rhs.field(i); return *this; } }; // statistics_counters static const size_t workers_counters_total = (size_t)-1; static const size_t arena_counters_total = (size_t)-2; void dump_statistics ( const statistics_counters& c, size_t id ); } // namespace internal } // namespace tbb #else /* !__TBB_STATISTICS */ #define GATHER_STATISTIC(x) ((void)0) #endif /* !__TBB_STATISTICS */ #endif /* _TBB_tbb_statistics_H */ ================================================ FILE: benchmarks/tbb/tbb_stddef.h ================================================ /* Copyright 2005-2014 Intel Corporation. All Rights Reserved. This file is part of Threading Building Blocks. Threading Building Blocks is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. Threading Building Blocks is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Threading Building Blocks; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA As a special exception, you may use this file as part of a free software library without restriction. Specifically, if other files instantiate templates or use macros or inline functions from this file, or you compile this file and link it with other files to produce an executable, this file does not by itself cause the resulting executable to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the executable file might be covered by the GNU General Public License. */ #ifndef __TBB_tbb_stddef_H #define __TBB_tbb_stddef_H // Marketing-driven product version #define TBB_VERSION_MAJOR 4 #define TBB_VERSION_MINOR 3 // Engineering-focused interface version #define TBB_INTERFACE_VERSION 8000 #define TBB_INTERFACE_VERSION_MAJOR TBB_INTERFACE_VERSION/1000 // The oldest major interface version still supported // To be used in SONAME, manifests, etc. #define TBB_COMPATIBLE_INTERFACE_VERSION 2 #define __TBB_STRING_AUX(x) #x #define __TBB_STRING(x) __TBB_STRING_AUX(x) // We do not need defines below for resource processing on windows #if !defined RC_INVOKED // Define groups for Doxygen documentation /** * @defgroup algorithms Algorithms * @defgroup containers Containers * @defgroup memory_allocation Memory Allocation * @defgroup synchronization Synchronization * @defgroup timing Timing * @defgroup task_scheduling Task Scheduling */ // Simple text that is displayed on the main page of Doxygen documentation. /** * \mainpage Main Page * * Click the tabs above for information about the * -
Modules (groups of functionality) implemented by the library * - Classes provided by the library * - Files constituting the library. * . * Please note that significant part of TBB functionality is implemented in the form of * template functions, descriptions of which are not accessible on the Classes * tab. Use Modules or Namespace/Namespace Members * tabs to find them. * * Additional pieces of information can be found here * - \subpage concepts * . */ /** \page concepts TBB concepts A concept is a set of requirements to a type, which are necessary and sufficient for the type to model a particular behavior or a set of behaviors. Some concepts are specific to a particular algorithm (e.g. algorithm body), while other ones are common to several algorithms (e.g. range concept). All TBB algorithms make use of different classes implementing various concepts. Implementation classes are supplied by the user as type arguments of template parameters and/or as objects passed as function call arguments. The library provides predefined implementations of some concepts (e.g. several kinds of \ref range_req "ranges"), while other ones must always be implemented by the user. TBB defines a set of minimal requirements each concept must conform to. Here is the list of different concepts hyperlinked to the corresponding requirements specifications: - \subpage range_req - \subpage parallel_do_body_req - \subpage parallel_for_body_req - \subpage parallel_reduce_body_req - \subpage parallel_scan_body_req - \subpage parallel_sort_iter_req **/ // tbb_config.h should be included the first since it contains macro definitions used in other headers #include "tbb_config.h" #if _MSC_VER >=1400 #define __TBB_EXPORTED_FUNC __cdecl #define __TBB_EXPORTED_METHOD __thiscall #else #define __TBB_EXPORTED_FUNC #define __TBB_EXPORTED_METHOD #endif #if __INTEL_COMPILER || _MSC_VER #define __TBB_NOINLINE(decl) __declspec(noinline) decl #elif __GNUC__ #define __TBB_NOINLINE(decl) decl __attribute__ ((noinline)) #else #define __TBB_NOINLINE(decl) decl #endif #if __TBB_NOEXCEPT_PRESENT #define __TBB_NOEXCEPT(expression) noexcept(expression) #else #define __TBB_NOEXCEPT(expression) #endif #include /* Need size_t and ptrdiff_t */ #if _MSC_VER #define __TBB_tbb_windef_H #include "internal/_tbb_windef.h" #undef __TBB_tbb_windef_H #endif #if !defined(_MSC_VER) || _MSC_VER>=1600 #include #endif //! Type for an assertion handler typedef void(*assertion_handler_type)( const char* filename, int line, const char* expression, const char * comment ); #if TBB_USE_ASSERT #define __TBB_ASSERT_NS(predicate,message,ns) ((predicate)?((void)0) : ns::assertion_failure(__FILE__,__LINE__,#predicate,message)) //! Assert that x is true. /** If x is false, print assertion failure message. If the comment argument is not NULL, it is printed as part of the failure message. The comment argument has no other effect. */ #if __TBBMALLOC_BUILD namespace rml { namespace internal { #define __TBB_ASSERT(predicate,message) __TBB_ASSERT_NS(predicate,message,rml::internal) #else namespace tbb { #define __TBB_ASSERT(predicate,message) __TBB_ASSERT_NS(predicate,message,tbb) #endif #define __TBB_ASSERT_EX __TBB_ASSERT //! Set assertion handler and return previous value of it. assertion_handler_type __TBB_EXPORTED_FUNC set_assertion_handler( assertion_handler_type new_handler ); //! Process an assertion failure. /** Normally called from __TBB_ASSERT macro. If assertion handler is null, print message for assertion failure and abort. Otherwise call the assertion handler. */ void __TBB_EXPORTED_FUNC assertion_failure( const char* filename, int line, const char* expression, const char* comment ); #if __TBBMALLOC_BUILD }} // namespace rml::internal #else } // namespace tbb #endif #else /* !TBB_USE_ASSERT */ //! No-op version of __TBB_ASSERT. #define __TBB_ASSERT(predicate,comment) ((void)0) //! "Extended" version is useful to suppress warnings if a variable is only used with an assert #define __TBB_ASSERT_EX(predicate,comment) ((void)(1 && (predicate))) #endif /* !TBB_USE_ASSERT */ //! The namespace tbb contains all components of the library. namespace tbb { #if _MSC_VER && _MSC_VER<1600 namespace internal { typedef __int8 int8_t; typedef __int16 int16_t; typedef __int32 int32_t; typedef __int64 int64_t; typedef unsigned __int8 uint8_t; typedef unsigned __int16 uint16_t; typedef unsigned __int32 uint32_t; typedef unsigned __int64 uint64_t; } // namespace internal #else /* Posix */ namespace internal { using ::int8_t; using ::int16_t; using ::int32_t; using ::int64_t; using ::uint8_t; using ::uint16_t; using ::uint32_t; using ::uint64_t; } // namespace internal #endif /* Posix */ using std::size_t; using std::ptrdiff_t; //! The function returns the interface version of the TBB shared library being used. /** * The version it returns is determined at runtime, not at compile/link time. * So it can be different than the value of TBB_INTERFACE_VERSION obtained at compile time. */ extern "C" int __TBB_EXPORTED_FUNC TBB_runtime_interface_version(); //! Dummy type that distinguishes splitting constructor from copy constructor. /** * See description of parallel_for and parallel_reduce for example usages. * @ingroup algorithms */ class split { }; //! Type enables transmission of splitting proportion from partitioners to range objects /** * In order to make use of such facility Range objects must implement * splitting constructor with this type passed and initialize static * constant boolean field 'is_divisible_in_proportion' with the value * of 'true' */ class proportional_split { public: proportional_split(size_t _left = 1, size_t _right = 1) : my_left(_left), my_right(_right) { } proportional_split(split) : my_left(1), my_right(1) { } size_t left() const { return my_left; } size_t right() const { return my_right; } void set_proportion(size_t _left, size_t _right) { my_left = _left; my_right = _right; } // used when range does not support proportional split operator split() const { return split(); } private: size_t my_left, my_right; }; /** * @cond INTERNAL * @brief Identifiers declared inside namespace internal should never be used directly by client code. */ namespace internal { //! Compile-time constant that is upper bound on cache line/sector size. /** It should be used only in situations where having a compile-time upper bound is more useful than a run-time exact answer. @ingroup memory_allocation */ const size_t NFS_MaxLineSize = 128; /** Label for data that may be accessed from different threads, and that may eventually become wrapped in a formal atomic type. Note that no problems have yet been observed relating to the definition currently being empty, even if at least "volatile" would seem to be in order to avoid data sometimes temporarily hiding in a register (although "volatile" as a "poor man's atomic" lacks several other features of a proper atomic, some of which are now provided instead through specialized functions). Note that usage is intentionally compatible with a definition as qualifier "volatile", both as a way to have the compiler help enforce use of the label and to quickly rule out one potential issue. Note however that, with some architecture/compiler combinations, e.g. on IA-64 architecture, "volatile" also has non-portable memory semantics that are needlessly expensive for "relaxed" operations. Note that this must only be applied to data that will not change bit patterns when cast to/from an integral type of the same length; tbb::atomic must be used instead for, e.g., floating-point types. TODO: apply wherever relevant **/ #define __TBB_atomic // intentionally empty, see above template struct padded_base : T { char pad[S - R]; }; template struct padded_base : T {}; //! Pads type T to fill out to a multiple of cache line size. template struct padded : padded_base {}; //! Extended variant of the standard offsetof macro /** The standard offsetof macro is not sufficient for TBB as it can be used for POD-types only. The constant 0x1000 (not NULL) is necessary to appease GCC. **/ #define __TBB_offsetof(class_name, member_name) \ ((ptrdiff_t)&(reinterpret_cast(0x1000)->member_name) - 0x1000) //! Returns address of the object containing a member with the given name and address #define __TBB_get_object_ref(class_name, member_name, member_addr) \ (*reinterpret_cast((char*)member_addr - __TBB_offsetof(class_name, member_name))) //! Throws std::runtime_error with what() returning error_code description prefixed with aux_info void __TBB_EXPORTED_FUNC handle_perror( int error_code, const char* aux_info ); #if TBB_USE_EXCEPTIONS #define __TBB_TRY try #define __TBB_CATCH(e) catch(e) #define __TBB_THROW(e) throw e #define __TBB_RETHROW() throw #else /* !TBB_USE_EXCEPTIONS */ inline bool __TBB_false() { return false; } #define __TBB_TRY #define __TBB_CATCH(e) if ( tbb::internal::__TBB_false() ) #define __TBB_THROW(e) ((void)0) #define __TBB_RETHROW() ((void)0) #endif /* !TBB_USE_EXCEPTIONS */ //! Report a runtime warning. void __TBB_EXPORTED_FUNC runtime_warning( const char* format, ... ); #if TBB_USE_ASSERT static void* const poisoned_ptr = reinterpret_cast(-1); //! Set p to invalid pointer value. // Also works for regular (non-__TBB_atomic) pointers. template inline void poison_pointer( T* __TBB_atomic & p ) { p = reinterpret_cast(poisoned_ptr); } /** Expected to be used in assertions only, thus no empty form is defined. **/ template inline bool is_poisoned( T* p ) { return p == reinterpret_cast(poisoned_ptr); } #else template inline void poison_pointer( T* __TBB_atomic & ) {/*do nothing*/} #endif /* !TBB_USE_ASSERT */ //! Cast between unrelated pointer types. /** This method should be used sparingly as a last resort for dealing with situations that inherently break strict ISO C++ aliasing rules. */ // T is a pointer type because it will be explicitly provided by the programmer as a template argument; // U is a referent type to enable the compiler to check that "ptr" is a pointer, deducing U in the process. template inline T punned_cast( U* ptr ) { uintptr_t x = reinterpret_cast(ptr); return reinterpret_cast(x); } //! Base class for types that should not be assigned. class no_assign { // Deny assignment void operator=( const no_assign& ); public: #if __GNUC__ //! Explicitly define default construction, because otherwise gcc issues gratuitous warning. no_assign() {} #endif /* __GNUC__ */ }; //! Base class for types that should not be copied or assigned. class no_copy: no_assign { //! Deny copy construction no_copy( const no_copy& ); public: //! Allow default construction no_copy() {} }; #if TBB_DEPRECATED_MUTEX_COPYING class mutex_copy_deprecated_and_disabled {}; #else // By default various implementations of mutexes are not copy constructible // and not copy assignable. class mutex_copy_deprecated_and_disabled : no_copy {}; #endif //! A function to check if passed in pointer is aligned on a specific border template inline bool is_aligned(T* pointer, uintptr_t alignment) { return 0==((uintptr_t)pointer & (alignment-1)); } //! A function to check if passed integer is a power of 2 template inline bool is_power_of_two(integer_type arg) { return arg && (0 == (arg & (arg - 1))); } //! A function to compute arg modulo divisor where divisor is a power of 2. template inline argument_integer_type modulo_power_of_two(argument_integer_type arg, divisor_integer_type divisor) { // Divisor is assumed to be a power of two (which is valid for current uses). __TBB_ASSERT( is_power_of_two(divisor), "Divisor should be a power of two" ); return (arg & (divisor - 1)); } //! A function to determine if "arg is a multiplication of a number and a power of 2". // i.e. for strictly positive i and j, with j a power of 2, // determines whether i==j< inline bool is_power_of_two_factor(argument_integer_type arg, divisor_integer_type divisor) { // Divisor is assumed to be a power of two (which is valid for current uses). __TBB_ASSERT( is_power_of_two(divisor), "Divisor should be a power of two" ); return 0 == (arg & (arg - divisor)); } //! Utility template function to prevent "unused" warnings by various compilers. template void suppress_unused_warning( const T& ) {} // Struct to be used as a version tag for inline functions. /** Version tag can be necessary to prevent loader on Linux from using the wrong symbol in debug builds (when inline functions are compiled as out-of-line). **/ struct version_tag_v3 {}; typedef version_tag_v3 version_tag; } // internal } // tbb // Following is a set of classes and functions typically used in compile-time "metaprogramming". // TODO: move all that to a separate header #if __TBB_ALLOCATOR_TRAITS_PRESENT #include //for allocator_traits #endif #if __TBB_CPP11_RVALUE_REF_PRESENT || _LIBCPP_VERSION #include // for std::move #endif namespace tbb { namespace internal { //! Class for determining type of std::allocator::value_type. template struct allocator_type { typedef T value_type; }; #if _MSC_VER //! Microsoft std::allocator has non-standard extension that strips const from a type. template struct allocator_type { typedef T value_type; }; #endif // Ad-hoc implementation of true_type & false_type // Intended strictly for internal use! For public APIs (traits etc), use C++11 analogues. template struct bool_constant { static /*constexpr*/ const bool value = v; }; typedef bool_constant true_type; typedef bool_constant false_type; #if __TBB_ALLOCATOR_TRAITS_PRESENT using std::allocator_traits; #else template struct allocator_traits{ typedef tbb::internal::false_type propagate_on_container_move_assignment; }; #endif //! A template to select either 32-bit or 64-bit constant as compile time, depending on machine word size. template struct select_size_t_constant { //Explicit cast is needed to avoid compiler warnings about possible truncation. //The value of the right size, which is selected by ?:, is anyway not truncated or promoted. static const size_t value = (size_t)((sizeof(size_t)==sizeof(u)) ? u : ull); }; #if __TBB_CPP11_RVALUE_REF_PRESENT using std::move; #elif defined(_LIBCPP_NAMESPACE) // libc++ defines "pre-C++11 move" similarly to our; use it to avoid name conflicts in some cases. using std::_LIBCPP_NAMESPACE::move; #else template T& move( T& x ) { return x; } #endif template struct STATIC_ASSERTION_FAILED; template <> struct STATIC_ASSERTION_FAILED { enum {value=1};}; template<> struct STATIC_ASSERTION_FAILED; //intentionally left undefined to cause compile time error //! @endcond }} // namespace tbb::internal #if __TBB_STATIC_ASSERT_PRESENT #define __TBB_STATIC_ASSERT(condition,msg) static_assert(condition,msg) #else //please note condition is intentionally inverted to get a bit more understandable error msg #define __TBB_STATIC_ASSERT_IMPL1(condition,msg,line) \ enum {static_assert_on_line_##line = tbb::internal::STATIC_ASSERTION_FAILED::value} #define __TBB_STATIC_ASSERT_IMPL(condition,msg,line) __TBB_STATIC_ASSERT_IMPL1(condition,msg,line) //! Verify at compile time that passed in condition is hold #define __TBB_STATIC_ASSERT(condition,msg) __TBB_STATIC_ASSERT_IMPL(condition,msg,__LINE__) #endif #endif /* RC_INVOKED */ #endif /* __TBB_tbb_stddef_H */ ================================================ FILE: benchmarks/tbb/tbb_thread.cpp ================================================ /* Copyright 2005-2014 Intel Corporation. All Rights Reserved. This file is part of Threading Building Blocks. Threading Building Blocks is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. Threading Building Blocks is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Threading Building Blocks; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA As a special exception, you may use this file as part of a free software library without restriction. Specifically, if other files instantiate templates or use macros or inline functions from this file, or you compile this file and link it with other files to produce an executable, this file does not by itself cause the resulting executable to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the executable file might be covered by the GNU General Public License. */ #if _WIN32||_WIN64 #include // _beginthreadex() #endif #include #include "tbb_misc.h" // handle_win_error(), ThreadStackSize #include "tbb/tbb_stddef.h" #include "tbb/tbb_thread.h" #include "tbb/tbb_allocator.h" #include "governor.h" // default_num_threads() #if __TBB_WIN8UI_SUPPORT #include #endif namespace tbb { namespace internal { //! Allocate a closure void* allocate_closure_v3( size_t size ) { return allocate_via_handler_v3( size ); } //! Free a closure allocated by allocate_closure_v3 void free_closure_v3( void *ptr ) { deallocate_via_handler_v3( ptr ); } void tbb_thread_v3::join() { if (!joinable()) handle_perror( EINVAL, "tbb_thread::join" ); // Invalid argument if (this_tbb_thread::get_id() == get_id()) handle_perror( EDEADLK, "tbb_thread::join" ); // Resource deadlock avoided #if _WIN32||_WIN64 #if __TBB_WIN8UI_SUPPORT std::thread* thread_tmp=(std::thread*)my_thread_id; thread_tmp->join(); delete thread_tmp; #else // __TBB_WIN8UI_SUPPORT DWORD status = WaitForSingleObjectEx( my_handle, INFINITE, FALSE ); if ( status == WAIT_FAILED ) handle_win_error( GetLastError() ); BOOL close_stat = CloseHandle( my_handle ); if ( close_stat == 0 ) handle_win_error( GetLastError() ); my_thread_id = 0; #endif // __TBB_WIN8UI_SUPPORT #else int status = pthread_join( my_handle, NULL ); if( status ) handle_perror( status, "pthread_join" ); #endif // _WIN32||_WIN64 my_handle = 0; } void tbb_thread_v3::detach() { if (!joinable()) handle_perror( EINVAL, "tbb_thread::detach" ); // Invalid argument #if _WIN32||_WIN64 BOOL status = CloseHandle( my_handle ); if ( status == 0 ) handle_win_error( GetLastError() ); my_thread_id = 0; #else int status = pthread_detach( my_handle ); if( status ) handle_perror( status, "pthread_detach" ); #endif // _WIN32||_WIN64 my_handle = 0; } void tbb_thread_v3::internal_start( __TBB_NATIVE_THREAD_ROUTINE_PTR(start_routine), void* closure ) { #if _WIN32||_WIN64 #if __TBB_WIN8UI_SUPPORT std::thread* thread_tmp=new std::thread(start_routine, closure); my_handle = thread_tmp->native_handle(); // TODO: to find out the way to find thread_id without GetThreadId and other // desktop functions. // Now tbb_thread does have its own thread_id that stores std::thread object my_thread_id = (size_t)thread_tmp; #else unsigned thread_id; // The return type of _beginthreadex is "uintptr_t" on new MS compilers, // and 'unsigned long' on old MS compilers. uintptr_t works for both. uintptr_t status = _beginthreadex( NULL, ThreadStackSize, start_routine, closure, 0, &thread_id ); if( status==0 ) handle_perror(errno,"__beginthreadex"); else { my_handle = (HANDLE)status; my_thread_id = thread_id; } #endif #else pthread_t thread_handle; int status; pthread_attr_t stack_size; status = pthread_attr_init( &stack_size ); if( status ) handle_perror( status, "pthread_attr_init" ); status = pthread_attr_setstacksize( &stack_size, ThreadStackSize ); if( status ) handle_perror( status, "pthread_attr_setstacksize" ); status = pthread_create( &thread_handle, &stack_size, start_routine, closure ); if( status ) handle_perror( status, "pthread_create" ); status = pthread_attr_destroy( &stack_size ); if( status ) handle_perror( status, "pthread_attr_destroy" ); my_handle = thread_handle; #endif // _WIN32||_WIN64 } unsigned tbb_thread_v3::hardware_concurrency() __TBB_NOEXCEPT(true) { return governor::default_num_threads(); } tbb_thread_v3::id thread_get_id_v3() { #if _WIN32||_WIN64 return tbb_thread_v3::id( GetCurrentThreadId() ); #else return tbb_thread_v3::id( pthread_self() ); #endif // _WIN32||_WIN64 } void move_v3( tbb_thread_v3& t1, tbb_thread_v3& t2 ) { if (t1.joinable()) t1.detach(); t1.my_handle = t2.my_handle; t2.my_handle = 0; #if _WIN32||_WIN64 t1.my_thread_id = t2.my_thread_id; t2.my_thread_id = 0; #endif // _WIN32||_WIN64 } void thread_yield_v3() { __TBB_Yield(); } void thread_sleep_v3(const tick_count::interval_t &i) { #if _WIN32||_WIN64 tick_count t0 = tick_count::now(); tick_count t1 = t0; for(;;) { double remainder = (i-(t1-t0)).seconds()*1e3; // milliseconds remaining to sleep if( remainder<=0 ) break; DWORD t = remainder>=INFINITE ? INFINITE-1 : DWORD(remainder); #if !__TBB_WIN8UI_SUPPORT Sleep( t ); #else std::chrono::milliseconds sleep_time( t ); std::this_thread::sleep_for( sleep_time ); #endif t1 = tick_count::now(); } #else struct timespec req; double sec = i.seconds(); req.tv_sec = static_cast(sec); req.tv_nsec = static_cast( (sec - req.tv_sec)*1e9 ); nanosleep(&req, NULL); #endif // _WIN32||_WIN64 } } // internal } // tbb ================================================ FILE: benchmarks/tbb/tbb_thread.h ================================================ /* Copyright 2005-2014 Intel Corporation. All Rights Reserved. This file is part of Threading Building Blocks. Threading Building Blocks is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. Threading Building Blocks is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Threading Building Blocks; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA As a special exception, you may use this file as part of a free software library without restriction. Specifically, if other files instantiate templates or use macros or inline functions from this file, or you compile this file and link it with other files to produce an executable, this file does not by itself cause the resulting executable to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the executable file might be covered by the GNU General Public License. */ #ifndef __TBB_tbb_thread_H #define __TBB_tbb_thread_H #include "tbb_stddef.h" #if _WIN32||_WIN64 #include "machine/windows_api.h" #define __TBB_NATIVE_THREAD_ROUTINE unsigned WINAPI #define __TBB_NATIVE_THREAD_ROUTINE_PTR(r) unsigned (WINAPI* r)( void* ) #if __TBB_WIN8UI_SUPPORT typedef size_t thread_id_type; #else // __TBB_WIN8UI_SUPPORT typedef DWORD thread_id_type; #endif // __TBB_WIN8UI_SUPPORT #else #define __TBB_NATIVE_THREAD_ROUTINE void* #define __TBB_NATIVE_THREAD_ROUTINE_PTR(r) void* (*r)( void* ) #include #endif // _WIN32||_WIN64 #include "tick_count.h" #if !TBB_USE_EXCEPTIONS && _MSC_VER // Suppress "C++ exception handler used, but unwind semantics are not enabled" warning in STL headers #pragma warning (push) #pragma warning (disable: 4530) #endif #include #if !TBB_USE_EXCEPTIONS && _MSC_VER #pragma warning (pop) #endif namespace tbb { namespace internal { class tbb_thread_v3; } inline void swap( internal::tbb_thread_v3& t1, internal::tbb_thread_v3& t2 ) __TBB_NOEXCEPT(true); namespace internal { //! Allocate a closure void* __TBB_EXPORTED_FUNC allocate_closure_v3( size_t size ); //! Free a closure allocated by allocate_closure_v3 void __TBB_EXPORTED_FUNC free_closure_v3( void* ); struct thread_closure_base { void* operator new( size_t size ) {return allocate_closure_v3(size);} void operator delete( void* ptr ) {free_closure_v3(ptr);} }; template struct thread_closure_0: thread_closure_base { F function; static __TBB_NATIVE_THREAD_ROUTINE start_routine( void* c ) { thread_closure_0 *self = static_cast(c); self->function(); delete self; return 0; } thread_closure_0( const F& f ) : function(f) {} }; //! Structure used to pass user function with 1 argument to thread. template struct thread_closure_1: thread_closure_base { F function; X arg1; //! Routine passed to Windows's _beginthreadex by thread::internal_start() inside tbb.dll static __TBB_NATIVE_THREAD_ROUTINE start_routine( void* c ) { thread_closure_1 *self = static_cast(c); self->function(self->arg1); delete self; return 0; } thread_closure_1( const F& f, const X& x ) : function(f), arg1(x) {} }; template struct thread_closure_2: thread_closure_base { F function; X arg1; Y arg2; //! Routine passed to Windows's _beginthreadex by thread::internal_start() inside tbb.dll static __TBB_NATIVE_THREAD_ROUTINE start_routine( void* c ) { thread_closure_2 *self = static_cast(c); self->function(self->arg1, self->arg2); delete self; return 0; } thread_closure_2( const F& f, const X& x, const Y& y ) : function(f), arg1(x), arg2(y) {} }; //! Versioned thread class. class tbb_thread_v3 { #if __TBB_IF_NO_COPY_CTOR_MOVE_SEMANTICS_BROKEN // Workaround for a compiler bug: declaring the copy constructor as public // enables use of the moving constructor. // The definition is not provided in order to prohibit copying. public: #endif tbb_thread_v3(const tbb_thread_v3&); // = delete; // Deny access public: #if _WIN32||_WIN64 typedef HANDLE native_handle_type; #else typedef pthread_t native_handle_type; #endif // _WIN32||_WIN64 class id; //! Constructs a thread object that does not represent a thread of execution. tbb_thread_v3() __TBB_NOEXCEPT(true) : my_handle(0) #if _WIN32||_WIN64 , my_thread_id(0) #endif // _WIN32||_WIN64 {} //! Constructs an object and executes f() in a new thread template explicit tbb_thread_v3(F f) { typedef internal::thread_closure_0 closure_type; internal_start(closure_type::start_routine, new closure_type(f)); } //! Constructs an object and executes f(x) in a new thread template tbb_thread_v3(F f, X x) { typedef internal::thread_closure_1 closure_type; internal_start(closure_type::start_routine, new closure_type(f,x)); } //! Constructs an object and executes f(x,y) in a new thread template tbb_thread_v3(F f, X x, Y y) { typedef internal::thread_closure_2 closure_type; internal_start(closure_type::start_routine, new closure_type(f,x,y)); } #if __TBB_CPP11_RVALUE_REF_PRESENT tbb_thread_v3(tbb_thread_v3&& x) __TBB_NOEXCEPT(true) : my_handle(x.my_handle) #if _WIN32||_WIN64 , my_thread_id(x.my_thread_id) #endif { x.internal_wipe(); } tbb_thread_v3& operator=(tbb_thread_v3&& x) __TBB_NOEXCEPT(true) { internal_move(x); return *this; } private: tbb_thread_v3& operator=(const tbb_thread_v3& x); // = delete; public: #else // __TBB_CPP11_RVALUE_REF_PRESENT tbb_thread_v3& operator=(tbb_thread_v3& x) { internal_move(x); return *this; } #endif // __TBB_CPP11_RVALUE_REF_PRESENT void swap( tbb_thread_v3& t ) __TBB_NOEXCEPT(true) {tbb::swap( *this, t );} bool joinable() const __TBB_NOEXCEPT(true) {return my_handle!=0; } //! The completion of the thread represented by *this happens before join() returns. void __TBB_EXPORTED_METHOD join(); //! When detach() returns, *this no longer represents the possibly continuing thread of execution. void __TBB_EXPORTED_METHOD detach(); ~tbb_thread_v3() {if( joinable() ) detach();} inline id get_id() const __TBB_NOEXCEPT(true); native_handle_type native_handle() { return my_handle; } //! The number of hardware thread contexts. /** Before TBB 3.0 U4 this methods returned the number of logical CPU in the system. Currently on Windows, Linux and FreeBSD it returns the number of logical CPUs available to the current process in accordance with its affinity mask. NOTE: The return value of this method never changes after its first invocation. This means that changes in the process affinity mask that took place after this method was first invoked will not affect the number of worker threads in the TBB worker threads pool. **/ static unsigned __TBB_EXPORTED_FUNC hardware_concurrency() __TBB_NOEXCEPT(true); private: native_handle_type my_handle; #if _WIN32||_WIN64 thread_id_type my_thread_id; #endif // _WIN32||_WIN64 void internal_wipe() __TBB_NOEXCEPT(true) { my_handle = 0; #if _WIN32||_WIN64 my_thread_id = 0; #endif } void internal_move(tbb_thread_v3& x) __TBB_NOEXCEPT(true) { if (joinable()) detach(); my_handle = x.my_handle; #if _WIN32||_WIN64 my_thread_id = x.my_thread_id; #endif // _WIN32||_WIN64 x.internal_wipe(); } /** Runs start_routine(closure) on another thread and sets my_handle to the handle of the created thread. */ void __TBB_EXPORTED_METHOD internal_start( __TBB_NATIVE_THREAD_ROUTINE_PTR(start_routine), void* closure ); friend void __TBB_EXPORTED_FUNC move_v3( tbb_thread_v3& t1, tbb_thread_v3& t2 ); friend void tbb::swap( tbb_thread_v3& t1, tbb_thread_v3& t2 ) __TBB_NOEXCEPT(true); }; class tbb_thread_v3::id { #if _WIN32||_WIN64 thread_id_type my_id; id( thread_id_type id_ ) : my_id(id_) {} #else pthread_t my_id; id( pthread_t id_ ) : my_id(id_) {} #endif // _WIN32||_WIN64 friend class tbb_thread_v3; public: id() __TBB_NOEXCEPT(true) : my_id(0) {} friend bool operator==( tbb_thread_v3::id x, tbb_thread_v3::id y ) __TBB_NOEXCEPT(true); friend bool operator!=( tbb_thread_v3::id x, tbb_thread_v3::id y ) __TBB_NOEXCEPT(true); friend bool operator<( tbb_thread_v3::id x, tbb_thread_v3::id y ) __TBB_NOEXCEPT(true); friend bool operator<=( tbb_thread_v3::id x, tbb_thread_v3::id y ) __TBB_NOEXCEPT(true); friend bool operator>( tbb_thread_v3::id x, tbb_thread_v3::id y ) __TBB_NOEXCEPT(true); friend bool operator>=( tbb_thread_v3::id x, tbb_thread_v3::id y ) __TBB_NOEXCEPT(true); template friend std::basic_ostream& operator<< (std::basic_ostream &out, tbb_thread_v3::id id) { out << id.my_id; return out; } friend tbb_thread_v3::id __TBB_EXPORTED_FUNC thread_get_id_v3(); }; // tbb_thread_v3::id tbb_thread_v3::id tbb_thread_v3::get_id() const __TBB_NOEXCEPT(true) { #if _WIN32||_WIN64 return id(my_thread_id); #else return id(my_handle); #endif // _WIN32||_WIN64 } void __TBB_EXPORTED_FUNC move_v3( tbb_thread_v3& t1, tbb_thread_v3& t2 ); tbb_thread_v3::id __TBB_EXPORTED_FUNC thread_get_id_v3(); void __TBB_EXPORTED_FUNC thread_yield_v3(); void __TBB_EXPORTED_FUNC thread_sleep_v3(const tick_count::interval_t &i); inline bool operator==(tbb_thread_v3::id x, tbb_thread_v3::id y) __TBB_NOEXCEPT(true) { return x.my_id == y.my_id; } inline bool operator!=(tbb_thread_v3::id x, tbb_thread_v3::id y) __TBB_NOEXCEPT(true) { return x.my_id != y.my_id; } inline bool operator<(tbb_thread_v3::id x, tbb_thread_v3::id y) __TBB_NOEXCEPT(true) { return x.my_id < y.my_id; } inline bool operator<=(tbb_thread_v3::id x, tbb_thread_v3::id y) __TBB_NOEXCEPT(true) { return x.my_id <= y.my_id; } inline bool operator>(tbb_thread_v3::id x, tbb_thread_v3::id y) __TBB_NOEXCEPT(true) { return x.my_id > y.my_id; } inline bool operator>=(tbb_thread_v3::id x, tbb_thread_v3::id y) __TBB_NOEXCEPT(true) { return x.my_id >= y.my_id; } } // namespace internal; //! Users reference thread class by name tbb_thread typedef internal::tbb_thread_v3 tbb_thread; using internal::operator==; using internal::operator!=; using internal::operator<; using internal::operator>; using internal::operator<=; using internal::operator>=; inline void move( tbb_thread& t1, tbb_thread& t2 ) { internal::move_v3(t1, t2); } inline void swap( internal::tbb_thread_v3& t1, internal::tbb_thread_v3& t2 ) __TBB_NOEXCEPT(true) { tbb::tbb_thread::native_handle_type h = t1.my_handle; t1.my_handle = t2.my_handle; t2.my_handle = h; #if _WIN32||_WIN64 thread_id_type i = t1.my_thread_id; t1.my_thread_id = t2.my_thread_id; t2.my_thread_id = i; #endif /* _WIN32||_WIN64 */ } namespace this_tbb_thread { inline tbb_thread::id get_id() { return internal::thread_get_id_v3(); } //! Offers the operating system the opportunity to schedule another thread. inline void yield() { internal::thread_yield_v3(); } //! The current thread blocks at least until the time specified. inline void sleep(const tick_count::interval_t &i) { internal::thread_sleep_v3(i); } } // namespace this_tbb_thread } // namespace tbb #endif /* __TBB_tbb_thread_H */ ================================================ FILE: benchmarks/tbb/tbb_version.h ================================================ /* Copyright 2005-2014 Intel Corporation. All Rights Reserved. This file is part of Threading Building Blocks. Threading Building Blocks is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. Threading Building Blocks is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Threading Building Blocks; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA As a special exception, you may use this file as part of a free software library without restriction. Specifically, if other files instantiate templates or use macros or inline functions from this file, or you compile this file and link it with other files to produce an executable, this file does not by itself cause the resulting executable to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the executable file might be covered by the GNU General Public License. */ // Please define version number in the file: #include "tbb/tbb_stddef.h" // And don't touch anything below #ifndef ENDL #define ENDL "\n" #endif #include "version_string.ver" #ifndef __TBB_VERSION_STRINGS #pragma message("Warning: version_string.ver isn't generated properly by version_info.sh script!") // here is an example of macros value: #define __TBB_VERSION_STRINGS \ "TBB: BUILD_HOST\tUnknown\n" \ "TBB: BUILD_ARCH\tUnknown\n" \ "TBB: BUILD_OS\t\tUnknown\n" \ "TBB: BUILD_CL\t\tUnknown\n" \ "TBB: BUILD_COMPILER\tUnknown\n" \ "TBB: BUILD_COMMAND\tUnknown\n" #endif #ifndef __TBB_DATETIME #ifdef RC_INVOKED #define __TBB_DATETIME "Unknown" #else #define __TBB_DATETIME __DATE__ __TIME__ #endif #endif #define __TBB_VERSION_NUMBER(N) #N ": VERSION\t\t" __TBB_STRING(TBB_VERSION_MAJOR.TBB_VERSION_MINOR) ENDL #define __TBB_INTERFACE_VERSION_NUMBER(N) #N ": INTERFACE VERSION\t" __TBB_STRING(TBB_INTERFACE_VERSION) ENDL #define __TBB_VERSION_DATETIME(N) #N ": BUILD_DATE\t\t" __TBB_DATETIME ENDL #ifndef TBB_USE_DEBUG #define __TBB_VERSION_USE_DEBUG(N) #N ": TBB_USE_DEBUG\tundefined" ENDL #elif TBB_USE_DEBUG==0 #define __TBB_VERSION_USE_DEBUG(N) #N ": TBB_USE_DEBUG\t0" ENDL #elif TBB_USE_DEBUG==1 #define __TBB_VERSION_USE_DEBUG(N) #N ": TBB_USE_DEBUG\t1" ENDL #elif TBB_USE_DEBUG==2 #define __TBB_VERSION_USE_DEBUG(N) #N ": TBB_USE_DEBUG\t2" ENDL #else #error Unexpected value for TBB_USE_DEBUG #endif /* Make __TBB_VERSION_USE_ASSERT and __TBB_VERSION_DO_NOTIFY empty for rc * because rc from VS2005 crashed with fatal error RC10056 for too complex * macros (for example, when __TBB_CPF_BUILD is enabled). * All information is available in BUILD_COMMAND anyway. */ #ifdef RC_INVOKED #define __TBB_VERSION_USE_ASSERT(N) #else // RC_INVOKED #ifndef TBB_USE_ASSERT #define __TBB_VERSION_USE_ASSERT(N) #N ": TBB_USE_ASSERT\tundefined" ENDL #elif TBB_USE_ASSERT==0 #define __TBB_VERSION_USE_ASSERT(N) #N ": TBB_USE_ASSERT\t0" ENDL #elif TBB_USE_ASSERT==1 #define __TBB_VERSION_USE_ASSERT(N) #N ": TBB_USE_ASSERT\t1" ENDL #elif TBB_USE_ASSERT==2 #define __TBB_VERSION_USE_ASSERT(N) #N ": TBB_USE_ASSERT\t2" ENDL #else #error Unexpected value for TBB_USE_ASSERT #endif #endif // RC_INVOKED #ifndef __TBB_CPF_BUILD #define __TBB_VERSION_TBB_PREVIEW_BINARY(N) #else #define __TBB_VERSION_TBB_PREVIEW_BINARY(N) #N ": TBB_PREVIEW_BINARY\t1" ENDL #endif #ifdef RC_INVOKED #define __TBB_VERSION_DO_NOTIFY(N) #else #ifndef DO_ITT_NOTIFY #define __TBB_VERSION_DO_NOTIFY(N) #N ": DO_ITT_NOTIFY\tundefined" ENDL #elif DO_ITT_NOTIFY==1 #define __TBB_VERSION_DO_NOTIFY(N) #N ": DO_ITT_NOTIFY\t1" ENDL #elif DO_ITT_NOTIFY==0 #define __TBB_VERSION_DO_NOTIFY(N) #else #error Unexpected value for DO_ITT_NOTIFY #endif #endif // RC_INVOKED #define TBB_VERSION_STRINGS_P(N) __TBB_VERSION_NUMBER(N) __TBB_INTERFACE_VERSION_NUMBER(N) __TBB_VERSION_DATETIME(N) __TBB_VERSION_STRINGS(N) __TBB_VERSION_USE_DEBUG(N) __TBB_VERSION_USE_ASSERT(N) __TBB_VERSION_TBB_PREVIEW_BINARY(N) __TBB_VERSION_DO_NOTIFY(N) #define TBB_VERSION_STRINGS TBB_VERSION_STRINGS_P(TBB) #define TBBMALLOC_VERSION_STRINGS TBB_VERSION_STRINGS_P(TBBmalloc) // numbers #ifndef __TBB_VERSION_YMD #define __TBB_VERSION_YMD 0, 0 #endif #define TBB_VERNUMBERS TBB_VERSION_MAJOR, TBB_VERSION_MINOR, __TBB_VERSION_YMD #define TBB_VERSION __TBB_STRING(TBB_VERNUMBERS) ================================================ FILE: benchmarks/tbb/tbbmalloc_proxy.h ================================================ /* Copyright 2005-2014 Intel Corporation. All Rights Reserved. This file is part of Threading Building Blocks. Threading Building Blocks is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. Threading Building Blocks is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Threading Building Blocks; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA As a special exception, you may use this file as part of a free software library without restriction. Specifically, if other files instantiate templates or use macros or inline functions from this file, or you compile this file and link it with other files to produce an executable, this file does not by itself cause the resulting executable to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the executable file might be covered by the GNU General Public License. */ /* Replacing the standard memory allocation routines in Microsoft* C/C++ RTL (malloc/free, global new/delete, etc.) with the TBB memory allocator. Include the following header to a source of any binary which is loaded during application startup #include "tbb/tbbmalloc_proxy.h" or add following parameters to the linker options for the binary which is loaded during application startup. It can be either exe-file or dll. For win32 tbbmalloc_proxy.lib /INCLUDE:"___TBB_malloc_proxy" win64 tbbmalloc_proxy.lib /INCLUDE:"__TBB_malloc_proxy" */ #ifndef __TBB_tbbmalloc_proxy_H #define __TBB_tbbmalloc_proxy_H #if _MSC_VER #ifdef _DEBUG #pragma comment(lib, "tbbmalloc_proxy_debug.lib") #else #pragma comment(lib, "tbbmalloc_proxy.lib") #endif #if defined(_WIN64) #pragma comment(linker, "/include:__TBB_malloc_proxy") #else #pragma comment(linker, "/include:___TBB_malloc_proxy") #endif #else /* Primarily to support MinGW */ extern "C" void __TBB_malloc_proxy(); struct __TBB_malloc_proxy_caller { __TBB_malloc_proxy_caller() { __TBB_malloc_proxy(); } } volatile __TBB_malloc_proxy_helper_object; #endif // _MSC_VER #endif //__TBB_tbbmalloc_proxy_H ================================================ FILE: benchmarks/tbb/tick_count.h ================================================ /* Copyright 2005-2014 Intel Corporation. All Rights Reserved. This file is part of Threading Building Blocks. Threading Building Blocks is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. Threading Building Blocks is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Threading Building Blocks; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA As a special exception, you may use this file as part of a free software library without restriction. Specifically, if other files instantiate templates or use macros or inline functions from this file, or you compile this file and link it with other files to produce an executable, this file does not by itself cause the resulting executable to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the executable file might be covered by the GNU General Public License. */ #ifndef __TBB_tick_count_H #define __TBB_tick_count_H #include "tbb_stddef.h" #if _WIN32||_WIN64 #include "machine/windows_api.h" #elif __linux__ #include #else /* generic Unix */ #include #endif /* (choice of OS) */ namespace tbb { //! Absolute timestamp /** @ingroup timing */ class tick_count { public: //! Relative time interval. class interval_t { long long value; explicit interval_t( long long value_ ) : value(value_) {} public: //! Construct a time interval representing zero time duration interval_t() : value(0) {}; //! Construct a time interval representing sec seconds time duration explicit interval_t( double sec ); //! Return the length of a time interval in seconds double seconds() const; friend class tbb::tick_count; //! Extract the intervals from the tick_counts and subtract them. friend interval_t operator-( const tick_count& t1, const tick_count& t0 ); //! Add two intervals. friend interval_t operator+( const interval_t& i, const interval_t& j ) { return interval_t(i.value+j.value); } //! Subtract two intervals. friend interval_t operator-( const interval_t& i, const interval_t& j ) { return interval_t(i.value-j.value); } //! Accumulation operator interval_t& operator+=( const interval_t& i ) {value += i.value; return *this;} //! Subtraction operator interval_t& operator-=( const interval_t& i ) {value -= i.value; return *this;} private: static long long ticks_per_second(){ #if _WIN32||_WIN64 LARGE_INTEGER qpfreq; int rval = QueryPerformanceFrequency(&qpfreq); __TBB_ASSERT_EX(rval, "QueryPerformanceFrequency returned zero"); return static_cast(qpfreq.QuadPart); #elif __linux__ return static_cast(1E9); #else /* generic Unix */ return static_cast(1E6); #endif /* (choice of OS) */ } }; //! Construct an absolute timestamp initialized to zero. tick_count() : my_count(0) {}; //! Return current time. static tick_count now(); //! Subtract two timestamps to get the time interval between friend interval_t operator-( const tick_count& t1, const tick_count& t0 ); //! Return the resolution of the clock in seconds per tick. static double resolution() { return 1.0 / interval_t::ticks_per_second(); } private: long long my_count; }; inline tick_count tick_count::now() { tick_count result; #if _WIN32||_WIN64 LARGE_INTEGER qpcnt; int rval = QueryPerformanceCounter(&qpcnt); __TBB_ASSERT_EX(rval, "QueryPerformanceCounter failed"); result.my_count = qpcnt.QuadPart; #elif __linux__ struct timespec ts; int status = clock_gettime( CLOCK_REALTIME, &ts ); __TBB_ASSERT_EX( status==0, "CLOCK_REALTIME not supported" ); result.my_count = static_cast(1000000000UL)*static_cast(ts.tv_sec) + static_cast(ts.tv_nsec); #else /* generic Unix */ struct timeval tv; int status = gettimeofday(&tv, NULL); __TBB_ASSERT_EX( status==0, "gettimeofday failed" ); result.my_count = static_cast(1000000)*static_cast(tv.tv_sec) + static_cast(tv.tv_usec); #endif /*(choice of OS) */ return result; } inline tick_count::interval_t::interval_t( double sec ) { value = static_cast(sec*interval_t::ticks_per_second()); } inline tick_count::interval_t operator-( const tick_count& t1, const tick_count& t0 ) { return tick_count::interval_t( t1.my_count-t0.my_count ); } inline double tick_count::interval_t::seconds() const { return value*tick_count::resolution(); } } // namespace tbb #endif /* __TBB_tick_count_H */ ================================================ FILE: benchmarks/tbb/tls.h ================================================ /* Copyright 2005-2014 Intel Corporation. All Rights Reserved. This file is part of Threading Building Blocks. Threading Building Blocks is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. Threading Building Blocks is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Threading Building Blocks; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA As a special exception, you may use this file as part of a free software library without restriction. Specifically, if other files instantiate templates or use macros or inline functions from this file, or you compile this file and link it with other files to produce an executable, this file does not by itself cause the resulting executable to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the executable file might be covered by the GNU General Public License. */ #ifndef _TBB_tls_H #define _TBB_tls_H #if USE_PTHREAD #include #else /* assume USE_WINTHREAD */ #include "tbb/machine/windows_api.h" #endif namespace tbb { namespace internal { typedef void (*tls_dtor_t)(void*); //! Basic cross-platform wrapper class for TLS operations. template class basic_tls { #if USE_PTHREAD typedef pthread_key_t tls_key_t; public: int create( tls_dtor_t dtor = NULL ) { return pthread_key_create(&my_key, dtor); } int destroy() { return pthread_key_delete(my_key); } void set( T value ) { pthread_setspecific(my_key, (void*)value); } T get() { return (T)pthread_getspecific(my_key); } #else /* USE_WINTHREAD */ typedef DWORD tls_key_t; public: #if !__TBB_WIN8UI_SUPPORT int create() { tls_key_t tmp = TlsAlloc(); if( tmp==TLS_OUT_OF_INDEXES ) return TLS_OUT_OF_INDEXES; my_key = tmp; return 0; } int destroy() { TlsFree(my_key); my_key=0; return 0; } void set( T value ) { TlsSetValue(my_key, (LPVOID)value); } T get() { return (T)TlsGetValue(my_key); } #else /*!__TBB_WIN8UI_SUPPORT*/ int create() { tls_key_t tmp = FlsAlloc(NULL); if( tmp== (DWORD)0xFFFFFFFF ) return (DWORD)0xFFFFFFFF; my_key = tmp; return 0; } int destroy() { FlsFree(my_key); my_key=0; return 0; } void set( T value ) { FlsSetValue(my_key, (LPVOID)value); } T get() { return (T)FlsGetValue(my_key); } #endif /* !__TBB_WIN8UI_SUPPORT */ #endif /* USE_WINTHREAD */ private: tls_key_t my_key; }; //! More advanced TLS support template class. /** It supports RAII and to some extent mimic __declspec(thread) variables. */ template class tls : public basic_tls { typedef basic_tls base; public: tls() { base::create(); } ~tls() { base::destroy(); } T operator=(T value) { base::set(value); return value; } operator T() { return base::get(); } }; template class tls : basic_tls { typedef basic_tls base; static void internal_dtor(void* ptr) { if (ptr) delete (T*)ptr; } T* internal_get() { T* result = base::get(); if (!result) { result = new T; base::set(result); } return result; } public: tls() { #if USE_PTHREAD base::create( internal_dtor ); #else base::create(); #endif } ~tls() { base::destroy(); } T* operator=(T* value) { base::set(value); return value; } operator T*() { return internal_get(); } T* operator->() { return internal_get(); } T& operator*() { return *internal_get(); } }; } // namespace internal } // namespace tbb #endif /* _TBB_tls_H */ ================================================ FILE: benchmarks/tbb/tools_api/disable_warnings.h ================================================ /* Copyright 2005-2014 Intel Corporation. All Rights Reserved. This file is part of Threading Building Blocks. Threading Building Blocks is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. Threading Building Blocks is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Threading Building Blocks; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA As a special exception, you may use this file as part of a free software library without restriction. Specifically, if other files instantiate templates or use macros or inline functions from this file, or you compile this file and link it with other files to produce an executable, this file does not by itself cause the resulting executable to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the executable file might be covered by the GNU General Public License. */ #include "ittnotify_config.h" #if ITT_PLATFORM==ITT_PLATFORM_WIN #pragma warning (disable: 593) /* parameter "XXXX" was set but never used */ #pragma warning (disable: 344) /* typedef name has already been declared (with same type) */ #pragma warning (disable: 174) /* expression has no effect */ #pragma warning (disable: 4127) /* conditional expression is constant */ #pragma warning (disable: 4306) /* conversion from '?' to '?' of greater size */ #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ #if defined __INTEL_COMPILER #pragma warning (disable: 869) /* parameter "XXXXX" was never referenced */ #pragma warning (disable: 1418) /* external function definition with no prior declaration */ #pragma warning (disable: 1419) /* external declaration in primary source file */ #endif /* __INTEL_COMPILER */ ================================================ FILE: benchmarks/tbb/tools_api/internal/ittnotify.h ================================================ /* Copyright 2005-2014 Intel Corporation. All Rights Reserved. This file is part of Threading Building Blocks. Threading Building Blocks is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. Threading Building Blocks is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Threading Building Blocks; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA As a special exception, you may use this file as part of a free software library without restriction. Specifically, if other files instantiate templates or use macros or inline functions from this file, or you compile this file and link it with other files to produce an executable, this file does not by itself cause the resulting executable to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the executable file might be covered by the GNU General Public License. */ #ifndef _INTERNAL_ITTNOTIFY_H_ #define _INTERNAL_ITTNOTIFY_H_ /** * @file * @brief Internal User API functions and types */ /** @cond exclude_from_documentation */ #ifndef ITT_OS_WIN # define ITT_OS_WIN 1 #endif /* ITT_OS_WIN */ #ifndef ITT_OS_LINUX # define ITT_OS_LINUX 2 #endif /* ITT_OS_LINUX */ #ifndef ITT_OS_MAC # define ITT_OS_MAC 3 #endif /* ITT_OS_MAC */ #ifndef ITT_OS # if defined WIN32 || defined _WIN32 # define ITT_OS ITT_OS_WIN # elif defined( __APPLE__ ) && defined( __MACH__ ) # define ITT_OS ITT_OS_MAC # else # define ITT_OS ITT_OS_LINUX # endif #endif /* ITT_OS */ #ifndef ITT_PLATFORM_WIN # define ITT_PLATFORM_WIN 1 #endif /* ITT_PLATFORM_WIN */ #ifndef ITT_PLATFORM_POSIX # define ITT_PLATFORM_POSIX 2 #endif /* ITT_PLATFORM_POSIX */ #ifndef ITT_PLATFORM_MAC # define ITT_PLATFORM_MAC 3 #endif /* ITT_PLATFORM_MAC */ #ifndef ITT_PLATFORM # if ITT_OS==ITT_OS_WIN # define ITT_PLATFORM ITT_PLATFORM_WIN # elif ITT_OS==ITT_OS_MAC # define ITT_PLATFORM ITT_PLATFORM_MAC # else # define ITT_PLATFORM ITT_PLATFORM_POSIX # endif #endif /* ITT_PLATFORM */ #if defined(_UNICODE) && !defined(UNICODE) #define UNICODE #endif #include #if ITT_PLATFORM==ITT_PLATFORM_WIN #include #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ #include #if defined(UNICODE) || defined(_UNICODE) #include #endif /* UNICODE || _UNICODE */ #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ #ifndef CDECL # if ITT_PLATFORM==ITT_PLATFORM_WIN # define CDECL __cdecl # else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ # if defined _M_IX86 || defined __i386__ # define CDECL __attribute__ ((cdecl)) # else /* _M_IX86 || __i386__ */ # define CDECL /* actual only on x86 platform */ # endif /* _M_IX86 || __i386__ */ # endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ #endif /* CDECL */ #ifndef STDCALL # if ITT_PLATFORM==ITT_PLATFORM_WIN # define STDCALL __stdcall # else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ # if defined _M_IX86 || defined __i386__ # define STDCALL __attribute__ ((stdcall)) # else /* _M_IX86 || __i386__ */ # define STDCALL /* supported only on x86 platform */ # endif /* _M_IX86 || __i386__ */ # endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ #endif /* STDCALL */ #define ITTAPI CDECL #define LIBITTAPI CDECL /* TODO: Temporary for compatibility! */ #define ITTAPI_CALL CDECL #define LIBITTAPI_CALL CDECL #if ITT_PLATFORM==ITT_PLATFORM_WIN /* use __forceinline (VC++ specific) */ #define ITT_INLINE __forceinline #define ITT_INLINE_ATTRIBUTE /* nothing */ #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ /* * Generally, functions are not inlined unless optimization is specified. * For functions declared inline, this attribute inlines the function even * if no optimization level was specified. */ #ifdef __STRICT_ANSI__ #define ITT_INLINE static #else /* __STRICT_ANSI__ */ #define ITT_INLINE static inline #endif /* __STRICT_ANSI__ */ #define ITT_INLINE_ATTRIBUTE __attribute__ ((always_inline, unused)) #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ /** @endcond */ /** @cond exclude_from_documentation */ /* Helper macro for joining tokens */ #define ITT_JOIN_AUX(p,n) p##n #define ITT_JOIN(p,n) ITT_JOIN_AUX(p,n) #ifdef ITT_MAJOR #undef ITT_MAJOR #endif #ifdef ITT_MINOR #undef ITT_MINOR #endif #define ITT_MAJOR 3 #define ITT_MINOR 0 /* Standard versioning of a token with major and minor version numbers */ #define ITT_VERSIONIZE(x) \ ITT_JOIN(x, \ ITT_JOIN(_, \ ITT_JOIN(ITT_MAJOR, \ ITT_JOIN(_, ITT_MINOR)))) #ifndef INTEL_ITTNOTIFY_PREFIX # define INTEL_ITTNOTIFY_PREFIX __itt_ #endif /* INTEL_ITTNOTIFY_PREFIX */ #ifndef INTEL_ITTNOTIFY_POSTFIX # define INTEL_ITTNOTIFY_POSTFIX _ptr_ #endif /* INTEL_ITTNOTIFY_POSTFIX */ #define ITTNOTIFY_NAME_AUX(n) ITT_JOIN(INTEL_ITTNOTIFY_PREFIX,n) #define ITTNOTIFY_NAME(n) ITT_VERSIONIZE(ITTNOTIFY_NAME_AUX(ITT_JOIN(n,INTEL_ITTNOTIFY_POSTFIX))) #define ITTNOTIFY_VOID(n) (!ITTNOTIFY_NAME(n)) ? (void)0 : ITTNOTIFY_NAME(n) #define ITTNOTIFY_DATA(n) (!ITTNOTIFY_NAME(n)) ? 0 : ITTNOTIFY_NAME(n) #define ITTNOTIFY_VOID_D0(n,d) (!(d)->flags) ? (void)0 : (!ITTNOTIFY_NAME(n)) ? (void)0 : ITTNOTIFY_NAME(n)(d) #define ITTNOTIFY_VOID_D1(n,d,x) (!(d)->flags) ? (void)0 : (!ITTNOTIFY_NAME(n)) ? (void)0 : ITTNOTIFY_NAME(n)(d,x) #define ITTNOTIFY_VOID_D2(n,d,x,y) (!(d)->flags) ? (void)0 : (!ITTNOTIFY_NAME(n)) ? (void)0 : ITTNOTIFY_NAME(n)(d,x,y) #define ITTNOTIFY_VOID_D3(n,d,x,y,z) (!(d)->flags) ? (void)0 : (!ITTNOTIFY_NAME(n)) ? (void)0 : ITTNOTIFY_NAME(n)(d,x,y,z) #define ITTNOTIFY_VOID_D4(n,d,x,y,z,a) (!(d)->flags) ? (void)0 : (!ITTNOTIFY_NAME(n)) ? (void)0 : ITTNOTIFY_NAME(n)(d,x,y,z,a) #define ITTNOTIFY_VOID_D5(n,d,x,y,z,a,b) (!(d)->flags) ? (void)0 : (!ITTNOTIFY_NAME(n)) ? (void)0 : ITTNOTIFY_NAME(n)(d,x,y,z,a,b) #define ITTNOTIFY_VOID_D6(n,d,x,y,z,a,b,c) (!(d)->flags) ? (void)0 : (!ITTNOTIFY_NAME(n)) ? (void)0 : ITTNOTIFY_NAME(n)(d,x,y,z,a,b,c) #define ITTNOTIFY_DATA_D0(n,d) (!(d)->flags) ? 0 : (!ITTNOTIFY_NAME(n)) ? 0 : ITTNOTIFY_NAME(n)(d) #define ITTNOTIFY_DATA_D1(n,d,x) (!(d)->flags) ? 0 : (!ITTNOTIFY_NAME(n)) ? 0 : ITTNOTIFY_NAME(n)(d,x) #define ITTNOTIFY_DATA_D2(n,d,x,y) (!(d)->flags) ? 0 : (!ITTNOTIFY_NAME(n)) ? 0 : ITTNOTIFY_NAME(n)(d,x,y) #define ITTNOTIFY_DATA_D3(n,d,x,y,z) (!(d)->flags) ? 0 : (!ITTNOTIFY_NAME(n)) ? 0 : ITTNOTIFY_NAME(n)(d,x,y,z) #define ITTNOTIFY_DATA_D4(n,d,x,y,z,a) (!(d)->flags) ? 0 : (!ITTNOTIFY_NAME(n)) ? 0 : ITTNOTIFY_NAME(n)(d,x,y,z,a) #define ITTNOTIFY_DATA_D5(n,d,x,y,z,a,b) (!(d)->flags) ? 0 : (!ITTNOTIFY_NAME(n)) ? 0 : ITTNOTIFY_NAME(n)(d,x,y,z,a,b) #define ITTNOTIFY_DATA_D6(n,d,x,y,z,a,b,c) (!(d)->flags) ? 0 : (!ITTNOTIFY_NAME(n)) ? 0 : ITTNOTIFY_NAME(n)(d,x,y,z,a,b,c) #ifdef ITT_STUB #undef ITT_STUB #endif #ifdef ITT_STUBV #undef ITT_STUBV #endif #define ITT_STUBV(api,type,name,args) \ typedef type (api* ITT_JOIN(ITTNOTIFY_NAME(name),_t)) args; \ extern ITT_JOIN(ITTNOTIFY_NAME(name),_t) ITTNOTIFY_NAME(name); #define ITT_STUB ITT_STUBV /** @endcond */ #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ #define INTEL_ITTNOTIFY_API_PRIVATE #include "../ittnotify.h" #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* _INTERNAL_ITTNOTIFY_H_ */ ================================================ FILE: benchmarks/tbb/tools_api/ittnotify.h ================================================ /* Copyright 2005-2014 Intel Corporation. All Rights Reserved. This file is part of Threading Building Blocks. Threading Building Blocks is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. Threading Building Blocks is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Threading Building Blocks; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA As a special exception, you may use this file as part of a free software library without restriction. Specifically, if other files instantiate templates or use macros or inline functions from this file, or you compile this file and link it with other files to produce an executable, this file does not by itself cause the resulting executable to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the executable file might be covered by the GNU General Public License. */ #ifndef _ITTNOTIFY_H_ #define _ITTNOTIFY_H_ /** @file @brief Public User API functions and types @mainpage The ITT API is used to annotate a user's program with additional information that can be used by correctness and performance tools. The user inserts calls in their program. Those calls generate information that is collected at runtime, and used by tools such as Intel(R) Parallel Amplifier and Intel(R) Parallel Inspector. @section API Concepts The following general concepts are used throughout the API. @subsection Unicode Support Many API functions take character string arguments. On Windows, there are two versions of each such function. The function name is suffixed by W if Unicode support is enabled, and by A otherwise. Any API function that takes a character string argument adheres to this convention. @subsection Conditional Compilation Many users prefer having an option to modify ITT API code when linking it inside their runtimes. ITT API header file provides a mechanism to replace ITT API function names inside your code with empty strings. To do this, define the macros INTEL_NO_ITTNOTIFY_API during compilation and remove the static library from the linker script. @subsection Domains [see domains] Domains provide a way to separate notification for different modules or libraries in a program. Domains are specified by dotted character strings, e.g. TBB.Internal.Control. A mechanism (to be specified) is provided to enable and disable domains. By default, all domains are enabled. @subsection Named Entities and Instances Named entities (frames, regions, tasks, and markers) communicate information about the program to the analysis tools. A named entity often refers to a section of program code, or to some set of logical concepts that the programmer wants to group together. Named entities relate to the programmer's static view of the program. When the program actually executes, many instances of a given named entity may be created. The API annotations denote instances of named entities. The actual named entities are displayed using the analysis tools. In other words, the named entities come into existence when instances are created. Instances of named entities may have instance identifiers (IDs). Some API calls use instance identifiers to create relationships between different instances of named entities. Other API calls associate data with instances of named entities. Some named entities must always have instance IDs. In particular, regions and frames always have IDs. Task and markers need IDs only if the ID is needed in another API call (such as adding a relation or metadata). The lifetime of instance IDs is distinct from the lifetime of instances. This allows various relationships to be specified separate from the actual execution of instances. This flexibility comes at the expense of extra API calls. The same ID may not be reused for different instances, unless a previous [ref] __itt_id_destroy call for that ID has been issued. */ /** @cond exclude_from_documentation */ #ifndef ITT_OS_WIN # define ITT_OS_WIN 1 #endif /* ITT_OS_WIN */ #ifndef ITT_OS_LINUX # define ITT_OS_LINUX 2 #endif /* ITT_OS_LINUX */ #ifndef ITT_OS_MAC # define ITT_OS_MAC 3 #endif /* ITT_OS_MAC */ #ifndef ITT_OS # if defined WIN32 || defined _WIN32 # define ITT_OS ITT_OS_WIN # elif defined( __APPLE__ ) && defined( __MACH__ ) # define ITT_OS ITT_OS_MAC # else # define ITT_OS ITT_OS_LINUX # endif #endif /* ITT_OS */ #ifndef ITT_PLATFORM_WIN # define ITT_PLATFORM_WIN 1 #endif /* ITT_PLATFORM_WIN */ #ifndef ITT_PLATFORM_POSIX # define ITT_PLATFORM_POSIX 2 #endif /* ITT_PLATFORM_POSIX */ #ifndef ITT_PLATFORM_MAC # define ITT_PLATFORM_MAC 3 #endif /* ITT_PLATFORM_MAC */ #ifndef ITT_PLATFORM # if ITT_OS==ITT_OS_WIN # define ITT_PLATFORM ITT_PLATFORM_WIN # elif ITT_OS==ITT_OS_MAC # define ITT_PLATFORM ITT_PLATFORM_MAC # else # define ITT_PLATFORM ITT_PLATFORM_POSIX # endif #endif /* ITT_PLATFORM */ #if defined(_UNICODE) && !defined(UNICODE) #define UNICODE #endif #include #if ITT_PLATFORM==ITT_PLATFORM_WIN #include #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ #include #if defined(UNICODE) || defined(_UNICODE) #include #endif /* UNICODE || _UNICODE */ #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ #ifndef CDECL # if ITT_PLATFORM==ITT_PLATFORM_WIN # define CDECL __cdecl # else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ # if defined _M_IX86 || defined __i386__ # define CDECL __attribute__ ((cdecl)) # else /* _M_IX86 || __i386__ */ # define CDECL /* actual only on x86 platform */ # endif /* _M_IX86 || __i386__ */ # endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ #endif /* CDECL */ #ifndef STDCALL # if ITT_PLATFORM==ITT_PLATFORM_WIN # define STDCALL __stdcall # else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ # if defined _M_IX86 || defined __i386__ # define STDCALL __attribute__ ((stdcall)) # else /* _M_IX86 || __i386__ */ # define STDCALL /* supported only on x86 platform */ # endif /* _M_IX86 || __i386__ */ # endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ #endif /* STDCALL */ #define ITTAPI CDECL #define LIBITTAPI CDECL /* TODO: Temporary for compatibility! */ #define ITTAPI_CALL CDECL #define LIBITTAPI_CALL CDECL #if ITT_PLATFORM==ITT_PLATFORM_WIN /* use __forceinline (VC++ specific) */ #define ITT_INLINE __forceinline #define ITT_INLINE_ATTRIBUTE /* nothing */ #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ /* * Generally, functions are not inlined unless optimization is specified. * For functions declared inline, this attribute inlines the function even * if no optimization level was specified. */ #ifdef __STRICT_ANSI__ #define ITT_INLINE static inline #else /* __STRICT_ANSI__ */ #define ITT_INLINE static inline #endif /* __STRICT_ANSI__ */ #define ITT_INLINE_ATTRIBUTE __attribute__ ((always_inline, unused)) #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ /** @endcond */ #ifdef INTEL_ITTNOTIFY_ENABLE_LEGACY # if ITT_PLATFORM==ITT_PLATFORM_WIN # pragma message("WARNING!!! Deprecated API is used. Please undefine INTEL_ITTNOTIFY_ENABLE_LEGACY macro") # else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ // #warning usage leads to ICC's compilation error // # warning "Deprecated API is used. Please undefine INTEL_ITTNOTIFY_ENABLE_LEGACY macro" # endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ # include "legacy/ittnotify.h" #endif /* INTEL_ITTNOTIFY_ENABLE_LEGACY */ /** @cond exclude_from_documentation */ /* Helper macro for joining tokens */ #define ITT_JOIN_AUX(p,n) p##n #define ITT_JOIN(p,n) ITT_JOIN_AUX(p,n) #ifdef ITT_MAJOR #undef ITT_MAJOR #endif #ifdef ITT_MINOR #undef ITT_MINOR #endif #define ITT_MAJOR 3 #define ITT_MINOR 0 /* Standard versioning of a token with major and minor version numbers */ #define ITT_VERSIONIZE(x) \ ITT_JOIN(x, \ ITT_JOIN(_, \ ITT_JOIN(ITT_MAJOR, \ ITT_JOIN(_, ITT_MINOR)))) #ifndef INTEL_ITTNOTIFY_PREFIX # define INTEL_ITTNOTIFY_PREFIX __itt_ #endif /* INTEL_ITTNOTIFY_PREFIX */ #ifndef INTEL_ITTNOTIFY_POSTFIX # define INTEL_ITTNOTIFY_POSTFIX _ptr_ #endif /* INTEL_ITTNOTIFY_POSTFIX */ #define ITTNOTIFY_NAME_AUX(n) ITT_JOIN(INTEL_ITTNOTIFY_PREFIX,n) #define ITTNOTIFY_NAME(n) ITT_VERSIONIZE(ITTNOTIFY_NAME_AUX(ITT_JOIN(n,INTEL_ITTNOTIFY_POSTFIX))) #define ITTNOTIFY_VOID(n) (!ITTNOTIFY_NAME(n)) ? (void)0 : ITTNOTIFY_NAME(n) #define ITTNOTIFY_DATA(n) (!ITTNOTIFY_NAME(n)) ? 0 : ITTNOTIFY_NAME(n) #define ITTNOTIFY_VOID_D0(n,d) (!(d)->flags) ? (void)0 : (!ITTNOTIFY_NAME(n)) ? (void)0 : ITTNOTIFY_NAME(n)(d) #define ITTNOTIFY_VOID_D1(n,d,x) (!(d)->flags) ? (void)0 : (!ITTNOTIFY_NAME(n)) ? (void)0 : ITTNOTIFY_NAME(n)(d,x) #define ITTNOTIFY_VOID_D2(n,d,x,y) (!(d)->flags) ? (void)0 : (!ITTNOTIFY_NAME(n)) ? (void)0 : ITTNOTIFY_NAME(n)(d,x,y) #define ITTNOTIFY_VOID_D3(n,d,x,y,z) (!(d)->flags) ? (void)0 : (!ITTNOTIFY_NAME(n)) ? (void)0 : ITTNOTIFY_NAME(n)(d,x,y,z) #define ITTNOTIFY_VOID_D4(n,d,x,y,z,a) (!(d)->flags) ? (void)0 : (!ITTNOTIFY_NAME(n)) ? (void)0 : ITTNOTIFY_NAME(n)(d,x,y,z,a) #define ITTNOTIFY_VOID_D5(n,d,x,y,z,a,b) (!(d)->flags) ? (void)0 : (!ITTNOTIFY_NAME(n)) ? (void)0 : ITTNOTIFY_NAME(n)(d,x,y,z,a,b) #define ITTNOTIFY_VOID_D6(n,d,x,y,z,a,b,c) (!(d)->flags) ? (void)0 : (!ITTNOTIFY_NAME(n)) ? (void)0 : ITTNOTIFY_NAME(n)(d,x,y,z,a,b,c) #define ITTNOTIFY_DATA_D0(n,d) (!(d)->flags) ? 0 : (!ITTNOTIFY_NAME(n)) ? 0 : ITTNOTIFY_NAME(n)(d) #define ITTNOTIFY_DATA_D1(n,d,x) (!(d)->flags) ? 0 : (!ITTNOTIFY_NAME(n)) ? 0 : ITTNOTIFY_NAME(n)(d,x) #define ITTNOTIFY_DATA_D2(n,d,x,y) (!(d)->flags) ? 0 : (!ITTNOTIFY_NAME(n)) ? 0 : ITTNOTIFY_NAME(n)(d,x,y) #define ITTNOTIFY_DATA_D3(n,d,x,y,z) (!(d)->flags) ? 0 : (!ITTNOTIFY_NAME(n)) ? 0 : ITTNOTIFY_NAME(n)(d,x,y,z) #define ITTNOTIFY_DATA_D4(n,d,x,y,z,a) (!(d)->flags) ? 0 : (!ITTNOTIFY_NAME(n)) ? 0 : ITTNOTIFY_NAME(n)(d,x,y,z,a) #define ITTNOTIFY_DATA_D5(n,d,x,y,z,a,b) (!(d)->flags) ? 0 : (!ITTNOTIFY_NAME(n)) ? 0 : ITTNOTIFY_NAME(n)(d,x,y,z,a,b) #define ITTNOTIFY_DATA_D6(n,d,x,y,z,a,b,c) (!(d)->flags) ? 0 : (!ITTNOTIFY_NAME(n)) ? 0 : ITTNOTIFY_NAME(n)(d,x,y,z,a,b,c) #ifdef ITT_STUB #undef ITT_STUB #endif #ifdef ITT_STUBV #undef ITT_STUBV #endif #define ITT_STUBV(api,type,name,args) \ typedef type (api* ITT_JOIN(ITTNOTIFY_NAME(name),_t)) args; \ extern ITT_JOIN(ITTNOTIFY_NAME(name),_t) ITTNOTIFY_NAME(name); #define ITT_STUB ITT_STUBV /** @endcond */ #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ /** @cond exclude_from_gpa_documentation */ /** * @defgroup public Public API * @{ * @} */ /** * @defgroup control Collection Control * @ingroup public * General behavior: application continues to run, but no profiling information is being collected * * Pausing occurs not only for the current thread but for all process as well as spawned processes * - Intel(R) Parallel Inspector and Intel(R) Inspector XE: * - Does not analyze or report errors that involve memory access. * - Other errors are reported as usual. Pausing data collection in * Intel(R) Parallel Inspector and Intel(R) Inspector XE * only pauses tracing and analyzing memory access. * It does not pause tracing or analyzing threading APIs. * . * - Intel(R) Parallel Amplifier and Intel(R) VTune(TM) Amplifier XE: * - Does continue to record when new threads are started. * . * - Other effects: * - Possible reduction of runtime overhead. * . * @{ */ /** @brief Pause collection */ void ITTAPI __itt_pause(void); /** @brief Resume collection */ void ITTAPI __itt_resume(void); /** @cond exclude_from_documentation */ #ifndef INTEL_NO_MACRO_BODY #ifndef INTEL_NO_ITTNOTIFY_API ITT_STUBV(ITTAPI, void, pause, (void)) ITT_STUBV(ITTAPI, void, resume, (void)) #define __itt_pause ITTNOTIFY_VOID(pause) #define __itt_pause_ptr ITTNOTIFY_NAME(pause) #define __itt_resume ITTNOTIFY_VOID(resume) #define __itt_resume_ptr ITTNOTIFY_NAME(resume) #else /* INTEL_NO_ITTNOTIFY_API */ #define __itt_pause() #define __itt_pause_ptr 0 #define __itt_resume() #define __itt_resume_ptr 0 #endif /* INTEL_NO_ITTNOTIFY_API */ #else /* INTEL_NO_MACRO_BODY */ #define __itt_pause_ptr 0 #define __itt_resume_ptr 0 #endif /* INTEL_NO_MACRO_BODY */ /** @endcond */ /** @} control group */ /** @endcond */ /** * @defgroup threads Threads * @ingroup public * Give names to threads * @{ */ /** * @brief Sets thread name of calling thread * @param[in] name - name of thread */ #if ITT_PLATFORM==ITT_PLATFORM_WIN void ITTAPI __itt_thread_set_nameA(const char *name); void ITTAPI __itt_thread_set_nameW(const wchar_t *name); #if defined(UNICODE) || defined(_UNICODE) # define __itt_thread_set_name __itt_thread_set_nameW # define __itt_thread_set_name_ptr __itt_thread_set_nameW_ptr #else /* UNICODE */ # define __itt_thread_set_name __itt_thread_set_nameA # define __itt_thread_set_name_ptr __itt_thread_set_nameA_ptr #endif /* UNICODE */ #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ void ITTAPI __itt_thread_set_name(const char *name); #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ /** @cond exclude_from_documentation */ #ifndef INTEL_NO_MACRO_BODY #ifndef INTEL_NO_ITTNOTIFY_API #if ITT_PLATFORM==ITT_PLATFORM_WIN ITT_STUBV(ITTAPI, void, thread_set_nameA, (const char *name)) ITT_STUBV(ITTAPI, void, thread_set_nameW, (const wchar_t *name)) #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ ITT_STUBV(ITTAPI, void, thread_set_name, (const char *name)) #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ #if ITT_PLATFORM==ITT_PLATFORM_WIN #define __itt_thread_set_nameA ITTNOTIFY_VOID(thread_set_nameA) #define __itt_thread_set_nameA_ptr ITTNOTIFY_NAME(thread_set_nameA) #define __itt_thread_set_nameW ITTNOTIFY_VOID(thread_set_nameW) #define __itt_thread_set_nameW_ptr ITTNOTIFY_NAME(thread_set_nameW) #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ #define __itt_thread_set_name ITTNOTIFY_VOID(thread_set_name) #define __itt_thread_set_name_ptr ITTNOTIFY_NAME(thread_set_name) #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ #else /* INTEL_NO_ITTNOTIFY_API */ #if ITT_PLATFORM==ITT_PLATFORM_WIN #define __itt_thread_set_nameA(name) #define __itt_thread_set_nameA_ptr 0 #define __itt_thread_set_nameW(name) #define __itt_thread_set_nameW_ptr 0 #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ #define __itt_thread_set_name(name) #define __itt_thread_set_name_ptr 0 #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ #endif /* INTEL_NO_ITTNOTIFY_API */ #else /* INTEL_NO_MACRO_BODY */ #if ITT_PLATFORM==ITT_PLATFORM_WIN #define __itt_thread_set_nameA_ptr 0 #define __itt_thread_set_nameW_ptr 0 #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ #define __itt_thread_set_name_ptr 0 #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ #endif /* INTEL_NO_MACRO_BODY */ /** @endcond */ /** @cond exclude_from_gpa_documentation */ /** * @brief Mark current thread as ignored from this point on, for the duration of its existence. */ void ITTAPI __itt_thread_ignore(void); /** @cond exclude_from_documentation */ #ifndef INTEL_NO_MACRO_BODY #ifndef INTEL_NO_ITTNOTIFY_API ITT_STUBV(ITTAPI, void, thread_ignore, (void)) #define __itt_thread_ignore ITTNOTIFY_VOID(thread_ignore) #define __itt_thread_ignore_ptr ITTNOTIFY_NAME(thread_ignore) #else /* INTEL_NO_ITTNOTIFY_API */ #define __itt_thread_ignore() #define __itt_thread_ignore_ptr 0 #endif /* INTEL_NO_ITTNOTIFY_API */ #else /* INTEL_NO_MACRO_BODY */ #define __itt_thread_ignore_ptr 0 #endif /* INTEL_NO_MACRO_BODY */ /** @endcond */ /** @} threads group */ /** * @defgroup suppress Error suppression * @ingroup public * General behavior: application continues to run, but errors are suppressed * * @{ */ /*****************************************************************//** * @name group of functions used for error suppression in correctness tools *********************************************************************/ /** @{ */ /** * @hideinitializer * @brief possible value for suppression mask */ #define __itt_suppress_all_errors 0x7fffffff /** * @hideinitializer * @brief possible value for suppression mask (suppresses errors from threading analysis) */ #define __itt_suppress_threading_errors 0x000000ff /** * @hideinitializer * @brief possible value for suppression mask (suppresses errors from memory analysis) */ #define __itt_suppress_memory_errors 0x0000ff00 /** * @brief Start suppressing errors identified in mask on this thread */ void ITTAPI __itt_suppress_push(unsigned int mask); /** @cond exclude_from_documentation */ #ifndef INTEL_NO_MACRO_BODY #ifndef INTEL_NO_ITTNOTIFY_API ITT_STUBV(ITTAPI, void, suppress_push, (unsigned int mask)) #define __itt_suppress_push ITTNOTIFY_VOID(suppress_push) #define __itt_suppress_push_ptr ITTNOTIFY_NAME(suppress_push) #else /* INTEL_NO_ITTNOTIFY_API */ #define __itt_suppress_push(mask) #define __itt_suppress_push_ptr 0 #endif /* INTEL_NO_ITTNOTIFY_API */ #else /* INTEL_NO_MACRO_BODY */ #define __itt_suppress_push_ptr 0 #endif /* INTEL_NO_MACRO_BODY */ /** @endcond */ /** * @brief Undo the effects of the matching call to __itt_suppress_push */ void ITTAPI __itt_suppress_pop(void); /** @cond exclude_from_documentation */ #ifndef INTEL_NO_MACRO_BODY #ifndef INTEL_NO_ITTNOTIFY_API ITT_STUBV(ITTAPI, void, suppress_pop, (void)) #define __itt_suppress_pop ITTNOTIFY_VOID(suppress_pop) #define __itt_suppress_pop_ptr ITTNOTIFY_NAME(suppress_pop) #else /* INTEL_NO_ITTNOTIFY_API */ #define __itt_suppress_pop() #define __itt_suppress_pop_ptr 0 #endif /* INTEL_NO_ITTNOTIFY_API */ #else /* INTEL_NO_MACRO_BODY */ #define __itt_suppress_pop_ptr 0 #endif /* INTEL_NO_MACRO_BODY */ /** @endcond */ /** * @enum __itt_model_disable * @brief Enumerator for the disable methods */ typedef enum __itt_suppress_mode { __itt_unsuppress_range, __itt_suppress_range } __itt_suppress_mode_t; /** * @brief Mark a range of memory for error suppression or unsuppression for error types included in mask */ void ITTAPI __itt_suppress_mark_range(__itt_suppress_mode_t mode, unsigned int mask, void * address, size_t size); /** @cond exclude_from_documentation */ #ifndef INTEL_NO_MACRO_BODY #ifndef INTEL_NO_ITTNOTIFY_API ITT_STUBV(ITTAPI, void, suppress_mark_range, (__itt_suppress_mode_t mode, unsigned int mask, void * address, size_t size)) #define __itt_suppress_mark_range ITTNOTIFY_VOID(suppress_mark_range) #define __itt_suppress_mark_range_ptr ITTNOTIFY_NAME(suppress_mark_range) #else /* INTEL_NO_ITTNOTIFY_API */ #define __itt_suppress_mark_range(mask) #define __itt_suppress_mark_range_ptr 0 #endif /* INTEL_NO_ITTNOTIFY_API */ #else /* INTEL_NO_MACRO_BODY */ #define __itt_suppress_mark_range_ptr 0 #endif /* INTEL_NO_MACRO_BODY */ /** @endcond */ /** * @brief Undo the effect of a matching call to __itt_suppress_mark_range. If not matching * call is found, nothing is changed. */ void ITTAPI __itt_suppress_clear_range(__itt_suppress_mode_t mode, unsigned int mask, void * address, size_t size); /** @cond exclude_from_documentation */ #ifndef INTEL_NO_MACRO_BODY #ifndef INTEL_NO_ITTNOTIFY_API ITT_STUBV(ITTAPI, void, suppress_clear_range, (__itt_suppress_mode_t mode, unsigned int mask, void * address, size_t size)) #define __itt_suppress_clear_range ITTNOTIFY_VOID(suppress_clear_range) #define __itt_suppress_clear_range_ptr ITTNOTIFY_NAME(suppress_clear_range) #else /* INTEL_NO_ITTNOTIFY_API */ #define __itt_suppress_clear_range(mask) #define __itt_suppress_clear_range_ptr 0 #endif /* INTEL_NO_ITTNOTIFY_API */ #else /* INTEL_NO_MACRO_BODY */ #define __itt_suppress_clear_range_ptr 0 #endif /* INTEL_NO_MACRO_BODY */ /** @endcond */ /** @} */ /** @} suppress group */ /** * @defgroup sync Synchronization * @ingroup public * Indicate user-written synchronization code * @{ */ /** * @hideinitializer * @brief possible value of attribute argument for sync object type */ #define __itt_attr_barrier 1 /** * @hideinitializer * @brief possible value of attribute argument for sync object type */ #define __itt_attr_mutex 2 /** @brief Name a synchronization object @param[in] addr Handle for the synchronization object. You should use a real address to uniquely identify the synchronization object. @param[in] objtype null-terminated object type string. If NULL is passed, the name will be "User Synchronization". @param[in] objname null-terminated object name string. If NULL, no name will be assigned to the object. @param[in] attribute one of [#__itt_attr_barrier, #__itt_attr_mutex] */ #if ITT_PLATFORM==ITT_PLATFORM_WIN void ITTAPI __itt_sync_createA(void *addr, const char *objtype, const char *objname, int attribute); void ITTAPI __itt_sync_createW(void *addr, const wchar_t *objtype, const wchar_t *objname, int attribute); #if defined(UNICODE) || defined(_UNICODE) # define __itt_sync_create __itt_sync_createW # define __itt_sync_create_ptr __itt_sync_createW_ptr #else /* UNICODE */ # define __itt_sync_create __itt_sync_createA # define __itt_sync_create_ptr __itt_sync_createA_ptr #endif /* UNICODE */ #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ void ITTAPI __itt_sync_create (void *addr, const char *objtype, const char *objname, int attribute); #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ /** @cond exclude_from_documentation */ #ifndef INTEL_NO_MACRO_BODY #ifndef INTEL_NO_ITTNOTIFY_API #if ITT_PLATFORM==ITT_PLATFORM_WIN ITT_STUBV(ITTAPI, void, sync_createA, (void *addr, const char *objtype, const char *objname, int attribute)) ITT_STUBV(ITTAPI, void, sync_createW, (void *addr, const wchar_t *objtype, const wchar_t *objname, int attribute)) #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ ITT_STUBV(ITTAPI, void, sync_create, (void *addr, const char* objtype, const char* objname, int attribute)) #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ #if ITT_PLATFORM==ITT_PLATFORM_WIN #define __itt_sync_createA ITTNOTIFY_VOID(sync_createA) #define __itt_sync_createA_ptr ITTNOTIFY_NAME(sync_createA) #define __itt_sync_createW ITTNOTIFY_VOID(sync_createW) #define __itt_sync_createW_ptr ITTNOTIFY_NAME(sync_createW) #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ #define __itt_sync_create ITTNOTIFY_VOID(sync_create) #define __itt_sync_create_ptr ITTNOTIFY_NAME(sync_create) #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ #else /* INTEL_NO_ITTNOTIFY_API */ #if ITT_PLATFORM==ITT_PLATFORM_WIN #define __itt_sync_createA(addr, objtype, objname, attribute) #define __itt_sync_createA_ptr 0 #define __itt_sync_createW(addr, objtype, objname, attribute) #define __itt_sync_createW_ptr 0 #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ #define __itt_sync_create(addr, objtype, objname, attribute) #define __itt_sync_create_ptr 0 #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ #endif /* INTEL_NO_ITTNOTIFY_API */ #else /* INTEL_NO_MACRO_BODY */ #if ITT_PLATFORM==ITT_PLATFORM_WIN #define __itt_sync_createA_ptr 0 #define __itt_sync_createW_ptr 0 #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ #define __itt_sync_create_ptr 0 #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ #endif /* INTEL_NO_MACRO_BODY */ /** @endcond */ /** @brief Rename a synchronization object You can use the rename call to assign or reassign a name to a given synchronization object. @param[in] addr handle for the synchronization object. @param[in] name null-terminated object name string. */ #if ITT_PLATFORM==ITT_PLATFORM_WIN void ITTAPI __itt_sync_renameA(void *addr, const char *name); void ITTAPI __itt_sync_renameW(void *addr, const wchar_t *name); #if defined(UNICODE) || defined(_UNICODE) # define __itt_sync_rename __itt_sync_renameW # define __itt_sync_rename_ptr __itt_sync_renameW_ptr #else /* UNICODE */ # define __itt_sync_rename __itt_sync_renameA # define __itt_sync_rename_ptr __itt_sync_renameA_ptr #endif /* UNICODE */ #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ void ITTAPI __itt_sync_rename(void *addr, const char *name); #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ /** @cond exclude_from_documentation */ #ifndef INTEL_NO_MACRO_BODY #ifndef INTEL_NO_ITTNOTIFY_API #if ITT_PLATFORM==ITT_PLATFORM_WIN ITT_STUBV(ITTAPI, void, sync_renameA, (void *addr, const char *name)) ITT_STUBV(ITTAPI, void, sync_renameW, (void *addr, const wchar_t *name)) #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ ITT_STUBV(ITTAPI, void, sync_rename, (void *addr, const char *name)) #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ #if ITT_PLATFORM==ITT_PLATFORM_WIN #define __itt_sync_renameA ITTNOTIFY_VOID(sync_renameA) #define __itt_sync_renameA_ptr ITTNOTIFY_NAME(sync_renameA) #define __itt_sync_renameW ITTNOTIFY_VOID(sync_renameW) #define __itt_sync_renameW_ptr ITTNOTIFY_NAME(sync_renameW) #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ #define __itt_sync_rename ITTNOTIFY_VOID(sync_rename) #define __itt_sync_rename_ptr ITTNOTIFY_NAME(sync_rename) #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ #else /* INTEL_NO_ITTNOTIFY_API */ #if ITT_PLATFORM==ITT_PLATFORM_WIN #define __itt_sync_renameA(addr, name) #define __itt_sync_renameA_ptr 0 #define __itt_sync_renameW(addr, name) #define __itt_sync_renameW_ptr 0 #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ #define __itt_sync_rename(addr, name) #define __itt_sync_rename_ptr 0 #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ #endif /* INTEL_NO_ITTNOTIFY_API */ #else /* INTEL_NO_MACRO_BODY */ #if ITT_PLATFORM==ITT_PLATFORM_WIN #define __itt_sync_renameA_ptr 0 #define __itt_sync_renameW_ptr 0 #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ #define __itt_sync_rename_ptr 0 #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ #endif /* INTEL_NO_MACRO_BODY */ /** @endcond */ /** @brief Destroy a synchronization object. @param addr Handle for the synchronization object. */ void ITTAPI __itt_sync_destroy(void *addr); /** @cond exclude_from_documentation */ #ifndef INTEL_NO_MACRO_BODY #ifndef INTEL_NO_ITTNOTIFY_API ITT_STUBV(ITTAPI, void, sync_destroy, (void *addr)) #define __itt_sync_destroy ITTNOTIFY_VOID(sync_destroy) #define __itt_sync_destroy_ptr ITTNOTIFY_NAME(sync_destroy) #else /* INTEL_NO_ITTNOTIFY_API */ #define __itt_sync_destroy(addr) #define __itt_sync_destroy_ptr 0 #endif /* INTEL_NO_ITTNOTIFY_API */ #else /* INTEL_NO_MACRO_BODY */ #define __itt_sync_destroy_ptr 0 #endif /* INTEL_NO_MACRO_BODY */ /** @endcond */ /*****************************************************************//** * @name group of functions is used for performance measurement tools *********************************************************************/ /** @{ */ /** * @brief Enter spin loop on user-defined sync object */ void ITTAPI __itt_sync_prepare(void* addr); /** @cond exclude_from_documentation */ #ifndef INTEL_NO_MACRO_BODY #ifndef INTEL_NO_ITTNOTIFY_API ITT_STUBV(ITTAPI, void, sync_prepare, (void *addr)) #define __itt_sync_prepare ITTNOTIFY_VOID(sync_prepare) #define __itt_sync_prepare_ptr ITTNOTIFY_NAME(sync_prepare) #else /* INTEL_NO_ITTNOTIFY_API */ #define __itt_sync_prepare(addr) #define __itt_sync_prepare_ptr 0 #endif /* INTEL_NO_ITTNOTIFY_API */ #else /* INTEL_NO_MACRO_BODY */ #define __itt_sync_prepare_ptr 0 #endif /* INTEL_NO_MACRO_BODY */ /** @endcond */ /** * @brief Quit spin loop without acquiring spin object */ void ITTAPI __itt_sync_cancel(void *addr); /** @cond exclude_from_documentation */ #ifndef INTEL_NO_MACRO_BODY #ifndef INTEL_NO_ITTNOTIFY_API ITT_STUBV(ITTAPI, void, sync_cancel, (void *addr)) #define __itt_sync_cancel ITTNOTIFY_VOID(sync_cancel) #define __itt_sync_cancel_ptr ITTNOTIFY_NAME(sync_cancel) #else /* INTEL_NO_ITTNOTIFY_API */ #define __itt_sync_cancel(addr) #define __itt_sync_cancel_ptr 0 #endif /* INTEL_NO_ITTNOTIFY_API */ #else /* INTEL_NO_MACRO_BODY */ #define __itt_sync_cancel_ptr 0 #endif /* INTEL_NO_MACRO_BODY */ /** @endcond */ /** * @brief Successful spin loop completion (sync object acquired) */ void ITTAPI __itt_sync_acquired(void *addr); /** @cond exclude_from_documentation */ #ifndef INTEL_NO_MACRO_BODY #ifndef INTEL_NO_ITTNOTIFY_API ITT_STUBV(ITTAPI, void, sync_acquired, (void *addr)) #define __itt_sync_acquired ITTNOTIFY_VOID(sync_acquired) #define __itt_sync_acquired_ptr ITTNOTIFY_NAME(sync_acquired) #else /* INTEL_NO_ITTNOTIFY_API */ #define __itt_sync_acquired(addr) #define __itt_sync_acquired_ptr 0 #endif /* INTEL_NO_ITTNOTIFY_API */ #else /* INTEL_NO_MACRO_BODY */ #define __itt_sync_acquired_ptr 0 #endif /* INTEL_NO_MACRO_BODY */ /** @endcond */ /** * @brief Start sync object releasing code. Is called before the lock release call. */ void ITTAPI __itt_sync_releasing(void* addr); /** @cond exclude_from_documentation */ #ifndef INTEL_NO_MACRO_BODY #ifndef INTEL_NO_ITTNOTIFY_API ITT_STUBV(ITTAPI, void, sync_releasing, (void *addr)) #define __itt_sync_releasing ITTNOTIFY_VOID(sync_releasing) #define __itt_sync_releasing_ptr ITTNOTIFY_NAME(sync_releasing) #else /* INTEL_NO_ITTNOTIFY_API */ #define __itt_sync_releasing(addr) #define __itt_sync_releasing_ptr 0 #endif /* INTEL_NO_ITTNOTIFY_API */ #else /* INTEL_NO_MACRO_BODY */ #define __itt_sync_releasing_ptr 0 #endif /* INTEL_NO_MACRO_BODY */ /** @endcond */ /** @} */ /** @} sync group */ /**************************************************************//** * @name group of functions is used for correctness checking tools ******************************************************************/ /** @{ */ /** * @ingroup legacy * @deprecated Legacy API * @brief Fast synchronization which does no require spinning. * - This special function is to be used by TBB and OpenMP libraries only when they know * there is no spin but they need to suppress TC warnings about shared variable modifications. * - It only has corresponding pointers in static library and does not have corresponding function * in dynamic library. * @see void __itt_sync_prepare(void* addr); */ void ITTAPI __itt_fsync_prepare(void* addr); /** @cond exclude_from_documentation */ #ifndef INTEL_NO_MACRO_BODY #ifndef INTEL_NO_ITTNOTIFY_API ITT_STUBV(ITTAPI, void, fsync_prepare, (void *addr)) #define __itt_fsync_prepare ITTNOTIFY_VOID(fsync_prepare) #define __itt_fsync_prepare_ptr ITTNOTIFY_NAME(fsync_prepare) #else /* INTEL_NO_ITTNOTIFY_API */ #define __itt_fsync_prepare(addr) #define __itt_fsync_prepare_ptr 0 #endif /* INTEL_NO_ITTNOTIFY_API */ #else /* INTEL_NO_MACRO_BODY */ #define __itt_fsync_prepare_ptr 0 #endif /* INTEL_NO_MACRO_BODY */ /** @endcond */ /** * @ingroup legacy * @deprecated Legacy API * @brief Fast synchronization which does no require spinning. * - This special function is to be used by TBB and OpenMP libraries only when they know * there is no spin but they need to suppress TC warnings about shared variable modifications. * - It only has corresponding pointers in static library and does not have corresponding function * in dynamic library. * @see void __itt_sync_cancel(void *addr); */ void ITTAPI __itt_fsync_cancel(void *addr); /** @cond exclude_from_documentation */ #ifndef INTEL_NO_MACRO_BODY #ifndef INTEL_NO_ITTNOTIFY_API ITT_STUBV(ITTAPI, void, fsync_cancel, (void *addr)) #define __itt_fsync_cancel ITTNOTIFY_VOID(fsync_cancel) #define __itt_fsync_cancel_ptr ITTNOTIFY_NAME(fsync_cancel) #else /* INTEL_NO_ITTNOTIFY_API */ #define __itt_fsync_cancel(addr) #define __itt_fsync_cancel_ptr 0 #endif /* INTEL_NO_ITTNOTIFY_API */ #else /* INTEL_NO_MACRO_BODY */ #define __itt_fsync_cancel_ptr 0 #endif /* INTEL_NO_MACRO_BODY */ /** @endcond */ /** * @ingroup legacy * @deprecated Legacy API * @brief Fast synchronization which does no require spinning. * - This special function is to be used by TBB and OpenMP libraries only when they know * there is no spin but they need to suppress TC warnings about shared variable modifications. * - It only has corresponding pointers in static library and does not have corresponding function * in dynamic library. * @see void __itt_sync_acquired(void *addr); */ void ITTAPI __itt_fsync_acquired(void *addr); /** @cond exclude_from_documentation */ #ifndef INTEL_NO_MACRO_BODY #ifndef INTEL_NO_ITTNOTIFY_API ITT_STUBV(ITTAPI, void, fsync_acquired, (void *addr)) #define __itt_fsync_acquired ITTNOTIFY_VOID(fsync_acquired) #define __itt_fsync_acquired_ptr ITTNOTIFY_NAME(fsync_acquired) #else /* INTEL_NO_ITTNOTIFY_API */ #define __itt_fsync_acquired(addr) #define __itt_fsync_acquired_ptr 0 #endif /* INTEL_NO_ITTNOTIFY_API */ #else /* INTEL_NO_MACRO_BODY */ #define __itt_fsync_acquired_ptr 0 #endif /* INTEL_NO_MACRO_BODY */ /** @endcond */ /** * @ingroup legacy * @deprecated Legacy API * @brief Fast synchronization which does no require spinning. * - This special function is to be used by TBB and OpenMP libraries only when they know * there is no spin but they need to suppress TC warnings about shared variable modifications. * - It only has corresponding pointers in static library and does not have corresponding function * in dynamic library. * @see void __itt_sync_releasing(void* addr); */ void ITTAPI __itt_fsync_releasing(void* addr); /** @cond exclude_from_documentation */ #ifndef INTEL_NO_MACRO_BODY #ifndef INTEL_NO_ITTNOTIFY_API ITT_STUBV(ITTAPI, void, fsync_releasing, (void *addr)) #define __itt_fsync_releasing ITTNOTIFY_VOID(fsync_releasing) #define __itt_fsync_releasing_ptr ITTNOTIFY_NAME(fsync_releasing) #else /* INTEL_NO_ITTNOTIFY_API */ #define __itt_fsync_releasing(addr) #define __itt_fsync_releasing_ptr 0 #endif /* INTEL_NO_ITTNOTIFY_API */ #else /* INTEL_NO_MACRO_BODY */ #define __itt_fsync_releasing_ptr 0 #endif /* INTEL_NO_MACRO_BODY */ /** @endcond */ /** @} */ /** * @defgroup model Modeling by Intel(R) Parallel Advisor * @ingroup public * This is the subset of itt used for modeling by Intel(R) Parallel Advisor. * This API is called ONLY using annotate.h, by "Annotation" macros * the user places in their sources during the parallelism modeling steps. * * site_begin/end and task_begin/end take the address of handle variables, * which are writeable by the API. Handles must be 0 initialized prior * to the first call to begin, or may cause a run-time failure. * The handles are initialized in a multi-thread safe way by the API if * the handle is 0. The commonly expected idiom is one static handle to * identify a site or task. If a site or task of the same name has already * been started during this collection, the same handle MAY be returned, * but is not required to be - it is unspecified if data merging is done * based on name. These routines also take an instance variable. Like * the lexical instance, these must be 0 initialized. Unlike the lexical * instance, this is used to track a single dynamic instance. * * API used by the Intel(R) Parallel Advisor to describe potential concurrency * and related activities. User-added source annotations expand to calls * to these procedures to enable modeling of a hypothetical concurrent * execution serially. * @{ */ #if !defined(_ADVISOR_ANNOTATE_H_) || defined(ANNOTATE_EXPAND_NULL) typedef void* __itt_model_site; /*!< @brief handle for lexical site */ typedef void* __itt_model_site_instance; /*!< @brief handle for dynamic instance */ typedef void* __itt_model_task; /*!< @brief handle for lexical site */ typedef void* __itt_model_task_instance; /*!< @brief handle for dynamic instance */ /** * @enum __itt_model_disable * @brief Enumerator for the disable methods */ typedef enum { __itt_model_disable_observation, __itt_model_disable_collection } __itt_model_disable; #endif /* !_ADVISOR_ANNOTATE_H_ || ANNOTATE_EXPAND_NULL */ /** * @brief ANNOTATE_SITE_BEGIN/ANNOTATE_SITE_END support. * * site_begin/end model a potential concurrency site. * site instances may be recursively nested with themselves. * site_end exits the most recently started but unended site for the current * thread. The handle passed to end may be used to validate structure. * Instances of a site encountered on different threads concurrently * are considered completely distinct. If the site name for two different * lexical sites match, it is unspecified whether they are treated as the * same or different for data presentation. */ void ITTAPI __itt_model_site_begin(__itt_model_site *site, __itt_model_site_instance *instance, const char *name); #if ITT_PLATFORM==ITT_PLATFORM_WIN void ITTAPI __itt_model_site_beginW(const wchar_t *name); #endif void ITTAPI __itt_model_site_beginA(const char *name); void ITTAPI __itt_model_site_beginAL(const char *name, size_t siteNameLen); void ITTAPI __itt_model_site_end (__itt_model_site *site, __itt_model_site_instance *instance); void ITTAPI __itt_model_site_end_2(void); /** @cond exclude_from_documentation */ #ifndef INTEL_NO_MACRO_BODY #ifndef INTEL_NO_ITTNOTIFY_API ITT_STUBV(ITTAPI, void, model_site_begin, (__itt_model_site *site, __itt_model_site_instance *instance, const char *name)) #if ITT_PLATFORM==ITT_PLATFORM_WIN ITT_STUBV(ITTAPI, void, model_site_beginW, (const wchar_t *name)) #endif ITT_STUBV(ITTAPI, void, model_site_beginA, (const char *name)) ITT_STUBV(ITTAPI, void, model_site_beginAL, (const char *name, size_t siteNameLen)) ITT_STUBV(ITTAPI, void, model_site_end, (__itt_model_site *site, __itt_model_site_instance *instance)) ITT_STUBV(ITTAPI, void, model_site_end_2, (void)) #define __itt_model_site_begin ITTNOTIFY_VOID(model_site_begin) #define __itt_model_site_begin_ptr ITTNOTIFY_NAME(model_site_begin) #if ITT_PLATFORM==ITT_PLATFORM_WIN #define __itt_model_site_beginW ITTNOTIFY_VOID(model_site_beginW) #define __itt_model_site_beginW_ptr ITTNOTIFY_NAME(model_site_beginW) #endif #define __itt_model_site_beginA ITTNOTIFY_VOID(model_site_beginA) #define __itt_model_site_beginA_ptr ITTNOTIFY_NAME(model_site_beginA) #define __itt_model_site_beginAL ITTNOTIFY_VOID(model_site_beginAL) #define __itt_model_site_beginAL_ptr ITTNOTIFY_NAME(model_site_beginAL) #define __itt_model_site_end ITTNOTIFY_VOID(model_site_end) #define __itt_model_site_end_ptr ITTNOTIFY_NAME(model_site_end) #define __itt_model_site_end_2 ITTNOTIFY_VOID(model_site_end_2) #define __itt_model_site_end_2_ptr ITTNOTIFY_NAME(model_site_end_2) #else /* INTEL_NO_ITTNOTIFY_API */ #define __itt_model_site_begin(site, instance, name) #define __itt_model_site_begin_ptr 0 #if ITT_PLATFORM==ITT_PLATFORM_WIN #define __itt_model_site_beginW(name) #define __itt_model_site_beginW_ptr 0 #endif #define __itt_model_site_beginA(name) #define __itt_model_site_beginA_ptr 0 #define __itt_model_site_beginAL(name, siteNameLen) #define __itt_model_site_beginAL_ptr 0 #define __itt_model_site_end(site, instance) #define __itt_model_site_end_ptr 0 #define __itt_model_site_end_2() #define __itt_model_site_end_2_ptr 0 #endif /* INTEL_NO_ITTNOTIFY_API */ #else /* INTEL_NO_MACRO_BODY */ #define __itt_model_site_begin_ptr 0 #if ITT_PLATFORM==ITT_PLATFORM_WIN #define __itt_model_site_beginW_ptr 0 #endif #define __itt_model_site_beginA_ptr 0 #define __itt_model_site_beginAL_ptr 0 #define __itt_model_site_end_ptr 0 #define __itt_model_site_end_2_ptr 0 #endif /* INTEL_NO_MACRO_BODY */ /** @endcond */ /** * @brief ANNOTATE_TASK_BEGIN/ANNOTATE_TASK_END support * * task_begin/end model a potential task, which is contained within the most * closely enclosing dynamic site. task_end exits the most recently started * but unended task. The handle passed to end may be used to validate * structure. It is unspecified if bad dynamic nesting is detected. If it * is, it should be encoded in the resulting data collection. The collector * should not fail due to construct nesting issues, nor attempt to directly * indicate the problem. */ void ITTAPI __itt_model_task_begin(__itt_model_task *task, __itt_model_task_instance *instance, const char *name); #if ITT_PLATFORM==ITT_PLATFORM_WIN void ITTAPI __itt_model_task_beginW(const wchar_t *name); void ITTAPI __itt_model_iteration_taskW(const wchar_t *name); #endif void ITTAPI __itt_model_task_beginA(const char *name); void ITTAPI __itt_model_task_beginAL(const char *name, size_t taskNameLen); void ITTAPI __itt_model_iteration_taskA(const char *name); void ITTAPI __itt_model_iteration_taskAL(const char *name, size_t taskNameLen); void ITTAPI __itt_model_task_end (__itt_model_task *task, __itt_model_task_instance *instance); void ITTAPI __itt_model_task_end_2(void); /** @cond exclude_from_documentation */ #ifndef INTEL_NO_MACRO_BODY #ifndef INTEL_NO_ITTNOTIFY_API ITT_STUBV(ITTAPI, void, model_task_begin, (__itt_model_task *task, __itt_model_task_instance *instance, const char *name)) #if ITT_PLATFORM==ITT_PLATFORM_WIN ITT_STUBV(ITTAPI, void, model_task_beginW, (const wchar_t *name)) ITT_STUBV(ITTAPI, void, model_iteration_taskW, (const wchar_t *name)) #endif ITT_STUBV(ITTAPI, void, model_task_beginA, (const char *name)) ITT_STUBV(ITTAPI, void, model_task_beginAL, (const char *name, size_t taskNameLen)) ITT_STUBV(ITTAPI, void, model_iteration_taskA, (const char *name)) ITT_STUBV(ITTAPI, void, model_iteration_taskAL, (const char *name, size_t taskNameLen)) ITT_STUBV(ITTAPI, void, model_task_end, (__itt_model_task *task, __itt_model_task_instance *instance)) ITT_STUBV(ITTAPI, void, model_task_end_2, (void)) #define __itt_model_task_begin ITTNOTIFY_VOID(model_task_begin) #define __itt_model_task_begin_ptr ITTNOTIFY_NAME(model_task_begin) #if ITT_PLATFORM==ITT_PLATFORM_WIN #define __itt_model_task_beginW ITTNOTIFY_VOID(model_task_beginW) #define __itt_model_task_beginW_ptr ITTNOTIFY_NAME(model_task_beginW) #define __itt_model_iteration_taskW ITTNOTIFY_VOID(model_iteration_taskW) #define __itt_model_iteration_taskW_ptr ITTNOTIFY_NAME(model_iteration_taskW) #endif #define __itt_model_task_beginA ITTNOTIFY_VOID(model_task_beginA) #define __itt_model_task_beginA_ptr ITTNOTIFY_NAME(model_task_beginA) #define __itt_model_task_beginAL ITTNOTIFY_VOID(model_task_beginAL) #define __itt_model_task_beginAL_ptr ITTNOTIFY_NAME(model_task_beginAL) #define __itt_model_iteration_taskA ITTNOTIFY_VOID(model_iteration_taskA) #define __itt_model_iteration_taskA_ptr ITTNOTIFY_NAME(model_iteration_taskA) #define __itt_model_iteration_taskAL ITTNOTIFY_VOID(model_iteration_taskAL) #define __itt_model_iteration_taskAL_ptr ITTNOTIFY_NAME(model_iteration_taskAL) #define __itt_model_task_end ITTNOTIFY_VOID(model_task_end) #define __itt_model_task_end_ptr ITTNOTIFY_NAME(model_task_end) #define __itt_model_task_end_2 ITTNOTIFY_VOID(model_task_end_2) #define __itt_model_task_end_2_ptr ITTNOTIFY_NAME(model_task_end_2) #else /* INTEL_NO_ITTNOTIFY_API */ #define __itt_model_task_begin(task, instance, name) #define __itt_model_task_begin_ptr 0 #if ITT_PLATFORM==ITT_PLATFORM_WIN #define __itt_model_task_beginW(name) #define __itt_model_task_beginW_ptr 0 #endif #define __itt_model_task_beginA(name) #define __itt_model_task_beginA_ptr 0 #define __itt_model_task_beginAL(name, siteNameLen) #define __itt_model_task_beginAL_ptr 0 #define __itt_model_iteration_taskA(name) #define __itt_model_iteration_taskA_ptr 0 #define __itt_model_iteration_taskAL(name, siteNameLen) #define __itt_model_iteration_taskAL_ptr 0 #define __itt_model_task_end(task, instance) #define __itt_model_task_end_ptr 0 #define __itt_model_task_end_2() #define __itt_model_task_end_2_ptr 0 #endif /* INTEL_NO_ITTNOTIFY_API */ #else /* INTEL_NO_MACRO_BODY */ #define __itt_model_task_begin_ptr 0 #if ITT_PLATFORM==ITT_PLATFORM_WIN #define __itt_model_task_beginW_ptr 0 #endif #define __itt_model_task_beginA_ptr 0 #define __itt_model_task_beginAL_ptr 0 #define __itt_model_iteration_taskA_ptr 0 #define __itt_model_iteration_taskAL_ptr 0 #define __itt_model_task_end_ptr 0 #define __itt_model_task_end_2_ptr 0 #endif /* INTEL_NO_MACRO_BODY */ /** @endcond */ /** * @brief ANNOTATE_LOCK_ACQUIRE/ANNOTATE_LOCK_RELEASE support * * lock_acquire/release model a potential lock for both lockset and * performance modeling. Each unique address is modeled as a separate * lock, with invalid addresses being valid lock IDs. Specifically: * no storage is accessed by the API at the specified address - it is only * used for lock identification. Lock acquires may be self-nested and are * unlocked by a corresponding number of releases. * (These closely correspond to __itt_sync_acquired/__itt_sync_releasing, * but may not have identical semantics.) */ void ITTAPI __itt_model_lock_acquire(void *lock); void ITTAPI __itt_model_lock_acquire_2(void *lock); void ITTAPI __itt_model_lock_release(void *lock); void ITTAPI __itt_model_lock_release_2(void *lock); /** @cond exclude_from_documentation */ #ifndef INTEL_NO_MACRO_BODY #ifndef INTEL_NO_ITTNOTIFY_API ITT_STUBV(ITTAPI, void, model_lock_acquire, (void *lock)) ITT_STUBV(ITTAPI, void, model_lock_acquire_2, (void *lock)) ITT_STUBV(ITTAPI, void, model_lock_release, (void *lock)) ITT_STUBV(ITTAPI, void, model_lock_release_2, (void *lock)) #define __itt_model_lock_acquire ITTNOTIFY_VOID(model_lock_acquire) #define __itt_model_lock_acquire_ptr ITTNOTIFY_NAME(model_lock_acquire) #define __itt_model_lock_acquire_2 ITTNOTIFY_VOID(model_lock_acquire_2) #define __itt_model_lock_acquire_2_ptr ITTNOTIFY_NAME(model_lock_acquire_2) #define __itt_model_lock_release ITTNOTIFY_VOID(model_lock_release) #define __itt_model_lock_release_ptr ITTNOTIFY_NAME(model_lock_release) #define __itt_model_lock_release_2 ITTNOTIFY_VOID(model_lock_release_2) #define __itt_model_lock_release_2_ptr ITTNOTIFY_NAME(model_lock_release_2) #else /* INTEL_NO_ITTNOTIFY_API */ #define __itt_model_lock_acquire(lock) #define __itt_model_lock_acquire_ptr 0 #define __itt_model_lock_acquire_2(lock) #define __itt_model_lock_acquire_2_ptr 0 #define __itt_model_lock_release(lock) #define __itt_model_lock_release_ptr 0 #define __itt_model_lock_release_2(lock) #define __itt_model_lock_release_2_ptr 0 #endif /* INTEL_NO_ITTNOTIFY_API */ #else /* INTEL_NO_MACRO_BODY */ #define __itt_model_lock_acquire_ptr 0 #define __itt_model_lock_acquire_2_ptr 0 #define __itt_model_lock_release_ptr 0 #define __itt_model_lock_release_2_ptr 0 #endif /* INTEL_NO_MACRO_BODY */ /** @endcond */ /** * @brief ANNOTATE_RECORD_ALLOCATION/ANNOTATE_RECORD_DEALLOCATION support * * record_allocation/deallocation describe user-defined memory allocator * behavior, which may be required for correctness modeling to understand * when storage is not expected to be actually reused across threads. */ void ITTAPI __itt_model_record_allocation (void *addr, size_t size); void ITTAPI __itt_model_record_deallocation(void *addr); /** @cond exclude_from_documentation */ #ifndef INTEL_NO_MACRO_BODY #ifndef INTEL_NO_ITTNOTIFY_API ITT_STUBV(ITTAPI, void, model_record_allocation, (void *addr, size_t size)) ITT_STUBV(ITTAPI, void, model_record_deallocation, (void *addr)) #define __itt_model_record_allocation ITTNOTIFY_VOID(model_record_allocation) #define __itt_model_record_allocation_ptr ITTNOTIFY_NAME(model_record_allocation) #define __itt_model_record_deallocation ITTNOTIFY_VOID(model_record_deallocation) #define __itt_model_record_deallocation_ptr ITTNOTIFY_NAME(model_record_deallocation) #else /* INTEL_NO_ITTNOTIFY_API */ #define __itt_model_record_allocation(addr, size) #define __itt_model_record_allocation_ptr 0 #define __itt_model_record_deallocation(addr) #define __itt_model_record_deallocation_ptr 0 #endif /* INTEL_NO_ITTNOTIFY_API */ #else /* INTEL_NO_MACRO_BODY */ #define __itt_model_record_allocation_ptr 0 #define __itt_model_record_deallocation_ptr 0 #endif /* INTEL_NO_MACRO_BODY */ /** @endcond */ /** * @brief ANNOTATE_INDUCTION_USES support * * Note particular storage is inductive through the end of the current site */ void ITTAPI __itt_model_induction_uses(void* addr, size_t size); /** @cond exclude_from_documentation */ #ifndef INTEL_NO_MACRO_BODY #ifndef INTEL_NO_ITTNOTIFY_API ITT_STUBV(ITTAPI, void, model_induction_uses, (void *addr, size_t size)) #define __itt_model_induction_uses ITTNOTIFY_VOID(model_induction_uses) #define __itt_model_induction_uses_ptr ITTNOTIFY_NAME(model_induction_uses) #else /* INTEL_NO_ITTNOTIFY_API */ #define __itt_model_induction_uses(addr, size) #define __itt_model_induction_uses_ptr 0 #endif /* INTEL_NO_ITTNOTIFY_API */ #else /* INTEL_NO_MACRO_BODY */ #define __itt_model_induction_uses_ptr 0 #endif /* INTEL_NO_MACRO_BODY */ /** @endcond */ /** * @brief ANNOTATE_REDUCTION_USES support * * Note particular storage is used for reduction through the end * of the current site */ void ITTAPI __itt_model_reduction_uses(void* addr, size_t size); /** @cond exclude_from_documentation */ #ifndef INTEL_NO_MACRO_BODY #ifndef INTEL_NO_ITTNOTIFY_API ITT_STUBV(ITTAPI, void, model_reduction_uses, (void *addr, size_t size)) #define __itt_model_reduction_uses ITTNOTIFY_VOID(model_reduction_uses) #define __itt_model_reduction_uses_ptr ITTNOTIFY_NAME(model_reduction_uses) #else /* INTEL_NO_ITTNOTIFY_API */ #define __itt_model_reduction_uses(addr, size) #define __itt_model_reduction_uses_ptr 0 #endif /* INTEL_NO_ITTNOTIFY_API */ #else /* INTEL_NO_MACRO_BODY */ #define __itt_model_reduction_uses_ptr 0 #endif /* INTEL_NO_MACRO_BODY */ /** @endcond */ /** * @brief ANNOTATE_OBSERVE_USES support * * Have correctness modeling record observations about uses of storage * through the end of the current site */ void ITTAPI __itt_model_observe_uses(void* addr, size_t size); /** @cond exclude_from_documentation */ #ifndef INTEL_NO_MACRO_BODY #ifndef INTEL_NO_ITTNOTIFY_API ITT_STUBV(ITTAPI, void, model_observe_uses, (void *addr, size_t size)) #define __itt_model_observe_uses ITTNOTIFY_VOID(model_observe_uses) #define __itt_model_observe_uses_ptr ITTNOTIFY_NAME(model_observe_uses) #else /* INTEL_NO_ITTNOTIFY_API */ #define __itt_model_observe_uses(addr, size) #define __itt_model_observe_uses_ptr 0 #endif /* INTEL_NO_ITTNOTIFY_API */ #else /* INTEL_NO_MACRO_BODY */ #define __itt_model_observe_uses_ptr 0 #endif /* INTEL_NO_MACRO_BODY */ /** @endcond */ /** * @brief ANNOTATE_CLEAR_USES support * * Clear the special handling of a piece of storage related to induction, * reduction or observe_uses */ void ITTAPI __itt_model_clear_uses(void* addr); /** @cond exclude_from_documentation */ #ifndef INTEL_NO_MACRO_BODY #ifndef INTEL_NO_ITTNOTIFY_API ITT_STUBV(ITTAPI, void, model_clear_uses, (void *addr)) #define __itt_model_clear_uses ITTNOTIFY_VOID(model_clear_uses) #define __itt_model_clear_uses_ptr ITTNOTIFY_NAME(model_clear_uses) #else /* INTEL_NO_ITTNOTIFY_API */ #define __itt_model_clear_uses(addr) #define __itt_model_clear_uses_ptr 0 #endif /* INTEL_NO_ITTNOTIFY_API */ #else /* INTEL_NO_MACRO_BODY */ #define __itt_model_clear_uses_ptr 0 #endif /* INTEL_NO_MACRO_BODY */ /** @endcond */ /** * @brief ANNOTATE_DISABLE_*_PUSH/ANNOTATE_DISABLE_*_POP support * * disable_push/disable_pop push and pop disabling based on a parameter. * Disabling observations stops processing of memory references during * correctness modeling, and all annotations that occur in the disabled * region. This allows description of code that is expected to be handled * specially during conversion to parallelism or that is not recognized * by tools (e.g. some kinds of synchronization operations.) * This mechanism causes all annotations in the disabled region, other * than disable_push and disable_pop, to be ignored. (For example, this * might validly be used to disable an entire parallel site and the contained * tasks and locking in it for data collection purposes.) * The disable for collection is a more expensive operation, but reduces * collector overhead significantly. This applies to BOTH correctness data * collection and performance data collection. For example, a site * containing a task might only enable data collection for the first 10 * iterations. Both performance and correctness data should reflect this, * and the program should run as close to full speed as possible when * collection is disabled. */ void ITTAPI __itt_model_disable_push(__itt_model_disable x); void ITTAPI __itt_model_disable_pop(void); void ITTAPI __itt_model_aggregate_task(size_t x); /** @cond exclude_from_documentation */ #ifndef INTEL_NO_MACRO_BODY #ifndef INTEL_NO_ITTNOTIFY_API ITT_STUBV(ITTAPI, void, model_disable_push, (__itt_model_disable x)) ITT_STUBV(ITTAPI, void, model_disable_pop, (void)) ITT_STUBV(ITTAPI, void, model_aggregate_task, (size_t x)) #define __itt_model_disable_push ITTNOTIFY_VOID(model_disable_push) #define __itt_model_disable_push_ptr ITTNOTIFY_NAME(model_disable_push) #define __itt_model_disable_pop ITTNOTIFY_VOID(model_disable_pop) #define __itt_model_disable_pop_ptr ITTNOTIFY_NAME(model_disable_pop) #define __itt_model_aggregate_task ITTNOTIFY_VOID(model_aggregate_task) #define __itt_model_aggregate_task_ptr ITTNOTIFY_NAME(model_aggregate_task) #else /* INTEL_NO_ITTNOTIFY_API */ #define __itt_model_disable_push(x) #define __itt_model_disable_push_ptr 0 #define __itt_model_disable_pop() #define __itt_model_disable_pop_ptr 0 #define __itt_model_aggregate_task(x) #define __itt_model_aggregate_task_ptr 0 #endif /* INTEL_NO_ITTNOTIFY_API */ #else /* INTEL_NO_MACRO_BODY */ #define __itt_model_disable_push_ptr 0 #define __itt_model_disable_pop_ptr 0 #define __itt_model_aggregate_task_ptr 0 #endif /* INTEL_NO_MACRO_BODY */ /** @endcond */ /** @} model group */ /** * @defgroup heap Heap * @ingroup public * Heap group * @{ */ typedef void* __itt_heap_function; /** * @brief Create an identification for heap function * @return non-zero identifier or NULL */ #if ITT_PLATFORM==ITT_PLATFORM_WIN __itt_heap_function ITTAPI __itt_heap_function_createA(const char* name, const char* domain); __itt_heap_function ITTAPI __itt_heap_function_createW(const wchar_t* name, const wchar_t* domain); #if defined(UNICODE) || defined(_UNICODE) # define __itt_heap_function_create __itt_heap_function_createW # define __itt_heap_function_create_ptr __itt_heap_function_createW_ptr #else # define __itt_heap_function_create __itt_heap_function_createA # define __itt_heap_function_create_ptr __itt_heap_function_createA_ptr #endif /* UNICODE */ #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ __itt_heap_function ITTAPI __itt_heap_function_create(const char* name, const char* domain); #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ /** @cond exclude_from_documentation */ #ifndef INTEL_NO_MACRO_BODY #ifndef INTEL_NO_ITTNOTIFY_API #if ITT_PLATFORM==ITT_PLATFORM_WIN ITT_STUB(ITTAPI, __itt_heap_function, heap_function_createA, (const char* name, const char* domain)) ITT_STUB(ITTAPI, __itt_heap_function, heap_function_createW, (const wchar_t* name, const wchar_t* domain)) #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ ITT_STUB(ITTAPI, __itt_heap_function, heap_function_create, (const char* name, const char* domain)) #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ #if ITT_PLATFORM==ITT_PLATFORM_WIN #define __itt_heap_function_createA ITTNOTIFY_DATA(heap_function_createA) #define __itt_heap_function_createA_ptr ITTNOTIFY_NAME(heap_function_createA) #define __itt_heap_function_createW ITTNOTIFY_DATA(heap_function_createW) #define __itt_heap_function_createW_ptr ITTNOTIFY_NAME(heap_function_createW) #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ #define __itt_heap_function_create ITTNOTIFY_DATA(heap_function_create) #define __itt_heap_function_create_ptr ITTNOTIFY_NAME(heap_function_create) #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ #else /* INTEL_NO_ITTNOTIFY_API */ #if ITT_PLATFORM==ITT_PLATFORM_WIN #define __itt_heap_function_createA(name, domain) (__itt_heap_function)0 #define __itt_heap_function_createA_ptr 0 #define __itt_heap_function_createW(name, domain) (__itt_heap_function)0 #define __itt_heap_function_createW_ptr 0 #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ #define __itt_heap_function_create(name, domain) (__itt_heap_function)0 #define __itt_heap_function_create_ptr 0 #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ #endif /* INTEL_NO_ITTNOTIFY_API */ #else /* INTEL_NO_MACRO_BODY */ #if ITT_PLATFORM==ITT_PLATFORM_WIN #define __itt_heap_function_createA_ptr 0 #define __itt_heap_function_createW_ptr 0 #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ #define __itt_heap_function_create_ptr 0 #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ #endif /* INTEL_NO_MACRO_BODY */ /** @endcond */ /** * @brief Record an allocation begin occurrence. */ void ITTAPI __itt_heap_allocate_begin(__itt_heap_function h, size_t size, int initialized); /** @cond exclude_from_documentation */ #ifndef INTEL_NO_MACRO_BODY #ifndef INTEL_NO_ITTNOTIFY_API ITT_STUBV(ITTAPI, void, heap_allocate_begin, (__itt_heap_function h, size_t size, int initialized)) #define __itt_heap_allocate_begin ITTNOTIFY_VOID(heap_allocate_begin) #define __itt_heap_allocate_begin_ptr ITTNOTIFY_NAME(heap_allocate_begin) #else /* INTEL_NO_ITTNOTIFY_API */ #define __itt_heap_allocate_begin(h, size, initialized) #define __itt_heap_allocate_begin_ptr 0 #endif /* INTEL_NO_ITTNOTIFY_API */ #else /* INTEL_NO_MACRO_BODY */ #define __itt_heap_allocate_begin_ptr 0 #endif /* INTEL_NO_MACRO_BODY */ /** @endcond */ /** * @brief Record an allocation end occurrence. */ void ITTAPI __itt_heap_allocate_end(__itt_heap_function h, void** addr, size_t size, int initialized); /** @cond exclude_from_documentation */ #ifndef INTEL_NO_MACRO_BODY #ifndef INTEL_NO_ITTNOTIFY_API ITT_STUBV(ITTAPI, void, heap_allocate_end, (__itt_heap_function h, void** addr, size_t size, int initialized)) #define __itt_heap_allocate_end ITTNOTIFY_VOID(heap_allocate_end) #define __itt_heap_allocate_end_ptr ITTNOTIFY_NAME(heap_allocate_end) #else /* INTEL_NO_ITTNOTIFY_API */ #define __itt_heap_allocate_end(h, addr, size, initialized) #define __itt_heap_allocate_end_ptr 0 #endif /* INTEL_NO_ITTNOTIFY_API */ #else /* INTEL_NO_MACRO_BODY */ #define __itt_heap_allocate_end_ptr 0 #endif /* INTEL_NO_MACRO_BODY */ /** @endcond */ /** * @brief Record an free begin occurrence. */ void ITTAPI __itt_heap_free_begin(__itt_heap_function h, void* addr); /** @cond exclude_from_documentation */ #ifndef INTEL_NO_MACRO_BODY #ifndef INTEL_NO_ITTNOTIFY_API ITT_STUBV(ITTAPI, void, heap_free_begin, (__itt_heap_function h, void* addr)) #define __itt_heap_free_begin ITTNOTIFY_VOID(heap_free_begin) #define __itt_heap_free_begin_ptr ITTNOTIFY_NAME(heap_free_begin) #else /* INTEL_NO_ITTNOTIFY_API */ #define __itt_heap_free_begin(h, addr) #define __itt_heap_free_begin_ptr 0 #endif /* INTEL_NO_ITTNOTIFY_API */ #else /* INTEL_NO_MACRO_BODY */ #define __itt_heap_free_begin_ptr 0 #endif /* INTEL_NO_MACRO_BODY */ /** @endcond */ /** * @brief Record an free end occurrence. */ void ITTAPI __itt_heap_free_end(__itt_heap_function h, void* addr); /** @cond exclude_from_documentation */ #ifndef INTEL_NO_MACRO_BODY #ifndef INTEL_NO_ITTNOTIFY_API ITT_STUBV(ITTAPI, void, heap_free_end, (__itt_heap_function h, void* addr)) #define __itt_heap_free_end ITTNOTIFY_VOID(heap_free_end) #define __itt_heap_free_end_ptr ITTNOTIFY_NAME(heap_free_end) #else /* INTEL_NO_ITTNOTIFY_API */ #define __itt_heap_free_end(h, addr) #define __itt_heap_free_end_ptr 0 #endif /* INTEL_NO_ITTNOTIFY_API */ #else /* INTEL_NO_MACRO_BODY */ #define __itt_heap_free_end_ptr 0 #endif /* INTEL_NO_MACRO_BODY */ /** @endcond */ /** * @brief Record an reallocation begin occurrence. */ void ITTAPI __itt_heap_reallocate_begin(__itt_heap_function h, void* addr, size_t new_size, int initialized); /** @cond exclude_from_documentation */ #ifndef INTEL_NO_MACRO_BODY #ifndef INTEL_NO_ITTNOTIFY_API ITT_STUBV(ITTAPI, void, heap_reallocate_begin, (__itt_heap_function h, void* addr, size_t new_size, int initialized)) #define __itt_heap_reallocate_begin ITTNOTIFY_VOID(heap_reallocate_begin) #define __itt_heap_reallocate_begin_ptr ITTNOTIFY_NAME(heap_reallocate_begin) #else /* INTEL_NO_ITTNOTIFY_API */ #define __itt_heap_reallocate_begin(h, addr, new_size, initialized) #define __itt_heap_reallocate_begin_ptr 0 #endif /* INTEL_NO_ITTNOTIFY_API */ #else /* INTEL_NO_MACRO_BODY */ #define __itt_heap_reallocate_begin_ptr 0 #endif /* INTEL_NO_MACRO_BODY */ /** @endcond */ /** * @brief Record an reallocation end occurrence. */ void ITTAPI __itt_heap_reallocate_end(__itt_heap_function h, void* addr, void** new_addr, size_t new_size, int initialized); /** @cond exclude_from_documentation */ #ifndef INTEL_NO_MACRO_BODY #ifndef INTEL_NO_ITTNOTIFY_API ITT_STUBV(ITTAPI, void, heap_reallocate_end, (__itt_heap_function h, void* addr, void** new_addr, size_t new_size, int initialized)) #define __itt_heap_reallocate_end ITTNOTIFY_VOID(heap_reallocate_end) #define __itt_heap_reallocate_end_ptr ITTNOTIFY_NAME(heap_reallocate_end) #else /* INTEL_NO_ITTNOTIFY_API */ #define __itt_heap_reallocate_end(h, addr, new_addr, new_size, initialized) #define __itt_heap_reallocate_end_ptr 0 #endif /* INTEL_NO_ITTNOTIFY_API */ #else /* INTEL_NO_MACRO_BODY */ #define __itt_heap_reallocate_end_ptr 0 #endif /* INTEL_NO_MACRO_BODY */ /** @endcond */ /** @brief internal access begin */ void ITTAPI __itt_heap_internal_access_begin(void); /** @cond exclude_from_documentation */ #ifndef INTEL_NO_MACRO_BODY #ifndef INTEL_NO_ITTNOTIFY_API ITT_STUBV(ITTAPI, void, heap_internal_access_begin, (void)) #define __itt_heap_internal_access_begin ITTNOTIFY_VOID(heap_internal_access_begin) #define __itt_heap_internal_access_begin_ptr ITTNOTIFY_NAME(heap_internal_access_begin) #else /* INTEL_NO_ITTNOTIFY_API */ #define __itt_heap_internal_access_begin() #define __itt_heap_internal_access_begin_ptr 0 #endif /* INTEL_NO_ITTNOTIFY_API */ #else /* INTEL_NO_MACRO_BODY */ #define __itt_heap_internal_access_begin_ptr 0 #endif /* INTEL_NO_MACRO_BODY */ /** @endcond */ /** @brief internal access end */ void ITTAPI __itt_heap_internal_access_end(void); /** @cond exclude_from_documentation */ #ifndef INTEL_NO_MACRO_BODY #ifndef INTEL_NO_ITTNOTIFY_API ITT_STUBV(ITTAPI, void, heap_internal_access_end, (void)) #define __itt_heap_internal_access_end ITTNOTIFY_VOID(heap_internal_access_end) #define __itt_heap_internal_access_end_ptr ITTNOTIFY_NAME(heap_internal_access_end) #else /* INTEL_NO_ITTNOTIFY_API */ #define __itt_heap_internal_access_end() #define __itt_heap_internal_access_end_ptr 0 #endif /* INTEL_NO_ITTNOTIFY_API */ #else /* INTEL_NO_MACRO_BODY */ #define __itt_heap_internal_access_end_ptr 0 #endif /* INTEL_NO_MACRO_BODY */ /** @endcond */ /** @brief record memory growth begin */ void ITTAPI __itt_heap_record_memory_growth_begin(void); /** @cond exclude_from_documentation */ #ifndef INTEL_NO_MACRO_BODY #ifndef INTEL_NO_ITTNOTIFY_API ITT_STUBV(ITTAPI, void, heap_record_memory_growth_begin, (void)) #define __itt_heap_record_memory_growth_begin ITTNOTIFY_VOID(heap_record_memory_growth_begin) #define __itt_heap_record_memory_growth_begin_ptr ITTNOTIFY_NAME(heap_record_memory_growth_begin) #else /* INTEL_NO_ITTNOTIFY_API */ #define __itt_heap_record_memory_growth_begin() #define __itt_heap_record_memory_growth_begin_ptr 0 #endif /* INTEL_NO_ITTNOTIFY_API */ #else /* INTEL_NO_MACRO_BODY */ #define __itt_heap_record_memory_growth_begin_ptr 0 #endif /* INTEL_NO_MACRO_BODY */ /** @endcond */ /** @brief record memory growth end */ void ITTAPI __itt_heap_record_memory_growth_end(void); /** @cond exclude_from_documentation */ #ifndef INTEL_NO_MACRO_BODY #ifndef INTEL_NO_ITTNOTIFY_API ITT_STUBV(ITTAPI, void, heap_record_memory_growth_end, (void)) #define __itt_heap_record_memory_growth_end ITTNOTIFY_VOID(heap_record_memory_growth_end) #define __itt_heap_record_memory_growth_end_ptr ITTNOTIFY_NAME(heap_record_memory_growth_end) #else /* INTEL_NO_ITTNOTIFY_API */ #define __itt_heap_record_memory_growth_end() #define __itt_heap_record_memory_growth_end_ptr 0 #endif /* INTEL_NO_ITTNOTIFY_API */ #else /* INTEL_NO_MACRO_BODY */ #define __itt_heap_record_memory_growth_end_ptr 0 #endif /* INTEL_NO_MACRO_BODY */ /** @endcond */ /** * @brief Specify the type of heap detection/reporting to modify. */ /** * @hideinitializer * @brief Report on memory leaks. */ #define __itt_heap_leaks 0x00000001 /** * @hideinitializer * @brief Report on memory growth. */ #define __itt_heap_growth 0x00000002 /** @brief heap reset detection */ void ITTAPI __itt_heap_reset_detection(unsigned int reset_mask); /** @cond exclude_from_documentation */ #ifndef INTEL_NO_MACRO_BODY #ifndef INTEL_NO_ITTNOTIFY_API ITT_STUBV(ITTAPI, void, heap_reset_detection, (unsigned int reset_mask)) #define __itt_heap_reset_detection ITTNOTIFY_VOID(heap_reset_detection) #define __itt_heap_reset_detection_ptr ITTNOTIFY_NAME(heap_reset_detection) #else /* INTEL_NO_ITTNOTIFY_API */ #define __itt_heap_reset_detection() #define __itt_heap_reset_detection_ptr 0 #endif /* INTEL_NO_ITTNOTIFY_API */ #else /* INTEL_NO_MACRO_BODY */ #define __itt_heap_reset_detection_ptr 0 #endif /* INTEL_NO_MACRO_BODY */ /** @endcond */ /** @brief report */ void ITTAPI __itt_heap_record(unsigned int record_mask); /** @cond exclude_from_documentation */ #ifndef INTEL_NO_MACRO_BODY #ifndef INTEL_NO_ITTNOTIFY_API ITT_STUBV(ITTAPI, void, heap_record, (unsigned int record_mask)) #define __itt_heap_record ITTNOTIFY_VOID(heap_record) #define __itt_heap_record_ptr ITTNOTIFY_NAME(heap_record) #else /* INTEL_NO_ITTNOTIFY_API */ #define __itt_heap_record() #define __itt_heap_record_ptr 0 #endif /* INTEL_NO_ITTNOTIFY_API */ #else /* INTEL_NO_MACRO_BODY */ #define __itt_heap_record_ptr 0 #endif /* INTEL_NO_MACRO_BODY */ /** @endcond */ /** @} heap group */ /** @endcond */ /* ========================================================================== */ /** * @defgroup domains Domains * @ingroup public * Domains group * @{ */ /** @cond exclude_from_documentation */ #pragma pack(push, 8) typedef struct ___itt_domain { volatile int flags; /*!< Zero if disabled, non-zero if enabled. The meaning of different non-zero values is reserved to the runtime */ const char* nameA; /*!< Copy of original name in ASCII. */ #if defined(UNICODE) || defined(_UNICODE) const wchar_t* nameW; /*!< Copy of original name in UNICODE. */ #else /* UNICODE || _UNICODE */ void* nameW; #endif /* UNICODE || _UNICODE */ int extra1; /*!< Reserved to the runtime */ void* extra2; /*!< Reserved to the runtime */ struct ___itt_domain* next; } __itt_domain; #pragma pack(pop) /** @endcond */ /** * @ingroup domains * @brief Create a domain. * Create domain using some domain name: the URI naming style is recommended. * Because the set of domains is expected to be static over the application's * execution time, there is no mechanism to destroy a domain. * Any domain can be accessed by any thread in the process, regardless of * which thread created the domain. This call is thread-safe. * @param[in] name name of domain */ #if ITT_PLATFORM==ITT_PLATFORM_WIN __itt_domain* ITTAPI __itt_domain_createA(const char *name); __itt_domain* ITTAPI __itt_domain_createW(const wchar_t *name); #if defined(UNICODE) || defined(_UNICODE) # define __itt_domain_create __itt_domain_createW # define __itt_domain_create_ptr __itt_domain_createW_ptr #else /* UNICODE */ # define __itt_domain_create __itt_domain_createA # define __itt_domain_create_ptr __itt_domain_createA_ptr #endif /* UNICODE */ #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ __itt_domain* ITTAPI __itt_domain_create(const char *name); #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ /** @cond exclude_from_documentation */ #ifndef INTEL_NO_MACRO_BODY #ifndef INTEL_NO_ITTNOTIFY_API #if ITT_PLATFORM==ITT_PLATFORM_WIN ITT_STUB(ITTAPI, __itt_domain*, domain_createA, (const char *name)) ITT_STUB(ITTAPI, __itt_domain*, domain_createW, (const wchar_t *name)) #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ ITT_STUB(ITTAPI, __itt_domain*, domain_create, (const char *name)) #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ #if ITT_PLATFORM==ITT_PLATFORM_WIN #define __itt_domain_createA ITTNOTIFY_DATA(domain_createA) #define __itt_domain_createA_ptr ITTNOTIFY_NAME(domain_createA) #define __itt_domain_createW ITTNOTIFY_DATA(domain_createW) #define __itt_domain_createW_ptr ITTNOTIFY_NAME(domain_createW) #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ #define __itt_domain_create ITTNOTIFY_DATA(domain_create) #define __itt_domain_create_ptr ITTNOTIFY_NAME(domain_create) #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ #else /* INTEL_NO_ITTNOTIFY_API */ #if ITT_PLATFORM==ITT_PLATFORM_WIN #define __itt_domain_createA(name) (__itt_domain*)0 #define __itt_domain_createA_ptr 0 #define __itt_domain_createW(name) (__itt_domain*)0 #define __itt_domain_createW_ptr 0 #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ #define __itt_domain_create(name) (__itt_domain*)0 #define __itt_domain_create_ptr 0 #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ #endif /* INTEL_NO_ITTNOTIFY_API */ #else /* INTEL_NO_MACRO_BODY */ #if ITT_PLATFORM==ITT_PLATFORM_WIN #define __itt_domain_createA_ptr 0 #define __itt_domain_createW_ptr 0 #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ #define __itt_domain_create_ptr 0 #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ #endif /* INTEL_NO_MACRO_BODY */ /** @endcond */ /** @} domains group */ /** * @defgroup ids IDs * @ingroup public * IDs group * @{ */ /** @cond exclude_from_documentation */ #pragma pack(push, 8) typedef struct ___itt_id { unsigned long long d1, d2, d3; } __itt_id; #pragma pack(pop) /** @endcond */ static const __itt_id __itt_null = { 0, 0, 0 }; /** * @ingroup ids * @brief A convenience function is provided to create an ID without domain control. * @brief This is a convenience function to initialize an __itt_id structure. This function * does not affect the trace collector runtime in any way. After you make the ID with this * function, you still must create it with the __itt_id_create function before using the ID * to identify a named entity. * @param[in] addr The address of object; high QWORD of the ID value. * @param[in] extra The extra data to unique identify object; low QWORD of the ID value. */ ITT_INLINE __itt_id ITTAPI __itt_id_make(void* addr, unsigned long long extra) ITT_INLINE_ATTRIBUTE; ITT_INLINE __itt_id ITTAPI __itt_id_make(void* addr, unsigned long long extra) { __itt_id id = __itt_null; id.d1 = (unsigned long long)((uintptr_t)addr); id.d2 = (unsigned long long)extra; id.d3 = (unsigned long long)0; /* Reserved. Must be zero */ return id; } /** * @ingroup ids * @brief Create an instance of identifier. * This establishes the beginning of the lifetime of an instance of * the given ID in the trace. Once this lifetime starts, the ID * can be used to tag named entity instances in calls such as * __itt_task_begin, and to specify relationships among * identified named entity instances, using the \ref relations APIs. * Instance IDs are not domain specific! * @param[in] domain The domain controlling the execution of this call. * @param[in] id The ID to create. */ void ITTAPI __itt_id_create(const __itt_domain *domain, __itt_id id); /** @cond exclude_from_documentation */ #ifndef INTEL_NO_MACRO_BODY #ifndef INTEL_NO_ITTNOTIFY_API ITT_STUBV(ITTAPI, void, id_create, (const __itt_domain *domain, __itt_id id)) #define __itt_id_create(d,x) ITTNOTIFY_VOID_D1(id_create,d,x) #define __itt_id_create_ptr ITTNOTIFY_NAME(id_create) #else /* INTEL_NO_ITTNOTIFY_API */ #define __itt_id_create(domain,id) #define __itt_id_create_ptr 0 #endif /* INTEL_NO_ITTNOTIFY_API */ #else /* INTEL_NO_MACRO_BODY */ #define __itt_id_create_ptr 0 #endif /* INTEL_NO_MACRO_BODY */ /** @endcond */ /** * @ingroup ids * @brief Destroy an instance of identifier. * This ends the lifetime of the current instance of the given ID value in the trace. * Any relationships that are established after this lifetime ends are invalid. * This call must be performed before the given ID value can be reused for a different * named entity instance. * @param[in] domain The domain controlling the execution of this call. * @param[in] id The ID to destroy. */ void ITTAPI __itt_id_destroy(const __itt_domain *domain, __itt_id id); /** @cond exclude_from_documentation */ #ifndef INTEL_NO_MACRO_BODY #ifndef INTEL_NO_ITTNOTIFY_API ITT_STUBV(ITTAPI, void, id_destroy, (const __itt_domain *domain, __itt_id id)) #define __itt_id_destroy(d,x) ITTNOTIFY_VOID_D1(id_destroy,d,x) #define __itt_id_destroy_ptr ITTNOTIFY_NAME(id_destroy) #else /* INTEL_NO_ITTNOTIFY_API */ #define __itt_id_destroy(domain,id) #define __itt_id_destroy_ptr 0 #endif /* INTEL_NO_ITTNOTIFY_API */ #else /* INTEL_NO_MACRO_BODY */ #define __itt_id_destroy_ptr 0 #endif /* INTEL_NO_MACRO_BODY */ /** @endcond */ /** @} ids group */ /** * @defgroup handless String Handles * @ingroup public * String Handles group * @{ */ /** @cond exclude_from_documentation */ #pragma pack(push, 8) typedef struct ___itt_string_handle { const char* strA; /*!< Copy of original string in ASCII. */ #if defined(UNICODE) || defined(_UNICODE) const wchar_t* strW; /*!< Copy of original string in UNICODE. */ #else /* UNICODE || _UNICODE */ void* strW; #endif /* UNICODE || _UNICODE */ int extra1; /*!< Reserved. Must be zero */ void* extra2; /*!< Reserved. Must be zero */ struct ___itt_string_handle* next; } __itt_string_handle; #pragma pack(pop) /** @endcond */ /** * @ingroup handles * @brief Create a string handle. * Create and return handle value that can be associated with a string. * Consecutive calls to __itt_string_handle_create with the same name * return the same value. Because the set of string handles is expected to remain * static during the application's execution time, there is no mechanism to destroy a string handle. * Any string handle can be accessed by any thread in the process, regardless of which thread created * the string handle. This call is thread-safe. * @param[in] name The input string */ #if ITT_PLATFORM==ITT_PLATFORM_WIN __itt_string_handle* ITTAPI __itt_string_handle_createA(const char *name); __itt_string_handle* ITTAPI __itt_string_handle_createW(const wchar_t *name); #if defined(UNICODE) || defined(_UNICODE) # define __itt_string_handle_create __itt_string_handle_createW # define __itt_string_handle_create_ptr __itt_string_handle_createW_ptr #else /* UNICODE */ # define __itt_string_handle_create __itt_string_handle_createA # define __itt_string_handle_create_ptr __itt_string_handle_createA_ptr #endif /* UNICODE */ #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ __itt_string_handle* ITTAPI __itt_string_handle_create(const char *name); #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ /** @cond exclude_from_documentation */ #ifndef INTEL_NO_MACRO_BODY #ifndef INTEL_NO_ITTNOTIFY_API #if ITT_PLATFORM==ITT_PLATFORM_WIN ITT_STUB(ITTAPI, __itt_string_handle*, string_handle_createA, (const char *name)) ITT_STUB(ITTAPI, __itt_string_handle*, string_handle_createW, (const wchar_t *name)) #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ ITT_STUB(ITTAPI, __itt_string_handle*, string_handle_create, (const char *name)) #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ #if ITT_PLATFORM==ITT_PLATFORM_WIN #define __itt_string_handle_createA ITTNOTIFY_DATA(string_handle_createA) #define __itt_string_handle_createA_ptr ITTNOTIFY_NAME(string_handle_createA) #define __itt_string_handle_createW ITTNOTIFY_DATA(string_handle_createW) #define __itt_string_handle_createW_ptr ITTNOTIFY_NAME(string_handle_createW) #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ #define __itt_string_handle_create ITTNOTIFY_DATA(string_handle_create) #define __itt_string_handle_create_ptr ITTNOTIFY_NAME(string_handle_create) #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ #else /* INTEL_NO_ITTNOTIFY_API */ #if ITT_PLATFORM==ITT_PLATFORM_WIN #define __itt_string_handle_createA(name) (__itt_string_handle*)0 #define __itt_string_handle_createA_ptr 0 #define __itt_string_handle_createW(name) (__itt_string_handle*)0 #define __itt_string_handle_createW_ptr 0 #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ #define __itt_string_handle_create(name) (__itt_string_handle*)0 #define __itt_string_handle_create_ptr 0 #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ #endif /* INTEL_NO_ITTNOTIFY_API */ #else /* INTEL_NO_MACRO_BODY */ #if ITT_PLATFORM==ITT_PLATFORM_WIN #define __itt_string_handle_createA_ptr 0 #define __itt_string_handle_createW_ptr 0 #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ #define __itt_string_handle_create_ptr 0 #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ #endif /* INTEL_NO_MACRO_BODY */ /** @endcond */ /** @} handles group */ /** @cond exclude_from_documentation */ typedef unsigned long long __itt_timestamp; /** @endcond */ static const __itt_timestamp __itt_timestamp_none = (__itt_timestamp)-1LL; /** @cond exclude_from_gpa_documentation */ /** * @ingroup timestamps * @brief Return timestamp corresponding to the current moment. * This returns the timestamp in the format that is the most relevant for the current * host or platform (RDTSC, QPC, and others). You can use the "<" operator to * compare __itt_timestamp values. */ __itt_timestamp ITTAPI __itt_get_timestamp(void); /** @cond exclude_from_documentation */ #ifndef INTEL_NO_MACRO_BODY #ifndef INTEL_NO_ITTNOTIFY_API ITT_STUB(ITTAPI, __itt_timestamp, get_timestamp, (void)) #define __itt_get_timestamp ITTNOTIFY_DATA(get_timestamp) #define __itt_get_timestamp_ptr ITTNOTIFY_NAME(get_timestamp) #else /* INTEL_NO_ITTNOTIFY_API */ #define __itt_get_timestamp() #define __itt_get_timestamp_ptr 0 #endif /* INTEL_NO_ITTNOTIFY_API */ #else /* INTEL_NO_MACRO_BODY */ #define __itt_get_timestamp_ptr 0 #endif /* INTEL_NO_MACRO_BODY */ /** @endcond */ /** @} timestamps */ /** @endcond */ /** @cond exclude_from_gpa_documentation */ /** * @defgroup regions Regions * @ingroup public * Regions group * @{ */ /** * @ingroup regions * @brief Begin of region instance. * Successive calls to __itt_region_begin with the same ID are ignored * until a call to __itt_region_end with the same ID * @param[in] domain The domain for this region instance * @param[in] id The instance ID for this region instance. Must not be __itt_null * @param[in] parentid The instance ID for the parent of this region instance, or __itt_null * @param[in] name The name of this region */ void ITTAPI __itt_region_begin(const __itt_domain *domain, __itt_id id, __itt_id parentid, __itt_string_handle *name); /** * @ingroup regions * @brief End of region instance. * The first call to __itt_region_end with a given ID ends the * region. Successive calls with the same ID are ignored, as are * calls that do not have a matching __itt_region_begin call. * @param[in] domain The domain for this region instance * @param[in] id The instance ID for this region instance */ void ITTAPI __itt_region_end(const __itt_domain *domain, __itt_id id); /** @cond exclude_from_documentation */ #ifndef INTEL_NO_MACRO_BODY #ifndef INTEL_NO_ITTNOTIFY_API ITT_STUBV(ITTAPI, void, region_begin, (const __itt_domain *domain, __itt_id id, __itt_id parentid, __itt_string_handle *name)) ITT_STUBV(ITTAPI, void, region_end, (const __itt_domain *domain, __itt_id id)) #define __itt_region_begin(d,x,y,z) ITTNOTIFY_VOID_D3(region_begin,d,x,y,z) #define __itt_region_begin_ptr ITTNOTIFY_NAME(region_begin) #define __itt_region_end(d,x) ITTNOTIFY_VOID_D1(region_end,d,x) #define __itt_region_end_ptr ITTNOTIFY_NAME(region_end) #else /* INTEL_NO_ITTNOTIFY_API */ #define __itt_region_begin(d,x,y,z) #define __itt_region_begin_ptr 0 #define __itt_region_end(d,x) #define __itt_region_end_ptr 0 #endif /* INTEL_NO_ITTNOTIFY_API */ #else /* INTEL_NO_MACRO_BODY */ #define __itt_region_begin_ptr 0 #define __itt_region_end_ptr 0 #endif /* INTEL_NO_MACRO_BODY */ /** @endcond */ /** @} regions group */ /** * @defgroup frames Frames * @ingroup public * Frames are similar to regions, but are intended to be easier to use and to implement. * In particular: * - Frames always represent periods of elapsed time * - By default, frames have no nesting relationships * @{ */ /** * @ingroup frames * @brief Begin a frame instance. * Successive calls to __itt_frame_begin with the * same ID are ignored until a call to __itt_frame_end with the same ID. * @param[in] domain The domain for this frame instance * @param[in] id The instance ID for this frame instance or NULL */ void ITTAPI __itt_frame_begin_v3(const __itt_domain *domain, __itt_id *id); /** * @ingroup frames * @brief End a frame instance. * The first call to __itt_frame_end with a given ID * ends the frame. Successive calls with the same ID are ignored, as are * calls that do not have a matching __itt_frame_begin call. * @param[in] domain The domain for this frame instance * @param[in] id The instance ID for this frame instance or NULL for current */ void ITTAPI __itt_frame_end_v3(const __itt_domain *domain, __itt_id *id); /** * @ingroup frames * @brief Submits a frame instance. * Successive calls to __itt_frame_begin or __itt_frame_submit with the * same ID are ignored until a call to __itt_frame_end or __itt_frame_submit * with the same ID. * Passing special __itt_timestamp_none value as "end" argument means * take the current timestamp as the end timestamp. * @param[in] domain The domain for this frame instance * @param[in] id The instance ID for this frame instance or NULL * @param[in] begin Timestamp of the beggining of the frame * @param[in] end Timestamp of the end of the frame */ void ITTAPI __itt_frame_submit_v3(const __itt_domain *domain, __itt_id *id, __itt_timestamp begin, __itt_timestamp end); /** @cond exclude_from_documentation */ #ifndef INTEL_NO_MACRO_BODY #ifndef INTEL_NO_ITTNOTIFY_API ITT_STUBV(ITTAPI, void, frame_begin_v3, (const __itt_domain *domain, __itt_id *id)) ITT_STUBV(ITTAPI, void, frame_end_v3, (const __itt_domain *domain, __itt_id *id)) ITT_STUBV(ITTAPI, void, frame_submit_v3, (const __itt_domain *domain, __itt_id *id, __itt_timestamp begin, __itt_timestamp end)) #define __itt_frame_begin_v3(d,x) ITTNOTIFY_VOID_D1(frame_begin_v3,d,x) #define __itt_frame_begin_v3_ptr ITTNOTIFY_NAME(frame_begin_v3) #define __itt_frame_end_v3(d,x) ITTNOTIFY_VOID_D1(frame_end_v3,d,x) #define __itt_frame_end_v3_ptr ITTNOTIFY_NAME(frame_end_v3) #define __itt_frame_submit_v3(d,x,b,e) ITTNOTIFY_VOID_D3(frame_submit_v3,d,x,b,e) #define __itt_frame_submit_v3_ptr ITTNOTIFY_NAME(frame_submit_v3) #else /* INTEL_NO_ITTNOTIFY_API */ #define __itt_frame_begin_v3(domain,id) #define __itt_frame_begin_v3_ptr 0 #define __itt_frame_end_v3(domain,id) #define __itt_frame_end_v3_ptr 0 #define __itt_frame_submit_v3(domain,id,begin,end) #define __itt_frame_submit_v3_ptr 0 #endif /* INTEL_NO_ITTNOTIFY_API */ #else /* INTEL_NO_MACRO_BODY */ #define __itt_frame_begin_v3_ptr 0 #define __itt_frame_end_v3_ptr 0 #define __itt_frame_submit_v3_ptr 0 #endif /* INTEL_NO_MACRO_BODY */ /** @endcond */ /** @} frames group */ /** @endcond */ /** * @defgroup taskgroup Task Group * @ingroup public * Task Group * @{ */ /** * @ingroup task_groups * @brief Denotes a task_group instance. * Successive calls to __itt_task_group with the same ID are ignored. * @param[in] domain The domain for this task_group instance * @param[in] id The instance ID for this task_group instance. Must not be __itt_null. * @param[in] parentid The instance ID for the parent of this task_group instance, or __itt_null. * @param[in] name The name of this task_group */ void ITTAPI __itt_task_group(const __itt_domain *domain, __itt_id id, __itt_id parentid, __itt_string_handle *name); /** @cond exclude_from_documentation */ #ifndef INTEL_NO_MACRO_BODY #ifndef INTEL_NO_ITTNOTIFY_API ITT_STUBV(ITTAPI, void, task_group, (const __itt_domain *domain, __itt_id id, __itt_id parentid, __itt_string_handle *name)) #define __itt_task_group(d,x,y,z) ITTNOTIFY_VOID_D3(task_group,d,x,y,z) #define __itt_task_group_ptr ITTNOTIFY_NAME(task_group) #else /* INTEL_NO_ITTNOTIFY_API */ #define __itt_task_group(d,x,y,z) #define __itt_task_group_ptr 0 #endif /* INTEL_NO_ITTNOTIFY_API */ #else /* INTEL_NO_MACRO_BODY */ #define __itt_task_group_ptr 0 #endif /* INTEL_NO_MACRO_BODY */ /** @endcond */ /** @} taskgroup group */ /** * @defgroup tasks Tasks * @ingroup public * A task instance represents a piece of work performed by a particular * thread for a period of time. A call to __itt_task_begin creates a * task instance. This becomes the current instance for that task on that * thread. A following call to __itt_task_end on the same thread ends the * instance. There may be multiple simultaneous instances of tasks with the * same name on different threads. If an ID is specified, the task instance * receives that ID. Nested tasks are allowed. * * Note: The task is defined by the bracketing of __itt_task_begin and * __itt_task_end on the same thread. If some scheduling mechanism causes * task switching (the thread executes a different user task) or task * switching (the user task switches to a different thread) then this breaks * the notion of current instance. Additional API calls are required to * deal with that possibility. * @{ */ /** * @ingroup tasks * @brief Begin a task instance. * @param[in] domain The domain for this task * @param[in] taskid The instance ID for this task instance, or __itt_null * @param[in] parentid The parent instance to which this task instance belongs, or __itt_null * @param[in] name The name of this task */ void ITTAPI __itt_task_begin(const __itt_domain *domain, __itt_id taskid, __itt_id parentid, __itt_string_handle *name); /** * @ingroup tasks * @brief Begin a task instance. * @param[in] domain The domain for this task * @param[in] taskid The identifier for this task instance (may be 0) * @param[in] parentid The parent of this task (may be 0) * @param[in] fn The pointer to the function you are tracing */ void ITTAPI __itt_task_begin_fn(const __itt_domain *domain, __itt_id taskid, __itt_id parentid, void* fn); /** * @ingroup tasks * @brief End the current task instance. * @param[in] domain The domain for this task */ void ITTAPI __itt_task_end(const __itt_domain *domain); /** @cond exclude_from_documentation */ #ifndef INTEL_NO_MACRO_BODY #ifndef INTEL_NO_ITTNOTIFY_API ITT_STUBV(ITTAPI, void, task_begin, (const __itt_domain *domain, __itt_id id, __itt_id parentid, __itt_string_handle *name)) ITT_STUBV(ITTAPI, void, task_begin_fn, (const __itt_domain *domain, __itt_id id, __itt_id parentid, void* fn)) ITT_STUBV(ITTAPI, void, task_end, (const __itt_domain *domain)) #define __itt_task_begin(d,x,y,z) ITTNOTIFY_VOID_D3(task_begin,d,x,y,z) #define __itt_task_begin_ptr ITTNOTIFY_NAME(task_begin) #define __itt_task_begin_fn(d,x,y,z) ITTNOTIFY_VOID_D3(task_begin_fn,d,x,y,z) #define __itt_task_begin_fn_ptr ITTNOTIFY_NAME(task_begin_fn) #define __itt_task_end(d) ITTNOTIFY_VOID_D0(task_end,d) #define __itt_task_end_ptr ITTNOTIFY_NAME(task_end) #else /* INTEL_NO_ITTNOTIFY_API */ #define __itt_task_begin(domain,id,parentid,name) #define __itt_task_begin_ptr 0 #define __itt_task_begin_fn(domain,id,parentid,fn) #define __itt_task_begin_fn_ptr 0 #define __itt_task_end(domain) #define __itt_task_end_ptr 0 #endif /* INTEL_NO_ITTNOTIFY_API */ #else /* INTEL_NO_MACRO_BODY */ #define __itt_task_begin_ptr 0 #define __itt_task_begin_fn_ptr 0 #define __itt_task_end_ptr 0 #endif /* INTEL_NO_MACRO_BODY */ /** @endcond */ /** @} tasks group */ /** * @defgroup counters Counters * @ingroup public * Counters are user-defined objects with a monotonically increasing * value. Counter values are 64-bit unsigned integers. Counter values * are tracked per-thread. Counters have names that can be displayed in * the tools. * @{ */ /** * @ingroup counters * @brief Increment a counter by one. * The first call with a given name creates a counter by that name and sets its * value to zero on every thread. Successive calls increment the counter value * on the thread on which the call is issued. * @param[in] domain The domain controlling the call. Counter names are not domain specific. * The domain argument is used only to enable or disable the API calls. * @param[in] name The name of the counter */ void ITTAPI __itt_counter_inc_v3(const __itt_domain *domain, __itt_string_handle *name); /** * @ingroup counters * @brief Increment a counter by the value specified in delta. * @param[in] domain The domain controlling the call. Counter names are not domain specific. * The domain argument is used only to enable or disable the API calls. * @param[in] name The name of the counter * @param[in] delta The amount by which to increment the counter */ void ITTAPI __itt_counter_inc_delta_v3(const __itt_domain *domain, __itt_string_handle *name, unsigned long long delta); /** @cond exclude_from_documentation */ #ifndef INTEL_NO_MACRO_BODY #ifndef INTEL_NO_ITTNOTIFY_API ITT_STUBV(ITTAPI, void, counter_inc_v3, (const __itt_domain *domain, __itt_string_handle *name)) ITT_STUBV(ITTAPI, void, counter_inc_delta_v3, (const __itt_domain *domain, __itt_string_handle *name, unsigned long long delta)) #define __itt_counter_inc_v3(d,x) ITTNOTIFY_VOID_D1(counter_inc_v3,d,x) #define __itt_counter_inc_v3_ptr ITTNOTIFY_NAME(counter_inc_v3) #define __itt_counter_inc_delta_v3(d,x,y) ITTNOTIFY_VOID_D2(counter_inc_delta_v3,d,x,y) #define __itt_counter_inc_delta_v3_ptr ITTNOTIFY_NAME(counter_inc_delta_v3) #else /* INTEL_NO_ITTNOTIFY_API */ #define __itt_counter_inc_v3(domain,name) #define __itt_counter_inc_v3_ptr 0 #define __itt_counter_inc_delta_v3(domain,name,delta) #define __itt_counter_inc_delta_v3_ptr 0 #endif /* INTEL_NO_ITTNOTIFY_API */ #else /* INTEL_NO_MACRO_BODY */ #define __itt_counter_inc_v3_ptr 0 #define __itt_counter_inc_delta_v3_ptr 0 #endif /* INTEL_NO_MACRO_BODY */ /** @endcond */ /** @} counters group */ /** * @defgroup markers Markers * Markers represent a single discreet event in time. Markers have a scope, * described by an enumerated type __itt_scope. Markers are created by * the API call __itt_marker. A marker instance can be given an ID for use in * adding metadata. * @{ */ /** * @brief Describes the scope of an event object in the trace. */ typedef enum { __itt_scope_unknown = 0, __itt_scope_global, __itt_scope_track_group, __itt_scope_track, __itt_scope_task, __itt_scope_marker } __itt_scope; /** @cond exclude_from_documentation */ #define __itt_marker_scope_unknown __itt_scope_unknown #define __itt_marker_scope_global __itt_scope_global #define __itt_marker_scope_process __itt_scope_track_group #define __itt_marker_scope_thread __itt_scope_track #define __itt_marker_scope_task __itt_scope_task /** @endcond */ /** * @ingroup markers * @brief Create a marker instance * @param[in] domain The domain for this marker * @param[in] id The instance ID for this marker or __itt_null * @param[in] name The name for this marker * @param[in] scope The scope for this marker */ void ITTAPI __itt_marker(const __itt_domain *domain, __itt_id id, __itt_string_handle *name, __itt_scope scope); /** @cond exclude_from_documentation */ #ifndef INTEL_NO_MACRO_BODY #ifndef INTEL_NO_ITTNOTIFY_API ITT_STUBV(ITTAPI, void, marker, (const __itt_domain *domain, __itt_id id, __itt_string_handle *name, __itt_scope scope)) #define __itt_marker(d,x,y,z) ITTNOTIFY_VOID_D3(marker,d,x,y,z) #define __itt_marker_ptr ITTNOTIFY_NAME(marker) #else /* INTEL_NO_ITTNOTIFY_API */ #define __itt_marker(domain,id,name,scope) #define __itt_marker_ptr 0 #endif /* INTEL_NO_ITTNOTIFY_API */ #else /* INTEL_NO_MACRO_BODY */ #define __itt_marker_ptr 0 #endif /* INTEL_NO_MACRO_BODY */ /** @endcond */ /** @} markers group */ /** * @defgroup metadata Metadata * The metadata API is used to attach extra information to named * entities. Metadata can be attached to an identified named entity by ID, * or to the current entity (which is always a task). * * Conceptually metadata has a type (what kind of metadata), a key (the * name of the metadata), and a value (the actual data). The encoding of * the value depends on the type of the metadata. * * The type of metadata is specified by an enumerated type __itt_metdata_type. * @{ */ /** * @ingroup parameters * @brief describes the type of metadata */ typedef enum { __itt_metadata_unknown = 0, __itt_metadata_u64, /**< Unsigned 64-bit integer */ __itt_metadata_s64, /**< Signed 64-bit integer */ __itt_metadata_u32, /**< Unsigned 32-bit integer */ __itt_metadata_s32, /**< Signed 32-bit integer */ __itt_metadata_u16, /**< Unsigned 16-bit integer */ __itt_metadata_s16, /**< Signed 16-bit integer */ __itt_metadata_float, /**< Signed 32-bit floating-point */ __itt_metadata_double /**< SIgned 64-bit floating-point */ } __itt_metadata_type; /** * @ingroup parameters * @brief Add metadata to an instance of a named entity. * @param[in] domain The domain controlling the call * @param[in] id The identifier of the instance to which the metadata is to be added, or __itt_null to add to the current task * @param[in] key The name of the metadata * @param[in] type The type of the metadata * @param[in] count The number of elements of the given type. If count == 0, no metadata will be added. * @param[in] data The metadata itself */ void ITTAPI __itt_metadata_add(const __itt_domain *domain, __itt_id id, __itt_string_handle *key, __itt_metadata_type type, size_t count, void *data); /** @cond exclude_from_documentation */ #ifndef INTEL_NO_MACRO_BODY #ifndef INTEL_NO_ITTNOTIFY_API ITT_STUBV(ITTAPI, void, metadata_add, (const __itt_domain *domain, __itt_id id, __itt_string_handle *key, __itt_metadata_type type, size_t count, void *data)) #define __itt_metadata_add(d,x,y,z,a,b) ITTNOTIFY_VOID_D5(metadata_add,d,x,y,z,a,b) #define __itt_metadata_add_ptr ITTNOTIFY_NAME(metadata_add) #else /* INTEL_NO_ITTNOTIFY_API */ #define __itt_metadata_add(d,x,y,z,a,b) #define __itt_metadata_add_ptr 0 #endif /* INTEL_NO_ITTNOTIFY_API */ #else /* INTEL_NO_MACRO_BODY */ #define __itt_metadata_add_ptr 0 #endif /* INTEL_NO_MACRO_BODY */ /** @endcond */ /** * @ingroup parameters * @brief Add string metadata to an instance of a named entity. * @param[in] domain The domain controlling the call * @param[in] id The identifier of the instance to which the metadata is to be added, or __itt_null to add to the current task * @param[in] key The name of the metadata * @param[in] data The metadata itself * @param[in] length The number of characters in the string, or -1 if the length is unknown but the string is null-terminated */ #if ITT_PLATFORM==ITT_PLATFORM_WIN void ITTAPI __itt_metadata_str_addA(const __itt_domain *domain, __itt_id id, __itt_string_handle *key, const char *data, size_t length); void ITTAPI __itt_metadata_str_addW(const __itt_domain *domain, __itt_id id, __itt_string_handle *key, const wchar_t *data, size_t length); #if defined(UNICODE) || defined(_UNICODE) # define __itt_metadata_str_add __itt_metadata_str_addW # define __itt_metadata_str_add_ptr __itt_metadata_str_addW_ptr #else /* UNICODE */ # define __itt_metadata_str_add __itt_metadata_str_addA # define __itt_metadata_str_add_ptr __itt_metadata_str_addA_ptr #endif /* UNICODE */ #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ void ITTAPI __itt_metadata_str_add(const __itt_domain *domain, __itt_id id, __itt_string_handle *key, const char *data, size_t length); #endif /** @cond exclude_from_documentation */ #ifndef INTEL_NO_MACRO_BODY #ifndef INTEL_NO_ITTNOTIFY_API #if ITT_PLATFORM==ITT_PLATFORM_WIN ITT_STUBV(ITTAPI, void, metadata_str_addA, (const __itt_domain *domain, __itt_id id, __itt_string_handle *key, const char *data, size_t length)) ITT_STUBV(ITTAPI, void, metadata_str_addW, (const __itt_domain *domain, __itt_id id, __itt_string_handle *key, const wchar_t *data, size_t length)) #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ ITT_STUBV(ITTAPI, void, metadata_str_add, (const __itt_domain *domain, __itt_id id, __itt_string_handle *key, const char *data, size_t length)) #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ #if ITT_PLATFORM==ITT_PLATFORM_WIN #define __itt_metadata_str_addA(d,x,y,z,a) ITTNOTIFY_VOID_D4(metadata_str_addA,d,x,y,z,a) #define __itt_metadata_str_addA_ptr ITTNOTIFY_NAME(metadata_str_addA) #define __itt_metadata_str_addW(d,x,y,z,a) ITTNOTIFY_VOID_D4(metadata_str_addW,d,x,y,z,a) #define __itt_metadata_str_addW_ptr ITTNOTIFY_NAME(metadata_str_addW) #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ #define __itt_metadata_str_add(d,x,y,z,a) ITTNOTIFY_VOID_D4(metadata_str_add,d,x,y,z,a) #define __itt_metadata_str_add_ptr ITTNOTIFY_NAME(metadata_str_add) #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ #else /* INTEL_NO_ITTNOTIFY_API */ #if ITT_PLATFORM==ITT_PLATFORM_WIN #define __itt_metadata_str_addA(d,x,y,z,a) #define __itt_metadata_str_addA_ptr 0 #define __itt_metadata_str_addW(d,x,y,z,a) #define __itt_metadata_str_addW_ptr 0 #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ #define __itt_metadata_str_add(d,x,y,z,a) #define __itt_metadata_str_add_ptr 0 #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ #endif /* INTEL_NO_ITTNOTIFY_API */ #else /* INTEL_NO_MACRO_BODY */ #if ITT_PLATFORM==ITT_PLATFORM_WIN #define __itt_metadata_str_addA_ptr 0 #define __itt_metadata_str_addW_ptr 0 #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ #define __itt_metadata_str_add_ptr 0 #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ #endif /* INTEL_NO_MACRO_BODY */ /** @endcond */ /** * @ingroup parameters * @brief Add metadata to an instance of a named entity. * @param[in] domain The domain controlling the call * @param[in] scope The scope of the instance to which the metadata is to be added * @param[in] id The identifier of the instance to which the metadata is to be added, or __itt_null to add to the current task * @param[in] key The name of the metadata * @param[in] type The type of the metadata * @param[in] count The number of elements of the given type. If count == 0, no metadata will be added. * @param[in] data The metadata itself */ void ITTAPI __itt_metadata_add_with_scope(const __itt_domain *domain, __itt_scope scope, __itt_string_handle *key, __itt_metadata_type type, size_t count, void *data); /** @cond exclude_from_documentation */ #ifndef INTEL_NO_MACRO_BODY #ifndef INTEL_NO_ITTNOTIFY_API ITT_STUBV(ITTAPI, void, metadata_add_with_scope, (const __itt_domain *domain, __itt_scope scope, __itt_string_handle *key, __itt_metadata_type type, size_t count, void *data)) #define __itt_metadata_add_with_scope(d,x,y,z,a,b) ITTNOTIFY_VOID_D5(metadata_add_with_scope,d,x,y,z,a,b) #define __itt_metadata_add_with_scope_ptr ITTNOTIFY_NAME(metadata_add_with_scope) #else /* INTEL_NO_ITTNOTIFY_API */ #define __itt_metadata_add_with_scope(d,x,y,z,a,b) #define __itt_metadata_add_with_scope_ptr 0 #endif /* INTEL_NO_ITTNOTIFY_API */ #else /* INTEL_NO_MACRO_BODY */ #define __itt_metadata_add_with_scope_ptr 0 #endif /* INTEL_NO_MACRO_BODY */ /** @endcond */ /** * @ingroup parameters * @brief Add string metadata to an instance of a named entity. * @param[in] domain The domain controlling the call * @param[in] scope The scope of the instance to which the metadata is to be added * @param[in] id The identifier of the instance to which the metadata is to be added, or __itt_null to add to the current task * @param[in] key The name of the metadata * @param[in] data The metadata itself * @param[in] length The number of characters in the string, or -1 if the length is unknown but the string is null-terminated */ #if ITT_PLATFORM==ITT_PLATFORM_WIN void ITTAPI __itt_metadata_str_add_with_scopeA(const __itt_domain *domain, __itt_scope scope, __itt_string_handle *key, const char *data, size_t length); void ITTAPI __itt_metadata_str_add_with_scopeW(const __itt_domain *domain, __itt_scope scope, __itt_string_handle *key, const wchar_t *data, size_t length); #if defined(UNICODE) || defined(_UNICODE) # define __itt_metadata_str_add_with_scope __itt_metadata_str_add_with_scopeW # define __itt_metadata_str_add_with_scope_ptr __itt_metadata_str_add_with_scopeW_ptr #else /* UNICODE */ # define __itt_metadata_str_add_with_scope __itt_metadata_str_add_with_scopeA # define __itt_metadata_str_add_with_scope_ptr __itt_metadata_str_add_with_scopeA_ptr #endif /* UNICODE */ #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ void ITTAPI __itt_metadata_str_add_with_scope(const __itt_domain *domain, __itt_scope scope, __itt_string_handle *key, const char *data, size_t length); #endif /** @cond exclude_from_documentation */ #ifndef INTEL_NO_MACRO_BODY #ifndef INTEL_NO_ITTNOTIFY_API #if ITT_PLATFORM==ITT_PLATFORM_WIN ITT_STUBV(ITTAPI, void, metadata_str_add_with_scopeA, (const __itt_domain *domain, __itt_scope scope, __itt_string_handle *key, const char *data, size_t length)) ITT_STUBV(ITTAPI, void, metadata_str_add_with_scopeW, (const __itt_domain *domain, __itt_scope scope, __itt_string_handle *key, const wchar_t *data, size_t length)) #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ ITT_STUBV(ITTAPI, void, metadata_str_add_with_scope, (const __itt_domain *domain, __itt_scope scope, __itt_string_handle *key, const char *data, size_t length)) #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ #if ITT_PLATFORM==ITT_PLATFORM_WIN #define __itt_metadata_str_add_with_scopeA(d,x,y,z,a) ITTNOTIFY_VOID_D4(metadata_str_add_with_scopeA,d,x,y,z,a) #define __itt_metadata_str_add_with_scopeA_ptr ITTNOTIFY_NAME(metadata_str_add_with_scopeA) #define __itt_metadata_str_add_with_scopeW(d,x,y,z,a) ITTNOTIFY_VOID_D4(metadata_str_add_with_scopeW,d,x,y,z,a) #define __itt_metadata_str_add_with_scopeW_ptr ITTNOTIFY_NAME(metadata_str_add_with_scopeW) #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ #define __itt_metadata_str_add_with_scope(d,x,y,z,a) ITTNOTIFY_VOID_D4(metadata_str_add_with_scope,d,x,y,z,a) #define __itt_metadata_str_add_with_scope_ptr ITTNOTIFY_NAME(metadata_str_add_with_scope) #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ #else /* INTEL_NO_ITTNOTIFY_API */ #if ITT_PLATFORM==ITT_PLATFORM_WIN #define __itt_metadata_str_add_with_scopeA(d,x,y,z,a) #define __itt_metadata_str_add_with_scopeA_ptr 0 #define __itt_metadata_str_add_with_scopeW(d,x,y,z,a) #define __itt_metadata_str_add_with_scopeW_ptr 0 #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ #define __itt_metadata_str_add_with_scope(d,x,y,z,a) #define __itt_metadata_str_add_with_scope_ptr 0 #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ #endif /* INTEL_NO_ITTNOTIFY_API */ #else /* INTEL_NO_MACRO_BODY */ #if ITT_PLATFORM==ITT_PLATFORM_WIN #define __itt_metadata_str_add_with_scopeA_ptr 0 #define __itt_metadata_str_add_with_scopeW_ptr 0 #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ #define __itt_metadata_str_add_with_scope_ptr 0 #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ #endif /* INTEL_NO_MACRO_BODY */ /** @endcond */ /** @} metadata group */ /** * @defgroup relations Relations * Instances of named entities can be explicitly associated with other * instances using instance IDs and the relationship API calls. * * @{ */ /** * @ingroup relations * @brief The kind of relation between two instances is specified by the enumerated type __itt_relation. * Relations between instances can be added with an API call. The relation * API uses instance IDs. Relations can be added before or after the actual * instances are created and persist independently of the instances. This * is the motivation for having different lifetimes for instance IDs and * the actual instances. */ typedef enum { __itt_relation_is_unknown = 0, __itt_relation_is_dependent_on, /**< "A is dependent on B" means that A cannot start until B completes */ __itt_relation_is_sibling_of, /**< "A is sibling of B" means that A and B were created as a group */ __itt_relation_is_parent_of, /**< "A is parent of B" means that A created B */ __itt_relation_is_continuation_of, /**< "A is continuation of B" means that A assumes the dependencies of B */ __itt_relation_is_child_of, /**< "A is child of B" means that A was created by B (inverse of is_parent_of) */ __itt_relation_is_continued_by, /**< "A is continued by B" means that B assumes the dependencies of A (inverse of is_continuation_of) */ __itt_relation_is_predecessor_to /**< "A is predecessor to B" means that B cannot start until A completes (inverse of is_dependent_on) */ } __itt_relation; /** * @ingroup relations * @brief Add a relation to the current task instance. * The current task instance is the head of the relation. * @param[in] domain The domain controlling this call * @param[in] relation The kind of relation * @param[in] tail The ID for the tail of the relation */ void ITTAPI __itt_relation_add_to_current(const __itt_domain *domain, __itt_relation relation, __itt_id tail); /** * @ingroup relations * @brief Add a relation between two instance identifiers. * @param[in] domain The domain controlling this call * @param[in] head The ID for the head of the relation * @param[in] relation The kind of relation * @param[in] tail The ID for the tail of the relation */ void ITTAPI __itt_relation_add(const __itt_domain *domain, __itt_id head, __itt_relation relation, __itt_id tail); /** @cond exclude_from_documentation */ #ifndef INTEL_NO_MACRO_BODY #ifndef INTEL_NO_ITTNOTIFY_API ITT_STUBV(ITTAPI, void, relation_add_to_current, (const __itt_domain *domain, __itt_relation relation, __itt_id tail)) ITT_STUBV(ITTAPI, void, relation_add, (const __itt_domain *domain, __itt_id head, __itt_relation relation, __itt_id tail)) #define __itt_relation_add_to_current(d,x,y) ITTNOTIFY_VOID_D2(relation_add_to_current,d,x,y) #define __itt_relation_add_to_current_ptr ITTNOTIFY_NAME(relation_add_to_current) #define __itt_relation_add(d,x,y,z) ITTNOTIFY_VOID_D3(relation_add,d,x,y,z) #define __itt_relation_add_ptr ITTNOTIFY_NAME(relation_add) #else /* INTEL_NO_ITTNOTIFY_API */ #define __itt_relation_add_to_current(d,x,y) #define __itt_relation_add_to_current_ptr 0 #define __itt_relation_add(d,x,y,z) #define __itt_relation_add_ptr 0 #endif /* INTEL_NO_ITTNOTIFY_API */ #else /* INTEL_NO_MACRO_BODY */ #define __itt_relation_add_to_current_ptr 0 #define __itt_relation_add_ptr 0 #endif /* INTEL_NO_MACRO_BODY */ /** @endcond */ /** @} relations group */ /** @cond exclude_from_documentation */ #pragma pack(push, 8) typedef struct ___itt_clock_info { unsigned long long clock_freq; /*!< Clock domain frequency */ unsigned long long clock_base; /*!< Clock domain base timestamp */ } __itt_clock_info; #pragma pack(pop) /** @endcond */ /** @cond exclude_from_documentation */ typedef void (ITTAPI *__itt_get_clock_info_fn)(__itt_clock_info* clock_info, void* data); /** @endcond */ /** @cond exclude_from_documentation */ #pragma pack(push, 8) typedef struct ___itt_clock_domain { __itt_clock_info info; /*!< Most recent clock domain info */ __itt_get_clock_info_fn fn; /*!< Callback function pointer */ void* fn_data; /*!< Input argument for the callback function */ int extra1; /*!< Reserved. Must be zero */ void* extra2; /*!< Reserved. Must be zero */ struct ___itt_clock_domain* next; } __itt_clock_domain; #pragma pack(pop) /** @endcond */ /** * @ingroup clockdomains * @brief Create a clock domain. * Certain applications require the capability to trace their application using * a clock domain different than the CPU, for instance the instrumentation of events * that occur on a GPU. * Because the set of domains is expected to be static over the application's execution time, * there is no mechanism to destroy a domain. * Any domain can be accessed by any thread in the process, regardless of which thread created * the domain. This call is thread-safe. * @param[in] fn A pointer to a callback function which retrieves alternative CPU timestamps * @param[in] fn_data Argument for a callback function; may be NULL */ __itt_clock_domain* ITTAPI __itt_clock_domain_create(__itt_get_clock_info_fn fn, void* fn_data); /** @cond exclude_from_documentation */ #ifndef INTEL_NO_MACRO_BODY #ifndef INTEL_NO_ITTNOTIFY_API ITT_STUB(ITTAPI, __itt_clock_domain*, clock_domain_create, (__itt_get_clock_info_fn fn, void* fn_data)) #define __itt_clock_domain_create ITTNOTIFY_DATA(clock_domain_create) #define __itt_clock_domain_create_ptr ITTNOTIFY_NAME(clock_domain_create) #else /* INTEL_NO_ITTNOTIFY_API */ #define __itt_clock_domain_create(fn,fn_data) (__itt_clock_domain*)0 #define __itt_clock_domain_create_ptr 0 #endif /* INTEL_NO_ITTNOTIFY_API */ #else /* INTEL_NO_MACRO_BODY */ #define __itt_clock_domain_create_ptr 0 #endif /* INTEL_NO_MACRO_BODY */ /** @endcond */ /** * @ingroup clockdomains * @brief Recalculate clock domains frequences and clock base timestamps. */ void ITTAPI __itt_clock_domain_reset(void); /** @cond exclude_from_documentation */ #ifndef INTEL_NO_MACRO_BODY #ifndef INTEL_NO_ITTNOTIFY_API ITT_STUBV(ITTAPI, void, clock_domain_reset, (void)) #define __itt_clock_domain_reset ITTNOTIFY_VOID(clock_domain_reset) #define __itt_clock_domain_reset_ptr ITTNOTIFY_NAME(clock_domain_reset) #else /* INTEL_NO_ITTNOTIFY_API */ #define __itt_clock_domain_reset() #define __itt_clock_domain_reset_ptr 0 #endif /* INTEL_NO_ITTNOTIFY_API */ #else /* INTEL_NO_MACRO_BODY */ #define __itt_clock_domain_reset_ptr 0 #endif /* INTEL_NO_MACRO_BODY */ /** @endcond */ /** * @ingroup clockdomain * @brief Create an instance of identifier. This establishes the beginning of the lifetime of * an instance of the given ID in the trace. Once this lifetime starts, the ID can be used to * tag named entity instances in calls such as __itt_task_begin, and to specify relationships among * identified named entity instances, using the \ref relations APIs. * @param[in] domain The domain controlling the execution of this call. * @param[in] clock_domain The clock domain controlling the execution of this call. * @param[in] timestamp The user defined timestamp. * @param[in] id The ID to create. */ void ITTAPI __itt_id_create_ex(const __itt_domain* domain, __itt_clock_domain* clock_domain, unsigned long long timestamp, __itt_id id); /** * @ingroup clockdomain * @brief Destroy an instance of identifier. This ends the lifetime of the current instance of the * given ID value in the trace. Any relationships that are established after this lifetime ends are * invalid. This call must be performed before the given ID value can be reused for a different * named entity instance. * @param[in] domain The domain controlling the execution of this call. * @param[in] clock_domain The clock domain controlling the execution of this call. * @param[in] timestamp The user defined timestamp. * @param[in] id The ID to destroy. */ void ITTAPI __itt_id_destroy_ex(const __itt_domain* domain, __itt_clock_domain* clock_domain, unsigned long long timestamp, __itt_id id); /** @cond exclude_from_documentation */ #ifndef INTEL_NO_MACRO_BODY #ifndef INTEL_NO_ITTNOTIFY_API ITT_STUBV(ITTAPI, void, id_create_ex, (const __itt_domain *domain, __itt_clock_domain* clock_domain, unsigned long long timestamp, __itt_id id)) ITT_STUBV(ITTAPI, void, id_destroy_ex, (const __itt_domain *domain, __itt_clock_domain* clock_domain, unsigned long long timestamp, __itt_id id)) #define __itt_id_create_ex(d,x,y,z) ITTNOTIFY_VOID_D3(id_create_ex,d,x,y,z) #define __itt_id_create_ex_ptr ITTNOTIFY_NAME(id_create_ex) #define __itt_id_destroy_ex(d,x,y,z) ITTNOTIFY_VOID_D3(id_destroy_ex,d,x,y,z) #define __itt_id_destroy_ex_ptr ITTNOTIFY_NAME(id_destroy_ex) #else /* INTEL_NO_ITTNOTIFY_API */ #define __itt_id_create_ex(domain,clock_domain,timestamp,id) #define __itt_id_create_ex_ptr 0 #define __itt_id_destroy_ex(domain,clock_domain,timestamp,id) #define __itt_id_destroy_ex_ptr 0 #endif /* INTEL_NO_ITTNOTIFY_API */ #else /* INTEL_NO_MACRO_BODY */ #define __itt_id_create_ex_ptr 0 #define __itt_id_destroy_ex_ptr 0 #endif /* INTEL_NO_MACRO_BODY */ /** @endcond */ /** * @ingroup clockdomain * @brief Begin a task instance. * @param[in] domain The domain for this task * @param[in] clock_domain The clock domain controlling the execution of this call. * @param[in] timestamp The user defined timestamp. * @param[in] taskid The instance ID for this task instance, or __itt_null * @param[in] parentid The parent instance to which this task instance belongs, or __itt_null * @param[in] name The name of this task */ void ITTAPI __itt_task_begin_ex(const __itt_domain* domain, __itt_clock_domain* clock_domain, unsigned long long timestamp, __itt_id taskid, __itt_id parentid, __itt_string_handle* name); /** * @ingroup clockdomain * @brief Begin a task instance. * @param[in] domain The domain for this task * @param[in] clock_domain The clock domain controlling the execution of this call. * @param[in] timestamp The user defined timestamp. * @param[in] taskid The identifier for this task instance, or __itt_null * @param[in] parentid The parent of this task, or __itt_null * @param[in] fn The pointer to the function you are tracing */ void ITTAPI __itt_task_begin_fn_ex(const __itt_domain* domain, __itt_clock_domain* clock_domain, unsigned long long timestamp, __itt_id taskid, __itt_id parentid, void* fn); /** * @ingroup clockdomain * @brief End the current task instance. * @param[in] domain The domain for this task * @param[in] clock_domain The clock domain controlling the execution of this call. * @param[in] timestamp The user defined timestamp. */ void ITTAPI __itt_task_end_ex(const __itt_domain* domain, __itt_clock_domain* clock_domain, unsigned long long timestamp); /** @cond exclude_from_documentation */ #ifndef INTEL_NO_MACRO_BODY #ifndef INTEL_NO_ITTNOTIFY_API ITT_STUBV(ITTAPI, void, task_begin_ex, (const __itt_domain *domain, __itt_clock_domain* clock_domain, unsigned long long timestamp, __itt_id id, __itt_id parentid, __itt_string_handle *name)) ITT_STUBV(ITTAPI, void, task_begin_fn_ex, (const __itt_domain *domain, __itt_clock_domain* clock_domain, unsigned long long timestamp, __itt_id id, __itt_id parentid, void* fn)) ITT_STUBV(ITTAPI, void, task_end_ex, (const __itt_domain *domain, __itt_clock_domain* clock_domain, unsigned long long timestamp)) #define __itt_task_begin_ex(d,x,y,z,a,b) ITTNOTIFY_VOID_D5(task_begin_ex,d,x,y,z,a,b) #define __itt_task_begin_ex_ptr ITTNOTIFY_NAME(task_begin_ex) #define __itt_task_begin_fn_ex(d,x,y,z,a,b) ITTNOTIFY_VOID_D5(task_begin_fn_ex,d,x,y,z,a,b) #define __itt_task_begin_fn_ex_ptr ITTNOTIFY_NAME(task_begin_fn_ex) #define __itt_task_end_ex(d,x,y) ITTNOTIFY_VOID_D2(task_end_ex,d,x,y) #define __itt_task_end_ex_ptr ITTNOTIFY_NAME(task_end_ex) #else /* INTEL_NO_ITTNOTIFY_API */ #define __itt_task_begin_ex(domain,clock_domain,timestamp,id,parentid,name) #define __itt_task_begin_ex_ptr 0 #define __itt_task_begin_fn_ex(domain,clock_domain,timestamp,id,parentid,fn) #define __itt_task_begin_fn_ex_ptr 0 #define __itt_task_end_ex(domain,clock_domain,timestamp) #define __itt_task_end_ex_ptr 0 #endif /* INTEL_NO_ITTNOTIFY_API */ #else /* INTEL_NO_MACRO_BODY */ #define __itt_task_begin_ex_ptr 0 #define __itt_task_begin_fn_ex_ptr 0 #define __itt_task_end_ex_ptr 0 #endif /* INTEL_NO_MACRO_BODY */ /** @endcond */ /** * @ingroup markers * @brief Create a marker instance. * @param[in] domain The domain for this marker * @param[in] clock_domain The clock domain controlling the execution of this call. * @param[in] timestamp The user defined timestamp. * @param[in] id The instance ID for this marker, or __itt_null * @param[in] name The name for this marker * @param[in] scope The scope for this marker */ void ITTAPI __itt_marker_ex(const __itt_domain *domain, __itt_clock_domain* clock_domain, unsigned long long timestamp, __itt_id id, __itt_string_handle *name, __itt_scope scope); /** @cond exclude_from_documentation */ #ifndef INTEL_NO_MACRO_BODY #ifndef INTEL_NO_ITTNOTIFY_API ITT_STUBV(ITTAPI, void, marker_ex, (const __itt_domain *domain, __itt_clock_domain* clock_domain, unsigned long long timestamp, __itt_id id, __itt_string_handle *name, __itt_scope scope)) #define __itt_marker_ex(d,x,y,z,a,b) ITTNOTIFY_VOID_D5(marker_ex,d,x,y,z,a,b) #define __itt_marker_ex_ptr ITTNOTIFY_NAME(marker_ex) #else /* INTEL_NO_ITTNOTIFY_API */ #define __itt_marker_ex(domain,clock_domain,timestamp,id,name,scope) #define __itt_marker_ex_ptr 0 #endif /* INTEL_NO_ITTNOTIFY_API */ #else /* INTEL_NO_MACRO_BODY */ #define __itt_marker_ex_ptr 0 #endif /* INTEL_NO_MACRO_BODY */ /** @endcond */ /** * @ingroup clockdomain * @brief Add a relation to the current task instance. * The current task instance is the head of the relation. * @param[in] domain The domain controlling this call * @param[in] clock_domain The clock domain controlling the execution of this call. * @param[in] timestamp The user defined timestamp. * @param[in] relation The kind of relation * @param[in] tail The ID for the tail of the relation */ void ITTAPI __itt_relation_add_to_current_ex(const __itt_domain *domain, __itt_clock_domain* clock_domain, unsigned long long timestamp, __itt_relation relation, __itt_id tail); /** * @ingroup clockdomain * @brief Add a relation between two instance identifiers. * @param[in] domain The domain controlling this call * @param[in] clock_domain The clock domain controlling the execution of this call. * @param[in] timestamp The user defined timestamp. * @param[in] head The ID for the head of the relation * @param[in] relation The kind of relation * @param[in] tail The ID for the tail of the relation */ void ITTAPI __itt_relation_add_ex(const __itt_domain *domain, __itt_clock_domain* clock_domain, unsigned long long timestamp, __itt_id head, __itt_relation relation, __itt_id tail); /** @cond exclude_from_documentation */ #ifndef INTEL_NO_MACRO_BODY #ifndef INTEL_NO_ITTNOTIFY_API ITT_STUBV(ITTAPI, void, relation_add_to_current_ex, (const __itt_domain *domain, __itt_clock_domain* clock_domain, unsigned long long timestamp, __itt_relation relation, __itt_id tail)) ITT_STUBV(ITTAPI, void, relation_add_ex, (const __itt_domain *domain, __itt_clock_domain* clock_domain, unsigned long long timestamp, __itt_id head, __itt_relation relation, __itt_id tail)) #define __itt_relation_add_to_current_ex(d,x,y,z,a) ITTNOTIFY_VOID_D4(relation_add_to_current_ex,d,x,y,z,a) #define __itt_relation_add_to_current_ex_ptr ITTNOTIFY_NAME(relation_add_to_current_ex) #define __itt_relation_add_ex(d,x,y,z,a,b) ITTNOTIFY_VOID_D5(relation_add_ex,d,x,y,z,a,b) #define __itt_relation_add_ex_ptr ITTNOTIFY_NAME(relation_add_ex) #else /* INTEL_NO_ITTNOTIFY_API */ #define __itt_relation_add_to_current_ex(domain,clock_domain,timestame,relation,tail) #define __itt_relation_add_to_current_ex_ptr 0 #define __itt_relation_add_ex(domain,clock_domain,timestamp,head,relation,tail) #define __itt_relation_add_ex_ptr 0 #endif /* INTEL_NO_ITTNOTIFY_API */ #else /* INTEL_NO_MACRO_BODY */ #define __itt_relation_add_to_current_ex_ptr 0 #define __itt_relation_add_ex_ptr 0 #endif /* INTEL_NO_MACRO_BODY */ /** @endcond */ /** @cond exclude_from_documentation */ typedef enum ___itt_track_group_type { __itt_track_group_type_normal = 0 } __itt_track_group_type; /** @endcond */ /** @cond exclude_from_documentation */ #pragma pack(push, 8) typedef struct ___itt_track_group { __itt_string_handle* name; /*!< Name of the track group */ struct ___itt_track* track; /*!< List of child tracks */ __itt_track_group_type tgtype; /*!< Type of the track group */ int extra1; /*!< Reserved. Must be zero */ void* extra2; /*!< Reserved. Must be zero */ struct ___itt_track_group* next; } __itt_track_group; #pragma pack(pop) /** @endcond */ /** * @brief Placeholder for custom track types. Currently, "normal" custom track * is the only available track type. */ typedef enum ___itt_track_type { __itt_track_type_normal = 0 #ifdef INTEL_ITTNOTIFY_API_PRIVATE , __itt_track_type_queue #endif /* INTEL_ITTNOTIFY_API_PRIVATE */ } __itt_track_type; /** @cond exclude_from_documentation */ #pragma pack(push, 8) typedef struct ___itt_track { __itt_string_handle* name; /*!< Name of the track group */ __itt_track_group* group; /*!< Parent group to a track */ __itt_track_type ttype; /*!< Type of the track */ int extra1; /*!< Reserved. Must be zero */ void* extra2; /*!< Reserved. Must be zero */ struct ___itt_track* next; } __itt_track; #pragma pack(pop) /** @endcond */ /** * @brief Create logical track group. */ __itt_track_group* ITTAPI __itt_track_group_create(__itt_string_handle* name, __itt_track_group_type track_group_type); /** @cond exclude_from_documentation */ #ifndef INTEL_NO_MACRO_BODY #ifndef INTEL_NO_ITTNOTIFY_API ITT_STUB(ITTAPI, __itt_track_group*, track_group_create, (__itt_string_handle* name, __itt_track_group_type track_group_type)) #define __itt_track_group_create ITTNOTIFY_DATA(track_group_create) #define __itt_track_group_create_ptr ITTNOTIFY_NAME(track_group_create) #else /* INTEL_NO_ITTNOTIFY_API */ #define __itt_track_group_create(name) (__itt_track_group*)0 #define __itt_track_group_create_ptr 0 #endif /* INTEL_NO_ITTNOTIFY_API */ #else /* INTEL_NO_MACRO_BODY */ #define __itt_track_group_create_ptr 0 #endif /* INTEL_NO_MACRO_BODY */ /** @endcond */ /** * @brief Create logical track. */ __itt_track* ITTAPI __itt_track_create(__itt_track_group* track_group, __itt_string_handle* name, __itt_track_type track_type); /** @cond exclude_from_documentation */ #ifndef INTEL_NO_MACRO_BODY #ifndef INTEL_NO_ITTNOTIFY_API ITT_STUB(ITTAPI, __itt_track*, track_create, (__itt_track_group* track_group,__itt_string_handle* name, __itt_track_type track_type)) #define __itt_track_create ITTNOTIFY_DATA(track_create) #define __itt_track_create_ptr ITTNOTIFY_NAME(track_create) #else /* INTEL_NO_ITTNOTIFY_API */ #define __itt_track_create(track_group,name,track_type) (__itt_track*)0 #define __itt_track_create_ptr 0 #endif /* INTEL_NO_ITTNOTIFY_API */ #else /* INTEL_NO_MACRO_BODY */ #define __itt_track_create_ptr 0 #endif /* INTEL_NO_MACRO_BODY */ /** @endcond */ /** * @brief Set the logical track. */ void ITTAPI __itt_set_track(__itt_track* track); /** @cond exclude_from_documentation */ #ifndef INTEL_NO_MACRO_BODY #ifndef INTEL_NO_ITTNOTIFY_API ITT_STUBV(ITTAPI, void, set_track, (__itt_track *track)) #define __itt_set_track ITTNOTIFY_VOID(set_track) #define __itt_set_track_ptr ITTNOTIFY_NAME(set_track) #else /* INTEL_NO_ITTNOTIFY_API */ #define __itt_set_track(track) #define __itt_set_track_ptr 0 #endif /* INTEL_NO_ITTNOTIFY_API */ #else /* INTEL_NO_MACRO_BODY */ #define __itt_set_track_ptr 0 #endif /* INTEL_NO_MACRO_BODY */ /** @endcond */ /* ========================================================================== */ /** @cond exclude_from_gpa_documentation */ /** * @defgroup events Events * @ingroup public * Events group * @{ */ /** @brief user event type */ typedef int __itt_event; /** * @brief Create an event notification * @note name or namelen being null/name and namelen not matching, user event feature not enabled * @return non-zero event identifier upon success and __itt_err otherwise */ #if ITT_PLATFORM==ITT_PLATFORM_WIN __itt_event LIBITTAPI __itt_event_createA(const char *name, int namelen); __itt_event LIBITTAPI __itt_event_createW(const wchar_t *name, int namelen); #if defined(UNICODE) || defined(_UNICODE) # define __itt_event_create __itt_event_createW # define __itt_event_create_ptr __itt_event_createW_ptr #else # define __itt_event_create __itt_event_createA # define __itt_event_create_ptr __itt_event_createA_ptr #endif /* UNICODE */ #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ __itt_event LIBITTAPI __itt_event_create(const char *name, int namelen); #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ /** @cond exclude_from_documentation */ #ifndef INTEL_NO_MACRO_BODY #ifndef INTEL_NO_ITTNOTIFY_API #if ITT_PLATFORM==ITT_PLATFORM_WIN ITT_STUB(LIBITTAPI, __itt_event, event_createA, (const char *name, int namelen)) ITT_STUB(LIBITTAPI, __itt_event, event_createW, (const wchar_t *name, int namelen)) #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ ITT_STUB(LIBITTAPI, __itt_event, event_create, (const char *name, int namelen)) #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ #if ITT_PLATFORM==ITT_PLATFORM_WIN #define __itt_event_createA ITTNOTIFY_DATA(event_createA) #define __itt_event_createA_ptr ITTNOTIFY_NAME(event_createA) #define __itt_event_createW ITTNOTIFY_DATA(event_createW) #define __itt_event_createW_ptr ITTNOTIFY_NAME(event_createW) #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ #define __itt_event_create ITTNOTIFY_DATA(event_create) #define __itt_event_create_ptr ITTNOTIFY_NAME(event_create) #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ #else /* INTEL_NO_ITTNOTIFY_API */ #if ITT_PLATFORM==ITT_PLATFORM_WIN #define __itt_event_createA(name, namelen) (__itt_event)0 #define __itt_event_createA_ptr 0 #define __itt_event_createW(name, namelen) (__itt_event)0 #define __itt_event_createW_ptr 0 #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ #define __itt_event_create(name, namelen) (__itt_event)0 #define __itt_event_create_ptr 0 #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ #endif /* INTEL_NO_ITTNOTIFY_API */ #else /* INTEL_NO_MACRO_BODY */ #if ITT_PLATFORM==ITT_PLATFORM_WIN #define __itt_event_createA_ptr 0 #define __itt_event_createW_ptr 0 #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ #define __itt_event_create_ptr 0 #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ #endif /* INTEL_NO_MACRO_BODY */ /** @endcond */ /** * @brief Record an event occurrence. * @return __itt_err upon failure (invalid event id/user event feature not enabled) */ int LIBITTAPI __itt_event_start(__itt_event event); /** @cond exclude_from_documentation */ #ifndef INTEL_NO_MACRO_BODY #ifndef INTEL_NO_ITTNOTIFY_API ITT_STUB(LIBITTAPI, int, event_start, (__itt_event event)) #define __itt_event_start ITTNOTIFY_DATA(event_start) #define __itt_event_start_ptr ITTNOTIFY_NAME(event_start) #else /* INTEL_NO_ITTNOTIFY_API */ #define __itt_event_start(event) (int)0 #define __itt_event_start_ptr 0 #endif /* INTEL_NO_ITTNOTIFY_API */ #else /* INTEL_NO_MACRO_BODY */ #define __itt_event_start_ptr 0 #endif /* INTEL_NO_MACRO_BODY */ /** @endcond */ /** * @brief Record an event end occurrence. * @note It is optional if events do not have durations. * @return __itt_err upon failure (invalid event id/user event feature not enabled) */ int LIBITTAPI __itt_event_end(__itt_event event); /** @cond exclude_from_documentation */ #ifndef INTEL_NO_MACRO_BODY #ifndef INTEL_NO_ITTNOTIFY_API ITT_STUB(LIBITTAPI, int, event_end, (__itt_event event)) #define __itt_event_end ITTNOTIFY_DATA(event_end) #define __itt_event_end_ptr ITTNOTIFY_NAME(event_end) #else /* INTEL_NO_ITTNOTIFY_API */ #define __itt_event_end(event) (int)0 #define __itt_event_end_ptr 0 #endif /* INTEL_NO_ITTNOTIFY_API */ #else /* INTEL_NO_MACRO_BODY */ #define __itt_event_end_ptr 0 #endif /* INTEL_NO_MACRO_BODY */ /** @endcond */ /** @} events group */ /** * @defgroup arrays Arrays Visualizer * @ingroup public * Visualize arrays * @{ */ /** * @enum __itt_av_data_type * @brief Defines types of arrays data (for C/C++ intrinsic types) */ typedef enum { __itt_e_first = 0, __itt_e_char = 0, /* 1-byte integer */ __itt_e_uchar, /* 1-byte unsigned integer */ __itt_e_int16, /* 2-byte integer */ __itt_e_uint16, /* 2-byte unsigned integer */ __itt_e_int32, /* 4-byte integer */ __itt_e_uint32, /* 4-byte unsigned integer */ __itt_e_int64, /* 8-byte integer */ __itt_e_uint64, /* 8-byte unsigned integer */ __itt_e_float, /* 4-byte floating */ __itt_e_double, /* 8-byte floating */ __itt_e_last = __itt_e_double } __itt_av_data_type; /** * @brief Save an array data to a file. * Output format is defined by the file extension. The csv and bmp formats are supported (bmp - for 2-dimensional array only). * @param[in] data - pointer to the array data * @param[in] rank - the rank of the array * @param[in] dimensions - pointer to an array of integers, which specifies the array dimensions. * The size of dimensions must be equal to the rank * @param[in] type - the type of the array, specified as one of the __itt_av_data_type values (for intrinsic types) * @param[in] filePath - the file path; the output format is defined by the file extension * @param[in] columnOrder - defines how the array is stored in the linear memory. * It should be 1 for column-major order (e.g. in FORTRAN) or 0 - for row-major order (e.g. in C). */ #if ITT_PLATFORM==ITT_PLATFORM_WIN int ITTAPI __itt_av_saveA(void *data, int rank, const int *dimensions, int type, const char *filePath, int columnOrder); int ITTAPI __itt_av_saveW(void *data, int rank, const int *dimensions, int type, const wchar_t *filePath, int columnOrder); #if defined(UNICODE) || defined(_UNICODE) # define __itt_av_save __itt_av_saveW # define __itt_av_save_ptr __itt_av_saveW_ptr #else /* UNICODE */ # define __itt_av_save __itt_av_saveA # define __itt_av_save_ptr __itt_av_saveA_ptr #endif /* UNICODE */ #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ int ITTAPI __itt_av_save(void *data, int rank, const int *dimensions, int type, const char *filePath, int columnOrder); #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ /** @cond exclude_from_documentation */ #ifndef INTEL_NO_MACRO_BODY #ifndef INTEL_NO_ITTNOTIFY_API #if ITT_PLATFORM==ITT_PLATFORM_WIN ITT_STUB(ITTAPI, int, av_saveA, (void *data, int rank, const int *dimensions, int type, const char *filePath, int columnOrder)) ITT_STUB(ITTAPI, int, av_saveW, (void *data, int rank, const int *dimensions, int type, const wchar_t *filePath, int columnOrder)) #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ ITT_STUB(ITTAPI, int, av_save, (void *data, int rank, const int *dimensions, int type, const char *filePath, int columnOrder)) #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ #if ITT_PLATFORM==ITT_PLATFORM_WIN #define __itt_av_saveA ITTNOTIFY_DATA(av_saveA) #define __itt_av_saveA_ptr ITTNOTIFY_NAME(av_saveA) #define __itt_av_saveW ITTNOTIFY_DATA(av_saveW) #define __itt_av_saveW_ptr ITTNOTIFY_NAME(av_saveW) #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ #define __itt_av_save ITTNOTIFY_DATA(av_save) #define __itt_av_save_ptr ITTNOTIFY_NAME(av_save) #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ #else /* INTEL_NO_ITTNOTIFY_API */ #if ITT_PLATFORM==ITT_PLATFORM_WIN #define __itt_av_saveA(name) #define __itt_av_saveA_ptr 0 #define __itt_av_saveW(name) #define __itt_av_saveW_ptr 0 #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ #define __itt_av_save(name) #define __itt_av_save_ptr 0 #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ #endif /* INTEL_NO_ITTNOTIFY_API */ #else /* INTEL_NO_MACRO_BODY */ #if ITT_PLATFORM==ITT_PLATFORM_WIN #define __itt_av_saveA_ptr 0 #define __itt_av_saveW_ptr 0 #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ #define __itt_av_save_ptr 0 #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ #endif /* INTEL_NO_MACRO_BODY */ /** @endcond */ void ITTAPI __itt_enable_attach(void); /** @cond exclude_from_documentation */ #ifndef INTEL_NO_MACRO_BODY #ifndef INTEL_NO_ITTNOTIFY_API ITT_STUBV(ITTAPI, void, enable_attach, (void)) #define __itt_enable_attach ITTNOTIFY_VOID(enable_attach) #define __itt_enable_attach_ptr ITTNOTIFY_NAME(enable_attach) #else /* INTEL_NO_ITTNOTIFY_API */ #define __itt_enable_attach() #define __itt_enable_attach_ptr 0 #endif /* INTEL_NO_ITTNOTIFY_API */ #else /* INTEL_NO_MACRO_BODY */ #define __itt_enable_attach_ptr 0 #endif /* INTEL_NO_MACRO_BODY */ /** @endcond */ /** @cond exclude_from_gpa_documentation */ /** @} arrays group */ /** @endcond */ #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* _ITTNOTIFY_H_ */ #ifdef INTEL_ITTNOTIFY_API_PRIVATE #ifndef _ITTNOTIFY_PRIVATE_ #define _ITTNOTIFY_PRIVATE_ #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ /** * @ingroup tasks * @brief Begin an overlapped task instance. * @param[in] domain The domain for this task. * @param[in] taskid The identifier for this task instance, *cannot* be __itt_null. * @param[in] parentid The parent of this task, or __itt_null. * @param[in] name The name of this task. */ void ITTAPI __itt_task_begin_overlapped(const __itt_domain* domain, __itt_id taskid, __itt_id parentid, __itt_string_handle* name); /** * @ingroup clockdomain * @brief Begin an overlapped task instance. * @param[in] domain The domain for this task * @param[in] clock_domain The clock domain controlling the execution of this call. * @param[in] timestamp The user defined timestamp. * @param[in] taskid The identifier for this task instance, *cannot* be __itt_null. * @param[in] parentid The parent of this task, or __itt_null. * @param[in] name The name of this task. */ void ITTAPI __itt_task_begin_overlapped_ex(const __itt_domain* domain, __itt_clock_domain* clock_domain, unsigned long long timestamp, __itt_id taskid, __itt_id parentid, __itt_string_handle* name); /** * @ingroup tasks * @brief End an overlapped task instance. * @param[in] domain The domain for this task * @param[in] taskid Explicit ID of finished task */ void ITTAPI __itt_task_end_overlapped(const __itt_domain *domain, __itt_id taskid); /** * @ingroup clockdomain * @brief End an overlapped task instance. * @param[in] domain The domain for this task * @param[in] clock_domain The clock domain controlling the execution of this call. * @param[in] timestamp The user defined timestamp. * @param[in] taskid Explicit ID of finished task */ void ITTAPI __itt_task_end_overlapped_ex(const __itt_domain* domain, __itt_clock_domain* clock_domain, unsigned long long timestamp, __itt_id taskid); /** @cond exclude_from_documentation */ #ifndef INTEL_NO_MACRO_BODY #ifndef INTEL_NO_ITTNOTIFY_API ITT_STUBV(ITTAPI, void, task_begin_overlapped, (const __itt_domain *domain, __itt_id taskid, __itt_id parentid, __itt_string_handle *name)) ITT_STUBV(ITTAPI, void, task_begin_overlapped_ex, (const __itt_domain* domain, __itt_clock_domain* clock_domain, unsigned long long timestamp, __itt_id taskid, __itt_id parentid, __itt_string_handle* name)) ITT_STUBV(ITTAPI, void, task_end_overlapped, (const __itt_domain *domain, __itt_id taskid)) ITT_STUBV(ITTAPI, void, task_end_overlapped_ex, (const __itt_domain* domain, __itt_clock_domain* clock_domain, unsigned long long timestamp, __itt_id taskid)) #define __itt_task_begin_overlapped(d,x,y,z) ITTNOTIFY_VOID_D3(task_begin_overlapped,d,x,y,z) #define __itt_task_begin_overlapped_ptr ITTNOTIFY_NAME(task_begin_overlapped) #define __itt_task_begin_overlapped_ex(d,x,y,z,a,b) ITTNOTIFY_VOID_D5(task_begin_overlapped_ex,d,x,y,z,a,b) #define __itt_task_begin_overlapped_ex_ptr ITTNOTIFY_NAME(task_begin_overlapped_ex) #define __itt_task_end_overlapped(d,x) ITTNOTIFY_VOID_D1(task_end_overlapped,d,x) #define __itt_task_end_overlapped_ptr ITTNOTIFY_NAME(task_end_overlapped) #define __itt_task_end_overlapped_ex(d,x,y,z) ITTNOTIFY_VOID_D3(task_end_overlapped_ex,d,x,y,z) #define __itt_task_end_overlapped_ex_ptr ITTNOTIFY_NAME(task_end_overlapped_ex) #else /* INTEL_NO_ITTNOTIFY_API */ #define __itt_task_begin_overlapped(domain,taskid,parentid,name) #define __itt_task_begin_overlapped_ptr 0 #define __itt_task_begin_overlapped_ex(domain,clock_domain,timestamp,taskid,parentid,name) #define __itt_task_begin_overlapped_ex_ptr 0 #define __itt_task_end_overlapped(domain,taskid) #define __itt_task_end_overlapped_ptr 0 #define __itt_task_end_overlapped_ex(domain,clock_domain,timestamp,taskid) #define __itt_task_end_overlapped_ex_ptr 0 #endif /* INTEL_NO_ITTNOTIFY_API */ #else /* INTEL_NO_MACRO_BODY */ #define __itt_task_begin_overlapped_ptr 0 #define __itt_task_begin_overlapped_ex_ptr 0 #define __itt_task_end_overlapped_ptr 0 #define __itt_task_end_overlapped_ex_ptr 0 #endif /* INTEL_NO_MACRO_BODY */ /** @endcond */ /** * @defgroup makrs_internal Marks * @ingroup internal * Marks group * @warning Internal API: * - It is not shipped to outside of Intel * - It is delivered to internal Intel teams using e-mail or SVN access only * @{ */ /** @brief user mark type */ typedef int __itt_mark_type; /** * @brief Creates a user mark type with the specified name using char or Unicode string. * @param[in] name - name of mark to create * @return Returns a handle to the mark type */ #if ITT_PLATFORM==ITT_PLATFORM_WIN __itt_mark_type ITTAPI __itt_mark_createA(const char *name); __itt_mark_type ITTAPI __itt_mark_createW(const wchar_t *name); #if defined(UNICODE) || defined(_UNICODE) # define __itt_mark_create __itt_mark_createW # define __itt_mark_create_ptr __itt_mark_createW_ptr #else /* UNICODE */ # define __itt_mark_create __itt_mark_createA # define __itt_mark_create_ptr __itt_mark_createA_ptr #endif /* UNICODE */ #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ __itt_mark_type ITTAPI __itt_mark_create(const char *name); #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ /** @cond exclude_from_documentation */ #ifndef INTEL_NO_MACRO_BODY #ifndef INTEL_NO_ITTNOTIFY_API #if ITT_PLATFORM==ITT_PLATFORM_WIN ITT_STUB(ITTAPI, __itt_mark_type, mark_createA, (const char *name)) ITT_STUB(ITTAPI, __itt_mark_type, mark_createW, (const wchar_t *name)) #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ ITT_STUB(ITTAPI, __itt_mark_type, mark_create, (const char *name)) #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ #if ITT_PLATFORM==ITT_PLATFORM_WIN #define __itt_mark_createA ITTNOTIFY_DATA(mark_createA) #define __itt_mark_createA_ptr ITTNOTIFY_NAME(mark_createA) #define __itt_mark_createW ITTNOTIFY_DATA(mark_createW) #define __itt_mark_createW_ptr ITTNOTIFY_NAME(mark_createW) #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ #define __itt_mark_create ITTNOTIFY_DATA(mark_create) #define __itt_mark_create_ptr ITTNOTIFY_NAME(mark_create) #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ #else /* INTEL_NO_ITTNOTIFY_API */ #if ITT_PLATFORM==ITT_PLATFORM_WIN #define __itt_mark_createA(name) (__itt_mark_type)0 #define __itt_mark_createA_ptr 0 #define __itt_mark_createW(name) (__itt_mark_type)0 #define __itt_mark_createW_ptr 0 #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ #define __itt_mark_create(name) (__itt_mark_type)0 #define __itt_mark_create_ptr 0 #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ #endif /* INTEL_NO_ITTNOTIFY_API */ #else /* INTEL_NO_MACRO_BODY */ #if ITT_PLATFORM==ITT_PLATFORM_WIN #define __itt_mark_createA_ptr 0 #define __itt_mark_createW_ptr 0 #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ #define __itt_mark_create_ptr 0 #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ #endif /* INTEL_NO_MACRO_BODY */ /** @endcond */ /** * @brief Creates a "discrete" user mark type of the specified type and an optional parameter using char or Unicode string. * * - The mark of "discrete" type is placed to collection results in case of success. It appears in overtime view(s) as a special tick sign. * - The call is "synchronous" - function returns after mark is actually added to results. * - This function is useful, for example, to mark different phases of application * (beginning of the next mark automatically meand end of current region). * - Can be used together with "continuous" marks (see below) at the same collection session * @param[in] mt - mark, created by __itt_mark_create(const char* name) function * @param[in] parameter - string parameter of mark * @return Returns zero value in case of success, non-zero value otherwise. */ #if ITT_PLATFORM==ITT_PLATFORM_WIN int ITTAPI __itt_markA(__itt_mark_type mt, const char *parameter); int ITTAPI __itt_markW(__itt_mark_type mt, const wchar_t *parameter); #if defined(UNICODE) || defined(_UNICODE) # define __itt_mark __itt_markW # define __itt_mark_ptr __itt_markW_ptr #else /* UNICODE */ # define __itt_mark __itt_markA # define __itt_mark_ptr __itt_markA_ptr #endif /* UNICODE */ #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ int ITTAPI __itt_mark(__itt_mark_type mt, const char *parameter); #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ /** @cond exclude_from_documentation */ #ifndef INTEL_NO_MACRO_BODY #ifndef INTEL_NO_ITTNOTIFY_API #if ITT_PLATFORM==ITT_PLATFORM_WIN ITT_STUB(ITTAPI, int, markA, (__itt_mark_type mt, const char *parameter)) ITT_STUB(ITTAPI, int, markW, (__itt_mark_type mt, const wchar_t *parameter)) #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ ITT_STUB(ITTAPI, int, mark, (__itt_mark_type mt, const char *parameter)) #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ #if ITT_PLATFORM==ITT_PLATFORM_WIN #define __itt_markA ITTNOTIFY_DATA(markA) #define __itt_markA_ptr ITTNOTIFY_NAME(markA) #define __itt_markW ITTNOTIFY_DATA(markW) #define __itt_markW_ptr ITTNOTIFY_NAME(markW) #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ #define __itt_mark ITTNOTIFY_DATA(mark) #define __itt_mark_ptr ITTNOTIFY_NAME(mark) #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ #else /* INTEL_NO_ITTNOTIFY_API */ #if ITT_PLATFORM==ITT_PLATFORM_WIN #define __itt_markA(mt, parameter) (int)0 #define __itt_markA_ptr 0 #define __itt_markW(mt, parameter) (int)0 #define __itt_markW_ptr 0 #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ #define __itt_mark(mt, parameter) (int)0 #define __itt_mark_ptr 0 #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ #endif /* INTEL_NO_ITTNOTIFY_API */ #else /* INTEL_NO_MACRO_BODY */ #if ITT_PLATFORM==ITT_PLATFORM_WIN #define __itt_markA_ptr 0 #define __itt_markW_ptr 0 #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ #define __itt_mark_ptr 0 #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ #endif /* INTEL_NO_MACRO_BODY */ /** @endcond */ /** * @brief Use this if necessary to create a "discrete" user event type (mark) for process * rather then for one thread * @see int __itt_mark(__itt_mark_type mt, const char* parameter); */ #if ITT_PLATFORM==ITT_PLATFORM_WIN int ITTAPI __itt_mark_globalA(__itt_mark_type mt, const char *parameter); int ITTAPI __itt_mark_globalW(__itt_mark_type mt, const wchar_t *parameter); #if defined(UNICODE) || defined(_UNICODE) # define __itt_mark_global __itt_mark_globalW # define __itt_mark_global_ptr __itt_mark_globalW_ptr #else /* UNICODE */ # define __itt_mark_global __itt_mark_globalA # define __itt_mark_global_ptr __itt_mark_globalA_ptr #endif /* UNICODE */ #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ int ITTAPI __itt_mark_global(__itt_mark_type mt, const char *parameter); #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ /** @cond exclude_from_documentation */ #ifndef INTEL_NO_MACRO_BODY #ifndef INTEL_NO_ITTNOTIFY_API #if ITT_PLATFORM==ITT_PLATFORM_WIN ITT_STUB(ITTAPI, int, mark_globalA, (__itt_mark_type mt, const char *parameter)) ITT_STUB(ITTAPI, int, mark_globalW, (__itt_mark_type mt, const wchar_t *parameter)) #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ ITT_STUB(ITTAPI, int, mark_global, (__itt_mark_type mt, const char *parameter)) #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ #if ITT_PLATFORM==ITT_PLATFORM_WIN #define __itt_mark_globalA ITTNOTIFY_DATA(mark_globalA) #define __itt_mark_globalA_ptr ITTNOTIFY_NAME(mark_globalA) #define __itt_mark_globalW ITTNOTIFY_DATA(mark_globalW) #define __itt_mark_globalW_ptr ITTNOTIFY_NAME(mark_globalW) #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ #define __itt_mark_global ITTNOTIFY_DATA(mark_global) #define __itt_mark_global_ptr ITTNOTIFY_NAME(mark_global) #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ #else /* INTEL_NO_ITTNOTIFY_API */ #if ITT_PLATFORM==ITT_PLATFORM_WIN #define __itt_mark_globalA(mt, parameter) (int)0 #define __itt_mark_globalA_ptr 0 #define __itt_mark_globalW(mt, parameter) (int)0 #define __itt_mark_globalW_ptr 0 #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ #define __itt_mark_global(mt, parameter) (int)0 #define __itt_mark_global_ptr 0 #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ #endif /* INTEL_NO_ITTNOTIFY_API */ #else /* INTEL_NO_MACRO_BODY */ #if ITT_PLATFORM==ITT_PLATFORM_WIN #define __itt_mark_globalA_ptr 0 #define __itt_mark_globalW_ptr 0 #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ #define __itt_mark_global_ptr 0 #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ #endif /* INTEL_NO_MACRO_BODY */ /** @endcond */ /** * @brief Creates an "end" point for "continuous" mark with specified name. * * - Returns zero value in case of success, non-zero value otherwise. * Also returns non-zero value when preceding "begin" point for the * mark with the same name failed to be created or not created. * - The mark of "continuous" type is placed to collection results in * case of success. It appears in overtime view(s) as a special tick * sign (different from "discrete" mark) together with line from * corresponding "begin" mark to "end" mark. * @note Continuous marks can overlap and be nested inside each other. * Discrete mark can be nested inside marked region * @param[in] mt - mark, created by __itt_mark_create(const char* name) function * @return Returns zero value in case of success, non-zero value otherwise. */ int ITTAPI __itt_mark_off(__itt_mark_type mt); /** @cond exclude_from_documentation */ #ifndef INTEL_NO_MACRO_BODY #ifndef INTEL_NO_ITTNOTIFY_API ITT_STUB(ITTAPI, int, mark_off, (__itt_mark_type mt)) #define __itt_mark_off ITTNOTIFY_DATA(mark_off) #define __itt_mark_off_ptr ITTNOTIFY_NAME(mark_off) #else /* INTEL_NO_ITTNOTIFY_API */ #define __itt_mark_off(mt) (int)0 #define __itt_mark_off_ptr 0 #endif /* INTEL_NO_ITTNOTIFY_API */ #else /* INTEL_NO_MACRO_BODY */ #define __itt_mark_off_ptr 0 #endif /* INTEL_NO_MACRO_BODY */ /** @endcond */ /** * @brief Use this if necessary to create an "end" point for mark of process * @see int __itt_mark_off(__itt_mark_type mt); */ int ITTAPI __itt_mark_global_off(__itt_mark_type mt); /** @cond exclude_from_documentation */ #ifndef INTEL_NO_MACRO_BODY #ifndef INTEL_NO_ITTNOTIFY_API ITT_STUB(ITTAPI, int, mark_global_off, (__itt_mark_type mt)) #define __itt_mark_global_off ITTNOTIFY_DATA(mark_global_off) #define __itt_mark_global_off_ptr ITTNOTIFY_NAME(mark_global_off) #else /* INTEL_NO_ITTNOTIFY_API */ #define __itt_mark_global_off(mt) (int)0 #define __itt_mark_global_off_ptr 0 #endif /* INTEL_NO_ITTNOTIFY_API */ #else /* INTEL_NO_MACRO_BODY */ #define __itt_mark_global_off_ptr 0 #endif /* INTEL_NO_MACRO_BODY */ /** @endcond */ /** @} marks group */ /** * @defgroup counters_internal Counters * @ingroup internal * Counters group * @{ */ /** * @brief opaque structure for counter identification */ typedef struct ___itt_counter *__itt_counter; /** * @brief Create a counter with given name/domain for the calling thread * * After __itt_counter_create() is called, __itt_counter_inc() / __itt_counter_inc_delta() can be used * to increment the counter on any thread */ #if ITT_PLATFORM==ITT_PLATFORM_WIN __itt_counter ITTAPI __itt_counter_createA(const char *name, const char *domain); __itt_counter ITTAPI __itt_counter_createW(const wchar_t *name, const wchar_t *domain); #if defined(UNICODE) || defined(_UNICODE) # define __itt_counter_create __itt_counter_createW # define __itt_counter_create_ptr __itt_counter_createW_ptr #else /* UNICODE */ # define __itt_counter_create __itt_counter_createA # define __itt_counter_create_ptr __itt_counter_createA_ptr #endif /* UNICODE */ #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ __itt_counter ITTAPI __itt_counter_create(const char *name, const char *domain); #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ /** @cond exclude_from_documentation */ #ifndef INTEL_NO_MACRO_BODY #ifndef INTEL_NO_ITTNOTIFY_API #if ITT_PLATFORM==ITT_PLATFORM_WIN ITT_STUB(ITTAPI, __itt_counter, counter_createA, (const char *name, const char *domain)) ITT_STUB(ITTAPI, __itt_counter, counter_createW, (const wchar_t *name, const wchar_t *domain)) #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ ITT_STUB(ITTAPI, __itt_counter, counter_create, (const char *name, const char *domain)) #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ #if ITT_PLATFORM==ITT_PLATFORM_WIN #define __itt_counter_createA ITTNOTIFY_DATA(counter_createA) #define __itt_counter_createA_ptr ITTNOTIFY_NAME(counter_createA) #define __itt_counter_createW ITTNOTIFY_DATA(counter_createW) #define __itt_counter_createW_ptr ITTNOTIFY_NAME(counter_createW) #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ #define __itt_counter_create ITTNOTIFY_DATA(counter_create) #define __itt_counter_create_ptr ITTNOTIFY_NAME(counter_create) #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ #else /* INTEL_NO_ITTNOTIFY_API */ #if ITT_PLATFORM==ITT_PLATFORM_WIN #define __itt_counter_createA(name, domain) #define __itt_counter_createA_ptr 0 #define __itt_counter_createW(name, domain) #define __itt_counter_createW_ptr 0 #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ #define __itt_counter_create(name, domain) #define __itt_counter_create_ptr 0 #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ #endif /* INTEL_NO_ITTNOTIFY_API */ #else /* INTEL_NO_MACRO_BODY */ #if ITT_PLATFORM==ITT_PLATFORM_WIN #define __itt_counter_createA_ptr 0 #define __itt_counter_createW_ptr 0 #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ #define __itt_counter_create_ptr 0 #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ #endif /* INTEL_NO_MACRO_BODY */ /** @endcond */ /** * @brief Destroy the counter identified by the pointer previously returned by __itt_counter_create() */ void ITTAPI __itt_counter_destroy(__itt_counter id); /** @cond exclude_from_documentation */ #ifndef INTEL_NO_MACRO_BODY #ifndef INTEL_NO_ITTNOTIFY_API ITT_STUBV(ITTAPI, void, counter_destroy, (__itt_counter id)) #define __itt_counter_destroy ITTNOTIFY_VOID(counter_destroy) #define __itt_counter_destroy_ptr ITTNOTIFY_NAME(counter_destroy) #else /* INTEL_NO_ITTNOTIFY_API */ #define __itt_counter_destroy(id) #define __itt_counter_destroy_ptr 0 #endif /* INTEL_NO_ITTNOTIFY_API */ #else /* INTEL_NO_MACRO_BODY */ #define __itt_counter_destroy_ptr 0 #endif /* INTEL_NO_MACRO_BODY */ /** @endcond */ /** * @brief Increment the counter value */ void ITTAPI __itt_counter_inc(__itt_counter id); /** @cond exclude_from_documentation */ #ifndef INTEL_NO_MACRO_BODY #ifndef INTEL_NO_ITTNOTIFY_API ITT_STUBV(ITTAPI, void, counter_inc, (__itt_counter id)) #define __itt_counter_inc ITTNOTIFY_VOID(counter_inc) #define __itt_counter_inc_ptr ITTNOTIFY_NAME(counter_inc) #else /* INTEL_NO_ITTNOTIFY_API */ #define __itt_counter_inc(id) #define __itt_counter_inc_ptr 0 #endif /* INTEL_NO_ITTNOTIFY_API */ #else /* INTEL_NO_MACRO_BODY */ #define __itt_counter_inc_ptr 0 #endif /* INTEL_NO_MACRO_BODY */ /** @endcond */ /** * @brief Increment the counter value with x */ void ITTAPI __itt_counter_inc_delta(__itt_counter id, unsigned long long value); /** @cond exclude_from_documentation */ #ifndef INTEL_NO_MACRO_BODY #ifndef INTEL_NO_ITTNOTIFY_API ITT_STUBV(ITTAPI, void, counter_inc_delta, (__itt_counter id, unsigned long long value)) #define __itt_counter_inc_delta ITTNOTIFY_VOID(counter_inc_delta) #define __itt_counter_inc_delta_ptr ITTNOTIFY_NAME(counter_inc_delta) #else /* INTEL_NO_ITTNOTIFY_API */ #define __itt_counter_inc_delta(id, value) #define __itt_counter_inc_delta_ptr 0 #endif /* INTEL_NO_ITTNOTIFY_API */ #else /* INTEL_NO_MACRO_BODY */ #define __itt_counter_inc_delta_ptr 0 #endif /* INTEL_NO_MACRO_BODY */ /** @endcond */ /** @} counters group */ /** * @defgroup stitch Stack Stitching * @ingroup internal * Stack Stitching group * @{ */ /** * @brief opaque structure for counter identification */ typedef struct ___itt_caller *__itt_caller; /** * @brief Create the stitch point e.g. a point in call stack where other stacks should be stitched to. * The function returns a unique identifier which is used to match the cut points with corresponding stitch points. */ __itt_caller ITTAPI __itt_stack_caller_create(void); /** @cond exclude_from_documentation */ #ifndef INTEL_NO_MACRO_BODY #ifndef INTEL_NO_ITTNOTIFY_API ITT_STUB(ITTAPI, __itt_caller, stack_caller_create, (void)) #define __itt_stack_caller_create ITTNOTIFY_DATA(stack_caller_create) #define __itt_stack_caller_create_ptr ITTNOTIFY_NAME(stack_caller_create) #else /* INTEL_NO_ITTNOTIFY_API */ #define __itt_stack_caller_create() (__itt_caller)0 #define __itt_stack_caller_create_ptr 0 #endif /* INTEL_NO_ITTNOTIFY_API */ #else /* INTEL_NO_MACRO_BODY */ #define __itt_stack_caller_create_ptr 0 #endif /* INTEL_NO_MACRO_BODY */ /** @endcond */ /** * @brief Destroy the inforamtion about stitch point identified by the pointer previously returned by __itt_stack_caller_create() */ void ITTAPI __itt_stack_caller_destroy(__itt_caller id); /** @cond exclude_from_documentation */ #ifndef INTEL_NO_MACRO_BODY #ifndef INTEL_NO_ITTNOTIFY_API ITT_STUBV(ITTAPI, void, stack_caller_destroy, (__itt_caller id)) #define __itt_stack_caller_destroy ITTNOTIFY_VOID(stack_caller_destroy) #define __itt_stack_caller_destroy_ptr ITTNOTIFY_NAME(stack_caller_destroy) #else /* INTEL_NO_ITTNOTIFY_API */ #define __itt_stack_caller_destroy(id) #define __itt_stack_caller_destroy_ptr 0 #endif /* INTEL_NO_ITTNOTIFY_API */ #else /* INTEL_NO_MACRO_BODY */ #define __itt_stack_caller_destroy_ptr 0 #endif /* INTEL_NO_MACRO_BODY */ /** @endcond */ /** * @brief Sets the cut point. Stack from each event which occurs after this call will be cut * at the same stack level the function was called and stitched to the corresponding stitch point. */ void ITTAPI __itt_stack_callee_enter(__itt_caller id); /** @cond exclude_from_documentation */ #ifndef INTEL_NO_MACRO_BODY #ifndef INTEL_NO_ITTNOTIFY_API ITT_STUBV(ITTAPI, void, stack_callee_enter, (__itt_caller id)) #define __itt_stack_callee_enter ITTNOTIFY_VOID(stack_callee_enter) #define __itt_stack_callee_enter_ptr ITTNOTIFY_NAME(stack_callee_enter) #else /* INTEL_NO_ITTNOTIFY_API */ #define __itt_stack_callee_enter(id) #define __itt_stack_callee_enter_ptr 0 #endif /* INTEL_NO_ITTNOTIFY_API */ #else /* INTEL_NO_MACRO_BODY */ #define __itt_stack_callee_enter_ptr 0 #endif /* INTEL_NO_MACRO_BODY */ /** @endcond */ /** * @brief This function eliminates the cut point which was set by latest __itt_stack_callee_enter(). */ void ITTAPI __itt_stack_callee_leave(__itt_caller id); /** @cond exclude_from_documentation */ #ifndef INTEL_NO_MACRO_BODY #ifndef INTEL_NO_ITTNOTIFY_API ITT_STUBV(ITTAPI, void, stack_callee_leave, (__itt_caller id)) #define __itt_stack_callee_leave ITTNOTIFY_VOID(stack_callee_leave) #define __itt_stack_callee_leave_ptr ITTNOTIFY_NAME(stack_callee_leave) #else /* INTEL_NO_ITTNOTIFY_API */ #define __itt_stack_callee_leave(id) #define __itt_stack_callee_leave_ptr 0 #endif /* INTEL_NO_ITTNOTIFY_API */ #else /* INTEL_NO_MACRO_BODY */ #define __itt_stack_callee_leave_ptr 0 #endif /* INTEL_NO_MACRO_BODY */ /** @endcond */ /** @} stitch group */ /* ***************************************************************************************************************************** */ #include /** @cond exclude_from_documentation */ typedef enum __itt_error_code { __itt_error_success = 0, /*!< no error */ __itt_error_no_module = 1, /*!< module can't be loaded */ /* %1$s -- library name; win: %2$d -- system error code; unx: %2$s -- system error message. */ __itt_error_no_symbol = 2, /*!< symbol not found */ /* %1$s -- library name, %2$s -- symbol name. */ __itt_error_unknown_group = 3, /*!< unknown group specified */ /* %1$s -- env var name, %2$s -- group name. */ __itt_error_cant_read_env = 4, /*!< GetEnvironmentVariable() failed */ /* %1$s -- env var name, %2$d -- system error. */ __itt_error_env_too_long = 5, /*!< variable value too long */ /* %1$s -- env var name, %2$d -- actual length of the var, %3$d -- max allowed length. */ __itt_error_system = 6 /*!< pthread_mutexattr_init or pthread_mutex_init failed */ /* %1$s -- function name, %2$d -- errno. */ } __itt_error_code; typedef void (__itt_error_handler_t)(__itt_error_code code, va_list); __itt_error_handler_t* __itt_set_error_handler(__itt_error_handler_t*); const char* ITTAPI __itt_api_version(void); /** @endcond */ /** @cond exclude_from_documentation */ #ifndef INTEL_NO_MACRO_BODY #ifndef INTEL_NO_ITTNOTIFY_API #define __itt_error_handler ITT_JOIN(INTEL_ITTNOTIFY_PREFIX, error_handler) void __itt_error_handler(__itt_error_code code, va_list args); extern const int ITTNOTIFY_NAME(err); #define __itt_err ITTNOTIFY_NAME(err) ITT_STUB(ITTAPI, const char*, api_version, (void)) #define __itt_api_version ITTNOTIFY_DATA(api_version) #define __itt_api_version_ptr ITTNOTIFY_NAME(api_version) #else /* INTEL_NO_ITTNOTIFY_API */ #define __itt_api_version() (const char*)0 #define __itt_api_version_ptr 0 #endif /* INTEL_NO_ITTNOTIFY_API */ #else /* INTEL_NO_MACRO_BODY */ #define __itt_api_version_ptr 0 #endif /* INTEL_NO_MACRO_BODY */ /** @endcond */ #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* _ITTNOTIFY_PRIVATE_ */ #endif /* INTEL_ITTNOTIFY_API_PRIVATE */ ================================================ FILE: benchmarks/tbb/tools_api/ittnotify_config.h ================================================ /* Copyright 2005-2014 Intel Corporation. All Rights Reserved. This file is part of Threading Building Blocks. Threading Building Blocks is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. Threading Building Blocks is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Threading Building Blocks; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA As a special exception, you may use this file as part of a free software library without restriction. Specifically, if other files instantiate templates or use macros or inline functions from this file, or you compile this file and link it with other files to produce an executable, this file does not by itself cause the resulting executable to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the executable file might be covered by the GNU General Public License. */ #ifndef _ITTNOTIFY_CONFIG_H_ #define _ITTNOTIFY_CONFIG_H_ /** @cond exclude_from_documentation */ #ifndef ITT_OS_WIN # define ITT_OS_WIN 1 #endif /* ITT_OS_WIN */ #ifndef ITT_OS_LINUX # define ITT_OS_LINUX 2 #endif /* ITT_OS_LINUX */ #ifndef ITT_OS_MAC # define ITT_OS_MAC 3 #endif /* ITT_OS_MAC */ #ifndef ITT_OS # if defined WIN32 || defined _WIN32 # define ITT_OS ITT_OS_WIN # elif defined( __APPLE__ ) && defined( __MACH__ ) # define ITT_OS ITT_OS_MAC # else # define ITT_OS ITT_OS_LINUX # endif #endif /* ITT_OS */ #ifndef ITT_PLATFORM_WIN # define ITT_PLATFORM_WIN 1 #endif /* ITT_PLATFORM_WIN */ #ifndef ITT_PLATFORM_POSIX # define ITT_PLATFORM_POSIX 2 #endif /* ITT_PLATFORM_POSIX */ #ifndef ITT_PLATFORM_MAC # define ITT_PLATFORM_MAC 3 #endif /* ITT_PLATFORM_MAC */ #ifndef ITT_PLATFORM # if ITT_OS==ITT_OS_WIN # define ITT_PLATFORM ITT_PLATFORM_WIN # elif ITT_OS==ITT_OS_MAC # define ITT_PLATFORM ITT_PLATFORM_MAC # else # define ITT_PLATFORM ITT_PLATFORM_POSIX # endif #endif /* ITT_PLATFORM */ #if defined(_UNICODE) && !defined(UNICODE) #define UNICODE #endif #include #if ITT_PLATFORM==ITT_PLATFORM_WIN #include #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ #include #if defined(UNICODE) || defined(_UNICODE) #include #endif /* UNICODE || _UNICODE */ #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ #ifndef CDECL # if ITT_PLATFORM==ITT_PLATFORM_WIN # define CDECL __cdecl # else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ # if defined _M_IX86 || defined __i386__ # define CDECL __attribute__ ((cdecl)) # else /* _M_IX86 || __i386__ */ # define CDECL /* actual only on x86 platform */ # endif /* _M_IX86 || __i386__ */ # endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ #endif /* CDECL */ #ifndef STDCALL # if ITT_PLATFORM==ITT_PLATFORM_WIN # define STDCALL __stdcall # else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ # if defined _M_IX86 || defined __i386__ # define STDCALL __attribute__ ((stdcall)) # else /* _M_IX86 || __i386__ */ # define STDCALL /* supported only on x86 platform */ # endif /* _M_IX86 || __i386__ */ # endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ #endif /* STDCALL */ #define ITTAPI CDECL #define LIBITTAPI CDECL /* TODO: Temporary for compatibility! */ #define ITTAPI_CALL CDECL #define LIBITTAPI_CALL CDECL #if ITT_PLATFORM==ITT_PLATFORM_WIN /* use __forceinline (VC++ specific) */ #define ITT_INLINE __forceinline #define ITT_INLINE_ATTRIBUTE /* nothing */ #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ /* * Generally, functions are not inlined unless optimization is specified. * For functions declared inline, this attribute inlines the function even * if no optimization level was specified. */ #ifdef __STRICT_ANSI__ #define ITT_INLINE static inline #else /* __STRICT_ANSI__ */ #define ITT_INLINE static inline #endif /* __STRICT_ANSI__ */ #define ITT_INLINE_ATTRIBUTE __attribute__ ((always_inline, unused)) #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ /** @endcond */ #ifndef ITT_ARCH_IA32 # define ITT_ARCH_IA32 1 #endif /* ITT_ARCH_IA32 */ #ifndef ITT_ARCH_IA32E # define ITT_ARCH_IA32E 2 #endif /* ITT_ARCH_IA32E */ #ifndef ITT_ARCH_ARM # define ITT_ARCH_ARM 4 #endif /* ITT_ARCH_ARM */ #ifndef ITT_ARCH # if defined _M_IX86 || defined __i386__ # define ITT_ARCH ITT_ARCH_IA32 # elif defined _M_X64 || defined _M_AMD64 || defined __x86_64__ # define ITT_ARCH ITT_ARCH_IA32E # elif defined _M_IA64 || defined __ia64__ # define ITT_ARCH ITT_ARCH_IA64 # elif defined _M_ARM || __arm__ # define ITT_ARCH ITT_ARCH_ARM # endif #endif #ifdef __cplusplus # define ITT_EXTERN_C extern "C" #else # define ITT_EXTERN_C /* nothing */ #endif /* __cplusplus */ #define ITT_TO_STR_AUX(x) #x #define ITT_TO_STR(x) ITT_TO_STR_AUX(x) #define __ITT_BUILD_ASSERT(expr, suffix) do { \ static char __itt_build_check_##suffix[(expr) ? 1 : -1]; \ __itt_build_check_##suffix[0] = 0; \ } while(0) #define _ITT_BUILD_ASSERT(expr, suffix) __ITT_BUILD_ASSERT((expr), suffix) #define ITT_BUILD_ASSERT(expr) _ITT_BUILD_ASSERT((expr), __LINE__) #define ITT_MAGIC { 0xED, 0xAB, 0xAB, 0xEC, 0x0D, 0xEE, 0xDA, 0x30 } /* Replace with snapshot date YYYYMMDD for promotion build. */ #define API_VERSION_BUILD 20111111 #ifndef API_VERSION_NUM #define API_VERSION_NUM 0.0.0 #endif /* API_VERSION_NUM */ #define API_VERSION "ITT-API-Version " ITT_TO_STR(API_VERSION_NUM) \ " (" ITT_TO_STR(API_VERSION_BUILD) ")" /* OS communication functions */ #if ITT_PLATFORM==ITT_PLATFORM_WIN #include typedef HMODULE lib_t; typedef DWORD TIDT; typedef CRITICAL_SECTION mutex_t; #define MUTEX_INITIALIZER { 0 } #define strong_alias(name, aliasname) /* empty for Windows */ #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ #include #if defined(UNICODE) || defined(_UNICODE) #include #endif /* UNICODE */ #ifndef _GNU_SOURCE #define _GNU_SOURCE 1 /* need for PTHREAD_MUTEX_RECURSIVE */ #endif /* _GNU_SOURCE */ #ifndef __USE_UNIX98 #define __USE_UNIX98 1 /* need for PTHREAD_MUTEX_RECURSIVE, on SLES11.1 with gcc 4.3.4 wherein pthread.h missing dependency on __USE_XOPEN2K8 */ #endif /*__USE_UNIX98*/ #include typedef void* lib_t; typedef pthread_t TIDT; typedef pthread_mutex_t mutex_t; #define MUTEX_INITIALIZER PTHREAD_MUTEX_INITIALIZER #define _strong_alias(name, aliasname) \ extern __typeof (name) aliasname __attribute__ ((alias (#name))); #define strong_alias(name, aliasname) _strong_alias(name, aliasname) #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ #if ITT_PLATFORM==ITT_PLATFORM_WIN #define __itt_get_proc(lib, name) GetProcAddress(lib, name) #define __itt_mutex_init(mutex) InitializeCriticalSection(mutex) #define __itt_mutex_lock(mutex) EnterCriticalSection(mutex) #define __itt_mutex_unlock(mutex) LeaveCriticalSection(mutex) #define __itt_load_lib(name) LoadLibraryA(name) #define __itt_unload_lib(handle) FreeLibrary(handle) #define __itt_system_error() (int)GetLastError() #define __itt_fstrcmp(s1, s2) lstrcmpA(s1, s2) #define __itt_fstrlen(s) lstrlenA(s) #define __itt_fstrcpyn(s1, s2, l) lstrcpynA(s1, s2, l) #define __itt_fstrdup(s) _strdup(s) #define __itt_thread_id() GetCurrentThreadId() #define __itt_thread_yield() SwitchToThread() #ifndef ITT_SIMPLE_INIT ITT_INLINE long __itt_interlocked_increment(volatile long* ptr) ITT_INLINE_ATTRIBUTE; ITT_INLINE long __itt_interlocked_increment(volatile long* ptr) { return InterlockedIncrement(ptr); } #endif /* ITT_SIMPLE_INIT */ #else /* ITT_PLATFORM!=ITT_PLATFORM_WIN */ #define __itt_get_proc(lib, name) dlsym(lib, name) #define __itt_mutex_init(mutex) {\ pthread_mutexattr_t mutex_attr; \ int error_code = pthread_mutexattr_init(&mutex_attr); \ if (error_code) \ __itt_report_error(__itt_error_system, "pthread_mutexattr_init", \ error_code); \ error_code = pthread_mutexattr_settype(&mutex_attr, \ PTHREAD_MUTEX_RECURSIVE); \ if (error_code) \ __itt_report_error(__itt_error_system, "pthread_mutexattr_settype", \ error_code); \ error_code = pthread_mutex_init(mutex, &mutex_attr); \ if (error_code) \ __itt_report_error(__itt_error_system, "pthread_mutex_init", \ error_code); \ error_code = pthread_mutexattr_destroy(&mutex_attr); \ if (error_code) \ __itt_report_error(__itt_error_system, "pthread_mutexattr_destroy", \ error_code); \ } #define __itt_mutex_lock(mutex) pthread_mutex_lock(mutex) #define __itt_mutex_unlock(mutex) pthread_mutex_unlock(mutex) #define __itt_load_lib(name) dlopen(name, RTLD_LAZY) #define __itt_unload_lib(handle) dlclose(handle) #define __itt_system_error() errno #define __itt_fstrcmp(s1, s2) strcmp(s1, s2) #define __itt_fstrlen(s) strlen(s) #define __itt_fstrcpyn(s1, s2, l) strncpy(s1, s2, l) #define __itt_fstrdup(s) strdup(s) #define __itt_thread_id() pthread_self() #define __itt_thread_yield() sched_yield() #if ITT_ARCH==ITT_ARCH_IA64 #ifdef __INTEL_COMPILER #define __TBB_machine_fetchadd4(addr, val) __fetchadd4_acq((void *)addr, val) #else /* __INTEL_COMPILER */ /* TODO: Add Support for not Intel compilers for IA-64 architecture */ #endif /* __INTEL_COMPILER */ #elif ITT_ARCH==ITT_ARCH_IA32 || ITT_ARCH==ITT_ARCH_IA32E /* ITT_ARCH!=ITT_ARCH_IA64 */ ITT_INLINE long __TBB_machine_fetchadd4(volatile void* ptr, long addend) ITT_INLINE_ATTRIBUTE; ITT_INLINE long __TBB_machine_fetchadd4(volatile void* ptr, long addend) { long result; __asm__ __volatile__("lock\nxadd %0,%1" : "=r"(result),"=m"(*(int*)ptr) : "0"(addend), "m"(*(int*)ptr) : "memory"); return result; } #elif ITT_ARCH==ITT_ARCH_ARM #define __TBB_machine_fetchadd4(addr, val) __sync_fetch_and_add(addr, val) #endif /* ITT_ARCH==ITT_ARCH_IA64 */ #ifndef ITT_SIMPLE_INIT ITT_INLINE long __itt_interlocked_increment(volatile long* ptr) ITT_INLINE_ATTRIBUTE; ITT_INLINE long __itt_interlocked_increment(volatile long* ptr) { return __TBB_machine_fetchadd4(ptr, 1) + 1L; } #endif /* ITT_SIMPLE_INIT */ #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ typedef enum { __itt_collection_normal = 0, __itt_collection_paused = 1 } __itt_collection_state; typedef enum { __itt_thread_normal = 0, __itt_thread_ignored = 1 } __itt_thread_state; #pragma pack(push, 8) typedef struct ___itt_thread_info { const char* nameA; /*!< Copy of original name in ASCII. */ #if defined(UNICODE) || defined(_UNICODE) const wchar_t* nameW; /*!< Copy of original name in UNICODE. */ #else /* UNICODE || _UNICODE */ void* nameW; #endif /* UNICODE || _UNICODE */ TIDT tid; __itt_thread_state state; /*!< Thread state (paused or normal) */ int extra1; /*!< Reserved to the runtime */ void* extra2; /*!< Reserved to the runtime */ struct ___itt_thread_info* next; } __itt_thread_info; #include "ittnotify_types.h" /* For __itt_group_id definition */ typedef struct ___itt_api_info_20101001 { const char* name; void** func_ptr; void* init_func; __itt_group_id group; } __itt_api_info_20101001; typedef struct ___itt_api_info { const char* name; void** func_ptr; void* init_func; void* null_func; __itt_group_id group; } __itt_api_info; struct ___itt_domain; struct ___itt_string_handle; typedef struct ___itt_global { unsigned char magic[8]; unsigned long version_major; unsigned long version_minor; unsigned long version_build; volatile long api_initialized; volatile long mutex_initialized; volatile long atomic_counter; mutex_t mutex; lib_t lib; void* error_handler; const char** dll_path_ptr; __itt_api_info* api_list_ptr; struct ___itt_global* next; /* Joinable structures below */ __itt_thread_info* thread_list; struct ___itt_domain* domain_list; struct ___itt_string_handle* string_list; __itt_collection_state state; } __itt_global; #pragma pack(pop) #define NEW_THREAD_INFO_W(gptr,h,h_tail,t,s,n) { \ h = (__itt_thread_info*)malloc(sizeof(__itt_thread_info)); \ if (h != NULL) { \ h->tid = t; \ h->nameA = NULL; \ h->nameW = n ? _wcsdup(n) : NULL; \ h->state = s; \ h->extra1 = 0; /* reserved */ \ h->extra2 = NULL; /* reserved */ \ h->next = NULL; \ if (h_tail == NULL) \ (gptr)->thread_list = h; \ else \ h_tail->next = h; \ } \ } #define NEW_THREAD_INFO_A(gptr,h,h_tail,t,s,n) { \ h = (__itt_thread_info*)malloc(sizeof(__itt_thread_info)); \ if (h != NULL) { \ h->tid = t; \ h->nameA = n ? __itt_fstrdup(n) : NULL; \ h->nameW = NULL; \ h->state = s; \ h->extra1 = 0; /* reserved */ \ h->extra2 = NULL; /* reserved */ \ h->next = NULL; \ if (h_tail == NULL) \ (gptr)->thread_list = h; \ else \ h_tail->next = h; \ } \ } #define NEW_DOMAIN_W(gptr,h,h_tail,name) { \ h = (__itt_domain*)malloc(sizeof(__itt_domain)); \ if (h != NULL) { \ h->flags = 0; /* domain is disabled by default */ \ h->nameA = NULL; \ h->nameW = name ? _wcsdup(name) : NULL; \ h->extra1 = 0; /* reserved */ \ h->extra2 = NULL; /* reserved */ \ h->next = NULL; \ if (h_tail == NULL) \ (gptr)->domain_list = h; \ else \ h_tail->next = h; \ } \ } #define NEW_DOMAIN_A(gptr,h,h_tail,name) { \ h = (__itt_domain*)malloc(sizeof(__itt_domain)); \ if (h != NULL) { \ h->flags = 0; /* domain is disabled by default */ \ h->nameA = name ? __itt_fstrdup(name) : NULL; \ h->nameW = NULL; \ h->extra1 = 0; /* reserved */ \ h->extra2 = NULL; /* reserved */ \ h->next = NULL; \ if (h_tail == NULL) \ (gptr)->domain_list = h; \ else \ h_tail->next = h; \ } \ } #define NEW_STRING_HANDLE_W(gptr,h,h_tail,name) { \ h = (__itt_string_handle*)malloc(sizeof(__itt_string_handle)); \ if (h != NULL) { \ h->strA = NULL; \ h->strW = name ? _wcsdup(name) : NULL; \ h->extra1 = 0; /* reserved */ \ h->extra2 = NULL; /* reserved */ \ h->next = NULL; \ if (h_tail == NULL) \ (gptr)->string_list = h; \ else \ h_tail->next = h; \ } \ } #define NEW_STRING_HANDLE_A(gptr,h,h_tail,name) { \ h = (__itt_string_handle*)malloc(sizeof(__itt_string_handle)); \ if (h != NULL) { \ h->strA = name ? __itt_fstrdup(name) : NULL; \ h->strW = NULL; \ h->extra1 = 0; /* reserved */ \ h->extra2 = NULL; /* reserved */ \ h->next = NULL; \ if (h_tail == NULL) \ (gptr)->string_list = h; \ else \ h_tail->next = h; \ } \ } #endif /* _ITTNOTIFY_CONFIG_H_ */ ================================================ FILE: benchmarks/tbb/tools_api/ittnotify_static.c ================================================ /* Copyright 2005-2014 Intel Corporation. All Rights Reserved. This file is part of Threading Building Blocks. Threading Building Blocks is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. Threading Building Blocks is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Threading Building Blocks; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA As a special exception, you may use this file as part of a free software library without restriction. Specifically, if other files instantiate templates or use macros or inline functions from this file, or you compile this file and link it with other files to produce an executable, this file does not by itself cause the resulting executable to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the executable file might be covered by the GNU General Public License. */ #include "ittnotify_config.h" #if ITT_PLATFORM==ITT_PLATFORM_WIN #define PATH_MAX 512 #else /* ITT_PLATFORM!=ITT_PLATFORM_WIN */ #include #include #include #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ #include #include #include #include #define INTEL_NO_MACRO_BODY #define INTEL_ITTNOTIFY_API_PRIVATE #include "ittnotify.h" #include "legacy/ittnotify.h" #include "disable_warnings.h" static const char api_version[] = API_VERSION "\0\n@(#) $Revision: 336044 $\n"; #define _N_(n) ITT_JOIN(INTEL_ITTNOTIFY_PREFIX,n) #if ITT_OS==ITT_OS_WIN static const char* ittnotify_lib_name = "libittnotify.dll"; #elif ITT_OS==ITT_OS_LINUX static const char* ittnotify_lib_name = "libittnotify.so"; #elif ITT_OS==ITT_OS_MAC static const char* ittnotify_lib_name = "libittnotify.dylib"; #else #error Unsupported or unknown OS. #endif #ifdef __ANDROID__ #include #include #include #include #include #include #include #ifdef ITT_ANDROID_LOG #define ITT_ANDROID_LOG_TAG "INTEL_VTUNE_USERAPI" #define ITT_ANDROID_LOGI(...) ((void)__android_log_print(ANDROID_LOG_INFO, ITT_ANDROID_LOG_TAG, __VA_ARGS__)) #define ITT_ANDROID_LOGW(...) ((void)__android_log_print(ANDROID_LOG_WARN, ITT_ANDROID_LOG_TAG, __VA_ARGS__)) #define ITT_ANDROID_LOGE(...) ((void)__android_log_print(ANDROID_LOG_ERROR,ITT_ANDROID_LOG_TAG, __VA_ARGS__)) #define ITT_ANDROID_LOGD(...) ((void)__android_log_print(ANDROID_LOG_DEBUG,ITT_ANDROID_LOG_TAG, __VA_ARGS__)) #else #define ITT_ANDROID_LOGI(...) #define ITT_ANDROID_LOGW(...) #define ITT_ANDROID_LOGE(...) #define ITT_ANDROID_LOGD(...) #endif /* default location of userapi collector on Android */ #define ANDROID_ITTNOTIFY_DEFAULT_PATH "/data/data/com.intel.vtune/intel/libittnotify.so" #endif #ifndef LIB_VAR_NAME #if ITT_ARCH==ITT_ARCH_IA32 || ITT_ARCH==ITT_ARCH_ARM #define LIB_VAR_NAME INTEL_LIBITTNOTIFY32 #else #define LIB_VAR_NAME INTEL_LIBITTNOTIFY64 #endif #endif /* LIB_VAR_NAME */ #define ITT_MUTEX_INIT_AND_LOCK(p) { \ if (!p.mutex_initialized) \ { \ if (__itt_interlocked_increment(&p.atomic_counter) == 1) \ { \ __itt_mutex_init(&p.mutex); \ p.mutex_initialized = 1; \ } \ else \ while (!p.mutex_initialized) \ __itt_thread_yield(); \ } \ __itt_mutex_lock(&p.mutex); \ } const int _N_(err) = 0; typedef int (__itt_init_ittlib_t)(const char*, __itt_group_id); /* this define used to control initialization function name. */ #ifndef __itt_init_ittlib_name ITT_EXTERN_C int _N_(init_ittlib)(const char*, __itt_group_id); static __itt_init_ittlib_t* __itt_init_ittlib_ptr = _N_(init_ittlib); #define __itt_init_ittlib_name __itt_init_ittlib_ptr #endif /* __itt_init_ittlib_name */ typedef void (__itt_fini_ittlib_t)(void); /* this define used to control finalization function name. */ #ifndef __itt_fini_ittlib_name ITT_EXTERN_C void _N_(fini_ittlib)(void); static __itt_fini_ittlib_t* __itt_fini_ittlib_ptr = _N_(fini_ittlib); #define __itt_fini_ittlib_name __itt_fini_ittlib_ptr #endif /* __itt_fini_ittlib_name */ /* building pointers to imported funcs */ #undef ITT_STUBV #undef ITT_STUB #define ITT_STUB(api,type,name,args,params,ptr,group,format) \ static type api ITT_VERSIONIZE(ITT_JOIN(_N_(name),_init)) args;\ typedef type api ITT_JOIN(_N_(name),_t) args; \ ITT_EXTERN_C { ITT_JOIN(_N_(name),_t)* ITTNOTIFY_NAME(name) = ITT_VERSIONIZE(ITT_JOIN(_N_(name),_init)); } \ static type api ITT_VERSIONIZE(ITT_JOIN(_N_(name),_init)) args \ { \ __itt_init_ittlib_name(NULL, __itt_group_all); \ if (ITTNOTIFY_NAME(name) && ITTNOTIFY_NAME(name) != ITT_VERSIONIZE(ITT_JOIN(_N_(name),_init))) \ return ITTNOTIFY_NAME(name) params; \ else \ return (type)0; \ } #define ITT_STUBV(api,type,name,args,params,ptr,group,format) \ static type api ITT_VERSIONIZE(ITT_JOIN(_N_(name),_init)) args;\ typedef type api ITT_JOIN(_N_(name),_t) args; \ ITT_EXTERN_C { ITT_JOIN(_N_(name),_t)* ITTNOTIFY_NAME(name) = ITT_VERSIONIZE(ITT_JOIN(_N_(name),_init)); } \ static type api ITT_VERSIONIZE(ITT_JOIN(_N_(name),_init)) args \ { \ __itt_init_ittlib_name(NULL, __itt_group_all); \ if (ITTNOTIFY_NAME(name) && ITTNOTIFY_NAME(name) != ITT_VERSIONIZE(ITT_JOIN(_N_(name),_init))) \ ITTNOTIFY_NAME(name) params; \ else \ return; \ } #undef __ITT_INTERNAL_INIT #include "ittnotify_static.h" #undef ITT_STUB #undef ITT_STUBV #define ITT_STUB(api,type,name,args,params,ptr,group,format) \ static type api ITT_VERSIONIZE(ITT_JOIN(_N_(name),_init)) args;\ typedef type api ITT_JOIN(_N_(name),_t) args; \ ITT_EXTERN_C { ITT_JOIN(_N_(name),_t)* ITTNOTIFY_NAME(name) = ITT_VERSIONIZE(ITT_JOIN(_N_(name),_init)); } #define ITT_STUBV(api,type,name,args,params,ptr,group,format) \ static type api ITT_VERSIONIZE(ITT_JOIN(_N_(name),_init)) args;\ typedef type api ITT_JOIN(_N_(name),_t) args; \ ITT_EXTERN_C { ITT_JOIN(_N_(name),_t)* ITTNOTIFY_NAME(name) = ITT_VERSIONIZE(ITT_JOIN(_N_(name),_init)); } #define __ITT_INTERNAL_INIT #include "ittnotify_static.h" #undef __ITT_INTERNAL_INIT ITT_GROUP_LIST(group_list); #pragma pack(push, 8) typedef struct ___itt_group_alias { const char* env_var; __itt_group_id groups; } __itt_group_alias; static __itt_group_alias group_alias[] = { { "KMP_FOR_TPROFILE", (__itt_group_id)(__itt_group_control | __itt_group_thread | __itt_group_sync | __itt_group_mark) }, { "KMP_FOR_TCHECK", (__itt_group_id)(__itt_group_control | __itt_group_thread | __itt_group_sync | __itt_group_fsync | __itt_group_mark | __itt_group_suppress) }, { NULL, (__itt_group_none) }, { api_version, (__itt_group_none) } /* !!! Just to avoid unused code elimination !!! */ }; #pragma pack(pop) #if ITT_PLATFORM==ITT_PLATFORM_WIN #pragma warning(push) #pragma warning(disable: 4054) /* warning C4054: 'type cast' : from function pointer 'XXX' to data pointer 'void *' */ #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ static __itt_api_info api_list[] = { /* Define functions with static implementation */ #undef ITT_STUB #undef ITT_STUBV #define ITT_STUB(api,type,name,args,params,nameindll,group,format) { ITT_TO_STR(ITT_JOIN(__itt_,nameindll)), (void**)(void*)&ITTNOTIFY_NAME(name), (void*)(size_t)&ITT_VERSIONIZE(ITT_JOIN(_N_(name),_init)), (void*)(size_t)&ITT_VERSIONIZE(ITT_JOIN(_N_(name),_init)), (__itt_group_id)(group)}, #define ITT_STUBV ITT_STUB #define __ITT_INTERNAL_INIT #include "ittnotify_static.h" #undef __ITT_INTERNAL_INIT /* Define functions without static implementation */ #undef ITT_STUB #undef ITT_STUBV #define ITT_STUB(api,type,name,args,params,nameindll,group,format) {ITT_TO_STR(ITT_JOIN(__itt_,nameindll)), (void**)(void*)&ITTNOTIFY_NAME(name), (void*)(size_t)&ITT_VERSIONIZE(ITT_JOIN(_N_(name),_init)), NULL, (__itt_group_id)(group)}, #define ITT_STUBV ITT_STUB #include "ittnotify_static.h" {NULL, NULL, NULL, NULL, __itt_group_none} }; #if ITT_PLATFORM==ITT_PLATFORM_WIN #pragma warning(pop) #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ /* private, init thread info item. used for internal purposes */ static __itt_thread_info init_thread_info = { (const char*)NULL, /* nameA */ #if defined(UNICODE) || defined(_UNICODE) (const wchar_t*)NULL, /* nameW */ #else (void*)NULL, /* nameW */ #endif 0, /* tid */ __itt_thread_normal, /* state */ 0, /* extra1 */ (void*)NULL, /* extra2 */ (__itt_thread_info*)NULL /* next */ }; /* private, NULL domain item. used for internal purposes */ static __itt_domain null_domain = { 0, /* flags: disabled by default */ (const char*)NULL, /* nameA */ #if defined(UNICODE) || defined(_UNICODE) (const wchar_t*)NULL, /* nameW */ #else (void*)NULL, /* nameW */ #endif 0, /* extra1 */ (void*)NULL, /* extra2 */ (__itt_domain*)NULL /* next */ }; /* private, NULL string handle item. used for internal purposes */ static __itt_string_handle null_string_handle = { (const char*)NULL, /* strA */ #if defined(UNICODE) || defined(_UNICODE) (const wchar_t*)NULL, /* strW */ #else (void*)NULL, /* strW */ #endif 0, /* extra1 */ (void*)NULL, /* extra2 */ (__itt_string_handle*)NULL /* next */ }; static const char dll_path[PATH_MAX] = { 0 }; /* static part descriptor which handles. all notification api attributes. */ __itt_global _N_(_ittapi_global) = { ITT_MAGIC, /* identification info */ ITT_MAJOR, ITT_MINOR, API_VERSION_BUILD, /* version info */ 0, /* api_initialized */ 0, /* mutex_initialized */ 0, /* atomic_counter */ MUTEX_INITIALIZER, /* mutex */ NULL, /* dynamic library handle */ NULL, /* error_handler */ (const char**)&dll_path, /* dll_path_ptr */ (__itt_api_info*)&api_list, /* api_list_ptr */ NULL, /* next __itt_global */ (__itt_thread_info*)&init_thread_info, /* thread_list */ (__itt_domain*)&null_domain, /* domain_list */ (__itt_string_handle*)&null_string_handle, /* string_list */ __itt_collection_normal /* collection state */ }; typedef void (__itt_api_init_t)(__itt_global*, __itt_group_id); typedef void (__itt_api_fini_t)(__itt_global*); /* ========================================================================= */ #ifdef ITT_NOTIFY_EXT_REPORT ITT_EXTERN_C void _N_(error_handler)(__itt_error_code, va_list args); #endif /* ITT_NOTIFY_EXT_REPORT */ #if ITT_PLATFORM==ITT_PLATFORM_WIN #pragma warning(push) #pragma warning(disable: 4055) /* warning C4055: 'type cast' : from data pointer 'void *' to function pointer 'XXX' */ #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ static void __itt_report_error(__itt_error_code code, ...) { va_list args; va_start(args, code); if (_N_(_ittapi_global).error_handler != NULL) { __itt_error_handler_t* handler = (__itt_error_handler_t*)(size_t)_N_(_ittapi_global).error_handler; handler(code, args); } #ifdef ITT_NOTIFY_EXT_REPORT _N_(error_handler)(code, args); #endif /* ITT_NOTIFY_EXT_REPORT */ va_end(args); } #if ITT_PLATFORM==ITT_PLATFORM_WIN #pragma warning(pop) #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ #if ITT_PLATFORM==ITT_PLATFORM_WIN static __itt_domain* ITTAPI ITT_VERSIONIZE(ITT_JOIN(_N_(domain_createW),_init))(const wchar_t* name) { __itt_domain *h_tail, *h; if (!_N_(_ittapi_global).api_initialized && _N_(_ittapi_global).thread_list->tid == 0) { __itt_init_ittlib_name(NULL, __itt_group_all); if (ITTNOTIFY_NAME(domain_createW) && ITTNOTIFY_NAME(domain_createW) != ITT_VERSIONIZE(ITT_JOIN(_N_(domain_createW),_init))) return ITTNOTIFY_NAME(domain_createW)(name); } if (name == NULL) return _N_(_ittapi_global).domain_list; ITT_MUTEX_INIT_AND_LOCK(_N_(_ittapi_global)); for (h_tail = NULL, h = _N_(_ittapi_global).domain_list; h != NULL; h_tail = h, h = h->next) if (h->nameW != NULL && !wcscmp(h->nameW, name)) break; if (h == NULL) { NEW_DOMAIN_W(&_N_(_ittapi_global),h,h_tail,name); } __itt_mutex_unlock(&_N_(_ittapi_global).mutex); return h; } static __itt_domain* ITTAPI ITT_VERSIONIZE(ITT_JOIN(_N_(domain_createA),_init))(const char* name) #else /* ITT_PLATFORM!=ITT_PLATFORM_WIN */ static __itt_domain* ITTAPI ITT_VERSIONIZE(ITT_JOIN(_N_(domain_create),_init))(const char* name) #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ { __itt_domain *h_tail, *h; if (!_N_(_ittapi_global).api_initialized && _N_(_ittapi_global).thread_list->tid == 0) { __itt_init_ittlib_name(NULL, __itt_group_all); #if ITT_PLATFORM==ITT_PLATFORM_WIN if (ITTNOTIFY_NAME(domain_createA) && ITTNOTIFY_NAME(domain_createA) != ITT_VERSIONIZE(ITT_JOIN(_N_(domain_createA),_init))) return ITTNOTIFY_NAME(domain_createA)(name); #else if (ITTNOTIFY_NAME(domain_create) && ITTNOTIFY_NAME(domain_create) != ITT_VERSIONIZE(ITT_JOIN(_N_(domain_create),_init))) return ITTNOTIFY_NAME(domain_create)(name); #endif } if (name == NULL) return _N_(_ittapi_global).domain_list; ITT_MUTEX_INIT_AND_LOCK(_N_(_ittapi_global)); for (h_tail = NULL, h = _N_(_ittapi_global).domain_list; h != NULL; h_tail = h, h = h->next) if (h->nameA != NULL && !__itt_fstrcmp(h->nameA, name)) break; if (h == NULL) { NEW_DOMAIN_A(&_N_(_ittapi_global),h,h_tail,name); } __itt_mutex_unlock(&_N_(_ittapi_global).mutex); return h; } #if ITT_PLATFORM==ITT_PLATFORM_WIN static __itt_string_handle* ITTAPI ITT_VERSIONIZE(ITT_JOIN(_N_(string_handle_createW),_init))(const wchar_t* name) { __itt_string_handle *h_tail, *h; if (!_N_(_ittapi_global).api_initialized && _N_(_ittapi_global).thread_list->tid == 0) { __itt_init_ittlib_name(NULL, __itt_group_all); if (ITTNOTIFY_NAME(string_handle_createW) && ITTNOTIFY_NAME(string_handle_createW) != ITT_VERSIONIZE(ITT_JOIN(_N_(string_handle_createW),_init))) return ITTNOTIFY_NAME(string_handle_createW)(name); } if (name == NULL) return _N_(_ittapi_global).string_list; ITT_MUTEX_INIT_AND_LOCK(_N_(_ittapi_global)); for (h_tail = NULL, h = _N_(_ittapi_global).string_list; h != NULL; h_tail = h, h = h->next) if (h->strW != NULL && !wcscmp(h->strW, name)) break; if (h == NULL) { NEW_STRING_HANDLE_W(&_N_(_ittapi_global),h,h_tail,name); } __itt_mutex_unlock(&_N_(_ittapi_global).mutex); return h; } static __itt_string_handle* ITTAPI ITT_VERSIONIZE(ITT_JOIN(_N_(string_handle_createA),_init))(const char* name) #else /* ITT_PLATFORM!=ITT_PLATFORM_WIN */ static __itt_string_handle* ITTAPI ITT_VERSIONIZE(ITT_JOIN(_N_(string_handle_create),_init))(const char* name) #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ { __itt_string_handle *h_tail, *h; if (!_N_(_ittapi_global).api_initialized && _N_(_ittapi_global).thread_list->tid == 0) { __itt_init_ittlib_name(NULL, __itt_group_all); #if ITT_PLATFORM==ITT_PLATFORM_WIN if (ITTNOTIFY_NAME(string_handle_createA) && ITTNOTIFY_NAME(string_handle_createA) != ITT_VERSIONIZE(ITT_JOIN(_N_(string_handle_createA),_init))) return ITTNOTIFY_NAME(string_handle_createA)(name); #else if (ITTNOTIFY_NAME(string_handle_create) && ITTNOTIFY_NAME(string_handle_create) != ITT_VERSIONIZE(ITT_JOIN(_N_(string_handle_create),_init))) return ITTNOTIFY_NAME(string_handle_create)(name); #endif } if (name == NULL) return _N_(_ittapi_global).string_list; ITT_MUTEX_INIT_AND_LOCK(_N_(_ittapi_global)); for (h_tail = NULL, h = _N_(_ittapi_global).string_list; h != NULL; h_tail = h, h = h->next) if (h->strA != NULL && !__itt_fstrcmp(h->strA, name)) break; if (h == NULL) { NEW_STRING_HANDLE_A(&_N_(_ittapi_global),h,h_tail,name); } __itt_mutex_unlock(&_N_(_ittapi_global).mutex); return h; } /* -------------------------------------------------------------------------- */ static void ITTAPI ITT_VERSIONIZE(ITT_JOIN(_N_(pause),_init))(void) { if (!_N_(_ittapi_global).api_initialized && _N_(_ittapi_global).thread_list->tid == 0) { __itt_init_ittlib_name(NULL, __itt_group_all); if (ITTNOTIFY_NAME(pause) && ITTNOTIFY_NAME(pause) != ITT_VERSIONIZE(ITT_JOIN(_N_(pause),_init))) { ITTNOTIFY_NAME(pause)(); return; } } _N_(_ittapi_global).state = __itt_collection_paused; } static void ITTAPI ITT_VERSIONIZE(ITT_JOIN(_N_(resume),_init))(void) { if (!_N_(_ittapi_global).api_initialized && _N_(_ittapi_global).thread_list->tid == 0) { __itt_init_ittlib_name(NULL, __itt_group_all); if (ITTNOTIFY_NAME(resume) && ITTNOTIFY_NAME(resume) != ITT_VERSIONIZE(ITT_JOIN(_N_(resume),_init))) { ITTNOTIFY_NAME(resume)(); return; } } _N_(_ittapi_global).state = __itt_collection_normal; } #if ITT_PLATFORM==ITT_PLATFORM_WIN static void ITTAPI ITT_VERSIONIZE(ITT_JOIN(_N_(thread_set_nameW),_init))(const wchar_t* name) { TIDT tid = __itt_thread_id(); __itt_thread_info *h_tail, *h; if (!_N_(_ittapi_global).api_initialized && _N_(_ittapi_global).thread_list->tid == 0) { __itt_init_ittlib_name(NULL, __itt_group_all); if (ITTNOTIFY_NAME(thread_set_nameW) && ITTNOTIFY_NAME(thread_set_nameW) != ITT_VERSIONIZE(ITT_JOIN(_N_(thread_set_nameW),_init))) { ITTNOTIFY_NAME(thread_set_nameW)(name); return; } } __itt_mutex_lock(&_N_(_ittapi_global).mutex); for (h_tail = NULL, h = _N_(_ittapi_global).thread_list; h != NULL; h_tail = h, h = h->next) if (h->tid == tid) break; if (h == NULL) { NEW_THREAD_INFO_W(&_N_(_ittapi_global), h, h_tail, tid, __itt_thread_normal, name); } else { h->nameW = name ? _wcsdup(name) : NULL; } __itt_mutex_unlock(&_N_(_ittapi_global).mutex); } static int ITTAPI ITT_VERSIONIZE(ITT_JOIN(_N_(thr_name_setW),_init))(const wchar_t* name, int namelen) { namelen = namelen; ITT_VERSIONIZE(ITT_JOIN(_N_(thread_set_nameW),_init))(name); return 0; } static void ITTAPI ITT_VERSIONIZE(ITT_JOIN(_N_(thread_set_nameA),_init))(const char* name) #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ static void ITTAPI ITT_VERSIONIZE(ITT_JOIN(_N_(thread_set_name),_init))(const char* name) #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ { TIDT tid = __itt_thread_id(); __itt_thread_info *h_tail, *h; if (!_N_(_ittapi_global).api_initialized && _N_(_ittapi_global).thread_list->tid == 0) { __itt_init_ittlib_name(NULL, __itt_group_all); #if ITT_PLATFORM==ITT_PLATFORM_WIN if (ITTNOTIFY_NAME(thread_set_nameA) && ITTNOTIFY_NAME(thread_set_nameA) != ITT_VERSIONIZE(ITT_JOIN(_N_(thread_set_nameA),_init))) { ITTNOTIFY_NAME(thread_set_nameA)(name); return; } #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ if (ITTNOTIFY_NAME(thread_set_name) && ITTNOTIFY_NAME(thread_set_name) != ITT_VERSIONIZE(ITT_JOIN(_N_(thread_set_name),_init))) { ITTNOTIFY_NAME(thread_set_name)(name); return; } #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ } __itt_mutex_lock(&_N_(_ittapi_global).mutex); for (h_tail = NULL, h = _N_(_ittapi_global).thread_list; h != NULL; h_tail = h, h = h->next) if (h->tid == tid) break; if (h == NULL) { NEW_THREAD_INFO_A(&_N_(_ittapi_global), h, h_tail, tid, __itt_thread_normal, name); } else { h->nameA = name ? __itt_fstrdup(name) : NULL; } __itt_mutex_unlock(&_N_(_ittapi_global).mutex); } #if ITT_PLATFORM==ITT_PLATFORM_WIN static int ITTAPI ITT_VERSIONIZE(ITT_JOIN(_N_(thr_name_setA),_init))(const char* name, int namelen) { namelen = namelen; ITT_VERSIONIZE(ITT_JOIN(_N_(thread_set_nameA),_init))(name); return 0; } #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ static int ITTAPI ITT_VERSIONIZE(ITT_JOIN(_N_(thr_name_set),_init))(const char* name, int namelen) { ITT_VERSIONIZE(ITT_JOIN(_N_(thread_set_name),_init))(name); return 0; } #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ static void ITTAPI ITT_VERSIONIZE(ITT_JOIN(_N_(thread_ignore),_init))(void) { TIDT tid = __itt_thread_id(); __itt_thread_info *h_tail, *h; if (!_N_(_ittapi_global).api_initialized && _N_(_ittapi_global).thread_list->tid == 0) { __itt_init_ittlib_name(NULL, __itt_group_all); if (ITTNOTIFY_NAME(thread_ignore) && ITTNOTIFY_NAME(thread_ignore) != ITT_VERSIONIZE(ITT_JOIN(_N_(thread_ignore),_init))) { ITTNOTIFY_NAME(thread_ignore)(); return; } } __itt_mutex_lock(&_N_(_ittapi_global).mutex); for (h_tail = NULL, h = _N_(_ittapi_global).thread_list; h != NULL; h_tail = h, h = h->next) if (h->tid == tid) break; if (h == NULL) { static const char* name = "unknown"; NEW_THREAD_INFO_A(&_N_(_ittapi_global), h, h_tail, tid, __itt_thread_ignored, name); } else { h->state = __itt_thread_ignored; } __itt_mutex_unlock(&_N_(_ittapi_global).mutex); } static void ITTAPI ITT_VERSIONIZE(ITT_JOIN(_N_(thr_ignore),_init))(void) { ITT_VERSIONIZE(ITT_JOIN(_N_(thread_ignore),_init))(); } static void ITTAPI ITT_VERSIONIZE(ITT_JOIN(_N_(enable_attach),_init))(void) { #ifdef __ANDROID__ /* * if LIB_VAR_NAME env variable were set before then stay previous value * else set default path */ setenv(ITT_TO_STR(LIB_VAR_NAME), ANDROID_ITTNOTIFY_DEFAULT_PATH, 0); #endif } /* -------------------------------------------------------------------------- */ static const char* __itt_fsplit(const char* s, const char* sep, const char** out, int* len) { int i; int j; if (!s || !sep || !out || !len) return NULL; for (i = 0; s[i]; i++) { int b = 0; for (j = 0; sep[j]; j++) if (s[i] == sep[j]) { b = 1; break; } if (!b) break; } if (!s[i]) return NULL; *len = 0; *out = &s[i]; for (; s[i]; i++, (*len)++) { int b = 0; for (j = 0; sep[j]; j++) if (s[i] == sep[j]) { b = 1; break; } if (b) break; } for (; s[i]; i++) { int b = 0; for (j = 0; sep[j]; j++) if (s[i] == sep[j]) { b = 1; break; } if (!b) break; } return &s[i]; } /* This function return value of env variable that placed into static buffer. * !!! The same static buffer is used for subsequent calls. !!! * This was done to aviod dynamic allocation for few calls. * Actually we need this function only four times. */ static const char* __itt_get_env_var(const char* name) { #define MAX_ENV_VALUE_SIZE 4086 static char env_buff[MAX_ENV_VALUE_SIZE]; static char* env_value = (char*)env_buff; if (name != NULL) { #if ITT_PLATFORM==ITT_PLATFORM_WIN size_t max_len = MAX_ENV_VALUE_SIZE - (size_t)(env_value - env_buff); DWORD rc = GetEnvironmentVariableA(name, env_value, (DWORD)max_len); if (rc >= max_len) __itt_report_error(__itt_error_env_too_long, name, (size_t)rc - 1, (size_t)(max_len - 1)); else if (rc > 0) { const char* ret = (const char*)env_value; env_value += rc + 1; return ret; } else { /* If environment variable is empty, GetEnvirornmentVariables() * returns zero (number of characters (not including terminating null), * and GetLastError() returns ERROR_SUCCESS. */ DWORD err = GetLastError(); if (err == ERROR_SUCCESS) return env_value; if (err != ERROR_ENVVAR_NOT_FOUND) __itt_report_error(__itt_error_cant_read_env, name, (int)err); } #else /* ITT_PLATFORM!=ITT_PLATFORM_WIN */ char* env = getenv(name); if (env != NULL) { size_t len = strlen(env); size_t max_len = MAX_ENV_VALUE_SIZE - (size_t)(env_value - env_buff); if (len < max_len) { const char* ret = (const char*)env_value; strncpy(env_value, env, len + 1); env_value += len + 1; return ret; } else __itt_report_error(__itt_error_env_too_long, name, (size_t)len, (size_t)(max_len - 1)); } #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ } return NULL; } static const char* __itt_get_lib_name(void) { const char* lib_name = __itt_get_env_var(ITT_TO_STR(LIB_VAR_NAME)); #ifdef __ANDROID__ if (lib_name == NULL) { const char* const system_wide_marker_filename = "/data/local/tmp/com.intel.itt.collector_lib"; int itt_marker_file_fd = open(system_wide_marker_filename, O_RDONLY); ssize_t res = 0; if (itt_marker_file_fd == -1) { const pid_t my_pid = getpid(); char cmdline_path[PATH_MAX] = {0}; char package_name[PATH_MAX] = {0}; char app_sandbox_file[PATH_MAX] = {0}; int cmdline_fd = 0; ITT_ANDROID_LOGI("Unable to open system-wide marker file."); snprintf(cmdline_path, PATH_MAX - 1, "/proc/%d/cmdline", my_pid); ITT_ANDROID_LOGI("CMD file: %s\n", cmdline_path); cmdline_fd = open(cmdline_path, O_RDONLY); if (cmdline_fd == -1) { ITT_ANDROID_LOGE("Unable to open %s file!", cmdline_path); return lib_name; } res = read(cmdline_fd, package_name, PATH_MAX - 1); if (res == -1) { ITT_ANDROID_LOGE("Unable to read %s file!", cmdline_path); res = close(cmdline_fd); if (res == -1) { ITT_ANDROID_LOGE("Unable to close %s file!", cmdline_path); } return lib_name; } res = close(cmdline_fd); if (res == -1) { ITT_ANDROID_LOGE("Unable to close %s file!", cmdline_path); return lib_name; } ITT_ANDROID_LOGI("Package name: %s\n", package_name); snprintf(app_sandbox_file, PATH_MAX - 1, "/data/data/%s/com.intel.itt.collector_lib", package_name); ITT_ANDROID_LOGI("Lib marker file name: %s\n", app_sandbox_file); itt_marker_file_fd = open(app_sandbox_file, O_RDONLY); if (itt_marker_file_fd == -1) { ITT_ANDROID_LOGE("Unable to open app marker file!"); return lib_name; } } { char itt_lib_name[PATH_MAX] = {0}; res = read(itt_marker_file_fd, itt_lib_name, PATH_MAX - 1); if (res == -1) { ITT_ANDROID_LOGE("Unable to read %s file!", itt_marker_file_fd); res = close(itt_marker_file_fd); if (res == -1) { ITT_ANDROID_LOGE("Unable to close %s file!", itt_marker_file_fd); } return lib_name; } ITT_ANDROID_LOGI("ITT Lib path: %s", itt_lib_name); res = close(itt_marker_file_fd); if (res == -1) { ITT_ANDROID_LOGE("Unable to close %s file!", itt_marker_file_fd); return lib_name; } ITT_ANDROID_LOGI("Set env"); res = setenv(ITT_TO_STR(LIB_VAR_NAME), itt_lib_name, 0); if (res == -1) { ITT_ANDROID_LOGE("Unable to set env var!"); return lib_name; } lib_name = __itt_get_env_var(ITT_TO_STR(LIB_VAR_NAME)); ITT_ANDROID_LOGI("ITT Lib path from env: %s", itt_lib_name); } } #endif return lib_name; } #ifndef min #define min(a,b) (a) < (b) ? (a) : (b) #endif /* min */ static __itt_group_id __itt_get_groups(void) { int i; __itt_group_id res = __itt_group_none; const char* var_name = "INTEL_ITTNOTIFY_GROUPS"; const char* group_str = __itt_get_env_var(var_name); if (group_str != NULL) { int len; char gr[255]; const char* chunk; while ((group_str = __itt_fsplit(group_str, ",; ", &chunk, &len)) != NULL) { __itt_fstrcpyn(gr, chunk, sizeof(gr) - 1); gr[min(len, (int)(sizeof(gr) - 1))] = 0; for (i = 0; group_list[i].name != NULL; i++) { if (!__itt_fstrcmp(gr, group_list[i].name)) { res = (__itt_group_id)(res | group_list[i].id); break; } } } /* TODO: !!! Workaround for bug with warning for unknown group !!! * Should be fixed in new initialization scheme. * Now the following groups should be set always. */ for (i = 0; group_list[i].id != __itt_group_none; i++) if (group_list[i].id != __itt_group_all && group_list[i].id > __itt_group_splitter_min && group_list[i].id < __itt_group_splitter_max) res = (__itt_group_id)(res | group_list[i].id); return res; } else { for (i = 0; group_alias[i].env_var != NULL; i++) if (__itt_get_env_var(group_alias[i].env_var) != NULL) return group_alias[i].groups; } return res; } static int __itt_lib_version(lib_t lib) { if (lib == NULL) return 0; if (__itt_get_proc(lib, "__itt_api_init")) return 2; if (__itt_get_proc(lib, "__itt_api_version")) return 1; return 0; } /* It's not used right now! Comment it out to avoid warnings. static void __itt_reinit_all_pointers(void) { register int i; // Fill all pointers with initial stubs for (i = 0; _N_(_ittapi_global).api_list_ptr[i].name != NULL; i++) *_N_(_ittapi_global).api_list_ptr[i].func_ptr = _N_(_ittapi_global).api_list_ptr[i].init_func; } */ static void __itt_nullify_all_pointers(void) { int i; /* Nulify all pointers except domain_create and string_handle_create */ for (i = 0; _N_(_ittapi_global).api_list_ptr[i].name != NULL; i++) *_N_(_ittapi_global).api_list_ptr[i].func_ptr = _N_(_ittapi_global).api_list_ptr[i].null_func; } #if ITT_PLATFORM==ITT_PLATFORM_WIN #pragma warning(push) #pragma warning(disable: 4054) /* warning C4054: 'type cast' : from function pointer 'XXX' to data pointer 'void *' */ #pragma warning(disable: 4055) /* warning C4055: 'type cast' : from data pointer 'void *' to function pointer 'XXX' */ #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ ITT_EXTERN_C void _N_(fini_ittlib)(void) { __itt_api_fini_t* __itt_api_fini_ptr; static volatile TIDT current_thread = 0; if (_N_(_ittapi_global).api_initialized) { __itt_mutex_lock(&_N_(_ittapi_global).mutex); if (_N_(_ittapi_global).api_initialized) { if (current_thread == 0) { current_thread = __itt_thread_id(); __itt_api_fini_ptr = (__itt_api_fini_t*)(size_t)__itt_get_proc(_N_(_ittapi_global).lib, "__itt_api_fini"); if (__itt_api_fini_ptr) __itt_api_fini_ptr(&_N_(_ittapi_global)); __itt_nullify_all_pointers(); /* TODO: !!! not safe !!! don't support unload so far. * if (_N_(_ittapi_global).lib != NULL) * __itt_unload_lib(_N_(_ittapi_global).lib); * _N_(_ittapi_global).lib = NULL; */ _N_(_ittapi_global).api_initialized = 0; current_thread = 0; } } __itt_mutex_unlock(&_N_(_ittapi_global).mutex); } } ITT_EXTERN_C int _N_(init_ittlib)(const char* lib_name, __itt_group_id init_groups) { int i; __itt_group_id groups; #ifdef ITT_COMPLETE_GROUP __itt_group_id zero_group = __itt_group_none; #endif /* ITT_COMPLETE_GROUP */ static volatile TIDT current_thread = 0; if (!_N_(_ittapi_global).api_initialized) { #ifndef ITT_SIMPLE_INIT ITT_MUTEX_INIT_AND_LOCK(_N_(_ittapi_global)); #endif /* ITT_SIMPLE_INIT */ if (!_N_(_ittapi_global).api_initialized) { if (current_thread == 0) { current_thread = __itt_thread_id(); _N_(_ittapi_global).thread_list->tid = current_thread; if (lib_name == NULL) lib_name = __itt_get_lib_name(); groups = __itt_get_groups(); if (groups != __itt_group_none || lib_name != NULL) { _N_(_ittapi_global).lib = __itt_load_lib((lib_name == NULL) ? ittnotify_lib_name : lib_name); if (_N_(_ittapi_global).lib != NULL) { __itt_api_init_t* __itt_api_init_ptr; int lib_version = __itt_lib_version(_N_(_ittapi_global).lib); switch (lib_version) { case 0: groups = __itt_group_legacy; case 1: /* Fill all pointers from dynamic library */ for (i = 0; _N_(_ittapi_global).api_list_ptr[i].name != NULL; i++) { if (_N_(_ittapi_global).api_list_ptr[i].group & groups & init_groups) { *_N_(_ittapi_global).api_list_ptr[i].func_ptr = (void*)__itt_get_proc(_N_(_ittapi_global).lib, _N_(_ittapi_global).api_list_ptr[i].name); if (*_N_(_ittapi_global).api_list_ptr[i].func_ptr == NULL) { /* Restore pointers for function with static implementation */ *_N_(_ittapi_global).api_list_ptr[i].func_ptr = _N_(_ittapi_global).api_list_ptr[i].null_func; __itt_report_error(__itt_error_no_symbol, lib_name, _N_(_ittapi_global).api_list_ptr[i].name); #ifdef ITT_COMPLETE_GROUP zero_group = (__itt_group_id)(zero_group | _N_(_ittapi_global).api_list_ptr[i].group); #endif /* ITT_COMPLETE_GROUP */ } } else *_N_(_ittapi_global).api_list_ptr[i].func_ptr = _N_(_ittapi_global).api_list_ptr[i].null_func; } if (groups == __itt_group_legacy) { /* Compatibility with legacy tools */ ITTNOTIFY_NAME(thread_ignore) = ITTNOTIFY_NAME(thr_ignore); #if ITT_PLATFORM==ITT_PLATFORM_WIN ITTNOTIFY_NAME(sync_createA) = ITTNOTIFY_NAME(sync_set_nameA); ITTNOTIFY_NAME(sync_createW) = ITTNOTIFY_NAME(sync_set_nameW); #else /* ITT_PLATFORM!=ITT_PLATFORM_WIN */ ITTNOTIFY_NAME(sync_create) = ITTNOTIFY_NAME(sync_set_name); #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ ITTNOTIFY_NAME(sync_prepare) = ITTNOTIFY_NAME(notify_sync_prepare); ITTNOTIFY_NAME(sync_cancel) = ITTNOTIFY_NAME(notify_sync_cancel); ITTNOTIFY_NAME(sync_acquired) = ITTNOTIFY_NAME(notify_sync_acquired); ITTNOTIFY_NAME(sync_releasing) = ITTNOTIFY_NAME(notify_sync_releasing); } #ifdef ITT_COMPLETE_GROUP for (i = 0; _N_(_ittapi_global).api_list_ptr[i].name != NULL; i++) if (_N_(_ittapi_global).api_list_ptr[i].group & zero_group) *_N_(_ittapi_global).api_list_ptr[i].func_ptr = _N_(_ittapi_global).api_list_ptr[i].null_func; #endif /* ITT_COMPLETE_GROUP */ break; case 2: __itt_api_init_ptr = (__itt_api_init_t*)(size_t)__itt_get_proc(_N_(_ittapi_global).lib, "__itt_api_init"); if (__itt_api_init_ptr) __itt_api_init_ptr(&_N_(_ittapi_global), init_groups); break; } } else { __itt_nullify_all_pointers(); __itt_report_error(__itt_error_no_module, lib_name, #if ITT_PLATFORM==ITT_PLATFORM_WIN __itt_system_error() #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ dlerror() #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ ); } } else { __itt_nullify_all_pointers(); } _N_(_ittapi_global).api_initialized = 1; current_thread = 0; /* !!! Just to avoid unused code elimination !!! */ if (__itt_fini_ittlib_ptr == _N_(fini_ittlib)) current_thread = 0; } } #ifndef ITT_SIMPLE_INIT __itt_mutex_unlock(&_N_(_ittapi_global).mutex); #endif /* ITT_SIMPLE_INIT */ } /* Evaluating if any function ptr is non empty and it's in init_groups */ for (i = 0; _N_(_ittapi_global).api_list_ptr[i].name != NULL; i++) if (*_N_(_ittapi_global).api_list_ptr[i].func_ptr != _N_(_ittapi_global).api_list_ptr[i].null_func && _N_(_ittapi_global).api_list_ptr[i].group & init_groups) return 1; return 0; } ITT_EXTERN_C __itt_error_handler_t* _N_(set_error_handler)(__itt_error_handler_t* handler) { __itt_error_handler_t* prev = (__itt_error_handler_t*)(size_t)_N_(_ittapi_global).error_handler; _N_(_ittapi_global).error_handler = (void*)(size_t)handler; return prev; } #if ITT_PLATFORM==ITT_PLATFORM_WIN #pragma warning(pop) #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ ================================================ FILE: benchmarks/tbb/tools_api/ittnotify_static.h ================================================ /* Copyright 2005-2014 Intel Corporation. All Rights Reserved. This file is part of Threading Building Blocks. Threading Building Blocks is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. Threading Building Blocks is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Threading Building Blocks; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA As a special exception, you may use this file as part of a free software library without restriction. Specifically, if other files instantiate templates or use macros or inline functions from this file, or you compile this file and link it with other files to produce an executable, this file does not by itself cause the resulting executable to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the executable file might be covered by the GNU General Public License. */ #include "ittnotify_config.h" #ifndef ITT_FORMAT_DEFINED # ifndef ITT_FORMAT # define ITT_FORMAT # endif /* ITT_FORMAT */ # ifndef ITT_NO_PARAMS # define ITT_NO_PARAMS # endif /* ITT_NO_PARAMS */ #endif /* ITT_FORMAT_DEFINED */ /* * parameters for macro expected: * ITT_STUB(api, type, func_name, arguments, params, func_name_in_dll, group, printf_fmt) */ #ifdef __ITT_INTERNAL_INIT #ifndef __ITT_INTERNAL_BODY #if ITT_PLATFORM==ITT_PLATFORM_WIN ITT_STUB(ITTAPI, __itt_domain*, domain_createA, (const char *name), (ITT_FORMAT name), domain_createA, __itt_group_structure, "\"%s\"") ITT_STUB(ITTAPI, __itt_domain*, domain_createW, (const wchar_t *name), (ITT_FORMAT name), domain_createW, __itt_group_structure, "\"%S\"") #else /* ITT_PLATFORM!=ITT_PLATFORM_WIN */ ITT_STUB(ITTAPI, __itt_domain*, domain_create, (const char *name), (ITT_FORMAT name), domain_create, __itt_group_structure, "\"%s\"") #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ #if ITT_PLATFORM==ITT_PLATFORM_WIN ITT_STUB(ITTAPI, __itt_string_handle*, string_handle_createA, (const char *name), (ITT_FORMAT name), string_handle_createA, __itt_group_structure, "\"%s\"") ITT_STUB(ITTAPI, __itt_string_handle*, string_handle_createW, (const wchar_t *name), (ITT_FORMAT name), string_handle_createW, __itt_group_structure, "\"%S\"") #else /* ITT_PLATFORM!=ITT_PLATFORM_WIN */ ITT_STUB(ITTAPI, __itt_string_handle*, string_handle_create, (const char *name), (ITT_FORMAT name), string_handle_create, __itt_group_structure, "\"%s\"") #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ ITT_STUBV(ITTAPI, void, pause, (void), (ITT_NO_PARAMS), pause, __itt_group_control | __itt_group_legacy, "no args") ITT_STUBV(ITTAPI, void, resume, (void), (ITT_NO_PARAMS), resume, __itt_group_control | __itt_group_legacy, "no args") #if ITT_PLATFORM==ITT_PLATFORM_WIN ITT_STUBV(ITTAPI, void, thread_set_nameA, (const char *name), (ITT_FORMAT name), thread_set_nameA, __itt_group_thread, "\"%s\"") ITT_STUBV(ITTAPI, void, thread_set_nameW, (const wchar_t *name), (ITT_FORMAT name), thread_set_nameW, __itt_group_thread, "\"%S\"") #else /* ITT_PLATFORM!=ITT_PLATFORM_WIN */ ITT_STUBV(ITTAPI, void, thread_set_name, (const char *name), (ITT_FORMAT name), thread_set_name, __itt_group_thread, "\"%s\"") #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ ITT_STUBV(ITTAPI, void, thread_ignore, (void), (ITT_NO_PARAMS), thread_ignore, __itt_group_thread, "no args") #if ITT_PLATFORM==ITT_PLATFORM_WIN ITT_STUB(LIBITTAPI, int, thr_name_setA, (const char *name, int namelen), (ITT_FORMAT name, namelen), thr_name_setA, __itt_group_thread | __itt_group_legacy, "\"%s\", %d") ITT_STUB(LIBITTAPI, int, thr_name_setW, (const wchar_t *name, int namelen), (ITT_FORMAT name, namelen), thr_name_setW, __itt_group_thread | __itt_group_legacy, "\"%S\", %d") #else /* ITT_PLATFORM!=ITT_PLATFORM_WIN */ ITT_STUB(LIBITTAPI, int, thr_name_set, (const char *name, int namelen), (ITT_FORMAT name, namelen), thr_name_set, __itt_group_thread | __itt_group_legacy, "\"%s\", %d") #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ ITT_STUBV(LIBITTAPI, void, thr_ignore, (void), (ITT_NO_PARAMS), thr_ignore, __itt_group_thread | __itt_group_legacy, "no args") #endif /* __ITT_INTERNAL_BODY */ ITT_STUBV(ITTAPI, void, enable_attach, (void), (ITT_NO_PARAMS), enable_attach, __itt_group_all, "no args") #else /* __ITT_INTERNAL_INIT */ #if ITT_PLATFORM==ITT_PLATFORM_WIN ITT_STUBV(ITTAPI, void, sync_createA, (void *addr, const char *objtype, const char *objname, int attribute), (ITT_FORMAT addr, objtype, objname, attribute), sync_createA, __itt_group_sync | __itt_group_fsync, "%p, \"%s\", \"%s\", %x") ITT_STUBV(ITTAPI, void, sync_createW, (void *addr, const wchar_t *objtype, const wchar_t *objname, int attribute), (ITT_FORMAT addr, objtype, objname, attribute), sync_createW, __itt_group_sync | __itt_group_fsync, "%p, \"%S\", \"%S\", %x") ITT_STUBV(ITTAPI, void, sync_renameA, (void *addr, const char *name), (ITT_FORMAT addr, name), sync_renameA, __itt_group_sync | __itt_group_fsync, "%p, \"%s\"") ITT_STUBV(ITTAPI, void, sync_renameW, (void *addr, const wchar_t *name), (ITT_FORMAT addr, name), sync_renameW, __itt_group_sync | __itt_group_fsync, "%p, \"%S\"") #else /* ITT_PLATFORM!=ITT_PLATFORM_WIN */ ITT_STUBV(ITTAPI, void, sync_create, (void *addr, const char *objtype, const char *objname, int attribute), (ITT_FORMAT addr, objtype, objname, attribute), sync_create, __itt_group_sync | __itt_group_fsync, "%p, \"%s\", \"%s\", %x") ITT_STUBV(ITTAPI, void, sync_rename, (void *addr, const char *name), (ITT_FORMAT addr, name), sync_rename, __itt_group_sync | __itt_group_fsync, "%p, \"%s\"") #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ ITT_STUBV(ITTAPI, void, sync_destroy, (void *addr), (ITT_FORMAT addr), sync_destroy, __itt_group_sync | __itt_group_fsync, "%p") ITT_STUBV(ITTAPI, void, sync_prepare, (void* addr), (ITT_FORMAT addr), sync_prepare, __itt_group_sync, "%p") ITT_STUBV(ITTAPI, void, sync_cancel, (void *addr), (ITT_FORMAT addr), sync_cancel, __itt_group_sync, "%p") ITT_STUBV(ITTAPI, void, sync_acquired, (void *addr), (ITT_FORMAT addr), sync_acquired, __itt_group_sync, "%p") ITT_STUBV(ITTAPI, void, sync_releasing, (void* addr), (ITT_FORMAT addr), sync_releasing, __itt_group_sync, "%p") ITT_STUBV(ITTAPI, void, suppress_push, (unsigned int mask), (ITT_FORMAT mask), suppress_push, __itt_group_suppress, "%p") ITT_STUBV(ITTAPI, void, suppress_pop, (void), (ITT_NO_PARAMS), suppress_pop, __itt_group_suppress, "no args") ITT_STUBV(ITTAPI, void, suppress_mark_range, (__itt_suppress_mode_t mode, unsigned int mask, void * address, size_t size),(ITT_FORMAT mode, mask, address, size), suppress_mark_range, __itt_group_suppress, "%d, %p, %p, %d") ITT_STUBV(ITTAPI, void, suppress_clear_range,(__itt_suppress_mode_t mode, unsigned int mask, void * address, size_t size),(ITT_FORMAT mode, mask, address, size), suppress_clear_range,__itt_group_suppress, "%d, %p, %p, %d") ITT_STUBV(ITTAPI, void, fsync_prepare, (void* addr), (ITT_FORMAT addr), sync_prepare, __itt_group_fsync, "%p") ITT_STUBV(ITTAPI, void, fsync_cancel, (void *addr), (ITT_FORMAT addr), sync_cancel, __itt_group_fsync, "%p") ITT_STUBV(ITTAPI, void, fsync_acquired, (void *addr), (ITT_FORMAT addr), sync_acquired, __itt_group_fsync, "%p") ITT_STUBV(ITTAPI, void, fsync_releasing, (void* addr), (ITT_FORMAT addr), sync_releasing, __itt_group_fsync, "%p") ITT_STUBV(ITTAPI, void, model_site_begin, (__itt_model_site *site, __itt_model_site_instance *instance, const char *name), (ITT_FORMAT site, instance, name), model_site_begin, __itt_group_model, "%p, %p, \"%s\"") ITT_STUBV(ITTAPI, void, model_site_end, (__itt_model_site *site, __itt_model_site_instance *instance), (ITT_FORMAT site, instance), model_site_end, __itt_group_model, "%p, %p") ITT_STUBV(ITTAPI, void, model_task_begin, (__itt_model_task *task, __itt_model_task_instance *instance, const char *name), (ITT_FORMAT task, instance, name), model_task_begin, __itt_group_model, "%p, %p, \"%s\"") ITT_STUBV(ITTAPI, void, model_task_end, (__itt_model_task *task, __itt_model_task_instance *instance), (ITT_FORMAT task, instance), model_task_end, __itt_group_model, "%p, %p") ITT_STUBV(ITTAPI, void, model_lock_acquire, (void *lock), (ITT_FORMAT lock), model_lock_acquire, __itt_group_model, "%p") ITT_STUBV(ITTAPI, void, model_lock_release, (void *lock), (ITT_FORMAT lock), model_lock_release, __itt_group_model, "%p") ITT_STUBV(ITTAPI, void, model_record_allocation, (void *addr, size_t size), (ITT_FORMAT addr, size), model_record_allocation, __itt_group_model, "%p, %d") ITT_STUBV(ITTAPI, void, model_record_deallocation, (void *addr), (ITT_FORMAT addr), model_record_deallocation, __itt_group_model, "%p") ITT_STUBV(ITTAPI, void, model_induction_uses, (void* addr, size_t size), (ITT_FORMAT addr, size), model_induction_uses, __itt_group_model, "%p, %d") ITT_STUBV(ITTAPI, void, model_reduction_uses, (void* addr, size_t size), (ITT_FORMAT addr, size), model_reduction_uses, __itt_group_model, "%p, %d") ITT_STUBV(ITTAPI, void, model_observe_uses, (void* addr, size_t size), (ITT_FORMAT addr, size), model_observe_uses, __itt_group_model, "%p, %d") ITT_STUBV(ITTAPI, void, model_clear_uses, (void* addr), (ITT_FORMAT addr), model_clear_uses, __itt_group_model, "%p") #ifndef __ITT_INTERNAL_BODY #if ITT_PLATFORM==ITT_PLATFORM_WIN ITT_STUBV(ITTAPI, void, model_site_beginW, (const wchar_t *name), (ITT_FORMAT name), model_site_beginW, __itt_group_model, "\"%s\"") ITT_STUBV(ITTAPI, void, model_task_beginW, (const wchar_t *name), (ITT_FORMAT name), model_task_beginW, __itt_group_model, "\"%s\"") ITT_STUBV(ITTAPI, void, model_iteration_taskW, (const wchar_t *name), (ITT_FORMAT name), model_iteration_taskW, __itt_group_model, "\"%s\"") #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ ITT_STUBV(ITTAPI, void, model_site_beginA, (const char *name), (ITT_FORMAT name), model_site_beginA, __itt_group_model, "\"%s\"") ITT_STUBV(ITTAPI, void, model_site_beginAL, (const char *name, size_t len), (ITT_FORMAT name, len), model_site_beginAL, __itt_group_model, "\"%s\", %d") ITT_STUBV(ITTAPI, void, model_task_beginA, (const char *name), (ITT_FORMAT name), model_task_beginA, __itt_group_model, "\"%s\"") ITT_STUBV(ITTAPI, void, model_task_beginAL, (const char *name, size_t len), (ITT_FORMAT name, len), model_task_beginAL, __itt_group_model, "\"%s\", %d") ITT_STUBV(ITTAPI, void, model_iteration_taskA, (const char *name), (ITT_FORMAT name), model_iteration_taskA, __itt_group_model, "\"%s\"") ITT_STUBV(ITTAPI, void, model_iteration_taskAL, (const char *name, size_t len), (ITT_FORMAT name, len), model_iteration_taskAL, __itt_group_model, "\"%s\", %d") ITT_STUBV(ITTAPI, void, model_site_end_2, (void), (ITT_NO_PARAMS), model_site_end_2, __itt_group_model, "no args") ITT_STUBV(ITTAPI, void, model_task_end_2, (void), (ITT_NO_PARAMS), model_task_end_2, __itt_group_model, "no args") ITT_STUBV(ITTAPI, void, model_lock_acquire_2, (void *lock), (ITT_FORMAT lock), model_lock_acquire_2, __itt_group_model, "%p") ITT_STUBV(ITTAPI, void, model_lock_release_2, (void *lock), (ITT_FORMAT lock), model_lock_release_2, __itt_group_model, "%p") ITT_STUBV(ITTAPI, void, model_aggregate_task, (size_t count), (ITT_FORMAT count), model_aggregate_task, __itt_group_model, "%d") ITT_STUBV(ITTAPI, void, model_disable_push, (__itt_model_disable x), (ITT_FORMAT x), model_disable_push, __itt_group_model, "%p") ITT_STUBV(ITTAPI, void, model_disable_pop, (void), (ITT_NO_PARAMS), model_disable_pop, __itt_group_model, "no args") #endif /* __ITT_INTERNAL_BODY */ #ifndef __ITT_INTERNAL_BODY #if ITT_PLATFORM==ITT_PLATFORM_WIN ITT_STUB(ITTAPI, __itt_heap_function, heap_function_createA, (const char *name, const char *domain), (ITT_FORMAT name, domain), heap_function_createA, __itt_group_heap, "\"%s\", \"%s\"") ITT_STUB(ITTAPI, __itt_heap_function, heap_function_createW, (const wchar_t *name, const wchar_t *domain), (ITT_FORMAT name, domain), heap_function_createW, __itt_group_heap, "\"%s\", \"%s\"") #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ ITT_STUB(ITTAPI, __itt_heap_function, heap_function_create, (const char *name, const char *domain), (ITT_FORMAT name, domain), heap_function_create, __itt_group_heap, "\"%s\", \"%s\"") #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ #endif /* __ITT_INTERNAL_BODY */ ITT_STUBV(ITTAPI, void, heap_allocate_begin, (__itt_heap_function h, size_t size, int initialized), (ITT_FORMAT h, size, initialized), heap_allocate_begin, __itt_group_heap, "%p, %lu, %d") ITT_STUBV(ITTAPI, void, heap_allocate_end, (__itt_heap_function h, void** addr, size_t size, int initialized), (ITT_FORMAT h, addr, size, initialized), heap_allocate_end, __itt_group_heap, "%p, %p, %lu, %d") ITT_STUBV(ITTAPI, void, heap_free_begin, (__itt_heap_function h, void* addr), (ITT_FORMAT h, addr), heap_free_begin, __itt_group_heap, "%p, %p") ITT_STUBV(ITTAPI, void, heap_free_end, (__itt_heap_function h, void* addr), (ITT_FORMAT h, addr), heap_free_end, __itt_group_heap, "%p, %p") ITT_STUBV(ITTAPI, void, heap_reallocate_begin, (__itt_heap_function h, void* addr, size_t new_size, int initialized), (ITT_FORMAT h, addr, new_size, initialized), heap_reallocate_begin, __itt_group_heap, "%p, %p, %lu, %d") ITT_STUBV(ITTAPI, void, heap_reallocate_end, (__itt_heap_function h, void* addr, void** new_addr, size_t new_size, int initialized), (ITT_FORMAT h, addr, new_addr, new_size, initialized), heap_reallocate_end, __itt_group_heap, "%p, %p, %p, %lu, %d") ITT_STUBV(ITTAPI, void, heap_internal_access_begin, (void), (ITT_NO_PARAMS), heap_internal_access_begin, __itt_group_heap, "no args") ITT_STUBV(ITTAPI, void, heap_internal_access_end, (void), (ITT_NO_PARAMS), heap_internal_access_end, __itt_group_heap, "no args") ITT_STUBV(ITTAPI, void, heap_record_memory_growth_begin, (void), (ITT_NO_PARAMS), heap_record_memory_growth_begin, __itt_group_heap, "no args") ITT_STUBV(ITTAPI, void, heap_record_memory_growth_end, (void), (ITT_NO_PARAMS), heap_record_memory_growth_end, __itt_group_heap, "no args") ITT_STUBV(ITTAPI, void, heap_reset_detection, (unsigned int reset_mask), (ITT_FORMAT reset_mask), heap_reset_detection, __itt_group_heap, "%u") ITT_STUBV(ITTAPI, void, heap_record, (unsigned int record_mask), (ITT_FORMAT record_mask), heap_record, __itt_group_heap, "%u") ITT_STUBV(ITTAPI, void, id_create, (const __itt_domain *domain, __itt_id id), (ITT_FORMAT domain, id), id_create, __itt_group_structure, "%p, %lu") ITT_STUBV(ITTAPI, void, id_destroy, (const __itt_domain *domain, __itt_id id), (ITT_FORMAT domain, id), id_destroy, __itt_group_structure, "%p, %lu") ITT_STUB(ITTAPI, __itt_timestamp, get_timestamp, (void), (ITT_NO_PARAMS), get_timestamp, __itt_group_structure, "no args") ITT_STUBV(ITTAPI, void, region_begin, (const __itt_domain *domain, __itt_id id, __itt_id parent, __itt_string_handle *name), (ITT_FORMAT domain, id, parent, name), region_begin, __itt_group_structure, "%p, %lu, %lu, %p") ITT_STUBV(ITTAPI, void, region_end, (const __itt_domain *domain, __itt_id id), (ITT_FORMAT domain, id), region_end, __itt_group_structure, "%p, %lu") #ifndef __ITT_INTERNAL_BODY ITT_STUBV(ITTAPI, void, frame_begin_v3, (const __itt_domain *domain, __itt_id *id), (ITT_FORMAT domain, id), frame_begin_v3, __itt_group_structure, "%p, %p") ITT_STUBV(ITTAPI, void, frame_end_v3, (const __itt_domain *domain, __itt_id *id), (ITT_FORMAT domain, id), frame_end_v3, __itt_group_structure, "%p, %p") ITT_STUBV(ITTAPI, void, frame_submit_v3, (const __itt_domain *domain, __itt_id *id, __itt_timestamp begin, __itt_timestamp end), (ITT_FORMAT domain, id, begin, end), frame_submit_v3, __itt_group_structure, "%p, %p, %lu, %lu") #endif /* __ITT_INTERNAL_BODY */ ITT_STUBV(ITTAPI, void, task_group, (const __itt_domain *domain, __itt_id id, __itt_id parent, __itt_string_handle *name), (ITT_FORMAT domain, id, parent, name), task_group, __itt_group_structure, "%p, %lu, %lu, %p") ITT_STUBV(ITTAPI, void, task_begin, (const __itt_domain *domain, __itt_id id, __itt_id parent, __itt_string_handle *name), (ITT_FORMAT domain, id, parent, name), task_begin, __itt_group_structure, "%p, %lu, %lu, %p") ITT_STUBV(ITTAPI, void, task_begin_fn, (const __itt_domain *domain, __itt_id id, __itt_id parent, void* fn), (ITT_FORMAT domain, id, parent, fn), task_begin_fn, __itt_group_structure, "%p, %lu, %lu, %p") ITT_STUBV(ITTAPI, void, task_end, (const __itt_domain *domain), (ITT_FORMAT domain), task_end, __itt_group_structure, "%p") ITT_STUBV(ITTAPI, void, counter_inc_v3, (const __itt_domain *domain, __itt_string_handle *name), (ITT_FORMAT domain, name), counter_inc_v3, __itt_group_structure, "%p, %p") ITT_STUBV(ITTAPI, void, counter_inc_delta_v3, (const __itt_domain *domain, __itt_string_handle *name, unsigned long long value), (ITT_FORMAT domain, name, value), counter_inc_delta_v3, __itt_group_structure, "%p, %p, %lu") ITT_STUBV(ITTAPI, void, marker, (const __itt_domain *domain, __itt_id id, __itt_string_handle *name, __itt_scope scope), (ITT_FORMAT domain, id, name, scope), marker, __itt_group_structure, "%p, %lu, %p, %d") ITT_STUBV(ITTAPI, void, metadata_add, (const __itt_domain *domain, __itt_id id, __itt_string_handle *key, __itt_metadata_type type, size_t count, void *data), (ITT_FORMAT domain, id, key, type, count, data), metadata_add, __itt_group_structure, "%p, %lu, %p, %d, %lu, %p") #if ITT_PLATFORM==ITT_PLATFORM_WIN ITT_STUBV(ITTAPI, void, metadata_str_addA, (const __itt_domain *domain, __itt_id id, __itt_string_handle *key, const char* data, size_t length), (ITT_FORMAT domain, id, key, data, length), metadata_str_addA, __itt_group_structure, "%p, %lu, %p, %p, %lu") ITT_STUBV(ITTAPI, void, metadata_str_addW, (const __itt_domain *domain, __itt_id id, __itt_string_handle *key, const wchar_t* data, size_t length), (ITT_FORMAT domain, id, key, data, length), metadata_str_addW, __itt_group_structure, "%p, %lu, %p, %p, %lu") #else /* ITT_PLATFORM!=ITT_PLATFORM_WIN */ ITT_STUBV(ITTAPI, void, metadata_str_add, (const __itt_domain *domain, __itt_id id, __itt_string_handle *key, const char* data, size_t length), (ITT_FORMAT domain, id, key, data, length), metadata_str_add, __itt_group_structure, "%p, %lu, %p, %p, %lu") #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ ITT_STUBV(ITTAPI, void, relation_add_to_current, (const __itt_domain *domain, __itt_relation relation, __itt_id tail), (ITT_FORMAT domain, relation, tail), relation_add_to_current, __itt_group_structure, "%p, %lu, %p") ITT_STUBV(ITTAPI, void, relation_add, (const __itt_domain *domain, __itt_id head, __itt_relation relation, __itt_id tail), (ITT_FORMAT domain, head, relation, tail), relation_add, __itt_group_structure, "%p, %p, %lu, %p") #ifndef __ITT_INTERNAL_BODY #if ITT_PLATFORM==ITT_PLATFORM_WIN ITT_STUB(LIBITTAPI, __itt_event, event_createA, (const char *name, int namelen), (ITT_FORMAT name, namelen), event_createA, __itt_group_mark | __itt_group_legacy, "\"%s\", %d") ITT_STUB(LIBITTAPI, __itt_event, event_createW, (const wchar_t *name, int namelen), (ITT_FORMAT name, namelen), event_createW, __itt_group_mark | __itt_group_legacy, "\"%S\", %d") #else /* ITT_PLATFORM!=ITT_PLATFORM_WIN */ ITT_STUB(LIBITTAPI, __itt_event, event_create, (const char *name, int namelen), (ITT_FORMAT name, namelen), event_create, __itt_group_mark | __itt_group_legacy, "\"%s\", %d") #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ ITT_STUB(LIBITTAPI, int, event_start, (__itt_event event), (ITT_FORMAT event), event_start, __itt_group_mark | __itt_group_legacy, "%d") ITT_STUB(LIBITTAPI, int, event_end, (__itt_event event), (ITT_FORMAT event), event_end, __itt_group_mark | __itt_group_legacy, "%d") #endif /* __ITT_INTERNAL_BODY */ #ifndef __ITT_INTERNAL_BODY #if ITT_PLATFORM==ITT_PLATFORM_WIN ITT_STUBV(ITTAPI, void, sync_set_nameA, (void *addr, const char *objtype, const char *objname, int attribute), (ITT_FORMAT addr, objtype, objname, attribute), sync_set_nameA, __itt_group_sync | __itt_group_fsync | __itt_group_legacy, "%p, \"%s\", \"%s\", %x") ITT_STUBV(ITTAPI, void, sync_set_nameW, (void *addr, const wchar_t *objtype, const wchar_t *objname, int attribute), (ITT_FORMAT addr, objtype, objname, attribute), sync_set_nameW, __itt_group_sync | __itt_group_fsync | __itt_group_legacy, "%p, \"%S\", \"%S\", %x") #else /* ITT_PLATFORM!=ITT_PLATFORM_WIN */ ITT_STUBV(ITTAPI, void, sync_set_name, (void *addr, const char *objtype, const char *objname, int attribute), (ITT_FORMAT addr, objtype, objname, attribute), sync_set_name, __itt_group_sync | __itt_group_fsync | __itt_group_legacy, "p, \"%s\", \"%s\", %x") #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ #if ITT_PLATFORM==ITT_PLATFORM_WIN ITT_STUB(LIBITTAPI, int, notify_sync_nameA, (void *p, const char *objtype, int typelen, const char *objname, int namelen, int attribute), (ITT_FORMAT p, objtype, typelen, objname, namelen, attribute), notify_sync_nameA, __itt_group_sync | __itt_group_fsync | __itt_group_legacy, "%p, \"%s\", %d, \"%s\", %d, %x") ITT_STUB(LIBITTAPI, int, notify_sync_nameW, (void *p, const wchar_t *objtype, int typelen, const wchar_t *objname, int namelen, int attribute), (ITT_FORMAT p, objtype, typelen, objname, namelen, attribute), notify_sync_nameW, __itt_group_sync | __itt_group_fsync | __itt_group_legacy, "%p, \"%S\", %d, \"%S\", %d, %x") #else /* ITT_PLATFORM!=ITT_PLATFORM_WIN */ ITT_STUB(LIBITTAPI, int, notify_sync_name, (void *p, const char *objtype, int typelen, const char *objname, int namelen, int attribute), (ITT_FORMAT p, objtype, typelen, objname, namelen, attribute), notify_sync_name, __itt_group_sync | __itt_group_fsync | __itt_group_legacy, "%p, \"%s\", %d, \"%s\", %d, %x") #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ ITT_STUBV(LIBITTAPI, void, notify_sync_prepare, (void *p), (ITT_FORMAT p), notify_sync_prepare, __itt_group_sync | __itt_group_fsync | __itt_group_legacy, "%p") ITT_STUBV(LIBITTAPI, void, notify_sync_cancel, (void *p), (ITT_FORMAT p), notify_sync_cancel, __itt_group_sync | __itt_group_fsync | __itt_group_legacy, "%p") ITT_STUBV(LIBITTAPI, void, notify_sync_acquired, (void *p), (ITT_FORMAT p), notify_sync_acquired, __itt_group_sync | __itt_group_fsync | __itt_group_legacy, "%p") ITT_STUBV(LIBITTAPI, void, notify_sync_releasing, (void *p), (ITT_FORMAT p), notify_sync_releasing, __itt_group_sync | __itt_group_fsync | __itt_group_legacy, "%p") #endif /* __ITT_INTERNAL_BODY */ ITT_STUBV(LIBITTAPI, void, memory_read, (void *addr, size_t size), (ITT_FORMAT addr, size), memory_read, __itt_group_legacy, "%p, %lu") ITT_STUBV(LIBITTAPI, void, memory_write, (void *addr, size_t size), (ITT_FORMAT addr, size), memory_write, __itt_group_legacy, "%p, %lu") ITT_STUBV(LIBITTAPI, void, memory_update, (void *addr, size_t size), (ITT_FORMAT addr, size), memory_update, __itt_group_legacy, "%p, %lu") ITT_STUB(LIBITTAPI, __itt_state_t, state_get, (void), (ITT_NO_PARAMS), state_get, __itt_group_legacy, "no args") ITT_STUB(LIBITTAPI, __itt_state_t, state_set, (__itt_state_t s), (ITT_FORMAT s), state_set, __itt_group_legacy, "%d") ITT_STUB(LIBITTAPI, __itt_obj_state_t, obj_mode_set, (__itt_obj_prop_t p, __itt_obj_state_t s), (ITT_FORMAT p, s), obj_mode_set, __itt_group_legacy, "%d, %d") ITT_STUB(LIBITTAPI, __itt_thr_state_t, thr_mode_set, (__itt_thr_prop_t p, __itt_thr_state_t s), (ITT_FORMAT p, s), thr_mode_set, __itt_group_legacy, "%d, %d") #ifndef __ITT_INTERNAL_BODY #if ITT_PLATFORM==ITT_PLATFORM_WIN ITT_STUB(ITTAPI, __itt_frame, frame_createA, (const char *domain), (ITT_FORMAT domain), frame_createA, __itt_group_frame, "\"%s\"") ITT_STUB(ITTAPI, __itt_frame, frame_createW, (const wchar_t *domain), (ITT_FORMAT domain), frame_createW, __itt_group_frame, "\"%s\"") #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ ITT_STUB(ITTAPI, __itt_frame, frame_create, (const char *domain), (ITT_FORMAT domain), frame_create, __itt_group_frame, "\"%s\"") #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ #endif /* __ITT_INTERNAL_BODY */ ITT_STUBV(ITTAPI, void, frame_begin, (__itt_frame frame), (ITT_FORMAT frame), frame_begin, __itt_group_frame, "%p") ITT_STUBV(ITTAPI, void, frame_end, (__itt_frame frame), (ITT_FORMAT frame), frame_end, __itt_group_frame, "%p") #ifndef __ITT_INTERNAL_BODY #if ITT_PLATFORM==ITT_PLATFORM_WIN ITT_STUB(ITTAPI, __itt_counter, counter_createA, (const char *name, const char *domain), (ITT_FORMAT name, domain), counter_createA, __itt_group_counter, "\"%s\", \"%s\"") ITT_STUB(ITTAPI, __itt_counter, counter_createW, (const wchar_t *name, const wchar_t *domain), (ITT_FORMAT name, domain), counter_createW, __itt_group_counter, "\"%s\", \"%s\"") #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ ITT_STUB(ITTAPI, __itt_counter, counter_create, (const char *name, const char *domain), (ITT_FORMAT name, domain), counter_create, __itt_group_counter, "\"%s\", \"%s\"") #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ #endif /* __ITT_INTERNAL_BODY */ ITT_STUBV(ITTAPI, void, counter_destroy, (__itt_counter id), (ITT_FORMAT id), counter_destroy, __itt_group_counter, "%p") ITT_STUBV(ITTAPI, void, counter_inc, (__itt_counter id), (ITT_FORMAT id), counter_inc, __itt_group_counter, "%p") ITT_STUBV(ITTAPI, void, counter_inc_delta, (__itt_counter id, unsigned long long value), (ITT_FORMAT id, value), counter_inc_delta, __itt_group_counter, "%p, %lu") #ifndef __ITT_INTERNAL_BODY #if ITT_PLATFORM==ITT_PLATFORM_WIN ITT_STUB(ITTAPI, __itt_mark_type, mark_createA, (const char *name), (ITT_FORMAT name), mark_createA, __itt_group_mark, "\"%s\"") ITT_STUB(ITTAPI, __itt_mark_type, mark_createW, (const wchar_t *name), (ITT_FORMAT name), mark_createW, __itt_group_mark, "\"%S\"") #else /* ITT_PLATFORM!=ITT_PLATFORM_WIN */ ITT_STUB(ITTAPI, __itt_mark_type, mark_create, (const char *name), (ITT_FORMAT name), mark_create, __itt_group_mark, "\"%s\"") #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ #endif /* __ITT_INTERNAL_BODY */ #if ITT_PLATFORM==ITT_PLATFORM_WIN ITT_STUB(ITTAPI, int, markA, (__itt_mark_type mt, const char *parameter), (ITT_FORMAT mt, parameter), markA, __itt_group_mark, "%d, \"%s\"") ITT_STUB(ITTAPI, int, markW, (__itt_mark_type mt, const wchar_t *parameter), (ITT_FORMAT mt, parameter), markW, __itt_group_mark, "%d, \"%S\"") #else /* ITT_PLATFORM!=ITT_PLATFORM_WIN */ ITT_STUB(ITTAPI, int, mark, (__itt_mark_type mt, const char *parameter), (ITT_FORMAT mt, parameter), mark, __itt_group_mark, "%d, \"%s\"") #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ ITT_STUB(ITTAPI, int, mark_off, (__itt_mark_type mt), (ITT_FORMAT mt), mark_off, __itt_group_mark, "%d") #if ITT_PLATFORM==ITT_PLATFORM_WIN ITT_STUB(ITTAPI, int, mark_globalA, (__itt_mark_type mt, const char *parameter), (ITT_FORMAT mt, parameter), mark_globalA, __itt_group_mark, "%d, \"%s\"") ITT_STUB(ITTAPI, int, mark_globalW, (__itt_mark_type mt, const wchar_t *parameter), (ITT_FORMAT mt, parameter), mark_globalW, __itt_group_mark, "%d, \"%S\"") #else /* ITT_PLATFORM!=ITT_PLATFORM_WIN */ ITT_STUB(ITTAPI, int, mark_global, (__itt_mark_type mt, const char *parameter), (ITT_FORMAT mt, parameter), mark_global, __itt_group_mark, "%d, \"%S\"") #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ ITT_STUB(ITTAPI, int, mark_global_off, (__itt_mark_type mt), (ITT_FORMAT mt), mark_global_off, __itt_group_mark, "%d") #ifndef __ITT_INTERNAL_BODY ITT_STUB(ITTAPI, __itt_caller, stack_caller_create, (void), (ITT_NO_PARAMS), stack_caller_create, __itt_group_stitch, "no args") #endif /* __ITT_INTERNAL_BODY */ ITT_STUBV(ITTAPI, void, stack_caller_destroy, (__itt_caller id), (ITT_FORMAT id), stack_caller_destroy, __itt_group_stitch, "%p") ITT_STUBV(ITTAPI, void, stack_callee_enter, (__itt_caller id), (ITT_FORMAT id), stack_callee_enter, __itt_group_stitch, "%p") ITT_STUBV(ITTAPI, void, stack_callee_leave, (__itt_caller id), (ITT_FORMAT id), stack_callee_leave, __itt_group_stitch, "%p") ITT_STUB(ITTAPI, __itt_clock_domain*, clock_domain_create, (__itt_get_clock_info_fn fn, void* fn_data), (ITT_FORMAT fn, fn_data), clock_domain_create, __itt_group_structure, "%p, %p") ITT_STUBV(ITTAPI, void, clock_domain_reset, (void), (ITT_NO_PARAMS), clock_domain_reset, __itt_group_structure, "no args") ITT_STUBV(ITTAPI, void, id_create_ex, (const __itt_domain *domain, __itt_clock_domain* clock_domain, unsigned long long timestamp, __itt_id id), (ITT_FORMAT domain, clock_domain, timestamp, id), id_create_ex, __itt_group_structure, "%p, %p, %lu, %lu") ITT_STUBV(ITTAPI, void, id_destroy_ex, (const __itt_domain *domain, __itt_clock_domain* clock_domain, unsigned long long timestamp, __itt_id id), (ITT_FORMAT domain, clock_domain, timestamp, id), id_destroy_ex, __itt_group_structure, "%p, %p, %lu, %lu") ITT_STUBV(ITTAPI, void, task_begin_ex, (const __itt_domain *domain, __itt_clock_domain* clock_domain, unsigned long long timestamp, __itt_id id, __itt_id parentid, __itt_string_handle *name), (ITT_FORMAT domain, clock_domain, timestamp, id, parentid, name), task_begin_ex, __itt_group_structure, "%p, %p, %lu, %lu, %lu, %p") ITT_STUBV(ITTAPI, void, task_begin_fn_ex, (const __itt_domain *domain, __itt_clock_domain* clock_domain, unsigned long long timestamp, __itt_id id, __itt_id parentid, void* fn), (ITT_FORMAT domain, clock_domain, timestamp, id, parentid, fn), task_begin_fn_ex, __itt_group_structure, "%p, %p, %lu, %lu, %lu, %p") ITT_STUBV(ITTAPI, void, task_end_ex, (const __itt_domain *domain, __itt_clock_domain* clock_domain, unsigned long long timestamp), (ITT_FORMAT domain, clock_domain, timestamp), task_end_ex, __itt_group_structure, "%p, %p, %lu") ITT_STUBV(ITTAPI, void, task_begin_overlapped, (const __itt_domain *domain, __itt_id id, __itt_id parent, __itt_string_handle *name), (ITT_FORMAT domain, id, parent, name), task_begin_overlapped, __itt_group_structure, "%p, %lu, %lu, %p") ITT_STUBV(ITTAPI, void, task_begin_overlapped_ex, (const __itt_domain *domain, __itt_clock_domain* clock_domain, unsigned long long timestamp, __itt_id id, __itt_id parentid, __itt_string_handle *name), (ITT_FORMAT domain, clock_domain, timestamp, id, parentid, name), task_begin_overlapped_ex, __itt_group_structure, "%p, %p, %lu, %lu, %lu, %p") ITT_STUBV(ITTAPI, void, task_end_overlapped, (const __itt_domain *domain, __itt_id id), (ITT_FORMAT domain, id), task_end_overlapped, __itt_group_structure, "%p, %lu") ITT_STUBV(ITTAPI, void, task_end_overlapped_ex, (const __itt_domain *domain, __itt_clock_domain* clock_domain, unsigned long long timestamp, __itt_id id), (ITT_FORMAT domain, clock_domain, timestamp, id), task_end_overlapped_ex, __itt_group_structure, "%p, %p, %lu, %lu") ITT_STUBV(ITTAPI, void, marker_ex, (const __itt_domain *domain, __itt_clock_domain* clock_domain, unsigned long long timestamp, __itt_id id, __itt_string_handle *name, __itt_scope scope), (ITT_FORMAT domain, clock_domain, timestamp, id, name, scope), marker_ex, __itt_group_structure, "%p, %p, %lu, %lu, %p, %d") ITT_STUBV(ITTAPI, void, metadata_add_with_scope, (const __itt_domain *domain, __itt_scope scope, __itt_string_handle *key, __itt_metadata_type type, size_t count, void *data), (ITT_FORMAT domain, scope, key, type, count, data), metadata_add_with_scope, __itt_group_structure, "%p, %d, %p, %d, %lu, %p") #if ITT_PLATFORM==ITT_PLATFORM_WIN ITT_STUBV(ITTAPI, void, metadata_str_add_with_scopeA, (const __itt_domain *domain, __itt_scope scope, __itt_string_handle *key, const char *data, size_t length), (ITT_FORMAT domain, scope, key, data, length), metadata_str_add_with_scopeA, __itt_group_structure, "%p, %d, %p, %p, %lu") ITT_STUBV(ITTAPI, void, metadata_str_add_with_scopeW, (const __itt_domain *domain, __itt_scope scope, __itt_string_handle *key, const wchar_t *data, size_t length), (ITT_FORMAT domain, scope, key, data, length), metadata_str_add_with_scopeW, __itt_group_structure, "%p, %d, %p, %p, %lu") #else /* ITT_PLATFORM!=ITT_PLATFORM_WIN */ ITT_STUBV(ITTAPI, void, metadata_str_add_with_scope, (const __itt_domain *domain, __itt_scope scope, __itt_string_handle *key, const char *data, size_t length), (ITT_FORMAT domain, scope, key, data, length), metadata_str_add_with_scope, __itt_group_structure, "%p, %d, %p, %p, %lu") #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ ITT_STUBV(ITTAPI, void, relation_add_to_current_ex, (const __itt_domain *domain, __itt_clock_domain* clock_domain, unsigned long long timestamp, __itt_relation relation, __itt_id tail), (ITT_FORMAT domain, clock_domain, timestamp, relation, tail), relation_add_to_current_ex, __itt_group_structure, "%p, %p, %lu, %d, %lu") ITT_STUBV(ITTAPI, void, relation_add_ex, (const __itt_domain *domain, __itt_clock_domain* clock_domain, unsigned long long timestamp, __itt_id head, __itt_relation relation, __itt_id tail), (ITT_FORMAT domain, clock_domain, timestamp, head, relation, tail), relation_add_ex, __itt_group_structure, "%p, %p, %lu, %lu, %d, %lu") ITT_STUB(ITTAPI, __itt_track_group*, track_group_create, (__itt_string_handle* name, __itt_track_group_type track_group_type), (ITT_FORMAT name, track_group_type), track_group_create, __itt_group_structure, "%p, %d") ITT_STUB(ITTAPI, __itt_track*, track_create, (__itt_track_group* track_group,__itt_string_handle* name, __itt_track_type track_type), (ITT_FORMAT track_group, name, track_type), track_create, __itt_group_structure, "%p, %p, %d") ITT_STUBV(ITTAPI, void, set_track, (__itt_track *track), (ITT_FORMAT track), set_track, __itt_group_structure, "%p") #ifndef __ITT_INTERNAL_BODY ITT_STUB(ITTAPI, const char*, api_version, (void), (ITT_NO_PARAMS), api_version, __itt_group_all & ~__itt_group_legacy, "no args") #endif /* __ITT_INTERNAL_BODY */ #ifndef __ITT_INTERNAL_BODY #if ITT_PLATFORM==ITT_PLATFORM_WIN ITT_STUB(ITTAPI, int, av_saveA, (void *data, int rank, const int *dimensions, int type, const char *filePath, int columnOrder), (ITT_FORMAT data, rank, dimensions, type, filePath, columnOrder), av_saveA, __itt_group_arrays, "%p, %d, %p, %d, \"%s\", %d") ITT_STUB(ITTAPI, int, av_saveW, (void *data, int rank, const int *dimensions, int type, const wchar_t *filePath, int columnOrder), (ITT_FORMAT data, rank, dimensions, type, filePath, columnOrder), av_saveW, __itt_group_arrays, "%p, %d, %p, %d, \"%S\", %d") #else /* ITT_PLATFORM!=ITT_PLATFORM_WIN */ ITT_STUB(ITTAPI, int, av_save, (void *data, int rank, const int *dimensions, int type, const char *filePath, int columnOrder), (ITT_FORMAT data, rank, dimensions, type, filePath, columnOrder), av_save, __itt_group_arrays, "%p, %d, %p, %d, \"%s\", %d") #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ #endif /* __ITT_INTERNAL_BODY */ #endif /* __ITT_INTERNAL_INIT */ ================================================ FILE: benchmarks/tbb/tools_api/ittnotify_types.h ================================================ /* Copyright 2005-2014 Intel Corporation. All Rights Reserved. This file is part of Threading Building Blocks. Threading Building Blocks is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. Threading Building Blocks is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Threading Building Blocks; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA As a special exception, you may use this file as part of a free software library without restriction. Specifically, if other files instantiate templates or use macros or inline functions from this file, or you compile this file and link it with other files to produce an executable, this file does not by itself cause the resulting executable to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the executable file might be covered by the GNU General Public License. */ #ifndef _ITTNOTIFY_TYPES_H_ #define _ITTNOTIFY_TYPES_H_ typedef enum ___itt_group_id { __itt_group_none = 0, __itt_group_legacy = 1<<0, __itt_group_control = 1<<1, __itt_group_thread = 1<<2, __itt_group_mark = 1<<3, __itt_group_sync = 1<<4, __itt_group_fsync = 1<<5, __itt_group_jit = 1<<6, __itt_group_model = 1<<7, __itt_group_splitter_min = 1<<7, __itt_group_counter = 1<<8, __itt_group_frame = 1<<9, __itt_group_stitch = 1<<10, __itt_group_heap = 1<<11, __itt_group_splitter_max = 1<<12, __itt_group_structure = 1<<12, __itt_group_suppress = 1<<13, __itt_group_arrays = 1<<14, __itt_group_all = -1 } __itt_group_id; #pragma pack(push, 8) typedef struct ___itt_group_list { __itt_group_id id; const char* name; } __itt_group_list; #pragma pack(pop) #define ITT_GROUP_LIST(varname) \ static __itt_group_list varname[] = { \ { __itt_group_all, "all" }, \ { __itt_group_control, "control" }, \ { __itt_group_thread, "thread" }, \ { __itt_group_mark, "mark" }, \ { __itt_group_sync, "sync" }, \ { __itt_group_fsync, "fsync" }, \ { __itt_group_jit, "jit" }, \ { __itt_group_model, "model" }, \ { __itt_group_counter, "counter" }, \ { __itt_group_frame, "frame" }, \ { __itt_group_stitch, "stitch" }, \ { __itt_group_heap, "heap" }, \ { __itt_group_structure, "structure" }, \ { __itt_group_suppress, "suppress" }, \ { __itt_group_arrays, "arrays" }, \ { __itt_group_none, NULL } \ } #endif /* _ITTNOTIFY_TYPES_H_ */ ================================================ FILE: benchmarks/tbb/tools_api/legacy/ittnotify.h ================================================ /* Copyright 2005-2014 Intel Corporation. All Rights Reserved. This file is part of Threading Building Blocks. Threading Building Blocks is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. Threading Building Blocks is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Threading Building Blocks; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA As a special exception, you may use this file as part of a free software library without restriction. Specifically, if other files instantiate templates or use macros or inline functions from this file, or you compile this file and link it with other files to produce an executable, this file does not by itself cause the resulting executable to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the executable file might be covered by the GNU General Public License. */ #ifndef _LEGACY_ITTNOTIFY_H_ #define _LEGACY_ITTNOTIFY_H_ /** * @file * @brief Legacy User API functions and types */ /** @cond exclude_from_documentation */ #ifndef ITT_OS_WIN # define ITT_OS_WIN 1 #endif /* ITT_OS_WIN */ #ifndef ITT_OS_LINUX # define ITT_OS_LINUX 2 #endif /* ITT_OS_LINUX */ #ifndef ITT_OS_MAC # define ITT_OS_MAC 3 #endif /* ITT_OS_MAC */ #ifndef ITT_OS # if defined WIN32 || defined _WIN32 # define ITT_OS ITT_OS_WIN # elif defined( __APPLE__ ) && defined( __MACH__ ) # define ITT_OS ITT_OS_MAC # else # define ITT_OS ITT_OS_LINUX # endif #endif /* ITT_OS */ #ifndef ITT_PLATFORM_WIN # define ITT_PLATFORM_WIN 1 #endif /* ITT_PLATFORM_WIN */ #ifndef ITT_PLATFORM_POSIX # define ITT_PLATFORM_POSIX 2 #endif /* ITT_PLATFORM_POSIX */ #ifndef ITT_PLATFORM_MAC # define ITT_PLATFORM_MAC 3 #endif /* ITT_PLATFORM_MAC */ #ifndef ITT_PLATFORM # if ITT_OS==ITT_OS_WIN # define ITT_PLATFORM ITT_PLATFORM_WIN # elif ITT_OS==ITT_OS_MAC # define ITT_PLATFORM ITT_PLATFORM_MAC # else # define ITT_PLATFORM ITT_PLATFORM_POSIX # endif #endif /* ITT_PLATFORM */ #if defined(_UNICODE) && !defined(UNICODE) #define UNICODE #endif #include #if ITT_PLATFORM==ITT_PLATFORM_WIN #include #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ #include #if defined(UNICODE) || defined(_UNICODE) #include #endif /* UNICODE || _UNICODE */ #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ #ifndef CDECL # if ITT_PLATFORM==ITT_PLATFORM_WIN # define CDECL __cdecl # else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ # if defined _M_IX86 || defined __i386__ # define CDECL __attribute__ ((cdecl)) # else /* _M_IX86 || __i386__ */ # define CDECL /* actual only on x86 platform */ # endif /* _M_IX86 || __i386__ */ # endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ #endif /* CDECL */ #ifndef STDCALL # if ITT_PLATFORM==ITT_PLATFORM_WIN # define STDCALL __stdcall # else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ # if defined _M_IX86 || defined __i386__ # define STDCALL __attribute__ ((stdcall)) # else /* _M_IX86 || __i386__ */ # define STDCALL /* supported only on x86 platform */ # endif /* _M_IX86 || __i386__ */ # endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ #endif /* STDCALL */ #define ITTAPI CDECL #define LIBITTAPI CDECL /* TODO: Temporary for compatibility! */ #define ITTAPI_CALL CDECL #define LIBITTAPI_CALL CDECL #if ITT_PLATFORM==ITT_PLATFORM_WIN /* use __forceinline (VC++ specific) */ #define ITT_INLINE __forceinline #define ITT_INLINE_ATTRIBUTE /* nothing */ #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ /* * Generally, functions are not inlined unless optimization is specified. * For functions declared inline, this attribute inlines the function even * if no optimization level was specified. */ #ifdef __STRICT_ANSI__ #define ITT_INLINE static inline #else /* __STRICT_ANSI__ */ #define ITT_INLINE static inline #endif /* __STRICT_ANSI__ */ #define ITT_INLINE_ATTRIBUTE __attribute__ ((always_inline, unused)) #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ /** @endcond */ /** @cond exclude_from_documentation */ /* Helper macro for joining tokens */ #define ITT_JOIN_AUX(p,n) p##n #define ITT_JOIN(p,n) ITT_JOIN_AUX(p,n) #ifdef ITT_MAJOR #undef ITT_MAJOR #endif #ifdef ITT_MINOR #undef ITT_MINOR #endif #define ITT_MAJOR 3 #define ITT_MINOR 0 /* Standard versioning of a token with major and minor version numbers */ #define ITT_VERSIONIZE(x) \ ITT_JOIN(x, \ ITT_JOIN(_, \ ITT_JOIN(ITT_MAJOR, \ ITT_JOIN(_, ITT_MINOR)))) #ifndef INTEL_ITTNOTIFY_PREFIX # define INTEL_ITTNOTIFY_PREFIX __itt_ #endif /* INTEL_ITTNOTIFY_PREFIX */ #ifndef INTEL_ITTNOTIFY_POSTFIX # define INTEL_ITTNOTIFY_POSTFIX _ptr_ #endif /* INTEL_ITTNOTIFY_POSTFIX */ #define ITTNOTIFY_NAME_AUX(n) ITT_JOIN(INTEL_ITTNOTIFY_PREFIX,n) #define ITTNOTIFY_NAME(n) ITT_VERSIONIZE(ITTNOTIFY_NAME_AUX(ITT_JOIN(n,INTEL_ITTNOTIFY_POSTFIX))) #define ITTNOTIFY_VOID(n) (!ITTNOTIFY_NAME(n)) ? (void)0 : ITTNOTIFY_NAME(n) #define ITTNOTIFY_DATA(n) (!ITTNOTIFY_NAME(n)) ? 0 : ITTNOTIFY_NAME(n) #define ITTNOTIFY_VOID_D0(n,d) (!(d)->flags) ? (void)0 : (!ITTNOTIFY_NAME(n)) ? (void)0 : ITTNOTIFY_NAME(n)(d) #define ITTNOTIFY_VOID_D1(n,d,x) (!(d)->flags) ? (void)0 : (!ITTNOTIFY_NAME(n)) ? (void)0 : ITTNOTIFY_NAME(n)(d,x) #define ITTNOTIFY_VOID_D2(n,d,x,y) (!(d)->flags) ? (void)0 : (!ITTNOTIFY_NAME(n)) ? (void)0 : ITTNOTIFY_NAME(n)(d,x,y) #define ITTNOTIFY_VOID_D3(n,d,x,y,z) (!(d)->flags) ? (void)0 : (!ITTNOTIFY_NAME(n)) ? (void)0 : ITTNOTIFY_NAME(n)(d,x,y,z) #define ITTNOTIFY_VOID_D4(n,d,x,y,z,a) (!(d)->flags) ? (void)0 : (!ITTNOTIFY_NAME(n)) ? (void)0 : ITTNOTIFY_NAME(n)(d,x,y,z,a) #define ITTNOTIFY_VOID_D5(n,d,x,y,z,a,b) (!(d)->flags) ? (void)0 : (!ITTNOTIFY_NAME(n)) ? (void)0 : ITTNOTIFY_NAME(n)(d,x,y,z,a,b) #define ITTNOTIFY_VOID_D6(n,d,x,y,z,a,b,c) (!(d)->flags) ? (void)0 : (!ITTNOTIFY_NAME(n)) ? (void)0 : ITTNOTIFY_NAME(n)(d,x,y,z,a,b,c) #define ITTNOTIFY_DATA_D0(n,d) (!(d)->flags) ? 0 : (!ITTNOTIFY_NAME(n)) ? 0 : ITTNOTIFY_NAME(n)(d) #define ITTNOTIFY_DATA_D1(n,d,x) (!(d)->flags) ? 0 : (!ITTNOTIFY_NAME(n)) ? 0 : ITTNOTIFY_NAME(n)(d,x) #define ITTNOTIFY_DATA_D2(n,d,x,y) (!(d)->flags) ? 0 : (!ITTNOTIFY_NAME(n)) ? 0 : ITTNOTIFY_NAME(n)(d,x,y) #define ITTNOTIFY_DATA_D3(n,d,x,y,z) (!(d)->flags) ? 0 : (!ITTNOTIFY_NAME(n)) ? 0 : ITTNOTIFY_NAME(n)(d,x,y,z) #define ITTNOTIFY_DATA_D4(n,d,x,y,z,a) (!(d)->flags) ? 0 : (!ITTNOTIFY_NAME(n)) ? 0 : ITTNOTIFY_NAME(n)(d,x,y,z,a) #define ITTNOTIFY_DATA_D5(n,d,x,y,z,a,b) (!(d)->flags) ? 0 : (!ITTNOTIFY_NAME(n)) ? 0 : ITTNOTIFY_NAME(n)(d,x,y,z,a,b) #define ITTNOTIFY_DATA_D6(n,d,x,y,z,a,b,c) (!(d)->flags) ? 0 : (!ITTNOTIFY_NAME(n)) ? 0 : ITTNOTIFY_NAME(n)(d,x,y,z,a,b,c) #ifdef ITT_STUB #undef ITT_STUB #endif #ifdef ITT_STUBV #undef ITT_STUBV #endif #define ITT_STUBV(api,type,name,args) \ typedef type (api* ITT_JOIN(ITTNOTIFY_NAME(name),_t)) args; \ extern ITT_JOIN(ITTNOTIFY_NAME(name),_t) ITTNOTIFY_NAME(name); #define ITT_STUB ITT_STUBV /** @endcond */ #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ /** * @defgroup legacy Legacy API * @{ * @} */ /** * @defgroup legacy_control Collection Control * @ingroup legacy * General behavior: application continues to run, but no profiling information is being collected * * Pausing occurs not only for the current thread but for all process as well as spawned processes * - Intel(R) Parallel Inspector and Intel(R) Inspector XE: * - Does not analyze or report errors that involve memory access. * - Other errors are reported as usual. Pausing data collection in * Intel(R) Parallel Inspector and Intel(R) Inspector XE * only pauses tracing and analyzing memory access. * It does not pause tracing or analyzing threading APIs. * . * - Intel(R) Parallel Amplifier and Intel(R) VTune(TM) Amplifier XE: * - Does continue to record when new threads are started. * . * - Other effects: * - Possible reduction of runtime overhead. * . * @{ */ #ifndef _ITTNOTIFY_H_ /** @brief Pause collection */ void ITTAPI __itt_pause(void); /** @brief Resume collection */ void ITTAPI __itt_resume(void); /** @cond exclude_from_documentation */ #ifndef INTEL_NO_MACRO_BODY #ifndef INTEL_NO_ITTNOTIFY_API ITT_STUBV(ITTAPI, void, pause, (void)) ITT_STUBV(ITTAPI, void, resume, (void)) #define __itt_pause ITTNOTIFY_VOID(pause) #define __itt_pause_ptr ITTNOTIFY_NAME(pause) #define __itt_resume ITTNOTIFY_VOID(resume) #define __itt_resume_ptr ITTNOTIFY_NAME(resume) #else /* INTEL_NO_ITTNOTIFY_API */ #define __itt_pause() #define __itt_pause_ptr 0 #define __itt_resume() #define __itt_resume_ptr 0 #endif /* INTEL_NO_ITTNOTIFY_API */ #else /* INTEL_NO_MACRO_BODY */ #define __itt_pause_ptr 0 #define __itt_resume_ptr 0 #endif /* INTEL_NO_MACRO_BODY */ /** @endcond */ #endif /* _ITTNOTIFY_H_ */ /** @} legacy_control group */ /** * @defgroup legacy_threads Threads * @ingroup legacy * Threads group * @warning Legacy API * @{ */ /** * @deprecated Legacy API * @brief Set name to be associated with thread in analysis GUI. * @return __itt_err upon failure (name or namelen being null,name and namelen mismatched) */ #if ITT_PLATFORM==ITT_PLATFORM_WIN int LIBITTAPI __itt_thr_name_setA(const char *name, int namelen); int LIBITTAPI __itt_thr_name_setW(const wchar_t *name, int namelen); #if defined(UNICODE) || defined(_UNICODE) # define __itt_thr_name_set __itt_thr_name_setW # define __itt_thr_name_set_ptr __itt_thr_name_setW_ptr #else # define __itt_thr_name_set __itt_thr_name_setA # define __itt_thr_name_set_ptr __itt_thr_name_setA_ptr #endif /* UNICODE */ #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ int LIBITTAPI __itt_thr_name_set(const char *name, int namelen); #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ /** @cond exclude_from_documentation */ #ifndef INTEL_NO_MACRO_BODY #ifndef INTEL_NO_ITTNOTIFY_API #if ITT_PLATFORM==ITT_PLATFORM_WIN ITT_STUB(LIBITTAPI, int, thr_name_setA, (const char *name, int namelen)) ITT_STUB(LIBITTAPI, int, thr_name_setW, (const wchar_t *name, int namelen)) #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ ITT_STUB(LIBITTAPI, int, thr_name_set, (const char *name, int namelen)) #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ #if ITT_PLATFORM==ITT_PLATFORM_WIN #define __itt_thr_name_setA ITTNOTIFY_DATA(thr_name_setA) #define __itt_thr_name_setA_ptr ITTNOTIFY_NAME(thr_name_setA) #define __itt_thr_name_setW ITTNOTIFY_DATA(thr_name_setW) #define __itt_thr_name_setW_ptr ITTNOTIFY_NAME(thr_name_setW) #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ #define __itt_thr_name_set ITTNOTIFY_DATA(thr_name_set) #define __itt_thr_name_set_ptr ITTNOTIFY_NAME(thr_name_set) #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ #else /* INTEL_NO_ITTNOTIFY_API */ #if ITT_PLATFORM==ITT_PLATFORM_WIN #define __itt_thr_name_setA(name, namelen) #define __itt_thr_name_setA_ptr 0 #define __itt_thr_name_setW(name, namelen) #define __itt_thr_name_setW_ptr 0 #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ #define __itt_thr_name_set(name, namelen) #define __itt_thr_name_set_ptr 0 #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ #endif /* INTEL_NO_ITTNOTIFY_API */ #else /* INTEL_NO_MACRO_BODY */ #if ITT_PLATFORM==ITT_PLATFORM_WIN #define __itt_thr_name_setA_ptr 0 #define __itt_thr_name_setW_ptr 0 #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ #define __itt_thr_name_set_ptr 0 #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ #endif /* INTEL_NO_MACRO_BODY */ /** @endcond */ /** * @deprecated Legacy API * @brief Mark current thread as ignored from this point on, for the duration of its existence. */ void LIBITTAPI __itt_thr_ignore(void); /** @cond exclude_from_documentation */ #ifndef INTEL_NO_MACRO_BODY #ifndef INTEL_NO_ITTNOTIFY_API ITT_STUBV(LIBITTAPI, void, thr_ignore, (void)) #define __itt_thr_ignore ITTNOTIFY_VOID(thr_ignore) #define __itt_thr_ignore_ptr ITTNOTIFY_NAME(thr_ignore) #else /* INTEL_NO_ITTNOTIFY_API */ #define __itt_thr_ignore() #define __itt_thr_ignore_ptr 0 #endif /* INTEL_NO_ITTNOTIFY_API */ #else /* INTEL_NO_MACRO_BODY */ #define __itt_thr_ignore_ptr 0 #endif /* INTEL_NO_MACRO_BODY */ /** @endcond */ /** @} legacy_threads group */ /** * @defgroup legacy_sync Synchronization * @ingroup legacy * Synchronization group * @warning Legacy API * @{ */ /** * @hideinitializer * @brief possible value of attribute argument for sync object type */ #define __itt_attr_barrier 1 /** * @hideinitializer * @brief possible value of attribute argument for sync object type */ #define __itt_attr_mutex 2 /** * @deprecated Legacy API * @brief Assign a name to a sync object using char or Unicode string * @param[in] addr - pointer to the sync object. You should use a real pointer to your object * to make sure that the values don't clash with other object addresses * @param[in] objtype - null-terminated object type string. If NULL is passed, the object will * be assumed to be of generic "User Synchronization" type * @param[in] objname - null-terminated object name string. If NULL, no name will be assigned * to the object -- you can use the __itt_sync_rename call later to assign * the name * @param[in] attribute - one of [#__itt_attr_barrier, #__itt_attr_mutex] values which defines the * exact semantics of how prepare/acquired/releasing calls work. */ #if ITT_PLATFORM==ITT_PLATFORM_WIN void ITTAPI __itt_sync_set_nameA(void *addr, const char *objtype, const char *objname, int attribute); void ITTAPI __itt_sync_set_nameW(void *addr, const wchar_t *objtype, const wchar_t *objname, int attribute); #if defined(UNICODE) || defined(_UNICODE) # define __itt_sync_set_name __itt_sync_set_nameW # define __itt_sync_set_name_ptr __itt_sync_set_nameW_ptr #else /* UNICODE */ # define __itt_sync_set_name __itt_sync_set_nameA # define __itt_sync_set_name_ptr __itt_sync_set_nameA_ptr #endif /* UNICODE */ #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ void ITTAPI __itt_sync_set_name(void *addr, const char* objtype, const char* objname, int attribute); #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ /** @cond exclude_from_documentation */ #ifndef INTEL_NO_MACRO_BODY #ifndef INTEL_NO_ITTNOTIFY_API #if ITT_PLATFORM==ITT_PLATFORM_WIN ITT_STUBV(ITTAPI, void, sync_set_nameA, (void *addr, const char *objtype, const char *objname, int attribute)) ITT_STUBV(ITTAPI, void, sync_set_nameW, (void *addr, const wchar_t *objtype, const wchar_t *objname, int attribute)) #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ ITT_STUBV(ITTAPI, void, sync_set_name, (void *addr, const char *objtype, const char *objname, int attribute)) #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ #if ITT_PLATFORM==ITT_PLATFORM_WIN #define __itt_sync_set_nameA ITTNOTIFY_VOID(sync_set_nameA) #define __itt_sync_set_nameA_ptr ITTNOTIFY_NAME(sync_set_nameA) #define __itt_sync_set_nameW ITTNOTIFY_VOID(sync_set_nameW) #define __itt_sync_set_nameW_ptr ITTNOTIFY_NAME(sync_set_nameW) #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ #define __itt_sync_set_name ITTNOTIFY_VOID(sync_set_name) #define __itt_sync_set_name_ptr ITTNOTIFY_NAME(sync_set_name) #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ #else /* INTEL_NO_ITTNOTIFY_API */ #if ITT_PLATFORM==ITT_PLATFORM_WIN #define __itt_sync_set_nameA(addr, objtype, objname, attribute) #define __itt_sync_set_nameA_ptr 0 #define __itt_sync_set_nameW(addr, objtype, objname, attribute) #define __itt_sync_set_nameW_ptr 0 #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ #define __itt_sync_set_name(addr, objtype, objname, attribute) #define __itt_sync_set_name_ptr 0 #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ #endif /* INTEL_NO_ITTNOTIFY_API */ #else /* INTEL_NO_MACRO_BODY */ #if ITT_PLATFORM==ITT_PLATFORM_WIN #define __itt_sync_set_nameA_ptr 0 #define __itt_sync_set_nameW_ptr 0 #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ #define __itt_sync_set_name_ptr 0 #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ #endif /* INTEL_NO_MACRO_BODY */ /** @endcond */ /** * @deprecated Legacy API * @brief Assign a name and type to a sync object using char or Unicode string * @param[in] addr - pointer to the sync object. You should use a real pointer to your object * to make sure that the values don't clash with other object addresses * @param[in] objtype - null-terminated object type string. If NULL is passed, the object will * be assumed to be of generic "User Synchronization" type * @param[in] objname - null-terminated object name string. If NULL, no name will be assigned * to the object -- you can use the __itt_sync_rename call later to assign * the name * @param[in] typelen, namelen - a lenght of string for appropriate objtype and objname parameter * @param[in] attribute - one of [#__itt_attr_barrier, #__itt_attr_mutex] values which defines the * exact semantics of how prepare/acquired/releasing calls work. * @return __itt_err upon failure (name or namelen being null,name and namelen mismatched) */ #if ITT_PLATFORM==ITT_PLATFORM_WIN int LIBITTAPI __itt_notify_sync_nameA(void *addr, const char *objtype, int typelen, const char *objname, int namelen, int attribute); int LIBITTAPI __itt_notify_sync_nameW(void *addr, const wchar_t *objtype, int typelen, const wchar_t *objname, int namelen, int attribute); #if defined(UNICODE) || defined(_UNICODE) # define __itt_notify_sync_name __itt_notify_sync_nameW #else # define __itt_notify_sync_name __itt_notify_sync_nameA #endif #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ int LIBITTAPI __itt_notify_sync_name(void *addr, const char *objtype, int typelen, const char *objname, int namelen, int attribute); #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ /** @cond exclude_from_documentation */ #ifndef INTEL_NO_MACRO_BODY #ifndef INTEL_NO_ITTNOTIFY_API #if ITT_PLATFORM==ITT_PLATFORM_WIN ITT_STUB(LIBITTAPI, int, notify_sync_nameA, (void *addr, const char *objtype, int typelen, const char *objname, int namelen, int attribute)) ITT_STUB(LIBITTAPI, int, notify_sync_nameW, (void *addr, const wchar_t *objtype, int typelen, const wchar_t *objname, int namelen, int attribute)) #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ ITT_STUB(LIBITTAPI, int, notify_sync_name, (void *addr, const char *objtype, int typelen, const char *objname, int namelen, int attribute)) #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ #if ITT_PLATFORM==ITT_PLATFORM_WIN #define __itt_notify_sync_nameA ITTNOTIFY_DATA(notify_sync_nameA) #define __itt_notify_sync_nameA_ptr ITTNOTIFY_NAME(notify_sync_nameA) #define __itt_notify_sync_nameW ITTNOTIFY_DATA(notify_sync_nameW) #define __itt_notify_sync_nameW_ptr ITTNOTIFY_NAME(notify_sync_nameW) #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ #define __itt_notify_sync_name ITTNOTIFY_DATA(notify_sync_name) #define __itt_notify_sync_name_ptr ITTNOTIFY_NAME(notify_sync_name) #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ #else /* INTEL_NO_ITTNOTIFY_API */ #if ITT_PLATFORM==ITT_PLATFORM_WIN #define __itt_notify_sync_nameA(addr, objtype, typelen, objname, namelen, attribute) #define __itt_notify_sync_nameA_ptr 0 #define __itt_notify_sync_nameW(addr, objtype, typelen, objname, namelen, attribute) #define __itt_notify_sync_nameW_ptr 0 #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ #define __itt_notify_sync_name(addr, objtype, typelen, objname, namelen, attribute) #define __itt_notify_sync_name_ptr 0 #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ #endif /* INTEL_NO_ITTNOTIFY_API */ #else /* INTEL_NO_MACRO_BODY */ #if ITT_PLATFORM==ITT_PLATFORM_WIN #define __itt_notify_sync_nameA_ptr 0 #define __itt_notify_sync_nameW_ptr 0 #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ #define __itt_notify_sync_name_ptr 0 #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ #endif /* INTEL_NO_MACRO_BODY */ /** @endcond */ /** * @deprecated Legacy API * @brief Enter spin loop on user-defined sync object */ void LIBITTAPI __itt_notify_sync_prepare(void* addr); /** @cond exclude_from_documentation */ #ifndef INTEL_NO_MACRO_BODY #ifndef INTEL_NO_ITTNOTIFY_API ITT_STUBV(LIBITTAPI, void, notify_sync_prepare, (void *addr)) #define __itt_notify_sync_prepare ITTNOTIFY_VOID(notify_sync_prepare) #define __itt_notify_sync_prepare_ptr ITTNOTIFY_NAME(notify_sync_prepare) #else /* INTEL_NO_ITTNOTIFY_API */ #define __itt_notify_sync_prepare(addr) #define __itt_notify_sync_prepare_ptr 0 #endif /* INTEL_NO_ITTNOTIFY_API */ #else /* INTEL_NO_MACRO_BODY */ #define __itt_notify_sync_prepare_ptr 0 #endif /* INTEL_NO_MACRO_BODY */ /** @endcond */ /** * @deprecated Legacy API * @brief Quit spin loop without acquiring spin object */ void LIBITTAPI __itt_notify_sync_cancel(void *addr); /** @cond exclude_from_documentation */ #ifndef INTEL_NO_MACRO_BODY #ifndef INTEL_NO_ITTNOTIFY_API ITT_STUBV(LIBITTAPI, void, notify_sync_cancel, (void *addr)) #define __itt_notify_sync_cancel ITTNOTIFY_VOID(notify_sync_cancel) #define __itt_notify_sync_cancel_ptr ITTNOTIFY_NAME(notify_sync_cancel) #else /* INTEL_NO_ITTNOTIFY_API */ #define __itt_notify_sync_cancel(addr) #define __itt_notify_sync_cancel_ptr 0 #endif /* INTEL_NO_ITTNOTIFY_API */ #else /* INTEL_NO_MACRO_BODY */ #define __itt_notify_sync_cancel_ptr 0 #endif /* INTEL_NO_MACRO_BODY */ /** @endcond */ /** * @deprecated Legacy API * @brief Successful spin loop completion (sync object acquired) */ void LIBITTAPI __itt_notify_sync_acquired(void *addr); /** @cond exclude_from_documentation */ #ifndef INTEL_NO_MACRO_BODY #ifndef INTEL_NO_ITTNOTIFY_API ITT_STUBV(LIBITTAPI, void, notify_sync_acquired, (void *addr)) #define __itt_notify_sync_acquired ITTNOTIFY_VOID(notify_sync_acquired) #define __itt_notify_sync_acquired_ptr ITTNOTIFY_NAME(notify_sync_acquired) #else /* INTEL_NO_ITTNOTIFY_API */ #define __itt_notify_sync_acquired(addr) #define __itt_notify_sync_acquired_ptr 0 #endif /* INTEL_NO_ITTNOTIFY_API */ #else /* INTEL_NO_MACRO_BODY */ #define __itt_notify_sync_acquired_ptr 0 #endif /* INTEL_NO_MACRO_BODY */ /** @endcond */ /** * @deprecated Legacy API * @brief Start sync object releasing code. Is called before the lock release call. */ void LIBITTAPI __itt_notify_sync_releasing(void* addr); /** @cond exclude_from_documentation */ #ifndef INTEL_NO_MACRO_BODY #ifndef INTEL_NO_ITTNOTIFY_API ITT_STUBV(LIBITTAPI, void, notify_sync_releasing, (void *addr)) #define __itt_notify_sync_releasing ITTNOTIFY_VOID(notify_sync_releasing) #define __itt_notify_sync_releasing_ptr ITTNOTIFY_NAME(notify_sync_releasing) #else /* INTEL_NO_ITTNOTIFY_API */ #define __itt_notify_sync_releasing(addr) #define __itt_notify_sync_releasing_ptr 0 #endif /* INTEL_NO_ITTNOTIFY_API */ #else /* INTEL_NO_MACRO_BODY */ #define __itt_notify_sync_releasing_ptr 0 #endif /* INTEL_NO_MACRO_BODY */ /** @endcond */ /** @} legacy_sync group */ #ifndef _ITTNOTIFY_H_ /** * @defgroup legacy_events Events * @ingroup legacy * Events group * @{ */ /** @brief user event type */ typedef int __itt_event; /** * @brief Create an event notification * @note name or namelen being null/name and namelen not matching, user event feature not enabled * @return non-zero event identifier upon success and __itt_err otherwise */ #if ITT_PLATFORM==ITT_PLATFORM_WIN __itt_event LIBITTAPI __itt_event_createA(const char *name, int namelen); __itt_event LIBITTAPI __itt_event_createW(const wchar_t *name, int namelen); #if defined(UNICODE) || defined(_UNICODE) # define __itt_event_create __itt_event_createW # define __itt_event_create_ptr __itt_event_createW_ptr #else # define __itt_event_create __itt_event_createA # define __itt_event_create_ptr __itt_event_createA_ptr #endif /* UNICODE */ #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ __itt_event LIBITTAPI __itt_event_create(const char *name, int namelen); #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ /** @cond exclude_from_documentation */ #ifndef INTEL_NO_MACRO_BODY #ifndef INTEL_NO_ITTNOTIFY_API #if ITT_PLATFORM==ITT_PLATFORM_WIN ITT_STUB(LIBITTAPI, __itt_event, event_createA, (const char *name, int namelen)) ITT_STUB(LIBITTAPI, __itt_event, event_createW, (const wchar_t *name, int namelen)) #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ ITT_STUB(LIBITTAPI, __itt_event, event_create, (const char *name, int namelen)) #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ #if ITT_PLATFORM==ITT_PLATFORM_WIN #define __itt_event_createA ITTNOTIFY_DATA(event_createA) #define __itt_event_createA_ptr ITTNOTIFY_NAME(event_createA) #define __itt_event_createW ITTNOTIFY_DATA(event_createW) #define __itt_event_createW_ptr ITTNOTIFY_NAME(event_createW) #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ #define __itt_event_create ITTNOTIFY_DATA(event_create) #define __itt_event_create_ptr ITTNOTIFY_NAME(event_create) #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ #else /* INTEL_NO_ITTNOTIFY_API */ #if ITT_PLATFORM==ITT_PLATFORM_WIN #define __itt_event_createA(name, namelen) (__itt_event)0 #define __itt_event_createA_ptr 0 #define __itt_event_createW(name, namelen) (__itt_event)0 #define __itt_event_createW_ptr 0 #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ #define __itt_event_create(name, namelen) (__itt_event)0 #define __itt_event_create_ptr 0 #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ #endif /* INTEL_NO_ITTNOTIFY_API */ #else /* INTEL_NO_MACRO_BODY */ #if ITT_PLATFORM==ITT_PLATFORM_WIN #define __itt_event_createA_ptr 0 #define __itt_event_createW_ptr 0 #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ #define __itt_event_create_ptr 0 #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ #endif /* INTEL_NO_MACRO_BODY */ /** @endcond */ /** * @brief Record an event occurrence. * @return __itt_err upon failure (invalid event id/user event feature not enabled) */ int LIBITTAPI __itt_event_start(__itt_event event); /** @cond exclude_from_documentation */ #ifndef INTEL_NO_MACRO_BODY #ifndef INTEL_NO_ITTNOTIFY_API ITT_STUB(LIBITTAPI, int, event_start, (__itt_event event)) #define __itt_event_start ITTNOTIFY_DATA(event_start) #define __itt_event_start_ptr ITTNOTIFY_NAME(event_start) #else /* INTEL_NO_ITTNOTIFY_API */ #define __itt_event_start(event) (int)0 #define __itt_event_start_ptr 0 #endif /* INTEL_NO_ITTNOTIFY_API */ #else /* INTEL_NO_MACRO_BODY */ #define __itt_event_start_ptr 0 #endif /* INTEL_NO_MACRO_BODY */ /** @endcond */ /** * @brief Record an event end occurrence. * @note It is optional if events do not have durations. * @return __itt_err upon failure (invalid event id/user event feature not enabled) */ int LIBITTAPI __itt_event_end(__itt_event event); /** @cond exclude_from_documentation */ #ifndef INTEL_NO_MACRO_BODY #ifndef INTEL_NO_ITTNOTIFY_API ITT_STUB(LIBITTAPI, int, event_end, (__itt_event event)) #define __itt_event_end ITTNOTIFY_DATA(event_end) #define __itt_event_end_ptr ITTNOTIFY_NAME(event_end) #else /* INTEL_NO_ITTNOTIFY_API */ #define __itt_event_end(event) (int)0 #define __itt_event_end_ptr 0 #endif /* INTEL_NO_ITTNOTIFY_API */ #else /* INTEL_NO_MACRO_BODY */ #define __itt_event_end_ptr 0 #endif /* INTEL_NO_MACRO_BODY */ /** @endcond */ /** @} legacy_events group */ #endif /* _ITTNOTIFY_H_ */ /** * @defgroup legacy_memory Memory Accesses * @ingroup legacy */ /** * @deprecated Legacy API * @brief Inform the tool of memory accesses on reading */ void LIBITTAPI __itt_memory_read(void *addr, size_t size); /** @cond exclude_from_documentation */ #ifndef INTEL_NO_MACRO_BODY #ifndef INTEL_NO_ITTNOTIFY_API ITT_STUBV(LIBITTAPI, void, memory_read, (void *addr, size_t size)) #define __itt_memory_read ITTNOTIFY_VOID(memory_read) #define __itt_memory_read_ptr ITTNOTIFY_NAME(memory_read) #else /* INTEL_NO_ITTNOTIFY_API */ #define __itt_memory_read(addr, size) #define __itt_memory_read_ptr 0 #endif /* INTEL_NO_ITTNOTIFY_API */ #else /* INTEL_NO_MACRO_BODY */ #define __itt_memory_read_ptr 0 #endif /* INTEL_NO_MACRO_BODY */ /** @endcond */ /** * @deprecated Legacy API * @brief Inform the tool of memory accesses on writing */ void LIBITTAPI __itt_memory_write(void *addr, size_t size); /** @cond exclude_from_documentation */ #ifndef INTEL_NO_MACRO_BODY #ifndef INTEL_NO_ITTNOTIFY_API ITT_STUBV(LIBITTAPI, void, memory_write, (void *addr, size_t size)) #define __itt_memory_write ITTNOTIFY_VOID(memory_write) #define __itt_memory_write_ptr ITTNOTIFY_NAME(memory_write) #else /* INTEL_NO_ITTNOTIFY_API */ #define __itt_memory_write(addr, size) #define __itt_memory_write_ptr 0 #endif /* INTEL_NO_ITTNOTIFY_API */ #else /* INTEL_NO_MACRO_BODY */ #define __itt_memory_write_ptr 0 #endif /* INTEL_NO_MACRO_BODY */ /** @endcond */ /** * @deprecated Legacy API * @brief Inform the tool of memory accesses on updating */ void LIBITTAPI __itt_memory_update(void *address, size_t size); /** @cond exclude_from_documentation */ #ifndef INTEL_NO_MACRO_BODY #ifndef INTEL_NO_ITTNOTIFY_API ITT_STUBV(LIBITTAPI, void, memory_update, (void *addr, size_t size)) #define __itt_memory_update ITTNOTIFY_VOID(memory_update) #define __itt_memory_update_ptr ITTNOTIFY_NAME(memory_update) #else /* INTEL_NO_ITTNOTIFY_API */ #define __itt_memory_update(addr, size) #define __itt_memory_update_ptr 0 #endif /* INTEL_NO_ITTNOTIFY_API */ #else /* INTEL_NO_MACRO_BODY */ #define __itt_memory_update_ptr 0 #endif /* INTEL_NO_MACRO_BODY */ /** @endcond */ /** @} legacy_memory group */ /** * @defgroup legacy_state Thread and Object States * @ingroup legacy */ /** @brief state type */ typedef int __itt_state_t; /** @cond exclude_from_documentation */ typedef enum __itt_obj_state { __itt_obj_state_err = 0, __itt_obj_state_clr = 1, __itt_obj_state_set = 2, __itt_obj_state_use = 3 } __itt_obj_state_t; typedef enum __itt_thr_state { __itt_thr_state_err = 0, __itt_thr_state_clr = 1, __itt_thr_state_set = 2 } __itt_thr_state_t; typedef enum __itt_obj_prop { __itt_obj_prop_watch = 1, __itt_obj_prop_ignore = 2, __itt_obj_prop_sharable = 3 } __itt_obj_prop_t; typedef enum __itt_thr_prop { __itt_thr_prop_quiet = 1 } __itt_thr_prop_t; /** @endcond */ /** * @deprecated Legacy API * @brief managing thread and object states */ __itt_state_t LIBITTAPI __itt_state_get(void); /** @cond exclude_from_documentation */ #ifndef INTEL_NO_MACRO_BODY #ifndef INTEL_NO_ITTNOTIFY_API ITT_STUB(ITTAPI, __itt_state_t, state_get, (void)) #define __itt_state_get ITTNOTIFY_DATA(state_get) #define __itt_state_get_ptr ITTNOTIFY_NAME(state_get) #else /* INTEL_NO_ITTNOTIFY_API */ #define __itt_state_get(void) (__itt_state_t)0 #define __itt_state_get_ptr 0 #endif /* INTEL_NO_ITTNOTIFY_API */ #else /* INTEL_NO_MACRO_BODY */ #define __itt_state_get_ptr 0 #endif /* INTEL_NO_MACRO_BODY */ /** @endcond */ /** * @deprecated Legacy API * @brief managing thread and object states */ __itt_state_t LIBITTAPI __itt_state_set(__itt_state_t s); /** @cond exclude_from_documentation */ #ifndef INTEL_NO_MACRO_BODY #ifndef INTEL_NO_ITTNOTIFY_API ITT_STUB(ITTAPI, __itt_state_t, state_set, (__itt_state_t s)) #define __itt_state_set ITTNOTIFY_DATA(state_set) #define __itt_state_set_ptr ITTNOTIFY_NAME(state_set) #else /* INTEL_NO_ITTNOTIFY_API */ #define __itt_state_set(s) (__itt_state_t)0 #define __itt_state_set_ptr 0 #endif /* INTEL_NO_ITTNOTIFY_API */ #else /* INTEL_NO_MACRO_BODY */ #define __itt_state_set_ptr 0 #endif /* INTEL_NO_MACRO_BODY */ /** @endcond */ /** * @deprecated Legacy API * @brief managing thread and object modes */ __itt_thr_state_t LIBITTAPI __itt_thr_mode_set(__itt_thr_prop_t p, __itt_thr_state_t s); /** @cond exclude_from_documentation */ #ifndef INTEL_NO_MACRO_BODY #ifndef INTEL_NO_ITTNOTIFY_API ITT_STUB(ITTAPI, __itt_thr_state_t, thr_mode_set, (__itt_thr_prop_t p, __itt_thr_state_t s)) #define __itt_thr_mode_set ITTNOTIFY_DATA(thr_mode_set) #define __itt_thr_mode_set_ptr ITTNOTIFY_NAME(thr_mode_set) #else /* INTEL_NO_ITTNOTIFY_API */ #define __itt_thr_mode_set(p, s) (__itt_thr_state_t)0 #define __itt_thr_mode_set_ptr 0 #endif /* INTEL_NO_ITTNOTIFY_API */ #else /* INTEL_NO_MACRO_BODY */ #define __itt_thr_mode_set_ptr 0 #endif /* INTEL_NO_MACRO_BODY */ /** @endcond */ /** * @deprecated Legacy API * @brief managing thread and object modes */ __itt_obj_state_t LIBITTAPI __itt_obj_mode_set(__itt_obj_prop_t p, __itt_obj_state_t s); /** @cond exclude_from_documentation */ #ifndef INTEL_NO_MACRO_BODY #ifndef INTEL_NO_ITTNOTIFY_API ITT_STUB(ITTAPI, __itt_obj_state_t, obj_mode_set, (__itt_obj_prop_t p, __itt_obj_state_t s)) #define __itt_obj_mode_set ITTNOTIFY_DATA(obj_mode_set) #define __itt_obj_mode_set_ptr ITTNOTIFY_NAME(obj_mode_set) #else /* INTEL_NO_ITTNOTIFY_API */ #define __itt_obj_mode_set(p, s) (__itt_obj_state_t)0 #define __itt_obj_mode_set_ptr 0 #endif /* INTEL_NO_ITTNOTIFY_API */ #else /* INTEL_NO_MACRO_BODY */ #define __itt_obj_mode_set_ptr 0 #endif /* INTEL_NO_MACRO_BODY */ /** @endcond */ /** @} legacy_state group */ /** * @defgroup frames Frames * @ingroup legacy * Frames group * @{ */ /** * @brief opaque structure for frame identification */ typedef struct __itt_frame_t *__itt_frame; /** * @brief Create a global frame with given domain */ #if ITT_PLATFORM==ITT_PLATFORM_WIN __itt_frame ITTAPI __itt_frame_createA(const char *domain); __itt_frame ITTAPI __itt_frame_createW(const wchar_t *domain); #if defined(UNICODE) || defined(_UNICODE) # define __itt_frame_create __itt_frame_createW # define __itt_frame_create_ptr __itt_frame_createW_ptr #else /* UNICODE */ # define __itt_frame_create __itt_frame_createA # define __itt_frame_create_ptr __itt_frame_createA_ptr #endif /* UNICODE */ #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ __itt_frame ITTAPI __itt_frame_create(const char *domain); #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ /** @cond exclude_from_documentation */ #ifndef INTEL_NO_MACRO_BODY #ifndef INTEL_NO_ITTNOTIFY_API #if ITT_PLATFORM==ITT_PLATFORM_WIN ITT_STUB(ITTAPI, __itt_frame, frame_createA, (const char *domain)) ITT_STUB(ITTAPI, __itt_frame, frame_createW, (const wchar_t *domain)) #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ ITT_STUB(ITTAPI, __itt_frame, frame_create, (const char *domain)) #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ #if ITT_PLATFORM==ITT_PLATFORM_WIN #define __itt_frame_createA ITTNOTIFY_DATA(frame_createA) #define __itt_frame_createA_ptr ITTNOTIFY_NAME(frame_createA) #define __itt_frame_createW ITTNOTIFY_DATA(frame_createW) #define __itt_frame_createW_ptr ITTNOTIFY_NAME(frame_createW) #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ #define __itt_frame_create ITTNOTIFY_DATA(frame_create) #define __itt_frame_create_ptr ITTNOTIFY_NAME(frame_create) #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ #else /* INTEL_NO_ITTNOTIFY_API */ #if ITT_PLATFORM==ITT_PLATFORM_WIN #define __itt_frame_createA(domain) #define __itt_frame_createA_ptr 0 #define __itt_frame_createW(domain) #define __itt_frame_createW_ptr 0 #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ #define __itt_frame_create(domain) #define __itt_frame_create_ptr 0 #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ #endif /* INTEL_NO_ITTNOTIFY_API */ #else /* INTEL_NO_MACRO_BODY */ #if ITT_PLATFORM==ITT_PLATFORM_WIN #define __itt_frame_createA_ptr 0 #define __itt_frame_createW_ptr 0 #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ #define __itt_frame_create_ptr 0 #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ #endif /* INTEL_NO_MACRO_BODY */ /** @endcond */ /** @brief Record an frame begin occurrence. */ void ITTAPI __itt_frame_begin(__itt_frame frame); /** @brief Record an frame end occurrence. */ void ITTAPI __itt_frame_end (__itt_frame frame); /** @cond exclude_from_documentation */ #ifndef INTEL_NO_MACRO_BODY #ifndef INTEL_NO_ITTNOTIFY_API ITT_STUBV(ITTAPI, void, frame_begin, (__itt_frame frame)) ITT_STUBV(ITTAPI, void, frame_end, (__itt_frame frame)) #define __itt_frame_begin ITTNOTIFY_VOID(frame_begin) #define __itt_frame_begin_ptr ITTNOTIFY_NAME(frame_begin) #define __itt_frame_end ITTNOTIFY_VOID(frame_end) #define __itt_frame_end_ptr ITTNOTIFY_NAME(frame_end) #else /* INTEL_NO_ITTNOTIFY_API */ #define __itt_frame_begin(frame) #define __itt_frame_begin_ptr 0 #define __itt_frame_end(frame) #define __itt_frame_end_ptr 0 #endif /* INTEL_NO_ITTNOTIFY_API */ #else /* INTEL_NO_MACRO_BODY */ #define __itt_frame_begin_ptr 0 #define __itt_frame_end_ptr 0 #endif /* INTEL_NO_MACRO_BODY */ /** @endcond */ /** @} frames group */ #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* _LEGACY_ITTNOTIFY_H_ */ ================================================ FILE: benchmarks/tbb/tools_api/prototype/ittnotify.h ================================================ /* Copyright 2005-2014 Intel Corporation. All Rights Reserved. This file is part of Threading Building Blocks. Threading Building Blocks is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. Threading Building Blocks is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Threading Building Blocks; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA As a special exception, you may use this file as part of a free software library without restriction. Specifically, if other files instantiate templates or use macros or inline functions from this file, or you compile this file and link it with other files to produce an executable, this file does not by itself cause the resulting executable to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the executable file might be covered by the GNU General Public License. */ #ifndef _PROTOTYPE_ITTNOTIFY_H_ #define _PROTOTYPE_ITTNOTIFY_H_ /** * @file * @brief Prototype User API functions and types */ /** @cond exclude_from_documentation */ #ifndef ITT_OS_WIN # define ITT_OS_WIN 1 #endif /* ITT_OS_WIN */ #ifndef ITT_OS_LINUX # define ITT_OS_LINUX 2 #endif /* ITT_OS_LINUX */ #ifndef ITT_OS_MAC # define ITT_OS_MAC 3 #endif /* ITT_OS_MAC */ #ifndef ITT_OS # if defined WIN32 || defined _WIN32 # define ITT_OS ITT_OS_WIN # elif defined( __APPLE__ ) && defined( __MACH__ ) # define ITT_OS ITT_OS_MAC # else # define ITT_OS ITT_OS_LINUX # endif #endif /* ITT_OS */ #ifndef ITT_PLATFORM_WIN # define ITT_PLATFORM_WIN 1 #endif /* ITT_PLATFORM_WIN */ #ifndef ITT_PLATFORM_POSIX # define ITT_PLATFORM_POSIX 2 #endif /* ITT_PLATFORM_POSIX */ #ifndef ITT_PLATFORM_MAC # define ITT_PLATFORM_MAC 3 #endif /* ITT_PLATFORM_MAC */ #ifndef ITT_PLATFORM # if ITT_OS==ITT_OS_WIN # define ITT_PLATFORM ITT_PLATFORM_WIN # elif ITT_OS==ITT_OS_MAC # define ITT_PLATFORM ITT_PLATFORM_MAC # else # define ITT_PLATFORM ITT_PLATFORM_POSIX # endif #endif /* ITT_PLATFORM */ #if defined(_UNICODE) && !defined(UNICODE) #define UNICODE #endif #include #if ITT_PLATFORM==ITT_PLATFORM_WIN #include #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ #include #if defined(UNICODE) || defined(_UNICODE) #include #endif /* UNICODE || _UNICODE */ #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ #ifndef CDECL # if ITT_PLATFORM==ITT_PLATFORM_WIN # define CDECL __cdecl # else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ # if defined _M_IX86 || defined __i386__ # define CDECL __attribute__ ((cdecl)) # else /* _M_IX86 || __i386__ */ # define CDECL /* actual only on x86 platform */ # endif /* _M_IX86 || __i386__ */ # endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ #endif /* CDECL */ #ifndef STDCALL # if ITT_PLATFORM==ITT_PLATFORM_WIN # define STDCALL __stdcall # else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ # if defined _M_IX86 || defined __i386__ # define STDCALL __attribute__ ((stdcall)) # else /* _M_IX86 || __i386__ */ # define STDCALL /* supported only on x86 platform */ # endif /* _M_IX86 || __i386__ */ # endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ #endif /* STDCALL */ #define ITTAPI CDECL #define LIBITTAPI CDECL /* TODO: Temporary for compatibility! */ #define ITTAPI_CALL CDECL #define LIBITTAPI_CALL CDECL #if ITT_PLATFORM==ITT_PLATFORM_WIN /* use __forceinline (VC++ specific) */ #define ITT_INLINE __forceinline #define ITT_INLINE_ATTRIBUTE /* nothing */ #else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ /* * Generally, functions are not inlined unless optimization is specified. * For functions declared inline, this attribute inlines the function even * if no optimization level was specified. */ #ifdef __STRICT_ANSI__ #define ITT_INLINE static #else /* __STRICT_ANSI__ */ #define ITT_INLINE static inline #endif /* __STRICT_ANSI__ */ #define ITT_INLINE_ATTRIBUTE __attribute__ ((always_inline, unused)) #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ /** @endcond */ /** @cond exclude_from_documentation */ /* Helper macro for joining tokens */ #define ITT_JOIN_AUX(p,n) p##n #define ITT_JOIN(p,n) ITT_JOIN_AUX(p,n) #ifdef ITT_MAJOR #undef ITT_MAJOR #endif #ifdef ITT_MINOR #undef ITT_MINOR #endif #define ITT_MAJOR 3 #define ITT_MINOR 0 /* Standard versioning of a token with major and minor version numbers */ #define ITT_VERSIONIZE(x) \ ITT_JOIN(x, \ ITT_JOIN(_, \ ITT_JOIN(ITT_MAJOR, \ ITT_JOIN(_, ITT_MINOR)))) #ifndef INTEL_ITTNOTIFY_PREFIX # define INTEL_ITTNOTIFY_PREFIX __itt_ #endif /* INTEL_ITTNOTIFY_PREFIX */ #ifndef INTEL_ITTNOTIFY_POSTFIX # define INTEL_ITTNOTIFY_POSTFIX _ptr_ #endif /* INTEL_ITTNOTIFY_POSTFIX */ #define ITTNOTIFY_NAME_AUX(n) ITT_JOIN(INTEL_ITTNOTIFY_PREFIX,n) #define ITTNOTIFY_NAME(n) ITT_VERSIONIZE(ITTNOTIFY_NAME_AUX(ITT_JOIN(n,INTEL_ITTNOTIFY_POSTFIX))) #define ITTNOTIFY_VOID(n) (!ITTNOTIFY_NAME(n)) ? (void)0 : ITTNOTIFY_NAME(n) #define ITTNOTIFY_DATA(n) (!ITTNOTIFY_NAME(n)) ? 0 : ITTNOTIFY_NAME(n) #define ITTNOTIFY_VOID_D0(n,d) (!(d)->flags) ? (void)0 : (!ITTNOTIFY_NAME(n)) ? (void)0 : ITTNOTIFY_NAME(n)(d) #define ITTNOTIFY_VOID_D1(n,d,x) (!(d)->flags) ? (void)0 : (!ITTNOTIFY_NAME(n)) ? (void)0 : ITTNOTIFY_NAME(n)(d,x) #define ITTNOTIFY_VOID_D2(n,d,x,y) (!(d)->flags) ? (void)0 : (!ITTNOTIFY_NAME(n)) ? (void)0 : ITTNOTIFY_NAME(n)(d,x,y) #define ITTNOTIFY_VOID_D3(n,d,x,y,z) (!(d)->flags) ? (void)0 : (!ITTNOTIFY_NAME(n)) ? (void)0 : ITTNOTIFY_NAME(n)(d,x,y,z) #define ITTNOTIFY_VOID_D4(n,d,x,y,z,a) (!(d)->flags) ? (void)0 : (!ITTNOTIFY_NAME(n)) ? (void)0 : ITTNOTIFY_NAME(n)(d,x,y,z,a) #define ITTNOTIFY_VOID_D5(n,d,x,y,z,a,b) (!(d)->flags) ? (void)0 : (!ITTNOTIFY_NAME(n)) ? (void)0 : ITTNOTIFY_NAME(n)(d,x,y,z,a,b) #define ITTNOTIFY_VOID_D6(n,d,x,y,z,a,b,c) (!(d)->flags) ? (void)0 : (!ITTNOTIFY_NAME(n)) ? (void)0 : ITTNOTIFY_NAME(n)(d,x,y,z,a,b,c) #define ITTNOTIFY_DATA_D0(n,d) (!(d)->flags) ? 0 : (!ITTNOTIFY_NAME(n)) ? 0 : ITTNOTIFY_NAME(n)(d) #define ITTNOTIFY_DATA_D1(n,d,x) (!(d)->flags) ? 0 : (!ITTNOTIFY_NAME(n)) ? 0 : ITTNOTIFY_NAME(n)(d,x) #define ITTNOTIFY_DATA_D2(n,d,x,y) (!(d)->flags) ? 0 : (!ITTNOTIFY_NAME(n)) ? 0 : ITTNOTIFY_NAME(n)(d,x,y) #define ITTNOTIFY_DATA_D3(n,d,x,y,z) (!(d)->flags) ? 0 : (!ITTNOTIFY_NAME(n)) ? 0 : ITTNOTIFY_NAME(n)(d,x,y,z) #define ITTNOTIFY_DATA_D4(n,d,x,y,z,a) (!(d)->flags) ? 0 : (!ITTNOTIFY_NAME(n)) ? 0 : ITTNOTIFY_NAME(n)(d,x,y,z,a) #define ITTNOTIFY_DATA_D5(n,d,x,y,z,a,b) (!(d)->flags) ? 0 : (!ITTNOTIFY_NAME(n)) ? 0 : ITTNOTIFY_NAME(n)(d,x,y,z,a,b) #define ITTNOTIFY_DATA_D6(n,d,x,y,z,a,b,c) (!(d)->flags) ? 0 : (!ITTNOTIFY_NAME(n)) ? 0 : ITTNOTIFY_NAME(n)(d,x,y,z,a,b,c) #ifdef ITT_STUB #undef ITT_STUB #endif #ifdef ITT_STUBV #undef ITT_STUBV #endif #define ITT_STUBV(api,type,name,args) \ typedef type (api* ITT_JOIN(ITTNOTIFY_NAME(name),_t)) args; \ extern ITT_JOIN(ITTNOTIFY_NAME(name),_t) ITTNOTIFY_NAME(name); #define ITT_STUB ITT_STUBV /** @endcond */ #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ /** * @defgroup prototype Prototype API * @{ * @} */ #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* _PROTOTYPE_ITTNOTIFY_H_ */ ================================================ FILE: benchmarks/tbb/version_string.ver ================================================ #define __TBB_VERSION_STRINGS(N) "Empty" ================================================ FILE: benchmarks/tbb/win32-tbb-export.def ================================================ ; Copyright 2005-2014 Intel Corporation. All Rights Reserved. ; ; This file is part of Threading Building Blocks. Threading Building Blocks is free software; ; you can redistribute it and/or modify it under the terms of the GNU General Public License ; version 2 as published by the Free Software Foundation. Threading Building Blocks is ; distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the ; implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. ; See the GNU General Public License for more details. You should have received a copy of ; the GNU General Public License along with Threading Building Blocks; if not, write to the ; Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA ; ; As a special exception, you may use this file as part of a free software library without ; restriction. Specifically, if other files instantiate templates or use macros or inline ; functions from this file, or you compile this file and link it with other files to produce ; an executable, this file does not by itself cause the resulting executable to be covered ; by the GNU General Public License. This exception does not however invalidate any other ; reasons why the executable file might be covered by the GNU General Public License. EXPORTS #define __TBB_SYMBOL( sym ) sym #if _M_ARM #include "winrt-tbb-export.lst" #else #include "win32-tbb-export.lst" #endif ================================================ FILE: benchmarks/tbb/win32-tbb-export.lst ================================================ ; Copyright 2005-2014 Intel Corporation. All Rights Reserved. ; ; This file is part of Threading Building Blocks. Threading Building Blocks is free software; ; you can redistribute it and/or modify it under the terms of the GNU General Public License ; version 2 as published by the Free Software Foundation. Threading Building Blocks is ; distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the ; implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. ; See the GNU General Public License for more details. You should have received a copy of ; the GNU General Public License along with Threading Building Blocks; if not, write to the ; Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA ; ; As a special exception, you may use this file as part of a free software library without ; restriction. Specifically, if other files instantiate templates or use macros or inline ; functions from this file, or you compile this file and link it with other files to produce ; an executable, this file does not by itself cause the resulting executable to be covered ; by the GNU General Public License. This exception does not however invalidate any other ; reasons why the executable file might be covered by the GNU General Public License. #include "tbb/tbb_config.h" // Assembly-language support that is called directly by clients // __TBB_SYMBOL( __TBB_machine_cmpswp1 ) // __TBB_SYMBOL( __TBB_machine_cmpswp2 ) // __TBB_SYMBOL( __TBB_machine_cmpswp4 ) __TBB_SYMBOL( __TBB_machine_cmpswp8 ) // __TBB_SYMBOL( __TBB_machine_fetchadd1 ) // __TBB_SYMBOL( __TBB_machine_fetchadd2 ) // __TBB_SYMBOL( __TBB_machine_fetchadd4 ) __TBB_SYMBOL( __TBB_machine_fetchadd8 ) // __TBB_SYMBOL( __TBB_machine_fetchstore1 ) // __TBB_SYMBOL( __TBB_machine_fetchstore2 ) // __TBB_SYMBOL( __TBB_machine_fetchstore4 ) __TBB_SYMBOL( __TBB_machine_fetchstore8 ) __TBB_SYMBOL( __TBB_machine_store8 ) __TBB_SYMBOL( __TBB_machine_load8 ) __TBB_SYMBOL( __TBB_machine_trylockbyte ) __TBB_SYMBOL( __TBB_machine_try_lock_elided ) __TBB_SYMBOL( __TBB_machine_unlock_elided ) __TBB_SYMBOL( __TBB_machine_is_in_transaction ) // cache_aligned_allocator.cpp __TBB_SYMBOL( ?NFS_Allocate@internal@tbb@@YAPAXIIPAX@Z ) __TBB_SYMBOL( ?NFS_GetLineSize@internal@tbb@@YAIXZ ) __TBB_SYMBOL( ?NFS_Free@internal@tbb@@YAXPAX@Z ) __TBB_SYMBOL( ?allocate_via_handler_v3@internal@tbb@@YAPAXI@Z ) __TBB_SYMBOL( ?deallocate_via_handler_v3@internal@tbb@@YAXPAX@Z ) __TBB_SYMBOL( ?is_malloc_used_v3@internal@tbb@@YA_NXZ ) // task.cpp v3 __TBB_SYMBOL( ?allocate@allocate_additional_child_of_proxy@internal@tbb@@QBEAAVtask@3@I@Z ) __TBB_SYMBOL( ?allocate@allocate_child_proxy@internal@tbb@@QBEAAVtask@3@I@Z ) __TBB_SYMBOL( ?allocate@allocate_continuation_proxy@internal@tbb@@QBEAAVtask@3@I@Z ) __TBB_SYMBOL( ?allocate@allocate_root_proxy@internal@tbb@@SAAAVtask@3@I@Z ) __TBB_SYMBOL( ?destroy@task_base@internal@interface5@tbb@@SAXAAVtask@4@@Z ) __TBB_SYMBOL( ?free@allocate_additional_child_of_proxy@internal@tbb@@QBEXAAVtask@3@@Z ) __TBB_SYMBOL( ?free@allocate_child_proxy@internal@tbb@@QBEXAAVtask@3@@Z ) __TBB_SYMBOL( ?free@allocate_continuation_proxy@internal@tbb@@QBEXAAVtask@3@@Z ) __TBB_SYMBOL( ?free@allocate_root_proxy@internal@tbb@@SAXAAVtask@3@@Z ) __TBB_SYMBOL( ?internal_set_ref_count@task@tbb@@AAEXH@Z ) __TBB_SYMBOL( ?internal_decrement_ref_count@task@tbb@@AAEHXZ ) __TBB_SYMBOL( ?is_owned_by_current_thread@task@tbb@@QBE_NXZ ) __TBB_SYMBOL( ?note_affinity@task@tbb@@UAEXG@Z ) __TBB_SYMBOL( ?resize@affinity_partitioner_base_v3@internal@tbb@@AAEXI@Z ) __TBB_SYMBOL( ?self@task@tbb@@SAAAV12@XZ ) __TBB_SYMBOL( ?spawn_and_wait_for_all@task@tbb@@QAEXAAVtask_list@2@@Z ) __TBB_SYMBOL( ?default_num_threads@task_scheduler_init@tbb@@SAHXZ ) __TBB_SYMBOL( ?initialize@task_scheduler_init@tbb@@QAEXHI@Z ) __TBB_SYMBOL( ?initialize@task_scheduler_init@tbb@@QAEXH@Z ) __TBB_SYMBOL( ?terminate@task_scheduler_init@tbb@@QAEXXZ ) #if __TBB_SCHEDULER_OBSERVER __TBB_SYMBOL( ?observe@task_scheduler_observer_v3@internal@tbb@@QAEX_N@Z ) #endif /* __TBB_SCHEDULER_OBSERVER */ #if __TBB_TASK_ARENA /* arena.cpp */ __TBB_SYMBOL( ?internal_current_slot@task_arena_base@internal@interface7@tbb@@KAHXZ ) __TBB_SYMBOL( ?internal_initialize@task_arena_base@internal@interface7@tbb@@IAEXXZ ) __TBB_SYMBOL( ?internal_terminate@task_arena_base@internal@interface7@tbb@@IAEXXZ ) __TBB_SYMBOL( ?internal_enqueue@task_arena_base@internal@interface7@tbb@@IBEXAAVtask@4@H@Z ) __TBB_SYMBOL( ?internal_execute@task_arena_base@internal@interface7@tbb@@IBEXAAVdelegate_base@234@@Z ) __TBB_SYMBOL( ?internal_wait@task_arena_base@internal@interface7@tbb@@IBEXXZ ) #endif /* __TBB_TASK_ARENA */ #if !TBB_NO_LEGACY // task_v2.cpp __TBB_SYMBOL( ?destroy@task@tbb@@QAEXAAV12@@Z ) #endif // exception handling support #if __TBB_TASK_GROUP_CONTEXT __TBB_SYMBOL( ?allocate@allocate_root_with_context_proxy@internal@tbb@@QBEAAVtask@3@I@Z ) __TBB_SYMBOL( ?free@allocate_root_with_context_proxy@internal@tbb@@QBEXAAVtask@3@@Z ) __TBB_SYMBOL( ?change_group@task@tbb@@QAEXAAVtask_group_context@2@@Z ) __TBB_SYMBOL( ?is_group_execution_cancelled@task_group_context@tbb@@QBE_NXZ ) __TBB_SYMBOL( ?cancel_group_execution@task_group_context@tbb@@QAE_NXZ ) __TBB_SYMBOL( ?reset@task_group_context@tbb@@QAEXXZ ) __TBB_SYMBOL( ?capture_fp_settings@task_group_context@tbb@@QAEXXZ ) __TBB_SYMBOL( ?init@task_group_context@tbb@@IAEXXZ ) __TBB_SYMBOL( ?register_pending_exception@task_group_context@tbb@@QAEXXZ ) __TBB_SYMBOL( ??1task_group_context@tbb@@QAE@XZ ) #if __TBB_TASK_PRIORITY __TBB_SYMBOL( ?set_priority@task_group_context@tbb@@QAEXW4priority_t@2@@Z ) __TBB_SYMBOL( ?priority@task_group_context@tbb@@QBE?AW4priority_t@2@XZ ) #endif /* __TBB_TASK_PRIORITY */ __TBB_SYMBOL( ?name@captured_exception@tbb@@UBEPBDXZ ) __TBB_SYMBOL( ?what@captured_exception@tbb@@UBEPBDXZ ) __TBB_SYMBOL( ??1captured_exception@tbb@@UAE@XZ ) __TBB_SYMBOL( ?move@captured_exception@tbb@@UAEPAV12@XZ ) __TBB_SYMBOL( ?destroy@captured_exception@tbb@@UAEXXZ ) __TBB_SYMBOL( ?set@captured_exception@tbb@@QAEXPBD0@Z ) __TBB_SYMBOL( ?clear@captured_exception@tbb@@QAEXXZ ) #endif /* __TBB_TASK_GROUP_CONTEXT */ // Symbols for exceptions thrown from TBB __TBB_SYMBOL( ?throw_bad_last_alloc_exception_v4@internal@tbb@@YAXXZ ) __TBB_SYMBOL( ?throw_exception_v4@internal@tbb@@YAXW4exception_id@12@@Z ) __TBB_SYMBOL( ?what@bad_last_alloc@tbb@@UBEPBDXZ ) __TBB_SYMBOL( ?what@missing_wait@tbb@@UBEPBDXZ ) __TBB_SYMBOL( ?what@invalid_multiple_scheduling@tbb@@UBEPBDXZ ) __TBB_SYMBOL( ?what@improper_lock@tbb@@UBEPBDXZ ) __TBB_SYMBOL( ?what@user_abort@tbb@@UBEPBDXZ ) // tbb_misc.cpp __TBB_SYMBOL( ?assertion_failure@tbb@@YAXPBDH00@Z ) __TBB_SYMBOL( ?get_initial_auto_partitioner_divisor@internal@tbb@@YAIXZ ) __TBB_SYMBOL( ?handle_perror@internal@tbb@@YAXHPBD@Z ) __TBB_SYMBOL( ?set_assertion_handler@tbb@@YAP6AXPBDH00@ZP6AX0H00@Z@Z ) __TBB_SYMBOL( ?runtime_warning@internal@tbb@@YAXPBDZZ ) __TBB_SYMBOL( TBB_runtime_interface_version ) // tbb_main.cpp __TBB_SYMBOL( ?itt_load_pointer_with_acquire_v3@internal@tbb@@YAPAXPBX@Z ) __TBB_SYMBOL( ?itt_store_pointer_with_release_v3@internal@tbb@@YAXPAX0@Z ) __TBB_SYMBOL( ?call_itt_notify_v5@internal@tbb@@YAXHPAX@Z ) __TBB_SYMBOL( ?itt_set_sync_name_v3@internal@tbb@@YAXPAXPB_W@Z ) __TBB_SYMBOL( ?itt_load_pointer_v3@internal@tbb@@YAPAXPBX@Z ) #if __TBB_ITT_STRUCTURE_API __TBB_SYMBOL( ?itt_make_task_group_v7@internal@tbb@@YAXW4itt_domain_enum@12@PAX_K12W4string_index@12@@Z ) __TBB_SYMBOL( ?itt_metadata_str_add_v7@internal@tbb@@YAXW4itt_domain_enum@12@PAX_KW4string_index@12@PBD@Z ) __TBB_SYMBOL( ?itt_relation_add_v7@internal@tbb@@YAXW4itt_domain_enum@12@PAX_KW4itt_relation@12@12@Z ) __TBB_SYMBOL( ?itt_task_begin_v7@internal@tbb@@YAXW4itt_domain_enum@12@PAX_K12W4string_index@12@@Z ) __TBB_SYMBOL( ?itt_task_end_v7@internal@tbb@@YAXW4itt_domain_enum@12@@Z ) #endif // pipeline.cpp __TBB_SYMBOL( ??0pipeline@tbb@@QAE@XZ ) __TBB_SYMBOL( ??1filter@tbb@@UAE@XZ ) __TBB_SYMBOL( ??1pipeline@tbb@@UAE@XZ ) __TBB_SYMBOL( ??_7pipeline@tbb@@6B@ ) __TBB_SYMBOL( ?add_filter@pipeline@tbb@@QAEXAAVfilter@2@@Z ) __TBB_SYMBOL( ?clear@pipeline@tbb@@QAEXXZ ) __TBB_SYMBOL( ?inject_token@pipeline@tbb@@AAEXAAVtask@2@@Z ) __TBB_SYMBOL( ?run@pipeline@tbb@@QAEXI@Z ) #if __TBB_TASK_GROUP_CONTEXT __TBB_SYMBOL( ?run@pipeline@tbb@@QAEXIAAVtask_group_context@2@@Z ) #endif __TBB_SYMBOL( ?process_item@thread_bound_filter@tbb@@QAE?AW4result_type@12@XZ ) __TBB_SYMBOL( ?try_process_item@thread_bound_filter@tbb@@QAE?AW4result_type@12@XZ ) __TBB_SYMBOL( ?set_end_of_input@filter@tbb@@IAEXXZ ) // queuing_rw_mutex.cpp __TBB_SYMBOL( ?internal_construct@queuing_rw_mutex@tbb@@QAEXXZ ) __TBB_SYMBOL( ?acquire@scoped_lock@queuing_rw_mutex@tbb@@QAEXAAV23@_N@Z ) __TBB_SYMBOL( ?downgrade_to_reader@scoped_lock@queuing_rw_mutex@tbb@@QAE_NXZ ) __TBB_SYMBOL( ?release@scoped_lock@queuing_rw_mutex@tbb@@QAEXXZ ) __TBB_SYMBOL( ?upgrade_to_writer@scoped_lock@queuing_rw_mutex@tbb@@QAE_NXZ ) __TBB_SYMBOL( ?try_acquire@scoped_lock@queuing_rw_mutex@tbb@@QAE_NAAV23@_N@Z ) // reader_writer_lock.cpp __TBB_SYMBOL( ?try_lock_read@reader_writer_lock@interface5@tbb@@QAE_NXZ ) __TBB_SYMBOL( ?try_lock@reader_writer_lock@interface5@tbb@@QAE_NXZ ) __TBB_SYMBOL( ?unlock@reader_writer_lock@interface5@tbb@@QAEXXZ ) __TBB_SYMBOL( ?lock_read@reader_writer_lock@interface5@tbb@@QAEXXZ ) __TBB_SYMBOL( ?lock@reader_writer_lock@interface5@tbb@@QAEXXZ ) __TBB_SYMBOL( ?internal_construct@reader_writer_lock@interface5@tbb@@AAEXXZ ) __TBB_SYMBOL( ?internal_destroy@reader_writer_lock@interface5@tbb@@AAEXXZ ) __TBB_SYMBOL( ?internal_construct@scoped_lock@reader_writer_lock@interface5@tbb@@AAEXAAV234@@Z ) __TBB_SYMBOL( ?internal_destroy@scoped_lock@reader_writer_lock@interface5@tbb@@AAEXXZ ) __TBB_SYMBOL( ?internal_construct@scoped_lock_read@reader_writer_lock@interface5@tbb@@AAEXAAV234@@Z ) __TBB_SYMBOL( ?internal_destroy@scoped_lock_read@reader_writer_lock@interface5@tbb@@AAEXXZ ) #if !TBB_NO_LEGACY // spin_rw_mutex.cpp v2 __TBB_SYMBOL( ?internal_acquire_reader@spin_rw_mutex@tbb@@CAXPAV12@@Z ) __TBB_SYMBOL( ?internal_acquire_writer@spin_rw_mutex@tbb@@CA_NPAV12@@Z ) __TBB_SYMBOL( ?internal_downgrade@spin_rw_mutex@tbb@@CAXPAV12@@Z ) __TBB_SYMBOL( ?internal_itt_releasing@spin_rw_mutex@tbb@@CAXPAV12@@Z ) __TBB_SYMBOL( ?internal_release_reader@spin_rw_mutex@tbb@@CAXPAV12@@Z ) __TBB_SYMBOL( ?internal_release_writer@spin_rw_mutex@tbb@@CAXPAV12@@Z ) __TBB_SYMBOL( ?internal_upgrade@spin_rw_mutex@tbb@@CA_NPAV12@@Z ) __TBB_SYMBOL( ?internal_try_acquire_writer@spin_rw_mutex@tbb@@CA_NPAV12@@Z ) __TBB_SYMBOL( ?internal_try_acquire_reader@spin_rw_mutex@tbb@@CA_NPAV12@@Z ) #endif // spin_rw_mutex v3 __TBB_SYMBOL( ?internal_construct@spin_rw_mutex_v3@tbb@@AAEXXZ ) __TBB_SYMBOL( ?internal_upgrade@spin_rw_mutex_v3@tbb@@AAE_NXZ ) __TBB_SYMBOL( ?internal_downgrade@spin_rw_mutex_v3@tbb@@AAEXXZ ) __TBB_SYMBOL( ?internal_acquire_reader@spin_rw_mutex_v3@tbb@@AAEXXZ ) __TBB_SYMBOL( ?internal_acquire_writer@spin_rw_mutex_v3@tbb@@AAE_NXZ ) __TBB_SYMBOL( ?internal_release_reader@spin_rw_mutex_v3@tbb@@AAEXXZ ) __TBB_SYMBOL( ?internal_release_writer@spin_rw_mutex_v3@tbb@@AAEXXZ ) __TBB_SYMBOL( ?internal_try_acquire_reader@spin_rw_mutex_v3@tbb@@AAE_NXZ ) __TBB_SYMBOL( ?internal_try_acquire_writer@spin_rw_mutex_v3@tbb@@AAE_NXZ ) // x86_rtm_rw_mutex.cpp __TBB_SYMBOL( ?internal_construct@x86_rtm_rw_mutex@internal@interface8@tbb@@AAEXXZ ) __TBB_SYMBOL( ?internal_release@x86_rtm_rw_mutex@internal@interface8@tbb@@AAEXAAVscoped_lock@1234@@Z ) __TBB_SYMBOL( ?internal_acquire_writer@x86_rtm_rw_mutex@internal@interface8@tbb@@AAEXAAVscoped_lock@1234@_N@Z ) __TBB_SYMBOL( ?internal_acquire_reader@x86_rtm_rw_mutex@internal@interface8@tbb@@AAEXAAVscoped_lock@1234@_N@Z ) __TBB_SYMBOL( ?internal_upgrade@x86_rtm_rw_mutex@internal@interface8@tbb@@AAE_NAAVscoped_lock@1234@@Z ) __TBB_SYMBOL( ?internal_downgrade@x86_rtm_rw_mutex@internal@interface8@tbb@@AAE_NAAVscoped_lock@1234@@Z ) __TBB_SYMBOL( ?internal_try_acquire_writer@x86_rtm_rw_mutex@internal@interface8@tbb@@AAE_NAAVscoped_lock@1234@@Z ) // spin_mutex.cpp __TBB_SYMBOL( ?internal_construct@spin_mutex@tbb@@QAEXXZ ) __TBB_SYMBOL( ?internal_acquire@scoped_lock@spin_mutex@tbb@@AAEXAAV23@@Z ) __TBB_SYMBOL( ?internal_release@scoped_lock@spin_mutex@tbb@@AAEXXZ ) __TBB_SYMBOL( ?internal_try_acquire@scoped_lock@spin_mutex@tbb@@AAE_NAAV23@@Z ) // mutex.cpp __TBB_SYMBOL( ?internal_acquire@scoped_lock@mutex@tbb@@AAEXAAV23@@Z ) __TBB_SYMBOL( ?internal_release@scoped_lock@mutex@tbb@@AAEXXZ ) __TBB_SYMBOL( ?internal_try_acquire@scoped_lock@mutex@tbb@@AAE_NAAV23@@Z ) __TBB_SYMBOL( ?internal_construct@mutex@tbb@@AAEXXZ ) __TBB_SYMBOL( ?internal_destroy@mutex@tbb@@AAEXXZ ) // recursive_mutex.cpp __TBB_SYMBOL( ?internal_acquire@scoped_lock@recursive_mutex@tbb@@AAEXAAV23@@Z ) __TBB_SYMBOL( ?internal_release@scoped_lock@recursive_mutex@tbb@@AAEXXZ ) __TBB_SYMBOL( ?internal_try_acquire@scoped_lock@recursive_mutex@tbb@@AAE_NAAV23@@Z ) __TBB_SYMBOL( ?internal_construct@recursive_mutex@tbb@@AAEXXZ ) __TBB_SYMBOL( ?internal_destroy@recursive_mutex@tbb@@AAEXXZ ) // queuing_mutex.cpp __TBB_SYMBOL( ?internal_construct@queuing_mutex@tbb@@QAEXXZ ) __TBB_SYMBOL( ?acquire@scoped_lock@queuing_mutex@tbb@@QAEXAAV23@@Z ) __TBB_SYMBOL( ?release@scoped_lock@queuing_mutex@tbb@@QAEXXZ ) __TBB_SYMBOL( ?try_acquire@scoped_lock@queuing_mutex@tbb@@QAE_NAAV23@@Z ) // critical_section.cpp __TBB_SYMBOL( ?internal_construct@critical_section_v4@internal@tbb@@QAEXXZ ) #if !TBB_NO_LEGACY // concurrent_hash_map.cpp __TBB_SYMBOL( ?internal_grow_predicate@hash_map_segment_base@internal@tbb@@QBE_NXZ ) // concurrent_queue.cpp v2 __TBB_SYMBOL( ?advance@concurrent_queue_iterator_base@internal@tbb@@IAEXXZ ) __TBB_SYMBOL( ?assign@concurrent_queue_iterator_base@internal@tbb@@IAEXABV123@@Z ) __TBB_SYMBOL( ?internal_size@concurrent_queue_base@internal@tbb@@IBEHXZ ) __TBB_SYMBOL( ??0concurrent_queue_base@internal@tbb@@IAE@I@Z ) __TBB_SYMBOL( ??0concurrent_queue_iterator_base@internal@tbb@@IAE@ABVconcurrent_queue_base@12@@Z ) __TBB_SYMBOL( ??1concurrent_queue_base@internal@tbb@@MAE@XZ ) __TBB_SYMBOL( ??1concurrent_queue_iterator_base@internal@tbb@@IAE@XZ ) __TBB_SYMBOL( ?internal_pop@concurrent_queue_base@internal@tbb@@IAEXPAX@Z ) __TBB_SYMBOL( ?internal_pop_if_present@concurrent_queue_base@internal@tbb@@IAE_NPAX@Z ) __TBB_SYMBOL( ?internal_push@concurrent_queue_base@internal@tbb@@IAEXPBX@Z ) __TBB_SYMBOL( ?internal_push_if_not_full@concurrent_queue_base@internal@tbb@@IAE_NPBX@Z ) __TBB_SYMBOL( ?internal_set_capacity@concurrent_queue_base@internal@tbb@@IAEXHI@Z ) #endif // concurrent_queue v3 __TBB_SYMBOL( ??1concurrent_queue_iterator_base_v3@internal@tbb@@IAE@XZ ) __TBB_SYMBOL( ??0concurrent_queue_iterator_base_v3@internal@tbb@@IAE@ABVconcurrent_queue_base_v3@12@@Z ) __TBB_SYMBOL( ??0concurrent_queue_iterator_base_v3@internal@tbb@@IAE@ABVconcurrent_queue_base_v3@12@I@Z ) __TBB_SYMBOL( ?advance@concurrent_queue_iterator_base_v3@internal@tbb@@IAEXXZ ) __TBB_SYMBOL( ?assign@concurrent_queue_iterator_base_v3@internal@tbb@@IAEXABV123@@Z ) __TBB_SYMBOL( ??0concurrent_queue_base_v3@internal@tbb@@IAE@I@Z ) __TBB_SYMBOL( ??1concurrent_queue_base_v3@internal@tbb@@MAE@XZ ) __TBB_SYMBOL( ?internal_pop@concurrent_queue_base_v3@internal@tbb@@IAEXPAX@Z ) __TBB_SYMBOL( ?internal_pop_if_present@concurrent_queue_base_v3@internal@tbb@@IAE_NPAX@Z ) __TBB_SYMBOL( ?internal_abort@concurrent_queue_base_v3@internal@tbb@@IAEXXZ ) __TBB_SYMBOL( ?internal_push@concurrent_queue_base_v3@internal@tbb@@IAEXPBX@Z ) __TBB_SYMBOL( ?internal_push_move@concurrent_queue_base_v8@internal@tbb@@IAEXPBX@Z ) __TBB_SYMBOL( ?internal_push_if_not_full@concurrent_queue_base_v3@internal@tbb@@IAE_NPBX@Z ) __TBB_SYMBOL( ?internal_push_move_if_not_full@concurrent_queue_base_v8@internal@tbb@@IAE_NPBX@Z ) __TBB_SYMBOL( ?internal_size@concurrent_queue_base_v3@internal@tbb@@IBEHXZ ) __TBB_SYMBOL( ?internal_empty@concurrent_queue_base_v3@internal@tbb@@IBE_NXZ ) __TBB_SYMBOL( ?internal_set_capacity@concurrent_queue_base_v3@internal@tbb@@IAEXHI@Z ) __TBB_SYMBOL( ?internal_finish_clear@concurrent_queue_base_v3@internal@tbb@@IAEXXZ ) __TBB_SYMBOL( ?internal_throw_exception@concurrent_queue_base_v3@internal@tbb@@IBEXXZ ) __TBB_SYMBOL( ?assign@concurrent_queue_base_v3@internal@tbb@@IAEXABV123@@Z ) __TBB_SYMBOL( ?move_content@concurrent_queue_base_v8@internal@tbb@@IAEXAAV123@@Z ) #if !TBB_NO_LEGACY // concurrent_vector.cpp v2 __TBB_SYMBOL( ?internal_assign@concurrent_vector_base@internal@tbb@@IAEXABV123@IP6AXPAXI@ZP6AX1PBXI@Z4@Z ) __TBB_SYMBOL( ?internal_capacity@concurrent_vector_base@internal@tbb@@IBEIXZ ) __TBB_SYMBOL( ?internal_clear@concurrent_vector_base@internal@tbb@@IAEXP6AXPAXI@Z_N@Z ) __TBB_SYMBOL( ?internal_copy@concurrent_vector_base@internal@tbb@@IAEXABV123@IP6AXPAXPBXI@Z@Z ) __TBB_SYMBOL( ?internal_grow_by@concurrent_vector_base@internal@tbb@@IAEIIIP6AXPAXI@Z@Z ) __TBB_SYMBOL( ?internal_grow_to_at_least@concurrent_vector_base@internal@tbb@@IAEXIIP6AXPAXI@Z@Z ) __TBB_SYMBOL( ?internal_push_back@concurrent_vector_base@internal@tbb@@IAEPAXIAAI@Z ) __TBB_SYMBOL( ?internal_reserve@concurrent_vector_base@internal@tbb@@IAEXIII@Z ) #endif // concurrent_vector v3 __TBB_SYMBOL( ??1concurrent_vector_base_v3@internal@tbb@@IAE@XZ ) __TBB_SYMBOL( ?internal_assign@concurrent_vector_base_v3@internal@tbb@@IAEXABV123@IP6AXPAXI@ZP6AX1PBXI@Z4@Z ) __TBB_SYMBOL( ?internal_capacity@concurrent_vector_base_v3@internal@tbb@@IBEIXZ ) __TBB_SYMBOL( ?internal_clear@concurrent_vector_base_v3@internal@tbb@@IAEIP6AXPAXI@Z@Z ) __TBB_SYMBOL( ?internal_copy@concurrent_vector_base_v3@internal@tbb@@IAEXABV123@IP6AXPAXPBXI@Z@Z ) __TBB_SYMBOL( ?internal_grow_by@concurrent_vector_base_v3@internal@tbb@@IAEIIIP6AXPAXPBXI@Z1@Z ) __TBB_SYMBOL( ?internal_grow_to_at_least@concurrent_vector_base_v3@internal@tbb@@IAEXIIP6AXPAXPBXI@Z1@Z ) __TBB_SYMBOL( ?internal_push_back@concurrent_vector_base_v3@internal@tbb@@IAEPAXIAAI@Z ) __TBB_SYMBOL( ?internal_reserve@concurrent_vector_base_v3@internal@tbb@@IAEXIII@Z ) __TBB_SYMBOL( ?internal_compact@concurrent_vector_base_v3@internal@tbb@@IAEPAXIPAXP6AX0I@ZP6AX0PBXI@Z@Z ) __TBB_SYMBOL( ?internal_swap@concurrent_vector_base_v3@internal@tbb@@IAEXAAV123@@Z ) __TBB_SYMBOL( ?internal_throw_exception@concurrent_vector_base_v3@internal@tbb@@IBEXI@Z ) __TBB_SYMBOL( ?internal_resize@concurrent_vector_base_v3@internal@tbb@@IAEXIIIPBXP6AXPAXI@ZP6AX10I@Z@Z ) __TBB_SYMBOL( ?internal_grow_to_at_least_with_result@concurrent_vector_base_v3@internal@tbb@@IAEIIIP6AXPAXPBXI@Z1@Z ) // tbb_thread __TBB_SYMBOL( ?join@tbb_thread_v3@internal@tbb@@QAEXXZ ) __TBB_SYMBOL( ?detach@tbb_thread_v3@internal@tbb@@QAEXXZ ) __TBB_SYMBOL( ?internal_start@tbb_thread_v3@internal@tbb@@AAEXP6GIPAX@Z0@Z ) __TBB_SYMBOL( ?allocate_closure_v3@internal@tbb@@YAPAXI@Z ) __TBB_SYMBOL( ?free_closure_v3@internal@tbb@@YAXPAX@Z ) __TBB_SYMBOL( ?hardware_concurrency@tbb_thread_v3@internal@tbb@@SAIXZ ) __TBB_SYMBOL( ?thread_yield_v3@internal@tbb@@YAXXZ ) __TBB_SYMBOL( ?thread_sleep_v3@internal@tbb@@YAXABVinterval_t@tick_count@2@@Z ) __TBB_SYMBOL( ?move_v3@internal@tbb@@YAXAAVtbb_thread_v3@12@0@Z ) __TBB_SYMBOL( ?thread_get_id_v3@internal@tbb@@YA?AVid@tbb_thread_v3@12@XZ ) // condition_variable __TBB_SYMBOL( ?internal_initialize_condition_variable@internal@interface5@tbb@@YAXAATcondvar_impl_t@123@@Z ) __TBB_SYMBOL( ?internal_condition_variable_wait@internal@interface5@tbb@@YA_NAATcondvar_impl_t@123@PAVmutex@3@PBVinterval_t@tick_count@3@@Z ) __TBB_SYMBOL( ?internal_condition_variable_notify_one@internal@interface5@tbb@@YAXAATcondvar_impl_t@123@@Z ) __TBB_SYMBOL( ?internal_condition_variable_notify_all@internal@interface5@tbb@@YAXAATcondvar_impl_t@123@@Z ) __TBB_SYMBOL( ?internal_destroy_condition_variable@internal@interface5@tbb@@YAXAATcondvar_impl_t@123@@Z ) #undef __TBB_SYMBOL ================================================ FILE: benchmarks/tbb/win64-gcc-tbb-export.def ================================================ /* Copyright 2005-2014 Intel Corporation. All Rights Reserved. This file is part of Threading Building Blocks. Threading Building Blocks is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. Threading Building Blocks is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Threading Building Blocks; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA As a special exception, you may use this file as part of a free software library without restriction. Specifically, if other files instantiate templates or use macros or inline functions from this file, or you compile this file and link it with other files to produce an executable, this file does not by itself cause the resulting executable to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the executable file might be covered by the GNU General Public License. */ { global: #define __TBB_SYMBOL( sym ) sym; #include "win64-gcc-tbb-export.lst" local: /* TBB symbols */ *3tbb*; *__TBB*; /* Intel Compiler (libirc) symbols */ __intel_*; _intel_*; get_msg_buf; get_text_buf; message_catalog; print_buf; irc__get_msg; irc__print; }; ================================================ FILE: benchmarks/tbb/win64-gcc-tbb-export.lst ================================================ /* Copyright 2005-2014 Intel Corporation. All Rights Reserved. This file is part of Threading Building Blocks. Threading Building Blocks is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. Threading Building Blocks is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Threading Building Blocks; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA As a special exception, you may use this file as part of a free software library without restriction. Specifically, if other files instantiate templates or use macros or inline functions from this file, or you compile this file and link it with other files to produce an executable, this file does not by itself cause the resulting executable to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the executable file might be covered by the GNU General Public License. */ #include "tbb/tbb_config.h" /* cache_aligned_allocator.cpp */ __TBB_SYMBOL( _ZN3tbb8internal12NFS_AllocateEyyPv ) // MODIFIED LINUX ENTRY __TBB_SYMBOL( _ZN3tbb8internal15NFS_GetLineSizeEv ) __TBB_SYMBOL( _ZN3tbb8internal8NFS_FreeEPv ) __TBB_SYMBOL( _ZN3tbb8internal23allocate_via_handler_v3Ey ) // MODIFIED LINUX ENTRY __TBB_SYMBOL( _ZN3tbb8internal25deallocate_via_handler_v3EPv ) __TBB_SYMBOL( _ZN3tbb8internal17is_malloc_used_v3Ev ) /* task.cpp v3 */ __TBB_SYMBOL( _ZN3tbb4task13note_affinityEt ) __TBB_SYMBOL( _ZN3tbb4task22internal_set_ref_countEi ) __TBB_SYMBOL( _ZN3tbb4task28internal_decrement_ref_countEv ) __TBB_SYMBOL( _ZN3tbb4task22spawn_and_wait_for_allERNS_9task_listE ) __TBB_SYMBOL( _ZN3tbb4task4selfEv ) __TBB_SYMBOL( _ZN3tbb10interface58internal9task_base7destroyERNS_4taskE ) __TBB_SYMBOL( _ZNK3tbb4task26is_owned_by_current_threadEv ) __TBB_SYMBOL( _ZN3tbb8internal19allocate_root_proxy4freeERNS_4taskE ) __TBB_SYMBOL( _ZN3tbb8internal19allocate_root_proxy8allocateEy ) // MODIFIED LINUX ENTRY __TBB_SYMBOL( _ZN3tbb8internal28affinity_partitioner_base_v36resizeEj ) __TBB_SYMBOL( _ZNK3tbb8internal20allocate_child_proxy4freeERNS_4taskE ) __TBB_SYMBOL( _ZNK3tbb8internal20allocate_child_proxy8allocateEy ) // MODIFIED LINUX ENTRY __TBB_SYMBOL( _ZNK3tbb8internal27allocate_continuation_proxy4freeERNS_4taskE ) __TBB_SYMBOL( _ZNK3tbb8internal27allocate_continuation_proxy8allocateEy ) // MODIFIED LINUX ENTRY __TBB_SYMBOL( _ZNK3tbb8internal34allocate_additional_child_of_proxy4freeERNS_4taskE ) __TBB_SYMBOL( _ZNK3tbb8internal34allocate_additional_child_of_proxy8allocateEy ) // MODIFIED LINUX ENTRY __TBB_SYMBOL( _ZTIN3tbb4taskE ) __TBB_SYMBOL( _ZTSN3tbb4taskE ) __TBB_SYMBOL( _ZTVN3tbb4taskE ) __TBB_SYMBOL( _ZN3tbb19task_scheduler_init19default_num_threadsEv ) __TBB_SYMBOL( _ZN3tbb19task_scheduler_init10initializeEiy ) // MODIFIED LINUX ENTRY __TBB_SYMBOL( _ZN3tbb19task_scheduler_init10initializeEi ) __TBB_SYMBOL( _ZN3tbb19task_scheduler_init9terminateEv ) #if __TBB_SCHEDULER_OBSERVER __TBB_SYMBOL( _ZN3tbb8internal26task_scheduler_observer_v37observeEb ) #endif /* __TBB_SCHEDULER_OBSERVER */ __TBB_SYMBOL( _ZN3tbb10empty_task7executeEv ) __TBB_SYMBOL( _ZN3tbb10empty_taskD0Ev ) __TBB_SYMBOL( _ZN3tbb10empty_taskD1Ev ) __TBB_SYMBOL( _ZTIN3tbb10empty_taskE ) __TBB_SYMBOL( _ZTSN3tbb10empty_taskE ) __TBB_SYMBOL( _ZTVN3tbb10empty_taskE ) #if __TBB_TASK_ARENA /* arena.cpp */ __TBB_SYMBOL( _ZN3tbb10interface78internal15task_arena_base19internal_initializeEv ) __TBB_SYMBOL( _ZN3tbb10interface78internal15task_arena_base18internal_terminateEv ) __TBB_SYMBOL( _ZNK3tbb10interface78internal15task_arena_base16internal_enqueueERNS_4taskEx ) __TBB_SYMBOL( _ZNK3tbb10interface78internal15task_arena_base16internal_executeERNS1_13delegate_baseE ) __TBB_SYMBOL( _ZNK3tbb10interface78internal15task_arena_base13internal_waitEv ) __TBB_SYMBOL( _ZN3tbb10interface78internal15task_arena_base21internal_current_slotEv ) #endif /* __TBB_TASK_ARENA */ #if !TBB_NO_LEGACY /* task_v2.cpp */ __TBB_SYMBOL( _ZN3tbb4task7destroyERS0_ ) #endif /* !TBB_NO_LEGACY */ /* Exception handling in task scheduler */ #if __TBB_TASK_GROUP_CONTEXT __TBB_SYMBOL( _ZNK3tbb8internal32allocate_root_with_context_proxy8allocateEy ) // MODIFIED LINUX ENTRY __TBB_SYMBOL( _ZNK3tbb8internal32allocate_root_with_context_proxy4freeERNS_4taskE ) __TBB_SYMBOL( _ZN3tbb4task12change_groupERNS_18task_group_contextE ) __TBB_SYMBOL( _ZNK3tbb18task_group_context28is_group_execution_cancelledEv ) __TBB_SYMBOL( _ZN3tbb18task_group_context22cancel_group_executionEv ) __TBB_SYMBOL( _ZN3tbb18task_group_context26register_pending_exceptionEv ) __TBB_SYMBOL( _ZN3tbb18task_group_context5resetEv ) __TBB_SYMBOL( _ZN3tbb18task_group_context19capture_fp_settingsEv ) __TBB_SYMBOL( _ZN3tbb18task_group_context4initEv ) __TBB_SYMBOL( _ZN3tbb18task_group_contextD1Ev ) __TBB_SYMBOL( _ZN3tbb18task_group_contextD2Ev ) #if __TBB_TASK_PRIORITY __TBB_SYMBOL( _ZN3tbb18task_group_context12set_priorityENS_10priority_tE ) __TBB_SYMBOL( _ZNK3tbb18task_group_context8priorityEv ) #endif /* __TBB_TASK_PRIORITY */ __TBB_SYMBOL( _ZNK3tbb18captured_exception4nameEv ) __TBB_SYMBOL( _ZNK3tbb18captured_exception4whatEv ) __TBB_SYMBOL( _ZN3tbb18captured_exception10throw_selfEv ) __TBB_SYMBOL( _ZN3tbb18captured_exception3setEPKcS2_ ) __TBB_SYMBOL( _ZN3tbb18captured_exception4moveEv ) __TBB_SYMBOL( _ZN3tbb18captured_exception5clearEv ) __TBB_SYMBOL( _ZN3tbb18captured_exception7destroyEv ) __TBB_SYMBOL( _ZN3tbb18captured_exception8allocateEPKcS2_ ) __TBB_SYMBOL( _ZN3tbb18captured_exceptionD0Ev ) __TBB_SYMBOL( _ZN3tbb18captured_exceptionD1Ev ) __TBB_SYMBOL( _ZN3tbb18captured_exceptionD2Ev ) __TBB_SYMBOL( _ZTIN3tbb18captured_exceptionE ) __TBB_SYMBOL( _ZTSN3tbb18captured_exceptionE ) __TBB_SYMBOL( _ZTVN3tbb18captured_exceptionE ) __TBB_SYMBOL( _ZN3tbb13tbb_exceptionD2Ev ) __TBB_SYMBOL( _ZTIN3tbb13tbb_exceptionE ) __TBB_SYMBOL( _ZTSN3tbb13tbb_exceptionE ) __TBB_SYMBOL( _ZTVN3tbb13tbb_exceptionE ) #endif /* __TBB_TASK_GROUP_CONTEXT */ /* Symbols for exceptions thrown from TBB */ __TBB_SYMBOL( _ZN3tbb8internal33throw_bad_last_alloc_exception_v4Ev ) __TBB_SYMBOL( _ZN3tbb8internal18throw_exception_v4ENS0_12exception_idE ) __TBB_SYMBOL( _ZN3tbb14bad_last_allocD0Ev ) __TBB_SYMBOL( _ZN3tbb14bad_last_allocD1Ev ) __TBB_SYMBOL( _ZNK3tbb14bad_last_alloc4whatEv ) __TBB_SYMBOL( _ZTIN3tbb14bad_last_allocE ) __TBB_SYMBOL( _ZTSN3tbb14bad_last_allocE ) __TBB_SYMBOL( _ZTVN3tbb14bad_last_allocE ) __TBB_SYMBOL( _ZN3tbb12missing_waitD0Ev ) __TBB_SYMBOL( _ZN3tbb12missing_waitD1Ev ) __TBB_SYMBOL( _ZNK3tbb12missing_wait4whatEv ) __TBB_SYMBOL( _ZTIN3tbb12missing_waitE ) __TBB_SYMBOL( _ZTSN3tbb12missing_waitE ) __TBB_SYMBOL( _ZTVN3tbb12missing_waitE ) __TBB_SYMBOL( _ZN3tbb27invalid_multiple_schedulingD0Ev ) __TBB_SYMBOL( _ZN3tbb27invalid_multiple_schedulingD1Ev ) __TBB_SYMBOL( _ZNK3tbb27invalid_multiple_scheduling4whatEv ) __TBB_SYMBOL( _ZTIN3tbb27invalid_multiple_schedulingE ) __TBB_SYMBOL( _ZTSN3tbb27invalid_multiple_schedulingE ) __TBB_SYMBOL( _ZTVN3tbb27invalid_multiple_schedulingE ) __TBB_SYMBOL( _ZN3tbb13improper_lockD0Ev ) __TBB_SYMBOL( _ZN3tbb13improper_lockD1Ev ) __TBB_SYMBOL( _ZNK3tbb13improper_lock4whatEv ) __TBB_SYMBOL( _ZTIN3tbb13improper_lockE ) __TBB_SYMBOL( _ZTSN3tbb13improper_lockE ) __TBB_SYMBOL( _ZTVN3tbb13improper_lockE ) __TBB_SYMBOL( _ZN3tbb10user_abortD0Ev ) __TBB_SYMBOL( _ZN3tbb10user_abortD1Ev ) __TBB_SYMBOL( _ZNK3tbb10user_abort4whatEv ) __TBB_SYMBOL( _ZTIN3tbb10user_abortE ) __TBB_SYMBOL( _ZTSN3tbb10user_abortE ) __TBB_SYMBOL( _ZTVN3tbb10user_abortE ) /* tbb_misc.cpp */ __TBB_SYMBOL( _ZN3tbb17assertion_failureEPKciS1_S1_ ) __TBB_SYMBOL( _ZN3tbb21set_assertion_handlerEPFvPKciS1_S1_E ) __TBB_SYMBOL( _ZN3tbb8internal36get_initial_auto_partitioner_divisorEv ) __TBB_SYMBOL( _ZN3tbb8internal13handle_perrorEiPKc ) __TBB_SYMBOL( _ZN3tbb8internal15runtime_warningEPKcz ) __TBB_SYMBOL( TBB_runtime_interface_version ) /* tbb_main.cpp */ __TBB_SYMBOL( _ZN3tbb8internal32itt_load_pointer_with_acquire_v3EPKv ) __TBB_SYMBOL( _ZN3tbb8internal33itt_store_pointer_with_release_v3EPvS1_ ) __TBB_SYMBOL( _ZN3tbb8internal18call_itt_notify_v5EiPv ) __TBB_SYMBOL( _ZN3tbb8internal20itt_set_sync_name_v3EPvPKc ) __TBB_SYMBOL( _ZN3tbb8internal19itt_load_pointer_v3EPKv ) /* pipeline.cpp */ __TBB_SYMBOL( _ZTIN3tbb6filterE ) __TBB_SYMBOL( _ZTSN3tbb6filterE ) __TBB_SYMBOL( _ZTVN3tbb6filterE ) __TBB_SYMBOL( _ZN3tbb6filterD2Ev ) __TBB_SYMBOL( _ZN3tbb8pipeline10add_filterERNS_6filterE ) __TBB_SYMBOL( _ZN3tbb8pipeline12inject_tokenERNS_4taskE ) __TBB_SYMBOL( _ZN3tbb8pipeline13remove_filterERNS_6filterE ) __TBB_SYMBOL( _ZN3tbb8pipeline3runEy ) // MODIFIED LINUX ENTRY #if __TBB_TASK_GROUP_CONTEXT __TBB_SYMBOL( _ZN3tbb8pipeline3runEyRNS_18task_group_contextE ) // MODIFIED LINUX ENTRY #endif __TBB_SYMBOL( _ZN3tbb8pipeline5clearEv ) __TBB_SYMBOL( _ZN3tbb19thread_bound_filter12process_itemEv ) __TBB_SYMBOL( _ZN3tbb19thread_bound_filter16try_process_itemEv ) __TBB_SYMBOL( _ZTIN3tbb8pipelineE ) __TBB_SYMBOL( _ZTSN3tbb8pipelineE ) __TBB_SYMBOL( _ZTVN3tbb8pipelineE ) __TBB_SYMBOL( _ZN3tbb8pipelineC1Ev ) __TBB_SYMBOL( _ZN3tbb8pipelineC2Ev ) __TBB_SYMBOL( _ZN3tbb8pipelineD0Ev ) __TBB_SYMBOL( _ZN3tbb8pipelineD1Ev ) __TBB_SYMBOL( _ZN3tbb8pipelineD2Ev ) __TBB_SYMBOL( _ZN3tbb6filter16set_end_of_inputEv ) /* queuing_rw_mutex.cpp */ __TBB_SYMBOL( _ZN3tbb16queuing_rw_mutex18internal_constructEv ) __TBB_SYMBOL( _ZN3tbb16queuing_rw_mutex11scoped_lock17upgrade_to_writerEv ) __TBB_SYMBOL( _ZN3tbb16queuing_rw_mutex11scoped_lock19downgrade_to_readerEv ) __TBB_SYMBOL( _ZN3tbb16queuing_rw_mutex11scoped_lock7acquireERS0_b ) __TBB_SYMBOL( _ZN3tbb16queuing_rw_mutex11scoped_lock7releaseEv ) __TBB_SYMBOL( _ZN3tbb16queuing_rw_mutex11scoped_lock11try_acquireERS0_b ) /* reader_writer_lock.cpp */ __TBB_SYMBOL( _ZN3tbb10interface518reader_writer_lock11scoped_lock16internal_destroyEv ) __TBB_SYMBOL( _ZN3tbb10interface518reader_writer_lock11scoped_lock18internal_constructERS1_ ) __TBB_SYMBOL( _ZN3tbb10interface518reader_writer_lock13try_lock_readEv ) __TBB_SYMBOL( _ZN3tbb10interface518reader_writer_lock16scoped_lock_read16internal_destroyEv ) __TBB_SYMBOL( _ZN3tbb10interface518reader_writer_lock16scoped_lock_read18internal_constructERS1_ ) __TBB_SYMBOL( _ZN3tbb10interface518reader_writer_lock16internal_destroyEv ) __TBB_SYMBOL( _ZN3tbb10interface518reader_writer_lock18internal_constructEv ) __TBB_SYMBOL( _ZN3tbb10interface518reader_writer_lock4lockEv ) __TBB_SYMBOL( _ZN3tbb10interface518reader_writer_lock6unlockEv ) __TBB_SYMBOL( _ZN3tbb10interface518reader_writer_lock8try_lockEv ) __TBB_SYMBOL( _ZN3tbb10interface518reader_writer_lock9lock_readEv ) #if !TBB_NO_LEGACY /* spin_rw_mutex.cpp v2 */ __TBB_SYMBOL( _ZN3tbb13spin_rw_mutex16internal_upgradeEPS0_ ) __TBB_SYMBOL( _ZN3tbb13spin_rw_mutex22internal_itt_releasingEPS0_ ) __TBB_SYMBOL( _ZN3tbb13spin_rw_mutex23internal_acquire_readerEPS0_ ) __TBB_SYMBOL( _ZN3tbb13spin_rw_mutex23internal_acquire_writerEPS0_ ) __TBB_SYMBOL( _ZN3tbb13spin_rw_mutex18internal_downgradeEPS0_ ) __TBB_SYMBOL( _ZN3tbb13spin_rw_mutex23internal_release_readerEPS0_ ) __TBB_SYMBOL( _ZN3tbb13spin_rw_mutex23internal_release_writerEPS0_ ) __TBB_SYMBOL( _ZN3tbb13spin_rw_mutex27internal_try_acquire_readerEPS0_ ) __TBB_SYMBOL( _ZN3tbb13spin_rw_mutex27internal_try_acquire_writerEPS0_ ) #endif // x86_rtm_rw_mutex.cpp __TBB_SYMBOL( _ZN3tbb10interface88internal16x86_rtm_rw_mutex18internal_constructEv ) __TBB_SYMBOL( _ZN3tbb10interface88internal16x86_rtm_rw_mutex23internal_acquire_writerERNS2_11scoped_lockEb ) __TBB_SYMBOL( _ZN3tbb10interface88internal16x86_rtm_rw_mutex27internal_try_acquire_writerERNS2_11scoped_lockE ) __TBB_SYMBOL( _ZN3tbb10interface88internal16x86_rtm_rw_mutex23internal_acquire_readerERNS2_11scoped_lockEb ) __TBB_SYMBOL( _ZN3tbb10interface88internal16x86_rtm_rw_mutex16internal_releaseERNS2_11scoped_lockE ) __TBB_SYMBOL( _ZN3tbb10interface88internal16x86_rtm_rw_mutex16internal_upgradeERNS2_11scoped_lockE ) __TBB_SYMBOL( _ZN3tbb10interface88internal16x86_rtm_rw_mutex18internal_downgradeERNS2_11scoped_lockE ) /* spin_rw_mutex v3 */ __TBB_SYMBOL( _ZN3tbb16spin_rw_mutex_v318internal_constructEv ) __TBB_SYMBOL( _ZN3tbb16spin_rw_mutex_v316internal_upgradeEv ) __TBB_SYMBOL( _ZN3tbb16spin_rw_mutex_v318internal_downgradeEv ) __TBB_SYMBOL( _ZN3tbb16spin_rw_mutex_v323internal_acquire_readerEv ) __TBB_SYMBOL( _ZN3tbb16spin_rw_mutex_v323internal_acquire_writerEv ) __TBB_SYMBOL( _ZN3tbb16spin_rw_mutex_v323internal_release_readerEv ) __TBB_SYMBOL( _ZN3tbb16spin_rw_mutex_v323internal_release_writerEv ) __TBB_SYMBOL( _ZN3tbb16spin_rw_mutex_v327internal_try_acquire_readerEv ) __TBB_SYMBOL( _ZN3tbb16spin_rw_mutex_v327internal_try_acquire_writerEv ) /* spin_mutex.cpp */ __TBB_SYMBOL( _ZN3tbb10spin_mutex11scoped_lock16internal_acquireERS0_ ) __TBB_SYMBOL( _ZN3tbb10spin_mutex11scoped_lock16internal_releaseEv ) __TBB_SYMBOL( _ZN3tbb10spin_mutex11scoped_lock20internal_try_acquireERS0_ ) __TBB_SYMBOL( _ZN3tbb10spin_mutex18internal_constructEv ) /* mutex.cpp */ __TBB_SYMBOL( _ZN3tbb5mutex11scoped_lock16internal_acquireERS0_ ) __TBB_SYMBOL( _ZN3tbb5mutex11scoped_lock16internal_releaseEv ) __TBB_SYMBOL( _ZN3tbb5mutex11scoped_lock20internal_try_acquireERS0_ ) __TBB_SYMBOL( _ZN3tbb5mutex16internal_destroyEv ) __TBB_SYMBOL( _ZN3tbb5mutex18internal_constructEv ) /* recursive_mutex.cpp */ __TBB_SYMBOL( _ZN3tbb15recursive_mutex11scoped_lock16internal_acquireERS0_ ) __TBB_SYMBOL( _ZN3tbb15recursive_mutex11scoped_lock16internal_releaseEv ) __TBB_SYMBOL( _ZN3tbb15recursive_mutex11scoped_lock20internal_try_acquireERS0_ ) __TBB_SYMBOL( _ZN3tbb15recursive_mutex16internal_destroyEv ) __TBB_SYMBOL( _ZN3tbb15recursive_mutex18internal_constructEv ) /* QueuingMutex.cpp */ __TBB_SYMBOL( _ZN3tbb13queuing_mutex18internal_constructEv ) __TBB_SYMBOL( _ZN3tbb13queuing_mutex11scoped_lock7acquireERS0_ ) __TBB_SYMBOL( _ZN3tbb13queuing_mutex11scoped_lock7releaseEv ) __TBB_SYMBOL( _ZN3tbb13queuing_mutex11scoped_lock11try_acquireERS0_ ) /* critical_section.cpp */ __TBB_SYMBOL( _ZN3tbb8internal19critical_section_v418internal_constructEv ) #if !TBB_NO_LEGACY /* concurrent_hash_map */ __TBB_SYMBOL( _ZNK3tbb8internal21hash_map_segment_base23internal_grow_predicateEv ) /* concurrent_queue.cpp v2 */ __TBB_SYMBOL( _ZN3tbb8internal21concurrent_queue_base12internal_popEPv ) __TBB_SYMBOL( _ZN3tbb8internal21concurrent_queue_base13internal_pushEPKv ) __TBB_SYMBOL( _ZN3tbb8internal21concurrent_queue_base21internal_set_capacityExy ) // MODIFIED LINUX ENTRY __TBB_SYMBOL( _ZN3tbb8internal21concurrent_queue_base23internal_pop_if_presentEPv ) __TBB_SYMBOL( _ZN3tbb8internal21concurrent_queue_base25internal_push_if_not_fullEPKv ) __TBB_SYMBOL( _ZN3tbb8internal21concurrent_queue_baseC2Ey ) // MODIFIED LINUX ENTRY __TBB_SYMBOL( _ZN3tbb8internal21concurrent_queue_baseD2Ev ) __TBB_SYMBOL( _ZTIN3tbb8internal21concurrent_queue_baseE ) __TBB_SYMBOL( _ZTSN3tbb8internal21concurrent_queue_baseE ) __TBB_SYMBOL( _ZTVN3tbb8internal21concurrent_queue_baseE ) __TBB_SYMBOL( _ZN3tbb8internal30concurrent_queue_iterator_base6assignERKS1_ ) __TBB_SYMBOL( _ZN3tbb8internal30concurrent_queue_iterator_base7advanceEv ) __TBB_SYMBOL( _ZN3tbb8internal30concurrent_queue_iterator_baseC2ERKNS0_21concurrent_queue_baseE ) __TBB_SYMBOL( _ZN3tbb8internal30concurrent_queue_iterator_baseD2Ev ) __TBB_SYMBOL( _ZNK3tbb8internal21concurrent_queue_base13internal_sizeEv ) #endif /* concurrent_queue v3 */ /* constructors */ __TBB_SYMBOL( _ZN3tbb8internal24concurrent_queue_base_v3C2Ey ) // MODIFIED LINUX ENTRY __TBB_SYMBOL( _ZN3tbb8internal33concurrent_queue_iterator_base_v3C2ERKNS0_24concurrent_queue_base_v3E ) __TBB_SYMBOL( _ZN3tbb8internal33concurrent_queue_iterator_base_v3C2ERKNS0_24concurrent_queue_base_v3Ey ) // MODIFIED LINUX ENTRY /* destructors */ __TBB_SYMBOL( _ZN3tbb8internal24concurrent_queue_base_v3D2Ev ) __TBB_SYMBOL( _ZN3tbb8internal33concurrent_queue_iterator_base_v3D2Ev ) /* typeinfo */ __TBB_SYMBOL( _ZTIN3tbb8internal24concurrent_queue_base_v3E ) __TBB_SYMBOL( _ZTSN3tbb8internal24concurrent_queue_base_v3E ) /* vtable */ __TBB_SYMBOL( _ZTVN3tbb8internal24concurrent_queue_base_v3E ) /* methods */ __TBB_SYMBOL( _ZN3tbb8internal33concurrent_queue_iterator_base_v36assignERKS1_ ) __TBB_SYMBOL( _ZN3tbb8internal33concurrent_queue_iterator_base_v37advanceEv ) __TBB_SYMBOL( _ZN3tbb8internal24concurrent_queue_base_v313internal_pushEPKv ) __TBB_SYMBOL( _ZN3tbb8internal24concurrent_queue_base_v818internal_push_moveEPKv ) __TBB_SYMBOL( _ZN3tbb8internal24concurrent_queue_base_v325internal_push_if_not_fullEPKv ) __TBB_SYMBOL( _ZN3tbb8internal24concurrent_queue_base_v830internal_push_move_if_not_fullEPKv ) __TBB_SYMBOL( _ZN3tbb8internal24concurrent_queue_base_v312internal_popEPv ) __TBB_SYMBOL( _ZN3tbb8internal24concurrent_queue_base_v323internal_pop_if_presentEPv ) __TBB_SYMBOL( _ZN3tbb8internal24concurrent_queue_base_v314internal_abortEv ) __TBB_SYMBOL( _ZN3tbb8internal24concurrent_queue_base_v321internal_finish_clearEv ) __TBB_SYMBOL( _ZN3tbb8internal24concurrent_queue_base_v321internal_set_capacityExy ) // MODIFIED LINUX ENTRY __TBB_SYMBOL( _ZNK3tbb8internal24concurrent_queue_base_v313internal_sizeEv ) __TBB_SYMBOL( _ZNK3tbb8internal24concurrent_queue_base_v314internal_emptyEv ) __TBB_SYMBOL( _ZNK3tbb8internal24concurrent_queue_base_v324internal_throw_exceptionEv ) __TBB_SYMBOL( _ZN3tbb8internal24concurrent_queue_base_v36assignERKS1_ ) __TBB_SYMBOL( _ZN3tbb8internal24concurrent_queue_base_v812move_contentERS1_ ) #if !TBB_NO_LEGACY /* concurrent_vector.cpp v2 */ __TBB_SYMBOL( _ZN3tbb8internal22concurrent_vector_base13internal_copyERKS1_yPFvPvPKvyE ) // MODIFIED LINUX ENTRY __TBB_SYMBOL( _ZN3tbb8internal22concurrent_vector_base14internal_clearEPFvPvyEb ) // MODIFIED LINUX ENTRY __TBB_SYMBOL( _ZN3tbb8internal22concurrent_vector_base15internal_assignERKS1_yPFvPvyEPFvS4_PKvyESA_ ) // MODIFIED LINUX ENTRY __TBB_SYMBOL( _ZN3tbb8internal22concurrent_vector_base16internal_grow_byEyyPFvPvyE ) // MODIFIED LINUX ENTRY __TBB_SYMBOL( _ZN3tbb8internal22concurrent_vector_base16internal_reserveEyyy ) // MODIFIED LINUX ENTRY __TBB_SYMBOL( _ZN3tbb8internal22concurrent_vector_base18internal_push_backEyRy ) // MODIFIED LINUX ENTRY __TBB_SYMBOL( _ZN3tbb8internal22concurrent_vector_base25internal_grow_to_at_leastEyyPFvPvyE ) // MODIFIED LINUX ENTRY __TBB_SYMBOL( _ZNK3tbb8internal22concurrent_vector_base17internal_capacityEv ) #endif /* concurrent_vector v3 */ __TBB_SYMBOL( _ZN3tbb8internal25concurrent_vector_base_v313internal_copyERKS1_yPFvPvPKvyE ) // MODIFIED LINUX ENTRY __TBB_SYMBOL( _ZN3tbb8internal25concurrent_vector_base_v314internal_clearEPFvPvyE ) // MODIFIED LINUX ENTRY __TBB_SYMBOL( _ZN3tbb8internal25concurrent_vector_base_v315internal_assignERKS1_yPFvPvyEPFvS4_PKvyESA_ ) // MODIFIED LINUX ENTRY __TBB_SYMBOL( _ZN3tbb8internal25concurrent_vector_base_v316internal_grow_byEyyPFvPvPKvyES4_ ) // MODIFIED LINUX ENTRY __TBB_SYMBOL( _ZN3tbb8internal25concurrent_vector_base_v316internal_reserveEyyy ) // MODIFIED LINUX ENTRY __TBB_SYMBOL( _ZN3tbb8internal25concurrent_vector_base_v318internal_push_backEyRy ) // MODIFIED LINUX ENTRY __TBB_SYMBOL( _ZN3tbb8internal25concurrent_vector_base_v325internal_grow_to_at_leastEyyPFvPvPKvyES4_ ) // MODIFIED LINUX ENTRY __TBB_SYMBOL( _ZNK3tbb8internal25concurrent_vector_base_v317internal_capacityEv ) __TBB_SYMBOL( _ZN3tbb8internal25concurrent_vector_base_v316internal_compactEyPvPFvS2_yEPFvS2_PKvyE ) // MODIFIED LINUX ENTRY __TBB_SYMBOL( _ZN3tbb8internal25concurrent_vector_base_v313internal_swapERS1_ ) __TBB_SYMBOL( _ZNK3tbb8internal25concurrent_vector_base_v324internal_throw_exceptionEy ) // MODIFIED LINUX ENTRY __TBB_SYMBOL( _ZN3tbb8internal25concurrent_vector_base_v3D2Ev ) __TBB_SYMBOL( _ZN3tbb8internal25concurrent_vector_base_v315internal_resizeEyyyPKvPFvPvyEPFvS4_S3_yE ) // MODIFIED LINUX ENTRY __TBB_SYMBOL( _ZN3tbb8internal25concurrent_vector_base_v337internal_grow_to_at_least_with_resultEyyPFvPvPKvyES4_ ) // MODIFIED LINUX ENTRY /* tbb_thread */ __TBB_SYMBOL( _ZN3tbb8internal13tbb_thread_v320hardware_concurrencyEv ) __TBB_SYMBOL( _ZN3tbb8internal13tbb_thread_v36detachEv ) __TBB_SYMBOL( _ZN3tbb8internal16thread_get_id_v3Ev ) __TBB_SYMBOL( _ZN3tbb8internal15free_closure_v3EPv ) __TBB_SYMBOL( _ZN3tbb8internal13tbb_thread_v34joinEv ) __TBB_SYMBOL( _ZN3tbb8internal13tbb_thread_v314internal_startEPFjPvES2_ ) // MODIFIED LINUX ENTRY __TBB_SYMBOL( _ZN3tbb8internal19allocate_closure_v3Ey ) // MODIFIED LINUX ENTRY __TBB_SYMBOL( _ZN3tbb8internal7move_v3ERNS0_13tbb_thread_v3ES2_ ) __TBB_SYMBOL( _ZN3tbb8internal15thread_yield_v3Ev ) __TBB_SYMBOL( _ZN3tbb8internal15thread_sleep_v3ERKNS_10tick_count10interval_tE ) /* condition_variable */ __TBB_SYMBOL( _ZN3tbb10interface58internal32internal_condition_variable_waitERNS1_14condvar_impl_tEPNS_5mutexEPKNS_10tick_count10interval_tE ) __TBB_SYMBOL( _ZN3tbb10interface58internal35internal_destroy_condition_variableERNS1_14condvar_impl_tE ) __TBB_SYMBOL( _ZN3tbb10interface58internal38internal_condition_variable_notify_allERNS1_14condvar_impl_tE ) __TBB_SYMBOL( _ZN3tbb10interface58internal38internal_condition_variable_notify_oneERNS1_14condvar_impl_tE ) __TBB_SYMBOL( _ZN3tbb10interface58internal38internal_initialize_condition_variableERNS1_14condvar_impl_tE ) #undef __TBB_SYMBOL ================================================ FILE: benchmarks/tbb/win64-tbb-export.def ================================================ ; Copyright 2005-2014 Intel Corporation. All Rights Reserved. ; ; This file is part of Threading Building Blocks. Threading Building Blocks is free software; ; you can redistribute it and/or modify it under the terms of the GNU General Public License ; version 2 as published by the Free Software Foundation. Threading Building Blocks is ; distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the ; implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. ; See the GNU General Public License for more details. You should have received a copy of ; the GNU General Public License along with Threading Building Blocks; if not, write to the ; Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA ; ; As a special exception, you may use this file as part of a free software library without ; restriction. Specifically, if other files instantiate templates or use macros or inline ; functions from this file, or you compile this file and link it with other files to produce ; an executable, this file does not by itself cause the resulting executable to be covered ; by the GNU General Public License. This exception does not however invalidate any other ; reasons why the executable file might be covered by the GNU General Public License. ; This file is organized with a section for each .cpp file. ; Each of these sections is in alphabetical order. EXPORTS #define __TBB_SYMBOL( sym ) sym #include "win64-tbb-export.lst" ================================================ FILE: benchmarks/tbb/win64-tbb-export.lst ================================================ ; Copyright 2005-2014 Intel Corporation. All Rights Reserved. ; ; This file is part of Threading Building Blocks. Threading Building Blocks is free software; ; you can redistribute it and/or modify it under the terms of the GNU General Public License ; version 2 as published by the Free Software Foundation. Threading Building Blocks is ; distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the ; implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. ; See the GNU General Public License for more details. You should have received a copy of ; the GNU General Public License along with Threading Building Blocks; if not, write to the ; Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA ; ; As a special exception, you may use this file as part of a free software library without ; restriction. Specifically, if other files instantiate templates or use macros or inline ; functions from this file, or you compile this file and link it with other files to produce ; an executable, this file does not by itself cause the resulting executable to be covered ; by the GNU General Public License. This exception does not however invalidate any other ; reasons why the executable file might be covered by the GNU General Public License. // This file is organized with a section for each .cpp file. // Each of these sections is in alphabetical order. #include "tbb/tbb_config.h" // Assembly-language support that is called directly by clients __TBB_SYMBOL( __TBB_machine_cmpswp1 ) __TBB_SYMBOL( __TBB_machine_fetchadd1 ) __TBB_SYMBOL( __TBB_machine_fetchstore1 ) __TBB_SYMBOL( __TBB_machine_cmpswp2 ) __TBB_SYMBOL( __TBB_machine_fetchadd2 ) __TBB_SYMBOL( __TBB_machine_fetchstore2 ) __TBB_SYMBOL( __TBB_machine_pause ) __TBB_SYMBOL( __TBB_machine_try_lock_elided ) __TBB_SYMBOL( __TBB_machine_unlock_elided ) __TBB_SYMBOL( __TBB_machine_is_in_transaction ) // cache_aligned_allocator.cpp __TBB_SYMBOL( ?NFS_Allocate@internal@tbb@@YAPEAX_K0PEAX@Z ) __TBB_SYMBOL( ?NFS_GetLineSize@internal@tbb@@YA_KXZ ) __TBB_SYMBOL( ?NFS_Free@internal@tbb@@YAXPEAX@Z ) __TBB_SYMBOL( ?allocate_via_handler_v3@internal@tbb@@YAPEAX_K@Z ) __TBB_SYMBOL( ?deallocate_via_handler_v3@internal@tbb@@YAXPEAX@Z ) __TBB_SYMBOL( ?is_malloc_used_v3@internal@tbb@@YA_NXZ ) // task.cpp v3 __TBB_SYMBOL( ?resize@affinity_partitioner_base_v3@internal@tbb@@AEAAXI@Z ) __TBB_SYMBOL( ?allocate@allocate_additional_child_of_proxy@internal@tbb@@QEBAAEAVtask@3@_K@Z ) __TBB_SYMBOL( ?allocate@allocate_child_proxy@internal@tbb@@QEBAAEAVtask@3@_K@Z ) __TBB_SYMBOL( ?allocate@allocate_continuation_proxy@internal@tbb@@QEBAAEAVtask@3@_K@Z ) __TBB_SYMBOL( ?allocate@allocate_root_proxy@internal@tbb@@SAAEAVtask@3@_K@Z ) __TBB_SYMBOL( ?destroy@task_base@internal@interface5@tbb@@SAXAEAVtask@4@@Z ) __TBB_SYMBOL( ?free@allocate_additional_child_of_proxy@internal@tbb@@QEBAXAEAVtask@3@@Z ) __TBB_SYMBOL( ?free@allocate_child_proxy@internal@tbb@@QEBAXAEAVtask@3@@Z ) __TBB_SYMBOL( ?free@allocate_continuation_proxy@internal@tbb@@QEBAXAEAVtask@3@@Z ) __TBB_SYMBOL( ?free@allocate_root_proxy@internal@tbb@@SAXAEAVtask@3@@Z ) __TBB_SYMBOL( ?internal_set_ref_count@task@tbb@@AEAAXH@Z ) __TBB_SYMBOL( ?internal_decrement_ref_count@task@tbb@@AEAA_JXZ ) __TBB_SYMBOL( ?is_owned_by_current_thread@task@tbb@@QEBA_NXZ ) __TBB_SYMBOL( ?note_affinity@task@tbb@@UEAAXG@Z ) __TBB_SYMBOL( ?self@task@tbb@@SAAEAV12@XZ ) __TBB_SYMBOL( ?spawn_and_wait_for_all@task@tbb@@QEAAXAEAVtask_list@2@@Z ) __TBB_SYMBOL( ?default_num_threads@task_scheduler_init@tbb@@SAHXZ ) __TBB_SYMBOL( ?initialize@task_scheduler_init@tbb@@QEAAXH_K@Z ) __TBB_SYMBOL( ?initialize@task_scheduler_init@tbb@@QEAAXH@Z ) __TBB_SYMBOL( ?terminate@task_scheduler_init@tbb@@QEAAXXZ ) #if __TBB_SCHEDULER_OBSERVER __TBB_SYMBOL( ?observe@task_scheduler_observer_v3@internal@tbb@@QEAAX_N@Z ) #endif /* __TBB_SCHEDULER_OBSERVER */ #if __TBB_TASK_ARENA /* arena.cpp */ __TBB_SYMBOL( ?internal_current_slot@task_arena_base@internal@interface7@tbb@@KAHXZ ) __TBB_SYMBOL( ?internal_initialize@task_arena_base@internal@interface7@tbb@@IEAAXXZ ) __TBB_SYMBOL( ?internal_terminate@task_arena_base@internal@interface7@tbb@@IEAAXXZ ) __TBB_SYMBOL( ?internal_enqueue@task_arena_base@internal@interface7@tbb@@IEBAXAEAVtask@4@_J@Z ) __TBB_SYMBOL( ?internal_execute@task_arena_base@internal@interface7@tbb@@IEBAXAEAVdelegate_base@234@@Z ) __TBB_SYMBOL( ?internal_wait@task_arena_base@internal@interface7@tbb@@IEBAXXZ ) #endif /* __TBB_TASK_ARENA */ #if !TBB_NO_LEGACY // task_v2.cpp __TBB_SYMBOL( ?destroy@task@tbb@@QEAAXAEAV12@@Z ) #endif // Exception handling in task scheduler #if __TBB_TASK_GROUP_CONTEXT __TBB_SYMBOL( ?allocate@allocate_root_with_context_proxy@internal@tbb@@QEBAAEAVtask@3@_K@Z ) __TBB_SYMBOL( ?free@allocate_root_with_context_proxy@internal@tbb@@QEBAXAEAVtask@3@@Z ) __TBB_SYMBOL( ?change_group@task@tbb@@QEAAXAEAVtask_group_context@2@@Z ) __TBB_SYMBOL( ?is_group_execution_cancelled@task_group_context@tbb@@QEBA_NXZ ) __TBB_SYMBOL( ?cancel_group_execution@task_group_context@tbb@@QEAA_NXZ ) __TBB_SYMBOL( ?reset@task_group_context@tbb@@QEAAXXZ ) __TBB_SYMBOL( ?capture_fp_settings@task_group_context@tbb@@QEAAXXZ ) __TBB_SYMBOL( ?init@task_group_context@tbb@@IEAAXXZ ) __TBB_SYMBOL( ?register_pending_exception@task_group_context@tbb@@QEAAXXZ ) __TBB_SYMBOL( ??1task_group_context@tbb@@QEAA@XZ ) #if __TBB_TASK_PRIORITY __TBB_SYMBOL( ?set_priority@task_group_context@tbb@@QEAAXW4priority_t@2@@Z ) __TBB_SYMBOL( ?priority@task_group_context@tbb@@QEBA?AW4priority_t@2@XZ ) #endif /* __TBB_TASK_PRIORITY */ __TBB_SYMBOL( ?name@captured_exception@tbb@@UEBAPEBDXZ ) __TBB_SYMBOL( ?what@captured_exception@tbb@@UEBAPEBDXZ ) __TBB_SYMBOL( ??1captured_exception@tbb@@UEAA@XZ ) __TBB_SYMBOL( ?move@captured_exception@tbb@@UEAAPEAV12@XZ ) __TBB_SYMBOL( ?destroy@captured_exception@tbb@@UEAAXXZ ) __TBB_SYMBOL( ?set@captured_exception@tbb@@QEAAXPEBD0@Z ) __TBB_SYMBOL( ?clear@captured_exception@tbb@@QEAAXXZ ) #endif /* __TBB_TASK_GROUP_CONTEXT */ // Symbols for exceptions thrown from TBB __TBB_SYMBOL( ?throw_bad_last_alloc_exception_v4@internal@tbb@@YAXXZ ) __TBB_SYMBOL( ?throw_exception_v4@internal@tbb@@YAXW4exception_id@12@@Z ) __TBB_SYMBOL( ?what@bad_last_alloc@tbb@@UEBAPEBDXZ ) __TBB_SYMBOL( ?what@missing_wait@tbb@@UEBAPEBDXZ ) __TBB_SYMBOL( ?what@invalid_multiple_scheduling@tbb@@UEBAPEBDXZ ) __TBB_SYMBOL( ?what@improper_lock@tbb@@UEBAPEBDXZ ) __TBB_SYMBOL( ?what@user_abort@tbb@@UEBAPEBDXZ ) // tbb_misc.cpp __TBB_SYMBOL( ?assertion_failure@tbb@@YAXPEBDH00@Z ) __TBB_SYMBOL( ?get_initial_auto_partitioner_divisor@internal@tbb@@YA_KXZ ) __TBB_SYMBOL( ?handle_perror@internal@tbb@@YAXHPEBD@Z ) __TBB_SYMBOL( ?set_assertion_handler@tbb@@YAP6AXPEBDH00@ZP6AX0H00@Z@Z ) __TBB_SYMBOL( ?runtime_warning@internal@tbb@@YAXPEBDZZ ) __TBB_SYMBOL( TBB_runtime_interface_version ) // tbb_main.cpp __TBB_SYMBOL( ?itt_load_pointer_with_acquire_v3@internal@tbb@@YAPEAXPEBX@Z ) __TBB_SYMBOL( ?itt_store_pointer_with_release_v3@internal@tbb@@YAXPEAX0@Z ) __TBB_SYMBOL( ?call_itt_notify_v5@internal@tbb@@YAXHPEAX@Z ) __TBB_SYMBOL( ?itt_load_pointer_v3@internal@tbb@@YAPEAXPEBX@Z ) __TBB_SYMBOL( ?itt_set_sync_name_v3@internal@tbb@@YAXPEAXPEB_W@Z ) #if __TBB_ITT_STRUCTURE_API __TBB_SYMBOL( ?itt_make_task_group_v7@internal@tbb@@YAXW4itt_domain_enum@12@PEAX_K12W4string_index@12@@Z ) __TBB_SYMBOL( ?itt_metadata_str_add_v7@internal@tbb@@YAXW4itt_domain_enum@12@PEAX_KW4string_index@12@PEBD@Z ) __TBB_SYMBOL( ?itt_relation_add_v7@internal@tbb@@YAXW4itt_domain_enum@12@PEAX_KW4itt_relation@12@12@Z ) __TBB_SYMBOL( ?itt_task_begin_v7@internal@tbb@@YAXW4itt_domain_enum@12@PEAX_K12W4string_index@12@@Z ) __TBB_SYMBOL( ?itt_task_end_v7@internal@tbb@@YAXW4itt_domain_enum@12@@Z ) #endif // pipeline.cpp __TBB_SYMBOL( ??_7pipeline@tbb@@6B@ ) __TBB_SYMBOL( ??0pipeline@tbb@@QEAA@XZ ) __TBB_SYMBOL( ??1filter@tbb@@UEAA@XZ ) __TBB_SYMBOL( ??1pipeline@tbb@@UEAA@XZ ) __TBB_SYMBOL( ?add_filter@pipeline@tbb@@QEAAXAEAVfilter@2@@Z ) __TBB_SYMBOL( ?clear@pipeline@tbb@@QEAAXXZ ) __TBB_SYMBOL( ?inject_token@pipeline@tbb@@AEAAXAEAVtask@2@@Z ) __TBB_SYMBOL( ?run@pipeline@tbb@@QEAAX_K@Z ) #if __TBB_TASK_GROUP_CONTEXT __TBB_SYMBOL( ?run@pipeline@tbb@@QEAAX_KAEAVtask_group_context@2@@Z ) #endif __TBB_SYMBOL( ?process_item@thread_bound_filter@tbb@@QEAA?AW4result_type@12@XZ ) __TBB_SYMBOL( ?try_process_item@thread_bound_filter@tbb@@QEAA?AW4result_type@12@XZ ) __TBB_SYMBOL( ?set_end_of_input@filter@tbb@@IEAAXXZ ) // queuing_rw_mutex.cpp __TBB_SYMBOL( ?internal_construct@queuing_rw_mutex@tbb@@QEAAXXZ ) __TBB_SYMBOL( ?acquire@scoped_lock@queuing_rw_mutex@tbb@@QEAAXAEAV23@_N@Z ) __TBB_SYMBOL( ?downgrade_to_reader@scoped_lock@queuing_rw_mutex@tbb@@QEAA_NXZ ) __TBB_SYMBOL( ?release@scoped_lock@queuing_rw_mutex@tbb@@QEAAXXZ ) __TBB_SYMBOL( ?upgrade_to_writer@scoped_lock@queuing_rw_mutex@tbb@@QEAA_NXZ ) __TBB_SYMBOL( ?try_acquire@scoped_lock@queuing_rw_mutex@tbb@@QEAA_NAEAV23@_N@Z ) // reader_writer_lock.cpp __TBB_SYMBOL( ?try_lock_read@reader_writer_lock@interface5@tbb@@QEAA_NXZ ) __TBB_SYMBOL( ?try_lock@reader_writer_lock@interface5@tbb@@QEAA_NXZ ) __TBB_SYMBOL( ?unlock@reader_writer_lock@interface5@tbb@@QEAAXXZ ) __TBB_SYMBOL( ?lock_read@reader_writer_lock@interface5@tbb@@QEAAXXZ ) __TBB_SYMBOL( ?lock@reader_writer_lock@interface5@tbb@@QEAAXXZ ) __TBB_SYMBOL( ?internal_construct@reader_writer_lock@interface5@tbb@@AEAAXXZ ) __TBB_SYMBOL( ?internal_destroy@reader_writer_lock@interface5@tbb@@AEAAXXZ ) __TBB_SYMBOL( ?internal_construct@scoped_lock@reader_writer_lock@interface5@tbb@@AEAAXAEAV234@@Z ) __TBB_SYMBOL( ?internal_destroy@scoped_lock@reader_writer_lock@interface5@tbb@@AEAAXXZ ) __TBB_SYMBOL( ?internal_construct@scoped_lock_read@reader_writer_lock@interface5@tbb@@AEAAXAEAV234@@Z ) __TBB_SYMBOL( ?internal_destroy@scoped_lock_read@reader_writer_lock@interface5@tbb@@AEAAXXZ ) #if !TBB_NO_LEGACY // spin_rw_mutex.cpp v2 __TBB_SYMBOL( ?internal_itt_releasing@spin_rw_mutex@tbb@@CAXPEAV12@@Z ) __TBB_SYMBOL( ?internal_acquire_writer@spin_rw_mutex@tbb@@CA_NPEAV12@@Z ) __TBB_SYMBOL( ?internal_acquire_reader@spin_rw_mutex@tbb@@CAXPEAV12@@Z ) __TBB_SYMBOL( ?internal_downgrade@spin_rw_mutex@tbb@@CAXPEAV12@@Z ) __TBB_SYMBOL( ?internal_upgrade@spin_rw_mutex@tbb@@CA_NPEAV12@@Z ) __TBB_SYMBOL( ?internal_release_reader@spin_rw_mutex@tbb@@CAXPEAV12@@Z ) __TBB_SYMBOL( ?internal_release_writer@spin_rw_mutex@tbb@@CAXPEAV12@@Z ) __TBB_SYMBOL( ?internal_try_acquire_writer@spin_rw_mutex@tbb@@CA_NPEAV12@@Z ) __TBB_SYMBOL( ?internal_try_acquire_reader@spin_rw_mutex@tbb@@CA_NPEAV12@@Z ) #endif // spin_rw_mutex v3 __TBB_SYMBOL( ?internal_construct@spin_rw_mutex_v3@tbb@@AEAAXXZ ) __TBB_SYMBOL( ?internal_upgrade@spin_rw_mutex_v3@tbb@@AEAA_NXZ ) __TBB_SYMBOL( ?internal_downgrade@spin_rw_mutex_v3@tbb@@AEAAXXZ ) __TBB_SYMBOL( ?internal_acquire_reader@spin_rw_mutex_v3@tbb@@AEAAXXZ ) __TBB_SYMBOL( ?internal_acquire_writer@spin_rw_mutex_v3@tbb@@AEAA_NXZ ) __TBB_SYMBOL( ?internal_release_reader@spin_rw_mutex_v3@tbb@@AEAAXXZ ) __TBB_SYMBOL( ?internal_release_writer@spin_rw_mutex_v3@tbb@@AEAAXXZ ) __TBB_SYMBOL( ?internal_try_acquire_reader@spin_rw_mutex_v3@tbb@@AEAA_NXZ ) __TBB_SYMBOL( ?internal_try_acquire_writer@spin_rw_mutex_v3@tbb@@AEAA_NXZ ) // x86_rtm_rw_mutex.cpp __TBB_SYMBOL( ?internal_acquire_writer@x86_rtm_rw_mutex@internal@interface8@tbb@@AEAAXAEAVscoped_lock@1234@_N@Z ) __TBB_SYMBOL( ?internal_acquire_reader@x86_rtm_rw_mutex@internal@interface8@tbb@@AEAAXAEAVscoped_lock@1234@_N@Z ) __TBB_SYMBOL( ?internal_upgrade@x86_rtm_rw_mutex@internal@interface8@tbb@@AEAA_NAEAVscoped_lock@1234@@Z ) __TBB_SYMBOL( ?internal_downgrade@x86_rtm_rw_mutex@internal@interface8@tbb@@AEAA_NAEAVscoped_lock@1234@@Z ) __TBB_SYMBOL( ?internal_try_acquire_writer@x86_rtm_rw_mutex@internal@interface8@tbb@@AEAA_NAEAVscoped_lock@1234@@Z ) __TBB_SYMBOL( ?internal_release@x86_rtm_rw_mutex@internal@interface8@tbb@@AEAAXAEAVscoped_lock@1234@@Z ) __TBB_SYMBOL( ?internal_construct@x86_rtm_rw_mutex@internal@interface8@tbb@@AEAAXXZ ) // spin_mutex.cpp __TBB_SYMBOL( ?internal_construct@spin_mutex@tbb@@QEAAXXZ ) __TBB_SYMBOL( ?internal_acquire@scoped_lock@spin_mutex@tbb@@AEAAXAEAV23@@Z ) __TBB_SYMBOL( ?internal_release@scoped_lock@spin_mutex@tbb@@AEAAXXZ ) __TBB_SYMBOL( ?internal_try_acquire@scoped_lock@spin_mutex@tbb@@AEAA_NAEAV23@@Z ) // mutex.cpp __TBB_SYMBOL( ?internal_acquire@scoped_lock@mutex@tbb@@AEAAXAEAV23@@Z ) __TBB_SYMBOL( ?internal_release@scoped_lock@mutex@tbb@@AEAAXXZ ) __TBB_SYMBOL( ?internal_try_acquire@scoped_lock@mutex@tbb@@AEAA_NAEAV23@@Z ) __TBB_SYMBOL( ?internal_construct@mutex@tbb@@AEAAXXZ ) __TBB_SYMBOL( ?internal_destroy@mutex@tbb@@AEAAXXZ ) // recursive_mutex.cpp __TBB_SYMBOL( ?internal_construct@recursive_mutex@tbb@@AEAAXXZ ) __TBB_SYMBOL( ?internal_destroy@recursive_mutex@tbb@@AEAAXXZ ) __TBB_SYMBOL( ?internal_acquire@scoped_lock@recursive_mutex@tbb@@AEAAXAEAV23@@Z ) __TBB_SYMBOL( ?internal_try_acquire@scoped_lock@recursive_mutex@tbb@@AEAA_NAEAV23@@Z ) __TBB_SYMBOL( ?internal_release@scoped_lock@recursive_mutex@tbb@@AEAAXXZ ) // queuing_mutex.cpp __TBB_SYMBOL( ?internal_construct@queuing_mutex@tbb@@QEAAXXZ ) __TBB_SYMBOL( ?acquire@scoped_lock@queuing_mutex@tbb@@QEAAXAEAV23@@Z ) __TBB_SYMBOL( ?release@scoped_lock@queuing_mutex@tbb@@QEAAXXZ ) __TBB_SYMBOL( ?try_acquire@scoped_lock@queuing_mutex@tbb@@QEAA_NAEAV23@@Z ) //critical_section.cpp __TBB_SYMBOL( ?internal_construct@critical_section_v4@internal@tbb@@QEAAXXZ ) #if !TBB_NO_LEGACY // concurrent_hash_map.cpp __TBB_SYMBOL( ?internal_grow_predicate@hash_map_segment_base@internal@tbb@@QEBA_NXZ ) // concurrent_queue.cpp v2 __TBB_SYMBOL( ??0concurrent_queue_base@internal@tbb@@IEAA@_K@Z ) __TBB_SYMBOL( ??0concurrent_queue_iterator_base@internal@tbb@@IEAA@AEBVconcurrent_queue_base@12@@Z ) __TBB_SYMBOL( ??1concurrent_queue_base@internal@tbb@@MEAA@XZ ) __TBB_SYMBOL( ??1concurrent_queue_iterator_base@internal@tbb@@IEAA@XZ ) __TBB_SYMBOL( ?advance@concurrent_queue_iterator_base@internal@tbb@@IEAAXXZ ) __TBB_SYMBOL( ?assign@concurrent_queue_iterator_base@internal@tbb@@IEAAXAEBV123@@Z ) __TBB_SYMBOL( ?internal_pop@concurrent_queue_base@internal@tbb@@IEAAXPEAX@Z ) __TBB_SYMBOL( ?internal_pop_if_present@concurrent_queue_base@internal@tbb@@IEAA_NPEAX@Z ) __TBB_SYMBOL( ?internal_push@concurrent_queue_base@internal@tbb@@IEAAXPEBX@Z ) __TBB_SYMBOL( ?internal_push_if_not_full@concurrent_queue_base@internal@tbb@@IEAA_NPEBX@Z ) __TBB_SYMBOL( ?internal_set_capacity@concurrent_queue_base@internal@tbb@@IEAAX_J_K@Z ) __TBB_SYMBOL( ?internal_size@concurrent_queue_base@internal@tbb@@IEBA_JXZ ) #endif // concurrent_queue v3 __TBB_SYMBOL( ??0concurrent_queue_iterator_base_v3@internal@tbb@@IEAA@AEBVconcurrent_queue_base_v3@12@@Z ) __TBB_SYMBOL( ??0concurrent_queue_iterator_base_v3@internal@tbb@@IEAA@AEBVconcurrent_queue_base_v3@12@_K@Z ) __TBB_SYMBOL( ??1concurrent_queue_iterator_base_v3@internal@tbb@@IEAA@XZ ) __TBB_SYMBOL( ?assign@concurrent_queue_iterator_base_v3@internal@tbb@@IEAAXAEBV123@@Z ) __TBB_SYMBOL( ?advance@concurrent_queue_iterator_base_v3@internal@tbb@@IEAAXXZ ) __TBB_SYMBOL( ??0concurrent_queue_base_v3@internal@tbb@@IEAA@_K@Z ) __TBB_SYMBOL( ??1concurrent_queue_base_v3@internal@tbb@@MEAA@XZ ) __TBB_SYMBOL( ?internal_push@concurrent_queue_base_v3@internal@tbb@@IEAAXPEBX@Z ) __TBB_SYMBOL( ?internal_push_move@concurrent_queue_base_v8@internal@tbb@@IEAAXPEBX@Z ) __TBB_SYMBOL( ?internal_push_if_not_full@concurrent_queue_base_v3@internal@tbb@@IEAA_NPEBX@Z ) __TBB_SYMBOL( ?internal_push_move_if_not_full@concurrent_queue_base_v8@internal@tbb@@IEAA_NPEBX@Z ) __TBB_SYMBOL( ?internal_pop@concurrent_queue_base_v3@internal@tbb@@IEAAXPEAX@Z ) __TBB_SYMBOL( ?internal_pop_if_present@concurrent_queue_base_v3@internal@tbb@@IEAA_NPEAX@Z ) __TBB_SYMBOL( ?internal_abort@concurrent_queue_base_v3@internal@tbb@@IEAAXXZ ) __TBB_SYMBOL( ?internal_size@concurrent_queue_base_v3@internal@tbb@@IEBA_JXZ ) __TBB_SYMBOL( ?internal_empty@concurrent_queue_base_v3@internal@tbb@@IEBA_NXZ ) __TBB_SYMBOL( ?internal_finish_clear@concurrent_queue_base_v3@internal@tbb@@IEAAXXZ ) __TBB_SYMBOL( ?internal_set_capacity@concurrent_queue_base_v3@internal@tbb@@IEAAX_J_K@Z ) __TBB_SYMBOL( ?internal_throw_exception@concurrent_queue_base_v3@internal@tbb@@IEBAXXZ ) __TBB_SYMBOL( ?assign@concurrent_queue_base_v3@internal@tbb@@IEAAXAEBV123@@Z ) __TBB_SYMBOL( ?move_content@concurrent_queue_base_v8@internal@tbb@@IEAAXAEAV123@@Z ) #if !TBB_NO_LEGACY // concurrent_vector.cpp v2 __TBB_SYMBOL( ?internal_assign@concurrent_vector_base@internal@tbb@@IEAAXAEBV123@_KP6AXPEAX1@ZP6AX2PEBX1@Z5@Z ) __TBB_SYMBOL( ?internal_capacity@concurrent_vector_base@internal@tbb@@IEBA_KXZ ) __TBB_SYMBOL( ?internal_clear@concurrent_vector_base@internal@tbb@@IEAAXP6AXPEAX_K@Z_N@Z ) __TBB_SYMBOL( ?internal_copy@concurrent_vector_base@internal@tbb@@IEAAXAEBV123@_KP6AXPEAXPEBX1@Z@Z ) __TBB_SYMBOL( ?internal_grow_by@concurrent_vector_base@internal@tbb@@IEAA_K_K0P6AXPEAX0@Z@Z ) __TBB_SYMBOL( ?internal_grow_to_at_least@concurrent_vector_base@internal@tbb@@IEAAX_K0P6AXPEAX0@Z@Z ) __TBB_SYMBOL( ?internal_push_back@concurrent_vector_base@internal@tbb@@IEAAPEAX_KAEA_K@Z ) __TBB_SYMBOL( ?internal_reserve@concurrent_vector_base@internal@tbb@@IEAAX_K00@Z ) #endif // concurrent_vector v3 __TBB_SYMBOL( ??1concurrent_vector_base_v3@internal@tbb@@IEAA@XZ ) __TBB_SYMBOL( ?internal_assign@concurrent_vector_base_v3@internal@tbb@@IEAAXAEBV123@_KP6AXPEAX1@ZP6AX2PEBX1@Z5@Z ) __TBB_SYMBOL( ?internal_capacity@concurrent_vector_base_v3@internal@tbb@@IEBA_KXZ ) __TBB_SYMBOL( ?internal_clear@concurrent_vector_base_v3@internal@tbb@@IEAA_KP6AXPEAX_K@Z@Z ) __TBB_SYMBOL( ?internal_copy@concurrent_vector_base_v3@internal@tbb@@IEAAXAEBV123@_KP6AXPEAXPEBX1@Z@Z ) __TBB_SYMBOL( ?internal_grow_by@concurrent_vector_base_v3@internal@tbb@@IEAA_K_K0P6AXPEAXPEBX0@Z2@Z ) __TBB_SYMBOL( ?internal_grow_to_at_least@concurrent_vector_base_v3@internal@tbb@@IEAAX_K0P6AXPEAXPEBX0@Z2@Z ) __TBB_SYMBOL( ?internal_push_back@concurrent_vector_base_v3@internal@tbb@@IEAAPEAX_KAEA_K@Z ) __TBB_SYMBOL( ?internal_reserve@concurrent_vector_base_v3@internal@tbb@@IEAAX_K00@Z ) __TBB_SYMBOL( ?internal_compact@concurrent_vector_base_v3@internal@tbb@@IEAAPEAX_KPEAXP6AX10@ZP6AX1PEBX0@Z@Z ) __TBB_SYMBOL( ?internal_swap@concurrent_vector_base_v3@internal@tbb@@IEAAXAEAV123@@Z ) __TBB_SYMBOL( ?internal_throw_exception@concurrent_vector_base_v3@internal@tbb@@IEBAX_K@Z ) __TBB_SYMBOL( ?internal_resize@concurrent_vector_base_v3@internal@tbb@@IEAAX_K00PEBXP6AXPEAX0@ZP6AX210@Z@Z ) __TBB_SYMBOL( ?internal_grow_to_at_least_with_result@concurrent_vector_base_v3@internal@tbb@@IEAA_K_K0P6AXPEAXPEBX0@Z2@Z ) // tbb_thread __TBB_SYMBOL( ?allocate_closure_v3@internal@tbb@@YAPEAX_K@Z ) __TBB_SYMBOL( ?detach@tbb_thread_v3@internal@tbb@@QEAAXXZ ) __TBB_SYMBOL( ?free_closure_v3@internal@tbb@@YAXPEAX@Z ) __TBB_SYMBOL( ?hardware_concurrency@tbb_thread_v3@internal@tbb@@SAIXZ ) __TBB_SYMBOL( ?internal_start@tbb_thread_v3@internal@tbb@@AEAAXP6AIPEAX@Z0@Z ) __TBB_SYMBOL( ?join@tbb_thread_v3@internal@tbb@@QEAAXXZ ) __TBB_SYMBOL( ?move_v3@internal@tbb@@YAXAEAVtbb_thread_v3@12@0@Z ) __TBB_SYMBOL( ?thread_get_id_v3@internal@tbb@@YA?AVid@tbb_thread_v3@12@XZ ) __TBB_SYMBOL( ?thread_sleep_v3@internal@tbb@@YAXAEBVinterval_t@tick_count@2@@Z ) __TBB_SYMBOL( ?thread_yield_v3@internal@tbb@@YAXXZ ) // condition_variable __TBB_SYMBOL( ?internal_initialize_condition_variable@internal@interface5@tbb@@YAXAEATcondvar_impl_t@123@@Z ) __TBB_SYMBOL( ?internal_condition_variable_wait@internal@interface5@tbb@@YA_NAEATcondvar_impl_t@123@PEAVmutex@3@PEBVinterval_t@tick_count@3@@Z ) __TBB_SYMBOL( ?internal_condition_variable_notify_one@internal@interface5@tbb@@YAXAEATcondvar_impl_t@123@@Z ) __TBB_SYMBOL( ?internal_condition_variable_notify_all@internal@interface5@tbb@@YAXAEATcondvar_impl_t@123@@Z ) __TBB_SYMBOL( ?internal_destroy_condition_variable@internal@interface5@tbb@@YAXAEATcondvar_impl_t@123@@Z ) #undef __TBB_SYMBOL ================================================ FILE: benchmarks/tbb/winrt-tbb-export.lst ================================================ ; Copyright 2005-2014 Intel Corporation. All Rights Reserved. ; ; This file is part of Threading Building Blocks. Threading Building Blocks is free software; ; you can redistribute it and/or modify it under the terms of the GNU General Public License ; version 2 as published by the Free Software Foundation. Threading Building Blocks is ; distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the ; implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. ; See the GNU General Public License for more details. You should have received a copy of ; the GNU General Public License along with Threading Building Blocks; if not, write to the ; Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA ; ; As a special exception, you may use this file as part of a free software library without ; restriction. Specifically, if other files instantiate templates or use macros or inline ; functions from this file, or you compile this file and link it with other files to produce ; an executable, this file does not by itself cause the resulting executable to be covered ; by the GNU General Public License. This exception does not however invalidate any other ; reasons why the executable file might be covered by the GNU General Public License. #include "tbb/tbb_config.h" // cache_aligned_allocator.cpp __TBB_SYMBOL( ?NFS_Allocate@internal@tbb@@YAPAXIIPAX@Z ) __TBB_SYMBOL( ?NFS_GetLineSize@internal@tbb@@YAIXZ ) __TBB_SYMBOL( ?NFS_Free@internal@tbb@@YAXPAX@Z ) __TBB_SYMBOL( ?allocate_via_handler_v3@internal@tbb@@YAPAXI@Z ) __TBB_SYMBOL( ?deallocate_via_handler_v3@internal@tbb@@YAXPAX@Z ) __TBB_SYMBOL( ?is_malloc_used_v3@internal@tbb@@YA_NXZ ) // task.cpp v3 __TBB_SYMBOL( ?allocate@allocate_additional_child_of_proxy@internal@tbb@@QBAAAVtask@3@I@Z ) __TBB_SYMBOL( ?allocate@allocate_child_proxy@internal@tbb@@QBAAAVtask@3@I@Z ) __TBB_SYMBOL( ?allocate@allocate_continuation_proxy@internal@tbb@@QBAAAVtask@3@I@Z ) __TBB_SYMBOL( ?allocate@allocate_root_proxy@internal@tbb@@SAAAVtask@3@I@Z ) __TBB_SYMBOL( ?destroy@task_base@internal@interface5@tbb@@SAXAAVtask@4@@Z ) __TBB_SYMBOL( ?free@allocate_additional_child_of_proxy@internal@tbb@@QBAXAAVtask@3@@Z ) __TBB_SYMBOL( ?free@allocate_child_proxy@internal@tbb@@QBAXAAVtask@3@@Z ) __TBB_SYMBOL( ?free@allocate_continuation_proxy@internal@tbb@@QBAXAAVtask@3@@Z ) __TBB_SYMBOL( ?free@allocate_root_proxy@internal@tbb@@SAXAAVtask@3@@Z ) __TBB_SYMBOL( ?internal_set_ref_count@task@tbb@@AAAXH@Z ) __TBB_SYMBOL( ?internal_decrement_ref_count@task@tbb@@AAAHXZ ) __TBB_SYMBOL( ?is_owned_by_current_thread@task@tbb@@QBA_NXZ ) __TBB_SYMBOL( ?note_affinity@task@tbb@@UAAXG@Z ) __TBB_SYMBOL( ?resize@affinity_partitioner_base_v3@internal@tbb@@AAAXI@Z ) __TBB_SYMBOL( ?self@task@tbb@@SAAAV12@XZ ) __TBB_SYMBOL( ?spawn_and_wait_for_all@task@tbb@@QAAXAAVtask_list@2@@Z ) __TBB_SYMBOL( ?default_num_threads@task_scheduler_init@tbb@@SAHXZ ) __TBB_SYMBOL( ?initialize@task_scheduler_init@tbb@@QAAXHI@Z ) __TBB_SYMBOL( ?initialize@task_scheduler_init@tbb@@QAAXH@Z ) __TBB_SYMBOL( ?terminate@task_scheduler_init@tbb@@QAAXXZ ) #if __TBB_SCHEDULER_OBSERVER __TBB_SYMBOL( ?observe@task_scheduler_observer_v3@internal@tbb@@QAAX_N@Z ) #endif /* __TBB_SCHEDULER_OBSERVER */ #if __TBB_TASK_ARENA /* arena.cpp */ __TBB_SYMBOL( ?internal_current_slot@task_arena_base@internal@interface7@tbb@@KAHXZ ) __TBB_SYMBOL( ?internal_initialize@task_arena_base@internal@interface7@tbb@@IAAXXZ ) __TBB_SYMBOL( ?internal_terminate@task_arena_base@internal@interface7@tbb@@IAAXXZ ) __TBB_SYMBOL( ?internal_enqueue@task_arena_base@internal@interface7@tbb@@IBAXAAVtask@4@H@Z ) __TBB_SYMBOL( ?internal_execute@task_arena_base@internal@interface7@tbb@@IBAXAAVdelegate_base@234@@Z ) __TBB_SYMBOL( ?internal_wait@task_arena_base@internal@interface7@tbb@@IBAXXZ ) #endif /* __TBB_TASK_ARENA */ #if !TBB_NO_LEGACY // task_v2.cpp __TBB_SYMBOL( ?destroy@task@tbb@@QAAXAAV12@@Z ) #endif // exception handling support #if __TBB_TASK_GROUP_CONTEXT __TBB_SYMBOL( ?allocate@allocate_root_with_context_proxy@internal@tbb@@QBAAAVtask@3@I@Z ) __TBB_SYMBOL( ?free@allocate_root_with_context_proxy@internal@tbb@@QBAXAAVtask@3@@Z ) __TBB_SYMBOL( ?change_group@task@tbb@@QAAXAAVtask_group_context@2@@Z ) __TBB_SYMBOL( ?is_group_execution_cancelled@task_group_context@tbb@@QBA_NXZ ) __TBB_SYMBOL( ?cancel_group_execution@task_group_context@tbb@@QAA_NXZ ) __TBB_SYMBOL( ?reset@task_group_context@tbb@@QAAXXZ ) __TBB_SYMBOL( ?capture_fp_settings@task_group_context@tbb@@QAAXXZ ) __TBB_SYMBOL( ?init@task_group_context@tbb@@IAAXXZ ) __TBB_SYMBOL( ?register_pending_exception@task_group_context@tbb@@QAAXXZ ) __TBB_SYMBOL( ??1task_group_context@tbb@@QAA@XZ ) #if __TBB_TASK_PRIORITY __TBB_SYMBOL( ?set_priority@task_group_context@tbb@@QAAXW4priority_t@2@@Z ) __TBB_SYMBOL( ?priority@task_group_context@tbb@@QBA?AW4priority_t@2@XZ ) #endif /* __TBB_TASK_PRIORITY */ __TBB_SYMBOL( ?name@captured_exception@tbb@@UBAPBDXZ ) __TBB_SYMBOL( ?what@captured_exception@tbb@@UBAPBDXZ ) __TBB_SYMBOL( ??1captured_exception@tbb@@UAA@XZ ) __TBB_SYMBOL( ?move@captured_exception@tbb@@UAAPAV12@XZ ) __TBB_SYMBOL( ?destroy@captured_exception@tbb@@UAAXXZ ) __TBB_SYMBOL( ?set@captured_exception@tbb@@QAAXPBD0@Z ) __TBB_SYMBOL( ?clear@captured_exception@tbb@@QAAXXZ ) #endif /* __TBB_TASK_GROUP_CONTEXT */ // Symbols for exceptions thrown from TBB __TBB_SYMBOL( ?throw_bad_last_alloc_exception_v4@internal@tbb@@YAXXZ ) __TBB_SYMBOL( ?throw_exception_v4@internal@tbb@@YAXW4exception_id@12@@Z ) __TBB_SYMBOL( ?what@bad_last_alloc@tbb@@UBAPBDXZ ) __TBB_SYMBOL( ?what@missing_wait@tbb@@UBAPBDXZ ) __TBB_SYMBOL( ?what@invalid_multiple_scheduling@tbb@@UBAPBDXZ ) __TBB_SYMBOL( ?what@improper_lock@tbb@@UBAPBDXZ ) __TBB_SYMBOL( ?what@user_abort@tbb@@UBAPBDXZ ) // tbb_misc.cpp __TBB_SYMBOL( ?assertion_failure@tbb@@YAXPBDH00@Z ) __TBB_SYMBOL( ?get_initial_auto_partitioner_divisor@internal@tbb@@YAIXZ ) __TBB_SYMBOL( ?handle_perror@internal@tbb@@YAXHPBD@Z ) __TBB_SYMBOL( ?set_assertion_handler@tbb@@YAP6AXPBDH00@ZP6AX0H00@Z@Z ) __TBB_SYMBOL( ?runtime_warning@internal@tbb@@YAXPBDZZ ) __TBB_SYMBOL( TBB_runtime_interface_version ) // tbb_main.cpp __TBB_SYMBOL( ?itt_load_pointer_with_acquire_v3@internal@tbb@@YAPAXPBX@Z ) __TBB_SYMBOL( ?itt_store_pointer_with_release_v3@internal@tbb@@YAXPAX0@Z ) __TBB_SYMBOL( ?call_itt_notify_v5@internal@tbb@@YAXHPAX@Z ) __TBB_SYMBOL( ?itt_set_sync_name_v3@internal@tbb@@YAXPAXPB_W@Z ) __TBB_SYMBOL( ?itt_load_pointer_v3@internal@tbb@@YAPAXPBX@Z ) // pipeline.cpp __TBB_SYMBOL( ??0pipeline@tbb@@QAA@XZ ) __TBB_SYMBOL( ??1filter@tbb@@UAA@XZ ) __TBB_SYMBOL( ??1pipeline@tbb@@UAA@XZ ) __TBB_SYMBOL( ??_7pipeline@tbb@@6B@ ) __TBB_SYMBOL( ?add_filter@pipeline@tbb@@QAAXAAVfilter@2@@Z ) __TBB_SYMBOL( ?clear@pipeline@tbb@@QAAXXZ ) __TBB_SYMBOL( ?inject_token@pipeline@tbb@@AAAXAAVtask@2@@Z ) __TBB_SYMBOL( ?run@pipeline@tbb@@QAAXI@Z ) #if __TBB_TASK_GROUP_CONTEXT __TBB_SYMBOL( ?run@pipeline@tbb@@QAAXIAAVtask_group_context@2@@Z ) #endif __TBB_SYMBOL( ?process_item@thread_bound_filter@tbb@@QAA?AW4result_type@12@XZ ) __TBB_SYMBOL( ?try_process_item@thread_bound_filter@tbb@@QAA?AW4result_type@12@XZ ) __TBB_SYMBOL( ?set_end_of_input@filter@tbb@@IAAXXZ ) // queuing_rw_mutex.cpp __TBB_SYMBOL( ?internal_construct@queuing_rw_mutex@tbb@@QAAXXZ ) __TBB_SYMBOL( ?acquire@scoped_lock@queuing_rw_mutex@tbb@@QAAXAAV23@_N@Z ) __TBB_SYMBOL( ?downgrade_to_reader@scoped_lock@queuing_rw_mutex@tbb@@QAA_NXZ ) __TBB_SYMBOL( ?release@scoped_lock@queuing_rw_mutex@tbb@@QAAXXZ ) __TBB_SYMBOL( ?upgrade_to_writer@scoped_lock@queuing_rw_mutex@tbb@@QAA_NXZ ) __TBB_SYMBOL( ?try_acquire@scoped_lock@queuing_rw_mutex@tbb@@QAA_NAAV23@_N@Z ) // reader_writer_lock.cpp __TBB_SYMBOL( ?try_lock_read@reader_writer_lock@interface5@tbb@@QAA_NXZ ) __TBB_SYMBOL( ?try_lock@reader_writer_lock@interface5@tbb@@QAA_NXZ ) __TBB_SYMBOL( ?unlock@reader_writer_lock@interface5@tbb@@QAAXXZ ) __TBB_SYMBOL( ?lock_read@reader_writer_lock@interface5@tbb@@QAAXXZ ) __TBB_SYMBOL( ?lock@reader_writer_lock@interface5@tbb@@QAAXXZ ) __TBB_SYMBOL( ?internal_construct@reader_writer_lock@interface5@tbb@@AAAXXZ ) __TBB_SYMBOL( ?internal_destroy@reader_writer_lock@interface5@tbb@@AAAXXZ ) __TBB_SYMBOL( ?internal_construct@scoped_lock@reader_writer_lock@interface5@tbb@@AAAXAAV234@@Z ) __TBB_SYMBOL( ?internal_destroy@scoped_lock@reader_writer_lock@interface5@tbb@@AAAXXZ ) __TBB_SYMBOL( ?internal_construct@scoped_lock_read@reader_writer_lock@interface5@tbb@@AAAXAAV234@@Z ) __TBB_SYMBOL( ?internal_destroy@scoped_lock_read@reader_writer_lock@interface5@tbb@@AAAXXZ ) #if !TBB_NO_LEGACY // spin_rw_mutex.cpp v2 __TBB_SYMBOL( ?internal_acquire_reader@spin_rw_mutex@tbb@@CAXPAV12@@Z ) __TBB_SYMBOL( ?internal_acquire_writer@spin_rw_mutex@tbb@@CA_NPAV12@@Z ) __TBB_SYMBOL( ?internal_downgrade@spin_rw_mutex@tbb@@CAXPAV12@@Z ) __TBB_SYMBOL( ?internal_itt_releasing@spin_rw_mutex@tbb@@CAXPAV12@@Z ) __TBB_SYMBOL( ?internal_release_reader@spin_rw_mutex@tbb@@CAXPAV12@@Z ) __TBB_SYMBOL( ?internal_release_writer@spin_rw_mutex@tbb@@CAXPAV12@@Z ) __TBB_SYMBOL( ?internal_upgrade@spin_rw_mutex@tbb@@CA_NPAV12@@Z ) __TBB_SYMBOL( ?internal_try_acquire_writer@spin_rw_mutex@tbb@@CA_NPAV12@@Z ) __TBB_SYMBOL( ?internal_try_acquire_reader@spin_rw_mutex@tbb@@CA_NPAV12@@Z ) #endif // spin_rw_mutex v3 __TBB_SYMBOL( ?internal_construct@spin_rw_mutex_v3@tbb@@AAAXXZ ) __TBB_SYMBOL( ?internal_upgrade@spin_rw_mutex_v3@tbb@@AAA_NXZ ) __TBB_SYMBOL( ?internal_downgrade@spin_rw_mutex_v3@tbb@@AAAXXZ ) __TBB_SYMBOL( ?internal_acquire_reader@spin_rw_mutex_v3@tbb@@AAAXXZ ) __TBB_SYMBOL( ?internal_acquire_writer@spin_rw_mutex_v3@tbb@@AAA_NXZ ) __TBB_SYMBOL( ?internal_release_reader@spin_rw_mutex_v3@tbb@@AAAXXZ ) __TBB_SYMBOL( ?internal_release_writer@spin_rw_mutex_v3@tbb@@AAAXXZ ) __TBB_SYMBOL( ?internal_try_acquire_reader@spin_rw_mutex_v3@tbb@@AAA_NXZ ) __TBB_SYMBOL( ?internal_try_acquire_writer@spin_rw_mutex_v3@tbb@@AAA_NXZ ) // spin_mutex.cpp __TBB_SYMBOL( ?internal_construct@spin_mutex@tbb@@QAAXXZ ) __TBB_SYMBOL( ?internal_acquire@scoped_lock@spin_mutex@tbb@@AAAXAAV23@@Z ) __TBB_SYMBOL( ?internal_release@scoped_lock@spin_mutex@tbb@@AAAXXZ ) __TBB_SYMBOL( ?internal_try_acquire@scoped_lock@spin_mutex@tbb@@AAA_NAAV23@@Z ) // mutex.cpp __TBB_SYMBOL( ?internal_acquire@scoped_lock@mutex@tbb@@AAAXAAV23@@Z ) __TBB_SYMBOL( ?internal_release@scoped_lock@mutex@tbb@@AAAXXZ ) __TBB_SYMBOL( ?internal_try_acquire@scoped_lock@mutex@tbb@@AAA_NAAV23@@Z ) __TBB_SYMBOL( ?internal_construct@mutex@tbb@@AAAXXZ ) __TBB_SYMBOL( ?internal_destroy@mutex@tbb@@AAAXXZ ) // recursive_mutex.cpp __TBB_SYMBOL( ?internal_acquire@scoped_lock@recursive_mutex@tbb@@AAAXAAV23@@Z ) __TBB_SYMBOL( ?internal_release@scoped_lock@recursive_mutex@tbb@@AAAXXZ ) __TBB_SYMBOL( ?internal_try_acquire@scoped_lock@recursive_mutex@tbb@@AAA_NAAV23@@Z ) __TBB_SYMBOL( ?internal_construct@recursive_mutex@tbb@@AAAXXZ ) __TBB_SYMBOL( ?internal_destroy@recursive_mutex@tbb@@AAAXXZ ) // queuing_mutex.cpp __TBB_SYMBOL( ?internal_construct@queuing_mutex@tbb@@QAAXXZ ) __TBB_SYMBOL( ?acquire@scoped_lock@queuing_mutex@tbb@@QAAXAAV23@@Z ) __TBB_SYMBOL( ?release@scoped_lock@queuing_mutex@tbb@@QAAXXZ ) __TBB_SYMBOL( ?try_acquire@scoped_lock@queuing_mutex@tbb@@QAA_NAAV23@@Z ) // critical_section.cpp __TBB_SYMBOL( ?internal_construct@critical_section_v4@internal@tbb@@QAAXXZ ) #if !TBB_NO_LEGACY // concurrent_hash_map.cpp __TBB_SYMBOL( ?internal_grow_predicate@hash_map_segment_base@internal@tbb@@QBA_NXZ ) // concurrent_queue.cpp v2 __TBB_SYMBOL( ?advance@concurrent_queue_iterator_base@internal@tbb@@IAAXXZ ) __TBB_SYMBOL( ?assign@concurrent_queue_iterator_base@internal@tbb@@IAAXABV123@@Z ) __TBB_SYMBOL( ?internal_size@concurrent_queue_base@internal@tbb@@IBAHXZ ) __TBB_SYMBOL( ??0concurrent_queue_base@internal@tbb@@IAA@I@Z ) __TBB_SYMBOL( ??0concurrent_queue_iterator_base@internal@tbb@@IAA@ABVconcurrent_queue_base@12@@Z ) __TBB_SYMBOL( ??1concurrent_queue_base@internal@tbb@@MAA@XZ ) __TBB_SYMBOL( ??1concurrent_queue_iterator_base@internal@tbb@@IAA@XZ ) __TBB_SYMBOL( ?internal_pop@concurrent_queue_base@internal@tbb@@IAAXPAX@Z ) __TBB_SYMBOL( ?internal_pop_if_present@concurrent_queue_base@internal@tbb@@IAA_NPAX@Z ) __TBB_SYMBOL( ?internal_push@concurrent_queue_base@internal@tbb@@IAAXPBX@Z ) __TBB_SYMBOL( ?internal_push_if_not_full@concurrent_queue_base@internal@tbb@@IAA_NPBX@Z ) __TBB_SYMBOL( ?internal_set_capacity@concurrent_queue_base@internal@tbb@@IAAXHI@Z ) #endif // concurrent_queue v3 __TBB_SYMBOL( ??1concurrent_queue_iterator_base_v3@internal@tbb@@IAA@XZ ) __TBB_SYMBOL( ??0concurrent_queue_iterator_base_v3@internal@tbb@@IAA@ABVconcurrent_queue_base_v3@12@@Z ) __TBB_SYMBOL( ??0concurrent_queue_iterator_base_v3@internal@tbb@@IAA@ABVconcurrent_queue_base_v3@12@I@Z ) __TBB_SYMBOL( ?advance@concurrent_queue_iterator_base_v3@internal@tbb@@IAAXXZ ) __TBB_SYMBOL( ?assign@concurrent_queue_iterator_base_v3@internal@tbb@@IAAXABV123@@Z ) __TBB_SYMBOL( ??0concurrent_queue_base_v3@internal@tbb@@IAA@I@Z ) __TBB_SYMBOL( ??1concurrent_queue_base_v3@internal@tbb@@MAA@XZ ) __TBB_SYMBOL( ?internal_pop@concurrent_queue_base_v3@internal@tbb@@IAAXPAX@Z ) __TBB_SYMBOL( ?internal_pop_if_present@concurrent_queue_base_v3@internal@tbb@@IAA_NPAX@Z ) __TBB_SYMBOL( ?internal_abort@concurrent_queue_base_v3@internal@tbb@@IAAXXZ ) __TBB_SYMBOL( ?internal_push@concurrent_queue_base_v3@internal@tbb@@IAAXPBX@Z ) __TBB_SYMBOL( ?internal_push_move@concurrent_queue_base_v8@internal@tbb@@IAAXPBX@Z ) __TBB_SYMBOL( ?internal_push_if_not_full@concurrent_queue_base_v3@internal@tbb@@IAA_NPBX@Z ) __TBB_SYMBOL( ?internal_push_move_if_not_full@concurrent_queue_base_v8@internal@tbb@@IAA_NPBX@Z ) __TBB_SYMBOL( ?internal_size@concurrent_queue_base_v3@internal@tbb@@IBAHXZ ) __TBB_SYMBOL( ?internal_empty@concurrent_queue_base_v3@internal@tbb@@IBA_NXZ ) __TBB_SYMBOL( ?internal_set_capacity@concurrent_queue_base_v3@internal@tbb@@IAAXHI@Z ) __TBB_SYMBOL( ?internal_finish_clear@concurrent_queue_base_v3@internal@tbb@@IAAXXZ ) __TBB_SYMBOL( ?internal_throw_exception@concurrent_queue_base_v3@internal@tbb@@IBAXXZ ) __TBB_SYMBOL( ?assign@concurrent_queue_base_v3@internal@tbb@@IAAXABV123@@Z ) __TBB_SYMBOL( ?move_content@concurrent_queue_base_v8@internal@tbb@@IAAXAAV123@@Z ) #if !TBB_NO_LEGACY // concurrent_vector.cpp v2 __TBB_SYMBOL( ?internal_assign@concurrent_vector_base@internal@tbb@@IAAXABV123@IP6AXPAXI@ZP6AX1PBXI@Z4@Z ) __TBB_SYMBOL( ?internal_capacity@concurrent_vector_base@internal@tbb@@IBAIXZ ) __TBB_SYMBOL( ?internal_clear@concurrent_vector_base@internal@tbb@@IAAXP6AXPAXI@Z_N@Z ) __TBB_SYMBOL( ?internal_copy@concurrent_vector_base@internal@tbb@@IAAXABV123@IP6AXPAXPBXI@Z@Z ) __TBB_SYMBOL( ?internal_grow_by@concurrent_vector_base@internal@tbb@@IAAIIIP6AXPAXI@Z@Z ) __TBB_SYMBOL( ?internal_grow_to_at_least@concurrent_vector_base@internal@tbb@@IAAXIIP6AXPAXI@Z@Z ) __TBB_SYMBOL( ?internal_push_back@concurrent_vector_base@internal@tbb@@IAAPAXIAAI@Z ) __TBB_SYMBOL( ?internal_reserve@concurrent_vector_base@internal@tbb@@IAAXIII@Z ) #endif // concurrent_vector v3 __TBB_SYMBOL( ??1concurrent_vector_base_v3@internal@tbb@@IAA@XZ ) __TBB_SYMBOL( ?internal_assign@concurrent_vector_base_v3@internal@tbb@@IAAXABV123@IP6AXPAXI@ZP6AX1PBXI@Z4@Z ) __TBB_SYMBOL( ?internal_capacity@concurrent_vector_base_v3@internal@tbb@@IBAIXZ ) __TBB_SYMBOL( ?internal_clear@concurrent_vector_base_v3@internal@tbb@@IAAIP6AXPAXI@Z@Z ) __TBB_SYMBOL( ?internal_copy@concurrent_vector_base_v3@internal@tbb@@IAAXABV123@IP6AXPAXPBXI@Z@Z ) __TBB_SYMBOL( ?internal_grow_by@concurrent_vector_base_v3@internal@tbb@@IAAIIIP6AXPAXPBXI@Z1@Z ) __TBB_SYMBOL( ?internal_grow_to_at_least@concurrent_vector_base_v3@internal@tbb@@IAAXIIP6AXPAXPBXI@Z1@Z ) __TBB_SYMBOL( ?internal_push_back@concurrent_vector_base_v3@internal@tbb@@IAAPAXIAAI@Z ) __TBB_SYMBOL( ?internal_reserve@concurrent_vector_base_v3@internal@tbb@@IAAXIII@Z ) __TBB_SYMBOL( ?internal_compact@concurrent_vector_base_v3@internal@tbb@@IAAPAXIPAXP6AX0I@ZP6AX0PBXI@Z@Z ) __TBB_SYMBOL( ?internal_swap@concurrent_vector_base_v3@internal@tbb@@IAAXAAV123@@Z ) __TBB_SYMBOL( ?internal_throw_exception@concurrent_vector_base_v3@internal@tbb@@IBAXI@Z ) __TBB_SYMBOL( ?internal_resize@concurrent_vector_base_v3@internal@tbb@@IAAXIIIPBXP6AXPAXI@ZP6AX10I@Z@Z ) __TBB_SYMBOL( ?internal_grow_to_at_least_with_result@concurrent_vector_base_v3@internal@tbb@@IAAIIIP6AXPAXPBXI@Z1@Z ) // tbb_thread __TBB_SYMBOL( ?join@tbb_thread_v3@internal@tbb@@QAAXXZ ) __TBB_SYMBOL( ?detach@tbb_thread_v3@internal@tbb@@QAAXXZ ) __TBB_SYMBOL( ?internal_start@tbb_thread_v3@internal@tbb@@AAAXP6AIPAX@Z0@Z ) __TBB_SYMBOL( ?allocate_closure_v3@internal@tbb@@YAPAXI@Z ) __TBB_SYMBOL( ?free_closure_v3@internal@tbb@@YAXPAX@Z ) __TBB_SYMBOL( ?hardware_concurrency@tbb_thread_v3@internal@tbb@@SAIXZ ) __TBB_SYMBOL( ?thread_yield_v3@internal@tbb@@YAXXZ ) __TBB_SYMBOL( ?thread_sleep_v3@internal@tbb@@YAXABVinterval_t@tick_count@2@@Z ) __TBB_SYMBOL( ?move_v3@internal@tbb@@YAXAAVtbb_thread_v3@12@0@Z ) __TBB_SYMBOL( ?thread_get_id_v3@internal@tbb@@YA?AVid@tbb_thread_v3@12@XZ ) // condition_variable __TBB_SYMBOL( ?internal_initialize_condition_variable@internal@interface5@tbb@@YAXAATcondvar_impl_t@123@@Z ) __TBB_SYMBOL( ?internal_condition_variable_wait@internal@interface5@tbb@@YA_NAATcondvar_impl_t@123@PAVmutex@3@PBVinterval_t@tick_count@3@@Z ) __TBB_SYMBOL( ?internal_condition_variable_notify_one@internal@interface5@tbb@@YAXAATcondvar_impl_t@123@@Z ) __TBB_SYMBOL( ?internal_condition_variable_notify_all@internal@interface5@tbb@@YAXAATcondvar_impl_t@123@@Z ) __TBB_SYMBOL( ?internal_destroy_condition_variable@internal@interface5@tbb@@YAXAATcondvar_impl_t@123@@Z ) #undef __TBB_SYMBOL ================================================ FILE: benchmarks/tbb/x86_rtm_rw_mutex.cpp ================================================ /* Copyright 2005-2014 Intel Corporation. All Rights Reserved. This file is part of Threading Building Blocks. Threading Building Blocks is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. Threading Building Blocks is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Threading Building Blocks; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA As a special exception, you may use this file as part of a free software library without restriction. Specifically, if other files instantiate templates or use macros or inline functions from this file, or you compile this file and link it with other files to produce an executable, this file does not by itself cause the resulting executable to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the executable file might be covered by the GNU General Public License. */ #include "tbb/tbb_config.h" #if __TBB_TSX_AVAILABLE #include "tbb/spin_rw_mutex.h" #include "tbb/tbb_machine.h" #include "itt_notify.h" #include "governor.h" #include "tbb/atomic.h" // __TBB_RW_MUTEX_DELAY_TEST shifts the point where flags aborting speculation are // added to the read-set of the operation. If 1, will add the test just before // the transaction is ended. #ifndef __TBB_RW_MUTEX_DELAY_TEST #define __TBB_RW_MUTEX_DELAY_TEST 1 #endif #if defined(_MSC_VER) && defined(_Wp64) // Workaround for overzealous compiler warnings in /Wp64 mode #pragma warning (disable: 4244) #endif namespace tbb { namespace interface8 { namespace internal { // abort code for mutexes that detect a conflict with another thread. // value is hexadecimal enum { speculation_transaction_aborted = 0x01, speculation_can_retry = 0x02, speculation_memadd_conflict = 0x04, speculation_buffer_overflow = 0x08, speculation_breakpoint_hit = 0x10, speculation_nested_abort = 0x20, speculation_xabort_mask = 0xFF000000, speculation_xabort_shift = 24, speculation_retry = speculation_transaction_aborted | speculation_can_retry | speculation_memadd_conflict }; // maximum number of times to retry static const int retry_threshold_read = 10; static const int retry_threshold_write = 10; //! Release speculative mutex void x86_rtm_rw_mutex::internal_release(x86_rtm_rw_mutex::scoped_lock& s) { switch(s.transaction_state) { case RTM_transacting_writer: case RTM_transacting_reader: { __TBB_ASSERT(__TBB_machine_is_in_transaction(), "transaction_state && not speculating"); #if __TBB_RW_MUTEX_DELAY_TEST if(s.transaction_state == RTM_transacting_reader) { if(this->w_flag) __TBB_machine_transaction_conflict_abort(); } else { if(this->state) __TBB_machine_transaction_conflict_abort(); } #endif __TBB_machine_end_transaction(); s.my_scoped_lock.internal_set_mutex(NULL); } break; case RTM_real_reader: __TBB_ASSERT(!this->w_flag, "w_flag set but read lock acquired"); s.my_scoped_lock.release(); break; case RTM_real_writer: __TBB_ASSERT(this->w_flag, "w_flag unset but write lock acquired"); this->w_flag = false; s.my_scoped_lock.release(); break; case RTM_not_in_mutex: __TBB_ASSERT(false, "RTM_not_in_mutex, but in release"); default: __TBB_ASSERT(false, "invalid transaction_state"); } s.transaction_state = RTM_not_in_mutex; } //! Acquire write lock on the given mutex. void x86_rtm_rw_mutex::internal_acquire_writer(x86_rtm_rw_mutex::scoped_lock& s, bool only_speculate) { __TBB_ASSERT(s.transaction_state == RTM_not_in_mutex, "scoped_lock already in transaction"); if(tbb::internal::governor::speculation_enabled()) { int num_retries = 0; unsigned int abort_code; do { tbb::internal::atomic_backoff backoff; if(this->state) { if(only_speculate) return; do { backoff.pause(); // test the spin_rw_mutex (real readers or writers) } while(this->state); } // _xbegin returns -1 on success or the abort code, so capture it if(( abort_code = __TBB_machine_begin_transaction()) == ~(unsigned int)(0) ) { // started speculation #if !__TBB_RW_MUTEX_DELAY_TEST if(this->state) { // add spin_rw_mutex to read-set. // reader or writer grabbed the lock, so abort. __TBB_machine_transaction_conflict_abort(); } #endif s.transaction_state = RTM_transacting_writer; s.my_scoped_lock.internal_set_mutex(this); // need mutex for release() return; // successfully started speculation } ++num_retries; } while( (abort_code & speculation_retry) != 0 && (num_retries < retry_threshold_write) ); } if(only_speculate) return; // should apply a real try_lock... s.my_scoped_lock.acquire(*this, true); // kill transactional writers __TBB_ASSERT(!w_flag, "After acquire for write, w_flag already true"); w_flag = true; // kill transactional readers s.transaction_state = RTM_real_writer; return; } //! Acquire read lock on given mutex. // only_speculate : true if we are doing a try_acquire. If true and we fail to speculate, don't // really acquire the lock, return and do a try_acquire on the contained spin_rw_mutex. If // the lock is already held by a writer, just return. void x86_rtm_rw_mutex::internal_acquire_reader(x86_rtm_rw_mutex::scoped_lock& s, bool only_speculate) { __TBB_ASSERT(s.transaction_state == RTM_not_in_mutex, "scoped_lock already in transaction"); if(tbb::internal::governor::speculation_enabled()) { int num_retries = 0; unsigned int abort_code; do { tbb::internal::atomic_backoff backoff; // if in try_acquire, and lock is held as writer, don't attempt to speculate. if(w_flag) { if(only_speculate) return; do { backoff.pause(); // test the spin_rw_mutex (real readers or writers) } while(w_flag); } // _xbegin returns -1 on success or the abort code, so capture it if((abort_code = __TBB_machine_begin_transaction()) == ~(unsigned int)(0) ) { // started speculation #if !__TBB_RW_MUTEX_DELAY_TEST if(w_flag) { // add w_flag to read-set. __TBB_machine_transaction_conflict_abort(); // writer grabbed the lock, so abort. } #endif s.transaction_state = RTM_transacting_reader; s.my_scoped_lock.internal_set_mutex(this); // need mutex for release() return; // successfully started speculation } // fallback path // retry only if there is any hope of getting into a transaction soon // Retry in the following cases (from Section 8.3.5 of Intel(R) // Architecture Instruction Set Extensions Programming Reference): // 1. abort caused by XABORT instruction (bit 0 of EAX register is set) // 2. the transaction may succeed on a retry (bit 1 of EAX register is set) // 3. if another logical processor conflicted with a memory address // that was part of the transaction that aborted (bit 2 of EAX register is set) // That is, retry if (abort_code & 0x7) is non-zero ++num_retries; } while( (abort_code & speculation_retry) != 0 && (num_retries < retry_threshold_read) ); } if(only_speculate) return; s.my_scoped_lock.acquire( *this, false ); s.transaction_state = RTM_real_reader; } //! Upgrade reader to become a writer. /** Returns whether the upgrade happened without releasing and re-acquiring the lock */ bool x86_rtm_rw_mutex::internal_upgrade(x86_rtm_rw_mutex::scoped_lock& s) { switch(s.transaction_state) { case RTM_real_reader: { s.transaction_state = RTM_real_writer; bool no_release = s.my_scoped_lock.upgrade_to_writer(); __TBB_ASSERT(!w_flag, "After upgrade_to_writer, w_flag already true"); w_flag = true; return no_release; } case RTM_transacting_reader: s.transaction_state = RTM_transacting_writer; // don't need to add w_flag to read_set even if __TBB_RW_MUTEX_DELAY_TEST // because the this pointer (the spin_rw_mutex) will be sufficient on release. return true; default: __TBB_ASSERT(false, "Invalid state for upgrade"); return false; } } //! Downgrade writer to a reader. bool x86_rtm_rw_mutex::internal_downgrade(x86_rtm_rw_mutex::scoped_lock& s) { switch(s.transaction_state) { case RTM_real_writer: s.transaction_state = RTM_real_reader; __TBB_ASSERT(w_flag, "Before downgrade_to_reader w_flag not true"); w_flag = false; return s.my_scoped_lock.downgrade_to_reader(); case RTM_transacting_writer: #if __TBB_RW_MUTEX_DELAY_TEST if(this->state) { // a reader or writer has acquired mutex for real. __TBB_machine_transaction_conflict_abort(); } #endif s.transaction_state = RTM_transacting_reader; return true; default: __TBB_ASSERT(false, "Invalid state for downgrade"); return false; } } //! Try to acquire write lock on the given mutex. // There may be reader(s) which acquired the spin_rw_mutex, as well as possibly // transactional reader(s). If this is the case, the acquire will fail, and assigning // w_flag will kill the transactors. So we only assign w_flag if we have successfully // acquired the lock. bool x86_rtm_rw_mutex::internal_try_acquire_writer(x86_rtm_rw_mutex::scoped_lock& s) { internal_acquire_writer(s, /*only_speculate=*/true); if(s.transaction_state == RTM_transacting_writer) { return true; } __TBB_ASSERT(s.transaction_state == RTM_not_in_mutex, "Trying to acquire writer which is already allocated"); // transacting write acquire failed. try_acquire the real mutex bool result = s.my_scoped_lock.try_acquire(*this, true); if(result) { // only shoot down readers if we're not transacting ourselves __TBB_ASSERT(!w_flag, "After try_acquire_writer, w_flag already true"); w_flag = true; s.transaction_state = RTM_real_writer; } return result; } void x86_rtm_rw_mutex::internal_construct() { ITT_SYNC_CREATE(this, _T("tbb::x86_rtm_rw_mutex"), _T("")); } } // namespace internal } // namespace interface8 } // namespace tbb #endif /* __TBB_TSX_AVAILABLE */ ================================================ FILE: benchmarks/tbb/xbox360-tbb-export.def ================================================ ; Copyright 2005-2014 Intel Corporation. All Rights Reserved. ; ; This file is part of Threading Building Blocks. Threading Building Blocks is free software; ; you can redistribute it and/or modify it under the terms of the GNU General Public License ; version 2 as published by the Free Software Foundation. Threading Building Blocks is ; distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the ; implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. ; See the GNU General Public License for more details. You should have received a copy of ; the GNU General Public License along with Threading Building Blocks; if not, write to the ; Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA ; ; As a special exception, you may use this file as part of a free software library without ; restriction. Specifically, if other files instantiate templates or use macros or inline ; functions from this file, or you compile this file and link it with other files to produce ; an executable, this file does not by itself cause the resulting executable to be covered ; by the GNU General Public License. This exception does not however invalidate any other ; reasons why the executable file might be covered by the GNU General Public License. EXPORTS ; Assembly-language support that is called directly by clients ;__TBB_machine_cmpswp1 ;__TBB_machine_cmpswp2 ;__TBB_machine_cmpswp4 ;__TBB_machine_cmpswp8 ;__TBB_machine_fetchadd1 ;__TBB_machine_fetchadd2 ;__TBB_machine_fetchadd4 ;__TBB_machine_fetchadd8 ;__TBB_machine_fetchstore1 ;__TBB_machine_fetchstore2 ;__TBB_machine_fetchstore4 ;__TBB_machine_fetchstore8 ;__TBB_machine_store8 ;__TBB_machine_load8 ;__TBB_machine_trylockbyte ; cache_aligned_allocator.cpp ?NFS_Allocate@internal@tbb@@YAPAXIIPAX@Z @1 ?NFS_GetLineSize@internal@tbb@@YAIXZ @2 ?NFS_Free@internal@tbb@@YAXPAX@Z @3 ?allocate_via_handler_v3@internal@tbb@@YAPAXI@Z @4 ?deallocate_via_handler_v3@internal@tbb@@YAXPAX@Z @5 ?is_malloc_used_v3@internal@tbb@@YA_NXZ @6 ; task.cpp v3 ?allocate@allocate_additional_child_of_proxy@internal@tbb@@QBAAAVtask@3@I@Z @7 ?allocate@allocate_child_proxy@internal@tbb@@QBAAAVtask@3@I@Z @8 ?allocate@allocate_continuation_proxy@internal@tbb@@QBAAAVtask@3@I@Z @9 ?allocate@allocate_root_proxy@internal@tbb@@SAAAVtask@3@I@Z @10 ?destroy@task@tbb@@QAAXAAV12@@Z @11 ?free@allocate_additional_child_of_proxy@internal@tbb@@QBAXAAVtask@3@@Z @12 ?free@allocate_child_proxy@internal@tbb@@QBAXAAVtask@3@@Z @13 ?free@allocate_continuation_proxy@internal@tbb@@QBAXAAVtask@3@@Z @14 ?free@allocate_root_proxy@internal@tbb@@SAXAAVtask@3@@Z @15 ?internal_set_ref_count@task@tbb@@AAAXH@Z @16 ?is_owned_by_current_thread@task@tbb@@QBA_NXZ @17 ?note_affinity@task@tbb@@UAAXG@Z @18 ?resize@affinity_partitioner_base_v3@internal@tbb@@AAAXI@Z @19 ?self@task@tbb@@SAAAV12@XZ @20 ?spawn_and_wait_for_all@task@tbb@@QAAXAAVtask_list@2@@Z @21 ?default_num_threads@task_scheduler_init@tbb@@SAHXZ @22 ?initialize@task_scheduler_init@tbb@@QAAXHI@Z @23 ?initialize@task_scheduler_init@tbb@@QAAXH@Z @24 ?terminate@task_scheduler_init@tbb@@QAAXXZ @25 ?observe@task_scheduler_observer_v3@internal@tbb@@QAAX_N@Z @26 ; exception handling support ?allocate@allocate_root_with_context_proxy@internal@tbb@@QBAAAVtask@3@I@Z @27 ?free@allocate_root_with_context_proxy@internal@tbb@@QBAXAAVtask@3@@Z @28 ?is_group_execution_cancelled@task_group_context@tbb@@QBA_NXZ @29 ?cancel_group_execution@task_group_context@tbb@@QAA_NXZ @30 ?reset@task_group_context@tbb@@QAAXXZ @31 ?init@task_group_context@tbb@@IAAXXZ @32 ??1task_group_context@tbb@@QAA@XZ @33 ?name@captured_exception@tbb@@UBAPBDXZ @34 ?what@captured_exception@tbb@@UBAPBDXZ @35 ??1captured_exception@tbb@@UAA@XZ @36 ; tbb_misc.cpp ?assertion_failure@tbb@@YAXPBDH00@Z @37 ?get_initial_auto_partitioner_divisor@internal@tbb@@YAIXZ @38 ?handle_perror@internal@tbb@@YAXHPBD@Z @39 ?set_assertion_handler@tbb@@YAP6AXPBDH00@ZP6AX0H00@Z@Z @40 ?runtime_warning@internal@tbb@@YAXPBDZZ @41 ; tbb_main.cpp ?itt_load_pointer_with_acquire_v3@internal@tbb@@YAPAXPBX@Z @42 ?itt_store_pointer_with_release_v3@internal@tbb@@YAXPAX0@Z @43 ; pipeline.cpp ??0pipeline@tbb@@QAA@XZ @44 ??1filter@tbb@@UAA@XZ @45 ??1pipeline@tbb@@UAA@XZ @46 ??_7pipeline@tbb@@6B@ @47 ?add_filter@pipeline@tbb@@QAAXAAVfilter@2@@Z @48 ?clear@pipeline@tbb@@QAAXXZ @49 ?inject_token@pipeline@tbb@@AAAXAAVtask@2@@Z @50 ?run@pipeline@tbb@@QAAXI@Z @51 ; queuing_rw_mutex.cpp ?acquire@scoped_lock@queuing_rw_mutex@tbb@@QAAXAAV23@_N@Z @52 ?downgrade_to_reader@scoped_lock@queuing_rw_mutex@tbb@@QAA_NXZ @53 ?release@scoped_lock@queuing_rw_mutex@tbb@@QAAXXZ @54 ?upgrade_to_writer@scoped_lock@queuing_rw_mutex@tbb@@QAA_NXZ @55 ?try_acquire@scoped_lock@queuing_rw_mutex@tbb@@QAA_NAAV23@_N@Z @56 #if !TBB_NO_LEGACY ; spin_rw_mutex.cpp v2 ?internal_acquire_reader@spin_rw_mutex@tbb@@CAXPAV12@@Z @57 ?internal_acquire_writer@spin_rw_mutex@tbb@@CA_NPAV12@@Z @58 ?internal_downgrade@spin_rw_mutex@tbb@@CAXPAV12@@Z @59 ?internal_itt_releasing@spin_rw_mutex@tbb@@CAXPAV12@@Z @60 ?internal_release_reader@spin_rw_mutex@tbb@@CAXPAV12@@Z @61 ?internal_release_writer@spin_rw_mutex@tbb@@CAXPAV12@@Z @62 ?internal_upgrade@spin_rw_mutex@tbb@@CA_NPAV12@@Z @63 ?internal_try_acquire_writer@spin_rw_mutex@tbb@@CA_NPAV12@@Z @64 ?internal_try_acquire_reader@spin_rw_mutex@tbb@@CA_NPAV12@@Z @65 #endif ; spin_rw_mutex v3 ?internal_upgrade@spin_rw_mutex_v3@tbb@@AAA_NXZ @66 ?internal_downgrade@spin_rw_mutex_v3@tbb@@AAAXXZ @67 ?internal_acquire_reader@spin_rw_mutex_v3@tbb@@AAAXXZ @68 ?internal_acquire_writer@spin_rw_mutex_v3@tbb@@AAA_NXZ @69 ?internal_release_reader@spin_rw_mutex_v3@tbb@@AAAXXZ @70 ?internal_release_writer@spin_rw_mutex_v3@tbb@@AAAXXZ @71 ?internal_try_acquire_reader@spin_rw_mutex_v3@tbb@@AAA_NXZ @72 ?internal_try_acquire_writer@spin_rw_mutex_v3@tbb@@AAA_NXZ @73 ; spin_mutex.cpp ?internal_acquire@scoped_lock@spin_mutex@tbb@@AAAXAAV23@@Z @74 ?internal_release@scoped_lock@spin_mutex@tbb@@AAAXXZ @75 ?internal_try_acquire@scoped_lock@spin_mutex@tbb@@AAA_NAAV23@@Z @76 ; mutex.cpp ?internal_acquire@scoped_lock@mutex@tbb@@AAAXAAV23@@Z @77 ?internal_release@scoped_lock@mutex@tbb@@AAAXXZ @78 ?internal_try_acquire@scoped_lock@mutex@tbb@@AAA_NAAV23@@Z @79 ?internal_construct@mutex@tbb@@AAAXXZ @80 ?internal_destroy@mutex@tbb@@AAAXXZ @81 ; recursive_mutex.cpp ?internal_acquire@scoped_lock@recursive_mutex@tbb@@AAAXAAV23@@Z @82 ?internal_release@scoped_lock@recursive_mutex@tbb@@AAAXXZ @83 ?internal_try_acquire@scoped_lock@recursive_mutex@tbb@@AAA_NAAV23@@Z @84 ?internal_construct@recursive_mutex@tbb@@AAAXXZ @85 ?internal_destroy@recursive_mutex@tbb@@AAAXXZ @86 ; queuing_mutex.cpp ?acquire@scoped_lock@queuing_mutex@tbb@@QAAXAAV23@@Z @87 ?release@scoped_lock@queuing_mutex@tbb@@QAAXXZ @88 ?try_acquire@scoped_lock@queuing_mutex@tbb@@QAA_NAAV23@@Z @89 ; concurrent_hash_map.cpp ?internal_grow_predicate@hash_map_segment_base@internal@tbb@@QBA_NXZ @90 #if !TBB_NO_LEGACY ; concurrent_queue.cpp v2 ?advance@concurrent_queue_iterator_base@internal@tbb@@IAAXXZ @91 ?assign@concurrent_queue_iterator_base@internal@tbb@@IAAXABV123@@Z @92 ?internal_size@concurrent_queue_base@internal@tbb@@IBAHXZ @93 ??0concurrent_queue_base@internal@tbb@@IAA@I@Z @94 ??0concurrent_queue_iterator_base@internal@tbb@@IAA@ABVconcurrent_queue_base@12@@Z @95 ??1concurrent_queue_base@internal@tbb@@MAA@XZ @96 ??1concurrent_queue_iterator_base@internal@tbb@@IAA@XZ @97 ?internal_pop@concurrent_queue_base@internal@tbb@@IAAXPAX@Z @98 ?internal_pop_if_present@concurrent_queue_base@internal@tbb@@IAA_NPAX@Z @99 ?internal_push@concurrent_queue_base@internal@tbb@@IAAXPBX@Z @100 ?internal_push_if_not_full@concurrent_queue_base@internal@tbb@@IAA_NPBX@Z @101 ?internal_set_capacity@concurrent_queue_base@internal@tbb@@IAAXHI@Z @102 #endif ; concurrent_queue v3 ??1concurrent_queue_iterator_base_v3@internal@tbb@@IAA@XZ @103 ??0concurrent_queue_iterator_base_v3@internal@tbb@@IAA@ABVconcurrent_queue_base_v3@12@@Z @104 ?advance@concurrent_queue_iterator_base_v3@internal@tbb@@IAAXXZ @105 ?assign@concurrent_queue_iterator_base_v3@internal@tbb@@IAAXABV123@@Z @106 ??0concurrent_queue_base_v3@internal@tbb@@IAA@I@Z @107 ??1concurrent_queue_base_v3@internal@tbb@@MAA@XZ @108 ?internal_pop@concurrent_queue_base_v3@internal@tbb@@IAAXPAX@Z @109 ?internal_pop_if_present@concurrent_queue_base_v3@internal@tbb@@IAA_NPAX@Z @110 ?internal_push@concurrent_queue_base_v3@internal@tbb@@IAAXPBX@Z @111 ?internal_push_if_not_full@concurrent_queue_base_v3@internal@tbb@@IAA_NPBX@Z @112 ?internal_size@concurrent_queue_base_v3@internal@tbb@@IBAHXZ @113 ?internal_set_capacity@concurrent_queue_base_v3@internal@tbb@@IAAXHI@Z @114 ?internal_finish_clear@concurrent_queue_base_v3@internal@tbb@@IAAXXZ @115 ?internal_throw_exception@concurrent_queue_base_v3@internal@tbb@@IBAXXZ @116 #if !TBB_NO_LEGACY ; concurrent_vector.cpp v2 ?internal_assign@concurrent_vector_base@internal@tbb@@IAAXABV123@IP6AXPAXI@ZP6AX1PBXI@Z4@Z @117 ?internal_capacity@concurrent_vector_base@internal@tbb@@IBAIXZ @118 ?internal_clear@concurrent_vector_base@internal@tbb@@IAAXP6AXPAXI@Z_N@Z @119 ?internal_copy@concurrent_vector_base@internal@tbb@@IAAXABV123@IP6AXPAXPBXI@Z@Z @120 ?internal_grow_by@concurrent_vector_base@internal@tbb@@IAAIIIP6AXPAXI@Z@Z @121 ?internal_grow_to_at_least@concurrent_vector_base@internal@tbb@@IAAXIIP6AXPAXI@Z@Z @122 ?internal_push_back@concurrent_vector_base@internal@tbb@@IAAPAXIAAI@Z @123 ?internal_reserve@concurrent_vector_base@internal@tbb@@IAAXIII@Z @124 #endif ; concurrent_vector v3 ??1concurrent_vector_base_v3@internal@tbb@@IAA@XZ @125 ?internal_assign@concurrent_vector_base_v3@internal@tbb@@IAAXABV123@IP6AXPAXI@ZP6AX1PBXI@Z4@Z @126 ?internal_capacity@concurrent_vector_base_v3@internal@tbb@@IBAIXZ @127 ?internal_clear@concurrent_vector_base_v3@internal@tbb@@IAAIP6AXPAXI@Z@Z @128 ?internal_copy@concurrent_vector_base_v3@internal@tbb@@IAAXABV123@IP6AXPAXPBXI@Z@Z @129 ?internal_grow_by@concurrent_vector_base_v3@internal@tbb@@IAAIIIP6AXPAXPBXI@Z1@Z @130 ?internal_grow_to_at_least@concurrent_vector_base_v3@internal@tbb@@IAAXIIP6AXPAXPBXI@Z1@Z @131 ?internal_push_back@concurrent_vector_base_v3@internal@tbb@@IAAPAXIAAI@Z @132 ?internal_reserve@concurrent_vector_base_v3@internal@tbb@@IAAXIII@Z @133 ?internal_compact@concurrent_vector_base_v3@internal@tbb@@IAAPAXIPAXP6AX0I@ZP6AX0PBXI@Z@Z @134 ?internal_swap@concurrent_vector_base_v3@internal@tbb@@IAAXAAV123@@Z @135 ?internal_throw_exception@concurrent_vector_base_v3@internal@tbb@@IBAXI@Z @136 ; tbb_thread ?join@tbb_thread_v3@internal@tbb@@QAAXXZ @137 ?detach@tbb_thread_v3@internal@tbb@@QAAXXZ @138 ?internal_start@tbb_thread_v3@internal@tbb@@AAAXP6AIPAX@Z0@Z @139 ?allocate_closure_v3@internal@tbb@@YAPAXI@Z @140 ?free_closure_v3@internal@tbb@@YAXPAX@Z @141 ?hardware_concurrency@tbb_thread_v3@internal@tbb@@SAIXZ @142 ?thread_yield_v3@internal@tbb@@YAXXZ @143 ?thread_sleep_v3@internal@tbb@@YAXABVinterval_t@tick_count@2@@Z @144 ?move_v3@internal@tbb@@YAXAAVtbb_thread_v3@12@0@Z @145 ?thread_get_id_v3@internal@tbb@@YA?AVid@tbb_thread_v3@12@XZ @146 ================================================ FILE: benchmarks/tbbqueue.h ================================================ #pragma once #include #include "tbb/concurrent_queue.h" #include "wrappers.h" template struct TbbQueueWrapper { public: typedef DummyToken producer_token_t; typedef DummyToken consumer_token_t; public: template inline bool enqueue(U&& item) { q.push(std::forward(item)); return true; // assume successful allocation for the sake of the benchmarks } inline bool try_dequeue(T& item) { return q.try_pop(item); } // Dummy token methods (not used) bool enqueue(producer_token_t const&, T const&) { return false; } bool try_enqueue(producer_token_t, T const&) { return false; } bool try_dequeue(consumer_token_t, T& item) { return false; } template bool enqueue_bulk(It, size_t) { return false; } template bool enqueue_bulk(producer_token_t const&, It, size_t) { return false; } template size_t try_dequeue_bulk(It, size_t) { return 0; } template size_t try_dequeue_bulk(consumer_token_t, It, size_t) { return 0; } private: tbb::concurrent_queue q; }; ================================================ FILE: benchmarks/wrappers.h ================================================ #pragma once struct DummyToken { template DummyToken(TQueue const&) { } }; ================================================ FILE: blockingconcurrentqueue.h ================================================ // Provides an efficient blocking version of moodycamel::ConcurrentQueue. // ©2015-2020 Cameron Desrochers. Distributed under the terms of the simplified // BSD license, available at the top of concurrentqueue.h. // Also dual-licensed under the Boost Software License (see LICENSE.md) // Uses Jeff Preshing's semaphore implementation (under the terms of its // separate zlib license, see lightweightsemaphore.h). #pragma once #include "concurrentqueue.h" #include "lightweightsemaphore.h" #include #include #include #include #include namespace moodycamel { // This is a blocking version of the queue. It has an almost identical interface to // the normal non-blocking version, with the addition of various wait_dequeue() methods // and the removal of producer-specific dequeue methods. template class BlockingConcurrentQueue { private: typedef ::moodycamel::ConcurrentQueue ConcurrentQueue; typedef ::moodycamel::LightweightSemaphore LightweightSemaphore; public: typedef typename ConcurrentQueue::producer_token_t producer_token_t; typedef typename ConcurrentQueue::consumer_token_t consumer_token_t; typedef typename ConcurrentQueue::index_t index_t; typedef typename ConcurrentQueue::size_t size_t; typedef typename std::make_signed::type ssize_t; static const size_t BLOCK_SIZE = ConcurrentQueue::BLOCK_SIZE; static const size_t EXPLICIT_BLOCK_EMPTY_COUNTER_THRESHOLD = ConcurrentQueue::EXPLICIT_BLOCK_EMPTY_COUNTER_THRESHOLD; static const size_t EXPLICIT_INITIAL_INDEX_SIZE = ConcurrentQueue::EXPLICIT_INITIAL_INDEX_SIZE; static const size_t IMPLICIT_INITIAL_INDEX_SIZE = ConcurrentQueue::IMPLICIT_INITIAL_INDEX_SIZE; static const size_t INITIAL_IMPLICIT_PRODUCER_HASH_SIZE = ConcurrentQueue::INITIAL_IMPLICIT_PRODUCER_HASH_SIZE; static const std::uint32_t EXPLICIT_CONSUMER_CONSUMPTION_QUOTA_BEFORE_ROTATE = ConcurrentQueue::EXPLICIT_CONSUMER_CONSUMPTION_QUOTA_BEFORE_ROTATE; static const size_t MAX_SUBQUEUE_SIZE = ConcurrentQueue::MAX_SUBQUEUE_SIZE; public: // Creates a queue with at least `capacity` element slots; note that the // actual number of elements that can be inserted without additional memory // allocation depends on the number of producers and the block size (e.g. if // the block size is equal to `capacity`, only a single block will be allocated // up-front, which means only a single producer will be able to enqueue elements // without an extra allocation -- blocks aren't shared between producers). // This method is not thread safe -- it is up to the user to ensure that the // queue is fully constructed before it starts being used by other threads (this // includes making the memory effects of construction visible, possibly with a // memory barrier). explicit BlockingConcurrentQueue(size_t capacity = 6 * BLOCK_SIZE) : inner(capacity), sema(create(0, (int)Traits::MAX_SEMA_SPINS), &BlockingConcurrentQueue::template destroy) { assert(reinterpret_cast((BlockingConcurrentQueue*)1) == &((BlockingConcurrentQueue*)1)->inner && "BlockingConcurrentQueue must have ConcurrentQueue as its first member"); if (!sema) { MOODYCAMEL_THROW(std::bad_alloc()); } } BlockingConcurrentQueue(size_t minCapacity, size_t maxExplicitProducers, size_t maxImplicitProducers) : inner(minCapacity, maxExplicitProducers, maxImplicitProducers), sema(create(0, (int)Traits::MAX_SEMA_SPINS), &BlockingConcurrentQueue::template destroy) { assert(reinterpret_cast((BlockingConcurrentQueue*)1) == &((BlockingConcurrentQueue*)1)->inner && "BlockingConcurrentQueue must have ConcurrentQueue as its first member"); if (!sema) { MOODYCAMEL_THROW(std::bad_alloc()); } } // Disable copying and copy assignment BlockingConcurrentQueue(BlockingConcurrentQueue const&) MOODYCAMEL_DELETE_FUNCTION; BlockingConcurrentQueue& operator=(BlockingConcurrentQueue const&) MOODYCAMEL_DELETE_FUNCTION; // Moving is supported, but note that it is *not* a thread-safe operation. // Nobody can use the queue while it's being moved, and the memory effects // of that move must be propagated to other threads before they can use it. // Note: When a queue is moved, its tokens are still valid but can only be // used with the destination queue (i.e. semantically they are moved along // with the queue itself). BlockingConcurrentQueue(BlockingConcurrentQueue&& other) MOODYCAMEL_NOEXCEPT : inner(std::move(other.inner)), sema(std::move(other.sema)) { } inline BlockingConcurrentQueue& operator=(BlockingConcurrentQueue&& other) MOODYCAMEL_NOEXCEPT { return swap_internal(other); } // Swaps this queue's state with the other's. Not thread-safe. // Swapping two queues does not invalidate their tokens, however // the tokens that were created for one queue must be used with // only the swapped queue (i.e. the tokens are tied to the // queue's movable state, not the object itself). inline void swap(BlockingConcurrentQueue& other) MOODYCAMEL_NOEXCEPT { swap_internal(other); } private: BlockingConcurrentQueue& swap_internal(BlockingConcurrentQueue& other) { if (this == &other) { return *this; } inner.swap(other.inner); sema.swap(other.sema); return *this; } public: // Enqueues a single item (by copying it). // Allocates memory if required. Only fails if memory allocation fails (or implicit // production is disabled because Traits::INITIAL_IMPLICIT_PRODUCER_HASH_SIZE is 0, // or Traits::MAX_SUBQUEUE_SIZE has been defined and would be surpassed). // Thread-safe. inline bool enqueue(T const& item) { if ((details::likely)(inner.enqueue(item))) { sema->signal(); return true; } return false; } // Enqueues a single item (by moving it, if possible). // Allocates memory if required. Only fails if memory allocation fails (or implicit // production is disabled because Traits::INITIAL_IMPLICIT_PRODUCER_HASH_SIZE is 0, // or Traits::MAX_SUBQUEUE_SIZE has been defined and would be surpassed). // Thread-safe. inline bool enqueue(T&& item) { if ((details::likely)(inner.enqueue(std::move(item)))) { sema->signal(); return true; } return false; } // Enqueues a single item (by copying it) using an explicit producer token. // Allocates memory if required. Only fails if memory allocation fails (or // Traits::MAX_SUBQUEUE_SIZE has been defined and would be surpassed). // Thread-safe. inline bool enqueue(producer_token_t const& token, T const& item) { if ((details::likely)(inner.enqueue(token, item))) { sema->signal(); return true; } return false; } // Enqueues a single item (by moving it, if possible) using an explicit producer token. // Allocates memory if required. Only fails if memory allocation fails (or // Traits::MAX_SUBQUEUE_SIZE has been defined and would be surpassed). // Thread-safe. inline bool enqueue(producer_token_t const& token, T&& item) { if ((details::likely)(inner.enqueue(token, std::move(item)))) { sema->signal(); return true; } return false; } // Enqueues several items. // Allocates memory if required. Only fails if memory allocation fails (or // implicit production is disabled because Traits::INITIAL_IMPLICIT_PRODUCER_HASH_SIZE // is 0, or Traits::MAX_SUBQUEUE_SIZE has been defined and would be surpassed). // Note: Use std::make_move_iterator if the elements should be moved instead of copied. // Thread-safe. template inline bool enqueue_bulk(It itemFirst, size_t count) { if ((details::likely)(inner.enqueue_bulk(std::forward(itemFirst), count))) { sema->signal((LightweightSemaphore::ssize_t)(ssize_t)count); return true; } return false; } // Enqueues several items using an explicit producer token. // Allocates memory if required. Only fails if memory allocation fails // (or Traits::MAX_SUBQUEUE_SIZE has been defined and would be surpassed). // Note: Use std::make_move_iterator if the elements should be moved // instead of copied. // Thread-safe. template inline bool enqueue_bulk(producer_token_t const& token, It itemFirst, size_t count) { if ((details::likely)(inner.enqueue_bulk(token, std::forward(itemFirst), count))) { sema->signal((LightweightSemaphore::ssize_t)(ssize_t)count); return true; } return false; } // Enqueues a single item (by copying it). // Does not allocate memory. Fails if not enough room to enqueue (or implicit // production is disabled because Traits::INITIAL_IMPLICIT_PRODUCER_HASH_SIZE // is 0). // Thread-safe. inline bool try_enqueue(T const& item) { if (inner.try_enqueue(item)) { sema->signal(); return true; } return false; } // Enqueues a single item (by moving it, if possible). // Does not allocate memory (except for one-time implicit producer). // Fails if not enough room to enqueue (or implicit production is // disabled because Traits::INITIAL_IMPLICIT_PRODUCER_HASH_SIZE is 0). // Thread-safe. inline bool try_enqueue(T&& item) { if (inner.try_enqueue(std::move(item))) { sema->signal(); return true; } return false; } // Enqueues a single item (by copying it) using an explicit producer token. // Does not allocate memory. Fails if not enough room to enqueue. // Thread-safe. inline bool try_enqueue(producer_token_t const& token, T const& item) { if (inner.try_enqueue(token, item)) { sema->signal(); return true; } return false; } // Enqueues a single item (by moving it, if possible) using an explicit producer token. // Does not allocate memory. Fails if not enough room to enqueue. // Thread-safe. inline bool try_enqueue(producer_token_t const& token, T&& item) { if (inner.try_enqueue(token, std::move(item))) { sema->signal(); return true; } return false; } // Enqueues several items. // Does not allocate memory (except for one-time implicit producer). // Fails if not enough room to enqueue (or implicit production is // disabled because Traits::INITIAL_IMPLICIT_PRODUCER_HASH_SIZE is 0). // Note: Use std::make_move_iterator if the elements should be moved // instead of copied. // Thread-safe. template inline bool try_enqueue_bulk(It itemFirst, size_t count) { if (inner.try_enqueue_bulk(std::forward(itemFirst), count)) { sema->signal((LightweightSemaphore::ssize_t)(ssize_t)count); return true; } return false; } // Enqueues several items using an explicit producer token. // Does not allocate memory. Fails if not enough room to enqueue. // Note: Use std::make_move_iterator if the elements should be moved // instead of copied. // Thread-safe. template inline bool try_enqueue_bulk(producer_token_t const& token, It itemFirst, size_t count) { if (inner.try_enqueue_bulk(token, std::forward(itemFirst), count)) { sema->signal((LightweightSemaphore::ssize_t)(ssize_t)count); return true; } return false; } // Attempts to dequeue from the queue. // Returns false if all producer streams appeared empty at the time they // were checked (so, the queue is likely but not guaranteed to be empty). // Never allocates. Thread-safe. template inline bool try_dequeue(U& item) { if (sema->tryWait()) { while (!inner.try_dequeue(item)) { continue; } return true; } return false; } // Attempts to dequeue from the queue using an explicit consumer token. // Returns false if all producer streams appeared empty at the time they // were checked (so, the queue is likely but not guaranteed to be empty). // Never allocates. Thread-safe. template inline bool try_dequeue(consumer_token_t& token, U& item) { if (sema->tryWait()) { while (!inner.try_dequeue(token, item)) { continue; } return true; } return false; } // Attempts to dequeue several elements from the queue. // Returns the number of items actually dequeued. // Returns 0 if all producer streams appeared empty at the time they // were checked (so, the queue is likely but not guaranteed to be empty). // Never allocates. Thread-safe. template inline size_t try_dequeue_bulk(It itemFirst, size_t max) { size_t count = 0; max = (size_t)sema->tryWaitMany((LightweightSemaphore::ssize_t)(ssize_t)max); while (count != max) { count += inner.template try_dequeue_bulk(itemFirst, max - count); } return count; } // Attempts to dequeue several elements from the queue using an explicit consumer token. // Returns the number of items actually dequeued. // Returns 0 if all producer streams appeared empty at the time they // were checked (so, the queue is likely but not guaranteed to be empty). // Never allocates. Thread-safe. template inline size_t try_dequeue_bulk(consumer_token_t& token, It itemFirst, size_t max) { size_t count = 0; max = (size_t)sema->tryWaitMany((LightweightSemaphore::ssize_t)(ssize_t)max); while (count != max) { count += inner.template try_dequeue_bulk(token, itemFirst, max - count); } return count; } // Blocks the current thread until there's something to dequeue, then // dequeues it. // Never allocates. Thread-safe. template inline void wait_dequeue(U& item) { while (!sema->wait()) { continue; } while (!inner.try_dequeue(item)) { continue; } } // Blocks the current thread until either there's something to dequeue // or the timeout (specified in microseconds) expires. Returns false // without setting `item` if the timeout expires, otherwise assigns // to `item` and returns true. // Using a negative timeout indicates an indefinite timeout, // and is thus functionally equivalent to calling wait_dequeue. // Never allocates. Thread-safe. template inline bool wait_dequeue_timed(U& item, std::int64_t timeout_usecs) { if (!sema->wait(timeout_usecs)) { return false; } while (!inner.try_dequeue(item)) { continue; } return true; } // Blocks the current thread until either there's something to dequeue // or the timeout expires. Returns false without setting `item` if the // timeout expires, otherwise assigns to `item` and returns true. // Never allocates. Thread-safe. template inline bool wait_dequeue_timed(U& item, std::chrono::duration const& timeout) { return wait_dequeue_timed(item, std::chrono::duration_cast(timeout).count()); } // Blocks the current thread until there's something to dequeue, then // dequeues it using an explicit consumer token. // Never allocates. Thread-safe. template inline void wait_dequeue(consumer_token_t& token, U& item) { while (!sema->wait()) { continue; } while (!inner.try_dequeue(token, item)) { continue; } } // Blocks the current thread until either there's something to dequeue // or the timeout (specified in microseconds) expires. Returns false // without setting `item` if the timeout expires, otherwise assigns // to `item` and returns true. // Using a negative timeout indicates an indefinite timeout, // and is thus functionally equivalent to calling wait_dequeue. // Never allocates. Thread-safe. template inline bool wait_dequeue_timed(consumer_token_t& token, U& item, std::int64_t timeout_usecs) { if (!sema->wait(timeout_usecs)) { return false; } while (!inner.try_dequeue(token, item)) { continue; } return true; } // Blocks the current thread until either there's something to dequeue // or the timeout expires. Returns false without setting `item` if the // timeout expires, otherwise assigns to `item` and returns true. // Never allocates. Thread-safe. template inline bool wait_dequeue_timed(consumer_token_t& token, U& item, std::chrono::duration const& timeout) { return wait_dequeue_timed(token, item, std::chrono::duration_cast(timeout).count()); } // Attempts to dequeue several elements from the queue. // Returns the number of items actually dequeued, which will // always be at least one (this method blocks until the queue // is non-empty) and at most max. // Never allocates. Thread-safe. template inline size_t wait_dequeue_bulk(It itemFirst, size_t max) { size_t count = 0; max = (size_t)sema->waitMany((LightweightSemaphore::ssize_t)(ssize_t)max); while (count != max) { count += inner.template try_dequeue_bulk(itemFirst, max - count); } return count; } // Attempts to dequeue several elements from the queue. // Returns the number of items actually dequeued, which can // be 0 if the timeout expires while waiting for elements, // and at most max. // Using a negative timeout indicates an indefinite timeout, // and is thus functionally equivalent to calling wait_dequeue_bulk. // Never allocates. Thread-safe. template inline size_t wait_dequeue_bulk_timed(It itemFirst, size_t max, std::int64_t timeout_usecs) { size_t count = 0; max = (size_t)sema->waitMany((LightweightSemaphore::ssize_t)(ssize_t)max, timeout_usecs); while (count != max) { count += inner.template try_dequeue_bulk(itemFirst, max - count); } return count; } // Attempts to dequeue several elements from the queue. // Returns the number of items actually dequeued, which can // be 0 if the timeout expires while waiting for elements, // and at most max. // Never allocates. Thread-safe. template inline size_t wait_dequeue_bulk_timed(It itemFirst, size_t max, std::chrono::duration const& timeout) { return wait_dequeue_bulk_timed(itemFirst, max, std::chrono::duration_cast(timeout).count()); } // Attempts to dequeue several elements from the queue using an explicit consumer token. // Returns the number of items actually dequeued, which will // always be at least one (this method blocks until the queue // is non-empty) and at most max. // Never allocates. Thread-safe. template inline size_t wait_dequeue_bulk(consumer_token_t& token, It itemFirst, size_t max) { size_t count = 0; max = (size_t)sema->waitMany((LightweightSemaphore::ssize_t)(ssize_t)max); while (count != max) { count += inner.template try_dequeue_bulk(token, itemFirst, max - count); } return count; } // Attempts to dequeue several elements from the queue using an explicit consumer token. // Returns the number of items actually dequeued, which can // be 0 if the timeout expires while waiting for elements, // and at most max. // Using a negative timeout indicates an indefinite timeout, // and is thus functionally equivalent to calling wait_dequeue_bulk. // Never allocates. Thread-safe. template inline size_t wait_dequeue_bulk_timed(consumer_token_t& token, It itemFirst, size_t max, std::int64_t timeout_usecs) { size_t count = 0; max = (size_t)sema->waitMany((LightweightSemaphore::ssize_t)(ssize_t)max, timeout_usecs); while (count != max) { count += inner.template try_dequeue_bulk(token, itemFirst, max - count); } return count; } // Attempts to dequeue several elements from the queue using an explicit consumer token. // Returns the number of items actually dequeued, which can // be 0 if the timeout expires while waiting for elements, // and at most max. // Never allocates. Thread-safe. template inline size_t wait_dequeue_bulk_timed(consumer_token_t& token, It itemFirst, size_t max, std::chrono::duration const& timeout) { return wait_dequeue_bulk_timed(token, itemFirst, max, std::chrono::duration_cast(timeout).count()); } // Returns an estimate of the total number of elements currently in the queue. This // estimate is only accurate if the queue has completely stabilized before it is called // (i.e. all enqueue and dequeue operations have completed and their memory effects are // visible on the calling thread, and no further operations start while this method is // being called). // Thread-safe. inline size_t size_approx() const { return (size_t)sema->availableApprox(); } // Returns true if the underlying atomic variables used by // the queue are lock-free (they should be on most platforms). // Thread-safe. static constexpr bool is_lock_free() { return ConcurrentQueue::is_lock_free(); } private: template static inline U* create(A1&& a1, A2&& a2) { void* p = (Traits::malloc)(sizeof(U)); return p != nullptr ? new (p) U(std::forward(a1), std::forward(a2)) : nullptr; } template static inline void destroy(U* p) { if (p != nullptr) { p->~U(); } (Traits::free)(p); } private: ConcurrentQueue inner; std::unique_ptr sema; }; template inline void swap(BlockingConcurrentQueue& a, BlockingConcurrentQueue& b) MOODYCAMEL_NOEXCEPT { a.swap(b); } } // end namespace moodycamel ================================================ FILE: build/makefile ================================================ # ©2013-2014 Cameron Desrochers # Makefile to build main tests and benchmarks, suitable # for use on unixen and Windows with MinGW + GnuWin32 include makefile.inc BASE_OPTS = -pthread DEBUG_OPTS = -g -O0 # -DMOODYCAMEL_QUEUE_INTERNAL_DEBUG RELEASE_OPTS = -O2 -g -DNDEBUG ifeq ($(OS),Windows_NT) PLATFORM_OPTS = -static TBB_PLATFORM_OPTS = -DUSE_WINTHREAD else UNAME_S := $(shell uname -s) ifeq ($(UNAME_S),Linux) LD_PLATFORM_OPTS = -lrt endif # -fsanitize=address seems to have a slow memory leak when creating/destroying a lot of threads #DEBUG_OPTS += -fno-omit-frame-pointer -fsanitize=address endif OPTS = $(BASE_OPTS) $(PLATFORM_OPTS) $(DEBUG_OPTS) BENCH_OPTS = $(BASE_OPTS) $(PLATFORM_OPTS) $(RELEASE_OPTS) LD_OPTS = $(LD_PLATFORM_OPTS) default: tests benchmarks tests: bin/unittests$(EXT) bin/fuzztests$(EXT) benchmarks: bin/benchmarks$(EXT) bin/unittests$(EXT): ../concurrentqueue.h ../blockingconcurrentqueue.h ../lightweightsemaphore.h ../tests/unittests/unittests.cpp ../tests/unittests/mallocmacro.cpp ../tests/common/simplethread.h ../tests/common/simplethread.cpp ../tests/common/systemtime.h ../tests/common/systemtime.cpp ../tests/corealgos.h ../tests/unittests/minitest.h ../c_api/blockingconcurrentqueue.cpp ../c_api/concurrentqueue.cpp makefile test -d bin || mkdir bin g++ -c -std=c++11 -Wall -pedantic-errors -Wpedantic -Wconversion -DMOODYCAMEL_STATIC $(OPTS) -fno-elide-constructors -fno-exceptions ../c_api/blockingconcurrentqueue.cpp ../c_api/concurrentqueue.cpp g++ -std=c++11 -Wall -pedantic-errors -Wpedantic -Wconversion -DMOODYCAMEL_STATIC $(OPTS) -fno-elide-constructors ../tests/common/simplethread.cpp ../tests/common/systemtime.cpp ../tests/unittests/unittests.cpp blockingconcurrentqueue.o concurrentqueue.o -o bin/unittests$(EXT) $(LD_OPTS) bin/fuzztests$(EXT): ../concurrentqueue.h ../tests/fuzztests/fuzztests.cpp ../tests/common/simplethread.h ../tests/common/simplethread.cpp ../tests/common/systemtime.h ../tests/common/systemtime.cpp ../tests/corealgos.h makefile test -d bin || mkdir bin g++ -std=c++11 -Wall -pedantic-errors -Wpedantic $(BENCH_OPTS) ../tests/common/simplethread.cpp ../tests/common/systemtime.cpp ../tests/fuzztests/fuzztests.cpp -o bin/fuzztests$(EXT) $(LD_OPTS) bin/benchmarks$(EXT): bin/libtbb.a ../concurrentqueue.h ../benchmarks/benchmarks.cpp ../benchmarks/cpuid.h ../benchmarks/cpuid.cpp ../benchmarks/lockbasedqueue.h ../benchmarks/simplelockfree.h ../tests/common/simplethread.h ../tests/common/simplethread.cpp ../tests/common/systemtime.h ../tests/common/systemtime.cpp ../benchmarks/dlib/test_for_odr_violations.cpp makefile test -d bin || mkdir bin g++ -std=c++11 -Wall -pedantic-errors -Wpedantic $(BENCH_OPTS) -I../benchmarks ../benchmarks/cpuid.cpp ../tests/common/simplethread.cpp ../tests/common/systemtime.cpp ../benchmarks/dlib/test_for_odr_violations.cpp ../benchmarks/benchmarks.cpp -o bin/benchmarks$(EXT) -Lbin -ltbb $(LD_OPTS) bin/libtbb.a: makefile test -d bin || mkdir bin g++ -std=c++11 -O2 -DNDEBUG -D__TBB_BUILD=1 $(TBB_PLATFORM_OPTS) -I../benchmarks -c ../benchmarks/tbb/cache_aligned_allocator.cpp ../benchmarks/tbb/concurrent_monitor.cpp ../benchmarks/tbb/concurrent_queue.cpp ../benchmarks/tbb/dynamic_link.cpp ../benchmarks/tbb/tbb_misc.cpp ar -rc bin/libtbb.a cache_aligned_allocator.o concurrent_monitor.o concurrent_queue.o dynamic_link.o tbb_misc.o rm -f cache_aligned_allocator.o concurrent_monitor.o concurrent_queue.o dynamic_link.o tbb_misc.o ================================================ FILE: build/makefile.inc ================================================ # ©2013 Cameron Desrochers ifeq ($(OS),Windows_NT) EXT = .exe else EXT = endif ================================================ FILE: build/msvc11/benchmarks.vcxproj ================================================  Debug Win32 Debug x64 Release Win32 Release x64 {86870AC7-4A91-490A-A126-AFD6B0B24B7E} Win32Proj benchmarks Application true v110 Unicode Application true v110 Unicode Application false v110 true Unicode Application false v110 true Unicode false $(SolutionDir)..\bin\ obj\$(Configuration)$(Platform)\$(ProjectName)\ false $(SolutionDir)..\bin\ obj\$(Configuration)$(Platform)\$(ProjectName)\ false $(SolutionDir)..\bin\ obj\$(Configuration)$(Platform)\$(ProjectName)\ false $(SolutionDir)..\bin\ obj\$(Configuration)$(Platform)\$(ProjectName)\ Level3 Disabled _CRT_SECURE_NO_WARNINGS;WIN32;_DEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) $(SolutionDir)\..\..\benchmarks true ProgramDatabase Console true tbb_debug.lib UseLinkTimeCodeGeneration Level3 Disabled _CRT_SECURE_NO_WARNINGS;WIN32;_DEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) $(SolutionDir)\..\..\benchmarks true ProgramDatabase Console true tbb_debug.lib UseLinkTimeCodeGeneration Level3 MaxSpeed true true _CRT_SECURE_NO_WARNINGS;WIN32;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) $(SolutionDir)\..\..\benchmarks Console true true true tbb.lib Level3 MaxSpeed true true _CRT_SECURE_NO_WARNINGS;WIN32;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) $(SolutionDir)\..\..\benchmarks Console true true true tbb.lib 4244;4800 4244;4800 4244;4800 4244;4800 __TBB_BUILD=1;USE_WINTHREAD;WIN32;_DEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) __TBB_BUILD=1;USE_WINTHREAD;WIN32;_DEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) __TBB_BUILD=1;USE_WINTHREAD;WIN32;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) __TBB_BUILD=1;USE_WINTHREAD;WIN32;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) __TBB_BUILD=1;USE_WINTHREAD;WIN32;_DEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) __TBB_BUILD=1;USE_WINTHREAD;WIN32;_DEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) __TBB_BUILD=1;USE_WINTHREAD;WIN32;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) __TBB_BUILD=1;USE_WINTHREAD;WIN32;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) __TBB_BUILD=1;USE_WINTHREAD;WIN32;_DEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) __TBB_BUILD=1;USE_WINTHREAD;WIN32;_DEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) __TBB_BUILD=1;USE_WINTHREAD;WIN32;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) __TBB_BUILD=1;USE_WINTHREAD;WIN32;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) __TBB_BUILD=1;USE_WINTHREAD;WIN32;_DEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) __TBB_BUILD=1;USE_WINTHREAD;WIN32;_DEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) __TBB_BUILD=1;USE_WINTHREAD;WIN32;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) __TBB_BUILD=1;USE_WINTHREAD;WIN32;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) __TBB_BUILD=1;USE_WINTHREAD;_CRT_SECURE_NO_WARNINGS;WIN32;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) __TBB_BUILD=1;USE_WINTHREAD;_CRT_SECURE_NO_WARNINGS;WIN32;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) __TBB_BUILD=1;USE_WINTHREAD;_CRT_SECURE_NO_WARNINGS;WIN32;_DEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) __TBB_BUILD=1;USE_WINTHREAD;_CRT_SECURE_NO_WARNINGS;WIN32;_DEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) __TBB_BUILD=1;USE_WINTHREAD;WIN32;_DEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) __TBB_BUILD=1;USE_WINTHREAD;WIN32;_DEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) __TBB_BUILD=1;USE_WINTHREAD;WIN32;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) __TBB_BUILD=1;USE_WINTHREAD;WIN32;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) __TBB_BUILD=1;USE_WINTHREAD;_CRT_SECURE_NO_WARNINGS;WIN32;_DEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) __TBB_BUILD=1;USE_WINTHREAD;_CRT_SECURE_NO_WARNINGS;WIN32;_DEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) __TBB_BUILD=1;USE_WINTHREAD;_CRT_SECURE_NO_WARNINGS;WIN32;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) __TBB_BUILD=1;USE_WINTHREAD;_CRT_SECURE_NO_WARNINGS;WIN32;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) ================================================ FILE: build/msvc11/benchmarks.vcxproj.filters ================================================  {4FC737F1-C7A5-4376-A066-2A32D752A2FF} cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx {93995380-89BD-4b04-88EB-625FBE52EBFB} h;hh;hpp;hxx;hm;inl;inc;xsd {6d3507c8-0e7e-45de-90d5-9daacabc8d2b} {3dfee594-40d0-4fea-992a-3958d8494fdd} Source Files Source Files Source Files\tbb Source Files\tbb Source Files\tbb Source Files\tbb Source Files\tbb Source Files Source Files Source Files\tbb Source Files\tbb Source Files\dlib Header Files Header Files Header Files Header Files Header Files Header Files Header Files Header Files Header Files Header Files ================================================ FILE: build/msvc11/concurrentqueue.sln ================================================  Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 2012 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "unittests", "unittests.vcxproj", "{4D9D3E37-3075-4A1A-8795-D6FA9B8F9A7D}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "benchmarks", "benchmarks.vcxproj", "{86870AC7-4A91-490A-A126-AFD6B0B24B7E}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "fuzztests", "fuzztests.vcxproj", "{D86EB0A1-CFDE-4177-87FE-A8337FFE6FA7}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Win32 = Debug|Win32 Debug|x64 = Debug|x64 Release|Win32 = Release|Win32 Release|x64 = Release|x64 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {4D9D3E37-3075-4A1A-8795-D6FA9B8F9A7D}.Debug|Win32.ActiveCfg = Debug|Win32 {4D9D3E37-3075-4A1A-8795-D6FA9B8F9A7D}.Debug|Win32.Build.0 = Debug|Win32 {4D9D3E37-3075-4A1A-8795-D6FA9B8F9A7D}.Debug|x64.ActiveCfg = Debug|x64 {4D9D3E37-3075-4A1A-8795-D6FA9B8F9A7D}.Debug|x64.Build.0 = Debug|x64 {4D9D3E37-3075-4A1A-8795-D6FA9B8F9A7D}.Release|Win32.ActiveCfg = Release|Win32 {4D9D3E37-3075-4A1A-8795-D6FA9B8F9A7D}.Release|Win32.Build.0 = Release|Win32 {4D9D3E37-3075-4A1A-8795-D6FA9B8F9A7D}.Release|x64.ActiveCfg = Release|x64 {4D9D3E37-3075-4A1A-8795-D6FA9B8F9A7D}.Release|x64.Build.0 = Release|x64 {86870AC7-4A91-490A-A126-AFD6B0B24B7E}.Debug|Win32.ActiveCfg = Debug|Win32 {86870AC7-4A91-490A-A126-AFD6B0B24B7E}.Debug|Win32.Build.0 = Debug|Win32 {86870AC7-4A91-490A-A126-AFD6B0B24B7E}.Debug|x64.ActiveCfg = Debug|x64 {86870AC7-4A91-490A-A126-AFD6B0B24B7E}.Debug|x64.Build.0 = Debug|x64 {86870AC7-4A91-490A-A126-AFD6B0B24B7E}.Release|Win32.ActiveCfg = Release|Win32 {86870AC7-4A91-490A-A126-AFD6B0B24B7E}.Release|Win32.Build.0 = Release|Win32 {86870AC7-4A91-490A-A126-AFD6B0B24B7E}.Release|x64.ActiveCfg = Release|x64 {86870AC7-4A91-490A-A126-AFD6B0B24B7E}.Release|x64.Build.0 = Release|x64 {D86EB0A1-CFDE-4177-87FE-A8337FFE6FA7}.Debug|Win32.ActiveCfg = Debug|Win32 {D86EB0A1-CFDE-4177-87FE-A8337FFE6FA7}.Debug|Win32.Build.0 = Debug|Win32 {D86EB0A1-CFDE-4177-87FE-A8337FFE6FA7}.Debug|x64.ActiveCfg = Debug|x64 {D86EB0A1-CFDE-4177-87FE-A8337FFE6FA7}.Debug|x64.Build.0 = Debug|x64 {D86EB0A1-CFDE-4177-87FE-A8337FFE6FA7}.Release|Win32.ActiveCfg = Release|Win32 {D86EB0A1-CFDE-4177-87FE-A8337FFE6FA7}.Release|Win32.Build.0 = Release|Win32 {D86EB0A1-CFDE-4177-87FE-A8337FFE6FA7}.Release|x64.ActiveCfg = Release|x64 {D86EB0A1-CFDE-4177-87FE-A8337FFE6FA7}.Release|x64.Build.0 = Release|x64 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection EndGlobal ================================================ FILE: build/msvc11/fuzztests.vcxproj ================================================  Debug Win32 Debug x64 Release Win32 Release x64 {D86EB0A1-CFDE-4177-87FE-A8337FFE6FA7} Win32Proj fuzztests Application true v110 Unicode Application true v110 Unicode Application false v110 true Unicode Application false v110 true Unicode true $(SolutionDir)..\bin\ obj\$(Configuration)$(Platform)\$(ProjectName)\ true $(SolutionDir)..\bin\ obj\$(Configuration)$(Platform)\$(ProjectName)\ false $(SolutionDir)..\bin\ obj\$(Configuration)$(Platform)\$(ProjectName)\ false $(SolutionDir)..\bin\ obj\$(Configuration)$(Platform)\$(ProjectName)\ Level3 Disabled _CRT_SECURE_NO_WARNINGS;WIN32;_DEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) 4800 Console true Level3 Disabled _CRT_SECURE_NO_WARNINGS;WIN32;_DEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) 4800 Console true Level3 MaxSpeed true true _CRT_SECURE_NO_WARNINGS;WIN32;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) 4800 Console true true true Level3 MaxSpeed true true _CRT_SECURE_NO_WARNINGS;WIN32;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) 4800 Console true true true ================================================ FILE: build/msvc11/fuzztests.vcxproj.filters ================================================  {4FC737F1-C7A5-4376-A066-2A32D752A2FF} cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx {93995380-89BD-4b04-88EB-625FBE52EBFB} h;hh;hpp;hxx;hm;inl;inc;xsd Source Files Source Files Source Files Header Files Header Files Header Files Header Files ================================================ FILE: build/msvc11/unittests.vcxproj ================================================  Debug Win32 Debug x64 Release Win32 Release x64 {4D9D3E37-3075-4A1A-8795-D6FA9B8F9A7D} Win32Proj unittests Application true v110 Unicode Application true v110 Unicode Application false v110 true Unicode Application false v110 true Unicode true $(SolutionDir)..\bin\ obj\$(Configuration)$(Platform)\$(ProjectName)\ true $(SolutionDir)..\bin\ obj\$(Configuration)$(Platform)\$(ProjectName)\ false $(SolutionDir)..\bin\ obj\$(Configuration)$(Platform)\$(ProjectName)\ false $(SolutionDir)..\bin\ obj\$(Configuration)$(Platform)\$(ProjectName)\ Level3 Disabled WIN32;_DEBUG;_CONSOLE;_LIB;MOODYCAMEL_STATIC;%(PreprocessorDefinitions) 4146 Console true Level3 Disabled WIN32;_DEBUG;_CONSOLE;_LIB;MOODYCAMEL_STATIC;%(PreprocessorDefinitions) 4146 Console true Level3 MaxSpeed true true WIN32;NDEBUG;_CONSOLE;_LIB;MOODYCAMEL_STATIC;%(PreprocessorDefinitions) 4146 Console true true true Level3 MaxSpeed true true WIN32;NDEBUG;_CONSOLE;_LIB;MOODYCAMEL_STATIC;%(PreprocessorDefinitions) 4146 Console true true true false false false false _HAS_EXCEPTIONS=0;%(PreprocessorDefinitions) _HAS_EXCEPTIONS=0;%(PreprocessorDefinitions) _HAS_EXCEPTIONS=0;%(PreprocessorDefinitions) _HAS_EXCEPTIONS=0;%(PreprocessorDefinitions) false false false false _HAS_EXCEPTIONS=0;%(PreprocessorDefinitions) _HAS_EXCEPTIONS=0;%(PreprocessorDefinitions) _HAS_EXCEPTIONS=0;%(PreprocessorDefinitions) _HAS_EXCEPTIONS=0;%(PreprocessorDefinitions) ================================================ FILE: build/msvc11/unittests.vcxproj.filters ================================================  {4FC737F1-C7A5-4376-A066-2A32D752A2FF} cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx {93995380-89BD-4b04-88EB-625FBE52EBFB} h;hh;hpp;hxx;hm;inl;inc;xsd Header Files Header Files Header Files Header Files Header Files Source Files Source Files Source Files Source Files Source Files Source Files ================================================ FILE: build/msvc12/benchmarks.vcxproj ================================================  Debug Win32 Debug x64 Release Win32 Release x64 {86870AC7-4A91-490A-A126-AFD6B0B24B7E} Win32Proj benchmarks Application true v120 Unicode Application true v120 Unicode Application false v120 true Unicode Application false v120 true Unicode false $(SolutionDir)..\bin\ obj\$(Configuration)$(Platform)\$(ProjectName)\ false $(SolutionDir)..\bin\ obj\$(Configuration)$(Platform)\$(ProjectName)\ false $(SolutionDir)..\bin\ obj\$(Configuration)$(Platform)\$(ProjectName)\ false $(SolutionDir)..\bin\ obj\$(Configuration)$(Platform)\$(ProjectName)\ Level3 Disabled _CRT_SECURE_NO_WARNINGS;WIN32;_DEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) $(SolutionDir)\..\..\benchmarks true ProgramDatabase Console true tbb_debug.lib UseLinkTimeCodeGeneration Level3 Disabled _CRT_SECURE_NO_WARNINGS;WIN32;_DEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) $(SolutionDir)\..\..\benchmarks true ProgramDatabase Console true tbb_debug.lib UseLinkTimeCodeGeneration Level3 MaxSpeed true true _CRT_SECURE_NO_WARNINGS;WIN32;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) $(SolutionDir)\..\..\benchmarks Console true true true tbb.lib Level3 MaxSpeed true true _CRT_SECURE_NO_WARNINGS;WIN32;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) $(SolutionDir)\..\..\benchmarks Console true true true tbb.lib 4244;4800 4244;4800 4244;4800 4244;4800 __TBB_BUILD=1;USE_WINTHREAD;WIN32;_DEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) __TBB_BUILD=1;USE_WINTHREAD;WIN32;_DEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) __TBB_BUILD=1;USE_WINTHREAD;WIN32;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) __TBB_BUILD=1;USE_WINTHREAD;WIN32;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) __TBB_BUILD=1;USE_WINTHREAD;WIN32;_DEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) __TBB_BUILD=1;USE_WINTHREAD;WIN32;_DEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) __TBB_BUILD=1;USE_WINTHREAD;WIN32;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) __TBB_BUILD=1;USE_WINTHREAD;WIN32;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) __TBB_BUILD=1;USE_WINTHREAD;WIN32;_DEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) __TBB_BUILD=1;USE_WINTHREAD;WIN32;_DEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) __TBB_BUILD=1;USE_WINTHREAD;WIN32;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) __TBB_BUILD=1;USE_WINTHREAD;WIN32;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) __TBB_BUILD=1;USE_WINTHREAD;WIN32;_DEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) __TBB_BUILD=1;USE_WINTHREAD;WIN32;_DEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) __TBB_BUILD=1;USE_WINTHREAD;WIN32;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) __TBB_BUILD=1;USE_WINTHREAD;WIN32;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) __TBB_BUILD=1;USE_WINTHREAD;_CRT_SECURE_NO_WARNINGS;WIN32;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) __TBB_BUILD=1;USE_WINTHREAD;_CRT_SECURE_NO_WARNINGS;WIN32;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) __TBB_BUILD=1;USE_WINTHREAD;_CRT_SECURE_NO_WARNINGS;WIN32;_DEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) __TBB_BUILD=1;USE_WINTHREAD;_CRT_SECURE_NO_WARNINGS;WIN32;_DEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) __TBB_BUILD=1;USE_WINTHREAD;WIN32;_DEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) __TBB_BUILD=1;USE_WINTHREAD;WIN32;_DEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) __TBB_BUILD=1;USE_WINTHREAD;WIN32;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) __TBB_BUILD=1;USE_WINTHREAD;WIN32;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) __TBB_BUILD=1;USE_WINTHREAD;_CRT_SECURE_NO_WARNINGS;WIN32;_DEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) __TBB_BUILD=1;USE_WINTHREAD;_CRT_SECURE_NO_WARNINGS;WIN32;_DEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) __TBB_BUILD=1;USE_WINTHREAD;_CRT_SECURE_NO_WARNINGS;WIN32;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) __TBB_BUILD=1;USE_WINTHREAD;_CRT_SECURE_NO_WARNINGS;WIN32;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) ================================================ FILE: build/msvc12/benchmarks.vcxproj.filters ================================================  {4FC737F1-C7A5-4376-A066-2A32D752A2FF} cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx {93995380-89BD-4b04-88EB-625FBE52EBFB} h;hh;hpp;hxx;hm;inl;inc;xsd {6d3507c8-0e7e-45de-90d5-9daacabc8d2b} {3dfee594-40d0-4fea-992a-3958d8494fdd} Source Files Source Files Source Files\tbb Source Files\tbb Source Files\tbb Source Files\tbb Source Files\tbb Source Files Source Files Source Files\tbb Source Files\tbb Source Files\dlib Header Files Header Files Header Files Header Files Header Files Header Files Header Files Header Files Header Files Header Files ================================================ FILE: build/msvc12/concurrentqueue.sln ================================================  Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 2013 VisualStudioVersion = 12.0.31010.0 MinimumVisualStudioVersion = 10.0.40219.1 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "unittests", "unittests.vcxproj", "{4D9D3E37-3075-4A1A-8795-D6FA9B8F9A7D}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "benchmarks", "benchmarks.vcxproj", "{86870AC7-4A91-490A-A126-AFD6B0B24B7E}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "fuzztests", "fuzztests.vcxproj", "{D86EB0A1-CFDE-4177-87FE-A8337FFE6FA7}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Win32 = Debug|Win32 Debug|x64 = Debug|x64 Release|Win32 = Release|Win32 Release|x64 = Release|x64 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {4D9D3E37-3075-4A1A-8795-D6FA9B8F9A7D}.Debug|Win32.ActiveCfg = Debug|Win32 {4D9D3E37-3075-4A1A-8795-D6FA9B8F9A7D}.Debug|Win32.Build.0 = Debug|Win32 {4D9D3E37-3075-4A1A-8795-D6FA9B8F9A7D}.Debug|x64.ActiveCfg = Debug|x64 {4D9D3E37-3075-4A1A-8795-D6FA9B8F9A7D}.Debug|x64.Build.0 = Debug|x64 {4D9D3E37-3075-4A1A-8795-D6FA9B8F9A7D}.Release|Win32.ActiveCfg = Release|Win32 {4D9D3E37-3075-4A1A-8795-D6FA9B8F9A7D}.Release|Win32.Build.0 = Release|Win32 {4D9D3E37-3075-4A1A-8795-D6FA9B8F9A7D}.Release|x64.ActiveCfg = Release|x64 {4D9D3E37-3075-4A1A-8795-D6FA9B8F9A7D}.Release|x64.Build.0 = Release|x64 {86870AC7-4A91-490A-A126-AFD6B0B24B7E}.Debug|Win32.ActiveCfg = Debug|Win32 {86870AC7-4A91-490A-A126-AFD6B0B24B7E}.Debug|Win32.Build.0 = Debug|Win32 {86870AC7-4A91-490A-A126-AFD6B0B24B7E}.Debug|x64.ActiveCfg = Debug|x64 {86870AC7-4A91-490A-A126-AFD6B0B24B7E}.Debug|x64.Build.0 = Debug|x64 {86870AC7-4A91-490A-A126-AFD6B0B24B7E}.Release|Win32.ActiveCfg = Release|Win32 {86870AC7-4A91-490A-A126-AFD6B0B24B7E}.Release|Win32.Build.0 = Release|Win32 {86870AC7-4A91-490A-A126-AFD6B0B24B7E}.Release|x64.ActiveCfg = Release|x64 {86870AC7-4A91-490A-A126-AFD6B0B24B7E}.Release|x64.Build.0 = Release|x64 {D86EB0A1-CFDE-4177-87FE-A8337FFE6FA7}.Debug|Win32.ActiveCfg = Debug|Win32 {D86EB0A1-CFDE-4177-87FE-A8337FFE6FA7}.Debug|Win32.Build.0 = Debug|Win32 {D86EB0A1-CFDE-4177-87FE-A8337FFE6FA7}.Debug|x64.ActiveCfg = Debug|x64 {D86EB0A1-CFDE-4177-87FE-A8337FFE6FA7}.Debug|x64.Build.0 = Debug|x64 {D86EB0A1-CFDE-4177-87FE-A8337FFE6FA7}.Release|Win32.ActiveCfg = Release|Win32 {D86EB0A1-CFDE-4177-87FE-A8337FFE6FA7}.Release|Win32.Build.0 = Release|Win32 {D86EB0A1-CFDE-4177-87FE-A8337FFE6FA7}.Release|x64.ActiveCfg = Release|x64 {D86EB0A1-CFDE-4177-87FE-A8337FFE6FA7}.Release|x64.Build.0 = Release|x64 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection EndGlobal ================================================ FILE: build/msvc12/fuzztests.vcxproj ================================================  Debug Win32 Debug x64 Release Win32 Release x64 {D86EB0A1-CFDE-4177-87FE-A8337FFE6FA7} Win32Proj fuzztests Application true v120 Unicode Application true v120 Unicode Application false v120 true Unicode Application false v120 true Unicode true $(SolutionDir)..\bin\ obj\$(Configuration)$(Platform)\$(ProjectName)\ true $(SolutionDir)..\bin\ obj\$(Configuration)$(Platform)\$(ProjectName)\ false $(SolutionDir)..\bin\ obj\$(Configuration)$(Platform)\$(ProjectName)\ false $(SolutionDir)..\bin\ obj\$(Configuration)$(Platform)\$(ProjectName)\ Level3 Disabled _CRT_SECURE_NO_WARNINGS;WIN32;_DEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) 4800 Console true Level3 Disabled _CRT_SECURE_NO_WARNINGS;WIN32;_DEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) 4800 Console true Level3 MaxSpeed true true _CRT_SECURE_NO_WARNINGS;WIN32;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) 4800 Console true true true Level3 MaxSpeed true true _CRT_SECURE_NO_WARNINGS;WIN32;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) 4800 Console true true true ================================================ FILE: build/msvc12/fuzztests.vcxproj.filters ================================================  {4FC737F1-C7A5-4376-A066-2A32D752A2FF} cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx {93995380-89BD-4b04-88EB-625FBE52EBFB} h;hh;hpp;hxx;hm;inl;inc;xsd Source Files Source Files Source Files Header Files Header Files Header Files Header Files ================================================ FILE: build/msvc12/msvc_tbb_stubs.cpp ================================================ #include "tbb/tbb_main.h" #include "tbb/itt_notify.h" #include namespace tbb { namespace internal { // Taken from tbb_main.cpp (which doesn't compile as-is) void call_itt_notify_v5(int /*t*/, void* /*ptr*/) {} void itt_store_pointer_with_release_v3(void* dst, void* src) { ITT_NOTIFY(sync_releasing, dst); __TBB_store_with_release(*static_cast(dst), src); } } } extern "C" { #ifdef _WIN64 __int8 __TBB_machine_cmpswp1(volatile void *ptr, __int8 value, __int8 comparand) { return _InterlockedCompareExchange8((__int8*)ptr, value, comparand); } #else // Taken from tbb/machine/windows_intel64.h, which isn't included in 32-bit mode but is // still used for some reason __int64 __TBB_machine_cmpswp8(volatile void *ptr, __int64 value, __int64 comparand) { return _InterlockedCompareExchange64((__int64*)ptr, value, comparand); } #endif } ================================================ FILE: build/msvc12/unittests.vcxproj ================================================  Debug Win32 Debug x64 Release Win32 Release x64 {4D9D3E37-3075-4A1A-8795-D6FA9B8F9A7D} Win32Proj unittests Application true v120 Unicode Application true v120 Unicode Application false v120 true Unicode Application false v120 true Unicode true $(SolutionDir)..\bin\ obj\$(Configuration)$(Platform)\$(ProjectName)\ true $(SolutionDir)..\bin\ obj\$(Configuration)$(Platform)\$(ProjectName)\ false $(SolutionDir)..\bin\ obj\$(Configuration)$(Platform)\$(ProjectName)\ false $(SolutionDir)..\bin\ obj\$(Configuration)$(Platform)\$(ProjectName)\ Level3 Disabled WIN32;_DEBUG;_CONSOLE;_LIB;MOODYCAMEL_STATIC;%(PreprocessorDefinitions) 4146 Console true Level3 Disabled WIN32;_DEBUG;_CONSOLE;_LIB;MOODYCAMEL_STATIC;%(PreprocessorDefinitions) 4146 Console true Level3 MaxSpeed true true WIN32;NDEBUG;_CONSOLE;_LIB;MOODYCAMEL_STATIC;%(PreprocessorDefinitions) 4146 Console true true true Level3 MaxSpeed true true WIN32;NDEBUG;_CONSOLE;_LIB;MOODYCAMEL_STATIC;%(PreprocessorDefinitions) 4146 Console true true true false false false false _HAS_EXCEPTIONS=0;%(PreprocessorDefinitions) _HAS_EXCEPTIONS=0;%(PreprocessorDefinitions) _HAS_EXCEPTIONS=0;%(PreprocessorDefinitions) _HAS_EXCEPTIONS=0;%(PreprocessorDefinitions) false false false false _HAS_EXCEPTIONS=0;%(PreprocessorDefinitions) _HAS_EXCEPTIONS=0;%(PreprocessorDefinitions) _HAS_EXCEPTIONS=0;%(PreprocessorDefinitions) _HAS_EXCEPTIONS=0;%(PreprocessorDefinitions) ================================================ FILE: build/msvc12/unittests.vcxproj.filters ================================================  {4FC737F1-C7A5-4376-A066-2A32D752A2FF} cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx {93995380-89BD-4b04-88EB-625FBE52EBFB} h;hh;hpp;hxx;hm;inl;inc;xsd Header Files Header Files Header Files Header Files Header Files Header Files Source Files Source Files Source Files Source Files Source Files Source Files ================================================ FILE: build/msvc14/benchmarks.vcxproj ================================================  Debug Win32 Debug x64 Release Win32 Release x64 {86870AC7-4A91-490A-A126-AFD6B0B24B7E} Win32Proj benchmarks Application true v140 Unicode Application true v140 Unicode Application false v140 true Unicode Application false v140 true Unicode false $(SolutionDir)..\bin\ obj\$(Configuration)$(Platform)\$(ProjectName)\ false $(SolutionDir)..\bin\ obj\$(Configuration)$(Platform)\$(ProjectName)\ false $(SolutionDir)..\bin\ obj\$(Configuration)$(Platform)\$(ProjectName)\ false $(SolutionDir)..\bin\ obj\$(Configuration)$(Platform)\$(ProjectName)\ Level3 Disabled _CRT_SECURE_NO_WARNINGS;_ENABLE_ATOMIC_ALIGNMENT_FIX;WIN32;_DEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) $(SolutionDir)\..\..\benchmarks true ProgramDatabase Console true tbb_debug.lib UseLinkTimeCodeGeneration Level3 Disabled _CRT_SECURE_NO_WARNINGS;_ENABLE_ATOMIC_ALIGNMENT_FIX;WIN32;_DEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) $(SolutionDir)\..\..\benchmarks true ProgramDatabase Console true tbb_debug.lib UseLinkTimeCodeGeneration Level3 MaxSpeed true true _CRT_SECURE_NO_WARNINGS;_ENABLE_ATOMIC_ALIGNMENT_FIX;WIN32;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) $(SolutionDir)\..\..\benchmarks Console true true true tbb.lib Level3 MaxSpeed true true _CRT_SECURE_NO_WARNINGS;_ENABLE_ATOMIC_ALIGNMENT_FIX;WIN32;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) $(SolutionDir)\..\..\benchmarks Console true true true tbb.lib 4244;4800 4244;4800 4244;4800 4244;4800 __TBB_BUILD=1;USE_WINTHREAD;WIN32;_DEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) __TBB_BUILD=1;USE_WINTHREAD;WIN32;_DEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) __TBB_BUILD=1;USE_WINTHREAD;WIN32;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) __TBB_BUILD=1;USE_WINTHREAD;WIN32;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) __TBB_BUILD=1;USE_WINTHREAD;WIN32;_DEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) __TBB_BUILD=1;USE_WINTHREAD;WIN32;_DEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) __TBB_BUILD=1;USE_WINTHREAD;WIN32;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) __TBB_BUILD=1;USE_WINTHREAD;WIN32;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) __TBB_BUILD=1;USE_WINTHREAD;WIN32;_DEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) __TBB_BUILD=1;USE_WINTHREAD;WIN32;_DEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) __TBB_BUILD=1;USE_WINTHREAD;WIN32;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) __TBB_BUILD=1;USE_WINTHREAD;WIN32;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) __TBB_BUILD=1;USE_WINTHREAD;WIN32;_DEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) __TBB_BUILD=1;USE_WINTHREAD;WIN32;_DEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) __TBB_BUILD=1;USE_WINTHREAD;WIN32;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) __TBB_BUILD=1;USE_WINTHREAD;WIN32;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) __TBB_BUILD=1;USE_WINTHREAD;_CRT_SECURE_NO_WARNINGS;WIN32;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) __TBB_BUILD=1;USE_WINTHREAD;_CRT_SECURE_NO_WARNINGS;WIN32;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) __TBB_BUILD=1;USE_WINTHREAD;_CRT_SECURE_NO_WARNINGS;WIN32;_DEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) __TBB_BUILD=1;USE_WINTHREAD;_CRT_SECURE_NO_WARNINGS;WIN32;_DEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) __TBB_BUILD=1;USE_WINTHREAD;WIN32;_DEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) __TBB_BUILD=1;USE_WINTHREAD;WIN32;_DEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) __TBB_BUILD=1;USE_WINTHREAD;WIN32;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) __TBB_BUILD=1;USE_WINTHREAD;WIN32;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) __TBB_BUILD=1;USE_WINTHREAD;_CRT_SECURE_NO_WARNINGS;WIN32;_DEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) __TBB_BUILD=1;USE_WINTHREAD;_CRT_SECURE_NO_WARNINGS;WIN32;_DEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) __TBB_BUILD=1;USE_WINTHREAD;_CRT_SECURE_NO_WARNINGS;WIN32;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) __TBB_BUILD=1;USE_WINTHREAD;_CRT_SECURE_NO_WARNINGS;WIN32;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) ================================================ FILE: build/msvc14/benchmarks.vcxproj.filters ================================================  {4FC737F1-C7A5-4376-A066-2A32D752A2FF} cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx {93995380-89BD-4b04-88EB-625FBE52EBFB} h;hh;hpp;hxx;hm;inl;inc;xsd {6d3507c8-0e7e-45de-90d5-9daacabc8d2b} {3dfee594-40d0-4fea-992a-3958d8494fdd} Source Files Source Files Source Files\tbb Source Files\tbb Source Files\tbb Source Files\tbb Source Files\tbb Source Files Source Files Source Files\tbb Source Files\tbb Source Files\dlib Header Files Header Files Header Files Header Files Header Files Header Files Header Files Header Files Header Files Header Files ================================================ FILE: build/msvc14/concurrentqueue.sln ================================================  Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 14 VisualStudioVersion = 14.0.25123.0 MinimumVisualStudioVersion = 10.0.40219.1 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "unittests", "unittests.vcxproj", "{4D9D3E37-3075-4A1A-8795-D6FA9B8F9A7D}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "benchmarks", "benchmarks.vcxproj", "{86870AC7-4A91-490A-A126-AFD6B0B24B7E}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "fuzztests", "fuzztests.vcxproj", "{D86EB0A1-CFDE-4177-87FE-A8337FFE6FA7}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Win32 = Debug|Win32 Debug|x64 = Debug|x64 Release|Win32 = Release|Win32 Release|x64 = Release|x64 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {4D9D3E37-3075-4A1A-8795-D6FA9B8F9A7D}.Debug|Win32.ActiveCfg = Debug|Win32 {4D9D3E37-3075-4A1A-8795-D6FA9B8F9A7D}.Debug|Win32.Build.0 = Debug|Win32 {4D9D3E37-3075-4A1A-8795-D6FA9B8F9A7D}.Debug|x64.ActiveCfg = Debug|x64 {4D9D3E37-3075-4A1A-8795-D6FA9B8F9A7D}.Debug|x64.Build.0 = Debug|x64 {4D9D3E37-3075-4A1A-8795-D6FA9B8F9A7D}.Release|Win32.ActiveCfg = Release|Win32 {4D9D3E37-3075-4A1A-8795-D6FA9B8F9A7D}.Release|Win32.Build.0 = Release|Win32 {4D9D3E37-3075-4A1A-8795-D6FA9B8F9A7D}.Release|x64.ActiveCfg = Release|x64 {4D9D3E37-3075-4A1A-8795-D6FA9B8F9A7D}.Release|x64.Build.0 = Release|x64 {86870AC7-4A91-490A-A126-AFD6B0B24B7E}.Debug|Win32.ActiveCfg = Debug|Win32 {86870AC7-4A91-490A-A126-AFD6B0B24B7E}.Debug|Win32.Build.0 = Debug|Win32 {86870AC7-4A91-490A-A126-AFD6B0B24B7E}.Debug|x64.ActiveCfg = Debug|x64 {86870AC7-4A91-490A-A126-AFD6B0B24B7E}.Debug|x64.Build.0 = Debug|x64 {86870AC7-4A91-490A-A126-AFD6B0B24B7E}.Release|Win32.ActiveCfg = Release|Win32 {86870AC7-4A91-490A-A126-AFD6B0B24B7E}.Release|Win32.Build.0 = Release|Win32 {86870AC7-4A91-490A-A126-AFD6B0B24B7E}.Release|x64.ActiveCfg = Release|x64 {86870AC7-4A91-490A-A126-AFD6B0B24B7E}.Release|x64.Build.0 = Release|x64 {D86EB0A1-CFDE-4177-87FE-A8337FFE6FA7}.Debug|Win32.ActiveCfg = Debug|Win32 {D86EB0A1-CFDE-4177-87FE-A8337FFE6FA7}.Debug|Win32.Build.0 = Debug|Win32 {D86EB0A1-CFDE-4177-87FE-A8337FFE6FA7}.Debug|x64.ActiveCfg = Debug|x64 {D86EB0A1-CFDE-4177-87FE-A8337FFE6FA7}.Debug|x64.Build.0 = Debug|x64 {D86EB0A1-CFDE-4177-87FE-A8337FFE6FA7}.Release|Win32.ActiveCfg = Release|Win32 {D86EB0A1-CFDE-4177-87FE-A8337FFE6FA7}.Release|Win32.Build.0 = Release|Win32 {D86EB0A1-CFDE-4177-87FE-A8337FFE6FA7}.Release|x64.ActiveCfg = Release|x64 {D86EB0A1-CFDE-4177-87FE-A8337FFE6FA7}.Release|x64.Build.0 = Release|x64 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection EndGlobal ================================================ FILE: build/msvc14/fuzztests.vcxproj ================================================  Debug Win32 Debug x64 Release Win32 Release x64 {D86EB0A1-CFDE-4177-87FE-A8337FFE6FA7} Win32Proj fuzztests Application true v140 Unicode Application true v140 Unicode Application false v140 true Unicode Application false v140 true Unicode true $(SolutionDir)..\bin\ obj\$(Configuration)$(Platform)\$(ProjectName)\ true $(SolutionDir)..\bin\ obj\$(Configuration)$(Platform)\$(ProjectName)\ false $(SolutionDir)..\bin\ obj\$(Configuration)$(Platform)\$(ProjectName)\ false $(SolutionDir)..\bin\ obj\$(Configuration)$(Platform)\$(ProjectName)\ Level3 Disabled _CRT_SECURE_NO_WARNINGS;WIN32;_DEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) 4800 Console true Level3 Disabled _CRT_SECURE_NO_WARNINGS;WIN32;_DEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) 4800 Console true Level3 MaxSpeed true true _CRT_SECURE_NO_WARNINGS;WIN32;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) 4800 Console true true true Level3 MaxSpeed true true _CRT_SECURE_NO_WARNINGS;WIN32;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) 4800 Console true true true ================================================ FILE: build/msvc14/fuzztests.vcxproj.filters ================================================  {4FC737F1-C7A5-4376-A066-2A32D752A2FF} cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx {93995380-89BD-4b04-88EB-625FBE52EBFB} h;hh;hpp;hxx;hm;inl;inc;xsd Source Files Source Files Source Files Header Files Header Files Header Files Header Files ================================================ FILE: build/msvc14/msvc_tbb_stubs.cpp ================================================ #include "tbb/tbb_main.h" #include "tbb/itt_notify.h" #include namespace tbb { namespace internal { // Taken from tbb_main.cpp (which doesn't compile as-is) void call_itt_notify_v5(int /*t*/, void* /*ptr*/) {} void itt_store_pointer_with_release_v3(void* dst, void* src) { ITT_NOTIFY(sync_releasing, dst); __TBB_store_with_release(*static_cast(dst), src); } } } extern "C" { #ifdef _WIN64 __int8 __TBB_machine_cmpswp1(volatile void *ptr, __int8 value, __int8 comparand) { return _InterlockedCompareExchange8((__int8*)ptr, value, comparand); } #else // Taken from tbb/machine/windows_intel64.h, which isn't included in 32-bit mode but is // still used for some reason __int64 __TBB_machine_cmpswp8(volatile void *ptr, __int64 value, __int64 comparand) { return _InterlockedCompareExchange64((__int64*)ptr, value, comparand); } #endif } ================================================ FILE: build/msvc14/unittests.vcxproj ================================================  Debug Win32 Debug x64 Release Win32 Release x64 {4D9D3E37-3075-4A1A-8795-D6FA9B8F9A7D} Win32Proj unittests Application true v140 Unicode Application true v140 Unicode Application false v140 true Unicode Application false v140 true Unicode true $(SolutionDir)..\bin\ obj\$(Configuration)$(Platform)\$(ProjectName)\ true $(SolutionDir)..\bin\ obj\$(Configuration)$(Platform)\$(ProjectName)\ false $(SolutionDir)..\bin\ obj\$(Configuration)$(Platform)\$(ProjectName)\ false $(SolutionDir)..\bin\ obj\$(Configuration)$(Platform)\$(ProjectName)\ Level3 Disabled WIN32;_DEBUG;_CONSOLE;_LIB;MOODYCAMEL_STATIC;%(PreprocessorDefinitions) 4146 Console true Level3 Disabled WIN32;_DEBUG;_CONSOLE;_LIB;MOODYCAMEL_STATIC;%(PreprocessorDefinitions) 4146 Console true Level3 MaxSpeed true true WIN32;NDEBUG;_CONSOLE;_LIB;MOODYCAMEL_STATIC;%(PreprocessorDefinitions) 4146 Console true true true Level3 MaxSpeed true true WIN32;NDEBUG;_CONSOLE;_LIB;MOODYCAMEL_STATIC;%(PreprocessorDefinitions) 4146 Console true true true false false false false _HAS_EXCEPTIONS=0;%(PreprocessorDefinitions) _HAS_EXCEPTIONS=0;%(PreprocessorDefinitions) _HAS_EXCEPTIONS=0;%(PreprocessorDefinitions) _HAS_EXCEPTIONS=0;%(PreprocessorDefinitions) false false false false _HAS_EXCEPTIONS=0;%(PreprocessorDefinitions) _HAS_EXCEPTIONS=0;%(PreprocessorDefinitions) _HAS_EXCEPTIONS=0;%(PreprocessorDefinitions) _HAS_EXCEPTIONS=0;%(PreprocessorDefinitions) ================================================ FILE: build/msvc14/unittests.vcxproj.filters ================================================  {4FC737F1-C7A5-4376-A066-2A32D752A2FF} cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx {93995380-89BD-4b04-88EB-625FBE52EBFB} h;hh;hpp;hxx;hm;inl;inc;xsd Header Files Header Files Header Files Header Files Header Files Header Files Source Files Source Files Source Files Source Files Source Files Source Files ================================================ FILE: build/msvc15/benchmarks.vcxproj ================================================  Debug Win32 Debug x64 Release Win32 Release x64 {86870AC7-4A91-490A-A126-AFD6B0B24B7E} Win32Proj benchmarks 10.0.17134.0 Application true v141 Unicode Application true v141 Unicode Application false v141 true Unicode Application false v141 true Unicode false $(SolutionDir)..\bin\ obj\$(Configuration)$(Platform)\$(ProjectName)\ false $(SolutionDir)..\bin\ obj\$(Configuration)$(Platform)\$(ProjectName)\ false $(SolutionDir)..\bin\ obj\$(Configuration)$(Platform)\$(ProjectName)\ false $(SolutionDir)..\bin\ obj\$(Configuration)$(Platform)\$(ProjectName)\ Level3 Disabled _CRT_SECURE_NO_WARNINGS;_ENABLE_ATOMIC_ALIGNMENT_FIX;WIN32;_DEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) $(SolutionDir)\..\..\benchmarks true ProgramDatabase Console true tbb_debug.lib UseLinkTimeCodeGeneration Level3 Disabled _CRT_SECURE_NO_WARNINGS;_ENABLE_ATOMIC_ALIGNMENT_FIX;WIN32;_DEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) $(SolutionDir)\..\..\benchmarks true ProgramDatabase Console true tbb_debug.lib UseLinkTimeCodeGeneration Level3 MaxSpeed true true _CRT_SECURE_NO_WARNINGS;_ENABLE_ATOMIC_ALIGNMENT_FIX;WIN32;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) $(SolutionDir)\..\..\benchmarks Console true true true tbb.lib Level3 MaxSpeed true true _CRT_SECURE_NO_WARNINGS;_ENABLE_ATOMIC_ALIGNMENT_FIX;WIN32;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) $(SolutionDir)\..\..\benchmarks Console true true true tbb.lib 4244;4800 4244;4800 4244;4800 4244;4800 __TBB_BUILD=1;USE_WINTHREAD;WIN32;_DEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) __TBB_BUILD=1;USE_WINTHREAD;WIN32;_DEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) __TBB_BUILD=1;USE_WINTHREAD;WIN32;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) __TBB_BUILD=1;USE_WINTHREAD;WIN32;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) __TBB_BUILD=1;USE_WINTHREAD;WIN32;_DEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) __TBB_BUILD=1;USE_WINTHREAD;WIN32;_DEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) __TBB_BUILD=1;USE_WINTHREAD;WIN32;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) __TBB_BUILD=1;USE_WINTHREAD;WIN32;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) __TBB_BUILD=1;USE_WINTHREAD;WIN32;_DEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) __TBB_BUILD=1;USE_WINTHREAD;WIN32;_DEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) __TBB_BUILD=1;USE_WINTHREAD;WIN32;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) __TBB_BUILD=1;USE_WINTHREAD;WIN32;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) __TBB_BUILD=1;USE_WINTHREAD;WIN32;_DEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) __TBB_BUILD=1;USE_WINTHREAD;WIN32;_DEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) __TBB_BUILD=1;USE_WINTHREAD;WIN32;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) __TBB_BUILD=1;USE_WINTHREAD;WIN32;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) __TBB_BUILD=1;USE_WINTHREAD;_CRT_SECURE_NO_WARNINGS;WIN32;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) __TBB_BUILD=1;USE_WINTHREAD;_CRT_SECURE_NO_WARNINGS;WIN32;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) __TBB_BUILD=1;USE_WINTHREAD;_CRT_SECURE_NO_WARNINGS;WIN32;_DEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) __TBB_BUILD=1;USE_WINTHREAD;_CRT_SECURE_NO_WARNINGS;WIN32;_DEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) __TBB_BUILD=1;USE_WINTHREAD;WIN32;_DEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) __TBB_BUILD=1;USE_WINTHREAD;WIN32;_DEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) __TBB_BUILD=1;USE_WINTHREAD;WIN32;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) __TBB_BUILD=1;USE_WINTHREAD;WIN32;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) __TBB_BUILD=1;USE_WINTHREAD;_CRT_SECURE_NO_WARNINGS;WIN32;_DEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) __TBB_BUILD=1;USE_WINTHREAD;_CRT_SECURE_NO_WARNINGS;WIN32;_DEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) __TBB_BUILD=1;USE_WINTHREAD;_CRT_SECURE_NO_WARNINGS;WIN32;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) __TBB_BUILD=1;USE_WINTHREAD;_CRT_SECURE_NO_WARNINGS;WIN32;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) ================================================ FILE: build/msvc15/benchmarks.vcxproj.filters ================================================  {4FC737F1-C7A5-4376-A066-2A32D752A2FF} cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx {93995380-89BD-4b04-88EB-625FBE52EBFB} h;hh;hpp;hxx;hm;inl;inc;xsd {6d3507c8-0e7e-45de-90d5-9daacabc8d2b} {3dfee594-40d0-4fea-992a-3958d8494fdd} Source Files Source Files Source Files\tbb Source Files\tbb Source Files\tbb Source Files\tbb Source Files\tbb Source Files Source Files Source Files\tbb Source Files\tbb Source Files\dlib Header Files Header Files Header Files Header Files Header Files Header Files Header Files Header Files Header Files Header Files ================================================ FILE: build/msvc15/concurrentqueue.sln ================================================  Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 15 VisualStudioVersion = 15.7.3 MinimumVisualStudioVersion = 10.0.40219.1 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "unittests", "unittests.vcxproj", "{4D9D3E37-3075-4A1A-8795-D6FA9B8F9A7D}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "benchmarks", "benchmarks.vcxproj", "{86870AC7-4A91-490A-A126-AFD6B0B24B7E}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "fuzztests", "fuzztests.vcxproj", "{D86EB0A1-CFDE-4177-87FE-A8337FFE6FA7}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Win32 = Debug|Win32 Debug|x64 = Debug|x64 Release|Win32 = Release|Win32 Release|x64 = Release|x64 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {4D9D3E37-3075-4A1A-8795-D6FA9B8F9A7D}.Debug|Win32.ActiveCfg = Debug|Win32 {4D9D3E37-3075-4A1A-8795-D6FA9B8F9A7D}.Debug|Win32.Build.0 = Debug|Win32 {4D9D3E37-3075-4A1A-8795-D6FA9B8F9A7D}.Debug|x64.ActiveCfg = Debug|x64 {4D9D3E37-3075-4A1A-8795-D6FA9B8F9A7D}.Debug|x64.Build.0 = Debug|x64 {4D9D3E37-3075-4A1A-8795-D6FA9B8F9A7D}.Release|Win32.ActiveCfg = Release|Win32 {4D9D3E37-3075-4A1A-8795-D6FA9B8F9A7D}.Release|Win32.Build.0 = Release|Win32 {4D9D3E37-3075-4A1A-8795-D6FA9B8F9A7D}.Release|x64.ActiveCfg = Release|x64 {4D9D3E37-3075-4A1A-8795-D6FA9B8F9A7D}.Release|x64.Build.0 = Release|x64 {86870AC7-4A91-490A-A126-AFD6B0B24B7E}.Debug|Win32.ActiveCfg = Debug|Win32 {86870AC7-4A91-490A-A126-AFD6B0B24B7E}.Debug|Win32.Build.0 = Debug|Win32 {86870AC7-4A91-490A-A126-AFD6B0B24B7E}.Debug|x64.ActiveCfg = Debug|x64 {86870AC7-4A91-490A-A126-AFD6B0B24B7E}.Debug|x64.Build.0 = Debug|x64 {86870AC7-4A91-490A-A126-AFD6B0B24B7E}.Release|Win32.ActiveCfg = Release|Win32 {86870AC7-4A91-490A-A126-AFD6B0B24B7E}.Release|Win32.Build.0 = Release|Win32 {86870AC7-4A91-490A-A126-AFD6B0B24B7E}.Release|x64.ActiveCfg = Release|x64 {86870AC7-4A91-490A-A126-AFD6B0B24B7E}.Release|x64.Build.0 = Release|x64 {D86EB0A1-CFDE-4177-87FE-A8337FFE6FA7}.Debug|Win32.ActiveCfg = Debug|Win32 {D86EB0A1-CFDE-4177-87FE-A8337FFE6FA7}.Debug|Win32.Build.0 = Debug|Win32 {D86EB0A1-CFDE-4177-87FE-A8337FFE6FA7}.Debug|x64.ActiveCfg = Debug|x64 {D86EB0A1-CFDE-4177-87FE-A8337FFE6FA7}.Debug|x64.Build.0 = Debug|x64 {D86EB0A1-CFDE-4177-87FE-A8337FFE6FA7}.Release|Win32.ActiveCfg = Release|Win32 {D86EB0A1-CFDE-4177-87FE-A8337FFE6FA7}.Release|Win32.Build.0 = Release|Win32 {D86EB0A1-CFDE-4177-87FE-A8337FFE6FA7}.Release|x64.ActiveCfg = Release|x64 {D86EB0A1-CFDE-4177-87FE-A8337FFE6FA7}.Release|x64.Build.0 = Release|x64 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection EndGlobal ================================================ FILE: build/msvc15/fuzztests.vcxproj ================================================  Debug Win32 Debug x64 Release Win32 Release x64 {D86EB0A1-CFDE-4177-87FE-A8337FFE6FA7} Win32Proj fuzztests 10.0.17134.0 Application true v141 Unicode Application true v141 Unicode Application false v141 true Unicode Application false v141 true Unicode true $(SolutionDir)..\bin\ obj\$(Configuration)$(Platform)\$(ProjectName)\ true $(SolutionDir)..\bin\ obj\$(Configuration)$(Platform)\$(ProjectName)\ false $(SolutionDir)..\bin\ obj\$(Configuration)$(Platform)\$(ProjectName)\ false $(SolutionDir)..\bin\ obj\$(Configuration)$(Platform)\$(ProjectName)\ Level3 Disabled _CRT_SECURE_NO_WARNINGS;WIN32;_DEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) 4800 Console true Level3 Disabled _CRT_SECURE_NO_WARNINGS;WIN32;_DEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) 4800 Console true Level3 MaxSpeed true true _CRT_SECURE_NO_WARNINGS;WIN32;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) 4800 Console true true true Level3 MaxSpeed true true _CRT_SECURE_NO_WARNINGS;WIN32;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) 4800 Console true true true ================================================ FILE: build/msvc15/fuzztests.vcxproj.filters ================================================  {4FC737F1-C7A5-4376-A066-2A32D752A2FF} cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx {93995380-89BD-4b04-88EB-625FBE52EBFB} h;hh;hpp;hxx;hm;inl;inc;xsd Source Files Source Files Source Files Header Files Header Files Header Files Header Files ================================================ FILE: build/msvc15/msvc_tbb_stubs.cpp ================================================ #include "tbb/tbb_main.h" #include "tbb/itt_notify.h" #include namespace tbb { namespace internal { // Taken from tbb_main.cpp (which doesn't compile as-is) void call_itt_notify_v5(int /*t*/, void* /*ptr*/) {} void itt_store_pointer_with_release_v3(void* dst, void* src) { ITT_NOTIFY(sync_releasing, dst); __TBB_store_with_release(*static_cast(dst), src); } } } extern "C" { #ifdef _WIN64 __int8 __TBB_machine_cmpswp1(volatile void *ptr, __int8 value, __int8 comparand) { return _InterlockedCompareExchange8((__int8*)ptr, value, comparand); } #else // Taken from tbb/machine/windows_intel64.h, which isn't included in 32-bit mode but is // still used for some reason __int64 __TBB_machine_cmpswp8(volatile void *ptr, __int64 value, __int64 comparand) { return _InterlockedCompareExchange64((__int64*)ptr, value, comparand); } #endif } ================================================ FILE: build/msvc15/unittests.vcxproj ================================================  Debug Win32 Debug x64 Release Win32 Release x64 {4D9D3E37-3075-4A1A-8795-D6FA9B8F9A7D} Win32Proj unittests 10.0.17134.0 Application true v141 Unicode Application true v141 Unicode Application false v141 true Unicode Application false v141 true Unicode true $(SolutionDir)..\bin\ obj\$(Configuration)$(Platform)\$(ProjectName)\ true $(SolutionDir)..\bin\ obj\$(Configuration)$(Platform)\$(ProjectName)\ false $(SolutionDir)..\bin\ obj\$(Configuration)$(Platform)\$(ProjectName)\ false $(SolutionDir)..\bin\ obj\$(Configuration)$(Platform)\$(ProjectName)\ Level3 Disabled WIN32;_DEBUG;_CONSOLE;_LIB;MOODYCAMEL_STATIC;%(PreprocessorDefinitions) 4146 Console true Level3 Disabled WIN32;_DEBUG;_CONSOLE;_LIB;MOODYCAMEL_STATIC;%(PreprocessorDefinitions) 4146 Console true Level3 MaxSpeed true true WIN32;NDEBUG;_CONSOLE;_LIB;MOODYCAMEL_STATIC;%(PreprocessorDefinitions) 4146 Console true true true Level3 MaxSpeed true true WIN32;NDEBUG;_CONSOLE;_LIB;MOODYCAMEL_STATIC;%(PreprocessorDefinitions) 4146 Console true true true false false false false _HAS_EXCEPTIONS=0;%(PreprocessorDefinitions) _HAS_EXCEPTIONS=0;%(PreprocessorDefinitions) _HAS_EXCEPTIONS=0;%(PreprocessorDefinitions) _HAS_EXCEPTIONS=0;%(PreprocessorDefinitions) false false false false _HAS_EXCEPTIONS=0;%(PreprocessorDefinitions) _HAS_EXCEPTIONS=0;%(PreprocessorDefinitions) _HAS_EXCEPTIONS=0;%(PreprocessorDefinitions) _HAS_EXCEPTIONS=0;%(PreprocessorDefinitions) ================================================ FILE: build/msvc15/unittests.vcxproj.filters ================================================  {4FC737F1-C7A5-4376-A066-2A32D752A2FF} cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx {93995380-89BD-4b04-88EB-625FBE52EBFB} h;hh;hpp;hxx;hm;inl;inc;xsd Header Files Header Files Header Files Header Files Header Files Header Files Source Files Source Files Source Files Source Files Source Files Source Files ================================================ FILE: build/msvc16/benchmarks.vcxproj ================================================ Debug Win32 Debug x64 Release Win32 Release x64 {86870AC7-4A91-490A-A126-AFD6B0B24B7E} Win32Proj benchmarks 10.0 Application true v142 Unicode Application true v142 Unicode Application false v142 true Unicode Application false v142 true Unicode false $(SolutionDir)..\bin\ obj\$(Configuration)$(Platform)\$(ProjectName)\ false $(SolutionDir)..\bin\ obj\$(Configuration)$(Platform)\$(ProjectName)\ false $(SolutionDir)..\bin\ obj\$(Configuration)$(Platform)\$(ProjectName)\ false $(SolutionDir)..\bin\ obj\$(Configuration)$(Platform)\$(ProjectName)\ Level3 Disabled _CRT_SECURE_NO_WARNINGS;_ENABLE_ATOMIC_ALIGNMENT_FIX;WIN32;_DEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) $(SolutionDir)\..\..\benchmarks true ProgramDatabase Console true tbb_debug.lib UseLinkTimeCodeGeneration Level3 Disabled _CRT_SECURE_NO_WARNINGS;_ENABLE_ATOMIC_ALIGNMENT_FIX;WIN32;_DEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) $(SolutionDir)\..\..\benchmarks true ProgramDatabase Console true tbb_debug.lib UseLinkTimeCodeGeneration Level3 MaxSpeed true true _CRT_SECURE_NO_WARNINGS;_ENABLE_ATOMIC_ALIGNMENT_FIX;WIN32;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) $(SolutionDir)\..\..\benchmarks Console true true true tbb.lib Level3 MaxSpeed true true _CRT_SECURE_NO_WARNINGS;_ENABLE_ATOMIC_ALIGNMENT_FIX;WIN32;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) $(SolutionDir)\..\..\benchmarks Console true true true tbb.lib 4244;4800 4244;4800 4244;4800 4244;4800 __TBB_BUILD=1;USE_WINTHREAD;WIN32;_DEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) __TBB_BUILD=1;USE_WINTHREAD;WIN32;_DEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) __TBB_BUILD=1;USE_WINTHREAD;WIN32;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) __TBB_BUILD=1;USE_WINTHREAD;WIN32;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) __TBB_BUILD=1;USE_WINTHREAD;WIN32;_DEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) __TBB_BUILD=1;USE_WINTHREAD;WIN32;_DEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) __TBB_BUILD=1;USE_WINTHREAD;WIN32;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) __TBB_BUILD=1;USE_WINTHREAD;WIN32;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) __TBB_BUILD=1;USE_WINTHREAD;WIN32;_DEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) __TBB_BUILD=1;USE_WINTHREAD;WIN32;_DEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) __TBB_BUILD=1;USE_WINTHREAD;WIN32;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) __TBB_BUILD=1;USE_WINTHREAD;WIN32;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) __TBB_BUILD=1;USE_WINTHREAD;WIN32;_DEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) __TBB_BUILD=1;USE_WINTHREAD;WIN32;_DEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) __TBB_BUILD=1;USE_WINTHREAD;WIN32;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) __TBB_BUILD=1;USE_WINTHREAD;WIN32;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) __TBB_BUILD=1;USE_WINTHREAD;_CRT_SECURE_NO_WARNINGS;WIN32;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) __TBB_BUILD=1;USE_WINTHREAD;_CRT_SECURE_NO_WARNINGS;WIN32;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) __TBB_BUILD=1;USE_WINTHREAD;_CRT_SECURE_NO_WARNINGS;WIN32;_DEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) __TBB_BUILD=1;USE_WINTHREAD;_CRT_SECURE_NO_WARNINGS;WIN32;_DEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) __TBB_BUILD=1;USE_WINTHREAD;WIN32;_DEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) __TBB_BUILD=1;USE_WINTHREAD;WIN32;_DEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) __TBB_BUILD=1;USE_WINTHREAD;WIN32;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) __TBB_BUILD=1;USE_WINTHREAD;WIN32;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) __TBB_BUILD=1;USE_WINTHREAD;_CRT_SECURE_NO_WARNINGS;WIN32;_DEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) __TBB_BUILD=1;USE_WINTHREAD;_CRT_SECURE_NO_WARNINGS;WIN32;_DEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) __TBB_BUILD=1;USE_WINTHREAD;_CRT_SECURE_NO_WARNINGS;WIN32;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) __TBB_BUILD=1;USE_WINTHREAD;_CRT_SECURE_NO_WARNINGS;WIN32;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) ================================================ FILE: build/msvc16/benchmarks.vcxproj.filters ================================================ {4FC737F1-C7A5-4376-A066-2A32D752A2FF} cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx {93995380-89BD-4b04-88EB-625FBE52EBFB} h;hh;hpp;hxx;hm;inl;inc;xsd {6d3507c8-0e7e-45de-90d5-9daacabc8d2b} {3dfee594-40d0-4fea-992a-3958d8494fdd} Source Files Source Files Source Files\tbb Source Files\tbb Source Files\tbb Source Files\tbb Source Files\tbb Source Files Source Files Source Files\tbb Source Files\tbb Source Files\dlib Header Files Header Files Header Files Header Files Header Files Header Files Header Files Header Files Header Files Header Files ================================================ FILE: build/msvc16/concurrentqueue.sln ================================================  Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio Version 16 VisualStudioVersion = 16.0.29001.49 MinimumVisualStudioVersion = 10.0.40219.1 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "unittests", "unittests.vcxproj", "{4D9D3E37-3075-4A1A-8795-D6FA9B8F9A7D}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "benchmarks", "benchmarks.vcxproj", "{86870AC7-4A91-490A-A126-AFD6B0B24B7E}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "fuzztests", "fuzztests.vcxproj", "{D86EB0A1-CFDE-4177-87FE-A8337FFE6FA7}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Win32 = Debug|Win32 Debug|x64 = Debug|x64 Release|Win32 = Release|Win32 Release|x64 = Release|x64 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {4D9D3E37-3075-4A1A-8795-D6FA9B8F9A7D}.Debug|Win32.ActiveCfg = Debug|Win32 {4D9D3E37-3075-4A1A-8795-D6FA9B8F9A7D}.Debug|Win32.Build.0 = Debug|Win32 {4D9D3E37-3075-4A1A-8795-D6FA9B8F9A7D}.Debug|x64.ActiveCfg = Debug|x64 {4D9D3E37-3075-4A1A-8795-D6FA9B8F9A7D}.Debug|x64.Build.0 = Debug|x64 {4D9D3E37-3075-4A1A-8795-D6FA9B8F9A7D}.Release|Win32.ActiveCfg = Release|Win32 {4D9D3E37-3075-4A1A-8795-D6FA9B8F9A7D}.Release|Win32.Build.0 = Release|Win32 {4D9D3E37-3075-4A1A-8795-D6FA9B8F9A7D}.Release|x64.ActiveCfg = Release|x64 {4D9D3E37-3075-4A1A-8795-D6FA9B8F9A7D}.Release|x64.Build.0 = Release|x64 {86870AC7-4A91-490A-A126-AFD6B0B24B7E}.Debug|Win32.ActiveCfg = Debug|Win32 {86870AC7-4A91-490A-A126-AFD6B0B24B7E}.Debug|Win32.Build.0 = Debug|Win32 {86870AC7-4A91-490A-A126-AFD6B0B24B7E}.Debug|x64.ActiveCfg = Debug|x64 {86870AC7-4A91-490A-A126-AFD6B0B24B7E}.Debug|x64.Build.0 = Debug|x64 {86870AC7-4A91-490A-A126-AFD6B0B24B7E}.Release|Win32.ActiveCfg = Release|Win32 {86870AC7-4A91-490A-A126-AFD6B0B24B7E}.Release|Win32.Build.0 = Release|Win32 {86870AC7-4A91-490A-A126-AFD6B0B24B7E}.Release|x64.ActiveCfg = Release|x64 {86870AC7-4A91-490A-A126-AFD6B0B24B7E}.Release|x64.Build.0 = Release|x64 {D86EB0A1-CFDE-4177-87FE-A8337FFE6FA7}.Debug|Win32.ActiveCfg = Debug|Win32 {D86EB0A1-CFDE-4177-87FE-A8337FFE6FA7}.Debug|Win32.Build.0 = Debug|Win32 {D86EB0A1-CFDE-4177-87FE-A8337FFE6FA7}.Debug|x64.ActiveCfg = Debug|x64 {D86EB0A1-CFDE-4177-87FE-A8337FFE6FA7}.Debug|x64.Build.0 = Debug|x64 {D86EB0A1-CFDE-4177-87FE-A8337FFE6FA7}.Release|Win32.ActiveCfg = Release|Win32 {D86EB0A1-CFDE-4177-87FE-A8337FFE6FA7}.Release|Win32.Build.0 = Release|Win32 {D86EB0A1-CFDE-4177-87FE-A8337FFE6FA7}.Release|x64.ActiveCfg = Release|x64 {D86EB0A1-CFDE-4177-87FE-A8337FFE6FA7}.Release|x64.Build.0 = Release|x64 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {F6973AFD-2024-4669-8812-FE9A592FF522} EndGlobalSection EndGlobal ================================================ FILE: build/msvc16/fuzztests.vcxproj ================================================  Debug Win32 Debug x64 Release Win32 Release x64 {D86EB0A1-CFDE-4177-87FE-A8337FFE6FA7} Win32Proj fuzztests 10.0 Application true v142 Unicode Application true v142 Unicode Application false v142 true Unicode Application false v142 true Unicode true $(SolutionDir)..\bin\ obj\$(Configuration)$(Platform)\$(ProjectName)\ true $(SolutionDir)..\bin\ obj\$(Configuration)$(Platform)\$(ProjectName)\ false $(SolutionDir)..\bin\ obj\$(Configuration)$(Platform)\$(ProjectName)\ false $(SolutionDir)..\bin\ obj\$(Configuration)$(Platform)\$(ProjectName)\ Level4 Disabled _CRT_SECURE_NO_WARNINGS;WIN32;_DEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) 4800 Console true Level3 Disabled _CRT_SECURE_NO_WARNINGS;WIN32;_DEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) 4800 Console true Level4 MaxSpeed true true _CRT_SECURE_NO_WARNINGS;WIN32;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) 4800 Console true true true Level3 MaxSpeed true true _CRT_SECURE_NO_WARNINGS;WIN32;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) 4800 Console true true true ================================================ FILE: build/msvc16/fuzztests.vcxproj.filters ================================================  {4FC737F1-C7A5-4376-A066-2A32D752A2FF} cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx {93995380-89BD-4b04-88EB-625FBE52EBFB} h;hh;hpp;hxx;hm;inl;inc;xsd Source Files Source Files Source Files Header Files Header Files Header Files Header Files ================================================ FILE: build/msvc16/msvc_tbb_stubs.cpp ================================================ #include "tbb/tbb_main.h" #include "tbb/itt_notify.h" #include namespace tbb { namespace internal { // Taken from tbb_main.cpp (which doesn't compile as-is) void call_itt_notify_v5(int /*t*/, void* /*ptr*/) {} void itt_store_pointer_with_release_v3(void* dst, void* src) { ITT_NOTIFY(sync_releasing, dst); __TBB_store_with_release(*static_cast(dst), src); } } } extern "C" { #ifdef _WIN64 __int8 __TBB_machine_cmpswp1(volatile void *ptr, __int8 value, __int8 comparand) { return _InterlockedCompareExchange8((__int8*)ptr, value, comparand); } #else // Taken from tbb/machine/windows_intel64.h, which isn't included in 32-bit mode but is // still used for some reason __int64 __TBB_machine_cmpswp8(volatile void *ptr, __int64 value, __int64 comparand) { return _InterlockedCompareExchange64((__int64*)ptr, value, comparand); } #endif } ================================================ FILE: build/msvc16/unittests.vcxproj ================================================  Debug Win32 Debug x64 Release Win32 Release x64 {4D9D3E37-3075-4A1A-8795-D6FA9B8F9A7D} Win32Proj unittests 10.0 Application true v142 Unicode Application true v142 Unicode Application false v142 true Unicode Application false v142 true Unicode true $(SolutionDir)..\bin\ obj\$(Configuration)$(Platform)\$(ProjectName)\ true $(SolutionDir)..\bin\ obj\$(Configuration)$(Platform)\$(ProjectName)\ false $(SolutionDir)..\bin\ obj\$(Configuration)$(Platform)\$(ProjectName)\ false $(SolutionDir)..\bin\ obj\$(Configuration)$(Platform)\$(ProjectName)\ Level4 Disabled WIN32;_DEBUG;_CONSOLE;_LIB;MOODYCAMEL_STATIC;%(PreprocessorDefinitions) 4146 Console true Level3 Disabled WIN32;_DEBUG;_CONSOLE;_LIB;MOODYCAMEL_STATIC;%(PreprocessorDefinitions) 4146 Console true Level4 MaxSpeed true true WIN32;NDEBUG;_CONSOLE;_LIB;MOODYCAMEL_STATIC;%(PreprocessorDefinitions) 4146 Console true true true Level3 MaxSpeed true true WIN32;NDEBUG;_CONSOLE;_LIB;MOODYCAMEL_STATIC;%(PreprocessorDefinitions) 4146 Console true true true false false false false _HAS_EXCEPTIONS=0;%(PreprocessorDefinitions) _HAS_EXCEPTIONS=0;%(PreprocessorDefinitions) _HAS_EXCEPTIONS=0;%(PreprocessorDefinitions) _HAS_EXCEPTIONS=0;%(PreprocessorDefinitions) false false false false _HAS_EXCEPTIONS=0;%(PreprocessorDefinitions) _HAS_EXCEPTIONS=0;%(PreprocessorDefinitions) _HAS_EXCEPTIONS=0;%(PreprocessorDefinitions) _HAS_EXCEPTIONS=0;%(PreprocessorDefinitions) ================================================ FILE: build/msvc16/unittests.vcxproj.filters ================================================  {4FC737F1-C7A5-4376-A066-2A32D752A2FF} cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx {93995380-89BD-4b04-88EB-625FBE52EBFB} h;hh;hpp;hxx;hm;inl;inc;xsd Header Files Header Files Header Files Header Files Header Files Header Files Source Files Source Files Source Files Source Files Source Files Source Files ================================================ FILE: build/xcode/Info.plist ================================================ CFBundleDevelopmentRegion en CFBundleDisplayName ${PRODUCT_NAME} CFBundleExecutable ${EXECUTABLE_NAME} CFBundleIdentifier ${PRODUCT_BUNDLE_IDENTIFIER} CFBundleInfoDictionaryVersion 6.0 CFBundleName ${PRODUCT_NAME} CFBundlePackageType APPL CFBundleShortVersionString 1.0 CFBundleSignature ???? CFBundleVersion 1.0 LSRequiresIPhoneOS UIRequiredDeviceCapabilities armv7 UISupportedInterfaceOrientations UIInterfaceOrientationPortrait UIInterfaceOrientationPortrait UISupportedInterfaceOrientations~ipad UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight ================================================ FILE: build/xcode/concurrentqueue.xcodeproj/project.pbxproj ================================================ // !$*UTF8*$! { archiveVersion = 1; classes = { }; objectVersion = 46; objects = { /* Begin PBXBuildFile section */ CFBF030B1C595BD60042518B /* simplethread.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CFBF03011C595BD60042518B /* simplethread.cpp */; }; CFBF030C1C595BD60042518B /* systemtime.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CFBF03031C595BD60042518B /* systemtime.cpp */; }; CFBF030E1C595BD60042518B /* mallocmacro.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CFBF03081C595BD60042518B /* mallocmacro.cpp */; }; CFBF030F1C595BD60042518B /* unittests.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CFBF030A1C595BD60042518B /* unittests.cpp */; }; CFBF03101C595BD60042518B /* concurrentqueue.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CFBF031A1C595BD60042518B /* concurrentqueue.cpp */; }; CFBF03111C595BD60042518B /* blockingconcurrentqueue.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CFBF031B1C595BD60042518B /* blockingconcurrentqueue.cpp */; }; CFBF03121C5962CD0042518B /* main_ios.mm in Sources */ = {isa = PBXBuildFile; fileRef = CFBF03101C595FBF0042518B /* main_ios.mm */; }; CFBF03141C5962E60042518B /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CFBF03131C5962E60042518B /* UIKit.framework */; }; /* End PBXBuildFile section */ /* Begin PBXFileReference section */ CFBF02E41C595A0F0042518B /* concurrentqueue-unittests-ios.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "concurrentqueue-unittests-ios.app"; sourceTree = BUILT_PRODUCTS_DIR; }; CFBF03011C595BD60042518B /* simplethread.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = simplethread.cpp; sourceTree = ""; }; CFBF03021C595BD60042518B /* simplethread.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = simplethread.h; sourceTree = ""; }; CFBF03031C595BD60042518B /* systemtime.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = systemtime.cpp; sourceTree = ""; }; CFBF03041C595BD60042518B /* systemtime.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = systemtime.h; sourceTree = ""; }; CFBF03081C595BD60042518B /* mallocmacro.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = mallocmacro.cpp; sourceTree = ""; }; CFBF03091C595BD60042518B /* minitest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = minitest.h; sourceTree = ""; }; CFBF030A1C595BD60042518B /* unittests.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = unittests.cpp; sourceTree = ""; }; CFBF031A1C595BD60042518B /* concurrentqueue.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = concurrentqueue.cpp; sourceTree = ""; }; CFBF031B1C595BD60042518B /* blockingconcurrentqueue.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = blockingconcurrentqueue.cpp; sourceTree = ""; }; CFBF03101C595FBF0042518B /* main_ios.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = main_ios.mm; sourceTree = ""; }; CFBF03131C5962E60042518B /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ CFBF02E11C595A0F0042518B /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( CFBF03141C5962E60042518B /* UIKit.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ CFBF02CB1C5959990042518B = { isa = PBXGroup; children = ( CFBF03101C595FBF0042518B /* main_ios.mm */, CFBF03001C595BD60042518B /* c_api */, CFBF03001C595BD60042518B /* common */, CFBF03061C595BD60042518B /* unittests */, CFBF02D51C5959990042518B /* Products */, CFBF03131C5962E60042518B /* UIKit.framework */, ); sourceTree = ""; }; CFBF02D51C5959990042518B /* Products */ = { isa = PBXGroup; children = ( CFBF02E41C595A0F0042518B /* concurrentqueue-unittests-ios.app */, ); name = Products; sourceTree = ""; }; CFBF03001C595BD60042518B /* c_api */ = { isa = PBXGroup; children = ( CFBF031A1C595BD60042518B /* concurrentqueue.cpp */, CFBF031B1C595BD60042518B /* blockingconcurrentqueue.cpp */, ); name = c_api; path = ../../c_api; sourceTree = ""; }; CFBF03001C595BD60042518B /* common */ = { isa = PBXGroup; children = ( CFBF03011C595BD60042518B /* simplethread.cpp */, CFBF03021C595BD60042518B /* simplethread.h */, CFBF03031C595BD60042518B /* systemtime.cpp */, CFBF03041C595BD60042518B /* systemtime.h */, ); name = common; path = ../../tests/common; sourceTree = ""; }; CFBF03061C595BD60042518B /* unittests */ = { isa = PBXGroup; children = ( CFBF03081C595BD60042518B /* mallocmacro.cpp */, CFBF03091C595BD60042518B /* minitest.h */, CFBF030A1C595BD60042518B /* unittests.cpp */, ); name = unittests; path = ../../tests/unittests; sourceTree = ""; }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ CFBF02E31C595A0F0042518B /* concurrentqueue-unittests-ios */ = { isa = PBXNativeTarget; buildConfigurationList = CFBF02F81C595A0F0042518B /* Build configuration list for PBXNativeTarget "concurrentqueue-unittests-ios" */; buildPhases = ( CFBF02E01C595A0F0042518B /* Sources */, CFBF02E11C595A0F0042518B /* Frameworks */, CFBF02E21C595A0F0042518B /* Resources */, ); buildRules = ( ); dependencies = ( ); name = "concurrentqueue-unittests-ios"; productName = "concurrentqueue-unittests-ios"; productReference = CFBF02E41C595A0F0042518B /* concurrentqueue-unittests-ios.app */; productType = "com.apple.product-type.application"; }; /* End PBXNativeTarget section */ /* Begin PBXProject section */ CFBF02CC1C5959990042518B /* Project object */ = { isa = PBXProject; attributes = { LastUpgradeCheck = 0720; ORGANIZATIONNAME = cameron314; TargetAttributes = { CFBF02E31C595A0F0042518B = { CreatedOnToolsVersion = 7.2; }; }; }; buildConfigurationList = CFBF02CF1C5959990042518B /* Build configuration list for PBXProject "concurrentqueue" */; compatibilityVersion = "Xcode 3.2"; developmentRegion = English; hasScannedForEncodings = 0; knownRegions = ( en, Base, ); mainGroup = CFBF02CB1C5959990042518B; productRefGroup = CFBF02D51C5959990042518B /* Products */; projectDirPath = ""; projectRoot = ""; targets = ( CFBF02E31C595A0F0042518B /* concurrentqueue-unittests-ios */, ); }; /* End PBXProject section */ /* Begin PBXResourcesBuildPhase section */ CFBF02E21C595A0F0042518B /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXResourcesBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ CFBF02E01C595A0F0042518B /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( CFBF03121C5962CD0042518B /* main_ios.mm in Sources */, CFBF030C1C595BD60042518B /* systemtime.cpp in Sources */, CFBF030E1C595BD60042518B /* mallocmacro.cpp in Sources */, CFBF030B1C595BD60042518B /* simplethread.cpp in Sources */, CFBF030F1C595BD60042518B /* unittests.cpp in Sources */, CFBF03101C595BD60042518B /* concurrentqueue.cpp in Sources */, CFBF03111C595BD60042518B /* blockingconcurrentqueue.cpp in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXSourcesBuildPhase section */ /* Begin XCBuildConfiguration section */ CFBF02DB1C5959990042518B /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; COPY_PHASE_STRIP = NO; DEBUG_INFORMATION_FORMAT = dwarf; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_DYNAMIC_NO_PIC = NO; GCC_NO_COMMON_BLOCKS = YES; GCC_OPTIMIZATION_LEVEL = 0; GCC_PREPROCESSOR_DEFINITIONS = ( "DEBUG=1", "$(inherited)", ); GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; GCC_WARN_UNDECLARED_SELECTOR = YES; GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; IPHONEOS_DEPLOYMENT_TARGET = 8.0; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; }; name = Debug; }; CFBF02DC1C5959990042518B /* Release */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; COPY_PHASE_STRIP = NO; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; ENABLE_NS_ASSERTIONS = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_NO_COMMON_BLOCKS = YES; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; GCC_WARN_UNDECLARED_SELECTOR = YES; GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; IPHONEOS_DEPLOYMENT_TARGET = 8.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; VALIDATE_PRODUCT = YES; }; name = Release; }; CFBF02F91C595A0F0042518B /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { GCC_THREADSAFE_STATICS = NO; INFOPLIST_FILE = Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "cameron314.concurrentqueue-unittests-ios"; PRODUCT_NAME = "$(TARGET_NAME)"; TARGETED_DEVICE_FAMILY = "1,2"; }; name = Debug; }; CFBF02FA1C595A0F0042518B /* Release */ = { isa = XCBuildConfiguration; buildSettings = { GCC_PREPROCESSOR_DEFINITIONS = "NDEBUG=1"; GCC_THREADSAFE_STATICS = NO; INFOPLIST_FILE = Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "cameron314.concurrentqueue-unittests-ios"; PRODUCT_NAME = "$(TARGET_NAME)"; TARGETED_DEVICE_FAMILY = "1,2"; }; name = Release; }; /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ CFBF02CF1C5959990042518B /* Build configuration list for PBXProject "concurrentqueue" */ = { isa = XCConfigurationList; buildConfigurations = ( CFBF02DB1C5959990042518B /* Debug */, CFBF02DC1C5959990042518B /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; CFBF02F81C595A0F0042518B /* Build configuration list for PBXNativeTarget "concurrentqueue-unittests-ios" */ = { isa = XCConfigurationList; buildConfigurations = ( CFBF02F91C595A0F0042518B /* Debug */, CFBF02FA1C595A0F0042518B /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; /* End XCConfigurationList section */ }; rootObject = CFBF02CC1C5959990042518B /* Project object */; } ================================================ FILE: build/xcode/concurrentqueue.xcodeproj/project.xcworkspace/contents.xcworkspacedata ================================================ ================================================ FILE: build/xcode/concurrentqueue.xcodeproj/xcshareddata/xcschemes/concurrentqueue-unittests-ios.xcscheme ================================================ ================================================ FILE: build/xcode/main_ios.mm ================================================ #import // runAllTests should be defined by the main unit test compilation // unit (unittests.cpp) bool runAllTests(); // Define a minimal UIApplicationDelegate. @interface AppDelegate : NSObject @property (nonatomic, strong) UIWindow *window; @end @implementation AppDelegate - (BOOL)application:(__unused UIApplication *)application didFinishLaunchingWithOptions:(__unused NSDictionary *)launchOptions { // Xcode / iOS will complain unless a window and a root view // controller is setup at application launch. self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; self.window.rootViewController = [[UIViewController alloc] initWithNibName:nil bundle:nil]; [self.window makeKeyAndVisible]; dispatch_async(dispatch_get_main_queue(), ^{ [self run]; }); return YES; } -(void) run { NSLog(@"Starting unittests run..."); const bool result = runAllTests(); NSLog(@"%@", result ? @"All tests passed" : @"Test(s) failed!"); } @end int main(int argc, char *argv[]) { @autoreleasepool { return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); } } ================================================ FILE: c_api/blockingconcurrentqueue.cpp ================================================ #include "concurrentqueue.h" #include "../blockingconcurrentqueue.h" typedef moodycamel::BlockingConcurrentQueue MoodycamelBCQType, *MoodycamelBCQPtr; extern "C" { int moodycamel_bcq_create(MoodycamelBCQHandle* handle) { MoodycamelBCQPtr retval = new MoodycamelBCQType; if (retval == nullptr) { return 0; } *handle = retval; return 1; } int moodycamel_bcq_destroy(MoodycamelBCQHandle handle) { delete reinterpret_cast(handle); return 1; } int moodycamel_bcq_enqueue(MoodycamelBCQHandle handle, MoodycamelValue value) { return reinterpret_cast(handle)->enqueue(value) ? 1 : 0; } int moodycamel_bcq_wait_dequeue(MoodycamelBCQHandle handle, MoodycamelValue* value) { reinterpret_cast(handle)->wait_dequeue(*value); return 1; } int moodycamel_bcq_try_dequeue(MoodycamelBCQHandle handle, MoodycamelValue* value) { return reinterpret_cast(handle)->try_dequeue(*value) ? 1 : 0; } } ================================================ FILE: c_api/concurrentqueue.cpp ================================================ #include "concurrentqueue.h" #include "../concurrentqueue.h" typedef moodycamel::ConcurrentQueue MoodycamelCQType, *MoodycamelCQPtr; extern "C" { int moodycamel_cq_create(MoodycamelCQHandle* handle) { MoodycamelCQPtr retval = new MoodycamelCQType; if (retval == nullptr) { return 0; } *handle = retval; return 1; } int moodycamel_cq_destroy(MoodycamelCQHandle handle) { delete reinterpret_cast(handle); return 1; } int moodycamel_cq_enqueue(MoodycamelCQHandle handle, MoodycamelValue value) { return reinterpret_cast(handle)->enqueue(value) ? 1 : 0; } int moodycamel_cq_try_dequeue(MoodycamelCQHandle handle, MoodycamelValue* value) { return reinterpret_cast(handle)->try_dequeue(*value) ? 1 : 0; } size_t moodycamel_cq_size_approx(MoodycamelCQHandle handle) { return reinterpret_cast(handle)->size_approx(); } } ================================================ FILE: c_api/concurrentqueue.h ================================================ #pragma once #include #ifdef __cplusplus extern "C" { #endif #ifndef MOODYCAMEL_EXPORT #ifdef _WIN32 #if defined(MOODYCAMEL_STATIC) //preferred way #define MOODYCAMEL_EXPORT #elif defined(DLL_EXPORT) #define MOODYCAMEL_EXPORT __declspec(dllexport) #else #define MOODYCAMEL_EXPORT __declspec(dllimport) #endif #else #define MOODYCAMEL_EXPORT #endif #endif typedef void* MoodycamelCQHandle; typedef void* MoodycamelBCQHandle; typedef void* MoodycamelValue; MOODYCAMEL_EXPORT int moodycamel_cq_create(MoodycamelCQHandle* handle); MOODYCAMEL_EXPORT int moodycamel_cq_destroy(MoodycamelCQHandle handle); MOODYCAMEL_EXPORT int moodycamel_cq_enqueue(MoodycamelCQHandle handle, MoodycamelValue value); MOODYCAMEL_EXPORT int moodycamel_cq_try_dequeue(MoodycamelCQHandle handle, MoodycamelValue* value); MOODYCAMEL_EXPORT size_t moodycamel_cq_size_approx(MoodycamelCQHandle handle); MOODYCAMEL_EXPORT int moodycamel_bcq_create(MoodycamelBCQHandle* handle); MOODYCAMEL_EXPORT int moodycamel_bcq_destroy(MoodycamelBCQHandle handle); MOODYCAMEL_EXPORT int moodycamel_bcq_enqueue(MoodycamelBCQHandle handle, MoodycamelValue value); MOODYCAMEL_EXPORT int moodycamel_bcq_wait_dequeue(MoodycamelBCQHandle handle, MoodycamelValue* value); MOODYCAMEL_EXPORT int moodycamel_bcq_try_dequeue(MoodycamelBCQHandle handle, MoodycamelValue* value); #ifdef __cplusplus } #endif ================================================ FILE: concurrentqueue.h ================================================ // Provides a C++11 implementation of a multi-producer, multi-consumer lock-free queue. // An overview, including benchmark results, is provided here: // http://moodycamel.com/blog/2014/a-fast-general-purpose-lock-free-queue-for-c++ // The full design is also described in excruciating detail at: // http://moodycamel.com/blog/2014/detailed-design-of-a-lock-free-queue // Simplified BSD license: // Copyright (c) 2013-2020, Cameron Desrochers. // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, // are permitted provided that the following conditions are met: // // - Redistributions of source code must retain the above copyright notice, this list of // conditions and the following disclaimer. // - Redistributions in binary form must reproduce the above copyright notice, this list of // conditions and the following disclaimer in the documentation and/or other materials // provided with the distribution. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF // MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL // THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT // OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR // TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, // EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // Also dual-licensed under the Boost Software License (see LICENSE.md) #pragma once #if defined(__GNUC__) && !defined(__INTEL_COMPILER) // Disable -Wconversion warnings (spuriously triggered when Traits::size_t and // Traits::index_t are set to < 32 bits, causing integer promotion, causing warnings // upon assigning any computed values) #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #ifdef MCDBGQ_USE_RELACY #pragma GCC diagnostic ignored "-Wint-to-pointer-cast" #endif #endif #if defined(_MSC_VER) && (!defined(_HAS_CXX17) || !_HAS_CXX17) // VS2019 with /W4 warns about constant conditional expressions but unless /std=c++17 or higher // does not support `if constexpr`, so we have no choice but to simply disable the warning #pragma warning(push) #pragma warning(disable: 4127) // conditional expression is constant #endif #if defined(__APPLE__) #include "TargetConditionals.h" #endif #ifdef MCDBGQ_USE_RELACY #include "relacy/relacy_std.hpp" #include "relacy_shims.h" // We only use malloc/free anyway, and the delete macro messes up `= delete` method declarations. // We'll override the default trait malloc ourselves without a macro. #undef new #undef delete #undef malloc #undef free #else #include // Requires C++11. Sorry VS2010. #include #endif #include // for max_align_t #include #include #include #include #include #include #include // for CHAR_BIT #include #include // partly for __WINPTHREADS_VERSION if on MinGW-w64 w/ POSIX threading #include // used for thread exit synchronization // Platform-specific definitions of a numeric thread ID type and an invalid value namespace moodycamel { namespace details { template struct thread_id_converter { typedef thread_id_t thread_id_numeric_size_t; typedef thread_id_t thread_id_hash_t; static thread_id_hash_t prehash(thread_id_t const& x) { return x; } }; } } #if defined(MCDBGQ_USE_RELACY) namespace moodycamel { namespace details { typedef std::uint32_t thread_id_t; static const thread_id_t invalid_thread_id = 0xFFFFFFFFU; static const thread_id_t invalid_thread_id2 = 0xFFFFFFFEU; static inline thread_id_t thread_id() { return rl::thread_index(); } } } #elif defined(_WIN32) || defined(__WINDOWS__) || defined(__WIN32__) // No sense pulling in windows.h in a header, we'll manually declare the function // we use and rely on backwards-compatibility for this not to break extern "C" __declspec(dllimport) unsigned long __stdcall GetCurrentThreadId(void); namespace moodycamel { namespace details { static_assert(sizeof(unsigned long) == sizeof(std::uint32_t), "Expected size of unsigned long to be 32 bits on Windows"); typedef std::uint32_t thread_id_t; static const thread_id_t invalid_thread_id = 0; // See http://blogs.msdn.com/b/oldnewthing/archive/2004/02/23/78395.aspx static const thread_id_t invalid_thread_id2 = 0xFFFFFFFFU; // Not technically guaranteed to be invalid, but is never used in practice. Note that all Win32 thread IDs are presently multiples of 4. static inline thread_id_t thread_id() { return static_cast(::GetCurrentThreadId()); } } } #elif defined(__arm__) || defined(_M_ARM) || defined(__aarch64__) || (defined(__APPLE__) && TARGET_OS_IPHONE) || defined(__MVS__) || defined(MOODYCAMEL_NO_THREAD_LOCAL) namespace moodycamel { namespace details { static_assert(sizeof(std::thread::id) == 4 || sizeof(std::thread::id) == 8, "std::thread::id is expected to be either 4 or 8 bytes"); typedef std::thread::id thread_id_t; static const thread_id_t invalid_thread_id; // Default ctor creates invalid ID // Note we don't define a invalid_thread_id2 since std::thread::id doesn't have one; it's // only used if MOODYCAMEL_CPP11_THREAD_LOCAL_SUPPORTED is defined anyway, which it won't // be. static inline thread_id_t thread_id() { return std::this_thread::get_id(); } template struct thread_id_size { }; template<> struct thread_id_size<4> { typedef std::uint32_t numeric_t; }; template<> struct thread_id_size<8> { typedef std::uint64_t numeric_t; }; template<> struct thread_id_converter { typedef thread_id_size::numeric_t thread_id_numeric_size_t; #ifndef __APPLE__ typedef std::size_t thread_id_hash_t; #else typedef thread_id_numeric_size_t thread_id_hash_t; #endif static thread_id_hash_t prehash(thread_id_t const& x) { #ifndef __APPLE__ return std::hash()(x); #else return *reinterpret_cast(&x); #endif } }; } } #else // Use a nice trick from this answer: http://stackoverflow.com/a/8438730/21475 // In order to get a numeric thread ID in a platform-independent way, we use a thread-local // static variable's address as a thread identifier :-) #if defined(__GNUC__) || defined(__INTEL_COMPILER) #define MOODYCAMEL_THREADLOCAL __thread #elif defined(_MSC_VER) #define MOODYCAMEL_THREADLOCAL __declspec(thread) #else // Assume C++11 compliant compiler #define MOODYCAMEL_THREADLOCAL thread_local #endif namespace moodycamel { namespace details { typedef std::uintptr_t thread_id_t; static const thread_id_t invalid_thread_id = 0; // Address can't be nullptr static const thread_id_t invalid_thread_id2 = 1; // Member accesses off a null pointer are also generally invalid. Plus it's not aligned. inline thread_id_t thread_id() { static MOODYCAMEL_THREADLOCAL int x; return reinterpret_cast(&x); } } } #endif // Constexpr if #ifndef MOODYCAMEL_CONSTEXPR_IF #if (defined(_MSC_VER) && defined(_HAS_CXX17) && _HAS_CXX17) || __cplusplus > 201402L #define MOODYCAMEL_CONSTEXPR_IF if constexpr #define MOODYCAMEL_MAYBE_UNUSED [[maybe_unused]] #else #define MOODYCAMEL_CONSTEXPR_IF if #define MOODYCAMEL_MAYBE_UNUSED #endif #endif // Exceptions #ifndef MOODYCAMEL_EXCEPTIONS_ENABLED #if (defined(_MSC_VER) && defined(_CPPUNWIND)) || (defined(__GNUC__) && defined(__EXCEPTIONS)) || (!defined(_MSC_VER) && !defined(__GNUC__)) #define MOODYCAMEL_EXCEPTIONS_ENABLED #endif #endif #ifdef MOODYCAMEL_EXCEPTIONS_ENABLED #define MOODYCAMEL_TRY try #define MOODYCAMEL_CATCH(...) catch(__VA_ARGS__) #define MOODYCAMEL_RETHROW throw #define MOODYCAMEL_THROW(expr) throw (expr) #else #define MOODYCAMEL_TRY MOODYCAMEL_CONSTEXPR_IF (true) #define MOODYCAMEL_CATCH(...) else MOODYCAMEL_CONSTEXPR_IF (false) #define MOODYCAMEL_RETHROW #define MOODYCAMEL_THROW(expr) #endif #ifndef MOODYCAMEL_NOEXCEPT #if !defined(MOODYCAMEL_EXCEPTIONS_ENABLED) #define MOODYCAMEL_NOEXCEPT #define MOODYCAMEL_NOEXCEPT_CTOR(type, valueType, expr) true #define MOODYCAMEL_NOEXCEPT_ASSIGN(type, valueType, expr) true #elif defined(_MSC_VER) && defined(_NOEXCEPT) && _MSC_VER < 1800 // VS2012's std::is_nothrow_[move_]constructible is broken and returns true when it shouldn't :-( // We have to assume *all* non-trivial constructors may throw on VS2012! #define MOODYCAMEL_NOEXCEPT _NOEXCEPT #define MOODYCAMEL_NOEXCEPT_CTOR(type, valueType, expr) (std::is_rvalue_reference::value && std::is_move_constructible::value ? std::is_trivially_move_constructible::value : std::is_trivially_copy_constructible::value) #define MOODYCAMEL_NOEXCEPT_ASSIGN(type, valueType, expr) ((std::is_rvalue_reference::value && std::is_move_assignable::value ? std::is_trivially_move_assignable::value || std::is_nothrow_move_assignable::value : std::is_trivially_copy_assignable::value || std::is_nothrow_copy_assignable::value) && MOODYCAMEL_NOEXCEPT_CTOR(type, valueType, expr)) #elif defined(_MSC_VER) && defined(_NOEXCEPT) && _MSC_VER < 1900 #define MOODYCAMEL_NOEXCEPT _NOEXCEPT #define MOODYCAMEL_NOEXCEPT_CTOR(type, valueType, expr) (std::is_rvalue_reference::value && std::is_move_constructible::value ? std::is_trivially_move_constructible::value || std::is_nothrow_move_constructible::value : std::is_trivially_copy_constructible::value || std::is_nothrow_copy_constructible::value) #define MOODYCAMEL_NOEXCEPT_ASSIGN(type, valueType, expr) ((std::is_rvalue_reference::value && std::is_move_assignable::value ? std::is_trivially_move_assignable::value || std::is_nothrow_move_assignable::value : std::is_trivially_copy_assignable::value || std::is_nothrow_copy_assignable::value) && MOODYCAMEL_NOEXCEPT_CTOR(type, valueType, expr)) #else #define MOODYCAMEL_NOEXCEPT noexcept #define MOODYCAMEL_NOEXCEPT_CTOR(type, valueType, expr) noexcept(expr) #define MOODYCAMEL_NOEXCEPT_ASSIGN(type, valueType, expr) noexcept(expr) #endif #endif #ifndef MOODYCAMEL_CPP11_THREAD_LOCAL_SUPPORTED #ifdef MCDBGQ_USE_RELACY #define MOODYCAMEL_CPP11_THREAD_LOCAL_SUPPORTED #else // VS2013 doesn't support `thread_local`, and MinGW-w64 w/ POSIX threading has a crippling bug: http://sourceforge.net/p/mingw-w64/bugs/445 // g++ <=4.7 doesn't support thread_local either. // Finally, iOS/ARM doesn't have support for it either, and g++/ARM allows it to compile but it's unconfirmed to actually work #if (!defined(_MSC_VER) || _MSC_VER >= 1900) && (!defined(__MINGW32__) && !defined(__MINGW64__) || !defined(__WINPTHREADS_VERSION)) && (!defined(__GNUC__) || __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 8)) && (!defined(__APPLE__) || !TARGET_OS_IPHONE) && !defined(__arm__) && !defined(_M_ARM) && !defined(__aarch64__) && !defined(__MVS__) && !defined(MOODYCAMEL_NO_THREAD_LOCAL) // Assume `thread_local` is fully supported in all other C++11 compilers/platforms #define MOODYCAMEL_CPP11_THREAD_LOCAL_SUPPORTED // tentatively enabled for now; years ago several users report having problems with it on #endif #endif #endif // VS2012 doesn't support deleted functions. // In this case, we declare the function normally but don't define it. A link error will be generated if the function is called. #ifndef MOODYCAMEL_DELETE_FUNCTION #if defined(_MSC_VER) && _MSC_VER < 1800 #define MOODYCAMEL_DELETE_FUNCTION #else #define MOODYCAMEL_DELETE_FUNCTION = delete #endif #endif namespace moodycamel { namespace details { #ifndef MOODYCAMEL_ALIGNAS // VS2013 doesn't support alignas or alignof, and align() requires a constant literal #if defined(_MSC_VER) && _MSC_VER <= 1800 #define MOODYCAMEL_ALIGNAS(alignment) __declspec(align(alignment)) #define MOODYCAMEL_ALIGNOF(obj) __alignof(obj) #define MOODYCAMEL_ALIGNED_TYPE_LIKE(T, obj) typename details::Vs2013Aligned::value, T>::type template struct Vs2013Aligned { }; // default, unsupported alignment template struct Vs2013Aligned<1, T> { typedef __declspec(align(1)) T type; }; template struct Vs2013Aligned<2, T> { typedef __declspec(align(2)) T type; }; template struct Vs2013Aligned<4, T> { typedef __declspec(align(4)) T type; }; template struct Vs2013Aligned<8, T> { typedef __declspec(align(8)) T type; }; template struct Vs2013Aligned<16, T> { typedef __declspec(align(16)) T type; }; template struct Vs2013Aligned<32, T> { typedef __declspec(align(32)) T type; }; template struct Vs2013Aligned<64, T> { typedef __declspec(align(64)) T type; }; template struct Vs2013Aligned<128, T> { typedef __declspec(align(128)) T type; }; template struct Vs2013Aligned<256, T> { typedef __declspec(align(256)) T type; }; #else template struct identity { typedef T type; }; #define MOODYCAMEL_ALIGNAS(alignment) alignas(alignment) #define MOODYCAMEL_ALIGNOF(obj) alignof(obj) #define MOODYCAMEL_ALIGNED_TYPE_LIKE(T, obj) alignas(alignof(obj)) typename details::identity::type #endif #endif } } // TSAN can false report races in lock-free code. To enable TSAN to be used from projects that use this one, // we can apply per-function compile-time suppression. // See https://clang.llvm.org/docs/ThreadSanitizer.html#has-feature-thread-sanitizer #define MOODYCAMEL_NO_TSAN #if defined(__has_feature) #if __has_feature(thread_sanitizer) #undef MOODYCAMEL_NO_TSAN #define MOODYCAMEL_NO_TSAN __attribute__((no_sanitize("thread"))) #endif // TSAN #endif // TSAN // Compiler-specific likely/unlikely hints namespace moodycamel { namespace details { #if defined(__GNUC__) static inline bool (likely)(bool x) { return __builtin_expect((x), true); } static inline bool (unlikely)(bool x) { return __builtin_expect((x), false); } #else static inline bool (likely)(bool x) { return x; } static inline bool (unlikely)(bool x) { return x; } #endif } } #ifdef MOODYCAMEL_QUEUE_INTERNAL_DEBUG #include "internal/concurrentqueue_internal_debug.h" #endif namespace moodycamel { namespace details { template struct const_numeric_max { static_assert(std::is_integral::value, "const_numeric_max can only be used with integers"); static const T value = std::numeric_limits::is_signed ? (static_cast(1) << (sizeof(T) * CHAR_BIT - 1)) - static_cast(1) : static_cast(-1); }; #if defined(__GLIBCXX__) typedef ::max_align_t std_max_align_t; // libstdc++ forgot to add it to std:: for a while #else typedef std::max_align_t std_max_align_t; // Others (e.g. MSVC) insist it can *only* be accessed via std:: #endif // Some platforms have incorrectly set max_align_t to a type with <8 bytes alignment even while supporting // 8-byte aligned scalar values (*cough* 32-bit iOS). Work around this with our own union. See issue #64. typedef union { std_max_align_t x; long long y; void* z; } max_align_t; } // Default traits for the ConcurrentQueue. To change some of the // traits without re-implementing all of them, inherit from this // struct and shadow the declarations you wish to be different; // since the traits are used as a template type parameter, the // shadowed declarations will be used where defined, and the defaults // otherwise. struct ConcurrentQueueDefaultTraits { // General-purpose size type. std::size_t is strongly recommended. typedef std::size_t size_t; // The type used for the enqueue and dequeue indices. Must be at least as // large as size_t. Should be significantly larger than the number of elements // you expect to hold at once, especially if you have a high turnover rate; // for example, on 32-bit x86, if you expect to have over a hundred million // elements or pump several million elements through your queue in a very // short space of time, using a 32-bit type *may* trigger a race condition. // A 64-bit int type is recommended in that case, and in practice will // prevent a race condition no matter the usage of the queue. Note that // whether the queue is lock-free with a 64-int type depends on the whether // std::atomic is lock-free, which is platform-specific. typedef std::size_t index_t; // Internally, all elements are enqueued and dequeued from multi-element // blocks; this is the smallest controllable unit. If you expect few elements // but many producers, a smaller block size should be favoured. For few producers // and/or many elements, a larger block size is preferred. A sane default // is provided. Must be a power of 2. static const size_t BLOCK_SIZE = 32; // For explicit producers (i.e. when using a producer token), the block is // checked for being empty by iterating through a list of flags, one per element. // For large block sizes, this is too inefficient, and switching to an atomic // counter-based approach is faster. The switch is made for block sizes strictly // larger than this threshold. static const size_t EXPLICIT_BLOCK_EMPTY_COUNTER_THRESHOLD = 32; // How many full blocks can be expected for a single explicit producer? This should // reflect that number's maximum for optimal performance. Must be a power of 2. static const size_t EXPLICIT_INITIAL_INDEX_SIZE = 32; // How many full blocks can be expected for a single implicit producer? This should // reflect that number's maximum for optimal performance. Must be a power of 2. static const size_t IMPLICIT_INITIAL_INDEX_SIZE = 32; // The initial size of the hash table mapping thread IDs to implicit producers. // Note that the hash is resized every time it becomes half full. // Must be a power of two, and either 0 or at least 1. If 0, implicit production // (using the enqueue methods without an explicit producer token) is disabled. static const size_t INITIAL_IMPLICIT_PRODUCER_HASH_SIZE = 32; // Controls the number of items that an explicit consumer (i.e. one with a token) // must consume before it causes all consumers to rotate and move on to the next // internal queue. static const std::uint32_t EXPLICIT_CONSUMER_CONSUMPTION_QUOTA_BEFORE_ROTATE = 256; // The maximum number of elements (inclusive) that can be enqueued to a sub-queue. // Enqueue operations that would cause this limit to be surpassed will fail. Note // that this limit is enforced at the block level (for performance reasons), i.e. // it's rounded up to the nearest block size. static const size_t MAX_SUBQUEUE_SIZE = details::const_numeric_max::value; // The number of times to spin before sleeping when waiting on a semaphore. // Recommended values are on the order of 1000-10000 unless the number of // consumer threads exceeds the number of idle cores (in which case try 0-100). // Only affects instances of the BlockingConcurrentQueue. static const int MAX_SEMA_SPINS = 10000; // Whether to recycle dynamically-allocated blocks into an internal free list or // not. If false, only pre-allocated blocks (controlled by the constructor // arguments) will be recycled, and all others will be `free`d back to the heap. // Note that blocks consumed by explicit producers are only freed on destruction // of the queue (not following destruction of the token) regardless of this trait. static const bool RECYCLE_ALLOCATED_BLOCKS = false; #ifndef MCDBGQ_USE_RELACY // Memory allocation can be customized if needed. // malloc should return nullptr on failure, and handle alignment like std::malloc. #if defined(malloc) || defined(free) // Gah, this is 2015, stop defining macros that break standard code already! // Work around malloc/free being special macros: static inline void* WORKAROUND_malloc(size_t size) { return malloc(size); } static inline void WORKAROUND_free(void* ptr) { return free(ptr); } static inline void* (malloc)(size_t size) { return WORKAROUND_malloc(size); } static inline void (free)(void* ptr) { return WORKAROUND_free(ptr); } #else static inline void* malloc(size_t size) { return std::malloc(size); } static inline void free(void* ptr) { return std::free(ptr); } #endif #else // Debug versions when running under the Relacy race detector (ignore // these in user code) static inline void* malloc(size_t size) { return rl::rl_malloc(size, $); } static inline void free(void* ptr) { return rl::rl_free(ptr, $); } #endif }; // When producing or consuming many elements, the most efficient way is to: // 1) Use one of the bulk-operation methods of the queue with a token // 2) Failing that, use the bulk-operation methods without a token // 3) Failing that, create a token and use that with the single-item methods // 4) Failing that, use the single-parameter methods of the queue // Having said that, don't create tokens willy-nilly -- ideally there should be // a maximum of one token per thread (of each kind). struct ProducerToken; struct ConsumerToken; template class ConcurrentQueue; template class BlockingConcurrentQueue; class ConcurrentQueueTests; namespace details { struct ConcurrentQueueProducerTypelessBase { ConcurrentQueueProducerTypelessBase* next; std::atomic inactive; ProducerToken* token; ConcurrentQueueProducerTypelessBase() : next(nullptr), inactive(false), token(nullptr) { } }; template struct _hash_32_or_64 { static inline std::uint32_t hash(std::uint32_t h) { // MurmurHash3 finalizer -- see https://code.google.com/p/smhasher/source/browse/trunk/MurmurHash3.cpp // Since the thread ID is already unique, all we really want to do is propagate that // uniqueness evenly across all the bits, so that we can use a subset of the bits while // reducing collisions significantly h ^= h >> 16; h *= 0x85ebca6b; h ^= h >> 13; h *= 0xc2b2ae35; return h ^ (h >> 16); } }; template<> struct _hash_32_or_64<1> { static inline std::uint64_t hash(std::uint64_t h) { h ^= h >> 33; h *= 0xff51afd7ed558ccd; h ^= h >> 33; h *= 0xc4ceb9fe1a85ec53; return h ^ (h >> 33); } }; template struct hash_32_or_64 : public _hash_32_or_64<(size > 4)> { }; static inline size_t hash_thread_id(thread_id_t id) { static_assert(sizeof(thread_id_t) <= 8, "Expected a platform where thread IDs are at most 64-bit values"); return static_cast(hash_32_or_64::thread_id_hash_t)>::hash( thread_id_converter::prehash(id))); } template static inline bool circular_less_than(T a, T b) { static_assert(std::is_integral::value && !std::numeric_limits::is_signed, "circular_less_than is intended to be used only with unsigned integer types"); return static_cast(a - b) > static_cast(static_cast(1) << (static_cast(sizeof(T) * CHAR_BIT - 1))); // Note: extra parens around rhs of operator<< is MSVC bug: https://developercommunity2.visualstudio.com/t/C4554-triggers-when-both-lhs-and-rhs-is/10034931 // silencing the bug requires #pragma warning(disable: 4554) around the calling code and has no effect when done here. } template static inline char* align_for(char* ptr) { const std::size_t alignment = std::alignment_of::value; return ptr + (alignment - (reinterpret_cast(ptr) % alignment)) % alignment; } template static inline T ceil_to_pow_2(T x) { static_assert(std::is_integral::value && !std::numeric_limits::is_signed, "ceil_to_pow_2 is intended to be used only with unsigned integer types"); // Adapted from http://graphics.stanford.edu/~seander/bithacks.html#RoundUpPowerOf2 --x; x |= x >> 1; x |= x >> 2; x |= x >> 4; for (std::size_t i = 1; i < sizeof(T); i <<= 1) { x |= x >> (i << 3); } ++x; return x; } template static inline void swap_relaxed(std::atomic& left, std::atomic& right) { T temp = left.load(std::memory_order_relaxed); left.store(right.load(std::memory_order_relaxed), std::memory_order_relaxed); right.store(temp, std::memory_order_relaxed); } template static inline T const& nomove(T const& x) { return x; } template struct nomove_if { template static inline T const& eval(T const& x) { return x; } }; template<> struct nomove_if { template static inline auto eval(U&& x) -> decltype(std::forward(x)) { return std::forward(x); } }; template static inline auto deref_noexcept(It& it) MOODYCAMEL_NOEXCEPT -> decltype(*it) { return *it; } #if defined(__clang__) || !defined(__GNUC__) || __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 8) template struct is_trivially_destructible : std::is_trivially_destructible { }; #else template struct is_trivially_destructible : std::has_trivial_destructor { }; #endif #ifdef MOODYCAMEL_CPP11_THREAD_LOCAL_SUPPORTED #ifdef MCDBGQ_USE_RELACY typedef RelacyThreadExitListener ThreadExitListener; typedef RelacyThreadExitNotifier ThreadExitNotifier; #else class ThreadExitNotifier; struct ThreadExitListener { typedef void (*callback_t)(void*); callback_t callback; void* userData; ThreadExitListener* next; // reserved for use by the ThreadExitNotifier ThreadExitNotifier* chain; // reserved for use by the ThreadExitNotifier }; class ThreadExitNotifier { public: static void subscribe(ThreadExitListener* listener) { auto& tlsInst = instance(); std::lock_guard guard(mutex()); listener->next = tlsInst.tail; listener->chain = &tlsInst; tlsInst.tail = listener; } static void unsubscribe(ThreadExitListener* listener) { std::lock_guard guard(mutex()); if (!listener->chain) { return; // race with ~ThreadExitNotifier } auto& tlsInst = *listener->chain; listener->chain = nullptr; ThreadExitListener** prev = &tlsInst.tail; for (auto ptr = tlsInst.tail; ptr != nullptr; ptr = ptr->next) { if (ptr == listener) { *prev = ptr->next; break; } prev = &ptr->next; } } private: ThreadExitNotifier() : tail(nullptr) { } ThreadExitNotifier(ThreadExitNotifier const&) MOODYCAMEL_DELETE_FUNCTION; ThreadExitNotifier& operator=(ThreadExitNotifier const&) MOODYCAMEL_DELETE_FUNCTION; ~ThreadExitNotifier() { // This thread is about to exit, let everyone know! assert(this == &instance() && "If this assert fails, you likely have a buggy compiler! Change the preprocessor conditions such that MOODYCAMEL_CPP11_THREAD_LOCAL_SUPPORTED is no longer defined."); std::lock_guard guard(mutex()); for (auto ptr = tail; ptr != nullptr; ptr = ptr->next) { ptr->chain = nullptr; ptr->callback(ptr->userData); } } // Thread-local static inline ThreadExitNotifier& instance() { static thread_local ThreadExitNotifier notifier; return notifier; } static inline std::mutex& mutex() { // Must be static because the ThreadExitNotifier could be destroyed while unsubscribe is called static std::mutex mutex; return mutex; } private: ThreadExitListener* tail; }; #endif #endif template struct static_is_lock_free_num { enum { value = 0 }; }; template<> struct static_is_lock_free_num { enum { value = ATOMIC_CHAR_LOCK_FREE }; }; template<> struct static_is_lock_free_num { enum { value = ATOMIC_SHORT_LOCK_FREE }; }; template<> struct static_is_lock_free_num { enum { value = ATOMIC_INT_LOCK_FREE }; }; template<> struct static_is_lock_free_num { enum { value = ATOMIC_LONG_LOCK_FREE }; }; template<> struct static_is_lock_free_num { enum { value = ATOMIC_LLONG_LOCK_FREE }; }; template struct static_is_lock_free : static_is_lock_free_num::type> { }; template<> struct static_is_lock_free { enum { value = ATOMIC_BOOL_LOCK_FREE }; }; template struct static_is_lock_free { enum { value = ATOMIC_POINTER_LOCK_FREE }; }; } struct ProducerToken { template explicit ProducerToken(ConcurrentQueue& queue); template explicit ProducerToken(BlockingConcurrentQueue& queue); ProducerToken(ProducerToken&& other) MOODYCAMEL_NOEXCEPT : producer(other.producer) { other.producer = nullptr; if (producer != nullptr) { producer->token = this; } } inline ProducerToken& operator=(ProducerToken&& other) MOODYCAMEL_NOEXCEPT { swap(other); return *this; } void swap(ProducerToken& other) MOODYCAMEL_NOEXCEPT { std::swap(producer, other.producer); if (producer != nullptr) { producer->token = this; } if (other.producer != nullptr) { other.producer->token = &other; } } // A token is always valid unless: // 1) Memory allocation failed during construction // 2) It was moved via the move constructor // (Note: assignment does a swap, leaving both potentially valid) // 3) The associated queue was destroyed // Note that if valid() returns true, that only indicates // that the token is valid for use with a specific queue, // but not which one; that's up to the user to track. inline bool valid() const { return producer != nullptr; } ~ProducerToken() { if (producer != nullptr) { producer->token = nullptr; producer->inactive.store(true, std::memory_order_release); } } // Disable copying and assignment ProducerToken(ProducerToken const&) MOODYCAMEL_DELETE_FUNCTION; ProducerToken& operator=(ProducerToken const&) MOODYCAMEL_DELETE_FUNCTION; private: template friend class ConcurrentQueue; friend class ConcurrentQueueTests; protected: details::ConcurrentQueueProducerTypelessBase* producer; }; struct ConsumerToken { template explicit ConsumerToken(ConcurrentQueue& q); template explicit ConsumerToken(BlockingConcurrentQueue& q); ConsumerToken(ConsumerToken&& other) MOODYCAMEL_NOEXCEPT : initialOffset(other.initialOffset), lastKnownGlobalOffset(other.lastKnownGlobalOffset), itemsConsumedFromCurrent(other.itemsConsumedFromCurrent), currentProducer(other.currentProducer), desiredProducer(other.desiredProducer) { } inline ConsumerToken& operator=(ConsumerToken&& other) MOODYCAMEL_NOEXCEPT { swap(other); return *this; } void swap(ConsumerToken& other) MOODYCAMEL_NOEXCEPT { std::swap(initialOffset, other.initialOffset); std::swap(lastKnownGlobalOffset, other.lastKnownGlobalOffset); std::swap(itemsConsumedFromCurrent, other.itemsConsumedFromCurrent); std::swap(currentProducer, other.currentProducer); std::swap(desiredProducer, other.desiredProducer); } // Disable copying and assignment ConsumerToken(ConsumerToken const&) MOODYCAMEL_DELETE_FUNCTION; ConsumerToken& operator=(ConsumerToken const&) MOODYCAMEL_DELETE_FUNCTION; private: template friend class ConcurrentQueue; friend class ConcurrentQueueTests; private: // but shared with ConcurrentQueue std::uint32_t initialOffset; std::uint32_t lastKnownGlobalOffset; std::uint32_t itemsConsumedFromCurrent; details::ConcurrentQueueProducerTypelessBase* currentProducer; details::ConcurrentQueueProducerTypelessBase* desiredProducer; }; // Need to forward-declare this swap because it's in a namespace. // See http://stackoverflow.com/questions/4492062/why-does-a-c-friend-class-need-a-forward-declaration-only-in-other-namespaces template inline void swap(typename ConcurrentQueue::ImplicitProducerKVP& a, typename ConcurrentQueue::ImplicitProducerKVP& b) MOODYCAMEL_NOEXCEPT; template class ConcurrentQueue { public: typedef ::moodycamel::ProducerToken producer_token_t; typedef ::moodycamel::ConsumerToken consumer_token_t; typedef typename Traits::index_t index_t; typedef typename Traits::size_t size_t; static const size_t BLOCK_SIZE = static_cast(Traits::BLOCK_SIZE); static const size_t EXPLICIT_BLOCK_EMPTY_COUNTER_THRESHOLD = static_cast(Traits::EXPLICIT_BLOCK_EMPTY_COUNTER_THRESHOLD); static const size_t EXPLICIT_INITIAL_INDEX_SIZE = static_cast(Traits::EXPLICIT_INITIAL_INDEX_SIZE); static const size_t IMPLICIT_INITIAL_INDEX_SIZE = static_cast(Traits::IMPLICIT_INITIAL_INDEX_SIZE); static const size_t INITIAL_IMPLICIT_PRODUCER_HASH_SIZE = static_cast(Traits::INITIAL_IMPLICIT_PRODUCER_HASH_SIZE); static const std::uint32_t EXPLICIT_CONSUMER_CONSUMPTION_QUOTA_BEFORE_ROTATE = static_cast(Traits::EXPLICIT_CONSUMER_CONSUMPTION_QUOTA_BEFORE_ROTATE); #ifdef _MSC_VER #pragma warning(push) #pragma warning(disable: 4307) // + integral constant overflow (that's what the ternary expression is for!) #pragma warning(disable: 4309) // static_cast: Truncation of constant value #endif static const size_t MAX_SUBQUEUE_SIZE = (details::const_numeric_max::value - static_cast(Traits::MAX_SUBQUEUE_SIZE) < BLOCK_SIZE) ? details::const_numeric_max::value : ((static_cast(Traits::MAX_SUBQUEUE_SIZE) + (BLOCK_SIZE - 1)) / BLOCK_SIZE * BLOCK_SIZE); #ifdef _MSC_VER #pragma warning(pop) #endif static_assert(!std::numeric_limits::is_signed && std::is_integral::value, "Traits::size_t must be an unsigned integral type"); static_assert(!std::numeric_limits::is_signed && std::is_integral::value, "Traits::index_t must be an unsigned integral type"); static_assert(sizeof(index_t) >= sizeof(size_t), "Traits::index_t must be at least as wide as Traits::size_t"); static_assert((BLOCK_SIZE > 1) && !(BLOCK_SIZE & (BLOCK_SIZE - 1)), "Traits::BLOCK_SIZE must be a power of 2 (and at least 2)"); static_assert((EXPLICIT_BLOCK_EMPTY_COUNTER_THRESHOLD > 1) && !(EXPLICIT_BLOCK_EMPTY_COUNTER_THRESHOLD & (EXPLICIT_BLOCK_EMPTY_COUNTER_THRESHOLD - 1)), "Traits::EXPLICIT_BLOCK_EMPTY_COUNTER_THRESHOLD must be a power of 2 (and greater than 1)"); static_assert((EXPLICIT_INITIAL_INDEX_SIZE > 1) && !(EXPLICIT_INITIAL_INDEX_SIZE & (EXPLICIT_INITIAL_INDEX_SIZE - 1)), "Traits::EXPLICIT_INITIAL_INDEX_SIZE must be a power of 2 (and greater than 1)"); static_assert((IMPLICIT_INITIAL_INDEX_SIZE > 1) && !(IMPLICIT_INITIAL_INDEX_SIZE & (IMPLICIT_INITIAL_INDEX_SIZE - 1)), "Traits::IMPLICIT_INITIAL_INDEX_SIZE must be a power of 2 (and greater than 1)"); static_assert((INITIAL_IMPLICIT_PRODUCER_HASH_SIZE == 0) || !(INITIAL_IMPLICIT_PRODUCER_HASH_SIZE & (INITIAL_IMPLICIT_PRODUCER_HASH_SIZE - 1)), "Traits::INITIAL_IMPLICIT_PRODUCER_HASH_SIZE must be a power of 2"); static_assert(INITIAL_IMPLICIT_PRODUCER_HASH_SIZE == 0 || INITIAL_IMPLICIT_PRODUCER_HASH_SIZE >= 1, "Traits::INITIAL_IMPLICIT_PRODUCER_HASH_SIZE must be at least 1 (or 0 to disable implicit enqueueing)"); public: // Creates a queue with at least `capacity` element slots; note that the // actual number of elements that can be inserted without additional memory // allocation depends on the number of producers and the block size (e.g. if // the block size is equal to `capacity`, only a single block will be allocated // up-front, which means only a single producer will be able to enqueue elements // without an extra allocation -- blocks aren't shared between producers). // This method is not thread safe -- it is up to the user to ensure that the // queue is fully constructed before it starts being used by other threads (this // includes making the memory effects of construction visible, possibly with a // memory barrier). explicit ConcurrentQueue(size_t capacity = 32 * BLOCK_SIZE) : producerListTail(nullptr), producerCount(0), initialBlockPoolIndex(0), nextExplicitConsumerId(0), globalExplicitConsumerOffset(0) { implicitProducerHashResizeInProgress.clear(std::memory_order_relaxed); populate_initial_implicit_producer_hash(); populate_initial_block_list(capacity / BLOCK_SIZE + ((capacity & (BLOCK_SIZE - 1)) == 0 ? 0 : 1)); #ifdef MOODYCAMEL_QUEUE_INTERNAL_DEBUG // Track all the producers using a fully-resolved typed list for // each kind; this makes it possible to debug them starting from // the root queue object (otherwise wacky casts are needed that // don't compile in the debugger's expression evaluator). explicitProducers.store(nullptr, std::memory_order_relaxed); implicitProducers.store(nullptr, std::memory_order_relaxed); #endif } // Computes the correct amount of pre-allocated blocks for you based // on the minimum number of elements you want available at any given // time, and the maximum concurrent number of each type of producer. ConcurrentQueue(size_t minCapacity, size_t maxExplicitProducers, size_t maxImplicitProducers) : producerListTail(nullptr), producerCount(0), initialBlockPoolIndex(0), nextExplicitConsumerId(0), globalExplicitConsumerOffset(0) { implicitProducerHashResizeInProgress.clear(std::memory_order_relaxed); populate_initial_implicit_producer_hash(); size_t blocks = (((minCapacity + BLOCK_SIZE - 1) / BLOCK_SIZE) - 1) * (maxExplicitProducers + 1) + 2 * (maxExplicitProducers + maxImplicitProducers); populate_initial_block_list(blocks); #ifdef MOODYCAMEL_QUEUE_INTERNAL_DEBUG explicitProducers.store(nullptr, std::memory_order_relaxed); implicitProducers.store(nullptr, std::memory_order_relaxed); #endif } // Note: The queue should not be accessed concurrently while it's // being deleted. It's up to the user to synchronize this. // This method is not thread safe. ~ConcurrentQueue() { // Destroy producers auto ptr = producerListTail.load(std::memory_order_relaxed); while (ptr != nullptr) { auto next = ptr->next_prod(); if (ptr->token != nullptr) { ptr->token->producer = nullptr; } destroy(ptr); ptr = next; } // Destroy implicit producer hash tables MOODYCAMEL_CONSTEXPR_IF (INITIAL_IMPLICIT_PRODUCER_HASH_SIZE != 0) { auto hash = implicitProducerHash.load(std::memory_order_relaxed); while (hash != nullptr) { auto prev = hash->prev; if (prev != nullptr) { // The last hash is part of this object and was not allocated dynamically for (size_t i = 0; i != hash->capacity; ++i) { hash->entries[i].~ImplicitProducerKVP(); } hash->~ImplicitProducerHash(); (Traits::free)(hash); } hash = prev; } } // Destroy global free list auto block = freeList.head_unsafe(); while (block != nullptr) { auto next = block->freeListNext.load(std::memory_order_relaxed); if (block->dynamicallyAllocated) { destroy(block); } block = next; } // Destroy initial free list destroy_array(initialBlockPool, initialBlockPoolSize); } // Disable copying and copy assignment ConcurrentQueue(ConcurrentQueue const&) MOODYCAMEL_DELETE_FUNCTION; ConcurrentQueue& operator=(ConcurrentQueue const&) MOODYCAMEL_DELETE_FUNCTION; // Moving is supported, but note that it is *not* a thread-safe operation. // Nobody can use the queue while it's being moved, and the memory effects // of that move must be propagated to other threads before they can use it. // Note: When a queue is moved, its tokens are still valid but can only be // used with the destination queue (i.e. semantically they are moved along // with the queue itself). ConcurrentQueue(ConcurrentQueue&& other) MOODYCAMEL_NOEXCEPT : producerListTail(other.producerListTail.load(std::memory_order_relaxed)), producerCount(other.producerCount.load(std::memory_order_relaxed)), initialBlockPoolIndex(other.initialBlockPoolIndex.load(std::memory_order_relaxed)), initialBlockPool(other.initialBlockPool), initialBlockPoolSize(other.initialBlockPoolSize), freeList(std::move(other.freeList)), nextExplicitConsumerId(other.nextExplicitConsumerId.load(std::memory_order_relaxed)), globalExplicitConsumerOffset(other.globalExplicitConsumerOffset.load(std::memory_order_relaxed)) { // Move the other one into this, and leave the other one as an empty queue implicitProducerHashResizeInProgress.clear(std::memory_order_relaxed); populate_initial_implicit_producer_hash(); swap_implicit_producer_hashes(other); other.producerListTail.store(nullptr, std::memory_order_relaxed); other.producerCount.store(0, std::memory_order_relaxed); other.nextExplicitConsumerId.store(0, std::memory_order_relaxed); other.globalExplicitConsumerOffset.store(0, std::memory_order_relaxed); #ifdef MOODYCAMEL_QUEUE_INTERNAL_DEBUG explicitProducers.store(other.explicitProducers.load(std::memory_order_relaxed), std::memory_order_relaxed); other.explicitProducers.store(nullptr, std::memory_order_relaxed); implicitProducers.store(other.implicitProducers.load(std::memory_order_relaxed), std::memory_order_relaxed); other.implicitProducers.store(nullptr, std::memory_order_relaxed); #endif other.initialBlockPoolIndex.store(0, std::memory_order_relaxed); other.initialBlockPoolSize = 0; other.initialBlockPool = nullptr; reown_producers(); } inline ConcurrentQueue& operator=(ConcurrentQueue&& other) MOODYCAMEL_NOEXCEPT { return swap_internal(other); } // Swaps this queue's state with the other's. Not thread-safe. // Swapping two queues does not invalidate their tokens, however // the tokens that were created for one queue must be used with // only the swapped queue (i.e. the tokens are tied to the // queue's movable state, not the object itself). inline void swap(ConcurrentQueue& other) MOODYCAMEL_NOEXCEPT { swap_internal(other); } private: ConcurrentQueue& swap_internal(ConcurrentQueue& other) { if (this == &other) { return *this; } details::swap_relaxed(producerListTail, other.producerListTail); details::swap_relaxed(producerCount, other.producerCount); details::swap_relaxed(initialBlockPoolIndex, other.initialBlockPoolIndex); std::swap(initialBlockPool, other.initialBlockPool); std::swap(initialBlockPoolSize, other.initialBlockPoolSize); freeList.swap(other.freeList); details::swap_relaxed(nextExplicitConsumerId, other.nextExplicitConsumerId); details::swap_relaxed(globalExplicitConsumerOffset, other.globalExplicitConsumerOffset); swap_implicit_producer_hashes(other); reown_producers(); other.reown_producers(); #ifdef MOODYCAMEL_QUEUE_INTERNAL_DEBUG details::swap_relaxed(explicitProducers, other.explicitProducers); details::swap_relaxed(implicitProducers, other.implicitProducers); #endif return *this; } public: // Enqueues a single item (by copying it). // Allocates memory if required. Only fails if memory allocation fails (or implicit // production is disabled because Traits::INITIAL_IMPLICIT_PRODUCER_HASH_SIZE is 0, // or Traits::MAX_SUBQUEUE_SIZE has been defined and would be surpassed). // Thread-safe. inline bool enqueue(T const& item) { MOODYCAMEL_CONSTEXPR_IF (INITIAL_IMPLICIT_PRODUCER_HASH_SIZE == 0) return false; else return inner_enqueue(item); } // Enqueues a single item (by moving it, if possible). // Allocates memory if required. Only fails if memory allocation fails (or implicit // production is disabled because Traits::INITIAL_IMPLICIT_PRODUCER_HASH_SIZE is 0, // or Traits::MAX_SUBQUEUE_SIZE has been defined and would be surpassed). // Thread-safe. inline bool enqueue(T&& item) { MOODYCAMEL_CONSTEXPR_IF (INITIAL_IMPLICIT_PRODUCER_HASH_SIZE == 0) return false; else return inner_enqueue(std::move(item)); } // Enqueues a single item (by copying it) using an explicit producer token. // Allocates memory if required. Only fails if memory allocation fails (or // Traits::MAX_SUBQUEUE_SIZE has been defined and would be surpassed). // Thread-safe. inline bool enqueue(producer_token_t const& token, T const& item) { return inner_enqueue(token, item); } // Enqueues a single item (by moving it, if possible) using an explicit producer token. // Allocates memory if required. Only fails if memory allocation fails (or // Traits::MAX_SUBQUEUE_SIZE has been defined and would be surpassed). // Thread-safe. inline bool enqueue(producer_token_t const& token, T&& item) { return inner_enqueue(token, std::move(item)); } // Enqueues several items. // Allocates memory if required. Only fails if memory allocation fails (or // implicit production is disabled because Traits::INITIAL_IMPLICIT_PRODUCER_HASH_SIZE // is 0, or Traits::MAX_SUBQUEUE_SIZE has been defined and would be surpassed). // Note: Use std::make_move_iterator if the elements should be moved instead of copied. // Thread-safe. template bool enqueue_bulk(It itemFirst, size_t count) { MOODYCAMEL_CONSTEXPR_IF (INITIAL_IMPLICIT_PRODUCER_HASH_SIZE == 0) return false; else return inner_enqueue_bulk(itemFirst, count); } // Enqueues several items using an explicit producer token. // Allocates memory if required. Only fails if memory allocation fails // (or Traits::MAX_SUBQUEUE_SIZE has been defined and would be surpassed). // Note: Use std::make_move_iterator if the elements should be moved // instead of copied. // Thread-safe. template bool enqueue_bulk(producer_token_t const& token, It itemFirst, size_t count) { return inner_enqueue_bulk(token, itemFirst, count); } // Enqueues a single item (by copying it). // Does not allocate memory. Fails if not enough room to enqueue (or implicit // production is disabled because Traits::INITIAL_IMPLICIT_PRODUCER_HASH_SIZE // is 0). // Thread-safe. inline bool try_enqueue(T const& item) { MOODYCAMEL_CONSTEXPR_IF (INITIAL_IMPLICIT_PRODUCER_HASH_SIZE == 0) return false; else return inner_enqueue(item); } // Enqueues a single item (by moving it, if possible). // Does not allocate memory (except for one-time implicit producer). // Fails if not enough room to enqueue (or implicit production is // disabled because Traits::INITIAL_IMPLICIT_PRODUCER_HASH_SIZE is 0). // Thread-safe. inline bool try_enqueue(T&& item) { MOODYCAMEL_CONSTEXPR_IF (INITIAL_IMPLICIT_PRODUCER_HASH_SIZE == 0) return false; else return inner_enqueue(std::move(item)); } // Enqueues a single item (by copying it) using an explicit producer token. // Does not allocate memory. Fails if not enough room to enqueue. // Thread-safe. inline bool try_enqueue(producer_token_t const& token, T const& item) { return inner_enqueue(token, item); } // Enqueues a single item (by moving it, if possible) using an explicit producer token. // Does not allocate memory. Fails if not enough room to enqueue. // Thread-safe. inline bool try_enqueue(producer_token_t const& token, T&& item) { return inner_enqueue(token, std::move(item)); } // Enqueues several items. // Does not allocate memory (except for one-time implicit producer). // Fails if not enough room to enqueue (or implicit production is // disabled because Traits::INITIAL_IMPLICIT_PRODUCER_HASH_SIZE is 0). // Note: Use std::make_move_iterator if the elements should be moved // instead of copied. // Thread-safe. template bool try_enqueue_bulk(It itemFirst, size_t count) { MOODYCAMEL_CONSTEXPR_IF (INITIAL_IMPLICIT_PRODUCER_HASH_SIZE == 0) return false; else return inner_enqueue_bulk(itemFirst, count); } // Enqueues several items using an explicit producer token. // Does not allocate memory. Fails if not enough room to enqueue. // Note: Use std::make_move_iterator if the elements should be moved // instead of copied. // Thread-safe. template bool try_enqueue_bulk(producer_token_t const& token, It itemFirst, size_t count) { return inner_enqueue_bulk(token, itemFirst, count); } // Attempts to dequeue from the queue. // Returns false if all producer streams appeared empty at the time they // were checked (so, the queue is likely but not guaranteed to be empty). // Never allocates. Thread-safe. template bool try_dequeue(U& item) { // Instead of simply trying each producer in turn (which could cause needless contention on the first // producer), we score them heuristically. size_t nonEmptyCount = 0; ProducerBase* best = nullptr; size_t bestSize = 0; for (auto ptr = producerListTail.load(std::memory_order_acquire); nonEmptyCount < 3 && ptr != nullptr; ptr = ptr->next_prod()) { auto size = ptr->size_approx(); if (size > 0) { if (size > bestSize) { bestSize = size; best = ptr; } ++nonEmptyCount; } } // If there was at least one non-empty queue but it appears empty at the time // we try to dequeue from it, we need to make sure every queue's been tried if (nonEmptyCount > 0) { if ((details::likely)(best->dequeue(item))) { return true; } for (auto ptr = producerListTail.load(std::memory_order_acquire); ptr != nullptr; ptr = ptr->next_prod()) { if (ptr != best && ptr->dequeue(item)) { return true; } } } return false; } // Attempts to dequeue from the queue. // Returns false if all producer streams appeared empty at the time they // were checked (so, the queue is likely but not guaranteed to be empty). // This differs from the try_dequeue(item) method in that this one does // not attempt to reduce contention by interleaving the order that producer // streams are dequeued from. So, using this method can reduce overall throughput // under contention, but will give more predictable results in single-threaded // consumer scenarios. This is mostly only useful for internal unit tests. // Never allocates. Thread-safe. template bool try_dequeue_non_interleaved(U& item) { for (auto ptr = producerListTail.load(std::memory_order_acquire); ptr != nullptr; ptr = ptr->next_prod()) { if (ptr->dequeue(item)) { return true; } } return false; } // Attempts to dequeue from the queue using an explicit consumer token. // Returns false if all producer streams appeared empty at the time they // were checked (so, the queue is likely but not guaranteed to be empty). // Never allocates. Thread-safe. template bool try_dequeue(consumer_token_t& token, U& item) { // The idea is roughly as follows: // Every 256 items from one producer, make everyone rotate (increase the global offset) -> this means the highest efficiency consumer dictates the rotation speed of everyone else, more or less // If you see that the global offset has changed, you must reset your consumption counter and move to your designated place // If there's no items where you're supposed to be, keep moving until you find a producer with some items // If the global offset has not changed but you've run out of items to consume, move over from your current position until you find an producer with something in it if (token.desiredProducer == nullptr || token.lastKnownGlobalOffset != globalExplicitConsumerOffset.load(std::memory_order_relaxed)) { if (!update_current_producer_after_rotation(token)) { return false; } } // If there was at least one non-empty queue but it appears empty at the time // we try to dequeue from it, we need to make sure every queue's been tried if (static_cast(token.currentProducer)->dequeue(item)) { if (++token.itemsConsumedFromCurrent == EXPLICIT_CONSUMER_CONSUMPTION_QUOTA_BEFORE_ROTATE) { globalExplicitConsumerOffset.fetch_add(1, std::memory_order_relaxed); } return true; } auto tail = producerListTail.load(std::memory_order_acquire); auto ptr = static_cast(token.currentProducer)->next_prod(); if (ptr == nullptr) { ptr = tail; } while (ptr != static_cast(token.currentProducer)) { if (ptr->dequeue(item)) { token.currentProducer = ptr; token.itemsConsumedFromCurrent = 1; return true; } ptr = ptr->next_prod(); if (ptr == nullptr) { ptr = tail; } } return false; } // Attempts to dequeue several elements from the queue. // Returns the number of items actually dequeued. // Returns 0 if all producer streams appeared empty at the time they // were checked (so, the queue is likely but not guaranteed to be empty). // Never allocates. Thread-safe. template size_t try_dequeue_bulk(It itemFirst, size_t max) { size_t count = 0; for (auto ptr = producerListTail.load(std::memory_order_acquire); ptr != nullptr; ptr = ptr->next_prod()) { count += ptr->dequeue_bulk(itemFirst, max - count); if (count == max) { break; } } return count; } // Attempts to dequeue several elements from the queue using an explicit consumer token. // Returns the number of items actually dequeued. // Returns 0 if all producer streams appeared empty at the time they // were checked (so, the queue is likely but not guaranteed to be empty). // Never allocates. Thread-safe. template size_t try_dequeue_bulk(consumer_token_t& token, It itemFirst, size_t max) { if (token.desiredProducer == nullptr || token.lastKnownGlobalOffset != globalExplicitConsumerOffset.load(std::memory_order_relaxed)) { if (!update_current_producer_after_rotation(token)) { return 0; } } size_t count = static_cast(token.currentProducer)->dequeue_bulk(itemFirst, max); if (count == max) { if ((token.itemsConsumedFromCurrent += static_cast(max)) >= EXPLICIT_CONSUMER_CONSUMPTION_QUOTA_BEFORE_ROTATE) { globalExplicitConsumerOffset.fetch_add(1, std::memory_order_relaxed); } return max; } token.itemsConsumedFromCurrent += static_cast(count); max -= count; auto tail = producerListTail.load(std::memory_order_acquire); auto ptr = static_cast(token.currentProducer)->next_prod(); if (ptr == nullptr) { ptr = tail; } while (ptr != static_cast(token.currentProducer)) { auto dequeued = ptr->dequeue_bulk(itemFirst, max); count += dequeued; if (dequeued != 0) { token.currentProducer = ptr; token.itemsConsumedFromCurrent = static_cast(dequeued); } if (dequeued == max) { break; } max -= dequeued; ptr = ptr->next_prod(); if (ptr == nullptr) { ptr = tail; } } return count; } // Attempts to dequeue from a specific producer's inner queue. // If you happen to know which producer you want to dequeue from, this // is significantly faster than using the general-case try_dequeue methods. // Returns false if the producer's queue appeared empty at the time it // was checked (so, the queue is likely but not guaranteed to be empty). // Never allocates. Thread-safe. template inline bool try_dequeue_from_producer(producer_token_t const& producer, U& item) { return static_cast(producer.producer)->dequeue(item); } // Attempts to dequeue several elements from a specific producer's inner queue. // Returns the number of items actually dequeued. // If you happen to know which producer you want to dequeue from, this // is significantly faster than using the general-case try_dequeue methods. // Returns 0 if the producer's queue appeared empty at the time it // was checked (so, the queue is likely but not guaranteed to be empty). // Never allocates. Thread-safe. template inline size_t try_dequeue_bulk_from_producer(producer_token_t const& producer, It itemFirst, size_t max) { return static_cast(producer.producer)->dequeue_bulk(itemFirst, max); } // Returns an estimate of the total number of elements currently in the queue. This // estimate is only accurate if the queue has completely stabilized before it is called // (i.e. all enqueue and dequeue operations have completed and their memory effects are // visible on the calling thread, and no further operations start while this method is // being called). // Thread-safe. size_t size_approx() const { size_t size = 0; for (auto ptr = producerListTail.load(std::memory_order_acquire); ptr != nullptr; ptr = ptr->next_prod()) { size += ptr->size_approx(); } return size; } // Returns true if the underlying atomic variables used by // the queue are lock-free (they should be on most platforms). // Thread-safe. static constexpr bool is_lock_free() { return details::static_is_lock_free::value == 2 && details::static_is_lock_free::value == 2 && details::static_is_lock_free::value == 2 && details::static_is_lock_free::value == 2 && details::static_is_lock_free::value == 2 && details::static_is_lock_free::thread_id_numeric_size_t>::value == 2; } private: friend struct ProducerToken; friend struct ConsumerToken; struct ExplicitProducer; friend struct ExplicitProducer; struct ImplicitProducer; friend struct ImplicitProducer; friend class ConcurrentQueueTests; enum AllocationMode { CanAlloc, CannotAlloc }; /////////////////////////////// // Queue methods /////////////////////////////// template inline bool inner_enqueue(producer_token_t const& token, U&& element) { return static_cast(token.producer)->ConcurrentQueue::ExplicitProducer::template enqueue(std::forward(element)); } template inline bool inner_enqueue(U&& element) { auto producer = get_or_add_implicit_producer(); return producer == nullptr ? false : producer->ConcurrentQueue::ImplicitProducer::template enqueue(std::forward(element)); } template inline bool inner_enqueue_bulk(producer_token_t const& token, It itemFirst, size_t count) { return static_cast(token.producer)->ConcurrentQueue::ExplicitProducer::template enqueue_bulk(itemFirst, count); } template inline bool inner_enqueue_bulk(It itemFirst, size_t count) { auto producer = get_or_add_implicit_producer(); return producer == nullptr ? false : producer->ConcurrentQueue::ImplicitProducer::template enqueue_bulk(itemFirst, count); } inline bool update_current_producer_after_rotation(consumer_token_t& token) { // Ah, there's been a rotation, figure out where we should be! auto tail = producerListTail.load(std::memory_order_acquire); if (token.desiredProducer == nullptr && tail == nullptr) { return false; } auto prodCount = producerCount.load(std::memory_order_relaxed); auto globalOffset = globalExplicitConsumerOffset.load(std::memory_order_relaxed); if ((details::unlikely)(token.desiredProducer == nullptr)) { // Aha, first time we're dequeueing anything. // Figure out our local position // Note: offset is from start, not end, but we're traversing from end -- subtract from count first std::uint32_t offset = prodCount - 1 - (token.initialOffset % prodCount); token.desiredProducer = tail; for (std::uint32_t i = 0; i != offset; ++i) { token.desiredProducer = static_cast(token.desiredProducer)->next_prod(); if (token.desiredProducer == nullptr) { token.desiredProducer = tail; } } } std::uint32_t delta = globalOffset - token.lastKnownGlobalOffset; if (delta >= prodCount) { delta = delta % prodCount; } for (std::uint32_t i = 0; i != delta; ++i) { token.desiredProducer = static_cast(token.desiredProducer)->next_prod(); if (token.desiredProducer == nullptr) { token.desiredProducer = tail; } } token.lastKnownGlobalOffset = globalOffset; token.currentProducer = token.desiredProducer; token.itemsConsumedFromCurrent = 0; return true; } /////////////////////////// // Free list /////////////////////////// template struct FreeListNode { FreeListNode() : freeListRefs(0), freeListNext(nullptr) { } std::atomic freeListRefs; std::atomic freeListNext; }; // A simple CAS-based lock-free free list. Not the fastest thing in the world under heavy contention, but // simple and correct (assuming nodes are never freed until after the free list is destroyed), and fairly // speedy under low contention. template // N must inherit FreeListNode or have the same fields (and initialization of them) struct FreeList { FreeList() : freeListHead(nullptr) { } FreeList(FreeList&& other) : freeListHead(other.freeListHead.load(std::memory_order_relaxed)) { other.freeListHead.store(nullptr, std::memory_order_relaxed); } void swap(FreeList& other) { details::swap_relaxed(freeListHead, other.freeListHead); } FreeList(FreeList const&) MOODYCAMEL_DELETE_FUNCTION; FreeList& operator=(FreeList const&) MOODYCAMEL_DELETE_FUNCTION; inline void add(N* node) { #ifdef MCDBGQ_NOLOCKFREE_FREELIST debug::DebugLock lock(mutex); #endif // We know that the should-be-on-freelist bit is 0 at this point, so it's safe to // set it using a fetch_add if (node->freeListRefs.fetch_add(SHOULD_BE_ON_FREELIST, std::memory_order_acq_rel) == 0) { // Oh look! We were the last ones referencing this node, and we know // we want to add it to the free list, so let's do it! add_knowing_refcount_is_zero(node); } } inline N* try_get() { #ifdef MCDBGQ_NOLOCKFREE_FREELIST debug::DebugLock lock(mutex); #endif auto head = freeListHead.load(std::memory_order_acquire); while (head != nullptr) { auto prevHead = head; auto refs = head->freeListRefs.load(std::memory_order_relaxed); if ((refs & REFS_MASK) == 0 || !head->freeListRefs.compare_exchange_strong(refs, refs + 1, std::memory_order_acquire)) { head = freeListHead.load(std::memory_order_acquire); continue; } // Good, reference count has been incremented (it wasn't at zero), which means we can read the // next and not worry about it changing between now and the time we do the CAS auto next = head->freeListNext.load(std::memory_order_relaxed); if (freeListHead.compare_exchange_strong(head, next, std::memory_order_acquire, std::memory_order_relaxed)) { // Yay, got the node. This means it was on the list, which means shouldBeOnFreeList must be false no // matter the refcount (because nobody else knows it's been taken off yet, it can't have been put back on). assert((head->freeListRefs.load(std::memory_order_relaxed) & SHOULD_BE_ON_FREELIST) == 0); // Decrease refcount twice, once for our ref, and once for the list's ref head->freeListRefs.fetch_sub(2, std::memory_order_release); return head; } // OK, the head must have changed on us, but we still need to decrease the refcount we increased. // Note that we don't need to release any memory effects, but we do need to ensure that the reference // count decrement happens-after the CAS on the head. refs = prevHead->freeListRefs.fetch_sub(1, std::memory_order_acq_rel); if (refs == SHOULD_BE_ON_FREELIST + 1) { add_knowing_refcount_is_zero(prevHead); } } return nullptr; } // Useful for traversing the list when there's no contention (e.g. to destroy remaining nodes) N* head_unsafe() const { return freeListHead.load(std::memory_order_relaxed); } private: inline void add_knowing_refcount_is_zero(N* node) { // Since the refcount is zero, and nobody can increase it once it's zero (except us, and we run // only one copy of this method per node at a time, i.e. the single thread case), then we know // we can safely change the next pointer of the node; however, once the refcount is back above // zero, then other threads could increase it (happens under heavy contention, when the refcount // goes to zero in between a load and a refcount increment of a node in try_get, then back up to // something non-zero, then the refcount increment is done by the other thread) -- so, if the CAS // to add the node to the actual list fails, decrease the refcount and leave the add operation to // the next thread who puts the refcount back at zero (which could be us, hence the loop). auto head = freeListHead.load(std::memory_order_relaxed); while (true) { node->freeListNext.store(head, std::memory_order_relaxed); node->freeListRefs.store(1, std::memory_order_release); if (!freeListHead.compare_exchange_strong(head, node, std::memory_order_release, std::memory_order_relaxed)) { // Hmm, the add failed, but we can only try again when the refcount goes back to zero if (node->freeListRefs.fetch_add(SHOULD_BE_ON_FREELIST - 1, std::memory_order_acq_rel) == 1) { continue; } } return; } } private: // Implemented like a stack, but where node order doesn't matter (nodes are inserted out of order under contention) std::atomic freeListHead; static const std::uint32_t REFS_MASK = 0x7FFFFFFF; static const std::uint32_t SHOULD_BE_ON_FREELIST = 0x80000000; #ifdef MCDBGQ_NOLOCKFREE_FREELIST debug::DebugMutex mutex; #endif }; /////////////////////////// // Block /////////////////////////// enum InnerQueueContext { implicit_context = 0, explicit_context = 1 }; struct Block { Block() : next(nullptr), elementsCompletelyDequeued(0), freeListRefs(0), freeListNext(nullptr), dynamicallyAllocated(true) { #ifdef MCDBGQ_TRACKMEM owner = nullptr; #endif } template inline bool is_empty() const { MOODYCAMEL_CONSTEXPR_IF (context == explicit_context && BLOCK_SIZE <= EXPLICIT_BLOCK_EMPTY_COUNTER_THRESHOLD) { // Check flags for (size_t i = 0; i < BLOCK_SIZE; ++i) { if (!emptyFlags[i].load(std::memory_order_relaxed)) { return false; } } // Aha, empty; make sure we have all other memory effects that happened before the empty flags were set std::atomic_thread_fence(std::memory_order_acquire); return true; } else { // Check counter if (elementsCompletelyDequeued.load(std::memory_order_relaxed) == BLOCK_SIZE) { std::atomic_thread_fence(std::memory_order_acquire); return true; } assert(elementsCompletelyDequeued.load(std::memory_order_relaxed) <= BLOCK_SIZE); return false; } } // Returns true if the block is now empty (does not apply in explicit context) template inline bool set_empty(MOODYCAMEL_MAYBE_UNUSED index_t i) { MOODYCAMEL_CONSTEXPR_IF (context == explicit_context && BLOCK_SIZE <= EXPLICIT_BLOCK_EMPTY_COUNTER_THRESHOLD) { // Set flag assert(!emptyFlags[BLOCK_SIZE - 1 - static_cast(i & static_cast(BLOCK_SIZE - 1))].load(std::memory_order_relaxed)); emptyFlags[BLOCK_SIZE - 1 - static_cast(i & static_cast(BLOCK_SIZE - 1))].store(true, std::memory_order_release); return false; } else { // Increment counter auto prevVal = elementsCompletelyDequeued.fetch_add(1, std::memory_order_acq_rel); assert(prevVal < BLOCK_SIZE); return prevVal == BLOCK_SIZE - 1; } } // Sets multiple contiguous item statuses to 'empty' (assumes no wrapping and count > 0). // Returns true if the block is now empty (does not apply in explicit context). template inline bool set_many_empty(MOODYCAMEL_MAYBE_UNUSED index_t i, size_t count) { MOODYCAMEL_CONSTEXPR_IF (context == explicit_context && BLOCK_SIZE <= EXPLICIT_BLOCK_EMPTY_COUNTER_THRESHOLD) { // Set flags std::atomic_thread_fence(std::memory_order_release); i = BLOCK_SIZE - 1 - static_cast(i & static_cast(BLOCK_SIZE - 1)) - count + 1; for (size_t j = 0; j != count; ++j) { assert(!emptyFlags[i + j].load(std::memory_order_relaxed)); emptyFlags[i + j].store(true, std::memory_order_relaxed); } return false; } else { // Increment counter auto prevVal = elementsCompletelyDequeued.fetch_add(count, std::memory_order_acq_rel); assert(prevVal + count <= BLOCK_SIZE); return prevVal + count == BLOCK_SIZE; } } template inline void set_all_empty() { MOODYCAMEL_CONSTEXPR_IF (context == explicit_context && BLOCK_SIZE <= EXPLICIT_BLOCK_EMPTY_COUNTER_THRESHOLD) { // Set all flags for (size_t i = 0; i != BLOCK_SIZE; ++i) { emptyFlags[i].store(true, std::memory_order_relaxed); } } else { // Reset counter elementsCompletelyDequeued.store(BLOCK_SIZE, std::memory_order_relaxed); } } template inline void reset_empty() { MOODYCAMEL_CONSTEXPR_IF (context == explicit_context && BLOCK_SIZE <= EXPLICIT_BLOCK_EMPTY_COUNTER_THRESHOLD) { // Reset flags for (size_t i = 0; i != BLOCK_SIZE; ++i) { emptyFlags[i].store(false, std::memory_order_relaxed); } } else { // Reset counter elementsCompletelyDequeued.store(0, std::memory_order_relaxed); } } inline T* operator[](index_t idx) MOODYCAMEL_NOEXCEPT { return static_cast(static_cast(elements)) + static_cast(idx & static_cast(BLOCK_SIZE - 1)); } inline T const* operator[](index_t idx) const MOODYCAMEL_NOEXCEPT { return static_cast(static_cast(elements)) + static_cast(idx & static_cast(BLOCK_SIZE - 1)); } private: static_assert(std::alignment_of::value <= sizeof(T), "The queue does not support types with an alignment greater than their size at this time"); MOODYCAMEL_ALIGNED_TYPE_LIKE(char[sizeof(T) * BLOCK_SIZE], T) elements; public: Block* next; std::atomic elementsCompletelyDequeued; std::atomic emptyFlags[BLOCK_SIZE <= EXPLICIT_BLOCK_EMPTY_COUNTER_THRESHOLD ? BLOCK_SIZE : 1]; public: std::atomic freeListRefs; std::atomic freeListNext; bool dynamicallyAllocated; // Perhaps a better name for this would be 'isNotPartOfInitialBlockPool' #ifdef MCDBGQ_TRACKMEM void* owner; #endif }; static_assert(std::alignment_of::value >= std::alignment_of::value, "Internal error: Blocks must be at least as aligned as the type they are wrapping"); #ifdef MCDBGQ_TRACKMEM public: struct MemStats; private: #endif /////////////////////////// // Producer base /////////////////////////// struct ProducerBase : public details::ConcurrentQueueProducerTypelessBase { ProducerBase(ConcurrentQueue* parent_, bool isExplicit_) : tailIndex(0), headIndex(0), dequeueOptimisticCount(0), dequeueOvercommit(0), tailBlock(nullptr), isExplicit(isExplicit_), parent(parent_) { } virtual ~ProducerBase() { } template inline bool dequeue(U& element) { if (isExplicit) { return static_cast(this)->dequeue(element); } else { return static_cast(this)->dequeue(element); } } template inline size_t dequeue_bulk(It& itemFirst, size_t max) { if (isExplicit) { return static_cast(this)->dequeue_bulk(itemFirst, max); } else { return static_cast(this)->dequeue_bulk(itemFirst, max); } } inline ProducerBase* next_prod() const { return static_cast(next); } inline size_t size_approx() const { auto tail = tailIndex.load(std::memory_order_relaxed); auto head = headIndex.load(std::memory_order_relaxed); return details::circular_less_than(head, tail) ? static_cast(tail - head) : 0; } inline index_t getTail() const { return tailIndex.load(std::memory_order_relaxed); } protected: std::atomic tailIndex; // Where to enqueue to next std::atomic headIndex; // Where to dequeue from next std::atomic dequeueOptimisticCount; std::atomic dequeueOvercommit; Block* tailBlock; public: bool isExplicit; ConcurrentQueue* parent; protected: #ifdef MCDBGQ_TRACKMEM friend struct MemStats; #endif }; /////////////////////////// // Explicit queue /////////////////////////// struct ExplicitProducer : public ProducerBase { explicit ExplicitProducer(ConcurrentQueue* parent_) : ProducerBase(parent_, true), blockIndex(nullptr), pr_blockIndexSlotsUsed(0), pr_blockIndexSize(EXPLICIT_INITIAL_INDEX_SIZE >> 1), pr_blockIndexFront(0), pr_blockIndexEntries(nullptr), pr_blockIndexRaw(nullptr) { size_t poolBasedIndexSize = details::ceil_to_pow_2(parent_->initialBlockPoolSize) >> 1; if (poolBasedIndexSize > pr_blockIndexSize) { pr_blockIndexSize = poolBasedIndexSize; } new_block_index(0); // This creates an index with double the number of current entries, i.e. EXPLICIT_INITIAL_INDEX_SIZE } ~ExplicitProducer() { // Destruct any elements not yet dequeued. // Since we're in the destructor, we can assume all elements // are either completely dequeued or completely not (no halfways). if (this->tailBlock != nullptr) { // Note this means there must be a block index too // First find the block that's partially dequeued, if any Block* halfDequeuedBlock = nullptr; if ((this->headIndex.load(std::memory_order_relaxed) & static_cast(BLOCK_SIZE - 1)) != 0) { // The head's not on a block boundary, meaning a block somewhere is partially dequeued // (or the head block is the tail block and was fully dequeued, but the head/tail are still not on a boundary) size_t i = (pr_blockIndexFront - pr_blockIndexSlotsUsed) & (pr_blockIndexSize - 1); while (details::circular_less_than(pr_blockIndexEntries[i].base + BLOCK_SIZE, this->headIndex.load(std::memory_order_relaxed))) { i = (i + 1) & (pr_blockIndexSize - 1); } assert(details::circular_less_than(pr_blockIndexEntries[i].base, this->headIndex.load(std::memory_order_relaxed))); halfDequeuedBlock = pr_blockIndexEntries[i].block; } // Start at the head block (note the first line in the loop gives us the head from the tail on the first iteration) auto block = this->tailBlock; do { block = block->next; if (block->ConcurrentQueue::Block::template is_empty()) { continue; } size_t i = 0; // Offset into block if (block == halfDequeuedBlock) { i = static_cast(this->headIndex.load(std::memory_order_relaxed) & static_cast(BLOCK_SIZE - 1)); } // Walk through all the items in the block; if this is the tail block, we need to stop when we reach the tail index auto lastValidIndex = (this->tailIndex.load(std::memory_order_relaxed) & static_cast(BLOCK_SIZE - 1)) == 0 ? BLOCK_SIZE : static_cast(this->tailIndex.load(std::memory_order_relaxed) & static_cast(BLOCK_SIZE - 1)); while (i != BLOCK_SIZE && (block != this->tailBlock || i != lastValidIndex)) { (*block)[i++]->~T(); } } while (block != this->tailBlock); } // Destroy all blocks that we own if (this->tailBlock != nullptr) { auto block = this->tailBlock; do { auto nextBlock = block->next; this->parent->add_block_to_free_list(block); block = nextBlock; } while (block != this->tailBlock); } // Destroy the block indices auto header = static_cast(pr_blockIndexRaw); while (header != nullptr) { auto prev = static_cast(header->prev); header->~BlockIndexHeader(); (Traits::free)(header); header = prev; } } template inline bool enqueue(U&& element) { index_t currentTailIndex = this->tailIndex.load(std::memory_order_relaxed); index_t newTailIndex = 1 + currentTailIndex; if ((currentTailIndex & static_cast(BLOCK_SIZE - 1)) == 0) { // We reached the end of a block, start a new one auto startBlock = this->tailBlock; auto originalBlockIndexSlotsUsed = pr_blockIndexSlotsUsed; if (this->tailBlock != nullptr && this->tailBlock->next->ConcurrentQueue::Block::template is_empty()) { // We can re-use the block ahead of us, it's empty! this->tailBlock = this->tailBlock->next; this->tailBlock->ConcurrentQueue::Block::template reset_empty(); // We'll put the block on the block index (guaranteed to be room since we're conceptually removing the // last block from it first -- except instead of removing then adding, we can just overwrite). // Note that there must be a valid block index here, since even if allocation failed in the ctor, // it would have been re-attempted when adding the first block to the queue; since there is such // a block, a block index must have been successfully allocated. } else { // Whatever head value we see here is >= the last value we saw here (relatively), // and <= its current value. Since we have the most recent tail, the head must be // <= to it. auto head = this->headIndex.load(std::memory_order_relaxed); assert(!details::circular_less_than(currentTailIndex, head)); if (!details::circular_less_than(head, currentTailIndex + BLOCK_SIZE) || (MAX_SUBQUEUE_SIZE != details::const_numeric_max::value && (MAX_SUBQUEUE_SIZE == 0 || MAX_SUBQUEUE_SIZE - BLOCK_SIZE < currentTailIndex - head))) { // We can't enqueue in another block because there's not enough leeway -- the // tail could surpass the head by the time the block fills up! (Or we'll exceed // the size limit, if the second part of the condition was true.) return false; } // We're going to need a new block; check that the block index has room if (pr_blockIndexRaw == nullptr || pr_blockIndexSlotsUsed == pr_blockIndexSize) { // Hmm, the circular block index is already full -- we'll need // to allocate a new index. Note pr_blockIndexRaw can only be nullptr if // the initial allocation failed in the constructor. MOODYCAMEL_CONSTEXPR_IF (allocMode == CannotAlloc) { return false; } else if (!new_block_index(pr_blockIndexSlotsUsed)) { return false; } } // Insert a new block in the circular linked list auto newBlock = this->parent->ConcurrentQueue::template requisition_block(); if (newBlock == nullptr) { return false; } #ifdef MCDBGQ_TRACKMEM newBlock->owner = this; #endif newBlock->ConcurrentQueue::Block::template reset_empty(); if (this->tailBlock == nullptr) { newBlock->next = newBlock; } else { newBlock->next = this->tailBlock->next; this->tailBlock->next = newBlock; } this->tailBlock = newBlock; ++pr_blockIndexSlotsUsed; } MOODYCAMEL_CONSTEXPR_IF (!MOODYCAMEL_NOEXCEPT_CTOR(T, U, new (static_cast(nullptr)) T(std::forward(element)))) { // The constructor may throw. We want the element not to appear in the queue in // that case (without corrupting the queue): MOODYCAMEL_TRY { new ((*this->tailBlock)[currentTailIndex]) T(std::forward(element)); } MOODYCAMEL_CATCH (...) { // Revert change to the current block, but leave the new block available // for next time pr_blockIndexSlotsUsed = originalBlockIndexSlotsUsed; this->tailBlock = startBlock == nullptr ? this->tailBlock : startBlock; MOODYCAMEL_RETHROW; } } else { (void)startBlock; (void)originalBlockIndexSlotsUsed; } // Add block to block index auto& entry = blockIndex.load(std::memory_order_relaxed)->entries[pr_blockIndexFront]; entry.base = currentTailIndex; entry.block = this->tailBlock; blockIndex.load(std::memory_order_relaxed)->front.store(pr_blockIndexFront, std::memory_order_release); pr_blockIndexFront = (pr_blockIndexFront + 1) & (pr_blockIndexSize - 1); MOODYCAMEL_CONSTEXPR_IF (!MOODYCAMEL_NOEXCEPT_CTOR(T, U, new (static_cast(nullptr)) T(std::forward(element)))) { this->tailIndex.store(newTailIndex, std::memory_order_release); return true; } } // Enqueue new ((*this->tailBlock)[currentTailIndex]) T(std::forward(element)); this->tailIndex.store(newTailIndex, std::memory_order_release); return true; } template bool dequeue(U& element) { auto tail = this->tailIndex.load(std::memory_order_relaxed); auto overcommit = this->dequeueOvercommit.load(std::memory_order_relaxed); if (details::circular_less_than(this->dequeueOptimisticCount.load(std::memory_order_relaxed) - overcommit, tail)) { // Might be something to dequeue, let's give it a try // Note that this if is purely for performance purposes in the common case when the queue is // empty and the values are eventually consistent -- we may enter here spuriously. // Note that whatever the values of overcommit and tail are, they are not going to change (unless we // change them) and must be the same value at this point (inside the if) as when the if condition was // evaluated. // We insert an acquire fence here to synchronize-with the release upon incrementing dequeueOvercommit below. // This ensures that whatever the value we got loaded into overcommit, the load of dequeueOptisticCount in // the fetch_add below will result in a value at least as recent as that (and therefore at least as large). // Note that I believe a compiler (signal) fence here would be sufficient due to the nature of fetch_add (all // read-modify-write operations are guaranteed to work on the latest value in the modification order), but // unfortunately that can't be shown to be correct using only the C++11 standard. // See http://stackoverflow.com/questions/18223161/what-are-the-c11-memory-ordering-guarantees-in-this-corner-case std::atomic_thread_fence(std::memory_order_acquire); // Increment optimistic counter, then check if it went over the boundary auto myDequeueCount = this->dequeueOptimisticCount.fetch_add(1, std::memory_order_relaxed); // Note that since dequeueOvercommit must be <= dequeueOptimisticCount (because dequeueOvercommit is only ever // incremented after dequeueOptimisticCount -- this is enforced in the `else` block below), and since we now // have a version of dequeueOptimisticCount that is at least as recent as overcommit (due to the release upon // incrementing dequeueOvercommit and the acquire above that synchronizes with it), overcommit <= myDequeueCount. // However, we can't assert this since both dequeueOptimisticCount and dequeueOvercommit may (independently) // overflow; in such a case, though, the logic still holds since the difference between the two is maintained. // Note that we reload tail here in case it changed; it will be the same value as before or greater, since // this load is sequenced after (happens after) the earlier load above. This is supported by read-read // coherency (as defined in the standard), explained here: http://en.cppreference.com/w/cpp/atomic/memory_order tail = this->tailIndex.load(std::memory_order_acquire); if ((details::likely)(details::circular_less_than(myDequeueCount - overcommit, tail))) { // Guaranteed to be at least one element to dequeue! // Get the index. Note that since there's guaranteed to be at least one element, this // will never exceed tail. We need to do an acquire-release fence here since it's possible // that whatever condition got us to this point was for an earlier enqueued element (that // we already see the memory effects for), but that by the time we increment somebody else // has incremented it, and we need to see the memory effects for *that* element, which is // in such a case is necessarily visible on the thread that incremented it in the first // place with the more current condition (they must have acquired a tail that is at least // as recent). auto index = this->headIndex.fetch_add(1, std::memory_order_acq_rel); // Determine which block the element is in auto localBlockIndex = blockIndex.load(std::memory_order_acquire); auto localBlockIndexHead = localBlockIndex->front.load(std::memory_order_acquire); // We need to be careful here about subtracting and dividing because of index wrap-around. // When an index wraps, we need to preserve the sign of the offset when dividing it by the // block size (in order to get a correct signed block count offset in all cases): auto headBase = localBlockIndex->entries[localBlockIndexHead].base; auto blockBaseIndex = index & ~static_cast(BLOCK_SIZE - 1); auto offset = static_cast(static_cast::type>(blockBaseIndex - headBase) / static_cast::type>(BLOCK_SIZE)); auto block = localBlockIndex->entries[(localBlockIndexHead + offset) & (localBlockIndex->size - 1)].block; // Dequeue auto& el = *((*block)[index]); if (!MOODYCAMEL_NOEXCEPT_ASSIGN(T, T&&, element = std::move(el))) { // Make sure the element is still fully dequeued and destroyed even if the assignment // throws struct Guard { Block* block; index_t index; ~Guard() { (*block)[index]->~T(); block->ConcurrentQueue::Block::template set_empty(index); } } guard = { block, index }; element = std::move(el); // NOLINT } else { element = std::move(el); // NOLINT el.~T(); // NOLINT block->ConcurrentQueue::Block::template set_empty(index); } return true; } else { // Wasn't anything to dequeue after all; make the effective dequeue count eventually consistent this->dequeueOvercommit.fetch_add(1, std::memory_order_release); // Release so that the fetch_add on dequeueOptimisticCount is guaranteed to happen before this write } } return false; } template bool MOODYCAMEL_NO_TSAN enqueue_bulk(It itemFirst, size_t count) { // First, we need to make sure we have enough room to enqueue all of the elements; // this means pre-allocating blocks and putting them in the block index (but only if // all the allocations succeeded). index_t startTailIndex = this->tailIndex.load(std::memory_order_relaxed); auto startBlock = this->tailBlock; auto originalBlockIndexFront = pr_blockIndexFront; auto originalBlockIndexSlotsUsed = pr_blockIndexSlotsUsed; Block* firstAllocatedBlock = nullptr; // Figure out how many blocks we'll need to allocate, and do so size_t blockBaseDiff = ((startTailIndex + count - 1) & ~static_cast(BLOCK_SIZE - 1)) - ((startTailIndex - 1) & ~static_cast(BLOCK_SIZE - 1)); index_t currentTailIndex = (startTailIndex - 1) & ~static_cast(BLOCK_SIZE - 1); if (blockBaseDiff > 0) { // Allocate as many blocks as possible from ahead while (blockBaseDiff > 0 && this->tailBlock != nullptr && this->tailBlock->next != firstAllocatedBlock && this->tailBlock->next->ConcurrentQueue::Block::template is_empty()) { blockBaseDiff -= static_cast(BLOCK_SIZE); currentTailIndex += static_cast(BLOCK_SIZE); this->tailBlock = this->tailBlock->next; firstAllocatedBlock = firstAllocatedBlock == nullptr ? this->tailBlock : firstAllocatedBlock; auto& entry = blockIndex.load(std::memory_order_relaxed)->entries[pr_blockIndexFront]; entry.base = currentTailIndex; entry.block = this->tailBlock; pr_blockIndexFront = (pr_blockIndexFront + 1) & (pr_blockIndexSize - 1); } // Now allocate as many blocks as necessary from the block pool while (blockBaseDiff > 0) { blockBaseDiff -= static_cast(BLOCK_SIZE); currentTailIndex += static_cast(BLOCK_SIZE); auto head = this->headIndex.load(std::memory_order_relaxed); assert(!details::circular_less_than(currentTailIndex, head)); bool full = !details::circular_less_than(head, currentTailIndex + BLOCK_SIZE) || (MAX_SUBQUEUE_SIZE != details::const_numeric_max::value && (MAX_SUBQUEUE_SIZE == 0 || MAX_SUBQUEUE_SIZE - BLOCK_SIZE < currentTailIndex - head)); if (pr_blockIndexRaw == nullptr || pr_blockIndexSlotsUsed == pr_blockIndexSize || full) { MOODYCAMEL_CONSTEXPR_IF (allocMode == CannotAlloc) { // Failed to allocate, undo changes (but keep injected blocks) pr_blockIndexFront = originalBlockIndexFront; pr_blockIndexSlotsUsed = originalBlockIndexSlotsUsed; this->tailBlock = startBlock == nullptr ? firstAllocatedBlock : startBlock; return false; } else if (full || !new_block_index(originalBlockIndexSlotsUsed)) { // Failed to allocate, undo changes (but keep injected blocks) pr_blockIndexFront = originalBlockIndexFront; pr_blockIndexSlotsUsed = originalBlockIndexSlotsUsed; this->tailBlock = startBlock == nullptr ? firstAllocatedBlock : startBlock; return false; } // pr_blockIndexFront is updated inside new_block_index, so we need to // update our fallback value too (since we keep the new index even if we // later fail) originalBlockIndexFront = originalBlockIndexSlotsUsed; } // Insert a new block in the circular linked list auto newBlock = this->parent->ConcurrentQueue::template requisition_block(); if (newBlock == nullptr) { pr_blockIndexFront = originalBlockIndexFront; pr_blockIndexSlotsUsed = originalBlockIndexSlotsUsed; this->tailBlock = startBlock == nullptr ? firstAllocatedBlock : startBlock; return false; } #ifdef MCDBGQ_TRACKMEM newBlock->owner = this; #endif newBlock->ConcurrentQueue::Block::template set_all_empty(); if (this->tailBlock == nullptr) { newBlock->next = newBlock; } else { newBlock->next = this->tailBlock->next; this->tailBlock->next = newBlock; } this->tailBlock = newBlock; firstAllocatedBlock = firstAllocatedBlock == nullptr ? this->tailBlock : firstAllocatedBlock; ++pr_blockIndexSlotsUsed; auto& entry = blockIndex.load(std::memory_order_relaxed)->entries[pr_blockIndexFront]; entry.base = currentTailIndex; entry.block = this->tailBlock; pr_blockIndexFront = (pr_blockIndexFront + 1) & (pr_blockIndexSize - 1); } // Excellent, all allocations succeeded. Reset each block's emptiness before we fill them up, and // publish the new block index front auto block = firstAllocatedBlock; while (true) { block->ConcurrentQueue::Block::template reset_empty(); if (block == this->tailBlock) { break; } block = block->next; } MOODYCAMEL_CONSTEXPR_IF (MOODYCAMEL_NOEXCEPT_CTOR(T, decltype(*itemFirst), new (static_cast(nullptr)) T(details::deref_noexcept(itemFirst)))) { blockIndex.load(std::memory_order_relaxed)->front.store((pr_blockIndexFront - 1) & (pr_blockIndexSize - 1), std::memory_order_release); } } // Enqueue, one block at a time index_t newTailIndex = startTailIndex + static_cast(count); currentTailIndex = startTailIndex; auto endBlock = this->tailBlock; this->tailBlock = startBlock; assert((startTailIndex & static_cast(BLOCK_SIZE - 1)) != 0 || firstAllocatedBlock != nullptr || count == 0); if ((startTailIndex & static_cast(BLOCK_SIZE - 1)) == 0 && firstAllocatedBlock != nullptr) { this->tailBlock = firstAllocatedBlock; } while (true) { index_t stopIndex = (currentTailIndex & ~static_cast(BLOCK_SIZE - 1)) + static_cast(BLOCK_SIZE); if (details::circular_less_than(newTailIndex, stopIndex)) { stopIndex = newTailIndex; } MOODYCAMEL_CONSTEXPR_IF (MOODYCAMEL_NOEXCEPT_CTOR(T, decltype(*itemFirst), new (static_cast(nullptr)) T(details::deref_noexcept(itemFirst)))) { while (currentTailIndex != stopIndex) { new ((*this->tailBlock)[currentTailIndex++]) T(*itemFirst++); } } else { MOODYCAMEL_TRY { while (currentTailIndex != stopIndex) { // Must use copy constructor even if move constructor is available // because we may have to revert if there's an exception. // Sorry about the horrible templated next line, but it was the only way // to disable moving *at compile time*, which is important because a type // may only define a (noexcept) move constructor, and so calls to the // cctor will not compile, even if they are in an if branch that will never // be executed new ((*this->tailBlock)[currentTailIndex]) T(details::nomove_if(nullptr)) T(details::deref_noexcept(itemFirst)))>::eval(*itemFirst)); ++currentTailIndex; ++itemFirst; } } MOODYCAMEL_CATCH (...) { // Oh dear, an exception's been thrown -- destroy the elements that // were enqueued so far and revert the entire bulk operation (we'll keep // any allocated blocks in our linked list for later, though). auto constructedStopIndex = currentTailIndex; auto lastBlockEnqueued = this->tailBlock; pr_blockIndexFront = originalBlockIndexFront; pr_blockIndexSlotsUsed = originalBlockIndexSlotsUsed; this->tailBlock = startBlock == nullptr ? firstAllocatedBlock : startBlock; if (!details::is_trivially_destructible::value) { auto block = startBlock; if ((startTailIndex & static_cast(BLOCK_SIZE - 1)) == 0) { block = firstAllocatedBlock; } currentTailIndex = startTailIndex; while (true) { stopIndex = (currentTailIndex & ~static_cast(BLOCK_SIZE - 1)) + static_cast(BLOCK_SIZE); if (details::circular_less_than(constructedStopIndex, stopIndex)) { stopIndex = constructedStopIndex; } while (currentTailIndex != stopIndex) { (*block)[currentTailIndex++]->~T(); } if (block == lastBlockEnqueued) { break; } block = block->next; } } MOODYCAMEL_RETHROW; } } if (this->tailBlock == endBlock) { assert(currentTailIndex == newTailIndex); break; } this->tailBlock = this->tailBlock->next; } MOODYCAMEL_CONSTEXPR_IF (!MOODYCAMEL_NOEXCEPT_CTOR(T, decltype(*itemFirst), new (static_cast(nullptr)) T(details::deref_noexcept(itemFirst)))) { if (firstAllocatedBlock != nullptr) blockIndex.load(std::memory_order_relaxed)->front.store((pr_blockIndexFront - 1) & (pr_blockIndexSize - 1), std::memory_order_release); } this->tailIndex.store(newTailIndex, std::memory_order_release); return true; } template size_t dequeue_bulk(It& itemFirst, size_t max) { auto tail = this->tailIndex.load(std::memory_order_relaxed); auto overcommit = this->dequeueOvercommit.load(std::memory_order_relaxed); auto desiredCount = static_cast(tail - (this->dequeueOptimisticCount.load(std::memory_order_relaxed) - overcommit)); if (details::circular_less_than(0, desiredCount)) { desiredCount = desiredCount < max ? desiredCount : max; std::atomic_thread_fence(std::memory_order_acquire); auto myDequeueCount = this->dequeueOptimisticCount.fetch_add(desiredCount, std::memory_order_relaxed); tail = this->tailIndex.load(std::memory_order_acquire); auto actualCount = static_cast(tail - (myDequeueCount - overcommit)); if (details::circular_less_than(0, actualCount)) { actualCount = desiredCount < actualCount ? desiredCount : actualCount; if (actualCount < desiredCount) { this->dequeueOvercommit.fetch_add(desiredCount - actualCount, std::memory_order_release); } // Get the first index. Note that since there's guaranteed to be at least actualCount elements, this // will never exceed tail. auto firstIndex = this->headIndex.fetch_add(actualCount, std::memory_order_acq_rel); // Determine which block the first element is in auto localBlockIndex = blockIndex.load(std::memory_order_acquire); auto localBlockIndexHead = localBlockIndex->front.load(std::memory_order_acquire); auto headBase = localBlockIndex->entries[localBlockIndexHead].base; auto firstBlockBaseIndex = firstIndex & ~static_cast(BLOCK_SIZE - 1); auto offset = static_cast(static_cast::type>(firstBlockBaseIndex - headBase) / static_cast::type>(BLOCK_SIZE)); auto indexIndex = (localBlockIndexHead + offset) & (localBlockIndex->size - 1); // Iterate the blocks and dequeue auto index = firstIndex; do { auto firstIndexInBlock = index; index_t endIndex = (index & ~static_cast(BLOCK_SIZE - 1)) + static_cast(BLOCK_SIZE); endIndex = details::circular_less_than(firstIndex + static_cast(actualCount), endIndex) ? firstIndex + static_cast(actualCount) : endIndex; auto block = localBlockIndex->entries[indexIndex].block; if (MOODYCAMEL_NOEXCEPT_ASSIGN(T, T&&, details::deref_noexcept(itemFirst) = std::move((*(*block)[index])))) { while (index != endIndex) { auto& el = *((*block)[index]); *itemFirst++ = std::move(el); el.~T(); ++index; } } else { MOODYCAMEL_TRY { while (index != endIndex) { auto& el = *((*block)[index]); *itemFirst = std::move(el); ++itemFirst; el.~T(); ++index; } } MOODYCAMEL_CATCH (...) { // It's too late to revert the dequeue, but we can make sure that all // the dequeued objects are properly destroyed and the block index // (and empty count) are properly updated before we propagate the exception do { block = localBlockIndex->entries[indexIndex].block; while (index != endIndex) { (*block)[index++]->~T(); } block->ConcurrentQueue::Block::template set_many_empty(firstIndexInBlock, static_cast(endIndex - firstIndexInBlock)); indexIndex = (indexIndex + 1) & (localBlockIndex->size - 1); firstIndexInBlock = index; endIndex = (index & ~static_cast(BLOCK_SIZE - 1)) + static_cast(BLOCK_SIZE); endIndex = details::circular_less_than(firstIndex + static_cast(actualCount), endIndex) ? firstIndex + static_cast(actualCount) : endIndex; } while (index != firstIndex + actualCount); MOODYCAMEL_RETHROW; } } block->ConcurrentQueue::Block::template set_many_empty(firstIndexInBlock, static_cast(endIndex - firstIndexInBlock)); indexIndex = (indexIndex + 1) & (localBlockIndex->size - 1); } while (index != firstIndex + actualCount); return actualCount; } else { // Wasn't anything to dequeue after all; make the effective dequeue count eventually consistent this->dequeueOvercommit.fetch_add(desiredCount, std::memory_order_release); } } return 0; } private: struct BlockIndexEntry { index_t base; Block* block; }; struct BlockIndexHeader { size_t size; std::atomic front; // Current slot (not next, like pr_blockIndexFront) BlockIndexEntry* entries; void* prev; }; bool new_block_index(size_t numberOfFilledSlotsToExpose) { auto prevBlockSizeMask = pr_blockIndexSize - 1; // Create the new block pr_blockIndexSize <<= 1; auto newRawPtr = static_cast((Traits::malloc)(sizeof(BlockIndexHeader) + std::alignment_of::value - 1 + sizeof(BlockIndexEntry) * pr_blockIndexSize)); if (newRawPtr == nullptr) { pr_blockIndexSize >>= 1; // Reset to allow graceful retry return false; } auto newBlockIndexEntries = reinterpret_cast(details::align_for(newRawPtr + sizeof(BlockIndexHeader))); // Copy in all the old indices, if any size_t j = 0; if (pr_blockIndexSlotsUsed != 0) { auto i = (pr_blockIndexFront - pr_blockIndexSlotsUsed) & prevBlockSizeMask; do { newBlockIndexEntries[j++] = pr_blockIndexEntries[i]; i = (i + 1) & prevBlockSizeMask; } while (i != pr_blockIndexFront); } // Update everything auto header = new (newRawPtr) BlockIndexHeader; header->size = pr_blockIndexSize; header->front.store(numberOfFilledSlotsToExpose - 1, std::memory_order_relaxed); header->entries = newBlockIndexEntries; header->prev = pr_blockIndexRaw; // we link the new block to the old one so we can free it later pr_blockIndexFront = j; pr_blockIndexEntries = newBlockIndexEntries; pr_blockIndexRaw = newRawPtr; blockIndex.store(header, std::memory_order_release); return true; } private: std::atomic blockIndex; // To be used by producer only -- consumer must use the ones in referenced by blockIndex size_t pr_blockIndexSlotsUsed; size_t pr_blockIndexSize; size_t pr_blockIndexFront; // Next slot (not current) BlockIndexEntry* pr_blockIndexEntries; void* pr_blockIndexRaw; #ifdef MOODYCAMEL_QUEUE_INTERNAL_DEBUG public: ExplicitProducer* nextExplicitProducer; private: #endif #ifdef MCDBGQ_TRACKMEM friend struct MemStats; #endif }; ////////////////////////////////// // Implicit queue ////////////////////////////////// struct ImplicitProducer : public ProducerBase { ImplicitProducer(ConcurrentQueue* parent_) : ProducerBase(parent_, false), nextBlockIndexCapacity(IMPLICIT_INITIAL_INDEX_SIZE), blockIndex(nullptr) { new_block_index(); } ~ImplicitProducer() { // Note that since we're in the destructor we can assume that all enqueue/dequeue operations // completed already; this means that all undequeued elements are placed contiguously across // contiguous blocks, and that only the first and last remaining blocks can be only partially // empty (all other remaining blocks must be completely full). #ifdef MOODYCAMEL_CPP11_THREAD_LOCAL_SUPPORTED // Unregister ourselves for thread termination notification if (!this->inactive.load(std::memory_order_relaxed)) { details::ThreadExitNotifier::unsubscribe(&threadExitListener); } #endif // Destroy all remaining elements! auto tail = this->tailIndex.load(std::memory_order_relaxed); auto index = this->headIndex.load(std::memory_order_relaxed); Block* block = nullptr; assert(index == tail || details::circular_less_than(index, tail)); bool forceFreeLastBlock = index != tail; // If we enter the loop, then the last (tail) block will not be freed while (index != tail) { if ((index & static_cast(BLOCK_SIZE - 1)) == 0 || block == nullptr) { if (block != nullptr) { // Free the old block this->parent->add_block_to_free_list(block); } block = get_block_index_entry_for_index(index)->value.load(std::memory_order_relaxed); } ((*block)[index])->~T(); ++index; } // Even if the queue is empty, there's still one block that's not on the free list // (unless the head index reached the end of it, in which case the tail will be poised // to create a new block). if (this->tailBlock != nullptr && (forceFreeLastBlock || (tail & static_cast(BLOCK_SIZE - 1)) != 0)) { this->parent->add_block_to_free_list(this->tailBlock); } // Destroy block index auto localBlockIndex = blockIndex.load(std::memory_order_relaxed); if (localBlockIndex != nullptr) { for (size_t i = 0; i != localBlockIndex->capacity; ++i) { localBlockIndex->index[i]->~BlockIndexEntry(); } do { auto prev = localBlockIndex->prev; localBlockIndex->~BlockIndexHeader(); (Traits::free)(localBlockIndex); localBlockIndex = prev; } while (localBlockIndex != nullptr); } } template inline bool enqueue(U&& element) { index_t currentTailIndex = this->tailIndex.load(std::memory_order_relaxed); index_t newTailIndex = 1 + currentTailIndex; if ((currentTailIndex & static_cast(BLOCK_SIZE - 1)) == 0) { // We reached the end of a block, start a new one auto head = this->headIndex.load(std::memory_order_relaxed); assert(!details::circular_less_than(currentTailIndex, head)); if (!details::circular_less_than(head, currentTailIndex + BLOCK_SIZE) || (MAX_SUBQUEUE_SIZE != details::const_numeric_max::value && (MAX_SUBQUEUE_SIZE == 0 || MAX_SUBQUEUE_SIZE - BLOCK_SIZE < currentTailIndex - head))) { return false; } #ifdef MCDBGQ_NOLOCKFREE_IMPLICITPRODBLOCKINDEX debug::DebugLock lock(mutex); #endif // Find out where we'll be inserting this block in the block index BlockIndexEntry* idxEntry; if (!insert_block_index_entry(idxEntry, currentTailIndex)) { return false; } // Get ahold of a new block auto newBlock = this->parent->ConcurrentQueue::template requisition_block(); if (newBlock == nullptr) { rewind_block_index_tail(); idxEntry->value.store(nullptr, std::memory_order_relaxed); return false; } #ifdef MCDBGQ_TRACKMEM newBlock->owner = this; #endif newBlock->ConcurrentQueue::Block::template reset_empty(); MOODYCAMEL_CONSTEXPR_IF (!MOODYCAMEL_NOEXCEPT_CTOR(T, U, new (static_cast(nullptr)) T(std::forward(element)))) { // May throw, try to insert now before we publish the fact that we have this new block MOODYCAMEL_TRY { new ((*newBlock)[currentTailIndex]) T(std::forward(element)); } MOODYCAMEL_CATCH (...) { rewind_block_index_tail(); idxEntry->value.store(nullptr, std::memory_order_relaxed); this->parent->add_block_to_free_list(newBlock); MOODYCAMEL_RETHROW; } } // Insert the new block into the index idxEntry->value.store(newBlock, std::memory_order_relaxed); this->tailBlock = newBlock; MOODYCAMEL_CONSTEXPR_IF (!MOODYCAMEL_NOEXCEPT_CTOR(T, U, new (static_cast(nullptr)) T(std::forward(element)))) { this->tailIndex.store(newTailIndex, std::memory_order_release); return true; } } // Enqueue new ((*this->tailBlock)[currentTailIndex]) T(std::forward(element)); this->tailIndex.store(newTailIndex, std::memory_order_release); return true; } template bool dequeue(U& element) { // See ExplicitProducer::dequeue for rationale and explanation index_t tail = this->tailIndex.load(std::memory_order_relaxed); index_t overcommit = this->dequeueOvercommit.load(std::memory_order_relaxed); if (details::circular_less_than(this->dequeueOptimisticCount.load(std::memory_order_relaxed) - overcommit, tail)) { std::atomic_thread_fence(std::memory_order_acquire); index_t myDequeueCount = this->dequeueOptimisticCount.fetch_add(1, std::memory_order_relaxed); tail = this->tailIndex.load(std::memory_order_acquire); if ((details::likely)(details::circular_less_than(myDequeueCount - overcommit, tail))) { index_t index = this->headIndex.fetch_add(1, std::memory_order_acq_rel); // Determine which block the element is in auto entry = get_block_index_entry_for_index(index); // Dequeue auto block = entry->value.load(std::memory_order_relaxed); auto& el = *((*block)[index]); if (!MOODYCAMEL_NOEXCEPT_ASSIGN(T, T&&, element = std::move(el))) { #ifdef MCDBGQ_NOLOCKFREE_IMPLICITPRODBLOCKINDEX // Note: Acquiring the mutex with every dequeue instead of only when a block // is released is very sub-optimal, but it is, after all, purely debug code. debug::DebugLock lock(producer->mutex); #endif struct Guard { Block* block; index_t index; BlockIndexEntry* entry; ConcurrentQueue* parent; ~Guard() { (*block)[index]->~T(); if (block->ConcurrentQueue::Block::template set_empty(index)) { entry->value.store(nullptr, std::memory_order_relaxed); parent->add_block_to_free_list(block); } } } guard = { block, index, entry, this->parent }; element = std::move(el); // NOLINT } else { element = std::move(el); // NOLINT el.~T(); // NOLINT if (block->ConcurrentQueue::Block::template set_empty(index)) { { #ifdef MCDBGQ_NOLOCKFREE_IMPLICITPRODBLOCKINDEX debug::DebugLock lock(mutex); #endif // Add the block back into the global free pool (and remove from block index) entry->value.store(nullptr, std::memory_order_relaxed); } this->parent->add_block_to_free_list(block); // releases the above store } } return true; } else { this->dequeueOvercommit.fetch_add(1, std::memory_order_release); } } return false; } #ifdef _MSC_VER #pragma warning(push) #pragma warning(disable: 4706) // assignment within conditional expression #endif template bool enqueue_bulk(It itemFirst, size_t count) { // First, we need to make sure we have enough room to enqueue all of the elements; // this means pre-allocating blocks and putting them in the block index (but only if // all the allocations succeeded). // Note that the tailBlock we start off with may not be owned by us any more; // this happens if it was filled up exactly to the top (setting tailIndex to // the first index of the next block which is not yet allocated), then dequeued // completely (putting it on the free list) before we enqueue again. index_t startTailIndex = this->tailIndex.load(std::memory_order_relaxed); auto startBlock = this->tailBlock; Block* firstAllocatedBlock = nullptr; auto endBlock = this->tailBlock; // Figure out how many blocks we'll need to allocate, and do so size_t blockBaseDiff = ((startTailIndex + count - 1) & ~static_cast(BLOCK_SIZE - 1)) - ((startTailIndex - 1) & ~static_cast(BLOCK_SIZE - 1)); index_t currentTailIndex = (startTailIndex - 1) & ~static_cast(BLOCK_SIZE - 1); if (blockBaseDiff > 0) { #ifdef MCDBGQ_NOLOCKFREE_IMPLICITPRODBLOCKINDEX debug::DebugLock lock(mutex); #endif do { blockBaseDiff -= static_cast(BLOCK_SIZE); currentTailIndex += static_cast(BLOCK_SIZE); // Find out where we'll be inserting this block in the block index BlockIndexEntry* idxEntry = nullptr; // initialization here unnecessary but compiler can't always tell Block* newBlock; bool indexInserted = false; auto head = this->headIndex.load(std::memory_order_relaxed); assert(!details::circular_less_than(currentTailIndex, head)); bool full = !details::circular_less_than(head, currentTailIndex + BLOCK_SIZE) || (MAX_SUBQUEUE_SIZE != details::const_numeric_max::value && (MAX_SUBQUEUE_SIZE == 0 || MAX_SUBQUEUE_SIZE - BLOCK_SIZE < currentTailIndex - head)); if (full || !(indexInserted = insert_block_index_entry(idxEntry, currentTailIndex)) || (newBlock = this->parent->ConcurrentQueue::template requisition_block()) == nullptr) { // Index allocation or block allocation failed; revert any other allocations // and index insertions done so far for this operation if (indexInserted) { rewind_block_index_tail(); idxEntry->value.store(nullptr, std::memory_order_relaxed); } currentTailIndex = (startTailIndex - 1) & ~static_cast(BLOCK_SIZE - 1); for (auto block = firstAllocatedBlock; block != nullptr; block = block->next) { currentTailIndex += static_cast(BLOCK_SIZE); idxEntry = get_block_index_entry_for_index(currentTailIndex); idxEntry->value.store(nullptr, std::memory_order_relaxed); rewind_block_index_tail(); } this->parent->add_blocks_to_free_list(firstAllocatedBlock); this->tailBlock = startBlock; return false; } #ifdef MCDBGQ_TRACKMEM newBlock->owner = this; #endif newBlock->ConcurrentQueue::Block::template reset_empty(); newBlock->next = nullptr; // Insert the new block into the index idxEntry->value.store(newBlock, std::memory_order_relaxed); // Store the chain of blocks so that we can undo if later allocations fail, // and so that we can find the blocks when we do the actual enqueueing if ((startTailIndex & static_cast(BLOCK_SIZE - 1)) != 0 || firstAllocatedBlock != nullptr) { assert(this->tailBlock != nullptr); this->tailBlock->next = newBlock; } this->tailBlock = newBlock; endBlock = newBlock; firstAllocatedBlock = firstAllocatedBlock == nullptr ? newBlock : firstAllocatedBlock; } while (blockBaseDiff > 0); } // Enqueue, one block at a time index_t newTailIndex = startTailIndex + static_cast(count); currentTailIndex = startTailIndex; this->tailBlock = startBlock; assert((startTailIndex & static_cast(BLOCK_SIZE - 1)) != 0 || firstAllocatedBlock != nullptr || count == 0); if ((startTailIndex & static_cast(BLOCK_SIZE - 1)) == 0 && firstAllocatedBlock != nullptr) { this->tailBlock = firstAllocatedBlock; } while (true) { index_t stopIndex = (currentTailIndex & ~static_cast(BLOCK_SIZE - 1)) + static_cast(BLOCK_SIZE); if (details::circular_less_than(newTailIndex, stopIndex)) { stopIndex = newTailIndex; } MOODYCAMEL_CONSTEXPR_IF (MOODYCAMEL_NOEXCEPT_CTOR(T, decltype(*itemFirst), new (static_cast(nullptr)) T(details::deref_noexcept(itemFirst)))) { while (currentTailIndex != stopIndex) { new ((*this->tailBlock)[currentTailIndex++]) T(*itemFirst++); } } else { MOODYCAMEL_TRY { while (currentTailIndex != stopIndex) { new ((*this->tailBlock)[currentTailIndex]) T(details::nomove_if(nullptr)) T(details::deref_noexcept(itemFirst)))>::eval(*itemFirst)); ++currentTailIndex; ++itemFirst; } } MOODYCAMEL_CATCH (...) { auto constructedStopIndex = currentTailIndex; auto lastBlockEnqueued = this->tailBlock; if (!details::is_trivially_destructible::value) { auto block = startBlock; if ((startTailIndex & static_cast(BLOCK_SIZE - 1)) == 0) { block = firstAllocatedBlock; } currentTailIndex = startTailIndex; while (true) { stopIndex = (currentTailIndex & ~static_cast(BLOCK_SIZE - 1)) + static_cast(BLOCK_SIZE); if (details::circular_less_than(constructedStopIndex, stopIndex)) { stopIndex = constructedStopIndex; } while (currentTailIndex != stopIndex) { (*block)[currentTailIndex++]->~T(); } if (block == lastBlockEnqueued) { break; } block = block->next; } } currentTailIndex = (startTailIndex - 1) & ~static_cast(BLOCK_SIZE - 1); for (auto block = firstAllocatedBlock; block != nullptr; block = block->next) { currentTailIndex += static_cast(BLOCK_SIZE); auto idxEntry = get_block_index_entry_for_index(currentTailIndex); idxEntry->value.store(nullptr, std::memory_order_relaxed); rewind_block_index_tail(); } this->parent->add_blocks_to_free_list(firstAllocatedBlock); this->tailBlock = startBlock; MOODYCAMEL_RETHROW; } } if (this->tailBlock == endBlock) { assert(currentTailIndex == newTailIndex); break; } this->tailBlock = this->tailBlock->next; } this->tailIndex.store(newTailIndex, std::memory_order_release); return true; } #ifdef _MSC_VER #pragma warning(pop) #endif template size_t dequeue_bulk(It& itemFirst, size_t max) { auto tail = this->tailIndex.load(std::memory_order_relaxed); auto overcommit = this->dequeueOvercommit.load(std::memory_order_relaxed); auto desiredCount = static_cast(tail - (this->dequeueOptimisticCount.load(std::memory_order_relaxed) - overcommit)); if (details::circular_less_than(0, desiredCount)) { desiredCount = desiredCount < max ? desiredCount : max; std::atomic_thread_fence(std::memory_order_acquire); auto myDequeueCount = this->dequeueOptimisticCount.fetch_add(desiredCount, std::memory_order_relaxed); tail = this->tailIndex.load(std::memory_order_acquire); auto actualCount = static_cast(tail - (myDequeueCount - overcommit)); if (details::circular_less_than(0, actualCount)) { actualCount = desiredCount < actualCount ? desiredCount : actualCount; if (actualCount < desiredCount) { this->dequeueOvercommit.fetch_add(desiredCount - actualCount, std::memory_order_release); } // Get the first index. Note that since there's guaranteed to be at least actualCount elements, this // will never exceed tail. auto firstIndex = this->headIndex.fetch_add(actualCount, std::memory_order_acq_rel); // Iterate the blocks and dequeue auto index = firstIndex; BlockIndexHeader* localBlockIndex; auto indexIndex = get_block_index_index_for_index(index, localBlockIndex); do { auto blockStartIndex = index; index_t endIndex = (index & ~static_cast(BLOCK_SIZE - 1)) + static_cast(BLOCK_SIZE); endIndex = details::circular_less_than(firstIndex + static_cast(actualCount), endIndex) ? firstIndex + static_cast(actualCount) : endIndex; auto entry = localBlockIndex->index[indexIndex]; auto block = entry->value.load(std::memory_order_relaxed); if (MOODYCAMEL_NOEXCEPT_ASSIGN(T, T&&, details::deref_noexcept(itemFirst) = std::move((*(*block)[index])))) { while (index != endIndex) { auto& el = *((*block)[index]); *itemFirst++ = std::move(el); el.~T(); ++index; } } else { MOODYCAMEL_TRY { while (index != endIndex) { auto& el = *((*block)[index]); *itemFirst = std::move(el); ++itemFirst; el.~T(); ++index; } } MOODYCAMEL_CATCH (...) { do { entry = localBlockIndex->index[indexIndex]; block = entry->value.load(std::memory_order_relaxed); while (index != endIndex) { (*block)[index++]->~T(); } if (block->ConcurrentQueue::Block::template set_many_empty(blockStartIndex, static_cast(endIndex - blockStartIndex))) { #ifdef MCDBGQ_NOLOCKFREE_IMPLICITPRODBLOCKINDEX debug::DebugLock lock(mutex); #endif entry->value.store(nullptr, std::memory_order_relaxed); this->parent->add_block_to_free_list(block); } indexIndex = (indexIndex + 1) & (localBlockIndex->capacity - 1); blockStartIndex = index; endIndex = (index & ~static_cast(BLOCK_SIZE - 1)) + static_cast(BLOCK_SIZE); endIndex = details::circular_less_than(firstIndex + static_cast(actualCount), endIndex) ? firstIndex + static_cast(actualCount) : endIndex; } while (index != firstIndex + actualCount); MOODYCAMEL_RETHROW; } } if (block->ConcurrentQueue::Block::template set_many_empty(blockStartIndex, static_cast(endIndex - blockStartIndex))) { { #ifdef MCDBGQ_NOLOCKFREE_IMPLICITPRODBLOCKINDEX debug::DebugLock lock(mutex); #endif // Note that the set_many_empty above did a release, meaning that anybody who acquires the block // we're about to free can use it safely since our writes (and reads!) will have happened-before then. entry->value.store(nullptr, std::memory_order_relaxed); } this->parent->add_block_to_free_list(block); // releases the above store } indexIndex = (indexIndex + 1) & (localBlockIndex->capacity - 1); } while (index != firstIndex + actualCount); return actualCount; } else { this->dequeueOvercommit.fetch_add(desiredCount, std::memory_order_release); } } return 0; } private: // The block size must be > 1, so any number with the low bit set is an invalid block base index static const index_t INVALID_BLOCK_BASE = 1; struct BlockIndexEntry { std::atomic key; std::atomic value; }; struct BlockIndexHeader { size_t capacity; std::atomic tail; BlockIndexEntry* entries; BlockIndexEntry** index; BlockIndexHeader* prev; }; template inline bool insert_block_index_entry(BlockIndexEntry*& idxEntry, index_t blockStartIndex) { auto localBlockIndex = blockIndex.load(std::memory_order_relaxed); // We're the only writer thread, relaxed is OK if (localBlockIndex == nullptr) { return false; // this can happen if new_block_index failed in the constructor } size_t newTail = (localBlockIndex->tail.load(std::memory_order_relaxed) + 1) & (localBlockIndex->capacity - 1); idxEntry = localBlockIndex->index[newTail]; if (idxEntry->key.load(std::memory_order_relaxed) == INVALID_BLOCK_BASE || idxEntry->value.load(std::memory_order_relaxed) == nullptr) { idxEntry->key.store(blockStartIndex, std::memory_order_relaxed); localBlockIndex->tail.store(newTail, std::memory_order_release); return true; } // No room in the old block index, try to allocate another one! MOODYCAMEL_CONSTEXPR_IF (allocMode == CannotAlloc) { return false; } else if (!new_block_index()) { return false; } else { localBlockIndex = blockIndex.load(std::memory_order_relaxed); newTail = (localBlockIndex->tail.load(std::memory_order_relaxed) + 1) & (localBlockIndex->capacity - 1); idxEntry = localBlockIndex->index[newTail]; assert(idxEntry->key.load(std::memory_order_relaxed) == INVALID_BLOCK_BASE); idxEntry->key.store(blockStartIndex, std::memory_order_relaxed); localBlockIndex->tail.store(newTail, std::memory_order_release); return true; } } inline void rewind_block_index_tail() { auto localBlockIndex = blockIndex.load(std::memory_order_relaxed); localBlockIndex->tail.store((localBlockIndex->tail.load(std::memory_order_relaxed) - 1) & (localBlockIndex->capacity - 1), std::memory_order_relaxed); } inline BlockIndexEntry* get_block_index_entry_for_index(index_t index) const { BlockIndexHeader* localBlockIndex; auto idx = get_block_index_index_for_index(index, localBlockIndex); return localBlockIndex->index[idx]; } inline size_t get_block_index_index_for_index(index_t index, BlockIndexHeader*& localBlockIndex) const { #ifdef MCDBGQ_NOLOCKFREE_IMPLICITPRODBLOCKINDEX debug::DebugLock lock(mutex); #endif index &= ~static_cast(BLOCK_SIZE - 1); localBlockIndex = blockIndex.load(std::memory_order_acquire); auto tail = localBlockIndex->tail.load(std::memory_order_acquire); auto tailBase = localBlockIndex->index[tail]->key.load(std::memory_order_relaxed); assert(tailBase != INVALID_BLOCK_BASE); // Note: Must use division instead of shift because the index may wrap around, causing a negative // offset, whose negativity we want to preserve auto offset = static_cast(static_cast::type>(index - tailBase) / static_cast::type>(BLOCK_SIZE)); size_t idx = (tail + offset) & (localBlockIndex->capacity - 1); assert(localBlockIndex->index[idx]->key.load(std::memory_order_relaxed) == index && localBlockIndex->index[idx]->value.load(std::memory_order_relaxed) != nullptr); return idx; } bool new_block_index() { auto prev = blockIndex.load(std::memory_order_relaxed); size_t prevCapacity = prev == nullptr ? 0 : prev->capacity; auto entryCount = prev == nullptr ? nextBlockIndexCapacity : prevCapacity; auto raw = static_cast((Traits::malloc)( sizeof(BlockIndexHeader) + std::alignment_of::value - 1 + sizeof(BlockIndexEntry) * entryCount + std::alignment_of::value - 1 + sizeof(BlockIndexEntry*) * nextBlockIndexCapacity)); if (raw == nullptr) { return false; } auto header = new (raw) BlockIndexHeader; auto entries = reinterpret_cast(details::align_for(raw + sizeof(BlockIndexHeader))); auto index = reinterpret_cast(details::align_for(reinterpret_cast(entries) + sizeof(BlockIndexEntry) * entryCount)); if (prev != nullptr) { auto prevTail = prev->tail.load(std::memory_order_relaxed); auto prevPos = prevTail; size_t i = 0; do { prevPos = (prevPos + 1) & (prev->capacity - 1); index[i++] = prev->index[prevPos]; } while (prevPos != prevTail); assert(i == prevCapacity); } for (size_t i = 0; i != entryCount; ++i) { new (entries + i) BlockIndexEntry; entries[i].key.store(INVALID_BLOCK_BASE, std::memory_order_relaxed); index[prevCapacity + i] = entries + i; } header->prev = prev; header->entries = entries; header->index = index; header->capacity = nextBlockIndexCapacity; header->tail.store((prevCapacity - 1) & (nextBlockIndexCapacity - 1), std::memory_order_relaxed); blockIndex.store(header, std::memory_order_release); nextBlockIndexCapacity <<= 1; return true; } private: size_t nextBlockIndexCapacity; std::atomic blockIndex; #ifdef MOODYCAMEL_CPP11_THREAD_LOCAL_SUPPORTED public: details::ThreadExitListener threadExitListener; private: #endif #ifdef MOODYCAMEL_QUEUE_INTERNAL_DEBUG public: ImplicitProducer* nextImplicitProducer; private: #endif #ifdef MCDBGQ_NOLOCKFREE_IMPLICITPRODBLOCKINDEX mutable debug::DebugMutex mutex; #endif #ifdef MCDBGQ_TRACKMEM friend struct MemStats; #endif }; ////////////////////////////////// // Block pool manipulation ////////////////////////////////// void populate_initial_block_list(size_t blockCount) { initialBlockPoolSize = blockCount; if (initialBlockPoolSize == 0) { initialBlockPool = nullptr; return; } initialBlockPool = create_array(blockCount); if (initialBlockPool == nullptr) { initialBlockPoolSize = 0; } for (size_t i = 0; i < initialBlockPoolSize; ++i) { initialBlockPool[i].dynamicallyAllocated = false; } } inline Block* try_get_block_from_initial_pool() { if (initialBlockPoolIndex.load(std::memory_order_relaxed) >= initialBlockPoolSize) { return nullptr; } auto index = initialBlockPoolIndex.fetch_add(1, std::memory_order_relaxed); return index < initialBlockPoolSize ? (initialBlockPool + index) : nullptr; } inline void add_block_to_free_list(Block* block) { #ifdef MCDBGQ_TRACKMEM block->owner = nullptr; #endif if (!Traits::RECYCLE_ALLOCATED_BLOCKS && block->dynamicallyAllocated) { destroy(block); } else { freeList.add(block); } } inline void add_blocks_to_free_list(Block* block) { while (block != nullptr) { auto next = block->next; add_block_to_free_list(block); block = next; } } inline Block* try_get_block_from_free_list() { return freeList.try_get(); } // Gets a free block from one of the memory pools, or allocates a new one (if applicable) template Block* requisition_block() { auto block = try_get_block_from_initial_pool(); if (block != nullptr) { return block; } block = try_get_block_from_free_list(); if (block != nullptr) { return block; } MOODYCAMEL_CONSTEXPR_IF (canAlloc == CanAlloc) { return create(); } else { return nullptr; } } #ifdef MCDBGQ_TRACKMEM public: struct MemStats { size_t allocatedBlocks; size_t usedBlocks; size_t freeBlocks; size_t ownedBlocksExplicit; size_t ownedBlocksImplicit; size_t implicitProducers; size_t explicitProducers; size_t elementsEnqueued; size_t blockClassBytes; size_t queueClassBytes; size_t implicitBlockIndexBytes; size_t explicitBlockIndexBytes; friend class ConcurrentQueue; private: static MemStats getFor(ConcurrentQueue* q) { MemStats stats = { 0 }; stats.elementsEnqueued = q->size_approx(); auto block = q->freeList.head_unsafe(); while (block != nullptr) { ++stats.allocatedBlocks; ++stats.freeBlocks; block = block->freeListNext.load(std::memory_order_relaxed); } for (auto ptr = q->producerListTail.load(std::memory_order_acquire); ptr != nullptr; ptr = ptr->next_prod()) { bool implicit = dynamic_cast(ptr) != nullptr; stats.implicitProducers += implicit ? 1 : 0; stats.explicitProducers += implicit ? 0 : 1; if (implicit) { auto prod = static_cast(ptr); stats.queueClassBytes += sizeof(ImplicitProducer); auto head = prod->headIndex.load(std::memory_order_relaxed); auto tail = prod->tailIndex.load(std::memory_order_relaxed); auto hash = prod->blockIndex.load(std::memory_order_relaxed); if (hash != nullptr) { for (size_t i = 0; i != hash->capacity; ++i) { if (hash->index[i]->key.load(std::memory_order_relaxed) != ImplicitProducer::INVALID_BLOCK_BASE && hash->index[i]->value.load(std::memory_order_relaxed) != nullptr) { ++stats.allocatedBlocks; ++stats.ownedBlocksImplicit; } } stats.implicitBlockIndexBytes += hash->capacity * sizeof(typename ImplicitProducer::BlockIndexEntry); for (; hash != nullptr; hash = hash->prev) { stats.implicitBlockIndexBytes += sizeof(typename ImplicitProducer::BlockIndexHeader) + hash->capacity * sizeof(typename ImplicitProducer::BlockIndexEntry*); } } for (; details::circular_less_than(head, tail); head += BLOCK_SIZE) { //auto block = prod->get_block_index_entry_for_index(head); ++stats.usedBlocks; } } else { auto prod = static_cast(ptr); stats.queueClassBytes += sizeof(ExplicitProducer); auto tailBlock = prod->tailBlock; bool wasNonEmpty = false; if (tailBlock != nullptr) { auto block = tailBlock; do { ++stats.allocatedBlocks; if (!block->ConcurrentQueue::Block::template is_empty() || wasNonEmpty) { ++stats.usedBlocks; wasNonEmpty = wasNonEmpty || block != tailBlock; } ++stats.ownedBlocksExplicit; block = block->next; } while (block != tailBlock); } auto index = prod->blockIndex.load(std::memory_order_relaxed); while (index != nullptr) { stats.explicitBlockIndexBytes += sizeof(typename ExplicitProducer::BlockIndexHeader) + index->size * sizeof(typename ExplicitProducer::BlockIndexEntry); index = static_cast(index->prev); } } } auto freeOnInitialPool = q->initialBlockPoolIndex.load(std::memory_order_relaxed) >= q->initialBlockPoolSize ? 0 : q->initialBlockPoolSize - q->initialBlockPoolIndex.load(std::memory_order_relaxed); stats.allocatedBlocks += freeOnInitialPool; stats.freeBlocks += freeOnInitialPool; stats.blockClassBytes = sizeof(Block) * stats.allocatedBlocks; stats.queueClassBytes += sizeof(ConcurrentQueue); return stats; } }; // For debugging only. Not thread-safe. MemStats getMemStats() { return MemStats::getFor(this); } private: friend struct MemStats; #endif ////////////////////////////////// // Producer list manipulation ////////////////////////////////// ProducerBase* recycle_or_create_producer(bool isExplicit) { #ifdef MCDBGQ_NOLOCKFREE_IMPLICITPRODHASH debug::DebugLock lock(implicitProdMutex); #endif // Try to re-use one first for (auto ptr = producerListTail.load(std::memory_order_acquire); ptr != nullptr; ptr = ptr->next_prod()) { if (ptr->inactive.load(std::memory_order_relaxed) && ptr->isExplicit == isExplicit) { bool expected = true; if (ptr->inactive.compare_exchange_strong(expected, /* desired */ false, std::memory_order_acquire, std::memory_order_relaxed)) { // We caught one! It's been marked as activated, the caller can have it return ptr; } } } return add_producer(isExplicit ? static_cast(create(this)) : create(this)); } ProducerBase* add_producer(ProducerBase* producer) { // Handle failed memory allocation if (producer == nullptr) { return nullptr; } producerCount.fetch_add(1, std::memory_order_relaxed); // Add it to the lock-free list auto prevTail = producerListTail.load(std::memory_order_relaxed); do { producer->next = prevTail; } while (!producerListTail.compare_exchange_weak(prevTail, producer, std::memory_order_release, std::memory_order_relaxed)); #ifdef MOODYCAMEL_QUEUE_INTERNAL_DEBUG if (producer->isExplicit) { auto prevTailExplicit = explicitProducers.load(std::memory_order_relaxed); do { static_cast(producer)->nextExplicitProducer = prevTailExplicit; } while (!explicitProducers.compare_exchange_weak(prevTailExplicit, static_cast(producer), std::memory_order_release, std::memory_order_relaxed)); } else { auto prevTailImplicit = implicitProducers.load(std::memory_order_relaxed); do { static_cast(producer)->nextImplicitProducer = prevTailImplicit; } while (!implicitProducers.compare_exchange_weak(prevTailImplicit, static_cast(producer), std::memory_order_release, std::memory_order_relaxed)); } #endif return producer; } void reown_producers() { // After another instance is moved-into/swapped-with this one, all the // producers we stole still think their parents are the other queue. // So fix them up! for (auto ptr = producerListTail.load(std::memory_order_relaxed); ptr != nullptr; ptr = ptr->next_prod()) { ptr->parent = this; } } ////////////////////////////////// // Implicit producer hash ////////////////////////////////// struct ImplicitProducerKVP { std::atomic key; ImplicitProducer* value; // No need for atomicity since it's only read by the thread that sets it in the first place ImplicitProducerKVP() : value(nullptr) { } ImplicitProducerKVP(ImplicitProducerKVP&& other) MOODYCAMEL_NOEXCEPT { key.store(other.key.load(std::memory_order_relaxed), std::memory_order_relaxed); value = other.value; } inline ImplicitProducerKVP& operator=(ImplicitProducerKVP&& other) MOODYCAMEL_NOEXCEPT { swap(other); return *this; } inline void swap(ImplicitProducerKVP& other) MOODYCAMEL_NOEXCEPT { if (this != &other) { details::swap_relaxed(key, other.key); std::swap(value, other.value); } } }; template friend void moodycamel::swap(typename ConcurrentQueue::ImplicitProducerKVP&, typename ConcurrentQueue::ImplicitProducerKVP&) MOODYCAMEL_NOEXCEPT; struct ImplicitProducerHash { size_t capacity; ImplicitProducerKVP* entries; ImplicitProducerHash* prev; }; inline void populate_initial_implicit_producer_hash() { MOODYCAMEL_CONSTEXPR_IF (INITIAL_IMPLICIT_PRODUCER_HASH_SIZE == 0) { return; } else { implicitProducerHashCount.store(0, std::memory_order_relaxed); auto hash = &initialImplicitProducerHash; hash->capacity = INITIAL_IMPLICIT_PRODUCER_HASH_SIZE; hash->entries = &initialImplicitProducerHashEntries[0]; for (size_t i = 0; i != INITIAL_IMPLICIT_PRODUCER_HASH_SIZE; ++i) { initialImplicitProducerHashEntries[i].key.store(details::invalid_thread_id, std::memory_order_relaxed); } hash->prev = nullptr; implicitProducerHash.store(hash, std::memory_order_relaxed); } } void swap_implicit_producer_hashes(ConcurrentQueue& other) { MOODYCAMEL_CONSTEXPR_IF (INITIAL_IMPLICIT_PRODUCER_HASH_SIZE == 0) { return; } else { // Swap (assumes our implicit producer hash is initialized) initialImplicitProducerHashEntries.swap(other.initialImplicitProducerHashEntries); initialImplicitProducerHash.entries = &initialImplicitProducerHashEntries[0]; other.initialImplicitProducerHash.entries = &other.initialImplicitProducerHashEntries[0]; details::swap_relaxed(implicitProducerHashCount, other.implicitProducerHashCount); details::swap_relaxed(implicitProducerHash, other.implicitProducerHash); if (implicitProducerHash.load(std::memory_order_relaxed) == &other.initialImplicitProducerHash) { implicitProducerHash.store(&initialImplicitProducerHash, std::memory_order_relaxed); } else { ImplicitProducerHash* hash; for (hash = implicitProducerHash.load(std::memory_order_relaxed); hash->prev != &other.initialImplicitProducerHash; hash = hash->prev) { continue; } hash->prev = &initialImplicitProducerHash; } if (other.implicitProducerHash.load(std::memory_order_relaxed) == &initialImplicitProducerHash) { other.implicitProducerHash.store(&other.initialImplicitProducerHash, std::memory_order_relaxed); } else { ImplicitProducerHash* hash; for (hash = other.implicitProducerHash.load(std::memory_order_relaxed); hash->prev != &initialImplicitProducerHash; hash = hash->prev) { continue; } hash->prev = &other.initialImplicitProducerHash; } } } // Only fails (returns nullptr) if memory allocation fails ImplicitProducer* get_or_add_implicit_producer() { // Note that since the data is essentially thread-local (key is thread ID), // there's a reduced need for fences (memory ordering is already consistent // for any individual thread), except for the current table itself. // Start by looking for the thread ID in the current and all previous hash tables. // If it's not found, it must not be in there yet, since this same thread would // have added it previously to one of the tables that we traversed. // Code and algorithm adapted from http://preshing.com/20130605/the-worlds-simplest-lock-free-hash-table #ifdef MCDBGQ_NOLOCKFREE_IMPLICITPRODHASH debug::DebugLock lock(implicitProdMutex); #endif auto id = details::thread_id(); auto hashedId = details::hash_thread_id(id); auto mainHash = implicitProducerHash.load(std::memory_order_acquire); assert(mainHash != nullptr); // silence clang-tidy and MSVC warnings (hash cannot be null) for (auto hash = mainHash; hash != nullptr; hash = hash->prev) { // Look for the id in this hash auto index = hashedId; while (true) { // Not an infinite loop because at least one slot is free in the hash table index &= hash->capacity - 1u; auto probedKey = hash->entries[index].key.load(std::memory_order_relaxed); if (probedKey == id) { // Found it! If we had to search several hashes deep, though, we should lazily add it // to the current main hash table to avoid the extended search next time. // Note there's guaranteed to be room in the current hash table since every subsequent // table implicitly reserves space for all previous tables (there's only one // implicitProducerHashCount). auto value = hash->entries[index].value; if (hash != mainHash) { index = hashedId; while (true) { index &= mainHash->capacity - 1u; auto empty = details::invalid_thread_id; #ifdef MOODYCAMEL_CPP11_THREAD_LOCAL_SUPPORTED auto reusable = details::invalid_thread_id2; if (mainHash->entries[index].key.compare_exchange_strong(empty, id, std::memory_order_seq_cst, std::memory_order_relaxed) || mainHash->entries[index].key.compare_exchange_strong(reusable, id, std::memory_order_seq_cst, std::memory_order_relaxed)) { #else if (mainHash->entries[index].key.compare_exchange_strong(empty, id, std::memory_order_seq_cst, std::memory_order_relaxed)) { #endif mainHash->entries[index].value = value; break; } ++index; } } return value; } if (probedKey == details::invalid_thread_id) { break; // Not in this hash table } ++index; } } // Insert! auto newCount = 1 + implicitProducerHashCount.fetch_add(1, std::memory_order_relaxed); while (true) { // NOLINTNEXTLINE(clang-analyzer-core.NullDereference) if (newCount >= (mainHash->capacity >> 1) && !implicitProducerHashResizeInProgress.test_and_set(std::memory_order_acquire)) { // We've acquired the resize lock, try to allocate a bigger hash table. // Note the acquire fence synchronizes with the release fence at the end of this block, and hence when // we reload implicitProducerHash it must be the most recent version (it only gets changed within this // locked block). mainHash = implicitProducerHash.load(std::memory_order_acquire); if (newCount >= (mainHash->capacity >> 1)) { size_t newCapacity = mainHash->capacity << 1; while (newCount >= (newCapacity >> 1)) { newCapacity <<= 1; } auto raw = static_cast((Traits::malloc)(sizeof(ImplicitProducerHash) + std::alignment_of::value - 1 + sizeof(ImplicitProducerKVP) * newCapacity)); if (raw == nullptr) { // Allocation failed implicitProducerHashCount.fetch_sub(1, std::memory_order_relaxed); implicitProducerHashResizeInProgress.clear(std::memory_order_relaxed); return nullptr; } auto newHash = new (raw) ImplicitProducerHash; newHash->capacity = static_cast(newCapacity); newHash->entries = reinterpret_cast(details::align_for(raw + sizeof(ImplicitProducerHash))); for (size_t i = 0; i != newCapacity; ++i) { new (newHash->entries + i) ImplicitProducerKVP; newHash->entries[i].key.store(details::invalid_thread_id, std::memory_order_relaxed); } newHash->prev = mainHash; implicitProducerHash.store(newHash, std::memory_order_release); implicitProducerHashResizeInProgress.clear(std::memory_order_release); mainHash = newHash; } else { implicitProducerHashResizeInProgress.clear(std::memory_order_release); } } // If it's < three-quarters full, add to the old one anyway so that we don't have to wait for the next table // to finish being allocated by another thread (and if we just finished allocating above, the condition will // always be true) if (newCount < (mainHash->capacity >> 1) + (mainHash->capacity >> 2)) { auto producer = static_cast(recycle_or_create_producer(false)); if (producer == nullptr) { implicitProducerHashCount.fetch_sub(1, std::memory_order_relaxed); return nullptr; } #ifdef MOODYCAMEL_CPP11_THREAD_LOCAL_SUPPORTED producer->threadExitListener.callback = &ConcurrentQueue::implicit_producer_thread_exited_callback; producer->threadExitListener.userData = producer; details::ThreadExitNotifier::subscribe(&producer->threadExitListener); #endif auto index = hashedId; while (true) { index &= mainHash->capacity - 1u; auto empty = details::invalid_thread_id; #ifdef MOODYCAMEL_CPP11_THREAD_LOCAL_SUPPORTED auto reusable = details::invalid_thread_id2; if (mainHash->entries[index].key.compare_exchange_strong(reusable, id, std::memory_order_seq_cst, std::memory_order_relaxed)) { implicitProducerHashCount.fetch_sub(1, std::memory_order_relaxed); // already counted as a used slot mainHash->entries[index].value = producer; break; } #endif if (mainHash->entries[index].key.compare_exchange_strong(empty, id, std::memory_order_seq_cst, std::memory_order_relaxed)) { mainHash->entries[index].value = producer; break; } ++index; } return producer; } // Hmm, the old hash is quite full and somebody else is busy allocating a new one. // We need to wait for the allocating thread to finish (if it succeeds, we add, if not, // we try to allocate ourselves). mainHash = implicitProducerHash.load(std::memory_order_acquire); } } #ifdef MOODYCAMEL_CPP11_THREAD_LOCAL_SUPPORTED void implicit_producer_thread_exited(ImplicitProducer* producer) { // Remove from hash #ifdef MCDBGQ_NOLOCKFREE_IMPLICITPRODHASH debug::DebugLock lock(implicitProdMutex); #endif auto hash = implicitProducerHash.load(std::memory_order_acquire); assert(hash != nullptr); // The thread exit listener is only registered if we were added to a hash in the first place auto id = details::thread_id(); auto hashedId = details::hash_thread_id(id); details::thread_id_t probedKey; // We need to traverse all the hashes just in case other threads aren't on the current one yet and are // trying to add an entry thinking there's a free slot (because they reused a producer) for (; hash != nullptr; hash = hash->prev) { auto index = hashedId; do { index &= hash->capacity - 1u; probedKey = id; if (hash->entries[index].key.compare_exchange_strong(probedKey, details::invalid_thread_id2, std::memory_order_seq_cst, std::memory_order_relaxed)) { break; } ++index; } while (probedKey != details::invalid_thread_id); // Can happen if the hash has changed but we weren't put back in it yet, or if we weren't added to this hash in the first place } // Mark the queue as being recyclable producer->inactive.store(true, std::memory_order_release); } static void implicit_producer_thread_exited_callback(void* userData) { auto producer = static_cast(userData); auto queue = producer->parent; queue->implicit_producer_thread_exited(producer); } #endif ////////////////////////////////// // Utility functions ////////////////////////////////// template static inline void* aligned_malloc(size_t size) { MOODYCAMEL_CONSTEXPR_IF (std::alignment_of::value <= std::alignment_of::value) return (Traits::malloc)(size); else { size_t alignment = std::alignment_of::value; void* raw = (Traits::malloc)(size + alignment - 1 + sizeof(void*)); if (!raw) return nullptr; char* ptr = details::align_for(reinterpret_cast(raw) + sizeof(void*)); *(reinterpret_cast(ptr) - 1) = raw; return ptr; } } template static inline void aligned_free(void* ptr) { MOODYCAMEL_CONSTEXPR_IF (std::alignment_of::value <= std::alignment_of::value) return (Traits::free)(ptr); else (Traits::free)(ptr ? *(reinterpret_cast(ptr) - 1) : nullptr); } template static inline U* create_array(size_t count) { assert(count > 0); U* p = static_cast(aligned_malloc(sizeof(U) * count)); if (p == nullptr) return nullptr; for (size_t i = 0; i != count; ++i) new (p + i) U(); return p; } template static inline void destroy_array(U* p, size_t count) { if (p != nullptr) { assert(count > 0); for (size_t i = count; i != 0; ) (p + --i)->~U(); } aligned_free(p); } template static inline U* create() { void* p = aligned_malloc(sizeof(U)); return p != nullptr ? new (p) U : nullptr; } template static inline U* create(A1&& a1) { void* p = aligned_malloc(sizeof(U)); return p != nullptr ? new (p) U(std::forward(a1)) : nullptr; } template static inline void destroy(U* p) { if (p != nullptr) p->~U(); aligned_free(p); } private: std::atomic producerListTail; std::atomic producerCount; std::atomic initialBlockPoolIndex; Block* initialBlockPool; size_t initialBlockPoolSize; #ifndef MCDBGQ_USEDEBUGFREELIST FreeList freeList; #else debug::DebugFreeList freeList; #endif std::atomic implicitProducerHash; std::atomic implicitProducerHashCount; // Number of slots logically used ImplicitProducerHash initialImplicitProducerHash; std::array initialImplicitProducerHashEntries; std::atomic_flag implicitProducerHashResizeInProgress; std::atomic nextExplicitConsumerId; std::atomic globalExplicitConsumerOffset; #ifdef MCDBGQ_NOLOCKFREE_IMPLICITPRODHASH debug::DebugMutex implicitProdMutex; #endif #ifdef MOODYCAMEL_QUEUE_INTERNAL_DEBUG std::atomic explicitProducers; std::atomic implicitProducers; #endif }; template ProducerToken::ProducerToken(ConcurrentQueue& queue) : producer(queue.recycle_or_create_producer(true)) { if (producer != nullptr) { producer->token = this; } } template ProducerToken::ProducerToken(BlockingConcurrentQueue& queue) : producer(reinterpret_cast*>(&queue)->recycle_or_create_producer(true)) { if (producer != nullptr) { producer->token = this; } } template ConsumerToken::ConsumerToken(ConcurrentQueue& queue) : itemsConsumedFromCurrent(0), currentProducer(nullptr), desiredProducer(nullptr) { initialOffset = queue.nextExplicitConsumerId.fetch_add(1, std::memory_order_release); lastKnownGlobalOffset = static_cast(-1); } template ConsumerToken::ConsumerToken(BlockingConcurrentQueue& queue) : itemsConsumedFromCurrent(0), currentProducer(nullptr), desiredProducer(nullptr) { initialOffset = reinterpret_cast*>(&queue)->nextExplicitConsumerId.fetch_add(1, std::memory_order_release); lastKnownGlobalOffset = static_cast(-1); } template inline void swap(ConcurrentQueue& a, ConcurrentQueue& b) MOODYCAMEL_NOEXCEPT { a.swap(b); } inline void swap(ProducerToken& a, ProducerToken& b) MOODYCAMEL_NOEXCEPT { a.swap(b); } inline void swap(ConsumerToken& a, ConsumerToken& b) MOODYCAMEL_NOEXCEPT { a.swap(b); } template inline void swap(typename ConcurrentQueue::ImplicitProducerKVP& a, typename ConcurrentQueue::ImplicitProducerKVP& b) MOODYCAMEL_NOEXCEPT { a.swap(b); } } #if defined(_MSC_VER) && (!defined(_HAS_CXX17) || !_HAS_CXX17) #pragma warning(pop) #endif #if defined(__GNUC__) && !defined(__INTEL_COMPILER) #pragma GCC diagnostic pop #endif ================================================ FILE: concurrentqueueConfig.cmake.in ================================================ @PACKAGE_INIT@ include(${CMAKE_CURRENT_LIST_DIR}/@PROJECT_NAME@Targets.cmake) ================================================ FILE: internal/concurrentqueue_internal_debug.h ================================================ #pragma once //#define MCDBGQ_TRACKMEM 1 //#define MCDBGQ_NOLOCKFREE_FREELIST 1 //#define MCDBGQ_USEDEBUGFREELIST 1 //#define MCDBGQ_NOLOCKFREE_IMPLICITPRODBLOCKINDEX 1 //#define MCDBGQ_NOLOCKFREE_IMPLICITPRODHASH 1 #if defined(_WIN32) || defined(__WINDOWS__) || defined(__WIN32__) #define WIN32_LEAN_AND_MEAN #include namespace moodycamel { namespace debug { struct DebugMutex { DebugMutex() { InitializeCriticalSectionAndSpinCount(&cs, 0x400); } ~DebugMutex() { DeleteCriticalSection(&cs); } void lock() { EnterCriticalSection(&cs); } void unlock() { LeaveCriticalSection(&cs); } private: CRITICAL_SECTION cs; }; } } #else #include namespace moodycamel { namespace debug { struct DebugMutex { void lock() { m.lock(); } void unlock() { m.unlock(); } private: std::mutex m; }; } } #define #endif namespace moodycamel { namespace debug { struct DebugLock { explicit DebugLock(DebugMutex& mutex) : mutex(mutex) { mutex.lock(); } ~DebugLock() { mutex.unlock(); } private: DebugMutex& mutex; }; template struct DebugFreeList { DebugFreeList() : head(nullptr) { } DebugFreeList(DebugFreeList&& other) : head(other.head) { other.head = nullptr; } void swap(DebugFreeList& other) { std::swap(head, other.head); } inline void add(N* node) { DebugLock lock(mutex); node->freeListNext = head; head = node; } inline N* try_get() { DebugLock lock(mutex); if (head == nullptr) { return nullptr; } auto prevHead = head; head = head->freeListNext; return prevHead; } N* head_unsafe() const { return head; } private: N* head; DebugMutex mutex; }; } } ================================================ FILE: lightweightsemaphore.h ================================================ // Provides an efficient implementation of a semaphore (LightweightSemaphore). // This is an extension of Jeff Preshing's sempahore implementation (licensed // under the terms of its separate zlib license) that has been adapted and // extended by Cameron Desrochers. #pragma once #include #include // assert #include // For EINTR #include // For std::size_t #include // For std::uint64_t #include // For clock_gettime #include // For std::make_signed #if defined(_WIN32) // Avoid including windows.h in a header; we only need a handful of // items, so we'll redeclare them here (this is relatively safe since // the API generally has to remain stable between Windows versions). // I know this is an ugly hack but it still beats polluting the global // namespace with thousands of generic names or adding a .cpp for nothing. extern "C" { struct _SECURITY_ATTRIBUTES; __declspec(dllimport) void* __stdcall CreateSemaphoreW(_SECURITY_ATTRIBUTES* lpSemaphoreAttributes, long lInitialCount, long lMaximumCount, const wchar_t* lpName); __declspec(dllimport) int __stdcall CloseHandle(void* hObject); __declspec(dllimport) unsigned long __stdcall WaitForSingleObject(void* hHandle, unsigned long dwMilliseconds); __declspec(dllimport) int __stdcall ReleaseSemaphore(void* hSemaphore, long lReleaseCount, long* lpPreviousCount); } #elif defined(__MACH__) #include #elif defined(__MVS__) #include #elif defined(__unix__) #include #if defined(__GLIBC_PREREQ) && defined(_GNU_SOURCE) #if __GLIBC_PREREQ(2,30) #define MOODYCAMEL_LIGHTWEIGHTSEMAPHORE_MONOTONIC #endif #endif #endif #ifndef MOODYCAMEL_DELETE_FUNCTION #if __cplusplus >= 201103L || _MSC_VER >= 1900 #define MOODYCAMEL_DELETE_FUNCTION = delete #else #define MOODYCAMEL_DELETE_FUNCTION #endif #endif namespace moodycamel { namespace details { // Code in the mpmc_sema namespace below is an adaptation of Jeff Preshing's // portable + lightweight semaphore implementations, originally from // https://github.com/preshing/cpp11-on-multicore/blob/master/common/sema.h // LICENSE: // Copyright (c) 2015 Jeff Preshing // // This software is provided 'as-is', without any express or implied // warranty. In no event will the authors be held liable for any damages // arising from the use of this software. // // Permission is granted to anyone to use this software for any purpose, // including commercial applications, and to alter it and redistribute it // freely, subject to the following restrictions: // // 1. The origin of this software must not be misrepresented; you must not // claim that you wrote the original software. If you use this software // in a product, an acknowledgement in the product documentation would be // appreciated but is not required. // 2. Altered source versions must be plainly marked as such, and must not be // misrepresented as being the original software. // 3. This notice may not be removed or altered from any source distribution. #if defined(_WIN32) class Semaphore { private: void* m_hSema; Semaphore(const Semaphore& other) MOODYCAMEL_DELETE_FUNCTION; Semaphore& operator=(const Semaphore& other) MOODYCAMEL_DELETE_FUNCTION; public: Semaphore(int initialCount = 0) { assert(initialCount >= 0); const long maxLong = 0x7fffffff; m_hSema = CreateSemaphoreW(nullptr, initialCount, maxLong, nullptr); assert(m_hSema); } ~Semaphore() { CloseHandle(m_hSema); } bool wait() { const unsigned long infinite = 0xffffffff; return WaitForSingleObject(m_hSema, infinite) == 0; } bool try_wait() { return WaitForSingleObject(m_hSema, 0) == 0; } bool timed_wait(std::uint64_t usecs) { return WaitForSingleObject(m_hSema, (unsigned long)(usecs / 1000)) == 0; } void signal(int count = 1) { while (!ReleaseSemaphore(m_hSema, count, nullptr)); } }; #elif defined(__MACH__) //--------------------------------------------------------- // Semaphore (Apple iOS and OSX) // Can't use POSIX semaphores due to http://lists.apple.com/archives/darwin-kernel/2009/Apr/msg00010.html //--------------------------------------------------------- class Semaphore { private: semaphore_t m_sema; Semaphore(const Semaphore& other) MOODYCAMEL_DELETE_FUNCTION; Semaphore& operator=(const Semaphore& other) MOODYCAMEL_DELETE_FUNCTION; public: Semaphore(int initialCount = 0) { assert(initialCount >= 0); kern_return_t rc = semaphore_create(mach_task_self(), &m_sema, SYNC_POLICY_FIFO, initialCount); assert(rc == KERN_SUCCESS); (void)rc; } ~Semaphore() { semaphore_destroy(mach_task_self(), m_sema); } bool wait() { return semaphore_wait(m_sema) == KERN_SUCCESS; } bool try_wait() { return timed_wait(0); } bool timed_wait(std::uint64_t timeout_usecs) { mach_timespec_t ts; ts.tv_sec = static_cast(timeout_usecs / 1000000); ts.tv_nsec = static_cast((timeout_usecs % 1000000) * 1000); // added in OSX 10.10: https://developer.apple.com/library/prerelease/mac/documentation/General/Reference/APIDiffsMacOSX10_10SeedDiff/modules/Darwin.html kern_return_t rc = semaphore_timedwait(m_sema, ts); return rc == KERN_SUCCESS; } void signal() { while (semaphore_signal(m_sema) != KERN_SUCCESS); } void signal(int count) { while (count-- > 0) { while (semaphore_signal(m_sema) != KERN_SUCCESS); } } }; #elif defined(__unix__) || defined(__MVS__) //--------------------------------------------------------- // Semaphore (POSIX, Linux, zOS) //--------------------------------------------------------- class Semaphore { private: sem_t m_sema; Semaphore(const Semaphore& other) MOODYCAMEL_DELETE_FUNCTION; Semaphore& operator=(const Semaphore& other) MOODYCAMEL_DELETE_FUNCTION; public: Semaphore(int initialCount = 0) { assert(initialCount >= 0); int rc = sem_init(&m_sema, 0, static_cast(initialCount)); assert(rc == 0); (void)rc; } ~Semaphore() { sem_destroy(&m_sema); } bool wait() { // http://stackoverflow.com/questions/2013181/gdb-causes-sem-wait-to-fail-with-eintr-error int rc; do { rc = sem_wait(&m_sema); } while (rc == -1 && errno == EINTR); return rc == 0; } bool try_wait() { int rc; do { rc = sem_trywait(&m_sema); } while (rc == -1 && errno == EINTR); return rc == 0; } bool timed_wait(std::uint64_t usecs) { struct timespec ts; const int usecs_in_1_sec = 1000000; const int nsecs_in_1_sec = 1000000000; #ifdef MOODYCAMEL_LIGHTWEIGHTSEMAPHORE_MONOTONIC clock_gettime(CLOCK_MONOTONIC, &ts); #else clock_gettime(CLOCK_REALTIME, &ts); #endif ts.tv_sec += (time_t)(usecs / usecs_in_1_sec); ts.tv_nsec += (long)(usecs % usecs_in_1_sec) * 1000; // sem_timedwait bombs if you have more than 1e9 in tv_nsec // so we have to clean things up before passing it in if (ts.tv_nsec >= nsecs_in_1_sec) { ts.tv_nsec -= nsecs_in_1_sec; ++ts.tv_sec; } int rc; do { #ifdef MOODYCAMEL_LIGHTWEIGHTSEMAPHORE_MONOTONIC rc = sem_clockwait(&m_sema, CLOCK_MONOTONIC, &ts); #else rc = sem_timedwait(&m_sema, &ts); #endif } while (rc == -1 && errno == EINTR); return rc == 0; } void signal() { while (sem_post(&m_sema) == -1); } void signal(int count) { while (count-- > 0) { while (sem_post(&m_sema) == -1); } } }; #else #error Unsupported platform! (No semaphore wrapper available) #endif } // end namespace details //--------------------------------------------------------- // LightweightSemaphore //--------------------------------------------------------- class LightweightSemaphore { public: typedef std::make_signed::type ssize_t; private: std::atomic m_count; details::Semaphore m_sema; int m_maxSpins; bool waitWithPartialSpinning(std::int64_t timeout_usecs = -1) { ssize_t oldCount; int spin = m_maxSpins; while (--spin >= 0) { oldCount = m_count.load(std::memory_order_relaxed); if ((oldCount > 0) && m_count.compare_exchange_strong(oldCount, oldCount - 1, std::memory_order_acquire, std::memory_order_relaxed)) return true; std::atomic_signal_fence(std::memory_order_acquire); // Prevent the compiler from collapsing the loop. } oldCount = m_count.fetch_sub(1, std::memory_order_acquire); if (oldCount > 0) return true; if (timeout_usecs < 0) { if (m_sema.wait()) return true; } if (timeout_usecs > 0 && m_sema.timed_wait((std::uint64_t)timeout_usecs)) return true; // At this point, we've timed out waiting for the semaphore, but the // count is still decremented indicating we may still be waiting on // it. So we have to re-adjust the count, but only if the semaphore // wasn't signaled enough times for us too since then. If it was, we // need to release the semaphore too. while (true) { oldCount = m_count.load(std::memory_order_acquire); if (oldCount >= 0 && m_sema.try_wait()) return true; if (oldCount < 0 && m_count.compare_exchange_strong(oldCount, oldCount + 1, std::memory_order_relaxed, std::memory_order_relaxed)) return false; } } ssize_t waitManyWithPartialSpinning(ssize_t max, std::int64_t timeout_usecs = -1) { assert(max > 0); ssize_t oldCount; int spin = m_maxSpins; while (--spin >= 0) { oldCount = m_count.load(std::memory_order_relaxed); if (oldCount > 0) { ssize_t newCount = oldCount > max ? oldCount - max : 0; if (m_count.compare_exchange_strong(oldCount, newCount, std::memory_order_acquire, std::memory_order_relaxed)) return oldCount - newCount; } std::atomic_signal_fence(std::memory_order_acquire); } oldCount = m_count.fetch_sub(1, std::memory_order_acquire); if (oldCount <= 0) { if ((timeout_usecs == 0) || (timeout_usecs < 0 && !m_sema.wait()) || (timeout_usecs > 0 && !m_sema.timed_wait((std::uint64_t)timeout_usecs))) { while (true) { oldCount = m_count.load(std::memory_order_acquire); if (oldCount >= 0 && m_sema.try_wait()) break; if (oldCount < 0 && m_count.compare_exchange_strong(oldCount, oldCount + 1, std::memory_order_relaxed, std::memory_order_relaxed)) return 0; } } } if (max > 1) return 1 + tryWaitMany(max - 1); return 1; } public: LightweightSemaphore(ssize_t initialCount = 0, int maxSpins = 10000) : m_count(initialCount), m_maxSpins(maxSpins) { assert(initialCount >= 0); assert(maxSpins >= 0); } bool tryWait() { ssize_t oldCount = m_count.load(std::memory_order_relaxed); while (oldCount > 0) { if (m_count.compare_exchange_weak(oldCount, oldCount - 1, std::memory_order_acquire, std::memory_order_relaxed)) return true; } return false; } bool wait() { return tryWait() || waitWithPartialSpinning(); } bool wait(std::int64_t timeout_usecs) { return tryWait() || waitWithPartialSpinning(timeout_usecs); } // Acquires between 0 and (greedily) max, inclusive ssize_t tryWaitMany(ssize_t max) { assert(max >= 0); ssize_t oldCount = m_count.load(std::memory_order_relaxed); while (oldCount > 0) { ssize_t newCount = oldCount > max ? oldCount - max : 0; if (m_count.compare_exchange_weak(oldCount, newCount, std::memory_order_acquire, std::memory_order_relaxed)) return oldCount - newCount; } return 0; } // Acquires at least one, and (greedily) at most max ssize_t waitMany(ssize_t max, std::int64_t timeout_usecs) { assert(max >= 0); ssize_t result = tryWaitMany(max); if (result == 0 && max > 0) result = waitManyWithPartialSpinning(max, timeout_usecs); return result; } ssize_t waitMany(ssize_t max) { ssize_t result = waitMany(max, -1); assert(result > 0); return result; } void signal(ssize_t count = 1) { assert(count >= 0); ssize_t oldCount = m_count.fetch_add(count, std::memory_order_release); ssize_t toRelease = -oldCount < count ? -oldCount : count; if (toRelease > 0) { m_sema.signal((int)toRelease); } } std::size_t availableApprox() const { ssize_t count = m_count.load(std::memory_order_relaxed); return count > 0 ? static_cast(count) : 0; } }; } // end namespace moodycamel ================================================ FILE: samples.md ================================================ # Samples for moodycamel::ConcurrentQueue Here are some example usage scenarios with sample code. Note that most use the simplest version of each available method for demonstration purposes, but they can all be adapted to use tokens and/or the corresponding bulk methods for extra speed. ## Hello queue ```C++ ConcurrentQueue q; for (int i = 0; i != 123; ++i) q.enqueue(i); int item; for (int i = 0; i != 123; ++i) { q.try_dequeue(item); assert(item == i); } ``` ## Hello concurrency Basic example of how to use the queue from multiple threads, with no particular goal (i.e. it does nothing, but in an instructive way). ```C++ ConcurrentQueue q; int dequeued[100] = { 0 }; std::thread threads[20]; // Producers for (int i = 0; i != 10; ++i) { threads[i] = std::thread([&](int i) { for (int j = 0; j != 10; ++j) { q.enqueue(i * 10 + j); } }, i); } // Consumers for (int i = 10; i != 20; ++i) { threads[i] = std::thread([&]() { int item; for (int j = 0; j != 20; ++j) { if (q.try_dequeue(item)) { ++dequeued[item]; } } }); } // Wait for all threads for (int i = 0; i != 20; ++i) { threads[i].join(); } // Collect any leftovers (could be some if e.g. consumers finish before producers) int item; while (q.try_dequeue(item)) { ++dequeued[item]; } // Make sure everything went in and came back out! for (int i = 0; i != 100; ++i) { assert(dequeued[i] == 1); } ``` ## Bulk up Same as previous example, but runs faster. ```C++ ConcurrentQueue q; int dequeued[100] = { 0 }; std::thread threads[20]; // Producers for (int i = 0; i != 10; ++i) { threads[i] = std::thread([&](int i) { int items[10]; for (int j = 0; j != 10; ++j) { items[j] = i * 10 + j; } q.enqueue_bulk(items, 10); }, i); } // Consumers for (int i = 10; i != 20; ++i) { threads[i] = std::thread([&]() { int items[20]; for (std::size_t count = q.try_dequeue_bulk(items, 20); count != 0; --count) { ++dequeued[items[count - 1]]; } }); } // Wait for all threads for (int i = 0; i != 20; ++i) { threads[i].join(); } // Collect any leftovers (could be some if e.g. consumers finish before producers) int items[10]; std::size_t count; while ((count = q.try_dequeue_bulk(items, 10)) != 0) { for (std::size_t i = 0; i != count; ++i) { ++dequeued[items[i]]; } } // Make sure everything went in and came back out! for (int i = 0; i != 100; ++i) { assert(dequeued[i] == 1); } ``` ## Producer/consumer model (simultaneous) In this model, one set of threads is producing items, and the other is consuming them concurrently until all of them have been consumed. The counters are required to ensure that all items eventually get consumed. ```C++ ConcurrentQueue q; const int ProducerCount = 8; const int ConsumerCount = 8; std::thread producers[ProducerCount]; std::thread consumers[ConsumerCount]; std::atomic doneProducers(0); std::atomic doneConsumers(0); for (int i = 0; i != ProducerCount; ++i) { producers[i] = std::thread([&]() { while (produce) { q.enqueue(produceItem()); } doneProducers.fetch_add(1, std::memory_order_release); }); } for (int i = 0; i != ConsumerCount; ++i) { consumers[i] = std::thread([&]() { Item item; bool itemsLeft; do { // It's important to fence (if the producers have finished) *before* dequeueing itemsLeft = doneProducers.load(std::memory_order_acquire) != ProducerCount; while (q.try_dequeue(item)) { itemsLeft = true; consumeItem(item); } } while (itemsLeft || doneConsumers.fetch_add(1, std::memory_order_acq_rel) + 1 == ConsumerCount); // The condition above is a bit tricky, but it's necessary to ensure that the // last consumer sees the memory effects of all the other consumers before it // calls try_dequeue for the last time }); } for (int i = 0; i != ProducerCount; ++i) { producers[i].join(); } for (int i = 0; i != ConsumerCount; ++i) { consumers[i].join(); } ``` ## Producer/consumer model (simultaneous, blocking) The blocking version is different, since either the number of elements being produced needs to be known ahead of time, or some other coordination is required to tell the consumers when to stop calling wait_dequeue (not shown here). This is necessary because otherwise a consumer could end up blocking forever -- and destroying a queue while a consumer is blocking on it leads to undefined behaviour. ```C++ BlockingConcurrentQueue q; const int ProducerCount = 8; const int ConsumerCount = 8; std::thread producers[ProducerCount]; std::thread consumers[ConsumerCount]; std::atomic promisedElementsRemaining(ProducerCount * 1000); for (int i = 0; i != ProducerCount; ++i) { producers[i] = std::thread([&]() { for (int j = 0; j != 1000; ++j) { q.enqueue(produceItem()); } }); } for (int i = 0; i != ConsumerCount; ++i) { consumers[i] = std::thread([&]() { Item item; while (promisedElementsRemaining.fetch_sub(1, std::memory_order_relaxed) > 0) { q.wait_dequeue(item); consumeItem(item); } }); } for (int i = 0; i != ProducerCount; ++i) { producers[i].join(); } for (int i = 0; i != ConsumerCount; ++i) { consumers[i].join(); } ``` ## Producer/consumer model (separate stages) ```C++ ConcurrentQueue q; // Production stage std::thread threads[8]; for (int i = 0; i != 8; ++i) { threads[i] = std::thread([&]() { while (produce) { q.enqueue(produceItem()); } }); } for (int i = 0; i != 8; ++i) { threads[i].join(); } // Consumption stage std::atomic doneConsumers(0); for (int i = 0; i != 8; ++i) { threads[i] = std::thread([&]() { Item item; do { while (q.try_dequeue(item)) { consumeItem(item); } // Loop again one last time if we're the last producer (with the acquired // memory effects of the other producers): } while (doneConsumers.fetch_add(1, std::memory_order_acq_rel) + 1 == 8); }); } for (int i = 0; i != 8; ++i) { threads[i].join(); } ``` Note that there's no point trying to use the blocking queue with this model, since there's no need to use the `wait` methods (all the elements are produced before any are consumed), and hence the complexity would be the same but with additional overhead. ## Object pool If you don't know what threads will be using the queue in advance, you can't really declare any long-term tokens. The obvious solution is to use the implicit methods (that don't take any tokens): ```C++ // A pool of 'Something' objects that can be safely accessed // from any thread class SomethingPool { public: Something getSomething() { Something obj; queue.try_dequeue(obj); // If the dequeue succeeded, obj will be an object from the // thread pool, otherwise it will be the default-constructed // object as declared above return obj; } void recycleSomething(Something&& obj) { queue.enqueue(std::move(obj)); } }; ``` ## Threadpool task queue ```C++ BlockingConcurrentQueue q; // To create a task from any thread: q.enqueue(...); // On threadpool threads: Task task; while (true) { q.wait_dequeue(task); // Process task... } ``` ## Multithreaded game loop ```C++ BlockingConcurrentQueue q; std::atomic pendingTasks(0); // On threadpool threads: Task task; while (true) { q.wait_dequeue(task); // Process task... pendingTasks.fetch_add(-1, std::memory_order_release); } // Whenever a new task needs to be processed for the frame: pendingTasks.fetch_add(1, std::memory_order_release); q.enqueue(...); // To wait for all the frame's tasks to complete before rendering: while (pendingTasks.load(std::memory_order_acquire) != 0) continue; // Alternatively you could help out the thread pool while waiting: while (pendingTasks.load(std::memory_order_acquire) != 0) { if (!q.try_dequeue(task)) { continue; } // Process task... pendingTasks.fetch_add(-1, std::memory_order_release); } ``` ## Pump until empty This might be useful if, for example, you want to process any remaining items in the queue before it's destroyed. Note that it is your responsibility to ensure that the memory effects of any enqueue operations you wish to see on the dequeue thread are visible (i.e. if you're waiting for a certain set of elements, you need to use memory fences to ensure that those elements are visible to the dequeue thread after they've been enqueued). ```C++ ConcurrentQueue q; // Single-threaded pumping: Item item; while (q.try_dequeue(item)) { // Process item... } // q is guaranteed to be empty here, unless there is another thread enqueueing still or // there was another thread dequeueing at one point and its memory effects have not // yet been propagated to this thread. // Multi-threaded pumping: std::thread threads[8]; std::atomic doneConsumers(0); for (int i = 0; i != 8; ++i) { threads[i] = std::thread([&]() { Item item; do { while (q.try_dequeue(item)) { // Process item... } } while (doneConsumers.fetch_add(1, std::memory_order_acq_rel) + 1 == 8); // If there are still enqueue operations happening on other threads, // then the queue may not be empty at this point. However, if all enqueue // operations completed before we finished pumping (and the propagation of // their memory effects too), and all dequeue operations apart from those // our threads did above completed before we finished pumping (and the // propagation of their memory effects too), then the queue is guaranteed // to be empty at this point. }); } for (int i = 0; i != 8; ++i) { threads[i].join(); } ``` ## Wait for a queue to become empty (without dequeueing) You can't (robustly) :-) However, you can set up your own atomic counter and poll that instead (see the game loop example). If you're satisfied with merely an estimate, you can use `size_approx()`. Note that `size_approx()` may return 0 even if the queue is not completely empty, unless the queue has already stabilized first (no threads are enqueueing or dequeueing, and all memory effects of any previous operations have been propagated to the thread before it calls `size_approx()`). ================================================ FILE: tests/CDSChecker/README.txt ================================================ These tests require CDSChecker to be checked out into a subdirectory named 'model-checker'. CDSChecker can be obtained from: git://demsky.eecs.uci.edu/model-checker.git The version last used for testing was: da671f78d0aa057272bb82f580b36a188b6331bd ================================================ FILE: tests/CDSChecker/corealgo.h ================================================ // ©2013 Cameron Desrochers // Provides the core enqueue/dequeue algorithm of moodycamel::ConcurrentQueue // for testing with CDSChecker (a C++11 memory model checking tool). // See http://demsky.eecs.uci.edu/c11modelchecker.html for more info. #pragma once #include "model-checker/include/atomic" #include "model-checker/include/librace.h" #include "model-checker/include/model-assert.h" #ifndef CHAR_BIT #define CHAR_BIT 8 #endif typedef unsigned int index_t; static std::atomic headIndex; static std::atomic tailIndex; static std::atomic dequeueOvercommit; static std::atomic dequeueOptimisticCount; static const unsigned int BLOCK_SIZE = 256; static int block[BLOCK_SIZE]; static void init() { headIndex.store(0, std::memory_order_relaxed); tailIndex.store(0, std::memory_order_relaxed); dequeueOvercommit.store(0, std::memory_order_relaxed); dequeueOptimisticCount.store(0, std::memory_order_relaxed); } template static inline bool circular_less_than(T a, T b) { return static_cast(a - b) > static_cast(static_cast(1) << static_cast(sizeof(T) * CHAR_BIT - 1)); } static void enqueue(int element) { index_t currentTailIndex = tailIndex.load(std::memory_order_relaxed); index_t newTailIndex = 1 + currentTailIndex; store_32(&block[currentTailIndex & (BLOCK_SIZE - 1)], element); tailIndex.store(newTailIndex, std::memory_order_release); } static bool try_dequeue(int& element) { auto tail = tailIndex.load(std::memory_order_relaxed); auto overcommit = dequeueOvercommit.load(std::memory_order_relaxed); if (circular_less_than(dequeueOptimisticCount.load(std::memory_order_relaxed) - overcommit, tail)) { // Might be something to dequeue, let's give it a try // Note that this if is purely for performance purposes in the common case when the queue is // empty and the values are eventually consistent -- we may enter here spuriously. // Note that whatever the values of overcommit and tail are, they are not going to change (unless we // change them) and must be the same value at this point (inside the if) as when the if condition was // evaluated. // We insert an acquire fence here to synchronize-with the release upon incrementing dequeueOvercommit below. // This ensures that whatever the value we got loaded into overcommit, the load of dequeueOptisticCount in // the fetch_add below will result in a value at least as recent as that (and therefore at least as large). // Note that I believe a compiler (signal) fence here would be sufficient due to the nature of fetch_add (all // read-modify-write operations are guaranteed to work on the latest value in the modification order), but // unfortunately that can't be shown to be correct using only the C++11 standard. // See http://stackoverflow.com/questions/18223161/what-are-the-c11-memory-ordering-guarantees-in-this-corner-case std::atomic_thread_fence(std::memory_order_acquire); // Increment optimistic counter, then check if it went over the boundary auto myDequeueCount = dequeueOptimisticCount.fetch_add(1, std::memory_order_relaxed); // Note that since dequeueOvercommit must be <= dequeueOptimisticCount (because dequeueOvercommit is only ever // incremented after dequeueOptimisticCount -- this is enforced in the `else` block below), and since we now // have a version of dequeueOptimisticCount that is at least as recent as overcommit (due to the release upon // incrementing dequeueOvercommit and the acquire above that synchronizes with it), overcommit <= myDequeueCount. MODEL_ASSERT(overcommit <= myDequeueCount); // Note that we reload tail here in case it changed; it will be the same value as before or greater, since // this load is sequenced after (happens after) the earlier load above. This is supported by read-read // coherance (as defined in the standard), explained here: http://en.cppreference.com/w/cpp/atomic/memory_order auto newTail = tailIndex.load(std::memory_order_acquire); MODEL_ASSERT(newTail >= tail); tail = newTail; if (circular_less_than(myDequeueCount - overcommit, tail)) { // Guaranteed to be at least one element to dequeue! // Get the index. Note that since there's guaranteed to be at least one element, this // will never exceed the true value of tail (but may exceed the value we read above). auto index = headIndex.fetch_add(1, std::memory_order_acq_rel); // Dequeue element = load_32(&block[index & (BLOCK_SIZE - 1)]); return true; } else { // Wasn't anything to dequeue after all; make the effective dequeue count eventually consistent dequeueOvercommit.fetch_add(1, std::memory_order_release); // Release so that the fetch_add on dequeueOptimisticCount is guaranteed to happen before this write } } return false; } static int size_approx() { auto tail = tailIndex.load(std::memory_order_relaxed); auto head = headIndex.load(std::memory_order_relaxed); return circular_less_than(head, tail) ? static_cast(tail - head) : 0; } ================================================ FILE: tests/CDSChecker/enqueue_dequeue_many.cpp ================================================ // ©2013 Cameron Desrochers. // Distributed under the simplified BSD license (see the LICENSE file that // should have come with this file). #include "model-checker/include/threads.h" #include "corealgo.h" void consumer(void* param) { int id = *(int*)param; int& dequeueCount = *(int*)param; dequeueCount = 0; int last = 0; int element; bool success = try_dequeue(element); if (success) { MODEL_ASSERT(element > last); last = element; ++dequeueCount; } success = try_dequeue(element); if (success) { MODEL_ASSERT(element > last); last = element; ++dequeueCount; } } void producer(void* param) { for (int i = 1; i <= 8; ++i) enqueue(i); consumer(param); } int user_main(int, char**) { init(); // Start out as thread IDs, but are re-used by the threads // to indicate the number of elements each one dequeued int w = 1, x = 2, y = 3, z = 4; thrd_t a, b, c, d; thrd_create(&a, &producer, &w); thrd_create(&b, &consumer, &x); thrd_create(&c, &consumer, &y); thrd_create(&d, &consumer, &z); thrd_join(a); thrd_join(b); thrd_join(c); thrd_join(d); MODEL_ASSERT(w + x + y + z + size_approx() == 8); return 0; } ================================================ FILE: tests/CDSChecker/enqueue_dequeue_one.cpp ================================================ // ©2013 Cameron Desrochers. // Distributed under the simplified BSD license (see the LICENSE file that // should have come with this file). #include "model-checker/include/threads.h" #include "corealgo.h" void producer_thread(void*) { enqueue(1234); } void consumer_thread(void*) { int element; bool result = try_dequeue(element); MODEL_ASSERT(!result || element == 1234); if (result) { MODEL_ASSERT(!try_dequeue(element)); } } int user_main(int, char**) { init(); thrd_t p, c; thrd_create(&p, &producer_thread, nullptr); thrd_create(&c, &consumer_thread, nullptr); thrd_join(p); thrd_join(c); return 0; } ================================================ FILE: tests/CDSChecker/makefile ================================================ default: enqueue_dequeue_one.o enqueue_dequeue_many.o enqueue_dequeue_one.o: CDSChecker makefile enqueue_dequeue_many.cpp enqueue_dequeue_one.cpp corealgo.h g++ -std=c++11 -DNDEBUG -O3 enqueue_dequeue_one.cpp -o enqueue_dequeue_one.o -Lmodel-checker -lmodel enqueue_dequeue_many.o: CDSChecker makefile enqueue_dequeue_many.cpp corealgo.h g++ -std=c++11 -DNDEBUG -O3 enqueue_dequeue_many.cpp -o enqueue_dequeue_many.o -Lmodel-checker -lmodel CDSChecker: $(MAKE) -C model-checker run: enqueue_dequeue_one.o enqueue_dequeue_many.o cd model-checker && ./run.sh ../enqueue_dequeue_one.o > ../enqueue_dequeue_one.log cd model-checker && ./run.sh ../enqueue_dequeue_many.o > ../enqueue_dequeue_many.log ================================================ FILE: tests/common/simplethread.cpp ================================================ // ©2013 Cameron Desrochers #include "simplethread.h" #if defined(_WIN32) #define WIN32_LEAN_AND_MEAN #include struct SimpleThread::ThreadRef { HANDLE handle; static DWORD WINAPI ThreadProc(LPVOID param) { auto threadRef = static_cast(param); threadRef->callbackFunc(threadRef->callbackObj); return 0; } ThreadRef(void* callbackObj, CallbackFunc callbackFunc) : callbackObj(callbackObj), callbackFunc(callbackFunc) { } void* callbackObj; CallbackFunc callbackFunc; }; void SimpleThread::startThread(void* callbackObj, CallbackFunc callbackFunc) { thread = new ThreadRef(callbackObj, callbackFunc); thread->handle = CreateThread(NULL, StackSize, &ThreadRef::ThreadProc, thread, 0, NULL); } void SimpleThread::join() { if (thread != nullptr && thread->handle != NULL) { WaitForSingleObject(thread->handle, INFINITE); CloseHandle(thread->handle); thread->handle = NULL; } } #else #include struct SimpleThread::ThreadRef { std::thread thread; static void threadProc(ThreadRef* threadRef) { threadRef->callbackFunc(threadRef->callbackObj); } ThreadRef(void* callbackObj, CallbackFunc callbackFunc) : callbackObj(callbackObj), callbackFunc(callbackFunc) { } void* callbackObj; CallbackFunc callbackFunc; }; void SimpleThread::startThread(void* callbackObj, CallbackFunc callbackFunc) { thread = new ThreadRef(callbackObj, callbackFunc); thread->thread = std::thread(&ThreadRef::threadProc, thread); } void SimpleThread::join() { if (thread != nullptr && thread->thread.joinable()) { thread->thread.join(); } } #endif SimpleThread::~SimpleThread() { if (thread != nullptr) { join(); delete thread; } } ================================================ FILE: tests/common/simplethread.h ================================================ // ©2013 Cameron Desrochers #pragma once // Like C++11's std::thread, but with a reduced API, and works on Windows with MSVC2010+. // Wraps std::thread on other OSes. Perhaps the most significant departure between // std::thread and this mini-library is that join() is called implicitly in the destructor, // if the thread is joinable. The thread callback functions should not throw exceptions. #include #include namespace details { template struct ArgWrapper { typename std::remove_reference::type arg1; typename std::remove_reference::type arg2; typename std::remove_reference::type arg3; ArgWrapper(ArgWrapper const& o) : arg1(o.arg1), arg2(o.arg2), arg3(o.arg3) { } ArgWrapper(ArgWrapper&& o) : arg1(std::move(o.arg1)), arg2(std::move(o.arg2)), arg3(std::move(o.arg3)) { } template ArgWrapper(T&& a1, U&& a2, V&& a3) : arg1(std::forward(a1)), arg2(std::forward(a2)), arg3(std::forward(a3)) { } template void callCallback(TCallback&& callback) const { std::forward(callback)(std::move(arg1), std::move(arg2), std::move(arg3)); } }; template struct ArgWrapper { typename std::remove_reference::type arg1; typename std::remove_reference::type arg2; ArgWrapper(ArgWrapper const& o) : arg1(o.arg1), arg2(o.arg2) { } ArgWrapper(ArgWrapper&& o) : arg1(std::move(o.arg1)), arg2(std::move(o.arg2)) { } template ArgWrapper(T&& a1, U&& a2) : arg1(std::forward(a1)), arg2(std::forward(a2)) { } template void callCallback(TCallback&& callback) const { std::forward(callback)(std::move(arg1), std::move(arg2)); } }; template struct ArgWrapper { typename std::remove_reference::type arg1; ArgWrapper(ArgWrapper const& o) : arg1(o.arg1) { } ArgWrapper(ArgWrapper&& o) : arg1(std::move(o.arg1)) { } template ArgWrapper(T&& a1) : arg1(std::forward(a1)) { } template void callCallback(TCallback&& callback) const { std::forward(callback)(std::move(arg1)); } }; template<> struct ArgWrapper { template void callCallback(TCallback&& callback) const { std::forward(callback)(); } }; } class SimpleThread { private: struct ThreadRef; template struct CallbackWrapper { template CallbackWrapper(TCallback&& callback, U&& args) : callback(std::forward(callback)), args(std::forward(args)) { } static void callAndDelete(void* wrapper) { auto typedWrapper = static_cast(wrapper); typedWrapper->args.callCallback(std::move(typedWrapper->callback)); delete typedWrapper; } typename std::decay::type callback; TArgs args; }; typedef void (*CallbackFunc)(void*); void startThread(void* callbackObj, CallbackFunc callbackFunc); public: static const int StackSize = 4 * 1024; // bytes SimpleThread() : thread(nullptr) { } SimpleThread(SimpleThread&& other) : thread(other.thread) { other.thread = nullptr; } SimpleThread& operator=(SimpleThread&& other) { thread = other.thread; other.thread = nullptr; return *this; } // Disable copying and copy-assignment private: SimpleThread(SimpleThread const&); SimpleThread& operator=(SimpleThread const&); public: template explicit SimpleThread(TCallback&& callback) { auto wrapper = new CallbackWrapper>( std::forward(callback), ::details::ArgWrapper<>() ); startThread(wrapper, &CallbackWrapper>::callAndDelete); } template explicit SimpleThread(TCallback&& callback, TArg1&& arg1) { auto wrapper = new CallbackWrapper>( std::forward(callback), ::details::ArgWrapper(std::forward(arg1)) ); startThread(wrapper, &CallbackWrapper>::callAndDelete); } template explicit SimpleThread(TCallback&& callback, TArg1&& arg1, TArg2&& arg2) { auto wrapper = new CallbackWrapper>( std::forward(callback), ::details::ArgWrapper(std::forward(arg1), std::forward(arg2)) ); startThread(wrapper, &CallbackWrapper>::callAndDelete); } template explicit SimpleThread(TCallback&& callback, TArg1&& arg1, TArg2&& arg2, TArg3&& arg3) { auto wrapper = new CallbackWrapper>( std::forward(callback), ::details::ArgWrapper(std::forward(arg1), std::forward(arg2), std::forward(arg3)) ); startThread(wrapper, &CallbackWrapper>::callAndDelete); } ~SimpleThread(); void join(); private: ThreadRef* thread; }; ================================================ FILE: tests/common/systemtime.cpp ================================================ // ©2013-2014 Cameron Desrochers #include "systemtime.h" #include #if defined(_MSC_VER) && _MSC_VER < 1700 #include #define CompilerMemBar() _ReadWriteBarrier() #else #include #define CompilerMemBar() std::atomic_signal_fence(std::memory_order_seq_cst) #endif #if defined(ST_WINDOWS) #include namespace moodycamel { void sleep(int milliseconds) { ::Sleep(milliseconds); } SystemTime getSystemTime() { LARGE_INTEGER t; CompilerMemBar(); if (!QueryPerformanceCounter(&t)) { return static_cast(-1); } CompilerMemBar(); return static_cast(t.QuadPart); } double getTimeDelta(SystemTime start) { LARGE_INTEGER t; CompilerMemBar(); if (start == static_cast(-1) || !QueryPerformanceCounter(&t)) { return -1; } CompilerMemBar(); auto now = static_cast(t.QuadPart); LARGE_INTEGER f; if (!QueryPerformanceFrequency(&f)) { return -1; } #if defined(__GNUC__) #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif return static_cast(static_cast<__int64>(now - start)) / f.QuadPart * 1000; #if defined(__GNUC__) #pragma GCC diagnostic pop #endif } } // end namespace moodycamel #elif defined(ST_APPLE) #include #include #include #include namespace moodycamel { void sleep(int milliseconds) { ::usleep(milliseconds * 1000); } SystemTime getSystemTime() { CompilerMemBar(); std::uint64_t result = mach_absolute_time(); CompilerMemBar(); return result; } double getTimeDelta(SystemTime start) { CompilerMemBar(); std::uint64_t end = mach_absolute_time(); CompilerMemBar(); mach_timebase_info_data_t tb = { 0 }; mach_timebase_info(&tb); double toNano = static_cast(tb.numer) / tb.denom; return static_cast(end - start) * toNano * 0.000001; } } // end namespace moodycamel #elif defined(ST_NIX) #include namespace moodycamel { void sleep(int milliseconds) { ::usleep(milliseconds * 1000); } SystemTime getSystemTime() { timespec t; CompilerMemBar(); if (clock_gettime(CLOCK_MONOTONIC_RAW, &t) != 0) { t.tv_sec = (time_t)-1; t.tv_nsec = -1; } CompilerMemBar(); return t; } double getTimeDelta(SystemTime start) { timespec t; CompilerMemBar(); if ((start.tv_sec == (time_t)-1 && start.tv_nsec == -1) || clock_gettime(CLOCK_MONOTONIC_RAW, &t) != 0) { return -1; } CompilerMemBar(); return static_cast(static_cast(t.tv_sec) - static_cast(start.tv_sec)) * 1000 + double(t.tv_nsec - start.tv_nsec) / 1000000; } } // end namespace moodycamel #endif ================================================ FILE: tests/common/systemtime.h ================================================ // ©2013-2014 Cameron Desrochers #pragma once #if defined(_WIN32) #define ST_WINDOWS #elif defined(__APPLE__) && defined(__MACH__) #define ST_APPLE #elif defined(__linux__) || defined(__FreeBSD__) || defined(BSD) #define ST_NIX #else #error "Unknown platform" #endif #if defined(ST_WINDOWS) namespace moodycamel { typedef unsigned long long SystemTime; } #elif defined(ST_APPLE) #include namespace moodycamel { typedef std::uint64_t SystemTime; } #elif defined(ST_NIX) #include namespace moodycamel { typedef timespec SystemTime; } #endif namespace moodycamel { void sleep(int milliseconds); SystemTime getSystemTime(); // Returns the delta time, in milliseconds double getTimeDelta(SystemTime start); } ================================================ FILE: tests/corealgos.h ================================================ // ©2014 Cameron Desrochers // moodycamel::ConcurrentQueue contains many inner data structures which // are difficult to test in isolation. So, this file contains copies of // them, extracted and isolated so as to be independently testable. #pragma once #include #include #include #include #include #include #include // Define corealgos_allocator before including this header in order to override the // default malloc/free functions #ifndef corealgos_allocator struct corealgos_allocator { static inline void* malloc(std::size_t size) { return std::malloc(size); } static inline void free(void* ptr) { std::free(ptr); } }; #endif //////////////////////////////////////////////////////////////////////////////// // Lock-free add-only list (e.g. used to track producers) //////////////////////////////////////////////////////////////////////////////// namespace moodycamel { namespace corealgos { struct ListItem { ListItem() : concurrentListPrev(nullptr) { } public: std::atomic concurrentListPrev; }; template // T should inherit ListItem or implement the same interface struct ConcurrentAddOnlyList { ConcurrentAddOnlyList() : tail_(nullptr) { } inline T* tail() { return tail_.load(std::memory_order_acquire); } void add(T* element) { assert(element != nullptr); // Add it to the lock-free list auto prevTail = tail_.load(std::memory_order_relaxed); do { element->concurrentListPrev = prevTail; } while (!tail_.compare_exchange_weak(prevTail, element, std::memory_order_release, std::memory_order_relaxed)); } private: std::atomic tail_; }; } } //////////////////////////////////////////////////////////////////////////////// // Thread local hash map //////////////////////////////////////////////////////////////////////////////// #if defined(__APPLE__) #include "TargetConditionals.h" // Needed for TARGET_OS_IPHONE #endif // Platform-specific definitions of a numeric thread ID type and an invalid value #if defined(_WIN32) || defined(__WINDOWS__) || defined(__WIN32__) // No sense pulling in windows.h in a header, we'll manually declare the function // we use and rely on backwards-compatibility for this not to break extern "C" __declspec(dllimport) unsigned long __stdcall GetCurrentThreadId(void); namespace moodycamel { namespace corealgos { namespace details { static_assert(sizeof(unsigned long) == sizeof(std::uint32_t), "Expected size of unsigned long to be 32 bits on Windows"); typedef std::uint32_t thread_id_t; static const thread_id_t invalid_thread_id = 0; // See http://blogs.msdn.com/b/oldnewthing/archive/2004/02/23/78395.aspx static inline thread_id_t thread_id() { return static_cast(::GetCurrentThreadId()); } } } } #elif defined(__arm__) || defined(_M_ARM) || defined(__aarch64__) || (defined(__APPLE__) && TARGET_OS_IPHONE) namespace moodycamel { namespace corealgos { namespace details { typedef std::uintptr_t thread_id_t; static const thread_id_t invalid_thread_id = 0; static inline thread_id_t thread_id() { return std::hash()(std::this_thread::get_id()); } } } } #else // Use a nice trick from this answer: http://stackoverflow.com/a/8438730/21475 // In order to get a numeric thread ID in a platform-independent way, we use a thread-local // static variable's address as a thread identifier :-) #if defined(__GNUC__) || defined(__INTEL_COMPILER) #define MOODYCAMEL_COREALGO_THREADLOCAL __thread #elif defined(_MSC_VER) #define MOODYCAMEL_COREALGO_THREADLOCAL __declspec(thread) #else // Assume C++11 compliant compiler #define MOODYCAMEL_COREALGO_THREADLOCAL thread_local #endif namespace moodycamel { namespace corealgos { namespace details { typedef std::uintptr_t thread_id_t; static const thread_id_t invalid_thread_id = 0; // Address can't be nullptr static inline thread_id_t thread_id() { static MOODYCAMEL_COREALGO_THREADLOCAL int x; return reinterpret_cast(&x); } } } } #endif namespace moodycamel { namespace corealgos { namespace details { template struct _hash_32_or_64 { static inline std::size_t hash(std::uint32_t h) { // MurmurHash3 finalizer -- see https://code.google.com/p/smhasher/source/browse/trunk/MurmurHash3.cpp // Since the thread ID is already unique, all we really want to do is propagate that // uniqueness evenly across all the bits, so that we can use a subset of the bits while // reducing collisions significantly h ^= h >> 16; h *= 0x85ebca6b; h ^= h >> 13; h *= 0xc2b2ae35; return static_cast(h ^ (h >> 16)); } }; template<> struct _hash_32_or_64<1> { static inline std::size_t hash(std::uint64_t h) { h ^= h >> 33; h *= 0xff51afd7ed558ccd; h ^= h >> 33; h *= 0xc4ceb9fe1a85ec53; return static_cast(h ^ (h >> 33)); } }; template struct hash_32_or_64 : public _hash_32_or_64<(size > 4)> { }; static inline std::size_t hash_thread_id(thread_id_t id) { static_assert(sizeof(thread_id_t) <= 8, "Expected a platform where thread IDs are at most 64-bit values"); return hash_32_or_64::hash(id); } template static inline char* align_for(char* ptr) { const std::size_t alignment = std::alignment_of::value; return ptr + (alignment - (reinterpret_cast(ptr) % alignment)) % alignment; } } template // T should inherit ListItem or implement the same interface struct ThreadLocal { explicit ThreadLocal(std::size_t initialHashSize) : initialHashEntries(initialHashSize) { assert(initialHashSize > 0 && (initialHashSize & (initialHashSize - 1)) == 0); resizeInProgress.clear(); currentHashCount.store(0, std::memory_order_relaxed); auto hash = &initialHash; hash->capacity = initialHashSize; hash->entries = &initialHashEntries[0]; for (std::size_t i = 0; i != initialHashSize; ++i) { initialHashEntries[i].key.store(details::invalid_thread_id, std::memory_order_relaxed); } hash->prev = nullptr; currentHash.store(hash, std::memory_order_relaxed); } ~ThreadLocal() { // Destroy items auto ptr = items.tail(); while (ptr != nullptr) { auto prev = static_cast(ptr->concurrentListPrev.load(std::memory_order_relaxed)); ptr->~T(); corealgos_allocator::free(ptr); ptr = prev; } // Destroy hash tables auto hash = currentHash.load(std::memory_order_relaxed); while (hash != nullptr) { auto prev = hash->prev; if (prev != nullptr) { // The last hash is part of this object and was not allocated dynamically for (std::size_t i = 0; i != hash->capacity; ++i) { hash->entries[i].~KeyValuePair(); } hash->~InnerHash(); corealgos_allocator::free(hash); } hash = prev; } } // Only fails (returns nullptr) if memory allocation fails T* get_or_create() { // Note that since the data is essentially thread-local (key is thread ID), // there's a reduced need for fences (memory ordering is already consistent // for any individual thread), except for the current table itself // Start by looking for the thread ID in the current and all previous hash tables. // If it's not found, it must not be in there yet, since this same thread would // have added it previously to one of the tables that we traversed. // Code and algorithm adapted from http://preshing.com/20130605/the-worlds-simplest-lock-free-hash-table auto id = details::thread_id(); auto hashedId = details::hash_thread_id(id); auto mainHash = currentHash.load(std::memory_order_acquire); for (auto hash = mainHash; hash != nullptr; hash = hash->prev) { // Look for the id in this hash auto index = hashedId; while (true) { // Not an infinite loop because at least one slot is free in the hash table index &= hash->capacity - 1; auto probedKey = hash->entries[index].key.load(std::memory_order_relaxed); if (probedKey == id) { // Found it! If we had to search several hashes deep, though, we should lazily add it // to the current main hash table to avoid the extended search next time. // Note there's guaranteed to be room in the current hash table since every subsequent // table implicitly reserves space for all previous tables (there's only one // currentHashCount). auto value = hash->entries[index].value; if (hash != mainHash) { index = hashedId; while (true) { index &= mainHash->capacity - 1; probedKey = mainHash->entries[index].key.load(std::memory_order_relaxed); auto expected = details::invalid_thread_id; if (probedKey == expected && mainHash->entries[index].key.compare_exchange_strong(expected, id, std::memory_order_relaxed)) { mainHash->entries[index].value = value; break; } ++index; } } return value; } if (probedKey == details::invalid_thread_id) { break; // Not in this hash table } ++index; } } // Insert! auto newCount = 1 + currentHashCount.fetch_add(1, std::memory_order_relaxed); while (true) { if (newCount >= (mainHash->capacity >> 1) && !resizeInProgress.test_and_set(std::memory_order_acquire)) { // We've acquired the resize lock, try to allocate a bigger hash table. // Note the acquire fence synchronizes with the release fence at the end of this block, and hence when // we reload currentHash it must be the most recent version (it only gets changed within this // locked block). mainHash = currentHash.load(std::memory_order_acquire); auto newCapacity = mainHash->capacity << 1; while (newCount >= (newCapacity >> 1)) { newCapacity <<= 1; } auto raw = static_cast(corealgos_allocator::malloc(sizeof(InnerHash) + std::alignment_of::value - 1 + sizeof(KeyValuePair) * newCapacity)); if (raw == nullptr) { // Allocation failed currentHashCount.fetch_add((uint32_t)-1, std::memory_order_relaxed); resizeInProgress.clear(std::memory_order_relaxed); return nullptr; } auto newHash = new (raw) InnerHash; newHash->capacity = newCapacity; newHash->entries = reinterpret_cast(details::align_for(raw + sizeof(InnerHash))); for (std::size_t i = 0; i != newCapacity; ++i) { new (newHash->entries + i) KeyValuePair; newHash->entries[i].key.store(details::invalid_thread_id, std::memory_order_relaxed); } newHash->prev = mainHash; currentHash.store(newHash, std::memory_order_release); resizeInProgress.clear(std::memory_order_release); mainHash = newHash; } // If it's < three-quarters full, add to the old one anyway so that we don't have to wait for the next table // to finish being allocated by another thread (and if we just finished allocating above, the condition will // always be true) if (newCount < (mainHash->capacity >> 1) + (mainHash->capacity >> 2)) { auto element = (T*)corealgos_allocator::malloc(sizeof(T)); if (element == nullptr) { return nullptr; } new (element) T(); items.add(element); // Track items so they can be destructed later auto index = hashedId; while (true) { index &= mainHash->capacity - 1; auto probedKey = mainHash->entries[index].key.load(std::memory_order_relaxed); auto expected = details::invalid_thread_id; if (probedKey == expected && mainHash->entries[index].key.compare_exchange_strong(expected, id, std::memory_order_relaxed)) { mainHash->entries[index].value = element; break; } ++index; } return element; } // Hmm, the old hash is quite full and somebody else is busy allocating a new one. // We need to wait for the allocating thread to finish (if it succeeds, we add, if not, // we try to allocate ourselves). mainHash = currentHash.load(std::memory_order_acquire); } } private: struct KeyValuePair { std::atomic key; T* value; // No need for atomicity since it's only read by the thread that sets it in the first place KeyValuePair() { } KeyValuePair(KeyValuePair const& other) : key(other.key.load()), value(other.value) { } KeyValuePair& operator=(KeyValuePair const& other) { key.store(other.key.load()); value = other.value; return *this; } }; struct InnerHash { std::size_t capacity; KeyValuePair* entries; InnerHash* prev; }; std::atomic_flag resizeInProgress; std::atomic currentHash; std::atomic currentHashCount; // Number of slots logically used InnerHash initialHash; std::vector initialHashEntries; ConcurrentAddOnlyList items; }; //////////////////////////////////////////////////////////////////////////////// // Lock-free free list //////////////////////////////////////////////////////////////////////////////// template struct FreeListNode { FreeListNode() : freeListRefs(0), freeListNext(nullptr) { } std::atomic freeListRefs; std::atomic freeListNext; FreeListNode(FreeListNode const& other) : freeListRefs(other.freeListRefs.load()), freeListNext(other.freeListNext.load()) { } FreeListNode& operator=(FreeListNode const& other) { freeListRefs.store(other.freeListRefs.load()); freeListNext.store(other.freeListNext.load()); return *this; } }; // A simple CAS-based lock-free free list. Not the fastest thing in the world under heavy contention, // but simple and correct (assuming nodes are never freed until after the free list is destroyed), // and fairly speedy under low contention. template // N must inherit FreeListNode or have the same fields (and initialization) struct FreeList { FreeList() : freeListHead(nullptr) { } inline void add(N* node) { // We know that the should-be-on-freelist bit is 0 at this point, so it's safe to // set it using a fetch_add if (node->freeListRefs.fetch_add(SHOULD_BE_ON_FREELIST, std::memory_order_acq_rel) == 0) { // Oh look! We were the last ones referencing this node, and we know // we want to add it to the free list, so let's do it! add_knowing_refcount_is_zero(node); } } inline N* try_get() { auto head = freeListHead.load(std::memory_order_acquire); while (head != nullptr) { auto prevHead = head; auto refs = head->freeListRefs.load(std::memory_order_relaxed); if ((refs & REFS_MASK) == 0 || !head->freeListRefs.compare_exchange_strong(refs, refs + 1, std::memory_order_acquire, std::memory_order_relaxed)) { head = freeListHead.load(std::memory_order_acquire); continue; } // Good, reference count has been incremented (it wasn't at zero), which means // we can read the next and not worry about it changing between now and the time // we do the CAS auto next = head->freeListNext.load(std::memory_order_relaxed); if (freeListHead.compare_exchange_strong(head, next, std::memory_order_acquire, std::memory_order_relaxed)) { // Yay, got the node. This means it was on the list, which means // shouldBeOnFreeList must be false no matter the refcount (because // nobody else knows it's been taken off yet, it can't have been put back on). assert((head->freeListRefs.load(std::memory_order_relaxed) & SHOULD_BE_ON_FREELIST) == 0); // Decrease refcount twice, once for our ref, and once for the list's ref head->freeListRefs.fetch_add(-2u, std::memory_order_release); return head; } // OK, the head must have changed on us, but we still need to decrease the refcount we // increased. // Note that we don't need to release any memory effects, but we do need to ensure that the reference // count decrement happens-after the CAS on the head. refs = prevHead->freeListRefs.fetch_add(-1u, std::memory_order_acq_rel); if (refs == SHOULD_BE_ON_FREELIST + 1) { add_knowing_refcount_is_zero(prevHead); } } return nullptr; } // Useful for traversing the list when there's no contention (e.g. to destroy remaining nodes) N* head_unsafe() const { return freeListHead.load(std::memory_order_relaxed); } private: inline void add_knowing_refcount_is_zero(N* node) { // Since the refcount is zero, and nobody can increase it once it's zero (except us, and we // run only one copy of this method per node at a time, i.e. the single thread case), then we // know we can safely change the next pointer of the node; however, once the refcount is back // above zero, then other threads could increase it (happens under heavy contention, when the // refcount goes to zero in between a load and a refcount increment of a node in try_get, then // back up to something non-zero, then the refcount increment is done by the other thread) -- // so, if the CAS to add the node to the actual list fails, decrease the refcount and leave // the add operation to the next thread who puts the refcount back at zero (which could be us, // hence the loop). auto head = freeListHead.load(std::memory_order_relaxed); while (true) { node->freeListNext.store(head, std::memory_order_relaxed); node->freeListRefs.store(1, std::memory_order_release); if (!freeListHead.compare_exchange_strong(head, node, std::memory_order_release, std::memory_order_relaxed)) { // Hmm, the add failed, but we can only try again when the refcount goes back to zero if (node->freeListRefs.fetch_add(SHOULD_BE_ON_FREELIST - 1, std::memory_order_release) == 1) { continue; } } return; } } private: static const std::uint32_t REFS_MASK = 0x7FFFFFFF; static const std::uint32_t SHOULD_BE_ON_FREELIST = 0x80000000; // Implemented like a stack, but where node order doesn't matter (nodes are // inserted out of order under contention) std::atomic freeListHead; }; //////////////////////////////////////////////////////////////////////////////// // Lock-free (single-producer, multi-consumer) numeric-key hash map of sorts; // there are many conditions that must be met, i.e. items have to be inserted // in increasing order by key (wrap-around is OK), and items cannot be searched // for or removed unless they are known to be in the map in the first place. //////////////////////////////////////////////////////////////////////////////// template struct SPMCSequentialHashMap { explicit SPMCSequentialHashMap(std::size_t initialSize) : nextCapacity(initialSize), index(nullptr) { new_index(); } ~SPMCSequentialHashMap() { auto ptr = index.load(std::memory_order_relaxed); if (ptr != nullptr) { for (std::size_t i = 0; i != ptr->capacity; ++i) { ptr->index[i]->~IndexEntry(); } do { auto prev = ptr->prev; ptr->~IndexHeader(); corealgos_allocator::free(ptr); ptr = prev; } while (ptr != nullptr); } } // Not thread safe. Only call from single producer thread. // Note: key must *not* be in hash already, and must be exactly // one larger than the previously inserted key value. void insert(std::uint64_t key, TValue* value) { IndexEntry* idxEntry; insert_index_entry(idxEntry, key); idxEntry->value.store(value, std::memory_order_release); } // Thread-safe, but if somebody can remove the key while find() is // in progress, then any returned value is not guaranteed to correspond // to that key. This also applies if the key was not already present but // once was. Elements can be found in any order. TValue* find(std::uint64_t key) { auto idxEntry = get_entry_for_key(key); if (idxEntry == nullptr) return nullptr; return idxEntry->value.load(std::memory_order_acquire); } // Thread-safe, but if somebody else can remove the same key while remove() // is in progress, then any removed value is not guaranteed to correspond // to that key This also applies if the key was not already present but // once was. Elements can be removed in an order. TValue* remove(std::uint64_t key) { auto idxEntry = get_entry_for_key(key); if (idxEntry == nullptr) return nullptr; TValue* val = nullptr; while (!idxEntry->value.compare_exchange_weak(val, nullptr, std::memory_order_acquire, std::memory_order_relaxed)) continue; return val; } private: struct IndexEntry { std::atomic key; std::atomic value; }; struct IndexHeader { std::size_t capacity; std::atomic tail; IndexEntry* entries; IndexEntry** index; IndexHeader* prev; }; inline void insert_index_entry(IndexEntry*& idxEntry, std::uint64_t key) { auto localIndex = index.load(std::memory_order_relaxed); // We're the only writer thread, relaxed is OK auto newTail = (localIndex->tail.load(std::memory_order_relaxed) + 1) & (localIndex->capacity - 1); idxEntry = localIndex->index[newTail]; if (idxEntry->key.load(std::memory_order_relaxed) == INVALID_KEY || idxEntry->value.load(std::memory_order_relaxed) == nullptr) { idxEntry->key.store(key, std::memory_order_relaxed); localIndex->tail.store(newTail, std::memory_order_release); return; } // No room in the old index, try to allocate another one! new_index(); localIndex = index.load(std::memory_order_relaxed); newTail = (localIndex->tail.load(std::memory_order_relaxed) + 1) & (localIndex->capacity - 1); idxEntry = localIndex->index[newTail]; assert(idxEntry->key.load(std::memory_order_relaxed) == INVALID_KEY); idxEntry->key.store(key, std::memory_order_relaxed); localIndex->tail.store(newTail, std::memory_order_release); } inline IndexEntry* get_entry_for_key(std::uint64_t key) const { auto localIndex = index.load(std::memory_order_acquire); auto tail = localIndex->tail.load(std::memory_order_acquire); auto tailBase = localIndex->index[tail]->key.load(std::memory_order_relaxed); if (tailBase == INVALID_KEY) { return nullptr; } auto offset = static_cast(key - tailBase); std::size_t idx = (tail + offset) & (localIndex->capacity - 1); auto entry = localIndex->index[idx]; return entry->key.load(std::memory_order_relaxed) == key ? entry : nullptr; } bool new_index() { auto prev = index.load(std::memory_order_relaxed); std::size_t prevCapacity = prev == nullptr ? 0 : prev->capacity; auto entryCount = prev == nullptr ? nextCapacity : prevCapacity; auto raw = static_cast(corealgos_allocator::malloc( sizeof(IndexHeader) + std::alignment_of::value - 1 + sizeof(IndexEntry) * entryCount + std::alignment_of::value - 1 + sizeof(IndexEntry*) * nextCapacity)); if (raw == nullptr) { return false; } auto header = new (raw) IndexHeader; auto entries = reinterpret_cast(details::align_for(raw + sizeof(IndexHeader))); auto idx = reinterpret_cast(details::align_for(reinterpret_cast(entries) + sizeof(IndexEntry) * entryCount)); if (prev != nullptr) { auto prevTail = prev->tail.load(std::memory_order_relaxed); auto prevPos = prevTail; std::size_t i = 0; do { prevPos = (prevPos + 1) & (prev->capacity - 1); idx[i++] = prev->index[prevPos]; } while (prevPos != prevTail); assert(i == prevCapacity); } for (std::size_t i = 0; i != entryCount; ++i) { new (entries + i) IndexEntry; entries[i].key.store(INVALID_KEY, std::memory_order_relaxed); entries[i].value.store(nullptr, std::memory_order_relaxed); idx[prevCapacity + i] = entries + i; } header->prev = prev; header->entries = entries; header->index = idx; header->capacity = nextCapacity; header->tail.store((prevCapacity - 1) & (nextCapacity - 1), std::memory_order_relaxed); index.store(header, std::memory_order_release); nextCapacity <<= 1; return true; } private: std::size_t nextCapacity; std::atomic index; static const std::uint64_t INVALID_KEY = ~(std::uint64_t)0; }; } } ================================================ FILE: tests/fuzztests/fuzztests.cpp ================================================ // ©2013-2014 Cameron Desrochers. // Distributed under the simplified BSD license (see the LICENSE file that // should have come with this file). // Fuzz (random) tests for moodycamel::ConcurrentQueue #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #ifdef _WIN32 #define WIN32_LEAN_AND_MEAN #ifndef NOMINMAX #define NOMINMAX #endif #include #endif #include "../../concurrentqueue.h" #include "../common/simplethread.h" #include "../common/systemtime.h" #include "../corealgos.h" void failHook() { (void)1; // Attach debuggers here } #define _STR(x) #x #define STR(x) _STR(x) #define ASSERT_OR_FAIL_THREAD(cond) if (!(cond)) { const char* n = nullptr; failReason.compare_exchange_strong(n, "assertion failed on line " STR(__LINE__) ": " #cond, std::memory_order_relaxed, std::memory_order_relaxed); \ failed.store(true, std::memory_order_relaxed); failHook(); return; } #define FAIL_IF_THREAD_TIMEOUT() if (getTimeDelta(startTime) > 60000) { const char* n = nullptr; failReason.compare_exchange_strong(n, "test timed out (detected on line " STR(__LINE__) ")", std::memory_order_relaxed, std::memory_order_relaxed); \ failed.store(true, std::memory_order_relaxed); failHook(); return; } #define ASSERT_OR_FAIL(cond) if (!(cond)) { out_failReason = "assertion failed on line " STR(__LINE__) ": " #cond; result = false; failHook(); break; } using namespace moodycamel; typedef std::minstd_rand RNG_t; enum test_type { multithread_produce, multithread_consume, multithread_produce_and_consume, completely_random, // Core algo tests core_add_only_list, core_thread_local, TEST_TYPE_COUNT }; std::uint64_t test_count[TEST_TYPE_COUNT] = { 0 }; std::uint64_t fail_count[TEST_TYPE_COUNT] = { 0 }; const char* test_names[TEST_TYPE_COUNT] = { "multithread_produce", "multithread_consume", "multithread_produce_and_consume", "completely_random", "core_add_only_list", "core_thread_local", }; const int SINGLE_SEED_ITERATIONS = 100; const char* LOG_FILE = "fuzztests.log"; struct FuzzTraits : public ConcurrentQueueDefaultTraits { static const size_t BLOCK_SIZE = 8; static const size_t EXPLICIT_INITIAL_INDEX_SIZE = 4; static const size_t IMPLICIT_INITIAL_INDEX_SIZE = 4; static const size_t INITIAL_IMPLCICIT_PRODUCER_HASH_SIZE = 1; static const std::uint32_t EXPLICIT_CONSUMER_CONSUMPTION_QUOTA_BEFORE_ROTATE = 24; }; struct TestListItem : corealgos::ListItem { int value; TestListItem() : value(0) { } explicit TestListItem(int value) : value(value) { } inline TestListItem* prev(std::memory_order order = std::memory_order_relaxed) const { return static_cast(concurrentListPrev.load(order)); } }; bool run_test(uint64_t seed, int iterations, test_type& out_type, const char*& out_failReason) { bool result = true; RNG_t baseRng((unsigned int)seed); std::uniform_int_distribution randTest(0, TEST_TYPE_COUNT - 1); std::uniform_int_distribution randInitialSize(0, 70); auto type = static_cast(randTest(baseRng)); out_type = type; for (int iteration = 0; iteration != iterations; ++iteration) { RNG_t rng(baseRng); std::atomic failed(false); std::atomic failReason; failReason = nullptr; SystemTime startTime = getSystemTime(); switch (type) { case multithread_produce: { const int countIncrement = std::uniform_int_distribution(1, 1000)(rng); int count = std::uniform_int_distribution(0, 500)(rng) * countIncrement; int prodCount = std::uniform_int_distribution(0, 6)(rng); bool useConsumerToken = static_cast(std::uniform_int_distribution(0, 1)(rng)); ConcurrentQueue q(randInitialSize(rng)); std::vector producers(prodCount); std::vector useProducerToken(prodCount); for (int i = 0; i != prodCount; ++i) { useProducerToken[i] = static_cast(std::uniform_int_distribution(0, 1)(rng)); producers[i] = SimpleThread([&](int i) { ProducerToken t(q); for (int j = 0; j != count && !failed.load(std::memory_order_relaxed); j += countIncrement) { if (useProducerToken[i]) { for (int k = 0; k != countIncrement; ++k) { ASSERT_OR_FAIL_THREAD(q.enqueue(t, (i << 24) | (k + j))); } } else { for (int k = 0; k != countIncrement; ++k) { ASSERT_OR_FAIL_THREAD(q.enqueue((i << 24) | (k + j))); } } FAIL_IF_THREAD_TIMEOUT(); } }, i); } SimpleThread consumer([&]() { int item; std::vector lastItems(prodCount); ConsumerToken t(q); for (int i = 0; i != prodCount; ++i) { lastItems[i] = -1; } for (int i = 0; i != count * prodCount && !failed.load(std::memory_order_relaxed);) { if (useConsumerToken) { for (int j = 0; j != 10000; ++j) { if (q.try_dequeue(t, item)) { ++i; ASSERT_OR_FAIL_THREAD((item & 0xFFFFFF) < count); ASSERT_OR_FAIL_THREAD((item & 0xFFFFFF) == lastItems[item >> 24] + 1); lastItems[item >> 24] = (item & 0xFFFFFF); } } } else { for (int j = 0; j != 10000; ++j) { if (q.try_dequeue(item)) { ++i; ASSERT_OR_FAIL_THREAD((item & 0xFFFFFF) < count); ASSERT_OR_FAIL_THREAD((item & 0xFFFFFF) == lastItems[item >> 24] + 1); lastItems[item >> 24] = (item & 0xFFFFFF); } } } FAIL_IF_THREAD_TIMEOUT(); } }); for (int i = 0; i != prodCount; ++i) { producers[i].join(); } consumer.join(); if (failed.load(std::memory_order_relaxed)) { break; } int item; ASSERT_OR_FAIL(!q.try_dequeue(item)); break; } case multithread_consume: { const int countIncrement = std::uniform_int_distribution(1, 1000)(rng); int count = std::uniform_int_distribution(0, 500)(rng) * countIncrement; int consCount = std::uniform_int_distribution(0, 6)(rng); bool useProducerToken = static_cast(std::uniform_int_distribution(0, 1)(rng)); std::atomic producerDone(false); ConcurrentQueue q(randInitialSize(rng)); std::vector consumers(consCount); std::vector useConsumerToken(consCount); for (int i = 0; i != consCount; ++i) { useConsumerToken[i] = static_cast(std::uniform_int_distribution(0, 1)(rng)); consumers[i] = SimpleThread([&](int i) { int item, lastItem = -1; ConsumerToken t(q); bool doneConsuming = false; while (!doneConsuming && !failed.load(std::memory_order_relaxed)) { auto producerDoneLocal = producerDone.load(std::memory_order_acquire); if (useConsumerToken[i]) { for (int j = 0; j != 10000; ++j) { if (q.try_dequeue(t, item)) { ASSERT_OR_FAIL_THREAD(item >= 0 && item < count * consCount && item > lastItem); lastItem = item; } else if (producerDoneLocal) { doneConsuming = true; break; } } } else { for (int j = 0; j != 10000; ++j) { if (q.try_dequeue(item)) { ASSERT_OR_FAIL_THREAD(item >= 0 && item < count * consCount && item > lastItem); lastItem = item; } else if (producerDoneLocal) { doneConsuming = true; break; } } } FAIL_IF_THREAD_TIMEOUT(); } }, i); } SimpleThread producer([&]() { ProducerToken t(q); for (int i = 0; i != count * consCount && !failed.load(std::memory_order_relaxed); i += countIncrement) { if (useProducerToken) { for (int j = 0; j != countIncrement; ++j) { ASSERT_OR_FAIL_THREAD(q.enqueue(t, i + j)); } } else { for (int j = 0; j != countIncrement; ++j) { ASSERT_OR_FAIL_THREAD(q.enqueue(i + j)); } } FAIL_IF_THREAD_TIMEOUT(); } producerDone.store(true, std::memory_order_release); }); producer.join(); for (int i = 0; i != consCount; ++i) { consumers[i].join(); } if (failed.load(std::memory_order_relaxed)) { break; } int item; ASSERT_OR_FAIL(consCount == 0 || !q.try_dequeue(item)); break; } case multithread_produce_and_consume: { const int countIncrement = std::uniform_int_distribution(1, 1000)(rng); int count = std::uniform_int_distribution(0, 500)(rng) * countIncrement; int prodCount = std::uniform_int_distribution(0, 6)(rng); int consCount = std::uniform_int_distribution(0, 6)(rng); std::atomic producersDone(false); ConcurrentQueue q(randInitialSize(rng)); std::vector producers(prodCount); std::vector useProducerToken(prodCount); for (int i = 0; i != prodCount; ++i) { useProducerToken[i] = static_cast(std::uniform_int_distribution(0, 1)(rng)); producers[i] = SimpleThread([&](int i) { ProducerToken t(q); for (int j = 0; j != count && !failed.load(std::memory_order_relaxed); j += countIncrement) { if (useProducerToken[i]) { for (int k = 0; k != countIncrement; ++k) { ASSERT_OR_FAIL_THREAD(q.enqueue(t, (i << 24) | (k + j))); } } else { for (int k = 0; k != countIncrement; ++k) { ASSERT_OR_FAIL_THREAD(q.enqueue((i << 24) | (k + j))); } } FAIL_IF_THREAD_TIMEOUT(); } }, i); } std::vector consumers(consCount); std::vector useConsumerToken(consCount); for (int i = 0; i != consCount; ++i) { useConsumerToken[i] = static_cast(std::uniform_int_distribution(0, 1)(rng)); consumers[i] = SimpleThread([&](int i) { int item; std::vector lastItems(prodCount); ConsumerToken t(q); for (int j = 0; j != prodCount; ++j) { lastItems[j] = -1; } bool doneConsuming = false; while (!doneConsuming && !failed.load(std::memory_order_relaxed)) { auto producersDoneLocal = producersDone.load(std::memory_order_acquire); if (useConsumerToken[i]) { for (int j = 0; j != 10000; ++j) { if (q.try_dequeue(t, item)) { ASSERT_OR_FAIL_THREAD((item & 0xFFFFFF) < count); ASSERT_OR_FAIL_THREAD((item & 0xFFFFFF) > lastItems[item >> 24]); lastItems[item >> 24] = item & 0xFFFFFF; } else if (producersDoneLocal) { doneConsuming = true; break; } } } else { for (int j = 0; j != 10000; ++j) { if (q.try_dequeue(item)) { ASSERT_OR_FAIL_THREAD((item & 0xFFFFFF) < count); ASSERT_OR_FAIL_THREAD((item & 0xFFFFFF) > lastItems[item >> 24]); lastItems[item >> 24] = item & 0xFFFFFF; } else if (producersDoneLocal) { doneConsuming = true; break; } } } FAIL_IF_THREAD_TIMEOUT(); } }, i); } for (int i = 0; i != prodCount; ++i) { producers[i].join(); } producersDone.store(true, std::memory_order_release); for (int i = 0; i != consCount; ++i) { consumers[i].join(); } if (failed.load(std::memory_order_relaxed)) { break; } int item; ASSERT_OR_FAIL(consCount == 0 || !q.try_dequeue(item)); break; } case completely_random: { int threadCount = std::uniform_int_distribution(0, 32)(rng); ConcurrentQueue q(randInitialSize(rng)); std::vector threads(threadCount); std::vector seeds(threadCount); std::vector opCounts(threadCount); unsigned int largestOpCount = 0; for (int i = 0; i != threadCount; ++i) { opCounts[i] = std::uniform_int_distribution(0, 500000)(rng); if (opCounts[i] > largestOpCount) { largestOpCount = opCounts[i]; } } // Note: If you're wondering where all the memory goes, it's mostly here! std::vector itemStates(largestOpCount * threadCount * 2); for (std::size_t j = 0; j != itemStates.size(); ++j) { itemStates[j] = 0; } for (int i = 0; i != threadCount; ++i) { seeds[i] = std::uniform_int_distribution(0, 0xFFFFFFFF)(rng); threads[i] = SimpleThread([&](int i) { RNG_t rng((unsigned int)seeds[i]); ConsumerToken ct(q); ProducerToken pt(q); int item; int opCount = opCounts[i]; std::vector lastItems(threadCount * 2); // * 2 because there's two producer queues per thread (one implicit, one explicit) for (int j = 0; j != threadCount * 2; ++j) { lastItems[j] = -1; } for (int j = 0; j < opCount && !failed.load(std::memory_order_relaxed); ++j) { int op = std::uniform_int_distribution(0, 7)(rng); unsigned int* state; switch (op) { case 0: state = &itemStates[(i * 2) * largestOpCount + j]; ASSERT_OR_FAIL_THREAD(*state == 0); *state = 1; ASSERT_OR_FAIL_THREAD(q.enqueue(pt, ((i * 2) << 24) | j)); break; case 1: state = &itemStates[(i * 2 + 1) * largestOpCount + j]; ASSERT_OR_FAIL_THREAD(*state == 0); *state = 1; ASSERT_OR_FAIL_THREAD(q.enqueue(((i * 2 + 1) << 24) | j)); break; case 2: if (q.try_dequeue(ct, item)) { ASSERT_OR_FAIL_THREAD((item & 0xFFFFFF) >= 0 && (item & 0xFFFFFF) < (int)largestOpCount); ASSERT_OR_FAIL_THREAD((item & 0xFFFFFF) > lastItems[item >> 24]); lastItems[item >> 24] = item & 0xFFFFFF; state = &itemStates[(item >> 24) * largestOpCount + (item & 0xFFFFFF)]; ASSERT_OR_FAIL_THREAD(*state == 1); *state = 2; } break; case 3: if (q.try_dequeue(item)) { ASSERT_OR_FAIL_THREAD((item & 0xFFFFFF) >= 0 && (item & 0xFFFFFF) < (int)largestOpCount); ASSERT_OR_FAIL_THREAD((item & 0xFFFFFF) > lastItems[item >> 24]); lastItems[item >> 24] = item & 0xFFFFFF; state = &itemStates[(item >> 24) * largestOpCount + (item & 0xFFFFFF)]; ASSERT_OR_FAIL_THREAD(*state == 1); *state = 2; } break; case 4: case 5: { std::vector bulkData(std::min(opCount - j, std::uniform_int_distribution(0, 1024)(rng))); for (std::size_t k = 0; k != bulkData.size(); ++k) { state = &itemStates[(i * 2 + op - 4) * largestOpCount + j + k]; ASSERT_OR_FAIL_THREAD(*state == 0); *state = 1; bulkData[k] = ((i * 2 + op - 4) << 24) | (j + (int)k); } if (op == 4) { ASSERT_OR_FAIL_THREAD(q.enqueue_bulk(pt, bulkData.begin(), bulkData.size())); } else { ASSERT_OR_FAIL_THREAD(q.enqueue_bulk(bulkData.begin(), bulkData.size())); } j += (int)bulkData.size() - 1; break; } case 6: case 7: { std::vector bulkData(std::min(opCount - j, std::uniform_int_distribution(0, 1024)(rng))); std::size_t count = 0; if (op == 6) { count = q.try_dequeue_bulk(ct, bulkData.begin(), bulkData.size()); } else { count = q.try_dequeue_bulk(bulkData.begin(), bulkData.size()); } for (std::size_t k = 0; k != count; ++k) { item = bulkData[k]; ASSERT_OR_FAIL_THREAD((item & 0xFFFFFF) >= 0 && (item & 0xFFFFFF) < (int)largestOpCount); ASSERT_OR_FAIL_THREAD((item & 0xFFFFFF) > lastItems[item >> 24]); lastItems[item >> 24] = item & 0xFFFFFF; state = &itemStates[(item >> 24) * largestOpCount + (item & 0xFFFFFF)]; ASSERT_OR_FAIL_THREAD(*state == 1); *state = 2; } if (count > 0) { j += (int)count - 1; } break; } default: assert(false); } FAIL_IF_THREAD_TIMEOUT(); } }, i); } for (int i = 0; i != threadCount; ++i) { threads[i].join(); } #if MCDBGQ_TRACKMEM auto stats = q.getMemStats(); // Make available under debugger ((void)stats); #endif int item; while (q.try_dequeue(item)) { unsigned int* state = &itemStates[(item >> 24) * largestOpCount + (item & 0xFFFFFF)]; ASSERT_OR_FAIL(*state == 1); *state = 2; } for (std::size_t j = 0; j != itemStates.size(); ++j) { ASSERT_OR_FAIL(itemStates[j] == 0 || itemStates[j] == 2); } if (failed.load(std::memory_order_relaxed)) { break; } break; } case core_add_only_list: { int threadCount = std::uniform_int_distribution(0, 48)(rng); std::vector threads(threadCount); std::vector opCounts(threadCount); for (int i = 0; i != threadCount; ++i) { opCounts[i] = std::uniform_int_distribution(0, 500000)(rng); } std::size_t expectedMemUsage = 0; for (int i = 0; i != threadCount; ++i) { expectedMemUsage += opCounts[i] * sizeof(TestListItem); } corealgos::ConcurrentAddOnlyList list; for (int i = 0; i != threadCount; ++i) { threads[i] = SimpleThread([&](int tid) { auto temp = expectedMemUsage; ((void)temp); int opCount = opCounts[tid]; for (int j = 0; j != opCount; ++j) { list.add(new TestListItem((tid << 24) | j)); } }, i); } for (int i = 0; i != threadCount; ++i) { threads[i].join(); } std::vector lastItems(threadCount); for (int i = 0; i != threadCount; ++i) { lastItems[i] = opCounts[i]; } auto tail = list.tail(); while (tail != nullptr) { auto tid = tail->value >> 24; ASSERT_OR_FAIL(lastItems[tid] - 1 == (tail->value & 0xFFFFFF)); --lastItems[tid]; auto next = tail->prev(); delete tail; tail = next; } break; } case core_thread_local: { int threadCount = std::uniform_int_distribution(32, 256)(rng); std::vector threads(threadCount); std::vector opCounts(threadCount); std::vector localData(threadCount); for (int i = 0; i != threadCount; ++i) { opCounts[i] = std::uniform_int_distribution(10000, 250000)(rng); } corealgos::ThreadLocal tls(1); for (int i = 0; i != threadCount; ++i) { threads[i] = SimpleThread([&](int tid) { auto p = tls.get_or_create(); ASSERT_OR_FAIL_THREAD(p->value == 0); p->value = tid; localData[tid] = &p->value; int opCount = opCounts[tid]; for (int j = 0; j != opCount; ++j) { auto q = tls.get_or_create(); ASSERT_OR_FAIL_THREAD(q == p); ASSERT_OR_FAIL_THREAD(q->value == tid); FAIL_IF_THREAD_TIMEOUT(); } }, i); } for (int i = 0; i != threadCount; ++i) { threads[i].join(); } for (int i = 0; i != threadCount; ++i) { ASSERT_OR_FAIL(localData[i] != nullptr); ASSERT_OR_FAIL(*localData[i] == i); } break; } default: assert(false); } ++test_count[type]; if (failed.load(std::memory_order_relaxed)) { out_failReason = failReason.load(std::memory_order_relaxed); result = false; } if (!result) { ++fail_count[type]; break; } } return result; } static const char* timestamp() { static char buf[32]; time_t time = std::time(NULL); strcpy(buf, std::asctime(std::localtime(&time))); buf[strlen(buf) - 1] = '\0'; // Remove trailing newline return buf; } extern "C" { typedef void (*signal_handler_t)(int); } static std::atomic g_seed(0); static std::atomic_flag reported_signal_error = ATOMIC_FLAG_INIT; static std::atomic g_prev_sigsegv(nullptr); static std::atomic g_prev_sigabrt(nullptr); static std::mutex g_signal_handler_mutex; void on_signal(int signal) { if (reported_signal_error.test_and_set()) { return; } std::unique_lock lock(g_signal_handler_mutex); auto seed = g_seed.load(std::memory_order_acquire); // Technically undefined behaviour to use stdlib functions, // but oh well const char* error = signal == SIGABRT ? "Abort detected (assertion failed?)" : "Segmentation fault detected!"; { std::ofstream fout(LOG_FILE, std::ios::app); fout << "*** " << error << "\n Seed: " << std::hex << seed << std::endl; } std::printf("*** %s\n Seed: %08x%08x\n", error, (uint32_t)(seed >> 32), (uint32_t)(seed)); std::fflush(stdout); } extern "C" void signal_handler(int signal) { on_signal(signal); if (signal_handler_t handler_fn = g_prev_sigsegv.load(std::memory_order_relaxed)) { handler_fn(signal); } else { std::exit(signal); } } #ifdef _WIN32 LONG CALLBACK se_handler(PEXCEPTION_POINTERS info) { if (info->ExceptionRecord->ExceptionCode == EXCEPTION_ACCESS_VIOLATION) { on_signal(SIGSEGV); } return EXCEPTION_CONTINUE_SEARCH; } #endif int main(int argc, char** argv) { bool singleSeed = false; uint64_t seed = 0; // Disable buffering (so that when run in, e.g., Sublime Text, the output appears as it is written) std::setvbuf(stdout, nullptr, _IONBF, 0); // Isolate the executable name std::string progName = argv[0]; auto slash = progName.find_last_of("/\\"); if (slash != std::string::npos) { progName = progName.substr(slash + 1); } // Parse command line options if (argc > 1) { bool printHelp = false; bool error = false; for (int i = 1; i < argc; ++i) { if (std::strcmp(argv[i], "--help") == 0) { printHelp = true; } else if (std::strcmp(argv[i], "--seed") == 0) { if (i + 1 == argc || argv[i + 1][0] == '-') { std::printf("Expected seed number argument for --seed option.\n"); error = true; continue; } ++i; seed = 0; // hex for (int j = 0; argv[i][j] != '\0'; ++j) { char ch = static_cast(std::tolower(argv[i][j])); if (j == 1 && seed == 0 && ch == 'x') { continue; // Skip 0x, if any } else if (ch >= 'a' && ch <= 'f') { seed = (seed << 4) | (10 + ch - 'a'); } else if (ch >= '0' && ch <= '9') { seed = (seed << 4) | (ch - '0'); } else { std::printf("Expected hex seed argument, found '%s' instead\n", argv[i]); error = true; } } singleSeed = true; } else { std::printf("Unrecognized option '%s'.\n\n", argv[i]); error = true; } } if (error || printHelp) { std::printf("%s\n Description: Runs fuzz tests (randomized stability tests) for moodycamel::ConcurrentQueue\n", progName.c_str()); std::printf(" An infinite series of random tests are run, each with a different seed.\nIf a test fails, the seed for that test is reported.\n"); std::printf(" --help Prints this help blurb\n"); std::printf(" --seed N Runs one test with the given seed\n"); return error ? -1 : 0; } } { bool logExists = true; { std::ifstream fin(LOG_FILE); if (!fin) { logExists = false; } } std::ofstream fout(LOG_FILE, std::ios::app); if (logExists) { fout << "\n\n"; } if (singleSeed) { std::printf("Running %d iterations of single test with seed %08x%08x.\n\n", SINGLE_SEED_ITERATIONS, (uint32_t)(seed >> 32), (uint32_t)(seed)); fout << "--- New run (" << timestamp() << "): Executing " << SINGLE_SEED_ITERATIONS << " iterations of a single test with seed " << std::hex << seed << " ---" << std::endl; } else { std::printf("Running random fuzz tests for moodycamel::ConcurrentQueue.\n"); std::printf("Press CTRL+C to exit.\n"); std::printf("(Run %s --help for options.)\n\n", progName.c_str()); fout << "--- New run (" << timestamp() << "): Executing random fuzz tests ---" << std::endl; } } int exitCode = 0; test_type test; const char* failReason; if (singleSeed) { if (!run_test(seed, SINGLE_SEED_ITERATIONS, test, failReason)) { exitCode = 1; std::ofstream fout(LOG_FILE, std::ios::app); fout << test_names[test] << " failed: " << failReason << std::endl; std::printf(" %s failed: %s\n", test_names[test], failReason); } else { std::ofstream fout(LOG_FILE, std::ios::app); fout << test_names[test] << " succeeded!" << std::endl; std::printf(" %s succeeded!\n", test_names[test]); } } else { #ifdef _WIN32 AddVectoredExceptionHandler(1 /* first? */, &se_handler); #endif uint32_t iteration = 0; while (true) { seed = (static_cast(std::time(NULL)) << 32) | iteration++; // MurmurHash3 64-bit finalizer seed ^= seed >> 33; seed *= 0xff51afd7ed558ccd; seed ^= seed >> 33; seed *= 0xc4ceb9fe1a85ec53; g_seed.store(seed, std::memory_order_release); std::signal(SIGSEGV, signal_handler); std::signal(SIGABRT, signal_handler); bool result; try { result = run_test(seed, 2, test, failReason); } catch (std::exception const& e) { std::ofstream fout(LOG_FILE, std::ios::app); fout << "*** Exception thrown: " << e.what() << "\n Seed: " << std::hex << seed << "\n Test: " << test_names[test] << std::endl; std::printf("*** Exception thrown: %s\n Seed: %08x%08x\n Test: %s\n\n", e.what(), (uint32_t)(seed >> 32), (uint32_t)(seed), test_names[test]); std::exit(2); // There shouldn't be any exceptions! } catch (...) { std::ofstream fout(LOG_FILE, std::ios::app); fout << "*** Unknown exception thrown!\n Seed: " << std::hex << seed << "\n Test: " << test_names[test] << std::endl; std::printf("*** Unknown exception thrown!\n Seed: %08x%08x\n Test: %s\n\n", (uint32_t)(seed >> 32), (uint32_t)(seed), test_names[test]); std::exit(2); } std::signal(SIGSEGV, SIG_DFL); std::signal(SIGABRT, SIG_DFL); if (!result) { exitCode = 1; std::ofstream fout(LOG_FILE, std::ios::app); fout << "*** Failure detected!\n Seed: " << std::hex << seed << "\n Test: " << test_names[test] << "\n Reason: " << failReason << std::endl; std::printf("*** Failure detected!\n Seed: %08x%08x\n Test: %s\n Reason: %s\n", (uint32_t)(seed >> 32), (uint32_t)(seed), test_names[test], failReason); } if ((iteration & 31) == 0) { std::uint64_t total = 0; char breakdown[128 * TEST_TYPE_COUNT]; char* ptr = breakdown; for (int i = 0; i != TEST_TYPE_COUNT; ++i) { std::sprintf(ptr, " %s: %llu successful, %llu failed\n", test_names[i], (unsigned long long)(test_count[i] - fail_count[i]), (unsigned long long)fail_count[i]); ptr += std::strlen(ptr); total += test_count[i]; } std::ofstream fout(LOG_FILE, std::ios::app); fout << "Executed " << total << " tests so far:\n" << breakdown; std::printf("Executed %llu tests so far:\n%s", (unsigned long long)total, breakdown); } } } return exitCode; } ================================================ FILE: tests/fuzztests/makefile ================================================ # ©2013-2014 Cameron Desrochers include ../../build/makefile.inc default: $(MAKE) -C ../../build bin/fuzztests$(EXT) run: default ../../build/bin/fuzztests$(EXT) ================================================ FILE: tests/relacy/freelist.cpp ================================================ // ©2014 Cameron Desrochers #include "relacy/relacy/relacy_std.hpp" template struct FreeListNode { FreeListNode() : freeListRefs(0), freeListNext(nullptr) { } std::atomic freeListRefs; std::atomic freeListNext; }; // A simple CAS-based lock-free free list. Not the fastest thing in the world under heavy contention, // but simple and correct (assuming nodes are never freed until after the free list is destroyed), // and fairly speedy under low contention. template // N must inherit FreeListNode or have the same fields (and initialization) struct FreeList { FreeList() : freeListHead(nullptr) { } inline void add(N* node) { // We know that the should-be-on-freelist bit is 0 at this point, so it's safe to // set it using a fetch_add if (node->freeListRefs.fetch_add(SHOULD_BE_ON_FREELIST, std::memory_order_acq_rel) == 0) { // Oh look! We were the last ones referencing this node, and we know // we want to add it to the free list, so let's do it! add_knowing_refcount_is_zero(node); } } inline N* try_get() { auto head = freeListHead.load(std::memory_order_acquire); while (head != nullptr) { auto prevHead = head; auto refs = head->freeListRefs.load(std::memory_order_relaxed); if ((refs & REFS_MASK) == 0 || !head->freeListRefs.compare_exchange_strong(refs, refs + 1, std::memory_order_acquire, std::memory_order_relaxed)) { head = freeListHead.load(std::memory_order_acquire); continue; } // Good, reference count has been incremented (it wasn't at zero), which means // we can read the next and not worry about it changing between now and the time // we do the CAS auto next = head->freeListNext.load(std::memory_order_relaxed); if (freeListHead.compare_exchange_strong(head, next, std::memory_order_acquire, std::memory_order_relaxed)) { // Yay, got the node. This means it was on the list, which means // shouldBeOnFreeList must be false no matter the refcount (because // nobody else knows it's been taken off yet, it can't have been put back on). RL_ASSERT((head->freeListRefs.load(std::memory_order_relaxed) & SHOULD_BE_ON_FREELIST) == 0); // Decrease refcount twice, once for our ref, and once for the list's ref head->freeListRefs.fetch_add(-2, std::memory_order_release); return head; } // OK, the head must have changed on us, but we still need to decrease the refcount we // increased. // Note that we don't need to release any memory effects, but we do need to ensure that the reference // count decrement happens-after the CAS on the head. refs = prevHead->freeListRefs.fetch_add(-1, std::memory_order_acq_rel); if (refs == SHOULD_BE_ON_FREELIST + 1) { add_knowing_refcount_is_zero(prevHead); } } return nullptr; } // Useful for traversing the list when there's no contention (e.g. to destroy remaining nodes) N* head_unsafe() const { return freeListHead.load(std::memory_order_relaxed); } private: inline void add_knowing_refcount_is_zero(N* node) { // Since the refcount is zero, and nobody can increase it once it's zero (except us, and we // run only one copy of this method per node at a time, i.e. the single thread case), then we // know we can safely change the next pointer of the node; however, once the refcount is back // above zero, then other threads could increase it (happens under heavy contention, when the // refcount goes to zero in between a load and a refcount increment of a node in try_get, then // back up to something non-zero, then the refcount increment is done by the other thread) -- // so, if the CAS to add the node to the actual list fails, decrease the refcount and leave // the add operation to the next thread who puts the refcount back at zero (which could be us, // hence the loop). auto head = freeListHead.load(std::memory_order_relaxed); while (true) { node->freeListNext.store(head, std::memory_order_relaxed); node->freeListRefs.store(1, std::memory_order_release); if (!freeListHead.compare_exchange_strong(head, node, std::memory_order_release, std::memory_order_relaxed)) { // Hmm, the add failed, but we can only try again when the refcount goes back to zero if (node->freeListRefs.fetch_add(SHOULD_BE_ON_FREELIST - 1, std::memory_order_release) == 1) { continue; } } return; } } private: static const std::uint32_t REFS_MASK = 0x7FFFFFFF; static const std::uint32_t SHOULD_BE_ON_FREELIST = 0x80000000; // Implemented like a stack, but where node order doesn't matter (nodes are // inserted out of order under contention) std::atomic freeListHead; }; struct TestNode : FreeListNode { int value; TestNode() { } explicit TestNode(int value) : value(value) { } }; struct basic_test : rl::test_suite { FreeList freeList; TestNode initialNodes[2]; void before() { } void thread(unsigned int tid) { TestNode* node = &initialNodes[tid]; node->value = tid; freeList.add(node); node = freeList.try_get(); if (node != nullptr) { freeList.add(node); } } void after() { } void invariant() { } }; struct full_test : rl::test_suite { FreeList freeList; TestNode initialNodes[6]; void before() { } void thread(unsigned int tid) { TestNode* node; int myNodeCount = tid >= 4 ? 2 : 1; for (int i = 0; i != myNodeCount; ++i) { node = &initialNodes[tid + (tid >= 5 ? 1 : 0) + i]; node->value = tid; freeList.add(node); } for (int i = 0; i != 3; ++i) { node = freeList.try_get(); if (node != nullptr) { freeList.add(node); } } } void after() { } void invariant() { } }; int main() { rl::test_params params; //params.search_type = rl::sched_full; //params.iteration_count = 100000000; params.search_type = rl::sched_random; params.iteration_count = 1000000; rl::simulate(params); rl::simulate(params); return 0; } ================================================ FILE: tests/relacy/integrated.cpp ================================================ // ©2015 Cameron Desrochers // Tests various parts of the queue using the actual // full implementation itself, instead of isolated // components. This is much slower, but provides much // better coverage too. #define MCDBGQ_USE_RELACY #include "../../concurrentqueue.h" #include using namespace moodycamel; struct SmallConstantTraits : public ConcurrentQueueDefaultTraits { static const size_t BLOCK_SIZE = 2; static const size_t EXPLICIT_INITIAL_INDEX_SIZE = 2; static const size_t IMPLICIT_INITIAL_INDEX_SIZE = 2; static const size_t INITIAL_IMPLICIT_PRODUCER_HASH_SIZE = 1; static const std::uint32_t EXPLICIT_CONSUMER_CONSUMPTION_QUOTA_BEFORE_ROTATE = 2; }; struct MediumConstantTraits : public ConcurrentQueueDefaultTraits { static const size_t BLOCK_SIZE = 4; static const size_t EXPLICIT_INITIAL_INDEX_SIZE = 2; static const size_t IMPLICIT_INITIAL_INDEX_SIZE = 4; static const size_t INITIAL_IMPLICIT_PRODUCER_HASH_SIZE = 2; static const std::uint32_t EXPLICIT_CONSUMER_CONSUMPTION_QUOTA_BEFORE_ROTATE = 4; }; struct Foo { static int& ctorCount() { static int c; return c; } static int& dtorCount() { static int c; return c; } static void reset() { ctorCount() = 0; dtorCount() = 0; } Foo() : id(-2) { ++ctorCount(); } Foo(int id) : id(id) { ++ctorCount(); } Foo(Foo const& o) : id(o.id) { ++ctorCount(); } ~Foo() { RL_ASSERT(id != -1); ++dtorCount(); id = -1; } public: int id; }; struct enqueue_explicit_one : rl::test_suite { ConcurrentQueue q; void before() { } void thread(unsigned int tid) { RelacyThreadExitNotifier::notify_relacy_thread_start(); ProducerToken t(q); q.enqueue(t, tid); RelacyThreadExitNotifier::notify_relacy_thread_exit(); } void after() { int tid0, tid1; RL_ASSERT(q.try_dequeue(tid0)); RL_ASSERT(tid0 == 0 || tid0 == 1); RL_ASSERT(q.try_dequeue(tid1)); RL_ASSERT(tid1 == 0 || tid1 == 1); RL_ASSERT(tid0 != tid1); RL_ASSERT(!q.try_dequeue(tid0)); } void invariant() { } }; struct enqueue_explicit_many : rl::test_suite { ConcurrentQueue q; void before() { } void thread(unsigned int tid) { RelacyThreadExitNotifier::notify_relacy_thread_start(); ProducerToken t(q); for (int i = 0; i != 5; ++i) { q.enqueue(t, tid * 10 + i); } RelacyThreadExitNotifier::notify_relacy_thread_exit(); } void after() { int item; for (int i = 0; i != 15; ++i) { RL_ASSERT(q.try_dequeue(item)); } RL_ASSERT(!q.try_dequeue(item)); } void invariant() { } }; // This one caught a bug with the memory ordering in the core dequeue algorithm struct dequeue_some_explicit : rl::test_suite { ConcurrentQueue q; void before() { } void thread(unsigned int tid) { RelacyThreadExitNotifier::notify_relacy_thread_start(); if (tid <= 1) { int item; ConsumerToken t(q); for (int i = 0; i != 5; ++i) { q.try_dequeue(t, item); } } else { ProducerToken t(q); for (int i = 0; i != 3; ++i) { q.enqueue(t, tid * 10 + i); } } RelacyThreadExitNotifier::notify_relacy_thread_exit(); } void after() { } void invariant() { } }; // Causes blocks to be reused struct recycle_blocks_explicit : rl::test_suite { ConcurrentQueue q; std::vector seen; void before() { seen.resize(8, false); } void thread(unsigned int tid) { RelacyThreadExitNotifier::notify_relacy_thread_start(); if (tid == 0) { ProducerToken t(q); for (int i = 0; i != 8; ++i) { q.enqueue(t, i); } } else { int item; ConsumerToken t(q); for (int i = 0; i != 6; ++i) { if (q.try_dequeue(t, item)) { RL_ASSERT(!seen[item]); seen[item] = true; } } } RelacyThreadExitNotifier::notify_relacy_thread_exit(); } void after() { int item; while (q.try_dequeue(item)) { RL_ASSERT(!seen[item]); seen[item] = true; } for (auto s : seen) { RL_ASSERT(s); } } void invariant() { } }; // Causes the explicit producer's block index to expand struct expand_block_index_explicit : rl::test_suite { ConcurrentQueue q; std::vector seen; void before() { seen.resize(12, false); } void thread(unsigned int tid) { RelacyThreadExitNotifier::notify_relacy_thread_start(); if (tid == 0) { ProducerToken t(q); for (int i = 0; i != 12; ++i) { q.enqueue(t, i); } } else { int item; ConsumerToken t(q); for (int i = 0; i != 3; ++i) { if (q.try_dequeue(t, item)) { RL_ASSERT(!seen[item]); seen[item] = true; } } } RelacyThreadExitNotifier::notify_relacy_thread_exit(); } void after() { int item; while (q.try_dequeue(item)) { RL_ASSERT(!seen[item]); seen[item] = true; } for (auto s : seen) { RL_ASSERT(s); } } void invariant() { } }; // Tests that implicit producers work at a very basic level struct enqueue_implicit_one : rl::test_suite { ConcurrentQueue q; void before() { } void thread(unsigned int tid) { RelacyThreadExitNotifier::notify_relacy_thread_start(); q.enqueue(tid); RelacyThreadExitNotifier::notify_relacy_thread_exit(); } void after() { int tid0, tid1; RL_ASSERT(q.try_dequeue(tid0)); RL_ASSERT(tid0 == 0 || tid0 == 1); RL_ASSERT(q.try_dequeue(tid1)); RL_ASSERT(tid1 == 0 || tid1 == 1); RL_ASSERT(tid0 != tid1); RL_ASSERT(!q.try_dequeue(tid0)); } void invariant() { } }; // Tests implicit producer at a simple level struct implicit_simple : rl::test_suite { ConcurrentQueue q; std::vector seen; void before() { seen.resize(5, false); } void thread(unsigned int tid) { RelacyThreadExitNotifier::notify_relacy_thread_start(); if (tid == 0) { for (int i = 0; i != 5; ++i) { q.enqueue(i); } } else { int item; for (int i = 0; i != 3; ++i) { if (q.try_dequeue(item)) { RL_ASSERT(!seen[item]); seen[item] = true; } } } RelacyThreadExitNotifier::notify_relacy_thread_exit(); } void after() { int item; while (q.try_dequeue(item)) { RL_ASSERT(!seen[item]); seen[item] = true; } for (auto s : seen) { RL_ASSERT(s); } } void invariant() { } }; // Tests multiple implicit producers being created (stresses the implicit producer hash map) struct many_implicit_producers : rl::test_suite { ConcurrentQueue q; std::vector seen; void before() { seen.resize(18, false); } void thread(unsigned int tid) { RelacyThreadExitNotifier::notify_relacy_thread_start(); q.enqueue(tid * 3 + 0); q.enqueue(tid * 3 + 1); q.enqueue(tid * 3 + 2); int item; for (int i = 0; i != 2; ++i) { if (q.try_dequeue(item)) { RL_ASSERT(!seen[item]); seen[item] = true; } } RelacyThreadExitNotifier::notify_relacy_thread_exit(); } void after() { int item; while (q.try_dequeue(item)) { RL_ASSERT(!seen[item]); seen[item] = true; } for (auto s : seen) { RL_ASSERT(s); } } void invariant() { } }; // Tests multiple implicit producers being created (stresses the implicit producer hash map) struct implicit_producer_reuse : rl::test_suite { ConcurrentQueue q; std::vector seen; void before() { seen.resize(9, false); } void thread(unsigned int tid) { RelacyThreadExitNotifier::notify_relacy_thread_start(); q.enqueue(tid); RelacyThreadExitNotifier::notify_relacy_thread_exit(); } void after() { int item; while (q.try_dequeue(item)) { RL_ASSERT(!seen[item]); seen[item] = true; } for (auto s : seen) { RL_ASSERT(s); } } void invariant() { } }; // Tests implicit producer block recycling struct implicit_block_reuse : rl::test_suite { ConcurrentQueue q; std::vector seen; void before() { seen.resize(28, false); } void thread(unsigned int tid) { RelacyThreadExitNotifier::notify_relacy_thread_start(); for (int i = 0; i != 7; ++i) { q.enqueue(tid * 7 + i); } int item; ConsumerToken t(q); for (int i = 0; i != 7; ++i) { if (q.try_dequeue(t, item)) { RL_ASSERT(!seen[item]); seen[item] = true; } } RelacyThreadExitNotifier::notify_relacy_thread_exit(); } void after() { int item; while (q.try_dequeue(item)) { RL_ASSERT(!seen[item]); seen[item] = true; } for (auto s : seen) { RL_ASSERT(s); } } void invariant() { } }; // Tests consumption from mixed producers struct mixed : rl::test_suite { ConcurrentQueue q; std::vector seen; void before() { seen.resize(28, false); } void thread(unsigned int tid) { RelacyThreadExitNotifier::notify_relacy_thread_start(); if (tid <= 1) { for (int i = 0; i != 7; ++i) { q.enqueue(tid * 7 + i); } } else { ProducerToken t(q); for (int i = 0; i != 7; ++i) { q.enqueue(t, tid * 7 + i); } } int item; if (tid & 1) { for (int i = 0; i != 4; ++i) { if (q.try_dequeue(item)) { RL_ASSERT(!seen[item]); seen[item] = true; } } } else { ConsumerToken t(q); for (int i = 0; i != 4; ++i) { if (q.try_dequeue(t, item)) { RL_ASSERT(!seen[item]); seen[item] = true; } } } RelacyThreadExitNotifier::notify_relacy_thread_exit(); } void after() { int item; while (q.try_dequeue(item)) { RL_ASSERT(!seen[item]); seen[item] = true; } for (auto s : seen) { RL_ASSERT(s); } } void invariant() { } }; // Test leftovers are being properly destroyed struct leftovers_destroyed_explicit : rl::test_suite { ConcurrentQueue* q; std::vector seen; void before() { seen.resize(rl::rand(32), false); q = new ConcurrentQueue(); Foo::reset(); } void thread(unsigned int tid) { RelacyThreadExitNotifier::notify_relacy_thread_start(); if (tid == 0) { ProducerToken t(*q); for (int i = 0; i != (int)seen.size(); ++i) { q->enqueue(t, Foo(i)); } } else { Foo item; ConsumerToken t(*q); for (int i = rl::rand(17); i > 0; --i) { if (q->try_dequeue(t, item)) { RL_ASSERT(!seen[item.id]); seen[item.id] = true; } } } RelacyThreadExitNotifier::notify_relacy_thread_exit(); } void after() { int seenCount = 0; { for (auto s : seen) { if (s) { ++seenCount; } } } RL_ASSERT(Foo::ctorCount() == seen.size() * 2 + 2); RL_ASSERT(Foo::dtorCount() == seen.size() + seenCount + 2); delete q; RL_ASSERT(Foo::ctorCount() == seen.size() * 2 + 2); RL_ASSERT(Foo::ctorCount() == Foo::dtorCount()); } void invariant() { } }; // implicit struct leftovers_destroyed_implicit : rl::test_suite { ConcurrentQueue* q; std::vector seen; void before() { seen.resize(rl::rand(32), false); q = new ConcurrentQueue(); Foo::reset(); } void thread(unsigned int tid) { RelacyThreadExitNotifier::notify_relacy_thread_start(); if (tid == 0) { for (int i = 0; i != (int)seen.size(); ++i) { q->enqueue(Foo(i)); } } else { Foo item; for (int i = rl::rand(17); i > 0; --i) { if (q->try_dequeue(item)) { RL_ASSERT(!seen[item.id]); seen[item.id] = true; } } } RelacyThreadExitNotifier::notify_relacy_thread_exit(); } void after() { int seenCount = 0; { for (auto s : seen) { if (s) { ++seenCount; } } } RL_ASSERT(Foo::ctorCount() == seen.size() * 2 + 2); RL_ASSERT(Foo::dtorCount() == seen.size() + seenCount + 2); delete q; RL_ASSERT(Foo::ctorCount() == seen.size() * 2 + 2); RL_ASSERT(Foo::ctorCount() == Foo::dtorCount()); } void invariant() { } }; template void simulate(int iterations) { // Note: There's no point using the full search params // Even with the simple enqueue_explicit_one test, it // would take a few millenia to complete(!) //rl::test_params fullParams; //fullParams.search_type = rl::sched_full; rl::test_params randomParams; randomParams.search_type = rl::sched_random; randomParams.iteration_count = iterations; rl::simulate(randomParams); } int main() { simulate(1000000); simulate(1000000); simulate(1000000); simulate(1000000); simulate(1000000); simulate(1000000); simulate(1000000); simulate(500000); simulate(1000000); simulate(1000000); simulate(1000000); simulate(1000000); simulate(1000000); return 0; } ================================================ FILE: tests/relacy/makefile ================================================ # ©2014-2015 Cameron Desrochers include ../../build/makefile.inc ifeq ($(OS),Windows_NT) PLATFORM_OPTS = -static else PLATFORM_OPTS = -lrt endif OPTS = -Wno-int-to-pointer-cast -pthread $(PLATFORM_OPTS) -O3 -g default: freelist$(EXT) spmchash$(EXT) integrated$(EXT) freelist$(EXT): makefile freelist.cpp g++ -std=c++11 -fpermissive $(OPTS) freelist.cpp -o freelist$(EXT) spmchash$(EXT): makefile spmchash.cpp g++ -std=c++11 -fpermissive $(OPTS) spmchash.cpp -o spmchash$(EXT) integrated$(EXT): makefile integrated.cpp ../../concurrentqueue.h relacy_shims.h g++ -std=c++11 -fpermissive $(OPTS) -Irelacy -I. integrated.cpp -o integrated$(EXT) #run: freelist$(EXT) # ./freelist$(EXT) #run: spmchash$(EXT) # ./spmchash$(EXT) run: integrated$(EXT) ./integrated$(EXT) ================================================ FILE: tests/relacy/relacy/CHANGES ================================================ Version 2.4 Features: + Support for futex(FUTEX_WAIT/FUTEX_WAKE) + Linux/Darwin performance improved (2.5x for Linux, 7x for Darwin) Fixes: + Fixed a bunch of issues with WaitForMultipleObjects()/SignalObjectAndWait() + Fixed rare spurious memory leak reports related to test progress reporting Version 2.3 Features: + Support for FlushProcessWriteBuffers() Version 2.2 Features: + Support for pthread_mutex_timedlock() + Support for ETIMEDOUT, EINTR in pthread_cond_timedwait()/pthread_cond_wait() + rl::hash_ptr(p, sz) function which provides deterministic hashing of pointers Fixes: + Win32 mutex is now recursive + Compilation issue on MSVC x64 when RL_DEBUGBREAK_ON_ASSERT/RL_DEBUGBREAK_ON_FAILURE defined + Fixed OOM crash when execution history is very large + Fixed rare crash during iteration count estimation in context bound scheduler + Fixed bug in pthread_rwlock/SRWLOCK that at most 2 readers may acquire it simultaneously + Fixed bug regarding false race detection when simulation runs for very long time (int overflow) ================================================ FILE: tests/relacy/relacy/LICENSE ================================================ Relacy Race Detector Copyright (c) 2008-2013, Dmitry S. Vyukov All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - The name of the owner may not be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE OWNER "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OWNER BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ================================================ FILE: tests/relacy/relacy/VERSION ================================================ acc09bbe65a1837a08912774c7fed178547514e6 ================================================ FILE: tests/relacy/relacy/example/cli_ws_deque/cli_ws_deque.cpp ================================================ #include "stdafx.h" #include "../../relacy/relacy_cli.hpp" using rl::nvar; using rl::nvolatile; using rl::mutex; template class ws_deque { public: ws_deque() { m_mask($) = initial_size - 1; m_headIndex($) = 0; m_tailIndex($) = 0; m_array($) = new nvar [initial_size]; m_arraySize($) = initial_size; } bool IsEmpty() { return m_headIndex($) >= m_tailIndex($); } size_t Count() { return m_tailIndex($) - m_headIndex($); } void push(T item) { size_t tail = m_tailIndex($); if (tail <= m_headIndex($) + m_mask($)) { m_array($)[tail & m_mask($)]($) = item; m_tailIndex($) = tail + 1; } else { m_foreignLock.lock($); size_t head = m_headIndex($); size_t count = Count(); if (count >= m_mask($)) { size_t arraySize = m_arraySize($); size_t mask = m_mask($); nvar* newArray = new nvar [arraySize * 2]; nvar* arr = m_array($); for (size_t i = 0; i != count; ++i) newArray[i]($) = arr[(i + head) & mask]($); m_array($) = newArray; m_arraySize($) = arraySize * 2; m_headIndex($) = 0; m_tailIndex($) = count; tail = count; m_mask($) = (mask * 2) | 1; } m_array($)[tail & m_mask($)]($) = item; m_tailIndex($) = tail + 1; m_foreignLock.unlock($); } } bool pop(T& item) { size_t tail = m_tailIndex($); if (tail == 0) return false; tail -= 1; rl::Interlocked::Exchange(m_tailIndex, tail, $); if (m_headIndex($) <= tail) { item = m_array($)[tail & m_mask($)]($); return true; } else { m_foreignLock.lock($); if (m_headIndex($) <= tail) { item = m_array($)[tail & m_mask($)]($); m_foreignLock.unlock($); return true; } else { m_tailIndex($) = tail + 1; m_foreignLock.unlock($); return false; } } } bool steal(T& item) { if (false == m_foreignLock.try_lock($)) return false; size_t head = m_headIndex($); rl::Interlocked::Exchange(m_headIndex, head + 1, $); if (head < m_tailIndex($)) { item = m_array($)[head & m_mask($)]($); m_foreignLock.unlock($); return true; } else { m_headIndex($) = head; m_foreignLock.unlock($); return false; } } private: static size_t const initial_size = 2; nvar*> m_array; nvar m_mask; nvar m_arraySize; nvolatile m_headIndex; nvolatile m_tailIndex; mutex m_foreignLock; }; struct ws_deque_test : rl::test_suite { ws_deque q; bool state [2]; void before() { state[0] = true; state[1] = true; } void after() { RL_ASSERT(state[0] == false); RL_ASSERT(state[1] == false); } void thread(unsigned index) { if (0 == index) { q.push(1); q.push(2); int item = 0; bool res = q.pop(item); RL_ASSERT(res && item == 2); RL_ASSERT(state[1]); state[1] = false; item = 0; res = q.pop(item); if (res) { RL_ASSERT(state[0]); state[0] = false; } item = 0; res = q.pop(item); RL_ASSERT(res == false); } else { int item = 0; bool res = q.steal(item); if (res) { RL_ASSERT(item == 1); RL_ASSERT(state[0]); state[0] = false; } } } }; int main() { rl::simulate(); } ================================================ FILE: tests/relacy/relacy/example/cli_ws_deque/msvc8/cli_ws_deque.sln ================================================  Microsoft Visual Studio Solution File, Format Version 9.00 # Visual Studio 2005 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cli_ws_deque", "cli_ws_deque.vcproj", "{0B597F19-DEBB-4832-B520-9A93A286D595}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Win32 = Debug|Win32 Release|Win32 = Release|Win32 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {0B597F19-DEBB-4832-B520-9A93A286D595}.Debug|Win32.ActiveCfg = Debug|Win32 {0B597F19-DEBB-4832-B520-9A93A286D595}.Debug|Win32.Build.0 = Debug|Win32 {0B597F19-DEBB-4832-B520-9A93A286D595}.Release|Win32.ActiveCfg = Release|Win32 {0B597F19-DEBB-4832-B520-9A93A286D595}.Release|Win32.Build.0 = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection EndGlobal ================================================ FILE: tests/relacy/relacy/example/cli_ws_deque/msvc8/cli_ws_deque.vcproj ================================================ ================================================ FILE: tests/relacy/relacy/example/cli_ws_deque/stdafx.cpp ================================================ #include "stdafx.h" ================================================ FILE: tests/relacy/relacy/example/cli_ws_deque/stdafx.h ================================================ #pragma once #include "../../relacy/pch.hpp" ================================================ FILE: tests/relacy/relacy/example/condvar/condvar.cpp ================================================ #include "stdafx.h" #include "../../relacy/relacy_std.hpp" // THE TEST IS EXPECTED TO FAIL WITH "DEADLOCK" class CondVar { public: CondVar(); ~CondVar(); void Enter(); void Wait(); void Release(); void ReleaseAll(); void Leave(); private: std::atomic m_lMutex; std::atomic m_dwWaitingForSignal; HANDLE m_xhEvtEnter; HANDLE m_xhSemRelease; }; CondVar::CondVar() : m_xhEvtEnter(CreateEvent(0, 0, 0, 0)) , m_xhSemRelease(CreateSemaphore(0, 0, 0x7FFFFFFF, 0)) { m_lMutex.store(0, std::memory_order_relaxed); m_dwWaitingForSignal.store(0, std::memory_order_relaxed); } CondVar::~CondVar() { CloseHandle(m_xhEvtEnter); CloseHandle(m_xhSemRelease); } void CondVar::Enter() { int lMutex = m_lMutex.load(std::memory_order_seq_cst); for (;;) { if( lMutex >= 0 ) { if (m_lMutex.compare_exchange_weak(lMutex, lMutex | 0x80000000u, std::memory_order_seq_cst)) break; } else { if (false == m_lMutex.compare_exchange_weak(lMutex, lMutex + 1, std::memory_order_seq_cst)) continue; WaitForSingleObject(m_xhEvtEnter, INFINITE); RL_ASSERT(m_lMutex.load(std::memory_order_seq_cst) < 0); break; } } } void CondVar::Wait() { unsigned dwWaitingForSignal = m_dwWaitingForSignal.load(std::memory_order_seq_cst); m_dwWaitingForSignal.store(dwWaitingForSignal + 1, std::memory_order_seq_cst); RL_ASSERT(m_lMutex.load(std::memory_order_seq_cst) < 0); int lMutex = m_lMutex.load(std::memory_order_seq_cst); for (;;) { unsigned dwWaitingToOwn = lMutex & 0x7FFFFFFFu; RL_ASSERT(dwWaitingToOwn >= dwWaitingForSignal); if (dwWaitingToOwn == dwWaitingForSignal) { if (m_lMutex.compare_exchange_weak(lMutex, dwWaitingToOwn + 1, std::memory_order_seq_cst)) break; } else { SetEvent(m_xhEvtEnter); break; } } WaitForSingleObject(m_xhSemRelease, INFINITE); WaitForSingleObject(m_xhEvtEnter, INFINITE); RL_ASSERT(m_lMutex.load(std::memory_order_seq_cst) < 0); } void CondVar::Release() { RL_ASSERT(m_lMutex.load(std::memory_order_seq_cst) < 0); unsigned dwWaitingForSignal = m_dwWaitingForSignal.load(std::memory_order_seq_cst); if (dwWaitingForSignal != 0) { m_dwWaitingForSignal.store(dwWaitingForSignal - 1, std::memory_order_seq_cst); ReleaseSemaphore(m_xhSemRelease, 1, 0); } } void CondVar::ReleaseAll() { RL_ASSERT(m_lMutex.load(std::memory_order_seq_cst) < 0); unsigned dwWaitingForSignal = m_dwWaitingForSignal.load(std::memory_order_seq_cst); if (dwWaitingForSignal != 0) { m_dwWaitingForSignal.store(0, std::memory_order_seq_cst); ReleaseSemaphore(m_xhSemRelease, dwWaitingForSignal, 0); } } void CondVar::Leave() { int lMutex = m_lMutex.load(std::memory_order_seq_cst); RL_ASSERT(lMutex < 0); for (;;) { unsigned dwWaitingToOwn = lMutex & 0x7FFFFFFFu; unsigned dwWaitingForSignal = m_dwWaitingForSignal.load(std::memory_order_seq_cst); RL_ASSERT(dwWaitingToOwn >= dwWaitingForSignal); if (dwWaitingToOwn == dwWaitingForSignal) { if (m_lMutex.compare_exchange_weak(lMutex, lMutex & 0x7FFFFFFF, std::memory_order_seq_cst)) break; } else { if (false == m_lMutex.compare_exchange_weak(lMutex, lMutex - 1, std::memory_order_seq_cst)) continue; SetEvent(m_xhEvtEnter); break; } } } struct CondVarTest : rl::test_suite { VAR_T(int) stage; CondVar cv; void before() { VAR(stage) = 0; } void thread(unsigned index) { if (0 == index) { cv.Enter(); VAR(stage) += 1; cv.ReleaseAll(); while (VAR(stage) != 2) cv.Wait(); cv.Leave(); } else if (1 == index) { cv.Enter(); while (VAR(stage) != 1) cv.Wait(); VAR(stage) += 1; cv.ReleaseAll(); cv.Leave(); } else if (2 == index) { cv.Enter(); while (VAR(stage) != 2) cv.Wait(); cv.Leave(); } } }; int main() { rl::simulate(); } ================================================ FILE: tests/relacy/relacy/example/condvar/msvc8/condvar.sln ================================================  Microsoft Visual Studio Solution File, Format Version 9.00 # Visual Studio 2005 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "condvar", "condvar.vcproj", "{D4756EE9-3953-4E17-B1B5-E89F853303C1}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Win32 = Debug|Win32 Release|Win32 = Release|Win32 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {D4756EE9-3953-4E17-B1B5-E89F853303C1}.Debug|Win32.ActiveCfg = Debug|Win32 {D4756EE9-3953-4E17-B1B5-E89F853303C1}.Debug|Win32.Build.0 = Debug|Win32 {D4756EE9-3953-4E17-B1B5-E89F853303C1}.Release|Win32.ActiveCfg = Release|Win32 {D4756EE9-3953-4E17-B1B5-E89F853303C1}.Release|Win32.Build.0 = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection EndGlobal ================================================ FILE: tests/relacy/relacy/example/condvar/msvc8/condvar.vcproj ================================================ ================================================ FILE: tests/relacy/relacy/example/condvar/msvc9/condvar.sln ================================================  Microsoft Visual Studio Solution File, Format Version 10.00 # Visual Studio 2008 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "condvar", "condvar.vcproj", "{D4756EE9-3953-4E17-B1B5-E89F853303C1}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Win32 = Debug|Win32 Release|Win32 = Release|Win32 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {D4756EE9-3953-4E17-B1B5-E89F853303C1}.Debug|Win32.ActiveCfg = Debug|Win32 {D4756EE9-3953-4E17-B1B5-E89F853303C1}.Debug|Win32.Build.0 = Debug|Win32 {D4756EE9-3953-4E17-B1B5-E89F853303C1}.Release|Win32.ActiveCfg = Release|Win32 {D4756EE9-3953-4E17-B1B5-E89F853303C1}.Release|Win32.Build.0 = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection EndGlobal ================================================ FILE: tests/relacy/relacy/example/condvar/msvc9/condvar.vcproj ================================================ ================================================ FILE: tests/relacy/relacy/example/condvar/stdafx.cpp ================================================ #include "stdafx.h" ================================================ FILE: tests/relacy/relacy/example/condvar/stdafx.h ================================================ #pragma once #ifdef NDEBUG # define _SECURE_SCL 0 #endif #define RL_MSVC_OUTPUT //#define RL_DEBUGBREAK_ON_FAILURE #include "../../relacy/pch.hpp" #include "../../relacy/relacy_std.hpp" ================================================ FILE: tests/relacy/relacy/example/eao_blocking/eao_blocking.cpp ================================================ /* #define BOOST_ALL_NO_LIB #pragma warning (push, 3) #include #include #include "C:\boost_1_35_0\libs\thread\src\win32\exceptions.cpp" #pragma warning (pop) class business_logic { public: typedef unsigned account_id_t; typedef double balance_t; bool add_account(account_id_t acc_id, balance_t balance) { accounts_guard.lock(); if (accounts.find(acc_id) != accounts.end()) { accounts_guard.unlock(); return false; } accounts[acc_id].balance = balance; accounts_guard.unlock(); return true; } bool transfer_balance(account_id_t acc_id1, account_id_t acc_id2, balance_t amount) { accounts_guard.lock_shared(); if (accounts.find(acc_id1) != accounts.end() || accounts.find(acc_id2) != accounts.end()) { accounts_guard.unlock_shared(); return false; } account_info& acc1 = accounts[acc_id1]; account_info& acc2 = accounts[acc_id2]; acc1.mtx.lock(); acc2.mtx.lock(); accounts_guard.unlock_shared(); acc1.balance -= amount; acc2.balance += amount; acc1.mtx.unlock(); acc2.mtx.unlock(); return true; } private: struct account_info { balance_t balance; boost::mutex mtx; account_info() : balance() {} account_info(account_info const& acc) : balance(acc.balance) {} }; typedef std::map account_map_t; account_map_t accounts; boost::shared_mutex accounts_guard; }; */ /* #undef RL_TEST #ifndef RL_TEST //# define ASSERT assert typedef boost::mutex mutex_t; # define $$ #else //# define ASSERT RL_ASSERT typedef rl::recursive_mutex mutex_t; # define $$ $ #endif class business_logic { public: typedef unsigned account_id_t; typedef double balance_t; bool add_account(account_id_t acc_id, balance_t balance) { accounts_guard.lock($$); if (accounts.find(acc_id) != accounts.end()) { accounts_guard.unlock($$); return false; } accounts[acc_id].balance = balance; accounts_guard.unlock($$); return true; } bool transfer_balance(account_id_t acc_id1, account_id_t acc_id2, balance_t amount) { accounts_guard.lock($$); if (accounts.find(acc_id1) == accounts.end() || accounts.find(acc_id2) == accounts.end()) { accounts_guard.unlock($$); return false; } account_info& acc1 = accounts[acc_id1]; account_info& acc2 = accounts[acc_id2]; acc1.mtx.lock($$); acc2.mtx.lock($$); accounts_guard.unlock($$); acc1.balance -= amount; acc2.balance += amount; acc1.mtx.unlock($$); acc2.mtx.unlock($$); return true; } private: struct account_info { balance_t balance; mutex_t mtx; account_info() : balance() {} account_info(account_info const& acc) : balance(acc.balance) {} }; typedef std::map account_map_t; account_map_t accounts; mutex_t accounts_guard; }; */ /* struct business_logic_test : rl::test_suite { business_logic bl; static size_t const account_count = 10; void before() { for (size_t i = 0; i != account_count; ++i) { bool rv = bl.add_account(i, i * 10.0); RL_ASSERT(rv); } } void thread(unsigned) { business_logic::account_id_t acc1 = rl::rand(account_count); business_logic::account_id_t acc2 = rl::rand(account_count); bool rv = bl.transfer_balance(acc1, acc2, 1.0); RL_ASSERT(rv); } }; */ ================================================ FILE: tests/relacy/relacy/example/eventcount/eventcount.cpp ================================================ #include "stdafx.h" #include "../../relacy/windows.h" #define HANDLE rl::HANDLE #define CreateSemaphoreA rl::RL_CreateSemaphore($) #define CreateSemaphoreW rl::RL_CreateSemaphore($) #ifndef CreateSemaphore # define CreateSemaphore CreateSemaphoreW #endif #define CloseHandle rl::RL_CloseHandle($) #include #if defined(WIN32) && defined(_MSC_VER) #include #include class semaphore { public: semaphore() { h_ = CreateSemaphore(0, 0, LONG_MAX, 0); } ~semaphore() { CloseHandle(h_); } void wait() { WaitForSingleObject(h_, INFINITE); } void post() { ReleaseSemaphore(h_, 1, 0); } private: HANDLE h_; semaphore(semaphore const&); semaphore& operator = (semaphore const&); }; class mutex { public: mutex() { InitializeCriticalSection(&cs_); } ~mutex() { DeleteCriticalSection(&cs_); } void lock() { EnterCriticalSection(&cs_); } void unlock() { LeaveCriticalSection(&cs_); } private: CRITICAL_SECTION cs_; mutex(mutex const&); mutex& operator = (mutex const&); }; void full_memory_fence() { _mm_mfence(); } #define THREAD_LOCAL __declspec(thread) #elif defined(POSIX) && defined(GCC) #include #include class semaphore { public: semaphore() { sem_init(&sem_, 0, 0); } ~semaphore() { sem_destroy(&sem_); } void wait() { sem_wait(&sem_); } void post() { sem_post(&sem_); } private: sem_t sem_; semaphore(semaphore const&); semaphore& operator = (semaphore const&); }; class mutex { public: mutex() { pthread_mutex_init(&mutex_, 0); } ~mutex() { pthread_mutex_destroy(&mutex_); } void lock() { pthread_mutex_lock(&mutex_); } void unlock() { pthread_mutex_unlock(&mutex_); } private: pthread_mutex_t mutex_; mutex(mutex const&); mutex& operator = (mutex const&); }; void full_memory_fence() { __sync_synchronize(); } #define THREAD_LOCAL __thread #endif class lock { public: lock(mutex& m) : m_(m) { m.lock(); } ~lock() { m_.unlock(); } private: mutex& m_; lock(lock const&); lock& operator = (lock const&); }; /** simple single-threaded double-linked list * nothing interesting */ class dlist { public: struct node { node* prev_; node* next_; node() { prev_ = 0; next_ = 0; } }; dlist() { reset(); } void push(node* n) { size_ += 1; n->next_ = head_.next_; n->prev_ = &head_; head_.next_->prev_ = n; head_.next_ = n; } node* pop() { if (size_ == 0) return 0; node* n = head_.next_; remove(n); return n; } void remove(node* n) { size_ -= 1; n->prev_->next_ = n->next_; n->next_->prev_ = n->prev_; } size_t size() const { return size_; } node* begin() { return head_.next_; } void flush_to(dlist& target) { if (size_) { target.size_ = size_; target.head_.next_ = head_.next_; target.head_.next_->prev_ = &target.head_; target.tail_.prev_ = tail_.prev_; target.tail_.prev_->next_ = &target.tail_; } else { target.reset(); } reset(); } static bool not_last(node* n) { return n->next_ != 0; } static node* get_next(node* n) { return n->next_; } private: size_t volatile size_; node head_; node tail_; void reset() { size_ = 0; head_.next_ = &tail_; head_.prev_ = 0; tail_.next_ = 0; tail_.prev_ = &head_; } dlist(dlist const&); dlist& operator = (dlist const&); }; /** pre-thread descriptor for eventcount */ struct ec_thread { dlist::node node_; semaphore sema_; unsigned epoch_; bool volatile in_waitset_; bool spurious_; void* ctx_; ec_thread() { epoch_ = 0; in_waitset_ = false; spurious_ = false; ctx_ = 0; } ~ec_thread() { if (spurious_) sema_.wait(); } static ec_thread* current() { static THREAD_LOCAL ec_thread* ec_thread_instance = 0; ec_thread* instance = ec_thread_instance; if (instance == 0) { instance = new ec_thread; ec_thread_instance = instance; } return instance; // instance must be destroyed in DllMain() callback // or in pthread_key_create() callback } private: ec_thread(ec_thread const&); ec_thread& operator = (ec_thread const&); }; /** fine-grained eventcount implementation */ class eventcount { public: eventcount() { epoch_ = 0; } void prepare_wait(void* ctx = 0) { ec_thread* th = ec_thread::current(); // this is good place to pump previous spurious wakeup if (th->spurious_) { th->spurious_ = false; th->sema_.wait(); } th->in_waitset_ = true; th->ctx_ = ctx; { lock l (mtx_); th->epoch_ = epoch_; waitset_.push(&th->node_); } full_memory_fence(); } void wait() { ec_thread* th = ec_thread::current(); // this check is just an optimization if (th->epoch_ == epoch_) th->sema_.wait(); else retire_wait(); } void retire_wait() { ec_thread* th = ec_thread::current(); // spurious wakeup will be pumped in following prepare_wait() th->spurious_ = true; // try to remove node from waitset if (th->in_waitset_) { lock l (mtx_); if (th->in_waitset_) { // successfully removed from waitset, // so there will be no spurious wakeup th->in_waitset_ = false; th->spurious_ = false; waitset_.remove(&th->node_); } } } void notify_one() { full_memory_fence(); notify_one_relaxed(); } template void notify(predicate_t pred) { full_memory_fence(); notify_relaxed(pred); } void notify_all() { full_memory_fence(); notify_all_relaxed(); } void notify_one_relaxed() { if (waitset_.size() == 0) return; dlist::node* n; { lock l (mtx_); epoch_ += 1; n = waitset_.pop(); if (n) to_ec_thread(n)->in_waitset_ = false; } if (n) { to_ec_thread(n)->sema_.post(); } } template void notify_relaxed(predicate_t pred) { if (waitset_.size() == 0) return; dlist temp; { lock l (mtx_); epoch_ += 1; size_t size = waitset_.size(); size_t idx = 0; dlist::node* n = waitset_.begin(); while (dlist::not_last(n)) { dlist::node* next = dlist::get_next(n); ec_thread* th = to_ec_thread(n); if (pred(th->ctx_, size, idx)) { waitset_.remove(n); temp.push(n); th->in_waitset_ = false; } n = next; idx += 1; } } dlist::node* n = temp.begin(); while (dlist::not_last(n)) { dlist::node* next = dlist::get_next(n); to_ec_thread(n)->sema_.post(); n = next; } } void notify_all_relaxed() { if (waitset_.size() == 0) return; dlist temp; { lock l (mtx_); epoch_ += 1; waitset_.flush_to(temp); dlist::node* n = temp.begin(); while (dlist::not_last(n)) { to_ec_thread(n)->in_waitset_ = false; n = dlist::get_next(n); } } dlist::node* n = temp.begin(); while (dlist::not_last(n)) { dlist::node* next = dlist::get_next(n); to_ec_thread(n)->sema_.post(); n = next; } } private: mutex mtx_; dlist waitset_; volatile unsigned epoch_; ec_thread* to_ec_thread(dlist::node* n) { return (ec_thread*)((char*)n - offsetof(ec_thread, node_)); } eventcount(eventcount const&); eventcount& operator = (eventcount const&); }; struct scheduler { struct tbb_thread {}; eventcount ec_; tbb_thread* threads_; bool volatile is_permanently_open_; void wait_while_pool_is_empty(tbb_thread* th) { if (is_permanently_open_) return; ec_.prepare_wait(th); if (pool_is_empty()) ec_.wait(); else ec_.retire_wait(); } void notify_about_new_task_available() { ec_.notify_one_relaxed(); } void notify_about_new_task_available_with_preference(tbb_thread* preference) { struct local { tbb_thread* preference_; bool fired_; bool operator () (void* ctx, size_t count, size_t idx) { tbb_thread* th = (tbb_thread*)ctx; if (th == preference_) { fired_ = true; return true; } else if (idx == count - 1 && fired_ == false) { return true; } else { return false; } } } pred = {preference}; ec_.notify_relaxed(pred); } void notify_about_list_of_tasks_available(size_t total_count, size_t preference_count, tbb_thread** preferences) { struct local { size_t remain_to_signal_; size_t preference_count_; tbb_thread** preferences_; bool operator () (void* ctx, size_t count, size_t idx) { tbb_thread* th = (tbb_thread*)ctx; size_t remain_in_waitset = count - idx; if (remain_in_waitset <= remain_to_signal_) { return true; } else { for (size_t i = 0; i != preference_count_; ++i) { if (preferences_[i] == th) { remain_to_signal_ -= 1; return true; } } } return false; } } pred = {total_count, preference_count, preferences}; ec_.notify_relaxed(pred); } bool pool_is_empty() { return true; } }; struct queue { int producer_idx_; int consumer_idx_; void** buffer_; eventcount ec_; void enqueue(void* data) { int idx = ++producer_idx_; // atomic buffer_[idx] = data; struct local { int idx_; bool operator () (void* ctx, size_t /*count*/, size_t /*idx*/) { return idx_ == *(int*)ctx; } } pred = {idx}; ec_.notify(pred); // not relaxed!!! } void* dequeue() { int idx = ++consumer_idx_; // atomic void* data = buffer_[idx]; if (data) return data; for (;;) { ec_.prepare_wait(&idx); data = buffer_[idx]; if (data) { ec_.retire_wait(); return data; } ec_.wait(); data = buffer_[idx]; if (data) { return data; } } } }; class condition_variable { eventcount ec_; public: void wait(mutex& mtx) { ec_.prepare_wait(); mtx.unlock(); ec_.wait(); mtx.lock(); } void signal() { ec_.notify_one(); } void broadcast() { ec_.notify_all(); } }; struct eventcount_test : rl::test_suite { void thread(unsigned index) { delete ec_thread::current(); (void)index; } }; int main() { rl::test_params p; //p.iteration_count = 1000000; rl::simulate(p); } ================================================ FILE: tests/relacy/relacy/example/eventcount/msvc8/eventcount.sln ================================================  Microsoft Visual Studio Solution File, Format Version 9.00 # Visual Studio 2005 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "eventcount", "eventcount.vcproj", "{ECB64178-A35E-4EB2-9EB0-BD72D6F7B6E5}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Win32 = Debug|Win32 Release|Win32 = Release|Win32 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {ECB64178-A35E-4EB2-9EB0-BD72D6F7B6E5}.Debug|Win32.ActiveCfg = Debug|Win32 {ECB64178-A35E-4EB2-9EB0-BD72D6F7B6E5}.Debug|Win32.Build.0 = Debug|Win32 {ECB64178-A35E-4EB2-9EB0-BD72D6F7B6E5}.Release|Win32.ActiveCfg = Release|Win32 {ECB64178-A35E-4EB2-9EB0-BD72D6F7B6E5}.Release|Win32.Build.0 = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection EndGlobal ================================================ FILE: tests/relacy/relacy/example/eventcount/msvc8/eventcount.vcproj ================================================ ================================================ FILE: tests/relacy/relacy/example/eventcount/msvc9/eventcount.sln ================================================  Microsoft Visual Studio Solution File, Format Version 10.00 # Visual Studio 2005 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "eventcount", "eventcount.vcproj", "{ECB64178-A35E-4EB2-9EB0-BD72D6F7B6E5}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Win32 = Debug|Win32 Release|Win32 = Release|Win32 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {ECB64178-A35E-4EB2-9EB0-BD72D6F7B6E4}.Debug|Win32.ActiveCfg = Debug|Win32 {ECB64178-A35E-4EB2-9EB0-BD72D6F7B6E4}.Debug|Win32.Build.0 = Debug|Win32 {ECB64178-A35E-4EB2-9EB0-BD72D6F7B6E4}.Release|Win32.ActiveCfg = Release|Win32 {ECB64178-A35E-4EB2-9EB0-BD72D6F7B6E4}.Release|Win32.Build.0 = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection EndGlobal ================================================ FILE: tests/relacy/relacy/example/eventcount/msvc9/eventcount.vcproj ================================================ ================================================ FILE: tests/relacy/relacy/example/eventcount/stdafx.cpp ================================================ // stdafx.cpp : source file that includes just the standard includes // ws_deque.pch will be the pre-compiled header // stdafx.obj will contain the pre-compiled type information #include "stdafx.h" // TODO: reference any additional headers you need in STDAFX.H // and not in this file ================================================ FILE: tests/relacy/relacy/example/eventcount/stdafx.h ================================================ #pragma once #define _WIN32_WINNT 0x0500 #include #include #include #include "../../relacy/pch.hpp" #include "../../relacy/relacy_std.hpp" ================================================ FILE: tests/relacy/relacy/example/examples/amp_condvar.hpp ================================================ #pragma once struct amp_raw_condition_variable_s { CRITICAL_SECTION access_waiting_threads_count_critsec; HANDLE wake_waiting_threads_mutex; HANDLE waking_waiting_threads_count_control_sem; HANDLE finished_waking_waiting_threads_event; VAR_T(LONG) waiting_thread_count; VAR_T(BOOL) broadcast_in_progress; }; struct amp_raw_mutex_s { CRITICAL_SECTION critical_section; BOOL is_locked; }; typedef amp_raw_condition_variable_s* amp_raw_condition_variable_t; typedef amp_raw_mutex_s* amp_raw_mutex_t; int const AMP_SUCCESS = 0; int amp_raw_mutex_init(amp_raw_mutex_t mutex) { InitializeCriticalSectionAndSpinCount(&mutex->critical_section, 1); mutex->is_locked = FALSE; return AMP_SUCCESS; } int amp_raw_mutex_finalize(amp_raw_mutex_t mutex) { assert(NULL != mutex); int retval = AMP_SUCCESS; DeleteCriticalSection(&mutex->critical_section); return retval; } int amp_raw_mutex_lock(amp_raw_mutex_t mutex) { assert(NULL != mutex); EnterCriticalSection(&mutex->critical_section); mutex->is_locked = TRUE; return AMP_SUCCESS; } int amp_raw_mutex_unlock(amp_raw_mutex_t mutex) { assert(NULL != mutex); mutex->is_locked = FALSE; LeaveCriticalSection(&mutex->critical_section); return AMP_SUCCESS; } int amp_raw_condition_variable_init(amp_raw_condition_variable_t cond) { InitializeCriticalSectionAndSpinCount(&cond->access_waiting_threads_count_critsec, 1); cond->wake_waiting_threads_mutex = CreateMutex(0, 0, 0); cond->waking_waiting_threads_count_control_sem = CreateSemaphore(NULL, /* No inheritance to child processes */ 0, /* Initially no threads can pass */ LONG_MAX, /* Max semaphore count */ NULL); /* Only intra-process semaphore */ cond->finished_waking_waiting_threads_event = CreateEvent(NULL, /* Default security and no inheritance to child processes */ FALSE, /* No manual reset */ 0, /* Initially not signaled */ NULL /* Not inter-process available */ ); cond->VAR(waiting_thread_count) = 0l; cond->VAR(broadcast_in_progress) = FALSE; return AMP_SUCCESS; } int amp_raw_condition_variable_finalize(amp_raw_condition_variable_t cond) { DeleteCriticalSection(&cond->access_waiting_threads_count_critsec); CloseHandle(cond->wake_waiting_threads_mutex); CloseHandle(cond->waking_waiting_threads_count_control_sem); CloseHandle(cond->finished_waking_waiting_threads_event); int ret_error_code = AMP_SUCCESS; return ret_error_code; } int amp_raw_condition_variable_signal(amp_raw_condition_variable_t cond) { WaitForSingleObject(cond->wake_waiting_threads_mutex, INFINITE); BOOL at_least_one_waiting_thread = (0l != cond->VAR(waiting_thread_count)); if (at_least_one_waiting_thread) { LONG prev_sem_count = 0; ReleaseSemaphore(cond->waking_waiting_threads_count_control_sem, 1, &prev_sem_count /* No interest in the previous sem count. */ ); WaitForSingleObject(cond->finished_waking_waiting_threads_event, INFINITE); } ReleaseMutex(cond->wake_waiting_threads_mutex); return AMP_SUCCESS; } int amp_raw_condition_variable_broadcast(amp_raw_condition_variable_t cond) { WaitForSingleObject(cond->wake_waiting_threads_mutex, INFINITE); LONG const waiting_thread_count = cond->VAR(waiting_thread_count); if (0 < waiting_thread_count) { cond->VAR(broadcast_in_progress) = TRUE; /* Releasing the sem here and waiting on it should update the memory of * the waiting threads to see that a broadcast is in progress. */ LONG prev_sem_count = 0; /* Assuming that less threads exist than max possible semaphore count. * TODO: @todo Decide if to spin here if the assumption doesn't hold * true in the future? */ ReleaseSemaphore(cond->waking_waiting_threads_count_control_sem, waiting_thread_count, &prev_sem_count /* No interest in the previous sem count. */ ); WaitForSingleObject(cond->finished_waking_waiting_threads_event, INFINITE); cond->VAR(broadcast_in_progress) = FALSE; } ReleaseMutex(cond->wake_waiting_threads_mutex); return AMP_SUCCESS; } int amp_raw_condition_variable_wait(amp_raw_condition_variable_t cond, struct amp_raw_mutex_s *mutex) { WaitForSingleObject(cond->wake_waiting_threads_mutex, INFINITE); { ++(cond->VAR(waiting_thread_count)); } amp_raw_mutex_unlock(mutex); SignalObjectAndWait(cond->wake_waiting_threads_mutex, cond->waking_waiting_threads_count_control_sem, INFINITE, FALSE); BOOL broadcast_in_progress = FALSE; LONG count = 0; EnterCriticalSection(&cond->access_waiting_threads_count_critsec); { count = --(cond->VAR(waiting_thread_count)); broadcast_in_progress = cond->VAR(broadcast_in_progress); } LeaveCriticalSection(&cond->access_waiting_threads_count_critsec); BOOL all_waiting_threads_awake = TRUE; if (TRUE == broadcast_in_progress && count > 0) { all_waiting_threads_awake = FALSE; } if (TRUE == all_waiting_threads_awake) { SetEvent(cond->finished_waking_waiting_threads_event); } amp_raw_mutex_lock(mutex); return AMP_SUCCESS; } struct amp_condvar_test : rl::test_suite { VAR_T(int) data; amp_raw_mutex_s mtx; amp_raw_condition_variable_s cv; void before() { VAR(data) = 0; amp_raw_mutex_init(&mtx); amp_raw_condition_variable_init(&cv); } void after() { amp_raw_mutex_finalize(&mtx); amp_raw_condition_variable_finalize(&cv); } void thread(unsigned index) { if (0 == index) { amp_raw_mutex_lock(&mtx); data($) += 1; amp_raw_condition_variable_signal(&cv); amp_raw_mutex_unlock(&mtx); } else { amp_raw_mutex_lock(&mtx); while (0 == data($)) { amp_raw_condition_variable_wait(&cv, &mtx); } amp_raw_mutex_unlock(&mtx); } } }; struct amp_condvar_test2 : rl::test_suite { VAR_T(int) stage; amp_raw_mutex_s mtx; amp_raw_condition_variable_s cv; void before() { VAR(stage) = 0; amp_raw_mutex_init(&mtx); amp_raw_condition_variable_init(&cv); } void after() { amp_raw_mutex_finalize(&mtx); amp_raw_condition_variable_finalize(&cv); } void thread(unsigned index) { if (0 == index) { amp_raw_mutex_lock(&mtx); stage($) += 1; amp_raw_condition_variable_broadcast(&cv); while (stage($) < 2) amp_raw_condition_variable_wait(&cv, &mtx); amp_raw_mutex_unlock(&mtx); } else if (1 == index) { amp_raw_mutex_lock(&mtx); while (stage($) != 1) amp_raw_condition_variable_wait(&cv, &mtx); stage($) += 1; amp_raw_condition_variable_broadcast(&cv); amp_raw_mutex_unlock(&mtx); } else if (2 == index) { amp_raw_mutex_lock(&mtx); while (stage($) != 2) amp_raw_condition_variable_wait(&cv, &mtx); stage($) += 1; //amp_raw_condition_variable_broadcast(&cv); amp_raw_mutex_unlock(&mtx); amp_raw_condition_variable_signal(&cv); } else if (3 == index) { amp_raw_mutex_lock(&mtx); while (stage($) != 3) amp_raw_condition_variable_wait(&cv, &mtx); amp_raw_mutex_unlock(&mtx); } } }; ================================================ FILE: tests/relacy/relacy/example/examples/examples.cpp ================================================ #include "stdafx.h" #include "spsc_overwrite_queue.hpp" #include "amp_condvar.hpp" int main() { rl::test_params p; p.iteration_count = 10000; //p.search_type = rl::sched_bound; //p.context_bound = 3; rl::execute(p); rl::simulate(p); rl::simulate(p); } ================================================ FILE: tests/relacy/relacy/example/examples/msvc9/examples.sln ================================================  Microsoft Visual Studio Solution File, Format Version 10.00 # Visual Studio 2008 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "examples", "examples.vcproj", "{6CC59CF8-408B-441B-8F65-15651210CB82}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Win32 = Debug|Win32 Release|Win32 = Release|Win32 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {6CC59CF8-408B-441B-8F65-15651210CB82}.Debug|Win32.ActiveCfg = Debug|Win32 {6CC59CF8-408B-441B-8F65-15651210CB82}.Debug|Win32.Build.0 = Debug|Win32 {6CC59CF8-408B-441B-8F65-15651210CB82}.Release|Win32.ActiveCfg = Release|Win32 {6CC59CF8-408B-441B-8F65-15651210CB82}.Release|Win32.Build.0 = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection EndGlobal ================================================ FILE: tests/relacy/relacy/example/examples/msvc9/examples.vcproj ================================================ ================================================ FILE: tests/relacy/relacy/example/examples/spsc_overwrite_queue.hpp ================================================ #pragma once template class queue { public: queue(size_t count) { assert(count >= 6); sema = CreateSemaphore(0, 0, 1, 0); waiting.store(false, std::memory_order_relaxed); deq_node = 0; block = new node [count]; block->next.store(0, std::memory_order_relaxed); full_tail = block; full_head.store(block, std::memory_order_relaxed); free_head = block + 1; free_tail.store(block + count - 1, std::memory_order_relaxed); free_tail.load(std::memory_order_relaxed)->next.store(0, std::memory_order_relaxed); for (size_t i = 1; i != count - 1; i += 1) block[i].next.store(block + i + 1, std::memory_order_relaxed); } ~queue() { CloseHandle(sema); delete [] block; } VAR_T(T)& enqueue_prepare() { return full_tail->data; } void enqueue_commit() { node* n = get_free_node(); n->next.store(0, std::memory_order_release); full_tail->next.store(n, std::memory_order_seq_cst); bool signal = waiting.load(std::memory_order_seq_cst); full_tail = n; if (signal) { waiting.store(false, std::memory_order_relaxed); ReleaseSemaphore(sema, 1, 0); } } VAR_T(T)& dequeue_prepare() { deq_node = get_full_node(); return deq_node->data; } void dequeue_commit() { deq_node->next.store(0, std::memory_order_release); node* prev = free_tail.exchange(deq_node, std::memory_order_acq_rel); prev->next.store(deq_node, std::memory_order_release); } private: struct node { std::atomic next; VAR_T(T) data; }; node* block; node* full_tail; node* free_head; node* deq_node; char pad [64]; std::atomic full_head; std::atomic free_tail; std::atomic waiting; HANDLE sema; node* get_free_node() { for (;;) { node* n = free_head; node* next = n->next.load(std::memory_order_acquire); if (next) { free_head = next; return n; } n = full_head.load(std::memory_order_acquire); next = n->next.load(std::memory_order_acquire); if (next) { if (full_head.compare_exchange_strong(n, next, std::memory_order_seq_cst)) { //node* n2 = free_head; //node* next2 = n2->next.load(std::memory_order_acquire); //if (next2) //{ // n->next.store(0, std::memory_order_release); // node* prev = free_tail.exchange(n, std::memory_order_acq_rel); // prev->next.store(n, std::memory_order_release); // free_head = next2; // return n2; //} //else { return n; } } } } } node* get_full_node() { node* n = full_head.load(std::memory_order_acquire); for (;;) { node* next = n->next.load(std::memory_order_acquire); if (next == 0) { waiting.store(true, std::memory_order_seq_cst); n = full_head.load(std::memory_order_seq_cst); next = n->next.load(std::memory_order_acquire); if (next) { waiting.store(false, std::memory_order_relaxed); } else { WaitForSingleObject(sema, INFINITE); n = full_head.load(std::memory_order_acquire); continue; } } if (full_head.compare_exchange_strong(n, next, std::memory_order_acq_rel)) return n; } } }; unsigned RL_STDCALL consumer_thread(void* ctx) { queue* q = (queue*)ctx; int prev_data = -1; for (;;) { VAR_T(int)& data0 = q->dequeue_prepare(); int data = VAR(data0); assert(data > prev_data); prev_data = data; q->dequeue_commit(); //printf("%d\n", prev_data); if (prev_data == 11) break; //Sleep(5); } return 0; } unsigned RL_STDCALL producer_thread(void* ctx) { queue* q = (queue*)ctx; for (int i = 0; i != 12; i += 1) { VAR_T(int)& data = q->enqueue_prepare(); VAR(data) = i; q->enqueue_commit(); //Sleep(1); } return 0; } void spsc_overwrite_queue_test() { queue q (6); HANDLE th [2]; th[0] = (HANDLE)_beginthreadex(0, 0, consumer_thread, &q, 0, 0); th[1] = (HANDLE)_beginthreadex(0, 0, producer_thread, &q, 0, 0); WaitForMultipleObjects(2, th, 1, INFINITE); for (int i = 100; i != 104; i += 1) { VAR_T(int)& data = q.enqueue_prepare(); VAR(data) = i; q.enqueue_commit(); } for (int i = 100; i != 104; i += 1) { VAR_T(int)& data0 = q.dequeue_prepare(); int data = VAR(data0); assert(data == i); q.dequeue_commit(); } } ================================================ FILE: tests/relacy/relacy/example/examples/stdafx.cpp ================================================ #include "stdafx.h" ================================================ FILE: tests/relacy/relacy/example/examples/stdafx.h ================================================ #pragma once #ifdef NDEBUG # define _SECURE_SCL 0 #endif #define RL_FORCE_SEQ_CST #define RL_MSVC_OUTPUT //#define RL_DEBUGBREAK_ON_FAILURE #include "../../relacy/pch.hpp" #include "../../relacy/relacy_std.hpp" #include "../../relacy/stdlib/windows.hpp" ================================================ FILE: tests/relacy/relacy/example/java_ws_deque/java_ws_deque.cpp ================================================ #include "stdafx.h" #include "../../relacy/relacy_java.hpp" using rl::jvar; using rl::jvolatile; using rl::mutex; template class ws_deque { public: ws_deque() { m_mask($) = initial_size - 1; m_headIndex($) = 0; m_tailIndex($) = 0; m_array($) = new jvar [initial_size]; m_arraySize($) = initial_size; } bool IsEmpty() { return m_headIndex($) >= m_tailIndex($); } size_t Count() { return m_tailIndex($) - m_headIndex($); } void push(T item) { size_t tail = m_tailIndex($); if (tail <= m_headIndex($) + m_mask($)) { m_array($)[tail & m_mask($)]($) = item; m_tailIndex($) = tail + 1; } else { m_foreignLock.lock($); size_t head = m_headIndex($); size_t count = Count(); if (count >= m_mask($)) { size_t arraySize = m_arraySize($); size_t mask = m_mask($); jvar* newArray = new jvar [arraySize * 2]; jvar* arr = m_array($); for (size_t i = 0; i != count; ++i) newArray[i]($) = arr[(i + head) & mask]($); m_array($) = newArray; m_arraySize($) = arraySize * 2; m_headIndex($) = 0; m_tailIndex($) = count; tail = count; m_mask($) = (mask * 2) | 1; } m_array($)[tail & m_mask($)]($) = item; m_tailIndex($) = tail + 1; m_foreignLock.unlock($); } } bool pop(T& item) { size_t tail = m_tailIndex($); if (tail == 0) return false; tail -= 1; m_tailIndex($) = tail; if (m_headIndex($) <= tail) { item = m_array($)[tail & m_mask($)]($); return true; } else { m_foreignLock.lock($); if (m_headIndex($) <= tail) { item = m_array($)[tail & m_mask($)]($); m_foreignLock.unlock($); return true; } else { m_tailIndex($) = tail + 1; m_foreignLock.unlock($); return false; } } } bool steal(T& item) { if (false == m_foreignLock.try_lock($)) return false; size_t head = m_headIndex($); m_headIndex($) = head + 1; if (head < m_tailIndex($)) { item = m_array($)[head & m_mask($)]($); m_foreignLock.unlock($); return true; } else { m_headIndex($) = head; m_foreignLock.unlock($); return false; } } private: static size_t const initial_size = 2; jvar*> m_array; jvar m_mask; jvar m_arraySize; jvolatile m_headIndex; jvolatile m_tailIndex; mutex m_foreignLock; }; struct ws_deque_test : rl::test_suite { ws_deque q; bool state [2]; void before() { state[0] = true; state[1] = true; } void after() { RL_ASSERT(state[0] == false); RL_ASSERT(state[1] == false); } void thread(unsigned index) { if (0 == index) { q.push(1); q.push(2); int item = 0; bool res = q.pop(item); RL_ASSERT(res && item == 2); RL_ASSERT(state[1]); state[1] = false; item = 0; res = q.pop(item); if (res) { RL_ASSERT(state[0]); state[0] = false; } item = 0; res = q.pop(item); RL_ASSERT(res == false); } else { int item = 0; bool res = q.steal(item); if (res) { RL_ASSERT(item == 1); RL_ASSERT(state[0]); state[0] = false; } } } }; int main() { rl::simulate(); } ================================================ FILE: tests/relacy/relacy/example/java_ws_deque/msvc8/java_ws_deque.sln ================================================  Microsoft Visual Studio Solution File, Format Version 9.00 # Visual Studio 2005 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "java_ws_deque", "java_ws_deque.vcproj", "{D4756EE9-3953-4E17-B1B5-E89F853303C1}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Win32 = Debug|Win32 Release|Win32 = Release|Win32 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {D4756EE9-3953-4E17-B1B5-E89F853303C1}.Debug|Win32.ActiveCfg = Debug|Win32 {D4756EE9-3953-4E17-B1B5-E89F853303C1}.Debug|Win32.Build.0 = Debug|Win32 {D4756EE9-3953-4E17-B1B5-E89F853303C1}.Release|Win32.ActiveCfg = Release|Win32 {D4756EE9-3953-4E17-B1B5-E89F853303C1}.Release|Win32.Build.0 = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection EndGlobal ================================================ FILE: tests/relacy/relacy/example/java_ws_deque/msvc8/java_ws_deque.vcproj ================================================ ================================================ FILE: tests/relacy/relacy/example/java_ws_deque/stdafx.cpp ================================================ #include "stdafx.h" ================================================ FILE: tests/relacy/relacy/example/java_ws_deque/stdafx.h ================================================ #pragma once #include "../../relacy/pch.hpp" ================================================ FILE: tests/relacy/relacy/example/mpmc/mpmc.cpp ================================================ #include "stdafx.h" #ifdef RL_TEST #define ATOMIC(x) rl::atomic #define VAR(x) rl::var #define ATOMIC_FETCH_ADD(x, v) x($).fetch_add(v) #define ATOMIC_COMPARE_EXCHANGE(x, c, v) x($).compare_exchange(c, v) #define LOAD_ACQ(x) x($).load(rl::memory_order_acquire) #define STORE_REL(x, v) x($).store(v, rl::memory_order_release) #else #define ATOMIC(x) x volatile #define VAR(x) x #define ATOMIC_FETCH_ADD(x, v) _InterlockedExchangeAdd((long*)&x, v) #define ATOMIC_COMPARE_EXCHANGE(x, c, v) interlocked_compare_exchange(x, c, v) #define LOAD_ACQ(x) x #define STORE_REL(x, v) x = v template bool interlocked_compare_exchange(T& x, T& c, T v) { T c0 = _InterlockedCompareExchange((long*)&x), v, c); if (c0 == c) { return true; } else { c = c0; return false; } } #endif //#include "pcx.h" /* template class mpmcq { public: mpmcq() { STORE_REL(head_, alloc_block()); STORE_REL(tail_, LOAD_ACQ(head_)); } void enqueue(T v) { for (;;) { block* b = LOAD_ACQ(head_); unsigned raw = ATOMIC_FETCH_ADD(b->state_, state_head_inc); unsigned idx = raw >> state_head_pos; if (idx < item_count) { STORE_REL(b->data_[idx], v); return; } unsigned last = raw & state_last_msk; if (0 == last) { ATOMIC_COMPARE_EXCHANGE(head_, b, b+1); } else { block* b2 = LOAD_ACQ(b->next_); if (b2) { ATOMIC_COMPARE_EXCHANGE(head_, b, b2); } else { b2 = alloc_block(); block* b3 = 0; if (ATOMIC_COMPARE_EXCHANGE(b->next_, b3, b2)) { ATOMIC_COMPARE_EXCHANGE(head_, b, b2); } else { for (;;) { b = LOAD_ACQ(head_); while (0 == (LOAD_ACQ(b->state_) & state_last_msk)) b = b + 1; while (LOAD_ACQ(b->next_)) b = LOAD_ACQ(b->next_) + block_count - 1; b3 = 0; if (ATOMIC_COMPARE_EXCHANGE(b->next_, b3, b2)) break; } } } } } } T dequeue() { for (;;) { block* b = LOAD_ACQ(tail_); unsigned cmp = LOAD_ACQ(b->state_); unsigned tail = cmp & (state_last_msk - 1); if (tail < item_count) { unsigned head = cmp >> state_head_pos; if (tail < head) { unsigned xchg = cmp + state_tail_inc; if (ATOMIC_COMPARE_EXCHANGE(b->state_, cmp, xchg)) { for (;;) { T v = LOAD_ACQ(b->data_[tail]); if (v != T()) return v; rl::yield($); } } } else { return T(); } } else { unsigned last = cmp & state_last_msk; if (0 == last) { ATOMIC_COMPARE_EXCHANGE(tail_, b, b+1); } else { block* b2 = LOAD_ACQ(b->next_); if (0 == b2) return T(); ATOMIC_COMPARE_EXCHANGE(tail_, b, b2); } } } } private: static unsigned const state_head_pos = 7; static unsigned const state_head_inc = 1 << state_head_pos; static unsigned const state_last_msk = 1 << 6; static unsigned const state_tail_inc = 1 << 0; static unsigned const item_count = 2; static unsigned const block_count = 16; struct block { //unsigned head_ : 24; //unsigned last_ : 1; //unsigned tail_ : 7; ATOMIC(unsigned) state_; ATOMIC(block*) next_; ATOMIC(T) data_ [item_count]; }; struct superblock { block blocks_ [block_count]; }; char pad0_ [64]; ATOMIC(block*) head_; char pad1_ [64]; ATOMIC(block*) tail_; char pad2_ [64]; block* alloc_block() { superblock* sb = RL_NEW(superblock); for (int x = 0; x != block_count; ++x) { block* b = &sb->blocks_[x]; STORE_REL(b->state_, 0); STORE_REL(b->next_, 0); for (int y = 0; y != item_count; ++y) { STORE_REL(b->data_[y], 0); } } STORE_REL(sb->blocks_[block_count - 1].state_, 1 * state_head_inc + 1 * state_tail_inc + state_last_msk); return &sb->blocks_[0]; } }; struct test_mpmc : rl::test_suite { mpmcq q; void thread(unsigned idx) { if (idx < thread_count / 2) { for (int i = 0; i != 2; ++i) q.enqueue(1); } else { for (int i = 0; i != 2; ++i) q.dequeue(); } } }; */ struct thread_node { rl::var next; rl::var count; rl::var unconsumed; rl::HANDLE sema; rl::CRITICAL_SECTION mtx; }; void on_thread_exit(thread_node*& t_thread_node) { thread_node* head = t_thread_node; thread_node* my = 0; if (head) { rl::EnterCriticalSection(&head->mtx, $); std::atomic_thread_fence($)(std::memory_order_seq_cst); if (head->next($)) { my = head->next($); head->next($) = (thread_node*)my->next($); } else { my = head; } std::atomic_thread_fence($)(std::memory_order_seq_cst); rl::LeaveCriticalSection(&head->mtx, $); while (my->unconsumed($)) { rl::WaitForSingleObject(my->sema, rl::RL_INFINITE, $); my->unconsumed($) -= 1; } rl::DeleteCriticalSection(&my->mtx, $); rl::CloseHandle(my->sema, $); RL_DELETE(my); } } struct eventcount { eventcount() { root($) = 0; rl::InitializeCriticalSection(&mtx, $); } ~eventcount() { rl::DeleteCriticalSection(&mtx, $); } void prepare_wait(thread_node*& t_thread_node) { thread_node* my = 0; thread_node* head = t_thread_node; if (head) { rl::EnterCriticalSection(&head->mtx, $); std::atomic_thread_fence($)(std::memory_order_seq_cst); //RL_ASSERT(head->status == stat_root); RL_ASSERT (root($) != head); if (head->next($)) { my = head->next($); head->next($) = (thread_node*)my->next($); my->next($) = 0; //node_status st; //if (stat_bucket != (st = (node_status)_InterlockedExchange(&my->status, stat_private))) // __asm int 3; RL_ASSERT (0 == my->count($)); } else { my = head; //node_status st; //if (stat_root != (st = (node_status)_InterlockedExchange(&my->status, stat_private))) // __asm int 3; RL_ASSERT(0 == my->count($)); } std::atomic_thread_fence($)(std::memory_order_seq_cst); rl::LeaveCriticalSection(&head->mtx, $); } else { my = RL_NEW thread_node; my->next($) = 0; my->count($) = 0; my->unconsumed($) = 0; my->sema = rl::CreateSemaphore(0, 0, LONG_MAX, 0, $); //my->status = stat_private; rl::InitializeCriticalSection(&my->mtx, $); } while (my->unconsumed($)) { rl::WaitForSingleObject(my->sema, rl::RL_INFINITE, $); my->unconsumed($) -= 1; } RL_ASSERT(0 == my->next($)); RL_ASSERT(0 == my->count($)); //if (my->status != stat_private) __asm int 3; rl::EnterCriticalSection(&mtx, $); std::atomic_thread_fence($)(std::memory_order_seq_cst); RL_ASSERT(root($) != my); if (root($)) { my->next($) = (thread_node*)((thread_node*)root($))->next($); ((thread_node*)root($))->next($) = my; //node_status st; //if (stat_private != (st = (node_status)_InterlockedExchange(&my->status, stat_bucket))) // __asm int 3; my = root($); } else { root($) = my; //node_status st; //if (stat_private != (st = (node_status)_InterlockedExchange(&my->status, stat_root))) // __asm int 3; } ((thread_node*)root($))->count($) += 1; std::atomic_thread_fence($)(std::memory_order_seq_cst); rl::LeaveCriticalSection(&mtx, $); t_thread_node = my; } void wait(thread_node*& t_thread_node) { thread_node* head = t_thread_node; if (head == root($)) { rl::WaitForSingleObject(head->sema, rl::RL_INFINITE, $); } else { rl::EnterCriticalSection(&head->mtx, $); std::atomic_thread_fence($)(std::memory_order_seq_cst); head->unconsumed($) += 1; std::atomic_thread_fence($)(std::memory_order_seq_cst); rl::LeaveCriticalSection(&head->mtx, $); } } void retire_wait(thread_node*& t_thread_node) { thread_node* head = t_thread_node; if (head == root($)) { rl::EnterCriticalSection(&mtx, $); std::atomic_thread_fence($)(std::memory_order_seq_cst); if (head == root($)) { thread_node* my = 0; head->count($) -= 1; if (head->next($)) { my = head->next($); head->next($) = (thread_node*)my->next($); my->next($) = 0; } else { my = head; root($) = 0; } std::atomic_thread_fence($)(std::memory_order_seq_cst); rl::LeaveCriticalSection(&mtx, $); //my->status = stat_root; t_thread_node = my; return; } std::atomic_thread_fence($)(std::memory_order_seq_cst); rl::LeaveCriticalSection(&mtx, $); } rl::EnterCriticalSection(&head->mtx, $); std::atomic_thread_fence($)(std::memory_order_seq_cst); head->unconsumed($) += 1; std::atomic_thread_fence($)(std::memory_order_seq_cst); rl::LeaveCriticalSection(&head->mtx, $); } void signal_all() { //std:: //_mm_mfence(); thread_node* head = root($); if (0 == head) return; rl::EnterCriticalSection(&mtx, $); std::atomic_thread_fence($)(std::memory_order_seq_cst); if (head != root($)) { std::atomic_thread_fence($)(std::memory_order_seq_cst); rl::LeaveCriticalSection(&mtx, $); return; } size_t count = head->count($); head->count($) = 0; root($) = 0; std::atomic_thread_fence($)(std::memory_order_seq_cst); rl::LeaveCriticalSection(&mtx, $); rl::ReleaseSemaphore(head->sema, count, 0, $); } std::atomic root; rl::CRITICAL_SECTION mtx; }; struct test_ec : rl::test_suite { std::atomic x [2]; eventcount ec; void before() { x[0]($) = 0; x[1]($) = 0; } void thread(unsigned idx) { if (idx < 4) { for (int i = 0; i != 3; ++i) { x[idx % 2]($).fetch_add(1); ec.signal_all(); } } else { thread_node* my = 0; for (int i = 0; i != 3; ++i) { for (;;) { int cmp = x[idx % 2]($); if (cmp > 0) { if (x[idx % 2]($).compare_exchange(cmp, cmp - 1)) break; } else { for (;;) { ec.prepare_wait(my); cmp = x[idx % 2]($); if (cmp > 0) { ec.retire_wait(my); break; } ec.wait(my); cmp = x[idx % 2]($); if (cmp > 0) { break; } } } } } on_thread_exit(my); } } }; int main() { rl::test_params p; p.iteration_count = 20000000; p.initial_state = "10000000"; rl::simulate(p); } ================================================ FILE: tests/relacy/relacy/example/mpmc/msvc8/mpmc.sln ================================================  Microsoft Visual Studio Solution File, Format Version 9.00 # Visual Studio 2005 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mpmc", "mpmc.vcproj", "{ECB64178-A35E-4EB2-9EB0-BD72D6F7B6E4}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Win32 = Debug|Win32 Release|Win32 = Release|Win32 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {ECB64178-A35E-4EB2-9EB0-BD72D6F7B6E4}.Debug|Win32.ActiveCfg = Debug|Win32 {ECB64178-A35E-4EB2-9EB0-BD72D6F7B6E4}.Debug|Win32.Build.0 = Debug|Win32 {ECB64178-A35E-4EB2-9EB0-BD72D6F7B6E4}.Release|Win32.ActiveCfg = Release|Win32 {ECB64178-A35E-4EB2-9EB0-BD72D6F7B6E4}.Release|Win32.Build.0 = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection EndGlobal ================================================ FILE: tests/relacy/relacy/example/mpmc/msvc8/mpmc.vcproj ================================================ ================================================ FILE: tests/relacy/relacy/example/mpmc/pcx.h ================================================ #pragma once #include #pragma intrinsic (_InterlockedExchangeAdd) #pragma intrinsic (_InterlockedCompareExchange) //#define PCX_DEBUG #ifdef PCX_DEBUG #include #include #endif namespace rl { size_t const cacheline_size = 64; struct pcx_node { typedef void (*pcx_dtor_t)(pcx_node*); ATOMIC(pcx_node*) pcx_next_; ATOMIC(pcx_dtor_t) pcx_dtor_; }; namespace pcx_int { unsigned const word_bits = 32; unsigned const collector_bits = 4; unsigned const collector_count = 1 << collector_bits; unsigned const counter_inc = 1 << (collector_bits * 2); unsigned const is_current_inc = 1; unsigned const back_link_inc = 2; struct master; struct collector; struct local_collector { pcx_node* defer_head_; pcx_node defer_tail_; unsigned defer_size_; }; struct thread_int { pcx_int::master* master_; pcx_int::collector* collectors_; unsigned recursion_count_; unsigned is_acquired_; unsigned collector_index_; unsigned last_seen_collector_index_; unsigned flush_tail_; pcx_node* defer_head_; pcx_node defer_tail_; unsigned defer_size_; unsigned promote_; local_collector local_collectors_ [collector_count]; }; } class pcx_thread : private pcx_int::thread_int { public: static pcx_thread& get(); void acquire(); void release(); void defer(pcx_node* node, pcx_node::pcx_dtor_t dtor); void flush(); void promote(); void quiescent(); void init(); void deinit(); private: unsigned acquire_impl(); void release_impl(unsigned, unsigned); void flush_impl(); void local_flush(); void quiescent_impl(); friend void init(); friend void deinit(); friend void thread_callback(bool); }; namespace pcx_int { struct master { char pad0_ [64]; unsigned garbage_threshold_; char pad1_ [64]; struct state_part { unsigned current_collector_ : collector_bits; unsigned collector_tail_ : collector_bits; unsigned outer_counter_ : word_bits - 2 * collector_bits; }; union state { long whole_; state_part part_; }; state state_; char pad2_ [64]; state state_copy_; char pad3_ [64]; }; struct collector { char pad0_ [64]; pcx_node* defer_list_head_; unsigned defer_list_size_; char pad1_ [64]; struct state_part { unsigned is_current_ : 1; unsigned back_link_ : 1; unsigned pad_ : collector_bits * 2 - 2; unsigned inner_counter_ : word_bits - 2 * collector_bits; }; union state { long whole_; state_part part_; }; state state_; char pad2_ [64]; }; __declspec(selectany) master g_master; __declspec(selectany) collector g_collectors [collector_count]; __declspec(selectany, thread) thread_int* g_thread_instance; typedef void (__stdcall nt_tls_cb_t)(void*, unsigned long, void*); nt_tls_cb_t on_tls_callback; #pragma data_seg(push, old_seg) #pragma data_seg(".CRT$XLB") __declspec(selectany, dllexport) nt_tls_cb_t* volatile p_thread_callback = on_tls_callback; #pragma data_seg(pop, old_seg) inline void __stdcall on_tls_callback(void*, unsigned long reason, void*) { if (1 == reason) { init(); thread_callback(true); } else if (0 == reason) { thread_callback(false); deinit(); } if (2 == reason) { thread_callback(true); } else if (3 == reason) { thread_callback(false); } } } inline void init() { using namespace pcx_int; master& m = g_master; m.garbage_threshold_ = 128; m.state_.part_.current_collector_ = 0; m.state_.part_.collector_tail_ = 0; m.state_.part_.outer_counter_ = 0; m.state_copy_.part_.current_collector_ = 0; m.state_copy_.part_.collector_tail_ = 0; m.state_copy_.part_.outer_counter_ = 0; for (unsigned i = 0; i != collector_count; ++i) { collector& c = g_collectors[i]; c.defer_list_head_ = 0; c.defer_list_size_ = 0; c.state_.part_.is_current_ = 1; c.state_.part_.back_link_ = 1; c.state_.part_.inner_counter_ = 0; } g_collectors[0].state_.part_.back_link_ = 0; } inline void deinit() { using namespace pcx_int; pcx_thread::get().release_impl(g_master.state_.part_.current_collector_, is_current_inc); } inline void thread_callback(bool init) { if (init) { g_thread_instance = RL_NEW pcx_thread (); pcx_thread::get().init(); } else { pcx_thread::get().deinit(); RL_DELETE(g_thread_instance); g_thread_instance = 0; } } inline pcx_thread& pcx_thread::get() { return static_cast(*pcx_int::g_thread_instance); } inline unsigned pcx_thread::acquire_impl() { using namespace pcx_int; long const prev = _InterlockedExchangeAdd( &master_->state_.whole_, counter_inc); master::state_part u = {prev}; #ifdef PCX_DEBUG std::ostringstream ss; ss << "[PCX] thread " << this << " acquire " << u.current_collector_ << "\n"; OutputDebugStringA(ss.str().c_str()); #endif if (u.current_collector_ == flush_tail_ && local_collectors_[flush_tail_].defer_size_) { local_flush(); } return u.current_collector_; } inline void pcx_thread::release_impl(unsigned index, unsigned count) { using namespace pcx_int; collector& c = collectors_[index]; unsigned const prev = _InterlockedExchangeAdd( &c.state_.whole_, (unsigned)-(int)count); #ifdef PCX_DEBUG std::ostringstream ss; ss << "[PCX] thread " << this << " release " << index << "\n"; OutputDebugStringA(ss.str().c_str()); #endif if (0 == prev - count) { pcx_node* curr = c.defer_list_head_; while (curr) { pcx_node* next = curr->pcx_next_; curr->pcx_dtor_(curr); curr = next; } c.defer_list_head_ = 0; c.defer_list_size_ = 0; c.state_.part_.back_link_ = 1; c.state_.part_.is_current_ = 1; long u; if (index != collector_count - 1) u = collector_count; else u = -(long)(collector_count * (collector_count - 1)); _InterlockedExchangeAdd(&master_->state_.whole_, u); release_impl((index + 1) % collector_count, back_link_inc); } } inline void pcx_thread::flush_impl() { using namespace pcx_int; _mm_mfence(); master::state state = master_->state_; last_seen_collector_index_ = state.part_.current_collector_; collector& gc = collectors_[state.part_.current_collector_]; local_collector& lc = local_collectors_[state.part_.current_collector_]; lc.defer_head_->pcx_next_ = defer_tail_.pcx_next_; lc.defer_head_ = defer_tail_.pcx_next_; lc.defer_size_ += defer_size_; defer_head_ = &defer_tail_; defer_tail_.pcx_next_ = 0; defer_size_ = 0; if (master_->garbage_threshold_ < lc.defer_size_ || promote_) { master::state cmp; master::state val; do { cmp = master_->state_; if (cmp.part_.current_collector_ != last_seen_collector_index_) { promote_ = 0; return; } unsigned next_index = (last_seen_collector_index_ + 1) % collector_count; if (cmp.part_.collector_tail_ == next_index) return; val = cmp; val.part_.current_collector_ += 1; val.part_.outer_counter_ = 0; } while (cmp.whole_ != _InterlockedCompareExchange( (long*)&master_->state_.whole_, val.whole_, cmp.whole_)); last_seen_collector_index_ = val.part_.current_collector_; promote_ = 0; _InterlockedIncrement((long*)&master_->state_copy_.whole_); _InterlockedExchangeAdd((long*)&gc.state_.whole_, cmp.part_.outer_counter_ * counter_inc - is_current_inc); } } __declspec(noinline) inline void pcx_thread::local_flush() { using namespace pcx_int; if (flush_tail_ == master_->state_.part_.collector_tail_) return; #ifdef PCX_DEBUG std::ostringstream ss; ss << "[PCX] thread " << this << " flush " << flush_tail_ << "\n"; OutputDebugStringA(ss.str().c_str()); #endif local_collector& lc = local_collectors_[flush_tail_]; pcx_node* curr = lc.defer_tail_.pcx_next_; while (curr) { #ifdef PCX_DEBUG std::ostringstream ss; ss << "[PCX] thread " << this << " destroy " << curr << "\n"; OutputDebugStringA(ss.str().c_str()); #endif pcx_node* next = curr->pcx_next_; curr->pcx_dtor_(curr); curr = next; } lc.defer_head_ = &lc.defer_tail_; lc.defer_tail_.pcx_next_ = 0; lc.defer_size_ = 0; flush_tail_ = (flush_tail_ + 1) % collector_count; } __declspec(noinline) inline void pcx_thread::quiescent_impl() { using namespace pcx_int; if (defer_size_) flush_impl(); release_impl(collector_index_, counter_inc); collector_index_ = acquire_impl(); } inline void pcx_thread::acquire() { using namespace pcx_int; recursion_count_ += 1; if (1 != recursion_count_) return; if (is_acquired_) return; collector_index_ = acquire_impl(); last_seen_collector_index_ = collector_index_; is_acquired_ = 1; } inline void pcx_thread::release() { using namespace pcx_int; recursion_count_ -= 1; if (0 == recursion_count_) { if (master_->state_copy_.part_.current_collector_ != collector_index_ || promote_) { if (defer_size_) flush_impl(); release_impl(collector_index_, counter_inc); is_acquired_ = 0; } } if (flush_tail_ != last_seen_collector_index_) { local_flush(); } } inline void pcx_thread::quiescent() { if (master_->state_copy_.part_.current_collector_ != collector_index_ || promote_) { quiescent_impl(); } if (flush_tail_ != last_seen_collector_index_) { local_flush(); } } inline void pcx_thread::defer(pcx_node* node, pcx_node::pcx_dtor_t dtor) { using namespace pcx_int; node->pcx_next_ = 0; node->pcx_dtor_ = dtor; defer_head_->pcx_next_ = node; defer_head_ = node; defer_size_ += 1; } inline void pcx_thread::flush() { using namespace pcx_int; if (recursion_count_) return; if (0 == is_acquired_) return; if (defer_size_) flush_impl(); release_impl(collector_index_, counter_inc); is_acquired_ = 0; } inline void pcx_thread::promote() { promote_ = 1; } inline void pcx_thread::init() { using namespace pcx_int; master_ = &g_master; collectors_ = g_collectors; defer_head_ = &defer_tail_; defer_tail_.pcx_next_ = 0; for (unsigned i = 0; i != collector_count; ++i) { local_collectors_[i].defer_head_ = &local_collectors_[i].defer_tail_; } } inline void pcx_thread::deinit() { flush(); } } ================================================ FILE: tests/relacy/relacy/example/mpmc/stdafx.cpp ================================================ // stdafx.cpp : source file that includes just the standard includes // ws_deque.pch will be the pre-compiled header // stdafx.obj will contain the pre-compiled type information #include "stdafx.h" // TODO: reference any additional headers you need in STDAFX.H // and not in this file ================================================ FILE: tests/relacy/relacy/example/mpmc/stdafx.h ================================================ #pragma once #pragma warning (disable: 4201) //#define RL_GC #define RL_MSVC_OUTPUT #include "../../relacy/pch.hpp" #include "../../relacy/relacy_std.hpp" ================================================ FILE: tests/relacy/relacy/example/mutex_business_logic/msvc8/mutex_business_logic.sln ================================================  Microsoft Visual Studio Solution File, Format Version 9.00 # Visual Studio 2005 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mutex_business_logic", "mutex_business_logic.vcproj", "{D4756EE9-3953-4E17-B1B5-E89F853303C1}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Win32 = Debug|Win32 Release|Win32 = Release|Win32 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {D4756EE9-3953-4E17-B1B5-E89F853303C1}.Debug|Win32.ActiveCfg = Debug|Win32 {D4756EE9-3953-4E17-B1B5-E89F853303C1}.Debug|Win32.Build.0 = Debug|Win32 {D4756EE9-3953-4E17-B1B5-E89F853303C1}.Release|Win32.ActiveCfg = Release|Win32 {D4756EE9-3953-4E17-B1B5-E89F853303C1}.Release|Win32.Build.0 = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection EndGlobal ================================================ FILE: tests/relacy/relacy/example/mutex_business_logic/msvc8/mutex_business_logic.vcproj ================================================ ================================================ FILE: tests/relacy/relacy/example/mutex_business_logic/mutex_business_logic.cpp ================================================ #include "stdafx.h" #include "../../relacy/relacy_std.hpp" class business_logic { public: typedef unsigned account_id_t; typedef double balance_t; business_logic() { pthread_rwlock_init(&accounts_guard, 0); } ~business_logic() { pthread_rwlock_destroy(&accounts_guard); } bool add_account(account_id_t acc_id, balance_t balance) { pthread_rwlock_wrlock(&accounts_guard); if (accounts.find(acc_id) != accounts.end()) { pthread_rwlock_unlock(&accounts_guard); return false; } accounts[acc_id].balance = balance; pthread_rwlock_unlock(&accounts_guard); return true; } bool transfer_balance(account_id_t acc_id1, account_id_t acc_id2, balance_t amount) { if (acc_id1 == acc_id2) return true; pthread_rwlock_rdlock(&accounts_guard); if (accounts.find(acc_id1) == accounts.end() || accounts.find(acc_id2) == accounts.end()) { pthread_rwlock_unlock(&accounts_guard); return false; } account_info& acc1 = accounts[acc_id1]; account_info& acc2 = accounts[acc_id2]; if (acc_id1 > acc_id2) { pthread_mutex_lock(&acc1.mtx); pthread_mutex_lock(&acc2.mtx); } else { pthread_mutex_lock(&acc2.mtx); pthread_mutex_lock(&acc1.mtx); } pthread_rwlock_unlock(&accounts_guard); acc1.balance -= amount; acc2.balance += amount; pthread_mutex_unlock(&acc1.mtx); pthread_mutex_unlock(&acc2.mtx); return true; } private: struct account_info { balance_t balance; pthread_mutex_t mtx; account_info() : balance() { pthread_mutex_init(&mtx, 0); } account_info(account_info const& acc) : balance(acc.balance) { pthread_mutex_init(&mtx, 0); } ~account_info() { pthread_mutex_destroy(&mtx); } }; typedef std::map account_map_t; account_map_t accounts; pthread_rwlock_t accounts_guard; }; struct business_logic_test : rl::test_suite { business_logic bl; static size_t const account_count = 4; void before() { for (size_t i = 0; i != account_count; ++i) { bool rv = bl.add_account(i, i * 10.0); RL_ASSERT(rv); } } void thread(unsigned /*index*/) { business_logic::account_id_t acc1 = rl::rand(account_count); business_logic::account_id_t acc2 = rl::rand(account_count); bool rv = bl.transfer_balance(acc1, acc2, 1.0); RL_ASSERT(rv); } }; int main() { rl::simulate(); } ================================================ FILE: tests/relacy/relacy/example/mutex_business_logic/stdafx.cpp ================================================ #include "stdafx.h" ================================================ FILE: tests/relacy/relacy/example/mutex_business_logic/stdafx.h ================================================ #pragma once #ifdef NDEBUG # define _SECURE_SCL 0 #endif #define RL_MSVC_OUTPUT //#define RL_DEBUGBREAK_ON_FAILURE #include "../../relacy/pch.hpp" #include "../../relacy/relacy_std.hpp" ================================================ FILE: tests/relacy/relacy/example/peterson/msvc8/peterson.sln ================================================  Microsoft Visual Studio Solution File, Format Version 9.00 # Visual Studio 2005 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "peterson", "peterson.vcproj", "{D4756EE9-3953-4E17-B1B5-E89F853303C1}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Win32 = Debug|Win32 Release|Win32 = Release|Win32 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {D4756EE9-3953-4E17-B1B5-E89F853303C1}.Debug|Win32.ActiveCfg = Debug|Win32 {D4756EE9-3953-4E17-B1B5-E89F853303C1}.Debug|Win32.Build.0 = Debug|Win32 {D4756EE9-3953-4E17-B1B5-E89F853303C1}.Release|Win32.ActiveCfg = Release|Win32 {D4756EE9-3953-4E17-B1B5-E89F853303C1}.Release|Win32.Build.0 = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection EndGlobal ================================================ FILE: tests/relacy/relacy/example/peterson/msvc8/peterson.vcproj ================================================ ================================================ FILE: tests/relacy/relacy/example/peterson/msvc9/peterson.sln ================================================  Microsoft Visual Studio Solution File, Format Version 10.00 # Visual Studio 2008 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "peterson", "peterson.vcproj", "{D4756EE9-3953-4E17-B1B5-E89F853303C1}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Win32 = Debug|Win32 Release|Win32 = Release|Win32 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {D4756EE9-3953-4E17-B1B5-E89F853303C1}.Debug|Win32.ActiveCfg = Debug|Win32 {D4756EE9-3953-4E17-B1B5-E89F853303C1}.Debug|Win32.Build.0 = Debug|Win32 {D4756EE9-3953-4E17-B1B5-E89F853303C1}.Release|Win32.ActiveCfg = Release|Win32 {D4756EE9-3953-4E17-B1B5-E89F853303C1}.Release|Win32.Build.0 = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection EndGlobal ================================================ FILE: tests/relacy/relacy/example/peterson/msvc9/peterson.vcproj ================================================ ================================================ FILE: tests/relacy/relacy/example/peterson/peterson.cpp ================================================ #include "stdafx.h" #include "../../relacy/relacy_std.hpp" #include "../../relacy/windows.h" struct peterson_mutex_test : rl::test_suite { std::atomic flag0; std::atomic flag1; std::atomic turn; rl::var data; void before() { flag0($) = 0; flag1($) = 0; turn($) = 0; } void thread(unsigned index) { if (0 == index) { flag0($).store(1); turn($).store(1); while (flag1($).load() && 1 == turn($).load()); data($) = 1; flag0($).store(0); } else { flag1($).store(1); turn($).store(0); while (flag0($).load() && 0 == turn($).load()); data($) = 2; flag1($).store(0); } } }; struct peterson_mutex_test2 : rl::test_suite { std::atomic flag0; std::atomic flag1; std::atomic turn; rl::var data; void before() { flag0($) = 0; flag1($) = 0; turn($) = 0; } void thread(unsigned index) { if (0 == index) { flag0.store(1, rl::memory_order_relaxed); turn.exchange(1, rl::memory_order_acq_rel); while (flag1.load(rl::memory_order_acquire) && 1 == turn.load(rl::memory_order_relaxed)) rl::yield(1, $); data($) = 1; flag0.store(0, rl::memory_order_release); } else { flag1.store(1, rl::memory_order_relaxed); turn.exchange(0, rl::memory_order_acq_rel); while (flag0.load(rl::memory_order_acquire) && 0 == turn.load(rl::memory_order_relaxed)) rl::yield(1, $); data($) = 2; flag1.store(0, rl::memory_order_release); } } }; struct peterson_mutex_test3 : rl::test_suite { std::atomic flag0; std::atomic flag1; std::atomic turn; rl::var data; void before() { flag0($) = 0; flag1($) = 0; turn($) = 0; } void thread(unsigned index) { if (0 == index) { flag0.store(1, std::memory_order_relaxed); std::atomic_thread_fence(std::memory_order_seq_cst); turn.store(1, std::memory_order_relaxed); std::atomic_thread_fence(std::memory_order_seq_cst); while (flag1.load(std::memory_order_acquire) && 1 == turn.load(std::memory_order_relaxed)); data($) = 1; flag0.store(0, std::memory_order_release); } else { flag1.store(1, std::memory_order_relaxed); std::atomic_thread_fence(std::memory_order_seq_cst); turn.store(0, std::memory_order_relaxed); std::atomic_thread_fence(std::memory_order_seq_cst); while (flag0.load(std::memory_order_acquire) && 0 == turn.load(std::memory_order_relaxed)); data($) = 2; flag1.store(0, std::memory_order_release); } } }; // FAILS WITH DATA RACE struct peterson_mutex_test4 : rl::test_suite { std::atomic flag0; std::atomic flag1; std::atomic turn; rl::var data; void before() { flag0($) = 0; flag1($) = 0; turn($) = 0; } void thread(unsigned index) { if (0 == index) { flag0.exchange(1, rl::memory_order_acq_rel); turn.store(1, rl::memory_order_release); while (flag1.load(rl::memory_order_acquire) && 1 == turn.load(rl::memory_order_acquire)) rl::yield(1, $); data($) = 1; flag0.store(0, rl::memory_order_release); } else { flag1.exchange(1, rl::memory_order_acq_rel); turn.store(0, rl::memory_order_release); while (flag0.load(rl::memory_order_acquire) && 0 == turn.load(rl::memory_order_relaxed)) rl::yield(1, $); data($) = 2; flag1.store(0, rl::memory_order_release); } } }; class eventcount { public: typedef unsigned state_t; eventcount() { state_.store(0, std::memory_order_relaxed); sema_ = CreateSemaphore(0, 0, LONG_MAX, 0); } ~eventcount() { CloseHandle(sema_); } state_t prepare() { return state_.fetch_add(waiters_inc, std::memory_order_seq_cst); } void retire() { state_.fetch_add((state_t)-(int)waiters_inc, std::memory_order_seq_cst); } void wait(state_t cmp) { WaitForSingleObject(sema_, INFINITE); state_t cmp0 = state_.load(std::memory_order_seq_cst); if ((cmp & generation_mask) == (cmp0 & generation_mask)) { state_.fetch_add((state_t)-(int)waiters_inc, std::memory_order_seq_cst); ReleaseSemaphore(sema_, 1, 0); SwitchToThread(); } } void signal() { std::atomic_thread_fence(std::memory_order_seq_cst); signal_relaxed(); } void signal_relaxed() { state_t cmp = state_.load(std::memory_order_seq_cst); if (0 == (cmp & waiters_mask)) return; for (;;) { state_t xchg = (cmp & ~waiters_mask) + generation_inc; if (state_.compare_exchange_weak(cmp, xchg, std::memory_order_seq_cst)) { ReleaseSemaphore(sema_, cmp & waiters_mask, 0); return; } if (0 == (cmp & waiters_mask)) return; } } private: std::atomic state_; HANDLE sema_; static state_t const waiters_inc = 1; static state_t const waiters_mask = (1 << 20) - 1; static state_t const generation_inc = 1 << 20; static state_t const generation_mask = ~waiters_mask; eventcount(eventcount const&); eventcount& operator = (eventcount const&); }; class eventcount_blocking { public: eventcount_blocking(eventcount& ec) : ec_(ec) { cmp_ = ec_.prepare(); wait_ = false; } void wait() { RL_ASSERT(false == wait_); wait_ = true; ec_.wait(cmp_); } ~eventcount_blocking() { if (false == wait_) ec_.retire(); } private: eventcount& ec_; eventcount::state_t cmp_; bool wait_; eventcount_blocking(eventcount_blocking const&); eventcount_blocking& operator = (eventcount_blocking const&); }; struct signaling_test : rl::test_suite { //rl::HANDLE var_wait_for_items; //rl::CRITICAL_SECTION mtx_items_avail; //std::atomic n_waiting_consumers; //rl::var consumer_wait_generation; //rl::var n_consumers_to_wakeup; eventcount ec_; static int const max_queue_length = 4; int queue [max_queue_length]; int queue_head; int queue_tail; int queue_head_data; int queue_tail_data; void before() { //var_wait_for_items = rl::CreateEvent(0, 1, 0, 0, $); //rl::InitializeCriticalSection(&mtx_items_avail, $); //n_waiting_consumers($) = 0; //consumer_wait_generation($) = 0; //n_consumers_to_wakeup($) = 0; for (int i = 0; i != max_queue_length; ++i) queue[i] = 0; queue_head = 0; queue_tail = 0; queue_head_data = 0; queue_tail_data = 0; } void after() { //rl::CloseHandle(var_wait_for_items, $); //rl::DeleteCriticalSection(&mtx_items_avail, $); } struct enqueue_desc { int pos; void output(std::ostream& s) const { s << "enqueue " << pos; } }; void enqueue() { queue[queue_head++] = ++queue_head_data; RL_HIST_IMPL(rl::ctx(), $, enqueue_desc) {queue_head - 1} RL_HIST_END(); signal(); } void dequeue() { int my_pos = queue_tail++; for (;;) { if (queue[my_pos]) { RL_ASSERT(queue[my_pos] == my_pos + 1); return; } wait(my_pos); } } void signal() { ec_.signal(); /* std::atomic_thread_fence($)(std::memory_order_seq_cst); if (n_waiting_consumers($).load(std::memory_order_relaxed)) { rl::EnterCriticalSection(&mtx_items_avail, $); if (n_waiting_consumers($).load(std::memory_order_relaxed) > 0) { consumer_wait_generation($) += 1; //RL_ASSERT(n_consumers_to_wakeup($) == 0); n_consumers_to_wakeup($) = n_waiting_consumers($).load(std::memory_order_relaxed); rl::SetEvent(var_wait_for_items, $); } rl::LeaveCriticalSection(&mtx_items_avail, $); } */ } void wait(int my_pos) { eventcount_blocking block (ec_); if (queue[my_pos]) return; block.wait(); /* rl::EnterCriticalSection(&mtx_items_avail, $); n_waiting_consumers($).store(n_waiting_consumers($).load(std::memory_order_relaxed) + 1, std::memory_order_relaxed); std::atomic_thread_fence($)(std::memory_order_seq_cst); while (0 == queue[my_pos]) { unsigned my_generation = consumer_wait_generation($); for (;;) { rl::LeaveCriticalSection(&mtx_items_avail, $); rl::WaitForSingleObject(var_wait_for_items, rl::RL_INFINITE, $); rl::EnterCriticalSection(&mtx_items_avail, $); if (n_consumers_to_wakeup($) > 0 && consumer_wait_generation($) != my_generation) break; } if (--n_consumers_to_wakeup($) == 0) rl::ResetEvent(var_wait_for_items, $); } n_waiting_consumers($).store(n_waiting_consumers($).load(std::memory_order_relaxed) - 1, std::memory_order_relaxed); rl::LeaveCriticalSection(&mtx_items_avail, $); */ } void thread(unsigned index) { if (index < rl::test_suite::params::thread_count/2+1) { enqueue(); } else { dequeue(); } } }; int main() { rl::test_params p; //p.search_type = rl::fair_context_bound_scheduler_type; p.search_type = rl::sched_bound; //p.context_bound = 1; //p.execution_depth_limit = 100; //p.iteration_count = 5000; //p.initial_state = "280572"; //rl::simulate(p); rl::simulate(); rl::simulate(p); rl::simulate(); rl::simulate(p); } ================================================ FILE: tests/relacy/relacy/example/peterson/stdafx.cpp ================================================ #include "stdafx.h" ================================================ FILE: tests/relacy/relacy/example/peterson/stdafx.h ================================================ #pragma once #ifdef NDEBUG # define _SECURE_SCL 0 #endif #define RL_MSVC_OUTPUT //#define RL_DEBUGBREAK_ON_FAILURE #include "../../relacy/pch.hpp" #include "../../relacy/relacy_std.hpp" ================================================ FILE: tests/relacy/relacy/example/proxy_collector/msvc8/proxy_collector.sln ================================================  Microsoft Visual Studio Solution File, Format Version 9.00 # Visual Studio 2005 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "proxy_collector", "proxy_collector.vcproj", "{31994C0C-3BAD-4F25-8BC8-3206FF349B29}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Win32 = Debug|Win32 Release|Win32 = Release|Win32 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {31994C0C-3BAD-4F25-8BC8-3206FF349B29}.Debug|Win32.ActiveCfg = Debug|Win32 {31994C0C-3BAD-4F25-8BC8-3206FF349B29}.Debug|Win32.Build.0 = Debug|Win32 {31994C0C-3BAD-4F25-8BC8-3206FF349B29}.Release|Win32.ActiveCfg = Release|Win32 {31994C0C-3BAD-4F25-8BC8-3206FF349B29}.Release|Win32.Build.0 = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection EndGlobal ================================================ FILE: tests/relacy/relacy/example/proxy_collector/msvc8/proxy_collector.vcproj ================================================ ================================================ FILE: tests/relacy/relacy/example/proxy_collector/msvc9/proxy_collector.sln ================================================  Microsoft Visual Studio Solution File, Format Version 10.00 # Visual Studio 2008 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "proxy_collector", "proxy_collector.vcproj", "{31994C0C-3BAD-4F25-8BC8-3206FF349B29}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Win32 = Debug|Win32 Release|Win32 = Release|Win32 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {31994C0C-3BAD-4F25-8BC8-3206FF349B29}.Debug|Win32.ActiveCfg = Debug|Win32 {31994C0C-3BAD-4F25-8BC8-3206FF349B29}.Debug|Win32.Build.0 = Debug|Win32 {31994C0C-3BAD-4F25-8BC8-3206FF349B29}.Release|Win32.ActiveCfg = Release|Win32 {31994C0C-3BAD-4F25-8BC8-3206FF349B29}.Release|Win32.Build.0 = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection EndGlobal ================================================ FILE: tests/relacy/relacy/example/proxy_collector/msvc9/proxy_collector.vcproj ================================================ ================================================ FILE: tests/relacy/relacy/example/proxy_collector/proxy_collector.cpp ================================================ #include "stdafx.h" #include #include "../../relacy/relacy_std.hpp" struct pc_sys_anchor; struct pc_region; struct pc_master; typedef pc_region pc_node; typedef void (pc_fp_dtor) (pc_region*); struct pc_sys_anchor { int refcnt; pc_region* region; pc_sys_anchor() { } pc_sys_anchor(int rc, pc_region* r = 0) { refcnt = rc; region = r; } bool operator == (pc_sys_anchor const& right) const { return refcnt == right.refcnt && region == right.region; } pc_sys_anchor operator + (pc_sys_anchor const& right) const { pc_sys_anchor res; res.refcnt = refcnt + right.refcnt; res.region = (pc_region*)((intptr_t)region + (intptr_t)right.region); return res; } pc_sys_anchor operator - (pc_sys_anchor const& right) const { pc_sys_anchor res; res.refcnt = refcnt - right.refcnt; res.region = (pc_region*)((intptr_t)region - (intptr_t)right.region); return res; } }; std::ostream& operator << (std::ostream& s, pc_sys_anchor const& right) { return s << "{" << right.refcnt << "," << right.region << "}"; } struct pc_region { std::atomic next; std::atomic defer; pc_region() { next($) = pc_sys_anchor(0, 0); defer($) = 0; } void link(pc_region* next) { defer.store(next, rl::memory_order_relaxed); } void defer_node(pc_region* node) { pc_region* region = defer.exchange(node, rl::memory_order_release); node->defer.store(region, rl::memory_order_relaxed); } }; struct pc_master { std::atomic head; pc_region stub_region; pc_fp_dtor* fp_dtor; pc_master(pc_fp_dtor* const dtor) { pc_sys_anchor src (0, &stub_region); head.store(src, rl::memory_order_relaxed); fp_dtor = dtor; } pc_region* acquire() { pc_sys_anchor cmp (head.load(rl::memory_order_relaxed)); pc_sys_anchor xchg; do { xchg.refcnt = cmp.refcnt + 2; xchg.region = cmp.region; } while (false == head.compare_exchange_weak(cmp, xchg, rl::memory_order_acquire)); return cmp.region; } void release(pc_region* region) { pc_sys_anchor prev = region->next.fetch_sub(2, rl::memory_order_acq_rel); if (prev.refcnt == 3) sys_dtor(region); } void mutate(pc_region* node) { pc_sys_anchor src (2, 0); node->next.store(src, rl::memory_order_relaxed); pc_sys_anchor xchg (0, node); pc_sys_anchor cmp = head.load(rl::memory_order_relaxed); while (false == head.compare_exchange_weak(cmp, xchg, std::memory_order_acq_rel)); pc_sys_anchor cmp2 = cmp.region->next.load(rl::memory_order_relaxed); pc_sys_anchor xchg2; do { xchg2 = pc_sys_anchor(cmp2.refcnt, node); } while (false == cmp.region->next.compare_exchange_weak(cmp2, xchg2, rl::memory_order_release)); pc_sys_anchor prev = cmp.region->next.fetch_add(cmp.refcnt + 1, rl::memory_order_acq_rel); if (prev.refcnt == -cmp.refcnt) sys_dtor(cmp.region); } void sys_dtor(pc_region* region) { int reset = 0; pc_region* head = region; pc_region* tail = region; pc_sys_anchor nx = region->next.load(rl::memory_order_relaxed); pc_region* next = nx.region; while (next) { pc_sys_anchor prev = next->next.fetch_sub(2, rl::memory_order_acq_rel); if (prev.refcnt != 3) break; tail = next; nx = next->next.load(rl::memory_order_relaxed); next = nx.region; } nx = tail->next.load(rl::memory_order_relaxed); nx.region = 0; tail->next.store(nx, rl::memory_order_relaxed); while (head) { nx = head->next.load(rl::memory_order_relaxed); pc_region* const next = nx.region; pc_region* defer = head->defer.load(rl::memory_order_relaxed); nx = head->next.load(rl::memory_order_relaxed); RL_ASSERT(nx.refcnt == 1); if (head != &stub_region) { head->defer.store(defer, rl::memory_order_relaxed); defer = head; } else { reset = 1; } while (defer) { pc_region* const next = defer->defer.load(rl::memory_order_relaxed); fp_dtor(defer); defer = next; } head = next; } if (reset) { stub_region.defer.store(0, rl::memory_order_relaxed); mutate(&stub_region); } } }; struct foo_node { pc_node pcn; std::atomic next; rl::var data; }; void foo_node_dtor(pc_node* pcn) { // yes, very fragile foo_node* const n = (foo_node*)pcn; delete n; } struct foo_list { std::atomic head; pc_master pc; foo_list() : head(0) , pc(foo_node_dtor) { } }; struct proxy_collector_test : rl::test_suite { foo_list m_list; void before() { m_list.head($) = 0; } void after() { foo_node* node = new foo_node; m_list.pc.mutate(&node->pcn); } void thread(unsigned index) { if (index < 2) { pc_region* pcr = m_list.pc.acquire(); for (int i = 0; i != 4; ++i) { foo_node* node = m_list.head.load(rl::memory_order_acquire); while (node) { foo_node* const next = node->next.load(rl::memory_order_acquire); intptr_t volatile data = node->data($); (void)data; node = next; } if (2 == i) { m_list.pc.release(pcr); pcr = m_list.pc.acquire(); } } m_list.pc.release(pcr); } else { pc_region* pcr = m_list.pc.acquire(); for (int i = 0; i != 4; ++i) { if (0 == (i % 2)) { foo_node* node = new foo_node; node->data($) = 1; foo_node* cmp = m_list.head.load(rl::memory_order_relaxed); do { node->next.store(cmp, rl::memory_order_relaxed); } while (false == m_list.head.compare_exchange_weak(cmp, node, rl::memory_order_release)); } else { foo_node* node = m_list.head.load(rl::memory_order_acquire); foo_node* next; do { if (0 == node) break; next = node->next.load(rl::memory_order_relaxed); } while (false == m_list.head.compare_exchange_weak(node, next, rl::memory_order_acquire)); if (node) { //if (1 == i) { m_list.pc.mutate(&node->pcn); } //else //{ // pcr->defer_node(&node->pcn); //} } } if (i % 2) { m_list.pc.release(pcr); pcr = m_list.pc.acquire(); } } m_list.pc.release(pcr); } } }; int main() { rl::test_params params; params.iteration_count = 1000; rl::simulate(params); } ================================================ FILE: tests/relacy/relacy/example/proxy_collector/stdafx.cpp ================================================ #include "stdafx.h" ================================================ FILE: tests/relacy/relacy/example/proxy_collector/stdafx.h ================================================ #pragma once #ifdef NDEBUG # define _SECURE_SCL 0 #endif #include "../../relacy/pch.hpp" #include ================================================ FILE: tests/relacy/relacy/example/ref_counting/msvc8/ref_counting.sln ================================================  Microsoft Visual Studio Solution File, Format Version 9.00 # Visual Studio 2005 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ref_counting", "ref_counting.vcproj", "{31994C0C-3BAD-4F25-8BC8-3206FF349B28}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Win32 = Debug|Win32 Release|Win32 = Release|Win32 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {31994C0C-3BAD-4F25-8BC8-3206FF349B28}.Debug|Win32.ActiveCfg = Debug|Win32 {31994C0C-3BAD-4F25-8BC8-3206FF349B28}.Debug|Win32.Build.0 = Debug|Win32 {31994C0C-3BAD-4F25-8BC8-3206FF349B28}.Release|Win32.ActiveCfg = Release|Win32 {31994C0C-3BAD-4F25-8BC8-3206FF349B28}.Release|Win32.Build.0 = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection EndGlobal ================================================ FILE: tests/relacy/relacy/example/ref_counting/msvc8/ref_counting.vcproj ================================================ ================================================ FILE: tests/relacy/relacy/example/ref_counting/msvc9/ref_counting.sln ================================================  Microsoft Visual Studio Solution File, Format Version 10.00 # Visual Studio 2008 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ref_counting", "ref_counting.vcproj", "{31994C0C-3BAD-4F25-8BC8-3206FF349B28}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Win32 = Debug|Win32 Release|Win32 = Release|Win32 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {31994C0C-3BAD-4F25-8BC8-3206FF349B28}.Debug|Win32.ActiveCfg = Debug|Win32 {31994C0C-3BAD-4F25-8BC8-3206FF349B28}.Debug|Win32.Build.0 = Debug|Win32 {31994C0C-3BAD-4F25-8BC8-3206FF349B28}.Release|Win32.ActiveCfg = Release|Win32 {31994C0C-3BAD-4F25-8BC8-3206FF349B28}.Release|Win32.Build.0 = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection EndGlobal ================================================ FILE: tests/relacy/relacy/example/ref_counting/msvc9/ref_counting.vcproj ================================================ ================================================ FILE: tests/relacy/relacy/example/ref_counting/ref_counting.cpp ================================================ #include "stdafx.h" #include "../../relacy/relacy_std.hpp" struct rc_object { std::atomic rc; rl::var data; void acquire() { rc.fetch_add(1, rl::memory_order_acquire); } void release() { if (1 == rc.fetch_sub(1, rl::memory_order_release)) { rc.load(rl::memory_order_acquire); data($) = 0; delete this; } } rc_object(int data) : rc(1) , data(data) { } }; void post_to_channel(rl::atomic& ch, rc_object* obj) { obj->acquire(); rl::backoff b; for (;;) { rc_object* cmp = 0; if (ch.compare_exchange_weak(cmp, obj, rl::memory_order_release)) break; b.yield($); } } rc_object* get_from_channel(rl::atomic& ch) { return ch.exchange(0, rl::memory_order_acquire); } struct ref_counting_test : rl::test_suite { std::atomic channel; void before() { channel($) = 0; } void thread(unsigned index) { if (0 == index) { rc_object* obj = new rc_object (rand()); post_to_channel(channel, obj); int data = obj->data($); (void)data; obj->release(); } else if (1 == index) { rl::backoff b; for (;;) { rc_object* obj = get_from_channel(channel); if (obj) { int data = obj->data($); (void)data; obj->release(); break; } else { b.yield($); } } } } }; struct ref_counting_test2 : rl::test_suite { std::atomic channel01; std::atomic channel02; std::atomic channel12; std::atomic channel21; void before() { channel01($) = 0; channel02($) = 0; channel12($) = 0; channel21($) = 0; } void thread(unsigned index) { if (0 == index) { { rc_object* obj1 = new rc_object (rand()); post_to_channel(channel01, obj1); volatile int data = obj1->data($); (void)data; obj1->release(); } { rc_object* obj2 = new rc_object (rand()); post_to_channel(channel02, obj2); volatile int data = obj2->data($); (void)data; obj2->release(); } } else if (1 == index) { rl::backoff b; bool ch0 = false; bool ch2 = false; while (!ch0 || !ch2) { { rc_object* obj = get_from_channel(channel01); if (obj) { post_to_channel(channel12, obj); volatile int data = obj->data($); (void)data; obj->release(); ch0 = true; } else { b.yield($); } } { rc_object* obj = get_from_channel(channel21); if (obj) { volatile int data = obj->data($); (void)data; obj->release(); ch2 = true; } else { b.yield($); } } } } else { rl::backoff b; bool ch0 = false; bool ch1 = false; while (!ch0 || !ch1) { { rc_object* obj = get_from_channel(channel02); if (obj) { post_to_channel(channel21, obj); volatile int data = obj->data($); (void)data; obj->release(); ch0 = true; } else { b.yield($); } } { rc_object* obj = get_from_channel(channel12); if (obj) { volatile int data = obj->data($); (void)data; obj->release(); ch1 = true; } else { b.yield($); } } } } } }; struct ref_counting_test3 : rl::test_suite { std::atomic channel; void before() { channel($) = 0; } void thread(unsigned index) { if (0 == index) { rc_object* obj = new rc_object (rand()); post_to_channel(channel, obj); volatile int data = obj->data($); (void)data; obj->release(); } else if (1 == index) { rl::backoff b; rc_object* obj = 0; for (;;) { obj = get_from_channel(channel); if (obj) break; else b.yield($); } obj->acquire(); obj->release(); //volatile int data = obj->data($); //(void)data; obj->release(); } } }; int main() { rl::test_params params; params.context_bound = 2; params.iteration_count = 10000; rl::simulate(params); std::cout << "count: " << params.stop_iteration << std::endl; } ================================================ FILE: tests/relacy/relacy/example/ref_counting/stdafx.cpp ================================================ #include "stdafx.h" ================================================ FILE: tests/relacy/relacy/example/ref_counting/stdafx.h ================================================ #pragma once #ifdef NDEBUG # define _SECURE_SCL 0 #endif #include "../../relacy/pch.hpp" ================================================ FILE: tests/relacy/relacy/example/smr/g++/Makefile ================================================ TARGET=smr SRC=smr.cpp HEADERS=stdafx.h all: ${TARGET} ${TARGET}: Makefile ${SRC} ${HEADERS} g++ ${SRC} -O3 -g -o ${TARGET} clean: rm ${TARGET} ================================================ FILE: tests/relacy/relacy/example/smr/msvc8/smr.sln ================================================  Microsoft Visual Studio Solution File, Format Version 9.00 # Visual Studio 2005 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "smr", "smr.vcproj", "{BC168133-5E3D-4691-BA15-8E0FD61DFDB5}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Win32 = Debug|Win32 Release|Win32 = Release|Win32 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {BC168133-5E3D-4691-BA15-8E0FD61DFDB5}.Debug|Win32.ActiveCfg = Debug|Win32 {BC168133-5E3D-4691-BA15-8E0FD61DFDB5}.Debug|Win32.Build.0 = Debug|Win32 {BC168133-5E3D-4691-BA15-8E0FD61DFDB5}.Release|Win32.ActiveCfg = Release|Win32 {BC168133-5E3D-4691-BA15-8E0FD61DFDB5}.Release|Win32.Build.0 = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection EndGlobal ================================================ FILE: tests/relacy/relacy/example/smr/msvc8/smr.vcproj ================================================ ================================================ FILE: tests/relacy/relacy/example/smr/msvc9/smr.sln ================================================  Microsoft Visual Studio Solution File, Format Version 10.00 # Visual Studio 2008 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "smr", "smr.vcproj", "{BC168133-5E3D-4691-BA15-8E0FD61DFDB5}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Win32 = Debug|Win32 Release|Win32 = Release|Win32 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {BC168133-5E3D-4691-BA15-8E0FD61DFDB5}.Debug|Win32.ActiveCfg = Debug|Win32 {BC168133-5E3D-4691-BA15-8E0FD61DFDB5}.Debug|Win32.Build.0 = Debug|Win32 {BC168133-5E3D-4691-BA15-8E0FD61DFDB5}.Release|Win32.ActiveCfg = Release|Win32 {BC168133-5E3D-4691-BA15-8E0FD61DFDB5}.Release|Win32.Build.0 = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection EndGlobal ================================================ FILE: tests/relacy/relacy/example/smr/msvc9/smr.vcproj ================================================ ================================================ FILE: tests/relacy/relacy/example/smr/smr.cpp ================================================ #include "stdafx.h" #include "../../relacy/relacy_std.hpp" unsigned const thread_count = 3; unsigned const node_count = 6; struct smr_test : rl::test_suite { struct node { std::atomic next_; rl::var data_; }; std::atomic head_; std::atomic hp_ [thread_count]; rl::var defer_ [thread_count][thread_count]; rl::var defer_size_ [thread_count]; void before() { head_.store(0, std::memory_order_relaxed); for (size_t i = 0; i != thread_count; ++i) { hp_[i].store(0, std::memory_order_relaxed); VAR(defer_size_[i]) = 0; for (size_t j = 0; j != thread_count; ++j) VAR(defer_[i][j]) = 0; } } void push(unsigned index, int data) { node* n = new node (); n->VAR(data_) = data; node* next = head_.load(std::memory_order_relaxed); for (;;) { n->next_.store(next, rl::memory_order_relaxed); if (head_.compare_exchange_weak(next, n, rl::memory_order_release)) break; } } int pop(unsigned index) { node* n = 0; for (;;) { n = smr_acquire(index, head_); if (0 == n) break; node* next = n->next_.load(rl::memory_order_relaxed); if (head_.compare_exchange_weak(n, next, rl::memory_order_acquire)) break; smr_release(index); } smr_release(index); if (n) { int data = n->VAR(data_); smr_defer(index, n); return data; } else { return 0; } } void smr_pump(unsigned index) { node* hp [thread_count] = {}; for (size_t i = 0; i != thread_count; ++i) { hp[i] = hp_[i].load(std::memory_order_relaxed); } for (size_t i = 0; i != thread_count; ++i) { node* nn = VAR(defer_[index][i]); if (nn) { for (size_t j = 0; j != thread_count; ++j) { if (nn == hp[j]) { nn = 0; break; } } if (nn) { VAR(defer_[index][i]) = 0; VAR(defer_size_[index]) -= 1; delete nn; } } } } void smr_defer(unsigned index, node* n) { std::atomic_thread_fence(std::memory_order_seq_cst); smr_pump(index); if (VAR(defer_size_[index]) == thread_count) { delete n; } else { bool found = false; for (size_t i = 0; i != thread_count; ++i) { if (VAR(defer_[index][i]) == 0) { VAR(defer_[index][i]) = n; found = true; break; } } RL_ASSERT(found); VAR(defer_size_[index]) += 1; } } node* smr_acquire(unsigned index, std::atomic& n) { node* v = 0; for (;;) { v = n.load(std::memory_order_relaxed); hp_[index].store(v, std::memory_order_relaxed); std::atomic_thread_fence(std::memory_order_seq_cst); node* v2 = n.load(std::memory_order_acquire); if (v2 == v) break; } return v; } void smr_release(unsigned index) { hp_[index].store(0, std::memory_order_relaxed); } void thread(unsigned index) { for (unsigned i = 0; i != node_count; ++i) { push(index, index * thread_count + i + 1); } for (unsigned i = 0; i != node_count; ++i) { int data = pop(index); RL_ASSERT(0 != data); } } void after() { for (unsigned i = 0; i != ::thread_count; ++i) { smr_pump(i); } } }; int main() { rl::test_params p; //p.collect_history = true; //p.output_history = true; //p.initial_state = "991172"; p.iteration_count = 1000; rl::simulate(p); } ================================================ FILE: tests/relacy/relacy/example/smr/stdafx.cpp ================================================ #include "stdafx.h" ================================================ FILE: tests/relacy/relacy/example/smr/stdafx.h ================================================ #pragma once #ifdef NDEBUG # define _SECURE_SCL 0 #endif #define RL_MSVC_OUTPUT #include "../../relacy/pch.hpp" ================================================ FILE: tests/relacy/relacy/example/spsc_queue/msvc8/spsc_queue.sln ================================================  Microsoft Visual Studio Solution File, Format Version 9.00 # Visual Studio 2005 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "spsc_queue", "spsc_queue.vcproj", "{2F0B1A3B-27CA-47D4-A9D1-5EC66BB0A85B}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Win32 = Debug|Win32 Release|Win32 = Release|Win32 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {2F0B1A3B-27CA-47D4-A9D1-5EC66BB0A85B}.Debug|Win32.ActiveCfg = Debug|Win32 {2F0B1A3B-27CA-47D4-A9D1-5EC66BB0A85B}.Debug|Win32.Build.0 = Debug|Win32 {2F0B1A3B-27CA-47D4-A9D1-5EC66BB0A85B}.Release|Win32.ActiveCfg = Release|Win32 {2F0B1A3B-27CA-47D4-A9D1-5EC66BB0A85B}.Release|Win32.Build.0 = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection EndGlobal ================================================ FILE: tests/relacy/relacy/example/spsc_queue/msvc8/spsc_queue.vcproj ================================================ ================================================ FILE: tests/relacy/relacy/example/spsc_queue/msvc9/spsc_queue.sln ================================================  Microsoft Visual Studio Solution File, Format Version 10.00 # Visual Studio 2008 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "spsc_queue", "spsc_queue.vcproj", "{D4756EE9-3953-4E17-B1B5-E89F853303C1}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Win32 = Debug|Win32 Release|Win32 = Release|Win32 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {D4756EE9-3953-4E17-B1B5-E89F853303C1}.Debug|Win32.ActiveCfg = Debug|Win32 {D4756EE9-3953-4E17-B1B5-E89F853303C1}.Debug|Win32.Build.0 = Debug|Win32 {D4756EE9-3953-4E17-B1B5-E89F853303C1}.Release|Win32.ActiveCfg = Release|Win32 {D4756EE9-3953-4E17-B1B5-E89F853303C1}.Release|Win32.Build.0 = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection EndGlobal ================================================ FILE: tests/relacy/relacy/example/spsc_queue/msvc9/spsc_queue.vcproj ================================================ ================================================ FILE: tests/relacy/relacy/example/spsc_queue/spsc_queue.cpp ================================================ #include "stdafx.h" #include "../../relacy/relacy_std.hpp" template class nonblocking_spsc_queue { public: nonblocking_spsc_queue() { node* n = new node (); VAR(head) = n; VAR(tail) = n; } ~nonblocking_spsc_queue() { RL_ASSERT(VAR(head) == VAR(tail)); delete (node*)VAR(head); } void enqueue(T data) { node* n = new node (data); VAR(head)->next.store(n, std::memory_order_release); VAR(head) = n; } bool dequeue(T& data) { node* t = VAR(tail); node* n = t->next.load(std::memory_order_acquire); if (0 == n) return false; data = n->VAR(data); delete t; VAR(tail) = n; return true; } private: struct node { std::atomic next; VAR_T(T) data; node(T data = T()) : next(0) , data(data) {} }; VAR_T(node*) head; VAR_T(node*) tail; }; struct nonblocking_spsc_queue_test : rl::test_suite { nonblocking_spsc_queue q; void thread(unsigned thread_index) { if (0 == thread_index) { q.enqueue(11); } else { int data = 0; while (false == q.dequeue(data)) {} RL_ASSERT(11 == data); } } }; class eventcount { public: eventcount() : count(0) , waiters(0) {} void signal_relaxed() { unsigned cmp = count.load(std::memory_order_relaxed); signal_impl(cmp); } void signal() { unsigned cmp = count.fetch_add(0, std::memory_order_seq_cst); signal_impl(cmp); } unsigned get() { unsigned cmp = count.fetch_or(0x80000000, std::memory_order_acquire); return cmp & 0x7FFFFFFF; } void wait(unsigned cmp) { unsigned ec = count.load(std::memory_order_seq_cst); if (cmp == (ec & 0x7FFFFFFF)) { guard.lock($); ec = count.load(std::memory_order_seq_cst); if (cmp == (ec & 0x7FFFFFFF)) { waiters($) += 1; cv.wait(guard, $); } guard.unlock($); } } private: std::atomic count; VAR_T(unsigned) waiters; std::mutex guard; std::condition_variable cv; void signal_impl(unsigned cmp) { if (cmp & 0x80000000) { guard.lock($); while (false == count.compare_exchange_weak(cmp, (cmp + 1) & 0x7FFFFFFF, std::memory_order_relaxed)); unsigned w = VAR(waiters); VAR(waiters) = 0; guard.unlock($); if (w) cv.notify_all($); } } }; template class spsc_queue : nonblocking_spsc_queue { public: typedef nonblocking_spsc_queue base_t; void enqueue(T data) { base_t::enqueue(data); ec.signal/*_relaxed*/(); } T dequeue() { T data; bool res = base_t::dequeue(data); while (false == res) { int cmp = ec.get(); res = base_t::dequeue(data); if (res) break; ec.wait(cmp); res = base_t::dequeue(data); if (res) break; } return data; } private: eventcount ec; }; struct spsc_queue_test : rl::test_suite { spsc_queue q; void thread(unsigned thread_index) { if (0 == thread_index) { q.enqueue(11); } else { int d = q.dequeue(); RL_ASSERT(11 == d); } } }; int main() { rl::simulate(); rl::simulate(); } ================================================ FILE: tests/relacy/relacy/example/spsc_queue/stdafx.cpp ================================================ #include "stdafx.h" ================================================ FILE: tests/relacy/relacy/example/spsc_queue/stdafx.h ================================================ #pragma once #ifdef NDEBUG # define _SECURE_SCL 0 #endif //#define RL_MSVC_OUTPUT #include "../../relacy/pch.hpp" #include "../../relacy/relacy_std.hpp" ================================================ FILE: tests/relacy/relacy/example/stack/DESCRIPTION.TXT ================================================ lock-free stack code contains several bugs: access to freed memory and ABA problem ================================================ FILE: tests/relacy/relacy/example/stack/msvc8/stack.sln ================================================  Microsoft Visual Studio Solution File, Format Version 9.00 # Visual Studio 2005 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "stack", "stack.vcproj", "{4D6D7FC3-66D1-4F80-B434-2FDCBBFBC9F5}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Win32 = Debug|Win32 Release|Win32 = Release|Win32 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {4D6D7FC3-66D1-4F80-B434-2FDCBBFBC9F5}.Debug|Win32.ActiveCfg = Debug|Win32 {4D6D7FC3-66D1-4F80-B434-2FDCBBFBC9F5}.Debug|Win32.Build.0 = Debug|Win32 {4D6D7FC3-66D1-4F80-B434-2FDCBBFBC9F5}.Release|Win32.ActiveCfg = Release|Win32 {4D6D7FC3-66D1-4F80-B434-2FDCBBFBC9F5}.Release|Win32.Build.0 = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection EndGlobal ================================================ FILE: tests/relacy/relacy/example/stack/msvc8/stack.vcproj ================================================ ================================================ FILE: tests/relacy/relacy/example/stack/msvc9/stack.sln ================================================  Microsoft Visual Studio Solution File, Format Version 10.00 # Visual Studio 2008 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "stack", "stack.vcproj", "{4D6D7FC3-66D1-4F80-B434-2FDCBBFBC9F5}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Win32 = Debug|Win32 Release|Win32 = Release|Win32 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {4D6D7FC3-66D1-4F80-B434-2FDCBBFBC9F5}.Debug|Win32.ActiveCfg = Debug|Win32 {4D6D7FC3-66D1-4F80-B434-2FDCBBFBC9F5}.Debug|Win32.Build.0 = Debug|Win32 {4D6D7FC3-66D1-4F80-B434-2FDCBBFBC9F5}.Release|Win32.ActiveCfg = Release|Win32 {4D6D7FC3-66D1-4F80-B434-2FDCBBFBC9F5}.Release|Win32.Build.0 = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection EndGlobal ================================================ FILE: tests/relacy/relacy/example/stack/msvc9/stack.vcproj ================================================ ================================================ FILE: tests/relacy/relacy/example/stack/stack.cpp ================================================ #include "stdafx.h" #include "../../relacy/relacy_std.hpp" // TEST FAILS WITH "ACCESS TO FREED MEMORY" class stack { public: stack() : head_(0) { } void push(int data) { rl::var n = new node (); n($)->data_($) = data; node* next = head_.load(rl::memory_order_relaxed); for (;;) { n($)->next_.store(next, rl::memory_order_relaxed); if (head_.compare_exchange_weak(next, n($), rl::memory_order_release)) break; } } int pop() { node* n = head_.load(rl::memory_order_relaxed); for (;;) { if (0 == n) break; node* next = n->next_.load(rl::memory_order_relaxed); if (head_.compare_exchange_weak(n, next, rl::memory_order_acquire)) break; } if (n) { int data = n->data_($); delete n; return data; } else { return 0; } } private: struct node { std::atomic next_; rl::var data_; }; std::atomic head_; stack(stack const&); stack& operator = (stack const&); }; struct stack_test : rl::test_suite { stack s_; int produced_count_; int consumed_count_; void before() { produced_count_ = 0; consumed_count_ = 0; } void after() { typedef rl::test_suite base_t; RL_ASSERT(base_t::params::thread_count == produced_count_); RL_ASSERT(base_t::params::thread_count == consumed_count_); } void thread(unsigned /*index*/) { s_.push(rand() + 1); produced_count_ += 1; int data = s_.pop(); RL_ASSERT(data); consumed_count_ += 1; } }; int main() { rl::simulate(); } ================================================ FILE: tests/relacy/relacy/example/stack/stdafx.cpp ================================================ #include "stdafx.h" ================================================ FILE: tests/relacy/relacy/example/stack/stdafx.h ================================================ #pragma once #ifdef NDEBUG # define _SECURE_SCL 0 #endif #include "../../relacy/pch.hpp" ================================================ FILE: tests/relacy/relacy/example/tbb_eventcount/eventcount.cpp ================================================ #include "stdafx.h" #include "../../relacy/windows.h" /* #define HANDLE rl::HANDLE #define CreateSemaphoreA rl::RL_CreateSemaphore($) #define CreateSemaphoreW rl::RL_CreateSemaphore($) #ifndef CreateSemaphore # define CreateSemaphore CreateSemaphoreW #endif //#define CRITICAL_SECTION rl::CRITICAL_SECTION //#define InitializeCriticalSection rl::InitializeCriticalSection($) #define CloseHandle rl::RL_CloseHandle($) */ #include #if defined(WIN32) && defined(_MSC_VER) #include #include class semaphore { public: semaphore() { h_ = rl::CreateSemaphore(0, 0, LONG_MAX, 0, $); } ~semaphore() { rl::CloseHandle(h_, $); } void wait() { rl::WaitForSingleObject(h_, rl::RL_INFINITE, $); } void post() { rl::ReleaseSemaphore(h_, 1, 0, $); } private: rl::HANDLE h_; semaphore(semaphore const&); semaphore& operator = (semaphore const&); }; class mutex { public: mutex() { rl::InitializeCriticalSection(&cs_, $); } ~mutex() { rl::DeleteCriticalSection(&cs_, $); } void lock() { rl::EnterCriticalSection(&cs_, $); } void unlock() { rl::LeaveCriticalSection(&cs_, $); } private: rl::CRITICAL_SECTION cs_; mutex(mutex const&); mutex& operator = (mutex const&); }; //void full_memory_fence() //{ // _mm_mfence(); //} //#define THREAD_LOCAL __declspec(thread) #elif defined(POSIX) && defined(GCC) #include #include class semaphore { public: semaphore() { sem_init(&sem_, 0, 0); } ~semaphore() { sem_destroy(&sem_); } void wait() { sem_wait(&sem_); } void post() { sem_post(&sem_); } private: sem_t sem_; semaphore(semaphore const&); semaphore& operator = (semaphore const&); }; class mutex { public: mutex() { pthread_mutex_init(&mutex_, 0); } ~mutex() { pthread_mutex_destroy(&mutex_); } void lock() { pthread_mutex_lock(&mutex_); } void unlock() { pthread_mutex_unlock(&mutex_); } private: pthread_mutex_t mutex_; mutex(mutex const&); mutex& operator = (mutex const&); }; void full_memory_fence() { __sync_synchronize(); } //#define THREAD_LOCAL __thread #endif class lock { public: lock(mutex& m) : m_(m) { m.lock(); } ~lock() { m_.unlock(); } private: mutex& m_; lock(lock const&); lock& operator = (lock const&); }; /** simple single-threaded double-linked list * nothing interesting */ class dlist { public: struct node { rl::var prev_; rl::var next_; node() { prev_($) = 0; next_($) = 0; } }; dlist() { reset(); } void push(node* n) { size_t s = size_($).load(rl::memory_order_relaxed); size_($).store(s + 1, rl::memory_order_relaxed); n->next_($) = head_.next_($); n->prev_($) = &head_; head_.next_($)->prev_($) = n; head_.next_($) = n; } node* pop() { if (size_($).load(rl::memory_order_relaxed) == 0) return 0; node* n = head_.next_($); remove(n); return n; } void remove(node* n) { size_t s = size_($).load(rl::memory_order_relaxed); size_($).store(s - 1, rl::memory_order_relaxed); n->prev_($)->next_($) = n->next_($); n->next_($)->prev_($) = n->prev_($); } size_t size() const { return size_($).load(rl::memory_order_relaxed); } node* begin() { return head_.next_($); } void flush_to(dlist& target) { if (size_($).load(rl::memory_order_relaxed)) { target.size_($).store(size_($).load(rl::memory_order_relaxed)); target.head_.next_($) = head_.next_($); target.head_.next_($)->prev_($) = &target.head_; target.tail_.prev_($) = tail_.prev_($); target.tail_.prev_($)->next_($) = &target.tail_; } else { target.reset(); } reset(); } static bool not_last(node* n) { return n->next_($) != 0; } static node* get_next(node* n) { return n->next_($); } private: rl::atomic size_; node head_; node tail_; void reset() { size_($) = 0; head_.next_($) = &tail_; head_.prev_($) = 0; tail_.next_($) = 0; tail_.prev_($) = &head_; } dlist(dlist const&); dlist& operator = (dlist const&); }; /** pre-thread descriptor for eventcount */ struct ec_thread { dlist::node node_; semaphore sema_; rl::var epoch_; rl::atomic in_waitset_; rl::var spurious_; rl::var ctx_; ec_thread() { epoch_($) = 0; in_waitset_($) = false; spurious_($) = false; ctx_($) = 0; } ~ec_thread() { if (spurious_($)) sema_.wait(); } /* static ec_thread* current() { static THREAD_LOCAL ec_thread* ec_thread_instance = 0; ec_thread* instance = ec_thread_instance; if (instance == 0) { instance = new ec_thread; ec_thread_instance = instance; } return instance; // instance must be destroyed in DllMain() callback // or in pthread_key_create() callback } */ private: ec_thread(ec_thread const&); ec_thread& operator = (ec_thread const&); }; /** fine-grained eventcount implementation */ class eventcount { public: eventcount() { epoch_($) = 0; } void prepare_wait(ec_thread* th = 0, void* ctx = 0) { RL_ASSERT(th); // this is good place to pump previous spurious wakeup if (th->spurious_($)) { th->spurious_($) = false; th->sema_.wait(); } th->in_waitset_($).store(true, rl::memory_order_relaxed); th->ctx_($) = ctx; { lock l (mtx_); th->epoch_($) = epoch_($).load(rl::memory_order_relaxed); waitset_.push(&th->node_); } rl::atomic_thread_fence($)(rl::memory_order_seq_cst); } void commit_wait(ec_thread* th = 0) { RL_ASSERT(th); // this check is just an optimization //if (th->epoch_($) == epoch_($).load(rl::memory_order_relaxed)) if (th->in_waitset_($).load(rl::memory_order_acquire)) th->sema_.wait(); else cancel_wait(true, th); //!!! add 'th' } void cancel_wait(bool /*from_commit*/, ec_thread* th = 0) { RL_ASSERT(th); // spurious wakeup will be pumped in the following prepare_wait() th->spurious_($) = true; // try to remove node from waitset if (th->in_waitset_($).load(rl::memory_order_acquire)) { lock l (mtx_); if (th->in_waitset_($).load(rl::memory_order_relaxed)) { // successfully removed from waitset, // so there will be no spurious wakeup th->in_waitset_($).store(false, rl::memory_order_relaxed); th->spurious_($) = false; waitset_.remove(&th->node_); } else { //if (from_commit) //int volatile x = 0; } } else { //RL_ASSERT(from_commit == false); //if (from_commit) // int volatile x = 0; } } void notify_one() { rl::atomic_thread_fence($)(rl::memory_order_seq_cst); notify_one_relaxed(); } template void notify(predicate_t pred) { rl::atomic_thread_fence($)(rl::memory_order_seq_cst); notify_relaxed(pred); } void notify_all() { rl::atomic_thread_fence($)(rl::memory_order_seq_cst); notify_all_relaxed(); } void notify_one_relaxed() { if (waitset_.size() == 0) return; dlist::node* n; { lock l (mtx_); unsigned ep = epoch_($).load(rl::memory_order_relaxed); epoch_($).store(ep + 1, rl::memory_order_relaxed); n = waitset_.pop(); if (n) to_ec_thread(n)->in_waitset_($).store(false, rl::memory_order_release); } if (n) { to_ec_thread(n)->sema_.post(); } } template void notify_relaxed(predicate_t pred) { if (waitset_.size() == 0) return; dlist temp; { lock l (mtx_); unsigned ep = epoch_($).load(rl::memory_order_relaxed); epoch_($).store(ep + 1, rl::memory_order_relaxed); size_t size = waitset_.size(); size_t idx = 0; dlist::node* n = waitset_.begin(); while (dlist::not_last(n)) { dlist::node* next = dlist::get_next(n); ec_thread* th = to_ec_thread(n); if (pred(th->ctx_($), size, idx)) { waitset_.remove(n); temp.push(n); th->in_waitset_($).store(false, rl::memory_order_release); } n = next; idx += 1; } } dlist::node* n = temp.begin(); while (dlist::not_last(n)) { dlist::node* next = dlist::get_next(n); to_ec_thread(n)->sema_.post(); n = next; } } void notify_all_relaxed() { if (waitset_.size() == 0) return; dlist temp; { lock l (mtx_); waitset_.flush_to(temp); dlist::node* n = temp.begin(); while (dlist::not_last(n)) { to_ec_thread(n)->in_waitset_($).store(false, rl::memory_order_release); n = dlist::get_next(n); } unsigned ep = epoch_($).load(rl::memory_order_relaxed); epoch_($).store(ep + 1, rl::memory_order_relaxed); } dlist::node* n = temp.begin(); while (dlist::not_last(n)) { dlist::node* next = dlist::get_next(n); to_ec_thread(n)->sema_.post(); n = next; } } class wait_guard; private: mutex mtx_; dlist waitset_; rl::atomicepoch_; ec_thread* to_ec_thread(dlist::node* n) { return (ec_thread*)((char*)n - offsetof(ec_thread, node_)); } eventcount(eventcount const&); eventcount& operator = (eventcount const&); }; class eventcount::wait_guard { public: wait_guard(eventcount& ec, ec_thread* th = 0, void* ctx = 0) : ec_(ec) , th_(th) , wait_(false) { ec_.prepare_wait(th_, ctx); } void commit_wait() { assert(false == wait_); wait_ = true; ec_.commit_wait(th_); } ~wait_guard() { if (false == wait_) ec_.cancel_wait(false, th_); } private: eventcount& ec_; ec_thread* th_; bool wait_; wait_guard(wait_guard const&); wait_guard& operator = (wait_guard const&); }; struct scheduler { struct tbb_thread { ec_thread th; }; eventcount ec_; tbb_thread* threads_; bool volatile is_permanently_open_; void wait_while_pool_is_empty(tbb_thread* th) { if (is_permanently_open_) return; eventcount::wait_guard wait (ec_, &th->th); if (pool_is_empty()) wait.commit_wait(); } void notify_about_new_task_available() { ec_.notify_one_relaxed(); } void notify_about_new_task_available_with_preference(tbb_thread* preference) { struct local { tbb_thread* preference_; bool fired_; bool operator () (void* ctx, size_t count, size_t idx) { tbb_thread* th = (tbb_thread*)ctx; if (th == preference_) { fired_ = true; return true; } else if (idx == count - 1 && fired_ == false) { return true; } else { return false; } } } pred = {preference}; ec_.notify_relaxed(pred); } void notify_about_list_of_tasks_available(size_t total_count, size_t preference_count, tbb_thread** preferences) { struct local { size_t remain_to_signal_; size_t preference_count_; tbb_thread** preferences_; bool operator () (void* ctx, size_t count, size_t idx) { tbb_thread* th = (tbb_thread*)ctx; size_t remain_in_waitset = count - idx; if (remain_in_waitset <= remain_to_signal_) { return true; } else { for (size_t i = 0; i != preference_count_; ++i) { if (preferences_[i] == th) { remain_to_signal_ -= 1; return true; } } } return false; } } pred = {total_count, preference_count, preferences}; ec_.notify_relaxed(pred); } bool pool_is_empty() { return true; } }; struct queue { rl::atomic producer_idx_; rl::atomic consumer_idx_; rl::atomic* buffer_; eventcount ec_; queue() { producer_idx_($) = 0; consumer_idx_($) = 0; buffer_ = RL_NEW_ARR(rl::atomic, 10); for (size_t i = 0; i != 10; ++i) buffer_[i]($) = 0; } ~queue() { RL_DELETE_ARR(buffer_); } void enqueue(void* data) { int idx = producer_idx_($).fetch_add(1) + 1; // atomic buffer_[idx]($).store(data, rl::memory_order_relaxed); struct local { int idx_; bool operator () (void* ctx, size_t /*count*/, size_t /*idx*/) { return idx_ == (*(rl::var*)ctx)($); } } pred = {idx}; ec_.notify(pred); // not relaxed!!! } void* dequeue(ec_thread* th) { int idx = consumer_idx_($).fetch_add(1) + 1; // atomic void* data = buffer_[idx]($).load(rl::memory_order_relaxed); if (data) return data; for (;;) { rl::var idxv (idx); eventcount::wait_guard wait (ec_, th, &idxv); data = buffer_[idx]($).load(rl::memory_order_relaxed); if (data) { return data; } wait.commit_wait(); idxv($) = 0; data = buffer_[idx]($).load(rl::memory_order_relaxed); if (data) { return data; } rl::yield($, 1); //RL_ASSERT(false); } } }; class condition_variable { eventcount ec_; public: void wait(mutex& mtx, ec_thread* th) { eventcount::wait_guard wait (ec_, th); mtx.unlock(); wait.commit_wait(); mtx.lock(); } void signal() { ec_.notify_one(); } void broadcast() { ec_.notify_all(); } }; struct queue_test : rl::test_suite { ec_thread threads_ [6]; queue q_; void thread(unsigned index) { if (index < 2) { q_.enqueue((void*)(index*2+1)); q_.enqueue((void*)(index*2+2)); } else { int data1 = (int)q_.dequeue(&threads_[index]); RL_ASSERT(data1 >= 1 && data1 <= 6); int data2 = (int)q_.dequeue(&threads_[index]); RL_ASSERT(data2 >= 1 && data2 <= 6); } } }; struct condvar_test : rl::test_suite { rl::var stage; condition_variable cv; mutex mtx; ec_thread th [3]; void before() { stage($) = 0; } void thread(unsigned index) { if (0 == index) { mtx.lock(); stage($) += 1; cv.broadcast(); while (stage($) != 2) cv.wait(mtx, &th[index]); mtx.unlock(); } else if (1 == index) { mtx.lock(); while (stage($) != 1) cv.wait(mtx, &th[index]); stage($) += 1; cv.broadcast(); mtx.unlock(); } else if (2 == index) { mtx.lock(); while (stage($) != 2) cv.wait(mtx, &th[index]); mtx.unlock(); } } }; int main() { rl::test_params p; p.iteration_count = 100000000; //p.initial_state = "30000000"; //p.search_type = rl::fair_context_bound_scheduler_type; rl::simulate(p); //rl::simulate(p); } ================================================ FILE: tests/relacy/relacy/example/tbb_eventcount/msvc8/eventcount.sln ================================================  Microsoft Visual Studio Solution File, Format Version 9.00 # Visual Studio 2005 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "eventcount", "eventcount.vcproj", "{ECB64178-A35E-4EB2-9EB0-BD72D6F7B6E5}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Win32 = Debug|Win32 Release|Win32 = Release|Win32 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {ECB64178-A35E-4EB2-9EB0-BD72D6F7B6E5}.Debug|Win32.ActiveCfg = Debug|Win32 {ECB64178-A35E-4EB2-9EB0-BD72D6F7B6E5}.Debug|Win32.Build.0 = Debug|Win32 {ECB64178-A35E-4EB2-9EB0-BD72D6F7B6E5}.Release|Win32.ActiveCfg = Release|Win32 {ECB64178-A35E-4EB2-9EB0-BD72D6F7B6E5}.Release|Win32.Build.0 = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection EndGlobal ================================================ FILE: tests/relacy/relacy/example/tbb_eventcount/msvc8/eventcount.vcproj ================================================ ================================================ FILE: tests/relacy/relacy/example/tbb_eventcount/msvc9/eventcount.sln ================================================  Microsoft Visual Studio Solution File, Format Version 10.00 # Visual Studio 2005 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "eventcount", "eventcount.vcproj", "{ECB64178-A35E-4EB2-9EB0-BD72D6F7B6E5}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Win32 = Debug|Win32 Release|Win32 = Release|Win32 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {ECB64178-A35E-4EB2-9EB0-BD72D6F7B6E5}.Debug|Win32.ActiveCfg = Debug|Win32 {ECB64178-A35E-4EB2-9EB0-BD72D6F7B6E5}.Debug|Win32.Build.0 = Debug|Win32 {ECB64178-A35E-4EB2-9EB0-BD72D6F7B6E5}.Release|Win32.ActiveCfg = Release|Win32 {ECB64178-A35E-4EB2-9EB0-BD72D6F7B6E5}.Release|Win32.Build.0 = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection EndGlobal ================================================ FILE: tests/relacy/relacy/example/tbb_eventcount/msvc9/eventcount.vcproj ================================================ ================================================ FILE: tests/relacy/relacy/example/tbb_eventcount/stdafx.cpp ================================================ // stdafx.cpp : source file that includes just the standard includes // ws_deque.pch will be the pre-compiled header // stdafx.obj will contain the pre-compiled type information #include "stdafx.h" // TODO: reference any additional headers you need in STDAFX.H // and not in this file ================================================ FILE: tests/relacy/relacy/example/tbb_eventcount/stdafx.h ================================================ #pragma once #include "../../relacy/pch.hpp" #include "../../relacy/relacy_std.hpp" ================================================ FILE: tests/relacy/relacy/example/ws_deque/msvc8/ws_deque.sln ================================================  Microsoft Visual Studio Solution File, Format Version 9.00 # Visual Studio 2005 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ws_deque", "ws_deque.vcproj", "{0B597F19-DEBB-4832-B520-9A93A286D595}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Win32 = Debug|Win32 Release|Win32 = Release|Win32 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {0B597F19-DEBB-4832-B520-9A93A286D595}.Debug|Win32.ActiveCfg = Debug|Win32 {0B597F19-DEBB-4832-B520-9A93A286D595}.Debug|Win32.Build.0 = Debug|Win32 {0B597F19-DEBB-4832-B520-9A93A286D595}.Release|Win32.ActiveCfg = Release|Win32 {0B597F19-DEBB-4832-B520-9A93A286D595}.Release|Win32.Build.0 = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection EndGlobal ================================================ FILE: tests/relacy/relacy/example/ws_deque/msvc8/ws_deque.vcproj ================================================ ================================================ FILE: tests/relacy/relacy/example/ws_deque/msvc9/ws_deque.sln ================================================  Microsoft Visual Studio Solution File, Format Version 10.00 # Visual Studio 2008 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ws_deque", "ws_deque.vcproj", "{0B597F19-DEBB-4832-B520-9A93A286D595}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Win32 = Debug|Win32 Release|Win32 = Release|Win32 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {0B597F19-DEBB-4832-B520-9A93A286D595}.Debug|Win32.ActiveCfg = Debug|Win32 {0B597F19-DEBB-4832-B520-9A93A286D595}.Debug|Win32.Build.0 = Debug|Win32 {0B597F19-DEBB-4832-B520-9A93A286D595}.Release|Win32.ActiveCfg = Release|Win32 {0B597F19-DEBB-4832-B520-9A93A286D595}.Release|Win32.Build.0 = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection EndGlobal ================================================ FILE: tests/relacy/relacy/example/ws_deque/msvc9/ws_deque.vcproj ================================================ ================================================ FILE: tests/relacy/relacy/example/ws_deque/stdafx.cpp ================================================ #include "stdafx.h" ================================================ FILE: tests/relacy/relacy/example/ws_deque/stdafx.h ================================================ #pragma once #ifdef NDEBUG # define _SECURE_SCL 0 #endif #define RL_MSVC_OUTPUT //#define RL_DEBUGBREAK_ON_FAILURE #include "../../relacy/pch.hpp" #include "../../relacy/relacy_std.hpp" ================================================ FILE: tests/relacy/relacy/example/ws_deque/ws_deque.cpp ================================================ #include "stdafx.h" #include "../../relacy/relacy_std.hpp" using namespace std; using rl::var; template class ws_deque { public: ws_deque() { VAR(m_mask) = initial_size - 1; m_headIndex.store(0, memory_order_relaxed); m_tailIndex.store(0, memory_order_relaxed); VAR(m_array) = new atomic [initial_size]; VAR(m_arraySize) = initial_size; } ~ws_deque() { delete [] VAR(m_array); } bool IsEmpty() const { return m_headIndex.load(memory_order_acquire) >= m_tailIndex.load(memory_order_acquire); } size_t Count() const { return m_tailIndex.load(memory_order_acquire) - m_headIndex.load(memory_order_acquire); } void push(T item) { size_t tail = m_tailIndex.load(memory_order_acquire); if (tail < m_headIndex.load(memory_order_acquire) + VAR(m_mask)) { VAR(m_array)[tail & VAR(m_mask)].store(item, memory_order_relaxed); m_tailIndex.store(tail + 1, memory_order_release); } else { m_foreignLock.lock($); size_t head = m_headIndex.load(memory_order_acquire); size_t count = Count(); if (count >= VAR(m_mask)) { size_t arraySize = m_arraySize($); size_t mask = VAR(m_mask); atomic* newArray = new atomic [arraySize * 2]; atomic* arr = m_array($); //!!! for (size_t i = 0; i != arraySize; ++i) for (size_t i = 0; i != count; ++i) newArray[i].store(arr[(i + head) & mask].load(memory_order_seq_cst), memory_order_relaxed); delete [] VAR(m_array); VAR(m_array) = newArray; VAR(m_arraySize) = arraySize * 2; m_headIndex.store(0, memory_order_release); m_tailIndex.store(count, memory_order_release); tail = count; VAR(m_mask) = (mask * 2) | 1; } VAR(m_array)[tail & VAR(m_mask)].store(item, memory_order_relaxed); m_tailIndex.store(tail + 1, memory_order_release); m_foreignLock.unlock($); } } bool pop(T& item) { size_t tail = m_tailIndex.load(memory_order_acquire); if (tail == 0) return false; tail -= 1; m_tailIndex.store(tail, memory_order_release); atomic_thread_fence(memory_order_seq_cst); if (m_headIndex.load(memory_order_acquire) <= tail) { item = VAR(m_array)[tail & VAR(m_mask)].load(memory_order_relaxed); return true; } else { m_foreignLock.lock($); if (m_headIndex.load(memory_order_acquire) <= tail) { item = VAR(m_array)[tail & VAR(m_mask)].load(memory_order_relaxed); m_foreignLock.unlock($); return true; } else { m_tailIndex.store(tail + 1, memory_order_release); m_foreignLock.unlock($); return false; } } } bool steal(T& item) { if (false == m_foreignLock.try_lock($)) return false; size_t head = m_headIndex.load(memory_order_acquire); m_headIndex.store(head + 1, memory_order_release); atomic_thread_fence(memory_order_seq_cst); if (head < m_tailIndex.load(memory_order_acquire)) { item = VAR(m_array)[head & VAR(m_mask)].load(memory_order_relaxed); m_foreignLock.unlock($); return true; } else { m_headIndex.store(head, memory_order_release); m_foreignLock.unlock($); return false; } } private: static size_t const initial_size = 2; var*> m_array; var m_mask; var m_arraySize; atomic m_headIndex; atomic m_tailIndex; mutex m_foreignLock; }; struct ws_deque_test0 : rl::test_suite { ws_deque q; void before() { } void after() { } void thread(unsigned index) { if (0 == index) { for (size_t i = 0; i != 4; ++i) { q.push(10); } for (size_t i = 0; i != 5; ++i) { int p = 0; bool res = q.pop(p); RL_ASSERT(10 == p || false == res); } for (size_t i = 0; i != 4; ++i) { q.push(10); int p = 0; bool res = q.pop(p); RL_ASSERT(10 == p || false == res); } for (size_t i = 0; i != 4; ++i) { q.push(10); q.push(10); int p = 0; bool res = q.pop(p); RL_ASSERT(10 == p || false == res); p = 0; res = q.pop(p); RL_ASSERT(10 == p || false == res); } for (size_t i = 0; i != 4; ++i) { q.push(10); q.push(10); q.push(10); int p = 0; bool res = q.pop(p); RL_ASSERT(10 == p || false == res); } for (size_t i = 0; i != 14; ++i) { q.push(10); int p = 0; bool res = q.pop(p); RL_ASSERT(10 == p || false == res); } } else { for (size_t i = 0; i != 4; ++i) { int p = 0; bool res = q.steal(p); RL_ASSERT(10 == p || false == res); } } } }; struct ws_deque_test : rl::test_suite { ws_deque q; bool state [2]; void before() { state[0] = true; state[1] = true; } void after() { RL_ASSERT(state[0] == false); RL_ASSERT(state[1] == false); } void thread(unsigned index) { if (0 == index) { q.push(1); q.push(2); int item = 0; bool res = q.pop(item); RL_ASSERT(res && item == 2); RL_ASSERT(state[1]); state[1] = false; item = 0; res = q.pop(item); if (res) { RL_ASSERT(state[0]); state[0] = false; } item = 0; res = q.pop(item); RL_ASSERT(res == false); } else { int item = 0; bool res = q.steal(item); if (res) { RL_ASSERT(item == 1); RL_ASSERT(state[0]); state[0] = false; } } } }; int main() { rl::simulate(); rl::simulate(); } ================================================ FILE: tests/relacy/relacy/example/ws_deque2/msvc8/ws_deque.sln ================================================  Microsoft Visual Studio Solution File, Format Version 9.00 # Visual Studio 2005 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ws_deque", "ws_deque.vcproj", "{ECB64178-A35E-4EB2-9EB0-BD72D6F7B6E4}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Win32 = Debug|Win32 Release|Win32 = Release|Win32 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {ECB64178-A35E-4EB2-9EB0-BD72D6F7B6E4}.Debug|Win32.ActiveCfg = Debug|Win32 {ECB64178-A35E-4EB2-9EB0-BD72D6F7B6E4}.Debug|Win32.Build.0 = Debug|Win32 {ECB64178-A35E-4EB2-9EB0-BD72D6F7B6E4}.Release|Win32.ActiveCfg = Release|Win32 {ECB64178-A35E-4EB2-9EB0-BD72D6F7B6E4}.Release|Win32.Build.0 = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection EndGlobal ================================================ FILE: tests/relacy/relacy/example/ws_deque2/msvc8/ws_deque.vcproj ================================================ ================================================ FILE: tests/relacy/relacy/example/ws_deque2/stdafx.cpp ================================================ // stdafx.cpp : source file that includes just the standard includes // ws_deque.pch will be the pre-compiled header // stdafx.obj will contain the pre-compiled type information #include "stdafx.h" // TODO: reference any additional headers you need in STDAFX.H // and not in this file ================================================ FILE: tests/relacy/relacy/example/ws_deque2/stdafx.h ================================================ #pragma once #include "../../relacy/pch.hpp" #include "../../relacy/relacy_std.hpp" ================================================ FILE: tests/relacy/relacy/example/ws_deque2/ws_deque.cpp ================================================ #include "stdafx.h" struct pdr { __declspec(thread) static pdr* instance; static size_t const defer_limit = 1024; typedef void(*dtor_f)(void*); struct entry_t { dtor_f dtor; void* ctx; }; entry_t defer_list [defer_limit]; size_t pos; size_t pos0; size_t thread_count; size_t th [4]; void init(size_t count) { //assert(0 == instance); instance = this; thread_count = count; pos = 0; pos0 = 0; for (size_t i = 0; i != thread_count; ++i) { th[i] = defer_limit; } } void fini() { for (size_t i = 0; i != thread_count; ++i) { assert(th[i] == defer_limit); } for (size_t i = pos0; i != pos; ++i) { assert(defer_list[i].dtor); defer_list[i].dtor(defer_list[i].ctx); } assert(this == instance); instance = 0; } void lock() { std::atomic_thread_fence($)(std::memory_order_seq_cst); assert(th[rl::ctx().threadx_->index_] == defer_limit); th[rl::ctx().threadx_->index_] = pos; } void unlock() { assert(th[rl::ctx().threadx_->index_] != defer_limit); th[rl::ctx().threadx_->index_] = defer_limit; pump(); } template static void dtor_impl(void* p) { RL_DELETE(static_cast(p)); } template void defer(T* p) { std::atomic_thread_fence($)(std::memory_order_seq_cst); assert(pos < defer_limit); entry_t& e = defer_list[pos++]; e.dtor = &pdr::dtor_impl; e.ctx = p; pump(); } void pump() { if (pos0 == pos) return; size_t min_pos = pos; for (size_t i = 0; i != thread_count; ++i) { if (th[i] < min_pos) min_pos = th[i]; } for (size_t i = pos0; i != min_pos; ++i) { assert(defer_list[i].dtor); defer_list[i].dtor(defer_list[i].ctx); } pos0 = min_pos; } }; pdr* pdr::instance = 0; void pdr_lock() { assert(pdr::instance); pdr::instance->lock(); } void pdr_unlock() { assert(pdr::instance); pdr::instance->unlock(); } template void pdr_defer(T* p) { assert(pdr::instance); pdr::instance->defer(p); } class ws_deque { public: ws_deque() { bottom_.block_($) = 0; bottom_.real_block_id_ = 0; bottom_.real_index_ = 0; bottom_.block_id_ = 0; bottom_.index_ = 0; bottom_.block_seq_ = 0; bottom_.check_order_ = 1; top::info t = {}; top_.block_($) = 0; top_.info_($) = t; alloc_block(); bottom_.block_id_ = bottom_.block_($)->header_.id_; top_.block_($) = bottom_.block_($); t.top_block_id_ = static_cast(top_.block_($).load()->header_.id_); t.bottom_block_id_ = static_cast(top_.block_($).load()->header_.id_); top_.info_($) = t; } ~ws_deque() { for (block* p = top_.block_($), *next; p; p = next) { next = p->header_.next_($).load(std::memory_order_relaxed); RL_DELETE(p); } } void push(void* const& i) { pdr_lock(); push_unbalanced(i); rebalance(); pdr_unlock(); } void push_unbalanced(void* i) { RL_ASSERT(bottom_.block_($)->header_.id_); bottom_.block_($)->data_[bottom_.real_index_]($).store(i, std::memory_order_release); if (block::item_count - 1 != bottom_.real_index_) { bottom_.real_index_ += 1; } else { alloc_block(); } } void rebalance() { if (0 == --bottom_.check_order_) { check_bottom(); } } void* pop() { pdr_lock(); rebalance(); void* p = pop_unbalanced(); pdr_unlock(); return p; } void* pop_unbalanced() { //!!! optimize //! fast-path for empty deque //! make comparasion faster if ((bottom_.block_id_ != bottom_.real_block_id_ || bottom_.index_ != bottom_.real_index_) && bottom_.real_index_) { bottom_.real_index_ -= 1; void* i = bottom_.block_($)->data_[bottom_.real_index_]($).load(std::memory_order_consume); return i; } else { return pop_unbalanced_slow(); } } void* pop_unbalanced_slow() { if (0 == bottom_.real_index_) { if (bottom_.real_block_id_ > bottom_.block_id_) { return pop_slow(); } else { return 0; } } else { void* i; pop_check_result const rv = pop_check(i); if (pop_check_cont != rv) return pop_check_succ == rv ? i : 0; return pop_unbalanced(); // recursion, must succeed } } void* steal() { pdr_lock(); retry: for (;;) { block* old_b = top_.block_($).load(std::memory_order_acquire); block* b = old_b; top::info old = top_.info_($).load(std::memory_order_consume); if (old.top_index_ == old.bottom_index_ && old.top_block_id_ == old.bottom_block_id_) { pdr_unlock(); return 0; } if (b->header_.id_ != old.top_block_id_) { do { b = b->header_.next_($).load(std::memory_order_relaxed); //RL_ASSERT(b); //!!! temp stub - is it right? // it seems that we always return 0 after we hit this goto if (0 == b) goto retry; } //!!! AV // b == 0 while (b->header_.id_ != old.top_block_id_); if (top_.block_($).compare_swap(old_b, b, std::memory_order_seq_cst)) { block* cur_b = old_b; do { pdr_defer(cur_b); cur_b = cur_b->header_.next_($).load(std::memory_order_relaxed); } while (cur_b != b); } } block* next_block = 0; top::info mod = old; void* i = b->data_[mod.top_index_]($).load(std::memory_order_consume); if (block::item_count - 1 == mod.top_index_) { next_block = b->header_.next_($).load(std::memory_order_relaxed); mod.top_block_id_ += 1; mod.top_index_ = 0; } else { mod.top_index_ += 1; } if (top_.info_($).compare_swap(old, mod, std::memory_order_seq_cst)) { if (next_block) { if (top_.block_($).compare_swap(b, next_block)) { pdr_defer(b); } } pdr_unlock(); return i; } } } unsigned size() const { top::info const top = top_.info_($).load(std::memory_order_relaxed); //unsigned volatile const top_block_id = top_.info_.part_.top_block_id_; //unsigned volatile const top_index = top_.info_.part_.top_index_; if (bottom_.real_block_id_ == top.top_block_id_) { unsigned const size = bottom_.real_index_ - top.top_index_; return size; } else { unsigned size = bottom_.real_index_; size += block::item_count - top.top_index_; size += (bottom_.real_block_id_ - top.top_block_id_ - 1) * block::item_count; return size; } } private: struct block { struct header { std::atomic next_; std::atomic prev_; ws_deque* deque_; unsigned id_; //!!! ~header() { id_ = 0; } }; static unsigned const item_count = 2; header header_; std::atomic data_ [item_count]; }; struct bottom { rl::var block_; unsigned check_order_; unsigned real_block_id_; unsigned real_index_; unsigned block_id_; unsigned index_; unsigned block_seq_; }; struct top { struct info { unsigned short top_index_; unsigned short top_block_id_; unsigned short bottom_index_; unsigned short bottom_block_id_; bool operator == (info const& x) const { return top_index_ == x.top_index_ && top_block_id_ == x.top_block_id_ && bottom_index_ == x.bottom_index_ && bottom_block_id_ == x.bottom_block_id_; } friend std::ostream& operator << (std::ostream& ss, info const& x) { return ss << "{" << x.top_index_ << "," << x.top_block_id_ << "," << x.bottom_index_ << "," << x.bottom_block_id_ << "}"; } }; std::atomic block_; std::atomic info_; }; bottom bottom_; char pad1 [64]; top top_; char pad2 [64]; void alloc_block() { //!!! check whether we already have next block in // bottom_.block_->header_.next_ block* b = bottom_.block_($) ? bottom_.block_($)->header_.next_($).load(std::memory_order_relaxed) : 0; if (0 == b) { b = RL_NEW block; b->header_.deque_ = this; bottom_.block_seq_ += 1; //!!! if (bottom_.block_seq_ > 0xffff) __asm int 3; bottom_.block_seq_ &= 0xffff; b->header_.id_ = bottom_.block_seq_; b->header_.prev_($).store(bottom_.block_($), std::memory_order_relaxed); if (bottom_.block_($)) bottom_.block_($)->header_.next_($).store(b, std::memory_order_relaxed); b->header_.next_($).store(0, std::memory_order_relaxed); } else { b = b; bottom_.block_seq_ += 1; //__asm int 3; } bottom_.block_($) = b; bottom_.real_block_id_ = b->header_.id_; bottom_.real_index_ = 0; } enum pop_check_result {pop_check_fail, pop_check_succ, pop_check_cont}; pop_check_result pop_check(void*& i) { check_bottom(); if (bottom_.block_id_ == bottom_.real_block_id_ && bottom_.index_ == bottom_.real_index_) { top::info const top = top_.info_($).load(std::memory_order_seq_cst); if ((bottom_.block_id_ == top.top_block_id_ && bottom_.index_ == (unsigned)top.top_index_ + 1) || (bottom_.block_id_ == (unsigned)top.top_block_id_ + 1 && block::item_count - 1 == top.top_index_ && 0 == bottom_.index_ )) { __asm int 3; i = steal(); if (i) return pop_check_succ; } return pop_check_fail; } return pop_check_cont; } void* pop_slow() { bottom_.block_seq_ -= 1; bottom_.block_seq_ &= 0xffff; bottom_.block_($) = bottom_.block_($)->header_.prev_($).load(std::memory_order_relaxed); //!!! AV: when core count set to 16 // bottom_.block_ = 0 // bottom.real_block_id = 1 // bottom.block_id = 8 //!!! AV in xscale too (thread count is 4) // the same variables values bottom_.real_block_id_ = bottom_.block_($)->header_.id_; bottom_.real_index_ = block::item_count - 1; top::info i = top_.info_($).load(std::memory_order_relaxed); RL_ASSERT(bottom_.block_($)->header_.id_ == bottom_.block_seq_); RL_ASSERT((bottom_.real_block_id_ == i.bottom_block_id_ && bottom_.real_index_ >= i.bottom_index_) || (bottom_.real_block_id_ > i.bottom_block_id_)); void* v = bottom_.block_($)->data_[block::item_count - 1]($).load(std::memory_order_consume); return v; } void check_bottom() { //!!! must leave at least 1 element unreserved // because owner have to steal it for (;;) { top::info old = top_.info_($).load(std::memory_order_relaxed); unsigned const top_block_id = old.top_block_id_; unsigned const top_index = old.top_index_; if (bottom_.real_block_id_ == top_block_id && bottom_.real_index_ == top_index) { bottom_.check_order_ = 2; return; } unsigned const s = size(); unsigned const r = reserved(); if (!(0 == r || (r > 1 && 4*r > 3*s))) { //bottom_.check_order_ = 2; //!!! bottom_.check_order_ = s / 8 + 2; bottom_.check_order_ = s / 2 + 2; return; } unsigned r2 = s*3/4 + 1; if (r2 >= s) r2 = s - 1; unsigned bottom_block_id; unsigned bottom_index; if (r2 + top_index < block::item_count) { bottom_block_id = top_block_id; bottom_index = top_index + r2; } else { unsigned const r3 = r2 + top_index; bottom_block_id = top_block_id + r3 / block::item_count; bottom_index = r3 % block::item_count; } top::info i; i.top_block_id_ = static_cast(top_block_id); i.top_index_ = static_cast(top_index); i.bottom_block_id_ = static_cast(bottom_block_id); i.bottom_index_ = static_cast(bottom_index); /* bottom volatile btm = bottom_; if (i.part_.top_block_id_ > i.part_.bottom_block_id_) __asm int 3; if (i.part_.top_block_id_ == i.part_.bottom_block_id_ && i.part_.top_index_ >= i.part_.bottom_index_) __asm int 3; if (i.part_.bottom_block_id_ > btm.real_block_id_) __asm int 3; if (i.part_.bottom_block_id_ == btm.real_block_id_ && i.part_.bottom_index_ > btm.real_index_) __asm int 3; */ if (top_.info_($).compare_swap(old, i, std::memory_order_seq_cst)) { bottom_.block_id_ = bottom_block_id; bottom_.index_ = bottom_index; //!!! bottom_.check_order_ = s / 8 + 2; bottom_.check_order_ = s / 2 + 2; return; } } } unsigned reserved() const { if (bottom_.real_block_id_ == bottom_.block_id_) { unsigned const reserved = bottom_.real_index_ - bottom_.index_; return reserved; } else { unsigned reserved = bottom_.real_index_; reserved += block::item_count - bottom_.index_; reserved += (bottom_.real_block_id_ - bottom_.block_id_ - 1) * block::item_count; return reserved; } } }; int x = 0; struct ws_deque_test : rl::test_suite { ws_deque q; pdr p; void before() { p.init(4); } void after() { p.fini(); } void thread(unsigned index) { if (0 == index) { for (size_t i = 0; i != 4; ++i) { q.push((void*)10); } for (size_t i = 0; i != 5; ++i) { void* p = q.pop(); RL_ASSERT((void*)10 == p || 0 == p); } for (size_t i = 0; i != 4; ++i) { q.push((void*)10); void* p = q.pop(); RL_ASSERT((void*)10 == p || 0 == p); } for (size_t i = 0; i != 4; ++i) { q.push((void*)10); q.push((void*)10); void* p = q.pop(); RL_ASSERT((void*)10 == p || 0 == p); p = q.pop(); RL_ASSERT((void*)10 == p || 0 == p); } for (size_t i = 0; i != 4; ++i) { q.push((void*)10); q.push((void*)10); q.push((void*)10); void* p = q.pop(); RL_ASSERT((void*)10 == p || 0 == p); } for (size_t i = 0; i != 14; ++i) { q.push((void*)10); void* p = q.pop(); RL_ASSERT((void*)10 == p || 0 == p); } } else { for (size_t i = 0; i != 4; ++i) { void* p = q.steal(); RL_ASSERT((void*)10 == p || 0 == p); } } } }; int main() { rl::test_params p; p.iteration_count = 1000000; rl::simulate(p); } ================================================ FILE: tests/relacy/relacy/relacy/atomic.hpp ================================================ /* Relacy Race Detector * Copyright (c) 2008-2013, Dmitry S. Vyukov * All rights reserved. * This software is provided AS-IS with no warranty, either express or implied. * This software is distributed under a license and may not be copied, * modified or distributed except as expressly authorized under the * terms of the license contained in the file LICENSE in this distribution. */ #ifndef RL_ATOMIC_HPP #define RL_ATOMIC_HPP #ifdef _MSC_VER # pragma once #endif #include "base.hpp" #include "context.hpp" #include "memory_order.hpp" #include "signature.hpp" #include "atomic_events.hpp" #include "waitset.hpp" #include "rmw.hpp" namespace rl { template class atomic; template struct bool_t {}; template class atomic_proxy_const { public: atomic_proxy_const(atomic const /*volatile*/& var, debug_info_param info) : var_(const_cast&>(var)) , info_(info) { } T load(memory_order mo = mo_seq_cst) const { return var_.load(mo, info_); } operator T () const { return load(); } protected: atomic& var_; debug_info info_; atomic_proxy_const& operator = (atomic_proxy_const const&); }; template class atomic_proxy : public atomic_proxy_const { public: typedef typename atomic_add_type::type add_type; atomic_proxy(atomic /*volatile*/& var, debug_info_param info) : atomic_proxy_const(var, info) { } void store(T value, memory_order mo = mo_seq_cst) { this->var_.store(value, mo, this->info_); } bool compare_exchange_weak(T& cmp, T xchg, memory_order mo = mo_seq_cst) { return this->var_.compare_exchange(bool_t(), cmp, xchg, mo, this->info_); } bool compare_exchange_weak(T& cmp, T xchg, memory_order mo, memory_order failure_mo) { return this->var_.compare_exchange(bool_t(), cmp, xchg, mo, failure_mo, this->info_); } bool compare_exchange_strong(T& cmp, T xchg, memory_order mo = mo_seq_cst) { return this->var_.compare_exchange(bool_t(), cmp, xchg, mo, this->info_); } bool compare_exchange_strong(T& cmp, T xchg, memory_order mo, memory_order failure_mo) { return this->var_.compare_exchange(bool_t(), cmp, xchg, mo, failure_mo, this->info_); } T exchange(T xchg, memory_order mo = mo_seq_cst) { return this->var_.rmw(rmw_type_t(), xchg, mo, this->info_); } T fetch_add(add_type value, memory_order mo = mo_seq_cst) { return this->var_.rmw(rmw_type_t(), value, mo, this->info_); } T fetch_sub(add_type value, memory_order mo = mo_seq_cst) { return this->var_.rmw(rmw_type_t(), value, mo, this->info_); } T fetch_and(T value, memory_order mo = mo_seq_cst) { return this->var_.rmw(rmw_type_t(), value, mo, this->info_); } T fetch_or(T value, memory_order mo = mo_seq_cst) { return this->var_.rmw(rmw_type_t(), value, mo, this->info_); } T fetch_xor(T value, memory_order mo = mo_seq_cst) { return this->var_.rmw(rmw_type_t(), value, mo, this->info_); } T operator = (T value) { store(value); return value; } T operator ++ (int) { return fetch_add(1); } T operator -- (int) { return fetch_sub(1); } T operator ++ () { return fetch_add(1) + 1; } T operator -- () { return fetch_sub(1) - 1; } T operator += (add_type value) { return fetch_add(value) + value; } T operator -= (add_type value) { return fetch_sub(value) + value; } T operator &= (T value) { return fetch_and(value) & value; } T operator |= (T value) { return fetch_or(value) | value; } T operator ^= (T value) { return fetch_xor(value) ^ value; } }; template class generic_atomic { public: generic_atomic() { context& c = ctx(); RL_VERIFY(false == c.invariant_executing); impl_ = c.atomic_ctor(this); initialized_ = false; value_ = T(); already_failed_ = false; if (val(strong_init)) { unsigned const index = c.threadx_->atomic_init(impl_); last_index_ = index; initialized_ = true; history_[index] = T(); value_ = T(); } } ~generic_atomic() { context& c = ctx(); RL_VERIFY(false == c.invariant_executing); sign_.check($); c.atomic_dtor(impl_); } T debug_value() const { sign_.check($); return value_; } RL_INLINE T load(memory_order mo, debug_info_param info) const { RL_VERIFY(mo_release != mo); RL_VERIFY(mo_acq_rel != mo); switch (mo) { case mo_relaxed: return load_impl(info); case mo_consume: return load_impl(info); case mo_acquire: return load_impl(info); case mo_seq_cst: return load_impl(info); default: break; } RL_VERIFY(false); return T(); } RL_INLINE void store(T v, memory_order mo, debug_info_param info) { RL_VERIFY(mo_acquire != mo); RL_VERIFY(mo_acq_rel != mo); switch (mo) { case mo_relaxed: return store_impl(v, info); case mo_release: return store_impl(v, info); case mo_seq_cst: return store_impl< mo_seq_cst, &thread_info_base::atomic_store_seq_cst>(v, info); default: break; } RL_VERIFY(false); } RL_INLINE bool compare_exchange_weak(T& cmp, T xchg, memory_order mo, debug_info_param info) { return compare_exchange(bool_t(), cmp, xchg, mo, info); } RL_INLINE bool compare_exchange_strong(T& cmp, T xchg, memory_order mo, debug_info_param info) { return compare_exchange(bool_t(), cmp, xchg, mo, info); } RL_INLINE bool compare_exchange_weak(T& cmp, T xchg, memory_order mo, debug_info_param info, memory_order failure_mo, debug_info_param) { return compare_exchange(bool_t(), cmp, xchg, mo, failure_mo, info); } RL_INLINE bool compare_exchange_strong(T& cmp, T xchg, memory_order mo, debug_info_param info, memory_order failure_mo, debug_info_param) { return compare_exchange(bool_t(), cmp, xchg, mo, failure_mo, info); } template RL_INLINE bool compare_exchange(bool_t, T& cmp, T xchg, memory_order mo, debug_info_param info) { switch (mo) { case mo_relaxed: return compare_swap_impl(cmp, xchg, info); case mo_consume: return compare_swap_impl(cmp, xchg, info); case mo_acquire: return compare_swap_impl(cmp, xchg, info); case mo_release: return compare_swap_impl(cmp, xchg, info); case mo_acq_rel: return compare_swap_impl(cmp, xchg, info); case mo_seq_cst: return compare_swap_impl(cmp, xchg, info); } RL_VERIFY(false); return false; } template RL_INLINE bool compare_exchange(bool_t, T& cmp, T xchg, memory_order mo, memory_order failure_mo, debug_info_param info) { switch (mo) { case mo_relaxed: { RL_VERIFY(mo_relaxed == failure_mo); return compare_swap_impl(cmp, xchg, info); } case mo_consume: { RL_VERIFY(mo_relaxed == failure_mo || mo_consume == failure_mo); switch (failure_mo) { case mo_relaxed: return compare_swap_impl(cmp, xchg, info); case mo_consume: return compare_swap_impl(cmp, xchg, info); default: RL_VERIFY(false); return false; } } case mo_acquire: { RL_VERIFY(mo_relaxed == failure_mo || mo_consume == failure_mo || mo_acquire == failure_mo); switch (failure_mo) { case mo_relaxed: return compare_swap_impl(cmp, xchg, info); case mo_consume: return compare_swap_impl(cmp, xchg, info); case mo_acquire: return compare_swap_impl(cmp, xchg, info); default: RL_VERIFY(false); return false; } } case mo_release: { RL_VERIFY(mo_relaxed == failure_mo); return compare_swap_impl(cmp, xchg, info); } case mo_acq_rel: { RL_VERIFY(mo_relaxed == failure_mo || mo_consume == failure_mo || mo_acquire == failure_mo); switch (failure_mo) { case mo_relaxed: return compare_swap_impl(cmp, xchg, info); case mo_consume: return compare_swap_impl(cmp, xchg, info); case mo_acquire: return compare_swap_impl(cmp, xchg, info); default: RL_VERIFY(false); return false; } } case mo_seq_cst: { RL_VERIFY(mo_relaxed == failure_mo || mo_consume == failure_mo || mo_acquire == failure_mo || mo_seq_cst == failure_mo); switch (failure_mo) { case mo_relaxed: return compare_swap_impl(cmp, xchg, info); case mo_consume: return compare_swap_impl(cmp, xchg, info); case mo_acquire: return compare_swap_impl(cmp, xchg, info); case mo_seq_cst: return compare_swap_impl(cmp, xchg, info); default: RL_VERIFY(false); return false; } } } RL_VERIFY(false); return false; } T exchange(T xchg, memory_order mo, debug_info_param info) { return rmw(rmw_type_t(), xchg, mo, info); } T fetch_add(typename atomic_add_type::type value, memory_order mo, debug_info_param info) { return rmw(rmw_type_t(), value, mo, info); } T fetch_sub(typename atomic_add_type::type value, memory_order mo, debug_info_param info) { return rmw(rmw_type_t(), value, mo, info); } T fetch_and(T value, memory_order mo, debug_info_param info) { return rmw(rmw_type_t(), value, mo, info); } T fetch_or(T value, memory_order mo, debug_info_param info) { return rmw(rmw_type_t(), value, mo, info); } T fetch_xor(T value, memory_order mo, debug_info_param info) { return rmw(rmw_type_t(), value, mo, info); } template RL_INLINE T rmw(rmw_type_t, Y op, memory_order mo, debug_info_param info) { switch (mo) { case mo_relaxed: return rmw_impl(rmw_type_t(), op, info); case mo_consume: return rmw_impl(rmw_type_t(), op, info); case mo_acquire: return rmw_impl(rmw_type_t(), op, info); case mo_release: return rmw_impl(rmw_type_t(), op, info); case mo_acq_rel: return rmw_impl(rmw_type_t(), op, info); case mo_seq_cst: return rmw_impl(rmw_type_t(), op, info); } RL_VERIFY(false); return T(); } unpark_reason wait(context& c, bool is_timed, bool allow_spurious_wakeup, debug_info_param info) { sign_.check(info); return c.threadx_->atomic_wait(impl_, is_timed, allow_spurious_wakeup, info); } thread_id_t wake(context& c, thread_id_t count, debug_info_param info) { sign_.check(info); return c.threadx_->atomic_wake(impl_, count, info); } private: T value_; T history_ [atomic_history_size]; atomic_data* impl_; unsigned last_index_; signature<987654321> sign_; bool initialized_; bool already_failed_; template T load_impl(debug_info_param info) const { context& c = ctx(); c.sched(); sign_.check(info); if (false == c.invariant_executing) { unsigned const index = (c.threadx_->*impl)(impl_); if ((unsigned)-1 == index) { RL_HIST(atomic_load_event) {this, T(), mo, false} RL_HIST_END(); RL_ASSERT_IMPL(false, test_result_unitialized_access, "", info); } T const v = history_[index]; RL_HIST(atomic_load_event) {this, v, mo, last_index_ != index} RL_HIST_END(); return v; } else { if (false == initialized_) { RL_HIST(atomic_load_event) {this, T(), mo, false} RL_HIST_END(); RL_ASSERT_IMPL(false, test_result_unitialized_access, "", info); } return value_; } } template void store_impl(T v, debug_info_param info) { context& c = ctx(); RL_VERIFY(false == c.invariant_executing); c.sched(); sign_.check(info); unsigned const index = (c.threadx_->*impl)(impl_); T const prev = value_; last_index_ = index; history_[index] = v; value_ = v; initialized_ = true; RL_HIST(atomic_store_event) {this, prev, v, mo} RL_HIST_END(); } template bool compare_swap_impl(T& cmp, T xchg, debug_info_param info) { context& c = ctx(); RL_VERIFY(false == c.invariant_executing); c.sched(); sign_.check(info); if (false == initialized_) { RL_HIST(atomic_load_event) {this, T(), mo, false} RL_HIST_END(); RL_ASSERT_IMPL(false, test_result_unitialized_access, "", info); } bool success = false; bool spurious_failure = false; bool aba = false; T const cmpv = cmp; T const current = value_; if (current == cmpv) { if (val(spurious_failures)) { if (c.is_random_sched()) { spurious_failure = (0 == c.rand(4, sched_type_cas_fail)); } else { if (false == already_failed_) { spurious_failure = 0 == c.rand(2, sched_type_cas_fail); if (spurious_failure) already_failed_ = true; } } } if (false == spurious_failure) { success = true; unsigned const index = (c.threadx_->*impl)(impl_, aba); value_ = xchg; last_index_ = index; history_[index] = xchg; } } if (false == success) { (c.threadx_->*failure_impl)(impl_); cmp = current; } RL_HIST(atomic_cas_event) {RL_INFO, this, current, cmpv, xchg, mo, success, spurious_failure, aba} RL_HIST_END(); return success; } template T rmw_impl(rmw_type_t, Y op, debug_info_param info) { context& c = ctx(); RL_VERIFY(false == c.invariant_executing); c.sched(); sign_.check(info); if (false == initialized_) { RL_HIST(atomic_load_event) {this, T(), mo, false} RL_HIST_END(); RL_ASSERT_IMPL(false, test_result_unitialized_access, "", info); } bool aba; unsigned const index = (c.threadx_->*impl)(impl_, aba); T const prev_value = value_; T const new_value = perform_rmw(rmw_type_t(), prev_value, op); value_ = new_value; last_index_ = index; history_[index] = new_value; typedef atomic_rmw_event atomic_rmw_event_t; RL_HIST(atomic_rmw_event_t) {RL_INFO, this, prev_value, op, new_value, mo, type} RL_HIST_END(); return prev_value; } RL_NOCOPY(generic_atomic); }; template class atomic : public generic_atomic { public: atomic() { } /*explicit*/ atomic(T value) { this->store(value, mo_relaxed, $); } atomic_proxy_const operator () (debug_info_param info) const /*volatile*/ { return atomic_proxy_const(*this, info); } atomic_proxy operator () (debug_info_param info) /*volatile*/ { return atomic_proxy(*this, info); } bool is_lock_free() const /*volatile*/ { return true; } friend class atomic_proxy; friend class atomic_proxy_const; RL_NOCOPY(atomic); }; typedef atomic atomic_bool; typedef atomic atomic_address; typedef atomic atomic_char; typedef atomic atomic_schar; typedef atomic atomic_uchar; typedef atomic atomic_short; typedef atomic atomic_ushort; typedef atomic atomic_int; typedef atomic atomic_uint; typedef atomic atomic_long; typedef atomic atomic_ulong; typedef atomic atomic_llong; typedef atomic atomic_ullong; //typedef atomic atomic_char16_t; //typedef atomic atomic_char32_t; typedef atomic atomic_wchar_t; //typedef atomic atomic_int_least8_t; //typedef atomic atomic_uint_least8_t; //typedef atomic atomic_int_least16_t; //typedef atomic atomic_uint_least16_t; //typedef atomic atomic_int_least32_t; //typedef atomic atomic_uint_least32_t; //typedef atomic atomic_int_least64_t; //typedef atomic atomic_uint_least64_t; //typedef atomic atomic_int_fast8_t; //typedef atomic atomic_uint_fast8_t; //typedef atomic atomic_int_fast16_t; //typedef atomic atomic_uint_fast16_t; //typedef atomic atomic_int_fast32_t; //typedef atomic atomic_uint_fast32_t; //typedef atomic atomic_int_fast64_t; //typedef atomic atomic_uint_fast64_t; typedef atomic atomic_intptr_t; typedef atomic atomic_uintptr_t; typedef atomic atomic_size_t; //typedef atomic atomic_ssize_t; typedef atomic atomic_ptrdiff_t; //typedef atomic atomic_intmax_t; //typedef atomic atomic_uintmax_t; template struct atomic_data_impl : atomic_data { typedef thread_info thread_info_t; struct history_record { timestamp_t acq_rel_order_ [thread_count]; timestamp_t first_seen_order_ [thread_count]; bool busy_; bool seq_cst_; thread_id_t thread_id_; timestamp_t acq_rel_timestamp_; }; static size_t const history_size = atomic_history_size; aligned history_ [history_size]; unsigned current_index_; waitset futex_ws_; sync_var futex_sync_; atomic_data_impl() { current_index_ = 0; history_record& rec = history_[0]; history_[atomic_history_size - 1].busy_ = false; rec.busy_ = false; rec.seq_cst_ = false; rec.thread_id_ = (thread_id_t)-1; } atomic_data_impl(thread_info_t& th) { current_index_ = 0; history_[atomic_history_size - 1].busy_ = false; history_record& rec = history_[0]; rec.busy_ = true; rec.seq_cst_ = false; rec.thread_id_ = th.index_; th.own_acq_rel_order_ += 1; rec.acq_rel_timestamp_ = th.own_acq_rel_order_; foreach(rec.acq_rel_order_, assign_zero); foreach(rec.first_seen_order_, assign<(timestamp_t)-1>); rec.first_seen_order_[th.index_] = th.own_acq_rel_order_; } }; } #endif ================================================ FILE: tests/relacy/relacy/relacy/atomic_events.hpp ================================================ /* Relacy Race Detector * Copyright (c) 2008-2013, Dmitry S. Vyukov * All rights reserved. * This software is provided AS-IS with no warranty, either express or implied. * This software is distributed under a license and may not be copied, * modified or distributed except as expressly authorized under the * terms of the license contained in the file LICENSE in this distribution. */ #ifndef RL_ATOMIC_EVENTS_HPP #define RL_ATOMIC_EVENTS_HPP #ifdef _MSC_VER # pragma once #endif #include "base.hpp" #include "memory_order.hpp" #include "rmw.hpp" namespace rl { template class atomic; template class generic_atomic; template struct atomic_add_type { typedef T type; typedef T output_type; }; template struct atomic_add_type { typedef ptrdiff_t type; typedef void* output_type; }; template struct atomic_cas_event { typedef typename atomic_add_type::output_type type; debug_info var_info_; void const* var_addr_; type cur_value_; type cmp_value_; type xchg_value_; memory_order mo_; bool success_; bool spurious_failure_; bool aba_; void output(std::ostream& s) const { s << "<" << std::hex << var_addr_ << std::dec << ">" << " CAS " << (success_ ? "succ " : "fail ") << (spurious_failure_ ? "[SPURIOUSLY] " : "") << (aba_ ? "[ABA] " : "") << "orig=" << cur_value_ << ", cmp=" << cmp_value_ << ", xchg=" << xchg_value_ << ", order=" << format(mo_); } }; template struct atomic_load_event { typedef typename atomic_add_type::output_type type; void const* var_addr_; type value_; memory_order mo_; bool not_current_; void output(std::ostream& s) const { s << "<" << std::hex << var_addr_ << std::dec << ">" << " atomic load, value=" << value_ << (not_current_ ? " [NOT CURRENT]" : "") << ", order=" << format(mo_); } }; template struct atomic_store_event { typedef typename atomic_add_type::output_type type; void const* var_addr_; type prev_value_; type value_; memory_order mo_; void output(std::ostream& s) const { s << "<" << std::hex << var_addr_ << std::dec << ">" << " atomic store, value=" << value_ << ", (prev value=" << prev_value_ << ")" << ", order=" << format(mo_); } }; template struct atomic_rmw_event { typedef typename atomic_add_type::output_type type; debug_info var_info_; void const* var_addr_; type prev_value_; Y op_value_; type new_value_; memory_order mo_; rmw_type_e type_; void output(std::ostream& s) const { s << "<" << std::hex << var_addr_ << std::dec << ">" << " " << format(type_) << " " << ", prev=" << prev_value_ << ", arg=" << op_value_ << ", new=" << new_value_ << ", order=" << format(mo_); } }; } #endif ================================================ FILE: tests/relacy/relacy/relacy/atomic_fence.hpp ================================================ /* Relacy Race Detector * Copyright (c) 2008-2013, Dmitry S. Vyukov * All rights reserved. * This software is provided AS-IS with no warranty, either express or implied. * This software is distributed under a license and may not be copied, * modified or distributed except as expressly authorized under the * terms of the license contained in the file LICENSE in this distribution. */ #ifndef RL_FENCE_HPP #define RL_FENCE_HPP #ifdef _MSC_VER # pragma once #endif #include "base.hpp" #include "context.hpp" #include "memory_order.hpp" namespace rl { struct atomic_fence_event { memory_order mo_; bool is_thread_fence_; void output(std::ostream& s) const { s << (is_thread_fence_ ? "" : "compiler ") << format(mo_) << " fence"; } }; RL_INLINE void atomic_thread_fence(memory_order mo, debug_info_param info) { context& c = ctx(); RL_VERIFY(false == c.invariant_executing); switch (mo) { case mo_relaxed: RL_VERIFY(false); break; case mo_consume: case mo_acquire: c.atomic_thread_fence_acquire(); break; case mo_release: c.atomic_thread_fence_release(); break; case mo_acq_rel: c.atomic_thread_fence_acq_rel(); break; case mo_seq_cst: c.atomic_thread_fence_seq_cst(); break; } RL_HIST(atomic_fence_event) {mo, true} RL_HIST_END(); } RL_INLINE void atomic_signal_fence(memory_order mo, debug_info_param info) { context& c = ctx(); RL_HIST(atomic_fence_event) {mo, false} RL_HIST_END(); } } #endif ================================================ FILE: tests/relacy/relacy/relacy/backoff.hpp ================================================ /* Relacy Race Detector * Copyright (c) 2008-2013, Dmitry S. Vyukov * All rights reserved. * This software is provided AS-IS with no warranty, either express or implied. * This software is distributed under a license and may not be copied, * modified or distributed except as expressly authorized under the * terms of the license contained in the file LICENSE in this distribution. */ #ifndef RL_BACKOFF_HPP #define RL_BACKOFF_HPP #ifdef _MSC_VER # pragma once #endif #include "base.hpp" #include "context_base.hpp" namespace rl { inline void yield(unsigned count, debug_info_param info) { ctx().yield(count, info); } template class backoff_t { public: backoff_t() : count_(1) { } void yield(debug_info_param info) { rl::yield(count_, info); count_ = count_ * factor_t + add_t; } private: unsigned count_; }; typedef backoff_t<1, 0> backoff; typedef backoff_t<1, 1> linear_backoff; typedef backoff_t<2, 0> exp_backoff; } #endif ================================================ FILE: tests/relacy/relacy/relacy/base.hpp ================================================ /* Relacy Race Detector * Copyright (c) 2008-2013, Dmitry S. Vyukov * All rights reserved. * This software is provided AS-IS with no warranty, either express or implied. * This software is distributed under a license and may not be copied, * modified or distributed except as expressly authorized under the * terms of the license contained in the file LICENSE in this distribution. */ #ifndef RL_BASE_HPP #define RL_BASE_HPP #ifdef _MSC_VER # pragma once #endif #include "pch.hpp" #include "platform.hpp" namespace rl { size_t const subsequent_timed_wait_limit = 4; } #define RL_TEST #ifdef RL_JAVA_MODE # define RL_GC # define RL_NO_MALLOC # define RL_JAVA_API # define RL_JAVA_MM #endif #ifdef RL_CLI_MODE # define RL_GC # define RL_NO_MALLOC # define RL_CLI_API # define RL_CLI_MM #endif #ifdef RL_POSIX_MODE # define RL_POSIX_API #endif #ifdef RL_WIN_MODE # define RL_WIN_API #endif #ifdef RL_CPP_MODE # define RL_CPP_API # define RL_CPP_MM #endif #if defined(RL_JAVA_MM) || defined(RL_CLI_MM) # define RL_IMPROVED_SEQ_CST_FENCE # define RL_IMPROVED_SEQ_CST_RMW #endif namespace rl { #define RL_NOCOPY(CLASS) \ private: \ CLASS(CLASS const&); \ CLASS& operator = (CLASS const&); /**/ template class nocopy { nocopy(nocopy const&); nocopy& operator = (nocopy const&); protected: nocopy() {} }; template struct align_pad { template struct helper { struct type { char pad [base - sz]; }; }; template struct helper { struct type {}; }; template struct helper { typedef typename align_pad::type type; }; typedef typename helper::type type; }; template struct aligned : T, align_pad::type {}; template T val(T x) { return x; } } #include "defs.hpp" #define RL_INFO ::rl::debug_info(__FUNCTION__, __FILE__, __LINE__) #define $ RL_INFO #ifdef RL_DO_ASSERT # if RL_DO_ASSERT # define RL_DO_ASSERT_IMPL # endif #else # ifdef _DEBUG # define RL_DO_ASSERT_IMPL # endif #endif #ifdef _MSC_VER # define RL_INT3() __debugbreak(); abort() #else # define RL_INT3() abort() #endif #ifdef RL_DO_ASSERT_IMPL # define RL_VERIFY(x) do { if (!((void)0, (x))) { \ ::rl::assert_failed(#x, $); RL_INT3(); } } while ((void)0, 0) #else # define RL_VERIFY(x) (void)0 #endif #endif ================================================ FILE: tests/relacy/relacy/relacy/cli.hpp ================================================ /* Relacy Race Detector * Copyright (c) 2008-2013, Dmitry S. Vyukov * All rights reserved. * This software is provided AS-IS with no warranty, either express or implied. * This software is distributed under a license and may not be copied, * modified or distributed except as expressly authorized under the * terms of the license contained in the file LICENSE in this distribution. */ #ifndef RL_CLI_HPP #define RL_CLI_HPP #ifdef _MSC_VER # pragma once #endif #include "base.hpp" #include "context_base.hpp" #include "atomic_fence.hpp" namespace rl { struct Thread { static void MemoryBarrier(debug_info_param info) { atomic_thread_fence(mo_seq_cst, info); } template static T VolatileRead(generic_atomic const& v, debug_info_param info) { return v.load(mo_acquire, info); } template static void VolatileWrite(generic_atomic& v, T x, debug_info_param info) { v.store(x, mo_release, info); } static void SpinWait(int iterations, debug_info_param info) { ctx().yield(iterations, info); } }; } #endif ================================================ FILE: tests/relacy/relacy/relacy/cli_interlocked.hpp ================================================ /* Relacy Race Detector * Copyright (c) 2008-2013, Dmitry S. Vyukov * All rights reserved. * This software is provided AS-IS with no warranty, either express or implied. * This software is distributed under a license and may not be copied, * modified or distributed except as expressly authorized under the * terms of the license contained in the file LICENSE in this distribution. */ #ifndef RL_CLI_INTERLOCKED_HPP #define RL_CLI_INTERLOCKED_HPP #ifdef _MSC_VER # pragma once #endif #include "base.hpp" #include "atomic.hpp" namespace rl { struct Interlocked { template static T Add(generic_atomic& v, T x, debug_info_param info) { T result = v.rmw(rmw_type_t(), x, mo_seq_cst, info) + x; return result; } template static T CompareExchange(generic_atomic& v, T xchg, T cmp, debug_info_param info) { v.compare_exchange(bool_t(), cmp, xchg, mo_seq_cst, mo_seq_cst, info); return cmp; } template static T Increment(generic_atomic& v, debug_info_param info) { return Add(v, (T)1, info); } template static T Decrement(generic_atomic& v, debug_info_param info) { return Add(v, (T)-1, info); } template static T Exchange(generic_atomic& v, T x, debug_info_param info) { T result = v.rmw(rmw_type_t(), x, mo_seq_cst, info); return result; } template static T Read(generic_atomic const& v, debug_info_param info) { return v.load(mo_acquire, info); } }; } #endif ================================================ FILE: tests/relacy/relacy/relacy/cli_var.hpp ================================================ /* Relacy Race Detector * Copyright (c) 2008-2013, Dmitry S. Vyukov * All rights reserved. * This software is provided AS-IS with no warranty, either express or implied. * This software is distributed under a license and may not be copied, * modified or distributed except as expressly authorized under the * terms of the license contained in the file LICENSE in this distribution. */ #ifndef RL_CLI_VAR_HPP #define RL_CLI_VAR_HPP #ifdef _MSC_VER # pragma once #endif #include "base.hpp" #include "atomic.hpp" namespace rl { template class nvar; template class nvar_proxy { public: typedef typename atomic_add_type::type add_type; template friend class nvar; operator T () const { return load(); } T operator = (T value) { store(value); return value; } T operator = (nvar_proxy const& r) { T const value = r.load(); store(value); return *this; } T operator ++ (int) { T tmp = load(); store(tmp + 1); return tmp; } T operator -- (int) { T tmp = load(); store(tmp - 1); return tmp; } T operator ++ () { T tmp = load(); store(tmp + 1); return tmp + 1; } T operator -- () { T tmp = load(); store(tmp - 1); return tmp - 1; } T operator += (add_type value) { T tmp = load(); store(tmp + value); return tmp + value; } T operator -= (add_type value) { T tmp = load(); store(tmp - value); return tmp - value; } private: nvar& var_; debug_info info_; nvar_proxy(nvar& var, debug_info_param info) : var_(var) , info_(info) { } T load() const { return var_.load(mo_relaxed, info_); } void store(T value) { var_.store(value, mo_relaxed, info_); } }; template class nvar : public generic_atomic { public: typedef nvar_proxy proxy_t; friend class nvar_proxy; nvar() { } explicit nvar(T value) { this->store(value, mo_relaxed, $); } nvar(nvar const& r) { T const value = r.load(mo_relaxed, $); this->store(value, mo_relaxed, $); } nvar(proxy_t const& r) { T const value = r.load(); this->store(value, mo_relaxed, r.info_); } proxy_t operator () (debug_info_param info) { return proxy_t(*this, info); } private: nvar& operator = (nvar const&); }; } #endif ================================================ FILE: tests/relacy/relacy/relacy/cli_volatile.hpp ================================================ /* Relacy Race Detector * Copyright (c) 2008-2013, Dmitry S. Vyukov * All rights reserved. * This software is provided AS-IS with no warranty, either express or implied. * This software is distributed under a license and may not be copied, * modified or distributed except as expressly authorized under the * terms of the license contained in the file LICENSE in this distribution. */ #ifndef RL_CLI_VOLATILE_HPP #define RL_CLI_VOLATILE_HPP #ifdef _MSC_VER # pragma once #endif #include "base.hpp" #include "atomic.hpp" //!!! fix Java volatiles! // they must be modeled as seq_cst stores/loads namespace rl { template class nvolatile; template class nvolatile_proxy { public: typedef typename atomic_add_type::type add_type; template friend class nvolatile; operator T () const { return load(); } T operator = (T value) { store(value); return value; } T operator = (nvolatile_proxy const& r) { T const value = r.load(); store(value); return *this; } T operator ++ (int) { T tmp = load(); store(tmp + 1); return tmp; } T operator -- (int) { T tmp = load(); store(tmp - 1); return tmp; } T operator ++ () { T tmp = load(); store(tmp + 1); return tmp + 1; } T operator -- () { T tmp = load(); store(tmp - 1); return tmp - 1; } T operator += (add_type value) { T tmp = load(); store(tmp + value); return tmp + value; } T operator -= (add_type value) { T tmp = load(); store(tmp - value); return tmp - value; } private: nvolatile& var_; debug_info info_; nvolatile_proxy(nvolatile& var, debug_info_param info) : var_(var) , info_(info) { } T load() const { return var_.load(mo_acquire, info_); } void store(T value) { var_.store(value, mo_release, info_); } }; template class nvolatile : public generic_atomic { public: typedef nvolatile_proxy proxy_t; friend class nvolatile_proxy; nvolatile() { } explicit nvolatile(T value) { //??? whether here must be mo_relaxed or mo_release? this->store(value, mo_release, $); } nvolatile(nvolatile const& r) { T const value = r.load(mo_acquire, $); //??? whether here must be mo_relaxed or mo_release? this->store(value, mo_release, $); } nvolatile(proxy_t const& r) { T const value = r.var_.load(mo_acquire, r.info_); //??? whether here must be mo_relaxed or mo_release? this->store(value, mo_release, r.info_); } proxy_t operator () (debug_info_param info) { return proxy_t(*this, info); } }; } #endif ================================================ FILE: tests/relacy/relacy/relacy/context.hpp ================================================ /* Relacy Race Detector * Copyright (c) 2008-2013, Dmitry S. Vyukov * All rights reserved. * This software is provided AS-IS with no warranty, either express or implied. * This software is distributed under a license and may not be copied, * modified or distributed except as expressly authorized under the * terms of the license contained in the file LICENSE in this distribution. */ #ifndef RL_CONTEXT_HPP #define RL_CONTEXT_HPP #ifdef _MSC_VER # pragma once #endif #include "base.hpp" #include "thread_local_ctx.hpp" #include "context_base.hpp" #include "thread.hpp" #include "history.hpp" #include "memory.hpp" #include "test_result.hpp" #include "slab_allocator.hpp" #include "test_params.hpp" #include "random.hpp" #include "foreach.hpp" #include "random_scheduler.hpp" #include "full_search_scheduler.hpp" #include "context_bound_scheduler.hpp" namespace rl { template class generic_mutex_data_impl; template class condvar_data_impl; template class sema_data_impl; template class event_data_impl; struct park_event { bool is_timed_; bool allow_spurious_; void output(std::ostream& s) const { s << "blocking current thread" << (is_timed_ ? " [timed]" : ""); } }; struct unpark_event { thread_id_t thread_; void output(std::ostream& s) const { s << "unblocking thread " << thread_; } }; struct yield_event { unsigned count_; void output(std::ostream& s) const { s << "yield(" << count_ << ")"; } }; /* template struct context_persistent { static thread_id_t const thread_count = test_t::params::thread_count; fiber_t fibers_ [thread_count]; memory_mgr memory_; context_persistent() { for (thread_id_t i = 0; i != thread_count; ++i) { create_fiber(fibers_[i], &context_impl::fiber_proc, (void*)(intptr_t)i); } } ~context_persistent() { for (thread_id_t i = 0; i != thread_count; ++i) { delete_fiber(fibers_[i]); } } }; */ template class context_impl : thread_local_contxt_impl, test_t::params::thread_count> { private: typedef thread_local_contxt_impl , test_t::params::thread_count> base_t; typedef typename scheduler_t::shared_context_t shared_context_t; using base_t::params_; using base_t::history_; using base_t::threadx_; using base_t::disable_preemption_; using base_t::disable_alloc_; using base_t::invariant_executing; static thread_id_t const main_thread_id = -1; static thread_id_t const static_thread_count = test_t::params::static_thread_count; static thread_id_t const dynamic_thread_count = test_t::params::dynamic_thread_count; static thread_id_t const thread_count = test_t::params::thread_count; iteration_t current_iter_; test_result_e test_result_; string test_result_str_; fiber_t main_fiber_; bool special_function_executing; memory_mgr memory_; iteration_t start_iteration_; size_t sched_count_; scheduler_t sched_; shared_context_t& sctx_; random_generator rand_; test_t* current_test_suite; bool current_test_suite_constructed; bool first_thread_; timestamp_t seq_cst_fence_order_ [thread_count]; aligned > threads_ [thread_count]; thread_info& threadi() { return *static_cast*>(threadx_); } slab_allocator >* atomic_alloc_; slab_allocator >* var_alloc_; slab_allocator >* mutex_alloc_; slab_allocator >* condvar_alloc_; slab_allocator >* sema_alloc_; slab_allocator >* event_alloc_; virtual atomic_data* atomic_ctor(void* ctx) { return new (atomic_alloc_->alloc(ctx)) atomic_data_impl (); } virtual void atomic_dtor(atomic_data* data) { static_cast*>(data)->~atomic_data_impl(); atomic_alloc_->free(static_cast*>(data)); } virtual var_data* var_ctor() { return new (var_alloc_->alloc()) var_data_impl (); } virtual void var_dtor(var_data* data) { static_cast*>(data)->~var_data_impl(); var_alloc_->free(static_cast*>(data)); } virtual unpark_reason wfmo_park(void** ws, win_waitable_object** wo, size_t count, bool wait_all, bool is_timed, debug_info_param info) { return waitset::park_current(*this, reinterpret_cast**>(ws), wo, count, wait_all, is_timed, true, info); } public: context_impl(test_params& params, shared_context_t& sctx) : base_t(thread_count, params) , current_iter_(0) , start_iteration_(1) , sched_(params, sctx, dynamic_thread_count) , sctx_(sctx) { this->context::seq_cst_fence_order_ = this->seq_cst_fence_order_; current_test_suite = (test_t*)(::malloc)(sizeof(test_t)); current_test_suite_constructed = false; test_result_ = test_result_success; threadx_ = 0; special_function_executing = false; invariant_executing = false; create_main_fiber(main_fiber_); set_low_thread_prio(); if (0 == val(thread_count)) { throw std::logic_error("no threads created"); } atomic_alloc_ = new slab_allocator >(); var_alloc_ = new slab_allocator >(); mutex_alloc_ = new slab_allocator >(); condvar_alloc_ = new slab_allocator >(); sema_alloc_ = new slab_allocator >(); event_alloc_ = new slab_allocator >(); for (thread_id_t i = 0; i != thread_count; ++i) { new (&threads_[i]) thread_info (i); threads_[i].ctx_ = this; } for (thread_id_t i = 0; i != thread_count; ++i) { //threads_[i].fiber_ = persistent.fibers_[i]; create_fiber(threads_[i].fiber_, &context_impl::fiber_proc, (void*)(intptr_t)i); } disable_alloc_ = 0; } ~context_impl() { disable_alloc_ += 1; for (thread_id_t i = 0; i != thread_count; ++i) { delete_fiber(threads_[i].fiber_); } delete_main_fiber(main_fiber_); // there can be atomic loads and stores etc // it's not good place to calling user code //destroy_current_test_suite(); //::free(current_test_suite); delete atomic_alloc_; delete var_alloc_; delete mutex_alloc_; delete condvar_alloc_; delete sema_alloc_; delete event_alloc_; } void construct_current_test_suite() { RL_VERIFY(false == current_test_suite_constructed); new (current_test_suite) test_t (); current_test_suite_constructed = true; } void destroy_current_test_suite() { if (current_test_suite_constructed) { current_test_suite->~test_t(); current_test_suite_constructed = false; } } virtual void* alloc(size_t size, bool is_array, debug_info_param info) { disable_alloc_ += 1; #ifndef RL_GC void* p = memory_.alloc(size); #else void* p = memory_.alloc(size, (void(*)(void*))0); #endif disable_alloc_ -= 1; RL_HIST_CTX(memory_alloc_event) {p, size, is_array} RL_HIST_END(); return p; } #ifdef RL_GC virtual void* alloc(size_t size, bool is_array, void(*dtor)(void*), debug_info_param info) { disable_alloc_ += 1; void* p = memory_.alloc(size, dtor); disable_alloc_ -= 1; RL_HIST_CTX(memory_alloc_event) {p, size, is_array} RL_HIST_END(); return p; } #endif virtual void free(void* p, bool is_array, debug_info_param info) { RL_HIST_CTX(memory_free_event) {p, is_array} RL_HIST_END(); #ifndef RL_GC bool const defer = (0 == sched_.rand(this->is_random_sched() ? 4 : 2, sched_type_mem_realloc)); #else bool const defer = false; #endif disable_alloc_ += 1; if (false == memory_.free(p, defer)) fail_test("incorrect address passed to free() function", test_result_double_free, info); disable_alloc_ -= 1; } size_t prev_alloc_size_; debug_info last_info_; virtual void* alloc(size_t size) { if (disable_alloc_) return (::malloc)(size); prev_alloc_size_ = size; disable_alloc_ += 1; #ifndef RL_GC void* p = (memory_.alloc)(size); #else void* p = (memory_.alloc)(size, 0); #endif disable_alloc_ -= 1; return p; } virtual size_t prev_alloc_size() { size_t sz = prev_alloc_size_; prev_alloc_size_ = 0; return sz; } virtual void set_debug_info(debug_info_param info) { last_info_ = info; } virtual void free(void* p) { if (disable_alloc_) { (::free)(p); return; } disable_alloc_ += 1; debug_info const& info = last_info_; RL_HIST_CTX(memory_free_event) {p, false} RL_HIST_END(); #ifndef RL_GC bool const defer = (0 == sched_.rand(this->is_random_sched() ? 4 : 2, sched_type_mem_realloc)); #else bool const defer = false; #endif if (false == memory_.free(p, defer)) fail_test("incorrect address passed to free() function", test_result_double_free, info); disable_alloc_ -= 1; } virtual unpark_reason park_current_thread(bool is_timed, bool allow_spurious_wakeup, bool do_switch, debug_info_param info) { RL_VERIFY(false == special_function_executing); RL_VERIFY(threadx_->saved_disable_preemption_ == -1); unsigned dp = disable_preemption_; disable_preemption_ = 0; RL_HIST_CTX(park_event) {is_timed, allow_spurious_wakeup} RL_HIST_END(); if (false == sched_.park_current_thread(is_timed, allow_spurious_wakeup)) { fail_test("deadlock detected", test_result_deadlock, info); } schedule(1); // otherwise it's restored in switch_back() RL_VERIFY(threadx_->saved_disable_preemption_ == -1); if (do_switch == false || threadx_->unpark_reason_ != unpark_reason_normal) disable_preemption_ = dp; else threadx_->saved_disable_preemption_ = dp; unpark_reason reason = threadx_->unpark_reason_; return reason; } virtual void unpark_thread(thread_id_t th, bool do_switch, debug_info_param info) { RL_VERIFY(false == special_function_executing); RL_HIST_CTX(unpark_event) {th} RL_HIST_END(); sched_.unpark_thread(th, do_switch); if (do_switch) { threads_[th].unpark_reason_ = unpark_reason_normal; threads_[th].temp_switch_from_ = threadx_->index_; switch_to_fiber(th); } } virtual void switch_back(debug_info_param info) { //std::cout << "switching back from " << threadx_->index_ << " to " << threadx_->temp_switch_from_ << std::endl; (void)info; RL_VERIFY(threadx_->saved_disable_preemption_ != -1); RL_VERIFY(threadx_->temp_switch_from_ != -1); thread_id_t const tid = threadx_->temp_switch_from_; threadx_->temp_switch_from_ = -1; switch_to_fiber(tid); RL_VERIFY(threadx_->saved_disable_preemption_ != -1); disable_preemption_ = threadx_->saved_disable_preemption_; threadx_->saved_disable_preemption_ = -1; } void ensure(bool cond, char const* desc, test_result_e res, debug_info_param info) { if (false == cond) fail_test(desc, res, info); } virtual void fail_test(char const* desc, test_result_e res, debug_info_param info) { RL_DEBUGBREAK_ON_FAILURE_IMPL; RL_VERIFY(test_result_success != res); test_result_ = res; if (test_result_user_assert_failed == res && invariant_executing) test_result_ = test_result_user_invariant_failed; if (0 == desc || 0 == desc[0]) test_result_str_ = test_result_str(test_result_); else test_result_str_ = string(test_result_str(test_result_)) + " (" + desc + ")"; RL_HIST_CTX(user_event) {test_result_str_.c_str()} RL_HIST_END(); switch_to_main_fiber(); } virtual void rl_until(char const* desc, debug_info_param info) { RL_HIST_CTX(user_event) {desc} RL_HIST_END(); test_result_ = test_result_until_condition_hit; switch_to_main_fiber(); } static void fiber_proc(void* thread_index); virtual void fiber_proc_impl(int thread_index) { thread_info_base* param = &threads_[thread_index]; debug_info info = $; for (;;) { if (first_thread_) { first_thread_ = false; special_function_executing = true; RL_HIST_CTX(user_event) {"[CTOR BEGIN]"} RL_HIST_END(); construct_current_test_suite(); RL_HIST_CTX(user_event) {"[CTOR END]"} RL_HIST_END(); RL_HIST_CTX(user_event) {"[BEFORE BEGIN]"} RL_HIST_END(); current_test_suite->before(); RL_HIST_CTX(user_event) {"[BEFORE END]"} RL_HIST_END(); rl_global_fence(); invariant_executing = true; current_test_suite->invariant(); invariant_executing = false; special_function_executing = false; } //std::cout << "thread " << param->index_ << " started" << std::endl; param->on_start(); if (param->index_ < static_thread_count) { current_test_suite->thread(param->index_); } else { if (param->dynamic_thread_func_) param->dynamic_thread_func_(param->dynamic_thread_param_); } //std::cout << "thread " << param->index_ << " finished" << std::endl; RL_HIST_CTX(user_event) {"[THREAD FINISHED]"} RL_HIST_END(); RL_VERIFY(disable_preemption_ == 0); RL_VERIFY(threadx_->temp_switch_from_ == -1); RL_VERIFY(threadx_->saved_disable_preemption_ == -1); param->on_finish(); thread_finish_result res = sched_.thread_finished(); //std::cout << "thread " << param->index_ << " finished res=" << res << std::endl; if (thread_finish_result_normal == res) { sched(); } else if (thread_finish_result_last == res) { special_function_executing = true; invariant_executing = true; current_test_suite->invariant(); invariant_executing = false; rl_global_fence(); RL_HIST_CTX(user_event) {"[AFTER BEGIN]"} RL_HIST_END(); current_test_suite->after(); RL_HIST_CTX(user_event) {"[AFTER END]"} RL_HIST_END(); RL_HIST_CTX(user_event) {"[DTOR BEGIN]"} RL_HIST_END(); destroy_current_test_suite(); RL_HIST_CTX(user_event) {"[DTOR END]"} RL_HIST_END(); special_function_executing = false; ensure(memory_.iteration_end(), "memory leak detected", test_result_memory_leak, $); ensure(atomic_alloc_->iteration_end(), "atomic leak", test_result_resource_leak, $); ensure(var_alloc_->iteration_end(), "var leak", test_result_resource_leak, $); ensure(mutex_alloc_->iteration_end(), "mutex leak", test_result_resource_leak, $); ensure(condvar_alloc_->iteration_end(), "condition variable leak", test_result_resource_leak, $); ensure(sema_alloc_->iteration_end(), "semaphore leak", test_result_resource_leak, $); ensure(event_alloc_->iteration_end(), "event leak", test_result_resource_leak, $); switch_to_main_fiber(); } else if (thread_finish_result_deadlock == res) { fail_test("deadlock detected", test_result_deadlock, info); } else { RL_VERIFY(false); } } } virtual win_waitable_object* create_thread(void*(*fn)(void*), void* ctx) { RL_VERIFY(fn); thread_id_t id = sched_.create_thread(); threads_[id].dynamic_thread_func_ = fn; threads_[id].dynamic_thread_param_ = ctx; threads_[id].sync_object_.on_create(); return &threads_[id].sync_object_; } virtual void yield(unsigned count, debug_info_param info) { RL_VERIFY(count); RL_HIST_CTX(yield_event) {count} RL_HIST_END(); if (sched_count_++ > params_.execution_depth_limit) fail_test("livelock", test_result_livelock, RL_INFO); schedule(count); } virtual void sched() { if (sched_count_++ > params_.execution_depth_limit) fail_test("livelock", test_result_livelock, RL_INFO); if (disable_preemption_) return; schedule(0); } void schedule(unsigned yield) { RL_VERIFY(threadx_->temp_switch_from_ == -1); RL_VERIFY(disable_preemption_ == 0); if (special_function_executing) { threadx_->unpark_reason_ = unpark_reason_normal; return; } special_function_executing = true; invariant_executing = true; current_test_suite->invariant(); invariant_executing = false; special_function_executing = false; if (yield) threadx_->last_yield_ = threadi().own_acq_rel_order_; unpark_reason reason = unpark_reason_normal; thread_id_t const th = sched_.schedule(reason, yield); threads_[th].unpark_reason_ = reason; switch_to_fiber(th); RL_VERIFY(0 == disable_preemption_); } test_result_e simulate(std::ostream& ss, std::istream& sss, bool second) { if (EOF != sss.peek()) { sss >> start_iteration_; sched_.set_state(sss); } test_result_e const res = simulate2(second); if (test_result_success != res && false == params_.collect_history) { ss << params_.stop_iteration << " "; sched_.get_state(ss); } return res; } test_result_e simulate2(bool second) { debug_info info = $; current_iter_ = start_iteration_; for (; ; ++current_iter_) { rand_.seed(current_iter_); iteration(current_iter_); if (test_result_success != test_result_) { params_.test_result = test_result_; params_.stop_iteration = current_iter_; if (params_.collect_history) output_history(); return test_result_; } // If you hit assert here, then probably your test is non-deterministic // Check whether you are using functions like ::rand() // or static variables or values of object addresses (for hashing) in your test // Replace ::rand() with rl::rand(), eliminate static variables in the test RL_VERIFY(second == false); (void)second; RL_HIST_CTX(user_event) {"ITERATION END"} RL_HIST_END(); if (sched_.iteration_end()) break; } params_.test_result = test_result_success; params_.stop_iteration = current_iter_; return test_result_success; } RL_INLINE static void reset_thread(thread_info& ti) { foreach( ti.acquire_fence_order_, &assign_zero); foreach( ti.release_fence_order_, &assign_zero); #ifdef RL_IMPROVED_SEQ_CST_FENCE foreach(ti.imp_seq_cst_order_, &assign_zero); #endif } void iteration(iteration_t iter) { first_thread_ = true; disable_preemption_ = 0; sched_count_ = 0; foreach( threads_, &context_impl::reset_thread); foreach( seq_cst_fence_order_, &assign_zero); base_t::iteration_begin(); for (thread_id_t i = 0; i != thread_count; ++i) { threads_[i].iteration_begin(); } disable_alloc_ += 1; thread_id_t const th = sched_.iteration_begin(iter); disable_alloc_ -= 1; switch_to_fiber(th); if (0 == iter % progress_probe_period) { output_progress(iter); } } private: void switch_to_fiber(thread_id_t th) { fiber_t& prev = threadx_ ? threadx_->fiber_ : main_fiber_; threadx_ = &threads_[th]; ::switch_to_fiber(threadx_->fiber_, prev); } void switch_to_main_fiber() { fiber_t& prev = threadx_->fiber_; threadx_ = 0; ::switch_to_fiber(main_fiber_, prev); } void output_progress(iteration_t iter) { iteration_t const total = sched_.iteration_count(); if (0 == iter % (progress_probe_period * 16)) { disable_alloc_ += 1; *params_.progress_stream << iter * 100 / total << "% (" << iter << "/" << total << ")" << std::endl; disable_alloc_ -= 1; } } virtual unsigned rand(unsigned limit, sched_type t) { return sched_.rand(limit, t); } void output_history() { if (false == params_.output_history) { *params_.output_stream << test_result_str_ << std::endl; *params_.output_stream << "iteration: " << params_.stop_iteration << std::endl; *params_.output_stream << std::endl; } history_.print_exec_history(params_.output_history); #ifndef RL_GC if (test_result_memory_leak == test_result_) { memory_.output_allocs(*params_.output_stream); } #endif //!!! output other leaked resources if (test_result_ == test_result_resource_leak && atomic_alloc_->iteration_end() == false) { *params_.output_stream << "leaked atomics:" << std::endl; atomic_alloc_->output_allocs(*params_.output_stream); } } void rl_global_fence() { timestamp_t max_acq_rel = 0; for (thread_id_t i = 0; i != thread_count; ++i) { if (threads_[i].acq_rel_order_[i] > max_acq_rel) max_acq_rel = threads_[i].acq_rel_order_[i]; } for (thread_id_t i = 0; i != thread_count; ++i) { for (thread_id_t j = 0; j != thread_count; ++j) { threads_[i].acq_rel_order_[j] = max_acq_rel; } } } virtual void atomic_thread_fence_acquire() { threadi().atomic_thread_fence_acquire(); } virtual void atomic_thread_fence_release() { threadi().atomic_thread_fence_release(); } virtual void atomic_thread_fence_acq_rel() { threadi().atomic_thread_fence_acq_rel(); } virtual void atomic_thread_fence_seq_cst() { sched(); threadi().atomic_thread_fence_seq_cst(seq_cst_fence_order_); } virtual thread_id_t get_thread_count() const { return thread_count; } virtual generic_mutex_data* mutex_ctor(bool is_rw, bool is_exclusive_recursive, bool is_shared_recursive, bool failing_try_lock) { return new (mutex_alloc_->alloc()) generic_mutex_data_impl(is_rw, is_exclusive_recursive, is_shared_recursive, failing_try_lock); } virtual void mutex_dtor(generic_mutex_data* m) { generic_mutex_data_impl* mm = static_cast*>(m); mm->~generic_mutex_data_impl(); mutex_alloc_->free(mm); } virtual condvar_data* condvar_ctor(bool allow_spurious_wakeups) { return new (condvar_alloc_->alloc()) condvar_data_impl(allow_spurious_wakeups); } virtual void condvar_dtor(condvar_data* cv) { condvar_data_impl* mm = static_cast*>(cv); mm->~condvar_data_impl(); condvar_alloc_->free(mm); } virtual sema_data* sema_ctor(bool spurious_wakeups, unsigned initial_count, unsigned max_count) { return new (sema_alloc_->alloc()) sema_data_impl(spurious_wakeups, initial_count, max_count); } virtual void sema_dtor(sema_data* cv) { sema_data_impl* mm = static_cast*>(cv); mm->~sema_data_impl(); sema_alloc_->free(mm); } virtual event_data* event_ctor(bool manual_reset, bool initial_state) { return new (event_alloc_->alloc()) event_data_impl(manual_reset, initial_state); } virtual void event_dtor(event_data* cv) { event_data_impl* mm = static_cast*>(cv); mm->~event_data_impl(); event_alloc_->free(mm); } context_impl(context_impl const&); context_impl& operator = (context_impl const&); }; /* template struct thread_params_t { typedef context_impl context_t; //HANDLE handle; context_t* ctx; ostringstream oss; istringstream* iss; //RL_NOCOPY(thread_params_t); }; template unsigned __stdcall thread_func(void * ctx) { typedef thread_params_t params_t; params_t& p = *static_cast(ctx); p.ctx->simulate(p.oss, *p.iss, false); return 0; } */ template test_result_e run_test(test_params& params, std::ostream& oss, bool second) { typedef context_impl context_t; typedef typename sched_t::shared_context_t shared_context_t; //typedef thread_params_t params_t; //bool destroy_persistent = false; //context_persistent* persistent = 0; //if (persistent_ptr == 0) //{ // persistent = new context_persistent; // persistent_ptr = persistent; //} //else //{ // persistent = static_cast*>(persistent_ptr); // destroy_persistent = true; //} shared_context_t sctx; test_result_e res; //if (second == false) { istringstream iss (params.initial_state); res = context_t(params, sctx).simulate(oss, iss, second); } //else //{ // size_t const thread_count = 2; // vector::type threads (thread_count); // for (size_t i = 0; i != thread_count; i += 1) // { // threads[i] = new params_t; // threads[i]->iss = new istringstream(params.initial_state); // threads[i]->ctx = new context_t(params, sctx); // threads[i]->handle = (HANDLE)(_beginthreadex)(0, 0, &thread_func, threads[i], 0, 0); // } // for (size_t i = 0; i != thread_count; i += 1) // { // (WaitForSingleObject)(threads[i]->handle, (INFINITE)); // } // for (size_t i = 0; i != thread_count; i += 1) // { // delete threads[i]->ctx; // delete threads[i]->iss; // delete threads[i]; // } // return test_result_success; //} //if (destroy_persistent) //{ // delete persistent; // persistent_ptr = 0; //} return res; } template bool simulate(test_params& params) { char const* test_name = typeid(test_t).name(); while (test_name[0] >= '0' && test_name[0] <= '9') test_name += 1; params.test_name = test_name; *params.output_stream << params.test_name << std::endl; unsigned start_time = get_tick_count(); //void* persistent = 0; ostringstream oss; //istringstream iss (params.initial_state); test_result_e res = test_result_success; if (random_scheduler_type == params.search_type) res = run_test >(params, oss, false); else if (fair_full_search_scheduler_type == params.search_type) res = run_test >(params, oss, false); else if (fair_context_bound_scheduler_type == params.search_type) res = run_test >(params, oss, false); else RL_VERIFY(false); if (test_result_success == res) { unsigned t = get_tick_count() - start_time; if (0 == t) t = 1; *params.output_stream << "iterations: " << params.stop_iteration << std::endl; *params.output_stream << "total time: " << t << std::endl; *params.output_stream << "throughput: " << (uint64_t)params.stop_iteration * 1000 / t << std::endl; *params.output_stream << std::endl; } else if (false == params.output_history && false == params.collect_history) { ostringstream oss2; params.initial_state = oss.str(); //istringstream iss2 (oss.str()); params.collect_history = true; params.final_state = oss.str(); iteration_t const stop_iter = params.stop_iteration; test_result_e res2 = test_result_success; if (random_scheduler_type == params.search_type) res2 = run_test >(params, oss2, true); else if (fair_full_search_scheduler_type == params.search_type) res2 = run_test >(params, oss2, true); else if (fair_context_bound_scheduler_type == params.search_type) res2 = run_test >(params, oss2, true); else RL_VERIFY(false); // If you hit assert here, then probably your test is non-deterministic // Check whether you are using functions like ::rand() // or static variables or values of object addresses (for hashing) in your test // Replace ::rand() with rl::rand(), eliminate static variables in the test RL_VERIFY(res == res2); RL_VERIFY(params.stop_iteration == stop_iter); (void)stop_iter; (void)res2; } return test_t::params::expected_result == res; } template bool simulate() { test_params params; return simulate(params); } template struct simulate_thunk : test_suite, 1> { static size_t const dynamic_thread_count = thread_count; void thread(unsigned) { func(); } }; template bool execute(test_params& params) { return simulate >(params); } template bool execute() { return simulate >(); } typedef bool (*simulate_f)(test_params&); template void context_impl::fiber_proc(void* thread_index) { ctx().fiber_proc_impl((int)(intptr_t)thread_index); } template void dtor_arr_impl(void* pp) { type* p = (type*)((char*)pp + alignment); size_t count = *(size_t*)pp; for (size_t i = 0; i != count; ++i) { p->~type(); p += 1; } } template type* new_arr_impl(size_t count, rl::debug_info_param info) { RL_VERIFY(alignment >= sizeof(size_t)); context& c = ctx(); #ifndef RL_GC void* mem = c.alloc(alignment + count * sizeof(type), true, info); #else void* mem = c.alloc(alignment + count * sizeof(type), true, &dtor_arr_impl, info); #endif *(size_t*)mem = count; size_t i = 0; char* begin = (char*)mem + alignment; char* pos = begin; try { for (; i != count; ++i) { new (pos) type; pos += sizeof(type); } return (type*)begin; } catch (...) { pos -= sizeof(type); i -= 1; for (; i < count; --i) { ((type*)pos)->~type(); pos -= sizeof(type); } ctx().free(mem, true, info); throw; } } template void delete_arr_impl(type* p, debug_info_param info) { if (p == 0) return; context& c = ctx(); char* begin = (char*)p - alignment; size_t count = *(size_t*)begin; for (size_t i = 0; i != count; ++i) { p->~type(); p += 1; } c.free(begin, true, info); } template void delete_impl(type* p, debug_info_param info) { p->~type(); ctx().free(p, false, info); } template void dtor_impl(void* p) { static_cast(p)->~type(); } inline unsigned rand(unsigned limit) { return ctx().rand(limit, sched_type_user); } inline unsigned thread_index() { return ctx().threadx_->index_; } struct new_proxy { debug_info info; new_proxy(debug_info_param info) : info(info) { //printf(__FUNCSIG__ "\n"); } template T* operator % (T* p) { context& c = ctx(); size_t sz = c.prev_alloc_size(); if (sz) { RL_HIST(memory_alloc_event) {p, sz, false} RL_HIST_END(); } return p; } }; struct delete_proxy { //debug_info info_; delete_proxy(debug_info_param info) //: info_(info) { ctx().set_debug_info(info); //printf(__FUNCSIG__ "\n"); } }; inline void* rl_malloc(size_t sz, debug_info_param info) { return ctx().alloc(sz, false, info); } inline void* rl_calloc(size_t sz, size_t cnt, debug_info_param info) { void* p = ctx().alloc(sz * cnt, false, info); memset(p, 0, sz * cnt); return p; } inline void* realloc(void* p, size_t sz, debug_info_param info) { if (sz == 0) { ctx().free(p, false, info); return 0; } else { void* pp = ctx().alloc(sz, false, info); memcpy(pp, p, sz); //!!! how much memory to move? ctx().free(p, false, info); return pp; } } inline void rl_free(void* p, debug_info_param info) { ctx().free(p, false, info); } inline size_t hash_ptr(void const* p, size_t size) { return ctx().get_addr_hash(p) % size; } inline void systemwide_fence(debug_info_param info) { context& c = ctx(); RL_HIST(user_msg_event) {"system-wide fence"} RL_HIST_END(); c.rl_global_fence(); } } // namespace rl #ifndef RL_GC inline void* operator new (size_t size, rl::debug_info_param info) { return rl::ctx().alloc(size, false, info); } inline void* operator new [] (size_t size, rl::debug_info_param info) { return rl::ctx().alloc(size, false, info); } inline void operator delete (void* p, rl::debug_info_param info) { rl::ctx().free(p, false, info); } inline void operator delete [] (void* p, rl::debug_info_param info) { rl::ctx().free(p, false, info); } #endif #ifdef RL_GC inline void* operator new (size_t size, void(*dtor)(void*), rl::debug_info_param info) { return rl::ctx().alloc(size, false, dtor, info); } inline void operator delete (void* p, void(*dtor)(void*), rl::debug_info_param info) { (void)p; (void)dtor; (void)info; } #endif inline void* operator new (size_t size) RL_THROW_SPEC(std::bad_alloc) { if (rl::is_ctx()) return rl::ctx().alloc(size); else return (::malloc)(size); } inline void* operator new [] (size_t size) RL_THROW_SPEC(std::bad_alloc) { if (rl::is_ctx()) return rl::ctx().alloc(size); else return (::malloc)(size); } inline void operator delete (void* p) throw() { if (rl::is_ctx()) rl::ctx().free(p); else (::free)(p); } inline void operator delete [] (void* p) throw() { if (rl::is_ctx()) rl::ctx().free(p); else (::free)(p); } #define RL_NEW_PROXY rl::new_proxy($) % new #define RL_DELETE_PROXY rl::delete_proxy($) , delete #endif ================================================ FILE: tests/relacy/relacy/relacy/context_addr_hash.hpp ================================================ /* Relacy Race Detector * Copyright (c) 2008-2013, Dmitry S. Vyukov * All rights reserved. * This software is provided AS-IS with no warranty, either express or implied. * This software is distributed under a license and may not be copied, * modified or distributed except as expressly authorized under the * terms of the license contained in the file LICENSE in this distribution. */ #ifndef RL_CONTEXT_ADDR_HASH_HPP #define RL_CONTEXT_ADDR_HASH_HPP #ifdef _MSC_VER # pragma once #endif #include "base.hpp" namespace rl { struct context_addr_hash_iface { virtual size_t get_addr_hash (void const* p) = 0; virtual ~context_addr_hash_iface () {} // to calm down g++ }; template class context_addr_hash_impl : protected base_t { public: context_addr_hash_impl(thread_id_t thread_count_param, test_params& params) : base_t(thread_count_param, params) { } void iteration_begin() { base_t::iteration_begin(); hash_map_.clear(); hash_seq_ = 0; } private: struct entry { uintptr_t ptr_; size_t hash_; }; typedef map::type hash_map_t; hash_map_t hash_map_; size_t hash_seq_; virtual size_t get_addr_hash (void const* p) { //!!! accept 'table size' to do 'hash % table_size' // will give more information for state exploration hash_map_t::iterator iter (hash_map_.find(p)); if (iter != hash_map_.end() && iter->first == p) { return iter->second; } else { //!!! distribute hashes more randomly, use rand() size_t hash = hash_seq_++; hash_map_.insert(std::make_pair(p, hash)); return hash; } } }; } #endif ================================================ FILE: tests/relacy/relacy/relacy/context_base.hpp ================================================ /* Relacy Race Detector * Copyright (c) 2008-2013, Dmitry S. Vyukov * All rights reserved. * This software is provided AS-IS with no warranty, either express or implied. * This software is distributed under a license and may not be copied, * modified or distributed except as expressly authorized under the * terms of the license contained in the file LICENSE in this distribution. */ #ifndef RL_CONTEXT_BASE_HPP #define RL_CONTEXT_BASE_HPP #ifdef _MSC_VER # pragma once #endif #include "base.hpp" #include "history.hpp" #include "memory.hpp" #include "test_result.hpp" #include "slab_allocator.hpp" #include "test_params.hpp" #include "random.hpp" #include "foreach.hpp" #include "thread_base.hpp" #include "context_addr_hash.hpp" #ifdef RL_DEBUGBREAK_ON_ASSERT # ifdef _MSC_VER # define RL_DEBUGBREAK_ON_ASSERT_IMPL {if (IsDebuggerPresent()) __debugbreak();} # else # define RL_DEBUGBREAK_ON_ASSERT_IMPL {__asm("int3");} # endif #else # define RL_DEBUGBREAK_ON_ASSERT_IMPL #endif #ifdef RL_DEBUGBREAK_ON_FAILURE # ifdef _MSC_VER # define RL_DEBUGBREAK_ON_FAILURE_IMPL {if (IsDebuggerPresent()) __debugbreak();} # else # define RL_DEBUGBREAK_ON_FAILURE_IMPL {__asm("int3");} # endif #else # define RL_DEBUGBREAK_ON_FAILURE_IMPL #endif namespace rl { class thread_info_base; struct atomic_data {}; struct var_data { virtual void init(thread_info_base& th) = 0; virtual bool store(thread_info_base& th) = 0; virtual bool load(thread_info_base& th) = 0; virtual ~var_data() {} // just to calm down gcc }; struct generic_mutex_data; struct condvar_data; struct sema_data; struct event_data; struct user_msg_event { string msg_; void output(std::ostream& s) const { s << msg_; } }; class context; template struct context_holder { static context* instance_; static long volatile ctx_seq; }; template long volatile context_holder::ctx_seq = 0; class context : public thread_local_context_iface , public context_addr_hash_iface , nocopy<> { public: static context& instance() { //!!! disabled for check in operator new RL_VERIFY(context_holder<>::instance_); return *context_holder<>::instance_; } static bool is_instance() { return context_holder<>::instance_; } virtual atomic_data* atomic_ctor(void* ctx) = 0; virtual void atomic_dtor(atomic_data* data) = 0; virtual var_data* var_ctor() = 0; virtual void var_dtor(var_data* data) = 0; virtual generic_mutex_data* mutex_ctor(bool is_rw, bool is_exclusive_recursive, bool is_shared_recursive, bool failing_try_lock) = 0; virtual void mutex_dtor(generic_mutex_data* m) = 0; virtual condvar_data* condvar_ctor(bool allow_spurious_wakeups) = 0; virtual void condvar_dtor(condvar_data* cv) = 0; virtual sema_data* sema_ctor(bool spurious_wakeups, unsigned initial_count, unsigned max_count) = 0; virtual void sema_dtor(sema_data* cv) = 0; virtual event_data* event_ctor(bool manual_reset, bool initial_state) = 0; virtual void event_dtor(event_data* cv) = 0; virtual void rl_global_fence() = 0; virtual void sched() = 0; virtual void yield(unsigned count, debug_info_param info) = 0; virtual void fail_test(char const* desc, test_result_e res, debug_info_param info) = 0; virtual void rl_until(char const* desc, debug_info_param info) = 0; virtual void* alloc(size_t size, bool is_array, debug_info_param info) = 0; #ifdef RL_GC virtual void* alloc(size_t size, bool is_array, void(*dtor)(void*), debug_info_param info) = 0; #endif virtual void free(void* p, bool is_array, debug_info_param info) = 0; virtual void* alloc(size_t size) = 0; virtual void free(void* p) = 0; virtual size_t prev_alloc_size() = 0; virtual void set_debug_info(debug_info_param info) = 0; virtual void fiber_proc_impl(int thread_index) = 0; virtual unpark_reason park_current_thread(bool is_timed, bool allow_spurious_wakeup, bool do_switch, debug_info_param info) = 0; virtual void unpark_thread(thread_id_t th, bool do_switch, debug_info_param info) = 0; virtual void switch_back(debug_info_param info) = 0; virtual void atomic_thread_fence_acquire() = 0; virtual void atomic_thread_fence_release() = 0; virtual void atomic_thread_fence_acq_rel() = 0; virtual void atomic_thread_fence_seq_cst() = 0; virtual unsigned rand(unsigned limit, sched_type t) = 0; virtual win_waitable_object* create_thread(void*(*fn)(void*), void* ctx) = 0; virtual unpark_reason wfmo_park(void** ws, win_waitable_object** wo, size_t count, bool wait_all, bool is_timed, debug_info_param info) = 0; int get_errno(); void set_errno(int value); thread_info_base* threadx_; timestamp_t* seq_cst_fence_order_; bool invariant_executing; RL_INLINE bool collecting_history() const { return params_.collect_history && false == invariant_executing; } template void exec_log(debug_info_param info, event_t const& ev); void exec_log_msg(debug_info_param info, char const* msg) { user_msg_event ev = {msg}; exec_log(info, ev); } bool is_random_sched() const { return is_random_sched_; } unsigned get_ctx_seq() const { return ctx_seq_; } void disable_preemption(); void enable_preemption(); virtual thread_id_t get_thread_count() const = 0; thread_id_t current_thread() const { return threadx_->index_; } void iteration_begin() { } protected: history_mgr history_; test_params& params_; unsigned disable_preemption_; int disable_alloc_; context(thread_id_t thread_count, test_params& params) : history_(*params.output_stream, thread_count) , params_(params) , disable_alloc_(1) { RL_VERIFY(0 == context_holder<>::instance_); context_holder<>::instance_ = this; is_random_sched_ = params_.search_type == random_scheduler_type; #ifdef _MSC_VER ctx_seq_ = _InterlockedExchangeAdd(&context_holder<>::ctx_seq, 1) + 1; #else ctx_seq_ = __sync_fetch_and_add(&context_holder<>::ctx_seq, 1) + 1; #endif } virtual ~context() { RL_VERIFY(this == context_holder<>::instance_); context_holder<>::instance_ = 0; } private: bool is_random_sched_; unsigned ctx_seq_; }; template context* context_holder::instance_ = 0; inline context& ctx() { return context::instance(); } inline bool is_ctx() { return context::is_instance(); } inline int get_errno() { return ctx().get_errno(); } inline void set_errno(int value) { return ctx().set_errno(value); } class preemption_disabler : nocopy<> { public: preemption_disabler(context& c) : c_(c) { c_.disable_preemption(); } ~preemption_disabler() { c_.enable_preemption(); } private: context& c_; }; } #define RL_HIST_IMPL(C, INFO, TYPE) \ do { \ if (C.collecting_history()) { \ rl::debug_info const& rl_info_c = INFO; \ rl::context& rl_hist_c = C; \ TYPE ev = \ /**/ #define RL_HIST_END() \ ; \ rl_hist_c.exec_log(rl_info_c, ev); \ } \ } while ((void)0, 0) \ /**/ #define RL_HIST_CTX(TYPE) RL_HIST_IMPL((*this), info, TYPE) #define RL_HIST(TYPE) RL_HIST_IMPL(c, info, TYPE) #define RL_LOG(desc) rl::ctx().exec_log_msg(RL_INFO, desc) #ifdef _MSC_VER # define RL_ASSERT_IMPL(x, res, str, info) do {if (!((void)0, (x))) {{RL_DEBUGBREAK_ON_ASSERT_IMPL} rl::ctx().fail_test(str, res, info);}} while ((void)0, 0) #else # define RL_ASSERT_IMPL(x, res, str, info) do {if (!((void)0, (x))) rl::ctx().fail_test(str, res, info);} while ((void)0, 0) #endif #define RL_ASSERT(x) RL_ASSERT_IMPL(x, rl::test_result_user_assert_failed, "assertion: " #x, RL_INFO) #define RL_UNTIL(x) do {if ((x)) rl::ctx().rl_until(#x, RL_INFO);} while ((void)0, 0) #endif ================================================ FILE: tests/relacy/relacy/relacy/context_base_impl.hpp ================================================ /* Relacy Race Detector * Copyright (c) 2008-2013, Dmitry S. Vyukov * All rights reserved. * This software is provided AS-IS with no warranty, either express or implied. * This software is distributed under a license and may not be copied, * modified or distributed except as expressly authorized under the * terms of the license contained in the file LICENSE in this distribution. */ #ifndef RL_CONTEXT_BASE_IMPL_HPP #define RL_CONTEXT_BASE_IMPL_HPP #ifdef _MSC_VER # pragma once #endif namespace rl { /* inline void context::disable_history() { RL_VERIFY(threadx_); threadx_->disable_history_ += 1; } inline void context::enable_history() { RL_VERIFY(threadx_); RL_VERIFY(threadx_->disable_history_); threadx_->disable_history_ -= 1; } */ inline void context::disable_preemption() { disable_preemption_ += 1; } inline void context::enable_preemption() { disable_preemption_ -= 1; } inline int context::get_errno() { RL_VERIFY(threadx_); return threadx_->errno_; } inline void context::set_errno(int value) { RL_VERIFY(threadx_); threadx_->errno_ = value; } template void context::exec_log(debug_info_param info, event_t const& ev) { RL_VERIFY(collecting_history()); disable_alloc_ += 1; history_.exec_log(threadx_ ? threadx_->index_ : -1, info, ev, params_.output_history); disable_alloc_ -= 1; } } #endif ================================================ FILE: tests/relacy/relacy/relacy/context_bound_scheduler.hpp ================================================ /* Relacy Race Detector * Copyright (c) 2008-2013, Dmitry S. Vyukov * All rights reserved. * This software is provided AS-IS with no warranty, either express or implied. * This software is distributed under a license and may not be copied, * modified or distributed except as expressly authorized under the * terms of the license contained in the file LICENSE in this distribution. */ #ifndef RL_CONTEXT_BOUND_SCHEDULER_HPP #define RL_CONTEXT_BOUND_SCHEDULER_HPP #ifdef _MSC_VER # pragma once #endif #include "base.hpp" #include "full_search_scheduler.hpp" #include "foreach.hpp" namespace rl { template struct context_bound_scheduler_thread_info : tree_search_scheduler_thread_info { unsigned sched_count_; unsigned forced_context_switch_count_; void reset(test_params& params) { tree_search_scheduler_thread_info::reset(params); sched_count_ = 0; forced_context_switch_count_ = 0; } }; template class context_bound_scheduler : public tree_search_scheduler , context_bound_scheduler_thread_info, thread_count> { public: typedef tree_search_scheduler , context_bound_scheduler_thread_info, thread_count> base_t; typedef typename base_t::thread_info_t thread_info_t; typedef typename base_t::shared_context_t shared_context_t; context_bound_scheduler(test_params& params, shared_context_t& ctx, thread_id_t dynamic_thread_count) : base_t(params, ctx, dynamic_thread_count) { } thread_id_t iteration_begin_impl() { switches_remain_ = this->params_.context_bound; return base_t::iteration_begin_impl(); } bool can_switch(thread_info_t& t) { t.sched_count_ += 1; return switches_remain_ != 0; } void on_switch(thread_info_t& t) { if (t.state_ == thread_state_running) { RL_VERIFY(switches_remain_); switches_remain_ -= 1; } else { t.forced_context_switch_count_ += 1; } } double iteration_count_approx() { return 1.0; /* iteration_t const P = thread_count; iteration_t const C0 = this->params_.context_bound; iteration_t total = 1;//factorial(P);// * power(P, P * C0); for (iteration_t i = 0; i != P - 1; ++i) total *= power(i + 1, C0 + 1); //if (C0) // total *= power(P - 1, P - 1); if (val(P) > 1) { for (iteration_t i = 0; i != P; ++i) { iteration_t const N = this->threads_[i].sched_count_; iteration_t const C = C0 + this->threads_[i].forced_context_switch_count_; //total *= (iteration_t)pow((double)(threads_[i].sched_count_ + 2) * (thread_count - 1), (int)(params_.context_bound + threads_[i].forced_context_switch_count_)); total *= factorial(N, C) / factorial(C); //C$ += C + 1; //total *= (int)(params_.context_bound + threads_[i].forced_context_switch_count_)); } //total *= factorial(C$); } else { total = 1; } //iteration_t total = (iteration_t)pow((double)sched_count / thread_count + 1, (int)(params_.context_bound * thread_count + forced_context_switch_mean_ + 0.5)); //total *= thread_count; //total *= (iteration_t)pow((double)thread_count - 1, thread_count); for (size_t i = 0; i != this->stree_.size(); ++i) { if (this->stree_[i].type_ != sched_type_sched) { total *= this->stree_[i].count_; } } return (double)total; */ } private: unsigned switches_remain_; template static T factorial(T x, T i) { if (0 == i) return 1; T r = x; for (--i; i; --i) r *= x - i; return r; } template static T factorial(T x) { if (0 == x) return 1; T r = x; for (T i = x - 1; i; --i) r *= i; return r; } template static T power(T x, T y) { if (0 == y) return 1; T r = x; for (T i = y - 1; i; --i) r *= x; return r; } RL_NOCOPY(context_bound_scheduler); }; } #endif ================================================ FILE: tests/relacy/relacy/relacy/defs.hpp ================================================ /* Relacy Race Detector * Copyright (c) 2008-2013, Dmitry S. Vyukov * All rights reserved. * This software is provided AS-IS with no warranty, either express or implied. * This software is distributed under a license and may not be copied, * modified or distributed except as expressly authorized under the * terms of the license contained in the file LICENSE in this distribution. */ #ifndef RL_DEFS_HPP #define RL_DEFS_HPP #ifdef _MSC_VER # pragma once #endif namespace rl { typedef int thread_id_t; typedef size_t timestamp_t; typedef uint64_t iteration_t; size_t const atomic_history_size = 3; iteration_t const progress_probe_period = 4 * 1024; size_t const alignment = 16; class context; class thread_base; struct win_waitable_object; enum sched_type { sched_type_sched, sched_type_atomic_load, sched_type_cas_fail, sched_type_mem_realloc, sched_type_user, }; enum unpark_reason { unpark_reason_normal, unpark_reason_timeout, unpark_reason_spurious, }; struct debug_info { char const* func_; char const* file_; unsigned line_; debug_info(char const* func = "", char const* file = "", unsigned line = 0) : func_(func) , file_(file) , line_(line) { } }; typedef debug_info const& debug_info_param; inline void assert_failed(char const* cond, debug_info_param info) { std::cout << "RELACY INTERNAL ASSERT FAILED: '" << cond << "' at " << info.file_ << ":" << info.line_ << " (" << info.func_ << ")" << std::endl; } template struct raw_allocator : std::allocator { template struct rebind { typedef raw_allocator other; }; template raw_allocator(raw_allocator const&) { } raw_allocator(raw_allocator const& rhs) : std::allocator(rhs) { } raw_allocator() : std::allocator() { } T* allocate(size_t count, void* = 0) { return (T*)(::malloc)(count * sizeof(T)); } void deallocate(T* p, size_t) { (::free)(p); } }; template struct vector { typedef std::vector > type; }; template struct queue { typedef std::queue > > type; }; template struct stack { typedef std::stack > > type; }; template struct set { typedef std::set, raw_allocator > type; }; template struct map { typedef std::map, raw_allocator > > type; }; typedef std::basic_string, raw_allocator > string; typedef std::basic_ostringstream, raw_allocator > ostringstream; typedef std::basic_istringstream, raw_allocator > istringstream; } #endif ================================================ FILE: tests/relacy/relacy/relacy/dyn_thread.hpp ================================================ /* Relacy Race Detector * Copyright (c) 2008-2013, Dmitry S. Vyukov * All rights reserved. * This software is provided AS-IS with no warranty, either express or implied. * This software is distributed under a license and may not be copied, * modified or distributed except as expressly authorized under the * terms of the license contained in the file LICENSE in this distribution. */ #ifndef RL_DYN_THREAD_HPP #define RL_DYN_THREAD_HPP #ifdef _MSC_VER # pragma once #endif #include "base.hpp" #include "context_base.hpp" #include "stdlib/semaphore.hpp" namespace rl { class dyn_thread : nocopy<> { public: dyn_thread() { handle_ = 0; } void start(void*(*fn)(void*), void* arg) { RL_VERIFY(handle_ == 0); handle_ = ctx().create_thread(fn, arg); } void join() { RL_VERIFY(handle_); handle_->wait(false, false, $); handle_ = 0; } private: win_waitable_object* handle_; }; } #endif ================================================ FILE: tests/relacy/relacy/relacy/dyn_thread_ctx.hpp ================================================ /* Relacy Race Detector * Copyright (c) 2008-2013, Dmitry S. Vyukov * All rights reserved. * This software is provided AS-IS with no warranty, either express or implied. * This software is distributed under a license and may not be copied, * modified or distributed except as expressly authorized under the * terms of the license contained in the file LICENSE in this distribution. */ #ifndef RL_DYN_THREAD_CTX_HPP #define RL_DYN_THREAD_CTX_HPP #ifdef _MSC_VER # pragma once #endif #include "base.hpp" #include "waitset.hpp" #include "sync_var.hpp" #include "stdlib/semaphore.hpp" namespace rl { template class thread_sync_object : public win_waitable_object { public: thread_sync_object() { } void iteration_begin() { finished_ = false; sync_.iteration_begin(); RL_VERIFY(!ws_); } void on_create() { sync_.release(ctx().threadx_); } void on_start() { RL_VERIFY(finished_ == false); context& c = ctx(); sync_.acquire(c.threadx_); } void on_finish() { RL_VERIFY(finished_ == false); context& c = ctx(); finished_ = true; sync_.release(c.threadx_); ws_.unpark_all(c, $); } private: bool finished_; waitset ws_; sync_var sync_; virtual void deinit(debug_info_param info) { (void)info; } virtual sema_wakeup_reason wait(bool try_wait, bool is_timed, debug_info_param info) { context& c = ctx(); if (finished_) { sync_.acquire(c.threadx_); return sema_wakeup_reason_success; } else if (try_wait) { sync_.acquire(c.threadx_); return sema_wakeup_reason_failed; } else { unpark_reason reason = ws_.park_current(c, is_timed, false, false, info); sync_.acquire(c.threadx_); if (reason == unpark_reason_normal) return sema_wakeup_reason_success; else if (reason == unpark_reason_timeout) return sema_wakeup_reason_timeout; RL_VERIFY(false); return sema_wakeup_reason_failed; } } virtual bool signal(debug_info_param info) { RL_ASSERT_IMPL(false, test_result_thread_signal, "trying to signal a thread", info); return false; } virtual bool is_signaled(debug_info_param info) { (void)info; return finished_; } virtual void memory_acquire(debug_info_param info) { (void)info; sync_.acquire(ctx().threadx_); } virtual void* prepare_wait(debug_info_param info) { (void)info; return &ws_; } }; } #endif ================================================ FILE: tests/relacy/relacy/relacy/foreach.hpp ================================================ /* Relacy Race Detector * Copyright (c) 2008-2013, Dmitry S. Vyukov * All rights reserved. * This software is provided AS-IS with no warranty, either express or implied. * This software is distributed under a license and may not be copied, * modified or distributed except as expressly authorized under the * terms of the license contained in the file LICENSE in this distribution. */ #ifndef RL_FOREACH_HPP #define RL_FOREACH_HPP #ifdef _MSC_VER # pragma once #endif #include "base.hpp" namespace rl { template struct foreach_thread_impl { template RL_INLINE static void exec( T* v1, F func) { (*func)(v1[i]); foreach_thread_impl::exec(v1, func); } RL_INLINE static void exec( T* v1, T* v2, void (*func)(T& e1, T& e2)) { (*func)(v1[i], v2[i]); foreach_thread_impl::exec(v1, v2, func); } RL_INLINE static void exec( T* v1, T* v2, T* v3, void (*func)(T& e1, T& e2, T& e3)) { (*func)(v1[i], v2[i], v3[i]); foreach_thread_impl::exec(v1, v2, v3, func); } }; template struct foreach_thread_impl { template RL_INLINE static void exec( T*, F) { } RL_INLINE static void exec( T*, T*, void (*)(T&, T&)) { } RL_INLINE static void exec( T*, T*, T*, void (*)(T&, T&, T&)) { } }; template RL_INLINE void foreach( T* v1, F func) { foreach_thread_impl::exec(v1, func); } template RL_INLINE void foreach( T* v1, T* v2, void (*func)(T& e1, T& e2)) { foreach_thread_impl::exec(v1, v2, func); } template RL_INLINE void foreach( T* v1, T* v2, T* v3, void (*func)(T& e1, T& e2, T& e3)) { foreach_thread_impl::exec(v1, v2, v3, func); } RL_INLINE void assign_zero(timestamp_t& elem) { elem = 0; } RL_INLINE void assign_zero_u(unsigned& elem) { elem = 0; } template RL_INLINE void assign(timestamp_t& elem) { elem = value; } RL_INLINE void assign(timestamp_t& elem1, timestamp_t& elem2) { elem1 = elem2; } RL_INLINE void assign_max(timestamp_t& elem1, timestamp_t& elem2) { if (elem2 > elem1) elem1 = elem2; } RL_INLINE void plus_one(timestamp_t& elem) { elem += 1; } } #endif ================================================ FILE: tests/relacy/relacy/relacy/full_search_scheduler.hpp ================================================ /* Relacy Race Detector * Copyright (c) 2008-2013, Dmitry S. Vyukov * All rights reserved. * This software is provided AS-IS with no warranty, either express or implied. * This software is distributed under a license and may not be copied, * modified or distributed except as expressly authorized under the * terms of the license contained in the file LICENSE in this distribution. */ #ifndef RL_FULL_SEARCH_SCHEDULER_HPP #define RL_FULL_SEARCH_SCHEDULER_HPP #ifdef _MSC_VER # pragma once #endif #include "base.hpp" #include "scheduler.hpp" #include "foreach.hpp" namespace rl { template struct tree_search_scheduler_thread_info : scheduler_thread_info { unsigned yield_sched_count_ [thread_count]; unsigned yield_priority_ [thread_count]; unsigned total_yield_priority_; //unsigned subsequent_timed_waits_; void reset(test_params& params) { scheduler_thread_info::reset(params); foreach(yield_sched_count_, &assign_zero_u); foreach(yield_priority_, &assign_zero_u); total_yield_priority_ = 0; //subsequent_timed_waits_ = 0; } }; template class tree_search_scheduler : public scheduler { public: typedef scheduler base_t; typedef typename base_t::thread_info_t thread_info_t; typedef typename base_t::shared_context_t shared_context_t; struct task_t { }; tree_search_scheduler(test_params& params, shared_context_t& ctx, thread_id_t dynamic_thread_count) : base_t(params, ctx, dynamic_thread_count) , stree_depth_() , iteration_count_mean_() , iteration_count_probe_count_() { stree_.reserve(128); } thread_id_t iteration_begin_impl() { stree_depth_ = 0; unsigned const index = rand_impl(this->running_threads_count, sched_type_sched); thread_id_t const th = this->running_threads[index]; return th; } bool iteration_end_impl() { RL_VERIFY(stree_depth_ == stree_.size()); for (size_t i = stree_.size(); i != 0; --i) { stree_node& n = stree_[i - 1]; if (n.index_ != n.count_ - 1) { stree_.resize(i); n.index_ += 1; RL_VERIFY(n.index_ < n.count_); return false; } } return true; } void yield_priority(unsigned yield) { RL_VERIFY(yield); thread_info_t& t = *this->thread_; thread_id_t const& running_thread_count = this->running_threads_count; for (thread_id_t i = 0; i != thread_count; ++i) { thread_info_t& y = this->threads_[i]; RL_VERIFY(0 == y.yield_priority_[t.index_]); if (t.index_ != i && y.yield_sched_count_[t.index_] < yield && y.state_ != thread_state_finished) { y.yield_priority_[t.index_] = yield; y.total_yield_priority_ += yield; this->block_thread(t.index_, false); } y.yield_sched_count_[t.index_] = 0; } if (0 == running_thread_count) purge_blocked_threads(); } thread_id_t schedule_impl(unpark_reason& reason, unsigned yield) { thread_info_t& t = *this->thread_; thread_id_t const& running_thread_count = this->running_threads_count; #ifdef _DEBUG { unsigned tmp = 0; for (thread_id_t i = 0; i != thread_count; ++i) tmp += t.yield_priority_[i]; RL_VERIFY(t.total_yield_priority_ == tmp); } #endif if (t.total_yield_priority_) { for (thread_id_t i = 0; i != thread_count; ++i) { unsigned& prio = t.yield_priority_[i]; if (prio) { prio -= 1; t.total_yield_priority_ -= 1; if (0 == prio) { this->unblock_thread(i); } } t.yield_sched_count_[i] += 1; } } if (yield) yield_priority(yield); reason = unpark_reason_normal; thread_id_t thread_index = 0; if (self().can_switch(t) || t.state_ != thread_state_running) { thread_id_t timed_thread_count = this->timed_thread_count_; if (timed_thread_count) { thread_id_t cnt; if (running_thread_count) cnt = timed_thread_count + 1; else //!!! spurious thread will be never unblocked in such case - bad cnt = timed_thread_count; thread_id_t idx = this->rand(cnt, sched_type_user); if (idx < timed_thread_count) { thread_info_t* thr = this->timed_threads_[idx]; thread_index = thr->index_; //??? suboptimal state space exploration // if (1 != thr->block_count_) then we are making // superfluous rand() if (1 == thr->block_count_) { this->unpark_thread(thread_index); RL_VERIFY(thr->state_ == thread_state_running); reason = unpark_reason_timeout; } } } RL_VERIFY(running_thread_count); if (unpark_reason_normal == reason) { thread_id_t spurious_thread_count = this->spurious_thread_count_; if (spurious_thread_count) { thread_id_t cnt = spurious_thread_count + 1; thread_id_t idx = this->rand(cnt, sched_type_user); if (idx < spurious_thread_count) { thread_info_t* thr = this->spurious_threads_[idx]; thread_index = thr->index_; //??? suboptimal state space exploration // if (1 != thr->block_count_) then we are making // superfluous rand() if (1 == thr->block_count_) { this->unpark_thread(thread_index); RL_VERIFY(thr->state_ == thread_state_running); reason = unpark_reason_spurious; } } } } if (unpark_reason_normal == reason) { if (1 != running_thread_count) { unsigned const index = this->rand(running_thread_count, sched_type_sched); thread_index = this->running_threads[index]; } else { thread_index = this->running_threads[0]; } } } else { RL_VERIFY(t.state_ == thread_state_running); thread_index = t.index_; } if (t.index_ == thread_index) return thread_index; //t.subsequent_timed_waits_ = 0; self().on_switch(t); return thread_index; } void thread_finished_impl() { } void purge_blocked_threads() { for (thread_id_t i = 0; i != thread_count; ++i) { on_thread_block(i, false); } } unsigned rand_impl(unsigned limit, sched_type t) { unsigned result = 0; size_t const size = stree_.size(); if (stree_depth_ == size) { stree_node n = {limit, 0, t}; stree_.push_back(n); } else { RL_VERIFY(size); stree_node& n = stree_[stree_depth_]; // If you hit assert here, then probably your test is non-deterministic // Check whether you are using functions like ::rand() // or static variables or values of object addresses (for hashing) in your test // Replace ::rand() with rl::rand(), eliminate static variables in the test RL_VERIFY(n.type_ == t); RL_VERIFY(n.count_ == limit); RL_VERIFY(n.index_ < n.count_); result = n.index_; } stree_depth_ += 1; return result; } iteration_t iteration_count_impl() { double current = self().iteration_count_approx(); if (current <= this->iter_) current = this->iter_ + 1.0; iteration_count_mean_ *= iteration_count_probe_count_; iteration_count_probe_count_ += 1; iteration_count_mean_ /= iteration_count_probe_count_; iteration_count_mean_ += current / iteration_count_probe_count_; iteration_t result = (iteration_t)(iteration_count_mean_ + 0.5); if (result <= this->iter_) result = this->iter_ + 1; return result; } void get_state_impl(std::ostream& ss) { ss << (unsigned)stree_.size() << " "; for (size_t i = 0; i != stree_.size(); ++i) { stree_node& n = stree_[i]; ss << n.count_ << " "; ss << n.index_ << " "; ss << static_cast(n.type_) << " "; } } void set_state_impl(std::istream& ss) { size_t size = 0; ss >> size; for (size_t i = 0; i != size; ++i) { stree_node n = {}; ss >> n.count_; ss >> n.index_; unsigned type = 0; ss >> type; n.type_ = static_cast(type); stree_.push_back(n); } } void on_thread_block(thread_id_t th, bool yield) { //!!! doubled in schedule_impl() thread_info_t& t = this->threads_[th]; if (t.total_yield_priority_) { for (thread_id_t i = 0; i != thread_count; ++i) { if (t.yield_priority_[i]) { t.total_yield_priority_ -= t.yield_priority_[i]; t.yield_priority_[i] = 0; this->unblock_thread(i); } } } (void)yield; //if (yield) // yield_priority(1); } protected: struct stree_node { unsigned count_; unsigned index_; sched_type type_; unsigned pad_; }; typedef typename vector::type stree_t; stree_t stree_; size_t stree_depth_; private: double iteration_count_mean_; unsigned iteration_count_probe_count_; derived_t& self() { return *static_cast(this); } RL_NOCOPY(tree_search_scheduler); }; template class full_search_scheduler : public tree_search_scheduler , tree_search_scheduler_thread_info, thread_count> { public: typedef tree_search_scheduler , tree_search_scheduler_thread_info, thread_count> base_t; typedef typename base_t::thread_info_t thread_info_t; typedef typename base_t::shared_context_t shared_context_t; full_search_scheduler(test_params& params, shared_context_t& ctx, thread_id_t dynamic_thread_count) : base_t(params, ctx, dynamic_thread_count) { } bool can_switch(thread_info_t& /*t*/) { return true; } void on_switch(thread_info_t& /*t*/) { } double iteration_count_approx() { double total = 1; size_t const size = this->stree_.size(); for (size_t i = 0; i != size; ++i) { total *= this->stree_[i].count_; } return total; } RL_NOCOPY(full_search_scheduler); }; } #endif ================================================ FILE: tests/relacy/relacy/relacy/history.hpp ================================================ /* Relacy Race Detector * Copyright (c) 2008-2013, Dmitry S. Vyukov * All rights reserved. * This software is provided AS-IS with no warranty, either express or implied. * This software is distributed under a license and may not be copied, * modified or distributed except as expressly authorized under the * terms of the license contained in the file LICENSE in this distribution. */ #ifndef RL_HISTORY_HPP #define RL_HISTORY_HPP #ifdef _MSC_VER # pragma once #endif #include "base.hpp" namespace rl { typedef void (*event_output_f)(std::ostream& s, void const* ev); typedef void (*event_dtor_f)(void* ev); struct history_entry { thread_id_t thread_index_; debug_info info_; void* ev_; event_output_f output_; event_dtor_f dtor_; history_entry(thread_id_t thread_index, debug_info_param info, void* ev, event_output_f output, event_dtor_f dtor) : thread_index_(thread_index) , info_(info) , ev_(ev) , output_(output) , dtor_(dtor) { } }; template void event_output(std::ostream& s, void const* ev) { static_cast(ev)->output(s); } template void event_dtor(void* ev) { delete static_cast(ev); } struct user_event { char const* desc_; void output(std::ostream& s) const { s << desc_; } }; inline string strip_path(char const* filename) { char const* slash = strrchr(filename, '\\'); if (slash) return slash + 1; else return filename; } inline std::ostream& operator << (std::ostream& ss, debug_info_param info) { /* char const* func = info; char const* file = info + strlen(info) + 1; char const* line = file + strlen(file) + 1; */ #ifdef RL_MSVC_OUTPUT ss << info.file_ << "(" << info.line_ << ") : "; #else ss << info.func_ << ", " << strip_path(info.file_) << "(" << info.line_ << ")"; #endif return ss; } class history_mgr : nocopy<> { public: history_mgr(std::ostream& stream, thread_id_t thread_count) : thread_count_(thread_count) , out_stream_(stream) { } ~history_mgr() { clear(); } template void exec_log(thread_id_t th, debug_info_param info, event_t const& ev, bool output_history) { exec_history_.push_back(history_entry(th, info, new event_t(ev), &event_output, &event_dtor)); if (output_history) { output(exec_history_.size() - 1); } } void print_exec_history(bool output_history) { size_t const buf_size = 4096; char buf [buf_size + 1]; size_t const count = exec_history_.size(); if (false == output_history) { sprintf(buf, "execution history (%u):\n", (unsigned)count); out_stream_ << buf; #if defined(_MSC_VER) && defined(RL_MSVC_OUTPUT) OutputDebugStringA(buf); #endif for (size_t i = 0; i != count; ++i) { output(i); } } out_stream_ << "\n"; #if defined(_MSC_VER) && defined(RL_MSVC_OUTPUT) OutputDebugStringA("\n"); #endif for (thread_id_t th = 0; th != thread_count_; ++th) { sprintf(buf, "thread %u:\n", th); out_stream_ << buf; #if defined(_MSC_VER) && defined(RL_MSVC_OUTPUT) OutputDebugStringA(buf); #endif for (size_t i = 0; i != count; ++i) { if (exec_history_[i].thread_index_ == th) { output(i); } } out_stream_ << "\n"; #if defined(_MSC_VER) && defined(RL_MSVC_OUTPUT) OutputDebugStringA("\n"); #endif } } void clear() { for (size_t i = 0; i != exec_history_.size(); ++i) { history_entry const& ent = exec_history_[i]; ent.dtor_(ent.ev_); } exec_history_.clear(); } private: vector::type exec_history_; thread_id_t thread_count_; std::ostream& out_stream_; void output(size_t i) { std::basic_ostringstream, raw_allocator > stream; history_entry const& ent = exec_history_[i]; #ifdef RL_MSVC_OUTPUT { stream << ent.info_ << "[" << i << "] " << ent.thread_index_ << ": "; ent.output_(stream, ent.ev_); stream << std::endl; } #else stream << "[" << (unsigned)i << "] " << ent.thread_index_ << ": "; ent.output_(stream, ent.ev_); stream << ", in " << ent.info_ << std::endl; #endif out_stream_ << stream.str(); #if defined(_MSC_VER) && defined(RL_MSVC_OUTPUT) OutputDebugStringA(stream.str().c_str()); #endif } }; } #endif ================================================ FILE: tests/relacy/relacy/relacy/java.hpp ================================================ /* Relacy Race Detector * Copyright (c) 2008-2013, Dmitry S. Vyukov * All rights reserved. * This software is provided AS-IS with no warranty, either express or implied. * This software is distributed under a license and may not be copied, * modified or distributed except as expressly authorized under the * terms of the license contained in the file LICENSE in this distribution. */ #ifndef RL_JAVA_HPP #define RL_JAVA_HPP #ifdef _MSC_VER # pragma once #endif #include "base.hpp" namespace rl { /* Hierarchy For Package java.util.concurrent.locks Class Hierarchy * java.lang.Object o java.util.concurrent.locks.AbstractQueuedSynchronizer (implements java.io.Serializable) o java.util.concurrent.locks.AbstractQueuedSynchronizer.ConditionObject (implements java.util.concurrent.locks.Condition, java.io.Serializable) o java.util.concurrent.locks.LockSupport o java.util.concurrent.locks.ReentrantLock (implements java.util.concurrent.locks.Lock, java.io.Serializable) o java.util.concurrent.locks.ReentrantReadWriteLock (implements java.util.concurrent.locks.ReadWriteLock, java.io.Serializable) o java.util.concurrent.locks.ReentrantReadWriteLock.ReadLock (implements java.util.concurrent.locks.Lock, java.io.Serializable) o java.util.concurrent.locks.ReentrantReadWriteLock.WriteLock (implements java.util.concurrent.locks.Lock, java.io.Serializable) Interface Hierarchy * java.util.concurrent.locks.Condition * java.util.concurrent.locks.Lock * java.util.concurrent.locks.ReadWriteLock */ /* java.util.concurrent.Semaphore Public Constructors public Semaphore(int permits) Creates a Semaphore with the given number of permits and nonfair fairness setting. Parameters permits the initial number of permits available. This value may be negative, in which case releases must occur before any acquires will be granted. public Semaphore(int permits, boolean fair) Creates a Semaphore with the given number of permits and the given fairness setting. Parameters permits the initial number of permits available. This value may be negative, in which case releases must occur before any acquires will be granted. fair true if this semaphore will guarantee first-in first-out granting of permits under contention, else false. Public Methods public void acquire() Acquires a permit from this semaphore, blocking until one is available, or the thread is interrupted. Acquires a permit, if one is available and returns immediately, reducing the number of available permits by one. If no permit is available then the current thread becomes disabled for thread scheduling purposes and lies dormant until one of two things happens: * Some other thread invokes the release() method for this semaphore and the current thread is next to be assigned a permit; or * Some other thread interrupts the current thread. If the current thread: * has its interrupted status set on entry to this method; or * is interrupted while waiting for a permit, then InterruptedException is thrown and the current thread's interrupted status is cleared. Throws InterruptedException if the current thread is interrupted See Also * interrupt() public void acquire(int permits) Acquires the given number of permits from this semaphore, blocking until all are available, or the thread is interrupted. Acquires the given number of permits, if they are available, and returns immediately, reducing the number of available permits by the given amount. If insufficient permits are available then the current thread becomes disabled for thread scheduling purposes and lies dormant until one of two things happens: * Some other thread invokes one of the release methods for this semaphore, the current thread is next to be assigned permits and the number of available permits satisfies this request; or * Some other thread interrupts the current thread. If the current thread: * has its interrupted status set on entry to this method; or * is interrupted while waiting for a permit, then InterruptedException is thrown and the current thread's interrupted status is cleared. Any permits that were to be assigned to this thread are instead assigned to the next waiting thread(s), as if they had been made available by a call to release(). Parameters permits the number of permits to acquire Throws InterruptedException if the current thread is interrupted IllegalArgumentException if permits less than zero. See Also * interrupt() public void acquireUninterruptibly(int permits) Acquires the given number of permits from this semaphore, blocking until all are available. Acquires the given number of permits, if they are available, and returns immediately, reducing the number of available permits by the given amount. If insufficient permits are available then the current thread becomes disabled for thread scheduling purposes and lies dormant until some other thread invokes one of the release methods for this semaphore, the current thread is next to be assigned permits and the number of available permits satisfies this request. If the current thread is interrupted while waiting for permits then it will continue to wait and its position in the queue is not affected. When the thread does return from this method its interrupt status will be set. Parameters permits the number of permits to acquire Throws IllegalArgumentException if permits less than zero. public void acquireUninterruptibly() Acquires a permit from this semaphore, blocking until one is available. Acquires a permit, if one is available and returns immediately, reducing the number of available permits by one. If no permit is available then the current thread becomes disabled for thread scheduling purposes and lies dormant until some other thread invokes the release() method for this semaphore and the current thread is next to be assigned a permit. If the current thread is interrupted while waiting for a permit then it will continue to wait, but the time at which the thread is assigned a permit may change compared to the time it would have received the permit had no interruption occurred. When the thread does return from this method its interrupt status will be set. public int availablePermits() Returns the current number of permits available in this semaphore. This method is typically used for debugging and testing purposes. Returns * the number of permits available in this semaphore. public int drainPermits() Acquire and return all permits that are immediately available. Returns * the number of permits public final int getQueueLength() Returns an estimate of the number of threads waiting to acquire. The value is only an estimate because the number of threads may change dynamically while this method traverses internal data structures. This method is designed for use in monitoring of the system state, not for synchronization control. Returns * the estimated number of threads waiting for this lock public final boolean hasQueuedThreads() Queries whether any threads are waiting to acquire. Note that because cancellations may occur at any time, a true return does not guarantee that any other thread will ever acquire. This method is designed primarily for use in monitoring of the system state. Returns * true if there may be other threads waiting to acquire the lock. public boolean isFair() Returns true if this semaphore has fairness set true. Returns * true if this semaphore has fairness set true. public void release(int permits) Releases the given number of permits, returning them to the semaphore. Releases the given number of permits, increasing the number of available permits by that amount. If any threads are blocking trying to acquire permits, then the one that has been waiting the longest is selected and given the permits that were just released. If the number of available permits satisfies that thread's request then that thread is re-enabled for thread scheduling purposes; otherwise the thread continues to wait. If there are still permits available after the first thread's request has been satisfied, then those permits are assigned to the next waiting thread. If it is satisfied then it is re-enabled for thread scheduling purposes. This continues until there are insufficient permits to satisfy the next waiting thread, or there are no more waiting threads. There is no requirement that a thread that releases a permit must have acquired that permit by calling acquire. Correct usage of a semaphore is established by programming convention in the application. Parameters permits the number of permits to release Throws IllegalArgumentException if permits less than zero. public void release() Releases a permit, returning it to the semaphore. Releases a permit, increasing the number of available permits by one. If any threads are blocking trying to acquire a permit, then one is selected and given the permit that was just released. That thread is re-enabled for thread scheduling purposes. There is no requirement that a thread that releases a permit must have acquired that permit by calling acquire(). Correct usage of a semaphore is established by programming convention in the application. public String toString() Returns a string identifying this semaphore, as well as its state. The state, in brackets, includes the String "Permits =" followed by the number of permits. Returns * a string identifying this semaphore, as well as its state public boolean tryAcquire(long timeout, TimeUnit unit) Acquires a permit from this semaphore, if one becomes available within the given waiting time and the current thread has not been interrupted. Acquires a permit, if one is available and returns immediately, with the value true, reducing the number of available permits by one. If no permit is available then the current thread becomes disabled for thread scheduling purposes and lies dormant until one of three things happens: * Some other thread invokes the release() method for this semaphore and the current thread is next to be assigned a permit; or * Some other thread interrupts the current thread; or * The specified waiting time elapses. If a permit is acquired then the value true is returned. If the current thread: * has its interrupted status set on entry to this method; or * is interrupted while waiting to acquire a permit, then InterruptedException is thrown and the current thread's interrupted status is cleared. If the specified waiting time elapses then the value false is returned. If the time is less than or equal to zero, the method will not wait at all. Parameters timeout the maximum time to wait for a permit unit the time unit of the timeout argument. Returns * true if a permit was acquired and false if the waiting time elapsed before a permit was acquired. Throws InterruptedException if the current thread is interrupted See Also * interrupt() public boolean tryAcquire(int permits, long timeout, TimeUnit unit) Acquires the given number of permits from this semaphore, if all become available within the given waiting time and the current thread has not been interrupted. Acquires the given number of permits, if they are available and returns immediately, with the value true, reducing the number of available permits by the given amount. If insufficient permits are available then the current thread becomes disabled for thread scheduling purposes and lies dormant until one of three things happens: * Some other thread invokes one of the release methods for this semaphore, the current thread is next to be assigned permits and the number of available permits satisfies this request; or * Some other thread interrupts the current thread; or * The specified waiting time elapses. If the permits are acquired then the value true is returned. If the current thread: * has its interrupted status set on entry to this method; or * is interrupted while waiting to acquire the permits, then InterruptedException is thrown and the current thread's interrupted status is cleared. Any permits that were to be assigned to this thread, are instead assigned to the next waiting thread(s), as if they had been made available by a call to release(). If the specified waiting time elapses then the value false is returned. If the time is less than or equal to zero, the method will not wait at all. Any permits that were to be assigned to this thread, are instead assigned to the next waiting thread(s), as if they had been made available by a call to release(). Parameters permits the number of permits to acquire timeout the maximum time to wait for the permits unit the time unit of the timeout argument. Returns * true if all permits were acquired and false if the waiting time elapsed before all permits were acquired. Throws InterruptedException if the current thread is interrupted IllegalArgumentException if permits less than zero. See Also * interrupt() public boolean tryAcquire(int permits) Acquires the given number of permits from this semaphore, only if all are available at the time of invocation. Acquires the given number of permits, if they are available, and returns immediately, with the value true, reducing the number of available permits by the given amount. If insufficient permits are available then this method will return immediately with the value false and the number of available permits is unchanged. Even when this semaphore has been set to use a fair ordering policy, a call to tryAcquire will immediately acquire a permit if one is available, whether or not other threads are currently waiting. This "barging" behavior can be useful in certain circumstances, even though it breaks fairness. If you want to honor the fairness setting, then use tryAcquire(permits, 0, TimeUnit.SECONDS) which is almost equivalent (it also detects interruption). Parameters permits the number of permits to acquire Returns * true if the permits were acquired and false otherwise. Throws IllegalArgumentException if permits less than zero. public boolean tryAcquire() Acquires a permit from this semaphore, only if one is available at the time of invocation. Acquires a permit, if one is available and returns immediately, with the value true, reducing the number of available permits by one. If no permit is available then this method will return immediately with the value false. Even when this semaphore has been set to use a fair ordering policy, a call to tryAcquire() will immediately acquire a permit if one is available, whether or not other threads are currently waiting. This "barging" behavior can be useful in certain circumstances, even though it breaks fairness. If you want to honor the fairness setting, then use tryAcquire(0, TimeUnit.SECONDS) which is almost equivalent (it also detects interruption). Returns * true if a permit was acquired and false otherwise. Protected Methods protected Collection getQueuedThreads() Returns a collection containing threads that may be waiting to acquire. Because the actual set of threads may change dynamically while constructing this result, the returned collection is only a best-effort estimate. The elements of the returned collection are in no particular order. This method is designed to facilitate construction of subclasses that provide more extensive monitoring facilities. Returns * the collection of threads protected void reducePermits(int reduction) Shrinks the number of available permits by the indicated reduction. This method can be useful in subclasses that use semaphores to track resources that become unavailable. This method differs from acquire in that it does not block waiting for permits to become available. Parameters reduction the number of permits to remove Throws IllegalArgumentException if reduction is negative */ } #endif ================================================ FILE: tests/relacy/relacy/relacy/java_atomic.hpp ================================================ /* Relacy Race Detector * Copyright (c) 2008-2013, Dmitry S. Vyukov * All rights reserved. * This software is provided AS-IS with no warranty, either express or implied. * This software is distributed under a license and may not be copied, * modified or distributed except as expressly authorized under the * terms of the license contained in the file LICENSE in this distribution. */ #ifndef RL_JAVA_ATOMIC_HPP #define RL_JAVA_ATOMIC_HPP #ifdef _MSC_VER # pragma once #endif #include "base.hpp" #include "atomic.hpp" namespace rl { template class jatomic; template class jatomic_proxy { public: T get() const { return var_.load(mo_seq_cst, info_); } void set(T value) { var_.store(value, mo_seq_cst, info_); } T addAndGet(T delta) { return getAndAdd(delta) + delta; } bool compareAndSet(T expect, T update) { bool result = var_.compare_exchange(bool_t(), expect, update, mo_seq_cst, info_); return result; } bool weakCompareAndSet(T expect, T update) { bool result = var_.compare_exchange(bool_t(), expect, update, mo_seq_cst, info_); return result; } T decrementAndGet() { return getAndAdd(-1) - 1; } T getAndAdd(T delta) { T result = var_.rmw(rmw_type_t(), delta, mo_seq_cst, info_); return result; } T getAndDecrement() { return getAndAdd(-1); } T getAndIncrement() { return getAndAdd(+1); } T getAndSet(T newValue) { T result = var_.rmw(rmw_type_t(), newValue, mo_seq_cst, info_); return result; } T incrementAndGet() { return getAndAdd(1) + 1; } private: jatomic& var_; debug_info info_; //typedef typename atomic_add_type::type add_type; template friend class jatomic; jatomic_proxy(jatomic& var, debug_info_param info) : var_(var) , info_(info) { } jatomic_proxy& operator = (jatomic_proxy const&); }; template class jatomic : generic_atomic { public: typedef jatomic_proxy proxy_t; friend class jatomic_proxy; jatomic() { } jatomic(T value) { //??? whether here must be mo_relaxed or mo_release? this->store(value, mo_seq_cst, $); } jatomic(jatomic const& r) { T const value = r.load(mo_seq_cst, $); //??? whether here must be mo_relaxed or mo_release? this->store(value, mo_seq_cst, $); } jatomic(proxy_t const& r) { T const value = r.var_.load(mo_seq_cst, r.info_); //??? whether here must be mo_relaxed or mo_release? this->store(value, mo_seq_cst, r.info_); } proxy_t operator () (debug_info_param info) { return proxy_t(*this, info); } }; typedef jatomic AtomicInteger; typedef jatomic AtomicLong; } #endif ================================================ FILE: tests/relacy/relacy/relacy/java_var.hpp ================================================ /* Relacy Race Detector * Copyright (c) 2008-2013, Dmitry S. Vyukov * All rights reserved. * This software is provided AS-IS with no warranty, either express or implied. * This software is distributed under a license and may not be copied, * modified or distributed except as expressly authorized under the * terms of the license contained in the file LICENSE in this distribution. */ #ifndef RL_JAVA_VAR_HPP #define RL_JAVA_VAR_HPP #ifdef _MSC_VER # pragma once #endif #include "base.hpp" #include "atomic.hpp" namespace rl { template class jvar; template class jvar_proxy { public: typedef typename atomic_add_type::type add_type; template friend class jvar; operator T () const { return load(); } T operator = (T value) { store(value); return value; } T operator = (jvar_proxy const& r) { T const value = r.load(); store(value); return *this; } T operator ++ (int) { T tmp = load(); store(tmp + 1); return tmp; } T operator -- (int) { T tmp = load(); store(tmp - 1); return tmp; } T operator ++ () { T tmp = load(); store(tmp + 1); return tmp + 1; } T operator -- () { T tmp = load(); store(tmp - 1); return tmp - 1; } T operator += (add_type value) { T tmp = load(); store(tmp + value); return tmp + value; } T operator -= (add_type value) { T tmp = load(); store(tmp - value); return tmp - value; } private: jvar& var_; debug_info info_; jvar_proxy(jvar& var, debug_info_param info) : var_(var) , info_(info) { } T load() const { return var_.load(mo_relaxed, info_); } void store(T value) { var_.store(value, mo_relaxed, info_); } }; template class jvar : generic_atomic { public: typedef jvar_proxy proxy_t; friend class jvar_proxy; jvar() { } jvar(T value) { this->store(value, mo_relaxed, $); } jvar(jvar const& r) { T const value = r.load(mo_relaxed, $); this->store(value, mo_relaxed, $); } jvar(proxy_t const& r) { T const value = r.load(); this->store(value, mo_relaxed, r.info_); } proxy_t operator () (debug_info_param info) { return proxy_t(*this, info); } private: jvar& operator = (jvar const&); }; } #endif ================================================ FILE: tests/relacy/relacy/relacy/java_volatile.hpp ================================================ /* Relacy Race Detector * Copyright (c) 2008-2013, Dmitry S. Vyukov * All rights reserved. * This software is provided AS-IS with no warranty, either express or implied. * This software is distributed under a license and may not be copied, * modified or distributed except as expressly authorized under the * terms of the license contained in the file LICENSE in this distribution. */ #ifndef RL_JAVA_VOLATILE_HPP #define RL_JAVA_VOLATILE_HPP #ifdef _MSC_VER # pragma once #endif #include "base.hpp" #include "atomic.hpp" namespace rl { template class jvolatile; template class jvolatile_proxy { public: typedef typename atomic_add_type::type add_type; template friend class jvolatile; operator T () const { return load(); } T operator = (T value) { store(value); return value; } T operator = (jvolatile_proxy const& r) { T const value = r.load(); store(value); return *this; } T operator ++ (int) { T tmp = load(); store(tmp + 1); return tmp; } T operator -- (int) { T tmp = load(); store(tmp - 1); return tmp; } T operator ++ () { T tmp = load(); store(tmp + 1); return tmp + 1; } T operator -- () { T tmp = load(); store(tmp - 1); return tmp - 1; } T operator += (add_type value) { T tmp = load(); store(tmp + value); return tmp + value; } T operator -= (add_type value) { T tmp = load(); store(tmp - value); return tmp - value; } private: jvolatile& var_; debug_info info_; jvolatile_proxy(jvolatile& var, debug_info_param info) : var_(var) , info_(info) { } T load() const { return var_.load(mo_seq_cst, info_); } void store(T value) { var_.store(value, mo_seq_cst, info_); } }; template class jvolatile : generic_atomic { public: typedef jvolatile_proxy proxy_t; friend class jvolatile_proxy; jvolatile() { } explicit jvolatile(T value) { //??? whether here must be mo_relaxed or mo_release? this->store(value, mo_seq_cst, $); } jvolatile(jvolatile const& r) { T const value = r.load(mo_seq_cst, $); //??? whether here must be mo_relaxed or mo_release? this->store(value, mo_seq_cst, $); } jvolatile(proxy_t const& r) { T const value = r.var_.load(mo_seq_cst, r.info_); //??? whether here must be mo_relaxed or mo_release? this->store(value, mo_seq_cst, r.info_); } proxy_t operator () (debug_info_param info) { return proxy_t(*this, info); } }; } #endif ================================================ FILE: tests/relacy/relacy/relacy/memory.hpp ================================================ /* Relacy Race Detector * Copyright (c) 2008-2013, Dmitry S. Vyukov * All rights reserved. * This software is provided AS-IS with no warranty, either express or implied. * This software is distributed under a license and may not be copied, * modified or distributed except as expressly authorized under the * terms of the license contained in the file LICENSE in this distribution. */ #ifndef RL_MEMORY_HPP #define RL_MEMORY_HPP #ifdef _MSC_VER # pragma once #endif #include "base.hpp" namespace rl { class memory_mgr : nocopy<> { public: memory_mgr() { memset(deferred_free_, 0, sizeof(deferred_free_)); memset(deferred_free_size_, 0, sizeof(deferred_free_size_)); deferred_index_ = 0; } ~memory_mgr() { /* while (allocs_.size()) { size_t* p = (size_t*)(allocs_.begin()->first); free(p - 1, false); allocs_.erase(allocs_.begin()); } */ } #ifndef RL_GC void* alloc(size_t size) #else void* alloc(size_t size, void (*dtor)(void*)) #endif { void* pp = 0; for (size_t i = 0; i != alloc_cache_.size(); ++i) { if (alloc_cache_[i].first == size) { if (alloc_cache_[i].second.size()) { pp = alloc_cache_[i].second.top(); alloc_cache_[i].second.pop(); } break; } } if (0 == pp) pp = (::malloc)(size + alignment); if (pp) { RL_VERIFY(alignment >= sizeof(void*)); *(size_t*)pp = size; void* p = (char*)pp + alignment; #ifndef RL_GC allocs_.insert(std::make_pair(p, size)); #else alloc_desc_t desc = {p, size, dtor}; gc_allocs_.push_back(desc); #endif return p; } else { throw std::bad_alloc(); } } bool free(void* pp, bool defer) { if (0 == pp) return true; #ifndef RL_GC map::type::iterator iter = allocs_.find(pp); if (allocs_.end() == iter) return false; allocs_.erase(iter); void* p = (char*)pp - alignment; size_t size = *(size_t*)p; if (defer) { deferred_free_[deferred_index_ % deferred_count] = p; deferred_free_size_[deferred_index_ % deferred_count] = size; deferred_index_ += 1; p = deferred_free_[deferred_index_ % deferred_count]; size = deferred_free_size_[deferred_index_ % deferred_count]; if (p) rl_free_impl(p, size); } else { rl_free_impl(p, size); } return true; #else (void)defer; for (size_t i = 0; i != gc_allocs_.size(); ++i) { alloc_desc_t const& desc = gc_allocs_[i]; if (desc.addr == pp) { void* p = (char*)desc.addr - alignment; rl_free_impl(p, desc.size); gc_allocs_.erase(gc_allocs_.begin() + i); return true; } } return false; #endif } bool iteration_end() { #ifndef RL_GC return allocs_.empty(); #else for (size_t i = 0; i != gc_allocs_.size(); ++i) { alloc_desc_t const& desc = gc_allocs_[i]; if (desc.dtor) desc.dtor(desc.addr); void* p = (char*)desc.addr - alignment; rl_free_impl(p, desc.size); } gc_allocs_.clear(); return true; #endif } #ifndef RL_GC void output_allocs(std::ostream& stream) { stream << "memory allocations:" << std::endl; map::type::iterator iter = allocs_.begin(); map::type::iterator end = allocs_.end(); for (; iter != end; ++iter) { stream << iter->first << " [" << (unsigned)iter->second << "]" << std::endl; } stream << std::endl; } #endif private: typedef stack::type freelist_t; typedef std::pair alloc_entry_t; typedef vector::type alloc_t; static size_t const deferred_count = 64; alloc_t alloc_cache_; size_t deferred_index_; void* deferred_free_ [deferred_count]; size_t deferred_free_size_ [deferred_count]; #ifndef RL_GC map::type allocs_; #else struct alloc_desc_t { void* addr; size_t size; void (*dtor)(void*); }; vector::type gc_allocs_; #endif void rl_free_impl(void* p, size_t size) { bool found = false; for (size_t i = 0; i != alloc_cache_.size(); ++i) { if (alloc_cache_[i].first == size) { found = true; alloc_cache_[i].second.push(p); break; } } if (!found) { alloc_cache_.push_back(std::make_pair(size, freelist_t())); alloc_cache_.back().second.push(p); } } }; struct memory_alloc_event { void* addr_; size_t size_; bool is_array_; void output(std::ostream& s) const { s << "memory allocation: addr=" << std::hex << (void*)((char*)addr_ + (is_array_ ? alignment : 0)) << std::dec << ", size=" << (unsigned)size_; } }; struct memory_free_event { void* addr_; bool is_array_; void output(std::ostream& s) const { s << "memory deallocation: addr=" << std::hex << (void*)((char*)addr_ + (is_array_ ? alignment : 0)) << std::dec; } }; } #endif ================================================ FILE: tests/relacy/relacy/relacy/memory_order.hpp ================================================ /* Relacy Race Detector * Copyright (c) 2008-2013, Dmitry S. Vyukov * All rights reserved. * This software is provided AS-IS with no warranty, either express or implied. * This software is distributed under a license and may not be copied, * modified or distributed except as expressly authorized under the * terms of the license contained in the file LICENSE in this distribution. */ #ifndef RL_MEMORY_ORDER_HPP #define RL_MEMORY_ORDER_HPP #ifdef _MSC_VER # pragma once #endif #include "base.hpp" namespace rl { enum memory_order { mo_relaxed, mo_consume, mo_acquire, mo_release, mo_acq_rel, mo_seq_cst, }; inline char const* format(memory_order mo) { switch (mo) { case mo_relaxed: return "relaxed"; case mo_consume: return "consume"; case mo_acquire: return "acquire"; case mo_release: return "release"; case mo_acq_rel: return "acq_rel"; case mo_seq_cst: return "seq_cst"; } RL_VERIFY(!"invalid value of memory order"); throw std::logic_error("invalid value of memory order"); } } #endif ================================================ FILE: tests/relacy/relacy/relacy/pch.hpp ================================================ /* Relacy Race Detector * Copyright (c) 2008-2013, Dmitry S. Vyukov * All rights reserved. * This software is provided AS-IS with no warranty, either express or implied. * This software is distributed under a license and may not be copied, * modified or distributed except as expressly authorized under the * terms of the license contained in the file LICENSE in this distribution. */ #ifndef RL_PCH_HPP #define RL_PCH_HPP #ifdef _MSC_VER # pragma once #endif #ifndef _CRT_SECURE_NO_WARNINGS # define _CRT_SECURE_NO_WARNINGS 1 #endif #ifdef _FORTIFY_SOURCE # undef _FORTIFY_SOURCE #endif #ifndef _XOPEN_SOURCE # define _XOPEN_SOURCE #endif #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #if defined(WIN32) || defined(_WIN32) || defined(WIN64) || defined(_WIN64) # define RL_WIN #endif #if defined(RL_WIN) || defined(_CYGWIN) # ifndef _WIN32_WINNT # define _WIN32_WINNT 0x0500 # endif # define WIN32_LEAN_AND_MEAN # include # include # ifdef RL_WIN # include # else # include # include # endif #else # include # include # include # include # include #endif #endif ================================================ FILE: tests/relacy/relacy/relacy/platform.hpp ================================================ /* Relacy Race Detector * Copyright (c) 2008-2013, Dmitry S. Vyukov * All rights reserved. * This software is provided AS-IS with no warranty, either express or implied. * This software is distributed under a license and may not be copied, * modified or distributed except as expressly authorized under the * terms of the license contained in the file LICENSE in this distribution. */ #ifndef RL_PLATFORM_HPP #define RL_PLATFORM_HPP #ifdef _MSC_VER # pragma once #endif #include "pch.hpp" #if defined(RL_WIN) || defined(_CYGWIN) typedef void* fiber_t; inline unsigned get_tick_count() { return GetTickCount(); } inline void set_low_thread_prio() { SetThreadPriority(GetCurrentThread(), THREAD_PRIORITY_BELOW_NORMAL); } inline void create_main_fiber(fiber_t& fib) { fib = ConvertThreadToFiber(0); if (0 == fib) { unsigned long err = ::GetLastError(); (void)err; throw std::logic_error("you must start simulation inside a thread (not a fiber)"); } } inline void delete_main_fiber(fiber_t& fib) { (void)fib; HMODULE lib = LoadLibraryW(L"kernel32.dll"); if (lib) { void* proc = (void*)GetProcAddress(lib, "ConvertFiberToThread"); if (proc) { typedef BOOL (WINAPI * ConvertFiberToThreadT)(); ConvertFiberToThreadT ConvertFiberToThread = (ConvertFiberToThreadT)proc; ConvertFiberToThread(); } FreeLibrary(lib); } } inline void create_fiber(fiber_t& fib, void(*fiber_proc)(void*), void* ctx) { size_t const stack_size = 64*1024; fib = CreateFiberEx(4*1024, stack_size, 0, (LPFIBER_START_ROUTINE)fiber_proc, ctx); if (fib == 0) throw std::runtime_error("error creating fiber"); } inline void delete_fiber(fiber_t& fib) { DeleteFiber(fib); } inline void switch_to_fiber(fiber_t fib, fiber_t) { SwitchToFiber(fib); } // work-around for some versions of cygwin extern "C" inline int __gxx_personality_v0() { return 0; } #ifdef RL_WIN #else /* inline unsigned get_tick_count() { return GetTickCount(); } typedef void* fiber_t; struct ucontext_t { struct stack_t { void* ss_sp; size_t ss_size; }; stack_t uc_stack; void* uc_link; }; void getcontext(void*) {} void makecontext(void*, void(*)(), int, void*) {} void swapcontext(void*, void*) {} */ #endif #else inline unsigned get_tick_count() { struct tms tms; return ((unsigned)(times (&tms) * (1000 / sysconf(_SC_CLK_TCK)))); } inline void set_low_thread_prio() { } #if 0 typedef ucontext_t fiber_t; inline void create_main_fiber(fiber_t& fib) { ucontext_t f = {}; fib = f; } inline void delete_main_fiber(fiber_t& fib) { (void)fib; } inline void create_fiber(fiber_t& fib, void(*fiber_proc)(void*), void* ctx) { size_t const stack_size = 64*1024; getcontext(&fib); fib.uc_stack.ss_sp = (::malloc)(stack_size); fib.uc_stack.ss_size = stack_size; fib.uc_link = 0; typedef void(*fn_t)(); fn_t fn = (fn_t)fiber_proc; makecontext(&fib, fn, 1, ctx); } inline void delete_fiber(fiber_t& fib) { //(::free)(fib.uc_stack.ss_sp); } inline void switch_to_fiber(fiber_t& fib, fiber_t& prev) { swapcontext(&prev, &fib); } #else struct fiber_t { ucontext_t fib; jmp_buf jmp; }; struct fiber_ctx_t { void(* fnc)(void*); void* ctx; jmp_buf* cur; ucontext_t* prv; }; static void fiber_start_fnc(void* p) { fiber_ctx_t* ctx = (fiber_ctx_t*)p; void (*volatile ufnc)(void*) = ctx->fnc; void* volatile uctx = ctx->ctx; if (_setjmp(*ctx->cur) == 0) { ucontext_t tmp; swapcontext(&tmp, ctx->prv); } ufnc(uctx); } inline void create_main_fiber(fiber_t& fib) { memset(&fib, 0, sizeof(fib)); } inline void delete_main_fiber(fiber_t& fib) { (void)fib; } inline void create_fiber(fiber_t& fib, void(*ufnc)(void*), void* uctx) { size_t const stack_size = 64*1024; getcontext(&fib.fib); fib.fib.uc_stack.ss_sp = (::malloc)(stack_size); fib.fib.uc_stack.ss_size = stack_size; fib.fib.uc_link = 0; ucontext_t tmp; fiber_ctx_t ctx = {ufnc, uctx, &fib.jmp, &tmp}; makecontext(&fib.fib, (void(*)())fiber_start_fnc, 1, &ctx); swapcontext(&tmp, &fib.fib); } inline void delete_fiber(fiber_t& fib) { //(::free)(fib.uc_stack.ss_sp); } inline void switch_to_fiber(fiber_t& fib, fiber_t& prv) { if (_setjmp(prv.jmp) == 0) _longjmp(fib.jmp, 1); } #endif #endif #ifdef _MSC_VER typedef unsigned __int64 uint64_t; # define RL_INLINE __forceinline # define RL_NOINLINE __declspec(noinline) # define RL_STRINGIZE(text) RL_STRINGIZE_A((text)) # define RL_STRINGIZE_I(text) #text # define RL_STRINGIZE_A(arg) RL_STRINGIZE_I arg # define RL_STDCALL __stdcall #else # define RL_INLINE inline # define RL_NOINLINE # define RL_STRINGIZE_I(text) #text # define RL_STRINGIZE(text) RL_STRINGIZE_I(text) # define RL_STDCALL #endif #if defined(_MSC_VER) # define RL_THROW_SPEC(ex) #elif __cplusplus >= 201103L # define RL_THROW_SPEC(ex) noexcept(false) #else # define RL_THROW_SPEC(ex) throw(ex) #endif #if defined (_MSC_VER) && (_MSC_VER >= 1400) # define RL_RESTRICT __restrict #else # define RL_RESTRICT #endif #endif ================================================ FILE: tests/relacy/relacy/relacy/pthread.h ================================================ /* Relacy Race Detector * Copyright (c) 2008-2013, Dmitry S. Vyukov * All rights reserved. * This software is provided AS-IS with no warranty, either express or implied. * This software is distributed under a license and may not be copied, * modified or distributed except as expressly authorized under the * terms of the license contained in the file LICENSE in this distribution. */ #ifndef RL_PTHREAD_IFACE_HPP #define RL_PTHREAD_IFACE_HPP #ifdef _MSC_VER # pragma once #endif #include "relacy.hpp" #include "stdlib/pthread.hpp" #endif ================================================ FILE: tests/relacy/relacy/relacy/random.hpp ================================================ /* Relacy Race Detector * Copyright (c) 2008-2013, Dmitry S. Vyukov * All rights reserved. * This software is provided AS-IS with no warranty, either express or implied. * This software is distributed under a license and may not be copied, * modified or distributed except as expressly authorized under the * terms of the license contained in the file LICENSE in this distribution. */ #ifndef RL_RANDOM_HPP #define RL_RANDOM_HPP #ifdef _MSC_VER # pragma once #endif #include "base.hpp" namespace rl { unsigned const primes[16] = {1, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53}; struct random_generator { unsigned k; unsigned c; unsigned x; void seed(iteration_t s) { k = ((unsigned)(s >> 32) & 0xf) + 8; c = primes[((unsigned)(s >> 36) & 0xf)]; x = (unsigned)((s + 1) * 0x95949347 + c); } unsigned rand() { return ((x = x + c + (x << k)) >> 16); } template RL_INLINE T get() { return static_cast(rand() % max); } }; } #endif ================================================ FILE: tests/relacy/relacy/relacy/random_scheduler.hpp ================================================ /* Relacy Race Detector * Copyright (c) 2008-2013, Dmitry S. Vyukov * All rights reserved. * This software is provided AS-IS with no warranty, either express or implied. * This software is distributed under a license and may not be copied, * modified or distributed except as expressly authorized under the * terms of the license contained in the file LICENSE in this distribution. */ #ifndef RL_RANDOM_SCHEDULER_HPP #define RL_RANDOM_SCHEDULER_HPP #ifdef _MSC_VER # pragma once #endif #include "base.hpp" #include "scheduler.hpp" #include "random.hpp" namespace rl { template class random_scheduler : public scheduler, scheduler_thread_info, thread_count> { public: typedef scheduler, scheduler_thread_info, thread_count> base_t; typedef typename base_t::thread_info_t thread_info_t; typedef typename base_t::shared_context_t shared_context_t; struct task_t { }; random_scheduler(test_params& params, shared_context_t& ctx, thread_id_t dynamic_thread_count) : base_t(params, ctx, dynamic_thread_count) { } thread_id_t iteration_begin_impl() { rand_.seed(this->iter_); unpark_reason reason; return schedule_impl(reason, false); } bool iteration_end_impl() { return this->iter_ == this->params_.iteration_count; } thread_id_t schedule_impl(unpark_reason& reason, unsigned /*yield*/) { thread_id_t const running_thread_count = this->running_threads_count; thread_id_t timed_thread_count = this->timed_thread_count_; if (timed_thread_count) { thread_id_t cnt = running_thread_count ? timed_thread_count * 4 : timed_thread_count; thread_id_t idx = rand_.rand() % cnt; if (idx < timed_thread_count) { thread_info_t* thr = this->timed_threads_[idx]; thread_id_t th = thr->index_; RL_VERIFY(1 == thr->block_count_); this->unpark_thread(th); RL_VERIFY(thr->state_ == thread_state_running); reason = unpark_reason_timeout; return th; } } thread_id_t spurious_thread_count = this->spurious_thread_count_; if (spurious_thread_count && running_thread_count) { thread_id_t cnt = spurious_thread_count * 8; thread_id_t idx = rand_.rand() % cnt; if (idx < spurious_thread_count) { thread_info_t* thr = this->spurious_threads_[idx]; thread_id_t th = thr->index_; RL_VERIFY(1 == thr->block_count_); this->unpark_thread(th); RL_VERIFY(thr->state_ == thread_state_running); reason = unpark_reason_spurious; return th; } } RL_VERIFY(running_thread_count); unsigned index = rand_.rand() % running_thread_count; thread_id_t th = this->running_threads[index]; reason = unpark_reason_normal; return th; } unsigned rand_impl(unsigned limit, sched_type t) { (void)t; unsigned r = rand_.rand() % limit; ///!!! #ifdef RL_MY_TEST if (this->iter_ == 8761115) { char buf [1024]; sprintf(buf, "rand(%u, %u) = %u\n", t, limit, r); OutputDebugStringA(buf); } #endif return r; } iteration_t iteration_count_impl() { return this->params_.iteration_count; } void get_state_impl(std::ostream& /*ss*/) { } void set_state_impl(std::istream& /*ss*/) { } void on_thread_block(thread_id_t /*th*/, bool /*yield*/) { } private: random_generator rand_; RL_NOCOPY(random_scheduler); }; } #endif ================================================ FILE: tests/relacy/relacy/relacy/relacy.hpp ================================================ /* Relacy Race Detector * Copyright (c) 2008-2013, Dmitry S. Vyukov * All rights reserved. * This software is provided AS-IS with no warranty, either express or implied. * This software is distributed under a license and may not be copied, * modified or distributed except as expressly authorized under the * terms of the license contained in the file LICENSE in this distribution. */ #ifndef RL_RELACY_HPP #define RL_RELACY_HPP #ifdef _MSC_VER # pragma once #endif #include "base.hpp" #include "context.hpp" #include "context_base_impl.hpp" #include "backoff.hpp" #include "atomic_fence.hpp" #include "atomic.hpp" #include "var.hpp" #include "thread_local.hpp" #include "test_suite.hpp" #include "dyn_thread.hpp" #include "stdlib/mutex.hpp" #include "stdlib/condition_variable.hpp" #include "stdlib/semaphore.hpp" #include "stdlib/event.hpp" #include "stdlib/windows.hpp" #include "stdlib/pthread.hpp" #define VAR_T(x) rl::var #define TLS_T(T) rl::thread_local_var #define VAR(x) x($) #ifndef RL_FORCE_SEQ_CST #define memory_order_relaxed mo_relaxed, $ #define memory_order_consume mo_consume, $ #define memory_order_acquire mo_acquire, $ #define memory_order_release mo_release, $ #define memory_order_acq_rel mo_acq_rel, $ #define memory_order_seq_cst mo_seq_cst, $ #else #define memory_order_relaxed mo_seq_cst, $ #define memory_order_consume mo_seq_cst, $ #define memory_order_acquire mo_seq_cst, $ #define memory_order_release mo_seq_cst, $ #define memory_order_acq_rel mo_seq_cst, $ #define memory_order_seq_cst mo_seq_cst, $ #endif #define new RL_NEW_PROXY #define delete RL_DELETE_PROXY #define malloc(sz) rl::rl_malloc((sz), $) #define calloc(sz, cnt) rl::rl_calloc((sz), (cnt), $) #define realloc(p, sz) rl::rl_realloc((p), (sz), $) #define free(p) rl::rl_free((p), $) #ifdef assert #undef assert #endif #define assert RL_ASSERT #ifdef errno #undef errno #endif #define errno (rl::get_errno()) #endif ================================================ FILE: tests/relacy/relacy/relacy/relacy_cli.hpp ================================================ /* Relacy Race Detector * Copyright (c) 2008-2013, Dmitry S. Vyukov * All rights reserved. * This software is provided AS-IS with no warranty, either express or implied. * This software is distributed under a license and may not be copied, * modified or distributed except as expressly authorized under the * terms of the license contained in the file LICENSE in this distribution. */ #ifndef RL_RELACY_CLI_HPP #define RL_RELACY_CLI_HPP #ifdef _MSC_VER # pragma once #endif #define RL_CLI_MODE #include "relacy.hpp" #include "cli.hpp" #include "cli_interlocked.hpp" #include "cli_volatile.hpp" #include "cli_var.hpp" #endif ================================================ FILE: tests/relacy/relacy/relacy/relacy_java.hpp ================================================ /* Relacy Race Detector * Copyright (c) 2008-2013, Dmitry S. Vyukov * All rights reserved. * This software is provided AS-IS with no warranty, either express or implied. * This software is distributed under a license and may not be copied, * modified or distributed except as expressly authorized under the * terms of the license contained in the file LICENSE in this distribution. */ #ifndef RL_RELACY_JAVA_HPP #define RL_RELACY_JAVA_HPP #ifdef _MSC_VER # pragma once #endif #define RL_JAVA_MODE #include "relacy.hpp" #include "java.hpp" #include "java_atomic.hpp" #include "java_volatile.hpp" #include "java_var.hpp" #endif ================================================ FILE: tests/relacy/relacy/relacy/relacy_std.hpp ================================================ /* Relacy Race Detector * Copyright (c) 2008-2013, Dmitry S. Vyukov * All rights reserved. * This software is provided AS-IS with no warranty, either express or implied. * This software is distributed under a license and may not be copied, * modified or distributed except as expressly authorized under the * terms of the license contained in the file LICENSE in this distribution. */ #ifndef RL_RELACY_STD_HPP #define RL_RELACY_STD_HPP #ifdef _MSC_VER # pragma once #endif // MOODYCAMEL BEGIN // Newer versions of GCC define std::memory_order and std::atomic even if their headers are not // explicitly included (it suffices to merely include ) #ifdef __GNUC__ #define memory_order std_memory_order #define atomic std_atomic #define atomic_flag std_atomic_flag #endif // MOODYCAMEL END #include "relacy.hpp" // MOODYCAMEL BEGIN #ifdef __GNUC__ #undef memory_order #undef atomic #undef atomic_flag namespace rl { using memory_order = ::rl::std_memory_order; template using atomic = ::rl::std_atomic; } #endif // MOODYCAMEL END namespace std { using memory_order = rl::memory_order; using rl::mo_relaxed; using rl::mo_consume; using rl::mo_acquire; using rl::mo_release; using rl::mo_acq_rel; using rl::mo_seq_cst; using rl::atomic; using rl::atomic_thread_fence; using rl::atomic_signal_fence; using rl::atomic_bool; using rl::atomic_address; using rl::atomic_char; using rl::atomic_schar; using rl::atomic_uchar; using rl::atomic_short; using rl::atomic_ushort; using rl::atomic_int; using rl::atomic_uint; using rl::atomic_long; using rl::atomic_ulong; using rl::atomic_llong; using rl::atomic_ullong; // using rl::atomic_char16_t; // using rl::atomic_char32_t; using rl::atomic_wchar_t; // using rl::atomic_int_least8_t; // using rl::atomic_uint_least8_t; // using rl::atomic_int_least16_t; // using rl::atomic_uint_least16_t; // using rl::atomic_int_least32_t; // using rl::atomic_uint_least32_t; // using rl::atomic_int_least64_t; // using rl::atomic_uint_least64_t; // using rl::atomic_int_fast8_t; // using rl::atomic_uint_fast8_t; // using rl::atomic_int_fast16_t; // using rl::atomic_uint_fast16_t; // using rl::atomic_int_fast32_t; // using rl::atomic_uint_fast32_t; // using rl::atomic_int_fast64_t; // using rl::atomic_uint_fast64_t; using rl::atomic_intptr_t; using rl::atomic_uintptr_t; using rl::atomic_size_t; // using rl::atomic_ssize_t; using rl::atomic_ptrdiff_t; // using rl::atomic_intmax_t; // using rl::atomic_uintmax_t; using rl::mutex; using rl::recursive_mutex; using rl::condition_variable; using rl::condition_variable_any; } #endif ================================================ FILE: tests/relacy/relacy/relacy/rmw.hpp ================================================ /* Relacy Race Detector * Copyright (c) 2008-2013, Dmitry S. Vyukov * All rights reserved. * This software is provided AS-IS with no warranty, either express or implied. * This software is distributed under a license and may not be copied, * modified or distributed except as expressly authorized under the * terms of the license contained in the file LICENSE in this distribution. */ #ifndef RL_RMW_HPP #define RL_RMW_HPP #ifdef _MSC_VER # pragma once #endif #include "base.hpp" namespace rl { enum rmw_type_e { rmw_type_swap, rmw_type_add, rmw_type_sub, rmw_type_and, rmw_type_or, rmw_type_xor, }; inline char const* format(rmw_type_e t) { switch (t) { case rmw_type_swap: return "exchange"; case rmw_type_add: return "fetch_add"; case rmw_type_sub: return "fetch_sub"; case rmw_type_and: return "fetch_and"; case rmw_type_or: return "fetch_or"; case rmw_type_xor: return "fetch_xor"; } RL_VERIFY(!"invalid rmw type"); throw std::logic_error("invalid rmw type"); } template struct rmw_type_t {}; template T perform_rmw(rmw_type_t, T v, Y op) { (void)v; return op; } template T perform_rmw(rmw_type_t, T v, Y op) { return v + op; } template T perform_rmw(rmw_type_t, T v, Y op) { return v - op; } template T perform_rmw(rmw_type_t, T v, Y op) { return v & op; } template T perform_rmw(rmw_type_t, T v, Y op) { return v | op; } template T perform_rmw(rmw_type_t, T v, Y op) { return v ^ op; } } #endif ================================================ FILE: tests/relacy/relacy/relacy/scheduler.hpp ================================================ /* Relacy Race Detector * Copyright (c) 2008-2013, Dmitry S. Vyukov * All rights reserved. * This software is provided AS-IS with no warranty, either express or implied. * This software is distributed under a license and may not be copied, * modified or distributed except as expressly authorized under the * terms of the license contained in the file LICENSE in this distribution. */ #ifndef RL_SCHEDULER_HPP #define RL_SCHEDULER_HPP #ifdef _MSC_VER # pragma once #endif #include "base.hpp" #include "context_base.hpp" namespace rl { enum thread_state_e { thread_state_running, thread_state_blocked, thread_state_finished, }; enum thread_finish_result { thread_finish_result_normal, thread_finish_result_last, thread_finish_result_deadlock, }; struct scheduler_thread_info { thread_id_t index_; unsigned block_count_; thread_state_e state_; void reset(test_params& /*params*/) { block_count_ = 0; state_ = thread_state_running; } }; template class scheduler : nocopy<> { public: typedef thread_info_type thread_info_t; struct shared_context_t { typedef typename derived_t::task_t task_t; //CRITICAL_SECTION guard_; queue queue_; }; scheduler(test_params& params, shared_context_t& ctx, thread_id_t dynamic_thread_count) : params_(params) , ctx_(ctx) , total_dynamic_threads_(dynamic_thread_count) , iter_() , thread_() { for (thread_id_t i = 0; i != thread_count; ++i) { threads_[i].index_ = i; } } thread_id_t iteration_begin(iteration_t iter) { iter_ = iter; running_threads_count = thread_count; finished_thread_count_ = 0; timed_thread_count_ = 0; spurious_thread_count_ = 0; dynamic_thread_count_ = 0; for (thread_id_t i = 0; i != thread_count; ++i) { running_threads.push_back(i); threads_[i].reset(params_); } for (thread_id_t i = thread_count - total_dynamic_threads_; i != thread_count; ++i) { dynamic_threads_[dynamic_thread_count_++] = &threads_[i]; block_thread(i, false); } thread_id_t const th = self().iteration_begin_impl(); thread_ = &threads_[th]; return th; } bool iteration_end() { bool const finish = self().iteration_end_impl(); thread_ = 0; return finish; } thread_id_t schedule(unpark_reason& reason, unsigned yield) { thread_id_t const th = self().schedule_impl(reason, yield); RL_VERIFY(threads_[th].state_ == thread_state_running); thread_ = &threads_[th]; return th; } RL_INLINE unsigned rand(unsigned limit, sched_type t) { RL_VERIFY(limit); return self().rand_impl(limit, t); } iteration_t iteration_count() { return self().iteration_count_impl(); } bool park_current_thread(bool is_timed, bool allow_spurious_wakeup) { if (is_timed) { timed_threads_[timed_thread_count_++] = thread_; RL_VERIFY(timed_thread_count_ <= thread_count); } if (allow_spurious_wakeup) { spurious_threads_[spurious_thread_count_++] = thread_; RL_VERIFY(spurious_thread_count_ <= thread_count); } block_thread(thread_->index_, true); return is_deadlock() ? false : true; } void unpark_thread(thread_id_t th, bool do_switch = false) { (void)do_switch; unblock_thread(th); thread_info_t& t = threads_[th]; //!!! store flag as to whether thread is spurious blocked in thread object // (to eliminate iteration over all threads) for (thread_id_t i = 0; i != spurious_thread_count_; ++i) { if (spurious_threads_[i] == &t) { for (thread_id_t j = i + 1; j != spurious_thread_count_; ++j) spurious_threads_[j - 1] = spurious_threads_[j]; spurious_thread_count_ -= 1; break; } } //!!! store flag as to whether thread is spurious blocked in thread object for (thread_id_t i = 0; i != timed_thread_count_; ++i) { if (timed_threads_[i] == &t) { for (thread_id_t j = i + 1; j != timed_thread_count_; ++j) timed_threads_[j - 1] = timed_threads_[j]; timed_thread_count_ -= 1; break; } } } thread_finish_result thread_finished() { RL_VERIFY(thread_->state_ == thread_state_running); block_thread(thread_->index_, false); thread_->state_ = thread_state_finished; finished_thread_count_ += 1; self().thread_finished_impl(); retry: if (finished_thread_count_ == thread_count) { return thread_finish_result_last; } else if (is_deadlock()) { if (dynamic_thread_count_) { while (dynamic_thread_count_) { thread_info_t* th = dynamic_threads_[--dynamic_thread_count_]; unblock_thread(th->index_); } goto retry; } return thread_finish_result_deadlock; } else { return thread_finish_result_normal; } } thread_id_t create_thread() { RL_VERIFY(dynamic_thread_count_); thread_info_t* th = dynamic_threads_[--dynamic_thread_count_]; unblock_thread(th->index_); return th->index_; } void get_state(std::ostream& ss) { self().get_state_impl(ss); } void set_state(std::istream& ss) { self().set_state_impl(ss); } protected: test_params& params_; shared_context_t& ctx_; thread_id_t const total_dynamic_threads_; iteration_t iter_; aligned threads_ [thread_count]; thread_info_t* thread_; vector::type running_threads; thread_id_t running_threads_count; thread_id_t finished_thread_count_; //!!! doesn't timed/spurious waits must belong to full scheduler? // hyphotesis: random scheduler can ignore timed/spurious waits // (however must detect deadlock with spurious threads) thread_info_t* timed_threads_ [thread_count]; thread_id_t timed_thread_count_; thread_info_t* spurious_threads_ [thread_count]; thread_id_t spurious_thread_count_; thread_info_t* dynamic_threads_ [thread_count]; thread_id_t dynamic_thread_count_; void block_thread(thread_id_t th, bool yield) { RL_VERIFY(th < thread_count); thread_info_t& t = threads_[th]; RL_VERIFY(t.state_ != thread_state_finished); if (t.block_count_++) return; for (thread_id_t i = 0; i != running_threads_count; ++i) { if (running_threads[i] == th) { running_threads.erase(running_threads.begin() + i); running_threads_count -= 1; t.state_ = thread_state_blocked; self().on_thread_block(th, yield); return; } } RL_VERIFY(false); } bool unblock_thread(thread_id_t th) { RL_VERIFY(th < thread_count); thread_info_t& t = threads_[th]; RL_VERIFY(t.state_ == thread_state_blocked); if (--t.block_count_) return false; running_threads.push_back(th); running_threads_count += 1; t.state_ = thread_state_running; return true; } private: derived_t& self() { return *static_cast(this); } bool is_deadlock() { if ((0 == running_threads_count) && (0 == timed_thread_count_)) { self().purge_blocked_threads(); if ((0 == running_threads_count) && (0 == timed_thread_count_)) return true; } return false; } void thread_finished_impl() { } void purge_blocked_threads() { } }; } #endif ================================================ FILE: tests/relacy/relacy/relacy/signature.hpp ================================================ /* Relacy Race Detector * Copyright (c) 2008-2013, Dmitry S. Vyukov * All rights reserved. * This software is provided AS-IS with no warranty, either express or implied. * This software is distributed under a license and may not be copied, * modified or distributed except as expressly authorized under the * terms of the license contained in the file LICENSE in this distribution. */ #ifndef RL_SIGNATURE_HPP #define RL_SIGNATURE_HPP #ifdef _MSC_VER # pragma once #endif #include "base.hpp" #include "test_result.hpp" #include "context_base.hpp" namespace rl { template class signature { public: signature() : magic_(magic) { } signature(signature const&) : magic_(magic) { } ~signature() { check(RL_INFO); magic_ = 0; } void check(debug_info_param info) const { if ( ((uintptr_t)this <= (uintptr_t)-1 - 4096) && ((uintptr_t)this >= 4096) && ((uintptr_t)this % sizeof(unsigned) == 0) && (magic == magic_)) { return; } else { fail(info); } } private: unsigned magic_; struct fault_event { void const* addr_; void output(std::ostream& s) const { s << "<" << std::hex << addr_ << std::dec << ">" << " access to freed memory"; } }; RL_NOINLINE void fail(debug_info_param info) const { context& c = ctx(); RL_HIST(fault_event) {this} RL_HIST_END(); rl::ctx().fail_test("access to freed memory", test_result_access_to_freed_memory, info); } }; } #endif ================================================ FILE: tests/relacy/relacy/relacy/slab_allocator.hpp ================================================ /* Relacy Race Detector * Copyright (c) 2008-2013, Dmitry S. Vyukov * All rights reserved. * This software is provided AS-IS with no warranty, either express or implied. * This software is distributed under a license and may not be copied, * modified or distributed except as expressly authorized under the * terms of the license contained in the file LICENSE in this distribution. */ #ifndef RL_SLAB_ALLOCATOR_HPP #define RL_SLAB_ALLOCATOR_HPP #ifdef _MSC_VER # pragma once #endif #include "base.hpp" namespace rl { template class slab_allocator : nocopy<> { public: slab_allocator() : freelist_() , blocks_() , alloc_count_() { } ~slab_allocator() { char* pos = blocks_; while (pos) { char* const next = *reinterpret_cast(pos); ::free(pos); pos = next; } } type* alloc(void* ctx = 0) { if (freelist_) { type* p = freelist_; freelist_ = *reinterpret_cast(p); alloc_count_ += 1; *(void**)p = ctx; type* pp = reinterpret_cast((reinterpret_cast(p) + 1)); return pp; } else { return alloc_batch(); } } void free(type* p) { type** pos = reinterpret_cast((reinterpret_cast(p) - 1)); pos[0] = freelist_; freelist_ = reinterpret_cast(pos); alloc_count_ -= 1; } bool iteration_end() { #ifndef RL_GC return alloc_count_ == 0; #else freelist_ = 0; size_t elem_size = sizeof(void*) + sizeof(type); elem_size = (elem_size + 15) & ~15; char* pos = blocks_; while (pos) { char* p = pos; p += elem_size; for (size_t i = 0; i != batch_size; ++i) { *reinterpret_cast(p) = freelist_; freelist_ = reinterpret_cast(p); p += elem_size; } pos = *reinterpret_cast(pos); } return true; #endif } void output_allocs(std::ostream& stream) { size_t elem_size = sizeof(void*) + sizeof(type); elem_size = (elem_size + 15) & ~15; set::type allocs; char* pos = blocks_; while (pos) { char* p = pos; p += elem_size; for (size_t i = 0; i != batch_size; ++i) { allocs.insert(p); p += elem_size; } pos = *reinterpret_cast(pos); } set::type avail; type* pos2 = freelist_; while (pos2) { avail.insert(pos2); pos2 = *reinterpret_cast(pos2); } vector::type diff; std::set_difference(allocs.begin(), allocs.end(), avail.begin(), avail.end(), std::back_inserter(diff)); for (size_t i = 0; i != diff.size(); ++i) { stream << *(void**)diff[i] << std::endl; } } private: static size_t const batch_size = 128; type* freelist_; char* blocks_; size_t alloc_count_; RL_NOINLINE type* alloc_batch() { size_t elem_size = sizeof(void*) + sizeof(type); elem_size = (elem_size + 15) & ~15; char* const batch = (char*)(::malloc)(elem_size * (batch_size + 1)); if (0 == batch) throw std::bad_alloc(); *reinterpret_cast(batch) = blocks_; blocks_ = batch; char* p = batch; p += elem_size; for (size_t i = 0; i != batch_size; ++i) { *reinterpret_cast(p) = freelist_; freelist_ = reinterpret_cast(p); p += elem_size; } return alloc(); } }; } #endif ================================================ FILE: tests/relacy/relacy/relacy/stdlib/condition_variable.hpp ================================================ /* Relacy Race Detector * Copyright (c) 2008-2013, Dmitry S. Vyukov * All rights reserved. * This software is provided AS-IS with no warranty, either express or implied. * This software is distributed under a license and may not be copied, * modified or distributed except as expressly authorized under the * terms of the license contained in the file LICENSE in this distribution. */ #ifndef RL_CONDITION_VARIABLE_HPP #define RL_CONDITION_VARIABLE_HPP #ifdef _MSC_VER # pragma once #endif #include "../base.hpp" #include "../context_base.hpp" #include "../waitset.hpp" #include "../signature.hpp" namespace rl { struct mutex_wrapper { virtual void lock(debug_info_param info) const = 0; virtual void unlock(debug_info_param info) const = 0; virtual ~mutex_wrapper() {} }; template class mutex_wrapper_impl : public mutex_wrapper { public: mutex_wrapper_impl(mutex_t& m) : m_(m) { } private: mutex_t& m_; virtual void lock(debug_info_param info) const { m_.lock(info); } virtual void unlock(debug_info_param info) const { m_.unlock(info); } RL_NOCOPY(mutex_wrapper_impl); }; struct pred_wrapper { virtual bool exec() const = 0; virtual ~pred_wrapper() {} }; template class pred_wrapper_impl : public pred_wrapper { public: pred_wrapper_impl(pred_t p) : p_(p) { } private: mutable pred_t p_; virtual bool exec() const { return p_(); } RL_NOCOPY(pred_wrapper_impl); }; struct condvar_data { virtual void notify_one(debug_info_param info) = 0; virtual void notify_all(debug_info_param info) = 0; virtual sema_wakeup_reason wait(mutex_wrapper const& lock, bool is_timed, debug_info_param info) = 0; virtual bool wait(mutex_wrapper const& lock, pred_wrapper const& pred, bool is_timed, debug_info_param info) = 0; virtual ~condvar_data() {} // just to calm down gcc }; template class condvar_data_impl : public condvar_data { public: condvar_data_impl(bool allow_spurious_wakeups) { spurious_wakeup_limit_ = 0; if (allow_spurious_wakeups && ctx().is_random_sched()) spurious_wakeup_limit_ = 10; } ~condvar_data_impl() { //!!! detect destoy when there are blocked threads } private: waitset ws_; signature<0xc0ffe3ad> sign_; int spurious_wakeup_limit_; struct event_t { enum type_e { type_notify_one, type_notify_all, type_wait_enter, type_wait_exit, type_wait_pred_enter, type_wait_pred_exit, }; condvar_data_impl const* var_addr_; type_e type_; thread_id_t thread_count_; unpark_reason reason_; void output(std::ostream& s) const { s << "<" << std::hex << var_addr_ << std::dec << "> cond_var: "; switch (type_) { case type_notify_one: s << "notify one total_blocked=" << thread_count_ << " unblocked=" << (thread_count_ ? 1 : 0); break; case type_notify_all: s << "notify all unblocked=" << thread_count_; break; case type_wait_enter: s << "wait enter"; break; case type_wait_exit: s << "wait exit"; if (unpark_reason_normal == reason_) s << " due to notified"; else if (unpark_reason_timeout == reason_) s << " due to timeout"; else if (unpark_reason_spurious == reason_) s << " spuriously"; break; case type_wait_pred_enter: s << "wait pred enter"; break; case type_wait_pred_exit: s << "wait pred exit"; break; } } }; virtual void notify_one(debug_info_param info) { context& c = ctx(); //??? do I need this scheduler call? c.sched(); sign_.check(info); RL_HIST(event_t) {this, event_t::type_notify_one, ws_.size()} RL_HIST_END(); ws_.unpark_one(c, info); } virtual void notify_all(debug_info_param info) { context& c = ctx(); //??? do I need this scheduler call? c.sched(); sign_.check(info); RL_HIST(event_t) {this, event_t::type_notify_all, ws_.size()} RL_HIST_END(); ws_.unpark_all(c, info); } virtual sema_wakeup_reason wait(mutex_wrapper const& lock, bool is_timed, debug_info_param info) { //!!! detect whether mutex is the same context& c = ctx(); sign_.check(info); RL_HIST(event_t) {this, event_t::type_wait_enter} RL_HIST_END(); lock.unlock(info); sign_.check(info); bool allow_spurious_wakeup = (spurious_wakeup_limit_ > 0); unpark_reason reason = ws_.park_current(c, is_timed, allow_spurious_wakeup, false, info); if (reason == unpark_reason_spurious) spurious_wakeup_limit_ -= 1; RL_HIST(event_t) {this, event_t::type_wait_exit, 0, reason} RL_HIST_END(); lock.lock(info); sign_.check(info); if (reason == unpark_reason_normal) return sema_wakeup_reason_success; else if (reason == unpark_reason_spurious) return sema_wakeup_reason_spurious; else //if (reason == unpark_reason_timeout) return sema_wakeup_reason_timeout; } virtual bool wait(mutex_wrapper const& lock, pred_wrapper const& pred, bool is_timed, debug_info_param info) { context& c = ctx(); sign_.check(info); RL_HIST(event_t) {this, event_t::type_wait_pred_enter} RL_HIST_END(); while (!pred.exec()) { sema_wakeup_reason reason = wait(lock, is_timed, info); if (reason == sema_wakeup_reason_timeout) { RL_HIST(event_t) {this, event_t::type_wait_pred_exit} RL_HIST_END(); return pred.exec(); } } RL_HIST(event_t) {this, event_t::type_wait_pred_exit} RL_HIST_END(); return true; } }; template class condvar { public: condvar() : impl_() { } condvar(condvar const&) : impl_() { } condvar& operator = (condvar const&) { return *this; } ~condvar() { } void init(bool allow_spurious_wakeups, debug_info_param info) { context& c = ctx(); RL_ASSERT_IMPL(0 == impl_, test_result_double_initialization_of_condvar, "", info); sign_.check(info); impl_ = c.condvar_ctor(allow_spurious_wakeups); } void deinit(debug_info_param info) { context& c = ctx(); check(info); c.condvar_dtor(impl_); impl_ = 0; } void notify_one(debug_info_param info) { check(info); impl_->notify_one(info); } void notify_all(debug_info_param info) { check(info); impl_->notify_all(info); } template sema_wakeup_reason wait(lock_t& lock, bool is_timed, debug_info_param info) { check(info); mutex_wrapper_impl w (lock); return impl_->wait(w, is_timed, info); } template bool wait(mutex_wrapper const& lock, pred_wrapper const& pred, bool is_timed, debug_info_param info) { check(info); return impl_->wait(mutex_wrapper_impl(lock), pred_wrapper_impl(pred), is_timed, info); } private: condvar_data* impl_; signature<0xbadc0ffe> sign_; void check(debug_info_param info) { RL_ASSERT_IMPL(impl_, test_result_usage_of_non_initialized_condvar, "", info); sign_.check(info); } }; template class condition_variable_std : condvar { public: condition_variable_std() { condvar::init(true, $); } ~condition_variable_std() { condvar::deinit($); } void notify_one(debug_info_param info) { condvar::notify_one(info); } void notify_all(debug_info_param info) { condvar::notify_all(info); } template void wait(lock_t& lock, debug_info_param info) { condvar::wait(lock, false, info); } template void wait(lock_t& lock, pred_t pred, debug_info_param info) { condvar::wait(lock, pred, false, info); } template bool wait_until(lock_t& lock, abs_time_t const&, debug_info_param info) { return condvar::wait(lock, true, info); } template bool wait_until(lock_t& lock, abs_time_t const&, pred_t pred, debug_info_param info) { return condvar::wait(lock, pred, true, info); } template bool wait_for(lock_t& lock, rel_time_t const&, debug_info_param info) { sema_wakeup_reason reason = condvar::wait(lock, true, info); return reason == sema_wakeup_reason_success; } template bool wait_for(lock_t& lock, rel_time_t const&, pred_t pred, debug_info_param info) { return condvar::wait(lock, pred, true, info); } RL_NOCOPY(condition_variable_std); }; struct condvar_tag_std; typedef condition_variable_std condition_variable; struct condvar_tag_std_any; typedef condition_variable_std condition_variable_any; } #endif ================================================ FILE: tests/relacy/relacy/relacy/stdlib/event.hpp ================================================ /* Relacy Race Detector * Copyright (c) 2008-2013, Dmitry S. Vyukov * All rights reserved. * This software is provided AS-IS with no warranty, either express or implied. * This software is distributed under a license and may not be copied, * modified or distributed except as expressly authorized under the * terms of the license contained in the file LICENSE in this distribution. */ #ifndef RL_EVENT_HPP #define RL_EVENT_HPP #ifdef _MSC_VER # pragma once #endif #include "../base.hpp" #include "../context_base.hpp" #include "../sync_var.hpp" #include "../waitset.hpp" #include "semaphore.hpp" namespace rl { struct event_data { virtual void set(debug_info_param info) = 0; virtual void reset(debug_info_param info) = 0; virtual void pulse(debug_info_param info) = 0; virtual sema_wakeup_reason wait(bool try_wait, bool is_timed, debug_info_param info) = 0; virtual bool is_signaled(debug_info_param info) = 0; virtual void memory_acquire(debug_info_param info) = 0; virtual void* prepare_wait(debug_info_param info) = 0; virtual ~event_data() {} // just to calm down gcc }; template class event_data_impl : public event_data { public: event_data_impl(bool manual_reset, bool initial_state) : manual_reset_(manual_reset) , state_(initial_state) { } ~event_data_impl() { //!!! detect destuction with waiters } private: signature<0xdada1234> sign_; bool const manual_reset_; bool state_; waitset ws_; sync_var sync_; struct state_event { enum type { type_set, type_reset, type_pulse, }; event_data_impl* addr_; type type_; bool initial_state_; bool final_state_; thread_id_t unblocked_; void output(std::ostream& s) const { s << "<" << std::hex << addr_ << std::dec << "> event: "; if (type_set == type_) s << "set "; else if (type_reset == type_) s << "reset "; else s << "pulse "; s << "initial_state=" << initial_state_ << " final_state=" << final_state_; if (type_reset != type_) s << " unblocked=" << unblocked_; } }; virtual void set(debug_info_param info) { context& c = ctx(); c.sched(); sign_.check(info); bool initial_state = state_; thread_id_t unblocked = 0; if (state_) { //!!! probably can break if a thread waits in wfmo RL_VERIFY(false == ws_); } else { sync_.release(c.threadx_); state_ = true; if (manual_reset_) { unblocked = ws_.unpark_all(c, info); } else { if (ws_.unpark_one(c, info)) unblocked = 1; } } RL_HIST(state_event) {this, state_event::type_set, initial_state, state_, unblocked} RL_HIST_END(); } virtual void reset(debug_info_param info) { context& c = ctx(); c.sched(); sign_.check(info); bool initial_state = state_; if (state_) { RL_VERIFY(false == ws_); sync_.release(c.threadx_); state_ = false; } RL_HIST(state_event) {this, state_event::type_reset, initial_state, state_, 0} RL_HIST_END(); } virtual void pulse(debug_info_param info) { context& c = ctx(); c.sched(); sign_.check(info); //??? should I model nasty caveat described in MSDN thread_id_t unblocked = 0; if (state_) { //!!! probably can break if a thread waits in wfmo RL_VERIFY(false == ws_); } else { sync_.release(c.threadx_); state_ = true; unblocked = ws_.unpark_all(c, info); state_ = false; } RL_HIST(state_event) {this, state_event::type_pulse, state_, state_, unblocked} RL_HIST_END(); } struct wait_event { event_data_impl* addr_; bool try_wait_; bool is_timed_; bool initial_state_; bool final_state_; sema_wakeup_reason reason_; void output(std::ostream& s) const { s << "<" << std::hex << addr_ << std::dec << "> event: "; if (try_wait_) s << "try_wait "; else if (is_timed_) s << "timed wait "; else s << "wait "; if (reason_ == sema_wakeup_reason_success) s << "succeeded "; else if (reason_ == sema_wakeup_reason_failed) s << "failed "; else if (reason_ == sema_wakeup_reason_timeout) s << "timed out "; else if (reason_ == sema_wakeup_reason_spurious) s << "spuriously failed "; s << "initial_state=" << initial_state_ << " final_state=" << final_state_; } }; virtual sema_wakeup_reason wait(bool try_wait, bool is_timed, debug_info_param info) { context& c = ctx(); c.sched(); sign_.check(info); bool initial_state = state_; sema_wakeup_reason reason = sema_wakeup_reason_success; for (;;) { if (state_) { if (manual_reset_) { sync_.acquire(c.threadx_); } else { state_ = false; sync_.acq_rel(c.threadx_); } reason = sema_wakeup_reason_success; break; } if (try_wait) { sync_.acquire(c.threadx_); reason = sema_wakeup_reason_failed; break; } unpark_reason wr = ws_.park_current(c, is_timed, false, true, info); initial_state = state_; if (unpark_reason_timeout == wr) { sync_.acquire(c.threadx_); reason = sema_wakeup_reason_timeout; break; } else if (unpark_reason_normal == wr) { RL_VERIFY(state_ == true); if (manual_reset_) { sync_.acquire(c.threadx_); } else { state_ = false; sync_.acq_rel(c.threadx_); } c.switch_back(info); reason = sema_wakeup_reason_success; break; } RL_VERIFY(false); } RL_HIST(wait_event) {this, try_wait, is_timed, initial_state, state_, reason} RL_HIST_END(); return reason; } virtual bool is_signaled(debug_info_param info) { (void)info; return state_; } virtual void memory_acquire(debug_info_param info) { (void)info; sync_.acquire(ctx().threadx_); } virtual void* prepare_wait(debug_info_param info) { (void)info; return &ws_; } RL_NOCOPY(event_data_impl); }; class generic_event : public win_waitable_object { public: generic_event() : impl_() { } generic_event(generic_event const&) : impl_() { } generic_event& operator = (generic_event const&) { return *this; } void init(bool manual_reset, bool initial_state, debug_info_param info) { context& c = ctx(); RL_ASSERT_IMPL(0 == impl_, test_result_double_initialization_of_event, "", info); sign_.check(info); impl_ = c.event_ctor(manual_reset, initial_state); } void deinit(debug_info_param info) { context& c = ctx(); check(info); c.event_dtor(impl_); impl_ = 0; } void set(debug_info_param info) { check(info); impl_->set(info); } void reset(debug_info_param info) { check(info); impl_->reset(info); } void pulse(debug_info_param info) { check(info); impl_->pulse(info); } virtual sema_wakeup_reason wait(bool try_wait, bool is_timed, debug_info_param info) { check(info); return impl_->wait(try_wait, is_timed, info); } virtual bool signal(debug_info_param info) { set(info); return true; } private: event_data* impl_; signature<0x3390eeaa> sign_; event_data* check(debug_info_param info) { RL_ASSERT_IMPL(impl_, test_result_usage_of_non_initialized_event, "", info); sign_.check(info); return impl_; } virtual bool is_signaled(debug_info_param info) { return check(info)->is_signaled(info); } virtual void memory_acquire(debug_info_param info) { check(info)->memory_acquire(info); } virtual void* prepare_wait(debug_info_param info) { return check(info)->prepare_wait(info); } }; } #endif ================================================ FILE: tests/relacy/relacy/relacy/stdlib/mutex.hpp ================================================ /* Relacy Race Detector * Copyright (c) 2008-2013, Dmitry S. Vyukov * All rights reserved. * This software is provided AS-IS with no warranty, either express or implied. * This software is distributed under a license and may not be copied, * modified or distributed except as expressly authorized under the * terms of the license contained in the file LICENSE in this distribution. */ #ifndef RL_MUTEX_HPP #define RL_MUTEX_HPP #ifdef _MSC_VER # pragma once #endif #include "../base.hpp" #include "../context.hpp" #include "../thread.hpp" #include "../atomic.hpp" #include "../waitset.hpp" #include "../signature.hpp" #include "../sync_var.hpp" #include "../foreach.hpp" #include "semaphore.hpp" namespace rl { struct generic_mutex_data : nocopy<> { virtual bool lock_exclusive(bool is_timed, debug_info_param info) = 0; virtual bool try_lock_exclusive(debug_info_param info) = 0; virtual void unlock_exclusive(debug_info_param info) = 0; virtual void lock_shared(debug_info_param info) = 0; virtual bool try_lock_shared(debug_info_param info) = 0; virtual void unlock_shared(debug_info_param info) = 0; virtual void unlock_exclusive_or_shared(debug_info_param info) = 0; virtual bool is_signaled(debug_info_param info) = 0; virtual void memory_acquire(debug_info_param info) = 0; virtual void* prepare_wait(debug_info_param info) = 0; virtual ~generic_mutex_data() {} // just to calm down gcc }; template class generic_mutex_data_impl : public generic_mutex_data { public: struct event_t { enum type_e { type_lock, type_unlock, type_recursive_lock, type_recursive_unlock, type_failed_try_lock, type_spuriously_failed_try_lock, type_lock_shared, type_unlock_shared, type_recursive_lock_shared, type_recursive_unlock_shared, type_failed_try_lock_shared, type_spuriously_failed_try_lock_shared, type_wait, type_destroying_owned_mutex, }; generic_mutex_data_impl const* var_addr_; type_e type_; void output(std::ostream& s) const { s << "<" << std::hex << var_addr_ << std::dec << "> mutex: "; switch (type_) { case type_lock: s << "exclusive lock"; break; case type_unlock: s << "exclusive unlock"; break; case type_recursive_lock: s << "recursive exclusive lock"; break; case type_recursive_unlock: s << "recursive exclusive unlock"; break; case type_failed_try_lock: s << "failed exclusive try lock"; break; case type_spuriously_failed_try_lock: s << "spuriously failed exclusive try lock"; break; case type_lock_shared: s << "shared lock"; break; case type_unlock_shared: s << "shared unlock"; break; case type_recursive_lock_shared: s << "recursive shared lock"; break; case type_recursive_unlock_shared: s << "recursive shared unlock"; break; case type_failed_try_lock_shared: s << "failed shared try lock"; break; case type_spuriously_failed_try_lock_shared: s << "spuriously failed shared try lock"; break; case type_wait: s << "blocking"; break; case type_destroying_owned_mutex: s << "destroying owned mutex"; break; } } }; generic_mutex_data_impl(bool is_rw, bool is_exclusive_recursive, bool is_shared_recursive, bool failing_try_lock) : is_rw_(is_rw) , is_exclusive_recursive_(is_exclusive_recursive) , is_shared_recursive_(is_shared_recursive) , failing_try_lock_(failing_try_lock) , exclusive_owner_(state_free) , exclusive_recursion_count_(0) , shared_lock_count_(0) , try_lock_failed_() { context& c = ctx(); (void)c; RL_VERIFY(false == c.invariant_executing); foreach(shared_owner_, &assign_zero); } ~generic_mutex_data_impl() { context& c = ctx(); RL_VERIFY(false == c.invariant_executing); if (exclusive_owner_ != state_free || exclusive_waitset_ || shared_waitset_) { debug_info info = $; RL_HIST(event_t) {this, event_t::type_destroying_owned_mutex} RL_HIST_END(); RL_ASSERT_IMPL(false, test_result_destroying_owned_mutex, "", $); } } virtual bool lock_exclusive(bool is_timed, debug_info_param info) { context& c = ctx(); c.sched(); sign_.check(info); RL_VERIFY(false == c.invariant_executing); thread_id_t const my_id = c.threadx_->index_; if (exclusive_owner_ == state_shared && shared_owner_[my_id]) { RL_HIST(event_t) {this, event_t::type_lock} RL_HIST_END(); RL_ASSERT_IMPL(false, test_result_mutex_read_to_write_upgrade, "", info); } if (exclusive_owner_ == my_id) { RL_HIST(event_t) {this, event_t::type_recursive_lock} RL_HIST_END(); if (is_exclusive_recursive_) { exclusive_recursion_count_ += 1; return true; } else { RL_ASSERT_IMPL(false, test_result_recursion_on_nonrecursive_mutex, "", info); } } for (;;) { if (exclusive_owner_ == state_free) { RL_VERIFY(exclusive_recursion_count_ == 0); //!!! in some implementation here must be acq_rel sync_.acquire(c.threadx_); exclusive_recursion_count_ = 1; exclusive_owner_ = my_id; RL_HIST(event_t) {this, event_t::type_lock} RL_HIST_END(); return true; } else { RL_VERIFY(my_id != exclusive_owner_); RL_HIST(event_t) {this, event_t::type_wait} RL_HIST_END(); unpark_reason reason = exclusive_waitset_.park_current(c, is_timed, false, false, info); RL_VERIFY(reason != unpark_reason_spurious); if (reason == unpark_reason_timeout) { sync_.acquire(c.threadx_); return false; } } //??? c.sched(); //sign_.check(info); } } virtual bool try_lock_exclusive(debug_info_param info) { context& c = ctx(); c.sched(); sign_.check(info); RL_VERIFY(false == c.invariant_executing); thread_id_t const my_id = c.threadx_->index_; if (exclusive_owner_ == state_shared && shared_owner_[my_id]) { RL_HIST(event_t) {this, event_t::type_lock} RL_HIST_END(); RL_ASSERT_IMPL(false, test_result_mutex_read_to_write_upgrade, "", info); } if (exclusive_owner_ == my_id) { RL_HIST(event_t) {this, event_t::type_recursive_lock} RL_HIST_END(); if (is_exclusive_recursive_) { exclusive_recursion_count_ += 1; return true; } else { RL_ASSERT_IMPL(false, test_result_recursion_on_nonrecursive_mutex, "", info); } } if (exclusive_owner_ == state_free) { RL_VERIFY(exclusive_recursion_count_ == 0); //!!! probability rand if (true == failing_try_lock_ && false == try_lock_failed_ && c.rand(2, sched_type_user)) { try_lock_failed_ = true; RL_HIST(event_t) {this, event_t::type_spuriously_failed_try_lock} RL_HIST_END(); return false; } else { sync_.acquire(c.threadx_); exclusive_recursion_count_ = 1; exclusive_owner_ = my_id; RL_HIST(event_t) {this, event_t::type_lock} RL_HIST_END(); return true; } } else { //!!! in some implementation here must be acquire //sync_.acquire(c.threadx_); RL_VERIFY(my_id != exclusive_owner_); RL_HIST(event_t) {this, event_t::type_failed_try_lock} RL_HIST_END(); return false; } } virtual void unlock_exclusive(debug_info_param info) { context& c = ctx(); c.sched(); sign_.check(info); RL_VERIFY(false == c.invariant_executing); thread_id_t const my_id = c.threadx_->index_; if (exclusive_owner_ != my_id) { RL_HIST(event_t) {this, event_t::type_unlock} RL_HIST_END(); RL_ASSERT_IMPL(false, test_result_unlocking_mutex_wo_ownership, "", info); } exclusive_recursion_count_ -= 1; if (exclusive_recursion_count_) { RL_VERIFY(is_exclusive_recursive_); RL_HIST(event_t) {this, event_t::type_recursive_unlock} RL_HIST_END(); return; } sync_.release(c.threadx_); exclusive_owner_ = state_free; RL_VERIFY(exclusive_recursion_count_ == 0); if (false == exclusive_waitset_.unpark_one(c, info)) shared_waitset_.unpark_all(c, info); RL_HIST(event_t) {this, event_t::type_unlock} RL_HIST_END(); } virtual void lock_shared(debug_info_param info) { RL_VERIFY(is_rw_); context& c = ctx(); c.sched(); sign_.check(info); RL_VERIFY(false == c.invariant_executing); thread_id_t const my_id = c.threadx_->index_; if (exclusive_owner_ == my_id) { RL_HIST(event_t) {this, event_t::type_lock_shared} RL_HIST_END(); RL_ASSERT_IMPL(false, test_result_mutex_write_to_read_upgrade, "", info); } if (exclusive_owner_ == state_shared && shared_owner_[my_id]) { RL_HIST(event_t) {this, event_t::type_recursive_lock_shared} RL_HIST_END(); if (is_shared_recursive_) { shared_owner_[my_id] += 1; shared_lock_count_ += 1; return; } else { RL_ASSERT_IMPL(false, test_result_recursion_on_nonrecursive_mutex, "", info); } } for (;;) { if ((exclusive_owner_ == state_free) || (exclusive_owner_ == state_shared && false == exclusive_waitset_)) { sync_.acquire(c.threadx_); shared_owner_[my_id] += 1; shared_lock_count_ += 1; exclusive_owner_ = state_shared; RL_HIST(event_t) {this, event_t::type_lock_shared} RL_HIST_END(); break; } else { RL_VERIFY(my_id != exclusive_owner_); RL_HIST(event_t) {this, event_t::type_wait} RL_HIST_END(); shared_waitset_.park_current(c, false, false, false, info); } //??? c.sched(); //sign_.check(info); } } virtual bool try_lock_shared(debug_info_param info) { RL_VERIFY(is_rw_); context& c = ctx(); c.sched(); sign_.check(info); RL_VERIFY(false == c.invariant_executing); thread_id_t const my_id = c.threadx_->index_; if (exclusive_owner_ == my_id) { RL_HIST(event_t) {this, event_t::type_lock_shared} RL_HIST_END(); RL_ASSERT_IMPL(false, test_result_mutex_write_to_read_upgrade, "", info); } if (exclusive_owner_ == state_shared && shared_owner_[my_id]) { RL_HIST(event_t) {this, event_t::type_recursive_lock_shared} RL_HIST_END(); if (is_shared_recursive_) { shared_owner_[my_id] += 1; shared_lock_count_ += 1; return true; } else { RL_ASSERT_IMPL(false, test_result_recursion_on_nonrecursive_mutex, "", info); } } if ((exclusive_owner_ == state_free) || (exclusive_owner_ == state_shared && false == exclusive_waitset_)) { //!!! probability rand if (true == failing_try_lock_ && false == try_lock_failed_ && c.rand(2, sched_type_user)) { try_lock_failed_ = true; RL_HIST(event_t) {this, event_t::type_spuriously_failed_try_lock_shared} RL_HIST_END(); return false; } else { sync_.acquire(c.threadx_); shared_owner_[my_id] += 1; shared_lock_count_ += 1; exclusive_owner_ = state_shared; RL_HIST(event_t) {this, event_t::type_lock_shared} RL_HIST_END(); return true; } } else { RL_VERIFY(my_id != exclusive_owner_); RL_HIST(event_t) {this, event_t::type_failed_try_lock_shared} RL_HIST_END(); return false; } } virtual void unlock_shared(debug_info_param info) { RL_VERIFY(is_rw_); context& c = ctx(); c.sched(); sign_.check(info); RL_VERIFY(false == c.invariant_executing); thread_id_t const my_id = c.threadx_->index_; if (exclusive_owner_ != state_shared || 0 == shared_owner_[my_id]) { RL_HIST(event_t) {this, event_t::type_unlock_shared} RL_HIST_END(); RL_ASSERT_IMPL(false, test_result_unlocking_mutex_wo_ownership, "", info); } RL_VERIFY(shared_lock_count_); shared_owner_[my_id] -= 1; shared_lock_count_ -= 1; if (shared_lock_count_ != 0) { if (shared_owner_[my_id]) { RL_VERIFY(is_shared_recursive_); RL_HIST(event_t) {this, event_t::type_recursive_unlock_shared} RL_HIST_END(); } else { sync_.release(c.threadx_); RL_HIST(event_t) {this, event_t::type_unlock_shared} RL_HIST_END(); } return; } sync_.release(c.threadx_); exclusive_owner_ = state_free; exclusive_waitset_.unpark_one(c, info); RL_HIST(event_t) {this, event_t::type_unlock_shared} RL_HIST_END(); } virtual void unlock_exclusive_or_shared(debug_info_param info) { if (exclusive_owner_ == ctx().threadx_->index_) unlock_exclusive(info); else unlock_shared(info); } virtual bool is_signaled(debug_info_param info) { (void)info; return (exclusive_owner_ == state_free); } virtual void memory_acquire(debug_info_param info) { (void)info; sync_.acquire(ctx().threadx_); } virtual void* prepare_wait(debug_info_param info) { (void)info; return &exclusive_waitset_; } private: static thread_id_t const state_shared = (thread_id_t)-1; static thread_id_t const state_free = (thread_id_t)-2; signature<0xbabaf1f1> sign_; bool is_rw_; bool is_exclusive_recursive_; bool is_shared_recursive_; bool failing_try_lock_; sync_var sync_; thread_id_t exclusive_owner_; unsigned exclusive_recursion_count_; waitset exclusive_waitset_; waitset shared_waitset_; timestamp_t shared_owner_ [thread_count]; unsigned shared_lock_count_; bool try_lock_failed_; RL_NOCOPY(generic_mutex_data_impl); }; template class generic_mutex : public win_waitable_object { public: generic_mutex() : impl_() { } generic_mutex(generic_mutex const&) : impl_() { } generic_mutex& operator = (generic_mutex const&) { return *this; } ~generic_mutex() { } void init(bool is_rw, bool is_exclusive_recursive, bool is_shared_recursive, bool failing_try_lock, debug_info_param info) { context& c = ctx(); RL_ASSERT_IMPL(0 == impl_, test_result_double_initialization_of_mutex, "", info); sign_.check(info); impl_ = c.mutex_ctor(is_rw, is_exclusive_recursive, is_shared_recursive, failing_try_lock); } void deinit(debug_info_param info) { context& c = ctx(); check(info); c.mutex_dtor(impl_); impl_ = 0; } void lock(debug_info_param info) { lock_exclusive(info); } bool lock_exclusive_timed(debug_info_param info) { return check(info)->lock_exclusive(true, info); } void unlock(debug_info_param info) { unlock_exclusive(info); } void lock_exclusive(debug_info_param info) { check(info)->lock_exclusive(false, info); } bool try_lock_exclusive(debug_info_param info) { return check(info)->try_lock_exclusive(info); } void unlock_exclusive(debug_info_param info) { check(info)->unlock_exclusive(info); } void lock_shared(debug_info_param info) { check(info)->lock_shared(info); } bool try_lock_shared(debug_info_param info) { return check(info)->try_lock_shared(info); } void unlock_shared(debug_info_param info) { check(info)->unlock_shared(info); } void unlock_exclusive_or_shared(debug_info_param info) { check(info)->unlock_exclusive_or_shared(info); } private: generic_mutex_data* impl_; signature<0x6A6cB03A> sign_; generic_mutex_data* check(debug_info_param info) { RL_ASSERT_IMPL(impl_, test_result_usage_of_non_initialized_mutex, "", info); sign_.check(info); return impl_; } virtual sema_wakeup_reason wait(bool try_wait, bool is_timed, debug_info_param info) { if (try_wait) { if (check(info)->try_lock_exclusive(info)) return sema_wakeup_reason_success; else return sema_wakeup_reason_failed; } else { if (check(info)->lock_exclusive(is_timed, info)) return sema_wakeup_reason_success; else return sema_wakeup_reason_timeout; } } virtual bool signal(debug_info_param info) { check(info)->unlock_exclusive(info); return true; } virtual bool is_signaled(debug_info_param info) { return check(info)->is_signaled(info); } virtual void memory_acquire(debug_info_param info) { check(info)->memory_acquire(info); } virtual void* prepare_wait(debug_info_param info) { return check(info)->prepare_wait(info); } }; template class std_generic_mutex : generic_mutex, nocopy<> { public: std_generic_mutex() { generic_mutex::init(false, is_recursive, false, true, $); } ~std_generic_mutex() { generic_mutex::deinit($); } void lock(debug_info_param info) { generic_mutex::lock_exclusive(info); } bool try_lock(debug_info_param info) { return generic_mutex::try_lock_exclusive(info); } void unlock(debug_info_param info) { generic_mutex::unlock_exclusive(info); } }; struct mutex_tag_std; typedef std_generic_mutex mutex; struct mutex_tag_std_recursive; typedef std_generic_mutex recursive_mutex; } #endif ================================================ FILE: tests/relacy/relacy/relacy/stdlib/pthread.hpp ================================================ /* Relacy Race Detector * Copyright (c) 2008-2013, Dmitry S. Vyukov * All rights reserved. * This software is provided AS-IS with no warranty, either express or implied. * This software is distributed under a license and may not be copied, * modified or distributed except as expressly authorized under the * terms of the license contained in the file LICENSE in this distribution. */ #ifndef RL_PTHREAD_HPP #define RL_PTHREAD_HPP #ifdef _MSC_VER # pragma once #endif #include "mutex.hpp" #include "condition_variable.hpp" #include "semaphore.hpp" namespace rl { enum RL_POSIX_ERROR_CODE { RL_SUCCESS, RL_EINVAL, RL_ETIMEDOUT, RL_EBUSY, RL_EINTR, RL_EAGAIN, RL_EWOULDBLOCK, }; inline void rl_sched_yield(debug_info_param info) { yield(1, info); } typedef win_waitable_object* rl_pthread_t; typedef void* rl_pthread_attr_t; inline int rl_pthread_create(rl_pthread_t* th, rl_pthread_attr_t* attr, void* (*func) (void*), void* arg, debug_info_param info) { (void)attr; (void)info;//!!! RL_VERIFY(th && func); th[0] = ctx().create_thread(func, arg); return 0; } inline int rl_pthread_join(rl_pthread_t th, void** res, debug_info_param info) { RL_VERIFY(th && res); res[0] = 0; //!!! th->wait(false, false, info); return 0; } struct sem_tag_pthread; typedef semaphore rl_sem_t; inline int rl_sem_init(rl_sem_t* sema, int /*pshared*/, unsigned int initial_count, debug_info_param info) { RL_VERIFY(initial_count >= 0); sema->init(true, initial_count, INT_MAX, info); return 0; } inline int rl_sem_destroy(rl_sem_t* sema, debug_info_param info) { sema->deinit(info); return 0; } inline int rl_sem_wait(rl_sem_t* sema, debug_info_param info) { sema_wakeup_reason reason = sema->wait(false, false, info); if (reason == sema_wakeup_reason_success) return 0; if (reason == sema_wakeup_reason_spurious) { set_errno(RL_EINTR); return -1; } RL_VERIFY(false); return -1; } inline int rl_sem_trywait(rl_sem_t* sema, debug_info_param info) { sema_wakeup_reason reason = sema->wait(true, false, info); if (sema_wakeup_reason_success == reason) return 0; if (sema_wakeup_reason_failed == reason) { set_errno(RL_EAGAIN); return -1; } if (sema_wakeup_reason_spurious == reason) { set_errno(RL_EINTR); return -1; } RL_VERIFY(false); return -1; } inline int rl_sem_post(rl_sem_t* sema, debug_info_param info) { unsigned prev_cout = 0; bool result = sema->post(1, prev_cout, info); RL_VERIFY(result); (void)result; return 0; } inline int rl_sem_getvalue(rl_sem_t* sema, int* value, debug_info_param info) { RL_VERIFY(value); if (value) value[0] = sema->get_value(info); return 0; } struct mutex_tag_pthread_mtx; typedef generic_mutex rl_pthread_mutex_t; struct rl_pthread_mutexattr_t { bool is_recursive_; }; enum RL_PTHREAD_MUTEX_TYPE { RL_PTHREAD_MUTEX_NORMAL, RL_PTHREAD_MUTEX_ERRORCHECK, RL_PTHREAD_MUTEX_RECURSIVE, RL_PTHREAD_MUTEX_DEFAULT, }; inline int rl_pthread_mutexattr_init(rl_pthread_mutexattr_t* attr, debug_info_param info) { (void)info; if (0 == attr) return RL_EINVAL; attr->is_recursive_ = false; return 0; } inline int rl_pthread_mutexattr_destroy(rl_pthread_mutexattr_t* attr, debug_info_param info) { (void)info; if (0 == attr) return RL_EINVAL; return 0; } inline int rl_pthread_mutexattr_settype(rl_pthread_mutexattr_t* attr, int type, debug_info_param info) { (void)info; if (0 == attr) return RL_EINVAL; if (RL_PTHREAD_MUTEX_RECURSIVE == type) attr->is_recursive_ = true; return 0; } inline int rl_pthread_mutex_init(rl_pthread_mutex_t* m, rl_pthread_mutexattr_t const* attr, debug_info_param info) { bool is_recursive = attr && attr->is_recursive_; m->init(false, is_recursive, false, false, info); return 0; } inline int rl_pthread_mutex_destroy(rl_pthread_mutex_t* m, debug_info_param info) { m->deinit(info); return 0; } inline int rl_pthread_mutex_lock(rl_pthread_mutex_t* m, debug_info_param info) { m->lock_exclusive(info); return 0; } inline int rl_pthread_mutex_timedlock(rl_pthread_mutex_t* m, const void* abs_timeout, debug_info_param info) { (void)abs_timeout; bool rv = m->lock_exclusive_timed(info); return rv ? 0 : RL_ETIMEDOUT; } inline int rl_pthread_mutex_try_lock(rl_pthread_mutex_t* m, debug_info_param info) { return m->try_lock_exclusive(info) ? 0 : 1; } inline int rl_pthread_mutex_unlock(rl_pthread_mutex_t* m, debug_info_param info) { m->unlock_exclusive(info); return 0; } struct mutex_tag_pthread_rwlock; typedef generic_mutex rl_pthread_rwlock_t; inline int rl_pthread_rwlock_init(rl_pthread_rwlock_t* lock, void const* /*attr*/, debug_info_param info) { lock->init(true, false, true, false, info); return 0; } inline int rl_pthread_rwlock_destroy(rl_pthread_rwlock_t* lock, debug_info_param info) { lock->deinit(info); return 0; } inline int rl_pthread_rwlock_rdlock(rl_pthread_rwlock_t* lock, debug_info_param info) { lock->lock_shared(info); return 0; } inline int rl_pthread_rwlock_tryrdlock(rl_pthread_rwlock_t* lock, debug_info_param info) { bool res = lock->try_lock_shared(info); return res ? 0 : RL_EBUSY; } inline int rl_pthread_rwlock_wrlock(rl_pthread_rwlock_t* lock, debug_info_param info) { lock->lock_exclusive(info); return 0; } inline int rl_pthread_rwlock_trywrlock(rl_pthread_rwlock_t* lock, debug_info_param info) { bool res = lock->try_lock_exclusive(info); return res ? 0 : RL_EBUSY; } inline int rl_pthread_rwlock_unlock(rl_pthread_rwlock_t* lock, debug_info_param info) { lock->unlock_exclusive_or_shared(info); return 0; } struct condvar_tag_pthread; typedef condvar rl_pthread_cond_t; typedef int rl_pthread_condattr_t; inline int rl_pthread_cond_init(rl_pthread_cond_t* cv, rl_pthread_condattr_t* /*condattr*/, debug_info_param info) { cv->init(true, info); return 0; } inline int rl_pthread_cond_destroy(rl_pthread_cond_t* cv, debug_info_param info) { cv->deinit(info); return 0; } inline int rl_pthread_cond_broadcast(rl_pthread_cond_t* cv, debug_info_param info) { cv->notify_all(info); return 0; } inline int rl_pthread_cond_signal(rl_pthread_cond_t* cv, debug_info_param info) { cv->notify_one(info); return 0; } inline int rl_pthread_cond_timedwait(rl_pthread_cond_t* cv, rl_pthread_mutex_t* m, void const* /*timespec*/, debug_info_param info) { sema_wakeup_reason res = cv->wait(*m, true, info); if (res == sema_wakeup_reason_success) return 0; else if (res == sema_wakeup_reason_timeout) return RL_ETIMEDOUT; else if (res == sema_wakeup_reason_spurious) return RL_EINTR; else return RL_EINVAL; } inline int rl_pthread_cond_wait(rl_pthread_cond_t* cv, rl_pthread_mutex_t* m, debug_info_param info) { sema_wakeup_reason res = cv->wait(*m, false, info); if (res == sema_wakeup_reason_success) return 0; else if (res == sema_wakeup_reason_spurious) return RL_EINTR; else return RL_EINVAL; } enum RL_FUTEX_OP { RL_FUTEX_WAIT, RL_FUTEX_WAKE, }; inline int rl_int_futex_impl(context& c, atomic* uaddr, int op, int val, struct timespec const* timeout, atomic* uaddr2, int val3, debug_info_param info) { (void)uaddr2; (void)val3; if (op == RL_FUTEX_WAIT) { c.sched(); c.atomic_thread_fence_seq_cst(); int v0; { preemption_disabler pd (c); v0 = uaddr->load(mo_acquire, info); } if (v0 != val) return RL_EWOULDBLOCK; unpark_reason reason = uaddr->wait(c, timeout != 0, true, info); if (reason == unpark_reason_normal) return 0; else if (reason == unpark_reason_timeout) return RL_ETIMEDOUT; else if (reason == unpark_reason_spurious) return RL_EINTR; RL_VERIFY(false); return RL_EINVAL; } else if (op == RL_FUTEX_WAKE) { if (val <= 0) return 0; c.sched(); c.atomic_thread_fence_seq_cst(); return uaddr->wake(c, val, info); } else { return RL_EINVAL; } } struct futex_event { void* addr_; int op_; int val_; bool timeout_; int res_; void output(std::ostream& s) const { s << "<" << std::hex << addr_ << std::dec << "> futex(" << (op_ == RL_FUTEX_WAIT ? "FUTEX_WAIT" : op_ == RL_FUTEX_WAKE ? "FUTEX_WAKE" : "UNSUPPORTED") << ", " << val_ << ", " << timeout_ << ") = "; if (op_ == RL_FUTEX_WAKE) s << res_; else s << (res_ == RL_EWOULDBLOCK ? "EWOULDBLOCK" : res_ == RL_ETIMEDOUT ? "ETIMEDOUT" : res_ == RL_EINTR ? "EINTR" : "UNKNOWN"); } }; inline int rl_futex(atomic* uaddr, int op, int val, struct timespec const* timeout, atomic* uaddr2, int val3, debug_info_param info) { context& c = ctx(); int res = rl_int_futex_impl(c, uaddr, op, val, timeout, uaddr2, val3, info); RL_HIST(futex_event) {uaddr, op, val, timeout != 0, res} RL_HIST_END(); return res; } } #ifdef EINVAL # undef EINVAL #endif #define EINVAL rl::RL_EINVAL #ifdef ETIMEDOUT # undef ETIMEDOUT #endif #define ETIMEDOUT rl::RL_ETIMEDOUT #ifdef EBUSY # undef EBUSY #endif #define EBUSY rl::RL_EBUSY #ifdef EINTR # undef EINTR #endif #define EINTR rl::RL_EINTR #ifdef EAGAIN # undef EAGAIN #endif #define EAGAIN rl::RL_EAGAIN #ifdef EWOULDBLOCK # undef EWOULDBLOCK #endif #define EWOULDBLOCK rl::RL_EWOULDBLOCK #define sched_yield() \ rl::rl_sched_yield($) #define pthread_yield() \ rl::rl_sched_yield($) #define pthread_t rl::rl_pthread_t #define pthread_attr_t rl::rl_pthread_attr_t #define pthread_create(th, attr, func, arg) \ rl::rl_pthread_create(th, attr, func, arg, $) #define pthread_join(th, res) \ rl::rl_pthread_join(th, res, $) #define sem_t rl::rl_sem_t #define sem_init(sema, pshared, initial_count)\ rl::rl_sem_init(sema, pshared, initial_count, $) #define sem_destroy(sema)\ rl::rl_sem_destroy(sema, $) #define sem_wait(sema)\ rl::rl_sem_wait(sema, $) #define sem_trywait(sema)\ rl::rl_sem_trywait(sema, $) #define sem_post(sema)\ rl::rl_sem_post(sema, $) #define sem_getvalue(sema, pvalue)\ rl::rl_sem_getvalue(sema, pvalue, $) #define pthread_mutex_t rl::rl_pthread_mutex_t #define pthread_mutexattr_t rl::rl_pthread_mutexattr_t #ifdef PTHREAD_MUTEX_NORMAL # undef PTHREAD_MUTEX_NORMAL # undef PTHREAD_MUTEX_ERRORCHECK # undef PTHREAD_MUTEX_RECURSIVE # undef PTHREAD_MUTEX_DEFAULT #endif #define PTHREAD_MUTEX_NORMAL rl::RL_PTHREAD_MUTEX_NORMAL #define PTHREAD_MUTEX_ERRORCHECK rl::RL_PTHREAD_MUTEX_ERRORCHECK #define PTHREAD_MUTEX_RECURSIVE rl::RL_PTHREAD_MUTEX_RECURSIVE #define PTHREAD_MUTEX_DEFAULT rl::RL_PTHREAD_MUTEX_DEFAULT #define pthread_mutexattr_init(attr) \ rl::rl_pthread_mutexattr_init(attr, $) #define pthread_mutexattr_destroy(attr) \ rl::rl_pthread_mutexattr_destroy(attr, $) #define pthread_mutexattr_settype(attr, type) \ rl::rl_pthread_mutexattr_settype(attr, type, $) #define pthread_mutex_init(m, attr) \ rl::rl_pthread_mutex_init(m, attr, $) #define pthread_mutex_destroy(m) \ rl::rl_pthread_mutex_destroy(m, $) #define pthread_mutex_lock(m) \ rl::rl_pthread_mutex_lock(m, $) #define pthread_mutex_timedlock(m, abs_timeout) \ rl::rl_pthread_mutex_timedlock(m, abs_timeout, $) #define pthread_mutex_try_lock(m) \ rl::rl_pthread_mutex_try_lock(m, $) #define pthread_mutex_unlock(m) \ rl::rl_pthread_mutex_unlock(m, $) #define pthread_rwlock_t rl::rl_pthread_rwlock_t #define pthread_rwlock_init(lock, attr) \ rl::rl_pthread_rwlock_init(lock, attr, $) #define pthread_rwlock_destroy(lock) \ rl::rl_pthread_rwlock_destroy(lock, $) #define pthread_rwlock_rdlock(lock) \ rl::rl_pthread_rwlock_rdlock(lock, $) #define pthread_rwlock_tryrdlock(lock) \ rl::rl_pthread_rwlock_tryrdlock(lock, $) #define pthread_rwlock_wrlock(lock) \ rl::rl_pthread_rwlock_wrlock(lock, $) #define pthread_rwlock_trywrlock(lock) \ rl::rl_pthread_rwlock_trywrlock(lock, $) #define pthread_rwlock_unlock(lock) \ rl::rl_pthread_rwlock_unlock(lock, $) #define pthread_cond_t rl::rl_pthread_cond_t #define pthread_condattr_t rl::rl_pthread_condattr_t #define pthread_cond_init(cv, condattr) \ rl::rl_pthread_cond_init(cv, condattr, $) #define pthread_cond_destroy(cv) \ rl::rl_pthread_cond_destroy(cv, $) #define pthread_cond_broadcast(cv) \ rl::rl_pthread_cond_broadcast(cv, $) #define pthread_cond_signal(cv) \ rl::rl_pthread_cond_signal(cv, $) #define pthread_cond_timedwait(cv, m, timespec) \ rl::rl_pthread_cond_timedwait(cv, m, timespec, $) #define pthread_cond_wait(cv, m) \ rl::rl_pthread_cond_wait(cv, m, $) #ifdef FUTEX_WAKE # undef FUTEX_WAKE #endif #define FUTEX_WAKE rl::RL_FUTEX_WAKE #ifdef FUTEX_WAIT # undef FUTEX_WAIT #endif #define FUTEX_WAIT rl::RL_FUTEX_WAIT #define futex(uaddr, op, val, timeout, uaddr2, val3) \ rl::rl_futex(uaddr, op, val, timeout, uaddr2, val3, $) #endif ================================================ FILE: tests/relacy/relacy/relacy/stdlib/semaphore.hpp ================================================ /* Relacy Race Detector * Copyright (c) 2008-2013, Dmitry S. Vyukov * All rights reserved. * This software is provided AS-IS with no warranty, either express or implied. * This software is distributed under a license and may not be copied, * modified or distributed except as expressly authorized under the * terms of the license contained in the file LICENSE in this distribution. */ #ifndef RL_SEMAPHORE_HPP #define RL_SEMAPHORE_HPP #ifdef _MSC_VER # pragma once #endif #include "../base.hpp" #include "../context_base.hpp" #include "../sync_var.hpp" #include "../waitset.hpp" #include "../signature.hpp" namespace rl { enum sema_wakeup_reason { sema_wakeup_reason_success, sema_wakeup_reason_failed, sema_wakeup_reason_timeout, sema_wakeup_reason_spurious, }; struct win_object { virtual void deinit(debug_info_param info) = 0; virtual ~win_object() {} }; struct win_waitable_object : win_object { virtual sema_wakeup_reason wait(bool try_wait, bool is_timed, debug_info_param info) = 0; virtual bool signal(debug_info_param info) = 0; virtual bool is_signaled(debug_info_param info) = 0; virtual void memory_acquire(debug_info_param info) = 0; virtual void* prepare_wait(debug_info_param info) = 0; }; struct sema_data { virtual sema_wakeup_reason wait(bool try_wait, bool is_timed, debug_info_param info) = 0; virtual bool post(unsigned count, unsigned& prev_count, debug_info_param info) = 0; virtual int get_value(debug_info_param info) = 0; virtual bool is_signaled(debug_info_param info) = 0; virtual void memory_acquire(debug_info_param info) = 0; virtual void* prepare_wait(debug_info_param info) = 0; virtual ~sema_data() {} // just to calm down gcc }; template class sema_data_impl : public sema_data { public: sema_data_impl(bool spurious_wakeups, unsigned initial_count, unsigned max_count) : spurious_wakeups_(spurious_wakeups) , count_(initial_count) , max_count_(max_count) { RL_VERIFY(max_count <= INT_MAX); } ~sema_data_impl() { //!!! detect destruction with waiters } struct wait_event { sema_data_impl* addr_; bool try_wait_; bool is_timed_; unsigned count_; sema_wakeup_reason reason_; void output(std::ostream& s) const { s << "<" << std::hex << addr_ << std::dec << "> semaphore: "; if (try_wait_) s << "try_wait "; else if (is_timed_) s << "timed wait "; else s << "wait "; if (reason_ == sema_wakeup_reason_success) s << "succeeded "; else if (reason_ == sema_wakeup_reason_failed) s << "failed "; else if (reason_ == sema_wakeup_reason_timeout) s << "timed out "; else if (reason_ == sema_wakeup_reason_spurious) s << "spuriously failed "; s << "new_count=" << count_; } }; struct post_event { sema_data_impl* addr_; unsigned value_; unsigned count_; bool result_; thread_id_t unblocked_; void output(std::ostream& s) const { s << "<" << std::hex << addr_ << std::dec << "> semaphore: "; if (result_) s << "post "; else s << "post FAILED "; s << "value=" << value_; s << " new_count=" << count_; s << " unblocked=" << unblocked_; } }; struct get_value_event { sema_data_impl* addr_; unsigned count_; void output(std::ostream& s) const { s << "<" << std::hex << addr_ << std::dec << "> semaphore: "; s << "get_value count=" << count_; } }; virtual sema_wakeup_reason wait(bool try_wait, bool is_timed, debug_info_param info) { context& c = ctx(); c.sched(); sign_.check(info); sema_wakeup_reason reason = sema_wakeup_reason_success; for (;;) { if (count_) { count_ -= 1; sync_.acq_rel(c.threadx_); reason = sema_wakeup_reason_success; break; } if (try_wait) { sync_.acquire(c.threadx_); reason = sema_wakeup_reason_failed; break; } unpark_reason wr = ws_.park_current(c, is_timed, spurious_wakeups_, true, info); if (unpark_reason_timeout == wr) { RL_VERIFY(is_timed); sync_.acquire(c.threadx_); reason = sema_wakeup_reason_timeout; break; } else if (unpark_reason_spurious == wr) { RL_VERIFY(spurious_wakeups_); sync_.acquire(c.threadx_); reason = sema_wakeup_reason_spurious; break; } else if (unpark_reason_normal == wr) { RL_VERIFY(count_ > 0); count_ -= 1; sync_.acq_rel(c.threadx_); c.switch_back(info); reason = sema_wakeup_reason_success; break; } RL_VERIFY(false); } RL_HIST(wait_event) {this, try_wait, is_timed, count_, reason} RL_HIST_END(); return reason; } virtual bool post(unsigned count, unsigned& prev_count, debug_info_param info) { context& c = ctx(); c.sched(); sign_.check(info); bool result = false; prev_count = count_; thread_id_t unblocked = 0; if (false == (count >= INT_MAX || count + count_ > max_count_)) { result = true; count_ += count; sync_.acq_rel(c.threadx_); for (unsigned i = 0; i != count; ++i) { if (false == ws_.unpark_one(c, info)) break; unblocked += 1; } } else { sync_.acquire(c.threadx_); } RL_HIST(post_event) {this, count, count_, result, unblocked} RL_HIST_END(); return result; } virtual int get_value(debug_info_param info) { context& c = ctx(); c.sched(); sign_.check(info); RL_VERIFY(count_ <= INT_MAX); int result = (int)count_ - ws_.size(); sync_.acquire(c.threadx_); RL_HIST(get_value_event) {this, (unsigned)result} RL_HIST_END(); return result; } private: signature<0xaabb6634> sign_; bool const spurious_wakeups_; unsigned count_; unsigned const max_count_; waitset ws_; sync_var sync_; virtual bool is_signaled(debug_info_param info) { (void)info; return count_ > 0; } virtual void memory_acquire(debug_info_param info) { (void)info; sync_.acquire(ctx().threadx_); } virtual void* prepare_wait(debug_info_param info) { (void)info; return &ws_; } RL_NOCOPY(sema_data_impl); }; template class semaphore : public win_waitable_object { public: semaphore() : impl_() { } semaphore(semaphore const&) : impl_() { } semaphore& operator = (semaphore const&) { return *this; } void init(bool spurious_wakeups, unsigned initial_count, unsigned max_count, debug_info_param info) { context& c = ctx(); RL_ASSERT_IMPL(0 == impl_, test_result_double_initialization_of_semaphore, "", info); sign_.check(info); impl_ = c.sema_ctor(spurious_wakeups, initial_count, max_count); } void deinit(debug_info_param info) { context& c = ctx(); check(info); c.sema_dtor(impl_); impl_ = 0; } virtual sema_wakeup_reason wait(bool try_wait, bool is_timed, debug_info_param info) { check(info); return impl_->wait(try_wait, is_timed, info); } virtual bool signal(debug_info_param info) { unsigned prev_count = 0; return post(1, prev_count, info); } bool post(unsigned count, unsigned& prev_count, debug_info_param info) { check(info); return impl_->post(count, prev_count, info); } int get_value(debug_info_param info) { check(info); return impl_->get_value(info); } private: sema_data* impl_; signature<0x228855dd> sign_; sema_data* check(debug_info_param info) { RL_ASSERT_IMPL(impl_, test_result_usage_of_non_initialized_semaphore, "", info); sign_.check(info); return impl_; } virtual bool is_signaled(debug_info_param info) { return check(info)->is_signaled(info); } virtual void memory_acquire(debug_info_param info) { check(info)->memory_acquire(info); } virtual void* prepare_wait(debug_info_param info) { return check(info)->prepare_wait(info); } }; struct wfmo_event { unsigned long count_; bool wait_all_; bool try_wait_; bool is_timed_; sema_wakeup_reason result_; size_t signaled_; void output(std::ostream& s) const { s << "WFMO: " << "count=" << count_ << ", wait_all=" << wait_all_ << ", try_wait=" << try_wait_ << ", is_timed=" << is_timed_ << ", result="; if (sema_wakeup_reason_success == result_) { s << "success"; if (wait_all_ == false) s << ", object=" << signaled_; } else { s << "timeout"; } } }; size_t const wfmo_max_objects = 32; inline sema_wakeup_reason wait_for_multiple_objects( size_t& signaled, size_t count, win_waitable_object** wo, bool wait_all, bool try_wait, bool is_timed, debug_info_param info) { context& c = ctx(); c.sched(); RL_VERIFY(count <= wfmo_max_objects); void* ws [wfmo_max_objects]; sema_wakeup_reason result = sema_wakeup_reason_failed; signaled = 0; if (wait_all) { for (;;) { unsigned long i = 0; for (i = 0; i != count; ++i) { if (false == wo[i]->is_signaled(info)) break; } if (i == count) { preemption_disabler pd (c); for (i = 0; i != count; ++i) { sema_wakeup_reason r = wo[i]->wait(true, false, info); RL_VERIFY(r == sema_wakeup_reason_success); (void)r; } result = sema_wakeup_reason_success; break; } else if (try_wait) { for (i = 0; i != count; ++i) wo[i]->memory_acquire(info); result = sema_wakeup_reason_timeout; break; } else { for (i = 0; i != count; ++i) { ws[i] = wo[i]->prepare_wait(info); } unpark_reason reason = c.wfmo_park(ws, wo, (unsigned)count, !!wait_all, is_timed, info); RL_VERIFY(unpark_reason_spurious != reason); if (unpark_reason_timeout == reason) { for (i = 0; i != count; ++i) wo[i]->memory_acquire(info); result = sema_wakeup_reason_timeout; break; } else if (unpark_reason_normal == reason) { { preemption_disabler pd (c); for (unsigned long i = 0; i != count; ++i) { RL_VERIFY(wo[i]->is_signaled(info)); sema_wakeup_reason r = wo[i]->wait(true, false, info); RL_VERIFY(r == sema_wakeup_reason_success); (void)r; } } c.switch_back(info); result = sema_wakeup_reason_success; break; } RL_VERIFY(false); } } } else { for (;;) { unsigned long i = 0; for (i = 0; i != count; ++i) { if (true == wo[i]->is_signaled(info)) break; } if (i != count) { preemption_disabler pd (c); sema_wakeup_reason r = wo[i]->wait(true, false, info); RL_VERIFY(r == sema_wakeup_reason_success); (void)r; signaled = i; result = sema_wakeup_reason_success; break; } else if (try_wait) { for (i = 0; i != count; ++i) wo[i]->memory_acquire(info); result = sema_wakeup_reason_timeout; break; } else { for (i = 0; i != count; ++i) { ws[i] = wo[i]->prepare_wait(info); } unpark_reason reason = c.wfmo_park(ws, wo, (unsigned)count, !!wait_all, is_timed, info); RL_VERIFY(unpark_reason_spurious != reason); if (unpark_reason_timeout == reason) { for (i = 0; i != count; ++i) wo[i]->memory_acquire(info); result = sema_wakeup_reason_timeout; break; } else if (unpark_reason_normal == reason) { unsigned long i = 0; for (i = 0; i != count; ++i) { if (true == wo[i]->is_signaled(info)) break; } RL_VERIFY(i != count); { preemption_disabler pd (c); sema_wakeup_reason r = wo[i]->wait(true, false, info); RL_VERIFY(r == sema_wakeup_reason_success); (void)r; } c.switch_back(info); signaled = i; result = sema_wakeup_reason_success; break; } RL_VERIFY(false); } } } RL_HIST(wfmo_event) {(unsigned)count, wait_all, try_wait, is_timed, result, signaled} RL_HIST_END(); return result; } } #endif ================================================ FILE: tests/relacy/relacy/relacy/stdlib/windows.hpp ================================================ /* Relacy Race Detector * Copyright (c) 2008-2010, Dmitry S. Vyukov * All rights reserved. * This software is provided AS-IS with no warranty, either express or implied. * This software is distributed under a license and may not be copied, * modified or distributed except as expressly authorized under the * terms of the license contained in the file LICENSE.TXT in this distribution. */ #ifndef RL_WINDOWS_HPP #define RL_WINDOWS_HPP #ifdef _MSC_VER # pragma once #endif #include "mutex.hpp" #include "condition_variable.hpp" #include "semaphore.hpp" #include "event.hpp" namespace rl { typedef win_object* rl_HANDLE; unsigned long const rl_INFINITE = (unsigned long)-1; unsigned long const rl_WAIT_FAILED = (unsigned long)-1; unsigned long const rl_WAIT_OBJECT_0 = 100; unsigned long const rl_WAIT_TIMEOUT = 1; unsigned long const rl_WAIT_IO_COMPLETION = 2; unsigned long const rl_MAXIMUM_WAIT_OBJECTS = wfmo_max_objects; inline int rl_SwitchToThread(debug_info_param info) { yield(1, info); return 1; } inline void rl_Sleep(unsigned long milliseconds, debug_info_param info) { yield(milliseconds ? milliseconds : 1, info); } inline unsigned long rl_WaitForSingleObjectEx(rl_HANDLE obj, unsigned long timeout, int alertable, debug_info_param info) { (void)alertable; //!!! not yet supported support it! //!!! support WAIT_IO_COMPLETION RL_VERIFY(false == alertable && "Alertable wait is not supported in WaitForSingleObject() yet"); bool try_wait = (timeout == 0); bool is_timed = (timeout != rl_INFINITE); sema_wakeup_reason reason = static_cast(obj)->wait(try_wait, is_timed, info); if (reason == sema_wakeup_reason_success) return rl_WAIT_OBJECT_0; else if (reason == sema_wakeup_reason_timeout) return rl_WAIT_TIMEOUT; else if (reason == sema_wakeup_reason_failed) return rl_WAIT_TIMEOUT; RL_VERIFY(false); return rl_WAIT_FAILED; } inline unsigned long rl_WaitForSingleObject(rl_HANDLE obj, unsigned long timeout, debug_info_param info) { return rl_WaitForSingleObjectEx(obj, timeout, 0, info); } inline unsigned long rl_WaitForMultipleObjectsEx(unsigned long count, rl_HANDLE* objects, int wait_all, unsigned long timeout, int alertable, debug_info_param info) { (void)alertable; //!!! //!!! support WAIT_IO_COMPLETION RL_VERIFY(false == alertable && "Alertable wait is not supported in WaitForMultipleObjects() yet"); bool try_wait = (timeout == 0); bool is_timed = (timeout != rl_INFINITE); win_waitable_object** obj = reinterpret_cast(objects); size_t signaled = 0; sema_wakeup_reason reason = wait_for_multiple_objects(signaled, count, obj, !!wait_all, try_wait, is_timed, info); if (reason == sema_wakeup_reason_success) return rl_WAIT_OBJECT_0 + (int)signaled; else if (reason == sema_wakeup_reason_timeout) return rl_WAIT_TIMEOUT; RL_VERIFY(false); return rl_WAIT_FAILED; } inline unsigned long rl_WaitForMultipleObjects(unsigned long count, rl_HANDLE* objects, int wait_all, unsigned long timeout, debug_info_param info) { return rl_WaitForMultipleObjectsEx(count, objects, wait_all, timeout, 0, info); } inline unsigned long rl_SignalObjectAndWait(rl_HANDLE obj_to_signal, rl_HANDLE obj_to_wait, unsigned long timeout, int alertable, debug_info_param info) { bool result = static_cast(obj_to_signal)->signal(info); if (false == result) return result ? 1 : 0; preemption_disabler pd (ctx()); return rl_WaitForSingleObjectEx(obj_to_wait, timeout, alertable, info); } struct sem_tag_win; inline rl_HANDLE rl_CreateSemaphore(void* /*security*/, long initial_count, long max_count, void const* /*name*/, debug_info_param info) { void* mem = ctx().alloc(sizeof(semaphore), false, info); semaphore* sema = new (mem) semaphore; sema->init(false, initial_count, max_count, info); return sema; } inline int rl_CloseHandle(rl_HANDLE h, debug_info_param info) { h->deinit(info); h->~win_object(); (ctx().free)(h, false, info); //!!! rename free because of the define return 1; } inline int rl_ReleaseSemaphore(rl_HANDLE sema, long count, long* prev_count, debug_info_param info) { unsigned prev = 0; bool result = static_cast*>(sema)->post(count, prev, info); if (prev_count) prev_count[0] = prev; return result ? 1 : 0; } inline rl_HANDLE rl_CreateEvent(void* /*security*/, int manual_reset, int initial_state, void const* /*name*/, debug_info_param info) { void* mem = ctx().alloc(sizeof(generic_event), false, info); generic_event* ev = new (mem) generic_event; ev->init(!!manual_reset, !!initial_state, info); return ev; } inline int rl_SetEvent(rl_HANDLE ev, debug_info_param info) { static_cast(ev)->set(info); return 1; } inline int rl_ResetEvent(rl_HANDLE ev, debug_info_param info) { static_cast(ev)->reset(info); return 1; } inline int rl_PulseEvent(rl_HANDLE ev, debug_info_param info) { static_cast(ev)->pulse(info); return 1; } struct mutex_tag_win_cs; typedef generic_mutex rl_CRITICAL_SECTION; inline void rl_InitializeCriticalSection(rl_CRITICAL_SECTION* m, debug_info_param info) { m->init(false, true, false, false, info); } inline int rl_InitializeCriticalSectionAndSpinCount(rl_CRITICAL_SECTION* m, unsigned long spin_count, debug_info_param info) { (void)spin_count; m->init(false, true, false, false, info); return 1; } inline int rl_InitializeCriticalSectionEx(rl_CRITICAL_SECTION* m, unsigned long spin_count, unsigned long flags, debug_info_param info) { (void)spin_count; (void)flags; m->init(false, true, false, false, info); return 1; } inline void rl_DeleteCriticalSection(rl_CRITICAL_SECTION* m, debug_info_param info) { m->deinit(info); } inline void rl_EnterCriticalSection(rl_CRITICAL_SECTION* m, debug_info_param info) { m->lock_exclusive(info); } inline int rl_TryEnterCriticalSection(rl_CRITICAL_SECTION* m, debug_info_param info) { return m->try_lock_exclusive(info) ? 1 : 0; } inline void rl_LeaveCriticalSection(rl_CRITICAL_SECTION* m, debug_info_param info) { m->unlock_exclusive(info); } struct mutex_tag_win_srwl; typedef generic_mutex rl_SRWLOCK; inline void rl_InitializeSRWLock(rl_SRWLOCK* lock, debug_info_param info) { lock->init(true, false, false, false, info); } inline void rl_AcquireSRWLockExclusive(rl_SRWLOCK* lock, debug_info_param info) { lock->lock_exclusive(info); } inline void rl_AcquireSRWLockShared(rl_SRWLOCK* lock, debug_info_param info) { lock->lock_shared(info); } inline void rl_ReleaseSRWLockExclusive(rl_SRWLOCK* lock, debug_info_param info) { lock->unlock_exclusive(info); } inline void rl_ReleaseSRWLockShared(rl_SRWLOCK* lock, debug_info_param info) { lock->unlock_shared(info); } //!!! inline void rl_DeleteSRWLock(rl_SRWLOCK* lock, debug_info_param info) { lock->deinit(info); } struct mutex_tag_win_mutex; typedef generic_mutex rl_win_mutex; inline rl_HANDLE rl_CreateMutex(void* /*security*/, int initial_owner, void const* /*name*/, debug_info_param info) { void* mem = ctx().alloc(sizeof(rl_win_mutex), false, info); rl_win_mutex* mtx = new (mem) rl_win_mutex (); mtx->init(false, true, false, false, info); if (initial_owner) mtx->lock_exclusive(info); return mtx; } inline int rl_ReleaseMutex(rl_HANDLE mtx, debug_info_param info) { static_cast(mtx)->unlock_exclusive(info); return 1; } struct condvar_tag_win; typedef condvar rl_CONDITION_VARIABLE; unsigned long const rl_CONDITION_VARIABLE_LOCKMODE_SHARED = 1; inline void rl_InitializeConditionVariable(rl_CONDITION_VARIABLE* cv, debug_info_param info) { cv->init(false, info); } inline int rl_SleepConditionVariableCS(rl_CONDITION_VARIABLE* cv, rl_CRITICAL_SECTION* cs, unsigned long ms, debug_info_param info) { cv->wait(*cs, ms != rl_INFINITE, info); return 0; } inline int rl_SleepConditionVariableSRW(rl_CONDITION_VARIABLE* cv, rl_SRWLOCK* lock, unsigned long ms, unsigned long flags, debug_info_param info) { //!!! CONDITION_VARIABLE_LOCKMODE_SHARED (void)flags; cv->wait(*lock, ms != rl_INFINITE, info); return 0; } inline void rl_WakeAllConditionVariable(rl_CONDITION_VARIABLE* cv, debug_info_param info) { cv->notify_all(info); } inline void rl_WakeConditionVariable(rl_CONDITION_VARIABLE* cv, debug_info_param info) { cv->notify_one(info); } inline void rl_DeleteConditionVariable(rl_CONDITION_VARIABLE* cv, debug_info_param info) { cv->deinit(info); } typedef unsigned long (RL_STDCALL *rl_WIN_START_ROUTINE)(void* param); typedef unsigned (RL_STDCALL *rl_MSVCR_THREAD_ROUTINE)(void* param); template struct win32_thread_helper { thread_fn_t fn; void* param; static void* thread(void* p) { win32_thread_helper* self = (win32_thread_helper*)p; void* result = (void*)(uintptr_t)(self->fn(self->param)); delete_impl(self, $); return result; } }; inline rl_HANDLE rl_CreateThread(void* security, unsigned stack_size, rl_WIN_START_ROUTINE fn, void* param, unsigned long creation_flags, unsigned long* thread_id, debug_info_param info) { (void)security; (void)stack_size; (void)creation_flags; (void)thread_id; void* mem = ctx().alloc(sizeof(win32_thread_helper), false, info); win32_thread_helper* arg = new (mem) win32_thread_helper; arg->fn = fn; arg->param = param; win_waitable_object* handle = ctx().create_thread(&win32_thread_helper::thread, arg); return handle; } inline uintptr_t rl_beginthreadex(void *security, unsigned stack_size, rl_MSVCR_THREAD_ROUTINE start_address, void *arglist, unsigned initflag, unsigned* thrdaddr, debug_info_param info) { (void)security; (void)stack_size; (void)initflag; (void)thrdaddr; void* mem = ctx().alloc(sizeof(win32_thread_helper), false, info); win32_thread_helper* arg = new (mem) win32_thread_helper; arg->fn = start_address; arg->param = arglist; win_waitable_object* handle = ctx().create_thread(&win32_thread_helper::thread, arg); return (uintptr_t)handle; } inline unsigned long rl_SetThreadAffinityMask(rl_HANDLE th, unsigned long affinity_mask, debug_info_param info) { (void)(th); (void)(affinity_mask); (void)info; return 0; } inline int rl_SuspendThread(rl_HANDLE th, debug_info_param info) { (void)th; (void)info; return 1; } inline int rl_ResumeThread(rl_HANDLE th, debug_info_param info) { (void)th; (void)info; return 1; } inline unsigned long GetLastError() { return (unsigned long)get_errno(); } inline void SetLastError(unsigned long value) { set_errno((int)value); } inline void rl_FlushProcessWriteBuffers(debug_info_param info) { systemwide_fence(info); } } #ifdef HANDLE # undef HANDLE #endif #define HANDLE rl::rl_HANDLE #ifdef INFINITE # undef INFINITE #endif #define INFINITE rl::rl_INFINITE #ifdef WAIT_FAILED # undef WAIT_FAILED #endif #define WAIT_FAILED rl::rl_WAIT_FAILED #ifdef WAIT_OBJECT_0 # undef WAIT_OBJECT_0 #endif #define WAIT_OBJECT_0 rl::rl_WAIT_OBJECT_0 #ifdef WAIT_TIMEOUT # undef WAIT_TIMEOUT #endif #define WAIT_TIMEOUT rl::rl_WAIT_TIMEOUT #ifdef WAIT_IO_COMPLETION # undef WAIT_IO_COMPLETION #endif #define WAIT_IO_COMPLETION rl::rl_WAIT_IO_COMPLETION #ifdef MAXIMUM_WAIT_OBJECTS # undef MAXIMUM_WAIT_OBJECTS #endif #define MAXIMUM_WAIT_OBJECTS rl::rl_MAXIMUM_WAIT_OBJECTS #define SwitchToThread() \ rl::rl_SwitchToThread($) #define Sleep(milliseconds) \ rl::rl_Sleep(milliseconds, $) #define CloseHandle(obj) \ rl::rl_CloseHandle(obj, $) #define WaitForSingleObject(obj, timeout) \ rl::rl_WaitForSingleObject(obj, timeout, $) #define WaitForMultipleObjects(count, objects, wait_all, timeout) \ rl::rl_WaitForMultipleObjects(count, objects, wait_all, timeout, $) #define WaitForMultipleObjectsEx(count, objects, wait_all, timeout, alertable)] \ rl::rl_WaitForMultipleObjectsEx(count, objects, wait_all, timeout, alertable, $) #define SignalObjectAndWait(obj_to_signal, obj_to_wait, timeout, alertable) \ rl::rl_SignalObjectAndWait(obj_to_signal, obj_to_wait, timeout, alertable, $) #ifdef CreateSemaphore # undef CreateSemaphore #endif #ifdef CreateSemaphore # undef ReleaseSemaphore #endif #define CreateSemaphoreA rl_CreateSemaphore #define CreateSemaphoreW rl_CreateSemaphore #define CreateSemaphore rl_CreateSemaphore #define rl_CreateSemaphore(security, initial_count, max_count, name) \ rl::rl_CreateSemaphore(security, initial_count, max_count, name, $)\ #define ReleaseSemaphore(sema, count, prev_count) \ rl::rl_ReleaseSemaphore(sema, count, prev_count, $) #ifdef CreateEvent # undef CreateEvent #endif #define CreateEventA rl_CreateEvent #define CreateEventW rl_CreateEvent #define CreateEvent rl_CreateEvent #define rl_CreateEvent(security, manual_reset, initial_state, name)\ rl::rl_CreateEvent(security, manual_reset, initial_state, name, $) #define SetEvent(ev)\ rl::rl_SetEvent(ev, $) #define ResetEvent(ev)\ rl::rl_ResetEvent(ev, $) #define PulseEvent(ev)\ rl::rl_PulseEvent(ev, $) #ifdef CreateMutex # undef CreateMutex #endif #define CreateMutexA rl_CreateMutex #define CreateMutexW rl_CreateMutex #define CreateMutex rl_CreateMutex #define rl_CreateMutex(security, initial_owner, name)\ rl::rl_CreateMutex(security, initial_owner, name, $) #define ReleaseMutex(mtx)\ rl::rl_ReleaseMutex(mtx, $) #define CRITICAL_SECTION rl::rl_CRITICAL_SECTION #define InitializeCriticalSection(cs) \ rl::rl_InitializeCriticalSection(cs, $) #define InitializeCriticalSectionAndSpinCount(cs, spin) \ rl::rl_InitializeCriticalSectionAndSpinCount(cs, spin, $) #define InitializeCriticalSectionEx(cs, spin, flags) \ rl::rl_InitializeCriticalSectionEx(cs, spin, flags, $) #define DeleteCriticalSection(cs) \ rl::rl_DeleteCriticalSection(cs, $) #define EnterCriticalSection(cs) \ rl::rl_EnterCriticalSection(cs, $) #define TryEnterCriticalSection(cs) \ rl::rl_TryEnterCriticalSection(cs, $) #define LeaveCriticalSection(cs) \ rl::rl_LeaveCriticalSection(cs, $) #define SRWLOCK rl::rl_SRWLOCK #define InitializeSRWLock(lock) \ rl::rl_InitializeSRWLock(lock, $) #define AcquireSRWLockExclusive(lock) \ rl::rl_AcquireSRWLockExclusive(lock, $) #define AcquireSRWLockShared(lock) \ rl::rl_AcquireSRWLockShared(lock, $) #define ReleaseSRWLockExclusive(lock) \ rl::rl_ReleaseSRWLockExclusive(lock, $) #define ReleaseSRWLockShared(lock) \ rl::rl_ReleaseSRWLockShared(lock, $) //!!! no such function in WIN API #define DeleteSRWLock(lock) \ rl::rl_DeleteSRWLock(lock, $) #define CONDITION_VARIABLE rl::rl_CONDITION_VARIABLE #ifdef CONDITION_VARIABLE_LOCKMODE_SHARED # undef CONDITION_VARIABLE_LOCKMODE_SHARED #endif #define CONDITION_VARIABLE_LOCKMODE_SHARED rl::rl_CONDITION_VARIABLE_LOCKMODE_SHARED #define InitializeConditionVariable(cv) \ rl::rl_InitializeConditionVariable(cv, $) #define SleepConditionVariableCS(cv, cs, ms) \ rl::rl_SleepConditionVariableCS(cv, cs, ms, $) #define SleepConditionVariableSRW(cv, lock, ms, flags) \ rl::rl_SleepConditionVariableSRW(cv, lock, ms, flags, $) #define WakeAllConditionVariable(cv) \ rl::rl_WakeAllConditionVariable(cv, $) #define WakeConditionVariable(cv) \ rl::rl_WakeConditionVariable(cv, $) //!!! no such function in WIN API #define DeleteConditionVariable(cv) \ rl::rl_DeleteConditionVariable(cv, $) #define CreateThread(security, stack_size, fn, param, creation_flags, thread_id) \ rl::rl_CreateThread(security, stack_size, fn, param, creation_flags, thread_id, $) #define _beginthreadex(security, stack_size, start_address, arglist, initflag, thrdaddr) \ rl::rl_beginthreadex(security, stack_size, start_address, arglist, initflag, thrdaddr, $) #define SetThreadAffinityMask(th, affinity_mask) \ rl::rl_SetThreadAffinityMask(th, affinity_mask, $) #define SuspendThread(th) \ rl::rl_SuspendThread(th, $) #define ResumeThread(th) \ rl::rl_ResumeThread(th, $) #define FlushProcessWriteBuffers() \ rl::rl_FlushProcessWriteBuffers($) #endif ================================================ FILE: tests/relacy/relacy/relacy/sync_var.hpp ================================================ /* Relacy Race Detector * Copyright (c) 2008-2013, Dmitry S. Vyukov * All rights reserved. * This software is provided AS-IS with no warranty, either express or implied. * This software is distributed under a license and may not be copied, * modified or distributed except as expressly authorized under the * terms of the license contained in the file LICENSE in this distribution. */ #ifndef RL_SYNC_VAR_HPP #define RL_SYNC_VAR_HPP #ifdef _MSC_VER # pragma once #endif #include "base.hpp" #include "foreach.hpp" namespace rl { template class sync_var : nocopy<> { public: sync_var() { iteration_begin(); } void iteration_begin() { foreach(order_, &assign_zero); } void acquire(thread_info_base* th) { th->own_acq_rel_order_ += 1; foreach(th->acq_rel_order_, order_, &assign_max); } void release(thread_info_base* th) { th->own_acq_rel_order_ += 1; foreach(order_, th->acq_rel_order_, &assign_max); } void acq_rel(thread_info_base* th) { th->own_acq_rel_order_ += 1; timestamp_t* acq_rel_order = th->acq_rel_order_; timestamp_t* order = order_; foreach(acq_rel_order, order, &assign_max); foreach(order, acq_rel_order, &assign_max); } private: timestamp_t order_ [thread_count]; }; } #endif ================================================ FILE: tests/relacy/relacy/relacy/test_params.hpp ================================================ /* Relacy Race Detector * Copyright (c) 2008-2013, Dmitry S. Vyukov * All rights reserved. * This software is provided AS-IS with no warranty, either express or implied. * This software is distributed under a license and may not be copied, * modified or distributed except as expressly authorized under the * terms of the license contained in the file LICENSE in this distribution. */ #ifndef RL_TEST_PARAMS_HPP #define RL_TEST_PARAMS_HPP #ifdef _MSC_VER # pragma once #endif #include "base.hpp" #include "test_result.hpp" namespace rl { enum scheduler_type_e { sched_random, sched_bound, sched_full, sched_count, random_scheduler_type = sched_random, fair_context_bound_scheduler_type = sched_bound, fair_full_search_scheduler_type = sched_full, scheduler_type_count }; inline char const* format(scheduler_type_e t) { switch (t) { case sched_random: return "random scheduler"; case sched_bound: return "context bound scheduler"; case sched_full: return "full search scheduler"; default: break; } RL_VERIFY(false); throw std::logic_error("invalid scheduler type"); } struct test_params { // input params iteration_t iteration_count; std::ostream* output_stream; std::ostream* progress_stream; unsigned progress_output_period; bool collect_history; bool output_history; scheduler_type_e search_type; unsigned context_bound; unsigned execution_depth_limit; string initial_state; // output params test_result_e test_result; iteration_t stop_iteration; string test_name; string final_state; test_params() { iteration_count = 1000; output_stream = &std::cout; progress_stream = &std::cout; progress_output_period = 3; collect_history = false; output_history = false; search_type = random_scheduler_type; context_bound = 1; execution_depth_limit = 2000; test_result = test_result_success; stop_iteration = 0; } }; } #endif ================================================ FILE: tests/relacy/relacy/relacy/test_result.hpp ================================================ /* Relacy Race Detector * Copyright (c) 2008-2013, Dmitry S. Vyukov * All rights reserved. * This software is provided AS-IS with no warranty, either express or implied. * This software is distributed under a license and may not be copied, * modified or distributed except as expressly authorized under the * terms of the license contained in the file LICENSE in this distribution. */ #ifndef RL_TEST_RESULT_HPP #define RL_TEST_RESULT_HPP #ifdef _MSC_VER # pragma once #endif #include "base.hpp" namespace rl { enum test_result_e { test_result_success, test_result_until_condition_hit, test_result_inconsistent_test_suite, test_result_user_assert_failed, test_result_user_invariant_failed, test_result_data_race, test_result_access_to_freed_memory, test_result_double_free, test_result_memory_leak, test_result_resource_leak, test_result_unitialized_access, test_result_deadlock, test_result_livelock, // mutex test_result_recursion_on_nonrecursive_mutex, test_result_unlocking_mutex_wo_ownership, test_result_destroying_owned_mutex, test_result_double_initialization_of_mutex, test_result_usage_of_non_initialized_mutex, test_result_mutex_write_to_read_upgrade, test_result_mutex_read_to_write_upgrade, //condvar test_result_double_initialization_of_condvar, test_result_usage_of_non_initialized_condvar, //semaphore test_result_double_initialization_of_semaphore, test_result_usage_of_non_initialized_semaphore, //event test_result_double_initialization_of_event, test_result_usage_of_non_initialized_event, //dynamic thread test_result_thread_signal, }; inline char const* test_result_str(test_result_e r) { switch (r) { case test_result_success: return "SUCCESS"; case test_result_until_condition_hit: return "UNTIL CONDITION HIT"; case test_result_inconsistent_test_suite: return "INCONSISTENT TEST SUITE"; case test_result_user_assert_failed: return "USER ASSERT FAILED"; case test_result_user_invariant_failed: return "USER INVARIANT FAILED"; case test_result_data_race: return "DATA RACE"; case test_result_access_to_freed_memory: return "ACCESS TO FREED MEMORY"; case test_result_double_free: return "DOUBLE FREE"; case test_result_memory_leak: return "MEMORY LEAK"; case test_result_resource_leak: return "RESOURCE LEAK"; case test_result_unitialized_access: return "ACCESS TO UNINITIALIZED VARIABLE"; case test_result_deadlock: return "DEADLOCK"; case test_result_livelock: return "LIVELOCK"; // mutex case test_result_recursion_on_nonrecursive_mutex: return "RECURSION ON NON-RECURSIVE MUTEX"; case test_result_unlocking_mutex_wo_ownership: return "UNLOCKING MUTEX W/O OWNERSHIP"; case test_result_destroying_owned_mutex: return "DESTROYING OWNED MUTEX"; case test_result_double_initialization_of_mutex: return "DOUBLE INITIALIZATION OF MUTEX"; case test_result_usage_of_non_initialized_mutex: return "USAGE OF NON INITIALIZED MUTEX"; case test_result_mutex_write_to_read_upgrade: return "ATTEMPT TO UPGRADE EXCLUSIVE MUTEX OWNERSHIP TO SHARED"; case test_result_mutex_read_to_write_upgrade: return "ATTEMPT TO UPGRADE SHARED MUTEX OWNERSHIP TO EXCLUSIVE"; // condvar case test_result_double_initialization_of_condvar: return "DOUBLE INITIALIZATION OF CONDITION VARIABLE"; case test_result_usage_of_non_initialized_condvar: return "USAGE OF NON INITIALIZED CONDITION VARIABLE"; // semaphore case test_result_double_initialization_of_semaphore: return "DOUBLE INITIALIZATION OF SEMAPHORE"; case test_result_usage_of_non_initialized_semaphore: return "USAGE OF NON INITIALIZED SEMAPHORE"; // event case test_result_double_initialization_of_event: return "DOUBLE INITIALIZATION OF EVENT"; case test_result_usage_of_non_initialized_event: return "USAGE OF NON INITIALIZED EVENT"; default: RL_VERIFY(false); return "UNKNOWN ERROR"; } } } #endif ================================================ FILE: tests/relacy/relacy/relacy/test_suite.hpp ================================================ /* Relacy Race Detector * Copyright (c) 2008-2013, Dmitry S. Vyukov * All rights reserved. * This software is provided AS-IS with no warranty, either express or implied. * This software is distributed under a license and may not be copied, * modified or distributed except as expressly authorized under the * terms of the license contained in the file LICENSE in this distribution. */ #ifndef RL_TEST_SUITE_HPP #define RL_TEST_SUITE_HPP #ifdef _MSC_VER # pragma once #endif #include "base.hpp" #include "test_result.hpp" namespace rl { template< typename derived_t, thread_id_t static_thread_count_param, test_result_e result = test_result_success> struct test_suite : nocopy<> { static thread_id_t const dynamic_thread_count = 0; struct params { static thread_id_t const static_thread_count = static_thread_count_param; static thread_id_t const dynamic_thread_count = derived_t::dynamic_thread_count; static thread_id_t const thread_count = static_thread_count + dynamic_thread_count; static test_result_e const expected_result = result; }; void invariant() {} void before() {} void after() {} }; } #endif ================================================ FILE: tests/relacy/relacy/relacy/thread.hpp ================================================ /* Relacy Race Detector * Copyright (c) 2008-2013, Dmitry S. Vyukov * All rights reserved. * This software is provided AS-IS with no warranty, either express or implied. * This software is distributed under a license and may not be copied, * modified or distributed except as expressly authorized under the * terms of the license contained in the file LICENSE in this distribution. */ #ifndef RL_THREAD_HPP #define RL_THREAD_HPP #ifdef _MSC_VER # pragma once #endif #include "base.hpp" #include "context_base.hpp" #include "dyn_thread_ctx.hpp" #include "thread_base.hpp" #include "test_suite.hpp" #include "memory_order.hpp" #include "foreach.hpp" namespace rl { struct atomic_data; struct var_data; template struct atomic_data_impl; template struct var_data_impl; template struct thread_info : thread_info_base { thread_info(thread_id_t index = 0) : thread_info_base(index, acq_rel_order_) { } void iteration_begin() { sync_object_.iteration_begin(); last_yield_ = 0; dynamic_thread_func_ = 0; dynamic_thread_param_ = 0; for (thread_id_t j = 0; j != thread_count; ++j) { acq_rel_order_[j] = 0; } acq_rel_order_[index_] = 1; temp_switch_from_ = -1; saved_disable_preemption_ = -1; } thread_sync_object sync_object_; timestamp_t acq_rel_order_ [thread_count]; timestamp_t acquire_fence_order_ [thread_count]; timestamp_t release_fence_order_ [thread_count]; #ifdef RL_IMPROVED_SEQ_CST_FENCE timestamp_t imp_seq_cst_order_ [thread_count]; #endif virtual void on_start() { RL_VERIFY(temp_switch_from_ == -1); RL_VERIFY(saved_disable_preemption_ == -1); sync_object_.on_start(); } virtual void on_finish() { RL_VERIFY(temp_switch_from_ == -1); RL_VERIFY(saved_disable_preemption_ == -1); sync_object_.on_finish(); } void atomic_thread_fence_acquire() { foreach( acq_rel_order_, acquire_fence_order_, &assign_max); } void atomic_thread_fence_release() { foreach( release_fence_order_, acq_rel_order_, &assign); } void atomic_thread_fence_acq_rel() { atomic_thread_fence_acquire(); atomic_thread_fence_release(); } void atomic_thread_fence_seq_cst(timestamp_t* seq_cst_fence_order) { #ifdef RL_IMPROVED_SEQ_CST_FENCE foreach(acq_rel_order_, imp_seq_cst_order_, assign_max); #endif atomic_thread_fence_acquire(); foreach( acq_rel_order_, seq_cst_fence_order, &assign_max); foreach( seq_cst_fence_order, acq_rel_order_, &assign); atomic_thread_fence_release(); } virtual ~thread_info() {} // just to calm down gcc private: thread_info(thread_info const&); thread_info& operator = (thread_info const&); virtual unsigned atomic_load_relaxed(atomic_data* RL_RESTRICT data) { return atomic_load(data); } virtual unsigned atomic_load_acquire(atomic_data* RL_RESTRICT data) { return atomic_load(data); } virtual unsigned atomic_load_seq_cst(atomic_data* RL_RESTRICT data) { return atomic_load(data); } virtual unsigned atomic_load_relaxed_rmw(atomic_data* RL_RESTRICT data) { return atomic_load(data); } virtual unsigned atomic_load_acquire_rmw(atomic_data* RL_RESTRICT data) { return atomic_load(data); } virtual unsigned atomic_load_seq_cst_rmw(atomic_data* RL_RESTRICT data) { return atomic_load(data); } virtual unsigned atomic_store_relaxed(atomic_data* RL_RESTRICT data) { return atomic_store(data); } virtual unsigned atomic_store_release(atomic_data* RL_RESTRICT data) { return atomic_store(data); } virtual unsigned atomic_store_seq_cst(atomic_data* RL_RESTRICT data) { return atomic_store(data); } virtual unsigned atomic_rmw_relaxed(atomic_data* RL_RESTRICT data, bool& aba) { return atomic_rmw(data, aba); } virtual unsigned atomic_rmw_acquire(atomic_data* RL_RESTRICT data, bool& aba) { return atomic_rmw(data, aba); } virtual unsigned atomic_rmw_release(atomic_data* RL_RESTRICT data, bool& aba) { return atomic_rmw(data, aba); } virtual unsigned atomic_rmw_acq_rel(atomic_data* RL_RESTRICT data, bool& aba) { return atomic_rmw(data, aba); } virtual unsigned atomic_rmw_seq_cst(atomic_data* RL_RESTRICT data, bool& aba) { return atomic_rmw(data, aba); } template unsigned get_load_index(atomic_data_impl& var) { typedef typename atomic_data_impl::history_record history_t; unsigned index = var.current_index_; context& c = ctx(); if (false == val(rmw)) { size_t const limit = c.is_random_sched() ? atomic_history_size - 1: 1; for (size_t i = 0; i != limit; ++i, --index) { history_t const& rec = var.history_[index % atomic_history_size]; if (false == rec.busy_) return (unsigned)-1; // access to unitialized var history_t const& prev = var.history_[(index - 1) % atomic_history_size]; if (prev.busy_ && prev.first_seen_order_[index_] <= last_yield_) break; if (mo_seq_cst == val(mo) && rec.seq_cst_) break; timestamp_t acq_rel_order = acq_rel_order_[rec.thread_id_]; if (acq_rel_order >= rec.acq_rel_timestamp_) break; // This check ensures read-read coherence, 1.10/16: // If a value computation A of an atomic object M happens before a value // computation B of M, and A takes its value from a side effect X on M, // then the value computed by B shall either be the value stored by X or // the value stored by a side effect Y on M, where Y follows X in the // modification order of M. bool stop = false; for (thread_id_t i = 0; i != thread_count; ++i) { timestamp_t acq_rel_order2 = acq_rel_order_[i]; if (acq_rel_order2 >= rec.first_seen_order_[i]) { stop = true; break; } } if (stop) break; if (0 == c.rand(2, sched_type_atomic_load)) break; } } if (false == var.history_[index % atomic_history_size].busy_) return (unsigned)-1; return index; } template unsigned atomic_load(atomic_data* RL_RESTRICT data) { RL_VERIFY(mo_release != mo || rmw); RL_VERIFY(mo_acq_rel != mo || rmw); atomic_data_impl& var = *static_cast*>(data); typedef typename atomic_data_impl::history_record history_t; unsigned index = get_load_index(var); if ((unsigned)-1 == index) return (unsigned)-1; index %= atomic_history_size; history_t& rec = var.history_[index]; RL_VERIFY(rec.busy_); own_acq_rel_order_ += 1; if ((timestamp_t)-1 == rec.first_seen_order_[index_]) rec.first_seen_order_[index_] = own_acq_rel_order_; bool const synch = (mo_acquire == mo || mo_acq_rel == mo || mo_seq_cst == mo); timestamp_t* acq_rel_order = (synch ? acq_rel_order_ : acquire_fence_order_); foreach(acq_rel_order, rec.acq_rel_order_, assign_max); return index; } virtual unsigned atomic_init(atomic_data* RL_RESTRICT data) { atomic_data_impl& var = *static_cast*>(data); typedef typename atomic_data_impl::history_record history_t; unsigned const idx = ++var.current_index_ % atomic_history_size; history_t& rec = var.history_[idx]; rec.busy_ = true; rec.thread_id_ = index_; rec.seq_cst_ = false; rec.acq_rel_timestamp_ = 0; foreach(rec.acq_rel_order_, assign_zero); return idx; } template unsigned atomic_store(atomic_data* RL_RESTRICT data) { RL_VERIFY(mo_consume != mo || rmw); RL_VERIFY(mo_acquire != mo || rmw); RL_VERIFY(mo_acq_rel != mo || rmw); atomic_data_impl& var = *static_cast*>(data); typedef typename atomic_data_impl::history_record history_t; unsigned const idx = ++var.current_index_ % atomic_history_size; history_t& rec = var.history_[idx]; rec.busy_ = true; rec.thread_id_ = index_; rec.seq_cst_ = (mo_seq_cst == mo); own_acq_rel_order_ += 1; rec.acq_rel_timestamp_ = own_acq_rel_order_; foreach(rec.first_seen_order_, assign<(timestamp_t)-1>); rec.first_seen_order_[index_] = own_acq_rel_order_; unsigned const prev_idx = (var.current_index_ - 1) % atomic_history_size; history_t& prev = var.history_[prev_idx]; #ifdef RL_IMPROVED_SEQ_CST_FENCE if (val(mo) == mo_release && val(rmw) == false) foreach(imp_seq_cst_order_, prev.acq_rel_order_, assign_max); #endif bool const synch = (mo_release == mo || mo_acq_rel == mo || mo_seq_cst == mo); bool const preserve = prev.busy_ && (rmw || (index_ == prev.thread_id_)); timestamp_t* acq_rel_order = (synch ? acq_rel_order_ : release_fence_order_); if (preserve) { foreach(rec.acq_rel_order_, prev.acq_rel_order_, assign); foreach(rec.acq_rel_order_, acq_rel_order, assign_max); } else { foreach(rec.acq_rel_order_, acq_rel_order, assign); } return idx; } template unsigned atomic_rmw(atomic_data* RL_RESTRICT data, bool& aba) { atomic_data_impl& var = *static_cast*>(data); timestamp_t const first_seen = var.history_[var.current_index_ % atomic_history_size].first_seen_order_[index_]; aba = ((timestamp_t)-1 == first_seen); atomic_load(data); unsigned result = atomic_store(data); #ifdef RL_IMPROVED_SEQ_CST_RMW atomic_thread_fence_seq_cst(ctx_->seq_cst_fence_order_); #endif return result; } virtual unpark_reason atomic_wait(atomic_data* RL_RESTRICT data, bool is_timed, bool allow_spurious_wakeup, debug_info_param info) { context& c = ctx(); atomic_data_impl& var = *static_cast*>(data); unpark_reason const res = var.futex_ws_.park_current(c, is_timed, allow_spurious_wakeup, false, info); if (res == unpark_reason_normal) var.futex_sync_.acquire(this); return res; } virtual thread_id_t atomic_wake(atomic_data* RL_RESTRICT data, thread_id_t count, debug_info_param info) { context& c = ctx(); atomic_data_impl& var = *static_cast*>(data); thread_id_t unblocked = 0; for (; count != 0; count -= 1, unblocked += 1) { if (var.futex_ws_.unpark_one(c, info) == false) break; } if (unblocked != 0) var.futex_sync_.release(this); return unblocked; } }; } #endif ================================================ FILE: tests/relacy/relacy/relacy/thread_base.hpp ================================================ /* Relacy Race Detector * Copyright (c) 2008-2013, Dmitry S. Vyukov * All rights reserved. * This software is provided AS-IS with no warranty, either express or implied. * This software is distributed under a license and may not be copied, * modified or distributed except as expressly authorized under the * terms of the license contained in the file LICENSE in this distribution. */ #ifndef RL_THREAD_BASE_HPP #define RL_THREAD_BASE_HPP #ifdef _MSC_VER # pragma once #endif #include "base.hpp" #include "context_base.hpp" //#include "test_suite.hpp" //#include "memory_order.hpp" //#include "foreach.hpp" namespace rl { struct atomic_data; struct var_data; template struct atomic_data_impl; template struct var_data_impl; class thread_info_base { public: virtual void on_start() = 0; virtual void on_finish() = 0; virtual unsigned atomic_init(atomic_data* RL_RESTRICT data) = 0; virtual unsigned atomic_load_relaxed(atomic_data* RL_RESTRICT data) = 0; virtual unsigned atomic_load_acquire(atomic_data* RL_RESTRICT data) = 0; virtual unsigned atomic_load_seq_cst(atomic_data* RL_RESTRICT data) = 0; virtual unsigned atomic_load_relaxed_rmw(atomic_data* RL_RESTRICT data) = 0; virtual unsigned atomic_load_acquire_rmw(atomic_data* RL_RESTRICT data) = 0; virtual unsigned atomic_load_seq_cst_rmw(atomic_data* RL_RESTRICT data) = 0; virtual unsigned atomic_store_relaxed(atomic_data* RL_RESTRICT data) = 0; virtual unsigned atomic_store_release(atomic_data* RL_RESTRICT data) = 0; virtual unsigned atomic_store_seq_cst(atomic_data* RL_RESTRICT data) = 0; virtual unsigned atomic_rmw_relaxed(atomic_data* RL_RESTRICT data, bool& aba) = 0; virtual unsigned atomic_rmw_acquire(atomic_data* RL_RESTRICT data, bool& aba) = 0; virtual unsigned atomic_rmw_release(atomic_data* RL_RESTRICT data, bool& aba) = 0; virtual unsigned atomic_rmw_acq_rel(atomic_data* RL_RESTRICT data, bool& aba) = 0; virtual unsigned atomic_rmw_seq_cst(atomic_data* RL_RESTRICT data, bool& aba) = 0; virtual unpark_reason atomic_wait(atomic_data* RL_RESTRICT data, bool is_timed, bool allow_spurious_wakeup, debug_info_param info) = 0; virtual thread_id_t atomic_wake(atomic_data* RL_RESTRICT data, thread_id_t count, debug_info_param info) = 0; virtual ~thread_info_base() {} // just to calm down gcc fiber_t fiber_; thread_id_t const index_; context* ctx_; timestamp_t* const acq_rel_order_; timestamp_t last_yield_; timestamp_t& own_acq_rel_order_; unpark_reason unpark_reason_; thread_id_t temp_switch_from_; int saved_disable_preemption_; int errno_; void* (*dynamic_thread_func_)(void*); void* dynamic_thread_param_; //unsigned disable_history_; thread_info_base(thread_id_t index, timestamp_t* acq_rel_order) : index_(index) , acq_rel_order_(acq_rel_order) , own_acq_rel_order_(acq_rel_order[index]) { } private: thread_info_base(thread_info_base const&); thread_info_base& operator = (thread_info_base const&); }; } #endif ================================================ FILE: tests/relacy/relacy/relacy/thread_local.hpp ================================================ /* Relacy Race Detector * Copyright (c) 2008-2013, Dmitry S. Vyukov * All rights reserved. * This software is provided AS-IS with no warranty, either express or implied. * This software is distributed under a license and may not be copied, * modified or distributed except as expressly authorized under the * terms of the license contained in the file LICENSE in this distribution. */ #ifndef RL_THREAD_LOCAL_HPP #define RL_THREAD_LOCAL_HPP #ifdef _MSC_VER # pragma once #endif #include "base.hpp" #include "signature.hpp" #include "context.hpp" namespace rl { class generic_thread_local : nocopy<> { public: generic_thread_local() : index_(-1) { } ~generic_thread_local() { } void init(void (*dtor)(intptr_t), debug_info_param info) { sign_.check(info); //RL_ASSERT(index_ == -1); index_ = ctx().thread_local_alloc(dtor); } void deinit(debug_info_param info) { sign_.check(info); RL_ASSERT(index_ != -1); ctx().thread_local_free(index_); index_ = -1; } void set(intptr_t value, debug_info_param info) { sign_.check(info); ctx().thread_local_set(index_, value); } intptr_t get(debug_info_param info) { sign_.check(info); return ctx().thread_local_get(index_); } private: signature<0xf1724ae2> sign_; int index_; }; template class thread_local_var; template class thread_local_proxy { public: thread_local_proxy(thread_local_var& var, debug_info_param info) : var_(var) , info_(info) {} operator T () const { return var_.get(info_); } T operator -> () const { return var_.get(info_); } thread_local_proxy operator = (T value) { var_.set(value, info_); return *this; } private: thread_local_var& var_; debug_info info_; thread_local_proxy& operator = (thread_local_proxy const&); }; template class thread_local_var : generic_thread_local { public: thread_local_var() : ctx_seq_() { } ~thread_local_var() { if (is_ctx() && ctx_seq_ == ctx().get_ctx_seq()) { generic_thread_local::deinit($); } } thread_local_proxy operator () (debug_info_param info) { return thread_local_proxy(*this, info); } void set(T value, debug_info_param info) { if (ctx_seq_ != ctx().get_ctx_seq()) { ctx_seq_ = ctx().get_ctx_seq(); generic_thread_local::init(0, info); } generic_thread_local::set((intptr_t)value, info); } T get(debug_info_param info) { if (ctx_seq_ != ctx().get_ctx_seq()) { ctx_seq_ = ctx().get_ctx_seq(); generic_thread_local::init(0, info); } return (T)generic_thread_local::get(info); } private: unsigned ctx_seq_; }; inline unsigned long rl_TlsAlloc(debug_info_param info) { #ifndef RL_GC //!!! may break on x64 platform // TLS index is exactly DWORD (not DWORD_PTR), so one has to use indirection return (unsigned long)new (info) thread_local_var (); #else void* p = ctx().alloc(sizeof(thread_local_var), false, info); new (p) thread_local_var (); return (unsigned long)p; #endif } inline void rl_TlsFree(unsigned long slot, debug_info_param info) { #ifndef RL_GC delete_impl((thread_local_var*)slot, info); #else thread_local_var* t = (thread_local_var*)slot; t->~thread_local_var(); ctx().free(t, false, info); #endif } inline void* rl_TlsGetValue(unsigned long slot, debug_info_param info) { return ((thread_local_var*)slot)->get(info); } inline int rl_TlsSetValue(unsigned long slot, void* value, debug_info_param info) { ((thread_local_var*)slot)->set(value, info); return 1; } #define TlsAlloc() rl::rl_TlsAlloc($) #define TlsFree(slot) rl::rl_TlsFree((slot), $) #define TlsGetValue(slot) rl::rl_TlsGetValue((slot), $) #define TlsSetValue(slot, value) rl::rl_TlsSetValue((slot), (value), $) } #endif ================================================ FILE: tests/relacy/relacy/relacy/thread_local_ctx.hpp ================================================ /* Relacy Race Detector * Copyright (c) 2008-2013, Dmitry S. Vyukov * All rights reserved. * This software is provided AS-IS with no warranty, either express or implied. * This software is distributed under a license and may not be copied, * modified or distributed except as expressly authorized under the * terms of the license contained in the file LICENSE in this distribution. */ #ifndef RL_THREAD_LOCAL_CTX_HPP #define RL_THREAD_LOCAL_CTX_HPP #ifdef _MSC_VER # pragma once #endif #include "base.hpp" #include "test_params.hpp" namespace rl { struct thread_local_context_iface { virtual int thread_local_alloc (void (*dtor)(intptr_t)) = 0; virtual void thread_local_free (int index) = 0; virtual void thread_local_set (int index, intptr_t value) = 0; virtual intptr_t thread_local_get (int index) = 0; virtual ~thread_local_context_iface () {} // to calm down g++ }; template class thread_local_contxt_impl : protected base_t { public: thread_local_contxt_impl(thread_id_t thread_count_param, test_params& params) : base_t(thread_count_param, params) { } void iteration_begin() { base_t::iteration_begin(); for (size_t ent = 0; ent != entries_.size(); ent += 1) { for (size_t th = 0; th != thread_count; th += 1) { entries_[ent].value_[th] = 0; } } } private: struct entry { bool alive_; intptr_t value_ [thread_count]; void (*dtor_) (intptr_t); }; typename vector::type entries_; using base_t::current_thread; virtual int thread_local_alloc (void (*dtor)(intptr_t)) { int index = find_or_make_unused_entry_index(); entry& ent = entries_[index]; ent.alive_ = true; ent.dtor_ = dtor; for (size_t i = 0; i != thread_count; ++i) { ent.value_[i] = 0; } return index; } virtual void thread_local_free (int index) { RL_VERIFY(index >= 0 && (size_t)index < entries_.size()); entry& ent = entries_[index]; RL_VERIFY(ent.alive_); ent.alive_ = false; if (ent.dtor_) { for (size_t i = 0; i != thread_count; ++i) { if (ent.value_[i]) { ent.dtor_(ent.value_[i]); } } } } virtual void thread_local_set (int index, intptr_t value) { RL_VERIFY(index >= 0 && (size_t)index < entries_.size()); entry& ent = entries_[index]; RL_VERIFY(ent.alive_); ent.value_[current_thread()] = value; } virtual intptr_t thread_local_get (int index) { RL_VERIFY(index >= 0 && (size_t)index < entries_.size()); entry& ent = entries_[index]; RL_VERIFY(ent.alive_); return ent.value_[current_thread()]; } int find_or_make_unused_entry_index() { int index; for (index = 0; index < (int)entries_.size(); ++index) { if (!entries_[index].alive_) { return (int)index; } } entries_.resize(index + 1); return index; } }; } #endif ================================================ FILE: tests/relacy/relacy/relacy/var.hpp ================================================ /* Relacy Race Detector * Copyright (c) 2008-2013, Dmitry S. Vyukov * All rights reserved. * This software is provided AS-IS with no warranty, either express or implied. * This software is distributed under a license and may not be copied, * modified or distributed except as expressly authorized under the * terms of the license contained in the file LICENSE in this distribution. */ #ifndef RL_VAR_HPP #define RL_VAR_HPP #ifdef _MSC_VER # pragma once #endif #include "base.hpp" #include "context.hpp" #include "signature.hpp" #include "atomic_events.hpp" namespace rl { template class var; template class var_proxy_const { public: var_proxy_const(var const& v, debug_info_param info) : var_(const_cast&>(v)) , info_(info) { } T load() const { return var_.load(info_); } operator T () const { return this->load(); } T const operator -> () const { return this->load(); } protected: var& var_; debug_info info_; private: var_proxy_const& operator = (var_proxy_const const&); }; template class var_proxy : public var_proxy_const { public: typedef typename atomic_add_type::type add_type; var_proxy(var& v, debug_info_param info) : var_proxy_const(v, info) { } void store(T value) { this->var_.store(value, this->info_); } template T operator = (var_proxy_const const& v) { Y y = v.load(); T t = y; store(t); return t; } T operator = (var_proxy const& v) { T t = v.load(); store(t); return t; } T operator = (T value) { store(value); return value; } T operator -> () { return this->load(); } T operator ++ (int) { T v = this->load(); T y = ++v; this->store(y); return v; } T operator -- (int) { T v = this->load(); T y = --v; this->store(y); return v; } T operator ++ () { T v = this->load(); this->store(++v); return v; } T operator -- () { T v = this->load(); this->store(--v); return v; } T operator += (add_type value) { T v = this->load(); v += value; this->store(v); return v; } T operator -= (add_type value) { T v = this->load(); v -= value; this->store(v); return v; } T operator &= (T value) { T v = this->load(); v &= value; this->store(v); return v; } T operator |= (T value) { T v = this->load(); v |= value; this->store(v); return v; } T operator ^= (T value) { T v = this->load(); v ^= value; this->store(v); return v; } }; template struct var_event { debug_info var_info_; var const* var_addr_; T value_; bool load_; template struct map_type { typedef T result; }; template struct map_type { typedef void* result; }; void output(std::ostream& s) const { s << "<" << std::hex << var_addr_ << std::dec << "> " << (load_ ? "load" : "store") << ", value=" << (typename map_type::result)value_; } }; template class var { public: var() { value_ = 0; initialized_ = false; data_ = ctx().var_ctor(); } var(T value) { init(value); } var(var const& r) { init(r.load($)); } ~var() { sign_.check($); ctx().var_dtor(data_); } var_proxy_const operator () (debug_info_param info) const { return var_proxy_const(*this, info); } var_proxy operator () (debug_info_param info) { return var_proxy(*this, info); } private: T value_; bool initialized_; var_data* data_; signature<123456789> sign_; friend class var_proxy; friend class var_proxy_const; void init(T value) { context& c = ctx(); initialized_ = true; value_ = value; data_ = ctx().var_ctor(); data_->init(*c.threadx_); } T load(debug_info_param info) const { context& c = ctx(); sign_.check(info); if (false == initialized_) { RL_HIST(var_event) {RL_INFO, this, T(), true} RL_HIST_END(); RL_ASSERT_IMPL(false, test_result_unitialized_access, "", info); } if (false == c.invariant_executing) { if (false == data_->load(*c.threadx_)) { RL_HIST(var_event) {RL_INFO, this, T(), true} RL_HIST_END(); RL_ASSERT_IMPL(false, test_result_data_race, "data race detected", info); } T const v = value_; RL_HIST(var_event) {RL_INFO, this, v, true} RL_HIST_END(); return v; } else { return value_; } } void store(T v, debug_info_param info) { context& c = ctx(); RL_VERIFY(false == c.invariant_executing); sign_.check(info); if (initialized_) { if (false == data_->store(*c.threadx_)) { RL_HIST(var_event) {RL_INFO, this, T(), false} RL_HIST_END(); RL_ASSERT_IMPL(false, test_result_data_race, "data race detected", info); } } else { initialized_ = true; data_->init(*c.threadx_); } value_ = v; RL_HIST(var_event) {RL_INFO, this, v, false} RL_HIST_END(); } var& operator = (var const& r); }; template struct var_data_impl : var_data { typedef thread_info thread_info_t; timestamp_t load_acq_rel_timestamp_ [thread_count]; timestamp_t store_acq_rel_timestamp_ [thread_count]; var_data_impl() { foreach(load_acq_rel_timestamp_, assign_zero); foreach(store_acq_rel_timestamp_, assign_zero); } virtual void init(thread_info_base& th) { th.own_acq_rel_order_ += 1; store_acq_rel_timestamp_[th.index_] = th.own_acq_rel_order_; } virtual bool store(thread_info_base& th) { for (thread_id_t i = 0; i != thread_count; ++i) { if (th.acq_rel_order_[i] < store_acq_rel_timestamp_[i]) return false; if (th.acq_rel_order_[i] < load_acq_rel_timestamp_[i]) return false; } th.own_acq_rel_order_ += 1; store_acq_rel_timestamp_[th.index_] = th.own_acq_rel_order_; return true; } virtual bool load(thread_info_base& th) { for (thread_id_t i = 0; i != thread_count; ++i) { if (th.acq_rel_order_[i] < store_acq_rel_timestamp_[i]) return false; } th.own_acq_rel_order_ += 1; load_acq_rel_timestamp_[th.index_] = th.own_acq_rel_order_; return true; } virtual ~var_data_impl() {} // just to calm down gcc }; } #endif ================================================ FILE: tests/relacy/relacy/relacy/volatile.hpp ================================================ /* Relacy Race Detector * Copyright (c) 2008-2013, Dmitry S. Vyukov * All rights reserved. * This software is provided AS-IS with no warranty, either express or implied. * This software is distributed under a license and may not be copied, * modified or distributed except as expressly authorized under the * terms of the license contained in the file LICENSE in this distribution. */ #ifndef RL_VOLATILE_HPP #define RL_VOLATILE_HPP #ifdef _MSC_VER # pragma once #endif #include "base.hpp" namespace rl { } #endif ================================================ FILE: tests/relacy/relacy/relacy/waitset.hpp ================================================ /* Relacy Race Detector * Copyright (c) 2008-2013, Dmitry S. Vyukov * All rights reserved. * This software is provided AS-IS with no warranty, either express or implied. * This software is distributed under a license and may not be copied, * modified or distributed except as expressly authorized under the * terms of the license contained in the file LICENSE in this distribution. */ #ifndef RL_WAITSET_HPP #define RL_WAITSET_HPP #ifdef _MSC_VER # pragma once #endif #include "base.hpp" #include "thread_base.hpp" #include "context_base.hpp" namespace rl { template class waitset { public: waitset() { size_ = 0; } unpark_reason park_current(context& c, bool is_timed, bool allow_spurious_wakeup, bool do_switch, debug_info_param info) { RL_VERIFY(size_ < thread_count); thread_info_base* th = c.threadx_; thread_desc desc = {th, 0, 0, 0, false, do_switch}; set_[size_] = desc; size_ += 1; unpark_reason reason = c.park_current_thread(is_timed, allow_spurious_wakeup, do_switch, info); if (reason == unpark_reason_normal) { if (do_switch) RL_VERIFY(c.threadx_->temp_switch_from_ != -1); else RL_VERIFY(c.threadx_->temp_switch_from_ == -1); } else { remove(th); } return reason; } static unpark_reason park_current(context& c, waitset** ws, win_waitable_object** wo, size_t count, bool wait_all, bool is_timed, bool do_switch, debug_info_param info) { thread_info_base* th = c.threadx_; thread_desc desc = {th, (unsigned)count, ws, wo, wait_all, do_switch}; for (unsigned wsi = 0; wsi != count; ++wsi) { RL_VERIFY(ws[wsi]->size_ < thread_count); ws[wsi]->set_[ws[wsi]->size_] = desc; ws[wsi]->size_ += 1; } unpark_reason reason = c.park_current_thread(is_timed, false, do_switch, info); if (reason == unpark_reason_normal) { if (do_switch) RL_VERIFY(c.threadx_->temp_switch_from_ != -1); else RL_VERIFY(c.threadx_->temp_switch_from_ == -1); } else { remove(th, ws, (unsigned)count); } return reason; } bool unpark_one(context& c, debug_info_param info) { if (0 == size_) return false; //!!! too high preassure on full sched thread_id_t idx = c.rand(size_, sched_type_user); if (try_remove(c, idx, info)) return true; for (idx = 0; idx != size_; idx += 1) { if (try_remove(c, idx, info)) return true; } return false; } thread_id_t unpark_all(context& c, debug_info_param info) { thread_id_t cnt = 0; for (thread_id_t idx = 0; idx != size_; idx += 1) { if (try_remove(c, idx, info)) { cnt += 1; idx -= 1; } } return cnt; } thread_id_t size() const { return size_; } operator bool () const { return 0 != size_; } private: struct thread_desc { thread_info_base* th_; unsigned count_; // 0 - wfso, !0 - wfmo waitset** ws_; // 0 - wfso, !0 - wfmo win_waitable_object** wo_; // 0 - wfso, !0 - wfmo bool wait_all_; bool do_switch_; }; thread_desc set_ [thread_count]; thread_id_t size_; bool try_remove(context& c, thread_id_t const idx, debug_info_param info) { RL_VERIFY(idx < size_); thread_desc const& d = set_[idx]; if (d.count_ != 0 && d.wait_all_ == true) { for (size_t i = 0; i != d.count_; i += 1) { if (d.wo_[i]->is_signaled(info) == false) return false; } } size_t const tid = d.th_->index_; bool const do_switch = d.do_switch_; if (d.ws_) remove(d.th_, d.ws_, d.count_); else remove(d.th_); c.unpark_thread(tid, do_switch, info); return true; } void remove(thread_info_base* th) { thread_id_t size = size_; thread_id_t i = 0; for (; i != size; ++i) { if (set_[i].th_ == th) break; } RL_VERIFY(i != size); for (thread_id_t j = i + 1; j != size; ++j) { set_[j - 1] = set_[j]; } size_ -= 1; } static void remove(thread_info_base* th, waitset** ws, unsigned count) { for (unsigned wsi = 0; wsi != count; ++wsi) { ws[wsi]->remove(th); } } }; } #endif ================================================ FILE: tests/relacy/relacy/relacy/windows.h ================================================ /* Relacy Race Detector * Copyright (c) 2008-2013, Dmitry S. Vyukov * All rights reserved. * This software is provided AS-IS with no warranty, either express or implied. * This software is distributed under a license and may not be copied, * modified or distributed except as expressly authorized under the * terms of the license contained in the file LICENSE in this distribution. */ #ifndef RL_WINDOWS_IFACE_HPP #define RL_WINDOWS_IFACE_HPP #ifdef _MSC_VER # pragma once #endif #include "relacy.hpp" #include "stdlib/windows.hpp" #endif ================================================ FILE: tests/relacy/relacy/test/addr_hash.hpp ================================================ #pragma once #include "../relacy/relacy_std.hpp" struct test_addr_hash : rl::test_suite { void* p1; void* p2; size_t h1, h2; static size_t const table_size = 1000; void before() { p1 = malloc(0); h1 = rl::hash_ptr(p1, table_size); p2 = malloc(0); h2 = rl::hash_ptr(p2, table_size); } void after() { free(p1); free(p2); } void thread(unsigned index) { assert(h1 == rl::hash_ptr(p1, table_size)); assert(h2 == rl::hash_ptr(p2, table_size)); assert(rl::hash_ptr(&index, table_size) == rl::hash_ptr(&index,table_size)); assert(rl::hash_ptr(0, table_size) == rl::hash_ptr(0, table_size)); } }; struct test_addr_hash2 : rl::test_suite { static size_t const table_size = 4; std::atomic table [table_size]; void before() { for (size_t i = 0; i != table_size; i += 1) table[i].store(0, std::memory_order_relaxed); } void thread(unsigned) { for (size_t i = 0; i != table_size + 1; i += 1) { void* p = malloc(0); size_t idx = rl::hash_ptr(p, table_size); free(p); int v = table[idx].exchange(1, std::memory_order_relaxed); RL_UNTIL(v); } } }; ================================================ FILE: tests/relacy/relacy/test/advanced.txt ================================================ Test parameters. You can specify various parameters for test. rl::test_params p; p.search_type = rl::fair_context_bound_scheduler_type; p.context_bound = 1; p.execution_depth_limit = 1000; rl::simulate(p); The main parameter is scheduler type used for simulation. There is 3 types of scheduler: random_scheduler_type - random exploration of state space fair_full_search_scheduler_type - exhaustive systematic exploration of state space fair_context_bound_scheduler_type - systematic exploration of state space with limit on context switches. For random_scheduler_type you can specify 'iteration_count' parameter - number of explored executions. For fair_context_bound_scheduler_type you can specify 'context_bound' parameter - limit on context switches. Also you can specify 'execution_depth_limit' parameter - used for livelock detection. All executions with trace longer than execution_depth_limit will be treated as livelocked (or non-terminating). Also from test_params structure you can receive output parameters from simulation. Main output parameter is 'test_result' which describes cause of test failure. If you use fair_full_search_scheduler_type or fair_context_bound_scheduler_type, in order to ensure fairness of scheduler, you must use 'yield' calls in all 'spin-loops', otherwise simulation will report non-terminating execution. Example: struct race_seq_ld_ld_test : rl::test_suite { std::atomic a; rl::var x; void before() { a($) = 0; x($) = 0; } void thread(unsigned index) { if (index) { x($).load(); a($).store(1, std::memory_order_relaxed); } else { rl::backoff b; while (0 == a($).load(rl::memory_order_relaxed)) b.yield($); x($).load(); } } }; ================================================ FILE: tests/relacy/relacy/test/compare_swap.hpp ================================================ #pragma once #include "../relacy/relacy_std.hpp" template struct cas_spurious_fail_test : rl::test_suite, 1, rl::test_result_until_condition_hit> { std::atomic x; std::atomic y; void before() { x.store(0, std::memory_order_relaxed); y.store(0, std::memory_order_relaxed); } void thread(unsigned /*index*/) { int cmp = 0; if (x.compare_exchange_weak(cmp, 1, std::memory_order_seq_cst, std::memory_order_seq_cst)) { cmp = 1; if (x.compare_exchange_weak(cmp, 2, std::memory_order_seq_cst)) { cmp = 0; if (y.compare_exchange_weak(cmp, 1, std::memory_order_seq_cst)) { } else { if (T == 2) RL_UNTIL(true); } } else { if (T == 1) RL_UNTIL(true); } } else { if (T == 0) RL_UNTIL(true); } } }; ================================================ FILE: tests/relacy/relacy/test/condvar.hpp ================================================ #pragma once #include "../relacy/relacy_std.hpp" struct test_condvar : rl::test_suite { std::mutex mtx; std::condition_variable cv; rl::var data; void before() { data($) = 0; } void thread(unsigned index) { if (0 == index) { mtx.lock($); data($) += 1; mtx.unlock($); cv.notify_one($); } else { mtx.lock($); while (0 == data($)) { cv.wait(mtx, $); } mtx.unlock($); } } }; struct test_condvar2 : rl::test_suite { rl::var stage; std::mutex mtx; std::condition_variable cv; void before() { stage($) = 0; } void thread(unsigned index) { if (0 == index) { mtx.lock($); stage($) += 1; cv.notify_all($); while (stage($) != 2) cv.wait(mtx, $); mtx.unlock($); } else if (1 == index) { mtx.lock($); while (stage($) != 1) cv.wait(mtx, $); stage($) += 1; cv.notify_all($); mtx.unlock($); } else if (2 == index) { mtx.lock($); while (stage($) != 2) cv.wait(mtx, $); mtx.unlock($); } } }; ================================================ FILE: tests/relacy/relacy/test/data_race.hpp ================================================ #pragma once #include "../relacy/relacy_std.hpp" struct race_ld_ld_test : rl::test_suite { rl::var x; void before() { x($) = 0; } void thread(unsigned index) { if (index) x($).load(); else x($).load(); } }; struct race_ld_st_test : rl::test_suite { rl::var x; void before() { x($) = 0; } void thread(unsigned index) { if (index) x($).load(); else x($).store(1); } }; struct race_st_st_test : rl::test_suite { rl::var x; void thread(unsigned index) { if (index) x($).store(1); else x($).store(1); } }; struct race_seq_ld_ld_test : rl::test_suite { std::atomic a; rl::var x; void before() { a($) = 0; x($) = 0; } void thread(unsigned index) { if (index) { x($).load(); a.store(1, std::memory_order_relaxed); } else { rl::backoff b; while (0 == a.load(std::memory_order_relaxed)) b.yield($); x($).load(); } } }; struct race_seq_ld_st_test : rl::test_suite { std::atomic a; rl::var x; void before() { a($) = 0; x($) = 0; } void thread(unsigned index) { if (index) { x($).load(); a.store(1, std::memory_order_relaxed); } else { rl::backoff b; while (0 == a.load(std::memory_order_relaxed)) b.yield($); x($).store(1); } } }; struct race_seq_st_ld_test : rl::test_suite { std::atomic a; rl::var x; void before() { a($) = 0; } void thread(unsigned index) { if (0 == index) { x($).store(1); a.store(1, std::memory_order_relaxed); } else { rl::backoff b; while (0 == a.load(std::memory_order_relaxed)) b.yield($); x($).load(); } } }; struct race_seq_st_st_test : rl::test_suite { std::atomic a; rl::var x; void before() { a($) = 0; } void thread(unsigned index) { if (index) { x($).store(1); a.store(1, std::memory_order_relaxed); } else { rl::backoff b; while (0 == a.load(std::memory_order_relaxed)) b.yield($); VAR(x) = 1; } } }; struct race_uninit_test : rl::test_suite { std::atomic a; std::atomic x; void before() { a($) = 0; } void thread(unsigned index) { if (index) { x.store(1, std::memory_order_relaxed); a.store(1, std::memory_order_relaxed); } else { rl::backoff b; while (0 == a.load(std::memory_order_relaxed)) b.yield($); x.load(std::memory_order_seq_cst); } } }; struct race_indirect_test : rl::test_suite { std::atomic a; rl::var x; void before() { a($) = 0; x($) = 0; } void thread(unsigned index) { if (0 == index) { x($) = 1; a.store(1, std::memory_order_release); (void)(int)x($); } else { rl::backoff b; while (0 == a.load(std::memory_order_acquire)) b.yield($); (void)(int)x($); x($) = 2; } } }; ================================================ FILE: tests/relacy/relacy/test/detection.txt ================================================ - Race condition (accoring to ISO C++0x) - Access to uninitialized variable - Access to freed memory - Double free - Memory leak - Deadlock - Livelock - User assert failed - User invariant failed ================================================ FILE: tests/relacy/relacy/test/dyn_thread.hpp ================================================ #pragma once #include "../relacy/relacy.hpp" #include "../relacy/dyn_thread.hpp" struct dyn_thread_basic_test : rl::test_suite { static unsigned const dynamic_thread_count = 4; rl::var data1; rl::var data2; rl::atomic data3; void before() { data3($) = 0; } static void* thread1(void* p) { dyn_thread_basic_test& self = *(dyn_thread_basic_test*)p; self.data1($) = 1; return 0; } static void* thread2(void* p) { dyn_thread_basic_test& self = *(dyn_thread_basic_test*)p; self.data2($) = 2; return 0; } static void* thread3(void* p) { dyn_thread_basic_test& self = *(dyn_thread_basic_test*)p; self.data3.store(3, rl::memory_order_relaxed); return 0; } void thread(unsigned index) { if (index == 0) { rl::dyn_thread t1; t1.start(&dyn_thread_basic_test::thread1, this); rl::dyn_thread t2; t2.start(&dyn_thread_basic_test::thread2, this); t1.join(); t2.join(); RL_ASSERT(data1($) == 1); RL_ASSERT(data2($) == 2); } else if (index == 1) { rl::dyn_thread t1; t1.start(&dyn_thread_basic_test::thread3, this); while (data3.load(rl::memory_order_relaxed) != 3) rl::yield(1, $); t1.join(); } else { RL_ASSERT(false); } } }; struct dyn_thread_win32_test : rl::test_suite { static unsigned const dynamic_thread_count = 4; rl::var data1; rl::var data2; rl::atomic data3; void before() { data3($) = 0; } static unsigned long RL_STDCALL thread1(void* p) { dyn_thread_win32_test& self = *(dyn_thread_win32_test*)p; self.data1($) = 1; return 0; } static unsigned long RL_STDCALL thread2(void* p) { dyn_thread_win32_test& self = *(dyn_thread_win32_test*)p; self.data2($) = 2; return 0; } static unsigned long RL_STDCALL thread3(void* p) { dyn_thread_win32_test& self = *(dyn_thread_win32_test*)p; self.data3.store(3, rl::memory_order_relaxed); return 0; } void thread(unsigned index) { if (index == 0) { HANDLE threads [2]; threads[0] = CreateThread(0, 0, &dyn_thread_win32_test::thread1, this, 0, 0); threads[1] = CreateThread(0, 0, &dyn_thread_win32_test::thread2, this, 0, 0); WaitForMultipleObjects(2, threads, 1, INFINITE); RL_ASSERT(VAR(data1) == 1); RL_ASSERT(VAR(data2) == 2); } else if (index == 1) { HANDLE th = CreateThread(0, 0, &dyn_thread_win32_test::thread3, this, 0, 0); while (data3.load(rl::memory_order_relaxed) != 3) rl::yield(1, $); WaitForSingleObject(th, INFINITE); } else { RL_ASSERT(false); } } }; struct dyn_thread_visibility_test : rl::test_suite { static unsigned const dynamic_thread_count = 1; rl::var data; static unsigned long RL_STDCALL thread(void* p) { dyn_thread_visibility_test& self = *(dyn_thread_visibility_test*)p; RL_ASSERT(self.data($) == 1); self.data($) = 2; return 0; } void thread(unsigned /*index*/) { data($) = 1; HANDLE th = CreateThread(0, 0, &dyn_thread_visibility_test::thread, this, 0, 0); WaitForSingleObject(th, INFINITE); RL_ASSERT(data($) == 2); } }; ================================================ FILE: tests/relacy/relacy/test/event.hpp ================================================ #pragma once #include "../relacy/relacy_std.hpp" struct test_event_auto : rl::test_suite { HANDLE ev; VAR_T(int) data; void before() { VAR(data) = 0; ev = CreateEvent(0, 0, 0, 0); } void after() { CloseHandle(ev); } void thread(unsigned index) { if (0 == index) { VAR(data) = 1; SetEvent(ev); } else { unsigned rv = WaitForSingleObject(ev, INFINITE); assert(rv == WAIT_OBJECT_0); assert(VAR(data) == 1); rv = WaitForSingleObject(ev, 0); assert(rv == WAIT_TIMEOUT); } } }; struct test_event_atomic : rl::test_suite { HANDLE ev1; HANDLE ev2; void before() { ev1 = CreateEvent(0, 0, 0, 0); ev2 = CreateEvent(0, 0, 0, 0); } void after() { CloseHandle(ev1); CloseHandle(ev2); } void thread(unsigned index) { if (0 == index) { unsigned rv = WaitForSingleObject(ev1, INFINITE); assert(rv == WAIT_OBJECT_0); SetEvent(ev2); rv = WaitForSingleObject(ev2, 0); assert(rv == WAIT_TIMEOUT); } else { unsigned rv = SignalObjectAndWait(ev1, ev2, INFINITE, 0); assert(rv == WAIT_OBJECT_0); rv = WaitForSingleObject(ev2, 0); assert(rv == WAIT_TIMEOUT); } } }; struct test_event_manual : rl::test_suite { HANDLE ev; VAR_T(int) data; void before() { VAR(data) = 0; ev = CreateEvent(0, 1, 0, 0); } void after() { CloseHandle(ev); } void thread(unsigned index) { if (0 == index) { VAR(data) = 1; SetEvent(ev); } else { unsigned rv = WaitForSingleObject(ev, INFINITE); assert(rv == WAIT_OBJECT_0); assert(VAR(data) == 1); rv = WaitForSingleObject(ev, 0); assert(rv == WAIT_OBJECT_0); } } }; ================================================ FILE: tests/relacy/relacy/test/features.txt ================================================ - Relaxed ISO C++0x Memory Model. Relaxed/acquire/release/acq_rel/seq_cst memory operations. The only non-supported feature is memory_order_consume, it's simulated with memory_order_acquire. - Exhaustive automatic error checking (including ABA detection). - Full-fledged atomics library (with spurious failures in compare_exchange()). - Memory fences. - Arbitrary number of threads. - Detailed execution history for failed tests. - No false positives. - Before/after/invariant functions for test suites. ================================================ FILE: tests/relacy/relacy/test/fence.hpp ================================================ #pragma once #include "../relacy/relacy_std.hpp" template struct fence_synch_test : rl::test_suite, 2> { std::atomic x; rl::var data; void before() { x($) = 0; } void thread(unsigned th) { if (0 == th) { data($) = 1; if (0 == index || 1 == index) { std::atomic_thread_fence(order().first, $); x.store(1, std::memory_order_relaxed); } else { x.store(1, order().first, $); } } else { if (0 == index || 2 == index) { if (x.load(std::memory_order_relaxed)) { std::atomic_thread_fence(order().second, $); data($).load(); } } else { if (x.load(order().second, $)) { data($).load(); } } } } std::pair order() { switch (mo_index) { default: RL_VERIFY(false); case 0: return std::make_pair(std::mo_release, std::mo_acquire); case 1: return std::make_pair(std::mo_seq_cst, std::mo_seq_cst); } } }; struct two_fence_synch_test : rl::test_suite { std::atomic x0; std::atomic x1; rl::var data0; rl::var data1; void before() { x0($) = 0; x1($) = 0; } void thread(unsigned index) { if (0 == index) { data0($) = 1; std::atomic_thread_fence(std::memory_order_release); x0.store(1, std::memory_order_relaxed); } else if (1 == index) { data1($) = 1; std::atomic_thread_fence(std::memory_order_release); x1.store(1, std::memory_order_relaxed); } else { int y0 = x0.load(std::memory_order_relaxed); int y1 = x1.load(std::memory_order_relaxed); if (y0 || y1) { std::atomic_thread_fence(std::memory_order_acquire); if (y0) data0($).load(); if (y1) data1($).load(); } } } }; template struct seq_cst_fence_test : rl::test_suite, 2, (rl::test_result_e)((0 == index) * rl::test_result_success + (1 == index) * rl::test_result_until_condition_hit)> { std::atomic x0; std::atomic x1; rl::var r0; rl::var r1; void before() { x0($) = 0; x1($) = 0; } void thread(unsigned th) { if (0 == th) { x0.store(1, std::memory_order_relaxed); std::atomic_thread_fence(std::memory_order_seq_cst); r0($) = x1.load(std::memory_order_relaxed); } else { x1.store(1, std::memory_order_relaxed); std::atomic_thread_fence(std::memory_order_seq_cst); r1($) = x0.load(std::memory_order_relaxed); } } void after() { if (0 == index) RL_ASSERT(r0($) || r1($)); else if (1 == index) RL_UNTIL(r0($) && r1($)); } }; ================================================ FILE: tests/relacy/relacy/test/foo.cpp ================================================ #include "stdafx.h" #include "../relacy/relacy_std.hpp" #include "../relacy/windows.h" #include "../relacy/pthread.h" ================================================ FILE: tests/relacy/relacy/test/futex.hpp ================================================ #pragma once #include "../relacy/pthread.h" struct test_futex : rl::test_suite { rl::atomic state; int wakeres; int waitres; void before() { state.store(0, rl::memory_order_relaxed); wakeres = 0; waitres = 0; } void after() { assert((waitres == 0 && wakeres == 1) || (waitres == EWOULDBLOCK && wakeres == 0) || (waitres == EINTR && wakeres == 0)); } void thread(unsigned index) { if (index == 0) { state.store(1, std::memory_order_relaxed); wakeres = futex(&state, FUTEX_WAKE, 1, 0, 0, 0); } else { waitres = EINTR; while (state.load(rl::memory_order_relaxed) == 0) { waitres = futex(&state, FUTEX_WAIT, 0, 0, 0, 0); } } } }; struct test_futex_deadlock : rl::test_suite { rl::atomic state; void thread(unsigned index) { state.store(0, rl::memory_order_relaxed); int rv = futex(&state, FUTEX_WAIT, 0, 0, 0, 0); assert(rv == EINTR); } }; struct test_futex_sync1 : rl::test_suite { rl::atomic state; VAR_T(int) data; void before() { state.store(0, rl::memory_order_relaxed); VAR(data) = 0; } void thread(unsigned index) { if (index == 0) { VAR(data) = 1; state.store(1, std::memory_order_release); futex(&state, FUTEX_WAKE, 1, 0, 0, 0); } else { int rv = futex(&state, FUTEX_WAIT, 0, 0, 0, 0); assert(rv == 0 || rv == EWOULDBLOCK || rv == EINTR); if (rv == 0) { assert(VAR(data) == 1); assert(state.load(rl::memory_order_relaxed) == 1); RL_UNTIL(true); } } } }; struct test_futex_sync2 : rl::test_suite { rl::atomic state; VAR_T(int) data; void before() { state.store(0, rl::memory_order_relaxed); VAR(data) = 0; } void thread(unsigned index) { if (index == 0) { VAR(data) = 1; state.store(1, std::memory_order_release); futex(&state, FUTEX_WAKE, 1, 0, 0, 0); } else { int rv = futex(&state, FUTEX_WAIT, 0, 0, 0, 0); assert(rv == 0 || rv == EWOULDBLOCK || rv == EINTR); if (rv == EWOULDBLOCK) { assert(VAR(data) == 1); assert(state.load(rl::memory_order_relaxed) == 1); RL_UNTIL(true); } } } }; struct test_futex_intr : rl::test_suite { rl::atomic state; VAR_T(int) data; void before() { state.store(0, rl::memory_order_relaxed); VAR(data) = 0; } void thread(unsigned index) { if (index == 0) { VAR(data) = 1; state.store(1, std::memory_order_release); futex(&state, FUTEX_WAKE, 1, 0, 0, 0); } else { int rv = futex(&state, FUTEX_WAIT, 0, 0, 0, 0); assert(rv == 0 || rv == EWOULDBLOCK || rv == EINTR); RL_UNTIL(rv == EINTR); } } }; ================================================ FILE: tests/relacy/relacy/test/g++/build_all_cygwin_debug.bat ================================================ g++ ../../jtest/jtest.cpp -c -o jtest_debug.exe -D_DEBUG -Wall -DRL_CYGWIN_STUB -march=i686 g++ ../../ntest/ntest.cpp -c -o ntest_debug.exe -D_DEBUG -Wall -DRL_CYGWIN_STUB -march=i686 g++ ../../example/peterson/peterson.cpp -c -o peterson_debug.exe -D_DEBUG -Wall -DRL_CYGWIN_STUB -march=i686 g++ ../../example/proxy_collector/proxy_collector.cpp -c -o proxy_collector_debug.exe -D_DEBUG -Wall -DRL_CYGWIN_STUB -march=i686 g++ ../../example/ref_counting/ref_counting.cpp -c -o ref_counting_debug.exe -D_DEBUG -Wall -DRL_CYGWIN_STUB -march=i686 g++ ../../example/smr/smr.cpp -c -o smr_debug.exe -D_DEBUG -Wall -DRL_CYGWIN_STUB -march=i686 g++ ../../example/spsc_queue/spsc_queue.cpp -c -o spsc_queue_debug.exe -D_DEBUG -Wall -DRL_CYGWIN_STUB -march=i686 g++ ../../example/stack/stack.cpp -c -o stack_debug.exe -D_DEBUG -Wall -DRL_CYGWIN_STUB -march=i686 g++ ../../example/condvar/condvar.cpp -c -o condvar_debug.exe -D_DEBUG -Wall -DRL_CYGWIN_STUB -march=i686 g++ ../../example/mutex_business_logic/mutex_business_logic.cpp -c -o mutex_business_logic_debug.exe -D_DEBUG -Wall -DRL_CYGWIN_STUB -march=i686 g++ ../../example/ws_deque/ws_deque.cpp -c -o ws_deque_debug.exe -D_DEBUG -Wall -DRL_CYGWIN_STUB -march=i686 g++ ../../example/cli_ws_deque/cli_ws_deque.cpp -c -o cli_ws_deque_debug.exe -D_DEBUG -Wall -DRL_CYGWIN_STUB -march=i686 g++ ../../example/java_ws_deque/java_ws_deque.cpp -c -o java_ws_deque_debug.exe -D_DEBUG -Wall -DRL_CYGWIN_STUB -march=i686 g++ ../main.cpp -c -o test_debug.exe -D_DEBUG -Wall -DRL_CYGWIN_STUB -march=i686 ================================================ FILE: tests/relacy/relacy/test/g++/build_all_debug.bat ================================================ g++ ../../jtest/jtest.cpp -o jtest_debug.exe -D_DEBUG -Wall -Wno-deprecated -g g++ ../../ntest/ntest.cpp -o ntest_debug.exe -D_DEBUG -Wall -Wno-deprecated -g g++ ../../example/peterson/peterson.cpp -o peterson_debug.exe -D_DEBUG -Wall -Wno-deprecated -g g++ ../../example/proxy_collector/proxy_collector.cpp -o proxy_collector_debug.exe -D_DEBUG -Wall -Wno-deprecated -g g++ ../../example/ref_counting/ref_counting.cpp -o ref_counting_debug.exe -D_DEBUG -Wall -Wno-deprecated -g g++ ../../example/smr/smr.cpp -o smr_debug.exe -D_DEBUG -Wall -Wno-deprecated -g g++ ../../example/spsc_queue/spsc_queue.cpp -o spsc_queue_debug.exe -D_DEBUG -Wall -Wno-deprecated -g g++ ../../example/stack/stack.cpp -o stack_debug.exe -D_DEBUG -Wall -Wno-deprecated -g g++ ../../example/condvar/condvar.cpp -o condvar_debug.exe -D_DEBUG -Wall -Wno-deprecated -g g++ ../../example/mutex_business_logic/mutex_business_logic.cpp -o mutex_business_logic_debug.exe -D_DEBUG -Wall -Wno-deprecated -g g++ ../../example/ws_deque/ws_deque.cpp -o ws_deque_debug.exe -D_DEBUG -Wall -Wno-deprecated -g g++ ../../example/cli_ws_deque/cli_ws_deque.cpp -o cli_ws_deque_debug.exe -D_DEBUG -Wall -Wno-deprecated -g g++ ../../example/java_ws_deque/java_ws_deque.cpp -o java_ws_deque_debug.exe -D_DEBUG -Wall -Wno-deprecated -g g++ ../main.cpp -o test_debug.exe -D_DEBUG -Wall -Wno-deprecated -g ================================================ FILE: tests/relacy/relacy/test/g++/build_all_release.sh ================================================ #!/bin/bash set -eux #g++ ../jtest/jtest.cpp -o jtest_release.exe -Wall -D_DEBUG -O2 #g++ ../ntest/ntest.cpp -o ntest_release.exe -Wall -D_DEBUG -O2 #g++ ../../example/peterson/peterson.cpp -o peterson_release.exe -Wall -D_DEBUG -O2 g++ ../../example/proxy_collector/proxy_collector.cpp -o proxy_collector_release.exe -Wall -D_DEBUG -O2 g++ ../../example/ref_counting/ref_counting.cpp -o ref_counting_release.exe -Wall -D_DEBUG -O2 g++ ../../example/smr/smr.cpp -o smr_release.exe -Wall -D_DEBUG -O2 g++ ../../example/spsc_queue/spsc_queue.cpp -o spsc_queue_release.exe -Wall -D_DEBUG -O2 g++ ../../example/stack/stack.cpp -o stack_release.exe -Wall -D_DEBUG -O2 g++ ../../example/condvar/condvar.cpp -o condvar_release.exe -Wall -D_DEBUG -O2 g++ ../../example/mutex_business_logic/mutex_business_logic.cpp -o mutex_business_logic_release.exe -Wall -D_DEBUG -O2 g++ ../../example/ws_deque/ws_deque.cpp -o ws_deque_release.exe -Wall -D_DEBUG -O2 g++ ../../example/cli_ws_deque/cli_ws_deque.cpp -o cli_ws_deque_release.exe -Wall -D_DEBUG -O2 g++ ../../example/java_ws_deque/java_ws_deque.cpp -o java_ws_deque_release.exe -Wall -D_DEBUG -O2 g++ ../main.cpp -o test_release.exe -Wall -D_DEBUG -O2 ================================================ FILE: tests/relacy/relacy/test/g++/build_cygwin_release.cmd ================================================ #!/bin/bash g++ ../main.cpp -o test_release.exe -DNDEBUG -DRL_CYGWIN_STUB -Wall -O3 ================================================ FILE: tests/relacy/relacy/test/g++/build_debug.cmd ================================================ #!/bin/bash g++ ../main.cpp -o test_debug.exe -D_DEBUG -D_XOPEN_SOURCE -Wall -Wno-deprecated -g -O0 -fno-inline ================================================ FILE: tests/relacy/relacy/test/g++/build_release.cmd ================================================ #!/bin/bash g++ ../main.cpp -o test_release.exe -DNDEBUG -Wall -O3 -D_XOPEN_SOURCE -Wno-deprecated ================================================ FILE: tests/relacy/relacy/test/g++/test.cpp ================================================ //#ifdef _FORTIFY_SOURCE //#undef _FORTIFY_SOURCE //#endif //#define _FORTIFY_SOURCE 0 #include "../../relacy/pthread.h" class queue_t { public: queue_t() { VAR(head) = 0; VAR(tail) = 0; pthread_mutex_init(&mtx, 0); pthread_cond_init(&cv, 0); } ~queue_t() { pthread_mutex_destroy(&mtx); pthread_cond_destroy(&cv); } void enqueue(void* data) { node_t* n = new node_t; n->VAR(next) = 0; n->VAR(data) = data; bool was_empty = false; pthread_mutex_lock(&mtx); if (VAR(head) == 0) { was_empty = true; VAR(head) = n; VAR(tail) = n; } else { VAR(tail)->VAR(next) = n; VAR(tail) = n; } pthread_mutex_unlock(&mtx); if (was_empty) pthread_cond_broadcast(&cv); } void* dequeue() { node_t* n = 0; pthread_mutex_lock(&mtx); while (VAR(head) == 0) pthread_cond_wait(&cv, &mtx); n = VAR(head); if (n->VAR(next) == 0) VAR(tail) = 0; VAR(head) = n->VAR(next); pthread_mutex_unlock(&mtx); void* data = n->VAR(data); delete n; return data; } private: struct node_t { VAR_T(node_t*) next; VAR_T(void*) data; }; VAR_T(node_t*) head; VAR_T(node_t*) tail; pthread_mutex_t mtx; pthread_cond_t cv; }; void* enqueue_thread(void* ctx) { queue_t* q = static_cast(ctx); for (size_t i = 0; i != 4; i += 1) q->enqueue((void*)(i + 1)); return 0; } void* dequeue_thread(void* ctx) { queue_t* q = static_cast(ctx); for (size_t i = 0; i != 4; i += 1) { void* data = q->dequeue(); assert((int)(uintptr_t)data >= 1 && (int)(uintptr_t)data <= 4); } return 0; } void queue_test() { queue_t q; pthread_t th [4]; for (size_t i = 0; i != 2; i += 1) pthread_create(&th[i], 0, enqueue_thread, &q); for (size_t i = 2; i != 4; i += 1) pthread_create(&th[i], 0, dequeue_thread, &q); void* res = 0; for (size_t i = 0; i != 4; i += 1) pthread_join(th[i], &res); } int main() { rl::test_params p; p.iteration_count = 100000; //p.search_type = rl::sched_full; //p.context_bound = 5; //p.execution_depth_limit = 200; rl::execute(p); } ================================================ FILE: tests/relacy/relacy/test/iriw.cpp ================================================ #include "../relacy/relacy_std.hpp" struct test : rl::test_suite { std::atomic x_; std::atomic y_; int r2x, r2y, r3x, r3y; void before() { x_.store(0, std::memory_order_relaxed); y_.store(0, std::memory_order_relaxed); r2x = r2y = r3x = r3y = 0; } void thread(unsigned thread_index) { switch (thread_index) { case 0:; x_.store(1, std::memory_order_relaxed); break; case 1: y_.store(1, std::memory_order_relaxed); break; case 2: r2x = x_.load(std::memory_order_relaxed); std::atomic_thread_fence(std::memory_order_seq_cst); r2y = y_.load(std::memory_order_relaxed); break; case 3: r3y = y_.load(std::memory_order_relaxed); std::atomic_thread_fence(std::memory_order_seq_cst); r3x = x_.load(std::memory_order_relaxed); break; } } void after() { // This assert should fire according to C++ memory model, // however it does not in the current relacy implementation. RL_ASSERT(!(r2x == 1 && r3y == 1 && r2y == 0 && r3x == 0)); } }; int main() { rl::test_params p; p.iteration_count = 1000000; rl::simulate(p); } ================================================ FILE: tests/relacy/relacy/test/jtest/jtest.cpp ================================================ #include "stdafx.h" #include "../../relacy/relacy_java.hpp" class stack { public: stack() : head_(0) { } void push(int data) { rl::var n = new node (); VAR(n)->VAR(data_) = data; node* next = head_.load(rl::memory_order_relaxed); for (;;) { VAR(n)->next_.store(next, rl::memory_order_relaxed); if (head_.compare_exchange_weak(next, VAR(n), rl::memory_order_release)) break; } } int pop() { node* n = head_.load(rl::memory_order_acquire); for (;;) { if (0 == n) break; node* next = n->next_.load(rl::memory_order_relaxed); if (head_.compare_exchange_weak(n, next, rl::memory_order_acquire)) break; } if (n) { int data = n->VAR(data_); return data; } else { return 0; } } private: struct node { rl::atomic next_; rl::var data_; }; rl::atomic head_; stack(stack const&); stack& operator = (stack const&); }; struct stack_test : rl::test_suite { stack s_; int produced_count_; int consumed_count_; void before() { produced_count_ = 0; consumed_count_ = 0; } void after() { typedef rl::test_suite base_t; RL_ASSERT(base_t::params::thread_count == produced_count_); RL_ASSERT(base_t::params::thread_count == consumed_count_); } void thread(unsigned /*index*/) { s_.push(rand() + 1); produced_count_ += 1; int data = s_.pop(); RL_ASSERT(data); consumed_count_ += 1; } }; struct test_api : rl::test_suite { void thread(unsigned) { rl::jvolatile jv1; rl::jvolatile jv2 (2); rl::jvolatile jv3 (jv2($)); rl::jvolatile jv4 (jv1); jv1($) = jv3($); jv1($) = 2; (int)jv1($); jv1($) += 1; jv1($) -= 1; int x = jv1($)++; x = jv1($)--; x = --jv1($); x = ++jv1($); rl::AtomicInteger ai, ai2(1), ai3(x), ai4(ai($)), ai5(ai); x = ai($).get(); ai($).set(1); x = ai($).addAndGet(2); bool b = ai($).compareAndSet(1, 2); (void)b; x = ai($).addAndGet(2); x = ai($).getAndSet(2); } }; struct test_seq_cst_volatiles : rl::test_suite { rl::jvolatile flag0; rl::jvolatile flag1; rl::jvolatile turn; rl::var data; void thread(unsigned index) { if (0 == index) { flag0($) = 1; turn($) = 1; while (flag1($) && 1 == turn($)) rl::yield(1, $); data($) = 1; flag0($) = 0; } else { flag1($) = 1; turn($) = 0; while (flag0($) && 0 == turn($)) rl::yield(1, $); data($) = 2; flag1($) = 0; } } }; struct test_seq_cst_volatiles2 : rl::test_suite { rl::jvolatile x; rl::jvolatile y; int r1, r2, r3, r4; void before() { r1 = r2 = r3 = r4 = 0; } void thread(unsigned index) { if (0 == index) { x($) = 0; } else if (1 == index) { y($) = 0; } else if (2 == index) { r1 = x($); r2 = y($); } else if (3 == index) { r3 = y($); r4 = x($); } } void after() { RL_ASSERT(false == (r1 && !r2 && r3 && !r4)); } }; template struct test_unitialized_var : rl::test_suite, 2, rl::test_result_until_condition_hit> { rl::jvar*> www; void thread(unsigned index) { if (0 == index) { www($) = new rl::jvar (1); } else { while (0 == www($)) rl::yield(1, $); int x = (*www($))($); RL_UNTIL(x == expected); } } }; int main() { rl::simulate_f tests[] = { //!!! broken &rl::simulate >, &rl::simulate >, &rl::simulate, &rl::simulate, &rl::simulate, &rl::simulate, }; for (size_t i = 0; i != sizeof(tests)/sizeof(*tests); ++i) { rl::ostringstream stream; rl::test_params params; params.iteration_count = 10000; params.output_stream = &stream; params.progress_stream = &stream; params.context_bound = 2; params.execution_depth_limit = 500; if (false == tests[i](params)) { std::cout << std::endl; std::cout << "FAILED" << std::endl; std::cout << stream.str(); return 1; } else { std::cout << params.test_name << "...OK" << std::endl; } } std::cout << std::endl << "SUCCESS" << std::endl; } ================================================ FILE: tests/relacy/relacy/test/jtest/msvc8/jtest.sln ================================================  Microsoft Visual Studio Solution File, Format Version 9.00 # Visual Studio 2005 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "jtest", "jtest.vcproj", "{1889E8F4-47F7-48B6-9FC7-61FD7CD000C8}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "rrd", "..\..\test\msvc8\rrd.vcproj", "{D4F501D0-382D-4CBC-86F4-56181F383444}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Win32 = Debug|Win32 Debug|x64 = Debug|x64 Debug64|Win32 = Debug64|Win32 Debug64|x64 = Debug64|x64 Release|Win32 = Release|Win32 Release|x64 = Release|x64 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {1889E8F4-47F7-48B6-9FC7-61FD7CD000C8}.Debug|Win32.ActiveCfg = Debug|Win32 {1889E8F4-47F7-48B6-9FC7-61FD7CD000C8}.Debug|Win32.Build.0 = Debug|Win32 {1889E8F4-47F7-48B6-9FC7-61FD7CD000C8}.Debug|x64.ActiveCfg = Debug|Win32 {1889E8F4-47F7-48B6-9FC7-61FD7CD000C8}.Debug64|Win32.ActiveCfg = Debug|Win32 {1889E8F4-47F7-48B6-9FC7-61FD7CD000C8}.Debug64|Win32.Build.0 = Debug|Win32 {1889E8F4-47F7-48B6-9FC7-61FD7CD000C8}.Debug64|x64.ActiveCfg = Debug|Win32 {1889E8F4-47F7-48B6-9FC7-61FD7CD000C8}.Release|Win32.ActiveCfg = Release|Win32 {1889E8F4-47F7-48B6-9FC7-61FD7CD000C8}.Release|Win32.Build.0 = Release|Win32 {1889E8F4-47F7-48B6-9FC7-61FD7CD000C8}.Release|x64.ActiveCfg = Release|Win32 {D4F501D0-382D-4CBC-86F4-56181F383444}.Debug|Win32.ActiveCfg = Debug|Win32 {D4F501D0-382D-4CBC-86F4-56181F383444}.Debug|Win32.Build.0 = Debug|Win32 {D4F501D0-382D-4CBC-86F4-56181F383444}.Debug|x64.ActiveCfg = Debug|x64 {D4F501D0-382D-4CBC-86F4-56181F383444}.Debug|x64.Build.0 = Debug|x64 {D4F501D0-382D-4CBC-86F4-56181F383444}.Debug64|Win32.ActiveCfg = Debug64|Win32 {D4F501D0-382D-4CBC-86F4-56181F383444}.Debug64|Win32.Build.0 = Debug64|Win32 {D4F501D0-382D-4CBC-86F4-56181F383444}.Debug64|x64.ActiveCfg = Debug64|x64 {D4F501D0-382D-4CBC-86F4-56181F383444}.Debug64|x64.Build.0 = Debug64|x64 {D4F501D0-382D-4CBC-86F4-56181F383444}.Release|Win32.ActiveCfg = Release|Win32 {D4F501D0-382D-4CBC-86F4-56181F383444}.Release|Win32.Build.0 = Release|Win32 {D4F501D0-382D-4CBC-86F4-56181F383444}.Release|x64.ActiveCfg = Release|x64 {D4F501D0-382D-4CBC-86F4-56181F383444}.Release|x64.Build.0 = Release|x64 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection EndGlobal ================================================ FILE: tests/relacy/relacy/test/jtest/msvc8/jtest.vcproj ================================================ ================================================ FILE: tests/relacy/relacy/test/jtest/msvc9/jtest.sln ================================================  Microsoft Visual Studio Solution File, Format Version 10.00 # Visual Studio 2008 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "jtest", "jtest.vcproj", "{1889E8F4-47F7-48B6-9FC7-61FD7CD000C8}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "rrd", "..\..\test\msvc9\rrd.vcproj", "{D4F501D0-382D-4CBC-86F4-56181F383444}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Win32 = Debug|Win32 Debug|x64 = Debug|x64 Debug64|Win32 = Debug64|Win32 Debug64|x64 = Debug64|x64 Release|Win32 = Release|Win32 Release|x64 = Release|x64 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {1889E8F4-47F7-48B6-9FC7-61FD7CD000C8}.Debug|Win32.ActiveCfg = Debug|Win32 {1889E8F4-47F7-48B6-9FC7-61FD7CD000C8}.Debug|Win32.Build.0 = Debug|Win32 {1889E8F4-47F7-48B6-9FC7-61FD7CD000C8}.Debug|x64.ActiveCfg = Debug|Win32 {1889E8F4-47F7-48B6-9FC7-61FD7CD000C8}.Debug64|Win32.ActiveCfg = Debug|Win32 {1889E8F4-47F7-48B6-9FC7-61FD7CD000C8}.Debug64|Win32.Build.0 = Debug|Win32 {1889E8F4-47F7-48B6-9FC7-61FD7CD000C8}.Debug64|x64.ActiveCfg = Debug|Win32 {1889E8F4-47F7-48B6-9FC7-61FD7CD000C8}.Release|Win32.ActiveCfg = Release|Win32 {1889E8F4-47F7-48B6-9FC7-61FD7CD000C8}.Release|Win32.Build.0 = Release|Win32 {1889E8F4-47F7-48B6-9FC7-61FD7CD000C8}.Release|x64.ActiveCfg = Release|Win32 {D4F501D0-382D-4CBC-86F4-56181F383444}.Debug|Win32.ActiveCfg = Debug|Win32 {D4F501D0-382D-4CBC-86F4-56181F383444}.Debug|Win32.Build.0 = Debug|Win32 {D4F501D0-382D-4CBC-86F4-56181F383444}.Debug|x64.ActiveCfg = Debug|x64 {D4F501D0-382D-4CBC-86F4-56181F383444}.Debug|x64.Build.0 = Debug|x64 {D4F501D0-382D-4CBC-86F4-56181F383444}.Debug64|Win32.ActiveCfg = Debug64|Win32 {D4F501D0-382D-4CBC-86F4-56181F383444}.Debug64|Win32.Build.0 = Debug64|Win32 {D4F501D0-382D-4CBC-86F4-56181F383444}.Debug64|x64.ActiveCfg = Debug64|x64 {D4F501D0-382D-4CBC-86F4-56181F383444}.Debug64|x64.Build.0 = Debug64|x64 {D4F501D0-382D-4CBC-86F4-56181F383444}.Release|Win32.ActiveCfg = Release|Win32 {D4F501D0-382D-4CBC-86F4-56181F383444}.Release|Win32.Build.0 = Release|Win32 {D4F501D0-382D-4CBC-86F4-56181F383444}.Release|x64.ActiveCfg = Release|x64 {D4F501D0-382D-4CBC-86F4-56181F383444}.Release|x64.Build.0 = Release|x64 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection EndGlobal ================================================ FILE: tests/relacy/relacy/test/jtest/msvc9/jtest.vcproj ================================================ ================================================ FILE: tests/relacy/relacy/test/jtest/stdafx.cpp ================================================ #include "stdafx.h" ================================================ FILE: tests/relacy/relacy/test/jtest/stdafx.h ================================================ #pragma once #define RL_JAVA_MODE #include "../../relacy/pch.hpp" ================================================ FILE: tests/relacy/relacy/test/main.cpp ================================================ #include "stdafx.h" //#define RL_MSVC_OUTPUT #include "../relacy/relacy_std.hpp" #include "memory_order.hpp" #include "fence.hpp" #include "data_race.hpp" #include "mutex.hpp" #include "condvar.hpp" #include "semaphore.hpp" #include "event.hpp" #include "scheduler.hpp" #include "compare_swap.hpp" #include "wfmo.hpp" #include "thread_local.hpp" #include "dyn_thread.hpp" #include "memory.hpp" #include "pthread.hpp" #include "windows.hpp" #include "addr_hash.hpp" #include "futex.hpp" #include "../relacy/windows.h" #include "../relacy/pthread.h" #include #include class queue_t { public: queue_t() { VAR(head) = 0; VAR(tail) = 0; pthread_mutex_init(&mtx, 0); pthread_cond_init(&cv, 0); } ~queue_t() { pthread_mutex_destroy(&mtx); pthread_cond_destroy(&cv); } void enqueue(void* data) { node_t* n = new node_t; n->VAR(next) = 0; n->VAR(data) = data; bool was_empty = false; pthread_mutex_lock(&mtx); if (VAR(head) == 0) { was_empty = true; VAR(head) = n; VAR(tail) = n; } else { VAR(tail)->VAR(next) = n; VAR(tail) = n; } pthread_mutex_unlock(&mtx); if (was_empty) pthread_cond_broadcast(&cv); } void* dequeue() { node_t* n = 0; pthread_mutex_lock(&mtx); while (VAR(head) == 0) pthread_cond_wait(&cv, &mtx); n = VAR(head); if (n->VAR(next) == 0) VAR(tail) = 0; VAR(head) = n->VAR(next); pthread_mutex_unlock(&mtx); void* data = n->VAR(data); delete n; return data; } private: struct node_t { VAR_T(node_t*) next; VAR_T(void*) data; }; VAR_T(node_t*) head; VAR_T(node_t*) tail; pthread_mutex_t mtx; pthread_cond_t cv; }; void* enqueue_thread(void* ctx) { queue_t* q = static_cast(ctx); for (size_t i = 0; i != 4; i += 1) q->enqueue((void*)(i + 1)); return 0; } void* dequeue_thread(void* ctx) { queue_t* q = static_cast(ctx); for (size_t i = 0; i != 4; i += 1) { void* data = q->dequeue(); assert((int)(uintptr_t)data >= 1 && (int)(uintptr_t)data <= 4); } return 0; } void queue_test() { queue_t q; pthread_t th [4]; for (size_t i = 0; i != 2; i += 1) pthread_create(&th[i], 0, enqueue_thread, &q); for (size_t i = 2; i != 4; i += 1) pthread_create(&th[i], 0, dequeue_thread, &q); void* res = 0; for (size_t i = 0; i != 4; i += 1) pthread_join(th[i], &res); } /* class recursive_timed_mutex { public: recursive_timed_mutex() { sema.init(false, 1, 1, $); owner = -1; recursion_count = 0; } ~recursive_timed_mutex() { assert(owner == -1 && recursion_count == 0); sema.deinit($); } void lock(rl::debug_info_param info) { rl::context& c = rl::ctx(); if (owner == c.current_thread()) { RL_HIST(rl::user_msg_event) {"recursive mutex lock"} RL_HIST_END(); assert(recursion_count > 0); recursion_count += 1; } else { sema.wait(false, false, info); assert(owner == -1 && recursion_count == 0); owner = c.current_thread(); recursion_count = 1; } } bool try_lock(rl::debug_info_param info) { rl::context& c = rl::ctx(); if (owner == c.current_thread()) { RL_HIST(rl::user_msg_event) {"recursive mutex try lock"} RL_HIST_END(); assert(recursion_count > 0); recursion_count += 1; return true; } else { rl::sema_wakeup_reason r = sema.wait(true, false, info); if (r == rl::sema_wakeup_reason_success) { assert(owner == -1 && recursion_count == 0); owner = c.current_thread(); recursion_count = 1; return true; } else { return false; } } } void unlock(rl::debug_info_param info) { rl::context& c = rl::ctx(); assert(owner == c.current_thread() && recursion_count > 0); RL_HIST(rl::user_msg_event) {"recursive mutex unlock"} RL_HIST_END(); recursion_count -= 1; if (recursion_count == 0) { owner = -1; unsigned prev; sema.post(1, prev, info); } } bool timed_lock(rl::debug_info_param info, ... ) { rl::context& c = rl::ctx(); if (owner == c.current_thread()) { RL_HIST(rl::user_msg_event) {"recursive mutex timed lock"} RL_HIST_END(); assert(recursion_count > 0); recursion_count += 1; return true; } else { rl::sema_wakeup_reason r = sema.wait(false, true, info); if (r == rl::sema_wakeup_reason_success) { assert(owner == -1 && recursion_count == 0); owner = c.current_thread(); recursion_count = 1; return true; } else { return false; } } } private: struct tag_t; rl::semaphore sema; rl::thread_id_t owner; int recursion_count; recursive_timed_mutex(recursive_timed_mutex const&); recursive_timed_mutex& operator = (recursive_timed_mutex const&); }; */ class recursive_timed_mutex { public: recursive_timed_mutex() { mtx = CreateMutex(0, 0, 0); } ~recursive_timed_mutex() { CloseHandle(mtx); } void lock(rl::debug_info_param info) { rl::rl_WaitForSingleObject(mtx, INFINITE, info); } bool try_lock(rl::debug_info_param info) { return WAIT_OBJECT_0 == rl::rl_WaitForSingleObject(mtx, 0, info); } void unlock(rl::debug_info_param info) { rl::rl_ReleaseMutex(mtx, info); } bool timed_lock(rl::debug_info_param info, ... /*abs_time*/) { return WAIT_OBJECT_0 == rl::rl_WaitForSingleObject(mtx, 1, info); } private: HANDLE mtx; recursive_timed_mutex(recursive_timed_mutex const&); recursive_timed_mutex& operator = (recursive_timed_mutex const&); }; struct recursive_timed_mutex_test : rl::test_suite { recursive_timed_mutex mtx; VAR_T(int) data; void thread(unsigned idx) { if (idx) { mtx.lock($); mtx.lock($); VAR(data) = 1; mtx.unlock($); mtx.unlock($); } else { if (mtx.timed_lock($)) { VAR(data) = 2; mtx.unlock($); } } } void after() { //assert(VAR(data) != 2); } }; int main() { //rl::test_params p; //p.search_type = rl::sched_full; //p.context_bound = 5; //p.execution_depth_limit = 200; //rl::simulate(p); //if (rand() <= RAND_MAX) return 0; //rl::execute(); //if (rand() <= RAND_MAX) return 0; //rl::test_params p; //p.initial_state = "1000000"; //p.iteration_count = 2000000; //p.collect_history = true; //p.output_history = true; //p.search_type = rl::sched_bound; //p.search_type = rl::sched_full; //p.execution_depth_limit = 500; //p.context_bound = 1; //rl::simulate(p); //std::cout << "scheduler state = \"" << p.final_state << "\"" << std::endl; //std::cout << std::endl; //if (rand() <= RAND_MAX) return 0; //rl::test_params p; //p.iteration_count = 80000000; //p.initial_state = "50000000"; //p.search_type = rl::fair_context_bound_scheduler_type; //p.context_bound = 1; //p.collect_history = true; //p.output_history = true; //rl::simulate(p); //if (rand() <= RAND_MAX) return 0; //rl::test_params p; //p.context_bound = 1; //p.iteration_count = 1000; //p.search_type = rl::fair_full_search_scheduler_type; //p.search_type = rl::random_scheduler_type; //p.collect_history = true; //p.output_history = true; //p.execution_depth_limit = 1000; //p.initial_state = "550 24 3 0 0 3 0 0 3 0 0 3 0 0 2 0 4 2 0 0 2 0 4 2 1 0 2 0 4 3 1 0 3 0 0 2 0 0 1 0 4 2 0 4 3 0 0 3 0 0 2 0 4 3 1 0 3 0 0 2 1 0 2 0 4 2 1 0 2 1 0 2 1 4"; //bool result = rl::simulate(p); //std::cout << "result=" << result << std::endl; //simulate(); //if (rand() <= RAND_MAX) return 0; rl::simulate_f tests[] = { #if 1 &rl::simulate, &rl::simulate, &rl::simulate, //!!! fails &rl::simulate, &rl::simulate, // memory model &rl::simulate, &rl::simulate, &rl::simulate, &rl::simulate, &rl::simulate, &rl::simulate, &rl::simulate, &rl::simulate >, &rl::simulate >, &rl::simulate >, &rl::simulate >, &rl::simulate >, &rl::simulate, &rl::simulate, &rl::simulate >, &rl::simulate >, &rl::simulate, &rl::simulate, &rl::simulate, &rl::simulate, &rl::simulate, &rl::simulate, &rl::simulate, &rl::simulate, &rl::simulate, &rl::simulate, &rl::simulate, &rl::simulate, &rl::simulate, // fences &rl::simulate >, &rl::simulate >, &rl::simulate >, &rl::simulate >, &rl::simulate >, &rl::simulate >, &rl::simulate, &rl::simulate >, &rl::simulate >, // data races &rl::simulate, &rl::simulate, &rl::simulate, &rl::simulate, &rl::simulate, &rl::simulate, &rl::simulate, &rl::simulate, &rl::simulate, // compare_exchange &rl::simulate >, &rl::simulate >, &rl::simulate >, // mutex &rl::simulate, &rl::simulate, &rl::simulate, &rl::simulate, &rl::simulate, &rl::simulate, &rl::simulate, &rl::simulate, &rl::simulate, &rl::simulate, // futex &rl::simulate, &rl::simulate, &rl::simulate, &rl::simulate, &rl::simulate, // condition variable &rl::simulate, &rl::simulate, // semaphore &rl::simulate, &rl::simulate, // event &rl::simulate, &rl::simulate, &rl::simulate, //wfmo &rl::simulate, &rl::simulate, &rl::simulate, &rl::simulate, &rl::simulate, &rl::simulate, &rl::simulate, &rl::simulate, &rl::simulate, // thread local storage &rl::simulate, &rl::simulate, &rl::simulate, &rl::simulate, // dynamic thread &rl::simulate, &rl::simulate, &rl::simulate, #endif }; for (size_t sched = 0; sched != rl::sched_count; ++sched) { std::cout << format((rl::scheduler_type_e)sched) << " tests:" << std::endl; for (size_t i = 0; i != sizeof(tests)/sizeof(*tests); ++i) { //!!! make it work under sched_full if (sched == rl::sched_full && (tests[i] == (rl::simulate_f)&rl::simulate || tests[i] == (rl::simulate_f)&rl::simulate)) continue; rl::ostringstream stream; rl::test_params params; params.search_type = (rl::scheduler_type_e)sched; params.iteration_count = (params.test_result == rl::test_result_success ? 100000 : 500); params.output_stream = &stream; params.progress_stream = &stream; params.context_bound = 2; params.execution_depth_limit = 500; if (false == tests[i](params)) { std::cout << std::endl; std::cout << "FAILED" << std::endl; std::cout << stream.str(); std::cout << std::endl; return 1; } else { std::cout << params.test_name << "...OK" << std::endl; } } std::cout << std::endl; } rl::simulate_f scheduler_tests[] = { &rl::simulate, &rl::simulate, }; std::cout << "full search scheduler tests:" << std::endl; for (size_t i = 0; i != sizeof(scheduler_tests)/sizeof(*scheduler_tests); ++i) { rl::ostringstream stream; rl::test_params params; params.search_type = rl::sched_full; params.output_stream = &stream; params.progress_stream = &stream; params.context_bound = 2; params.execution_depth_limit = 500; if (false == scheduler_tests[i](params)) { std::cout << std::endl; std::cout << "FAILED" << std::endl; std::cout << stream.str(); return 1; } else { std::cout << params.test_name << "...OK" << std::endl; } } std::cout << std::endl; std::cout << "SUCCESS" << std::endl; } ================================================ FILE: tests/relacy/relacy/test/memory.hpp ================================================ #pragma once #include "../relacy/relacy_std.hpp" struct test_memory_allocation : rl::test_suite { void thread(unsigned /*index*/) { VAR_T(int)* p1 = new VAR_T(int) (5), i1 = 5, * p11 = new VAR_T(int) (6); VAR(p1[0]) = 1; delete p1, delete p11; VAR_T(int)* p2 = new VAR_T(int) [10], i2 = 6, *p22 = new VAR_T(int) [20]; VAR(p2[0]) = 1; delete [] p2, delete [] p22; void* p3 = malloc(10), *i3 = 0, *p33 = malloc(20); free(p3), free(p33); void* p4 = malloc(sizeof(int)); int* i4 = new (p4) int (11); free(p4); //RL_ASSERT(false); (void)i1, (void)i2, (void)i3; (void)i4; } }; ================================================ FILE: tests/relacy/relacy/test/memory_order.hpp ================================================ #pragma once #include "../relacy/relacy_std.hpp" struct coherent_read_read_test : rl::test_suite { std::atomic x; std::atomic y; void before() { x($) = 0; y($) = 0; } void thread(unsigned th) { if (0 == th) x.store(1, rl::memory_order_relaxed); else if (1 == th) { if (0 == x.load(rl::memory_order_relaxed)) return; y.store(1, rl::memory_order_release); x.load(rl::memory_order_relaxed); } else { if (0 == y.load(rl::memory_order_acquire)) return; RL_ASSERT(1 == x.load(rl::memory_order_relaxed)); } } }; template struct order_relaxed_test : rl::test_suite, 2> { std::atomic x1; std::atomic x2; void before() { x1($) = 0; x2($) = 0; } void thread(unsigned th) { if (th) { x1.store(1, order().first, $); x2.store(1, order().first, $); } else { int y2 = x2.load(order().second, $); int y1 = x1.load(order().second, $); //RL_UNTIL(0 == y1 && 0 != y2); (void)y2; (void)y1; } } std::pair order() { switch (index) { default: RL_VERIFY(false); case 0: return std::make_pair(rl::mo_relaxed, rl::mo_relaxed); case 1: return std::make_pair(rl::mo_release, rl::mo_relaxed); case 2: return std::make_pair(rl::mo_seq_cst, rl::mo_relaxed); case 3: return std::make_pair(rl::mo_relaxed, rl::mo_acquire); case 4: return std::make_pair(rl::mo_relaxed, rl::mo_seq_cst); } } }; struct reorder_single_var_test : rl::test_suite { std::atomic x; void before() { x($) = 0; } void thread(unsigned index) { if (index) { x.store(1, rl::memory_order_relaxed); } else { int y1 = x.load(rl::memory_order_relaxed); int y2 = x.load(rl::memory_order_relaxed); RL_ASSERT(y1 == 0 || y2 == 1); } } }; struct acq_rel_test : rl::test_suite { std::atomic x; rl::var y; void before() { x($) = 0; } void thread(unsigned index) { if (index) { VAR(y) = 1; x.store(1, std::memory_order_release); } else { int f = x.load(rl::memory_order_acquire); if (f) { int d = VAR(y); RL_ASSERT(1 == d); } } } }; template struct seq_cst_test : rl::test_suite, 4, (rl::test_result_e)((1 - index) * rl::test_result_until_condition_hit)> { std::atomic x1; std::atomic x2; int res; void before() { x1($) = 0; x2($) = 0; res = 0; } void thread(unsigned th) { if (0 == th) { x1.store(1, order().first, $); } else if (1 == th) { x2.store(1, order().first, $); } else if (2 == th) { int v1 = x1.load(order().second, $); int v2 = x2.load(order().second, $); res += (v1 == 1 && v2 == 0); } else if (3 == th) { int v2 = x2.load(order().second, $); int v1 = x1.load(order().second, $); res += (v2 == 1 && v1 == 0); } } void after() { if ((void)0, 0 == index) { RL_UNTIL(2 == res); } else { RL_ASSERT(2 != res); } } std::pair order() { switch (index) { default: RL_VERIFY(false); case 0: return std::make_pair(rl::mo_release, rl::mo_acquire); case 1: return std::make_pair(rl::mo_seq_cst, rl::mo_seq_cst); } } }; struct modification_order_test : rl::test_suite { std::atomic a; rl::var x; void before() { a($) = 0; x($) = 0; } void thread(unsigned index) { if (index) { x($) = 1; a.store(1, rl::memory_order_release); a.store(2, rl::memory_order_relaxed); } else { if (a.load(rl::memory_order_acquire)) x($).load(); } } }; struct reordering_test : rl::test_suite { std::atomic x; std::atomic y; std::atomic r; void before() { x($) = 0; y($) = 0; r($) = 0; } void thread(unsigned index) { if (0 == index) { x.store(1, rl::memory_order_relaxed); } else if (1 == index) { if (x.load(rl::memory_order_relaxed)) r.store(1, rl::memory_order_relaxed); y.store(1, rl::memory_order_release); } else { if (y.load(rl::memory_order_acquire)) { if (r.load(rl::memory_order_relaxed)) { RL_ASSERT(x.load(rl::memory_order_relaxed)); } } } } }; struct reordering_test2 : rl::test_suite { std::atomic x1; std::atomic x2; std::atomic y; std::atomic r; void before() { std::atomic x (0); char* ch = 0; x.compare_exchange_weak(ch, 0, std::memory_order_seq_cst); x1($) = 0; x2($) = 0; y($) = 0; r($) = 0; } void thread(unsigned index) { if (0 == index) { x1.store(1, rl::memory_order_relaxed); x2.store(1, rl::memory_order_relaxed); } else if (1 == index) { if (x2.load(rl::memory_order_relaxed)) r.store(1, rl::memory_order_relaxed); y.store(1, rl::memory_order_release); } else { if (y.load(rl::memory_order_acquire)) { if (r.load(rl::memory_order_relaxed)) { RL_UNTIL(0 == x1.load(rl::memory_order_relaxed)); } } } } }; struct transitive_test : rl::test_suite { std::atomic x; rl::var y; void before() { x($) = 0; } void thread(unsigned index) { if (0 == index) { VAR(y) = 1; x.fetch_add(1, rl::memory_order_release); } else if (1 == index) { x.fetch_add(2, rl::memory_order_acquire); } else { x.load(rl::memory_order_acquire); int w = x.load(rl::memory_order_acquire); if (1 == w || 3 == w) { y($).load(); } } } }; struct cc_transitive_test : rl::test_suite { std::atomic x; std::atomic y; void before() { x.store(0, std::memory_order_relaxed); y.store(0, std::memory_order_relaxed); } void thread(unsigned index) { if (0 == index) { x.store(1, std::memory_order_relaxed); } else if (1 == index) { if (x.load(std::memory_order_relaxed)) y.store(1, std::memory_order_release); } else { if (y.load(std::memory_order_acquire)) assert(x.load(std::memory_order_relaxed)); } } }; struct occasional_test : rl::test_suite { std::atomic x, y, z; void before() { x.store(0, std::memory_order_relaxed); y.store(0, std::memory_order_relaxed); z.store(0, std::memory_order_relaxed); } void thread(unsigned index) { if (0 == index) { x.store(1, rl::memory_order_relaxed); y.store(1, rl::memory_order_release); } else if (1 == index) { if (y.load(rl::memory_order_relaxed)) z.store(1, rl::memory_order_release); } else { if (z.load(rl::memory_order_acquire)) { RL_ASSERT(y.load(rl::memory_order_relaxed)); RL_UNTIL(0 == x.load(rl::memory_order_relaxed)); } } } }; ================================================ FILE: tests/relacy/relacy/test/msvc71/test.sln ================================================ Microsoft Visual Studio Solution File, Format Version 8.00 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "test", "test.vcproj", "{8C8174E2-2B2E-484D-9EB4-85D29347F22F}" ProjectSection(ProjectDependencies) = postProject EndProjectSection EndProject Global GlobalSection(SolutionConfiguration) = preSolution Debug = Debug Release = Release EndGlobalSection GlobalSection(ProjectConfiguration) = postSolution {8C8174E2-2B2E-484D-9EB4-85D29347F22F}.Debug.ActiveCfg = Debug|Win32 {8C8174E2-2B2E-484D-9EB4-85D29347F22F}.Debug.Build.0 = Debug|Win32 {8C8174E2-2B2E-484D-9EB4-85D29347F22F}.Release.ActiveCfg = Release|Win32 {8C8174E2-2B2E-484D-9EB4-85D29347F22F}.Release.Build.0 = Release|Win32 EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution EndGlobalSection GlobalSection(ExtensibilityAddIns) = postSolution EndGlobalSection EndGlobal ================================================ FILE: tests/relacy/relacy/test/msvc71/test.vcproj ================================================ ================================================ FILE: tests/relacy/relacy/test/msvc8/rrd.sln ================================================  Microsoft Visual Studio Solution File, Format Version 9.00 # Visual Studio 2005 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "test", "test.vcproj", "{99882C71-3316-411F-A8AE-EC1E40702040}" ProjectSection(WebsiteProperties) = preProject Debug.AspNetCompiler.Debug = "True" Release.AspNetCompiler.Debug = "False" EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "rrd", "rrd.vcproj", "{D4F501D0-382D-4CBC-86F4-56181F383444}" ProjectSection(WebsiteProperties) = preProject Debug.AspNetCompiler.Debug = "True" Release.AspNetCompiler.Debug = "False" EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "peterson", "..\..\example\peterson\msvc8\peterson.vcproj", "{D4756EE9-3953-4E17-B1B5-E89F853303C1}" ProjectSection(WebsiteProperties) = preProject Debug.AspNetCompiler.Debug = "True" Release.AspNetCompiler.Debug = "False" EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "proxy_collector", "..\..\example\proxy_collector\msvc8\proxy_collector.vcproj", "{31994C0C-3BAD-4F25-8BC8-3206FF349B29}" ProjectSection(WebsiteProperties) = preProject Debug.AspNetCompiler.Debug = "True" Release.AspNetCompiler.Debug = "False" EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ref_counting", "..\..\example\ref_counting\msvc8\ref_counting.vcproj", "{31994C0C-3BAD-4F25-8BC8-3206FF349B28}" ProjectSection(WebsiteProperties) = preProject Debug.AspNetCompiler.Debug = "True" Release.AspNetCompiler.Debug = "False" EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "stack", "..\..\example\stack\msvc8\stack.vcproj", "{4D6D7FC3-66D1-4F80-B434-2FDCBBFBC9F5}" ProjectSection(WebsiteProperties) = preProject Debug.AspNetCompiler.Debug = "True" Release.AspNetCompiler.Debug = "False" EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "spsc_queue", "..\..\example\spsc_queue\msvc8\spsc_queue.vcproj", "{2F0B1A3B-27CA-47D4-A9D1-5EC66BB0A85B}" ProjectSection(WebsiteProperties) = preProject Debug.AspNetCompiler.Debug = "True" Release.AspNetCompiler.Debug = "False" EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "condvar", "..\..\example\condvar\msvc8\condvar.vcproj", "{6CC59CF8-408B-441B-8F65-15651210CB82}" ProjectSection(WebsiteProperties) = preProject Debug.AspNetCompiler.Debug = "True" Release.AspNetCompiler.Debug = "False" EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "smr", "..\..\example\smr\msvc8\smr.vcproj", "{BC168133-5E3D-4691-BA15-8E0FD61DFDB5}" ProjectSection(WebsiteProperties) = preProject Debug.AspNetCompiler.Debug = "True" Release.AspNetCompiler.Debug = "False" EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mutex_business_logic", "..\..\example\mutex_business_logic\msvc8\mutex_business_logic.vcproj", "{B03A7216-E196-44C6-8861-C77D90055512}" ProjectSection(WebsiteProperties) = preProject Debug.AspNetCompiler.Debug = "True" Release.AspNetCompiler.Debug = "False" EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ws_deque", "..\..\example\ws_deque\msvc8\ws_deque.vcproj", "{0B597F19-DEBB-4832-B520-9A93A286D595}" ProjectSection(WebsiteProperties) = preProject Debug.AspNetCompiler.Debug = "True" Release.AspNetCompiler.Debug = "False" EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "jtest", "..\..\jtest\msvc8\jtest.vcproj", "{1889E8F4-47F7-48B6-9FC7-61FD7CD000C8}" ProjectSection(WebsiteProperties) = preProject Debug.AspNetCompiler.Debug = "True" Release.AspNetCompiler.Debug = "False" EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ntest", "..\..\ntest\msvc8\ntest.vcproj", "{D8A75C0E-3C9A-42E5-97EC-75AEBE64C372}" ProjectSection(WebsiteProperties) = preProject Debug.AspNetCompiler.Debug = "True" Release.AspNetCompiler.Debug = "False" EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cli_ws_deque", "..\..\example\cli_ws_deque\msvc8\cli_ws_deque.vcproj", "{967F376B-BDBF-4AC8-9325-371CC8ABD8FD}" ProjectSection(WebsiteProperties) = preProject Debug.AspNetCompiler.Debug = "True" Release.AspNetCompiler.Debug = "False" EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "java_ws_deque", "..\..\example\java_ws_deque\msvc8\java_ws_deque.vcproj", "{9E88433F-779E-4461-9963-35E3338873AC}" ProjectSection(WebsiteProperties) = preProject Debug.AspNetCompiler.Debug = "True" Release.AspNetCompiler.Debug = "False" EndProjectSection EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Win32 = Debug|Win32 Profile|Win32 = Profile|Win32 Release|Win32 = Release|Win32 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {99882C71-3316-411F-A8AE-EC1E40702040}.Debug|Win32.ActiveCfg = Debug|Win32 {99882C71-3316-411F-A8AE-EC1E40702040}.Debug|Win32.Build.0 = Debug|Win32 {99882C71-3316-411F-A8AE-EC1E40702040}.Profile|Win32.ActiveCfg = Profile|Win32 {99882C71-3316-411F-A8AE-EC1E40702040}.Release|Win32.ActiveCfg = Release|Win32 {99882C71-3316-411F-A8AE-EC1E40702040}.Release|Win32.Build.0 = Release|Win32 {D4F501D0-382D-4CBC-86F4-56181F383444}.Debug|Win32.ActiveCfg = Debug|Win32 {D4F501D0-382D-4CBC-86F4-56181F383444}.Debug|Win32.Build.0 = Debug|Win32 {D4F501D0-382D-4CBC-86F4-56181F383444}.Profile|Win32.ActiveCfg = Release|Win32 {D4F501D0-382D-4CBC-86F4-56181F383444}.Profile|Win32.Build.0 = Release|Win32 {D4F501D0-382D-4CBC-86F4-56181F383444}.Release|Win32.ActiveCfg = Release|Win32 {D4F501D0-382D-4CBC-86F4-56181F383444}.Release|Win32.Build.0 = Release|Win32 {D4756EE9-3953-4E17-B1B5-E89F853303C1}.Debug|Win32.ActiveCfg = Debug|Win32 {D4756EE9-3953-4E17-B1B5-E89F853303C1}.Debug|Win32.Build.0 = Debug|Win32 {D4756EE9-3953-4E17-B1B5-E89F853303C1}.Profile|Win32.ActiveCfg = Release|Win32 {D4756EE9-3953-4E17-B1B5-E89F853303C1}.Profile|Win32.Build.0 = Release|Win32 {D4756EE9-3953-4E17-B1B5-E89F853303C1}.Release|Win32.ActiveCfg = Release|Win32 {D4756EE9-3953-4E17-B1B5-E89F853303C1}.Release|Win32.Build.0 = Release|Win32 {31994C0C-3BAD-4F25-8BC8-3206FF349B29}.Debug|Win32.ActiveCfg = Debug|Win32 {31994C0C-3BAD-4F25-8BC8-3206FF349B29}.Debug|Win32.Build.0 = Debug|Win32 {31994C0C-3BAD-4F25-8BC8-3206FF349B29}.Profile|Win32.ActiveCfg = Profile|Win32 {31994C0C-3BAD-4F25-8BC8-3206FF349B29}.Profile|Win32.Build.0 = Profile|Win32 {31994C0C-3BAD-4F25-8BC8-3206FF349B29}.Release|Win32.ActiveCfg = Release|Win32 {31994C0C-3BAD-4F25-8BC8-3206FF349B29}.Release|Win32.Build.0 = Release|Win32 {31994C0C-3BAD-4F25-8BC8-3206FF349B28}.Debug|Win32.ActiveCfg = Debug|Win32 {31994C0C-3BAD-4F25-8BC8-3206FF349B28}.Debug|Win32.Build.0 = Debug|Win32 {31994C0C-3BAD-4F25-8BC8-3206FF349B28}.Profile|Win32.ActiveCfg = Release|Win32 {31994C0C-3BAD-4F25-8BC8-3206FF349B28}.Profile|Win32.Build.0 = Release|Win32 {31994C0C-3BAD-4F25-8BC8-3206FF349B28}.Release|Win32.ActiveCfg = Release|Win32 {31994C0C-3BAD-4F25-8BC8-3206FF349B28}.Release|Win32.Build.0 = Release|Win32 {4D6D7FC3-66D1-4F80-B434-2FDCBBFBC9F5}.Debug|Win32.ActiveCfg = Debug|Win32 {4D6D7FC3-66D1-4F80-B434-2FDCBBFBC9F5}.Debug|Win32.Build.0 = Debug|Win32 {4D6D7FC3-66D1-4F80-B434-2FDCBBFBC9F5}.Profile|Win32.ActiveCfg = Release|Win32 {4D6D7FC3-66D1-4F80-B434-2FDCBBFBC9F5}.Profile|Win32.Build.0 = Release|Win32 {4D6D7FC3-66D1-4F80-B434-2FDCBBFBC9F5}.Release|Win32.ActiveCfg = Release|Win32 {4D6D7FC3-66D1-4F80-B434-2FDCBBFBC9F5}.Release|Win32.Build.0 = Release|Win32 {2F0B1A3B-27CA-47D4-A9D1-5EC66BB0A85B}.Debug|Win32.ActiveCfg = Debug|Win32 {2F0B1A3B-27CA-47D4-A9D1-5EC66BB0A85B}.Debug|Win32.Build.0 = Debug|Win32 {2F0B1A3B-27CA-47D4-A9D1-5EC66BB0A85B}.Profile|Win32.ActiveCfg = Release|Win32 {2F0B1A3B-27CA-47D4-A9D1-5EC66BB0A85B}.Profile|Win32.Build.0 = Release|Win32 {2F0B1A3B-27CA-47D4-A9D1-5EC66BB0A85B}.Release|Win32.ActiveCfg = Release|Win32 {2F0B1A3B-27CA-47D4-A9D1-5EC66BB0A85B}.Release|Win32.Build.0 = Release|Win32 {6CC59CF8-408B-441B-8F65-15651210CB82}.Debug|Win32.ActiveCfg = Debug|Win32 {6CC59CF8-408B-441B-8F65-15651210CB82}.Debug|Win32.Build.0 = Debug|Win32 {6CC59CF8-408B-441B-8F65-15651210CB82}.Profile|Win32.ActiveCfg = Release|Win32 {6CC59CF8-408B-441B-8F65-15651210CB82}.Profile|Win32.Build.0 = Release|Win32 {6CC59CF8-408B-441B-8F65-15651210CB82}.Release|Win32.ActiveCfg = Release|Win32 {6CC59CF8-408B-441B-8F65-15651210CB82}.Release|Win32.Build.0 = Release|Win32 {BC168133-5E3D-4691-BA15-8E0FD61DFDB5}.Debug|Win32.ActiveCfg = Debug|Win32 {BC168133-5E3D-4691-BA15-8E0FD61DFDB5}.Debug|Win32.Build.0 = Debug|Win32 {BC168133-5E3D-4691-BA15-8E0FD61DFDB5}.Profile|Win32.ActiveCfg = Release|Win32 {BC168133-5E3D-4691-BA15-8E0FD61DFDB5}.Profile|Win32.Build.0 = Release|Win32 {BC168133-5E3D-4691-BA15-8E0FD61DFDB5}.Release|Win32.ActiveCfg = Release|Win32 {BC168133-5E3D-4691-BA15-8E0FD61DFDB5}.Release|Win32.Build.0 = Release|Win32 {B03A7216-E196-44C6-8861-C77D90055512}.Debug|Win32.ActiveCfg = Debug|Win32 {B03A7216-E196-44C6-8861-C77D90055512}.Debug|Win32.Build.0 = Debug|Win32 {B03A7216-E196-44C6-8861-C77D90055512}.Profile|Win32.ActiveCfg = Release|Win32 {B03A7216-E196-44C6-8861-C77D90055512}.Profile|Win32.Build.0 = Release|Win32 {B03A7216-E196-44C6-8861-C77D90055512}.Release|Win32.ActiveCfg = Release|Win32 {B03A7216-E196-44C6-8861-C77D90055512}.Release|Win32.Build.0 = Release|Win32 {0B597F19-DEBB-4832-B520-9A93A286D595}.Debug|Win32.ActiveCfg = Debug|Win32 {0B597F19-DEBB-4832-B520-9A93A286D595}.Debug|Win32.Build.0 = Debug|Win32 {0B597F19-DEBB-4832-B520-9A93A286D595}.Profile|Win32.ActiveCfg = Release|Win32 {0B597F19-DEBB-4832-B520-9A93A286D595}.Profile|Win32.Build.0 = Release|Win32 {0B597F19-DEBB-4832-B520-9A93A286D595}.Release|Win32.ActiveCfg = Release|Win32 {0B597F19-DEBB-4832-B520-9A93A286D595}.Release|Win32.Build.0 = Release|Win32 {1889E8F4-47F7-48B6-9FC7-61FD7CD000C8}.Debug|Win32.ActiveCfg = Debug|Win32 {1889E8F4-47F7-48B6-9FC7-61FD7CD000C8}.Debug|Win32.Build.0 = Debug|Win32 {1889E8F4-47F7-48B6-9FC7-61FD7CD000C8}.Profile|Win32.ActiveCfg = Release|Win32 {1889E8F4-47F7-48B6-9FC7-61FD7CD000C8}.Profile|Win32.Build.0 = Release|Win32 {1889E8F4-47F7-48B6-9FC7-61FD7CD000C8}.Release|Win32.ActiveCfg = Release|Win32 {1889E8F4-47F7-48B6-9FC7-61FD7CD000C8}.Release|Win32.Build.0 = Release|Win32 {D8A75C0E-3C9A-42E5-97EC-75AEBE64C372}.Debug|Win32.ActiveCfg = Debug|Win32 {D8A75C0E-3C9A-42E5-97EC-75AEBE64C372}.Debug|Win32.Build.0 = Debug|Win32 {D8A75C0E-3C9A-42E5-97EC-75AEBE64C372}.Profile|Win32.ActiveCfg = Release|Win32 {D8A75C0E-3C9A-42E5-97EC-75AEBE64C372}.Profile|Win32.Build.0 = Release|Win32 {D8A75C0E-3C9A-42E5-97EC-75AEBE64C372}.Release|Win32.ActiveCfg = Release|Win32 {D8A75C0E-3C9A-42E5-97EC-75AEBE64C372}.Release|Win32.Build.0 = Release|Win32 {967F376B-BDBF-4AC8-9325-371CC8ABD8FD}.Debug|Win32.ActiveCfg = Debug|Win32 {967F376B-BDBF-4AC8-9325-371CC8ABD8FD}.Debug|Win32.Build.0 = Debug|Win32 {967F376B-BDBF-4AC8-9325-371CC8ABD8FD}.Profile|Win32.ActiveCfg = Release|Win32 {967F376B-BDBF-4AC8-9325-371CC8ABD8FD}.Profile|Win32.Build.0 = Release|Win32 {967F376B-BDBF-4AC8-9325-371CC8ABD8FD}.Release|Win32.ActiveCfg = Release|Win32 {967F376B-BDBF-4AC8-9325-371CC8ABD8FD}.Release|Win32.Build.0 = Release|Win32 {9E88433F-779E-4461-9963-35E3338873AC}.Debug|Win32.ActiveCfg = Debug|Win32 {9E88433F-779E-4461-9963-35E3338873AC}.Debug|Win32.Build.0 = Debug|Win32 {9E88433F-779E-4461-9963-35E3338873AC}.Profile|Win32.ActiveCfg = Release|Win32 {9E88433F-779E-4461-9963-35E3338873AC}.Profile|Win32.Build.0 = Release|Win32 {9E88433F-779E-4461-9963-35E3338873AC}.Release|Win32.ActiveCfg = Release|Win32 {9E88433F-779E-4461-9963-35E3338873AC}.Release|Win32.Build.0 = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection EndGlobal ================================================ FILE: tests/relacy/relacy/test/msvc8/rrd.vcproj ================================================ ================================================ FILE: tests/relacy/relacy/test/msvc8/test.sln ================================================  Microsoft Visual Studio Solution File, Format Version 9.00 # Visual Studio 2005 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "test", "test.vcproj", "{99882C71-3316-411F-A8AE-EC1E40702040}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "rrd", "rrd.vcproj", "{D4F501D0-382D-4CBC-86F4-56181F383444}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Win32 = Debug|Win32 Debug|x64 = Debug|x64 Debug64|Win32 = Debug64|Win32 Debug64|x64 = Debug64|x64 Profile|Win32 = Profile|Win32 Profile|x64 = Profile|x64 Release|Win32 = Release|Win32 Release|x64 = Release|x64 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {99882C71-3316-411F-A8AE-EC1E40702040}.Debug|Win32.ActiveCfg = Debug|Win32 {99882C71-3316-411F-A8AE-EC1E40702040}.Debug|Win32.Build.0 = Debug|Win32 {99882C71-3316-411F-A8AE-EC1E40702040}.Debug|x64.ActiveCfg = Debug|x64 {99882C71-3316-411F-A8AE-EC1E40702040}.Debug|x64.Build.0 = Debug|x64 {99882C71-3316-411F-A8AE-EC1E40702040}.Debug64|Win32.ActiveCfg = Debug64|Win32 {99882C71-3316-411F-A8AE-EC1E40702040}.Debug64|Win32.Build.0 = Debug64|Win32 {99882C71-3316-411F-A8AE-EC1E40702040}.Debug64|x64.ActiveCfg = Debug64|x64 {99882C71-3316-411F-A8AE-EC1E40702040}.Debug64|x64.Build.0 = Debug64|x64 {99882C71-3316-411F-A8AE-EC1E40702040}.Profile|Win32.ActiveCfg = Profile|Win32 {99882C71-3316-411F-A8AE-EC1E40702040}.Profile|Win32.Build.0 = Profile|Win32 {99882C71-3316-411F-A8AE-EC1E40702040}.Profile|x64.ActiveCfg = Profile|x64 {99882C71-3316-411F-A8AE-EC1E40702040}.Profile|x64.Build.0 = Profile|x64 {99882C71-3316-411F-A8AE-EC1E40702040}.Release|Win32.ActiveCfg = Release|Win32 {99882C71-3316-411F-A8AE-EC1E40702040}.Release|Win32.Build.0 = Release|Win32 {99882C71-3316-411F-A8AE-EC1E40702040}.Release|x64.ActiveCfg = Release|x64 {99882C71-3316-411F-A8AE-EC1E40702040}.Release|x64.Build.0 = Release|x64 {D4F501D0-382D-4CBC-86F4-56181F383444}.Debug|Win32.ActiveCfg = Debug|Win32 {D4F501D0-382D-4CBC-86F4-56181F383444}.Debug|Win32.Build.0 = Debug|Win32 {D4F501D0-382D-4CBC-86F4-56181F383444}.Debug|x64.ActiveCfg = Debug|x64 {D4F501D0-382D-4CBC-86F4-56181F383444}.Debug|x64.Build.0 = Debug|x64 {D4F501D0-382D-4CBC-86F4-56181F383444}.Debug64|Win32.ActiveCfg = Debug64|Win32 {D4F501D0-382D-4CBC-86F4-56181F383444}.Debug64|Win32.Build.0 = Debug64|Win32 {D4F501D0-382D-4CBC-86F4-56181F383444}.Debug64|x64.ActiveCfg = Debug64|x64 {D4F501D0-382D-4CBC-86F4-56181F383444}.Debug64|x64.Build.0 = Debug64|x64 {D4F501D0-382D-4CBC-86F4-56181F383444}.Profile|Win32.ActiveCfg = Release|Win32 {D4F501D0-382D-4CBC-86F4-56181F383444}.Profile|Win32.Build.0 = Release|Win32 {D4F501D0-382D-4CBC-86F4-56181F383444}.Profile|x64.ActiveCfg = Debug64|x64 {D4F501D0-382D-4CBC-86F4-56181F383444}.Profile|x64.Build.0 = Debug64|x64 {D4F501D0-382D-4CBC-86F4-56181F383444}.Release|Win32.ActiveCfg = Release|Win32 {D4F501D0-382D-4CBC-86F4-56181F383444}.Release|Win32.Build.0 = Release|Win32 {D4F501D0-382D-4CBC-86F4-56181F383444}.Release|x64.ActiveCfg = Release|x64 {D4F501D0-382D-4CBC-86F4-56181F383444}.Release|x64.Build.0 = Release|x64 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection EndGlobal ================================================ FILE: tests/relacy/relacy/test/msvc8/test.vcproj ================================================ ================================================ FILE: tests/relacy/relacy/test/msvc9/rrd.sln ================================================  Microsoft Visual Studio Solution File, Format Version 10.00 # Visual Studio 2008 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "test", "test.vcproj", "{99882C71-3316-411F-A8AE-EC1E40702040}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ref_counting", "..\..\example\ref_counting\msvc9\ref_counting.vcproj", "{31994C0C-3BAD-4F25-8BC8-3206FF349B28}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "peterson", "..\..\example\peterson\msvc9\peterson.vcproj", "{D4756EE9-3953-4E17-B1B5-E89F853303C1}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "stack", "..\..\example\stack\msvc9\stack.vcproj", "{4D6D7FC3-66D1-4F80-B434-2FDCBBFBC9F5}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "proxy_collector", "..\..\example\proxy_collector\msvc9\proxy_collector.vcproj", "{31994C0C-3BAD-4F25-8BC8-3206FF349B29}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "rrd", "rrd.vcproj", "{D4F501D0-382D-4CBC-86F4-56181F383444}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ntest", "..\..\ntest\msvc9\ntest.vcproj", "{D8A75C0E-3C9A-42E5-97EC-75AEBE64C372}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "jtest", "..\..\jtest\msvc9\jtest.vcproj", "{1889E8F4-47F7-48B6-9FC7-61FD7CD000C8}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "smr", "..\..\example\smr\msvc9\smr.vcproj", "{BC168133-5E3D-4691-BA15-8E0FD61DFDB5}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "spsc_queue", "..\..\example\spsc_queue\msvc9\spsc_queue.vcproj", "{3F32C4FA-E451-42BC-9E65-74129120B6E4}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "condvar", "..\..\example\condvar\msvc9\condvar.vcproj", "{6CC59CF8-408B-441B-8F65-15651210CB82}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ws_deque", "..\..\example\ws_deque\msvc9\ws_deque.vcproj", "{0B597F19-DEBB-4832-B520-9A93A286D595}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "examples", "..\..\example\examples\msvc9\examples.vcproj", "{1EB73A6F-7F94-4ED4-8EB3-C245E773207A}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Win32 = Debug|Win32 Profile|Win32 = Profile|Win32 Release|Win32 = Release|Win32 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {99882C71-3316-411F-A8AE-EC1E40702040}.Debug|Win32.ActiveCfg = Debug|Win32 {99882C71-3316-411F-A8AE-EC1E40702040}.Debug|Win32.Build.0 = Debug|Win32 {99882C71-3316-411F-A8AE-EC1E40702040}.Profile|Win32.ActiveCfg = Profile|Win32 {99882C71-3316-411F-A8AE-EC1E40702040}.Release|Win32.ActiveCfg = Release|Win32 {99882C71-3316-411F-A8AE-EC1E40702040}.Release|Win32.Build.0 = Release|Win32 {31994C0C-3BAD-4F25-8BC8-3206FF349B28}.Debug|Win32.ActiveCfg = Debug|Win32 {31994C0C-3BAD-4F25-8BC8-3206FF349B28}.Debug|Win32.Build.0 = Debug|Win32 {31994C0C-3BAD-4F25-8BC8-3206FF349B28}.Profile|Win32.ActiveCfg = Release|Win32 {31994C0C-3BAD-4F25-8BC8-3206FF349B28}.Profile|Win32.Build.0 = Release|Win32 {31994C0C-3BAD-4F25-8BC8-3206FF349B28}.Release|Win32.ActiveCfg = Release|Win32 {31994C0C-3BAD-4F25-8BC8-3206FF349B28}.Release|Win32.Build.0 = Release|Win32 {D4756EE9-3953-4E17-B1B5-E89F853303C1}.Debug|Win32.ActiveCfg = Debug|Win32 {D4756EE9-3953-4E17-B1B5-E89F853303C1}.Debug|Win32.Build.0 = Debug|Win32 {D4756EE9-3953-4E17-B1B5-E89F853303C1}.Profile|Win32.ActiveCfg = Release|Win32 {D4756EE9-3953-4E17-B1B5-E89F853303C1}.Profile|Win32.Build.0 = Release|Win32 {D4756EE9-3953-4E17-B1B5-E89F853303C1}.Release|Win32.ActiveCfg = Release|Win32 {D4756EE9-3953-4E17-B1B5-E89F853303C1}.Release|Win32.Build.0 = Release|Win32 {4D6D7FC3-66D1-4F80-B434-2FDCBBFBC9F5}.Debug|Win32.ActiveCfg = Debug|Win32 {4D6D7FC3-66D1-4F80-B434-2FDCBBFBC9F5}.Debug|Win32.Build.0 = Debug|Win32 {4D6D7FC3-66D1-4F80-B434-2FDCBBFBC9F5}.Profile|Win32.ActiveCfg = Release|Win32 {4D6D7FC3-66D1-4F80-B434-2FDCBBFBC9F5}.Profile|Win32.Build.0 = Release|Win32 {4D6D7FC3-66D1-4F80-B434-2FDCBBFBC9F5}.Release|Win32.ActiveCfg = Release|Win32 {4D6D7FC3-66D1-4F80-B434-2FDCBBFBC9F5}.Release|Win32.Build.0 = Release|Win32 {31994C0C-3BAD-4F25-8BC8-3206FF349B29}.Debug|Win32.ActiveCfg = Debug|Win32 {31994C0C-3BAD-4F25-8BC8-3206FF349B29}.Debug|Win32.Build.0 = Debug|Win32 {31994C0C-3BAD-4F25-8BC8-3206FF349B29}.Profile|Win32.ActiveCfg = Profile|Win32 {31994C0C-3BAD-4F25-8BC8-3206FF349B29}.Profile|Win32.Build.0 = Profile|Win32 {31994C0C-3BAD-4F25-8BC8-3206FF349B29}.Release|Win32.ActiveCfg = Release|Win32 {31994C0C-3BAD-4F25-8BC8-3206FF349B29}.Release|Win32.Build.0 = Release|Win32 {D4F501D0-382D-4CBC-86F4-56181F383444}.Debug|Win32.ActiveCfg = Debug|Win32 {D4F501D0-382D-4CBC-86F4-56181F383444}.Debug|Win32.Build.0 = Debug|Win32 {D4F501D0-382D-4CBC-86F4-56181F383444}.Profile|Win32.ActiveCfg = Release|Win32 {D4F501D0-382D-4CBC-86F4-56181F383444}.Profile|Win32.Build.0 = Release|Win32 {D4F501D0-382D-4CBC-86F4-56181F383444}.Release|Win32.ActiveCfg = Release|Win32 {D4F501D0-382D-4CBC-86F4-56181F383444}.Release|Win32.Build.0 = Release|Win32 {D8A75C0E-3C9A-42E5-97EC-75AEBE64C372}.Debug|Win32.ActiveCfg = Debug|Win32 {D8A75C0E-3C9A-42E5-97EC-75AEBE64C372}.Debug|Win32.Build.0 = Debug|Win32 {D8A75C0E-3C9A-42E5-97EC-75AEBE64C372}.Profile|Win32.ActiveCfg = Release|Win32 {D8A75C0E-3C9A-42E5-97EC-75AEBE64C372}.Profile|Win32.Build.0 = Release|Win32 {D8A75C0E-3C9A-42E5-97EC-75AEBE64C372}.Release|Win32.ActiveCfg = Release|Win32 {D8A75C0E-3C9A-42E5-97EC-75AEBE64C372}.Release|Win32.Build.0 = Release|Win32 {1889E8F4-47F7-48B6-9FC7-61FD7CD000C8}.Debug|Win32.ActiveCfg = Debug|Win32 {1889E8F4-47F7-48B6-9FC7-61FD7CD000C8}.Debug|Win32.Build.0 = Debug|Win32 {1889E8F4-47F7-48B6-9FC7-61FD7CD000C8}.Profile|Win32.ActiveCfg = Release|Win32 {1889E8F4-47F7-48B6-9FC7-61FD7CD000C8}.Profile|Win32.Build.0 = Release|Win32 {1889E8F4-47F7-48B6-9FC7-61FD7CD000C8}.Release|Win32.ActiveCfg = Release|Win32 {1889E8F4-47F7-48B6-9FC7-61FD7CD000C8}.Release|Win32.Build.0 = Release|Win32 {BC168133-5E3D-4691-BA15-8E0FD61DFDB5}.Debug|Win32.ActiveCfg = Debug|Win32 {BC168133-5E3D-4691-BA15-8E0FD61DFDB5}.Debug|Win32.Build.0 = Debug|Win32 {BC168133-5E3D-4691-BA15-8E0FD61DFDB5}.Profile|Win32.ActiveCfg = Release|Win32 {BC168133-5E3D-4691-BA15-8E0FD61DFDB5}.Profile|Win32.Build.0 = Release|Win32 {BC168133-5E3D-4691-BA15-8E0FD61DFDB5}.Release|Win32.ActiveCfg = Release|Win32 {BC168133-5E3D-4691-BA15-8E0FD61DFDB5}.Release|Win32.Build.0 = Release|Win32 {3F32C4FA-E451-42BC-9E65-74129120B6E4}.Debug|Win32.ActiveCfg = Debug|Win32 {3F32C4FA-E451-42BC-9E65-74129120B6E4}.Debug|Win32.Build.0 = Debug|Win32 {3F32C4FA-E451-42BC-9E65-74129120B6E4}.Profile|Win32.ActiveCfg = Release|Win32 {3F32C4FA-E451-42BC-9E65-74129120B6E4}.Profile|Win32.Build.0 = Release|Win32 {3F32C4FA-E451-42BC-9E65-74129120B6E4}.Release|Win32.ActiveCfg = Release|Win32 {3F32C4FA-E451-42BC-9E65-74129120B6E4}.Release|Win32.Build.0 = Release|Win32 {6CC59CF8-408B-441B-8F65-15651210CB82}.Debug|Win32.ActiveCfg = Debug|Win32 {6CC59CF8-408B-441B-8F65-15651210CB82}.Debug|Win32.Build.0 = Debug|Win32 {6CC59CF8-408B-441B-8F65-15651210CB82}.Profile|Win32.ActiveCfg = Release|Win32 {6CC59CF8-408B-441B-8F65-15651210CB82}.Profile|Win32.Build.0 = Release|Win32 {6CC59CF8-408B-441B-8F65-15651210CB82}.Release|Win32.ActiveCfg = Release|Win32 {6CC59CF8-408B-441B-8F65-15651210CB82}.Release|Win32.Build.0 = Release|Win32 {0B597F19-DEBB-4832-B520-9A93A286D595}.Debug|Win32.ActiveCfg = Debug|Win32 {0B597F19-DEBB-4832-B520-9A93A286D595}.Debug|Win32.Build.0 = Debug|Win32 {0B597F19-DEBB-4832-B520-9A93A286D595}.Profile|Win32.ActiveCfg = Release|Win32 {0B597F19-DEBB-4832-B520-9A93A286D595}.Profile|Win32.Build.0 = Release|Win32 {0B597F19-DEBB-4832-B520-9A93A286D595}.Release|Win32.ActiveCfg = Release|Win32 {0B597F19-DEBB-4832-B520-9A93A286D595}.Release|Win32.Build.0 = Release|Win32 {1EB73A6F-7F94-4ED4-8EB3-C245E773207A}.Debug|Win32.ActiveCfg = Debug|Win32 {1EB73A6F-7F94-4ED4-8EB3-C245E773207A}.Debug|Win32.Build.0 = Debug|Win32 {1EB73A6F-7F94-4ED4-8EB3-C245E773207A}.Profile|Win32.ActiveCfg = Release|Win32 {1EB73A6F-7F94-4ED4-8EB3-C245E773207A}.Profile|Win32.Build.0 = Release|Win32 {1EB73A6F-7F94-4ED4-8EB3-C245E773207A}.Release|Win32.ActiveCfg = Release|Win32 {1EB73A6F-7F94-4ED4-8EB3-C245E773207A}.Release|Win32.Build.0 = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection EndGlobal ================================================ FILE: tests/relacy/relacy/test/msvc9/rrd.vcproj ================================================ ================================================ FILE: tests/relacy/relacy/test/msvc9/test.sln ================================================  Microsoft Visual Studio Solution File, Format Version 10.00 # Visual Studio 2008 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "test", "test.vcproj", "{99882C71-3316-411F-A8AE-EC1E40702040}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "rrd", "rrd.vcproj", "{D4F501D0-382D-4CBC-86F4-56181F383444}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Win32 = Debug|Win32 Debug|x64 = Debug|x64 Profile|Win32 = Profile|Win32 Profile|x64 = Profile|x64 Release|Win32 = Release|Win32 Release|x64 = Release|x64 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {99882C71-3316-411F-A8AE-EC1E40702040}.Debug|Win32.ActiveCfg = Debug|Win32 {99882C71-3316-411F-A8AE-EC1E40702040}.Debug|Win32.Build.0 = Debug|Win32 {99882C71-3316-411F-A8AE-EC1E40702040}.Debug|x64.ActiveCfg = Debug|x64 {99882C71-3316-411F-A8AE-EC1E40702040}.Debug|x64.Build.0 = Debug|x64 {99882C71-3316-411F-A8AE-EC1E40702040}.Profile|Win32.ActiveCfg = Profile|Win32 {99882C71-3316-411F-A8AE-EC1E40702040}.Profile|Win32.Build.0 = Profile|Win32 {99882C71-3316-411F-A8AE-EC1E40702040}.Profile|x64.ActiveCfg = Profile|x64 {99882C71-3316-411F-A8AE-EC1E40702040}.Profile|x64.Build.0 = Profile|x64 {99882C71-3316-411F-A8AE-EC1E40702040}.Release|Win32.ActiveCfg = Release|Win32 {99882C71-3316-411F-A8AE-EC1E40702040}.Release|Win32.Build.0 = Release|Win32 {99882C71-3316-411F-A8AE-EC1E40702040}.Release|x64.ActiveCfg = Release|x64 {99882C71-3316-411F-A8AE-EC1E40702040}.Release|x64.Build.0 = Release|x64 {D4F501D0-382D-4CBC-86F4-56181F383444}.Debug|Win32.ActiveCfg = Debug|Win32 {D4F501D0-382D-4CBC-86F4-56181F383444}.Debug|Win32.Build.0 = Debug|Win32 {D4F501D0-382D-4CBC-86F4-56181F383444}.Debug|x64.ActiveCfg = Debug|x64 {D4F501D0-382D-4CBC-86F4-56181F383444}.Debug|x64.Build.0 = Debug|x64 {D4F501D0-382D-4CBC-86F4-56181F383444}.Profile|Win32.ActiveCfg = Release|Win32 {D4F501D0-382D-4CBC-86F4-56181F383444}.Profile|Win32.Build.0 = Release|Win32 {D4F501D0-382D-4CBC-86F4-56181F383444}.Profile|x64.ActiveCfg = Release|x64 {D4F501D0-382D-4CBC-86F4-56181F383444}.Profile|x64.Build.0 = Release|x64 {D4F501D0-382D-4CBC-86F4-56181F383444}.Release|Win32.ActiveCfg = Release|Win32 {D4F501D0-382D-4CBC-86F4-56181F383444}.Release|Win32.Build.0 = Release|Win32 {D4F501D0-382D-4CBC-86F4-56181F383444}.Release|x64.ActiveCfg = Release|x64 {D4F501D0-382D-4CBC-86F4-56181F383444}.Release|x64.Build.0 = Release|x64 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection EndGlobal ================================================ FILE: tests/relacy/relacy/test/msvc9/test.vcproj ================================================ ================================================ FILE: tests/relacy/relacy/test/mutex.hpp ================================================ #pragma once #include "../relacy/relacy_std.hpp" struct test_mutex : rl::test_suite { rl::mutex mtx; rl::var data; void before() { data($) = 0; } void after() { RL_ASSERT(data($) == 3); } void thread(unsigned /*index*/) { mtx.lock($); data($) += 1; mtx.unlock($); } }; struct test_deadlock : rl::test_suite { rl::mutex mtx1; rl::mutex mtx2; void thread(unsigned index) { if (0 == index) { mtx1.lock($); mtx2.lock($); mtx1.unlock($); mtx2.unlock($); } else { mtx2.lock($); mtx1.lock($); mtx1.unlock($); mtx2.unlock($); } } }; struct test_deadlock2 : rl::test_suite { std::mutex m; std::atomic f; void before() { f($) = 0; } void thread(unsigned index) { if (index) { m.lock($); f($) = 1; for (int i = 0; i != 100; ++i) rl::yield(1, $); } else { while (0 == f($)) rl::yield(1, $); m.lock($); } } }; struct test_mutex_destuction : rl::test_suite { void thread(unsigned) { std::mutex* m = new std::mutex; m->lock($); delete m; } }; struct test_mutex_destuction2 : rl::test_suite { std::mutex* m; std::atomic f; void before() { m = new std::mutex; f($) = 0; } void thread(unsigned index) { if (0 == index) { m->lock($); f($) = 1; while (1 == f($)) rl::yield(1, $); m->unlock($); } else { while (0 == f($)) rl::yield(1, $); delete m; f($) = 2; } } }; struct test_mutex_recursion : rl::test_suite { std::recursive_mutex mtx; rl::var data; void before() { data($) = 0; } void after() { RL_ASSERT(data($) == 2); } void thread(unsigned /*index*/) { mtx.lock($); mtx.lock($); data($) += 1; mtx.unlock($); mtx.unlock($); } }; struct test_mutex_try_lock : rl::test_suite { std::recursive_mutex mtx; rl::var data; void before() { data($) = 0; } void after() { RL_ASSERT(data($) == 2); } void thread(unsigned /*index*/) { while (false == mtx.try_lock($)) rl::yield(1, $); RL_ASSERT(mtx.try_lock($)); data($) += 1; mtx.unlock($); mtx.unlock($); } }; struct test_mutex_recursion_error : rl::test_suite { void thread(unsigned) { std::mutex m; m.lock($); m.lock($); } }; struct test_mutex_unlock_error : rl::test_suite { void thread(unsigned) { std::mutex m; m.lock($); m.unlock($); m.unlock($); } }; struct test_mutex_leak : rl::test_suite { void thread(unsigned) { char* p = new char [sizeof(std::mutex)]; new (p) std::mutex(); delete [] p; } }; ================================================ FILE: tests/relacy/relacy/test/ntest/msvc8/ntest.sln ================================================  Microsoft Visual Studio Solution File, Format Version 9.00 # Visual Studio 2008 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ntest", "ntest.vcproj", "{D8A75C0E-3C9A-42E5-97EC-75AEBE64C372}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "rrd", "..\..\test\msvc8\rrd.vcproj", "{D4F501D0-382D-4CBC-86F4-56181F383444}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Win32 = Debug|Win32 Release|Win32 = Release|Win32 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {D8A75C0E-3C9A-42E5-97EC-75AEBE64C372}.Debug|Win32.ActiveCfg = Debug|Win32 {D8A75C0E-3C9A-42E5-97EC-75AEBE64C372}.Debug|Win32.Build.0 = Debug|Win32 {D8A75C0E-3C9A-42E5-97EC-75AEBE64C372}.Release|Win32.ActiveCfg = Release|Win32 {D8A75C0E-3C9A-42E5-97EC-75AEBE64C372}.Release|Win32.Build.0 = Release|Win32 {D4F501D0-382D-4CBC-86F4-56181F383444}.Debug|Win32.ActiveCfg = Debug|Win32 {D4F501D0-382D-4CBC-86F4-56181F383444}.Debug|Win32.Build.0 = Debug|Win32 {D4F501D0-382D-4CBC-86F4-56181F383444}.Release|Win32.ActiveCfg = Release|Win32 {D4F501D0-382D-4CBC-86F4-56181F383444}.Release|Win32.Build.0 = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection EndGlobal ================================================ FILE: tests/relacy/relacy/test/ntest/msvc8/ntest.vcproj ================================================ ================================================ FILE: tests/relacy/relacy/test/ntest/msvc9/ntest.sln ================================================  Microsoft Visual Studio Solution File, Format Version 10.00 # Visual Studio 2008 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ntest", "ntest.vcproj", "{D8A75C0E-3C9A-42E5-97EC-75AEBE64C372}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "rrd", "..\..\test\msvc9\rrd.vcproj", "{D4F501D0-382D-4CBC-86F4-56181F383444}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Win32 = Debug|Win32 Release|Win32 = Release|Win32 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {D8A75C0E-3C9A-42E5-97EC-75AEBE64C372}.Debug|Win32.ActiveCfg = Debug|Win32 {D8A75C0E-3C9A-42E5-97EC-75AEBE64C372}.Debug|Win32.Build.0 = Debug|Win32 {D8A75C0E-3C9A-42E5-97EC-75AEBE64C372}.Release|Win32.ActiveCfg = Release|Win32 {D8A75C0E-3C9A-42E5-97EC-75AEBE64C372}.Release|Win32.Build.0 = Release|Win32 {D4F501D0-382D-4CBC-86F4-56181F383444}.Debug|Win32.ActiveCfg = Debug|Win32 {D4F501D0-382D-4CBC-86F4-56181F383444}.Debug|Win32.Build.0 = Debug|Win32 {D4F501D0-382D-4CBC-86F4-56181F383444}.Release|Win32.ActiveCfg = Release|Win32 {D4F501D0-382D-4CBC-86F4-56181F383444}.Release|Win32.Build.0 = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection EndGlobal ================================================ FILE: tests/relacy/relacy/test/ntest/msvc9/ntest.vcproj ================================================ ================================================ FILE: tests/relacy/relacy/test/ntest/ntest.cpp ================================================ #include "stdafx.h" #include "../../relacy/relacy_cli.hpp" using rl::nvar; using rl::nvolatile; using rl::mutex; template class ws_deque { public: ws_deque() { m_mask($) = initial_size - 1; m_headIndex($) = 0; m_tailIndex($) = 0; m_array($) = new nvar [initial_size]; m_arraySize($) = initial_size; } bool IsEmpty() { return m_headIndex($) >= m_tailIndex($); } size_t Count() { return m_tailIndex($) - m_headIndex($); } void push(T item) { size_t tail = m_tailIndex($); // original version: //if (tail < m_headIndex($) + m_mask($)) // corrected version: if (tail <= m_headIndex($) + m_mask($)) { m_array($)[tail & m_mask($)]($) = item; m_tailIndex($) = tail + 1; } else { m_foreignLock.lock($); size_t head = m_headIndex($); size_t count = Count(); if (count >= m_mask($)) { size_t arraySize = m_arraySize($); size_t mask = m_mask($); nvar* newArray = new nvar [arraySize * 2]; nvar* arr = m_array($); // original version: //for (size_t i = 0; i != arraySize; ++i) // corrected version: for (size_t i = 0; i != count; ++i) newArray[i]($) = arr[(i + head) & mask]($); m_array($) = newArray; m_arraySize($) = arraySize * 2; m_headIndex($) = 0; m_tailIndex($) = count; tail = count; m_mask($) = (mask * 2) | 1; } m_array($)[tail & m_mask($)]($) = item; m_tailIndex($) = tail + 1; m_foreignLock.unlock($); } } bool pop(T& item) { size_t tail = m_tailIndex($); // original version: //if (m_headIndex($) >= tail) // return false; // corrected version: if (tail == 0) return false; tail -= 1; rl::Interlocked::Exchange(m_tailIndex, tail, $); if (m_headIndex($) <= tail) { item = m_array($)[tail & m_mask($)]($); return true; } else { m_foreignLock.lock($); if (m_headIndex($) <= tail) { item = m_array($)[tail & m_mask($)]($); m_foreignLock.unlock($); return true; } else { m_tailIndex($) = tail + 1; m_foreignLock.unlock($); return false; } } } bool steal(T& item) { if (false == m_foreignLock.try_lock($)) return false; size_t head = m_headIndex($); rl::Interlocked::Exchange(m_headIndex, head + 1, $); if (head < m_tailIndex($)) { item = m_array($)[head & m_mask($)]($); m_foreignLock.unlock($); return true; } else { m_headIndex($) = head; m_foreignLock.unlock($); return false; } } private: static size_t const initial_size = 2; nvar*> m_array; nvar m_mask; nvar m_arraySize; nvolatile m_headIndex; nvolatile m_tailIndex; mutex m_foreignLock; }; struct ws_deque_test : rl::test_suite { ws_deque q; bool state [2]; void before() { state[0] = true; state[1] = true; } void after() { RL_ASSERT(state[0] == false); RL_ASSERT(state[1] == false); } void thread(unsigned index) { if (0 == index) { q.push(1); q.push(2); int item = 0; bool res = q.pop(item); RL_ASSERT(res && item == 2); RL_ASSERT(state[1]); state[1] = false; item = 0; res = q.pop(item); if (res) { RL_ASSERT(state[0]); state[0] = false; } item = 0; res = q.pop(item); RL_ASSERT(res == false); } else { int item = 0; bool res = q.steal(item); if (res) { RL_ASSERT(item == 1); RL_ASSERT(state[0]); state[0] = false; } } } }; struct test_api : rl::test_suite { void thread(unsigned) { rl::nvar cv1, cv2(3), cv3(cv1($)), cv4(cv1); cv1($) = cv2($); cv1($) = 1; (int)cv1($); cv1($) += 1; cv1($) -= 1; cv1($)++; cv1($)--; ++cv1($); --cv1($); int x = rl::Interlocked::Add(cv1, 3, $); x = rl::Interlocked::CompareExchange(cv1, 3, x, $); x = rl::Interlocked::Exchange(cv2, 6, $); x = rl::Interlocked::Read(cv2, $); x = rl::Interlocked::Increment(cv2, $); x = rl::Interlocked::Decrement(cv2, $); rl::Thread::MemoryBarrier($); x = rl::Thread::VolatileRead(cv1, $); rl::Thread::VolatileWrite(cv1, 5, $); rl::Thread::SpinWait(1, $); } }; struct ws_deque_test0 : rl::test_suite { ws_deque q; void before() { } void after() { } void thread(unsigned index) { if (0 == index) { for (size_t i = 0; i != 4; ++i) { q.push(10); } for (size_t i = 0; i != 5; ++i) { int p = 0; bool res = q.pop(p); RL_ASSERT(10 == p || false == res); } for (size_t i = 0; i != 4; ++i) { q.push(10); int p = 0; bool res = q.pop(p); RL_ASSERT(10 == p || false == res); } for (size_t i = 0; i != 4; ++i) { q.push(10); q.push(10); int p = 0; bool res = q.pop(p); RL_ASSERT(10 == p || false == res); p = 0; res = q.pop(p); RL_ASSERT(10 == p || false == res); } for (size_t i = 0; i != 4; ++i) { q.push(10); q.push(10); q.push(10); int p = 0; bool res = q.pop(p); RL_ASSERT(10 == p || false == res); } for (size_t i = 0; i != 14; ++i) { q.push(10); int p = 0; bool res = q.pop(p); RL_ASSERT(10 == p || false == res); } } else { for (size_t i = 0; i != 4; ++i) { int p = 0; bool res = q.steal(p); RL_ASSERT(10 == p || false == res); } } } }; int main() { rl::test_params p; p.iteration_count = 1000; rl::simulate(p); rl::simulate(p); rl::simulate(); } ================================================ FILE: tests/relacy/relacy/test/ntest/stdafx.cpp ================================================ #include "stdafx.h" ================================================ FILE: tests/relacy/relacy/test/ntest/stdafx.h ================================================ #ifndef STDAFX_H #define STDAFX_H #ifdef _MSC_VER # pragma once #endif #include "../../relacy/pch.hpp" #endif ================================================ FILE: tests/relacy/relacy/test/pthread.hpp ================================================ #pragma once #include "../relacy/pthread.h" struct test_pthread_thread : rl::test_suite { static size_t const dynamic_thread_count = 2; VAR_T(int) data; static void* func(void* param) { static_cast(param)->VAR(data) += 1; return 0; } void thread(unsigned) { VAR(data) = 0; pthread_t th1; pthread_create(&th1, 0, &test_pthread_thread::func, this); void* res1 = 0; pthread_join(th1, &res1); RL_ASSERT(VAR(data) == 1); pthread_t th2; pthread_create(&th2, 0, &test_pthread_thread::func, this); void* res2 = 0; pthread_join(th2, &res2); RL_ASSERT(VAR(data) == 2); } }; struct test_pthread_mutex : rl::test_suite { pthread_mutex_t mtx; VAR_T(int) data; void before() { pthread_mutexattr_t attr; pthread_mutexattr_init(&attr); pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE); pthread_mutex_init(&mtx, &attr); pthread_mutexattr_destroy(&attr); VAR(data) = 0; } void after() { pthread_mutex_destroy(&mtx); } void thread(unsigned /*index*/) { pthread_mutex_lock(&mtx); VAR(data) += 1; pthread_mutex_unlock(&mtx); if (0 == pthread_mutex_try_lock(&mtx)) { VAR(data) += 1; pthread_mutex_unlock(&mtx); } //pthread_mutex_timedlock } }; struct test_pthread_condvar : rl::test_suite { pthread_cond_t cv; pthread_mutex_t mtx; VAR_T(int) stage; void before() { pthread_condattr_t attr; pthread_cond_init(&cv, &attr); pthread_mutex_init(&mtx, 0); VAR(stage) = 0; } void after() { pthread_cond_destroy(&cv); pthread_mutex_destroy(&mtx); } void thread(unsigned index) { if (0 == index) { pthread_mutex_lock(&mtx); VAR(stage) += 1; pthread_cond_broadcast(&cv); while (VAR(stage) != 2) pthread_cond_wait(&cv, &mtx); pthread_mutex_unlock(&mtx); } else if (1 == index) { pthread_mutex_lock(&mtx); while (VAR(stage) != 1) { int ts = 1; pthread_cond_timedwait(&cv, &mtx, &ts); } VAR(stage) += 1; pthread_cond_broadcast(&cv); pthread_mutex_unlock(&mtx); } else if (2 == index) { pthread_mutex_lock(&mtx); while (VAR(stage) != 2) pthread_cond_wait(&cv, &mtx); pthread_mutex_unlock(&mtx); pthread_cond_signal(&cv); } } }; struct test_pthread_condvar2 : rl::test_suite { pthread_cond_t cv1, cv2; pthread_mutex_t mtx1, mtx2; VAR_T(int) stage; void before() { pthread_cond_init(&cv1, 0); pthread_cond_init(&cv2, 0); pthread_mutex_init(&mtx1, 0); pthread_mutex_init(&mtx2, 0); VAR(stage) = 0; } void after() { pthread_cond_destroy(&cv1); pthread_cond_destroy(&cv2); pthread_mutex_destroy(&mtx1); pthread_mutex_destroy(&mtx2); } void thread(unsigned index) { if (0 == index) { pthread_mutex_lock(&mtx1); int ts = 1; pthread_cond_timedwait(&cv1, &mtx1, &ts); pthread_mutex_unlock(&mtx1); } else if (1 == index) { pthread_mutex_lock(&mtx2); int ts = 1; pthread_cond_timedwait(&cv2, &mtx2, &ts); pthread_mutex_unlock(&mtx2); } } }; struct test_pthread_rwlock : rl::test_suite { pthread_rwlock_t mtx; VAR_T(int) data; void before() { pthread_mutexattr_t attr; pthread_mutexattr_init(&attr); pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_ERRORCHECK); pthread_rwlock_init(&mtx, &attr); pthread_mutexattr_destroy(&attr); VAR(data) = 0; } void after() { pthread_rwlock_destroy(&mtx); } void thread(unsigned /*index*/) { pthread_rwlock_wrlock(&mtx); VAR(data) += 1; pthread_rwlock_unlock(&mtx); if (0 == pthread_rwlock_trywrlock(&mtx)) { VAR(data) += 1; pthread_rwlock_unlock(&mtx); } pthread_rwlock_rdlock(&mtx); (void)(int)VAR(data); pthread_rwlock_unlock(&mtx); if (0 == pthread_rwlock_tryrdlock(&mtx)) { (void)(int)VAR(data); pthread_rwlock_unlock(&mtx); } } }; struct test_pthread_sem : rl::test_suite { sem_t sem1, sem2; VAR_T(int) data; void before() { sem_init(&sem1, 0, 0); sem_init(&sem2, 0, 0); VAR(data) = 0; } void after() { sem_destroy(&sem1); sem_destroy(&sem2); } void thread(unsigned index) { if (index) { VAR(data) = 1; sem_post(&sem1); while (sem_trywait(&sem2)) { assert(errno == EINTR || errno == EAGAIN); pthread_yield(); } RL_ASSERT(VAR(data) == 2); VAR(data) = 3; int count = -1; sem_getvalue(&sem2, &count); RL_ASSERT(count == 0); sem_post(&sem2); sem_getvalue(&sem2, &count); RL_ASSERT(count == 1); } else { while (sem_wait(&sem1)) assert(errno == EINTR); RL_ASSERT(VAR(data) == 1); VAR(data) = 2; sem_post(&sem2); } } }; ================================================ FILE: tests/relacy/relacy/test/scheduler.hpp ================================================ #pragma once #include "../relacy/relacy_std.hpp" struct livelock_test : rl::test_suite { std::atomic x; void before() { x($) = 0; } void thread(unsigned index) { if (0 == index) { for (;;) { int cmp = 1; if (x($).compare_exchange_weak(cmp, 2)) break; } } else if (1 == index) { x($).store(1); } } }; struct yield_livelock_test : rl::test_suite { std::atomic x, y; void before() { x($) = 0; y($) = 0; } void thread(unsigned index) { if (0 == index) { rl::backoff b; for (;;) { int cmp = 0; if (x($).compare_exchange_weak(cmp, 1)) { cmp = 0; if (y($).compare_exchange_weak(cmp, 1)) { x($).store(0); y($).store(0); break; } else { x($).store(0); } } b.yield($); } } else if (1 == index) { rl::backoff b; for (;;) { int cmp = 0; if (y($).compare_exchange_weak(cmp, 1)) { cmp = 0; if (x($).compare_exchange_weak(cmp, 1)) { y($).store(0); x($).store(0); break; } else { y($).store(0); } } b.yield($); } } } }; struct sched_load_test : rl::test_suite { std::recursive_mutex mtx1, mtx2; std::condition_variable_any cv1, cv2; VAR_T(int) data1, data2; void before() { } void thread(unsigned index) { if (index % 2) { mtx1.lock($); VAR(data1) = 1; mtx1.unlock($); mtx2.lock($); mtx2.lock($); VAR(data2) = 1; mtx2.unlock($); mtx2.unlock($); if (mtx1.try_lock($)) { //mtx1.lock($); VAR(data1) = 1; //mtx1.unlock($); mtx1.unlock($); } mtx1.lock($); VAR(data1) = 2; cv1.notify_all($); mtx1.unlock($); mtx2.lock($); while (VAR(data2) != 2) { rl::yield(1, $); cv2.wait_for(mtx2, 1, $); } mtx2.unlock($); } else { mtx2.lock($); VAR(data2) = 1; mtx2.unlock($); mtx1.lock($); mtx1.lock($); VAR(data1) = 1; mtx1.unlock($); mtx1.unlock($); if (mtx2.try_lock($)) { //mtx2.lock($); VAR(data2) = 1; //mtx2.unlock($); mtx2.unlock($); } mtx2.lock($); VAR(data2) = 2; mtx2.unlock($); cv2.notify_all($); mtx1.lock($); while (VAR(data1) != 2) { rl::yield(1, $); cv1.wait_for(mtx1, 1, $); } mtx1.unlock($); } } }; ================================================ FILE: tests/relacy/relacy/test/semaphore.hpp ================================================ #pragma once #include "../relacy/relacy_std.hpp" struct test_semaphore : rl::test_suite { HANDLE sema; VAR_T(int) data; void before() { VAR(data) = 0; sema = CreateSemaphore(0, 0, 2, 0); } void after() { CloseHandle(sema); } void thread(unsigned index) { if (0 == index) { VAR(data) = 1; ReleaseSemaphore(sema, 1, 0); } else { unsigned rv = WaitForSingleObject(sema, INFINITE); assert(rv == WAIT_OBJECT_0); assert(VAR(data) == 1); rv = WaitForSingleObject(sema, 0); assert(rv == WAIT_TIMEOUT); } } }; struct test_semaphore_atomic : rl::test_suite { HANDLE sem [2]; void before() { sem[0] = CreateSemaphore(0, 0, 2, 0); sem[1] = CreateSemaphore(0, 0, 2, 0); } void after() { CloseHandle(sem[0]); CloseHandle(sem[1]); } void thread(unsigned index) { if (0 == index) { unsigned rv = WaitForSingleObject(sem[0], INFINITE); assert(rv == WAIT_OBJECT_0); ReleaseSemaphore(sem[1], 1, 0); rv = WaitForSingleObject(sem[1], 0); assert(rv == WAIT_TIMEOUT); } else { unsigned rv = SignalObjectAndWait(sem[0], sem[1], INFINITE, 0); assert(rv == WAIT_OBJECT_0); rv = WaitForSingleObject(sem[1], 0); assert(rv == WAIT_TIMEOUT); rv = WaitForSingleObject(sem[0], 0); assert(rv == WAIT_TIMEOUT); } } }; ================================================ FILE: tests/relacy/relacy/test/stdafx.cpp ================================================ #include "stdafx.h" ================================================ FILE: tests/relacy/relacy/test/stdafx.h ================================================ #ifndef STDAFX_H #define STDAFX_H #ifdef _MSC_VER # pragma once #endif #ifdef _MSC_VER # pragma warning (disable: 4127) #endif #if defined(_MSC_VER) && (_MSC_VER <= 1310) //# pragma warning (disable: 4511) //# pragma warning (disable: 4512) #endif #ifdef NDEBUG # define _SECURE_SCL 0 #endif #include "../relacy/pch.hpp" #endif ================================================ FILE: tests/relacy/relacy/test/thread_local.hpp ================================================ #pragma once #include "../relacy/relacy.hpp" struct tls_basic_test : rl::test_suite { rl::thread_local_var x; void thread(unsigned index) { RL_ASSERT(x.get($) == 0); x.set(index + 10, $); RL_ASSERT(x.get($) == index + 10); } }; struct tls_basic_test2 : rl::test_suite { TLS_T(unsigned) x; void thread(unsigned index) { RL_ASSERT(VAR(x) == 0); VAR(x) = index + 10; RL_ASSERT(VAR(x) == index + 10); } }; struct tls_reset_test : rl::test_suite { rl::thread_local_var x; void thread(unsigned index) { RL_ASSERT(x.get($) == 0); x.set(index + 10, $); RL_ASSERT(x.get($) == index + 10); RL_ASSERT(false); } }; rl::thread_local_var tls_global_test_x; struct tls_global_test : rl::test_suite { void thread(unsigned index) { RL_ASSERT(tls_global_test_x.get($) == 0); tls_global_test_x.set(index + 10, $); RL_ASSERT(tls_global_test_x.get($) == index + 10); RL_ASSERT(false); } }; struct tls_win32_test : rl::test_suite { unsigned long slot; void before() { slot = TlsAlloc(); } void after() { TlsFree(slot); } void thread(unsigned index) { RL_ASSERT(TlsGetValue(slot) == 0); TlsSetValue(slot, (void*)(uintptr_t)(index + 10)); RL_ASSERT(TlsGetValue(slot) == (void*)(uintptr_t)(index + 10)); } }; ================================================ FILE: tests/relacy/relacy/test/todo.txt ================================================ Relacy Race Detector Todo List: - use indirection and indices for TLS, because on Windows TLS index is DWORD (not DWORD_PTR) (eliminate pointers?) + provide rl::hash_ptr() - support for fair timed waits + remove iteration count estimation from full sched -> causes division by 0 - history: memory allocation before object ctor (new T (...)) + code in test::after() affects iteration count with full scheduler -> final and estimated iteration counts are the same - non-deterministic sub-expression calculation: foo(bar.load(std::memory_order_acquire), baz.load(std::memory_order_acquire)); - post issue: can't simulate some modification orders in presence of data-races-type-2 for atomic vars: //thread 1 x.store(1, std::memory_order_relaxed); y.store(1, std::memory_order_relaxed); //thread 2 while (y.load(std::memory_order_relaxed) == 0 {} x.store(2, std::memory_order_relaxed); -> modification order of 'x' will never be "2, 1" [CORE] - initially run threads one by one - initially run some iterations twice, in order to check that unit-test is deterministic ? add unique identifiers to atomics, vars, mutexes etc (address can be useful too) - example catalog (description, used techniques, what error is found) - do I need sched() before atomic loads? - do I need sched() before mutex unlock? - for loads output in history value of which store is loaded - detect dead-code - output which operations cause data race ? output happens-before matrix, synchronizes-with matrix etc - SEH handler to catch paging faults - sched before malloc/free to allow more ABA [PERF] - implement performance simulation - cacheline transfers - atomic rmw operations - fences [OTHER] - parallelize the run-time for random scheduler - parallelize the run-time for tree search scheduler - manual control over scheduler - persistent checkpointing of scheduler state (to allow "continue") - atomic blocks (pdr implementation -> pdr component) ? state space reductions (sleep sets, dynamic persistent sets) ? what can I do with serialization points -> user specifies "visible" results system checks for linearizablity -> "visible" results equal to some sequential execution ? save program state inside iteration (save point), continue other iterations from this save point ? partial order reductions by memorizing happens-before graphs, not program state ? estimate progress by seeing how many iterations it gets to move 0->1 on some stree level ? lower bound, upper bound, mean of progress O(X) = (P^(C + 3)) * (N^(P + C + 1)) * (P + C)! ================================================ FILE: tests/relacy/relacy/test/trash/original.hpp ================================================ Here is a recent version of the revised pc_sample.c which uses inline x86 ASM and compiles under VC++ (I am planning on coding the entire thing in pure assembly language): ____________________________________________________________________ #if ! defined(PC_SAMPLE_INCLUDE_H) # define PC_SAMPLE_INCLUDE_H # pragma warning(push) # pragma warning (disable : 4100 4505 4706) # if defined(__cplusplus) extern "C" { # endif /*===========================================================*/ /* Very Simple x86 Atomic Operations API & Implmentation _____________________________________________________________*/ typedef __int32 atomicword; typedef atomicword volatile* const atomicword_pthis; static int x86_DWCASPTR( void volatile* const, void* const, void const* const ); static atomicword x86_XADDWORD( atomicword_pthis, atomicword const ); static atomicword x86_XCHGWORD( atomicword_pthis, atomicword const ); __declspec(naked) int x86_DWCASPTR( void volatile* const _pthis, void* const pcmp, void const* const pxhcg ) { _asm { PUSH ESI PUSH EBX MOV ESI, [ESP + 16] MOV EAX, [ESI] MOV EDX, [ESI + 4] MOV ESI, [ESP + 20] MOV EBX, [ESI] MOV ECX, [ESI + 4] MOV ESI, [ESP + 12] LOCK CMPXCHG8B QWORD PTR [ESI] JNE x86_DWCASPTR_failed MOV EAX, 1 POP EBX POP ESI RET x86_DWCASPTR_failed: MOV ESI, [ESP + 16] MOV [ESI], EAX MOV [ESI + 4], EDX MOV EAX, 0 POP EBX POP ESI RET } } __declspec(naked) atomicword x86_XADDWORD( atomicword_pthis _pthis, atomicword const value ) { _asm { MOV EDX, [ESP + 4] MOV EAX, [ESP + 8] LOCK XADD [EDX], EAX RET } } __declspec(naked) atomicword x86_XCHGWORD( atomicword_pthis _pthis, atomicword const value ) { _asm { MOV EDX, [ESP + 4] MOV EAX, [ESP + 8] XCHG [EDX], EAX RET } } #define x86_XCHGPTR(mp_pdest, mp_src) ( \ (void*)x86_XCHGWORD( \ ((atomicword_pthis)(mp_pdest)), \ ((atomicword const)(mp_src)) \ ) \ ) #define XCHGWORD x86_XCHGWORD #define XCHGPTR x86_XCHGPTR #define XADDWORD x86_XADDWORD #define DWCASPTR x86_DWCASPTR /* Proxy-Collector API & Implmentation (Revisited) ;^) Inventor: Chris M. Thomasson _____________________________________________________________*/ #include #include #if ! defined(NDEBUG) # include #endif #define CONTAINER_OF(mp_this, mp_type, mp_member) ( \ (mp_type*)(((unsigned char*)(mp_this)) - \ offsetof(mp_type, mp_member)) \ ) typedef struct pc_region_s pc_region, pc_node; typedef struct pc_master_s pc_master; typedef void (pc_fp_dtor) (pc_node*); typedef struct pc_sys_anchor_s pc_sys_anchor; struct pc_sys_anchor_s { atomicword refcnt; pc_region* region; }; struct pc_region_s { pc_sys_anchor next; pc_node* defer; }; struct pc_master_s { pc_sys_anchor head; pc_region region; pc_fp_dtor* fp_dtor; }; #define PC_MASTER_STATICINIT(mp_this, mp_fp_dtor) { \ { 0, &(mp_this)->region }, \ { { 0, NULL }, NULL }, (mp_fp_dtor) \ } static void pc_sys_dtor( pc_master* const, pc_region* const ); static void pc_init( pc_master* const, pc_fp_dtor* const ); static void pc_node_init( pc_node* const ); static void pc_node_link( pc_node* const, pc_node* const ); static pc_region* pc_acquire( pc_master* const ); static void pc_release( pc_master* const, pc_region* const ); static void pc_defer( pc_region* const, pc_node* const ); static void pc_mutate( pc_master* const, pc_node* const ); void pc_init( pc_master* const _this, pc_fp_dtor* const fp_dtor ) { pc_master src = { { 0 } }; *_this = src; _this->head.region = &_this->region; _this->fp_dtor = fp_dtor; } pc_region* pc_acquire( pc_master* const _this ) { pc_sys_anchor cmp = _this->head, xchg; do { xchg.refcnt = cmp.refcnt + 2; xchg.region = cmp.region; } while (! DWCASPTR(&_this->head, &cmp, &xchg)); return cmp.region; } void pc_release( pc_master* const _this, pc_region* const region ) { if (XADDWORD(®ion->next.refcnt, -2) == 3) { pc_sys_dtor(_this, region); } } void pc_node_init( pc_node* const _this ) { pc_node src = { { 0 } }; *_this = src; } void pc_node_link( pc_node* const _this, pc_node* const next ) { _this->defer = next; } void pc_defer( pc_region* const _this, pc_node* const node ) { node->defer = XCHGPTR(&_this->defer, node); } void pc_mutate( pc_master* const _this, pc_node* const node ) { pc_sys_anchor cmp = _this->head, xchg = { 0 }; node->next.refcnt = 2; node->next.region = NULL; xchg.region = node; while (! DWCASPTR(&_this->head, &cmp, &xchg)); cmp.region->next.region = node; if (XADDWORD(&cmp.region->next.refcnt, cmp.refcnt + 1) == -cmp.refcnt) { pc_sys_dtor(_this, cmp.region); } } void pc_sys_dtor( pc_master* const _this, pc_region* const region ) { int dtors = 0, reset = 0; pc_region* head = region; pc_region* tail = region; pc_region* next = region->next.region; while (next) { if (XADDWORD(&next->next.refcnt, -2) != 3) { break; } tail = next; next = next->next.region; } tail->next.region = NULL; while (head) { pc_region* const next = head->next.region; pc_node* defer = head->defer; assert(head->next.refcnt == 1); if (head != &_this->region) { head->defer = defer; defer = head; } else { reset = 1; } while (defer) { pc_node* const next = defer->defer; _this->fp_dtor(defer); ++dtors; defer = next; } head = next; } if (reset) { _this->region.defer = NULL; pc_mutate(_this, &_this->region); } #if ! defined(NDEBUG) { static atomicword g_pc_sys_epoch = 0; atomicword const epoch = XADDWORD(&g_pc_sys_epoch, 1); if (dtors) { printf("pc_sys_dtor::epoch/dtors(%d/%d)\n", epoch, dtors); } } #endif } /*===========================================================*/ # if defined(__cplusplus) } # endif # pragma warning(pop) #endif ____________________________________________________________________ struct foo_node { foo_node* next; pc_node pcn; }; struct foo_list { foo_node* head; pc_master pc; }; static foo_list g_list = { NULL, PC_MASTER_STATICINIT() }; void foo_node_dtor(pc_node* pcn) { foo_node* const _this = container_of(pcn, foo_node, pcn); free(_this); } void foo_reader() { int i; foo_node* node; pc_region* pcr = pc_acquire(&g_list.pc); for (i = 1 ;; ++i) { node = LOAD_DEPENDS(&g_list.head); while (node) { foo_node* const next = LOAD_MBDEPEND(&node->next); [...]; node = next; } if (! (i % 1000)) { pc_release(&g_list.pc, pcr); pcr = pc_acquire(&g_list.pc); } } pc_release(&g_list.pc, pcr); } void foo_writer() { int i; foo_node* node, *cmp; pc_region* pcr = pc_acquire(&g_list.pc); for (i = 1 ;; ++i) { if (i % 10) { node = malloc(sizeof(*node)); if (node) { foo_node* cmp; pc_node_init(node, NULL, foo_node_dtor); cmp = g_list.head; do { node->next = cmp; } while (! CASIBM_MBREL(&g_list.head, &cmp, node)); } } else { node = g_list.head; do { if (! node) { break; } } while (! CASIBM_MBACQ(&g_list.head, &node, node->next)); if (node) { if (! (i % 20)) { pc_mutate(&g_list.pc, &node->pcn); } else { pc_defer(pcr, &node->pcn); } } } if (! (i % 500)) { pc_release(&g_list.pc, pcr); pcr = pc_acquire(&g_list.pc); } } pc_release(&g_list.pc, pcr); } 1. Region 1 is current 2. Thread 1 acquires region 1 3. Thread 2 executes pc_mutate() 4. Region 2 is current 5. Thread 3 acquires region 2 6. Thread 3 loads pointer to node 1 7. Thread 1 removes node 1 from data structure 8. Thread 1 executes pc_defer() and defers node 1 to region 1 9. Thread 1 releases region 1 10. Dtor executed for region 1, node 1 is deleted 11. Thread 3 accesses node 1 12. Bang! ================================================ FILE: tests/relacy/relacy/test/trash/rtl.hpp ================================================ #pragma once #include "../../relacy/relacy_std.hpp" intptr_t const lock_value = (intptr_t)-1; struct rdesc { rl::var const*> addr; rl::var cmp; }; struct wdesc { rl::var*> addr; rl::var cmp; rl::var xchg; }; struct trx { static size_t const rset_max_size = 64; static size_t const wset_max_size = 32; rl::var rset_idx; rl::var wset_idx; rdesc rset [rset_max_size]; wdesc wset [wset_max_size]; rl::var read(std::atomic const* addr, std::memory_order mo = std::memory_order_relaxed) { intptr_t value = (*addr)($).load(mo); if (lock_value == value) return 0; rdesc* desc = &rset[rset_idx($)]; ++rset_idx($); desc->addr($) = addr; desc->cmp($) = value; return desc; } rl::var write(std::atomic* addr) { intptr_t value = (*addr)($).swap(lock_value, rl::memory_order_acq_rel); if (lock_value == value) return 0; wdesc* desc = &wset[wset_idx($)]; ++wset_idx($); desc->addr($) = addr; desc->cmp($) = value; return desc; } bool begin() { std::atomic_signal_fence($)(std::memory_order_acquire); rset_idx($) = 0; wset_idx($) = 0; return true; } bool commit() { std::atomic_signal_fence($)(std::memory_order_release); size_t i; for (i = 0; i != rset_idx($); ++i) { rdesc const* desc = &rset[i]; if ((*(desc->addr($)))($).load(std::memory_order_relaxed) != desc->cmp($)) break; } if (i != rset_idx($)) { return rollback(); } std::atomic_thread_fence($)(std::memory_order_release); for (i = 0; i != wset_idx($); ++i) { wdesc const* desc = &wset[i]; (*(desc->addr($)))($).store(desc->xchg($), std::memory_order_relaxed); } //std::atomic_thread_fence(std::memory_order_acq_rel); return true; } bool rollback() { for (size_t i = 0; i != wset_idx($); ++i) { wdesc const* desc = &wset[i]; (*(desc->addr($)))($).store(desc->cmp($), std::memory_order_relaxed); } wset_idx($) = 0; rset_idx($) = 0; return false; } /* bool readset_validate() { for (size_t i = 0; i != rset_idx; ++i) { rdesc const* desc = &rset[i]; if (*(intptr_t const volatile*)desc->addr != desc->cmp) return true; } return false; } bool writeset_load(intptr_t* addr, intptr_t* value) { for (size_t i = 0; i != wset_idx; ++i) { wdesc const* desc = &wset[i]; if (desc->addr == addr) { *value = desc->xchg; return true; } } return false; } */ }; inline void pdr_lock() { } inline void pdr_unlock() { } inline void pdr_acquire(void*) { } inline void pdr_release(void*) { } inline void pdr_dispose(void*) { } struct dlist_trx_node { std::atomic prev; // dlist_trx_node* std::atomic next; // dlist_trx_node* rl::var key; rl::var value; dlist_trx_node(intptr_t key = 0, intptr_t value = 0) : key(key) , value(value) {} }; class dlist_trx { public: dlist_trx() : first(0, 0) , last(0, 0) { first.prev($).store(0, std::memory_order_relaxed); first.next($).store((intptr_t)&last, std::memory_order_relaxed); last.prev($).store((intptr_t)&first, std::memory_order_relaxed); last.next($).store(0, std::memory_order_relaxed); } __declspec(noinline) void remove(dlist_trx_node* node) { pdr_lock(); for (trx t; t.begin(); t.rollback()) { rdesc* r1 = t.read(&node->prev)($); if (0 == r1) continue; dlist_trx_node* prev = (dlist_trx_node*)(intptr_t)r1->cmp($); rdesc* r2 = t.read(&node->next)($); if (0 == r2) continue; dlist_trx_node* next = (dlist_trx_node*)(intptr_t)r2->cmp($); wdesc* w1 = t.write(&prev->next)($); if (0 == w1) continue; //dlist_trx_node* prev_next = (dlist_trx_node*)w1->cmp; wdesc* w2 = t.write(&next->prev)($); if (0 == w2) continue; //dlist_trx_node* next_prev = (dlist_trx_node*)w2->cmp; w1->xchg($) = (intptr_t)next; w2->xchg($) = (intptr_t)prev; if (t.commit()) break; } pdr_unlock(); } __declspec(noinline) void insert(dlist_trx_node* node) { pdr_lock(); for (trx t; t.begin(); t.rollback()) { wdesc* w1 = t.write(&first.next)($); if (0 == w1) continue; dlist_trx_node* next = (dlist_trx_node*)(intptr_t)w1->cmp($); wdesc* w2 = t.write(&next->prev)($); if (0 == w2) continue; dlist_trx_node* const& prev = (dlist_trx_node*)(intptr_t)w2->cmp($); if (prev != &first) continue; node->prev($).store((intptr_t)prev, std::memory_order_relaxed); node->next($).store((intptr_t)next, std::memory_order_relaxed); w1->xchg($) = (intptr_t)node; w2->xchg($) = (intptr_t)node; if (t.commit()) break; } pdr_unlock(); } __declspec(noinline) void foreach(void (*f)(void*, dlist_trx_node*), void (*reset)(void*), void* ctx) { pdr_lock(); for (trx t; t.begin(); t.rollback()) { reset(ctx); rdesc* r1 = t.read(&first.next, std::memory_order_consume)($); if (0 == r1) continue; dlist_trx_node* node = (dlist_trx_node*)(intptr_t)r1->cmp($); while (node->next($).load(std::memory_order_consume)) { rdesc* r = t.read(&node->next)($); if (0 == r) break; dlist_trx_node* next = (dlist_trx_node*)(intptr_t)r->cmp($); f(ctx, node); node = next; } if (node->next($).load(std::memory_order_relaxed)) continue; if (t.commit()) break; } pdr_unlock(); } dlist_trx_node first; dlist_trx_node last; }; struct dlist_trx_test : rl::test_suite { dlist_trx list; static int const count = 4; dlist_trx_node nodes[2][count]; void thread(unsigned index) { if (0 == index || 1 == index) { for (int i = 0; i != count; ++i) { dlist_trx_node* n = &nodes[index][i]; intptr_t value = 1 << ((index * count + i) * 4); n->key($) = value; n->value($) = value; list.insert(n); } for (int i = 0; i != count; ++i) { dlist_trx_node* n = &nodes[index][i]; list.remove(n); } } else if (2 == index || 3 == index) { struct local { static void reset(void* ctx) { *(int*)ctx = 0; } static void apply(void* ctx, dlist_trx_node* n) { *(int*)ctx += (int)n->value($); } }; int volatile sum = 0; list.foreach(&local::apply, &local::reset, (void*)&sum); int volatile x = sum; (void)x; } } void invariant() { int volatile sum = 0; dlist_trx_node* n = (dlist_trx_node*)list.first.next($).load(); for (;;) { if (lock_value == (intptr_t)n) break; dlist_trx_node* next = (dlist_trx_node*)n->next($).load(); if (0 == next) break; sum += (int)n->value($); n = next; } } }; ================================================ FILE: tests/relacy/relacy/test/tutorial.txt ================================================ 1. Add #include 2. For atomic variables use type std::atomic: std::atomic head; 3. For usual non-atomic variables use type rl::var: rl::var data; Such vars will be checked for races and included into trace. 4. All accesses to std::atomic and rl::var variables postfix with '($)': std::atomic head; rl::var data; head($).store(0); data($) = head($).load(); 5. Strictly thread-private variables use can leave as-is: for (int i = 0; i != 10; ++i) Such vars will be NOT checked for races NOR included into trace. But they will accelerate verification. 6. Describe test-suite: number of threads, thread function, before/after/invariant functions. See example below. 7. Place asserts: int x = g($).load(); RL_ASSERT(x > 0); 8. Start verification: rl::simulate(); Here is complete example: #include // template parameter '2' is number of threads struct race_test : rl::test_suite { std::atomic a; rl::var x; // executed in single thread before main thread function void before() { a($) = 0; x($) = 0; } // main thread function void thread(unsigned thread_index) { if (0 == thread_index) { x($) = 1; a($).store(1, rl::memory_order_relaxed); } else { if (1 == a($).load(rl::memory_order_relaxed)) x($) = 2; } } // executed in single thread after main thread function void after() { } // executed in single thread after every 'visible' action in main threads // disallowed to modify any state void invariant() { } }; int main() { rl::simulate(); } ================================================ FILE: tests/relacy/relacy/test/wfmo.hpp ================================================ #pragma once #include "../relacy/relacy_std.hpp" struct test_wfmo_all : rl::test_suite { HANDLE sema1; HANDLE sema2; rl::var data; void before() { sema1 = CreateSemaphore(0, 0, 2, 0); sema2 = CreateSemaphore(0, 0, 2, 0); data($) = 0; } void after() { CloseHandle(sema1); CloseHandle(sema2); } void thread(unsigned index) { if (0 == index) { HANDLE handles [2] = {sema1, sema2}; WaitForMultipleObjects(2, handles, 1, INFINITE); RL_ASSERT(data($) == 2); } else { data($) = 1; ReleaseSemaphore(sema1, 1, 0); data($) = 2; ReleaseSemaphore(sema2, 1, 0); } } }; struct test_wfmo_single : rl::test_suite { HANDLE sema1; HANDLE sema2; rl::atomic data; void before() { sema1 = CreateSemaphore(0, 0, 2, 0); sema2 = CreateSemaphore(0, 0, 2, 0); data($) = 0; } void after() { CloseHandle(sema1); CloseHandle(sema2); } void thread(unsigned index) { if (0 == index) { HANDLE handles [2] = {sema1, sema2}; WaitForMultipleObjects(2, handles, 0, INFINITE); int d = data.load(rl::memory_order_relaxed); RL_ASSERT(d == 1 || d == 2); RL_UNTIL(d == 1); } else { data.store(1, rl::memory_order_relaxed); ReleaseSemaphore(sema1, 1, 0); data.store(2, rl::memory_order_relaxed); ReleaseSemaphore(sema2, 1, 0); } } }; struct test_wfmo_timeout : rl::test_suite { HANDLE sema1; HANDLE sema2; rl::atomic data; void before() { sema1 = CreateSemaphore(0, 0, 2, 0); sema2 = CreateSemaphore(0, 0, 2, 0); data($) = 0; } void after() { CloseHandle(sema1); CloseHandle(sema2); } void thread(unsigned index) { if (0 == index) { HANDLE handles [2] = {sema1, sema2}; WaitForMultipleObjects(2, handles, 0, 100); int d = data.load(rl::memory_order_relaxed); RL_ASSERT(d == 0 || d == 1 || d == 2); RL_UNTIL(d == 0); } else { data.store(1, rl::memory_order_relaxed); ReleaseSemaphore(sema1, 1, 0); data.store(2, rl::memory_order_relaxed); ReleaseSemaphore(sema2, 1, 0); } } }; struct test_wfmo_try : rl::test_suite { HANDLE sema1; HANDLE sema2; rl::atomic d; rl::atomic d1; rl::atomic d2; void before() { sema1 = CreateSemaphore(0, 1, 2, 0); sema2 = CreateSemaphore(0, 1, 2, 0); d1($) = 0; d2($) = 0; } void after() { CloseHandle(sema1); CloseHandle(sema2); } void thread(unsigned index) { if (0 == index) { d1.store(1, rl::memory_order_relaxed); HANDLE handles [2] = {sema1, sema2}; if (WAIT_TIMEOUT == WaitForMultipleObjects(2, handles, 1, 0)) RL_ASSERT(1 == d2.load(rl::memory_order_relaxed)); } else if (1 == index) { d2.store(1, rl::memory_order_relaxed); HANDLE handles [2] = {sema2, sema1}; if (WAIT_TIMEOUT == WaitForMultipleObjects(2, handles, 1, 0)) RL_ASSERT(1 == d1.load(rl::memory_order_relaxed)); } } }; struct test_wfmo_mixed : rl::test_suite { HANDLE sem [2]; void before() { sem[0] = CreateSemaphore(0, 0, 2, 0); sem[1] = CreateSemaphore(0, 0, 2, 0); } void after() { CloseHandle(sem[0]); CloseHandle(sem[1]); } void thread(unsigned index) { if (0 == index) { ReleaseSemaphore(sem[0], 1, 0); ReleaseSemaphore(sem[0], 1, 0); ReleaseSemaphore(sem[1], 1, 0); } else if (1 == index) { unsigned rv = WaitForMultipleObjects(2, sem, 1, INFINITE); assert(rv == WAIT_OBJECT_0); } else if (2 == index) { unsigned rv = WaitForSingleObject(sem[0], INFINITE); assert(rv == WAIT_OBJECT_0); } } }; struct test_wfmo_mixed2 : rl::test_suite { HANDLE sem [2]; void before() { sem[0] = CreateSemaphore(0, 0, 2, 0); sem[1] = CreateSemaphore(0, 0, 2, 0); } void after() { CloseHandle(sem[0]); CloseHandle(sem[1]); } void thread(unsigned index) { if (0 == index) { ReleaseSemaphore(sem[1], 1, 0); ReleaseSemaphore(sem[0], 1, 0); ReleaseSemaphore(sem[0], 1, 0); } else if (1 == index) { unsigned rv = WaitForSingleObject(sem[0], INFINITE); assert(rv == WAIT_OBJECT_0); } else if (2 == index || 3 == index) { unsigned rv = WaitForMultipleObjects(2, sem, 1, 42); assert(rv == WAIT_OBJECT_0 || rv == WAIT_TIMEOUT); } } }; struct test_wfmo_event_all : rl::test_suite { HANDLE ev [2]; rl::atomic state; void before() { ev[0] = CreateEvent(0, 0, 0, 0); ev[1] = CreateEvent(0, 1, 0, 0); state.store(0, rl::memory_order_relaxed); } void after() { CloseHandle(ev[0]); CloseHandle(ev[1]); } void thread(unsigned index) { if (0 == index) { unsigned rv = WaitForMultipleObjects(2, ev, 1, INFINITE); assert(rv == WAIT_OBJECT_0 + 0 || rv == WAIT_OBJECT_0 + 1); assert(state.load(rl::memory_order_relaxed) == 1); } else if (1 == index) { SetEvent(ev[0]); state.store(1, rl::memory_order_relaxed); SetEvent(ev[1]); } } }; struct test_wfmo_event_any : rl::test_suite { HANDLE ev [2]; rl::atomic state; void before() { ev[0] = CreateEvent(0, 0, 0, 0); ev[1] = CreateEvent(0, 1, 0, 0); state.store(0, rl::memory_order_relaxed); } void after() { CloseHandle(ev[0]); CloseHandle(ev[1]); } void thread(unsigned index) { if (0 == index) { unsigned rv = WaitForMultipleObjects(2, ev, 0, INFINITE); assert(rv == WAIT_OBJECT_0 + 0 || rv == WAIT_OBJECT_0 + 1); assert(state.load(rl::memory_order_relaxed) == 1); } else if (1 == index) { state.store(1, rl::memory_order_relaxed); SetEvent(ev[0]); SetEvent(ev[1]); } } }; struct test_wfmo_atomic : rl::test_suite { HANDLE ev [2]; rl::atomic state; void before() { ev[0] = CreateEvent(0, 0, 0, 0); ev[1] = CreateEvent(0, 0, 0, 0); } void after() { CloseHandle(ev[0]); CloseHandle(ev[1]); } void thread(unsigned index) { if (0 == index) { state.store(1, rl::memory_order_relaxed); WaitForMultipleObjects(2, ev, 0, 1); } else if (1 == index) { SetEvent(ev[0]); SetEvent(ev[1]); unsigned rv = WaitForSingleObject(ev[0], 0); if (rv == WAIT_TIMEOUT) { assert(state.load(rl::memory_order_relaxed) == 1); RL_UNTIL(true); } } } }; ================================================ FILE: tests/relacy/relacy/test/windows.hpp ================================================ #pragma once #include "../relacy/windows.h" struct test_win_thread : rl::test_suite { static size_t const dynamic_thread_count = 2; VAR_T(int) data; static unsigned long RL_STDCALL win_func(void* param) { static_cast(param)->VAR(data) += 1; return 0; } static unsigned RL_STDCALL msvc_func(void* param) { static_cast(param)->VAR(data) += 1; return 0; } void thread(unsigned) { VAR(data) = 0; HANDLE th1 = CreateThread(0, 0, &test_win_thread::win_func, this, 0, 0); WaitForSingleObject(th1, INFINITE); RL_ASSERT(VAR(data) == 1); HANDLE th2 = (HANDLE)_beginthreadex(0, 0, &test_win_thread::msvc_func, this, 0, 0); WaitForSingleObject(th2, INFINITE); RL_ASSERT(VAR(data) == 2); } }; struct test_win_mutex : rl::test_suite { HANDLE mtx; VAR_T(int) data; void before() { mtx = CreateMutex(0, 0, 0); VAR(data) = 0; } void after() { CloseHandle(mtx); } void thread(unsigned) { WaitForSingleObject(mtx, INFINITE); WaitForSingleObject(mtx, INFINITE); VAR(data) += 1; ReleaseMutex(mtx); ReleaseMutex(mtx); if (WAIT_OBJECT_0 == WaitForSingleObject(mtx, 0)) { VAR(data) += 1; ReleaseMutex(mtx); } } }; struct test_win_cs : rl::test_suite { CRITICAL_SECTION mtx; VAR_T(int) data; void before() { InitializeCriticalSection(&mtx); VAR(data) = 0; } void after() { DeleteCriticalSection(&mtx); } void thread(unsigned) { EnterCriticalSection(&mtx); VAR(data) += 1; LeaveCriticalSection(&mtx); if (TryEnterCriticalSection(&mtx)) { VAR(data) += 1; LeaveCriticalSection(&mtx); } } }; struct test_win_condvar : rl::test_suite { CONDITION_VARIABLE cv; CRITICAL_SECTION mtx; VAR_T(int) stage; void before() { InitializeConditionVariable(&cv); InitializeCriticalSection(&mtx); VAR(stage) = 0; } void after() { DeleteCriticalSection(&mtx); DeleteConditionVariable(&cv); } void thread(unsigned index) { if (0 == index) { EnterCriticalSection(&mtx); VAR(stage) += 1; WakeAllConditionVariable(&cv); while (VAR(stage) != 2) SleepConditionVariableCS(&cv, &mtx, INFINITE); LeaveCriticalSection(&mtx); } else if (1 == index) { EnterCriticalSection(&mtx); while (VAR(stage) != 1) SleepConditionVariableCS(&cv, &mtx, 1); VAR(stage) += 1; WakeAllConditionVariable(&cv); LeaveCriticalSection(&mtx); } else if (2 == index) { EnterCriticalSection(&mtx); while (VAR(stage) != 2) SleepConditionVariableCS(&cv, &mtx, INFINITE); LeaveCriticalSection(&mtx); WakeConditionVariable(&cv); } } }; struct test_win_condvar_srw : rl::test_suite { CONDITION_VARIABLE cv; SRWLOCK mtx; VAR_T(int) stage; void before() { InitializeConditionVariable(&cv); InitializeSRWLock(&mtx); VAR(stage) = 0; } void after() { DeleteSRWLock(&mtx); DeleteConditionVariable(&cv); } void thread(unsigned index) { if (0 == index) { AcquireSRWLockExclusive(&mtx); VAR(stage) += 1; WakeAllConditionVariable(&cv); while (VAR(stage) != 2) SleepConditionVariableSRW(&cv, &mtx, INFINITE, 0); ReleaseSRWLockExclusive(&mtx); } else if (1 == index) { AcquireSRWLockExclusive(&mtx); while (VAR(stage) != 1) SleepConditionVariableSRW(&cv, &mtx, 1, 0); VAR(stage) += 1; WakeAllConditionVariable(&cv); ReleaseSRWLockExclusive(&mtx); } else if (2 == index) { AcquireSRWLockExclusive(&mtx); while (VAR(stage) != 2) SleepConditionVariableSRW(&cv, &mtx, INFINITE, 0); ReleaseSRWLockExclusive(&mtx); WakeConditionVariable(&cv); } } }; struct test_win_sem : rl::test_suite { HANDLE sem1, sem2; VAR_T(int) data; void before() { sem1 = CreateSemaphore(0, 0, 1, 0); sem2 = CreateSemaphore(0, 0, 1, 0); VAR(data) = 0; } void after() { CloseHandle(sem1); CloseHandle(sem2); } void thread(unsigned index) { if (index) { VAR(data) = 1; long count = -1; ReleaseSemaphore(sem1, 1, &count); assert(count == 0); for (;;) { unsigned long rv = WaitForSingleObject(sem2, 0); if (rv == WAIT_OBJECT_0) break; RL_ASSERT(rv == WAIT_TIMEOUT); Sleep(0); } RL_ASSERT(VAR(data) == 2); VAR(data) = 3; ReleaseSemaphore(sem2, 1, &count); RL_ASSERT(count == 0); ReleaseSemaphore(sem2, 1, &count); RL_ASSERT(count == 1); } else { unsigned long rv = WaitForSingleObject(sem1, INFINITE); assert(rv == WAIT_OBJECT_0); RL_ASSERT(VAR(data) == 1); VAR(data) = 2; ReleaseSemaphore(sem2, 1, 0); } } }; struct test_win_event : rl::test_suite { HANDLE ev; VAR_T(int) data; void before() { VAR(data) = 0; ev = CreateEvent(0, 0, 0, 0); } void after() { CloseHandle(ev); } void thread(unsigned index) { if (0 == index) { VAR(data) = 1; SetEvent(ev); PulseEvent(ev); } else { unsigned rv = WaitForSingleObject(ev, INFINITE); assert(rv == WAIT_OBJECT_0); assert(VAR(data) == 1); rv = WaitForSingleObject(ev, 0); assert(rv == WAIT_TIMEOUT); ResetEvent(ev); } } }; struct test_FlushProcessWriteBuffers : rl::test_suite { std::atomic x1; std::atomic x2; int r1; int r2; void before() { x1.store(0, std::memory_order_relaxed); x2.store(0, std::memory_order_relaxed); r1 = r2 = 0; } void after() { assert(r1 == 1 || r2 == 1); } void thread(unsigned index) { if (index) { x1.store(1, std::memory_order_relaxed); r1 = x2.load(std::memory_order_relaxed); } else { x2.store(1, std::memory_order_relaxed); FlushProcessWriteBuffers(); r2 = x1.load(std::memory_order_relaxed); } } }; ================================================ FILE: tests/relacy/relacy_shims.h ================================================ #pragma once // Use relacy assertions #undef assert #ifdef NDEBUG #define assert(x) #else #define assert(x) RL_ASSERT(x) #endif struct RelacyThreadExitListener { typedef void (*callback_t)(void*); callback_t callback; void* userData; RelacyThreadExitListener* next; }; class RelacyThreadExitNotifier { public: static void subscribe(RelacyThreadExitListener* listener) { auto& tlsInst = instance(); listener->next = tlsInst.tail; tlsInst.tail = listener; } static void unsubscribe(RelacyThreadExitListener* listener) { auto& tlsInst = instance(); RelacyThreadExitListener** prev = &tlsInst.tail; for (auto ptr = tlsInst.tail; ptr != nullptr; ptr = ptr->next) { if (ptr == listener) { *prev = ptr->next; break; } prev = &ptr->next; } } static void notify_relacy_thread_start() { instance().tail = nullptr; } static void notify_relacy_thread_exit() { for (auto ptr = instance().tail; ptr != nullptr; ptr = ptr->next) { ptr->callback(ptr->userData); } } private: RelacyThreadExitNotifier() : tail(nullptr) { } static RelacyThreadExitNotifier& instance() { static RelacyThreadExitNotifier instances[1024]; auto tid = rl::thread_index(); assert(tid < 1024); return instances[tid]; } private: RelacyThreadExitListener* tail; }; namespace std { // Relacy doesn't wrap std::atomic_flag struct atomic_flag { private: atomic_flag(atomic_flag const&); atomic_flag(atomic_flag&&); atomic_flag& operator=(atomic_flag const&); atomic_flag& operator=(atomic_flag&&); public: atomic_flag() { } atomic_flag(bool initialValue) : val(initialValue ? 1 : 0) { } void clear() { clear(std::memory_order_seq_cst); } void clear(rl::memory_order order, rl::debug_info_param d) { val.store(0, order, d); } bool test_and_set() { return test_and_set(std::memory_order_seq_cst); } bool test_and_set(rl::memory_order order, rl::debug_info_param d) { return val.fetch_or(1, order, d) != 0; } private: std::atomic val; }; } ================================================ FILE: tests/relacy/spmchash.cpp ================================================ // ©2014 Cameron Desrochers #include "relacy/relacy/relacy_std.hpp" namespace details { template static inline char* align_for(char* ptr) { const std::size_t alignment = std::alignment_of::value; return ptr + (alignment - (reinterpret_cast(ptr) % alignment)) % alignment; } } template struct SPMCSequentialHashMap { explicit SPMCSequentialHashMap(std::size_t initialSize) : nextCapacity(initialSize), index(nullptr) { new_index(); } ~SPMCSequentialHashMap() { auto ptr = index.load(std::memory_order_relaxed); if (ptr != nullptr) { for (std::size_t i = 0; i != ptr->capacity; ++i) { ptr->index[i]->~IndexEntry(); } do { auto prev = ptr->prev; ptr->~IndexHeader(); free(ptr); ptr = prev; } while (ptr != nullptr); } } // Not thread safe. Only call from single producer thread. // Note: key must *not* be in hash already, and must be exactly // one larger than the previously inserted key value. void insert(std::uint64_t key, TValue* value) { IndexEntry* idxEntry; insert_index_entry(idxEntry, key); idxEntry->value.store(value, std::memory_order_release); } // Thread-safe, but if somebody can remove the key while find() is // in progress, then any returned value is not guaranteed to correspond // to that key. This also applies if the key was not already present but // once was. Elements can be found in any order. TValue* find(std::uint64_t key) { auto idxEntry = get_entry_for_key(key); if (idxEntry == nullptr) return nullptr; return idxEntry->value.load(std::memory_order_acquire); } // Thread-safe, but if somebody else can remove the same key while remove() // is in progress, then any removed value is not guaranteed to correspond // to that key This also applies if the key was not already present but // once was. Elements can be removed in an order. TValue* remove(std::uint64_t key) { auto idxEntry = get_entry_for_key(key); if (idxEntry == nullptr) return nullptr; TValue* val = nullptr; while (!idxEntry->value.compare_exchange_weak(val, nullptr, std::memory_order_acquire, std::memory_order_relaxed)) continue; return val; } private: struct IndexEntry { std::atomic key; std::atomic value; }; struct IndexHeader { std::size_t capacity; std::atomic tail; IndexEntry* entries; IndexEntry** index; IndexHeader* prev; }; inline void insert_index_entry(IndexEntry*& idxEntry, std::uint64_t key) { auto localIndex = index.load(std::memory_order_relaxed); // We're the only writer thread, relaxed is OK auto newTail = (localIndex->tail.load(std::memory_order_relaxed) + 1) & (localIndex->capacity - 1); idxEntry = localIndex->index[newTail]; if (idxEntry->key.load(std::memory_order_relaxed) == INVALID_KEY || idxEntry->value.load(std::memory_order_relaxed) == nullptr) { idxEntry->key.store(key, std::memory_order_relaxed); localIndex->tail.store(newTail, std::memory_order_release); return; } // No room in the old index, try to allocate another one! new_index(); localIndex = index.load(std::memory_order_relaxed); newTail = (localIndex->tail.load(std::memory_order_relaxed) + 1) & (localIndex->capacity - 1); idxEntry = localIndex->index[newTail]; assert(idxEntry->key.load(std::memory_order_relaxed) == INVALID_KEY); idxEntry->key.store(key, std::memory_order_relaxed); localIndex->tail.store(newTail, std::memory_order_release); } inline IndexEntry* get_entry_for_key(std::uint64_t key) const { auto localIndex = index.load(std::memory_order_acquire); auto tail = localIndex->tail.load(std::memory_order_acquire); auto tailBase = localIndex->index[tail]->key.load(std::memory_order_relaxed); if (tailBase == INVALID_KEY) { return nullptr; } auto offset = static_cast(key - tailBase); std::size_t idx = (tail + offset) & (localIndex->capacity - 1); auto entry = localIndex->index[idx]; return entry->key.load(std::memory_order_relaxed) == key ? entry : nullptr; } bool new_index() { auto prev = index.load(std::memory_order_relaxed); std::size_t prevCapacity = prev == nullptr ? 0 : prev->capacity; auto entryCount = prev == nullptr ? nextCapacity : prevCapacity; auto raw = static_cast(malloc( sizeof(IndexHeader) + std::alignment_of::value - 1 + sizeof(IndexEntry) * entryCount + std::alignment_of::value - 1 + sizeof(IndexEntry*) * nextCapacity)); if (raw == nullptr) { return false; } auto header = new (raw) IndexHeader; auto entries = reinterpret_cast(details::align_for(raw + sizeof(IndexHeader))); auto idx = reinterpret_cast(details::align_for(reinterpret_cast(entries) + sizeof(IndexEntry) * entryCount)); if (prev != nullptr) { auto prevTail = prev->tail.load(std::memory_order_relaxed); auto prevPos = prevTail; std::size_t i = 0; do { prevPos = (prevPos + 1) & (prev->capacity - 1); idx[i++] = prev->index[prevPos]; } while (prevPos != prevTail); assert(i == prevCapacity); } for (std::size_t i = 0; i != entryCount; ++i) { new (entries + i) IndexEntry; entries[i].key.store(INVALID_KEY, std::memory_order_relaxed); entries[i].value.store(nullptr, std::memory_order_relaxed); idx[prevCapacity + i] = entries + i; } header->prev = prev; header->entries = entries; header->index = idx; header->capacity = nextCapacity; header->tail.store((prevCapacity - 1) & (nextCapacity - 1), std::memory_order_relaxed); index.store(header, std::memory_order_release); nextCapacity <<= 1; return true; } private: std::size_t nextCapacity; std::atomic index; static const std::uint64_t INVALID_KEY = ~(std::uint64_t)0; }; template struct test : rl::test_suite, ThreadCount> { SPMCSequentialHashMap* hash; int values[NUM_VALUES]; std::atomic useCounts[NUM_VALUES]; std::atomic removed[NUM_VALUES]; void before() { hash = new SPMCSequentialHashMap(2); for (int i = 0; i != NUM_VALUES; ++i) { values[i] = i; useCounts[i].store(0, std::memory_order_relaxed); removed[i].store(false, std::memory_order_relaxed); } } void thread(unsigned int tid) { if (tid == 0) { // Producer for (int i = 0; i != NUM_VALUES; ++i) { hash->insert(i, &values[i]); useCounts[i].store(ThreadCount / 2, std::memory_order_release); } } else { // Consumer for (int i = 0; i != NUM_VALUES; ++i) { auto useCount = useCounts[i].fetch_add(-1, std::memory_order_acquire); auto val = hash->find(i); bool isRemoved = removed[i].load(std::memory_order_relaxed); auto current = useCounts[i].fetch_add(0, std::memory_order_release); if (useCount > 0 && (current > 0 || current == 0 && useCount == 1)) { RL_ASSERT(val != nullptr && *val == i && !isRemoved); } if (useCount == 1) { val = hash->remove(i); RL_ASSERT(val != nullptr && *val == i && !removed[i].load(std::memory_order_relaxed)); removed[i].store(true, std::memory_order_release); } } } } void after() { delete hash; } void invariant() { } }; int main() { rl::test_params params; //params.search_type = rl::sched_full; //params.iteration_count = 100000000; params.search_type = rl::sched_random; params.iteration_count = 1000000; rl::simulate>(params); rl::simulate>(params); rl::simulate>(params); return 0; } ================================================ FILE: tests/unittests/makefile ================================================ # ©2013-2014 Cameron Desrochers include ../../build/makefile.inc default: $(MAKE) -C ../../build bin/unittests$(EXT) run: default ../../build/bin/unittests$(EXT) ================================================ FILE: tests/unittests/mallocmacro.cpp ================================================ #define malloc(x) malloc(x) #define free(x) free(x) #include "../../blockingconcurrentqueue.h" ================================================ FILE: tests/unittests/minitest.h ================================================ // ©2013-2014 Cameron Desrochers. // Distributed under the simplified BSD license (see the LICENSE file that // should have come with this header). // Provides an extremely basic unit testing framework. #pragma once #include #include #include #include #include #include #ifdef __GNUG__ #include #include #endif #define REGISTER_TEST(testName) registerTest(#testName, &subclass_t::testName) #define ASSERT_OR_FAIL(expr) { if (!(expr)) { notifyTestFailed(__LINE__, #expr); return false; } } #define SUCCEED() { return true; } // Uses CRTP template class TestClass { public: static void notifyTestFailed(int line, const char* expr) { std::printf(" FAILED!\n ******* Assertion failed (line %d): %s\n\n", line, expr); } bool validateTestName(std::string const& which) const { return testMap.find(which) != testMap.end(); } void getAllTestNames(std::vector& names) const { for (auto it = testMap.cbegin(); it != testMap.cend(); ++it) { names.push_back(it->first); } } bool run(unsigned int iterations = 1) { bool success = true; for (auto it = testVec.cbegin(); it != testVec.cend(); ++it) { if (!execTest(*it, iterations)) { success = false; } } return success; } bool run(std::vector const& which, unsigned int iterations = 1) { bool success = true; for (auto it = which.begin(); it != which.end(); ++it) { if (!execTest(*testMap.find(*it), iterations)) { success = false; } } return success; } protected: typedef TSubclass subclass_t; void registerTest(const char* name, bool (subclass_t::* method)()) { testVec.push_back(std::make_pair(std::string(name), method)); testMap[std::string(name)] = method; } virtual bool preTest() { return true; } virtual bool postTest(bool) { return true; } bool execTest(std::pair const& testRef, unsigned int iterations) { std::printf("%s::%s... \n", demangle_type_name(typeid(subclass_t).name()).c_str(), testRef.first.c_str()); bool result = true; for (unsigned int i = 0; result && i != iterations; ++i) { result = preTest(); try { result = result && (static_cast(this)->*testRef.second)(); } catch (...) { std::printf(" FAILED!\n ******* Unhandled exception thrown\n\n"); result = false; } result = postTest(result) && result; } if (result) { std::printf(" passed\n\n"); } return result; } private: static std::string demangle_type_name(const char* name) { #ifdef __GNUG__ // Adapted from http://stackoverflow.com/a/4541470/21475 int status = -4; char* res = abi::__cxa_demangle(name, nullptr, nullptr, &status); const char* const demangled_name = (status == 0) ? res : name; std::string ret(demangled_name); std::free(res); return ret; #else return name; #endif } protected: std::vector > testVec; std::map testMap; }; ================================================ FILE: tests/unittests/unittests.cpp ================================================ // ©2013-2014 Cameron Desrochers. // Distributed under the simplified BSD license (see the LICENSE file that // should have come with this file). // Unit tests for moodycamel::ConcurrentQueue #define likely MAKE_SURE_LIKELY_MACRO_CAN_PEACEFULLY_COEXIST #define unlikely MAKE_SURE_UNLIKELY_MACRO_CAN_PEACEFULLY_COEXIST #include #include #include #include #include #include #include struct MakeSureCustomNewCanPeacefullyCoexist; void* operator new(size_t size, MakeSureCustomNewCanPeacefullyCoexist* x); void operator delete(void* ptr, MakeSureCustomNewCanPeacefullyCoexist* x); #ifdef _WIN32 #ifndef NOMINMAX #define NOMINMAX #endif #include // Not because we need it, but to ensure no conflicts arise with the queue's declarations #endif #include "minitest.h" #include "../common/simplethread.h" #include "../common/systemtime.h" #include "../../concurrentqueue.h" #include "../../blockingconcurrentqueue.h" #include "../../c_api/concurrentqueue.h" namespace { struct tracking_allocator { union tag { std::size_t size; #ifdef __GNUC__ max_align_t dummy; // GCC forgot to add it to std:: for a while #else std::max_align_t dummy; // Others (e.g. MSVC) insist it can *only* be accessed via std:: #endif }; static inline void* malloc(std::size_t size) { auto ptr = std::malloc(size + sizeof(tag)); if (ptr) { reinterpret_cast(ptr)->size = size; usage.fetch_add(size, std::memory_order_relaxed); return reinterpret_cast(ptr) + sizeof(tag); } return nullptr; } static inline void free(void* ptr) { if (ptr) { ptr = reinterpret_cast(ptr) - sizeof(tag); auto size = reinterpret_cast(ptr)->size; usage.fetch_add(-size, std::memory_order_relaxed); } std::free(ptr); } static inline std::size_t current_usage() { return usage.load(std::memory_order_relaxed); } private: static std::atomic usage; }; std::atomic tracking_allocator::usage(0); } struct corealgos_allocator { static inline void* malloc(std::size_t size) { return tracking_allocator::malloc(size); } static inline void free(void* ptr) { tracking_allocator::free(ptr); } }; #define corealgos_allocator corealgos_allocator #include "../corealgos.h" using namespace moodycamel; namespace moodycamel { struct MallocTrackingTraits : public ConcurrentQueueDefaultTraits { static inline void* malloc(std::size_t size) { return tracking_allocator::malloc(size); } static inline void free(void* ptr) { tracking_allocator::free(ptr); } }; template struct TestTraits : public MallocTrackingTraits { typedef std::size_t size_t; typedef uint64_t index_t; static const size_t BLOCK_SIZE = BlockSize; static const size_t EXPLICIT_INITIAL_INDEX_SIZE = InitialIndexSize; static const size_t IMPLICIT_INITIAL_INDEX_SIZE = InitialIndexSize * 2; static const bool RECYCLE_ALLOCATED_BLOCKS = RecycleBlocks; static inline void reset() { _malloc_count() = 0; _free_count() = 0; } static inline std::atomic& _malloc_count() { static std::atomic c; return c; } static inline int malloc_count() { return _malloc_count().load(std::memory_order_seq_cst); } static inline std::atomic& _free_count() { static std::atomic c; return c; } static inline int free_count() { return _free_count().load(std::memory_order_seq_cst); } static inline void* malloc(ConcurrentQueueDefaultTraits::size_t bytes) { ++_malloc_count(); return tracking_allocator::malloc(bytes); } static inline void free(void* obj) { ++_free_count(); return tracking_allocator::free(obj); } }; struct SmallIndexTraits : public MallocTrackingTraits { typedef uint16_t size_t; typedef uint16_t index_t; }; struct ExtraSmallIndexTraits : public MallocTrackingTraits { typedef uint8_t size_t; typedef uint8_t index_t; }; struct LargeTraits : public MallocTrackingTraits { static const size_t BLOCK_SIZE = 128; static const size_t INITIAL_IMPLICIT_PRODUCER_HASH_SIZE = 128; static const size_t IMPLICIT_INITIAL_INDEX_SIZE = 128; }; // Note: Not thread safe! struct Foo { static int& nextId() { static int i; return i; } static int& createCount() { static int c; return c; } static int& destroyCount() { static int c; return c; } static bool& destroyedInOrder() { static bool d = true; return d; } static void reset() { createCount() = 0; destroyCount() = 0; nextId() = 0; destroyedInOrder() = true; lastDestroyedId() = -1; } Foo() { id = nextId()++; ++createCount(); } Foo(Foo const&) MOODYCAMEL_DELETE_FUNCTION; Foo(Foo&& other) { id = other.id; other.id = -1; } void operator=(Foo&& other) { id = other.id; other.id = -1; } ~Foo() { ++destroyCount(); if (id == -2) { // Double free! destroyedInOrder() = false; } else if (id != -1) { if (id <= lastDestroyedId()) { destroyedInOrder() = false; } lastDestroyedId() = id; } id = -2; } private: int id; static int& lastDestroyedId() { static int i = -1; return i; } }; struct Copyable { Copyable(int id) : copied(false), id(id) { } Copyable(Copyable const& o) : copied(true), id(o.id) { } void operator=(Copyable const& o) { copied = true; id = o.id; } bool copied; int id; }; struct Moveable { Moveable(int id) : moved(false), copied(false), id(id) { } Moveable(Moveable&& o) MOODYCAMEL_NOEXCEPT : moved(true), copied(o.copied), id(o.id) { } void operator=(Moveable&& o) MOODYCAMEL_NOEXCEPT { moved = true; copied = o.copied; id = o.id; } bool moved; bool copied; int id; #if defined(_MSC_VER) && _MSC_VER < 1800 // VS2012's std::is_nothrow_[move_]constructible is broken, so the queue never attempts to // move objects with that compiler. In this case, we don't know whether it's really a copy // or not being done, so give the benefit of the doubt (given the tests pass on other platforms) // and assume it would have done a move if it could have (don't set copied to true). Moveable(Moveable const& o) MOODYCAMEL_NOEXCEPT : moved(o.moved), copied(o.copied), id(o.id) { } void operator=(Moveable const& o) MOODYCAMEL_NOEXCEPT { moved = o.moved; copied = o.copied; id = o.id; } #else Moveable(Moveable const& o) MOODYCAMEL_NOEXCEPT : moved(o.moved), copied(true), id(o.id) { } void operator=(Moveable const& o) MOODYCAMEL_NOEXCEPT { moved = o.moved; copied = true; id = o.id; } #endif }; struct ThrowingMovable { static std::atomic& ctorCount() { static std::atomic c; return c; } static std::atomic& destroyCount() { static std::atomic c; return c; } static void reset() { ctorCount() = 0; destroyCount() = 0; } explicit ThrowingMovable(int id, bool throwOnCctor = false, bool throwOnAssignment = false, bool throwOnSecondCctor = false) : id(id), moved(false), copied(false), throwOnCctor(throwOnCctor), throwOnAssignment(throwOnAssignment), throwOnSecondCctor(throwOnSecondCctor) { ctorCount().fetch_add(1, std::memory_order_relaxed); } ThrowingMovable(ThrowingMovable const& o) : id(o.id), moved(false), copied(true), throwOnCctor(o.throwOnCctor), throwOnAssignment(o.throwOnAssignment), throwOnSecondCctor(false) { if (throwOnCctor) { throw this; } ctorCount().fetch_add(1, std::memory_order_relaxed); throwOnCctor = o.throwOnSecondCctor; } ThrowingMovable(ThrowingMovable&& o) : id(o.id), moved(true), copied(false), throwOnCctor(o.throwOnCctor), throwOnAssignment(o.throwOnAssignment), throwOnSecondCctor(false) { if (throwOnCctor) { throw this; } ctorCount().fetch_add(1, std::memory_order_relaxed); throwOnCctor = o.throwOnSecondCctor; } ~ThrowingMovable() { destroyCount().fetch_add(1, std::memory_order_relaxed); } void operator=(ThrowingMovable const& o) { id = o.id; moved = false; copied = true; throwOnCctor = o.throwOnCctor; throwOnAssignment = o.throwOnAssignment; throwOnSecondCctor = o.throwOnSecondCctor; if (throwOnAssignment) { throw this; } } void operator=(ThrowingMovable&& o) { id = o.id; moved = true; copied = false; throwOnCctor = o.throwOnCctor; throwOnAssignment = o.throwOnAssignment; throwOnSecondCctor = o.throwOnSecondCctor; if (throwOnAssignment) { throw this; } } int id; bool moved; bool copied; public: bool throwOnCctor; bool throwOnAssignment; bool throwOnSecondCctor; }; #ifdef __arm__ #define SUPER_ALIGNMENT 64 #else #define SUPER_ALIGNMENT 128 #endif #ifdef _MSC_VER #pragma warning(push) #pragma warning(disable: 4324) // structure was padded due to alignment specifier #endif struct MOODYCAMEL_ALIGNAS(SUPER_ALIGNMENT) VeryAligned { static size_t errors; int value; VeryAligned() MOODYCAMEL_NOEXCEPT : value(0) { if (reinterpret_cast(this) % SUPER_ALIGNMENT != 0) ++errors; } VeryAligned(int value) MOODYCAMEL_NOEXCEPT : value(value) { if (reinterpret_cast(this) % SUPER_ALIGNMENT != 0) ++errors; } VeryAligned(VeryAligned&& x) MOODYCAMEL_NOEXCEPT : value(x.value) { if (reinterpret_cast(this) % SUPER_ALIGNMENT != 0) ++errors; x.value = 0; } VeryAligned& operator=(VeryAligned&& x) MOODYCAMEL_NOEXCEPT { std::swap(value, x.value); return *this; } VeryAligned(VeryAligned const&) MOODYCAMEL_DELETE_FUNCTION; VeryAligned& operator=(VeryAligned const&) MOODYCAMEL_DELETE_FUNCTION; }; size_t VeryAligned::errors = 0; #ifdef _MSC_VER #pragma warning(pop) #endif class ConcurrentQueueTests : public TestClass { public: ConcurrentQueueTests() { REGISTER_TEST(create_empty_queue); REGISTER_TEST(create_token); REGISTER_TEST(circular_less_than); REGISTER_TEST(enqueue_one_explicit); REGISTER_TEST(enqueue_and_dequeue_one_explicit); REGISTER_TEST(enqueue_one_implicit); REGISTER_TEST(enqueue_and_dequeue_one_implicit); REGISTER_TEST(enqueue_and_dequeue_a_few); REGISTER_TEST(enqueue_bulk); REGISTER_TEST(block_alloc); REGISTER_TEST(token_move); REGISTER_TEST(multi_producers); REGISTER_TEST(producer_reuse); REGISTER_TEST(block_reuse); REGISTER_TEST(block_recycling); REGISTER_TEST(leftovers_destroyed); REGISTER_TEST(block_index_resized); REGISTER_TEST(try_dequeue); REGISTER_TEST(try_dequeue_threaded); REGISTER_TEST(try_dequeue_bulk); REGISTER_TEST(try_dequeue_bulk_threaded); REGISTER_TEST(implicit_producer_hash); REGISTER_TEST(index_wrapping); REGISTER_TEST(subqueue_size_limit); REGISTER_TEST(exceptions); REGISTER_TEST(implicit_producer_churn); REGISTER_TEST(test_threaded); REGISTER_TEST(test_threaded_bulk); REGISTER_TEST(full_api); REGISTER_TEST(full_api); REGISTER_TEST(blocking_wrappers); REGISTER_TEST(timed_blocking_wrappers); //c_api/concurrentqueue REGISTER_TEST(c_api_create); REGISTER_TEST(c_api_enqueue); REGISTER_TEST(c_api_try_dequeue); REGISTER_TEST(c_api_destroy); // Semaphore REGISTER_TEST(acquire_and_signal); REGISTER_TEST(try_acquire_and_signal); // Core algos REGISTER_TEST(core_add_only_list); REGISTER_TEST(core_thread_local); REGISTER_TEST(core_free_list); REGISTER_TEST(core_spmc_hash); REGISTER_TEST(explicit_strings_threaded); REGISTER_TEST(large_traits); } bool postTest(bool testSucceeded) override { if (testSucceeded) { // If this assertion fails, there's necessarily a memory leak somewhere! ASSERT_OR_FAIL(tracking_allocator::current_usage() == 0); } return true; } bool create_empty_queue() { ConcurrentQueue q; return true; } bool create_token() { ConcurrentQueue q; ProducerToken tok(q); return true; } bool circular_less_than() { { uint32_t a, b; a = 0; b = 100; ASSERT_OR_FAIL(details::circular_less_than(a, b)); ASSERT_OR_FAIL(!details::circular_less_than(b, a)); a = 100; b = 0; ASSERT_OR_FAIL(!details::circular_less_than(a, b)); ASSERT_OR_FAIL(details::circular_less_than(b, a)); a = 0; b = 0; ASSERT_OR_FAIL(!details::circular_less_than(a, b)); ASSERT_OR_FAIL(!details::circular_less_than(b, a)); a = 100; b = 100; ASSERT_OR_FAIL(!details::circular_less_than(a, b)); ASSERT_OR_FAIL(!details::circular_less_than(b, a)); a = 0; b = 1u << 31; ASSERT_OR_FAIL(!details::circular_less_than(a, b)); ASSERT_OR_FAIL(!details::circular_less_than(b, a)); a = 1; b = 1u << 31; ASSERT_OR_FAIL(details::circular_less_than(a, b)); ASSERT_OR_FAIL(!details::circular_less_than(b, a)); a = 0; b = (1u << 31) + 1; ASSERT_OR_FAIL(!details::circular_less_than(a, b)); ASSERT_OR_FAIL(details::circular_less_than(b, a)); a = 100; b = (1u << 31) + 1; ASSERT_OR_FAIL(details::circular_less_than(a, b)); ASSERT_OR_FAIL(!details::circular_less_than(b, a)); a = (1u << 31) + 7; b = 5; ASSERT_OR_FAIL(details::circular_less_than(a, b)); ASSERT_OR_FAIL(!details::circular_less_than(b, a)); a = (1u << 16) + 7; b = (1 << 16) + 5; ASSERT_OR_FAIL(!details::circular_less_than(a, b)); ASSERT_OR_FAIL(details::circular_less_than(b, a)); a = 0xFFFFFFFFu; b = 0; ASSERT_OR_FAIL(details::circular_less_than(a, b)); ASSERT_OR_FAIL(!details::circular_less_than(b, a)); a = 0xFFFFFFFFu; b = 0xFFFFFFu; ASSERT_OR_FAIL(details::circular_less_than(a, b)); ASSERT_OR_FAIL(!details::circular_less_than(b, a)); } { uint16_t a, b; a = 0; b = 100; ASSERT_OR_FAIL(details::circular_less_than(a, b)); ASSERT_OR_FAIL(!details::circular_less_than(b, a)); a = 100; b = 0; ASSERT_OR_FAIL(!details::circular_less_than(a, b)); ASSERT_OR_FAIL(details::circular_less_than(b, a)); a = 0; b = 0; ASSERT_OR_FAIL(!details::circular_less_than(a, b)); ASSERT_OR_FAIL(!details::circular_less_than(b, a)); a = 100; b = 100; ASSERT_OR_FAIL(!details::circular_less_than(a, b)); ASSERT_OR_FAIL(!details::circular_less_than(b, a)); a = 0; b = 1 << 15; ASSERT_OR_FAIL(!details::circular_less_than(a, b)); ASSERT_OR_FAIL(!details::circular_less_than(b, a)); a = 1; b = 1 << 15; ASSERT_OR_FAIL(details::circular_less_than(a, b)); ASSERT_OR_FAIL(!details::circular_less_than(b, a)); a = 0; b = (1 << 15) + 1; ASSERT_OR_FAIL(!details::circular_less_than(a, b)); ASSERT_OR_FAIL(details::circular_less_than(b, a)); a = 100; b = (1 << 15) + 1; ASSERT_OR_FAIL(details::circular_less_than(a, b)); ASSERT_OR_FAIL(!details::circular_less_than(b, a)); a = (1 << 15) + 7; b = 5; ASSERT_OR_FAIL(details::circular_less_than(a, b)); ASSERT_OR_FAIL(!details::circular_less_than(b, a)); a = (1 << 15) + 7; b = (1 << 15) + 5; ASSERT_OR_FAIL(!details::circular_less_than(a, b)); ASSERT_OR_FAIL(details::circular_less_than(b, a)); a = 0xFFFF; b = 0; ASSERT_OR_FAIL(details::circular_less_than(a, b)); ASSERT_OR_FAIL(!details::circular_less_than(b, a)); a = 0xFFFF; b = 0xFFF; ASSERT_OR_FAIL(details::circular_less_than(a, b)); ASSERT_OR_FAIL(!details::circular_less_than(b, a)); } return true; } bool enqueue_one_explicit() { ConcurrentQueue q; ProducerToken tok(q); bool result = q.enqueue(tok, 17); ASSERT_OR_FAIL(result); return true; } bool enqueue_and_dequeue_one_explicit() { ConcurrentQueue q; ProducerToken tok(q); int item = 0; ASSERT_OR_FAIL(q.enqueue(tok, 123)); ASSERT_OR_FAIL(q.try_dequeue_from_producer(tok, item)); ASSERT_OR_FAIL(item == 123); return true; } bool enqueue_one_implicit() { ConcurrentQueue q; bool result = q.enqueue(17); ASSERT_OR_FAIL(result); return true; } bool enqueue_and_dequeue_one_implicit() { ConcurrentQueue q; int item = 0; ASSERT_OR_FAIL(q.enqueue(123)); ASSERT_OR_FAIL(q.try_dequeue(item)); ASSERT_OR_FAIL(item == 123); return true; } bool enqueue_and_dequeue_a_few() { // Fairly straightforward mass enqueue and dequeue { ConcurrentQueue> q; ProducerToken tok(q); for (int i = 0; i != 99999; ++i) { ASSERT_OR_FAIL(q.enqueue(tok, i)); } int item; for (int i = 0; i != 99999; ++i) { ASSERT_OR_FAIL(q.try_dequeue_from_producer(tok, item)); ASSERT_OR_FAIL(item == i); } ASSERT_OR_FAIL(!q.try_dequeue_from_producer(tok, item)); } // Interleaved enqueue and dequeue (though still no threads involved) { ConcurrentQueue> q; ProducerToken tok(q); int item; for (int i = 0; i != 99999; ++i) { ASSERT_OR_FAIL(q.enqueue(tok, i)); ASSERT_OR_FAIL(q.enqueue(tok, i * 2)); ASSERT_OR_FAIL(q.try_dequeue_from_producer(tok, item)); ASSERT_OR_FAIL(item == (i / 2) * (i % 2 == 0 ? 1 : 2)); } for (int i = 0; i != 99999; ++i) { ASSERT_OR_FAIL(q.try_dequeue_from_producer(tok, item)); ASSERT_OR_FAIL(item == ((i + 99999) / 2) * (i % 2 == 1 ? 1 : 2)); } ASSERT_OR_FAIL(!q.try_dequeue_from_producer(tok, item)); } // Implicit usage { ConcurrentQueue> q; for (int i = 0; i != 99999; ++i) { ASSERT_OR_FAIL(q.enqueue(i)); } int item; for (int i = 0; i != 99999; ++i) { ASSERT_OR_FAIL(q.try_dequeue(item)); ASSERT_OR_FAIL(item == i); } ASSERT_OR_FAIL(!q.try_dequeue(item)); } { ConcurrentQueue> q; int item; for (int i = 0; i != 99999; ++i) { ASSERT_OR_FAIL(q.enqueue(i)); ASSERT_OR_FAIL(q.enqueue(i * 2)); ASSERT_OR_FAIL(q.try_dequeue(item)); ASSERT_OR_FAIL(item == (i / 2) * (i % 2 == 0 ? 1 : 2)); } for (int i = 0; i != 99999; ++i) { ASSERT_OR_FAIL(q.try_dequeue(item)); ASSERT_OR_FAIL(item == ((i + 99999) / 2) * (i % 2 == 1 ? 1 : 2)); } ASSERT_OR_FAIL(!q.try_dequeue(item)); } return true; } bool enqueue_bulk() { typedef TestTraits<2> Traits2; typedef TestTraits<4> Traits4; int arr123[] = { 1, 2, 3 }; int arr1234[] = { 1, 2, 3, 4 }; int arr123456[] = { 1, 2, 3, 4, 5, 6 }; Traits2::reset(); { // Implicit, block allocation required ConcurrentQueue q(2); ASSERT_OR_FAIL(Traits2::malloc_count() == 1); q.enqueue_bulk(arr123, 3); ASSERT_OR_FAIL(Traits2::malloc_count() == 4); // One for producer, one for block index, one for block int item; for (int i = 0; i != 3; ++i) { ASSERT_OR_FAIL(q.try_dequeue(item)); ASSERT_OR_FAIL(item == i + 1); } ASSERT_OR_FAIL(!q.try_dequeue(item)); } Traits4::reset(); { // Implicit, block allocation not required (end on block boundary) ConcurrentQueue q(2); ASSERT_OR_FAIL(Traits4::malloc_count() == 1); q.enqueue_bulk(arr1234, 4); ASSERT_OR_FAIL(Traits4::malloc_count() == 3); // One for producer, one for block index int item; for (int i = 0; i != 4; ++i) { ASSERT_OR_FAIL(q.try_dequeue(item)); ASSERT_OR_FAIL(item == i + 1); } ASSERT_OR_FAIL(!q.try_dequeue(item)); } Traits2::reset(); { // Implicit, allocation fail ConcurrentQueue q(2); ASSERT_OR_FAIL(Traits2::malloc_count() == 1); ASSERT_OR_FAIL(!q.try_enqueue_bulk(arr123, 3)); ASSERT_OR_FAIL(Traits2::malloc_count() == 3); // Still has to allocate implicit producer and block index int item; ASSERT_OR_FAIL(!q.try_dequeue(item)); ASSERT_OR_FAIL(q.try_enqueue_bulk(arr123, 2)); for (int i = 0; i != 2; ++i) { ASSERT_OR_FAIL(q.try_dequeue(item)); ASSERT_OR_FAIL(item == i + 1); } ASSERT_OR_FAIL(!q.try_dequeue(item)); } Traits2::reset(); { // Implicit, block allocation not required ConcurrentQueue q(4); ASSERT_OR_FAIL(Traits2::malloc_count() == 1); q.enqueue_bulk(arr1234, 4); ASSERT_OR_FAIL(Traits2::malloc_count() == 3); // One for producer, one for block index int item; for (int i = 0; i != 4; ++i) { ASSERT_OR_FAIL(q.try_dequeue(item)); ASSERT_OR_FAIL(item == i + 1); } ASSERT_OR_FAIL(!q.try_dequeue(item)); } Traits4::reset(); { // Implicit, block allocation required (end not on block boundary) ConcurrentQueue q(4); ASSERT_OR_FAIL(Traits4::malloc_count() == 1); ASSERT_OR_FAIL(q.enqueue(0)); ASSERT_OR_FAIL(q.enqueue_bulk(arr1234, 4)); ASSERT_OR_FAIL(Traits4::malloc_count() == 4); // One for producer, one for block index, one for block int item; for (int i = 0; i != 5; ++i) { ASSERT_OR_FAIL(q.try_dequeue(item)); ASSERT_OR_FAIL(item == i); } ASSERT_OR_FAIL(!q.try_dequeue(item)); } Traits4::reset(); { // Implicit, block allocation not required (end not on block boundary) ConcurrentQueue q(5); ASSERT_OR_FAIL(Traits4::malloc_count() == 1); ASSERT_OR_FAIL(q.enqueue(0)); ASSERT_OR_FAIL(q.enqueue_bulk(arr1234, 4)); ASSERT_OR_FAIL(Traits4::malloc_count() == 3); // One for producer, one for block index int item; for (int i = 0; i != 5; ++i) { ASSERT_OR_FAIL(q.try_dequeue(item)); ASSERT_OR_FAIL(item == i); } ASSERT_OR_FAIL(!q.try_dequeue(item)); } Traits2::reset(); { // Implicit, block allocation fail (end not on block boundary) -- test rewind ConcurrentQueue q(4); ASSERT_OR_FAIL(Traits2::malloc_count() == 1); ASSERT_OR_FAIL(q.enqueue(17)); ASSERT_OR_FAIL(Traits2::malloc_count() == 3); // One for producer, one for block index ASSERT_OR_FAIL(!q.try_enqueue_bulk(arr123456, 6)); ASSERT_OR_FAIL(Traits2::malloc_count() == 3); int item; ASSERT_OR_FAIL(q.try_dequeue(item)); ASSERT_OR_FAIL(item == 17); ASSERT_OR_FAIL(!q.try_dequeue(item)); } Traits2::reset(); { // Implicit, enqueue nothing ConcurrentQueue q(3); ASSERT_OR_FAIL(Traits2::malloc_count() == 1); ASSERT_OR_FAIL(q.try_enqueue_bulk(arr123, 0)); ASSERT_OR_FAIL(Traits2::malloc_count() == 3); // One for producer, one for block index int item; ASSERT_OR_FAIL(!q.try_dequeue(item)); } //////// Traits2::reset(); { // Explicit, block allocation required ConcurrentQueue q(2); ASSERT_OR_FAIL(Traits2::malloc_count() == 1); ProducerToken tok(q); ASSERT_OR_FAIL(Traits2::malloc_count() == 3); // One for producer, one for block index q.enqueue_bulk(tok, arr123, 3); ASSERT_OR_FAIL(Traits2::malloc_count() == 4); // One for block int item; for (int i = 0; i != 3; ++i) { ASSERT_OR_FAIL(q.try_dequeue(item)); ASSERT_OR_FAIL(item == i + 1); } ASSERT_OR_FAIL(!q.try_dequeue(item)); } Traits4::reset(); { // Explicit, block allocation not required (end on block boundary) ConcurrentQueue q(2); ASSERT_OR_FAIL(Traits4::malloc_count() == 1); ProducerToken tok(q); ASSERT_OR_FAIL(Traits4::malloc_count() == 3); // One for producer, one for block index q.enqueue_bulk(tok, arr1234, 4); ASSERT_OR_FAIL(Traits4::malloc_count() == 3); int item; for (int i = 0; i != 4; ++i) { ASSERT_OR_FAIL(q.try_dequeue(item)); ASSERT_OR_FAIL(item == i + 1); } ASSERT_OR_FAIL(!q.try_dequeue(item)); } Traits2::reset(); { // Explicit, allocation fail ConcurrentQueue q(2); ASSERT_OR_FAIL(Traits2::malloc_count() == 1); ProducerToken tok(q); ASSERT_OR_FAIL(Traits2::malloc_count() == 3); // One for producer, one for block index ASSERT_OR_FAIL(!q.try_enqueue_bulk(tok, arr123, 3)); ASSERT_OR_FAIL(Traits2::malloc_count() == 3); int item; ASSERT_OR_FAIL(!q.try_dequeue(item)); ASSERT_OR_FAIL(q.try_enqueue_bulk(tok, arr123, 2)); for (int i = 0; i != 2; ++i) { ASSERT_OR_FAIL(q.try_dequeue(item)); ASSERT_OR_FAIL(item == i + 1); } ASSERT_OR_FAIL(!q.try_dequeue(item)); ASSERT_OR_FAIL(Traits2::malloc_count() == 3); } Traits2::reset(); { // Explicit, block allocation not required ConcurrentQueue q(4); ASSERT_OR_FAIL(Traits2::malloc_count() == 1); ProducerToken tok(q); ASSERT_OR_FAIL(Traits2::malloc_count() == 3); // One for producer, one for block index q.enqueue_bulk(tok, arr1234, 4); ASSERT_OR_FAIL(Traits2::malloc_count() == 3); int item; for (int i = 0; i != 4; ++i) { ASSERT_OR_FAIL(q.try_dequeue(item)); ASSERT_OR_FAIL(item == i + 1); } ASSERT_OR_FAIL(!q.try_dequeue(item)); } Traits4::reset(); { // Explicit, block allocation required (end not on block boundary) ConcurrentQueue q(4); ASSERT_OR_FAIL(Traits4::malloc_count() == 1); ProducerToken tok(q); ASSERT_OR_FAIL(Traits4::malloc_count() == 3); // One for producer, one for block index ASSERT_OR_FAIL(q.enqueue(tok, 0)); ASSERT_OR_FAIL(q.enqueue_bulk(tok, arr1234, 4)); ASSERT_OR_FAIL(Traits4::malloc_count() == 4); // One for block int item; for (int i = 0; i != 5; ++i) { ASSERT_OR_FAIL(q.try_dequeue(item)); ASSERT_OR_FAIL(item == i); } ASSERT_OR_FAIL(!q.try_dequeue(item)); } Traits4::reset(); { // Explicit, block allocation not required (end not on block boundary) ConcurrentQueue q(5); ASSERT_OR_FAIL(Traits4::malloc_count() == 1); ProducerToken tok(q); ASSERT_OR_FAIL(Traits4::malloc_count() == 3); // One for producer, one for block index ASSERT_OR_FAIL(q.enqueue(tok, 0)); ASSERT_OR_FAIL(q.enqueue_bulk(tok, arr1234, 4)); ASSERT_OR_FAIL(Traits4::malloc_count() == 3); int item; for (int i = 0; i != 5; ++i) { ASSERT_OR_FAIL(q.try_dequeue(item)); ASSERT_OR_FAIL(item == i); } ASSERT_OR_FAIL(!q.try_dequeue(item)); } Traits2::reset(); { // Explicit, block allocation fail (end not on block boundary) -- test rewind ConcurrentQueue q(4); ASSERT_OR_FAIL(Traits2::malloc_count() == 1); ProducerToken tok(q); ASSERT_OR_FAIL(Traits2::malloc_count() == 3); // One for producer, one for block index ASSERT_OR_FAIL(q.enqueue(tok, 17)); ASSERT_OR_FAIL(Traits2::malloc_count() == 3); ASSERT_OR_FAIL(!q.try_enqueue_bulk(tok, arr123456, 6)); ASSERT_OR_FAIL(Traits2::malloc_count() == 3); int item; ASSERT_OR_FAIL(q.try_dequeue(item)); ASSERT_OR_FAIL(item == 17); ASSERT_OR_FAIL(!q.try_dequeue(item)); } Traits2::reset(); { // Explicit, enqueue nothing ConcurrentQueue q(3); ASSERT_OR_FAIL(Traits2::malloc_count() == 1); ProducerToken tok(q); ASSERT_OR_FAIL(Traits2::malloc_count() == 3); // One for producer, one for block index ASSERT_OR_FAIL(q.try_enqueue_bulk(tok, arr123, 0)); ASSERT_OR_FAIL(Traits2::malloc_count() == 3); int item; ASSERT_OR_FAIL(!q.try_dequeue(item)); ASSERT_OR_FAIL(q.enqueue(tok, 17)); ASSERT_OR_FAIL(q.try_dequeue(item)); ASSERT_OR_FAIL(item == 17); ASSERT_OR_FAIL(!q.try_dequeue(item)); } Traits4::reset(); { // Explicit, re-use empty blocks ConcurrentQueue q(8); ASSERT_OR_FAIL(Traits4::malloc_count() == 1); ProducerToken tok(q); ASSERT_OR_FAIL(Traits4::malloc_count() == 3); // One for producer, one for block index for (int i = 0; i != 5; ++i) { ASSERT_OR_FAIL(q.enqueue(tok, i)); } int item; for (int i = 0; i != 5; ++i) { ASSERT_OR_FAIL(q.try_dequeue(item)); ASSERT_OR_FAIL(item == i); } ASSERT_OR_FAIL(!q.try_dequeue(item)); ASSERT_OR_FAIL(Traits4::malloc_count() == 3); ASSERT_OR_FAIL(q.enqueue_bulk(tok, arr123456, 6)); ASSERT_OR_FAIL(Traits4::malloc_count() == 3); for (int i = 0; i != 6; ++i) { ASSERT_OR_FAIL(q.try_dequeue(item)); ASSERT_OR_FAIL(item == i + 1); } ASSERT_OR_FAIL(!q.try_dequeue(item)); ASSERT_OR_FAIL(Traits4::malloc_count() == 3); } return true; } bool block_alloc() { typedef TestTraits<2> Traits; typedef TestTraits<2, 32, true> RecycleTraits; Traits::reset(); // Explicit { ConcurrentQueue q(7); ASSERT_OR_FAIL(q.initialBlockPoolSize == 4); ASSERT_OR_FAIL(Traits::malloc_count() == 1); ASSERT_OR_FAIL(Traits::free_count() == 0); { ProducerToken tok(q); ASSERT_OR_FAIL(Traits::malloc_count() == 3); // one for producer, one for its block index ASSERT_OR_FAIL(Traits::free_count() == 0); // Enqueue one item too many (force extra block allocation) for (int i = 0; i != 9; ++i) { ASSERT_OR_FAIL(q.enqueue(tok, i)); } ASSERT_OR_FAIL(Traits::malloc_count() == 4); ASSERT_OR_FAIL(Traits::free_count() == 0); // Still room for one more... ASSERT_OR_FAIL(q.enqueue(tok, 9)); ASSERT_OR_FAIL(Traits::malloc_count() == 4); ASSERT_OR_FAIL(Traits::free_count() == 0); // No more room without further allocations ASSERT_OR_FAIL(!q.try_enqueue(tok, 10)); ASSERT_OR_FAIL(Traits::malloc_count() == 4); ASSERT_OR_FAIL(Traits::free_count() == 0); // Check items were enqueued properly int item; for (int i = 0; i != 10; ++i) { ASSERT_OR_FAIL(q.try_dequeue_from_producer(tok, item)); ASSERT_OR_FAIL(item == i); } // Queue should be empty, but not freed ASSERT_OR_FAIL(!q.try_dequeue_from_producer(tok, item)); ASSERT_OR_FAIL(Traits::free_count() == 0); } // Explicit producers are recycled, so block should still be allocated ASSERT_OR_FAIL(Traits::free_count() == 0); } ASSERT_OR_FAIL(Traits::malloc_count() == 4); ASSERT_OR_FAIL(Traits::free_count() == 4); // Implicit Traits::reset(); { ConcurrentQueue q(7); ASSERT_OR_FAIL(q.initialBlockPoolSize == 4); ASSERT_OR_FAIL(q.enqueue(39)); ASSERT_OR_FAIL(Traits::malloc_count() == 3); // one for producer, one for its block index ASSERT_OR_FAIL(Traits::free_count() == 0); // Enqueue one item too many (force extra block allocation) for (int i = 0; i != 8; ++i) { ASSERT_OR_FAIL(q.enqueue(i)); } ASSERT_OR_FAIL(Traits::malloc_count() == 4); ASSERT_OR_FAIL(Traits::free_count() == 0); // Still room for one more... ASSERT_OR_FAIL(q.enqueue(8)); ASSERT_OR_FAIL(Traits::malloc_count() == 4); ASSERT_OR_FAIL(Traits::free_count() == 0); // No more room without further allocations ASSERT_OR_FAIL(!q.try_enqueue(9)); ASSERT_OR_FAIL(Traits::malloc_count() == 4); ASSERT_OR_FAIL(Traits::free_count() == 0); // Check items were enqueued properly int item; ASSERT_OR_FAIL(q.try_dequeue(item)); ASSERT_OR_FAIL(item == 39); for (int i = 0; i != 9; ++i) { ASSERT_OR_FAIL(q.try_dequeue(item)); ASSERT_OR_FAIL(item == i); } // Queue should be empty, and extra block freed ASSERT_OR_FAIL(!q.try_dequeue(item)); ASSERT_OR_FAIL(Traits::free_count() == 1); } ASSERT_OR_FAIL(Traits::malloc_count() == 4); ASSERT_OR_FAIL(Traits::free_count() == 4); // Implicit RecycleTraits::reset(); { ConcurrentQueue q(7); ASSERT_OR_FAIL(q.initialBlockPoolSize == 4); ASSERT_OR_FAIL(q.enqueue(39)); ASSERT_OR_FAIL(RecycleTraits::malloc_count() == 3); // one for producer, one for its block index ASSERT_OR_FAIL(RecycleTraits::free_count() == 0); // Enqueue one item too many (force extra block allocation) for (int i = 0; i != 8; ++i) { ASSERT_OR_FAIL(q.enqueue(i)); } ASSERT_OR_FAIL(RecycleTraits::malloc_count() == 4); ASSERT_OR_FAIL(RecycleTraits::free_count() == 0); // Still room for one more... ASSERT_OR_FAIL(q.enqueue(8)); ASSERT_OR_FAIL(RecycleTraits::malloc_count() == 4); ASSERT_OR_FAIL(RecycleTraits::free_count() == 0); // No more room without further allocations ASSERT_OR_FAIL(!q.try_enqueue(9)); ASSERT_OR_FAIL(RecycleTraits::malloc_count() == 4); ASSERT_OR_FAIL(RecycleTraits::free_count() == 0); // Check items were enqueued properly int item; ASSERT_OR_FAIL(q.try_dequeue(item)); ASSERT_OR_FAIL(item == 39); for (int i = 0; i != 9; ++i) { ASSERT_OR_FAIL(q.try_dequeue(item)); ASSERT_OR_FAIL(item == i); } // Queue should be empty, but extra block not freed ASSERT_OR_FAIL(!q.try_dequeue(item)); ASSERT_OR_FAIL(RecycleTraits::free_count() == 0); } ASSERT_OR_FAIL(RecycleTraits::malloc_count() == 4); ASSERT_OR_FAIL(RecycleTraits::free_count() == 4); // Super-aligned Traits::reset(); VeryAligned::errors = 0; { ConcurrentQueue q(7); ASSERT_OR_FAIL(q.enqueue(39)); ASSERT_OR_FAIL(Traits::malloc_count() == 3); // one for producer, one for its block index ASSERT_OR_FAIL(Traits::free_count() == 0); ASSERT_OR_FAIL(VeryAligned::errors == 0); // Enqueue one item too many (force extra block allocation) for (int i = 0; i != 8; ++i) { ASSERT_OR_FAIL(q.enqueue(i)); ASSERT_OR_FAIL(VeryAligned::errors == 0); } ASSERT_OR_FAIL(Traits::malloc_count() == 4); ASSERT_OR_FAIL(Traits::free_count() == 0); // Still room for one more... ASSERT_OR_FAIL(q.enqueue(8)); ASSERT_OR_FAIL(Traits::malloc_count() == 4); ASSERT_OR_FAIL(Traits::free_count() == 0); ASSERT_OR_FAIL(VeryAligned::errors == 0); // No more room without further allocations ASSERT_OR_FAIL(!q.try_enqueue(9)); ASSERT_OR_FAIL(Traits::malloc_count() == 4); ASSERT_OR_FAIL(Traits::free_count() == 0); ASSERT_OR_FAIL(VeryAligned::errors == 0); // Check items were enqueued properly VeryAligned item; ASSERT_OR_FAIL(q.try_dequeue(item)); ASSERT_OR_FAIL(item.value == 39); for (int i = 0; i != 9; ++i) { ASSERT_OR_FAIL(q.try_dequeue(item)); ASSERT_OR_FAIL(item.value == i); ASSERT_OR_FAIL(VeryAligned::errors == 0); } // Queue should be empty, and extra block freed ASSERT_OR_FAIL(!q.try_dequeue(item)); ASSERT_OR_FAIL(Traits::free_count() == 1); ASSERT_OR_FAIL(VeryAligned::errors == 0); } ASSERT_OR_FAIL(Traits::malloc_count() == 4); ASSERT_OR_FAIL(Traits::free_count() == 4); return true; } bool token_move() { typedef TestTraits<16> Traits; Traits::reset(); { ConcurrentQueue q; ProducerToken t0(q); ASSERT_OR_FAIL(t0.valid()); ProducerToken t1(std::move(t0)); ASSERT_OR_FAIL(t1.valid()); ASSERT_OR_FAIL(!t0.valid()); t1 = std::move(t1); ASSERT_OR_FAIL(t1.valid()); ASSERT_OR_FAIL(!t0.valid()); ProducerToken t2(q); t2 = std::move(t1); ASSERT_OR_FAIL(t2.valid()); ASSERT_OR_FAIL(t1.valid()); ASSERT_OR_FAIL(!t0.valid()); t0 = std::move(t1); ASSERT_OR_FAIL(t2.valid()); ASSERT_OR_FAIL(!t1.valid()); ASSERT_OR_FAIL(t0.valid()); } ASSERT_OR_FAIL(Traits::malloc_count() == 5); // 2 for each producer + 1 for initial block pool ASSERT_OR_FAIL(Traits::free_count() == Traits::malloc_count()); return true; } bool multi_producers() { typedef TestTraits<16> Traits; Traits::reset(); { ConcurrentQueue q; ProducerToken t0(q); ProducerToken t1(q); ProducerToken t2(q); ProducerToken t3(q); ProducerToken t4(q); ASSERT_OR_FAIL(q.enqueue(t0, 0)); ASSERT_OR_FAIL(q.enqueue(t1, 1)); ASSERT_OR_FAIL(q.enqueue(t2, 2)); ASSERT_OR_FAIL(q.enqueue(t3, 3)); ASSERT_OR_FAIL(q.enqueue(t4, 4)); int item; ASSERT_OR_FAIL(q.try_dequeue_from_producer(t0, item) && item == 0 && !q.try_dequeue_from_producer(t0, item)); ASSERT_OR_FAIL(q.try_dequeue_from_producer(t1, item) && item == 1 && !q.try_dequeue_from_producer(t1, item)); ASSERT_OR_FAIL(q.try_dequeue_from_producer(t2, item) && item == 2 && !q.try_dequeue_from_producer(t2, item)); ASSERT_OR_FAIL(q.try_dequeue_from_producer(t3, item) && item == 3 && !q.try_dequeue_from_producer(t3, item)); ASSERT_OR_FAIL(q.try_dequeue_from_producer(t4, item) && item == 4 && !q.try_dequeue_from_producer(t4, item)); } ASSERT_OR_FAIL(Traits::malloc_count() == 11); // 2 for each producer + 1 for initial block pool ASSERT_OR_FAIL(Traits::free_count() == Traits::malloc_count()); // Implicit Traits::reset(); { ConcurrentQueue q; std::atomic success[5]; std::atomic done(0); for (int i = 0; i != 5; ++i) { success[i].store(false, std::memory_order_relaxed); } for (int i = 0; i != 5; ++i) { SimpleThread t([&](int j) { success[j].store(q.enqueue(j), std::memory_order_relaxed); done.fetch_add(1, std::memory_order_release); }, i); t.join(); } while (done.load(std::memory_order_acquire) != 5) { continue; } for (int i = 0; i != 5; ++i) { ASSERT_OR_FAIL(success[i].load(std::memory_order_relaxed)); } // Cannot rely on order that producers are added (there's a race condition), only that they are all there somewhere. // Also, all items may not be visible to this thread yet. bool itemDequeued[5] = { false, false, false, false, false }; int item; for (int i = 0; i != 5;) { if (q.try_dequeue(item)) { itemDequeued[item] = true; ++i; } } for (int i = 0; i != 5; ++i) { ASSERT_OR_FAIL(itemDequeued[i]); } } ASSERT_OR_FAIL(Traits::malloc_count() <= 11 && Traits::malloc_count() >= 3); // 2 for each producer (depending on thread ID re-use) + 1 for initial block pool ASSERT_OR_FAIL(Traits::free_count() == Traits::malloc_count()); return true; } bool producer_reuse() { typedef TestTraits<16> Traits; Traits::reset(); { // Explicit ConcurrentQueue q; { ProducerToken t0(q); } { ProducerToken t1(q); } { ProducerToken t2(q); ProducerToken t3(q); ProducerToken t4(q); ProducerToken t5(q); } { ProducerToken t6(q); ProducerToken t7(q); } { ProducerToken t8(q); ProducerToken t9(q); } { ProducerToken t10(q); ProducerToken t11(q); } } ASSERT_OR_FAIL(Traits::malloc_count() == 9); // 2 for max number of live producers + 1 for initial block pool ASSERT_OR_FAIL(Traits::free_count() == Traits::malloc_count()); #ifdef MOODYCAMEL_CPP11_THREAD_LOCAL_SUPPORTED Traits::reset(); { // Implicit const int MAX_THREADS = 48; ConcurrentQueue q(Traits::BLOCK_SIZE * (MAX_THREADS + 1)); ASSERT_OR_FAIL(Traits::malloc_count() == 1); // Initial block pool SimpleThread t0([&]() { q.enqueue(0); }); t0.join(); ASSERT_OR_FAIL(Traits::malloc_count() == 3); // Implicit producer SimpleThread t1([&]() { q.enqueue(1); }); t1.join(); ASSERT_OR_FAIL(Traits::malloc_count() == 3); SimpleThread t2([&]() { q.enqueue(2); }); t2.join(); ASSERT_OR_FAIL(Traits::malloc_count() == 3); q.enqueue(3); ASSERT_OR_FAIL(Traits::malloc_count() == 3); int item; int i = 0; while (q.try_dequeue(item)) { ASSERT_OR_FAIL(item == i); ++i; } ASSERT_OR_FAIL(i == 4); ASSERT_OR_FAIL(Traits::malloc_count() == 3); std::vector threads(MAX_THREADS); for (int rep = 0; rep != 2; ++rep) { for (std::size_t tid = 0; tid != threads.size(); ++tid) { threads[tid] = SimpleThread([&](std::size_t tid) { for (volatile int i = 0; i != 4096; ++i) { continue; } q.enqueue((int)tid); for (volatile int i = 0; i != 4096; ++i) { continue; } }, tid); } for (std::size_t tid = 0; tid != threads.size(); ++tid) { threads[tid].join(); } std::vector seenIds(threads.size()); for (std::size_t i = 0; i != threads.size(); ++i) { ASSERT_OR_FAIL(q.try_dequeue(item)); ASSERT_OR_FAIL(!seenIds[item]); seenIds[item] = true; } for (std::size_t i = 0; i != seenIds.size(); ++i) { ASSERT_OR_FAIL(seenIds[i]); } ASSERT_OR_FAIL(Traits::malloc_count() <= 2 * MAX_THREADS + 1); } } ASSERT_OR_FAIL(Traits::free_count() == Traits::malloc_count()); Traits::reset(); { // Test many threads and implicit queues being created and destroyed concurrently std::vector threads(32); std::vector success(threads.size(), true); for (std::size_t tid = 0; tid != threads.size(); ++tid) { threads[tid] = SimpleThread([&](std::size_t tid) { for (int i = 0; i != 5; ++i) { ConcurrentQueue q(1); q.enqueue(i); } ConcurrentQueue q(15); for (int i = 0; i != 100; ++i) { q.enqueue(i); } int item; for (int i = 0; i != 100; ++i) { if (!q.try_dequeue(item) || item != i) { success[tid] = false; } } if (q.size_approx() != 0) { success[tid] = false; } }, tid); } for (std::size_t tid = 0; tid != threads.size(); ++tid) { threads[tid].join(); ASSERT_OR_FAIL(success[tid]); } } ASSERT_OR_FAIL(Traits::free_count() == Traits::malloc_count()); #endif return true; } bool block_reuse() { int item; typedef TestTraits<4> SmallBlocks; SmallBlocks::reset(); { ConcurrentQueue q(8); // 2 blocks ProducerToken t(q); for (int j = 0; j != 3; ++j) { for (int i = 0; i != 4; ++i) { ASSERT_OR_FAIL(q.enqueue(t, i)); } for (int i = 0; i != 4; ++i) { ASSERT_OR_FAIL(q.try_dequeue_from_producer(t, item)); ASSERT_OR_FAIL(item == i); } for (int i = 0; i != 8; ++i) { ASSERT_OR_FAIL(q.enqueue(t, i)); } for (int i = 0; i != 4; ++i) { ASSERT_OR_FAIL(q.try_dequeue_from_producer(t, item)); ASSERT_OR_FAIL(item == i); } for (int i = 0; i != 4; ++i) { ASSERT_OR_FAIL(q.enqueue(t, i)); } for (int i = 0; i != 8; ++i) { ASSERT_OR_FAIL(q.try_dequeue_from_producer(t, item)); ASSERT_OR_FAIL(item == ((i + 4) & 7)); } ASSERT_OR_FAIL(!q.try_dequeue_from_producer(t, item)); } } ASSERT_OR_FAIL(SmallBlocks::malloc_count() == 3); ASSERT_OR_FAIL(SmallBlocks::free_count() == SmallBlocks::malloc_count()); typedef TestTraits<8192> HugeBlocks; HugeBlocks::reset(); { ConcurrentQueue q(8192 * 2); // 2 blocks ProducerToken t(q); for (int j = 0; j != 3; ++j) { for (int i = 0; i != 8192; ++i) { ASSERT_OR_FAIL(q.enqueue(t, i)); } for (int i = 0; i != 8192; ++i) { ASSERT_OR_FAIL(q.try_dequeue_from_producer(t, item)); ASSERT_OR_FAIL(item == i); } for (int i = 0; i != 8192 * 2; ++i) { ASSERT_OR_FAIL(q.enqueue(t, i)); } for (int i = 0; i != 8192; ++i) { ASSERT_OR_FAIL(q.try_dequeue_from_producer(t, item)); ASSERT_OR_FAIL(item == i); } for (int i = 0; i != 8192; ++i) { ASSERT_OR_FAIL(q.enqueue(t, i)); } for (int i = 0; i != 8192 * 2; ++i) { ASSERT_OR_FAIL(q.try_dequeue_from_producer(t, item)); ASSERT_OR_FAIL(item == ((i + 8192) & (8192 * 2 - 1))); } ASSERT_OR_FAIL(!q.try_dequeue_from_producer(t, item)); } } ASSERT_OR_FAIL(HugeBlocks::malloc_count() == 3); ASSERT_OR_FAIL(HugeBlocks::free_count() == HugeBlocks::malloc_count()); // Implicit SmallBlocks::reset(); { ConcurrentQueue q(8); // 2 blocks for (int j = 0; j != 3; ++j) { for (int i = 0; i != 4; ++i) { ASSERT_OR_FAIL(q.enqueue(i)); } for (int i = 0; i != 4; ++i) { ASSERT_OR_FAIL(q.try_dequeue(item)); ASSERT_OR_FAIL(item == i); } for (int i = 0; i != 8; ++i) { ASSERT_OR_FAIL(q.enqueue(i)); } for (int i = 0; i != 4; ++i) { ASSERT_OR_FAIL(q.try_dequeue(item)); ASSERT_OR_FAIL(item == i); } for (int i = 0; i != 4; ++i) { ASSERT_OR_FAIL(q.enqueue(i)); } for (int i = 0; i != 8; ++i) { ASSERT_OR_FAIL(q.try_dequeue(item)); ASSERT_OR_FAIL(item == ((i + 4) & 7)); } ASSERT_OR_FAIL(!q.try_dequeue(item)); } } ASSERT_OR_FAIL(SmallBlocks::malloc_count() == 3); ASSERT_OR_FAIL(SmallBlocks::free_count() == SmallBlocks::malloc_count()); HugeBlocks::reset(); { ConcurrentQueue q(8192 * 2); // 2 blocks for (int j = 0; j != 3; ++j) { for (int i = 0; i != 8192; ++i) { ASSERT_OR_FAIL(q.enqueue(i)); } for (int i = 0; i != 8192; ++i) { ASSERT_OR_FAIL(q.try_dequeue(item)); ASSERT_OR_FAIL(item == i); } for (int i = 0; i != 8192 * 2; ++i) { ASSERT_OR_FAIL(q.enqueue(i)); } for (int i = 0; i != 8192; ++i) { ASSERT_OR_FAIL(q.try_dequeue(item)); ASSERT_OR_FAIL(item == i); } for (int i = 0; i != 8192; ++i) { ASSERT_OR_FAIL(q.enqueue(i)); } for (int i = 0; i != 8192 * 2; ++i) { ASSERT_OR_FAIL(q.try_dequeue(item)); ASSERT_OR_FAIL(item == ((i + 8192) & (8192 * 2 - 1))); } ASSERT_OR_FAIL(!q.try_dequeue(item)); } } ASSERT_OR_FAIL(HugeBlocks::malloc_count() == 3); ASSERT_OR_FAIL(HugeBlocks::free_count() == HugeBlocks::malloc_count()); return true; } bool block_recycling() { typedef TestTraits<4> SmallBlocks; SmallBlocks::reset(); ConcurrentQueue q(24); // 6 blocks SimpleThread threads[4]; std::atomic success(true); for (int i = 0; i != 4; ++i) { threads[i] = SimpleThread([&](int i) { int item; int next = 0; int prevItems[4] = { -1, -1, -1, -1 }; for (int successfulEnqueues = 0; successfulEnqueues < 10000;) { for (int j = 0; j != 12; ++j) { if (q.try_enqueue((i << 28) | next++)) { ++successfulEnqueues; } } for (int j = 0; j != 12; ++j) { if (q.try_dequeue(item)) { if ((item & 0x0FFFFFFF) <= prevItems[item >> 28]) { success.store(false, std::memory_order_relaxed); } prevItems[item >> 28] = item & 0x0FFFFFFF; } } } }, i); } for (int i = 0; i != 4; ++i) { threads[i].join(); } int item; int prevItems[4] = { -1, -1, -1, -1 }; while (q.try_dequeue(item)) { ASSERT_OR_FAIL((item & 0x0FFFFFFF) > prevItems[item >> 28]); prevItems[item >> 28] = item & 0x0FFFFFFF; } ASSERT_OR_FAIL(success.load(std::memory_order_relaxed)); return true; } bool leftovers_destroyed() { typedef TestTraits<4> Traits; Traits::reset(); Foo::reset(); { ConcurrentQueue q(4); // One block ProducerToken t(q); Foo item; q.enqueue(t, Foo()); q.enqueue(t, Foo()); q.enqueue(t, Foo()); q.try_dequeue_from_producer(t, item); } ASSERT_OR_FAIL(Foo::createCount() == 4); ASSERT_OR_FAIL(Foo::destroyCount() == 7); ASSERT_OR_FAIL(Foo::destroyedInOrder()); Traits::reset(); Foo::reset(); { ConcurrentQueue q(4); // One block ProducerToken t(q); q.enqueue(t, Foo()); q.enqueue(t, Foo()); q.enqueue(t, Foo()); q.enqueue(t, Foo()); } ASSERT_OR_FAIL(Foo::createCount() == 4); ASSERT_OR_FAIL(Foo::destroyCount() == 8); ASSERT_OR_FAIL(Foo::destroyedInOrder()); Traits::reset(); Foo::reset(); { ConcurrentQueue q(8); // Two blocks ProducerToken t(q); for (int i = 0; i != 8; ++i) { q.enqueue(t, Foo()); } } ASSERT_OR_FAIL(Foo::createCount() == 8); ASSERT_OR_FAIL(Foo::destroyCount() == 16); ASSERT_OR_FAIL(Foo::destroyedInOrder()); Traits::reset(); Foo::reset(); { ConcurrentQueue q(12); // Three blocks ProducerToken t(q); // Last block only partially full for (int i = 0; i != 10; ++i) { q.enqueue(t, Foo()); } // First block only partially full Foo item; ASSERT_OR_FAIL(q.try_dequeue_from_producer(t, item)); ASSERT_OR_FAIL(q.try_dequeue_from_producer(t, item)); ASSERT_OR_FAIL(q.try_dequeue_from_producer(t, item)); } ASSERT_OR_FAIL(Foo::createCount() == 11); ASSERT_OR_FAIL(Foo::destroyCount() == 21); ASSERT_OR_FAIL(Foo::destroyedInOrder()); // Implicit Traits::reset(); Foo::reset(); { ConcurrentQueue q(4); // One block Foo item; q.enqueue(Foo()); q.enqueue(Foo()); q.enqueue(Foo()); q.try_dequeue(item); } ASSERT_OR_FAIL(Foo::createCount() == 4); ASSERT_OR_FAIL(Foo::destroyCount() == 7); ASSERT_OR_FAIL(Foo::destroyedInOrder()); Traits::reset(); Foo::reset(); { ConcurrentQueue q(4); // One block q.enqueue(Foo()); q.enqueue(Foo()); q.enqueue(Foo()); q.enqueue(Foo()); } ASSERT_OR_FAIL(Foo::createCount() == 4); ASSERT_OR_FAIL(Foo::destroyCount() == 8); ASSERT_OR_FAIL(Foo::destroyedInOrder()); Traits::reset(); Foo::reset(); { ConcurrentQueue q(8); // Two blocks for (int i = 0; i != 8; ++i) { q.enqueue(Foo()); } } ASSERT_OR_FAIL(Foo::createCount() == 8); ASSERT_OR_FAIL(Foo::destroyCount() == 16); ASSERT_OR_FAIL(Foo::destroyedInOrder()); Traits::reset(); Foo::reset(); { ConcurrentQueue q(12); // Three blocks // Last block only partially full for (int i = 0; i != 10; ++i) { q.enqueue(Foo()); } // First block only partially full Foo item; ASSERT_OR_FAIL(q.try_dequeue(item)); ASSERT_OR_FAIL(q.try_dequeue(item)); ASSERT_OR_FAIL(q.try_dequeue(item)); } ASSERT_OR_FAIL(Foo::createCount() == 11); ASSERT_OR_FAIL(Foo::destroyCount() == 21); ASSERT_OR_FAIL(Foo::destroyedInOrder()); return true; } bool block_index_resized() { typedef TestTraits<4, 2> Traits; Traits::reset(); Foo::reset(); { ConcurrentQueue q(8); // 2 blocks, matches initial index size ProducerToken t(q); for (int i = 0; i != 1024; ++i) { q.enqueue(t, Foo()); } for (int i = 0; i != 1024; ++i) { Foo item; q.try_dequeue_from_producer(t, item); } } ASSERT_OR_FAIL(Traits::malloc_count() == 1 + 2 + 254 + 7); ASSERT_OR_FAIL(Traits::free_count() == Traits::malloc_count()); ASSERT_OR_FAIL(Foo::createCount() == 2048); ASSERT_OR_FAIL(Foo::destroyCount() == 3072); ASSERT_OR_FAIL(Foo::destroyedInOrder()); // Implicit Traits::reset(); Foo::reset(); { ConcurrentQueue q(8); // 2 blocks for (int i = 0; i != 1024; ++i) { q.enqueue(Foo()); } for (int i = 0; i != 1024; ++i) { Foo item; q.try_dequeue(item); } } ASSERT_OR_FAIL(Traits::malloc_count() == 1 + 2 + 254 + 6); ASSERT_OR_FAIL(Traits::free_count() == Traits::malloc_count()); ASSERT_OR_FAIL(Foo::createCount() == 2048); ASSERT_OR_FAIL(Foo::destroyCount() == 3072); ASSERT_OR_FAIL(Foo::destroyedInOrder()); return true; } bool try_dequeue() { ConcurrentQueue q; int item; // Producer token { for (int i = 0; i != 50; ++i) { ProducerToken t(q); for (int j = 0; j != 100; ++j) { ASSERT_OR_FAIL(q.enqueue(t, i * 100 + j)); } } for (int i = 0; i != 50; ++i) { for (int j = 0; j != 100; ++j) { ASSERT_OR_FAIL(q.try_dequeue(item)); ASSERT_OR_FAIL(item == i * 100 + j); } } ASSERT_OR_FAIL(!q.try_dequeue(item)); } // Mixed producer types { for (int i = 0; i != 25; ++i) { for (int j = 0; j != 100; ++j) { ASSERT_OR_FAIL(q.enqueue(i * 100 + j)); } } for (int i = 25; i != 50; ++i) { ProducerToken t(q); for (int j = 0; j != 100; ++j) { ASSERT_OR_FAIL(q.enqueue(t, i * 100 + j)); } } bool success[5000]; std::memset(success, 0, sizeof(success)); for (int i = 0; i != 50; ++i) { for (int j = 0; j != 100; ++j) { ASSERT_OR_FAIL(q.try_dequeue(item)); success[item] = true; } } for (int i = 0; i != 5000; ++i) { ASSERT_OR_FAIL(success[i]); } ASSERT_OR_FAIL(!q.try_dequeue(item)); } // Mixed producer types with consumer token { for (int i = 0; i != 25; ++i) { for (int j = 0; j != 100; ++j) { ASSERT_OR_FAIL(q.enqueue(i * 100 + j)); } } for (int i = 25; i != 50; ++i) { ProducerToken t(q); for (int j = 0; j != 100; ++j) { ASSERT_OR_FAIL(q.enqueue(t, i * 100 + j)); } } bool success[5000]; std::memset(success, 0, sizeof(success)); for (int i = 0; i != 50; ++i) { ConsumerToken t(q); for (int j = 0; j != 100; ++j) { ASSERT_OR_FAIL(q.try_dequeue(t, item)); success[item] = true; } } for (int i = 0; i != 5000; ++i) { ASSERT_OR_FAIL(success[i]); } ConsumerToken t(q); ASSERT_OR_FAIL(!q.try_dequeue(item)); ASSERT_OR_FAIL(!q.try_dequeue(t, item)); ASSERT_OR_FAIL(!q.try_dequeue(item)); ASSERT_OR_FAIL(!q.try_dequeue(t, item)); } return true; } bool try_dequeue_threaded() { int item; ConcurrentQueue q; // Threaded consumption with tokens { SimpleThread threads[20]; for (int i = 0; i != 10; ++i) { threads[i] = SimpleThread([&](int i) { ProducerToken t(q); for (int j = 0; j != 100; ++j) { q.enqueue(t, i * 10 + j); } }, i); } std::atomic dequeueCount(0); for (int i = 10; i != 20; ++i) { threads[i] = SimpleThread([&]() { int item; ConsumerToken t(q); while (dequeueCount.load(std::memory_order_relaxed) != 1000) { if (q.try_dequeue(t, item)) { dequeueCount.fetch_add(1, std::memory_order_relaxed); } } }); } for (int i = 0; i != 20; ++i) { threads[i].join(); } ASSERT_OR_FAIL(!q.try_dequeue(item)); } // Threaded consumption { SimpleThread threads[20]; for (int i = 0; i != 10; ++i) { threads[i] = SimpleThread([&](int i) { for (int j = 0; j != 100; ++j) { q.enqueue(i * 10 + j); } }, i); } std::atomic dequeueCount(0); for (int i = 10; i != 20; ++i) { threads[i] = SimpleThread([&]() { int item; while (dequeueCount.load(std::memory_order_relaxed) != 1000) { if (q.try_dequeue(item)) { dequeueCount.fetch_add(1, std::memory_order_relaxed); } } }); } for (int i = 0; i != 20; ++i) { threads[i].join(); } ASSERT_OR_FAIL(!q.try_dequeue(item)); } return true; } bool try_dequeue_bulk() { typedef TestTraits<4> Traits; int items[5]; // Explicit producer { Traits::reset(); ConcurrentQueue q; ProducerToken tok(q); ASSERT_OR_FAIL(q.try_dequeue_bulk(items, 5) == 0); q.enqueue(tok, 17); ASSERT_OR_FAIL(q.try_dequeue_bulk(items, 5) == 1); ASSERT_OR_FAIL(items[0] == 17); ASSERT_OR_FAIL(!q.try_dequeue(items[0])); for (int i = 0; i != 4; ++i) { q.enqueue(tok, i + 1); } ASSERT_OR_FAIL(q.try_dequeue_bulk(items, 5) == 4); for (int i = 0; i != 4; ++i) { ASSERT_OR_FAIL(items[i] == i + 1); } ASSERT_OR_FAIL(!q.try_dequeue(items[0])); for (int i = 0; i != 5; ++i) { q.enqueue(tok, i + 1); } ASSERT_OR_FAIL(q.try_dequeue_bulk(items, 5) == 5); for (int i = 0; i != 5; ++i) { ASSERT_OR_FAIL(items[i] == i + 1); } ASSERT_OR_FAIL(!q.try_dequeue(items[0])); for (int i = 0; i != 6; ++i) { q.enqueue(tok, i + 1); } ASSERT_OR_FAIL(q.try_dequeue_bulk(items, 5) == 5); for (int i = 0; i != 5; ++i) { ASSERT_OR_FAIL(items[i] == i + 1); } ASSERT_OR_FAIL(q.try_dequeue(items[0])); ASSERT_OR_FAIL(items[0] == 6); ASSERT_OR_FAIL(!q.try_dequeue(items[0])); for (int i = 0; i != 10; ++i) { q.enqueue(tok, i + 1); } for (int k = 0; k != 2; ++k) { ASSERT_OR_FAIL(q.try_dequeue_bulk(items, 5) == 5); for (int i = 0; i != 5; ++i) { ASSERT_OR_FAIL(items[i] == k * 5 + i + 1); } } ASSERT_OR_FAIL(!q.try_dequeue(items[0])); } // Implicit producer { Traits::reset(); ConcurrentQueue q; ASSERT_OR_FAIL(q.try_dequeue_bulk(items, 5) == 0); q.enqueue(17); ASSERT_OR_FAIL(q.try_dequeue_bulk(items, 5) == 1); ASSERT_OR_FAIL(items[0] == 17); ASSERT_OR_FAIL(!q.try_dequeue(items[0])); for (int i = 0; i != 4; ++i) { q.enqueue(i + 1); } ASSERT_OR_FAIL(q.try_dequeue_bulk(items, 5) == 4); for (int i = 0; i != 4; ++i) { ASSERT_OR_FAIL(items[i] == i + 1); } ASSERT_OR_FAIL(!q.try_dequeue(items[0])); for (int i = 0; i != 5; ++i) { q.enqueue(i + 1); } ASSERT_OR_FAIL(q.try_dequeue_bulk(items, 5) == 5); for (int i = 0; i != 5; ++i) { ASSERT_OR_FAIL(items[i] == i + 1); } ASSERT_OR_FAIL(!q.try_dequeue(items[0])); for (int i = 0; i != 6; ++i) { q.enqueue(i + 1); } ASSERT_OR_FAIL(q.try_dequeue_bulk(items, 5) == 5); for (int i = 0; i != 5; ++i) { ASSERT_OR_FAIL(items[i] == i + 1); } ASSERT_OR_FAIL(q.try_dequeue(items[0])); ASSERT_OR_FAIL(items[0] == 6); ASSERT_OR_FAIL(!q.try_dequeue(items[0])); for (int i = 0; i != 10; ++i) { q.enqueue(i + 1); } for (int k = 0; k != 2; ++k) { ASSERT_OR_FAIL(q.try_dequeue_bulk(items, 5) == 5); for (int i = 0; i != 5; ++i) { ASSERT_OR_FAIL(items[i] == k * 5 + i + 1); } } ASSERT_OR_FAIL(!q.try_dequeue(items[0])); } return true; } bool try_dequeue_bulk_threaded() { typedef TestTraits<2> Traits; int dummy; // Explicit producer { Traits::reset(); ConcurrentQueue q; SimpleThread threads[2]; bool success[2] = { true, true }; for (int i = 0; i != 2; ++i) { if (i == 0) { threads[i] = SimpleThread([&](int) { // Producer ProducerToken tok(q); for (int i = 0; i != 32*1024; ++i) { q.enqueue(tok, i); } }, i); } else { threads[i] = SimpleThread([&](int) { // Consumer int items[5]; int prevItem = -1; for (int i = 0; i != 32*1024;) { auto dequeued = q.try_dequeue_bulk(items, 5); if (dequeued > 0) { if (dequeued > 5) { success[i] = false; break; } for (std::size_t j = 0; j != dequeued; ++j) { if (items[j] != prevItem + 1) { success[i] = false; } prevItem = items[j]; } i += (int)dequeued; } } }, i); } } for (int i = 0; i != 2; ++i) { threads[i].join(); } ASSERT_OR_FAIL(success[0]); ASSERT_OR_FAIL(success[1]); ASSERT_OR_FAIL(!q.try_dequeue(dummy)); } // Implicit producer { Traits::reset(); ConcurrentQueue q; SimpleThread threads[2]; bool success[2] = { true, true }; for (int i = 0; i != 2; ++i) { if (i == 0) { threads[i] = SimpleThread([&](int) { // Producer for (int i = 0; i != 32*1024; ++i) { q.enqueue(i); } }, i); } else { threads[i] = SimpleThread([&](int) { // Consumer int items[5]; int prevItem = -1; for (int i = 0; i != 32*1024;) { auto dequeued = q.try_dequeue_bulk(items, 5); if (dequeued > 0) { if (dequeued > 5) { success[i] = false; break; } for (std::size_t j = 0; j != dequeued; ++j) { if (items[j] != prevItem + 1) { success[i] = false; } prevItem = items[j]; } i += (int)dequeued; } } }, i); } } for (int i = 0; i != 2; ++i) { threads[i].join(); } ASSERT_OR_FAIL(success[0]); ASSERT_OR_FAIL(success[1]); ASSERT_OR_FAIL(!q.try_dequeue(dummy)); } // Multithreaded consumption { Traits::reset(); ConcurrentQueue q; bool success[20]; SimpleThread threads[20]; for (int i = 0; i != 10; ++i) { success[i] = true; threads[i] = SimpleThread([&](int i) { ProducerToken t(q); if ((i & 1) == 1) { for (int j = 0; j != 100; ++j) { q.enqueue(t, i * 128 + j); } } else { for (int j = 0; j != 100; ++j) { q.enqueue(i * 128 + j); } } }, i); } std::atomic dequeueCount(0); for (int i = 10; i != 20; ++i) { success[i] = true; threads[i] = SimpleThread([&](int i) { int prevItems[10]; for (int j = 0; j != 10; ++j) { prevItems[j] = -1; } int items[15]; ConsumerToken t(q); while (dequeueCount.load(std::memory_order_relaxed) != 1000) { size_t count; if ((i & 1) == 1) { count = q.try_dequeue_bulk(items, 15); } else { count = q.try_dequeue_bulk(t, items, 15); } if (count > 15) { success[i] = false; } for (size_t k = 0; k != count; ++k) { if (prevItems[items[k] / 128] >= (items[k] & 127)) { success[i] = false; } prevItems[items[k] / 128] = items[k] & 127; } dequeueCount.fetch_add(count, std::memory_order_relaxed); } }, i); } for (int i = 0; i != 20; ++i) { threads[i].join(); } int item; ASSERT_OR_FAIL(!q.try_dequeue(item)); for (int i = 0; i != 20; ++i) { ASSERT_OR_FAIL(success[i]); } } return true; } bool implicit_producer_hash() { for (int j = 0; j != 5; ++j) { ConcurrentQueue q; std::vector threads; for (int i = 0; i != 20; ++i) { threads.push_back(SimpleThread([&]() { q.enqueue(7); })); } for (auto it = threads.begin(); it != threads.end(); ++it) { it->join(); } int item; ConsumerToken t(q); for (auto i = 0; i != 20; ++i) { if ((j & 1) == 0) { ASSERT_OR_FAIL(q.try_dequeue(item)); } else { ASSERT_OR_FAIL(q.try_dequeue(t, item)); } ASSERT_OR_FAIL(item == 7); } ASSERT_OR_FAIL(!q.try_dequeue(item)); } return true; } bool index_wrapping() { { // Implicit ConcurrentQueue q(16); int item; for (int i = 0; i != (1 << 18); ++i) { if ((i & 16) == 0) { ASSERT_OR_FAIL(q.try_enqueue(i)); } else { ASSERT_OR_FAIL(q.try_dequeue(item)); ASSERT_OR_FAIL(item == (i - 16)); } } ASSERT_OR_FAIL(!q.try_dequeue(item)); } { // Explicit ConcurrentQueue q(16); ProducerToken tok(q); int item; for (int i = 0; i != (1 << 18); ++i) { if ((i & 16) == 0) { ASSERT_OR_FAIL(q.try_enqueue(tok, i)); } else { ASSERT_OR_FAIL(q.try_dequeue_from_producer(tok, item)); ASSERT_OR_FAIL(item == (i - 16)); } } ASSERT_OR_FAIL(!q.try_dequeue(item)); } { // Implicit extra small ConcurrentQueue q(1); int item; for (int i = 0; i != 4097; ++i) { q.enqueue(i); ASSERT_OR_FAIL(q.try_dequeue(item)); ASSERT_OR_FAIL(item == i); } ASSERT_OR_FAIL(!q.try_dequeue(item)); } { // Explicit extra small ConcurrentQueue q(1); ProducerToken tok(q); int item; for (int i = 0; i != 4097; ++i) { q.enqueue(tok, i); ASSERT_OR_FAIL(q.try_dequeue(item)); ASSERT_OR_FAIL(item == i); } ASSERT_OR_FAIL(!q.try_dequeue(item)); } return true; } struct SizeLimitTraits : public MallocTrackingTraits { static const size_t BLOCK_SIZE = 2; static const size_t MAX_SUBQUEUE_SIZE = 5; // Will round up to 6 because of block size }; bool subqueue_size_limit() { { // Explicit ConcurrentQueue q; ProducerToken t(q); int item; ASSERT_OR_FAIL(q.enqueue(t, 1)); ASSERT_OR_FAIL(q.enqueue(t, 2)); ASSERT_OR_FAIL(q.enqueue(t, 3)); ASSERT_OR_FAIL(q.enqueue(t, 4)); ASSERT_OR_FAIL(q.enqueue(t, 5)); ASSERT_OR_FAIL(q.enqueue(t, 6)); ASSERT_OR_FAIL(!q.enqueue(t, 7)); ASSERT_OR_FAIL(!q.enqueue(t, 8)); ASSERT_OR_FAIL(q.try_dequeue(item) && item == 1); ASSERT_OR_FAIL(!q.enqueue(t, 7)); // Can't reuse block until it's completely empty ASSERT_OR_FAIL(q.try_dequeue(item) && item == 2); ASSERT_OR_FAIL(q.enqueue(t, 7)); ASSERT_OR_FAIL(q.enqueue(t, 8)); ASSERT_OR_FAIL(!q.enqueue(t, 9)); ASSERT_OR_FAIL(q.try_dequeue(item) && item == 3); ASSERT_OR_FAIL(!q.enqueue(t, 9)); ASSERT_OR_FAIL(q.try_dequeue(item) && item == 4); ASSERT_OR_FAIL(q.enqueue(t, 9)); for (int i = 5; i <= 9; ++i) { ASSERT_OR_FAIL(q.try_dequeue(item) && item == i); } ASSERT_OR_FAIL(q.enqueue(t, 10)); ASSERT_OR_FAIL(q.try_dequeue(item) && item == 10); ASSERT_OR_FAIL(!q.try_dequeue(item)); for (int i = 0; i != 6; ++i) { ASSERT_OR_FAIL(q.try_enqueue(t, i)); } ASSERT_OR_FAIL(!q.try_enqueue(t, 7)); ASSERT_OR_FAIL(!q.enqueue(t, 7)); // Bulk int items[6]; ASSERT_OR_FAIL(q.try_dequeue_bulk(items, 6) == 6); ASSERT_OR_FAIL(!q.try_enqueue_bulk(t, items, 7)); ASSERT_OR_FAIL(!q.enqueue_bulk(t, items, 7)); ASSERT_OR_FAIL(q.enqueue_bulk(t, items, 6)); ASSERT_OR_FAIL(q.try_dequeue_bulk(items, 6) == 6); ASSERT_OR_FAIL(q.enqueue_bulk(t, items, 3)); ASSERT_OR_FAIL(!q.enqueue_bulk(t, items, 4)); ASSERT_OR_FAIL(q.enqueue_bulk(t, items, 3)); ASSERT_OR_FAIL(!q.enqueue_bulk(t, items, 1)); ASSERT_OR_FAIL(!q.enqueue(t, 100)); ASSERT_OR_FAIL(q.try_dequeue_bulk(items, 1) == 1); ASSERT_OR_FAIL(!q.enqueue(t, 100)); } { // Implicit ConcurrentQueue q; int item; ASSERT_OR_FAIL(q.enqueue(1)); ASSERT_OR_FAIL(q.enqueue(2)); ASSERT_OR_FAIL(q.enqueue(3)); ASSERT_OR_FAIL(q.enqueue(4)); ASSERT_OR_FAIL(q.enqueue(5)); ASSERT_OR_FAIL(q.enqueue(6)); ASSERT_OR_FAIL(!q.enqueue(7)); ASSERT_OR_FAIL(!q.enqueue(8)); ASSERT_OR_FAIL(q.try_dequeue(item) && item == 1); ASSERT_OR_FAIL(!q.enqueue(7)); // Can't reuse block until it's completely empty ASSERT_OR_FAIL(q.try_dequeue(item) && item == 2); ASSERT_OR_FAIL(q.enqueue(7)); ASSERT_OR_FAIL(q.enqueue(8)); ASSERT_OR_FAIL(!q.enqueue(9)); ASSERT_OR_FAIL(q.try_dequeue(item) && item == 3); ASSERT_OR_FAIL(!q.enqueue(9)); ASSERT_OR_FAIL(q.try_dequeue(item) && item == 4); ASSERT_OR_FAIL(q.enqueue(9)); for (int i = 5; i <= 9; ++i) { ASSERT_OR_FAIL(q.try_dequeue(item) && item == i); } ASSERT_OR_FAIL(q.enqueue(10)); ASSERT_OR_FAIL(q.try_dequeue(item) && item == 10); ASSERT_OR_FAIL(!q.try_dequeue(item)); for (int i = 0; i != 6; ++i) { ASSERT_OR_FAIL(q.try_enqueue(i)); } ASSERT_OR_FAIL(!q.try_enqueue(7)); ASSERT_OR_FAIL(!q.enqueue(7)); // Bulk int items[6]; ASSERT_OR_FAIL(q.try_dequeue_bulk(items, 6) == 6); ASSERT_OR_FAIL(!q.try_enqueue_bulk(items, 7)); ASSERT_OR_FAIL(!q.enqueue_bulk(items, 7)); ASSERT_OR_FAIL(q.enqueue_bulk(items, 6)); ASSERT_OR_FAIL(q.try_dequeue_bulk(items, 6) == 6); ASSERT_OR_FAIL(q.enqueue_bulk(items, 3)); ASSERT_OR_FAIL(!q.enqueue_bulk(items, 4)); ASSERT_OR_FAIL(q.enqueue_bulk(items, 3)); ASSERT_OR_FAIL(!q.enqueue_bulk(items, 1)); ASSERT_OR_FAIL(!q.enqueue(100)); ASSERT_OR_FAIL(q.try_dequeue_bulk(items, 1) == 1); ASSERT_OR_FAIL(!q.enqueue(100)); } return true; } bool exceptions() { typedef TestTraits<4, 2> Traits; { // Explicit, basic // enqueue ConcurrentQueue q; ProducerToken tok(q); ThrowingMovable::reset(); bool threw = false; try { q.enqueue(tok, ThrowingMovable(1, true)); } catch (ThrowingMovable* m) { threw = true; ASSERT_OR_FAIL(m->id == 1); ASSERT_OR_FAIL(m->moved); } ASSERT_OR_FAIL(threw); ASSERT_OR_FAIL(q.size_approx() == 0); ASSERT_OR_FAIL(q.enqueue(tok, ThrowingMovable(2))); ThrowingMovable result(-1); ASSERT_OR_FAIL(q.try_dequeue(result)); ASSERT_OR_FAIL(result.id == 2); ASSERT_OR_FAIL(result.moved); ASSERT_OR_FAIL(!q.try_dequeue(result)); ASSERT_OR_FAIL(ThrowingMovable::destroyCount() == 3); // dequeue ThrowingMovable::reset(); q.enqueue(tok, ThrowingMovable(10)); q.enqueue(tok, ThrowingMovable(11, false, true)); q.enqueue(tok, ThrowingMovable(12)); ASSERT_OR_FAIL(q.size_approx() == 3); ASSERT_OR_FAIL(q.try_dequeue(result)); ASSERT_OR_FAIL(result.id == 10); threw = false; try { q.try_dequeue(result); } catch (ThrowingMovable* m) { ASSERT_OR_FAIL(m->id == 11); threw = true; } ASSERT_OR_FAIL(threw); ASSERT_OR_FAIL(q.size_approx() == 1); ASSERT_OR_FAIL(q.try_dequeue(result)); ASSERT_OR_FAIL(result.id == 12); ASSERT_OR_FAIL(result.moved); ASSERT_OR_FAIL(!q.try_dequeue(result)); q.enqueue(tok, ThrowingMovable(13)); ASSERT_OR_FAIL(q.size_approx() == 1); ASSERT_OR_FAIL(q.try_dequeue(result)); ASSERT_OR_FAIL(result.id == 13); ASSERT_OR_FAIL(!q.try_dequeue(result)); ASSERT_OR_FAIL(ThrowingMovable::destroyCount() == 8); } { // Explicit, on and off block boundaries // enqueue ConcurrentQueue q; ProducerToken tok(q); ThrowingMovable::reset(); for (int i = 0; i != 3; ++i) { q.enqueue(tok, ThrowingMovable(i)); } bool threw = false; try { q.enqueue(tok, ThrowingMovable(3, true)); } catch (ThrowingMovable* m) { threw = true; ASSERT_OR_FAIL(m->id == 3); } ASSERT_OR_FAIL(threw); ASSERT_OR_FAIL(q.size_approx() == 3); q.enqueue(tok, ThrowingMovable(4)); threw = false; try { q.enqueue(tok, ThrowingMovable(5, true)); } catch (ThrowingMovable* m) { threw = true; ASSERT_OR_FAIL(m->id == 5); ASSERT_OR_FAIL(m->moved); } ASSERT_OR_FAIL(threw); ASSERT_OR_FAIL(q.size_approx() == 4); q.enqueue(tok, ThrowingMovable(6)); ThrowingMovable result(-1); ASSERT_OR_FAIL(q.try_dequeue(result)); ASSERT_OR_FAIL(result.id == 0); ASSERT_OR_FAIL(q.try_dequeue(result)); ASSERT_OR_FAIL(result.id == 1); ASSERT_OR_FAIL(q.try_dequeue(result)); ASSERT_OR_FAIL(result.id == 2); ASSERT_OR_FAIL(q.try_dequeue(result)); ASSERT_OR_FAIL(result.id == 4); ASSERT_OR_FAIL(q.try_dequeue(result)); ASSERT_OR_FAIL(result.id == 6); ASSERT_OR_FAIL(!q.try_dequeue(result)); ASSERT_OR_FAIL(ThrowingMovable::destroyCount() == 12); // dequeue ThrowingMovable::reset(); q.enqueue(tok, ThrowingMovable(10, false, true)); q.enqueue(tok, ThrowingMovable(11)); q.enqueue(tok, ThrowingMovable(12)); q.enqueue(tok, ThrowingMovable(13, false, true)); q.enqueue(tok, ThrowingMovable(14, false, true)); q.enqueue(tok, ThrowingMovable(15, false, true)); q.enqueue(tok, ThrowingMovable(16)); ASSERT_OR_FAIL(q.size_approx() == 7); for (int i = 10; i != 17; ++i) { if (i == 10 || (i >= 13 && i <= 15)) { threw = false; try { q.try_dequeue(result); } catch (ThrowingMovable* m) { ASSERT_OR_FAIL(m->id == i); ASSERT_OR_FAIL(m->moved); threw = true; } ASSERT_OR_FAIL(threw); } else { ASSERT_OR_FAIL(q.try_dequeue(result)); ASSERT_OR_FAIL(result.id == i); ASSERT_OR_FAIL(result.moved); } ASSERT_OR_FAIL(q.size_approx() == (std::uint32_t)(16 - i)); } ASSERT_OR_FAIL(!q.try_dequeue(result)); q.enqueue(tok, ThrowingMovable(20)); ASSERT_OR_FAIL(q.size_approx() == 1); ASSERT_OR_FAIL(q.try_dequeue(result)); ASSERT_OR_FAIL(result.id == 20); ASSERT_OR_FAIL(!q.try_dequeue(result)); ASSERT_OR_FAIL(ThrowingMovable::destroyCount() == 16); } { // Explicit bulk // enqueue ConcurrentQueue q; ProducerToken tok(q); ThrowingMovable::reset(); std::vector items; items.reserve(5); items.push_back(ThrowingMovable(1)); items.push_back(ThrowingMovable(2)); items.push_back(ThrowingMovable(3)); items.push_back(ThrowingMovable(4)); items.push_back(ThrowingMovable(5)); items.back().throwOnCctor = true; bool threw = false; try { q.enqueue_bulk(tok, std::make_move_iterator(items.begin()), 5); } catch (ThrowingMovable* m) { threw = true; ASSERT_OR_FAIL(m->id == 5); ASSERT_OR_FAIL(m->copied); } ASSERT_OR_FAIL(threw); ASSERT_OR_FAIL(q.size_approx() == 0); q.enqueue(tok, ThrowingMovable(6)); threw = false; try { q.enqueue_bulk(tok, std::make_move_iterator(items.begin()), 5); } catch (ThrowingMovable* m) { threw = true; ASSERT_OR_FAIL(m->id == 5); } ASSERT_OR_FAIL(threw); ASSERT_OR_FAIL(q.size_approx() == 1); ThrowingMovable result(-1); ASSERT_OR_FAIL(q.try_dequeue(result)); ASSERT_OR_FAIL(result.id == 6); ASSERT_OR_FAIL(result.moved); ASSERT_OR_FAIL(!q.try_dequeue(result)); ASSERT_OR_FAIL(ThrowingMovable::destroyCount() == 15); // dequeue ThrowingMovable::reset(); q.enqueue(tok, ThrowingMovable(10)); q.enqueue(tok, ThrowingMovable(11)); q.enqueue(tok, ThrowingMovable(12)); q.enqueue(tok, ThrowingMovable(13)); q.enqueue(tok, ThrowingMovable(14, false, true, true)); // std::back_inserter turns an assignment into a ctor call q.enqueue(tok, ThrowingMovable(15)); ASSERT_OR_FAIL(q.size_approx() == 6); std::vector results; results.reserve(5); ASSERT_OR_FAIL(q.try_dequeue_bulk(std::back_inserter(results), 2)); ASSERT_OR_FAIL(results.size() == 2); ASSERT_OR_FAIL(results[0].id == 10); ASSERT_OR_FAIL(results[1].id == 11); ASSERT_OR_FAIL(results[0].moved); ASSERT_OR_FAIL(results[1].moved); ASSERT_OR_FAIL(q.size_approx() == 4); threw = false; try { q.try_dequeue_bulk(std::back_inserter(results), 4); } catch (ThrowingMovable*) { // Note: Can't inspect thrown value since it points to an object whose construction was attempted on the vector and // no longer exists threw = true; } ASSERT_OR_FAIL(threw); ASSERT_OR_FAIL(q.size_approx() == 0); ASSERT_OR_FAIL(!q.try_dequeue(result)); ASSERT_OR_FAIL(q.try_dequeue_bulk(std::back_inserter(results), 1) == 0); ASSERT_OR_FAIL(results.size() == 4); ASSERT_OR_FAIL(results[2].id == 12); ASSERT_OR_FAIL(results[3].id == 13); ASSERT_OR_FAIL(ThrowingMovable::destroyCount() == 12); } { // Implicit, basic // enqueue ConcurrentQueue q; ThrowingMovable::reset(); bool threw = false; try { q.enqueue(ThrowingMovable(1, true)); } catch (ThrowingMovable* m) { threw = true; ASSERT_OR_FAIL(m->id == 1); ASSERT_OR_FAIL(m->moved); } ASSERT_OR_FAIL(threw); ASSERT_OR_FAIL(q.size_approx() == 0); ASSERT_OR_FAIL(q.enqueue(ThrowingMovable(2))); ThrowingMovable result(-1); ASSERT_OR_FAIL(q.try_dequeue(result)); ASSERT_OR_FAIL(result.id == 2); ASSERT_OR_FAIL(result.moved); ASSERT_OR_FAIL(!q.try_dequeue(result)); ASSERT_OR_FAIL(ThrowingMovable::destroyCount() == 3); // dequeue ThrowingMovable::reset(); q.enqueue(ThrowingMovable(10)); q.enqueue(ThrowingMovable(11, false, true)); q.enqueue(ThrowingMovable(12)); ASSERT_OR_FAIL(q.size_approx() == 3); ASSERT_OR_FAIL(q.try_dequeue(result)); ASSERT_OR_FAIL(result.id == 10); threw = false; try { q.try_dequeue(result); } catch (ThrowingMovable* m) { ASSERT_OR_FAIL(m->id == 11); threw = true; } ASSERT_OR_FAIL(threw); ASSERT_OR_FAIL(q.size_approx() == 1); ASSERT_OR_FAIL(q.try_dequeue(result)); ASSERT_OR_FAIL(result.id == 12); ASSERT_OR_FAIL(result.moved); ASSERT_OR_FAIL(!q.try_dequeue(result)); q.enqueue(ThrowingMovable(13)); ASSERT_OR_FAIL(q.size_approx() == 1); ASSERT_OR_FAIL(q.try_dequeue(result)); ASSERT_OR_FAIL(result.id == 13); ASSERT_OR_FAIL(!q.try_dequeue(result)); ASSERT_OR_FAIL(ThrowingMovable::destroyCount() == 8); } { // Implicit, on and off block boundaries // enqueue ConcurrentQueue q; ThrowingMovable::reset(); for (int i = 0; i != 3; ++i) { q.enqueue(ThrowingMovable(i)); } bool threw = false; try { q.enqueue(ThrowingMovable(3, true)); } catch (ThrowingMovable* m) { threw = true; ASSERT_OR_FAIL(m->id == 3); } ASSERT_OR_FAIL(threw); ASSERT_OR_FAIL(q.size_approx() == 3); q.enqueue(ThrowingMovable(4)); threw = false; try { q.enqueue(ThrowingMovable(5, true)); } catch (ThrowingMovable* m) { threw = true; ASSERT_OR_FAIL(m->id == 5); ASSERT_OR_FAIL(m->moved); } ASSERT_OR_FAIL(threw); ASSERT_OR_FAIL(q.size_approx() == 4); q.enqueue(ThrowingMovable(6)); ThrowingMovable result(-1); ASSERT_OR_FAIL(q.try_dequeue(result)); ASSERT_OR_FAIL(result.id == 0); ASSERT_OR_FAIL(q.try_dequeue(result)); ASSERT_OR_FAIL(result.id == 1); ASSERT_OR_FAIL(q.try_dequeue(result)); ASSERT_OR_FAIL(result.id == 2); ASSERT_OR_FAIL(q.try_dequeue(result)); ASSERT_OR_FAIL(result.id == 4); ASSERT_OR_FAIL(q.try_dequeue(result)); ASSERT_OR_FAIL(result.id == 6); ASSERT_OR_FAIL(!q.try_dequeue(result)); ASSERT_OR_FAIL(ThrowingMovable::destroyCount() == 12); // dequeue ThrowingMovable::reset(); q.enqueue(ThrowingMovable(10, false, true)); q.enqueue(ThrowingMovable(11)); q.enqueue(ThrowingMovable(12)); q.enqueue(ThrowingMovable(13, false, true)); q.enqueue(ThrowingMovable(14, false, true)); q.enqueue(ThrowingMovable(15, false, true)); q.enqueue(ThrowingMovable(16)); ASSERT_OR_FAIL(q.size_approx() == 7); for (int i = 10; i != 17; ++i) { if (i == 10 || (i >= 13 && i <= 15)) { threw = false; try { q.try_dequeue(result); } catch (ThrowingMovable* m) { ASSERT_OR_FAIL(m->id == i); ASSERT_OR_FAIL(m->moved); threw = true; } ASSERT_OR_FAIL(threw); } else { ASSERT_OR_FAIL(q.try_dequeue(result)); ASSERT_OR_FAIL(result.id == i); ASSERT_OR_FAIL(result.moved); } ASSERT_OR_FAIL(q.size_approx() == (std::uint32_t)(16 - i)); } ASSERT_OR_FAIL(!q.try_dequeue(result)); q.enqueue(ThrowingMovable(20)); ASSERT_OR_FAIL(q.size_approx() == 1); ASSERT_OR_FAIL(q.try_dequeue(result)); ASSERT_OR_FAIL(result.id == 20); ASSERT_OR_FAIL(!q.try_dequeue(result)); ASSERT_OR_FAIL(ThrowingMovable::destroyCount() == 16); } { // Impplicit bulk // enqueue ConcurrentQueue q; ThrowingMovable::reset(); std::vector items; items.reserve(5); items.push_back(ThrowingMovable(1)); items.push_back(ThrowingMovable(2)); items.push_back(ThrowingMovable(3)); items.push_back(ThrowingMovable(4)); items.push_back(ThrowingMovable(5)); items.back().throwOnCctor = true; bool threw = false; try { q.enqueue_bulk(std::make_move_iterator(items.begin()), 5); } catch (ThrowingMovable* m) { threw = true; ASSERT_OR_FAIL(m->id == 5); ASSERT_OR_FAIL(m->copied); } ASSERT_OR_FAIL(threw); ASSERT_OR_FAIL(q.size_approx() == 0); q.enqueue(ThrowingMovable(6)); threw = false; try { q.enqueue_bulk(std::make_move_iterator(items.begin()), 5); } catch (ThrowingMovable* m) { threw = true; ASSERT_OR_FAIL(m->id == 5); } ASSERT_OR_FAIL(threw); ASSERT_OR_FAIL(q.size_approx() == 1); ThrowingMovable result(-1); ASSERT_OR_FAIL(q.try_dequeue(result)); ASSERT_OR_FAIL(result.id == 6); ASSERT_OR_FAIL(result.moved); ASSERT_OR_FAIL(!q.try_dequeue(result)); ASSERT_OR_FAIL(ThrowingMovable::destroyCount() == 15); // dequeue ThrowingMovable::reset(); q.enqueue(ThrowingMovable(10)); q.enqueue(ThrowingMovable(11)); q.enqueue(ThrowingMovable(12)); q.enqueue(ThrowingMovable(13)); q.enqueue(ThrowingMovable(14, false, true, true)); // std::back_inserter turns an assignment into a ctor call q.enqueue(ThrowingMovable(15)); ASSERT_OR_FAIL(q.size_approx() == 6); std::vector results; results.reserve(5); ASSERT_OR_FAIL(q.try_dequeue_bulk(std::back_inserter(results), 2)); ASSERT_OR_FAIL(results.size() == 2); ASSERT_OR_FAIL(results[0].id == 10); ASSERT_OR_FAIL(results[1].id == 11); ASSERT_OR_FAIL(results[0].moved); ASSERT_OR_FAIL(results[1].moved); ASSERT_OR_FAIL(q.size_approx() == 4); threw = false; try { q.try_dequeue_bulk(std::back_inserter(results), 4); } catch (ThrowingMovable*) { threw = true; } ASSERT_OR_FAIL(threw); ASSERT_OR_FAIL(q.size_approx() == 0); ASSERT_OR_FAIL(!q.try_dequeue(result)); ASSERT_OR_FAIL(q.try_dequeue_bulk(std::back_inserter(results), 1) == 0); ASSERT_OR_FAIL(results.size() == 4); ASSERT_OR_FAIL(results[2].id == 12); ASSERT_OR_FAIL(results[3].id == 13); ASSERT_OR_FAIL(ThrowingMovable::destroyCount() == 12); } { // Threaded ConcurrentQueue q; ThrowingMovable::reset(); std::vector threads(6); for (std::size_t tid = 0; tid != threads.size(); ++tid) { threads[tid] = SimpleThread([&](std::size_t tid) { std::vector inVec; inVec.push_back(ThrowingMovable(1)); inVec.push_back(ThrowingMovable(2)); inVec.push_back(ThrowingMovable(3)); std::vector outVec; outVec.push_back(ThrowingMovable(-1)); outVec.push_back(ThrowingMovable(-1)); outVec.push_back(ThrowingMovable(-1)); ProducerToken tok(q); ThrowingMovable result(-1); for (std::size_t i = 0; i != 8192; ++i) { auto magic = (tid + 1) * i + tid * 17 + i; auto op = magic & 7; auto ctorThrow = (magic & 0x10) != 0; auto assignThrow = (magic & 0x20) != 0; auto throwOnNextCctor = (magic & 0x40) != 0; try { switch (op) { case 0: q.enqueue(tok, ThrowingMovable((int)i, ctorThrow, assignThrow, throwOnNextCctor)); break; case 1: inVec[i & 3].throwOnCctor = ctorThrow; inVec[i & 3].throwOnAssignment = assignThrow; inVec[i & 3].throwOnSecondCctor = throwOnNextCctor; q.enqueue_bulk(tok, inVec.begin(), 3); break; case 2: q.enqueue(ThrowingMovable((int)i, ctorThrow, assignThrow, throwOnNextCctor)); break; case 3: inVec[i & 3].throwOnCctor = ctorThrow; inVec[i & 3].throwOnAssignment = assignThrow; inVec[i & 3].throwOnSecondCctor = throwOnNextCctor; q.enqueue_bulk(inVec.begin(), 3); break; case 4: case 5: q.try_dequeue(result); break; case 6: case 7: q.try_dequeue_bulk(outVec.data(), 3); break; } } catch (ThrowingMovable*) { } } }, tid); } for (std::size_t i = 0; i != threads.size(); ++i) { threads[i].join(); } ThrowingMovable result(-1); while (true) { try { if (!q.try_dequeue(result)) { break; } } catch (ThrowingMovable*) { } } ASSERT_OR_FAIL(ThrowingMovable::destroyCount() + 1 == ThrowingMovable::ctorCount()); } return true; } bool implicit_producer_churn() { typedef TestTraits<4> Traits; for (int i = 0; i != 256; ++i) { std::vector threads(32); ConcurrentQueue q; for (auto& thread : threads) { thread = SimpleThread([&] { int x; for (int j = 0; j != 16; ++j) { q.enqueue(0); q.try_dequeue(x); } }); } for (auto& thread : threads) { thread.join(); } } return true; } bool test_threaded() { typedef TestTraits<4> Traits; Traits::reset(); bool inOrder = true; { // Single producer, single consumer ConcurrentQueue q; ProducerToken t(q); SimpleThread a([&]() { for (int i = 0; i != 123456; ++i) { q.enqueue(t, i); } }); SimpleThread b([&]() { int item; int prevItem = -1; while (true) { if (q.try_dequeue_from_producer(t, item)) { if (item == 123455) { break; } inOrder = item == prevItem + 1 && inOrder; prevItem = item; } } }); a.join(); b.join(); } ASSERT_OR_FAIL(inOrder); { // Single producer, multi consumer ConcurrentQueue q; ProducerToken t(q); SimpleThread a([&]() { for (int i = 0; i != 123456; ++i) { q.enqueue(t, i); } }); SimpleThread b([&]() { int item, prevItem = -1; for (int i = 0; i != 123456; ++i) { if (q.try_dequeue_from_producer(t, item)) { inOrder = item > prevItem && inOrder; prevItem = item; } } }); SimpleThread c([&]() { int item; for (int i = 0; i != 123456; ++i) q.try_dequeue_from_producer(t, item); }); SimpleThread d([&]() { int item; for (int i = 0; i != 123456; ++i) q.try_dequeue_from_producer(t, item); }); a.join(); b.join(); c.join(); d.join(); } ASSERT_OR_FAIL(inOrder); ASSERT_OR_FAIL(Traits::malloc_count() == Traits::free_count()); return true; } bool test_threaded_bulk() { typedef TestTraits<2> Traits; // Enqueue bulk (implicit) Traits::reset(); { ConcurrentQueue q; SimpleThread threads[2]; bool success[2]; int stuff[] = { 1, 2, 3, 4, 5 }; for (int i = 0; i != 2; ++i) { success[i] = true; if (i == 0) { // Enqueue bulk threads[i] = SimpleThread([&](int j) { for (int k = 0; k != 2048; ++k) { success[j] = q.enqueue_bulk(stuff, 5) && success[j]; } }, i); } else { // Dequeue threads[i] = SimpleThread([&](int j) { int item; int prevItem = 0; for (int k = 0; k != 2048 * 5;) { if (q.try_dequeue(item)) { if (item != prevItem + 1) { success[j] = false; } prevItem = item; if (item == 5) { prevItem = 0; } ++k; } } }, i); } } for (int i = 0; i != 2; ++i) { threads[i].join(); } ASSERT_OR_FAIL(success[0]); ASSERT_OR_FAIL(success[1]); } // Enqueue bulk (while somebody is dequeueing (with tokens)) Traits::reset(); { ConcurrentQueue q; SimpleThread threads[2]; bool success[2]; int stuff[] = { 1, 2, 3, 4, 5 }; for (int i = 0; i != 2; ++i) { success[i] = true; if (i == 0) { // Enqueue bulk threads[i] = SimpleThread([&](int j) { ProducerToken tok(q); for (int k = 0; k != 2048; ++k) { success[j] = q.enqueue_bulk(tok, stuff, 5) && success[j]; } }, i); } else { // Dequeue threads[i] = SimpleThread([&](int j) { ConsumerToken tok(q); int item; int prevItem = 0; for (int k = 0; k != 2048 * 5;) { if (q.try_dequeue(tok, item)) { if (item != prevItem + 1) { success[j] = false; } prevItem = item; if (item == 5) { prevItem = 0; } ++k; } } }, i); } } for (int i = 0; i != 2; ++i) { threads[i].join(); } ASSERT_OR_FAIL(success[0]); ASSERT_OR_FAIL(success[1]); } return true; } template bool full_api() { // A simple test that exercises the full public API (just to make sure every function is implemented // and works on at least the most basic level) // enqueue(T const&) { ConcurrentQueue q; Copyable original(12345); ASSERT_OR_FAIL(q.enqueue(original)); Copyable item(0); ASSERT_OR_FAIL(q.try_dequeue(item)); ASSERT_OR_FAIL(item.id == 12345); ASSERT_OR_FAIL(item.copied); ASSERT_OR_FAIL(!q.try_dequeue(item)); } // enqueue(T&&) { ConcurrentQueue q; ASSERT_OR_FAIL(q.enqueue(Moveable(12345))); Moveable item(0); ASSERT_OR_FAIL(q.try_dequeue(item)); ASSERT_OR_FAIL(item.id == 12345); ASSERT_OR_FAIL(item.moved); ASSERT_OR_FAIL(!item.copied); ASSERT_OR_FAIL(!q.try_dequeue(item)); } { ConcurrentQueue q; Moveable original(12345); ASSERT_OR_FAIL(q.enqueue(std::move(original))); Moveable item(0); ASSERT_OR_FAIL(q.try_dequeue(item)); ASSERT_OR_FAIL(item.id == 12345); ASSERT_OR_FAIL(item.moved); ASSERT_OR_FAIL(!item.copied); ASSERT_OR_FAIL(!q.try_dequeue(item)); } { ConcurrentQueue q; ASSERT_OR_FAIL(q.enqueue(Copyable(12345))); Copyable item(0); ASSERT_OR_FAIL(q.try_dequeue(item)); ASSERT_OR_FAIL(item.id == 12345); ASSERT_OR_FAIL(item.copied); ASSERT_OR_FAIL(!q.try_dequeue(item)); } // enqueue(Token, T const&) { ConcurrentQueue q; ProducerToken t(q); Copyable original(12345); ASSERT_OR_FAIL(q.enqueue(t, original)); Copyable item(0); ASSERT_OR_FAIL(q.try_dequeue(item)); ASSERT_OR_FAIL(item.id == 12345); ASSERT_OR_FAIL(item.copied); ASSERT_OR_FAIL(!q.try_dequeue(item)); } // enqueue(Token, T&&) { ConcurrentQueue q; ProducerToken t(q); ASSERT_OR_FAIL(q.enqueue(t, Moveable(12345))); Moveable item(0); ASSERT_OR_FAIL(q.try_dequeue(item)); ASSERT_OR_FAIL(item.id == 12345); ASSERT_OR_FAIL(item.moved); ASSERT_OR_FAIL(!item.copied); ASSERT_OR_FAIL(!q.try_dequeue(item)); } { ConcurrentQueue q; ProducerToken t(q); Moveable original(12345); ASSERT_OR_FAIL(q.enqueue(t, std::move(original))); Moveable item(0); ASSERT_OR_FAIL(q.try_dequeue(item)); ASSERT_OR_FAIL(item.id == 12345); ASSERT_OR_FAIL(item.moved); ASSERT_OR_FAIL(!item.copied); ASSERT_OR_FAIL(!q.try_dequeue(item)); } { ConcurrentQueue q; ProducerToken t(q); ASSERT_OR_FAIL(q.enqueue(t, Copyable(12345))); Copyable item(0); ASSERT_OR_FAIL(q.try_dequeue(item)); ASSERT_OR_FAIL(item.id == 12345); ASSERT_OR_FAIL(item.copied); ASSERT_OR_FAIL(!q.try_dequeue(item)); } // try_enqueue(T const&) { ConcurrentQueue q; Copyable original(12345); ASSERT_OR_FAIL(q.try_enqueue(original)); Copyable item(0); ASSERT_OR_FAIL(q.try_dequeue(item)); ASSERT_OR_FAIL(item.id == 12345); ASSERT_OR_FAIL(item.copied); ASSERT_OR_FAIL(!q.try_dequeue(item)); } // try_enqueue(T&&) { ConcurrentQueue q; ASSERT_OR_FAIL(q.try_enqueue(Moveable(12345))); Moveable item(0); ASSERT_OR_FAIL(q.try_dequeue(item)); ASSERT_OR_FAIL(item.id == 12345); ASSERT_OR_FAIL(item.moved); ASSERT_OR_FAIL(!item.copied); ASSERT_OR_FAIL(!q.try_dequeue(item)); } { ConcurrentQueue q; Moveable original(12345); ASSERT_OR_FAIL(q.try_enqueue(std::move(original))); Moveable item(0); ASSERT_OR_FAIL(q.try_dequeue(item)); ASSERT_OR_FAIL(item.id == 12345); ASSERT_OR_FAIL(item.moved); ASSERT_OR_FAIL(!item.copied); ASSERT_OR_FAIL(!q.try_dequeue(item)); } { ConcurrentQueue q; ASSERT_OR_FAIL(q.try_enqueue(Copyable(12345))); Copyable item(0); ASSERT_OR_FAIL(q.try_dequeue(item)); ASSERT_OR_FAIL(item.id == 12345); ASSERT_OR_FAIL(item.copied); ASSERT_OR_FAIL(!q.try_dequeue(item)); } // try_enqueue(Token, T const&) { ConcurrentQueue q; ProducerToken t(q); Copyable original(12345); ASSERT_OR_FAIL(q.try_enqueue(t, original)); Copyable item(0); ASSERT_OR_FAIL(q.try_dequeue(item)); ASSERT_OR_FAIL(item.id == 12345); ASSERT_OR_FAIL(item.copied); ASSERT_OR_FAIL(!q.try_dequeue(item)); } // try_enqueue(Token, T&&) { ConcurrentQueue q; ProducerToken t(q); ASSERT_OR_FAIL(q.try_enqueue(t, Moveable(12345))); Moveable item(0); ASSERT_OR_FAIL(q.try_dequeue(item)); ASSERT_OR_FAIL(item.id == 12345); ASSERT_OR_FAIL(item.moved); ASSERT_OR_FAIL(!item.copied); ASSERT_OR_FAIL(!q.try_dequeue(item)); } { ConcurrentQueue q; ProducerToken t(q); Moveable original(12345); ASSERT_OR_FAIL(q.try_enqueue(t, std::move(original))); Moveable item(0); ASSERT_OR_FAIL(q.try_dequeue(item)); ASSERT_OR_FAIL(item.id == 12345); ASSERT_OR_FAIL(item.moved); ASSERT_OR_FAIL(!item.copied); ASSERT_OR_FAIL(!q.try_dequeue(item)); } { ConcurrentQueue q; ProducerToken t(q); ASSERT_OR_FAIL(q.try_enqueue(t, Copyable(12345))); Copyable item(0); ASSERT_OR_FAIL(q.try_dequeue(item)); ASSERT_OR_FAIL(item.id == 12345); ASSERT_OR_FAIL(item.copied); ASSERT_OR_FAIL(!q.try_dequeue(item)); } // enqueue_bulk(It itemFirst, size_t count) { ConcurrentQueue q; Copyable original(12345); ASSERT_OR_FAIL(q.enqueue_bulk(&original, 1)); Copyable item(0); ASSERT_OR_FAIL(q.try_dequeue(item)); ASSERT_OR_FAIL(item.id == 12345); ASSERT_OR_FAIL(item.copied); ASSERT_OR_FAIL(!q.try_dequeue(item)); } { ConcurrentQueue q; Moveable original(12345); ASSERT_OR_FAIL(q.enqueue_bulk(std::make_move_iterator(&original), 1)); Moveable item(0); ASSERT_OR_FAIL(q.try_dequeue(item)); ASSERT_OR_FAIL(item.id == 12345); ASSERT_OR_FAIL(item.moved); ASSERT_OR_FAIL(!item.copied); ASSERT_OR_FAIL(!q.try_dequeue(item)); } // enqueue_bulk(Token, It itemFirst, size_t count) { ConcurrentQueue q; ProducerToken t(q); Copyable original(12345); ASSERT_OR_FAIL(q.enqueue_bulk(t, &original, 1)); Copyable item(0); ASSERT_OR_FAIL(q.try_dequeue(item)); ASSERT_OR_FAIL(item.id == 12345); ASSERT_OR_FAIL(item.copied); ASSERT_OR_FAIL(!q.try_dequeue(item)); } { ConcurrentQueue q; ProducerToken t(q); Moveable original(12345); ASSERT_OR_FAIL(q.enqueue_bulk(t, std::make_move_iterator(&original), 1)); Moveable item(0); ASSERT_OR_FAIL(q.try_dequeue(item)); ASSERT_OR_FAIL(item.id == 12345); ASSERT_OR_FAIL(item.moved); ASSERT_OR_FAIL(!item.copied); ASSERT_OR_FAIL(!q.try_dequeue(item)); } // try_enqueue_bulk(It itemFirst, size_t count) { ConcurrentQueue q; Copyable original(12345); ASSERT_OR_FAIL(q.try_enqueue_bulk(&original, 1)); Copyable item(0); ASSERT_OR_FAIL(q.try_dequeue(item)); ASSERT_OR_FAIL(item.id == 12345); ASSERT_OR_FAIL(item.copied); ASSERT_OR_FAIL(!q.try_dequeue(item)); } { ConcurrentQueue q; Moveable original(12345); ASSERT_OR_FAIL(q.try_enqueue_bulk(std::make_move_iterator(&original), 1)); Moveable item(0); ASSERT_OR_FAIL(q.try_dequeue(item)); ASSERT_OR_FAIL(item.id == 12345); ASSERT_OR_FAIL(item.moved); ASSERT_OR_FAIL(!item.copied); ASSERT_OR_FAIL(!q.try_dequeue(item)); } // try_enqueue_bulk(Token, It itemFirst, size_t count) { ConcurrentQueue q; ProducerToken t(q); Copyable original(12345); ASSERT_OR_FAIL(q.try_enqueue_bulk(t, &original, 1)); Copyable item(0); ASSERT_OR_FAIL(q.try_dequeue(item)); ASSERT_OR_FAIL(item.id == 12345); ASSERT_OR_FAIL(item.copied); ASSERT_OR_FAIL(!q.try_dequeue(item)); } { ConcurrentQueue q; ProducerToken t(q); Moveable original(12345); ASSERT_OR_FAIL(q.try_enqueue_bulk(t, std::make_move_iterator(&original), 1)); Moveable item(0); ASSERT_OR_FAIL(q.try_dequeue(item)); ASSERT_OR_FAIL(item.id == 12345); ASSERT_OR_FAIL(item.moved); ASSERT_OR_FAIL(!item.copied); ASSERT_OR_FAIL(!q.try_dequeue(item)); } // try_dequeue(T&) { ConcurrentQueue q; ASSERT_OR_FAIL(q.enqueue(Copyable(12345))); Copyable item(0); ASSERT_OR_FAIL(q.try_dequeue(item)); ASSERT_OR_FAIL(item.id == 12345); ASSERT_OR_FAIL(item.copied); ASSERT_OR_FAIL(!q.try_dequeue(item)); } { ConcurrentQueue q; ASSERT_OR_FAIL(q.enqueue(Moveable(12345))); Moveable item(0); ASSERT_OR_FAIL(q.try_dequeue(item)); ASSERT_OR_FAIL(item.id == 12345); ASSERT_OR_FAIL(item.moved); ASSERT_OR_FAIL(!item.copied); ASSERT_OR_FAIL(!q.try_dequeue(item)); } // try_dequeue(Token, T&) { ConcurrentQueue q; ASSERT_OR_FAIL(q.enqueue(Copyable(12345))); Copyable item(0); ConsumerToken t(q); ASSERT_OR_FAIL(q.try_dequeue(t, item)); ASSERT_OR_FAIL(item.id == 12345); ASSERT_OR_FAIL(item.copied); ASSERT_OR_FAIL(!q.try_dequeue(t, item)); ASSERT_OR_FAIL(!q.try_dequeue(item)); } { ConcurrentQueue q; ASSERT_OR_FAIL(q.enqueue(Moveable(12345))); Moveable item(0); ConsumerToken t(q); ASSERT_OR_FAIL(q.try_dequeue(t, item)); ASSERT_OR_FAIL(item.id == 12345); ASSERT_OR_FAIL(item.moved); ASSERT_OR_FAIL(!item.copied); ASSERT_OR_FAIL(!q.try_dequeue(t, item)); ASSERT_OR_FAIL(!q.try_dequeue(item)); } // try_dequeue_from_producer(Token, T&) { ConcurrentQueue q; ProducerToken t(q); ASSERT_OR_FAIL(q.enqueue(t, Copyable(12345))); Copyable item(0); ASSERT_OR_FAIL(q.try_dequeue_from_producer(t, item)); ASSERT_OR_FAIL(item.id == 12345); ASSERT_OR_FAIL(item.copied); ASSERT_OR_FAIL(!q.try_dequeue_from_producer(t, item)); ASSERT_OR_FAIL(!q.try_dequeue(item)); } { ConcurrentQueue q; ProducerToken t(q); ASSERT_OR_FAIL(q.enqueue(t, Moveable(12345))); Moveable item(0); ASSERT_OR_FAIL(q.try_dequeue_from_producer(t, item)); ASSERT_OR_FAIL(item.id == 12345); ASSERT_OR_FAIL(item.moved); ASSERT_OR_FAIL(!item.copied); ASSERT_OR_FAIL(!q.try_dequeue_from_producer(t, item)); ASSERT_OR_FAIL(!q.try_dequeue(item)); } // try_dequeue_bulk(T&) { ConcurrentQueue q; ASSERT_OR_FAIL(q.enqueue(Copyable(12345))); Copyable item(0); ASSERT_OR_FAIL(q.try_dequeue_bulk(&item, 1) == 1); ASSERT_OR_FAIL(item.id == 12345); ASSERT_OR_FAIL(item.copied); ASSERT_OR_FAIL(!q.try_dequeue_bulk(&item, 1)); } { ConcurrentQueue q; ASSERT_OR_FAIL(q.enqueue(Moveable(12345))); Moveable item(0); ASSERT_OR_FAIL(q.try_dequeue_bulk(&item, 1) == 1); ASSERT_OR_FAIL(item.id == 12345); ASSERT_OR_FAIL(item.moved); ASSERT_OR_FAIL(!item.copied); ASSERT_OR_FAIL(!q.try_dequeue_bulk(&item, 1)); } // try_dequeue_bulk(Token, T&) { ConcurrentQueue q; ASSERT_OR_FAIL(q.enqueue(Copyable(12345))); Copyable item(0); ConsumerToken t(q); ASSERT_OR_FAIL(q.try_dequeue_bulk(t, &item, 1)); ASSERT_OR_FAIL(item.id == 12345); ASSERT_OR_FAIL(item.copied); ASSERT_OR_FAIL(!q.try_dequeue_bulk(t, &item, 1)); ASSERT_OR_FAIL(!q.try_dequeue_bulk(&item, 1)); } { ConcurrentQueue q; ASSERT_OR_FAIL(q.enqueue(Moveable(12345))); Moveable item(0); ConsumerToken t(q); ASSERT_OR_FAIL(q.try_dequeue_bulk(t, &item, 1)); ASSERT_OR_FAIL(item.id == 12345); ASSERT_OR_FAIL(item.moved); ASSERT_OR_FAIL(!item.copied); ASSERT_OR_FAIL(!q.try_dequeue_bulk(t, &item, 1)); ASSERT_OR_FAIL(!q.try_dequeue_bulk(&item, 1)); } // try_dequeue_bulk_from_producer(Token, T&) { ConcurrentQueue q; ProducerToken t(q); ASSERT_OR_FAIL(q.enqueue(t, Copyable(12345))); Copyable item(0); ASSERT_OR_FAIL(q.try_dequeue_bulk_from_producer(t, &item, 1)); ASSERT_OR_FAIL(item.id == 12345); ASSERT_OR_FAIL(item.copied); ASSERT_OR_FAIL(!q.try_dequeue_bulk_from_producer(t, &item, 1)); ASSERT_OR_FAIL(!q.try_dequeue(item)); } { ConcurrentQueue q; ProducerToken t(q); ASSERT_OR_FAIL(q.enqueue(t, Moveable(12345))); Moveable item(0); ASSERT_OR_FAIL(q.try_dequeue_bulk_from_producer(t, &item, 1)); ASSERT_OR_FAIL(item.id == 12345); ASSERT_OR_FAIL(item.moved); ASSERT_OR_FAIL(!item.copied); ASSERT_OR_FAIL(!q.try_dequeue_bulk_from_producer(t, &item, 1)); ASSERT_OR_FAIL(!q.try_dequeue(item)); } // size_approx() { ConcurrentQueue q; for (int i = 0; i != 1234; ++i) { q.enqueue(Foo()); } ASSERT_OR_FAIL(q.size_approx() == 1234); } // is_lock_free() { constexpr bool lockFree = ConcurrentQueue::is_lock_free(); #if defined(__amd64__) || defined(_M_X64) || defined(__x86_64__) || defined(_M_IX86) || defined(__i386__) || defined(_M_PPC) || defined(__powerpc__) static_assert(lockFree, "is_lock_free should be true"); #else (void)lockFree; #endif } // moving { ConcurrentQueue q(4); ProducerToken t(q); for (int i = 0; i != 1233; ++i) { q.enqueue(i); } for (int i = 1234; i != 5678; ++i) { q.enqueue(t, i); } ASSERT_OR_FAIL(q.size_approx() == 5677); ConcurrentQueue q2(std::move(q)); ASSERT_OR_FAIL(q.size_approx() == 0); ASSERT_OR_FAIL(q2.size_approx() == 5677); q2.enqueue(t, 5678); q2.enqueue(1233); ASSERT_OR_FAIL(q2.size_approx() == 5679); for (int i = 1234; i != 0; --i) { q.enqueue(i); } ASSERT_OR_FAIL(q.size_approx() == 1234); int item; for (int i = 0; i <= 5678; ++i) { ASSERT_OR_FAIL(q2.try_dequeue_non_interleaved(item)); ASSERT_OR_FAIL(item == i); } ASSERT_OR_FAIL(!q2.try_dequeue_non_interleaved(item)); ASSERT_OR_FAIL(q2.size_approx() == 0); for (int i = 1234; i != 0; --i) { ASSERT_OR_FAIL(q.try_dequeue_non_interleaved(item)); ASSERT_OR_FAIL(item == i); } ASSERT_OR_FAIL(!q.try_dequeue_non_interleaved(item)); ASSERT_OR_FAIL(q.size_approx() == 0); } // swapping { ConcurrentQueue q1, q2, q3; ProducerToken t1(q1), t2(q2), t3(q3); for (int i = 1234; i != 5678; ++i) { q1.enqueue(t1, i); } for (int i = 21234; i != 25678; ++i) { q2.enqueue(t2, i); } for (int i = 31234; i != 35678; ++i) { q3.enqueue(t3, i); } for (int i = 0; i != 1234; ++i) { q1.enqueue(i); } for (int i = 20000; i != 21234; ++i) { q2.enqueue(i); } for (int i = 30000; i != 31234; ++i) { q3.enqueue(i); } { ConcurrentQueue temp; temp = std::move(q1); q1 = std::move(q2); q2 = std::move(temp); } // q1 in q2, q2 in q1 swap(q2, q3); // q1 in q3, q3 in q2 q1.swap(q2); // q2 in q2, q3 in q1 q1.swap(q2); // q3 in q2, q2 in q1 q1.swap(q2); // q2 in q2, q3 in q1 q2.swap(q3); // q1 in q2, q2 in q3 // So now q1 is in q2, q2 is in q3, and q3 is in q1 int item; for (int i = 30000; i != 35678; ++i) { ASSERT_OR_FAIL(q1.try_dequeue_non_interleaved(item)); ASSERT_OR_FAIL(item == i); } ASSERT_OR_FAIL(!q1.try_dequeue_non_interleaved(item)); ASSERT_OR_FAIL(q1.size_approx() == 0); for (int i = 0; i != 5678; ++i) { ASSERT_OR_FAIL(q2.try_dequeue_non_interleaved(item)); ASSERT_OR_FAIL(item == i); } ASSERT_OR_FAIL(!q2.try_dequeue_non_interleaved(item)); ASSERT_OR_FAIL(q2.size_approx() == 0); for (int i = 20000; i != 25678; ++i) { ASSERT_OR_FAIL(q3.try_dequeue_non_interleaved(item)); ASSERT_OR_FAIL(item == i); } ASSERT_OR_FAIL(!q3.try_dequeue_non_interleaved(item)); ASSERT_OR_FAIL(q3.size_approx() == 0); } return true; } bool blocking_wrappers() { typedef BlockingConcurrentQueue Q; ASSERT_OR_FAIL((Q::is_lock_free() == ConcurrentQueue::is_lock_free())); // Moving { Q a, b, c; a = std::move(b); b = std::move(c); a = std::move(a); c = std::move(b); b = Q(std::move(b)); using std::swap; swap(a, b); a.swap(c); c.swap(c); } // Implicit { Q q; ASSERT_OR_FAIL(q.enqueue(1)); ASSERT_OR_FAIL(q.size_approx() == 1); int item; ASSERT_OR_FAIL(q.try_dequeue(item)); ASSERT_OR_FAIL(item == 1); ASSERT_OR_FAIL(!q.try_dequeue(item)); ASSERT_OR_FAIL(q.size_approx() == 0); ASSERT_OR_FAIL(q.enqueue(2)); ASSERT_OR_FAIL(q.enqueue(3)); ASSERT_OR_FAIL(q.size_approx() == 2); q.wait_dequeue(item); ASSERT_OR_FAIL(item == 2); ASSERT_OR_FAIL(q.size_approx() == 1); q.wait_dequeue(item); ASSERT_OR_FAIL(item == 3); ASSERT_OR_FAIL(!q.try_dequeue(item)); ASSERT_OR_FAIL(q.size_approx() == 0); } // Implicit threaded { Q q; const int THREADS = 8; SimpleThread threads[THREADS]; bool success[THREADS]; for (int i = 0; i != THREADS; ++i) { success[i] = true; if (i % 2 == 0) { // Enqueue if (i % 4 == 0) { threads[i] = SimpleThread([&](int j) { int stuff[5]; for (int k = 0; k != 2048; ++k) { for (int x = 0; x != 5; ++x) { stuff[x] = (j << 16) | (k * 5 + x); } success[j] = q.enqueue_bulk(stuff, 5) && success[j]; } }, i); } else { threads[i] = SimpleThread([&](int j) { for (int k = 0; k != 4096; ++k) { success[j] = q.enqueue((j << 16) | k) && success[j]; } }, i); } } else { // Dequeue threads[i] = SimpleThread([&](int j) { int item; std::vector prevItems(THREADS, -1); if (j % 4 == 1) { for (int k = 0; k != 2048 * 5; ++k) { if (q.try_dequeue(item)) { int thread = item >> 16; item &= 0xffff; if (item <= prevItems[thread]) { success[j] = false; } prevItems[thread] = item; } } } else { int items[6]; for (int k = 0; k < 4096; ++k) { if (std::size_t dequeued = q.try_dequeue_bulk(items, 6)) { for (std::size_t x = 0; x != dequeued; ++x) { item = items[x]; int thread = item >> 16; item &= 0xffff; if (item <= prevItems[thread]) { success[j] = false; } prevItems[thread] = item; } } } } }, i); } } for (int i = 0; i != THREADS; ++i) { threads[i].join(); } for (int i = 0; i != THREADS; ++i) { ASSERT_OR_FAIL(success[i]); } } // Implicit threaded, blocking { Q q; const int THREADS = 8; SimpleThread threads[THREADS]; bool success[THREADS]; for (int i = 0; i != THREADS; ++i) { success[i] = true; if (i % 2 == 0) { // Enqueue if (i % 4 == 0) { threads[i] = SimpleThread([&](int j) { int stuff[5]; for (int k = 0; k != 2048; ++k) { for (int x = 0; x != 5; ++x) { stuff[x] = (j << 16) | (k * 5 + x); } success[j] = q.enqueue_bulk(stuff, 5) && success[j]; } }, i); } else { threads[i] = SimpleThread([&](int j) { for (int k = 0; k != 4096; ++k) { success[j] = q.enqueue((j << 16) | k) && success[j]; } }, i); } } else { // Dequeue threads[i] = SimpleThread([&](int j) { int item; std::vector prevItems(THREADS, -1); if (j % 4 == 1) { for (int k = 0; k != 2048 * 5; ++k) { q.wait_dequeue(item); int thread = item >> 16; item &= 0xffff; if (item <= prevItems[thread]) { success[j] = false; } prevItems[thread] = item; } } else { int items[6]; int k; for (k = 0; k < 4090; ) { if (std::size_t dequeued = q.wait_dequeue_bulk(items, 6)) { for (std::size_t x = 0; x != dequeued; ++x) { item = items[x]; int thread = item >> 16; item &= 0xffff; if (item <= prevItems[thread]) { success[j] = false; } prevItems[thread] = item; } k += (int)dequeued; } else { success[j] = false; } } for (; k != 4096; ++k) { q.wait_dequeue(item); int thread = item >> 16; item &= 0xffff; if (item <= prevItems[thread]) { success[j] = false; } prevItems[thread] = item; } } }, i); } } for (int i = 0; i != THREADS; ++i) { threads[i].join(); } for (int i = 0; i != THREADS; ++i) { ASSERT_OR_FAIL(success[i]); } ASSERT_OR_FAIL(q.size_approx() == 0); } // Explicit { Q q; ProducerToken pt(q); ASSERT_OR_FAIL(q.enqueue(pt, 1)); ASSERT_OR_FAIL(q.size_approx() == 1); int item; ConsumerToken ct(q); ASSERT_OR_FAIL(q.try_dequeue(ct, item)); ASSERT_OR_FAIL(item == 1); ASSERT_OR_FAIL(!q.try_dequeue(ct, item)); ASSERT_OR_FAIL(q.size_approx() == 0); ASSERT_OR_FAIL(q.enqueue(pt, 2)); ASSERT_OR_FAIL(q.enqueue(pt, 3)); ASSERT_OR_FAIL(q.size_approx() == 2); q.wait_dequeue(ct, item); ASSERT_OR_FAIL(item == 2); ASSERT_OR_FAIL(q.size_approx() == 1); q.wait_dequeue(ct, item); ASSERT_OR_FAIL(item == 3); ASSERT_OR_FAIL(!q.try_dequeue(ct, item)); ASSERT_OR_FAIL(q.size_approx() == 0); } // Explicit threaded { Q q; const int THREADS = 8; SimpleThread threads[THREADS]; bool success[THREADS]; for (int i = 0; i != THREADS; ++i) { success[i] = true; if (i % 2 == 0) { // Enqueue if (i % 4 == 0) { threads[i] = SimpleThread([&](int j) { ProducerToken t(q); int stuff[5]; for (int k = 0; k != 2048; ++k) { for (int x = 0; x != 5; ++x) { stuff[x] = (j << 16) | (k * 5 + x); } success[j] = q.enqueue_bulk(t, stuff, 5) && success[j]; } }, i); } else { threads[i] = SimpleThread([&](int j) { ProducerToken t(q); for (int k = 0; k != 4096; ++k) { success[j] = q.enqueue(t, (j << 16) | k) && success[j]; } }, i); } } else { // Dequeue threads[i] = SimpleThread([&](int j) { ConsumerToken t(q); int item; std::vector prevItems(THREADS, -1); if (j % 4 == 1) { for (int k = 0; k != 2048 * 5; ++k) { if (q.try_dequeue(t, item)) { int thread = item >> 16; item &= 0xffff; if (item <= prevItems[thread]) { success[j] = false; } prevItems[thread] = item; } } } else { int items[6]; for (int k = 0; k < 4096; ++k) { if (std::size_t dequeued = q.try_dequeue_bulk(t, items, 6)) { for (std::size_t x = 0; x != dequeued; ++x) { item = items[x]; int thread = item >> 16; item &= 0xffff; if (item <= prevItems[thread]) { success[j] = false; } prevItems[thread] = item; } } } } }, i); } } for (int i = 0; i != THREADS; ++i) { threads[i].join(); } for (int i = 0; i != THREADS; ++i) { ASSERT_OR_FAIL(success[i]); } } // Explicit threaded, blocking { Q q; const int THREADS = 8; SimpleThread threads[THREADS]; bool success[THREADS]; for (int i = 0; i != THREADS; ++i) { success[i] = true; if (i % 2 == 0) { // Enqueue if (i % 4 == 0) { threads[i] = SimpleThread([&](int j) { ProducerToken t(q); int stuff[5]; for (int k = 0; k != 2048; ++k) { for (int x = 0; x != 5; ++x) { stuff[x] = (j << 16) | (k * 5 + x); } success[j] = q.enqueue_bulk(t, stuff, 5) && success[j]; } }, i); } else { threads[i] = SimpleThread([&](int j) { ProducerToken t(q); for (int k = 0; k != 4096; ++k) { success[j] = q.enqueue(t, (j << 16) | k) && success[j]; } }, i); } } else { // Dequeue threads[i] = SimpleThread([&](int j) { ConsumerToken t(q); int item; std::vector prevItems(THREADS, -1); if (j % 4 == 1) { for (int k = 0; k != 2048 * 5; ++k) { q.wait_dequeue(t, item); int thread = item >> 16; item &= 0xffff; if (item <= prevItems[thread]) { success[j] = false; } prevItems[thread] = item; } } else { int items[6]; int k; for (k = 0; k < 4090; ) { if (std::size_t dequeued = q.wait_dequeue_bulk(t, items, 6)) { for (std::size_t x = 0; x != dequeued; ++x) { item = items[x]; int thread = item >> 16; item &= 0xffff; if (item <= prevItems[thread]) { success[j] = false; } prevItems[thread] = item; } k += (int)dequeued; } else { success[j] = false; } } for (; k != 4096; ++k) { q.wait_dequeue(t, item); int thread = item >> 16; item &= 0xffff; if (item <= prevItems[thread]) { success[j] = false; } prevItems[thread] = item; } } }, i); } } for (int i = 0; i != THREADS; ++i) { threads[i].join(); } for (int i = 0; i != THREADS; ++i) { ASSERT_OR_FAIL(success[i]); } ASSERT_OR_FAIL(q.size_approx() == 0); } return true; } bool timed_blocking_wrappers() { typedef BlockingConcurrentQueue Q; // Implicit { Q q; int item; ASSERT_OR_FAIL(!q.wait_dequeue_timed(item, 0)); ASSERT_OR_FAIL(!q.wait_dequeue_timed(item, 1)); ASSERT_OR_FAIL(!q.wait_dequeue_timed(item, 100)); ASSERT_OR_FAIL(!q.wait_dequeue_timed(item, std::chrono::milliseconds(1))); q.enqueue(123); ASSERT_OR_FAIL(q.wait_dequeue_timed(item, 0)); ASSERT_OR_FAIL(item == 123); } // Implicit, threaded { Q q; const int THREADS = 8; SimpleThread threads[THREADS]; bool success[THREADS]; for (int i = 0; i != THREADS; ++i) { success[i] = true; if (i % 2 == 0) { // Enqueue if (i % 4 == 0) { threads[i] = SimpleThread([&](int j) { int stuff[5]; for (int k = 0; k != 2048; ++k) { for (int x = 0; x != 5; ++x) { stuff[x] = (j << 16) | (k * 5 + x); } success[j] = q.enqueue_bulk(stuff, 5) && success[j]; } }, i); } else { threads[i] = SimpleThread([&](int j) { for (int k = 0; k != 4096; ++k) { success[j] = q.enqueue((j << 16) | k) && success[j]; } }, i); } } else { // Dequeue threads[i] = SimpleThread([&](int j) { int item; std::vector prevItems(THREADS, -1); if (j % 4 == 1) { for (int k = 0; k != 2048 * 5; ++k) { if (!q.wait_dequeue_timed(item, 1000)) { --k; continue; } int thread = item >> 16; item &= 0xffff; if (item <= prevItems[thread]) { success[j] = false; } prevItems[thread] = item; } } else { int items[6]; int k; for (k = 0; k < 4090; ) { if (std::size_t dequeued = q.wait_dequeue_bulk_timed(items, 6, 1000)) { for (std::size_t x = 0; x != dequeued; ++x) { item = items[x]; int thread = item >> 16; item &= 0xffff; if (item <= prevItems[thread]) { success[j] = false; } prevItems[thread] = item; } k += (int)dequeued; } } for (; k != 4096; ++k) { if (!q.wait_dequeue_timed(item, std::chrono::hours(1))) { success[j] = false; } int thread = item >> 16; item &= 0xffff; if (item <= prevItems[thread]) { success[j] = false; } prevItems[thread] = item; } } }, i); } } for (int i = 0; i != THREADS; ++i) { threads[i].join(); } for (int i = 0; i != THREADS; ++i) { ASSERT_OR_FAIL(success[i]); } ASSERT_OR_FAIL(q.size_approx() == 0); int item; ASSERT_OR_FAIL(!q.wait_dequeue_timed(item, 0)); } // Explicit { Q q; ProducerToken ptok(q); ConsumerToken ctok(q); int item; ASSERT_OR_FAIL(!q.wait_dequeue_timed(ctok, item, 0)); ASSERT_OR_FAIL(!q.wait_dequeue_timed(ctok, item, 1)); ASSERT_OR_FAIL(!q.wait_dequeue_timed(ctok, item, 100)); ASSERT_OR_FAIL(!q.wait_dequeue_timed(ctok, item, std::chrono::milliseconds(1))); q.enqueue(ptok, 123); ASSERT_OR_FAIL(q.wait_dequeue_timed(ctok, item, 0)); ASSERT_OR_FAIL(item == 123); } // Explicit, threaded { Q q; const int THREADS = 8; SimpleThread threads[THREADS]; bool success[THREADS]; for (int i = 0; i != THREADS; ++i) { success[i] = true; if (i % 2 == 0) { // Enqueue if (i % 4 == 0) { threads[i] = SimpleThread([&](int j) { ProducerToken tok(q); int stuff[5]; for (int k = 0; k != 2048; ++k) { for (int x = 0; x != 5; ++x) { stuff[x] = (j << 16) | (k * 5 + x); } success[j] = q.enqueue_bulk(tok, stuff, 5) && success[j]; } }, i); } else { threads[i] = SimpleThread([&](int j) { ProducerToken tok(q); for (int k = 0; k != 4096; ++k) { success[j] = q.enqueue(tok, (j << 16) | k) && success[j]; } }, i); } } else { // Dequeue threads[i] = SimpleThread([&](int j) { int item; std::vector prevItems(THREADS, -1); ConsumerToken tok(q); if (j % 4 == 1) { for (int k = 0; k != 2048 * 5; ++k) { if (!q.wait_dequeue_timed(tok, item, 1000)) { --k; continue; } int thread = item >> 16; item &= 0xffff; if (item <= prevItems[thread]) { success[j] = false; } prevItems[thread] = item; } } else { int items[6]; int k; for (k = 0; k < 4090; ) { if (std::size_t dequeued = q.wait_dequeue_bulk_timed(tok, items, 6, 1000)) { for (std::size_t x = 0; x != dequeued; ++x) { item = items[x]; int thread = item >> 16; item &= 0xffff; if (item <= prevItems[thread]) { success[j] = false; } prevItems[thread] = item; } k += (int)dequeued; } } for (; k != 4096; ++k) { if (!q.wait_dequeue_timed(tok, item, std::chrono::hours(1))) { success[j] = false; } int thread = item >> 16; item &= 0xffff; if (item <= prevItems[thread]) { success[j] = false; } prevItems[thread] = item; } } }, i); } } for (int i = 0; i != THREADS; ++i) { threads[i].join(); } for (int i = 0; i != THREADS; ++i) { ASSERT_OR_FAIL(success[i]); } ASSERT_OR_FAIL(q.size_approx() == 0); int item; ConsumerToken tok(q); ASSERT_OR_FAIL(!q.wait_dequeue_timed(tok, item, 0)); } return true; } bool c_api_create() { MoodycamelCQHandle handle; int rc = moodycamel_cq_create(&handle); ASSERT_OR_FAIL(rc == 1); ASSERT_OR_FAIL(handle != nullptr); moodycamel_cq_destroy(handle); return true; } bool c_api_enqueue() { MoodycamelCQHandle handle; int rc = moodycamel_cq_create(&handle); int i = 10; rc = moodycamel_cq_enqueue(handle, &i); ASSERT_OR_FAIL(rc == 1); moodycamel_cq_destroy(handle); return true; } bool c_api_try_dequeue() { MoodycamelCQHandle handle; int rc = moodycamel_cq_create(&handle); { MoodycamelValue n; rc = moodycamel_cq_try_dequeue(handle, &n); ASSERT_OR_FAIL(rc == 0); } int i = 10; rc = moodycamel_cq_enqueue(handle, &i); { MoodycamelValue value; rc = moodycamel_cq_try_dequeue(handle, &value); int n = *reinterpret_cast(value); ASSERT_OR_FAIL(rc == 1); ASSERT_OR_FAIL(n == 10); } moodycamel_cq_destroy(handle); return true; } bool c_api_destroy() { MoodycamelCQHandle handle; moodycamel_cq_create(&handle); moodycamel_cq_destroy(handle); return true; } bool acquire_and_signal() { const unsigned TIMEOUT_US = 10 * 1000 * 1000; // 10s // Test resource acquisition from one other thread { LightweightSemaphore s; s.signal(); // Single resource available auto fnTestSingleAcquire = [&]() { for (std::size_t k = 0; k < 200000; ++k) { s.wait(TIMEOUT_US); s.signal(); } }; SimpleThread t1(fnTestSingleAcquire); SimpleThread t2(fnTestSingleAcquire); t1.join(); t2.join(); ASSERT_OR_FAIL(s.availableApprox() == 1); } // Test resource acquisition from multiple threads { const int THREADS = 4; const std::size_t ITERATIONS = 200000; SimpleThread threads[THREADS]; const std::size_t arrayItemsToWait[THREADS] = { 1, 2, 3, 7 }; LightweightSemaphore s; for (int i = 0; i != THREADS; ++i) s.signal(ITERATIONS * arrayItemsToWait[i]); for (int i = 0; i != THREADS; ++i) { threads[i] = SimpleThread([&](int tid) { for (std::size_t k = 0; k < ITERATIONS; ++k) s.waitMany(arrayItemsToWait[tid], TIMEOUT_US); }, i); } for (int i = 0; i != THREADS; ++i) threads[i].join(); ASSERT_OR_FAIL(s.availableApprox() == 0); } { const int THREADS = 5; const std::size_t ITERATIONS = 100000; SimpleThread threads[THREADS]; const std::size_t arrayItemsToWait[THREADS] = { 0, 1, 2, 3, 7 }; LightweightSemaphore s; for (int i = 0; i != THREADS; ++i) s.signal(ITERATIONS * arrayItemsToWait[i]); for (int i = 0; i != THREADS; ++i) { threads[i] = SimpleThread([&](int tid) { if (tid == 0) { for (std::size_t k = 0; k < ITERATIONS * (THREADS - 1); ++k) s.wait(TIMEOUT_US); } else { for (std::size_t k = 0; k < ITERATIONS; ++k) { s.signal(); s.waitMany(arrayItemsToWait[tid], TIMEOUT_US); } } }, i); } for (int i = 0; i != THREADS; ++i) threads[i].join(); ASSERT_OR_FAIL(s.availableApprox() == 0); } LightweightSemaphore s; ASSERT_OR_FAIL(s.availableApprox() == 0); s.signal(); ASSERT_OR_FAIL(s.availableApprox() == 1); s.signal(); ASSERT_OR_FAIL(s.availableApprox() == 2); s.signal(10); ASSERT_OR_FAIL(s.availableApprox() == 12); s.signal(10); ASSERT_OR_FAIL(s.availableApprox() == 22); ASSERT_OR_FAIL(s.wait()); ASSERT_OR_FAIL(s.availableApprox() == 21); ASSERT_OR_FAIL(s.wait()); ASSERT_OR_FAIL(s.availableApprox() == 20); ASSERT_OR_FAIL(s.waitMany(10) == 10); ASSERT_OR_FAIL(s.availableApprox() == 10); ASSERT_OR_FAIL(s.waitMany(11) == 10); ASSERT_OR_FAIL(s.availableApprox() == 0); return true; } bool try_acquire_and_signal() { LightweightSemaphore s; ASSERT_OR_FAIL(s.availableApprox() == 0); s.signal(); ASSERT_OR_FAIL(s.availableApprox() == 1); ASSERT_OR_FAIL(s.tryWaitMany(2) == 1); ASSERT_OR_FAIL(s.availableApprox() == 0); s.signal(); ASSERT_OR_FAIL(s.availableApprox() == 1); ASSERT_OR_FAIL(s.tryWaitMany(3) == 1); ASSERT_OR_FAIL(s.availableApprox() == 0); s.signal(10); ASSERT_OR_FAIL(s.availableApprox() == 10); ASSERT_OR_FAIL(s.tryWaitMany(100) == 10); ASSERT_OR_FAIL(s.availableApprox() == 0); s.signal(10); ASSERT_OR_FAIL(s.availableApprox() == 10); ASSERT_OR_FAIL(s.tryWaitMany(5) == 5); ASSERT_OR_FAIL(s.availableApprox() == 5); ASSERT_OR_FAIL(s.tryWait()); ASSERT_OR_FAIL(s.availableApprox() == 4); ASSERT_OR_FAIL(s.tryWait()); ASSERT_OR_FAIL(s.availableApprox() == 3); return true; } struct TestListItem : corealgos::ListItem { int value; TestListItem() : value(0) { ctorCount().fetch_add(1, std::memory_order_relaxed); } explicit TestListItem(int value) : value(value) { ctorCount().fetch_add(1, std::memory_order_relaxed); } ~TestListItem() { dtorCount().fetch_add(1, std::memory_order_relaxed); } inline TestListItem* prev(std::memory_order order = std::memory_order_relaxed) const { return static_cast(concurrentListPrev.load(order)); } inline static void reset() { ctorCount().store(0, std::memory_order_relaxed); dtorCount().store(0, std::memory_order_relaxed); } inline static size_t constructed() { return ctorCount().load(std::memory_order_relaxed); } inline static size_t destructed() { return dtorCount().load(std::memory_order_relaxed); } private: inline static std::atomic& ctorCount() { static std::atomic count(0); return count; } inline static std::atomic& dtorCount() { static std::atomic count(0); return count; } }; bool core_add_only_list() { auto destroyList = [](corealgos::ConcurrentAddOnlyList& list) { size_t count = 0; auto tail = list.tail(); while (tail != nullptr) { auto next = tail->prev(); delete tail; ++count; tail = next; } return count; }; { corealgos::ConcurrentAddOnlyList list; ASSERT_OR_FAIL(list.tail() == nullptr); ASSERT_OR_FAIL(destroyList(list) == 0); } { corealgos::ConcurrentAddOnlyList list; for (int i = 0; i != 1000; ++i) { list.add(new TestListItem(i)); } int i = 999; for (auto tail = list.tail(); tail != nullptr; tail = tail->prev()) { ASSERT_OR_FAIL(i == tail->value); --i; } ASSERT_OR_FAIL(i == -1); ASSERT_OR_FAIL(destroyList(list) == 1000); } for (int repeats = 0; repeats != 10; ++repeats) { corealgos::ConcurrentAddOnlyList list; std::vector threads(8); for (size_t tid = 0; tid != threads.size(); ++tid) { threads[tid] = SimpleThread([&](size_t tid) { for (int i = 0; i != 1000; ++i) { list.add(new TestListItem((int)((tid << 16) | i))); } }, tid); } for (size_t tid = 0; tid != threads.size(); ++tid) { threads[tid].join(); } std::vector prevItems(threads.size()); for (size_t i = 0; i != prevItems.size(); ++i) { prevItems[i] = 1000; } for (auto tail = list.tail(); tail != nullptr; tail = tail->prev()) { auto tid = tail->value >> 16; auto i = tail->value & ((1 << 16) - 1); ASSERT_OR_FAIL(prevItems[tid] == i + 1); prevItems[tid] = i; } ASSERT_OR_FAIL(destroyList(list) == 1000 * threads.size()); } return true; } bool core_thread_local() { TestListItem::reset(); { corealgos::ThreadLocal local(4); } ASSERT_OR_FAIL(TestListItem::constructed() == 0); ASSERT_OR_FAIL(TestListItem::destructed() == 0); TestListItem::reset(); { corealgos::ThreadLocal local(4); local.get_or_create(); } ASSERT_OR_FAIL(TestListItem::constructed() == 1); ASSERT_OR_FAIL(TestListItem::destructed() == 1); TestListItem::reset(); { corealgos::ThreadLocal local(4); auto item = local.get_or_create(); item->value = 7; item = local.get_or_create(); ASSERT_OR_FAIL(item->value == 7); } ASSERT_OR_FAIL(TestListItem::constructed() == 1); ASSERT_OR_FAIL(TestListItem::destructed() == 1); for (size_t initialSize = 1; initialSize <= 4; initialSize <<= 1) { for (int reps = 0; reps != 20; ++reps) { TestListItem::reset(); { corealgos::ThreadLocal local(initialSize); std::vector threads(5 * initialSize); std::vector failed(threads.size()); std::atomic done(0); for (size_t tid = 0; tid != threads.size(); ++tid) { threads[tid] = SimpleThread([&](size_t tid) { failed[tid] = false; auto item = local.get_or_create(); item->value = (int)tid; for (int i = 0; i != 1024; ++i) { item = local.get_or_create(); if (item->value != (int)tid) { failed[tid] = true; } } done.fetch_add(1, std::memory_order_seq_cst); while (done.load(std::memory_order_relaxed) != threads.size()) { moodycamel::sleep(1); } }, tid); } for (size_t tid = 0; tid != threads.size(); ++tid) { threads[tid].join(); ASSERT_OR_FAIL(!failed[tid]); } ASSERT_OR_FAIL(TestListItem::constructed() == 5 * initialSize); } ASSERT_OR_FAIL(TestListItem::destructed() == 5 * initialSize); } } return true; } struct TestNode : corealgos::FreeListNode { int value; TestNode() { } explicit TestNode(int value) : value(value) { } }; bool core_free_list() { { // Basic corealgos::FreeList freeList; ASSERT_OR_FAIL(freeList.try_get() == nullptr); freeList.add(new TestNode(7)); TestNode* node = freeList.try_get(); ASSERT_OR_FAIL(node != nullptr); ASSERT_OR_FAIL(node->value == 7); ASSERT_OR_FAIL(freeList.try_get() == nullptr); freeList.add(node); node = freeList.try_get(); ASSERT_OR_FAIL(node != nullptr); ASSERT_OR_FAIL(node->value == 7); ASSERT_OR_FAIL(freeList.try_get() == nullptr); delete node; } { // Multi-threaded. Tests ABA too. for (int rep = 0; rep != 10; ++rep) { corealgos::FreeList freeList; std::vector threads(rep < 8 ? 4 : 16); std::vector failed(threads.size()); std::vector initialNodes(threads.size()); const int OP_COUNT = 2048; for (size_t tid = 0; tid != threads.size(); ++tid) { threads[tid] = SimpleThread([&](size_t tid) { std::vector seenValues(threads.size() * OP_COUNT, false); failed[tid] = false; TestNode* node = &initialNodes[tid]; node->value = ((int)tid << 20) | 1; freeList.add(node); for (int i = 1; i != OP_COUNT - 1; ++i) { node = freeList.try_get(); if (node != nullptr) { auto seen = seenValues.begin() + ((node->value >> 20) * OP_COUNT + (node->value & 0xFFFFF)); if (*seen) { failed[tid] = true; } *seen = true; node->value = ((int)tid << 20) | (i + 1); freeList.add(node); } } }, tid); } for (size_t tid = 0; tid != threads.size(); ++tid) { threads[tid].join(); ASSERT_OR_FAIL(!failed[tid]); } for (size_t tid = 0; tid != threads.size(); ++tid) { auto node = freeList.try_get(); ASSERT_OR_FAIL(node != nullptr); ASSERT_OR_FAIL(node->value != -1); node->value = -1; } auto node = freeList.try_get(); ASSERT_OR_FAIL(node == nullptr); } } return true; } bool core_spmc_hash() { { for (int rep = 0; rep != 20; ++rep) { corealgos::SPMCSequentialHashMap hash(rep < 10 ? 2 : 4); std::vector threads(rep < 12 ? 4 : 16); std::vector failed(threads.size()); const int MAX_ENTRIES = 4096; std::vector values(MAX_ENTRIES); std::array, MAX_ENTRIES> useCounts; std::array, MAX_ENTRIES> removed; for (std::size_t i = 0; i != useCounts.size(); ++i) { useCounts[i].store(0, std::memory_order_relaxed); removed[i].store(false, std::memory_order_relaxed); } for (size_t tid = 0; tid != threads.size(); ++tid) { threads[tid] = SimpleThread([&](size_t tid) { failed[tid] = false; if (tid == 0) { // Producer thread for (int i = 0; i != MAX_ENTRIES; ++i) { values[i] = i; hash.insert(i, &values[i]); useCounts[i].store((int)threads.size() / 2, std::memory_order_release); } } else { // One of the consumer threads for (int i = MAX_ENTRIES * 2; i != 0; --i) { // Purposefully off-by-lots int useCount = -1; if (i < MAX_ENTRIES) { useCount = useCounts[i].fetch_add(-1, std::memory_order_acquire); } int* val; if (useCount > 0) { val = hash.find(i); bool isRemoved = removed[i].load(std::memory_order_relaxed); assert(val == nullptr || *val == *val); // Find segfaults // We read the use count again; if it's still > 0, the item must have been in // the hash during the entire call to find(), so we can check its value auto currentUseCount = useCounts[i].fetch_add(0, std::memory_order_release); if ((currentUseCount > 0 || (currentUseCount == 0 && useCount == 1)) && (val == nullptr || *val != i || isRemoved)) { failed[tid] = true; } } if (useCount == 1) { val = hash.remove(i); if (val == nullptr || *val != i || removed[i].load(std::memory_order_relaxed)) { failed[tid] = true; } removed[i].store(true, std::memory_order_release); } } } }, tid); } for (size_t tid = 0; tid != threads.size(); ++tid) { threads[tid].join(); ASSERT_OR_FAIL(!failed[tid]); } for (int i = 0; i != MAX_ENTRIES; ++i) { auto val = hash.find(i); if (val != nullptr) { ASSERT_OR_FAIL(&values[i] == val && *val == i && !removed[i].load(std::memory_order_relaxed)); } else { ASSERT_OR_FAIL(removed[i].load(std::memory_order_relaxed)); } auto removedVal = hash.remove(i); ASSERT_OR_FAIL(removedVal == val); } for (int i = 0; i != MAX_ENTRIES; ++i) { ASSERT_OR_FAIL(hash.find(i) == nullptr); ASSERT_OR_FAIL(hash.remove(i) == nullptr); } ASSERT_OR_FAIL(hash.find(MAX_ENTRIES) == nullptr); ASSERT_OR_FAIL(hash.remove(MAX_ENTRIES) == nullptr); } } return true; } bool explicit_strings_threaded() { std::vector threads(8); ConcurrentQueue q(1024 * 1024); for (size_t tid = 0; tid != threads.size(); ++tid) { threads[tid] = SimpleThread([&](size_t tid) { const size_t ITERATIONS = 100 * 1024; if (tid % 2 == 0) { // Produce ProducerToken t(q); for (size_t i = 0; i != ITERATIONS; ++i) { q.enqueue(t, std::string("banana", i % 6)); } } else { // Consume std::string item; for (size_t i = 0; i != ITERATIONS / 2; ++i) { q.try_dequeue(item); } } }, tid); } for (size_t tid = 0; tid != threads.size(); ++tid) { threads[tid].join(); } return true; } bool large_traits() { union Elem { uint32_t x; char dummy[156]; }; ConcurrentQueue q(10000, 0, 48); std::vector threads(48); for (size_t tid = 0; tid != threads.size(); ++tid) { threads[tid] = SimpleThread([&](size_t tid) { const size_t ELEMENTS = 5000; if (tid != 0) { // Produce for (uint32_t i = 0; i != ELEMENTS; ++i) q.try_enqueue(Elem { ((uint32_t)tid << 16) | i }); } else { // Consume Elem item[256]; for (size_t i = 0; i != ELEMENTS * 200; ++i) q.try_dequeue_bulk(item, sizeof(item) / sizeof(item[0])); } }, tid); } for (size_t tid = 0; tid != threads.size(); ++tid) { threads[tid].join(); } return true; } }; } void printTests(ConcurrentQueueTests const& tests) { std::printf(" Supported tests are:\n"); std::vector names; tests.getAllTestNames(names); for (auto it = names.cbegin(); it != names.cend(); ++it) { std::printf(" %s\n", it->c_str()); } } // Basic test harness #if !defined(TARGET_OS_IPHONE) int main(int argc, char** argv) { bool disablePrompt = false; unsigned int iterations = 8; std::vector selectedTests; // Disable buffering (so that when run in, e.g., Sublime Text, the output appears as it is written) std::setvbuf(stdout, nullptr, _IONBF, 0); // Isolate the executable name std::string progName = argv[0]; auto slash = progName.find_last_of("/\\"); if (slash != std::string::npos) { progName = progName.substr(slash + 1); } ConcurrentQueueTests tests; // Parse command line options if (argc > 1) { bool printHelp = false; bool printedTests = false; bool error = false; for (int i = 1; i < argc; ++i) { if (std::strcmp(argv[i], "--help") == 0) { printHelp = true; } else if (std::strcmp(argv[i], "--disable-prompt") == 0) { disablePrompt = true; } else if (std::strcmp(argv[i], "--run") == 0) { if (i + 1 == argc || argv[i + 1][0] == '-') { std::printf("Expected test name argument for --run option.\n"); if (!printedTests) { printTests(tests); printedTests = true; } error = true; continue; } if (!tests.validateTestName(argv[++i])) { std::printf("Unrecognized test '%s'.\n", argv[i]); if (!printedTests) { printTests(tests); printedTests = true; } error = true; continue; } selectedTests.push_back(argv[i]); } else if (std::strcmp(argv[i], "--iterations") == 0) { if (i + 1 == argc || argv[i + 1][0] == '-') { std::printf("Expected iteration count argument for --iterations option.\n"); error = true; continue; } iterations = static_cast(std::atoi(argv[++i])); } else { std::printf("Unrecognized option '%s'.\n", argv[i]); error = true; } } if (error || printHelp) { if (error) { std::printf("\n"); } std::printf("%s\n Description: Runs unit tests for moodycamel::ConcurrentQueue\n", progName.c_str()); std::printf(" --help Prints this help blurb\n"); std::printf(" --run test Runs only the specified test(s)\n"); std::printf(" --iterations N Do N iterations of each test\n"); std::printf(" --disable-prompt Disables prompt before exit when the tests finish\n"); return error ? -1 : 0; } } int exitCode = 0; bool result; if (selectedTests.size() > 0) { std::printf("Running %d iteration%s of selected unit test%s for moodycamel::ConcurrentQueue.\n\n", iterations, iterations == 1 ? "" : "s", selectedTests.size() == 1 ? "" : "s"); result = tests.run(selectedTests, iterations); } else { std::printf("Running %d iteration%s of all unit tests for moodycamel::ConcurrentQueue.\n(Run %s --help for other options.)\n\n", iterations, iterations == 1 ? "" : "s", progName.c_str()); result = tests.run(iterations); } if (result) { std::printf("All %stests passed.\n", (selectedTests.size() > 0 ? "selected " : "")); } else { std::printf("Test(s) failed!\n"); exitCode = 2; } if (!disablePrompt) { std::printf("Press ENTER to exit.\n"); getchar(); } return exitCode; } #else // Provide entry function that can be invoked // by a test host (iOS app / test runner) bool runAllTests() { unsigned int iterations = 8; ConcurrentQueueTests tests; return tests.run(iterations); } #endif // !defined(TARGET_OS_IPHONE)